transloadit 4.14.0 → 5.0.1

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 (628) hide show
  1. package/README.md +44 -4
  2. package/dist/ApiError.d.ts +6 -2
  3. package/dist/ApiError.d.ts.map +1 -1
  4. package/dist/ApiError.js +6 -2
  5. package/dist/ApiError.js.map +1 -1
  6. package/dist/Transloadit.d.ts.map +1 -1
  7. package/dist/Transloadit.js +3 -2
  8. package/dist/Transloadit.js.map +1 -1
  9. package/dist/alphalib/aiMessages.d.ts +33254 -0
  10. package/dist/alphalib/aiMessages.d.ts.map +1 -0
  11. package/dist/alphalib/aiMessages.js +479 -0
  12. package/dist/alphalib/aiMessages.js.map +1 -0
  13. package/dist/alphalib/assembly-linter.d.ts.map +1 -1
  14. package/dist/alphalib/assembly-linter.js +20 -15
  15. package/dist/alphalib/assembly-linter.js.map +1 -1
  16. package/dist/alphalib/englishList.d.ts +3 -0
  17. package/dist/alphalib/englishList.d.ts.map +1 -0
  18. package/dist/alphalib/englishList.js +12 -0
  19. package/dist/alphalib/englishList.js.map +1 -0
  20. package/dist/alphalib/errors.d.ts +16 -0
  21. package/dist/alphalib/errors.d.ts.map +1 -1
  22. package/dist/alphalib/errors.js +124 -13
  23. package/dist/alphalib/errors.js.map +1 -1
  24. package/dist/alphalib/imagemagickDensity.d.ts.map +1 -1
  25. package/dist/alphalib/imagemagickDensity.js +2 -2
  26. package/dist/alphalib/imagemagickDensity.js.map +1 -1
  27. package/dist/alphalib/lib/zodInputSemantics.d.ts +18 -0
  28. package/dist/alphalib/lib/zodInputSemantics.d.ts.map +1 -0
  29. package/dist/alphalib/lib/zodInputSemantics.js +86 -0
  30. package/dist/alphalib/lib/zodInputSemantics.js.map +1 -0
  31. package/dist/alphalib/object.d.ts +42 -2
  32. package/dist/alphalib/object.d.ts.map +1 -1
  33. package/dist/alphalib/object.js +133 -0
  34. package/dist/alphalib/object.js.map +1 -1
  35. package/dist/alphalib/stepParsing.d.ts +1 -0
  36. package/dist/alphalib/stepParsing.d.ts.map +1 -1
  37. package/dist/alphalib/stepParsing.js +9 -1
  38. package/dist/alphalib/stepParsing.js.map +1 -1
  39. package/dist/alphalib/types/apiParameterDescription.d.ts +14 -0
  40. package/dist/alphalib/types/apiParameterDescription.d.ts.map +1 -0
  41. package/dist/alphalib/types/apiParameterDescription.js +20 -0
  42. package/dist/alphalib/types/apiParameterDescription.js.map +1 -0
  43. package/dist/alphalib/types/assembliesGet.d.ts +1 -1
  44. package/dist/alphalib/types/assemblyReplay.d.ts +4 -4
  45. package/dist/alphalib/types/assemblyStatus.d.ts +6718 -64966
  46. package/dist/alphalib/types/assemblyStatus.d.ts.map +1 -1
  47. package/dist/alphalib/types/assemblyStatus.js +68 -55
  48. package/dist/alphalib/types/assemblyStatus.js.map +1 -1
  49. package/dist/alphalib/types/errorReason.d.ts +7 -0
  50. package/dist/alphalib/types/errorReason.d.ts.map +1 -0
  51. package/dist/alphalib/types/errorReason.js +14 -0
  52. package/dist/alphalib/types/errorReason.js.map +1 -0
  53. package/dist/alphalib/types/file.d.ts +7 -0
  54. package/dist/alphalib/types/file.d.ts.map +1 -1
  55. package/dist/alphalib/types/file.js +15 -0
  56. package/dist/alphalib/types/file.js.map +1 -1
  57. package/dist/alphalib/types/fileHash.d.ts +16 -0
  58. package/dist/alphalib/types/fileHash.d.ts.map +1 -0
  59. package/dist/alphalib/types/fileHash.js +10 -0
  60. package/dist/alphalib/types/fileHash.js.map +1 -0
  61. package/dist/alphalib/types/responseErrors/HttpImportRobot.d.ts +23 -0
  62. package/dist/alphalib/types/responseErrors/HttpImportRobot.d.ts.map +1 -0
  63. package/dist/alphalib/types/responseErrors/HttpImportRobot.js +23 -0
  64. package/dist/alphalib/types/responseErrors/HttpImportRobot.js.map +1 -0
  65. package/dist/alphalib/types/robots/_ai-models.d.ts +28 -0
  66. package/dist/alphalib/types/robots/_ai-models.d.ts.map +1 -0
  67. package/dist/alphalib/types/robots/_ai-models.js +80 -0
  68. package/dist/alphalib/types/robots/_ai-models.js.map +1 -0
  69. package/dist/alphalib/types/robots/_index.d.ts +713 -1329
  70. package/dist/alphalib/types/robots/_index.d.ts.map +1 -1
  71. package/dist/alphalib/types/robots/_index.js +4 -0
  72. package/dist/alphalib/types/robots/_index.js.map +1 -1
  73. package/dist/alphalib/types/robots/_instructions-primitives.d.ts +504 -129
  74. package/dist/alphalib/types/robots/_instructions-primitives.d.ts.map +1 -1
  75. package/dist/alphalib/types/robots/_instructions-primitives.js +627 -280
  76. package/dist/alphalib/types/robots/_instructions-primitives.js.map +1 -1
  77. package/dist/alphalib/types/robots/ai-chat.d.ts +952 -2189
  78. package/dist/alphalib/types/robots/ai-chat.d.ts.map +1 -1
  79. package/dist/alphalib/types/robots/ai-chat.js +235 -368
  80. package/dist/alphalib/types/robots/ai-chat.js.map +1 -1
  81. package/dist/alphalib/types/robots/assembly-savejson.d.ts +28 -16
  82. package/dist/alphalib/types/robots/assembly-savejson.d.ts.map +1 -1
  83. package/dist/alphalib/types/robots/assembly-savejson.js +2 -11
  84. package/dist/alphalib/types/robots/assembly-savejson.js.map +1 -1
  85. package/dist/alphalib/types/robots/audio-artwork.d.ts +80 -67
  86. package/dist/alphalib/types/robots/audio-artwork.d.ts.map +1 -1
  87. package/dist/alphalib/types/robots/audio-artwork.js +9 -38
  88. package/dist/alphalib/types/robots/audio-artwork.js.map +1 -1
  89. package/dist/alphalib/types/robots/audio-concat.d.ts +94 -81
  90. package/dist/alphalib/types/robots/audio-concat.d.ts.map +1 -1
  91. package/dist/alphalib/types/robots/audio-concat.js +11 -25
  92. package/dist/alphalib/types/robots/audio-concat.js.map +1 -1
  93. package/dist/alphalib/types/robots/audio-encode.d.ts +80 -67
  94. package/dist/alphalib/types/robots/audio-encode.d.ts.map +1 -1
  95. package/dist/alphalib/types/robots/audio-encode.js +13 -43
  96. package/dist/alphalib/types/robots/audio-encode.js.map +1 -1
  97. package/dist/alphalib/types/robots/audio-loop.d.ts +80 -67
  98. package/dist/alphalib/types/robots/audio-loop.d.ts.map +1 -1
  99. package/dist/alphalib/types/robots/audio-loop.js +12 -40
  100. package/dist/alphalib/types/robots/audio-loop.js.map +1 -1
  101. package/dist/alphalib/types/robots/audio-merge.d.ts +94 -81
  102. package/dist/alphalib/types/robots/audio-merge.d.ts.map +1 -1
  103. package/dist/alphalib/types/robots/audio-merge.js +11 -25
  104. package/dist/alphalib/types/robots/audio-merge.js.map +1 -1
  105. package/dist/alphalib/types/robots/audio-split.d.ts +80 -67
  106. package/dist/alphalib/types/robots/audio-split.d.ts.map +1 -1
  107. package/dist/alphalib/types/robots/audio-split.js +15 -45
  108. package/dist/alphalib/types/robots/audio-split.js.map +1 -1
  109. package/dist/alphalib/types/robots/audio-waveform.d.ts +120 -107
  110. package/dist/alphalib/types/robots/audio-waveform.d.ts.map +1 -1
  111. package/dist/alphalib/types/robots/audio-waveform.js +15 -39
  112. package/dist/alphalib/types/robots/audio-waveform.js.map +1 -1
  113. package/dist/alphalib/types/robots/azure-import.d.ts +48 -35
  114. package/dist/alphalib/types/robots/azure-import.d.ts.map +1 -1
  115. package/dist/alphalib/types/robots/azure-import.js +5 -35
  116. package/dist/alphalib/types/robots/azure-import.js.map +1 -1
  117. package/dist/alphalib/types/robots/azure-store.d.ts +87 -71
  118. package/dist/alphalib/types/robots/azure-store.d.ts.map +1 -1
  119. package/dist/alphalib/types/robots/azure-store.js +11 -50
  120. package/dist/alphalib/types/robots/azure-store.js.map +1 -1
  121. package/dist/alphalib/types/robots/backblaze-import.d.ts +48 -35
  122. package/dist/alphalib/types/robots/backblaze-import.d.ts.map +1 -1
  123. package/dist/alphalib/types/robots/backblaze-import.js +6 -39
  124. package/dist/alphalib/types/robots/backblaze-import.js.map +1 -1
  125. package/dist/alphalib/types/robots/backblaze-store.d.ts +80 -67
  126. package/dist/alphalib/types/robots/backblaze-store.d.ts.map +1 -1
  127. package/dist/alphalib/types/robots/backblaze-store.js +8 -44
  128. package/dist/alphalib/types/robots/backblaze-store.js.map +1 -1
  129. package/dist/alphalib/types/robots/box-import.d.ts +44 -27
  130. package/dist/alphalib/types/robots/box-import.d.ts.map +1 -1
  131. package/dist/alphalib/types/robots/box-import.js +7 -33
  132. package/dist/alphalib/types/robots/box-import.js.map +1 -1
  133. package/dist/alphalib/types/robots/box-store.d.ts +85 -68
  134. package/dist/alphalib/types/robots/box-store.d.ts.map +1 -1
  135. package/dist/alphalib/types/robots/box-store.js +8 -40
  136. package/dist/alphalib/types/robots/box-store.js.map +1 -1
  137. package/dist/alphalib/types/robots/cloudfiles-import.d.ts +48 -35
  138. package/dist/alphalib/types/robots/cloudfiles-import.d.ts.map +1 -1
  139. package/dist/alphalib/types/robots/cloudfiles-import.js +8 -45
  140. package/dist/alphalib/types/robots/cloudfiles-import.js.map +1 -1
  141. package/dist/alphalib/types/robots/cloudfiles-store.d.ts +80 -67
  142. package/dist/alphalib/types/robots/cloudfiles-store.d.ts.map +1 -1
  143. package/dist/alphalib/types/robots/cloudfiles-store.js +5 -36
  144. package/dist/alphalib/types/robots/cloudfiles-store.js.map +1 -1
  145. package/dist/alphalib/types/robots/cloudflare-import.d.ts +48 -35
  146. package/dist/alphalib/types/robots/cloudflare-import.d.ts.map +1 -1
  147. package/dist/alphalib/types/robots/cloudflare-import.js +10 -57
  148. package/dist/alphalib/types/robots/cloudflare-import.js.map +1 -1
  149. package/dist/alphalib/types/robots/cloudflare-store.d.ts +80 -67
  150. package/dist/alphalib/types/robots/cloudflare-store.d.ts.map +1 -1
  151. package/dist/alphalib/types/robots/cloudflare-store.js +11 -54
  152. package/dist/alphalib/types/robots/cloudflare-store.js.map +1 -1
  153. package/dist/alphalib/types/robots/digitalocean-import.d.ts +56 -43
  154. package/dist/alphalib/types/robots/digitalocean-import.d.ts.map +1 -1
  155. package/dist/alphalib/types/robots/digitalocean-import.js +8 -49
  156. package/dist/alphalib/types/robots/digitalocean-import.js.map +1 -1
  157. package/dist/alphalib/types/robots/digitalocean-store.d.ts +88 -75
  158. package/dist/alphalib/types/robots/digitalocean-store.d.ts.map +1 -1
  159. package/dist/alphalib/types/robots/digitalocean-store.js +8 -56
  160. package/dist/alphalib/types/robots/digitalocean-store.js.map +1 -1
  161. package/dist/alphalib/types/robots/document-autorotate.d.ts +80 -67
  162. package/dist/alphalib/types/robots/document-autorotate.d.ts.map +1 -1
  163. package/dist/alphalib/types/robots/document-autorotate.js +5 -32
  164. package/dist/alphalib/types/robots/document-autorotate.js.map +1 -1
  165. package/dist/alphalib/types/robots/document-convert.d.ts +84 -71
  166. package/dist/alphalib/types/robots/document-convert.d.ts.map +1 -1
  167. package/dist/alphalib/types/robots/document-convert.js +7 -33
  168. package/dist/alphalib/types/robots/document-convert.js.map +1 -1
  169. package/dist/alphalib/types/robots/document-extract.d.ts +80 -67
  170. package/dist/alphalib/types/robots/document-extract.d.ts.map +1 -1
  171. package/dist/alphalib/types/robots/document-extract.js +10 -36
  172. package/dist/alphalib/types/robots/document-extract.js.map +1 -1
  173. package/dist/alphalib/types/robots/document-merge.d.ts +80 -67
  174. package/dist/alphalib/types/robots/document-merge.d.ts.map +1 -1
  175. package/dist/alphalib/types/robots/document-merge.js +4 -25
  176. package/dist/alphalib/types/robots/document-merge.js.map +1 -1
  177. package/dist/alphalib/types/robots/document-ocr.d.ts +80 -67
  178. package/dist/alphalib/types/robots/document-ocr.d.ts.map +1 -1
  179. package/dist/alphalib/types/robots/document-ocr.js +10 -47
  180. package/dist/alphalib/types/robots/document-ocr.js.map +1 -1
  181. package/dist/alphalib/types/robots/document-optimize.d.ts +80 -67
  182. package/dist/alphalib/types/robots/document-optimize.d.ts.map +1 -1
  183. package/dist/alphalib/types/robots/document-optimize.js +7 -31
  184. package/dist/alphalib/types/robots/document-optimize.js.map +1 -1
  185. package/dist/alphalib/types/robots/document-split.d.ts +80 -67
  186. package/dist/alphalib/types/robots/document-split.d.ts.map +1 -1
  187. package/dist/alphalib/types/robots/document-split.js +7 -34
  188. package/dist/alphalib/types/robots/document-split.js.map +1 -1
  189. package/dist/alphalib/types/robots/document-thumbs.d.ts +120 -101
  190. package/dist/alphalib/types/robots/document-thumbs.d.ts.map +1 -1
  191. package/dist/alphalib/types/robots/document-thumbs.js +24 -31
  192. package/dist/alphalib/types/robots/document-thumbs.js.map +1 -1
  193. package/dist/alphalib/types/robots/dropbox-import.d.ts +40 -27
  194. package/dist/alphalib/types/robots/dropbox-import.d.ts.map +1 -1
  195. package/dist/alphalib/types/robots/dropbox-import.js +5 -35
  196. package/dist/alphalib/types/robots/dropbox-import.js.map +1 -1
  197. package/dist/alphalib/types/robots/dropbox-store.d.ts +84 -68
  198. package/dist/alphalib/types/robots/dropbox-store.d.ts.map +1 -1
  199. package/dist/alphalib/types/robots/dropbox-store.js +8 -42
  200. package/dist/alphalib/types/robots/dropbox-store.js.map +1 -1
  201. package/dist/alphalib/types/robots/edgly-deliver.d.ts +32 -19
  202. package/dist/alphalib/types/robots/edgly-deliver.d.ts.map +1 -1
  203. package/dist/alphalib/types/robots/edgly-deliver.js +4 -24
  204. package/dist/alphalib/types/robots/edgly-deliver.js.map +1 -1
  205. package/dist/alphalib/types/robots/file-compress.d.ts +80 -67
  206. package/dist/alphalib/types/robots/file-compress.d.ts.map +1 -1
  207. package/dist/alphalib/types/robots/file-compress.js +4 -20
  208. package/dist/alphalib/types/robots/file-compress.js.map +1 -1
  209. package/dist/alphalib/types/robots/file-decompress.d.ts +96 -83
  210. package/dist/alphalib/types/robots/file-decompress.d.ts.map +1 -1
  211. package/dist/alphalib/types/robots/file-decompress.js +10 -41
  212. package/dist/alphalib/types/robots/file-decompress.js.map +1 -1
  213. package/dist/alphalib/types/robots/file-filter.d.ts +99 -87
  214. package/dist/alphalib/types/robots/file-filter.d.ts.map +1 -1
  215. package/dist/alphalib/types/robots/file-filter.js +11 -40
  216. package/dist/alphalib/types/robots/file-filter.js.map +1 -1
  217. package/dist/alphalib/types/robots/file-hash.d.ts +84 -71
  218. package/dist/alphalib/types/robots/file-hash.d.ts.map +1 -1
  219. package/dist/alphalib/types/robots/file-hash.js +12 -43
  220. package/dist/alphalib/types/robots/file-hash.js.map +1 -1
  221. package/dist/alphalib/types/robots/file-preview.d.ts +113 -100
  222. package/dist/alphalib/types/robots/file-preview.d.ts.map +1 -1
  223. package/dist/alphalib/types/robots/file-preview.js +14 -39
  224. package/dist/alphalib/types/robots/file-preview.js.map +1 -1
  225. package/dist/alphalib/types/robots/file-read.d.ts +80 -67
  226. package/dist/alphalib/types/robots/file-read.d.ts.map +1 -1
  227. package/dist/alphalib/types/robots/file-read.js +5 -26
  228. package/dist/alphalib/types/robots/file-read.js.map +1 -1
  229. package/dist/alphalib/types/robots/file-serve.d.ts +81 -68
  230. package/dist/alphalib/types/robots/file-serve.d.ts.map +1 -1
  231. package/dist/alphalib/types/robots/file-serve.js +4 -21
  232. package/dist/alphalib/types/robots/file-serve.js.map +1 -1
  233. package/dist/alphalib/types/robots/file-verify.d.ts +88 -75
  234. package/dist/alphalib/types/robots/file-verify.d.ts.map +1 -1
  235. package/dist/alphalib/types/robots/file-verify.js +11 -41
  236. package/dist/alphalib/types/robots/file-verify.js.map +1 -1
  237. package/dist/alphalib/types/robots/file-virusscan.d.ts +83 -67
  238. package/dist/alphalib/types/robots/file-virusscan.d.ts.map +1 -1
  239. package/dist/alphalib/types/robots/file-virusscan.js +16 -42
  240. package/dist/alphalib/types/robots/file-virusscan.js.map +1 -1
  241. package/dist/alphalib/types/robots/file-watermark.d.ts +81 -67
  242. package/dist/alphalib/types/robots/file-watermark.d.ts.map +1 -1
  243. package/dist/alphalib/types/robots/file-watermark.js +10 -29
  244. package/dist/alphalib/types/robots/file-watermark.js.map +1 -1
  245. package/dist/alphalib/types/robots/ftp-import.d.ts +40 -27
  246. package/dist/alphalib/types/robots/ftp-import.d.ts.map +1 -1
  247. package/dist/alphalib/types/robots/ftp-import.js +5 -33
  248. package/dist/alphalib/types/robots/ftp-import.js.map +1 -1
  249. package/dist/alphalib/types/robots/ftp-store.d.ts +85 -67
  250. package/dist/alphalib/types/robots/ftp-store.d.ts.map +1 -1
  251. package/dist/alphalib/types/robots/ftp-store.js +7 -34
  252. package/dist/alphalib/types/robots/ftp-store.js.map +1 -1
  253. package/dist/alphalib/types/robots/google-import.d.ts +48 -35
  254. package/dist/alphalib/types/robots/google-import.d.ts.map +1 -1
  255. package/dist/alphalib/types/robots/google-import.js +10 -43
  256. package/dist/alphalib/types/robots/google-import.js.map +1 -1
  257. package/dist/alphalib/types/robots/google-store.d.ts +80 -67
  258. package/dist/alphalib/types/robots/google-store.d.ts.map +1 -1
  259. package/dist/alphalib/types/robots/google-store.js +10 -41
  260. package/dist/alphalib/types/robots/google-store.js.map +1 -1
  261. package/dist/alphalib/types/robots/html-convert.d.ts +107 -89
  262. package/dist/alphalib/types/robots/html-convert.d.ts.map +1 -1
  263. package/dist/alphalib/types/robots/html-convert.js +6 -22
  264. package/dist/alphalib/types/robots/html-convert.js.map +1 -1
  265. package/dist/alphalib/types/robots/http-import.d.ts +76 -63
  266. package/dist/alphalib/types/robots/http-import.d.ts.map +1 -1
  267. package/dist/alphalib/types/robots/http-import.js +14 -19
  268. package/dist/alphalib/types/robots/http-import.js.map +1 -1
  269. package/dist/alphalib/types/robots/http-request.d.ts +538 -0
  270. package/dist/alphalib/types/robots/http-request.d.ts.map +1 -0
  271. package/dist/alphalib/types/robots/http-request.js +162 -0
  272. package/dist/alphalib/types/robots/http-request.js.map +1 -0
  273. package/dist/alphalib/types/robots/image-bgremove.d.ts +80 -67
  274. package/dist/alphalib/types/robots/image-bgremove.d.ts.map +1 -1
  275. package/dist/alphalib/types/robots/image-bgremove.js +6 -33
  276. package/dist/alphalib/types/robots/image-bgremove.js.map +1 -1
  277. package/dist/alphalib/types/robots/image-copyrightdetect.d.ts +92 -79
  278. package/dist/alphalib/types/robots/image-copyrightdetect.d.ts.map +1 -1
  279. package/dist/alphalib/types/robots/image-copyrightdetect.js +9 -33
  280. package/dist/alphalib/types/robots/image-copyrightdetect.js.map +1 -1
  281. package/dist/alphalib/types/robots/image-describe.d.ts +80 -67
  282. package/dist/alphalib/types/robots/image-describe.d.ts.map +1 -1
  283. package/dist/alphalib/types/robots/image-describe.js +8 -37
  284. package/dist/alphalib/types/robots/image-describe.js.map +1 -1
  285. package/dist/alphalib/types/robots/image-enhance.d.ts +80 -67
  286. package/dist/alphalib/types/robots/image-enhance.d.ts.map +1 -1
  287. package/dist/alphalib/types/robots/image-enhance.js +7 -31
  288. package/dist/alphalib/types/robots/image-enhance.js.map +1 -1
  289. package/dist/alphalib/types/robots/image-facedetect.d.ts +88 -75
  290. package/dist/alphalib/types/robots/image-facedetect.d.ts.map +1 -1
  291. package/dist/alphalib/types/robots/image-facedetect.js +16 -44
  292. package/dist/alphalib/types/robots/image-facedetect.js.map +1 -1
  293. package/dist/alphalib/types/robots/image-generate.d.ts +96 -86
  294. package/dist/alphalib/types/robots/image-generate.d.ts.map +1 -1
  295. package/dist/alphalib/types/robots/image-generate.js +17 -22
  296. package/dist/alphalib/types/robots/image-generate.js.map +1 -1
  297. package/dist/alphalib/types/robots/image-merge.d.ts +96 -83
  298. package/dist/alphalib/types/robots/image-merge.d.ts.map +1 -1
  299. package/dist/alphalib/types/robots/image-merge.js +9 -40
  300. package/dist/alphalib/types/robots/image-merge.js.map +1 -1
  301. package/dist/alphalib/types/robots/image-ocr.d.ts +80 -67
  302. package/dist/alphalib/types/robots/image-ocr.d.ts.map +1 -1
  303. package/dist/alphalib/types/robots/image-ocr.js +11 -47
  304. package/dist/alphalib/types/robots/image-ocr.js.map +1 -1
  305. package/dist/alphalib/types/robots/image-optimize.d.ts +88 -75
  306. package/dist/alphalib/types/robots/image-optimize.d.ts.map +1 -1
  307. package/dist/alphalib/types/robots/image-optimize.js +6 -32
  308. package/dist/alphalib/types/robots/image-optimize.js.map +1 -1
  309. package/dist/alphalib/types/robots/image-resize.d.ts +217 -112
  310. package/dist/alphalib/types/robots/image-resize.d.ts.map +1 -1
  311. package/dist/alphalib/types/robots/image-resize.js +15 -42
  312. package/dist/alphalib/types/robots/image-resize.js.map +1 -1
  313. package/dist/alphalib/types/robots/image-upscale.d.ts +97 -81
  314. package/dist/alphalib/types/robots/image-upscale.d.ts.map +1 -1
  315. package/dist/alphalib/types/robots/image-upscale.js +23 -42
  316. package/dist/alphalib/types/robots/image-upscale.js.map +1 -1
  317. package/dist/alphalib/types/robots/mega-import.d.ts +48 -35
  318. package/dist/alphalib/types/robots/mega-import.d.ts.map +1 -1
  319. package/dist/alphalib/types/robots/mega-import.js +12 -59
  320. package/dist/alphalib/types/robots/mega-import.js.map +1 -1
  321. package/dist/alphalib/types/robots/mega-store.d.ts +80 -67
  322. package/dist/alphalib/types/robots/mega-store.d.ts.map +1 -1
  323. package/dist/alphalib/types/robots/mega-store.js +14 -60
  324. package/dist/alphalib/types/robots/mega-store.js.map +1 -1
  325. package/dist/alphalib/types/robots/meta-read.d.ts +30 -16
  326. package/dist/alphalib/types/robots/meta-read.d.ts.map +1 -1
  327. package/dist/alphalib/types/robots/meta-read.js +4 -20
  328. package/dist/alphalib/types/robots/meta-read.js.map +1 -1
  329. package/dist/alphalib/types/robots/meta-write.d.ts +80 -67
  330. package/dist/alphalib/types/robots/meta-write.d.ts.map +1 -1
  331. package/dist/alphalib/types/robots/meta-write.js +9 -32
  332. package/dist/alphalib/types/robots/meta-write.js.map +1 -1
  333. package/dist/alphalib/types/robots/minio-import.d.ts +48 -35
  334. package/dist/alphalib/types/robots/minio-import.d.ts.map +1 -1
  335. package/dist/alphalib/types/robots/minio-import.js +9 -60
  336. package/dist/alphalib/types/robots/minio-import.js.map +1 -1
  337. package/dist/alphalib/types/robots/minio-store.d.ts +80 -67
  338. package/dist/alphalib/types/robots/minio-store.d.ts.map +1 -1
  339. package/dist/alphalib/types/robots/minio-store.js +9 -50
  340. package/dist/alphalib/types/robots/minio-store.js.map +1 -1
  341. package/dist/alphalib/types/robots/progress-simulate.d.ts +34 -28
  342. package/dist/alphalib/types/robots/progress-simulate.d.ts.map +1 -1
  343. package/dist/alphalib/types/robots/progress-simulate.js +8 -28
  344. package/dist/alphalib/types/robots/progress-simulate.js.map +1 -1
  345. package/dist/alphalib/types/robots/s3-import.d.ts +48 -35
  346. package/dist/alphalib/types/robots/s3-import.d.ts.map +1 -1
  347. package/dist/alphalib/types/robots/s3-import.js +7 -38
  348. package/dist/alphalib/types/robots/s3-import.js.map +1 -1
  349. package/dist/alphalib/types/robots/s3-store.d.ts +84 -68
  350. package/dist/alphalib/types/robots/s3-store.d.ts.map +1 -1
  351. package/dist/alphalib/types/robots/s3-store.js +14 -44
  352. package/dist/alphalib/types/robots/s3-store.js.map +1 -1
  353. package/dist/alphalib/types/robots/script-run.d.ts +83 -67
  354. package/dist/alphalib/types/robots/script-run.d.ts.map +1 -1
  355. package/dist/alphalib/types/robots/script-run.js +9 -27
  356. package/dist/alphalib/types/robots/script-run.js.map +1 -1
  357. package/dist/alphalib/types/robots/sftp-import.d.ts +51 -35
  358. package/dist/alphalib/types/robots/sftp-import.d.ts.map +1 -1
  359. package/dist/alphalib/types/robots/sftp-import.js +7 -36
  360. package/dist/alphalib/types/robots/sftp-import.js.map +1 -1
  361. package/dist/alphalib/types/robots/sftp-store.d.ts +83 -67
  362. package/dist/alphalib/types/robots/sftp-store.d.ts.map +1 -1
  363. package/dist/alphalib/types/robots/sftp-store.js +9 -41
  364. package/dist/alphalib/types/robots/sftp-store.js.map +1 -1
  365. package/dist/alphalib/types/robots/speech-transcribe.d.ts +102 -85
  366. package/dist/alphalib/types/robots/speech-transcribe.d.ts.map +1 -1
  367. package/dist/alphalib/types/robots/speech-transcribe.js +23 -44
  368. package/dist/alphalib/types/robots/speech-transcribe.js.map +1 -1
  369. package/dist/alphalib/types/robots/supabase-import.d.ts +48 -35
  370. package/dist/alphalib/types/robots/supabase-import.d.ts.map +1 -1
  371. package/dist/alphalib/types/robots/supabase-import.js +12 -59
  372. package/dist/alphalib/types/robots/supabase-import.js.map +1 -1
  373. package/dist/alphalib/types/robots/supabase-store.d.ts +80 -79
  374. package/dist/alphalib/types/robots/supabase-store.d.ts.map +1 -1
  375. package/dist/alphalib/types/robots/supabase-store.js +12 -56
  376. package/dist/alphalib/types/robots/supabase-store.js.map +1 -1
  377. package/dist/alphalib/types/robots/swift-import.d.ts +48 -47
  378. package/dist/alphalib/types/robots/swift-import.d.ts.map +1 -1
  379. package/dist/alphalib/types/robots/swift-import.js +14 -55
  380. package/dist/alphalib/types/robots/swift-import.js.map +1 -1
  381. package/dist/alphalib/types/robots/swift-store.d.ts +80 -79
  382. package/dist/alphalib/types/robots/swift-store.d.ts.map +1 -1
  383. package/dist/alphalib/types/robots/swift-store.js +14 -62
  384. package/dist/alphalib/types/robots/swift-store.js.map +1 -1
  385. package/dist/alphalib/types/robots/text-speak.d.ts +80 -67
  386. package/dist/alphalib/types/robots/text-speak.d.ts.map +1 -1
  387. package/dist/alphalib/types/robots/text-speak.js +11 -37
  388. package/dist/alphalib/types/robots/text-speak.js.map +1 -1
  389. package/dist/alphalib/types/robots/text-translate.d.ts +92 -79
  390. package/dist/alphalib/types/robots/text-translate.d.ts.map +1 -1
  391. package/dist/alphalib/types/robots/text-translate.js +9 -36
  392. package/dist/alphalib/types/robots/text-translate.js.map +1 -1
  393. package/dist/alphalib/types/robots/tigris-import.d.ts +48 -35
  394. package/dist/alphalib/types/robots/tigris-import.d.ts.map +1 -1
  395. package/dist/alphalib/types/robots/tigris-import.js +9 -60
  396. package/dist/alphalib/types/robots/tigris-import.js.map +1 -1
  397. package/dist/alphalib/types/robots/tigris-store.d.ts +80 -67
  398. package/dist/alphalib/types/robots/tigris-store.d.ts.map +1 -1
  399. package/dist/alphalib/types/robots/tigris-store.js +7 -48
  400. package/dist/alphalib/types/robots/tigris-store.js.map +1 -1
  401. package/dist/alphalib/types/robots/tlcdn-deliver.d.ts +32 -19
  402. package/dist/alphalib/types/robots/tlcdn-deliver.d.ts.map +1 -1
  403. package/dist/alphalib/types/robots/tlcdn-deliver.js +4 -25
  404. package/dist/alphalib/types/robots/tlcdn-deliver.js.map +1 -1
  405. package/dist/alphalib/types/robots/transloadit-import.d.ts +58 -45
  406. package/dist/alphalib/types/robots/transloadit-import.d.ts.map +1 -1
  407. package/dist/alphalib/types/robots/transloadit-import.js +17 -21
  408. package/dist/alphalib/types/robots/transloadit-import.js.map +1 -1
  409. package/dist/alphalib/types/robots/transloadit-store.d.ts +70 -57
  410. package/dist/alphalib/types/robots/transloadit-store.d.ts.map +1 -1
  411. package/dist/alphalib/types/robots/transloadit-store.js +14 -6
  412. package/dist/alphalib/types/robots/transloadit-store.js.map +1 -1
  413. package/dist/alphalib/types/robots/tus-store.d.ts +84 -71
  414. package/dist/alphalib/types/robots/tus-store.d.ts.map +1 -1
  415. package/dist/alphalib/types/robots/tus-store.js +8 -37
  416. package/dist/alphalib/types/robots/tus-store.js.map +1 -1
  417. package/dist/alphalib/types/robots/upload-handle.d.ts +32 -19
  418. package/dist/alphalib/types/robots/upload-handle.d.ts.map +1 -1
  419. package/dist/alphalib/types/robots/upload-handle.js +4 -19
  420. package/dist/alphalib/types/robots/upload-handle.js.map +1 -1
  421. package/dist/alphalib/types/robots/video-adaptive.d.ts +112 -99
  422. package/dist/alphalib/types/robots/video-adaptive.d.ts.map +1 -1
  423. package/dist/alphalib/types/robots/video-adaptive.js +4 -26
  424. package/dist/alphalib/types/robots/video-adaptive.js.map +1 -1
  425. package/dist/alphalib/types/robots/video-artwork.d.ts +80 -67
  426. package/dist/alphalib/types/robots/video-artwork.d.ts.map +1 -1
  427. package/dist/alphalib/types/robots/video-artwork.js +7 -32
  428. package/dist/alphalib/types/robots/video-artwork.js.map +1 -1
  429. package/dist/alphalib/types/robots/video-concat.d.ts +104 -91
  430. package/dist/alphalib/types/robots/video-concat.d.ts.map +1 -1
  431. package/dist/alphalib/types/robots/video-concat.js +6 -27
  432. package/dist/alphalib/types/robots/video-concat.js.map +1 -1
  433. package/dist/alphalib/types/robots/video-encode.d.ts +121 -103
  434. package/dist/alphalib/types/robots/video-encode.d.ts.map +1 -1
  435. package/dist/alphalib/types/robots/video-encode.js +13 -38
  436. package/dist/alphalib/types/robots/video-encode.js.map +1 -1
  437. package/dist/alphalib/types/robots/video-generate.d.ts +96 -86
  438. package/dist/alphalib/types/robots/video-generate.d.ts.map +1 -1
  439. package/dist/alphalib/types/robots/video-generate.js +11 -18
  440. package/dist/alphalib/types/robots/video-generate.js.map +1 -1
  441. package/dist/alphalib/types/robots/video-merge.d.ts +135 -119
  442. package/dist/alphalib/types/robots/video-merge.d.ts.map +1 -1
  443. package/dist/alphalib/types/robots/video-merge.js +12 -32
  444. package/dist/alphalib/types/robots/video-merge.js.map +1 -1
  445. package/dist/alphalib/types/robots/video-ondemand.d.ts +156 -139
  446. package/dist/alphalib/types/robots/video-ondemand.d.ts.map +1 -1
  447. package/dist/alphalib/types/robots/video-ondemand.js +11 -27
  448. package/dist/alphalib/types/robots/video-ondemand.js.map +1 -1
  449. package/dist/alphalib/types/robots/video-split.d.ts +104 -91
  450. package/dist/alphalib/types/robots/video-split.d.ts.map +1 -1
  451. package/dist/alphalib/types/robots/video-split.js +11 -39
  452. package/dist/alphalib/types/robots/video-split.js.map +1 -1
  453. package/dist/alphalib/types/robots/video-subtitle.d.ts +104 -91
  454. package/dist/alphalib/types/robots/video-subtitle.d.ts.map +1 -1
  455. package/dist/alphalib/types/robots/video-subtitle.js +7 -30
  456. package/dist/alphalib/types/robots/video-subtitle.js.map +1 -1
  457. package/dist/alphalib/types/robots/video-thumbs.d.ts +112 -95
  458. package/dist/alphalib/types/robots/video-thumbs.d.ts.map +1 -1
  459. package/dist/alphalib/types/robots/video-thumbs.js +46 -53
  460. package/dist/alphalib/types/robots/video-thumbs.js.map +1 -1
  461. package/dist/alphalib/types/robots/vimeo-import.d.ts +30 -17
  462. package/dist/alphalib/types/robots/vimeo-import.d.ts.map +1 -1
  463. package/dist/alphalib/types/robots/vimeo-import.js +7 -17
  464. package/dist/alphalib/types/robots/vimeo-import.js.map +1 -1
  465. package/dist/alphalib/types/robots/vimeo-store.d.ts +83 -67
  466. package/dist/alphalib/types/robots/vimeo-store.d.ts.map +1 -1
  467. package/dist/alphalib/types/robots/vimeo-store.js +11 -37
  468. package/dist/alphalib/types/robots/vimeo-store.js.map +1 -1
  469. package/dist/alphalib/types/robots/wasabi-import.d.ts +48 -35
  470. package/dist/alphalib/types/robots/wasabi-import.d.ts.map +1 -1
  471. package/dist/alphalib/types/robots/wasabi-import.js +9 -56
  472. package/dist/alphalib/types/robots/wasabi-import.js.map +1 -1
  473. package/dist/alphalib/types/robots/wasabi-store.d.ts +80 -67
  474. package/dist/alphalib/types/robots/wasabi-store.d.ts.map +1 -1
  475. package/dist/alphalib/types/robots/wasabi-store.js +10 -52
  476. package/dist/alphalib/types/robots/wasabi-store.js.map +1 -1
  477. package/dist/alphalib/types/robots/youtube-store.d.ts +98 -85
  478. package/dist/alphalib/types/robots/youtube-store.d.ts.map +1 -1
  479. package/dist/alphalib/types/robots/youtube-store.js +42 -63
  480. package/dist/alphalib/types/robots/youtube-store.js.map +1 -1
  481. package/dist/alphalib/types/stackVersions.d.ts +40 -1
  482. package/dist/alphalib/types/stackVersions.d.ts.map +1 -1
  483. package/dist/alphalib/types/stackVersions.js +25 -3
  484. package/dist/alphalib/types/stackVersions.js.map +1 -1
  485. package/dist/alphalib/types/storageAsset.d.ts +28 -22
  486. package/dist/alphalib/types/storageAsset.d.ts.map +1 -1
  487. package/dist/alphalib/types/storageAsset.js +30 -12
  488. package/dist/alphalib/types/storageAsset.js.map +1 -1
  489. package/dist/alphalib/types/storageResults.d.ts +29 -0
  490. package/dist/alphalib/types/storageResults.d.ts.map +1 -0
  491. package/dist/alphalib/types/storageResults.js +53 -0
  492. package/dist/alphalib/types/storageResults.js.map +1 -0
  493. package/dist/alphalib/types/template.d.ts +16 -16
  494. package/dist/alphalib/types/templateCredential.d.ts +2 -2
  495. package/dist/alphalib/types/utility.d.ts +22 -0
  496. package/dist/alphalib/types/utility.d.ts.map +1 -0
  497. package/dist/alphalib/types/utility.js +2 -0
  498. package/dist/alphalib/types/utility.js.map +1 -0
  499. package/dist/storageResults.d.ts +2 -13
  500. package/dist/storageResults.d.ts.map +1 -1
  501. package/dist/storageResults.js +9 -34
  502. package/dist/storageResults.js.map +1 -1
  503. package/package.json +1 -2
  504. package/src/ApiError.ts +11 -4
  505. package/src/Transloadit.ts +6 -3
  506. package/src/alphalib/aiMessages.ts +554 -0
  507. package/src/alphalib/assembly-linter.ts +9 -2
  508. package/src/alphalib/englishList.ts +11 -0
  509. package/src/alphalib/errors.ts +159 -13
  510. package/src/alphalib/imagemagickDensity.ts +2 -1
  511. package/src/alphalib/lib/zodInputSemantics.ts +114 -0
  512. package/src/alphalib/object.ts +178 -3
  513. package/src/alphalib/stepParsing.ts +10 -2
  514. package/src/alphalib/types/apiParameterDescription.ts +41 -0
  515. package/src/alphalib/types/assemblyStatus.ts +115 -83
  516. package/src/alphalib/types/errorReason.ts +14 -0
  517. package/src/alphalib/types/file.ts +18 -0
  518. package/src/alphalib/types/fileHash.ts +10 -0
  519. package/src/alphalib/types/responseErrors/HttpImportRobot.ts +22 -0
  520. package/src/alphalib/types/robots/_ai-models.ts +91 -0
  521. package/src/alphalib/types/robots/_index.ts +14 -0
  522. package/src/alphalib/types/robots/_instructions-primitives.ts +839 -308
  523. package/src/alphalib/types/robots/ai-chat.ts +358 -460
  524. package/src/alphalib/types/robots/assembly-savejson.ts +2 -11
  525. package/src/alphalib/types/robots/audio-artwork.ts +35 -61
  526. package/src/alphalib/types/robots/audio-concat.ts +17 -25
  527. package/src/alphalib/types/robots/audio-encode.ts +35 -65
  528. package/src/alphalib/types/robots/audio-loop.ts +34 -61
  529. package/src/alphalib/types/robots/audio-merge.ts +17 -25
  530. package/src/alphalib/types/robots/audio-split.ts +37 -67
  531. package/src/alphalib/types/robots/audio-waveform.ts +42 -65
  532. package/src/alphalib/types/robots/azure-import.ts +26 -57
  533. package/src/alphalib/types/robots/azure-store.ts +48 -72
  534. package/src/alphalib/types/robots/backblaze-import.ts +30 -63
  535. package/src/alphalib/types/robots/backblaze-store.ts +37 -66
  536. package/src/alphalib/types/robots/box-import.ts +32 -55
  537. package/src/alphalib/types/robots/box-store.ts +40 -63
  538. package/src/alphalib/types/robots/cloudfiles-import.ts +34 -70
  539. package/src/alphalib/types/robots/cloudfiles-store.ts +28 -59
  540. package/src/alphalib/types/robots/cloudflare-import.ts +37 -83
  541. package/src/alphalib/types/robots/cloudflare-store.ts +37 -77
  542. package/src/alphalib/types/robots/digitalocean-import.ts +35 -75
  543. package/src/alphalib/types/robots/digitalocean-store.ts +35 -79
  544. package/src/alphalib/types/robots/document-autorotate.ts +36 -58
  545. package/src/alphalib/types/robots/document-convert.ts +37 -59
  546. package/src/alphalib/types/robots/document-extract.ts +45 -62
  547. package/src/alphalib/types/robots/document-merge.ts +25 -47
  548. package/src/alphalib/types/robots/document-ocr.ts +32 -70
  549. package/src/alphalib/types/robots/document-optimize.ts +38 -57
  550. package/src/alphalib/types/robots/document-split.ts +33 -56
  551. package/src/alphalib/types/robots/document-thumbs.ts +66 -67
  552. package/src/alphalib/types/robots/dropbox-import.ts +27 -57
  553. package/src/alphalib/types/robots/dropbox-store.ts +39 -65
  554. package/src/alphalib/types/robots/edgly-deliver.ts +26 -49
  555. package/src/alphalib/types/robots/file-compress.ts +31 -45
  556. package/src/alphalib/types/robots/file-decompress.ts +41 -68
  557. package/src/alphalib/types/robots/file-filter.ts +36 -65
  558. package/src/alphalib/types/robots/file-hash.ts +37 -64
  559. package/src/alphalib/types/robots/file-preview.ts +39 -65
  560. package/src/alphalib/types/robots/file-read.ts +33 -50
  561. package/src/alphalib/types/robots/file-serve.ts +32 -46
  562. package/src/alphalib/types/robots/file-verify.ts +37 -63
  563. package/src/alphalib/types/robots/file-virusscan.ts +49 -67
  564. package/src/alphalib/types/robots/file-watermark.ts +35 -54
  565. package/src/alphalib/types/robots/ftp-import.ts +26 -54
  566. package/src/alphalib/types/robots/ftp-store.ts +44 -63
  567. package/src/alphalib/types/robots/google-import.ts +32 -66
  568. package/src/alphalib/types/robots/google-store.ts +37 -63
  569. package/src/alphalib/types/robots/html-convert.ts +38 -49
  570. package/src/alphalib/types/robots/http-import.ts +21 -19
  571. package/src/alphalib/types/robots/http-request.ts +196 -0
  572. package/src/alphalib/types/robots/image-bgremove.ts +28 -55
  573. package/src/alphalib/types/robots/image-copyrightdetect.ts +38 -56
  574. package/src/alphalib/types/robots/image-describe.ts +31 -60
  575. package/src/alphalib/types/robots/image-enhance.ts +30 -56
  576. package/src/alphalib/types/robots/image-facedetect.ts +43 -71
  577. package/src/alphalib/types/robots/image-generate.ts +29 -22
  578. package/src/alphalib/types/robots/image-merge.ts +34 -65
  579. package/src/alphalib/types/robots/image-ocr.ts +33 -69
  580. package/src/alphalib/types/robots/image-optimize.ts +28 -54
  581. package/src/alphalib/types/robots/image-resize.ts +72 -96
  582. package/src/alphalib/types/robots/image-upscale.ts +52 -64
  583. package/src/alphalib/types/robots/mega-import.ts +36 -84
  584. package/src/alphalib/types/robots/mega-store.ts +44 -81
  585. package/src/alphalib/types/robots/meta-read.ts +21 -36
  586. package/src/alphalib/types/robots/meta-write.ts +35 -53
  587. package/src/alphalib/types/robots/minio-import.ts +34 -86
  588. package/src/alphalib/types/robots/minio-store.ts +37 -72
  589. package/src/alphalib/types/robots/progress-simulate.ts +14 -28
  590. package/src/alphalib/types/robots/s3-import.ts +32 -63
  591. package/src/alphalib/types/robots/s3-store.ts +53 -74
  592. package/src/alphalib/types/robots/script-run.ts +44 -55
  593. package/src/alphalib/types/robots/sftp-import.ts +34 -61
  594. package/src/alphalib/types/robots/sftp-store.ts +42 -65
  595. package/src/alphalib/types/robots/speech-transcribe.ts +53 -71
  596. package/src/alphalib/types/robots/supabase-import.ts +37 -84
  597. package/src/alphalib/types/robots/supabase-store.ts +41 -78
  598. package/src/alphalib/types/robots/swift-import.ts +38 -80
  599. package/src/alphalib/types/robots/swift-store.ts +44 -84
  600. package/src/alphalib/types/robots/text-speak.ts +36 -62
  601. package/src/alphalib/types/robots/text-translate.ts +35 -62
  602. package/src/alphalib/types/robots/tigris-import.ts +34 -86
  603. package/src/alphalib/types/robots/tigris-store.ts +35 -70
  604. package/src/alphalib/types/robots/tlcdn-deliver.ts +23 -47
  605. package/src/alphalib/types/robots/transloadit-import.ts +24 -29
  606. package/src/alphalib/types/robots/transloadit-store.ts +20 -7
  607. package/src/alphalib/types/robots/tus-store.ts +34 -58
  608. package/src/alphalib/types/robots/upload-handle.ts +23 -41
  609. package/src/alphalib/types/robots/video-adaptive.ts +28 -51
  610. package/src/alphalib/types/robots/video-artwork.ts +28 -54
  611. package/src/alphalib/types/robots/video-concat.ts +29 -52
  612. package/src/alphalib/types/robots/video-encode.ts +39 -62
  613. package/src/alphalib/types/robots/video-generate.ts +20 -18
  614. package/src/alphalib/types/robots/video-merge.ts +36 -55
  615. package/src/alphalib/types/robots/video-ondemand.ts +48 -62
  616. package/src/alphalib/types/robots/video-split.ts +32 -61
  617. package/src/alphalib/types/robots/video-subtitle.ts +30 -52
  618. package/src/alphalib/types/robots/video-thumbs.ts +74 -78
  619. package/src/alphalib/types/robots/vimeo-import.ts +12 -17
  620. package/src/alphalib/types/robots/vimeo-store.ts +46 -65
  621. package/src/alphalib/types/robots/wasabi-import.ts +33 -81
  622. package/src/alphalib/types/robots/wasabi-store.ts +38 -74
  623. package/src/alphalib/types/robots/youtube-store.ts +81 -91
  624. package/src/alphalib/types/stackVersions.ts +26 -3
  625. package/src/alphalib/types/storageAsset.ts +84 -36
  626. package/src/alphalib/types/storageResults.ts +75 -0
  627. package/src/alphalib/types/utility.ts +52 -0
  628. package/src/storageResults.ts +19 -56
@@ -1,8 +1,17 @@
1
- import type { Replace } from 'type-fest'
1
+ import type { StringReplaceAll } from '../utility.ts'
2
2
 
3
3
  import { z } from 'zod'
4
4
 
5
- import { stackVersions } from '../stackVersions.ts'
5
+ import { formatEnglishList } from '../../englishList.ts'
6
+ import {
7
+ ecmaWhitespaceCharacterClass,
8
+ zodInputPreservingTransform,
9
+ zodStableJsonDefault,
10
+ zodWithConservativeJsonInputSchema,
11
+ zodWithJsonInputSchema,
12
+ } from '../../lib/zodInputSemantics.ts'
13
+ import { inheritApiParameterDescription } from '../apiParameterDescription.ts'
14
+ import { runtimeStackVersions, stackVersions } from '../stackVersions.ts'
6
15
 
7
16
  export const robotNames = z.enum([
8
17
  'AiChatRobot',
@@ -80,6 +89,7 @@ export const robotNames = z.enum([
80
89
  'DropboxImportRobot',
81
90
  'DropboxStoreRobot',
82
91
  'HttpImportRobot',
92
+ 'HttpRequestRobot',
83
93
  'SftpImportRobot',
84
94
  'SftpStoreRobot',
85
95
  'FtpImportRobot',
@@ -102,12 +112,17 @@ export const robotNames = z.enum([
102
112
  'TextSpeakRobot',
103
113
  'TextTranslateRobot',
104
114
  'FilePreviewRobot',
115
+ 'TusStoreRobot',
105
116
  'TransloaditImportRobot',
106
117
  'TransloaditStoreRobot',
107
- 'TusStoreRobot',
108
118
  'ProgressSimulateRobot',
109
119
  ])
110
120
 
121
+ const awsGcpMinimumChargeUsdSchema = z.object({
122
+ aws: z.number(),
123
+ gcp: z.number(),
124
+ })
125
+
111
126
  export const robotMetaSchema = z.object({
112
127
  // Added keys from api2/lib/config.ts:
113
128
  name: robotNames,
@@ -117,18 +132,12 @@ export const robotMetaSchema = z.object({
117
132
  preserveInputFileUrls: z.boolean().optional(),
118
133
  minimumCharge: z.number().optional(),
119
134
  minimumChargeUsd: z.number().optional(),
120
- minimumChargeUsdPerSpeechTranscribeMinute: z
121
- .object({
122
- aws: z.number(),
123
- gcp: z.number(),
124
- })
125
- .optional(),
126
- minimumChargeUsdPerDocumentOcrPage: z
127
- .object({
128
- aws: z.number(),
129
- gcp: z.number(),
135
+ minimumChargeUsdPerSpeechTranscribeMinute: awsGcpMinimumChargeUsdSchema
136
+ .extend({
137
+ replicate: z.literal('variable').optional(),
130
138
  })
131
139
  .optional(),
140
+ minimumChargeUsdPerDocumentOcrPage: awsGcpMinimumChargeUsdSchema.optional(),
132
141
  applyCommunityPlanMediaTrim: z.boolean().optional(),
133
142
  isAllowedForUrlTransform: z.boolean(),
134
143
  removeJobResultFilesFromDiskRightAfterStoringOnS3: z.boolean(),
@@ -142,22 +151,14 @@ export const robotMetaSchema = z.object({
142
151
  extraChargeForImageResize: z.number().optional(),
143
152
 
144
153
  // Original keys from content repo:
145
- bytescount: z.number(),
146
154
  description: z.string().optional(),
147
- discount_factor: z.number(),
148
- discount_pct: z.number(),
149
- // To avoid a cycling dependency back to template.ts, we'll use any for now:
150
- // example_code: assemblyInstructionsSchema.optional(),
151
- example_code: z.any().optional(),
155
+ // Validate against assembled public Robot schemas at publication, outside this dependency cycle.
156
+ example_code: z.unknown().optional(),
152
157
  example_code_description: z.string().optional(),
153
158
  extended_description: z.string().optional(),
154
159
  has_small_icon: z.literal(true).optional(),
155
- minimum_charge: z.number(),
156
- minimum_charge_usd: z.union([z.number(), z.record(z.string(), z.number())]).optional(),
157
- minimum_charge_usd_note: z.string().optional(),
158
160
  ogimage: z.string().optional(),
159
161
  marketing_intro: z.string().optional(),
160
- output_factor: z.number(),
161
162
  override_lvl1: z.string().optional(),
162
163
  purpose_sentence: z.string(),
163
164
  purpose_verb: z.enum([
@@ -212,11 +213,10 @@ export const robotMetaSchema = z.object({
212
213
  'file-filtering',
213
214
  'file-importing',
214
215
  'handling-uploads',
215
- 'image-manipulation',
216
+ 'image-processing',
216
217
  'media-cataloging',
217
218
  'video-encoding',
218
219
  ]),
219
- slot_count: z.number(),
220
220
  title: z.string(),
221
221
  typical_file_size_mb: z.number(),
222
222
  typical_file_type: z.enum([
@@ -233,6 +233,193 @@ export const robotMetaSchema = z.object({
233
233
 
234
234
  export type RobotMetaInput = z.input<typeof robotMetaSchema>
235
235
 
236
+ /** Shared processing metadata; per-Robot exceptions stay explicit. */
237
+ export const robotProcessingMeta = {
238
+ typical_file_size_mb: 1.2,
239
+ typical_file_type: 'file',
240
+ queueSlotCount: 10,
241
+ priceFactor: 1,
242
+ isAllowedForUrlTransform: true,
243
+ isInternal: false,
244
+ removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
245
+ stage: 'ga',
246
+ } satisfies Partial<RobotMetaInput>
247
+
248
+ /** Shared artificial-intelligence metadata; exceptions stay local. */
249
+ export const robotArtificialIntelligenceMeta = {
250
+ ...robotProcessingMeta,
251
+ service_slug: 'artificial-intelligence',
252
+ typical_file_type: 'image',
253
+ trackOutputFileSize: true,
254
+ } satisfies Partial<RobotMetaInput>
255
+
256
+ /** Shared audio-encoding metadata; exceptions stay local. */
257
+ export const robotAudioEncodingMeta = {
258
+ ...robotProcessingMeta,
259
+ override_lvl1: 'Audio Encoding',
260
+ service_slug: 'audio-encoding',
261
+ typical_file_size_mb: 3.8,
262
+ typical_file_type: 'audio file',
263
+ priceFactor: 4,
264
+ queueSlotCount: 20,
265
+ trackOutputFileSize: true,
266
+ applyCommunityPlanMediaTrim: true,
267
+ } satisfies Partial<RobotMetaInput>
268
+
269
+ /** Shared document-processing metadata; exceptions stay local. */
270
+ export const robotDocumentProcessingMeta = {
271
+ ...robotProcessingMeta,
272
+ override_lvl1: 'Document Processing',
273
+ service_slug: 'document-processing',
274
+ typical_file_size_mb: 0.8,
275
+ typical_file_type: 'document',
276
+ minimumCharge: 1048576,
277
+ } satisfies Partial<RobotMetaInput>
278
+
279
+ /** Shared content-delivery metadata; exceptions stay local. */
280
+ export const robotContentDeliveryMeta = {
281
+ ...robotProcessingMeta,
282
+ service_slug: 'content-delivery',
283
+ queueSlotCount: 0,
284
+ downloadInputFiles: false,
285
+ preserveInputFileUrls: true,
286
+ isAllowedForUrlTransform: false,
287
+ trackOutputFileSize: false,
288
+ isInternal: true,
289
+ } satisfies Partial<RobotMetaInput>
290
+
291
+ /** Shared file-filtering metadata; exceptions stay local. */
292
+ export const robotFileFilteringMeta = {
293
+ ...robotProcessingMeta,
294
+ override_lvl1: 'File Filtering',
295
+ service_slug: 'file-filtering',
296
+ trackOutputFileSize: true,
297
+ } satisfies Partial<RobotMetaInput>
298
+
299
+ /** Shared media-cataloging metadata; exceptions stay local. */
300
+ export const robotMediaCatalogingMeta = {
301
+ ...robotProcessingMeta,
302
+ override_lvl1: 'Media Cataloging',
303
+ service_slug: 'media-cataloging',
304
+ queueSlotCount: 15,
305
+ } satisfies Partial<RobotMetaInput>
306
+
307
+ /** Shared image-processing metadata; exceptions stay local. */
308
+ export const robotImageProcessingMeta = {
309
+ ...robotProcessingMeta,
310
+ override_lvl1: 'Image Processing',
311
+ service_slug: 'image-processing',
312
+ typical_file_size_mb: 0.8,
313
+ typical_file_type: 'image',
314
+ } satisfies Partial<RobotMetaInput>
315
+
316
+ /** Shared code-evaluation metadata; exceptions stay local. */
317
+ export const robotCodeEvaluationMeta = {
318
+ ...robotProcessingMeta,
319
+ override_lvl1: 'Code Evaluation',
320
+ service_slug: 'code-evaluation',
321
+ isAllowedForUrlTransform: false,
322
+ trackOutputFileSize: true,
323
+ } satisfies Partial<RobotMetaInput>
324
+
325
+ /** Shared video-encoding metadata; exceptions stay local. */
326
+ export const robotVideoEncodingMeta = {
327
+ ...robotProcessingMeta,
328
+ override_lvl1: 'Video Encoding',
329
+ service_slug: 'video-encoding',
330
+ typical_file_size_mb: 80,
331
+ typical_file_type: 'video',
332
+ queueSlotCount: 60,
333
+ isAllowedForUrlTransform: false,
334
+ trackOutputFileSize: true,
335
+ applyCommunityPlanMediaTrim: true,
336
+ } satisfies Partial<RobotMetaInput>
337
+
338
+ /** Shared import metadata; provider-specific prices, queues, and flags override it locally. */
339
+ export const robotImportMeta = {
340
+ override_lvl1: 'File Importing',
341
+ purpose_verb: 'import',
342
+ service_slug: 'file-importing',
343
+ typical_file_size_mb: 1.2,
344
+ typical_file_type: 'file',
345
+ priceFactor: 6.6666,
346
+ queueSlotCount: 20,
347
+ isAllowedForUrlTransform: true,
348
+ trackOutputFileSize: false,
349
+ isInternal: false,
350
+ removeJobResultFilesFromDiskRightAfterStoringOnS3: true,
351
+ stage: 'ga',
352
+ } satisfies Partial<RobotMetaInput>
353
+
354
+ /** Shared store metadata; provider-specific prices, queues, and flags override it locally. */
355
+ export const robotStoreMeta = {
356
+ override_lvl1: 'File Exporting',
357
+ purpose_verb: 'export',
358
+ service_slug: 'file-exporting',
359
+ typical_file_size_mb: 1.2,
360
+ typical_file_type: 'file',
361
+ priceFactor: 6.6666,
362
+ queueSlotCount: 10,
363
+ isAllowedForUrlTransform: true,
364
+ trackOutputFileSize: false,
365
+ isInternal: false,
366
+ removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
367
+ stage: 'ga',
368
+ } satisfies Partial<RobotMetaInput>
369
+
370
+ /** Single-Step processing example; unusual input relationships stay explicit. */
371
+ export function createProcessingExample(
372
+ name: string,
373
+ robot: string,
374
+ parameters: Record<string, unknown> = {},
375
+ ): { steps: Record<string, Record<string, unknown>> } {
376
+ return { steps: { [name]: { robot, use: ':original', ...parameters } } }
377
+ }
378
+
379
+ interface StorageExampleStep {
380
+ robot: string
381
+ credentials: string
382
+ path: string
383
+ recursive?: true
384
+ use?: ':original'
385
+ }
386
+
387
+ interface StorageRobotExample {
388
+ steps: Record<string, StorageExampleStep>
389
+ }
390
+
391
+ /** Standard directory import example; nonrecursive providers omit the flag. */
392
+ export function createStorageImportExample(
393
+ robot: string,
394
+ credentials: string,
395
+ recursive = true,
396
+ ): StorageRobotExample {
397
+ return {
398
+ steps: {
399
+ imported: {
400
+ robot,
401
+ credentials,
402
+ path: 'path/to/files/',
403
+ ...(recursive ? { recursive: true } : {}),
404
+ },
405
+ },
406
+ }
407
+ }
408
+
409
+ /** Standard export example shared by compatible storage providers. */
410
+ export function createStorageStoreExample(robot: string, credentials: string): StorageRobotExample {
411
+ return {
412
+ steps: {
413
+ exported: {
414
+ robot,
415
+ use: ':original',
416
+ credentials,
417
+ path: 'my_target_folder/${unique_prefix}/${file.url_name}',
418
+ },
419
+ },
420
+ }
421
+ }
422
+
236
423
  // These schemas can be reproduced with z.string().regex(). However, this causes some issues.
237
424
  // We use this in combination with unions. Internally Zod normalizes unions. A string schema and
238
425
  // enums merged in some way. Both are validated. Normally, if a Zod union has errors, all of them
@@ -242,29 +429,24 @@ export type RobotMetaInput = z.input<typeof robotMetaSchema>
242
429
  // is more useful in pretty much every case. To work around this, we use z.custom() instead, as Zod
243
430
  // can’t normalize that.
244
431
  const interpolationRegexFull = /^\${.+}$/
245
- export const interpolationSchemaFull = z.custom<`\${${string}}`>(
246
- (input) => typeof input === 'string' && interpolationRegexFull.test(input),
247
- 'Must be a full interpolation string',
432
+ export const interpolationSchemaFull = zodWithJsonInputSchema(
433
+ z.custom<`\${${string}}`>(
434
+ (input) => typeof input === 'string' && interpolationRegexFull.test(input),
435
+ 'Must be a full interpolation string',
436
+ ),
437
+ z.string().regex(/^\$\{[^\n\r\u2028\u2029]+\}$/u),
248
438
  )
249
439
  const interpolationRegexPartial = /\${.+}/
250
- export const interpolationSchemaPartial = z.custom<string>(
251
- (input) => typeof input === 'string' && interpolationRegexPartial.test(input),
252
- 'Must be a partially interpolatable string',
440
+ export const interpolationSchemaPartial = zodWithJsonInputSchema(
441
+ z.custom<string>(
442
+ (input) => typeof input === 'string' && interpolationRegexPartial.test(input),
443
+ 'Must be a partially interpolatable string',
444
+ ),
445
+ z.string().regex(/\$\{[^\n\r\u2028\u2029]+\}/u),
253
446
  )
254
447
 
255
448
  export const booleanStringSchema = z.enum(['true', 'false'])
256
449
 
257
- export const inputSortBySchema = z
258
- .enum(['auto', 'basename', 'import_order'])
259
- .default('basename')
260
- .describe(`
261
- Controls how bundled inputs are ordered when no explicit numbered alias such as \`video_1\` or \`document_1\` is used.
262
-
263
- The default \`"basename"\` keeps the legacy natural basename sorting behavior.
264
-
265
- 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.
266
- `)
267
-
268
450
  type InterpolatableTuple<Schemas extends readonly z.ZodTypeAny[]> = Schemas extends readonly [
269
451
  infer Head extends z.ZodTypeAny,
270
452
  ...infer Rest extends z.ZodTypeAny[],
@@ -348,9 +530,9 @@ function toInterpolatableUnionOptions(options: z.ZodTypeAny[]): z.ZodUnionOption
348
530
  return [head, ...tail]
349
531
  }
350
532
 
351
- export function interpolateRecursive<Schema extends z.ZodFirstPartySchemaTypes>(
352
- schema: Schema,
353
- ): InterpolatableSchema<Schema> {
533
+ function interpolateRecursiveWithoutDescriptionRegistration<
534
+ Schema extends z.ZodFirstPartySchemaTypes,
535
+ >(schema: Schema): InterpolatableSchema<Schema> {
354
536
  const def = schema._def
355
537
 
356
538
  switch (def.typeName) {
@@ -358,20 +540,21 @@ export function interpolateRecursive<Schema extends z.ZodFirstPartySchemaTypes>(
358
540
  return toInterpolatableSchema(
359
541
  z.union([
360
542
  interpolationSchemaFull,
361
- z
362
- .union([schema, booleanStringSchema])
363
- .transform((value) => value === true || value === false),
543
+ zodInputPreservingTransform(
544
+ z.union([schema, booleanStringSchema]),
545
+ (value) => value === true || value === 'true',
546
+ ),
364
547
  ]),
365
548
  )
366
549
  case z.ZodFirstPartyTypeKind.ZodArray: {
367
550
  let replacement = z.array(interpolateRecursive(def.type), def)
368
551
 
369
552
  if (def.exactLength != null) {
370
- replacement = replacement.min(def.exactLength.value, def.exactLength.message)
553
+ replacement = replacement.length(def.exactLength.value, def.exactLength.message)
371
554
  }
372
555
 
373
556
  if (def.maxLength != null) {
374
- replacement = replacement.min(def.maxLength.value, def.maxLength.message)
557
+ replacement = replacement.max(def.maxLength.value, def.maxLength.message)
375
558
  }
376
559
 
377
560
  if (def.minLength != null) {
@@ -381,28 +564,45 @@ export function interpolateRecursive<Schema extends z.ZodFirstPartySchemaTypes>(
381
564
  return toInterpolatableSchema(z.union([interpolationSchemaFull, replacement]))
382
565
  }
383
566
  case z.ZodFirstPartyTypeKind.ZodDefault: {
384
- const replacement = toInterpolatableSchema<Schema>(
385
- interpolateRecursive(def.innerType),
386
- ).default(def.defaultValue())
567
+ const replacement = zodStableJsonDefault(
568
+ toInterpolatableSchema<Schema>(interpolateRecursive(def.innerType)),
569
+ def.defaultValue(),
570
+ )
387
571
 
388
572
  return toInterpolatableSchema(
389
573
  def.description ? replacement.describe(def.description) : replacement,
390
574
  )
391
575
  }
392
576
  case z.ZodFirstPartyTypeKind.ZodEffects:
577
+ return toInterpolatableSchema(
578
+ z.union(
579
+ [
580
+ def.schema instanceof z.ZodString
581
+ ? interpolationSchemaPartial
582
+ : interpolationSchemaFull,
583
+ schema,
584
+ ],
585
+ def,
586
+ ),
587
+ )
393
588
  case z.ZodFirstPartyTypeKind.ZodEnum:
394
589
  case z.ZodFirstPartyTypeKind.ZodLiteral:
395
590
  return toInterpolatableSchema(z.union([interpolationSchemaFull, schema], def))
396
591
  case z.ZodFirstPartyTypeKind.ZodNumber:
592
+ if (!(schema instanceof z.ZodNumber)) {
593
+ throw new Error('A ZodNumber definition must belong to a ZodNumber schema')
594
+ }
397
595
  return toInterpolatableSchema(
398
596
  z.union(
399
597
  [
400
- z
401
- .string()
402
- .regex(/^\d+(\.\d+)?$/)
403
- .transform((value) => Number(value)),
598
+ zodInputPreservingTransform(z.string().regex(/^[0-9]+(\.[0-9]+)?$/u), (value) =>
599
+ Number(value),
600
+ ),
404
601
  interpolationSchemaFull,
405
- schema,
602
+ zodWithJsonInputSchema(
603
+ zodInputPreservingTransform(schema, (value) => value),
604
+ schema.finite(),
605
+ ),
406
606
  ],
407
607
  def,
408
608
  ),
@@ -460,11 +660,21 @@ export function interpolateRecursive<Schema extends z.ZodFirstPartySchemaTypes>(
460
660
  }
461
661
  }
462
662
 
663
+ /** Interpolate a schema while preserving stable API-description ownership metadata. */
664
+ export function interpolateRecursive<Schema extends z.ZodFirstPartySchemaTypes>(
665
+ schema: Schema,
666
+ ): InterpolatableSchema<Schema> {
667
+ const interpolated = interpolateRecursiveWithoutDescriptionRegistration(schema)
668
+ return toInterpolatableSchema(inheritApiParameterDescription(schema, interpolated))
669
+ }
670
+
463
671
  /**
464
672
  * The robot keys specified in this array can’t be interpolated.
465
673
  */
466
674
  const uninterpolatableKeys = ['interpolate', 'robot', 'use'] as const
467
675
  const uninterpolatableKeySet = new Set<string>(uninterpolatableKeys)
676
+ const robotIdentifierDescription =
677
+ 'Identifier of the [robot](https://transloadit.com/docs/robots/) to execute'
468
678
 
469
679
  type InterpolatableRobot<Schema extends z.ZodObject<z.ZodRawShape>> =
470
680
  Schema extends z.ZodObject<infer T, infer UnknownKeys, infer Catchall>
@@ -479,18 +689,31 @@ type InterpolatableRobot<Schema extends z.ZodObject<z.ZodRawShape>> =
479
689
  >
480
690
  : never
481
691
 
692
+ const robotDocumentationSchemas = new WeakMap<z.ZodTypeAny, z.ZodObject<z.ZodRawShape>>()
693
+
694
+ /** Recover the public schema before interpolation adds wire-only alternatives and generic copy. */
695
+ export function getRobotDocumentationSchema(
696
+ schema: z.ZodObject<z.ZodRawShape>,
697
+ ): z.ZodObject<z.ZodRawShape> {
698
+ return robotDocumentationSchemas.get(schema) ?? schema
699
+ }
700
+
482
701
  export function interpolateRobot<Schema extends z.ZodObject<z.ZodRawShape>>(
483
702
  schema: Schema,
484
703
  ): InterpolatableRobot<Schema> {
485
704
  const def = schema._def
486
- return toInterpolatableRobot(
705
+ const interpolated = toInterpolatableRobot<Schema>(
487
706
  z
488
707
  .object(
489
708
  Object.fromEntries(
490
709
  Object.entries(def.shape()).map(([key, nested]) => [
491
710
  key,
492
711
  uninterpolatableKeySet.has(key)
493
- ? nested
712
+ ? key === 'robot'
713
+ ? nested.description == null
714
+ ? nested.describe(robotIdentifierDescription)
715
+ : nested
716
+ : nested
494
717
  : interpolateRecursive(toFirstPartySchema(nested)),
495
718
  ]),
496
719
  ),
@@ -498,21 +721,26 @@ export function interpolateRobot<Schema extends z.ZodObject<z.ZodRawShape>>(
498
721
  )
499
722
  .strict(),
500
723
  )
724
+ robotDocumentationSchemas.set(interpolated, schema)
725
+ return interpolated
501
726
  }
502
727
 
503
- const robotInterpolateBooleanSchema = z
504
- .union([z.boolean(), booleanStringSchema])
505
- .transform((value) => value === true || value === 'true')
728
+ const robotInterpolateBooleanSchema = zodInputPreservingTransform(
729
+ z.union([z.boolean(), booleanStringSchema]),
730
+ (value) => value === true || value === 'true',
731
+ )
506
732
 
507
- export const robotInterpolateSchema = z
508
- .union([robotInterpolateBooleanSchema, z.record(robotInterpolateBooleanSchema)])
509
- .describe(`
733
+ const robotInterpolateDescription = `
510
734
  Controls whether Assembly Variables are interpolated for individual instruction fields.
511
735
 
512
736
  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.
513
737
 
514
738
  Use field names such as \`path\`, or dotted paths such as \`ffmpeg.vf\` for nested objects.
515
- `)
739
+ `
740
+
741
+ export const robotInterpolateSchema = z
742
+ .union([robotInterpolateBooleanSchema, z.record(robotInterpolateBooleanSchema)])
743
+ .describe(robotInterpolateDescription)
516
744
 
517
745
  /**
518
746
  * Fields that are shared by all Transloadit robots.
@@ -524,12 +752,7 @@ export const robotOutputMetaSchema = z.union([
524
752
  ])
525
753
  export type RobotOutputMeta = z.infer<typeof robotOutputMetaSchema>
526
754
 
527
- export type RobotBase = z.infer<typeof robotBase>
528
- export const robotBase = z
529
- .object({
530
- interpolate: robotInterpolateSchema.optional(),
531
-
532
- output_meta: robotOutputMetaSchema.optional().describe(`
755
+ const robotOutputMetaDescription = `
533
756
  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.
534
757
 
535
758
  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.
@@ -538,31 +761,100 @@ For images, you can also add \`"blurhash": true\` to extract a [BlurHash](https:
538
761
 
539
762
  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.
540
763
 
541
- For videos, you can add the \`"colorspace: true"\` parameter to extract the colorspace of the output video.
764
+ 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.
765
+
766
+ For videos, you can add the \`"colorspace": true\` parameter to extract the colorspace of the output video.
542
767
 
543
768
  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.
544
769
 
545
770
  For audio, you can add \`"mean_volume": true\` to get a single value representing the mean average volume of the audio file.
546
771
 
547
772
  You can also set this to \`false\` to skip metadata extraction and speed up transcoding.
548
- `),
773
+ `
549
774
 
550
- result: z
551
- .boolean()
552
- .default(false)
553
- .describe('Whether the results of this Step should be present in the Assembly Status JSON'),
775
+ 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`
554
776
 
555
- queue: z
556
- .enum(['batch'])
557
- .optional()
558
- .describe(
559
- `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`,
560
- ),
777
+ const robotIgnoreErrorsPhaseDescriptions = `Ignore errors during specific phases of processing.
561
778
 
562
- force_accept: z
563
- .boolean()
564
- .default(false)
565
- .describe(`Force a Robot to accept a file type it would have ignored.
779
+ Setting this to \`["meta"]\` will cause the Robot to ignore errors during metadata extraction.
780
+
781
+ Setting this to \`["execute"]\` will cause the Robot to ignore errors during the main execution phase.`
782
+
783
+ export const autoProviderDescription = 'Chooses the best provider based on your request.'
784
+
785
+ const aiProviderDescription = `${autoProviderDescription}
786
+
787
+ Select a specific provider to override automatic selection.`
788
+
789
+ const legacyFfmpegVersions = formatEnglishList(
790
+ runtimeStackVersions.ffmpeg.valid.map((version) => JSON.stringify(version)),
791
+ )
792
+ const deprecatedFfmpegVersions = formatEnglishList([
793
+ ...new Set(
794
+ Object.keys(runtimeStackVersions.ffmpeg.deprecated).map((version) =>
795
+ JSON.stringify(`${version.split('.')[0]}.x`),
796
+ ),
797
+ ),
798
+ ])
799
+
800
+ export const robotParameterDocs = {
801
+ adaptive_filtering: {
802
+ description: `
803
+ 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.
804
+ `,
805
+ },
806
+ ai_provider: {
807
+ description: aiProviderDescription,
808
+ },
809
+ audio_bitrate: {
810
+ description: `
811
+ 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.
812
+ `,
813
+ },
814
+
815
+ audio_preset: {
816
+ description: `
817
+ Performs conversion using pre-configured settings.
818
+
819
+ 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.
820
+
821
+ For a list of audio presets, see [audio presets](/docs/presets/audio/).
822
+ `,
823
+ },
824
+
825
+ audio_sample_rate: {
826
+ description: `
827
+ Sample rate of the resulting audio file, in Hertz. If not specified will default to the sample rate of the input audio file.
828
+ `,
829
+ },
830
+
831
+ auto_provider: {
832
+ description: autoProviderDescription,
833
+ },
834
+ error_msg: {
835
+ description: `
836
+ The error message shown to your users (such as by Uppy) when a file is declined and \`error_on_decline\` is set to \`true\`.
837
+ `,
838
+ },
839
+
840
+ error_on_decline: {
841
+ description: `
842
+ If this is set to \`true\` and one or more files are declined, the Assembly will be stopped and marked with an error.
843
+ `,
844
+ },
845
+
846
+ ffmpeg: {
847
+ description: `
848
+ 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.
849
+ `,
850
+ },
851
+ ffmpeg_stack: {
852
+ description: `
853
+ 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.
854
+ `,
855
+ },
856
+ force_accept: {
857
+ description: `Force a Robot to accept a file type it would have ignored.
566
858
 
567
859
  By default, Robots ignore files they are not familiar with.
568
860
  [🤖/video/encode](/docs/robots/video-encode/), for
@@ -570,24 +862,282 @@ example, will happily ignore input images.
570
862
 
571
863
  With the \`force_accept\` parameter set to \`true\`, you can force Robots to accept all files thrown at them.
572
864
  This will typically lead to errors and should only be used for debugging or combatting edge cases.
573
- `),
865
+ `,
866
+ },
867
+ force_name: {
868
+ description:
869
+ 'Custom name for the imported file(s). By default file names are derived from the source.',
870
+ },
871
+ ignore_errors: {
872
+ description: `
873
+ ${robotIgnoreErrorsPhaseDescriptions}
574
874
 
575
- ignore_errors: z
576
- .union([z.boolean(), z.array(z.enum(['meta', 'execute']))])
577
- .transform((value) => (value === true ? ['meta', 'execute'] : value === false ? [] : value))
578
- .default([])
579
- .describe(`
580
- Ignore errors during specific phases of processing.
875
+ Setting this to \`true\` is equivalent to \`["meta", "execute"]\` and will ignore errors in both phases.
876
+ `,
877
+ },
878
+ import_ignore_errors: {
879
+ description: `
880
+ ${robotIgnoreErrorsPhaseDescriptions}
581
881
 
582
- Setting this to \`["meta"]\` will cause the Robot to ignore errors during metadata extraction.
882
+ 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.
883
+
884
+ Setting this to \`true\` is equivalent to \`["meta", "import", "execute"]\` and will ignore errors in all three phases.
885
+ `,
886
+ },
887
+ import_on_errors: {
888
+ description: `
889
+ 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.
890
+ `,
891
+ },
892
+ interpolate: {
893
+ description: robotInterpolateDescription,
894
+ },
895
+ ocr_format: {
896
+ description: `
897
+ In what format to return the extracted text.
898
+ - \`"json"\` returns a JSON file.
899
+ - \`"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.
900
+ - \`"text"\` returns the recognized text as a plain UTF-8 encoded text file.
901
+ `,
902
+ },
903
+ ocr_granularity: {
904
+ description: `
905
+ 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"\`.
906
+ `,
907
+ },
908
+ ocr_provider: {
909
+ description: `${aiProviderDescription}
910
+ 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/).
911
+ `,
912
+ },
913
+ output_meta: {
914
+ description: robotOutputMetaDescription,
915
+ },
916
+ queue: {
917
+ description: robotQueueDescription,
918
+ },
919
+ result: {
920
+ description: 'Whether the results of this Step should be present in the Assembly Status JSON',
921
+ },
922
+ return_file_stubs: {
923
+ description: `
924
+ 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.
925
+ `,
926
+ },
927
+ robot: {
928
+ description: `
929
+ Specifies which Robot should process files passed to this Step.
930
+
931
+ See [all Robots](https://transloadit.com/docs/robots/), each with their own parameters, such as
932
+ \`width\` to control how an image is resized. The full list of parameters per Robot can be taken
933
+ from the Robot docs.
934
+ `,
935
+ },
936
+ seed: {
937
+ description: 'Seed for the random number generator.',
938
+ },
583
939
 
584
- Setting this to \`["execute"]\` will cause the Robot to ignore errors during the main execution phase.
940
+ sort_by: {
941
+ description: `
942
+ 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\`.
585
943
 
586
- Setting this to \`true\` is equivalent to \`["meta", "execute"]\` and will ignore errors in both phases.
587
- `),
944
+ The default \`"basename"\` keeps the legacy natural basename sorting behavior.
945
+
946
+ 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.
947
+ `,
948
+ },
949
+ use: {
950
+ description: `
951
+ Specifies which Step(s) to use as input.
952
+
953
+ - You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
954
+ - You can provide several Steps as input with arrays:
955
+ \`\`\`json
956
+ {
957
+ "use": [
958
+ ":original",
959
+ "encoded",
960
+ "resized"
961
+ ]
962
+ }
963
+ \`\`\`
964
+ - You can also tag input Steps with \`as\` to pass semantic intent to robots:
965
+ \`\`\`json
966
+ {
967
+ "use": [
968
+ {
969
+ "name": ":original",
970
+ "as": "image"
971
+ },
972
+ {
973
+ "name": ":original",
974
+ "as": "mask"
975
+ }
976
+ ]
977
+ }
978
+ \`\`\`
979
+
980
+ > [!Tip]
981
+ > That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
982
+ `,
983
+ },
984
+ user_meta: {
985
+ description: `
986
+ Adds custom JSON metadata to each emitted file without changing its contents. Nested objects and arrays are supported.
987
+
988
+ 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.
989
+
990
+ 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.
991
+
992
+ 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.
993
+ `,
994
+ },
995
+ video_background: {
996
+ description: `
997
+ 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.
998
+ `,
999
+ },
1000
+ video_height: {
1001
+ description: `
1002
+ Height of the new video, in pixels.
1003
+
1004
+ If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied height](/docs/presets/video/) will be implemented.
1005
+ `,
1006
+ },
1007
+ video_preset: {
1008
+ description: `
1009
+ Converts a video according to [pre-configured settings](/docs/presets/video/).
1010
+
1011
+ 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.
1012
+ `,
1013
+ },
1014
+ video_width: {
1015
+ description: `
1016
+ Width of the new video, in pixels.
1017
+
1018
+ If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied width](/docs/presets/video/) will be implemented.
1019
+ `,
1020
+ },
1021
+ } as const
1022
+
1023
+ export type RobotParameterDocId = keyof typeof robotParameterDocs
1024
+
1025
+ export const inputSortBySchema = z
1026
+ .enum(['auto', 'basename', 'import_order'])
1027
+ .default('basename')
1028
+ .describe(robotParameterDocs.sort_by.description)
1029
+
1030
+ export const robotPathSchema = z
1031
+ .string()
1032
+ .regex(/^\/[a-z0-9_-]+\/[a-z0-9_-]+$/u)
1033
+ .describe(robotParameterDocs.robot.description)
1034
+
1035
+ export type RobotBase = z.infer<typeof robotBase>
1036
+ export const robotBase = z
1037
+ .object({
1038
+ interpolate: robotInterpolateSchema.optional(),
1039
+
1040
+ output_meta: robotOutputMetaSchema
1041
+ .optional()
1042
+ .describe(robotParameterDocs.output_meta.description),
1043
+
1044
+ user_meta: z.record(z.unknown()).default({}).describe(robotParameterDocs.user_meta.description),
1045
+
1046
+ result: z.boolean().default(false).describe(robotParameterDocs.result.description),
1047
+
1048
+ queue: z.enum(['batch']).optional().describe(robotParameterDocs.queue.description),
1049
+
1050
+ force_accept: z.boolean().default(false).describe(robotParameterDocs.force_accept.description),
1051
+
1052
+ ignore_errors: zodInputPreservingTransform(
1053
+ z.union([z.boolean(), z.array(z.enum(['meta', 'execute']))]),
1054
+ (value) => (value === true ? ['meta', 'execute'] : value === false ? [] : value),
1055
+ )
1056
+ .default([])
1057
+ .describe(robotParameterDocs.ignore_errors.description),
588
1058
  })
589
1059
  .strict()
590
1060
 
1061
+ /**
1062
+ * Standard variants for strict Robot instructions without catchalls. Keep this outside the adapter
1063
+ * replaced by the SDK's Zod 4 sync. Inference uses the active Zod version's object types.
1064
+ */
1065
+ export function createRobotSchemaVariants<Shape extends z.ZodRawShape & { result: z.ZodType }>(
1066
+ schema: z.ZodObject<Shape>,
1067
+ ) {
1068
+ const strictSchema = schema.strict()
1069
+ const result: Shape['result'] = schema.shape.result
1070
+ const withHiddenFields = strictSchema
1071
+ .merge(z.object({ result: z.union([z.literal('debug'), result]).optional() }))
1072
+ .strict()
1073
+ return {
1074
+ schema,
1075
+ withHiddenFields,
1076
+ interpolatable: interpolateRobot(strictSchema),
1077
+ interpolatableWithHiddenFields: interpolateRobot(withHiddenFields),
1078
+ }
1079
+ }
1080
+
1081
+ /** Standard strict variants with extra internal fields. */
1082
+ export function extendRobotSchemaVariants<
1083
+ Shape extends z.ZodRawShape & { result: z.ZodType },
1084
+ HiddenShape extends z.ZodRawShape,
1085
+ >(schema: z.ZodObject<Shape>, hiddenFields: HiddenShape) {
1086
+ const strictSchema = schema.strict()
1087
+ const result: Shape['result'] = schema.shape.result
1088
+ const withHiddenFields = strictSchema.extend({
1089
+ result: z.union([z.literal('debug'), result]).optional(),
1090
+ ...hiddenFields,
1091
+ })
1092
+ return {
1093
+ schema,
1094
+ withHiddenFields,
1095
+ interpolatable: interpolateRobot(strictSchema),
1096
+ interpolatableWithHiddenFields: interpolateRobot(withHiddenFields),
1097
+ }
1098
+ }
1099
+
1100
+ /**
1101
+ * Named definition types keep the SDK's emitted declarations small. Robot modules explicitly
1102
+ * reference their existing schema types instead of emitting another copy of each schema shape.
1103
+ */
1104
+ export type RobotDefinition<Shape extends z.ZodRawShape & { result: z.ZodType }> = ReturnType<
1105
+ typeof createRobotSchemaVariants<Shape>
1106
+ > & { meta: RobotMetaInput }
1107
+
1108
+ /** A Robot definition whose internal schema has additional fields. */
1109
+ export type RobotDefinitionWithHiddenFields<
1110
+ Shape extends z.ZodRawShape & { result: z.ZodType },
1111
+ HiddenShape extends z.ZodRawShape,
1112
+ > = ReturnType<typeof extendRobotSchemaVariants<Shape, HiddenShape>> & { meta: RobotMetaInput }
1113
+
1114
+ /** Existing schema variants for Robots that require custom construction. */
1115
+ export interface RobotSchemaPair<PublicSchema, InternalSchema> {
1116
+ meta: RobotMetaInput
1117
+ interpolatable: PublicSchema
1118
+ interpolatableWithHiddenFields: InternalSchema
1119
+ }
1120
+
1121
+ /** Define a strict Robot's schema variants together with its metadata. */
1122
+ export function defineRobot<Shape extends z.ZodRawShape & { result: z.ZodType }>(
1123
+ meta: RobotMetaInput,
1124
+ schema: z.ZodObject<Shape>,
1125
+ ): RobotDefinition<Shape> {
1126
+ return { meta, ...createRobotSchemaVariants(schema) }
1127
+ }
1128
+
1129
+ /** Define a strict Robot with extra internal fields and its metadata. */
1130
+ export function defineRobotWithHiddenFields<
1131
+ Shape extends z.ZodRawShape & { result: z.ZodType },
1132
+ HiddenShape extends z.ZodRawShape,
1133
+ >(
1134
+ meta: RobotMetaInput,
1135
+ schema: z.ZodObject<Shape>,
1136
+ hiddenFields: HiddenShape,
1137
+ ): RobotDefinitionWithHiddenFields<Shape, HiddenShape> {
1138
+ return { meta, ...extendRobotSchemaVariants(schema, hiddenFields) }
1139
+ }
1140
+
591
1141
  export const useParamObjectSchema = z
592
1142
  .object({
593
1143
  name: z.string(),
@@ -653,42 +1203,7 @@ export const robotUse = z
653
1203
  .object({
654
1204
  use: z
655
1205
  .union([useParamStepsSchema, useParamObjectOfStepsSchema])
656
- .describe(
657
- `
658
- Specifies which Step(s) to use as input.
659
-
660
- - You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
661
- - You can provide several Steps as input with arrays:
662
- \`\`\`json
663
- {
664
- "use": [
665
- ":original",
666
- "encoded",
667
- "resized"
668
- ]
669
- }
670
- \`\`\`
671
- - You can also tag an input Step with \`as\` to pass semantic intent to robots:
672
- - You can also tag input Steps with \`as\` to pass semantic intent to robots:
673
- \`\`\`json
674
- {
675
- "use": [
676
- {
677
- "name": ":original",
678
- "as": "image"
679
- },
680
- {
681
- "name": ":original",
682
- "as": "mask"
683
- }
684
- ]
685
- }
686
- \`\`\`
687
-
688
- > [!Tip]
689
- > That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
690
- `,
691
- )
1206
+ .describe(robotParameterDocs.use.description)
692
1207
  .optional(),
693
1208
  })
694
1209
  .strict()
@@ -698,61 +1213,26 @@ export const robotUseWithHiddenFields = z
698
1213
  .object({
699
1214
  use: z
700
1215
  .union([useParamStepsWithHiddenFieldsSchema, useParamObjectOfStepsWithHiddenFieldsSchema])
701
- .describe(
702
- `
703
- Specifies which Step(s) to use as input.
704
-
705
- - You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
706
- - You can provide several Steps as input with arrays:
707
- \`\`\`json
708
- {
709
- "use": [
710
- ":original",
711
- "encoded",
712
- "resized"
713
- ]
714
- }
715
- \`\`\`
716
- - You can also tag an input Step with \`as\` to pass semantic intent to robots:
717
- - You can also tag input Steps with \`as\` to pass semantic intent to robots:
718
- \`\`\`json
719
- {
720
- "use": [
721
- {
722
- "name": ":original",
723
- "as": "image"
724
- },
725
- {
726
- "name": ":original",
727
- "as": "mask"
728
- }
729
- ]
730
- }
731
- \`\`\`
732
-
733
- > [!Tip]
734
- > That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
735
- `,
736
- )
1216
+ .describe(robotParameterDocs.use.description)
737
1217
  .optional(),
738
1218
  })
739
1219
  .strict()
740
1220
 
741
- export const complexWidthSchema = z.preprocess((val) => {
742
- if (typeof val === 'string' && val.startsWith('${')) {
743
- return val
744
- }
745
- if (typeof val === 'string') {
746
- const num = Number.parseInt(val, 10)
747
- if (Number.isNaN(num) || val.includes('x')) {
748
- return val
749
- }
750
- return num
751
- }
752
- return val
753
- }, z.number().int().min(1).max(25_000))
1221
+ const complexDimensionNumberSchema = z.number().int().min(1).max(25_000)
1222
+ const complexDimensionStringSchema = z
1223
+ .string()
1224
+ .regex(
1225
+ new RegExp(
1226
+ `^${ecmaWhitespaceCharacterClass}*\\+?0*(?:[1-9][0-9]{0,3}|1[0-9]{4}|2[0-4][0-9]{3}|25000)(?:[^0-9x][^x]*)?$`,
1227
+ 'u',
1228
+ ),
1229
+ )
1230
+ const complexDimensionInputSchema = z.union([
1231
+ complexDimensionNumberSchema,
1232
+ complexDimensionStringSchema,
1233
+ ])
754
1234
 
755
- export const complexHeightSchema = z.preprocess((val) => {
1235
+ function normalizeComplexDimension(val: unknown): unknown {
756
1236
  if (typeof val === 'string' && val.startsWith('${')) {
757
1237
  return val
758
1238
  }
@@ -764,7 +1244,17 @@ export const complexHeightSchema = z.preprocess((val) => {
764
1244
  return num
765
1245
  }
766
1246
  return val
767
- }, z.number().int().min(1).max(25_000))
1247
+ }
1248
+
1249
+ export const complexWidthSchema = zodWithJsonInputSchema(
1250
+ z.preprocess(normalizeComplexDimension, complexDimensionNumberSchema),
1251
+ complexDimensionInputSchema,
1252
+ )
1253
+
1254
+ export const complexHeightSchema = zodWithJsonInputSchema(
1255
+ z.preprocess(normalizeComplexDimension, complexDimensionNumberSchema),
1256
+ complexDimensionInputSchema,
1257
+ )
768
1258
 
769
1259
  /**
770
1260
  * A robot that uses FFmpeg.
@@ -879,17 +1369,16 @@ export const robotFFmpeg = z.object({
879
1369
  })
880
1370
  .passthrough()
881
1371
  .optional()
882
- .describe(`
883
- 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.
884
- `),
1372
+ .describe(robotParameterDocs.ffmpeg.description),
885
1373
 
886
1374
  ffmpeg_stack: z
887
1375
  // Any semver in range is allowed and normalized. The enum is used for editor completions.
888
- .union([z.enum(['v6', 'v7', 'v8']), z.string().regex(/^v?[5-8](\.\d+)?(\.\d+)?$/)])
889
- .default('v6.0.0')
890
- .describe(`
891
- 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.
892
- `),
1376
+ .union([
1377
+ z.enum(stackVersions.ffmpeg.suggestedValues),
1378
+ z.string().regex(stackVersions.ffmpeg.test),
1379
+ ])
1380
+ .default(runtimeStackVersions.ffmpeg.default)
1381
+ .describe(robotParameterDocs.ffmpeg_stack.description),
893
1382
  })
894
1383
 
895
1384
  /**
@@ -900,8 +1389,8 @@ Selects the FFmpeg stack version to use for encoding. These versions reflect rea
900
1389
  * @returns
901
1390
  * The hyphenated preset.
902
1391
  */
903
- function transformPreset<T extends string>(preset: T): Replace<T, '_', '-', { all: true }> {
904
- return preset.replaceAll('_', '-') as Replace<T, '_', '-', { all: true }>
1392
+ function transformPreset<T extends string>(preset: T): StringReplaceAll<T, '_', '-'> {
1393
+ return preset.replaceAll('_', '-') as StringReplaceAll<T, '_', '-'>
905
1394
  }
906
1395
 
907
1396
  /**
@@ -989,17 +1478,9 @@ const audioPresets = createPresets([
989
1478
  export type FFmpegAudio = z.infer<typeof robotFFmpegAudio>
990
1479
  export const robotFFmpegAudio = robotFFmpeg
991
1480
  .extend({
992
- preset: z
993
- .enum(audioPresets)
994
- .transform(transformPreset)
1481
+ preset: zodInputPreservingTransform(z.enum(audioPresets), transformPreset)
995
1482
  .optional()
996
- .describe(`
997
- Performs conversion using pre-configured settings.
998
-
999
- 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.
1000
-
1001
- For a list of audio presets, see [audio presets](/docs/presets/audio/).
1002
- `),
1483
+ .describe(robotParameterDocs.audio_preset.description),
1003
1484
  })
1004
1485
  .strict()
1005
1486
 
@@ -1009,28 +1490,10 @@ For a list of audio presets, see [audio presets](/docs/presets/audio/).
1009
1490
  export type FFmpegVideo = z.infer<typeof robotFFmpegVideo>
1010
1491
  export const robotFFmpegVideo = robotFFmpeg
1011
1492
  .extend({
1012
- width: z
1013
- .number()
1014
- .int()
1015
- .min(1)
1016
- .nullish()
1017
- .describe(`
1018
- Width of the new video, in pixels.
1019
-
1020
- If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied width](/docs/presets/video/) will be implemented.
1021
- `),
1022
- height: z
1023
- .number()
1024
- .int()
1025
- .min(1)
1026
- .nullish()
1027
- .describe(`
1028
- Height of the new video, in pixels.
1029
-
1030
- If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied height](/docs/presets/video/) will be implemented.
1031
- `),
1032
- preset: z
1033
- .enum([
1493
+ width: z.number().int().min(1).nullish().describe(robotParameterDocs.video_width.description),
1494
+ height: z.number().int().min(1).nullish().describe(robotParameterDocs.video_height.description),
1495
+ preset: zodInputPreservingTransform(
1496
+ z.enum([
1034
1497
  ...createPresets([
1035
1498
  'android',
1036
1499
  'android-high',
@@ -1125,14 +1588,11 @@ If the value is not specified and the \`preset\` parameter is available, the \`p
1125
1588
  'wmv',
1126
1589
  ]),
1127
1590
  ...audioPresets,
1128
- ])
1129
- .transform(transformPreset)
1591
+ ]),
1592
+ transformPreset,
1593
+ )
1130
1594
  .optional()
1131
- .describe(`
1132
- Converts a video according to [pre-configured settings](/docs/presets/video/).
1133
-
1134
- 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.
1135
- `),
1595
+ .describe(robotParameterDocs.video_preset.description),
1136
1596
  })
1137
1597
  .strict()
1138
1598
 
@@ -1173,13 +1633,74 @@ export const page_number = z.number().int().default(1)
1173
1633
 
1174
1634
  export const recursive = z.boolean().default(false)
1175
1635
 
1636
+ export const bucketImportPath = path.describe(`
1637
+ 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\`.
1638
+
1639
+ 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/\`.
1640
+
1641
+ Directories are **not** imported recursively. If you want to import files from subdirectories and sub-subdirectories, enable the \`recursive\` parameter.
1642
+
1643
+ 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.\`
1644
+
1645
+ You can also use an array of path strings here to import multiple paths in the same <dfn>Robot</dfn>'s <dfn>Step</dfn>.
1646
+ `)
1647
+
1648
+ export const storeFilePath = z
1649
+ .string()
1650
+ .default('${unique_prefix}/${file.url_name}')
1651
+ .describe(`
1652
+ 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.
1653
+ `)
1654
+
1655
+ export const recursiveImportPageNumber = page_number.describe(`
1656
+ 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\`.
1657
+
1658
+ 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.
1659
+ `)
1660
+
1661
+ export const signedSslUrlLifetime = z
1662
+ .number()
1663
+ .int()
1664
+ .min(0)
1665
+ .optional()
1666
+ .describe(`
1667
+ 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.
1668
+ `)
1669
+
1670
+ export const recursiveImportPageSize = files_per_page.describe(`
1671
+ The pagination page size. This only works when recursive is \`true\` for now, in order to not break backwards compatibility in non-recursive imports.
1672
+ `)
1673
+
1674
+ const bucketRegion = z
1675
+ .string()
1676
+ .optional()
1677
+ .describe(`
1678
+ The region where the bucket is located.
1679
+ `)
1680
+
1681
+ export const storePath = z
1682
+ .string()
1683
+ .default('${unique_prefix}/${file.url_name}')
1684
+ .describe(`
1685
+ The path at which the file is to be stored. This may include any available [Assembly variables](/docs/topics/assembly-instructions/#assembly-variables).
1686
+ `)
1687
+
1688
+ export const storageAcl = z
1689
+ .enum(['private', 'public-read'])
1690
+ .default('public-read')
1691
+ .describe(`
1692
+ The permissions used for this file.
1693
+ `)
1694
+
1695
+ export const recursiveImport = recursive.describe(`
1696
+ Setting this to \`true\` will enable importing files from subdirectories and sub-subdirectories (etc.) of the given path.
1697
+
1698
+ Please use the pagination parameters \`page_number\` and \`files_per_page\` wisely here.
1699
+ `)
1700
+
1176
1701
  export const return_file_stubs = z
1177
1702
  .boolean()
1178
- .describe(
1179
- `
1180
- 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.
1181
- `,
1182
- )
1703
+ .describe(robotParameterDocs.return_file_stubs.description)
1183
1704
  .default(false)
1184
1705
 
1185
1706
  export const port = z.number().int().min(1).max(65535)
@@ -1203,16 +1724,34 @@ export const positionSchema = z.enum([
1203
1724
  'top-right',
1204
1725
  ])
1205
1726
 
1206
- export const percentageSchema = z.string().regex(/^\d+%$/)
1727
+ export const percentageSchema = z.string().regex(/^[0-9]+%$/u)
1728
+
1729
+ const portableHttpUrlPattern = /^[Hh][Tt][Tt][Pp][Ss]?:\/\/(?:[^ ]|[ ])/u
1207
1730
 
1208
- export const httpUrlSchema = z
1731
+ const portableHttpUrlInputSchema = z
1209
1732
  .string()
1210
- .url()
1211
- .regex(/^https?:\/\//i)
1733
+ .regex(portableHttpUrlPattern, 'Must be an HTTP or HTTPS URL')
1734
+
1735
+ export const httpUrlSchema = zodWithConservativeJsonInputSchema(
1736
+ z
1737
+ .string()
1738
+ .url()
1739
+ .refine((value) => /^https?:\/\//iu.test(value), 'Must be an HTTP or HTTPS URL'),
1740
+ portableHttpUrlInputSchema,
1741
+ )
1212
1742
 
1213
- export const color_with_alpha = z.string().regex(/^#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/)
1743
+ /** Header restrictions shared by HTTP import and request documentation. */
1744
+ 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.
1214
1745
 
1215
- export const color_without_alpha = z.string().regex(/^#?[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/)
1746
+ 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.`
1747
+
1748
+ export const color_with_alpha = z.string().regex(/^#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/u)
1749
+
1750
+ export const color_without_alpha = z.string().regex(/^#?[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/u)
1751
+
1752
+ export const videoBackgroundSchema = color_with_alpha
1753
+ .default('#00000000')
1754
+ .describe(robotParameterDocs.video_background.description)
1216
1755
 
1217
1756
  // Extended color schemas that also support named colors (for robots that support them)
1218
1757
  export const color_with_alpha_with_named = z.union([
@@ -1257,17 +1796,18 @@ export const bitrateSchema = z.number().int().min(1)
1257
1796
 
1258
1797
  export const sampleRateSchema = z.number().int().min(1)
1259
1798
 
1260
- export const optimize_priority = z
1261
- .enum(['compression-ratio', 'conversion-speed'])
1262
- .default('conversion-speed')
1799
+ export const optimize_priority = z.enum(['compression-ratio', 'conversion-speed'])
1263
1800
 
1264
1801
  export type ImagemagickRobot = z.infer<typeof robotImagemagick>
1265
1802
  export const robotImagemagick = z
1266
1803
  .object({
1267
1804
  imagemagick_stack: z
1268
1805
  // Any semver in range is allowed and normalized. The enum is used for editor completions.
1269
- .union([z.enum(['v3']), z.string().regex(/^v?[23](\.\d+)?(\.\d+)?$/)])
1270
- .default('v3'),
1806
+ .union([
1807
+ z.enum([stackVersions.imagemagick.recommendedVersion]),
1808
+ z.string().regex(stackVersions.imagemagick.test),
1809
+ ])
1810
+ .default(runtimeStackVersions.imagemagick.default),
1271
1811
  })
1272
1812
  .strict()
1273
1813
 
@@ -1309,19 +1849,18 @@ export const colorspaceSchema = z.enum([
1309
1849
  'YUV',
1310
1850
  ])
1311
1851
 
1852
+ export const imageAdaptiveFilteringSchema = z
1853
+ .boolean()
1854
+ .default(false)
1855
+ .describe(robotParameterDocs.adaptive_filtering.description)
1856
+
1857
+ export const imageQualityValueSchema = z.number().int().min(1).max(100)
1858
+
1312
1859
  // TODO: add before and after images to the description.
1313
- export const imageQualitySchema = z
1314
- .number()
1315
- .int()
1316
- .min(1)
1317
- .max(100)
1318
- .default(92)
1319
- .describe(`
1860
+ export const imageQualitySchema = imageQualityValueSchema.default(92).describe(`
1320
1861
  Controls the image compression for JPG and PNG images. Please also take a look at [🤖/image/optimize](/docs/robots/image-optimize/).
1321
1862
  `)
1322
1863
 
1323
- export const autoProviderDescription = 'Chooses the best provider based on your request'
1324
-
1325
1864
  export const awsGcpAiProviderSchema = z.enum(['auto', 'aws', 'gcp']).default('auto')
1326
1865
 
1327
1866
  export const aiProviderSchema = z
@@ -1340,21 +1879,17 @@ export const robotImport = z
1340
1879
  .union([z.string(), z.array(z.string())])
1341
1880
  .nullable()
1342
1881
  .default(null)
1343
- .describe(
1344
- 'Custom name for the imported file(s). By default file names are derived from the source.',
1345
- ),
1346
- ignore_errors: z
1347
- .union([z.boolean(), z.array(z.enum(['meta', 'import', 'execute']))])
1348
- .transform((value) =>
1349
- value === true ? ['meta', 'import', 'execute'] : value === false ? [] : value,
1350
- )
1351
- .default([]),
1882
+ .describe(robotParameterDocs.force_name.description),
1883
+ ignore_errors: zodInputPreservingTransform(
1884
+ z.union([z.boolean(), z.array(z.enum(['meta', 'import', 'execute']))]),
1885
+ (value) => (value === true ? ['meta', 'import', 'execute'] : value === false ? [] : value),
1886
+ )
1887
+ .default([])
1888
+ .describe(robotParameterDocs.import_ignore_errors.description),
1352
1889
  import_on_errors: z
1353
1890
  .array(z.enum(['meta']))
1354
1891
  .default([])
1355
- .describe(`
1356
- 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.
1357
- `),
1892
+ .describe(robotParameterDocs.import_on_errors.description),
1358
1893
  })
1359
1894
  .strict()
1360
1895
 
@@ -1442,7 +1977,7 @@ export const cloudflareBase = z
1442
1977
  .string()
1443
1978
  .optional()
1444
1979
  .describe(`
1445
- 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.
1980
+ 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.
1446
1981
 
1447
1982
  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"\`.
1448
1983
  `),
@@ -1560,17 +2095,12 @@ export const megaBase = z
1560
2095
  .string()
1561
2096
  .optional()
1562
2097
  .describe(`
1563
- 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.
2098
+ 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.
1564
2099
 
1565
2100
  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"\`.
1566
2101
  `),
1567
2102
  bucket: z.string().optional(),
1568
- bucket_region: z
1569
- .string()
1570
- .optional()
1571
- .describe(`
1572
- The region where the bucket is located.
1573
- `),
2103
+ bucket_region: bucketRegion,
1574
2104
  host: z.string().optional(),
1575
2105
  key: z.string().optional(),
1576
2106
  secret: z.string().optional(),
@@ -1584,7 +2114,7 @@ export const s3Base = z
1584
2114
  .string()
1585
2115
  .optional()
1586
2116
  .describe(`
1587
- 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.
2117
+ 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\`.
1588
2118
 
1589
2119
  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"\`.
1590
2120
  `),
@@ -1627,12 +2157,7 @@ While we recommend to use <dfn>Template Credentials</dfn> at all times, some use
1627
2157
  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"\`.
1628
2158
  `),
1629
2159
  bucket: z.string().optional(),
1630
- bucket_region: z
1631
- .string()
1632
- .optional()
1633
- .describe(`
1634
- The region where the bucket is located.
1635
- `),
2160
+ bucket_region: bucketRegion,
1636
2161
  host: z.string().optional(),
1637
2162
  key: z.string().optional(),
1638
2163
  secret: z.string().optional(),
@@ -1646,18 +2171,17 @@ export const swiftBase = z
1646
2171
  .string()
1647
2172
  .optional()
1648
2173
  .describe(`
1649
- 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.
2174
+ 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.
1650
2175
 
1651
2176
  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"\`.
1652
2177
  `),
1653
2178
  bucket: z.string().optional(),
1654
- bucket_region: z
2179
+ host: z
1655
2180
  .string()
1656
2181
  .optional()
1657
2182
  .describe(`
1658
- The region where the bucket is located.
2183
+ The S3-compatible object storage endpoint for the OpenStack Swift service. This is required when supplying dynamic credentials directly instead of using Template Credentials.
1659
2184
  `),
1660
- host: z.string().optional(),
1661
2185
  key: z.string().optional(),
1662
2186
  secret: z.string().optional(),
1663
2187
  })
@@ -1670,17 +2194,12 @@ export const tigrisBase = z
1670
2194
  .string()
1671
2195
  .optional()
1672
2196
  .describe(`
1673
- 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.
2197
+ 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.
1674
2198
 
1675
2199
  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"\`.
1676
2200
  `),
1677
2201
  bucket: z.string().optional(),
1678
- bucket_region: z
1679
- .string()
1680
- .optional()
1681
- .describe(`
1682
- The region where the bucket is located.
1683
- `),
2202
+ bucket_region: bucketRegion,
1684
2203
  host: z.string().optional(),
1685
2204
  key: z.string().optional(),
1686
2205
  secret: z.string().optional(),
@@ -1699,12 +2218,7 @@ Please create your associated <dfn>Template Credentials</dfn> in your Transloadi
1699
2218
  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"\`.
1700
2219
  `),
1701
2220
  bucket: z.string().optional(),
1702
- bucket_region: z
1703
- .string()
1704
- .optional()
1705
- .describe(`
1706
- The region where the bucket is located.
1707
- `),
2221
+ bucket_region: bucketRegion,
1708
2222
  host: z.string().optional(),
1709
2223
  key: z.string().optional(),
1710
2224
  secret: z.string().optional(),
@@ -1808,9 +2322,7 @@ You can also use a JSON string of such an object with coordinates in similar fas
1808
2322
  "{\\"x1\\": <Integer>, \\"y1\\": <Integer>, \\"x2\\": <Integer>, \\"y2\\": <Integer>}"
1809
2323
  \`\`\`
1810
2324
  `),
1811
- background: color_with_alpha.default('#00000000').describe(`
1812
- 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.
1813
- `),
2325
+ background: videoBackgroundSchema,
1814
2326
  rotate: z
1815
2327
  // We can’t use enum.
1816
2328
  // See https://github.com/colinhacks/zod/issues/2686
@@ -1964,3 +2476,22 @@ export interface NormalizedUse {
1964
2476
  group_by_original: boolean
1965
2477
  steps: NormalizedUseStep[]
1966
2478
  }
2479
+
2480
+ /** Public input and output types for a Robot's schema variants. */
2481
+ export type RobotSchemaVariantTypes<
2482
+ Variants extends {
2483
+ schema: z.ZodType
2484
+ withHiddenFields: z.ZodType
2485
+ interpolatable: z.ZodType
2486
+ interpolatableWithHiddenFields: z.ZodType
2487
+ },
2488
+ > = {
2489
+ output: z.output<Variants['schema']>
2490
+ input: z.input<Variants['schema']>
2491
+ hiddenOutput: z.output<Variants['withHiddenFields']>
2492
+ hiddenInput: z.input<Variants['withHiddenFields']>
2493
+ interpolatableOutput: z.output<Variants['interpolatable']>
2494
+ interpolatableInput: z.input<Variants['interpolatable']>
2495
+ interpolatableHiddenOutput: z.output<Variants['interpolatableWithHiddenFields']>
2496
+ interpolatableHiddenInput: z.input<Variants['interpolatableWithHiddenFields']>
2497
+ }