Returns a function for retrieving a paged array of people from the given data context.

Error if a data context is not provided

getAll which provides the same data, but without having to manually account for paging

  • Parameters

    Returns (
        personType: Readonly<{ contactType: string }>,
        cursor?: Nullable<string>,
        limit?: number | `${number}`,
    ) => Promise<Page<Person.v1.Person>>

    a function for retrieving a paged array of people

      • (
            personType: Readonly<{ contactType: string }>,
            cursor?: Nullable<string>,
            limit?: number | `${number}`,
        ): Promise<Page<Person.v1.Person>>
      • Returns an array of people for the provided page specifications.

        Parameters

        • personType: Readonly<{ contactType: string }>

          the type of people to return

        • cursor: Nullable<string> = null

          the token identifying which page to retrieve. A null value indicates the first page should be returned. Subsequent pages can be retrieved by providing the cursor returned with the previous page.

        • limit: number | `${number}` = DEFAULT_DOCS_PAGE_LIMIT

          the maximum number of people to return. Default is 100.

        Returns Promise<Page<Person.v1.Person>>

        a page of people for the provided specification

        InvalidArgumentError if no type is provided or if the type is not for a person

        InvalidArgumentError if the provided limit value is <=0

        InvalidArgumentError if the provided cursor is not a valid page token or null