transloadit 3.0.2 → 4.0.0-2
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/CHANGELOG.md +9 -12
- package/README.md +175 -129
- package/dist/ApiError.d.ts +20 -0
- package/dist/ApiError.d.ts.map +1 -0
- package/dist/ApiError.js +35 -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 +7 -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 +39 -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 +8 -0
- package/dist/PollingTimeoutError.js.map +1 -0
- package/dist/Transloadit.d.ts +227 -0
- package/dist/Transloadit.d.ts.map +1 -0
- package/dist/Transloadit.js +628 -0
- package/dist/Transloadit.js.map +1 -0
- package/dist/alphalib/types/assemblyStatus.d.ts +6208 -0
- package/dist/alphalib/types/assemblyStatus.d.ts.map +1 -0
- package/dist/alphalib/types/assemblyStatus.js +285 -0
- package/dist/alphalib/types/assemblyStatus.js.map +1 -0
- package/dist/alphalib/types/robots/_index.d.ts +56966 -0
- package/dist/alphalib/types/robots/_index.d.ts.map +1 -0
- package/dist/alphalib/types/robots/_index.js +347 -0
- package/dist/alphalib/types/robots/_index.js.map +1 -0
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts +2157 -0
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts.map +1 -0
- package/dist/alphalib/types/robots/_instructions-primitives.js +655 -0
- package/dist/alphalib/types/robots/_instructions-primitives.js.map +1 -0
- package/dist/alphalib/types/robots/audio-artwork.d.ts +628 -0
- package/dist/alphalib/types/robots/audio-artwork.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-artwork.js +55 -0
- package/dist/alphalib/types/robots/audio-artwork.js.map +1 -0
- package/dist/alphalib/types/robots/audio-concat.d.ts +632 -0
- package/dist/alphalib/types/robots/audio-concat.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-concat.js +66 -0
- package/dist/alphalib/types/robots/audio-concat.js.map +1 -0
- package/dist/alphalib/types/robots/audio-encode.d.ts +629 -0
- package/dist/alphalib/types/robots/audio-encode.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-encode.js +55 -0
- package/dist/alphalib/types/robots/audio-encode.js.map +1 -0
- package/dist/alphalib/types/robots/audio-loop.d.ts +631 -0
- package/dist/alphalib/types/robots/audio-loop.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-loop.js +54 -0
- package/dist/alphalib/types/robots/audio-loop.js.map +1 -0
- package/dist/alphalib/types/robots/audio-merge.d.ts +637 -0
- package/dist/alphalib/types/robots/audio-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-merge.js +65 -0
- package/dist/alphalib/types/robots/audio-merge.js.map +1 -0
- package/dist/alphalib/types/robots/audio-waveform.d.ts +642 -0
- package/dist/alphalib/types/robots/audio-waveform.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-waveform.js +80 -0
- package/dist/alphalib/types/robots/audio-waveform.js.map +1 -0
- package/dist/alphalib/types/robots/azure-import.d.ts +46 -0
- package/dist/alphalib/types/robots/azure-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/azure-import.js +58 -0
- package/dist/alphalib/types/robots/azure-import.js.map +1 -0
- package/dist/alphalib/types/robots/azure-store.d.ts +129 -0
- package/dist/alphalib/types/robots/azure-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/azure-store.js +73 -0
- package/dist/alphalib/types/robots/azure-store.js.map +1 -0
- package/dist/alphalib/types/robots/backblaze-import.d.ts +49 -0
- package/dist/alphalib/types/robots/backblaze-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/backblaze-import.js +66 -0
- package/dist/alphalib/types/robots/backblaze-import.js.map +1 -0
- package/dist/alphalib/types/robots/backblaze-store.d.ts +111 -0
- package/dist/alphalib/types/robots/backblaze-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/backblaze-store.js +58 -0
- package/dist/alphalib/types/robots/backblaze-store.js.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-import.d.ts +55 -0
- package/dist/alphalib/types/robots/cloudfiles-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-import.js +65 -0
- package/dist/alphalib/types/robots/cloudfiles-import.js.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-store.d.ts +114 -0
- package/dist/alphalib/types/robots/cloudfiles-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-store.js +56 -0
- package/dist/alphalib/types/robots/cloudfiles-store.js.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-import.d.ts +52 -0
- package/dist/alphalib/types/robots/cloudflare-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-import.js +68 -0
- package/dist/alphalib/types/robots/cloudflare-import.js.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-store.d.ts +117 -0
- package/dist/alphalib/types/robots/cloudflare-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/cloudflare-store.js +57 -0
- package/dist/alphalib/types/robots/cloudflare-store.js.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-import.d.ts +52 -0
- package/dist/alphalib/types/robots/digitalocean-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-import.js +65 -0
- package/dist/alphalib/types/robots/digitalocean-import.js.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-store.d.ts +123 -0
- package/dist/alphalib/types/robots/digitalocean-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/digitalocean-store.js +62 -0
- package/dist/alphalib/types/robots/digitalocean-store.js.map +1 -0
- package/dist/alphalib/types/robots/document-autorotate.d.ts +91 -0
- package/dist/alphalib/types/robots/document-autorotate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-autorotate.js +31 -0
- package/dist/alphalib/types/robots/document-autorotate.js.map +1 -0
- package/dist/alphalib/types/robots/document-convert.d.ts +118 -0
- package/dist/alphalib/types/robots/document-convert.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-convert.js +182 -0
- package/dist/alphalib/types/robots/document-convert.js.map +1 -0
- package/dist/alphalib/types/robots/document-merge.d.ts +97 -0
- package/dist/alphalib/types/robots/document-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-merge.js +66 -0
- package/dist/alphalib/types/robots/document-merge.js.map +1 -0
- package/dist/alphalib/types/robots/document-ocr.d.ts +100 -0
- package/dist/alphalib/types/robots/document-ocr.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-ocr.js +65 -0
- package/dist/alphalib/types/robots/document-ocr.js.map +1 -0
- package/dist/alphalib/types/robots/document-split.d.ts +94 -0
- package/dist/alphalib/types/robots/document-split.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-split.js +34 -0
- package/dist/alphalib/types/robots/document-split.js.map +1 -0
- package/dist/alphalib/types/robots/document-thumbs.d.ts +134 -0
- package/dist/alphalib/types/robots/document-thumbs.d.ts.map +1 -0
- package/dist/alphalib/types/robots/document-thumbs.js +111 -0
- package/dist/alphalib/types/robots/document-thumbs.js.map +1 -0
- package/dist/alphalib/types/robots/dropbox-import.d.ts +43 -0
- package/dist/alphalib/types/robots/dropbox-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/dropbox-import.js +52 -0
- package/dist/alphalib/types/robots/dropbox-import.js.map +1 -0
- package/dist/alphalib/types/robots/dropbox-store.d.ts +114 -0
- package/dist/alphalib/types/robots/dropbox-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/dropbox-store.js +49 -0
- package/dist/alphalib/types/robots/dropbox-store.js.map +1 -0
- package/dist/alphalib/types/robots/edgly-deliver.d.ts +19 -0
- package/dist/alphalib/types/robots/edgly-deliver.d.ts.map +1 -0
- package/dist/alphalib/types/robots/edgly-deliver.js +31 -0
- package/dist/alphalib/types/robots/edgly-deliver.js.map +1 -0
- package/dist/alphalib/types/robots/file-compress.d.ts +106 -0
- package/dist/alphalib/types/robots/file-compress.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-compress.js +102 -0
- package/dist/alphalib/types/robots/file-compress.js.map +1 -0
- package/dist/alphalib/types/robots/file-decompress.d.ts +94 -0
- package/dist/alphalib/types/robots/file-decompress.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-decompress.js +81 -0
- package/dist/alphalib/types/robots/file-decompress.js.map +1 -0
- package/dist/alphalib/types/robots/file-filter.d.ts +107 -0
- package/dist/alphalib/types/robots/file-filter.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-filter.js +108 -0
- package/dist/alphalib/types/robots/file-filter.js.map +1 -0
- package/dist/alphalib/types/robots/file-hash.d.ts +94 -0
- package/dist/alphalib/types/robots/file-hash.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-hash.js +49 -0
- package/dist/alphalib/types/robots/file-hash.js.map +1 -0
- package/dist/alphalib/types/robots/file-preview.d.ts +393 -0
- package/dist/alphalib/types/robots/file-preview.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-preview.js +155 -0
- package/dist/alphalib/types/robots/file-preview.js.map +1 -0
- package/dist/alphalib/types/robots/file-read.d.ts +91 -0
- package/dist/alphalib/types/robots/file-read.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-read.js +34 -0
- package/dist/alphalib/types/robots/file-read.js.map +1 -0
- package/dist/alphalib/types/robots/file-serve.d.ts +95 -0
- package/dist/alphalib/types/robots/file-serve.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-serve.js +56 -0
- package/dist/alphalib/types/robots/file-serve.js.map +1 -0
- package/dist/alphalib/types/robots/file-verify.d.ts +100 -0
- package/dist/alphalib/types/robots/file-verify.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-verify.js +52 -0
- package/dist/alphalib/types/robots/file-verify.js.map +1 -0
- package/dist/alphalib/types/robots/file-virusscan.d.ts +97 -0
- package/dist/alphalib/types/robots/file-virusscan.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-virusscan.js +55 -0
- package/dist/alphalib/types/robots/file-virusscan.js.map +1 -0
- package/dist/alphalib/types/robots/file-watermark.d.ts +92 -0
- package/dist/alphalib/types/robots/file-watermark.d.ts.map +1 -0
- package/dist/alphalib/types/robots/file-watermark.js +13 -0
- package/dist/alphalib/types/robots/file-watermark.js.map +1 -0
- package/dist/alphalib/types/robots/ftp-import.d.ts +46 -0
- package/dist/alphalib/types/robots/ftp-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/ftp-import.js +47 -0
- package/dist/alphalib/types/robots/ftp-import.js.map +1 -0
- package/dist/alphalib/types/robots/ftp-store.d.ts +120 -0
- package/dist/alphalib/types/robots/ftp-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/ftp-store.js +57 -0
- package/dist/alphalib/types/robots/ftp-store.js.map +1 -0
- package/dist/alphalib/types/robots/google-import.d.ts +40 -0
- package/dist/alphalib/types/robots/google-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/google-import.js +65 -0
- package/dist/alphalib/types/robots/google-import.js.map +1 -0
- package/dist/alphalib/types/robots/google-store.d.ts +113 -0
- package/dist/alphalib/types/robots/google-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/google-store.js +86 -0
- package/dist/alphalib/types/robots/google-store.js.map +1 -0
- package/dist/alphalib/types/robots/html-convert.d.ts +115 -0
- package/dist/alphalib/types/robots/html-convert.d.ts.map +1 -0
- package/dist/alphalib/types/robots/html-convert.js +81 -0
- package/dist/alphalib/types/robots/html-convert.js.map +1 -0
- package/dist/alphalib/types/robots/http-import.d.ts +42 -0
- package/dist/alphalib/types/robots/http-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/http-import.js +76 -0
- package/dist/alphalib/types/robots/http-import.js.map +1 -0
- package/dist/alphalib/types/robots/image-describe.d.ts +103 -0
- package/dist/alphalib/types/robots/image-describe.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-describe.js +66 -0
- package/dist/alphalib/types/robots/image-describe.js.map +1 -0
- package/dist/alphalib/types/robots/image-facedetect.d.ts +109 -0
- package/dist/alphalib/types/robots/image-facedetect.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-facedetect.js +125 -0
- package/dist/alphalib/types/robots/image-facedetect.js.map +1 -0
- package/dist/alphalib/types/robots/image-generate.d.ts +229 -0
- package/dist/alphalib/types/robots/image-generate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-generate.js +27 -0
- package/dist/alphalib/types/robots/image-generate.js.map +1 -0
- package/dist/alphalib/types/robots/image-merge.d.ts +109 -0
- package/dist/alphalib/types/robots/image-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-merge.js +74 -0
- package/dist/alphalib/types/robots/image-merge.js.map +1 -0
- package/dist/alphalib/types/robots/image-ocr.d.ts +100 -0
- package/dist/alphalib/types/robots/image-ocr.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-ocr.js +64 -0
- package/dist/alphalib/types/robots/image-ocr.js.map +1 -0
- package/dist/alphalib/types/robots/image-optimize.d.ts +103 -0
- package/dist/alphalib/types/robots/image-optimize.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-optimize.js +60 -0
- package/dist/alphalib/types/robots/image-optimize.js.map +1 -0
- package/dist/alphalib/types/robots/image-remove-background.d.ts +98 -0
- package/dist/alphalib/types/robots/image-remove-background.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-remove-background.js +21 -0
- package/dist/alphalib/types/robots/image-remove-background.js.map +1 -0
- package/dist/alphalib/types/robots/image-resize.d.ts +696 -0
- package/dist/alphalib/types/robots/image-resize.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-resize.js +364 -0
- package/dist/alphalib/types/robots/image-resize.js.map +1 -0
- package/dist/alphalib/types/robots/media-playlist.d.ts +115 -0
- package/dist/alphalib/types/robots/media-playlist.d.ts.map +1 -0
- package/dist/alphalib/types/robots/media-playlist.js +56 -0
- package/dist/alphalib/types/robots/media-playlist.js.map +1 -0
- package/dist/alphalib/types/robots/meta-write.d.ts +623 -0
- package/dist/alphalib/types/robots/meta-write.d.ts.map +1 -0
- package/dist/alphalib/types/robots/meta-write.js +53 -0
- package/dist/alphalib/types/robots/meta-write.js.map +1 -0
- package/dist/alphalib/types/robots/minio-import.d.ts +52 -0
- package/dist/alphalib/types/robots/minio-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/minio-import.js +68 -0
- package/dist/alphalib/types/robots/minio-import.js.map +1 -0
- package/dist/alphalib/types/robots/minio-store.d.ts +120 -0
- package/dist/alphalib/types/robots/minio-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/minio-store.js +61 -0
- package/dist/alphalib/types/robots/minio-store.js.map +1 -0
- package/dist/alphalib/types/robots/progress-simulate.d.ts +29 -0
- package/dist/alphalib/types/robots/progress-simulate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/progress-simulate.js +15 -0
- package/dist/alphalib/types/robots/progress-simulate.js.map +1 -0
- package/dist/alphalib/types/robots/s3-import.d.ts +52 -0
- package/dist/alphalib/types/robots/s3-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/s3-import.js +104 -0
- package/dist/alphalib/types/robots/s3-import.js.map +1 -0
- package/dist/alphalib/types/robots/s3-store.d.ts +135 -0
- package/dist/alphalib/types/robots/s3-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/s3-store.js +118 -0
- package/dist/alphalib/types/robots/s3-store.js.map +1 -0
- package/dist/alphalib/types/robots/script-run.d.ts +94 -0
- package/dist/alphalib/types/robots/script-run.d.ts.map +1 -0
- package/dist/alphalib/types/robots/script-run.js +79 -0
- package/dist/alphalib/types/robots/script-run.js.map +1 -0
- package/dist/alphalib/types/robots/sftp-import.d.ts +43 -0
- package/dist/alphalib/types/robots/sftp-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/sftp-import.js +45 -0
- package/dist/alphalib/types/robots/sftp-import.js.map +1 -0
- package/dist/alphalib/types/robots/sftp-store.d.ts +120 -0
- package/dist/alphalib/types/robots/sftp-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/sftp-store.js +58 -0
- package/dist/alphalib/types/robots/sftp-store.js.map +1 -0
- package/dist/alphalib/types/robots/speech-transcribe.d.ts +210 -0
- package/dist/alphalib/types/robots/speech-transcribe.d.ts.map +1 -0
- package/dist/alphalib/types/robots/speech-transcribe.js +80 -0
- package/dist/alphalib/types/robots/speech-transcribe.js.map +1 -0
- package/dist/alphalib/types/robots/supabase-import.d.ts +52 -0
- package/dist/alphalib/types/robots/supabase-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/supabase-import.js +70 -0
- package/dist/alphalib/types/robots/supabase-import.js.map +1 -0
- package/dist/alphalib/types/robots/supabase-store.d.ts +117 -0
- package/dist/alphalib/types/robots/supabase-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/supabase-store.js +54 -0
- package/dist/alphalib/types/robots/supabase-store.js.map +1 -0
- package/dist/alphalib/types/robots/swift-import.d.ts +52 -0
- package/dist/alphalib/types/robots/swift-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/swift-import.js +68 -0
- package/dist/alphalib/types/robots/swift-import.js.map +1 -0
- package/dist/alphalib/types/robots/swift-store.d.ts +120 -0
- package/dist/alphalib/types/robots/swift-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/swift-store.js +58 -0
- package/dist/alphalib/types/robots/swift-store.js.map +1 -0
- package/dist/alphalib/types/robots/text-speak.d.ts +106 -0
- package/dist/alphalib/types/robots/text-speak.d.ts.map +1 -0
- package/dist/alphalib/types/robots/text-speak.js +97 -0
- package/dist/alphalib/types/robots/text-speak.js.map +1 -0
- package/dist/alphalib/types/robots/text-translate.d.ts +100 -0
- package/dist/alphalib/types/robots/text-translate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/text-translate.js +196 -0
- package/dist/alphalib/types/robots/text-translate.js.map +1 -0
- package/dist/alphalib/types/robots/tigris-import.d.ts +52 -0
- package/dist/alphalib/types/robots/tigris-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tigris-import.js +68 -0
- package/dist/alphalib/types/robots/tigris-import.js.map +1 -0
- package/dist/alphalib/types/robots/tigris-store.d.ts +120 -0
- package/dist/alphalib/types/robots/tigris-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tigris-store.js +61 -0
- package/dist/alphalib/types/robots/tigris-store.js.map +1 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts +19 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.js +31 -0
- package/dist/alphalib/types/robots/tlcdn-deliver.js.map +1 -0
- package/dist/alphalib/types/robots/tus-store.d.ts +110 -0
- package/dist/alphalib/types/robots/tus-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/tus-store.js +74 -0
- package/dist/alphalib/types/robots/tus-store.js.map +1 -0
- package/dist/alphalib/types/robots/upload-handle.d.ts +92 -0
- package/dist/alphalib/types/robots/upload-handle.d.ts.map +1 -0
- package/dist/alphalib/types/robots/upload-handle.js +54 -0
- package/dist/alphalib/types/robots/upload-handle.js.map +1 -0
- package/dist/alphalib/types/robots/video-adaptive.d.ts +640 -0
- package/dist/alphalib/types/robots/video-adaptive.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-adaptive.js +119 -0
- package/dist/alphalib/types/robots/video-adaptive.js.map +1 -0
- package/dist/alphalib/types/robots/video-concat.d.ts +634 -0
- package/dist/alphalib/types/robots/video-concat.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-concat.js +65 -0
- package/dist/alphalib/types/robots/video-concat.js.map +1 -0
- package/dist/alphalib/types/robots/video-encode.d.ts +1439 -0
- package/dist/alphalib/types/robots/video-encode.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-encode.js +157 -0
- package/dist/alphalib/types/robots/video-encode.js.map +1 -0
- package/dist/alphalib/types/robots/video-merge.d.ts +655 -0
- package/dist/alphalib/types/robots/video-merge.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-merge.js +64 -0
- package/dist/alphalib/types/robots/video-merge.js.map +1 -0
- package/dist/alphalib/types/robots/video-subtitle.d.ts +649 -0
- package/dist/alphalib/types/robots/video-subtitle.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-subtitle.js +77 -0
- package/dist/alphalib/types/robots/video-subtitle.js.map +1 -0
- package/dist/alphalib/types/robots/video-thumbs.d.ts +642 -0
- package/dist/alphalib/types/robots/video-thumbs.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-thumbs.js +79 -0
- package/dist/alphalib/types/robots/video-thumbs.js.map +1 -0
- package/dist/alphalib/types/robots/vimeo-store.d.ts +116 -0
- package/dist/alphalib/types/robots/vimeo-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/vimeo-store.js +81 -0
- package/dist/alphalib/types/robots/vimeo-store.js.map +1 -0
- package/dist/alphalib/types/robots/wasabi-import.d.ts +53 -0
- package/dist/alphalib/types/robots/wasabi-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/wasabi-import.js +72 -0
- package/dist/alphalib/types/robots/wasabi-import.js.map +1 -0
- package/dist/alphalib/types/robots/wasabi-store.d.ts +120 -0
- package/dist/alphalib/types/robots/wasabi-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/wasabi-store.js +59 -0
- package/dist/alphalib/types/robots/wasabi-store.js.map +1 -0
- package/dist/alphalib/types/robots/youtube-store.d.ts +110 -0
- package/dist/alphalib/types/robots/youtube-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/youtube-store.js +105 -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 +16 -0
- package/dist/alphalib/types/stackVersions.js.map +1 -0
- package/dist/alphalib/types/template.d.ts +77150 -0
- package/dist/alphalib/types/template.d.ts.map +1 -0
- package/dist/alphalib/types/template.js +49 -0
- package/dist/alphalib/types/template.js.map +1 -0
- package/dist/alphalib/zodParseWithContext.d.ts +18 -0
- package/dist/alphalib/zodParseWithContext.d.ts.map +1 -0
- package/dist/alphalib/zodParseWithContext.js +123 -0
- package/dist/alphalib/zodParseWithContext.js.map +1 -0
- package/dist/apiTypes.d.ts +127 -0
- package/dist/apiTypes.d.ts.map +1 -0
- package/dist/apiTypes.js +3 -0
- package/dist/apiTypes.js.map +1 -0
- package/dist/tus.d.ts +17 -0
- package/dist/tus.d.ts.map +1 -0
- package/dist/tus.js +88 -0
- package/dist/tus.js.map +1 -0
- package/package.json +58 -39
- package/src/ApiError.ts +44 -0
- package/src/InconsistentResponseError.ts +3 -0
- package/src/PaginationStream.ts +55 -0
- package/src/PollingTimeoutError.ts +5 -0
- package/src/Transloadit.ts +826 -0
- package/src/alphalib/types/assemblyStatus.ts +300 -0
- package/src/alphalib/types/robots/_index.ts +437 -0
- package/src/alphalib/types/robots/_instructions-primitives.ts +835 -0
- package/src/alphalib/types/robots/audio-artwork.ts +57 -0
- package/src/alphalib/types/robots/audio-concat.ts +74 -0
- package/src/alphalib/types/robots/audio-encode.ts +63 -0
- package/src/alphalib/types/robots/audio-loop.ts +62 -0
- package/src/alphalib/types/robots/audio-merge.ts +73 -0
- package/src/alphalib/types/robots/audio-waveform.ts +83 -0
- package/src/alphalib/types/robots/azure-import.ts +69 -0
- package/src/alphalib/types/robots/azure-store.ts +76 -0
- package/src/alphalib/types/robots/backblaze-import.ts +81 -0
- package/src/alphalib/types/robots/backblaze-store.ts +63 -0
- package/src/alphalib/types/robots/cloudfiles-import.ts +80 -0
- package/src/alphalib/types/robots/cloudfiles-store.ts +63 -0
- package/src/alphalib/types/robots/cloudflare-import.ts +84 -0
- package/src/alphalib/types/robots/cloudflare-store.ts +64 -0
- package/src/alphalib/types/robots/digitalocean-import.ts +81 -0
- package/src/alphalib/types/robots/digitalocean-store.ts +69 -0
- package/src/alphalib/types/robots/document-autorotate.ts +36 -0
- package/src/alphalib/types/robots/document-convert.ts +186 -0
- package/src/alphalib/types/robots/document-merge.ts +68 -0
- package/src/alphalib/types/robots/document-ocr.ts +72 -0
- package/src/alphalib/types/robots/document-split.ts +38 -0
- package/src/alphalib/types/robots/document-thumbs.ts +119 -0
- package/src/alphalib/types/robots/dropbox-import.ts +58 -0
- package/src/alphalib/types/robots/dropbox-store.ts +52 -0
- package/src/alphalib/types/robots/edgly-deliver.ts +32 -0
- package/src/alphalib/types/robots/file-compress.ts +104 -0
- package/src/alphalib/types/robots/file-decompress.ts +86 -0
- package/src/alphalib/types/robots/file-filter.ts +115 -0
- package/src/alphalib/types/robots/file-hash.ts +51 -0
- package/src/alphalib/types/robots/file-preview.ts +174 -0
- package/src/alphalib/types/robots/file-read.ts +36 -0
- package/src/alphalib/types/robots/file-serve.ts +60 -0
- package/src/alphalib/types/robots/file-verify.ts +55 -0
- package/src/alphalib/types/robots/file-virusscan.ts +60 -0
- package/src/alphalib/types/robots/file-watermark.ts +13 -0
- package/src/alphalib/types/robots/ftp-import.ts +52 -0
- package/src/alphalib/types/robots/ftp-store.ts +61 -0
- package/src/alphalib/types/robots/google-import.ts +77 -0
- package/src/alphalib/types/robots/google-store.ts +89 -0
- package/src/alphalib/types/robots/html-convert.ts +83 -0
- package/src/alphalib/types/robots/http-import.ts +79 -0
- package/src/alphalib/types/robots/image-describe.ts +74 -0
- package/src/alphalib/types/robots/image-facedetect.ts +131 -0
- package/src/alphalib/types/robots/image-generate.ts +32 -0
- package/src/alphalib/types/robots/image-merge.ts +81 -0
- package/src/alphalib/types/robots/image-ocr.ts +71 -0
- package/src/alphalib/types/robots/image-optimize.ts +61 -0
- package/src/alphalib/types/robots/image-remove-background.ts +23 -0
- package/src/alphalib/types/robots/image-resize.ts +401 -0
- package/src/alphalib/types/robots/media-playlist.ts +58 -0
- package/src/alphalib/types/robots/meta-write.ts +55 -0
- package/src/alphalib/types/robots/minio-import.ts +80 -0
- package/src/alphalib/types/robots/minio-store.ts +64 -0
- package/src/alphalib/types/robots/progress-simulate.ts +16 -0
- package/src/alphalib/types/robots/s3-import.ts +116 -0
- package/src/alphalib/types/robots/s3-store.ts +121 -0
- package/src/alphalib/types/robots/script-run.ts +81 -0
- package/src/alphalib/types/robots/sftp-import.ts +50 -0
- package/src/alphalib/types/robots/sftp-store.ts +61 -0
- package/src/alphalib/types/robots/speech-transcribe.ts +96 -0
- package/src/alphalib/types/robots/supabase-import.ts +84 -0
- package/src/alphalib/types/robots/supabase-store.ts +59 -0
- package/src/alphalib/types/robots/swift-import.ts +80 -0
- package/src/alphalib/types/robots/swift-store.ts +61 -0
- package/src/alphalib/types/robots/text-speak.ts +100 -0
- package/src/alphalib/types/robots/text-translate.ts +199 -0
- package/src/alphalib/types/robots/tigris-import.ts +80 -0
- package/src/alphalib/types/robots/tigris-store.ts +64 -0
- package/src/alphalib/types/robots/tlcdn-deliver.ts +32 -0
- package/src/alphalib/types/robots/tus-store.ts +77 -0
- package/src/alphalib/types/robots/upload-handle.ts +58 -0
- package/src/alphalib/types/robots/video-adaptive.ts +123 -0
- package/src/alphalib/types/robots/video-concat.ts +68 -0
- package/src/alphalib/types/robots/video-encode.ts +182 -0
- package/src/alphalib/types/robots/video-merge.ts +72 -0
- package/src/alphalib/types/robots/video-subtitle.ts +86 -0
- package/src/alphalib/types/robots/video-thumbs.ts +88 -0
- package/src/alphalib/types/robots/vimeo-store.ts +84 -0
- package/src/alphalib/types/robots/wasabi-import.ts +84 -0
- package/src/alphalib/types/robots/wasabi-store.ts +62 -0
- package/src/alphalib/types/robots/youtube-store.ts +108 -0
- package/src/alphalib/types/stackVersions.ts +12 -0
- package/src/alphalib/types/template.ts +71 -0
- package/src/alphalib/zodParseWithContext.ts +151 -0
- package/src/apiTypes.ts +165 -0
- package/src/tus.ts +123 -0
- package/index.js +0 -1
- package/src/PaginationStream.js +0 -39
- package/src/Transloadit.js +0 -701
- package/types/index.d.ts +0 -217
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
See [GitHub releases](https://github.com/transloadit/node-sdk/releases) for change log from this point on
|
|
3
|
+
We're no longer using this file. Please refer to [GitHub releases](https://github.com/transloadit/node-sdk/releases) to see documented changes after version 2.0.10.
|
|
6
4
|
|
|
7
5
|
## v2.0.10
|
|
8
6
|
|
|
@@ -18,7 +16,7 @@ Released: 2018-12-06.
|
|
|
18
16
|
|
|
19
17
|
[Diff](https://github.com/transloadit/node-sdk/compare/v2.0.5...v2.0.9).
|
|
20
18
|
|
|
21
|
-
- [x] Add more helpful message to assembly error (#73)
|
|
19
|
+
- [x] Add more helpful message to assembly error (#73)
|
|
22
20
|
- [x] Add Assembly ID to unknown errors
|
|
23
21
|
- [x] Upgrade linting and fix newly found errors
|
|
24
22
|
|
|
@@ -28,7 +26,7 @@ Released: 2018-12-06.
|
|
|
28
26
|
|
|
29
27
|
[Diff](https://github.com/transloadit/node-sdk/compare/v2.0.5...v2.0.7).
|
|
30
28
|
|
|
31
|
-
- [x] Fix Transloadit-Client header test for once and all (#62)
|
|
29
|
+
- [x] Fix Transloadit-Client header test for once and all (#62)
|
|
32
30
|
- [x] Fix bug causing progressCb to only be fired once
|
|
33
31
|
|
|
34
32
|
## v2.0.5
|
|
@@ -37,9 +35,9 @@ Released: 2018-12-06.
|
|
|
37
35
|
|
|
38
36
|
[Diff](https://github.com/transloadit/node-sdk/compare/v2.0.4...v2.0.5).
|
|
39
37
|
|
|
40
|
-
- [x] Make resize image example more usable irl
|
|
38
|
+
- [x] Make resize image example more usable irl
|
|
41
39
|
- [x] Update Readme to include example for progressCb.
|
|
42
|
-
- [x] Fix failing test due to version increase (#61)
|
|
40
|
+
- [x] Fix failing test due to version increase (#61)
|
|
43
41
|
- [x] Update npm-run-all to lose event-stream dependency
|
|
44
42
|
|
|
45
43
|
## v2.0.4
|
|
@@ -48,7 +46,7 @@ Released: 2018-11-05.
|
|
|
48
46
|
|
|
49
47
|
[Diff](https://github.com/transloadit/node-sdk/compare/v2.0.3...v2.0.4).
|
|
50
48
|
|
|
51
|
-
- [x] Send transloadit-client header (#59)
|
|
49
|
+
- [x] Send transloadit-client header (#59)
|
|
52
50
|
|
|
53
51
|
## v2.0.3
|
|
54
52
|
|
|
@@ -72,7 +70,7 @@ Released: 2018-06-18.
|
|
|
72
70
|
|
|
73
71
|
[Diff](https://github.com/transloadit/node-sdk/compare/v2.0.0...v2.0.1).
|
|
74
72
|
|
|
75
|
-
- [x] Fix bug: invoke callback when waitforcompmletion is false
|
|
73
|
+
- [x] Fix bug: invoke callback when waitforcompmletion is false
|
|
76
74
|
|
|
77
75
|
## v2.0.0
|
|
78
76
|
|
|
@@ -91,7 +89,6 @@ Released: 2018-05-23.
|
|
|
91
89
|
|
|
92
90
|
- [x] Add Assembly URL to error console logs for easier debugging. (Q: should the node sdk log to console at all? should it not just work with callbacks and the caller decides what to write to what medium?)
|
|
93
91
|
|
|
94
|
-
|
|
95
92
|
## v1.10.3
|
|
96
93
|
|
|
97
94
|
Released: 2018-01-09.
|
|
@@ -127,7 +124,7 @@ Released: 2017-09-28.
|
|
|
127
124
|
|
|
128
125
|
## v1.9.6
|
|
129
126
|
|
|
130
|
-
Released: 2017-09-26.
|
|
127
|
+
Released: 2017-09-26.
|
|
131
128
|
|
|
132
129
|
[Diff](https://github.com/transloadit/node-sdk/compare/v1.9.5...v1.9.6).
|
|
133
130
|
|
|
@@ -138,7 +135,7 @@ Released: 2017-09-26.
|
|
|
138
135
|
|
|
139
136
|
## v1.9.5
|
|
140
137
|
|
|
141
|
-
Released: 2017-09-26.
|
|
138
|
+
Released: 2017-09-26.
|
|
142
139
|
|
|
143
140
|
[Diff](https://github.com/transloadit/node-sdk/compare/v0.0.22...1.9.5).
|
|
144
141
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
[](https://github.com/transloadit/node-sdk/actions/workflows/ci.yml)
|
|
2
|
+
[](https://codecov.io/gh/transloadit/node-sdk)
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
<a href="https://transloadit.com/?utm_source=github&utm_medium=referral&utm_campaign=sdks&utm_content=node_sdk">
|
|
5
|
+
<picture>
|
|
6
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://assets.transloadit.com/assets/images/sponsorships/logo-dark.svg">
|
|
7
|
+
<source media="(prefers-color-scheme: light)" srcset="https://assets.transloadit.com/assets/images/sponsorships/logo-default.svg">
|
|
8
|
+
<img src="https://assets.transloadit.com/assets/images/sponsorships/logo-default.svg" alt="Transloadit Logo">
|
|
9
|
+
</picture>
|
|
10
|
+
</a>
|
|
4
11
|
|
|
5
12
|
This is the official **Node.js** SDK for [Transloadit](https://transloadit.com)'s file uploading and encoding service.
|
|
6
13
|
|
|
@@ -17,7 +24,7 @@ This is a **Node.js** SDK to make it easy to talk to the
|
|
|
17
24
|
|
|
18
25
|
## Requirements
|
|
19
26
|
|
|
20
|
-
- [Node.js](https://nodejs.org/en/) version
|
|
27
|
+
- [Node.js](https://nodejs.org/en/) version 18 or newer
|
|
21
28
|
- [A Transloadit account](https://transloadit.com/signup/) ([free signup](https://transloadit.com/pricing/))
|
|
22
29
|
- [Your API credentials](https://transloadit.com/c/template-credentials) (`authKey`, `authSecret`)
|
|
23
30
|
|
|
@@ -30,7 +37,9 @@ Inside your project, type:
|
|
|
30
37
|
```bash
|
|
31
38
|
yarn add transloadit
|
|
32
39
|
```
|
|
40
|
+
|
|
33
41
|
or
|
|
42
|
+
|
|
34
43
|
```bash
|
|
35
44
|
npm install --save transloadit
|
|
36
45
|
```
|
|
@@ -40,76 +49,77 @@ npm install --save transloadit
|
|
|
40
49
|
The following code will upload an image and resize it to a thumbnail:
|
|
41
50
|
|
|
42
51
|
```javascript
|
|
43
|
-
const Transloadit = require('transloadit')
|
|
52
|
+
const { Transloadit } = require('transloadit')
|
|
44
53
|
|
|
45
54
|
const transloadit = new Transloadit({
|
|
46
|
-
authKey
|
|
55
|
+
authKey: 'YOUR_TRANSLOADIT_KEY',
|
|
47
56
|
authSecret: 'YOUR_TRANSLOADIT_SECRET',
|
|
48
|
-
})
|
|
57
|
+
})
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
59
|
+
try {
|
|
60
|
+
const options = {
|
|
61
|
+
files: {
|
|
62
|
+
file1: '/PATH/TO/FILE.jpg',
|
|
63
|
+
},
|
|
64
|
+
params: {
|
|
65
|
+
steps: {
|
|
66
|
+
// You can have many Steps. In this case we will just resize any inputs (:original)
|
|
67
|
+
resize: {
|
|
68
|
+
use: ':original',
|
|
69
|
+
robot: '/image/resize',
|
|
70
|
+
result: true,
|
|
71
|
+
width: 75,
|
|
72
|
+
height: 75,
|
|
65
73
|
},
|
|
66
|
-
// OR if you already created a template, you can use it instead of "steps":
|
|
67
|
-
// template_id: 'YOUR_TEMPLATE_ID',
|
|
68
74
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (status.results.resize) {
|
|
75
|
-
console.log('✅ Success - Your resized image:', status.results.resize[0].ssl_url)
|
|
76
|
-
} else {
|
|
77
|
-
console.log("❌ The Assembly didn't produce any output. Make sure you used a valid image file")
|
|
78
|
-
}
|
|
79
|
-
} catch (err) {
|
|
80
|
-
console.error('❌ Unable to process Assembly.', err)
|
|
81
|
-
if (err.assemblyId) {
|
|
82
|
-
console.error(`💡 More info: https://transloadit.com/assemblies/${err.assemblyId}`)
|
|
83
|
-
}
|
|
75
|
+
// OR if you already created a template, you can use it instead of "steps":
|
|
76
|
+
// template_id: 'YOUR_TEMPLATE_ID',
|
|
77
|
+
},
|
|
78
|
+
waitForCompletion: true, // Wait for the Assembly (job) to finish executing before returning
|
|
84
79
|
}
|
|
85
|
-
|
|
80
|
+
|
|
81
|
+
const status = await transloadit.createAssembly(options)
|
|
82
|
+
|
|
83
|
+
if (status.results.resize) {
|
|
84
|
+
console.log('✅ Success - Your resized image:', status.results.resize[0].ssl_url)
|
|
85
|
+
} else {
|
|
86
|
+
console.log("❌ The Assembly didn't produce any output. Make sure you used a valid image file")
|
|
87
|
+
}
|
|
88
|
+
} catch (err) {
|
|
89
|
+
console.error('❌ Unable to process Assembly.', err)
|
|
90
|
+
if (err instanceof ApiError && err.assemblyId) {
|
|
91
|
+
console.error(`💡 More info: https://transloadit.com/assemblies/${err.assemblyId}`)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
86
94
|
```
|
|
87
95
|
|
|
88
96
|
You can find [details about your executed Assemblies here](https://transloadit.com/assemblies).
|
|
89
97
|
|
|
90
98
|
## Examples
|
|
91
99
|
|
|
92
|
-
- [Upload and resize image](https://github.com/transloadit/node-sdk/blob/
|
|
93
|
-
- [Upload image and convert to WebP](https://github.com/transloadit/node-sdk/blob/
|
|
94
|
-
- [Crop a face out of an image and download the result](https://github.com/transloadit/node-sdk/blob/
|
|
95
|
-
- [Retry example](https://github.com/transloadit/node-sdk/blob/
|
|
96
|
-
- [Calculate total costs (GB usage)](https://github.com/transloadit/node-sdk/blob/
|
|
97
|
-
- [Templates CRUD](https://github.com/transloadit/node-sdk/blob/
|
|
100
|
+
- [Upload and resize image](https://github.com/transloadit/node-sdk/blob/main/examples/resize_an_image.js)
|
|
101
|
+
- [Upload image and convert to WebP](https://github.com/transloadit/node-sdk/blob/main/examples/convert_to_webp.js)
|
|
102
|
+
- [Crop a face out of an image and download the result](https://github.com/transloadit/node-sdk/blob/main/examples/face_detect_download.js)
|
|
103
|
+
- [Retry example](https://github.com/transloadit/node-sdk/blob/main/examples/retry.js)
|
|
104
|
+
- [Calculate total costs (GB usage)](https://github.com/transloadit/node-sdk/blob/main/examples/fetch_costs_of_all_assemblies_in_timeframe.js)
|
|
105
|
+
- [Templates CRUD](https://github.com/transloadit/node-sdk/blob/main/examples/template_api.js)
|
|
98
106
|
|
|
99
|
-
For more fully working examples take a look at [`examples/`](examples/).
|
|
107
|
+
For more fully working examples take a look at [`examples/`](https://github.com/transloadit/node-sdk/blob/main/examples/).
|
|
100
108
|
|
|
101
109
|
For more example use cases and information about the available robots and their parameters, check out the [Transloadit website](https://transloadit.com/).
|
|
102
110
|
|
|
103
111
|
## API
|
|
104
112
|
|
|
105
|
-
These are the public methods on the `Transloadit` object and their descriptions. The methods are based on the [Transloadit API](https://transloadit.com/docs/api/).
|
|
113
|
+
These are the public methods on the `Transloadit` object and their descriptions. The methods are based on the [Transloadit API](https://transloadit.com/docs/api/).
|
|
106
114
|
|
|
107
115
|
Table of contents:
|
|
116
|
+
|
|
108
117
|
- [Main](#main)
|
|
109
118
|
- [Assemblies](#assemblies)
|
|
110
119
|
- [Assembly notifications](#assembly-notifications)
|
|
111
120
|
- [Templates](#templates)
|
|
112
121
|
- [Errors](#errors)
|
|
122
|
+
- [Rate limiting & auto retry](#rate-limiting--auto-retry)
|
|
113
123
|
|
|
114
124
|
### Main
|
|
115
125
|
|
|
@@ -118,10 +128,12 @@ Table of contents:
|
|
|
118
128
|
Returns a new instance of the client.
|
|
119
129
|
|
|
120
130
|
The `options` object can contain the following keys:
|
|
131
|
+
|
|
121
132
|
- `authKey` **(required)** - see [requirements](#requirements)
|
|
122
133
|
- `authSecret` **(required)** - see [requirements](#requirements)
|
|
123
134
|
- `endpoint` (default `'https://api2.transloadit.com'`)
|
|
124
135
|
- `maxRetries` (default `5`) - see [Rate limiting & auto retry](#rate-limiting--auto-retry)
|
|
136
|
+
- `gotRetry` (default `0`) - see [Rate limiting & auto retry](#rate-limiting--auto-retry)
|
|
125
137
|
- `timeout` (default `60000`: 1 minute) - the timeout (in milliseconds) for all requests (except `createAssembly`)
|
|
126
138
|
|
|
127
139
|
### Assemblies
|
|
@@ -132,25 +144,30 @@ Creates a new Assembly on Transloadit and optionally upload the specified `files
|
|
|
132
144
|
|
|
133
145
|
You can provide the following keys inside the `options` object:
|
|
134
146
|
|
|
135
|
-
- `params` **(required)** - An object containing keys defining the Assembly's behavior with the following keys: (See also [API doc](https://transloadit.com/docs/api
|
|
136
|
-
- `steps` - Assembly instructions - See [Transloadit docs](https://transloadit.com/docs
|
|
137
|
-
- `template_id` - The ID of the Template that contains your Assembly Instructions. **One of either `steps` or `template_id` is required.** If you specify both, then [any Steps will overrule the template](https://transloadit.com/docs/#overruling-templates-at-runtime).
|
|
138
|
-
- `fields` - An object of form fields to add to the request, to make use of in the Assembly instructions via [Assembly variables](https://transloadit.com/docs#assembly-variables).
|
|
147
|
+
- `params` **(required)** - An object containing keys defining the Assembly's behavior with the following keys: (See also [API doc](https://transloadit.com/docs/api/assemblies-post/) and [examples](#examples))
|
|
148
|
+
- `steps` - Assembly instructions - See [Transloadit docs](https://transloadit.com/docs/topics/assembly-instructions/) and [demos](https://transloadit.com/demos/) for inspiration.
|
|
149
|
+
- `template_id` - The ID of the Template that contains your Assembly Instructions. **One of either `steps` or `template_id` is required.** If you specify both, then [any Steps will overrule the template](https://transloadit.com/docs/topics/templates/#overruling-templates-at-runtime).
|
|
150
|
+
- `fields` - An object of form fields to add to the request, to make use of in the Assembly instructions via [Assembly variables](https://transloadit.com/docs#assembly-variables).
|
|
139
151
|
- `notify_url` - Transloadit can send a Pingback to your server when the Assembly is completed. We'll send the Assembly Status in JSON encoded string inside a transloadit field in a multipart POST request to the URL supplied here.
|
|
140
|
-
- `files` - An object (key-value pairs) containing one or more file paths to upload and use in your Assembly. The
|
|
152
|
+
- `files` - An object (key-value pairs) containing one or more file paths to upload and use in your Assembly. The _key_ is the _field name_ and the _value_ is the path to the file to be uploaded. The _field name_ and the file's name may be used in the ([Assembly instructions](https://transloadit.com/docs/topics/assembly-instructions/)) (`params`.`steps`) to refer to the particular file. See example below.
|
|
141
153
|
- `'fieldName': '/path/to/file'`
|
|
142
154
|
- more files...
|
|
143
|
-
- `uploads` - An object (key-value pairs) containing one or more files to upload and use in your Assembly. The
|
|
144
|
-
- `'fieldName': (Readable | Buffer | TypedArray | ArrayBuffer | string | Iterable<Buffer | string> | AsyncIterable<Buffer | string> | Promise)
|
|
155
|
+
- `uploads` - An object (key-value pairs) containing one or more files to upload and use in your Assembly. The _key_ is the _file name_ and the _value_ is the _content_ of the file to be uploaded. _Value_ can be one of many types:
|
|
156
|
+
- `'fieldName': (Readable | Buffer | TypedArray | ArrayBuffer | string | Iterable<Buffer | string> | AsyncIterable<Buffer | string> | Promise)`.
|
|
145
157
|
- more uploads...
|
|
146
158
|
- `waitForCompletion` - A boolean (default is `false`) to indicate whether you want to wait for the Assembly to finish with all encoding results present before the promise is fulfilled. If `waitForCompletion` is `true`, this SDK will poll for status updates and fulfill the promise when all encoding work is done.
|
|
147
159
|
- `timeout` - Number of milliseconds to wait before aborting (default `86400000`: 24 hours).
|
|
148
160
|
- `onUploadProgress` - An optional function that will be periodically called with the file upload progress, which is an with an object containing:
|
|
149
161
|
- `uploadedBytes` - Number of bytes uploaded so far.
|
|
150
162
|
- `totalBytes` - Total number of bytes to upload or `undefined` if unknown (Streams).
|
|
151
|
-
- `onAssemblyProgress` - Once the Assembly has started processing this will be periodically called with the
|
|
163
|
+
- `onAssemblyProgress` - Once the Assembly has started processing this will be periodically called with the _Assembly Execution Status_ (result of `getAssembly`) **only if `waitForCompletion` is `true`**.
|
|
164
|
+
- `chunkSize` - (for uploads) a number indicating the maximum size of a tus `PATCH` request body in bytes. Default to `Infinity` for file uploads and 50MB for streams of unknown length. See [tus-js-client](https://github.com/tus/tus-js-client/blob/master/docs/api.md#chunksize).
|
|
165
|
+
- `uploadConcurrency` - Maximum number of concurrent tus file uploads to occur at any given time (default 10.)
|
|
166
|
+
|
|
167
|
+
**NOTE**: Make sure the key in `files` and `uploads` is not one of `signature`, `params` or `max_size`.
|
|
152
168
|
|
|
153
169
|
Example code showing all options:
|
|
170
|
+
|
|
154
171
|
```js
|
|
155
172
|
await transloadit.createAssembly({
|
|
156
173
|
files: {
|
|
@@ -169,7 +186,7 @@ await transloadit.createAssembly({
|
|
|
169
186
|
fields: {
|
|
170
187
|
field1: 'Field value',
|
|
171
188
|
// ...
|
|
172
|
-
},
|
|
189
|
+
},
|
|
173
190
|
notify_url: 'https://example.com/notify-url',
|
|
174
191
|
},
|
|
175
192
|
waitForCompletion: true,
|
|
@@ -180,13 +197,18 @@ await transloadit.createAssembly({
|
|
|
180
197
|
```
|
|
181
198
|
|
|
182
199
|
Example `onUploadProgress` and `onAssemblyProgress` handlers:
|
|
200
|
+
|
|
183
201
|
```javascript
|
|
184
202
|
function onUploadProgress({ uploadedBytes, totalBytes }) {
|
|
185
203
|
// NOTE: totalBytes may be undefined
|
|
186
204
|
console.log(`♻️ Upload progress polled: ${uploadedBytes} of ${totalBytes} bytes uploaded.`)
|
|
187
205
|
}
|
|
188
206
|
function onAssemblyProgress(assembly) {
|
|
189
|
-
console.log(
|
|
207
|
+
console.log(
|
|
208
|
+
`♻️ Assembly progress polled: ${assembly.error ? assembly.error : assembly.ok} ${
|
|
209
|
+
assembly.assembly_id
|
|
210
|
+
} ... `
|
|
211
|
+
)
|
|
190
212
|
}
|
|
191
213
|
```
|
|
192
214
|
|
|
@@ -198,16 +220,16 @@ console.log('Creating', promise.assemblyId)
|
|
|
198
220
|
const status = await promise
|
|
199
221
|
```
|
|
200
222
|
|
|
201
|
-
|
|
202
223
|
See also:
|
|
203
|
-
|
|
224
|
+
|
|
225
|
+
- [API documentation](https://transloadit.com/docs/api/assemblies-post/)
|
|
204
226
|
- Error codes and retry logic below
|
|
205
227
|
|
|
206
228
|
#### async listAssemblies(params)
|
|
207
229
|
|
|
208
230
|
Retrieve Assemblies according to the given `params`.
|
|
209
231
|
|
|
210
|
-
Valid params can be `page`, `pagesize`, `type`, `fromdate`, `todate` and `keywords`. Please consult the [API documentation](https://transloadit.com/docs/api
|
|
232
|
+
Valid params can be `page`, `pagesize`, `type`, `fromdate`, `todate` and `keywords`. Please consult the [API documentation](https://transloadit.com/docs/api/assemblies-get/) for details.
|
|
211
233
|
|
|
212
234
|
The method returns an object containing these properties:
|
|
213
235
|
|
|
@@ -221,41 +243,43 @@ Creates an `objectMode` `Readable` stream that automates handling of `listAssemb
|
|
|
221
243
|
This can be used to iterate through Assemblies:
|
|
222
244
|
|
|
223
245
|
```javascript
|
|
224
|
-
const assemblyStream = transloadit.streamAssemblies({ fromdate: '2016-08-19 01:15:00 UTC' })
|
|
246
|
+
const assemblyStream = transloadit.streamAssemblies({ fromdate: '2016-08-19 01:15:00 UTC' })
|
|
225
247
|
|
|
226
|
-
assemblyStream.on('readable', function() {
|
|
227
|
-
const assembly = assemblyStream.read()
|
|
228
|
-
if (assembly == null) console.log('end of stream')
|
|
248
|
+
assemblyStream.on('readable', function () {
|
|
249
|
+
const assembly = assemblyStream.read()
|
|
250
|
+
if (assembly == null) console.log('end of stream')
|
|
229
251
|
|
|
230
|
-
console.log(assembly.id)
|
|
231
|
-
})
|
|
252
|
+
console.log(assembly.id)
|
|
253
|
+
})
|
|
232
254
|
```
|
|
233
255
|
|
|
234
256
|
Results can also be piped. Here's an example using
|
|
235
257
|
[through2](https://github.com/rvagg/through2):
|
|
236
258
|
|
|
237
259
|
```javascript
|
|
238
|
-
const assemblyStream = transloadit.streamAssemblies({ fromdate: '2016-08-19 01:15:00 UTC' })
|
|
260
|
+
const assemblyStream = transloadit.streamAssemblies({ fromdate: '2016-08-19 01:15:00 UTC' })
|
|
239
261
|
|
|
240
262
|
assemblyStream
|
|
241
|
-
.pipe(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
263
|
+
.pipe(
|
|
264
|
+
through.obj(function (chunk, enc, callback) {
|
|
265
|
+
this.push(chunk.id + '\n')
|
|
266
|
+
callback()
|
|
267
|
+
})
|
|
268
|
+
)
|
|
269
|
+
.pipe(fs.createWriteStream('assemblies.txt'))
|
|
246
270
|
```
|
|
247
271
|
|
|
248
272
|
#### async getAssembly(assemblyId)
|
|
249
273
|
|
|
250
|
-
Retrieves the JSON status of the Assembly identified by the given `assemblyId`. See [API documentation](https://transloadit.com/docs/api
|
|
274
|
+
Retrieves the JSON status of the Assembly identified by the given `assemblyId`. See [API documentation](https://transloadit.com/docs/api/assemblies-assembly-id-get/).
|
|
251
275
|
|
|
252
276
|
#### async cancelAssembly(assemblyId)
|
|
253
277
|
|
|
254
|
-
Removes the Assembly identified by the given `assemblyId` from the memory of the Transloadit machines, ultimately cancelling it. This does not delete the Assembly from the database - you can still access it on `https://transloadit.com/assemblies/{assembly_id}` in your Transloadit account. This also does not delete any files associated with the Assembly from the Transloadit servers. See [API documentation](https://transloadit.com/docs/api
|
|
278
|
+
Removes the Assembly identified by the given `assemblyId` from the memory of the Transloadit machines, ultimately cancelling it. This does not delete the Assembly from the database - you can still access it on `https://transloadit.com/assemblies/{assembly_id}` in your Transloadit account. This also does not delete any files associated with the Assembly from the Transloadit servers. See [API documentation](https://transloadit.com/docs/api/assemblies-assembly-id-delete/).
|
|
255
279
|
|
|
256
280
|
#### async replayAssembly(assemblyId, params)
|
|
257
281
|
|
|
258
|
-
Replays the Assembly identified by the given `assemblyId` (required argument). Optionally you can also provide a `notify_url` key inside `params` if you want to change the notification target. See [API documentation](https://transloadit.com/docs/api
|
|
282
|
+
Replays the Assembly identified by the given `assemblyId` (required argument). Optionally you can also provide a `notify_url` key inside `params` if you want to change the notification target. See [API documentation](https://transloadit.com/docs/api/assemblies-assembly-id-replay-post/) for more info about `params`.
|
|
259
283
|
|
|
260
284
|
The response from the `replayAssembly` is minimal and does not contain much information about the replayed assembly. Please call `getAssembly` or `awaitAssemblyCompletion` after replay to get more information:
|
|
261
285
|
|
|
@@ -264,7 +288,9 @@ const replayAssemblyResponse = await transloadit.replayAssembly(failedAssemblyId
|
|
|
264
288
|
|
|
265
289
|
const assembly = await transloadit.getAssembly(replayAssemblyResponse.assembly_id)
|
|
266
290
|
// Or
|
|
267
|
-
const completedAssembly = await transloadit.awaitAssemblyCompletion(
|
|
291
|
+
const completedAssembly = await transloadit.awaitAssemblyCompletion(
|
|
292
|
+
replayAssemblyResponse.assembly_id
|
|
293
|
+
)
|
|
268
294
|
```
|
|
269
295
|
|
|
270
296
|
#### async awaitAssemblyCompletion(assemblyId, opts)
|
|
@@ -272,6 +298,7 @@ const completedAssembly = await transloadit.awaitAssemblyCompletion(replayAssemb
|
|
|
272
298
|
This function will continously poll the specified Assembly `assemblyId` and resolve when it is done uploading and executing (until `result.ok` is no longer `ASSEMBLY_UPLOADING`, `ASSEMBLY_EXECUTING` or `ASSEMBLY_REPLAYING`). It resolves with the same value as `getAssembly`.
|
|
273
299
|
|
|
274
300
|
`opts` is an object with the keys:
|
|
301
|
+
|
|
275
302
|
- `onAssemblyProgress` - A progress function called on each poll. See `createAssembly`
|
|
276
303
|
- `timeout` - How many milliseconds until polling times out (default: no timeout)
|
|
277
304
|
- `interval` - Poll interval in milliseconds (default `1000`)
|
|
@@ -284,20 +311,7 @@ Returns the internal url that was used for the last call to `createAssembly`. Th
|
|
|
284
311
|
|
|
285
312
|
#### async replayAssemblyNotification(assemblyId, params)
|
|
286
313
|
|
|
287
|
-
Replays the notification for the Assembly identified by the given `assemblyId` (required argument). Optionally you can also provide a `notify_url` key inside `params` if you want to change the notification target. See [API documentation](https://transloadit.com/docs/api
|
|
288
|
-
|
|
289
|
-
#### async listAssemblyNotifications(params)
|
|
290
|
-
|
|
291
|
-
Retrieve Assembly notifications according to `params`. [See example](examples/list_assembly_notifications.js) and [API documentation](https://transloadit.com/docs/api/#assembly-notifications-get) for more info about `params`.
|
|
292
|
-
|
|
293
|
-
The method returns an object containing these properties:
|
|
294
|
-
|
|
295
|
-
- `items`: An `Array` of up to `pagesize` Assembly notifications
|
|
296
|
-
- `count`: Total number of Assembly notifications
|
|
297
|
-
|
|
298
|
-
#### streamAssemblyNotifications(params)
|
|
299
|
-
|
|
300
|
-
Creates an `objectMode` `Readable` stream that automates handling of `listAssemblynotifications` pagination. Similar to `streamAssemblies`.
|
|
314
|
+
Replays the notification for the Assembly identified by the given `assemblyId` (required argument). Optionally you can also provide a `notify_url` key inside `params` if you want to change the notification target. See [API documentation](https://transloadit.com/docs/api/assembly-notifications-assembly-id-replay-post/) for more info about `params`.
|
|
301
315
|
|
|
302
316
|
### Templates
|
|
303
317
|
|
|
@@ -306,21 +320,22 @@ Templates are Steps that can be reused. [See example template code](examples/tem
|
|
|
306
320
|
#### async createTemplate(params)
|
|
307
321
|
|
|
308
322
|
Creates a template the provided params. The required `params` keys are:
|
|
323
|
+
|
|
309
324
|
- `name` - The template name
|
|
310
325
|
- `template` - The template JSON object containing its `steps`
|
|
311
326
|
|
|
312
|
-
See also [API documentation](https://transloadit.com/docs/api
|
|
327
|
+
See also [API documentation](https://transloadit.com/docs/api/templates-post/).
|
|
313
328
|
|
|
314
329
|
```js
|
|
315
330
|
const template = {
|
|
316
331
|
steps: {
|
|
317
332
|
encode: {
|
|
318
|
-
use
|
|
319
|
-
robot
|
|
333
|
+
use: ':original',
|
|
334
|
+
robot: '/video/encode',
|
|
320
335
|
preset: 'ipad-high',
|
|
321
336
|
},
|
|
322
337
|
thumbnail: {
|
|
323
|
-
use
|
|
338
|
+
use: 'encode',
|
|
324
339
|
robot: '/video/thumbnails',
|
|
325
340
|
},
|
|
326
341
|
},
|
|
@@ -332,19 +347,19 @@ console.log('✅ Template created with template_id', result.id)
|
|
|
332
347
|
|
|
333
348
|
#### async editTemplate(templateId, params)
|
|
334
349
|
|
|
335
|
-
Updates the template represented by the given `templateId` with the new value. The `params` works just like the one from the `createTemplate` call. See [API documentation](https://transloadit.com/docs/api
|
|
350
|
+
Updates the template represented by the given `templateId` with the new value. The `params` works just like the one from the `createTemplate` call. See [API documentation](https://transloadit.com/docs/api/templates-template-id-put/).
|
|
336
351
|
|
|
337
352
|
#### async getTemplate(templateId)
|
|
338
353
|
|
|
339
|
-
Retrieves the name and the template JSON for the template represented by the given `templateId`. See [API documentation](https://transloadit.com/docs/api
|
|
354
|
+
Retrieves the name and the template JSON for the template represented by the given `templateId`. See [API documentation](https://transloadit.com/docs/api/templates-template-id-get/).
|
|
340
355
|
|
|
341
356
|
#### async deleteTemplate(templateId)
|
|
342
357
|
|
|
343
|
-
Deletes the template represented by the given `templateId`. See [API documentation](https://transloadit.com/docs/api
|
|
358
|
+
Deletes the template represented by the given `templateId`. See [API documentation](https://transloadit.com/docs/api/templates-template-id-delete/).
|
|
344
359
|
|
|
345
360
|
#### async listTemplates(params)
|
|
346
361
|
|
|
347
|
-
Retrieve all your templates. See [API documentation](https://transloadit.com/docs/api
|
|
362
|
+
Retrieve all your templates. See [API documentation](https://transloadit.com/docs/api/templates-template-id-get/) for more info about `params`.
|
|
348
363
|
|
|
349
364
|
The method returns an object containing these properties:
|
|
350
365
|
|
|
@@ -363,7 +378,7 @@ Same as `constructor` `timeout` option: Set the default timeout (in milliseconds
|
|
|
363
378
|
|
|
364
379
|
#### async getBill(date)
|
|
365
380
|
|
|
366
|
-
Retrieves the billing data for a given `date` string with format `YYYY-MM`. See [API documentation](https://transloadit.com/docs/api
|
|
381
|
+
Retrieves the billing data for a given `date` string with format `YYYY-MM`. See [API documentation](https://transloadit.com/docs/api/bill-date-get/).
|
|
367
382
|
|
|
368
383
|
#### calcSignature(params)
|
|
369
384
|
|
|
@@ -371,41 +386,84 @@ Calculates a signature for the given `params` JSON object. If the `params` objec
|
|
|
371
386
|
|
|
372
387
|
This function returns an object with the key `signature` (containing the calculated signature string) and a key `params`, which contains the stringified version of the passed `params` object (including the set expires and authKey keys).
|
|
373
388
|
|
|
389
|
+
#### getSignedSmartCDNUrl(params)
|
|
390
|
+
|
|
391
|
+
Constructs a signed Smart CDN URL, as defined in the [API documentation](https://transloadit.com/docs/topics/signature-authentication/#smart-cdn). `params` must be an object with the following properties:
|
|
392
|
+
|
|
393
|
+
- `workspace` - Workspace slug (required)
|
|
394
|
+
- `template` - Template slug or template ID (required)
|
|
395
|
+
- `input` - Input value that is provided as `${fields.input}` in the template (required)
|
|
396
|
+
- `urlParams` - Object with additional parameters for the URL query string (optional)
|
|
397
|
+
- `expiresAt` - Expiration timestamp of the signature in milliseconds since UNIX epoch. Defaults to 1 hour from now. (optional)
|
|
398
|
+
|
|
399
|
+
Example:
|
|
400
|
+
|
|
401
|
+
```js
|
|
402
|
+
const client = new Transloadit({ authKey: 'foo_key', authSecret: 'foo_secret' })
|
|
403
|
+
const url = client.getSignedSmartCDNUrl({
|
|
404
|
+
workspace: 'foo_workspace',
|
|
405
|
+
template: 'foo_template',
|
|
406
|
+
input: 'foo_input',
|
|
407
|
+
urlParams: {
|
|
408
|
+
foo: 'bar',
|
|
409
|
+
},
|
|
410
|
+
})
|
|
411
|
+
|
|
412
|
+
// url is:
|
|
413
|
+
// https://foo_workspace.tlcdn.com/foo_template/foo_input?auth_key=foo_key&exp=1714525200000&foo=bar&sig=sha256:9548915ec70a5f0d05de9497289e792201ceec19a526fe315f4f4fd2e7e377ac
|
|
414
|
+
```
|
|
415
|
+
|
|
374
416
|
### Errors
|
|
375
417
|
|
|
376
|
-
|
|
418
|
+
Any errors originating from Node.js will be passed on and we use [GOT](https://github.com/sindresorhus/got) v11 for HTTP requests. [Errors from `got`](https://github.com/sindresorhus/got/tree/v11.8.6?tab=readme-ov-file#errors) will also be passed on, _except_ the `got.HTTPError` which will be replaced with a `transloadit.ApiError`, which will have its `cause` property set to the instance of the original `got.HTTPError`. `transloadit.ApiError` has these properties:
|
|
377
419
|
|
|
378
|
-
- `
|
|
379
|
-
- `
|
|
380
|
-
- `
|
|
420
|
+
- `code` (`string`) - [The Transloadit API error code](https://transloadit.com/docs/api/response-codes/#error-codes).
|
|
421
|
+
- `rawMessage` (`string`) - A textual representation of the Transloadit API error.
|
|
422
|
+
- `assemblyId`: (`string`) - If the request is related to an assembly, this will be the ID of the assembly.
|
|
423
|
+
- `assemblySslUrl` (`string`) - If the request is related to an assembly, this will be the SSL URL to the assembly .
|
|
381
424
|
|
|
382
425
|
To identify errors you can either check its props or use `instanceof`, e.g.:
|
|
426
|
+
|
|
383
427
|
```js
|
|
384
|
-
|
|
385
|
-
|
|
428
|
+
try {
|
|
429
|
+
await transloadit.createAssembly(options)
|
|
430
|
+
} catch (err) {
|
|
431
|
+
if (err instanceof got.TimeoutError) {
|
|
386
432
|
return console.error('The request timed out', err)
|
|
387
433
|
}
|
|
388
434
|
if (err.code === 'ENOENT') {
|
|
389
435
|
return console.error('Cannot open file', err)
|
|
390
436
|
}
|
|
391
|
-
if (err.
|
|
437
|
+
if (err instanceof ApiError && err.code === 'ASSEMBLY_INVALID_STEPS') {
|
|
392
438
|
return console.error('Invalid Assembly Steps', err)
|
|
393
439
|
}
|
|
394
440
|
}
|
|
395
441
|
```
|
|
396
442
|
|
|
397
|
-
**Note:** Assemblies that have an error status (`assembly.error`) will only result in an error thrown from `createAssembly` and `replayAssembly`. For other Assembly methods, no errors will be thrown, but any error can be found in the response's `error` property
|
|
443
|
+
**Note:** Assemblies that have an error status (`assembly.error`) will only result in an error being thrown from `createAssembly` and `replayAssembly`. For other Assembly methods, no errors will be thrown, but any error can be found in the response's `error` property (also `ApiError.code`).
|
|
398
444
|
|
|
399
|
-
- [More information on Transloadit errors (`
|
|
445
|
+
- [More information on Transloadit errors (`ApiError.code`)](https://transloadit.com/docs/api/response-codes/#error-codes)
|
|
400
446
|
- [More information on request errors](https://github.com/sindresorhus/got#errors)
|
|
401
447
|
|
|
402
448
|
### Rate limiting & auto retry
|
|
403
449
|
|
|
404
|
-
|
|
450
|
+
There are three kinds of retries:
|
|
451
|
+
|
|
452
|
+
#### Retry on rate limiting (`maxRetries`, default `5`)
|
|
453
|
+
|
|
454
|
+
All functions of the client automatically obey all rate limiting imposed by Transloadit (e.g. `RATE_LIMIT_REACHED`), so there is no need to write your own wrapper scripts to handle rate limits. The SDK will by default retry requests **5 times** with auto back-off (See `maxRetries` constructor option).
|
|
455
|
+
|
|
456
|
+
#### GOT HTTP retries (`gotRetry`, default `0`)
|
|
457
|
+
|
|
458
|
+
Because we use [got](https://github.com/sindresorhus/got) under the hood, you can pass a `gotRetry` constructor option which is passed on to `got`. This offers great flexibility for handling retries on network errors and HTTP status codes with auto back-off. See [`got` `retry` object documentation](https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md).
|
|
459
|
+
|
|
460
|
+
**Note that the above `maxRetries` option does not affect the `gotRetry` logic.**
|
|
461
|
+
|
|
462
|
+
#### Custom retry logic
|
|
405
463
|
|
|
406
464
|
If you want to retry on other errors, please see the [retry example code](examples/retry.js).
|
|
407
465
|
|
|
408
|
-
- https://transloadit.com/docs/api
|
|
466
|
+
- https://transloadit.com/docs/api/rate-limiting/
|
|
409
467
|
- https://transloadit.com/blog/2012/04/introducing-rate-limiting/
|
|
410
468
|
|
|
411
469
|
## Debugging
|
|
@@ -420,30 +478,18 @@ DEBUG=transloadit* node examples/template_api.js
|
|
|
420
478
|
|
|
421
479
|
- [Mikael Finstad](https://github.com/mifi)
|
|
422
480
|
|
|
423
|
-
|
|
481
|
+
### Changelog
|
|
424
482
|
|
|
425
|
-
We'd be happy to accept pull requests. If you plan on working on something big, please first drop us a line!
|
|
426
|
-
|
|
427
|
-
### Testing
|
|
428
|
-
|
|
429
|
-
Check your sources for linting errors via `npm run lint`, and unit tests, and run them via `npm test`
|
|
430
|
-
|
|
431
|
-
### Releasing
|
|
432
|
-
|
|
433
|
-
1. Install [np](https://github.com/sindresorhus/np): `npm i -g np`
|
|
434
|
-
2. Wait for [tests to succeed](https://github.com/transloadit/node-sdk/actions).
|
|
435
|
-
3. Run `np` and follow instructions.
|
|
436
|
-
4. When successful add [release notes](https://github.com/transloadit/node-sdk/releases).
|
|
437
|
-
|
|
438
|
-
### Change log
|
|
439
483
|
See [Releases](https://github.com/transloadit/node-sdk/releases)
|
|
440
484
|
|
|
441
|
-
|
|
485
|
+
## Attribution
|
|
442
486
|
|
|
443
|
-
|
|
487
|
+
Thanks to [Ian Hansen](https://github.com/supershabam) for donating the `transloadit` npm name. You can still access his code under [`v0.0.0`](https://www.npmjs.com/package/transloadit/v/0.0.0).
|
|
444
488
|
|
|
445
489
|
## License
|
|
446
490
|
|
|
447
|
-
[MIT](LICENSE)
|
|
491
|
+
[MIT](LICENSE) © [Transloadit](https://transloadit.com)
|
|
492
|
+
|
|
493
|
+
## Development
|
|
448
494
|
|
|
449
|
-
|
|
495
|
+
See [CONTRIBUTING](./CONTRIBUTING.md).
|