@chunkify/chunkify 0.5.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 (507) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/LICENSE +201 -0
  3. package/README.md +395 -0
  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 +222 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +222 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +509 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +505 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/pagination.d.mts +62 -0
  37. package/core/pagination.d.mts.map +1 -0
  38. package/core/pagination.d.ts +62 -0
  39. package/core/pagination.d.ts.map +1 -0
  40. package/core/pagination.js +108 -0
  41. package/core/pagination.js.map +1 -0
  42. package/core/pagination.mjs +102 -0
  43. package/core/pagination.mjs.map +1 -0
  44. package/core/resource.d.mts +6 -0
  45. package/core/resource.d.mts.map +1 -0
  46. package/core/resource.d.ts +6 -0
  47. package/core/resource.d.ts.map +1 -0
  48. package/core/resource.js +11 -0
  49. package/core/resource.js.map +1 -0
  50. package/core/resource.mjs +7 -0
  51. package/core/resource.mjs.map +1 -0
  52. package/core/uploads.d.mts +3 -0
  53. package/core/uploads.d.mts.map +1 -0
  54. package/core/uploads.d.ts +3 -0
  55. package/core/uploads.d.ts.map +1 -0
  56. package/core/uploads.js +6 -0
  57. package/core/uploads.js.map +1 -0
  58. package/core/uploads.mjs +2 -0
  59. package/core/uploads.mjs.map +1 -0
  60. package/error.d.mts +2 -0
  61. package/error.d.mts.map +1 -0
  62. package/error.d.ts +2 -0
  63. package/error.d.ts.map +1 -0
  64. package/error.js +6 -0
  65. package/error.js.map +1 -0
  66. package/error.mjs +2 -0
  67. package/error.mjs.map +1 -0
  68. package/index.d.mts +7 -0
  69. package/index.d.mts.map +1 -0
  70. package/index.d.ts +7 -0
  71. package/index.d.ts.map +1 -0
  72. package/index.js +32 -0
  73. package/index.js.map +1 -0
  74. package/index.mjs +8 -0
  75. package/index.mjs.map +1 -0
  76. package/internal/builtin-types.d.mts +73 -0
  77. package/internal/builtin-types.d.mts.map +1 -0
  78. package/internal/builtin-types.d.ts +73 -0
  79. package/internal/builtin-types.d.ts.map +1 -0
  80. package/internal/builtin-types.js +4 -0
  81. package/internal/builtin-types.js.map +1 -0
  82. package/internal/builtin-types.mjs +3 -0
  83. package/internal/builtin-types.mjs.map +1 -0
  84. package/internal/detect-platform.d.mts +15 -0
  85. package/internal/detect-platform.d.mts.map +1 -0
  86. package/internal/detect-platform.d.ts +15 -0
  87. package/internal/detect-platform.d.ts.map +1 -0
  88. package/internal/detect-platform.js +162 -0
  89. package/internal/detect-platform.js.map +1 -0
  90. package/internal/detect-platform.mjs +157 -0
  91. package/internal/detect-platform.mjs.map +1 -0
  92. package/internal/errors.d.mts +3 -0
  93. package/internal/errors.d.mts.map +1 -0
  94. package/internal/errors.d.ts +3 -0
  95. package/internal/errors.d.ts.map +1 -0
  96. package/internal/errors.js +41 -0
  97. package/internal/errors.js.map +1 -0
  98. package/internal/errors.mjs +36 -0
  99. package/internal/errors.mjs.map +1 -0
  100. package/internal/headers.d.mts +20 -0
  101. package/internal/headers.d.mts.map +1 -0
  102. package/internal/headers.d.ts +20 -0
  103. package/internal/headers.d.ts.map +1 -0
  104. package/internal/headers.js +79 -0
  105. package/internal/headers.js.map +1 -0
  106. package/internal/headers.mjs +74 -0
  107. package/internal/headers.mjs.map +1 -0
  108. package/internal/parse.d.mts +12 -0
  109. package/internal/parse.d.mts.map +1 -0
  110. package/internal/parse.d.ts +12 -0
  111. package/internal/parse.d.ts.map +1 -0
  112. package/internal/parse.js +35 -0
  113. package/internal/parse.js.map +1 -0
  114. package/internal/parse.mjs +32 -0
  115. package/internal/parse.mjs.map +1 -0
  116. package/internal/qs/formats.d.mts +7 -0
  117. package/internal/qs/formats.d.mts.map +1 -0
  118. package/internal/qs/formats.d.ts +7 -0
  119. package/internal/qs/formats.d.ts.map +1 -0
  120. package/internal/qs/formats.js +13 -0
  121. package/internal/qs/formats.js.map +1 -0
  122. package/internal/qs/formats.mjs +9 -0
  123. package/internal/qs/formats.mjs.map +1 -0
  124. package/internal/qs/index.d.mts +10 -0
  125. package/internal/qs/index.d.mts.map +1 -0
  126. package/internal/qs/index.d.ts +10 -0
  127. package/internal/qs/index.d.ts.map +1 -0
  128. package/internal/qs/index.js +14 -0
  129. package/internal/qs/index.js.map +1 -0
  130. package/internal/qs/index.mjs +10 -0
  131. package/internal/qs/index.mjs.map +1 -0
  132. package/internal/qs/stringify.d.mts +3 -0
  133. package/internal/qs/stringify.d.mts.map +1 -0
  134. package/internal/qs/stringify.d.ts +3 -0
  135. package/internal/qs/stringify.d.ts.map +1 -0
  136. package/internal/qs/stringify.js +277 -0
  137. package/internal/qs/stringify.js.map +1 -0
  138. package/internal/qs/stringify.mjs +274 -0
  139. package/internal/qs/stringify.mjs.map +1 -0
  140. package/internal/qs/types.d.mts +57 -0
  141. package/internal/qs/types.d.mts.map +1 -0
  142. package/internal/qs/types.d.ts +57 -0
  143. package/internal/qs/types.d.ts.map +1 -0
  144. package/internal/qs/types.js +3 -0
  145. package/internal/qs/types.js.map +1 -0
  146. package/internal/qs/types.mjs +2 -0
  147. package/internal/qs/types.mjs.map +1 -0
  148. package/internal/qs/utils.d.mts +15 -0
  149. package/internal/qs/utils.d.mts.map +1 -0
  150. package/internal/qs/utils.d.ts +15 -0
  151. package/internal/qs/utils.d.ts.map +1 -0
  152. package/internal/qs/utils.js +230 -0
  153. package/internal/qs/utils.js.map +1 -0
  154. package/internal/qs/utils.mjs +217 -0
  155. package/internal/qs/utils.mjs.map +1 -0
  156. package/internal/request-options.d.mts +75 -0
  157. package/internal/request-options.d.mts.map +1 -0
  158. package/internal/request-options.d.ts +75 -0
  159. package/internal/request-options.d.ts.map +1 -0
  160. package/internal/request-options.js +14 -0
  161. package/internal/request-options.js.map +1 -0
  162. package/internal/request-options.mjs +10 -0
  163. package/internal/request-options.mjs.map +1 -0
  164. package/internal/shim-types.d.mts +17 -0
  165. package/internal/shim-types.d.mts.map +1 -0
  166. package/internal/shim-types.d.ts +17 -0
  167. package/internal/shim-types.d.ts.map +1 -0
  168. package/internal/shim-types.js +4 -0
  169. package/internal/shim-types.js.map +1 -0
  170. package/internal/shim-types.mjs +3 -0
  171. package/internal/shim-types.mjs.map +1 -0
  172. package/internal/shims.d.mts +20 -0
  173. package/internal/shims.d.mts.map +1 -0
  174. package/internal/shims.d.ts +20 -0
  175. package/internal/shims.d.ts.map +1 -0
  176. package/internal/shims.js +92 -0
  177. package/internal/shims.js.map +1 -0
  178. package/internal/shims.mjs +85 -0
  179. package/internal/shims.mjs.map +1 -0
  180. package/internal/to-file.d.mts +45 -0
  181. package/internal/to-file.d.mts.map +1 -0
  182. package/internal/to-file.d.ts +45 -0
  183. package/internal/to-file.d.ts.map +1 -0
  184. package/internal/to-file.js +91 -0
  185. package/internal/to-file.js.map +1 -0
  186. package/internal/to-file.mjs +88 -0
  187. package/internal/to-file.mjs.map +1 -0
  188. package/internal/tslib.js +81 -0
  189. package/internal/tslib.mjs +17 -0
  190. package/internal/types.d.mts +69 -0
  191. package/internal/types.d.mts.map +1 -0
  192. package/internal/types.d.ts +69 -0
  193. package/internal/types.d.ts.map +1 -0
  194. package/internal/types.js +4 -0
  195. package/internal/types.js.map +1 -0
  196. package/internal/types.mjs +3 -0
  197. package/internal/types.mjs.map +1 -0
  198. package/internal/uploads.d.mts +42 -0
  199. package/internal/uploads.d.mts.map +1 -0
  200. package/internal/uploads.d.ts +42 -0
  201. package/internal/uploads.d.ts.map +1 -0
  202. package/internal/uploads.js +141 -0
  203. package/internal/uploads.js.map +1 -0
  204. package/internal/uploads.mjs +131 -0
  205. package/internal/uploads.mjs.map +1 -0
  206. package/internal/utils/base64.d.mts +3 -0
  207. package/internal/utils/base64.d.mts.map +1 -0
  208. package/internal/utils/base64.d.ts +3 -0
  209. package/internal/utils/base64.d.ts.map +1 -0
  210. package/internal/utils/base64.js +38 -0
  211. package/internal/utils/base64.js.map +1 -0
  212. package/internal/utils/base64.mjs +33 -0
  213. package/internal/utils/base64.mjs.map +1 -0
  214. package/internal/utils/bytes.d.mts +4 -0
  215. package/internal/utils/bytes.d.mts.map +1 -0
  216. package/internal/utils/bytes.d.ts +4 -0
  217. package/internal/utils/bytes.d.ts.map +1 -0
  218. package/internal/utils/bytes.js +31 -0
  219. package/internal/utils/bytes.js.map +1 -0
  220. package/internal/utils/bytes.mjs +26 -0
  221. package/internal/utils/bytes.mjs.map +1 -0
  222. package/internal/utils/env.d.mts +9 -0
  223. package/internal/utils/env.d.mts.map +1 -0
  224. package/internal/utils/env.d.ts +9 -0
  225. package/internal/utils/env.d.ts.map +1 -0
  226. package/internal/utils/env.js +22 -0
  227. package/internal/utils/env.js.map +1 -0
  228. package/internal/utils/env.mjs +18 -0
  229. package/internal/utils/env.mjs.map +1 -0
  230. package/internal/utils/log.d.mts +37 -0
  231. package/internal/utils/log.d.mts.map +1 -0
  232. package/internal/utils/log.d.ts +37 -0
  233. package/internal/utils/log.d.ts.map +1 -0
  234. package/internal/utils/log.js +85 -0
  235. package/internal/utils/log.js.map +1 -0
  236. package/internal/utils/log.mjs +79 -0
  237. package/internal/utils/log.mjs.map +1 -0
  238. package/internal/utils/path.d.mts +15 -0
  239. package/internal/utils/path.d.mts.map +1 -0
  240. package/internal/utils/path.d.ts +15 -0
  241. package/internal/utils/path.d.ts.map +1 -0
  242. package/internal/utils/path.js +79 -0
  243. package/internal/utils/path.js.map +1 -0
  244. package/internal/utils/path.mjs +74 -0
  245. package/internal/utils/path.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +7 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +7 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +11 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +8 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/package.json +149 -0
  279. package/pagination.d.mts +2 -0
  280. package/pagination.d.mts.map +1 -0
  281. package/pagination.d.ts +2 -0
  282. package/pagination.d.ts.map +1 -0
  283. package/pagination.js +6 -0
  284. package/pagination.js.map +1 -0
  285. package/pagination.mjs +2 -0
  286. package/pagination.mjs.map +1 -0
  287. package/resource.d.mts +2 -0
  288. package/resource.d.mts.map +1 -0
  289. package/resource.d.ts +2 -0
  290. package/resource.d.ts.map +1 -0
  291. package/resource.js +6 -0
  292. package/resource.js.map +1 -0
  293. package/resource.mjs +2 -0
  294. package/resource.mjs.map +1 -0
  295. package/resources/files.d.mts +236 -0
  296. package/resources/files.d.mts.map +1 -0
  297. package/resources/files.d.ts +236 -0
  298. package/resources/files.d.ts.map +1 -0
  299. package/resources/files.js +34 -0
  300. package/resources/files.js.map +1 -0
  301. package/resources/files.mjs +30 -0
  302. package/resources/files.mjs.map +1 -0
  303. package/resources/index.d.mts +11 -0
  304. package/resources/index.d.mts.map +1 -0
  305. package/resources/index.d.ts +11 -0
  306. package/resources/index.d.ts.map +1 -0
  307. package/resources/index.js +25 -0
  308. package/resources/index.js.map +1 -0
  309. package/resources/index.mjs +12 -0
  310. package/resources/index.mjs.map +1 -0
  311. package/resources/jobs/files.d.mts +24 -0
  312. package/resources/jobs/files.d.mts.map +1 -0
  313. package/resources/jobs/files.d.ts +24 -0
  314. package/resources/jobs/files.d.ts.map +1 -0
  315. package/resources/jobs/files.js +16 -0
  316. package/resources/jobs/files.js.map +1 -0
  317. package/resources/jobs/files.mjs +12 -0
  318. package/resources/jobs/files.mjs.map +1 -0
  319. package/resources/jobs/index.d.mts +5 -0
  320. package/resources/jobs/index.d.mts.map +1 -0
  321. package/resources/jobs/index.d.ts +5 -0
  322. package/resources/jobs/index.d.ts.map +1 -0
  323. package/resources/jobs/index.js +13 -0
  324. package/resources/jobs/index.js.map +1 -0
  325. package/resources/jobs/index.mjs +6 -0
  326. package/resources/jobs/index.mjs.map +1 -0
  327. package/resources/jobs/jobs.d.mts +1207 -0
  328. package/resources/jobs/jobs.d.mts.map +1 -0
  329. package/resources/jobs/jobs.d.ts +1207 -0
  330. package/resources/jobs/jobs.d.ts.map +1 -0
  331. package/resources/jobs/jobs.js +64 -0
  332. package/resources/jobs/jobs.js.map +1 -0
  333. package/resources/jobs/jobs.mjs +59 -0
  334. package/resources/jobs/jobs.mjs.map +1 -0
  335. package/resources/jobs/logs.d.mts +63 -0
  336. package/resources/jobs/logs.d.mts.map +1 -0
  337. package/resources/jobs/logs.d.ts +63 -0
  338. package/resources/jobs/logs.d.ts.map +1 -0
  339. package/resources/jobs/logs.js +16 -0
  340. package/resources/jobs/logs.js.map +1 -0
  341. package/resources/jobs/logs.mjs +12 -0
  342. package/resources/jobs/logs.mjs.map +1 -0
  343. package/resources/jobs/transcoders.d.mts +93 -0
  344. package/resources/jobs/transcoders.d.mts.map +1 -0
  345. package/resources/jobs/transcoders.d.ts +93 -0
  346. package/resources/jobs/transcoders.d.ts.map +1 -0
  347. package/resources/jobs/transcoders.js +16 -0
  348. package/resources/jobs/transcoders.js.map +1 -0
  349. package/resources/jobs/transcoders.mjs +12 -0
  350. package/resources/jobs/transcoders.mjs.map +1 -0
  351. package/resources/jobs.d.mts +2 -0
  352. package/resources/jobs.d.mts.map +1 -0
  353. package/resources/jobs.d.ts +2 -0
  354. package/resources/jobs.d.ts.map +1 -0
  355. package/resources/jobs.js +6 -0
  356. package/resources/jobs.js.map +1 -0
  357. package/resources/jobs.mjs +3 -0
  358. package/resources/jobs.mjs.map +1 -0
  359. package/resources/notifications.d.mts +118 -0
  360. package/resources/notifications.d.mts.map +1 -0
  361. package/resources/notifications.d.ts +118 -0
  362. package/resources/notifications.d.ts.map +1 -0
  363. package/resources/notifications.js +42 -0
  364. package/resources/notifications.js.map +1 -0
  365. package/resources/notifications.mjs +38 -0
  366. package/resources/notifications.mjs.map +1 -0
  367. package/resources/projects.d.mts +87 -0
  368. package/resources/projects.d.mts.map +1 -0
  369. package/resources/projects.d.ts +87 -0
  370. package/resources/projects.d.ts.map +1 -0
  371. package/resources/projects.js +51 -0
  372. package/resources/projects.js.map +1 -0
  373. package/resources/projects.mjs +47 -0
  374. package/resources/projects.mjs.map +1 -0
  375. package/resources/shared.d.mts +15 -0
  376. package/resources/shared.d.mts.map +1 -0
  377. package/resources/shared.d.ts +15 -0
  378. package/resources/shared.d.ts.map +1 -0
  379. package/resources/shared.js +4 -0
  380. package/resources/shared.js.map +1 -0
  381. package/resources/shared.mjs +3 -0
  382. package/resources/shared.mjs.map +1 -0
  383. package/resources/sources.d.mts +235 -0
  384. package/resources/sources.d.mts.map +1 -0
  385. package/resources/sources.d.ts +235 -0
  386. package/resources/sources.d.ts.map +1 -0
  387. package/resources/sources.js +43 -0
  388. package/resources/sources.js.map +1 -0
  389. package/resources/sources.mjs +39 -0
  390. package/resources/sources.mjs.map +1 -0
  391. package/resources/storages.d.mts +216 -0
  392. package/resources/storages.d.mts.map +1 -0
  393. package/resources/storages.d.ts +216 -0
  394. package/resources/storages.d.ts.map +1 -0
  395. package/resources/storages.js +41 -0
  396. package/resources/storages.js.map +1 -0
  397. package/resources/storages.mjs +37 -0
  398. package/resources/storages.mjs.map +1 -0
  399. package/resources/tokens.d.mts +74 -0
  400. package/resources/tokens.d.mts.map +1 -0
  401. package/resources/tokens.d.ts +74 -0
  402. package/resources/tokens.d.ts.map +1 -0
  403. package/resources/tokens.js +37 -0
  404. package/resources/tokens.js.map +1 -0
  405. package/resources/tokens.mjs +33 -0
  406. package/resources/tokens.mjs.map +1 -0
  407. package/resources/uploads.d.mts +117 -0
  408. package/resources/uploads.d.mts.map +1 -0
  409. package/resources/uploads.d.ts +117 -0
  410. package/resources/uploads.d.ts.map +1 -0
  411. package/resources/uploads.js +40 -0
  412. package/resources/uploads.js.map +1 -0
  413. package/resources/uploads.mjs +36 -0
  414. package/resources/uploads.mjs.map +1 -0
  415. package/resources/webhooks.d.mts +194 -0
  416. package/resources/webhooks.d.mts.map +1 -0
  417. package/resources/webhooks.d.ts +194 -0
  418. package/resources/webhooks.d.ts.map +1 -0
  419. package/resources/webhooks.js +64 -0
  420. package/resources/webhooks.js.map +1 -0
  421. package/resources/webhooks.mjs +60 -0
  422. package/resources/webhooks.mjs.map +1 -0
  423. package/resources.d.mts +2 -0
  424. package/resources.d.mts.map +1 -0
  425. package/resources.d.ts +2 -0
  426. package/resources.d.ts.map +1 -0
  427. package/resources.js +5 -0
  428. package/resources.js.map +1 -0
  429. package/resources.mjs +2 -0
  430. package/resources.mjs.map +1 -0
  431. package/src/api-promise.ts +2 -0
  432. package/src/client.ts +935 -0
  433. package/src/core/README.md +3 -0
  434. package/src/core/api-promise.ts +92 -0
  435. package/src/core/error.ts +130 -0
  436. package/src/core/pagination.ts +176 -0
  437. package/src/core/resource.ts +11 -0
  438. package/src/core/uploads.ts +2 -0
  439. package/src/error.ts +2 -0
  440. package/src/index.ts +23 -0
  441. package/src/internal/README.md +3 -0
  442. package/src/internal/builtin-types.ts +93 -0
  443. package/src/internal/detect-platform.ts +196 -0
  444. package/src/internal/errors.ts +33 -0
  445. package/src/internal/headers.ts +97 -0
  446. package/src/internal/parse.ts +50 -0
  447. package/src/internal/qs/LICENSE.md +13 -0
  448. package/src/internal/qs/README.md +3 -0
  449. package/src/internal/qs/formats.ts +10 -0
  450. package/src/internal/qs/index.ts +13 -0
  451. package/src/internal/qs/stringify.ts +385 -0
  452. package/src/internal/qs/types.ts +71 -0
  453. package/src/internal/qs/utils.ts +265 -0
  454. package/src/internal/request-options.ts +91 -0
  455. package/src/internal/shim-types.ts +26 -0
  456. package/src/internal/shims.ts +107 -0
  457. package/src/internal/to-file.ts +154 -0
  458. package/src/internal/types.ts +95 -0
  459. package/src/internal/uploads.ts +187 -0
  460. package/src/internal/utils/base64.ts +40 -0
  461. package/src/internal/utils/bytes.ts +32 -0
  462. package/src/internal/utils/env.ts +18 -0
  463. package/src/internal/utils/log.ts +126 -0
  464. package/src/internal/utils/path.ts +88 -0
  465. package/src/internal/utils/sleep.ts +3 -0
  466. package/src/internal/utils/uuid.ts +17 -0
  467. package/src/internal/utils/values.ts +105 -0
  468. package/src/internal/utils.ts +8 -0
  469. package/src/lib/.keep +4 -0
  470. package/src/pagination.ts +2 -0
  471. package/src/resource.ts +2 -0
  472. package/src/resources/files.ts +315 -0
  473. package/src/resources/index.ts +59 -0
  474. package/src/resources/jobs/files.ts +32 -0
  475. package/src/resources/jobs/index.ts +20 -0
  476. package/src/resources/jobs/jobs.ts +1690 -0
  477. package/src/resources/jobs/logs.ts +77 -0
  478. package/src/resources/jobs/transcoders.ts +118 -0
  479. package/src/resources/jobs.ts +3 -0
  480. package/src/resources/notifications.ts +190 -0
  481. package/src/resources/projects.ts +138 -0
  482. package/src/resources/shared.ts +29 -0
  483. package/src/resources/sources.ts +312 -0
  484. package/src/resources/storages.ts +335 -0
  485. package/src/resources/tokens.ts +107 -0
  486. package/src/resources/uploads.ts +164 -0
  487. package/src/resources/webhooks.ts +299 -0
  488. package/src/resources.ts +1 -0
  489. package/src/tsconfig.json +11 -0
  490. package/src/uploads.ts +2 -0
  491. package/src/version.ts +1 -0
  492. package/uploads.d.mts +2 -0
  493. package/uploads.d.mts.map +1 -0
  494. package/uploads.d.ts +2 -0
  495. package/uploads.d.ts.map +1 -0
  496. package/uploads.js +6 -0
  497. package/uploads.js.map +1 -0
  498. package/uploads.mjs +2 -0
  499. package/uploads.mjs.map +1 -0
  500. package/version.d.mts +2 -0
  501. package/version.d.mts.map +1 -0
  502. package/version.d.ts +2 -0
  503. package/version.d.ts.map +1 -0
  504. package/version.js +5 -0
  505. package/version.js.map +1 -0
  506. package/version.mjs +2 -0
  507. package/version.mjs.map +1 -0
@@ -0,0 +1,1690 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as JobsAPI from './jobs';
5
+ import * as Shared from '../shared';
6
+ import * as FilesAPI from './files';
7
+ import { FileListResponse, Files } from './files';
8
+ import * as LogsAPI from './logs';
9
+ import { LogListParams, LogListResponse, Logs } from './logs';
10
+ import * as TranscodersAPI from './transcoders';
11
+ import { TranscoderListResponse, Transcoders } from './transcoders';
12
+ import { APIPromise } from '../../core/api-promise';
13
+ import { PagePromise, PaginatedResults, type PaginatedResultsParams } from '../../core/pagination';
14
+ import { buildHeaders } from '../../internal/headers';
15
+ import { RequestOptions } from '../../internal/request-options';
16
+ import { path } from '../../internal/utils/path';
17
+
18
+ export class Jobs extends APIResource {
19
+ files: FilesAPI.Files = new FilesAPI.Files(this._client);
20
+ logs: LogsAPI.Logs = new LogsAPI.Logs(this._client);
21
+ transcoders: TranscodersAPI.Transcoders = new TranscodersAPI.Transcoders(this._client);
22
+
23
+ /**
24
+ * Create a new video processing job with specified parameters
25
+ */
26
+ create(body: JobCreateParams, options?: RequestOptions): APIPromise<Job> {
27
+ return (this._client.post('/api/jobs', { body, ...options }) as APIPromise<{ data: Job }>)._thenUnwrap(
28
+ (obj) => obj.data,
29
+ );
30
+ }
31
+
32
+ /**
33
+ * Retrieve details of a specific job
34
+ */
35
+ retrieve(jobID: string, options?: RequestOptions): APIPromise<Job> {
36
+ return (this._client.get(path`/api/jobs/${jobID}`, options) as APIPromise<{ data: Job }>)._thenUnwrap(
37
+ (obj) => obj.data,
38
+ );
39
+ }
40
+
41
+ /**
42
+ * Retrieve a list of jobs with optional filtering and pagination
43
+ */
44
+ list(
45
+ query: JobListParams | null | undefined = {},
46
+ options?: RequestOptions,
47
+ ): PagePromise<JobsPaginatedResults, Job> {
48
+ return this._client.getAPIList('/api/jobs', PaginatedResults<Job>, { query, ...options });
49
+ }
50
+
51
+ /**
52
+ * Delete a job.
53
+ */
54
+ delete(jobID: string, options?: RequestOptions): APIPromise<void> {
55
+ return this._client.delete(path`/api/jobs/${jobID}`, {
56
+ ...options,
57
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
58
+ });
59
+ }
60
+
61
+ /**
62
+ * Cancel a job.
63
+ */
64
+ cancel(jobID: string, options?: RequestOptions): APIPromise<void> {
65
+ return this._client.post(path`/api/jobs/${jobID}/cancel`, {
66
+ ...options,
67
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
68
+ });
69
+ }
70
+ }
71
+
72
+ export type JobsPaginatedResults = PaginatedResults<Job>;
73
+
74
+ export interface HlsAv1 {
75
+ id: 'hls_av1';
76
+
77
+ /**
78
+ * AudioBitrate specifies the audio bitrate in bits per second. Must be between
79
+ * 32Kbps and 512Kbps.
80
+ */
81
+ audio_bitrate?: number;
82
+
83
+ /**
84
+ * Bufsize specifies the video buffer size in bits. Must be between 100Kbps and
85
+ * 50Mbps.
86
+ */
87
+ bufsize?: number;
88
+
89
+ /**
90
+ * Channels specifies the number of audio channels. Valid values: 1 (mono), 2
91
+ * (stereo), 5 (5.1), 7 (7.1)
92
+ */
93
+ channels?: 1 | 2 | 5 | 7;
94
+
95
+ /**
96
+ * Crf (Constant Rate Factor) controls the quality of the output video. Lower
97
+ * values mean better quality but larger file size. Range: 16 to 63. Recommended
98
+ * values: 16-35 for high quality, 35-45 for good quality, 45-63 for acceptable
99
+ * quality.
100
+ */
101
+ crf?: number;
102
+
103
+ /**
104
+ * DisableAudio indicates whether to disable audio processing.
105
+ */
106
+ disable_audio?: boolean;
107
+
108
+ /**
109
+ * DisableVideo indicates whether to disable video processing.
110
+ */
111
+ disable_video?: boolean;
112
+
113
+ /**
114
+ * Duration specifies the duration to process in seconds. Must be a positive value.
115
+ */
116
+ duration?: number;
117
+
118
+ /**
119
+ * Framerate specifies the output video frame rate. Must be between 15 and 120 fps.
120
+ */
121
+ framerate?: number;
122
+
123
+ /**
124
+ * Gop specifies the Group of Pictures (GOP) size. Must be between 1 and 300.
125
+ */
126
+ gop?: number;
127
+
128
+ /**
129
+ * Height specifies the output video height in pixels. Must be between -2 and 7680.
130
+ * Use -2 for automatic calculation while maintaining aspect ratio.
131
+ */
132
+ height?: number;
133
+
134
+ /**
135
+ * HlsEnc enables encryption for HLS segments when set to true.
136
+ */
137
+ hls_enc?: boolean;
138
+
139
+ /**
140
+ * HlsEncIv specifies the initialization vector for encryption. Maximum length: 64
141
+ * characters. Required when HlsEnc is true.
142
+ */
143
+ hls_enc_iv?: string;
144
+
145
+ /**
146
+ * HlsEncKey specifies the encryption key for HLS segments. Maximum length: 64
147
+ * characters. Required when HlsEnc is true.
148
+ */
149
+ hls_enc_key?: string;
150
+
151
+ /**
152
+ * HlsEncKeyUrl specifies the URL where clients can fetch the encryption key.
153
+ * Required when HlsEnc is true.
154
+ */
155
+ hls_enc_key_url?: string;
156
+
157
+ /**
158
+ * HlsSegmentType specifies the type of HLS segments. Valid values:
159
+ *
160
+ * - mpegts: Traditional MPEG-TS segments, better compatibility
161
+ * - fmp4: Fragmented MP4 segments, better efficiency
162
+ */
163
+ hls_segment_type?: 'mpegts' | 'fmp4';
164
+
165
+ /**
166
+ * HlsTime specifies the duration of each HLS segment in seconds. Range: 1 to 10.
167
+ * Shorter segments provide faster startup but more overhead, longer segments are
168
+ * more efficient.
169
+ */
170
+ hls_time?: number;
171
+
172
+ /**
173
+ * Level specifies the AV1 profile level. Valid values: 30-31 (main), 41 (main10).
174
+ * Higher levels support higher resolutions and bitrates but require more
175
+ * processing power.
176
+ */
177
+ level?: 30 | 31 | 41;
178
+
179
+ /**
180
+ * Maxrate specifies the maximum video bitrate in bits per second. Must be between
181
+ * 100Kbps and 50Mbps.
182
+ */
183
+ maxrate?: number;
184
+
185
+ /**
186
+ * Minrate specifies the minimum video bitrate in bits per second. Must be between
187
+ * 100Kbps and 50Mbps.
188
+ */
189
+ minrate?: number;
190
+
191
+ movflags?: string;
192
+
193
+ /**
194
+ * PixFmt specifies the pixel format. Valid value: yuv420p
195
+ */
196
+ pixfmt?:
197
+ | 'yuv410p'
198
+ | 'yuv411p'
199
+ | 'yuv420p'
200
+ | 'yuv422p'
201
+ | 'yuv440p'
202
+ | 'yuv444p'
203
+ | 'yuvJ411p'
204
+ | 'yuvJ420p'
205
+ | 'yuvJ422p'
206
+ | 'yuvJ440p'
207
+ | 'yuvJ444p'
208
+ | 'yuv420p10le'
209
+ | 'yuv422p10le'
210
+ | 'yuv440p10le'
211
+ | 'yuv444p10le'
212
+ | 'yuv420p12le'
213
+ | 'yuv422p12le'
214
+ | 'yuv440p12le'
215
+ | 'yuv444p12le'
216
+ | 'yuv420p10be'
217
+ | 'yuv422p10be'
218
+ | 'yuv440p10be'
219
+ | 'yuv444p10be'
220
+ | 'yuv420p12be'
221
+ | 'yuv422p12be'
222
+ | 'yuv440p12be'
223
+ | 'yuv444p12be';
224
+
225
+ /**
226
+ * Preset controls the encoding efficiency and processing intensity. Lower presets
227
+ * use more optimization features, creating smaller files with better quality but
228
+ * requiring more compute time. Higher presets encode faster but produce larger
229
+ * files.
230
+ *
231
+ * Preset ranges:
232
+ *
233
+ * - 6-7: Fast encoding for real-time applications (smaller files)
234
+ * - 8-10: Balanced efficiency and speed for general use
235
+ * - 11-13: Fastest encoding for real-time applications (larger files)
236
+ */
237
+ preset?: '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13';
238
+
239
+ /**
240
+ * Profilev specifies the AV1 profile. Valid values:
241
+ *
242
+ * - main: Main profile, good for most applications
243
+ * - main10: Main 10-bit profile, supports 10-bit color
244
+ * - mainstillpicture: Still picture profile, optimized for single images
245
+ */
246
+ profilev?: 'main' | 'main10' | 'mainstillpicture';
247
+
248
+ /**
249
+ * Seek specifies the timestamp to start processing from (in seconds). Must be a
250
+ * positive value.
251
+ */
252
+ seek?: number;
253
+
254
+ /**
255
+ * VideoBitrate specifies the video bitrate in bits per second. Must be between
256
+ * 100Kbps and 50Mbps.
257
+ */
258
+ video_bitrate?: number;
259
+
260
+ /**
261
+ * Width specifies the output video width in pixels. Must be between -2 and 7680.
262
+ * Use -2 for automatic calculation while maintaining aspect ratio.
263
+ */
264
+ width?: number;
265
+ }
266
+
267
+ export interface HlsH264 {
268
+ id: 'hls_h264';
269
+
270
+ /**
271
+ * AudioBitrate specifies the audio bitrate in bits per second. Must be between
272
+ * 32Kbps and 512Kbps.
273
+ */
274
+ audio_bitrate?: number;
275
+
276
+ /**
277
+ * Bufsize specifies the video buffer size in bits. Must be between 100Kbps and
278
+ * 50Mbps.
279
+ */
280
+ bufsize?: number;
281
+
282
+ /**
283
+ * Channels specifies the number of audio channels. Valid values: 1 (mono), 2
284
+ * (stereo), 5 (5.1), 7 (7.1)
285
+ */
286
+ channels?: 1 | 2 | 5 | 7;
287
+
288
+ /**
289
+ * Crf (Constant Rate Factor) controls the quality of the output video. Lower
290
+ * values mean better quality but larger file size. Range: 16 to 35. Recommended
291
+ * values: 18-28 for high quality, 23-28 for good quality, 28-35 for acceptable
292
+ * quality.
293
+ */
294
+ crf?: number;
295
+
296
+ /**
297
+ * DisableAudio indicates whether to disable audio processing.
298
+ */
299
+ disable_audio?: boolean;
300
+
301
+ /**
302
+ * DisableVideo indicates whether to disable video processing.
303
+ */
304
+ disable_video?: boolean;
305
+
306
+ /**
307
+ * Duration specifies the duration to process in seconds. Must be a positive value.
308
+ */
309
+ duration?: number;
310
+
311
+ /**
312
+ * Framerate specifies the output video frame rate. Must be between 15 and 120 fps.
313
+ */
314
+ framerate?: number;
315
+
316
+ /**
317
+ * Gop specifies the Group of Pictures (GOP) size. Must be between 1 and 300.
318
+ */
319
+ gop?: number;
320
+
321
+ /**
322
+ * Height specifies the output video height in pixels. Must be between -2 and 7680.
323
+ * Use -2 for automatic calculation while maintaining aspect ratio.
324
+ */
325
+ height?: number;
326
+
327
+ /**
328
+ * HlsEnc enables encryption for HLS segments when set to true.
329
+ */
330
+ hls_enc?: boolean;
331
+
332
+ /**
333
+ * HlsEncIv specifies the initialization vector for encryption. Maximum length: 64
334
+ * characters. Required when HlsEnc is true.
335
+ */
336
+ hls_enc_iv?: string;
337
+
338
+ /**
339
+ * HlsEncKey specifies the encryption key for HLS segments. Maximum length: 64
340
+ * characters. Required when HlsEnc is true.
341
+ */
342
+ hls_enc_key?: string;
343
+
344
+ /**
345
+ * HlsEncKeyUrl specifies the URL where clients can fetch the encryption key.
346
+ * Required when HlsEnc is true.
347
+ */
348
+ hls_enc_key_url?: string;
349
+
350
+ /**
351
+ * HlsSegmentType specifies the type of HLS segments. Valid values:
352
+ *
353
+ * - mpegts: Traditional MPEG-TS segments, better compatibility
354
+ * - fmp4: Fragmented MP4 segments, better efficiency
355
+ */
356
+ hls_segment_type?: 'mpegts' | 'fmp4';
357
+
358
+ /**
359
+ * HlsTime specifies the duration of each HLS segment in seconds. Range: 1 to 10.
360
+ * Shorter segments provide faster startup but more overhead, longer segments are
361
+ * more efficient.
362
+ */
363
+ hls_time?: number;
364
+
365
+ /**
366
+ * Level specifies the H.264 profile level. Valid values: 10-13 (baseline), 20-22
367
+ * (main), 30-32 (high), 40-42 (high), 50-51 (high). Higher levels support higher
368
+ * resolutions and bitrates but require more processing power.
369
+ */
370
+ level?: 10 | 11 | 12 | 13 | 20 | 21 | 22 | 30 | 31 | 32 | 40 | 41 | 42 | 50 | 51;
371
+
372
+ /**
373
+ * Maxrate specifies the maximum video bitrate in bits per second. Must be between
374
+ * 100Kbps and 50Mbps.
375
+ */
376
+ maxrate?: number;
377
+
378
+ /**
379
+ * Minrate specifies the minimum video bitrate in bits per second. Must be between
380
+ * 100Kbps and 50Mbps.
381
+ */
382
+ minrate?: number;
383
+
384
+ movflags?: string;
385
+
386
+ /**
387
+ * PixFmt specifies the pixel format. Valid value: yuv420p
388
+ */
389
+ pixfmt?:
390
+ | 'yuv410p'
391
+ | 'yuv411p'
392
+ | 'yuv420p'
393
+ | 'yuv422p'
394
+ | 'yuv440p'
395
+ | 'yuv444p'
396
+ | 'yuvJ411p'
397
+ | 'yuvJ420p'
398
+ | 'yuvJ422p'
399
+ | 'yuvJ440p'
400
+ | 'yuvJ444p'
401
+ | 'yuv420p10le'
402
+ | 'yuv422p10le'
403
+ | 'yuv440p10le'
404
+ | 'yuv444p10le'
405
+ | 'yuv420p12le'
406
+ | 'yuv422p12le'
407
+ | 'yuv440p12le'
408
+ | 'yuv444p12le'
409
+ | 'yuv420p10be'
410
+ | 'yuv422p10be'
411
+ | 'yuv440p10be'
412
+ | 'yuv444p10be'
413
+ | 'yuv420p12be'
414
+ | 'yuv422p12be'
415
+ | 'yuv440p12be'
416
+ | 'yuv444p12be';
417
+
418
+ /**
419
+ * Preset specifies the encoding speed preset. Valid values (from fastest to
420
+ * slowest):
421
+ *
422
+ * - ultrafast: Fastest encoding, lowest quality
423
+ * - superfast: Very fast encoding, lower quality
424
+ * - veryfast: Fast encoding, moderate quality
425
+ * - faster: Faster encoding, good quality
426
+ * - fast: Fast encoding, better quality
427
+ * - medium: Balanced preset, best quality
428
+ */
429
+ preset?: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium';
430
+
431
+ /**
432
+ * Profilev specifies the H.264 profile. Valid values:
433
+ *
434
+ * - baseline: Basic profile, good for mobile devices
435
+ * - main: Main profile, good for most applications
436
+ * - high: High profile, best quality but requires more processing
437
+ * - high10: High 10-bit profile, supports 10-bit color
438
+ * - high422: High 4:2:2 profile, supports 4:2:2 color sampling
439
+ * - high444: High 4:4:4 profile, supports 4:4:4 color sampling
440
+ */
441
+ profilev?: 'baseline' | 'main' | 'high' | 'high10' | 'high422' | 'high444';
442
+
443
+ /**
444
+ * Seek specifies the timestamp to start processing from (in seconds). Must be a
445
+ * positive value.
446
+ */
447
+ seek?: number;
448
+
449
+ /**
450
+ * VideoBitrate specifies the video bitrate in bits per second. Must be between
451
+ * 100Kbps and 50Mbps.
452
+ */
453
+ video_bitrate?: number;
454
+
455
+ /**
456
+ * Width specifies the output video width in pixels. Must be between -2 and 7680.
457
+ * Use -2 for automatic calculation while maintaining aspect ratio.
458
+ */
459
+ width?: number;
460
+
461
+ /**
462
+ * X264KeyInt specifies the maximum number of frames between keyframes for H.264
463
+ * encoding. Range: 1 to 300. Higher values can improve compression but may affect
464
+ * seeking.
465
+ */
466
+ x264_keyint?: number;
467
+ }
468
+
469
+ export interface HlsH265 {
470
+ id: 'hls_h265';
471
+
472
+ /**
473
+ * AudioBitrate specifies the audio bitrate in bits per second. Must be between
474
+ * 32Kbps and 512Kbps.
475
+ */
476
+ audio_bitrate?: number;
477
+
478
+ /**
479
+ * Bufsize specifies the video buffer size in bits. Must be between 100Kbps and
480
+ * 50Mbps.
481
+ */
482
+ bufsize?: number;
483
+
484
+ /**
485
+ * Channels specifies the number of audio channels. Valid values: 1 (mono), 2
486
+ * (stereo), 5 (5.1), 7 (7.1)
487
+ */
488
+ channels?: 1 | 2 | 5 | 7;
489
+
490
+ /**
491
+ * Crf (Constant Rate Factor) controls the quality of the output video. Lower
492
+ * values mean better quality but larger file size. Range: 16 to 35. Recommended
493
+ * values: 18-28 for high quality, 23-28 for good quality, 28-35 for acceptable
494
+ * quality.
495
+ */
496
+ crf?: number;
497
+
498
+ /**
499
+ * DisableAudio indicates whether to disable audio processing.
500
+ */
501
+ disable_audio?: boolean;
502
+
503
+ /**
504
+ * DisableVideo indicates whether to disable video processing.
505
+ */
506
+ disable_video?: boolean;
507
+
508
+ /**
509
+ * Duration specifies the duration to process in seconds. Must be a positive value.
510
+ */
511
+ duration?: number;
512
+
513
+ /**
514
+ * Framerate specifies the output video frame rate. Must be between 15 and 120 fps.
515
+ */
516
+ framerate?: number;
517
+
518
+ /**
519
+ * Gop specifies the Group of Pictures (GOP) size. Must be between 1 and 300.
520
+ */
521
+ gop?: number;
522
+
523
+ /**
524
+ * Height specifies the output video height in pixels. Must be between -2 and 7680.
525
+ * Use -2 for automatic calculation while maintaining aspect ratio.
526
+ */
527
+ height?: number;
528
+
529
+ /**
530
+ * HlsEnc enables encryption for HLS segments when set to true.
531
+ */
532
+ hls_enc?: boolean;
533
+
534
+ /**
535
+ * HlsEncIv specifies the initialization vector for encryption. Maximum length: 64
536
+ * characters. Required when HlsEnc is true.
537
+ */
538
+ hls_enc_iv?: string;
539
+
540
+ /**
541
+ * HlsEncKey specifies the encryption key for HLS segments. Maximum length: 64
542
+ * characters. Required when HlsEnc is true.
543
+ */
544
+ hls_enc_key?: string;
545
+
546
+ /**
547
+ * HlsEncKeyUrl specifies the URL where clients can fetch the encryption key.
548
+ * Required when HlsEnc is true.
549
+ */
550
+ hls_enc_key_url?: string;
551
+
552
+ /**
553
+ * HlsSegmentType specifies the type of HLS segments. Valid values:
554
+ *
555
+ * - mpegts: Traditional MPEG-TS segments, better compatibility
556
+ * - fmp4: Fragmented MP4 segments, better efficiency
557
+ */
558
+ hls_segment_type?: 'mpegts' | 'fmp4';
559
+
560
+ /**
561
+ * HlsTime specifies the duration of each HLS segment in seconds. Range: 1 to 10.
562
+ * Shorter segments provide faster startup but more overhead, longer segments are
563
+ * more efficient.
564
+ */
565
+ hls_time?: number;
566
+
567
+ /**
568
+ * Level specifies the H.265 profile level. Valid values: 30-31 (main), 41
569
+ * (main10). Higher levels support higher resolutions and bitrates but require more
570
+ * processing power.
571
+ */
572
+ level?: 30 | 31 | 41;
573
+
574
+ /**
575
+ * Maxrate specifies the maximum video bitrate in bits per second. Must be between
576
+ * 100Kbps and 50Mbps.
577
+ */
578
+ maxrate?: number;
579
+
580
+ /**
581
+ * Minrate specifies the minimum video bitrate in bits per second. Must be between
582
+ * 100Kbps and 50Mbps.
583
+ */
584
+ minrate?: number;
585
+
586
+ movflags?: string;
587
+
588
+ /**
589
+ * PixFmt specifies the pixel format. Valid value: yuv420p
590
+ */
591
+ pixfmt?:
592
+ | 'yuv410p'
593
+ | 'yuv411p'
594
+ | 'yuv420p'
595
+ | 'yuv422p'
596
+ | 'yuv440p'
597
+ | 'yuv444p'
598
+ | 'yuvJ411p'
599
+ | 'yuvJ420p'
600
+ | 'yuvJ422p'
601
+ | 'yuvJ440p'
602
+ | 'yuvJ444p'
603
+ | 'yuv420p10le'
604
+ | 'yuv422p10le'
605
+ | 'yuv440p10le'
606
+ | 'yuv444p10le'
607
+ | 'yuv420p12le'
608
+ | 'yuv422p12le'
609
+ | 'yuv440p12le'
610
+ | 'yuv444p12le'
611
+ | 'yuv420p10be'
612
+ | 'yuv422p10be'
613
+ | 'yuv440p10be'
614
+ | 'yuv444p10be'
615
+ | 'yuv420p12be'
616
+ | 'yuv422p12be'
617
+ | 'yuv440p12be'
618
+ | 'yuv444p12be';
619
+
620
+ /**
621
+ * Preset specifies the encoding speed preset. Valid values (from fastest to
622
+ * slowest):
623
+ *
624
+ * - ultrafast: Fastest encoding, lowest quality
625
+ * - superfast: Very fast encoding, lower quality
626
+ * - veryfast: Fast encoding, moderate quality
627
+ * - faster: Faster encoding, good quality
628
+ * - fast: Fast encoding, better quality
629
+ * - medium: Balanced preset, best quality
630
+ */
631
+ preset?: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium';
632
+
633
+ /**
634
+ * Profilev specifies the H.265 profile. Valid values:
635
+ *
636
+ * - main: Main profile, good for most applications
637
+ * - main10: Main 10-bit profile, supports 10-bit color
638
+ * - mainstillpicture: Still picture profile, optimized for single images
639
+ */
640
+ profilev?: 'main' | 'main10' | 'mainstillpicture';
641
+
642
+ /**
643
+ * Seek specifies the timestamp to start processing from (in seconds). Must be a
644
+ * positive value.
645
+ */
646
+ seek?: number;
647
+
648
+ /**
649
+ * VideoBitrate specifies the video bitrate in bits per second. Must be between
650
+ * 100Kbps and 50Mbps.
651
+ */
652
+ video_bitrate?: number;
653
+
654
+ /**
655
+ * Width specifies the output video width in pixels. Must be between -2 and 7680.
656
+ * Use -2 for automatic calculation while maintaining aspect ratio.
657
+ */
658
+ width?: number;
659
+
660
+ /**
661
+ * X265KeyInt specifies the maximum number of frames between keyframes for H.265
662
+ * encoding. Range: 1 to 300. Higher values can improve compression but may affect
663
+ * seeking.
664
+ */
665
+ x265_keyint?: number;
666
+ }
667
+
668
+ export interface Job {
669
+ /**
670
+ * Unique identifier for the job
671
+ */
672
+ id: string;
673
+
674
+ /**
675
+ * Billable time in seconds
676
+ */
677
+ billable_time: number;
678
+
679
+ /**
680
+ * Creation timestamp
681
+ */
682
+ created_at: string;
683
+
684
+ /**
685
+ * A template defines the transcoding parameters and settings for a job
686
+ */
687
+ format:
688
+ | Job.MP4Av1
689
+ | Job.MP4H264
690
+ | Job.MP4H265
691
+ | Job.WebmVp9
692
+ | Job.HlsAv1
693
+ | Job.HlsH264
694
+ | Job.HlsH265
695
+ | Job.Jpg;
696
+
697
+ /**
698
+ * Progress percentage of the job (0-100)
699
+ */
700
+ progress: number;
701
+
702
+ /**
703
+ * ID of the source video being transcoded
704
+ */
705
+ source_id: string;
706
+
707
+ /**
708
+ * Current status of the job
709
+ */
710
+ status:
711
+ | 'queued'
712
+ | 'ingesting'
713
+ | 'transcoding'
714
+ | 'downloading'
715
+ | 'merging'
716
+ | 'uploading'
717
+ | 'failed'
718
+ | 'completed'
719
+ | 'cancelled'
720
+ | 'merged'
721
+ | 'downloaded'
722
+ | 'transcoded'
723
+ | 'waiting';
724
+
725
+ /**
726
+ * Storage settings for where the job output will be saved
727
+ */
728
+ storage: Job.Storage;
729
+
730
+ /**
731
+ * The transcoder configuration for a job
732
+ */
733
+ transcoder: Job.Transcoder;
734
+
735
+ /**
736
+ * Last update timestamp
737
+ */
738
+ updated_at: string;
739
+
740
+ /**
741
+ * Error message for the job
742
+ */
743
+ error?: Shared.ChunkifyError;
744
+
745
+ /**
746
+ * HLS manifest ID
747
+ */
748
+ hls_manifest_id?: string;
749
+
750
+ /**
751
+ * Additional metadata for the job
752
+ */
753
+ metadata?: { [key: string]: string };
754
+
755
+ /**
756
+ * When the job started processing
757
+ */
758
+ started_at?: string;
759
+ }
760
+
761
+ export namespace Job {
762
+ /**
763
+ * FFmpeg encoding parameters specific to MP4 with AV1 encoding.
764
+ */
765
+ export interface MP4Av1 extends Omit<JobsAPI.MP4Av1, 'id'> {
766
+ /**
767
+ * The format ID
768
+ */
769
+ id: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
770
+ }
771
+
772
+ /**
773
+ * FFmpeg encoding parameters specific to MP4 with H.264 encoding.
774
+ */
775
+ export interface MP4H264 extends Omit<JobsAPI.MP4H264, 'id'> {
776
+ /**
777
+ * The format ID
778
+ */
779
+ id: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
780
+ }
781
+
782
+ /**
783
+ * FFmpeg encoding parameters specific to MP4 with H.265 encoding.
784
+ */
785
+ export interface MP4H265 extends Omit<JobsAPI.MP4H265, 'id'> {
786
+ /**
787
+ * The format ID
788
+ */
789
+ id: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
790
+ }
791
+
792
+ /**
793
+ * FFmpeg encoding parameters specific to WebM with VP9 encoding.
794
+ */
795
+ export interface WebmVp9 extends Omit<JobsAPI.WebmVp9, 'id'> {
796
+ /**
797
+ * The format ID
798
+ */
799
+ id: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
800
+ }
801
+
802
+ /**
803
+ * FFmpeg encoding parameters specific to HLS with AV1 encoding.
804
+ */
805
+ export interface HlsAv1 extends Omit<JobsAPI.HlsAv1, 'id'> {
806
+ /**
807
+ * The format ID
808
+ */
809
+ id: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
810
+ }
811
+
812
+ /**
813
+ * FFmpeg encoding parameters specific to HLS with H.264 encoding.
814
+ */
815
+ export interface HlsH264 extends Omit<JobsAPI.HlsH264, 'id'> {
816
+ /**
817
+ * The format ID
818
+ */
819
+ id: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
820
+ }
821
+
822
+ /**
823
+ * FFmpeg encoding parameters specific to HLS with H.265 encoding.
824
+ */
825
+ export interface HlsH265 extends Omit<JobsAPI.HlsH265, 'id'> {
826
+ /**
827
+ * The format ID
828
+ */
829
+ id: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
830
+ }
831
+
832
+ /**
833
+ * FFmpeg encoding parameters specific to JPEG image extraction.
834
+ */
835
+ export interface Jpg extends Omit<JobsAPI.Jpg, 'id'> {
836
+ /**
837
+ * The format ID
838
+ */
839
+ id: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
840
+ }
841
+
842
+ /**
843
+ * Storage settings for where the job output will be saved
844
+ */
845
+ export interface Storage {
846
+ /**
847
+ * ID of the storage
848
+ */
849
+ id: string;
850
+
851
+ /**
852
+ * Path where the output will be stored
853
+ */
854
+ path: string;
855
+ }
856
+
857
+ /**
858
+ * The transcoder configuration for a job
859
+ */
860
+ export interface Transcoder {
861
+ /**
862
+ * Whether the transcoder configuration is automatically set by Chunkify
863
+ */
864
+ auto: boolean;
865
+
866
+ /**
867
+ * Number of instances allocated
868
+ */
869
+ quantity: number;
870
+
871
+ /**
872
+ * Type of transcoder instance
873
+ */
874
+ type: '4vCPU' | '8vCPU' | '16vCPU';
875
+ }
876
+ }
877
+
878
+ /**
879
+ * FFmpeg encoding parameters specific to JPEG image extraction.
880
+ */
881
+ export interface Jpg {
882
+ id: 'jpg';
883
+
884
+ /**
885
+ * Time interval in seconds at which frames are extracted from the video (e.g.,
886
+ * interval=10 extracts frames at 0s, 10s, 20s, etc.). Must be between 1 and 60
887
+ * seconds.
888
+ */
889
+ interval: number;
890
+
891
+ chunk_duration?: number;
892
+
893
+ /**
894
+ * Duration specifies the duration to process in seconds. Must be a positive value.
895
+ */
896
+ duration?: number;
897
+
898
+ frames?: number;
899
+
900
+ height?: number;
901
+
902
+ /**
903
+ * Seek specifies the timestamp to start processing from (in seconds). Must be a
904
+ * positive value.
905
+ */
906
+ seek?: number;
907
+
908
+ sprite?: boolean;
909
+
910
+ width?: number;
911
+ }
912
+
913
+ export interface MP4Av1 {
914
+ id: 'mp4_av1';
915
+
916
+ /**
917
+ * AudioBitrate specifies the audio bitrate in bits per second. Must be between
918
+ * 32Kbps and 512Kbps.
919
+ */
920
+ audio_bitrate?: number;
921
+
922
+ /**
923
+ * Bufsize specifies the video buffer size in bits. Must be between 100Kbps and
924
+ * 50Mbps.
925
+ */
926
+ bufsize?: number;
927
+
928
+ /**
929
+ * Channels specifies the number of audio channels. Valid values: 1 (mono), 2
930
+ * (stereo), 5 (5.1), 7 (7.1)
931
+ */
932
+ channels?: 1 | 2 | 5 | 7;
933
+
934
+ /**
935
+ * Crf (Constant Rate Factor) controls the quality of the output video. Lower
936
+ * values mean better quality but larger file size. Range: 16 to 63. Recommended
937
+ * values: 16-35 for high quality, 35-45 for good quality, 45-63 for acceptable
938
+ * quality.
939
+ */
940
+ crf?: number;
941
+
942
+ /**
943
+ * DisableAudio indicates whether to disable audio processing.
944
+ */
945
+ disable_audio?: boolean;
946
+
947
+ /**
948
+ * DisableVideo indicates whether to disable video processing.
949
+ */
950
+ disable_video?: boolean;
951
+
952
+ /**
953
+ * Duration specifies the duration to process in seconds. Must be a positive value.
954
+ */
955
+ duration?: number;
956
+
957
+ /**
958
+ * Framerate specifies the output video frame rate. Must be between 15 and 120 fps.
959
+ */
960
+ framerate?: number;
961
+
962
+ /**
963
+ * Gop specifies the Group of Pictures (GOP) size. Must be between 1 and 300.
964
+ */
965
+ gop?: number;
966
+
967
+ /**
968
+ * Height specifies the output video height in pixels. Must be between -2 and 7680.
969
+ * Use -2 for automatic calculation while maintaining aspect ratio.
970
+ */
971
+ height?: number;
972
+
973
+ /**
974
+ * Level specifies the AV1 profile level. Valid values: 30-31 (main), 41 (main10).
975
+ * Higher levels support higher resolutions and bitrates but require more
976
+ * processing power.
977
+ */
978
+ level?: 30 | 31 | 41;
979
+
980
+ /**
981
+ * Maxrate specifies the maximum video bitrate in bits per second. Must be between
982
+ * 100Kbps and 50Mbps.
983
+ */
984
+ maxrate?: number;
985
+
986
+ /**
987
+ * Minrate specifies the minimum video bitrate in bits per second. Must be between
988
+ * 100Kbps and 50Mbps.
989
+ */
990
+ minrate?: number;
991
+
992
+ movflags?: string;
993
+
994
+ /**
995
+ * PixFmt specifies the pixel format. Valid value: yuv420p
996
+ */
997
+ pixfmt?:
998
+ | 'yuv410p'
999
+ | 'yuv411p'
1000
+ | 'yuv420p'
1001
+ | 'yuv422p'
1002
+ | 'yuv440p'
1003
+ | 'yuv444p'
1004
+ | 'yuvJ411p'
1005
+ | 'yuvJ420p'
1006
+ | 'yuvJ422p'
1007
+ | 'yuvJ440p'
1008
+ | 'yuvJ444p'
1009
+ | 'yuv420p10le'
1010
+ | 'yuv422p10le'
1011
+ | 'yuv440p10le'
1012
+ | 'yuv444p10le'
1013
+ | 'yuv420p12le'
1014
+ | 'yuv422p12le'
1015
+ | 'yuv440p12le'
1016
+ | 'yuv444p12le'
1017
+ | 'yuv420p10be'
1018
+ | 'yuv422p10be'
1019
+ | 'yuv440p10be'
1020
+ | 'yuv444p10be'
1021
+ | 'yuv420p12be'
1022
+ | 'yuv422p12be'
1023
+ | 'yuv440p12be'
1024
+ | 'yuv444p12be';
1025
+
1026
+ /**
1027
+ * Preset controls the encoding efficiency and processing intensity. Lower presets
1028
+ * use more optimization features, creating smaller files with better quality but
1029
+ * requiring more compute time. Higher presets encode faster but produce larger
1030
+ * files.
1031
+ *
1032
+ * Preset ranges:
1033
+ *
1034
+ * - 6-7: Fast encoding for real-time applications (smaller files)
1035
+ * - 8-10: Balanced efficiency and speed for general use
1036
+ * - 11-13: Fastest encoding for real-time applications (larger files)
1037
+ */
1038
+ preset?: '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13';
1039
+
1040
+ /**
1041
+ * Profilev specifies the AV1 profile. Valid values:
1042
+ *
1043
+ * - main: Main profile, good for most applications
1044
+ * - main10: Main 10-bit profile, supports 10-bit color
1045
+ * - mainstillpicture: Still picture profile, optimized for single images
1046
+ */
1047
+ profilev?: 'main' | 'main10' | 'mainstillpicture';
1048
+
1049
+ /**
1050
+ * Seek specifies the timestamp to start processing from (in seconds). Must be a
1051
+ * positive value.
1052
+ */
1053
+ seek?: number;
1054
+
1055
+ /**
1056
+ * VideoBitrate specifies the video bitrate in bits per second. Must be between
1057
+ * 100Kbps and 50Mbps.
1058
+ */
1059
+ video_bitrate?: number;
1060
+
1061
+ /**
1062
+ * Width specifies the output video width in pixels. Must be between -2 and 7680.
1063
+ * Use -2 for automatic calculation while maintaining aspect ratio.
1064
+ */
1065
+ width?: number;
1066
+ }
1067
+
1068
+ export interface MP4H264 {
1069
+ id: 'mp4_h264';
1070
+
1071
+ /**
1072
+ * AudioBitrate specifies the audio bitrate in bits per second. Must be between
1073
+ * 32Kbps and 512Kbps.
1074
+ */
1075
+ audio_bitrate?: number;
1076
+
1077
+ /**
1078
+ * Bufsize specifies the video buffer size in bits. Must be between 100Kbps and
1079
+ * 50Mbps.
1080
+ */
1081
+ bufsize?: number;
1082
+
1083
+ /**
1084
+ * Channels specifies the number of audio channels. Valid values: 1 (mono), 2
1085
+ * (stereo), 5 (5.1), 7 (7.1)
1086
+ */
1087
+ channels?: 1 | 2 | 5 | 7;
1088
+
1089
+ /**
1090
+ * Crf (Constant Rate Factor) controls the quality of the output video. Lower
1091
+ * values mean better quality but larger file size. Range: 16 to 35. Recommended
1092
+ * values: 18-28 for high quality, 23-28 for good quality, 28-35 for acceptable
1093
+ * quality.
1094
+ */
1095
+ crf?: number;
1096
+
1097
+ /**
1098
+ * DisableAudio indicates whether to disable audio processing.
1099
+ */
1100
+ disable_audio?: boolean;
1101
+
1102
+ /**
1103
+ * DisableVideo indicates whether to disable video processing.
1104
+ */
1105
+ disable_video?: boolean;
1106
+
1107
+ /**
1108
+ * Duration specifies the duration to process in seconds. Must be a positive value.
1109
+ */
1110
+ duration?: number;
1111
+
1112
+ /**
1113
+ * Framerate specifies the output video frame rate. Must be between 15 and 120 fps.
1114
+ */
1115
+ framerate?: number;
1116
+
1117
+ /**
1118
+ * Gop specifies the Group of Pictures (GOP) size. Must be between 1 and 300.
1119
+ */
1120
+ gop?: number;
1121
+
1122
+ /**
1123
+ * Height specifies the output video height in pixels. Must be between -2 and 7680.
1124
+ * Use -2 for automatic calculation while maintaining aspect ratio.
1125
+ */
1126
+ height?: number;
1127
+
1128
+ /**
1129
+ * Level specifies the H.264 profile level. Valid values: 10-13 (baseline), 20-22
1130
+ * (main), 30-32 (high), 40-42 (high), 50-51 (high). Higher levels support higher
1131
+ * resolutions and bitrates but require more processing power.
1132
+ */
1133
+ level?: 10 | 11 | 12 | 13 | 20 | 21 | 22 | 30 | 31 | 32 | 40 | 41 | 42 | 50 | 51;
1134
+
1135
+ /**
1136
+ * Maxrate specifies the maximum video bitrate in bits per second. Must be between
1137
+ * 100Kbps and 50Mbps.
1138
+ */
1139
+ maxrate?: number;
1140
+
1141
+ /**
1142
+ * Minrate specifies the minimum video bitrate in bits per second. Must be between
1143
+ * 100Kbps and 50Mbps.
1144
+ */
1145
+ minrate?: number;
1146
+
1147
+ movflags?: string;
1148
+
1149
+ /**
1150
+ * PixFmt specifies the pixel format. Valid value: yuv420p
1151
+ */
1152
+ pixfmt?:
1153
+ | 'yuv410p'
1154
+ | 'yuv411p'
1155
+ | 'yuv420p'
1156
+ | 'yuv422p'
1157
+ | 'yuv440p'
1158
+ | 'yuv444p'
1159
+ | 'yuvJ411p'
1160
+ | 'yuvJ420p'
1161
+ | 'yuvJ422p'
1162
+ | 'yuvJ440p'
1163
+ | 'yuvJ444p'
1164
+ | 'yuv420p10le'
1165
+ | 'yuv422p10le'
1166
+ | 'yuv440p10le'
1167
+ | 'yuv444p10le'
1168
+ | 'yuv420p12le'
1169
+ | 'yuv422p12le'
1170
+ | 'yuv440p12le'
1171
+ | 'yuv444p12le'
1172
+ | 'yuv420p10be'
1173
+ | 'yuv422p10be'
1174
+ | 'yuv440p10be'
1175
+ | 'yuv444p10be'
1176
+ | 'yuv420p12be'
1177
+ | 'yuv422p12be'
1178
+ | 'yuv440p12be'
1179
+ | 'yuv444p12be';
1180
+
1181
+ /**
1182
+ * Preset specifies the encoding speed preset. Valid values (from fastest to
1183
+ * slowest):
1184
+ *
1185
+ * - ultrafast: Fastest encoding, lowest quality
1186
+ * - superfast: Very fast encoding, lower quality
1187
+ * - veryfast: Fast encoding, moderate quality
1188
+ * - faster: Faster encoding, good quality
1189
+ * - fast: Fast encoding, better quality
1190
+ * - medium: Balanced preset, best quality
1191
+ */
1192
+ preset?: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium';
1193
+
1194
+ /**
1195
+ * Profilev specifies the H.264 profile. Valid values:
1196
+ *
1197
+ * - baseline: Basic profile, good for mobile devices
1198
+ * - main: Main profile, good for most applications
1199
+ * - high: High profile, best quality but requires more processing
1200
+ * - high10: High 10-bit profile, supports 10-bit color
1201
+ * - high422: High 4:2:2 profile, supports 4:2:2 color sampling
1202
+ * - high444: High 4:4:4 profile, supports 4:4:4 color sampling
1203
+ */
1204
+ profilev?: 'baseline' | 'main' | 'high' | 'high10' | 'high422' | 'high444';
1205
+
1206
+ /**
1207
+ * Seek specifies the timestamp to start processing from (in seconds). Must be a
1208
+ * positive value.
1209
+ */
1210
+ seek?: number;
1211
+
1212
+ /**
1213
+ * VideoBitrate specifies the video bitrate in bits per second. Must be between
1214
+ * 100Kbps and 50Mbps.
1215
+ */
1216
+ video_bitrate?: number;
1217
+
1218
+ /**
1219
+ * Width specifies the output video width in pixels. Must be between -2 and 7680.
1220
+ * Use -2 for automatic calculation while maintaining aspect ratio.
1221
+ */
1222
+ width?: number;
1223
+
1224
+ /**
1225
+ * X264KeyInt specifies the maximum number of frames between keyframes for H.264
1226
+ * encoding. Range: 1 to 300. Higher values can improve compression but may affect
1227
+ * seeking.
1228
+ */
1229
+ x264_keyint?: number;
1230
+ }
1231
+
1232
+ export interface MP4H265 {
1233
+ id: 'mp4_h265';
1234
+
1235
+ /**
1236
+ * AudioBitrate specifies the audio bitrate in bits per second. Must be between
1237
+ * 32Kbps and 512Kbps.
1238
+ */
1239
+ audio_bitrate?: number;
1240
+
1241
+ /**
1242
+ * Bufsize specifies the video buffer size in bits. Must be between 100Kbps and
1243
+ * 50Mbps.
1244
+ */
1245
+ bufsize?: number;
1246
+
1247
+ /**
1248
+ * Channels specifies the number of audio channels. Valid values: 1 (mono), 2
1249
+ * (stereo), 5 (5.1), 7 (7.1)
1250
+ */
1251
+ channels?: 1 | 2 | 5 | 7;
1252
+
1253
+ /**
1254
+ * Crf (Constant Rate Factor) controls the quality of the output video. Lower
1255
+ * values mean better quality but larger file size. Range: 16 to 35. Recommended
1256
+ * values: 18-28 for high quality, 23-28 for good quality, 28-35 for acceptable
1257
+ * quality.
1258
+ */
1259
+ crf?: number;
1260
+
1261
+ /**
1262
+ * DisableAudio indicates whether to disable audio processing.
1263
+ */
1264
+ disable_audio?: boolean;
1265
+
1266
+ /**
1267
+ * DisableVideo indicates whether to disable video processing.
1268
+ */
1269
+ disable_video?: boolean;
1270
+
1271
+ /**
1272
+ * Duration specifies the duration to process in seconds. Must be a positive value.
1273
+ */
1274
+ duration?: number;
1275
+
1276
+ /**
1277
+ * Framerate specifies the output video frame rate. Must be between 15 and 120 fps.
1278
+ */
1279
+ framerate?: number;
1280
+
1281
+ /**
1282
+ * Gop specifies the Group of Pictures (GOP) size. Must be between 1 and 300.
1283
+ */
1284
+ gop?: number;
1285
+
1286
+ /**
1287
+ * Height specifies the output video height in pixels. Must be between -2 and 7680.
1288
+ * Use -2 for automatic calculation while maintaining aspect ratio.
1289
+ */
1290
+ height?: number;
1291
+
1292
+ /**
1293
+ * Level specifies the H.265 profile level. Valid values: 30-31 (main), 41
1294
+ * (main10). Higher levels support higher resolutions and bitrates but require more
1295
+ * processing power.
1296
+ */
1297
+ level?: 30 | 31 | 41;
1298
+
1299
+ /**
1300
+ * Maxrate specifies the maximum video bitrate in bits per second. Must be between
1301
+ * 100Kbps and 50Mbps.
1302
+ */
1303
+ maxrate?: number;
1304
+
1305
+ /**
1306
+ * Minrate specifies the minimum video bitrate in bits per second. Must be between
1307
+ * 100Kbps and 50Mbps.
1308
+ */
1309
+ minrate?: number;
1310
+
1311
+ movflags?: string;
1312
+
1313
+ /**
1314
+ * PixFmt specifies the pixel format. Valid value: yuv420p
1315
+ */
1316
+ pixfmt?:
1317
+ | 'yuv410p'
1318
+ | 'yuv411p'
1319
+ | 'yuv420p'
1320
+ | 'yuv422p'
1321
+ | 'yuv440p'
1322
+ | 'yuv444p'
1323
+ | 'yuvJ411p'
1324
+ | 'yuvJ420p'
1325
+ | 'yuvJ422p'
1326
+ | 'yuvJ440p'
1327
+ | 'yuvJ444p'
1328
+ | 'yuv420p10le'
1329
+ | 'yuv422p10le'
1330
+ | 'yuv440p10le'
1331
+ | 'yuv444p10le'
1332
+ | 'yuv420p12le'
1333
+ | 'yuv422p12le'
1334
+ | 'yuv440p12le'
1335
+ | 'yuv444p12le'
1336
+ | 'yuv420p10be'
1337
+ | 'yuv422p10be'
1338
+ | 'yuv440p10be'
1339
+ | 'yuv444p10be'
1340
+ | 'yuv420p12be'
1341
+ | 'yuv422p12be'
1342
+ | 'yuv440p12be'
1343
+ | 'yuv444p12be';
1344
+
1345
+ /**
1346
+ * Preset specifies the encoding speed preset. Valid values (from fastest to
1347
+ * slowest):
1348
+ *
1349
+ * - ultrafast: Fastest encoding, lowest quality
1350
+ * - superfast: Very fast encoding, lower quality
1351
+ * - veryfast: Fast encoding, moderate quality
1352
+ * - faster: Faster encoding, good quality
1353
+ * - fast: Fast encoding, better quality
1354
+ * - medium: Balanced preset, best quality
1355
+ */
1356
+ preset?: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium';
1357
+
1358
+ /**
1359
+ * Profilev specifies the H.265 profile. Valid values:
1360
+ *
1361
+ * - main: Main profile, good for most applications
1362
+ * - main10: Main 10-bit profile, supports 10-bit color
1363
+ * - mainstillpicture: Still picture profile, optimized for single images
1364
+ */
1365
+ profilev?: 'main' | 'main10' | 'mainstillpicture';
1366
+
1367
+ /**
1368
+ * Seek specifies the timestamp to start processing from (in seconds). Must be a
1369
+ * positive value.
1370
+ */
1371
+ seek?: number;
1372
+
1373
+ /**
1374
+ * VideoBitrate specifies the video bitrate in bits per second. Must be between
1375
+ * 100Kbps and 50Mbps.
1376
+ */
1377
+ video_bitrate?: number;
1378
+
1379
+ /**
1380
+ * Width specifies the output video width in pixels. Must be between -2 and 7680.
1381
+ * Use -2 for automatic calculation while maintaining aspect ratio.
1382
+ */
1383
+ width?: number;
1384
+
1385
+ /**
1386
+ * X265KeyInt specifies the maximum number of frames between keyframes for H.265
1387
+ * encoding. Range: 1 to 300. Higher values can improve compression but may affect
1388
+ * seeking.
1389
+ */
1390
+ x265_keyint?: number;
1391
+ }
1392
+
1393
+ export interface WebmVp9 {
1394
+ id: 'webm_vp9';
1395
+
1396
+ /**
1397
+ * AudioBitrate specifies the audio bitrate in bits per second. Must be between
1398
+ * 32Kbps and 512Kbps.
1399
+ */
1400
+ audio_bitrate?: number;
1401
+
1402
+ /**
1403
+ * Bufsize specifies the video buffer size in bits. Must be between 100Kbps and
1404
+ * 50Mbps.
1405
+ */
1406
+ bufsize?: number;
1407
+
1408
+ /**
1409
+ * Channels specifies the number of audio channels. Valid values: 1 (mono), 2
1410
+ * (stereo), 5 (5.1), 7 (7.1)
1411
+ */
1412
+ channels?: 1 | 2 | 5 | 7;
1413
+
1414
+ /**
1415
+ * CpuUsed specifies the CPU usage level for VP9 encoding. Range: 0 to 8. Lower
1416
+ * values mean better quality but slower encoding, higher values mean faster
1417
+ * encoding but lower quality. Recommended values: 0-2 for high quality, 2-4 for
1418
+ * good quality, 4-6 for balanced, 6-8 for speed
1419
+ */
1420
+ cpu_used?: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';
1421
+
1422
+ /**
1423
+ * Crf (Constant Rate Factor) controls the quality of the output video. Lower
1424
+ * values mean better quality but larger file size. Range: 15 to 35. Recommended
1425
+ * values: 18-28 for high quality, 23-28 for good quality, 28-35 for acceptable
1426
+ * quality.
1427
+ */
1428
+ crf?: number;
1429
+
1430
+ /**
1431
+ * DisableAudio indicates whether to disable audio processing.
1432
+ */
1433
+ disable_audio?: boolean;
1434
+
1435
+ /**
1436
+ * DisableVideo indicates whether to disable video processing.
1437
+ */
1438
+ disable_video?: boolean;
1439
+
1440
+ /**
1441
+ * Duration specifies the duration to process in seconds. Must be a positive value.
1442
+ */
1443
+ duration?: number;
1444
+
1445
+ /**
1446
+ * Framerate specifies the output video frame rate. Must be between 15 and 120 fps.
1447
+ */
1448
+ framerate?: number;
1449
+
1450
+ /**
1451
+ * Gop specifies the Group of Pictures (GOP) size. Must be between 1 and 300.
1452
+ */
1453
+ gop?: number;
1454
+
1455
+ /**
1456
+ * Height specifies the output video height in pixels. Must be between -2 and 7680.
1457
+ * Use -2 for automatic calculation while maintaining aspect ratio.
1458
+ */
1459
+ height?: number;
1460
+
1461
+ /**
1462
+ * Maxrate specifies the maximum video bitrate in bits per second. Must be between
1463
+ * 100Kbps and 50Mbps.
1464
+ */
1465
+ maxrate?: number;
1466
+
1467
+ /**
1468
+ * Minrate specifies the minimum video bitrate in bits per second. Must be between
1469
+ * 100Kbps and 50Mbps.
1470
+ */
1471
+ minrate?: number;
1472
+
1473
+ /**
1474
+ * PixFmt specifies the pixel format. Valid value: yuv420p
1475
+ */
1476
+ pixfmt?:
1477
+ | 'yuv410p'
1478
+ | 'yuv411p'
1479
+ | 'yuv420p'
1480
+ | 'yuv422p'
1481
+ | 'yuv440p'
1482
+ | 'yuv444p'
1483
+ | 'yuvJ411p'
1484
+ | 'yuvJ420p'
1485
+ | 'yuvJ422p'
1486
+ | 'yuvJ440p'
1487
+ | 'yuvJ444p'
1488
+ | 'yuv420p10le'
1489
+ | 'yuv422p10le'
1490
+ | 'yuv440p10le'
1491
+ | 'yuv444p10le'
1492
+ | 'yuv420p12le'
1493
+ | 'yuv422p12le'
1494
+ | 'yuv440p12le'
1495
+ | 'yuv444p12le'
1496
+ | 'yuv420p10be'
1497
+ | 'yuv422p10be'
1498
+ | 'yuv440p10be'
1499
+ | 'yuv444p10be'
1500
+ | 'yuv420p12be'
1501
+ | 'yuv422p12be'
1502
+ | 'yuv440p12be'
1503
+ | 'yuv444p12be';
1504
+
1505
+ /**
1506
+ * Quality specifies the VP9 encoding quality preset. Valid values:
1507
+ *
1508
+ * - good: Balanced quality preset, good for most applications
1509
+ * - best: Best quality preset, slower encoding
1510
+ * - realtime: Fast encoding preset, suitable for live streaming
1511
+ */
1512
+ quality?: 'good' | 'best' | 'realtime';
1513
+
1514
+ /**
1515
+ * Seek specifies the timestamp to start processing from (in seconds). Must be a
1516
+ * positive value.
1517
+ */
1518
+ seek?: number;
1519
+
1520
+ /**
1521
+ * VideoBitrate specifies the video bitrate in bits per second. Must be between
1522
+ * 100Kbps and 50Mbps.
1523
+ */
1524
+ video_bitrate?: number;
1525
+
1526
+ /**
1527
+ * Width specifies the output video width in pixels. Must be between -2 and 7680.
1528
+ * Use -2 for automatic calculation while maintaining aspect ratio.
1529
+ */
1530
+ width?: number;
1531
+ }
1532
+
1533
+ export interface JobCreateParams {
1534
+ /**
1535
+ * Required format configuration, one and only one valid format configuration must
1536
+ * be provided. If you want to use a format without specifying any configuration,
1537
+ * use an empty object in the corresponding field.
1538
+ */
1539
+ format: MP4Av1 | MP4H264 | MP4H265 | WebmVp9 | HlsAv1 | HlsH264 | HlsH265 | Jpg;
1540
+
1541
+ /**
1542
+ * The ID of the source file to transcode
1543
+ */
1544
+ source_id: string;
1545
+
1546
+ /**
1547
+ * Optional HLS manifest configuration Use the same hls manifest ID to group
1548
+ * multiple jobs into a single HLS manifest By default, it's automatically
1549
+ * generated if no set for HLS jobs
1550
+ */
1551
+ hls_manifest_id?: string;
1552
+
1553
+ /**
1554
+ * Optional metadata to attach to the job (max 1024 bytes)
1555
+ */
1556
+ metadata?: { [key: string]: string };
1557
+
1558
+ /**
1559
+ * Optional storage configuration
1560
+ */
1561
+ storage?: JobCreateParams.Storage;
1562
+
1563
+ /**
1564
+ * Optional transcoder configuration. If not provided, the system will
1565
+ * automatically calculate the optimal quantity and CPU type based on the source
1566
+ * file specifications and output requirements. This auto-scaling ensures efficient
1567
+ * resource utilization.
1568
+ */
1569
+ transcoder?: JobCreateParams.Transcoder;
1570
+ }
1571
+
1572
+ export namespace JobCreateParams {
1573
+ /**
1574
+ * Optional storage configuration
1575
+ */
1576
+ export interface Storage {
1577
+ /**
1578
+ * Storage Id specifies the storage configuration to use from pre-configured
1579
+ * storage options. Must be 4-64 characters long and contain only alphanumeric
1580
+ * characters, underscores and hyphens. Optional if Storage Path is provided.
1581
+ */
1582
+ id?: string;
1583
+
1584
+ /**
1585
+ * Storage Path specifies a custom storage path where processed files will be
1586
+ * stored. Must be a valid file path with max length of 1024 characters. Optional
1587
+ * if Storage Id is provided.
1588
+ */
1589
+ path?: string;
1590
+ }
1591
+
1592
+ /**
1593
+ * Optional transcoder configuration. If not provided, the system will
1594
+ * automatically calculate the optimal quantity and CPU type based on the source
1595
+ * file specifications and output requirements. This auto-scaling ensures efficient
1596
+ * resource utilization.
1597
+ */
1598
+ export interface Transcoder {
1599
+ /**
1600
+ * Quantity specifies the number of transcoder instances. Required if Type is set.
1601
+ */
1602
+ quantity?: number;
1603
+
1604
+ /**
1605
+ * Type specifies the CPU configuration for each transcoder instance. Required if
1606
+ * Quantity is set.
1607
+ */
1608
+ type?: '4vCPU' | '8vCPU' | '16vCPU';
1609
+ }
1610
+ }
1611
+
1612
+ export interface JobListParams extends PaginatedResultsParams {
1613
+ /**
1614
+ * Filter by job ID
1615
+ */
1616
+ id?: string;
1617
+
1618
+ created?: JobListParams.Created;
1619
+
1620
+ /**
1621
+ * Filter by format id
1622
+ */
1623
+ format_id?: 'mp4_h264' | 'mp4_h265' | 'mp4_av1' | 'webm_vp9' | 'hls_h264' | 'hls_h265' | 'hls_av1' | 'jpg';
1624
+
1625
+ /**
1626
+ * Filter by hls manifest ID
1627
+ */
1628
+ hls_manifest_id?: string;
1629
+
1630
+ /**
1631
+ * Filter by metadata
1632
+ */
1633
+ metadata?: Array<Array<string>>;
1634
+
1635
+ /**
1636
+ * Filter by source ID
1637
+ */
1638
+ source_id?: string;
1639
+
1640
+ /**
1641
+ * Filter by job status
1642
+ */
1643
+ status?: 'completed' | 'processing' | 'failed' | 'cancelled' | 'queued';
1644
+ }
1645
+
1646
+ export namespace JobListParams {
1647
+ export interface Created {
1648
+ /**
1649
+ * Filter by creation date greater than or equal
1650
+ */
1651
+ gte?: number;
1652
+
1653
+ /**
1654
+ * Filter by creation date less than or equal
1655
+ */
1656
+ lte?: number;
1657
+
1658
+ /**
1659
+ * Sort by creation date (asc/desc)
1660
+ */
1661
+ sort?: 'asc' | 'desc';
1662
+ }
1663
+ }
1664
+
1665
+ Jobs.Files = Files;
1666
+ Jobs.Logs = Logs;
1667
+ Jobs.Transcoders = Transcoders;
1668
+
1669
+ export declare namespace Jobs {
1670
+ export {
1671
+ type HlsAv1 as HlsAv1,
1672
+ type HlsH264 as HlsH264,
1673
+ type HlsH265 as HlsH265,
1674
+ type Job as Job,
1675
+ type Jpg as Jpg,
1676
+ type MP4Av1 as MP4Av1,
1677
+ type MP4H264 as MP4H264,
1678
+ type MP4H265 as MP4H265,
1679
+ type WebmVp9 as WebmVp9,
1680
+ type JobsPaginatedResults as JobsPaginatedResults,
1681
+ type JobCreateParams as JobCreateParams,
1682
+ type JobListParams as JobListParams,
1683
+ };
1684
+
1685
+ export { Files as Files, type FileListResponse as FileListResponse };
1686
+
1687
+ export { Logs as Logs, type LogListResponse as LogListResponse, type LogListParams as LogListParams };
1688
+
1689
+ export { Transcoders as Transcoders, type TranscoderListResponse as TranscoderListResponse };
1690
+ }