clerk/javascript

Incorrect Return Type for getAllowlistIdentifierList

mario-jerkovic opened this issue ยท 3 comments

Preliminary Checks

Reproduction

https://github.com/mario-jerkovic/clerk-nodejs.git

Publishable key

pk_test_dHJ1ZS1zaGVlcGRvZy04Ni5jbGVyay5hY2NvdW50cy5kZXYk

Description

The getAllowlistIdentifierList method in the @clerk/clerk-sdk-node package is documented to return a PaginatedResourceResponse type.

However, in practice, it returns an AllowlistIdentifier[]. This discrepancy causes issues when attempting to work with pagination as the expected metadata for handling paginated data is absent.

issue.mov

Environment

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 181.75 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.12.2/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    bun: 1.1.4 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 124.0.6367.79
    Safari: 17.4.1
  npmPackages:
    @clerk/clerk-sdk-node: ^5.0.1 => 5.0.1
    @clerk/types: ^4.1.0 => 4.1.0
    dotenv: ^16.4.5 => 16.4.5
    ts-node: ^10.9.2 => 10.9.2
    typescript: ^5.4.5 => 5.4.5

FYI, getInvitationList has the exact same issue

doei commented

Just encountered the same issue with getUserOauthAccessToken

A fix for these issues is being worked on here: #3276