diff --git a/.fern/metadata.json b/.fern/metadata.json
index 34876902..a9cbfad4 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,5 +1,5 @@
{
- "cliVersion": "3.24.4",
+ "cliVersion": "3.47.5",
"generatorName": "fernapi/fern-typescript-sdk",
"generatorVersion": "3.36.0",
"generatorConfig": {
diff --git a/package.json b/package.json
index 3d602bea..e070922b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@elevenlabs/elevenlabs-js",
- "version": "v2.32.0",
+ "version": "v2.33.0",
"private": false,
"repository": "github:elevenlabs/elevenlabs-js",
"license": "MIT",
diff --git a/reference.md b/reference.md
index 3cdf2d3a..c731ffb6 100644
--- a/reference.md
+++ b/reference.md
@@ -6294,7 +6294,7 @@ await client.conversationalAi.knowledgeBase.getOrCreateRagIndexes({
## ConversationalAi Tools
-client.conversationalAi.tools.list() -> ElevenLabs.ToolsResponseModel
+client.conversationalAi.tools.list({ ...params }) -> ElevenLabs.ToolsResponseModel
-
@@ -6321,7 +6321,14 @@ Get all available tools in the workspace.
-
```typescript
-await client.conversationalAi.tools.list();
+await client.conversationalAi.tools.list({
+ search: "search",
+ pageSize: 1,
+ showOnlyOwnedDocuments: true,
+ sortDirection: "asc",
+ sortBy: "name",
+ cursor: "cursor"
+});
```
@@ -6337,6 +6344,14 @@ await client.conversationalAi.tools.list();
-
+**request:** `ElevenLabs.conversationalAi.ToolsListRequest`
+
+
+
+
+
+-
+
**requestOptions:** `ToolsClient.RequestOptions`
@@ -8496,7 +8511,769 @@ await client.conversationalAi.agents.llmUsage.calculate("agent_id");
-
-**requestOptions:** `LlmUsageClient.RequestOptions`
+**requestOptions:** `LlmUsageClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+## ConversationalAi Agents Branches
+client.conversationalAi.agents.branches.list(agent_id, { ...params }) -> ElevenLabs.ListResponseAgentBranchSummary
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns a list of branches an agent has
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.agents.branches.list("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ includeArchived: true,
+ limit: 1
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agent_id:** `string` — The id of an agent. This is returned on agent creation.
+
+
+
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.agents.BranchesListRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `BranchesClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.conversationalAi.agents.branches.create(agent_id, { ...params }) -> ElevenLabs.CreateAgentBranchResponseModel
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create a new branch from a given version of main branch
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.agents.branches.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ parentVersionId: "parent_version_id",
+ name: "name",
+ description: "description"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agent_id:** `string` — The id of an agent. This is returned on agent creation.
+
+
+
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.agents.BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost`
+
+
+
+
+
+-
+
+**requestOptions:** `BranchesClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.conversationalAi.agents.branches.get(agent_id, branch_id) -> ElevenLabs.AgentBranchResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get information about a single agent branch
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.agents.branches.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz", "agtbranch_0901k4aafjxxfxt93gd841r7tv5t");
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agent_id:** `string` — The id of an agent. This is returned on agent creation.
+
+
+
+
+
+-
+
+**branch_id:** `string` — Unique identifier for the branch.
+
+
+
+
+
+-
+
+**requestOptions:** `BranchesClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.conversationalAi.agents.branches.update(agent_id, branch_id, { ...params }) -> ElevenLabs.AgentBranchResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update agent branch properties such as archiving status and protection level
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.agents.branches.update("agent_3701k3ttaq12ewp8b7qv5rfyszkz", "agtbranch_0901k4aafjxxfxt93gd841r7tv5t");
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agent_id:** `string` — The id of an agent. This is returned on agent creation.
+
+
+
+
+
+-
+
+**branch_id:** `string` — Unique identifier for the branch.
+
+
+
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.agents.BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch`
+
+
+
+
+
+-
+
+**requestOptions:** `BranchesClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.conversationalAi.agents.branches.merge(agent_id, source_branch_id, { ...params }) -> unknown
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Merge a branch into a target branch
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.agents.branches.merge("agent_3701k3ttaq12ewp8b7qv5rfyszkz", "agtbrch_8901k4t9z5defmb8vh3e9361y7nj", {
+ targetBranchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agent_id:** `string` — The id of an agent. This is returned on agent creation.
+
+
+
+
+
+-
+
+**source_branch_id:** `string` — Unique identifier for the source branch to merge from.
+
+
+
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.agents.BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost`
+
+
+
+
+
+-
+
+**requestOptions:** `BranchesClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+## ConversationalAi Agents Deployments
+client.conversationalAi.agents.deployments.create(agent_id, { ...params }) -> ElevenLabs.AgentDeploymentResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create a new deployment for an agent
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.agents.deployments.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ deploymentRequest: {
+ requests: [{
+ branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ deploymentStrategy: {
+ type: "percentage",
+ trafficPercentage: 0.5
+ }
+ }]
+ }
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agent_id:** `string` — The id of an agent. This is returned on agent creation.
+
+
+
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.agents.BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost`
+
+
+
+
+
+-
+
+**requestOptions:** `DeploymentsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+## ConversationalAi Agents Drafts
+client.conversationalAi.agents.drafts.create(agent_id, { ...params }) -> unknown
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create a new draft for an agent
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.agents.drafts.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ conversationConfig: {
+ "key": "value"
+ },
+ platformSettings: {
+ "key": "value"
+ },
+ workflow: {
+ edges: {
+ "entry_to_tool_a": {
+ source: "entry_node",
+ target: "tool_node_a",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [{
+ type: "boolean_literal",
+ value: true
+ }]
+ }
+ }
+ },
+ "start_to_entry": {
+ source: "start_node",
+ target: "entry_node",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [{
+ type: "boolean_literal",
+ value: true
+ }]
+ }
+ }
+ },
+ "tool_a_to_failure": {
+ source: "tool_node_a",
+ target: "failure_node",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [{
+ type: "boolean_literal",
+ value: true
+ }]
+ }
+ }
+ },
+ "tool_a_to_tool_b": {
+ source: "tool_node_a",
+ target: "tool_node_b",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [{
+ type: "boolean_literal",
+ value: true
+ }]
+ }
+ }
+ },
+ "tool_b_to_agent_transfer": {
+ source: "tool_node_b",
+ target: "success_transfer",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [{
+ type: "boolean_literal",
+ value: true
+ }]
+ }
+ }
+ },
+ "tool_b_to_conversation": {
+ source: "tool_node_b",
+ target: "success_conversation",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [{
+ type: "boolean_literal",
+ value: true
+ }]
+ }
+ }
+ },
+ "tool_b_to_end": {
+ source: "tool_node_b",
+ target: "success_end",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [{
+ type: "boolean_literal",
+ value: true
+ }]
+ }
+ }
+ },
+ "tool_b_to_phone": {
+ source: "tool_node_b",
+ target: "success_phone",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [{
+ type: "boolean_literal",
+ value: true
+ }]
+ }
+ }
+ }
+ },
+ nodes: {
+ "entry_node": {
+ type: "end"
+ },
+ "failure_node": {
+ type: "end"
+ },
+ "start_node": {
+ type: "end"
+ },
+ "success_conversation": {
+ type: "end"
+ },
+ "success_end": {
+ type: "end"
+ },
+ "success_phone": {
+ type: "end"
+ },
+ "success_transfer": {
+ type: "end"
+ },
+ "tool_node_a": {
+ type: "end"
+ },
+ "tool_node_b": {
+ type: "end"
+ }
+ }
+ },
+ name: "name"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agent_id:** `string` — The id of an agent. This is returned on agent creation.
+
+
+
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.agents.BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost`
+
+
+
+
+
+-
+
+**requestOptions:** `DraftsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.conversationalAi.agents.drafts.delete(agent_id, { ...params }) -> unknown
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete a draft for an agent
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.agents.drafts.delete("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**agent_id:** `string` — The id of an agent. This is returned on agent creation.
+
+
+
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.agents.DraftsDeleteRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `DraftsClient.RequestOptions`
@@ -9097,6 +9874,71 @@ await client.conversationalAi.knowledgeBase.documents.createFromText({
+
+
+
+
+client.conversationalAi.knowledgeBase.documents.createFolder({ ...params }) -> ElevenLabs.AddKnowledgeBaseResponseModel
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Create a folder used for grouping documents together.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.knowledgeBase.documents.createFolder({
+ name: "name"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.knowledgeBase.BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost`
+
+
+
+
+
+-
+
+**requestOptions:** `DocumentsClient.RequestOptions`
+
+
+
+
+
+
+
@@ -9517,6 +10359,142 @@ await client.conversationalAi.knowledgeBase.documents.getSourceFileUrl("21m00Tcm
+
+
+
+
+client.conversationalAi.knowledgeBase.documents.move(document_id, { ...params }) -> void
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Moves the entity from one folder to another.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.knowledgeBase.documents.move("21m00Tcm4TlvDq8ikWAM");
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**document_id:** `string` — The id of a document from the knowledge base. This is returned on document addition.
+
+
+
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.knowledgeBase.BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost`
+
+
+
+
+
+-
+
+**requestOptions:** `DocumentsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.conversationalAi.knowledgeBase.documents.bulkMove({ ...params }) -> void
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Moves multiple entities from one folder to another.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.conversationalAi.knowledgeBase.documents.bulkMove({
+ documentIds: ["21m00Tcm4TlvDq8ikWAM", "31m00Tcm4TlvDq8ikWBM"]
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `ElevenLabs.conversationalAi.knowledgeBase.BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost`
+
+
+
+
+
+-
+
+**requestOptions:** `DocumentsClient.RequestOptions`
+
+
+
+
+
+
+
@@ -11788,7 +12766,7 @@ await client.music.compositionPlan.create({
-
-Add rules to the pronunciation dictionary
+Add rules to the pronunciation dictionary. If a rule with the same string_to_replace already exists, it will be replaced.
@@ -15925,80 +16903,6 @@ await client.workspace.resources.unshare("resource_id", {
-
-
-
-
-client.workspace.resources.copyToWorkspace(resource_id, { ...params }) -> unknown
-
--
-
-#### 📝 Description
-
-
--
-
-
--
-
-Copies a workspace resource to another workspace.
-
-
-
-
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```typescript
-await client.workspace.resources.copyToWorkspace("resource_id", {
- resourceType: "voice",
- targetUserId: "target_user_id"
-});
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**resource_id:** `string` — The ID of the target resource.
-
-
-
-
-
--
-
-**request:** `ElevenLabs.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost`
-
-
-
-
-
--
-
-**requestOptions:** `ResourcesClient.RequestOptions`
-
-
-
-
-
-
-
diff --git a/src/BaseClient.ts b/src/BaseClient.ts
index 46d4fa62..2d15c16d 100644
--- a/src/BaseClient.ts
+++ b/src/BaseClient.ts
@@ -47,8 +47,8 @@ export function normalizeClientOptions(options: T):
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
- "X-Fern-SDK-Version": "v2.32.0",
- "User-Agent": "@elevenlabs/elevenlabs-js/v2.32.0",
+ "X-Fern-SDK-Version": "v2.33.0",
+ "User-Agent": "@elevenlabs/elevenlabs-js/v2.33.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
"xi-api-key": options?.apiKey,
diff --git a/src/Client.ts b/src/Client.ts
index 661bb6b8..5a264ea9 100644
--- a/src/Client.ts
+++ b/src/Client.ts
@@ -165,6 +165,70 @@ export class ElevenLabsClient {
return (this._workspace ??= new WorkspaceClient(this._options));
}
+ /**
+ * @param {string} agent_id
+ * @param {string} branch_id
+ * @param {ElevenLabsClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @example
+ * await client.deleteV1ConvaiAgentsAgentIdBranchesBranchId("agent_id", "branch_id")
+ */
+ public deleteV1ConvaiAgentsAgentIdBranchesBranchId(
+ agent_id: string,
+ branch_id: string,
+ requestOptions?: ElevenLabsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(
+ this.__deleteV1ConvaiAgentsAgentIdBranchesBranchId(agent_id, branch_id, requestOptions),
+ );
+ }
+
+ private async __deleteV1ConvaiAgentsAgentIdBranchesBranchId(
+ agent_id: string,
+ branch_id: string,
+ requestOptions?: ElevenLabsClient.RequestOptions,
+ ): Promise> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/branches/${core.url.encodePathParam(branch_id)}`,
+ ),
+ method: "DELETE",
+ headers: _headers,
+ queryParameters: requestOptions?.queryParams,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return { data: undefined, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "DELETE",
+ "/v1/convai/agents/{agent_id}/branches/{branch_id}",
+ );
+ }
+
/**
* Add a generated voice to the voice library.
*
diff --git a/src/api/resources/conversationalAi/resources/agents/client/Client.ts b/src/api/resources/conversationalAi/resources/agents/client/Client.ts
index 96715b2c..13746257 100644
--- a/src/api/resources/conversationalAi/resources/agents/client/Client.ts
+++ b/src/api/resources/conversationalAi/resources/agents/client/Client.ts
@@ -9,6 +9,9 @@ import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStat
import * as errors from "../../../../../../errors/index";
import * as serializers from "../../../../../../serialization/index";
import * as ElevenLabs from "../../../../../index";
+import { BranchesClient } from "../resources/branches/client/Client";
+import { DeploymentsClient } from "../resources/deployments/client/Client";
+import { DraftsClient } from "../resources/drafts/client/Client";
import { KnowledgeBaseClient } from "../resources/knowledgeBase/client/Client";
import { LinkClient } from "../resources/link/client/Client";
import { LlmUsageClient } from "../resources/llmUsage/client/Client";
@@ -28,6 +31,9 @@ export class AgentsClient {
protected _link: LinkClient | undefined;
protected _knowledgeBase: KnowledgeBaseClient | undefined;
protected _llmUsage: LlmUsageClient | undefined;
+ protected _branches: BranchesClient | undefined;
+ protected _deployments: DeploymentsClient | undefined;
+ protected _drafts: DraftsClient | undefined;
constructor(options: AgentsClient.Options = {}) {
this._options = normalizeClientOptions(options);
@@ -53,6 +59,18 @@ export class AgentsClient {
return (this._llmUsage ??= new LlmUsageClient(this._options));
}
+ public get branches(): BranchesClient {
+ return (this._branches ??= new BranchesClient(this._options));
+ }
+
+ public get deployments(): DeploymentsClient {
+ return (this._deployments ??= new DeploymentsClient(this._options));
+ }
+
+ public get drafts(): DraftsClient {
+ return (this._drafts ??= new DraftsClient(this._options));
+ }
+
/**
* Create an agent from a config object
*
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/branches/client/Client.ts b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/Client.ts
new file mode 100644
index 00000000..cc48cec3
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/Client.ts
@@ -0,0 +1,498 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient";
+import { type NormalizedClientOptions, normalizeClientOptions } from "../../../../../../../../BaseClient";
+import * as core from "../../../../../../../../core";
+import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers";
+import * as environments from "../../../../../../../../environments";
+import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError";
+import * as errors from "../../../../../../../../errors/index";
+import * as serializers from "../../../../../../../../serialization/index";
+import * as ElevenLabs from "../../../../../../../index";
+
+export declare namespace BranchesClient {
+ export type Options = BaseClientOptions;
+
+ export interface RequestOptions extends BaseRequestOptions {}
+}
+
+export class BranchesClient {
+ protected readonly _options: NormalizedClientOptions;
+
+ constructor(options: BranchesClient.Options = {}) {
+ this._options = normalizeClientOptions(options);
+ }
+
+ /**
+ * Returns a list of branches an agent has
+ *
+ * @param {string} agent_id - The id of an agent. This is returned on agent creation.
+ * @param {ElevenLabs.conversationalAi.agents.BranchesListRequest} request
+ * @param {BranchesClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.agents.branches.list("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ * includeArchived: true,
+ * limit: 1
+ * })
+ */
+ public list(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.BranchesListRequest = {},
+ requestOptions?: BranchesClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__list(agent_id, request, requestOptions));
+ }
+
+ private async __list(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.BranchesListRequest = {},
+ requestOptions?: BranchesClient.RequestOptions,
+ ): Promise> {
+ const { includeArchived, limit } = request;
+ const _queryParams: Record = {};
+ if (includeArchived != null) {
+ _queryParams.include_archived = includeArchived.toString();
+ }
+
+ if (limit != null) {
+ _queryParams.limit = limit.toString();
+ }
+
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/branches`,
+ ),
+ method: "GET",
+ headers: _headers,
+ queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.ListResponseAgentBranchSummary.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/v1/convai/agents/{agent_id}/branches",
+ );
+ }
+
+ /**
+ * Create a new branch from a given version of main branch
+ *
+ * @param {string} agent_id - The id of an agent. This is returned on agent creation.
+ * @param {ElevenLabs.conversationalAi.agents.BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost} request
+ * @param {BranchesClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.agents.branches.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ * parentVersionId: "parent_version_id",
+ * name: "name",
+ * description: "description"
+ * })
+ */
+ public create(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost,
+ requestOptions?: BranchesClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__create(agent_id, request, requestOptions));
+ }
+
+ private async __create(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost,
+ requestOptions?: BranchesClient.RequestOptions,
+ ): Promise> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/branches`,
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: serializers.conversationalAi.agents.BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost.jsonOrThrow(
+ request,
+ { unrecognizedObjectKeys: "strip" },
+ ),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.CreateAgentBranchResponseModel.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/v1/convai/agents/{agent_id}/branches",
+ );
+ }
+
+ /**
+ * Get information about a single agent branch
+ *
+ * @param {string} agent_id - The id of an agent. This is returned on agent creation.
+ * @param {string} branch_id - Unique identifier for the branch.
+ * @param {BranchesClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.agents.branches.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz", "agtbranch_0901k4aafjxxfxt93gd841r7tv5t")
+ */
+ public get(
+ agent_id: string,
+ branch_id: string,
+ requestOptions?: BranchesClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__get(agent_id, branch_id, requestOptions));
+ }
+
+ private async __get(
+ agent_id: string,
+ branch_id: string,
+ requestOptions?: BranchesClient.RequestOptions,
+ ): Promise> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/branches/${core.url.encodePathParam(branch_id)}`,
+ ),
+ method: "GET",
+ headers: _headers,
+ queryParameters: requestOptions?.queryParams,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.AgentBranchResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/v1/convai/agents/{agent_id}/branches/{branch_id}",
+ );
+ }
+
+ /**
+ * Update agent branch properties such as archiving status and protection level
+ *
+ * @param {string} agent_id - The id of an agent. This is returned on agent creation.
+ * @param {string} branch_id - Unique identifier for the branch.
+ * @param {ElevenLabs.conversationalAi.agents.BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch} request
+ * @param {BranchesClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.agents.branches.update("agent_3701k3ttaq12ewp8b7qv5rfyszkz", "agtbranch_0901k4aafjxxfxt93gd841r7tv5t")
+ */
+ public update(
+ agent_id: string,
+ branch_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch = {},
+ requestOptions?: BranchesClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__update(agent_id, branch_id, request, requestOptions));
+ }
+
+ private async __update(
+ agent_id: string,
+ branch_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch = {},
+ requestOptions?: BranchesClient.RequestOptions,
+ ): Promise> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/branches/${core.url.encodePathParam(branch_id)}`,
+ ),
+ method: "PATCH",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: serializers.conversationalAi.agents.BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.jsonOrThrow(
+ request,
+ { unrecognizedObjectKeys: "strip" },
+ ),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.AgentBranchResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "PATCH",
+ "/v1/convai/agents/{agent_id}/branches/{branch_id}",
+ );
+ }
+
+ /**
+ * Merge a branch into a target branch
+ *
+ * @param {string} agent_id - The id of an agent. This is returned on agent creation.
+ * @param {string} source_branch_id - Unique identifier for the source branch to merge from.
+ * @param {ElevenLabs.conversationalAi.agents.BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost} request
+ * @param {BranchesClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.agents.branches.merge("agent_3701k3ttaq12ewp8b7qv5rfyszkz", "agtbrch_8901k4t9z5defmb8vh3e9361y7nj", {
+ * targetBranchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj"
+ * })
+ */
+ public merge(
+ agent_id: string,
+ source_branch_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost,
+ requestOptions?: BranchesClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__merge(agent_id, source_branch_id, request, requestOptions));
+ }
+
+ private async __merge(
+ agent_id: string,
+ source_branch_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost,
+ requestOptions?: BranchesClient.RequestOptions,
+ ): Promise> {
+ const { targetBranchId, ..._body } = request;
+ const _queryParams: Record = {};
+ _queryParams.target_branch_id = targetBranchId;
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/branches/${core.url.encodePathParam(source_branch_id)}/merge`,
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
+ requestType: "json",
+ body: serializers.conversationalAi.agents.BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost.jsonOrThrow(
+ _body,
+ { unrecognizedObjectKeys: "strip" },
+ ),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 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, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/v1/convai/agents/{agent_id}/branches/{source_branch_id}/merge",
+ );
+ }
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/branches/client/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/index.ts
new file mode 100644
index 00000000..415726b7
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost.ts b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost.ts
new file mode 100644
index 00000000..2af1e67b
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost.ts
@@ -0,0 +1,26 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../index";
+
+/**
+ * @example
+ * {
+ * parentVersionId: "parent_version_id",
+ * name: "name",
+ * description: "description"
+ * }
+ */
+export interface BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost {
+ /** ID of the version to branch from */
+ parentVersionId: string;
+ /** Name of the branch. It is unique within the agent. */
+ name: string;
+ /** Description for the branch */
+ description: string;
+ /** Changes to apply to conversation config */
+ conversationConfig?: Record;
+ /** Changes to apply to platform settings */
+ platformSettings?: Record;
+ /** Updated workflow definition */
+ workflow?: ElevenLabs.AgentWorkflowRequestModel;
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost.ts b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost.ts
new file mode 100644
index 00000000..182292f1
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost.ts
@@ -0,0 +1,14 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * targetBranchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj"
+ * }
+ */
+export interface BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost {
+ /** The ID of the target branch to merge into (must be the main branch). */
+ targetBranchId: string;
+ /** Whether to archive the source branch after merging */
+ archiveSourceBranch?: boolean;
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.ts b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.ts
new file mode 100644
index 00000000..be094509
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.ts
@@ -0,0 +1,14 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../index";
+
+/**
+ * @example
+ * {}
+ */
+export interface BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch {
+ /** Whether the branch should be archived */
+ isArchived?: boolean;
+ /** The protection level for the branch */
+ protectionStatus?: ElevenLabs.BranchProtectionStatus;
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BranchesListRequest.ts b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BranchesListRequest.ts
new file mode 100644
index 00000000..a246f54e
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BranchesListRequest.ts
@@ -0,0 +1,15 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * includeArchived: true,
+ * limit: 1
+ * }
+ */
+export interface BranchesListRequest {
+ /** Whether archived branches should be included */
+ includeArchived?: boolean;
+ /** How many results at most should be returned */
+ limit?: number;
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/index.ts
new file mode 100644
index 00000000..9f5a7b37
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/index.ts
@@ -0,0 +1,4 @@
+export type { BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost } from "./BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost";
+export type { BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost } from "./BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost";
+export type { BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch } from "./BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch";
+export type { BranchesListRequest } from "./BranchesListRequest";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/branches/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/branches/index.ts
new file mode 100644
index 00000000..5ec76921
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/branches/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/Client.ts b/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/Client.ts
new file mode 100644
index 00000000..d0933d1a
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/Client.ts
@@ -0,0 +1,128 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient";
+import { type NormalizedClientOptions, normalizeClientOptions } from "../../../../../../../../BaseClient";
+import * as core from "../../../../../../../../core";
+import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers";
+import * as environments from "../../../../../../../../environments";
+import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError";
+import * as errors from "../../../../../../../../errors/index";
+import * as serializers from "../../../../../../../../serialization/index";
+import * as ElevenLabs from "../../../../../../../index";
+
+export declare namespace DeploymentsClient {
+ export type Options = BaseClientOptions;
+
+ export interface RequestOptions extends BaseRequestOptions {}
+}
+
+export class DeploymentsClient {
+ protected readonly _options: NormalizedClientOptions;
+
+ constructor(options: DeploymentsClient.Options = {}) {
+ this._options = normalizeClientOptions(options);
+ }
+
+ /**
+ * Create a new deployment for an agent
+ *
+ * @param {string} agent_id - The id of an agent. This is returned on agent creation.
+ * @param {ElevenLabs.conversationalAi.agents.BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost} request
+ * @param {DeploymentsClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.agents.deployments.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ * deploymentRequest: {
+ * requests: [{
+ * branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ * deploymentStrategy: {
+ * type: "percentage",
+ * trafficPercentage: 0.5
+ * }
+ * }]
+ * }
+ * })
+ */
+ public create(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost,
+ requestOptions?: DeploymentsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__create(agent_id, request, requestOptions));
+ }
+
+ private async __create(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost,
+ requestOptions?: DeploymentsClient.RequestOptions,
+ ): Promise> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/deployments`,
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: serializers.conversationalAi.agents.BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost.jsonOrThrow(
+ request,
+ { unrecognizedObjectKeys: "strip" },
+ ),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.AgentDeploymentResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/v1/convai/agents/{agent_id}/deployments",
+ );
+ }
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/index.ts
new file mode 100644
index 00000000..415726b7
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/requests/BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost.ts b/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/requests/BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost.ts
new file mode 100644
index 00000000..8340e8c8
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/requests/BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost.ts
@@ -0,0 +1,22 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../index";
+
+/**
+ * @example
+ * {
+ * deploymentRequest: {
+ * requests: [{
+ * branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ * deploymentStrategy: {
+ * type: "percentage",
+ * trafficPercentage: 0.5
+ * }
+ * }]
+ * }
+ * }
+ */
+export interface BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost {
+ /** Request to create a new deployment */
+ deploymentRequest: ElevenLabs.AgentDeploymentRequest;
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/requests/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/requests/index.ts
new file mode 100644
index 00000000..c7d26602
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/deployments/client/requests/index.ts
@@ -0,0 +1 @@
+export type { BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost } from "./BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/deployments/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/deployments/index.ts
new file mode 100644
index 00000000..5ec76921
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/deployments/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/Client.ts b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/Client.ts
new file mode 100644
index 00000000..43485579
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/Client.ts
@@ -0,0 +1,351 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient";
+import { type NormalizedClientOptions, normalizeClientOptions } from "../../../../../../../../BaseClient";
+import * as core from "../../../../../../../../core";
+import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers";
+import * as environments from "../../../../../../../../environments";
+import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError";
+import * as errors from "../../../../../../../../errors/index";
+import * as serializers from "../../../../../../../../serialization/index";
+import * as ElevenLabs from "../../../../../../../index";
+
+export declare namespace DraftsClient {
+ export type Options = BaseClientOptions;
+
+ export interface RequestOptions extends BaseRequestOptions {}
+}
+
+export class DraftsClient {
+ protected readonly _options: NormalizedClientOptions;
+
+ constructor(options: DraftsClient.Options = {}) {
+ this._options = normalizeClientOptions(options);
+ }
+
+ /**
+ * Create a new draft for an agent
+ *
+ * @param {string} agent_id - The id of an agent. This is returned on agent creation.
+ * @param {ElevenLabs.conversationalAi.agents.BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost} request
+ * @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.agents.drafts.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ * branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ * conversationConfig: {
+ * "key": "value"
+ * },
+ * platformSettings: {
+ * "key": "value"
+ * },
+ * workflow: {
+ * edges: {
+ * "entry_to_tool_a": {
+ * source: "entry_node",
+ * target: "tool_node_a",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "start_to_entry": {
+ * source: "start_node",
+ * target: "entry_node",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_a_to_failure": {
+ * source: "tool_node_a",
+ * target: "failure_node",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_a_to_tool_b": {
+ * source: "tool_node_a",
+ * target: "tool_node_b",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_b_to_agent_transfer": {
+ * source: "tool_node_b",
+ * target: "success_transfer",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_b_to_conversation": {
+ * source: "tool_node_b",
+ * target: "success_conversation",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_b_to_end": {
+ * source: "tool_node_b",
+ * target: "success_end",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_b_to_phone": {
+ * source: "tool_node_b",
+ * target: "success_phone",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * }
+ * },
+ * nodes: {
+ * "entry_node": {
+ * type: "end"
+ * },
+ * "failure_node": {
+ * type: "end"
+ * },
+ * "start_node": {
+ * type: "end"
+ * },
+ * "success_conversation": {
+ * type: "end"
+ * },
+ * "success_end": {
+ * type: "end"
+ * },
+ * "success_phone": {
+ * type: "end"
+ * },
+ * "success_transfer": {
+ * type: "end"
+ * },
+ * "tool_node_a": {
+ * type: "end"
+ * },
+ * "tool_node_b": {
+ * type: "end"
+ * }
+ * }
+ * },
+ * name: "name"
+ * })
+ */
+ public create(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost,
+ requestOptions?: DraftsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__create(agent_id, request, requestOptions));
+ }
+
+ private async __create(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost,
+ requestOptions?: DraftsClient.RequestOptions,
+ ): Promise> {
+ const { branchId, ..._body } = request;
+ const _queryParams: Record = {};
+ _queryParams.branch_id = branchId;
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/drafts`,
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
+ requestType: "json",
+ body: serializers.conversationalAi.agents.BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost.jsonOrThrow(
+ _body,
+ { unrecognizedObjectKeys: "strip" },
+ ),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 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, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/v1/convai/agents/{agent_id}/drafts",
+ );
+ }
+
+ /**
+ * Delete a draft for an agent
+ *
+ * @param {string} agent_id - The id of an agent. This is returned on agent creation.
+ * @param {ElevenLabs.conversationalAi.agents.DraftsDeleteRequest} request
+ * @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.agents.drafts.delete("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ * branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj"
+ * })
+ */
+ public delete(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.DraftsDeleteRequest,
+ requestOptions?: DraftsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__delete(agent_id, request, requestOptions));
+ }
+
+ private async __delete(
+ agent_id: string,
+ request: ElevenLabs.conversationalAi.agents.DraftsDeleteRequest,
+ requestOptions?: DraftsClient.RequestOptions,
+ ): Promise> {
+ const { branchId } = request;
+ const _queryParams: Record = {};
+ _queryParams.branch_id = branchId;
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/agents/${core.url.encodePathParam(agent_id)}/drafts`,
+ ),
+ method: "DELETE",
+ headers: _headers,
+ queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 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, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "DELETE",
+ "/v1/convai/agents/{agent_id}/drafts",
+ );
+ }
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/index.ts
new file mode 100644
index 00000000..415726b7
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost.ts b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost.ts
new file mode 100644
index 00000000..fc8abc95
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost.ts
@@ -0,0 +1,176 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../index";
+
+/**
+ * @example
+ * {
+ * branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ * conversationConfig: {
+ * "key": "value"
+ * },
+ * platformSettings: {
+ * "key": "value"
+ * },
+ * workflow: {
+ * edges: {
+ * "entry_to_tool_a": {
+ * source: "entry_node",
+ * target: "tool_node_a",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "start_to_entry": {
+ * source: "start_node",
+ * target: "entry_node",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_a_to_failure": {
+ * source: "tool_node_a",
+ * target: "failure_node",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_a_to_tool_b": {
+ * source: "tool_node_a",
+ * target: "tool_node_b",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_b_to_agent_transfer": {
+ * source: "tool_node_b",
+ * target: "success_transfer",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_b_to_conversation": {
+ * source: "tool_node_b",
+ * target: "success_conversation",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_b_to_end": {
+ * source: "tool_node_b",
+ * target: "success_end",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * },
+ * "tool_b_to_phone": {
+ * source: "tool_node_b",
+ * target: "success_phone",
+ * forwardCondition: {
+ * type: "expression",
+ * expression: {
+ * type: "and_operator",
+ * children: [{
+ * type: "boolean_literal",
+ * value: true
+ * }]
+ * }
+ * }
+ * }
+ * },
+ * nodes: {
+ * "entry_node": {
+ * type: "end"
+ * },
+ * "failure_node": {
+ * type: "end"
+ * },
+ * "start_node": {
+ * type: "end"
+ * },
+ * "success_conversation": {
+ * type: "end"
+ * },
+ * "success_end": {
+ * type: "end"
+ * },
+ * "success_phone": {
+ * type: "end"
+ * },
+ * "success_transfer": {
+ * type: "end"
+ * },
+ * "tool_node_a": {
+ * type: "end"
+ * },
+ * "tool_node_b": {
+ * type: "end"
+ * }
+ * }
+ * },
+ * name: "name"
+ * }
+ */
+export interface BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost {
+ /** The ID of the agent branch to use */
+ branchId: string;
+ /** Conversation config for the draft */
+ conversationConfig: Record;
+ /** Platform settings for the draft */
+ platformSettings: Record;
+ /** Workflow for the draft */
+ workflow: ElevenLabs.AgentWorkflowRequestModel;
+ /** Name for the draft */
+ name: string;
+ /** Tags to help classify and filter the agent */
+ tags?: string[];
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/DraftsDeleteRequest.ts b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/DraftsDeleteRequest.ts
new file mode 100644
index 00000000..9dcac683
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/DraftsDeleteRequest.ts
@@ -0,0 +1,12 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj"
+ * }
+ */
+export interface DraftsDeleteRequest {
+ /** The ID of the agent branch to use */
+ branchId: string;
+}
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/index.ts
new file mode 100644
index 00000000..5b29c7c7
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/drafts/client/requests/index.ts
@@ -0,0 +1,2 @@
+export type { BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost } from "./BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost";
+export type { DraftsDeleteRequest } from "./DraftsDeleteRequest";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/drafts/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/drafts/index.ts
new file mode 100644
index 00000000..5ec76921
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/agents/resources/drafts/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/conversationalAi/resources/agents/resources/index.ts b/src/api/resources/conversationalAi/resources/agents/resources/index.ts
index 152129c0..2f00a1c0 100644
--- a/src/api/resources/conversationalAi/resources/agents/resources/index.ts
+++ b/src/api/resources/conversationalAi/resources/agents/resources/index.ts
@@ -1,3 +1,9 @@
+export * as branches from "./branches";
+export * from "./branches/client/requests";
+export * as deployments from "./deployments";
+export * from "./deployments/client/requests";
+export * as drafts from "./drafts";
+export * from "./drafts/client/requests";
export * as knowledgeBase from "./knowledgeBase";
export * as link from "./link";
export * as llmUsage from "./llmUsage";
diff --git a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.ts b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.ts
index 5e85945a..44c5e017 100644
--- a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.ts
+++ b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.ts
@@ -323,6 +323,98 @@ export class DocumentsClient {
);
}
+ /**
+ * Create a folder used for grouping documents together.
+ *
+ * @param {ElevenLabs.conversationalAi.knowledgeBase.BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost} request
+ * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.knowledgeBase.documents.createFolder({
+ * name: "name"
+ * })
+ */
+ public createFolder(
+ request: ElevenLabs.conversationalAi.knowledgeBase.BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost,
+ requestOptions?: DocumentsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__createFolder(request, requestOptions));
+ }
+
+ private async __createFolder(
+ request: ElevenLabs.conversationalAi.knowledgeBase.BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost,
+ requestOptions?: DocumentsClient.RequestOptions,
+ ): Promise> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ "v1/convai/knowledge-base/folder",
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: serializers.conversationalAi.knowledgeBase.BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost.jsonOrThrow(
+ request,
+ { unrecognizedObjectKeys: "strip" },
+ ),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.AddKnowledgeBaseResponseModel.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/v1/convai/knowledge-base/folder",
+ );
+ }
+
/**
* Get details about a specific documentation making up the agent's knowledge base
*
@@ -866,4 +958,173 @@ export class DocumentsClient {
"/v1/convai/knowledge-base/{documentation_id}/source-file-url",
);
}
+
+ /**
+ * Moves the entity from one folder to another.
+ *
+ * @param {string} document_id - The id of a document from the knowledge base. This is returned on document addition.
+ * @param {ElevenLabs.conversationalAi.knowledgeBase.BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost} request
+ * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.knowledgeBase.documents.move("21m00Tcm4TlvDq8ikWAM")
+ */
+ public move(
+ document_id: string,
+ request: ElevenLabs.conversationalAi.knowledgeBase.BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost = {},
+ requestOptions?: DocumentsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__move(document_id, request, requestOptions));
+ }
+
+ private async __move(
+ document_id: string,
+ request: ElevenLabs.conversationalAi.knowledgeBase.BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost = {},
+ requestOptions?: DocumentsClient.RequestOptions,
+ ): Promise> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ `v1/convai/knowledge-base/${core.url.encodePathParam(document_id)}/move`,
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: serializers.conversationalAi.knowledgeBase.BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost.jsonOrThrow(
+ request,
+ { unrecognizedObjectKeys: "strip" },
+ ),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return { data: undefined, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/v1/convai/knowledge-base/{document_id}/move",
+ );
+ }
+
+ /**
+ * Moves multiple entities from one folder to another.
+ *
+ * @param {ElevenLabs.conversationalAi.knowledgeBase.BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost} request
+ * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
+ *
+ * @example
+ * await client.conversationalAi.knowledgeBase.documents.bulkMove({
+ * documentIds: ["21m00Tcm4TlvDq8ikWAM", "31m00Tcm4TlvDq8ikWBM"]
+ * })
+ */
+ public bulkMove(
+ request: ElevenLabs.conversationalAi.knowledgeBase.BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost,
+ requestOptions?: DocumentsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__bulkMove(request, requestOptions));
+ }
+
+ private async __bulkMove(
+ request: ElevenLabs.conversationalAi.knowledgeBase.BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost,
+ requestOptions?: DocumentsClient.RequestOptions,
+ ): Promise> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ 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.ElevenLabsEnvironment.Production,
+ "v1/convai/knowledge-base/bulk-move",
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: serializers.conversationalAi.knowledgeBase.BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost.jsonOrThrow(
+ request,
+ { unrecognizedObjectKeys: "strip" },
+ ),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return { data: undefined, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new ElevenLabs.UnprocessableEntityError(
+ serializers.HttpValidationError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.ElevenLabsError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/v1/convai/knowledge-base/bulk-move",
+ );
+ }
}
diff --git a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost.ts b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost.ts
new file mode 100644
index 00000000..53bbad30
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost.ts
@@ -0,0 +1,14 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * documentIds: ["21m00Tcm4TlvDq8ikWAM", "31m00Tcm4TlvDq8ikWBM"]
+ * }
+ */
+export interface BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost {
+ /** The ids of documents or folders from the knowledge base. */
+ documentIds: string[];
+ /** The folder to move the entities to. If not set, the entities will be moved to the root folder. */
+ moveTo?: string;
+}
diff --git a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost.ts b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost.ts
new file mode 100644
index 00000000..22e46e41
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost.ts
@@ -0,0 +1,14 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * name: "name"
+ * }
+ */
+export interface BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost {
+ /** A custom, human-readable name for the document. */
+ name: string;
+ /** If set, the created document or folder will be placed inside the given folder. */
+ parentFolderId?: string;
+}
diff --git a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost.ts b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost.ts
new file mode 100644
index 00000000..15021064
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost.ts
@@ -0,0 +1,10 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {}
+ */
+export interface BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost {
+ /** The folder to move the entities to. If not set, the entities will be moved to the root folder. */
+ moveTo?: string;
+}
diff --git a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.ts b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.ts
index 7e7c1d32..8250dda5 100644
--- a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.ts
+++ b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.ts
@@ -1,6 +1,9 @@
+export type { BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost } from "./BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost";
export type { BodyCreateFileDocumentV1ConvaiKnowledgeBaseFilePost } from "./BodyCreateFileDocumentV1ConvaiKnowledgeBaseFilePost";
+export type { BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost } from "./BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost";
export type { BodyCreateTextDocumentV1ConvaiKnowledgeBaseTextPost } from "./BodyCreateTextDocumentV1ConvaiKnowledgeBaseTextPost";
export type { BodyCreateUrlDocumentV1ConvaiKnowledgeBaseUrlPost } from "./BodyCreateUrlDocumentV1ConvaiKnowledgeBaseUrlPost";
+export type { BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost } from "./BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost";
export type { BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch } from "./BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch";
export type { DocumentsDeleteRequest } from "./DocumentsDeleteRequest";
export type { DocumentsGetAgentsRequest } from "./DocumentsGetAgentsRequest";
diff --git a/src/api/resources/conversationalAi/resources/tools/client/Client.ts b/src/api/resources/conversationalAi/resources/tools/client/Client.ts
index 44c732ef..24cdfea5 100644
--- a/src/api/resources/conversationalAi/resources/tools/client/Client.ts
+++ b/src/api/resources/conversationalAi/resources/tools/client/Client.ts
@@ -26,20 +26,70 @@ export class ToolsClient {
/**
* Get all available tools in the workspace.
*
+ * @param {ElevenLabs.conversationalAi.ToolsListRequest} request
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link ElevenLabs.UnprocessableEntityError}
*
* @example
- * await client.conversationalAi.tools.list()
+ * await client.conversationalAi.tools.list({
+ * search: "search",
+ * pageSize: 1,
+ * showOnlyOwnedDocuments: true,
+ * sortDirection: "asc",
+ * sortBy: "name",
+ * cursor: "cursor"
+ * })
*/
- public list(requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
+ public list(
+ request: ElevenLabs.conversationalAi.ToolsListRequest = {},
+ requestOptions?: ToolsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
}
private async __list(
+ request: ElevenLabs.conversationalAi.ToolsListRequest = {},
requestOptions?: ToolsClient.RequestOptions,
): Promise> {
+ const { search, pageSize, showOnlyOwnedDocuments, types, sortDirection, sortBy, cursor } = request;
+ const _queryParams: Record = {};
+ if (search != null) {
+ _queryParams.search = search;
+ }
+
+ if (pageSize != null) {
+ _queryParams.page_size = pageSize.toString();
+ }
+
+ if (showOnlyOwnedDocuments != null) {
+ _queryParams.show_only_owned_documents = showOnlyOwnedDocuments.toString();
+ }
+
+ if (types != null) {
+ if (Array.isArray(types)) {
+ _queryParams.types = types.map((item) =>
+ serializers.ToolTypeFilter.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
+ );
+ } else {
+ _queryParams.types = serializers.ToolTypeFilter.jsonOrThrow(types, { unrecognizedObjectKeys: "strip" });
+ }
+ }
+
+ if (sortDirection != null) {
+ _queryParams.sort_direction = serializers.SortDirection.jsonOrThrow(sortDirection, {
+ unrecognizedObjectKeys: "strip",
+ });
+ }
+
+ if (sortBy != null) {
+ _queryParams.sort_by = serializers.ToolSortBy.jsonOrThrow(sortBy, { unrecognizedObjectKeys: "strip" });
+ }
+
+ if (cursor != null) {
+ _queryParams.cursor = cursor;
+ }
+
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
@@ -54,7 +104,7 @@ export class ToolsClient {
),
method: "GET",
headers: _headers,
- queryParameters: requestOptions?.queryParams,
+ queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
diff --git a/src/api/resources/conversationalAi/resources/tools/client/requests/ToolsListRequest.ts b/src/api/resources/conversationalAi/resources/tools/client/requests/ToolsListRequest.ts
new file mode 100644
index 00000000..171334ae
--- /dev/null
+++ b/src/api/resources/conversationalAi/resources/tools/client/requests/ToolsListRequest.ts
@@ -0,0 +1,31 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../index";
+
+/**
+ * @example
+ * {
+ * search: "search",
+ * pageSize: 1,
+ * showOnlyOwnedDocuments: true,
+ * sortDirection: "asc",
+ * sortBy: "name",
+ * cursor: "cursor"
+ * }
+ */
+export interface ToolsListRequest {
+ /** If specified, the endpoint returns only tools whose names start with this string. */
+ search?: string;
+ /** How many documents to return at maximum. Can not exceed 100, defaults to 30. */
+ pageSize?: number;
+ /** If set to true, the endpoint will return only tools owned by you (and not shared from somebody else). */
+ showOnlyOwnedDocuments?: boolean;
+ /** If present, the endpoint will return only tools of the given types. */
+ types?: ElevenLabs.ToolTypeFilter | ElevenLabs.ToolTypeFilter[];
+ /** The direction to sort the results */
+ sortDirection?: ElevenLabs.SortDirection;
+ /** The field to sort the results by */
+ sortBy?: ElevenLabs.ToolSortBy;
+ /** Used for fetching next page. Cursor is returned in the response. */
+ cursor?: string;
+}
diff --git a/src/api/resources/conversationalAi/resources/tools/client/requests/index.ts b/src/api/resources/conversationalAi/resources/tools/client/requests/index.ts
index 1d9f9d6d..1cf5fb0f 100644
--- a/src/api/resources/conversationalAi/resources/tools/client/requests/index.ts
+++ b/src/api/resources/conversationalAi/resources/tools/client/requests/index.ts
@@ -1 +1,2 @@
export type { ToolsGetDependentAgentsRequest } from "./ToolsGetDependentAgentsRequest";
+export type { ToolsListRequest } from "./ToolsListRequest";
diff --git a/src/api/resources/pronunciationDictionaries/resources/rules/client/Client.ts b/src/api/resources/pronunciationDictionaries/resources/rules/client/Client.ts
index c9cd33c3..be66dbe5 100644
--- a/src/api/resources/pronunciationDictionaries/resources/rules/client/Client.ts
+++ b/src/api/resources/pronunciationDictionaries/resources/rules/client/Client.ts
@@ -24,7 +24,7 @@ export class RulesClient {
}
/**
- * Add rules to the pronunciation dictionary
+ * Add rules to the pronunciation dictionary. If a rule with the same string_to_replace already exists, it will be replaced.
*
* @param {string} pronunciation_dictionary_id - The id of the pronunciation dictionary
* @param {ElevenLabs.pronunciationDictionaries.PronunciationDictionary} request
diff --git a/src/api/resources/studio/resources/projects/client/Client.ts b/src/api/resources/studio/resources/projects/client/Client.ts
index 30137f09..1f0bdb35 100644
--- a/src/api/resources/studio/resources/projects/client/Client.ts
+++ b/src/api/resources/studio/resources/projects/client/Client.ts
@@ -290,6 +290,10 @@ export class ProjectsClient {
}
}
+ if (request.createPublishingRead != null) {
+ _request.append("create_publishing_read", request.createPublishingRead.toString());
+ }
+
const _maybeEncodedRequest = await _request.getRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
diff --git a/src/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.ts b/src/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.ts
index cfaf348f..8a6cdddf 100644
--- a/src/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.ts
+++ b/src/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.ts
@@ -145,4 +145,6 @@ export interface BodyCreateStudioProjectV1StudioProjectsPost {
*
*/
voiceSettings?: string[];
+ /** If true, creates a corresponding read for direct publishing in draft state */
+ createPublishingRead?: boolean;
}
diff --git a/src/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.ts b/src/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.ts
index e3c84b99..142a2007 100644
--- a/src/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.ts
+++ b/src/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.ts
@@ -38,6 +38,6 @@ export interface VoiceDesignRequestModel {
quality?: number;
/** Reference audio to use for the voice generation. The audio should be base64 encoded. Only supported when using the eleven_ttv_v3 model. */
referenceAudioBase64?: string;
- /** Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. */
+ /** Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model. */
promptStrength?: number;
}
diff --git a/src/api/resources/textToVoice/client/requests/VoiceRemixRequestModel.ts b/src/api/resources/textToVoice/client/requests/VoiceRemixRequestModel.ts
index 1697647a..55245210 100644
--- a/src/api/resources/textToVoice/client/requests/VoiceRemixRequestModel.ts
+++ b/src/api/resources/textToVoice/client/requests/VoiceRemixRequestModel.ts
@@ -30,6 +30,6 @@ export interface VoiceRemixRequestModel {
remixingSessionId?: string;
/** The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. */
remixingSessionIterationId?: string;
- /** Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. */
+ /** Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model. */
promptStrength?: number;
}
diff --git a/src/api/resources/workspace/resources/index.ts b/src/api/resources/workspace/resources/index.ts
index 12525b3d..9482c046 100644
--- a/src/api/resources/workspace/resources/index.ts
+++ b/src/api/resources/workspace/resources/index.ts
@@ -2,10 +2,8 @@ export * as groups from "./groups";
export * from "./groups/client/requests";
export * as invites from "./invites";
export * from "./invites/client/requests";
-export * from "./invites/types";
export * as members from "./members";
export * from "./members/client/requests";
-export * from "./members/types";
export * as resources from "./resources";
export * from "./resources/client/requests";
export * from "./resources/types";
diff --git a/src/api/resources/workspace/resources/invites/client/requests/InviteUserRequest.ts b/src/api/resources/workspace/resources/invites/client/requests/InviteUserRequest.ts
index 902c7540..040ef5cd 100644
--- a/src/api/resources/workspace/resources/invites/client/requests/InviteUserRequest.ts
+++ b/src/api/resources/workspace/resources/invites/client/requests/InviteUserRequest.ts
@@ -11,8 +11,10 @@ import type * as ElevenLabs from "../../../../../../index";
export interface InviteUserRequest {
/** The email of the customer */
email: string;
+ /** The workspace permission of the user. This is deprecated, use `seat_type` instead. */
+ workspacePermission?: string;
+ /** The seat type of the user */
+ seatType?: ElevenLabs.SeatType;
/** The group ids of the user */
groupIds?: string[];
- /** The workspace permission of the user */
- workspacePermission?: ElevenLabs.workspace.BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission;
}
diff --git a/src/api/resources/workspace/resources/invites/index.ts b/src/api/resources/workspace/resources/invites/index.ts
index d2ec2302..5ec76921 100644
--- a/src/api/resources/workspace/resources/invites/index.ts
+++ b/src/api/resources/workspace/resources/invites/index.ts
@@ -1,2 +1 @@
export * from "./client";
-export * from "./types";
diff --git a/src/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.ts b/src/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.ts
deleted file mode 100644
index 79f05145..00000000
--- a/src/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-export const BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission = {
- External: "external",
- Admin: "admin",
- WorkspaceAdmin: "workspace_admin",
- WorkspaceMember: "workspace_member",
- SupportL1: "support_l1",
- SupportL2: "support_l2",
- Moderator: "moderator",
- Sales: "sales",
- VoiceMixer: "voice_mixer",
- VoiceAdmin: "voice_admin",
- ConvaiAdmin: "convai_admin",
- EnterpriseViewer: "enterprise_viewer",
- QualityCheckAdmin: "quality_check_admin",
- WorkspaceMigrationAdmin: "workspace_migration_admin",
- HumanReviewer: "human_reviewer",
- ProductionsAdmin: "productions_admin",
- Support: "support",
- Internal: "internal",
-} as const;
-export type BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission =
- (typeof BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission)[keyof typeof BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission];
diff --git a/src/api/resources/workspace/resources/invites/types/index.ts b/src/api/resources/workspace/resources/invites/types/index.ts
deleted file mode 100644
index 95a2e8b5..00000000
--- a/src/api/resources/workspace/resources/invites/types/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission";
diff --git a/src/api/resources/workspace/resources/members/client/requests/UpdateMemberRequest.ts b/src/api/resources/workspace/resources/members/client/requests/UpdateMemberRequest.ts
index 9cce4e0a..d30d2c66 100644
--- a/src/api/resources/workspace/resources/members/client/requests/UpdateMemberRequest.ts
+++ b/src/api/resources/workspace/resources/members/client/requests/UpdateMemberRequest.ts
@@ -13,6 +13,8 @@ export interface UpdateMemberRequest {
email: string;
/** Whether to lock or unlock the user account. */
isLocked?: boolean;
- /** Role dictating permissions in the workspace. */
- workspaceRole?: ElevenLabs.workspace.BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole;
+ /** The workspace role of the user. This is deprecated, use `workspace_seat_type` instead. */
+ workspaceRole?: ElevenLabs.SeatType;
+ /** The workspace seat type */
+ workspaceSeatType?: ElevenLabs.SeatType;
}
diff --git a/src/api/resources/workspace/resources/members/index.ts b/src/api/resources/workspace/resources/members/index.ts
index d2ec2302..5ec76921 100644
--- a/src/api/resources/workspace/resources/members/index.ts
+++ b/src/api/resources/workspace/resources/members/index.ts
@@ -1,2 +1 @@
export * from "./client";
-export * from "./types";
diff --git a/src/api/resources/workspace/resources/members/types/BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.ts b/src/api/resources/workspace/resources/members/types/BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.ts
deleted file mode 100644
index 7d532a42..00000000
--- a/src/api/resources/workspace/resources/members/types/BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-export const BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole = {
- WorkspaceAdmin: "workspace_admin",
- WorkspaceMember: "workspace_member",
-} as const;
-export type BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole =
- (typeof BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole)[keyof typeof BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole];
diff --git a/src/api/resources/workspace/resources/members/types/index.ts b/src/api/resources/workspace/resources/members/types/index.ts
deleted file mode 100644
index 30a32ea4..00000000
--- a/src/api/resources/workspace/resources/members/types/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole";
diff --git a/src/api/resources/workspace/resources/resources/client/Client.ts b/src/api/resources/workspace/resources/resources/client/Client.ts
index 801f2081..343ecfb8 100644
--- a/src/api/resources/workspace/resources/resources/client/Client.ts
+++ b/src/api/resources/workspace/resources/resources/client/Client.ts
@@ -291,92 +291,4 @@ export class ResourcesClient {
"/v1/workspace/resources/{resource_id}/unshare",
);
}
-
- /**
- * Copies a workspace resource to another workspace.
- *
- * @param {string} resource_id - The ID of the target resource.
- * @param {ElevenLabs.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost} request
- * @param {ResourcesClient.RequestOptions} requestOptions - Request-specific configuration.
- *
- * @throws {@link ElevenLabs.UnprocessableEntityError}
- *
- * @example
- * await client.workspace.resources.copyToWorkspace("resource_id", {
- * resourceType: "voice",
- * targetUserId: "target_user_id"
- * })
- */
- public copyToWorkspace(
- resource_id: string,
- request: ElevenLabs.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost,
- requestOptions?: ResourcesClient.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__copyToWorkspace(resource_id, request, requestOptions));
- }
-
- private async __copyToWorkspace(
- resource_id: string,
- request: ElevenLabs.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost,
- requestOptions?: ResourcesClient.RequestOptions,
- ): Promise> {
- const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
- 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.ElevenLabsEnvironment.Production,
- `v1/workspace/resources/${core.url.encodePathParam(resource_id)}/copy-to-workspace`,
- ),
- method: "POST",
- headers: _headers,
- contentType: "application/json",
- queryParameters: requestOptions?.queryParams,
- requestType: "json",
- body: serializers.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.jsonOrThrow(
- request,
- { unrecognizedObjectKeys: "strip" },
- ),
- timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 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, rawResponse: _response.rawResponse };
- }
-
- if (_response.error.reason === "status-code") {
- switch (_response.error.statusCode) {
- case 422:
- throw new ElevenLabs.UnprocessableEntityError(
- serializers.HttpValidationError.parseOrThrow(_response.error.body, {
- unrecognizedObjectKeys: "passthrough",
- allowUnrecognizedUnionMembers: true,
- allowUnrecognizedEnumValues: true,
- breadcrumbsPrefix: ["response"],
- }),
- _response.rawResponse,
- );
- default:
- throw new errors.ElevenLabsError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse,
- });
- }
- }
-
- return handleNonStatusCodeError(
- _response.error,
- _response.rawResponse,
- "POST",
- "/v1/workspace/resources/{resource_id}/copy-to-workspace",
- );
- }
}
diff --git a/src/api/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.ts b/src/api/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.ts
deleted file mode 100644
index c4296d58..00000000
--- a/src/api/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-import type * as ElevenLabs from "../../../../../../index";
-
-/**
- * @example
- * {
- * resourceType: "voice",
- * targetUserId: "target_user_id"
- * }
- */
-export interface BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost {
- /** Resource type of the target resource. */
- resourceType: ElevenLabs.WorkspaceResourceType;
- /** The ID of the target user. */
- targetUserId: string;
-}
diff --git a/src/api/resources/workspace/resources/resources/client/requests/index.ts b/src/api/resources/workspace/resources/resources/client/requests/index.ts
index 80952eca..c7728125 100644
--- a/src/api/resources/workspace/resources/resources/client/requests/index.ts
+++ b/src/api/resources/workspace/resources/resources/client/requests/index.ts
@@ -1,4 +1,3 @@
-export type { BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost } from "./BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost";
export type { BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePost } from "./BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePost";
export type { BodyUnshareWorkspaceResourceV1WorkspaceResourcesResourceIdUnsharePost } from "./BodyUnshareWorkspaceResourceV1WorkspaceResourcesResourceIdUnsharePost";
export type { ResourcesGetRequest } from "./ResourcesGetRequest";
diff --git a/src/api/types/AgentBranchBasicInfo.ts b/src/api/types/AgentBranchBasicInfo.ts
new file mode 100644
index 00000000..779ee65b
--- /dev/null
+++ b/src/api/types/AgentBranchBasicInfo.ts
@@ -0,0 +1,6 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface AgentBranchBasicInfo {
+ id: string;
+ name: string;
+}
diff --git a/src/api/types/AgentBranchResponse.ts b/src/api/types/AgentBranchResponse.ts
new file mode 100644
index 00000000..08e28fe8
--- /dev/null
+++ b/src/api/types/AgentBranchResponse.ts
@@ -0,0 +1,22 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../index";
+
+export interface AgentBranchResponse {
+ id: string;
+ name: string;
+ agentId: string;
+ description: string;
+ createdAt: number;
+ lastCommittedAt: number;
+ isArchived: boolean;
+ protectionStatus?: ElevenLabs.BranchProtectionStatus;
+ /** Access information for the branch */
+ accessInfo?: ElevenLabs.ResourceAccessInfo;
+ /** Percentage of traffic live on the branch */
+ currentLivePercentage?: number;
+ /** Parent branch of the branch */
+ parentBranch?: ElevenLabs.AgentBranchBasicInfo;
+ /** Most recent versions on the branch */
+ mostRecentVersions?: ElevenLabs.AgentVersionMetadata[];
+}
diff --git a/src/api/types/AgentBranchSummary.ts b/src/api/types/AgentBranchSummary.ts
new file mode 100644
index 00000000..23e1855a
--- /dev/null
+++ b/src/api/types/AgentBranchSummary.ts
@@ -0,0 +1,20 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../index";
+
+export interface AgentBranchSummary {
+ id: string;
+ name: string;
+ agentId: string;
+ description: string;
+ createdAt: number;
+ lastCommittedAt: number;
+ isArchived: boolean;
+ protectionStatus?: ElevenLabs.BranchProtectionStatus;
+ /** Access information for the branch */
+ accessInfo?: ElevenLabs.ResourceAccessInfo;
+ /** Percentage of traffic live on the branch */
+ currentLivePercentage?: number;
+ /** Whether a draft exists for the branch */
+ draftExists?: boolean;
+}
diff --git a/src/api/types/AgentDeploymentPercentageStrategy.ts b/src/api/types/AgentDeploymentPercentageStrategy.ts
new file mode 100644
index 00000000..b9c582cb
--- /dev/null
+++ b/src/api/types/AgentDeploymentPercentageStrategy.ts
@@ -0,0 +1,7 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface AgentDeploymentPercentageStrategy {
+ type?: "percentage";
+ /** Traffic percentage to deploy */
+ trafficPercentage: number;
+}
diff --git a/src/api/types/AgentDeploymentRequest.ts b/src/api/types/AgentDeploymentRequest.ts
new file mode 100644
index 00000000..61f88286
--- /dev/null
+++ b/src/api/types/AgentDeploymentRequest.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../index";
+
+export interface AgentDeploymentRequest {
+ /** List of deployment requests */
+ requests: ElevenLabs.AgentDeploymentRequestItem[];
+}
diff --git a/src/api/types/AgentDeploymentRequestItem.ts b/src/api/types/AgentDeploymentRequestItem.ts
new file mode 100644
index 00000000..6a055d09
--- /dev/null
+++ b/src/api/types/AgentDeploymentRequestItem.ts
@@ -0,0 +1,9 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../index";
+
+export interface AgentDeploymentRequestItem {
+ /** ID of the branch to deploy */
+ branchId: string;
+ deploymentStrategy: ElevenLabs.AgentDeploymentPercentageStrategy;
+}
diff --git a/src/api/types/AgentDeploymentResponse.ts b/src/api/types/AgentDeploymentResponse.ts
new file mode 100644
index 00000000..188a5ebd
--- /dev/null
+++ b/src/api/types/AgentDeploymentResponse.ts
@@ -0,0 +1,6 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface AgentDeploymentResponse {
+ /** Map of branch IDs to traffic percentages */
+ trafficPercentageBranchIdMap?: Record;
+}
diff --git a/src/api/types/AgentVersionMetadata.ts b/src/api/types/AgentVersionMetadata.ts
new file mode 100644
index 00000000..77b2a55f
--- /dev/null
+++ b/src/api/types/AgentVersionMetadata.ts
@@ -0,0 +1,14 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../index";
+
+export interface AgentVersionMetadata {
+ id: string;
+ agentId: string;
+ branchId: string;
+ versionDescription: string;
+ seqNoInBranch: number;
+ timeCommittedSecs: number;
+ parents: ElevenLabs.AgentVersionParents;
+ accessInfo?: ElevenLabs.ResourceAccessInfo;
+}
diff --git a/src/api/types/AgentVersionParents.ts b/src/api/types/AgentVersionParents.ts
new file mode 100644
index 00000000..61e38234
--- /dev/null
+++ b/src/api/types/AgentVersionParents.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface AgentVersionParents {
+ inBranchParentId?: string;
+ outOfBranchParentId?: string;
+ mergedIntoBranchId?: string;
+ mergedFromBranchId?: string;
+}
diff --git a/src/api/types/BranchProtectionStatus.ts b/src/api/types/BranchProtectionStatus.ts
new file mode 100644
index 00000000..b54ee885
--- /dev/null
+++ b/src/api/types/BranchProtectionStatus.ts
@@ -0,0 +1,7 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const BranchProtectionStatus = {
+ WriterPermsRequired: "writer_perms_required",
+ AdminPermsRequired: "admin_perms_required",
+} as const;
+export type BranchProtectionStatus = (typeof BranchProtectionStatus)[keyof typeof BranchProtectionStatus];
diff --git a/src/api/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.ts b/src/api/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.ts
index 054d694c..f4114f5d 100644
--- a/src/api/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.ts
+++ b/src/api/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.ts
@@ -9,6 +9,7 @@ export interface ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCo
isError: boolean;
toolHasBeenCalled: boolean;
toolLatencySecs?: number;
+ errorType?: string;
dynamicVariableUpdates?: ElevenLabs.DynamicVariableUpdateCommonModel[];
type: "api_integration_webhook";
integrationId: string;
diff --git a/src/api/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.ts b/src/api/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.ts
index b7906a9e..98e951f1 100644
--- a/src/api/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.ts
+++ b/src/api/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.ts
@@ -9,6 +9,7 @@ export interface ConversationHistoryTranscriptOtherToolsResultCommonModel {
isError: boolean;
toolHasBeenCalled: boolean;
toolLatencySecs?: number;
+ errorType?: string;
dynamicVariableUpdates?: ElevenLabs.DynamicVariableUpdateCommonModel[];
type?: ElevenLabs.ConversationHistoryTranscriptOtherToolsResultCommonModelType;
}
diff --git a/src/api/types/ConversationHistoryTranscriptSystemToolResultCommonModel.ts b/src/api/types/ConversationHistoryTranscriptSystemToolResultCommonModel.ts
index 4fc536da..a9749737 100644
--- a/src/api/types/ConversationHistoryTranscriptSystemToolResultCommonModel.ts
+++ b/src/api/types/ConversationHistoryTranscriptSystemToolResultCommonModel.ts
@@ -9,6 +9,7 @@ export interface ConversationHistoryTranscriptSystemToolResultCommonModel {
isError: boolean;
toolHasBeenCalled: boolean;
toolLatencySecs?: number;
+ errorType?: string;
dynamicVariableUpdates?: ElevenLabs.DynamicVariableUpdateCommonModel[];
type: "system";
result?: ElevenLabs.ConversationHistoryTranscriptSystemToolResultCommonModelResult;
diff --git a/src/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.ts b/src/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.ts
index 0fb802e0..825d2cee 100644
--- a/src/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.ts
+++ b/src/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.ts
@@ -9,6 +9,7 @@ export interface ConversationHistoryTranscriptWorkflowToolsResultCommonModelInpu
isError: boolean;
toolHasBeenCalled: boolean;
toolLatencySecs?: number;
+ errorType?: string;
dynamicVariableUpdates?: ElevenLabs.DynamicVariableUpdateCommonModel[];
type: "workflow";
result?: ElevenLabs.WorkflowToolResponseModelInput;
diff --git a/src/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.ts b/src/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.ts
index 8f67d175..7824057d 100644
--- a/src/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.ts
+++ b/src/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.ts
@@ -9,6 +9,7 @@ export interface ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutp
isError: boolean;
toolHasBeenCalled: boolean;
toolLatencySecs?: number;
+ errorType?: string;
dynamicVariableUpdates?: ElevenLabs.DynamicVariableUpdateCommonModel[];
type: "workflow";
result?: ElevenLabs.WorkflowToolResponseModelOutput;
diff --git a/src/api/types/CreateAgentBranchResponseModel.ts b/src/api/types/CreateAgentBranchResponseModel.ts
new file mode 100644
index 00000000..0d1487d8
--- /dev/null
+++ b/src/api/types/CreateAgentBranchResponseModel.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface CreateAgentBranchResponseModel {
+ /** ID of the created branch */
+ createdBranchId: string;
+ /** ID of the first version on the created branch */
+ createdVersionId: string;
+}
diff --git a/src/api/types/DirectPublishingReadResponseModel.ts b/src/api/types/DirectPublishingReadResponseModel.ts
index 26d0c144..5055426f 100644
--- a/src/api/types/DirectPublishingReadResponseModel.ts
+++ b/src/api/types/DirectPublishingReadResponseModel.ts
@@ -27,6 +27,7 @@ export interface DirectPublishingReadResponseModel {
ean?: string;
legalTerms?: ElevenLabs.ReadLegalTerms;
contentGuidelinesTerms?: ElevenLabs.ReadLegalTerms;
+ lastUpdatedFromProjectUnix?: number;
publishingProjectId?: string;
publishingState?: string;
publisherProfileId?: string;
diff --git a/src/api/types/GetConversationResponseModel.ts b/src/api/types/GetConversationResponseModel.ts
index 71e88f82..608f3b3b 100644
--- a/src/api/types/GetConversationResponseModel.ts
+++ b/src/api/types/GetConversationResponseModel.ts
@@ -4,6 +4,7 @@ import type * as ElevenLabs from "../index";
export interface GetConversationResponseModel {
agentId: string;
+ agentName?: string;
conversationId: string;
status: ElevenLabs.GetConversationResponseModelStatus;
userId?: string;
diff --git a/src/api/types/ListResponseAgentBranchSummary.ts b/src/api/types/ListResponseAgentBranchSummary.ts
new file mode 100644
index 00000000..db31df85
--- /dev/null
+++ b/src/api/types/ListResponseAgentBranchSummary.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../index";
+
+export interface ListResponseAgentBranchSummary {
+ meta?: ElevenLabs.ListResponseMeta;
+ results: ElevenLabs.AgentBranchSummary[];
+}
diff --git a/src/api/types/PermissionType.ts b/src/api/types/PermissionType.ts
index 882ffb90..32e6ed1b 100644
--- a/src/api/types/PermissionType.ts
+++ b/src/api/types/PermissionType.ts
@@ -35,5 +35,6 @@ export const PermissionType = {
PublishVoiceToVoiceLibrary: "publish_voice_to_voice_library",
ShareVoiceExternally: "share_voice_externally",
CreateUserApiKey: "create_user_api_key",
+ WorkspaceAnalyticsFullRead: "workspace_analytics_full_read",
} as const;
export type PermissionType = (typeof PermissionType)[keyof typeof PermissionType];
diff --git a/src/api/types/ProjectCreationMetaResponseModelType.ts b/src/api/types/ProjectCreationMetaResponseModelType.ts
index d1db4cac..4b055586 100644
--- a/src/api/types/ProjectCreationMetaResponseModelType.ts
+++ b/src/api/types/ProjectCreationMetaResponseModelType.ts
@@ -5,6 +5,7 @@ export const ProjectCreationMetaResponseModelType = {
Blank: "blank",
GeneratePodcast: "generate_podcast",
AutoAssignVoices: "auto_assign_voices",
+ DubVideo: "dub_video",
} as const;
export type ProjectCreationMetaResponseModelType =
(typeof ProjectCreationMetaResponseModelType)[keyof typeof ProjectCreationMetaResponseModelType];
diff --git a/src/api/types/ProjectExtendedResponse.ts b/src/api/types/ProjectExtendedResponse.ts
index f07bca14..e48264de 100644
--- a/src/api/types/ProjectExtendedResponse.ts
+++ b/src/api/types/ProjectExtendedResponse.ts
@@ -65,6 +65,8 @@ export interface ProjectExtendedResponse {
captionsEnabled?: boolean;
/** Global styling to be applied to all captions */
captionStyle?: ElevenLabs.CaptionStyleModel;
+ /** Styling changes that have been made to the provided templates */
+ captionStyleTemplateOverrides?: Record;
/** The public share ID of the project. */
publicShareId?: string;
/** The aspect ratio of the project. */
diff --git a/src/api/types/ProjectResponse.ts b/src/api/types/ProjectResponse.ts
index 9eda5dec..178b9ce5 100644
--- a/src/api/types/ProjectResponse.ts
+++ b/src/api/types/ProjectResponse.ts
@@ -65,6 +65,8 @@ export interface ProjectResponse {
captionsEnabled?: boolean;
/** Global styling to be applied to all captions */
captionStyle?: ElevenLabs.CaptionStyleModel;
+ /** Styling changes that have been made to the provided templates */
+ captionStyleTemplateOverrides?: Record;
/** The public share ID of the project. */
publicShareId?: string;
/** The aspect ratio of the project. */
diff --git a/src/api/types/SeatType.ts b/src/api/types/SeatType.ts
new file mode 100644
index 00000000..67010014
--- /dev/null
+++ b/src/api/types/SeatType.ts
@@ -0,0 +1,7 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const SeatType = {
+ WorkspaceAdmin: "workspace_admin",
+ WorkspaceMember: "workspace_member",
+} as const;
+export type SeatType = (typeof SeatType)[keyof typeof SeatType];
diff --git a/src/api/types/SongMetadata.ts b/src/api/types/SongMetadata.ts
index 8168d702..50d66928 100644
--- a/src/api/types/SongMetadata.ts
+++ b/src/api/types/SongMetadata.ts
@@ -11,4 +11,8 @@ export interface SongMetadata {
languages: string[];
/** Whether the song is explicit */
isExplicit?: boolean;
+ /** The BPM of the song */
+ bpm?: number;
+ /** The time signature of the song */
+ timeSignature?: string;
}
diff --git a/src/api/types/ToolSortBy.ts b/src/api/types/ToolSortBy.ts
new file mode 100644
index 00000000..f0b1904b
--- /dev/null
+++ b/src/api/types/ToolSortBy.ts
@@ -0,0 +1,7 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const ToolSortBy = {
+ Name: "name",
+ CreatedAt: "created_at",
+} as const;
+export type ToolSortBy = (typeof ToolSortBy)[keyof typeof ToolSortBy];
diff --git a/src/api/types/ToolTypeFilter.ts b/src/api/types/ToolTypeFilter.ts
new file mode 100644
index 00000000..15b345b1
--- /dev/null
+++ b/src/api/types/ToolTypeFilter.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const ToolTypeFilter = {
+ Webhook: "webhook",
+ Client: "client",
+ ApiIntegrationWebhook: "api_integration_webhook",
+} as const;
+export type ToolTypeFilter = (typeof ToolTypeFilter)[keyof typeof ToolTypeFilter];
diff --git a/src/api/types/ToolsResponseModel.ts b/src/api/types/ToolsResponseModel.ts
index 35ef27ba..157a3fad 100644
--- a/src/api/types/ToolsResponseModel.ts
+++ b/src/api/types/ToolsResponseModel.ts
@@ -4,4 +4,6 @@ import type * as ElevenLabs from "../index";
export interface ToolsResponseModel {
tools: ElevenLabs.ToolResponseModel[];
+ nextCursor?: string;
+ hasMore: boolean;
}
diff --git a/src/api/types/index.ts b/src/api/types/index.ts
index 6db61a47..d6905f1d 100644
--- a/src/api/types/index.ts
+++ b/src/api/types/index.ts
@@ -13,6 +13,9 @@ export * from "./AddWorkspaceGroupMemberResponseModel";
export * from "./AddWorkspaceInviteResponseModel";
export * from "./AdhocAgentConfigOverrideForTestRequestModel";
export * from "./Age";
+export * from "./AgentBranchBasicInfo";
+export * from "./AgentBranchResponse";
+export * from "./AgentBranchSummary";
export * from "./AgentCallLimits";
export * from "./AgentConfig";
export * from "./AgentConfigApiModelWorkflowOverrideInput";
@@ -21,6 +24,10 @@ export * from "./AgentConfigOverrideConfig";
export * from "./AgentConfigOverrideInput";
export * from "./AgentConfigOverrideOutput";
export * from "./AgentDefinitionSource";
+export * from "./AgentDeploymentPercentageStrategy";
+export * from "./AgentDeploymentRequest";
+export * from "./AgentDeploymentRequestItem";
+export * from "./AgentDeploymentResponse";
export * from "./AgentFailureResponseExample";
export * from "./AgentMetadata";
export * from "./AgentMetadataResponseModel";
@@ -33,6 +40,8 @@ export * from "./AgentSummaryBatchSuccessfulResponseModel";
export * from "./AgentSummaryResponseModel";
export * from "./AgentTestingSettings";
export * from "./AgentTransfer";
+export * from "./AgentVersionMetadata";
+export * from "./AgentVersionParents";
export * from "./AgentWorkflowRequestModel";
export * from "./AgentWorkflowRequestModelNodesValue";
export * from "./AgentWorkflowResponseModel";
@@ -136,6 +145,7 @@ export * from "./BatchFailureResponseModel";
export * from "./BillingPeriod";
export * from "./BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge";
export * from "./BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender";
+export * from "./BranchProtectionStatus";
export * from "./BreakdownTypes";
export * from "./BuiltInToolsInput";
export * from "./BuiltInToolsOutput";
@@ -268,6 +278,7 @@ export * from "./ConversationTokenPurpose";
export * from "./ConversationTurnMetrics";
export * from "./ConvertChapterResponseModel";
export * from "./ConvertProjectResponseModel";
+export * from "./CreateAgentBranchResponseModel";
export * from "./CreateAgentResponseModel";
export * from "./CreateAudioNativeProjectRequest";
export * from "./CreatePhoneNumberResponseModel";
@@ -462,6 +473,7 @@ export * from "./LanguageResponse";
export * from "./LibraryVoiceResponse";
export * from "./LibraryVoiceResponseModelCategory";
export * from "./ListMcpToolsResponseModel";
+export * from "./ListResponseAgentBranchSummary";
export * from "./ListResponseMeta";
export * from "./ListWhatsAppAccountsResponse";
export * from "./LiteralJsonSchemaProperty";
@@ -646,6 +658,7 @@ export * from "./SafetyRule";
export * from "./SampleConfigDbModel";
export * from "./SampleConfigDbModelParentType";
export * from "./SaveVoicePreviewRequest";
+export * from "./SeatType";
export * from "./SecretDependencyType";
export * from "./SectionSource";
export * from "./SegmentCreateResponse";
@@ -741,8 +754,10 @@ export * from "./ToolRequestModel";
export * from "./ToolRequestModelToolConfig";
export * from "./ToolResponseModel";
export * from "./ToolResponseModelToolConfig";
+export * from "./ToolSortBy";
export * from "./ToolsResponseModel";
export * from "./ToolType";
+export * from "./ToolTypeFilter";
export * from "./ToolUsageStatsResponseModel";
export * from "./TransferToAgentToolConfig";
export * from "./TransferToAgentToolResultErrorModel";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/index.ts
new file mode 100644
index 00000000..415726b7
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost.ts
new file mode 100644
index 00000000..8d009289
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost.ts
@@ -0,0 +1,35 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../../api/index";
+import * as core from "../../../../../../../../../core";
+import type * as serializers from "../../../../../../../../index";
+import { AgentWorkflowRequestModel } from "../../../../../../../../types/AgentWorkflowRequestModel";
+
+export const BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost: core.serialization.Schema<
+ serializers.conversationalAi.agents.BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost.Raw,
+ ElevenLabs.conversationalAi.agents.BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost
+> = core.serialization.object({
+ parentVersionId: core.serialization.property("parent_version_id", core.serialization.string()),
+ name: core.serialization.string(),
+ description: core.serialization.string(),
+ conversationConfig: core.serialization.property(
+ "conversation_config",
+ core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
+ ),
+ platformSettings: core.serialization.property(
+ "platform_settings",
+ core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
+ ),
+ workflow: AgentWorkflowRequestModel.optional(),
+});
+
+export declare namespace BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost {
+ export interface Raw {
+ parent_version_id: string;
+ name: string;
+ description: string;
+ conversation_config?: Record | null;
+ platform_settings?: Record | null;
+ workflow?: AgentWorkflowRequestModel.Raw | null;
+ }
+}
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost.ts
new file mode 100644
index 00000000..8cc90379
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost.ts
@@ -0,0 +1,21 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../../api/index";
+import * as core from "../../../../../../../../../core";
+import type * as serializers from "../../../../../../../../index";
+
+export const BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost: core.serialization.Schema<
+ serializers.conversationalAi.agents.BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost.Raw,
+ Omit<
+ ElevenLabs.conversationalAi.agents.BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost,
+ "targetBranchId"
+ >
+> = core.serialization.object({
+ archiveSourceBranch: core.serialization.property("archive_source_branch", core.serialization.boolean().optional()),
+});
+
+export declare namespace BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost {
+ export interface Raw {
+ archive_source_branch?: boolean | null;
+ }
+}
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.ts
new file mode 100644
index 00000000..76a710c1
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.ts
@@ -0,0 +1,21 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../../api/index";
+import * as core from "../../../../../../../../../core";
+import type * as serializers from "../../../../../../../../index";
+import { BranchProtectionStatus } from "../../../../../../../../types/BranchProtectionStatus";
+
+export const BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch: core.serialization.Schema<
+ serializers.conversationalAi.agents.BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.Raw,
+ ElevenLabs.conversationalAi.agents.BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch
+> = core.serialization.object({
+ isArchived: core.serialization.property("is_archived", core.serialization.boolean().optional()),
+ protectionStatus: core.serialization.property("protection_status", BranchProtectionStatus.optional()),
+});
+
+export declare namespace BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch {
+ export interface Raw {
+ is_archived?: boolean | null;
+ protection_status?: BranchProtectionStatus.Raw | null;
+ }
+}
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/index.ts
new file mode 100644
index 00000000..45129248
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/index.ts
@@ -0,0 +1,3 @@
+export { BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost } from "./BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost";
+export { BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost } from "./BodyMergeABranchIntoATargetBranchV1ConvaiAgentsAgentIdBranchesSourceBranchIdMergePost";
+export { BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch } from "./BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/branches/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/index.ts
new file mode 100644
index 00000000..5ec76921
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/branches/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/index.ts
new file mode 100644
index 00000000..415726b7
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/requests/BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/requests/BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost.ts
new file mode 100644
index 00000000..1061bd86
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/requests/BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost.ts
@@ -0,0 +1,19 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../../api/index";
+import * as core from "../../../../../../../../../core";
+import type * as serializers from "../../../../../../../../index";
+import { AgentDeploymentRequest } from "../../../../../../../../types/AgentDeploymentRequest";
+
+export const BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost: core.serialization.Schema<
+ serializers.conversationalAi.agents.BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost.Raw,
+ ElevenLabs.conversationalAi.agents.BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost
+> = core.serialization.object({
+ deploymentRequest: core.serialization.property("deployment_request", AgentDeploymentRequest),
+});
+
+export declare namespace BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost {
+ export interface Raw {
+ deployment_request: AgentDeploymentRequest.Raw;
+ }
+}
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/requests/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/requests/index.ts
new file mode 100644
index 00000000..f91a626f
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/client/requests/index.ts
@@ -0,0 +1 @@
+export { BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost } from "./BodyCreateOrUpdateDeploymentsV1ConvaiAgentsAgentIdDeploymentsPost";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/index.ts
new file mode 100644
index 00000000..5ec76921
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/deployments/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/index.ts
new file mode 100644
index 00000000..415726b7
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/index.ts
@@ -0,0 +1 @@
+export * from "./requests";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/requests/BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/requests/BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost.ts
new file mode 100644
index 00000000..7f8c4209
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/requests/BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost.ts
@@ -0,0 +1,33 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../../api/index";
+import * as core from "../../../../../../../../../core";
+import type * as serializers from "../../../../../../../../index";
+import { AgentWorkflowRequestModel } from "../../../../../../../../types/AgentWorkflowRequestModel";
+
+export const BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost: core.serialization.Schema<
+ serializers.conversationalAi.agents.BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost.Raw,
+ Omit
+> = core.serialization.object({
+ conversationConfig: core.serialization.property(
+ "conversation_config",
+ core.serialization.record(core.serialization.string(), core.serialization.unknown()),
+ ),
+ platformSettings: core.serialization.property(
+ "platform_settings",
+ core.serialization.record(core.serialization.string(), core.serialization.unknown()),
+ ),
+ workflow: AgentWorkflowRequestModel,
+ name: core.serialization.string(),
+ tags: core.serialization.list(core.serialization.string()).optional(),
+});
+
+export declare namespace BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost {
+ export interface Raw {
+ conversation_config: Record;
+ platform_settings: Record;
+ workflow: AgentWorkflowRequestModel.Raw;
+ name: string;
+ tags?: string[] | null;
+ }
+}
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/requests/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/requests/index.ts
new file mode 100644
index 00000000..7cd6483b
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/client/requests/index.ts
@@ -0,0 +1 @@
+export { BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost } from "./BodyCreateAgentDraftV1ConvaiAgentsAgentIdDraftsPost";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/index.ts
new file mode 100644
index 00000000..5ec76921
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/drafts/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/serialization/resources/conversationalAi/resources/agents/resources/index.ts b/src/serialization/resources/conversationalAi/resources/agents/resources/index.ts
index fd38122c..44ece9db 100644
--- a/src/serialization/resources/conversationalAi/resources/agents/resources/index.ts
+++ b/src/serialization/resources/conversationalAi/resources/agents/resources/index.ts
@@ -1,3 +1,9 @@
+export * as branches from "./branches";
+export * from "./branches/client/requests";
+export * as deployments from "./deployments";
+export * from "./deployments/client/requests";
+export * as drafts from "./drafts";
+export * from "./drafts/client/requests";
export * as llmUsage from "./llmUsage";
export * from "./llmUsage/client/requests";
export * as summaries from "./summaries";
diff --git a/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost.ts b/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost.ts
new file mode 100644
index 00000000..e36efb44
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost.ts
@@ -0,0 +1,20 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../../api/index";
+import * as core from "../../../../../../../../../core";
+import type * as serializers from "../../../../../../../../index";
+
+export const BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost: core.serialization.Schema<
+ serializers.conversationalAi.knowledgeBase.BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost.Raw,
+ ElevenLabs.conversationalAi.knowledgeBase.BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost
+> = core.serialization.object({
+ documentIds: core.serialization.property("document_ids", core.serialization.list(core.serialization.string())),
+ moveTo: core.serialization.property("move_to", core.serialization.string().optional()),
+});
+
+export declare namespace BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost {
+ export interface Raw {
+ document_ids: string[];
+ move_to?: string | null;
+ }
+}
diff --git a/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost.ts b/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost.ts
new file mode 100644
index 00000000..b627d984
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost.ts
@@ -0,0 +1,20 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../../api/index";
+import * as core from "../../../../../../../../../core";
+import type * as serializers from "../../../../../../../../index";
+
+export const BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost: core.serialization.Schema<
+ serializers.conversationalAi.knowledgeBase.BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost.Raw,
+ ElevenLabs.conversationalAi.knowledgeBase.BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost
+> = core.serialization.object({
+ name: core.serialization.string(),
+ parentFolderId: core.serialization.property("parent_folder_id", core.serialization.string().optional()),
+});
+
+export declare namespace BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost {
+ export interface Raw {
+ name: string;
+ parent_folder_id?: string | null;
+ }
+}
diff --git a/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost.ts b/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost.ts
new file mode 100644
index 00000000..71ac3ace
--- /dev/null
+++ b/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost.ts
@@ -0,0 +1,18 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../../../../../../../../api/index";
+import * as core from "../../../../../../../../../core";
+import type * as serializers from "../../../../../../../../index";
+
+export const BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost: core.serialization.Schema<
+ serializers.conversationalAi.knowledgeBase.BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost.Raw,
+ ElevenLabs.conversationalAi.knowledgeBase.BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost
+> = core.serialization.object({
+ moveTo: core.serialization.property("move_to", core.serialization.string().optional()),
+});
+
+export declare namespace BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost {
+ export interface Raw {
+ move_to?: string | null;
+ }
+}
diff --git a/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.ts b/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.ts
index d82ab458..c6f8c1f8 100644
--- a/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.ts
+++ b/src/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.ts
@@ -1,3 +1,6 @@
+export { BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost } from "./BodyBulkMoveEntitiesToFolderV1ConvaiKnowledgeBaseBulkMovePost";
+export { BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost } from "./BodyCreateFolderV1ConvaiKnowledgeBaseFolderPost";
export { BodyCreateTextDocumentV1ConvaiKnowledgeBaseTextPost } from "./BodyCreateTextDocumentV1ConvaiKnowledgeBaseTextPost";
export { BodyCreateUrlDocumentV1ConvaiKnowledgeBaseUrlPost } from "./BodyCreateUrlDocumentV1ConvaiKnowledgeBaseUrlPost";
+export { BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost } from "./BodyMoveEntityToFolderV1ConvaiKnowledgeBaseDocumentIdMovePost";
export { BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch } from "./BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch";
diff --git a/src/serialization/resources/workspace/resources/index.ts b/src/serialization/resources/workspace/resources/index.ts
index 138aba5f..d6e1abf8 100644
--- a/src/serialization/resources/workspace/resources/index.ts
+++ b/src/serialization/resources/workspace/resources/index.ts
@@ -1,10 +1,8 @@
export * as groups from "./groups";
export * as invites from "./invites";
export * from "./invites/client/requests";
-export * from "./invites/types";
export * as members from "./members";
export * from "./members/client/requests";
-export * from "./members/types";
export * as resources from "./resources";
export * from "./resources/client/requests";
export * from "./resources/types";
diff --git a/src/serialization/resources/workspace/resources/invites/client/requests/InviteUserRequest.ts b/src/serialization/resources/workspace/resources/invites/client/requests/InviteUserRequest.ts
index c68dc4fc..885e9bca 100644
--- a/src/serialization/resources/workspace/resources/invites/client/requests/InviteUserRequest.ts
+++ b/src/serialization/resources/workspace/resources/invites/client/requests/InviteUserRequest.ts
@@ -3,24 +3,23 @@
import type * as ElevenLabs from "../../../../../../../api/index";
import * as core from "../../../../../../../core";
import type * as serializers from "../../../../../../index";
-import { BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission } from "../../types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission";
+import { SeatType } from "../../../../../../types/SeatType";
export const InviteUserRequest: core.serialization.Schema<
serializers.workspace.InviteUserRequest.Raw,
ElevenLabs.workspace.InviteUserRequest
> = core.serialization.object({
email: core.serialization.string(),
+ workspacePermission: core.serialization.property("workspace_permission", core.serialization.string().optional()),
+ seatType: core.serialization.property("seat_type", SeatType.optional()),
groupIds: core.serialization.property("group_ids", core.serialization.list(core.serialization.string()).optional()),
- workspacePermission: core.serialization.property(
- "workspace_permission",
- BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.optional(),
- ),
});
export declare namespace InviteUserRequest {
export interface Raw {
email: string;
+ workspace_permission?: string | null;
+ seat_type?: SeatType.Raw | null;
group_ids?: string[] | null;
- workspace_permission?: BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.Raw | null;
}
}
diff --git a/src/serialization/resources/workspace/resources/invites/index.ts b/src/serialization/resources/workspace/resources/invites/index.ts
index d2ec2302..5ec76921 100644
--- a/src/serialization/resources/workspace/resources/invites/index.ts
+++ b/src/serialization/resources/workspace/resources/invites/index.ts
@@ -1,2 +1 @@
export * from "./client";
-export * from "./types";
diff --git a/src/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.ts b/src/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.ts
deleted file mode 100644
index 28e65a02..00000000
--- a/src/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-import type * as ElevenLabs from "../../../../../../api/index";
-import * as core from "../../../../../../core";
-import type * as serializers from "../../../../../index";
-
-export const BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission: core.serialization.Schema<
- serializers.workspace.BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.Raw,
- ElevenLabs.workspace.BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission
-> = core.serialization.enum_([
- "external",
- "admin",
- "workspace_admin",
- "workspace_member",
- "support_l1",
- "support_l2",
- "moderator",
- "sales",
- "voice_mixer",
- "voice_admin",
- "convai_admin",
- "enterprise_viewer",
- "quality_check_admin",
- "workspace_migration_admin",
- "human_reviewer",
- "productions_admin",
- "support",
- "internal",
-]);
-
-export declare namespace BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission {
- export type Raw =
- | "external"
- | "admin"
- | "workspace_admin"
- | "workspace_member"
- | "support_l1"
- | "support_l2"
- | "moderator"
- | "sales"
- | "voice_mixer"
- | "voice_admin"
- | "convai_admin"
- | "enterprise_viewer"
- | "quality_check_admin"
- | "workspace_migration_admin"
- | "human_reviewer"
- | "productions_admin"
- | "support"
- | "internal";
-}
diff --git a/src/serialization/resources/workspace/resources/invites/types/index.ts b/src/serialization/resources/workspace/resources/invites/types/index.ts
deleted file mode 100644
index 95a2e8b5..00000000
--- a/src/serialization/resources/workspace/resources/invites/types/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission";
diff --git a/src/serialization/resources/workspace/resources/members/client/requests/UpdateMemberRequest.ts b/src/serialization/resources/workspace/resources/members/client/requests/UpdateMemberRequest.ts
index 7a87dc4e..49f609ae 100644
--- a/src/serialization/resources/workspace/resources/members/client/requests/UpdateMemberRequest.ts
+++ b/src/serialization/resources/workspace/resources/members/client/requests/UpdateMemberRequest.ts
@@ -3,7 +3,7 @@
import type * as ElevenLabs from "../../../../../../../api/index";
import * as core from "../../../../../../../core";
import type * as serializers from "../../../../../../index";
-import { BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole } from "../../types/BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole";
+import { SeatType } from "../../../../../../types/SeatType";
export const UpdateMemberRequest: core.serialization.Schema<
serializers.workspace.UpdateMemberRequest.Raw,
@@ -11,16 +11,15 @@ export const UpdateMemberRequest: core.serialization.Schema<
> = core.serialization.object({
email: core.serialization.string(),
isLocked: core.serialization.property("is_locked", core.serialization.boolean().optional()),
- workspaceRole: core.serialization.property(
- "workspace_role",
- BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.optional(),
- ),
+ workspaceRole: core.serialization.property("workspace_role", SeatType.optional()),
+ workspaceSeatType: core.serialization.property("workspace_seat_type", SeatType.optional()),
});
export declare namespace UpdateMemberRequest {
export interface Raw {
email: string;
is_locked?: boolean | null;
- workspace_role?: BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.Raw | null;
+ workspace_role?: SeatType.Raw | null;
+ workspace_seat_type?: SeatType.Raw | null;
}
}
diff --git a/src/serialization/resources/workspace/resources/members/index.ts b/src/serialization/resources/workspace/resources/members/index.ts
index d2ec2302..5ec76921 100644
--- a/src/serialization/resources/workspace/resources/members/index.ts
+++ b/src/serialization/resources/workspace/resources/members/index.ts
@@ -1,2 +1 @@
export * from "./client";
-export * from "./types";
diff --git a/src/serialization/resources/workspace/resources/members/types/BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.ts b/src/serialization/resources/workspace/resources/members/types/BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.ts
deleted file mode 100644
index 90518b95..00000000
--- a/src/serialization/resources/workspace/resources/members/types/BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-import type * as ElevenLabs from "../../../../../../api/index";
-import * as core from "../../../../../../core";
-import type * as serializers from "../../../../../index";
-
-export const BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole: core.serialization.Schema<
- serializers.workspace.BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole.Raw,
- ElevenLabs.workspace.BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole
-> = core.serialization.enum_(["workspace_admin", "workspace_member"]);
-
-export declare namespace BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole {
- export type Raw = "workspace_admin" | "workspace_member";
-}
diff --git a/src/serialization/resources/workspace/resources/members/types/index.ts b/src/serialization/resources/workspace/resources/members/types/index.ts
deleted file mode 100644
index 30a32ea4..00000000
--- a/src/serialization/resources/workspace/resources/members/types/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./BodyUpdateMemberV1WorkspaceMembersPostWorkspaceRole";
diff --git a/src/serialization/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.ts b/src/serialization/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.ts
deleted file mode 100644
index 8ba6a36a..00000000
--- a/src/serialization/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-import type * as ElevenLabs from "../../../../../../../api/index";
-import * as core from "../../../../../../../core";
-import type * as serializers from "../../../../../../index";
-import { WorkspaceResourceType } from "../../../../../../types/WorkspaceResourceType";
-
-export const BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost: core.serialization.Schema<
- serializers.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.Raw,
- ElevenLabs.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost
-> = core.serialization.object({
- resourceType: core.serialization.property("resource_type", WorkspaceResourceType),
- targetUserId: core.serialization.property("target_user_id", core.serialization.string()),
-});
-
-export declare namespace BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost {
- export interface Raw {
- resource_type: WorkspaceResourceType.Raw;
- target_user_id: string;
- }
-}
diff --git a/src/serialization/resources/workspace/resources/resources/client/requests/index.ts b/src/serialization/resources/workspace/resources/resources/client/requests/index.ts
index 6d2921f4..f81885a8 100644
--- a/src/serialization/resources/workspace/resources/resources/client/requests/index.ts
+++ b/src/serialization/resources/workspace/resources/resources/client/requests/index.ts
@@ -1,3 +1,2 @@
-export { BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost } from "./BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost";
export { BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePost } from "./BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePost";
export { BodyUnshareWorkspaceResourceV1WorkspaceResourcesResourceIdUnsharePost } from "./BodyUnshareWorkspaceResourceV1WorkspaceResourcesResourceIdUnsharePost";
diff --git a/src/serialization/types/AgentBranchBasicInfo.ts b/src/serialization/types/AgentBranchBasicInfo.ts
new file mode 100644
index 00000000..bcc987f1
--- /dev/null
+++ b/src/serialization/types/AgentBranchBasicInfo.ts
@@ -0,0 +1,20 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+
+export const AgentBranchBasicInfo: core.serialization.ObjectSchema<
+ serializers.AgentBranchBasicInfo.Raw,
+ ElevenLabs.AgentBranchBasicInfo
+> = core.serialization.object({
+ id: core.serialization.string(),
+ name: core.serialization.string(),
+});
+
+export declare namespace AgentBranchBasicInfo {
+ export interface Raw {
+ id: string;
+ name: string;
+ }
+}
diff --git a/src/serialization/types/AgentBranchResponse.ts b/src/serialization/types/AgentBranchResponse.ts
new file mode 100644
index 00000000..59bdc256
--- /dev/null
+++ b/src/serialization/types/AgentBranchResponse.ts
@@ -0,0 +1,50 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+import { AgentBranchBasicInfo } from "./AgentBranchBasicInfo";
+import { AgentVersionMetadata } from "./AgentVersionMetadata";
+import { BranchProtectionStatus } from "./BranchProtectionStatus";
+import { ResourceAccessInfo } from "./ResourceAccessInfo";
+
+export const AgentBranchResponse: core.serialization.ObjectSchema<
+ serializers.AgentBranchResponse.Raw,
+ ElevenLabs.AgentBranchResponse
+> = core.serialization.object({
+ id: core.serialization.string(),
+ name: core.serialization.string(),
+ agentId: core.serialization.property("agent_id", core.serialization.string()),
+ description: core.serialization.string(),
+ createdAt: core.serialization.property("created_at", core.serialization.number()),
+ lastCommittedAt: core.serialization.property("last_committed_at", core.serialization.number()),
+ isArchived: core.serialization.property("is_archived", core.serialization.boolean()),
+ protectionStatus: core.serialization.property("protection_status", BranchProtectionStatus.optional()),
+ accessInfo: core.serialization.property("access_info", ResourceAccessInfo.optional()),
+ currentLivePercentage: core.serialization.property(
+ "current_live_percentage",
+ core.serialization.number().optional(),
+ ),
+ parentBranch: core.serialization.property("parent_branch", AgentBranchBasicInfo.optional()),
+ mostRecentVersions: core.serialization.property(
+ "most_recent_versions",
+ core.serialization.list(AgentVersionMetadata).optional(),
+ ),
+});
+
+export declare namespace AgentBranchResponse {
+ export interface Raw {
+ id: string;
+ name: string;
+ agent_id: string;
+ description: string;
+ created_at: number;
+ last_committed_at: number;
+ is_archived: boolean;
+ protection_status?: BranchProtectionStatus.Raw | null;
+ access_info?: ResourceAccessInfo.Raw | null;
+ current_live_percentage?: number | null;
+ parent_branch?: AgentBranchBasicInfo.Raw | null;
+ most_recent_versions?: AgentVersionMetadata.Raw[] | null;
+ }
+}
diff --git a/src/serialization/types/AgentBranchSummary.ts b/src/serialization/types/AgentBranchSummary.ts
new file mode 100644
index 00000000..3e3b7aab
--- /dev/null
+++ b/src/serialization/types/AgentBranchSummary.ts
@@ -0,0 +1,43 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+import { BranchProtectionStatus } from "./BranchProtectionStatus";
+import { ResourceAccessInfo } from "./ResourceAccessInfo";
+
+export const AgentBranchSummary: core.serialization.ObjectSchema<
+ serializers.AgentBranchSummary.Raw,
+ ElevenLabs.AgentBranchSummary
+> = core.serialization.object({
+ id: core.serialization.string(),
+ name: core.serialization.string(),
+ agentId: core.serialization.property("agent_id", core.serialization.string()),
+ description: core.serialization.string(),
+ createdAt: core.serialization.property("created_at", core.serialization.number()),
+ lastCommittedAt: core.serialization.property("last_committed_at", core.serialization.number()),
+ isArchived: core.serialization.property("is_archived", core.serialization.boolean()),
+ protectionStatus: core.serialization.property("protection_status", BranchProtectionStatus.optional()),
+ accessInfo: core.serialization.property("access_info", ResourceAccessInfo.optional()),
+ currentLivePercentage: core.serialization.property(
+ "current_live_percentage",
+ core.serialization.number().optional(),
+ ),
+ draftExists: core.serialization.property("draft_exists", core.serialization.boolean().optional()),
+});
+
+export declare namespace AgentBranchSummary {
+ export interface Raw {
+ id: string;
+ name: string;
+ agent_id: string;
+ description: string;
+ created_at: number;
+ last_committed_at: number;
+ is_archived: boolean;
+ protection_status?: BranchProtectionStatus.Raw | null;
+ access_info?: ResourceAccessInfo.Raw | null;
+ current_live_percentage?: number | null;
+ draft_exists?: boolean | null;
+ }
+}
diff --git a/src/serialization/types/AgentDeploymentPercentageStrategy.ts b/src/serialization/types/AgentDeploymentPercentageStrategy.ts
new file mode 100644
index 00000000..77728d82
--- /dev/null
+++ b/src/serialization/types/AgentDeploymentPercentageStrategy.ts
@@ -0,0 +1,20 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+
+export const AgentDeploymentPercentageStrategy: core.serialization.ObjectSchema<
+ serializers.AgentDeploymentPercentageStrategy.Raw,
+ ElevenLabs.AgentDeploymentPercentageStrategy
+> = core.serialization.object({
+ type: core.serialization.stringLiteral("percentage").optional(),
+ trafficPercentage: core.serialization.property("traffic_percentage", core.serialization.number()),
+});
+
+export declare namespace AgentDeploymentPercentageStrategy {
+ export interface Raw {
+ type?: "percentage" | null;
+ traffic_percentage: number;
+ }
+}
diff --git a/src/serialization/types/AgentDeploymentRequest.ts b/src/serialization/types/AgentDeploymentRequest.ts
new file mode 100644
index 00000000..418a20e9
--- /dev/null
+++ b/src/serialization/types/AgentDeploymentRequest.ts
@@ -0,0 +1,19 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+import { AgentDeploymentRequestItem } from "./AgentDeploymentRequestItem";
+
+export const AgentDeploymentRequest: core.serialization.ObjectSchema<
+ serializers.AgentDeploymentRequest.Raw,
+ ElevenLabs.AgentDeploymentRequest
+> = core.serialization.object({
+ requests: core.serialization.list(AgentDeploymentRequestItem),
+});
+
+export declare namespace AgentDeploymentRequest {
+ export interface Raw {
+ requests: AgentDeploymentRequestItem.Raw[];
+ }
+}
diff --git a/src/serialization/types/AgentDeploymentRequestItem.ts b/src/serialization/types/AgentDeploymentRequestItem.ts
new file mode 100644
index 00000000..62c42cc7
--- /dev/null
+++ b/src/serialization/types/AgentDeploymentRequestItem.ts
@@ -0,0 +1,21 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+import { AgentDeploymentPercentageStrategy } from "./AgentDeploymentPercentageStrategy";
+
+export const AgentDeploymentRequestItem: core.serialization.ObjectSchema<
+ serializers.AgentDeploymentRequestItem.Raw,
+ ElevenLabs.AgentDeploymentRequestItem
+> = core.serialization.object({
+ branchId: core.serialization.property("branch_id", core.serialization.string()),
+ deploymentStrategy: core.serialization.property("deployment_strategy", AgentDeploymentPercentageStrategy),
+});
+
+export declare namespace AgentDeploymentRequestItem {
+ export interface Raw {
+ branch_id: string;
+ deployment_strategy: AgentDeploymentPercentageStrategy.Raw;
+ }
+}
diff --git a/src/serialization/types/AgentDeploymentResponse.ts b/src/serialization/types/AgentDeploymentResponse.ts
new file mode 100644
index 00000000..0bcb1888
--- /dev/null
+++ b/src/serialization/types/AgentDeploymentResponse.ts
@@ -0,0 +1,21 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+
+export const AgentDeploymentResponse: core.serialization.ObjectSchema<
+ serializers.AgentDeploymentResponse.Raw,
+ ElevenLabs.AgentDeploymentResponse
+> = core.serialization.object({
+ trafficPercentageBranchIdMap: core.serialization.property(
+ "traffic_percentage_branch_id_map",
+ core.serialization.record(core.serialization.string(), core.serialization.number()).optional(),
+ ),
+});
+
+export declare namespace AgentDeploymentResponse {
+ export interface Raw {
+ traffic_percentage_branch_id_map?: Record | null;
+ }
+}
diff --git a/src/serialization/types/AgentVersionMetadata.ts b/src/serialization/types/AgentVersionMetadata.ts
new file mode 100644
index 00000000..04b7bee2
--- /dev/null
+++ b/src/serialization/types/AgentVersionMetadata.ts
@@ -0,0 +1,34 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+import { AgentVersionParents } from "./AgentVersionParents";
+import { ResourceAccessInfo } from "./ResourceAccessInfo";
+
+export const AgentVersionMetadata: core.serialization.ObjectSchema<
+ serializers.AgentVersionMetadata.Raw,
+ ElevenLabs.AgentVersionMetadata
+> = core.serialization.object({
+ id: core.serialization.string(),
+ agentId: core.serialization.property("agent_id", core.serialization.string()),
+ branchId: core.serialization.property("branch_id", core.serialization.string()),
+ versionDescription: core.serialization.property("version_description", core.serialization.string()),
+ seqNoInBranch: core.serialization.property("seq_no_in_branch", core.serialization.number()),
+ timeCommittedSecs: core.serialization.property("time_committed_secs", core.serialization.number()),
+ parents: AgentVersionParents,
+ accessInfo: core.serialization.property("access_info", ResourceAccessInfo.optional()),
+});
+
+export declare namespace AgentVersionMetadata {
+ export interface Raw {
+ id: string;
+ agent_id: string;
+ branch_id: string;
+ version_description: string;
+ seq_no_in_branch: number;
+ time_committed_secs: number;
+ parents: AgentVersionParents.Raw;
+ access_info?: ResourceAccessInfo.Raw | null;
+ }
+}
diff --git a/src/serialization/types/AgentVersionParents.ts b/src/serialization/types/AgentVersionParents.ts
new file mode 100644
index 00000000..f0e1468f
--- /dev/null
+++ b/src/serialization/types/AgentVersionParents.ts
@@ -0,0 +1,24 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+
+export const AgentVersionParents: core.serialization.ObjectSchema<
+ serializers.AgentVersionParents.Raw,
+ ElevenLabs.AgentVersionParents
+> = core.serialization.object({
+ inBranchParentId: core.serialization.property("in_branch_parent_id", core.serialization.string().optional()),
+ outOfBranchParentId: core.serialization.property("out_of_branch_parent_id", core.serialization.string().optional()),
+ mergedIntoBranchId: core.serialization.property("merged_into_branch_id", core.serialization.string().optional()),
+ mergedFromBranchId: core.serialization.property("merged_from_branch_id", core.serialization.string().optional()),
+});
+
+export declare namespace AgentVersionParents {
+ export interface Raw {
+ in_branch_parent_id?: string | null;
+ out_of_branch_parent_id?: string | null;
+ merged_into_branch_id?: string | null;
+ merged_from_branch_id?: string | null;
+ }
+}
diff --git a/src/serialization/types/BranchProtectionStatus.ts b/src/serialization/types/BranchProtectionStatus.ts
new file mode 100644
index 00000000..cd12a4f0
--- /dev/null
+++ b/src/serialization/types/BranchProtectionStatus.ts
@@ -0,0 +1,14 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+
+export const BranchProtectionStatus: core.serialization.Schema<
+ serializers.BranchProtectionStatus.Raw,
+ ElevenLabs.BranchProtectionStatus
+> = core.serialization.enum_(["writer_perms_required", "admin_perms_required"]);
+
+export declare namespace BranchProtectionStatus {
+ export type Raw = "writer_perms_required" | "admin_perms_required";
+}
diff --git a/src/serialization/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.ts b/src/serialization/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.ts
index 47e1315e..be899205 100644
--- a/src/serialization/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.ts
+++ b/src/serialization/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.ts
@@ -15,6 +15,7 @@ export const ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommon
isError: core.serialization.property("is_error", core.serialization.boolean()),
toolHasBeenCalled: core.serialization.property("tool_has_been_called", core.serialization.boolean()),
toolLatencySecs: core.serialization.property("tool_latency_secs", core.serialization.number().optional()),
+ errorType: core.serialization.property("error_type", core.serialization.string().optional()),
dynamicVariableUpdates: core.serialization.property(
"dynamic_variable_updates",
core.serialization.list(DynamicVariableUpdateCommonModel).optional(),
@@ -33,6 +34,7 @@ export declare namespace ConversationHistoryTranscriptApiIntegrationWebhookTools
is_error: boolean;
tool_has_been_called: boolean;
tool_latency_secs?: number | null;
+ error_type?: string | null;
dynamic_variable_updates?: DynamicVariableUpdateCommonModel.Raw[] | null;
type: "api_integration_webhook";
integration_id: string;
diff --git a/src/serialization/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.ts b/src/serialization/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.ts
index f29abc99..60f5e527 100644
--- a/src/serialization/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.ts
+++ b/src/serialization/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.ts
@@ -16,6 +16,7 @@ export const ConversationHistoryTranscriptOtherToolsResultCommonModel: core.seri
isError: core.serialization.property("is_error", core.serialization.boolean()),
toolHasBeenCalled: core.serialization.property("tool_has_been_called", core.serialization.boolean()),
toolLatencySecs: core.serialization.property("tool_latency_secs", core.serialization.number().optional()),
+ errorType: core.serialization.property("error_type", core.serialization.string().optional()),
dynamicVariableUpdates: core.serialization.property(
"dynamic_variable_updates",
core.serialization.list(DynamicVariableUpdateCommonModel).optional(),
@@ -31,6 +32,7 @@ export declare namespace ConversationHistoryTranscriptOtherToolsResultCommonMode
is_error: boolean;
tool_has_been_called: boolean;
tool_latency_secs?: number | null;
+ error_type?: string | null;
dynamic_variable_updates?: DynamicVariableUpdateCommonModel.Raw[] | null;
type?: ConversationHistoryTranscriptOtherToolsResultCommonModelType.Raw | null;
}
diff --git a/src/serialization/types/ConversationHistoryTranscriptSystemToolResultCommonModel.ts b/src/serialization/types/ConversationHistoryTranscriptSystemToolResultCommonModel.ts
index ecec523b..8772bc80 100644
--- a/src/serialization/types/ConversationHistoryTranscriptSystemToolResultCommonModel.ts
+++ b/src/serialization/types/ConversationHistoryTranscriptSystemToolResultCommonModel.ts
@@ -16,6 +16,7 @@ export const ConversationHistoryTranscriptSystemToolResultCommonModel: core.seri
isError: core.serialization.property("is_error", core.serialization.boolean()),
toolHasBeenCalled: core.serialization.property("tool_has_been_called", core.serialization.boolean()),
toolLatencySecs: core.serialization.property("tool_latency_secs", core.serialization.number().optional()),
+ errorType: core.serialization.property("error_type", core.serialization.string().optional()),
dynamicVariableUpdates: core.serialization.property(
"dynamic_variable_updates",
core.serialization.list(DynamicVariableUpdateCommonModel).optional(),
@@ -32,6 +33,7 @@ export declare namespace ConversationHistoryTranscriptSystemToolResultCommonMode
is_error: boolean;
tool_has_been_called: boolean;
tool_latency_secs?: number | null;
+ error_type?: string | null;
dynamic_variable_updates?: DynamicVariableUpdateCommonModel.Raw[] | null;
type: "system";
result?: ConversationHistoryTranscriptSystemToolResultCommonModelResult.Raw | null;
diff --git a/src/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.ts b/src/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.ts
index 5802a38c..28e322d6 100644
--- a/src/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.ts
+++ b/src/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.ts
@@ -15,6 +15,7 @@ export const ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput: c
isError: core.serialization.property("is_error", core.serialization.boolean()),
toolHasBeenCalled: core.serialization.property("tool_has_been_called", core.serialization.boolean()),
toolLatencySecs: core.serialization.property("tool_latency_secs", core.serialization.number().optional()),
+ errorType: core.serialization.property("error_type", core.serialization.string().optional()),
dynamicVariableUpdates: core.serialization.property(
"dynamic_variable_updates",
core.serialization.list(DynamicVariableUpdateCommonModel).optional(),
@@ -31,6 +32,7 @@ export declare namespace ConversationHistoryTranscriptWorkflowToolsResultCommonM
is_error: boolean;
tool_has_been_called: boolean;
tool_latency_secs?: number | null;
+ error_type?: string | null;
dynamic_variable_updates?: DynamicVariableUpdateCommonModel.Raw[] | null;
type: "workflow";
result?: serializers.WorkflowToolResponseModelInput.Raw | null;
diff --git a/src/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.ts b/src/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.ts
index c3fa687c..5304634f 100644
--- a/src/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.ts
+++ b/src/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.ts
@@ -15,6 +15,7 @@ export const ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput:
isError: core.serialization.property("is_error", core.serialization.boolean()),
toolHasBeenCalled: core.serialization.property("tool_has_been_called", core.serialization.boolean()),
toolLatencySecs: core.serialization.property("tool_latency_secs", core.serialization.number().optional()),
+ errorType: core.serialization.property("error_type", core.serialization.string().optional()),
dynamicVariableUpdates: core.serialization.property(
"dynamic_variable_updates",
core.serialization.list(DynamicVariableUpdateCommonModel).optional(),
@@ -31,6 +32,7 @@ export declare namespace ConversationHistoryTranscriptWorkflowToolsResultCommonM
is_error: boolean;
tool_has_been_called: boolean;
tool_latency_secs?: number | null;
+ error_type?: string | null;
dynamic_variable_updates?: DynamicVariableUpdateCommonModel.Raw[] | null;
type: "workflow";
result?: serializers.WorkflowToolResponseModelOutput.Raw | null;
diff --git a/src/serialization/types/CreateAgentBranchResponseModel.ts b/src/serialization/types/CreateAgentBranchResponseModel.ts
new file mode 100644
index 00000000..c5b5c74a
--- /dev/null
+++ b/src/serialization/types/CreateAgentBranchResponseModel.ts
@@ -0,0 +1,20 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+
+export const CreateAgentBranchResponseModel: core.serialization.ObjectSchema<
+ serializers.CreateAgentBranchResponseModel.Raw,
+ ElevenLabs.CreateAgentBranchResponseModel
+> = core.serialization.object({
+ createdBranchId: core.serialization.property("created_branch_id", core.serialization.string()),
+ createdVersionId: core.serialization.property("created_version_id", core.serialization.string()),
+});
+
+export declare namespace CreateAgentBranchResponseModel {
+ export interface Raw {
+ created_branch_id: string;
+ created_version_id: string;
+ }
+}
diff --git a/src/serialization/types/DirectPublishingReadResponseModel.ts b/src/serialization/types/DirectPublishingReadResponseModel.ts
index a1d41bbd..68e0b5ad 100644
--- a/src/serialization/types/DirectPublishingReadResponseModel.ts
+++ b/src/serialization/types/DirectPublishingReadResponseModel.ts
@@ -45,6 +45,10 @@ export const DirectPublishingReadResponseModel: core.serialization.ObjectSchema<
ean: core.serialization.string().optional(),
legalTerms: core.serialization.property("legal_terms", ReadLegalTerms.optional()),
contentGuidelinesTerms: core.serialization.property("content_guidelines_terms", ReadLegalTerms.optional()),
+ lastUpdatedFromProjectUnix: core.serialization.property(
+ "last_updated_from_project_unix",
+ core.serialization.number().optional(),
+ ),
publishingProjectId: core.serialization.property("publishing_project_id", core.serialization.string().optional()),
publishingState: core.serialization.property("publishing_state", core.serialization.string().optional()),
publisherProfileId: core.serialization.property("publisher_profile_id", core.serialization.string().optional()),
@@ -102,6 +106,7 @@ export declare namespace DirectPublishingReadResponseModel {
ean?: string | null;
legal_terms?: ReadLegalTerms.Raw | null;
content_guidelines_terms?: ReadLegalTerms.Raw | null;
+ last_updated_from_project_unix?: number | null;
publishing_project_id?: string | null;
publishing_state?: string | null;
publisher_profile_id?: string | null;
diff --git a/src/serialization/types/GetConversationResponseModel.ts b/src/serialization/types/GetConversationResponseModel.ts
index 3c27ecd1..844f12bb 100644
--- a/src/serialization/types/GetConversationResponseModel.ts
+++ b/src/serialization/types/GetConversationResponseModel.ts
@@ -14,6 +14,7 @@ export const GetConversationResponseModel: core.serialization.ObjectSchema<
ElevenLabs.GetConversationResponseModel
> = core.serialization.object({
agentId: core.serialization.property("agent_id", core.serialization.string()),
+ agentName: core.serialization.property("agent_name", core.serialization.string().optional()),
conversationId: core.serialization.property("conversation_id", core.serialization.string()),
status: GetConversationResponseModelStatus,
userId: core.serialization.property("user_id", core.serialization.string().optional()),
@@ -34,6 +35,7 @@ export const GetConversationResponseModel: core.serialization.ObjectSchema<
export declare namespace GetConversationResponseModel {
export interface Raw {
agent_id: string;
+ agent_name?: string | null;
conversation_id: string;
status: GetConversationResponseModelStatus.Raw;
user_id?: string | null;
diff --git a/src/serialization/types/ListResponseAgentBranchSummary.ts b/src/serialization/types/ListResponseAgentBranchSummary.ts
new file mode 100644
index 00000000..a86726ea
--- /dev/null
+++ b/src/serialization/types/ListResponseAgentBranchSummary.ts
@@ -0,0 +1,22 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+import { AgentBranchSummary } from "./AgentBranchSummary";
+import { ListResponseMeta } from "./ListResponseMeta";
+
+export const ListResponseAgentBranchSummary: core.serialization.ObjectSchema<
+ serializers.ListResponseAgentBranchSummary.Raw,
+ ElevenLabs.ListResponseAgentBranchSummary
+> = core.serialization.object({
+ meta: ListResponseMeta.optional(),
+ results: core.serialization.list(AgentBranchSummary),
+});
+
+export declare namespace ListResponseAgentBranchSummary {
+ export interface Raw {
+ meta?: ListResponseMeta.Raw | null;
+ results: AgentBranchSummary.Raw[];
+ }
+}
diff --git a/src/serialization/types/PermissionType.ts b/src/serialization/types/PermissionType.ts
index 2d872722..2a0dd6d3 100644
--- a/src/serialization/types/PermissionType.ts
+++ b/src/serialization/types/PermissionType.ts
@@ -40,6 +40,7 @@ export const PermissionType: core.serialization.Schema = core.serialization.enum_(["blank", "generate_podcast", "auto_assign_voices"]);
+> = core.serialization.enum_(["blank", "generate_podcast", "auto_assign_voices", "dub_video"]);
export declare namespace ProjectCreationMetaResponseModelType {
- export type Raw = "blank" | "generate_podcast" | "auto_assign_voices";
+ export type Raw = "blank" | "generate_podcast" | "auto_assign_voices" | "dub_video";
}
diff --git a/src/serialization/types/ProjectExtendedResponse.ts b/src/serialization/types/ProjectExtendedResponse.ts
index 4422005f..b3e4ec34 100644
--- a/src/serialization/types/ProjectExtendedResponse.ts
+++ b/src/serialization/types/ProjectExtendedResponse.ts
@@ -68,6 +68,10 @@ export const ProjectExtendedResponse: core.serialization.ObjectSchema<
chaptersEnabled: core.serialization.property("chapters_enabled", core.serialization.boolean().optional()),
captionsEnabled: core.serialization.property("captions_enabled", core.serialization.boolean().optional()),
captionStyle: core.serialization.property("caption_style", CaptionStyleModel.optional()),
+ captionStyleTemplateOverrides: core.serialization.property(
+ "caption_style_template_overrides",
+ core.serialization.record(core.serialization.string(), CaptionStyleModel.optional()).optional(),
+ ),
publicShareId: core.serialization.property("public_share_id", core.serialization.string().optional()),
aspectRatio: core.serialization.property("aspect_ratio", ProjectExtendedResponseModelAspectRatio.optional()),
qualityPreset: core.serialization.property("quality_preset", ProjectExtendedResponseModelQualityPreset),
@@ -124,6 +128,7 @@ export declare namespace ProjectExtendedResponse {
chapters_enabled?: boolean | null;
captions_enabled?: boolean | null;
caption_style?: CaptionStyleModel.Raw | null;
+ caption_style_template_overrides?: Record | null;
public_share_id?: string | null;
aspect_ratio?: ProjectExtendedResponseModelAspectRatio.Raw | null;
quality_preset: ProjectExtendedResponseModelQualityPreset.Raw;
diff --git a/src/serialization/types/ProjectResponse.ts b/src/serialization/types/ProjectResponse.ts
index ded90235..74e9388e 100644
--- a/src/serialization/types/ProjectResponse.ts
+++ b/src/serialization/types/ProjectResponse.ts
@@ -56,6 +56,10 @@ export const ProjectResponse: core.serialization.ObjectSchema<
chaptersEnabled: core.serialization.property("chapters_enabled", core.serialization.boolean().optional()),
captionsEnabled: core.serialization.property("captions_enabled", core.serialization.boolean().optional()),
captionStyle: core.serialization.property("caption_style", CaptionStyleModel.optional()),
+ captionStyleTemplateOverrides: core.serialization.property(
+ "caption_style_template_overrides",
+ core.serialization.record(core.serialization.string(), CaptionStyleModel.optional()).optional(),
+ ),
publicShareId: core.serialization.property("public_share_id", core.serialization.string().optional()),
aspectRatio: core.serialization.property("aspect_ratio", ProjectResponseModelAspectRatio.optional()),
});
@@ -93,6 +97,7 @@ export declare namespace ProjectResponse {
chapters_enabled?: boolean | null;
captions_enabled?: boolean | null;
caption_style?: CaptionStyleModel.Raw | null;
+ caption_style_template_overrides?: Record | null;
public_share_id?: string | null;
aspect_ratio?: ProjectResponseModelAspectRatio.Raw | null;
}
diff --git a/src/serialization/types/SeatType.ts b/src/serialization/types/SeatType.ts
new file mode 100644
index 00000000..87275948
--- /dev/null
+++ b/src/serialization/types/SeatType.ts
@@ -0,0 +1,12 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+
+export const SeatType: core.serialization.Schema =
+ core.serialization.enum_(["workspace_admin", "workspace_member"]);
+
+export declare namespace SeatType {
+ export type Raw = "workspace_admin" | "workspace_member";
+}
diff --git a/src/serialization/types/SongMetadata.ts b/src/serialization/types/SongMetadata.ts
index 5995066e..c1104205 100644
--- a/src/serialization/types/SongMetadata.ts
+++ b/src/serialization/types/SongMetadata.ts
@@ -11,6 +11,8 @@ export const SongMetadata: core.serialization.ObjectSchema =
+ core.serialization.enum_(["name", "created_at"]);
+
+export declare namespace ToolSortBy {
+ export type Raw = "name" | "created_at";
+}
diff --git a/src/serialization/types/ToolTypeFilter.ts b/src/serialization/types/ToolTypeFilter.ts
new file mode 100644
index 00000000..5ebcd4d3
--- /dev/null
+++ b/src/serialization/types/ToolTypeFilter.ts
@@ -0,0 +1,12 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as ElevenLabs from "../../api/index";
+import * as core from "../../core";
+import type * as serializers from "../index";
+
+export const ToolTypeFilter: core.serialization.Schema =
+ core.serialization.enum_(["webhook", "client", "api_integration_webhook"]);
+
+export declare namespace ToolTypeFilter {
+ export type Raw = "webhook" | "client" | "api_integration_webhook";
+}
diff --git a/src/serialization/types/ToolsResponseModel.ts b/src/serialization/types/ToolsResponseModel.ts
index 4654aba7..6e38f78c 100644
--- a/src/serialization/types/ToolsResponseModel.ts
+++ b/src/serialization/types/ToolsResponseModel.ts
@@ -10,10 +10,14 @@ export const ToolsResponseModel: core.serialization.ObjectSchema<
ElevenLabs.ToolsResponseModel
> = core.serialization.object({
tools: core.serialization.list(ToolResponseModel),
+ nextCursor: core.serialization.property("next_cursor", core.serialization.string().optional()),
+ hasMore: core.serialization.property("has_more", core.serialization.boolean()),
});
export declare namespace ToolsResponseModel {
export interface Raw {
tools: ToolResponseModel.Raw[];
+ next_cursor?: string | null;
+ has_more: boolean;
}
}
diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts
index 6db61a47..d6905f1d 100644
--- a/src/serialization/types/index.ts
+++ b/src/serialization/types/index.ts
@@ -13,6 +13,9 @@ export * from "./AddWorkspaceGroupMemberResponseModel";
export * from "./AddWorkspaceInviteResponseModel";
export * from "./AdhocAgentConfigOverrideForTestRequestModel";
export * from "./Age";
+export * from "./AgentBranchBasicInfo";
+export * from "./AgentBranchResponse";
+export * from "./AgentBranchSummary";
export * from "./AgentCallLimits";
export * from "./AgentConfig";
export * from "./AgentConfigApiModelWorkflowOverrideInput";
@@ -21,6 +24,10 @@ export * from "./AgentConfigOverrideConfig";
export * from "./AgentConfigOverrideInput";
export * from "./AgentConfigOverrideOutput";
export * from "./AgentDefinitionSource";
+export * from "./AgentDeploymentPercentageStrategy";
+export * from "./AgentDeploymentRequest";
+export * from "./AgentDeploymentRequestItem";
+export * from "./AgentDeploymentResponse";
export * from "./AgentFailureResponseExample";
export * from "./AgentMetadata";
export * from "./AgentMetadataResponseModel";
@@ -33,6 +40,8 @@ export * from "./AgentSummaryBatchSuccessfulResponseModel";
export * from "./AgentSummaryResponseModel";
export * from "./AgentTestingSettings";
export * from "./AgentTransfer";
+export * from "./AgentVersionMetadata";
+export * from "./AgentVersionParents";
export * from "./AgentWorkflowRequestModel";
export * from "./AgentWorkflowRequestModelNodesValue";
export * from "./AgentWorkflowResponseModel";
@@ -136,6 +145,7 @@ export * from "./BatchFailureResponseModel";
export * from "./BillingPeriod";
export * from "./BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge";
export * from "./BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender";
+export * from "./BranchProtectionStatus";
export * from "./BreakdownTypes";
export * from "./BuiltInToolsInput";
export * from "./BuiltInToolsOutput";
@@ -268,6 +278,7 @@ export * from "./ConversationTokenPurpose";
export * from "./ConversationTurnMetrics";
export * from "./ConvertChapterResponseModel";
export * from "./ConvertProjectResponseModel";
+export * from "./CreateAgentBranchResponseModel";
export * from "./CreateAgentResponseModel";
export * from "./CreateAudioNativeProjectRequest";
export * from "./CreatePhoneNumberResponseModel";
@@ -462,6 +473,7 @@ export * from "./LanguageResponse";
export * from "./LibraryVoiceResponse";
export * from "./LibraryVoiceResponseModelCategory";
export * from "./ListMcpToolsResponseModel";
+export * from "./ListResponseAgentBranchSummary";
export * from "./ListResponseMeta";
export * from "./ListWhatsAppAccountsResponse";
export * from "./LiteralJsonSchemaProperty";
@@ -646,6 +658,7 @@ export * from "./SafetyRule";
export * from "./SampleConfigDbModel";
export * from "./SampleConfigDbModelParentType";
export * from "./SaveVoicePreviewRequest";
+export * from "./SeatType";
export * from "./SecretDependencyType";
export * from "./SectionSource";
export * from "./SegmentCreateResponse";
@@ -741,8 +754,10 @@ export * from "./ToolRequestModel";
export * from "./ToolRequestModelToolConfig";
export * from "./ToolResponseModel";
export * from "./ToolResponseModelToolConfig";
+export * from "./ToolSortBy";
export * from "./ToolsResponseModel";
export * from "./ToolType";
+export * from "./ToolTypeFilter";
export * from "./ToolUsageStatsResponseModel";
export * from "./TransferToAgentToolConfig";
export * from "./TransferToAgentToolResultErrorModel";
diff --git a/src/version.ts b/src/version.ts
index 48471018..469d6871 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const SDK_VERSION = "v2.32.0";
+export const SDK_VERSION = "v2.33.0";
diff --git a/tests/wire/conversationalAi/agents.test.ts b/tests/wire/conversationalAi/agents.test.ts
index e8b03f82..e97e2890 100644
--- a/tests/wire/conversationalAi/agents.test.ts
+++ b/tests/wire/conversationalAi/agents.test.ts
@@ -44,7 +44,7 @@ describe("AgentsClient", () => {
turn_timeout: 7,
initial_wait_time: 1.1,
silence_end_call_timeout: -1,
- soft_timeout_config: { timeout_seconds: -1, message: "Hhmmmm...yeah give me a second..." },
+ soft_timeout_config: { timeout_seconds: -1, message: "Hhmmmm...yeah." },
turn_eagerness: "normal",
spelling_patience: "auto",
},
@@ -70,7 +70,7 @@ describe("AgentsClient", () => {
language_presets: {
key: {
overrides: {
- turn: { soft_timeout_config: { message: "Hhmmmm...yeah give me a second..." } },
+ turn: { soft_timeout_config: { message: "Hhmmmm...yeah." } },
tts: { voice_id: "cjVigY5qzO86Huf0OWal", stability: 0.5, speed: 1, similarity_boost: 0.8 },
agent: {
first_message: "Hello, how can I help you today?",
@@ -339,7 +339,7 @@ describe("AgentsClient", () => {
silence_end_call_timeout: -1,
soft_timeout_config: {
timeout_seconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
use_llm_generated_message: false,
},
turn_eagerness: "normal",
@@ -425,7 +425,7 @@ describe("AgentsClient", () => {
silence_end_call_timeout: -1,
soft_timeout_config: {
timeout_seconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
use_llm_generated_message: false,
},
turn_eagerness: "normal",
@@ -512,7 +512,7 @@ describe("AgentsClient", () => {
silence_end_call_timeout: -1,
soft_timeout_config: {
timeout_seconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
use_llm_generated_message: false,
},
turn_eagerness: "normal",
@@ -653,7 +653,7 @@ describe("AgentsClient", () => {
silenceEndCallTimeout: -1,
softTimeoutConfig: {
timeoutSeconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
},
turnEagerness: "normal",
spellingPatience: "auto",
@@ -691,7 +691,7 @@ describe("AgentsClient", () => {
overrides: {
turn: {
softTimeoutConfig: {
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
},
},
tts: {
@@ -1091,7 +1091,7 @@ describe("AgentsClient", () => {
silenceEndCallTimeout: -1,
softTimeoutConfig: {
timeoutSeconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
useLlmGeneratedMessage: false,
},
turnEagerness: "normal",
@@ -1199,7 +1199,7 @@ describe("AgentsClient", () => {
silenceEndCallTimeout: -1,
softTimeoutConfig: {
timeoutSeconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
useLlmGeneratedMessage: false,
},
turnEagerness: "normal",
@@ -1315,7 +1315,7 @@ describe("AgentsClient", () => {
silenceEndCallTimeout: -1,
softTimeoutConfig: {
timeoutSeconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
useLlmGeneratedMessage: false,
},
turnEagerness: "normal",
@@ -1523,7 +1523,7 @@ describe("AgentsClient", () => {
turn_timeout: 7,
initial_wait_time: 1.1,
silence_end_call_timeout: -1,
- soft_timeout_config: { timeout_seconds: -1, message: "Hhmmmm...yeah give me a second..." },
+ soft_timeout_config: { timeout_seconds: -1, message: "Hhmmmm...yeah." },
turn_eagerness: "normal",
spelling_patience: "auto",
},
@@ -1549,7 +1549,7 @@ describe("AgentsClient", () => {
language_presets: {
key: {
overrides: {
- turn: { soft_timeout_config: { message: "Hhmmmm...yeah give me a second..." } },
+ turn: { soft_timeout_config: { message: "Hhmmmm...yeah." } },
tts: { voice_id: "cjVigY5qzO86Huf0OWal", stability: 0.5, speed: 1, similarity_boost: 0.8 },
agent: {
first_message: "Hello, how can I help you today?",
@@ -1818,7 +1818,7 @@ describe("AgentsClient", () => {
silence_end_call_timeout: -1,
soft_timeout_config: {
timeout_seconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
use_llm_generated_message: false,
},
turn_eagerness: "normal",
@@ -1904,7 +1904,7 @@ describe("AgentsClient", () => {
silence_end_call_timeout: -1,
soft_timeout_config: {
timeout_seconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
use_llm_generated_message: false,
},
turn_eagerness: "normal",
@@ -1991,7 +1991,7 @@ describe("AgentsClient", () => {
silence_end_call_timeout: -1,
soft_timeout_config: {
timeout_seconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
use_llm_generated_message: false,
},
turn_eagerness: "normal",
@@ -2133,7 +2133,7 @@ describe("AgentsClient", () => {
silenceEndCallTimeout: -1,
softTimeoutConfig: {
timeoutSeconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
},
turnEagerness: "normal",
spellingPatience: "auto",
@@ -2171,7 +2171,7 @@ describe("AgentsClient", () => {
overrides: {
turn: {
softTimeoutConfig: {
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
},
},
tts: {
@@ -2571,7 +2571,7 @@ describe("AgentsClient", () => {
silenceEndCallTimeout: -1,
softTimeoutConfig: {
timeoutSeconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
useLlmGeneratedMessage: false,
},
turnEagerness: "normal",
@@ -2679,7 +2679,7 @@ describe("AgentsClient", () => {
silenceEndCallTimeout: -1,
softTimeoutConfig: {
timeoutSeconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
useLlmGeneratedMessage: false,
},
turnEagerness: "normal",
@@ -2795,7 +2795,7 @@ describe("AgentsClient", () => {
silenceEndCallTimeout: -1,
softTimeoutConfig: {
timeoutSeconds: -1,
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
useLlmGeneratedMessage: false,
},
turnEagerness: "normal",
diff --git a/tests/wire/conversationalAi/agents/branches.test.ts b/tests/wire/conversationalAi/agents/branches.test.ts
new file mode 100644
index 00000000..12aa357d
--- /dev/null
+++ b/tests/wire/conversationalAi/agents/branches.test.ts
@@ -0,0 +1,312 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import { ElevenLabsClient } from "../../../../src/Client";
+import { mockServerPool } from "../../../mock-server/MockServerPool";
+
+describe("BranchesClient", () => {
+ test("list", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = {
+ meta: { total: 1, page: 1, page_size: 1 },
+ results: [
+ {
+ id: "id",
+ name: "name",
+ agent_id: "agent_id",
+ description: "description",
+ created_at: 1,
+ last_committed_at: 1,
+ is_archived: true,
+ protection_status: "writer_perms_required",
+ access_info: {
+ is_creator: true,
+ creator_name: "John Doe",
+ creator_email: "john.doe@example.com",
+ role: "admin",
+ },
+ current_live_percentage: 1.1,
+ draft_exists: true,
+ },
+ ],
+ };
+ server
+ .mockEndpoint()
+ .get("/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches")
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.agents.branches.list("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ includeArchived: true,
+ limit: 1,
+ });
+ expect(response).toEqual({
+ meta: {
+ total: 1,
+ page: 1,
+ pageSize: 1,
+ },
+ results: [
+ {
+ id: "id",
+ name: "name",
+ agentId: "agent_id",
+ description: "description",
+ createdAt: 1,
+ lastCommittedAt: 1,
+ isArchived: true,
+ protectionStatus: "writer_perms_required",
+ accessInfo: {
+ isCreator: true,
+ creatorName: "John Doe",
+ creatorEmail: "john.doe@example.com",
+ role: "admin",
+ },
+ currentLivePercentage: 1.1,
+ draftExists: true,
+ },
+ ],
+ });
+ });
+
+ test("create", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { parent_version_id: "parent_version_id", name: "name", description: "description" };
+ const rawResponseBody = { created_branch_id: "created_branch_id", created_version_id: "created_version_id" };
+ server
+ .mockEndpoint()
+ .post("/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.agents.branches.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ parentVersionId: "parent_version_id",
+ name: "name",
+ description: "description",
+ });
+ expect(response).toEqual({
+ createdBranchId: "created_branch_id",
+ createdVersionId: "created_version_id",
+ });
+ });
+
+ test("get", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = {
+ id: "id",
+ name: "name",
+ agent_id: "agent_id",
+ description: "description",
+ created_at: 1,
+ last_committed_at: 1,
+ is_archived: true,
+ protection_status: "writer_perms_required",
+ access_info: {
+ is_creator: true,
+ creator_name: "John Doe",
+ creator_email: "john.doe@example.com",
+ role: "admin",
+ },
+ current_live_percentage: 1.1,
+ parent_branch: { id: "id", name: "name" },
+ most_recent_versions: [
+ {
+ id: "id",
+ agent_id: "agent_id",
+ branch_id: "branch_id",
+ version_description: "version_description",
+ seq_no_in_branch: 1,
+ time_committed_secs: 1,
+ parents: {},
+ access_info: {
+ is_creator: true,
+ creator_name: "John Doe",
+ creator_email: "john.doe@example.com",
+ role: "admin",
+ },
+ },
+ ],
+ };
+ server
+ .mockEndpoint()
+ .get("/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t")
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.agents.branches.get(
+ "agent_3701k3ttaq12ewp8b7qv5rfyszkz",
+ "agtbranch_0901k4aafjxxfxt93gd841r7tv5t",
+ );
+ expect(response).toEqual({
+ id: "id",
+ name: "name",
+ agentId: "agent_id",
+ description: "description",
+ createdAt: 1,
+ lastCommittedAt: 1,
+ isArchived: true,
+ protectionStatus: "writer_perms_required",
+ accessInfo: {
+ isCreator: true,
+ creatorName: "John Doe",
+ creatorEmail: "john.doe@example.com",
+ role: "admin",
+ },
+ currentLivePercentage: 1.1,
+ parentBranch: {
+ id: "id",
+ name: "name",
+ },
+ mostRecentVersions: [
+ {
+ id: "id",
+ agentId: "agent_id",
+ branchId: "branch_id",
+ versionDescription: "version_description",
+ seqNoInBranch: 1,
+ timeCommittedSecs: 1,
+ parents: {},
+ accessInfo: {
+ isCreator: true,
+ creatorName: "John Doe",
+ creatorEmail: "john.doe@example.com",
+ role: "admin",
+ },
+ },
+ ],
+ });
+ });
+
+ test("update", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = {
+ id: "id",
+ name: "name",
+ agent_id: "agent_id",
+ description: "description",
+ created_at: 1,
+ last_committed_at: 1,
+ is_archived: true,
+ protection_status: "writer_perms_required",
+ access_info: {
+ is_creator: true,
+ creator_name: "John Doe",
+ creator_email: "john.doe@example.com",
+ role: "admin",
+ },
+ current_live_percentage: 1.1,
+ parent_branch: { id: "id", name: "name" },
+ most_recent_versions: [
+ {
+ id: "id",
+ agent_id: "agent_id",
+ branch_id: "branch_id",
+ version_description: "version_description",
+ seq_no_in_branch: 1,
+ time_committed_secs: 1,
+ parents: {},
+ access_info: {
+ is_creator: true,
+ creator_name: "John Doe",
+ creator_email: "john.doe@example.com",
+ role: "admin",
+ },
+ },
+ ],
+ };
+ server
+ .mockEndpoint()
+ .patch(
+ "/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbranch_0901k4aafjxxfxt93gd841r7tv5t",
+ )
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.agents.branches.update(
+ "agent_3701k3ttaq12ewp8b7qv5rfyszkz",
+ "agtbranch_0901k4aafjxxfxt93gd841r7tv5t",
+ );
+ expect(response).toEqual({
+ id: "id",
+ name: "name",
+ agentId: "agent_id",
+ description: "description",
+ createdAt: 1,
+ lastCommittedAt: 1,
+ isArchived: true,
+ protectionStatus: "writer_perms_required",
+ accessInfo: {
+ isCreator: true,
+ creatorName: "John Doe",
+ creatorEmail: "john.doe@example.com",
+ role: "admin",
+ },
+ currentLivePercentage: 1.1,
+ parentBranch: {
+ id: "id",
+ name: "name",
+ },
+ mostRecentVersions: [
+ {
+ id: "id",
+ agentId: "agent_id",
+ branchId: "branch_id",
+ versionDescription: "version_description",
+ seqNoInBranch: 1,
+ timeCommittedSecs: 1,
+ parents: {},
+ accessInfo: {
+ isCreator: true,
+ creatorName: "John Doe",
+ creatorEmail: "john.doe@example.com",
+ role: "admin",
+ },
+ },
+ ],
+ });
+ });
+
+ test("merge", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post(
+ "/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/branches/agtbrch_8901k4t9z5defmb8vh3e9361y7nj/merge",
+ )
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.agents.branches.merge(
+ "agent_3701k3ttaq12ewp8b7qv5rfyszkz",
+ "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ {
+ targetBranchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ },
+ );
+ expect(response).toEqual({
+ key: "value",
+ });
+ });
+});
diff --git a/tests/wire/conversationalAi/agents/deployments.test.ts b/tests/wire/conversationalAi/agents/deployments.test.ts
new file mode 100644
index 00000000..1bec7a67
--- /dev/null
+++ b/tests/wire/conversationalAi/agents/deployments.test.ts
@@ -0,0 +1,49 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import { ElevenLabsClient } from "../../../../src/Client";
+import { mockServerPool } from "../../../mock-server/MockServerPool";
+
+describe("DeploymentsClient", () => {
+ test("create", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {
+ deployment_request: {
+ requests: [
+ {
+ branch_id: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ deployment_strategy: { type: "percentage", traffic_percentage: 0.5 },
+ },
+ ],
+ },
+ };
+ const rawResponseBody = { traffic_percentage_branch_id_map: { key: 1.1 } };
+ server
+ .mockEndpoint()
+ .post("/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/deployments")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.agents.deployments.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ deploymentRequest: {
+ requests: [
+ {
+ branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ deploymentStrategy: {
+ type: "percentage",
+ trafficPercentage: 0.5,
+ },
+ },
+ ],
+ },
+ });
+ expect(response).toEqual({
+ trafficPercentageBranchIdMap: {
+ key: 1.1,
+ },
+ });
+ });
+});
diff --git a/tests/wire/conversationalAi/agents/drafts.test.ts b/tests/wire/conversationalAi/agents/drafts.test.ts
new file mode 100644
index 00000000..9f5fd11f
--- /dev/null
+++ b/tests/wire/conversationalAi/agents/drafts.test.ts
@@ -0,0 +1,300 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import { ElevenLabsClient } from "../../../../src/Client";
+import { mockServerPool } from "../../../mock-server/MockServerPool";
+
+describe("DraftsClient", () => {
+ test("create", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {
+ conversation_config: { key: "value" },
+ platform_settings: { key: "value" },
+ workflow: {
+ edges: {
+ entry_to_tool_a: {
+ source: "entry_node",
+ target: "tool_node_a",
+ forward_condition: {
+ type: "expression",
+ expression: { type: "and_operator", children: [{ type: "boolean_literal", value: true }] },
+ },
+ },
+ start_to_entry: {
+ source: "start_node",
+ target: "entry_node",
+ forward_condition: {
+ type: "expression",
+ expression: { type: "and_operator", children: [{ type: "boolean_literal", value: true }] },
+ },
+ },
+ tool_a_to_failure: {
+ source: "tool_node_a",
+ target: "failure_node",
+ forward_condition: {
+ type: "expression",
+ expression: { type: "and_operator", children: [{ type: "boolean_literal", value: true }] },
+ },
+ },
+ tool_a_to_tool_b: {
+ source: "tool_node_a",
+ target: "tool_node_b",
+ forward_condition: {
+ type: "expression",
+ expression: { type: "and_operator", children: [{ type: "boolean_literal", value: true }] },
+ },
+ },
+ tool_b_to_agent_transfer: {
+ source: "tool_node_b",
+ target: "success_transfer",
+ forward_condition: {
+ type: "expression",
+ expression: { type: "and_operator", children: [{ type: "boolean_literal", value: true }] },
+ },
+ },
+ tool_b_to_conversation: {
+ source: "tool_node_b",
+ target: "success_conversation",
+ forward_condition: {
+ type: "expression",
+ expression: { type: "and_operator", children: [{ type: "boolean_literal", value: true }] },
+ },
+ },
+ tool_b_to_end: {
+ source: "tool_node_b",
+ target: "success_end",
+ forward_condition: {
+ type: "expression",
+ expression: { type: "and_operator", children: [{ type: "boolean_literal", value: true }] },
+ },
+ },
+ tool_b_to_phone: {
+ source: "tool_node_b",
+ target: "success_phone",
+ forward_condition: {
+ type: "expression",
+ expression: { type: "and_operator", children: [{ type: "boolean_literal", value: true }] },
+ },
+ },
+ },
+ nodes: {
+ entry_node: { type: "end" },
+ failure_node: { type: "end" },
+ start_node: { type: "end" },
+ success_conversation: { type: "end" },
+ success_end: { type: "end" },
+ success_phone: { type: "end" },
+ success_transfer: { type: "end" },
+ tool_node_a: { type: "end" },
+ tool_node_b: { type: "end" },
+ },
+ },
+ name: "name",
+ };
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/drafts")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.agents.drafts.create("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ conversationConfig: {
+ key: "value",
+ },
+ platformSettings: {
+ key: "value",
+ },
+ workflow: {
+ edges: {
+ entry_to_tool_a: {
+ source: "entry_node",
+ target: "tool_node_a",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [
+ {
+ type: "boolean_literal",
+ value: true,
+ },
+ ],
+ },
+ },
+ },
+ start_to_entry: {
+ source: "start_node",
+ target: "entry_node",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [
+ {
+ type: "boolean_literal",
+ value: true,
+ },
+ ],
+ },
+ },
+ },
+ tool_a_to_failure: {
+ source: "tool_node_a",
+ target: "failure_node",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [
+ {
+ type: "boolean_literal",
+ value: true,
+ },
+ ],
+ },
+ },
+ },
+ tool_a_to_tool_b: {
+ source: "tool_node_a",
+ target: "tool_node_b",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [
+ {
+ type: "boolean_literal",
+ value: true,
+ },
+ ],
+ },
+ },
+ },
+ tool_b_to_agent_transfer: {
+ source: "tool_node_b",
+ target: "success_transfer",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [
+ {
+ type: "boolean_literal",
+ value: true,
+ },
+ ],
+ },
+ },
+ },
+ tool_b_to_conversation: {
+ source: "tool_node_b",
+ target: "success_conversation",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [
+ {
+ type: "boolean_literal",
+ value: true,
+ },
+ ],
+ },
+ },
+ },
+ tool_b_to_end: {
+ source: "tool_node_b",
+ target: "success_end",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [
+ {
+ type: "boolean_literal",
+ value: true,
+ },
+ ],
+ },
+ },
+ },
+ tool_b_to_phone: {
+ source: "tool_node_b",
+ target: "success_phone",
+ forwardCondition: {
+ type: "expression",
+ expression: {
+ type: "and_operator",
+ children: [
+ {
+ type: "boolean_literal",
+ value: true,
+ },
+ ],
+ },
+ },
+ },
+ },
+ nodes: {
+ entry_node: {
+ type: "end",
+ },
+ failure_node: {
+ type: "end",
+ },
+ start_node: {
+ type: "end",
+ },
+ success_conversation: {
+ type: "end",
+ },
+ success_end: {
+ type: "end",
+ },
+ success_phone: {
+ type: "end",
+ },
+ success_transfer: {
+ type: "end",
+ },
+ tool_node_a: {
+ type: "end",
+ },
+ tool_node_b: {
+ type: "end",
+ },
+ },
+ },
+ name: "name",
+ });
+ expect(response).toEqual({
+ key: "value",
+ });
+ });
+
+ test("delete", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .delete("/v1/convai/agents/agent_3701k3ttaq12ewp8b7qv5rfyszkz/drafts")
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.agents.drafts.delete("agent_3701k3ttaq12ewp8b7qv5rfyszkz", {
+ branchId: "agtbrch_8901k4t9z5defmb8vh3e9361y7nj",
+ });
+ expect(response).toEqual({
+ key: "value",
+ });
+ });
+});
diff --git a/tests/wire/conversationalAi/batchCalls.test.ts b/tests/wire/conversationalAi/batchCalls.test.ts
index 129ebc99..bdeac8c0 100644
--- a/tests/wire/conversationalAi/batchCalls.test.ts
+++ b/tests/wire/conversationalAi/batchCalls.test.ts
@@ -182,7 +182,7 @@ describe("BatchCallsClient", () => {
conversation_id: "conversation_id",
conversation_initiation_client_data: {
conversation_config_override: {
- turn: { soft_timeout_config: { message: "Hhmmmm...yeah give me a second..." } },
+ turn: { soft_timeout_config: { message: "Hhmmmm...yeah." } },
tts: { voice_id: "cjVigY5qzO86Huf0OWal", stability: 0.5, speed: 1, similarity_boost: 0.8 },
agent: {
first_message: "Hello, how can I help you today?",
@@ -241,7 +241,7 @@ describe("BatchCallsClient", () => {
conversationConfigOverride: {
turn: {
softTimeoutConfig: {
- message: "Hhmmmm...yeah give me a second...",
+ message: "Hhmmmm...yeah.",
},
},
tts: {
diff --git a/tests/wire/conversationalAi/knowledgeBase/documents.test.ts b/tests/wire/conversationalAi/knowledgeBase/documents.test.ts
index 120fff39..ac6a91df 100644
--- a/tests/wire/conversationalAi/knowledgeBase/documents.test.ts
+++ b/tests/wire/conversationalAi/knowledgeBase/documents.test.ts
@@ -60,6 +60,34 @@ describe("DocumentsClient", () => {
});
});
+ test("create_folder", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { name: "name" };
+ const rawResponseBody = { id: "id", name: "name", folder_path: [{ id: "id" }] };
+ server
+ .mockEndpoint()
+ .post("/v1/convai/knowledge-base/folder")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.conversationalAi.knowledgeBase.documents.createFolder({
+ name: "name",
+ });
+ expect(response).toEqual({
+ id: "id",
+ name: "name",
+ folderPath: [
+ {
+ id: "id",
+ },
+ ],
+ });
+ });
+
test("get", async () => {
const server = mockServerPool.createServer();
const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
@@ -282,4 +310,40 @@ describe("DocumentsClient", () => {
signedUrl: "signed_url",
});
});
+
+ test("move", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = {};
+
+ server
+ .mockEndpoint()
+ .post("/v1/convai/knowledge-base/21m00Tcm4TlvDq8ikWAM/move")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .build();
+
+ const response = await client.conversationalAi.knowledgeBase.documents.move("21m00Tcm4TlvDq8ikWAM");
+ expect(response).toEqual(undefined);
+ });
+
+ test("bulk_move", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { document_ids: ["21m00Tcm4TlvDq8ikWAM", "31m00Tcm4TlvDq8ikWBM"] };
+
+ server
+ .mockEndpoint()
+ .post("/v1/convai/knowledge-base/bulk-move")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .build();
+
+ const response = await client.conversationalAi.knowledgeBase.documents.bulkMove({
+ documentIds: ["21m00Tcm4TlvDq8ikWAM", "31m00Tcm4TlvDq8ikWBM"],
+ });
+ expect(response).toEqual(undefined);
+ });
});
diff --git a/tests/wire/conversationalAi/tools.test.ts b/tests/wire/conversationalAi/tools.test.ts
index 3bf84170..fc72655e 100644
--- a/tests/wire/conversationalAi/tools.test.ts
+++ b/tests/wire/conversationalAi/tools.test.ts
@@ -29,10 +29,19 @@ describe("ToolsClient", () => {
usage_stats: { avg_latency_secs: 1.1 },
},
],
+ next_cursor: "next_cursor",
+ has_more: true,
};
server.mockEndpoint().get("/v1/convai/tools").respondWith().statusCode(200).jsonBody(rawResponseBody).build();
- const response = await client.conversationalAi.tools.list();
+ const response = await client.conversationalAi.tools.list({
+ search: "search",
+ pageSize: 1,
+ showOnlyOwnedDocuments: true,
+ sortDirection: "asc",
+ sortBy: "name",
+ cursor: "cursor",
+ });
expect(response).toEqual({
tools: [
{
@@ -66,6 +75,8 @@ describe("ToolsClient", () => {
},
},
],
+ nextCursor: "next_cursor",
+ hasMore: true,
});
});
diff --git a/tests/wire/main.test.ts b/tests/wire/main.test.ts
index 08c6404e..cc5b4526 100644
--- a/tests/wire/main.test.ts
+++ b/tests/wire/main.test.ts
@@ -4,6 +4,21 @@ import { ElevenLabsClient } from "../../src/Client";
import { mockServerPool } from "../mock-server/MockServerPool";
describe("ElevenLabsClient", () => {
+ test("deleteV1ConvaiAgentsAgentIdBranchesBranchId", async () => {
+ const server = mockServerPool.createServer();
+ const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ server
+ .mockEndpoint()
+ .delete("/v1/convai/agents/agent_id/branches/branch_id")
+ .respondWith()
+ .statusCode(200)
+ .build();
+
+ const response = await client.deleteV1ConvaiAgentsAgentIdBranchesBranchId("agent_id", "branch_id");
+ expect(response).toEqual(undefined);
+ });
+
test("saveAVoicePreview", async () => {
const server = mockServerPool.createServer();
const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
diff --git a/tests/wire/studio.test.ts b/tests/wire/studio.test.ts
index 616c3f99..728945e7 100644
--- a/tests/wire/studio.test.ts
+++ b/tests/wire/studio.test.ts
@@ -72,6 +72,7 @@ describe("StudioClient", () => {
max_lines_per_section: 1,
max_words_per_line: 1,
},
+ caption_style_template_overrides: { key: {} },
public_share_id: "abc123def456789",
aspect_ratio: "16:9",
},
@@ -180,6 +181,9 @@ describe("StudioClient", () => {
maxLinesPerSection: 1,
maxWordsPerLine: 1,
},
+ captionStyleTemplateOverrides: {
+ key: {},
+ },
publicShareId: "abc123def456789",
aspectRatio: "16:9",
},
diff --git a/tests/wire/studio/projects.test.ts b/tests/wire/studio/projects.test.ts
index d56d47c0..e68281f2 100644
--- a/tests/wire/studio/projects.test.ts
+++ b/tests/wire/studio/projects.test.ts
@@ -159,6 +159,33 @@ describe("ProjectsClient", () => {
max_lines_per_section: 1,
max_words_per_line: 1,
},
+ caption_style_template_overrides: {
+ key: {
+ template: { key: "key", label: "label" },
+ text_font: "text_font",
+ text_scale: 1.1,
+ text_color: "text_color",
+ text_align: "start",
+ text_style: "normal",
+ text_weight: "normal",
+ background_enabled: true,
+ background_color: "background_color",
+ background_opacity: 1.1,
+ word_highlights_enabled: true,
+ word_highlights_color: "word_highlights_color",
+ word_highlights_background_color: "word_highlights_background_color",
+ word_highlights_opacity: 1.1,
+ section_animation: { enter_type: "none", exit_type: "none" },
+ word_animation: { enter_type: "none", exit_type: "none" },
+ character_animation: { enter_type: "none", exit_type: "none" },
+ width_pct: 1.1,
+ horizontal_placement: { align: "left", translate_pct: 1.1 },
+ vertical_placement: { align: "top", translate_pct: 1.1 },
+ auto_break_enabled: true,
+ max_lines_per_section: 1,
+ max_words_per_line: 1,
+ },
+ },
public_share_id: "abc123def456789",
aspect_ratio: "16:9",
quality_preset: "standard",
@@ -414,6 +441,7 @@ describe("ProjectsClient", () => {
ean: "ean",
legal_terms: { terms: "terms", start_date: "start_date", end_date: "end_date" },
content_guidelines_terms: { terms: "terms", start_date: "start_date", end_date: "end_date" },
+ last_updated_from_project_unix: 1,
publishing_project_id: "publishing_project_id",
publishing_state: "publishing_state",
publisher_profile_id: "publisher_profile_id",
@@ -546,6 +574,51 @@ describe("ProjectsClient", () => {
maxLinesPerSection: 1,
maxWordsPerLine: 1,
},
+ captionStyleTemplateOverrides: {
+ key: {
+ template: {
+ key: "key",
+ label: "label",
+ },
+ textFont: "text_font",
+ textScale: 1.1,
+ textColor: "text_color",
+ textAlign: "start",
+ textStyle: "normal",
+ textWeight: "normal",
+ backgroundEnabled: true,
+ backgroundColor: "background_color",
+ backgroundOpacity: 1.1,
+ wordHighlightsEnabled: true,
+ wordHighlightsColor: "word_highlights_color",
+ wordHighlightsBackgroundColor: "word_highlights_background_color",
+ wordHighlightsOpacity: 1.1,
+ sectionAnimation: {
+ enterType: "none",
+ exitType: "none",
+ },
+ wordAnimation: {
+ enterType: "none",
+ exitType: "none",
+ },
+ characterAnimation: {
+ enterType: "none",
+ exitType: "none",
+ },
+ widthPct: 1.1,
+ horizontalPlacement: {
+ align: "left",
+ translatePct: 1.1,
+ },
+ verticalPlacement: {
+ align: "top",
+ translatePct: 1.1,
+ },
+ autoBreakEnabled: true,
+ maxLinesPerSection: 1,
+ maxWordsPerLine: 1,
+ },
+ },
publicShareId: "abc123def456789",
aspectRatio: "16:9",
qualityPreset: "standard",
@@ -841,6 +914,7 @@ describe("ProjectsClient", () => {
startDate: "start_date",
endDate: "end_date",
},
+ lastUpdatedFromProjectUnix: 1,
publishingProjectId: "publishing_project_id",
publishingState: "publishing_state",
publisherProfileId: "publisher_profile_id",
@@ -955,6 +1029,7 @@ describe("ProjectsClient", () => {
max_lines_per_section: 1,
max_words_per_line: 1,
},
+ caption_style_template_overrides: { key: {} },
public_share_id: "abc123def456789",
aspect_ratio: "16:9",
},
@@ -1052,6 +1127,9 @@ describe("ProjectsClient", () => {
maxLinesPerSection: 1,
maxWordsPerLine: 1,
},
+ captionStyleTemplateOverrides: {
+ key: {},
+ },
publicShareId: "abc123def456789",
aspectRatio: "16:9",
},
diff --git a/tests/wire/workspace/resources.test.ts b/tests/wire/workspace/resources.test.ts
index 33d22d28..cce3c675 100644
--- a/tests/wire/workspace/resources.test.ts
+++ b/tests/wire/workspace/resources.test.ts
@@ -103,27 +103,4 @@ describe("ResourcesClient", () => {
key: "value",
});
});
-
- test("copyToWorkspace", async () => {
- const server = mockServerPool.createServer();
- const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
- const rawRequestBody = { resource_type: "voice", target_user_id: "target_user_id" };
- const rawResponseBody = { key: "value" };
- server
- .mockEndpoint()
- .post("/v1/workspace/resources/resource_id/copy-to-workspace")
- .jsonBody(rawRequestBody)
- .respondWith()
- .statusCode(200)
- .jsonBody(rawResponseBody)
- .build();
-
- const response = await client.workspace.resources.copyToWorkspace("resource_id", {
- resourceType: "voice",
- targetUserId: "target_user_id",
- });
- expect(response).toEqual({
- key: "value",
- });
- });
});