@cartesia/cartesia-js 2.0.0 → 2.0.2

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 (479) hide show
  1. package/Client.js +9 -13
  2. package/api/index.js +1 -17
  3. package/api/resources/apiStatus/client/Client.js +6 -33
  4. package/api/resources/apiStatus/client/index.js +1 -2
  5. package/api/resources/apiStatus/index.js +2 -18
  6. package/api/resources/apiStatus/types/ApiInfo.js +1 -2
  7. package/api/resources/apiStatus/types/index.js +1 -17
  8. package/api/resources/embedding/index.js +1 -17
  9. package/api/resources/embedding/types/Embedding.js +1 -2
  10. package/api/resources/embedding/types/index.js +1 -17
  11. package/api/resources/index.js +12 -41
  12. package/api/resources/tts/client/Client.js +10 -40
  13. package/api/resources/tts/client/index.js +1 -2
  14. package/api/resources/tts/index.js +2 -18
  15. package/api/resources/tts/types/CancelContextRequest.js +1 -2
  16. package/api/resources/tts/types/ContextId.js +1 -2
  17. package/api/resources/tts/types/Controls.js +1 -2
  18. package/api/resources/tts/types/Emotion.js +1 -4
  19. package/api/resources/tts/types/GenerationRequest.js +1 -2
  20. package/api/resources/tts/types/Mp3OutputFormat.js +1 -2
  21. package/api/resources/tts/types/NaturalSpecifier.js +1 -4
  22. package/api/resources/tts/types/NumericalSpecifier.js +1 -2
  23. package/api/resources/tts/types/OutputFormat.js +1 -2
  24. package/api/resources/tts/types/RawEncoding.js +1 -4
  25. package/api/resources/tts/types/RawOutputFormat.js +1 -2
  26. package/api/resources/tts/types/Speed.js +1 -2
  27. package/api/resources/tts/types/SupportedLanguage.js +1 -4
  28. package/api/resources/tts/types/TtsRequest.js +1 -2
  29. package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +1 -2
  30. package/api/resources/tts/types/TtsRequestIdSpecifier.js +1 -2
  31. package/api/resources/tts/types/TtsRequestVoiceSpecifier.js +1 -2
  32. package/api/resources/tts/types/WavOutputFormat.js +1 -2
  33. package/api/resources/tts/types/WebSocketBaseResponse.js +1 -2
  34. package/api/resources/tts/types/WebSocketChunkResponse.js +1 -2
  35. package/api/resources/tts/types/WebSocketDoneResponse.js +1 -2
  36. package/api/resources/tts/types/WebSocketErrorResponse.js +1 -2
  37. package/api/resources/tts/types/WebSocketRawOutputFormat.js +1 -2
  38. package/api/resources/tts/types/WebSocketRequest.js +1 -2
  39. package/api/resources/tts/types/WebSocketResponse.js +1 -2
  40. package/api/resources/tts/types/WebSocketStreamOptions.js +1 -2
  41. package/api/resources/tts/types/WebSocketTimestampsResponse.js +1 -2
  42. package/api/resources/tts/types/WebSocketTtsOutput.js +1 -2
  43. package/api/resources/tts/types/WebSocketTtsRequest.js +1 -2
  44. package/api/resources/tts/types/WordTimestamps.js +1 -2
  45. package/api/resources/tts/types/index.js +30 -46
  46. package/api/resources/voiceChanger/client/Client.js +10 -40
  47. package/api/resources/voiceChanger/client/index.js +1 -17
  48. package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +1 -2
  49. package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +1 -2
  50. package/api/resources/voiceChanger/client/requests/index.js +1 -2
  51. package/api/resources/voiceChanger/index.js +2 -18
  52. package/api/resources/voiceChanger/types/OutputFormatContainer.js +1 -4
  53. package/api/resources/voiceChanger/types/StreamingResponse.js +1 -2
  54. package/api/resources/voiceChanger/types/index.js +2 -18
  55. package/api/resources/voices/client/Client.js +22 -52
  56. package/api/resources/voices/client/index.js +1 -17
  57. package/api/resources/voices/client/requests/CloneVoiceRequest.js +1 -2
  58. package/api/resources/voices/client/requests/index.js +1 -2
  59. package/api/resources/voices/index.js +2 -18
  60. package/api/resources/voices/types/BaseVoiceId.js +1 -2
  61. package/api/resources/voices/types/CloneMode.js +1 -4
  62. package/api/resources/voices/types/CreateVoiceRequest.js +1 -2
  63. package/api/resources/voices/types/EmbeddingResponse.js +1 -2
  64. package/api/resources/voices/types/EmbeddingSpecifier.js +1 -2
  65. package/api/resources/voices/types/Gender.js +1 -4
  66. package/api/resources/voices/types/IdSpecifier.js +1 -2
  67. package/api/resources/voices/types/LocalizeDialect.js +1 -4
  68. package/api/resources/voices/types/LocalizeTargetLanguage.js +1 -4
  69. package/api/resources/voices/types/LocalizeVoiceRequest.js +1 -2
  70. package/api/resources/voices/types/MixVoiceSpecifier.js +1 -2
  71. package/api/resources/voices/types/MixVoicesRequest.js +1 -2
  72. package/api/resources/voices/types/UpdateVoiceRequest.js +1 -2
  73. package/api/resources/voices/types/Voice.js +1 -2
  74. package/api/resources/voices/types/VoiceId.js +1 -2
  75. package/api/resources/voices/types/VoiceMetadata.js +1 -2
  76. package/api/resources/voices/types/Weight.js +1 -2
  77. package/api/resources/voices/types/index.js +17 -33
  78. package/core/fetcher/APIResponse.js +1 -2
  79. package/core/fetcher/Fetcher.js +14 -18
  80. package/core/fetcher/Supplier.js +1 -4
  81. package/core/fetcher/createRequestUrl.js +3 -10
  82. package/core/fetcher/getFetchFn.js +6 -33
  83. package/core/fetcher/getHeader.js +1 -5
  84. package/core/fetcher/getRequestBody.js +1 -5
  85. package/core/fetcher/getResponseBody.js +3 -7
  86. package/core/fetcher/index.js +3 -9
  87. package/core/fetcher/makeRequest.js +4 -8
  88. package/core/fetcher/requestWithRetries.js +1 -5
  89. package/core/fetcher/signals.js +2 -7
  90. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +1 -5
  91. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +1 -5
  92. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +1 -5
  93. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +7 -34
  94. package/core/form-data-utils/FormDataWrapper.js +11 -41
  95. package/core/form-data-utils/index.js +1 -17
  96. package/core/index.js +5 -34
  97. package/core/runtime/index.js +1 -5
  98. package/core/runtime/runtime.js +1 -4
  99. package/core/schemas/Schema.js +1 -4
  100. package/core/schemas/builders/bigint/bigint.js +9 -13
  101. package/core/schemas/builders/bigint/index.js +1 -5
  102. package/core/schemas/builders/date/date.js +10 -14
  103. package/core/schemas/builders/date/index.js +1 -5
  104. package/core/schemas/builders/enum/enum.js +7 -11
  105. package/core/schemas/builders/enum/index.js +1 -5
  106. package/core/schemas/builders/index.js +14 -30
  107. package/core/schemas/builders/lazy/index.js +2 -7
  108. package/core/schemas/builders/lazy/lazy.js +5 -11
  109. package/core/schemas/builders/lazy/lazyObject.js +7 -11
  110. package/core/schemas/builders/list/index.js +1 -5
  111. package/core/schemas/builders/list/list.js +8 -12
  112. package/core/schemas/builders/literals/booleanLiteral.js +6 -10
  113. package/core/schemas/builders/literals/index.js +2 -7
  114. package/core/schemas/builders/literals/stringLiteral.js +6 -10
  115. package/core/schemas/builders/object/index.js +3 -11
  116. package/core/schemas/builders/object/object.js +33 -38
  117. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +3 -7
  118. package/core/schemas/builders/object/property.js +2 -7
  119. package/core/schemas/builders/object/types.js +1 -2
  120. package/core/schemas/builders/object-like/getObjectLikeUtils.js +10 -15
  121. package/core/schemas/builders/object-like/index.js +1 -6
  122. package/core/schemas/builders/object-like/types.js +1 -2
  123. package/core/schemas/builders/primitives/any.js +3 -6
  124. package/core/schemas/builders/primitives/boolean.js +5 -8
  125. package/core/schemas/builders/primitives/index.js +5 -13
  126. package/core/schemas/builders/primitives/number.js +5 -8
  127. package/core/schemas/builders/primitives/string.js +5 -8
  128. package/core/schemas/builders/primitives/unknown.js +3 -6
  129. package/core/schemas/builders/record/index.js +1 -5
  130. package/core/schemas/builders/record/record.js +14 -18
  131. package/core/schemas/builders/record/types.js +1 -2
  132. package/core/schemas/builders/schema-utils/JsonError.js +3 -7
  133. package/core/schemas/builders/schema-utils/ParseError.js +3 -7
  134. package/core/schemas/builders/schema-utils/getSchemaUtils.js +9 -15
  135. package/core/schemas/builders/schema-utils/index.js +3 -11
  136. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -5
  137. package/core/schemas/builders/set/index.js +1 -5
  138. package/core/schemas/builders/set/set.js +10 -14
  139. package/core/schemas/builders/undiscriminated-union/index.js +1 -5
  140. package/core/schemas/builders/undiscriminated-union/types.js +1 -2
  141. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +6 -10
  142. package/core/schemas/builders/union/discriminant.js +1 -5
  143. package/core/schemas/builders/union/index.js +2 -7
  144. package/core/schemas/builders/union/types.js +1 -2
  145. package/core/schemas/builders/union/union.js +14 -18
  146. package/core/schemas/index.js +1 -17
  147. package/core/schemas/utils/MaybePromise.js +1 -2
  148. package/core/schemas/utils/addQuestionMarksToNullableProperties.js +1 -2
  149. package/core/schemas/utils/createIdentitySchemaCreator.js +4 -8
  150. package/core/schemas/utils/entries.js +1 -5
  151. package/core/schemas/utils/filterObject.js +1 -5
  152. package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -5
  153. package/core/schemas/utils/isPlainObject.js +1 -5
  154. package/core/schemas/utils/keys.js +1 -5
  155. package/core/schemas/utils/maybeSkipValidation.js +1 -5
  156. package/core/schemas/utils/partition.js +1 -5
  157. package/core/streaming-fetcher/Stream.js +4 -9
  158. package/core/streaming-fetcher/index.js +1 -5
  159. package/core/websocket/events.js +3 -9
  160. package/core/websocket/index.js +1 -17
  161. package/core/websocket/ws.js +6 -33
  162. package/dist/Client.js +9 -13
  163. package/dist/api/index.js +1 -17
  164. package/dist/api/resources/apiStatus/client/Client.js +6 -33
  165. package/dist/api/resources/apiStatus/client/index.js +1 -2
  166. package/dist/api/resources/apiStatus/index.js +2 -18
  167. package/dist/api/resources/apiStatus/types/ApiInfo.js +1 -2
  168. package/dist/api/resources/apiStatus/types/index.js +1 -17
  169. package/dist/api/resources/embedding/index.js +1 -17
  170. package/dist/api/resources/embedding/types/Embedding.js +1 -2
  171. package/dist/api/resources/embedding/types/index.js +1 -17
  172. package/dist/api/resources/index.js +12 -41
  173. package/dist/api/resources/tts/client/Client.js +10 -40
  174. package/dist/api/resources/tts/client/index.js +1 -2
  175. package/dist/api/resources/tts/index.js +2 -18
  176. package/dist/api/resources/tts/types/CancelContextRequest.js +1 -2
  177. package/dist/api/resources/tts/types/ContextId.js +1 -2
  178. package/dist/api/resources/tts/types/Controls.js +1 -2
  179. package/dist/api/resources/tts/types/Emotion.js +1 -4
  180. package/dist/api/resources/tts/types/GenerationRequest.js +1 -2
  181. package/dist/api/resources/tts/types/Mp3OutputFormat.js +1 -2
  182. package/dist/api/resources/tts/types/NaturalSpecifier.js +1 -4
  183. package/dist/api/resources/tts/types/NumericalSpecifier.js +1 -2
  184. package/dist/api/resources/tts/types/OutputFormat.js +1 -2
  185. package/dist/api/resources/tts/types/RawEncoding.js +1 -4
  186. package/dist/api/resources/tts/types/RawOutputFormat.js +1 -2
  187. package/dist/api/resources/tts/types/Speed.js +1 -2
  188. package/dist/api/resources/tts/types/SupportedLanguage.js +1 -4
  189. package/dist/api/resources/tts/types/TtsRequest.js +1 -2
  190. package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +1 -2
  191. package/dist/api/resources/tts/types/TtsRequestIdSpecifier.js +1 -2
  192. package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.js +1 -2
  193. package/dist/api/resources/tts/types/WavOutputFormat.js +1 -2
  194. package/dist/api/resources/tts/types/WebSocketBaseResponse.js +1 -2
  195. package/dist/api/resources/tts/types/WebSocketChunkResponse.js +1 -2
  196. package/dist/api/resources/tts/types/WebSocketDoneResponse.js +1 -2
  197. package/dist/api/resources/tts/types/WebSocketErrorResponse.js +1 -2
  198. package/dist/api/resources/tts/types/WebSocketRawOutputFormat.js +1 -2
  199. package/dist/api/resources/tts/types/WebSocketRequest.js +1 -2
  200. package/dist/api/resources/tts/types/WebSocketResponse.js +1 -2
  201. package/dist/api/resources/tts/types/WebSocketStreamOptions.js +1 -2
  202. package/dist/api/resources/tts/types/WebSocketTimestampsResponse.js +1 -2
  203. package/dist/api/resources/tts/types/WebSocketTtsOutput.js +1 -2
  204. package/dist/api/resources/tts/types/WebSocketTtsRequest.js +1 -2
  205. package/dist/api/resources/tts/types/WordTimestamps.js +1 -2
  206. package/dist/api/resources/tts/types/index.js +30 -46
  207. package/dist/api/resources/voiceChanger/client/Client.js +10 -40
  208. package/dist/api/resources/voiceChanger/client/index.js +1 -17
  209. package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +1 -2
  210. package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +1 -2
  211. package/dist/api/resources/voiceChanger/client/requests/index.js +1 -2
  212. package/dist/api/resources/voiceChanger/index.js +2 -18
  213. package/dist/api/resources/voiceChanger/types/OutputFormatContainer.js +1 -4
  214. package/dist/api/resources/voiceChanger/types/StreamingResponse.js +1 -2
  215. package/dist/api/resources/voiceChanger/types/index.js +2 -18
  216. package/dist/api/resources/voices/client/Client.js +22 -52
  217. package/dist/api/resources/voices/client/index.js +1 -17
  218. package/dist/api/resources/voices/client/requests/CloneVoiceRequest.js +1 -2
  219. package/dist/api/resources/voices/client/requests/index.js +1 -2
  220. package/dist/api/resources/voices/index.js +2 -18
  221. package/dist/api/resources/voices/types/BaseVoiceId.js +1 -2
  222. package/dist/api/resources/voices/types/CloneMode.js +1 -4
  223. package/dist/api/resources/voices/types/CreateVoiceRequest.js +1 -2
  224. package/dist/api/resources/voices/types/EmbeddingResponse.js +1 -2
  225. package/dist/api/resources/voices/types/EmbeddingSpecifier.js +1 -2
  226. package/dist/api/resources/voices/types/Gender.js +1 -4
  227. package/dist/api/resources/voices/types/IdSpecifier.js +1 -2
  228. package/dist/api/resources/voices/types/LocalizeDialect.js +1 -4
  229. package/dist/api/resources/voices/types/LocalizeTargetLanguage.js +1 -4
  230. package/dist/api/resources/voices/types/LocalizeVoiceRequest.js +1 -2
  231. package/dist/api/resources/voices/types/MixVoiceSpecifier.js +1 -2
  232. package/dist/api/resources/voices/types/MixVoicesRequest.js +1 -2
  233. package/dist/api/resources/voices/types/UpdateVoiceRequest.js +1 -2
  234. package/dist/api/resources/voices/types/Voice.js +1 -2
  235. package/dist/api/resources/voices/types/VoiceId.js +1 -2
  236. package/dist/api/resources/voices/types/VoiceMetadata.js +1 -2
  237. package/dist/api/resources/voices/types/Weight.js +1 -2
  238. package/dist/api/resources/voices/types/index.js +17 -33
  239. package/dist/core/fetcher/APIResponse.js +1 -2
  240. package/dist/core/fetcher/Fetcher.js +14 -18
  241. package/dist/core/fetcher/Supplier.js +1 -4
  242. package/dist/core/fetcher/createRequestUrl.js +3 -10
  243. package/dist/core/fetcher/getFetchFn.js +6 -33
  244. package/dist/core/fetcher/getHeader.js +1 -5
  245. package/dist/core/fetcher/getRequestBody.js +1 -5
  246. package/dist/core/fetcher/getResponseBody.js +3 -7
  247. package/dist/core/fetcher/index.js +3 -9
  248. package/dist/core/fetcher/makeRequest.js +4 -8
  249. package/dist/core/fetcher/requestWithRetries.js +1 -5
  250. package/dist/core/fetcher/signals.js +2 -7
  251. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +1 -5
  252. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +1 -5
  253. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +1 -5
  254. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +7 -34
  255. package/dist/core/form-data-utils/FormDataWrapper.js +11 -41
  256. package/dist/core/form-data-utils/index.js +1 -17
  257. package/dist/core/index.js +5 -34
  258. package/dist/core/runtime/index.js +1 -5
  259. package/dist/core/runtime/runtime.js +1 -4
  260. package/dist/core/schemas/Schema.js +1 -4
  261. package/dist/core/schemas/builders/bigint/bigint.js +9 -13
  262. package/dist/core/schemas/builders/bigint/index.js +1 -5
  263. package/dist/core/schemas/builders/date/date.js +10 -14
  264. package/dist/core/schemas/builders/date/index.js +1 -5
  265. package/dist/core/schemas/builders/enum/enum.js +7 -11
  266. package/dist/core/schemas/builders/enum/index.js +1 -5
  267. package/dist/core/schemas/builders/index.js +14 -30
  268. package/dist/core/schemas/builders/lazy/index.js +2 -7
  269. package/dist/core/schemas/builders/lazy/lazy.js +5 -11
  270. package/dist/core/schemas/builders/lazy/lazyObject.js +7 -11
  271. package/dist/core/schemas/builders/list/index.js +1 -5
  272. package/dist/core/schemas/builders/list/list.js +8 -12
  273. package/dist/core/schemas/builders/literals/booleanLiteral.js +6 -10
  274. package/dist/core/schemas/builders/literals/index.js +2 -7
  275. package/dist/core/schemas/builders/literals/stringLiteral.js +6 -10
  276. package/dist/core/schemas/builders/object/index.js +3 -11
  277. package/dist/core/schemas/builders/object/object.js +33 -38
  278. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +3 -7
  279. package/dist/core/schemas/builders/object/property.js +2 -7
  280. package/dist/core/schemas/builders/object/types.js +1 -2
  281. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +10 -15
  282. package/dist/core/schemas/builders/object-like/index.js +1 -6
  283. package/dist/core/schemas/builders/object-like/types.js +1 -2
  284. package/dist/core/schemas/builders/primitives/any.js +3 -6
  285. package/dist/core/schemas/builders/primitives/boolean.js +5 -8
  286. package/dist/core/schemas/builders/primitives/index.js +5 -13
  287. package/dist/core/schemas/builders/primitives/number.js +5 -8
  288. package/dist/core/schemas/builders/primitives/string.js +5 -8
  289. package/dist/core/schemas/builders/primitives/unknown.js +3 -6
  290. package/dist/core/schemas/builders/record/index.js +1 -5
  291. package/dist/core/schemas/builders/record/record.js +14 -18
  292. package/dist/core/schemas/builders/record/types.js +1 -2
  293. package/dist/core/schemas/builders/schema-utils/JsonError.js +3 -7
  294. package/dist/core/schemas/builders/schema-utils/ParseError.js +3 -7
  295. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +9 -15
  296. package/dist/core/schemas/builders/schema-utils/index.js +3 -11
  297. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -5
  298. package/dist/core/schemas/builders/set/index.js +1 -5
  299. package/dist/core/schemas/builders/set/set.js +10 -14
  300. package/dist/core/schemas/builders/undiscriminated-union/index.js +1 -5
  301. package/dist/core/schemas/builders/undiscriminated-union/types.js +1 -2
  302. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +6 -10
  303. package/dist/core/schemas/builders/union/discriminant.js +1 -5
  304. package/dist/core/schemas/builders/union/index.js +2 -7
  305. package/dist/core/schemas/builders/union/types.js +1 -2
  306. package/dist/core/schemas/builders/union/union.js +14 -18
  307. package/dist/core/schemas/index.js +1 -17
  308. package/dist/core/schemas/utils/MaybePromise.js +1 -2
  309. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +1 -2
  310. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +4 -8
  311. package/dist/core/schemas/utils/entries.js +1 -5
  312. package/dist/core/schemas/utils/filterObject.js +1 -5
  313. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -5
  314. package/dist/core/schemas/utils/isPlainObject.js +1 -5
  315. package/dist/core/schemas/utils/keys.js +1 -5
  316. package/dist/core/schemas/utils/maybeSkipValidation.js +1 -5
  317. package/dist/core/schemas/utils/partition.js +1 -5
  318. package/dist/core/streaming-fetcher/Stream.js +4 -9
  319. package/dist/core/streaming-fetcher/index.js +1 -5
  320. package/dist/core/websocket/events.js +3 -9
  321. package/dist/core/websocket/index.js +1 -17
  322. package/dist/core/websocket/ws.js +6 -33
  323. package/dist/environments.js +1 -4
  324. package/dist/errors/CartesiaError.js +1 -5
  325. package/dist/errors/CartesiaTimeoutError.js +1 -5
  326. package/dist/errors/index.js +2 -7
  327. package/dist/index.js +4 -34
  328. package/dist/serialization/index.js +1 -17
  329. package/dist/serialization/resources/apiStatus/index.js +1 -17
  330. package/dist/serialization/resources/apiStatus/types/ApiInfo.js +2 -28
  331. package/dist/serialization/resources/apiStatus/types/index.js +1 -17
  332. package/dist/serialization/resources/embedding/index.js +1 -17
  333. package/dist/serialization/resources/embedding/types/Embedding.js +2 -28
  334. package/dist/serialization/resources/embedding/types/index.js +1 -17
  335. package/dist/serialization/resources/index.js +10 -39
  336. package/dist/serialization/resources/tts/index.js +1 -17
  337. package/dist/serialization/resources/tts/types/CancelContextRequest.js +4 -30
  338. package/dist/serialization/resources/tts/types/ContextId.js +2 -28
  339. package/dist/serialization/resources/tts/types/Controls.js +6 -32
  340. package/dist/serialization/resources/tts/types/Emotion.js +2 -28
  341. package/dist/serialization/resources/tts/types/GenerationRequest.js +10 -36
  342. package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +2 -28
  343. package/dist/serialization/resources/tts/types/NaturalSpecifier.js +2 -28
  344. package/dist/serialization/resources/tts/types/NumericalSpecifier.js +2 -28
  345. package/dist/serialization/resources/tts/types/OutputFormat.js +8 -34
  346. package/dist/serialization/resources/tts/types/RawEncoding.js +2 -28
  347. package/dist/serialization/resources/tts/types/RawOutputFormat.js +4 -30
  348. package/dist/serialization/resources/tts/types/Speed.js +4 -30
  349. package/dist/serialization/resources/tts/types/SupportedLanguage.js +2 -28
  350. package/dist/serialization/resources/tts/types/TtsRequest.js +8 -34
  351. package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +6 -32
  352. package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +6 -32
  353. package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +4 -30
  354. package/dist/serialization/resources/tts/types/WavOutputFormat.js +3 -29
  355. package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +4 -30
  356. package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +4 -30
  357. package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +3 -29
  358. package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +4 -30
  359. package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +4 -30
  360. package/dist/serialization/resources/tts/types/WebSocketRequest.js +4 -30
  361. package/dist/serialization/resources/tts/types/WebSocketResponse.js +10 -36
  362. package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +2 -28
  363. package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +6 -32
  364. package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +6 -32
  365. package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +6 -32
  366. package/dist/serialization/resources/tts/types/WordTimestamps.js +2 -28
  367. package/dist/serialization/resources/tts/types/index.js +30 -46
  368. package/dist/serialization/resources/voiceChanger/index.js +1 -17
  369. package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +2 -28
  370. package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +8 -34
  371. package/dist/serialization/resources/voiceChanger/types/index.js +2 -18
  372. package/dist/serialization/resources/voices/client/index.js +1 -27
  373. package/dist/serialization/resources/voices/client/list.js +3 -29
  374. package/dist/serialization/resources/voices/index.js +2 -18
  375. package/dist/serialization/resources/voices/types/BaseVoiceId.js +2 -5
  376. package/dist/serialization/resources/voices/types/CloneMode.js +2 -28
  377. package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +8 -34
  378. package/dist/serialization/resources/voices/types/EmbeddingResponse.js +4 -30
  379. package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +6 -32
  380. package/dist/serialization/resources/voices/types/Gender.js +2 -28
  381. package/dist/serialization/resources/voices/types/IdSpecifier.js +6 -32
  382. package/dist/serialization/resources/voices/types/LocalizeDialect.js +2 -28
  383. package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +2 -28
  384. package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +10 -36
  385. package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +4 -30
  386. package/dist/serialization/resources/voices/types/MixVoicesRequest.js +4 -30
  387. package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +2 -28
  388. package/dist/serialization/resources/voices/types/Voice.js +10 -36
  389. package/dist/serialization/resources/voices/types/VoiceId.js +2 -28
  390. package/dist/serialization/resources/voices/types/VoiceMetadata.js +6 -32
  391. package/dist/serialization/resources/voices/types/Weight.js +2 -28
  392. package/dist/serialization/resources/voices/types/index.js +17 -33
  393. package/dist/version.d.ts +1 -1
  394. package/dist/version.js +1 -4
  395. package/dist/wrapper/Client.js +4 -8
  396. package/dist/wrapper/StreamingTTSClient.js +4 -11
  397. package/dist/wrapper/WebPlayer.js +3 -7
  398. package/dist/wrapper/Websocket.js +23 -52
  399. package/dist/wrapper/source.js +5 -11
  400. package/dist/wrapper/utils.js +13 -28
  401. package/environments.js +1 -4
  402. package/errors/CartesiaError.js +1 -5
  403. package/errors/CartesiaTimeoutError.js +1 -5
  404. package/errors/index.js +2 -7
  405. package/index.js +4 -34
  406. package/package.json +3 -2
  407. package/serialization/index.js +1 -17
  408. package/serialization/resources/apiStatus/index.js +1 -17
  409. package/serialization/resources/apiStatus/types/ApiInfo.js +2 -28
  410. package/serialization/resources/apiStatus/types/index.js +1 -17
  411. package/serialization/resources/embedding/index.js +1 -17
  412. package/serialization/resources/embedding/types/Embedding.js +2 -28
  413. package/serialization/resources/embedding/types/index.js +1 -17
  414. package/serialization/resources/index.js +10 -39
  415. package/serialization/resources/tts/index.js +1 -17
  416. package/serialization/resources/tts/types/CancelContextRequest.js +4 -30
  417. package/serialization/resources/tts/types/ContextId.js +2 -28
  418. package/serialization/resources/tts/types/Controls.js +6 -32
  419. package/serialization/resources/tts/types/Emotion.js +2 -28
  420. package/serialization/resources/tts/types/GenerationRequest.js +10 -36
  421. package/serialization/resources/tts/types/Mp3OutputFormat.js +2 -28
  422. package/serialization/resources/tts/types/NaturalSpecifier.js +2 -28
  423. package/serialization/resources/tts/types/NumericalSpecifier.js +2 -28
  424. package/serialization/resources/tts/types/OutputFormat.js +8 -34
  425. package/serialization/resources/tts/types/RawEncoding.js +2 -28
  426. package/serialization/resources/tts/types/RawOutputFormat.js +4 -30
  427. package/serialization/resources/tts/types/Speed.js +4 -30
  428. package/serialization/resources/tts/types/SupportedLanguage.js +2 -28
  429. package/serialization/resources/tts/types/TtsRequest.js +8 -34
  430. package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +6 -32
  431. package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +6 -32
  432. package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +4 -30
  433. package/serialization/resources/tts/types/WavOutputFormat.js +3 -29
  434. package/serialization/resources/tts/types/WebSocketBaseResponse.js +4 -30
  435. package/serialization/resources/tts/types/WebSocketChunkResponse.js +4 -30
  436. package/serialization/resources/tts/types/WebSocketDoneResponse.js +3 -29
  437. package/serialization/resources/tts/types/WebSocketErrorResponse.js +4 -30
  438. package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +4 -30
  439. package/serialization/resources/tts/types/WebSocketRequest.js +4 -30
  440. package/serialization/resources/tts/types/WebSocketResponse.js +10 -36
  441. package/serialization/resources/tts/types/WebSocketStreamOptions.js +2 -28
  442. package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +6 -32
  443. package/serialization/resources/tts/types/WebSocketTtsOutput.js +6 -32
  444. package/serialization/resources/tts/types/WebSocketTtsRequest.js +6 -32
  445. package/serialization/resources/tts/types/WordTimestamps.js +2 -28
  446. package/serialization/resources/tts/types/index.js +30 -46
  447. package/serialization/resources/voiceChanger/index.js +1 -17
  448. package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +2 -28
  449. package/serialization/resources/voiceChanger/types/StreamingResponse.js +8 -34
  450. package/serialization/resources/voiceChanger/types/index.js +2 -18
  451. package/serialization/resources/voices/client/index.js +1 -27
  452. package/serialization/resources/voices/client/list.js +3 -29
  453. package/serialization/resources/voices/index.js +2 -18
  454. package/serialization/resources/voices/types/BaseVoiceId.js +2 -5
  455. package/serialization/resources/voices/types/CloneMode.js +2 -28
  456. package/serialization/resources/voices/types/CreateVoiceRequest.js +8 -34
  457. package/serialization/resources/voices/types/EmbeddingResponse.js +4 -30
  458. package/serialization/resources/voices/types/EmbeddingSpecifier.js +6 -32
  459. package/serialization/resources/voices/types/Gender.js +2 -28
  460. package/serialization/resources/voices/types/IdSpecifier.js +6 -32
  461. package/serialization/resources/voices/types/LocalizeDialect.js +2 -28
  462. package/serialization/resources/voices/types/LocalizeTargetLanguage.js +2 -28
  463. package/serialization/resources/voices/types/LocalizeVoiceRequest.js +10 -36
  464. package/serialization/resources/voices/types/MixVoiceSpecifier.js +4 -30
  465. package/serialization/resources/voices/types/MixVoicesRequest.js +4 -30
  466. package/serialization/resources/voices/types/UpdateVoiceRequest.js +2 -28
  467. package/serialization/resources/voices/types/Voice.js +10 -36
  468. package/serialization/resources/voices/types/VoiceId.js +2 -28
  469. package/serialization/resources/voices/types/VoiceMetadata.js +6 -32
  470. package/serialization/resources/voices/types/Weight.js +2 -28
  471. package/serialization/resources/voices/types/index.js +17 -33
  472. package/version.d.ts +1 -1
  473. package/version.js +1 -4
  474. package/wrapper/Client.js +4 -8
  475. package/wrapper/StreamingTTSClient.js +4 -11
  476. package/wrapper/WebPlayer.js +3 -7
  477. package/wrapper/Websocket.js +23 -52
  478. package/wrapper/source.js +5 -11
  479. package/wrapper/utils.js +13 -28
@@ -1,37 +1,11 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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.TtsRequestEmbeddingSpecifier = void 0;
30
- const core = __importStar(require("../../../../core"));
31
- const Embedding_1 = require("../../embedding/types/Embedding");
32
- const Controls_1 = require("./Controls");
33
- exports.TtsRequestEmbeddingSpecifier = core.serialization.object({
4
+ import * as core from "../../../../core";
5
+ import { Embedding } from "../../embedding/types/Embedding";
6
+ import { Controls } from "./Controls";
7
+ export const TtsRequestEmbeddingSpecifier = core.serialization.object({
34
8
  mode: core.serialization.stringLiteral("embedding"),
35
- embedding: Embedding_1.Embedding,
36
- experimentalControls: core.serialization.property("__experimental_controls", Controls_1.Controls.optional()),
9
+ embedding: Embedding,
10
+ experimentalControls: core.serialization.property("__experimental_controls", Controls.optional()),
37
11
  });
@@ -1,37 +1,11 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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.TtsRequestIdSpecifier = void 0;
30
- const core = __importStar(require("../../../../core"));
31
- const VoiceId_1 = require("../../voices/types/VoiceId");
32
- const Controls_1 = require("./Controls");
33
- exports.TtsRequestIdSpecifier = core.serialization.object({
4
+ import * as core from "../../../../core";
5
+ import { VoiceId } from "../../voices/types/VoiceId";
6
+ import { Controls } from "./Controls";
7
+ export const TtsRequestIdSpecifier = core.serialization.object({
34
8
  mode: core.serialization.stringLiteral("id"),
35
- id: VoiceId_1.VoiceId,
36
- experimentalControls: core.serialization.property("__experimental_controls", Controls_1.Controls.optional()),
9
+ id: VoiceId,
10
+ experimentalControls: core.serialization.property("__experimental_controls", Controls.optional()),
37
11
  });
@@ -1,33 +1,7 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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.TtsRequestVoiceSpecifier = void 0;
30
- const core = __importStar(require("../../../../core"));
31
- const TtsRequestIdSpecifier_1 = require("./TtsRequestIdSpecifier");
32
- const TtsRequestEmbeddingSpecifier_1 = require("./TtsRequestEmbeddingSpecifier");
33
- exports.TtsRequestVoiceSpecifier = core.serialization.undiscriminatedUnion([TtsRequestIdSpecifier_1.TtsRequestIdSpecifier, TtsRequestEmbeddingSpecifier_1.TtsRequestEmbeddingSpecifier]);
4
+ import * as core from "../../../../core";
5
+ import { TtsRequestIdSpecifier } from "./TtsRequestIdSpecifier";
6
+ import { TtsRequestEmbeddingSpecifier } from "./TtsRequestEmbeddingSpecifier";
7
+ export const TtsRequestVoiceSpecifier = core.serialization.undiscriminatedUnion([TtsRequestIdSpecifier, TtsRequestEmbeddingSpecifier]);
@@ -1,32 +1,6 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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.WavOutputFormat = void 0;
30
- const core = __importStar(require("../../../../core"));
31
- const RawOutputFormat_1 = require("./RawOutputFormat");
32
- exports.WavOutputFormat = core.serialization.object({}).extend(RawOutputFormat_1.RawOutputFormat);
4
+ import * as core from "../../../../core";
5
+ import { RawOutputFormat } from "./RawOutputFormat";
6
+ export const WavOutputFormat = core.serialization.object({}).extend(RawOutputFormat);
@@ -1,36 +1,10 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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.WebSocketBaseResponse = void 0;
30
- const core = __importStar(require("../../../../core"));
31
- const ContextId_1 = require("./ContextId");
32
- exports.WebSocketBaseResponse = core.serialization.object({
33
- contextId: core.serialization.property("context_id", ContextId_1.ContextId.optional()),
4
+ import * as core from "../../../../core";
5
+ import { ContextId } from "./ContextId";
6
+ export const WebSocketBaseResponse = core.serialization.object({
7
+ contextId: core.serialization.property("context_id", ContextId.optional()),
34
8
  statusCode: core.serialization.property("status_code", core.serialization.number()),
35
9
  done: core.serialization.boolean(),
36
10
  });
@@ -1,37 +1,11 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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.WebSocketChunkResponse = void 0;
30
- const core = __importStar(require("../../../../core"));
31
- const WebSocketBaseResponse_1 = require("./WebSocketBaseResponse");
32
- exports.WebSocketChunkResponse = core.serialization
4
+ import * as core from "../../../../core";
5
+ import { WebSocketBaseResponse } from "./WebSocketBaseResponse";
6
+ export const WebSocketChunkResponse = core.serialization
33
7
  .object({
34
8
  data: core.serialization.string(),
35
9
  stepTime: core.serialization.property("step_time", core.serialization.number()),
36
10
  })
37
- .extend(WebSocketBaseResponse_1.WebSocketBaseResponse);
11
+ .extend(WebSocketBaseResponse);
@@ -1,32 +1,6 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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);
4
+ import * as core from "../../../../core";
5
+ import { WebSocketBaseResponse } from "./WebSocketBaseResponse";
6
+ export const WebSocketDoneResponse = core.serialization.object({}).extend(WebSocketBaseResponse);
@@ -1,36 +1,10 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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
4
+ import * as core from "../../../../core";
5
+ import { WebSocketBaseResponse } from "./WebSocketBaseResponse";
6
+ export const WebSocketErrorResponse = core.serialization
33
7
  .object({
34
8
  error: core.serialization.string(),
35
9
  })
36
- .extend(WebSocketBaseResponse_1.WebSocketBaseResponse);
10
+ .extend(WebSocketBaseResponse);
@@ -1,36 +1,10 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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({
4
+ import * as core from "../../../../core";
5
+ import { RawEncoding } from "./RawEncoding";
6
+ export const WebSocketRawOutputFormat = core.serialization.object({
33
7
  container: core.serialization.stringLiteral("raw"),
34
- encoding: RawEncoding_1.RawEncoding,
8
+ encoding: RawEncoding,
35
9
  sampleRate: core.serialization.property("sample_rate", core.serialization.number()),
36
10
  });
@@ -1,33 +1,7 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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]);
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]);
@@ -1,43 +1,17 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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
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
36
10
  .union("type", {
37
- chunk: WebSocketChunkResponse_1.WebSocketChunkResponse,
38
- done: WebSocketDoneResponse_1.WebSocketDoneResponse,
39
- timestamps: WebSocketTimestampsResponse_1.WebSocketTimestampsResponse,
40
- error: WebSocketErrorResponse_1.WebSocketErrorResponse,
11
+ chunk: WebSocketChunkResponse,
12
+ done: WebSocketDoneResponse,
13
+ timestamps: WebSocketTimestampsResponse,
14
+ error: WebSocketErrorResponse,
41
15
  })
42
16
  .transform({
43
17
  transform: (value) => value,
@@ -1,33 +1,7 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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({
4
+ import * as core from "../../../../core";
5
+ export const WebSocketStreamOptions = core.serialization.object({
32
6
  timeout: core.serialization.number().optional(),
33
7
  });
@@ -1,37 +1,11 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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
4
+ import * as core from "../../../../core";
5
+ import { WordTimestamps } from "./WordTimestamps";
6
+ import { WebSocketBaseResponse } from "./WebSocketBaseResponse";
7
+ export const WebSocketTimestampsResponse = core.serialization
34
8
  .object({
35
- wordTimestamps: core.serialization.property("word_timestamps", WordTimestamps_1.WordTimestamps.optional()),
9
+ wordTimestamps: core.serialization.property("word_timestamps", WordTimestamps.optional()),
36
10
  })
37
- .extend(WebSocketBaseResponse_1.WebSocketBaseResponse);
11
+ .extend(WebSocketBaseResponse);
@@ -1,37 +1,11 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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()),
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()),
35
9
  audio: core.serialization.unknown().optional(),
36
- contextId: core.serialization.property("context_id", ContextId_1.ContextId.optional()),
10
+ contextId: core.serialization.property("context_id", ContextId.optional()),
37
11
  });
@@ -1,40 +1,14 @@
1
- "use strict";
2
1
  /**
3
2
  * This file was auto-generated by Fern from our API Definition.
4
3
  */
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({
4
+ import * as core from "../../../../core";
5
+ import { OutputFormat } from "./OutputFormat";
6
+ import { TtsRequestVoiceSpecifier } from "./TtsRequestVoiceSpecifier";
7
+ export const WebSocketTtsRequest = core.serialization.object({
34
8
  modelId: core.serialization.property("model_id", core.serialization.string()),
35
- outputFormat: core.serialization.property("output_format", OutputFormat_1.OutputFormat.optional()),
9
+ outputFormat: core.serialization.property("output_format", OutputFormat.optional()),
36
10
  transcript: core.serialization.string().optional(),
37
- voice: TtsRequestVoiceSpecifier_1.TtsRequestVoiceSpecifier,
11
+ voice: TtsRequestVoiceSpecifier,
38
12
  duration: core.serialization.number().optional(),
39
13
  language: core.serialization.string().optional(),
40
14
  addTimestamps: core.serialization.property("add_timestamps", core.serialization.boolean().optional()),