@cartesia/cartesia-js 2.2.8 → 3.0.0-b3

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 (1854) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/LICENSE +201 -0
  3. package/README.md +269 -516
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +220 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +220 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +517 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +513 -0
  19. package/client.mjs.map +1 -0
  20. package/core/EventEmitter.d.mts +45 -0
  21. package/core/EventEmitter.d.mts.map +1 -0
  22. package/core/EventEmitter.d.ts +45 -0
  23. package/core/EventEmitter.d.ts.map +1 -0
  24. package/core/EventEmitter.js +79 -0
  25. package/core/EventEmitter.js.map +1 -0
  26. package/core/EventEmitter.mjs +75 -0
  27. package/core/EventEmitter.mjs.map +1 -0
  28. package/core/api-promise.d.mts +46 -0
  29. package/core/api-promise.d.mts.map +1 -0
  30. package/core/api-promise.d.ts +46 -0
  31. package/core/api-promise.d.ts.map +1 -0
  32. package/core/api-promise.js +74 -0
  33. package/core/api-promise.js.map +1 -0
  34. package/core/api-promise.mjs +70 -0
  35. package/core/api-promise.mjs.map +1 -0
  36. package/core/error.d.mts +46 -0
  37. package/core/error.d.mts.map +1 -0
  38. package/core/error.d.ts +46 -0
  39. package/core/error.d.ts.map +1 -0
  40. package/core/error.js +113 -0
  41. package/core/error.js.map +1 -0
  42. package/core/error.mjs +97 -0
  43. package/core/error.mjs.map +1 -0
  44. package/core/pagination.d.mts +54 -0
  45. package/core/pagination.d.mts.map +1 -0
  46. package/core/pagination.d.ts +54 -0
  47. package/core/pagination.d.ts.map +1 -0
  48. package/core/pagination.js +115 -0
  49. package/core/pagination.js.map +1 -0
  50. package/core/pagination.mjs +109 -0
  51. package/core/pagination.mjs.map +1 -0
  52. package/core/resource.d.mts +6 -0
  53. package/core/resource.d.mts.map +1 -0
  54. package/core/resource.d.ts +6 -0
  55. package/core/resource.d.ts.map +1 -0
  56. package/core/resource.js +11 -0
  57. package/core/resource.js.map +1 -0
  58. package/core/resource.mjs +7 -0
  59. package/core/resource.mjs.map +1 -0
  60. package/core/uploads.d.mts +3 -0
  61. package/core/uploads.d.mts.map +1 -0
  62. package/core/uploads.d.ts +3 -0
  63. package/core/uploads.d.ts.map +1 -0
  64. package/core/uploads.js +6 -0
  65. package/core/uploads.js.map +1 -0
  66. package/core/uploads.mjs +2 -0
  67. package/core/uploads.mjs.map +1 -0
  68. package/error.d.mts +2 -0
  69. package/error.d.mts.map +1 -0
  70. package/error.d.ts +2 -0
  71. package/error.d.ts.map +1 -0
  72. package/error.js +6 -0
  73. package/error.js.map +1 -0
  74. package/error.mjs +2 -0
  75. package/error.mjs.map +1 -0
  76. package/index.d.mts +7 -0
  77. package/index.d.mts.map +1 -0
  78. package/index.d.ts +7 -7
  79. package/index.d.ts.map +1 -0
  80. package/index.js +30 -51
  81. package/index.js.map +1 -0
  82. package/index.mjs +8 -0
  83. package/index.mjs.map +1 -0
  84. package/internal/builtin-types.d.mts +73 -0
  85. package/internal/builtin-types.d.mts.map +1 -0
  86. package/internal/builtin-types.d.ts +73 -0
  87. package/internal/builtin-types.d.ts.map +1 -0
  88. package/internal/builtin-types.js +4 -0
  89. package/internal/builtin-types.js.map +1 -0
  90. package/internal/builtin-types.mjs +3 -0
  91. package/internal/builtin-types.mjs.map +1 -0
  92. package/internal/detect-platform.d.mts +15 -0
  93. package/internal/detect-platform.d.mts.map +1 -0
  94. package/internal/detect-platform.d.ts +15 -0
  95. package/internal/detect-platform.d.ts.map +1 -0
  96. package/internal/detect-platform.js +162 -0
  97. package/internal/detect-platform.js.map +1 -0
  98. package/internal/detect-platform.mjs +157 -0
  99. package/internal/detect-platform.mjs.map +1 -0
  100. package/internal/errors.d.mts +3 -0
  101. package/internal/errors.d.mts.map +1 -0
  102. package/internal/errors.d.ts +3 -0
  103. package/internal/errors.d.ts.map +1 -0
  104. package/internal/errors.js +41 -0
  105. package/internal/errors.js.map +1 -0
  106. package/internal/errors.mjs +36 -0
  107. package/internal/errors.mjs.map +1 -0
  108. package/internal/headers.d.mts +20 -0
  109. package/internal/headers.d.mts.map +1 -0
  110. package/internal/headers.d.ts +20 -0
  111. package/internal/headers.d.ts.map +1 -0
  112. package/internal/headers.js +79 -0
  113. package/internal/headers.js.map +1 -0
  114. package/internal/headers.mjs +74 -0
  115. package/internal/headers.mjs.map +1 -0
  116. package/internal/parse.d.mts +12 -0
  117. package/internal/parse.d.mts.map +1 -0
  118. package/internal/parse.d.ts +12 -0
  119. package/internal/parse.d.ts.map +1 -0
  120. package/internal/parse.js +35 -0
  121. package/internal/parse.js.map +1 -0
  122. package/internal/parse.mjs +32 -0
  123. package/internal/parse.mjs.map +1 -0
  124. package/internal/qs/formats.d.mts +7 -0
  125. package/internal/qs/formats.d.mts.map +1 -0
  126. package/internal/qs/formats.d.ts +7 -0
  127. package/internal/qs/formats.d.ts.map +1 -0
  128. package/internal/qs/formats.js +13 -0
  129. package/internal/qs/formats.js.map +1 -0
  130. package/internal/qs/formats.mjs +9 -0
  131. package/internal/qs/formats.mjs.map +1 -0
  132. package/internal/qs/index.d.mts +10 -0
  133. package/internal/qs/index.d.mts.map +1 -0
  134. package/internal/qs/index.d.ts +10 -0
  135. package/internal/qs/index.d.ts.map +1 -0
  136. package/internal/qs/index.js +14 -0
  137. package/internal/qs/index.js.map +1 -0
  138. package/internal/qs/index.mjs +10 -0
  139. package/internal/qs/index.mjs.map +1 -0
  140. package/internal/qs/stringify.d.mts +3 -0
  141. package/internal/qs/stringify.d.mts.map +1 -0
  142. package/internal/qs/stringify.d.ts +3 -0
  143. package/internal/qs/stringify.d.ts.map +1 -0
  144. package/internal/qs/stringify.js +277 -0
  145. package/internal/qs/stringify.js.map +1 -0
  146. package/internal/qs/stringify.mjs +274 -0
  147. package/internal/qs/stringify.mjs.map +1 -0
  148. package/internal/qs/types.d.mts +57 -0
  149. package/internal/qs/types.d.mts.map +1 -0
  150. package/internal/qs/types.d.ts +57 -0
  151. package/internal/qs/types.d.ts.map +1 -0
  152. package/internal/qs/types.js +3 -0
  153. package/internal/qs/types.js.map +1 -0
  154. package/internal/qs/types.mjs +2 -0
  155. package/internal/qs/types.mjs.map +1 -0
  156. package/internal/qs/utils.d.mts +15 -0
  157. package/internal/qs/utils.d.mts.map +1 -0
  158. package/internal/qs/utils.d.ts +15 -0
  159. package/internal/qs/utils.d.ts.map +1 -0
  160. package/internal/qs/utils.js +230 -0
  161. package/internal/qs/utils.js.map +1 -0
  162. package/internal/qs/utils.mjs +217 -0
  163. package/internal/qs/utils.mjs.map +1 -0
  164. package/internal/request-options.d.mts +75 -0
  165. package/internal/request-options.d.mts.map +1 -0
  166. package/internal/request-options.d.ts +75 -0
  167. package/internal/request-options.d.ts.map +1 -0
  168. package/internal/request-options.js +14 -0
  169. package/internal/request-options.js.map +1 -0
  170. package/internal/request-options.mjs +10 -0
  171. package/internal/request-options.mjs.map +1 -0
  172. package/internal/shim-types.d.mts +17 -0
  173. package/internal/shim-types.d.mts.map +1 -0
  174. package/internal/shim-types.d.ts +17 -0
  175. package/internal/shim-types.d.ts.map +1 -0
  176. package/internal/shim-types.js +4 -0
  177. package/internal/shim-types.js.map +1 -0
  178. package/internal/shim-types.mjs +3 -0
  179. package/internal/shim-types.mjs.map +1 -0
  180. package/internal/shims.d.mts +20 -0
  181. package/internal/shims.d.mts.map +1 -0
  182. package/internal/shims.d.ts +20 -0
  183. package/internal/shims.d.ts.map +1 -0
  184. package/internal/shims.js +92 -0
  185. package/internal/shims.js.map +1 -0
  186. package/internal/shims.mjs +85 -0
  187. package/internal/shims.mjs.map +1 -0
  188. package/internal/to-file.d.mts +45 -0
  189. package/internal/to-file.d.mts.map +1 -0
  190. package/internal/to-file.d.ts +45 -0
  191. package/internal/to-file.d.ts.map +1 -0
  192. package/internal/to-file.js +91 -0
  193. package/internal/to-file.js.map +1 -0
  194. package/internal/to-file.mjs +88 -0
  195. package/internal/to-file.mjs.map +1 -0
  196. package/internal/tslib.js +81 -0
  197. package/internal/tslib.mjs +17 -0
  198. package/internal/types.d.mts +69 -0
  199. package/internal/types.d.mts.map +1 -0
  200. package/internal/types.d.ts +69 -0
  201. package/internal/types.d.ts.map +1 -0
  202. package/internal/types.js +4 -0
  203. package/internal/types.js.map +1 -0
  204. package/internal/types.mjs +3 -0
  205. package/internal/types.mjs.map +1 -0
  206. package/internal/uploads.d.mts +42 -0
  207. package/internal/uploads.d.mts.map +1 -0
  208. package/internal/uploads.d.ts +42 -0
  209. package/internal/uploads.d.ts.map +1 -0
  210. package/internal/uploads.js +141 -0
  211. package/internal/uploads.js.map +1 -0
  212. package/internal/uploads.mjs +131 -0
  213. package/internal/uploads.mjs.map +1 -0
  214. package/internal/utils/base64.d.mts +3 -0
  215. package/internal/utils/base64.d.mts.map +1 -0
  216. package/internal/utils/base64.d.ts +3 -0
  217. package/internal/utils/base64.d.ts.map +1 -0
  218. package/internal/utils/base64.js +38 -0
  219. package/internal/utils/base64.js.map +1 -0
  220. package/internal/utils/base64.mjs +33 -0
  221. package/internal/utils/base64.mjs.map +1 -0
  222. package/internal/utils/bytes.d.mts +4 -0
  223. package/internal/utils/bytes.d.mts.map +1 -0
  224. package/internal/utils/bytes.d.ts +4 -0
  225. package/internal/utils/bytes.d.ts.map +1 -0
  226. package/internal/utils/bytes.js +31 -0
  227. package/internal/utils/bytes.js.map +1 -0
  228. package/internal/utils/bytes.mjs +26 -0
  229. package/internal/utils/bytes.mjs.map +1 -0
  230. package/internal/utils/env.d.mts +9 -0
  231. package/internal/utils/env.d.mts.map +1 -0
  232. package/internal/utils/env.d.ts +9 -0
  233. package/internal/utils/env.d.ts.map +1 -0
  234. package/internal/utils/env.js +22 -0
  235. package/internal/utils/env.js.map +1 -0
  236. package/internal/utils/env.mjs +18 -0
  237. package/internal/utils/env.mjs.map +1 -0
  238. package/internal/utils/log.d.mts +37 -0
  239. package/internal/utils/log.d.mts.map +1 -0
  240. package/internal/utils/log.d.ts +37 -0
  241. package/internal/utils/log.d.ts.map +1 -0
  242. package/internal/utils/log.js +85 -0
  243. package/internal/utils/log.js.map +1 -0
  244. package/internal/utils/log.mjs +79 -0
  245. package/internal/utils/log.mjs.map +1 -0
  246. package/internal/utils/path.d.mts +15 -0
  247. package/internal/utils/path.d.mts.map +1 -0
  248. package/internal/utils/path.d.ts +15 -0
  249. package/internal/utils/path.d.ts.map +1 -0
  250. package/internal/utils/path.js +79 -0
  251. package/internal/utils/path.js.map +1 -0
  252. package/internal/utils/path.mjs +74 -0
  253. package/internal/utils/path.mjs.map +1 -0
  254. package/internal/utils/sleep.d.mts +2 -0
  255. package/internal/utils/sleep.d.mts.map +1 -0
  256. package/internal/utils/sleep.d.ts +2 -0
  257. package/internal/utils/sleep.d.ts.map +1 -0
  258. package/internal/utils/sleep.js +7 -0
  259. package/internal/utils/sleep.js.map +1 -0
  260. package/internal/utils/sleep.mjs +3 -0
  261. package/internal/utils/sleep.mjs.map +1 -0
  262. package/internal/utils/uuid.d.mts +5 -0
  263. package/internal/utils/uuid.d.mts.map +1 -0
  264. package/internal/utils/uuid.d.ts +5 -0
  265. package/internal/utils/uuid.d.ts.map +1 -0
  266. package/internal/utils/uuid.js +19 -0
  267. package/internal/utils/uuid.js.map +1 -0
  268. package/internal/utils/uuid.mjs +15 -0
  269. package/internal/utils/uuid.mjs.map +1 -0
  270. package/internal/utils/values.d.mts +18 -0
  271. package/internal/utils/values.d.mts.map +1 -0
  272. package/internal/utils/values.d.ts +18 -0
  273. package/internal/utils/values.d.ts.map +1 -0
  274. package/internal/utils/values.js +112 -0
  275. package/internal/utils/values.js.map +1 -0
  276. package/internal/utils/values.mjs +94 -0
  277. package/internal/utils/values.mjs.map +1 -0
  278. package/internal/utils.d.mts +7 -0
  279. package/internal/utils.d.mts.map +1 -0
  280. package/internal/utils.d.ts +7 -0
  281. package/internal/utils.d.ts.map +1 -0
  282. package/internal/utils.js +11 -0
  283. package/internal/utils.js.map +1 -0
  284. package/internal/utils.mjs +8 -0
  285. package/internal/utils.mjs.map +1 -0
  286. package/package.json +154 -45
  287. package/pagination.d.mts +2 -0
  288. package/pagination.d.mts.map +1 -0
  289. package/pagination.d.ts +2 -0
  290. package/pagination.d.ts.map +1 -0
  291. package/pagination.js +6 -0
  292. package/pagination.js.map +1 -0
  293. package/pagination.mjs +2 -0
  294. package/pagination.mjs.map +1 -0
  295. package/resource.d.mts +2 -0
  296. package/resource.d.mts.map +1 -0
  297. package/resource.d.ts +2 -0
  298. package/resource.d.ts.map +1 -0
  299. package/resource.js +6 -0
  300. package/resource.js.map +1 -0
  301. package/resource.mjs +2 -0
  302. package/resource.mjs.map +1 -0
  303. package/resources/access-token.d.mts +48 -0
  304. package/resources/access-token.d.mts.map +1 -0
  305. package/resources/access-token.d.ts +48 -0
  306. package/resources/access-token.d.ts.map +1 -0
  307. package/resources/access-token.js +16 -0
  308. package/resources/access-token.js.map +1 -0
  309. package/resources/access-token.mjs +12 -0
  310. package/resources/access-token.mjs.map +1 -0
  311. package/resources/agents/agents.d.mts +244 -0
  312. package/resources/agents/agents.d.mts.map +1 -0
  313. package/resources/agents/agents.d.ts +244 -0
  314. package/resources/agents/agents.d.ts.map +1 -0
  315. package/resources/agents/agents.js +68 -0
  316. package/resources/agents/agents.js.map +1 -0
  317. package/resources/agents/agents.mjs +63 -0
  318. package/resources/agents/agents.mjs.map +1 -0
  319. package/resources/agents/calls.d.mts +218 -0
  320. package/resources/agents/calls.d.mts.map +1 -0
  321. package/resources/agents/calls.d.ts +218 -0
  322. package/resources/agents/calls.d.ts.map +1 -0
  323. package/resources/agents/calls.js +36 -0
  324. package/resources/agents/calls.js.map +1 -0
  325. package/resources/agents/calls.mjs +32 -0
  326. package/resources/agents/calls.mjs.map +1 -0
  327. package/resources/agents/deployments.d.mts +92 -0
  328. package/resources/agents/deployments.d.mts.map +1 -0
  329. package/resources/agents/deployments.d.ts +92 -0
  330. package/resources/agents/deployments.d.ts.map +1 -0
  331. package/resources/agents/deployments.js +22 -0
  332. package/resources/agents/deployments.js.map +1 -0
  333. package/resources/agents/deployments.mjs +18 -0
  334. package/resources/agents/deployments.mjs.map +1 -0
  335. package/resources/agents/index.d.mts +5 -0
  336. package/resources/agents/index.d.mts.map +1 -0
  337. package/resources/agents/index.d.ts +5 -0
  338. package/resources/agents/index.d.ts.map +1 -0
  339. package/resources/agents/index.js +13 -0
  340. package/resources/agents/index.js.map +1 -0
  341. package/resources/agents/index.mjs +6 -0
  342. package/resources/agents/index.mjs.map +1 -0
  343. package/resources/agents/metrics/index.d.mts +3 -0
  344. package/resources/agents/metrics/index.d.mts.map +1 -0
  345. package/resources/agents/metrics/index.d.ts +3 -0
  346. package/resources/agents/metrics/index.d.ts.map +1 -0
  347. package/resources/agents/metrics/index.js +9 -0
  348. package/resources/agents/metrics/index.js.map +1 -0
  349. package/resources/agents/metrics/index.mjs +4 -0
  350. package/resources/agents/metrics/index.mjs.map +1 -0
  351. package/resources/agents/metrics/metrics.d.mts +114 -0
  352. package/resources/agents/metrics/metrics.d.mts.map +1 -0
  353. package/resources/agents/metrics/metrics.d.ts +114 -0
  354. package/resources/agents/metrics/metrics.d.ts.map +1 -0
  355. package/resources/agents/metrics/metrics.js +60 -0
  356. package/resources/agents/metrics/metrics.js.map +1 -0
  357. package/resources/agents/metrics/metrics.mjs +55 -0
  358. package/resources/agents/metrics/metrics.mjs.map +1 -0
  359. package/resources/agents/metrics/results.d.mts +143 -0
  360. package/resources/agents/metrics/results.d.mts.map +1 -0
  361. package/resources/agents/metrics/results.d.ts +143 -0
  362. package/resources/agents/metrics/results.d.ts.map +1 -0
  363. package/resources/agents/metrics/results.js +33 -0
  364. package/resources/agents/metrics/results.js.map +1 -0
  365. package/resources/agents/metrics/results.mjs +29 -0
  366. package/resources/agents/metrics/results.mjs.map +1 -0
  367. package/resources/agents/metrics.d.mts +2 -0
  368. package/resources/agents/metrics.d.mts.map +1 -0
  369. package/resources/agents/metrics.d.ts +2 -0
  370. package/resources/agents/metrics.d.ts.map +1 -0
  371. package/resources/agents/metrics.js +6 -0
  372. package/resources/agents/metrics.js.map +1 -0
  373. package/resources/agents/metrics.mjs +3 -0
  374. package/resources/agents/metrics.mjs.map +1 -0
  375. package/resources/agents.d.mts +2 -0
  376. package/resources/agents.d.mts.map +1 -0
  377. package/resources/agents.d.ts +2 -0
  378. package/resources/agents.d.ts.map +1 -0
  379. package/resources/agents.js +6 -0
  380. package/resources/agents.js.map +1 -0
  381. package/resources/agents.mjs +3 -0
  382. package/resources/agents.mjs.map +1 -0
  383. package/resources/datasets/datasets.d.mts +82 -0
  384. package/resources/datasets/datasets.d.mts.map +1 -0
  385. package/resources/datasets/datasets.d.ts +82 -0
  386. package/resources/datasets/datasets.d.ts.map +1 -0
  387. package/resources/datasets/datasets.js +57 -0
  388. package/resources/datasets/datasets.js.map +1 -0
  389. package/resources/datasets/datasets.mjs +52 -0
  390. package/resources/datasets/datasets.mjs.map +1 -0
  391. package/resources/datasets/files.d.mts +64 -0
  392. package/resources/datasets/files.d.mts.map +1 -0
  393. package/resources/datasets/files.d.ts +64 -0
  394. package/resources/datasets/files.d.ts.map +1 -0
  395. package/resources/datasets/files.js +38 -0
  396. package/resources/datasets/files.js.map +1 -0
  397. package/resources/datasets/files.mjs +34 -0
  398. package/resources/datasets/files.mjs.map +1 -0
  399. package/resources/datasets/index.d.mts +3 -0
  400. package/resources/datasets/index.d.mts.map +1 -0
  401. package/resources/datasets/index.d.ts +3 -0
  402. package/resources/datasets/index.d.ts.map +1 -0
  403. package/resources/datasets/index.js +9 -0
  404. package/resources/datasets/index.js.map +1 -0
  405. package/resources/datasets/index.mjs +4 -0
  406. package/resources/datasets/index.mjs.map +1 -0
  407. package/resources/datasets.d.mts +2 -0
  408. package/resources/datasets.d.mts.map +1 -0
  409. package/resources/datasets.d.ts +2 -0
  410. package/resources/datasets.d.ts.map +1 -0
  411. package/resources/datasets.js +6 -0
  412. package/resources/datasets.js.map +1 -0
  413. package/resources/datasets.mjs +3 -0
  414. package/resources/datasets.mjs.map +1 -0
  415. package/resources/fine-tunes.d.mts +101 -0
  416. package/resources/fine-tunes.d.mts.map +1 -0
  417. package/resources/fine-tunes.d.ts +101 -0
  418. package/resources/fine-tunes.d.ts.map +1 -0
  419. package/resources/fine-tunes.js +48 -0
  420. package/resources/fine-tunes.js.map +1 -0
  421. package/resources/fine-tunes.mjs +44 -0
  422. package/resources/fine-tunes.mjs.map +1 -0
  423. package/resources/index.d.mts +12 -0
  424. package/resources/index.d.mts.map +1 -0
  425. package/resources/index.d.ts +12 -0
  426. package/resources/index.d.ts.map +1 -0
  427. package/resources/index.js +25 -0
  428. package/resources/index.js.map +1 -0
  429. package/resources/index.mjs +12 -0
  430. package/resources/index.mjs.map +1 -0
  431. package/resources/infill.d.mts +72 -0
  432. package/resources/infill.d.mts.map +1 -0
  433. package/resources/infill.d.ts +72 -0
  434. package/resources/infill.d.ts.map +1 -0
  435. package/resources/infill.js +37 -0
  436. package/resources/infill.js.map +1 -0
  437. package/resources/infill.mjs +33 -0
  438. package/resources/infill.mjs.map +1 -0
  439. package/resources/pronunciation-dicts.d.mts +107 -0
  440. package/resources/pronunciation-dicts.d.mts.map +1 -0
  441. package/resources/pronunciation-dicts.d.ts +107 -0
  442. package/resources/pronunciation-dicts.d.ts.map +1 -0
  443. package/resources/pronunciation-dicts.js +66 -0
  444. package/resources/pronunciation-dicts.js.map +1 -0
  445. package/resources/pronunciation-dicts.mjs +62 -0
  446. package/resources/pronunciation-dicts.mjs.map +1 -0
  447. package/resources/stt.d.mts +208 -0
  448. package/resources/stt.d.mts.map +1 -0
  449. package/resources/stt.d.ts +208 -0
  450. package/resources/stt.d.ts.map +1 -0
  451. package/resources/stt.js +33 -0
  452. package/resources/stt.js.map +1 -0
  453. package/resources/stt.mjs +29 -0
  454. package/resources/stt.mjs.map +1 -0
  455. package/resources/top-level.d.mts +8 -0
  456. package/resources/top-level.d.mts.map +1 -0
  457. package/resources/top-level.d.ts +8 -0
  458. package/resources/top-level.d.ts.map +1 -0
  459. package/resources/top-level.js +4 -0
  460. package/resources/top-level.js.map +1 -0
  461. package/resources/top-level.mjs +3 -0
  462. package/resources/top-level.mjs.map +1 -0
  463. package/resources/tts/index.d.mts +2 -0
  464. package/resources/tts/index.d.mts.map +1 -0
  465. package/resources/tts/index.d.ts +2 -0
  466. package/resources/tts/index.d.ts.map +1 -0
  467. package/resources/tts/index.js +7 -0
  468. package/resources/tts/index.js.map +1 -0
  469. package/resources/tts/index.mjs +3 -0
  470. package/resources/tts/index.mjs.map +1 -0
  471. package/resources/tts/internal-base.d.mts +40 -0
  472. package/resources/tts/internal-base.d.mts.map +1 -0
  473. package/resources/tts/internal-base.d.ts +40 -0
  474. package/resources/tts/internal-base.d.ts.map +1 -0
  475. package/resources/tts/internal-base.js +48 -0
  476. package/resources/tts/internal-base.js.map +1 -0
  477. package/resources/tts/internal-base.mjs +42 -0
  478. package/resources/tts/internal-base.mjs.map +1 -0
  479. package/resources/tts/tts.d.mts +409 -0
  480. package/resources/tts/tts.d.mts.map +1 -0
  481. package/resources/tts/tts.d.ts +409 -0
  482. package/resources/tts/tts.d.ts.map +1 -0
  483. package/resources/tts/tts.js +31 -0
  484. package/resources/tts/tts.js.map +1 -0
  485. package/resources/tts/tts.mjs +27 -0
  486. package/resources/tts/tts.mjs.map +1 -0
  487. package/resources/tts/ws.d.mts +17 -0
  488. package/resources/tts/ws.d.mts.map +1 -0
  489. package/resources/tts/ws.d.ts +17 -0
  490. package/resources/tts/ws.d.ts.map +1 -0
  491. package/resources/tts/ws.js +73 -0
  492. package/resources/tts/ws.js.map +1 -0
  493. package/resources/tts/ws.mjs +68 -0
  494. package/resources/tts/ws.mjs.map +1 -0
  495. package/resources/tts.d.mts +2 -0
  496. package/resources/tts.d.mts.map +1 -0
  497. package/resources/tts.d.ts +2 -0
  498. package/resources/tts.d.ts.map +1 -0
  499. package/resources/tts.js +6 -0
  500. package/resources/tts.js.map +1 -0
  501. package/resources/tts.mjs +3 -0
  502. package/resources/tts.mjs.map +1 -0
  503. package/resources/voice-changer.d.mts +50 -0
  504. package/resources/voice-changer.d.mts.map +1 -0
  505. package/resources/voice-changer.d.ts +50 -0
  506. package/resources/voice-changer.d.ts.map +1 -0
  507. package/resources/voice-changer.js +26 -0
  508. package/resources/voice-changer.js.map +1 -0
  509. package/resources/voice-changer.mjs +22 -0
  510. package/resources/voice-changer.mjs.map +1 -0
  511. package/resources/voices.d.mts +213 -0
  512. package/resources/voices.d.mts.map +1 -0
  513. package/resources/voices.d.ts +213 -0
  514. package/resources/voices.d.ts.map +1 -0
  515. package/resources/voices.js +57 -0
  516. package/resources/voices.js.map +1 -0
  517. package/resources/voices.mjs +53 -0
  518. package/resources/voices.mjs.map +1 -0
  519. package/resources.d.mts +2 -0
  520. package/resources.d.mts.map +1 -0
  521. package/resources.d.ts +2 -0
  522. package/resources.d.ts.map +1 -0
  523. package/resources.js +5 -0
  524. package/resources.js.map +1 -0
  525. package/resources.mjs +2 -0
  526. package/resources.mjs.map +1 -0
  527. package/src/api-promise.ts +2 -0
  528. package/src/client.ts +947 -0
  529. package/src/core/EventEmitter.ts +98 -0
  530. package/src/core/README.md +3 -0
  531. package/src/core/api-promise.ts +92 -0
  532. package/src/core/error.ts +130 -0
  533. package/src/core/pagination.ts +175 -0
  534. package/src/core/resource.ts +11 -0
  535. package/src/core/uploads.ts +2 -0
  536. package/src/error.ts +2 -0
  537. package/src/index.ts +23 -0
  538. package/src/internal/README.md +3 -0
  539. package/src/internal/builtin-types.ts +93 -0
  540. package/src/internal/detect-platform.ts +196 -0
  541. package/src/internal/errors.ts +33 -0
  542. package/src/internal/headers.ts +97 -0
  543. package/src/internal/parse.ts +50 -0
  544. package/src/internal/qs/LICENSE.md +13 -0
  545. package/src/internal/qs/README.md +3 -0
  546. package/src/internal/qs/formats.ts +10 -0
  547. package/src/internal/qs/index.ts +13 -0
  548. package/src/internal/qs/stringify.ts +385 -0
  549. package/src/internal/qs/types.ts +71 -0
  550. package/src/internal/qs/utils.ts +265 -0
  551. package/src/internal/request-options.ts +91 -0
  552. package/src/internal/shim-types.ts +26 -0
  553. package/src/internal/shims.ts +107 -0
  554. package/src/internal/to-file.ts +154 -0
  555. package/src/internal/types.ts +95 -0
  556. package/src/internal/uploads.ts +187 -0
  557. package/src/internal/utils/base64.ts +40 -0
  558. package/src/internal/utils/bytes.ts +32 -0
  559. package/src/internal/utils/env.ts +18 -0
  560. package/src/internal/utils/log.ts +126 -0
  561. package/src/internal/utils/path.ts +88 -0
  562. package/src/internal/utils/sleep.ts +3 -0
  563. package/src/internal/utils/uuid.ts +17 -0
  564. package/src/internal/utils/values.ts +105 -0
  565. package/src/internal/utils.ts +8 -0
  566. package/src/lib/.keep +4 -0
  567. package/src/pagination.ts +2 -0
  568. package/src/resource.ts +2 -0
  569. package/src/resources/access-token.ts +61 -0
  570. package/src/resources/agents/agents.ts +351 -0
  571. package/src/resources/agents/calls.ts +273 -0
  572. package/src/resources/agents/deployments.ts +119 -0
  573. package/src/resources/agents/index.ts +27 -0
  574. package/src/resources/agents/metrics/index.ts +18 -0
  575. package/src/resources/agents/metrics/metrics.ts +186 -0
  576. package/src/resources/agents/metrics/results.ts +192 -0
  577. package/src/resources/agents/metrics.ts +3 -0
  578. package/src/resources/agents.ts +3 -0
  579. package/src/resources/datasets/datasets.ts +145 -0
  580. package/src/resources/datasets/files.ts +110 -0
  581. package/src/resources/datasets/index.ts +18 -0
  582. package/src/resources/datasets.ts +3 -0
  583. package/src/resources/fine-tunes.ts +155 -0
  584. package/src/resources/index.ts +68 -0
  585. package/src/resources/infill.ts +101 -0
  586. package/src/resources/pronunciation-dicts.ts +172 -0
  587. package/src/resources/stt.ts +234 -0
  588. package/src/resources/top-level.ts +11 -0
  589. package/src/resources/tts/index.ts +14 -0
  590. package/src/resources/tts/internal-base.ts +89 -0
  591. package/src/resources/tts/tts.ts +533 -0
  592. package/src/resources/tts/ws.ts +79 -0
  593. package/src/resources/tts.ts +3 -0
  594. package/src/resources/voice-changer.ts +87 -0
  595. package/src/resources/voices.ts +325 -0
  596. package/src/resources.ts +1 -0
  597. package/src/tsconfig.json +11 -0
  598. package/src/uploads.ts +2 -0
  599. package/src/version.ts +1 -0
  600. package/uploads.d.mts +2 -0
  601. package/uploads.d.mts.map +1 -0
  602. package/uploads.d.ts +2 -0
  603. package/uploads.d.ts.map +1 -0
  604. package/uploads.js +6 -0
  605. package/uploads.js.map +1 -0
  606. package/uploads.mjs +2 -0
  607. package/uploads.mjs.map +1 -0
  608. package/version.d.mts +2 -0
  609. package/version.d.mts.map +1 -0
  610. package/version.d.ts +2 -1
  611. package/version.d.ts.map +1 -0
  612. package/version.js +3 -2
  613. package/version.js.map +1 -0
  614. package/version.mjs +2 -0
  615. package/version.mjs.map +1 -0
  616. package/Client.d.ts +0 -53
  617. package/Client.js +0 -47
  618. package/api/index.d.ts +0 -1
  619. package/api/index.js +0 -17
  620. package/api/resources/apiStatus/client/Client.d.ts +0 -43
  621. package/api/resources/apiStatus/client/Client.js +0 -113
  622. package/api/resources/apiStatus/client/index.d.ts +0 -1
  623. package/api/resources/apiStatus/client/index.js +0 -2
  624. package/api/resources/apiStatus/index.d.ts +0 -2
  625. package/api/resources/apiStatus/index.js +0 -18
  626. package/api/resources/apiStatus/types/ApiInfo.d.ts +0 -7
  627. package/api/resources/apiStatus/types/ApiInfo.js +0 -5
  628. package/api/resources/apiStatus/types/index.d.ts +0 -1
  629. package/api/resources/apiStatus/types/index.js +0 -17
  630. package/api/resources/auth/client/Client.d.ts +0 -68
  631. package/api/resources/auth/client/Client.js +0 -143
  632. package/api/resources/auth/client/index.d.ts +0 -1
  633. package/api/resources/auth/client/index.js +0 -2
  634. package/api/resources/auth/index.d.ts +0 -2
  635. package/api/resources/auth/index.js +0 -18
  636. package/api/resources/auth/types/TokenGrant.d.ts +0 -9
  637. package/api/resources/auth/types/TokenGrant.js +0 -5
  638. package/api/resources/auth/types/TokenRequest.d.ts +0 -10
  639. package/api/resources/auth/types/TokenRequest.js +0 -5
  640. package/api/resources/auth/types/TokenResponse.d.ts +0 -7
  641. package/api/resources/auth/types/TokenResponse.js +0 -5
  642. package/api/resources/auth/types/index.d.ts +0 -3
  643. package/api/resources/auth/types/index.js +0 -19
  644. package/api/resources/embedding/index.d.ts +0 -1
  645. package/api/resources/embedding/index.js +0 -17
  646. package/api/resources/embedding/types/Embedding.d.ts +0 -10
  647. package/api/resources/embedding/types/Embedding.js +0 -5
  648. package/api/resources/embedding/types/index.d.ts +0 -1
  649. package/api/resources/embedding/types/index.js +0 -17
  650. package/api/resources/index.d.ts +0 -19
  651. package/api/resources/index.js +0 -58
  652. package/api/resources/infill/client/Client.d.ts +0 -57
  653. package/api/resources/infill/client/Client.js +0 -156
  654. package/api/resources/infill/client/index.d.ts +0 -1
  655. package/api/resources/infill/client/index.js +0 -17
  656. package/api/resources/infill/client/requests/InfillBytesRequest.d.ts +0 -63
  657. package/api/resources/infill/client/requests/InfillBytesRequest.js +0 -5
  658. package/api/resources/infill/client/requests/index.d.ts +0 -1
  659. package/api/resources/infill/client/requests/index.js +0 -2
  660. package/api/resources/infill/index.d.ts +0 -1
  661. package/api/resources/infill/index.js +0 -17
  662. package/api/resources/stt/client/Client.d.ts +0 -71
  663. package/api/resources/stt/client/Client.js +0 -166
  664. package/api/resources/stt/client/index.d.ts +0 -1
  665. package/api/resources/stt/client/index.js +0 -17
  666. package/api/resources/stt/client/requests/TranscriptionRequest.d.ts +0 -147
  667. package/api/resources/stt/client/requests/TranscriptionRequest.js +0 -5
  668. package/api/resources/stt/client/requests/index.d.ts +0 -1
  669. package/api/resources/stt/client/requests/index.js +0 -2
  670. package/api/resources/stt/index.d.ts +0 -2
  671. package/api/resources/stt/index.js +0 -18
  672. package/api/resources/stt/types/DoneMessage.d.ts +0 -10
  673. package/api/resources/stt/types/DoneMessage.js +0 -5
  674. package/api/resources/stt/types/ErrorMessage.d.ts +0 -9
  675. package/api/resources/stt/types/ErrorMessage.js +0 -5
  676. package/api/resources/stt/types/FlushDoneMessage.d.ts +0 -10
  677. package/api/resources/stt/types/FlushDoneMessage.js +0 -5
  678. package/api/resources/stt/types/StreamingTranscriptionResponse.d.ts +0 -22
  679. package/api/resources/stt/types/StreamingTranscriptionResponse.js +0 -5
  680. package/api/resources/stt/types/SttEncoding.d.ts +0 -15
  681. package/api/resources/stt/types/SttEncoding.js +0 -14
  682. package/api/resources/stt/types/TimestampGranularity.d.ts +0 -12
  683. package/api/resources/stt/types/TimestampGranularity.js +0 -9
  684. package/api/resources/stt/types/TranscriptMessage.d.ts +0 -22
  685. package/api/resources/stt/types/TranscriptMessage.js +0 -5
  686. package/api/resources/stt/types/TranscriptionResponse.d.ts +0 -14
  687. package/api/resources/stt/types/TranscriptionResponse.js +0 -5
  688. package/api/resources/stt/types/TranscriptionWord.d.ts +0 -11
  689. package/api/resources/stt/types/TranscriptionWord.js +0 -5
  690. package/api/resources/stt/types/index.d.ts +0 -9
  691. package/api/resources/stt/types/index.js +0 -25
  692. package/api/resources/tts/client/Client.d.ts +0 -39
  693. package/api/resources/tts/client/Client.js +0 -162
  694. package/api/resources/tts/client/index.d.ts +0 -1
  695. package/api/resources/tts/client/index.js +0 -2
  696. package/api/resources/tts/index.d.ts +0 -2
  697. package/api/resources/tts/index.js +0 -18
  698. package/api/resources/tts/types/CancelContextRequest.d.ts +0 -10
  699. package/api/resources/tts/types/CancelContextRequest.js +0 -5
  700. package/api/resources/tts/types/ContextId.d.ts +0 -9
  701. package/api/resources/tts/types/ContextId.js +0 -5
  702. package/api/resources/tts/types/Controls.d.ts +0 -8
  703. package/api/resources/tts/types/Controls.js +0 -5
  704. package/api/resources/tts/types/Emotion.d.ts +0 -7
  705. package/api/resources/tts/types/Emotion.js +0 -5
  706. package/api/resources/tts/types/EmotionDeprecated.d.ts +0 -38
  707. package/api/resources/tts/types/EmotionDeprecated.js +0 -33
  708. package/api/resources/tts/types/FlushId.d.ts +0 -9
  709. package/api/resources/tts/types/FlushId.js +0 -5
  710. package/api/resources/tts/types/GenerationConfig.d.ts +0 -15
  711. package/api/resources/tts/types/GenerationConfig.js +0 -5
  712. package/api/resources/tts/types/GenerationRequest.d.ts +0 -42
  713. package/api/resources/tts/types/GenerationRequest.js +0 -5
  714. package/api/resources/tts/types/ModelSpeed.d.ts +0 -16
  715. package/api/resources/tts/types/ModelSpeed.js +0 -11
  716. package/api/resources/tts/types/Mp3OutputFormat.d.ts +0 -9
  717. package/api/resources/tts/types/Mp3OutputFormat.js +0 -5
  718. package/api/resources/tts/types/NaturalSpecifier.d.ts +0 -11
  719. package/api/resources/tts/types/NaturalSpecifier.js +0 -13
  720. package/api/resources/tts/types/NumericalSpecifier.d.ts +0 -4
  721. package/api/resources/tts/types/NumericalSpecifier.js +0 -5
  722. package/api/resources/tts/types/OutputFormat.d.ts +0 -16
  723. package/api/resources/tts/types/OutputFormat.js +0 -5
  724. package/api/resources/tts/types/PhonemeTimestamps.d.ts +0 -8
  725. package/api/resources/tts/types/PhonemeTimestamps.js +0 -5
  726. package/api/resources/tts/types/RawEncoding.d.ts +0 -10
  727. package/api/resources/tts/types/RawEncoding.js +0 -12
  728. package/api/resources/tts/types/RawOutputFormat.d.ts +0 -10
  729. package/api/resources/tts/types/RawOutputFormat.js +0 -5
  730. package/api/resources/tts/types/Speed.d.ts +0 -10
  731. package/api/resources/tts/types/Speed.js +0 -5
  732. package/api/resources/tts/types/SseOutputFormat.d.ts +0 -10
  733. package/api/resources/tts/types/SseOutputFormat.js +0 -5
  734. package/api/resources/tts/types/SupportedLanguage.d.ts +0 -26
  735. package/api/resources/tts/types/SupportedLanguage.js +0 -23
  736. package/api/resources/tts/types/TtsRequest.d.ts +0 -19
  737. package/api/resources/tts/types/TtsRequest.js +0 -5
  738. package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +0 -9
  739. package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +0 -5
  740. package/api/resources/tts/types/TtsRequestIdSpecifier.d.ts +0 -9
  741. package/api/resources/tts/types/TtsRequestIdSpecifier.js +0 -5
  742. package/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +0 -5
  743. package/api/resources/tts/types/TtsRequestVoiceSpecifier.js +0 -5
  744. package/api/resources/tts/types/TtssseRequest.d.ts +0 -27
  745. package/api/resources/tts/types/TtssseRequest.js +0 -5
  746. package/api/resources/tts/types/WavOutputFormat.d.ts +0 -6
  747. package/api/resources/tts/types/WavOutputFormat.js +0 -5
  748. package/api/resources/tts/types/WebSocketBaseResponse.d.ts +0 -9
  749. package/api/resources/tts/types/WebSocketBaseResponse.js +0 -5
  750. package/api/resources/tts/types/WebSocketChunkResponse.d.ts +0 -8
  751. package/api/resources/tts/types/WebSocketChunkResponse.js +0 -5
  752. package/api/resources/tts/types/WebSocketDoneResponse.d.ts +0 -6
  753. package/api/resources/tts/types/WebSocketDoneResponse.js +0 -5
  754. package/api/resources/tts/types/WebSocketErrorResponse.d.ts +0 -7
  755. package/api/resources/tts/types/WebSocketErrorResponse.js +0 -5
  756. package/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +0 -8
  757. package/api/resources/tts/types/WebSocketFlushDoneResponse.js +0 -5
  758. package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +0 -7
  759. package/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +0 -5
  760. package/api/resources/tts/types/WebSocketRawOutputFormat.d.ts +0 -10
  761. package/api/resources/tts/types/WebSocketRawOutputFormat.js +0 -5
  762. package/api/resources/tts/types/WebSocketRequest.d.ts +0 -11
  763. package/api/resources/tts/types/WebSocketRequest.js +0 -5
  764. package/api/resources/tts/types/WebSocketResponse.d.ts +0 -25
  765. package/api/resources/tts/types/WebSocketResponse.js +0 -5
  766. package/api/resources/tts/types/WebSocketStreamOptions.d.ts +0 -6
  767. package/api/resources/tts/types/WebSocketStreamOptions.js +0 -5
  768. package/api/resources/tts/types/WebSocketTimestampsResponse.d.ts +0 -7
  769. package/api/resources/tts/types/WebSocketTimestampsResponse.js +0 -5
  770. package/api/resources/tts/types/WebSocketTtsOutput.d.ts +0 -12
  771. package/api/resources/tts/types/WebSocketTtsOutput.js +0 -5
  772. package/api/resources/tts/types/WebSocketTtsRequest.d.ts +0 -23
  773. package/api/resources/tts/types/WebSocketTtsRequest.js +0 -5
  774. package/api/resources/tts/types/WordTimestamps.d.ts +0 -8
  775. package/api/resources/tts/types/WordTimestamps.js +0 -5
  776. package/api/resources/tts/types/index.d.ts +0 -39
  777. package/api/resources/tts/types/index.js +0 -55
  778. package/api/resources/voiceChanger/client/Client.d.ts +0 -46
  779. package/api/resources/voiceChanger/client/Client.js +0 -195
  780. package/api/resources/voiceChanger/client/index.d.ts +0 -1
  781. package/api/resources/voiceChanger/client/index.js +0 -17
  782. package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.d.ts +0 -39
  783. package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +0 -5
  784. package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.d.ts +0 -39
  785. package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +0 -5
  786. package/api/resources/voiceChanger/client/requests/index.d.ts +0 -2
  787. package/api/resources/voiceChanger/client/requests/index.js +0 -2
  788. package/api/resources/voiceChanger/index.d.ts +0 -2
  789. package/api/resources/voiceChanger/index.js +0 -18
  790. package/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +0 -9
  791. package/api/resources/voiceChanger/types/OutputFormatContainer.js +0 -11
  792. package/api/resources/voiceChanger/types/StreamingResponse.d.ts +0 -16
  793. package/api/resources/voiceChanger/types/StreamingResponse.js +0 -5
  794. package/api/resources/voiceChanger/types/index.d.ts +0 -2
  795. package/api/resources/voiceChanger/types/index.js +0 -18
  796. package/api/resources/voices/client/Client.d.ts +0 -150
  797. package/api/resources/voices/client/Client.js +0 -530
  798. package/api/resources/voices/client/index.d.ts +0 -1
  799. package/api/resources/voices/client/index.js +0 -17
  800. package/api/resources/voices/client/requests/CloneVoiceRequest.d.ts +0 -35
  801. package/api/resources/voices/client/requests/CloneVoiceRequest.js +0 -5
  802. package/api/resources/voices/client/requests/index.d.ts +0 -1
  803. package/api/resources/voices/client/requests/index.js +0 -2
  804. package/api/resources/voices/index.d.ts +0 -2
  805. package/api/resources/voices/index.js +0 -18
  806. package/api/resources/voices/types/BaseVoiceId.d.ts +0 -8
  807. package/api/resources/voices/types/BaseVoiceId.js +0 -5
  808. package/api/resources/voices/types/CloneMode.d.ts +0 -8
  809. package/api/resources/voices/types/CloneMode.js +0 -10
  810. package/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -13
  811. package/api/resources/voices/types/CreateVoiceRequest.js +0 -5
  812. package/api/resources/voices/types/EmbeddingResponse.d.ts +0 -7
  813. package/api/resources/voices/types/EmbeddingResponse.js +0 -5
  814. package/api/resources/voices/types/EmbeddingSpecifier.d.ts +0 -8
  815. package/api/resources/voices/types/EmbeddingSpecifier.js +0 -5
  816. package/api/resources/voices/types/Gender.d.ts +0 -8
  817. package/api/resources/voices/types/Gender.js +0 -10
  818. package/api/resources/voices/types/IdSpecifier.d.ts +0 -8
  819. package/api/resources/voices/types/IdSpecifier.js +0 -5
  820. package/api/resources/voices/types/LocalizeDialect.d.ts +0 -20
  821. package/api/resources/voices/types/LocalizeDialect.js +0 -5
  822. package/api/resources/voices/types/LocalizeEnglishDialect.d.ts +0 -11
  823. package/api/resources/voices/types/LocalizeEnglishDialect.js +0 -13
  824. package/api/resources/voices/types/LocalizeFrenchDialect.d.ts +0 -8
  825. package/api/resources/voices/types/LocalizeFrenchDialect.js +0 -10
  826. package/api/resources/voices/types/LocalizePortugueseDialect.d.ts +0 -8
  827. package/api/resources/voices/types/LocalizePortugueseDialect.js +0 -10
  828. package/api/resources/voices/types/LocalizeSpanishDialect.d.ts +0 -8
  829. package/api/resources/voices/types/LocalizeSpanishDialect.js +0 -10
  830. package/api/resources/voices/types/LocalizeTargetLanguage.d.ts +0 -26
  831. package/api/resources/voices/types/LocalizeTargetLanguage.js +0 -23
  832. package/api/resources/voices/types/LocalizeVoiceRequest.d.ts +0 -15
  833. package/api/resources/voices/types/LocalizeVoiceRequest.js +0 -5
  834. package/api/resources/voices/types/MixVoiceSpecifier.d.ts +0 -5
  835. package/api/resources/voices/types/MixVoiceSpecifier.js +0 -5
  836. package/api/resources/voices/types/MixVoicesRequest.d.ts +0 -7
  837. package/api/resources/voices/types/MixVoicesRequest.js +0 -5
  838. package/api/resources/voices/types/UpdateVoiceRequest.d.ts +0 -9
  839. package/api/resources/voices/types/UpdateVoiceRequest.js +0 -5
  840. package/api/resources/voices/types/Voice.d.ts +0 -19
  841. package/api/resources/voices/types/Voice.js +0 -5
  842. package/api/resources/voices/types/VoiceId.d.ts +0 -7
  843. package/api/resources/voices/types/VoiceId.js +0 -5
  844. package/api/resources/voices/types/VoiceMetadata.d.ts +0 -18
  845. package/api/resources/voices/types/VoiceMetadata.js +0 -5
  846. package/api/resources/voices/types/Weight.d.ts +0 -7
  847. package/api/resources/voices/types/Weight.js +0 -5
  848. package/api/resources/voices/types/index.d.ts +0 -21
  849. package/api/resources/voices/types/index.js +0 -37
  850. package/core/fetcher/APIResponse.d.ts +0 -10
  851. package/core/fetcher/APIResponse.js +0 -2
  852. package/core/fetcher/Fetcher.d.ts +0 -39
  853. package/core/fetcher/Fetcher.js +0 -100
  854. package/core/fetcher/Supplier.d.ts +0 -4
  855. package/core/fetcher/Supplier.js +0 -22
  856. package/core/fetcher/createRequestUrl.d.ts +0 -1
  857. package/core/fetcher/createRequestUrl.js +0 -12
  858. package/core/fetcher/getFetchFn.d.ts +0 -4
  859. package/core/fetcher/getFetchFn.js +0 -68
  860. package/core/fetcher/getHeader.d.ts +0 -1
  861. package/core/fetcher/getHeader.js +0 -11
  862. package/core/fetcher/getRequestBody.d.ts +0 -7
  863. package/core/fetcher/getRequestBody.js +0 -23
  864. package/core/fetcher/getResponseBody.d.ts +0 -1
  865. package/core/fetcher/getResponseBody.js +0 -54
  866. package/core/fetcher/index.d.ts +0 -5
  867. package/core/fetcher/index.js +0 -9
  868. package/core/fetcher/makeRequest.d.ts +0 -1
  869. package/core/fetcher/makeRequest.js +0 -42
  870. package/core/fetcher/requestWithRetries.d.ts +0 -1
  871. package/core/fetcher/requestWithRetries.js +0 -40
  872. package/core/fetcher/signals.d.ts +0 -11
  873. package/core/fetcher/signals.js +0 -36
  874. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  875. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  876. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  877. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  878. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  879. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  880. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  881. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  882. package/core/form-data-utils/FormDataWrapper.d.ts +0 -60
  883. package/core/form-data-utils/FormDataWrapper.js +0 -184
  884. package/core/form-data-utils/index.d.ts +0 -1
  885. package/core/form-data-utils/index.js +0 -17
  886. package/core/index.d.ts +0 -5
  887. package/core/index.js +0 -44
  888. package/core/json.d.ts +0 -15
  889. package/core/json.js +0 -24
  890. package/core/runtime/index.d.ts +0 -1
  891. package/core/runtime/index.js +0 -5
  892. package/core/runtime/runtime.d.ts +0 -9
  893. package/core/runtime/runtime.js +0 -103
  894. package/core/schemas/Schema.d.ts +0 -87
  895. package/core/schemas/Schema.js +0 -24
  896. package/core/schemas/builders/bigint/bigint.d.ts +0 -2
  897. package/core/schemas/builders/bigint/bigint.js +0 -53
  898. package/core/schemas/builders/bigint/index.d.ts +0 -1
  899. package/core/schemas/builders/bigint/index.js +0 -5
  900. package/core/schemas/builders/date/date.d.ts +0 -2
  901. package/core/schemas/builders/date/date.js +0 -62
  902. package/core/schemas/builders/date/index.d.ts +0 -1
  903. package/core/schemas/builders/date/index.js +0 -5
  904. package/core/schemas/builders/enum/enum.d.ts +0 -2
  905. package/core/schemas/builders/enum/enum.js +0 -38
  906. package/core/schemas/builders/enum/index.d.ts +0 -1
  907. package/core/schemas/builders/enum/index.js +0 -5
  908. package/core/schemas/builders/index.d.ts +0 -14
  909. package/core/schemas/builders/index.js +0 -30
  910. package/core/schemas/builders/lazy/index.d.ts +0 -3
  911. package/core/schemas/builders/lazy/index.js +0 -7
  912. package/core/schemas/builders/lazy/lazy.d.ts +0 -5
  913. package/core/schemas/builders/lazy/lazy.js +0 -24
  914. package/core/schemas/builders/lazy/lazyObject.d.ts +0 -3
  915. package/core/schemas/builders/lazy/lazyObject.js +0 -11
  916. package/core/schemas/builders/list/index.d.ts +0 -1
  917. package/core/schemas/builders/list/index.js +0 -5
  918. package/core/schemas/builders/list/list.d.ts +0 -2
  919. package/core/schemas/builders/list/list.js +0 -54
  920. package/core/schemas/builders/literals/booleanLiteral.d.ts +0 -2
  921. package/core/schemas/builders/literals/booleanLiteral.js +0 -28
  922. package/core/schemas/builders/literals/index.d.ts +0 -2
  923. package/core/schemas/builders/literals/index.js +0 -7
  924. package/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
  925. package/core/schemas/builders/literals/stringLiteral.js +0 -28
  926. package/core/schemas/builders/object/index.d.ts +0 -6
  927. package/core/schemas/builders/object/index.js +0 -11
  928. package/core/schemas/builders/object/object.d.ts +0 -3
  929. package/core/schemas/builders/object/object.js +0 -261
  930. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +0 -6
  931. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +0 -7
  932. package/core/schemas/builders/object/property.d.ts +0 -8
  933. package/core/schemas/builders/object/property.js +0 -15
  934. package/core/schemas/builders/object/types.d.ts +0 -31
  935. package/core/schemas/builders/object/types.js +0 -2
  936. package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -9
  937. package/core/schemas/builders/object-like/getObjectLikeUtils.js +0 -53
  938. package/core/schemas/builders/object-like/index.d.ts +0 -2
  939. package/core/schemas/builders/object-like/index.js +0 -6
  940. package/core/schemas/builders/object-like/types.d.ts +0 -7
  941. package/core/schemas/builders/object-like/types.js +0 -2
  942. package/core/schemas/builders/primitives/any.d.ts +0 -1
  943. package/core/schemas/builders/primitives/any.js +0 -6
  944. package/core/schemas/builders/primitives/boolean.d.ts +0 -1
  945. package/core/schemas/builders/primitives/boolean.js +0 -25
  946. package/core/schemas/builders/primitives/index.d.ts +0 -5
  947. package/core/schemas/builders/primitives/index.js +0 -13
  948. package/core/schemas/builders/primitives/number.d.ts +0 -1
  949. package/core/schemas/builders/primitives/number.js +0 -25
  950. package/core/schemas/builders/primitives/string.d.ts +0 -1
  951. package/core/schemas/builders/primitives/string.js +0 -25
  952. package/core/schemas/builders/primitives/unknown.d.ts +0 -1
  953. package/core/schemas/builders/primitives/unknown.js +0 -6
  954. package/core/schemas/builders/record/index.d.ts +0 -2
  955. package/core/schemas/builders/record/index.js +0 -5
  956. package/core/schemas/builders/record/record.d.ts +0 -3
  957. package/core/schemas/builders/record/record.js +0 -93
  958. package/core/schemas/builders/record/types.d.ts +0 -4
  959. package/core/schemas/builders/record/types.js +0 -2
  960. package/core/schemas/builders/schema-utils/JsonError.d.ts +0 -5
  961. package/core/schemas/builders/schema-utils/JsonError.js +0 -12
  962. package/core/schemas/builders/schema-utils/ParseError.d.ts +0 -5
  963. package/core/schemas/builders/schema-utils/ParseError.js +0 -12
  964. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -21
  965. package/core/schemas/builders/schema-utils/getSchemaUtils.js +0 -145
  966. package/core/schemas/builders/schema-utils/index.d.ts +0 -4
  967. package/core/schemas/builders/schema-utils/index.js +0 -11
  968. package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +0 -2
  969. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +0 -9
  970. package/core/schemas/builders/set/index.d.ts +0 -1
  971. package/core/schemas/builders/set/index.js +0 -5
  972. package/core/schemas/builders/set/set.d.ts +0 -2
  973. package/core/schemas/builders/set/set.js +0 -43
  974. package/core/schemas/builders/undiscriminated-union/index.d.ts +0 -2
  975. package/core/schemas/builders/undiscriminated-union/index.js +0 -5
  976. package/core/schemas/builders/undiscriminated-union/types.d.ts +0 -4
  977. package/core/schemas/builders/undiscriminated-union/types.js +0 -2
  978. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +0 -3
  979. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +0 -39
  980. package/core/schemas/builders/union/discriminant.d.ts +0 -5
  981. package/core/schemas/builders/union/discriminant.js +0 -9
  982. package/core/schemas/builders/union/index.d.ts +0 -4
  983. package/core/schemas/builders/union/index.js +0 -7
  984. package/core/schemas/builders/union/types.d.ts +0 -13
  985. package/core/schemas/builders/union/types.js +0 -2
  986. package/core/schemas/builders/union/union.d.ts +0 -4
  987. package/core/schemas/builders/union/union.js +0 -129
  988. package/core/schemas/index.d.ts +0 -2
  989. package/core/schemas/index.js +0 -17
  990. package/core/schemas/utils/MaybePromise.d.ts +0 -1
  991. package/core/schemas/utils/MaybePromise.js +0 -2
  992. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -7
  993. package/core/schemas/utils/addQuestionMarksToNullableProperties.js +0 -2
  994. package/core/schemas/utils/createIdentitySchemaCreator.d.ts +0 -2
  995. package/core/schemas/utils/createIdentitySchemaCreator.js +0 -15
  996. package/core/schemas/utils/entries.d.ts +0 -1
  997. package/core/schemas/utils/entries.js +0 -6
  998. package/core/schemas/utils/filterObject.d.ts +0 -1
  999. package/core/schemas/utils/filterObject.js +0 -13
  1000. package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +0 -1
  1001. package/core/schemas/utils/getErrorMessageForIncorrectType.js +0 -27
  1002. package/core/schemas/utils/isPlainObject.d.ts +0 -1
  1003. package/core/schemas/utils/isPlainObject.js +0 -17
  1004. package/core/schemas/utils/keys.d.ts +0 -1
  1005. package/core/schemas/utils/keys.js +0 -6
  1006. package/core/schemas/utils/maybeSkipValidation.d.ts +0 -2
  1007. package/core/schemas/utils/maybeSkipValidation.js +0 -27
  1008. package/core/schemas/utils/partition.d.ts +0 -1
  1009. package/core/schemas/utils/partition.js +0 -15
  1010. package/core/streaming-fetcher/Stream.d.ts +0 -47
  1011. package/core/streaming-fetcher/Stream.js +0 -169
  1012. package/core/streaming-fetcher/index.d.ts +0 -1
  1013. package/core/streaming-fetcher/index.js +0 -5
  1014. package/core/websocket/events.d.ts +0 -36
  1015. package/core/websocket/events.js +0 -27
  1016. package/core/websocket/index.d.ts +0 -1
  1017. package/core/websocket/index.js +0 -17
  1018. package/core/websocket/ws.d.ts +0 -137
  1019. package/core/websocket/ws.js +0 -448
  1020. package/dist/Client.d.ts +0 -53
  1021. package/dist/Client.js +0 -47
  1022. package/dist/api/index.d.ts +0 -1
  1023. package/dist/api/index.js +0 -17
  1024. package/dist/api/resources/apiStatus/client/Client.d.ts +0 -43
  1025. package/dist/api/resources/apiStatus/client/Client.js +0 -113
  1026. package/dist/api/resources/apiStatus/client/index.d.ts +0 -1
  1027. package/dist/api/resources/apiStatus/client/index.js +0 -2
  1028. package/dist/api/resources/apiStatus/index.d.ts +0 -2
  1029. package/dist/api/resources/apiStatus/index.js +0 -18
  1030. package/dist/api/resources/apiStatus/types/ApiInfo.d.ts +0 -7
  1031. package/dist/api/resources/apiStatus/types/ApiInfo.js +0 -5
  1032. package/dist/api/resources/apiStatus/types/index.d.ts +0 -1
  1033. package/dist/api/resources/apiStatus/types/index.js +0 -17
  1034. package/dist/api/resources/auth/client/Client.d.ts +0 -68
  1035. package/dist/api/resources/auth/client/Client.js +0 -143
  1036. package/dist/api/resources/auth/client/index.d.ts +0 -1
  1037. package/dist/api/resources/auth/client/index.js +0 -2
  1038. package/dist/api/resources/auth/index.d.ts +0 -2
  1039. package/dist/api/resources/auth/index.js +0 -18
  1040. package/dist/api/resources/auth/types/TokenGrant.d.ts +0 -9
  1041. package/dist/api/resources/auth/types/TokenGrant.js +0 -5
  1042. package/dist/api/resources/auth/types/TokenRequest.d.ts +0 -10
  1043. package/dist/api/resources/auth/types/TokenRequest.js +0 -5
  1044. package/dist/api/resources/auth/types/TokenResponse.d.ts +0 -7
  1045. package/dist/api/resources/auth/types/TokenResponse.js +0 -5
  1046. package/dist/api/resources/auth/types/index.d.ts +0 -3
  1047. package/dist/api/resources/auth/types/index.js +0 -19
  1048. package/dist/api/resources/embedding/index.d.ts +0 -1
  1049. package/dist/api/resources/embedding/index.js +0 -17
  1050. package/dist/api/resources/embedding/types/Embedding.d.ts +0 -10
  1051. package/dist/api/resources/embedding/types/Embedding.js +0 -5
  1052. package/dist/api/resources/embedding/types/index.d.ts +0 -1
  1053. package/dist/api/resources/embedding/types/index.js +0 -17
  1054. package/dist/api/resources/index.d.ts +0 -19
  1055. package/dist/api/resources/index.js +0 -58
  1056. package/dist/api/resources/infill/client/Client.d.ts +0 -57
  1057. package/dist/api/resources/infill/client/Client.js +0 -156
  1058. package/dist/api/resources/infill/client/index.d.ts +0 -1
  1059. package/dist/api/resources/infill/client/index.js +0 -17
  1060. package/dist/api/resources/infill/client/requests/InfillBytesRequest.d.ts +0 -63
  1061. package/dist/api/resources/infill/client/requests/InfillBytesRequest.js +0 -5
  1062. package/dist/api/resources/infill/client/requests/index.d.ts +0 -1
  1063. package/dist/api/resources/infill/client/requests/index.js +0 -2
  1064. package/dist/api/resources/infill/index.d.ts +0 -1
  1065. package/dist/api/resources/infill/index.js +0 -17
  1066. package/dist/api/resources/stt/client/Client.d.ts +0 -71
  1067. package/dist/api/resources/stt/client/Client.js +0 -166
  1068. package/dist/api/resources/stt/client/index.d.ts +0 -1
  1069. package/dist/api/resources/stt/client/index.js +0 -17
  1070. package/dist/api/resources/stt/client/requests/TranscriptionRequest.d.ts +0 -147
  1071. package/dist/api/resources/stt/client/requests/TranscriptionRequest.js +0 -5
  1072. package/dist/api/resources/stt/client/requests/index.d.ts +0 -1
  1073. package/dist/api/resources/stt/client/requests/index.js +0 -2
  1074. package/dist/api/resources/stt/index.d.ts +0 -2
  1075. package/dist/api/resources/stt/index.js +0 -18
  1076. package/dist/api/resources/stt/types/DoneMessage.d.ts +0 -10
  1077. package/dist/api/resources/stt/types/DoneMessage.js +0 -5
  1078. package/dist/api/resources/stt/types/ErrorMessage.d.ts +0 -9
  1079. package/dist/api/resources/stt/types/ErrorMessage.js +0 -5
  1080. package/dist/api/resources/stt/types/FlushDoneMessage.d.ts +0 -10
  1081. package/dist/api/resources/stt/types/FlushDoneMessage.js +0 -5
  1082. package/dist/api/resources/stt/types/StreamingTranscriptionResponse.d.ts +0 -22
  1083. package/dist/api/resources/stt/types/StreamingTranscriptionResponse.js +0 -5
  1084. package/dist/api/resources/stt/types/SttEncoding.d.ts +0 -15
  1085. package/dist/api/resources/stt/types/SttEncoding.js +0 -14
  1086. package/dist/api/resources/stt/types/TimestampGranularity.d.ts +0 -12
  1087. package/dist/api/resources/stt/types/TimestampGranularity.js +0 -9
  1088. package/dist/api/resources/stt/types/TranscriptMessage.d.ts +0 -22
  1089. package/dist/api/resources/stt/types/TranscriptMessage.js +0 -5
  1090. package/dist/api/resources/stt/types/TranscriptionResponse.d.ts +0 -14
  1091. package/dist/api/resources/stt/types/TranscriptionResponse.js +0 -5
  1092. package/dist/api/resources/stt/types/TranscriptionWord.d.ts +0 -11
  1093. package/dist/api/resources/stt/types/TranscriptionWord.js +0 -5
  1094. package/dist/api/resources/stt/types/index.d.ts +0 -9
  1095. package/dist/api/resources/stt/types/index.js +0 -25
  1096. package/dist/api/resources/tts/client/Client.d.ts +0 -39
  1097. package/dist/api/resources/tts/client/Client.js +0 -162
  1098. package/dist/api/resources/tts/client/index.d.ts +0 -1
  1099. package/dist/api/resources/tts/client/index.js +0 -2
  1100. package/dist/api/resources/tts/index.d.ts +0 -2
  1101. package/dist/api/resources/tts/index.js +0 -18
  1102. package/dist/api/resources/tts/types/CancelContextRequest.d.ts +0 -10
  1103. package/dist/api/resources/tts/types/CancelContextRequest.js +0 -5
  1104. package/dist/api/resources/tts/types/ContextId.d.ts +0 -9
  1105. package/dist/api/resources/tts/types/ContextId.js +0 -5
  1106. package/dist/api/resources/tts/types/Controls.d.ts +0 -8
  1107. package/dist/api/resources/tts/types/Controls.js +0 -5
  1108. package/dist/api/resources/tts/types/Emotion.d.ts +0 -7
  1109. package/dist/api/resources/tts/types/Emotion.js +0 -5
  1110. package/dist/api/resources/tts/types/EmotionDeprecated.d.ts +0 -38
  1111. package/dist/api/resources/tts/types/EmotionDeprecated.js +0 -33
  1112. package/dist/api/resources/tts/types/FlushId.d.ts +0 -9
  1113. package/dist/api/resources/tts/types/FlushId.js +0 -5
  1114. package/dist/api/resources/tts/types/GenerationConfig.d.ts +0 -15
  1115. package/dist/api/resources/tts/types/GenerationConfig.js +0 -5
  1116. package/dist/api/resources/tts/types/GenerationRequest.d.ts +0 -42
  1117. package/dist/api/resources/tts/types/GenerationRequest.js +0 -5
  1118. package/dist/api/resources/tts/types/ModelSpeed.d.ts +0 -16
  1119. package/dist/api/resources/tts/types/ModelSpeed.js +0 -11
  1120. package/dist/api/resources/tts/types/Mp3OutputFormat.d.ts +0 -9
  1121. package/dist/api/resources/tts/types/Mp3OutputFormat.js +0 -5
  1122. package/dist/api/resources/tts/types/NaturalSpecifier.d.ts +0 -11
  1123. package/dist/api/resources/tts/types/NaturalSpecifier.js +0 -13
  1124. package/dist/api/resources/tts/types/NumericalSpecifier.d.ts +0 -4
  1125. package/dist/api/resources/tts/types/NumericalSpecifier.js +0 -5
  1126. package/dist/api/resources/tts/types/OutputFormat.d.ts +0 -16
  1127. package/dist/api/resources/tts/types/OutputFormat.js +0 -5
  1128. package/dist/api/resources/tts/types/PhonemeTimestamps.d.ts +0 -8
  1129. package/dist/api/resources/tts/types/PhonemeTimestamps.js +0 -5
  1130. package/dist/api/resources/tts/types/RawEncoding.d.ts +0 -10
  1131. package/dist/api/resources/tts/types/RawEncoding.js +0 -12
  1132. package/dist/api/resources/tts/types/RawOutputFormat.d.ts +0 -10
  1133. package/dist/api/resources/tts/types/RawOutputFormat.js +0 -5
  1134. package/dist/api/resources/tts/types/Speed.d.ts +0 -10
  1135. package/dist/api/resources/tts/types/Speed.js +0 -5
  1136. package/dist/api/resources/tts/types/SseOutputFormat.d.ts +0 -10
  1137. package/dist/api/resources/tts/types/SseOutputFormat.js +0 -5
  1138. package/dist/api/resources/tts/types/SupportedLanguage.d.ts +0 -26
  1139. package/dist/api/resources/tts/types/SupportedLanguage.js +0 -23
  1140. package/dist/api/resources/tts/types/TtsRequest.d.ts +0 -19
  1141. package/dist/api/resources/tts/types/TtsRequest.js +0 -5
  1142. package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +0 -9
  1143. package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +0 -5
  1144. package/dist/api/resources/tts/types/TtsRequestIdSpecifier.d.ts +0 -9
  1145. package/dist/api/resources/tts/types/TtsRequestIdSpecifier.js +0 -5
  1146. package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +0 -5
  1147. package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.js +0 -5
  1148. package/dist/api/resources/tts/types/TtssseRequest.d.ts +0 -27
  1149. package/dist/api/resources/tts/types/TtssseRequest.js +0 -5
  1150. package/dist/api/resources/tts/types/WavOutputFormat.d.ts +0 -6
  1151. package/dist/api/resources/tts/types/WavOutputFormat.js +0 -5
  1152. package/dist/api/resources/tts/types/WebSocketBaseResponse.d.ts +0 -9
  1153. package/dist/api/resources/tts/types/WebSocketBaseResponse.js +0 -5
  1154. package/dist/api/resources/tts/types/WebSocketChunkResponse.d.ts +0 -8
  1155. package/dist/api/resources/tts/types/WebSocketChunkResponse.js +0 -5
  1156. package/dist/api/resources/tts/types/WebSocketDoneResponse.d.ts +0 -6
  1157. package/dist/api/resources/tts/types/WebSocketDoneResponse.js +0 -5
  1158. package/dist/api/resources/tts/types/WebSocketErrorResponse.d.ts +0 -7
  1159. package/dist/api/resources/tts/types/WebSocketErrorResponse.js +0 -5
  1160. package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +0 -8
  1161. package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.js +0 -5
  1162. package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +0 -7
  1163. package/dist/api/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +0 -5
  1164. package/dist/api/resources/tts/types/WebSocketRawOutputFormat.d.ts +0 -10
  1165. package/dist/api/resources/tts/types/WebSocketRawOutputFormat.js +0 -5
  1166. package/dist/api/resources/tts/types/WebSocketRequest.d.ts +0 -11
  1167. package/dist/api/resources/tts/types/WebSocketRequest.js +0 -5
  1168. package/dist/api/resources/tts/types/WebSocketResponse.d.ts +0 -25
  1169. package/dist/api/resources/tts/types/WebSocketResponse.js +0 -5
  1170. package/dist/api/resources/tts/types/WebSocketStreamOptions.d.ts +0 -6
  1171. package/dist/api/resources/tts/types/WebSocketStreamOptions.js +0 -5
  1172. package/dist/api/resources/tts/types/WebSocketTimestampsResponse.d.ts +0 -7
  1173. package/dist/api/resources/tts/types/WebSocketTimestampsResponse.js +0 -5
  1174. package/dist/api/resources/tts/types/WebSocketTtsOutput.d.ts +0 -12
  1175. package/dist/api/resources/tts/types/WebSocketTtsOutput.js +0 -5
  1176. package/dist/api/resources/tts/types/WebSocketTtsRequest.d.ts +0 -23
  1177. package/dist/api/resources/tts/types/WebSocketTtsRequest.js +0 -5
  1178. package/dist/api/resources/tts/types/WordTimestamps.d.ts +0 -8
  1179. package/dist/api/resources/tts/types/WordTimestamps.js +0 -5
  1180. package/dist/api/resources/tts/types/index.d.ts +0 -39
  1181. package/dist/api/resources/tts/types/index.js +0 -55
  1182. package/dist/api/resources/voiceChanger/client/Client.d.ts +0 -46
  1183. package/dist/api/resources/voiceChanger/client/Client.js +0 -195
  1184. package/dist/api/resources/voiceChanger/client/index.d.ts +0 -1
  1185. package/dist/api/resources/voiceChanger/client/index.js +0 -17
  1186. package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.d.ts +0 -39
  1187. package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +0 -5
  1188. package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.d.ts +0 -39
  1189. package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +0 -5
  1190. package/dist/api/resources/voiceChanger/client/requests/index.d.ts +0 -2
  1191. package/dist/api/resources/voiceChanger/client/requests/index.js +0 -2
  1192. package/dist/api/resources/voiceChanger/index.d.ts +0 -2
  1193. package/dist/api/resources/voiceChanger/index.js +0 -18
  1194. package/dist/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +0 -9
  1195. package/dist/api/resources/voiceChanger/types/OutputFormatContainer.js +0 -11
  1196. package/dist/api/resources/voiceChanger/types/StreamingResponse.d.ts +0 -16
  1197. package/dist/api/resources/voiceChanger/types/StreamingResponse.js +0 -5
  1198. package/dist/api/resources/voiceChanger/types/index.d.ts +0 -2
  1199. package/dist/api/resources/voiceChanger/types/index.js +0 -18
  1200. package/dist/api/resources/voices/client/Client.d.ts +0 -150
  1201. package/dist/api/resources/voices/client/Client.js +0 -530
  1202. package/dist/api/resources/voices/client/index.d.ts +0 -1
  1203. package/dist/api/resources/voices/client/index.js +0 -17
  1204. package/dist/api/resources/voices/client/requests/CloneVoiceRequest.d.ts +0 -35
  1205. package/dist/api/resources/voices/client/requests/CloneVoiceRequest.js +0 -5
  1206. package/dist/api/resources/voices/client/requests/index.d.ts +0 -1
  1207. package/dist/api/resources/voices/client/requests/index.js +0 -2
  1208. package/dist/api/resources/voices/index.d.ts +0 -2
  1209. package/dist/api/resources/voices/index.js +0 -18
  1210. package/dist/api/resources/voices/types/BaseVoiceId.d.ts +0 -8
  1211. package/dist/api/resources/voices/types/BaseVoiceId.js +0 -5
  1212. package/dist/api/resources/voices/types/CloneMode.d.ts +0 -8
  1213. package/dist/api/resources/voices/types/CloneMode.js +0 -10
  1214. package/dist/api/resources/voices/types/CreateVoiceRequest.d.ts +0 -13
  1215. package/dist/api/resources/voices/types/CreateVoiceRequest.js +0 -5
  1216. package/dist/api/resources/voices/types/EmbeddingResponse.d.ts +0 -7
  1217. package/dist/api/resources/voices/types/EmbeddingResponse.js +0 -5
  1218. package/dist/api/resources/voices/types/EmbeddingSpecifier.d.ts +0 -8
  1219. package/dist/api/resources/voices/types/EmbeddingSpecifier.js +0 -5
  1220. package/dist/api/resources/voices/types/Gender.d.ts +0 -8
  1221. package/dist/api/resources/voices/types/Gender.js +0 -10
  1222. package/dist/api/resources/voices/types/IdSpecifier.d.ts +0 -8
  1223. package/dist/api/resources/voices/types/IdSpecifier.js +0 -5
  1224. package/dist/api/resources/voices/types/LocalizeDialect.d.ts +0 -20
  1225. package/dist/api/resources/voices/types/LocalizeDialect.js +0 -5
  1226. package/dist/api/resources/voices/types/LocalizeEnglishDialect.d.ts +0 -11
  1227. package/dist/api/resources/voices/types/LocalizeEnglishDialect.js +0 -13
  1228. package/dist/api/resources/voices/types/LocalizeFrenchDialect.d.ts +0 -8
  1229. package/dist/api/resources/voices/types/LocalizeFrenchDialect.js +0 -10
  1230. package/dist/api/resources/voices/types/LocalizePortugueseDialect.d.ts +0 -8
  1231. package/dist/api/resources/voices/types/LocalizePortugueseDialect.js +0 -10
  1232. package/dist/api/resources/voices/types/LocalizeSpanishDialect.d.ts +0 -8
  1233. package/dist/api/resources/voices/types/LocalizeSpanishDialect.js +0 -10
  1234. package/dist/api/resources/voices/types/LocalizeTargetLanguage.d.ts +0 -26
  1235. package/dist/api/resources/voices/types/LocalizeTargetLanguage.js +0 -23
  1236. package/dist/api/resources/voices/types/LocalizeVoiceRequest.d.ts +0 -15
  1237. package/dist/api/resources/voices/types/LocalizeVoiceRequest.js +0 -5
  1238. package/dist/api/resources/voices/types/MixVoiceSpecifier.d.ts +0 -5
  1239. package/dist/api/resources/voices/types/MixVoiceSpecifier.js +0 -5
  1240. package/dist/api/resources/voices/types/MixVoicesRequest.d.ts +0 -7
  1241. package/dist/api/resources/voices/types/MixVoicesRequest.js +0 -5
  1242. package/dist/api/resources/voices/types/UpdateVoiceRequest.d.ts +0 -9
  1243. package/dist/api/resources/voices/types/UpdateVoiceRequest.js +0 -5
  1244. package/dist/api/resources/voices/types/Voice.d.ts +0 -19
  1245. package/dist/api/resources/voices/types/Voice.js +0 -5
  1246. package/dist/api/resources/voices/types/VoiceId.d.ts +0 -7
  1247. package/dist/api/resources/voices/types/VoiceId.js +0 -5
  1248. package/dist/api/resources/voices/types/VoiceMetadata.d.ts +0 -18
  1249. package/dist/api/resources/voices/types/VoiceMetadata.js +0 -5
  1250. package/dist/api/resources/voices/types/Weight.d.ts +0 -7
  1251. package/dist/api/resources/voices/types/Weight.js +0 -5
  1252. package/dist/api/resources/voices/types/index.d.ts +0 -21
  1253. package/dist/api/resources/voices/types/index.js +0 -37
  1254. package/dist/core/fetcher/APIResponse.d.ts +0 -10
  1255. package/dist/core/fetcher/APIResponse.js +0 -2
  1256. package/dist/core/fetcher/Fetcher.d.ts +0 -39
  1257. package/dist/core/fetcher/Fetcher.js +0 -100
  1258. package/dist/core/fetcher/Supplier.d.ts +0 -4
  1259. package/dist/core/fetcher/Supplier.js +0 -22
  1260. package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
  1261. package/dist/core/fetcher/createRequestUrl.js +0 -12
  1262. package/dist/core/fetcher/getFetchFn.d.ts +0 -4
  1263. package/dist/core/fetcher/getFetchFn.js +0 -68
  1264. package/dist/core/fetcher/getHeader.d.ts +0 -1
  1265. package/dist/core/fetcher/getHeader.js +0 -11
  1266. package/dist/core/fetcher/getRequestBody.d.ts +0 -7
  1267. package/dist/core/fetcher/getRequestBody.js +0 -23
  1268. package/dist/core/fetcher/getResponseBody.d.ts +0 -1
  1269. package/dist/core/fetcher/getResponseBody.js +0 -54
  1270. package/dist/core/fetcher/index.d.ts +0 -5
  1271. package/dist/core/fetcher/index.js +0 -9
  1272. package/dist/core/fetcher/makeRequest.d.ts +0 -1
  1273. package/dist/core/fetcher/makeRequest.js +0 -42
  1274. package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
  1275. package/dist/core/fetcher/requestWithRetries.js +0 -40
  1276. package/dist/core/fetcher/signals.d.ts +0 -11
  1277. package/dist/core/fetcher/signals.js +0 -36
  1278. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  1279. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  1280. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  1281. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  1282. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  1283. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  1284. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  1285. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  1286. package/dist/core/form-data-utils/FormDataWrapper.d.ts +0 -60
  1287. package/dist/core/form-data-utils/FormDataWrapper.js +0 -184
  1288. package/dist/core/form-data-utils/index.d.ts +0 -1
  1289. package/dist/core/form-data-utils/index.js +0 -17
  1290. package/dist/core/index.d.ts +0 -5
  1291. package/dist/core/index.js +0 -44
  1292. package/dist/core/json.d.ts +0 -15
  1293. package/dist/core/json.js +0 -24
  1294. package/dist/core/runtime/index.d.ts +0 -1
  1295. package/dist/core/runtime/index.js +0 -5
  1296. package/dist/core/runtime/runtime.d.ts +0 -9
  1297. package/dist/core/runtime/runtime.js +0 -103
  1298. package/dist/core/schemas/Schema.d.ts +0 -87
  1299. package/dist/core/schemas/Schema.js +0 -24
  1300. package/dist/core/schemas/builders/bigint/bigint.d.ts +0 -2
  1301. package/dist/core/schemas/builders/bigint/bigint.js +0 -53
  1302. package/dist/core/schemas/builders/bigint/index.d.ts +0 -1
  1303. package/dist/core/schemas/builders/bigint/index.js +0 -5
  1304. package/dist/core/schemas/builders/date/date.d.ts +0 -2
  1305. package/dist/core/schemas/builders/date/date.js +0 -62
  1306. package/dist/core/schemas/builders/date/index.d.ts +0 -1
  1307. package/dist/core/schemas/builders/date/index.js +0 -5
  1308. package/dist/core/schemas/builders/enum/enum.d.ts +0 -2
  1309. package/dist/core/schemas/builders/enum/enum.js +0 -38
  1310. package/dist/core/schemas/builders/enum/index.d.ts +0 -1
  1311. package/dist/core/schemas/builders/enum/index.js +0 -5
  1312. package/dist/core/schemas/builders/index.d.ts +0 -14
  1313. package/dist/core/schemas/builders/index.js +0 -30
  1314. package/dist/core/schemas/builders/lazy/index.d.ts +0 -3
  1315. package/dist/core/schemas/builders/lazy/index.js +0 -7
  1316. package/dist/core/schemas/builders/lazy/lazy.d.ts +0 -5
  1317. package/dist/core/schemas/builders/lazy/lazy.js +0 -24
  1318. package/dist/core/schemas/builders/lazy/lazyObject.d.ts +0 -3
  1319. package/dist/core/schemas/builders/lazy/lazyObject.js +0 -11
  1320. package/dist/core/schemas/builders/list/index.d.ts +0 -1
  1321. package/dist/core/schemas/builders/list/index.js +0 -5
  1322. package/dist/core/schemas/builders/list/list.d.ts +0 -2
  1323. package/dist/core/schemas/builders/list/list.js +0 -54
  1324. package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +0 -2
  1325. package/dist/core/schemas/builders/literals/booleanLiteral.js +0 -28
  1326. package/dist/core/schemas/builders/literals/index.d.ts +0 -2
  1327. package/dist/core/schemas/builders/literals/index.js +0 -7
  1328. package/dist/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
  1329. package/dist/core/schemas/builders/literals/stringLiteral.js +0 -28
  1330. package/dist/core/schemas/builders/object/index.d.ts +0 -6
  1331. package/dist/core/schemas/builders/object/index.js +0 -11
  1332. package/dist/core/schemas/builders/object/object.d.ts +0 -3
  1333. package/dist/core/schemas/builders/object/object.js +0 -261
  1334. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +0 -6
  1335. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +0 -7
  1336. package/dist/core/schemas/builders/object/property.d.ts +0 -8
  1337. package/dist/core/schemas/builders/object/property.js +0 -15
  1338. package/dist/core/schemas/builders/object/types.d.ts +0 -31
  1339. package/dist/core/schemas/builders/object/types.js +0 -2
  1340. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -9
  1341. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +0 -53
  1342. package/dist/core/schemas/builders/object-like/index.d.ts +0 -2
  1343. package/dist/core/schemas/builders/object-like/index.js +0 -6
  1344. package/dist/core/schemas/builders/object-like/types.d.ts +0 -7
  1345. package/dist/core/schemas/builders/object-like/types.js +0 -2
  1346. package/dist/core/schemas/builders/primitives/any.d.ts +0 -1
  1347. package/dist/core/schemas/builders/primitives/any.js +0 -6
  1348. package/dist/core/schemas/builders/primitives/boolean.d.ts +0 -1
  1349. package/dist/core/schemas/builders/primitives/boolean.js +0 -25
  1350. package/dist/core/schemas/builders/primitives/index.d.ts +0 -5
  1351. package/dist/core/schemas/builders/primitives/index.js +0 -13
  1352. package/dist/core/schemas/builders/primitives/number.d.ts +0 -1
  1353. package/dist/core/schemas/builders/primitives/number.js +0 -25
  1354. package/dist/core/schemas/builders/primitives/string.d.ts +0 -1
  1355. package/dist/core/schemas/builders/primitives/string.js +0 -25
  1356. package/dist/core/schemas/builders/primitives/unknown.d.ts +0 -1
  1357. package/dist/core/schemas/builders/primitives/unknown.js +0 -6
  1358. package/dist/core/schemas/builders/record/index.d.ts +0 -2
  1359. package/dist/core/schemas/builders/record/index.js +0 -5
  1360. package/dist/core/schemas/builders/record/record.d.ts +0 -3
  1361. package/dist/core/schemas/builders/record/record.js +0 -93
  1362. package/dist/core/schemas/builders/record/types.d.ts +0 -4
  1363. package/dist/core/schemas/builders/record/types.js +0 -2
  1364. package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +0 -5
  1365. package/dist/core/schemas/builders/schema-utils/JsonError.js +0 -12
  1366. package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +0 -5
  1367. package/dist/core/schemas/builders/schema-utils/ParseError.js +0 -12
  1368. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -21
  1369. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +0 -145
  1370. package/dist/core/schemas/builders/schema-utils/index.d.ts +0 -4
  1371. package/dist/core/schemas/builders/schema-utils/index.js +0 -11
  1372. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +0 -2
  1373. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +0 -9
  1374. package/dist/core/schemas/builders/set/index.d.ts +0 -1
  1375. package/dist/core/schemas/builders/set/index.js +0 -5
  1376. package/dist/core/schemas/builders/set/set.d.ts +0 -2
  1377. package/dist/core/schemas/builders/set/set.js +0 -43
  1378. package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +0 -2
  1379. package/dist/core/schemas/builders/undiscriminated-union/index.js +0 -5
  1380. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +0 -4
  1381. package/dist/core/schemas/builders/undiscriminated-union/types.js +0 -2
  1382. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +0 -3
  1383. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +0 -39
  1384. package/dist/core/schemas/builders/union/discriminant.d.ts +0 -5
  1385. package/dist/core/schemas/builders/union/discriminant.js +0 -9
  1386. package/dist/core/schemas/builders/union/index.d.ts +0 -4
  1387. package/dist/core/schemas/builders/union/index.js +0 -7
  1388. package/dist/core/schemas/builders/union/types.d.ts +0 -13
  1389. package/dist/core/schemas/builders/union/types.js +0 -2
  1390. package/dist/core/schemas/builders/union/union.d.ts +0 -4
  1391. package/dist/core/schemas/builders/union/union.js +0 -129
  1392. package/dist/core/schemas/index.d.ts +0 -2
  1393. package/dist/core/schemas/index.js +0 -17
  1394. package/dist/core/schemas/utils/MaybePromise.d.ts +0 -1
  1395. package/dist/core/schemas/utils/MaybePromise.js +0 -2
  1396. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -7
  1397. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +0 -2
  1398. package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +0 -2
  1399. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +0 -15
  1400. package/dist/core/schemas/utils/entries.d.ts +0 -1
  1401. package/dist/core/schemas/utils/entries.js +0 -6
  1402. package/dist/core/schemas/utils/filterObject.d.ts +0 -1
  1403. package/dist/core/schemas/utils/filterObject.js +0 -13
  1404. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +0 -1
  1405. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +0 -27
  1406. package/dist/core/schemas/utils/isPlainObject.d.ts +0 -1
  1407. package/dist/core/schemas/utils/isPlainObject.js +0 -17
  1408. package/dist/core/schemas/utils/keys.d.ts +0 -1
  1409. package/dist/core/schemas/utils/keys.js +0 -6
  1410. package/dist/core/schemas/utils/maybeSkipValidation.d.ts +0 -2
  1411. package/dist/core/schemas/utils/maybeSkipValidation.js +0 -27
  1412. package/dist/core/schemas/utils/partition.d.ts +0 -1
  1413. package/dist/core/schemas/utils/partition.js +0 -15
  1414. package/dist/core/streaming-fetcher/Stream.d.ts +0 -47
  1415. package/dist/core/streaming-fetcher/Stream.js +0 -169
  1416. package/dist/core/streaming-fetcher/index.d.ts +0 -1
  1417. package/dist/core/streaming-fetcher/index.js +0 -5
  1418. package/dist/core/websocket/events.d.ts +0 -36
  1419. package/dist/core/websocket/events.js +0 -27
  1420. package/dist/core/websocket/index.d.ts +0 -1
  1421. package/dist/core/websocket/index.js +0 -17
  1422. package/dist/core/websocket/ws.d.ts +0 -137
  1423. package/dist/core/websocket/ws.js +0 -448
  1424. package/dist/environments.d.ts +0 -7
  1425. package/dist/environments.js +0 -9
  1426. package/dist/errors/CartesiaError.d.ts +0 -12
  1427. package/dist/errors/CartesiaError.js +0 -33
  1428. package/dist/errors/CartesiaTimeoutError.d.ts +0 -6
  1429. package/dist/errors/CartesiaTimeoutError.js +0 -13
  1430. package/dist/errors/index.d.ts +0 -2
  1431. package/dist/errors/index.js +0 -7
  1432. package/dist/index.d.ts +0 -7
  1433. package/dist/index.js +0 -53
  1434. package/dist/serialization/index.d.ts +0 -1
  1435. package/dist/serialization/index.js +0 -17
  1436. package/dist/serialization/resources/apiStatus/index.d.ts +0 -1
  1437. package/dist/serialization/resources/apiStatus/index.js +0 -17
  1438. package/dist/serialization/resources/apiStatus/types/ApiInfo.d.ts +0 -13
  1439. package/dist/serialization/resources/apiStatus/types/ApiInfo.js +0 -44
  1440. package/dist/serialization/resources/apiStatus/types/index.d.ts +0 -1
  1441. package/dist/serialization/resources/apiStatus/types/index.js +0 -17
  1442. package/dist/serialization/resources/auth/index.d.ts +0 -1
  1443. package/dist/serialization/resources/auth/index.js +0 -17
  1444. package/dist/serialization/resources/auth/types/TokenGrant.d.ts +0 -13
  1445. package/dist/serialization/resources/auth/types/TokenGrant.js +0 -44
  1446. package/dist/serialization/resources/auth/types/TokenRequest.d.ts +0 -14
  1447. package/dist/serialization/resources/auth/types/TokenRequest.js +0 -45
  1448. package/dist/serialization/resources/auth/types/TokenResponse.d.ts +0 -12
  1449. package/dist/serialization/resources/auth/types/TokenResponse.js +0 -43
  1450. package/dist/serialization/resources/auth/types/index.d.ts +0 -3
  1451. package/dist/serialization/resources/auth/types/index.js +0 -19
  1452. package/dist/serialization/resources/embedding/index.d.ts +0 -1
  1453. package/dist/serialization/resources/embedding/index.js +0 -17
  1454. package/dist/serialization/resources/embedding/types/Embedding.d.ts +0 -10
  1455. package/dist/serialization/resources/embedding/types/Embedding.js +0 -41
  1456. package/dist/serialization/resources/embedding/types/index.d.ts +0 -1
  1457. package/dist/serialization/resources/embedding/types/index.js +0 -17
  1458. package/dist/serialization/resources/index.d.ts +0 -14
  1459. package/dist/serialization/resources/index.js +0 -53
  1460. package/dist/serialization/resources/stt/index.d.ts +0 -1
  1461. package/dist/serialization/resources/stt/index.js +0 -17
  1462. package/dist/serialization/resources/stt/types/DoneMessage.d.ts +0 -12
  1463. package/dist/serialization/resources/stt/types/DoneMessage.js +0 -43
  1464. package/dist/serialization/resources/stt/types/ErrorMessage.d.ts +0 -13
  1465. package/dist/serialization/resources/stt/types/ErrorMessage.js +0 -44
  1466. package/dist/serialization/resources/stt/types/FlushDoneMessage.d.ts +0 -12
  1467. package/dist/serialization/resources/stt/types/FlushDoneMessage.js +0 -43
  1468. package/dist/serialization/resources/stt/types/StreamingTranscriptionResponse.d.ts +0 -26
  1469. package/dist/serialization/resources/stt/types/StreamingTranscriptionResponse.js +0 -55
  1470. package/dist/serialization/resources/stt/types/SttEncoding.d.ts +0 -10
  1471. package/dist/serialization/resources/stt/types/SttEncoding.js +0 -41
  1472. package/dist/serialization/resources/stt/types/TimestampGranularity.d.ts +0 -10
  1473. package/dist/serialization/resources/stt/types/TimestampGranularity.js +0 -41
  1474. package/dist/serialization/resources/stt/types/TranscriptMessage.d.ts +0 -18
  1475. package/dist/serialization/resources/stt/types/TranscriptMessage.js +0 -49
  1476. package/dist/serialization/resources/stt/types/TranscriptionResponse.d.ts +0 -16
  1477. package/dist/serialization/resources/stt/types/TranscriptionResponse.js +0 -47
  1478. package/dist/serialization/resources/stt/types/TranscriptionWord.d.ts +0 -14
  1479. package/dist/serialization/resources/stt/types/TranscriptionWord.js +0 -45
  1480. package/dist/serialization/resources/stt/types/index.d.ts +0 -9
  1481. package/dist/serialization/resources/stt/types/index.js +0 -25
  1482. package/dist/serialization/resources/tts/index.d.ts +0 -1
  1483. package/dist/serialization/resources/tts/index.js +0 -17
  1484. package/dist/serialization/resources/tts/types/CancelContextRequest.d.ts +0 -14
  1485. package/dist/serialization/resources/tts/types/CancelContextRequest.js +0 -45
  1486. package/dist/serialization/resources/tts/types/ContextId.d.ts +0 -10
  1487. package/dist/serialization/resources/tts/types/ContextId.js +0 -41
  1488. package/dist/serialization/resources/tts/types/Controls.d.ts +0 -15
  1489. package/dist/serialization/resources/tts/types/Controls.js +0 -46
  1490. package/dist/serialization/resources/tts/types/Emotion.d.ts +0 -10
  1491. package/dist/serialization/resources/tts/types/Emotion.js +0 -41
  1492. package/dist/serialization/resources/tts/types/EmotionDeprecated.d.ts +0 -10
  1493. package/dist/serialization/resources/tts/types/EmotionDeprecated.js +0 -67
  1494. package/dist/serialization/resources/tts/types/FlushId.d.ts +0 -10
  1495. package/dist/serialization/resources/tts/types/FlushId.js +0 -41
  1496. package/dist/serialization/resources/tts/types/GenerationConfig.d.ts +0 -15
  1497. package/dist/serialization/resources/tts/types/GenerationConfig.js +0 -46
  1498. package/dist/serialization/resources/tts/types/GenerationRequest.d.ts +0 -32
  1499. package/dist/serialization/resources/tts/types/GenerationRequest.js +0 -63
  1500. package/dist/serialization/resources/tts/types/ModelSpeed.d.ts +0 -10
  1501. package/dist/serialization/resources/tts/types/ModelSpeed.js +0 -41
  1502. package/dist/serialization/resources/tts/types/Mp3OutputFormat.d.ts +0 -13
  1503. package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +0 -44
  1504. package/dist/serialization/resources/tts/types/NaturalSpecifier.d.ts +0 -10
  1505. package/dist/serialization/resources/tts/types/NaturalSpecifier.js +0 -41
  1506. package/dist/serialization/resources/tts/types/NumericalSpecifier.d.ts +0 -10
  1507. package/dist/serialization/resources/tts/types/NumericalSpecifier.js +0 -41
  1508. package/dist/serialization/resources/tts/types/OutputFormat.d.ts +0 -22
  1509. package/dist/serialization/resources/tts/types/OutputFormat.js +0 -53
  1510. package/dist/serialization/resources/tts/types/PhonemeTimestamps.d.ts +0 -14
  1511. package/dist/serialization/resources/tts/types/PhonemeTimestamps.js +0 -45
  1512. package/dist/serialization/resources/tts/types/RawEncoding.d.ts +0 -10
  1513. package/dist/serialization/resources/tts/types/RawEncoding.js +0 -41
  1514. package/dist/serialization/resources/tts/types/RawOutputFormat.d.ts +0 -15
  1515. package/dist/serialization/resources/tts/types/RawOutputFormat.js +0 -46
  1516. package/dist/serialization/resources/tts/types/Speed.d.ts +0 -12
  1517. package/dist/serialization/resources/tts/types/Speed.js +0 -43
  1518. package/dist/serialization/resources/tts/types/SseOutputFormat.d.ts +0 -15
  1519. package/dist/serialization/resources/tts/types/SseOutputFormat.js +0 -46
  1520. package/dist/serialization/resources/tts/types/SupportedLanguage.d.ts +0 -10
  1521. package/dist/serialization/resources/tts/types/SupportedLanguage.js +0 -57
  1522. package/dist/serialization/resources/tts/types/TtsRequest.d.ts +0 -24
  1523. package/dist/serialization/resources/tts/types/TtsRequest.js +0 -55
  1524. package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +0 -16
  1525. package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +0 -47
  1526. package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.d.ts +0 -16
  1527. package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +0 -47
  1528. package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +0 -12
  1529. package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +0 -43
  1530. package/dist/serialization/resources/tts/types/TtssseRequest.d.ts +0 -29
  1531. package/dist/serialization/resources/tts/types/TtssseRequest.js +0 -60
  1532. package/dist/serialization/resources/tts/types/WavOutputFormat.d.ts +0 -12
  1533. package/dist/serialization/resources/tts/types/WavOutputFormat.js +0 -42
  1534. package/dist/serialization/resources/tts/types/WebSocketBaseResponse.d.ts +0 -15
  1535. package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +0 -46
  1536. package/dist/serialization/resources/tts/types/WebSocketChunkResponse.d.ts +0 -14
  1537. package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +0 -47
  1538. package/dist/serialization/resources/tts/types/WebSocketDoneResponse.d.ts +0 -12
  1539. package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +0 -42
  1540. package/dist/serialization/resources/tts/types/WebSocketErrorResponse.d.ts +0 -13
  1541. package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +0 -46
  1542. package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +0 -15
  1543. package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +0 -48
  1544. package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +0 -14
  1545. package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +0 -47
  1546. package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.d.ts +0 -15
  1547. package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +0 -46
  1548. package/dist/serialization/resources/tts/types/WebSocketRequest.d.ts +0 -12
  1549. package/dist/serialization/resources/tts/types/WebSocketRequest.js +0 -43
  1550. package/dist/serialization/resources/tts/types/WebSocketResponse.d.ts +0 -34
  1551. package/dist/serialization/resources/tts/types/WebSocketResponse.js +0 -59
  1552. package/dist/serialization/resources/tts/types/WebSocketStreamOptions.d.ts +0 -12
  1553. package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +0 -43
  1554. package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.d.ts +0 -14
  1555. package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +0 -47
  1556. package/dist/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +0 -21
  1557. package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +0 -52
  1558. package/dist/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +0 -29
  1559. package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +0 -60
  1560. package/dist/serialization/resources/tts/types/WordTimestamps.d.ts +0 -14
  1561. package/dist/serialization/resources/tts/types/WordTimestamps.js +0 -45
  1562. package/dist/serialization/resources/tts/types/index.d.ts +0 -39
  1563. package/dist/serialization/resources/tts/types/index.js +0 -55
  1564. package/dist/serialization/resources/voiceChanger/index.d.ts +0 -1
  1565. package/dist/serialization/resources/voiceChanger/index.js +0 -17
  1566. package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.d.ts +0 -10
  1567. package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +0 -41
  1568. package/dist/serialization/resources/voiceChanger/types/StreamingResponse.d.ts +0 -22
  1569. package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +0 -53
  1570. package/dist/serialization/resources/voiceChanger/types/index.d.ts +0 -2
  1571. package/dist/serialization/resources/voiceChanger/types/index.js +0 -18
  1572. package/dist/serialization/resources/voices/client/index.d.ts +0 -1
  1573. package/dist/serialization/resources/voices/client/index.js +0 -37
  1574. package/dist/serialization/resources/voices/client/list.d.ts +0 -11
  1575. package/dist/serialization/resources/voices/client/list.js +0 -42
  1576. package/dist/serialization/resources/voices/index.d.ts +0 -2
  1577. package/dist/serialization/resources/voices/index.js +0 -18
  1578. package/dist/serialization/resources/voices/types/BaseVoiceId.d.ts +0 -11
  1579. package/dist/serialization/resources/voices/types/BaseVoiceId.js +0 -8
  1580. package/dist/serialization/resources/voices/types/CloneMode.d.ts +0 -10
  1581. package/dist/serialization/resources/voices/types/CloneMode.js +0 -41
  1582. package/dist/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -19
  1583. package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +0 -50
  1584. package/dist/serialization/resources/voices/types/EmbeddingResponse.d.ts +0 -13
  1585. package/dist/serialization/resources/voices/types/EmbeddingResponse.js +0 -44
  1586. package/dist/serialization/resources/voices/types/EmbeddingSpecifier.d.ts +0 -15
  1587. package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +0 -46
  1588. package/dist/serialization/resources/voices/types/Gender.d.ts +0 -10
  1589. package/dist/serialization/resources/voices/types/Gender.js +0 -44
  1590. package/dist/serialization/resources/voices/types/IdSpecifier.d.ts +0 -15
  1591. package/dist/serialization/resources/voices/types/IdSpecifier.js +0 -46
  1592. package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +0 -14
  1593. package/dist/serialization/resources/voices/types/LocalizeDialect.js +0 -50
  1594. package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.d.ts +0 -10
  1595. package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.js +0 -41
  1596. package/dist/serialization/resources/voices/types/LocalizeFrenchDialect.d.ts +0 -10
  1597. package/dist/serialization/resources/voices/types/LocalizeFrenchDialect.js +0 -41
  1598. package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +0 -10
  1599. package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.js +0 -41
  1600. package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +0 -10
  1601. package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.js +0 -41
  1602. package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.d.ts +0 -10
  1603. package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +0 -57
  1604. package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.d.ts +0 -20
  1605. package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +0 -51
  1606. package/dist/serialization/resources/voices/types/MixVoiceSpecifier.d.ts +0 -12
  1607. package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +0 -43
  1608. package/dist/serialization/resources/voices/types/MixVoicesRequest.d.ts +0 -13
  1609. package/dist/serialization/resources/voices/types/MixVoicesRequest.js +0 -44
  1610. package/dist/serialization/resources/voices/types/UpdateVoiceRequest.d.ts +0 -13
  1611. package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +0 -44
  1612. package/dist/serialization/resources/voices/types/Voice.d.ts +0 -22
  1613. package/dist/serialization/resources/voices/types/Voice.js +0 -53
  1614. package/dist/serialization/resources/voices/types/VoiceId.d.ts +0 -10
  1615. package/dist/serialization/resources/voices/types/VoiceId.js +0 -41
  1616. package/dist/serialization/resources/voices/types/VoiceMetadata.d.ts +0 -20
  1617. package/dist/serialization/resources/voices/types/VoiceMetadata.js +0 -51
  1618. package/dist/serialization/resources/voices/types/Weight.d.ts +0 -10
  1619. package/dist/serialization/resources/voices/types/Weight.js +0 -41
  1620. package/dist/serialization/resources/voices/types/index.d.ts +0 -21
  1621. package/dist/serialization/resources/voices/types/index.js +0 -37
  1622. package/dist/version.d.ts +0 -1
  1623. package/dist/version.js +0 -4
  1624. package/dist/wrapper/Client.d.ts +0 -9
  1625. package/dist/wrapper/Client.js +0 -17
  1626. package/dist/wrapper/StreamingSTTClient.d.ts +0 -26
  1627. package/dist/wrapper/StreamingSTTClient.js +0 -140
  1628. package/dist/wrapper/StreamingTTSClient.d.ts +0 -16
  1629. package/dist/wrapper/StreamingTTSClient.js +0 -23
  1630. package/dist/wrapper/SttWebsocket.d.ts +0 -34
  1631. package/dist/wrapper/SttWebsocket.js +0 -219
  1632. package/dist/wrapper/WebPlayer.d.ts +0 -44
  1633. package/dist/wrapper/WebPlayer.js +0 -141
  1634. package/dist/wrapper/Websocket.d.ts +0 -40
  1635. package/dist/wrapper/Websocket.js +0 -243
  1636. package/dist/wrapper/source.d.ts +0 -65
  1637. package/dist/wrapper/source.js +0 -179
  1638. package/dist/wrapper/utils.d.ts +0 -105
  1639. package/dist/wrapper/utils.js +0 -173
  1640. package/environments.d.ts +0 -7
  1641. package/environments.js +0 -9
  1642. package/errors/CartesiaError.d.ts +0 -12
  1643. package/errors/CartesiaError.js +0 -33
  1644. package/errors/CartesiaTimeoutError.d.ts +0 -6
  1645. package/errors/CartesiaTimeoutError.js +0 -13
  1646. package/errors/index.d.ts +0 -2
  1647. package/errors/index.js +0 -7
  1648. package/jest.config.mjs +0 -8
  1649. package/reference.md +0 -1052
  1650. package/scripts/rename-to-esm-files.js +0 -115
  1651. package/serialization/index.d.ts +0 -1
  1652. package/serialization/index.js +0 -17
  1653. package/serialization/resources/apiStatus/index.d.ts +0 -1
  1654. package/serialization/resources/apiStatus/index.js +0 -17
  1655. package/serialization/resources/apiStatus/types/ApiInfo.d.ts +0 -13
  1656. package/serialization/resources/apiStatus/types/ApiInfo.js +0 -44
  1657. package/serialization/resources/apiStatus/types/index.d.ts +0 -1
  1658. package/serialization/resources/apiStatus/types/index.js +0 -17
  1659. package/serialization/resources/auth/index.d.ts +0 -1
  1660. package/serialization/resources/auth/index.js +0 -17
  1661. package/serialization/resources/auth/types/TokenGrant.d.ts +0 -13
  1662. package/serialization/resources/auth/types/TokenGrant.js +0 -44
  1663. package/serialization/resources/auth/types/TokenRequest.d.ts +0 -14
  1664. package/serialization/resources/auth/types/TokenRequest.js +0 -45
  1665. package/serialization/resources/auth/types/TokenResponse.d.ts +0 -12
  1666. package/serialization/resources/auth/types/TokenResponse.js +0 -43
  1667. package/serialization/resources/auth/types/index.d.ts +0 -3
  1668. package/serialization/resources/auth/types/index.js +0 -19
  1669. package/serialization/resources/embedding/index.d.ts +0 -1
  1670. package/serialization/resources/embedding/index.js +0 -17
  1671. package/serialization/resources/embedding/types/Embedding.d.ts +0 -10
  1672. package/serialization/resources/embedding/types/Embedding.js +0 -41
  1673. package/serialization/resources/embedding/types/index.d.ts +0 -1
  1674. package/serialization/resources/embedding/types/index.js +0 -17
  1675. package/serialization/resources/index.d.ts +0 -14
  1676. package/serialization/resources/index.js +0 -53
  1677. package/serialization/resources/stt/index.d.ts +0 -1
  1678. package/serialization/resources/stt/index.js +0 -17
  1679. package/serialization/resources/stt/types/DoneMessage.d.ts +0 -12
  1680. package/serialization/resources/stt/types/DoneMessage.js +0 -43
  1681. package/serialization/resources/stt/types/ErrorMessage.d.ts +0 -13
  1682. package/serialization/resources/stt/types/ErrorMessage.js +0 -44
  1683. package/serialization/resources/stt/types/FlushDoneMessage.d.ts +0 -12
  1684. package/serialization/resources/stt/types/FlushDoneMessage.js +0 -43
  1685. package/serialization/resources/stt/types/StreamingTranscriptionResponse.d.ts +0 -26
  1686. package/serialization/resources/stt/types/StreamingTranscriptionResponse.js +0 -55
  1687. package/serialization/resources/stt/types/SttEncoding.d.ts +0 -10
  1688. package/serialization/resources/stt/types/SttEncoding.js +0 -41
  1689. package/serialization/resources/stt/types/TimestampGranularity.d.ts +0 -10
  1690. package/serialization/resources/stt/types/TimestampGranularity.js +0 -41
  1691. package/serialization/resources/stt/types/TranscriptMessage.d.ts +0 -18
  1692. package/serialization/resources/stt/types/TranscriptMessage.js +0 -49
  1693. package/serialization/resources/stt/types/TranscriptionResponse.d.ts +0 -16
  1694. package/serialization/resources/stt/types/TranscriptionResponse.js +0 -47
  1695. package/serialization/resources/stt/types/TranscriptionWord.d.ts +0 -14
  1696. package/serialization/resources/stt/types/TranscriptionWord.js +0 -45
  1697. package/serialization/resources/stt/types/index.d.ts +0 -9
  1698. package/serialization/resources/stt/types/index.js +0 -25
  1699. package/serialization/resources/tts/index.d.ts +0 -1
  1700. package/serialization/resources/tts/index.js +0 -17
  1701. package/serialization/resources/tts/types/CancelContextRequest.d.ts +0 -14
  1702. package/serialization/resources/tts/types/CancelContextRequest.js +0 -45
  1703. package/serialization/resources/tts/types/ContextId.d.ts +0 -10
  1704. package/serialization/resources/tts/types/ContextId.js +0 -41
  1705. package/serialization/resources/tts/types/Controls.d.ts +0 -15
  1706. package/serialization/resources/tts/types/Controls.js +0 -46
  1707. package/serialization/resources/tts/types/Emotion.d.ts +0 -10
  1708. package/serialization/resources/tts/types/Emotion.js +0 -41
  1709. package/serialization/resources/tts/types/EmotionDeprecated.d.ts +0 -10
  1710. package/serialization/resources/tts/types/EmotionDeprecated.js +0 -67
  1711. package/serialization/resources/tts/types/FlushId.d.ts +0 -10
  1712. package/serialization/resources/tts/types/FlushId.js +0 -41
  1713. package/serialization/resources/tts/types/GenerationConfig.d.ts +0 -15
  1714. package/serialization/resources/tts/types/GenerationConfig.js +0 -46
  1715. package/serialization/resources/tts/types/GenerationRequest.d.ts +0 -32
  1716. package/serialization/resources/tts/types/GenerationRequest.js +0 -63
  1717. package/serialization/resources/tts/types/ModelSpeed.d.ts +0 -10
  1718. package/serialization/resources/tts/types/ModelSpeed.js +0 -41
  1719. package/serialization/resources/tts/types/Mp3OutputFormat.d.ts +0 -13
  1720. package/serialization/resources/tts/types/Mp3OutputFormat.js +0 -44
  1721. package/serialization/resources/tts/types/NaturalSpecifier.d.ts +0 -10
  1722. package/serialization/resources/tts/types/NaturalSpecifier.js +0 -41
  1723. package/serialization/resources/tts/types/NumericalSpecifier.d.ts +0 -10
  1724. package/serialization/resources/tts/types/NumericalSpecifier.js +0 -41
  1725. package/serialization/resources/tts/types/OutputFormat.d.ts +0 -22
  1726. package/serialization/resources/tts/types/OutputFormat.js +0 -53
  1727. package/serialization/resources/tts/types/PhonemeTimestamps.d.ts +0 -14
  1728. package/serialization/resources/tts/types/PhonemeTimestamps.js +0 -45
  1729. package/serialization/resources/tts/types/RawEncoding.d.ts +0 -10
  1730. package/serialization/resources/tts/types/RawEncoding.js +0 -41
  1731. package/serialization/resources/tts/types/RawOutputFormat.d.ts +0 -15
  1732. package/serialization/resources/tts/types/RawOutputFormat.js +0 -46
  1733. package/serialization/resources/tts/types/Speed.d.ts +0 -12
  1734. package/serialization/resources/tts/types/Speed.js +0 -43
  1735. package/serialization/resources/tts/types/SseOutputFormat.d.ts +0 -15
  1736. package/serialization/resources/tts/types/SseOutputFormat.js +0 -46
  1737. package/serialization/resources/tts/types/SupportedLanguage.d.ts +0 -10
  1738. package/serialization/resources/tts/types/SupportedLanguage.js +0 -57
  1739. package/serialization/resources/tts/types/TtsRequest.d.ts +0 -24
  1740. package/serialization/resources/tts/types/TtsRequest.js +0 -55
  1741. package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.d.ts +0 -16
  1742. package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +0 -47
  1743. package/serialization/resources/tts/types/TtsRequestIdSpecifier.d.ts +0 -16
  1744. package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +0 -47
  1745. package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +0 -12
  1746. package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +0 -43
  1747. package/serialization/resources/tts/types/TtssseRequest.d.ts +0 -29
  1748. package/serialization/resources/tts/types/TtssseRequest.js +0 -60
  1749. package/serialization/resources/tts/types/WavOutputFormat.d.ts +0 -12
  1750. package/serialization/resources/tts/types/WavOutputFormat.js +0 -42
  1751. package/serialization/resources/tts/types/WebSocketBaseResponse.d.ts +0 -15
  1752. package/serialization/resources/tts/types/WebSocketBaseResponse.js +0 -46
  1753. package/serialization/resources/tts/types/WebSocketChunkResponse.d.ts +0 -14
  1754. package/serialization/resources/tts/types/WebSocketChunkResponse.js +0 -47
  1755. package/serialization/resources/tts/types/WebSocketDoneResponse.d.ts +0 -12
  1756. package/serialization/resources/tts/types/WebSocketDoneResponse.js +0 -42
  1757. package/serialization/resources/tts/types/WebSocketErrorResponse.d.ts +0 -13
  1758. package/serialization/resources/tts/types/WebSocketErrorResponse.js +0 -46
  1759. package/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +0 -15
  1760. package/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +0 -48
  1761. package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.d.ts +0 -14
  1762. package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +0 -47
  1763. package/serialization/resources/tts/types/WebSocketRawOutputFormat.d.ts +0 -15
  1764. package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +0 -46
  1765. package/serialization/resources/tts/types/WebSocketRequest.d.ts +0 -12
  1766. package/serialization/resources/tts/types/WebSocketRequest.js +0 -43
  1767. package/serialization/resources/tts/types/WebSocketResponse.d.ts +0 -34
  1768. package/serialization/resources/tts/types/WebSocketResponse.js +0 -59
  1769. package/serialization/resources/tts/types/WebSocketStreamOptions.d.ts +0 -12
  1770. package/serialization/resources/tts/types/WebSocketStreamOptions.js +0 -43
  1771. package/serialization/resources/tts/types/WebSocketTimestampsResponse.d.ts +0 -14
  1772. package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +0 -47
  1773. package/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +0 -21
  1774. package/serialization/resources/tts/types/WebSocketTtsOutput.js +0 -52
  1775. package/serialization/resources/tts/types/WebSocketTtsRequest.d.ts +0 -29
  1776. package/serialization/resources/tts/types/WebSocketTtsRequest.js +0 -60
  1777. package/serialization/resources/tts/types/WordTimestamps.d.ts +0 -14
  1778. package/serialization/resources/tts/types/WordTimestamps.js +0 -45
  1779. package/serialization/resources/tts/types/index.d.ts +0 -39
  1780. package/serialization/resources/tts/types/index.js +0 -55
  1781. package/serialization/resources/voiceChanger/index.d.ts +0 -1
  1782. package/serialization/resources/voiceChanger/index.js +0 -17
  1783. package/serialization/resources/voiceChanger/types/OutputFormatContainer.d.ts +0 -10
  1784. package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +0 -41
  1785. package/serialization/resources/voiceChanger/types/StreamingResponse.d.ts +0 -22
  1786. package/serialization/resources/voiceChanger/types/StreamingResponse.js +0 -53
  1787. package/serialization/resources/voiceChanger/types/index.d.ts +0 -2
  1788. package/serialization/resources/voiceChanger/types/index.js +0 -18
  1789. package/serialization/resources/voices/client/index.d.ts +0 -1
  1790. package/serialization/resources/voices/client/index.js +0 -37
  1791. package/serialization/resources/voices/client/list.d.ts +0 -11
  1792. package/serialization/resources/voices/client/list.js +0 -42
  1793. package/serialization/resources/voices/index.d.ts +0 -2
  1794. package/serialization/resources/voices/index.js +0 -18
  1795. package/serialization/resources/voices/types/BaseVoiceId.d.ts +0 -11
  1796. package/serialization/resources/voices/types/BaseVoiceId.js +0 -8
  1797. package/serialization/resources/voices/types/CloneMode.d.ts +0 -10
  1798. package/serialization/resources/voices/types/CloneMode.js +0 -41
  1799. package/serialization/resources/voices/types/CreateVoiceRequest.d.ts +0 -19
  1800. package/serialization/resources/voices/types/CreateVoiceRequest.js +0 -50
  1801. package/serialization/resources/voices/types/EmbeddingResponse.d.ts +0 -13
  1802. package/serialization/resources/voices/types/EmbeddingResponse.js +0 -44
  1803. package/serialization/resources/voices/types/EmbeddingSpecifier.d.ts +0 -15
  1804. package/serialization/resources/voices/types/EmbeddingSpecifier.js +0 -46
  1805. package/serialization/resources/voices/types/Gender.d.ts +0 -10
  1806. package/serialization/resources/voices/types/Gender.js +0 -44
  1807. package/serialization/resources/voices/types/IdSpecifier.d.ts +0 -15
  1808. package/serialization/resources/voices/types/IdSpecifier.js +0 -46
  1809. package/serialization/resources/voices/types/LocalizeDialect.d.ts +0 -14
  1810. package/serialization/resources/voices/types/LocalizeDialect.js +0 -50
  1811. package/serialization/resources/voices/types/LocalizeEnglishDialect.d.ts +0 -10
  1812. package/serialization/resources/voices/types/LocalizeEnglishDialect.js +0 -41
  1813. package/serialization/resources/voices/types/LocalizeFrenchDialect.d.ts +0 -10
  1814. package/serialization/resources/voices/types/LocalizeFrenchDialect.js +0 -41
  1815. package/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +0 -10
  1816. package/serialization/resources/voices/types/LocalizePortugueseDialect.js +0 -41
  1817. package/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +0 -10
  1818. package/serialization/resources/voices/types/LocalizeSpanishDialect.js +0 -41
  1819. package/serialization/resources/voices/types/LocalizeTargetLanguage.d.ts +0 -10
  1820. package/serialization/resources/voices/types/LocalizeTargetLanguage.js +0 -57
  1821. package/serialization/resources/voices/types/LocalizeVoiceRequest.d.ts +0 -20
  1822. package/serialization/resources/voices/types/LocalizeVoiceRequest.js +0 -51
  1823. package/serialization/resources/voices/types/MixVoiceSpecifier.d.ts +0 -12
  1824. package/serialization/resources/voices/types/MixVoiceSpecifier.js +0 -43
  1825. package/serialization/resources/voices/types/MixVoicesRequest.d.ts +0 -13
  1826. package/serialization/resources/voices/types/MixVoicesRequest.js +0 -44
  1827. package/serialization/resources/voices/types/UpdateVoiceRequest.d.ts +0 -13
  1828. package/serialization/resources/voices/types/UpdateVoiceRequest.js +0 -44
  1829. package/serialization/resources/voices/types/Voice.d.ts +0 -22
  1830. package/serialization/resources/voices/types/Voice.js +0 -53
  1831. package/serialization/resources/voices/types/VoiceId.d.ts +0 -10
  1832. package/serialization/resources/voices/types/VoiceId.js +0 -41
  1833. package/serialization/resources/voices/types/VoiceMetadata.d.ts +0 -20
  1834. package/serialization/resources/voices/types/VoiceMetadata.js +0 -51
  1835. package/serialization/resources/voices/types/Weight.d.ts +0 -10
  1836. package/serialization/resources/voices/types/Weight.js +0 -41
  1837. package/serialization/resources/voices/types/index.d.ts +0 -21
  1838. package/serialization/resources/voices/types/index.js +0 -37
  1839. package/wrapper/Client.d.ts +0 -9
  1840. package/wrapper/Client.js +0 -17
  1841. package/wrapper/StreamingSTTClient.d.ts +0 -26
  1842. package/wrapper/StreamingSTTClient.js +0 -140
  1843. package/wrapper/StreamingTTSClient.d.ts +0 -16
  1844. package/wrapper/StreamingTTSClient.js +0 -23
  1845. package/wrapper/SttWebsocket.d.ts +0 -34
  1846. package/wrapper/SttWebsocket.js +0 -219
  1847. package/wrapper/WebPlayer.d.ts +0 -44
  1848. package/wrapper/WebPlayer.js +0 -141
  1849. package/wrapper/Websocket.d.ts +0 -40
  1850. package/wrapper/Websocket.js +0 -243
  1851. package/wrapper/source.d.ts +0 -65
  1852. package/wrapper/source.js +0 -179
  1853. package/wrapper/utils.d.ts +0 -105
  1854. package/wrapper/utils.js +0 -173
package/client.mjs ADDED
@@ -0,0 +1,513 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ var _Cartesia_instances, _a, _Cartesia_encoder, _Cartesia_baseURLOverridden;
3
+ import { __classPrivateFieldGet, __classPrivateFieldSet } from "./internal/tslib.mjs";
4
+ import { uuid4 } from "./internal/utils/uuid.mjs";
5
+ import { validatePositiveInteger, isAbsoluteURL, safeJSON } from "./internal/utils/values.mjs";
6
+ import { sleep } from "./internal/utils/sleep.mjs";
7
+ import { castToError, isAbortError } from "./internal/errors.mjs";
8
+ import { getPlatformHeaders } from "./internal/detect-platform.mjs";
9
+ import * as Shims from "./internal/shims.mjs";
10
+ import * as Opts from "./internal/request-options.mjs";
11
+ import * as qs from "./internal/qs/index.mjs";
12
+ import { VERSION } from "./version.mjs";
13
+ import * as Errors from "./core/error.mjs";
14
+ import * as Pagination from "./core/pagination.mjs";
15
+ import * as Uploads from "./core/uploads.mjs";
16
+ import * as API from "./resources/index.mjs";
17
+ import { APIPromise } from "./core/api-promise.mjs";
18
+ import { AccessToken } from "./resources/access-token.mjs";
19
+ import { FineTunes, } from "./resources/fine-tunes.mjs";
20
+ import { Infill } from "./resources/infill.mjs";
21
+ import { PronunciationDicts, } from "./resources/pronunciation-dicts.mjs";
22
+ import { Stt } from "./resources/stt.mjs";
23
+ import { VoiceChanger, } from "./resources/voice-changer.mjs";
24
+ import { Voices, } from "./resources/voices.mjs";
25
+ import { Agents, } from "./resources/agents/agents.mjs";
26
+ import { Datasets, } from "./resources/datasets/datasets.mjs";
27
+ import { TTS, } from "./resources/tts/tts.mjs";
28
+ import { buildHeaders } from "./internal/headers.mjs";
29
+ import { readEnv } from "./internal/utils/env.mjs";
30
+ import { formatRequestDetails, loggerFor, parseLogLevel, } from "./internal/utils/log.mjs";
31
+ import { isEmptyObj } from "./internal/utils/values.mjs";
32
+ /**
33
+ * API Client for interfacing with the Cartesia API.
34
+ */
35
+ export class Cartesia {
36
+ /**
37
+ * API Client for interfacing with the Cartesia API.
38
+ *
39
+ * @param {string | null | undefined} [opts.token]
40
+ * @param {string | null | undefined} [opts.apiKey]
41
+ * @param {string} [opts.baseURL=process.env['CARTESIA_BASE_URL'] ?? https://api.cartesia.ai] - Override the default base URL for the API.
42
+ * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
43
+ * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
44
+ * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
45
+ * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
46
+ * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
47
+ * @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
48
+ */
49
+ constructor({ baseURL = readEnv('CARTESIA_BASE_URL'), token = null, apiKey = null, ...opts } = {}) {
50
+ _Cartesia_instances.add(this);
51
+ _Cartesia_encoder.set(this, void 0);
52
+ this.agents = new API.Agents(this);
53
+ this.accessToken = new API.AccessToken(this);
54
+ this.datasets = new API.Datasets(this);
55
+ this.fineTunes = new API.FineTunes(this);
56
+ this.infill = new API.Infill(this);
57
+ this.pronunciationDicts = new API.PronunciationDicts(this);
58
+ this.stt = new API.Stt(this);
59
+ this.tts = new API.TTS(this);
60
+ this.voiceChanger = new API.VoiceChanger(this);
61
+ this.voices = new API.Voices(this);
62
+ const options = {
63
+ token,
64
+ apiKey,
65
+ ...opts,
66
+ baseURL: baseURL || `https://api.cartesia.ai`,
67
+ };
68
+ this.baseURL = options.baseURL;
69
+ this.timeout = options.timeout ?? _a.DEFAULT_TIMEOUT /* 1 minute */;
70
+ this.logger = options.logger ?? console;
71
+ const defaultLogLevel = 'warn';
72
+ // Set default logLevel early so that we can log a warning in parseLogLevel.
73
+ this.logLevel = defaultLogLevel;
74
+ this.logLevel =
75
+ parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ??
76
+ parseLogLevel(readEnv('CARTESIA_LOG'), "process.env['CARTESIA_LOG']", this) ??
77
+ defaultLogLevel;
78
+ this.fetchOptions = options.fetchOptions;
79
+ this.maxRetries = options.maxRetries ?? 2;
80
+ this.fetch = options.fetch ?? Shims.getDefaultFetch();
81
+ __classPrivateFieldSet(this, _Cartesia_encoder, Opts.FallbackEncoder, "f");
82
+ this._options = options;
83
+ this.token = token;
84
+ this.apiKey = apiKey;
85
+ }
86
+ /**
87
+ * Create a new client instance re-using the same options given to the current client with optional overriding.
88
+ */
89
+ withOptions(options) {
90
+ const client = new this.constructor({
91
+ ...this._options,
92
+ baseURL: this.baseURL,
93
+ maxRetries: this.maxRetries,
94
+ timeout: this.timeout,
95
+ logger: this.logger,
96
+ logLevel: this.logLevel,
97
+ fetch: this.fetch,
98
+ fetchOptions: this.fetchOptions,
99
+ token: this.token,
100
+ apiKey: this.apiKey,
101
+ ...options,
102
+ });
103
+ return client;
104
+ }
105
+ /**
106
+ * API Status and Version
107
+ */
108
+ getStatus(options) {
109
+ return this.get('/', options);
110
+ }
111
+ defaultQuery() {
112
+ return this._options.defaultQuery;
113
+ }
114
+ validateHeaders({ values, nulls }) {
115
+ if (this.token && values.get('authorization')) {
116
+ return;
117
+ }
118
+ if (nulls.has('authorization')) {
119
+ return;
120
+ }
121
+ if (this.apiKey && values.get('authorization')) {
122
+ return;
123
+ }
124
+ if (nulls.has('authorization')) {
125
+ return;
126
+ }
127
+ throw new Error('Could not resolve authentication method. Expected either token or apiKey to be set. Or for one of the "Authorization" or "Authorization" headers to be explicitly omitted');
128
+ }
129
+ async authHeaders(opts) {
130
+ return buildHeaders([await this.tokenAuth(opts), await this.apiKeyAuth(opts)]);
131
+ }
132
+ async tokenAuth(opts) {
133
+ if (this.token == null) {
134
+ return undefined;
135
+ }
136
+ return buildHeaders([{ Authorization: `Bearer ${this.token}` }]);
137
+ }
138
+ async apiKeyAuth(opts) {
139
+ if (this.apiKey == null) {
140
+ return undefined;
141
+ }
142
+ return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
143
+ }
144
+ stringifyQuery(query) {
145
+ return qs.stringify(query, { arrayFormat: 'brackets' });
146
+ }
147
+ getUserAgent() {
148
+ return `${this.constructor.name}/JS ${VERSION}`;
149
+ }
150
+ defaultIdempotencyKey() {
151
+ return `stainless-node-retry-${uuid4()}`;
152
+ }
153
+ makeStatusError(status, error, message, headers) {
154
+ return Errors.APIError.generate(status, error, message, headers);
155
+ }
156
+ buildURL(path, query, defaultBaseURL) {
157
+ const baseURL = (!__classPrivateFieldGet(this, _Cartesia_instances, "m", _Cartesia_baseURLOverridden).call(this) && defaultBaseURL) || this.baseURL;
158
+ const url = isAbsoluteURL(path) ?
159
+ new URL(path)
160
+ : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
161
+ const defaultQuery = this.defaultQuery();
162
+ if (!isEmptyObj(defaultQuery)) {
163
+ query = { ...defaultQuery, ...query };
164
+ }
165
+ if (typeof query === 'object' && query && !Array.isArray(query)) {
166
+ url.search = this.stringifyQuery(query);
167
+ }
168
+ return url.toString();
169
+ }
170
+ /**
171
+ * Used as a callback for mutating the given `FinalRequestOptions` object.
172
+ */
173
+ async prepareOptions(options) { }
174
+ /**
175
+ * Used as a callback for mutating the given `RequestInit` object.
176
+ *
177
+ * This is useful for cases where you want to add certain headers based off of
178
+ * the request properties, e.g. `method` or `url`.
179
+ */
180
+ async prepareRequest(request, { url, options }) { }
181
+ get(path, opts) {
182
+ return this.methodRequest('get', path, opts);
183
+ }
184
+ post(path, opts) {
185
+ return this.methodRequest('post', path, opts);
186
+ }
187
+ patch(path, opts) {
188
+ return this.methodRequest('patch', path, opts);
189
+ }
190
+ put(path, opts) {
191
+ return this.methodRequest('put', path, opts);
192
+ }
193
+ delete(path, opts) {
194
+ return this.methodRequest('delete', path, opts);
195
+ }
196
+ methodRequest(method, path, opts) {
197
+ return this.request(Promise.resolve(opts).then((opts) => {
198
+ return { method, path, ...opts };
199
+ }));
200
+ }
201
+ request(options, remainingRetries = null) {
202
+ return new APIPromise(this, this.makeRequest(options, remainingRetries, undefined));
203
+ }
204
+ async makeRequest(optionsInput, retriesRemaining, retryOfRequestLogID) {
205
+ const options = await optionsInput;
206
+ const maxRetries = options.maxRetries ?? this.maxRetries;
207
+ if (retriesRemaining == null) {
208
+ retriesRemaining = maxRetries;
209
+ }
210
+ await this.prepareOptions(options);
211
+ const { req, url, timeout } = await this.buildRequest(options, {
212
+ retryCount: maxRetries - retriesRemaining,
213
+ });
214
+ await this.prepareRequest(req, { url, options });
215
+ /** Not an API request ID, just for correlating local log entries. */
216
+ const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0');
217
+ const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`;
218
+ const startTime = Date.now();
219
+ loggerFor(this).debug(`[${requestLogID}] sending request`, formatRequestDetails({
220
+ retryOfRequestLogID,
221
+ method: options.method,
222
+ url,
223
+ options,
224
+ headers: req.headers,
225
+ }));
226
+ if (options.signal?.aborted) {
227
+ throw new Errors.APIUserAbortError();
228
+ }
229
+ const controller = new AbortController();
230
+ const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError);
231
+ const headersTime = Date.now();
232
+ if (response instanceof globalThis.Error) {
233
+ const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
234
+ if (options.signal?.aborted) {
235
+ throw new Errors.APIUserAbortError();
236
+ }
237
+ // detect native connection timeout errors
238
+ // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)"
239
+ // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)"
240
+ // others do not provide enough information to distinguish timeouts from other connection errors
241
+ const isTimeout = isAbortError(response) ||
242
+ /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : ''));
243
+ if (retriesRemaining) {
244
+ loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`);
245
+ loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, formatRequestDetails({
246
+ retryOfRequestLogID,
247
+ url,
248
+ durationMs: headersTime - startTime,
249
+ message: response.message,
250
+ }));
251
+ return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID);
252
+ }
253
+ loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`);
254
+ loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, formatRequestDetails({
255
+ retryOfRequestLogID,
256
+ url,
257
+ durationMs: headersTime - startTime,
258
+ message: response.message,
259
+ }));
260
+ if (isTimeout) {
261
+ throw new Errors.APIConnectionTimeoutError();
262
+ }
263
+ throw new Errors.APIConnectionError({ cause: response });
264
+ }
265
+ const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`;
266
+ if (!response.ok) {
267
+ const shouldRetry = await this.shouldRetry(response);
268
+ if (retriesRemaining && shouldRetry) {
269
+ const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
270
+ // We don't need the body of this response.
271
+ await Shims.CancelReadableStream(response.body);
272
+ loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
273
+ loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({
274
+ retryOfRequestLogID,
275
+ url: response.url,
276
+ status: response.status,
277
+ headers: response.headers,
278
+ durationMs: headersTime - startTime,
279
+ }));
280
+ return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers);
281
+ }
282
+ const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`;
283
+ loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
284
+ const errText = await response.text().catch((err) => castToError(err).message);
285
+ const errJSON = safeJSON(errText);
286
+ const errMessage = errJSON ? undefined : errText;
287
+ loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({
288
+ retryOfRequestLogID,
289
+ url: response.url,
290
+ status: response.status,
291
+ headers: response.headers,
292
+ message: errMessage,
293
+ durationMs: Date.now() - startTime,
294
+ }));
295
+ const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers);
296
+ throw err;
297
+ }
298
+ loggerFor(this).info(responseInfo);
299
+ loggerFor(this).debug(`[${requestLogID}] response start`, formatRequestDetails({
300
+ retryOfRequestLogID,
301
+ url: response.url,
302
+ status: response.status,
303
+ headers: response.headers,
304
+ durationMs: headersTime - startTime,
305
+ }));
306
+ return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
307
+ }
308
+ getAPIList(path, Page, opts) {
309
+ return this.requestAPIList(Page, { method: 'get', path, ...opts });
310
+ }
311
+ requestAPIList(Page, options) {
312
+ const request = this.makeRequest(options, null, undefined);
313
+ return new Pagination.PagePromise(this, request, Page);
314
+ }
315
+ async fetchWithTimeout(url, init, ms, controller) {
316
+ const { signal, method, ...options } = init || {};
317
+ if (signal)
318
+ signal.addEventListener('abort', () => controller.abort());
319
+ const timeout = setTimeout(() => controller.abort(), ms);
320
+ const isReadableBody = (globalThis.ReadableStream && options.body instanceof globalThis.ReadableStream) ||
321
+ (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body);
322
+ const fetchOptions = {
323
+ signal: controller.signal,
324
+ ...(isReadableBody ? { duplex: 'half' } : {}),
325
+ method: 'GET',
326
+ ...options,
327
+ };
328
+ if (method) {
329
+ // Custom methods like 'patch' need to be uppercased
330
+ // See https://github.com/nodejs/undici/issues/2294
331
+ fetchOptions.method = method.toUpperCase();
332
+ }
333
+ try {
334
+ // use undefined this binding; fetch errors if bound to something else in browser/cloudflare
335
+ return await this.fetch.call(undefined, url, fetchOptions);
336
+ }
337
+ finally {
338
+ clearTimeout(timeout);
339
+ }
340
+ }
341
+ async shouldRetry(response) {
342
+ // Note this is not a standard header.
343
+ const shouldRetryHeader = response.headers.get('x-should-retry');
344
+ // If the server explicitly says whether or not to retry, obey.
345
+ if (shouldRetryHeader === 'true')
346
+ return true;
347
+ if (shouldRetryHeader === 'false')
348
+ return false;
349
+ // Retry on request timeouts.
350
+ if (response.status === 408)
351
+ return true;
352
+ // Retry on lock timeouts.
353
+ if (response.status === 409)
354
+ return true;
355
+ // Retry on rate limits.
356
+ if (response.status === 429)
357
+ return true;
358
+ // Retry internal errors.
359
+ if (response.status >= 500)
360
+ return true;
361
+ return false;
362
+ }
363
+ async retryRequest(options, retriesRemaining, requestLogID, responseHeaders) {
364
+ let timeoutMillis;
365
+ // Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it.
366
+ const retryAfterMillisHeader = responseHeaders?.get('retry-after-ms');
367
+ if (retryAfterMillisHeader) {
368
+ const timeoutMs = parseFloat(retryAfterMillisHeader);
369
+ if (!Number.isNaN(timeoutMs)) {
370
+ timeoutMillis = timeoutMs;
371
+ }
372
+ }
373
+ // About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
374
+ const retryAfterHeader = responseHeaders?.get('retry-after');
375
+ if (retryAfterHeader && !timeoutMillis) {
376
+ const timeoutSeconds = parseFloat(retryAfterHeader);
377
+ if (!Number.isNaN(timeoutSeconds)) {
378
+ timeoutMillis = timeoutSeconds * 1000;
379
+ }
380
+ else {
381
+ timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
382
+ }
383
+ }
384
+ // If the API asks us to wait a certain amount of time (and it's a reasonable amount),
385
+ // just do what it says, but otherwise calculate a default
386
+ if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {
387
+ const maxRetries = options.maxRetries ?? this.maxRetries;
388
+ timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
389
+ }
390
+ await sleep(timeoutMillis);
391
+ return this.makeRequest(options, retriesRemaining - 1, requestLogID);
392
+ }
393
+ calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries) {
394
+ const initialRetryDelay = 0.5;
395
+ const maxRetryDelay = 8.0;
396
+ const numRetries = maxRetries - retriesRemaining;
397
+ // Apply exponential backoff, but not more than the max.
398
+ const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay);
399
+ // Apply some jitter, take up to at most 25 percent of the retry time.
400
+ const jitter = 1 - Math.random() * 0.25;
401
+ return sleepSeconds * jitter * 1000;
402
+ }
403
+ async buildRequest(inputOptions, { retryCount = 0 } = {}) {
404
+ const options = { ...inputOptions };
405
+ const { method, path, query, defaultBaseURL } = options;
406
+ const url = this.buildURL(path, query, defaultBaseURL);
407
+ if ('timeout' in options)
408
+ validatePositiveInteger('timeout', options.timeout);
409
+ options.timeout = options.timeout ?? this.timeout;
410
+ const { bodyHeaders, body } = this.buildBody({ options });
411
+ const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });
412
+ const req = {
413
+ method,
414
+ headers: reqHeaders,
415
+ ...(options.signal && { signal: options.signal }),
416
+ ...(globalThis.ReadableStream &&
417
+ body instanceof globalThis.ReadableStream && { duplex: 'half' }),
418
+ ...(body && { body }),
419
+ ...(this.fetchOptions ?? {}),
420
+ ...(options.fetchOptions ?? {}),
421
+ };
422
+ return { req, url, timeout: options.timeout };
423
+ }
424
+ async buildHeaders({ options, method, bodyHeaders, retryCount, }) {
425
+ let idempotencyHeaders = {};
426
+ if (this.idempotencyHeader && method !== 'get') {
427
+ if (!options.idempotencyKey)
428
+ options.idempotencyKey = this.defaultIdempotencyKey();
429
+ idempotencyHeaders[this.idempotencyHeader] = options.idempotencyKey;
430
+ }
431
+ const headers = buildHeaders([
432
+ idempotencyHeaders,
433
+ {
434
+ Accept: 'application/json',
435
+ 'User-Agent': this.getUserAgent(),
436
+ 'X-Stainless-Retry-Count': String(retryCount),
437
+ ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
438
+ ...getPlatformHeaders(),
439
+ 'cartesia-version': '2025-04-16',
440
+ },
441
+ await this.authHeaders(options),
442
+ this._options.defaultHeaders,
443
+ bodyHeaders,
444
+ options.headers,
445
+ ]);
446
+ this.validateHeaders(headers);
447
+ return headers.values;
448
+ }
449
+ buildBody({ options: { body, headers: rawHeaders } }) {
450
+ if (!body) {
451
+ return { bodyHeaders: undefined, body: undefined };
452
+ }
453
+ const headers = buildHeaders([rawHeaders]);
454
+ if (
455
+ // Pass raw type verbatim
456
+ ArrayBuffer.isView(body) ||
457
+ body instanceof ArrayBuffer ||
458
+ body instanceof DataView ||
459
+ (typeof body === 'string' &&
460
+ // Preserve legacy string encoding behavior for now
461
+ headers.values.has('content-type')) ||
462
+ // `Blob` is superset of `File`
463
+ (globalThis.Blob && body instanceof globalThis.Blob) ||
464
+ // `FormData` -> `multipart/form-data`
465
+ body instanceof FormData ||
466
+ // `URLSearchParams` -> `application/x-www-form-urlencoded`
467
+ body instanceof URLSearchParams ||
468
+ // Send chunked stream (each chunk has own `length`)
469
+ (globalThis.ReadableStream && body instanceof globalThis.ReadableStream)) {
470
+ return { bodyHeaders: undefined, body: body };
471
+ }
472
+ else if (typeof body === 'object' &&
473
+ (Symbol.asyncIterator in body ||
474
+ (Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))) {
475
+ return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body) };
476
+ }
477
+ else {
478
+ return __classPrivateFieldGet(this, _Cartesia_encoder, "f").call(this, { body, headers });
479
+ }
480
+ }
481
+ }
482
+ _a = Cartesia, _Cartesia_encoder = new WeakMap(), _Cartesia_instances = new WeakSet(), _Cartesia_baseURLOverridden = function _Cartesia_baseURLOverridden() {
483
+ return this.baseURL !== 'https://api.cartesia.ai';
484
+ };
485
+ Cartesia.Cartesia = _a;
486
+ Cartesia.DEFAULT_TIMEOUT = 60000; // 1 minute
487
+ Cartesia.CartesiaError = Errors.CartesiaError;
488
+ Cartesia.APIError = Errors.APIError;
489
+ Cartesia.APIConnectionError = Errors.APIConnectionError;
490
+ Cartesia.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
491
+ Cartesia.APIUserAbortError = Errors.APIUserAbortError;
492
+ Cartesia.NotFoundError = Errors.NotFoundError;
493
+ Cartesia.ConflictError = Errors.ConflictError;
494
+ Cartesia.RateLimitError = Errors.RateLimitError;
495
+ Cartesia.BadRequestError = Errors.BadRequestError;
496
+ Cartesia.AuthenticationError = Errors.AuthenticationError;
497
+ Cartesia.InternalServerError = Errors.InternalServerError;
498
+ Cartesia.PermissionDeniedError = Errors.PermissionDeniedError;
499
+ Cartesia.UnprocessableEntityError = Errors.UnprocessableEntityError;
500
+ Cartesia.toFile = Uploads.toFile;
501
+ Cartesia.Agents = Agents;
502
+ Cartesia.AccessToken = AccessToken;
503
+ Cartesia.Datasets = Datasets;
504
+ Cartesia.FineTunes = FineTunes;
505
+ Cartesia.Infill = Infill;
506
+ Cartesia.PronunciationDicts = PronunciationDicts;
507
+ Cartesia.Stt = Stt;
508
+ Cartesia.TTS = TTS;
509
+ Cartesia.VoiceChanger = VoiceChanger;
510
+ Cartesia.Voices = Voices;
511
+ // backcompat for main client name:
512
+ export const CartesiaClient = Cartesia;
513
+ //# sourceMappingURL=client.mjs.map
package/client.mjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.mjs","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"AAAA,sFAAsF;;;OAI/E,EAAE,KAAK,EAAE;OACT,EAAE,uBAAuB,EAAE,aAAa,EAAE,QAAQ,EAAE;OACpD,EAAE,KAAK,EAAE;OAET,EAAE,WAAW,EAAE,YAAY,EAAE;OAE7B,EAAE,kBAAkB,EAAE;OACtB,KAAK,KAAK;OACV,KAAK,IAAI;OACT,KAAK,EAAE;OACP,EAAE,OAAO,EAAE;OACX,KAAK,MAAM;OACX,KAAK,UAAU;OAEf,KAAK,OAAO;OACZ,KAAK,GAAG;OAGR,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAsD;OACnE,EAKL,SAAS,GAEV;OACM,EAAE,MAAM,EAA0D;OAClE,EAML,kBAAkB,GAEnB;OACM,EAAE,GAAG,EAA8C;OACnD,EACL,YAAY,GAGb;OACM,EASL,MAAM,GAEP;OACM,EAML,MAAM,GACP;OACM,EAKL,QAAQ,GAET;OACM,EAKL,GAAG,GAMJ;OAEM,EAAgC,YAAY,EAAE;OAE9C,EAAE,OAAO,EAAE;OACX,EAGL,oBAAoB,EACpB,SAAS,EACT,aAAa,GACd;OACM,EAAE,UAAU,EAAE;AA4Er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AC/B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,QAAQ,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACjD,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;AACnB,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;AACnB,QAAQ,CAAC,YAAY,GAAG,YAAY,CAAC;AACrC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;AAEzB,mCAAmC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,45 @@
1
+ type EventListener<Events, EventType extends keyof Events> = Events[EventType];
2
+ export type EventParameters<Events, EventType extends keyof Events> = {
3
+ [Event in EventType]: EventListener<Events, EventType> extends (...args: infer P) => any ? P : never;
4
+ }[EventType];
5
+ export declare class EventEmitter<EventTypes extends Record<string, (...args: any) => any>> {
6
+ #private;
7
+ /**
8
+ * Adds the listener function to the end of the listeners array for the event.
9
+ * No checks are made to see if the listener has already been added. Multiple calls passing
10
+ * the same combination of event and listener will result in the listener being added, and
11
+ * called, multiple times.
12
+ * @returns this, so that calls can be chained
13
+ */
14
+ on<Event extends keyof EventTypes>(event: Event, listener: EventListener<EventTypes, Event>): this;
15
+ /**
16
+ * Removes the specified listener from the listener array for the event.
17
+ * off() will remove, at most, one instance of a listener from the listener array. If any single
18
+ * listener has been added multiple times to the listener array for the specified event, then
19
+ * off() must be called multiple times to remove each instance.
20
+ * @returns this, so that calls can be chained
21
+ */
22
+ off<Event extends keyof EventTypes>(event: Event, listener: EventListener<EventTypes, Event>): this;
23
+ /**
24
+ * Adds a one-time listener function for the event. The next time the event is triggered,
25
+ * this listener is removed and then invoked.
26
+ * @returns this, so that calls can be chained
27
+ */
28
+ once<Event extends keyof EventTypes>(event: Event, listener: EventListener<EventTypes, Event>): this;
29
+ /**
30
+ * This is similar to `.once()`, but returns a Promise that resolves the next time
31
+ * the event is triggered, instead of calling a listener callback.
32
+ * @returns a Promise that resolves the next time given event is triggered,
33
+ * or rejects if an error is emitted. (If you request the 'error' event,
34
+ * returns a promise that resolves with the error).
35
+ *
36
+ * Example:
37
+ *
38
+ * const message = await stream.emitted('message') // rejects if the stream errors
39
+ */
40
+ emitted<Event extends keyof EventTypes>(event: Event): Promise<EventParameters<EventTypes, Event> extends [infer Param] ? Param : EventParameters<EventTypes, Event> extends [] ? void : EventParameters<EventTypes, Event>>;
41
+ protected _emit<Event extends keyof EventTypes>(this: EventEmitter<EventTypes>, event: Event, ...args: EventParameters<EventTypes, Event>): void;
42
+ protected _hasListener(event: keyof EventTypes): boolean;
43
+ }
44
+ export {};
45
+ //# sourceMappingURL=EventEmitter.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventEmitter.d.mts","sourceRoot":"","sources":["../src/core/EventEmitter.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;AAO/E,MAAM,MAAM,eAAe,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI;KACnE,KAAK,IAAI,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK;CACrG,CAAC,SAAS,CAAC,CAAC;AAEb,qBAAa,YAAY,CAAC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;;IAKhF;;;;;;OAMG;IACH,EAAE,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOlG;;;;;;OAMG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAQnG;;;;OAIG;IACH,IAAI,CAAC,KAAK,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,IAAI;IAOpG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,SAAS,MAAM,UAAU,EACpC,KAAK,EAAE,KAAK,GACX,OAAO,CACR,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAC9D,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,IAAI,GACpD,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CACrC;IAOD,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,UAAU,EAC5C,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,EAC9B,KAAK,EAAE,KAAK,EACZ,GAAG,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC;IAS7C,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,UAAU,GAAG,OAAO;CAIzD"}
@@ -0,0 +1,45 @@
1
+ type EventListener<Events, EventType extends keyof Events> = Events[EventType];
2
+ export type EventParameters<Events, EventType extends keyof Events> = {
3
+ [Event in EventType]: EventListener<Events, EventType> extends (...args: infer P) => any ? P : never;
4
+ }[EventType];
5
+ export declare class EventEmitter<EventTypes extends Record<string, (...args: any) => any>> {
6
+ #private;
7
+ /**
8
+ * Adds the listener function to the end of the listeners array for the event.
9
+ * No checks are made to see if the listener has already been added. Multiple calls passing
10
+ * the same combination of event and listener will result in the listener being added, and
11
+ * called, multiple times.
12
+ * @returns this, so that calls can be chained
13
+ */
14
+ on<Event extends keyof EventTypes>(event: Event, listener: EventListener<EventTypes, Event>): this;
15
+ /**
16
+ * Removes the specified listener from the listener array for the event.
17
+ * off() will remove, at most, one instance of a listener from the listener array. If any single
18
+ * listener has been added multiple times to the listener array for the specified event, then
19
+ * off() must be called multiple times to remove each instance.
20
+ * @returns this, so that calls can be chained
21
+ */
22
+ off<Event extends keyof EventTypes>(event: Event, listener: EventListener<EventTypes, Event>): this;
23
+ /**
24
+ * Adds a one-time listener function for the event. The next time the event is triggered,
25
+ * this listener is removed and then invoked.
26
+ * @returns this, so that calls can be chained
27
+ */
28
+ once<Event extends keyof EventTypes>(event: Event, listener: EventListener<EventTypes, Event>): this;
29
+ /**
30
+ * This is similar to `.once()`, but returns a Promise that resolves the next time
31
+ * the event is triggered, instead of calling a listener callback.
32
+ * @returns a Promise that resolves the next time given event is triggered,
33
+ * or rejects if an error is emitted. (If you request the 'error' event,
34
+ * returns a promise that resolves with the error).
35
+ *
36
+ * Example:
37
+ *
38
+ * const message = await stream.emitted('message') // rejects if the stream errors
39
+ */
40
+ emitted<Event extends keyof EventTypes>(event: Event): Promise<EventParameters<EventTypes, Event> extends [infer Param] ? Param : EventParameters<EventTypes, Event> extends [] ? void : EventParameters<EventTypes, Event>>;
41
+ protected _emit<Event extends keyof EventTypes>(this: EventEmitter<EventTypes>, event: Event, ...args: EventParameters<EventTypes, Event>): void;
42
+ protected _hasListener(event: keyof EventTypes): boolean;
43
+ }
44
+ export {};
45
+ //# sourceMappingURL=EventEmitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventEmitter.d.ts","sourceRoot":"","sources":["../src/core/EventEmitter.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC;AAO/E,MAAM,MAAM,eAAe,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM,MAAM,IAAI;KACnE,KAAK,IAAI,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK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