Circle V2 API Docs
    Preparing search index...

    Function createGroupedPaginatedResponse

    • Builds a PaginatedResponse where pagination is by distinct groups rather than items.

      Use when the query flattens grouped rows (e.g. runs per client) but the page size and total count groups (clients). The cursor advances by the number of distinct group keys on this page so it aligns with the server's group-level OFFSET.

      Type Parameters

      • T
      • K

      Parameters

      • items: T[]
      • total: number
      • offset: number
      • groupKey: (item: T) => K

      Returns PaginatedResponse<T>