rueder frontend
    Preparing search index...

    Interface Reader

    interface Reader {
        account: Account | null;
        can: Abilities;
        connection: Connection;
        current: Article | null;
        cursor: string | null;
        demo: DemoSwitches | null;
        feeds: Record<string, Feed>;
        filters: RuleBook;
        fresh: Fresh[];
        hasMore: boolean;
        hiddenCount: number;
        labels: Label[];
        latestStarred: Article[];
        legal: LegalLinks | null;
        loading: boolean;
        moved: number;
        newestFirst: boolean;
        notice: Notice | null;
        open: string | null;
        pending: number;
        query: string;
        reportsConsent: { available: boolean; on: boolean } | null;
        resuming: boolean;
        stream: Stream;
        totalUnread: number;
        tree: TreeNode[];
        unreadOnly: boolean;
        unsentChanges: number;
        visible: Article[];
        acceptTerms(): Promise<boolean>;
        addFolder(title: string): void;
        addLabel(title: string, color: string, article?: Article): void;
        articleInfo(article: Article): Promise<ArticleInfo | null>;
        articleSource(article: Article): Promise<ArticleSource | null>;
        canGroup(id: string, targetId: string): boolean;
        canMove(id: string, targetId: string, position: DropPosition): boolean;
        changeLabel(id: string, change: { color?: string; title?: string }): void;
        dismissNotice(): void;
        exportAccount(): Promise<string | null>;
        exportOpml(): Promise<string | null>;
        feedInfo(id: string): Promise<FeedInfo | null>;
        findFeeds(address: string): Promise<Found>;
        group(id: string, targetId: string, title: string): void;
        importAccount(file: Blob): Promise<Moved>;
        importOpml(file: Blob): Promise<Imported>;
        isClosed(id: string): boolean;
        isHidden(article: Article): boolean;
        isRead(article: Article): boolean;
        isStarred(article: Article): boolean;
        labelsOf(article: Article): string[];
        load(article: Article): void;
        markAllRead(olderThan?: number): void;
        move(id: string, targetId: string, position: DropPosition): void;
        noteError(kind: ReportKind, error: unknown): void;
        nudge(id: string, direction: NudgeDirection): boolean;
        reconnect(): void;
        refresh(): void;
        removeFolder(id: string): void;
        removeLabel(id: string): void;
        renameFeed(id: string, title: string): void;
        renameFolder(id: string, title: string): void;
        reportContent(
            target: { feedId: string; seq?: number },
            reason: "illegal" | "copyright" | "malicious" | "spam" | "other",
            note: string,
        ): Promise<ReportOutcome>;
        resume(view: Resumed): void;
        saveSettings(settings: Settings): void;
        scrolledPast(article: Article): void;
        select(article: Article, open?: boolean): void;
        setClosed(id: string, closed: boolean): void;
        setFetchAgent(id: string, agent: FetchAgent): Promise<boolean>;
        setLabel(article: Article, labelId: string, on: boolean): void;
        setRead(article: Article, read: boolean): void;
        setReportsConsent(on: boolean): void;
        show(stream: Stream): void;
        showMore(): void;
        showNew(): void;
        signOut(): void;
        start(): () => void;
        status(): Promise<ServerStatus | null>;
        step(by: -1 | 1, open?: boolean): void;
        subscribe(
            url: string,
            folderId: string | null,
            page?: boolean,
        ): Promise<Subscribed>;
        title(stream?: Stream): string | null;
        toggleOpen(article: Article): void;
        toggleStar(article: Article): void;
        unreadIn(node: TreeNode): number;
        unsubscribe(id: string): void;
        versions(article: Article): Promise<ArticleVersion[]>;
    }

    Implemented by

    Index
    account: Account | null

    Who is logged in; null where there is nobody to log in.

    connection: Connection

    Whether what is shown is live, for the sign in the top bar.

    current: Article | null

    The article the cursor is on.

    cursor: string | null

    The article the cursor is on, and the one that is open in the list view.

    demo: DemoSwitches | null

    Only the reader with made-up data has these.

    feeds: Record<string, Feed>
    filters: RuleBook

    The filter rules.

    fresh: Fresh[]

    For the start page: feeds with something unread, and the latest stars.

    hasMore: boolean

    Whether the list goes on after what is on the page.

    hiddenCount: number
    labels: Label[]

    The account's labels, in their order.

    latestStarred: Article[]
    legal: LegalLinks | null

    The operator's legal texts, where the reader has a server that names them.

    loading: boolean

    Whether what the main pane shows is still on its way.

    moved: number

    Counts the steps of the cursor, so the list can scroll to where it went.

    newestFirst: boolean
    notice: Notice | null

    What went wrong last, until it is closed.

    open: string | null
    pending: number

    Articles that arrived since the list was drawn.

    query: string

    The words the list is searched for.

    reportsConsent: { available: boolean; on: boolean } | null

    Whether the server takes reports of errors from browsers and whether this account sends them (can.reports); null until known.

    resuming: boolean

    Whether resume is still looking for the articles it wants.

    stream: Stream

    What the main pane shows.

    totalUnread: number
    tree: TreeNode[]
    unreadOnly: boolean
    unsentChanges: number

    How many changes wait for the server, which did not answer; they go once it does.

    visible: Article[]

    The part of the list that is on the page, in reading order.

    • Agrees to the version of the terms the account was asked about; false if that did not work.

      Returns Promise<boolean>

    • Makes a label, and with article puts it on that article too.

      Parameters

      • title: string
      • color: string
      • Optionalarticle: Article

      Returns void

    • Whether dropping the feed id on the feed targetId can put both into a new folder.

      Parameters

      • id: string
      • targetId: string

      Returns boolean

    • Parameters

      • id: string
      • change: { color?: string; title?: string }

      Returns void

    • The whole account as a file for another rueder (can.move); null if there was no answer.

      Returns Promise<string | null>

    • All subscriptions as an OPML file; null if there was no answer.

      Returns Promise<string | null>

    • What the server knows of a feed and how it is fetched, for support; null if there was no answer.

      Parameters

      • id: string

      Returns Promise<FeedInfo | null>

    • Looks at an address, which may lack its https://, for feeds.

      Parameters

      • address: string

      Returns Promise<Found>

    • Puts the feed targetId and then the feed id into a new folder where the target was.

      Parameters

      • id: string
      • targetId: string
      • title: string

      Returns void

    • Brings in the file of an account, from this rueder or another: adds what it has and replaces the settings, then shows it all anew.

      Parameters

      • file: Blob

      Returns Promise<Moved>

    • Takes the subscriptions of an OPML file in; folders are found by their name or made.

      Parameters

      • file: Blob

      Returns Promise<Imported>

    • Whether a folder of the tree is folded away in the sidebar. The sidebar's own sections use a name instead of a folder's id, labels for one.

      Parameters

      • id: string

      Returns boolean

    • The labels an article has, by their ids, in the order of the labels.

      Parameters

      Returns string[]

    • Marks the stream's articles as read; with olderThan, only those older than that many milliseconds.

      Parameters

      • OptionalolderThan: number

      Returns void

    • Tries to reach the server again now, instead of after a while.

      Returns void

    • Takes a label off every article and deletes it.

      Parameters

      • id: string

      Returns void

    • Gives a feed a name of the reader's own; an empty one goes back to the feed's.

      Parameters

      • id: string
      • title: string

      Returns void

    • Parameters

      • id: string
      • title: string

      Returns void

    • Reports a feed, or one of its articles, to the admins.

      Parameters

      • target: { feedId: string; seq?: number }
      • reason: "illegal" | "copyright" | "malicious" | "spam" | "other"
      • note: string

      Returns Promise<ReportOutcome>

    • Shows a stream as it was left, with its filters and its open article, before start. The list is loaded far enough to hold the wanted articles and the open one, as far as they are still in it.

      Parameters

      Returns void

    • Keeps the settings with the account, where there is one; called with them whenever they change. The reader puts what the account has into settings.

      Parameters

      Returns void

    • Puts the cursor on an article; opening it marks it as read.

      Parameters

      • article: Article
      • Optionalopen: boolean

      Returns void

    • Parameters

      • id: string
      • closed: boolean

      Returns void

    • Says as what a feed is fetched (can.fetchAgent); false if that did not work.

      Parameters

      Returns Promise<boolean>

    • Agrees to send reports of errors, or no longer; no longer deletes what was sent.

      Parameters

      • on: boolean

      Returns void

    • Brings in the articles that arrived since the list was drawn.

      Returns void

    • Starts what goes on in the background; returns how to stop it.

      Returns () => void

    • Moves the cursor by one article, down the list for +1.

      Parameters

      • by: -1 | 1
      • Optionalopen: boolean

      Returns void

    • Subscribes to a feed found by findFeeds, at the end of a folder or of the top level, and shows it. page says the candidate was a web page without a feed.

      Parameters

      • url: string
      • folderId: string | null
      • Optionalpage: boolean

      Returns Promise<Subscribed>

    • The name of a feed or a folder; null for the fixed lists.

      Parameters

      Returns string | null

    • Ends a subscription, and with it what was read and starred there.

      Parameters

      • id: string

      Returns void