transloadit 3.0.2 → 4.0.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (477) hide show
  1. package/CHANGELOG.md +9 -12
  2. package/README.md +175 -129
  3. package/dist/ApiError.d.ts +20 -0
  4. package/dist/ApiError.d.ts.map +1 -0
  5. package/dist/ApiError.js +35 -0
  6. package/dist/ApiError.js.map +1 -0
  7. package/dist/InconsistentResponseError.d.ts +4 -0
  8. package/dist/InconsistentResponseError.d.ts.map +1 -0
  9. package/dist/InconsistentResponseError.js +7 -0
  10. package/dist/InconsistentResponseError.js.map +1 -0
  11. package/dist/PaginationStream.d.ts +14 -0
  12. package/dist/PaginationStream.d.ts.map +1 -0
  13. package/dist/PaginationStream.js +39 -0
  14. package/dist/PaginationStream.js.map +1 -0
  15. package/dist/PollingTimeoutError.d.ts +5 -0
  16. package/dist/PollingTimeoutError.d.ts.map +1 -0
  17. package/dist/PollingTimeoutError.js +8 -0
  18. package/dist/PollingTimeoutError.js.map +1 -0
  19. package/dist/Transloadit.d.ts +227 -0
  20. package/dist/Transloadit.d.ts.map +1 -0
  21. package/dist/Transloadit.js +628 -0
  22. package/dist/Transloadit.js.map +1 -0
  23. package/dist/alphalib/types/assemblyStatus.d.ts +6208 -0
  24. package/dist/alphalib/types/assemblyStatus.d.ts.map +1 -0
  25. package/dist/alphalib/types/assemblyStatus.js +285 -0
  26. package/dist/alphalib/types/assemblyStatus.js.map +1 -0
  27. package/dist/alphalib/types/robots/_index.d.ts +56966 -0
  28. package/dist/alphalib/types/robots/_index.d.ts.map +1 -0
  29. package/dist/alphalib/types/robots/_index.js +347 -0
  30. package/dist/alphalib/types/robots/_index.js.map +1 -0
  31. package/dist/alphalib/types/robots/_instructions-primitives.d.ts +2157 -0
  32. package/dist/alphalib/types/robots/_instructions-primitives.d.ts.map +1 -0
  33. package/dist/alphalib/types/robots/_instructions-primitives.js +655 -0
  34. package/dist/alphalib/types/robots/_instructions-primitives.js.map +1 -0
  35. package/dist/alphalib/types/robots/audio-artwork.d.ts +628 -0
  36. package/dist/alphalib/types/robots/audio-artwork.d.ts.map +1 -0
  37. package/dist/alphalib/types/robots/audio-artwork.js +55 -0
  38. package/dist/alphalib/types/robots/audio-artwork.js.map +1 -0
  39. package/dist/alphalib/types/robots/audio-concat.d.ts +632 -0
  40. package/dist/alphalib/types/robots/audio-concat.d.ts.map +1 -0
  41. package/dist/alphalib/types/robots/audio-concat.js +66 -0
  42. package/dist/alphalib/types/robots/audio-concat.js.map +1 -0
  43. package/dist/alphalib/types/robots/audio-encode.d.ts +629 -0
  44. package/dist/alphalib/types/robots/audio-encode.d.ts.map +1 -0
  45. package/dist/alphalib/types/robots/audio-encode.js +55 -0
  46. package/dist/alphalib/types/robots/audio-encode.js.map +1 -0
  47. package/dist/alphalib/types/robots/audio-loop.d.ts +631 -0
  48. package/dist/alphalib/types/robots/audio-loop.d.ts.map +1 -0
  49. package/dist/alphalib/types/robots/audio-loop.js +54 -0
  50. package/dist/alphalib/types/robots/audio-loop.js.map +1 -0
  51. package/dist/alphalib/types/robots/audio-merge.d.ts +637 -0
  52. package/dist/alphalib/types/robots/audio-merge.d.ts.map +1 -0
  53. package/dist/alphalib/types/robots/audio-merge.js +65 -0
  54. package/dist/alphalib/types/robots/audio-merge.js.map +1 -0
  55. package/dist/alphalib/types/robots/audio-waveform.d.ts +642 -0
  56. package/dist/alphalib/types/robots/audio-waveform.d.ts.map +1 -0
  57. package/dist/alphalib/types/robots/audio-waveform.js +80 -0
  58. package/dist/alphalib/types/robots/audio-waveform.js.map +1 -0
  59. package/dist/alphalib/types/robots/azure-import.d.ts +46 -0
  60. package/dist/alphalib/types/robots/azure-import.d.ts.map +1 -0
  61. package/dist/alphalib/types/robots/azure-import.js +58 -0
  62. package/dist/alphalib/types/robots/azure-import.js.map +1 -0
  63. package/dist/alphalib/types/robots/azure-store.d.ts +129 -0
  64. package/dist/alphalib/types/robots/azure-store.d.ts.map +1 -0
  65. package/dist/alphalib/types/robots/azure-store.js +73 -0
  66. package/dist/alphalib/types/robots/azure-store.js.map +1 -0
  67. package/dist/alphalib/types/robots/backblaze-import.d.ts +49 -0
  68. package/dist/alphalib/types/robots/backblaze-import.d.ts.map +1 -0
  69. package/dist/alphalib/types/robots/backblaze-import.js +66 -0
  70. package/dist/alphalib/types/robots/backblaze-import.js.map +1 -0
  71. package/dist/alphalib/types/robots/backblaze-store.d.ts +111 -0
  72. package/dist/alphalib/types/robots/backblaze-store.d.ts.map +1 -0
  73. package/dist/alphalib/types/robots/backblaze-store.js +58 -0
  74. package/dist/alphalib/types/robots/backblaze-store.js.map +1 -0
  75. package/dist/alphalib/types/robots/cloudfiles-import.d.ts +55 -0
  76. package/dist/alphalib/types/robots/cloudfiles-import.d.ts.map +1 -0
  77. package/dist/alphalib/types/robots/cloudfiles-import.js +65 -0
  78. package/dist/alphalib/types/robots/cloudfiles-import.js.map +1 -0
  79. package/dist/alphalib/types/robots/cloudfiles-store.d.ts +114 -0
  80. package/dist/alphalib/types/robots/cloudfiles-store.d.ts.map +1 -0
  81. package/dist/alphalib/types/robots/cloudfiles-store.js +56 -0
  82. package/dist/alphalib/types/robots/cloudfiles-store.js.map +1 -0
  83. package/dist/alphalib/types/robots/cloudflare-import.d.ts +52 -0
  84. package/dist/alphalib/types/robots/cloudflare-import.d.ts.map +1 -0
  85. package/dist/alphalib/types/robots/cloudflare-import.js +68 -0
  86. package/dist/alphalib/types/robots/cloudflare-import.js.map +1 -0
  87. package/dist/alphalib/types/robots/cloudflare-store.d.ts +117 -0
  88. package/dist/alphalib/types/robots/cloudflare-store.d.ts.map +1 -0
  89. package/dist/alphalib/types/robots/cloudflare-store.js +57 -0
  90. package/dist/alphalib/types/robots/cloudflare-store.js.map +1 -0
  91. package/dist/alphalib/types/robots/digitalocean-import.d.ts +52 -0
  92. package/dist/alphalib/types/robots/digitalocean-import.d.ts.map +1 -0
  93. package/dist/alphalib/types/robots/digitalocean-import.js +65 -0
  94. package/dist/alphalib/types/robots/digitalocean-import.js.map +1 -0
  95. package/dist/alphalib/types/robots/digitalocean-store.d.ts +123 -0
  96. package/dist/alphalib/types/robots/digitalocean-store.d.ts.map +1 -0
  97. package/dist/alphalib/types/robots/digitalocean-store.js +62 -0
  98. package/dist/alphalib/types/robots/digitalocean-store.js.map +1 -0
  99. package/dist/alphalib/types/robots/document-autorotate.d.ts +91 -0
  100. package/dist/alphalib/types/robots/document-autorotate.d.ts.map +1 -0
  101. package/dist/alphalib/types/robots/document-autorotate.js +31 -0
  102. package/dist/alphalib/types/robots/document-autorotate.js.map +1 -0
  103. package/dist/alphalib/types/robots/document-convert.d.ts +118 -0
  104. package/dist/alphalib/types/robots/document-convert.d.ts.map +1 -0
  105. package/dist/alphalib/types/robots/document-convert.js +182 -0
  106. package/dist/alphalib/types/robots/document-convert.js.map +1 -0
  107. package/dist/alphalib/types/robots/document-merge.d.ts +97 -0
  108. package/dist/alphalib/types/robots/document-merge.d.ts.map +1 -0
  109. package/dist/alphalib/types/robots/document-merge.js +66 -0
  110. package/dist/alphalib/types/robots/document-merge.js.map +1 -0
  111. package/dist/alphalib/types/robots/document-ocr.d.ts +100 -0
  112. package/dist/alphalib/types/robots/document-ocr.d.ts.map +1 -0
  113. package/dist/alphalib/types/robots/document-ocr.js +65 -0
  114. package/dist/alphalib/types/robots/document-ocr.js.map +1 -0
  115. package/dist/alphalib/types/robots/document-split.d.ts +94 -0
  116. package/dist/alphalib/types/robots/document-split.d.ts.map +1 -0
  117. package/dist/alphalib/types/robots/document-split.js +34 -0
  118. package/dist/alphalib/types/robots/document-split.js.map +1 -0
  119. package/dist/alphalib/types/robots/document-thumbs.d.ts +134 -0
  120. package/dist/alphalib/types/robots/document-thumbs.d.ts.map +1 -0
  121. package/dist/alphalib/types/robots/document-thumbs.js +111 -0
  122. package/dist/alphalib/types/robots/document-thumbs.js.map +1 -0
  123. package/dist/alphalib/types/robots/dropbox-import.d.ts +43 -0
  124. package/dist/alphalib/types/robots/dropbox-import.d.ts.map +1 -0
  125. package/dist/alphalib/types/robots/dropbox-import.js +52 -0
  126. package/dist/alphalib/types/robots/dropbox-import.js.map +1 -0
  127. package/dist/alphalib/types/robots/dropbox-store.d.ts +114 -0
  128. package/dist/alphalib/types/robots/dropbox-store.d.ts.map +1 -0
  129. package/dist/alphalib/types/robots/dropbox-store.js +49 -0
  130. package/dist/alphalib/types/robots/dropbox-store.js.map +1 -0
  131. package/dist/alphalib/types/robots/edgly-deliver.d.ts +19 -0
  132. package/dist/alphalib/types/robots/edgly-deliver.d.ts.map +1 -0
  133. package/dist/alphalib/types/robots/edgly-deliver.js +31 -0
  134. package/dist/alphalib/types/robots/edgly-deliver.js.map +1 -0
  135. package/dist/alphalib/types/robots/file-compress.d.ts +106 -0
  136. package/dist/alphalib/types/robots/file-compress.d.ts.map +1 -0
  137. package/dist/alphalib/types/robots/file-compress.js +102 -0
  138. package/dist/alphalib/types/robots/file-compress.js.map +1 -0
  139. package/dist/alphalib/types/robots/file-decompress.d.ts +94 -0
  140. package/dist/alphalib/types/robots/file-decompress.d.ts.map +1 -0
  141. package/dist/alphalib/types/robots/file-decompress.js +81 -0
  142. package/dist/alphalib/types/robots/file-decompress.js.map +1 -0
  143. package/dist/alphalib/types/robots/file-filter.d.ts +107 -0
  144. package/dist/alphalib/types/robots/file-filter.d.ts.map +1 -0
  145. package/dist/alphalib/types/robots/file-filter.js +108 -0
  146. package/dist/alphalib/types/robots/file-filter.js.map +1 -0
  147. package/dist/alphalib/types/robots/file-hash.d.ts +94 -0
  148. package/dist/alphalib/types/robots/file-hash.d.ts.map +1 -0
  149. package/dist/alphalib/types/robots/file-hash.js +49 -0
  150. package/dist/alphalib/types/robots/file-hash.js.map +1 -0
  151. package/dist/alphalib/types/robots/file-preview.d.ts +393 -0
  152. package/dist/alphalib/types/robots/file-preview.d.ts.map +1 -0
  153. package/dist/alphalib/types/robots/file-preview.js +155 -0
  154. package/dist/alphalib/types/robots/file-preview.js.map +1 -0
  155. package/dist/alphalib/types/robots/file-read.d.ts +91 -0
  156. package/dist/alphalib/types/robots/file-read.d.ts.map +1 -0
  157. package/dist/alphalib/types/robots/file-read.js +34 -0
  158. package/dist/alphalib/types/robots/file-read.js.map +1 -0
  159. package/dist/alphalib/types/robots/file-serve.d.ts +95 -0
  160. package/dist/alphalib/types/robots/file-serve.d.ts.map +1 -0
  161. package/dist/alphalib/types/robots/file-serve.js +56 -0
  162. package/dist/alphalib/types/robots/file-serve.js.map +1 -0
  163. package/dist/alphalib/types/robots/file-verify.d.ts +100 -0
  164. package/dist/alphalib/types/robots/file-verify.d.ts.map +1 -0
  165. package/dist/alphalib/types/robots/file-verify.js +52 -0
  166. package/dist/alphalib/types/robots/file-verify.js.map +1 -0
  167. package/dist/alphalib/types/robots/file-virusscan.d.ts +97 -0
  168. package/dist/alphalib/types/robots/file-virusscan.d.ts.map +1 -0
  169. package/dist/alphalib/types/robots/file-virusscan.js +55 -0
  170. package/dist/alphalib/types/robots/file-virusscan.js.map +1 -0
  171. package/dist/alphalib/types/robots/file-watermark.d.ts +92 -0
  172. package/dist/alphalib/types/robots/file-watermark.d.ts.map +1 -0
  173. package/dist/alphalib/types/robots/file-watermark.js +13 -0
  174. package/dist/alphalib/types/robots/file-watermark.js.map +1 -0
  175. package/dist/alphalib/types/robots/ftp-import.d.ts +46 -0
  176. package/dist/alphalib/types/robots/ftp-import.d.ts.map +1 -0
  177. package/dist/alphalib/types/robots/ftp-import.js +47 -0
  178. package/dist/alphalib/types/robots/ftp-import.js.map +1 -0
  179. package/dist/alphalib/types/robots/ftp-store.d.ts +120 -0
  180. package/dist/alphalib/types/robots/ftp-store.d.ts.map +1 -0
  181. package/dist/alphalib/types/robots/ftp-store.js +57 -0
  182. package/dist/alphalib/types/robots/ftp-store.js.map +1 -0
  183. package/dist/alphalib/types/robots/google-import.d.ts +40 -0
  184. package/dist/alphalib/types/robots/google-import.d.ts.map +1 -0
  185. package/dist/alphalib/types/robots/google-import.js +65 -0
  186. package/dist/alphalib/types/robots/google-import.js.map +1 -0
  187. package/dist/alphalib/types/robots/google-store.d.ts +113 -0
  188. package/dist/alphalib/types/robots/google-store.d.ts.map +1 -0
  189. package/dist/alphalib/types/robots/google-store.js +86 -0
  190. package/dist/alphalib/types/robots/google-store.js.map +1 -0
  191. package/dist/alphalib/types/robots/html-convert.d.ts +115 -0
  192. package/dist/alphalib/types/robots/html-convert.d.ts.map +1 -0
  193. package/dist/alphalib/types/robots/html-convert.js +81 -0
  194. package/dist/alphalib/types/robots/html-convert.js.map +1 -0
  195. package/dist/alphalib/types/robots/http-import.d.ts +42 -0
  196. package/dist/alphalib/types/robots/http-import.d.ts.map +1 -0
  197. package/dist/alphalib/types/robots/http-import.js +76 -0
  198. package/dist/alphalib/types/robots/http-import.js.map +1 -0
  199. package/dist/alphalib/types/robots/image-describe.d.ts +103 -0
  200. package/dist/alphalib/types/robots/image-describe.d.ts.map +1 -0
  201. package/dist/alphalib/types/robots/image-describe.js +66 -0
  202. package/dist/alphalib/types/robots/image-describe.js.map +1 -0
  203. package/dist/alphalib/types/robots/image-facedetect.d.ts +109 -0
  204. package/dist/alphalib/types/robots/image-facedetect.d.ts.map +1 -0
  205. package/dist/alphalib/types/robots/image-facedetect.js +125 -0
  206. package/dist/alphalib/types/robots/image-facedetect.js.map +1 -0
  207. package/dist/alphalib/types/robots/image-generate.d.ts +229 -0
  208. package/dist/alphalib/types/robots/image-generate.d.ts.map +1 -0
  209. package/dist/alphalib/types/robots/image-generate.js +27 -0
  210. package/dist/alphalib/types/robots/image-generate.js.map +1 -0
  211. package/dist/alphalib/types/robots/image-merge.d.ts +109 -0
  212. package/dist/alphalib/types/robots/image-merge.d.ts.map +1 -0
  213. package/dist/alphalib/types/robots/image-merge.js +74 -0
  214. package/dist/alphalib/types/robots/image-merge.js.map +1 -0
  215. package/dist/alphalib/types/robots/image-ocr.d.ts +100 -0
  216. package/dist/alphalib/types/robots/image-ocr.d.ts.map +1 -0
  217. package/dist/alphalib/types/robots/image-ocr.js +64 -0
  218. package/dist/alphalib/types/robots/image-ocr.js.map +1 -0
  219. package/dist/alphalib/types/robots/image-optimize.d.ts +103 -0
  220. package/dist/alphalib/types/robots/image-optimize.d.ts.map +1 -0
  221. package/dist/alphalib/types/robots/image-optimize.js +60 -0
  222. package/dist/alphalib/types/robots/image-optimize.js.map +1 -0
  223. package/dist/alphalib/types/robots/image-remove-background.d.ts +98 -0
  224. package/dist/alphalib/types/robots/image-remove-background.d.ts.map +1 -0
  225. package/dist/alphalib/types/robots/image-remove-background.js +21 -0
  226. package/dist/alphalib/types/robots/image-remove-background.js.map +1 -0
  227. package/dist/alphalib/types/robots/image-resize.d.ts +696 -0
  228. package/dist/alphalib/types/robots/image-resize.d.ts.map +1 -0
  229. package/dist/alphalib/types/robots/image-resize.js +364 -0
  230. package/dist/alphalib/types/robots/image-resize.js.map +1 -0
  231. package/dist/alphalib/types/robots/media-playlist.d.ts +115 -0
  232. package/dist/alphalib/types/robots/media-playlist.d.ts.map +1 -0
  233. package/dist/alphalib/types/robots/media-playlist.js +56 -0
  234. package/dist/alphalib/types/robots/media-playlist.js.map +1 -0
  235. package/dist/alphalib/types/robots/meta-write.d.ts +623 -0
  236. package/dist/alphalib/types/robots/meta-write.d.ts.map +1 -0
  237. package/dist/alphalib/types/robots/meta-write.js +53 -0
  238. package/dist/alphalib/types/robots/meta-write.js.map +1 -0
  239. package/dist/alphalib/types/robots/minio-import.d.ts +52 -0
  240. package/dist/alphalib/types/robots/minio-import.d.ts.map +1 -0
  241. package/dist/alphalib/types/robots/minio-import.js +68 -0
  242. package/dist/alphalib/types/robots/minio-import.js.map +1 -0
  243. package/dist/alphalib/types/robots/minio-store.d.ts +120 -0
  244. package/dist/alphalib/types/robots/minio-store.d.ts.map +1 -0
  245. package/dist/alphalib/types/robots/minio-store.js +61 -0
  246. package/dist/alphalib/types/robots/minio-store.js.map +1 -0
  247. package/dist/alphalib/types/robots/progress-simulate.d.ts +29 -0
  248. package/dist/alphalib/types/robots/progress-simulate.d.ts.map +1 -0
  249. package/dist/alphalib/types/robots/progress-simulate.js +15 -0
  250. package/dist/alphalib/types/robots/progress-simulate.js.map +1 -0
  251. package/dist/alphalib/types/robots/s3-import.d.ts +52 -0
  252. package/dist/alphalib/types/robots/s3-import.d.ts.map +1 -0
  253. package/dist/alphalib/types/robots/s3-import.js +104 -0
  254. package/dist/alphalib/types/robots/s3-import.js.map +1 -0
  255. package/dist/alphalib/types/robots/s3-store.d.ts +135 -0
  256. package/dist/alphalib/types/robots/s3-store.d.ts.map +1 -0
  257. package/dist/alphalib/types/robots/s3-store.js +118 -0
  258. package/dist/alphalib/types/robots/s3-store.js.map +1 -0
  259. package/dist/alphalib/types/robots/script-run.d.ts +94 -0
  260. package/dist/alphalib/types/robots/script-run.d.ts.map +1 -0
  261. package/dist/alphalib/types/robots/script-run.js +79 -0
  262. package/dist/alphalib/types/robots/script-run.js.map +1 -0
  263. package/dist/alphalib/types/robots/sftp-import.d.ts +43 -0
  264. package/dist/alphalib/types/robots/sftp-import.d.ts.map +1 -0
  265. package/dist/alphalib/types/robots/sftp-import.js +45 -0
  266. package/dist/alphalib/types/robots/sftp-import.js.map +1 -0
  267. package/dist/alphalib/types/robots/sftp-store.d.ts +120 -0
  268. package/dist/alphalib/types/robots/sftp-store.d.ts.map +1 -0
  269. package/dist/alphalib/types/robots/sftp-store.js +58 -0
  270. package/dist/alphalib/types/robots/sftp-store.js.map +1 -0
  271. package/dist/alphalib/types/robots/speech-transcribe.d.ts +210 -0
  272. package/dist/alphalib/types/robots/speech-transcribe.d.ts.map +1 -0
  273. package/dist/alphalib/types/robots/speech-transcribe.js +80 -0
  274. package/dist/alphalib/types/robots/speech-transcribe.js.map +1 -0
  275. package/dist/alphalib/types/robots/supabase-import.d.ts +52 -0
  276. package/dist/alphalib/types/robots/supabase-import.d.ts.map +1 -0
  277. package/dist/alphalib/types/robots/supabase-import.js +70 -0
  278. package/dist/alphalib/types/robots/supabase-import.js.map +1 -0
  279. package/dist/alphalib/types/robots/supabase-store.d.ts +117 -0
  280. package/dist/alphalib/types/robots/supabase-store.d.ts.map +1 -0
  281. package/dist/alphalib/types/robots/supabase-store.js +54 -0
  282. package/dist/alphalib/types/robots/supabase-store.js.map +1 -0
  283. package/dist/alphalib/types/robots/swift-import.d.ts +52 -0
  284. package/dist/alphalib/types/robots/swift-import.d.ts.map +1 -0
  285. package/dist/alphalib/types/robots/swift-import.js +68 -0
  286. package/dist/alphalib/types/robots/swift-import.js.map +1 -0
  287. package/dist/alphalib/types/robots/swift-store.d.ts +120 -0
  288. package/dist/alphalib/types/robots/swift-store.d.ts.map +1 -0
  289. package/dist/alphalib/types/robots/swift-store.js +58 -0
  290. package/dist/alphalib/types/robots/swift-store.js.map +1 -0
  291. package/dist/alphalib/types/robots/text-speak.d.ts +106 -0
  292. package/dist/alphalib/types/robots/text-speak.d.ts.map +1 -0
  293. package/dist/alphalib/types/robots/text-speak.js +97 -0
  294. package/dist/alphalib/types/robots/text-speak.js.map +1 -0
  295. package/dist/alphalib/types/robots/text-translate.d.ts +100 -0
  296. package/dist/alphalib/types/robots/text-translate.d.ts.map +1 -0
  297. package/dist/alphalib/types/robots/text-translate.js +196 -0
  298. package/dist/alphalib/types/robots/text-translate.js.map +1 -0
  299. package/dist/alphalib/types/robots/tigris-import.d.ts +52 -0
  300. package/dist/alphalib/types/robots/tigris-import.d.ts.map +1 -0
  301. package/dist/alphalib/types/robots/tigris-import.js +68 -0
  302. package/dist/alphalib/types/robots/tigris-import.js.map +1 -0
  303. package/dist/alphalib/types/robots/tigris-store.d.ts +120 -0
  304. package/dist/alphalib/types/robots/tigris-store.d.ts.map +1 -0
  305. package/dist/alphalib/types/robots/tigris-store.js +61 -0
  306. package/dist/alphalib/types/robots/tigris-store.js.map +1 -0
  307. package/dist/alphalib/types/robots/tlcdn-deliver.d.ts +19 -0
  308. package/dist/alphalib/types/robots/tlcdn-deliver.d.ts.map +1 -0
  309. package/dist/alphalib/types/robots/tlcdn-deliver.js +31 -0
  310. package/dist/alphalib/types/robots/tlcdn-deliver.js.map +1 -0
  311. package/dist/alphalib/types/robots/tus-store.d.ts +110 -0
  312. package/dist/alphalib/types/robots/tus-store.d.ts.map +1 -0
  313. package/dist/alphalib/types/robots/tus-store.js +74 -0
  314. package/dist/alphalib/types/robots/tus-store.js.map +1 -0
  315. package/dist/alphalib/types/robots/upload-handle.d.ts +92 -0
  316. package/dist/alphalib/types/robots/upload-handle.d.ts.map +1 -0
  317. package/dist/alphalib/types/robots/upload-handle.js +54 -0
  318. package/dist/alphalib/types/robots/upload-handle.js.map +1 -0
  319. package/dist/alphalib/types/robots/video-adaptive.d.ts +640 -0
  320. package/dist/alphalib/types/robots/video-adaptive.d.ts.map +1 -0
  321. package/dist/alphalib/types/robots/video-adaptive.js +119 -0
  322. package/dist/alphalib/types/robots/video-adaptive.js.map +1 -0
  323. package/dist/alphalib/types/robots/video-concat.d.ts +634 -0
  324. package/dist/alphalib/types/robots/video-concat.d.ts.map +1 -0
  325. package/dist/alphalib/types/robots/video-concat.js +65 -0
  326. package/dist/alphalib/types/robots/video-concat.js.map +1 -0
  327. package/dist/alphalib/types/robots/video-encode.d.ts +1439 -0
  328. package/dist/alphalib/types/robots/video-encode.d.ts.map +1 -0
  329. package/dist/alphalib/types/robots/video-encode.js +157 -0
  330. package/dist/alphalib/types/robots/video-encode.js.map +1 -0
  331. package/dist/alphalib/types/robots/video-merge.d.ts +655 -0
  332. package/dist/alphalib/types/robots/video-merge.d.ts.map +1 -0
  333. package/dist/alphalib/types/robots/video-merge.js +64 -0
  334. package/dist/alphalib/types/robots/video-merge.js.map +1 -0
  335. package/dist/alphalib/types/robots/video-subtitle.d.ts +649 -0
  336. package/dist/alphalib/types/robots/video-subtitle.d.ts.map +1 -0
  337. package/dist/alphalib/types/robots/video-subtitle.js +77 -0
  338. package/dist/alphalib/types/robots/video-subtitle.js.map +1 -0
  339. package/dist/alphalib/types/robots/video-thumbs.d.ts +642 -0
  340. package/dist/alphalib/types/robots/video-thumbs.d.ts.map +1 -0
  341. package/dist/alphalib/types/robots/video-thumbs.js +79 -0
  342. package/dist/alphalib/types/robots/video-thumbs.js.map +1 -0
  343. package/dist/alphalib/types/robots/vimeo-store.d.ts +116 -0
  344. package/dist/alphalib/types/robots/vimeo-store.d.ts.map +1 -0
  345. package/dist/alphalib/types/robots/vimeo-store.js +81 -0
  346. package/dist/alphalib/types/robots/vimeo-store.js.map +1 -0
  347. package/dist/alphalib/types/robots/wasabi-import.d.ts +53 -0
  348. package/dist/alphalib/types/robots/wasabi-import.d.ts.map +1 -0
  349. package/dist/alphalib/types/robots/wasabi-import.js +72 -0
  350. package/dist/alphalib/types/robots/wasabi-import.js.map +1 -0
  351. package/dist/alphalib/types/robots/wasabi-store.d.ts +120 -0
  352. package/dist/alphalib/types/robots/wasabi-store.d.ts.map +1 -0
  353. package/dist/alphalib/types/robots/wasabi-store.js +59 -0
  354. package/dist/alphalib/types/robots/wasabi-store.js.map +1 -0
  355. package/dist/alphalib/types/robots/youtube-store.d.ts +110 -0
  356. package/dist/alphalib/types/robots/youtube-store.d.ts.map +1 -0
  357. package/dist/alphalib/types/robots/youtube-store.js +105 -0
  358. package/dist/alphalib/types/robots/youtube-store.js.map +1 -0
  359. package/dist/alphalib/types/stackVersions.d.ts +13 -0
  360. package/dist/alphalib/types/stackVersions.d.ts.map +1 -0
  361. package/dist/alphalib/types/stackVersions.js +16 -0
  362. package/dist/alphalib/types/stackVersions.js.map +1 -0
  363. package/dist/alphalib/types/template.d.ts +77150 -0
  364. package/dist/alphalib/types/template.d.ts.map +1 -0
  365. package/dist/alphalib/types/template.js +49 -0
  366. package/dist/alphalib/types/template.js.map +1 -0
  367. package/dist/alphalib/zodParseWithContext.d.ts +18 -0
  368. package/dist/alphalib/zodParseWithContext.d.ts.map +1 -0
  369. package/dist/alphalib/zodParseWithContext.js +123 -0
  370. package/dist/alphalib/zodParseWithContext.js.map +1 -0
  371. package/dist/apiTypes.d.ts +127 -0
  372. package/dist/apiTypes.d.ts.map +1 -0
  373. package/dist/apiTypes.js +3 -0
  374. package/dist/apiTypes.js.map +1 -0
  375. package/dist/tus.d.ts +17 -0
  376. package/dist/tus.d.ts.map +1 -0
  377. package/dist/tus.js +88 -0
  378. package/dist/tus.js.map +1 -0
  379. package/package.json +58 -39
  380. package/src/ApiError.ts +44 -0
  381. package/src/InconsistentResponseError.ts +3 -0
  382. package/src/PaginationStream.ts +55 -0
  383. package/src/PollingTimeoutError.ts +5 -0
  384. package/src/Transloadit.ts +826 -0
  385. package/src/alphalib/types/assemblyStatus.ts +300 -0
  386. package/src/alphalib/types/robots/_index.ts +437 -0
  387. package/src/alphalib/types/robots/_instructions-primitives.ts +835 -0
  388. package/src/alphalib/types/robots/audio-artwork.ts +57 -0
  389. package/src/alphalib/types/robots/audio-concat.ts +74 -0
  390. package/src/alphalib/types/robots/audio-encode.ts +63 -0
  391. package/src/alphalib/types/robots/audio-loop.ts +62 -0
  392. package/src/alphalib/types/robots/audio-merge.ts +73 -0
  393. package/src/alphalib/types/robots/audio-waveform.ts +83 -0
  394. package/src/alphalib/types/robots/azure-import.ts +69 -0
  395. package/src/alphalib/types/robots/azure-store.ts +76 -0
  396. package/src/alphalib/types/robots/backblaze-import.ts +81 -0
  397. package/src/alphalib/types/robots/backblaze-store.ts +63 -0
  398. package/src/alphalib/types/robots/cloudfiles-import.ts +80 -0
  399. package/src/alphalib/types/robots/cloudfiles-store.ts +63 -0
  400. package/src/alphalib/types/robots/cloudflare-import.ts +84 -0
  401. package/src/alphalib/types/robots/cloudflare-store.ts +64 -0
  402. package/src/alphalib/types/robots/digitalocean-import.ts +81 -0
  403. package/src/alphalib/types/robots/digitalocean-store.ts +69 -0
  404. package/src/alphalib/types/robots/document-autorotate.ts +36 -0
  405. package/src/alphalib/types/robots/document-convert.ts +186 -0
  406. package/src/alphalib/types/robots/document-merge.ts +68 -0
  407. package/src/alphalib/types/robots/document-ocr.ts +72 -0
  408. package/src/alphalib/types/robots/document-split.ts +38 -0
  409. package/src/alphalib/types/robots/document-thumbs.ts +119 -0
  410. package/src/alphalib/types/robots/dropbox-import.ts +58 -0
  411. package/src/alphalib/types/robots/dropbox-store.ts +52 -0
  412. package/src/alphalib/types/robots/edgly-deliver.ts +32 -0
  413. package/src/alphalib/types/robots/file-compress.ts +104 -0
  414. package/src/alphalib/types/robots/file-decompress.ts +86 -0
  415. package/src/alphalib/types/robots/file-filter.ts +115 -0
  416. package/src/alphalib/types/robots/file-hash.ts +51 -0
  417. package/src/alphalib/types/robots/file-preview.ts +174 -0
  418. package/src/alphalib/types/robots/file-read.ts +36 -0
  419. package/src/alphalib/types/robots/file-serve.ts +60 -0
  420. package/src/alphalib/types/robots/file-verify.ts +55 -0
  421. package/src/alphalib/types/robots/file-virusscan.ts +60 -0
  422. package/src/alphalib/types/robots/file-watermark.ts +13 -0
  423. package/src/alphalib/types/robots/ftp-import.ts +52 -0
  424. package/src/alphalib/types/robots/ftp-store.ts +61 -0
  425. package/src/alphalib/types/robots/google-import.ts +77 -0
  426. package/src/alphalib/types/robots/google-store.ts +89 -0
  427. package/src/alphalib/types/robots/html-convert.ts +83 -0
  428. package/src/alphalib/types/robots/http-import.ts +79 -0
  429. package/src/alphalib/types/robots/image-describe.ts +74 -0
  430. package/src/alphalib/types/robots/image-facedetect.ts +131 -0
  431. package/src/alphalib/types/robots/image-generate.ts +32 -0
  432. package/src/alphalib/types/robots/image-merge.ts +81 -0
  433. package/src/alphalib/types/robots/image-ocr.ts +71 -0
  434. package/src/alphalib/types/robots/image-optimize.ts +61 -0
  435. package/src/alphalib/types/robots/image-remove-background.ts +23 -0
  436. package/src/alphalib/types/robots/image-resize.ts +401 -0
  437. package/src/alphalib/types/robots/media-playlist.ts +58 -0
  438. package/src/alphalib/types/robots/meta-write.ts +55 -0
  439. package/src/alphalib/types/robots/minio-import.ts +80 -0
  440. package/src/alphalib/types/robots/minio-store.ts +64 -0
  441. package/src/alphalib/types/robots/progress-simulate.ts +16 -0
  442. package/src/alphalib/types/robots/s3-import.ts +116 -0
  443. package/src/alphalib/types/robots/s3-store.ts +121 -0
  444. package/src/alphalib/types/robots/script-run.ts +81 -0
  445. package/src/alphalib/types/robots/sftp-import.ts +50 -0
  446. package/src/alphalib/types/robots/sftp-store.ts +61 -0
  447. package/src/alphalib/types/robots/speech-transcribe.ts +96 -0
  448. package/src/alphalib/types/robots/supabase-import.ts +84 -0
  449. package/src/alphalib/types/robots/supabase-store.ts +59 -0
  450. package/src/alphalib/types/robots/swift-import.ts +80 -0
  451. package/src/alphalib/types/robots/swift-store.ts +61 -0
  452. package/src/alphalib/types/robots/text-speak.ts +100 -0
  453. package/src/alphalib/types/robots/text-translate.ts +199 -0
  454. package/src/alphalib/types/robots/tigris-import.ts +80 -0
  455. package/src/alphalib/types/robots/tigris-store.ts +64 -0
  456. package/src/alphalib/types/robots/tlcdn-deliver.ts +32 -0
  457. package/src/alphalib/types/robots/tus-store.ts +77 -0
  458. package/src/alphalib/types/robots/upload-handle.ts +58 -0
  459. package/src/alphalib/types/robots/video-adaptive.ts +123 -0
  460. package/src/alphalib/types/robots/video-concat.ts +68 -0
  461. package/src/alphalib/types/robots/video-encode.ts +182 -0
  462. package/src/alphalib/types/robots/video-merge.ts +72 -0
  463. package/src/alphalib/types/robots/video-subtitle.ts +86 -0
  464. package/src/alphalib/types/robots/video-thumbs.ts +88 -0
  465. package/src/alphalib/types/robots/vimeo-store.ts +84 -0
  466. package/src/alphalib/types/robots/wasabi-import.ts +84 -0
  467. package/src/alphalib/types/robots/wasabi-store.ts +62 -0
  468. package/src/alphalib/types/robots/youtube-store.ts +108 -0
  469. package/src/alphalib/types/stackVersions.ts +12 -0
  470. package/src/alphalib/types/template.ts +71 -0
  471. package/src/alphalib/zodParseWithContext.ts +151 -0
  472. package/src/apiTypes.ts +165 -0
  473. package/src/tus.ts +123 -0
  474. package/index.js +0 -1
  475. package/src/PaginationStream.js +0 -39
  476. package/src/Transloadit.js +0 -701
  477. package/types/index.d.ts +0 -217
@@ -0,0 +1,77 @@
1
+ import { z } from 'zod'
2
+
3
+ import { robotBase, robotUse } from './_instructions-primitives.ts'
4
+ import type { RobotMeta } from './_instructions-primitives.ts'
5
+
6
+ export const meta: RobotMeta = {
7
+ allowed_for_url_transform: true,
8
+ bytescount: 10,
9
+ discount_factor: 0.1,
10
+ discount_pct: 90,
11
+ docs_redirect_from: ['/docs/export-to-your-own-tus-server/'],
12
+ example_code: {
13
+ steps: {
14
+ exported: {
15
+ robot: '/tus/store',
16
+ use: ':original',
17
+ endpoint: 'https://tusd.tusdemo.net/files/',
18
+ },
19
+ },
20
+ },
21
+ example_code_description: 'Export uploaded files to the Tus live demo server:',
22
+ minimum_charge: 0,
23
+ output_factor: 1,
24
+ override_lvl1: 'File Exporting',
25
+ purpose_sentence: 'exports encoding results to any Tus-compatible server',
26
+ purpose_verb: 'export',
27
+ purpose_word: 'Tus servers',
28
+ purpose_words: 'Export files to Tus-compatible servers',
29
+ service_slug: 'file-exporting',
30
+ slot_count: 10,
31
+ title: 'Export files to Tus-compatible servers',
32
+ typical_file_size_mb: 1.2,
33
+ typical_file_type: 'file',
34
+ }
35
+
36
+ export const robotTusStoreInstructionsSchema = robotBase
37
+ .merge(robotUse)
38
+ .extend({
39
+ robot: z.literal('/tus/store').describe(`
40
+ **Note:** This <dfn>Robot</dfn> only accepts videos. [{.alert .alert-note}]
41
+
42
+ **Warning:** Vimeo's API limits the number of concurrent uploads per minute based on your Vimeo account plan. To see how many videos can be uploaded at once based on your plan, click the following [link](https://developer.vimeo.com/guidelines/rate-limiting#table-1). [{.alert .alert-warning}]
43
+
44
+ ## Installation
45
+
46
+ Since Vimeo works with OAuth, you will need to generate [Template Credentials](https://transloadit.com/c/template-credentials/) to use this <dfn>Robot</dfn>.
47
+
48
+ To change the \`title\` or \`description\` per video, we recommend to [inject variables into your Template](/docs/topics/templates/).
49
+ `),
50
+ endpoint: z.string().url().describe('The URL of the destination Tus server').describe(`
51
+ The URL of the Tus-compatible server, which you're uploading files to.
52
+ `),
53
+ credentials: z.string().optional().describe(`
54
+ Create <dfn>Template Credentials</dfn> for this <dfn>Robot</dfn> in your [Transloadit account]({{site.base_url}}/c/template-credentials/) and use the name of the <dfn>Template Credentials</dfn> as this parameter's value. For this <dfn>Robot</dfn>, use the HTTP template, which allows request headers to be passed along to the destination server.
55
+ `),
56
+ headers: z.record(z.string()).default({}).describe('Headers to pass along to destination')
57
+ .describe(`
58
+ Optional extra headers outside of the <dfn>Template Credentials</dfn> can be passed along within this parameter.
59
+
60
+ Although, we recommend to exclusively use <dfn>Template Credentials</dfn>, this may be necessary if you're looking to use dynamic credentials, which isn't a feature supported by <dfn>Template Credentials</dfn>.
61
+ `),
62
+ metadata: z
63
+ .record(z.string())
64
+ .default({ filename: 'example.png', basename: 'example', extension: 'png' }).describe(`
65
+ Metadata to pass along to destination. Includes some file info by default.
66
+ `),
67
+ url_template: z.string().optional().describe(`
68
+ The URL of the file in the <dfn>Assembly Status JSON</dfn>. The following [Assembly Variables](/docs/topics/assembly-instructions/#assembly-variables) are supported. If this is not specified, the upload URL specified by the destination server will be used instead.
69
+ `),
70
+ ssl_url_template: z.string().optional().describe(`
71
+ The SSL URL of the file in the <dfn>Assembly Status JSON</dfn>. The following [Assembly Variables](/docs/topics/assembly-instructions/#assembly-variables) are supported. If this is not specified, the upload URL specified by the destination server will be used instead, as long as it starts with \`https\`.
72
+ `),
73
+ })
74
+ .strict()
75
+
76
+ export type RobotTusStoreInstructions = z.infer<typeof robotTusStoreInstructionsSchema>
77
+ export type RobotTusStoreInstructionsInput = z.input<typeof robotTusStoreInstructionsSchema>
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod'
2
+
3
+ import { robotBase, robotUse } from './_instructions-primitives.ts'
4
+ import type { RobotMeta } from './_instructions-primitives.ts'
5
+
6
+ export const meta: RobotMeta = {
7
+ allowed_for_url_transform: false,
8
+ bytescount: 10,
9
+ discount_factor: 0.1,
10
+ discount_pct: 90,
11
+ example_code: {
12
+ steps: {
13
+ ':original': {
14
+ robot: '/upload/handle',
15
+ },
16
+ exported: {
17
+ robot: '/s3/store',
18
+ use: ':original',
19
+ credentials: 'YOUR_S3_CREDENTIALS',
20
+ },
21
+ },
22
+ },
23
+ example_code_description: 'Handle uploads and export the uploaded files to S3:',
24
+ minimum_charge: 0,
25
+ output_factor: 1,
26
+ override_lvl1: 'Handling Uploads',
27
+ purpose_sentence:
28
+ 'receives uploads that your users throw at you from browser or apps, or that you throw at us programmatically',
29
+ purpose_verb: 'handle',
30
+ purpose_word: 'handle uploads',
31
+ purpose_words: 'Handle uploads',
32
+ redirect_from: ['/robots/upload-receive/', '/services/handling-uploads/upload-receive/'],
33
+ service_slug: 'handling-uploads',
34
+ slot_count: 0,
35
+ title: 'Handle uploads',
36
+ typical_file_size_mb: 1.2,
37
+ typical_file_type: 'file',
38
+ }
39
+
40
+ export const robotUploadHandleInstructionsSchema = robotBase
41
+ .merge(robotUse)
42
+ .extend({
43
+ robot: z.literal('/upload/handle').describe(`
44
+ Transloadit handles file uploads by default, so specifying this <dfn>Robot</dfn> is optional.
45
+
46
+ It can still be a good idea to define this <dfn>Robot</dfn>, though. It makes your <dfn>Assembly Instructions</dfn> explicit, and allows you to configure exactly how uploads should be handled. For example, you can extract specific metadata from the uploaded files.
47
+
48
+ There are **3 important constraints** when using this <dfn>Robot</dfn>:
49
+
50
+ 1. Don’t define a \`use\` parameter, unlike with other <dfn>Robots</dfn>.
51
+ 2. Use it only once in a single set of <dfn>Assembly Instructions</dfn>.
52
+ 3. Name the Step as \`:original\`.
53
+ `),
54
+ })
55
+ .strict()
56
+
57
+ export type RobotUploadHandleInstructions = z.infer<typeof robotUploadHandleInstructionsSchema>
58
+ export type RobotUploadHandleInstructionsInput = z.input<typeof robotUploadHandleInstructionsSchema>
@@ -0,0 +1,123 @@
1
+ import { z } from 'zod'
2
+
3
+ import { robotBase, robotUse, robotFFmpegVideo } from './_instructions-primitives.ts'
4
+ import type { RobotMeta } from './_instructions-primitives.ts'
5
+ import { stackVersions } from '../stackVersions.ts'
6
+
7
+ export const meta: RobotMeta = {
8
+ allowed_for_url_transform: false,
9
+ bytescount: Infinity,
10
+ discount_factor: 1,
11
+ discount_pct: 0,
12
+ example_code: {
13
+ steps: {
14
+ ':original': {
15
+ robot: '/upload/handle',
16
+ },
17
+ encoded_480p: {
18
+ robot: '/video/encode',
19
+ use: ':original',
20
+ preset: 'hls/480p',
21
+ ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
22
+ },
23
+ encoded_720p: {
24
+ robot: '/video/encode',
25
+ use: ':original',
26
+ preset: 'hls/720p',
27
+ ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
28
+ },
29
+ encoded_1080p: {
30
+ robot: '/video/encode',
31
+ use: ':original',
32
+ preset: 'hls/1080p',
33
+ ffmpeg_stack: stackVersions.ffmpeg.recommendedVersion,
34
+ },
35
+ hls_bundled: {
36
+ robot: '/video/adaptive',
37
+ use: {
38
+ steps: ['encoded_480p', 'encoded_720p', 'encoded_1080p'],
39
+ bundle_steps: true,
40
+ },
41
+ technique: 'hls',
42
+ playlist_name: 'my_playlist.m3u8',
43
+ },
44
+ },
45
+ },
46
+ example_code_description:
47
+ 'Implementing HTTP Live Streaming: encode the uploaded video into three versions, then cut them into several segments and generate playlist files containing all the segments:',
48
+ minimum_charge: 0,
49
+ output_factor: 1.2,
50
+ override_lvl1: 'Video Encoding',
51
+ purpose_sentence:
52
+ 'encodes videos into HTTP Live Streaming (HLS) and MPEG-Dash supported formats and generates the necessary manifest and playlist files',
53
+ purpose_verb: 'convert',
54
+ purpose_word: 'make adaptive',
55
+ purpose_words: 'Convert videos to HLS and MPEG-Dash',
56
+ service_slug: 'video-encoding',
57
+ slot_count: 60,
58
+ title: 'Convert videos to HLS and MPEG-Dash',
59
+ typical_file_size_mb: 80,
60
+ typical_file_type: 'video',
61
+ }
62
+
63
+ export const robotVideoAdaptiveInstructionsSchema = robotBase
64
+ .merge(robotUse)
65
+ .merge(robotFFmpegVideo)
66
+ .extend({
67
+ robot: z.literal('/video/adaptive').describe(`
68
+ This <dfn>Robot</dfn> accepts all types of video files and audio files. Do not forget to use <dfn>Step</dfn> bundling in your \`use\` parameter to make the <dfn>Robot</dfn> work on several input files at once.
69
+
70
+ This <dfn>Robot</dfn> is normally used in combination with [🤖/video/encode](/docs/transcoding/video-encoding/video-encode/). We have implemented video and audio encoding presets specifically for MPEG-Dash and HTTP Live Streaming support. These presets are prefixed with \`"dash/"\` and \`"hls/"\`. [View a HTTP Live Streaming demo here](/demos/video-encoding/implement-http-live-streaming/).
71
+
72
+ ### Required CORS settings for MPEG-Dash and HTTP Live Streaming
73
+
74
+ Playing back MPEG-Dash Manifest or HLS playlist files requires a proper CORS setup on the server-side. The file-serving server should be configured to add the following header fields to responses:
75
+
76
+ \`\`\`
77
+ Access-Control-Allow-Origin: *
78
+ Access-Control-Allow-Methods: GET
79
+ Access-Control-Allow-Headers: *
80
+ \`\`\`
81
+
82
+ If the files are stored in an Amazon S3 Bucket, you can use the following [CORS definition](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManageCorsUsing.html) to ensure the CORS header fields are set correctly:
83
+
84
+ \`\`\`json
85
+ [
86
+ {
87
+ "AllowedHeaders": ["*"],
88
+ "AllowedMethods": ["GET"],
89
+ "AllowedOrigins": ["*"],
90
+ "ExposeHeaders": []
91
+ }
92
+ ]
93
+ \`\`\`
94
+
95
+ To set up CORS for your S3 bucket:
96
+
97
+ 1. Visit <https://s3.console.aws.amazon.com/s3/buckets/>
98
+ 1. Click on your bucket
99
+ 1. Click "Permissions"
100
+ 1. Edit "Cross-origin resource sharing (CORS)"
101
+
102
+ ### Storing Segments and Playlist files
103
+
104
+ The <dfn>Robot</dfn> gives its result files (segments, initialization segments, MPD manifest files and M3U8 playlist files) the right metadata property \`relative_path\`, so that you can store them easily using one of our storage <dfn>Robots</dfn>.
105
+
106
+ In the \`path\` parameter of the storage <dfn>Robot</dfn> of your choice, use the <dfn>Assembly Variable</dfn> \`\${file.meta.relative_path}\` to store files in the proper paths to make the playlist files work.
107
+ `),
108
+ technique: z.enum(['dash', 'hls']).default('dash').describe(`
109
+ Determines which streaming technique should be used. Currently supports \`"dash"\` for MPEG-Dash and \`"hls"\` for HTTP Live Streaming.
110
+ `),
111
+ playlist_name: z.string().optional().describe(`
112
+ The filename for the generated manifest/playlist file. The default is \`"playlist.mpd"\` if your \`technique\` is \`"dash"\`, and \`"playlist.m3u8"\` if your \`technique\` is \`"hls"\`.
113
+ `),
114
+ segment_duration: z.number().int().default(10).describe(`
115
+ The duration for each segment in seconds.
116
+ `),
117
+ closed_captions: z.boolean().default(true).describe(`
118
+ Determines whether you want closed caption support when using the \`"hls"\` technique.
119
+ `),
120
+ })
121
+ .strict()
122
+
123
+ export type RobotVideoAdaptiveInstructions = z.infer<typeof robotVideoAdaptiveInstructionsSchema>
@@ -0,0 +1,68 @@
1
+ import { z } from 'zod'
2
+
3
+ import { robotFFmpegVideo, robotBase, robotUse } from './_instructions-primitives.ts'
4
+ import type { RobotMeta } from './_instructions-primitives.ts'
5
+
6
+ export const meta: RobotMeta = {
7
+ allowed_for_url_transform: false,
8
+ bytescount: 4,
9
+ discount_factor: 0.25,
10
+ discount_pct: 75,
11
+ example_code: {
12
+ steps: {
13
+ concatenated: {
14
+ robot: '/video/concat',
15
+ use: {
16
+ steps: [
17
+ { name: ':original', fields: 'first_video_file', as: 'video_1' },
18
+ { name: ':original', fields: 'second_video_file', as: 'video_2' },
19
+ { name: ':original', fields: 'third_video_file', as: 'video_3' },
20
+ ],
21
+ },
22
+ },
23
+ },
24
+ },
25
+ example_code_description:
26
+ 'If you have a form with 3 file input fields and want to concatenate the uploaded videos in a specific order, instruct Transloadit using the `name` attribute of each input field. Use this attribute as the value for the `fields` key in the JSON, and set `as` to `video_[[index]]`. Transloadit will concatenate the files based on the ascending index order:',
27
+ minimum_charge: 0,
28
+ output_factor: 0.6,
29
+ override_lvl1: 'Video Encoding',
30
+ purpose_sentence: 'concatenates several videos together',
31
+ purpose_verb: 'concatenate',
32
+ purpose_word: 'concatenate',
33
+ purpose_words: 'Concatenate videos',
34
+ service_slug: 'video-encoding',
35
+ slot_count: 60,
36
+ title: 'Concatenate videos',
37
+ typical_file_size_mb: 80,
38
+ typical_file_type: 'video',
39
+ uses_tools: ['ffmpeg'],
40
+ }
41
+
42
+ export const robotVideoConcatInstructionsSchema = robotBase
43
+ .merge(robotUse)
44
+ .merge(robotFFmpegVideo)
45
+ .extend({
46
+ robot: z.literal('/video/concat').describe(`
47
+ **Warning:** All videos you concatenate must have the same dimensions (width and height) and the same streams (audio and video streams), otherwise you will run into errors. If your videos donʼt have the desired dimensions when passing them to [🤖/video/concat](/docs/transcoding/video-encoding/video-concat/), encode them first with [🤖/video/encode](/docs/transcoding/video-encoding/video-encode/). [{.alert .alert-warning}]
48
+
49
+ Itʼs possible to concatenate a virtually infinite number of video files using [🤖/video/concat](/docs/transcoding/video-encoding/video-concat/).
50
+ `),
51
+ video_fade_seconds: z.number().default(1).describe(`
52
+ When used this adds a video fade in and out effect between each section of your concatenated video. The float value is used so if you want a video delay effect of 500 milliseconds between each video section you would select \`0.5\`, however, integer values can also be represented.
53
+
54
+ This parameter does not add a video fade effect at the beginning or end of your video. If you want to do so, create an additional [🤖/video/encode](/docs/transcoding/video-encoding/video-presets/) Step and use our \`ffmpeg\` parameter as shown in this [demo](/demos/video-encoding/concatenate-fade-effect/).
55
+
56
+ Please note this parameter is independent of adding audio fades between sections.
57
+ `),
58
+ audio_fade_seconds: z.number().default(1).describe(`
59
+ When used this adds an audio fade in and out effect between each section of your concatenated video. The float value is used so if you want an audio delay effect of 500 milliseconds between each video section you would select \`0.5\`, however, integer values can also be represented.
60
+
61
+ This parameter does not add an audio fade effect at the beginning or end of your video. If you want to do so, create an additional [🤖/video/encode](/docs/transcoding/video-encoding/video-presets/) Step and use our \`ffmpeg\` parameter as shown in this [demo](/demos/audio-encoding/ffmpeg-fade-in-and-out/).
62
+
63
+ Please note this parameter is independent of adding video fades between sections.
64
+ `),
65
+ })
66
+ .strict()
67
+
68
+ export type RobotVideoConcatInstructions = z.infer<typeof robotVideoConcatInstructionsSchema>
@@ -0,0 +1,182 @@
1
+ import { z } from 'zod'
2
+
3
+ import {
4
+ color_with_alpha,
5
+ robotFFmpegVideo,
6
+ interpolationSchemaToYieldNumber,
7
+ interpolationSchemaToYieldString,
8
+ percentageSchema,
9
+ positionSchema,
10
+ resize_strategy,
11
+ robotBase,
12
+ robotUse,
13
+ unsafeCoordinatesSchema,
14
+ } from './_instructions-primitives.ts'
15
+ import type { RobotMeta } from './_instructions-primitives.ts'
16
+
17
+ export const meta: RobotMeta = {
18
+ allowed_for_url_transform: false,
19
+ bytescount: 1,
20
+ discount_factor: 1,
21
+ discount_pct: 0,
22
+ example_code: {
23
+ steps: {
24
+ hevc_encoded: {
25
+ robot: '/video/encode',
26
+ use: ':original',
27
+ preset: 'hevc',
28
+ },
29
+ },
30
+ },
31
+ example_code_description:
32
+ 'Transcode uploaded video to [HEVC](https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding) (H.265):',
33
+ minimum_charge: 0,
34
+ output_factor: 0.6,
35
+ override_lvl1: 'Video Encoding',
36
+ purpose_sentence: 'encodes, resizes, applies watermarks to videos and animated GIFs',
37
+ purpose_verb: 'transcode',
38
+ purpose_word: 'transcode/resize/watermark',
39
+ purpose_words: 'Transcode, resize, or watermark videos',
40
+ service_slug: 'video-encoding',
41
+ slot_count: 60,
42
+ title: 'Transcode, resize, or watermark videos',
43
+ typical_file_size_mb: 80,
44
+ typical_file_type: 'video',
45
+ uses_tools: ['ffmpeg'],
46
+ }
47
+
48
+ export const robotVideoEncodeInstructionsInterpolatedSchema = robotBase
49
+ .merge(robotUse)
50
+ .merge(robotFFmpegVideo)
51
+ .extend({
52
+ robot: z.literal('/video/encode'),
53
+ resize_strategy: resize_strategy.describe(`
54
+ See the [available resize strategies](/docs/transcoding/image-manipulation/image-resize/#resize-strategies).
55
+ `),
56
+ zoom: z.boolean().default(true).describe(`
57
+ If this is set to \`false\`, smaller videos will not be stretched to the desired width and height. For details about the impact of zooming for your preferred resize strategy, see the list of available [resize strategies](/docs/transcoding/image-manipulation/image-resize/#resize-strategies).
58
+ `),
59
+ crop: unsafeCoordinatesSchema.optional().describe(`
60
+ Specify an object containing coordinates for the top left and bottom right corners of the rectangle to be cropped from the original video(s). Values can be integers for absolute pixel values or strings for percentage based values.
61
+
62
+ For example:
63
+
64
+ \`\`\`json
65
+
66
+ {
67
+ "x1": 80,
68
+ "y1": 100,
69
+ "x2": "60%",
70
+ "y2": "80%"
71
+ }
72
+
73
+ \`\`\`
74
+
75
+ This will crop the area from \`(80, 100)\` to \`(600, 800)\` from a 1000×1000 pixels video, which is a square whose width is 520px and height is 700px. If \`crop\` is set, the width and height parameters are ignored, and the \`resize_strategy\` is set to \`crop\` automatically.
76
+
77
+ You can also use a JSON string of such an object with coordinates in similar fashion: \`"{ "x1": <Integer>, "y1": <Integer>, "x2": <Integer>, "y2": <Integer> }"\`
78
+ `),
79
+ background: color_with_alpha.default('#00000000').describe(`
80
+ The background color of the resulting video the \`"rrggbbaa"\` format (red, green, blue, alpha) when used with the \`"pad"\` resize strategy. The default color is black.
81
+ `),
82
+ rotate: z
83
+ // We can’t use enum.
84
+ // See https://github.com/colinhacks/zod/issues/2686
85
+ .union([
86
+ z.literal(0),
87
+ z.literal(90),
88
+ z.literal(180),
89
+ z.literal(270),
90
+ z.literal(360),
91
+ z.literal(false),
92
+ ])
93
+ .optional().describe(`
94
+ Forces the video to be rotated by the specified degree integer. Currently, only multiples of \`90\` are supported. We automatically correct the orientation of many videos when the orientation is provided by the camera. This option is only useful for videos requiring rotation because it was not detected by the camera. If you set \`rotate\` to \`false\` no rotation is performed, even if the metadata contains such instructions.
95
+ `),
96
+ hint: z.boolean().default(false).describe(`
97
+ Enables hinting for mp4 files, for RTP/RTSP streaming.
98
+ `),
99
+ turbo: z.boolean().default(false).describe(`
100
+ Splits the video into multiple chunks so that each chunk can be encoded in parallel before all encoded chunks are stitched back together to form the result video. This comes at the expense of extra <dfn>Priority Job Slots</dfn> and may prove to be counter-productive for very small video files.
101
+ `),
102
+ chunk_duration: z.number().int().min(1).optional().describe(`
103
+ Allows you to specify the duration of each chunk when \`turbo\` is set to \`true\`. This means you can take advantage of that feature while using fewer <dfn>Priority Job Slots</dfn>. For instance, the longer each chunk is, the fewer <dfn>Encoding Jobs</dfn> will need to be used.
104
+ `),
105
+ freeze_detect: z.boolean().default(false).describe(`
106
+ Examines the transcoding result file for video freeze frames and re-transcodes the video a second time if they are found. This is useful when you are using \`turbo: true\` because freeze frames can sometimes happen there. The re-transcode would then happen without turbo mode.
107
+ `),
108
+ watermark_url: z.string().default('').describe(`
109
+ A URL indicating a PNG image to be overlaid above this image. You can also [supply the watermark via another Assembly Step](/docs/transcoding/video-encoding/video-encode/#watermark-parameters-video-encode).
110
+ `),
111
+ watermark_position: z.union([positionSchema, z.array(positionSchema)]).default('center')
112
+ .describe(`
113
+ The position at which the watermark is placed.
114
+
115
+ An array of possible values can also be specified, in which case one value will be selected at random, such as \`[ "center", "left", "bottom-left", "bottom-right" ]\`.
116
+
117
+ This setting puts the watermark in the specified corner. To use a specific pixel offset for the watermark, you will need to add the padding to the image itself.
118
+ `),
119
+ watermark_x_offset: z.number().int().default(0).describe(`
120
+ The x-offset in number of pixels at which the watermark will be placed in relation to the position it has due to \`watermark_position\`.
121
+
122
+ Values can be both positive and negative and yield different results depending on the \`watermark_position\` parameter. Positive values move the watermark closer to the image's center point, whereas negative values move the watermark further away from the image's center point.
123
+ `),
124
+ watermark_y_offset: z.number().int().default(0).describe(`
125
+ The y-offset in number of pixels at which the watermark will be placed in relation to the position it has due to \`watermark_position\`.
126
+
127
+ Values can be both positive and negative and yield different results depending on the \`watermark_position\` parameter. Positive values move the watermark closer to the image's center point, whereas negative values move the watermark further away from the image's center point.
128
+ `),
129
+ watermark_size: percentageSchema.optional().describe(`
130
+ The size of the watermark, as a percentage, such as \`"50%"\`. How the watermark is resized greatly depends on the \`watermark_resize_strategy\`.
131
+ `),
132
+ watermark_resize_strategy: z.enum(['area', 'fit', 'stretch']).default('fit').describe(`
133
+ To explain how the resize strategies work, let's assume our target video size is 800×800 pixels and our watermark image is 400×300 pixels. Let's also assume, the \`watermark_size\` parameter is set to \`"25%"\`.
134
+
135
+ For the \`"fit"\` resize strategy, the watermark is scaled so that the longer side of the watermark takes up 25% of the corresponding video side. And the other side is scaled according to the aspect ratio of the watermark image. So with our watermark, the width is the longer side, and 25% of the video size would be 200px. Hence, the watermark would be resized to 200×150 pixels. If the \`watermark_size\` was set to \`"50%"\`", it would be resized to 400×300 pixels (so just left at its original size).
136
+
137
+ For the \`"stretch"\` resize strategy, the watermark image is stretched (meaning, it is resized without keeping its aspect ratio in mind) so that both sides take up 25% of the corresponding video side. Since our video is 800×800 pixels, for a watermark size of 25% the watermark would be resized to 200×200 pixels. Its height would appear stretched, because keeping the aspect ratio in mind it would be resized to 200×150 pixels instead.
138
+
139
+ For the \`"area"\` resize strategy, the watermark is resized (keeping its aspect ratio in check) so that it covers \`"xx%"\` of the video's surface area. The value from \`watermark_size\` is used for the percentage area size.
140
+ `),
141
+ watermark_start_time: z.number().default(0).describe(`
142
+ The delay in seconds from the start of the video for the watermark to appear. By default the watermark is immediately shown.
143
+ `),
144
+ watermark_duration: z.number().default(-1).describe(`
145
+ The duration in seconds for the watermark to be shown. Can be used together with \`watermark_start_time\` to create nice effects. The default value is \`-1.0\`, which means that the watermark is shown for the entire duration of the video.
146
+ `),
147
+ watermark_opacity: z.number().min(0).max(1).default(1).describe(`
148
+ The opacity of the watermark. Valid values are between \`0\` (invisible) and \`1.0\` (full visibility).
149
+ `),
150
+ segment: z.boolean().default(false).describe(`
151
+ Splits the file into multiple parts, to be used for Apple's [HTTP Live Streaming](https://developer.apple.com/resources/http-streaming/).
152
+ `),
153
+ segment_duration: z.number().int().min(1).default(10).describe(`
154
+ Specifies the length of each HTTP segment. This is optional, and the default value as recommended by Apple is \`10\`. Do not change this value unless you have a good reason.
155
+ `),
156
+ segment_prefix: z.string().default('').describe(`
157
+ The prefix used for the naming. For example, a prefix of \`"segment_"\` would produce files named \`"segment_0.ts"\`, \`"segment_1.ts"\` and so on. This is optional, and defaults to the base name of the input file. Also see the related \`segment_name\` parameter.
158
+ `),
159
+ segment_name: z.string().default('').describe(`
160
+ The name used for the final segment. Available variables are \`\${segment_prefix}\`, \`\${segment_number}\` and \`\${segment_id}\` (which is a UUIDv4 without dashes).
161
+ `),
162
+ })
163
+ .strict()
164
+
165
+ export const robotVideoEncodeInstructionsSchema =
166
+ robotVideoEncodeInstructionsInterpolatedSchema.extend({
167
+ width: robotVideoEncodeInstructionsInterpolatedSchema.shape.width.or(
168
+ interpolationSchemaToYieldNumber,
169
+ ),
170
+ height: robotVideoEncodeInstructionsInterpolatedSchema.shape.height.or(
171
+ interpolationSchemaToYieldNumber,
172
+ ),
173
+ background: robotVideoEncodeInstructionsInterpolatedSchema.shape.background.or(
174
+ interpolationSchemaToYieldString,
175
+ ),
176
+ resize_strategy: robotVideoEncodeInstructionsInterpolatedSchema.shape.resize_strategy.or(
177
+ interpolationSchemaToYieldString,
178
+ ),
179
+ })
180
+
181
+ export type RobotVideoEncodeInstructions = z.infer<typeof robotVideoEncodeInstructionsSchema>
182
+ export type RobotVideoEncodeInstructionsInput = z.input<typeof robotVideoEncodeInstructionsSchema>
@@ -0,0 +1,72 @@
1
+ import { z } from 'zod'
2
+
3
+ import {
4
+ color_with_alpha,
5
+ robotFFmpegVideo,
6
+ resize_strategy,
7
+ robotBase,
8
+ robotUse,
9
+ } from './_instructions-primitives.ts'
10
+ import type { RobotMeta } from './_instructions-primitives.ts'
11
+
12
+ export const meta: RobotMeta = {
13
+ allowed_for_url_transform: false,
14
+ bytescount: 1,
15
+ discount_factor: 1,
16
+ discount_pct: 0,
17
+ minimum_charge: 0,
18
+ output_factor: 0.6,
19
+ override_lvl1: 'Video Encoding',
20
+ purpose_sentence:
21
+ 'composes a new video by adding an audio track to existing still image(s) or video',
22
+ purpose_verb: 'merge',
23
+ purpose_word: 'merge',
24
+ purpose_words: 'Merge video, audio, images into one video',
25
+ service_slug: 'video-encoding',
26
+ slot_count: 60,
27
+ title: 'Merge video, audio, images into one video',
28
+ typical_file_size_mb: 80,
29
+ typical_file_type: 'video',
30
+ uses_tools: ['ffmpeg'],
31
+ }
32
+
33
+ export const robotVideoMergeInstructionsSchema = robotBase
34
+ .merge(robotUse)
35
+ .merge(robotFFmpegVideo)
36
+ .extend({
37
+ robot: z.literal('/video/merge'),
38
+ resize_strategy: resize_strategy.describe(`
39
+ If the given width/height parameters are bigger than the input image's dimensions, then the \`resize_strategy\` determines how the image will be resized to match the provided width/height. See the [available resize strategies](/docs/transcoding/image-manipulation/image-resize/#resize-strategies).
40
+ `),
41
+ background: color_with_alpha.default('#00000000').describe(`
42
+ The background color of the resulting video the \`"rrggbbaa"\` format (red, green, blue, alpha) when used with the \`"pad"\` resize strategy. The default color is black.
43
+ `),
44
+ framerate: z
45
+ .union([z.number().int().min(1), z.string().regex(/^\d+(?:\/\d+)?$/)])
46
+ .default('1/5').describe(`
47
+ When merging images to generate a video this is the input framerate. A value of "1/5" means each image is given 5 seconds before the next frame appears (the inverse of a framerate of "5"). Likewise for "1/10", "1/20", etc. A value of "5" means there are 5 frames per second.
48
+ `),
49
+ image_durations: z.array(z.number()).default([]).describe(`
50
+ When merging images to generate a video this allows you to define how long (in seconds) each image will be shown inside of the video. So if you pass 3 images and define \`[2.4, 5.6, 9]\` the first image will be shown for 2.4s, the second image for 5.6s and the last one for 9s. The \`duration\` parameter will automatically be set to the sum of the image_durations, so \`17\` in our example. It can still be overwritten, though, in which case the last image will be shown until the defined duration is reached.
51
+ `),
52
+ duration: z.number().default(5).describe(`
53
+ When merging images to generate a video or when merging audio and video this is the desired target duration in seconds. The float value can take one decimal digit. If you want all images to be displayed exactly once, then you can set the duration according to this formula: \`duration = numberOfImages / framerate\`. This also works for the inverse framerate values like \`1/5\`.
54
+
55
+ If you set this value to \`null\` (default), then the duration of the input audio file will be used when merging images with an audio file.
56
+
57
+ When merging audio files and video files, the duration of the longest video or audio file is used by default.
58
+ `),
59
+ audio_delay: z.number().default(0).describe(`
60
+ When merging a video and an audio file, and when merging images and an audio file to generate a video, this is the desired delay in seconds for the audio file to start playing. Imagine you merge a video file without sound and an audio file, but you wish the audio to start playing after 5 seconds and not immediately, then this is the parameter to use.
61
+ `),
62
+ loop: z.boolean().default(false).describe(`
63
+ Determines whether the shorter media file should be looped to match the duration of the longer one. For example, if you merge a 1-minute video with a 3-minute audio file and enable this option, the video will play three times in a row to match the audio length.`),
64
+ replace_audio: z.boolean().default(false).describe(`
65
+ Determines whether the audio of the video should be replaced with a provided audio file.
66
+ `),
67
+ vstack: z.boolean().default(false).describe(`
68
+ Stacks the input media vertically. All streams need to have the same pixel format and width - so consider using a [/video/encode](/docs/transcoding/video-encoding/video-encode/) <dfn>Step</dfn> before using this parameter to enforce this.
69
+ `),
70
+ })
71
+ .strict()
72
+ export type RobotVideoMergeInstructions = z.infer<typeof robotVideoMergeInstructionsSchema>