@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,125 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
4
|
+
import { interpolateRobot, robotBase, robotUse } from './_instructions-primitives.ts'
|
|
5
|
+
|
|
6
|
+
export const meta: RobotMetaInput = {
|
|
7
|
+
allowed_for_url_transform: true,
|
|
8
|
+
bytescount: 1,
|
|
9
|
+
discount_factor: 0.8,
|
|
10
|
+
discount_pct: 20,
|
|
11
|
+
example_code: {
|
|
12
|
+
steps: {
|
|
13
|
+
decompressed: {
|
|
14
|
+
robot: '/file/decompress',
|
|
15
|
+
use: ':original',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
example_code_description: 'Decompress an uploaded archive:',
|
|
20
|
+
minimum_charge: 0,
|
|
21
|
+
output_factor: 1,
|
|
22
|
+
override_lvl1: 'File Compressing',
|
|
23
|
+
purpose_sentence:
|
|
24
|
+
'extracts entire archives of files to be consumed by other Robots or exported as individual files',
|
|
25
|
+
purpose_verb: 'decompress',
|
|
26
|
+
purpose_word: 'decompress',
|
|
27
|
+
purpose_words: 'Decompress archives',
|
|
28
|
+
service_slug: 'file-compressing',
|
|
29
|
+
slot_count: 10,
|
|
30
|
+
title: 'Decompress archives',
|
|
31
|
+
typical_file_size_mb: 1.2,
|
|
32
|
+
typical_file_type: 'file',
|
|
33
|
+
name: 'FileDecompressRobot',
|
|
34
|
+
priceFactor: 1.25,
|
|
35
|
+
queueSlotCount: 10,
|
|
36
|
+
isAllowedForUrlTransform: true,
|
|
37
|
+
trackOutputFileSize: true,
|
|
38
|
+
isInternal: false,
|
|
39
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: true,
|
|
40
|
+
stage: 'ga',
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const robotFileDecompressInstructionsSchema = robotBase
|
|
44
|
+
.merge(robotUse)
|
|
45
|
+
.extend({
|
|
46
|
+
robot: z.literal('/file/decompress').describe(`
|
|
47
|
+
This Robot supports the following archive formats:
|
|
48
|
+
|
|
49
|
+
- ZIP archives (with uncompressed or "deflate"-compressed entries)
|
|
50
|
+
- 7-Zip archives
|
|
51
|
+
- RAR archives
|
|
52
|
+
- GNU tar format (including GNU long filenames, long link names, and sparse files)
|
|
53
|
+
- Solaris 9 extended tar format (including ACLs)
|
|
54
|
+
- Old V7 tar archives
|
|
55
|
+
- POSIX ustar
|
|
56
|
+
- POSIX pax interchange format
|
|
57
|
+
- POSIX octet-oriented cpio
|
|
58
|
+
- SVR4 ASCII cpio
|
|
59
|
+
- POSIX octet-oriented cpio
|
|
60
|
+
- Binary cpio (big-endian or little-endian)
|
|
61
|
+
- ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
|
|
62
|
+
- GNU and BSD "ar" archives
|
|
63
|
+
- "mtree" format
|
|
64
|
+
- Microsoft CAB format
|
|
65
|
+
- LHA and LZH archives
|
|
66
|
+
- XAR archives
|
|
67
|
+
|
|
68
|
+
This <dfn>Robot</dfn> also detects and handles any of the following before evaluating the archive file:
|
|
69
|
+
|
|
70
|
+
- uuencoded files
|
|
71
|
+
- Files with RPM wrapper
|
|
72
|
+
- gzip compression
|
|
73
|
+
- bzip2 compression
|
|
74
|
+
- compress/LZW compression
|
|
75
|
+
- lzma, lzip, and xz compression
|
|
76
|
+
|
|
77
|
+
For security reasons, archives that contain symlinks to outside the archived dir, will error out the <dfn>Assembly</dfn>. Decompressing password-protected archives (encrypted archives) is currently not fully supported but will not cause an <dfn>Assembly</dfn> to fail.
|
|
78
|
+
`),
|
|
79
|
+
ignore_errors: z
|
|
80
|
+
.union([z.boolean(), z.array(z.enum(['meta', 'execute']))])
|
|
81
|
+
.transform((ignoreErrors): ('meta' | 'execute')[] =>
|
|
82
|
+
ignoreErrors === true ? ['meta', 'execute'] : ignoreErrors === false ? [] : ignoreErrors,
|
|
83
|
+
)
|
|
84
|
+
.default([])
|
|
85
|
+
.describe(`
|
|
86
|
+
A possible array member is only \`"meta"\`.
|
|
87
|
+
|
|
88
|
+
You might see an error when trying to extract metadata from the files inside your archive. This happens, for example, for files with a size of zero bytes. Setting this to \`true\` will cause the <dfn>Robot</dfn> to not stop the file decompression (and the entire <dfn>Assembly</dfn>) when that happens.
|
|
89
|
+
|
|
90
|
+
To keep backwards compatibility, setting this parameter to \`true\` will set it to \`["meta"]\` internally.
|
|
91
|
+
`),
|
|
92
|
+
})
|
|
93
|
+
.strict()
|
|
94
|
+
|
|
95
|
+
export const robotFileDecompressInstructionsWithHiddenFieldsSchema =
|
|
96
|
+
robotFileDecompressInstructionsSchema.extend({
|
|
97
|
+
result: z
|
|
98
|
+
.union([z.literal('debug'), robotFileDecompressInstructionsSchema.shape.result])
|
|
99
|
+
.optional(),
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
export type RobotFileDecompressInstructions = z.infer<typeof robotFileDecompressInstructionsSchema>
|
|
103
|
+
export type RobotFileDecompressInstructionsWithHiddenFields = z.infer<
|
|
104
|
+
typeof robotFileDecompressInstructionsWithHiddenFieldsSchema
|
|
105
|
+
>
|
|
106
|
+
|
|
107
|
+
export const interpolatableRobotFileDecompressInstructionsSchema = interpolateRobot(
|
|
108
|
+
robotFileDecompressInstructionsSchema,
|
|
109
|
+
)
|
|
110
|
+
export type InterpolatableRobotFileDecompressInstructions =
|
|
111
|
+
InterpolatableRobotFileDecompressInstructionsInput
|
|
112
|
+
|
|
113
|
+
export type InterpolatableRobotFileDecompressInstructionsInput = z.input<
|
|
114
|
+
typeof interpolatableRobotFileDecompressInstructionsSchema
|
|
115
|
+
>
|
|
116
|
+
|
|
117
|
+
export const interpolatableRobotFileDecompressInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
118
|
+
robotFileDecompressInstructionsWithHiddenFieldsSchema,
|
|
119
|
+
)
|
|
120
|
+
export type InterpolatableRobotFileDecompressInstructionsWithHiddenFields = z.infer<
|
|
121
|
+
typeof interpolatableRobotFileDecompressInstructionsWithHiddenFieldsSchema
|
|
122
|
+
>
|
|
123
|
+
export type InterpolatableRobotFileDecompressInstructionsWithHiddenFieldsInput = z.input<
|
|
124
|
+
typeof interpolatableRobotFileDecompressInstructionsWithHiddenFieldsSchema
|
|
125
|
+
>
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
4
|
+
import {
|
|
5
|
+
filterCondition,
|
|
6
|
+
interpolateRobot,
|
|
7
|
+
robotBase,
|
|
8
|
+
robotUse,
|
|
9
|
+
} from './_instructions-primitives.ts'
|
|
10
|
+
|
|
11
|
+
export const meta: RobotMetaInput = {
|
|
12
|
+
allowed_for_url_transform: true,
|
|
13
|
+
bytescount: 0,
|
|
14
|
+
discount_factor: 0,
|
|
15
|
+
discount_pct: 100,
|
|
16
|
+
example_code: {
|
|
17
|
+
steps: {
|
|
18
|
+
filtered: {
|
|
19
|
+
robot: '/file/filter',
|
|
20
|
+
use: ':original',
|
|
21
|
+
declines: [['${file.size}', '>', '20971520']],
|
|
22
|
+
error_on_decline: true,
|
|
23
|
+
error_msg: 'File size must not exceed 20 MB',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
example_code_description: 'Reject files that are larger than 20 MB:',
|
|
28
|
+
minimum_charge: 0,
|
|
29
|
+
output_factor: 1,
|
|
30
|
+
override_lvl1: 'File Filtering',
|
|
31
|
+
purpose_sentence: 'directs files to different encoding Steps based on your conditions',
|
|
32
|
+
purpose_verb: 'filter',
|
|
33
|
+
purpose_word: 'filter',
|
|
34
|
+
purpose_words: 'Filter files',
|
|
35
|
+
service_slug: 'file-filtering',
|
|
36
|
+
slot_count: 0,
|
|
37
|
+
title: 'Filter files',
|
|
38
|
+
typical_file_size_mb: 1.2,
|
|
39
|
+
typical_file_type: 'file',
|
|
40
|
+
name: 'FileFilterRobot',
|
|
41
|
+
priceFactor: 100,
|
|
42
|
+
queueSlotCount: 0,
|
|
43
|
+
downloadInputFiles: false,
|
|
44
|
+
preserveInputFileUrls: true,
|
|
45
|
+
isAllowedForUrlTransform: true,
|
|
46
|
+
trackOutputFileSize: true,
|
|
47
|
+
isInternal: false,
|
|
48
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
|
|
49
|
+
stage: 'ga',
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const robotFileFilterInstructionsSchema = robotBase
|
|
53
|
+
.merge(robotUse)
|
|
54
|
+
.extend({
|
|
55
|
+
robot: z.literal('/file/filter').describe(`
|
|
56
|
+
Think of this <dfn>Robot</dfn> as an \`if/else\` condition for building advanced file conversion workflows. With it, you can filter and direct certain uploaded files depending on their metadata.
|
|
57
|
+
|
|
58
|
+
The <dfn>Robot</dfn> has two modes of operation:
|
|
59
|
+
|
|
60
|
+
- Constructing conditions out of arrays with 3 members each. For example, \`["\${file.size}", "<=", "720"]\`
|
|
61
|
+
- Writing conditions in JavaScript. For example, \`\${file.size <= 720}\`. See also [Dynamic Evaluation](/docs/topics/dynamic-evaluation/).
|
|
62
|
+
|
|
63
|
+
Passing JavaScript allows you to implement logic as complex as you wish, however it’s slower than combining arrays of conditions, and will be charged for per invocation via [🤖/script/run](/docs/robots/script-run/).
|
|
64
|
+
|
|
65
|
+
### Conditions as arrays
|
|
66
|
+
|
|
67
|
+
The \`accepts\` and \`declines\` parameters can each be set to an array of arrays with three members:
|
|
68
|
+
|
|
69
|
+
1. A value or job variable, such as \`\${file.mime}\`
|
|
70
|
+
2. One of the following operators: \`==\`, \`===\`, \`<\`, \`>\`, \`<=\`, \`>=\`, \`!=\`, \`!==\`, \`regex\`, \`!regex\`
|
|
71
|
+
3. A value or job variable, such as \`50\` or \`"foo"\`
|
|
72
|
+
|
|
73
|
+
Examples:
|
|
74
|
+
|
|
75
|
+
- \`[["\${file.meta.width}", ">", "\${file.meta.height}"]]\`
|
|
76
|
+
- \`[["\${file.size}", "<=", "720"]]\`
|
|
77
|
+
- \`[["720", ">=", "\${file.size}"]]\`
|
|
78
|
+
- \`[["\${file.mime}", "regex", "image"]]\`
|
|
79
|
+
|
|
80
|
+
> [!Warning]
|
|
81
|
+
> If you would like to match against a \`null\` value or a value that is not present (like an audio file does not have a \`video_codec\` property in its metadata), match against \`""\` (an empty string) instead. We’ll support proper matching against \`null\` in the future, but we cannot easily do so right now without breaking backwards compatibility.
|
|
82
|
+
|
|
83
|
+
### Conditions as JavaScript
|
|
84
|
+
|
|
85
|
+
The \`accepts\` and \`declines\` parameters can each be set to strings of JavaScript, which return a boolean value.
|
|
86
|
+
|
|
87
|
+
Examples:
|
|
88
|
+
|
|
89
|
+
- \`\${file.meta.width > file.meta.height}\`
|
|
90
|
+
- \`\${file.size <= 720}\`
|
|
91
|
+
- \`\${/image/.test(file.mime)}\`
|
|
92
|
+
- \`\${Math.max(file.meta.width, file.meta.height) > 100}\`
|
|
93
|
+
|
|
94
|
+
As indicated, we charge for this via [🤖/script/run](/docs/robots/script-run/). See also [Dynamic Evaluation](/docs/topics/dynamic-evaluation/) for more details on allowed syntax and behavior.
|
|
95
|
+
`),
|
|
96
|
+
accepts: filterCondition
|
|
97
|
+
.describe(
|
|
98
|
+
`
|
|
99
|
+
Files that match at least one requirement will be accepted, or declined otherwise. If the value is \`null\`, all files will be accepted. If the array is empty, no files will be accepted. Example:
|
|
100
|
+
|
|
101
|
+
\`[["\${file.mime}", "==", "image/gif"]]\`.
|
|
102
|
+
|
|
103
|
+
If the \`condition_type\` parameter is set to \`"and"\`, then all requirements must match for the file to be accepted.
|
|
104
|
+
|
|
105
|
+
If \`accepts\` and \`declines\` are both provided, the requirements in \`accepts\` will be evaluated first, before the conditions in \`declines\`.
|
|
106
|
+
`,
|
|
107
|
+
)
|
|
108
|
+
.optional(),
|
|
109
|
+
declines: filterCondition
|
|
110
|
+
.describe(
|
|
111
|
+
`
|
|
112
|
+
Files that match at least one requirement will be declined, or accepted otherwise. If the value is \`null\` or an empty array, no files will be declined. Example:
|
|
113
|
+
|
|
114
|
+
\`[["\${file.size}",">","1024"]]\`.
|
|
115
|
+
|
|
116
|
+
If the \`condition_type\` parameter is set to \`"and"\`, then all requirements must match for the file to be declined.
|
|
117
|
+
|
|
118
|
+
If \`accepts\` and \`declines\` are both provided, the requirements in \`accepts\` will be evaluated first, before the conditions in \`declines\`.
|
|
119
|
+
`,
|
|
120
|
+
)
|
|
121
|
+
.optional(),
|
|
122
|
+
condition_type: z
|
|
123
|
+
.enum(['and', 'or'])
|
|
124
|
+
.default('or')
|
|
125
|
+
.describe(`
|
|
126
|
+
Specifies the condition type according to which the members of the \`accepts\` or \`declines\` arrays should be evaluated. Can be \`"or"\` or \`"and"\`.
|
|
127
|
+
`),
|
|
128
|
+
error_on_decline: z
|
|
129
|
+
.boolean()
|
|
130
|
+
.default(false)
|
|
131
|
+
.describe(`
|
|
132
|
+
If this is set to \`true\` and one or more files are declined, the Assembly will be stopped and marked with an error.
|
|
133
|
+
`),
|
|
134
|
+
error_msg: z
|
|
135
|
+
.string()
|
|
136
|
+
.default('One of your files was declined')
|
|
137
|
+
.describe(`
|
|
138
|
+
The error message shown to your users (such as by Uppy) when a file is declined and \`error_on_decline\` is set to \`true\`.
|
|
139
|
+
`),
|
|
140
|
+
})
|
|
141
|
+
.strict()
|
|
142
|
+
|
|
143
|
+
export const robotFileFilterInstructionsWithHiddenFieldsSchema =
|
|
144
|
+
robotFileFilterInstructionsSchema.extend({
|
|
145
|
+
result: z
|
|
146
|
+
.union([z.literal('debug'), robotFileFilterInstructionsSchema.shape.result])
|
|
147
|
+
.optional(),
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
export type RobotFileFilterInstructions = z.infer<typeof robotFileFilterInstructionsSchema>
|
|
151
|
+
export type RobotFileFilterInstructionsWithHiddenFields = z.infer<
|
|
152
|
+
typeof robotFileFilterInstructionsWithHiddenFieldsSchema
|
|
153
|
+
>
|
|
154
|
+
|
|
155
|
+
export const interpolatableRobotFileFilterInstructionsSchema = interpolateRobot(
|
|
156
|
+
robotFileFilterInstructionsSchema,
|
|
157
|
+
)
|
|
158
|
+
export type InterpolatableRobotFileFilterInstructions =
|
|
159
|
+
InterpolatableRobotFileFilterInstructionsInput
|
|
160
|
+
|
|
161
|
+
export type InterpolatableRobotFileFilterInstructionsInput = z.input<
|
|
162
|
+
typeof interpolatableRobotFileFilterInstructionsSchema
|
|
163
|
+
>
|
|
164
|
+
|
|
165
|
+
export const interpolatableRobotFileFilterInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
166
|
+
robotFileFilterInstructionsWithHiddenFieldsSchema,
|
|
167
|
+
)
|
|
168
|
+
export type InterpolatableRobotFileFilterInstructionsWithHiddenFields = z.infer<
|
|
169
|
+
typeof interpolatableRobotFileFilterInstructionsWithHiddenFieldsSchema
|
|
170
|
+
>
|
|
171
|
+
export type InterpolatableRobotFileFilterInstructionsWithHiddenFieldsInput = z.input<
|
|
172
|
+
typeof interpolatableRobotFileFilterInstructionsWithHiddenFieldsSchema
|
|
173
|
+
>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
4
|
+
import { interpolateRobot, robotBase, robotUse } from './_instructions-primitives.ts'
|
|
5
|
+
|
|
6
|
+
export const meta: RobotMetaInput = {
|
|
7
|
+
allowed_for_url_transform: false,
|
|
8
|
+
bytescount: 5,
|
|
9
|
+
discount_factor: 0.2,
|
|
10
|
+
discount_pct: 80,
|
|
11
|
+
example_code: {
|
|
12
|
+
steps: {
|
|
13
|
+
hashed: {
|
|
14
|
+
robot: '/file/hash',
|
|
15
|
+
use: ':original',
|
|
16
|
+
algorithm: 'sha1',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
example_code_description: 'Hash each uploaded file using the SHA-1 algorithm:',
|
|
21
|
+
minimum_charge: 0,
|
|
22
|
+
output_factor: 1,
|
|
23
|
+
override_lvl1: 'Media Cataloging',
|
|
24
|
+
purpose_sentence: 'hashes files in Assemblies',
|
|
25
|
+
purpose_verb: 'hash',
|
|
26
|
+
purpose_word: 'file',
|
|
27
|
+
purpose_words: 'Hash files',
|
|
28
|
+
service_slug: 'media-cataloging',
|
|
29
|
+
slot_count: 60,
|
|
30
|
+
title: 'Hash Files',
|
|
31
|
+
typical_file_size_mb: 1.2,
|
|
32
|
+
typical_file_type: 'file',
|
|
33
|
+
name: 'FileHashRobot',
|
|
34
|
+
priceFactor: 5,
|
|
35
|
+
queueSlotCount: 60,
|
|
36
|
+
isAllowedForUrlTransform: false,
|
|
37
|
+
isInternal: false,
|
|
38
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
|
|
39
|
+
stage: 'ga',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const robotFileHashInstructionsSchema = robotBase
|
|
43
|
+
.merge(robotUse)
|
|
44
|
+
.extend({
|
|
45
|
+
robot: z.literal('/file/hash').describe(`
|
|
46
|
+
This <dfn>Robot</dfn> allows you to hash any file as part of the <dfn>Assembly</dfn> execution process. This can be useful for verifying the integrity of a file for example.
|
|
47
|
+
`),
|
|
48
|
+
algorithm: z
|
|
49
|
+
.enum(['b2', 'md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'])
|
|
50
|
+
.default('sha256')
|
|
51
|
+
.describe(`
|
|
52
|
+
The hashing algorithm to use.
|
|
53
|
+
|
|
54
|
+
The file hash is exported as \`file.meta.hash\`.
|
|
55
|
+
`),
|
|
56
|
+
})
|
|
57
|
+
.strict()
|
|
58
|
+
|
|
59
|
+
export const robotFileHashInstructionsWithHiddenFieldsSchema =
|
|
60
|
+
robotFileHashInstructionsSchema.extend({
|
|
61
|
+
result: z.union([z.literal('debug'), robotFileHashInstructionsSchema.shape.result]).optional(),
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
export type RobotFileHashInstructions = z.infer<typeof robotFileHashInstructionsSchema>
|
|
65
|
+
export type RobotFileHashInstructionsWithHiddenFields = z.infer<
|
|
66
|
+
typeof robotFileHashInstructionsWithHiddenFieldsSchema
|
|
67
|
+
>
|
|
68
|
+
|
|
69
|
+
export const interpolatableRobotFileHashInstructionsSchema = interpolateRobot(
|
|
70
|
+
robotFileHashInstructionsSchema,
|
|
71
|
+
)
|
|
72
|
+
export type InterpolatableRobotFileHashInstructions = InterpolatableRobotFileHashInstructionsInput
|
|
73
|
+
|
|
74
|
+
export type InterpolatableRobotFileHashInstructionsInput = z.input<
|
|
75
|
+
typeof interpolatableRobotFileHashInstructionsSchema
|
|
76
|
+
>
|
|
77
|
+
|
|
78
|
+
export const interpolatableRobotFileHashInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
79
|
+
robotFileHashInstructionsWithHiddenFieldsSchema,
|
|
80
|
+
)
|
|
81
|
+
export type InterpolatableRobotFileHashInstructionsWithHiddenFields = z.infer<
|
|
82
|
+
typeof interpolatableRobotFileHashInstructionsWithHiddenFieldsSchema
|
|
83
|
+
>
|
|
84
|
+
export type InterpolatableRobotFileHashInstructionsWithHiddenFieldsInput = z.input<
|
|
85
|
+
typeof interpolatableRobotFileHashInstructionsWithHiddenFieldsSchema
|
|
86
|
+
>
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
4
|
+
import {
|
|
5
|
+
color_with_alpha,
|
|
6
|
+
complexHeightSchema,
|
|
7
|
+
complexWidthSchema,
|
|
8
|
+
interpolateRobot,
|
|
9
|
+
optimize_priority,
|
|
10
|
+
resize_strategy,
|
|
11
|
+
robotBase,
|
|
12
|
+
robotUse,
|
|
13
|
+
} from './_instructions-primitives.ts'
|
|
14
|
+
|
|
15
|
+
export const meta: RobotMetaInput = {
|
|
16
|
+
allowed_for_url_transform: true,
|
|
17
|
+
bytescount: 1,
|
|
18
|
+
discount_factor: 1,
|
|
19
|
+
discount_pct: 0,
|
|
20
|
+
example_code: {
|
|
21
|
+
steps: {
|
|
22
|
+
previewed: {
|
|
23
|
+
robot: '/file/preview',
|
|
24
|
+
use: ':original',
|
|
25
|
+
height: 400,
|
|
26
|
+
width: 300,
|
|
27
|
+
format: 'png',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
example_code_description: 'Generate a preview thumbnail for any uploaded file:',
|
|
32
|
+
minimum_charge: 1048576,
|
|
33
|
+
output_factor: 1,
|
|
34
|
+
override_lvl1: 'Media Cataloging',
|
|
35
|
+
purpose_sentence:
|
|
36
|
+
'generates a thumbnail for any uploaded file to preview its content, similar to the thumbnails in desktop file managers',
|
|
37
|
+
purpose_verb: 'generate',
|
|
38
|
+
purpose_word: 'generate',
|
|
39
|
+
purpose_words: 'Generate a preview thumbnail',
|
|
40
|
+
service_slug: 'media-cataloging',
|
|
41
|
+
slot_count: 15,
|
|
42
|
+
title: 'Generate a preview thumbnail',
|
|
43
|
+
typical_file_size_mb: 1.2,
|
|
44
|
+
typical_file_type: 'file',
|
|
45
|
+
name: 'FilePreviewRobot',
|
|
46
|
+
priceFactor: 1,
|
|
47
|
+
queueSlotCount: 15,
|
|
48
|
+
minimumCharge: 1048576,
|
|
49
|
+
isAllowedForUrlTransform: true,
|
|
50
|
+
trackOutputFileSize: true,
|
|
51
|
+
importRanges: ['0-19999999', '-1000000'],
|
|
52
|
+
isInternal: false,
|
|
53
|
+
removeJobResultFilesFromDiskRightAfterStoringOnS3: false,
|
|
54
|
+
stage: 'beta',
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const robotFilePreviewInstructionsSchema = robotBase
|
|
58
|
+
.merge(robotUse)
|
|
59
|
+
.extend({
|
|
60
|
+
robot: z.literal('/file/preview').describe(`
|
|
61
|
+
This <dfn>Robot</dfn>'s purpose is to generate a meaningful preview image for any file, in such a way that the resulting thumbnail highlights the file's content. The goal is not to losslessly present the original media in a smaller way. Instead, it is to maximize the chance of a person recognizing the media at a glance, while being visually pleasing and consistent with other previews. The generation process depends on the file type. For example, the <dfn>Robot</dfn> can extract artwork from media files, frames from videos, generate a waveform for audio files, and preview the content of documents and images. The details of all available strategies are provided in the next section.
|
|
62
|
+
|
|
63
|
+
If no file-specific thumbnail can be generated because the file type is not supported, a generic icon containing the file extension will be generated.
|
|
64
|
+
|
|
65
|
+
The default parameters ensure that the <dfn>Robot</dfn> always generates a preview image with the predefined dimensions and formats, to allow an easy integration into your application's UI. In addition, the generated preview images are optimized by default to reduce their file size while keeping their quality.
|
|
66
|
+
`),
|
|
67
|
+
format: z
|
|
68
|
+
.enum(['gif', 'jpg', 'png'])
|
|
69
|
+
.default('png')
|
|
70
|
+
.describe(`
|
|
71
|
+
The output format for the generated thumbnail image. If a short video clip is generated using the \`clip\` strategy, its format is defined by \`clip_format\`.
|
|
72
|
+
`),
|
|
73
|
+
width: complexWidthSchema.default(300).describe(`
|
|
74
|
+
Width of the thumbnail, in pixels.
|
|
75
|
+
`),
|
|
76
|
+
height: complexHeightSchema.default(200).describe(`
|
|
77
|
+
Height of the thumbnail, in pixels.
|
|
78
|
+
`),
|
|
79
|
+
resize_strategy: resize_strategy.describe(`
|
|
80
|
+
To achieve the desired dimensions of the preview thumbnail, the <dfn>Robot</dfn> might have to resize the generated image. This happens, for example, when the dimensions of a frame extracted from a video do not match the chosen \`width\` and \`height\` parameters.
|
|
81
|
+
|
|
82
|
+
See the list of available [resize strategies](/docs/topics/resize-strategies/) for more details.
|
|
83
|
+
`),
|
|
84
|
+
background: color_with_alpha.default('#ffffffff').describe(`
|
|
85
|
+
The hexadecimal code of the color used to fill the background (only used for the pad resize strategy). The format is \`#rrggbb[aa]\` (red, green, blue, alpha). Use \`#00000000\` for a transparent padding.
|
|
86
|
+
`),
|
|
87
|
+
strategy: z
|
|
88
|
+
.object({
|
|
89
|
+
archive: z.array(z.string()).default(['icon']),
|
|
90
|
+
audio: z.array(z.string()).default(['artwork', 'waveform', 'icon']),
|
|
91
|
+
document: z.array(z.string()).default(['page', 'icon']),
|
|
92
|
+
image: z.array(z.string()).default(['image', 'icon']),
|
|
93
|
+
unknown: z.array(z.string()).default(['icon']),
|
|
94
|
+
video: z.array(z.string()).default(['artwork', 'frame', 'icon']),
|
|
95
|
+
webpage: z.array(z.string()).default(['render', 'icon']),
|
|
96
|
+
})
|
|
97
|
+
.optional()
|
|
98
|
+
.describe(`
|
|
99
|
+
Definition of the thumbnail generation process per file category. The parameter must be an object whose keys can be one of the file categories: \`audio\`, \`video\`, \`image\`, \`document\`, \`archive\`, \`webpage\`, and \`unknown\`. The corresponding value is an array of strategies for the specific file category. See the above section for a list of all available strategies.
|
|
100
|
+
|
|
101
|
+
For each file, the <dfn>Robot</dfn> will attempt to use the first strategy to generate the thumbnail. If this process fails (e.g., because no artwork is available in a video file), the next strategy is attempted. This is repeated until either a thumbnail is generated or the list is exhausted. Selecting the \`icon\` strategy as the last entry provides a fallback mechanism to ensure that an appropriate strategy is always available.
|
|
102
|
+
|
|
103
|
+
The parameter defaults to the following definition:
|
|
104
|
+
|
|
105
|
+
\`\`\`json
|
|
106
|
+
{
|
|
107
|
+
"audio": ["artwork", "waveform", "icon"],
|
|
108
|
+
"video": ["artwork", "frame", "icon"],
|
|
109
|
+
"document": ["page", "icon"],
|
|
110
|
+
"image": ["image", "icon"],
|
|
111
|
+
"webpage": ["render", "icon"],
|
|
112
|
+
"archive": ["icon"],
|
|
113
|
+
"unknown": ["icon"]
|
|
114
|
+
}
|
|
115
|
+
\`\`\`
|
|
116
|
+
`),
|
|
117
|
+
artwork_outer_color: color_with_alpha.optional().describe(`
|
|
118
|
+
The color used in the outer parts of the artwork's gradient.
|
|
119
|
+
`),
|
|
120
|
+
artwork_center_color: color_with_alpha.optional().describe(`
|
|
121
|
+
The color used in the center of the artwork's gradient.
|
|
122
|
+
`),
|
|
123
|
+
waveform_center_color: color_with_alpha.default('#000000ff').describe(`
|
|
124
|
+
The color used in the center of the waveform's gradient. The format is \`#rrggbb[aa]\` (red, green, blue, alpha). Only used if the \`waveform\` strategy for audio files is applied.
|
|
125
|
+
`),
|
|
126
|
+
waveform_outer_color: color_with_alpha.default('#000000ff').describe(`
|
|
127
|
+
The color used in the outer parts of the waveform's gradient. The format is \`#rrggbb[aa]\` (red, green, blue, alpha). Only used if the \`waveform\` strategy for audio files is applied.
|
|
128
|
+
`),
|
|
129
|
+
waveform_height: z
|
|
130
|
+
.number()
|
|
131
|
+
.int()
|
|
132
|
+
.min(1)
|
|
133
|
+
.max(5000)
|
|
134
|
+
.default(100)
|
|
135
|
+
.describe(`
|
|
136
|
+
Height of the waveform, in pixels. Only used if the \`waveform\` strategy for audio files is applied. It can be utilized to ensure that the waveform only takes up a section of the preview thumbnail.
|
|
137
|
+
`),
|
|
138
|
+
waveform_width: z
|
|
139
|
+
.number()
|
|
140
|
+
.int()
|
|
141
|
+
.min(1)
|
|
142
|
+
.max(5000)
|
|
143
|
+
.default(300)
|
|
144
|
+
.describe(`
|
|
145
|
+
Width of the waveform, in pixels. Only used if the \`waveform\` strategy for audio files is applied. It can be utilized to ensure that the waveform only takes up a section of the preview thumbnail.
|
|
146
|
+
`),
|
|
147
|
+
icon_style: z
|
|
148
|
+
.enum(['square', 'with-text'])
|
|
149
|
+
.default('with-text')
|
|
150
|
+
.describe(`
|
|
151
|
+
The style of the icon generated if the \`icon\` strategy is applied. The default style, \`with-text\`, includes an icon showing the file type and a text box below it, whose content can be controlled by the \`icon_text_content\` parameter and defaults to the file extension (e.g. MP4, JPEG). The \`square\` style only includes a square variant of the icon showing the file type. Below are exemplary previews generated for a text file utilizing the different styles:
|
|
152
|
+
|
|
153
|
+
<br><br> <strong>\`with-text\` style:</strong> <br>
|
|
154
|
+

|
|
155
|
+
<br><br> <strong>\`square\` style:</strong> <br>
|
|
156
|
+

|
|
157
|
+
`),
|
|
158
|
+
icon_text_color: color_with_alpha.default('#a2a2a2').describe(`
|
|
159
|
+
The color of the text used in the icon. The format is \`#rrggbb[aa]\`. Only used if the \`icon\` strategy is applied.
|
|
160
|
+
`),
|
|
161
|
+
// TODO: Determine the font enum.
|
|
162
|
+
icon_text_font: z
|
|
163
|
+
.string()
|
|
164
|
+
.default('Roboto')
|
|
165
|
+
.describe(`
|
|
166
|
+
The font family of the text used in the icon. Only used if the \`icon\` strategy is applied. [Here](/docs/supported-formats/fonts/) is a list of all supported fonts.
|
|
167
|
+
`),
|
|
168
|
+
icon_text_content: z
|
|
169
|
+
.enum(['extension', 'none'])
|
|
170
|
+
.default('extension')
|
|
171
|
+
.describe(`
|
|
172
|
+
The content of the text box in generated icons. Only used if the \`icon_style\` parameter is set to \`with-text\`. The default value, \`extension\`, adds the file extension (e.g. MP4, JPEG) to the icon. The value \`none\` can be used to render an empty text box, which is useful if no text should not be included in the raster image, but some place should be reserved in the image for later overlaying custom text over the image using HTML etc.
|
|
173
|
+
`),
|
|
174
|
+
optimize: z
|
|
175
|
+
.boolean()
|
|
176
|
+
.default(true)
|
|
177
|
+
.describe(`
|
|
178
|
+
Specifies whether the generated preview image should be optimized to reduce the image's file size while keeping their quaility. If enabled, the images will be optimized using [🤖/image/optimize](/docs/robots/image-optimize/).
|
|
179
|
+
`),
|
|
180
|
+
optimize_priority: optimize_priority.describe(`
|
|
181
|
+
Specifies whether conversion speed or compression ratio is prioritized when optimizing images. Only used if \`optimize\` is enabled. Please see the [🤖/image/optimize documentation](/docs/robots/image-optimize/#param-priority) for more details.
|
|
182
|
+
`),
|
|
183
|
+
optimize_progressive: z
|
|
184
|
+
.boolean()
|
|
185
|
+
.default(false)
|
|
186
|
+
.describe(`
|
|
187
|
+
Specifies whether images should be interlaced, which makes the result image load progressively in browsers. Only used if \`optimize\` is enabled. Please see the [🤖/image/optimize documentation](/docs/robots/image-optimize/#param-progressive) for more details.
|
|
188
|
+
`),
|
|
189
|
+
clip_format: z
|
|
190
|
+
.enum(['apng', 'avif', 'gif', 'webp'])
|
|
191
|
+
.default('webp')
|
|
192
|
+
.describe(`
|
|
193
|
+
The animated image format for the generated video clip. Only used if the \`clip\` strategy for video files is applied.
|
|
194
|
+
|
|
195
|
+
Please consult the [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types) for detailed information about the image formats and their characteristics. GIF enjoys the broadest support in software, but only supports a limit color palette. APNG supports a variety of color depths, but its lossless compression produces large images for videos. AVIF is a modern image format that offers great compression, but proper support for animations is still lacking in some browsers. WebP on the other hand, enjoys broad support while offering a great balance between small file sizes and good visual quality, making it the default clip format.
|
|
196
|
+
`),
|
|
197
|
+
clip_offset: z
|
|
198
|
+
.number()
|
|
199
|
+
.min(0)
|
|
200
|
+
.default(1)
|
|
201
|
+
.describe(`
|
|
202
|
+
The start position in seconds of where the clip is cut. Only used if the \`clip\` strategy for video files is applied. Be aware that for larger video only the first few MBs of the file may be imported to improve speed. Larger offsets may seek to a position outside of the imported part and thus fail to generate a clip.
|
|
203
|
+
`),
|
|
204
|
+
clip_duration: z
|
|
205
|
+
.number()
|
|
206
|
+
.min(0)
|
|
207
|
+
.default(5)
|
|
208
|
+
.describe(`
|
|
209
|
+
The duration in seconds of the generated video clip. Only used if the \`clip\` strategy for video files is applied. Be aware that a longer clip duration also results in a larger file size, which might be undesirable for previews.
|
|
210
|
+
`),
|
|
211
|
+
clip_framerate: z
|
|
212
|
+
.number()
|
|
213
|
+
.int()
|
|
214
|
+
.min(1)
|
|
215
|
+
.max(60)
|
|
216
|
+
.default(5)
|
|
217
|
+
.describe(`
|
|
218
|
+
The framerate of the generated video clip. Only used if the \`clip\` strategy for video files is applied. Be aware that a higher framerate appears smoother but also results in a larger file size, which might be undesirable for previews.
|
|
219
|
+
`),
|
|
220
|
+
clip_loop: z
|
|
221
|
+
.boolean()
|
|
222
|
+
.default(true)
|
|
223
|
+
.describe(`
|
|
224
|
+
Specifies whether the generated animated image should loop forever (\`true\`) or stop after playing the animation once (\`false\`). Only used if the \`clip\` strategy for video files is applied.
|
|
225
|
+
`),
|
|
226
|
+
})
|
|
227
|
+
.strict()
|
|
228
|
+
|
|
229
|
+
export const robotFilePreviewInstructionsWithHiddenFieldsSchema =
|
|
230
|
+
robotFilePreviewInstructionsSchema.extend({
|
|
231
|
+
result: z
|
|
232
|
+
.union([z.literal('debug'), robotFilePreviewInstructionsSchema.shape.result])
|
|
233
|
+
.optional(),
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
export type RobotFilePreviewInstructions = z.infer<typeof robotFilePreviewInstructionsSchema>
|
|
237
|
+
export type RobotFilePreviewInstructionsInput = z.input<typeof robotFilePreviewInstructionsSchema>
|
|
238
|
+
export type RobotFilePreviewInstructionsWithHiddenFields = z.infer<
|
|
239
|
+
typeof robotFilePreviewInstructionsWithHiddenFieldsSchema
|
|
240
|
+
>
|
|
241
|
+
|
|
242
|
+
export const interpolatableRobotFilePreviewInstructionsSchema = interpolateRobot(
|
|
243
|
+
robotFilePreviewInstructionsSchema,
|
|
244
|
+
)
|
|
245
|
+
export type InterpolatableRobotFilePreviewInstructions =
|
|
246
|
+
InterpolatableRobotFilePreviewInstructionsInput
|
|
247
|
+
|
|
248
|
+
export type InterpolatableRobotFilePreviewInstructionsInput = z.input<
|
|
249
|
+
typeof interpolatableRobotFilePreviewInstructionsSchema
|
|
250
|
+
>
|
|
251
|
+
|
|
252
|
+
export const interpolatableRobotFilePreviewInstructionsWithHiddenFieldsSchema = interpolateRobot(
|
|
253
|
+
robotFilePreviewInstructionsWithHiddenFieldsSchema,
|
|
254
|
+
)
|
|
255
|
+
export type InterpolatableRobotFilePreviewInstructionsWithHiddenFields = z.infer<
|
|
256
|
+
typeof interpolatableRobotFilePreviewInstructionsWithHiddenFieldsSchema
|
|
257
|
+
>
|
|
258
|
+
export type InterpolatableRobotFilePreviewInstructionsWithHiddenFieldsInput = z.input<
|
|
259
|
+
typeof interpolatableRobotFilePreviewInstructionsWithHiddenFieldsSchema
|
|
260
|
+
>
|