rueder frontend
    Preparing search index...

    Variable apiConst

    api: {
        acceptTerms: (version: string) => Promise<void>;
        addFolder: (title: string, parentId?: number | null) => Promise<Created>;
        addLabel: (title: string, color: string) => Promise<Created>;
        addRule: (rule: ApiNewRule) => Promise<RuleOutcome>;
        appPasswords: () => Promise<AppPasswords>;
        article: (feedId: number, seq: number) => Promise<Article>;
        articleInfo: (feedId: number, seq: number) => Promise<ArticleInfo>;
        articleSource: (feedId: number, seq: number) => Promise<ArticleSource>;
        beaconReports: (reports: ClientReport[]) => boolean;
        changeEmail: (body: NewEmail) => Promise<Pending>;
        changeLabel: (id: number, change: LabelChange) => Promise<void>;
        changePassword: (body: NewPassword) => Promise<void>;
        changeRule: (id: number, rule: ApiNewRule) => Promise<RuleOutcome>;
        confirmEmail: (token: string) => Promise<Confirmed>;
        confirmSecondFactor: (code: string) => Promise<RecoveryCodes>;
        createAppPassword: (body: NewAppPassword) => Promise<CreatedAppPassword>;
        emailState: () => Promise<EmailState>;
        events: () => EventStream | null;
        exportAccount: () => Promise<string>;
        exportOpml: () => Promise<string>;
        feedInfo: (id: number) => Promise<FeedInfo>;
        findFeeds: (url: string) => Promise<FoundFeeds>;
        finishPasskey: (body: PasskeyRegistration) => Promise<RegisteredPasskey>;
        finishPasskeyLogin: (body: PasskeyAnswer) => Promise<Me>;
        forgotPassword: (name: string) => Promise<void>;
        importAccount: (file: Blob) => Promise<AccountImported>;
        importOpml: (file: Blob) => Promise<OpmlImported>;
        invite: (uses: number) => Promise<MadeInvite>;
        invites: () => Promise<Invites>;
        labels: () => Promise<Label[]>;
        list: (stream: ListStream, page: PageQuery) => Promise<ListItem[]>;
        login: (username: string, password: string, code?: string) => Promise<Me>;
        loginWays: () => Promise<LoginWays>;
        logout: () => Promise<void>;
        me: () => Promise<Me>;
        move: (
            node: NodeRef,
            target: NodeRef,
            position: DropPosition,
        ) => Promise<void>;
        passkeys: () => Promise<Passkeys>;
        previewRule: (rule: ApiNewRule) => Promise<RulePreview>;
        readUpto: (
            stream: ListStream,
            uptoId: number,
            olderThan?: number,
        ) => Promise<void>;
        register: (
            username: string,
            password: string,
            invite?: string,
            acceptedTerms?: string,
            email?: string,
            language?: string,
            captcha?: CaptchaSolution,
        ) => Promise<Me | Awaiting>;
        registering: (invite?: string) => Promise<Registering>;
        removeAccount: (proof: Farewell) => Promise<void>;
        removeEmail: (proof: EmailProof) => Promise<void>;
        removeFolder: (id: number) => Promise<void>;
        removeLabel: (id: number) => Promise<void>;
        removePasskey: (id: number, body: RemovePasskey) => Promise<void>;
        removeRule: (id: number) => Promise<RuleOutcome>;
        renameFeed: (id: number, title: string) => Promise<void>;
        renameFolder: (id: number, title: string) => Promise<void>;
        reportContent: (
            feedId: number,
            seq: number | undefined,
            report: ContentReport,
        ) => Promise<void>;
        reportsConsent: () => Promise<ReportsConsent>;
        resendEmail: (username: string, password: string) => Promise<Pending>;
        resetPassword: (token: string, fresh: string) => Promise<void>;
        revokeAppPassword: (id: number) => Promise<void>;
        revokeInvite: (id: number) => Promise<void>;
        ruleHits: () => Promise<RuleHits[]>;
        rules: () => Promise<Rule[]>;
        saveSettings: (settings: unknown) => Promise<void>;
        search: (
            words: string,
            scope: SearchScope,
            page: SearchPage,
        ) => Promise<SearchHits>;
        secondFactor: () => Promise<SecondFactor>;
        sendReports: (reports: ClientReport[]) => Promise<void>;
        setFetchAgent: (id: number, agent: FetchAgent) => Promise<void>;
        setLabel: (
            feedId: number,
            seq: number,
            labelId: number,
            on: boolean,
        ) => Promise<void>;
        setReportsConsent: (on: boolean) => Promise<void>;
        setState: (
            feedId: number,
            seq: number,
            change: { read?: boolean; starred?: boolean },
        ) => Promise<void>;
        settings: () => Promise<unknown>;
        setUpSecondFactor: (
            body: SecondFactorPassword,
        ) => Promise<SecondFactorSetup>;
        startPasskey: (body: NewPasskey) => Promise<PasskeyChallenge>;
        startPasskeyLogin: () => Promise<PasskeyChallenge>;
        startPasskeyProof: () => Promise<PasskeyChallenge>;
        status: () => Promise<ServerStatus>;
        subscribe: (
            url: string,
            folderId: number | null,
            page?: boolean,
        ) => Promise<number>;
        switchOffSecondFactor: (body: SecondFactorSwitchOff) => Promise<void>;
        tab: string;
        tree: () => Promise<Tree>;
        unsubscribe: (id: number) => Promise<void>;
        versions: (feedId: number, seq: number) => Promise<ArticleVersion[]>;
    } = ...

    Type Declaration

    • acceptTerms: (version: string) => Promise<void>
    • addFolder: (title: string, parentId?: number | null) => Promise<Created>
    • addLabel: (title: string, color: string) => Promise<Created>
    • addRule: (rule: ApiNewRule) => Promise<RuleOutcome>
    • appPasswords: () => Promise<AppPasswords>
    • article: (feedId: number, seq: number) => Promise<Article>
    • articleInfo: (feedId: number, seq: number) => Promise<ArticleInfo>
    • articleSource: (feedId: number, seq: number) => Promise<ArticleSource>
    • beaconReports: (reports: ClientReport[]) => boolean

      Sends reports as the page is left: the request outlives the page.

    • changeEmail: (body: NewEmail) => Promise<Pending>

      Mails a link to a new address, which counts once it is opened.

    • changeLabel: (id: number, change: LabelChange) => Promise<void>
    • changePassword: (body: NewPassword) => Promise<void>

      Gives the account another password. The server ends every other session of it and answers with a fresh cookie for this browser.

    • changeRule: (id: number, rule: ApiNewRule) => Promise<RuleOutcome>
    • confirmEmail: (token: string) => Promise<Confirmed>

      Opens the link from a mail, with or without a session.

    • confirmSecondFactor: (code: string) => Promise<RecoveryCodes>
    • createAppPassword: (body: NewAppPassword) => Promise<CreatedAppPassword>
    • emailState: () => Promise<EmailState>

      The account's address and the one that waits for its link.

    • events: () => EventStream | null

      The live updates: one connection that stays open and comes back by itself after a break. Null where the browser has none.

    • exportAccount: () => Promise<string>

      The whole account as a file, for another rueder.

    • exportOpml: () => Promise<string>
    • feedInfo: (id: number) => Promise<FeedInfo>
    • findFeeds: (url: string) => Promise<FoundFeeds>

      The feeds at an address: the feed itself, or those a web page names.

    • finishPasskey: (body: PasskeyRegistration) => Promise<RegisteredPasskey>
    • finishPasskeyLogin: (body: PasskeyAnswer) => Promise<Me>
    • forgotPassword: (name: string) => Promise<void>

      Asks for a link that sets a new password, by the account's name or its address. The server answers the same, with nothing to read, whoever it is.

    • importAccount: (file: Blob) => Promise<AccountImported>

      A file of exportAccount, from this rueder or another, sent as it is.

    • importOpml: (file: Blob) => Promise<OpmlImported>
    • invite: (uses: number) => Promise<MadeInvite>
    • invites: () => Promise<Invites>
    • labels: () => Promise<Label[]>
    • list: (stream: ListStream, page: PageQuery) => Promise<ListItem[]>
    • login: (username: string, password: string, code?: string) => Promise<Me>
    • loginWays: () => Promise<LoginWays>
    • logout: () => Promise<void>
    • me: () => Promise<Me>
    • move: (node: NodeRef, target: NodeRef, position: DropPosition) => Promise<void>
    • passkeys: () => Promise<Passkeys>
    • previewRule: (rule: ApiNewRule) => Promise<RulePreview>

      Tries a rule without storing it; a pattern that cannot be used is refused with 400.

    • readUpto: (stream: ListStream, uptoId: number, olderThan?: number) => Promise<void>

      Marks as read what arrived in the stream up to the article of this id; with olderThan, only what was published more than that many seconds ago.

    • register: (
          username: string,
          password: string,
          invite?: string,
          acceptedTerms?: string,
          email?: string,
          language?: string,
          captcha?: CaptchaSolution,
      ) => Promise<Me | Awaiting>

      Makes an account and logs it in; where every account needs a confirmed address, it is made and waits for its link instead (Awaiting). A refusal is 403 with one word, see NewRegistration.

    • registering: (invite?: string) => Promise<Registering>

      Whether anybody can register, and whether an invitation can be used; for anybody.

    • removeAccount: (proof: Farewell) => Promise<void>

      Deletes the account that is logged in, for good; the password, or the name of one without.

    • removeEmail: (proof: EmailProof) => Promise<void>

      Takes the address from the account, where it is optional.

    • removeFolder: (id: number) => Promise<void>
    • removeLabel: (id: number) => Promise<void>
    • removePasskey: (id: number, body: RemovePasskey) => Promise<void>
    • removeRule: (id: number) => Promise<RuleOutcome>
    • renameFeed: (id: number, title: string) => Promise<void>

      An empty title gives the feed its own name back.

    • renameFolder: (id: number, title: string) => Promise<void>
    • reportContent: (
          feedId: number,
          seq: number | undefined,
          report: ContentReport,
      ) => Promise<void>
    • reportsConsent: () => Promise<ReportsConsent>
    • resendEmail: (username: string, password: string) => Promise<Pending>

      Sends the link again to an account that waits for its address.

    • resetPassword: (token: string, fresh: string) => Promise<void>

      Sets a new password with the token from that link; it does not log in.

    • revokeAppPassword: (id: number) => Promise<void>
    • revokeInvite: (id: number) => Promise<void>
    • ruleHits: () => Promise<RuleHits[]>

      What each of the stored rules finds.

    • rules: () => Promise<Rule[]>
    • saveSettings: (settings: unknown) => Promise<void>
    • secondFactor: () => Promise<SecondFactor>
    • sendReports: (reports: ClientReport[]) => Promise<void>
    • setFetchAgent: (id: number, agent: FetchAgent) => Promise<void>

      For admins only.

    • setLabel: (feedId: number, seq: number, labelId: number, on: boolean) => Promise<void>

      Puts a label on an article, or takes it off.

    • setReportsConsent: (on: boolean) => Promise<void>
    • setState: (
          feedId: number,
          seq: number,
          change: { read?: boolean; starred?: boolean },
      ) => Promise<void>
    • settings: () => Promise<unknown>

      The settings as the account keeps them; what is in them is the page's business.

    • setUpSecondFactor: (body: SecondFactorPassword) => Promise<SecondFactorSetup>
    • startPasskey: (body: NewPasskey) => Promise<PasskeyChallenge>

      Starts making a passkey: what to ask the device.

    • startPasskeyLogin: () => Promise<PasskeyChallenge>

      Starts logging in with a passkey: what to ask the device.

    • startPasskeyProof: () => Promise<PasskeyChallenge>

      Starts asking a passkey of the account that its owner is there.

    • status: () => Promise<ServerStatus>

      For admins only.

    • subscribe: (url: string, folderId: number | null, page?: boolean) => Promise<number>

      Subscribes to the feed at an address, or of a web page, and gives back its number.

    • switchOffSecondFactor: (body: SecondFactorSwitchOff) => Promise<void>
    • tab: string

      This tab's name, as the requests carry it.

    • tree: () => Promise<Tree>
    • unsubscribe: (id: number) => Promise<void>
    • versions: (feedId: number, seq: number) => Promise<ArticleVersion[]>