GetPage type

The type of a custom function that defines how to get a page and a link to the next one if any.

type GetPage<TPage> = (
  pageLink: string,
  maxPageSize?: number
) => Promise<{ nextPageLink?: string; page: TPage }>