@elevenlabs/elevenlabs-js 2.19.0 → 2.20.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 (216) hide show
  1. package/Client.js +2 -2
  2. package/api/resources/conversationalAi/resources/agents/client/Client.d.ts +3 -5
  3. package/api/resources/conversationalAi/resources/agents/client/Client.js +11 -15
  4. package/api/resources/conversationalAi/resources/agents/client/requests/AgentsListRequest.d.ts +3 -0
  5. package/api/resources/conversationalAi/resources/agents/client/requests/index.d.ts +0 -1
  6. package/api/resources/studio/client/Client.d.ts +1 -0
  7. package/api/resources/studio/client/Client.js +18 -2
  8. package/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
  9. package/api/types/AgentDefinitionSource.d.ts +7 -0
  10. package/api/types/AgentDefinitionSource.js +10 -0
  11. package/api/types/AgentSummaryResponseModel.d.ts +2 -0
  12. package/api/types/ClientToolConfigInput.d.ts +2 -0
  13. package/api/types/ClientToolConfigOutput.d.ts +2 -0
  14. package/api/types/ConversationHistoryMetadataCommonModel.d.ts +3 -0
  15. package/api/types/CreateAgentResponseModel.d.ts +0 -4
  16. package/api/types/GetAgentResponseModel.d.ts +0 -2
  17. package/api/types/ProjectExtendedResponse.d.ts +2 -0
  18. package/api/types/ProjectResponse.d.ts +2 -0
  19. package/api/types/ToolExecutionMode.d.ts +6 -0
  20. package/api/types/ToolExecutionMode.js +9 -0
  21. package/api/types/WebhookToolConfigInput.d.ts +2 -0
  22. package/api/types/WebhookToolConfigOutput.d.ts +2 -0
  23. package/api/types/WhatsAppConversationInfo.d.ts +4 -0
  24. package/api/types/index.d.ts +3 -10
  25. package/api/types/index.js +3 -10
  26. package/dist/Client.js +2 -2
  27. package/dist/api/resources/conversationalAi/resources/agents/client/Client.d.ts +3 -5
  28. package/dist/api/resources/conversationalAi/resources/agents/client/Client.js +11 -15
  29. package/dist/api/resources/conversationalAi/resources/agents/client/requests/AgentsListRequest.d.ts +3 -0
  30. package/dist/api/resources/conversationalAi/resources/agents/client/requests/index.d.ts +0 -1
  31. package/dist/api/resources/studio/client/Client.d.ts +1 -0
  32. package/dist/api/resources/studio/client/Client.js +18 -2
  33. package/dist/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
  34. package/dist/api/types/AgentDefinitionSource.d.ts +7 -0
  35. package/dist/api/types/AgentDefinitionSource.js +10 -0
  36. package/dist/api/types/AgentSummaryResponseModel.d.ts +2 -0
  37. package/dist/api/types/ClientToolConfigInput.d.ts +2 -0
  38. package/dist/api/types/ClientToolConfigOutput.d.ts +2 -0
  39. package/dist/api/types/ConversationHistoryMetadataCommonModel.d.ts +3 -0
  40. package/dist/api/types/CreateAgentResponseModel.d.ts +0 -4
  41. package/dist/api/types/GetAgentResponseModel.d.ts +0 -2
  42. package/dist/api/types/ProjectExtendedResponse.d.ts +2 -0
  43. package/dist/api/types/ProjectResponse.d.ts +2 -0
  44. package/dist/api/types/ToolExecutionMode.d.ts +6 -0
  45. package/dist/api/types/ToolExecutionMode.js +9 -0
  46. package/dist/api/types/WebhookToolConfigInput.d.ts +2 -0
  47. package/dist/api/types/WebhookToolConfigOutput.d.ts +2 -0
  48. package/dist/api/types/WhatsAppConversationInfo.d.ts +4 -0
  49. package/dist/api/types/index.d.ts +3 -10
  50. package/dist/api/types/index.js +3 -10
  51. package/dist/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +1 -1
  52. package/dist/serialization/types/AgentDefinitionSource.d.ts +7 -0
  53. package/dist/serialization/types/{WhatsAppChangeMessages.js → AgentDefinitionSource.js} +2 -2
  54. package/dist/serialization/types/AgentSummaryResponseModel.d.ts +1 -0
  55. package/dist/serialization/types/AgentSummaryResponseModel.js +1 -0
  56. package/dist/serialization/types/ClientToolConfigInput.d.ts +2 -0
  57. package/dist/serialization/types/ClientToolConfigInput.js +2 -0
  58. package/dist/serialization/types/ClientToolConfigOutput.d.ts +2 -0
  59. package/dist/serialization/types/ClientToolConfigOutput.js +2 -0
  60. package/dist/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
  61. package/dist/serialization/types/ConversationHistoryMetadataCommonModel.js +5 -0
  62. package/dist/serialization/types/CreateAgentResponseModel.d.ts +0 -2
  63. package/dist/serialization/types/CreateAgentResponseModel.js +0 -2
  64. package/dist/serialization/types/GetAgentResponseModel.d.ts +0 -1
  65. package/dist/serialization/types/GetAgentResponseModel.js +0 -1
  66. package/dist/serialization/types/ProjectExtendedResponse.d.ts +1 -0
  67. package/dist/serialization/types/ProjectExtendedResponse.js +1 -0
  68. package/dist/serialization/types/ProjectResponse.d.ts +1 -0
  69. package/dist/serialization/types/ProjectResponse.js +1 -0
  70. package/dist/serialization/types/ToolExecutionMode.d.ts +7 -0
  71. package/{serialization/types/WhatsAppCallDirection.js → dist/serialization/types/ToolExecutionMode.js} +2 -2
  72. package/dist/serialization/types/WebhookToolConfigInput.d.ts +2 -0
  73. package/dist/serialization/types/WebhookToolConfigInput.js +2 -0
  74. package/dist/serialization/types/WebhookToolConfigOutput.d.ts +2 -0
  75. package/dist/serialization/types/WebhookToolConfigOutput.js +2 -0
  76. package/dist/serialization/types/WhatsAppConversationInfo.d.ts +10 -0
  77. package/dist/serialization/types/{WhatsAppMetadata.js → WhatsAppConversationInfo.js} +4 -3
  78. package/dist/serialization/types/index.d.ts +3 -10
  79. package/dist/serialization/types/index.js +3 -10
  80. package/dist/version.d.ts +1 -1
  81. package/dist/version.js +1 -1
  82. package/dist/wrapper/ElevenLabsClient.d.ts +3 -0
  83. package/dist/wrapper/ElevenLabsClient.js +7 -0
  84. package/dist/wrapper/index.d.ts +2 -0
  85. package/dist/wrapper/index.js +8 -1
  86. package/dist/wrapper/realtime/connection.d.ts +179 -0
  87. package/dist/wrapper/realtime/connection.js +261 -0
  88. package/dist/wrapper/realtime/index.d.ts +2 -0
  89. package/dist/wrapper/realtime/index.js +10 -0
  90. package/dist/wrapper/realtime/scribe.d.ts +107 -0
  91. package/dist/wrapper/realtime/scribe.js +262 -0
  92. package/dist/wrapper/speechToText.d.ts +6 -0
  93. package/dist/wrapper/speechToText.js +14 -0
  94. package/package.json +1 -1
  95. package/reference.md +4 -12
  96. package/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +1 -1
  97. package/serialization/types/AgentDefinitionSource.d.ts +7 -0
  98. package/serialization/types/{WhatsAppChangeMessages.js → AgentDefinitionSource.js} +2 -2
  99. package/serialization/types/AgentSummaryResponseModel.d.ts +1 -0
  100. package/serialization/types/AgentSummaryResponseModel.js +1 -0
  101. package/serialization/types/ClientToolConfigInput.d.ts +2 -0
  102. package/serialization/types/ClientToolConfigInput.js +2 -0
  103. package/serialization/types/ClientToolConfigOutput.d.ts +2 -0
  104. package/serialization/types/ClientToolConfigOutput.js +2 -0
  105. package/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
  106. package/serialization/types/ConversationHistoryMetadataCommonModel.js +5 -0
  107. package/serialization/types/CreateAgentResponseModel.d.ts +0 -2
  108. package/serialization/types/CreateAgentResponseModel.js +0 -2
  109. package/serialization/types/GetAgentResponseModel.d.ts +0 -1
  110. package/serialization/types/GetAgentResponseModel.js +0 -1
  111. package/serialization/types/ProjectExtendedResponse.d.ts +1 -0
  112. package/serialization/types/ProjectExtendedResponse.js +1 -0
  113. package/serialization/types/ProjectResponse.d.ts +1 -0
  114. package/serialization/types/ProjectResponse.js +1 -0
  115. package/serialization/types/ToolExecutionMode.d.ts +7 -0
  116. package/{dist/serialization/types/WhatsAppCallDirection.js → serialization/types/ToolExecutionMode.js} +2 -2
  117. package/serialization/types/WebhookToolConfigInput.d.ts +2 -0
  118. package/serialization/types/WebhookToolConfigInput.js +2 -0
  119. package/serialization/types/WebhookToolConfigOutput.d.ts +2 -0
  120. package/serialization/types/WebhookToolConfigOutput.js +2 -0
  121. package/serialization/types/WhatsAppConversationInfo.d.ts +10 -0
  122. package/{dist/serialization/types/WhatsAppChangeCalls.js → serialization/types/WhatsAppConversationInfo.js} +4 -4
  123. package/serialization/types/index.d.ts +3 -10
  124. package/serialization/types/index.js +3 -10
  125. package/version.d.ts +1 -1
  126. package/version.js +1 -1
  127. package/wrapper/ElevenLabsClient.d.ts +3 -0
  128. package/wrapper/ElevenLabsClient.js +7 -0
  129. package/wrapper/index.d.ts +2 -0
  130. package/wrapper/index.js +8 -1
  131. package/wrapper/realtime/connection.d.ts +179 -0
  132. package/wrapper/realtime/connection.js +261 -0
  133. package/wrapper/realtime/index.d.ts +2 -0
  134. package/wrapper/realtime/index.js +10 -0
  135. package/wrapper/realtime/scribe.d.ts +107 -0
  136. package/wrapper/realtime/scribe.js +262 -0
  137. package/wrapper/speechToText.d.ts +6 -0
  138. package/wrapper/speechToText.js +14 -0
  139. package/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.d.ts +0 -10
  140. package/api/types/WhatsAppBusinessAccount.d.ts +0 -5
  141. package/api/types/WhatsAppBusinessAccountChangesItem.d.ts +0 -10
  142. package/api/types/WhatsAppBusinessAccountChangesItem.js +0 -3
  143. package/api/types/WhatsAppCall.d.ts +0 -10
  144. package/api/types/WhatsAppCall.js +0 -3
  145. package/api/types/WhatsAppCallDirection.d.ts +0 -5
  146. package/api/types/WhatsAppCallDirection.js +0 -8
  147. package/api/types/WhatsAppCalls.d.ts +0 -5
  148. package/api/types/WhatsAppCalls.js +0 -3
  149. package/api/types/WhatsAppChangeCalls.d.ts +0 -4
  150. package/api/types/WhatsAppChangeCalls.js +0 -3
  151. package/api/types/WhatsAppChangeMessages.d.ts +0 -2
  152. package/api/types/WhatsAppChangeMessages.js +0 -3
  153. package/api/types/WhatsAppEventRequest.d.ts +0 -5
  154. package/api/types/WhatsAppEventRequest.js +0 -3
  155. package/api/types/WhatsAppMetadata.d.ts +0 -3
  156. package/api/types/WhatsAppMetadata.js +0 -3
  157. package/api/types/WhatsAppSession.d.ts +0 -4
  158. package/api/types/WhatsAppSession.js +0 -3
  159. package/dist/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.d.ts +0 -10
  160. package/dist/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.js +0 -3
  161. package/dist/api/types/WhatsAppBusinessAccount.d.ts +0 -5
  162. package/dist/api/types/WhatsAppBusinessAccount.js +0 -3
  163. package/dist/api/types/WhatsAppBusinessAccountChangesItem.d.ts +0 -10
  164. package/dist/api/types/WhatsAppBusinessAccountChangesItem.js +0 -3
  165. package/dist/api/types/WhatsAppCall.d.ts +0 -10
  166. package/dist/api/types/WhatsAppCall.js +0 -3
  167. package/dist/api/types/WhatsAppCallDirection.d.ts +0 -5
  168. package/dist/api/types/WhatsAppCallDirection.js +0 -8
  169. package/dist/api/types/WhatsAppCalls.d.ts +0 -5
  170. package/dist/api/types/WhatsAppCalls.js +0 -3
  171. package/dist/api/types/WhatsAppChangeCalls.d.ts +0 -4
  172. package/dist/api/types/WhatsAppChangeCalls.js +0 -3
  173. package/dist/api/types/WhatsAppChangeMessages.d.ts +0 -2
  174. package/dist/api/types/WhatsAppChangeMessages.js +0 -3
  175. package/dist/api/types/WhatsAppEventRequest.d.ts +0 -5
  176. package/dist/api/types/WhatsAppEventRequest.js +0 -3
  177. package/dist/api/types/WhatsAppMetadata.d.ts +0 -3
  178. package/dist/api/types/WhatsAppMetadata.js +0 -3
  179. package/dist/api/types/WhatsAppSession.d.ts +0 -4
  180. package/dist/api/types/WhatsAppSession.js +0 -3
  181. package/dist/serialization/types/WhatsAppBusinessAccount.d.ts +0 -11
  182. package/dist/serialization/types/WhatsAppBusinessAccount.js +0 -43
  183. package/dist/serialization/types/WhatsAppBusinessAccountChangesItem.d.ts +0 -15
  184. package/dist/serialization/types/WhatsAppBusinessAccountChangesItem.js +0 -49
  185. package/dist/serialization/types/WhatsAppCall.d.ts +0 -17
  186. package/dist/serialization/types/WhatsAppCall.js +0 -49
  187. package/dist/serialization/types/WhatsAppCallDirection.d.ts +0 -7
  188. package/dist/serialization/types/WhatsAppCalls.d.ts +0 -12
  189. package/dist/serialization/types/WhatsAppCalls.js +0 -44
  190. package/dist/serialization/types/WhatsAppChangeCalls.d.ts +0 -10
  191. package/dist/serialization/types/WhatsAppChangeMessages.d.ts +0 -8
  192. package/dist/serialization/types/WhatsAppEventRequest.d.ts +0 -11
  193. package/dist/serialization/types/WhatsAppEventRequest.js +0 -43
  194. package/dist/serialization/types/WhatsAppMetadata.d.ts +0 -9
  195. package/dist/serialization/types/WhatsAppSession.d.ts +0 -10
  196. package/dist/serialization/types/WhatsAppSession.js +0 -42
  197. package/serialization/types/WhatsAppBusinessAccount.d.ts +0 -11
  198. package/serialization/types/WhatsAppBusinessAccount.js +0 -43
  199. package/serialization/types/WhatsAppBusinessAccountChangesItem.d.ts +0 -15
  200. package/serialization/types/WhatsAppBusinessAccountChangesItem.js +0 -49
  201. package/serialization/types/WhatsAppCall.d.ts +0 -17
  202. package/serialization/types/WhatsAppCall.js +0 -49
  203. package/serialization/types/WhatsAppCallDirection.d.ts +0 -7
  204. package/serialization/types/WhatsAppCalls.d.ts +0 -12
  205. package/serialization/types/WhatsAppCalls.js +0 -44
  206. package/serialization/types/WhatsAppChangeCalls.d.ts +0 -10
  207. package/serialization/types/WhatsAppChangeCalls.js +0 -42
  208. package/serialization/types/WhatsAppChangeMessages.d.ts +0 -8
  209. package/serialization/types/WhatsAppEventRequest.d.ts +0 -11
  210. package/serialization/types/WhatsAppEventRequest.js +0 -43
  211. package/serialization/types/WhatsAppMetadata.d.ts +0 -9
  212. package/serialization/types/WhatsAppMetadata.js +0 -41
  213. package/serialization/types/WhatsAppSession.d.ts +0 -10
  214. package/serialization/types/WhatsAppSession.js +0 -42
  215. /package/api/{resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.js → types/WhatsAppConversationInfo.js} +0 -0
  216. /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.19.0",
81
- "User-Agent": "@elevenlabs/elevenlabs-js/v2.19.0",
80
+ "X-Fern-SDK-Version": "v2.20.0",
81
+ "User-Agent": "@elevenlabs/elevenlabs-js/v2.20.0",
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, request?: ElevenLabs.conversationalAi.AgentsGetRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetAgentResponseModel>;
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, request = {}, requestOptions) {
171
- return core.HttpResponsePromise.fromPromise(this.__get(agentId, request, requestOptions));
167
+ get(agentId, requestOptions) {
168
+ return core.HttpResponsePromise.fromPromise(this.__get(agentId, requestOptions));
172
169
  }
173
- __get(agentId_1) {
174
- return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
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: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
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",
@@ -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,7 @@ export declare class Studio {
42
42
  *
43
43
  * @example
44
44
  * await client.studio.createPodcast({
45
+ * safetyIdentifier: "safety-identifier",
45
46
  * modelId: "eleven_multilingual_v2",
46
47
  * mode: {
47
48
  * type: "conversation",
@@ -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
- 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);
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(request, {
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,7 @@
1
+ export declare const AgentDefinitionSource: {
2
+ readonly Cli: "cli";
3
+ readonly Ui: "ui";
4
+ readonly Api: "api";
5
+ readonly Unknown: "unknown";
6
+ };
7
+ export type AgentDefinitionSource = (typeof AgentDefinitionSource)[keyof typeof AgentDefinitionSource];
@@ -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
  }
@@ -1,8 +1,4 @@
1
1
  export interface CreateAgentResponseModel {
2
2
  /** ID of the created agent */
3
3
  agentId: string;
4
- /** INTERNAL */
5
- mainBranchId?: string;
6
- /** INTERNAL */
7
- initialVersionId?: string;
8
4
  }
@@ -18,6 +18,4 @@ export interface GetAgentResponseModel {
18
18
  accessInfo?: ElevenLabs.ResourceAccessInfo;
19
19
  /** Agent tags used to categorize the agent */
20
20
  tags?: string[];
21
- /** INTERNAL */
22
- versionId?: string;
23
21
  }
@@ -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,6 @@
1
+ export declare const ToolExecutionMode: {
2
+ readonly Immediate: "immediate";
3
+ readonly PostToolSpeech: "post_tool_speech";
4
+ readonly Async: "async";
5
+ };
6
+ export type ToolExecutionMode = (typeof ToolExecutionMode)[keyof typeof ToolExecutionMode];
@@ -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
  }
@@ -0,0 +1,4 @@
1
+ export interface WhatsAppConversationInfo {
2
+ whatsappBusinessAccountId: string;
3
+ whatsappUserId: string;
4
+ }
@@ -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 "./WhatsAppBusinessAccountChangesItem";
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";
@@ -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("./WhatsAppBusinessAccountChangesItem"), exports);
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.19.0",
81
- "User-Agent": "@elevenlabs/elevenlabs-js/v2.19.0",
80
+ "X-Fern-SDK-Version": "v2.20.0",
81
+ "User-Agent": "@elevenlabs/elevenlabs-js/v2.20.0",
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, request?: ElevenLabs.conversationalAi.AgentsGetRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetAgentResponseModel>;
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, request = {}, requestOptions) {
171
- return core.HttpResponsePromise.fromPromise(this.__get(agentId, request, requestOptions));
167
+ get(agentId, requestOptions) {
168
+ return core.HttpResponsePromise.fromPromise(this.__get(agentId, requestOptions));
172
169
  }
173
- __get(agentId_1) {
174
- return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
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: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
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",
@@ -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,7 @@ export declare class Studio {
42
42
  *
43
43
  * @example
44
44
  * await client.studio.createPodcast({
45
+ * safetyIdentifier: "safety-identifier",
45
46
  * modelId: "eleven_multilingual_v2",
46
47
  * mode: {
47
48
  * type: "conversation",
@@ -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
- 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);
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(request, {
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,7 @@
1
+ export declare const AgentDefinitionSource: {
2
+ readonly Cli: "cli";
3
+ readonly Ui: "ui";
4
+ readonly Api: "api";
5
+ readonly Unknown: "unknown";
6
+ };
7
+ export type AgentDefinitionSource = (typeof AgentDefinitionSource)[keyof typeof AgentDefinitionSource];