@runwayml/sdk 2.11.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +113 -48
  3. package/api-promise.d.mts +2 -0
  4. package/api-promise.d.mts.map +1 -0
  5. package/api-promise.d.ts +2 -0
  6. package/api-promise.d.ts.map +1 -0
  7. package/api-promise.js +6 -0
  8. package/api-promise.js.map +1 -0
  9. package/api-promise.mjs +2 -0
  10. package/api-promise.mjs.map +1 -0
  11. package/bin/cli +53 -0
  12. package/bin/migration-config.json +6 -0
  13. package/client.d.mts +207 -0
  14. package/client.d.mts.map +1 -0
  15. package/client.d.ts +207 -0
  16. package/client.d.ts.map +1 -0
  17. package/client.js +494 -0
  18. package/client.js.map +1 -0
  19. package/client.mjs +490 -0
  20. package/client.mjs.map +1 -0
  21. package/core/api-promise.d.mts +46 -0
  22. package/core/api-promise.d.mts.map +1 -0
  23. package/core/api-promise.d.ts +46 -0
  24. package/core/api-promise.d.ts.map +1 -0
  25. package/core/api-promise.js +74 -0
  26. package/core/api-promise.js.map +1 -0
  27. package/core/api-promise.mjs +70 -0
  28. package/core/api-promise.mjs.map +1 -0
  29. package/core/error.d.mts +46 -0
  30. package/core/error.d.mts.map +1 -0
  31. package/core/error.d.ts +46 -0
  32. package/core/error.d.ts.map +1 -0
  33. package/core/error.js +113 -0
  34. package/core/error.js.map +1 -0
  35. package/core/error.mjs +97 -0
  36. package/core/error.mjs.map +1 -0
  37. package/core/resource.d.mts +6 -0
  38. package/core/resource.d.mts.map +1 -0
  39. package/core/resource.d.ts +6 -0
  40. package/core/resource.d.ts.map +1 -0
  41. package/core/resource.js +11 -0
  42. package/core/resource.js.map +1 -0
  43. package/core/resource.mjs +7 -0
  44. package/core/resource.mjs.map +1 -0
  45. package/core/uploads.d.mts +3 -0
  46. package/core/uploads.d.mts.map +1 -0
  47. package/core/uploads.d.ts +3 -0
  48. package/core/uploads.d.ts.map +1 -0
  49. package/core/uploads.js +6 -0
  50. package/core/uploads.js.map +1 -0
  51. package/core/uploads.mjs +2 -0
  52. package/core/uploads.mjs.map +1 -0
  53. package/error.d.mts +2 -0
  54. package/error.d.mts.map +1 -0
  55. package/error.d.ts +1 -46
  56. package/error.d.ts.map +1 -1
  57. package/error.js +3 -110
  58. package/error.js.map +1 -1
  59. package/error.mjs +1 -96
  60. package/error.mjs.map +1 -1
  61. package/index.d.mts +7 -141
  62. package/index.d.mts.map +1 -0
  63. package/index.d.ts +6 -140
  64. package/index.d.ts.map +1 -1
  65. package/index.js +12 -139
  66. package/index.js.map +1 -1
  67. package/index.mjs +6 -113
  68. package/index.mjs.map +1 -1
  69. package/internal/builtin-types.d.mts +73 -0
  70. package/internal/builtin-types.d.mts.map +1 -0
  71. package/internal/builtin-types.d.ts +73 -0
  72. package/internal/builtin-types.d.ts.map +1 -0
  73. package/internal/builtin-types.js +4 -0
  74. package/internal/builtin-types.js.map +1 -0
  75. package/internal/builtin-types.mjs +3 -0
  76. package/internal/builtin-types.mjs.map +1 -0
  77. package/internal/detect-platform.d.mts +15 -0
  78. package/internal/detect-platform.d.mts.map +1 -0
  79. package/internal/detect-platform.d.ts +15 -0
  80. package/internal/detect-platform.d.ts.map +1 -0
  81. package/internal/detect-platform.js +162 -0
  82. package/internal/detect-platform.js.map +1 -0
  83. package/internal/detect-platform.mjs +157 -0
  84. package/internal/detect-platform.mjs.map +1 -0
  85. package/internal/errors.d.mts +3 -0
  86. package/internal/errors.d.mts.map +1 -0
  87. package/internal/errors.d.ts +3 -0
  88. package/internal/errors.d.ts.map +1 -0
  89. package/internal/errors.js +41 -0
  90. package/internal/errors.js.map +1 -0
  91. package/internal/errors.mjs +36 -0
  92. package/internal/errors.mjs.map +1 -0
  93. package/internal/headers.d.mts +20 -0
  94. package/internal/headers.d.mts.map +1 -0
  95. package/internal/headers.d.ts +20 -0
  96. package/internal/headers.d.ts.map +1 -0
  97. package/internal/headers.js +79 -0
  98. package/internal/headers.js.map +1 -0
  99. package/internal/headers.mjs +74 -0
  100. package/internal/headers.mjs.map +1 -0
  101. package/internal/parse.d.mts +12 -0
  102. package/internal/parse.d.mts.map +1 -0
  103. package/internal/parse.d.ts +12 -0
  104. package/internal/parse.d.ts.map +1 -0
  105. package/internal/parse.js +35 -0
  106. package/internal/parse.js.map +1 -0
  107. package/internal/parse.mjs +32 -0
  108. package/internal/parse.mjs.map +1 -0
  109. package/internal/request-options.d.mts +75 -0
  110. package/internal/request-options.d.mts.map +1 -0
  111. package/internal/request-options.d.ts +75 -0
  112. package/internal/request-options.d.ts.map +1 -0
  113. package/internal/request-options.js +14 -0
  114. package/internal/request-options.js.map +1 -0
  115. package/internal/request-options.mjs +10 -0
  116. package/internal/request-options.mjs.map +1 -0
  117. package/internal/shim-types.d.mts +17 -0
  118. package/internal/shim-types.d.mts.map +1 -0
  119. package/internal/shim-types.d.ts +17 -0
  120. package/internal/shim-types.d.ts.map +1 -0
  121. package/internal/shim-types.js +4 -0
  122. package/internal/shim-types.js.map +1 -0
  123. package/internal/shim-types.mjs +3 -0
  124. package/internal/shim-types.mjs.map +1 -0
  125. package/internal/shims.d.mts +20 -0
  126. package/internal/shims.d.mts.map +1 -0
  127. package/internal/shims.d.ts +20 -0
  128. package/internal/shims.d.ts.map +1 -0
  129. package/internal/shims.js +92 -0
  130. package/internal/shims.js.map +1 -0
  131. package/internal/shims.mjs +85 -0
  132. package/internal/shims.mjs.map +1 -0
  133. package/internal/to-file.d.mts +45 -0
  134. package/internal/to-file.d.mts.map +1 -0
  135. package/internal/to-file.d.ts +45 -0
  136. package/internal/to-file.d.ts.map +1 -0
  137. package/internal/to-file.js +91 -0
  138. package/internal/to-file.js.map +1 -0
  139. package/internal/to-file.mjs +88 -0
  140. package/internal/to-file.mjs.map +1 -0
  141. package/internal/tslib.js +81 -0
  142. package/internal/tslib.mjs +17 -0
  143. package/internal/types.d.mts +69 -0
  144. package/internal/types.d.mts.map +1 -0
  145. package/internal/types.d.ts +69 -0
  146. package/internal/types.d.ts.map +1 -0
  147. package/internal/types.js +4 -0
  148. package/internal/types.js.map +1 -0
  149. package/internal/types.mjs +3 -0
  150. package/internal/types.mjs.map +1 -0
  151. package/internal/uploads.d.mts +42 -0
  152. package/internal/uploads.d.mts.map +1 -0
  153. package/internal/uploads.d.ts +42 -0
  154. package/internal/uploads.d.ts.map +1 -0
  155. package/internal/uploads.js +141 -0
  156. package/internal/uploads.js.map +1 -0
  157. package/internal/uploads.mjs +131 -0
  158. package/internal/uploads.mjs.map +1 -0
  159. package/internal/utils/base64.d.mts +3 -0
  160. package/internal/utils/base64.d.mts.map +1 -0
  161. package/internal/utils/base64.d.ts +3 -0
  162. package/internal/utils/base64.d.ts.map +1 -0
  163. package/internal/utils/base64.js +38 -0
  164. package/internal/utils/base64.js.map +1 -0
  165. package/internal/utils/base64.mjs +33 -0
  166. package/internal/utils/base64.mjs.map +1 -0
  167. package/internal/utils/bytes.d.mts +4 -0
  168. package/internal/utils/bytes.d.mts.map +1 -0
  169. package/internal/utils/bytes.d.ts +4 -0
  170. package/internal/utils/bytes.d.ts.map +1 -0
  171. package/internal/utils/bytes.js +31 -0
  172. package/internal/utils/bytes.js.map +1 -0
  173. package/internal/utils/bytes.mjs +26 -0
  174. package/internal/utils/bytes.mjs.map +1 -0
  175. package/internal/utils/env.d.mts +9 -0
  176. package/internal/utils/env.d.mts.map +1 -0
  177. package/internal/utils/env.d.ts +9 -0
  178. package/internal/utils/env.d.ts.map +1 -0
  179. package/internal/utils/env.js +22 -0
  180. package/internal/utils/env.js.map +1 -0
  181. package/internal/utils/env.mjs +18 -0
  182. package/internal/utils/env.mjs.map +1 -0
  183. package/internal/utils/log.d.mts +37 -0
  184. package/internal/utils/log.d.mts.map +1 -0
  185. package/internal/utils/log.d.ts +37 -0
  186. package/internal/utils/log.d.ts.map +1 -0
  187. package/internal/utils/log.js +85 -0
  188. package/internal/utils/log.js.map +1 -0
  189. package/internal/utils/log.mjs +79 -0
  190. package/internal/utils/log.mjs.map +1 -0
  191. package/internal/utils/path.d.mts +15 -0
  192. package/internal/utils/path.d.mts.map +1 -0
  193. package/internal/utils/path.d.ts +15 -0
  194. package/internal/utils/path.d.ts.map +1 -0
  195. package/internal/utils/path.js +79 -0
  196. package/internal/utils/path.js.map +1 -0
  197. package/internal/utils/path.mjs +74 -0
  198. package/internal/utils/path.mjs.map +1 -0
  199. package/internal/utils/sleep.d.mts +2 -0
  200. package/internal/utils/sleep.d.mts.map +1 -0
  201. package/internal/utils/sleep.d.ts +2 -0
  202. package/internal/utils/sleep.d.ts.map +1 -0
  203. package/internal/utils/sleep.js +7 -0
  204. package/internal/utils/sleep.js.map +1 -0
  205. package/internal/utils/sleep.mjs +3 -0
  206. package/internal/utils/sleep.mjs.map +1 -0
  207. package/internal/utils/uuid.d.mts +5 -0
  208. package/internal/utils/uuid.d.mts.map +1 -0
  209. package/internal/utils/uuid.d.ts +5 -0
  210. package/internal/utils/uuid.d.ts.map +1 -0
  211. package/internal/utils/uuid.js +19 -0
  212. package/internal/utils/uuid.js.map +1 -0
  213. package/internal/utils/uuid.mjs +15 -0
  214. package/internal/utils/uuid.mjs.map +1 -0
  215. package/internal/utils/values.d.mts +18 -0
  216. package/internal/utils/values.d.mts.map +1 -0
  217. package/internal/utils/values.d.ts +18 -0
  218. package/internal/utils/values.d.ts.map +1 -0
  219. package/internal/utils/values.js +112 -0
  220. package/internal/utils/values.js.map +1 -0
  221. package/internal/utils/values.mjs +94 -0
  222. package/internal/utils/values.mjs.map +1 -0
  223. package/internal/utils.d.mts +7 -0
  224. package/internal/utils.d.mts.map +1 -0
  225. package/internal/utils.d.ts +7 -0
  226. package/internal/utils.d.ts.map +1 -0
  227. package/internal/utils.js +11 -0
  228. package/internal/utils.js.map +1 -0
  229. package/internal/utils.mjs +8 -0
  230. package/internal/utils.mjs.map +1 -0
  231. package/lib/polling.d.mts +48 -0
  232. package/lib/polling.d.mts.map +1 -0
  233. package/lib/polling.d.ts +4 -5
  234. package/lib/polling.d.ts.map +1 -1
  235. package/lib/polling.js +2 -2
  236. package/lib/polling.js.map +1 -1
  237. package/lib/polling.mjs.map +1 -1
  238. package/package.json +113 -64
  239. package/resource.d.mts +2 -0
  240. package/resource.d.mts.map +1 -0
  241. package/resource.d.ts +1 -5
  242. package/resource.d.ts.map +1 -1
  243. package/resource.js +3 -8
  244. package/resource.js.map +1 -1
  245. package/resource.mjs +1 -6
  246. package/resource.mjs.map +1 -1
  247. package/resources/character-performance.d.mts +106 -0
  248. package/resources/character-performance.d.mts.map +1 -0
  249. package/resources/character-performance.d.ts +3 -3
  250. package/resources/character-performance.d.ts.map +1 -1
  251. package/resources/character-performance.js +1 -1
  252. package/resources/character-performance.js.map +1 -1
  253. package/resources/character-performance.mjs +1 -1
  254. package/resources/character-performance.mjs.map +1 -1
  255. package/resources/image-to-video.d.mts +108 -0
  256. package/resources/image-to-video.d.mts.map +1 -0
  257. package/resources/image-to-video.d.ts +3 -3
  258. package/resources/image-to-video.d.ts.map +1 -1
  259. package/resources/image-to-video.js +1 -1
  260. package/resources/image-to-video.js.map +1 -1
  261. package/resources/image-to-video.mjs +1 -1
  262. package/resources/image-to-video.mjs.map +1 -1
  263. package/resources/index.d.mts +10 -0
  264. package/resources/index.d.mts.map +1 -0
  265. package/resources/index.d.ts.map +1 -1
  266. package/resources/organization.d.mts +422 -0
  267. package/resources/organization.d.mts.map +1 -0
  268. package/resources/organization.d.ts +5 -5
  269. package/resources/organization.d.ts.map +1 -1
  270. package/resources/organization.js +6 -5
  271. package/resources/organization.js.map +1 -1
  272. package/resources/organization.mjs +6 -5
  273. package/resources/organization.mjs.map +1 -1
  274. package/resources/tasks.d.mts +69 -0
  275. package/resources/tasks.d.mts.map +1 -0
  276. package/resources/tasks.d.ts +5 -4
  277. package/resources/tasks.d.ts.map +1 -1
  278. package/resources/tasks.js +6 -4
  279. package/resources/tasks.js.map +1 -1
  280. package/resources/tasks.mjs +6 -4
  281. package/resources/tasks.mjs.map +1 -1
  282. package/resources/text-to-image.d.mts +112 -0
  283. package/resources/text-to-image.d.mts.map +1 -0
  284. package/resources/text-to-image.d.ts +3 -3
  285. package/resources/text-to-image.d.ts.map +1 -1
  286. package/resources/text-to-image.js +1 -1
  287. package/resources/text-to-image.js.map +1 -1
  288. package/resources/text-to-image.mjs +1 -1
  289. package/resources/text-to-image.mjs.map +1 -1
  290. package/resources/text-to-speech.d.mts +46 -0
  291. package/resources/text-to-speech.d.mts.map +1 -0
  292. package/resources/text-to-speech.d.ts +3 -3
  293. package/resources/text-to-speech.d.ts.map +1 -1
  294. package/resources/text-to-speech.js +1 -1
  295. package/resources/text-to-speech.js.map +1 -1
  296. package/resources/text-to-speech.mjs +1 -1
  297. package/resources/text-to-speech.mjs.map +1 -1
  298. package/resources/text-to-video.d.mts +44 -0
  299. package/resources/text-to-video.d.mts.map +1 -0
  300. package/resources/text-to-video.d.ts +3 -3
  301. package/resources/text-to-video.d.ts.map +1 -1
  302. package/resources/text-to-video.js +1 -1
  303. package/resources/text-to-video.js.map +1 -1
  304. package/resources/text-to-video.mjs +1 -1
  305. package/resources/text-to-video.mjs.map +1 -1
  306. package/resources/video-to-video.d.mts +78 -0
  307. package/resources/video-to-video.d.mts.map +1 -0
  308. package/resources/video-to-video.d.ts +3 -3
  309. package/resources/video-to-video.d.ts.map +1 -1
  310. package/resources/video-to-video.js +1 -1
  311. package/resources/video-to-video.js.map +1 -1
  312. package/resources/video-to-video.mjs +1 -1
  313. package/resources/video-to-video.mjs.map +1 -1
  314. package/resources/video-upscale.d.mts +32 -0
  315. package/resources/video-upscale.d.mts.map +1 -0
  316. package/resources/video-upscale.d.ts +3 -3
  317. package/resources/video-upscale.d.ts.map +1 -1
  318. package/resources/video-upscale.js +1 -1
  319. package/resources/video-upscale.js.map +1 -1
  320. package/resources/video-upscale.mjs +1 -1
  321. package/resources/video-upscale.mjs.map +1 -1
  322. package/resources.d.mts +2 -0
  323. package/resources.d.mts.map +1 -0
  324. package/resources.d.ts.map +1 -1
  325. package/resources.js +2 -15
  326. package/resources.js.map +1 -1
  327. package/src/api-promise.ts +2 -0
  328. package/src/client.ts +840 -0
  329. package/src/core/README.md +3 -0
  330. package/src/core/api-promise.ts +92 -0
  331. package/src/core/error.ts +130 -0
  332. package/src/core/resource.ts +11 -0
  333. package/src/core/uploads.ts +2 -0
  334. package/src/error.ts +2 -130
  335. package/src/index.ts +12 -292
  336. package/src/internal/README.md +3 -0
  337. package/src/internal/builtin-types.ts +93 -0
  338. package/src/internal/detect-platform.ts +196 -0
  339. package/src/internal/errors.ts +33 -0
  340. package/src/internal/headers.ts +97 -0
  341. package/src/internal/parse.ts +50 -0
  342. package/src/internal/request-options.ts +91 -0
  343. package/src/internal/shim-types.ts +26 -0
  344. package/src/internal/shims.ts +107 -0
  345. package/src/internal/to-file.ts +154 -0
  346. package/src/internal/types.ts +95 -0
  347. package/src/internal/uploads.ts +187 -0
  348. package/src/internal/utils/base64.ts +40 -0
  349. package/src/internal/utils/bytes.ts +32 -0
  350. package/src/internal/utils/env.ts +18 -0
  351. package/src/internal/utils/log.ts +126 -0
  352. package/src/internal/utils/path.ts +88 -0
  353. package/src/internal/utils/sleep.ts +3 -0
  354. package/src/internal/utils/uuid.ts +17 -0
  355. package/src/internal/utils/values.ts +105 -0
  356. package/src/internal/utils.ts +8 -0
  357. package/src/lib/polling.ts +5 -5
  358. package/src/resource.ts +2 -11
  359. package/src/resources/character-performance.ts +3 -3
  360. package/src/resources/image-to-video.ts +3 -3
  361. package/src/resources/organization.ts +7 -15
  362. package/src/resources/tasks.ts +10 -7
  363. package/src/resources/text-to-image.ts +3 -3
  364. package/src/resources/text-to-speech.ts +3 -3
  365. package/src/resources/text-to-video.ts +3 -3
  366. package/src/resources/video-to-video.ts +3 -3
  367. package/src/resources/video-upscale.ts +3 -3
  368. package/src/tsconfig.json +2 -2
  369. package/src/uploads.ts +2 -255
  370. package/src/version.ts +1 -1
  371. package/uploads.d.mts +2 -0
  372. package/uploads.d.mts.map +1 -0
  373. package/uploads.d.ts +1 -74
  374. package/uploads.d.ts.map +1 -1
  375. package/uploads.js +3 -168
  376. package/uploads.js.map +1 -1
  377. package/uploads.mjs +1 -157
  378. package/uploads.mjs.map +1 -1
  379. package/version.d.mts +2 -0
  380. package/version.d.mts.map +1 -0
  381. package/version.d.ts +1 -1
  382. package/version.d.ts.map +1 -1
  383. package/version.js +1 -1
  384. package/version.js.map +1 -1
  385. package/version.mjs +1 -1
  386. package/version.mjs.map +1 -1
  387. package/_shims/MultipartBody.d.ts +0 -9
  388. package/_shims/MultipartBody.d.ts.map +0 -1
  389. package/_shims/MultipartBody.js +0 -16
  390. package/_shims/MultipartBody.js.map +0 -1
  391. package/_shims/MultipartBody.mjs +0 -12
  392. package/_shims/MultipartBody.mjs.map +0 -1
  393. package/_shims/README.md +0 -46
  394. package/_shims/auto/runtime-bun.d.ts +0 -5
  395. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  396. package/_shims/auto/runtime-bun.js +0 -21
  397. package/_shims/auto/runtime-bun.js.map +0 -1
  398. package/_shims/auto/runtime-bun.mjs +0 -2
  399. package/_shims/auto/runtime-bun.mjs.map +0 -1
  400. package/_shims/auto/runtime-node.d.ts +0 -5
  401. package/_shims/auto/runtime-node.d.ts.map +0 -1
  402. package/_shims/auto/runtime-node.js +0 -21
  403. package/_shims/auto/runtime-node.js.map +0 -1
  404. package/_shims/auto/runtime-node.mjs +0 -2
  405. package/_shims/auto/runtime-node.mjs.map +0 -1
  406. package/_shims/auto/runtime.d.ts +0 -5
  407. package/_shims/auto/runtime.d.ts.map +0 -1
  408. package/_shims/auto/runtime.js +0 -21
  409. package/_shims/auto/runtime.js.map +0 -1
  410. package/_shims/auto/runtime.mjs +0 -2
  411. package/_shims/auto/runtime.mjs.map +0 -1
  412. package/_shims/auto/types-node.d.ts +0 -5
  413. package/_shims/auto/types-node.d.ts.map +0 -1
  414. package/_shims/auto/types-node.js +0 -21
  415. package/_shims/auto/types-node.js.map +0 -1
  416. package/_shims/auto/types-node.mjs +0 -2
  417. package/_shims/auto/types-node.mjs.map +0 -1
  418. package/_shims/auto/types.d.ts +0 -101
  419. package/_shims/auto/types.js +0 -3
  420. package/_shims/auto/types.mjs +0 -3
  421. package/_shims/bun-runtime.d.ts +0 -6
  422. package/_shims/bun-runtime.d.ts.map +0 -1
  423. package/_shims/bun-runtime.js +0 -14
  424. package/_shims/bun-runtime.js.map +0 -1
  425. package/_shims/bun-runtime.mjs +0 -10
  426. package/_shims/bun-runtime.mjs.map +0 -1
  427. package/_shims/index.d.ts +0 -83
  428. package/_shims/index.js +0 -17
  429. package/_shims/index.mjs +0 -11
  430. package/_shims/manual-types.d.ts +0 -12
  431. package/_shims/manual-types.js +0 -3
  432. package/_shims/manual-types.mjs +0 -3
  433. package/_shims/node-runtime.d.ts +0 -3
  434. package/_shims/node-runtime.d.ts.map +0 -1
  435. package/_shims/node-runtime.js +0 -89
  436. package/_shims/node-runtime.js.map +0 -1
  437. package/_shims/node-runtime.mjs +0 -56
  438. package/_shims/node-runtime.mjs.map +0 -1
  439. package/_shims/node-types.d.ts +0 -42
  440. package/_shims/node-types.js +0 -3
  441. package/_shims/node-types.mjs +0 -3
  442. package/_shims/registry.d.ts +0 -37
  443. package/_shims/registry.d.ts.map +0 -1
  444. package/_shims/registry.js +0 -41
  445. package/_shims/registry.js.map +0 -1
  446. package/_shims/registry.mjs +0 -37
  447. package/_shims/registry.mjs.map +0 -1
  448. package/_shims/web-runtime.d.ts +0 -5
  449. package/_shims/web-runtime.d.ts.map +0 -1
  450. package/_shims/web-runtime.js +0 -78
  451. package/_shims/web-runtime.js.map +0 -1
  452. package/_shims/web-runtime.mjs +0 -71
  453. package/_shims/web-runtime.mjs.map +0 -1
  454. package/_shims/web-types.d.ts +0 -83
  455. package/_shims/web-types.js +0 -3
  456. package/_shims/web-types.mjs +0 -3
  457. package/core.d.ts +0 -255
  458. package/core.d.ts.map +0 -1
  459. package/core.js +0 -924
  460. package/core.js.map +0 -1
  461. package/core.mjs +0 -892
  462. package/core.mjs.map +0 -1
  463. package/shims/node.d.ts +0 -30
  464. package/shims/node.d.ts.map +0 -1
  465. package/shims/node.js +0 -31
  466. package/shims/node.js.map +0 -1
  467. package/shims/node.mjs +0 -5
  468. package/shims/node.mjs.map +0 -1
  469. package/shims/web.d.ts +0 -26
  470. package/shims/web.d.ts.map +0 -1
  471. package/shims/web.js +0 -31
  472. package/shims/web.js.map +0 -1
  473. package/shims/web.mjs +0 -5
  474. package/shims/web.mjs.map +0 -1
  475. package/src/_shims/MultipartBody.ts +0 -9
  476. package/src/_shims/README.md +0 -46
  477. package/src/_shims/auto/runtime-bun.ts +0 -4
  478. package/src/_shims/auto/runtime-node.ts +0 -4
  479. package/src/_shims/auto/runtime.ts +0 -4
  480. package/src/_shims/auto/types-node.ts +0 -4
  481. package/src/_shims/auto/types.d.ts +0 -101
  482. package/src/_shims/auto/types.js +0 -3
  483. package/src/_shims/auto/types.mjs +0 -3
  484. package/src/_shims/bun-runtime.ts +0 -14
  485. package/src/_shims/index.d.ts +0 -83
  486. package/src/_shims/index.js +0 -17
  487. package/src/_shims/index.mjs +0 -11
  488. package/src/_shims/manual-types.d.ts +0 -12
  489. package/src/_shims/manual-types.js +0 -3
  490. package/src/_shims/manual-types.mjs +0 -3
  491. package/src/_shims/node-runtime.ts +0 -81
  492. package/src/_shims/node-types.d.ts +0 -42
  493. package/src/_shims/node-types.js +0 -3
  494. package/src/_shims/node-types.mjs +0 -3
  495. package/src/_shims/registry.ts +0 -67
  496. package/src/_shims/web-runtime.ts +0 -103
  497. package/src/_shims/web-types.d.ts +0 -83
  498. package/src/_shims/web-types.js +0 -3
  499. package/src/_shims/web-types.mjs +0 -3
  500. package/src/core.ts +0 -1236
  501. package/src/shims/node.ts +0 -50
  502. package/src/shims/web.ts +0 -50
package/index.js CHANGED
@@ -1,144 +1,19 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
- var _RunwayML_instances, _a, _RunwayML_baseURLOverridden;
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.AbortError = exports.TaskTimedOutError = exports.TaskFailedError = exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.RunwayMLError = exports.fileFromPath = exports.toFile = exports.RunwayML = void 0;
29
- const Core = __importStar(require("./core.js"));
30
- const Errors = __importStar(require("./error.js"));
31
- const Uploads = __importStar(require("./uploads.js"));
32
- const API = __importStar(require("./resources/index.js"));
33
- const character_performance_1 = require("./resources/character-performance.js");
34
- const image_to_video_1 = require("./resources/image-to-video.js");
35
- const organization_1 = require("./resources/organization.js");
36
- const tasks_1 = require("./resources/tasks.js");
37
- const text_to_image_1 = require("./resources/text-to-image.js");
38
- const text_to_speech_1 = require("./resources/text-to-speech.js");
39
- const text_to_video_1 = require("./resources/text-to-video.js");
40
- const video_to_video_1 = require("./resources/video-to-video.js");
41
- const video_upscale_1 = require("./resources/video-upscale.js");
42
- /**
43
- * API Client for interfacing with the RunwayML API.
44
- */
45
- class RunwayML extends Core.APIClient {
46
- /**
47
- * API Client for interfacing with the RunwayML API.
48
- *
49
- * @param {string | undefined} [opts.apiKey=process.env['RUNWAYML_API_SECRET'] ?? undefined]
50
- * @param {string | undefined} [opts.runwayVersion=2024-11-06]
51
- * @param {string} [opts.baseURL=process.env['RUNWAYML_BASE_URL'] ?? https://api.dev.runwayml.com] - Override the default base URL for the API.
52
- * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
53
- * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
54
- * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
55
- * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
56
- * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
57
- * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
58
- */
59
- constructor({ baseURL = Core.readEnv('RUNWAYML_BASE_URL'), apiKey = Core.readEnv('RUNWAYML_API_SECRET'), runwayVersion = '2024-11-06', ...opts } = {}) {
60
- if (apiKey === undefined) {
61
- throw new Errors.RunwayMLError("The RUNWAYML_API_SECRET environment variable is missing or empty; either provide it, or instantiate the RunwayML client with an apiKey option, like new RunwayML({ apiKey: 'My API Key' }).");
62
- }
63
- const options = {
64
- apiKey,
65
- runwayVersion,
66
- ...opts,
67
- baseURL: baseURL || `https://api.dev.runwayml.com`,
68
- };
69
- if (Core.isRunningInBrowser()) {
70
- throw new Errors.RunwayMLError("It looks like you're running in a browser-like environment, which is disabled to protect your secret API credentials from attackers. If you have a strong business need for client-side use of this API, please open a GitHub issue with your use-case and security mitigations.");
71
- }
72
- super({
73
- baseURL: options.baseURL,
74
- baseURLOverridden: baseURL ? baseURL !== 'https://api.dev.runwayml.com' : false,
75
- timeout: options.timeout ?? 60000 /* 1 minute */,
76
- httpAgent: options.httpAgent,
77
- maxRetries: options.maxRetries,
78
- fetch: options.fetch,
79
- });
80
- _RunwayML_instances.add(this);
81
- this.tasks = new API.Tasks(this);
82
- this.imageToVideo = new API.ImageToVideo(this);
83
- this.videoToVideo = new API.VideoToVideo(this);
84
- this.textToVideo = new API.TextToVideo(this);
85
- this.textToImage = new API.TextToImage(this);
86
- this.videoUpscale = new API.VideoUpscale(this);
87
- this.characterPerformance = new API.CharacterPerformance(this);
88
- this.textToSpeech = new API.TextToSpeech(this);
89
- this.organization = new API.Organization(this);
90
- this._options = options;
91
- this.apiKey = apiKey;
92
- this.runwayVersion = runwayVersion;
93
- }
94
- defaultQuery() {
95
- return this._options.defaultQuery;
96
- }
97
- defaultHeaders(opts) {
98
- return {
99
- ...super.defaultHeaders(opts),
100
- 'X-Runway-Version': this.runwayVersion,
101
- ...this._options.defaultHeaders,
102
- };
103
- }
104
- authHeaders(opts) {
105
- return { Authorization: `Bearer ${this.apiKey}` };
106
- }
3
+ exports = module.exports = function (...args) {
4
+ return new exports.default(...args)
107
5
  }
108
- exports.RunwayML = RunwayML;
109
- _a = RunwayML, _RunwayML_instances = new WeakSet(), _RunwayML_baseURLOverridden = function _RunwayML_baseURLOverridden() {
110
- return this.baseURL !== 'https://api.dev.runwayml.com';
111
- };
112
- RunwayML.RunwayML = _a;
113
- RunwayML.DEFAULT_TIMEOUT = 60000; // 1 minute
114
- RunwayML.RunwayMLError = Errors.RunwayMLError;
115
- RunwayML.APIError = Errors.APIError;
116
- RunwayML.APIConnectionError = Errors.APIConnectionError;
117
- RunwayML.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
118
- RunwayML.APIUserAbortError = Errors.APIUserAbortError;
119
- RunwayML.NotFoundError = Errors.NotFoundError;
120
- RunwayML.ConflictError = Errors.ConflictError;
121
- RunwayML.RateLimitError = Errors.RateLimitError;
122
- RunwayML.BadRequestError = Errors.BadRequestError;
123
- RunwayML.AuthenticationError = Errors.AuthenticationError;
124
- RunwayML.InternalServerError = Errors.InternalServerError;
125
- RunwayML.PermissionDeniedError = Errors.PermissionDeniedError;
126
- RunwayML.UnprocessableEntityError = Errors.UnprocessableEntityError;
127
- RunwayML.toFile = Uploads.toFile;
128
- RunwayML.fileFromPath = Uploads.fileFromPath;
129
- RunwayML.Tasks = tasks_1.Tasks;
130
- RunwayML.ImageToVideo = image_to_video_1.ImageToVideo;
131
- RunwayML.VideoToVideo = video_to_video_1.VideoToVideo;
132
- RunwayML.TextToVideo = text_to_video_1.TextToVideo;
133
- RunwayML.TextToImage = text_to_image_1.TextToImage;
134
- RunwayML.VideoUpscale = video_upscale_1.VideoUpscale;
135
- RunwayML.CharacterPerformance = character_performance_1.CharacterPerformance;
136
- RunwayML.TextToSpeech = text_to_speech_1.TextToSpeech;
137
- RunwayML.Organization = organization_1.Organization;
138
- var uploads_1 = require("./uploads.js");
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.AbortError = exports.TaskTimedOutError = exports.TaskFailedError = exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.RunwayMLError = exports.RunwayML = exports.APIPromise = exports.toFile = exports.default = void 0;
8
+ var client_1 = require("./client.js");
9
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return client_1.RunwayML; } });
10
+ var uploads_1 = require("./core/uploads.js");
139
11
  Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_1.toFile; } });
140
- Object.defineProperty(exports, "fileFromPath", { enumerable: true, get: function () { return uploads_1.fileFromPath; } });
141
- var error_1 = require("./error.js");
12
+ var api_promise_1 = require("./core/api-promise.js");
13
+ Object.defineProperty(exports, "APIPromise", { enumerable: true, get: function () { return api_promise_1.APIPromise; } });
14
+ var client_2 = require("./client.js");
15
+ Object.defineProperty(exports, "RunwayML", { enumerable: true, get: function () { return client_2.RunwayML; } });
16
+ var error_1 = require("./core/error.js");
142
17
  Object.defineProperty(exports, "RunwayMLError", { enumerable: true, get: function () { return error_1.RunwayMLError; } });
143
18
  Object.defineProperty(exports, "APIError", { enumerable: true, get: function () { return error_1.APIError; } });
144
19
  Object.defineProperty(exports, "APIConnectionError", { enumerable: true, get: function () { return error_1.APIConnectionError; } });
@@ -156,6 +31,4 @@ var polling_1 = require("./lib/polling.js");
156
31
  Object.defineProperty(exports, "TaskFailedError", { enumerable: true, get: function () { return polling_1.TaskFailedError; } });
157
32
  Object.defineProperty(exports, "TaskTimedOutError", { enumerable: true, get: function () { return polling_1.TaskTimedOutError; } });
158
33
  Object.defineProperty(exports, "AbortError", { enumerable: true, get: function () { return polling_1.AbortError; } });
159
- exports = module.exports = RunwayML;
160
- exports.default = RunwayML;
161
34
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,gDAA+B;AAC/B,mDAAkC;AAClC,sDAAqC;AACrC,0DAAyC;AACzC,gFAI2C;AAC3C,kEAIoC;AACpC,8DAKkC;AAClC,gDAAgE;AAChE,gEAA4G;AAC5G,kEAIoC;AACpC,gEAA4G;AAC5G,kEAIoC;AACpC,gEAImC;AAqEnC;;GAEG;AACH,MAAa,QAAS,SAAQ,IAAI,CAAC,SAAS;IAM1C;;;;;;;;;;;;OAYG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAC3C,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAC5C,aAAa,GAAG,YAAY,EAC5B,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM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yD;AAA/B,iGAAA,MAAM,OAAA;AAChC,qDAAgD;AAAvC,yGAAA,UAAU,OAAA;AACnB,sCAAwD;AAA/C,kGAAA,QAAQ,OAAA;AACjB,yCAcsB;AAbpB,sGAAA,aAAa,OAAA;AACb,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA;AAG1B,4CAMuB;AALrB,0GAAA,eAAe,OAAA;AACf,4GAAA,iBAAiB,OAAA;AAEjB,qGAAA,UAAU,OAAA"}
package/index.mjs CHANGED
@@ -1,115 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- var _RunwayML_instances, _a, _RunwayML_baseURLOverridden;
3
- import * as Core from "./core.mjs";
4
- import * as Errors from "./error.mjs";
5
- import * as Uploads from "./uploads.mjs";
6
- import * as API from "./resources/index.mjs";
7
- import { CharacterPerformance, } from "./resources/character-performance.mjs";
8
- import { ImageToVideo, } from "./resources/image-to-video.mjs";
9
- import { Organization, } from "./resources/organization.mjs";
10
- import { Tasks } from "./resources/tasks.mjs";
11
- import { TextToImage } from "./resources/text-to-image.mjs";
12
- import { TextToSpeech, } from "./resources/text-to-speech.mjs";
13
- import { TextToVideo } from "./resources/text-to-video.mjs";
14
- import { VideoToVideo, } from "./resources/video-to-video.mjs";
15
- import { VideoUpscale, } from "./resources/video-upscale.mjs";
16
- /**
17
- * API Client for interfacing with the RunwayML API.
18
- */
19
- export class RunwayML extends Core.APIClient {
20
- /**
21
- * API Client for interfacing with the RunwayML API.
22
- *
23
- * @param {string | undefined} [opts.apiKey=process.env['RUNWAYML_API_SECRET'] ?? undefined]
24
- * @param {string | undefined} [opts.runwayVersion=2024-11-06]
25
- * @param {string} [opts.baseURL=process.env['RUNWAYML_BASE_URL'] ?? https://api.dev.runwayml.com] - Override the default base URL for the API.
26
- * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
27
- * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
28
- * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
29
- * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
30
- * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
31
- * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
32
- */
33
- constructor({ baseURL = Core.readEnv('RUNWAYML_BASE_URL'), apiKey = Core.readEnv('RUNWAYML_API_SECRET'), runwayVersion = '2024-11-06', ...opts } = {}) {
34
- if (apiKey === undefined) {
35
- throw new Errors.RunwayMLError("The RUNWAYML_API_SECRET environment variable is missing or empty; either provide it, or instantiate the RunwayML client with an apiKey option, like new RunwayML({ apiKey: 'My API Key' }).");
36
- }
37
- const options = {
38
- apiKey,
39
- runwayVersion,
40
- ...opts,
41
- baseURL: baseURL || `https://api.dev.runwayml.com`,
42
- };
43
- if (Core.isRunningInBrowser()) {
44
- throw new Errors.RunwayMLError("It looks like you're running in a browser-like environment, which is disabled to protect your secret API credentials from attackers. If you have a strong business need for client-side use of this API, please open a GitHub issue with your use-case and security mitigations.");
45
- }
46
- super({
47
- baseURL: options.baseURL,
48
- baseURLOverridden: baseURL ? baseURL !== 'https://api.dev.runwayml.com' : false,
49
- timeout: options.timeout ?? 60000 /* 1 minute */,
50
- httpAgent: options.httpAgent,
51
- maxRetries: options.maxRetries,
52
- fetch: options.fetch,
53
- });
54
- _RunwayML_instances.add(this);
55
- this.tasks = new API.Tasks(this);
56
- this.imageToVideo = new API.ImageToVideo(this);
57
- this.videoToVideo = new API.VideoToVideo(this);
58
- this.textToVideo = new API.TextToVideo(this);
59
- this.textToImage = new API.TextToImage(this);
60
- this.videoUpscale = new API.VideoUpscale(this);
61
- this.characterPerformance = new API.CharacterPerformance(this);
62
- this.textToSpeech = new API.TextToSpeech(this);
63
- this.organization = new API.Organization(this);
64
- this._options = options;
65
- this.apiKey = apiKey;
66
- this.runwayVersion = runwayVersion;
67
- }
68
- defaultQuery() {
69
- return this._options.defaultQuery;
70
- }
71
- defaultHeaders(opts) {
72
- return {
73
- ...super.defaultHeaders(opts),
74
- 'X-Runway-Version': this.runwayVersion,
75
- ...this._options.defaultHeaders,
76
- };
77
- }
78
- authHeaders(opts) {
79
- return { Authorization: `Bearer ${this.apiKey}` };
80
- }
81
- }
82
- _a = RunwayML, _RunwayML_instances = new WeakSet(), _RunwayML_baseURLOverridden = function _RunwayML_baseURLOverridden() {
83
- return this.baseURL !== 'https://api.dev.runwayml.com';
84
- };
85
- RunwayML.RunwayML = _a;
86
- RunwayML.DEFAULT_TIMEOUT = 60000; // 1 minute
87
- RunwayML.RunwayMLError = Errors.RunwayMLError;
88
- RunwayML.APIError = Errors.APIError;
89
- RunwayML.APIConnectionError = Errors.APIConnectionError;
90
- RunwayML.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
91
- RunwayML.APIUserAbortError = Errors.APIUserAbortError;
92
- RunwayML.NotFoundError = Errors.NotFoundError;
93
- RunwayML.ConflictError = Errors.ConflictError;
94
- RunwayML.RateLimitError = Errors.RateLimitError;
95
- RunwayML.BadRequestError = Errors.BadRequestError;
96
- RunwayML.AuthenticationError = Errors.AuthenticationError;
97
- RunwayML.InternalServerError = Errors.InternalServerError;
98
- RunwayML.PermissionDeniedError = Errors.PermissionDeniedError;
99
- RunwayML.UnprocessableEntityError = Errors.UnprocessableEntityError;
100
- RunwayML.toFile = Uploads.toFile;
101
- RunwayML.fileFromPath = Uploads.fileFromPath;
102
- RunwayML.Tasks = Tasks;
103
- RunwayML.ImageToVideo = ImageToVideo;
104
- RunwayML.VideoToVideo = VideoToVideo;
105
- RunwayML.TextToVideo = TextToVideo;
106
- RunwayML.TextToImage = TextToImage;
107
- RunwayML.VideoUpscale = VideoUpscale;
108
- RunwayML.CharacterPerformance = CharacterPerformance;
109
- RunwayML.TextToSpeech = TextToSpeech;
110
- RunwayML.Organization = Organization;
111
- export { toFile, fileFromPath } from "./uploads.mjs";
112
- export { RunwayMLError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.mjs";
113
- export { TaskFailedError, TaskTimedOutError, AbortError } from "./lib/polling.mjs";
114
- export default RunwayML;
2
+ export { RunwayML as default } from "./client.mjs";
3
+ export { toFile } from "./core/uploads.mjs";
4
+ export { APIPromise } from "./core/api-promise.mjs";
5
+ export { RunwayML } from "./client.mjs";
6
+ export { RunwayMLError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs";
7
+ export { TaskFailedError, TaskTimedOutError, AbortError, } from "./lib/polling.mjs";
115
8
  //# sourceMappingURL=index.mjs.map
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EACL,oBAAoB,GAGrB;OACM,EACL,YAAY,GAGb;OACM,EACL,YAAY,GAIb;OACM,EAAwB,KAAK,EAAE;OAC/B,EAAE,WAAW,EAAsD;OACnE,EACL,YAAY,GAGb;OACM,EAAE,WAAW,EAAsD;OACnE,EACL,YAAY,GAGb;OACM,EACL,YAAY,GAGb;AAqED;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,IAAI,CA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3B,EAAE,UAAU,EAAE;OACd,EAAE,QAAQ,EAAsB;OAChC,EACL,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;OAEM,EACL,eAAe,EACf,iBAAiB,EAEjB,UAAU,GAEX"}
@@ -0,0 +1,73 @@
1
+ export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
2
+ /**
3
+ * An alias to the builtin `RequestInit` type so we can
4
+ * easily alias it in import statements if there are name clashes.
5
+ *
6
+ * https://developer.mozilla.org/docs/Web/API/RequestInit
7
+ */
8
+ type _RequestInit = RequestInit;
9
+ /**
10
+ * An alias to the builtin `Response` type so we can
11
+ * easily alias it in import statements if there are name clashes.
12
+ *
13
+ * https://developer.mozilla.org/docs/Web/API/Response
14
+ */
15
+ type _Response = Response;
16
+ /**
17
+ * The type for the first argument to `fetch`.
18
+ *
19
+ * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource
20
+ */
21
+ type _RequestInfo = Request | URL | string;
22
+ /**
23
+ * The type for constructing `RequestInit` Headers.
24
+ *
25
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers
26
+ */
27
+ type _HeadersInit = RequestInit['headers'];
28
+ /**
29
+ * The type for constructing `RequestInit` body.
30
+ *
31
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#body
32
+ */
33
+ type _BodyInit = RequestInit['body'];
34
+ /**
35
+ * An alias to the builtin `Array<T>` type so we can
36
+ * easily alias it in import statements if there are name clashes.
37
+ */
38
+ type _Array<T> = Array<T>;
39
+ /**
40
+ * An alias to the builtin `Record<K, T>` type so we can
41
+ * easily alias it in import statements if there are name clashes.
42
+ */
43
+ type _Record<K extends keyof any, T> = Record<K, T>;
44
+ export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, };
45
+ /**
46
+ * A copy of the builtin `EndingType` type as it isn't fully supported in certain
47
+ * environments and attempting to reference the global version will error.
48
+ *
49
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941
50
+ */
51
+ type EndingType = 'native' | 'transparent';
52
+ /**
53
+ * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain
54
+ * environments and attempting to reference the global version will error.
55
+ *
56
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154
57
+ * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options
58
+ */
59
+ export interface BlobPropertyBag {
60
+ endings?: EndingType;
61
+ type?: string;
62
+ }
63
+ /**
64
+ * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain
65
+ * environments and attempting to reference the global version will error.
66
+ *
67
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503
68
+ * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options
69
+ */
70
+ export interface FilePropertyBag extends BlobPropertyBag {
71
+ lastModified?: number;
72
+ }
73
+ //# sourceMappingURL=builtin-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-types.d.mts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,73 @@
1
+ export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
2
+ /**
3
+ * An alias to the builtin `RequestInit` type so we can
4
+ * easily alias it in import statements if there are name clashes.
5
+ *
6
+ * https://developer.mozilla.org/docs/Web/API/RequestInit
7
+ */
8
+ type _RequestInit = RequestInit;
9
+ /**
10
+ * An alias to the builtin `Response` type so we can
11
+ * easily alias it in import statements if there are name clashes.
12
+ *
13
+ * https://developer.mozilla.org/docs/Web/API/Response
14
+ */
15
+ type _Response = Response;
16
+ /**
17
+ * The type for the first argument to `fetch`.
18
+ *
19
+ * https://developer.mozilla.org/docs/Web/API/Window/fetch#resource
20
+ */
21
+ type _RequestInfo = Request | URL | string;
22
+ /**
23
+ * The type for constructing `RequestInit` Headers.
24
+ *
25
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers
26
+ */
27
+ type _HeadersInit = RequestInit['headers'];
28
+ /**
29
+ * The type for constructing `RequestInit` body.
30
+ *
31
+ * https://developer.mozilla.org/docs/Web/API/RequestInit#body
32
+ */
33
+ type _BodyInit = RequestInit['body'];
34
+ /**
35
+ * An alias to the builtin `Array<T>` type so we can
36
+ * easily alias it in import statements if there are name clashes.
37
+ */
38
+ type _Array<T> = Array<T>;
39
+ /**
40
+ * An alias to the builtin `Record<K, T>` type so we can
41
+ * easily alias it in import statements if there are name clashes.
42
+ */
43
+ type _Record<K extends keyof any, T> = Record<K, T>;
44
+ export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, };
45
+ /**
46
+ * A copy of the builtin `EndingType` type as it isn't fully supported in certain
47
+ * environments and attempting to reference the global version will error.
48
+ *
49
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941
50
+ */
51
+ type EndingType = 'native' | 'transparent';
52
+ /**
53
+ * A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain
54
+ * environments and attempting to reference the global version will error.
55
+ *
56
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154
57
+ * https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options
58
+ */
59
+ export interface BlobPropertyBag {
60
+ endings?: EndingType;
61
+ type?: string;
62
+ }
63
+ /**
64
+ * A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain
65
+ * environments and attempting to reference the global version will error.
66
+ *
67
+ * https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503
68
+ * https://developer.mozilla.org/en-US/docs/Web/API/File/File#options
69
+ */
70
+ export interface FilePropertyBag extends BlobPropertyBag {
71
+ lastModified?: number;
72
+ }
73
+ //# sourceMappingURL=builtin-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-types.d.ts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=builtin-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-types.js","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export {};
3
+ //# sourceMappingURL=builtin-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-types.mjs","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -0,0 +1,15 @@
1
+ export declare const isRunningInBrowser: () => boolean;
2
+ type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';
3
+ type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown';
4
+ type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';
5
+ type PlatformProperties = {
6
+ 'X-Stainless-Lang': 'js';
7
+ 'X-Stainless-Package-Version': string;
8
+ 'X-Stainless-OS': PlatformName;
9
+ 'X-Stainless-Arch': Arch;
10
+ 'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';
11
+ 'X-Stainless-Runtime-Version': string;
12
+ };
13
+ export declare const getPlatformHeaders: () => PlatformProperties;
14
+ export {};
15
+ //# sourceMappingURL=detect-platform.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-platform.d.mts","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AA0BF,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAC5E,KAAK,YAAY,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC;AACd,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/D,KAAK,kBAAkB,GAAG;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,OAAO,EAAE,GAAG,SAAS,CAAC;IACnF,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAuIF,eAAO,MAAM,kBAAkB,0BAE9B,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const isRunningInBrowser: () => boolean;
2
+ type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';
3
+ type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown';
4
+ type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';
5
+ type PlatformProperties = {
6
+ 'X-Stainless-Lang': 'js';
7
+ 'X-Stainless-Package-Version': string;
8
+ 'X-Stainless-OS': PlatformName;
9
+ 'X-Stainless-Arch': Arch;
10
+ 'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';
11
+ 'X-Stainless-Runtime-Version': string;
12
+ };
13
+ export declare const getPlatformHeaders: () => PlatformProperties;
14
+ export {};
15
+ //# sourceMappingURL=detect-platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect-platform.d.ts","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AA0BF,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAC5E,KAAK,YAAY,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC;AACd,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/D,KAAK,kBAAkB,GAAG;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,OAAO,EAAE,GAAG,SAAS,CAAC;IACnF,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAuIF,eAAO,MAAM,kBAAkB,0BAE9B,CAAC"}