kinetex - v1.0.0-rc.1
    Preparing search index...

    Interface Page<T>

    A single page of paginated results.

    interface Page<T> {
        items: T[];
        total: number | null;
        page: number | null;
        perPage: number | null;
        totalPages: number | null;
        hasNext: boolean;
        hasPrev: boolean;
        nextCursor: string | null;
        prevCursor: string | null;
        raw: unknown;
    }

    Type Parameters

    • T
    Index

    Properties

    items: T[]

    Items on this page

    total: number | null

    Total item count across all pages, or null if unknown

    page: number | null

    Current page number, or null if not page-based

    perPage: number | null

    Items per page, or null if unknown

    totalPages: number | null

    Total number of pages, or null if unknown

    hasNext: boolean

    Whether there are more pages after this one

    hasPrev: boolean

    Whether there are pages before this one

    nextCursor: string | null

    Cursor for fetching the next page, or null

    prevCursor: string | null

    Cursor for fetching the previous page, or null

    raw: unknown

    Raw response from the API (the R type from PaginationConfig). Use this to access additional response metadata not captured by the Page fields.

    const page = await firstPage;
    const responseHeaders = (page.raw as Response).headers;