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