@elevenlabs/elevenlabs-js 2.23.0 → 2.24.1
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.
- package/Client.js +2 -2
- package/README.md +3 -3
- package/api/resources/conversationalAi/resources/conversations/client/Client.js +17 -1
- package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +4 -0
- package/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +13 -0
- package/api/resources/conversationalAi/resources/mcpServers/client/Client.js +64 -0
- package/api/types/AsrProvider.d.ts +5 -1
- package/api/types/AsrProvider.js +5 -0
- package/api/types/ConversationSummaryResponseModel.d.ts +1 -0
- package/api/types/ProjectExtendedResponse.d.ts +2 -0
- package/api/types/ProjectVoiceResponseModel.d.ts +11 -0
- package/api/types/ProjectVoiceResponseModel.js +3 -0
- package/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
- package/api/types/WebhookToolApiSchemaConfigInputContentType.d.ts +6 -0
- package/api/types/WebhookToolApiSchemaConfigInputContentType.js +9 -0
- package/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
- package/api/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +6 -0
- package/api/types/WebhookToolApiSchemaConfigOutputContentType.js +9 -0
- package/api/types/index.d.ts +3 -0
- package/api/types/index.js +3 -0
- package/dist/Client.js +2 -2
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +17 -1
- package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +4 -0
- package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +13 -0
- package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.js +64 -0
- package/dist/api/types/AsrProvider.d.ts +5 -1
- package/dist/api/types/AsrProvider.js +5 -0
- package/dist/api/types/ConversationSummaryResponseModel.d.ts +1 -0
- package/dist/api/types/ProjectExtendedResponse.d.ts +2 -0
- package/dist/api/types/ProjectVoiceResponseModel.d.ts +11 -0
- package/dist/api/types/ProjectVoiceResponseModel.js +3 -0
- package/dist/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
- package/dist/api/types/WebhookToolApiSchemaConfigInputContentType.d.ts +6 -0
- package/dist/api/types/WebhookToolApiSchemaConfigInputContentType.js +9 -0
- package/dist/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
- package/dist/api/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +6 -0
- package/dist/api/types/WebhookToolApiSchemaConfigOutputContentType.js +9 -0
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- package/dist/serialization/types/AsrProvider.d.ts +1 -1
- package/dist/serialization/types/AsrProvider.js +1 -1
- package/dist/serialization/types/ConversationSummaryResponseModel.d.ts +1 -0
- package/dist/serialization/types/ConversationSummaryResponseModel.js +1 -0
- package/dist/serialization/types/ProjectExtendedResponse.d.ts +2 -0
- package/dist/serialization/types/ProjectExtendedResponse.js +2 -0
- package/dist/serialization/types/ProjectVoiceResponseModel.d.ts +17 -0
- package/dist/serialization/types/ProjectVoiceResponseModel.js +49 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigInputContentType.d.ts +7 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigInputContentType.js +39 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +7 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigOutputContentType.js +39 -0
- package/dist/serialization/types/index.d.ts +3 -0
- package/dist/serialization/types/index.js +3 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/realtime/connection.d.ts +18 -1
- package/dist/wrapper/realtime/connection.js +13 -0
- package/dist/wrapper/realtime/scribe.d.ts +5 -0
- package/dist/wrapper/realtime/scribe.js +3 -0
- package/package.json +1 -1
- package/reference.md +63 -0
- package/serialization/types/AsrProvider.d.ts +1 -1
- package/serialization/types/AsrProvider.js +1 -1
- package/serialization/types/ConversationSummaryResponseModel.d.ts +1 -0
- package/serialization/types/ConversationSummaryResponseModel.js +1 -0
- package/serialization/types/ProjectExtendedResponse.d.ts +2 -0
- package/serialization/types/ProjectExtendedResponse.js +2 -0
- package/serialization/types/ProjectVoiceResponseModel.d.ts +17 -0
- package/serialization/types/ProjectVoiceResponseModel.js +49 -0
- package/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
- package/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
- package/serialization/types/WebhookToolApiSchemaConfigInputContentType.d.ts +7 -0
- package/serialization/types/WebhookToolApiSchemaConfigInputContentType.js +39 -0
- package/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
- package/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
- package/serialization/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +7 -0
- package/serialization/types/WebhookToolApiSchemaConfigOutputContentType.js +39 -0
- package/serialization/types/index.d.ts +3 -0
- package/serialization/types/index.js +3 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/realtime/connection.d.ts +18 -1
- package/wrapper/realtime/connection.js +13 -0
- package/wrapper/realtime/scribe.d.ts +5 -0
- package/wrapper/realtime/scribe.js +3 -0
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.
|
|
82
|
-
"User-Agent": "@elevenlabs/elevenlabs-js/v2.
|
|
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) });
|
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ stream(audioStream);
|
|
|
99
99
|
## Retries
|
|
100
100
|
|
|
101
101
|
This Node SDK is instrumented with automatic retries with exponential backoff. A request will be
|
|
102
|
-
retried as long as the request is deemed
|
|
102
|
+
retried as long as the request is deemed retry-able and the number of retry attempts has not grown larger
|
|
103
103
|
than the configured retry limit (default: 2).
|
|
104
104
|
|
|
105
105
|
A request is deemed able to retry when any of the following HTTP status codes is returned:
|
|
@@ -122,7 +122,7 @@ const response = await elevenlabs.voices.search(
|
|
|
122
122
|
|
|
123
123
|
## Timeouts
|
|
124
124
|
|
|
125
|
-
The SDK defaults to a 60 second
|
|
125
|
+
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to
|
|
126
126
|
configure this behavior.
|
|
127
127
|
|
|
128
128
|
```ts
|
|
@@ -134,7 +134,7 @@ const response = await elevenlabs.voices.search(
|
|
|
134
134
|
);
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
## Runtime
|
|
137
|
+
## Runtime compatibility
|
|
138
138
|
|
|
139
139
|
The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK
|
|
140
140
|
works in the following runtimes:
|
|
@@ -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
|
*
|
package/api/types/AsrProvider.js
CHANGED
|
@@ -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
|
+
};
|
|
@@ -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
|
}
|
|
@@ -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
|
+
};
|
package/api/types/index.d.ts
CHANGED
|
@@ -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";
|
package/api/types/index.js
CHANGED
|
@@ -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.
|
|
82
|
-
"User-Agent": "@elevenlabs/elevenlabs-js/v2.
|
|
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,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
|
+
};
|
|
@@ -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
|
}
|
|
@@ -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";
|
package/dist/api/types/index.js
CHANGED
|
@@ -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);
|