Skip to content
Merged
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.119.2",
"generatorName": "fernapi/fern-typescript-sdk",
"generatorVersion": "3.63.0",
"generatorConfig": {
Expand All @@ -11,7 +11,7 @@
"omitUndefined": true,
"enableInlineTypes": false
},
"originGitCommit": "e72840cf798dcb878d7b0136e90d6159afa7e261",
"originGitCommit": "ca6a646c295c707d5b6dff2fceab26c86c9137d5",
"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.

16 changes: 8 additions & 8 deletions pnpm-lock.yaml

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";
19 changes: 13 additions & 6 deletions src/api/resources/simulationPersonalities/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 SimulationPersonalitiesClient {
export type Options = BaseClientOptions;
Expand Down Expand Up @@ -241,6 +241,8 @@ export class SimulationPersonalitiesClient {
* @param {Vapi.PersonalityControllerRemoveRequest} request
* @param {SimulationPersonalitiesClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Vapi.ConflictError}
*
* @example
* await client.simulationPersonalities.personalityControllerRemove({
* id: "id"
Expand Down Expand Up @@ -285,11 +287,16 @@ export class SimulationPersonalitiesClient {
}

if (_response.error.reason === "status-code") {
throw new errors.VapiError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
switch (_response.error.statusCode) {
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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface UpdatePersonalityDto {
id: string;
/** This is the name of the personality. */
name?: string;
/** This is the full assistant configuration for this personality. */
/** Complete assistant replacement. Omitted credentials and redacted server secrets are preserved when their endpoint URL is unchanged. Send credentials: [] to clear credentials; omit a server container to remove it. */
assistant?: Vapi.CreateAssistantDto;
/**
* Optional folder path for organizing personalities.
Expand Down
19 changes: 13 additions & 6 deletions src/api/resources/simulationScenarios/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 SimulationScenariosClient {
export type Options = BaseClientOptions;
Expand Down Expand Up @@ -249,6 +249,8 @@ export class SimulationScenariosClient {
* @param {Vapi.ScenarioControllerRemoveRequest} request
* @param {SimulationScenariosClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Vapi.ConflictError}
*
* @example
* await client.simulationScenarios.scenarioControllerRemove({
* id: "id"
Expand Down Expand Up @@ -293,11 +295,16 @@ export class SimulationScenariosClient {
}

if (_response.error.reason === "status-code") {
throw new errors.VapiError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
switch (_response.error.statusCode) {
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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface UpdateScenarioDto {
evaluations?: Vapi.EvaluationPlanItem[];
/** Hooks to run on simulation lifecycle events */
hooks?: Vapi.UpdateScenarioDtoHooksItem[];
/** Overrides to inject into the simulated target assistant or squad */
/** Complete override replacement. Omitted credentials and redacted server secrets are preserved when their endpoint URL is unchanged. Send credentials: [] to clear credentials; omit a server container to remove it. */
targetOverrides?: Vapi.AssistantOverrides;
toolMocks?: Vapi.ScenarioToolMock[];
/**
Expand Down
Loading