vapi: add cursor-based pagination to phoneNumberId, assistantId, and squadId propDefinitions
Summary
The phoneNumberId, assistantId, and squadId propDefinitions in components/vapi/vapi.app.mjs currently fetch only a single page of results using limit: LIMIT (1000 records — the documented per-request maximum). Truncation is therefore only an issue for accounts with more than 1000 records per resource type, but the async options() functions should ideally support load-more pagination.
Background
Raised during review of #21084 (comment: https://github.com/PipedreamHQ/pipedream/pull/21084#discussion_r3367045633).
The existing async *paginate() helper in vapi.app.mjs consumes a { data, meta: { current_page, last_page } } response shape, but the Vapi GET /phone-number, GET /assistant, and GET /squad list endpoints return plain arrays, not that shape. Vapi uses createdAtLt cursor pagination on these endpoints.
Work needed
- Implement cursor-based (
createdAtLt) pagination for the three propDefinitions:phoneNumberId—GET /phone-numberassistantId—GET /assistantsquadId—GET /squad
- Either add a new
paginateCursor()helper to the app file, or replicate the cursor logic inline in eachasync options(). - Wire up
prevContextto pass the cursor between load-more calls. - Bump the app package version accordingly.
References
- PR where this was deferred: #21084
- Vapi phone-number list docs: https://docs.vapi.ai/api-reference/phone-numbers/list
/cc @VibhanshuPandey
Duplicate of #21085 (the bot double-fired when creating the tracking issue).