From db01c46df479caa366da7be75adaec9475ed0e14 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 05:34:42 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#111) --- .stats.yml | 2 +- api.md | 4 ++-- src/index.ts | 4 ++-- src/resources/index.ts | 2 +- src/resources/voice.ts | 47 ++++-------------------------------------- 5 files changed, 10 insertions(+), 49 deletions(-) diff --git a/.stats.yml b/.stats.yml index d940ca1..1655694 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 21 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/toddlzt%2Ftoddlzt-58940d53b2ab1ca01dcc937cefe1ec6c44d1318613b222fa77c58d22827a2d9b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/toddlzt%2Ftoddlzt-61fa00768b393cdf67a173e1c1e62a6bae4dbf15007bdea88296ec2692c018f7.yml diff --git a/api.md b/api.md index 70f1b34..276313d 100644 --- a/api.md +++ b/api.md @@ -62,10 +62,10 @@ Methods: Types: -- VoiceRetrieveResponse +- LlmResponse - VoiceListResponse Methods: -- client.voice.retrieve(voiceId) -> VoiceRetrieveResponse +- client.voice.retrieve(voiceId) -> LlmResponse - client.voice.list() -> VoiceListResponse diff --git a/src/index.ts b/src/index.ts index 629ead2..fe47d88 100644 --- a/src/index.ts +++ b/src/index.ts @@ -133,7 +133,7 @@ export class Retell extends Core.APIClient { } protected override stringifyQuery(query: Record): string { - return qs.stringify(query, { arrayFormat: 'comma' }); + return qs.stringify(query, { arrayFormat: 'brackets' }); } static Retell = this; @@ -208,7 +208,7 @@ export namespace Retell { export import LlmUpdateParams = API.LlmUpdateParams; export import Voice = API.Voice; - export import VoiceRetrieveResponse = API.VoiceRetrieveResponse; + export import LlmResponse = API.LlmResponse; export import VoiceListResponse = API.VoiceListResponse; } diff --git a/src/resources/index.ts b/src/resources/index.ts index ceccad2..b67e1c2 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -11,6 +11,7 @@ export { Call, } from './call'; export { LlmResponse, LlmListResponse, LlmCreateParams, LlmUpdateParams, Llm } from './llm'; +export { LlmResponse, VoiceListResponse, Voice } from './voice'; export { PhoneNumberResponse, PhoneNumberListResponse, @@ -18,4 +19,3 @@ export { PhoneNumberUpdateParams, PhoneNumber, } from './phone-number'; -export { VoiceRetrieveResponse, VoiceListResponse, Voice } from './voice'; diff --git a/src/resources/voice.ts b/src/resources/voice.ts index a4a92f4..959d3d3 100644 --- a/src/resources/voice.ts +++ b/src/resources/voice.ts @@ -8,7 +8,7 @@ export class Voice extends APIResource { /** * Retrieve details of a specific voice */ - retrieve(voiceId: string, options?: Core.RequestOptions): Core.APIPromise { + retrieve(voiceId: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/get-voice/${voiceId}`, options); } @@ -20,7 +20,7 @@ export class Voice extends APIResource { } } -export interface VoiceRetrieveResponse { +export interface LlmResponse { /** * Gender of voice. */ @@ -57,48 +57,9 @@ export interface VoiceRetrieveResponse { preview_audio_url?: string; } -export type VoiceListResponse = Array; - -export namespace VoiceListResponse { - export interface VoiceListResponseItem { - /** - * Gender of voice. - */ - gender: 'male' | 'female'; - - /** - * Indicates the provider of voice. - */ - provider: 'elevenlabs' | 'openai' | 'deepgram'; - - /** - * Unique id for the voice. - */ - voice_id: string; - - /** - * Name of the voice. - */ - voice_name: string; - - /** - * Accent annotation of the voice. - */ - accent?: string; - - /** - * Age annotation of the voice. - */ - age?: string; - - /** - * URL to the preview audio of the voice. - */ - preview_audio_url?: string; - } -} +export type VoiceListResponse = Array; export namespace Voice { - export import VoiceRetrieveResponse = VoiceAPI.VoiceRetrieveResponse; + export import LlmResponse = VoiceAPI.LlmResponse; export import VoiceListResponse = VoiceAPI.VoiceListResponse; }