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..6d2633b9a 100644 --- a/fern/apis/api/openapi-parameter-descriptions-overlay.yml +++ b/fern/apis/api/openapi-parameter-descriptions-overlay.yml @@ -160,3 +160,60 @@ 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: + 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: + 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