@cartesia/cartesia-js 2.0.2 → 2.0.4-alpha0

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 (589) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +18 -9
  3. package/README.md +1 -5
  4. package/api/index.js +17 -1
  5. package/api/resources/apiStatus/client/Client.js +33 -6
  6. package/api/resources/apiStatus/client/index.js +2 -1
  7. package/api/resources/apiStatus/index.js +18 -2
  8. package/api/resources/apiStatus/types/ApiInfo.js +2 -1
  9. package/api/resources/apiStatus/types/index.js +17 -1
  10. package/api/resources/datasets/client/Client.d.ts +70 -0
  11. package/api/resources/datasets/client/Client.js +261 -0
  12. package/api/resources/datasets/client/index.d.ts +1 -0
  13. package/api/resources/datasets/client/index.js +17 -0
  14. package/api/resources/datasets/client/requests/UploadDatasetFileRequest.d.ts +11 -0
  15. package/api/resources/datasets/client/requests/UploadDatasetFileRequest.js +5 -0
  16. package/api/resources/datasets/client/requests/index.d.ts +1 -0
  17. package/api/resources/datasets/client/requests/index.js +2 -0
  18. package/api/resources/datasets/index.d.ts +2 -0
  19. package/api/resources/datasets/index.js +18 -0
  20. package/api/resources/datasets/types/CreateDatasetRequest.d.ts +6 -0
  21. package/api/resources/datasets/types/CreateDatasetRequest.js +5 -0
  22. package/api/resources/datasets/types/Dataset.d.ts +8 -0
  23. package/api/resources/datasets/types/Dataset.js +5 -0
  24. package/api/resources/datasets/types/DatasetFile.d.ts +8 -0
  25. package/api/resources/datasets/types/DatasetFile.js +5 -0
  26. package/api/resources/datasets/types/FilePurpose.d.ts +7 -0
  27. package/api/resources/datasets/types/FilePurpose.js +9 -0
  28. package/api/resources/datasets/types/PaginatedDatasetFiles.d.ts +8 -0
  29. package/api/resources/datasets/types/PaginatedDatasetFiles.js +5 -0
  30. package/api/resources/datasets/types/PaginatedDatasets.d.ts +8 -0
  31. package/api/resources/datasets/types/PaginatedDatasets.js +5 -0
  32. package/api/resources/datasets/types/index.d.ts +6 -0
  33. package/api/resources/datasets/types/index.js +22 -0
  34. package/api/resources/embedding/index.js +17 -1
  35. package/api/resources/embedding/types/Embedding.js +2 -1
  36. package/api/resources/embedding/types/index.js +17 -1
  37. package/api/resources/index.d.ts +3 -0
  38. package/api/resources/index.js +44 -12
  39. package/api/resources/tts/client/Client.js +40 -10
  40. package/api/resources/tts/client/index.js +2 -1
  41. package/api/resources/tts/index.js +18 -2
  42. package/api/resources/tts/types/CancelContextRequest.js +2 -1
  43. package/api/resources/tts/types/ContextId.js +2 -1
  44. package/api/resources/tts/types/Controls.js +2 -1
  45. package/api/resources/tts/types/Emotion.js +4 -1
  46. package/api/resources/tts/types/GenerationRequest.js +2 -1
  47. package/api/resources/tts/types/Mp3OutputFormat.js +2 -1
  48. package/api/resources/tts/types/NaturalSpecifier.js +4 -1
  49. package/api/resources/tts/types/NumericalSpecifier.js +2 -1
  50. package/api/resources/tts/types/OutputFormat.js +2 -1
  51. package/api/resources/tts/types/RawEncoding.js +4 -1
  52. package/api/resources/tts/types/RawOutputFormat.js +2 -1
  53. package/api/resources/tts/types/Speed.js +2 -1
  54. package/api/resources/tts/types/SupportedLanguage.js +4 -1
  55. package/api/resources/tts/types/TtsRequest.js +2 -1
  56. package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +2 -1
  57. package/api/resources/tts/types/TtsRequestIdSpecifier.js +2 -1
  58. package/api/resources/tts/types/TtsRequestVoiceSpecifier.js +2 -1
  59. package/api/resources/tts/types/WavOutputFormat.js +2 -1
  60. package/api/resources/tts/types/WebSocketBaseResponse.js +2 -1
  61. package/api/resources/tts/types/WebSocketChunkResponse.js +2 -1
  62. package/api/resources/tts/types/WebSocketDoneResponse.js +2 -1
  63. package/api/resources/tts/types/WebSocketErrorResponse.js +2 -1
  64. package/api/resources/tts/types/WebSocketRawOutputFormat.js +2 -1
  65. package/api/resources/tts/types/WebSocketRequest.js +2 -1
  66. package/api/resources/tts/types/WebSocketResponse.js +2 -1
  67. package/api/resources/tts/types/WebSocketStreamOptions.js +2 -1
  68. package/api/resources/tts/types/WebSocketTimestampsResponse.js +2 -1
  69. package/api/resources/tts/types/WebSocketTtsOutput.js +2 -1
  70. package/api/resources/tts/types/WebSocketTtsRequest.js +2 -1
  71. package/api/resources/tts/types/WordTimestamps.js +2 -1
  72. package/api/resources/tts/types/index.js +46 -30
  73. package/api/resources/voiceChanger/client/Client.js +40 -10
  74. package/api/resources/voiceChanger/client/index.js +17 -1
  75. package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +2 -1
  76. package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +2 -1
  77. package/api/resources/voiceChanger/client/requests/index.js +2 -1
  78. package/api/resources/voiceChanger/index.js +18 -2
  79. package/api/resources/voiceChanger/types/OutputFormatContainer.js +4 -1
  80. package/api/resources/voiceChanger/types/StreamingResponse.js +2 -1
  81. package/api/resources/voiceChanger/types/index.js +18 -2
  82. package/api/resources/voices/client/Client.js +52 -22
  83. package/api/resources/voices/client/index.js +17 -1
  84. package/api/resources/voices/client/requests/CloneVoiceRequest.js +2 -1
  85. package/api/resources/voices/client/requests/index.js +2 -1
  86. package/api/resources/voices/index.js +18 -2
  87. package/api/resources/voices/types/BaseVoiceId.js +2 -1
  88. package/api/resources/voices/types/CloneMode.js +4 -1
  89. package/api/resources/voices/types/CreateVoiceRequest.js +2 -1
  90. package/api/resources/voices/types/EmbeddingResponse.js +2 -1
  91. package/api/resources/voices/types/EmbeddingSpecifier.js +2 -1
  92. package/api/resources/voices/types/Gender.js +4 -1
  93. package/api/resources/voices/types/IdSpecifier.js +2 -1
  94. package/api/resources/voices/types/LocalizeDialect.d.ts +11 -11
  95. package/api/resources/voices/types/LocalizeDialect.js +2 -7
  96. package/api/resources/voices/types/LocalizeEnglishDialect.d.ts +11 -0
  97. package/api/resources/voices/types/LocalizeEnglishDialect.js +13 -0
  98. package/api/resources/voices/types/LocalizeTargetLanguage.js +4 -1
  99. package/api/resources/voices/types/LocalizeVoiceRequest.js +2 -1
  100. package/api/resources/voices/types/MixVoiceSpecifier.js +2 -1
  101. package/api/resources/voices/types/MixVoicesRequest.js +2 -1
  102. package/api/resources/voices/types/UpdateVoiceRequest.js +2 -1
  103. package/api/resources/voices/types/Voice.js +2 -1
  104. package/api/resources/voices/types/VoiceId.js +2 -1
  105. package/api/resources/voices/types/VoiceMetadata.js +2 -1
  106. package/api/resources/voices/types/Weight.js +2 -1
  107. package/api/resources/voices/types/index.d.ts +1 -0
  108. package/api/resources/voices/types/index.js +34 -17
  109. package/core/fetcher/APIResponse.js +2 -1
  110. package/core/fetcher/Fetcher.js +18 -14
  111. package/core/fetcher/Supplier.js +4 -1
  112. package/core/fetcher/createRequestUrl.js +10 -3
  113. package/core/fetcher/getFetchFn.js +33 -6
  114. package/core/fetcher/getHeader.js +5 -1
  115. package/core/fetcher/getRequestBody.js +5 -1
  116. package/core/fetcher/getResponseBody.js +7 -3
  117. package/core/fetcher/index.js +9 -3
  118. package/core/fetcher/makeRequest.js +8 -4
  119. package/core/fetcher/requestWithRetries.js +5 -1
  120. package/core/fetcher/signals.js +7 -2
  121. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +5 -1
  122. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +5 -1
  123. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +5 -1
  124. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +34 -7
  125. package/core/form-data-utils/FormDataWrapper.js +41 -11
  126. package/core/form-data-utils/index.js +17 -1
  127. package/core/index.d.ts +1 -1
  128. package/core/index.js +34 -5
  129. package/core/runtime/index.js +5 -1
  130. package/core/runtime/runtime.js +4 -1
  131. package/core/schemas/Schema.js +4 -1
  132. package/core/schemas/builders/bigint/bigint.js +13 -9
  133. package/core/schemas/builders/bigint/index.js +5 -1
  134. package/core/schemas/builders/date/date.js +14 -10
  135. package/core/schemas/builders/date/index.js +5 -1
  136. package/core/schemas/builders/enum/enum.js +11 -7
  137. package/core/schemas/builders/enum/index.js +5 -1
  138. package/core/schemas/builders/index.js +30 -14
  139. package/core/schemas/builders/lazy/index.js +7 -2
  140. package/core/schemas/builders/lazy/lazy.js +11 -5
  141. package/core/schemas/builders/lazy/lazyObject.js +11 -7
  142. package/core/schemas/builders/list/index.js +5 -1
  143. package/core/schemas/builders/list/list.js +12 -8
  144. package/core/schemas/builders/literals/booleanLiteral.js +10 -6
  145. package/core/schemas/builders/literals/index.js +7 -2
  146. package/core/schemas/builders/literals/stringLiteral.js +10 -6
  147. package/core/schemas/builders/object/index.js +11 -3
  148. package/core/schemas/builders/object/object.js +38 -33
  149. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -3
  150. package/core/schemas/builders/object/property.js +7 -2
  151. package/core/schemas/builders/object/types.js +2 -1
  152. package/core/schemas/builders/object-like/getObjectLikeUtils.js +15 -10
  153. package/core/schemas/builders/object-like/index.js +6 -1
  154. package/core/schemas/builders/object-like/types.js +2 -1
  155. package/core/schemas/builders/primitives/any.js +6 -3
  156. package/core/schemas/builders/primitives/boolean.js +8 -5
  157. package/core/schemas/builders/primitives/index.js +13 -5
  158. package/core/schemas/builders/primitives/number.js +8 -5
  159. package/core/schemas/builders/primitives/string.js +8 -5
  160. package/core/schemas/builders/primitives/unknown.js +6 -3
  161. package/core/schemas/builders/record/index.js +5 -1
  162. package/core/schemas/builders/record/record.js +18 -14
  163. package/core/schemas/builders/record/types.js +2 -1
  164. package/core/schemas/builders/schema-utils/JsonError.js +7 -3
  165. package/core/schemas/builders/schema-utils/ParseError.js +7 -3
  166. package/core/schemas/builders/schema-utils/getSchemaUtils.js +15 -9
  167. package/core/schemas/builders/schema-utils/index.js +11 -3
  168. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +5 -1
  169. package/core/schemas/builders/set/index.js +5 -1
  170. package/core/schemas/builders/set/set.js +14 -10
  171. package/core/schemas/builders/undiscriminated-union/index.js +5 -1
  172. package/core/schemas/builders/undiscriminated-union/types.js +2 -1
  173. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +10 -6
  174. package/core/schemas/builders/union/discriminant.js +5 -1
  175. package/core/schemas/builders/union/index.js +7 -2
  176. package/core/schemas/builders/union/types.js +2 -1
  177. package/core/schemas/builders/union/union.js +18 -14
  178. package/core/schemas/index.js +17 -1
  179. package/core/schemas/utils/MaybePromise.js +2 -1
  180. package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -1
  181. package/core/schemas/utils/createIdentitySchemaCreator.js +8 -4
  182. package/core/schemas/utils/entries.js +5 -1
  183. package/core/schemas/utils/filterObject.js +5 -1
  184. package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -1
  185. package/core/schemas/utils/isPlainObject.js +5 -1
  186. package/core/schemas/utils/keys.js +5 -1
  187. package/core/schemas/utils/maybeSkipValidation.js +5 -1
  188. package/core/schemas/utils/partition.js +5 -1
  189. package/core/streaming-fetcher/Stream.js +9 -4
  190. package/core/streaming-fetcher/index.js +5 -1
  191. package/core/websocket/events.js +9 -3
  192. package/core/websocket/index.js +17 -1
  193. package/core/websocket/ws.js +33 -6
  194. package/dist/Client.d.ts +3 -0
  195. package/dist/Client.js +18 -9
  196. package/dist/api/index.js +17 -1
  197. package/dist/api/resources/apiStatus/client/Client.js +33 -6
  198. package/dist/api/resources/apiStatus/client/index.js +2 -1
  199. package/dist/api/resources/apiStatus/index.js +18 -2
  200. package/dist/api/resources/apiStatus/types/ApiInfo.js +2 -1
  201. package/dist/api/resources/apiStatus/types/index.js +17 -1
  202. package/dist/api/resources/datasets/client/Client.d.ts +70 -0
  203. package/dist/api/resources/datasets/client/Client.js +261 -0
  204. package/dist/api/resources/datasets/client/index.d.ts +1 -0
  205. package/dist/api/resources/datasets/client/index.js +17 -0
  206. package/dist/api/resources/datasets/client/requests/UploadDatasetFileRequest.d.ts +11 -0
  207. package/dist/api/resources/datasets/client/requests/UploadDatasetFileRequest.js +5 -0
  208. package/dist/api/resources/datasets/client/requests/index.d.ts +1 -0
  209. package/dist/api/resources/datasets/client/requests/index.js +2 -0
  210. package/dist/api/resources/datasets/index.d.ts +2 -0
  211. package/dist/api/resources/datasets/index.js +18 -0
  212. package/dist/api/resources/datasets/types/CreateDatasetRequest.d.ts +6 -0
  213. package/dist/api/resources/datasets/types/CreateDatasetRequest.js +5 -0
  214. package/dist/api/resources/datasets/types/Dataset.d.ts +8 -0
  215. package/dist/api/resources/datasets/types/Dataset.js +5 -0
  216. package/dist/api/resources/datasets/types/DatasetFile.d.ts +8 -0
  217. package/dist/api/resources/datasets/types/DatasetFile.js +5 -0
  218. package/dist/api/resources/datasets/types/FilePurpose.d.ts +7 -0
  219. package/dist/api/resources/datasets/types/FilePurpose.js +9 -0
  220. package/dist/api/resources/datasets/types/PaginatedDatasetFiles.d.ts +8 -0
  221. package/dist/api/resources/datasets/types/PaginatedDatasetFiles.js +5 -0
  222. package/dist/api/resources/datasets/types/PaginatedDatasets.d.ts +8 -0
  223. package/dist/api/resources/datasets/types/PaginatedDatasets.js +5 -0
  224. package/dist/api/resources/datasets/types/index.d.ts +6 -0
  225. package/dist/api/resources/datasets/types/index.js +22 -0
  226. package/dist/api/resources/embedding/index.js +17 -1
  227. package/dist/api/resources/embedding/types/Embedding.js +2 -1
  228. package/dist/api/resources/embedding/types/index.js +17 -1
  229. package/dist/api/resources/index.d.ts +3 -0
  230. package/dist/api/resources/index.js +44 -12
  231. package/dist/api/resources/tts/client/Client.js +40 -10
  232. package/dist/api/resources/tts/client/index.js +2 -1
  233. package/dist/api/resources/tts/index.js +18 -2
  234. package/dist/api/resources/tts/types/CancelContextRequest.js +2 -1
  235. package/dist/api/resources/tts/types/ContextId.js +2 -1
  236. package/dist/api/resources/tts/types/Controls.js +2 -1
  237. package/dist/api/resources/tts/types/Emotion.js +4 -1
  238. package/dist/api/resources/tts/types/GenerationRequest.js +2 -1
  239. package/dist/api/resources/tts/types/Mp3OutputFormat.js +2 -1
  240. package/dist/api/resources/tts/types/NaturalSpecifier.js +4 -1
  241. package/dist/api/resources/tts/types/NumericalSpecifier.js +2 -1
  242. package/dist/api/resources/tts/types/OutputFormat.js +2 -1
  243. package/dist/api/resources/tts/types/RawEncoding.js +4 -1
  244. package/dist/api/resources/tts/types/RawOutputFormat.js +2 -1
  245. package/dist/api/resources/tts/types/Speed.js +2 -1
  246. package/dist/api/resources/tts/types/SupportedLanguage.js +4 -1
  247. package/dist/api/resources/tts/types/TtsRequest.js +2 -1
  248. package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +2 -1
  249. package/dist/api/resources/tts/types/TtsRequestIdSpecifier.js +2 -1
  250. package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.js +2 -1
  251. package/dist/api/resources/tts/types/WavOutputFormat.js +2 -1
  252. package/dist/api/resources/tts/types/WebSocketBaseResponse.js +2 -1
  253. package/dist/api/resources/tts/types/WebSocketChunkResponse.js +2 -1
  254. package/dist/api/resources/tts/types/WebSocketDoneResponse.js +2 -1
  255. package/dist/api/resources/tts/types/WebSocketErrorResponse.js +2 -1
  256. package/dist/api/resources/tts/types/WebSocketRawOutputFormat.js +2 -1
  257. package/dist/api/resources/tts/types/WebSocketRequest.js +2 -1
  258. package/dist/api/resources/tts/types/WebSocketResponse.js +2 -1
  259. package/dist/api/resources/tts/types/WebSocketStreamOptions.js +2 -1
  260. package/dist/api/resources/tts/types/WebSocketTimestampsResponse.js +2 -1
  261. package/dist/api/resources/tts/types/WebSocketTtsOutput.js +2 -1
  262. package/dist/api/resources/tts/types/WebSocketTtsRequest.js +2 -1
  263. package/dist/api/resources/tts/types/WordTimestamps.js +2 -1
  264. package/dist/api/resources/tts/types/index.js +46 -30
  265. package/dist/api/resources/voiceChanger/client/Client.js +40 -10
  266. package/dist/api/resources/voiceChanger/client/index.js +17 -1
  267. package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +2 -1
  268. package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +2 -1
  269. package/dist/api/resources/voiceChanger/client/requests/index.js +2 -1
  270. package/dist/api/resources/voiceChanger/index.js +18 -2
  271. package/dist/api/resources/voiceChanger/types/OutputFormatContainer.js +4 -1
  272. package/dist/api/resources/voiceChanger/types/StreamingResponse.js +2 -1
  273. package/dist/api/resources/voiceChanger/types/index.js +18 -2
  274. package/dist/api/resources/voices/client/Client.js +52 -22
  275. package/dist/api/resources/voices/client/index.js +17 -1
  276. package/dist/api/resources/voices/client/requests/CloneVoiceRequest.js +2 -1
  277. package/dist/api/resources/voices/client/requests/index.js +2 -1
  278. package/dist/api/resources/voices/index.js +18 -2
  279. package/dist/api/resources/voices/types/BaseVoiceId.js +2 -1
  280. package/dist/api/resources/voices/types/CloneMode.js +4 -1
  281. package/dist/api/resources/voices/types/CreateVoiceRequest.js +2 -1
  282. package/dist/api/resources/voices/types/EmbeddingResponse.js +2 -1
  283. package/dist/api/resources/voices/types/EmbeddingSpecifier.js +2 -1
  284. package/dist/api/resources/voices/types/Gender.js +4 -1
  285. package/dist/api/resources/voices/types/IdSpecifier.js +2 -1
  286. package/dist/api/resources/voices/types/LocalizeDialect.d.ts +11 -11
  287. package/dist/api/resources/voices/types/LocalizeDialect.js +2 -7
  288. package/dist/api/resources/voices/types/LocalizeEnglishDialect.d.ts +11 -0
  289. package/dist/api/resources/voices/types/LocalizeEnglishDialect.js +13 -0
  290. package/dist/api/resources/voices/types/LocalizeTargetLanguage.js +4 -1
  291. package/dist/api/resources/voices/types/LocalizeVoiceRequest.js +2 -1
  292. package/dist/api/resources/voices/types/MixVoiceSpecifier.js +2 -1
  293. package/dist/api/resources/voices/types/MixVoicesRequest.js +2 -1
  294. package/dist/api/resources/voices/types/UpdateVoiceRequest.js +2 -1
  295. package/dist/api/resources/voices/types/Voice.js +2 -1
  296. package/dist/api/resources/voices/types/VoiceId.js +2 -1
  297. package/dist/api/resources/voices/types/VoiceMetadata.js +2 -1
  298. package/dist/api/resources/voices/types/Weight.js +2 -1
  299. package/dist/api/resources/voices/types/index.d.ts +1 -0
  300. package/dist/api/resources/voices/types/index.js +34 -17
  301. package/dist/core/fetcher/APIResponse.js +2 -1
  302. package/dist/core/fetcher/Fetcher.js +18 -14
  303. package/dist/core/fetcher/Supplier.js +4 -1
  304. package/dist/core/fetcher/createRequestUrl.js +10 -3
  305. package/dist/core/fetcher/getFetchFn.js +33 -6
  306. package/dist/core/fetcher/getHeader.js +5 -1
  307. package/dist/core/fetcher/getRequestBody.js +5 -1
  308. package/dist/core/fetcher/getResponseBody.js +7 -3
  309. package/dist/core/fetcher/index.js +9 -3
  310. package/dist/core/fetcher/makeRequest.js +8 -4
  311. package/dist/core/fetcher/requestWithRetries.js +5 -1
  312. package/dist/core/fetcher/signals.js +7 -2
  313. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +5 -1
  314. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +5 -1
  315. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +5 -1
  316. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +34 -7
  317. package/dist/core/form-data-utils/FormDataWrapper.js +41 -11
  318. package/dist/core/form-data-utils/index.js +17 -1
  319. package/dist/core/index.d.ts +1 -1
  320. package/dist/core/index.js +34 -5
  321. package/dist/core/runtime/index.js +5 -1
  322. package/dist/core/runtime/runtime.js +4 -1
  323. package/dist/core/schemas/Schema.js +4 -1
  324. package/dist/core/schemas/builders/bigint/bigint.js +13 -9
  325. package/dist/core/schemas/builders/bigint/index.js +5 -1
  326. package/dist/core/schemas/builders/date/date.js +14 -10
  327. package/dist/core/schemas/builders/date/index.js +5 -1
  328. package/dist/core/schemas/builders/enum/enum.js +11 -7
  329. package/dist/core/schemas/builders/enum/index.js +5 -1
  330. package/dist/core/schemas/builders/index.js +30 -14
  331. package/dist/core/schemas/builders/lazy/index.js +7 -2
  332. package/dist/core/schemas/builders/lazy/lazy.js +11 -5
  333. package/dist/core/schemas/builders/lazy/lazyObject.js +11 -7
  334. package/dist/core/schemas/builders/list/index.js +5 -1
  335. package/dist/core/schemas/builders/list/list.js +12 -8
  336. package/dist/core/schemas/builders/literals/booleanLiteral.js +10 -6
  337. package/dist/core/schemas/builders/literals/index.js +7 -2
  338. package/dist/core/schemas/builders/literals/stringLiteral.js +10 -6
  339. package/dist/core/schemas/builders/object/index.js +11 -3
  340. package/dist/core/schemas/builders/object/object.js +38 -33
  341. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -3
  342. package/dist/core/schemas/builders/object/property.js +7 -2
  343. package/dist/core/schemas/builders/object/types.js +2 -1
  344. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +15 -10
  345. package/dist/core/schemas/builders/object-like/index.js +6 -1
  346. package/dist/core/schemas/builders/object-like/types.js +2 -1
  347. package/dist/core/schemas/builders/primitives/any.js +6 -3
  348. package/dist/core/schemas/builders/primitives/boolean.js +8 -5
  349. package/dist/core/schemas/builders/primitives/index.js +13 -5
  350. package/dist/core/schemas/builders/primitives/number.js +8 -5
  351. package/dist/core/schemas/builders/primitives/string.js +8 -5
  352. package/dist/core/schemas/builders/primitives/unknown.js +6 -3
  353. package/dist/core/schemas/builders/record/index.js +5 -1
  354. package/dist/core/schemas/builders/record/record.js +18 -14
  355. package/dist/core/schemas/builders/record/types.js +2 -1
  356. package/dist/core/schemas/builders/schema-utils/JsonError.js +7 -3
  357. package/dist/core/schemas/builders/schema-utils/ParseError.js +7 -3
  358. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +15 -9
  359. package/dist/core/schemas/builders/schema-utils/index.js +11 -3
  360. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +5 -1
  361. package/dist/core/schemas/builders/set/index.js +5 -1
  362. package/dist/core/schemas/builders/set/set.js +14 -10
  363. package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -1
  364. package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -1
  365. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +10 -6
  366. package/dist/core/schemas/builders/union/discriminant.js +5 -1
  367. package/dist/core/schemas/builders/union/index.js +7 -2
  368. package/dist/core/schemas/builders/union/types.js +2 -1
  369. package/dist/core/schemas/builders/union/union.js +18 -14
  370. package/dist/core/schemas/index.js +17 -1
  371. package/dist/core/schemas/utils/MaybePromise.js +2 -1
  372. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -1
  373. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +8 -4
  374. package/dist/core/schemas/utils/entries.js +5 -1
  375. package/dist/core/schemas/utils/filterObject.js +5 -1
  376. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -1
  377. package/dist/core/schemas/utils/isPlainObject.js +5 -1
  378. package/dist/core/schemas/utils/keys.js +5 -1
  379. package/dist/core/schemas/utils/maybeSkipValidation.js +5 -1
  380. package/dist/core/schemas/utils/partition.js +5 -1
  381. package/dist/core/streaming-fetcher/Stream.js +9 -4
  382. package/dist/core/streaming-fetcher/index.js +5 -1
  383. package/dist/core/websocket/events.js +9 -3
  384. package/dist/core/websocket/index.js +17 -1
  385. package/dist/core/websocket/ws.js +33 -6
  386. package/dist/environments.js +4 -1
  387. package/dist/errors/CartesiaError.js +5 -1
  388. package/dist/errors/CartesiaTimeoutError.js +5 -1
  389. package/dist/errors/index.js +7 -2
  390. package/dist/index.js +34 -4
  391. package/dist/serialization/index.js +17 -1
  392. package/dist/serialization/resources/apiStatus/index.js +17 -1
  393. package/dist/serialization/resources/apiStatus/types/ApiInfo.js +28 -2
  394. package/dist/serialization/resources/apiStatus/types/index.js +17 -1
  395. package/dist/serialization/resources/datasets/index.d.ts +1 -0
  396. package/dist/serialization/resources/datasets/index.js +17 -0
  397. package/dist/serialization/resources/datasets/types/CreateDatasetRequest.d.ts +12 -0
  398. package/dist/serialization/resources/datasets/types/CreateDatasetRequest.js +33 -0
  399. package/dist/serialization/resources/datasets/types/Dataset.d.ts +14 -0
  400. package/dist/serialization/resources/datasets/types/Dataset.js +35 -0
  401. package/dist/serialization/resources/datasets/types/DatasetFile.d.ts +14 -0
  402. package/dist/serialization/resources/datasets/types/DatasetFile.js +35 -0
  403. package/dist/serialization/resources/datasets/types/FilePurpose.d.ts +10 -0
  404. package/dist/serialization/resources/datasets/types/FilePurpose.js +31 -0
  405. package/dist/serialization/resources/datasets/types/PaginatedDatasetFiles.d.ts +14 -0
  406. package/dist/serialization/resources/datasets/types/PaginatedDatasetFiles.js +35 -0
  407. package/dist/serialization/resources/datasets/types/PaginatedDatasets.d.ts +14 -0
  408. package/dist/serialization/resources/datasets/types/PaginatedDatasets.js +35 -0
  409. package/dist/serialization/resources/datasets/types/index.d.ts +6 -0
  410. package/dist/serialization/resources/datasets/types/index.js +22 -0
  411. package/dist/serialization/resources/embedding/index.js +17 -1
  412. package/dist/serialization/resources/embedding/types/Embedding.js +28 -2
  413. package/dist/serialization/resources/embedding/types/index.js +17 -1
  414. package/dist/serialization/resources/index.d.ts +2 -0
  415. package/dist/serialization/resources/index.js +41 -10
  416. package/dist/serialization/resources/tts/index.js +17 -1
  417. package/dist/serialization/resources/tts/types/CancelContextRequest.js +30 -4
  418. package/dist/serialization/resources/tts/types/ContextId.js +28 -2
  419. package/dist/serialization/resources/tts/types/Controls.js +32 -6
  420. package/dist/serialization/resources/tts/types/Emotion.js +28 -2
  421. package/dist/serialization/resources/tts/types/GenerationRequest.js +36 -10
  422. package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +28 -2
  423. package/dist/serialization/resources/tts/types/NaturalSpecifier.js +28 -2
  424. package/dist/serialization/resources/tts/types/NumericalSpecifier.js +28 -2
  425. package/dist/serialization/resources/tts/types/OutputFormat.js +34 -8
  426. package/dist/serialization/resources/tts/types/RawEncoding.js +28 -2
  427. package/dist/serialization/resources/tts/types/RawOutputFormat.js +30 -4
  428. package/dist/serialization/resources/tts/types/Speed.js +30 -4
  429. package/dist/serialization/resources/tts/types/SupportedLanguage.js +28 -2
  430. package/dist/serialization/resources/tts/types/TtsRequest.js +34 -8
  431. package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +32 -6
  432. package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +32 -6
  433. package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +30 -4
  434. package/dist/serialization/resources/tts/types/WavOutputFormat.js +29 -3
  435. package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +30 -4
  436. package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +30 -4
  437. package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +29 -3
  438. package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +30 -4
  439. package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +30 -4
  440. package/dist/serialization/resources/tts/types/WebSocketRequest.js +30 -4
  441. package/dist/serialization/resources/tts/types/WebSocketResponse.js +36 -10
  442. package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +28 -2
  443. package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +32 -6
  444. package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +32 -6
  445. package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +32 -6
  446. package/dist/serialization/resources/tts/types/WordTimestamps.js +28 -2
  447. package/dist/serialization/resources/tts/types/index.js +46 -30
  448. package/dist/serialization/resources/voiceChanger/index.js +17 -1
  449. package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +28 -2
  450. package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +34 -8
  451. package/dist/serialization/resources/voiceChanger/types/index.js +18 -2
  452. package/dist/serialization/resources/voices/client/index.js +27 -1
  453. package/dist/serialization/resources/voices/client/list.js +29 -3
  454. package/dist/serialization/resources/voices/index.js +18 -2
  455. package/dist/serialization/resources/voices/types/BaseVoiceId.js +5 -2
  456. package/dist/serialization/resources/voices/types/CloneMode.js +28 -2
  457. package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +34 -8
  458. package/dist/serialization/resources/voices/types/EmbeddingResponse.js +30 -4
  459. package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +32 -6
  460. package/dist/serialization/resources/voices/types/Gender.js +28 -2
  461. package/dist/serialization/resources/voices/types/IdSpecifier.js +32 -6
  462. package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +2 -1
  463. package/dist/serialization/resources/voices/types/LocalizeDialect.js +29 -2
  464. package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.d.ts +10 -0
  465. package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.js +31 -0
  466. package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +28 -2
  467. package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +36 -10
  468. package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +30 -4
  469. package/dist/serialization/resources/voices/types/MixVoicesRequest.js +30 -4
  470. package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +28 -2
  471. package/dist/serialization/resources/voices/types/Voice.js +36 -10
  472. package/dist/serialization/resources/voices/types/VoiceId.js +28 -2
  473. package/dist/serialization/resources/voices/types/VoiceMetadata.js +32 -6
  474. package/dist/serialization/resources/voices/types/Weight.js +28 -2
  475. package/dist/serialization/resources/voices/types/index.d.ts +1 -0
  476. package/dist/serialization/resources/voices/types/index.js +34 -17
  477. package/dist/version.d.ts +1 -1
  478. package/dist/version.js +4 -1
  479. package/dist/wrapper/Client.js +8 -4
  480. package/dist/wrapper/StreamingTTSClient.js +11 -4
  481. package/dist/wrapper/WebPlayer.js +7 -3
  482. package/dist/wrapper/Websocket.d.ts +7 -24
  483. package/dist/wrapper/Websocket.js +101 -71
  484. package/dist/wrapper/source.d.ts +5 -4
  485. package/dist/wrapper/source.js +12 -6
  486. package/dist/wrapper/utils.js +28 -13
  487. package/environments.js +4 -1
  488. package/errors/CartesiaError.js +5 -1
  489. package/errors/CartesiaTimeoutError.js +5 -1
  490. package/errors/index.js +7 -2
  491. package/index.js +34 -4
  492. package/package.json +2 -2
  493. package/reference.md +204 -0
  494. package/serialization/index.js +17 -1
  495. package/serialization/resources/apiStatus/index.js +17 -1
  496. package/serialization/resources/apiStatus/types/ApiInfo.js +28 -2
  497. package/serialization/resources/apiStatus/types/index.js +17 -1
  498. package/serialization/resources/datasets/index.d.ts +1 -0
  499. package/serialization/resources/datasets/index.js +17 -0
  500. package/serialization/resources/datasets/types/CreateDatasetRequest.d.ts +12 -0
  501. package/serialization/resources/datasets/types/CreateDatasetRequest.js +33 -0
  502. package/serialization/resources/datasets/types/Dataset.d.ts +14 -0
  503. package/serialization/resources/datasets/types/Dataset.js +35 -0
  504. package/serialization/resources/datasets/types/DatasetFile.d.ts +14 -0
  505. package/serialization/resources/datasets/types/DatasetFile.js +35 -0
  506. package/serialization/resources/datasets/types/FilePurpose.d.ts +10 -0
  507. package/serialization/resources/datasets/types/FilePurpose.js +31 -0
  508. package/serialization/resources/datasets/types/PaginatedDatasetFiles.d.ts +14 -0
  509. package/serialization/resources/datasets/types/PaginatedDatasetFiles.js +35 -0
  510. package/serialization/resources/datasets/types/PaginatedDatasets.d.ts +14 -0
  511. package/serialization/resources/datasets/types/PaginatedDatasets.js +35 -0
  512. package/serialization/resources/datasets/types/index.d.ts +6 -0
  513. package/serialization/resources/datasets/types/index.js +22 -0
  514. package/serialization/resources/embedding/index.js +17 -1
  515. package/serialization/resources/embedding/types/Embedding.js +28 -2
  516. package/serialization/resources/embedding/types/index.js +17 -1
  517. package/serialization/resources/index.d.ts +2 -0
  518. package/serialization/resources/index.js +41 -10
  519. package/serialization/resources/tts/index.js +17 -1
  520. package/serialization/resources/tts/types/CancelContextRequest.js +30 -4
  521. package/serialization/resources/tts/types/ContextId.js +28 -2
  522. package/serialization/resources/tts/types/Controls.js +32 -6
  523. package/serialization/resources/tts/types/Emotion.js +28 -2
  524. package/serialization/resources/tts/types/GenerationRequest.js +36 -10
  525. package/serialization/resources/tts/types/Mp3OutputFormat.js +28 -2
  526. package/serialization/resources/tts/types/NaturalSpecifier.js +28 -2
  527. package/serialization/resources/tts/types/NumericalSpecifier.js +28 -2
  528. package/serialization/resources/tts/types/OutputFormat.js +34 -8
  529. package/serialization/resources/tts/types/RawEncoding.js +28 -2
  530. package/serialization/resources/tts/types/RawOutputFormat.js +30 -4
  531. package/serialization/resources/tts/types/Speed.js +30 -4
  532. package/serialization/resources/tts/types/SupportedLanguage.js +28 -2
  533. package/serialization/resources/tts/types/TtsRequest.js +34 -8
  534. package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +32 -6
  535. package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +32 -6
  536. package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +30 -4
  537. package/serialization/resources/tts/types/WavOutputFormat.js +29 -3
  538. package/serialization/resources/tts/types/WebSocketBaseResponse.js +30 -4
  539. package/serialization/resources/tts/types/WebSocketChunkResponse.js +30 -4
  540. package/serialization/resources/tts/types/WebSocketDoneResponse.js +29 -3
  541. package/serialization/resources/tts/types/WebSocketErrorResponse.js +30 -4
  542. package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +30 -4
  543. package/serialization/resources/tts/types/WebSocketRequest.js +30 -4
  544. package/serialization/resources/tts/types/WebSocketResponse.js +36 -10
  545. package/serialization/resources/tts/types/WebSocketStreamOptions.js +28 -2
  546. package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +32 -6
  547. package/serialization/resources/tts/types/WebSocketTtsOutput.js +32 -6
  548. package/serialization/resources/tts/types/WebSocketTtsRequest.js +32 -6
  549. package/serialization/resources/tts/types/WordTimestamps.js +28 -2
  550. package/serialization/resources/tts/types/index.js +46 -30
  551. package/serialization/resources/voiceChanger/index.js +17 -1
  552. package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +28 -2
  553. package/serialization/resources/voiceChanger/types/StreamingResponse.js +34 -8
  554. package/serialization/resources/voiceChanger/types/index.js +18 -2
  555. package/serialization/resources/voices/client/index.js +27 -1
  556. package/serialization/resources/voices/client/list.js +29 -3
  557. package/serialization/resources/voices/index.js +18 -2
  558. package/serialization/resources/voices/types/BaseVoiceId.js +5 -2
  559. package/serialization/resources/voices/types/CloneMode.js +28 -2
  560. package/serialization/resources/voices/types/CreateVoiceRequest.js +34 -8
  561. package/serialization/resources/voices/types/EmbeddingResponse.js +30 -4
  562. package/serialization/resources/voices/types/EmbeddingSpecifier.js +32 -6
  563. package/serialization/resources/voices/types/Gender.js +28 -2
  564. package/serialization/resources/voices/types/IdSpecifier.js +32 -6
  565. package/serialization/resources/voices/types/LocalizeDialect.d.ts +2 -1
  566. package/serialization/resources/voices/types/LocalizeDialect.js +29 -2
  567. package/serialization/resources/voices/types/LocalizeEnglishDialect.d.ts +10 -0
  568. package/serialization/resources/voices/types/LocalizeEnglishDialect.js +31 -0
  569. package/serialization/resources/voices/types/LocalizeTargetLanguage.js +28 -2
  570. package/serialization/resources/voices/types/LocalizeVoiceRequest.js +36 -10
  571. package/serialization/resources/voices/types/MixVoiceSpecifier.js +30 -4
  572. package/serialization/resources/voices/types/MixVoicesRequest.js +30 -4
  573. package/serialization/resources/voices/types/UpdateVoiceRequest.js +28 -2
  574. package/serialization/resources/voices/types/Voice.js +36 -10
  575. package/serialization/resources/voices/types/VoiceId.js +28 -2
  576. package/serialization/resources/voices/types/VoiceMetadata.js +32 -6
  577. package/serialization/resources/voices/types/Weight.js +28 -2
  578. package/serialization/resources/voices/types/index.d.ts +1 -0
  579. package/serialization/resources/voices/types/index.js +34 -17
  580. package/version.d.ts +1 -1
  581. package/version.js +4 -1
  582. package/wrapper/Client.js +8 -4
  583. package/wrapper/StreamingTTSClient.js +11 -4
  584. package/wrapper/WebPlayer.js +7 -3
  585. package/wrapper/Websocket.d.ts +7 -24
  586. package/wrapper/Websocket.js +101 -71
  587. package/wrapper/source.d.ts +5 -4
  588. package/wrapper/source.js +12 -6
  589. package/wrapper/utils.js +28 -13
@@ -1,6 +1,32 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { WebSocketBaseResponse } from "./WebSocketBaseResponse";
6
- export const WebSocketDoneResponse = core.serialization.object({}).extend(WebSocketBaseResponse);
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketDoneResponse = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebSocketBaseResponse_1 = require("./WebSocketBaseResponse");
32
+ exports.WebSocketDoneResponse = core.serialization.object({}).extend(WebSocketBaseResponse_1.WebSocketBaseResponse);
@@ -1,10 +1,36 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { WebSocketBaseResponse } from "./WebSocketBaseResponse";
6
- export const WebSocketErrorResponse = core.serialization
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketErrorResponse = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebSocketBaseResponse_1 = require("./WebSocketBaseResponse");
32
+ exports.WebSocketErrorResponse = core.serialization
7
33
  .object({
8
34
  error: core.serialization.string(),
9
35
  })
10
- .extend(WebSocketBaseResponse);
36
+ .extend(WebSocketBaseResponse_1.WebSocketBaseResponse);
@@ -1,10 +1,36 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { RawEncoding } from "./RawEncoding";
6
- export const WebSocketRawOutputFormat = core.serialization.object({
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketRawOutputFormat = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const RawEncoding_1 = require("./RawEncoding");
32
+ exports.WebSocketRawOutputFormat = core.serialization.object({
7
33
  container: core.serialization.stringLiteral("raw"),
8
- encoding: RawEncoding,
34
+ encoding: RawEncoding_1.RawEncoding,
9
35
  sampleRate: core.serialization.property("sample_rate", core.serialization.number()),
10
36
  });
@@ -1,7 +1,33 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { GenerationRequest } from "./GenerationRequest";
6
- import { CancelContextRequest } from "./CancelContextRequest";
7
- export const WebSocketRequest = core.serialization.undiscriminatedUnion([GenerationRequest, CancelContextRequest]);
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketRequest = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const GenerationRequest_1 = require("./GenerationRequest");
32
+ const CancelContextRequest_1 = require("./CancelContextRequest");
33
+ exports.WebSocketRequest = core.serialization.undiscriminatedUnion([GenerationRequest_1.GenerationRequest, CancelContextRequest_1.CancelContextRequest]);
@@ -1,17 +1,43 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { WebSocketChunkResponse } from "./WebSocketChunkResponse";
6
- import { WebSocketDoneResponse } from "./WebSocketDoneResponse";
7
- import { WebSocketTimestampsResponse } from "./WebSocketTimestampsResponse";
8
- import { WebSocketErrorResponse } from "./WebSocketErrorResponse";
9
- export const WebSocketResponse = core.serialization
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketResponse = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebSocketChunkResponse_1 = require("./WebSocketChunkResponse");
32
+ const WebSocketDoneResponse_1 = require("./WebSocketDoneResponse");
33
+ const WebSocketTimestampsResponse_1 = require("./WebSocketTimestampsResponse");
34
+ const WebSocketErrorResponse_1 = require("./WebSocketErrorResponse");
35
+ exports.WebSocketResponse = core.serialization
10
36
  .union("type", {
11
- chunk: WebSocketChunkResponse,
12
- done: WebSocketDoneResponse,
13
- timestamps: WebSocketTimestampsResponse,
14
- error: WebSocketErrorResponse,
37
+ chunk: WebSocketChunkResponse_1.WebSocketChunkResponse,
38
+ done: WebSocketDoneResponse_1.WebSocketDoneResponse,
39
+ timestamps: WebSocketTimestampsResponse_1.WebSocketTimestampsResponse,
40
+ error: WebSocketErrorResponse_1.WebSocketErrorResponse,
15
41
  })
16
42
  .transform({
17
43
  transform: (value) => value,
@@ -1,7 +1,33 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- export const WebSocketStreamOptions = core.serialization.object({
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketStreamOptions = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.WebSocketStreamOptions = core.serialization.object({
6
32
  timeout: core.serialization.number().optional(),
7
33
  });
@@ -1,11 +1,37 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { WordTimestamps } from "./WordTimestamps";
6
- import { WebSocketBaseResponse } from "./WebSocketBaseResponse";
7
- export const WebSocketTimestampsResponse = core.serialization
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketTimestampsResponse = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WordTimestamps_1 = require("./WordTimestamps");
32
+ const WebSocketBaseResponse_1 = require("./WebSocketBaseResponse");
33
+ exports.WebSocketTimestampsResponse = core.serialization
8
34
  .object({
9
- wordTimestamps: core.serialization.property("word_timestamps", WordTimestamps.optional()),
35
+ wordTimestamps: core.serialization.property("word_timestamps", WordTimestamps_1.WordTimestamps.optional()),
10
36
  })
11
- .extend(WebSocketBaseResponse);
37
+ .extend(WebSocketBaseResponse_1.WebSocketBaseResponse);
@@ -1,11 +1,37 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { WordTimestamps } from "./WordTimestamps";
6
- import { ContextId } from "./ContextId";
7
- export const WebSocketTtsOutput = core.serialization.object({
8
- wordTimestamps: core.serialization.property("word_timestamps", WordTimestamps.optional()),
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketTtsOutput = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WordTimestamps_1 = require("./WordTimestamps");
32
+ const ContextId_1 = require("./ContextId");
33
+ exports.WebSocketTtsOutput = core.serialization.object({
34
+ wordTimestamps: core.serialization.property("word_timestamps", WordTimestamps_1.WordTimestamps.optional()),
9
35
  audio: core.serialization.unknown().optional(),
10
- contextId: core.serialization.property("context_id", ContextId.optional()),
36
+ contextId: core.serialization.property("context_id", ContextId_1.ContextId.optional()),
11
37
  });
@@ -1,14 +1,40 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { OutputFormat } from "./OutputFormat";
6
- import { TtsRequestVoiceSpecifier } from "./TtsRequestVoiceSpecifier";
7
- export const WebSocketTtsRequest = core.serialization.object({
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WebSocketTtsRequest = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const OutputFormat_1 = require("./OutputFormat");
32
+ const TtsRequestVoiceSpecifier_1 = require("./TtsRequestVoiceSpecifier");
33
+ exports.WebSocketTtsRequest = core.serialization.object({
8
34
  modelId: core.serialization.property("model_id", core.serialization.string()),
9
- outputFormat: core.serialization.property("output_format", OutputFormat.optional()),
35
+ outputFormat: core.serialization.property("output_format", OutputFormat_1.OutputFormat.optional()),
10
36
  transcript: core.serialization.string().optional(),
11
- voice: TtsRequestVoiceSpecifier,
37
+ voice: TtsRequestVoiceSpecifier_1.TtsRequestVoiceSpecifier,
12
38
  duration: core.serialization.number().optional(),
13
39
  language: core.serialization.string().optional(),
14
40
  addTimestamps: core.serialization.property("add_timestamps", core.serialization.boolean().optional()),
@@ -1,8 +1,34 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- export const WordTimestamps = core.serialization.object({
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.WordTimestamps = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.WordTimestamps = core.serialization.object({
6
32
  words: core.serialization.list(core.serialization.string()),
7
33
  start: core.serialization.list(core.serialization.number()),
8
34
  end: core.serialization.list(core.serialization.number()),
@@ -1,30 +1,46 @@
1
- export * from "./ContextId";
2
- export * from "./WebSocketBaseResponse";
3
- export * from "./WebSocketResponse";
4
- export * from "./WebSocketErrorResponse";
5
- export * from "./WebSocketChunkResponse";
6
- export * from "./WebSocketTimestampsResponse";
7
- export * from "./WebSocketTtsOutput";
8
- export * from "./WebSocketStreamOptions";
9
- export * from "./WordTimestamps";
10
- export * from "./WebSocketDoneResponse";
11
- export * from "./CancelContextRequest";
12
- export * from "./GenerationRequest";
13
- export * from "./WebSocketRawOutputFormat";
14
- export * from "./WebSocketRequest";
15
- export * from "./WebSocketTtsRequest";
16
- export * from "./TtsRequest";
17
- export * from "./SupportedLanguage";
18
- export * from "./OutputFormat";
19
- export * from "./RawOutputFormat";
20
- export * from "./RawEncoding";
21
- export * from "./WavOutputFormat";
22
- export * from "./Mp3OutputFormat";
23
- export * from "./TtsRequestVoiceSpecifier";
24
- export * from "./TtsRequestIdSpecifier";
25
- export * from "./TtsRequestEmbeddingSpecifier";
26
- export * from "./Controls";
27
- export * from "./Speed";
28
- export * from "./NumericalSpecifier";
29
- export * from "./NaturalSpecifier";
30
- export * from "./Emotion";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ContextId"), exports);
18
+ __exportStar(require("./WebSocketBaseResponse"), exports);
19
+ __exportStar(require("./WebSocketResponse"), exports);
20
+ __exportStar(require("./WebSocketErrorResponse"), exports);
21
+ __exportStar(require("./WebSocketChunkResponse"), exports);
22
+ __exportStar(require("./WebSocketTimestampsResponse"), exports);
23
+ __exportStar(require("./WebSocketTtsOutput"), exports);
24
+ __exportStar(require("./WebSocketStreamOptions"), exports);
25
+ __exportStar(require("./WordTimestamps"), exports);
26
+ __exportStar(require("./WebSocketDoneResponse"), exports);
27
+ __exportStar(require("./CancelContextRequest"), exports);
28
+ __exportStar(require("./GenerationRequest"), exports);
29
+ __exportStar(require("./WebSocketRawOutputFormat"), exports);
30
+ __exportStar(require("./WebSocketRequest"), exports);
31
+ __exportStar(require("./WebSocketTtsRequest"), exports);
32
+ __exportStar(require("./TtsRequest"), exports);
33
+ __exportStar(require("./SupportedLanguage"), exports);
34
+ __exportStar(require("./OutputFormat"), exports);
35
+ __exportStar(require("./RawOutputFormat"), exports);
36
+ __exportStar(require("./RawEncoding"), exports);
37
+ __exportStar(require("./WavOutputFormat"), exports);
38
+ __exportStar(require("./Mp3OutputFormat"), exports);
39
+ __exportStar(require("./TtsRequestVoiceSpecifier"), exports);
40
+ __exportStar(require("./TtsRequestIdSpecifier"), exports);
41
+ __exportStar(require("./TtsRequestEmbeddingSpecifier"), exports);
42
+ __exportStar(require("./Controls"), exports);
43
+ __exportStar(require("./Speed"), exports);
44
+ __exportStar(require("./NumericalSpecifier"), exports);
45
+ __exportStar(require("./NaturalSpecifier"), exports);
46
+ __exportStar(require("./Emotion"), exports);
@@ -1 +1,17 @@
1
- export * from "./types";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
@@ -1,5 +1,31 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- export const OutputFormatContainer = core.serialization.enum_(["raw", "wav", "mp3"]);
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.OutputFormatContainer = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.OutputFormatContainer = core.serialization.enum_(["raw", "wav", "mp3"]);
@@ -1,15 +1,41 @@
1
+ "use strict";
1
2
  /**
2
3
  * This file was auto-generated by Fern from our API Definition.
3
4
  */
4
- import * as core from "../../../../core";
5
- import { WebSocketChunkResponse } from "../../tts/types/WebSocketChunkResponse";
6
- import { WebSocketDoneResponse } from "../../tts/types/WebSocketDoneResponse";
7
- import { WebSocketErrorResponse } from "../../tts/types/WebSocketErrorResponse";
8
- export const StreamingResponse = core.serialization
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.StreamingResponse = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ const WebSocketChunkResponse_1 = require("../../tts/types/WebSocketChunkResponse");
32
+ const WebSocketDoneResponse_1 = require("../../tts/types/WebSocketDoneResponse");
33
+ const WebSocketErrorResponse_1 = require("../../tts/types/WebSocketErrorResponse");
34
+ exports.StreamingResponse = core.serialization
9
35
  .union("type", {
10
- chunk: WebSocketChunkResponse,
11
- done: WebSocketDoneResponse,
12
- error: WebSocketErrorResponse,
36
+ chunk: WebSocketChunkResponse_1.WebSocketChunkResponse,
37
+ done: WebSocketDoneResponse_1.WebSocketDoneResponse,
38
+ error: WebSocketErrorResponse_1.WebSocketErrorResponse,
13
39
  })
14
40
  .transform({
15
41
  transform: (value) => value,
@@ -1,2 +1,18 @@
1
- export * from "./OutputFormatContainer";
2
- export * from "./StreamingResponse";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./OutputFormatContainer"), exports);
18
+ __exportStar(require("./StreamingResponse"), exports);