@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Type Alias PageFetcher<Page, Cursor>

    PageFetcher: (
        cursor: Cursor | undefined,
    ) => Promise<{ nextCursor: Cursor | undefined; page: Page }>

    Function that fetches a single page given a cursor.

    The cursor is undefined for the first page, then takes the value of the previous page's nextCursor on subsequent calls. Iteration stops when nextCursor is undefined (or any other falsy value the caller maps to undefined).

    Type Parameters

    • Page

      The per-page response shape returned by the B2 endpoint.

    • Cursor

      The cursor type (typically string or a {name, id} pair).

    Type Declaration

      • (
            cursor: Cursor | undefined,
        ): Promise<{ nextCursor: Cursor | undefined; page: Page }>
      • Parameters

        Returns Promise<{ nextCursor: Cursor | undefined; page: Page }>