Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "5.106.1",
"cliVersion": "5.114.1",
"generatorName": "fernapi/fern-typescript-sdk",
"generatorVersion": "3.63.0",
"generatorConfig": {
Expand All @@ -11,7 +11,7 @@
"omitUndefined": true,
"enableInlineTypes": false
},
"originGitCommit": "e72840cf798dcb878d7b0136e90d6159afa7e261",
"originGitCommit": "88b766822b005b2c1356c4b9a9c285b1f2e8082b",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
Expand Down
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 102 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,57 @@ await client.assistants.create({});
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.assistants.<a href="/src/api/resources/assistants/client/Client.ts">assistantControllerValidateBackgroundSoundUrl</a>({ ...params }) -> Vapi.BackgroundSoundUrlValidationResult</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.assistants.assistantControllerValidateBackgroundSoundUrl({
url: "https://example.com/my-sound.mp3"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Vapi.ValidateBackgroundSoundUrlDto`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `AssistantsClient.RequestOptions`

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down Expand Up @@ -5688,6 +5739,57 @@ await client.simulationSuites.simulationSuiteControllerCreate({
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.simulationSuites.<a href="/src/api/resources/simulationSuites/client/Client.ts">simulationSuiteControllerDuplicate</a>({ ...params }) -> Vapi.SimulationSuite</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.simulationSuites.simulationSuiteControllerDuplicate({
id: "id"
});

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Vapi.SimulationSuiteControllerDuplicateRequest`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `SimulationSuitesClient.RequestOptions`

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down
70 changes: 70 additions & 0 deletions src/api/resources/assistants/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,76 @@ export class AssistantsClient {
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/assistant");
}

/**
* @param {Vapi.ValidateBackgroundSoundUrlDto} request
* @param {AssistantsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
* await client.assistants.assistantControllerValidateBackgroundSoundUrl({
* url: "https://example.com/my-sound.mp3"
* })
*/
public assistantControllerValidateBackgroundSoundUrl(
request: Vapi.ValidateBackgroundSoundUrlDto,
requestOptions?: AssistantsClient.RequestOptions,
): core.HttpResponsePromise<Vapi.BackgroundSoundUrlValidationResult> {
return core.HttpResponsePromise.fromPromise(
this.__assistantControllerValidateBackgroundSoundUrl(request, requestOptions),
);
}

private async __assistantControllerValidateBackgroundSoundUrl(
request: Vapi.ValidateBackgroundSoundUrlDto,
requestOptions?: AssistantsClient.RequestOptions,
): Promise<core.WithRawResponse<Vapi.BackgroundSoundUrlValidationResult>> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
this._options?.headers,
requestOptions?.headers,
);
const _response = await (this._options.fetcher ?? core.fetcher)({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.VapiEnvironment.Default,
"assistant/background-sound/validate",
),
method: "POST",
headers: _headers,
contentType: "application/json",
queryParameters: requestOptions?.queryParams,
requestType: "json",
body: request,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
logging: this._options.logging,
});
if (_response.ok) {
return {
data: _response.body as Vapi.BackgroundSoundUrlValidationResult,
rawResponse: _response.rawResponse,
};
}

if (_response.error.reason === "status-code") {
throw new errors.VapiError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}

return handleNonStatusCodeError(
_response.error,
_response.rawResponse,
"POST",
"/assistant/background-sound/validate",
);
}

/**
* Returns the assistant identified by its ID.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This file was auto-generated by Fern from our API Definition.

/**
* @example
* {
* url: "https://example.com/my-sound.mp3"
* }
*/
export interface ValidateBackgroundSoundUrlDto {
/** This is the background sound URL to validate. The server performs a ranged request and checks that the URL serves a live media file. */
url: string;
}
1 change: 1 addition & 0 deletions src/api/resources/assistants/client/requests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export type { DeleteAssistantsRequest } from "./DeleteAssistantsRequest.js";
export type { GetAssistantsRequest } from "./GetAssistantsRequest.js";
export type { ListAssistantsRequest } from "./ListAssistantsRequest.js";
export type { UpdateAssistantDto } from "./UpdateAssistantDto.js";
export type { ValidateBackgroundSoundUrlDto } from "./ValidateBackgroundSoundUrlDto.js";
75 changes: 74 additions & 1 deletion src/api/resources/simulationSuites/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as core from "../../../../core/index.js";
import * as environments from "../../../../environments.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import type * as Vapi from "../../../index.js";
import * as Vapi from "../../../index.js";

export declare namespace SimulationSuitesClient {
export type Options = BaseClientOptions;
Expand Down Expand Up @@ -172,6 +172,79 @@ export class SimulationSuitesClient {
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/eval/simulation/suite");
}

/**
* @param {Vapi.SimulationSuiteControllerDuplicateRequest} request
* @param {SimulationSuitesClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Vapi.NotFoundError}
* @throws {@link Vapi.ConflictError}
*
* @example
* await client.simulationSuites.simulationSuiteControllerDuplicate({
* id: "id"
* })
*/
public simulationSuiteControllerDuplicate(
request: Vapi.SimulationSuiteControllerDuplicateRequest,
requestOptions?: SimulationSuitesClient.RequestOptions,
): core.HttpResponsePromise<Vapi.SimulationSuite> {
return core.HttpResponsePromise.fromPromise(this.__simulationSuiteControllerDuplicate(request, requestOptions));
}

private async __simulationSuiteControllerDuplicate(
request: Vapi.SimulationSuiteControllerDuplicateRequest,
requestOptions?: SimulationSuitesClient.RequestOptions,
): Promise<core.WithRawResponse<Vapi.SimulationSuite>> {
const { id } = request;
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
this._options?.headers,
requestOptions?.headers,
);
const _response = await (this._options.fetcher ?? core.fetcher)({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.VapiEnvironment.Default,
`eval/simulation/suite/${core.url.encodePathParam(id)}/duplicate`,
),
method: "POST",
headers: _headers,
queryParameters: requestOptions?.queryParams,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
logging: this._options.logging,
});
if (_response.ok) {
return { data: _response.body as Vapi.SimulationSuite, rawResponse: _response.rawResponse };
}

if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 404:
throw new Vapi.NotFoundError(_response.error.body as unknown, _response.rawResponse);
case 409:
throw new Vapi.ConflictError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.VapiError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}

return handleNonStatusCodeError(
_response.error,
_response.rawResponse,
"POST",
"/eval/simulation/suite/{id}/duplicate",
);
}

/**
* Returns the specified simulation suite.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This file was auto-generated by Fern from our API Definition.

/**
* @example
* {
* id: "id"
* }
*/
export interface SimulationSuiteControllerDuplicateRequest {
/** The unique identifier for the resource. */
id: string;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export type { CreateSimulationSuiteDto } from "./CreateSimulationSuiteDto.js";
export type { SimulationSuiteControllerDuplicateRequest } from "./SimulationSuiteControllerDuplicateRequest.js";
export type { SimulationSuiteControllerFindAllRequest } from "./SimulationSuiteControllerFindAllRequest.js";
export type { SimulationSuiteControllerFindOneRequest } from "./SimulationSuiteControllerFindOneRequest.js";
export type { SimulationSuiteControllerRemoveRequest } from "./SimulationSuiteControllerRemoveRequest.js";
Expand Down
14 changes: 14 additions & 0 deletions src/api/types/BackgroundSoundUrlValidationResult.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file was auto-generated by Fern from our API Definition.

import type * as Vapi from "../index.js";

export interface BackgroundSoundUrlValidationResult {
/** Whether the URL currently serves a live media file. When false, calls configured with this URL silently play no background sound. */
valid: boolean;
/** Why validation failed. Only present when valid is false. */
reason?: Vapi.BackgroundSoundUrlValidationResultReason | undefined;
/** The HTTP status the URL returned, when a response was received. */
status?: number | undefined;
/** The content-type the URL returned, when a response was received. */
contentType?: string | undefined;
}
14 changes: 14 additions & 0 deletions src/api/types/BackgroundSoundUrlValidationResultReason.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file was auto-generated by Fern from our API Definition.

/** Why validation failed. Only present when valid is false. */
export const BackgroundSoundUrlValidationResultReason = {
InvalidUrl: "invalid-url",
BlockedAddress: "blocked-address",
Unreachable: "unreachable",
Timeout: "timeout",
TooManyRedirects: "too-many-redirects",
HttpError: "http-error",
NotAudio: "not-audio",
} as const;
export type BackgroundSoundUrlValidationResultReason =
(typeof BackgroundSoundUrlValidationResultReason)[keyof typeof BackgroundSoundUrlValidationResultReason];
4 changes: 4 additions & 0 deletions src/api/types/CallEndedReason.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ export const CallEndedReason = {
CallInProgressErrorProviderfaultBasetenLlmFailed: "call.in-progress.error-providerfault-baseten-llm-failed",
CallInProgressErrorVapifaultChatPipelineFailedToStart:
"call.in-progress.error-vapifault-chat-pipeline-failed-to-start",
CallInProgressErrorConfigfaultModelUnsupportedInSquad:
"call.in-progress.error-configfault-model-unsupported-in-squad",
CallInProgressErrorConfigfaultTransportUnsupportedForModel:
"call.in-progress.error-configfault-transport-unsupported-for-model",
PipelineErrorOpenai400BadRequestValidationFailed: "pipeline-error-openai-400-bad-request-validation-failed",
PipelineErrorOpenai401Unauthorized: "pipeline-error-openai-401-unauthorized",
PipelineErrorOpenai401IncorrectApiKey: "pipeline-error-openai-401-incorrect-api-key",
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/Campaign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface Campaign {
schedulePlan?: Vapi.SchedulePlan | undefined;
/** These are the customers that will be called in the campaign. Required if dialPlan is not provided. Maximum of 10000 customers per campaign. */
customers?: Vapi.CreateCustomerDto[] | undefined;
/** This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. */
/** This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10. Maximum of 500, and may not exceed your organization's concurrency limit. */
maxConcurrency?: number | undefined;
/** These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`. */
assistantOverrides?: Vapi.AssistantOverrides | undefined;
Expand Down
Loading