Skip to content

feat(platform): paginate /platform/external-accounts#415

Merged
bsiaotickchong merged 2 commits intomainfrom
paginate-platform-external-accounts
Apr 28, 2026
Merged

feat(platform): paginate /platform/external-accounts#415
bsiaotickchong merged 2 commits intomainfrom
paginate-platform-external-accounts

Conversation

@bsiaotickchong
Copy link
Copy Markdown
Contributor

Summary

Brings cursor pagination to GET /platform/external-accounts, matching what /customers/external-accounts already does.

  • Adds limit (default 20, max 100) and cursor query params
  • Extends PlatformExternalAccountListResponse with hasMore, nextCursor, totalCount
  • Drops the `paginated: false` override in Stainless config so the generated SDKs expose the standard auto-paginating list helper for this endpoint

Why

The dashboard recipient picker on the platform-payout flow loads recipients via this endpoint and is currently capped at whatever the unpaginated handler returns. The customer-flow recipient picker already paginates (paired with webdev#26819) — this brings parity to the platform flow.

Test plan

  • `make build` — bundle succeeds
  • `make lint` — Redocly validates clean (16 pre-existing warnings, no new ones; spectral step fails locally with `command not found` independent of this change)
  • Verify Mintlify API reference page picks up new params after merge
  • Verify Stainless regenerates the platform external accounts list helper as a paginating method
  • webdev PR #26819 wires the consumer side (Python SDK + sparkcore handler)

Brings cursor pagination to the platform external accounts list,
matching what /customers/external-accounts already does. Adds `limit`
(default 20, max 100) and `cursor` query params and extends
PlatformExternalAccountListResponse with `hasMore`, `nextCursor`, and
`totalCount`.

Drops the `paginated: false` override on the Stainless config so the
generated SDKs expose the standard auto-paginating list helper for
this endpoint.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Apr 28, 2026 10:04pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

feat(api): add pagination to external accounts list method

openapi

feat(api): add pagination parameters and fields to external accounts list

python

feat(api): add pagination support to external_accounts list method

typescript

feat(api): add pagination to platform.externalAccounts.list
grid-openapi studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅

grid-typescript studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/9bf7e0eaf009aa3ac5e3eb2872190020a332a46e/dist.tar.gz
grid-python studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

pip install https://pkg.stainless.com/s/grid-python/0ab2c22cad367fb30db0b2c1ab1ffead0b47c339/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-04-28 22:31:23 UTC

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR adds cursor pagination (limit and cursor params) to GET /platform/external-accounts, deletes the now-redundant PlatformExternalAccountListResponse schema in favour of reusing ExternalAccountListResponse, and removes the paginated: false Stainless override so the SDK generates a standard auto-paginating list helper — bringing this endpoint to parity with /customers/external-accounts.

Confidence Score: 5/5

Safe to merge — clean, targeted spec change with no logic errors or breaking issues.

All changes are additive (new query params are optional, default behaviour preserved), the schema deletion is intentional and the replacement is structurally compatible, and the Stainless config change is correct. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
openapi/paths/platform/platform_external_accounts.yaml Adds limit and cursor query params; response schema changed to reuse ExternalAccountListResponse. Clean parity with the customer endpoint.
openapi/components/schemas/external_accounts/PlatformExternalAccountListResponse.yaml Deleted — superseded by the shared ExternalAccountListResponse schema, addressing the duplicate-schema concern from prior review.
.stainless/stainless.yml Removes paginated: false override so the generated SDK exposes a standard auto-paginating list helper for this endpoint.
openapi.yaml Generated bundle correctly reflects source changes: pagination params added, schema ref updated, PlatformExternalAccountListResponse removed.
mintlify/openapi.yaml Generated Mintlify bundle reflects same changes as root openapi.yaml.

Sequence Diagram

sequenceDiagram
    participant Client
    participant API as GET /platform/external-accounts
    participant Schema as ExternalAccountListResponse

    Client->>API: ?limit=20&cursor=&currency=...
    API-->>Client: { data[], hasMore, nextCursor, totalCount }
    Note over Client,Schema: Response now uses shared ExternalAccountListResponse

    Client->>API: ?limit=20&cursor=<nextCursor>
    API-->>Client: { data[], hasMore: false, totalCount }
Loading

Reviews (2): Last reviewed commit: "refactor: drop PlatformExternalAccountLi..." | Re-trigger Greptile

…ountListResponse

Per review feedback on #415: PlatformExternalAccountListResponse and
ExternalAccountListResponse are now structurally identical (same item
type, same pagination contract). Consolidating to one schema removes
the duplication and the silent-drift risk.
@bsiaotickchong
Copy link
Copy Markdown
Contributor Author

@greptileai

@bsiaotickchong bsiaotickchong merged commit 4d4dda5 into main Apr 28, 2026
10 checks passed
@bsiaotickchong bsiaotickchong deleted the paginate-platform-external-accounts branch April 28, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants