transloadit 4.13.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (637) hide show
  1. package/README.md +58 -6
  2. package/dist/ApiError.d.ts +6 -2
  3. package/dist/ApiError.d.ts.map +1 -1
  4. package/dist/ApiError.js +6 -2
  5. package/dist/ApiError.js.map +1 -1
  6. package/dist/Transloadit.d.ts +2 -0
  7. package/dist/Transloadit.d.ts.map +1 -1
  8. package/dist/Transloadit.js +15 -4
  9. package/dist/Transloadit.js.map +1 -1
  10. package/dist/alphalib/aiMessages.d.ts +33254 -0
  11. package/dist/alphalib/aiMessages.d.ts.map +1 -0
  12. package/dist/alphalib/aiMessages.js +479 -0
  13. package/dist/alphalib/aiMessages.js.map +1 -0
  14. package/dist/alphalib/assembly-linter.d.ts.map +1 -1
  15. package/dist/alphalib/assembly-linter.js +20 -15
  16. package/dist/alphalib/assembly-linter.js.map +1 -1
  17. package/dist/alphalib/englishList.d.ts +3 -0
  18. package/dist/alphalib/englishList.d.ts.map +1 -0
  19. package/dist/alphalib/englishList.js +12 -0
  20. package/dist/alphalib/englishList.js.map +1 -0
  21. package/dist/alphalib/errors.d.ts +16 -0
  22. package/dist/alphalib/errors.d.ts.map +1 -1
  23. package/dist/alphalib/errors.js +124 -13
  24. package/dist/alphalib/errors.js.map +1 -1
  25. package/dist/alphalib/imagemagickDensity.d.ts.map +1 -1
  26. package/dist/alphalib/imagemagickDensity.js +2 -2
  27. package/dist/alphalib/imagemagickDensity.js.map +1 -1
  28. package/dist/alphalib/lib/zodInputSemantics.d.ts +18 -0
  29. package/dist/alphalib/lib/zodInputSemantics.d.ts.map +1 -0
  30. package/dist/alphalib/lib/zodInputSemantics.js +86 -0
  31. package/dist/alphalib/lib/zodInputSemantics.js.map +1 -0
  32. package/dist/alphalib/object.d.ts +42 -2
  33. package/dist/alphalib/object.d.ts.map +1 -1
  34. package/dist/alphalib/object.js +133 -0
  35. package/dist/alphalib/object.js.map +1 -1
  36. package/dist/alphalib/stepParsing.d.ts +1 -0
  37. package/dist/alphalib/stepParsing.d.ts.map +1 -1
  38. package/dist/alphalib/stepParsing.js +9 -1
  39. package/dist/alphalib/stepParsing.js.map +1 -1
  40. package/dist/alphalib/types/apiParameterDescription.d.ts +14 -0
  41. package/dist/alphalib/types/apiParameterDescription.d.ts.map +1 -0
  42. package/dist/alphalib/types/apiParameterDescription.js +20 -0
  43. package/dist/alphalib/types/apiParameterDescription.js.map +1 -0
  44. package/dist/alphalib/types/assembliesGet.d.ts +1 -1
  45. package/dist/alphalib/types/assemblyReplay.d.ts +4 -4
  46. package/dist/alphalib/types/assemblyStatus.d.ts +7196 -64686
  47. package/dist/alphalib/types/assemblyStatus.d.ts.map +1 -1
  48. package/dist/alphalib/types/assemblyStatus.js +74 -55
  49. package/dist/alphalib/types/assemblyStatus.js.map +1 -1
  50. package/dist/alphalib/types/errorReason.d.ts +7 -0
  51. package/dist/alphalib/types/errorReason.d.ts.map +1 -0
  52. package/dist/alphalib/types/errorReason.js +14 -0
  53. package/dist/alphalib/types/errorReason.js.map +1 -0
  54. package/dist/alphalib/types/file.d.ts +7 -0
  55. package/dist/alphalib/types/file.d.ts.map +1 -1
  56. package/dist/alphalib/types/file.js +15 -0
  57. package/dist/alphalib/types/file.js.map +1 -1
  58. package/dist/alphalib/types/fileHash.d.ts +16 -0
  59. package/dist/alphalib/types/fileHash.d.ts.map +1 -0
  60. package/dist/alphalib/types/fileHash.js +10 -0
  61. package/dist/alphalib/types/fileHash.js.map +1 -0
  62. package/dist/alphalib/types/responseErrors/HttpImportRobot.d.ts +23 -0
  63. package/dist/alphalib/types/responseErrors/HttpImportRobot.d.ts.map +1 -0
  64. package/dist/alphalib/types/responseErrors/HttpImportRobot.js +23 -0
  65. package/dist/alphalib/types/responseErrors/HttpImportRobot.js.map +1 -0
  66. package/dist/alphalib/types/robots/_ai-models.d.ts +28 -0
  67. package/dist/alphalib/types/robots/_ai-models.d.ts.map +1 -0
  68. package/dist/alphalib/types/robots/_ai-models.js +80 -0
  69. package/dist/alphalib/types/robots/_ai-models.js.map +1 -0
  70. package/dist/alphalib/types/robots/_index.d.ts +713 -1329
  71. package/dist/alphalib/types/robots/_index.d.ts.map +1 -1
  72. package/dist/alphalib/types/robots/_index.js +4 -0
  73. package/dist/alphalib/types/robots/_index.js.map +1 -1
  74. package/dist/alphalib/types/robots/_instructions-primitives.d.ts +504 -129
  75. package/dist/alphalib/types/robots/_instructions-primitives.d.ts.map +1 -1
  76. package/dist/alphalib/types/robots/_instructions-primitives.js +629 -280
  77. package/dist/alphalib/types/robots/_instructions-primitives.js.map +1 -1
  78. package/dist/alphalib/types/robots/ai-chat.d.ts +952 -2189
  79. package/dist/alphalib/types/robots/ai-chat.d.ts.map +1 -1
  80. package/dist/alphalib/types/robots/ai-chat.js +235 -367
  81. package/dist/alphalib/types/robots/ai-chat.js.map +1 -1
  82. package/dist/alphalib/types/robots/assembly-savejson.d.ts +28 -16
  83. package/dist/alphalib/types/robots/assembly-savejson.d.ts.map +1 -1
  84. package/dist/alphalib/types/robots/assembly-savejson.js +2 -11
  85. package/dist/alphalib/types/robots/assembly-savejson.js.map +1 -1
  86. package/dist/alphalib/types/robots/audio-artwork.d.ts +80 -67
  87. package/dist/alphalib/types/robots/audio-artwork.d.ts.map +1 -1
  88. package/dist/alphalib/types/robots/audio-artwork.js +9 -38
  89. package/dist/alphalib/types/robots/audio-artwork.js.map +1 -1
  90. package/dist/alphalib/types/robots/audio-concat.d.ts +94 -81
  91. package/dist/alphalib/types/robots/audio-concat.d.ts.map +1 -1
  92. package/dist/alphalib/types/robots/audio-concat.js +11 -25
  93. package/dist/alphalib/types/robots/audio-concat.js.map +1 -1
  94. package/dist/alphalib/types/robots/audio-encode.d.ts +80 -67
  95. package/dist/alphalib/types/robots/audio-encode.d.ts.map +1 -1
  96. package/dist/alphalib/types/robots/audio-encode.js +13 -43
  97. package/dist/alphalib/types/robots/audio-encode.js.map +1 -1
  98. package/dist/alphalib/types/robots/audio-loop.d.ts +80 -67
  99. package/dist/alphalib/types/robots/audio-loop.d.ts.map +1 -1
  100. package/dist/alphalib/types/robots/audio-loop.js +12 -40
  101. package/dist/alphalib/types/robots/audio-loop.js.map +1 -1
  102. package/dist/alphalib/types/robots/audio-merge.d.ts +94 -81
  103. package/dist/alphalib/types/robots/audio-merge.d.ts.map +1 -1
  104. package/dist/alphalib/types/robots/audio-merge.js +11 -25
  105. package/dist/alphalib/types/robots/audio-merge.js.map +1 -1
  106. package/dist/alphalib/types/robots/audio-split.d.ts +80 -67
  107. package/dist/alphalib/types/robots/audio-split.d.ts.map +1 -1
  108. package/dist/alphalib/types/robots/audio-split.js +15 -45
  109. package/dist/alphalib/types/robots/audio-split.js.map +1 -1
  110. package/dist/alphalib/types/robots/audio-waveform.d.ts +120 -107
  111. package/dist/alphalib/types/robots/audio-waveform.d.ts.map +1 -1
  112. package/dist/alphalib/types/robots/audio-waveform.js +15 -39
  113. package/dist/alphalib/types/robots/audio-waveform.js.map +1 -1
  114. package/dist/alphalib/types/robots/azure-import.d.ts +48 -35
  115. package/dist/alphalib/types/robots/azure-import.d.ts.map +1 -1
  116. package/dist/alphalib/types/robots/azure-import.js +5 -35
  117. package/dist/alphalib/types/robots/azure-import.js.map +1 -1
  118. package/dist/alphalib/types/robots/azure-store.d.ts +87 -71
  119. package/dist/alphalib/types/robots/azure-store.d.ts.map +1 -1
  120. package/dist/alphalib/types/robots/azure-store.js +11 -50
  121. package/dist/alphalib/types/robots/azure-store.js.map +1 -1
  122. package/dist/alphalib/types/robots/backblaze-import.d.ts +48 -35
  123. package/dist/alphalib/types/robots/backblaze-import.d.ts.map +1 -1
  124. package/dist/alphalib/types/robots/backblaze-import.js +6 -39
  125. package/dist/alphalib/types/robots/backblaze-import.js.map +1 -1
  126. package/dist/alphalib/types/robots/backblaze-store.d.ts +80 -67
  127. package/dist/alphalib/types/robots/backblaze-store.d.ts.map +1 -1
  128. package/dist/alphalib/types/robots/backblaze-store.js +8 -44
  129. package/dist/alphalib/types/robots/backblaze-store.js.map +1 -1
  130. package/dist/alphalib/types/robots/box-import.d.ts +44 -27
  131. package/dist/alphalib/types/robots/box-import.d.ts.map +1 -1
  132. package/dist/alphalib/types/robots/box-import.js +7 -33
  133. package/dist/alphalib/types/robots/box-import.js.map +1 -1
  134. package/dist/alphalib/types/robots/box-store.d.ts +85 -68
  135. package/dist/alphalib/types/robots/box-store.d.ts.map +1 -1
  136. package/dist/alphalib/types/robots/box-store.js +8 -40
  137. package/dist/alphalib/types/robots/box-store.js.map +1 -1
  138. package/dist/alphalib/types/robots/cloudfiles-import.d.ts +48 -35
  139. package/dist/alphalib/types/robots/cloudfiles-import.d.ts.map +1 -1
  140. package/dist/alphalib/types/robots/cloudfiles-import.js +8 -45
  141. package/dist/alphalib/types/robots/cloudfiles-import.js.map +1 -1
  142. package/dist/alphalib/types/robots/cloudfiles-store.d.ts +80 -67
  143. package/dist/alphalib/types/robots/cloudfiles-store.d.ts.map +1 -1
  144. package/dist/alphalib/types/robots/cloudfiles-store.js +5 -36
  145. package/dist/alphalib/types/robots/cloudfiles-store.js.map +1 -1
  146. package/dist/alphalib/types/robots/cloudflare-import.d.ts +48 -35
  147. package/dist/alphalib/types/robots/cloudflare-import.d.ts.map +1 -1
  148. package/dist/alphalib/types/robots/cloudflare-import.js +10 -57
  149. package/dist/alphalib/types/robots/cloudflare-import.js.map +1 -1
  150. package/dist/alphalib/types/robots/cloudflare-store.d.ts +80 -67
  151. package/dist/alphalib/types/robots/cloudflare-store.d.ts.map +1 -1
  152. package/dist/alphalib/types/robots/cloudflare-store.js +11 -54
  153. package/dist/alphalib/types/robots/cloudflare-store.js.map +1 -1
  154. package/dist/alphalib/types/robots/digitalocean-import.d.ts +56 -43
  155. package/dist/alphalib/types/robots/digitalocean-import.d.ts.map +1 -1
  156. package/dist/alphalib/types/robots/digitalocean-import.js +8 -49
  157. package/dist/alphalib/types/robots/digitalocean-import.js.map +1 -1
  158. package/dist/alphalib/types/robots/digitalocean-store.d.ts +88 -75
  159. package/dist/alphalib/types/robots/digitalocean-store.d.ts.map +1 -1
  160. package/dist/alphalib/types/robots/digitalocean-store.js +8 -56
  161. package/dist/alphalib/types/robots/digitalocean-store.js.map +1 -1
  162. package/dist/alphalib/types/robots/document-autorotate.d.ts +80 -67
  163. package/dist/alphalib/types/robots/document-autorotate.d.ts.map +1 -1
  164. package/dist/alphalib/types/robots/document-autorotate.js +5 -32
  165. package/dist/alphalib/types/robots/document-autorotate.js.map +1 -1
  166. package/dist/alphalib/types/robots/document-convert.d.ts +84 -71
  167. package/dist/alphalib/types/robots/document-convert.d.ts.map +1 -1
  168. package/dist/alphalib/types/robots/document-convert.js +7 -33
  169. package/dist/alphalib/types/robots/document-convert.js.map +1 -1
  170. package/dist/alphalib/types/robots/document-extract.d.ts +80 -67
  171. package/dist/alphalib/types/robots/document-extract.d.ts.map +1 -1
  172. package/dist/alphalib/types/robots/document-extract.js +10 -36
  173. package/dist/alphalib/types/robots/document-extract.js.map +1 -1
  174. package/dist/alphalib/types/robots/document-merge.d.ts +80 -67
  175. package/dist/alphalib/types/robots/document-merge.d.ts.map +1 -1
  176. package/dist/alphalib/types/robots/document-merge.js +4 -25
  177. package/dist/alphalib/types/robots/document-merge.js.map +1 -1
  178. package/dist/alphalib/types/robots/document-ocr.d.ts +80 -67
  179. package/dist/alphalib/types/robots/document-ocr.d.ts.map +1 -1
  180. package/dist/alphalib/types/robots/document-ocr.js +10 -47
  181. package/dist/alphalib/types/robots/document-ocr.js.map +1 -1
  182. package/dist/alphalib/types/robots/document-optimize.d.ts +80 -67
  183. package/dist/alphalib/types/robots/document-optimize.d.ts.map +1 -1
  184. package/dist/alphalib/types/robots/document-optimize.js +7 -31
  185. package/dist/alphalib/types/robots/document-optimize.js.map +1 -1
  186. package/dist/alphalib/types/robots/document-split.d.ts +80 -67
  187. package/dist/alphalib/types/robots/document-split.d.ts.map +1 -1
  188. package/dist/alphalib/types/robots/document-split.js +7 -34
  189. package/dist/alphalib/types/robots/document-split.js.map +1 -1
  190. package/dist/alphalib/types/robots/document-thumbs.d.ts +120 -101
  191. package/dist/alphalib/types/robots/document-thumbs.d.ts.map +1 -1
  192. package/dist/alphalib/types/robots/document-thumbs.js +24 -31
  193. package/dist/alphalib/types/robots/document-thumbs.js.map +1 -1
  194. package/dist/alphalib/types/robots/dropbox-import.d.ts +40 -27
  195. package/dist/alphalib/types/robots/dropbox-import.d.ts.map +1 -1
  196. package/dist/alphalib/types/robots/dropbox-import.js +5 -35
  197. package/dist/alphalib/types/robots/dropbox-import.js.map +1 -1
  198. package/dist/alphalib/types/robots/dropbox-store.d.ts +84 -68
  199. package/dist/alphalib/types/robots/dropbox-store.d.ts.map +1 -1
  200. package/dist/alphalib/types/robots/dropbox-store.js +8 -42
  201. package/dist/alphalib/types/robots/dropbox-store.js.map +1 -1
  202. package/dist/alphalib/types/robots/edgly-deliver.d.ts +32 -19
  203. package/dist/alphalib/types/robots/edgly-deliver.d.ts.map +1 -1
  204. package/dist/alphalib/types/robots/edgly-deliver.js +4 -24
  205. package/dist/alphalib/types/robots/edgly-deliver.js.map +1 -1
  206. package/dist/alphalib/types/robots/file-compress.d.ts +80 -67
  207. package/dist/alphalib/types/robots/file-compress.d.ts.map +1 -1
  208. package/dist/alphalib/types/robots/file-compress.js +4 -20
  209. package/dist/alphalib/types/robots/file-compress.js.map +1 -1
  210. package/dist/alphalib/types/robots/file-decompress.d.ts +96 -83
  211. package/dist/alphalib/types/robots/file-decompress.d.ts.map +1 -1
  212. package/dist/alphalib/types/robots/file-decompress.js +10 -41
  213. package/dist/alphalib/types/robots/file-decompress.js.map +1 -1
  214. package/dist/alphalib/types/robots/file-filter.d.ts +99 -87
  215. package/dist/alphalib/types/robots/file-filter.d.ts.map +1 -1
  216. package/dist/alphalib/types/robots/file-filter.js +11 -40
  217. package/dist/alphalib/types/robots/file-filter.js.map +1 -1
  218. package/dist/alphalib/types/robots/file-hash.d.ts +84 -71
  219. package/dist/alphalib/types/robots/file-hash.d.ts.map +1 -1
  220. package/dist/alphalib/types/robots/file-hash.js +12 -43
  221. package/dist/alphalib/types/robots/file-hash.js.map +1 -1
  222. package/dist/alphalib/types/robots/file-preview.d.ts +113 -100
  223. package/dist/alphalib/types/robots/file-preview.d.ts.map +1 -1
  224. package/dist/alphalib/types/robots/file-preview.js +14 -39
  225. package/dist/alphalib/types/robots/file-preview.js.map +1 -1
  226. package/dist/alphalib/types/robots/file-read.d.ts +80 -67
  227. package/dist/alphalib/types/robots/file-read.d.ts.map +1 -1
  228. package/dist/alphalib/types/robots/file-read.js +5 -26
  229. package/dist/alphalib/types/robots/file-read.js.map +1 -1
  230. package/dist/alphalib/types/robots/file-serve.d.ts +81 -68
  231. package/dist/alphalib/types/robots/file-serve.d.ts.map +1 -1
  232. package/dist/alphalib/types/robots/file-serve.js +4 -21
  233. package/dist/alphalib/types/robots/file-serve.js.map +1 -1
  234. package/dist/alphalib/types/robots/file-verify.d.ts +88 -75
  235. package/dist/alphalib/types/robots/file-verify.d.ts.map +1 -1
  236. package/dist/alphalib/types/robots/file-verify.js +11 -41
  237. package/dist/alphalib/types/robots/file-verify.js.map +1 -1
  238. package/dist/alphalib/types/robots/file-virusscan.d.ts +83 -67
  239. package/dist/alphalib/types/robots/file-virusscan.d.ts.map +1 -1
  240. package/dist/alphalib/types/robots/file-virusscan.js +16 -42
  241. package/dist/alphalib/types/robots/file-virusscan.js.map +1 -1
  242. package/dist/alphalib/types/robots/file-watermark.d.ts +81 -67
  243. package/dist/alphalib/types/robots/file-watermark.d.ts.map +1 -1
  244. package/dist/alphalib/types/robots/file-watermark.js +10 -29
  245. package/dist/alphalib/types/robots/file-watermark.js.map +1 -1
  246. package/dist/alphalib/types/robots/ftp-import.d.ts +40 -27
  247. package/dist/alphalib/types/robots/ftp-import.d.ts.map +1 -1
  248. package/dist/alphalib/types/robots/ftp-import.js +5 -33
  249. package/dist/alphalib/types/robots/ftp-import.js.map +1 -1
  250. package/dist/alphalib/types/robots/ftp-store.d.ts +85 -67
  251. package/dist/alphalib/types/robots/ftp-store.d.ts.map +1 -1
  252. package/dist/alphalib/types/robots/ftp-store.js +7 -34
  253. package/dist/alphalib/types/robots/ftp-store.js.map +1 -1
  254. package/dist/alphalib/types/robots/google-import.d.ts +48 -35
  255. package/dist/alphalib/types/robots/google-import.d.ts.map +1 -1
  256. package/dist/alphalib/types/robots/google-import.js +10 -43
  257. package/dist/alphalib/types/robots/google-import.js.map +1 -1
  258. package/dist/alphalib/types/robots/google-store.d.ts +80 -67
  259. package/dist/alphalib/types/robots/google-store.d.ts.map +1 -1
  260. package/dist/alphalib/types/robots/google-store.js +10 -41
  261. package/dist/alphalib/types/robots/google-store.js.map +1 -1
  262. package/dist/alphalib/types/robots/html-convert.d.ts +107 -89
  263. package/dist/alphalib/types/robots/html-convert.d.ts.map +1 -1
  264. package/dist/alphalib/types/robots/html-convert.js +6 -22
  265. package/dist/alphalib/types/robots/html-convert.js.map +1 -1
  266. package/dist/alphalib/types/robots/http-import.d.ts +76 -63
  267. package/dist/alphalib/types/robots/http-import.d.ts.map +1 -1
  268. package/dist/alphalib/types/robots/http-import.js +14 -19
  269. package/dist/alphalib/types/robots/http-import.js.map +1 -1
  270. package/dist/alphalib/types/robots/http-request.d.ts +538 -0
  271. package/dist/alphalib/types/robots/http-request.d.ts.map +1 -0
  272. package/dist/alphalib/types/robots/http-request.js +162 -0
  273. package/dist/alphalib/types/robots/http-request.js.map +1 -0
  274. package/dist/alphalib/types/robots/image-bgremove.d.ts +80 -67
  275. package/dist/alphalib/types/robots/image-bgremove.d.ts.map +1 -1
  276. package/dist/alphalib/types/robots/image-bgremove.js +6 -33
  277. package/dist/alphalib/types/robots/image-bgremove.js.map +1 -1
  278. package/dist/alphalib/types/robots/image-copyrightdetect.d.ts +92 -79
  279. package/dist/alphalib/types/robots/image-copyrightdetect.d.ts.map +1 -1
  280. package/dist/alphalib/types/robots/image-copyrightdetect.js +9 -33
  281. package/dist/alphalib/types/robots/image-copyrightdetect.js.map +1 -1
  282. package/dist/alphalib/types/robots/image-describe.d.ts +80 -67
  283. package/dist/alphalib/types/robots/image-describe.d.ts.map +1 -1
  284. package/dist/alphalib/types/robots/image-describe.js +8 -37
  285. package/dist/alphalib/types/robots/image-describe.js.map +1 -1
  286. package/dist/alphalib/types/robots/image-enhance.d.ts +80 -67
  287. package/dist/alphalib/types/robots/image-enhance.d.ts.map +1 -1
  288. package/dist/alphalib/types/robots/image-enhance.js +7 -31
  289. package/dist/alphalib/types/robots/image-enhance.js.map +1 -1
  290. package/dist/alphalib/types/robots/image-facedetect.d.ts +88 -75
  291. package/dist/alphalib/types/robots/image-facedetect.d.ts.map +1 -1
  292. package/dist/alphalib/types/robots/image-facedetect.js +16 -44
  293. package/dist/alphalib/types/robots/image-facedetect.js.map +1 -1
  294. package/dist/alphalib/types/robots/image-generate.d.ts +96 -86
  295. package/dist/alphalib/types/robots/image-generate.d.ts.map +1 -1
  296. package/dist/alphalib/types/robots/image-generate.js +20 -25
  297. package/dist/alphalib/types/robots/image-generate.js.map +1 -1
  298. package/dist/alphalib/types/robots/image-merge.d.ts +96 -83
  299. package/dist/alphalib/types/robots/image-merge.d.ts.map +1 -1
  300. package/dist/alphalib/types/robots/image-merge.js +9 -40
  301. package/dist/alphalib/types/robots/image-merge.js.map +1 -1
  302. package/dist/alphalib/types/robots/image-ocr.d.ts +80 -67
  303. package/dist/alphalib/types/robots/image-ocr.d.ts.map +1 -1
  304. package/dist/alphalib/types/robots/image-ocr.js +11 -47
  305. package/dist/alphalib/types/robots/image-ocr.js.map +1 -1
  306. package/dist/alphalib/types/robots/image-optimize.d.ts +88 -75
  307. package/dist/alphalib/types/robots/image-optimize.d.ts.map +1 -1
  308. package/dist/alphalib/types/robots/image-optimize.js +6 -32
  309. package/dist/alphalib/types/robots/image-optimize.js.map +1 -1
  310. package/dist/alphalib/types/robots/image-resize.d.ts +217 -112
  311. package/dist/alphalib/types/robots/image-resize.d.ts.map +1 -1
  312. package/dist/alphalib/types/robots/image-resize.js +15 -42
  313. package/dist/alphalib/types/robots/image-resize.js.map +1 -1
  314. package/dist/alphalib/types/robots/image-upscale.d.ts +97 -81
  315. package/dist/alphalib/types/robots/image-upscale.d.ts.map +1 -1
  316. package/dist/alphalib/types/robots/image-upscale.js +23 -42
  317. package/dist/alphalib/types/robots/image-upscale.js.map +1 -1
  318. package/dist/alphalib/types/robots/mega-import.d.ts +48 -35
  319. package/dist/alphalib/types/robots/mega-import.d.ts.map +1 -1
  320. package/dist/alphalib/types/robots/mega-import.js +12 -59
  321. package/dist/alphalib/types/robots/mega-import.js.map +1 -1
  322. package/dist/alphalib/types/robots/mega-store.d.ts +80 -67
  323. package/dist/alphalib/types/robots/mega-store.d.ts.map +1 -1
  324. package/dist/alphalib/types/robots/mega-store.js +14 -60
  325. package/dist/alphalib/types/robots/mega-store.js.map +1 -1
  326. package/dist/alphalib/types/robots/meta-read.d.ts +30 -16
  327. package/dist/alphalib/types/robots/meta-read.d.ts.map +1 -1
  328. package/dist/alphalib/types/robots/meta-read.js +4 -20
  329. package/dist/alphalib/types/robots/meta-read.js.map +1 -1
  330. package/dist/alphalib/types/robots/meta-write.d.ts +80 -67
  331. package/dist/alphalib/types/robots/meta-write.d.ts.map +1 -1
  332. package/dist/alphalib/types/robots/meta-write.js +9 -32
  333. package/dist/alphalib/types/robots/meta-write.js.map +1 -1
  334. package/dist/alphalib/types/robots/minio-import.d.ts +48 -35
  335. package/dist/alphalib/types/robots/minio-import.d.ts.map +1 -1
  336. package/dist/alphalib/types/robots/minio-import.js +9 -60
  337. package/dist/alphalib/types/robots/minio-import.js.map +1 -1
  338. package/dist/alphalib/types/robots/minio-store.d.ts +80 -67
  339. package/dist/alphalib/types/robots/minio-store.d.ts.map +1 -1
  340. package/dist/alphalib/types/robots/minio-store.js +9 -50
  341. package/dist/alphalib/types/robots/minio-store.js.map +1 -1
  342. package/dist/alphalib/types/robots/progress-simulate.d.ts +34 -28
  343. package/dist/alphalib/types/robots/progress-simulate.d.ts.map +1 -1
  344. package/dist/alphalib/types/robots/progress-simulate.js +8 -28
  345. package/dist/alphalib/types/robots/progress-simulate.js.map +1 -1
  346. package/dist/alphalib/types/robots/s3-import.d.ts +48 -35
  347. package/dist/alphalib/types/robots/s3-import.d.ts.map +1 -1
  348. package/dist/alphalib/types/robots/s3-import.js +7 -38
  349. package/dist/alphalib/types/robots/s3-import.js.map +1 -1
  350. package/dist/alphalib/types/robots/s3-store.d.ts +84 -68
  351. package/dist/alphalib/types/robots/s3-store.d.ts.map +1 -1
  352. package/dist/alphalib/types/robots/s3-store.js +14 -44
  353. package/dist/alphalib/types/robots/s3-store.js.map +1 -1
  354. package/dist/alphalib/types/robots/script-run.d.ts +83 -67
  355. package/dist/alphalib/types/robots/script-run.d.ts.map +1 -1
  356. package/dist/alphalib/types/robots/script-run.js +9 -27
  357. package/dist/alphalib/types/robots/script-run.js.map +1 -1
  358. package/dist/alphalib/types/robots/sftp-import.d.ts +51 -35
  359. package/dist/alphalib/types/robots/sftp-import.d.ts.map +1 -1
  360. package/dist/alphalib/types/robots/sftp-import.js +7 -36
  361. package/dist/alphalib/types/robots/sftp-import.js.map +1 -1
  362. package/dist/alphalib/types/robots/sftp-store.d.ts +83 -67
  363. package/dist/alphalib/types/robots/sftp-store.d.ts.map +1 -1
  364. package/dist/alphalib/types/robots/sftp-store.js +9 -41
  365. package/dist/alphalib/types/robots/sftp-store.js.map +1 -1
  366. package/dist/alphalib/types/robots/speech-transcribe.d.ts +102 -85
  367. package/dist/alphalib/types/robots/speech-transcribe.d.ts.map +1 -1
  368. package/dist/alphalib/types/robots/speech-transcribe.js +23 -44
  369. package/dist/alphalib/types/robots/speech-transcribe.js.map +1 -1
  370. package/dist/alphalib/types/robots/supabase-import.d.ts +48 -35
  371. package/dist/alphalib/types/robots/supabase-import.d.ts.map +1 -1
  372. package/dist/alphalib/types/robots/supabase-import.js +12 -59
  373. package/dist/alphalib/types/robots/supabase-import.js.map +1 -1
  374. package/dist/alphalib/types/robots/supabase-store.d.ts +80 -79
  375. package/dist/alphalib/types/robots/supabase-store.d.ts.map +1 -1
  376. package/dist/alphalib/types/robots/supabase-store.js +12 -56
  377. package/dist/alphalib/types/robots/supabase-store.js.map +1 -1
  378. package/dist/alphalib/types/robots/swift-import.d.ts +48 -47
  379. package/dist/alphalib/types/robots/swift-import.d.ts.map +1 -1
  380. package/dist/alphalib/types/robots/swift-import.js +14 -55
  381. package/dist/alphalib/types/robots/swift-import.js.map +1 -1
  382. package/dist/alphalib/types/robots/swift-store.d.ts +80 -79
  383. package/dist/alphalib/types/robots/swift-store.d.ts.map +1 -1
  384. package/dist/alphalib/types/robots/swift-store.js +14 -62
  385. package/dist/alphalib/types/robots/swift-store.js.map +1 -1
  386. package/dist/alphalib/types/robots/text-speak.d.ts +80 -67
  387. package/dist/alphalib/types/robots/text-speak.d.ts.map +1 -1
  388. package/dist/alphalib/types/robots/text-speak.js +11 -37
  389. package/dist/alphalib/types/robots/text-speak.js.map +1 -1
  390. package/dist/alphalib/types/robots/text-translate.d.ts +92 -79
  391. package/dist/alphalib/types/robots/text-translate.d.ts.map +1 -1
  392. package/dist/alphalib/types/robots/text-translate.js +9 -36
  393. package/dist/alphalib/types/robots/text-translate.js.map +1 -1
  394. package/dist/alphalib/types/robots/tigris-import.d.ts +48 -35
  395. package/dist/alphalib/types/robots/tigris-import.d.ts.map +1 -1
  396. package/dist/alphalib/types/robots/tigris-import.js +9 -60
  397. package/dist/alphalib/types/robots/tigris-import.js.map +1 -1
  398. package/dist/alphalib/types/robots/tigris-store.d.ts +80 -67
  399. package/dist/alphalib/types/robots/tigris-store.d.ts.map +1 -1
  400. package/dist/alphalib/types/robots/tigris-store.js +7 -48
  401. package/dist/alphalib/types/robots/tigris-store.js.map +1 -1
  402. package/dist/alphalib/types/robots/tlcdn-deliver.d.ts +32 -19
  403. package/dist/alphalib/types/robots/tlcdn-deliver.d.ts.map +1 -1
  404. package/dist/alphalib/types/robots/tlcdn-deliver.js +4 -25
  405. package/dist/alphalib/types/robots/tlcdn-deliver.js.map +1 -1
  406. package/dist/alphalib/types/robots/transloadit-import.d.ts +58 -45
  407. package/dist/alphalib/types/robots/transloadit-import.d.ts.map +1 -1
  408. package/dist/alphalib/types/robots/transloadit-import.js +17 -21
  409. package/dist/alphalib/types/robots/transloadit-import.js.map +1 -1
  410. package/dist/alphalib/types/robots/transloadit-store.d.ts +70 -57
  411. package/dist/alphalib/types/robots/transloadit-store.d.ts.map +1 -1
  412. package/dist/alphalib/types/robots/transloadit-store.js +14 -6
  413. package/dist/alphalib/types/robots/transloadit-store.js.map +1 -1
  414. package/dist/alphalib/types/robots/tus-store.d.ts +84 -71
  415. package/dist/alphalib/types/robots/tus-store.d.ts.map +1 -1
  416. package/dist/alphalib/types/robots/tus-store.js +8 -37
  417. package/dist/alphalib/types/robots/tus-store.js.map +1 -1
  418. package/dist/alphalib/types/robots/upload-handle.d.ts +32 -19
  419. package/dist/alphalib/types/robots/upload-handle.d.ts.map +1 -1
  420. package/dist/alphalib/types/robots/upload-handle.js +4 -19
  421. package/dist/alphalib/types/robots/upload-handle.js.map +1 -1
  422. package/dist/alphalib/types/robots/video-adaptive.d.ts +112 -99
  423. package/dist/alphalib/types/robots/video-adaptive.d.ts.map +1 -1
  424. package/dist/alphalib/types/robots/video-adaptive.js +4 -26
  425. package/dist/alphalib/types/robots/video-adaptive.js.map +1 -1
  426. package/dist/alphalib/types/robots/video-artwork.d.ts +80 -67
  427. package/dist/alphalib/types/robots/video-artwork.d.ts.map +1 -1
  428. package/dist/alphalib/types/robots/video-artwork.js +7 -32
  429. package/dist/alphalib/types/robots/video-artwork.js.map +1 -1
  430. package/dist/alphalib/types/robots/video-concat.d.ts +104 -91
  431. package/dist/alphalib/types/robots/video-concat.d.ts.map +1 -1
  432. package/dist/alphalib/types/robots/video-concat.js +6 -27
  433. package/dist/alphalib/types/robots/video-concat.js.map +1 -1
  434. package/dist/alphalib/types/robots/video-encode.d.ts +121 -103
  435. package/dist/alphalib/types/robots/video-encode.d.ts.map +1 -1
  436. package/dist/alphalib/types/robots/video-encode.js +13 -38
  437. package/dist/alphalib/types/robots/video-encode.js.map +1 -1
  438. package/dist/alphalib/types/robots/video-generate.d.ts +96 -86
  439. package/dist/alphalib/types/robots/video-generate.d.ts.map +1 -1
  440. package/dist/alphalib/types/robots/video-generate.js +11 -18
  441. package/dist/alphalib/types/robots/video-generate.js.map +1 -1
  442. package/dist/alphalib/types/robots/video-merge.d.ts +135 -119
  443. package/dist/alphalib/types/robots/video-merge.d.ts.map +1 -1
  444. package/dist/alphalib/types/robots/video-merge.js +12 -32
  445. package/dist/alphalib/types/robots/video-merge.js.map +1 -1
  446. package/dist/alphalib/types/robots/video-ondemand.d.ts +156 -139
  447. package/dist/alphalib/types/robots/video-ondemand.d.ts.map +1 -1
  448. package/dist/alphalib/types/robots/video-ondemand.js +11 -27
  449. package/dist/alphalib/types/robots/video-ondemand.js.map +1 -1
  450. package/dist/alphalib/types/robots/video-split.d.ts +104 -91
  451. package/dist/alphalib/types/robots/video-split.d.ts.map +1 -1
  452. package/dist/alphalib/types/robots/video-split.js +11 -39
  453. package/dist/alphalib/types/robots/video-split.js.map +1 -1
  454. package/dist/alphalib/types/robots/video-subtitle.d.ts +104 -91
  455. package/dist/alphalib/types/robots/video-subtitle.d.ts.map +1 -1
  456. package/dist/alphalib/types/robots/video-subtitle.js +7 -30
  457. package/dist/alphalib/types/robots/video-subtitle.js.map +1 -1
  458. package/dist/alphalib/types/robots/video-thumbs.d.ts +112 -95
  459. package/dist/alphalib/types/robots/video-thumbs.d.ts.map +1 -1
  460. package/dist/alphalib/types/robots/video-thumbs.js +46 -53
  461. package/dist/alphalib/types/robots/video-thumbs.js.map +1 -1
  462. package/dist/alphalib/types/robots/vimeo-import.d.ts +30 -17
  463. package/dist/alphalib/types/robots/vimeo-import.d.ts.map +1 -1
  464. package/dist/alphalib/types/robots/vimeo-import.js +7 -17
  465. package/dist/alphalib/types/robots/vimeo-import.js.map +1 -1
  466. package/dist/alphalib/types/robots/vimeo-store.d.ts +83 -67
  467. package/dist/alphalib/types/robots/vimeo-store.d.ts.map +1 -1
  468. package/dist/alphalib/types/robots/vimeo-store.js +11 -37
  469. package/dist/alphalib/types/robots/vimeo-store.js.map +1 -1
  470. package/dist/alphalib/types/robots/wasabi-import.d.ts +48 -35
  471. package/dist/alphalib/types/robots/wasabi-import.d.ts.map +1 -1
  472. package/dist/alphalib/types/robots/wasabi-import.js +9 -56
  473. package/dist/alphalib/types/robots/wasabi-import.js.map +1 -1
  474. package/dist/alphalib/types/robots/wasabi-store.d.ts +80 -67
  475. package/dist/alphalib/types/robots/wasabi-store.d.ts.map +1 -1
  476. package/dist/alphalib/types/robots/wasabi-store.js +10 -52
  477. package/dist/alphalib/types/robots/wasabi-store.js.map +1 -1
  478. package/dist/alphalib/types/robots/youtube-store.d.ts +98 -85
  479. package/dist/alphalib/types/robots/youtube-store.d.ts.map +1 -1
  480. package/dist/alphalib/types/robots/youtube-store.js +42 -63
  481. package/dist/alphalib/types/robots/youtube-store.js.map +1 -1
  482. package/dist/alphalib/types/stackVersions.d.ts +40 -1
  483. package/dist/alphalib/types/stackVersions.d.ts.map +1 -1
  484. package/dist/alphalib/types/stackVersions.js +25 -3
  485. package/dist/alphalib/types/stackVersions.js.map +1 -1
  486. package/dist/alphalib/types/storageAsset.d.ts +55 -23
  487. package/dist/alphalib/types/storageAsset.d.ts.map +1 -1
  488. package/dist/alphalib/types/storageAsset.js +33 -9
  489. package/dist/alphalib/types/storageAsset.js.map +1 -1
  490. package/dist/alphalib/types/template.d.ts +16 -16
  491. package/dist/alphalib/types/templateCredential.d.ts +2 -2
  492. package/dist/alphalib/types/utility.d.ts +22 -0
  493. package/dist/alphalib/types/utility.d.ts.map +1 -0
  494. package/dist/alphalib/types/utility.js +2 -0
  495. package/dist/alphalib/types/utility.js.map +1 -0
  496. package/dist/cli/commands/storage.d.ts +1 -0
  497. package/dist/cli/commands/storage.d.ts.map +1 -1
  498. package/dist/cli/commands/storage.js +27 -2
  499. package/dist/cli/commands/storage.js.map +1 -1
  500. package/dist/cli/semanticIntents/imageGenerate.d.ts +2 -2
  501. package/dist/cli/semanticIntents/imageGenerate.js +4 -4
  502. package/dist/cli/semanticIntents/imageGenerate.js.map +1 -1
  503. package/dist/cli/storageReceipts.d.ts.map +1 -1
  504. package/dist/cli/storageReceipts.js +4 -1
  505. package/dist/cli/storageReceipts.js.map +1 -1
  506. package/dist/storageImage.d.ts +6 -3
  507. package/dist/storageImage.d.ts.map +1 -1
  508. package/dist/storageImage.js +13 -0
  509. package/dist/storageImage.js.map +1 -1
  510. package/package.json +1 -2
  511. package/src/ApiError.ts +11 -4
  512. package/src/Transloadit.ts +24 -5
  513. package/src/alphalib/aiMessages.ts +554 -0
  514. package/src/alphalib/assembly-linter.ts +9 -2
  515. package/src/alphalib/englishList.ts +11 -0
  516. package/src/alphalib/errors.ts +159 -13
  517. package/src/alphalib/imagemagickDensity.ts +2 -1
  518. package/src/alphalib/lib/zodInputSemantics.ts +114 -0
  519. package/src/alphalib/object.ts +178 -3
  520. package/src/alphalib/stepParsing.ts +10 -2
  521. package/src/alphalib/types/apiParameterDescription.ts +41 -0
  522. package/src/alphalib/types/assemblyStatus.ts +121 -83
  523. package/src/alphalib/types/errorReason.ts +14 -0
  524. package/src/alphalib/types/file.ts +18 -0
  525. package/src/alphalib/types/fileHash.ts +10 -0
  526. package/src/alphalib/types/responseErrors/HttpImportRobot.ts +22 -0
  527. package/src/alphalib/types/robots/_ai-models.ts +91 -0
  528. package/src/alphalib/types/robots/_index.ts +14 -0
  529. package/src/alphalib/types/robots/_instructions-primitives.ts +841 -308
  530. package/src/alphalib/types/robots/ai-chat.ts +358 -459
  531. package/src/alphalib/types/robots/assembly-savejson.ts +2 -11
  532. package/src/alphalib/types/robots/audio-artwork.ts +35 -61
  533. package/src/alphalib/types/robots/audio-concat.ts +17 -25
  534. package/src/alphalib/types/robots/audio-encode.ts +35 -65
  535. package/src/alphalib/types/robots/audio-loop.ts +34 -61
  536. package/src/alphalib/types/robots/audio-merge.ts +17 -25
  537. package/src/alphalib/types/robots/audio-split.ts +37 -67
  538. package/src/alphalib/types/robots/audio-waveform.ts +42 -65
  539. package/src/alphalib/types/robots/azure-import.ts +26 -57
  540. package/src/alphalib/types/robots/azure-store.ts +48 -72
  541. package/src/alphalib/types/robots/backblaze-import.ts +30 -63
  542. package/src/alphalib/types/robots/backblaze-store.ts +37 -66
  543. package/src/alphalib/types/robots/box-import.ts +32 -55
  544. package/src/alphalib/types/robots/box-store.ts +40 -63
  545. package/src/alphalib/types/robots/cloudfiles-import.ts +34 -70
  546. package/src/alphalib/types/robots/cloudfiles-store.ts +28 -59
  547. package/src/alphalib/types/robots/cloudflare-import.ts +37 -83
  548. package/src/alphalib/types/robots/cloudflare-store.ts +37 -77
  549. package/src/alphalib/types/robots/digitalocean-import.ts +35 -75
  550. package/src/alphalib/types/robots/digitalocean-store.ts +35 -79
  551. package/src/alphalib/types/robots/document-autorotate.ts +36 -58
  552. package/src/alphalib/types/robots/document-convert.ts +37 -59
  553. package/src/alphalib/types/robots/document-extract.ts +45 -62
  554. package/src/alphalib/types/robots/document-merge.ts +25 -47
  555. package/src/alphalib/types/robots/document-ocr.ts +32 -70
  556. package/src/alphalib/types/robots/document-optimize.ts +38 -57
  557. package/src/alphalib/types/robots/document-split.ts +33 -56
  558. package/src/alphalib/types/robots/document-thumbs.ts +66 -67
  559. package/src/alphalib/types/robots/dropbox-import.ts +27 -57
  560. package/src/alphalib/types/robots/dropbox-store.ts +39 -65
  561. package/src/alphalib/types/robots/edgly-deliver.ts +26 -49
  562. package/src/alphalib/types/robots/file-compress.ts +31 -45
  563. package/src/alphalib/types/robots/file-decompress.ts +41 -68
  564. package/src/alphalib/types/robots/file-filter.ts +36 -65
  565. package/src/alphalib/types/robots/file-hash.ts +37 -64
  566. package/src/alphalib/types/robots/file-preview.ts +39 -65
  567. package/src/alphalib/types/robots/file-read.ts +33 -50
  568. package/src/alphalib/types/robots/file-serve.ts +32 -46
  569. package/src/alphalib/types/robots/file-verify.ts +37 -63
  570. package/src/alphalib/types/robots/file-virusscan.ts +49 -67
  571. package/src/alphalib/types/robots/file-watermark.ts +35 -54
  572. package/src/alphalib/types/robots/ftp-import.ts +26 -54
  573. package/src/alphalib/types/robots/ftp-store.ts +44 -63
  574. package/src/alphalib/types/robots/google-import.ts +32 -66
  575. package/src/alphalib/types/robots/google-store.ts +37 -63
  576. package/src/alphalib/types/robots/html-convert.ts +38 -49
  577. package/src/alphalib/types/robots/http-import.ts +21 -19
  578. package/src/alphalib/types/robots/http-request.ts +196 -0
  579. package/src/alphalib/types/robots/image-bgremove.ts +28 -55
  580. package/src/alphalib/types/robots/image-copyrightdetect.ts +38 -56
  581. package/src/alphalib/types/robots/image-describe.ts +31 -60
  582. package/src/alphalib/types/robots/image-enhance.ts +30 -56
  583. package/src/alphalib/types/robots/image-facedetect.ts +43 -71
  584. package/src/alphalib/types/robots/image-generate.ts +32 -25
  585. package/src/alphalib/types/robots/image-merge.ts +34 -65
  586. package/src/alphalib/types/robots/image-ocr.ts +33 -69
  587. package/src/alphalib/types/robots/image-optimize.ts +28 -54
  588. package/src/alphalib/types/robots/image-resize.ts +72 -96
  589. package/src/alphalib/types/robots/image-upscale.ts +52 -64
  590. package/src/alphalib/types/robots/mega-import.ts +36 -84
  591. package/src/alphalib/types/robots/mega-store.ts +44 -81
  592. package/src/alphalib/types/robots/meta-read.ts +21 -36
  593. package/src/alphalib/types/robots/meta-write.ts +35 -53
  594. package/src/alphalib/types/robots/minio-import.ts +34 -86
  595. package/src/alphalib/types/robots/minio-store.ts +37 -72
  596. package/src/alphalib/types/robots/progress-simulate.ts +14 -28
  597. package/src/alphalib/types/robots/s3-import.ts +32 -63
  598. package/src/alphalib/types/robots/s3-store.ts +53 -74
  599. package/src/alphalib/types/robots/script-run.ts +44 -55
  600. package/src/alphalib/types/robots/sftp-import.ts +34 -61
  601. package/src/alphalib/types/robots/sftp-store.ts +42 -65
  602. package/src/alphalib/types/robots/speech-transcribe.ts +53 -71
  603. package/src/alphalib/types/robots/supabase-import.ts +37 -84
  604. package/src/alphalib/types/robots/supabase-store.ts +41 -78
  605. package/src/alphalib/types/robots/swift-import.ts +38 -80
  606. package/src/alphalib/types/robots/swift-store.ts +44 -84
  607. package/src/alphalib/types/robots/text-speak.ts +36 -62
  608. package/src/alphalib/types/robots/text-translate.ts +35 -62
  609. package/src/alphalib/types/robots/tigris-import.ts +34 -86
  610. package/src/alphalib/types/robots/tigris-store.ts +35 -70
  611. package/src/alphalib/types/robots/tlcdn-deliver.ts +23 -47
  612. package/src/alphalib/types/robots/transloadit-import.ts +24 -29
  613. package/src/alphalib/types/robots/transloadit-store.ts +20 -7
  614. package/src/alphalib/types/robots/tus-store.ts +34 -58
  615. package/src/alphalib/types/robots/upload-handle.ts +23 -41
  616. package/src/alphalib/types/robots/video-adaptive.ts +28 -51
  617. package/src/alphalib/types/robots/video-artwork.ts +28 -54
  618. package/src/alphalib/types/robots/video-concat.ts +29 -52
  619. package/src/alphalib/types/robots/video-encode.ts +39 -62
  620. package/src/alphalib/types/robots/video-generate.ts +20 -18
  621. package/src/alphalib/types/robots/video-merge.ts +36 -55
  622. package/src/alphalib/types/robots/video-ondemand.ts +48 -62
  623. package/src/alphalib/types/robots/video-split.ts +32 -61
  624. package/src/alphalib/types/robots/video-subtitle.ts +30 -52
  625. package/src/alphalib/types/robots/video-thumbs.ts +74 -78
  626. package/src/alphalib/types/robots/vimeo-import.ts +12 -17
  627. package/src/alphalib/types/robots/vimeo-store.ts +46 -65
  628. package/src/alphalib/types/robots/wasabi-import.ts +33 -81
  629. package/src/alphalib/types/robots/wasabi-store.ts +38 -74
  630. package/src/alphalib/types/robots/youtube-store.ts +81 -91
  631. package/src/alphalib/types/stackVersions.ts +26 -3
  632. package/src/alphalib/types/storageAsset.ts +85 -29
  633. package/src/alphalib/types/utility.ts +52 -0
  634. package/src/cli/commands/storage.ts +28 -2
  635. package/src/cli/semanticIntents/imageGenerate.ts +4 -4
  636. package/src/cli/storageReceipts.ts +4 -1
  637. package/src/storageImage.ts +18 -3
@@ -1,5 +1,8 @@
1
1
  import { z } from 'zod';
2
- import { stackVersions } from "../stackVersions.js";
2
+ import { formatEnglishList } from "../../englishList.js";
3
+ import { ecmaWhitespaceCharacterClass, zodInputPreservingTransform, zodStableJsonDefault, zodWithConservativeJsonInputSchema, zodWithJsonInputSchema, } from "../../lib/zodInputSemantics.js";
4
+ import { inheritApiParameterDescription } from "../apiParameterDescription.js";
5
+ import { runtimeStackVersions, stackVersions } from "../stackVersions.js";
3
6
  export const robotNames = z.enum([
4
7
  'AiChatRobot',
5
8
  'UploadHandleRobot',
@@ -76,6 +79,7 @@ export const robotNames = z.enum([
76
79
  'DropboxImportRobot',
77
80
  'DropboxStoreRobot',
78
81
  'HttpImportRobot',
82
+ 'HttpRequestRobot',
79
83
  'SftpImportRobot',
80
84
  'SftpStoreRobot',
81
85
  'FtpImportRobot',
@@ -98,11 +102,15 @@ export const robotNames = z.enum([
98
102
  'TextSpeakRobot',
99
103
  'TextTranslateRobot',
100
104
  'FilePreviewRobot',
105
+ 'TusStoreRobot',
101
106
  'TransloaditImportRobot',
102
107
  'TransloaditStoreRobot',
103
- 'TusStoreRobot',
104
108
  'ProgressSimulateRobot',
105
109
  ]);
110
+ const awsGcpMinimumChargeUsdSchema = z.object({
111
+ aws: z.number(),
112
+ gcp: z.number(),
113
+ });
106
114
  export const robotMetaSchema = z.object({
107
115
  // Added keys from api2/lib/config.ts:
108
116
  name: robotNames,
@@ -112,18 +120,12 @@ export const robotMetaSchema = z.object({
112
120
  preserveInputFileUrls: z.boolean().optional(),
113
121
  minimumCharge: z.number().optional(),
114
122
  minimumChargeUsd: z.number().optional(),
115
- minimumChargeUsdPerSpeechTranscribeMinute: z
116
- .object({
117
- aws: z.number(),
118
- gcp: z.number(),
119
- })
120
- .optional(),
121
- minimumChargeUsdPerDocumentOcrPage: z
122
- .object({
123
- aws: z.number(),
124
- gcp: z.number(),
123
+ minimumChargeUsdPerSpeechTranscribeMinute: awsGcpMinimumChargeUsdSchema
124
+ .extend({
125
+ replicate: z.literal('variable').optional(),
125
126
  })
126
127
  .optional(),
128
+ minimumChargeUsdPerDocumentOcrPage: awsGcpMinimumChargeUsdSchema.optional(),
127
129
  applyCommunityPlanMediaTrim: z.boolean().optional(),
128
130
  isAllowedForUrlTransform: z.boolean(),
129
131
  removeJobResultFilesFromDiskRightAfterStoringOnS3: z.boolean(),
@@ -136,22 +138,14 @@ export const robotMetaSchema = z.object({
136
138
  importRanges: z.array(z.string()).optional(),
137
139
  extraChargeForImageResize: z.number().optional(),
138
140
  // Original keys from content repo:
139
- bytescount: z.number(),
140
141
  description: z.string().optional(),
141
- discount_factor: z.number(),
142
- discount_pct: z.number(),
143
- // To avoid a cycling dependency back to template.ts, we'll use any for now:
144
- // example_code: assemblyInstructionsSchema.optional(),
145
- example_code: z.any().optional(),
142
+ // Validate against assembled public Robot schemas at publication, outside this dependency cycle.
143
+ example_code: z.unknown().optional(),
146
144
  example_code_description: z.string().optional(),
147
145
  extended_description: z.string().optional(),
148
146
  has_small_icon: z.literal(true).optional(),
149
- minimum_charge: z.number(),
150
- minimum_charge_usd: z.union([z.number(), z.record(z.string(), z.number())]).optional(),
151
- minimum_charge_usd_note: z.string().optional(),
152
147
  ogimage: z.string().optional(),
153
148
  marketing_intro: z.string().optional(),
154
- output_factor: z.number(),
155
149
  override_lvl1: z.string().optional(),
156
150
  purpose_sentence: z.string(),
157
151
  purpose_verb: z.enum([
@@ -206,11 +200,10 @@ export const robotMetaSchema = z.object({
206
200
  'file-filtering',
207
201
  'file-importing',
208
202
  'handling-uploads',
209
- 'image-manipulation',
203
+ 'image-processing',
210
204
  'media-cataloging',
211
205
  'video-encoding',
212
206
  ]),
213
- slot_count: z.number(),
214
207
  title: z.string(),
215
208
  typical_file_size_mb: z.number(),
216
209
  typical_file_type: z.enum([
@@ -224,6 +217,158 @@ export const robotMetaSchema = z.object({
224
217
  ]),
225
218
  uses_tools: z.array(z.enum(['ffmpeg', 'imagemagick'])).optional(),
226
219
  });
220
+ /** Shared processing metadata; per-Robot exceptions stay explicit. */
221
+ export const robotProcessingMeta = {
222
+ typical_file_size_mb: 1.2,
223
+ typical_file_type: 'file',
224
+ queueSlotCount: 10,
225
+ priceFactor: 1,
226
+ isAllowedForUrlTransform: true,
227
+ isInternal: false,
228
+ removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
229
+ stage: 'ga',
230
+ };
231
+ /** Shared artificial-intelligence metadata; exceptions stay local. */
232
+ export const robotArtificialIntelligenceMeta = {
233
+ ...robotProcessingMeta,
234
+ service_slug: 'artificial-intelligence',
235
+ typical_file_type: 'image',
236
+ trackOutputFileSize: true,
237
+ };
238
+ /** Shared audio-encoding metadata; exceptions stay local. */
239
+ export const robotAudioEncodingMeta = {
240
+ ...robotProcessingMeta,
241
+ override_lvl1: 'Audio Encoding',
242
+ service_slug: 'audio-encoding',
243
+ typical_file_size_mb: 3.8,
244
+ typical_file_type: 'audio file',
245
+ priceFactor: 4,
246
+ queueSlotCount: 20,
247
+ trackOutputFileSize: true,
248
+ applyCommunityPlanMediaTrim: true,
249
+ };
250
+ /** Shared document-processing metadata; exceptions stay local. */
251
+ export const robotDocumentProcessingMeta = {
252
+ ...robotProcessingMeta,
253
+ override_lvl1: 'Document Processing',
254
+ service_slug: 'document-processing',
255
+ typical_file_size_mb: 0.8,
256
+ typical_file_type: 'document',
257
+ minimumCharge: 1048576,
258
+ };
259
+ /** Shared content-delivery metadata; exceptions stay local. */
260
+ export const robotContentDeliveryMeta = {
261
+ ...robotProcessingMeta,
262
+ service_slug: 'content-delivery',
263
+ queueSlotCount: 0,
264
+ downloadInputFiles: false,
265
+ preserveInputFileUrls: true,
266
+ isAllowedForUrlTransform: false,
267
+ trackOutputFileSize: false,
268
+ isInternal: true,
269
+ };
270
+ /** Shared file-filtering metadata; exceptions stay local. */
271
+ export const robotFileFilteringMeta = {
272
+ ...robotProcessingMeta,
273
+ override_lvl1: 'File Filtering',
274
+ service_slug: 'file-filtering',
275
+ trackOutputFileSize: true,
276
+ };
277
+ /** Shared media-cataloging metadata; exceptions stay local. */
278
+ export const robotMediaCatalogingMeta = {
279
+ ...robotProcessingMeta,
280
+ override_lvl1: 'Media Cataloging',
281
+ service_slug: 'media-cataloging',
282
+ queueSlotCount: 15,
283
+ };
284
+ /** Shared image-processing metadata; exceptions stay local. */
285
+ export const robotImageProcessingMeta = {
286
+ ...robotProcessingMeta,
287
+ override_lvl1: 'Image Processing',
288
+ service_slug: 'image-processing',
289
+ typical_file_size_mb: 0.8,
290
+ typical_file_type: 'image',
291
+ };
292
+ /** Shared code-evaluation metadata; exceptions stay local. */
293
+ export const robotCodeEvaluationMeta = {
294
+ ...robotProcessingMeta,
295
+ override_lvl1: 'Code Evaluation',
296
+ service_slug: 'code-evaluation',
297
+ isAllowedForUrlTransform: false,
298
+ trackOutputFileSize: true,
299
+ };
300
+ /** Shared video-encoding metadata; exceptions stay local. */
301
+ export const robotVideoEncodingMeta = {
302
+ ...robotProcessingMeta,
303
+ override_lvl1: 'Video Encoding',
304
+ service_slug: 'video-encoding',
305
+ typical_file_size_mb: 80,
306
+ typical_file_type: 'video',
307
+ queueSlotCount: 60,
308
+ isAllowedForUrlTransform: false,
309
+ trackOutputFileSize: true,
310
+ applyCommunityPlanMediaTrim: true,
311
+ };
312
+ /** Shared import metadata; provider-specific prices, queues, and flags override it locally. */
313
+ export const robotImportMeta = {
314
+ override_lvl1: 'File Importing',
315
+ purpose_verb: 'import',
316
+ service_slug: 'file-importing',
317
+ typical_file_size_mb: 1.2,
318
+ typical_file_type: 'file',
319
+ priceFactor: 6.6666,
320
+ queueSlotCount: 20,
321
+ isAllowedForUrlTransform: true,
322
+ trackOutputFileSize: false,
323
+ isInternal: false,
324
+ removeJobResultFilesFromDiskRightAfterStoringOnS3: true,
325
+ stage: 'ga',
326
+ };
327
+ /** Shared store metadata; provider-specific prices, queues, and flags override it locally. */
328
+ export const robotStoreMeta = {
329
+ override_lvl1: 'File Exporting',
330
+ purpose_verb: 'export',
331
+ service_slug: 'file-exporting',
332
+ typical_file_size_mb: 1.2,
333
+ typical_file_type: 'file',
334
+ priceFactor: 6.6666,
335
+ queueSlotCount: 10,
336
+ isAllowedForUrlTransform: true,
337
+ trackOutputFileSize: false,
338
+ isInternal: false,
339
+ removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
340
+ stage: 'ga',
341
+ };
342
+ /** Single-Step processing example; unusual input relationships stay explicit. */
343
+ export function createProcessingExample(name, robot, parameters = {}) {
344
+ return { steps: { [name]: { robot, use: ':original', ...parameters } } };
345
+ }
346
+ /** Standard directory import example; nonrecursive providers omit the flag. */
347
+ export function createStorageImportExample(robot, credentials, recursive = true) {
348
+ return {
349
+ steps: {
350
+ imported: {
351
+ robot,
352
+ credentials,
353
+ path: 'path/to/files/',
354
+ ...(recursive ? { recursive: true } : {}),
355
+ },
356
+ },
357
+ };
358
+ }
359
+ /** Standard export example shared by compatible storage providers. */
360
+ export function createStorageStoreExample(robot, credentials) {
361
+ return {
362
+ steps: {
363
+ exported: {
364
+ robot,
365
+ use: ':original',
366
+ credentials,
367
+ path: 'my_target_folder/${unique_prefix}/${file.url_name}',
368
+ },
369
+ },
370
+ };
371
+ }
227
372
  // These schemas can be reproduced with z.string().regex(). However, this causes some issues.
228
373
  // We use this in combination with unions. Internally Zod normalizes unions. A string schema and
229
374
  // enums merged in some way. Both are validated. Normally, if a Zod union has errors, all of them
@@ -233,20 +378,10 @@ export const robotMetaSchema = z.object({
233
378
  // is more useful in pretty much every case. To work around this, we use z.custom() instead, as Zod
234
379
  // can’t normalize that.
235
380
  const interpolationRegexFull = /^\${.+}$/;
236
- export const interpolationSchemaFull = z.custom((input) => typeof input === 'string' && interpolationRegexFull.test(input), 'Must be a full interpolation string');
381
+ export const interpolationSchemaFull = zodWithJsonInputSchema(z.custom((input) => typeof input === 'string' && interpolationRegexFull.test(input), 'Must be a full interpolation string'), z.string().regex(/^\$\{[^\n\r\u2028\u2029]+\}$/u));
237
382
  const interpolationRegexPartial = /\${.+}/;
238
- export const interpolationSchemaPartial = z.custom((input) => typeof input === 'string' && interpolationRegexPartial.test(input), 'Must be a partially interpolatable string');
383
+ export const interpolationSchemaPartial = zodWithJsonInputSchema(z.custom((input) => typeof input === 'string' && interpolationRegexPartial.test(input), 'Must be a partially interpolatable string'), z.string().regex(/\$\{[^\n\r\u2028\u2029]+\}/u));
239
384
  export const booleanStringSchema = z.enum(['true', 'false']);
240
- export const inputSortBySchema = z
241
- .enum(['auto', 'basename', 'import_order'])
242
- .default('basename')
243
- .describe(`
244
- Controls how bundled inputs are ordered when no explicit numbered alias such as \`video_1\` or \`document_1\` is used.
245
-
246
- The default \`"basename"\` keeps the legacy natural basename sorting behavior.
247
-
248
- Set this to \`"import_order"\` to preserve the order of array-based import steps when all input files carry complete import order metadata. \`"auto"\` has the same import-order preference with natural basename sorting as fallback.
249
- `);
250
385
  function isZodTypeAny(schema) {
251
386
  return schema instanceof z.ZodType;
252
387
  }
@@ -269,23 +404,21 @@ function toInterpolatableUnionOptions(options) {
269
404
  const [head, ...tail] = options;
270
405
  return [head, ...tail];
271
406
  }
272
- export function interpolateRecursive(schema) {
407
+ function interpolateRecursiveWithoutDescriptionRegistration(schema) {
273
408
  const def = schema._def;
274
409
  switch (def.typeName) {
275
410
  case z.ZodFirstPartyTypeKind.ZodBoolean:
276
411
  return toInterpolatableSchema(z.union([
277
412
  interpolationSchemaFull,
278
- z
279
- .union([schema, booleanStringSchema])
280
- .transform((value) => value === true || value === false),
413
+ zodInputPreservingTransform(z.union([schema, booleanStringSchema]), (value) => value === true || value === 'true'),
281
414
  ]));
282
415
  case z.ZodFirstPartyTypeKind.ZodArray: {
283
416
  let replacement = z.array(interpolateRecursive(def.type), def);
284
417
  if (def.exactLength != null) {
285
- replacement = replacement.min(def.exactLength.value, def.exactLength.message);
418
+ replacement = replacement.length(def.exactLength.value, def.exactLength.message);
286
419
  }
287
420
  if (def.maxLength != null) {
288
- replacement = replacement.min(def.maxLength.value, def.maxLength.message);
421
+ replacement = replacement.max(def.maxLength.value, def.maxLength.message);
289
422
  }
290
423
  if (def.minLength != null) {
291
424
  replacement = replacement.min(def.minLength.value, def.minLength.message);
@@ -293,21 +426,27 @@ export function interpolateRecursive(schema) {
293
426
  return toInterpolatableSchema(z.union([interpolationSchemaFull, replacement]));
294
427
  }
295
428
  case z.ZodFirstPartyTypeKind.ZodDefault: {
296
- const replacement = toInterpolatableSchema(interpolateRecursive(def.innerType)).default(def.defaultValue());
429
+ const replacement = zodStableJsonDefault(toInterpolatableSchema(interpolateRecursive(def.innerType)), def.defaultValue());
297
430
  return toInterpolatableSchema(def.description ? replacement.describe(def.description) : replacement);
298
431
  }
299
432
  case z.ZodFirstPartyTypeKind.ZodEffects:
433
+ return toInterpolatableSchema(z.union([
434
+ def.schema instanceof z.ZodString
435
+ ? interpolationSchemaPartial
436
+ : interpolationSchemaFull,
437
+ schema,
438
+ ], def));
300
439
  case z.ZodFirstPartyTypeKind.ZodEnum:
301
440
  case z.ZodFirstPartyTypeKind.ZodLiteral:
302
441
  return toInterpolatableSchema(z.union([interpolationSchemaFull, schema], def));
303
442
  case z.ZodFirstPartyTypeKind.ZodNumber:
443
+ if (!(schema instanceof z.ZodNumber)) {
444
+ throw new Error('A ZodNumber definition must belong to a ZodNumber schema');
445
+ }
304
446
  return toInterpolatableSchema(z.union([
305
- z
306
- .string()
307
- .regex(/^\d+(\.\d+)?$/)
308
- .transform((value) => Number(value)),
447
+ zodInputPreservingTransform(z.string().regex(/^[0-9]+(\.[0-9]+)?$/u), (value) => Number(value)),
309
448
  interpolationSchemaFull,
310
- schema,
449
+ zodWithJsonInputSchema(zodInputPreservingTransform(schema, (value) => value), schema.finite()),
311
450
  ], def));
312
451
  case z.ZodFirstPartyTypeKind.ZodNullable:
313
452
  return toInterpolatableSchema(interpolateRecursive(def.innerType).nullable().describe(def.description));
@@ -344,34 +483,50 @@ export function interpolateRecursive(schema) {
344
483
  return toInterpolatableSchema(schema);
345
484
  }
346
485
  }
486
+ /** Interpolate a schema while preserving stable API-description ownership metadata. */
487
+ export function interpolateRecursive(schema) {
488
+ const interpolated = interpolateRecursiveWithoutDescriptionRegistration(schema);
489
+ return toInterpolatableSchema(inheritApiParameterDescription(schema, interpolated));
490
+ }
347
491
  /**
348
492
  * The robot keys specified in this array can’t be interpolated.
349
493
  */
350
494
  const uninterpolatableKeys = ['interpolate', 'robot', 'use'];
351
495
  const uninterpolatableKeySet = new Set(uninterpolatableKeys);
496
+ const robotIdentifierDescription = 'Identifier of the [robot](https://transloadit.com/docs/robots/) to execute';
497
+ const robotDocumentationSchemas = new WeakMap();
498
+ /** Recover the public schema before interpolation adds wire-only alternatives and generic copy. */
499
+ export function getRobotDocumentationSchema(schema) {
500
+ return robotDocumentationSchemas.get(schema) ?? schema;
501
+ }
352
502
  export function interpolateRobot(schema) {
353
503
  const def = schema._def;
354
- return toInterpolatableRobot(z
504
+ const interpolated = toInterpolatableRobot(z
355
505
  .object(Object.fromEntries(Object.entries(def.shape()).map(([key, nested]) => [
356
506
  key,
357
507
  uninterpolatableKeySet.has(key)
358
- ? nested
508
+ ? key === 'robot'
509
+ ? nested.description == null
510
+ ? nested.describe(robotIdentifierDescription)
511
+ : nested
512
+ : nested
359
513
  : interpolateRecursive(toFirstPartySchema(nested)),
360
514
  ])), def)
361
515
  .strict());
516
+ robotDocumentationSchemas.set(interpolated, schema);
517
+ return interpolated;
362
518
  }
363
- const robotInterpolateBooleanSchema = z
364
- .union([z.boolean(), booleanStringSchema])
365
- .transform((value) => value === true || value === 'true');
366
- export const robotInterpolateSchema = z
367
- .union([robotInterpolateBooleanSchema, z.record(robotInterpolateBooleanSchema)])
368
- .describe(`
519
+ const robotInterpolateBooleanSchema = zodInputPreservingTransform(z.union([z.boolean(), booleanStringSchema]), (value) => value === true || value === 'true');
520
+ const robotInterpolateDescription = `
369
521
  Controls whether Assembly Variables are interpolated for individual instruction fields.
370
522
 
371
523
  By default, most Robot instruction fields interpolate Assembly Variables. Set this to \`false\` to treat every instruction field as literal text, or set an individual field path to \`false\` to treat only that field as literal text. For Robot-specific fields that are literal by default, set this to \`true\` or set that field path to \`true\` to opt back into interpolation.
372
524
 
373
525
  Use field names such as \`path\`, or dotted paths such as \`ffmpeg.vf\` for nested objects.
374
- `);
526
+ `;
527
+ export const robotInterpolateSchema = z
528
+ .union([robotInterpolateBooleanSchema, z.record(robotInterpolateBooleanSchema)])
529
+ .describe(robotInterpolateDescription);
375
530
  /**
376
531
  * Fields that are shared by all Transloadit robots.
377
532
  */
@@ -380,36 +535,92 @@ export const robotOutputMetaSchema = z.union([
380
535
  z.boolean(),
381
536
  z.array(z.string()),
382
537
  ]);
383
- export const robotBase = z
384
- .object({
385
- interpolate: robotInterpolateSchema.optional(),
386
- output_meta: robotOutputMetaSchema.optional().describe(`
538
+ const robotOutputMetaDescription = `
387
539
  Allows you to specify a set of metadata that is more expensive on CPU power to calculate, and thus is disabled by default to keep your Assemblies processing fast.
388
540
 
389
541
  For images, you can add \`"has_transparency": true\` in this object to extract if the image contains transparent parts and \`"dominant_colors": true\` to extract an array of hexadecimal color codes from the image.
390
542
 
391
543
  For images, you can also add \`"blurhash": true\` to extract a [BlurHash](https://blurha.sh) string — a compact representation of a placeholder for the image, useful for showing a blurred preview while the full image loads.
392
544
 
393
- For videos, you can add the \`"colorspace: true"\` parameter to extract the colorspace of the output video.
545
+ For images, \`"thumbhash": true\` instead extracts a base64-encoded [ThumbHash](https://evanw.github.io/thumbhash/) into \`meta.thumbhash\`, together with \`meta.has_alpha\` (whether an alpha channel exists, even when fully opaque). It describes EXIF-oriented pixels and uses the first frame of animated images. Extraction is best-effort: images above 40 megapixels, unsupported formats, or a failed/bounded decode produce no placeholder. Successful extraction adds a metadata charge equivalent to 20% of that file's bytes. No ThumbHash surcharge applies when disabled or when no hash is produced.
546
+
547
+ Set this option on the Step producing the image, such as \`/upload/handle\` for uploaded originals or \`/image/resize\` for processed outputs. Setting it only on \`/transloadit/store\` does not request extraction: storage preserves the producer's metadata. Transloadit Storage persists a generated hash with its immutable version and returns it in stored results and native asset reads. Direct S3 uploads do not generate placeholders. A placeholder contains image information, so protect it with the same access controls as the full image.
548
+
549
+ For videos, you can add the \`"colorspace": true\` parameter to extract the colorspace of the output video.
394
550
 
395
551
  For videos, you can also add \`"interlaced": true\` to detect whether the video is interlaced. This combines the cheap ffprobe \`field_order\` flag with a bounded \`idet\` sampling pass over the first frames of the source, exposing \`interlaced\`, \`field_order\`, and a diagnostic \`interlace_detection\` object under \`file.meta\`. This is computationally expensive and billed accordingly.
396
552
 
397
553
  For audio, you can add \`"mean_volume": true\` to get a single value representing the mean average volume of the audio file.
398
554
 
399
555
  You can also set this to \`false\` to skip metadata extraction and speed up transcoding.
400
- `),
401
- result: z
402
- .boolean()
403
- .default(false)
404
- .describe('Whether the results of this Step should be present in the Assembly Status JSON'),
405
- queue: z
406
- .enum(['batch'])
407
- .optional()
408
- .describe(`Setting the queue to 'batch', manually downgrades the priority of jobs for this step to avoid consuming Priority job slots for jobs that don't need zero queue waiting times`),
409
- force_accept: z
410
- .boolean()
411
- .default(false)
412
- .describe(`Force a Robot to accept a file type it would have ignored.
556
+ `;
557
+ const robotQueueDescription = `Setting the queue to 'batch', manually downgrades the priority of jobs for this step to avoid consuming Priority job slots for jobs that don't need zero queue waiting times`;
558
+ const robotIgnoreErrorsPhaseDescriptions = `Ignore errors during specific phases of processing.
559
+
560
+ Setting this to \`["meta"]\` will cause the Robot to ignore errors during metadata extraction.
561
+
562
+ Setting this to \`["execute"]\` will cause the Robot to ignore errors during the main execution phase.`;
563
+ export const autoProviderDescription = 'Chooses the best provider based on your request.';
564
+ const aiProviderDescription = `${autoProviderDescription}
565
+
566
+ Select a specific provider to override automatic selection.`;
567
+ const legacyFfmpegVersions = formatEnglishList(runtimeStackVersions.ffmpeg.valid.map((version) => JSON.stringify(version)));
568
+ const deprecatedFfmpegVersions = formatEnglishList([
569
+ ...new Set(Object.keys(runtimeStackVersions.ffmpeg.deprecated).map((version) => JSON.stringify(`${version.split('.')[0]}.x`))),
570
+ ]);
571
+ export const robotParameterDocs = {
572
+ adaptive_filtering: {
573
+ description: `
574
+ Controls the image compression for PNG images. Setting to \`true\` results in smaller file size, while increasing processing time. It is encouraged to keep this option disabled.
575
+ `,
576
+ },
577
+ ai_provider: {
578
+ description: aiProviderDescription,
579
+ },
580
+ audio_bitrate: {
581
+ description: `
582
+ Bit rate of the resulting audio file, in bits per second. If not specified will default to the bit rate of the input audio file.
583
+ `,
584
+ },
585
+ audio_preset: {
586
+ description: `
587
+ Performs conversion using pre-configured settings.
588
+
589
+ If you specify your own FFmpeg parameters using the <dfn>Robot</dfn>'s \`ffmpeg\` parameter and you have not specified a preset, then the default \`mp3\` preset is not applied. This is to prevent you from having to override each of the MP3 preset's values manually.
590
+
591
+ For a list of audio presets, see [audio presets](/docs/presets/audio/).
592
+ `,
593
+ },
594
+ audio_sample_rate: {
595
+ description: `
596
+ Sample rate of the resulting audio file, in Hertz. If not specified will default to the sample rate of the input audio file.
597
+ `,
598
+ },
599
+ auto_provider: {
600
+ description: autoProviderDescription,
601
+ },
602
+ error_msg: {
603
+ description: `
604
+ The error message shown to your users (such as by Uppy) when a file is declined and \`error_on_decline\` is set to \`true\`.
605
+ `,
606
+ },
607
+ error_on_decline: {
608
+ description: `
609
+ If this is set to \`true\` and one or more files are declined, the Assembly will be stopped and marked with an error.
610
+ `,
611
+ },
612
+ ffmpeg: {
613
+ description: `
614
+ A parameter object to be passed to FFmpeg. If a preset is used, the options specified are merged on top of the ones from the preset. For available options, see the [FFmpeg documentation](https://ffmpeg.org/ffmpeg-doc.html). Options specified here take precedence over the preset options.
615
+ `,
616
+ },
617
+ ffmpeg_stack: {
618
+ description: `
619
+ Selects the FFmpeg stack version to use for encoding. We currently recommend using "${stackVersions.ffmpeg.recommendedVersion}". The exact versions ${legacyFfmpegVersions} are legacy values that remain accepted for backward compatibility. Deprecated ${deprecatedFfmpegVersions} values are also accepted.
620
+ `,
621
+ },
622
+ force_accept: {
623
+ description: `Force a Robot to accept a file type it would have ignored.
413
624
 
414
625
  By default, Robots ignore files they are not familiar with.
415
626
  [🤖/video/encode](/docs/robots/video-encode/), for
@@ -417,22 +628,224 @@ example, will happily ignore input images.
417
628
 
418
629
  With the \`force_accept\` parameter set to \`true\`, you can force Robots to accept all files thrown at them.
419
630
  This will typically lead to errors and should only be used for debugging or combatting edge cases.
420
- `),
421
- ignore_errors: z
422
- .union([z.boolean(), z.array(z.enum(['meta', 'execute']))])
423
- .transform((value) => (value === true ? ['meta', 'execute'] : value === false ? [] : value))
424
- .default([])
425
- .describe(`
426
- Ignore errors during specific phases of processing.
631
+ `,
632
+ },
633
+ force_name: {
634
+ description: 'Custom name for the imported file(s). By default file names are derived from the source.',
635
+ },
636
+ ignore_errors: {
637
+ description: `
638
+ ${robotIgnoreErrorsPhaseDescriptions}
427
639
 
428
- Setting this to \`["meta"]\` will cause the Robot to ignore errors during metadata extraction.
640
+ Setting this to \`true\` is equivalent to \`["meta", "execute"]\` and will ignore errors in both phases.
641
+ `,
642
+ },
643
+ import_ignore_errors: {
644
+ description: `
645
+ ${robotIgnoreErrorsPhaseDescriptions}
429
646
 
430
- Setting this to \`["execute"]\` will cause the Robot to ignore errors during the main execution phase.
647
+ Setting this to \`["import"]\` will cause the Robot to ignore errors while importing the source file. The \`"import"\` phase is only available to import Robots.
431
648
 
432
- Setting this to \`true\` is equivalent to \`["meta", "execute"]\` and will ignore errors in both phases.
433
- `),
649
+ Setting this to \`true\` is equivalent to \`["meta", "import", "execute"]\` and will ignore errors in all three phases.
650
+ `,
651
+ },
652
+ import_on_errors: {
653
+ description: `
654
+ Setting this to \`["meta"]\` will still import the file on metadata extraction errors. \`ignore_errors\` is similar, it also ignores the error and makes sure the Robot doesn't stop, but it doesn't import the file.
655
+ `,
656
+ },
657
+ interpolate: {
658
+ description: robotInterpolateDescription,
659
+ },
660
+ ocr_format: {
661
+ description: `
662
+ In what format to return the extracted text.
663
+ - \`"json"\` returns a JSON file.
664
+ - \`"meta"\` does not return a file, but stores the data inside Transloadit's file object (under \`\${file.meta.recognized_text}\`, which is an array of strings) that's passed around between encoding <dfn>Steps</dfn>, so that you can use the values to burn the data into videos, filter on them, etc.
665
+ - \`"text"\` returns the recognized text as a plain UTF-8 encoded text file.
666
+ `,
667
+ },
668
+ ocr_granularity: {
669
+ description: `
670
+ Whether to return a full response including coordinates for the text (\`"full"\`), or a flat list of the extracted phrases (\`"list"\`). This parameter has no effect if the \`format\` parameter is set to \`"text"\`.
671
+ `,
672
+ },
673
+ ocr_provider: {
674
+ description: `${aiProviderDescription}
675
+ AWS supports detection for the following languages: English, Arabic, Russian, German, French, Italian, Portuguese and Spanish. GCP allows for a wider range of languages, with varying levels of support which can be found on the [official documentation](https://cloud.google.com/vision/docs/languages/).
676
+ `,
677
+ },
678
+ output_meta: {
679
+ description: robotOutputMetaDescription,
680
+ },
681
+ queue: {
682
+ description: robotQueueDescription,
683
+ },
684
+ result: {
685
+ description: 'Whether the results of this Step should be present in the Assembly Status JSON',
686
+ },
687
+ return_file_stubs: {
688
+ description: `
689
+ If set to \`true\`, the Robot will not yet import the actual files but instead return an empty file stub that includes a URL from where the file can be imported by subsequent Robots. This is useful for cases where subsequent Steps need more control over the import process, such as with 🤖/video/ondemand. This parameter should only be set if all subsequent Steps use Robots that support file stubs.
690
+ `,
691
+ },
692
+ robot: {
693
+ description: `
694
+ Specifies which Robot should process files passed to this Step.
695
+
696
+ See [all Robots](https://transloadit.com/docs/robots/), each with their own parameters, such as
697
+ \`width\` to control how an image is resized. The full list of parameters per Robot can be taken
698
+ from the Robot docs.
699
+ `,
700
+ },
701
+ seed: {
702
+ description: 'Seed for the random number generator.',
703
+ },
704
+ sort_by: {
705
+ description: `
706
+ Controls how bundled inputs are ordered when no explicit numbered alias for the input type is used. Numbered aliases end with a numeric suffix such as \`_1\`.
707
+
708
+ The default \`"basename"\` keeps the legacy natural basename sorting behavior.
709
+
710
+ Set this to \`"import_order"\` to preserve the order of array-based import steps when all input files carry complete import order metadata. \`"auto"\` has the same import-order preference with natural basename sorting as fallback.
711
+ `,
712
+ },
713
+ use: {
714
+ description: `
715
+ Specifies which Step(s) to use as input.
716
+
717
+ - You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
718
+ - You can provide several Steps as input with arrays:
719
+ \`\`\`json
720
+ {
721
+ "use": [
722
+ ":original",
723
+ "encoded",
724
+ "resized"
725
+ ]
726
+ }
727
+ \`\`\`
728
+ - You can also tag input Steps with \`as\` to pass semantic intent to robots:
729
+ \`\`\`json
730
+ {
731
+ "use": [
732
+ {
733
+ "name": ":original",
734
+ "as": "image"
735
+ },
736
+ {
737
+ "name": ":original",
738
+ "as": "mask"
739
+ }
740
+ ]
741
+ }
742
+ \`\`\`
743
+
744
+ > [!Tip]
745
+ > That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
746
+ `,
747
+ },
748
+ user_meta: {
749
+ description: `
750
+ Adds custom JSON metadata to each emitted file without changing its contents. Nested objects and arrays are supported.
751
+
752
+ Inheritance depends on the Robot. Values merge with existing \`user_meta\` on the output file; the current Step replaces matching top-level keys. Assign required keys explicitly when a Robot creates fresh outputs.
753
+
754
+ In processing Steps, \`\${file.*}\` refers to the first input and \`\${result.*}\` to the emitted file. Values are evaluated per output after the Robot runs, before subsequent metadata extraction and temporary storage. On \`:original\`, values are evaluated per upload before metadata extraction.
755
+
756
+ Downstream Steps read \`\${file.user_meta.key}\`. See [Custom metadata](https://transloadit.com/docs/topics/assembly-variables/#user-meta) for a complete example and inheritance rules.
757
+ `,
758
+ },
759
+ video_background: {
760
+ description: `
761
+ The background color of the resulting video in the \`"rrggbbaa"\` format (red, green, blue, alpha) when used with the \`"pad"\` resize strategy. The default color is black.
762
+ `,
763
+ },
764
+ video_height: {
765
+ description: `
766
+ Height of the new video, in pixels.
767
+
768
+ If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied height](/docs/presets/video/) will be implemented.
769
+ `,
770
+ },
771
+ video_preset: {
772
+ description: `
773
+ Converts a video according to [pre-configured settings](/docs/presets/video/).
774
+
775
+ You can use the value \`'empty'\` here if you specify your own FFmpeg parameters using the <dfn>Robot</dfn> or do not want Transloadit to set any encoding settings.
776
+ `,
777
+ },
778
+ video_width: {
779
+ description: `
780
+ Width of the new video, in pixels.
781
+
782
+ If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied width](/docs/presets/video/) will be implemented.
783
+ `,
784
+ },
785
+ };
786
+ export const inputSortBySchema = z
787
+ .enum(['auto', 'basename', 'import_order'])
788
+ .default('basename')
789
+ .describe(robotParameterDocs.sort_by.description);
790
+ export const robotPathSchema = z
791
+ .string()
792
+ .regex(/^\/[a-z0-9_-]+\/[a-z0-9_-]+$/u)
793
+ .describe(robotParameterDocs.robot.description);
794
+ export const robotBase = z
795
+ .object({
796
+ interpolate: robotInterpolateSchema.optional(),
797
+ output_meta: robotOutputMetaSchema
798
+ .optional()
799
+ .describe(robotParameterDocs.output_meta.description),
800
+ user_meta: z.record(z.unknown()).default({}).describe(robotParameterDocs.user_meta.description),
801
+ result: z.boolean().default(false).describe(robotParameterDocs.result.description),
802
+ queue: z.enum(['batch']).optional().describe(robotParameterDocs.queue.description),
803
+ force_accept: z.boolean().default(false).describe(robotParameterDocs.force_accept.description),
804
+ ignore_errors: zodInputPreservingTransform(z.union([z.boolean(), z.array(z.enum(['meta', 'execute']))]), (value) => (value === true ? ['meta', 'execute'] : value === false ? [] : value))
805
+ .default([])
806
+ .describe(robotParameterDocs.ignore_errors.description),
434
807
  })
435
808
  .strict();
809
+ /**
810
+ * Standard variants for strict Robot instructions without catchalls. Keep this outside the adapter
811
+ * replaced by the SDK's Zod 4 sync. Inference uses the active Zod version's object types.
812
+ */
813
+ export function createRobotSchemaVariants(schema) {
814
+ const strictSchema = schema.strict();
815
+ const result = schema.shape.result;
816
+ const withHiddenFields = strictSchema
817
+ .merge(z.object({ result: z.union([z.literal('debug'), result]).optional() }))
818
+ .strict();
819
+ return {
820
+ schema,
821
+ withHiddenFields,
822
+ interpolatable: interpolateRobot(strictSchema),
823
+ interpolatableWithHiddenFields: interpolateRobot(withHiddenFields),
824
+ };
825
+ }
826
+ /** Standard strict variants with extra internal fields. */
827
+ export function extendRobotSchemaVariants(schema, hiddenFields) {
828
+ const strictSchema = schema.strict();
829
+ const result = schema.shape.result;
830
+ const withHiddenFields = strictSchema.extend({
831
+ result: z.union([z.literal('debug'), result]).optional(),
832
+ ...hiddenFields,
833
+ });
834
+ return {
835
+ schema,
836
+ withHiddenFields,
837
+ interpolatable: interpolateRobot(strictSchema),
838
+ interpolatableWithHiddenFields: interpolateRobot(withHiddenFields),
839
+ };
840
+ }
841
+ /** Define a strict Robot's schema variants together with its metadata. */
842
+ export function defineRobot(meta, schema) {
843
+ return { meta, ...createRobotSchemaVariants(schema) };
844
+ }
845
+ /** Define a strict Robot with extra internal fields and its metadata. */
846
+ export function defineRobotWithHiddenFields(meta, schema, hiddenFields) {
847
+ return { meta, ...extendRobotSchemaVariants(schema, hiddenFields) };
848
+ }
436
849
  export const useParamObjectSchema = z
437
850
  .object({
438
851
  name: z.string(),
@@ -488,40 +901,7 @@ export const robotUse = z
488
901
  .object({
489
902
  use: z
490
903
  .union([useParamStepsSchema, useParamObjectOfStepsSchema])
491
- .describe(`
492
- Specifies which Step(s) to use as input.
493
-
494
- - You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
495
- - You can provide several Steps as input with arrays:
496
- \`\`\`json
497
- {
498
- "use": [
499
- ":original",
500
- "encoded",
501
- "resized"
502
- ]
503
- }
504
- \`\`\`
505
- - You can also tag an input Step with \`as\` to pass semantic intent to robots:
506
- - You can also tag input Steps with \`as\` to pass semantic intent to robots:
507
- \`\`\`json
508
- {
509
- "use": [
510
- {
511
- "name": ":original",
512
- "as": "image"
513
- },
514
- {
515
- "name": ":original",
516
- "as": "mask"
517
- }
518
- ]
519
- }
520
- \`\`\`
521
-
522
- > [!Tip]
523
- > That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
524
- `)
904
+ .describe(robotParameterDocs.use.description)
525
905
  .optional(),
526
906
  })
527
907
  .strict();
@@ -529,57 +909,19 @@ export const robotUseWithHiddenFields = z
529
909
  .object({
530
910
  use: z
531
911
  .union([useParamStepsWithHiddenFieldsSchema, useParamObjectOfStepsWithHiddenFieldsSchema])
532
- .describe(`
533
- Specifies which Step(s) to use as input.
534
-
535
- - You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
536
- - You can provide several Steps as input with arrays:
537
- \`\`\`json
538
- {
539
- "use": [
540
- ":original",
541
- "encoded",
542
- "resized"
543
- ]
544
- }
545
- \`\`\`
546
- - You can also tag an input Step with \`as\` to pass semantic intent to robots:
547
- - You can also tag input Steps with \`as\` to pass semantic intent to robots:
548
- \`\`\`json
549
- {
550
- "use": [
551
- {
552
- "name": ":original",
553
- "as": "image"
554
- },
555
- {
556
- "name": ":original",
557
- "as": "mask"
558
- }
559
- ]
560
- }
561
- \`\`\`
562
-
563
- > [!Tip]
564
- > That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
565
- `)
912
+ .describe(robotParameterDocs.use.description)
566
913
  .optional(),
567
914
  })
568
915
  .strict();
569
- export const complexWidthSchema = z.preprocess((val) => {
570
- if (typeof val === 'string' && val.startsWith('${')) {
571
- return val;
572
- }
573
- if (typeof val === 'string') {
574
- const num = Number.parseInt(val, 10);
575
- if (Number.isNaN(num) || val.includes('x')) {
576
- return val;
577
- }
578
- return num;
579
- }
580
- return val;
581
- }, z.number().int().min(1).max(25_000));
582
- export const complexHeightSchema = z.preprocess((val) => {
916
+ const complexDimensionNumberSchema = z.number().int().min(1).max(25_000);
917
+ const complexDimensionStringSchema = z
918
+ .string()
919
+ .regex(new RegExp(`^${ecmaWhitespaceCharacterClass}*\\+?0*(?:[1-9][0-9]{0,3}|1[0-9]{4}|2[0-4][0-9]{3}|25000)(?:[^0-9x][^x]*)?$`, 'u'));
920
+ const complexDimensionInputSchema = z.union([
921
+ complexDimensionNumberSchema,
922
+ complexDimensionStringSchema,
923
+ ]);
924
+ function normalizeComplexDimension(val) {
583
925
  if (typeof val === 'string' && val.startsWith('${')) {
584
926
  return val;
585
927
  }
@@ -591,7 +933,9 @@ export const complexHeightSchema = z.preprocess((val) => {
591
933
  return num;
592
934
  }
593
935
  return val;
594
- }, z.number().int().min(1).max(25_000));
936
+ }
937
+ export const complexWidthSchema = zodWithJsonInputSchema(z.preprocess(normalizeComplexDimension, complexDimensionNumberSchema), complexDimensionInputSchema);
938
+ export const complexHeightSchema = zodWithJsonInputSchema(z.preprocess(normalizeComplexDimension, complexDimensionNumberSchema), complexDimensionInputSchema);
595
939
  export const robotFFmpeg = z.object({
596
940
  ffmpeg: z
597
941
  .object({
@@ -701,16 +1045,15 @@ export const robotFFmpeg = z.object({
701
1045
  })
702
1046
  .passthrough()
703
1047
  .optional()
704
- .describe(`
705
- A parameter object to be passed to FFmpeg. If a preset is used, the options specified are merged on top of the ones from the preset. For available options, see the [FFmpeg documentation](https://ffmpeg.org/ffmpeg-doc.html). Options specified here take precedence over the preset options.
706
- `),
1048
+ .describe(robotParameterDocs.ffmpeg.description),
707
1049
  ffmpeg_stack: z
708
1050
  // Any semver in range is allowed and normalized. The enum is used for editor completions.
709
- .union([z.enum(['v6', 'v7', 'v8']), z.string().regex(/^v?[5-8](\.\d+)?(\.\d+)?$/)])
710
- .default('v6.0.0')
711
- .describe(`
712
- Selects the FFmpeg stack version to use for encoding. These versions reflect real FFmpeg versions. We currently recommend to use "v6.0.0". Deprecated "v5.x" values are accepted for backward compatibility.
713
- `),
1051
+ .union([
1052
+ z.enum(stackVersions.ffmpeg.suggestedValues),
1053
+ z.string().regex(stackVersions.ffmpeg.test),
1054
+ ])
1055
+ .default(runtimeStackVersions.ffmpeg.default)
1056
+ .describe(robotParameterDocs.ffmpeg_stack.description),
714
1057
  });
715
1058
  /**
716
1059
  * Replace all underscores with hyphens.
@@ -786,43 +1129,16 @@ const audioPresets = createPresets([
786
1129
  ]);
787
1130
  export const robotFFmpegAudio = robotFFmpeg
788
1131
  .extend({
789
- preset: z
790
- .enum(audioPresets)
791
- .transform(transformPreset)
1132
+ preset: zodInputPreservingTransform(z.enum(audioPresets), transformPreset)
792
1133
  .optional()
793
- .describe(`
794
- Performs conversion using pre-configured settings.
795
-
796
- If you specify your own FFmpeg parameters using the <dfn>Robot</dfn>'s \`ffmpeg\` parameter and you have not specified a preset, then the default \`mp3\` preset is not applied. This is to prevent you from having to override each of the MP3 preset's values manually.
797
-
798
- For a list of audio presets, see [audio presets](/docs/presets/audio/).
799
- `),
1134
+ .describe(robotParameterDocs.audio_preset.description),
800
1135
  })
801
1136
  .strict();
802
1137
  export const robotFFmpegVideo = robotFFmpeg
803
1138
  .extend({
804
- width: z
805
- .number()
806
- .int()
807
- .min(1)
808
- .nullish()
809
- .describe(`
810
- Width of the new video, in pixels.
811
-
812
- If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied width](/docs/presets/video/) will be implemented.
813
- `),
814
- height: z
815
- .number()
816
- .int()
817
- .min(1)
818
- .nullish()
819
- .describe(`
820
- Height of the new video, in pixels.
821
-
822
- If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied height](/docs/presets/video/) will be implemented.
823
- `),
824
- preset: z
825
- .enum([
1139
+ width: z.number().int().min(1).nullish().describe(robotParameterDocs.video_width.description),
1140
+ height: z.number().int().min(1).nullish().describe(robotParameterDocs.video_height.description),
1141
+ preset: zodInputPreservingTransform(z.enum([
826
1142
  ...createPresets([
827
1143
  'android',
828
1144
  'android-high',
@@ -917,14 +1233,9 @@ If the value is not specified and the \`preset\` parameter is available, the \`p
917
1233
  'wmv',
918
1234
  ]),
919
1235
  ...audioPresets,
920
- ])
921
- .transform(transformPreset)
1236
+ ]), transformPreset)
922
1237
  .optional()
923
- .describe(`
924
- Converts a video according to [pre-configured settings](/docs/presets/video/).
925
-
926
- If you specify your own FFmpeg parameters using the <dfn>Robot</dfn>'s and/or do not not want Transloadit to set any encoding setting, starting \`ffmpeg_stack: "${stackVersions.ffmpeg.recommendedVersion}"\`, you can use the value \`'empty'\` here.
927
- `),
1238
+ .describe(robotParameterDocs.video_preset.description),
928
1239
  })
929
1240
  .strict();
930
1241
  export const unsafeCoordinatesSchema = z
@@ -955,11 +1266,65 @@ export const next_page_token = z.string().default('');
955
1266
  export const files_per_page = z.number().int().default(1000);
956
1267
  export const page_number = z.number().int().default(1);
957
1268
  export const recursive = z.boolean().default(false);
1269
+ export const bucketImportPath = path.describe(`
1270
+ The path in your bucket to the specific file or directory. If the path points to a file, only this file will be imported. For example: \`images/avatar.jpg\`.
1271
+
1272
+ If it points to a directory, indicated by a trailing slash (\`/\`), then all files that are direct descendants of this directory will be imported. For example: \`images/\`.
1273
+
1274
+ Directories are **not** imported recursively. If you want to import files from subdirectories and sub-subdirectories, enable the \`recursive\` parameter.
1275
+
1276
+ If you want to import all files from the root directory, please use \`/\` as the value here. In this case, make sure all your objects belong to a path. If you have objects in the root of your bucket that aren't prefixed with \`/\`, you'll receive an error: \`A client error (NoSuchKey) occurred when calling the GetObject operation: The specified key does not exist.\`
1277
+
1278
+ You can also use an array of path strings here to import multiple paths in the same <dfn>Robot</dfn>'s <dfn>Step</dfn>.
1279
+ `);
1280
+ export const storeFilePath = z
1281
+ .string()
1282
+ .default('${unique_prefix}/${file.url_name}')
1283
+ .describe(`
1284
+ The path at which the file is to be stored. This may include any available [Assembly variables](/docs/topics/assembly-instructions/#assembly-variables). The path must not be a directory.
1285
+ `);
1286
+ export const recursiveImportPageNumber = page_number.describe(`
1287
+ The pagination page number. For now, in order to not break backwards compatibility in non-recursive imports, this only works when recursive is set to \`true\`.
1288
+
1289
+ When doing big imports, make sure no files are added or removed from other scripts within your path, otherwise you might get weird results with the pagination.
1290
+ `);
1291
+ export const signedSslUrlLifetime = z
1292
+ .number()
1293
+ .int()
1294
+ .min(0)
1295
+ .optional()
1296
+ .describe(`
1297
+ This parameter provides signed URLs in the result JSON (in the \`signed_ssl_url\` property). The number that you set this parameter to is the URL expiry time in seconds. If this parameter is not used, no URL signing is done.
1298
+ `);
1299
+ export const recursiveImportPageSize = files_per_page.describe(`
1300
+ The pagination page size. This only works when recursive is \`true\` for now, in order to not break backwards compatibility in non-recursive imports.
1301
+ `);
1302
+ const bucketRegion = z
1303
+ .string()
1304
+ .optional()
1305
+ .describe(`
1306
+ The region where the bucket is located.
1307
+ `);
1308
+ export const storePath = z
1309
+ .string()
1310
+ .default('${unique_prefix}/${file.url_name}')
1311
+ .describe(`
1312
+ The path at which the file is to be stored. This may include any available [Assembly variables](/docs/topics/assembly-instructions/#assembly-variables).
1313
+ `);
1314
+ export const storageAcl = z
1315
+ .enum(['private', 'public-read'])
1316
+ .default('public-read')
1317
+ .describe(`
1318
+ The permissions used for this file.
1319
+ `);
1320
+ export const recursiveImport = recursive.describe(`
1321
+ Setting this to \`true\` will enable importing files from subdirectories and sub-subdirectories (etc.) of the given path.
1322
+
1323
+ Please use the pagination parameters \`page_number\` and \`files_per_page\` wisely here.
1324
+ `);
958
1325
  export const return_file_stubs = z
959
1326
  .boolean()
960
- .describe(`
961
- If set to \`true\`, the Robot will not yet import the actual files but instead return an empty file stub that includes a URL from where the file can be imported by subsequent Robots. This is useful for cases where subsequent Steps need more control over the import process, such as with 🤖/video/ondemand. This parameter should only be set if all subsequent Steps use Robots that support file stubs.
962
- `)
1327
+ .describe(robotParameterDocs.return_file_stubs.description)
963
1328
  .default(false);
964
1329
  export const port = z.number().int().min(1).max(65535);
965
1330
  // TODO: Use an enum.
@@ -978,13 +1343,24 @@ export const positionSchema = z.enum([
978
1343
  'top-left',
979
1344
  'top-right',
980
1345
  ]);
981
- export const percentageSchema = z.string().regex(/^\d+%$/);
982
- export const httpUrlSchema = z
1346
+ export const percentageSchema = z.string().regex(/^[0-9]+%$/u);
1347
+ const portableHttpUrlPattern = /^[Hh][Tt][Tt][Pp][Ss]?:\/\/(?:[^ ]|[ ])/u;
1348
+ const portableHttpUrlInputSchema = z
1349
+ .string()
1350
+ .regex(portableHttpUrlPattern, 'Must be an HTTP or HTTPS URL');
1351
+ export const httpUrlSchema = zodWithConservativeJsonInputSchema(z
983
1352
  .string()
984
1353
  .url()
985
- .regex(/^https?:\/\//i);
986
- export const color_with_alpha = z.string().regex(/^#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/);
987
- export const color_without_alpha = z.string().regex(/^#?[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/);
1354
+ .refine((value) => /^https?:\/\//iu.test(value), 'Must be an HTTP or HTTPS URL'), portableHttpUrlInputSchema);
1355
+ /** Header restrictions shared by HTTP import and request documentation. */
1356
+ export const httpHeaderSafetyDescription = `Header names must be valid HTTP tokens. Header values may contain horizontal tabs, but other control characters, including carriage returns and line feeds, are rejected.
1357
+
1358
+ In an array of header strings, \`"Header-Name;"\` sends an empty header value. Each entry must be a literal header; reading headers from a file with \`@filename\` is not supported.`;
1359
+ export const color_with_alpha = z.string().regex(/^#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/u);
1360
+ export const color_without_alpha = z.string().regex(/^#?[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/u);
1361
+ export const videoBackgroundSchema = color_with_alpha
1362
+ .default('#00000000')
1363
+ .describe(robotParameterDocs.video_background.description);
988
1364
  // Extended color schemas that also support named colors (for robots that support them)
989
1365
  export const color_with_alpha_with_named = z.union([
990
1366
  color_with_alpha, // Extend the base hex color schema
@@ -1024,15 +1400,16 @@ export const color_without_alpha_with_named = z.union([
1024
1400
  ]);
1025
1401
  export const bitrateSchema = z.number().int().min(1);
1026
1402
  export const sampleRateSchema = z.number().int().min(1);
1027
- export const optimize_priority = z
1028
- .enum(['compression-ratio', 'conversion-speed'])
1029
- .default('conversion-speed');
1403
+ export const optimize_priority = z.enum(['compression-ratio', 'conversion-speed']);
1030
1404
  export const robotImagemagick = z
1031
1405
  .object({
1032
1406
  imagemagick_stack: z
1033
1407
  // Any semver in range is allowed and normalized. The enum is used for editor completions.
1034
- .union([z.enum(['v3']), z.string().regex(/^v?[23](\.\d+)?(\.\d+)?$/)])
1035
- .default('v3'),
1408
+ .union([
1409
+ z.enum([stackVersions.imagemagick.recommendedVersion]),
1410
+ z.string().regex(stackVersions.imagemagick.test),
1411
+ ])
1412
+ .default(runtimeStackVersions.imagemagick.default),
1036
1413
  })
1037
1414
  .strict();
1038
1415
  export const colorspaceSchema = z.enum([
@@ -1072,17 +1449,15 @@ export const colorspaceSchema = z.enum([
1072
1449
  'YPbPr',
1073
1450
  'YUV',
1074
1451
  ]);
1452
+ export const imageAdaptiveFilteringSchema = z
1453
+ .boolean()
1454
+ .default(false)
1455
+ .describe(robotParameterDocs.adaptive_filtering.description);
1456
+ export const imageQualityValueSchema = z.number().int().min(1).max(100);
1075
1457
  // TODO: add before and after images to the description.
1076
- export const imageQualitySchema = z
1077
- .number()
1078
- .int()
1079
- .min(1)
1080
- .max(100)
1081
- .default(92)
1082
- .describe(`
1458
+ export const imageQualitySchema = imageQualityValueSchema.default(92).describe(`
1083
1459
  Controls the image compression for JPG and PNG images. Please also take a look at [🤖/image/optimize](/docs/robots/image-optimize/).
1084
1460
  `);
1085
- export const autoProviderDescription = 'Chooses the best provider based on your request';
1086
1461
  export const awsGcpAiProviderSchema = z.enum(['auto', 'aws', 'gcp']).default('auto');
1087
1462
  export const aiProviderSchema = z
1088
1463
  .enum(['auto', 'aws', 'gcp', 'replicate', 'fal', 'transloadit'])
@@ -1094,17 +1469,14 @@ export const robotImport = z
1094
1469
  .union([z.string(), z.array(z.string())])
1095
1470
  .nullable()
1096
1471
  .default(null)
1097
- .describe('Custom name for the imported file(s). By default file names are derived from the source.'),
1098
- ignore_errors: z
1099
- .union([z.boolean(), z.array(z.enum(['meta', 'import', 'execute']))])
1100
- .transform((value) => value === true ? ['meta', 'import', 'execute'] : value === false ? [] : value)
1101
- .default([]),
1472
+ .describe(robotParameterDocs.force_name.description),
1473
+ ignore_errors: zodInputPreservingTransform(z.union([z.boolean(), z.array(z.enum(['meta', 'import', 'execute']))]), (value) => (value === true ? ['meta', 'import', 'execute'] : value === false ? [] : value))
1474
+ .default([])
1475
+ .describe(robotParameterDocs.import_ignore_errors.description),
1102
1476
  import_on_errors: z
1103
1477
  .array(z.enum(['meta']))
1104
1478
  .default([])
1105
- .describe(`
1106
- Setting this to \`["meta"]\` will still import the file on metadata extraction errors. \`ignore_errors\` is similar, it also ignores the error and makes sure the Robot doesn't stop, but it doesn't import the file.
1107
- `),
1479
+ .describe(robotParameterDocs.import_on_errors.description),
1108
1480
  })
1109
1481
  .strict();
1110
1482
  export const azureBase = z
@@ -1182,7 +1554,7 @@ export const cloudflareBase = z
1182
1554
  .string()
1183
1555
  .optional()
1184
1556
  .describe(`
1185
- Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your cloudflare bucket, Key, Secret and Bucket region.
1557
+ Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your Cloudflare R2 bucket, Key, Secret and Bucket region.
1186
1558
 
1187
1559
  While we recommend to use <dfn>Template Credentials</dfn> at all times, some use cases demand dynamic credentials for which using <dfn>Template Credentials</dfn> is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead: \`"bucket"\`, \`"host"\`, \`"key"\`, \`"secret"\`.
1188
1560
  `),
@@ -1286,17 +1658,12 @@ export const megaBase = z
1286
1658
  .string()
1287
1659
  .optional()
1288
1660
  .describe(`
1289
- Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your MEGA object storage bucket, Key, Secret and Bucket region.
1661
+ Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your MEGA S4 Object Storage bucket, Key, Secret and Bucket region.
1290
1662
 
1291
1663
  While we recommend to use <dfn>Template Credentials</dfn> at all times, some use cases demand dynamic credentials for which using <dfn>Template Credentials</dfn> is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead: \`"bucket"\`, \`"bucket_region"\`, \`"key"\`, \`"secret"\`.
1292
1664
  `),
1293
1665
  bucket: z.string().optional(),
1294
- bucket_region: z
1295
- .string()
1296
- .optional()
1297
- .describe(`
1298
- The region where the bucket is located.
1299
- `),
1666
+ bucket_region: bucketRegion,
1300
1667
  host: z.string().optional(),
1301
1668
  key: z.string().optional(),
1302
1669
  secret: z.string().optional(),
@@ -1308,7 +1675,7 @@ export const s3Base = z
1308
1675
  .string()
1309
1676
  .optional()
1310
1677
  .describe(`
1311
- Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your S3 bucket, Key, Secret and Bucket region.
1678
+ Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your S3 \`bucket\`, \`key\`, \`secret\` and \`bucket_region\`.
1312
1679
 
1313
1680
  While we recommend to use <dfn>Template Credentials</dfn> at all times, some use cases demand dynamic credentials for which using <dfn>Template Credentials</dfn> is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead: \`"bucket"\`, \`"bucket_region"\` (for example: \`"us-east-1"\` or \`"eu-west-2"\`), \`"key"\`, \`"secret"\`.
1314
1681
  `),
@@ -1347,12 +1714,7 @@ While we recommend to use <dfn>Template Credentials</dfn> at all times, some use
1347
1714
  If you do use these parameters, make sure to use the **Endpoint** value under \`Storage > S3 Connection\` in the Supabase console for the \`"host"\` value, and the values under **S3 Access Keys** on the same page for your \`"key"\` and \`"secret"\`.
1348
1715
  `),
1349
1716
  bucket: z.string().optional(),
1350
- bucket_region: z
1351
- .string()
1352
- .optional()
1353
- .describe(`
1354
- The region where the bucket is located.
1355
- `),
1717
+ bucket_region: bucketRegion,
1356
1718
  host: z.string().optional(),
1357
1719
  key: z.string().optional(),
1358
1720
  secret: z.string().optional(),
@@ -1364,18 +1726,17 @@ export const swiftBase = z
1364
1726
  .string()
1365
1727
  .optional()
1366
1728
  .describe(`
1367
- Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your Swift bucket, Key, Secret and Bucket region.
1729
+ Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your OpenStack Swift container (provided through the \`"bucket"\` parameter), host, Key and Secret.
1368
1730
 
1369
1731
  While we recommend to use <dfn>Template Credentials</dfn> at all times, some use cases demand dynamic credentials for which using <dfn>Template Credentials</dfn> is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead: \`"bucket"\`, \`"host"\`, \`"key"\`, \`"secret"\`.
1370
1732
  `),
1371
1733
  bucket: z.string().optional(),
1372
- bucket_region: z
1734
+ host: z
1373
1735
  .string()
1374
1736
  .optional()
1375
1737
  .describe(`
1376
- The region where the bucket is located.
1738
+ The S3-compatible object storage endpoint for the OpenStack Swift service. This is required when supplying dynamic credentials directly instead of using Template Credentials.
1377
1739
  `),
1378
- host: z.string().optional(),
1379
1740
  key: z.string().optional(),
1380
1741
  secret: z.string().optional(),
1381
1742
  })
@@ -1386,17 +1747,12 @@ export const tigrisBase = z
1386
1747
  .string()
1387
1748
  .optional()
1388
1749
  .describe(`
1389
- Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your MinIO bucket, Key, Secret and Bucket region.
1750
+ Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your Tigris bucket, Key, Secret and Bucket region.
1390
1751
 
1391
1752
  While we recommend to use <dfn>Template Credentials</dfn> at all times, some use cases demand dynamic credentials for which using <dfn>Template Credentials</dfn> is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead: \`"bucket"\`, \`"host"\`, \`"key"\`, \`"secret"\`.
1392
1753
  `),
1393
1754
  bucket: z.string().optional(),
1394
- bucket_region: z
1395
- .string()
1396
- .optional()
1397
- .describe(`
1398
- The region where the bucket is located.
1399
- `),
1755
+ bucket_region: bucketRegion,
1400
1756
  host: z.string().optional(),
1401
1757
  key: z.string().optional(),
1402
1758
  secret: z.string().optional(),
@@ -1413,12 +1769,7 @@ Please create your associated <dfn>Template Credentials</dfn> in your Transloadi
1413
1769
  While we recommend to use <dfn>Template Credentials</dfn> at all times, some use cases demand dynamic credentials for which using <dfn>Template Credentials</dfn> is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead: \`"bucket"\`, \`"host"\`, \`"key"\`, \`"secret"\`.
1414
1770
  `),
1415
1771
  bucket: z.string().optional(),
1416
- bucket_region: z
1417
- .string()
1418
- .optional()
1419
- .describe(`
1420
- The region where the bucket is located.
1421
- `),
1772
+ bucket_region: bucketRegion,
1422
1773
  host: z.string().optional(),
1423
1774
  key: z.string().optional(),
1424
1775
  secret: z.string().optional(),
@@ -1501,9 +1852,7 @@ You can also use a JSON string of such an object with coordinates in similar fas
1501
1852
  "{\\"x1\\": <Integer>, \\"y1\\": <Integer>, \\"x2\\": <Integer>, \\"y2\\": <Integer>}"
1502
1853
  \`\`\`
1503
1854
  `),
1504
- background: color_with_alpha.default('#00000000').describe(`
1505
- 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.
1506
- `),
1855
+ background: videoBackgroundSchema,
1507
1856
  rotate: z
1508
1857
  // We can’t use enum.
1509
1858
  // See https://github.com/colinhacks/zod/issues/2686