@transloadit/node 4.1.3
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/LICENSE +21 -0
- package/README.md +701 -0
- package/dist/ApiError.d.ts +22 -0
- package/dist/ApiError.d.ts.map +1 -0
- package/dist/ApiError.js +33 -0
- package/dist/ApiError.js.map +1 -0
- package/dist/InconsistentResponseError.d.ts +4 -0
- package/dist/InconsistentResponseError.d.ts.map +1 -0
- package/dist/InconsistentResponseError.js +4 -0
- package/dist/InconsistentResponseError.js.map +1 -0
- package/dist/PaginationStream.d.ts +14 -0
- package/dist/PaginationStream.d.ts.map +1 -0
- package/dist/PaginationStream.js +36 -0
- package/dist/PaginationStream.js.map +1 -0
- package/dist/PollingTimeoutError.d.ts +5 -0
- package/dist/PollingTimeoutError.d.ts.map +1 -0
- package/dist/PollingTimeoutError.js +5 -0
- package/dist/PollingTimeoutError.js.map +1 -0
- package/dist/Transloadit.d.ts +250 -0
- package/dist/Transloadit.d.ts.map +1 -0
- package/dist/Transloadit.js +661 -0
- package/dist/Transloadit.js.map +1 -0
- package/dist/alphalib/lib/nativeGlobby.d.ts +14 -0
- package/dist/alphalib/lib/nativeGlobby.d.ts.map +1 -0
- package/dist/alphalib/lib/nativeGlobby.js +181 -0
- package/dist/alphalib/lib/nativeGlobby.js.map +1 -0
- package/dist/alphalib/mcache.d.ts +65 -0
- package/dist/alphalib/mcache.d.ts.map +1 -0
- package/dist/alphalib/mcache.js +135 -0
- package/dist/alphalib/mcache.js.map +1 -0
- package/dist/alphalib/tryCatch.d.ts +21 -0
- package/dist/alphalib/tryCatch.d.ts.map +1 -0
- package/dist/alphalib/tryCatch.js +17 -0
- package/dist/alphalib/tryCatch.js.map +1 -0
- package/dist/alphalib/types/assembliesGet.d.ts +62 -0
- package/dist/alphalib/types/assembliesGet.d.ts.map +1 -0
- package/dist/alphalib/types/assembliesGet.js +33 -0
- package/dist/alphalib/types/assembliesGet.js.map +1 -0
- package/dist/alphalib/types/assemblyReplay.d.ts +7858 -0
- package/dist/alphalib/types/assemblyReplay.d.ts.map +1 -0
- package/dist/alphalib/types/assemblyReplay.js +15 -0
- package/dist/alphalib/types/assemblyReplay.js.map +1 -0
- package/dist/alphalib/types/assemblyReplayNotification.d.ts +7849 -0
- package/dist/alphalib/types/assemblyReplayNotification.d.ts.map +1 -0
- package/dist/alphalib/types/assemblyReplayNotification.js +13 -0
- package/dist/alphalib/types/assemblyReplayNotification.js.map +1 -0
- package/dist/alphalib/types/assemblyStatus.d.ts +71084 -0
- package/dist/alphalib/types/assemblyStatus.d.ts.map +1 -0
- package/dist/alphalib/types/assemblyStatus.js +710 -0
- package/dist/alphalib/types/assemblyStatus.js.map +1 -0
- package/dist/alphalib/types/bill.d.ts +44 -0
- package/dist/alphalib/types/bill.d.ts.map +1 -0
- package/dist/alphalib/types/bill.js +8 -0
- package/dist/alphalib/types/bill.js.map +1 -0
- package/dist/alphalib/types/robots/_index.d.ts +76306 -0
- package/dist/alphalib/types/robots/_index.d.ts.map +1 -0
- package/dist/alphalib/types/robots/_index.js +354 -0
- package/dist/alphalib/types/robots/_index.js.map +1 -0
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts +3533 -0
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts.map +1 -0
- package/dist/alphalib/types/robots/_instructions-primitives.js +1491 -0
- package/dist/alphalib/types/robots/_instructions-primitives.js.map +1 -0
- package/dist/alphalib/types/robots/ai-chat.d.ts +2096 -0
- package/dist/alphalib/types/robots/ai-chat.d.ts.map +1 -0
- package/dist/alphalib/types/robots/ai-chat.js +223 -0
- package/dist/alphalib/types/robots/ai-chat.js.map +1 -0
- package/dist/alphalib/types/robots/assembly-savejson.d.ts +52 -0
- package/dist/alphalib/types/robots/assembly-savejson.d.ts.map +1 -0
- package/dist/alphalib/types/robots/assembly-savejson.js +22 -0
- package/dist/alphalib/types/robots/assembly-savejson.js.map +1 -0
- package/dist/alphalib/types/robots/audio-artwork.d.ts +2867 -0
- package/dist/alphalib/types/robots/audio-artwork.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-artwork.js +73 -0
- package/dist/alphalib/types/robots/audio-artwork.js.map +1 -0
- package/dist/alphalib/types/robots/audio-concat.d.ts +2916 -0
- package/dist/alphalib/types/robots/audio-concat.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-concat.js +106 -0
- package/dist/alphalib/types/robots/audio-concat.js.map +1 -0
- package/dist/alphalib/types/robots/audio-encode.d.ts +2864 -0
- package/dist/alphalib/types/robots/audio-encode.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-encode.js +67 -0
- package/dist/alphalib/types/robots/audio-encode.js.map +1 -0
- package/dist/alphalib/types/robots/audio-loop.d.ts +2879 -0
- package/dist/alphalib/types/robots/audio-loop.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-loop.js +67 -0
- package/dist/alphalib/types/robots/audio-loop.js.map +1 -0
- package/dist/alphalib/types/robots/audio-merge.d.ts +2931 -0
- package/dist/alphalib/types/robots/audio-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-merge.js +101 -0
- package/dist/alphalib/types/robots/audio-merge.js.map +1 -0
- package/dist/alphalib/types/robots/audio-waveform.d.ts +3131 -0
- package/dist/alphalib/types/robots/audio-waveform.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-waveform.js +238 -0
- package/dist/alphalib/types/robots/audio-waveform.js.map +1 -0
- package/dist/alphalib/types/robots/azure-import.d.ts +210 -0
- package/dist/alphalib/types/robots/azure-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/azure-import.js +73 -0
- package/dist/alphalib/types/robots/azure-import.js.map +1 -0
- package/dist/alphalib/types/robots/azure-store.d.ts +562 -0
- package/dist/alphalib/types/robots/azure-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/azure-store.js +115 -0
- package/dist/alphalib/types/robots/azure-store.js.map +1 -0
- package/dist/alphalib/types/robots/backblaze-import.d.ts +210 -0
- package/dist/alphalib/types/robots/backblaze-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/backblaze-import.js +81 -0
- package/dist/alphalib/types/robots/backblaze-import.js.map +1 -0
- package/dist/alphalib/types/robots/backblaze-store.d.ts +478 -0
- package/dist/alphalib/types/robots/backblaze-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/backblaze-store.js +76 -0
- package/dist/alphalib/types/robots/backblaze-store.js.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-import.d.ts +234 -0
- package/dist/alphalib/types/robots/cloudfiles-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-import.js +80 -0
- package/dist/alphalib/types/robots/cloudfiles-import.js.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-store.d.ts +490 -0
- package/dist/alphalib/types/robots/cloudfiles-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-store.js +70 -0
- package/dist/alphalib/types/robots/cloudfiles-store.js.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-import.d.ts +234 -0
- package/dist/alphalib/types/robots/cloudflare-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-import.js +81 -0
- package/dist/alphalib/types/robots/cloudflare-import.js.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-store.d.ts +514 -0
- package/dist/alphalib/types/robots/cloudflare-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-store.js +86 -0
- package/dist/alphalib/types/robots/cloudflare-store.js.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-import.d.ts +234 -0
- package/dist/alphalib/types/robots/digitalocean-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-import.js +78 -0
- package/dist/alphalib/types/robots/digitalocean-import.js.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-store.d.ts +526 -0
- package/dist/alphalib/types/robots/digitalocean-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-store.js +91 -0
- package/dist/alphalib/types/robots/digitalocean-store.js.map +1 -0
- package/dist/alphalib/types/robots/document-autorotate.d.ts +405 -0
- package/dist/alphalib/types/robots/document-autorotate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-autorotate.js +44 -0
- package/dist/alphalib/types/robots/document-autorotate.js.map +1 -0
- package/dist/alphalib/types/robots/document-convert.d.ts +513 -0
- package/dist/alphalib/types/robots/document-convert.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-convert.js +273 -0
- package/dist/alphalib/types/robots/document-convert.js.map +1 -0
- package/dist/alphalib/types/robots/document-merge.d.ts +429 -0
- package/dist/alphalib/types/robots/document-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-merge.js +86 -0
- package/dist/alphalib/types/robots/document-merge.js.map +1 -0
- package/dist/alphalib/types/robots/document-ocr.d.ts +441 -0
- package/dist/alphalib/types/robots/document-ocr.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-ocr.js +86 -0
- package/dist/alphalib/types/robots/document-ocr.js.map +1 -0
- package/dist/alphalib/types/robots/document-split.d.ts +417 -0
- package/dist/alphalib/types/robots/document-split.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-split.js +48 -0
- package/dist/alphalib/types/robots/document-split.js.map +1 -0
- package/dist/alphalib/types/robots/document-thumbs.d.ts +592 -0
- package/dist/alphalib/types/robots/document-thumbs.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-thumbs.js +196 -0
- package/dist/alphalib/types/robots/document-thumbs.js.map +1 -0
- package/dist/alphalib/types/robots/dropbox-import.d.ts +144 -0
- package/dist/alphalib/types/robots/dropbox-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/dropbox-import.js +65 -0
- package/dist/alphalib/types/robots/dropbox-import.js.map +1 -0
- package/dist/alphalib/types/robots/dropbox-store.d.ts +449 -0
- package/dist/alphalib/types/robots/dropbox-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/dropbox-store.js +68 -0
- package/dist/alphalib/types/robots/dropbox-store.js.map +1 -0
- package/dist/alphalib/types/robots/edgly-deliver.d.ts +100 -0
- package/dist/alphalib/types/robots/edgly-deliver.d.ts.map +1 -0
- package/dist/alphalib/types/robots/edgly-deliver.js +46 -0
- package/dist/alphalib/types/robots/edgly-deliver.js.map +1 -0
- package/dist/alphalib/types/robots/file-compress.d.ts +477 -0
- package/dist/alphalib/types/robots/file-compress.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-compress.js +139 -0
- package/dist/alphalib/types/robots/file-compress.js.map +1 -0
- package/dist/alphalib/types/robots/file-decompress.d.ts +404 -0
- package/dist/alphalib/types/robots/file-decompress.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-decompress.js +94 -0
- package/dist/alphalib/types/robots/file-decompress.js.map +1 -0
- package/dist/alphalib/types/robots/file-filter.d.ts +465 -0
- package/dist/alphalib/types/robots/file-filter.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-filter.js +136 -0
- package/dist/alphalib/types/robots/file-filter.js.map +1 -0
- package/dist/alphalib/types/robots/file-hash.d.ts +417 -0
- package/dist/alphalib/types/robots/file-hash.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-hash.js +59 -0
- package/dist/alphalib/types/robots/file-hash.js.map +1 -0
- package/dist/alphalib/types/robots/file-preview.d.ts +854 -0
- package/dist/alphalib/types/robots/file-preview.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-preview.js +221 -0
- package/dist/alphalib/types/robots/file-preview.js.map +1 -0
- package/dist/alphalib/types/robots/file-read.d.ts +405 -0
- package/dist/alphalib/types/robots/file-read.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-read.js +44 -0
- package/dist/alphalib/types/robots/file-read.js.map +1 -0
- package/dist/alphalib/types/robots/file-serve.d.ts +418 -0
- package/dist/alphalib/types/robots/file-serve.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-serve.js +99 -0
- package/dist/alphalib/types/robots/file-serve.js.map +1 -0
- package/dist/alphalib/types/robots/file-verify.d.ts +441 -0
- package/dist/alphalib/types/robots/file-verify.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-verify.js +73 -0
- package/dist/alphalib/types/robots/file-verify.js.map +1 -0
- package/dist/alphalib/types/robots/file-virusscan.d.ts +435 -0
- package/dist/alphalib/types/robots/file-virusscan.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-virusscan.js +82 -0
- package/dist/alphalib/types/robots/file-virusscan.js.map +1 -0
- package/dist/alphalib/types/robots/file-watermark.d.ts +417 -0
- package/dist/alphalib/types/robots/file-watermark.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-watermark.js +28 -0
- package/dist/alphalib/types/robots/file-watermark.js.map +1 -0
- package/dist/alphalib/types/robots/ftp-import.d.ts +198 -0
- package/dist/alphalib/types/robots/ftp-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/ftp-import.js +60 -0
- package/dist/alphalib/types/robots/ftp-import.js.map +1 -0
- package/dist/alphalib/types/robots/ftp-store.d.ts +532 -0
- package/dist/alphalib/types/robots/ftp-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/ftp-store.js +91 -0
- package/dist/alphalib/types/robots/ftp-store.js.map +1 -0
- package/dist/alphalib/types/robots/google-import.d.ts +174 -0
- package/dist/alphalib/types/robots/google-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/google-import.js +77 -0
- package/dist/alphalib/types/robots/google-import.js.map +1 -0
- package/dist/alphalib/types/robots/google-store.d.ts +476 -0
- package/dist/alphalib/types/robots/google-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/google-store.js +111 -0
- package/dist/alphalib/types/robots/google-store.js.map +1 -0
- package/dist/alphalib/types/robots/html-convert.d.ts +531 -0
- package/dist/alphalib/types/robots/html-convert.d.ts.map +1 -0
- package/dist/alphalib/types/robots/html-convert.js +137 -0
- package/dist/alphalib/types/robots/html-convert.js.map +1 -0
- package/dist/alphalib/types/robots/http-import.d.ts +215 -0
- package/dist/alphalib/types/robots/http-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/http-import.js +135 -0
- package/dist/alphalib/types/robots/http-import.js.map +1 -0
- package/dist/alphalib/types/robots/image-bgremove.d.ts +453 -0
- package/dist/alphalib/types/robots/image-bgremove.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-bgremove.js +65 -0
- package/dist/alphalib/types/robots/image-bgremove.js.map +1 -0
- package/dist/alphalib/types/robots/image-describe.d.ts +453 -0
- package/dist/alphalib/types/robots/image-describe.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-describe.js +86 -0
- package/dist/alphalib/types/robots/image-describe.js.map +1 -0
- package/dist/alphalib/types/robots/image-facedetect.d.ts +477 -0
- package/dist/alphalib/types/robots/image-facedetect.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-facedetect.js +151 -0
- package/dist/alphalib/types/robots/image-facedetect.js.map +1 -0
- package/dist/alphalib/types/robots/image-generate.d.ts +522 -0
- package/dist/alphalib/types/robots/image-generate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-generate.js +64 -0
- package/dist/alphalib/types/robots/image-generate.js.map +1 -0
- package/dist/alphalib/types/robots/image-merge.d.ts +477 -0
- package/dist/alphalib/types/robots/image-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-merge.js +92 -0
- package/dist/alphalib/types/robots/image-merge.js.map +1 -0
- package/dist/alphalib/types/robots/image-ocr.d.ts +441 -0
- package/dist/alphalib/types/robots/image-ocr.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-ocr.js +79 -0
- package/dist/alphalib/types/robots/image-ocr.js.map +1 -0
- package/dist/alphalib/types/robots/image-optimize.d.ts +453 -0
- package/dist/alphalib/types/robots/image-optimize.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-optimize.js +81 -0
- package/dist/alphalib/types/robots/image-optimize.js.map +1 -0
- package/dist/alphalib/types/robots/image-resize.d.ts +1758 -0
- package/dist/alphalib/types/robots/image-resize.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-resize.js +602 -0
- package/dist/alphalib/types/robots/image-resize.js.map +1 -0
- package/dist/alphalib/types/robots/meta-read.d.ts +98 -0
- package/dist/alphalib/types/robots/meta-read.d.ts.map +1 -0
- package/dist/alphalib/types/robots/meta-read.js +24 -0
- package/dist/alphalib/types/robots/meta-read.js.map +1 -0
- package/dist/alphalib/types/robots/meta-write.d.ts +2842 -0
- package/dist/alphalib/types/robots/meta-write.d.ts.map +1 -0
- package/dist/alphalib/types/robots/meta-write.js +66 -0
- package/dist/alphalib/types/robots/meta-write.js.map +1 -0
- package/dist/alphalib/types/robots/minio-import.d.ts +234 -0
- package/dist/alphalib/types/robots/minio-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/minio-import.js +81 -0
- package/dist/alphalib/types/robots/minio-import.js.map +1 -0
- package/dist/alphalib/types/robots/minio-store.d.ts +514 -0
- package/dist/alphalib/types/robots/minio-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/minio-store.js +87 -0
- package/dist/alphalib/types/robots/minio-store.js.map +1 -0
- package/dist/alphalib/types/robots/progress-simulate.d.ts +229 -0
- package/dist/alphalib/types/robots/progress-simulate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/progress-simulate.js +25 -0
- package/dist/alphalib/types/robots/progress-simulate.js.map +1 -0
- package/dist/alphalib/types/robots/s3-import.d.ts +246 -0
- package/dist/alphalib/types/robots/s3-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/s3-import.js +137 -0
- package/dist/alphalib/types/robots/s3-import.js.map +1 -0
- package/dist/alphalib/types/robots/s3-store.d.ts +593 -0
- package/dist/alphalib/types/robots/s3-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/s3-store.js +169 -0
- package/dist/alphalib/types/robots/s3-store.js.map +1 -0
- package/dist/alphalib/types/robots/script-run.d.ts +423 -0
- package/dist/alphalib/types/robots/script-run.d.ts.map +1 -0
- package/dist/alphalib/types/robots/script-run.js +95 -0
- package/dist/alphalib/types/robots/script-run.js.map +1 -0
- package/dist/alphalib/types/robots/sftp-import.d.ts +192 -0
- package/dist/alphalib/types/robots/sftp-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/sftp-import.js +62 -0
- package/dist/alphalib/types/robots/sftp-import.js.map +1 -0
- package/dist/alphalib/types/robots/sftp-store.d.ts +520 -0
- package/dist/alphalib/types/robots/sftp-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/sftp-store.js +83 -0
- package/dist/alphalib/types/robots/sftp-store.js.map +1 -0
- package/dist/alphalib/types/robots/speech-transcribe.d.ts +465 -0
- package/dist/alphalib/types/robots/speech-transcribe.d.ts.map +1 -0
- package/dist/alphalib/types/robots/speech-transcribe.js +103 -0
- package/dist/alphalib/types/robots/speech-transcribe.js.map +1 -0
- package/dist/alphalib/types/robots/supabase-import.d.ts +246 -0
- package/dist/alphalib/types/robots/supabase-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/supabase-import.js +83 -0
- package/dist/alphalib/types/robots/supabase-import.js.map +1 -0
- package/dist/alphalib/types/robots/supabase-store.d.ts +514 -0
- package/dist/alphalib/types/robots/supabase-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/supabase-store.js +77 -0
- package/dist/alphalib/types/robots/supabase-store.js.map +1 -0
- package/dist/alphalib/types/robots/swift-import.d.ts +246 -0
- package/dist/alphalib/types/robots/swift-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/swift-import.js +81 -0
- package/dist/alphalib/types/robots/swift-import.js.map +1 -0
- package/dist/alphalib/types/robots/swift-store.d.ts +526 -0
- package/dist/alphalib/types/robots/swift-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/swift-store.js +84 -0
- package/dist/alphalib/types/robots/swift-store.js.map +1 -0
- package/dist/alphalib/types/robots/text-speak.d.ts +465 -0
- package/dist/alphalib/types/robots/text-speak.d.ts.map +1 -0
- package/dist/alphalib/types/robots/text-speak.js +119 -0
- package/dist/alphalib/types/robots/text-speak.js.map +1 -0
- package/dist/alphalib/types/robots/text-translate.d.ts +441 -0
- package/dist/alphalib/types/robots/text-translate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/text-translate.js +211 -0
- package/dist/alphalib/types/robots/text-translate.js.map +1 -0
- package/dist/alphalib/types/robots/tigris-import.d.ts +244 -0
- package/dist/alphalib/types/robots/tigris-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tigris-import.js +85 -0
- package/dist/alphalib/types/robots/tigris-import.js.map +1 -0
- package/dist/alphalib/types/robots/tigris-store.d.ts +524 -0
- package/dist/alphalib/types/robots/tigris-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tigris-store.js +91 -0
- package/dist/alphalib/types/robots/tigris-store.js.map +1 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts +100 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.js +46 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.js.map +1 -0
- package/dist/alphalib/types/robots/tus-store.d.ts +477 -0
- package/dist/alphalib/types/robots/tus-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tus-store.js +102 -0
- package/dist/alphalib/types/robots/tus-store.js.map +1 -0
- package/dist/alphalib/types/robots/upload-handle.d.ts +100 -0
- package/dist/alphalib/types/robots/upload-handle.d.ts.map +1 -0
- package/dist/alphalib/types/robots/upload-handle.js +66 -0
- package/dist/alphalib/types/robots/upload-handle.js.map +1 -0
- package/dist/alphalib/types/robots/video-adaptive.d.ts +2915 -0
- package/dist/alphalib/types/robots/video-adaptive.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-adaptive.js +144 -0
- package/dist/alphalib/types/robots/video-adaptive.js.map +1 -0
- package/dist/alphalib/types/robots/video-concat.d.ts +2891 -0
- package/dist/alphalib/types/robots/video-concat.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-concat.js +96 -0
- package/dist/alphalib/types/robots/video-concat.js.map +1 -0
- package/dist/alphalib/types/robots/video-encode.d.ts +3280 -0
- package/dist/alphalib/types/robots/video-encode.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-encode.js +107 -0
- package/dist/alphalib/types/robots/video-encode.js.map +1 -0
- package/dist/alphalib/types/robots/video-merge.d.ts +2987 -0
- package/dist/alphalib/types/robots/video-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-merge.js +102 -0
- package/dist/alphalib/types/robots/video-merge.js.map +1 -0
- package/dist/alphalib/types/robots/video-ondemand.d.ts +4553 -0
- package/dist/alphalib/types/robots/video-ondemand.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-ondemand.js +112 -0
- package/dist/alphalib/types/robots/video-ondemand.js.map +1 -0
- package/dist/alphalib/types/robots/video-subtitle.d.ts +2975 -0
- package/dist/alphalib/types/robots/video-subtitle.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-subtitle.js +122 -0
- package/dist/alphalib/types/robots/video-subtitle.js.map +1 -0
- package/dist/alphalib/types/robots/video-thumbs.d.ts +2938 -0
- package/dist/alphalib/types/robots/video-thumbs.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-thumbs.js +122 -0
- package/dist/alphalib/types/robots/video-thumbs.js.map +1 -0
- package/dist/alphalib/types/robots/vimeo-import.d.ts +189 -0
- package/dist/alphalib/types/robots/vimeo-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/vimeo-import.js +92 -0
- package/dist/alphalib/types/robots/vimeo-import.js.map +1 -0
- package/dist/alphalib/types/robots/vimeo-store.d.ts +520 -0
- package/dist/alphalib/types/robots/vimeo-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/vimeo-store.js +115 -0
- package/dist/alphalib/types/robots/vimeo-store.js.map +1 -0
- package/dist/alphalib/types/robots/wasabi-import.d.ts +244 -0
- package/dist/alphalib/types/robots/wasabi-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/wasabi-import.js +85 -0
- package/dist/alphalib/types/robots/wasabi-import.js.map +1 -0
- package/dist/alphalib/types/robots/wasabi-store.d.ts +526 -0
- package/dist/alphalib/types/robots/wasabi-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/wasabi-store.js +85 -0
- package/dist/alphalib/types/robots/wasabi-store.js.map +1 -0
- package/dist/alphalib/types/robots/youtube-store.d.ts +477 -0
- package/dist/alphalib/types/robots/youtube-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/youtube-store.js +122 -0
- package/dist/alphalib/types/robots/youtube-store.js.map +1 -0
- package/dist/alphalib/types/stackVersions.d.ts +13 -0
- package/dist/alphalib/types/stackVersions.d.ts.map +1 -0
- package/dist/alphalib/types/stackVersions.js +13 -0
- package/dist/alphalib/types/stackVersions.js.map +1 -0
- package/dist/alphalib/types/template.d.ts +131710 -0
- package/dist/alphalib/types/template.d.ts.map +1 -0
- package/dist/alphalib/types/template.js +218 -0
- package/dist/alphalib/types/template.js.map +1 -0
- package/dist/alphalib/types/templateCredential.d.ts +95 -0
- package/dist/alphalib/types/templateCredential.d.ts.map +1 -0
- package/dist/alphalib/types/templateCredential.js +57 -0
- package/dist/alphalib/types/templateCredential.js.map +1 -0
- package/dist/alphalib/zodParseWithContext.d.ts +17 -0
- package/dist/alphalib/zodParseWithContext.d.ts.map +1 -0
- package/dist/alphalib/zodParseWithContext.js +248 -0
- package/dist/alphalib/zodParseWithContext.js.map +1 -0
- package/dist/apiTypes.d.ts +112 -0
- package/dist/apiTypes.d.ts.map +1 -0
- package/dist/apiTypes.js +3 -0
- package/dist/apiTypes.js.map +1 -0
- package/dist/cli/OutputCtl.d.ts +47 -0
- package/dist/cli/OutputCtl.d.ts.map +1 -0
- package/dist/cli/OutputCtl.js +85 -0
- package/dist/cli/OutputCtl.js.map +1 -0
- package/dist/cli/commands/BaseCommand.d.ts +24 -0
- package/dist/cli/commands/BaseCommand.d.ts.map +1 -0
- package/dist/cli/commands/BaseCommand.js +52 -0
- package/dist/cli/commands/BaseCommand.js.map +1 -0
- package/dist/cli/commands/assemblies.d.ts +93 -0
- package/dist/cli/commands/assemblies.d.ts.map +1 -0
- package/dist/cli/commands/assemblies.js +1021 -0
- package/dist/cli/commands/assemblies.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +28 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +280 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/bills.d.ts +14 -0
- package/dist/cli/commands/bills.d.ts.map +1 -0
- package/dist/cli/commands/bills.js +69 -0
- package/dist/cli/commands/bills.js.map +1 -0
- package/dist/cli/commands/index.d.ts +3 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +39 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/notifications.d.ts +9 -0
- package/dist/cli/commands/notifications.d.ts.map +1 -0
- package/dist/cli/commands/notifications.js +44 -0
- package/dist/cli/commands/notifications.js.map +1 -0
- package/dist/cli/commands/templates.d.ts +73 -0
- package/dist/cli/commands/templates.d.ts.map +1 -0
- package/dist/cli/commands/templates.js +428 -0
- package/dist/cli/commands/templates.js.map +1 -0
- package/dist/cli/helpers.d.ts +13 -0
- package/dist/cli/helpers.d.ts.map +1 -0
- package/dist/cli/helpers.js +39 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/template-last-modified.d.ts +10 -0
- package/dist/cli/template-last-modified.d.ts.map +1 -0
- package/dist/cli/template-last-modified.js +134 -0
- package/dist/cli/template-last-modified.js.map +1 -0
- package/dist/cli/types.d.ts +78 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +49 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +41 -0
- package/dist/cli.js.map +1 -0
- package/dist/tus.d.ts +18 -0
- package/dist/tus.d.ts.map +1 -0
- package/dist/tus.js +122 -0
- package/dist/tus.js.map +1 -0
- package/package.json +92 -0
- package/src/ApiError.ts +49 -0
- package/src/InconsistentResponseError.ts +3 -0
- package/src/PaginationStream.ts +54 -0
- package/src/PollingTimeoutError.ts +5 -0
- package/src/Transloadit.ts +980 -0
- package/src/alphalib/lib/nativeGlobby.ts +244 -0
- package/src/alphalib/mcache.ts +184 -0
- package/src/alphalib/tryCatch.ts +30 -0
- package/src/alphalib/types/assembliesGet.ts +42 -0
- package/src/alphalib/types/assemblyReplay.ts +24 -0
- package/src/alphalib/types/assemblyReplayNotification.ts +16 -0
- package/src/alphalib/types/assemblyStatus.ts +794 -0
- package/src/alphalib/types/bill.ts +9 -0
- package/src/alphalib/types/robots/_index.ts +1201 -0
- package/src/alphalib/types/robots/_instructions-primitives.ts +1770 -0
- package/src/alphalib/types/robots/ai-chat.ts +278 -0
- package/src/alphalib/types/robots/assembly-savejson.ts +37 -0
- package/src/alphalib/types/robots/audio-artwork.ts +107 -0
- package/src/alphalib/types/robots/audio-concat.ts +142 -0
- package/src/alphalib/types/robots/audio-encode.ts +103 -0
- package/src/alphalib/types/robots/audio-loop.ts +102 -0
- package/src/alphalib/types/robots/audio-merge.ts +137 -0
- package/src/alphalib/types/robots/audio-waveform.ts +280 -0
- package/src/alphalib/types/robots/azure-import.ts +111 -0
- package/src/alphalib/types/robots/azure-store.ts +143 -0
- package/src/alphalib/types/robots/backblaze-import.ts +119 -0
- package/src/alphalib/types/robots/backblaze-store.ts +104 -0
- package/src/alphalib/types/robots/cloudfiles-import.ts +118 -0
- package/src/alphalib/types/robots/cloudfiles-store.ts +104 -0
- package/src/alphalib/types/robots/cloudflare-import.ts +121 -0
- package/src/alphalib/types/robots/cloudflare-store.ts +120 -0
- package/src/alphalib/types/robots/digitalocean-import.ts +118 -0
- package/src/alphalib/types/robots/digitalocean-store.ts +125 -0
- package/src/alphalib/types/robots/document-autorotate.ts +74 -0
- package/src/alphalib/types/robots/document-convert.ts +302 -0
- package/src/alphalib/types/robots/document-merge.ts +114 -0
- package/src/alphalib/types/robots/document-ocr.ts +120 -0
- package/src/alphalib/types/robots/document-split.ts +78 -0
- package/src/alphalib/types/robots/document-thumbs.ts +231 -0
- package/src/alphalib/types/robots/dropbox-import.ts +100 -0
- package/src/alphalib/types/robots/dropbox-store.ts +97 -0
- package/src/alphalib/types/robots/edgly-deliver.ts +73 -0
- package/src/alphalib/types/robots/file-compress.ts +167 -0
- package/src/alphalib/types/robots/file-decompress.ts +125 -0
- package/src/alphalib/types/robots/file-filter.ts +173 -0
- package/src/alphalib/types/robots/file-hash.ts +86 -0
- package/src/alphalib/types/robots/file-preview.ts +260 -0
- package/src/alphalib/types/robots/file-read.ts +71 -0
- package/src/alphalib/types/robots/file-serve.ts +128 -0
- package/src/alphalib/types/robots/file-verify.ts +102 -0
- package/src/alphalib/types/robots/file-virusscan.ts +113 -0
- package/src/alphalib/types/robots/file-watermark.ts +56 -0
- package/src/alphalib/types/robots/ftp-import.ts +95 -0
- package/src/alphalib/types/robots/ftp-store.ts +119 -0
- package/src/alphalib/types/robots/google-import.ts +115 -0
- package/src/alphalib/types/robots/google-store.ts +139 -0
- package/src/alphalib/types/robots/html-convert.ts +165 -0
- package/src/alphalib/types/robots/http-import.ts +168 -0
- package/src/alphalib/types/robots/image-bgremove.ts +95 -0
- package/src/alphalib/types/robots/image-describe.ts +121 -0
- package/src/alphalib/types/robots/image-facedetect.ts +187 -0
- package/src/alphalib/types/robots/image-generate.ts +92 -0
- package/src/alphalib/types/robots/image-merge.ts +127 -0
- package/src/alphalib/types/robots/image-ocr.ts +112 -0
- package/src/alphalib/types/robots/image-optimize.ts +114 -0
- package/src/alphalib/types/robots/image-resize.ts +653 -0
- package/src/alphalib/types/robots/meta-read.ts +44 -0
- package/src/alphalib/types/robots/meta-write.ts +93 -0
- package/src/alphalib/types/robots/minio-import.ts +120 -0
- package/src/alphalib/types/robots/minio-store.ts +115 -0
- package/src/alphalib/types/robots/progress-simulate.ts +40 -0
- package/src/alphalib/types/robots/s3-import.ts +175 -0
- package/src/alphalib/types/robots/s3-store.ts +198 -0
- package/src/alphalib/types/robots/script-run.ts +122 -0
- package/src/alphalib/types/robots/sftp-import.ts +92 -0
- package/src/alphalib/types/robots/sftp-store.ts +110 -0
- package/src/alphalib/types/robots/speech-transcribe.ts +139 -0
- package/src/alphalib/types/robots/supabase-import.ts +122 -0
- package/src/alphalib/types/robots/supabase-store.ts +105 -0
- package/src/alphalib/types/robots/swift-import.ts +120 -0
- package/src/alphalib/types/robots/swift-store.ts +112 -0
- package/src/alphalib/types/robots/text-speak.ts +152 -0
- package/src/alphalib/types/robots/text-translate.ts +245 -0
- package/src/alphalib/types/robots/tigris-import.ts +124 -0
- package/src/alphalib/types/robots/tigris-store.ts +119 -0
- package/src/alphalib/types/robots/tlcdn-deliver.ts +73 -0
- package/src/alphalib/types/robots/tus-store.ts +129 -0
- package/src/alphalib/types/robots/upload-handle.ts +95 -0
- package/src/alphalib/types/robots/video-adaptive.ts +179 -0
- package/src/alphalib/types/robots/video-concat.ts +130 -0
- package/src/alphalib/types/robots/video-encode.ts +141 -0
- package/src/alphalib/types/robots/video-merge.ts +138 -0
- package/src/alphalib/types/robots/video-ondemand.ts +161 -0
- package/src/alphalib/types/robots/video-subtitle.ts +159 -0
- package/src/alphalib/types/robots/video-thumbs.ts +158 -0
- package/src/alphalib/types/robots/vimeo-import.ts +126 -0
- package/src/alphalib/types/robots/vimeo-store.ts +143 -0
- package/src/alphalib/types/robots/wasabi-import.ts +124 -0
- package/src/alphalib/types/robots/wasabi-store.ts +113 -0
- package/src/alphalib/types/robots/youtube-store.ts +153 -0
- package/src/alphalib/types/stackVersions.ts +12 -0
- package/src/alphalib/types/template.ts +277 -0
- package/src/alphalib/types/templateCredential.ts +61 -0
- package/src/alphalib/zodParseWithContext.ts +306 -0
- package/src/apiTypes.ts +154 -0
- package/src/cli/OutputCtl.ts +115 -0
- package/src/cli/commands/BaseCommand.ts +71 -0
- package/src/cli/commands/assemblies.ts +1373 -0
- package/src/cli/commands/auth.ts +354 -0
- package/src/cli/commands/bills.ts +91 -0
- package/src/cli/commands/index.ts +65 -0
- package/src/cli/commands/notifications.ts +63 -0
- package/src/cli/commands/templates.ts +556 -0
- package/src/cli/helpers.ts +50 -0
- package/src/cli/template-last-modified.ts +156 -0
- package/src/cli/types.ts +70 -0
- package/src/cli.ts +44 -0
- package/src/tus.ts +168 -0
|
@@ -0,0 +1,1491 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { stackVersions } from "../stackVersions.js";
|
|
3
|
+
export const robotNames = z.enum([
|
|
4
|
+
'AiChatRobot',
|
|
5
|
+
'UploadHandleRobot',
|
|
6
|
+
'FileServeRobot',
|
|
7
|
+
'FileWatermarkRobot',
|
|
8
|
+
'FileVerifyRobot',
|
|
9
|
+
'EdglyDeliverRobot',
|
|
10
|
+
'TlcdnDeliverRobot',
|
|
11
|
+
'VideoSubtitleRobot',
|
|
12
|
+
'VideoEncodeRobot',
|
|
13
|
+
'VideoAdaptiveRobot',
|
|
14
|
+
'VideoMergeRobot',
|
|
15
|
+
'VideoConcatRobot',
|
|
16
|
+
'AudioWaveformRobot',
|
|
17
|
+
'AudioEncodeRobot',
|
|
18
|
+
'AudioLoopRobot',
|
|
19
|
+
'AudioConcatRobot',
|
|
20
|
+
'AudioMergeRobot',
|
|
21
|
+
'AudioArtworkRobot',
|
|
22
|
+
'ImageFacedetectRobot',
|
|
23
|
+
'ImageDescribeRobot',
|
|
24
|
+
'ImageOcrRobot',
|
|
25
|
+
'ImageBgremoveRobot',
|
|
26
|
+
'ImageGenerateRobot',
|
|
27
|
+
'DocumentOcrRobot',
|
|
28
|
+
'SpeechTranscribeRobot',
|
|
29
|
+
'VideoThumbsRobot',
|
|
30
|
+
'FileVirusscanRobot',
|
|
31
|
+
'ImageOptimizeRobot',
|
|
32
|
+
'FileCompressRobot',
|
|
33
|
+
'MetaReadRobot',
|
|
34
|
+
'FileDecompressRobot',
|
|
35
|
+
'MetaWriteRobot',
|
|
36
|
+
'DocumentThumbsRobot',
|
|
37
|
+
'DocumentConvertRobot',
|
|
38
|
+
'DocumentMergeRobot',
|
|
39
|
+
'DocumentSplitRobot',
|
|
40
|
+
'DocumentAutorotateRobot',
|
|
41
|
+
'HtmlConvertRobot',
|
|
42
|
+
'ImageResizeRobot',
|
|
43
|
+
'ImageMergeRobot',
|
|
44
|
+
'S3ImportRobot',
|
|
45
|
+
'S3StoreRobot',
|
|
46
|
+
'DigitalOceanImportRobot',
|
|
47
|
+
'DigitalOceanStoreRobot',
|
|
48
|
+
'BackblazeImportRobot',
|
|
49
|
+
'BackblazeStoreRobot',
|
|
50
|
+
'MinioImportRobot',
|
|
51
|
+
'TigrisImportRobot',
|
|
52
|
+
'CloudflareImportRobot',
|
|
53
|
+
'SupabaseImportRobot',
|
|
54
|
+
'MinioStoreRobot',
|
|
55
|
+
'TigrisStoreRobot',
|
|
56
|
+
'CloudflareStoreRobot',
|
|
57
|
+
'SupabaseStoreRobot',
|
|
58
|
+
'WasabiImportRobot',
|
|
59
|
+
'WasabiStoreRobot',
|
|
60
|
+
'SwiftImportRobot',
|
|
61
|
+
'SwiftStoreRobot',
|
|
62
|
+
'GoogleImportRobot',
|
|
63
|
+
'GoogleStoreRobot',
|
|
64
|
+
'DropboxImportRobot',
|
|
65
|
+
'DropboxStoreRobot',
|
|
66
|
+
'HttpImportRobot',
|
|
67
|
+
'SftpImportRobot',
|
|
68
|
+
'SftpStoreRobot',
|
|
69
|
+
'FtpImportRobot',
|
|
70
|
+
'FtpStoreRobot',
|
|
71
|
+
'CloudfilesImportRobot',
|
|
72
|
+
'CloudfilesStoreRobot',
|
|
73
|
+
'AzureImportRobot',
|
|
74
|
+
'AzureStoreRobot',
|
|
75
|
+
'YoutubeStoreRobot',
|
|
76
|
+
'VimeoImportRobot',
|
|
77
|
+
'VimeoStoreRobot',
|
|
78
|
+
'AssemblySavejsonRobot',
|
|
79
|
+
'ScriptRunRobot',
|
|
80
|
+
'FileHashRobot',
|
|
81
|
+
'FileReadRobot',
|
|
82
|
+
'VideoOndemandRobot',
|
|
83
|
+
'FileFilterRobot',
|
|
84
|
+
'TextSpeakRobot',
|
|
85
|
+
'TextTranslateRobot',
|
|
86
|
+
'FilePreviewRobot',
|
|
87
|
+
'TusStoreRobot',
|
|
88
|
+
'ProgressSimulateRobot',
|
|
89
|
+
]);
|
|
90
|
+
export const robotMetaSchema = z.object({
|
|
91
|
+
// Added keys from api2/lib/config.ts:
|
|
92
|
+
name: robotNames,
|
|
93
|
+
priceFactor: z.number(),
|
|
94
|
+
queueSlotCount: z.number(),
|
|
95
|
+
downloadInputFiles: z.boolean().optional(),
|
|
96
|
+
preserveInputFileUrls: z.boolean().optional(),
|
|
97
|
+
minimumCharge: z.number().optional(),
|
|
98
|
+
minimumChargeUsd: z.number().optional(),
|
|
99
|
+
minimumChargeUsdPerSpeechTranscribeMinute: z
|
|
100
|
+
.object({
|
|
101
|
+
aws: z.number(),
|
|
102
|
+
gcp: z.number(),
|
|
103
|
+
})
|
|
104
|
+
.optional(),
|
|
105
|
+
minimumChargeUsdPerDocumentOcrPage: z
|
|
106
|
+
.object({
|
|
107
|
+
aws: z.number(),
|
|
108
|
+
gcp: z.number(),
|
|
109
|
+
})
|
|
110
|
+
.optional(),
|
|
111
|
+
isAllowedForUrlTransform: z.boolean(),
|
|
112
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: z.boolean(),
|
|
113
|
+
lazyLoad: z.boolean().optional(),
|
|
114
|
+
installVersionFile: z.string().optional(),
|
|
115
|
+
trackOutputFileSize: z.boolean().optional(),
|
|
116
|
+
isInternal: z.boolean(),
|
|
117
|
+
numDaemons: z.number().optional(),
|
|
118
|
+
stage: z.enum(['alpha', 'beta', 'ga', 'deprecated', 'removed']),
|
|
119
|
+
importRanges: z.array(z.string()).optional(),
|
|
120
|
+
extraChargeForImageResize: z.number().optional(),
|
|
121
|
+
// Original keys from content repo:
|
|
122
|
+
allowed_for_url_transform: z.boolean(),
|
|
123
|
+
bytescount: z.number(),
|
|
124
|
+
description: z.string().optional(),
|
|
125
|
+
discount_factor: z.number(),
|
|
126
|
+
discount_pct: z.number(),
|
|
127
|
+
// To avoid a cycling dependency back to template.ts, we'll use any for now:
|
|
128
|
+
// example_code: assemblyInstructionsSchema.optional(),
|
|
129
|
+
example_code: z.any().optional(),
|
|
130
|
+
example_code_description: z.string().optional(),
|
|
131
|
+
extended_description: z.string().optional(),
|
|
132
|
+
has_small_icon: z.literal(true).optional(),
|
|
133
|
+
minimum_charge: z.number(),
|
|
134
|
+
minimum_charge_usd: z.union([z.number(), z.record(z.string(), z.number())]).optional(),
|
|
135
|
+
minimum_charge_usd_note: z.string().optional(),
|
|
136
|
+
ogimage: z.string().optional(),
|
|
137
|
+
marketing_intro: z.string().optional(),
|
|
138
|
+
output_factor: z.number(),
|
|
139
|
+
override_lvl1: z.string().optional(),
|
|
140
|
+
purpose_sentence: z.string(),
|
|
141
|
+
purpose_verb: z.enum([
|
|
142
|
+
'auto-rotate',
|
|
143
|
+
'cache & deliver',
|
|
144
|
+
'compress',
|
|
145
|
+
'concatenate',
|
|
146
|
+
'convert',
|
|
147
|
+
'decompress',
|
|
148
|
+
'detect',
|
|
149
|
+
'encode',
|
|
150
|
+
'export',
|
|
151
|
+
'extract',
|
|
152
|
+
'filter',
|
|
153
|
+
'generate',
|
|
154
|
+
'handle',
|
|
155
|
+
'hash',
|
|
156
|
+
'import',
|
|
157
|
+
'loop',
|
|
158
|
+
'merge',
|
|
159
|
+
'optimize',
|
|
160
|
+
'read',
|
|
161
|
+
'recognize',
|
|
162
|
+
'run',
|
|
163
|
+
'scan',
|
|
164
|
+
'serve',
|
|
165
|
+
'speak',
|
|
166
|
+
'subtitle',
|
|
167
|
+
'take',
|
|
168
|
+
'transcode',
|
|
169
|
+
'transcribe',
|
|
170
|
+
'translate',
|
|
171
|
+
'verify',
|
|
172
|
+
'remove',
|
|
173
|
+
'write',
|
|
174
|
+
'stream',
|
|
175
|
+
]),
|
|
176
|
+
purpose_word: z.string(),
|
|
177
|
+
purpose_words: z.string(),
|
|
178
|
+
requires_credentials: z.literal(true).optional(),
|
|
179
|
+
service_slug: z.enum([
|
|
180
|
+
'artificial-intelligence',
|
|
181
|
+
'audio-encoding',
|
|
182
|
+
'code-evaluation',
|
|
183
|
+
'content-delivery',
|
|
184
|
+
'document-processing',
|
|
185
|
+
'file-compressing',
|
|
186
|
+
'file-exporting',
|
|
187
|
+
'file-filtering',
|
|
188
|
+
'file-importing',
|
|
189
|
+
'handling-uploads',
|
|
190
|
+
'image-manipulation',
|
|
191
|
+
'media-cataloging',
|
|
192
|
+
'video-encoding',
|
|
193
|
+
]),
|
|
194
|
+
slot_count: z.number(),
|
|
195
|
+
title: z.string(),
|
|
196
|
+
typical_file_size_mb: z.number(),
|
|
197
|
+
typical_file_type: z.enum([
|
|
198
|
+
'audio file',
|
|
199
|
+
'audio or video file',
|
|
200
|
+
'document',
|
|
201
|
+
'file',
|
|
202
|
+
'image',
|
|
203
|
+
'video',
|
|
204
|
+
'webpage',
|
|
205
|
+
]),
|
|
206
|
+
uses_tools: z.array(z.enum(['ffmpeg', 'imagemagick'])).optional(),
|
|
207
|
+
});
|
|
208
|
+
// These schemas can be reproduced with z.string().regex(). However, this causes some issues.
|
|
209
|
+
// We use this in combination with unions. Internally Zod normalizes unions. A string schema and
|
|
210
|
+
// enums merged in some way. Both are validated. Normally, if a Zod union has errors, all of them
|
|
211
|
+
// are surfaced. However, if the regex isn’t match, and none of the enum values overlap, then the
|
|
212
|
+
// regex error is raised instead of the union error. As a result, the best error we could give back
|
|
213
|
+
// to the user, is that there’s a problem with the interpolation syntax. But really the other error
|
|
214
|
+
// is more useful in pretty much every case. To work around this, we use z.custom() instead, as Zod
|
|
215
|
+
// can’t normalize that.
|
|
216
|
+
const interpolationRegexFull = /^\${.+}$/;
|
|
217
|
+
export const interpolationSchemaFull = z.custom((input) => typeof input === 'string' && interpolationRegexFull.test(input), 'Must be a full interpolation string');
|
|
218
|
+
const interpolationRegexPartial = /\${.+}/;
|
|
219
|
+
export const interpolationSchemaPartial = z.custom((input) => typeof input === 'string' && interpolationRegexPartial.test(input), 'Must be a partially interpolatable string');
|
|
220
|
+
export const booleanStringSchema = z.enum(['true', 'false']);
|
|
221
|
+
export function interpolateRecursive(schema) {
|
|
222
|
+
const def = schema._def;
|
|
223
|
+
switch (def.typeName) {
|
|
224
|
+
case z.ZodFirstPartyTypeKind.ZodBoolean:
|
|
225
|
+
return z.union([
|
|
226
|
+
interpolationSchemaFull,
|
|
227
|
+
z
|
|
228
|
+
.union([schema, booleanStringSchema])
|
|
229
|
+
.transform((value) => value === true || value === false),
|
|
230
|
+
]);
|
|
231
|
+
case z.ZodFirstPartyTypeKind.ZodArray: {
|
|
232
|
+
let replacement = z.array(interpolateRecursive(def.type), def);
|
|
233
|
+
if (def.exactLength != null) {
|
|
234
|
+
replacement = replacement.min(def.exactLength.value, def.exactLength.message);
|
|
235
|
+
}
|
|
236
|
+
if (def.maxLength != null) {
|
|
237
|
+
replacement = replacement.min(def.maxLength.value, def.maxLength.message);
|
|
238
|
+
}
|
|
239
|
+
if (def.minLength != null) {
|
|
240
|
+
replacement = replacement.min(def.minLength.value, def.minLength.message);
|
|
241
|
+
}
|
|
242
|
+
return z.union([interpolationSchemaFull, replacement]);
|
|
243
|
+
}
|
|
244
|
+
case z.ZodFirstPartyTypeKind.ZodDefault: {
|
|
245
|
+
const replacement = interpolateRecursive(def.innerType).default(def.defaultValue());
|
|
246
|
+
return (def.description ? replacement.describe(def.description) : replacement);
|
|
247
|
+
}
|
|
248
|
+
case z.ZodFirstPartyTypeKind.ZodEffects:
|
|
249
|
+
case z.ZodFirstPartyTypeKind.ZodEnum:
|
|
250
|
+
case z.ZodFirstPartyTypeKind.ZodLiteral:
|
|
251
|
+
return z.union([interpolationSchemaFull, schema], def);
|
|
252
|
+
case z.ZodFirstPartyTypeKind.ZodNumber:
|
|
253
|
+
return z.union([
|
|
254
|
+
z
|
|
255
|
+
.string()
|
|
256
|
+
.regex(/^\d+(\.\d+)?$/)
|
|
257
|
+
.transform((value) => Number(value)),
|
|
258
|
+
interpolationSchemaFull,
|
|
259
|
+
schema,
|
|
260
|
+
], def);
|
|
261
|
+
case z.ZodFirstPartyTypeKind.ZodNullable:
|
|
262
|
+
return interpolateRecursive(def.innerType)
|
|
263
|
+
.nullable()
|
|
264
|
+
.describe(def.description);
|
|
265
|
+
case z.ZodFirstPartyTypeKind.ZodObject: {
|
|
266
|
+
const replacement = z.object(Object.fromEntries(Object.entries(def.shape()).map(([key, nested]) => [
|
|
267
|
+
key,
|
|
268
|
+
interpolateRecursive(nested),
|
|
269
|
+
])), def);
|
|
270
|
+
return z.union([
|
|
271
|
+
interpolationSchemaFull,
|
|
272
|
+
def.unknownKeys === 'strict'
|
|
273
|
+
? replacement.strict()
|
|
274
|
+
: def.unknownKeys === 'passthrough'
|
|
275
|
+
? replacement.passthrough()
|
|
276
|
+
: replacement,
|
|
277
|
+
]);
|
|
278
|
+
}
|
|
279
|
+
case z.ZodFirstPartyTypeKind.ZodOptional:
|
|
280
|
+
return z.optional(interpolateRecursive(def.innerType), def);
|
|
281
|
+
case z.ZodFirstPartyTypeKind.ZodRecord:
|
|
282
|
+
return z.record(def.keyType, interpolateRecursive(def.valueType), def);
|
|
283
|
+
case z.ZodFirstPartyTypeKind.ZodString:
|
|
284
|
+
return z.union([interpolationSchemaPartial, schema], def);
|
|
285
|
+
case z.ZodFirstPartyTypeKind.ZodTuple: {
|
|
286
|
+
const tuple = z.tuple(def.items.map(interpolateRecursive), def);
|
|
287
|
+
return z.union([
|
|
288
|
+
interpolationSchemaFull,
|
|
289
|
+
def.rest ? tuple.rest(def.rest) : tuple,
|
|
290
|
+
]);
|
|
291
|
+
}
|
|
292
|
+
case z.ZodFirstPartyTypeKind.ZodUnion:
|
|
293
|
+
return z.union([interpolationSchemaFull, ...def.options.map(interpolateRecursive)], def);
|
|
294
|
+
default:
|
|
295
|
+
return schema;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* The robot keys specified in this array can’t be interpolated.
|
|
300
|
+
*/
|
|
301
|
+
const uninterpolatableKeys = ['robot', 'use'];
|
|
302
|
+
export function interpolateRobot(schema) {
|
|
303
|
+
const def = schema._def;
|
|
304
|
+
return z
|
|
305
|
+
.object(Object.fromEntries(Object.entries(def.shape()).map(([key, nested]) => [
|
|
306
|
+
key,
|
|
307
|
+
uninterpolatableKeys.includes(key)
|
|
308
|
+
? nested
|
|
309
|
+
: interpolateRecursive(nested),
|
|
310
|
+
])), def)
|
|
311
|
+
.strict();
|
|
312
|
+
}
|
|
313
|
+
export const robotBase = z
|
|
314
|
+
.object({
|
|
315
|
+
output_meta: z
|
|
316
|
+
.union([z.record(z.boolean()), z.boolean(), z.array(z.string())])
|
|
317
|
+
.optional()
|
|
318
|
+
.describe(`
|
|
319
|
+
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.
|
|
320
|
+
|
|
321
|
+
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.
|
|
322
|
+
|
|
323
|
+
For videos, you can add the \`"colorspace: true"\` parameter to extract the colorspace of the output video.
|
|
324
|
+
|
|
325
|
+
For audio, you can add \`"mean_volume": true\` to get a single value representing the mean average volume of the audio file.
|
|
326
|
+
|
|
327
|
+
You can also set this to \`false\` to skip metadata extraction and speed up transcoding.
|
|
328
|
+
`),
|
|
329
|
+
result: z
|
|
330
|
+
.boolean()
|
|
331
|
+
.default(false)
|
|
332
|
+
.describe('Whether the results of this Step should be present in the Assembly Status JSON'),
|
|
333
|
+
queue: z
|
|
334
|
+
.enum(['batch'])
|
|
335
|
+
.optional()
|
|
336
|
+
.describe(`Setting the queue to 'batch', manually downgrades the priority of jobs for this step to avoid consuming Priority job slots for jobs that don't need zero queue waiting times`),
|
|
337
|
+
force_accept: z
|
|
338
|
+
.boolean()
|
|
339
|
+
.default(false)
|
|
340
|
+
.describe(`Force a Robot to accept a file type it would have ignored.
|
|
341
|
+
|
|
342
|
+
By default, Robots ignore files they are not familiar with.
|
|
343
|
+
[🤖/video/encode](/docs/robots/video-encode/), for
|
|
344
|
+
example, will happily ignore input images.
|
|
345
|
+
|
|
346
|
+
With the \`force_accept\` parameter set to \`true\`, you can force Robots to accept all files thrown at them.
|
|
347
|
+
This will typically lead to errors and should only be used for debugging or combatting edge cases.
|
|
348
|
+
`),
|
|
349
|
+
ignore_errors: z
|
|
350
|
+
.union([z.boolean(), z.array(z.enum(['meta', 'execute']))])
|
|
351
|
+
.transform((value) => (value === true ? ['meta', 'execute'] : value === false ? [] : value))
|
|
352
|
+
.default([])
|
|
353
|
+
.describe(`
|
|
354
|
+
Ignore errors during specific phases of processing.
|
|
355
|
+
|
|
356
|
+
Setting this to \`["meta"]\` will cause the Robot to ignore errors during metadata extraction.
|
|
357
|
+
|
|
358
|
+
Setting this to \`["execute"]\` will cause the Robot to ignore errors during the main execution phase.
|
|
359
|
+
|
|
360
|
+
Setting this to \`true\` is equivalent to \`["meta", "execute"]\` and will ignore errors in both phases.
|
|
361
|
+
`),
|
|
362
|
+
})
|
|
363
|
+
.strict();
|
|
364
|
+
export const useParamObjectSchema = z
|
|
365
|
+
.object({
|
|
366
|
+
name: z.string(),
|
|
367
|
+
fields: z.string().optional(),
|
|
368
|
+
as: z.string().optional(),
|
|
369
|
+
})
|
|
370
|
+
.strict();
|
|
371
|
+
export const useParamStringSchema = z.string();
|
|
372
|
+
export const useParamArrayOfStringsSchema = z.array(useParamStringSchema);
|
|
373
|
+
export const useParamArrayOfUseParamObjectSchema = z.array(useParamObjectSchema);
|
|
374
|
+
export const useParamStepsSchema = z.union([
|
|
375
|
+
useParamStringSchema,
|
|
376
|
+
useParamArrayOfStringsSchema,
|
|
377
|
+
useParamArrayOfUseParamObjectSchema,
|
|
378
|
+
]);
|
|
379
|
+
export const useParamObjectOfStepsSchema = z
|
|
380
|
+
.object({
|
|
381
|
+
steps: useParamStepsSchema,
|
|
382
|
+
bundle_steps: z.boolean().optional(),
|
|
383
|
+
group_by_original: z.boolean().optional(),
|
|
384
|
+
fields: z
|
|
385
|
+
.array(z.string())
|
|
386
|
+
.optional()
|
|
387
|
+
.describe(`
|
|
388
|
+
Array of field names to filter input files by when using steps.
|
|
389
|
+
`),
|
|
390
|
+
})
|
|
391
|
+
.strict();
|
|
392
|
+
// Hidden fields variants for use parameters
|
|
393
|
+
export const useParamObjectWithHiddenFieldsSchema = useParamObjectSchema.extend({
|
|
394
|
+
result: z.union([z.literal('debug'), z.boolean()]).optional(),
|
|
395
|
+
});
|
|
396
|
+
export const useParamArrayOfUseParamObjectWithHiddenFieldsSchema = z.array(useParamObjectWithHiddenFieldsSchema);
|
|
397
|
+
export const useParamStepsWithHiddenFieldsSchema = z.union([
|
|
398
|
+
useParamStringSchema,
|
|
399
|
+
useParamArrayOfStringsSchema,
|
|
400
|
+
useParamArrayOfUseParamObjectWithHiddenFieldsSchema,
|
|
401
|
+
]);
|
|
402
|
+
export const useParamObjectOfStepsWithHiddenFieldsSchema = z
|
|
403
|
+
.object({
|
|
404
|
+
steps: useParamStepsWithHiddenFieldsSchema,
|
|
405
|
+
bundle_steps: z.boolean().optional(),
|
|
406
|
+
group_by_original: z.boolean().optional(),
|
|
407
|
+
fields: z
|
|
408
|
+
.array(z.string())
|
|
409
|
+
.optional()
|
|
410
|
+
.describe(`
|
|
411
|
+
Array of field names to filter input files by when using steps.
|
|
412
|
+
`),
|
|
413
|
+
})
|
|
414
|
+
.strict();
|
|
415
|
+
export const robotUse = z
|
|
416
|
+
.object({
|
|
417
|
+
use: z
|
|
418
|
+
.union([useParamStepsSchema, useParamObjectOfStepsSchema])
|
|
419
|
+
.describe(`
|
|
420
|
+
Specifies which Step(s) to use as input.
|
|
421
|
+
|
|
422
|
+
- You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
|
|
423
|
+
- You can provide several Steps as input with arrays:
|
|
424
|
+
\`\`\`json
|
|
425
|
+
{
|
|
426
|
+
"use": [
|
|
427
|
+
":original",
|
|
428
|
+
"encoded",
|
|
429
|
+
"resized"
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
\`\`\`
|
|
433
|
+
|
|
434
|
+
> [!Tip]
|
|
435
|
+
> That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
|
|
436
|
+
`)
|
|
437
|
+
.optional(),
|
|
438
|
+
})
|
|
439
|
+
.strict();
|
|
440
|
+
export const robotUseWithHiddenFields = z
|
|
441
|
+
.object({
|
|
442
|
+
use: z
|
|
443
|
+
.union([useParamStepsWithHiddenFieldsSchema, useParamObjectOfStepsWithHiddenFieldsSchema])
|
|
444
|
+
.describe(`
|
|
445
|
+
Specifies which Step(s) to use as input.
|
|
446
|
+
|
|
447
|
+
- You can pick any names for Steps except \`":original"\` (reserved for user uploads handled by Transloadit)
|
|
448
|
+
- You can provide several Steps as input with arrays:
|
|
449
|
+
\`\`\`json
|
|
450
|
+
{
|
|
451
|
+
"use": [
|
|
452
|
+
":original",
|
|
453
|
+
"encoded",
|
|
454
|
+
"resized"
|
|
455
|
+
]
|
|
456
|
+
}
|
|
457
|
+
\`\`\`
|
|
458
|
+
|
|
459
|
+
> [!Tip]
|
|
460
|
+
> That's likely all you need to know about \`use\`, but you can view [Advanced use cases](/docs/topics/use-parameter/).
|
|
461
|
+
`)
|
|
462
|
+
.optional(),
|
|
463
|
+
})
|
|
464
|
+
.strict();
|
|
465
|
+
export const complexWidthSchema = z.preprocess((val) => {
|
|
466
|
+
if (typeof val === 'string' && val.startsWith('${')) {
|
|
467
|
+
return val;
|
|
468
|
+
}
|
|
469
|
+
if (typeof val === 'string') {
|
|
470
|
+
const num = Number.parseInt(val, 10);
|
|
471
|
+
if (Number.isNaN(num) || val.includes('x')) {
|
|
472
|
+
return val;
|
|
473
|
+
}
|
|
474
|
+
return num;
|
|
475
|
+
}
|
|
476
|
+
return val;
|
|
477
|
+
}, z.number().int().min(1).max(7680));
|
|
478
|
+
export const complexHeightSchema = z.preprocess((val) => {
|
|
479
|
+
if (typeof val === 'string' && val.startsWith('${')) {
|
|
480
|
+
return val;
|
|
481
|
+
}
|
|
482
|
+
if (typeof val === 'string') {
|
|
483
|
+
const num = Number.parseInt(val, 10);
|
|
484
|
+
if (Number.isNaN(num) || val.includes('x')) {
|
|
485
|
+
return val;
|
|
486
|
+
}
|
|
487
|
+
return num;
|
|
488
|
+
}
|
|
489
|
+
return val;
|
|
490
|
+
}, z.number().int().min(1).max(4320));
|
|
491
|
+
export const robotFFmpeg = z.object({
|
|
492
|
+
ffmpeg: z
|
|
493
|
+
.object({
|
|
494
|
+
af: z.string().optional(),
|
|
495
|
+
'b:a': z.union([z.string(), z.number()]).optional(),
|
|
496
|
+
'b:v': z.union([z.string(), z.number()]).optional(),
|
|
497
|
+
'c:a': z.string().optional(),
|
|
498
|
+
'c:v': z.string().optional(),
|
|
499
|
+
'codec:a': z.string().optional(),
|
|
500
|
+
'codec:v': z.string().optional(),
|
|
501
|
+
'filter:v': z.string().optional(),
|
|
502
|
+
'filter:a': z.string().optional(),
|
|
503
|
+
bits_per_mb: z.union([z.string(), z.number()]).optional(),
|
|
504
|
+
ss: z.union([z.string(), z.number()]).optional(),
|
|
505
|
+
t: z.union([z.string(), z.number()]).optional(),
|
|
506
|
+
to: z.union([z.string(), z.number()]).optional(),
|
|
507
|
+
vendor: z.string().optional(),
|
|
508
|
+
shortest: z.boolean().nullish(),
|
|
509
|
+
filter_complex: z.union([z.string(), z.record(z.string())]).optional(),
|
|
510
|
+
'level:v': z.union([z.string(), z.number()]).optional(),
|
|
511
|
+
'profile:v': z.union([z.number(), z.enum(['baseline', 'main', 'high', 'main10'])]).optional(),
|
|
512
|
+
'qscale:a': z.number().optional(),
|
|
513
|
+
'qscale:v': z.number().optional(),
|
|
514
|
+
'x264-params': z.string().optional(),
|
|
515
|
+
'overshoot-pct': z.number().optional(),
|
|
516
|
+
deadline: z.string().optional(),
|
|
517
|
+
'cpu-used': z.string().optional(),
|
|
518
|
+
'undershoot-pct': z.number().optional(),
|
|
519
|
+
'row-mt': z.number().optional(),
|
|
520
|
+
'x265-params': z
|
|
521
|
+
.object({
|
|
522
|
+
'vbv-maxrate': z.number().optional(),
|
|
523
|
+
'vbv-bufsize': z.number().optional(),
|
|
524
|
+
'rc-lookahead': z.number().optional(),
|
|
525
|
+
'b-adapt': z.number().optional(),
|
|
526
|
+
})
|
|
527
|
+
.strict()
|
|
528
|
+
.optional(),
|
|
529
|
+
'svtav1-params': z
|
|
530
|
+
.object({
|
|
531
|
+
tune: z.number().optional(),
|
|
532
|
+
'enable-qm': z.number().optional(),
|
|
533
|
+
'fast-decode': z.number().optional(),
|
|
534
|
+
'film-grain-denoise': z.number().optional(),
|
|
535
|
+
})
|
|
536
|
+
.strict()
|
|
537
|
+
.optional(),
|
|
538
|
+
ac: z.number().optional(),
|
|
539
|
+
an: z.boolean().optional(),
|
|
540
|
+
ar: z.number().optional(),
|
|
541
|
+
async: z.number().optional(),
|
|
542
|
+
b: z
|
|
543
|
+
.union([
|
|
544
|
+
z
|
|
545
|
+
.object({
|
|
546
|
+
v: z.number().optional(),
|
|
547
|
+
a: z.number().optional(),
|
|
548
|
+
})
|
|
549
|
+
.strict(),
|
|
550
|
+
z.string(),
|
|
551
|
+
])
|
|
552
|
+
.optional(),
|
|
553
|
+
bt: z.union([z.number(), z.string()]).optional(),
|
|
554
|
+
bufsize: z.union([z.string(), z.number()]).optional(),
|
|
555
|
+
c: z.string().optional(),
|
|
556
|
+
codec: z
|
|
557
|
+
.object({
|
|
558
|
+
v: z.string().optional(),
|
|
559
|
+
a: z.string().optional(),
|
|
560
|
+
})
|
|
561
|
+
.strict()
|
|
562
|
+
.optional(),
|
|
563
|
+
coder: z.number().optional(),
|
|
564
|
+
crf: z.number().optional(),
|
|
565
|
+
f: z.string().optional(),
|
|
566
|
+
flags: z.string().optional(),
|
|
567
|
+
g: z.number().optional(),
|
|
568
|
+
i_qfactor: z.union([z.string(), z.number()]).optional(),
|
|
569
|
+
keyint_min: z.number().optional(),
|
|
570
|
+
level: z.union([z.string(), z.number()]).optional(),
|
|
571
|
+
map: z.union([z.string(), z.array(z.string())]).optional(),
|
|
572
|
+
maxrate: z.union([z.string(), z.number()]).optional(),
|
|
573
|
+
me_range: z.number().optional(),
|
|
574
|
+
movflags: z.string().optional(),
|
|
575
|
+
partitions: z.string().optional(),
|
|
576
|
+
pix_fmt: z.string().optional(),
|
|
577
|
+
preset: z.union([z.string(), z.number()]).optional(),
|
|
578
|
+
profile: z.string().optional(),
|
|
579
|
+
'q:a': z.number().optional(),
|
|
580
|
+
qcomp: z.union([z.string(), z.number()]).optional(),
|
|
581
|
+
qdiff: z.number().optional(),
|
|
582
|
+
qmax: z.number().optional(),
|
|
583
|
+
qmin: z.number().optional(),
|
|
584
|
+
r: z.union([z.number(), z.string()]).nullable().optional(),
|
|
585
|
+
rc_eq: z.string().optional(),
|
|
586
|
+
refs: z.number().optional(),
|
|
587
|
+
s: z.string().optional(),
|
|
588
|
+
sc_threshold: z.number().optional(),
|
|
589
|
+
sws_flags: z.string().optional(),
|
|
590
|
+
threads: z.number().optional(),
|
|
591
|
+
trellis: z.number().optional(),
|
|
592
|
+
transloaditffpreset: z.literal('empty').optional(),
|
|
593
|
+
vn: z.boolean().optional(),
|
|
594
|
+
vf: z.string().optional(),
|
|
595
|
+
x264opts: z.string().optional(),
|
|
596
|
+
vbr: z.union([z.string(), z.number()]).optional(),
|
|
597
|
+
})
|
|
598
|
+
.passthrough()
|
|
599
|
+
.optional()
|
|
600
|
+
.describe(`
|
|
601
|
+
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.
|
|
602
|
+
`),
|
|
603
|
+
ffmpeg_stack: z
|
|
604
|
+
// Any semver in range is allowed and normalized. The enum is used for editor completions.
|
|
605
|
+
.union([z.enum(['v5', 'v6', 'v7']), z.string().regex(/^v?[567](\.\d+)?(\.\d+)?$/)])
|
|
606
|
+
.default('v5.0.0')
|
|
607
|
+
.describe(`
|
|
608
|
+
Selects the FFmpeg stack version to use for encoding. These versions reflect real FFmpeg versions. We currently recommend to use "v6.0.0".
|
|
609
|
+
`),
|
|
610
|
+
});
|
|
611
|
+
/**
|
|
612
|
+
* Replace all underscores with hyphens.
|
|
613
|
+
*
|
|
614
|
+
* @param preset
|
|
615
|
+
* The input preset which may contain underscores.
|
|
616
|
+
* @returns
|
|
617
|
+
* The hyphenated preset.
|
|
618
|
+
*/
|
|
619
|
+
function transformPreset(preset) {
|
|
620
|
+
return preset.replaceAll('_', '-');
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Generate all possible underscore/hyphen combinations of a preset.
|
|
624
|
+
*
|
|
625
|
+
* @param chunks
|
|
626
|
+
* A normalized preset split on hyphens.
|
|
627
|
+
* @returns
|
|
628
|
+
* An iterable that yields all possible combinations.
|
|
629
|
+
*/
|
|
630
|
+
function* generateCombinations(chunks) {
|
|
631
|
+
if (chunks.length === 0) {
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
if (chunks.length === 1) {
|
|
635
|
+
yield chunks[0];
|
|
636
|
+
}
|
|
637
|
+
const [head, ...remaining] = chunks;
|
|
638
|
+
for (const result of generateCombinations(remaining)) {
|
|
639
|
+
yield `${head}-${result}`;
|
|
640
|
+
yield `${head}_${result}`;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Create all possible preset combinations from a list of normalized presets.
|
|
645
|
+
*
|
|
646
|
+
* @param inputs
|
|
647
|
+
* The hyphenated presets.
|
|
648
|
+
* @returns
|
|
649
|
+
* An array of all possible combinations.
|
|
650
|
+
*/
|
|
651
|
+
function createPresets(inputs) {
|
|
652
|
+
const results = [];
|
|
653
|
+
for (const input of inputs) {
|
|
654
|
+
results.push(...generateCombinations(input.split('-')));
|
|
655
|
+
}
|
|
656
|
+
return [...results].sort();
|
|
657
|
+
}
|
|
658
|
+
const audioPresets = createPresets([
|
|
659
|
+
'aac',
|
|
660
|
+
'alac',
|
|
661
|
+
'audio/aac',
|
|
662
|
+
'audio/alac',
|
|
663
|
+
'audio/flac',
|
|
664
|
+
'audio/mp3',
|
|
665
|
+
'audio/ogg',
|
|
666
|
+
'dash-32k-audio',
|
|
667
|
+
'dash-64k-audio',
|
|
668
|
+
'dash-128k-audio',
|
|
669
|
+
'dash-256k-audio',
|
|
670
|
+
'dash/32k-audio',
|
|
671
|
+
'dash/64k-audio',
|
|
672
|
+
'dash/128k-audio',
|
|
673
|
+
'dash/256k-audio',
|
|
674
|
+
'empty',
|
|
675
|
+
'flac',
|
|
676
|
+
'hg-transformers-audio',
|
|
677
|
+
'mp3',
|
|
678
|
+
'ogg',
|
|
679
|
+
'opus',
|
|
680
|
+
'speech',
|
|
681
|
+
'wav',
|
|
682
|
+
]);
|
|
683
|
+
export const robotFFmpegAudio = robotFFmpeg
|
|
684
|
+
.extend({
|
|
685
|
+
preset: z
|
|
686
|
+
.enum(audioPresets)
|
|
687
|
+
.transform(transformPreset)
|
|
688
|
+
.optional()
|
|
689
|
+
.describe(`
|
|
690
|
+
Performs conversion using pre-configured settings.
|
|
691
|
+
|
|
692
|
+
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.
|
|
693
|
+
|
|
694
|
+
For a list of audio presets, see [audio presets](/docs/presets/audio/).
|
|
695
|
+
`),
|
|
696
|
+
})
|
|
697
|
+
.strict();
|
|
698
|
+
export const robotFFmpegVideo = robotFFmpeg
|
|
699
|
+
.extend({
|
|
700
|
+
width: z
|
|
701
|
+
.number()
|
|
702
|
+
.int()
|
|
703
|
+
.min(1)
|
|
704
|
+
.nullish()
|
|
705
|
+
.describe(`
|
|
706
|
+
Width of the new video, in pixels.
|
|
707
|
+
|
|
708
|
+
If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied width](/docs/presets/video/) will be implemented.
|
|
709
|
+
`),
|
|
710
|
+
height: z
|
|
711
|
+
.number()
|
|
712
|
+
.int()
|
|
713
|
+
.min(1)
|
|
714
|
+
.nullish()
|
|
715
|
+
.describe(`
|
|
716
|
+
Height of the new video, in pixels.
|
|
717
|
+
|
|
718
|
+
If the value is not specified and the \`preset\` parameter is available, the \`preset\`'s [supplied height](/docs/presets/video/) will be implemented.
|
|
719
|
+
`),
|
|
720
|
+
preset: z
|
|
721
|
+
.enum([
|
|
722
|
+
...createPresets([
|
|
723
|
+
'android',
|
|
724
|
+
'android-high',
|
|
725
|
+
'android-low',
|
|
726
|
+
'dash-270p-video',
|
|
727
|
+
'dash-360p-video',
|
|
728
|
+
'dash-480p-video',
|
|
729
|
+
'dash-540p-video',
|
|
730
|
+
'dash-576p-video',
|
|
731
|
+
'dash-720p-video',
|
|
732
|
+
'dash-1080p-video',
|
|
733
|
+
'dash/270p-video',
|
|
734
|
+
'dash/360p-video',
|
|
735
|
+
'dash/480p-video',
|
|
736
|
+
'dash/540p-video',
|
|
737
|
+
'dash/576p-video',
|
|
738
|
+
'dash/720p-video',
|
|
739
|
+
'dash/1080p-video',
|
|
740
|
+
'flash',
|
|
741
|
+
'gif',
|
|
742
|
+
'hevc',
|
|
743
|
+
'hls-270p',
|
|
744
|
+
'hls-360p',
|
|
745
|
+
'hls-480p',
|
|
746
|
+
'hls-540p',
|
|
747
|
+
'hls-576p',
|
|
748
|
+
'hls-720p',
|
|
749
|
+
'hls-1080p',
|
|
750
|
+
'hls/270p',
|
|
751
|
+
'hls/360p',
|
|
752
|
+
'hls/480p',
|
|
753
|
+
'hls/540p',
|
|
754
|
+
'hls/720p',
|
|
755
|
+
'hls/1080p',
|
|
756
|
+
'hls/4k',
|
|
757
|
+
'ipad',
|
|
758
|
+
'ipad-high',
|
|
759
|
+
'ipad-low',
|
|
760
|
+
'iphone',
|
|
761
|
+
'iphone-high',
|
|
762
|
+
'iphone-low',
|
|
763
|
+
'ogv',
|
|
764
|
+
'vod/270p',
|
|
765
|
+
'vod/480p',
|
|
766
|
+
'vod/720p',
|
|
767
|
+
'vod/1080p',
|
|
768
|
+
'vp9',
|
|
769
|
+
'vp9-270p',
|
|
770
|
+
'vp9-360p',
|
|
771
|
+
'vp9-480p',
|
|
772
|
+
'vp9-540p',
|
|
773
|
+
'vp9-576p',
|
|
774
|
+
'vp9-720p',
|
|
775
|
+
'vp9-1080p',
|
|
776
|
+
'web/mp4-x265/240p',
|
|
777
|
+
'web/mp4-x265/360p',
|
|
778
|
+
'web/mp4-x265/480p',
|
|
779
|
+
'web/mp4-x265/720p',
|
|
780
|
+
'web/mp4-x265/1080p',
|
|
781
|
+
'web/mp4-x265/4k',
|
|
782
|
+
'web/mp4-x265/8k',
|
|
783
|
+
'web/mp4/240p',
|
|
784
|
+
'web/mp4/360p',
|
|
785
|
+
'web/mp4/480p',
|
|
786
|
+
'web/mp4/540p',
|
|
787
|
+
'web/mp4/720p',
|
|
788
|
+
'web/mp4/1080p',
|
|
789
|
+
'web/mp4/4k',
|
|
790
|
+
'web/mp4/8k',
|
|
791
|
+
'web/webm-av1/240p',
|
|
792
|
+
'web/webm-av1/360p',
|
|
793
|
+
'web/webm-av1/480p',
|
|
794
|
+
'web/webm-av1/720p',
|
|
795
|
+
'web/webm-av1/1080p',
|
|
796
|
+
'web/webm-av1/4k',
|
|
797
|
+
'web/webm-av1/8k',
|
|
798
|
+
'web/webm/240p',
|
|
799
|
+
'web/webm/360p',
|
|
800
|
+
'web/webm/480p',
|
|
801
|
+
'web/webm/720p',
|
|
802
|
+
'web/webm/1080p',
|
|
803
|
+
'web/webm/4k',
|
|
804
|
+
'web/webm/8k',
|
|
805
|
+
'webm',
|
|
806
|
+
'webm-270p',
|
|
807
|
+
'webm-360p',
|
|
808
|
+
'webm-480p',
|
|
809
|
+
'webm-540p',
|
|
810
|
+
'webm-576p',
|
|
811
|
+
'webm-720p',
|
|
812
|
+
'webm-1080p',
|
|
813
|
+
'wmv',
|
|
814
|
+
]),
|
|
815
|
+
...audioPresets,
|
|
816
|
+
])
|
|
817
|
+
.transform(transformPreset)
|
|
818
|
+
.optional()
|
|
819
|
+
.describe(`
|
|
820
|
+
Converts a video according to [pre-configured settings](/docs/presets/video/).
|
|
821
|
+
|
|
822
|
+
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.
|
|
823
|
+
`),
|
|
824
|
+
})
|
|
825
|
+
.strict();
|
|
826
|
+
export const unsafeCoordinatesSchema = z
|
|
827
|
+
.union([
|
|
828
|
+
z
|
|
829
|
+
.object({
|
|
830
|
+
x1: z.union([z.string(), z.number()]).nullish(),
|
|
831
|
+
y1: z.union([z.string(), z.number()]).nullish(),
|
|
832
|
+
x2: z.union([z.string(), z.number()]).nullish(),
|
|
833
|
+
y2: z.union([z.string(), z.number()]).nullish(),
|
|
834
|
+
})
|
|
835
|
+
.strict(),
|
|
836
|
+
z.string(),
|
|
837
|
+
])
|
|
838
|
+
.describe(`
|
|
839
|
+
Coordinates for watermarking.
|
|
840
|
+
`);
|
|
841
|
+
export const parsedCoordinatesSchema = z
|
|
842
|
+
.object({
|
|
843
|
+
x1: z.number(),
|
|
844
|
+
y1: z.number(),
|
|
845
|
+
x2: z.number(),
|
|
846
|
+
y2: z.number(),
|
|
847
|
+
})
|
|
848
|
+
.strict();
|
|
849
|
+
export const path = z.union([z.string(), z.array(z.string())]);
|
|
850
|
+
export const next_page_token = z.string().default('');
|
|
851
|
+
export const files_per_page = z.number().int().default(1000);
|
|
852
|
+
export const page_number = z.number().int().default(1);
|
|
853
|
+
export const recursive = z.boolean().default(false);
|
|
854
|
+
export const return_file_stubs = z
|
|
855
|
+
.boolean()
|
|
856
|
+
.describe(`
|
|
857
|
+
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.
|
|
858
|
+
`)
|
|
859
|
+
.default(false);
|
|
860
|
+
export const port = z.number().int().min(1).max(65535);
|
|
861
|
+
// TODO: Use an enum.
|
|
862
|
+
export const preset = z.string();
|
|
863
|
+
export const resize_strategy = z
|
|
864
|
+
.enum(['crop', 'fit', 'fillcrop', 'min_fit', 'pad', 'stretch'])
|
|
865
|
+
.default('pad');
|
|
866
|
+
export const positionSchema = z.enum([
|
|
867
|
+
'bottom',
|
|
868
|
+
'bottom-left',
|
|
869
|
+
'bottom-right',
|
|
870
|
+
'center',
|
|
871
|
+
'left',
|
|
872
|
+
'right',
|
|
873
|
+
'top',
|
|
874
|
+
'top-left',
|
|
875
|
+
'top-right',
|
|
876
|
+
]);
|
|
877
|
+
export const percentageSchema = z.string().regex(/^\d+%$/);
|
|
878
|
+
export const color_with_alpha = z.string().regex(/^#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/);
|
|
879
|
+
export const color_without_alpha = z.string().regex(/^#?[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/);
|
|
880
|
+
// Extended color schemas that also support named colors (for robots that support them)
|
|
881
|
+
export const color_with_alpha_with_named = z.union([
|
|
882
|
+
color_with_alpha, // Extend the base hex color schema
|
|
883
|
+
z.enum([
|
|
884
|
+
'transparent',
|
|
885
|
+
'none',
|
|
886
|
+
'black',
|
|
887
|
+
'white',
|
|
888
|
+
'red',
|
|
889
|
+
'green',
|
|
890
|
+
'blue',
|
|
891
|
+
'yellow',
|
|
892
|
+
'cyan',
|
|
893
|
+
'magenta',
|
|
894
|
+
'gray',
|
|
895
|
+
'grey',
|
|
896
|
+
'opaque',
|
|
897
|
+
]), // Named colors
|
|
898
|
+
]);
|
|
899
|
+
export const color_without_alpha_with_named = z.union([
|
|
900
|
+
color_without_alpha, // Extend the base hex color schema
|
|
901
|
+
z.enum([
|
|
902
|
+
'transparent',
|
|
903
|
+
'none',
|
|
904
|
+
'black',
|
|
905
|
+
'white',
|
|
906
|
+
'red',
|
|
907
|
+
'green',
|
|
908
|
+
'blue',
|
|
909
|
+
'yellow',
|
|
910
|
+
'cyan',
|
|
911
|
+
'magenta',
|
|
912
|
+
'gray',
|
|
913
|
+
'grey',
|
|
914
|
+
'opaque',
|
|
915
|
+
]), // Named colors
|
|
916
|
+
]);
|
|
917
|
+
export const bitrateSchema = z.number().int().min(1);
|
|
918
|
+
export const sampleRateSchema = z.number().int().min(1);
|
|
919
|
+
export const optimize_priority = z
|
|
920
|
+
.enum(['compression-ratio', 'conversion-speed'])
|
|
921
|
+
.default('conversion-speed');
|
|
922
|
+
export const robotImagemagick = z
|
|
923
|
+
.object({
|
|
924
|
+
imagemagick_stack: z
|
|
925
|
+
// Any semver in range is allowed and normalized. The enum is used for editor completions.
|
|
926
|
+
.union([z.enum(['v3']), z.string().regex(/^v?[23](\.\d+)?(\.\d+)?$/)])
|
|
927
|
+
.default('v3'),
|
|
928
|
+
})
|
|
929
|
+
.strict();
|
|
930
|
+
export const colorspaceSchema = z.enum([
|
|
931
|
+
'CMY',
|
|
932
|
+
'CMYK',
|
|
933
|
+
'Gray',
|
|
934
|
+
'HCL',
|
|
935
|
+
'HCLp',
|
|
936
|
+
'HSB',
|
|
937
|
+
'HSI',
|
|
938
|
+
'HSL',
|
|
939
|
+
'HSV',
|
|
940
|
+
'HWB',
|
|
941
|
+
'Jzazbz',
|
|
942
|
+
'Lab',
|
|
943
|
+
'LCHab',
|
|
944
|
+
'LCHuv',
|
|
945
|
+
'LMS',
|
|
946
|
+
'Log',
|
|
947
|
+
'Luv',
|
|
948
|
+
'OHTA',
|
|
949
|
+
'OkLab',
|
|
950
|
+
'OkLCH',
|
|
951
|
+
'Rec601YCbCr',
|
|
952
|
+
'Rec709YCbCr',
|
|
953
|
+
'RGB',
|
|
954
|
+
'scRGB',
|
|
955
|
+
'sRGB',
|
|
956
|
+
'Transparent',
|
|
957
|
+
'Undefined',
|
|
958
|
+
'xyY',
|
|
959
|
+
'XYZ',
|
|
960
|
+
'YCbCr',
|
|
961
|
+
'YCC',
|
|
962
|
+
'YDbDr',
|
|
963
|
+
'YIQ',
|
|
964
|
+
'YPbPr',
|
|
965
|
+
'YUV',
|
|
966
|
+
]);
|
|
967
|
+
// TODO: add before and after images to the description.
|
|
968
|
+
export const imageQualitySchema = z
|
|
969
|
+
.number()
|
|
970
|
+
.int()
|
|
971
|
+
.min(1)
|
|
972
|
+
.max(100)
|
|
973
|
+
.default(92)
|
|
974
|
+
.describe(`
|
|
975
|
+
Controls the image compression for JPG and PNG images. Please also take a look at [🤖/image/optimize](/docs/robots/image-optimize/).
|
|
976
|
+
`);
|
|
977
|
+
export const aiProviderSchema = z.enum(['aws', 'gcp', 'replicate', 'fal', 'transloadit']);
|
|
978
|
+
export const granularitySchema = z.enum(['full', 'list']).default('full');
|
|
979
|
+
export const robotImport = z
|
|
980
|
+
.object({
|
|
981
|
+
force_name: z
|
|
982
|
+
.union([z.string(), z.array(z.string())])
|
|
983
|
+
.nullable()
|
|
984
|
+
.default(null)
|
|
985
|
+
.describe('Custom name for the imported file(s). By default file names are derived from the source.'),
|
|
986
|
+
ignore_errors: z
|
|
987
|
+
.union([z.boolean(), z.array(z.enum(['meta', 'import', 'execute']))])
|
|
988
|
+
.transform((value) => value === true ? ['meta', 'import', 'execute'] : value === false ? [] : value)
|
|
989
|
+
.default([]),
|
|
990
|
+
})
|
|
991
|
+
.strict();
|
|
992
|
+
export const azureBase = z
|
|
993
|
+
.object({
|
|
994
|
+
credentials: z
|
|
995
|
+
.string()
|
|
996
|
+
.optional()
|
|
997
|
+
.describe(`
|
|
998
|
+
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.
|
|
999
|
+
|
|
1000
|
+
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"\`.
|
|
1001
|
+
`),
|
|
1002
|
+
account: z.string().optional(),
|
|
1003
|
+
container: z.string().optional(),
|
|
1004
|
+
key: z.string().optional(),
|
|
1005
|
+
})
|
|
1006
|
+
.strict();
|
|
1007
|
+
export const backblazeBase = z
|
|
1008
|
+
.object({
|
|
1009
|
+
credentials: z
|
|
1010
|
+
.string()
|
|
1011
|
+
.optional()
|
|
1012
|
+
.describe(`
|
|
1013
|
+
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.
|
|
1014
|
+
|
|
1015
|
+
To create your credential information, head over to Backblaze, sign in to your account, and select "Create a Bucket". Save the name of your bucket, and click on the "App Keys" tab, scroll to the bottom of the page then select “Add a New Application Key”. Allow access to your recently created bucket, select “Read and Write” as your type of access, and tick the “Allow List All Bucket Names” option.
|
|
1016
|
+
|
|
1017
|
+
Now that everything is in place, create your key, and take note of the information you are given so you can input the information into your <dfn>Template Credentials</dfn>.
|
|
1018
|
+
|
|
1019
|
+
⚠️ Your App Key will only be viewable once, so make sure you note this down.
|
|
1020
|
+
|
|
1021
|
+
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"\`.
|
|
1022
|
+
`),
|
|
1023
|
+
bucket: z.string().optional(),
|
|
1024
|
+
app_key_id: z.string().optional(),
|
|
1025
|
+
app_key: z.string().optional(),
|
|
1026
|
+
})
|
|
1027
|
+
.strict();
|
|
1028
|
+
export const cloudfilesBase = z
|
|
1029
|
+
.object({
|
|
1030
|
+
credentials: z
|
|
1031
|
+
.string()
|
|
1032
|
+
.optional()
|
|
1033
|
+
.describe(`
|
|
1034
|
+
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.
|
|
1035
|
+
|
|
1036
|
+
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"\`.
|
|
1037
|
+
`),
|
|
1038
|
+
account_type: z.enum(['uk', 'us']).optional(),
|
|
1039
|
+
data_center: z.string().optional(),
|
|
1040
|
+
user: z.string().optional(),
|
|
1041
|
+
key: z.string().optional(),
|
|
1042
|
+
container: z.string().optional(),
|
|
1043
|
+
})
|
|
1044
|
+
.strict();
|
|
1045
|
+
export const cloudflareBase = z
|
|
1046
|
+
.object({
|
|
1047
|
+
credentials: z
|
|
1048
|
+
.string()
|
|
1049
|
+
.optional()
|
|
1050
|
+
.describe(`
|
|
1051
|
+
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your cloudflare bucket, Key, Secret and Bucket region.
|
|
1052
|
+
|
|
1053
|
+
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"\`.
|
|
1054
|
+
`),
|
|
1055
|
+
bucket: z.string().optional(),
|
|
1056
|
+
host: z.string().optional(),
|
|
1057
|
+
key: z.string().optional(),
|
|
1058
|
+
secret: z.string().optional(),
|
|
1059
|
+
})
|
|
1060
|
+
.strict();
|
|
1061
|
+
export const digitalOceanBase = z
|
|
1062
|
+
.object({
|
|
1063
|
+
credentials: z
|
|
1064
|
+
.string()
|
|
1065
|
+
.optional()
|
|
1066
|
+
.describe(`
|
|
1067
|
+
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.
|
|
1068
|
+
|
|
1069
|
+
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"\`.
|
|
1070
|
+
`),
|
|
1071
|
+
space: z.string().optional(),
|
|
1072
|
+
region: z.string().optional(),
|
|
1073
|
+
key: z.string().optional(),
|
|
1074
|
+
secret: z.string().optional(),
|
|
1075
|
+
})
|
|
1076
|
+
.strict();
|
|
1077
|
+
export const dropboxBase = z
|
|
1078
|
+
.object({
|
|
1079
|
+
credentials: z
|
|
1080
|
+
.string()
|
|
1081
|
+
.optional()
|
|
1082
|
+
.describe(`
|
|
1083
|
+
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.
|
|
1084
|
+
`),
|
|
1085
|
+
})
|
|
1086
|
+
.strict();
|
|
1087
|
+
export const vimeoBase = z
|
|
1088
|
+
.object({
|
|
1089
|
+
credentials: z
|
|
1090
|
+
.string()
|
|
1091
|
+
.optional()
|
|
1092
|
+
.describe(`
|
|
1093
|
+
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.
|
|
1094
|
+
`),
|
|
1095
|
+
})
|
|
1096
|
+
.strict();
|
|
1097
|
+
export const ftpBase = z
|
|
1098
|
+
.object({
|
|
1099
|
+
credentials: z
|
|
1100
|
+
.string()
|
|
1101
|
+
.optional()
|
|
1102
|
+
.describe(`
|
|
1103
|
+
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.
|
|
1104
|
+
|
|
1105
|
+
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"\`.
|
|
1106
|
+
`),
|
|
1107
|
+
host: z.string().optional(),
|
|
1108
|
+
port: port.default(21).describe('The port to use for the FTP connection.'),
|
|
1109
|
+
user: z.string().optional(),
|
|
1110
|
+
password: z.string().optional(),
|
|
1111
|
+
})
|
|
1112
|
+
.strict();
|
|
1113
|
+
export const googleBase = z
|
|
1114
|
+
.object({
|
|
1115
|
+
credentials: z
|
|
1116
|
+
.string()
|
|
1117
|
+
.optional()
|
|
1118
|
+
.describe(`
|
|
1119
|
+
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>.
|
|
1120
|
+
|
|
1121
|
+
Go back to your Google credentials project and enable the "Google Cloud Storage JSON API" for it. Wait around ten minutes for the action to propagate through the Google network. Grab the project ID from the dropdown menu in the header bar on the Google site. You will also need it later on.
|
|
1122
|
+
|
|
1123
|
+
Now you can set up the \`storage.objects.create\` and \`storage.objects.delete\` permissions. The latter is optional and only required if you intend to overwrite existing paths.
|
|
1124
|
+
|
|
1125
|
+
To do this from the Google Cloud console, navigate to "IAM & Admin" and select "Roles". From here, click "Create Role", enter a name, set the role launch stage to _General availability,_ and set the permissions stated above.
|
|
1126
|
+
|
|
1127
|
+
Next, go to Storage browser and select the ellipsis on your bucket to edit bucket permissions. From here, select "Add Member", enter your service account as a new member, and select your newly created role.
|
|
1128
|
+
|
|
1129
|
+
Then, create your associated [Template Credentials](/c/template-credentials/) in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value.
|
|
1130
|
+
`),
|
|
1131
|
+
})
|
|
1132
|
+
.strict();
|
|
1133
|
+
export const minioBase = z
|
|
1134
|
+
.object({
|
|
1135
|
+
credentials: z
|
|
1136
|
+
.string()
|
|
1137
|
+
.optional()
|
|
1138
|
+
.describe(`
|
|
1139
|
+
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.
|
|
1140
|
+
|
|
1141
|
+
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"\`.
|
|
1142
|
+
`),
|
|
1143
|
+
bucket: z.string().optional(),
|
|
1144
|
+
host: z.string().optional(),
|
|
1145
|
+
key: z.string().optional(),
|
|
1146
|
+
secret: z.string().optional(),
|
|
1147
|
+
})
|
|
1148
|
+
.strict();
|
|
1149
|
+
export const s3Base = z
|
|
1150
|
+
.object({
|
|
1151
|
+
credentials: z
|
|
1152
|
+
.string()
|
|
1153
|
+
.optional()
|
|
1154
|
+
.describe(`
|
|
1155
|
+
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.
|
|
1156
|
+
|
|
1157
|
+
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"\`.
|
|
1158
|
+
`),
|
|
1159
|
+
bucket: z.string().optional(),
|
|
1160
|
+
bucket_region: z.string().optional(),
|
|
1161
|
+
key: z.string().optional(),
|
|
1162
|
+
secret: z.string().optional(),
|
|
1163
|
+
})
|
|
1164
|
+
.strict();
|
|
1165
|
+
export const sftpBase = z
|
|
1166
|
+
.object({
|
|
1167
|
+
credentials: z
|
|
1168
|
+
.string()
|
|
1169
|
+
.optional()
|
|
1170
|
+
.describe(`
|
|
1171
|
+
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.
|
|
1172
|
+
|
|
1173
|
+
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).
|
|
1174
|
+
`),
|
|
1175
|
+
host: z.string().optional(),
|
|
1176
|
+
port: port.default(21).describe('The port to use for the FTP connection.'),
|
|
1177
|
+
user: z.string().optional(),
|
|
1178
|
+
public_key: z.string().optional(),
|
|
1179
|
+
})
|
|
1180
|
+
.strict();
|
|
1181
|
+
export const supabaseBase = z
|
|
1182
|
+
.object({
|
|
1183
|
+
credentials: z
|
|
1184
|
+
.string()
|
|
1185
|
+
.optional()
|
|
1186
|
+
.describe(`
|
|
1187
|
+
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your Supabase bucket, Key, Secret and Bucket region.
|
|
1188
|
+
|
|
1189
|
+
While we recommend to use <dfn>Template Credentials</dfn> at all times, some use cases demand dynamic credentials for which using <dfn>Template Credentials</dfn> is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead: \`"bucket"\`, \`"host"\`, \`"key"\`, \`"secret"\`.
|
|
1190
|
+
|
|
1191
|
+
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"\`.
|
|
1192
|
+
`),
|
|
1193
|
+
bucket: z.string().optional(),
|
|
1194
|
+
bucket_region: z
|
|
1195
|
+
.string()
|
|
1196
|
+
.optional()
|
|
1197
|
+
.describe(`
|
|
1198
|
+
The region where the bucket is located.
|
|
1199
|
+
`),
|
|
1200
|
+
host: z.string().optional(),
|
|
1201
|
+
key: z.string().optional(),
|
|
1202
|
+
secret: z.string().optional(),
|
|
1203
|
+
})
|
|
1204
|
+
.strict();
|
|
1205
|
+
export const swiftBase = z
|
|
1206
|
+
.object({
|
|
1207
|
+
credentials: z
|
|
1208
|
+
.string()
|
|
1209
|
+
.optional()
|
|
1210
|
+
.describe(`
|
|
1211
|
+
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your Swift bucket, Key, Secret and Bucket region.
|
|
1212
|
+
|
|
1213
|
+
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"\`.
|
|
1214
|
+
`),
|
|
1215
|
+
bucket: z.string().optional(),
|
|
1216
|
+
bucket_region: z
|
|
1217
|
+
.string()
|
|
1218
|
+
.optional()
|
|
1219
|
+
.describe(`
|
|
1220
|
+
The region where the bucket is located.
|
|
1221
|
+
`),
|
|
1222
|
+
host: z.string().optional(),
|
|
1223
|
+
key: z.string().optional(),
|
|
1224
|
+
secret: z.string().optional(),
|
|
1225
|
+
})
|
|
1226
|
+
.strict();
|
|
1227
|
+
export const tigrisBase = z
|
|
1228
|
+
.object({
|
|
1229
|
+
credentials: z
|
|
1230
|
+
.string()
|
|
1231
|
+
.optional()
|
|
1232
|
+
.describe(`
|
|
1233
|
+
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.
|
|
1234
|
+
|
|
1235
|
+
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"\`.
|
|
1236
|
+
`),
|
|
1237
|
+
bucket: z.string().optional(),
|
|
1238
|
+
bucket_region: z
|
|
1239
|
+
.string()
|
|
1240
|
+
.optional()
|
|
1241
|
+
.describe(`
|
|
1242
|
+
The region where the bucket is located.
|
|
1243
|
+
`),
|
|
1244
|
+
host: z.string().optional(),
|
|
1245
|
+
key: z.string().optional(),
|
|
1246
|
+
secret: z.string().optional(),
|
|
1247
|
+
})
|
|
1248
|
+
.strict();
|
|
1249
|
+
export const wasabiBase = z
|
|
1250
|
+
.object({
|
|
1251
|
+
credentials: z
|
|
1252
|
+
.string()
|
|
1253
|
+
.optional()
|
|
1254
|
+
.describe(`
|
|
1255
|
+
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.
|
|
1256
|
+
|
|
1257
|
+
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"\`.
|
|
1258
|
+
`),
|
|
1259
|
+
bucket: z.string().optional(),
|
|
1260
|
+
bucket_region: z
|
|
1261
|
+
.string()
|
|
1262
|
+
.optional()
|
|
1263
|
+
.describe(`
|
|
1264
|
+
The region where the bucket is located.
|
|
1265
|
+
`),
|
|
1266
|
+
host: z.string().optional(),
|
|
1267
|
+
key: z.string().optional(),
|
|
1268
|
+
secret: z.string().optional(),
|
|
1269
|
+
})
|
|
1270
|
+
.strict();
|
|
1271
|
+
export const filterExpression = z.union([
|
|
1272
|
+
z.string(),
|
|
1273
|
+
z.number(),
|
|
1274
|
+
z.null(),
|
|
1275
|
+
z.array(z.union([z.string(), z.number(), z.null()])),
|
|
1276
|
+
]);
|
|
1277
|
+
export const filterCondition = z.union([
|
|
1278
|
+
z.null(),
|
|
1279
|
+
z.string(),
|
|
1280
|
+
z.array(z.tuple([
|
|
1281
|
+
filterExpression,
|
|
1282
|
+
z.union([
|
|
1283
|
+
z.literal('=').describe('Equals without type check'),
|
|
1284
|
+
z.literal('==').describe('Equals without type check'),
|
|
1285
|
+
z.literal('===').describe('Strict equals with type check'),
|
|
1286
|
+
z.literal('<').describe('Less than'),
|
|
1287
|
+
z.literal('>').describe('Greater than'),
|
|
1288
|
+
z.literal('<=').describe('Less or equal'),
|
|
1289
|
+
z.literal('>=').describe('Greater or equal'),
|
|
1290
|
+
z.literal('!=').describe('Simple inequality check without type check'),
|
|
1291
|
+
z.literal('!==').describe('Strict inequality check with type check'),
|
|
1292
|
+
z
|
|
1293
|
+
.literal('regex')
|
|
1294
|
+
.describe('Case-insensitive regular expression based on [RE2](https://github.com/google/re2) `.match()`'),
|
|
1295
|
+
z
|
|
1296
|
+
.literal('!regex')
|
|
1297
|
+
.describe('Case-insensitive regular expression based on [RE2](https://github.com/google/re2) `!.match()`'),
|
|
1298
|
+
z
|
|
1299
|
+
.literal('includes')
|
|
1300
|
+
.describe('Check if the right element is included in the array, which is represented by the left element'),
|
|
1301
|
+
z
|
|
1302
|
+
.literal('!includes')
|
|
1303
|
+
.describe('Check if the right element is not included in the array, which is represented by the left element'),
|
|
1304
|
+
z
|
|
1305
|
+
.literal('empty')
|
|
1306
|
+
.describe('Check if the left element is an empty array, an object without properties, an empty string, the number zero or the boolean false. Leave the third element of the array to be an empty string. It won’t be evaluated.'),
|
|
1307
|
+
z
|
|
1308
|
+
.literal('!empty')
|
|
1309
|
+
.describe('Check if the left element is an array with members, an object with at least one property, a non-empty string, a number that does not equal zero or the boolean true. Leave the third element of the array to be an empty string. It won’t be evaluated.'),
|
|
1310
|
+
]),
|
|
1311
|
+
filterExpression,
|
|
1312
|
+
])),
|
|
1313
|
+
]);
|
|
1314
|
+
/**
|
|
1315
|
+
* Parameters specific to the /video/encode robot. Useful for typing robots that pass files to /video/encode.
|
|
1316
|
+
*/
|
|
1317
|
+
export const videoEncodeSpecificInstructionsSchema = robotFFmpegVideo
|
|
1318
|
+
.extend({
|
|
1319
|
+
resize_strategy: resize_strategy.describe(`
|
|
1320
|
+
See the [available resize strategies](/docs/topics/resize-strategies/).
|
|
1321
|
+
`),
|
|
1322
|
+
zoom: z
|
|
1323
|
+
.boolean()
|
|
1324
|
+
.default(true)
|
|
1325
|
+
.describe(`
|
|
1326
|
+
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/).
|
|
1327
|
+
`),
|
|
1328
|
+
crop: unsafeCoordinatesSchema.optional().describe(`
|
|
1329
|
+
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.
|
|
1330
|
+
|
|
1331
|
+
For example:
|
|
1332
|
+
|
|
1333
|
+
\`\`\`json
|
|
1334
|
+
{
|
|
1335
|
+
"x1": 80,
|
|
1336
|
+
"y1": 100,
|
|
1337
|
+
"x2": "60%",
|
|
1338
|
+
"y2": "80%"
|
|
1339
|
+
}
|
|
1340
|
+
\`\`\`
|
|
1341
|
+
|
|
1342
|
+
This will crop the area from \`(80, 100)\` to \`(600, 800)\` from a 1000×1000 pixels video, which is a square whose width is 520px and height is 700px. If \`crop\` is set, the width and height parameters are ignored, and the \`resize_strategy\` is set to \`crop\` automatically.
|
|
1343
|
+
|
|
1344
|
+
You can also use a JSON string of such an object with coordinates in similar fashion:
|
|
1345
|
+
|
|
1346
|
+
\`\`\`json
|
|
1347
|
+
"{\\"x1\\": <Integer>, \\"y1\\": <Integer>, \\"x2\\": <Integer>, \\"y2\\": <Integer>}"
|
|
1348
|
+
\`\`\`
|
|
1349
|
+
`),
|
|
1350
|
+
background: color_with_alpha.default('#00000000').describe(`
|
|
1351
|
+
The background color of the resulting video the \`"rrggbbaa"\` format (red, green, blue, alpha) when used with the \`"pad"\` resize strategy. The default color is black.
|
|
1352
|
+
`),
|
|
1353
|
+
rotate: z
|
|
1354
|
+
// We can’t use enum.
|
|
1355
|
+
// See https://github.com/colinhacks/zod/issues/2686
|
|
1356
|
+
.union([
|
|
1357
|
+
z.literal(0),
|
|
1358
|
+
z.literal(90),
|
|
1359
|
+
z.literal(180),
|
|
1360
|
+
z.literal(270),
|
|
1361
|
+
z.literal(360),
|
|
1362
|
+
z.literal(false),
|
|
1363
|
+
])
|
|
1364
|
+
.optional()
|
|
1365
|
+
.describe(`
|
|
1366
|
+
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.
|
|
1367
|
+
`),
|
|
1368
|
+
hint: z
|
|
1369
|
+
.boolean()
|
|
1370
|
+
.default(false)
|
|
1371
|
+
.describe(`
|
|
1372
|
+
Enables hinting for mp4 files, for RTP/RTSP streaming.
|
|
1373
|
+
`),
|
|
1374
|
+
turbo: z
|
|
1375
|
+
.boolean()
|
|
1376
|
+
.default(false)
|
|
1377
|
+
.describe(`
|
|
1378
|
+
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.
|
|
1379
|
+
`),
|
|
1380
|
+
chunk_duration: z
|
|
1381
|
+
.number()
|
|
1382
|
+
.int()
|
|
1383
|
+
.min(1)
|
|
1384
|
+
.optional()
|
|
1385
|
+
.describe(`
|
|
1386
|
+
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.
|
|
1387
|
+
`),
|
|
1388
|
+
watermark_url: z
|
|
1389
|
+
.string()
|
|
1390
|
+
.default('')
|
|
1391
|
+
.describe(`
|
|
1392
|
+
A URL indicating a PNG image to be overlaid above this image. You can also [supply the watermark via another Assembly Step](/docs/topics/use-parameter/#supplying-the-watermark-via-an-assembly-step).
|
|
1393
|
+
`),
|
|
1394
|
+
watermark_position: z
|
|
1395
|
+
.union([positionSchema, z.array(positionSchema)])
|
|
1396
|
+
.default('center')
|
|
1397
|
+
.describe(`
|
|
1398
|
+
The position at which the watermark is placed.
|
|
1399
|
+
|
|
1400
|
+
An array of possible values can also be specified, in which case one value will be selected at random, such as \`[ "center", "left", "bottom-left", "bottom-right" ]\`.
|
|
1401
|
+
|
|
1402
|
+
This setting puts the watermark in the specified corner. To use a specific pixel offset for the watermark, you will need to add the padding to the image itself.
|
|
1403
|
+
`),
|
|
1404
|
+
watermark_x_offset: z
|
|
1405
|
+
.number()
|
|
1406
|
+
.int()
|
|
1407
|
+
.default(0)
|
|
1408
|
+
.describe(`
|
|
1409
|
+
The x-offset in number of pixels at which the watermark will be placed in relation to the position it has due to \`watermark_position\`.
|
|
1410
|
+
|
|
1411
|
+
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.
|
|
1412
|
+
`),
|
|
1413
|
+
watermark_y_offset: z
|
|
1414
|
+
.number()
|
|
1415
|
+
.int()
|
|
1416
|
+
.default(0)
|
|
1417
|
+
.describe(`
|
|
1418
|
+
The y-offset in number of pixels at which the watermark will be placed in relation to the position it has due to \`watermark_position\`.
|
|
1419
|
+
|
|
1420
|
+
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.
|
|
1421
|
+
`),
|
|
1422
|
+
watermark_size: percentageSchema.optional().describe(`
|
|
1423
|
+
The size of the watermark, as a percentage, such as \`"50%"\`. How the watermark is resized greatly depends on the \`watermark_resize_strategy\`.
|
|
1424
|
+
`),
|
|
1425
|
+
watermark_resize_strategy: z
|
|
1426
|
+
.enum(['area', 'fit', 'stretch'])
|
|
1427
|
+
.default('fit')
|
|
1428
|
+
.describe(`
|
|
1429
|
+
To explain how the resize strategies work, let's assume our target video size is 800×800 pixels and our watermark image is 400×300 pixels. Let's also assume, the \`watermark_size\` parameter is set to \`"25%"\`.
|
|
1430
|
+
|
|
1431
|
+
For the \`"fit"\` resize strategy, the watermark is scaled so that the longer side of the watermark takes up 25% of the corresponding video side. And the other side is scaled according to the aspect ratio of the watermark image. So with our watermark, the width is the longer side, and 25% of the video size would be 200px. Hence, the watermark would be resized to 200×150 pixels. If the \`watermark_size\` was set to \`"50%"\`", it would be resized to 400×300 pixels (so just left at its original size).
|
|
1432
|
+
|
|
1433
|
+
For the \`"stretch"\` resize strategy, the watermark image is stretched (meaning, it is resized without keeping its aspect ratio in mind) so that both sides take up 25% of the corresponding video side. Since our video is 800×800 pixels, for a watermark size of 25% the watermark would be resized to 200×200 pixels. Its height would appear stretched, because keeping the aspect ratio in mind it would be resized to 200×150 pixels instead.
|
|
1434
|
+
|
|
1435
|
+
For the \`"area"\` resize strategy, the watermark is resized (keeping its aspect ratio in check) so that it covers \`"xx%"\` of the video's surface area. The value from \`watermark_size\` is used for the percentage area size.
|
|
1436
|
+
`),
|
|
1437
|
+
watermark_start_time: z
|
|
1438
|
+
.number()
|
|
1439
|
+
.default(0)
|
|
1440
|
+
.describe(`
|
|
1441
|
+
The delay in seconds from the start of the video for the watermark to appear. By default the watermark is immediately shown.
|
|
1442
|
+
`),
|
|
1443
|
+
watermark_duration: z
|
|
1444
|
+
.number()
|
|
1445
|
+
.default(-1)
|
|
1446
|
+
.describe(`
|
|
1447
|
+
The duration in seconds for the watermark to be shown. Can be used together with \`watermark_start_time\` to create nice effects. The default value is \`-1.0\`, which means that the watermark is shown for the entire duration of the video.
|
|
1448
|
+
`),
|
|
1449
|
+
watermark_opacity: z
|
|
1450
|
+
.number()
|
|
1451
|
+
.min(0)
|
|
1452
|
+
.max(1)
|
|
1453
|
+
.default(1)
|
|
1454
|
+
.describe(`
|
|
1455
|
+
The opacity of the watermark. Valid values are between \`0\` (invisible) and \`1.0\` (full visibility).
|
|
1456
|
+
`),
|
|
1457
|
+
segment: z
|
|
1458
|
+
.boolean()
|
|
1459
|
+
.default(false)
|
|
1460
|
+
.describe(`
|
|
1461
|
+
Splits the file into multiple parts, to be used for Apple's [HTTP Live Streaming](https://developer.apple.com/resources/http-streaming/).
|
|
1462
|
+
`),
|
|
1463
|
+
segment_duration: z
|
|
1464
|
+
.number()
|
|
1465
|
+
.int()
|
|
1466
|
+
.min(1)
|
|
1467
|
+
.default(10)
|
|
1468
|
+
.describe(`
|
|
1469
|
+
Specifies the length of each HTTP segment. This is optional, and the default value as recommended by Apple is \`10\`. Do not change this value unless you have a good reason.
|
|
1470
|
+
`),
|
|
1471
|
+
segment_prefix: z
|
|
1472
|
+
.string()
|
|
1473
|
+
.default('')
|
|
1474
|
+
.describe(`
|
|
1475
|
+
The prefix used for the naming. For example, a prefix of \`"segment_"\` would produce files named \`"segment_0.ts"\`, \`"segment_1.ts"\` and so on. This is optional, and defaults to the base name of the input file. Also see the related \`segment_name\` parameter.
|
|
1476
|
+
`),
|
|
1477
|
+
segment_name: z
|
|
1478
|
+
.string()
|
|
1479
|
+
.default('')
|
|
1480
|
+
.describe(`
|
|
1481
|
+
The name used for the final segment. Available variables are \`\${segment_prefix}\`, \`\${segment_number}\` and \`\${segment_id}\` (which is a UUIDv4 without dashes).
|
|
1482
|
+
`),
|
|
1483
|
+
segment_time_delta: z
|
|
1484
|
+
.number()
|
|
1485
|
+
.optional()
|
|
1486
|
+
.describe(`
|
|
1487
|
+
Delta to apply to segment duration. This is optional and allows fine-tuning of segment boundaries.
|
|
1488
|
+
`),
|
|
1489
|
+
})
|
|
1490
|
+
.strict();
|
|
1491
|
+
//# sourceMappingURL=_instructions-primitives.js.map
|