Skip to content

Name the paginated call and assistant list endpoints in the SDKs - #1400

Draft
chris-garber-vapi wants to merge 2 commits into
mainfrom
chrisgarber/sdk-v2-call-assistant-lists
Draft

chris-garber-vapi wants to merge 2 commits into
mainfrom
chrisgarber/sdk-v2-call-assistant-lists

Conversation

@chris-garber-vapi

Copy link
Copy Markdown

Draft. Do not merge yet. This depends on an API change (VapiAI/vapi, internal) that publishes GET /v2/call and GET /v2/assistant in https://api.vapi.ai/api-json. Merge it only after that change is deployed and the nightly update-openapi.yml sync has added both paths to fern/apis/api/openapi.json. If it merges earlier, these overrides make Fern generate an empty listPaginated(): Promise<void> (checked locally).

Description

  • Names the two paginated list endpoints in the SDKs and the API reference:

    • GET /v2/call → calls.listPaginated ("List Calls (Paginated)")
    • GET /v2/assistant → assistants.listPaginated ("List Assistants (Paginated)")

    Without overrides, Fern would derive the names from the controller (callControllerFindAllPaginated), as it already does for phoneNumbers.phoneNumberControllerFindAllPaginated.

  • Rewords the shared PaginationMeta descriptions so they fit any resource (they said "phone numbers"), documents nextCursor, hasNextPage, totalPages and sortOrder, and adds descriptions for CallPaginatedResponse and AssistantPaginatedResponse.

  • Overlay fixes so every exposed parameter works from the SDKs:

    • customer and assistantOverrides on /v2/call are typed and marked deepObject. As untyped objects, the SDKs sent them as JSON strings, which the API rejects with a 400.
    • Drops structuredOutputs and score from /v2/call. The API reads these only inside the nested artifact object and rejects them at the top level.
    • Drops sortBy from /v2/assistant, which always sorts by creation time.
    • Replaces the cursor description, which named an internal ticket.

Generated TypeScript (local fern generate --local, fernapi/fern-typescript-sdk 3.63.0, with both paths spliced into openapi.json):

client.calls.listPaginated(
  request?: Vapi.ListPaginatedCallsRequest,
  requestOptions?: CallsClient.RequestOptions,
): core.HttpResponsePromise<Vapi.CallPaginatedResponse>

client.assistants.listPaginated(
  request?: Vapi.ListPaginatedAssistantsRequest,
  requestOptions?: AssistantsClient.RequestOptions,
): core.HttpResponsePromise<Vapi.AssistantPaginatedResponse>

Request URLs captured from the generated client, both accepted by the API's request validation:

/v2/call?assistantOverrides[variableValues][name]=J&customer[number]=%2B14155550100&transcript=refund&isSimulation=false&idAny=…&idAny=…&limit=10&createdAtGe=2026-11-01T00:00:00Z
/v2/assistant?idAny=…&name=support&page=2

Testing Steps

  • fern check --api api: 0 errors, same 15 warnings as main (with and without the two paths in openapi.json)
  • Local TypeScript generation, plus a typechecked usage snippet
  • After the spec sync lands: rebase, confirm the "Preview SDKs" check, and check /api-reference/calls/list-paginated in the docs preview

🤖 Generated with Claude Code

Chris Garber and others added 2 commits November 5, 2026 22:03
Add Fern overrides for GET /v2/call and GET /v2/assistant so the SDKs expose
them as calls.listPaginated and assistants.listPaginated rather than names
derived from the controller. Describe the shared PaginationMeta fields for any
resource, not only phone numbers.

Overlay fixes so every exposed /v2/call and /v2/assistant parameter works
from the SDKs:
- Type `customer` and `assistantOverrides` and mark them deepObject. As
  untyped objects, the SDKs send them as JSON strings, which the API rejects.
- Drop the top-level `structuredOutputs` and `score` parameters. The API
  reads those filters from the nested `artifact` object and rejects them at
  the top level.
- Drop `sortBy` from /v2/assistant, which always sorts by creation time.
- Replace the `cursor` description, which named an internal ticket.

Merge only after the API change publishing these routes is deployed and the
nightly spec sync has added them to openapi.json. Before then, these
overrides generate an empty listPaginated() method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

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.

1 participant