@elevenlabs/elevenlabs-js 2.29.0 → 2.30.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 (149) hide show
  1. package/BaseClient.js +2 -2
  2. package/LICENSE +1 -1
  3. package/api/resources/conversationalAi/resources/knowledgeBase/client/Client.d.ts +0 -1
  4. package/api/resources/conversationalAi/resources/knowledgeBase/client/Client.js +1 -5
  5. package/api/resources/conversationalAi/resources/knowledgeBase/client/requests/KnowledgeBaseListRequest.d.ts +0 -3
  6. package/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +1 -1
  7. package/api/resources/dubbing/types/DubbingCreateRequestMode.d.ts +1 -1
  8. package/api/resources/dubbing/types/DubbingCreateRequestMode.js +1 -1
  9. package/api/resources/speechToText/client/Client.js +11 -0
  10. package/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +4 -0
  11. package/api/resources/speechToText/types/SpeechToTextConvertRequestEntityDetection.d.ts +4 -0
  12. package/api/resources/speechToText/types/SpeechToTextConvertRequestEntityDetection.js +3 -0
  13. package/api/resources/speechToText/types/index.d.ts +1 -0
  14. package/api/resources/speechToText/types/index.js +1 -0
  15. package/api/resources/workspace/resources/resources/client/Client.d.ts +17 -0
  16. package/api/resources/workspace/resources/resources/client/Client.js +59 -0
  17. package/api/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.d.ts +14 -0
  18. package/api/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.js +3 -0
  19. package/api/resources/workspace/resources/resources/client/requests/index.d.ts +1 -0
  20. package/api/types/DetectedEntity.d.ts +10 -0
  21. package/api/types/DetectedEntity.js +3 -0
  22. package/api/types/GetKnowledgeBaseSummaryFileResponseModel.d.ts +2 -0
  23. package/api/types/GetKnowledgeBaseSummaryFolderResponseModel.d.ts +2 -0
  24. package/api/types/GetKnowledgeBaseSummaryTextResponseModel.d.ts +2 -0
  25. package/api/types/GetKnowledgeBaseSummaryUrlResponseModel.d.ts +2 -0
  26. package/api/types/KnowledgeBaseFolderPathSegmentSummaryResponseModel.d.ts +3 -0
  27. package/api/types/KnowledgeBaseFolderPathSegmentSummaryResponseModel.js +3 -0
  28. package/api/types/PromptAgentApiModelInput.d.ts +2 -0
  29. package/api/types/PromptAgentApiModelOutput.d.ts +2 -0
  30. package/api/types/PromptAgentApiModelWorkflowOverrideInput.d.ts +2 -0
  31. package/api/types/PromptAgentApiModelWorkflowOverrideOutput.d.ts +2 -0
  32. package/api/types/SoftTimeoutConfig.d.ts +2 -0
  33. package/api/types/SoftTimeoutConfigWorkflowOverride.d.ts +2 -0
  34. package/api/types/SpeechToTextChunkResponseModel.d.ts +2 -0
  35. package/api/types/index.d.ts +2 -0
  36. package/api/types/index.js +2 -0
  37. package/dist/BaseClient.js +2 -2
  38. package/dist/api/resources/conversationalAi/resources/knowledgeBase/client/Client.d.ts +0 -1
  39. package/dist/api/resources/conversationalAi/resources/knowledgeBase/client/Client.js +1 -5
  40. package/dist/api/resources/conversationalAi/resources/knowledgeBase/client/requests/KnowledgeBaseListRequest.d.ts +0 -3
  41. package/dist/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +1 -1
  42. package/dist/api/resources/dubbing/types/DubbingCreateRequestMode.d.ts +1 -1
  43. package/dist/api/resources/dubbing/types/DubbingCreateRequestMode.js +1 -1
  44. package/dist/api/resources/speechToText/client/Client.js +11 -0
  45. package/dist/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +4 -0
  46. package/dist/api/resources/speechToText/types/SpeechToTextConvertRequestEntityDetection.d.ts +4 -0
  47. package/dist/api/resources/speechToText/types/SpeechToTextConvertRequestEntityDetection.js +3 -0
  48. package/dist/api/resources/speechToText/types/index.d.ts +1 -0
  49. package/dist/api/resources/speechToText/types/index.js +1 -0
  50. package/dist/api/resources/workspace/resources/resources/client/Client.d.ts +17 -0
  51. package/dist/api/resources/workspace/resources/resources/client/Client.js +59 -0
  52. package/dist/api/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.d.ts +14 -0
  53. package/dist/api/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.js +3 -0
  54. package/dist/api/resources/workspace/resources/resources/client/requests/index.d.ts +1 -0
  55. package/dist/api/types/DetectedEntity.d.ts +10 -0
  56. package/dist/api/types/DetectedEntity.js +3 -0
  57. package/dist/api/types/GetKnowledgeBaseSummaryFileResponseModel.d.ts +2 -0
  58. package/dist/api/types/GetKnowledgeBaseSummaryFolderResponseModel.d.ts +2 -0
  59. package/dist/api/types/GetKnowledgeBaseSummaryTextResponseModel.d.ts +2 -0
  60. package/dist/api/types/GetKnowledgeBaseSummaryUrlResponseModel.d.ts +2 -0
  61. package/dist/api/types/KnowledgeBaseFolderPathSegmentSummaryResponseModel.d.ts +3 -0
  62. package/dist/api/types/KnowledgeBaseFolderPathSegmentSummaryResponseModel.js +3 -0
  63. package/dist/api/types/PromptAgentApiModelInput.d.ts +2 -0
  64. package/dist/api/types/PromptAgentApiModelOutput.d.ts +2 -0
  65. package/dist/api/types/PromptAgentApiModelWorkflowOverrideInput.d.ts +2 -0
  66. package/dist/api/types/PromptAgentApiModelWorkflowOverrideOutput.d.ts +2 -0
  67. package/dist/api/types/SoftTimeoutConfig.d.ts +2 -0
  68. package/dist/api/types/SoftTimeoutConfigWorkflowOverride.d.ts +2 -0
  69. package/dist/api/types/SpeechToTextChunkResponseModel.d.ts +2 -0
  70. package/dist/api/types/index.d.ts +2 -0
  71. package/dist/api/types/index.js +2 -0
  72. package/dist/serialization/resources/speechToText/types/SpeechToTextConvertRequestEntityDetection.d.ts +7 -0
  73. package/dist/serialization/resources/speechToText/types/SpeechToTextConvertRequestEntityDetection.js +42 -0
  74. package/dist/serialization/resources/speechToText/types/index.d.ts +1 -0
  75. package/dist/serialization/resources/speechToText/types/index.js +1 -0
  76. package/dist/serialization/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.d.ts +11 -0
  77. package/dist/serialization/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.js +43 -0
  78. package/dist/serialization/resources/workspace/resources/resources/client/requests/index.d.ts +1 -0
  79. package/dist/serialization/resources/workspace/resources/resources/client/requests/index.js +3 -1
  80. package/dist/serialization/types/DetectedEntity.d.ts +12 -0
  81. package/dist/serialization/types/DetectedEntity.js +44 -0
  82. package/dist/serialization/types/GetKnowledgeBaseSummaryFileResponseModel.d.ts +2 -0
  83. package/dist/serialization/types/GetKnowledgeBaseSummaryFileResponseModel.js +2 -0
  84. package/dist/serialization/types/GetKnowledgeBaseSummaryFolderResponseModel.d.ts +2 -0
  85. package/dist/serialization/types/GetKnowledgeBaseSummaryFolderResponseModel.js +2 -0
  86. package/dist/serialization/types/GetKnowledgeBaseSummaryTextResponseModel.d.ts +2 -0
  87. package/dist/serialization/types/GetKnowledgeBaseSummaryTextResponseModel.js +2 -0
  88. package/dist/serialization/types/GetKnowledgeBaseSummaryUrlResponseModel.d.ts +2 -0
  89. package/dist/serialization/types/GetKnowledgeBaseSummaryUrlResponseModel.js +2 -0
  90. package/dist/serialization/types/KnowledgeBaseFolderPathSegmentSummaryResponseModel.d.ts +9 -0
  91. package/dist/serialization/types/KnowledgeBaseFolderPathSegmentSummaryResponseModel.js +41 -0
  92. package/dist/serialization/types/PromptAgentApiModelInput.d.ts +1 -0
  93. package/dist/serialization/types/PromptAgentApiModelInput.js +1 -0
  94. package/dist/serialization/types/PromptAgentApiModelOutput.d.ts +1 -0
  95. package/dist/serialization/types/PromptAgentApiModelOutput.js +1 -0
  96. package/dist/serialization/types/PromptAgentApiModelWorkflowOverrideInput.d.ts +1 -0
  97. package/dist/serialization/types/PromptAgentApiModelWorkflowOverrideInput.js +1 -0
  98. package/dist/serialization/types/PromptAgentApiModelWorkflowOverrideOutput.d.ts +1 -0
  99. package/dist/serialization/types/PromptAgentApiModelWorkflowOverrideOutput.js +1 -0
  100. package/dist/serialization/types/SoftTimeoutConfig.d.ts +1 -0
  101. package/dist/serialization/types/SoftTimeoutConfig.js +1 -0
  102. package/dist/serialization/types/SoftTimeoutConfigWorkflowOverride.d.ts +1 -0
  103. package/dist/serialization/types/SoftTimeoutConfigWorkflowOverride.js +1 -0
  104. package/dist/serialization/types/SpeechToTextChunkResponseModel.d.ts +2 -0
  105. package/dist/serialization/types/SpeechToTextChunkResponseModel.js +2 -0
  106. package/dist/serialization/types/index.d.ts +2 -0
  107. package/dist/serialization/types/index.js +2 -0
  108. package/dist/version.d.ts +1 -1
  109. package/dist/version.js +1 -1
  110. package/package.json +1 -1
  111. package/reference.md +74 -1
  112. package/serialization/resources/speechToText/types/SpeechToTextConvertRequestEntityDetection.d.ts +7 -0
  113. package/serialization/resources/speechToText/types/SpeechToTextConvertRequestEntityDetection.js +42 -0
  114. package/serialization/resources/speechToText/types/index.d.ts +1 -0
  115. package/serialization/resources/speechToText/types/index.js +1 -0
  116. package/serialization/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.d.ts +11 -0
  117. package/serialization/resources/workspace/resources/resources/client/requests/BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.js +43 -0
  118. package/serialization/resources/workspace/resources/resources/client/requests/index.d.ts +1 -0
  119. package/serialization/resources/workspace/resources/resources/client/requests/index.js +3 -1
  120. package/serialization/types/DetectedEntity.d.ts +12 -0
  121. package/serialization/types/DetectedEntity.js +44 -0
  122. package/serialization/types/GetKnowledgeBaseSummaryFileResponseModel.d.ts +2 -0
  123. package/serialization/types/GetKnowledgeBaseSummaryFileResponseModel.js +2 -0
  124. package/serialization/types/GetKnowledgeBaseSummaryFolderResponseModel.d.ts +2 -0
  125. package/serialization/types/GetKnowledgeBaseSummaryFolderResponseModel.js +2 -0
  126. package/serialization/types/GetKnowledgeBaseSummaryTextResponseModel.d.ts +2 -0
  127. package/serialization/types/GetKnowledgeBaseSummaryTextResponseModel.js +2 -0
  128. package/serialization/types/GetKnowledgeBaseSummaryUrlResponseModel.d.ts +2 -0
  129. package/serialization/types/GetKnowledgeBaseSummaryUrlResponseModel.js +2 -0
  130. package/serialization/types/KnowledgeBaseFolderPathSegmentSummaryResponseModel.d.ts +9 -0
  131. package/serialization/types/KnowledgeBaseFolderPathSegmentSummaryResponseModel.js +41 -0
  132. package/serialization/types/PromptAgentApiModelInput.d.ts +1 -0
  133. package/serialization/types/PromptAgentApiModelInput.js +1 -0
  134. package/serialization/types/PromptAgentApiModelOutput.d.ts +1 -0
  135. package/serialization/types/PromptAgentApiModelOutput.js +1 -0
  136. package/serialization/types/PromptAgentApiModelWorkflowOverrideInput.d.ts +1 -0
  137. package/serialization/types/PromptAgentApiModelWorkflowOverrideInput.js +1 -0
  138. package/serialization/types/PromptAgentApiModelWorkflowOverrideOutput.d.ts +1 -0
  139. package/serialization/types/PromptAgentApiModelWorkflowOverrideOutput.js +1 -0
  140. package/serialization/types/SoftTimeoutConfig.d.ts +1 -0
  141. package/serialization/types/SoftTimeoutConfig.js +1 -0
  142. package/serialization/types/SoftTimeoutConfigWorkflowOverride.d.ts +1 -0
  143. package/serialization/types/SoftTimeoutConfigWorkflowOverride.js +1 -0
  144. package/serialization/types/SpeechToTextChunkResponseModel.d.ts +2 -0
  145. package/serialization/types/SpeechToTextChunkResponseModel.js +2 -0
  146. package/serialization/types/index.d.ts +2 -0
  147. package/serialization/types/index.js +2 -0
  148. package/version.d.ts +1 -1
  149. package/version.js +1 -1
package/BaseClient.js CHANGED
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
41
41
  const headers = (0, headers_1.mergeHeaders)({
42
42
  "X-Fern-Language": "JavaScript",
43
43
  "X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
44
- "X-Fern-SDK-Version": "v2.29.0",
45
- "User-Agent": "@elevenlabs/elevenlabs-js/v2.29.0",
44
+ "X-Fern-SDK-Version": "v2.30.0",
45
+ "User-Agent": "@elevenlabs/elevenlabs-js/v2.30.0",
46
46
  "X-Fern-Runtime": core.RUNTIME.type,
47
47
  "X-Fern-Runtime-Version": core.RUNTIME.version,
48
48
  "xi-api-key": options === null || options === void 0 ? void 0 : options.apiKey,
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Elevenlabs.
3
+ Copyright (c) 2026 Elevenlabs.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -34,7 +34,6 @@ export declare class KnowledgeBaseClient {
34
34
  * foldersFirst: true,
35
35
  * sortDirection: "asc",
36
36
  * sortBy: "name",
37
- * useTypesense: true,
38
37
  * cursor: "cursor"
39
38
  * })
40
39
  */
@@ -84,7 +84,6 @@ class KnowledgeBaseClient {
84
84
  * foldersFirst: true,
85
85
  * sortDirection: "asc",
86
86
  * sortBy: "name",
87
- * useTypesense: true,
88
87
  * cursor: "cursor"
89
88
  * })
90
89
  */
@@ -94,7 +93,7 @@ class KnowledgeBaseClient {
94
93
  __list() {
95
94
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
96
95
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
97
- const { pageSize, search, showOnlyOwnedDocuments, types, parentFolderId, ancestorFolderId, foldersFirst, sortDirection, sortBy, useTypesense, cursor, } = request;
96
+ const { pageSize, search, showOnlyOwnedDocuments, types, parentFolderId, ancestorFolderId, foldersFirst, sortDirection, sortBy, cursor, } = request;
98
97
  const _queryParams = {};
99
98
  if (pageSize != null) {
100
99
  _queryParams.page_size = pageSize.toString();
@@ -134,9 +133,6 @@ class KnowledgeBaseClient {
134
133
  unrecognizedObjectKeys: "strip",
135
134
  });
136
135
  }
137
- if (useTypesense != null) {
138
- _queryParams.use_typesense = useTypesense.toString();
139
- }
140
136
  if (cursor != null) {
141
137
  _queryParams.cursor = cursor;
142
138
  }
@@ -10,7 +10,6 @@ import type * as ElevenLabs from "../../../../../../index";
10
10
  * foldersFirst: true,
11
11
  * sortDirection: "asc",
12
12
  * sortBy: "name",
13
- * useTypesense: true,
14
13
  * cursor: "cursor"
15
14
  * }
16
15
  */
@@ -33,8 +32,6 @@ export interface KnowledgeBaseListRequest {
33
32
  sortDirection?: ElevenLabs.SortDirection;
34
33
  /** The field to sort the results by */
35
34
  sortBy?: ElevenLabs.KnowledgeBaseSortBy;
36
- /** If set to true, the endpoint will use typesense DB to search for the documents). */
37
- useTypesense?: boolean;
38
35
  /** Used for fetching next page. Cursor is returned in the response. */
39
36
  cursor?: string;
40
37
  }
@@ -41,7 +41,7 @@ export interface BodyDubAVideoOrAnAudioFileV1DubbingPost {
41
41
  dubbingStudio?: boolean;
42
42
  /** Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. */
43
43
  disableVoiceCloning?: boolean;
44
- /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. */
44
+ /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged. */
45
45
  mode?: ElevenLabs.DubbingCreateRequestMode;
46
46
  /** Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. */
47
47
  csvFps?: number;
@@ -1,4 +1,4 @@
1
- /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. */
1
+ /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged. */
2
2
  export declare const DubbingCreateRequestMode: {
3
3
  readonly Automatic: "automatic";
4
4
  readonly Manual: "manual";
@@ -2,7 +2,7 @@
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.DubbingCreateRequestMode = void 0;
5
- /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. */
5
+ /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged. */
6
6
  exports.DubbingCreateRequestMode = {
7
7
  Automatic: "automatic",
8
8
  Manual: "manual",
@@ -144,6 +144,17 @@ class SpeechToTextClient {
144
144
  return typeof mapped === "string" ? mapped : (0, json_1.toJson)(mapped);
145
145
  })());
146
146
  }
147
+ if (request.entityDetection != null) {
148
+ if (Array.isArray(request.entityDetection))
149
+ for (const _item of request.entityDetection) {
150
+ _request.append("entity_detection", typeof _item === "string" ? _item : (0, json_1.toJson)(_item));
151
+ }
152
+ }
153
+ if (request.keyterms != null) {
154
+ for (const _item of request.keyterms) {
155
+ _request.append("keyterms", _item);
156
+ }
157
+ }
147
158
  const _maybeEncodedRequest = yield _request.getRequest();
148
159
  const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ "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 }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
149
160
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
@@ -50,4 +50,8 @@ export interface BodySpeechToTextV1SpeechToTextPost {
50
50
  useMultiChannel?: boolean;
51
51
  /** Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. */
52
52
  webhookMetadata?: ElevenLabs.SpeechToTextConvertRequestWebhookMetadata;
53
+ /** Detect entities in the transcript. Can be 'all' to detect all entities, a single entity type or category string, or a list of entity types/categories. Categories include 'pii', 'phi', 'pci', 'other', 'offensive_language'. When enabled, detected entities will be returned in the 'entities' field with their text, type, and character positions. */
54
+ entityDetection?: ElevenLabs.SpeechToTextConvertRequestEntityDetection;
55
+ /** A list of keyterms to bias the transcription towards. The keyterms are words or phrases you want the model to recognise more accurately. The number of keyterms cannot exceed 100. The length of each keyterm must be less than 50 characters. Keyterms can contain at most 5 words (after normalisation). For example ["hello", "world", "technical term"] */
56
+ keyterms?: string[];
53
57
  }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Detect entities in the transcript. Can be 'all' to detect all entities, a single entity type or category string, or a list of entity types/categories. Categories include 'pii', 'phi', 'pci', 'other', 'offensive_language'. When enabled, detected entities will be returned in the 'entities' field with their text, type, and character positions.
3
+ */
4
+ export type SpeechToTextConvertRequestEntityDetection = string | string[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export * from "./SpeechToTextConvertRequestEntityDetection";
1
2
  export * from "./SpeechToTextConvertRequestFileFormat";
2
3
  export * from "./SpeechToTextConvertRequestTimestampsGranularity";
3
4
  export * from "./SpeechToTextConvertRequestWebhookMetadata";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./SpeechToTextConvertRequestEntityDetection"), exports);
17
18
  __exportStar(require("./SpeechToTextConvertRequestFileFormat"), exports);
18
19
  __exportStar(require("./SpeechToTextConvertRequestTimestampsGranularity"), exports);
19
20
  __exportStar(require("./SpeechToTextConvertRequestWebhookMetadata"), exports);
@@ -59,4 +59,21 @@ export declare class ResourcesClient {
59
59
  */
60
60
  unshare(resource_id: string, request: ElevenLabs.workspace.BodyUnshareWorkspaceResourceV1WorkspaceResourcesResourceIdUnsharePost, requestOptions?: ResourcesClient.RequestOptions): core.HttpResponsePromise<unknown>;
61
61
  private __unshare;
62
+ /**
63
+ * Copies a workspace resource to another workspace.
64
+ *
65
+ * @param {string} resource_id - The ID of the target resource.
66
+ * @param {ElevenLabs.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost} request
67
+ * @param {ResourcesClient.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
70
+ *
71
+ * @example
72
+ * await client.workspace.resources.copyToWorkspace("resource_id", {
73
+ * resourceType: "voice",
74
+ * targetUserId: "target_user_id"
75
+ * })
76
+ */
77
+ copyToWorkspace(resource_id: string, request: ElevenLabs.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost, requestOptions?: ResourcesClient.RequestOptions): core.HttpResponsePromise<unknown>;
78
+ private __copyToWorkspace;
62
79
  }
@@ -241,5 +241,64 @@ class ResourcesClient {
241
241
  return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/workspace/resources/{resource_id}/unshare");
242
242
  });
243
243
  }
244
+ /**
245
+ * Copies a workspace resource to another workspace.
246
+ *
247
+ * @param {string} resource_id - The ID of the target resource.
248
+ * @param {ElevenLabs.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost} request
249
+ * @param {ResourcesClient.RequestOptions} requestOptions - Request-specific configuration.
250
+ *
251
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
252
+ *
253
+ * @example
254
+ * await client.workspace.resources.copyToWorkspace("resource_id", {
255
+ * resourceType: "voice",
256
+ * targetUserId: "target_user_id"
257
+ * })
258
+ */
259
+ copyToWorkspace(resource_id, request, requestOptions) {
260
+ return core.HttpResponsePromise.fromPromise(this.__copyToWorkspace(resource_id, request, requestOptions));
261
+ }
262
+ __copyToWorkspace(resource_id, request, requestOptions) {
263
+ return __awaiter(this, void 0, void 0, function* () {
264
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
265
+ const _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);
266
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
267
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, `v1/workspace/resources/${core.url.encodePathParam(resource_id)}/copy-to-workspace`),
268
+ method: "POST",
269
+ headers: _headers,
270
+ contentType: "application/json",
271
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
272
+ requestType: "json",
273
+ body: serializers.workspace.BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
274
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 240) * 1000,
275
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
276
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
277
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
278
+ logging: this._options.logging,
279
+ });
280
+ if (_response.ok) {
281
+ return { data: _response.body, rawResponse: _response.rawResponse };
282
+ }
283
+ if (_response.error.reason === "status-code") {
284
+ switch (_response.error.statusCode) {
285
+ case 422:
286
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
287
+ unrecognizedObjectKeys: "passthrough",
288
+ allowUnrecognizedUnionMembers: true,
289
+ allowUnrecognizedEnumValues: true,
290
+ breadcrumbsPrefix: ["response"],
291
+ }), _response.rawResponse);
292
+ default:
293
+ throw new errors.ElevenLabsError({
294
+ statusCode: _response.error.statusCode,
295
+ body: _response.error.body,
296
+ rawResponse: _response.rawResponse,
297
+ });
298
+ }
299
+ }
300
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/workspace/resources/{resource_id}/copy-to-workspace");
301
+ });
302
+ }
244
303
  }
245
304
  exports.ResourcesClient = ResourcesClient;
@@ -0,0 +1,14 @@
1
+ import type * as ElevenLabs from "../../../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * resourceType: "voice",
6
+ * targetUserId: "target_user_id"
7
+ * }
8
+ */
9
+ export interface BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost {
10
+ /** Resource type of the target resource. */
11
+ resourceType: ElevenLabs.WorkspaceResourceType;
12
+ /** The ID of the target user. */
13
+ targetUserId: string;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export type { BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost } from "./BodyCopyWorkspaceResourceToAnotherWorkspaceV1WorkspaceResourcesResourceIdCopyToWorkspacePost";
1
2
  export type { BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePost } from "./BodyShareWorkspaceResourceV1WorkspaceResourcesResourceIdSharePost";
2
3
  export type { BodyUnshareWorkspaceResourceV1WorkspaceResourcesResourceIdUnsharePost } from "./BodyUnshareWorkspaceResourceV1WorkspaceResourcesResourceIdUnsharePost";
3
4
  export type { ResourcesGetRequest } from "./ResourcesGetRequest";
@@ -0,0 +1,10 @@
1
+ export interface DetectedEntity {
2
+ /** The text that was identified as an entity. */
3
+ text: string;
4
+ /** The type of entity detected (e.g., 'credit_card', 'email_address', 'person_name'). */
5
+ entityType: string;
6
+ /** Start character position in the transcript text. */
7
+ startChar: number;
8
+ /** End character position in the transcript text. */
9
+ endChar: number;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,8 @@ export interface GetKnowledgeBaseSummaryFileResponseModel {
7
7
  accessInfo: ElevenLabs.ResourceAccessInfo;
8
8
  /** The ID of the parent folder, or null if the document is at the root level. */
9
9
  folderParentId?: string;
10
+ /** The folder path segments leading to this entity, from root to parent folder. */
11
+ folderPath?: ElevenLabs.KnowledgeBaseFolderPathSegmentSummaryResponseModel[];
10
12
  /** This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead. */
11
13
  dependentAgents: ElevenLabs.GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem[];
12
14
  }
@@ -7,6 +7,8 @@ export interface GetKnowledgeBaseSummaryFolderResponseModel {
7
7
  accessInfo: ElevenLabs.ResourceAccessInfo;
8
8
  /** The ID of the parent folder, or null if the document is at the root level. */
9
9
  folderParentId?: string;
10
+ /** The folder path segments leading to this entity, from root to parent folder. */
11
+ folderPath?: ElevenLabs.KnowledgeBaseFolderPathSegmentSummaryResponseModel[];
10
12
  /** This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead. */
11
13
  dependentAgents: ElevenLabs.GetKnowledgeBaseSummaryFolderResponseModelDependentAgentsItem[];
12
14
  childrenCount: number;
@@ -7,6 +7,8 @@ export interface GetKnowledgeBaseSummaryTextResponseModel {
7
7
  accessInfo: ElevenLabs.ResourceAccessInfo;
8
8
  /** The ID of the parent folder, or null if the document is at the root level. */
9
9
  folderParentId?: string;
10
+ /** The folder path segments leading to this entity, from root to parent folder. */
11
+ folderPath?: ElevenLabs.KnowledgeBaseFolderPathSegmentSummaryResponseModel[];
10
12
  /** This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead. */
11
13
  dependentAgents: ElevenLabs.GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem[];
12
14
  }
@@ -7,6 +7,8 @@ export interface GetKnowledgeBaseSummaryUrlResponseModel {
7
7
  accessInfo: ElevenLabs.ResourceAccessInfo;
8
8
  /** The ID of the parent folder, or null if the document is at the root level. */
9
9
  folderParentId?: string;
10
+ /** The folder path segments leading to this entity, from root to parent folder. */
11
+ folderPath?: ElevenLabs.KnowledgeBaseFolderPathSegmentSummaryResponseModel[];
10
12
  /** This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead. */
11
13
  dependentAgents: ElevenLabs.GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem[];
12
14
  url: string;
@@ -0,0 +1,3 @@
1
+ export interface KnowledgeBaseFolderPathSegmentSummaryResponseModel {
2
+ id: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -32,6 +32,8 @@ export interface PromptAgentApiModelInput {
32
32
  timezone?: string;
33
33
  /** Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. */
34
34
  backupLlmConfig?: ElevenLabs.PromptAgentApiModelInputBackupLlmConfig;
35
+ /** Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds. */
36
+ cascadeTimeoutSeconds?: number;
35
37
  /** A list of tools that the agent can use over the course of the conversation, use tool_ids instead */
36
38
  tools?: ElevenLabs.PromptAgentApiModelInputToolsItem[];
37
39
  }
@@ -32,6 +32,8 @@ export interface PromptAgentApiModelOutput {
32
32
  timezone?: string;
33
33
  /** Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. */
34
34
  backupLlmConfig?: ElevenLabs.PromptAgentApiModelOutputBackupLlmConfig;
35
+ /** Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds. */
36
+ cascadeTimeoutSeconds?: number;
35
37
  /** A list of tools that the agent can use over the course of the conversation, use tool_ids instead */
36
38
  tools?: ElevenLabs.PromptAgentApiModelOutputToolsItem[];
37
39
  }
@@ -32,6 +32,8 @@ export interface PromptAgentApiModelWorkflowOverrideInput {
32
32
  timezone?: string;
33
33
  /** Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. */
34
34
  backupLlmConfig?: ElevenLabs.PromptAgentApiModelWorkflowOverrideInputBackupLlmConfig;
35
+ /** Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds. */
36
+ cascadeTimeoutSeconds?: number;
35
37
  /** A list of tools that the agent can use over the course of the conversation, use tool_ids instead */
36
38
  tools?: ElevenLabs.PromptAgentApiModelWorkflowOverrideInputToolsItem[];
37
39
  }
@@ -32,6 +32,8 @@ export interface PromptAgentApiModelWorkflowOverrideOutput {
32
32
  timezone?: string;
33
33
  /** Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order. */
34
34
  backupLlmConfig?: ElevenLabs.PromptAgentApiModelWorkflowOverrideOutputBackupLlmConfig;
35
+ /** Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds. */
36
+ cascadeTimeoutSeconds?: number;
35
37
  /** A list of tools that the agent can use over the course of the conversation, use tool_ids instead */
36
38
  tools?: ElevenLabs.PromptAgentApiModelWorkflowOverrideOutputToolsItem[];
37
39
  }
@@ -6,4 +6,6 @@ export interface SoftTimeoutConfig {
6
6
  timeoutSeconds?: number;
7
7
  /** Message to show when soft timeout is reached while waiting for LLM response */
8
8
  message?: string;
9
+ /** If enabled, the soft timeout message will be generated dynamically instead of using the static message. */
10
+ useLlmGeneratedMessage?: boolean;
9
11
  }
@@ -3,4 +3,6 @@ export interface SoftTimeoutConfigWorkflowOverride {
3
3
  timeoutSeconds?: number;
4
4
  /** Message to show when soft timeout is reached while waiting for LLM response */
5
5
  message?: string;
6
+ /** If enabled, the soft timeout message will be generated dynamically instead of using the static message. */
7
+ useLlmGeneratedMessage?: boolean;
6
8
  }
@@ -17,4 +17,6 @@ export interface SpeechToTextChunkResponseModel {
17
17
  additionalFormats?: (ElevenLabs.AdditionalFormatResponseModel | undefined)[];
18
18
  /** The transcription ID of the response. */
19
19
  transcriptionId?: string;
20
+ /** List of detected entities with their text, type, and character positions in the transcript. */
21
+ entities?: ElevenLabs.DetectedEntity[];
20
22
  }
@@ -303,6 +303,7 @@ export * from "./DependentPhoneNumberIdentifier";
303
303
  export * from "./DependentUnknownAgentIdentifier";
304
304
  export * from "./DependentUnknownToolIdentifier";
305
305
  export * from "./DetailedMusicResponse";
306
+ export * from "./DetectedEntity";
306
307
  export * from "./DialogueInput";
307
308
  export * from "./DialogueInputResponseModel";
308
309
  export * from "./DiscountResponseModel";
@@ -433,6 +434,7 @@ export * from "./KnowledgeBaseDocumentChunkResponseModel";
433
434
  export * from "./KnowledgeBaseDocumentMetadataResponseModel";
434
435
  export * from "./KnowledgeBaseDocumentType";
435
436
  export * from "./KnowledgeBaseFolderPathSegmentResponseModel";
437
+ export * from "./KnowledgeBaseFolderPathSegmentSummaryResponseModel";
436
438
  export * from "./KnowledgeBaseLocator";
437
439
  export * from "./KnowledgeBaseSortBy";
438
440
  export * from "./KnowledgeBaseSummaryBatchSuccessfulResponseModel";
@@ -319,6 +319,7 @@ __exportStar(require("./DependentPhoneNumberIdentifier"), exports);
319
319
  __exportStar(require("./DependentUnknownAgentIdentifier"), exports);
320
320
  __exportStar(require("./DependentUnknownToolIdentifier"), exports);
321
321
  __exportStar(require("./DetailedMusicResponse"), exports);
322
+ __exportStar(require("./DetectedEntity"), exports);
322
323
  __exportStar(require("./DialogueInput"), exports);
323
324
  __exportStar(require("./DialogueInputResponseModel"), exports);
324
325
  __exportStar(require("./DiscountResponseModel"), exports);
@@ -449,6 +450,7 @@ __exportStar(require("./KnowledgeBaseDocumentChunkResponseModel"), exports);
449
450
  __exportStar(require("./KnowledgeBaseDocumentMetadataResponseModel"), exports);
450
451
  __exportStar(require("./KnowledgeBaseDocumentType"), exports);
451
452
  __exportStar(require("./KnowledgeBaseFolderPathSegmentResponseModel"), exports);
453
+ __exportStar(require("./KnowledgeBaseFolderPathSegmentSummaryResponseModel"), exports);
452
454
  __exportStar(require("./KnowledgeBaseLocator"), exports);
453
455
  __exportStar(require("./KnowledgeBaseSortBy"), exports);
454
456
  __exportStar(require("./KnowledgeBaseSummaryBatchSuccessfulResponseModel"), exports);
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
41
41
  const headers = (0, headers_1.mergeHeaders)({
42
42
  "X-Fern-Language": "JavaScript",
43
43
  "X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
44
- "X-Fern-SDK-Version": "v2.29.0",
45
- "User-Agent": "@elevenlabs/elevenlabs-js/v2.29.0",
44
+ "X-Fern-SDK-Version": "v2.30.0",
45
+ "User-Agent": "@elevenlabs/elevenlabs-js/v2.30.0",
46
46
  "X-Fern-Runtime": core.RUNTIME.type,
47
47
  "X-Fern-Runtime-Version": core.RUNTIME.version,
48
48
  "xi-api-key": options === null || options === void 0 ? void 0 : options.apiKey,
@@ -34,7 +34,6 @@ export declare class KnowledgeBaseClient {
34
34
  * foldersFirst: true,
35
35
  * sortDirection: "asc",
36
36
  * sortBy: "name",
37
- * useTypesense: true,
38
37
  * cursor: "cursor"
39
38
  * })
40
39
  */
@@ -84,7 +84,6 @@ class KnowledgeBaseClient {
84
84
  * foldersFirst: true,
85
85
  * sortDirection: "asc",
86
86
  * sortBy: "name",
87
- * useTypesense: true,
88
87
  * cursor: "cursor"
89
88
  * })
90
89
  */
@@ -94,7 +93,7 @@ class KnowledgeBaseClient {
94
93
  __list() {
95
94
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
96
95
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
97
- const { pageSize, search, showOnlyOwnedDocuments, types, parentFolderId, ancestorFolderId, foldersFirst, sortDirection, sortBy, useTypesense, cursor, } = request;
96
+ const { pageSize, search, showOnlyOwnedDocuments, types, parentFolderId, ancestorFolderId, foldersFirst, sortDirection, sortBy, cursor, } = request;
98
97
  const _queryParams = {};
99
98
  if (pageSize != null) {
100
99
  _queryParams.page_size = pageSize.toString();
@@ -134,9 +133,6 @@ class KnowledgeBaseClient {
134
133
  unrecognizedObjectKeys: "strip",
135
134
  });
136
135
  }
137
- if (useTypesense != null) {
138
- _queryParams.use_typesense = useTypesense.toString();
139
- }
140
136
  if (cursor != null) {
141
137
  _queryParams.cursor = cursor;
142
138
  }
@@ -10,7 +10,6 @@ import type * as ElevenLabs from "../../../../../../index";
10
10
  * foldersFirst: true,
11
11
  * sortDirection: "asc",
12
12
  * sortBy: "name",
13
- * useTypesense: true,
14
13
  * cursor: "cursor"
15
14
  * }
16
15
  */
@@ -33,8 +32,6 @@ export interface KnowledgeBaseListRequest {
33
32
  sortDirection?: ElevenLabs.SortDirection;
34
33
  /** The field to sort the results by */
35
34
  sortBy?: ElevenLabs.KnowledgeBaseSortBy;
36
- /** If set to true, the endpoint will use typesense DB to search for the documents). */
37
- useTypesense?: boolean;
38
35
  /** Used for fetching next page. Cursor is returned in the response. */
39
36
  cursor?: string;
40
37
  }
@@ -41,7 +41,7 @@ export interface BodyDubAVideoOrAnAudioFileV1DubbingPost {
41
41
  dubbingStudio?: boolean;
42
42
  /** Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. */
43
43
  disableVoiceCloning?: boolean;
44
- /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. */
44
+ /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged. */
45
45
  mode?: ElevenLabs.DubbingCreateRequestMode;
46
46
  /** Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. */
47
47
  csvFps?: number;
@@ -1,4 +1,4 @@
1
- /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. */
1
+ /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged. */
2
2
  export declare const DubbingCreateRequestMode: {
3
3
  readonly Automatic: "automatic";
4
4
  readonly Manual: "manual";
@@ -2,7 +2,7 @@
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.DubbingCreateRequestMode = void 0;
5
- /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. */
5
+ /** The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged. */
6
6
  exports.DubbingCreateRequestMode = {
7
7
  Automatic: "automatic",
8
8
  Manual: "manual",
@@ -144,6 +144,17 @@ class SpeechToTextClient {
144
144
  return typeof mapped === "string" ? mapped : (0, json_1.toJson)(mapped);
145
145
  })());
146
146
  }
147
+ if (request.entityDetection != null) {
148
+ if (Array.isArray(request.entityDetection))
149
+ for (const _item of request.entityDetection) {
150
+ _request.append("entity_detection", typeof _item === "string" ? _item : (0, json_1.toJson)(_item));
151
+ }
152
+ }
153
+ if (request.keyterms != null) {
154
+ for (const _item of request.keyterms) {
155
+ _request.append("keyterms", _item);
156
+ }
157
+ }
147
158
  const _maybeEncodedRequest = yield _request.getRequest();
148
159
  const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ "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 }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
149
160
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
@@ -50,4 +50,8 @@ export interface BodySpeechToTextV1SpeechToTextPost {
50
50
  useMultiChannel?: boolean;
51
51
  /** Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. */
52
52
  webhookMetadata?: ElevenLabs.SpeechToTextConvertRequestWebhookMetadata;
53
+ /** Detect entities in the transcript. Can be 'all' to detect all entities, a single entity type or category string, or a list of entity types/categories. Categories include 'pii', 'phi', 'pci', 'other', 'offensive_language'. When enabled, detected entities will be returned in the 'entities' field with their text, type, and character positions. */
54
+ entityDetection?: ElevenLabs.SpeechToTextConvertRequestEntityDetection;
55
+ /** A list of keyterms to bias the transcription towards. The keyterms are words or phrases you want the model to recognise more accurately. The number of keyterms cannot exceed 100. The length of each keyterm must be less than 50 characters. Keyterms can contain at most 5 words (after normalisation). For example ["hello", "world", "technical term"] */
56
+ keyterms?: string[];
53
57
  }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Detect entities in the transcript. Can be 'all' to detect all entities, a single entity type or category string, or a list of entity types/categories. Categories include 'pii', 'phi', 'pci', 'other', 'offensive_language'. When enabled, detected entities will be returned in the 'entities' field with their text, type, and character positions.
3
+ */
4
+ export type SpeechToTextConvertRequestEntityDetection = string | string[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export * from "./SpeechToTextConvertRequestEntityDetection";
1
2
  export * from "./SpeechToTextConvertRequestFileFormat";
2
3
  export * from "./SpeechToTextConvertRequestTimestampsGranularity";
3
4
  export * from "./SpeechToTextConvertRequestWebhookMetadata";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./SpeechToTextConvertRequestEntityDetection"), exports);
17
18
  __exportStar(require("./SpeechToTextConvertRequestFileFormat"), exports);
18
19
  __exportStar(require("./SpeechToTextConvertRequestTimestampsGranularity"), exports);
19
20
  __exportStar(require("./SpeechToTextConvertRequestWebhookMetadata"), exports);