@elevenlabs/elevenlabs-js 2.19.0 → 2.20.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/api/resources/conversationalAi/resources/agents/client/Client.d.ts +3 -5
- package/api/resources/conversationalAi/resources/agents/client/Client.js +11 -15
- package/api/resources/conversationalAi/resources/agents/client/requests/AgentsListRequest.d.ts +3 -0
- package/api/resources/conversationalAi/resources/agents/client/requests/index.d.ts +0 -1
- package/api/resources/studio/client/Client.d.ts +1 -0
- package/api/resources/studio/client/Client.js +18 -2
- package/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
- package/api/types/AgentDefinitionSource.d.ts +7 -0
- package/api/types/AgentDefinitionSource.js +10 -0
- package/api/types/AgentSummaryResponseModel.d.ts +2 -0
- package/api/types/ClientToolConfigInput.d.ts +2 -0
- package/api/types/ClientToolConfigOutput.d.ts +2 -0
- package/api/types/ConversationHistoryMetadataCommonModel.d.ts +3 -0
- package/api/types/CreateAgentResponseModel.d.ts +0 -4
- package/api/types/GetAgentResponseModel.d.ts +0 -2
- package/api/types/ProjectExtendedResponse.d.ts +2 -0
- package/api/types/ProjectResponse.d.ts +2 -0
- package/api/types/ToolExecutionMode.d.ts +6 -0
- package/api/types/ToolExecutionMode.js +9 -0
- package/api/types/WebhookToolConfigInput.d.ts +2 -0
- package/api/types/WebhookToolConfigOutput.d.ts +2 -0
- package/api/types/WhatsAppConversationInfo.d.ts +4 -0
- package/api/types/index.d.ts +3 -10
- package/api/types/index.js +3 -10
- package/dist/Client.js +2 -2
- package/dist/api/resources/conversationalAi/resources/agents/client/Client.d.ts +3 -5
- package/dist/api/resources/conversationalAi/resources/agents/client/Client.js +11 -15
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/AgentsListRequest.d.ts +3 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/index.d.ts +0 -1
- package/dist/api/resources/studio/client/Client.d.ts +1 -0
- package/dist/api/resources/studio/client/Client.js +18 -2
- package/dist/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
- package/dist/api/types/AgentDefinitionSource.d.ts +7 -0
- package/dist/api/types/AgentDefinitionSource.js +10 -0
- package/dist/api/types/AgentSummaryResponseModel.d.ts +2 -0
- package/dist/api/types/ClientToolConfigInput.d.ts +2 -0
- package/dist/api/types/ClientToolConfigOutput.d.ts +2 -0
- package/dist/api/types/ConversationHistoryMetadataCommonModel.d.ts +3 -0
- package/dist/api/types/CreateAgentResponseModel.d.ts +0 -4
- package/dist/api/types/GetAgentResponseModel.d.ts +0 -2
- package/dist/api/types/ProjectExtendedResponse.d.ts +2 -0
- package/dist/api/types/ProjectResponse.d.ts +2 -0
- package/dist/api/types/ToolExecutionMode.d.ts +6 -0
- package/dist/api/types/ToolExecutionMode.js +9 -0
- package/dist/api/types/WebhookToolConfigInput.d.ts +2 -0
- package/dist/api/types/WebhookToolConfigOutput.d.ts +2 -0
- package/dist/api/types/WhatsAppConversationInfo.d.ts +4 -0
- package/dist/api/types/index.d.ts +3 -10
- package/dist/api/types/index.js +3 -10
- package/dist/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +1 -1
- package/dist/serialization/types/AgentDefinitionSource.d.ts +7 -0
- package/dist/serialization/types/{WhatsAppChangeMessages.js → AgentDefinitionSource.js} +2 -2
- package/dist/serialization/types/AgentSummaryResponseModel.d.ts +1 -0
- package/dist/serialization/types/AgentSummaryResponseModel.js +1 -0
- package/dist/serialization/types/ClientToolConfigInput.d.ts +2 -0
- package/dist/serialization/types/ClientToolConfigInput.js +2 -0
- package/dist/serialization/types/ClientToolConfigOutput.d.ts +2 -0
- package/dist/serialization/types/ClientToolConfigOutput.js +2 -0
- package/dist/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
- package/dist/serialization/types/ConversationHistoryMetadataCommonModel.js +5 -0
- package/dist/serialization/types/CreateAgentResponseModel.d.ts +0 -2
- package/dist/serialization/types/CreateAgentResponseModel.js +0 -2
- package/dist/serialization/types/GetAgentResponseModel.d.ts +0 -1
- package/dist/serialization/types/GetAgentResponseModel.js +0 -1
- package/dist/serialization/types/ProjectExtendedResponse.d.ts +1 -0
- package/dist/serialization/types/ProjectExtendedResponse.js +1 -0
- package/dist/serialization/types/ProjectResponse.d.ts +1 -0
- package/dist/serialization/types/ProjectResponse.js +1 -0
- package/dist/serialization/types/ToolExecutionMode.d.ts +7 -0
- package/{serialization/types/WhatsAppCallDirection.js → dist/serialization/types/ToolExecutionMode.js} +2 -2
- package/dist/serialization/types/WebhookToolConfigInput.d.ts +2 -0
- package/dist/serialization/types/WebhookToolConfigInput.js +2 -0
- package/dist/serialization/types/WebhookToolConfigOutput.d.ts +2 -0
- package/dist/serialization/types/WebhookToolConfigOutput.js +2 -0
- package/dist/serialization/types/WhatsAppConversationInfo.d.ts +10 -0
- package/dist/serialization/types/{WhatsAppMetadata.js → WhatsAppConversationInfo.js} +4 -3
- package/dist/serialization/types/index.d.ts +3 -10
- package/dist/serialization/types/index.js +3 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/ElevenLabsClient.d.ts +3 -0
- package/dist/wrapper/ElevenLabsClient.js +8 -1
- package/dist/wrapper/index.d.ts +2 -0
- package/dist/wrapper/index.js +8 -1
- package/dist/wrapper/music.d.ts +74 -3
- package/dist/wrapper/music.js +127 -14
- package/dist/wrapper/realtime/connection.d.ts +179 -0
- package/dist/wrapper/realtime/connection.js +260 -0
- package/dist/wrapper/realtime/index.d.ts +2 -0
- package/dist/wrapper/realtime/index.js +10 -0
- package/dist/wrapper/realtime/scribe.d.ts +112 -0
- package/dist/wrapper/realtime/scribe.js +265 -0
- package/dist/wrapper/speechToText.d.ts +6 -0
- package/dist/wrapper/speechToText.js +14 -0
- package/package.json +11 -10
- package/reference.md +4 -12
- package/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +1 -1
- package/serialization/types/AgentDefinitionSource.d.ts +7 -0
- package/serialization/types/{WhatsAppChangeMessages.js → AgentDefinitionSource.js} +2 -2
- package/serialization/types/AgentSummaryResponseModel.d.ts +1 -0
- package/serialization/types/AgentSummaryResponseModel.js +1 -0
- package/serialization/types/ClientToolConfigInput.d.ts +2 -0
- package/serialization/types/ClientToolConfigInput.js +2 -0
- package/serialization/types/ClientToolConfigOutput.d.ts +2 -0
- package/serialization/types/ClientToolConfigOutput.js +2 -0
- package/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
- package/serialization/types/ConversationHistoryMetadataCommonModel.js +5 -0
- package/serialization/types/CreateAgentResponseModel.d.ts +0 -2
- package/serialization/types/CreateAgentResponseModel.js +0 -2
- package/serialization/types/GetAgentResponseModel.d.ts +0 -1
- package/serialization/types/GetAgentResponseModel.js +0 -1
- package/serialization/types/ProjectExtendedResponse.d.ts +1 -0
- package/serialization/types/ProjectExtendedResponse.js +1 -0
- package/serialization/types/ProjectResponse.d.ts +1 -0
- package/serialization/types/ProjectResponse.js +1 -0
- package/serialization/types/ToolExecutionMode.d.ts +7 -0
- package/{dist/serialization/types/WhatsAppCallDirection.js → serialization/types/ToolExecutionMode.js} +2 -2
- package/serialization/types/WebhookToolConfigInput.d.ts +2 -0
- package/serialization/types/WebhookToolConfigInput.js +2 -0
- package/serialization/types/WebhookToolConfigOutput.d.ts +2 -0
- package/serialization/types/WebhookToolConfigOutput.js +2 -0
- package/serialization/types/WhatsAppConversationInfo.d.ts +10 -0
- package/{dist/serialization/types/WhatsAppChangeCalls.js → serialization/types/WhatsAppConversationInfo.js} +4 -4
- package/serialization/types/index.d.ts +3 -10
- package/serialization/types/index.js +3 -10
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/ElevenLabsClient.d.ts +3 -0
- package/wrapper/ElevenLabsClient.js +8 -1
- package/wrapper/index.d.ts +2 -0
- package/wrapper/index.js +8 -1
- package/wrapper/music.d.ts +74 -3
- package/wrapper/music.js +127 -14
- package/wrapper/realtime/connection.d.ts +179 -0
- package/wrapper/realtime/connection.js +260 -0
- package/wrapper/realtime/index.d.ts +2 -0
- package/wrapper/realtime/index.js +10 -0
- package/wrapper/realtime/scribe.d.ts +112 -0
- package/wrapper/realtime/scribe.js +265 -0
- package/wrapper/speechToText.d.ts +6 -0
- package/wrapper/speechToText.js +14 -0
- package/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.d.ts +0 -10
- package/api/types/WhatsAppBusinessAccount.d.ts +0 -5
- package/api/types/WhatsAppBusinessAccountChangesItem.d.ts +0 -10
- package/api/types/WhatsAppBusinessAccountChangesItem.js +0 -3
- package/api/types/WhatsAppCall.d.ts +0 -10
- package/api/types/WhatsAppCall.js +0 -3
- package/api/types/WhatsAppCallDirection.d.ts +0 -5
- package/api/types/WhatsAppCallDirection.js +0 -8
- package/api/types/WhatsAppCalls.d.ts +0 -5
- package/api/types/WhatsAppCalls.js +0 -3
- package/api/types/WhatsAppChangeCalls.d.ts +0 -4
- package/api/types/WhatsAppChangeCalls.js +0 -3
- package/api/types/WhatsAppChangeMessages.d.ts +0 -2
- package/api/types/WhatsAppChangeMessages.js +0 -3
- package/api/types/WhatsAppEventRequest.d.ts +0 -5
- package/api/types/WhatsAppEventRequest.js +0 -3
- package/api/types/WhatsAppMetadata.d.ts +0 -3
- package/api/types/WhatsAppMetadata.js +0 -3
- package/api/types/WhatsAppSession.d.ts +0 -4
- package/api/types/WhatsAppSession.js +0 -3
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.d.ts +0 -10
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.js +0 -3
- package/dist/api/types/WhatsAppBusinessAccount.d.ts +0 -5
- package/dist/api/types/WhatsAppBusinessAccount.js +0 -3
- package/dist/api/types/WhatsAppBusinessAccountChangesItem.d.ts +0 -10
- package/dist/api/types/WhatsAppBusinessAccountChangesItem.js +0 -3
- package/dist/api/types/WhatsAppCall.d.ts +0 -10
- package/dist/api/types/WhatsAppCall.js +0 -3
- package/dist/api/types/WhatsAppCallDirection.d.ts +0 -5
- package/dist/api/types/WhatsAppCallDirection.js +0 -8
- package/dist/api/types/WhatsAppCalls.d.ts +0 -5
- package/dist/api/types/WhatsAppCalls.js +0 -3
- package/dist/api/types/WhatsAppChangeCalls.d.ts +0 -4
- package/dist/api/types/WhatsAppChangeCalls.js +0 -3
- package/dist/api/types/WhatsAppChangeMessages.d.ts +0 -2
- package/dist/api/types/WhatsAppChangeMessages.js +0 -3
- package/dist/api/types/WhatsAppEventRequest.d.ts +0 -5
- package/dist/api/types/WhatsAppEventRequest.js +0 -3
- package/dist/api/types/WhatsAppMetadata.d.ts +0 -3
- package/dist/api/types/WhatsAppMetadata.js +0 -3
- package/dist/api/types/WhatsAppSession.d.ts +0 -4
- package/dist/api/types/WhatsAppSession.js +0 -3
- package/dist/serialization/types/WhatsAppBusinessAccount.d.ts +0 -11
- package/dist/serialization/types/WhatsAppBusinessAccount.js +0 -43
- package/dist/serialization/types/WhatsAppBusinessAccountChangesItem.d.ts +0 -15
- package/dist/serialization/types/WhatsAppBusinessAccountChangesItem.js +0 -49
- package/dist/serialization/types/WhatsAppCall.d.ts +0 -17
- package/dist/serialization/types/WhatsAppCall.js +0 -49
- package/dist/serialization/types/WhatsAppCallDirection.d.ts +0 -7
- package/dist/serialization/types/WhatsAppCalls.d.ts +0 -12
- package/dist/serialization/types/WhatsAppCalls.js +0 -44
- package/dist/serialization/types/WhatsAppChangeCalls.d.ts +0 -10
- package/dist/serialization/types/WhatsAppChangeMessages.d.ts +0 -8
- package/dist/serialization/types/WhatsAppEventRequest.d.ts +0 -11
- package/dist/serialization/types/WhatsAppEventRequest.js +0 -43
- package/dist/serialization/types/WhatsAppMetadata.d.ts +0 -9
- package/dist/serialization/types/WhatsAppSession.d.ts +0 -10
- package/dist/serialization/types/WhatsAppSession.js +0 -42
- package/serialization/types/WhatsAppBusinessAccount.d.ts +0 -11
- package/serialization/types/WhatsAppBusinessAccount.js +0 -43
- package/serialization/types/WhatsAppBusinessAccountChangesItem.d.ts +0 -15
- package/serialization/types/WhatsAppBusinessAccountChangesItem.js +0 -49
- package/serialization/types/WhatsAppCall.d.ts +0 -17
- package/serialization/types/WhatsAppCall.js +0 -49
- package/serialization/types/WhatsAppCallDirection.d.ts +0 -7
- package/serialization/types/WhatsAppCalls.d.ts +0 -12
- package/serialization/types/WhatsAppCalls.js +0 -44
- package/serialization/types/WhatsAppChangeCalls.d.ts +0 -10
- package/serialization/types/WhatsAppChangeCalls.js +0 -42
- package/serialization/types/WhatsAppChangeMessages.d.ts +0 -8
- package/serialization/types/WhatsAppEventRequest.d.ts +0 -11
- package/serialization/types/WhatsAppEventRequest.js +0 -43
- package/serialization/types/WhatsAppMetadata.d.ts +0 -9
- package/serialization/types/WhatsAppMetadata.js +0 -41
- package/serialization/types/WhatsAppSession.d.ts +0 -10
- package/serialization/types/WhatsAppSession.js +0 -42
- /package/api/{resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.js → types/WhatsAppConversationInfo.js} +0 -0
- /package/{api/types/WhatsAppBusinessAccount.js → dist/api/types/WhatsAppConversationInfo.js} +0 -0
package/Client.js
CHANGED
|
@@ -77,8 +77,8 @@ class ElevenLabsClient {
|
|
|
77
77
|
"xi-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
|
|
78
78
|
"X-Fern-Language": "JavaScript",
|
|
79
79
|
"X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
|
|
80
|
-
"X-Fern-SDK-Version": "v2.
|
|
81
|
-
"User-Agent": "@elevenlabs/elevenlabs-js/v2.
|
|
80
|
+
"X-Fern-SDK-Version": "v2.20.1",
|
|
81
|
+
"User-Agent": "@elevenlabs/elevenlabs-js/v2.20.1",
|
|
82
82
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
83
83
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
84
84
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -60,17 +60,14 @@ export declare class Agents {
|
|
|
60
60
|
* Retrieve config for an agent
|
|
61
61
|
*
|
|
62
62
|
* @param {string} agentId - The id of an agent. This is returned on agent creation.
|
|
63
|
-
* @param {ElevenLabs.conversationalAi.AgentsGetRequest} request
|
|
64
63
|
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
64
|
*
|
|
66
65
|
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
67
66
|
*
|
|
68
67
|
* @example
|
|
69
|
-
* await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz"
|
|
70
|
-
* versionId: "version_id"
|
|
71
|
-
* })
|
|
68
|
+
* await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz")
|
|
72
69
|
*/
|
|
73
|
-
get(agentId: string,
|
|
70
|
+
get(agentId: string, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetAgentResponseModel>;
|
|
74
71
|
private __get;
|
|
75
72
|
/**
|
|
76
73
|
* Delete an agent
|
|
@@ -111,6 +108,7 @@ export declare class Agents {
|
|
|
111
108
|
* await client.conversationalAi.agents.list({
|
|
112
109
|
* pageSize: 1,
|
|
113
110
|
* search: "search",
|
|
111
|
+
* archived: true,
|
|
114
112
|
* sortDirection: "asc",
|
|
115
113
|
* sortBy: "name",
|
|
116
114
|
* cursor: "cursor"
|
|
@@ -157,33 +157,25 @@ class Agents {
|
|
|
157
157
|
* Retrieve config for an agent
|
|
158
158
|
*
|
|
159
159
|
* @param {string} agentId - The id of an agent. This is returned on agent creation.
|
|
160
|
-
* @param {ElevenLabs.conversationalAi.AgentsGetRequest} request
|
|
161
160
|
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
162
161
|
*
|
|
163
162
|
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
164
163
|
*
|
|
165
164
|
* @example
|
|
166
|
-
* await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz"
|
|
167
|
-
* versionId: "version_id"
|
|
168
|
-
* })
|
|
165
|
+
* await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz")
|
|
169
166
|
*/
|
|
170
|
-
get(agentId,
|
|
171
|
-
return core.HttpResponsePromise.fromPromise(this.__get(agentId,
|
|
167
|
+
get(agentId, requestOptions) {
|
|
168
|
+
return core.HttpResponsePromise.fromPromise(this.__get(agentId, requestOptions));
|
|
172
169
|
}
|
|
173
|
-
__get(
|
|
174
|
-
return __awaiter(this,
|
|
170
|
+
__get(agentId, requestOptions) {
|
|
171
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
172
|
var _a, _b, _c, _d, _e;
|
|
176
|
-
const { versionId } = request;
|
|
177
|
-
const _queryParams = {};
|
|
178
|
-
if (versionId != null) {
|
|
179
|
-
_queryParams["version_id"] = versionId;
|
|
180
|
-
}
|
|
181
173
|
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);
|
|
182
174
|
const _response = yield core.fetcher({
|
|
183
175
|
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/agents/${encodeURIComponent(agentId)}`),
|
|
184
176
|
method: "GET",
|
|
185
177
|
headers: _headers,
|
|
186
|
-
queryParameters:
|
|
178
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
187
179
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
188
180
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
189
181
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -387,6 +379,7 @@ class Agents {
|
|
|
387
379
|
* await client.conversationalAi.agents.list({
|
|
388
380
|
* pageSize: 1,
|
|
389
381
|
* search: "search",
|
|
382
|
+
* archived: true,
|
|
390
383
|
* sortDirection: "asc",
|
|
391
384
|
* sortBy: "name",
|
|
392
385
|
* cursor: "cursor"
|
|
@@ -398,7 +391,7 @@ class Agents {
|
|
|
398
391
|
__list() {
|
|
399
392
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
400
393
|
var _a, _b, _c, _d, _e;
|
|
401
|
-
const { pageSize, search, sortDirection, sortBy, cursor } = request;
|
|
394
|
+
const { pageSize, search, archived, sortDirection, sortBy, cursor } = request;
|
|
402
395
|
const _queryParams = {};
|
|
403
396
|
if (pageSize != null) {
|
|
404
397
|
_queryParams["page_size"] = pageSize.toString();
|
|
@@ -406,6 +399,9 @@ class Agents {
|
|
|
406
399
|
if (search != null) {
|
|
407
400
|
_queryParams["search"] = search;
|
|
408
401
|
}
|
|
402
|
+
if (archived != null) {
|
|
403
|
+
_queryParams["archived"] = archived.toString();
|
|
404
|
+
}
|
|
409
405
|
if (sortDirection != null) {
|
|
410
406
|
_queryParams["sort_direction"] = serializers.SortDirection.jsonOrThrow(sortDirection, {
|
|
411
407
|
unrecognizedObjectKeys: "strip",
|
package/api/resources/conversationalAi/resources/agents/client/requests/AgentsListRequest.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as ElevenLabs from "../../../../../../index";
|
|
|
4
4
|
* {
|
|
5
5
|
* pageSize: 1,
|
|
6
6
|
* search: "search",
|
|
7
|
+
* archived: true,
|
|
7
8
|
* sortDirection: "asc",
|
|
8
9
|
* sortBy: "name",
|
|
9
10
|
* cursor: "cursor"
|
|
@@ -14,6 +15,8 @@ export interface AgentsListRequest {
|
|
|
14
15
|
pageSize?: number;
|
|
15
16
|
/** Search by agents name. */
|
|
16
17
|
search?: string;
|
|
18
|
+
/** Filter agents by archived status */
|
|
19
|
+
archived?: boolean;
|
|
17
20
|
/** The direction to sort the results */
|
|
18
21
|
sortDirection?: ElevenLabs.SortDirection;
|
|
19
22
|
/** The field to sort the results by */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { type BodyCreateAgentV1ConvaiAgentsCreatePost } from "./BodyCreateAgentV1ConvaiAgentsCreatePost";
|
|
2
|
-
export { type AgentsGetRequest } from "./AgentsGetRequest";
|
|
3
2
|
export { type UpdateAgentRequest } from "./UpdateAgentRequest";
|
|
4
3
|
export { type AgentsListRequest } from "./AgentsListRequest";
|
|
5
4
|
export { type BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost } from "./BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost";
|
|
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
+
var t = {};
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
+
t[p] = s[p];
|
|
49
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
+
t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
45
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
57
|
exports.Studio = void 0;
|
|
47
58
|
const environments = __importStar(require("../../../../environments"));
|
|
@@ -69,6 +80,7 @@ class Studio {
|
|
|
69
80
|
*
|
|
70
81
|
* @example
|
|
71
82
|
* await client.studio.createPodcast({
|
|
83
|
+
* safetyIdentifier: "safety-identifier",
|
|
72
84
|
* modelId: "eleven_multilingual_v2",
|
|
73
85
|
* mode: {
|
|
74
86
|
* type: "conversation",
|
|
@@ -88,7 +100,11 @@ class Studio {
|
|
|
88
100
|
__createPodcast(request, requestOptions) {
|
|
89
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
102
|
var _a, _b, _c, _d, _e;
|
|
91
|
-
|
|
103
|
+
const { safetyIdentifier } = request, _body = __rest(request, ["safetyIdentifier"]);
|
|
104
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
105
|
+
"safety-identifier": safetyIdentifier != null ? safetyIdentifier : undefined,
|
|
106
|
+
"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,
|
|
107
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
92
108
|
const _response = yield core.fetcher({
|
|
93
109
|
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/studio/podcasts"),
|
|
94
110
|
method: "POST",
|
|
@@ -96,7 +112,7 @@ class Studio {
|
|
|
96
112
|
contentType: "application/json",
|
|
97
113
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
98
114
|
requestType: "json",
|
|
99
|
-
body: serializers.BodyCreatePodcastV1StudioPodcastsPost.jsonOrThrow(
|
|
115
|
+
body: serializers.BodyCreatePodcastV1StudioPodcastsPost.jsonOrThrow(_body, {
|
|
100
116
|
unrecognizedObjectKeys: "strip",
|
|
101
117
|
}),
|
|
102
118
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
@@ -2,6 +2,7 @@ import * as ElevenLabs from "../../../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
+
* safetyIdentifier: "safety-identifier",
|
|
5
6
|
* modelId: "eleven_multilingual_v2",
|
|
6
7
|
* mode: {
|
|
7
8
|
* type: "conversation",
|
|
@@ -16,6 +17,8 @@ import * as ElevenLabs from "../../../../index";
|
|
|
16
17
|
* }
|
|
17
18
|
*/
|
|
18
19
|
export interface BodyCreatePodcastV1StudioPodcastsPost {
|
|
20
|
+
/** Used for moderation. Your workspace must be allowlisted to use this feature. */
|
|
21
|
+
safetyIdentifier?: string;
|
|
19
22
|
/** The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. */
|
|
20
23
|
modelId: string;
|
|
21
24
|
/** The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AgentDefinitionSource = void 0;
|
|
5
|
+
exports.AgentDefinitionSource = {
|
|
6
|
+
Cli: "cli",
|
|
7
|
+
Ui: "ui",
|
|
8
|
+
Api: "api",
|
|
9
|
+
Unknown: "unknown",
|
|
10
|
+
};
|
|
@@ -12,4 +12,6 @@ export interface AgentSummaryResponseModel {
|
|
|
12
12
|
accessInfo: ElevenLabs.ResourceAccessInfo;
|
|
13
13
|
/** The time of the most recent call in unix seconds, null if no calls have been made */
|
|
14
14
|
lastCallTimeUnixSecs?: number;
|
|
15
|
+
/** Whether the agent is archived */
|
|
16
|
+
archived?: boolean;
|
|
15
17
|
}
|
|
@@ -20,4 +20,6 @@ export interface ClientToolConfigInput {
|
|
|
20
20
|
expectsResponse?: boolean;
|
|
21
21
|
/** Configuration for dynamic variables */
|
|
22
22
|
dynamicVariables?: ElevenLabs.DynamicVariablesConfig;
|
|
23
|
+
/** Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. */
|
|
24
|
+
executionMode?: ElevenLabs.ToolExecutionMode;
|
|
23
25
|
}
|
|
@@ -20,4 +20,6 @@ export interface ClientToolConfigOutput {
|
|
|
20
20
|
expectsResponse?: boolean;
|
|
21
21
|
/** Configuration for dynamic variables */
|
|
22
22
|
dynamicVariables?: ElevenLabs.DynamicVariablesConfig;
|
|
23
|
+
/** Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. */
|
|
24
|
+
executionMode?: ElevenLabs.ToolExecutionMode;
|
|
23
25
|
}
|
|
@@ -23,4 +23,7 @@ export interface ConversationHistoryMetadataCommonModel {
|
|
|
23
23
|
timezone?: string;
|
|
24
24
|
initiationTrigger?: ElevenLabs.ConversationHistoryMetadataCommonModelInitiationTrigger;
|
|
25
25
|
asyncMetadata?: ElevenLabs.AsyncConversationMetadata;
|
|
26
|
+
whatsapp?: ElevenLabs.WhatsAppConversationInfo;
|
|
27
|
+
agentCreatedFrom?: ElevenLabs.AgentDefinitionSource;
|
|
28
|
+
agentLastUpdatedFrom?: ElevenLabs.AgentDefinitionSource;
|
|
26
29
|
}
|
|
@@ -6,6 +6,8 @@ export interface ProjectExtendedResponse {
|
|
|
6
6
|
name: string;
|
|
7
7
|
/** The creation date of the project. */
|
|
8
8
|
createDateUnix: number;
|
|
9
|
+
/** The user ID who created the project. */
|
|
10
|
+
createdByUserId?: string;
|
|
9
11
|
/** The default title voice ID. */
|
|
10
12
|
defaultTitleVoiceId: string;
|
|
11
13
|
/** The default paragraph voice ID. */
|
|
@@ -6,6 +6,8 @@ export interface ProjectResponse {
|
|
|
6
6
|
name: string;
|
|
7
7
|
/** The creation date of the project. */
|
|
8
8
|
createDateUnix: number;
|
|
9
|
+
/** The user ID who created the project. */
|
|
10
|
+
createdByUserId?: string;
|
|
9
11
|
/** The default title voice ID. */
|
|
10
12
|
defaultTitleVoiceId: string;
|
|
11
13
|
/** The default paragraph voice ID. */
|
|
@@ -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.ToolExecutionMode = void 0;
|
|
5
|
+
exports.ToolExecutionMode = {
|
|
6
|
+
Immediate: "immediate",
|
|
7
|
+
PostToolSpeech: "post_tool_speech",
|
|
8
|
+
Async: "async",
|
|
9
|
+
};
|
|
@@ -18,4 +18,6 @@ export interface WebhookToolConfigInput {
|
|
|
18
18
|
apiSchema: ElevenLabs.WebhookToolApiSchemaConfigInput;
|
|
19
19
|
/** Configuration for dynamic variables */
|
|
20
20
|
dynamicVariables?: ElevenLabs.DynamicVariablesConfig;
|
|
21
|
+
/** Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. */
|
|
22
|
+
executionMode?: ElevenLabs.ToolExecutionMode;
|
|
21
23
|
}
|
|
@@ -18,4 +18,6 @@ export interface WebhookToolConfigOutput {
|
|
|
18
18
|
apiSchema: ElevenLabs.WebhookToolApiSchemaConfigOutput;
|
|
19
19
|
/** Configuration for dynamic variables */
|
|
20
20
|
dynamicVariables?: ElevenLabs.DynamicVariablesConfig;
|
|
21
|
+
/** Determines when and how the tool executes: 'immediate' executes the tool right away when requested by the LLM, 'post_tool_speech' waits for the agent to finish speaking before executing, 'async' runs the tool in the background without blocking - best for long-running operations. */
|
|
22
|
+
executionMode?: ElevenLabs.ToolExecutionMode;
|
|
21
23
|
}
|
package/api/types/index.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export * from "./AgentConfigApiModelWorkflowOverrideOutput";
|
|
|
77
77
|
export * from "./AgentConfigOverrideInput";
|
|
78
78
|
export * from "./AgentConfigOverrideOutput";
|
|
79
79
|
export * from "./AgentConfigOverrideConfig";
|
|
80
|
+
export * from "./AgentDefinitionSource";
|
|
80
81
|
export * from "./AgentFailureResponseExample";
|
|
81
82
|
export * from "./AgentMetadata";
|
|
82
83
|
export * from "./AgentMetadataResponseModel";
|
|
@@ -623,6 +624,7 @@ export * from "./TimeRange";
|
|
|
623
624
|
export * from "./TokenResponseModel";
|
|
624
625
|
export * from "./Tool";
|
|
625
626
|
export * from "./ToolAnnotations";
|
|
627
|
+
export * from "./ToolExecutionMode";
|
|
626
628
|
export * from "./ToolMockConfig";
|
|
627
629
|
export * from "./ToolRequestModelToolConfig";
|
|
628
630
|
export * from "./ToolRequestModel";
|
|
@@ -698,16 +700,7 @@ export * from "./WebhookToolApiSchemaConfigOutput";
|
|
|
698
700
|
export * from "./WebhookToolConfigInput";
|
|
699
701
|
export * from "./WebhookToolConfigOutput";
|
|
700
702
|
export * from "./WebhookUsageType";
|
|
701
|
-
export * from "./
|
|
702
|
-
export * from "./WhatsAppBusinessAccount";
|
|
703
|
-
export * from "./WhatsAppCallDirection";
|
|
704
|
-
export * from "./WhatsAppCall";
|
|
705
|
-
export * from "./WhatsAppCalls";
|
|
706
|
-
export * from "./WhatsAppChangeCalls";
|
|
707
|
-
export * from "./WhatsAppChangeMessages";
|
|
708
|
-
export * from "./WhatsAppEventRequest";
|
|
709
|
-
export * from "./WhatsAppMetadata";
|
|
710
|
-
export * from "./WhatsAppSession";
|
|
703
|
+
export * from "./WhatsAppConversationInfo";
|
|
711
704
|
export * from "./WidgetConfigInputAvatar";
|
|
712
705
|
export * from "./WidgetConfig";
|
|
713
706
|
export * from "./WidgetConfigOutputAvatar";
|
package/api/types/index.js
CHANGED
|
@@ -93,6 +93,7 @@ __exportStar(require("./AgentConfigApiModelWorkflowOverrideOutput"), exports);
|
|
|
93
93
|
__exportStar(require("./AgentConfigOverrideInput"), exports);
|
|
94
94
|
__exportStar(require("./AgentConfigOverrideOutput"), exports);
|
|
95
95
|
__exportStar(require("./AgentConfigOverrideConfig"), exports);
|
|
96
|
+
__exportStar(require("./AgentDefinitionSource"), exports);
|
|
96
97
|
__exportStar(require("./AgentFailureResponseExample"), exports);
|
|
97
98
|
__exportStar(require("./AgentMetadata"), exports);
|
|
98
99
|
__exportStar(require("./AgentMetadataResponseModel"), exports);
|
|
@@ -639,6 +640,7 @@ __exportStar(require("./TimeRange"), exports);
|
|
|
639
640
|
__exportStar(require("./TokenResponseModel"), exports);
|
|
640
641
|
__exportStar(require("./Tool"), exports);
|
|
641
642
|
__exportStar(require("./ToolAnnotations"), exports);
|
|
643
|
+
__exportStar(require("./ToolExecutionMode"), exports);
|
|
642
644
|
__exportStar(require("./ToolMockConfig"), exports);
|
|
643
645
|
__exportStar(require("./ToolRequestModelToolConfig"), exports);
|
|
644
646
|
__exportStar(require("./ToolRequestModel"), exports);
|
|
@@ -714,16 +716,7 @@ __exportStar(require("./WebhookToolApiSchemaConfigOutput"), exports);
|
|
|
714
716
|
__exportStar(require("./WebhookToolConfigInput"), exports);
|
|
715
717
|
__exportStar(require("./WebhookToolConfigOutput"), exports);
|
|
716
718
|
__exportStar(require("./WebhookUsageType"), exports);
|
|
717
|
-
__exportStar(require("./
|
|
718
|
-
__exportStar(require("./WhatsAppBusinessAccount"), exports);
|
|
719
|
-
__exportStar(require("./WhatsAppCallDirection"), exports);
|
|
720
|
-
__exportStar(require("./WhatsAppCall"), exports);
|
|
721
|
-
__exportStar(require("./WhatsAppCalls"), exports);
|
|
722
|
-
__exportStar(require("./WhatsAppChangeCalls"), exports);
|
|
723
|
-
__exportStar(require("./WhatsAppChangeMessages"), exports);
|
|
724
|
-
__exportStar(require("./WhatsAppEventRequest"), exports);
|
|
725
|
-
__exportStar(require("./WhatsAppMetadata"), exports);
|
|
726
|
-
__exportStar(require("./WhatsAppSession"), exports);
|
|
719
|
+
__exportStar(require("./WhatsAppConversationInfo"), exports);
|
|
727
720
|
__exportStar(require("./WidgetConfigInputAvatar"), exports);
|
|
728
721
|
__exportStar(require("./WidgetConfig"), exports);
|
|
729
722
|
__exportStar(require("./WidgetConfigOutputAvatar"), exports);
|
package/dist/Client.js
CHANGED
|
@@ -77,8 +77,8 @@ class ElevenLabsClient {
|
|
|
77
77
|
"xi-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
|
|
78
78
|
"X-Fern-Language": "JavaScript",
|
|
79
79
|
"X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
|
|
80
|
-
"X-Fern-SDK-Version": "v2.
|
|
81
|
-
"User-Agent": "@elevenlabs/elevenlabs-js/v2.
|
|
80
|
+
"X-Fern-SDK-Version": "v2.20.1",
|
|
81
|
+
"User-Agent": "@elevenlabs/elevenlabs-js/v2.20.1",
|
|
82
82
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
83
83
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
84
84
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -60,17 +60,14 @@ export declare class Agents {
|
|
|
60
60
|
* Retrieve config for an agent
|
|
61
61
|
*
|
|
62
62
|
* @param {string} agentId - The id of an agent. This is returned on agent creation.
|
|
63
|
-
* @param {ElevenLabs.conversationalAi.AgentsGetRequest} request
|
|
64
63
|
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
64
|
*
|
|
66
65
|
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
67
66
|
*
|
|
68
67
|
* @example
|
|
69
|
-
* await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz"
|
|
70
|
-
* versionId: "version_id"
|
|
71
|
-
* })
|
|
68
|
+
* await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz")
|
|
72
69
|
*/
|
|
73
|
-
get(agentId: string,
|
|
70
|
+
get(agentId: string, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetAgentResponseModel>;
|
|
74
71
|
private __get;
|
|
75
72
|
/**
|
|
76
73
|
* Delete an agent
|
|
@@ -111,6 +108,7 @@ export declare class Agents {
|
|
|
111
108
|
* await client.conversationalAi.agents.list({
|
|
112
109
|
* pageSize: 1,
|
|
113
110
|
* search: "search",
|
|
111
|
+
* archived: true,
|
|
114
112
|
* sortDirection: "asc",
|
|
115
113
|
* sortBy: "name",
|
|
116
114
|
* cursor: "cursor"
|
|
@@ -157,33 +157,25 @@ class Agents {
|
|
|
157
157
|
* Retrieve config for an agent
|
|
158
158
|
*
|
|
159
159
|
* @param {string} agentId - The id of an agent. This is returned on agent creation.
|
|
160
|
-
* @param {ElevenLabs.conversationalAi.AgentsGetRequest} request
|
|
161
160
|
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
162
161
|
*
|
|
163
162
|
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
164
163
|
*
|
|
165
164
|
* @example
|
|
166
|
-
* await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz"
|
|
167
|
-
* versionId: "version_id"
|
|
168
|
-
* })
|
|
165
|
+
* await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz")
|
|
169
166
|
*/
|
|
170
|
-
get(agentId,
|
|
171
|
-
return core.HttpResponsePromise.fromPromise(this.__get(agentId,
|
|
167
|
+
get(agentId, requestOptions) {
|
|
168
|
+
return core.HttpResponsePromise.fromPromise(this.__get(agentId, requestOptions));
|
|
172
169
|
}
|
|
173
|
-
__get(
|
|
174
|
-
return __awaiter(this,
|
|
170
|
+
__get(agentId, requestOptions) {
|
|
171
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
172
|
var _a, _b, _c, _d, _e;
|
|
176
|
-
const { versionId } = request;
|
|
177
|
-
const _queryParams = {};
|
|
178
|
-
if (versionId != null) {
|
|
179
|
-
_queryParams["version_id"] = versionId;
|
|
180
|
-
}
|
|
181
173
|
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);
|
|
182
174
|
const _response = yield core.fetcher({
|
|
183
175
|
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/agents/${encodeURIComponent(agentId)}`),
|
|
184
176
|
method: "GET",
|
|
185
177
|
headers: _headers,
|
|
186
|
-
queryParameters:
|
|
178
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
187
179
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
188
180
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
189
181
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -387,6 +379,7 @@ class Agents {
|
|
|
387
379
|
* await client.conversationalAi.agents.list({
|
|
388
380
|
* pageSize: 1,
|
|
389
381
|
* search: "search",
|
|
382
|
+
* archived: true,
|
|
390
383
|
* sortDirection: "asc",
|
|
391
384
|
* sortBy: "name",
|
|
392
385
|
* cursor: "cursor"
|
|
@@ -398,7 +391,7 @@ class Agents {
|
|
|
398
391
|
__list() {
|
|
399
392
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
400
393
|
var _a, _b, _c, _d, _e;
|
|
401
|
-
const { pageSize, search, sortDirection, sortBy, cursor } = request;
|
|
394
|
+
const { pageSize, search, archived, sortDirection, sortBy, cursor } = request;
|
|
402
395
|
const _queryParams = {};
|
|
403
396
|
if (pageSize != null) {
|
|
404
397
|
_queryParams["page_size"] = pageSize.toString();
|
|
@@ -406,6 +399,9 @@ class Agents {
|
|
|
406
399
|
if (search != null) {
|
|
407
400
|
_queryParams["search"] = search;
|
|
408
401
|
}
|
|
402
|
+
if (archived != null) {
|
|
403
|
+
_queryParams["archived"] = archived.toString();
|
|
404
|
+
}
|
|
409
405
|
if (sortDirection != null) {
|
|
410
406
|
_queryParams["sort_direction"] = serializers.SortDirection.jsonOrThrow(sortDirection, {
|
|
411
407
|
unrecognizedObjectKeys: "strip",
|
package/dist/api/resources/conversationalAi/resources/agents/client/requests/AgentsListRequest.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as ElevenLabs from "../../../../../../index";
|
|
|
4
4
|
* {
|
|
5
5
|
* pageSize: 1,
|
|
6
6
|
* search: "search",
|
|
7
|
+
* archived: true,
|
|
7
8
|
* sortDirection: "asc",
|
|
8
9
|
* sortBy: "name",
|
|
9
10
|
* cursor: "cursor"
|
|
@@ -14,6 +15,8 @@ export interface AgentsListRequest {
|
|
|
14
15
|
pageSize?: number;
|
|
15
16
|
/** Search by agents name. */
|
|
16
17
|
search?: string;
|
|
18
|
+
/** Filter agents by archived status */
|
|
19
|
+
archived?: boolean;
|
|
17
20
|
/** The direction to sort the results */
|
|
18
21
|
sortDirection?: ElevenLabs.SortDirection;
|
|
19
22
|
/** The field to sort the results by */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { type BodyCreateAgentV1ConvaiAgentsCreatePost } from "./BodyCreateAgentV1ConvaiAgentsCreatePost";
|
|
2
|
-
export { type AgentsGetRequest } from "./AgentsGetRequest";
|
|
3
2
|
export { type UpdateAgentRequest } from "./UpdateAgentRequest";
|
|
4
3
|
export { type AgentsListRequest } from "./AgentsListRequest";
|
|
5
4
|
export { type BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost } from "./BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost";
|
|
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
+
var t = {};
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
+
t[p] = s[p];
|
|
49
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
+
t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
45
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
57
|
exports.Studio = void 0;
|
|
47
58
|
const environments = __importStar(require("../../../../environments"));
|
|
@@ -69,6 +80,7 @@ class Studio {
|
|
|
69
80
|
*
|
|
70
81
|
* @example
|
|
71
82
|
* await client.studio.createPodcast({
|
|
83
|
+
* safetyIdentifier: "safety-identifier",
|
|
72
84
|
* modelId: "eleven_multilingual_v2",
|
|
73
85
|
* mode: {
|
|
74
86
|
* type: "conversation",
|
|
@@ -88,7 +100,11 @@ class Studio {
|
|
|
88
100
|
__createPodcast(request, requestOptions) {
|
|
89
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
102
|
var _a, _b, _c, _d, _e;
|
|
91
|
-
|
|
103
|
+
const { safetyIdentifier } = request, _body = __rest(request, ["safetyIdentifier"]);
|
|
104
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
105
|
+
"safety-identifier": safetyIdentifier != null ? safetyIdentifier : undefined,
|
|
106
|
+
"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,
|
|
107
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
92
108
|
const _response = yield core.fetcher({
|
|
93
109
|
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/studio/podcasts"),
|
|
94
110
|
method: "POST",
|
|
@@ -96,7 +112,7 @@ class Studio {
|
|
|
96
112
|
contentType: "application/json",
|
|
97
113
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
98
114
|
requestType: "json",
|
|
99
|
-
body: serializers.BodyCreatePodcastV1StudioPodcastsPost.jsonOrThrow(
|
|
115
|
+
body: serializers.BodyCreatePodcastV1StudioPodcastsPost.jsonOrThrow(_body, {
|
|
100
116
|
unrecognizedObjectKeys: "strip",
|
|
101
117
|
}),
|
|
102
118
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
package/dist/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as ElevenLabs from "../../../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
+
* safetyIdentifier: "safety-identifier",
|
|
5
6
|
* modelId: "eleven_multilingual_v2",
|
|
6
7
|
* mode: {
|
|
7
8
|
* type: "conversation",
|
|
@@ -16,6 +17,8 @@ import * as ElevenLabs from "../../../../index";
|
|
|
16
17
|
* }
|
|
17
18
|
*/
|
|
18
19
|
export interface BodyCreatePodcastV1StudioPodcastsPost {
|
|
20
|
+
/** Used for moderation. Your workspace must be allowlisted to use this feature. */
|
|
21
|
+
safetyIdentifier?: string;
|
|
19
22
|
/** The ID of the model to be used for this Studio project, you can query GET /v1/models to list all available models. */
|
|
20
23
|
modelId: string;
|
|
21
24
|
/** The type of podcast to generate. Can be 'conversation', an interaction between two voices, or 'bulletin', a monologue. */
|