@transloadit/zod 4.5.0 → 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 (729) hide show
  1. package/README.md +37 -0
  2. package/dist/v3/aiMessages.d.ts +33254 -0
  3. package/dist/v3/aiMessages.d.ts.map +1 -0
  4. package/dist/v3/aiMessages.js +478 -0
  5. package/dist/v3/apiParameterDescription.d.ts +14 -0
  6. package/dist/v3/apiParameterDescription.d.ts.map +1 -0
  7. package/dist/v3/apiParameterDescription.js +19 -0
  8. package/dist/v3/assemblyStatus.d.ts +4849 -63097
  9. package/dist/v3/assemblyStatus.d.ts.map +1 -1
  10. package/dist/v3/assemblyStatus.js +68 -55
  11. package/dist/v3/englishList.d.ts +3 -0
  12. package/dist/v3/englishList.d.ts.map +1 -0
  13. package/dist/v3/englishList.js +11 -0
  14. package/dist/v3/errorReason.d.ts +7 -0
  15. package/dist/v3/errorReason.d.ts.map +1 -0
  16. package/dist/v3/errorReason.js +13 -0
  17. package/dist/v3/file.d.ts +7 -0
  18. package/dist/v3/file.d.ts.map +1 -1
  19. package/dist/v3/file.js +15 -0
  20. package/dist/v3/fileHash.d.ts +16 -0
  21. package/dist/v3/fileHash.d.ts.map +1 -0
  22. package/dist/v3/fileHash.js +9 -0
  23. package/dist/v3/imagemagickDensity.d.ts.map +1 -1
  24. package/dist/v3/imagemagickDensity.js +2 -2
  25. package/dist/v3/index.d.ts +4 -0
  26. package/dist/v3/index.d.ts.map +1 -1
  27. package/dist/v3/index.js +4 -0
  28. package/dist/v3/lib/zodInputSemantics.d.ts +18 -0
  29. package/dist/v3/lib/zodInputSemantics.d.ts.map +1 -0
  30. package/dist/v3/lib/zodInputSemantics.js +85 -0
  31. package/dist/v3/object.d.ts +71 -0
  32. package/dist/v3/object.d.ts.map +1 -0
  33. package/dist/v3/object.js +195 -0
  34. package/dist/v3/responseErrors/HttpImportRobot.d.ts +23 -0
  35. package/dist/v3/responseErrors/HttpImportRobot.d.ts.map +1 -0
  36. package/dist/v3/responseErrors/HttpImportRobot.js +22 -0
  37. package/dist/v3/robots/_ai-models.d.ts +28 -0
  38. package/dist/v3/robots/_ai-models.d.ts.map +1 -0
  39. package/dist/v3/robots/_ai-models.js +79 -0
  40. package/dist/v3/robots/_index.d.ts +619 -1235
  41. package/dist/v3/robots/_index.d.ts.map +1 -1
  42. package/dist/v3/robots/_index.js +4 -0
  43. package/dist/v3/robots/_instructions-primitives.d.ts +513 -138
  44. package/dist/v3/robots/_instructions-primitives.d.ts.map +1 -1
  45. package/dist/v3/robots/_instructions-primitives.js +627 -280
  46. package/dist/v3/robots/ai-chat.d.ts +755 -1992
  47. package/dist/v3/robots/ai-chat.d.ts.map +1 -1
  48. package/dist/v3/robots/ai-chat.js +235 -368
  49. package/dist/v3/robots/assembly-savejson.d.ts +28 -16
  50. package/dist/v3/robots/assembly-savejson.d.ts.map +1 -1
  51. package/dist/v3/robots/assembly-savejson.js +2 -11
  52. package/dist/v3/robots/audio-artwork.d.ts +124 -111
  53. package/dist/v3/robots/audio-artwork.d.ts.map +1 -1
  54. package/dist/v3/robots/audio-artwork.js +9 -38
  55. package/dist/v3/robots/audio-concat.d.ts +114 -101
  56. package/dist/v3/robots/audio-concat.d.ts.map +1 -1
  57. package/dist/v3/robots/audio-concat.js +11 -25
  58. package/dist/v3/robots/audio-encode.d.ts +124 -111
  59. package/dist/v3/robots/audio-encode.d.ts.map +1 -1
  60. package/dist/v3/robots/audio-encode.js +13 -43
  61. package/dist/v3/robots/audio-loop.d.ts +124 -111
  62. package/dist/v3/robots/audio-loop.d.ts.map +1 -1
  63. package/dist/v3/robots/audio-loop.js +12 -40
  64. package/dist/v3/robots/audio-merge.d.ts +114 -101
  65. package/dist/v3/robots/audio-merge.d.ts.map +1 -1
  66. package/dist/v3/robots/audio-merge.js +11 -25
  67. package/dist/v3/robots/audio-split.d.ts +124 -111
  68. package/dist/v3/robots/audio-split.d.ts.map +1 -1
  69. package/dist/v3/robots/audio-split.js +15 -45
  70. package/dist/v3/robots/audio-waveform.d.ts +144 -131
  71. package/dist/v3/robots/audio-waveform.d.ts.map +1 -1
  72. package/dist/v3/robots/audio-waveform.js +15 -39
  73. package/dist/v3/robots/azure-import.d.ts +48 -35
  74. package/dist/v3/robots/azure-import.d.ts.map +1 -1
  75. package/dist/v3/robots/azure-import.js +5 -35
  76. package/dist/v3/robots/azure-store.d.ts +51 -35
  77. package/dist/v3/robots/azure-store.d.ts.map +1 -1
  78. package/dist/v3/robots/azure-store.js +11 -50
  79. package/dist/v3/robots/backblaze-import.d.ts +48 -35
  80. package/dist/v3/robots/backblaze-import.d.ts.map +1 -1
  81. package/dist/v3/robots/backblaze-import.js +6 -39
  82. package/dist/v3/robots/backblaze-store.d.ts +44 -31
  83. package/dist/v3/robots/backblaze-store.d.ts.map +1 -1
  84. package/dist/v3/robots/backblaze-store.js +8 -44
  85. package/dist/v3/robots/box-import.d.ts +44 -27
  86. package/dist/v3/robots/box-import.d.ts.map +1 -1
  87. package/dist/v3/robots/box-import.js +7 -33
  88. package/dist/v3/robots/box-store.d.ts +49 -32
  89. package/dist/v3/robots/box-store.d.ts.map +1 -1
  90. package/dist/v3/robots/box-store.js +8 -40
  91. package/dist/v3/robots/cloudfiles-import.d.ts +56 -43
  92. package/dist/v3/robots/cloudfiles-import.d.ts.map +1 -1
  93. package/dist/v3/robots/cloudfiles-import.js +8 -45
  94. package/dist/v3/robots/cloudfiles-store.d.ts +52 -39
  95. package/dist/v3/robots/cloudfiles-store.d.ts.map +1 -1
  96. package/dist/v3/robots/cloudfiles-store.js +5 -36
  97. package/dist/v3/robots/cloudflare-import.d.ts +48 -35
  98. package/dist/v3/robots/cloudflare-import.d.ts.map +1 -1
  99. package/dist/v3/robots/cloudflare-import.js +10 -57
  100. package/dist/v3/robots/cloudflare-store.d.ts +44 -31
  101. package/dist/v3/robots/cloudflare-store.d.ts.map +1 -1
  102. package/dist/v3/robots/cloudflare-store.js +11 -54
  103. package/dist/v3/robots/digitalocean-import.d.ts +48 -35
  104. package/dist/v3/robots/digitalocean-import.d.ts.map +1 -1
  105. package/dist/v3/robots/digitalocean-import.js +8 -49
  106. package/dist/v3/robots/digitalocean-store.d.ts +44 -31
  107. package/dist/v3/robots/digitalocean-store.d.ts.map +1 -1
  108. package/dist/v3/robots/digitalocean-store.js +8 -56
  109. package/dist/v3/robots/document-autorotate.d.ts +44 -31
  110. package/dist/v3/robots/document-autorotate.d.ts.map +1 -1
  111. package/dist/v3/robots/document-autorotate.js +5 -32
  112. package/dist/v3/robots/document-convert.d.ts +52 -39
  113. package/dist/v3/robots/document-convert.d.ts.map +1 -1
  114. package/dist/v3/robots/document-convert.js +7 -33
  115. package/dist/v3/robots/document-extract.d.ts +44 -31
  116. package/dist/v3/robots/document-extract.d.ts.map +1 -1
  117. package/dist/v3/robots/document-extract.js +10 -36
  118. package/dist/v3/robots/document-merge.d.ts +44 -31
  119. package/dist/v3/robots/document-merge.d.ts.map +1 -1
  120. package/dist/v3/robots/document-merge.js +4 -25
  121. package/dist/v3/robots/document-ocr.d.ts +52 -39
  122. package/dist/v3/robots/document-ocr.d.ts.map +1 -1
  123. package/dist/v3/robots/document-ocr.js +10 -47
  124. package/dist/v3/robots/document-optimize.d.ts +44 -31
  125. package/dist/v3/robots/document-optimize.d.ts.map +1 -1
  126. package/dist/v3/robots/document-optimize.js +7 -31
  127. package/dist/v3/robots/document-split.d.ts +44 -31
  128. package/dist/v3/robots/document-split.d.ts.map +1 -1
  129. package/dist/v3/robots/document-split.js +7 -34
  130. package/dist/v3/robots/document-thumbs.d.ts +54 -35
  131. package/dist/v3/robots/document-thumbs.d.ts.map +1 -1
  132. package/dist/v3/robots/document-thumbs.js +24 -31
  133. package/dist/v3/robots/dropbox-import.d.ts +40 -27
  134. package/dist/v3/robots/dropbox-import.d.ts.map +1 -1
  135. package/dist/v3/robots/dropbox-import.js +5 -35
  136. package/dist/v3/robots/dropbox-store.d.ts +48 -32
  137. package/dist/v3/robots/dropbox-store.d.ts.map +1 -1
  138. package/dist/v3/robots/dropbox-store.js +8 -42
  139. package/dist/v3/robots/edgly-deliver.d.ts +40 -27
  140. package/dist/v3/robots/edgly-deliver.d.ts.map +1 -1
  141. package/dist/v3/robots/edgly-deliver.js +4 -24
  142. package/dist/v3/robots/file-compress.d.ts +44 -31
  143. package/dist/v3/robots/file-compress.d.ts.map +1 -1
  144. package/dist/v3/robots/file-compress.js +4 -20
  145. package/dist/v3/robots/file-decompress.d.ts +52 -39
  146. package/dist/v3/robots/file-decompress.d.ts.map +1 -1
  147. package/dist/v3/robots/file-decompress.js +10 -41
  148. package/dist/v3/robots/file-filter.d.ts +65 -53
  149. package/dist/v3/robots/file-filter.d.ts.map +1 -1
  150. package/dist/v3/robots/file-filter.js +11 -40
  151. package/dist/v3/robots/file-hash.d.ts +48 -35
  152. package/dist/v3/robots/file-hash.d.ts.map +1 -1
  153. package/dist/v3/robots/file-hash.js +12 -43
  154. package/dist/v3/robots/file-preview.d.ts +61 -48
  155. package/dist/v3/robots/file-preview.d.ts.map +1 -1
  156. package/dist/v3/robots/file-preview.js +14 -39
  157. package/dist/v3/robots/file-read.d.ts +44 -31
  158. package/dist/v3/robots/file-read.d.ts.map +1 -1
  159. package/dist/v3/robots/file-read.js +5 -26
  160. package/dist/v3/robots/file-serve.d.ts +45 -32
  161. package/dist/v3/robots/file-serve.d.ts.map +1 -1
  162. package/dist/v3/robots/file-serve.js +4 -21
  163. package/dist/v3/robots/file-verify.d.ts +52 -39
  164. package/dist/v3/robots/file-verify.d.ts.map +1 -1
  165. package/dist/v3/robots/file-verify.js +11 -41
  166. package/dist/v3/robots/file-virusscan.d.ts +47 -31
  167. package/dist/v3/robots/file-virusscan.d.ts.map +1 -1
  168. package/dist/v3/robots/file-virusscan.js +16 -42
  169. package/dist/v3/robots/file-watermark.d.ts +45 -31
  170. package/dist/v3/robots/file-watermark.d.ts.map +1 -1
  171. package/dist/v3/robots/file-watermark.js +10 -29
  172. package/dist/v3/robots/ftp-import.d.ts +48 -35
  173. package/dist/v3/robots/ftp-import.d.ts.map +1 -1
  174. package/dist/v3/robots/ftp-import.js +5 -33
  175. package/dist/v3/robots/ftp-store.d.ts +57 -39
  176. package/dist/v3/robots/ftp-store.d.ts.map +1 -1
  177. package/dist/v3/robots/ftp-store.js +7 -34
  178. package/dist/v3/robots/google-import.d.ts +48 -35
  179. package/dist/v3/robots/google-import.d.ts.map +1 -1
  180. package/dist/v3/robots/google-import.js +10 -43
  181. package/dist/v3/robots/google-store.d.ts +44 -31
  182. package/dist/v3/robots/google-store.d.ts.map +1 -1
  183. package/dist/v3/robots/google-store.js +10 -41
  184. package/dist/v3/robots/html-convert.d.ts +51 -33
  185. package/dist/v3/robots/html-convert.d.ts.map +1 -1
  186. package/dist/v3/robots/html-convert.js +6 -22
  187. package/dist/v3/robots/http-import.d.ts +34 -21
  188. package/dist/v3/robots/http-import.d.ts.map +1 -1
  189. package/dist/v3/robots/http-import.js +14 -19
  190. package/dist/v3/robots/http-request.d.ts +538 -0
  191. package/dist/v3/robots/http-request.d.ts.map +1 -0
  192. package/dist/v3/robots/http-request.js +161 -0
  193. package/dist/v3/robots/image-bgremove.d.ts +48 -35
  194. package/dist/v3/robots/image-bgremove.d.ts.map +1 -1
  195. package/dist/v3/robots/image-bgremove.js +6 -33
  196. package/dist/v3/robots/image-copyrightdetect.d.ts +52 -39
  197. package/dist/v3/robots/image-copyrightdetect.d.ts.map +1 -1
  198. package/dist/v3/robots/image-copyrightdetect.js +9 -33
  199. package/dist/v3/robots/image-describe.d.ts +52 -39
  200. package/dist/v3/robots/image-describe.d.ts.map +1 -1
  201. package/dist/v3/robots/image-describe.js +8 -37
  202. package/dist/v3/robots/image-enhance.d.ts +52 -39
  203. package/dist/v3/robots/image-enhance.d.ts.map +1 -1
  204. package/dist/v3/robots/image-enhance.js +7 -31
  205. package/dist/v3/robots/image-facedetect.d.ts +60 -47
  206. package/dist/v3/robots/image-facedetect.d.ts.map +1 -1
  207. package/dist/v3/robots/image-facedetect.js +16 -44
  208. package/dist/v3/robots/image-generate.d.ts +35 -25
  209. package/dist/v3/robots/image-generate.d.ts.map +1 -1
  210. package/dist/v3/robots/image-generate.js +17 -22
  211. package/dist/v3/robots/image-merge.d.ts +44 -31
  212. package/dist/v3/robots/image-merge.d.ts.map +1 -1
  213. package/dist/v3/robots/image-merge.js +9 -40
  214. package/dist/v3/robots/image-ocr.d.ts +52 -39
  215. package/dist/v3/robots/image-ocr.d.ts.map +1 -1
  216. package/dist/v3/robots/image-ocr.js +11 -47
  217. package/dist/v3/robots/image-optimize.d.ts +44 -31
  218. package/dist/v3/robots/image-optimize.d.ts.map +1 -1
  219. package/dist/v3/robots/image-optimize.js +6 -32
  220. package/dist/v3/robots/image-resize.d.ts +378 -273
  221. package/dist/v3/robots/image-resize.d.ts.map +1 -1
  222. package/dist/v3/robots/image-resize.js +15 -42
  223. package/dist/v3/robots/image-upscale.d.ts +61 -45
  224. package/dist/v3/robots/image-upscale.d.ts.map +1 -1
  225. package/dist/v3/robots/image-upscale.js +23 -42
  226. package/dist/v3/robots/mega-import.d.ts +48 -35
  227. package/dist/v3/robots/mega-import.d.ts.map +1 -1
  228. package/dist/v3/robots/mega-import.js +12 -59
  229. package/dist/v3/robots/mega-store.d.ts +44 -31
  230. package/dist/v3/robots/mega-store.d.ts.map +1 -1
  231. package/dist/v3/robots/mega-store.js +14 -60
  232. package/dist/v3/robots/meta-read.d.ts +38 -24
  233. package/dist/v3/robots/meta-read.d.ts.map +1 -1
  234. package/dist/v3/robots/meta-read.js +4 -20
  235. package/dist/v3/robots/meta-write.d.ts +124 -111
  236. package/dist/v3/robots/meta-write.d.ts.map +1 -1
  237. package/dist/v3/robots/meta-write.js +9 -32
  238. package/dist/v3/robots/minio-import.d.ts +48 -35
  239. package/dist/v3/robots/minio-import.d.ts.map +1 -1
  240. package/dist/v3/robots/minio-import.js +9 -60
  241. package/dist/v3/robots/minio-store.d.ts +44 -31
  242. package/dist/v3/robots/minio-store.d.ts.map +1 -1
  243. package/dist/v3/robots/minio-store.js +9 -50
  244. package/dist/v3/robots/progress-simulate.d.ts +16 -10
  245. package/dist/v3/robots/progress-simulate.d.ts.map +1 -1
  246. package/dist/v3/robots/progress-simulate.js +8 -28
  247. package/dist/v3/robots/s3-import.d.ts +48 -35
  248. package/dist/v3/robots/s3-import.d.ts.map +1 -1
  249. package/dist/v3/robots/s3-import.js +7 -38
  250. package/dist/v3/robots/s3-store.d.ts +52 -36
  251. package/dist/v3/robots/s3-store.d.ts.map +1 -1
  252. package/dist/v3/robots/s3-store.js +14 -44
  253. package/dist/v3/robots/script-run.d.ts +47 -31
  254. package/dist/v3/robots/script-run.d.ts.map +1 -1
  255. package/dist/v3/robots/script-run.js +9 -27
  256. package/dist/v3/robots/sftp-import.d.ts +59 -43
  257. package/dist/v3/robots/sftp-import.d.ts.map +1 -1
  258. package/dist/v3/robots/sftp-import.js +7 -36
  259. package/dist/v3/robots/sftp-store.d.ts +55 -39
  260. package/dist/v3/robots/sftp-store.d.ts.map +1 -1
  261. package/dist/v3/robots/sftp-store.js +9 -41
  262. package/dist/v3/robots/speech-transcribe.d.ts +74 -57
  263. package/dist/v3/robots/speech-transcribe.d.ts.map +1 -1
  264. package/dist/v3/robots/speech-transcribe.js +23 -44
  265. package/dist/v3/robots/supabase-import.d.ts +48 -35
  266. package/dist/v3/robots/supabase-import.d.ts.map +1 -1
  267. package/dist/v3/robots/supabase-import.js +12 -59
  268. package/dist/v3/robots/supabase-store.d.ts +44 -43
  269. package/dist/v3/robots/supabase-store.d.ts.map +1 -1
  270. package/dist/v3/robots/supabase-store.js +12 -56
  271. package/dist/v3/robots/swift-import.d.ts +48 -47
  272. package/dist/v3/robots/swift-import.d.ts.map +1 -1
  273. package/dist/v3/robots/swift-import.js +14 -55
  274. package/dist/v3/robots/swift-store.d.ts +44 -43
  275. package/dist/v3/robots/swift-store.d.ts.map +1 -1
  276. package/dist/v3/robots/swift-store.js +14 -62
  277. package/dist/v3/robots/text-speak.d.ts +48 -35
  278. package/dist/v3/robots/text-speak.d.ts.map +1 -1
  279. package/dist/v3/robots/text-speak.js +11 -37
  280. package/dist/v3/robots/text-translate.d.ts +56 -43
  281. package/dist/v3/robots/text-translate.d.ts.map +1 -1
  282. package/dist/v3/robots/text-translate.js +9 -36
  283. package/dist/v3/robots/tigris-import.d.ts +48 -35
  284. package/dist/v3/robots/tigris-import.d.ts.map +1 -1
  285. package/dist/v3/robots/tigris-import.js +9 -60
  286. package/dist/v3/robots/tigris-store.d.ts +44 -31
  287. package/dist/v3/robots/tigris-store.d.ts.map +1 -1
  288. package/dist/v3/robots/tigris-store.js +7 -48
  289. package/dist/v3/robots/tlcdn-deliver.d.ts +40 -27
  290. package/dist/v3/robots/tlcdn-deliver.d.ts.map +1 -1
  291. package/dist/v3/robots/tlcdn-deliver.js +4 -25
  292. package/dist/v3/robots/transloadit-import.d.ts +42 -29
  293. package/dist/v3/robots/transloadit-import.d.ts.map +1 -1
  294. package/dist/v3/robots/transloadit-import.js +17 -21
  295. package/dist/v3/robots/transloadit-store.d.ts +34 -21
  296. package/dist/v3/robots/transloadit-store.d.ts.map +1 -1
  297. package/dist/v3/robots/transloadit-store.js +14 -6
  298. package/dist/v3/robots/tus-store.d.ts +48 -35
  299. package/dist/v3/robots/tus-store.d.ts.map +1 -1
  300. package/dist/v3/robots/tus-store.js +8 -37
  301. package/dist/v3/robots/upload-handle.d.ts +40 -27
  302. package/dist/v3/robots/upload-handle.d.ts.map +1 -1
  303. package/dist/v3/robots/upload-handle.js +4 -19
  304. package/dist/v3/robots/video-adaptive.d.ts +124 -111
  305. package/dist/v3/robots/video-adaptive.d.ts.map +1 -1
  306. package/dist/v3/robots/video-adaptive.js +4 -26
  307. package/dist/v3/robots/video-artwork.d.ts +124 -111
  308. package/dist/v3/robots/video-artwork.d.ts.map +1 -1
  309. package/dist/v3/robots/video-artwork.js +7 -32
  310. package/dist/v3/robots/video-concat.d.ts +124 -111
  311. package/dist/v3/robots/video-concat.d.ts.map +1 -1
  312. package/dist/v3/robots/video-concat.js +6 -27
  313. package/dist/v3/robots/video-encode.d.ts +141 -123
  314. package/dist/v3/robots/video-encode.d.ts.map +1 -1
  315. package/dist/v3/robots/video-encode.js +13 -38
  316. package/dist/v3/robots/video-generate.d.ts +35 -25
  317. package/dist/v3/robots/video-generate.d.ts.map +1 -1
  318. package/dist/v3/robots/video-generate.js +11 -18
  319. package/dist/v3/robots/video-merge.d.ts +143 -127
  320. package/dist/v3/robots/video-merge.d.ts.map +1 -1
  321. package/dist/v3/robots/video-merge.js +12 -32
  322. package/dist/v3/robots/video-ondemand.d.ts +180 -163
  323. package/dist/v3/robots/video-ondemand.d.ts.map +1 -1
  324. package/dist/v3/robots/video-ondemand.js +11 -27
  325. package/dist/v3/robots/video-split.d.ts +124 -111
  326. package/dist/v3/robots/video-split.d.ts.map +1 -1
  327. package/dist/v3/robots/video-split.js +11 -39
  328. package/dist/v3/robots/video-subtitle.d.ts +124 -111
  329. package/dist/v3/robots/video-subtitle.d.ts.map +1 -1
  330. package/dist/v3/robots/video-subtitle.js +7 -30
  331. package/dist/v3/robots/video-thumbs.d.ts +140 -123
  332. package/dist/v3/robots/video-thumbs.d.ts.map +1 -1
  333. package/dist/v3/robots/video-thumbs.js +46 -53
  334. package/dist/v3/robots/vimeo-import.d.ts +30 -17
  335. package/dist/v3/robots/vimeo-import.d.ts.map +1 -1
  336. package/dist/v3/robots/vimeo-import.js +7 -17
  337. package/dist/v3/robots/vimeo-store.d.ts +47 -31
  338. package/dist/v3/robots/vimeo-store.d.ts.map +1 -1
  339. package/dist/v3/robots/vimeo-store.js +11 -37
  340. package/dist/v3/robots/wasabi-import.d.ts +48 -35
  341. package/dist/v3/robots/wasabi-import.d.ts.map +1 -1
  342. package/dist/v3/robots/wasabi-import.js +9 -56
  343. package/dist/v3/robots/wasabi-store.d.ts +44 -31
  344. package/dist/v3/robots/wasabi-store.d.ts.map +1 -1
  345. package/dist/v3/robots/wasabi-store.js +10 -52
  346. package/dist/v3/robots/youtube-store.d.ts +58 -45
  347. package/dist/v3/robots/youtube-store.d.ts.map +1 -1
  348. package/dist/v3/robots/youtube-store.js +42 -63
  349. package/dist/v3/stackVersions.d.ts +40 -1
  350. package/dist/v3/stackVersions.d.ts.map +1 -1
  351. package/dist/v3/stackVersions.js +25 -3
  352. package/dist/v3/storageAsset.d.ts +6 -0
  353. package/dist/v3/storageAsset.d.ts.map +1 -1
  354. package/dist/v3/storageAsset.js +30 -12
  355. package/dist/v3/template.d.ts +2 -2
  356. package/dist/v3/templateCredential.d.ts +4 -4
  357. package/dist/v3/utility.d.ts +22 -0
  358. package/dist/v3/utility.d.ts.map +1 -0
  359. package/dist/v3/utility.js +1 -0
  360. package/dist/v4/aiMessages.d.ts +1100 -0
  361. package/dist/v4/aiMessages.d.ts.map +1 -0
  362. package/dist/v4/aiMessages.js +479 -0
  363. package/dist/v4/apiParameterDescription.d.ts +14 -0
  364. package/dist/v4/apiParameterDescription.d.ts.map +1 -0
  365. package/dist/v4/apiParameterDescription.js +19 -0
  366. package/dist/v4/assemblyReplay.d.ts.map +1 -1
  367. package/dist/v4/assemblyReplay.js +13 -12
  368. package/dist/v4/assemblyStatus.d.ts +850 -2611
  369. package/dist/v4/assemblyStatus.d.ts.map +1 -1
  370. package/dist/v4/assemblyStatus.js +410 -408
  371. package/dist/v4/builtinTemplates.d.ts.map +1 -1
  372. package/dist/v4/builtinTemplates.js +2 -1
  373. package/dist/v4/englishList.d.ts +3 -0
  374. package/dist/v4/englishList.d.ts.map +1 -0
  375. package/dist/v4/englishList.js +11 -0
  376. package/dist/v4/errorReason.d.ts +7 -0
  377. package/dist/v4/errorReason.d.ts.map +1 -0
  378. package/dist/v4/errorReason.js +13 -0
  379. package/dist/v4/file.d.ts +25 -0
  380. package/dist/v4/file.d.ts.map +1 -1
  381. package/dist/v4/file.js +15 -0
  382. package/dist/v4/fileHash.d.ts +21 -0
  383. package/dist/v4/fileHash.d.ts.map +1 -0
  384. package/dist/v4/fileHash.js +9 -0
  385. package/dist/v4/imagemagickDensity.d.ts.map +1 -1
  386. package/dist/v4/imagemagickDensity.js +2 -2
  387. package/dist/v4/index.d.ts +4 -0
  388. package/dist/v4/index.d.ts.map +1 -1
  389. package/dist/v4/index.js +4 -0
  390. package/dist/v4/lib/sdkZodOptional.d.ts +4 -0
  391. package/dist/v4/lib/sdkZodOptional.d.ts.map +1 -0
  392. package/dist/v4/lib/sdkZodOptional.js +12 -0
  393. package/dist/v4/lib/zodInputSemantics.d.ts +18 -0
  394. package/dist/v4/lib/zodInputSemantics.d.ts.map +1 -0
  395. package/dist/v4/lib/zodInputSemantics.js +85 -0
  396. package/dist/v4/object.d.ts +71 -0
  397. package/dist/v4/object.d.ts.map +1 -0
  398. package/dist/v4/object.js +195 -0
  399. package/dist/v4/responseErrors/HttpImportRobot.d.ts +23 -0
  400. package/dist/v4/responseErrors/HttpImportRobot.d.ts.map +1 -0
  401. package/dist/v4/responseErrors/HttpImportRobot.js +22 -0
  402. package/dist/v4/robots/_ai-models.d.ts +28 -0
  403. package/dist/v4/robots/_ai-models.d.ts.map +1 -0
  404. package/dist/v4/robots/_ai-models.js +79 -0
  405. package/dist/v4/robots/_index.d.ts +619 -1235
  406. package/dist/v4/robots/_index.d.ts.map +1 -1
  407. package/dist/v4/robots/_index.js +4 -0
  408. package/dist/v4/robots/_instructions-primitives.d.ts +426 -41
  409. package/dist/v4/robots/_instructions-primitives.d.ts.map +1 -1
  410. package/dist/v4/robots/_instructions-primitives.js +828 -529
  411. package/dist/v4/robots/ai-chat.d.ts +82 -334
  412. package/dist/v4/robots/ai-chat.d.ts.map +1 -1
  413. package/dist/v4/robots/ai-chat.js +261 -400
  414. package/dist/v4/robots/assembly-savejson.d.ts +22 -18
  415. package/dist/v4/robots/assembly-savejson.d.ts.map +1 -1
  416. package/dist/v4/robots/assembly-savejson.js +7 -15
  417. package/dist/v4/robots/audio-artwork.d.ts +44 -39
  418. package/dist/v4/robots/audio-artwork.d.ts.map +1 -1
  419. package/dist/v4/robots/audio-artwork.js +9 -38
  420. package/dist/v4/robots/audio-concat.d.ts +36 -31
  421. package/dist/v4/robots/audio-concat.d.ts.map +1 -1
  422. package/dist/v4/robots/audio-concat.js +15 -31
  423. package/dist/v4/robots/audio-encode.d.ts +38 -33
  424. package/dist/v4/robots/audio-encode.d.ts.map +1 -1
  425. package/dist/v4/robots/audio-encode.js +15 -46
  426. package/dist/v4/robots/audio-loop.d.ts +42 -37
  427. package/dist/v4/robots/audio-loop.d.ts.map +1 -1
  428. package/dist/v4/robots/audio-loop.js +12 -40
  429. package/dist/v4/robots/audio-merge.d.ts +38 -33
  430. package/dist/v4/robots/audio-merge.d.ts.map +1 -1
  431. package/dist/v4/robots/audio-merge.js +13 -28
  432. package/dist/v4/robots/audio-split.d.ts +38 -33
  433. package/dist/v4/robots/audio-split.d.ts.map +1 -1
  434. package/dist/v4/robots/audio-split.js +17 -48
  435. package/dist/v4/robots/audio-waveform.d.ts +58 -53
  436. package/dist/v4/robots/audio-waveform.d.ts.map +1 -1
  437. package/dist/v4/robots/audio-waveform.js +62 -107
  438. package/dist/v4/robots/azure-import.d.ts +44 -39
  439. package/dist/v4/robots/azure-import.d.ts.map +1 -1
  440. package/dist/v4/robots/azure-import.js +5 -35
  441. package/dist/v4/robots/azure-store.d.ts +44 -33
  442. package/dist/v4/robots/azure-store.d.ts.map +1 -1
  443. package/dist/v4/robots/azure-store.js +25 -70
  444. package/dist/v4/robots/backblaze-import.d.ts +44 -39
  445. package/dist/v4/robots/backblaze-import.d.ts.map +1 -1
  446. package/dist/v4/robots/backblaze-import.js +6 -39
  447. package/dist/v4/robots/backblaze-store.d.ts +38 -33
  448. package/dist/v4/robots/backblaze-store.d.ts.map +1 -1
  449. package/dist/v4/robots/backblaze-store.js +8 -44
  450. package/dist/v4/robots/box-import.d.ts +42 -33
  451. package/dist/v4/robots/box-import.d.ts.map +1 -1
  452. package/dist/v4/robots/box-import.js +10 -35
  453. package/dist/v4/robots/box-store.d.ts +43 -34
  454. package/dist/v4/robots/box-store.d.ts.map +1 -1
  455. package/dist/v4/robots/box-store.js +11 -42
  456. package/dist/v4/robots/cloudfiles-import.d.ts +44 -39
  457. package/dist/v4/robots/cloudfiles-import.d.ts.map +1 -1
  458. package/dist/v4/robots/cloudfiles-import.js +8 -45
  459. package/dist/v4/robots/cloudfiles-store.d.ts +36 -31
  460. package/dist/v4/robots/cloudfiles-store.d.ts.map +1 -1
  461. package/dist/v4/robots/cloudfiles-store.js +5 -36
  462. package/dist/v4/robots/cloudflare-import.d.ts +46 -41
  463. package/dist/v4/robots/cloudflare-import.d.ts.map +1 -1
  464. package/dist/v4/robots/cloudflare-import.js +10 -57
  465. package/dist/v4/robots/cloudflare-store.d.ts +38 -33
  466. package/dist/v4/robots/cloudflare-store.d.ts.map +1 -1
  467. package/dist/v4/robots/cloudflare-store.js +14 -57
  468. package/dist/v4/robots/digitalocean-import.d.ts +46 -41
  469. package/dist/v4/robots/digitalocean-import.d.ts.map +1 -1
  470. package/dist/v4/robots/digitalocean-import.js +8 -49
  471. package/dist/v4/robots/digitalocean-store.d.ts +42 -37
  472. package/dist/v4/robots/digitalocean-store.d.ts.map +1 -1
  473. package/dist/v4/robots/digitalocean-store.js +8 -56
  474. package/dist/v4/robots/document-autorotate.d.ts +34 -29
  475. package/dist/v4/robots/document-autorotate.d.ts.map +1 -1
  476. package/dist/v4/robots/document-autorotate.js +5 -32
  477. package/dist/v4/robots/document-convert.d.ts +58 -53
  478. package/dist/v4/robots/document-convert.d.ts.map +1 -1
  479. package/dist/v4/robots/document-convert.js +12 -39
  480. package/dist/v4/robots/document-extract.d.ts +54 -49
  481. package/dist/v4/robots/document-extract.d.ts.map +1 -1
  482. package/dist/v4/robots/document-extract.js +15 -42
  483. package/dist/v4/robots/document-merge.d.ts +38 -33
  484. package/dist/v4/robots/document-merge.d.ts.map +1 -1
  485. package/dist/v4/robots/document-merge.js +7 -28
  486. package/dist/v4/robots/document-ocr.d.ts +48 -43
  487. package/dist/v4/robots/document-ocr.d.ts.map +1 -1
  488. package/dist/v4/robots/document-ocr.js +10 -47
  489. package/dist/v4/robots/document-optimize.d.ts +46 -41
  490. package/dist/v4/robots/document-optimize.d.ts.map +1 -1
  491. package/dist/v4/robots/document-optimize.js +10 -34
  492. package/dist/v4/robots/document-split.d.ts +34 -29
  493. package/dist/v4/robots/document-split.d.ts.map +1 -1
  494. package/dist/v4/robots/document-split.js +10 -37
  495. package/dist/v4/robots/document-thumbs.d.ts +81 -52
  496. package/dist/v4/robots/document-thumbs.d.ts.map +1 -1
  497. package/dist/v4/robots/document-thumbs.js +42 -58
  498. package/dist/v4/robots/dropbox-import.d.ts +38 -33
  499. package/dist/v4/robots/dropbox-import.d.ts.map +1 -1
  500. package/dist/v4/robots/dropbox-import.js +10 -41
  501. package/dist/v4/robots/dropbox-store.d.ts +42 -34
  502. package/dist/v4/robots/dropbox-store.d.ts.map +1 -1
  503. package/dist/v4/robots/dropbox-store.js +10 -43
  504. package/dist/v4/robots/edgly-deliver.d.ts +34 -29
  505. package/dist/v4/robots/edgly-deliver.d.ts.map +1 -1
  506. package/dist/v4/robots/edgly-deliver.js +4 -24
  507. package/dist/v4/robots/file-compress.d.ts +44 -39
  508. package/dist/v4/robots/file-compress.d.ts.map +1 -1
  509. package/dist/v4/robots/file-compress.js +9 -26
  510. package/dist/v4/robots/file-decompress.d.ts +44 -39
  511. package/dist/v4/robots/file-decompress.d.ts.map +1 -1
  512. package/dist/v4/robots/file-decompress.js +13 -44
  513. package/dist/v4/robots/file-filter.d.ts +39 -35
  514. package/dist/v4/robots/file-filter.d.ts.map +1 -1
  515. package/dist/v4/robots/file-filter.js +16 -46
  516. package/dist/v4/robots/file-hash.d.ts +44 -39
  517. package/dist/v4/robots/file-hash.d.ts.map +1 -1
  518. package/dist/v4/robots/file-hash.js +12 -43
  519. package/dist/v4/robots/file-preview.d.ts +93 -88
  520. package/dist/v4/robots/file-preview.d.ts.map +1 -1
  521. package/dist/v4/robots/file-preview.js +19 -44
  522. package/dist/v4/robots/file-read.d.ts +34 -29
  523. package/dist/v4/robots/file-read.d.ts.map +1 -1
  524. package/dist/v4/robots/file-read.js +5 -26
  525. package/dist/v4/robots/file-serve.d.ts +37 -32
  526. package/dist/v4/robots/file-serve.d.ts.map +1 -1
  527. package/dist/v4/robots/file-serve.js +9 -27
  528. package/dist/v4/robots/file-verify.d.ts +42 -37
  529. package/dist/v4/robots/file-verify.d.ts.map +1 -1
  530. package/dist/v4/robots/file-verify.js +11 -41
  531. package/dist/v4/robots/file-virusscan.d.ts +41 -33
  532. package/dist/v4/robots/file-virusscan.d.ts.map +1 -1
  533. package/dist/v4/robots/file-virusscan.js +19 -45
  534. package/dist/v4/robots/file-watermark.d.ts +35 -29
  535. package/dist/v4/robots/file-watermark.d.ts.map +1 -1
  536. package/dist/v4/robots/file-watermark.js +12 -30
  537. package/dist/v4/robots/ftp-import.d.ts +42 -37
  538. package/dist/v4/robots/ftp-import.d.ts.map +1 -1
  539. package/dist/v4/robots/ftp-import.js +5 -33
  540. package/dist/v4/robots/ftp-store.d.ts +49 -39
  541. package/dist/v4/robots/ftp-store.d.ts.map +1 -1
  542. package/dist/v4/robots/ftp-store.js +13 -41
  543. package/dist/v4/robots/google-import.d.ts +44 -39
  544. package/dist/v4/robots/google-import.d.ts.map +1 -1
  545. package/dist/v4/robots/google-import.js +10 -43
  546. package/dist/v4/robots/google-store.d.ts +40 -35
  547. package/dist/v4/robots/google-store.d.ts.map +1 -1
  548. package/dist/v4/robots/google-store.js +15 -47
  549. package/dist/v4/robots/html-convert.d.ts +54 -44
  550. package/dist/v4/robots/html-convert.d.ts.map +1 -1
  551. package/dist/v4/robots/html-convert.js +13 -30
  552. package/dist/v4/robots/http-import.d.ts +35 -30
  553. package/dist/v4/robots/http-import.d.ts.map +1 -1
  554. package/dist/v4/robots/http-import.js +27 -35
  555. package/dist/v4/robots/http-request.d.ts +231 -0
  556. package/dist/v4/robots/http-request.d.ts.map +1 -0
  557. package/dist/v4/robots/http-request.js +161 -0
  558. package/dist/v4/robots/image-bgremove.d.ts +42 -37
  559. package/dist/v4/robots/image-bgremove.d.ts.map +1 -1
  560. package/dist/v4/robots/image-bgremove.js +11 -39
  561. package/dist/v4/robots/image-copyrightdetect.d.ts +52 -47
  562. package/dist/v4/robots/image-copyrightdetect.d.ts.map +1 -1
  563. package/dist/v4/robots/image-copyrightdetect.js +9 -33
  564. package/dist/v4/robots/image-describe.d.ts +50 -45
  565. package/dist/v4/robots/image-describe.d.ts.map +1 -1
  566. package/dist/v4/robots/image-describe.js +8 -37
  567. package/dist/v4/robots/image-enhance.d.ts +58 -53
  568. package/dist/v4/robots/image-enhance.d.ts.map +1 -1
  569. package/dist/v4/robots/image-enhance.js +7 -31
  570. package/dist/v4/robots/image-facedetect.d.ts +54 -49
  571. package/dist/v4/robots/image-facedetect.d.ts.map +1 -1
  572. package/dist/v4/robots/image-facedetect.js +20 -47
  573. package/dist/v4/robots/image-generate.d.ts +25 -21
  574. package/dist/v4/robots/image-generate.d.ts.map +1 -1
  575. package/dist/v4/robots/image-generate.js +33 -44
  576. package/dist/v4/robots/image-merge.d.ts +54 -49
  577. package/dist/v4/robots/image-merge.d.ts.map +1 -1
  578. package/dist/v4/robots/image-merge.js +28 -67
  579. package/dist/v4/robots/image-ocr.d.ts +48 -43
  580. package/dist/v4/robots/image-ocr.d.ts.map +1 -1
  581. package/dist/v4/robots/image-ocr.js +11 -47
  582. package/dist/v4/robots/image-optimize.d.ts +44 -39
  583. package/dist/v4/robots/image-optimize.d.ts.map +1 -1
  584. package/dist/v4/robots/image-optimize.js +6 -32
  585. package/dist/v4/robots/image-resize.d.ts +344 -185
  586. package/dist/v4/robots/image-resize.d.ts.map +1 -1
  587. package/dist/v4/robots/image-resize.js +44 -81
  588. package/dist/v4/robots/image-upscale.d.ts +55 -47
  589. package/dist/v4/robots/image-upscale.d.ts.map +1 -1
  590. package/dist/v4/robots/image-upscale.js +24 -45
  591. package/dist/v4/robots/mega-import.d.ts +44 -39
  592. package/dist/v4/robots/mega-import.d.ts.map +1 -1
  593. package/dist/v4/robots/mega-import.js +15 -62
  594. package/dist/v4/robots/mega-store.d.ts +40 -35
  595. package/dist/v4/robots/mega-store.d.ts.map +1 -1
  596. package/dist/v4/robots/mega-store.js +14 -60
  597. package/dist/v4/robots/meta-read.d.ts +32 -26
  598. package/dist/v4/robots/meta-read.d.ts.map +1 -1
  599. package/dist/v4/robots/meta-read.js +4 -20
  600. package/dist/v4/robots/meta-write.d.ts +42 -37
  601. package/dist/v4/robots/meta-write.d.ts.map +1 -1
  602. package/dist/v4/robots/meta-write.js +9 -32
  603. package/dist/v4/robots/minio-import.d.ts +46 -41
  604. package/dist/v4/robots/minio-import.d.ts.map +1 -1
  605. package/dist/v4/robots/minio-import.js +9 -60
  606. package/dist/v4/robots/minio-store.d.ts +40 -35
  607. package/dist/v4/robots/minio-store.d.ts.map +1 -1
  608. package/dist/v4/robots/minio-store.js +12 -53
  609. package/dist/v4/robots/progress-simulate.d.ts +11 -9
  610. package/dist/v4/robots/progress-simulate.d.ts.map +1 -1
  611. package/dist/v4/robots/progress-simulate.js +8 -28
  612. package/dist/v4/robots/s3-import.d.ts +46 -41
  613. package/dist/v4/robots/s3-import.d.ts.map +1 -1
  614. package/dist/v4/robots/s3-import.js +12 -43
  615. package/dist/v4/robots/s3-store.d.ts +58 -50
  616. package/dist/v4/robots/s3-store.d.ts.map +1 -1
  617. package/dist/v4/robots/s3-store.js +21 -53
  618. package/dist/v4/robots/script-run.d.ts +37 -29
  619. package/dist/v4/robots/script-run.d.ts.map +1 -1
  620. package/dist/v4/robots/script-run.js +12 -30
  621. package/dist/v4/robots/sftp-import.d.ts +45 -37
  622. package/dist/v4/robots/sftp-import.d.ts.map +1 -1
  623. package/dist/v4/robots/sftp-import.js +10 -39
  624. package/dist/v4/robots/sftp-store.d.ts +47 -39
  625. package/dist/v4/robots/sftp-store.d.ts.map +1 -1
  626. package/dist/v4/robots/sftp-store.js +12 -44
  627. package/dist/v4/robots/speech-transcribe.d.ts +71 -54
  628. package/dist/v4/robots/speech-transcribe.d.ts.map +1 -1
  629. package/dist/v4/robots/speech-transcribe.js +26 -47
  630. package/dist/v4/robots/supabase-import.d.ts +46 -41
  631. package/dist/v4/robots/supabase-import.d.ts.map +1 -1
  632. package/dist/v4/robots/supabase-import.js +12 -59
  633. package/dist/v4/robots/supabase-store.d.ts +38 -37
  634. package/dist/v4/robots/supabase-store.d.ts.map +1 -1
  635. package/dist/v4/robots/supabase-store.js +12 -56
  636. package/dist/v4/robots/swift-import.d.ts +46 -45
  637. package/dist/v4/robots/swift-import.d.ts.map +1 -1
  638. package/dist/v4/robots/swift-import.js +14 -55
  639. package/dist/v4/robots/swift-store.d.ts +40 -39
  640. package/dist/v4/robots/swift-store.d.ts.map +1 -1
  641. package/dist/v4/robots/swift-store.js +14 -62
  642. package/dist/v4/robots/text-speak.d.ts +46 -41
  643. package/dist/v4/robots/text-speak.d.ts.map +1 -1
  644. package/dist/v4/robots/text-speak.js +11 -37
  645. package/dist/v4/robots/text-translate.d.ts +44 -39
  646. package/dist/v4/robots/text-translate.d.ts.map +1 -1
  647. package/dist/v4/robots/text-translate.js +9 -36
  648. package/dist/v4/robots/tigris-import.d.ts +46 -41
  649. package/dist/v4/robots/tigris-import.d.ts.map +1 -1
  650. package/dist/v4/robots/tigris-import.js +12 -63
  651. package/dist/v4/robots/tigris-store.d.ts +40 -35
  652. package/dist/v4/robots/tigris-store.d.ts.map +1 -1
  653. package/dist/v4/robots/tigris-store.js +12 -54
  654. package/dist/v4/robots/tlcdn-deliver.d.ts +36 -31
  655. package/dist/v4/robots/tlcdn-deliver.d.ts.map +1 -1
  656. package/dist/v4/robots/tlcdn-deliver.js +7 -28
  657. package/dist/v4/robots/transloadit-import.d.ts +32 -31
  658. package/dist/v4/robots/transloadit-import.d.ts.map +1 -1
  659. package/dist/v4/robots/transloadit-import.js +24 -29
  660. package/dist/v4/robots/transloadit-store.d.ts +28 -23
  661. package/dist/v4/robots/transloadit-store.d.ts.map +1 -1
  662. package/dist/v4/robots/transloadit-store.js +17 -9
  663. package/dist/v4/robots/tus-store.d.ts +38 -33
  664. package/dist/v4/robots/tus-store.d.ts.map +1 -1
  665. package/dist/v4/robots/tus-store.js +15 -46
  666. package/dist/v4/robots/upload-handle.d.ts +34 -29
  667. package/dist/v4/robots/upload-handle.d.ts.map +1 -1
  668. package/dist/v4/robots/upload-handle.js +4 -19
  669. package/dist/v4/robots/video-adaptive.d.ts +48 -43
  670. package/dist/v4/robots/video-adaptive.d.ts.map +1 -1
  671. package/dist/v4/robots/video-adaptive.js +9 -32
  672. package/dist/v4/robots/video-artwork.d.ts +42 -37
  673. package/dist/v4/robots/video-artwork.d.ts.map +1 -1
  674. package/dist/v4/robots/video-artwork.js +7 -32
  675. package/dist/v4/robots/video-concat.d.ts +52 -47
  676. package/dist/v4/robots/video-concat.d.ts.map +1 -1
  677. package/dist/v4/robots/video-concat.js +6 -27
  678. package/dist/v4/robots/video-encode.d.ts +79 -69
  679. package/dist/v4/robots/video-encode.d.ts.map +1 -1
  680. package/dist/v4/robots/video-encode.js +20 -44
  681. package/dist/v4/robots/video-generate.d.ts +25 -21
  682. package/dist/v4/robots/video-generate.d.ts.map +1 -1
  683. package/dist/v4/robots/video-generate.js +33 -46
  684. package/dist/v4/robots/video-merge.d.ts +69 -61
  685. package/dist/v4/robots/video-merge.d.ts.map +1 -1
  686. package/dist/v4/robots/video-merge.js +15 -34
  687. package/dist/v4/robots/video-ondemand.d.ts +86 -77
  688. package/dist/v4/robots/video-ondemand.d.ts.map +1 -1
  689. package/dist/v4/robots/video-ondemand.js +26 -48
  690. package/dist/v4/robots/video-split.d.ts +40 -35
  691. package/dist/v4/robots/video-split.d.ts.map +1 -1
  692. package/dist/v4/robots/video-split.js +11 -39
  693. package/dist/v4/robots/video-subtitle.d.ts +60 -55
  694. package/dist/v4/robots/video-subtitle.d.ts.map +1 -1
  695. package/dist/v4/robots/video-subtitle.js +14 -39
  696. package/dist/v4/robots/video-thumbs.d.ts +60 -51
  697. package/dist/v4/robots/video-thumbs.d.ts.map +1 -1
  698. package/dist/v4/robots/video-thumbs.js +53 -62
  699. package/dist/v4/robots/vimeo-import.d.ts +36 -31
  700. package/dist/v4/robots/vimeo-import.d.ts.map +1 -1
  701. package/dist/v4/robots/vimeo-import.js +12 -23
  702. package/dist/v4/robots/vimeo-store.d.ts +45 -37
  703. package/dist/v4/robots/vimeo-store.d.ts.map +1 -1
  704. package/dist/v4/robots/vimeo-store.js +18 -46
  705. package/dist/v4/robots/wasabi-import.d.ts +44 -39
  706. package/dist/v4/robots/wasabi-import.d.ts.map +1 -1
  707. package/dist/v4/robots/wasabi-import.js +12 -59
  708. package/dist/v4/robots/wasabi-store.d.ts +40 -35
  709. package/dist/v4/robots/wasabi-store.d.ts.map +1 -1
  710. package/dist/v4/robots/wasabi-store.js +10 -52
  711. package/dist/v4/robots/youtube-store.d.ts +42 -37
  712. package/dist/v4/robots/youtube-store.d.ts.map +1 -1
  713. package/dist/v4/robots/youtube-store.js +42 -63
  714. package/dist/v4/skillFrontmatter.d.ts.map +1 -1
  715. package/dist/v4/skillFrontmatter.js +5 -4
  716. package/dist/v4/stackVersions.d.ts +40 -1
  717. package/dist/v4/stackVersions.d.ts.map +1 -1
  718. package/dist/v4/stackVersions.js +25 -3
  719. package/dist/v4/storageAsset.d.ts +6 -0
  720. package/dist/v4/storageAsset.d.ts.map +1 -1
  721. package/dist/v4/storageAsset.js +42 -27
  722. package/dist/v4/template.d.ts +1 -1
  723. package/dist/v4/template.d.ts.map +1 -1
  724. package/dist/v4/template.js +43 -55
  725. package/dist/v4/templateCredential.d.ts +1 -1
  726. package/dist/v4/utility.d.ts +22 -0
  727. package/dist/v4/utility.d.ts.map +1 -0
  728. package/dist/v4/utility.js +1 -0
  729. package/package.json +2 -3
@@ -1,5 +1,8 @@
1
1
  import { z } from 'zod/v3';
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,10 +535,7 @@ 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.
@@ -392,26 +544,83 @@ For images, you can also add \`"blurhash": true\` to extract a [BlurHash](https:
392
544
 
393
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.
394
546
 
395
- For videos, you can add the \`"colorspace: true"\` parameter to extract the colorspace of the output video.
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.
396
550
 
397
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.
398
552
 
399
553
  For audio, you can add \`"mean_volume": true\` to get a single value representing the mean average volume of the audio file.
400
554
 
401
555
  You can also set this to \`false\` to skip metadata extraction and speed up transcoding.
402
- `),
403
- result: z
404
- .boolean()
405
- .default(false)
406
- .describe('Whether the results of this Step should be present in the Assembly Status JSON'),
407
- queue: z
408
- .enum(['batch'])
409
- .optional()
410
- .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`),
411
- force_accept: z
412
- .boolean()
413
- .default(false)
414
- .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.
415
624
 
416
625
  By default, Robots ignore files they are not familiar with.
417
626
  [🤖/video/encode](/docs/robots/video-encode/), for
@@ -419,22 +628,224 @@ example, will happily ignore input images.
419
628
 
420
629
  With the \`force_accept\` parameter set to \`true\`, you can force Robots to accept all files thrown at them.
421
630
  This will typically lead to errors and should only be used for debugging or combatting edge cases.
422
- `),
423
- ignore_errors: z
424
- .union([z.boolean(), z.array(z.enum(['meta', 'execute']))])
425
- .transform((value) => (value === true ? ['meta', 'execute'] : value === false ? [] : value))
426
- .default([])
427
- .describe(`
428
- 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}
429
639
 
430
- 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}
431
646
 
432
- 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.
433
648
 
434
- Setting this to \`true\` is equivalent to \`["meta", "execute"]\` and will ignore errors in both phases.
435
- `),
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),
436
807
  })
437
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
+ }
438
849
  export const useParamObjectSchema = z
439
850
  .object({
440
851
  name: z.string(),
@@ -490,40 +901,7 @@ export const robotUse = z
490
901
  .object({
491
902
  use: z
492
903
  .union([useParamStepsSchema, useParamObjectOfStepsSchema])
493
- .describe(`
494
- Specifies which Step(s) to use as input.
495
-
496
- - You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
497
- - You can provide several Steps as input with arrays:
498
- \`\`\`json
499
- {
500
- "use": [
501
- ":original",
502
- "encoded",
503
- "resized"
504
- ]
505
- }
506
- \`\`\`
507
- - You can also tag an input Step with \`as\` to pass semantic intent to robots:
508
- - You can also tag input Steps with \`as\` to pass semantic intent to robots:
509
- \`\`\`json
510
- {
511
- "use": [
512
- {
513
- "name": ":original",
514
- "as": "image"
515
- },
516
- {
517
- "name": ":original",
518
- "as": "mask"
519
- }
520
- ]
521
- }
522
- \`\`\`
523
-
524
- > [!Tip]
525
- > That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
526
- `)
904
+ .describe(robotParameterDocs.use.description)
527
905
  .optional(),
528
906
  })
529
907
  .strict();
@@ -531,57 +909,19 @@ export const robotUseWithHiddenFields = z
531
909
  .object({
532
910
  use: z
533
911
  .union([useParamStepsWithHiddenFieldsSchema, useParamObjectOfStepsWithHiddenFieldsSchema])
534
- .describe(`
535
- Specifies which Step(s) to use as input.
536
-
537
- - You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
538
- - You can provide several Steps as input with arrays:
539
- \`\`\`json
540
- {
541
- "use": [
542
- ":original",
543
- "encoded",
544
- "resized"
545
- ]
546
- }
547
- \`\`\`
548
- - You can also tag an input Step with \`as\` to pass semantic intent to robots:
549
- - You can also tag input Steps with \`as\` to pass semantic intent to robots:
550
- \`\`\`json
551
- {
552
- "use": [
553
- {
554
- "name": ":original",
555
- "as": "image"
556
- },
557
- {
558
- "name": ":original",
559
- "as": "mask"
560
- }
561
- ]
562
- }
563
- \`\`\`
564
-
565
- > [!Tip]
566
- > That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
567
- `)
912
+ .describe(robotParameterDocs.use.description)
568
913
  .optional(),
569
914
  })
570
915
  .strict();
571
- export const complexWidthSchema = z.preprocess((val) => {
572
- if (typeof val === 'string' && val.startsWith('${')) {
573
- return val;
574
- }
575
- if (typeof val === 'string') {
576
- const num = Number.parseInt(val, 10);
577
- if (Number.isNaN(num) || val.includes('x')) {
578
- return val;
579
- }
580
- return num;
581
- }
582
- return val;
583
- }, z.number().int().min(1).max(25_000));
584
- 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) {
585
925
  if (typeof val === 'string' && val.startsWith('${')) {
586
926
  return val;
587
927
  }
@@ -593,7 +933,9 @@ export const complexHeightSchema = z.preprocess((val) => {
593
933
  return num;
594
934
  }
595
935
  return val;
596
- }, 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);
597
939
  export const robotFFmpeg = z.object({
598
940
  ffmpeg: z
599
941
  .object({
@@ -703,16 +1045,15 @@ export const robotFFmpeg = z.object({
703
1045
  })
704
1046
  .passthrough()
705
1047
  .optional()
706
- .describe(`
707
- 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.
708
- `),
1048
+ .describe(robotParameterDocs.ffmpeg.description),
709
1049
  ffmpeg_stack: z
710
1050
  // Any semver in range is allowed and normalized. The enum is used for editor completions.
711
- .union([z.enum(['v6', 'v7', 'v8']), z.string().regex(/^v?[5-8](\.\d+)?(\.\d+)?$/)])
712
- .default('v6.0.0')
713
- .describe(`
714
- 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.
715
- `),
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),
716
1057
  });
717
1058
  /**
718
1059
  * Replace all underscores with hyphens.
@@ -788,43 +1129,16 @@ const audioPresets = createPresets([
788
1129
  ]);
789
1130
  export const robotFFmpegAudio = robotFFmpeg
790
1131
  .extend({
791
- preset: z
792
- .enum(audioPresets)
793
- .transform(transformPreset)
1132
+ preset: zodInputPreservingTransform(z.enum(audioPresets), transformPreset)
794
1133
  .optional()
795
- .describe(`
796
- Performs conversion using pre-configured settings.
797
-
798
- 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.
799
-
800
- For a list of audio presets, see [audio presets](/docs/presets/audio/).
801
- `),
1134
+ .describe(robotParameterDocs.audio_preset.description),
802
1135
  })
803
1136
  .strict();
804
1137
  export const robotFFmpegVideo = robotFFmpeg
805
1138
  .extend({
806
- width: z
807
- .number()
808
- .int()
809
- .min(1)
810
- .nullish()
811
- .describe(`
812
- Width of the new video, in pixels.
813
-
814
- If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied width](/docs/presets/video/) will be implemented.
815
- `),
816
- height: z
817
- .number()
818
- .int()
819
- .min(1)
820
- .nullish()
821
- .describe(`
822
- Height of the new video, in pixels.
823
-
824
- If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied height](/docs/presets/video/) will be implemented.
825
- `),
826
- preset: z
827
- .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([
828
1142
  ...createPresets([
829
1143
  'android',
830
1144
  'android-high',
@@ -919,14 +1233,9 @@ If the value is not specified and the \`preset\` parameter is available, the \`p
919
1233
  'wmv',
920
1234
  ]),
921
1235
  ...audioPresets,
922
- ])
923
- .transform(transformPreset)
1236
+ ]), transformPreset)
924
1237
  .optional()
925
- .describe(`
926
- Converts a video according to [pre-configured settings](/docs/presets/video/).
927
-
928
- 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.
929
- `),
1238
+ .describe(robotParameterDocs.video_preset.description),
930
1239
  })
931
1240
  .strict();
932
1241
  export const unsafeCoordinatesSchema = z
@@ -957,11 +1266,65 @@ export const next_page_token = z.string().default('');
957
1266
  export const files_per_page = z.number().int().default(1000);
958
1267
  export const page_number = z.number().int().default(1);
959
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
+ `);
960
1325
  export const return_file_stubs = z
961
1326
  .boolean()
962
- .describe(`
963
- 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.
964
- `)
1327
+ .describe(robotParameterDocs.return_file_stubs.description)
965
1328
  .default(false);
966
1329
  export const port = z.number().int().min(1).max(65535);
967
1330
  // TODO: Use an enum.
@@ -980,13 +1343,24 @@ export const positionSchema = z.enum([
980
1343
  'top-left',
981
1344
  'top-right',
982
1345
  ]);
983
- export const percentageSchema = z.string().regex(/^\d+%$/);
984
- 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
985
1352
  .string()
986
1353
  .url()
987
- .regex(/^https?:\/\//i);
988
- export const color_with_alpha = z.string().regex(/^#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/);
989
- 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);
990
1364
  // Extended color schemas that also support named colors (for robots that support them)
991
1365
  export const color_with_alpha_with_named = z.union([
992
1366
  color_with_alpha, // Extend the base hex color schema
@@ -1026,15 +1400,16 @@ export const color_without_alpha_with_named = z.union([
1026
1400
  ]);
1027
1401
  export const bitrateSchema = z.number().int().min(1);
1028
1402
  export const sampleRateSchema = z.number().int().min(1);
1029
- export const optimize_priority = z
1030
- .enum(['compression-ratio', 'conversion-speed'])
1031
- .default('conversion-speed');
1403
+ export const optimize_priority = z.enum(['compression-ratio', 'conversion-speed']);
1032
1404
  export const robotImagemagick = z
1033
1405
  .object({
1034
1406
  imagemagick_stack: z
1035
1407
  // Any semver in range is allowed and normalized. The enum is used for editor completions.
1036
- .union([z.enum(['v3']), z.string().regex(/^v?[23](\.\d+)?(\.\d+)?$/)])
1037
- .default('v3'),
1408
+ .union([
1409
+ z.enum([stackVersions.imagemagick.recommendedVersion]),
1410
+ z.string().regex(stackVersions.imagemagick.test),
1411
+ ])
1412
+ .default(runtimeStackVersions.imagemagick.default),
1038
1413
  })
1039
1414
  .strict();
1040
1415
  export const colorspaceSchema = z.enum([
@@ -1074,17 +1449,15 @@ export const colorspaceSchema = z.enum([
1074
1449
  'YPbPr',
1075
1450
  'YUV',
1076
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);
1077
1457
  // TODO: add before and after images to the description.
1078
- export const imageQualitySchema = z
1079
- .number()
1080
- .int()
1081
- .min(1)
1082
- .max(100)
1083
- .default(92)
1084
- .describe(`
1458
+ export const imageQualitySchema = imageQualityValueSchema.default(92).describe(`
1085
1459
  Controls the image compression for JPG and PNG images. Please also take a look at [🤖/image/optimize](/docs/robots/image-optimize/).
1086
1460
  `);
1087
- export const autoProviderDescription = 'Chooses the best provider based on your request';
1088
1461
  export const awsGcpAiProviderSchema = z.enum(['auto', 'aws', 'gcp']).default('auto');
1089
1462
  export const aiProviderSchema = z
1090
1463
  .enum(['auto', 'aws', 'gcp', 'replicate', 'fal', 'transloadit'])
@@ -1096,17 +1469,14 @@ export const robotImport = z
1096
1469
  .union([z.string(), z.array(z.string())])
1097
1470
  .nullable()
1098
1471
  .default(null)
1099
- .describe('Custom name for the imported file(s). By default file names are derived from the source.'),
1100
- ignore_errors: z
1101
- .union([z.boolean(), z.array(z.enum(['meta', 'import', 'execute']))])
1102
- .transform((value) => value === true ? ['meta', 'import', 'execute'] : value === false ? [] : value)
1103
- .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),
1104
1476
  import_on_errors: z
1105
1477
  .array(z.enum(['meta']))
1106
1478
  .default([])
1107
- .describe(`
1108
- 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.
1109
- `),
1479
+ .describe(robotParameterDocs.import_on_errors.description),
1110
1480
  })
1111
1481
  .strict();
1112
1482
  export const azureBase = z
@@ -1184,7 +1554,7 @@ export const cloudflareBase = z
1184
1554
  .string()
1185
1555
  .optional()
1186
1556
  .describe(`
1187
- 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.
1188
1558
 
1189
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"\`.
1190
1560
  `),
@@ -1288,17 +1658,12 @@ export const megaBase = z
1288
1658
  .string()
1289
1659
  .optional()
1290
1660
  .describe(`
1291
- 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.
1292
1662
 
1293
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"\`.
1294
1664
  `),
1295
1665
  bucket: z.string().optional(),
1296
- bucket_region: z
1297
- .string()
1298
- .optional()
1299
- .describe(`
1300
- The region where the bucket is located.
1301
- `),
1666
+ bucket_region: bucketRegion,
1302
1667
  host: z.string().optional(),
1303
1668
  key: z.string().optional(),
1304
1669
  secret: z.string().optional(),
@@ -1310,7 +1675,7 @@ export const s3Base = z
1310
1675
  .string()
1311
1676
  .optional()
1312
1677
  .describe(`
1313
- 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\`.
1314
1679
 
1315
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"\`.
1316
1681
  `),
@@ -1349,12 +1714,7 @@ While we recommend to use <dfn>Template Credentials</dfn> at all times, some use
1349
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"\`.
1350
1715
  `),
1351
1716
  bucket: z.string().optional(),
1352
- bucket_region: z
1353
- .string()
1354
- .optional()
1355
- .describe(`
1356
- The region where the bucket is located.
1357
- `),
1717
+ bucket_region: bucketRegion,
1358
1718
  host: z.string().optional(),
1359
1719
  key: z.string().optional(),
1360
1720
  secret: z.string().optional(),
@@ -1366,18 +1726,17 @@ export const swiftBase = z
1366
1726
  .string()
1367
1727
  .optional()
1368
1728
  .describe(`
1369
- 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.
1370
1730
 
1371
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"\`.
1372
1732
  `),
1373
1733
  bucket: z.string().optional(),
1374
- bucket_region: z
1734
+ host: z
1375
1735
  .string()
1376
1736
  .optional()
1377
1737
  .describe(`
1378
- 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.
1379
1739
  `),
1380
- host: z.string().optional(),
1381
1740
  key: z.string().optional(),
1382
1741
  secret: z.string().optional(),
1383
1742
  })
@@ -1388,17 +1747,12 @@ export const tigrisBase = z
1388
1747
  .string()
1389
1748
  .optional()
1390
1749
  .describe(`
1391
- 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.
1392
1751
 
1393
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"\`.
1394
1753
  `),
1395
1754
  bucket: z.string().optional(),
1396
- bucket_region: z
1397
- .string()
1398
- .optional()
1399
- .describe(`
1400
- The region where the bucket is located.
1401
- `),
1755
+ bucket_region: bucketRegion,
1402
1756
  host: z.string().optional(),
1403
1757
  key: z.string().optional(),
1404
1758
  secret: z.string().optional(),
@@ -1415,12 +1769,7 @@ Please create your associated <dfn>Template Credentials</dfn> in your Transloadi
1415
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"\`.
1416
1770
  `),
1417
1771
  bucket: z.string().optional(),
1418
- bucket_region: z
1419
- .string()
1420
- .optional()
1421
- .describe(`
1422
- The region where the bucket is located.
1423
- `),
1772
+ bucket_region: bucketRegion,
1424
1773
  host: z.string().optional(),
1425
1774
  key: z.string().optional(),
1426
1775
  secret: z.string().optional(),
@@ -1503,9 +1852,7 @@ You can also use a JSON string of such an object with coordinates in similar fas
1503
1852
  "{\\"x1\\": <Integer>, \\"y1\\": <Integer>, \\"x2\\": <Integer>, \\"y2\\": <Integer>}"
1504
1853
  \`\`\`
1505
1854
  `),
1506
- background: color_with_alpha.default('#00000000').describe(`
1507
- 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.
1508
- `),
1855
+ background: videoBackgroundSchema,
1509
1856
  rotate: z
1510
1857
  // We can’t use enum.
1511
1858
  // See https://github.com/colinhacks/zod/issues/2686