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
) => Promise<{ nextPageLink?: string; page: TPage }>