From 6412ccf5cf2c23f3e6eda45d242ee711b0ed4d31 Mon Sep 17 00:00:00 2001 From: Chris Garber Date: Thu, 5 Nov 2026 21:54:51 -0500 Subject: [PATCH 1/2] Name the paginated call and assistant list endpoints in the SDKs 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 --- fern/apis/api/openapi-overrides.yml | 52 ++++++++++++++-- ...openapi-parameter-descriptions-overlay.yml | 59 +++++++++++++++++++ 2 files changed, 105 insertions(+), 6 deletions(-) diff --git a/fern/apis/api/openapi-overrides.yml b/fern/apis/api/openapi-overrides.yml index 050c06ef7..b1a67b721 100644 --- a/fern/apis/api/openapi-overrides.yml +++ b/fern/apis/api/openapi-overrides.yml @@ -58,6 +58,18 @@ paths: x-fern-sdk-group-name: - calls x-fern-sdk-method-name: update + /v2/call: + get: + summary: List Calls (Paginated) + description: >- + Returns a page of calls for the authenticated organization, with + pagination metadata including the total count. Filter by assistant, + squad, phone number, customer, ended reason, cost, or creation and + update timestamps, or search transcripts. To fetch the next page, pass + `metadata.nextCursor` back as `cursor`. + x-fern-sdk-group-name: + - calls + x-fern-sdk-method-name: listPaginated /chat: get: x-fern-availability: beta @@ -145,6 +157,17 @@ paths: x-fern-sdk-group-name: - assistants x-fern-sdk-method-name: update + /v2/assistant: + get: + summary: List Assistants (Paginated) + description: >- + Returns a page of assistants for the authenticated organization, with + pagination metadata including the total count. Search by name using a + partial, case-insensitive match, or filter by ID and creation or update + timestamps. + x-fern-sdk-group-name: + - assistants + x-fern-sdk-method-name: listPaginated /phone-number: get: description: >- @@ -3835,21 +3858,38 @@ components: description: >- A paginated collection of phone numbers and metadata describing the result set. + CallPaginatedResponse: + description: >- + A paginated collection of calls and metadata describing the result set. + AssistantPaginatedResponse: + description: >- + A paginated collection of assistants and metadata describing the result + set. PaginationMeta: description: >- - Pagination and retention metadata returned with a paginated list of - phone numbers. + Pagination and retention metadata returned with a paginated list. properties: itemsPerPage: - description: The number of phone numbers returned per page. + description: The number of items returned per page. totalItems: - description: The total number of phone numbers matching the request. + description: The total number of items matching the request. currentPage: description: The current page number. + totalPages: + description: The total number of pages matching the request. + hasNextPage: + description: Whether another page of results is available. + nextCursor: + description: >- + An opaque cursor for the next page. Pass it back as the `cursor` + query parameter to fetch the next page. Present only when a further + page likely exists, and only on endpoints that accept `cursor`. + sortOrder: + description: The sort order applied to the results. itemsBeyondRetention: description: >- - Whether additional matching phone numbers exist beyond the - organization's data-retention window. + Whether additional matching items exist beyond the organization's + data-retention window. createdAtLe: description: >- The inclusive upper creation-time boundary applied to the result diff --git a/fern/apis/api/openapi-parameter-descriptions-overlay.yml b/fern/apis/api/openapi-parameter-descriptions-overlay.yml index 4ee7d646c..86998891b 100644 --- a/fern/apis/api/openapi-parameter-descriptions-overlay.yml +++ b/fern/apis/api/openapi-parameter-descriptions-overlay.yml @@ -160,3 +160,62 @@ actions: - target: $.paths['/eval/simulation/run/{id}/item/{itemId}/generate'].post.parameters[?(@.name == 'force' && @.in == 'query')] update: description: Set to the string `true` to regenerate improvement suggestions even if they already exist. + # GET /v2/call reads structured-output and score filters from the nested + # `artifact` query object (`artifact[structuredOutputs][][eq]=...`, + # `artifact[score][gte]=...`). The generated spec flattens them to top-level + # `structuredOutputs` and `score`, which the API rejects with a 400 + # ("property ... should not exist"). Hide them until the API documents + # `artifact` correctly. + - target: $.paths['/v2/call'].get.parameters[?(@.name == 'structuredOutputs' && @.in == 'query')] + remove: true + - target: $.paths['/v2/call'].get.parameters[?(@.name == 'score' && @.in == 'query')] + remove: true + # The API declares these object filters as untyped `type: object`, so the + # SDKs send them as a JSON string (`customer={"number":...}`), which the API + # rejects with a 400 ("customer must be an object"). The API parses + # bracketed keys (`customer[number]=...`). Type them and mark them + # deepObject so the SDKs send that form. + - target: $.paths['/v2/call'].get.parameters[?(@.name == 'customer' && @.in == 'query')] + update: + style: deepObject + explode: true + - target: $.paths['/v2/call'].get.parameters[?(@.name == 'customer' && @.in == 'query')].schema + update: + title: CallListCustomerFilter + properties: + number: + type: string + description: Matches calls whose customer has this phone number. + name: + type: string + description: Matches calls whose customer has this name. + externalId: + type: string + description: Matches calls whose customer has this external ID. + extension: + type: string + description: Matches calls whose customer has this extension. + - target: $.paths['/v2/call'].get.parameters[?(@.name == 'assistantOverrides' && @.in == 'query')] + update: + style: deepObject + explode: true + - target: $.paths['/v2/call'].get.parameters[?(@.name == 'assistantOverrides' && @.in == 'query')].schema + update: + title: CallListAssistantOverridesFilter + properties: + variableValues: + type: object + additionalProperties: + type: string + description: >- + Matches calls whose assistant overrides set these template + variables to these values. + - target: $.paths['/v2/call'].get.parameters[?(@.name == 'cursor' && @.in == 'query')] + update: + description: >- + Opaque cursor for keyset pagination. Pass `metadata.nextCursor` from + the previous page to fetch the next one. Honored only for the default + `createdAt` sort; `duration` and `cost` sorts use `page`. + # GET /v2/assistant always sorts by creation time and ignores `sortBy`. + - target: $.paths['/v2/assistant'].get.parameters[?(@.name == 'sortBy' && @.in == 'query')] + remove: true From f6956142fa07f794812e4c0802473f33f58c6b84 Mon Sep 17 00:00:00 2001 From: Chris Garber Date: Thu, 5 Nov 2026 22:05:10 -0500 Subject: [PATCH 2/2] Drop overlay titles that do not affect generated type names Co-Authored-By: Claude Opus 5.5 --- fern/apis/api/openapi-parameter-descriptions-overlay.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/fern/apis/api/openapi-parameter-descriptions-overlay.yml b/fern/apis/api/openapi-parameter-descriptions-overlay.yml index 86998891b..6d2633b9a 100644 --- a/fern/apis/api/openapi-parameter-descriptions-overlay.yml +++ b/fern/apis/api/openapi-parameter-descriptions-overlay.yml @@ -181,7 +181,6 @@ actions: explode: true - target: $.paths['/v2/call'].get.parameters[?(@.name == 'customer' && @.in == 'query')].schema update: - title: CallListCustomerFilter properties: number: type: string @@ -201,7 +200,6 @@ actions: explode: true - target: $.paths['/v2/call'].get.parameters[?(@.name == 'assistantOverrides' && @.in == 'query')].schema update: - title: CallListAssistantOverridesFilter properties: variableValues: type: object