diff --git a/README.md b/README.md new file mode 100644 index 0000000..ac3847e --- /dev/null +++ b/README.md @@ -0,0 +1,135 @@ +# Vapi TypeScript Library + +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ffern-demo%2Fvapi-typescript-sdk) +[![npm shield](https://img.shields.io/npm/v/vapi)](https://www.npmjs.com/package/vapi) + +The Vapi TypeScript library provides convenient access to the Vapi API from TypeScript. + +## Installation + +```sh +npm i -s vapi +``` + +## Usage + +Instantiate and use the client with the following: + +```typescript +import { VapiClient } from "vapi"; + +const client = new VapiClient({ token: "YOUR_TOKEN" }); +await client.calls.create(); +``` + +## Request And Response Types + +The SDK exports all request and response types as TypeScript interfaces. Simply import them with the +following namespace: + +```typescript +import { Vapi } from "vapi"; + +const request: Vapi.CallsListRequest = { + ... +}; +``` + +## Exception Handling + +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. + +```typescript +import { VapiError } from "vapi"; + +try { + await client.calls.create(...); +} catch (err) { + if (err instanceof VapiError) { + console.log(err.statusCode); + console.log(err.message); + console.log(err.body); + } +} +``` + +## Advanced + +### Retries + +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retriable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). + +A request is deemed retriable when any of the following HTTP status codes is returned: + +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) + +Use the `maxRetries` request option to configure this behavior. + +```typescript +const response = await client.calls.create(..., { + maxRetries: 0 // override maxRetries at the request level +}); +``` + +### Timeouts + +The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior. + +```typescript +const response = await client.calls.create(..., { + timeoutInSeconds: 30 // override timeout to 30s +}); +``` + +### Aborting Requests + +The SDK allows users to abort requests at any point by passing in an abort signal. + +```typescript +const controller = new AbortController(); +const response = await client.calls.create(..., { + abortSignal: controller.signal +}); +controller.abort(); // aborts the request +``` + +### Runtime Compatibility + +The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following +runtimes: + +- Node.js 18+ +- Vercel +- Cloudflare Workers +- Deno v1.25+ +- Bun 1.0+ +- React Native + +### Customizing Fetch Client + +The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an +unsupported environment, this provides a way for you to break glass and ensure the SDK works. + +```typescript +import { VapiClient } from "vapi"; + +const client = new VapiClient({ + ... + fetcher: // provide your implementation here +}); +``` + +## Contributing + +While we value open-source contributions to this SDK, this library is generated programmatically. +Additions made directly to this library would have to be moved over to our generation code, +otherwise they would be overwritten upon the next generated release. Feel free to open a PR as +a proof of concept, but know that we will not be able to merge it as-is. We suggest opening +an issue first to discuss with us! + +On the other hand, contributions to the README are always very welcome! diff --git a/package.json b/package.json index 5393aa0..d9e2571 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vapi", - "version": "0.0.0-alpha3", + "version": "0.0.0-alpha4", "private": false, "repository": "https://github.com/fern-demo/vapi-typescript-sdk", "main": "./index.js", diff --git a/reference.md b/reference.md index cecb7e7..fe82756 100644 --- a/reference.md +++ b/reference.md @@ -2,18 +2,1867 @@ ## Calls +
client.calls.list({ ...params }) -> Vapi.Call[] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.calls.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.CallsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Calls.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.calls.create({ ...params }) -> Vapi.Call +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.calls.create(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.CreateCallDto` + +
+
+ +
+
+ +**requestOptions:** `Calls.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.calls.get(id) -> Vapi.Call +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.calls.get("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Calls.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.calls.delete(id) -> Vapi.Call +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.calls.delete("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Calls.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.calls.update(id, { ...params }) -> Vapi.Call +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.calls.update("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Vapi.UpdateCallDto` + +
+
+ +
+
+ +**requestOptions:** `Calls.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Assistants -## PhoneNumbers +
client.assistants.list({ ...params }) -> Vapi.Assistant[] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.assistants.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.AssistantsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Assistants.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.assistants.create({ ...params }) -> Vapi.Assistant +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.assistants.create({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.CreateAssistantDto` + +
+
+ +
+
+ +**requestOptions:** `Assistants.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.assistants.get(id) -> Vapi.Assistant +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.assistants.get("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Assistants.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.assistants.delete(id) -> Vapi.Assistant +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.assistants.delete("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Assistants.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.assistants.update(id, { ...params }) -> Vapi.Assistant +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.assistants.update("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Vapi.UpdateAssistantDto` + +
+
+ +
+
+ +**requestOptions:** `Assistants.RequestOptions` + +
+
+
+
+ +
+
+
+ +## PhoneNumbers + +
client.phoneNumbers.list({ ...params }) -> Vapi.PhoneNumbersListResponseItem[] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.phoneNumbers.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.PhoneNumbersListRequest` + +
+
+ +
+
+ +**requestOptions:** `PhoneNumbers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.phoneNumbers.create({ ...params }) -> Vapi.PhoneNumbersCreateResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.phoneNumbers.create({ + provider: "byo-phone-number", + credentialId: "credentialId", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.PhoneNumbersCreateRequest` + +
+
+ +
+
+ +**requestOptions:** `PhoneNumbers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.phoneNumbers.get(id) -> Vapi.PhoneNumbersGetResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.phoneNumbers.get("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `PhoneNumbers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.phoneNumbers.delete(id) -> Vapi.PhoneNumbersDeleteResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.phoneNumbers.delete("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `PhoneNumbers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.phoneNumbers.update(id, { ...params }) -> Vapi.PhoneNumbersUpdateResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.phoneNumbers.update("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Vapi.UpdatePhoneNumberDto` + +
+
+ +
+
+ +**requestOptions:** `PhoneNumbers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Squads + +
client.squads.list({ ...params }) -> Vapi.Squad[] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.squads.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.SquadsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Squads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.squads.create({ ...params }) -> Vapi.Squad +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.squads.create({ + members: [{}], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.CreateSquadDto` + +
+
+ +
+
+ +**requestOptions:** `Squads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.squads.get(id) -> Vapi.Squad +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.squads.get("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Squads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.squads.delete(id) -> Vapi.Squad +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.squads.delete("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Squads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.squads.update(id, { ...params }) -> Vapi.Squad +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.squads.update("id", { + members: [{}], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Vapi.UpdateSquadDto` + +
+
+ +
+
+ +**requestOptions:** `Squads.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Blocks + +
client.blocks.list({ ...params }) -> Vapi.BlocksListResponseItem[] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.blocks.list(); +``` + +
+
+
+
-## Squads +#### ⚙️ Parameters -## Blocks +
+
+ +
+
+ +**request:** `Vapi.BlocksListRequest` + +
+
+ +
+
+ +**requestOptions:** `Blocks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.blocks.create({ ...params }) -> Vapi.BlocksCreateResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.blocks.create({ + type: "conversation", + instruction: "instruction", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.BlocksCreateRequest` + +
+
+ +
+
+ +**requestOptions:** `Blocks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.blocks.get(id) -> Vapi.BlocksGetResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.blocks.get("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Blocks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.blocks.delete(id) -> Vapi.BlocksDeleteResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.blocks.delete("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Blocks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.blocks.update(id, { ...params }) -> Vapi.BlocksUpdateResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.blocks.update("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Vapi.UpdateBlockDto` + +
+
+ +
+
+ +**requestOptions:** `Blocks.RequestOptions` + +
+
+
+
+ +
+
+
## Tools +
client.tools.list({ ...params }) -> Vapi.ToolsListResponseItem[] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tools.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.ToolsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.tools.create({ ...params }) -> Vapi.ToolsCreateResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tools.create({ + type: "dtmf", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.ToolsCreateRequest` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.tools.get(id) -> Vapi.ToolsGetResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tools.get("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.tools.delete(id) -> Vapi.ToolsDeleteResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tools.delete("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.tools.update(id, { ...params }) -> Vapi.ToolsUpdateResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tools.update("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Vapi.UpdateToolDto` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Files +
client.files.list() -> Vapi.File_[] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.files.list(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.files.create(file) -> Vapi.File_ +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.files.create(fs.createReadStream("/path/to/your/file")); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file:** `File | fs.ReadStream | Blob` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.files.get(id) -> Vapi.File_ +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.files.get("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.files.delete(id) -> Vapi.File_ +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.files.delete("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.files.update(id, { ...params }) -> Vapi.File_ +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.files.update("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Vapi.UpdateFileDto` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Analytics +
client.analytics.get({ ...params }) -> Vapi.AnalyticsQueryResult[] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.analytics.get({ + queries: [ + { + table: "call", + name: "name", + operations: [ + { + operation: "sum", + column: "id", + }, + ], + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.AnalyticsQueryDto` + +
+
+ +
+
+ +**requestOptions:** `Analytics.RequestOptions` + +
+
+
+
+ +
+
+
+ ## Logs + +
client.logs.get({ ...params }) -> core.Page +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.logs.get(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Vapi.LogsGetRequest` + +
+
+ +
+
+ +**requestOptions:** `Logs.RequestOptions` + +
+
+
+
+ +
+
+
diff --git a/src/api/resources/analytics/client/Client.ts b/src/api/resources/analytics/client/Client.ts index a1aa618..9524107 100644 --- a/src/api/resources/analytics/client/Client.ts +++ b/src/api/resources/analytics/client/Client.ts @@ -31,6 +31,18 @@ export class Analytics { /** * @param {Vapi.AnalyticsQueryDto} request * @param {Analytics.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.analytics.get({ + * queries: [{ + * table: "call", + * name: "name", + * operations: [{ + * operation: "sum", + * column: "id" + * }] + * }] + * }) */ public async get( request: Vapi.AnalyticsQueryDto, @@ -46,8 +58,8 @@ export class Analytics { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/analytics/client/requests/AnalyticsQueryDto.ts b/src/api/resources/analytics/client/requests/AnalyticsQueryDto.ts index 329b4f9..8a3ab38 100644 --- a/src/api/resources/analytics/client/requests/AnalyticsQueryDto.ts +++ b/src/api/resources/analytics/client/requests/AnalyticsQueryDto.ts @@ -4,6 +4,19 @@ import * as Vapi from "../../../../index"; +/** + * @example + * { + * queries: [{ + * table: "call", + * name: "name", + * operations: [{ + * operation: "sum", + * column: "id" + * }] + * }] + * } + */ export interface AnalyticsQueryDto { /** This is the list of metric queries you want to perform. */ queries: Vapi.AnalyticsQuery[]; diff --git a/src/api/resources/assistants/client/Client.ts b/src/api/resources/assistants/client/Client.ts index 76aee4a..0c25f87 100644 --- a/src/api/resources/assistants/client/Client.ts +++ b/src/api/resources/assistants/client/Client.ts @@ -31,6 +31,9 @@ export class Assistants { /** * @param {Vapi.AssistantsListRequest} request * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.assistants.list() */ public async list( request: Vapi.AssistantsListRequest = {}, @@ -94,8 +97,8 @@ export class Assistants { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -135,6 +138,9 @@ export class Assistants { /** * @param {Vapi.CreateAssistantDto} request * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.assistants.create({}) */ public async create( request: Vapi.CreateAssistantDto, @@ -150,8 +156,8 @@ export class Assistants { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -191,6 +197,9 @@ export class Assistants { /** * @param {string} id * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.assistants.get("id") */ public async get(id: string, requestOptions?: Assistants.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -203,8 +212,8 @@ export class Assistants { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -243,6 +252,9 @@ export class Assistants { /** * @param {string} id * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.assistants.delete("id") */ public async delete(id: string, requestOptions?: Assistants.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -255,8 +267,8 @@ export class Assistants { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -296,6 +308,9 @@ export class Assistants { * @param {string} id * @param {Vapi.UpdateAssistantDto} request * @param {Assistants.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.assistants.update("id") */ public async update( id: string, @@ -312,8 +327,8 @@ export class Assistants { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/assistants/client/requests/AssistantsListRequest.ts b/src/api/resources/assistants/client/requests/AssistantsListRequest.ts index d39ac55..214c917 100644 --- a/src/api/resources/assistants/client/requests/AssistantsListRequest.ts +++ b/src/api/resources/assistants/client/requests/AssistantsListRequest.ts @@ -2,6 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface AssistantsListRequest { /** * This is the maximum number of items to return. Defaults to 100. diff --git a/src/api/resources/assistants/client/requests/UpdateAssistantDto.ts b/src/api/resources/assistants/client/requests/UpdateAssistantDto.ts index 01b0ca3..ae822c4 100644 --- a/src/api/resources/assistants/client/requests/UpdateAssistantDto.ts +++ b/src/api/resources/assistants/client/requests/UpdateAssistantDto.ts @@ -4,6 +4,10 @@ import * as Vapi from "../../../../index"; +/** + * @example + * {} + */ export interface UpdateAssistantDto { /** These are the options for the assistant's transcriber. */ transcriber?: Vapi.UpdateAssistantDtoTranscriber; diff --git a/src/api/resources/blocks/client/Client.ts b/src/api/resources/blocks/client/Client.ts index 6c72a12..cc17c5c 100644 --- a/src/api/resources/blocks/client/Client.ts +++ b/src/api/resources/blocks/client/Client.ts @@ -31,6 +31,9 @@ export class Blocks { /** * @param {Vapi.BlocksListRequest} request * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.blocks.list() */ public async list( request: Vapi.BlocksListRequest = {}, @@ -94,8 +97,8 @@ export class Blocks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -135,6 +138,12 @@ export class Blocks { /** * @param {Vapi.BlocksCreateRequest} request * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.blocks.create({ + * type: "conversation", + * instruction: "instruction" + * }) */ public async create( request: Vapi.BlocksCreateRequest, @@ -150,8 +159,8 @@ export class Blocks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -191,6 +200,9 @@ export class Blocks { /** * @param {string} id * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.blocks.get("id") */ public async get(id: string, requestOptions?: Blocks.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -203,8 +215,8 @@ export class Blocks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -243,6 +255,9 @@ export class Blocks { /** * @param {string} id * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.blocks.delete("id") */ public async delete(id: string, requestOptions?: Blocks.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -255,8 +270,8 @@ export class Blocks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -296,6 +311,9 @@ export class Blocks { * @param {string} id * @param {Vapi.UpdateBlockDto} request * @param {Blocks.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.blocks.update("id") */ public async update( id: string, @@ -312,8 +330,8 @@ export class Blocks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/blocks/client/requests/BlocksListRequest.ts b/src/api/resources/blocks/client/requests/BlocksListRequest.ts index b31afc8..800ec07 100644 --- a/src/api/resources/blocks/client/requests/BlocksListRequest.ts +++ b/src/api/resources/blocks/client/requests/BlocksListRequest.ts @@ -2,6 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface BlocksListRequest { /** * This is the maximum number of items to return. Defaults to 100. diff --git a/src/api/resources/blocks/client/requests/UpdateBlockDto.ts b/src/api/resources/blocks/client/requests/UpdateBlockDto.ts index 36e5a5b..6c844b5 100644 --- a/src/api/resources/blocks/client/requests/UpdateBlockDto.ts +++ b/src/api/resources/blocks/client/requests/UpdateBlockDto.ts @@ -4,6 +4,10 @@ import * as Vapi from "../../../../index"; +/** + * @example + * {} + */ export interface UpdateBlockDto { /** These are the pre-configured messages that will be spoken to the user while the block is running. */ messages?: Vapi.UpdateBlockDtoMessagesItem[]; diff --git a/src/api/resources/calls/client/Client.ts b/src/api/resources/calls/client/Client.ts index bb99c7e..aa95600 100644 --- a/src/api/resources/calls/client/Client.ts +++ b/src/api/resources/calls/client/Client.ts @@ -31,6 +31,9 @@ export class Calls { /** * @param {Vapi.CallsListRequest} request * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.calls.list() */ public async list( request: Vapi.CallsListRequest = {}, @@ -99,8 +102,8 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -140,6 +143,9 @@ export class Calls { /** * @param {Vapi.CreateCallDto} request * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.calls.create() */ public async create(request: Vapi.CreateCallDto = {}, requestOptions?: Calls.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -152,8 +158,8 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -193,6 +199,9 @@ export class Calls { /** * @param {string} id * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.calls.get("id") */ public async get(id: string, requestOptions?: Calls.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -205,8 +214,8 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -245,6 +254,9 @@ export class Calls { /** * @param {string} id * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.calls.delete("id") */ public async delete(id: string, requestOptions?: Calls.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -257,8 +269,8 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -298,6 +310,9 @@ export class Calls { * @param {string} id * @param {Vapi.UpdateCallDto} request * @param {Calls.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.calls.update("id") */ public async update( id: string, @@ -314,8 +329,8 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/calls/client/requests/CallsListRequest.ts b/src/api/resources/calls/client/requests/CallsListRequest.ts index 0174936..f89c332 100644 --- a/src/api/resources/calls/client/requests/CallsListRequest.ts +++ b/src/api/resources/calls/client/requests/CallsListRequest.ts @@ -2,6 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface CallsListRequest { /** * This will return calls with the specified assistantId. diff --git a/src/api/resources/calls/client/requests/CreateCallDto.ts b/src/api/resources/calls/client/requests/CreateCallDto.ts index b8d0021..d35b541 100644 --- a/src/api/resources/calls/client/requests/CreateCallDto.ts +++ b/src/api/resources/calls/client/requests/CreateCallDto.ts @@ -4,6 +4,10 @@ import * as Vapi from "../../../../index"; +/** + * @example + * {} + */ export interface CreateCallDto { /** This is the name of the call. This is just for your own reference. */ name?: string; diff --git a/src/api/resources/calls/client/requests/UpdateCallDto.ts b/src/api/resources/calls/client/requests/UpdateCallDto.ts index f70f2c4..b30a3b3 100644 --- a/src/api/resources/calls/client/requests/UpdateCallDto.ts +++ b/src/api/resources/calls/client/requests/UpdateCallDto.ts @@ -2,6 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface UpdateCallDto { /** This is the name of the call. This is just for your own reference. */ name?: string; diff --git a/src/api/resources/files/client/Client.ts b/src/api/resources/files/client/Client.ts index 4f3970a..601ac43 100644 --- a/src/api/resources/files/client/Client.ts +++ b/src/api/resources/files/client/Client.ts @@ -32,6 +32,9 @@ export class Files { /** * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.files.list() */ public async list(requestOptions?: Files.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -44,8 +47,8 @@ export class Files { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -86,6 +89,9 @@ export class Files { * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vapi.BadRequestError} + * + * @example + * await client.files.create(fs.createReadStream("/path/to/your/file")) */ public async create(file: File | fs.ReadStream | Blob, requestOptions?: Files.RequestOptions): Promise { const _request = await core.newFormData(); @@ -101,8 +107,8 @@ export class Files { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ..._maybeEncodedRequest.headers, @@ -148,6 +154,9 @@ export class Files { /** * @param {string} id * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.files.get("id") */ public async get(id: string, requestOptions?: Files.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -160,8 +169,8 @@ export class Files { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -200,6 +209,9 @@ export class Files { /** * @param {string} id * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.files.delete("id") */ public async delete(id: string, requestOptions?: Files.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -212,8 +224,8 @@ export class Files { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -253,6 +265,9 @@ export class Files { * @param {string} id * @param {Vapi.UpdateFileDto} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.files.update("id") */ public async update( id: string, @@ -269,8 +284,8 @@ export class Files { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/files/client/requests/CreateFileDto.ts b/src/api/resources/files/client/requests/CreateFileDto.ts index cf6d3c7..b4d6cfa 100644 --- a/src/api/resources/files/client/requests/CreateFileDto.ts +++ b/src/api/resources/files/client/requests/CreateFileDto.ts @@ -2,4 +2,8 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface CreateFileDto {} diff --git a/src/api/resources/files/client/requests/UpdateFileDto.ts b/src/api/resources/files/client/requests/UpdateFileDto.ts index 69af7a3..8979b89 100644 --- a/src/api/resources/files/client/requests/UpdateFileDto.ts +++ b/src/api/resources/files/client/requests/UpdateFileDto.ts @@ -2,6 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface UpdateFileDto { /** This is the name of the file. This is just for your own reference. */ name?: string; diff --git a/src/api/resources/logs/client/Client.ts b/src/api/resources/logs/client/Client.ts index e12c991..eb5cf55 100644 --- a/src/api/resources/logs/client/Client.ts +++ b/src/api/resources/logs/client/Client.ts @@ -31,6 +31,9 @@ export class Logs { /** * @param {Vapi.LogsGetRequest} request * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.logs.get() */ public async get( request: Vapi.LogsGetRequest = {}, @@ -122,8 +125,8 @@ export class Logs { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/logs/client/requests/LogsGetRequest.ts b/src/api/resources/logs/client/requests/LogsGetRequest.ts index 7e9be49..dd81d28 100644 --- a/src/api/resources/logs/client/requests/LogsGetRequest.ts +++ b/src/api/resources/logs/client/requests/LogsGetRequest.ts @@ -4,6 +4,10 @@ import * as Vapi from "../../../../index"; +/** + * @example + * {} + */ export interface LogsGetRequest { /** * This is the unique identifier for the org that this log belongs to. diff --git a/src/api/resources/phoneNumbers/client/Client.ts b/src/api/resources/phoneNumbers/client/Client.ts index fc4fb04..46d3c5e 100644 --- a/src/api/resources/phoneNumbers/client/Client.ts +++ b/src/api/resources/phoneNumbers/client/Client.ts @@ -31,6 +31,9 @@ export class PhoneNumbers { /** * @param {Vapi.PhoneNumbersListRequest} request * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.phoneNumbers.list() */ public async list( request: Vapi.PhoneNumbersListRequest = {}, @@ -94,8 +97,8 @@ export class PhoneNumbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -135,6 +138,12 @@ export class PhoneNumbers { /** * @param {Vapi.PhoneNumbersCreateRequest} request * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.phoneNumbers.create({ + * provider: "byo-phone-number", + * credentialId: "credentialId" + * }) */ public async create( request: Vapi.PhoneNumbersCreateRequest, @@ -150,8 +159,8 @@ export class PhoneNumbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -191,6 +200,9 @@ export class PhoneNumbers { /** * @param {string} id * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.phoneNumbers.get("id") */ public async get(id: string, requestOptions?: PhoneNumbers.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -203,8 +215,8 @@ export class PhoneNumbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -243,6 +255,9 @@ export class PhoneNumbers { /** * @param {string} id * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.phoneNumbers.delete("id") */ public async delete( id: string, @@ -258,8 +273,8 @@ export class PhoneNumbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -299,6 +314,9 @@ export class PhoneNumbers { * @param {string} id * @param {Vapi.UpdatePhoneNumberDto} request * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.phoneNumbers.update("id") */ public async update( id: string, @@ -315,8 +333,8 @@ export class PhoneNumbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/phoneNumbers/client/requests/PhoneNumbersListRequest.ts b/src/api/resources/phoneNumbers/client/requests/PhoneNumbersListRequest.ts index 1a42680..3113544 100644 --- a/src/api/resources/phoneNumbers/client/requests/PhoneNumbersListRequest.ts +++ b/src/api/resources/phoneNumbers/client/requests/PhoneNumbersListRequest.ts @@ -2,6 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface PhoneNumbersListRequest { /** * This is the maximum number of items to return. Defaults to 100. diff --git a/src/api/resources/phoneNumbers/client/requests/UpdatePhoneNumberDto.ts b/src/api/resources/phoneNumbers/client/requests/UpdatePhoneNumberDto.ts index f5efb05..c5ba126 100644 --- a/src/api/resources/phoneNumbers/client/requests/UpdatePhoneNumberDto.ts +++ b/src/api/resources/phoneNumbers/client/requests/UpdatePhoneNumberDto.ts @@ -4,6 +4,10 @@ import * as Vapi from "../../../../index"; +/** + * @example + * {} + */ export interface UpdatePhoneNumberDto { /** * This is the fallback destination an inbound call will be transferred to if: diff --git a/src/api/resources/squads/client/Client.ts b/src/api/resources/squads/client/Client.ts index 7027109..192091f 100644 --- a/src/api/resources/squads/client/Client.ts +++ b/src/api/resources/squads/client/Client.ts @@ -31,6 +31,9 @@ export class Squads { /** * @param {Vapi.SquadsListRequest} request * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.squads.list() */ public async list( request: Vapi.SquadsListRequest = {}, @@ -94,8 +97,8 @@ export class Squads { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -135,6 +138,11 @@ export class Squads { /** * @param {Vapi.CreateSquadDto} request * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.squads.create({ + * members: [{}] + * }) */ public async create(request: Vapi.CreateSquadDto, requestOptions?: Squads.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -147,8 +155,8 @@ export class Squads { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -188,6 +196,9 @@ export class Squads { /** * @param {string} id * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.squads.get("id") */ public async get(id: string, requestOptions?: Squads.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -200,8 +211,8 @@ export class Squads { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -240,6 +251,9 @@ export class Squads { /** * @param {string} id * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.squads.delete("id") */ public async delete(id: string, requestOptions?: Squads.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -252,8 +266,8 @@ export class Squads { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -293,6 +307,11 @@ export class Squads { * @param {string} id * @param {Vapi.UpdateSquadDto} request * @param {Squads.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.squads.update("id", { + * members: [{}] + * }) */ public async update( id: string, @@ -309,8 +328,8 @@ export class Squads { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/squads/client/requests/SquadsListRequest.ts b/src/api/resources/squads/client/requests/SquadsListRequest.ts index efc751d..224d1a3 100644 --- a/src/api/resources/squads/client/requests/SquadsListRequest.ts +++ b/src/api/resources/squads/client/requests/SquadsListRequest.ts @@ -2,6 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface SquadsListRequest { /** * This is the maximum number of items to return. Defaults to 100. diff --git a/src/api/resources/squads/client/requests/UpdateSquadDto.ts b/src/api/resources/squads/client/requests/UpdateSquadDto.ts index c04dc56..7bec7f6 100644 --- a/src/api/resources/squads/client/requests/UpdateSquadDto.ts +++ b/src/api/resources/squads/client/requests/UpdateSquadDto.ts @@ -4,6 +4,12 @@ import * as Vapi from "../../../../index"; +/** + * @example + * { + * members: [{}] + * } + */ export interface UpdateSquadDto { /** This is the name of the squad. */ name?: string; diff --git a/src/api/resources/tools/client/Client.ts b/src/api/resources/tools/client/Client.ts index 009fa09..46e91e4 100644 --- a/src/api/resources/tools/client/Client.ts +++ b/src/api/resources/tools/client/Client.ts @@ -31,6 +31,9 @@ export class Tools { /** * @param {Vapi.ToolsListRequest} request * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.tools.list() */ public async list( request: Vapi.ToolsListRequest = {}, @@ -94,8 +97,8 @@ export class Tools { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -135,6 +138,11 @@ export class Tools { /** * @param {Vapi.ToolsCreateRequest} request * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.tools.create({ + * type: "dtmf" + * }) */ public async create( request: Vapi.ToolsCreateRequest, @@ -150,8 +158,8 @@ export class Tools { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -191,6 +199,9 @@ export class Tools { /** * @param {string} id * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.tools.get("id") */ public async get(id: string, requestOptions?: Tools.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -203,8 +214,8 @@ export class Tools { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -243,6 +254,9 @@ export class Tools { /** * @param {string} id * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.tools.delete("id") */ public async delete(id: string, requestOptions?: Tools.RequestOptions): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -255,8 +269,8 @@ export class Tools { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -296,6 +310,9 @@ export class Tools { * @param {string} id * @param {Vapi.UpdateToolDto} request * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.tools.update("id") */ public async update( id: string, @@ -312,8 +329,8 @@ export class Tools { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vapi", - "X-Fern-SDK-Version": "0.0.0-alpha3", - "User-Agent": "vapi/0.0.0-alpha3", + "X-Fern-SDK-Version": "0.0.0-alpha4", + "User-Agent": "vapi/0.0.0-alpha4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/tools/client/requests/ToolsListRequest.ts b/src/api/resources/tools/client/requests/ToolsListRequest.ts index 30b44dd..6dd71f2 100644 --- a/src/api/resources/tools/client/requests/ToolsListRequest.ts +++ b/src/api/resources/tools/client/requests/ToolsListRequest.ts @@ -2,6 +2,10 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * @example + * {} + */ export interface ToolsListRequest { /** * This is the maximum number of items to return. Defaults to 100. diff --git a/src/api/resources/tools/client/requests/UpdateToolDto.ts b/src/api/resources/tools/client/requests/UpdateToolDto.ts index bdf1b3f..2adf7cc 100644 --- a/src/api/resources/tools/client/requests/UpdateToolDto.ts +++ b/src/api/resources/tools/client/requests/UpdateToolDto.ts @@ -4,6 +4,10 @@ import * as Vapi from "../../../../index"; +/** + * @example + * {} + */ export interface UpdateToolDto { /** * This determines if the tool is async. diff --git a/src/api/types/AzureVoice.ts b/src/api/types/AzureVoice.ts index c92bc57..c755419 100644 --- a/src/api/types/AzureVoice.ts +++ b/src/api/types/AzureVoice.ts @@ -14,7 +14,7 @@ export interface AzureVoice { /** This is the voice provider that will be used. */ provider: "azure"; /** This is the provider-specific ID that will be used. */ - voiceId: Vapi.AzureVoiceId; + voiceId: Vapi.AzureVoiceVoiceId; /** This is the speed multiplier that will be used. */ speed?: number; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/AzureVoiceIdEnum.ts b/src/api/types/AzureVoiceIdEnum.ts deleted file mode 100644 index 3291f6c..0000000 --- a/src/api/types/AzureVoiceIdEnum.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type AzureVoiceIdEnum = "andrew" | "brian" | "emma"; - -export const AzureVoiceIdEnum = { - Andrew: "andrew", - Brian: "brian", - Emma: "emma", -} as const; diff --git a/src/api/types/LmntVoiceId.ts b/src/api/types/AzureVoiceVoiceId.ts similarity index 59% rename from src/api/types/LmntVoiceId.ts rename to src/api/types/AzureVoiceVoiceId.ts index 2d615d6..08df31d 100644 --- a/src/api/types/LmntVoiceId.ts +++ b/src/api/types/AzureVoiceVoiceId.ts @@ -2,9 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Vapi from "../index"; - /** * This is the provider-specific ID that will be used. */ -export type LmntVoiceId = Vapi.LmntVoiceIdEnum | string; +export type AzureVoiceVoiceId = "andrew" | "brian" | "emma" | string; diff --git a/src/api/types/DeepgramVoice.ts b/src/api/types/DeepgramVoice.ts index f9fbec3..ba6b019 100644 --- a/src/api/types/DeepgramVoice.ts +++ b/src/api/types/DeepgramVoice.ts @@ -14,7 +14,7 @@ export interface DeepgramVoice { /** This is the voice provider that will be used. */ provider: "deepgram"; /** This is the provider-specific ID that will be used. */ - voiceId: Vapi.DeepgramVoiceId; + voiceId: Vapi.DeepgramVoiceVoiceId; /** This is the plan for chunking the model output before it is sent to the voice provider. */ chunkPlan?: Vapi.ChunkPlan; } diff --git a/src/api/types/DeepgramVoiceId.ts b/src/api/types/DeepgramVoiceId.ts deleted file mode 100644 index 02f0261..0000000 --- a/src/api/types/DeepgramVoiceId.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index"; - -/** - * This is the provider-specific ID that will be used. - */ -export type DeepgramVoiceId = Vapi.DeepgramVoiceIdEnum | string; diff --git a/src/api/types/DeepgramVoiceIdEnum.ts b/src/api/types/DeepgramVoiceIdEnum.ts deleted file mode 100644 index df9f506..0000000 --- a/src/api/types/DeepgramVoiceIdEnum.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type DeepgramVoiceIdEnum = - | "asteria" - | "luna" - | "stella" - | "athena" - | "hera" - | "orion" - | "arcas" - | "perseus" - | "angus" - | "orpheus" - | "helios" - | "zeus"; - -export const DeepgramVoiceIdEnum = { - Asteria: "asteria", - Luna: "luna", - Stella: "stella", - Athena: "athena", - Hera: "hera", - Orion: "orion", - Arcas: "arcas", - Perseus: "perseus", - Angus: "angus", - Orpheus: "orpheus", - Helios: "helios", - Zeus: "zeus", -} as const; diff --git a/src/api/types/DeepgramVoiceVoiceId.ts b/src/api/types/DeepgramVoiceVoiceId.ts new file mode 100644 index 0000000..163e22f --- /dev/null +++ b/src/api/types/DeepgramVoiceVoiceId.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * This is the provider-specific ID that will be used. + */ +export type DeepgramVoiceVoiceId = + | "asteria" + | "luna" + | "stella" + | "athena" + | "hera" + | "orion" + | "arcas" + | "perseus" + | "angus" + | "orpheus" + | "helios" + | "zeus" + | string; diff --git a/src/api/types/ElevenLabsVoice.ts b/src/api/types/ElevenLabsVoice.ts index 5ce592c..dd87f8e 100644 --- a/src/api/types/ElevenLabsVoice.ts +++ b/src/api/types/ElevenLabsVoice.ts @@ -14,7 +14,7 @@ export interface ElevenLabsVoice { /** This is the voice provider that will be used. */ provider: "11labs"; /** This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. */ - voiceId: Vapi.ElevenLabsVoiceId; + voiceId: Vapi.ElevenLabsVoiceVoiceId; /** Defines the stability for voice settings. */ stability?: number; /** Defines the similarity boost for voice settings. */ diff --git a/src/api/types/ElevenLabsVoiceId.ts b/src/api/types/ElevenLabsVoiceId.ts deleted file mode 100644 index 33408f6..0000000 --- a/src/api/types/ElevenLabsVoiceId.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index"; - -/** - * This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. - */ -export type ElevenLabsVoiceId = Vapi.ElevenLabsVoiceIdEnum | string; diff --git a/src/api/types/ElevenLabsVoiceIdEnum.ts b/src/api/types/ElevenLabsVoiceIdEnum.ts deleted file mode 100644 index 7d826d2..0000000 --- a/src/api/types/ElevenLabsVoiceIdEnum.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type ElevenLabsVoiceIdEnum = - | "burt" - | "marissa" - | "andrea" - | "sarah" - | "phillip" - | "steve" - | "joseph" - | "myra" - | "paula" - | "ryan" - | "drew" - | "paul" - | "mrb" - | "matilda" - | "mark"; - -export const ElevenLabsVoiceIdEnum = { - Burt: "burt", - Marissa: "marissa", - Andrea: "andrea", - Sarah: "sarah", - Phillip: "phillip", - Steve: "steve", - Joseph: "joseph", - Myra: "myra", - Paula: "paula", - Ryan: "ryan", - Drew: "drew", - Paul: "paul", - Mrb: "mrb", - Matilda: "matilda", - Mark: "mark", -} as const; diff --git a/src/api/types/ElevenLabsVoiceVoiceId.ts b/src/api/types/ElevenLabsVoiceVoiceId.ts new file mode 100644 index 0000000..1fef6e4 --- /dev/null +++ b/src/api/types/ElevenLabsVoiceVoiceId.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. + */ +export type ElevenLabsVoiceVoiceId = + | "burt" + | "marissa" + | "andrea" + | "sarah" + | "phillip" + | "steve" + | "joseph" + | "myra" + | "paula" + | "ryan" + | "drew" + | "paul" + | "mrb" + | "matilda" + | "mark" + | string; diff --git a/src/api/types/LmntVoice.ts b/src/api/types/LmntVoice.ts index 97780db..1d9b30f 100644 --- a/src/api/types/LmntVoice.ts +++ b/src/api/types/LmntVoice.ts @@ -14,7 +14,7 @@ export interface LmntVoice { /** This is the voice provider that will be used. */ provider: "lmnt"; /** This is the provider-specific ID that will be used. */ - voiceId: Vapi.LmntVoiceId; + voiceId: Vapi.LmntVoiceVoiceId; /** This is the speed multiplier that will be used. */ speed?: number; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/LmntVoiceIdEnum.ts b/src/api/types/LmntVoiceIdEnum.ts deleted file mode 100644 index aecf186..0000000 --- a/src/api/types/LmntVoiceIdEnum.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type LmntVoiceIdEnum = "lily" | "daniel"; - -export const LmntVoiceIdEnum = { - Lily: "lily", - Daniel: "daniel", -} as const; diff --git a/src/api/types/AzureVoiceId.ts b/src/api/types/LmntVoiceVoiceId.ts similarity index 59% rename from src/api/types/AzureVoiceId.ts rename to src/api/types/LmntVoiceVoiceId.ts index 3140972..9db807f 100644 --- a/src/api/types/AzureVoiceId.ts +++ b/src/api/types/LmntVoiceVoiceId.ts @@ -2,9 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Vapi from "../index"; - /** * This is the provider-specific ID that will be used. */ -export type AzureVoiceId = Vapi.AzureVoiceIdEnum | string; +export type LmntVoiceVoiceId = "lily" | "daniel" | string; diff --git a/src/api/types/NeetsVoice.ts b/src/api/types/NeetsVoice.ts index 525c37f..fcab704 100644 --- a/src/api/types/NeetsVoice.ts +++ b/src/api/types/NeetsVoice.ts @@ -14,7 +14,7 @@ export interface NeetsVoice { /** This is the voice provider that will be used. */ provider: "neets"; /** This is the provider-specific ID that will be used. */ - voiceId: Vapi.NeetsVoiceId; + voiceId: Vapi.NeetsVoiceVoiceId; /** This is the plan for chunking the model output before it is sent to the voice provider. */ chunkPlan?: Vapi.ChunkPlan; } diff --git a/src/api/types/NeetsVoiceIdEnum.ts b/src/api/types/NeetsVoiceIdEnum.ts deleted file mode 100644 index 1a54b16..0000000 --- a/src/api/types/NeetsVoiceIdEnum.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type NeetsVoiceIdEnum = "vits"; - -export const NeetsVoiceIdEnum = { - Vits: "vits", -} as const; diff --git a/src/api/types/NeetsVoiceId.ts b/src/api/types/NeetsVoiceVoiceId.ts similarity index 59% rename from src/api/types/NeetsVoiceId.ts rename to src/api/types/NeetsVoiceVoiceId.ts index 6be2c2c..5c9fa12 100644 --- a/src/api/types/NeetsVoiceId.ts +++ b/src/api/types/NeetsVoiceVoiceId.ts @@ -2,9 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Vapi from "../index"; - /** * This is the provider-specific ID that will be used. */ -export type NeetsVoiceId = Vapi.NeetsVoiceIdEnum | string; +export type NeetsVoiceVoiceId = "vits" | "vits" | string; diff --git a/src/api/types/OpenAiVoice.ts b/src/api/types/OpenAiVoice.ts index ad6ac06..2ec7a3f 100644 --- a/src/api/types/OpenAiVoice.ts +++ b/src/api/types/OpenAiVoice.ts @@ -14,7 +14,7 @@ export interface OpenAiVoice { /** This is the voice provider that will be used. */ provider: "openai"; /** This is the provider-specific ID that will be used. */ - voiceId: Vapi.OpenAiVoiceId; + voiceId: Vapi.OpenAiVoiceVoiceId; /** This is the speed multiplier that will be used. */ speed?: number; /** This is the plan for chunking the model output before it is sent to the voice provider. */ diff --git a/src/api/types/OpenAiVoiceId.ts b/src/api/types/OpenAiVoiceVoiceId.ts similarity index 67% rename from src/api/types/OpenAiVoiceId.ts rename to src/api/types/OpenAiVoiceVoiceId.ts index 8bb85a3..e99cc84 100644 --- a/src/api/types/OpenAiVoiceId.ts +++ b/src/api/types/OpenAiVoiceVoiceId.ts @@ -5,9 +5,9 @@ /** * This is the provider-specific ID that will be used. */ -export type OpenAiVoiceId = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; +export type OpenAiVoiceVoiceId = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; -export const OpenAiVoiceId = { +export const OpenAiVoiceVoiceId = { Alloy: "alloy", Echo: "echo", Fable: "fable", diff --git a/src/api/types/PlayHtVoiceVoiceId.ts b/src/api/types/PlayHtVoiceVoiceId.ts index 00ee4cd..bccf539 100644 --- a/src/api/types/PlayHtVoiceVoiceId.ts +++ b/src/api/types/PlayHtVoiceVoiceId.ts @@ -2,9 +2,18 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Vapi from "../index"; - /** * This is the provider-specific ID that will be used. */ -export type PlayHtVoiceVoiceId = Vapi.PlayHtVoiceVoiceId | string; +export type PlayHtVoiceVoiceId = + | "jennifer" + | "melissa" + | "will" + | "chris" + | "matt" + | "jack" + | "ruby" + | "davis" + | "donna" + | "michael" + | string; diff --git a/src/api/types/RimeAiVoice.ts b/src/api/types/RimeAiVoice.ts index 661fd91..44a55c8 100644 --- a/src/api/types/RimeAiVoice.ts +++ b/src/api/types/RimeAiVoice.ts @@ -14,7 +14,7 @@ export interface RimeAiVoice { /** This is the voice provider that will be used. */ provider: "rime-ai"; /** This is the provider-specific ID that will be used. */ - voiceId: Vapi.RimeAiVoiceId; + voiceId: Vapi.RimeAiVoiceVoiceId; /** This is the model that will be used. Defaults to 'v1' when not specified. */ model?: Vapi.RimeAiVoiceModel; /** This is the speed multiplier that will be used. */ diff --git a/src/api/types/RimeAiVoiceId.ts b/src/api/types/RimeAiVoiceId.ts deleted file mode 100644 index 30f821d..0000000 --- a/src/api/types/RimeAiVoiceId.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index"; - -/** - * This is the provider-specific ID that will be used. - */ -export type RimeAiVoiceId = Vapi.RimeAiVoiceIdEnum | string; diff --git a/src/api/types/RimeAiVoiceIdEnum.ts b/src/api/types/RimeAiVoiceIdEnum.ts deleted file mode 100644 index c1650ce..0000000 --- a/src/api/types/RimeAiVoiceIdEnum.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type RimeAiVoiceIdEnum = - | "marsh" - | "bayou" - | "creek" - | "brook" - | "flower" - | "spore" - | "glacier" - | "gulch" - | "alpine" - | "cove" - | "lagoon" - | "tundra" - | "steppe" - | "mesa" - | "grove" - | "rainforest" - | "moraine" - | "wildflower" - | "peak" - | "boulder" - | "abbie" - | "allison" - | "ally" - | "alona" - | "amber" - | "ana" - | "antoine" - | "armon" - | "brenda" - | "brittany" - | "carol" - | "colin" - | "courtney" - | "elena" - | "elliot" - | "eva" - | "geoff" - | "gerald" - | "hank" - | "helen" - | "hera" - | "jen" - | "joe" - | "joy" - | "juan" - | "kendra" - | "kendrick" - | "kenneth" - | "kevin" - | "kris" - | "linda" - | "madison" - | "marge" - | "marina" - | "marissa" - | "marta" - | "maya" - | "nicholas" - | "nyles" - | "phil" - | "reba" - | "rex" - | "rick" - | "ritu" - | "rob" - | "rodney" - | "rohan" - | "rosco" - | "samantha" - | "sandy" - | "selena" - | "seth" - | "sharon" - | "stan" - | "tamra" - | "tanya" - | "tibur" - | "tj" - | "tyler" - | "viv" - | "yadira"; - -export const RimeAiVoiceIdEnum = { - Marsh: "marsh", - Bayou: "bayou", - Creek: "creek", - Brook: "brook", - Flower: "flower", - Spore: "spore", - Glacier: "glacier", - Gulch: "gulch", - Alpine: "alpine", - Cove: "cove", - Lagoon: "lagoon", - Tundra: "tundra", - Steppe: "steppe", - Mesa: "mesa", - Grove: "grove", - Rainforest: "rainforest", - Moraine: "moraine", - Wildflower: "wildflower", - Peak: "peak", - Boulder: "boulder", - Abbie: "abbie", - Allison: "allison", - Ally: "ally", - Alona: "alona", - Amber: "amber", - Ana: "ana", - Antoine: "antoine", - Armon: "armon", - Brenda: "brenda", - Brittany: "brittany", - Carol: "carol", - Colin: "colin", - Courtney: "courtney", - Elena: "elena", - Elliot: "elliot", - Eva: "eva", - Geoff: "geoff", - Gerald: "gerald", - Hank: "hank", - Helen: "helen", - Hera: "hera", - Jen: "jen", - Joe: "joe", - Joy: "joy", - Juan: "juan", - Kendra: "kendra", - Kendrick: "kendrick", - Kenneth: "kenneth", - Kevin: "kevin", - Kris: "kris", - Linda: "linda", - Madison: "madison", - Marge: "marge", - Marina: "marina", - Marissa: "marissa", - Marta: "marta", - Maya: "maya", - Nicholas: "nicholas", - Nyles: "nyles", - Phil: "phil", - Reba: "reba", - Rex: "rex", - Rick: "rick", - Ritu: "ritu", - Rob: "rob", - Rodney: "rodney", - Rohan: "rohan", - Rosco: "rosco", - Samantha: "samantha", - Sandy: "sandy", - Selena: "selena", - Seth: "seth", - Sharon: "sharon", - Stan: "stan", - Tamra: "tamra", - Tanya: "tanya", - Tibur: "tibur", - Tj: "tj", - Tyler: "tyler", - Viv: "viv", - Yadira: "yadira", -} as const; diff --git a/src/api/types/RimeAiVoiceVoiceId.ts b/src/api/types/RimeAiVoiceVoiceId.ts new file mode 100644 index 0000000..a5185e9 --- /dev/null +++ b/src/api/types/RimeAiVoiceVoiceId.ts @@ -0,0 +1,90 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * This is the provider-specific ID that will be used. + */ +export type RimeAiVoiceVoiceId = + | "marsh" + | "bayou" + | "creek" + | "brook" + | "flower" + | "spore" + | "glacier" + | "gulch" + | "alpine" + | "cove" + | "lagoon" + | "tundra" + | "steppe" + | "mesa" + | "grove" + | "rainforest" + | "moraine" + | "wildflower" + | "peak" + | "boulder" + | "abbie" + | "allison" + | "ally" + | "alona" + | "amber" + | "ana" + | "antoine" + | "armon" + | "brenda" + | "brittany" + | "carol" + | "colin" + | "courtney" + | "elena" + | "elliot" + | "eva" + | "geoff" + | "gerald" + | "hank" + | "helen" + | "hera" + | "jen" + | "joe" + | "joy" + | "juan" + | "kendra" + | "kendrick" + | "kenneth" + | "kevin" + | "kris" + | "linda" + | "madison" + | "marge" + | "marina" + | "marissa" + | "marta" + | "maya" + | "nicholas" + | "nyles" + | "phil" + | "reba" + | "rex" + | "rick" + | "ritu" + | "rob" + | "rodney" + | "rohan" + | "rosco" + | "samantha" + | "sandy" + | "selena" + | "seth" + | "sharon" + | "stan" + | "tamra" + | "tanya" + | "tibur" + | "tj" + | "tyler" + | "viv" + | "yadira" + | string; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 04d187a..8376cf3 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -74,32 +74,26 @@ export * from "./RegexReplacement"; export * from "./FormatPlanReplacementsItem"; export * from "./FormatPlan"; export * from "./ChunkPlan"; -export * from "./AzureVoiceIdEnum"; -export * from "./AzureVoiceId"; +export * from "./AzureVoiceVoiceId"; export * from "./AzureVoice"; export * from "./CartesiaVoiceModel"; export * from "./CartesiaVoiceLanguage"; export * from "./CartesiaVoice"; -export * from "./DeepgramVoiceIdEnum"; -export * from "./DeepgramVoiceId"; +export * from "./DeepgramVoiceVoiceId"; export * from "./DeepgramVoice"; -export * from "./ElevenLabsVoiceIdEnum"; -export * from "./ElevenLabsVoiceId"; +export * from "./ElevenLabsVoiceVoiceId"; export * from "./ElevenLabsVoiceModel"; export * from "./ElevenLabsVoice"; -export * from "./LmntVoiceIdEnum"; -export * from "./LmntVoiceId"; +export * from "./LmntVoiceVoiceId"; export * from "./LmntVoice"; -export * from "./NeetsVoiceIdEnum"; -export * from "./NeetsVoiceId"; +export * from "./NeetsVoiceVoiceId"; export * from "./NeetsVoice"; -export * from "./OpenAiVoiceId"; +export * from "./OpenAiVoiceVoiceId"; export * from "./OpenAiVoice"; export * from "./PlayHtVoiceVoiceId"; export * from "./PlayHtVoiceEmotion"; export * from "./PlayHtVoice"; -export * from "./RimeAiVoiceIdEnum"; -export * from "./RimeAiVoiceId"; +export * from "./RimeAiVoiceVoiceId"; export * from "./RimeAiVoiceModel"; export * from "./RimeAiVoice"; export * from "./TransportConfigurationTwilioRecordingChannels"; diff --git a/src/version.ts b/src/version.ts index 9a4e59b..7dd60f2 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.0.0-alpha3"; +export const SDK_VERSION = "0.0.0-alpha4";