@transloadit/zod 4.4.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/v3/aiMessages.d.ts +33254 -0
- package/dist/v3/aiMessages.d.ts.map +1 -0
- package/dist/v3/aiMessages.js +478 -0
- package/dist/v3/apiParameterDescription.d.ts +14 -0
- package/dist/v3/apiParameterDescription.d.ts.map +1 -0
- package/dist/v3/apiParameterDescription.js +19 -0
- package/dist/v3/assemblyStatus.d.ts +5076 -62566
- package/dist/v3/assemblyStatus.d.ts.map +1 -1
- package/dist/v3/assemblyStatus.js +74 -55
- package/dist/v3/englishList.d.ts +3 -0
- package/dist/v3/englishList.d.ts.map +1 -0
- package/dist/v3/englishList.js +11 -0
- package/dist/v3/errorReason.d.ts +7 -0
- package/dist/v3/errorReason.d.ts.map +1 -0
- package/dist/v3/errorReason.js +13 -0
- package/dist/v3/file.d.ts +7 -0
- package/dist/v3/file.d.ts.map +1 -1
- package/dist/v3/file.js +15 -0
- package/dist/v3/fileHash.d.ts +16 -0
- package/dist/v3/fileHash.d.ts.map +1 -0
- package/dist/v3/fileHash.js +9 -0
- package/dist/v3/imagemagickDensity.d.ts.map +1 -1
- package/dist/v3/imagemagickDensity.js +2 -2
- package/dist/v3/index.d.ts +4 -0
- package/dist/v3/index.d.ts.map +1 -1
- package/dist/v3/index.js +4 -0
- package/dist/v3/lib/zodInputSemantics.d.ts +18 -0
- package/dist/v3/lib/zodInputSemantics.d.ts.map +1 -0
- package/dist/v3/lib/zodInputSemantics.js +85 -0
- package/dist/v3/object.d.ts +71 -0
- package/dist/v3/object.d.ts.map +1 -0
- package/dist/v3/object.js +195 -0
- package/dist/v3/responseErrors/HttpImportRobot.d.ts +23 -0
- package/dist/v3/responseErrors/HttpImportRobot.d.ts.map +1 -0
- package/dist/v3/responseErrors/HttpImportRobot.js +22 -0
- package/dist/v3/robots/_ai-models.d.ts +28 -0
- package/dist/v3/robots/_ai-models.d.ts.map +1 -0
- package/dist/v3/robots/_ai-models.js +79 -0
- package/dist/v3/robots/_index.d.ts +619 -1235
- package/dist/v3/robots/_index.d.ts.map +1 -1
- package/dist/v3/robots/_index.js +4 -0
- package/dist/v3/robots/_instructions-primitives.d.ts +513 -138
- package/dist/v3/robots/_instructions-primitives.d.ts.map +1 -1
- package/dist/v3/robots/_instructions-primitives.js +629 -280
- package/dist/v3/robots/ai-chat.d.ts +755 -1992
- package/dist/v3/robots/ai-chat.d.ts.map +1 -1
- package/dist/v3/robots/ai-chat.js +235 -367
- package/dist/v3/robots/assembly-savejson.d.ts +28 -16
- package/dist/v3/robots/assembly-savejson.d.ts.map +1 -1
- package/dist/v3/robots/assembly-savejson.js +2 -11
- package/dist/v3/robots/audio-artwork.d.ts +124 -111
- package/dist/v3/robots/audio-artwork.d.ts.map +1 -1
- package/dist/v3/robots/audio-artwork.js +9 -38
- package/dist/v3/robots/audio-concat.d.ts +114 -101
- package/dist/v3/robots/audio-concat.d.ts.map +1 -1
- package/dist/v3/robots/audio-concat.js +11 -25
- package/dist/v3/robots/audio-encode.d.ts +124 -111
- package/dist/v3/robots/audio-encode.d.ts.map +1 -1
- package/dist/v3/robots/audio-encode.js +13 -43
- package/dist/v3/robots/audio-loop.d.ts +124 -111
- package/dist/v3/robots/audio-loop.d.ts.map +1 -1
- package/dist/v3/robots/audio-loop.js +12 -40
- package/dist/v3/robots/audio-merge.d.ts +114 -101
- package/dist/v3/robots/audio-merge.d.ts.map +1 -1
- package/dist/v3/robots/audio-merge.js +11 -25
- package/dist/v3/robots/audio-split.d.ts +124 -111
- package/dist/v3/robots/audio-split.d.ts.map +1 -1
- package/dist/v3/robots/audio-split.js +15 -45
- package/dist/v3/robots/audio-waveform.d.ts +144 -131
- package/dist/v3/robots/audio-waveform.d.ts.map +1 -1
- package/dist/v3/robots/audio-waveform.js +15 -39
- package/dist/v3/robots/azure-import.d.ts +48 -35
- package/dist/v3/robots/azure-import.d.ts.map +1 -1
- package/dist/v3/robots/azure-import.js +5 -35
- package/dist/v3/robots/azure-store.d.ts +51 -35
- package/dist/v3/robots/azure-store.d.ts.map +1 -1
- package/dist/v3/robots/azure-store.js +11 -50
- package/dist/v3/robots/backblaze-import.d.ts +48 -35
- package/dist/v3/robots/backblaze-import.d.ts.map +1 -1
- package/dist/v3/robots/backblaze-import.js +6 -39
- package/dist/v3/robots/backblaze-store.d.ts +44 -31
- package/dist/v3/robots/backblaze-store.d.ts.map +1 -1
- package/dist/v3/robots/backblaze-store.js +8 -44
- package/dist/v3/robots/box-import.d.ts +44 -27
- package/dist/v3/robots/box-import.d.ts.map +1 -1
- package/dist/v3/robots/box-import.js +7 -33
- package/dist/v3/robots/box-store.d.ts +49 -32
- package/dist/v3/robots/box-store.d.ts.map +1 -1
- package/dist/v3/robots/box-store.js +8 -40
- package/dist/v3/robots/cloudfiles-import.d.ts +56 -43
- package/dist/v3/robots/cloudfiles-import.d.ts.map +1 -1
- package/dist/v3/robots/cloudfiles-import.js +8 -45
- package/dist/v3/robots/cloudfiles-store.d.ts +52 -39
- package/dist/v3/robots/cloudfiles-store.d.ts.map +1 -1
- package/dist/v3/robots/cloudfiles-store.js +5 -36
- package/dist/v3/robots/cloudflare-import.d.ts +48 -35
- package/dist/v3/robots/cloudflare-import.d.ts.map +1 -1
- package/dist/v3/robots/cloudflare-import.js +10 -57
- package/dist/v3/robots/cloudflare-store.d.ts +44 -31
- package/dist/v3/robots/cloudflare-store.d.ts.map +1 -1
- package/dist/v3/robots/cloudflare-store.js +11 -54
- package/dist/v3/robots/digitalocean-import.d.ts +48 -35
- package/dist/v3/robots/digitalocean-import.d.ts.map +1 -1
- package/dist/v3/robots/digitalocean-import.js +8 -49
- package/dist/v3/robots/digitalocean-store.d.ts +44 -31
- package/dist/v3/robots/digitalocean-store.d.ts.map +1 -1
- package/dist/v3/robots/digitalocean-store.js +8 -56
- package/dist/v3/robots/document-autorotate.d.ts +44 -31
- package/dist/v3/robots/document-autorotate.d.ts.map +1 -1
- package/dist/v3/robots/document-autorotate.js +5 -32
- package/dist/v3/robots/document-convert.d.ts +52 -39
- package/dist/v3/robots/document-convert.d.ts.map +1 -1
- package/dist/v3/robots/document-convert.js +7 -33
- package/dist/v3/robots/document-extract.d.ts +44 -31
- package/dist/v3/robots/document-extract.d.ts.map +1 -1
- package/dist/v3/robots/document-extract.js +10 -36
- package/dist/v3/robots/document-merge.d.ts +44 -31
- package/dist/v3/robots/document-merge.d.ts.map +1 -1
- package/dist/v3/robots/document-merge.js +4 -25
- package/dist/v3/robots/document-ocr.d.ts +52 -39
- package/dist/v3/robots/document-ocr.d.ts.map +1 -1
- package/dist/v3/robots/document-ocr.js +10 -47
- package/dist/v3/robots/document-optimize.d.ts +44 -31
- package/dist/v3/robots/document-optimize.d.ts.map +1 -1
- package/dist/v3/robots/document-optimize.js +7 -31
- package/dist/v3/robots/document-split.d.ts +44 -31
- package/dist/v3/robots/document-split.d.ts.map +1 -1
- package/dist/v3/robots/document-split.js +7 -34
- package/dist/v3/robots/document-thumbs.d.ts +54 -35
- package/dist/v3/robots/document-thumbs.d.ts.map +1 -1
- package/dist/v3/robots/document-thumbs.js +24 -31
- package/dist/v3/robots/dropbox-import.d.ts +40 -27
- package/dist/v3/robots/dropbox-import.d.ts.map +1 -1
- package/dist/v3/robots/dropbox-import.js +5 -35
- package/dist/v3/robots/dropbox-store.d.ts +48 -32
- package/dist/v3/robots/dropbox-store.d.ts.map +1 -1
- package/dist/v3/robots/dropbox-store.js +8 -42
- package/dist/v3/robots/edgly-deliver.d.ts +40 -27
- package/dist/v3/robots/edgly-deliver.d.ts.map +1 -1
- package/dist/v3/robots/edgly-deliver.js +4 -24
- package/dist/v3/robots/file-compress.d.ts +44 -31
- package/dist/v3/robots/file-compress.d.ts.map +1 -1
- package/dist/v3/robots/file-compress.js +4 -20
- package/dist/v3/robots/file-decompress.d.ts +52 -39
- package/dist/v3/robots/file-decompress.d.ts.map +1 -1
- package/dist/v3/robots/file-decompress.js +10 -41
- package/dist/v3/robots/file-filter.d.ts +65 -53
- package/dist/v3/robots/file-filter.d.ts.map +1 -1
- package/dist/v3/robots/file-filter.js +11 -40
- package/dist/v3/robots/file-hash.d.ts +48 -35
- package/dist/v3/robots/file-hash.d.ts.map +1 -1
- package/dist/v3/robots/file-hash.js +12 -43
- package/dist/v3/robots/file-preview.d.ts +61 -48
- package/dist/v3/robots/file-preview.d.ts.map +1 -1
- package/dist/v3/robots/file-preview.js +14 -39
- package/dist/v3/robots/file-read.d.ts +44 -31
- package/dist/v3/robots/file-read.d.ts.map +1 -1
- package/dist/v3/robots/file-read.js +5 -26
- package/dist/v3/robots/file-serve.d.ts +45 -32
- package/dist/v3/robots/file-serve.d.ts.map +1 -1
- package/dist/v3/robots/file-serve.js +4 -21
- package/dist/v3/robots/file-verify.d.ts +52 -39
- package/dist/v3/robots/file-verify.d.ts.map +1 -1
- package/dist/v3/robots/file-verify.js +11 -41
- package/dist/v3/robots/file-virusscan.d.ts +47 -31
- package/dist/v3/robots/file-virusscan.d.ts.map +1 -1
- package/dist/v3/robots/file-virusscan.js +16 -42
- package/dist/v3/robots/file-watermark.d.ts +45 -31
- package/dist/v3/robots/file-watermark.d.ts.map +1 -1
- package/dist/v3/robots/file-watermark.js +10 -29
- package/dist/v3/robots/ftp-import.d.ts +48 -35
- package/dist/v3/robots/ftp-import.d.ts.map +1 -1
- package/dist/v3/robots/ftp-import.js +5 -33
- package/dist/v3/robots/ftp-store.d.ts +57 -39
- package/dist/v3/robots/ftp-store.d.ts.map +1 -1
- package/dist/v3/robots/ftp-store.js +7 -34
- package/dist/v3/robots/google-import.d.ts +48 -35
- package/dist/v3/robots/google-import.d.ts.map +1 -1
- package/dist/v3/robots/google-import.js +10 -43
- package/dist/v3/robots/google-store.d.ts +44 -31
- package/dist/v3/robots/google-store.d.ts.map +1 -1
- package/dist/v3/robots/google-store.js +10 -41
- package/dist/v3/robots/html-convert.d.ts +51 -33
- package/dist/v3/robots/html-convert.d.ts.map +1 -1
- package/dist/v3/robots/html-convert.js +6 -22
- package/dist/v3/robots/http-import.d.ts +34 -21
- package/dist/v3/robots/http-import.d.ts.map +1 -1
- package/dist/v3/robots/http-import.js +14 -19
- package/dist/v3/robots/http-request.d.ts +538 -0
- package/dist/v3/robots/http-request.d.ts.map +1 -0
- package/dist/v3/robots/http-request.js +161 -0
- package/dist/v3/robots/image-bgremove.d.ts +48 -35
- package/dist/v3/robots/image-bgremove.d.ts.map +1 -1
- package/dist/v3/robots/image-bgremove.js +6 -33
- package/dist/v3/robots/image-copyrightdetect.d.ts +52 -39
- package/dist/v3/robots/image-copyrightdetect.d.ts.map +1 -1
- package/dist/v3/robots/image-copyrightdetect.js +9 -33
- package/dist/v3/robots/image-describe.d.ts +52 -39
- package/dist/v3/robots/image-describe.d.ts.map +1 -1
- package/dist/v3/robots/image-describe.js +8 -37
- package/dist/v3/robots/image-enhance.d.ts +52 -39
- package/dist/v3/robots/image-enhance.d.ts.map +1 -1
- package/dist/v3/robots/image-enhance.js +7 -31
- package/dist/v3/robots/image-facedetect.d.ts +60 -47
- package/dist/v3/robots/image-facedetect.d.ts.map +1 -1
- package/dist/v3/robots/image-facedetect.js +16 -44
- package/dist/v3/robots/image-generate.d.ts +35 -25
- package/dist/v3/robots/image-generate.d.ts.map +1 -1
- package/dist/v3/robots/image-generate.js +20 -25
- package/dist/v3/robots/image-merge.d.ts +44 -31
- package/dist/v3/robots/image-merge.d.ts.map +1 -1
- package/dist/v3/robots/image-merge.js +9 -40
- package/dist/v3/robots/image-ocr.d.ts +52 -39
- package/dist/v3/robots/image-ocr.d.ts.map +1 -1
- package/dist/v3/robots/image-ocr.js +11 -47
- package/dist/v3/robots/image-optimize.d.ts +44 -31
- package/dist/v3/robots/image-optimize.d.ts.map +1 -1
- package/dist/v3/robots/image-optimize.js +6 -32
- package/dist/v3/robots/image-resize.d.ts +378 -273
- package/dist/v3/robots/image-resize.d.ts.map +1 -1
- package/dist/v3/robots/image-resize.js +15 -42
- package/dist/v3/robots/image-upscale.d.ts +61 -45
- package/dist/v3/robots/image-upscale.d.ts.map +1 -1
- package/dist/v3/robots/image-upscale.js +23 -42
- package/dist/v3/robots/mega-import.d.ts +48 -35
- package/dist/v3/robots/mega-import.d.ts.map +1 -1
- package/dist/v3/robots/mega-import.js +12 -59
- package/dist/v3/robots/mega-store.d.ts +44 -31
- package/dist/v3/robots/mega-store.d.ts.map +1 -1
- package/dist/v3/robots/mega-store.js +14 -60
- package/dist/v3/robots/meta-read.d.ts +38 -24
- package/dist/v3/robots/meta-read.d.ts.map +1 -1
- package/dist/v3/robots/meta-read.js +4 -20
- package/dist/v3/robots/meta-write.d.ts +124 -111
- package/dist/v3/robots/meta-write.d.ts.map +1 -1
- package/dist/v3/robots/meta-write.js +9 -32
- package/dist/v3/robots/minio-import.d.ts +48 -35
- package/dist/v3/robots/minio-import.d.ts.map +1 -1
- package/dist/v3/robots/minio-import.js +9 -60
- package/dist/v3/robots/minio-store.d.ts +44 -31
- package/dist/v3/robots/minio-store.d.ts.map +1 -1
- package/dist/v3/robots/minio-store.js +9 -50
- package/dist/v3/robots/progress-simulate.d.ts +16 -10
- package/dist/v3/robots/progress-simulate.d.ts.map +1 -1
- package/dist/v3/robots/progress-simulate.js +8 -28
- package/dist/v3/robots/s3-import.d.ts +48 -35
- package/dist/v3/robots/s3-import.d.ts.map +1 -1
- package/dist/v3/robots/s3-import.js +7 -38
- package/dist/v3/robots/s3-store.d.ts +52 -36
- package/dist/v3/robots/s3-store.d.ts.map +1 -1
- package/dist/v3/robots/s3-store.js +14 -44
- package/dist/v3/robots/script-run.d.ts +47 -31
- package/dist/v3/robots/script-run.d.ts.map +1 -1
- package/dist/v3/robots/script-run.js +9 -27
- package/dist/v3/robots/sftp-import.d.ts +59 -43
- package/dist/v3/robots/sftp-import.d.ts.map +1 -1
- package/dist/v3/robots/sftp-import.js +7 -36
- package/dist/v3/robots/sftp-store.d.ts +55 -39
- package/dist/v3/robots/sftp-store.d.ts.map +1 -1
- package/dist/v3/robots/sftp-store.js +9 -41
- package/dist/v3/robots/speech-transcribe.d.ts +74 -57
- package/dist/v3/robots/speech-transcribe.d.ts.map +1 -1
- package/dist/v3/robots/speech-transcribe.js +23 -44
- package/dist/v3/robots/supabase-import.d.ts +48 -35
- package/dist/v3/robots/supabase-import.d.ts.map +1 -1
- package/dist/v3/robots/supabase-import.js +12 -59
- package/dist/v3/robots/supabase-store.d.ts +44 -43
- package/dist/v3/robots/supabase-store.d.ts.map +1 -1
- package/dist/v3/robots/supabase-store.js +12 -56
- package/dist/v3/robots/swift-import.d.ts +48 -47
- package/dist/v3/robots/swift-import.d.ts.map +1 -1
- package/dist/v3/robots/swift-import.js +14 -55
- package/dist/v3/robots/swift-store.d.ts +44 -43
- package/dist/v3/robots/swift-store.d.ts.map +1 -1
- package/dist/v3/robots/swift-store.js +14 -62
- package/dist/v3/robots/text-speak.d.ts +48 -35
- package/dist/v3/robots/text-speak.d.ts.map +1 -1
- package/dist/v3/robots/text-speak.js +11 -37
- package/dist/v3/robots/text-translate.d.ts +56 -43
- package/dist/v3/robots/text-translate.d.ts.map +1 -1
- package/dist/v3/robots/text-translate.js +9 -36
- package/dist/v3/robots/tigris-import.d.ts +48 -35
- package/dist/v3/robots/tigris-import.d.ts.map +1 -1
- package/dist/v3/robots/tigris-import.js +9 -60
- package/dist/v3/robots/tigris-store.d.ts +44 -31
- package/dist/v3/robots/tigris-store.d.ts.map +1 -1
- package/dist/v3/robots/tigris-store.js +7 -48
- package/dist/v3/robots/tlcdn-deliver.d.ts +40 -27
- package/dist/v3/robots/tlcdn-deliver.d.ts.map +1 -1
- package/dist/v3/robots/tlcdn-deliver.js +4 -25
- package/dist/v3/robots/transloadit-import.d.ts +42 -29
- package/dist/v3/robots/transloadit-import.d.ts.map +1 -1
- package/dist/v3/robots/transloadit-import.js +17 -21
- package/dist/v3/robots/transloadit-store.d.ts +34 -21
- package/dist/v3/robots/transloadit-store.d.ts.map +1 -1
- package/dist/v3/robots/transloadit-store.js +14 -6
- package/dist/v3/robots/tus-store.d.ts +48 -35
- package/dist/v3/robots/tus-store.d.ts.map +1 -1
- package/dist/v3/robots/tus-store.js +8 -37
- package/dist/v3/robots/upload-handle.d.ts +40 -27
- package/dist/v3/robots/upload-handle.d.ts.map +1 -1
- package/dist/v3/robots/upload-handle.js +4 -19
- package/dist/v3/robots/video-adaptive.d.ts +124 -111
- package/dist/v3/robots/video-adaptive.d.ts.map +1 -1
- package/dist/v3/robots/video-adaptive.js +4 -26
- package/dist/v3/robots/video-artwork.d.ts +124 -111
- package/dist/v3/robots/video-artwork.d.ts.map +1 -1
- package/dist/v3/robots/video-artwork.js +7 -32
- package/dist/v3/robots/video-concat.d.ts +124 -111
- package/dist/v3/robots/video-concat.d.ts.map +1 -1
- package/dist/v3/robots/video-concat.js +6 -27
- package/dist/v3/robots/video-encode.d.ts +141 -123
- package/dist/v3/robots/video-encode.d.ts.map +1 -1
- package/dist/v3/robots/video-encode.js +13 -38
- package/dist/v3/robots/video-generate.d.ts +35 -25
- package/dist/v3/robots/video-generate.d.ts.map +1 -1
- package/dist/v3/robots/video-generate.js +11 -18
- package/dist/v3/robots/video-merge.d.ts +143 -127
- package/dist/v3/robots/video-merge.d.ts.map +1 -1
- package/dist/v3/robots/video-merge.js +12 -32
- package/dist/v3/robots/video-ondemand.d.ts +180 -163
- package/dist/v3/robots/video-ondemand.d.ts.map +1 -1
- package/dist/v3/robots/video-ondemand.js +11 -27
- package/dist/v3/robots/video-split.d.ts +124 -111
- package/dist/v3/robots/video-split.d.ts.map +1 -1
- package/dist/v3/robots/video-split.js +11 -39
- package/dist/v3/robots/video-subtitle.d.ts +124 -111
- package/dist/v3/robots/video-subtitle.d.ts.map +1 -1
- package/dist/v3/robots/video-subtitle.js +7 -30
- package/dist/v3/robots/video-thumbs.d.ts +140 -123
- package/dist/v3/robots/video-thumbs.d.ts.map +1 -1
- package/dist/v3/robots/video-thumbs.js +46 -53
- package/dist/v3/robots/vimeo-import.d.ts +30 -17
- package/dist/v3/robots/vimeo-import.d.ts.map +1 -1
- package/dist/v3/robots/vimeo-import.js +7 -17
- package/dist/v3/robots/vimeo-store.d.ts +47 -31
- package/dist/v3/robots/vimeo-store.d.ts.map +1 -1
- package/dist/v3/robots/vimeo-store.js +11 -37
- package/dist/v3/robots/wasabi-import.d.ts +48 -35
- package/dist/v3/robots/wasabi-import.d.ts.map +1 -1
- package/dist/v3/robots/wasabi-import.js +9 -56
- package/dist/v3/robots/wasabi-store.d.ts +44 -31
- package/dist/v3/robots/wasabi-store.d.ts.map +1 -1
- package/dist/v3/robots/wasabi-store.js +10 -52
- package/dist/v3/robots/youtube-store.d.ts +58 -45
- package/dist/v3/robots/youtube-store.d.ts.map +1 -1
- package/dist/v3/robots/youtube-store.js +42 -63
- package/dist/v3/stackVersions.d.ts +40 -1
- package/dist/v3/stackVersions.d.ts.map +1 -1
- package/dist/v3/stackVersions.js +25 -3
- package/dist/v3/storageAsset.d.ts +33 -1
- package/dist/v3/storageAsset.d.ts.map +1 -1
- package/dist/v3/storageAsset.js +33 -9
- package/dist/v3/template.d.ts +2 -2
- package/dist/v3/templateCredential.d.ts +4 -4
- package/dist/v3/utility.d.ts +22 -0
- package/dist/v3/utility.d.ts.map +1 -0
- package/dist/v3/utility.js +1 -0
- package/dist/v4/aiMessages.d.ts +1100 -0
- package/dist/v4/aiMessages.d.ts.map +1 -0
- package/dist/v4/aiMessages.js +479 -0
- package/dist/v4/apiParameterDescription.d.ts +14 -0
- package/dist/v4/apiParameterDescription.d.ts.map +1 -0
- package/dist/v4/apiParameterDescription.js +19 -0
- package/dist/v4/assemblyReplay.d.ts.map +1 -1
- package/dist/v4/assemblyReplay.js +13 -12
- package/dist/v4/assemblyStatus.d.ts +878 -2581
- package/dist/v4/assemblyStatus.d.ts.map +1 -1
- package/dist/v4/assemblyStatus.js +416 -408
- package/dist/v4/builtinTemplates.d.ts.map +1 -1
- package/dist/v4/builtinTemplates.js +2 -1
- package/dist/v4/englishList.d.ts +3 -0
- package/dist/v4/englishList.d.ts.map +1 -0
- package/dist/v4/englishList.js +11 -0
- package/dist/v4/errorReason.d.ts +7 -0
- package/dist/v4/errorReason.d.ts.map +1 -0
- package/dist/v4/errorReason.js +13 -0
- package/dist/v4/file.d.ts +25 -0
- package/dist/v4/file.d.ts.map +1 -1
- package/dist/v4/file.js +15 -0
- package/dist/v4/fileHash.d.ts +21 -0
- package/dist/v4/fileHash.d.ts.map +1 -0
- package/dist/v4/fileHash.js +9 -0
- package/dist/v4/imagemagickDensity.d.ts.map +1 -1
- package/dist/v4/imagemagickDensity.js +2 -2
- package/dist/v4/index.d.ts +4 -0
- package/dist/v4/index.d.ts.map +1 -1
- package/dist/v4/index.js +4 -0
- package/dist/v4/lib/sdkZodOptional.d.ts +4 -0
- package/dist/v4/lib/sdkZodOptional.d.ts.map +1 -0
- package/dist/v4/lib/sdkZodOptional.js +12 -0
- package/dist/v4/lib/zodInputSemantics.d.ts +18 -0
- package/dist/v4/lib/zodInputSemantics.d.ts.map +1 -0
- package/dist/v4/lib/zodInputSemantics.js +85 -0
- package/dist/v4/object.d.ts +71 -0
- package/dist/v4/object.d.ts.map +1 -0
- package/dist/v4/object.js +195 -0
- package/dist/v4/responseErrors/HttpImportRobot.d.ts +23 -0
- package/dist/v4/responseErrors/HttpImportRobot.d.ts.map +1 -0
- package/dist/v4/responseErrors/HttpImportRobot.js +22 -0
- package/dist/v4/robots/_ai-models.d.ts +28 -0
- package/dist/v4/robots/_ai-models.d.ts.map +1 -0
- package/dist/v4/robots/_ai-models.js +79 -0
- package/dist/v4/robots/_index.d.ts +619 -1235
- package/dist/v4/robots/_index.d.ts.map +1 -1
- package/dist/v4/robots/_index.js +4 -0
- package/dist/v4/robots/_instructions-primitives.d.ts +426 -41
- package/dist/v4/robots/_instructions-primitives.d.ts.map +1 -1
- package/dist/v4/robots/_instructions-primitives.js +830 -529
- package/dist/v4/robots/ai-chat.d.ts +82 -334
- package/dist/v4/robots/ai-chat.d.ts.map +1 -1
- package/dist/v4/robots/ai-chat.js +261 -399
- package/dist/v4/robots/assembly-savejson.d.ts +22 -18
- package/dist/v4/robots/assembly-savejson.d.ts.map +1 -1
- package/dist/v4/robots/assembly-savejson.js +7 -15
- package/dist/v4/robots/audio-artwork.d.ts +44 -39
- package/dist/v4/robots/audio-artwork.d.ts.map +1 -1
- package/dist/v4/robots/audio-artwork.js +9 -38
- package/dist/v4/robots/audio-concat.d.ts +36 -31
- package/dist/v4/robots/audio-concat.d.ts.map +1 -1
- package/dist/v4/robots/audio-concat.js +15 -31
- package/dist/v4/robots/audio-encode.d.ts +38 -33
- package/dist/v4/robots/audio-encode.d.ts.map +1 -1
- package/dist/v4/robots/audio-encode.js +15 -46
- package/dist/v4/robots/audio-loop.d.ts +42 -37
- package/dist/v4/robots/audio-loop.d.ts.map +1 -1
- package/dist/v4/robots/audio-loop.js +12 -40
- package/dist/v4/robots/audio-merge.d.ts +38 -33
- package/dist/v4/robots/audio-merge.d.ts.map +1 -1
- package/dist/v4/robots/audio-merge.js +13 -28
- package/dist/v4/robots/audio-split.d.ts +38 -33
- package/dist/v4/robots/audio-split.d.ts.map +1 -1
- package/dist/v4/robots/audio-split.js +17 -48
- package/dist/v4/robots/audio-waveform.d.ts +58 -53
- package/dist/v4/robots/audio-waveform.d.ts.map +1 -1
- package/dist/v4/robots/audio-waveform.js +62 -107
- package/dist/v4/robots/azure-import.d.ts +44 -39
- package/dist/v4/robots/azure-import.d.ts.map +1 -1
- package/dist/v4/robots/azure-import.js +5 -35
- package/dist/v4/robots/azure-store.d.ts +44 -33
- package/dist/v4/robots/azure-store.d.ts.map +1 -1
- package/dist/v4/robots/azure-store.js +25 -70
- package/dist/v4/robots/backblaze-import.d.ts +44 -39
- package/dist/v4/robots/backblaze-import.d.ts.map +1 -1
- package/dist/v4/robots/backblaze-import.js +6 -39
- package/dist/v4/robots/backblaze-store.d.ts +38 -33
- package/dist/v4/robots/backblaze-store.d.ts.map +1 -1
- package/dist/v4/robots/backblaze-store.js +8 -44
- package/dist/v4/robots/box-import.d.ts +42 -33
- package/dist/v4/robots/box-import.d.ts.map +1 -1
- package/dist/v4/robots/box-import.js +10 -35
- package/dist/v4/robots/box-store.d.ts +43 -34
- package/dist/v4/robots/box-store.d.ts.map +1 -1
- package/dist/v4/robots/box-store.js +11 -42
- package/dist/v4/robots/cloudfiles-import.d.ts +44 -39
- package/dist/v4/robots/cloudfiles-import.d.ts.map +1 -1
- package/dist/v4/robots/cloudfiles-import.js +8 -45
- package/dist/v4/robots/cloudfiles-store.d.ts +36 -31
- package/dist/v4/robots/cloudfiles-store.d.ts.map +1 -1
- package/dist/v4/robots/cloudfiles-store.js +5 -36
- package/dist/v4/robots/cloudflare-import.d.ts +46 -41
- package/dist/v4/robots/cloudflare-import.d.ts.map +1 -1
- package/dist/v4/robots/cloudflare-import.js +10 -57
- package/dist/v4/robots/cloudflare-store.d.ts +38 -33
- package/dist/v4/robots/cloudflare-store.d.ts.map +1 -1
- package/dist/v4/robots/cloudflare-store.js +14 -57
- package/dist/v4/robots/digitalocean-import.d.ts +46 -41
- package/dist/v4/robots/digitalocean-import.d.ts.map +1 -1
- package/dist/v4/robots/digitalocean-import.js +8 -49
- package/dist/v4/robots/digitalocean-store.d.ts +42 -37
- package/dist/v4/robots/digitalocean-store.d.ts.map +1 -1
- package/dist/v4/robots/digitalocean-store.js +8 -56
- package/dist/v4/robots/document-autorotate.d.ts +34 -29
- package/dist/v4/robots/document-autorotate.d.ts.map +1 -1
- package/dist/v4/robots/document-autorotate.js +5 -32
- package/dist/v4/robots/document-convert.d.ts +58 -53
- package/dist/v4/robots/document-convert.d.ts.map +1 -1
- package/dist/v4/robots/document-convert.js +12 -39
- package/dist/v4/robots/document-extract.d.ts +54 -49
- package/dist/v4/robots/document-extract.d.ts.map +1 -1
- package/dist/v4/robots/document-extract.js +15 -42
- package/dist/v4/robots/document-merge.d.ts +38 -33
- package/dist/v4/robots/document-merge.d.ts.map +1 -1
- package/dist/v4/robots/document-merge.js +7 -28
- package/dist/v4/robots/document-ocr.d.ts +48 -43
- package/dist/v4/robots/document-ocr.d.ts.map +1 -1
- package/dist/v4/robots/document-ocr.js +10 -47
- package/dist/v4/robots/document-optimize.d.ts +46 -41
- package/dist/v4/robots/document-optimize.d.ts.map +1 -1
- package/dist/v4/robots/document-optimize.js +10 -34
- package/dist/v4/robots/document-split.d.ts +34 -29
- package/dist/v4/robots/document-split.d.ts.map +1 -1
- package/dist/v4/robots/document-split.js +10 -37
- package/dist/v4/robots/document-thumbs.d.ts +81 -52
- package/dist/v4/robots/document-thumbs.d.ts.map +1 -1
- package/dist/v4/robots/document-thumbs.js +42 -58
- package/dist/v4/robots/dropbox-import.d.ts +38 -33
- package/dist/v4/robots/dropbox-import.d.ts.map +1 -1
- package/dist/v4/robots/dropbox-import.js +10 -41
- package/dist/v4/robots/dropbox-store.d.ts +42 -34
- package/dist/v4/robots/dropbox-store.d.ts.map +1 -1
- package/dist/v4/robots/dropbox-store.js +10 -43
- package/dist/v4/robots/edgly-deliver.d.ts +34 -29
- package/dist/v4/robots/edgly-deliver.d.ts.map +1 -1
- package/dist/v4/robots/edgly-deliver.js +4 -24
- package/dist/v4/robots/file-compress.d.ts +44 -39
- package/dist/v4/robots/file-compress.d.ts.map +1 -1
- package/dist/v4/robots/file-compress.js +9 -26
- package/dist/v4/robots/file-decompress.d.ts +44 -39
- package/dist/v4/robots/file-decompress.d.ts.map +1 -1
- package/dist/v4/robots/file-decompress.js +13 -44
- package/dist/v4/robots/file-filter.d.ts +39 -35
- package/dist/v4/robots/file-filter.d.ts.map +1 -1
- package/dist/v4/robots/file-filter.js +16 -46
- package/dist/v4/robots/file-hash.d.ts +44 -39
- package/dist/v4/robots/file-hash.d.ts.map +1 -1
- package/dist/v4/robots/file-hash.js +12 -43
- package/dist/v4/robots/file-preview.d.ts +93 -88
- package/dist/v4/robots/file-preview.d.ts.map +1 -1
- package/dist/v4/robots/file-preview.js +19 -44
- package/dist/v4/robots/file-read.d.ts +34 -29
- package/dist/v4/robots/file-read.d.ts.map +1 -1
- package/dist/v4/robots/file-read.js +5 -26
- package/dist/v4/robots/file-serve.d.ts +37 -32
- package/dist/v4/robots/file-serve.d.ts.map +1 -1
- package/dist/v4/robots/file-serve.js +9 -27
- package/dist/v4/robots/file-verify.d.ts +42 -37
- package/dist/v4/robots/file-verify.d.ts.map +1 -1
- package/dist/v4/robots/file-verify.js +11 -41
- package/dist/v4/robots/file-virusscan.d.ts +41 -33
- package/dist/v4/robots/file-virusscan.d.ts.map +1 -1
- package/dist/v4/robots/file-virusscan.js +19 -45
- package/dist/v4/robots/file-watermark.d.ts +35 -29
- package/dist/v4/robots/file-watermark.d.ts.map +1 -1
- package/dist/v4/robots/file-watermark.js +12 -30
- package/dist/v4/robots/ftp-import.d.ts +42 -37
- package/dist/v4/robots/ftp-import.d.ts.map +1 -1
- package/dist/v4/robots/ftp-import.js +5 -33
- package/dist/v4/robots/ftp-store.d.ts +49 -39
- package/dist/v4/robots/ftp-store.d.ts.map +1 -1
- package/dist/v4/robots/ftp-store.js +13 -41
- package/dist/v4/robots/google-import.d.ts +44 -39
- package/dist/v4/robots/google-import.d.ts.map +1 -1
- package/dist/v4/robots/google-import.js +10 -43
- package/dist/v4/robots/google-store.d.ts +40 -35
- package/dist/v4/robots/google-store.d.ts.map +1 -1
- package/dist/v4/robots/google-store.js +15 -47
- package/dist/v4/robots/html-convert.d.ts +54 -44
- package/dist/v4/robots/html-convert.d.ts.map +1 -1
- package/dist/v4/robots/html-convert.js +13 -30
- package/dist/v4/robots/http-import.d.ts +35 -30
- package/dist/v4/robots/http-import.d.ts.map +1 -1
- package/dist/v4/robots/http-import.js +27 -35
- package/dist/v4/robots/http-request.d.ts +231 -0
- package/dist/v4/robots/http-request.d.ts.map +1 -0
- package/dist/v4/robots/http-request.js +161 -0
- package/dist/v4/robots/image-bgremove.d.ts +42 -37
- package/dist/v4/robots/image-bgremove.d.ts.map +1 -1
- package/dist/v4/robots/image-bgremove.js +11 -39
- package/dist/v4/robots/image-copyrightdetect.d.ts +52 -47
- package/dist/v4/robots/image-copyrightdetect.d.ts.map +1 -1
- package/dist/v4/robots/image-copyrightdetect.js +9 -33
- package/dist/v4/robots/image-describe.d.ts +50 -45
- package/dist/v4/robots/image-describe.d.ts.map +1 -1
- package/dist/v4/robots/image-describe.js +8 -37
- package/dist/v4/robots/image-enhance.d.ts +58 -53
- package/dist/v4/robots/image-enhance.d.ts.map +1 -1
- package/dist/v4/robots/image-enhance.js +7 -31
- package/dist/v4/robots/image-facedetect.d.ts +54 -49
- package/dist/v4/robots/image-facedetect.d.ts.map +1 -1
- package/dist/v4/robots/image-facedetect.js +20 -47
- package/dist/v4/robots/image-generate.d.ts +25 -21
- package/dist/v4/robots/image-generate.d.ts.map +1 -1
- package/dist/v4/robots/image-generate.js +36 -47
- package/dist/v4/robots/image-merge.d.ts +54 -49
- package/dist/v4/robots/image-merge.d.ts.map +1 -1
- package/dist/v4/robots/image-merge.js +28 -67
- package/dist/v4/robots/image-ocr.d.ts +48 -43
- package/dist/v4/robots/image-ocr.d.ts.map +1 -1
- package/dist/v4/robots/image-ocr.js +11 -47
- package/dist/v4/robots/image-optimize.d.ts +44 -39
- package/dist/v4/robots/image-optimize.d.ts.map +1 -1
- package/dist/v4/robots/image-optimize.js +6 -32
- package/dist/v4/robots/image-resize.d.ts +344 -185
- package/dist/v4/robots/image-resize.d.ts.map +1 -1
- package/dist/v4/robots/image-resize.js +44 -81
- package/dist/v4/robots/image-upscale.d.ts +55 -47
- package/dist/v4/robots/image-upscale.d.ts.map +1 -1
- package/dist/v4/robots/image-upscale.js +24 -45
- package/dist/v4/robots/mega-import.d.ts +44 -39
- package/dist/v4/robots/mega-import.d.ts.map +1 -1
- package/dist/v4/robots/mega-import.js +15 -62
- package/dist/v4/robots/mega-store.d.ts +40 -35
- package/dist/v4/robots/mega-store.d.ts.map +1 -1
- package/dist/v4/robots/mega-store.js +14 -60
- package/dist/v4/robots/meta-read.d.ts +32 -26
- package/dist/v4/robots/meta-read.d.ts.map +1 -1
- package/dist/v4/robots/meta-read.js +4 -20
- package/dist/v4/robots/meta-write.d.ts +42 -37
- package/dist/v4/robots/meta-write.d.ts.map +1 -1
- package/dist/v4/robots/meta-write.js +9 -32
- package/dist/v4/robots/minio-import.d.ts +46 -41
- package/dist/v4/robots/minio-import.d.ts.map +1 -1
- package/dist/v4/robots/minio-import.js +9 -60
- package/dist/v4/robots/minio-store.d.ts +40 -35
- package/dist/v4/robots/minio-store.d.ts.map +1 -1
- package/dist/v4/robots/minio-store.js +12 -53
- package/dist/v4/robots/progress-simulate.d.ts +11 -9
- package/dist/v4/robots/progress-simulate.d.ts.map +1 -1
- package/dist/v4/robots/progress-simulate.js +8 -28
- package/dist/v4/robots/s3-import.d.ts +46 -41
- package/dist/v4/robots/s3-import.d.ts.map +1 -1
- package/dist/v4/robots/s3-import.js +12 -43
- package/dist/v4/robots/s3-store.d.ts +58 -50
- package/dist/v4/robots/s3-store.d.ts.map +1 -1
- package/dist/v4/robots/s3-store.js +21 -53
- package/dist/v4/robots/script-run.d.ts +37 -29
- package/dist/v4/robots/script-run.d.ts.map +1 -1
- package/dist/v4/robots/script-run.js +12 -30
- package/dist/v4/robots/sftp-import.d.ts +45 -37
- package/dist/v4/robots/sftp-import.d.ts.map +1 -1
- package/dist/v4/robots/sftp-import.js +10 -39
- package/dist/v4/robots/sftp-store.d.ts +47 -39
- package/dist/v4/robots/sftp-store.d.ts.map +1 -1
- package/dist/v4/robots/sftp-store.js +12 -44
- package/dist/v4/robots/speech-transcribe.d.ts +71 -54
- package/dist/v4/robots/speech-transcribe.d.ts.map +1 -1
- package/dist/v4/robots/speech-transcribe.js +26 -47
- package/dist/v4/robots/supabase-import.d.ts +46 -41
- package/dist/v4/robots/supabase-import.d.ts.map +1 -1
- package/dist/v4/robots/supabase-import.js +12 -59
- package/dist/v4/robots/supabase-store.d.ts +38 -37
- package/dist/v4/robots/supabase-store.d.ts.map +1 -1
- package/dist/v4/robots/supabase-store.js +12 -56
- package/dist/v4/robots/swift-import.d.ts +46 -45
- package/dist/v4/robots/swift-import.d.ts.map +1 -1
- package/dist/v4/robots/swift-import.js +14 -55
- package/dist/v4/robots/swift-store.d.ts +40 -39
- package/dist/v4/robots/swift-store.d.ts.map +1 -1
- package/dist/v4/robots/swift-store.js +14 -62
- package/dist/v4/robots/text-speak.d.ts +46 -41
- package/dist/v4/robots/text-speak.d.ts.map +1 -1
- package/dist/v4/robots/text-speak.js +11 -37
- package/dist/v4/robots/text-translate.d.ts +44 -39
- package/dist/v4/robots/text-translate.d.ts.map +1 -1
- package/dist/v4/robots/text-translate.js +9 -36
- package/dist/v4/robots/tigris-import.d.ts +46 -41
- package/dist/v4/robots/tigris-import.d.ts.map +1 -1
- package/dist/v4/robots/tigris-import.js +12 -63
- package/dist/v4/robots/tigris-store.d.ts +40 -35
- package/dist/v4/robots/tigris-store.d.ts.map +1 -1
- package/dist/v4/robots/tigris-store.js +12 -54
- package/dist/v4/robots/tlcdn-deliver.d.ts +36 -31
- package/dist/v4/robots/tlcdn-deliver.d.ts.map +1 -1
- package/dist/v4/robots/tlcdn-deliver.js +7 -28
- package/dist/v4/robots/transloadit-import.d.ts +32 -31
- package/dist/v4/robots/transloadit-import.d.ts.map +1 -1
- package/dist/v4/robots/transloadit-import.js +24 -29
- package/dist/v4/robots/transloadit-store.d.ts +28 -23
- package/dist/v4/robots/transloadit-store.d.ts.map +1 -1
- package/dist/v4/robots/transloadit-store.js +17 -9
- package/dist/v4/robots/tus-store.d.ts +38 -33
- package/dist/v4/robots/tus-store.d.ts.map +1 -1
- package/dist/v4/robots/tus-store.js +15 -46
- package/dist/v4/robots/upload-handle.d.ts +34 -29
- package/dist/v4/robots/upload-handle.d.ts.map +1 -1
- package/dist/v4/robots/upload-handle.js +4 -19
- package/dist/v4/robots/video-adaptive.d.ts +48 -43
- package/dist/v4/robots/video-adaptive.d.ts.map +1 -1
- package/dist/v4/robots/video-adaptive.js +9 -32
- package/dist/v4/robots/video-artwork.d.ts +42 -37
- package/dist/v4/robots/video-artwork.d.ts.map +1 -1
- package/dist/v4/robots/video-artwork.js +7 -32
- package/dist/v4/robots/video-concat.d.ts +52 -47
- package/dist/v4/robots/video-concat.d.ts.map +1 -1
- package/dist/v4/robots/video-concat.js +6 -27
- package/dist/v4/robots/video-encode.d.ts +79 -69
- package/dist/v4/robots/video-encode.d.ts.map +1 -1
- package/dist/v4/robots/video-encode.js +20 -44
- package/dist/v4/robots/video-generate.d.ts +25 -21
- package/dist/v4/robots/video-generate.d.ts.map +1 -1
- package/dist/v4/robots/video-generate.js +33 -46
- package/dist/v4/robots/video-merge.d.ts +69 -61
- package/dist/v4/robots/video-merge.d.ts.map +1 -1
- package/dist/v4/robots/video-merge.js +15 -34
- package/dist/v4/robots/video-ondemand.d.ts +86 -77
- package/dist/v4/robots/video-ondemand.d.ts.map +1 -1
- package/dist/v4/robots/video-ondemand.js +26 -48
- package/dist/v4/robots/video-split.d.ts +40 -35
- package/dist/v4/robots/video-split.d.ts.map +1 -1
- package/dist/v4/robots/video-split.js +11 -39
- package/dist/v4/robots/video-subtitle.d.ts +60 -55
- package/dist/v4/robots/video-subtitle.d.ts.map +1 -1
- package/dist/v4/robots/video-subtitle.js +14 -39
- package/dist/v4/robots/video-thumbs.d.ts +60 -51
- package/dist/v4/robots/video-thumbs.d.ts.map +1 -1
- package/dist/v4/robots/video-thumbs.js +53 -62
- package/dist/v4/robots/vimeo-import.d.ts +36 -31
- package/dist/v4/robots/vimeo-import.d.ts.map +1 -1
- package/dist/v4/robots/vimeo-import.js +12 -23
- package/dist/v4/robots/vimeo-store.d.ts +45 -37
- package/dist/v4/robots/vimeo-store.d.ts.map +1 -1
- package/dist/v4/robots/vimeo-store.js +18 -46
- package/dist/v4/robots/wasabi-import.d.ts +44 -39
- package/dist/v4/robots/wasabi-import.d.ts.map +1 -1
- package/dist/v4/robots/wasabi-import.js +12 -59
- package/dist/v4/robots/wasabi-store.d.ts +40 -35
- package/dist/v4/robots/wasabi-store.d.ts.map +1 -1
- package/dist/v4/robots/wasabi-store.js +10 -52
- package/dist/v4/robots/youtube-store.d.ts +42 -37
- package/dist/v4/robots/youtube-store.d.ts.map +1 -1
- package/dist/v4/robots/youtube-store.js +42 -63
- package/dist/v4/skillFrontmatter.d.ts.map +1 -1
- package/dist/v4/skillFrontmatter.js +5 -4
- package/dist/v4/stackVersions.d.ts +40 -1
- package/dist/v4/stackVersions.d.ts.map +1 -1
- package/dist/v4/stackVersions.js +25 -3
- package/dist/v4/storageAsset.d.ts +13 -1
- package/dist/v4/storageAsset.d.ts.map +1 -1
- package/dist/v4/storageAsset.js +43 -22
- package/dist/v4/template.d.ts +1 -1
- package/dist/v4/template.d.ts.map +1 -1
- package/dist/v4/template.js +43 -55
- package/dist/v4/templateCredential.d.ts +1 -1
- package/dist/v4/utility.d.ts +22 -0
- package/dist/v4/utility.d.ts.map +1 -0
- package/dist/v4/utility.js +1 -0
- package/package.json +2 -3
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { optionalWithV3Semantics } from "../lib/sdkZodOptional.js";
|
|
1
2
|
import { z } from 'zod/v4';
|
|
2
|
-
import {
|
|
3
|
+
import { formatEnglishList } from "../englishList.js";
|
|
4
|
+
import { ecmaWhitespaceCharacterClass, zodInputPreservingTransform, zodWithConservativeJsonInputSchema, zodWithJsonInputSchema, } from "../lib/zodInputSemantics.js";
|
|
5
|
+
import { inheritApiParameterDescription } from "../apiParameterDescription.js";
|
|
6
|
+
import { runtimeStackVersions, stackVersions } from "../stackVersions.js";
|
|
3
7
|
export const robotNames = z.enum([
|
|
4
8
|
'AiChatRobot',
|
|
5
9
|
'UploadHandleRobot',
|
|
@@ -76,6 +80,7 @@ export const robotNames = z.enum([
|
|
|
76
80
|
'DropboxImportRobot',
|
|
77
81
|
'DropboxStoreRobot',
|
|
78
82
|
'HttpImportRobot',
|
|
83
|
+
'HttpRequestRobot',
|
|
79
84
|
'SftpImportRobot',
|
|
80
85
|
'SftpStoreRobot',
|
|
81
86
|
'FtpImportRobot',
|
|
@@ -98,61 +103,50 @@ export const robotNames = z.enum([
|
|
|
98
103
|
'TextSpeakRobot',
|
|
99
104
|
'TextTranslateRobot',
|
|
100
105
|
'FilePreviewRobot',
|
|
106
|
+
'TusStoreRobot',
|
|
101
107
|
'TransloaditImportRobot',
|
|
102
108
|
'TransloaditStoreRobot',
|
|
103
|
-
'TusStoreRobot',
|
|
104
109
|
'ProgressSimulateRobot',
|
|
105
110
|
]);
|
|
111
|
+
const awsGcpMinimumChargeUsdSchema = z.object({
|
|
112
|
+
aws: z.number(),
|
|
113
|
+
gcp: z.number(),
|
|
114
|
+
});
|
|
106
115
|
export const robotMetaSchema = z.object({
|
|
107
116
|
// Added keys from api2/lib/config.ts:
|
|
108
117
|
name: robotNames,
|
|
109
118
|
priceFactor: z.number(),
|
|
110
119
|
queueSlotCount: z.number(),
|
|
111
|
-
downloadInputFiles: z.boolean()
|
|
112
|
-
preserveInputFileUrls: z.boolean()
|
|
113
|
-
minimumCharge: z.number()
|
|
114
|
-
minimumChargeUsd: z.number()
|
|
115
|
-
minimumChargeUsdPerSpeechTranscribeMinute:
|
|
116
|
-
.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
minimumChargeUsdPerDocumentOcrPage: z
|
|
122
|
-
.object({
|
|
123
|
-
aws: z.number(),
|
|
124
|
-
gcp: z.number(),
|
|
125
|
-
})
|
|
126
|
-
.optional(),
|
|
127
|
-
applyCommunityPlanMediaTrim: z.boolean().optional(),
|
|
120
|
+
downloadInputFiles: optionalWithV3Semantics(z.boolean()),
|
|
121
|
+
preserveInputFileUrls: optionalWithV3Semantics(z.boolean()),
|
|
122
|
+
minimumCharge: optionalWithV3Semantics(z.number()),
|
|
123
|
+
minimumChargeUsd: optionalWithV3Semantics(z.number()),
|
|
124
|
+
minimumChargeUsdPerSpeechTranscribeMinute: optionalWithV3Semantics(awsGcpMinimumChargeUsdSchema
|
|
125
|
+
.extend({
|
|
126
|
+
replicate: optionalWithV3Semantics(z.literal('variable')),
|
|
127
|
+
})),
|
|
128
|
+
minimumChargeUsdPerDocumentOcrPage: optionalWithV3Semantics(awsGcpMinimumChargeUsdSchema),
|
|
129
|
+
applyCommunityPlanMediaTrim: optionalWithV3Semantics(z.boolean()),
|
|
128
130
|
isAllowedForUrlTransform: z.boolean(),
|
|
129
131
|
removeJobResultFilesFromDiskRightAfterStoringOnS3: z.boolean(),
|
|
130
|
-
lazyLoad: z.boolean()
|
|
131
|
-
installVersionFile: z.string()
|
|
132
|
-
trackOutputFileSize: z.boolean()
|
|
132
|
+
lazyLoad: optionalWithV3Semantics(z.boolean()),
|
|
133
|
+
installVersionFile: optionalWithV3Semantics(z.string()),
|
|
134
|
+
trackOutputFileSize: optionalWithV3Semantics(z.boolean()),
|
|
133
135
|
isInternal: z.boolean(),
|
|
134
|
-
numDaemons: z.number()
|
|
136
|
+
numDaemons: optionalWithV3Semantics(z.number()),
|
|
135
137
|
stage: z.enum(['alpha', 'beta', 'ga', 'deprecated', 'removed']),
|
|
136
|
-
importRanges: z.array(z.string())
|
|
137
|
-
extraChargeForImageResize: z.number()
|
|
138
|
+
importRanges: optionalWithV3Semantics(z.array(z.string())),
|
|
139
|
+
extraChargeForImageResize: optionalWithV3Semantics(z.number()),
|
|
138
140
|
// Original keys from content repo:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
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
|
-
ogimage: z.string().optional(),
|
|
153
|
-
marketing_intro: z.string().optional(),
|
|
154
|
-
output_factor: z.number(),
|
|
155
|
-
override_lvl1: z.string().optional(),
|
|
141
|
+
description: optionalWithV3Semantics(z.string()),
|
|
142
|
+
// Validate against assembled public Robot schemas at publication, outside this dependency cycle.
|
|
143
|
+
example_code: optionalWithV3Semantics(z.unknown()),
|
|
144
|
+
example_code_description: optionalWithV3Semantics(z.string()),
|
|
145
|
+
extended_description: optionalWithV3Semantics(z.string()),
|
|
146
|
+
has_small_icon: optionalWithV3Semantics(z.literal(true)),
|
|
147
|
+
ogimage: optionalWithV3Semantics(z.string()),
|
|
148
|
+
marketing_intro: optionalWithV3Semantics(z.string()),
|
|
149
|
+
override_lvl1: optionalWithV3Semantics(z.string()),
|
|
156
150
|
purpose_sentence: z.string(),
|
|
157
151
|
purpose_verb: z.enum([
|
|
158
152
|
'auto-rotate',
|
|
@@ -193,8 +187,8 @@ export const robotMetaSchema = z.object({
|
|
|
193
187
|
]),
|
|
194
188
|
purpose_word: z.string(),
|
|
195
189
|
purpose_words: z.string(),
|
|
196
|
-
hideCredentialsWarning: z.boolean()
|
|
197
|
-
requires_credentials: z.literal(true)
|
|
190
|
+
hideCredentialsWarning: optionalWithV3Semantics(z.boolean()),
|
|
191
|
+
requires_credentials: optionalWithV3Semantics(z.literal(true)),
|
|
198
192
|
service_slug: z.enum([
|
|
199
193
|
'artificial-intelligence',
|
|
200
194
|
'audio-encoding',
|
|
@@ -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([
|
|
@@ -222,8 +215,160 @@ export const robotMetaSchema = z.object({
|
|
|
222
215
|
'video',
|
|
223
216
|
'webpage',
|
|
224
217
|
]),
|
|
225
|
-
uses_tools: z.array(z.enum(['ffmpeg', 'imagemagick']))
|
|
218
|
+
uses_tools: optionalWithV3Semantics(z.array(z.enum(['ffmpeg', 'imagemagick']))),
|
|
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
|
const applyArrayChecks = (schema, checks) => {
|
|
251
386
|
if (!Array.isArray(checks))
|
|
252
387
|
return schema;
|
|
@@ -267,7 +402,7 @@ const applyArrayChecks = (schema, checks) => {
|
|
|
267
402
|
}
|
|
268
403
|
return next;
|
|
269
404
|
};
|
|
270
|
-
|
|
405
|
+
function interpolateRecursiveWithoutDescriptionRegistration(schema) {
|
|
271
406
|
const def = schema._zod.def;
|
|
272
407
|
switch (def.type) {
|
|
273
408
|
case 'boolean':
|
|
@@ -275,7 +410,7 @@ export function interpolateRecursive(schema) {
|
|
|
275
410
|
interpolationSchemaFull,
|
|
276
411
|
z
|
|
277
412
|
.union([schema, booleanStringSchema])
|
|
278
|
-
.transform((value) => value === true || value ===
|
|
413
|
+
.transform((value) => value === true || value === 'true'),
|
|
279
414
|
]);
|
|
280
415
|
case 'array': {
|
|
281
416
|
const arrayDef = def;
|
|
@@ -283,11 +418,10 @@ export function interpolateRecursive(schema) {
|
|
|
283
418
|
replacement = applyArrayChecks(replacement, arrayDef.checks);
|
|
284
419
|
return z.union([interpolationSchemaFull, replacement]);
|
|
285
420
|
}
|
|
286
|
-
case 'default':
|
|
421
|
+
case 'default':
|
|
422
|
+
case 'prefault': {
|
|
287
423
|
const defaultDef = def;
|
|
288
|
-
|
|
289
|
-
const description = schema.description;
|
|
290
|
-
return (description ? replacement.describe(description) : replacement);
|
|
424
|
+
return interpolateRecursive(defaultDef.innerType).prefault(() => defaultDef.defaultValue);
|
|
291
425
|
}
|
|
292
426
|
case 'enum':
|
|
293
427
|
case 'literal':
|
|
@@ -327,7 +461,7 @@ export function interpolateRecursive(schema) {
|
|
|
327
461
|
}
|
|
328
462
|
case 'optional': {
|
|
329
463
|
const optionalDef = def;
|
|
330
|
-
return interpolateRecursive(optionalDef.innerType)
|
|
464
|
+
return optionalWithV3Semantics(interpolateRecursive(optionalDef.innerType));
|
|
331
465
|
}
|
|
332
466
|
case 'record': {
|
|
333
467
|
const recordDef = def;
|
|
@@ -352,17 +486,27 @@ export function interpolateRecursive(schema) {
|
|
|
352
486
|
}
|
|
353
487
|
return z.union([interpolationSchemaFull, ...unionDef.options.map(interpolateRecursive)]);
|
|
354
488
|
}
|
|
355
|
-
case 'pipe':
|
|
356
|
-
|
|
489
|
+
case 'pipe': {
|
|
490
|
+
const pipeDef = def;
|
|
491
|
+
return z.union([pipeDef.in instanceof z.ZodString ? interpolationSchemaPartial : interpolationSchemaFull, schema]);
|
|
492
|
+
}
|
|
357
493
|
default:
|
|
358
494
|
return schema;
|
|
359
495
|
}
|
|
360
496
|
}
|
|
497
|
+
/** Keep parameter help on rebuilt interpolation schemas. */
|
|
498
|
+
export function interpolateRecursive(schema) {
|
|
499
|
+
// Conditional core types lose the classic Zod methods in generic constraints; every
|
|
500
|
+
// runtime branch above constructs a classic schema and describe preserves its type.
|
|
501
|
+
const interpolated = interpolateRecursiveWithoutDescriptionRegistration(schema);
|
|
502
|
+
return inheritApiParameterDescription(schema, interpolated);
|
|
503
|
+
}
|
|
361
504
|
/**
|
|
362
505
|
* The robot keys specified in this array can’t be interpolated.
|
|
363
506
|
*/
|
|
364
507
|
const uninterpolatableKeys = ['interpolate', 'robot', 'use'];
|
|
365
508
|
const uninterpolatableKeySet = new Set(uninterpolatableKeys);
|
|
509
|
+
const robotIdentifierDescription = 'Identifier of the [robot](https://transloadit.com/docs/robots/) to execute';
|
|
366
510
|
export function interpolateRobot(schema) {
|
|
367
511
|
const def = schema._zod.def;
|
|
368
512
|
const shape = typeof def.shape === 'function'
|
|
@@ -377,18 +521,17 @@ export function interpolateRobot(schema) {
|
|
|
377
521
|
])))
|
|
378
522
|
.strict();
|
|
379
523
|
}
|
|
380
|
-
const robotInterpolateBooleanSchema = z
|
|
381
|
-
|
|
382
|
-
.transform((value) => value === true || value === 'true');
|
|
383
|
-
export const robotInterpolateSchema = z
|
|
384
|
-
.union([robotInterpolateBooleanSchema, z.record(z.string(), robotInterpolateBooleanSchema)])
|
|
385
|
-
.describe(`
|
|
524
|
+
const robotInterpolateBooleanSchema = zodInputPreservingTransform(z.union([z.boolean(), booleanStringSchema]), (value) => value === true || value === 'true');
|
|
525
|
+
const robotInterpolateDescription = `
|
|
386
526
|
Controls whether Assembly Variables are interpolated for individual instruction fields.
|
|
387
527
|
|
|
388
528
|
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.
|
|
389
529
|
|
|
390
530
|
Use field names such as \`path\`, or dotted paths such as \`ffmpeg.vf\` for nested objects.
|
|
391
|
-
|
|
531
|
+
`;
|
|
532
|
+
export const robotInterpolateSchema = z
|
|
533
|
+
.union([robotInterpolateBooleanSchema, z.record(z.string(), robotInterpolateBooleanSchema)])
|
|
534
|
+
.describe(robotInterpolateDescription);
|
|
392
535
|
/**
|
|
393
536
|
* Fields that are shared by all Transloadit robots.
|
|
394
537
|
*/
|
|
@@ -397,36 +540,92 @@ export const robotOutputMetaSchema = z.union([
|
|
|
397
540
|
z.boolean(),
|
|
398
541
|
z.array(z.string()),
|
|
399
542
|
]);
|
|
400
|
-
|
|
401
|
-
.object({
|
|
402
|
-
interpolate: robotInterpolateSchema.optional(),
|
|
403
|
-
output_meta: robotOutputMetaSchema.optional().describe(`
|
|
543
|
+
const robotOutputMetaDescription = `
|
|
404
544
|
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.
|
|
405
545
|
|
|
406
546
|
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.
|
|
407
547
|
|
|
408
548
|
For images, you can also add \`"blurhash": true\` to extract a [BlurHash](https://blurha.sh) string — a compact representation of a placeholder for the image, useful for showing a blurred preview while the full image loads.
|
|
409
549
|
|
|
410
|
-
For
|
|
550
|
+
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.
|
|
551
|
+
|
|
552
|
+
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.
|
|
553
|
+
|
|
554
|
+
For videos, you can add the \`"colorspace": true\` parameter to extract the colorspace of the output video.
|
|
411
555
|
|
|
412
556
|
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.
|
|
413
557
|
|
|
414
558
|
For audio, you can add \`"mean_volume": true\` to get a single value representing the mean average volume of the audio file.
|
|
415
559
|
|
|
416
560
|
You can also set this to \`false\` to skip metadata extraction and speed up transcoding.
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
561
|
+
`;
|
|
562
|
+
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`;
|
|
563
|
+
const robotIgnoreErrorsPhaseDescriptions = `Ignore errors during specific phases of processing.
|
|
564
|
+
|
|
565
|
+
Setting this to \`["meta"]\` will cause the Robot to ignore errors during metadata extraction.
|
|
566
|
+
|
|
567
|
+
Setting this to \`["execute"]\` will cause the Robot to ignore errors during the main execution phase.`;
|
|
568
|
+
export const autoProviderDescription = 'Chooses the best provider based on your request.';
|
|
569
|
+
const aiProviderDescription = `${autoProviderDescription}
|
|
570
|
+
|
|
571
|
+
Select a specific provider to override automatic selection.`;
|
|
572
|
+
const legacyFfmpegVersions = formatEnglishList(runtimeStackVersions.ffmpeg.valid.map((version) => JSON.stringify(version)));
|
|
573
|
+
const deprecatedFfmpegVersions = formatEnglishList([
|
|
574
|
+
...new Set(Object.keys(runtimeStackVersions.ffmpeg.deprecated).map((version) => JSON.stringify(`${version.split('.')[0]}.x`))),
|
|
575
|
+
]);
|
|
576
|
+
export const robotParameterDocs = {
|
|
577
|
+
adaptive_filtering: {
|
|
578
|
+
description: `
|
|
579
|
+
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.
|
|
580
|
+
`,
|
|
581
|
+
},
|
|
582
|
+
ai_provider: {
|
|
583
|
+
description: aiProviderDescription,
|
|
584
|
+
},
|
|
585
|
+
audio_bitrate: {
|
|
586
|
+
description: `
|
|
587
|
+
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.
|
|
588
|
+
`,
|
|
589
|
+
},
|
|
590
|
+
audio_preset: {
|
|
591
|
+
description: `
|
|
592
|
+
Performs conversion using pre-configured settings.
|
|
593
|
+
|
|
594
|
+
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.
|
|
595
|
+
|
|
596
|
+
For a list of audio presets, see [audio presets](/docs/presets/audio/).
|
|
597
|
+
`,
|
|
598
|
+
},
|
|
599
|
+
audio_sample_rate: {
|
|
600
|
+
description: `
|
|
601
|
+
Sample rate of the resulting audio file, in Hertz. If not specified will default to the sample rate of the input audio file.
|
|
602
|
+
`,
|
|
603
|
+
},
|
|
604
|
+
auto_provider: {
|
|
605
|
+
description: autoProviderDescription,
|
|
606
|
+
},
|
|
607
|
+
error_msg: {
|
|
608
|
+
description: `
|
|
609
|
+
The error message shown to your users (such as by Uppy) when a file is declined and \`error_on_decline\` is set to \`true\`.
|
|
610
|
+
`,
|
|
611
|
+
},
|
|
612
|
+
error_on_decline: {
|
|
613
|
+
description: `
|
|
614
|
+
If this is set to \`true\` and one or more files are declined, the Assembly will be stopped and marked with an error.
|
|
615
|
+
`,
|
|
616
|
+
},
|
|
617
|
+
ffmpeg: {
|
|
618
|
+
description: `
|
|
619
|
+
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.
|
|
620
|
+
`,
|
|
621
|
+
},
|
|
622
|
+
ffmpeg_stack: {
|
|
623
|
+
description: `
|
|
624
|
+
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.
|
|
625
|
+
`,
|
|
626
|
+
},
|
|
627
|
+
force_accept: {
|
|
628
|
+
description: `Force a Robot to accept a file type it would have ignored.
|
|
430
629
|
|
|
431
630
|
By default, Robots ignore files they are not familiar with.
|
|
432
631
|
[🤖/video/encode](/docs/robots/video-encode/), for
|
|
@@ -434,27 +633,228 @@ example, will happily ignore input images.
|
|
|
434
633
|
|
|
435
634
|
With the \`force_accept\` parameter set to \`true\`, you can force Robots to accept all files thrown at them.
|
|
436
635
|
This will typically lead to errors and should only be used for debugging or combatting edge cases.
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
636
|
+
`,
|
|
637
|
+
},
|
|
638
|
+
force_name: {
|
|
639
|
+
description: 'Custom name for the imported file(s). By default file names are derived from the source.',
|
|
640
|
+
},
|
|
641
|
+
ignore_errors: {
|
|
642
|
+
description: `
|
|
643
|
+
${robotIgnoreErrorsPhaseDescriptions}
|
|
444
644
|
|
|
445
|
-
Setting this to \`["meta"]\` will
|
|
645
|
+
Setting this to \`true\` is equivalent to \`["meta", "execute"]\` and will ignore errors in both phases.
|
|
646
|
+
`,
|
|
647
|
+
},
|
|
648
|
+
import_ignore_errors: {
|
|
649
|
+
description: `
|
|
650
|
+
${robotIgnoreErrorsPhaseDescriptions}
|
|
446
651
|
|
|
447
|
-
Setting this to \`["
|
|
652
|
+
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.
|
|
448
653
|
|
|
449
|
-
Setting this to \`true\` is equivalent to \`["meta", "execute"]\` and will ignore errors in
|
|
450
|
-
|
|
654
|
+
Setting this to \`true\` is equivalent to \`["meta", "import", "execute"]\` and will ignore errors in all three phases.
|
|
655
|
+
`,
|
|
656
|
+
},
|
|
657
|
+
import_on_errors: {
|
|
658
|
+
description: `
|
|
659
|
+
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.
|
|
660
|
+
`,
|
|
661
|
+
},
|
|
662
|
+
interpolate: {
|
|
663
|
+
description: robotInterpolateDescription,
|
|
664
|
+
},
|
|
665
|
+
ocr_format: {
|
|
666
|
+
description: `
|
|
667
|
+
In what format to return the extracted text.
|
|
668
|
+
- \`"json"\` returns a JSON file.
|
|
669
|
+
- \`"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.
|
|
670
|
+
- \`"text"\` returns the recognized text as a plain UTF-8 encoded text file.
|
|
671
|
+
`,
|
|
672
|
+
},
|
|
673
|
+
ocr_granularity: {
|
|
674
|
+
description: `
|
|
675
|
+
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"\`.
|
|
676
|
+
`,
|
|
677
|
+
},
|
|
678
|
+
ocr_provider: {
|
|
679
|
+
description: `${aiProviderDescription}
|
|
680
|
+
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/).
|
|
681
|
+
`,
|
|
682
|
+
},
|
|
683
|
+
output_meta: {
|
|
684
|
+
description: robotOutputMetaDescription,
|
|
685
|
+
},
|
|
686
|
+
queue: {
|
|
687
|
+
description: robotQueueDescription,
|
|
688
|
+
},
|
|
689
|
+
result: {
|
|
690
|
+
description: 'Whether the results of this Step should be present in the Assembly Status JSON',
|
|
691
|
+
},
|
|
692
|
+
return_file_stubs: {
|
|
693
|
+
description: `
|
|
694
|
+
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.
|
|
695
|
+
`,
|
|
696
|
+
},
|
|
697
|
+
robot: {
|
|
698
|
+
description: `
|
|
699
|
+
Specifies which Robot should process files passed to this Step.
|
|
700
|
+
|
|
701
|
+
See [all Robots](https://transloadit.com/docs/robots/), each with their own parameters, such as
|
|
702
|
+
\`width\` to control how an image is resized. The full list of parameters per Robot can be taken
|
|
703
|
+
from the Robot docs.
|
|
704
|
+
`,
|
|
705
|
+
},
|
|
706
|
+
seed: {
|
|
707
|
+
description: 'Seed for the random number generator.',
|
|
708
|
+
},
|
|
709
|
+
sort_by: {
|
|
710
|
+
description: `
|
|
711
|
+
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\`.
|
|
712
|
+
|
|
713
|
+
The default \`"basename"\` keeps the legacy natural basename sorting behavior.
|
|
714
|
+
|
|
715
|
+
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.
|
|
716
|
+
`,
|
|
717
|
+
},
|
|
718
|
+
use: {
|
|
719
|
+
description: `
|
|
720
|
+
Specifies which Step(s) to use as input.
|
|
721
|
+
|
|
722
|
+
- You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
|
|
723
|
+
- You can provide several Steps as input with arrays:
|
|
724
|
+
\`\`\`json
|
|
725
|
+
{
|
|
726
|
+
"use": [
|
|
727
|
+
":original",
|
|
728
|
+
"encoded",
|
|
729
|
+
"resized"
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
\`\`\`
|
|
733
|
+
- You can also tag input Steps with \`as\` to pass semantic intent to robots:
|
|
734
|
+
\`\`\`json
|
|
735
|
+
{
|
|
736
|
+
"use": [
|
|
737
|
+
{
|
|
738
|
+
"name": ":original",
|
|
739
|
+
"as": "image"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"name": ":original",
|
|
743
|
+
"as": "mask"
|
|
744
|
+
}
|
|
745
|
+
]
|
|
746
|
+
}
|
|
747
|
+
\`\`\`
|
|
748
|
+
|
|
749
|
+
> [!Tip]
|
|
750
|
+
> That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
|
|
751
|
+
`,
|
|
752
|
+
},
|
|
753
|
+
user_meta: {
|
|
754
|
+
description: `
|
|
755
|
+
Adds custom JSON metadata to each emitted file without changing its contents. Nested objects and arrays are supported.
|
|
756
|
+
|
|
757
|
+
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.
|
|
758
|
+
|
|
759
|
+
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.
|
|
760
|
+
|
|
761
|
+
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.
|
|
762
|
+
`,
|
|
763
|
+
},
|
|
764
|
+
video_background: {
|
|
765
|
+
description: `
|
|
766
|
+
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.
|
|
767
|
+
`,
|
|
768
|
+
},
|
|
769
|
+
video_height: {
|
|
770
|
+
description: `
|
|
771
|
+
Height of the new video, in pixels.
|
|
772
|
+
|
|
773
|
+
If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied height](/docs/presets/video/) will be implemented.
|
|
774
|
+
`,
|
|
775
|
+
},
|
|
776
|
+
video_preset: {
|
|
777
|
+
description: `
|
|
778
|
+
Converts a video according to [pre-configured settings](/docs/presets/video/).
|
|
779
|
+
|
|
780
|
+
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.
|
|
781
|
+
`,
|
|
782
|
+
},
|
|
783
|
+
video_width: {
|
|
784
|
+
description: `
|
|
785
|
+
Width of the new video, in pixels.
|
|
786
|
+
|
|
787
|
+
If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied width](/docs/presets/video/) will be implemented.
|
|
788
|
+
`,
|
|
789
|
+
},
|
|
790
|
+
};
|
|
791
|
+
export const inputSortBySchema = z
|
|
792
|
+
.enum(['auto', 'basename', 'import_order'])
|
|
793
|
+
.default('basename')
|
|
794
|
+
.describe(robotParameterDocs.sort_by.description);
|
|
795
|
+
export const robotPathSchema = z
|
|
796
|
+
.string()
|
|
797
|
+
.regex(/^\/[a-z0-9_-]+\/[a-z0-9_-]+$/u)
|
|
798
|
+
.describe(robotParameterDocs.robot.description);
|
|
799
|
+
export const robotBase = z
|
|
800
|
+
.object({
|
|
801
|
+
interpolate: optionalWithV3Semantics(robotInterpolateSchema),
|
|
802
|
+
output_meta: optionalWithV3Semantics(robotOutputMetaSchema)
|
|
803
|
+
.describe(robotParameterDocs.output_meta.description),
|
|
804
|
+
user_meta: z.record(z.string(), z.unknown()).default({}).describe(robotParameterDocs.user_meta.description),
|
|
805
|
+
result: z.boolean().default(false).describe(robotParameterDocs.result.description),
|
|
806
|
+
queue: optionalWithV3Semantics(z.enum(['batch'])).describe(robotParameterDocs.queue.description),
|
|
807
|
+
force_accept: z.boolean().default(false).describe(robotParameterDocs.force_accept.description),
|
|
808
|
+
ignore_errors: zodInputPreservingTransform(z.union([z.boolean(), z.array(z.enum(['meta', 'execute']))]), (value) => (value === true ? ['meta', 'execute'] : value === false ? [] : value))
|
|
809
|
+
.default([])
|
|
810
|
+
.describe(robotParameterDocs.ignore_errors.description),
|
|
451
811
|
})
|
|
452
812
|
.strict();
|
|
813
|
+
/**
|
|
814
|
+
* Standard variants for strict Robot instructions without catchalls. Keep this outside the adapter
|
|
815
|
+
* replaced by the SDK's Zod 4 sync. Inference uses the active Zod version's object types.
|
|
816
|
+
*/
|
|
817
|
+
export function createRobotSchemaVariants(schema) {
|
|
818
|
+
const strictSchema = schema.strict();
|
|
819
|
+
const result = schema.shape.result;
|
|
820
|
+
const withHiddenFields = strictSchema
|
|
821
|
+
.merge(z.object({ result: optionalWithV3Semantics(z.union([z.literal('debug'), result])) }))
|
|
822
|
+
.strict();
|
|
823
|
+
return {
|
|
824
|
+
schema,
|
|
825
|
+
withHiddenFields,
|
|
826
|
+
interpolatable: interpolateRobot(strictSchema),
|
|
827
|
+
interpolatableWithHiddenFields: interpolateRobot(withHiddenFields),
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
/** Standard strict variants with extra internal fields. */
|
|
831
|
+
export function extendRobotSchemaVariants(schema, hiddenFields) {
|
|
832
|
+
const strictSchema = schema.strict();
|
|
833
|
+
const result = schema.shape.result;
|
|
834
|
+
const withHiddenFields = strictSchema.extend({
|
|
835
|
+
result: optionalWithV3Semantics(z.union([z.literal('debug'), result])),
|
|
836
|
+
...hiddenFields,
|
|
837
|
+
});
|
|
838
|
+
return {
|
|
839
|
+
schema,
|
|
840
|
+
withHiddenFields,
|
|
841
|
+
interpolatable: interpolateRobot(strictSchema),
|
|
842
|
+
interpolatableWithHiddenFields: interpolateRobot(withHiddenFields),
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
/** Define a strict Robot's schema variants together with its metadata. */
|
|
846
|
+
export function defineRobot(meta, schema) {
|
|
847
|
+
return { meta, ...createRobotSchemaVariants(schema) };
|
|
848
|
+
}
|
|
849
|
+
/** Define a strict Robot with extra internal fields and its metadata. */
|
|
850
|
+
export function defineRobotWithHiddenFields(meta, schema, hiddenFields) {
|
|
851
|
+
return { meta, ...extendRobotSchemaVariants(schema, hiddenFields) };
|
|
852
|
+
}
|
|
453
853
|
export const useParamObjectSchema = z
|
|
454
854
|
.object({
|
|
455
855
|
name: z.string(),
|
|
456
|
-
fields: z.string()
|
|
457
|
-
as: z.string()
|
|
856
|
+
fields: optionalWithV3Semantics(z.string()),
|
|
857
|
+
as: optionalWithV3Semantics(z.string()),
|
|
458
858
|
})
|
|
459
859
|
.strict();
|
|
460
860
|
export const useParamStringSchema = z.string();
|
|
@@ -468,11 +868,10 @@ export const useParamStepsSchema = z.union([
|
|
|
468
868
|
export const useParamObjectOfStepsSchema = z
|
|
469
869
|
.object({
|
|
470
870
|
steps: useParamStepsSchema,
|
|
471
|
-
bundle_steps: z.boolean()
|
|
472
|
-
group_by_original: z.boolean()
|
|
473
|
-
fields: z
|
|
474
|
-
.array(z.string())
|
|
475
|
-
.optional()
|
|
871
|
+
bundle_steps: optionalWithV3Semantics(z.boolean()),
|
|
872
|
+
group_by_original: optionalWithV3Semantics(z.boolean()),
|
|
873
|
+
fields: optionalWithV3Semantics(z
|
|
874
|
+
.array(z.string()))
|
|
476
875
|
.describe(`
|
|
477
876
|
Array of field names to filter input files by when using steps.
|
|
478
877
|
`),
|
|
@@ -480,7 +879,7 @@ Array of field names to filter input files by when using steps.
|
|
|
480
879
|
.strict();
|
|
481
880
|
// Hidden fields variants for use parameters
|
|
482
881
|
export const useParamObjectWithHiddenFieldsSchema = useParamObjectSchema.extend({
|
|
483
|
-
result: z.union([z.literal('debug'), z.boolean()])
|
|
882
|
+
result: optionalWithV3Semantics(z.union([z.literal('debug'), z.boolean()])),
|
|
484
883
|
});
|
|
485
884
|
export const useParamArrayOfUseParamObjectWithHiddenFieldsSchema = z.array(useParamObjectWithHiddenFieldsSchema);
|
|
486
885
|
export const useParamStepsWithHiddenFieldsSchema = z.union([
|
|
@@ -491,11 +890,10 @@ export const useParamStepsWithHiddenFieldsSchema = z.union([
|
|
|
491
890
|
export const useParamObjectOfStepsWithHiddenFieldsSchema = z
|
|
492
891
|
.object({
|
|
493
892
|
steps: useParamStepsWithHiddenFieldsSchema,
|
|
494
|
-
bundle_steps: z.boolean()
|
|
495
|
-
group_by_original: z.boolean()
|
|
496
|
-
fields: z
|
|
497
|
-
.array(z.string())
|
|
498
|
-
.optional()
|
|
893
|
+
bundle_steps: optionalWithV3Semantics(z.boolean()),
|
|
894
|
+
group_by_original: optionalWithV3Semantics(z.boolean()),
|
|
895
|
+
fields: optionalWithV3Semantics(z
|
|
896
|
+
.array(z.string()))
|
|
499
897
|
.describe(`
|
|
500
898
|
Array of field names to filter input files by when using steps.
|
|
501
899
|
`),
|
|
@@ -503,100 +901,27 @@ Array of field names to filter input files by when using steps.
|
|
|
503
901
|
.strict();
|
|
504
902
|
export const robotUse = z
|
|
505
903
|
.object({
|
|
506
|
-
use: z
|
|
904
|
+
use: optionalWithV3Semantics(z
|
|
507
905
|
.union([useParamStepsSchema, useParamObjectOfStepsSchema])
|
|
508
|
-
.describe(
|
|
509
|
-
Specifies which Step(s) to use as input.
|
|
510
|
-
|
|
511
|
-
- You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
|
|
512
|
-
- You can provide several Steps as input with arrays:
|
|
513
|
-
\`\`\`json
|
|
514
|
-
{
|
|
515
|
-
"use": [
|
|
516
|
-
":original",
|
|
517
|
-
"encoded",
|
|
518
|
-
"resized"
|
|
519
|
-
]
|
|
520
|
-
}
|
|
521
|
-
\`\`\`
|
|
522
|
-
- You can also tag an input Step with \`as\` to pass semantic intent to robots:
|
|
523
|
-
- You can also tag input Steps with \`as\` to pass semantic intent to robots:
|
|
524
|
-
\`\`\`json
|
|
525
|
-
{
|
|
526
|
-
"use": [
|
|
527
|
-
{
|
|
528
|
-
"name": ":original",
|
|
529
|
-
"as": "image"
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
"name": ":original",
|
|
533
|
-
"as": "mask"
|
|
534
|
-
}
|
|
535
|
-
]
|
|
536
|
-
}
|
|
537
|
-
\`\`\`
|
|
538
|
-
|
|
539
|
-
> [!Tip]
|
|
540
|
-
> That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
|
|
541
|
-
`)
|
|
542
|
-
.optional(),
|
|
906
|
+
.describe(robotParameterDocs.use.description)),
|
|
543
907
|
})
|
|
544
908
|
.strict();
|
|
545
909
|
export const robotUseWithHiddenFields = z
|
|
546
910
|
.object({
|
|
547
|
-
use: z
|
|
911
|
+
use: optionalWithV3Semantics(z
|
|
548
912
|
.union([useParamStepsWithHiddenFieldsSchema, useParamObjectOfStepsWithHiddenFieldsSchema])
|
|
549
|
-
.describe(
|
|
550
|
-
Specifies which Step(s) to use as input.
|
|
551
|
-
|
|
552
|
-
- You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
|
|
553
|
-
- You can provide several Steps as input with arrays:
|
|
554
|
-
\`\`\`json
|
|
555
|
-
{
|
|
556
|
-
"use": [
|
|
557
|
-
":original",
|
|
558
|
-
"encoded",
|
|
559
|
-
"resized"
|
|
560
|
-
]
|
|
561
|
-
}
|
|
562
|
-
\`\`\`
|
|
563
|
-
- You can also tag an input Step with \`as\` to pass semantic intent to robots:
|
|
564
|
-
- You can also tag input Steps with \`as\` to pass semantic intent to robots:
|
|
565
|
-
\`\`\`json
|
|
566
|
-
{
|
|
567
|
-
"use": [
|
|
568
|
-
{
|
|
569
|
-
"name": ":original",
|
|
570
|
-
"as": "image"
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"name": ":original",
|
|
574
|
-
"as": "mask"
|
|
575
|
-
}
|
|
576
|
-
]
|
|
577
|
-
}
|
|
578
|
-
\`\`\`
|
|
579
|
-
|
|
580
|
-
> [!Tip]
|
|
581
|
-
> That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
|
|
582
|
-
`)
|
|
583
|
-
.optional(),
|
|
913
|
+
.describe(robotParameterDocs.use.description)),
|
|
584
914
|
})
|
|
585
915
|
.strict();
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
return num;
|
|
596
|
-
}
|
|
597
|
-
return val;
|
|
598
|
-
}, z.number().int().min(1).max(25_000));
|
|
599
|
-
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) {
|
|
600
925
|
if (typeof val === 'string' && val.startsWith('${')) {
|
|
601
926
|
return val;
|
|
602
927
|
}
|
|
@@ -608,126 +933,122 @@ export const complexHeightSchema = z.preprocess((val) => {
|
|
|
608
933
|
return num;
|
|
609
934
|
}
|
|
610
935
|
return val;
|
|
611
|
-
}
|
|
936
|
+
}
|
|
937
|
+
export const complexWidthSchema = zodWithJsonInputSchema(z.preprocess(normalizeComplexDimension, complexDimensionNumberSchema), complexDimensionInputSchema);
|
|
938
|
+
export const complexHeightSchema = zodWithJsonInputSchema(z.preprocess(normalizeComplexDimension, complexDimensionNumberSchema), complexDimensionInputSchema);
|
|
612
939
|
export const robotFFmpeg = z.object({
|
|
613
|
-
ffmpeg: z
|
|
940
|
+
ffmpeg: optionalWithV3Semantics(z
|
|
614
941
|
.object({
|
|
615
|
-
af: z.string()
|
|
616
|
-
'b:a': z.union([z.string(), z.number()])
|
|
617
|
-
'b:v': z.union([z.string(), z.number()])
|
|
618
|
-
'c:a': z.string()
|
|
619
|
-
'c:v': z.string()
|
|
620
|
-
'codec:a': z.string()
|
|
621
|
-
'codec:v': z.string()
|
|
622
|
-
'filter:v': z.string()
|
|
623
|
-
'filter:a': z.string()
|
|
624
|
-
bits_per_mb: z.union([z.string(), z.number()])
|
|
625
|
-
ss: z.union([z.string(), z.number()])
|
|
626
|
-
t: z.union([z.string(), z.number()])
|
|
627
|
-
to: z.union([z.string(), z.number()])
|
|
628
|
-
vendor: z.string()
|
|
942
|
+
af: optionalWithV3Semantics(z.string()),
|
|
943
|
+
'b:a': optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
944
|
+
'b:v': optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
945
|
+
'c:a': optionalWithV3Semantics(z.string()),
|
|
946
|
+
'c:v': optionalWithV3Semantics(z.string()),
|
|
947
|
+
'codec:a': optionalWithV3Semantics(z.string()),
|
|
948
|
+
'codec:v': optionalWithV3Semantics(z.string()),
|
|
949
|
+
'filter:v': optionalWithV3Semantics(z.string()),
|
|
950
|
+
'filter:a': optionalWithV3Semantics(z.string()),
|
|
951
|
+
bits_per_mb: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
952
|
+
ss: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
953
|
+
t: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
954
|
+
to: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
955
|
+
vendor: optionalWithV3Semantics(z.string()),
|
|
629
956
|
shortest: z.boolean().nullish(),
|
|
630
|
-
filter_complex: z.union([z.string(), z.record(z.string(), z.string())])
|
|
631
|
-
'level:v': z.union([z.string(), z.number()])
|
|
632
|
-
'profile:v': z.union([z.number(), z.enum(['baseline', 'main', 'high', 'main10'])])
|
|
633
|
-
'qscale:a': z.number()
|
|
634
|
-
'qscale:v': z.number()
|
|
635
|
-
'x264-params': z.string()
|
|
636
|
-
'overshoot-pct': z.number()
|
|
637
|
-
deadline: z.string()
|
|
638
|
-
'cpu-used': z.string()
|
|
639
|
-
'undershoot-pct': z.number()
|
|
640
|
-
'row-mt': z.number()
|
|
641
|
-
'x265-params': z
|
|
957
|
+
filter_complex: optionalWithV3Semantics(z.union([z.string(), z.record(z.string(), z.string())])),
|
|
958
|
+
'level:v': optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
959
|
+
'profile:v': optionalWithV3Semantics(z.union([z.number(), z.enum(['baseline', 'main', 'high', 'main10'])])),
|
|
960
|
+
'qscale:a': optionalWithV3Semantics(z.number()),
|
|
961
|
+
'qscale:v': optionalWithV3Semantics(z.number()),
|
|
962
|
+
'x264-params': optionalWithV3Semantics(z.string()),
|
|
963
|
+
'overshoot-pct': optionalWithV3Semantics(z.number()),
|
|
964
|
+
deadline: optionalWithV3Semantics(z.string()),
|
|
965
|
+
'cpu-used': optionalWithV3Semantics(z.string()),
|
|
966
|
+
'undershoot-pct': optionalWithV3Semantics(z.number()),
|
|
967
|
+
'row-mt': optionalWithV3Semantics(z.number()),
|
|
968
|
+
'x265-params': optionalWithV3Semantics(z
|
|
642
969
|
.object({
|
|
643
|
-
'vbv-maxrate': z.number()
|
|
644
|
-
'vbv-bufsize': z.number()
|
|
645
|
-
'rc-lookahead': z.number()
|
|
646
|
-
'b-adapt': z.number()
|
|
970
|
+
'vbv-maxrate': optionalWithV3Semantics(z.number()),
|
|
971
|
+
'vbv-bufsize': optionalWithV3Semantics(z.number()),
|
|
972
|
+
'rc-lookahead': optionalWithV3Semantics(z.number()),
|
|
973
|
+
'b-adapt': optionalWithV3Semantics(z.number()),
|
|
647
974
|
})
|
|
648
|
-
.strict()
|
|
649
|
-
|
|
650
|
-
'svtav1-params': z
|
|
975
|
+
.strict()),
|
|
976
|
+
'svtav1-params': optionalWithV3Semantics(z
|
|
651
977
|
.object({
|
|
652
|
-
tune: z.number()
|
|
653
|
-
'enable-qm': z.number()
|
|
654
|
-
'fast-decode': z.number()
|
|
655
|
-
'film-grain-denoise': z.number()
|
|
978
|
+
tune: optionalWithV3Semantics(z.number()),
|
|
979
|
+
'enable-qm': optionalWithV3Semantics(z.number()),
|
|
980
|
+
'fast-decode': optionalWithV3Semantics(z.number()),
|
|
981
|
+
'film-grain-denoise': optionalWithV3Semantics(z.number()),
|
|
656
982
|
})
|
|
657
|
-
.strict()
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
b: z
|
|
983
|
+
.strict()),
|
|
984
|
+
ac: optionalWithV3Semantics(z.number()),
|
|
985
|
+
an: optionalWithV3Semantics(z.boolean()),
|
|
986
|
+
ar: optionalWithV3Semantics(z.number()),
|
|
987
|
+
async: optionalWithV3Semantics(z.number()),
|
|
988
|
+
b: optionalWithV3Semantics(z
|
|
664
989
|
.union([
|
|
665
990
|
z
|
|
666
991
|
.object({
|
|
667
|
-
v: z.number()
|
|
668
|
-
a: z.number()
|
|
992
|
+
v: optionalWithV3Semantics(z.number()),
|
|
993
|
+
a: optionalWithV3Semantics(z.number()),
|
|
669
994
|
})
|
|
670
995
|
.strict(),
|
|
671
996
|
z.string(),
|
|
672
|
-
])
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
codec: z
|
|
997
|
+
])),
|
|
998
|
+
bt: optionalWithV3Semantics(z.union([z.number(), z.string()])),
|
|
999
|
+
bufsize: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
1000
|
+
c: optionalWithV3Semantics(z.string()),
|
|
1001
|
+
codec: optionalWithV3Semantics(z
|
|
678
1002
|
.object({
|
|
679
|
-
v: z.string()
|
|
680
|
-
a: z.string()
|
|
1003
|
+
v: optionalWithV3Semantics(z.string()),
|
|
1004
|
+
a: optionalWithV3Semantics(z.string()),
|
|
681
1005
|
})
|
|
682
|
-
.strict()
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
vbr: z.union([z.string(), z.number()]).optional(),
|
|
1006
|
+
.strict()),
|
|
1007
|
+
coder: optionalWithV3Semantics(z.number()),
|
|
1008
|
+
crf: optionalWithV3Semantics(z.number()),
|
|
1009
|
+
f: optionalWithV3Semantics(z.string()),
|
|
1010
|
+
flags: optionalWithV3Semantics(z.string()),
|
|
1011
|
+
g: optionalWithV3Semantics(z.number()),
|
|
1012
|
+
i_qfactor: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
1013
|
+
keyint_min: optionalWithV3Semantics(z.number()),
|
|
1014
|
+
level: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
1015
|
+
map: optionalWithV3Semantics(z.union([z.string(), z.array(z.string())])),
|
|
1016
|
+
maxrate: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
1017
|
+
me_range: optionalWithV3Semantics(z.number()),
|
|
1018
|
+
movflags: optionalWithV3Semantics(z.string()),
|
|
1019
|
+
partitions: optionalWithV3Semantics(z.string()),
|
|
1020
|
+
pix_fmt: optionalWithV3Semantics(z.string()),
|
|
1021
|
+
preset: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
1022
|
+
profile: optionalWithV3Semantics(z.string()),
|
|
1023
|
+
'q:a': optionalWithV3Semantics(z.number()),
|
|
1024
|
+
qcomp: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
1025
|
+
qdiff: optionalWithV3Semantics(z.number()),
|
|
1026
|
+
qmax: optionalWithV3Semantics(z.number()),
|
|
1027
|
+
qmin: optionalWithV3Semantics(z.number()),
|
|
1028
|
+
r: optionalWithV3Semantics(z.union([z.number(), z.string()]).nullable()),
|
|
1029
|
+
rc_eq: optionalWithV3Semantics(z.string()),
|
|
1030
|
+
refs: optionalWithV3Semantics(z.number()),
|
|
1031
|
+
s: optionalWithV3Semantics(z.string()),
|
|
1032
|
+
sc_threshold: optionalWithV3Semantics(z.number()),
|
|
1033
|
+
sws_flags: optionalWithV3Semantics(z.string()),
|
|
1034
|
+
threads: optionalWithV3Semantics(z.number()),
|
|
1035
|
+
trellis: optionalWithV3Semantics(z.number()),
|
|
1036
|
+
transloaditffpreset: optionalWithV3Semantics(z.literal('empty')),
|
|
1037
|
+
vn: optionalWithV3Semantics(z.boolean()),
|
|
1038
|
+
vf: optionalWithV3Semantics(z.string()),
|
|
1039
|
+
x264opts: optionalWithV3Semantics(z.string()),
|
|
1040
|
+
vbr: optionalWithV3Semantics(z.union([z.string(), z.number()])),
|
|
718
1041
|
})
|
|
719
|
-
.catchall(z.unknown())
|
|
720
|
-
.
|
|
721
|
-
.describe(`
|
|
722
|
-
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.
|
|
723
|
-
`),
|
|
1042
|
+
.catchall(z.unknown()))
|
|
1043
|
+
.describe(robotParameterDocs.ffmpeg.description),
|
|
724
1044
|
ffmpeg_stack: z
|
|
725
1045
|
// Any semver in range is allowed and normalized. The enum is used for editor completions.
|
|
726
|
-
.union([
|
|
727
|
-
.
|
|
728
|
-
.
|
|
729
|
-
|
|
730
|
-
|
|
1046
|
+
.union([
|
|
1047
|
+
z.enum(stackVersions.ffmpeg.suggestedValues),
|
|
1048
|
+
z.string().regex(stackVersions.ffmpeg.test),
|
|
1049
|
+
])
|
|
1050
|
+
.default(runtimeStackVersions.ffmpeg.default)
|
|
1051
|
+
.describe(robotParameterDocs.ffmpeg_stack.description),
|
|
731
1052
|
});
|
|
732
1053
|
/**
|
|
733
1054
|
* Replace all underscores with hyphens.
|
|
@@ -803,43 +1124,15 @@ const audioPresets = createPresets([
|
|
|
803
1124
|
]);
|
|
804
1125
|
export const robotFFmpegAudio = robotFFmpeg
|
|
805
1126
|
.extend({
|
|
806
|
-
preset: z
|
|
807
|
-
.
|
|
808
|
-
.transform(transformPreset)
|
|
809
|
-
.optional()
|
|
810
|
-
.describe(`
|
|
811
|
-
Performs conversion using pre-configured settings.
|
|
812
|
-
|
|
813
|
-
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.
|
|
814
|
-
|
|
815
|
-
For a list of audio presets, see [audio presets](/docs/presets/audio/).
|
|
816
|
-
`),
|
|
1127
|
+
preset: optionalWithV3Semantics(zodInputPreservingTransform(z.enum(audioPresets), transformPreset))
|
|
1128
|
+
.describe(robotParameterDocs.audio_preset.description),
|
|
817
1129
|
})
|
|
818
1130
|
.strict();
|
|
819
1131
|
export const robotFFmpegVideo = robotFFmpeg
|
|
820
1132
|
.extend({
|
|
821
|
-
width: z
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
.min(1)
|
|
825
|
-
.nullish()
|
|
826
|
-
.describe(`
|
|
827
|
-
Width of the new video, in pixels.
|
|
828
|
-
|
|
829
|
-
If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied width](/docs/presets/video/) will be implemented.
|
|
830
|
-
`),
|
|
831
|
-
height: z
|
|
832
|
-
.number()
|
|
833
|
-
.int()
|
|
834
|
-
.min(1)
|
|
835
|
-
.nullish()
|
|
836
|
-
.describe(`
|
|
837
|
-
Height of the new video, in pixels.
|
|
838
|
-
|
|
839
|
-
If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied height](/docs/presets/video/) will be implemented.
|
|
840
|
-
`),
|
|
841
|
-
preset: z
|
|
842
|
-
.enum([
|
|
1133
|
+
width: z.number().int().min(1).nullish().describe(robotParameterDocs.video_width.description),
|
|
1134
|
+
height: z.number().int().min(1).nullish().describe(robotParameterDocs.video_height.description),
|
|
1135
|
+
preset: optionalWithV3Semantics(zodInputPreservingTransform(z.enum([
|
|
843
1136
|
...createPresets([
|
|
844
1137
|
'android',
|
|
845
1138
|
'android-high',
|
|
@@ -934,14 +1227,8 @@ If the value is not specified and the \`preset\` parameter is available, the \`p
|
|
|
934
1227
|
'wmv',
|
|
935
1228
|
]),
|
|
936
1229
|
...audioPresets,
|
|
937
|
-
])
|
|
938
|
-
.
|
|
939
|
-
.optional()
|
|
940
|
-
.describe(`
|
|
941
|
-
Converts a video according to [pre-configured settings](/docs/presets/video/).
|
|
942
|
-
|
|
943
|
-
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.
|
|
944
|
-
`),
|
|
1230
|
+
]), transformPreset))
|
|
1231
|
+
.describe(robotParameterDocs.video_preset.description),
|
|
945
1232
|
})
|
|
946
1233
|
.strict();
|
|
947
1234
|
export const unsafeCoordinatesSchema = z
|
|
@@ -972,11 +1259,63 @@ export const next_page_token = z.string().default('');
|
|
|
972
1259
|
export const files_per_page = z.number().int().default(1000);
|
|
973
1260
|
export const page_number = z.number().int().default(1);
|
|
974
1261
|
export const recursive = z.boolean().default(false);
|
|
1262
|
+
export const bucketImportPath = path.describe(`
|
|
1263
|
+
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\`.
|
|
1264
|
+
|
|
1265
|
+
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/\`.
|
|
1266
|
+
|
|
1267
|
+
Directories are **not** imported recursively. If you want to import files from subdirectories and sub-subdirectories, enable the \`recursive\` parameter.
|
|
1268
|
+
|
|
1269
|
+
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.\`
|
|
1270
|
+
|
|
1271
|
+
You can also use an array of path strings here to import multiple paths in the same <dfn>Robot</dfn>'s <dfn>Step</dfn>.
|
|
1272
|
+
`);
|
|
1273
|
+
export const storeFilePath = z
|
|
1274
|
+
.string()
|
|
1275
|
+
.default('${unique_prefix}/${file.url_name}')
|
|
1276
|
+
.describe(`
|
|
1277
|
+
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.
|
|
1278
|
+
`);
|
|
1279
|
+
export const recursiveImportPageNumber = page_number.describe(`
|
|
1280
|
+
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\`.
|
|
1281
|
+
|
|
1282
|
+
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.
|
|
1283
|
+
`);
|
|
1284
|
+
export const signedSslUrlLifetime = optionalWithV3Semantics(z
|
|
1285
|
+
.number()
|
|
1286
|
+
.int()
|
|
1287
|
+
.min(0))
|
|
1288
|
+
.describe(`
|
|
1289
|
+
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.
|
|
1290
|
+
`);
|
|
1291
|
+
export const recursiveImportPageSize = files_per_page.describe(`
|
|
1292
|
+
The pagination page size. This only works when recursive is \`true\` for now, in order to not break backwards compatibility in non-recursive imports.
|
|
1293
|
+
`);
|
|
1294
|
+
const bucketRegion = optionalWithV3Semantics(z
|
|
1295
|
+
.string())
|
|
1296
|
+
.describe(`
|
|
1297
|
+
The region where the bucket is located.
|
|
1298
|
+
`);
|
|
1299
|
+
export const storePath = z
|
|
1300
|
+
.string()
|
|
1301
|
+
.default('${unique_prefix}/${file.url_name}')
|
|
1302
|
+
.describe(`
|
|
1303
|
+
The path at which the file is to be stored. This may include any available [Assembly variables](/docs/topics/assembly-instructions/#assembly-variables).
|
|
1304
|
+
`);
|
|
1305
|
+
export const storageAcl = z
|
|
1306
|
+
.enum(['private', 'public-read'])
|
|
1307
|
+
.default('public-read')
|
|
1308
|
+
.describe(`
|
|
1309
|
+
The permissions used for this file.
|
|
1310
|
+
`);
|
|
1311
|
+
export const recursiveImport = recursive.describe(`
|
|
1312
|
+
Setting this to \`true\` will enable importing files from subdirectories and sub-subdirectories (etc.) of the given path.
|
|
1313
|
+
|
|
1314
|
+
Please use the pagination parameters \`page_number\` and \`files_per_page\` wisely here.
|
|
1315
|
+
`);
|
|
975
1316
|
export const return_file_stubs = z
|
|
976
1317
|
.boolean()
|
|
977
|
-
.describe(
|
|
978
|
-
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.
|
|
979
|
-
`)
|
|
1318
|
+
.describe(robotParameterDocs.return_file_stubs.description)
|
|
980
1319
|
.default(false);
|
|
981
1320
|
export const port = z.number().int().min(1).max(65535);
|
|
982
1321
|
// TODO: Use an enum.
|
|
@@ -995,13 +1334,24 @@ export const positionSchema = z.enum([
|
|
|
995
1334
|
'top-left',
|
|
996
1335
|
'top-right',
|
|
997
1336
|
]);
|
|
998
|
-
export const percentageSchema = z.string().regex(
|
|
999
|
-
|
|
1337
|
+
export const percentageSchema = z.string().regex(/^[0-9]+%$/u);
|
|
1338
|
+
const portableHttpUrlPattern = /^[Hh][Tt][Tt][Pp][Ss]?:\/\/(?:[^ ]|[ ])/u;
|
|
1339
|
+
const portableHttpUrlInputSchema = z
|
|
1340
|
+
.string()
|
|
1341
|
+
.regex(portableHttpUrlPattern, 'Must be an HTTP or HTTPS URL');
|
|
1342
|
+
export const httpUrlSchema = zodWithConservativeJsonInputSchema(z
|
|
1000
1343
|
.string()
|
|
1001
1344
|
.url()
|
|
1002
|
-
.
|
|
1003
|
-
|
|
1004
|
-
export const
|
|
1345
|
+
.refine((value) => /^https?:\/\//iu.test(value), 'Must be an HTTP or HTTPS URL'), portableHttpUrlInputSchema);
|
|
1346
|
+
/** Header restrictions shared by HTTP import and request documentation. */
|
|
1347
|
+
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.
|
|
1348
|
+
|
|
1349
|
+
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.`;
|
|
1350
|
+
export const color_with_alpha = z.string().regex(/^#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/u);
|
|
1351
|
+
export const color_without_alpha = z.string().regex(/^#?[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/u);
|
|
1352
|
+
export const videoBackgroundSchema = color_with_alpha
|
|
1353
|
+
.default('#00000000')
|
|
1354
|
+
.describe(robotParameterDocs.video_background.description);
|
|
1005
1355
|
// Extended color schemas that also support named colors (for robots that support them)
|
|
1006
1356
|
export const color_with_alpha_with_named = z.union([
|
|
1007
1357
|
color_with_alpha, // Extend the base hex color schema
|
|
@@ -1041,15 +1391,16 @@ export const color_without_alpha_with_named = z.union([
|
|
|
1041
1391
|
]);
|
|
1042
1392
|
export const bitrateSchema = z.number().int().min(1);
|
|
1043
1393
|
export const sampleRateSchema = z.number().int().min(1);
|
|
1044
|
-
export const optimize_priority = z
|
|
1045
|
-
.enum(['compression-ratio', 'conversion-speed'])
|
|
1046
|
-
.default('conversion-speed');
|
|
1394
|
+
export const optimize_priority = z.enum(['compression-ratio', 'conversion-speed']);
|
|
1047
1395
|
export const robotImagemagick = z
|
|
1048
1396
|
.object({
|
|
1049
1397
|
imagemagick_stack: z
|
|
1050
1398
|
// Any semver in range is allowed and normalized. The enum is used for editor completions.
|
|
1051
|
-
.union([
|
|
1052
|
-
.
|
|
1399
|
+
.union([
|
|
1400
|
+
z.enum([stackVersions.imagemagick.recommendedVersion]),
|
|
1401
|
+
z.string().regex(stackVersions.imagemagick.test),
|
|
1402
|
+
])
|
|
1403
|
+
.default(runtimeStackVersions.imagemagick.default),
|
|
1053
1404
|
})
|
|
1054
1405
|
.strict();
|
|
1055
1406
|
export const colorspaceSchema = z.enum([
|
|
@@ -1089,17 +1440,15 @@ export const colorspaceSchema = z.enum([
|
|
|
1089
1440
|
'YPbPr',
|
|
1090
1441
|
'YUV',
|
|
1091
1442
|
]);
|
|
1443
|
+
export const imageAdaptiveFilteringSchema = z
|
|
1444
|
+
.boolean()
|
|
1445
|
+
.default(false)
|
|
1446
|
+
.describe(robotParameterDocs.adaptive_filtering.description);
|
|
1447
|
+
export const imageQualityValueSchema = z.number().int().min(1).max(100);
|
|
1092
1448
|
// TODO: add before and after images to the description.
|
|
1093
|
-
export const imageQualitySchema =
|
|
1094
|
-
.number()
|
|
1095
|
-
.int()
|
|
1096
|
-
.min(1)
|
|
1097
|
-
.max(100)
|
|
1098
|
-
.default(92)
|
|
1099
|
-
.describe(`
|
|
1449
|
+
export const imageQualitySchema = imageQualityValueSchema.default(92).describe(`
|
|
1100
1450
|
Controls the image compression for JPG and PNG images. Please also take a look at [🤖/image/optimize](/docs/robots/image-optimize/).
|
|
1101
1451
|
`);
|
|
1102
|
-
export const autoProviderDescription = 'Chooses the best provider based on your request';
|
|
1103
1452
|
export const awsGcpAiProviderSchema = z.enum(['auto', 'aws', 'gcp']).default('auto');
|
|
1104
1453
|
export const aiProviderSchema = z
|
|
1105
1454
|
.enum(['auto', 'aws', 'gcp', 'replicate', 'fal', 'transloadit'])
|
|
@@ -1111,39 +1460,34 @@ export const robotImport = z
|
|
|
1111
1460
|
.union([z.string(), z.array(z.string())])
|
|
1112
1461
|
.nullable()
|
|
1113
1462
|
.default(null)
|
|
1114
|
-
.describe(
|
|
1115
|
-
ignore_errors: z
|
|
1116
|
-
.
|
|
1117
|
-
.
|
|
1118
|
-
.default([]),
|
|
1463
|
+
.describe(robotParameterDocs.force_name.description),
|
|
1464
|
+
ignore_errors: zodInputPreservingTransform(z.union([z.boolean(), z.array(z.enum(['meta', 'import', 'execute']))]), (value) => (value === true ? ['meta', 'import', 'execute'] : value === false ? [] : value))
|
|
1465
|
+
.default([])
|
|
1466
|
+
.describe(robotParameterDocs.import_ignore_errors.description),
|
|
1119
1467
|
import_on_errors: z
|
|
1120
1468
|
.array(z.enum(['meta']))
|
|
1121
1469
|
.default([])
|
|
1122
|
-
.describe(
|
|
1123
|
-
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.
|
|
1124
|
-
`),
|
|
1470
|
+
.describe(robotParameterDocs.import_on_errors.description),
|
|
1125
1471
|
})
|
|
1126
1472
|
.strict();
|
|
1127
1473
|
export const azureBase = z
|
|
1128
1474
|
.object({
|
|
1129
|
-
credentials: z
|
|
1130
|
-
.string()
|
|
1131
|
-
.optional()
|
|
1475
|
+
credentials: optionalWithV3Semantics(z
|
|
1476
|
+
.string())
|
|
1132
1477
|
.describe(`
|
|
1133
1478
|
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your [Template Credentials](/c/template-credentials/) as this parameter's value. They will contain the values for your Azure Container, Account and Key.
|
|
1134
1479
|
|
|
1135
1480
|
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: \`"account"\`, \`"key"\`, \`"container"\`.
|
|
1136
1481
|
`),
|
|
1137
|
-
account: z.string()
|
|
1138
|
-
container: z.string()
|
|
1139
|
-
key: z.string()
|
|
1482
|
+
account: optionalWithV3Semantics(z.string()),
|
|
1483
|
+
container: optionalWithV3Semantics(z.string()),
|
|
1484
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1140
1485
|
})
|
|
1141
1486
|
.strict();
|
|
1142
1487
|
export const backblazeBase = z
|
|
1143
1488
|
.object({
|
|
1144
|
-
credentials: z
|
|
1145
|
-
.string()
|
|
1146
|
-
.optional()
|
|
1489
|
+
credentials: optionalWithV3Semantics(z
|
|
1490
|
+
.string())
|
|
1147
1491
|
.describe(`
|
|
1148
1492
|
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 Backblaze Bucket Name, App Key ID, and App Key.
|
|
1149
1493
|
|
|
@@ -1155,16 +1499,15 @@ Now that everything is in place, create your key, and take note of the informati
|
|
|
1155
1499
|
|
|
1156
1500
|
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"\`, \`"app_key_id"\`, \`"app_key"\`.
|
|
1157
1501
|
`),
|
|
1158
|
-
bucket: z.string()
|
|
1159
|
-
app_key_id: z.string()
|
|
1160
|
-
app_key: z.string()
|
|
1502
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1503
|
+
app_key_id: optionalWithV3Semantics(z.string()),
|
|
1504
|
+
app_key: optionalWithV3Semantics(z.string()),
|
|
1161
1505
|
})
|
|
1162
1506
|
.strict();
|
|
1163
1507
|
export const boxBase = z
|
|
1164
1508
|
.object({
|
|
1165
|
-
credentials: z
|
|
1166
|
-
.string()
|
|
1167
|
-
.optional()
|
|
1509
|
+
credentials: optionalWithV3Semantics(z
|
|
1510
|
+
.string())
|
|
1168
1511
|
.describe(`
|
|
1169
1512
|
Create a Box app in the [Box Developer Console](https://app.box.com/developers/console) using **Server Authentication (JWT)**.
|
|
1170
1513
|
|
|
@@ -1178,58 +1521,54 @@ If your Box enterprise requires it, make sure the app is authorized by an admin
|
|
|
1178
1521
|
.strict();
|
|
1179
1522
|
export const cloudfilesBase = z
|
|
1180
1523
|
.object({
|
|
1181
|
-
credentials: z
|
|
1182
|
-
.string()
|
|
1183
|
-
.optional()
|
|
1524
|
+
credentials: optionalWithV3Semantics(z
|
|
1525
|
+
.string())
|
|
1184
1526
|
.describe(`
|
|
1185
1527
|
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your [Template Credentials](/c/template-credentials/) as this parameter's value. They will contain the values for your Cloud Files Container, User, Key, Account type and Data center.
|
|
1186
1528
|
|
|
1187
1529
|
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: \`"account_type"\` ("us" or "uk"), \`"data_center"\` ("dfw" for Dallas or "ord" for Chicago for example), \`"user"\`, \`"key"\`, \`"container"\`.
|
|
1188
1530
|
`),
|
|
1189
|
-
account_type: z.enum(['uk', 'us'])
|
|
1190
|
-
data_center: z.string()
|
|
1191
|
-
user: z.string()
|
|
1192
|
-
key: z.string()
|
|
1193
|
-
container: z.string()
|
|
1531
|
+
account_type: optionalWithV3Semantics(z.enum(['uk', 'us'])),
|
|
1532
|
+
data_center: optionalWithV3Semantics(z.string()),
|
|
1533
|
+
user: optionalWithV3Semantics(z.string()),
|
|
1534
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1535
|
+
container: optionalWithV3Semantics(z.string()),
|
|
1194
1536
|
})
|
|
1195
1537
|
.strict();
|
|
1196
1538
|
export const cloudflareBase = z
|
|
1197
1539
|
.object({
|
|
1198
|
-
credentials: z
|
|
1199
|
-
.string()
|
|
1200
|
-
.optional()
|
|
1540
|
+
credentials: optionalWithV3Semantics(z
|
|
1541
|
+
.string())
|
|
1201
1542
|
.describe(`
|
|
1202
|
-
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
|
|
1543
|
+
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.
|
|
1203
1544
|
|
|
1204
1545
|
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"\`.
|
|
1205
1546
|
`),
|
|
1206
|
-
bucket: z.string()
|
|
1207
|
-
host: z.string()
|
|
1208
|
-
key: z.string()
|
|
1209
|
-
secret: z.string()
|
|
1547
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1548
|
+
host: optionalWithV3Semantics(z.string()),
|
|
1549
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1550
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1210
1551
|
})
|
|
1211
1552
|
.strict();
|
|
1212
1553
|
export const digitalOceanBase = z
|
|
1213
1554
|
.object({
|
|
1214
|
-
credentials: z
|
|
1215
|
-
.string()
|
|
1216
|
-
.optional()
|
|
1555
|
+
credentials: optionalWithV3Semantics(z
|
|
1556
|
+
.string())
|
|
1217
1557
|
.describe(`
|
|
1218
1558
|
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your [Template Credentials](/c/template-credentials/) as this parameter's value. They will contain the values for your DigitalOcean Space, Key, Secret and Region.
|
|
1219
1559
|
|
|
1220
1560
|
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: \`"space"\`, \`"region"\` (for example: \`"fra1"\` or \`"nyc3"\`), \`"key"\`, \`"secret"\`.
|
|
1221
1561
|
`),
|
|
1222
|
-
space: z.string()
|
|
1223
|
-
region: z.string()
|
|
1224
|
-
key: z.string()
|
|
1225
|
-
secret: z.string()
|
|
1562
|
+
space: optionalWithV3Semantics(z.string()),
|
|
1563
|
+
region: optionalWithV3Semantics(z.string()),
|
|
1564
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1565
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1226
1566
|
})
|
|
1227
1567
|
.strict();
|
|
1228
1568
|
export const dropboxBase = z
|
|
1229
1569
|
.object({
|
|
1230
|
-
credentials: z
|
|
1231
|
-
.string()
|
|
1232
|
-
.optional()
|
|
1570
|
+
credentials: optionalWithV3Semantics(z
|
|
1571
|
+
.string())
|
|
1233
1572
|
.describe(`
|
|
1234
1573
|
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 Dropbox access token.
|
|
1235
1574
|
`),
|
|
@@ -1237,9 +1576,8 @@ Please create your associated <dfn>Template Credentials</dfn> in your Transloadi
|
|
|
1237
1576
|
.strict();
|
|
1238
1577
|
export const vimeoBase = z
|
|
1239
1578
|
.object({
|
|
1240
|
-
credentials: z
|
|
1241
|
-
.string()
|
|
1242
|
-
.optional()
|
|
1579
|
+
credentials: optionalWithV3Semantics(z
|
|
1580
|
+
.string())
|
|
1243
1581
|
.describe(`
|
|
1244
1582
|
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 Vimeo access token.
|
|
1245
1583
|
`),
|
|
@@ -1247,25 +1585,23 @@ Please create your associated <dfn>Template Credentials</dfn> in your Transloadi
|
|
|
1247
1585
|
.strict();
|
|
1248
1586
|
export const ftpBase = z
|
|
1249
1587
|
.object({
|
|
1250
|
-
credentials: z
|
|
1251
|
-
.string()
|
|
1252
|
-
.optional()
|
|
1588
|
+
credentials: optionalWithV3Semantics(z
|
|
1589
|
+
.string())
|
|
1253
1590
|
.describe(`
|
|
1254
1591
|
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 FTP host, user and password.
|
|
1255
1592
|
|
|
1256
1593
|
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> with their static nature is too unwieldy. If you have this requirement, feel free to use the following parameters instead: \`"host"\`, \`"user"\`, \`"password"\`.
|
|
1257
1594
|
`),
|
|
1258
|
-
host: z.string()
|
|
1595
|
+
host: optionalWithV3Semantics(z.string()),
|
|
1259
1596
|
port: port.default(21).describe('The port to use for the FTP connection.'),
|
|
1260
|
-
user: z.string()
|
|
1261
|
-
password: z.string()
|
|
1597
|
+
user: optionalWithV3Semantics(z.string()),
|
|
1598
|
+
password: optionalWithV3Semantics(z.string()),
|
|
1262
1599
|
})
|
|
1263
1600
|
.strict();
|
|
1264
1601
|
export const googleBase = z
|
|
1265
1602
|
.object({
|
|
1266
|
-
credentials: z
|
|
1267
|
-
.string()
|
|
1268
|
-
.optional()
|
|
1603
|
+
credentials: optionalWithV3Semantics(z
|
|
1604
|
+
.string())
|
|
1269
1605
|
.describe(`
|
|
1270
1606
|
Create a new [Google service account](https://cloud.google.com/storage/docs/authentication). Set its role to "Storage Object Creator". Choose "JSON" for the key file format and download it to your computer. You will need to upload this file when creating your <dfn>Template Credentials</dfn>.
|
|
1271
1607
|
|
|
@@ -1283,79 +1619,69 @@ Then, create your associated [Template Credentials](/c/template-credentials/) in
|
|
|
1283
1619
|
.strict();
|
|
1284
1620
|
export const minioBase = z
|
|
1285
1621
|
.object({
|
|
1286
|
-
credentials: z
|
|
1287
|
-
.string()
|
|
1288
|
-
.optional()
|
|
1622
|
+
credentials: optionalWithV3Semantics(z
|
|
1623
|
+
.string())
|
|
1289
1624
|
.describe(`
|
|
1290
1625
|
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your MinIO bucket, Key, Secret and Bucket region.
|
|
1291
1626
|
|
|
1292
1627
|
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"\`.
|
|
1293
1628
|
`),
|
|
1294
|
-
bucket: z.string()
|
|
1295
|
-
host: z.string()
|
|
1296
|
-
key: z.string()
|
|
1297
|
-
secret: z.string()
|
|
1629
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1630
|
+
host: optionalWithV3Semantics(z.string()),
|
|
1631
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1632
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1298
1633
|
})
|
|
1299
1634
|
.strict();
|
|
1300
1635
|
export const megaBase = z
|
|
1301
1636
|
.object({
|
|
1302
|
-
credentials: z
|
|
1303
|
-
.string()
|
|
1304
|
-
.optional()
|
|
1637
|
+
credentials: optionalWithV3Semantics(z
|
|
1638
|
+
.string())
|
|
1305
1639
|
.describe(`
|
|
1306
|
-
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
|
|
1640
|
+
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.
|
|
1307
1641
|
|
|
1308
1642
|
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"\`.
|
|
1309
1643
|
`),
|
|
1310
|
-
bucket: z.string()
|
|
1311
|
-
bucket_region:
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
The region where the bucket is located.
|
|
1316
|
-
`),
|
|
1317
|
-
host: z.string().optional(),
|
|
1318
|
-
key: z.string().optional(),
|
|
1319
|
-
secret: z.string().optional(),
|
|
1644
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1645
|
+
bucket_region: bucketRegion,
|
|
1646
|
+
host: optionalWithV3Semantics(z.string()),
|
|
1647
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1648
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1320
1649
|
})
|
|
1321
1650
|
.strict();
|
|
1322
1651
|
export const s3Base = z
|
|
1323
1652
|
.object({
|
|
1324
|
-
credentials: z
|
|
1325
|
-
.string()
|
|
1326
|
-
.optional()
|
|
1653
|
+
credentials: optionalWithV3Semantics(z
|
|
1654
|
+
.string())
|
|
1327
1655
|
.describe(`
|
|
1328
|
-
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
|
|
1656
|
+
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\`.
|
|
1329
1657
|
|
|
1330
1658
|
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"\`.
|
|
1331
1659
|
`),
|
|
1332
|
-
bucket: z.string()
|
|
1333
|
-
bucket_region: z.string()
|
|
1334
|
-
key: z.string()
|
|
1335
|
-
secret: z.string()
|
|
1660
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1661
|
+
bucket_region: optionalWithV3Semantics(z.string()),
|
|
1662
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1663
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1336
1664
|
})
|
|
1337
1665
|
.strict();
|
|
1338
1666
|
export const sftpBase = z
|
|
1339
1667
|
.object({
|
|
1340
|
-
credentials: z
|
|
1341
|
-
.string()
|
|
1342
|
-
.optional()
|
|
1668
|
+
credentials: optionalWithV3Semantics(z
|
|
1669
|
+
.string())
|
|
1343
1670
|
.describe(`
|
|
1344
1671
|
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 SFTP host, user and optional custom public key.
|
|
1345
1672
|
|
|
1346
1673
|
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: \`"host"\`, \`"port"\`, \`"user"\`, \`"public_key"\` (optional).
|
|
1347
1674
|
`),
|
|
1348
|
-
host: z.string()
|
|
1675
|
+
host: optionalWithV3Semantics(z.string()),
|
|
1349
1676
|
port: port.default(21).describe('The port to use for the FTP connection.'),
|
|
1350
|
-
user: z.string()
|
|
1351
|
-
public_key: z.string()
|
|
1677
|
+
user: optionalWithV3Semantics(z.string()),
|
|
1678
|
+
public_key: optionalWithV3Semantics(z.string()),
|
|
1352
1679
|
})
|
|
1353
1680
|
.strict();
|
|
1354
1681
|
export const supabaseBase = z
|
|
1355
1682
|
.object({
|
|
1356
|
-
credentials: z
|
|
1357
|
-
.string()
|
|
1358
|
-
.optional()
|
|
1683
|
+
credentials: optionalWithV3Semantics(z
|
|
1684
|
+
.string())
|
|
1359
1685
|
.describe(`
|
|
1360
1686
|
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 Supabase bucket, Key, Secret and Bucket region.
|
|
1361
1687
|
|
|
@@ -1363,82 +1689,62 @@ While we recommend to use <dfn>Template Credentials</dfn> at all times, some use
|
|
|
1363
1689
|
|
|
1364
1690
|
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"\`.
|
|
1365
1691
|
`),
|
|
1366
|
-
bucket: z.string()
|
|
1367
|
-
bucket_region:
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
The region where the bucket is located.
|
|
1372
|
-
`),
|
|
1373
|
-
host: z.string().optional(),
|
|
1374
|
-
key: z.string().optional(),
|
|
1375
|
-
secret: z.string().optional(),
|
|
1692
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1693
|
+
bucket_region: bucketRegion,
|
|
1694
|
+
host: optionalWithV3Semantics(z.string()),
|
|
1695
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1696
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1376
1697
|
})
|
|
1377
1698
|
.strict();
|
|
1378
1699
|
export const swiftBase = z
|
|
1379
1700
|
.object({
|
|
1380
|
-
credentials: z
|
|
1381
|
-
.string()
|
|
1382
|
-
.optional()
|
|
1701
|
+
credentials: optionalWithV3Semantics(z
|
|
1702
|
+
.string())
|
|
1383
1703
|
.describe(`
|
|
1384
|
-
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,
|
|
1704
|
+
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.
|
|
1385
1705
|
|
|
1386
1706
|
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"\`.
|
|
1387
1707
|
`),
|
|
1388
|
-
bucket: z.string()
|
|
1389
|
-
|
|
1390
|
-
.string()
|
|
1391
|
-
.optional()
|
|
1708
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1709
|
+
host: optionalWithV3Semantics(z
|
|
1710
|
+
.string())
|
|
1392
1711
|
.describe(`
|
|
1393
|
-
The
|
|
1712
|
+
The S3-compatible object storage endpoint for the OpenStack Swift service. This is required when supplying dynamic credentials directly instead of using Template Credentials.
|
|
1394
1713
|
`),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
secret: z.string().optional(),
|
|
1714
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1715
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1398
1716
|
})
|
|
1399
1717
|
.strict();
|
|
1400
1718
|
export const tigrisBase = z
|
|
1401
1719
|
.object({
|
|
1402
|
-
credentials: z
|
|
1403
|
-
.string()
|
|
1404
|
-
.optional()
|
|
1720
|
+
credentials: optionalWithV3Semantics(z
|
|
1721
|
+
.string())
|
|
1405
1722
|
.describe(`
|
|
1406
|
-
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
|
|
1723
|
+
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.
|
|
1407
1724
|
|
|
1408
1725
|
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"\`.
|
|
1409
1726
|
`),
|
|
1410
|
-
bucket: z.string()
|
|
1411
|
-
bucket_region:
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
The region where the bucket is located.
|
|
1416
|
-
`),
|
|
1417
|
-
host: z.string().optional(),
|
|
1418
|
-
key: z.string().optional(),
|
|
1419
|
-
secret: z.string().optional(),
|
|
1727
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1728
|
+
bucket_region: bucketRegion,
|
|
1729
|
+
host: optionalWithV3Semantics(z.string()),
|
|
1730
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1731
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1420
1732
|
})
|
|
1421
1733
|
.strict();
|
|
1422
1734
|
export const wasabiBase = z
|
|
1423
1735
|
.object({
|
|
1424
|
-
credentials: z
|
|
1425
|
-
.string()
|
|
1426
|
-
.optional()
|
|
1736
|
+
credentials: optionalWithV3Semantics(z
|
|
1737
|
+
.string())
|
|
1427
1738
|
.describe(`
|
|
1428
1739
|
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 Wasabi bucket, Key, Secret and Bucket region.
|
|
1429
1740
|
|
|
1430
1741
|
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"\`.
|
|
1431
1742
|
`),
|
|
1432
|
-
bucket: z.string()
|
|
1433
|
-
bucket_region:
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
The region where the bucket is located.
|
|
1438
|
-
`),
|
|
1439
|
-
host: z.string().optional(),
|
|
1440
|
-
key: z.string().optional(),
|
|
1441
|
-
secret: z.string().optional(),
|
|
1743
|
+
bucket: optionalWithV3Semantics(z.string()),
|
|
1744
|
+
bucket_region: bucketRegion,
|
|
1745
|
+
host: optionalWithV3Semantics(z.string()),
|
|
1746
|
+
key: optionalWithV3Semantics(z.string()),
|
|
1747
|
+
secret: optionalWithV3Semantics(z.string()),
|
|
1442
1748
|
})
|
|
1443
1749
|
.strict();
|
|
1444
1750
|
export const filterExpression = z.union([
|
|
@@ -1496,7 +1802,7 @@ See the [available resize strategies](/docs/topics/resize-strategies/).
|
|
|
1496
1802
|
.describe(`
|
|
1497
1803
|
If this is set to \`false\`, smaller videos will not be stretched to the desired width and height. For details about the impact of zooming for your preferred resize strategy, see the list of available [resize strategies](/docs/topics/resize-strategies/).
|
|
1498
1804
|
`),
|
|
1499
|
-
crop: unsafeCoordinatesSchema
|
|
1805
|
+
crop: optionalWithV3Semantics(unsafeCoordinatesSchema).describe(`
|
|
1500
1806
|
Specify an object containing coordinates for the top left and bottom right corners of the rectangle to be cropped from the original video(s). Values can be integers for absolute pixel values or strings for percentage based values.
|
|
1501
1807
|
|
|
1502
1808
|
For example:
|
|
@@ -1518,10 +1824,8 @@ You can also use a JSON string of such an object with coordinates in similar fas
|
|
|
1518
1824
|
"{\\"x1\\": <Integer>, \\"y1\\": <Integer>, \\"x2\\": <Integer>, \\"y2\\": <Integer>}"
|
|
1519
1825
|
\`\`\`
|
|
1520
1826
|
`),
|
|
1521
|
-
background:
|
|
1522
|
-
|
|
1523
|
-
`),
|
|
1524
|
-
rotate: z
|
|
1827
|
+
background: videoBackgroundSchema,
|
|
1828
|
+
rotate: optionalWithV3Semantics(z
|
|
1525
1829
|
// We can’t use enum.
|
|
1526
1830
|
// See https://github.com/colinhacks/zod/issues/2686
|
|
1527
1831
|
.union([
|
|
@@ -1531,8 +1835,7 @@ The background color of the resulting video the \`"rrggbbaa"\` format (red, gree
|
|
|
1531
1835
|
z.literal(270),
|
|
1532
1836
|
z.literal(360),
|
|
1533
1837
|
z.literal(false),
|
|
1534
|
-
])
|
|
1535
|
-
.optional()
|
|
1838
|
+
]))
|
|
1536
1839
|
.describe(`
|
|
1537
1840
|
Forces the video to be rotated by the specified degree integer. Currently, only multiples of \`90\` are supported. We automatically correct the orientation of many videos when the orientation is provided by the camera. This option is only useful for videos requiring rotation because it was not detected by the camera. If you set \`rotate\` to \`false\` no rotation is performed, even if the metadata contains such instructions.
|
|
1538
1841
|
`),
|
|
@@ -1548,11 +1851,10 @@ Enables hinting for mp4 files, for RTP/RTSP streaming.
|
|
|
1548
1851
|
.describe(`
|
|
1549
1852
|
Splits the video into multiple chunks so that each chunk can be encoded in parallel before all encoded chunks are stitched back together to form the result video. This comes at the expense of extra <dfn>Priority Job Slots</dfn> and may prove to be counter-productive for very small video files.
|
|
1550
1853
|
`),
|
|
1551
|
-
chunk_duration: z
|
|
1854
|
+
chunk_duration: optionalWithV3Semantics(z
|
|
1552
1855
|
.number()
|
|
1553
1856
|
.int()
|
|
1554
|
-
.min(1)
|
|
1555
|
-
.optional()
|
|
1857
|
+
.min(1))
|
|
1556
1858
|
.describe(`
|
|
1557
1859
|
Allows you to specify the duration of each chunk when \`turbo\` is set to \`true\`. This means you can take advantage of that feature while using fewer <dfn>Priority Job Slots</dfn>. For instance, the longer each chunk is, the fewer <dfn>Encoding Jobs</dfn> will need to be used.
|
|
1558
1860
|
`),
|
|
@@ -1590,7 +1892,7 @@ The y-offset in number of pixels at which the watermark will be placed in relati
|
|
|
1590
1892
|
|
|
1591
1893
|
Values can be both positive and negative and yield different results depending on the \`watermark_position\` parameter. Positive values move the watermark closer to the image's center point, whereas negative values move the watermark further away from the image's center point.
|
|
1592
1894
|
`),
|
|
1593
|
-
watermark_size: percentageSchema
|
|
1895
|
+
watermark_size: optionalWithV3Semantics(percentageSchema).describe(`
|
|
1594
1896
|
The size of the watermark, as a percentage, such as \`"50%"\`. How the watermark is resized greatly depends on the \`watermark_resize_strategy\`.
|
|
1595
1897
|
`),
|
|
1596
1898
|
watermark_resize_strategy: z
|
|
@@ -1651,9 +1953,8 @@ The prefix used for the naming. For example, a prefix of \`"segment_"\` would pr
|
|
|
1651
1953
|
.describe(`
|
|
1652
1954
|
The name used for the final segment. Available variables are \`\${segment_prefix}\`, \`\${segment_number}\` and \`\${segment_id}\` (which is a UUIDv4 without dashes).
|
|
1653
1955
|
`),
|
|
1654
|
-
segment_time_delta: z
|
|
1655
|
-
.number()
|
|
1656
|
-
.optional()
|
|
1956
|
+
segment_time_delta: optionalWithV3Semantics(z
|
|
1957
|
+
.number())
|
|
1657
1958
|
.describe(`
|
|
1658
1959
|
Delta to apply to segment duration. This is optional and allows fine-tuning of segment boundaries.
|
|
1659
1960
|
`),
|