@elevenlabs/elevenlabs-js 2.23.0 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/Client.js +2 -2
  2. package/api/resources/conversationalAi/resources/conversations/client/Client.js +17 -1
  3. package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +4 -0
  4. package/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +13 -0
  5. package/api/resources/conversationalAi/resources/mcpServers/client/Client.js +64 -0
  6. package/api/types/AsrProvider.d.ts +5 -1
  7. package/api/types/AsrProvider.js +5 -0
  8. package/api/types/ConversationSummaryResponseModel.d.ts +1 -0
  9. package/api/types/ProjectExtendedResponse.d.ts +2 -0
  10. package/api/types/ProjectVoiceResponseModel.d.ts +11 -0
  11. package/api/types/ProjectVoiceResponseModel.js +3 -0
  12. package/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  13. package/api/types/WebhookToolApiSchemaConfigInputContentType.d.ts +6 -0
  14. package/api/types/WebhookToolApiSchemaConfigInputContentType.js +9 -0
  15. package/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  16. package/api/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +6 -0
  17. package/api/types/WebhookToolApiSchemaConfigOutputContentType.js +9 -0
  18. package/api/types/index.d.ts +3 -0
  19. package/api/types/index.js +3 -0
  20. package/dist/Client.js +2 -2
  21. package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +17 -1
  22. package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +4 -0
  23. package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +13 -0
  24. package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.js +64 -0
  25. package/dist/api/types/AsrProvider.d.ts +5 -1
  26. package/dist/api/types/AsrProvider.js +5 -0
  27. package/dist/api/types/ConversationSummaryResponseModel.d.ts +1 -0
  28. package/dist/api/types/ProjectExtendedResponse.d.ts +2 -0
  29. package/dist/api/types/ProjectVoiceResponseModel.d.ts +11 -0
  30. package/dist/api/types/ProjectVoiceResponseModel.js +3 -0
  31. package/dist/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  32. package/dist/api/types/WebhookToolApiSchemaConfigInputContentType.d.ts +6 -0
  33. package/dist/api/types/WebhookToolApiSchemaConfigInputContentType.js +9 -0
  34. package/dist/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  35. package/dist/api/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +6 -0
  36. package/dist/api/types/WebhookToolApiSchemaConfigOutputContentType.js +9 -0
  37. package/dist/api/types/index.d.ts +3 -0
  38. package/dist/api/types/index.js +3 -0
  39. package/dist/serialization/types/AsrProvider.d.ts +1 -1
  40. package/dist/serialization/types/AsrProvider.js +1 -1
  41. package/dist/serialization/types/ConversationSummaryResponseModel.d.ts +1 -0
  42. package/dist/serialization/types/ConversationSummaryResponseModel.js +1 -0
  43. package/dist/serialization/types/ProjectExtendedResponse.d.ts +2 -0
  44. package/dist/serialization/types/ProjectExtendedResponse.js +2 -0
  45. package/dist/serialization/types/ProjectVoiceResponseModel.d.ts +17 -0
  46. package/dist/serialization/types/ProjectVoiceResponseModel.js +49 -0
  47. package/dist/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  48. package/dist/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
  49. package/dist/serialization/types/WebhookToolApiSchemaConfigInputContentType.d.ts +7 -0
  50. package/dist/serialization/types/WebhookToolApiSchemaConfigInputContentType.js +39 -0
  51. package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  52. package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
  53. package/dist/serialization/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +7 -0
  54. package/dist/serialization/types/WebhookToolApiSchemaConfigOutputContentType.js +39 -0
  55. package/dist/serialization/types/index.d.ts +3 -0
  56. package/dist/serialization/types/index.js +3 -0
  57. package/dist/version.d.ts +1 -1
  58. package/dist/version.js +1 -1
  59. package/package.json +1 -1
  60. package/reference.md +63 -0
  61. package/serialization/types/AsrProvider.d.ts +1 -1
  62. package/serialization/types/AsrProvider.js +1 -1
  63. package/serialization/types/ConversationSummaryResponseModel.d.ts +1 -0
  64. package/serialization/types/ConversationSummaryResponseModel.js +1 -0
  65. package/serialization/types/ProjectExtendedResponse.d.ts +2 -0
  66. package/serialization/types/ProjectExtendedResponse.js +2 -0
  67. package/serialization/types/ProjectVoiceResponseModel.d.ts +17 -0
  68. package/serialization/types/ProjectVoiceResponseModel.js +49 -0
  69. package/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  70. package/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
  71. package/serialization/types/WebhookToolApiSchemaConfigInputContentType.d.ts +7 -0
  72. package/serialization/types/WebhookToolApiSchemaConfigInputContentType.js +39 -0
  73. package/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  74. package/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
  75. package/serialization/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +7 -0
  76. package/serialization/types/WebhookToolApiSchemaConfigOutputContentType.js +39 -0
  77. package/serialization/types/index.d.ts +3 -0
  78. package/serialization/types/index.js +3 -0
  79. package/version.d.ts +1 -1
  80. package/version.js +1 -1
package/Client.js CHANGED
@@ -78,8 +78,8 @@ class ElevenLabsClient {
78
78
  "xi-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
79
79
  "X-Fern-Language": "JavaScript",
80
80
  "X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
81
- "X-Fern-SDK-Version": "v2.23.0",
82
- "User-Agent": "@elevenlabs/elevenlabs-js/v2.23.0",
81
+ "X-Fern-SDK-Version": "v2.24.0",
82
+ "User-Agent": "@elevenlabs/elevenlabs-js/v2.24.0",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -255,7 +255,7 @@ class Conversations {
255
255
  __list() {
256
256
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
257
257
  var _a, _b, _c, _d, _e;
258
- const { cursor, agentId, callSuccessful, callStartBeforeUnix, callStartAfterUnix, callDurationMinSecs, callDurationMaxSecs, userId, toolNames, pageSize, summaryMode, search, } = request;
258
+ const { cursor, agentId, callSuccessful, callStartBeforeUnix, callStartAfterUnix, callDurationMinSecs, callDurationMaxSecs, userId, evaluationParams, dataCollectionParams, toolNames, pageSize, summaryMode, search, } = request;
259
259
  const _queryParams = {};
260
260
  if (cursor != null) {
261
261
  _queryParams["cursor"] = cursor;
@@ -283,6 +283,22 @@ class Conversations {
283
283
  if (userId != null) {
284
284
  _queryParams["user_id"] = userId;
285
285
  }
286
+ if (evaluationParams != null) {
287
+ if (Array.isArray(evaluationParams)) {
288
+ _queryParams["evaluation_params"] = evaluationParams.map((item) => item);
289
+ }
290
+ else {
291
+ _queryParams["evaluation_params"] = evaluationParams;
292
+ }
293
+ }
294
+ if (dataCollectionParams != null) {
295
+ if (Array.isArray(dataCollectionParams)) {
296
+ _queryParams["data_collection_params"] = dataCollectionParams.map((item) => item);
297
+ }
298
+ else {
299
+ _queryParams["data_collection_params"] = dataCollectionParams;
300
+ }
301
+ }
286
302
  if (toolNames != null) {
287
303
  if (Array.isArray(toolNames)) {
288
304
  _queryParams["tool_names"] = toolNames.map((item) => item);
@@ -32,6 +32,10 @@ export interface ConversationsListRequest {
32
32
  callDurationMaxSecs?: number;
33
33
  /** Filter conversations by the user ID who initiated them. */
34
34
  userId?: string;
35
+ /** Evaluation filters. Repeat param. Format: criteria_id:result. Example: eval=value_framing:success */
36
+ evaluationParams?: string | string[];
37
+ /** Data collection filters. Repeat param. Format: id:op:value where op is one of eq|neq|gt|gte|lt|lte|in|exists|missing. For in, pipe-delimit values. */
38
+ dataCollectionParams?: string | string[];
35
39
  /** Filter conversations by tool names used during the call. */
36
40
  toolNames?: string | string[];
37
41
  /** How many conversations to return at maximum. Can not exceed 100, defaults to 30. */
@@ -84,6 +84,19 @@ export declare class McpServers {
84
84
  */
85
85
  get(mcpServerId: string, requestOptions?: McpServers.RequestOptions): core.HttpResponsePromise<ElevenLabs.McpServerResponseModel>;
86
86
  private __get;
87
+ /**
88
+ * Delete a specific MCP server configuration from the workspace.
89
+ *
90
+ * @param {string} mcpServerId - ID of the MCP Server.
91
+ * @param {McpServers.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
94
+ *
95
+ * @example
96
+ * await client.conversationalAi.mcpServers.delete("mcp_server_id")
97
+ */
98
+ delete(mcpServerId: string, requestOptions?: McpServers.RequestOptions): core.HttpResponsePromise<unknown>;
99
+ private __delete;
87
100
  /**
88
101
  * Update the configuration settings for an MCP server.
89
102
  *
@@ -299,6 +299,70 @@ class McpServers {
299
299
  }
300
300
  });
301
301
  }
302
+ /**
303
+ * Delete a specific MCP server configuration from the workspace.
304
+ *
305
+ * @param {string} mcpServerId - ID of the MCP Server.
306
+ * @param {McpServers.RequestOptions} requestOptions - Request-specific configuration.
307
+ *
308
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
309
+ *
310
+ * @example
311
+ * await client.conversationalAi.mcpServers.delete("mcp_server_id")
312
+ */
313
+ delete(mcpServerId, requestOptions) {
314
+ return core.HttpResponsePromise.fromPromise(this.__delete(mcpServerId, requestOptions));
315
+ }
316
+ __delete(mcpServerId, requestOptions) {
317
+ return __awaiter(this, void 0, void 0, function* () {
318
+ var _a, _b, _c, _d, _e;
319
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
320
+ const _response = yield core.fetcher({
321
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, `v1/convai/mcp-servers/${encodeURIComponent(mcpServerId)}`),
322
+ method: "DELETE",
323
+ headers: _headers,
324
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
325
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
326
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
327
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
328
+ });
329
+ if (_response.ok) {
330
+ return { data: _response.body, rawResponse: _response.rawResponse };
331
+ }
332
+ if (_response.error.reason === "status-code") {
333
+ switch (_response.error.statusCode) {
334
+ case 422:
335
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
336
+ unrecognizedObjectKeys: "passthrough",
337
+ allowUnrecognizedUnionMembers: true,
338
+ allowUnrecognizedEnumValues: true,
339
+ breadcrumbsPrefix: ["response"],
340
+ }), _response.rawResponse);
341
+ default:
342
+ throw new errors.ElevenLabsError({
343
+ statusCode: _response.error.statusCode,
344
+ body: _response.error.body,
345
+ rawResponse: _response.rawResponse,
346
+ });
347
+ }
348
+ }
349
+ switch (_response.error.reason) {
350
+ case "non-json":
351
+ throw new errors.ElevenLabsError({
352
+ statusCode: _response.error.statusCode,
353
+ body: _response.error.rawBody,
354
+ rawResponse: _response.rawResponse,
355
+ });
356
+ case "timeout":
357
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling DELETE /v1/convai/mcp-servers/{mcp_server_id}.");
358
+ case "unknown":
359
+ throw new errors.ElevenLabsError({
360
+ message: _response.error.errorMessage,
361
+ rawResponse: _response.rawResponse,
362
+ });
363
+ }
364
+ });
365
+ }
302
366
  /**
303
367
  * Update the configuration settings for an MCP server.
304
368
  *
@@ -1 +1,5 @@
1
- export type AsrProvider = "elevenlabs";
1
+ export declare const AsrProvider: {
2
+ readonly Elevenlabs: "elevenlabs";
3
+ readonly ScribeRealtime: "scribe_realtime";
4
+ };
5
+ export type AsrProvider = (typeof AsrProvider)[keyof typeof AsrProvider];
@@ -1,3 +1,8 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AsrProvider = void 0;
5
+ exports.AsrProvider = {
6
+ Elevenlabs: "elevenlabs",
7
+ ScribeRealtime: "scribe_realtime",
8
+ };
@@ -12,4 +12,5 @@ export interface ConversationSummaryResponseModel {
12
12
  transcriptSummary?: string;
13
13
  callSummaryTitle?: string;
14
14
  direction?: ElevenLabs.ConversationSummaryResponseModelDirection;
15
+ rating?: number;
15
16
  }
@@ -80,4 +80,6 @@ export interface ProjectExtendedResponse {
80
80
  experimental?: Record<string, unknown>;
81
81
  /** List of uploaded assets e.g. videos, audios. */
82
82
  assets: ElevenLabs.ProjectExtendedResponseModelAssetsItem[];
83
+ /** List of configured project voices. */
84
+ voices: ElevenLabs.ProjectVoiceResponseModel[];
83
85
  }
@@ -0,0 +1,11 @@
1
+ export interface ProjectVoiceResponseModel {
2
+ voiceId: string;
3
+ alias: string;
4
+ stability: number;
5
+ similarityBoost: number;
6
+ style: number;
7
+ isPinned: boolean;
8
+ useSpeakerBoost: boolean;
9
+ volumeGain: number;
10
+ speed: number;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -15,6 +15,8 @@ export interface WebhookToolApiSchemaConfigInput {
15
15
  requestBodySchema?: ElevenLabs.ObjectJsonSchemaPropertyInput;
16
16
  /** Headers that should be included in the request */
17
17
  requestHeaders?: Record<string, ElevenLabs.WebhookToolApiSchemaConfigInputRequestHeadersValue>;
18
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
19
+ contentType?: ElevenLabs.WebhookToolApiSchemaConfigInputContentType;
18
20
  /** Optional auth connection to use for authentication with this webhook */
19
21
  authConnection?: ElevenLabs.AuthConnectionLocator;
20
22
  }
@@ -0,0 +1,6 @@
1
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
2
+ export declare const WebhookToolApiSchemaConfigInputContentType: {
3
+ readonly ApplicationJson: "application/json";
4
+ readonly ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded";
5
+ };
6
+ export type WebhookToolApiSchemaConfigInputContentType = (typeof WebhookToolApiSchemaConfigInputContentType)[keyof typeof WebhookToolApiSchemaConfigInputContentType];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WebhookToolApiSchemaConfigInputContentType = void 0;
5
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
6
+ exports.WebhookToolApiSchemaConfigInputContentType = {
7
+ ApplicationJson: "application/json",
8
+ ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded",
9
+ };
@@ -15,6 +15,8 @@ export interface WebhookToolApiSchemaConfigOutput {
15
15
  requestBodySchema?: ElevenLabs.ObjectJsonSchemaPropertyOutput;
16
16
  /** Headers that should be included in the request */
17
17
  requestHeaders?: Record<string, ElevenLabs.WebhookToolApiSchemaConfigOutputRequestHeadersValue>;
18
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
19
+ contentType?: ElevenLabs.WebhookToolApiSchemaConfigOutputContentType;
18
20
  /** Optional auth connection to use for authentication with this webhook */
19
21
  authConnection?: ElevenLabs.AuthConnectionLocator;
20
22
  }
@@ -0,0 +1,6 @@
1
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
2
+ export declare const WebhookToolApiSchemaConfigOutputContentType: {
3
+ readonly ApplicationJson: "application/json";
4
+ readonly ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded";
5
+ };
6
+ export type WebhookToolApiSchemaConfigOutputContentType = (typeof WebhookToolApiSchemaConfigOutputContentType)[keyof typeof WebhookToolApiSchemaConfigOutputContentType];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WebhookToolApiSchemaConfigOutputContentType = void 0;
5
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
6
+ exports.WebhookToolApiSchemaConfigOutputContentType = {
7
+ ApplicationJson: "application/json",
8
+ ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded",
9
+ };
@@ -516,6 +516,7 @@ export * from "./ProjectSnapshotResponse";
516
516
  export * from "./ProjectSnapshotsResponse";
517
517
  export * from "./ProjectVideoResponseModel";
518
518
  export * from "./ProjectVideoThumbnailSheetResponseModel";
519
+ export * from "./ProjectVoiceResponseModel";
519
520
  export * from "./PromptAgentApiModelInputBackupLlmConfig";
520
521
  export * from "./PromptAgentApiModelInputToolsItem";
521
522
  export * from "./PromptAgentApiModelInput";
@@ -737,9 +738,11 @@ export * from "./WebhookAuthMethodType";
737
738
  export * from "./WebhookEventType";
738
739
  export * from "./WebhookToolApiSchemaConfigInputMethod";
739
740
  export * from "./WebhookToolApiSchemaConfigInputRequestHeadersValue";
741
+ export * from "./WebhookToolApiSchemaConfigInputContentType";
740
742
  export * from "./WebhookToolApiSchemaConfigInput";
741
743
  export * from "./WebhookToolApiSchemaConfigOutputMethod";
742
744
  export * from "./WebhookToolApiSchemaConfigOutputRequestHeadersValue";
745
+ export * from "./WebhookToolApiSchemaConfigOutputContentType";
743
746
  export * from "./WebhookToolApiSchemaConfigOutput";
744
747
  export * from "./WebhookToolConfigInput";
745
748
  export * from "./WebhookToolConfigOutput";
@@ -532,6 +532,7 @@ __exportStar(require("./ProjectSnapshotResponse"), exports);
532
532
  __exportStar(require("./ProjectSnapshotsResponse"), exports);
533
533
  __exportStar(require("./ProjectVideoResponseModel"), exports);
534
534
  __exportStar(require("./ProjectVideoThumbnailSheetResponseModel"), exports);
535
+ __exportStar(require("./ProjectVoiceResponseModel"), exports);
535
536
  __exportStar(require("./PromptAgentApiModelInputBackupLlmConfig"), exports);
536
537
  __exportStar(require("./PromptAgentApiModelInputToolsItem"), exports);
537
538
  __exportStar(require("./PromptAgentApiModelInput"), exports);
@@ -753,9 +754,11 @@ __exportStar(require("./WebhookAuthMethodType"), exports);
753
754
  __exportStar(require("./WebhookEventType"), exports);
754
755
  __exportStar(require("./WebhookToolApiSchemaConfigInputMethod"), exports);
755
756
  __exportStar(require("./WebhookToolApiSchemaConfigInputRequestHeadersValue"), exports);
757
+ __exportStar(require("./WebhookToolApiSchemaConfigInputContentType"), exports);
756
758
  __exportStar(require("./WebhookToolApiSchemaConfigInput"), exports);
757
759
  __exportStar(require("./WebhookToolApiSchemaConfigOutputMethod"), exports);
758
760
  __exportStar(require("./WebhookToolApiSchemaConfigOutputRequestHeadersValue"), exports);
761
+ __exportStar(require("./WebhookToolApiSchemaConfigOutputContentType"), exports);
759
762
  __exportStar(require("./WebhookToolApiSchemaConfigOutput"), exports);
760
763
  __exportStar(require("./WebhookToolConfigInput"), exports);
761
764
  __exportStar(require("./WebhookToolConfigOutput"), exports);
package/dist/Client.js CHANGED
@@ -78,8 +78,8 @@ class ElevenLabsClient {
78
78
  "xi-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
79
79
  "X-Fern-Language": "JavaScript",
80
80
  "X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
81
- "X-Fern-SDK-Version": "v2.23.0",
82
- "User-Agent": "@elevenlabs/elevenlabs-js/v2.23.0",
81
+ "X-Fern-SDK-Version": "v2.24.0",
82
+ "User-Agent": "@elevenlabs/elevenlabs-js/v2.24.0",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -255,7 +255,7 @@ class Conversations {
255
255
  __list() {
256
256
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
257
257
  var _a, _b, _c, _d, _e;
258
- const { cursor, agentId, callSuccessful, callStartBeforeUnix, callStartAfterUnix, callDurationMinSecs, callDurationMaxSecs, userId, toolNames, pageSize, summaryMode, search, } = request;
258
+ const { cursor, agentId, callSuccessful, callStartBeforeUnix, callStartAfterUnix, callDurationMinSecs, callDurationMaxSecs, userId, evaluationParams, dataCollectionParams, toolNames, pageSize, summaryMode, search, } = request;
259
259
  const _queryParams = {};
260
260
  if (cursor != null) {
261
261
  _queryParams["cursor"] = cursor;
@@ -283,6 +283,22 @@ class Conversations {
283
283
  if (userId != null) {
284
284
  _queryParams["user_id"] = userId;
285
285
  }
286
+ if (evaluationParams != null) {
287
+ if (Array.isArray(evaluationParams)) {
288
+ _queryParams["evaluation_params"] = evaluationParams.map((item) => item);
289
+ }
290
+ else {
291
+ _queryParams["evaluation_params"] = evaluationParams;
292
+ }
293
+ }
294
+ if (dataCollectionParams != null) {
295
+ if (Array.isArray(dataCollectionParams)) {
296
+ _queryParams["data_collection_params"] = dataCollectionParams.map((item) => item);
297
+ }
298
+ else {
299
+ _queryParams["data_collection_params"] = dataCollectionParams;
300
+ }
301
+ }
286
302
  if (toolNames != null) {
287
303
  if (Array.isArray(toolNames)) {
288
304
  _queryParams["tool_names"] = toolNames.map((item) => item);
@@ -32,6 +32,10 @@ export interface ConversationsListRequest {
32
32
  callDurationMaxSecs?: number;
33
33
  /** Filter conversations by the user ID who initiated them. */
34
34
  userId?: string;
35
+ /** Evaluation filters. Repeat param. Format: criteria_id:result. Example: eval=value_framing:success */
36
+ evaluationParams?: string | string[];
37
+ /** Data collection filters. Repeat param. Format: id:op:value where op is one of eq|neq|gt|gte|lt|lte|in|exists|missing. For in, pipe-delimit values. */
38
+ dataCollectionParams?: string | string[];
35
39
  /** Filter conversations by tool names used during the call. */
36
40
  toolNames?: string | string[];
37
41
  /** How many conversations to return at maximum. Can not exceed 100, defaults to 30. */
@@ -84,6 +84,19 @@ export declare class McpServers {
84
84
  */
85
85
  get(mcpServerId: string, requestOptions?: McpServers.RequestOptions): core.HttpResponsePromise<ElevenLabs.McpServerResponseModel>;
86
86
  private __get;
87
+ /**
88
+ * Delete a specific MCP server configuration from the workspace.
89
+ *
90
+ * @param {string} mcpServerId - ID of the MCP Server.
91
+ * @param {McpServers.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
94
+ *
95
+ * @example
96
+ * await client.conversationalAi.mcpServers.delete("mcp_server_id")
97
+ */
98
+ delete(mcpServerId: string, requestOptions?: McpServers.RequestOptions): core.HttpResponsePromise<unknown>;
99
+ private __delete;
87
100
  /**
88
101
  * Update the configuration settings for an MCP server.
89
102
  *
@@ -299,6 +299,70 @@ class McpServers {
299
299
  }
300
300
  });
301
301
  }
302
+ /**
303
+ * Delete a specific MCP server configuration from the workspace.
304
+ *
305
+ * @param {string} mcpServerId - ID of the MCP Server.
306
+ * @param {McpServers.RequestOptions} requestOptions - Request-specific configuration.
307
+ *
308
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
309
+ *
310
+ * @example
311
+ * await client.conversationalAi.mcpServers.delete("mcp_server_id")
312
+ */
313
+ delete(mcpServerId, requestOptions) {
314
+ return core.HttpResponsePromise.fromPromise(this.__delete(mcpServerId, requestOptions));
315
+ }
316
+ __delete(mcpServerId, requestOptions) {
317
+ return __awaiter(this, void 0, void 0, function* () {
318
+ var _a, _b, _c, _d, _e;
319
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
320
+ const _response = yield core.fetcher({
321
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, `v1/convai/mcp-servers/${encodeURIComponent(mcpServerId)}`),
322
+ method: "DELETE",
323
+ headers: _headers,
324
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
325
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
326
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
327
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
328
+ });
329
+ if (_response.ok) {
330
+ return { data: _response.body, rawResponse: _response.rawResponse };
331
+ }
332
+ if (_response.error.reason === "status-code") {
333
+ switch (_response.error.statusCode) {
334
+ case 422:
335
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
336
+ unrecognizedObjectKeys: "passthrough",
337
+ allowUnrecognizedUnionMembers: true,
338
+ allowUnrecognizedEnumValues: true,
339
+ breadcrumbsPrefix: ["response"],
340
+ }), _response.rawResponse);
341
+ default:
342
+ throw new errors.ElevenLabsError({
343
+ statusCode: _response.error.statusCode,
344
+ body: _response.error.body,
345
+ rawResponse: _response.rawResponse,
346
+ });
347
+ }
348
+ }
349
+ switch (_response.error.reason) {
350
+ case "non-json":
351
+ throw new errors.ElevenLabsError({
352
+ statusCode: _response.error.statusCode,
353
+ body: _response.error.rawBody,
354
+ rawResponse: _response.rawResponse,
355
+ });
356
+ case "timeout":
357
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling DELETE /v1/convai/mcp-servers/{mcp_server_id}.");
358
+ case "unknown":
359
+ throw new errors.ElevenLabsError({
360
+ message: _response.error.errorMessage,
361
+ rawResponse: _response.rawResponse,
362
+ });
363
+ }
364
+ });
365
+ }
302
366
  /**
303
367
  * Update the configuration settings for an MCP server.
304
368
  *
@@ -1 +1,5 @@
1
- export type AsrProvider = "elevenlabs";
1
+ export declare const AsrProvider: {
2
+ readonly Elevenlabs: "elevenlabs";
3
+ readonly ScribeRealtime: "scribe_realtime";
4
+ };
5
+ export type AsrProvider = (typeof AsrProvider)[keyof typeof AsrProvider];
@@ -1,3 +1,8 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AsrProvider = void 0;
5
+ exports.AsrProvider = {
6
+ Elevenlabs: "elevenlabs",
7
+ ScribeRealtime: "scribe_realtime",
8
+ };
@@ -12,4 +12,5 @@ export interface ConversationSummaryResponseModel {
12
12
  transcriptSummary?: string;
13
13
  callSummaryTitle?: string;
14
14
  direction?: ElevenLabs.ConversationSummaryResponseModelDirection;
15
+ rating?: number;
15
16
  }
@@ -80,4 +80,6 @@ export interface ProjectExtendedResponse {
80
80
  experimental?: Record<string, unknown>;
81
81
  /** List of uploaded assets e.g. videos, audios. */
82
82
  assets: ElevenLabs.ProjectExtendedResponseModelAssetsItem[];
83
+ /** List of configured project voices. */
84
+ voices: ElevenLabs.ProjectVoiceResponseModel[];
83
85
  }
@@ -0,0 +1,11 @@
1
+ export interface ProjectVoiceResponseModel {
2
+ voiceId: string;
3
+ alias: string;
4
+ stability: number;
5
+ similarityBoost: number;
6
+ style: number;
7
+ isPinned: boolean;
8
+ useSpeakerBoost: boolean;
9
+ volumeGain: number;
10
+ speed: number;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -15,6 +15,8 @@ export interface WebhookToolApiSchemaConfigInput {
15
15
  requestBodySchema?: ElevenLabs.ObjectJsonSchemaPropertyInput;
16
16
  /** Headers that should be included in the request */
17
17
  requestHeaders?: Record<string, ElevenLabs.WebhookToolApiSchemaConfigInputRequestHeadersValue>;
18
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
19
+ contentType?: ElevenLabs.WebhookToolApiSchemaConfigInputContentType;
18
20
  /** Optional auth connection to use for authentication with this webhook */
19
21
  authConnection?: ElevenLabs.AuthConnectionLocator;
20
22
  }
@@ -0,0 +1,6 @@
1
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
2
+ export declare const WebhookToolApiSchemaConfigInputContentType: {
3
+ readonly ApplicationJson: "application/json";
4
+ readonly ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded";
5
+ };
6
+ export type WebhookToolApiSchemaConfigInputContentType = (typeof WebhookToolApiSchemaConfigInputContentType)[keyof typeof WebhookToolApiSchemaConfigInputContentType];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WebhookToolApiSchemaConfigInputContentType = void 0;
5
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
6
+ exports.WebhookToolApiSchemaConfigInputContentType = {
7
+ ApplicationJson: "application/json",
8
+ ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded",
9
+ };
@@ -15,6 +15,8 @@ export interface WebhookToolApiSchemaConfigOutput {
15
15
  requestBodySchema?: ElevenLabs.ObjectJsonSchemaPropertyOutput;
16
16
  /** Headers that should be included in the request */
17
17
  requestHeaders?: Record<string, ElevenLabs.WebhookToolApiSchemaConfigOutputRequestHeadersValue>;
18
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
19
+ contentType?: ElevenLabs.WebhookToolApiSchemaConfigOutputContentType;
18
20
  /** Optional auth connection to use for authentication with this webhook */
19
21
  authConnection?: ElevenLabs.AuthConnectionLocator;
20
22
  }
@@ -0,0 +1,6 @@
1
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
2
+ export declare const WebhookToolApiSchemaConfigOutputContentType: {
3
+ readonly ApplicationJson: "application/json";
4
+ readonly ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded";
5
+ };
6
+ export type WebhookToolApiSchemaConfigOutputContentType = (typeof WebhookToolApiSchemaConfigOutputContentType)[keyof typeof WebhookToolApiSchemaConfigOutputContentType];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WebhookToolApiSchemaConfigOutputContentType = void 0;
5
+ /** Content type for the request body. Only applies to POST/PUT/PATCH requests. */
6
+ exports.WebhookToolApiSchemaConfigOutputContentType = {
7
+ ApplicationJson: "application/json",
8
+ ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded",
9
+ };
@@ -516,6 +516,7 @@ export * from "./ProjectSnapshotResponse";
516
516
  export * from "./ProjectSnapshotsResponse";
517
517
  export * from "./ProjectVideoResponseModel";
518
518
  export * from "./ProjectVideoThumbnailSheetResponseModel";
519
+ export * from "./ProjectVoiceResponseModel";
519
520
  export * from "./PromptAgentApiModelInputBackupLlmConfig";
520
521
  export * from "./PromptAgentApiModelInputToolsItem";
521
522
  export * from "./PromptAgentApiModelInput";
@@ -737,9 +738,11 @@ export * from "./WebhookAuthMethodType";
737
738
  export * from "./WebhookEventType";
738
739
  export * from "./WebhookToolApiSchemaConfigInputMethod";
739
740
  export * from "./WebhookToolApiSchemaConfigInputRequestHeadersValue";
741
+ export * from "./WebhookToolApiSchemaConfigInputContentType";
740
742
  export * from "./WebhookToolApiSchemaConfigInput";
741
743
  export * from "./WebhookToolApiSchemaConfigOutputMethod";
742
744
  export * from "./WebhookToolApiSchemaConfigOutputRequestHeadersValue";
745
+ export * from "./WebhookToolApiSchemaConfigOutputContentType";
743
746
  export * from "./WebhookToolApiSchemaConfigOutput";
744
747
  export * from "./WebhookToolConfigInput";
745
748
  export * from "./WebhookToolConfigOutput";
@@ -532,6 +532,7 @@ __exportStar(require("./ProjectSnapshotResponse"), exports);
532
532
  __exportStar(require("./ProjectSnapshotsResponse"), exports);
533
533
  __exportStar(require("./ProjectVideoResponseModel"), exports);
534
534
  __exportStar(require("./ProjectVideoThumbnailSheetResponseModel"), exports);
535
+ __exportStar(require("./ProjectVoiceResponseModel"), exports);
535
536
  __exportStar(require("./PromptAgentApiModelInputBackupLlmConfig"), exports);
536
537
  __exportStar(require("./PromptAgentApiModelInputToolsItem"), exports);
537
538
  __exportStar(require("./PromptAgentApiModelInput"), exports);
@@ -753,9 +754,11 @@ __exportStar(require("./WebhookAuthMethodType"), exports);
753
754
  __exportStar(require("./WebhookEventType"), exports);
754
755
  __exportStar(require("./WebhookToolApiSchemaConfigInputMethod"), exports);
755
756
  __exportStar(require("./WebhookToolApiSchemaConfigInputRequestHeadersValue"), exports);
757
+ __exportStar(require("./WebhookToolApiSchemaConfigInputContentType"), exports);
756
758
  __exportStar(require("./WebhookToolApiSchemaConfigInput"), exports);
757
759
  __exportStar(require("./WebhookToolApiSchemaConfigOutputMethod"), exports);
758
760
  __exportStar(require("./WebhookToolApiSchemaConfigOutputRequestHeadersValue"), exports);
761
+ __exportStar(require("./WebhookToolApiSchemaConfigOutputContentType"), exports);
759
762
  __exportStar(require("./WebhookToolApiSchemaConfigOutput"), exports);
760
763
  __exportStar(require("./WebhookToolConfigInput"), exports);
761
764
  __exportStar(require("./WebhookToolConfigOutput"), exports);
@@ -3,5 +3,5 @@ import * as ElevenLabs from "../../api/index";
3
3
  import * as core from "../../core";
4
4
  export declare const AsrProvider: core.serialization.Schema<serializers.AsrProvider.Raw, ElevenLabs.AsrProvider>;
5
5
  export declare namespace AsrProvider {
6
- type Raw = "elevenlabs";
6
+ type Raw = "elevenlabs" | "scribe_realtime";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.AsrProvider = void 0;
38
38
  const core = __importStar(require("../../core"));
39
- exports.AsrProvider = core.serialization.stringLiteral("elevenlabs");
39
+ exports.AsrProvider = core.serialization.enum_(["elevenlabs", "scribe_realtime"]);
@@ -19,5 +19,6 @@ export declare namespace ConversationSummaryResponseModel {
19
19
  transcript_summary?: string | null;
20
20
  call_summary_title?: string | null;
21
21
  direction?: ConversationSummaryResponseModelDirection.Raw | null;
22
+ rating?: number | null;
22
23
  }
23
24
  }