@deepgram/sdk 5.0.0-beta.2 → 5.0.0-beta.3

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 (206) hide show
  1. package/dist/browser/index.global.js +304 -451
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/CustomClient.js +124 -0
  4. package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1ConversationText.d.ts +1 -1
  5. package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1Settings.d.ts +24 -54
  6. package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.ts +1 -1
  7. package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1UpdateSpeak.d.ts +2 -18
  8. package/dist/cjs/api/resources/agent/resources/v1/types/index.d.ts +0 -4
  9. package/dist/cjs/api/resources/agent/resources/v1/types/index.js +0 -4
  10. package/dist/cjs/api/resources/listen/resources/v1/client/Client.d.ts +1 -0
  11. package/dist/cjs/api/resources/listen/resources/v1/client/Client.js +2 -1
  12. package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCallbackMethod.d.ts +1 -1
  13. package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCustomIntentMode.d.ts +1 -1
  14. package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCustomTopicMode.d.ts +1 -1
  15. package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestEncoding.d.ts +1 -1
  16. package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestModel.d.ts +1 -1
  17. package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestSummarize.d.ts +1 -1
  18. package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestVersion.d.ts +1 -1
  19. package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1CloseStream.d.ts +1 -1
  20. package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1Finalize.d.ts +1 -1
  21. package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1KeepAlive.d.ts +1 -1
  22. package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1Results.d.ts +19 -0
  23. package/dist/cjs/api/resources/listen/resources/v2/types/ListenV2CloseStream.d.ts +1 -1
  24. package/dist/cjs/api/resources/listen/resources/v2/types/ListenV2TurnInfo.d.ts +1 -1
  25. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/types/BreakdownListRequestDeployment.d.ts +1 -1
  26. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/types/BreakdownListRequestGroupingItem.d.ts +1 -1
  27. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/keys/types/KeysListRequestStatus.d.ts +1 -1
  28. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.js +2 -2
  29. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestDeployment.d.ts +1 -1
  30. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestEndpoint.d.ts +1 -1
  31. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestMethod.d.ts +1 -1
  32. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestStatus.d.ts +1 -1
  33. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestDeployment.d.ts +1 -1
  34. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestEndpoint.d.ts +1 -1
  35. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestGrouping.d.ts +1 -1
  36. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestMethod.d.ts +1 -1
  37. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestDeployment.d.ts +1 -1
  38. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestEndpoint.d.ts +1 -1
  39. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestMethod.d.ts +1 -1
  40. package/dist/cjs/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCallbackMethod.d.ts +1 -1
  41. package/dist/cjs/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCustomIntentMode.d.ts +1 -1
  42. package/dist/cjs/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCustomTopicMode.d.ts +1 -1
  43. package/dist/cjs/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestSummarize.d.ts +1 -1
  44. package/dist/cjs/api/resources/selfHosted/resources/v1/resources/distributionCredentials/types/DistributionCredentialsCreateRequestScopesItem.d.ts +1 -1
  45. package/dist/cjs/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestCallbackMethod.d.ts +1 -1
  46. package/dist/cjs/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestContainer.d.ts +1 -1
  47. package/dist/cjs/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestEncoding.d.ts +1 -1
  48. package/dist/cjs/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestModel.d.ts +1 -1
  49. package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Clear.d.ts +1 -1
  50. package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Cleared.d.ts +1 -1
  51. package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Close.d.ts +1 -1
  52. package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Flush.d.ts +1 -1
  53. package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Flushed.d.ts +1 -1
  54. package/dist/cjs/api/types/AgentThinkModelsV1Response.d.ts +3 -3
  55. package/dist/cjs/api/types/Anthropic.d.ts +17 -0
  56. package/dist/cjs/api/types/Anthropic.js +12 -0
  57. package/dist/cjs/api/types/AwsBedrockThinkProvider.d.ts +40 -0
  58. package/dist/cjs/api/types/AwsBedrockThinkProvider.js +20 -0
  59. package/dist/cjs/api/types/AwsPollySpeakProvider.d.ts +47 -0
  60. package/dist/cjs/api/types/AwsPollySpeakProvider.js +31 -0
  61. package/dist/cjs/api/types/Cartesia.d.ts +24 -0
  62. package/dist/cjs/api/types/Cartesia.js +12 -0
  63. package/dist/cjs/api/types/Deepgram.d.ts +76 -0
  64. package/dist/cjs/api/types/Deepgram.js +73 -0
  65. package/dist/cjs/api/types/ElevenLabsSpeakProvider.d.ts +20 -0
  66. package/dist/cjs/api/types/ElevenLabsSpeakProvider.js +13 -0
  67. package/dist/cjs/api/types/Google.d.ts +18 -0
  68. package/dist/cjs/api/types/Google.js +13 -0
  69. package/dist/cjs/api/types/Groq.d.ts +9 -0
  70. package/dist/cjs/api/types/Groq.js +3 -0
  71. package/dist/cjs/api/types/ListBillingFieldsV1Response.d.ts +1 -1
  72. package/dist/cjs/api/types/ListenV1CallbackMethod.d.ts +1 -1
  73. package/dist/cjs/api/types/ListenV1DetectEntities.d.ts +6 -0
  74. package/dist/cjs/api/types/ListenV1DetectEntities.js +9 -0
  75. package/dist/cjs/api/types/ListenV1Diarize.d.ts +1 -1
  76. package/dist/cjs/api/types/ListenV1Dictation.d.ts +1 -1
  77. package/dist/cjs/api/types/ListenV1Encoding.d.ts +1 -1
  78. package/dist/cjs/api/types/ListenV1InterimResults.d.ts +1 -1
  79. package/dist/cjs/api/types/ListenV1Model.d.ts +1 -1
  80. package/dist/cjs/api/types/ListenV1Multichannel.d.ts +1 -1
  81. package/dist/cjs/api/types/ListenV1Numerals.d.ts +1 -1
  82. package/dist/cjs/api/types/ListenV1ProfanityFilter.d.ts +1 -1
  83. package/dist/cjs/api/types/ListenV1Punctuate.d.ts +1 -1
  84. package/dist/cjs/api/types/ListenV1Redact.d.ts +1 -1
  85. package/dist/cjs/api/types/ListenV1ResponseResultsChannelsItem.d.ts +12 -0
  86. package/dist/cjs/api/types/ListenV1SmartFormat.d.ts +1 -1
  87. package/dist/cjs/api/types/ListenV1VadEvents.d.ts +1 -1
  88. package/dist/cjs/api/types/ListenV2Encoding.d.ts +1 -1
  89. package/dist/cjs/api/types/OpenAi.d.ts +27 -0
  90. package/dist/cjs/api/types/OpenAi.js +21 -0
  91. package/dist/cjs/api/types/SpeakSettingsV1.d.ts +20 -0
  92. package/dist/cjs/api/types/SpeakSettingsV1.js +3 -0
  93. package/dist/cjs/api/types/SpeakSettingsV1Provider.d.ts +19 -0
  94. package/dist/cjs/api/types/SpeakSettingsV1Provider.js +3 -0
  95. package/dist/cjs/api/types/SpeakV1Encoding.d.ts +1 -1
  96. package/dist/cjs/api/types/SpeakV1Model.d.ts +1 -1
  97. package/dist/cjs/api/types/SpeakV1SampleRate.d.ts +1 -1
  98. package/dist/cjs/api/types/ThinkSettingsV1.d.ts +50 -0
  99. package/dist/cjs/api/types/ThinkSettingsV1.js +3 -0
  100. package/dist/cjs/api/types/index.d.ts +13 -0
  101. package/dist/cjs/api/types/index.js +13 -0
  102. package/dist/cjs/version.d.ts +1 -1
  103. package/dist/cjs/version.js +1 -1
  104. package/dist/esm/BaseClient.mjs +2 -2
  105. package/dist/esm/CustomClient.mjs +124 -0
  106. package/dist/esm/api/resources/agent/resources/v1/types/AgentV1ConversationText.d.mts +1 -1
  107. package/dist/esm/api/resources/agent/resources/v1/types/AgentV1Settings.d.mts +24 -54
  108. package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.mts +1 -1
  109. package/dist/esm/api/resources/agent/resources/v1/types/AgentV1UpdateSpeak.d.mts +2 -18
  110. package/dist/esm/api/resources/agent/resources/v1/types/index.d.mts +0 -4
  111. package/dist/esm/api/resources/agent/resources/v1/types/index.mjs +0 -4
  112. package/dist/esm/api/resources/listen/resources/v1/client/Client.d.mts +1 -0
  113. package/dist/esm/api/resources/listen/resources/v1/client/Client.mjs +2 -1
  114. package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCallbackMethod.d.mts +1 -1
  115. package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCustomIntentMode.d.mts +1 -1
  116. package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestCustomTopicMode.d.mts +1 -1
  117. package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestEncoding.d.mts +1 -1
  118. package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestModel.d.mts +1 -1
  119. package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestSummarize.d.mts +1 -1
  120. package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestVersion.d.mts +1 -1
  121. package/dist/esm/api/resources/listen/resources/v1/types/ListenV1CloseStream.d.mts +1 -1
  122. package/dist/esm/api/resources/listen/resources/v1/types/ListenV1Finalize.d.mts +1 -1
  123. package/dist/esm/api/resources/listen/resources/v1/types/ListenV1KeepAlive.d.mts +1 -1
  124. package/dist/esm/api/resources/listen/resources/v1/types/ListenV1Results.d.mts +19 -0
  125. package/dist/esm/api/resources/listen/resources/v2/types/ListenV2CloseStream.d.mts +1 -1
  126. package/dist/esm/api/resources/listen/resources/v2/types/ListenV2TurnInfo.d.mts +1 -1
  127. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/types/BreakdownListRequestDeployment.d.mts +1 -1
  128. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/types/BreakdownListRequestGroupingItem.d.mts +1 -1
  129. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/keys/types/KeysListRequestStatus.d.mts +1 -1
  130. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.mjs +2 -2
  131. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestDeployment.d.mts +1 -1
  132. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestEndpoint.d.mts +1 -1
  133. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestMethod.d.mts +1 -1
  134. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/types/RequestsListRequestStatus.d.mts +1 -1
  135. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestDeployment.d.mts +1 -1
  136. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestEndpoint.d.mts +1 -1
  137. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestGrouping.d.mts +1 -1
  138. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/types/BreakdownGetRequestMethod.d.mts +1 -1
  139. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestDeployment.d.mts +1 -1
  140. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestEndpoint.d.mts +1 -1
  141. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/types/UsageGetRequestMethod.d.mts +1 -1
  142. package/dist/esm/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCallbackMethod.d.mts +1 -1
  143. package/dist/esm/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCustomIntentMode.d.mts +1 -1
  144. package/dist/esm/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestCustomTopicMode.d.mts +1 -1
  145. package/dist/esm/api/resources/read/resources/v1/resources/text/types/TextAnalyzeRequestSummarize.d.mts +1 -1
  146. package/dist/esm/api/resources/selfHosted/resources/v1/resources/distributionCredentials/types/DistributionCredentialsCreateRequestScopesItem.d.mts +1 -1
  147. package/dist/esm/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestCallbackMethod.d.mts +1 -1
  148. package/dist/esm/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestContainer.d.mts +1 -1
  149. package/dist/esm/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestEncoding.d.mts +1 -1
  150. package/dist/esm/api/resources/speak/resources/v1/resources/audio/types/AudioGenerateRequestModel.d.mts +1 -1
  151. package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Clear.d.mts +1 -1
  152. package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Cleared.d.mts +1 -1
  153. package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Close.d.mts +1 -1
  154. package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Flush.d.mts +1 -1
  155. package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Flushed.d.mts +1 -1
  156. package/dist/esm/api/types/AgentThinkModelsV1Response.d.mts +3 -3
  157. package/dist/esm/api/types/Anthropic.d.mts +17 -0
  158. package/dist/esm/api/types/Anthropic.mjs +9 -0
  159. package/dist/esm/api/types/AwsBedrockThinkProvider.d.mts +40 -0
  160. package/dist/esm/api/types/AwsBedrockThinkProvider.mjs +17 -0
  161. package/dist/esm/api/types/AwsPollySpeakProvider.d.mts +47 -0
  162. package/dist/esm/api/types/AwsPollySpeakProvider.mjs +28 -0
  163. package/dist/esm/api/types/Cartesia.d.mts +24 -0
  164. package/dist/esm/api/types/Cartesia.mjs +9 -0
  165. package/dist/esm/api/types/Deepgram.d.mts +76 -0
  166. package/dist/esm/api/types/Deepgram.mjs +70 -0
  167. package/dist/esm/api/types/ElevenLabsSpeakProvider.d.mts +20 -0
  168. package/dist/esm/api/types/ElevenLabsSpeakProvider.mjs +10 -0
  169. package/dist/esm/api/types/Google.d.mts +18 -0
  170. package/dist/esm/api/types/Google.mjs +10 -0
  171. package/dist/esm/api/types/Groq.d.mts +9 -0
  172. package/dist/esm/api/types/Groq.mjs +2 -0
  173. package/dist/esm/api/types/ListBillingFieldsV1Response.d.mts +1 -1
  174. package/dist/esm/api/types/ListenV1CallbackMethod.d.mts +1 -1
  175. package/dist/esm/api/types/ListenV1DetectEntities.d.mts +6 -0
  176. package/dist/esm/api/types/ListenV1DetectEntities.mjs +6 -0
  177. package/dist/esm/api/types/ListenV1Diarize.d.mts +1 -1
  178. package/dist/esm/api/types/ListenV1Dictation.d.mts +1 -1
  179. package/dist/esm/api/types/ListenV1Encoding.d.mts +1 -1
  180. package/dist/esm/api/types/ListenV1InterimResults.d.mts +1 -1
  181. package/dist/esm/api/types/ListenV1Model.d.mts +1 -1
  182. package/dist/esm/api/types/ListenV1Multichannel.d.mts +1 -1
  183. package/dist/esm/api/types/ListenV1Numerals.d.mts +1 -1
  184. package/dist/esm/api/types/ListenV1ProfanityFilter.d.mts +1 -1
  185. package/dist/esm/api/types/ListenV1Punctuate.d.mts +1 -1
  186. package/dist/esm/api/types/ListenV1Redact.d.mts +1 -1
  187. package/dist/esm/api/types/ListenV1ResponseResultsChannelsItem.d.mts +12 -0
  188. package/dist/esm/api/types/ListenV1SmartFormat.d.mts +1 -1
  189. package/dist/esm/api/types/ListenV1VadEvents.d.mts +1 -1
  190. package/dist/esm/api/types/ListenV2Encoding.d.mts +1 -1
  191. package/dist/esm/api/types/OpenAi.d.mts +27 -0
  192. package/dist/esm/api/types/OpenAi.mjs +18 -0
  193. package/dist/esm/api/types/SpeakSettingsV1.d.mts +20 -0
  194. package/dist/esm/api/types/SpeakSettingsV1.mjs +2 -0
  195. package/dist/esm/api/types/SpeakSettingsV1Provider.d.mts +19 -0
  196. package/dist/esm/api/types/SpeakSettingsV1Provider.mjs +2 -0
  197. package/dist/esm/api/types/SpeakV1Encoding.d.mts +1 -1
  198. package/dist/esm/api/types/SpeakV1Model.d.mts +1 -1
  199. package/dist/esm/api/types/SpeakV1SampleRate.d.mts +1 -1
  200. package/dist/esm/api/types/ThinkSettingsV1.d.mts +50 -0
  201. package/dist/esm/api/types/ThinkSettingsV1.mjs +2 -0
  202. package/dist/esm/api/types/index.d.mts +13 -0
  203. package/dist/esm/api/types/index.mjs +13 -0
  204. package/dist/esm/version.d.mts +1 -1
  205. package/dist/esm/version.mjs +1 -1
  206. package/package.json +2 -2
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "",
46
- "X-Fern-SDK-Version": "0.0.259",
47
- "User-Agent": "/0.0.259",
46
+ "X-Fern-SDK-Version": "0.0.283",
47
+ "User-Agent": "/0.0.283",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -374,6 +374,26 @@ function setupBinaryHandling(socket, eventHandlers) {
374
374
  socket.addEventListener("message", binaryAwareHandler);
375
375
  return binaryAwareHandler;
376
376
  }
377
+ /**
378
+ * Helper to prevent duplicate event listeners on WebSocket connections.
379
+ * This removes all event listeners that were registered by the auto-generated
380
+ * Socket class constructor, preventing duplicate event firing when connect() is called.
381
+ */
382
+ function preventDuplicateEventListeners(socket, handlers) {
383
+ // Remove the handlers that were added by the auto-generated constructor
384
+ if (handlers.handleOpen) {
385
+ socket.removeEventListener("open", handlers.handleOpen);
386
+ }
387
+ if (handlers.handleMessage) {
388
+ socket.removeEventListener("message", handlers.handleMessage);
389
+ }
390
+ if (handlers.handleClose) {
391
+ socket.removeEventListener("close", handlers.handleClose);
392
+ }
393
+ if (handlers.handleError) {
394
+ socket.removeEventListener("error", handlers.handleError);
395
+ }
396
+ }
377
397
  /**
378
398
  * Helper function to reset socket connection state before connecting.
379
399
  * Ensures _connectLock is reset if the socket is in CLOSED state.
@@ -444,6 +464,24 @@ class WrappedAgentV1Client extends Client_js_5.V1Client {
444
464
  return new WrappedAgentV1Socket({ socket });
445
465
  });
446
466
  }
467
+ /**
468
+ * Creates a WebSocket connection object without actually connecting.
469
+ * This is an alias for connect() with clearer naming - the returned socket
470
+ * is not connected until you call socket.connect().
471
+ *
472
+ * Usage:
473
+ * ```typescript
474
+ * const socket = await client.agent.v1.createConnection();
475
+ * socket.on('open', () => console.log('Connected!'));
476
+ * socket.on('message', (msg) => console.log('Message:', msg));
477
+ * socket.connect(); // Actually initiates the connection
478
+ * ```
479
+ */
480
+ createConnection() {
481
+ return __awaiter(this, arguments, void 0, function* (args = {}) {
482
+ return this.connect(args);
483
+ });
484
+ }
447
485
  }
448
486
  /**
449
487
  * Wrapper for Agent V1Socket that handles binary messages correctly.
@@ -462,6 +500,14 @@ class WrappedAgentV1Socket extends Socket_js_1.V1Socket {
462
500
  this.binaryAwareHandler = setupBinaryHandling(this.socket, this.eventHandlers);
463
501
  }
464
502
  connect() {
503
+ // Remove duplicate listeners before calling super.connect()
504
+ const socketAny = this;
505
+ preventDuplicateEventListeners(this.socket, {
506
+ handleOpen: socketAny.handleOpen,
507
+ handleMessage: socketAny.handleMessage,
508
+ handleClose: socketAny.handleClose,
509
+ handleError: socketAny.handleError
510
+ });
465
511
  resetSocketConnectionState(this.socket);
466
512
  super.connect();
467
513
  // Re-setup binary handling in case connect() re-registered handlers
@@ -550,6 +596,24 @@ class WrappedListenV1Client extends Client_js_6.V1Client {
550
596
  return new WrappedListenV1Socket({ socket });
551
597
  });
552
598
  }
599
+ /**
600
+ * Creates a WebSocket connection object without actually connecting.
601
+ * This is an alias for connect() with clearer naming - the returned socket
602
+ * is not connected until you call socket.connect().
603
+ *
604
+ * Usage:
605
+ * ```typescript
606
+ * const socket = await client.listen.v1.createConnection({ model: 'nova-3' });
607
+ * socket.on('open', () => console.log('Connected!'));
608
+ * socket.on('message', (msg) => console.log('Transcript:', msg));
609
+ * socket.connect(); // Actually initiates the connection
610
+ * ```
611
+ */
612
+ createConnection(args) {
613
+ return __awaiter(this, void 0, void 0, function* () {
614
+ return this.connect(args);
615
+ });
616
+ }
553
617
  }
554
618
  /**
555
619
  * Wrapper for Listen V1Socket that handles binary messages correctly.
@@ -568,6 +632,14 @@ class WrappedListenV1Socket extends Socket_js_2.V1Socket {
568
632
  this.binaryAwareHandler = setupBinaryHandling(this.socket, this.eventHandlers);
569
633
  }
570
634
  connect() {
635
+ // Remove duplicate listeners before calling super.connect()
636
+ const socketAny = this;
637
+ preventDuplicateEventListeners(this.socket, {
638
+ handleOpen: socketAny.handleOpen,
639
+ handleMessage: socketAny.handleMessage,
640
+ handleClose: socketAny.handleClose,
641
+ handleError: socketAny.handleError
642
+ });
571
643
  resetSocketConnectionState(this.socket);
572
644
  super.connect();
573
645
  this.setupBinaryHandling();
@@ -617,6 +689,24 @@ class WrappedListenV2Client extends Client_js_7.V2Client {
617
689
  return new WrappedListenV2Socket({ socket });
618
690
  });
619
691
  }
692
+ /**
693
+ * Creates a WebSocket connection object without actually connecting.
694
+ * This is an alias for connect() with clearer naming - the returned socket
695
+ * is not connected until you call socket.connect().
696
+ *
697
+ * Usage:
698
+ * ```typescript
699
+ * const socket = await client.listen.v2.createConnection({ model: 'flux-general-en' });
700
+ * socket.on('open', () => console.log('Connected!'));
701
+ * socket.on('message', (msg) => console.log('Transcript:', msg));
702
+ * socket.connect(); // Actually initiates the connection
703
+ * ```
704
+ */
705
+ createConnection(args) {
706
+ return __awaiter(this, void 0, void 0, function* () {
707
+ return this.connect(args);
708
+ });
709
+ }
620
710
  }
621
711
  /**
622
712
  * Wrapper for Listen V2Socket that handles binary messages correctly and adds ping support.
@@ -636,6 +726,14 @@ class WrappedListenV2Socket extends Socket_js_3.V2Socket {
636
726
  this.binaryAwareHandler = setupBinaryHandling(this.socket, this.eventHandlers);
637
727
  }
638
728
  connect() {
729
+ // Remove duplicate listeners before calling super.connect()
730
+ const socketAny = this;
731
+ preventDuplicateEventListeners(this.socket, {
732
+ handleOpen: socketAny.handleOpen,
733
+ handleMessage: socketAny.handleMessage,
734
+ handleClose: socketAny.handleClose,
735
+ handleError: socketAny.handleError
736
+ });
639
737
  resetSocketConnectionState(this.socket);
640
738
  super.connect();
641
739
  this.setupBinaryHandling();
@@ -706,6 +804,24 @@ class WrappedSpeakV1Client extends Client_js_8.V1Client {
706
804
  return new WrappedSpeakV1Socket({ socket });
707
805
  });
708
806
  }
807
+ /**
808
+ * Creates a WebSocket connection object without actually connecting.
809
+ * This is an alias for connect() with clearer naming - the returned socket
810
+ * is not connected until you call socket.connect().
811
+ *
812
+ * Usage:
813
+ * ```typescript
814
+ * const socket = await client.speak.v1.createConnection({ model: 'aura-asteria-en' });
815
+ * socket.on('open', () => console.log('Connected!'));
816
+ * socket.on('message', (audioData) => console.log('Audio received'));
817
+ * socket.connect(); // Actually initiates the connection
818
+ * ```
819
+ */
820
+ createConnection(args) {
821
+ return __awaiter(this, void 0, void 0, function* () {
822
+ return this.connect(args);
823
+ });
824
+ }
709
825
  }
710
826
  /**
711
827
  * Wrapper for Speak V1Socket that handles binary messages correctly.
@@ -724,6 +840,14 @@ class WrappedSpeakV1Socket extends Socket_js_4.V1Socket {
724
840
  this.binaryAwareHandler = setupBinaryHandling(this.socket, this.eventHandlers);
725
841
  }
726
842
  connect() {
843
+ // Remove duplicate listeners before calling super.connect()
844
+ const socketAny = this;
845
+ preventDuplicateEventListeners(this.socket, {
846
+ handleOpen: socketAny.handleOpen,
847
+ handleMessage: socketAny.handleMessage,
848
+ handleClose: socketAny.handleClose,
849
+ handleError: socketAny.handleError
850
+ });
727
851
  resetSocketConnectionState(this.socket);
728
852
  super.connect();
729
853
  this.setupBinaryHandling();
@@ -12,5 +12,5 @@ export declare namespace AgentV1ConversationText {
12
12
  readonly User: "user";
13
13
  readonly Assistant: "assistant";
14
14
  };
15
- type Role = (typeof Role)[keyof typeof Role];
15
+ type Role = (typeof Role)[keyof typeof Role] | string;
16
16
  }
@@ -47,7 +47,7 @@ export declare namespace AgentV1Settings {
47
47
  readonly Speex: "speex";
48
48
  readonly G729: "g729";
49
49
  };
50
- type Encoding = (typeof Encoding)[keyof typeof Encoding];
50
+ type Encoding = (typeof Encoding)[keyof typeof Encoding] | string;
51
51
  }
52
52
  /**
53
53
  * Audio output configuration settings
@@ -69,7 +69,7 @@ export declare namespace AgentV1Settings {
69
69
  readonly Mulaw: "mulaw";
70
70
  readonly Alaw: "alaw";
71
71
  };
72
- type Encoding = (typeof Encoding)[keyof typeof Encoding];
72
+ type Encoding = (typeof Encoding)[keyof typeof Encoding] | string;
73
73
  }
74
74
  }
75
75
  interface Agent {
@@ -102,7 +102,7 @@ export declare namespace AgentV1Settings {
102
102
  * Conversation text as part of the conversation history */
103
103
  {
104
104
  type: "History";
105
- role: "user" | "assistant";
105
+ role: "user" | "assistant" | string;
106
106
  content: string;
107
107
  }
108
108
  /**
@@ -122,63 +122,33 @@ export declare namespace AgentV1Settings {
122
122
  interface Listen {
123
123
  provider?: Deepgram.agent.AgentV1SettingsAgentListenProvider;
124
124
  }
125
- interface Think {
126
- provider: Deepgram.agent.AgentV1SettingsAgentThinkProvider;
127
- /** Optional for non-Deepgram LLM providers. When present, must include url field and headers object */
128
- endpoint?: Think.Endpoint;
129
- functions?: Think.Functions.Item[];
130
- prompt?: string;
131
- /** Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used */
132
- context_length?: Think.ContextLength;
133
- }
134
- namespace Think {
135
- /**
136
- * Optional for non-Deepgram LLM providers. When present, must include url field and headers object
137
- */
138
- interface Endpoint {
139
- /** Custom LLM endpoint URL */
140
- url?: string;
141
- /** Custom headers for the endpoint */
142
- headers?: Record<string, string>;
143
- }
144
- type Functions = Functions.Item[];
145
- namespace Functions {
146
- interface Item {
147
- /** Function name */
148
- name?: string;
149
- /** Function description */
150
- description?: string;
151
- /** Function parameters */
152
- parameters?: Record<string, unknown>;
153
- /** The Function endpoint to call. if not passed, function is called client-side */
154
- endpoint?: Item.Endpoint;
155
- }
156
- namespace Item {
157
- /**
158
- * The Function endpoint to call. if not passed, function is called client-side
159
- */
160
- interface Endpoint {
161
- /** Endpoint URL */
162
- url?: string;
163
- /** HTTP method */
164
- method?: string;
165
- headers?: Record<string, string>;
166
- }
167
- }
168
- }
169
- /**
170
- * Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used
171
- */
172
- type ContextLength = "max" | number;
173
- }
125
+ type Think = {
126
+ provider: Record<string, unknown>;
127
+ endpoint?: {
128
+ url?: string | undefined;
129
+ headers?: Record<string, string> | undefined;
130
+ } | undefined;
131
+ functions?: Record<string, unknown>[] | undefined;
132
+ prompt?: string | undefined;
133
+ context_length?: ("max" | number) | undefined;
134
+ } | {
135
+ provider: Record<string, unknown>;
136
+ endpoint?: {
137
+ url?: string | undefined;
138
+ headers?: Record<string, string> | undefined;
139
+ } | undefined;
140
+ functions?: Record<string, unknown>[] | undefined;
141
+ prompt?: string | undefined;
142
+ context_length?: ("max" | number) | undefined;
143
+ }[];
174
144
  type Speak = {
175
- provider: Deepgram.agent.AgentV1SettingsAgentSpeakEndpointProvider;
145
+ provider: Record<string, unknown>;
176
146
  endpoint?: {
177
147
  url?: string | undefined;
178
148
  headers?: Record<string, string> | undefined;
179
149
  } | undefined;
180
150
  } | {
181
- provider: Deepgram.agent.AgentV1SettingsAgentSpeakOneItemProvider;
151
+ provider: Record<string, unknown>;
182
152
  endpoint?: {
183
153
  url?: string | undefined;
184
154
  headers?: Record<string, string> | undefined;
@@ -7,7 +7,7 @@ export declare namespace AgentV1SettingsAgentListenProvider {
7
7
  type: "deepgram";
8
8
  /** Model to use for speech to text using the V1 API (e.g. Nova-3, Nova-2) */
9
9
  model?: string;
10
- /** Language code to use for speech-to-text. Can be a BCP-47 language tag (e.g. `en`), or `multi` for code-switching transcription */
10
+ /** Language code to use for speech-to-text. Can be a BCP-47 language tag (e.g. `en`), or `multi` for code-switching transcription */
11
11
  language?: string;
12
12
  /** Prompt keyterm recognition to improve Keyword Recall Rate */
13
13
  keyterms?: string[];
@@ -1,32 +1,16 @@
1
- import type * as Deepgram from "../../../../../index.js";
2
1
  export interface AgentV1UpdateSpeak {
3
2
  /** Message type identifier for updating the speak model */
4
3
  type: "UpdateSpeak";
5
- /** Configuration for the speak model. Optional, defaults to latest deepgram TTS model */
6
4
  speak: AgentV1UpdateSpeak.Speak;
7
5
  }
8
6
  export declare namespace AgentV1UpdateSpeak {
9
- /**
10
- * Configuration for the speak model. Optional, defaults to latest deepgram TTS model
11
- */
12
7
  interface Speak {
13
- provider: Deepgram.agent.AgentV1UpdateSpeakSpeakProvider;
14
- /**
15
- * Optional if provider is Deepgram. Required for non-Deepgram TTS providers.
16
- * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.
17
- */
8
+ /** TTS provider configuration (Deepgram, ElevenLabs, Cartesia, OpenAI, or AWS Polly) */
9
+ provider: Record<string, unknown>;
18
10
  endpoint?: Speak.Endpoint;
19
11
  }
20
12
  namespace Speak {
21
- /**
22
- * Optional if provider is Deepgram. Required for non-Deepgram TTS providers.
23
- * When present, must include url field and headers object. Valid schemes are https and wss with wss only supported for Eleven Labs.
24
- */
25
13
  interface Endpoint {
26
- /**
27
- * Custom TTS endpoint URL. Cannot contain `output_format` or `model_id` query
28
- * parameters when the provider is Eleven Labs.
29
- */
30
14
  url?: string;
31
15
  headers?: Record<string, string>;
32
16
  }
@@ -13,14 +13,10 @@ export * from "./AgentV1ReceiveFunctionCallResponse.js";
13
13
  export * from "./AgentV1SendFunctionCallResponse.js";
14
14
  export * from "./AgentV1Settings.js";
15
15
  export * from "./AgentV1SettingsAgentListenProvider.js";
16
- export * from "./AgentV1SettingsAgentSpeakEndpointProvider.js";
17
- export * from "./AgentV1SettingsAgentSpeakOneItemProvider.js";
18
- export * from "./AgentV1SettingsAgentThinkProvider.js";
19
16
  export * from "./AgentV1SettingsApplied.js";
20
17
  export * from "./AgentV1SpeakUpdated.js";
21
18
  export * from "./AgentV1UpdatePrompt.js";
22
19
  export * from "./AgentV1UpdateSpeak.js";
23
- export * from "./AgentV1UpdateSpeakSpeakProvider.js";
24
20
  export * from "./AgentV1UserStartedSpeaking.js";
25
21
  export * from "./AgentV1Warning.js";
26
22
  export * from "./AgentV1Welcome.js";
@@ -29,14 +29,10 @@ __exportStar(require("./AgentV1ReceiveFunctionCallResponse.js"), exports);
29
29
  __exportStar(require("./AgentV1SendFunctionCallResponse.js"), exports);
30
30
  __exportStar(require("./AgentV1Settings.js"), exports);
31
31
  __exportStar(require("./AgentV1SettingsAgentListenProvider.js"), exports);
32
- __exportStar(require("./AgentV1SettingsAgentSpeakEndpointProvider.js"), exports);
33
- __exportStar(require("./AgentV1SettingsAgentSpeakOneItemProvider.js"), exports);
34
- __exportStar(require("./AgentV1SettingsAgentThinkProvider.js"), exports);
35
32
  __exportStar(require("./AgentV1SettingsApplied.js"), exports);
36
33
  __exportStar(require("./AgentV1SpeakUpdated.js"), exports);
37
34
  __exportStar(require("./AgentV1UpdatePrompt.js"), exports);
38
35
  __exportStar(require("./AgentV1UpdateSpeak.js"), exports);
39
- __exportStar(require("./AgentV1UpdateSpeakSpeakProvider.js"), exports);
40
36
  __exportStar(require("./AgentV1UserStartedSpeaking.js"), exports);
41
37
  __exportStar(require("./AgentV1Warning.js"), exports);
42
38
  __exportStar(require("./AgentV1Welcome.js"), exports);
@@ -8,6 +8,7 @@ export declare namespace V1Client {
8
8
  callback?: string;
9
9
  callback_method?: string;
10
10
  channels?: string;
11
+ detect_entities?: string;
11
12
  diarize?: string;
12
13
  dictation?: string;
13
14
  encoding?: string;
@@ -61,11 +61,12 @@ class V1Client {
61
61
  connect(args) {
62
62
  return __awaiter(this, void 0, void 0, function* () {
63
63
  var _a, _b;
64
- const { callback, callback_method: callbackMethod, channels, diarize, dictation, encoding, endpointing, extra, interim_results: interimResults, keyterm, keywords, language, mip_opt_out: mipOptOut, model, multichannel, numerals, profanity_filter: profanityFilter, punctuate, redact, replace, sample_rate: sampleRate, search, smart_format: smartFormat, tag, utterance_end_ms: utteranceEndMs, vad_events: vadEvents, version, headers, debug, reconnectAttempts, } = args;
64
+ const { callback, callback_method: callbackMethod, channels, detect_entities: detectEntities, diarize, dictation, encoding, endpointing, extra, interim_results: interimResults, keyterm, keywords, language, mip_opt_out: mipOptOut, model, multichannel, numerals, profanity_filter: profanityFilter, punctuate, redact, replace, sample_rate: sampleRate, search, smart_format: smartFormat, tag, utterance_end_ms: utteranceEndMs, vad_events: vadEvents, version, headers, debug, reconnectAttempts, } = args;
65
65
  const _queryParams = {
66
66
  callback,
67
67
  callback_method: callbackMethod,
68
68
  channels,
69
+ detect_entities: detectEntities,
69
70
  diarize,
70
71
  dictation,
71
72
  encoding,
@@ -2,4 +2,4 @@ export declare const MediaTranscribeRequestCallbackMethod: {
2
2
  readonly Post: "POST";
3
3
  readonly Put: "PUT";
4
4
  };
5
- export type MediaTranscribeRequestCallbackMethod = (typeof MediaTranscribeRequestCallbackMethod)[keyof typeof MediaTranscribeRequestCallbackMethod];
5
+ export type MediaTranscribeRequestCallbackMethod = (typeof MediaTranscribeRequestCallbackMethod)[keyof typeof MediaTranscribeRequestCallbackMethod] | string;
@@ -2,4 +2,4 @@ export declare const MediaTranscribeRequestCustomIntentMode: {
2
2
  readonly Extended: "extended";
3
3
  readonly Strict: "strict";
4
4
  };
5
- export type MediaTranscribeRequestCustomIntentMode = (typeof MediaTranscribeRequestCustomIntentMode)[keyof typeof MediaTranscribeRequestCustomIntentMode];
5
+ export type MediaTranscribeRequestCustomIntentMode = (typeof MediaTranscribeRequestCustomIntentMode)[keyof typeof MediaTranscribeRequestCustomIntentMode] | string;
@@ -2,4 +2,4 @@ export declare const MediaTranscribeRequestCustomTopicMode: {
2
2
  readonly Extended: "extended";
3
3
  readonly Strict: "strict";
4
4
  };
5
- export type MediaTranscribeRequestCustomTopicMode = (typeof MediaTranscribeRequestCustomTopicMode)[keyof typeof MediaTranscribeRequestCustomTopicMode];
5
+ export type MediaTranscribeRequestCustomTopicMode = (typeof MediaTranscribeRequestCustomTopicMode)[keyof typeof MediaTranscribeRequestCustomTopicMode] | string;
@@ -8,4 +8,4 @@ export declare const MediaTranscribeRequestEncoding: {
8
8
  readonly Speex: "speex";
9
9
  readonly G729: "g729";
10
10
  };
11
- export type MediaTranscribeRequestEncoding = (typeof MediaTranscribeRequestEncoding)[keyof typeof MediaTranscribeRequestEncoding];
11
+ export type MediaTranscribeRequestEncoding = (typeof MediaTranscribeRequestEncoding)[keyof typeof MediaTranscribeRequestEncoding] | string;
@@ -29,4 +29,4 @@ export declare const MediaTranscribeRequestModel: {
29
29
  readonly Voicemail: "voicemail";
30
30
  readonly Video: "video";
31
31
  };
32
- export type MediaTranscribeRequestModel = (typeof MediaTranscribeRequestModel)[keyof typeof MediaTranscribeRequestModel];
32
+ export type MediaTranscribeRequestModel = (typeof MediaTranscribeRequestModel)[keyof typeof MediaTranscribeRequestModel] | string;
@@ -1,4 +1,4 @@
1
1
  export declare const MediaTranscribeRequestSummarize: {
2
2
  readonly V2: "v2";
3
3
  };
4
- export type MediaTranscribeRequestSummarize = (typeof MediaTranscribeRequestSummarize)[keyof typeof MediaTranscribeRequestSummarize];
4
+ export type MediaTranscribeRequestSummarize = (typeof MediaTranscribeRequestSummarize)[keyof typeof MediaTranscribeRequestSummarize] | string;
@@ -1,4 +1,4 @@
1
1
  export declare const MediaTranscribeRequestVersion: {
2
2
  readonly Latest: "latest";
3
3
  };
4
- export type MediaTranscribeRequestVersion = (typeof MediaTranscribeRequestVersion)[keyof typeof MediaTranscribeRequestVersion];
4
+ export type MediaTranscribeRequestVersion = (typeof MediaTranscribeRequestVersion)[keyof typeof MediaTranscribeRequestVersion] | string;
@@ -9,5 +9,5 @@ export declare namespace ListenV1CloseStream {
9
9
  readonly CloseStream: "CloseStream";
10
10
  readonly KeepAlive: "KeepAlive";
11
11
  };
12
- type Type = (typeof Type)[keyof typeof Type];
12
+ type Type = (typeof Type)[keyof typeof Type] | string;
13
13
  }
@@ -9,5 +9,5 @@ export declare namespace ListenV1Finalize {
9
9
  readonly CloseStream: "CloseStream";
10
10
  readonly KeepAlive: "KeepAlive";
11
11
  };
12
- type Type = (typeof Type)[keyof typeof Type];
12
+ type Type = (typeof Type)[keyof typeof Type] | string;
13
13
  }
@@ -9,5 +9,5 @@ export declare namespace ListenV1KeepAlive {
9
9
  readonly CloseStream: "CloseStream";
10
10
  readonly KeepAlive: "KeepAlive";
11
11
  };
12
- type Type = (typeof Type)[keyof typeof Type];
12
+ type Type = (typeof Type)[keyof typeof Type] | string;
13
13
  }
@@ -15,6 +15,8 @@ export interface ListenV1Results {
15
15
  metadata: ListenV1Results.Metadata;
16
16
  /** Whether the transcription is from a finalize message */
17
17
  from_finalize?: boolean;
18
+ /** Extracted entities from the audio when detect_entities is enabled. Only present in is_final messages. Returns an empty array if no entities are detected */
19
+ entities?: ListenV1Results.Entities.Item[];
18
20
  }
19
21
  export declare namespace ListenV1Results {
20
22
  interface Channel {
@@ -71,4 +73,21 @@ export declare namespace ListenV1Results {
71
73
  arch: string;
72
74
  }
73
75
  }
76
+ type Entities = Entities.Item[];
77
+ namespace Entities {
78
+ interface Item {
79
+ /** The type/category of the entity (e.g., NAME, PHONE_NUMBER, EMAIL_ADDRESS, ORGANIZATION, CARDINAL) */
80
+ label: string;
81
+ /** The formatted text representation of the entity */
82
+ value: string;
83
+ /** The original spoken text of the entity (present when formatting is enabled) */
84
+ raw_value: string;
85
+ /** The confidence score of the entity detection */
86
+ confidence: number;
87
+ /** The index of the first word of the entity in the transcript (inclusive) */
88
+ start_word: number;
89
+ /** The index of the last word of the entity in the transcript (exclusive) */
90
+ end_word: number;
91
+ }
92
+ }
74
93
  }
@@ -9,5 +9,5 @@ export declare namespace ListenV2CloseStream {
9
9
  readonly CloseStream: "CloseStream";
10
10
  readonly KeepAlive: "KeepAlive";
11
11
  };
12
- type Type = (typeof Type)[keyof typeof Type];
12
+ type Type = (typeof Type)[keyof typeof Type] | string;
13
13
  }
@@ -47,7 +47,7 @@ export declare namespace ListenV2TurnInfo {
47
47
  readonly TurnResumed: "TurnResumed";
48
48
  readonly EndOfTurn: "EndOfTurn";
49
49
  };
50
- type Event = (typeof Event)[keyof typeof Event];
50
+ type Event = (typeof Event)[keyof typeof Event] | string;
51
51
  type Words = Words.Item[];
52
52
  namespace Words {
53
53
  interface Item {
@@ -4,4 +4,4 @@ export declare const BreakdownListRequestDeployment: {
4
4
  readonly Beta: "beta";
5
5
  readonly SelfHosted: "self-hosted";
6
6
  };
7
- export type BreakdownListRequestDeployment = (typeof BreakdownListRequestDeployment)[keyof typeof BreakdownListRequestDeployment];
7
+ export type BreakdownListRequestDeployment = (typeof BreakdownListRequestDeployment)[keyof typeof BreakdownListRequestDeployment] | string;
@@ -4,4 +4,4 @@ export declare const BreakdownListRequestGroupingItem: {
4
4
  readonly LineItem: "line_item";
5
5
  readonly Tags: "tags";
6
6
  };
7
- export type BreakdownListRequestGroupingItem = (typeof BreakdownListRequestGroupingItem)[keyof typeof BreakdownListRequestGroupingItem];
7
+ export type BreakdownListRequestGroupingItem = (typeof BreakdownListRequestGroupingItem)[keyof typeof BreakdownListRequestGroupingItem] | string;
@@ -2,4 +2,4 @@ export declare const KeysListRequestStatus: {
2
2
  readonly Active: "active";
3
3
  readonly Expired: "expired";
4
4
  };
5
- export type KeysListRequestStatus = (typeof KeysListRequestStatus)[keyof typeof KeysListRequestStatus];
5
+ export type KeysListRequestStatus = (typeof KeysListRequestStatus)[keyof typeof KeysListRequestStatus] | string;
@@ -86,8 +86,8 @@ class RequestsClient {
86
86
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
87
87
  const { start, end, limit, page, accessor, request_id: requestId, deployment, endpoint, method, status, } = request;
88
88
  const _queryParams = {
89
- start,
90
- end,
89
+ start: start != null ? start : undefined,
90
+ end: end != null ? end : undefined,
91
91
  limit,
92
92
  page,
93
93
  accessor,
@@ -4,4 +4,4 @@ export declare const RequestsListRequestDeployment: {
4
4
  readonly Beta: "beta";
5
5
  readonly SelfHosted: "self-hosted";
6
6
  };
7
- export type RequestsListRequestDeployment = (typeof RequestsListRequestDeployment)[keyof typeof RequestsListRequestDeployment];
7
+ export type RequestsListRequestDeployment = (typeof RequestsListRequestDeployment)[keyof typeof RequestsListRequestDeployment] | string;
@@ -4,4 +4,4 @@ export declare const RequestsListRequestEndpoint: {
4
4
  readonly Speak: "speak";
5
5
  readonly Agent: "agent";
6
6
  };
7
- export type RequestsListRequestEndpoint = (typeof RequestsListRequestEndpoint)[keyof typeof RequestsListRequestEndpoint];
7
+ export type RequestsListRequestEndpoint = (typeof RequestsListRequestEndpoint)[keyof typeof RequestsListRequestEndpoint] | string;
@@ -4,4 +4,4 @@ export declare const RequestsListRequestMethod: {
4
4
  readonly Async: "async";
5
5
  readonly Streaming: "streaming";
6
6
  };
7
- export type RequestsListRequestMethod = (typeof RequestsListRequestMethod)[keyof typeof RequestsListRequestMethod];
7
+ export type RequestsListRequestMethod = (typeof RequestsListRequestMethod)[keyof typeof RequestsListRequestMethod] | string;
@@ -2,4 +2,4 @@ export declare const RequestsListRequestStatus: {
2
2
  readonly Succeeded: "succeeded";
3
3
  readonly Failed: "failed";
4
4
  };
5
- export type RequestsListRequestStatus = (typeof RequestsListRequestStatus)[keyof typeof RequestsListRequestStatus];
5
+ export type RequestsListRequestStatus = (typeof RequestsListRequestStatus)[keyof typeof RequestsListRequestStatus] | string;
@@ -4,4 +4,4 @@ export declare const BreakdownGetRequestDeployment: {
4
4
  readonly Beta: "beta";
5
5
  readonly SelfHosted: "self-hosted";
6
6
  };
7
- export type BreakdownGetRequestDeployment = (typeof BreakdownGetRequestDeployment)[keyof typeof BreakdownGetRequestDeployment];
7
+ export type BreakdownGetRequestDeployment = (typeof BreakdownGetRequestDeployment)[keyof typeof BreakdownGetRequestDeployment] | string;
@@ -4,4 +4,4 @@ export declare const BreakdownGetRequestEndpoint: {
4
4
  readonly Speak: "speak";
5
5
  readonly Agent: "agent";
6
6
  };
7
- export type BreakdownGetRequestEndpoint = (typeof BreakdownGetRequestEndpoint)[keyof typeof BreakdownGetRequestEndpoint];
7
+ export type BreakdownGetRequestEndpoint = (typeof BreakdownGetRequestEndpoint)[keyof typeof BreakdownGetRequestEndpoint] | string;
@@ -7,4 +7,4 @@ export declare const BreakdownGetRequestGrouping: {
7
7
  readonly Tags: "tags";
8
8
  readonly Deployment: "deployment";
9
9
  };
10
- export type BreakdownGetRequestGrouping = (typeof BreakdownGetRequestGrouping)[keyof typeof BreakdownGetRequestGrouping];
10
+ export type BreakdownGetRequestGrouping = (typeof BreakdownGetRequestGrouping)[keyof typeof BreakdownGetRequestGrouping] | string;
@@ -4,4 +4,4 @@ export declare const BreakdownGetRequestMethod: {
4
4
  readonly Async: "async";
5
5
  readonly Streaming: "streaming";
6
6
  };
7
- export type BreakdownGetRequestMethod = (typeof BreakdownGetRequestMethod)[keyof typeof BreakdownGetRequestMethod];
7
+ export type BreakdownGetRequestMethod = (typeof BreakdownGetRequestMethod)[keyof typeof BreakdownGetRequestMethod] | string;