@visulima/storage 1.0.0-alpha.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +555 -0
- package/LICENSE.md +237 -568
- package/README.md +82 -466
- package/dist/adapter/nuxt/module.d.ts +41 -34
- package/dist/adapter/nuxt/module.js +1 -93
- package/dist/adapter/nuxt/package.json +0 -6
- package/dist/ai/ai-sdk/index.d.ts +113 -0
- package/dist/ai/ai-sdk/index.js +1 -0
- package/dist/ai/claude/index.d.ts +177 -0
- package/dist/ai/claude/index.js +1 -0
- package/dist/ai/openai/index.d.ts +205 -0
- package/dist/ai/openai/index.js +1 -0
- package/dist/ai/tanstack/index.d.ts +115 -0
- package/dist/ai/tanstack/index.js +1 -0
- package/dist/handler/http/fetch/index.d.ts +303 -4
- package/dist/handler/http/fetch/index.js +1 -4
- package/dist/handler/http/hono/index.d.ts +73 -64
- package/dist/handler/http/hono/index.js +1 -65
- package/dist/handler/http/nextjs/index.d.ts +66 -58
- package/dist/handler/http/nextjs/index.js +1 -37
- package/dist/handler/http/node/index.d.ts +368 -4
- package/dist/handler/http/node/index.js +1 -8
- package/dist/handler/http/solid-start/index.d.ts +66 -57
- package/dist/handler/http/solid-start/index.js +1 -44
- package/dist/index.d.ts +106 -17
- package/dist/index.js +1 -13
- package/dist/openapi/index.d.ts +24 -5
- package/dist/openapi/index.js +1 -5
- package/dist/packem_shared/AbstractBaseStorage-Ba7cLu-t.js +1 -0
- package/dist/packem_shared/AwsLightFile-CpZrubaV.js +1 -0
- package/dist/packem_shared/AwsLightMetaStorage-DPqJ9LTr.js +1 -0
- package/dist/packem_shared/AwsLightStorage-DTBVxHXO.js +1 -0
- package/dist/packem_shared/AzureFile-DFSaVe25.js +1 -0
- package/dist/packem_shared/AzureSMetaStorage-ByzM6Aix.js +1 -0
- package/dist/packem_shared/AzureStorage-BFsD4qbF.js +1 -0
- package/dist/packem_shared/BaseTransformer-Buw5lX_3.js +1 -0
- package/dist/packem_shared/BoxFile-CseIoPW1.js +1 -0
- package/dist/packem_shared/BoxMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/BoxStorage-B_t-OVzf.js +1 -0
- package/dist/packem_shared/BunS3File-BcYmsz1n.js +1 -0
- package/dist/packem_shared/BunS3MetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/BunS3Storage-CB_pZWlV.js +1 -0
- package/dist/packem_shared/BunnyFile-BgEOlcYI.js +1 -0
- package/dist/packem_shared/BunnyMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/BunnyStorage-CILSK4_Z.js +1 -0
- package/dist/packem_shared/CloudinaryFile-Bo5B-vM1.js +1 -0
- package/dist/packem_shared/CloudinaryMetaStorage-D_vNzewL.js +1 -0
- package/dist/packem_shared/CloudinaryStorage-DiCbdAi_.js +1 -0
- package/dist/packem_shared/DiskStorage-Kp5t3vnF.js +1 -0
- package/dist/packem_shared/DiskStorageWithChecksum-Bh6w-Iu8.js +1 -0
- package/dist/packem_shared/DropboxFile-BFb7eOzy.js +1 -0
- package/dist/packem_shared/DropboxMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/DropboxStorage-H8bd8hEz.js +1 -0
- package/dist/packem_shared/ERRORS-BIBxE2oR.js +1 -0
- package/dist/packem_shared/File-W8aOo15X.js +1 -0
- package/dist/packem_shared/Files-BA3mpDwz.js +1 -0
- package/dist/packem_shared/FirebaseFile-BLaBxa2A.js +1 -0
- package/dist/packem_shared/FirebaseMetaStorage-D_vNzewL.js +1 -0
- package/dist/packem_shared/FirebaseStorage-Dgk4XyMr.js +2 -0
- package/dist/packem_shared/FtpFile-ClWDYnt2.js +1 -0
- package/dist/packem_shared/FtpMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/FtpStorage-g_DjiR-C.js +1 -0
- package/dist/packem_shared/GCSConfig-BQ0OpVhe.js +1 -0
- package/dist/packem_shared/GCSFile-Cero7qZN.js +1 -0
- package/dist/packem_shared/GCSMetaStorage-3fLTlRd4.js +1 -0
- package/dist/packem_shared/GCStorage-DUfwVFd3.js +1 -0
- package/dist/packem_shared/GoogleDriveFile-DHpLhzg9.js +1 -0
- package/dist/packem_shared/GoogleDriveMetaStorage-DqkgoE46.js +1 -0
- package/dist/packem_shared/GoogleDriveStorage-D0-5egHE.js +1 -0
- package/dist/packem_shared/LocalMetaStorage-Bp5mVc76.js +1 -0
- package/dist/packem_shared/MediaTransformer-D2kUsklW.js +1 -0
- package/dist/packem_shared/MemoryMetaStorage-Ksgh9pe7.js +1 -0
- package/dist/packem_shared/MemoryStorage-DzSTdlAq.js +1 -0
- package/dist/packem_shared/MetaStorage-DPEUyWgN.js +1 -0
- package/dist/packem_shared/Metadata-B7CcBueg.js +1 -0
- package/dist/packem_shared/Multipart-Btj2mo9r.js +1 -0
- package/dist/packem_shared/Multipart-C4GpuHMU.js +1 -0
- package/dist/packem_shared/NetlifyBlobFile-DoFhkzaH.js +1 -0
- package/dist/packem_shared/NetlifyBlobMetaStorage-D_vNzewL.js +1 -0
- package/dist/packem_shared/NetlifyBlobStorage-DZdCmOVW.js +1 -0
- package/dist/packem_shared/NoOpMetrics-BLo6u4NY.js +1 -0
- package/dist/packem_shared/OneDriveFile-CNNJYI43.js +1 -0
- package/dist/packem_shared/OneDriveMetaStorage-DqkgoE46.js +1 -0
- package/dist/packem_shared/OneDriveStorage-CvJetV7_.js +1 -0
- package/dist/packem_shared/OpenTelemetryMetrics-DJDQsNKp.js +1 -0
- package/dist/packem_shared/PocketBaseFile-DpJpxl3e.js +1 -0
- package/dist/packem_shared/PocketBaseMetaStorage-CpvDRnSu.js +1 -0
- package/dist/packem_shared/PocketBaseStorage-BPil-koe.js +1 -0
- package/dist/packem_shared/Rest-BehVaxbl.js +1 -0
- package/dist/packem_shared/Rest-ymPCZkKR.js +1 -0
- package/dist/packem_shared/S3File-CpZrubaV.js +1 -0
- package/dist/packem_shared/S3MetaStorage-CMonflzp.js +1 -0
- package/dist/packem_shared/S3Storage-wslqssvr.js +1 -0
- package/dist/packem_shared/SftpFile-ClWDYnt2.js +1 -0
- package/dist/packem_shared/SftpMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/SftpStorage-BVbMtS2b.js +1 -0
- package/dist/packem_shared/SharePointFile-Blz9FS4h.js +1 -0
- package/dist/packem_shared/SharePointMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/SharePointStorage-DWjvR5oZ.js +1 -0
- package/dist/packem_shared/SupabaseFile-Bo5B-vM1.js +1 -0
- package/dist/packem_shared/SupabaseMetaStorage-DqkgoE46.js +1 -0
- package/dist/packem_shared/SupabaseStorage-BiKmYKb6.js +1 -0
- package/dist/packem_shared/TUS_RESUMABLE-CyTSRvPU.js +1 -0
- package/dist/packem_shared/Tus-BgbON_wQ.js +1 -0
- package/dist/packem_shared/Tus-v6jzkaIO.js +1 -0
- package/dist/packem_shared/UploadControl-DZJhI9Wh.js +1 -0
- package/dist/packem_shared/UploadThingFile-BTFMpcIA.js +1 -0
- package/dist/packem_shared/UploadThingMetaStorage-D_vNzewL.js +1 -0
- package/dist/packem_shared/UploadThingStorage-jrEnANC5.js +1 -0
- package/dist/packem_shared/ValidationError-3B06DFyE.js +1 -0
- package/dist/packem_shared/VercelBlobFile-CVQwKlZk.js +1 -0
- package/dist/packem_shared/VercelBlobMetaStorage-DFwhEI9C.js +1 -0
- package/dist/packem_shared/VercelBlobStorage-Y-cDgH30.js +1 -0
- package/dist/packem_shared/_commonjsHelpers-CWAkuNXM.js +1 -0
- package/dist/packem_shared/agentsCopyFile-Dl5iffdH.js +1 -0
- package/dist/packem_shared/akamai-DthkaFul.js +1 -0
- package/dist/packem_shared/alibaba-BEi25O1g.js +1 -0
- package/dist/packem_shared/approval-fVHwBp7u.js +1 -0
- package/dist/packem_shared/approval.d-CMAYH9GF.d.ts +75 -0
- package/dist/packem_shared/aws-light-meta-storage-DGrn72VJ.js +4 -0
- package/dist/packem_shared/azure-meta-storage-ClbEsfI4.js +1 -0
- package/dist/packem_shared/backblaze-m1N5NZ9q.js +1 -0
- package/dist/packem_shared/base-handler-core-EeV8gZck.js +1 -0
- package/dist/packem_shared/base-handler-fetch-CHzsgb7C.js +1 -0
- package/dist/packem_shared/base-handler-node-BjpW8pGi.js +1 -0
- package/dist/packem_shared/cache-Cw3QjoVN.js +1 -0
- package/dist/packem_shared/claudeCopyFile-BX9O4ORk.js +1 -0
- package/dist/packem_shared/cloudflare-CdUTErlo.js +1 -0
- package/dist/packem_shared/copyFile-49FtxXcm.js +1 -0
- package/dist/packem_shared/copyFile-BUPezT_c.js +1 -0
- package/dist/packem_shared/createResponsesFileTools-6Tvt2PNr.js +1 -0
- package/dist/packem_shared/createRetryWrapper-CxgiV_hH.js +1 -0
- package/dist/packem_shared/detect-file-type-BA7UBLKA.js +1 -0
- package/dist/packem_shared/digitalOcean-B2uB6pgz.js +1 -0
- package/dist/packem_shared/disk-storage-DIn-VnCh.js +1 -0
- package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +156 -0
- package/dist/packem_shared/executors-BDzMjc4y.js +1 -0
- package/dist/packem_shared/executors.d-BZP2rWo3.d.ts +69 -0
- package/dist/packem_shared/exoscale-BDa1Gjth.js +1 -0
- package/dist/packem_shared/filebase-CsFYJIwB.js +1 -0
- package/dist/packem_shared/files.d-CH0iLBNC.d.ts +655 -0
- package/dist/packem_shared/gcs-meta-storage-Dy37wCjI.js +1 -0
- package/dist/packem_shared/get-file-status-y3wTtDQs.js +1 -0
- package/dist/packem_shared/getFormatFromContentType-DCTTPQHm.js +1 -0
- package/dist/packem_shared/has-content-50BsqrWw.js +1 -0
- package/dist/packem_shared/headers-BAiAKekR.js +26 -0
- package/dist/packem_shared/hetzner-BGGFiRGD.js +1 -0
- package/dist/packem_shared/ibmCos-j-3TfJ5p.js +1 -0
- package/dist/packem_shared/idriveE2-C6pQ5pQ0.js +1 -0
- package/dist/packem_shared/index-nZWCQrSe.js +5 -0
- package/dist/packem_shared/internal-D_cZIFwI.js +1 -0
- package/dist/packem_shared/is-expired-CBEk6XBi.js +1 -0
- package/dist/packem_shared/local-meta-storage-C2T92TYb.js +11 -0
- package/dist/packem_shared/local-meta-storage.d-D9PBfkn6.d.ts +21 -0
- package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +331 -0
- package/dist/packem_shared/memory-storage.d-4EU1cMt1.d.ts +101 -0
- package/dist/packem_shared/minio-NKquuBfS.js +1 -0
- package/dist/packem_shared/multipart-base-BOzY19lb.js +1 -0
- package/dist/packem_shared/oauth-refresh-EdGzlcOZ.js +1 -0
- package/dist/packem_shared/oracleCloud-DslqNpn6.js +1 -0
- package/dist/packem_shared/ovhCloud-CMHE6uLV.js +1 -0
- package/dist/packem_shared/part-match-D-9dGX42.js +1 -0
- package/dist/packem_shared/path-0oTTdkvl-BVg7lYf5.js +1 -0
- package/dist/packem_shared/posix-dirname-CfpH5wZi.js +1 -0
- package/dist/packem_shared/response-builder-CbSA8qPa.js +1 -0
- package/dist/packem_shared/rest-base-CynUg0mH.js +1 -0
- package/dist/packem_shared/restOpenApiSpec-Csv513qf.js +1 -0
- package/dist/packem_shared/s3-base-storage-DXZYN24h.js +1 -0
- package/dist/packem_shared/s3-base-storage.d-BQgP5B-t.d.ts +287 -0
- package/dist/packem_shared/scaleway-U1In3v70.js +1 -0
- package/dist/packem_shared/sharedErrorSchemaObject-YN65aAKj.js +1 -0
- package/dist/packem_shared/storage-Cyy73Y6r.js +1 -0
- package/dist/packem_shared/storage.d-CEM1upWM.d.ts +1176 -0
- package/dist/packem_shared/storj-Cb59q9kF.js +1 -0
- package/dist/packem_shared/sync-DhR3536K.js +1 -0
- package/dist/packem_shared/tencent-Q1y2GENc.js +1 -0
- package/dist/packem_shared/tigris-BELKoyyp.js +1 -0
- package/dist/packem_shared/transformOpenApiSpec-CIEAgpBD.js +1 -0
- package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +106 -0
- package/dist/packem_shared/tusOpenApiSpec-D96B03t5.js +1 -0
- package/dist/packem_shared/types.d-Bon9GVVe.d.ts +104 -0
- package/dist/packem_shared/types.d-CggTCgXr.d.ts +49 -0
- package/dist/packem_shared/types.d-CrUWY4On.d.ts +720 -0
- package/dist/packem_shared/update-size-DuNuLyxj.js +1 -0
- package/dist/packem_shared/vultr-B491cQ4e.js +1 -0
- package/dist/packem_shared/waitForStorage-ByQmG4xF.js +1 -0
- package/dist/packem_shared/wasabi-DFrwIoab.js +1 -0
- package/dist/packem_shared/xhrOpenApiSpec-DQR4h6M8.js +1 -0
- package/dist/packem_shared/yandex-CwzHuEKP.js +1 -0
- package/dist/storage/aws/clients/index.d.ts +612 -6
- package/dist/storage/aws/clients/index.js +1 -6
- package/dist/storage/aws/index.d.ts +332 -4
- package/dist/storage/aws/index.js +1 -3
- package/dist/storage/aws-light/index.d.ts +259 -4
- package/dist/storage/aws-light/index.js +1 -3
- package/dist/storage/azure/index.d.ts +236 -4
- package/dist/storage/azure/index.js +1 -3
- package/dist/storage/box/index.d.ts +189 -0
- package/dist/storage/box/index.js +1 -0
- package/dist/storage/bun-s3/index.d.ts +200 -0
- package/dist/storage/bun-s3/index.js +1 -0
- package/dist/storage/bunny/index.d.ts +119 -0
- package/dist/storage/bunny/index.js +1 -0
- package/dist/storage/cloudinary/index.d.ts +121 -0
- package/dist/storage/cloudinary/index.js +1 -0
- package/dist/storage/dropbox/index.d.ts +132 -0
- package/dist/storage/dropbox/index.js +1 -0
- package/dist/storage/firebase/index.d.ts +192 -0
- package/dist/storage/firebase/index.js +1 -0
- package/dist/storage/ftp/index.d.ts +91 -0
- package/dist/storage/ftp/index.js +1 -0
- package/dist/storage/gcs/index.d.ts +195 -5
- package/dist/storage/gcs/index.js +1 -4
- package/dist/storage/google-drive/index.d.ts +148 -0
- package/dist/storage/google-drive/index.js +1 -0
- package/dist/storage/local/index.d.ts +7 -4
- package/dist/storage/local/index.js +1 -3
- package/dist/storage/memory/index.d.ts +6 -0
- package/dist/storage/memory/index.js +1 -0
- package/dist/storage/netlify-blob/index.d.ts +147 -4
- package/dist/storage/netlify-blob/index.js +1 -3
- package/dist/storage/onedrive/index.d.ts +103 -0
- package/dist/storage/onedrive/index.js +1 -0
- package/dist/storage/pocketbase/index.d.ts +172 -0
- package/dist/storage/pocketbase/index.js +1 -0
- package/dist/storage/sftp/index.d.ts +92 -0
- package/dist/storage/sftp/index.js +1 -0
- package/dist/storage/sharepoint/index.d.ts +180 -0
- package/dist/storage/sharepoint/index.js +1 -0
- package/dist/storage/supabase/index.d.ts +115 -0
- package/dist/storage/supabase/index.js +1 -0
- package/dist/storage/uploadthing/index.d.ts +95 -0
- package/dist/storage/uploadthing/index.js +1 -0
- package/dist/storage/vercel-blob/index.d.ts +189 -4
- package/dist/storage/vercel-blob/index.js +1 -3
- package/dist/transformer/audio-transformer.d.ts +127 -125
- package/dist/transformer/audio-transformer.js +1 -278
- package/dist/transformer/image-transformer.d.ts +573 -568
- package/dist/transformer/image-transformer.js +1 -1100
- package/dist/transformer/index.d.ts +62 -5
- package/dist/transformer/index.js +1 -4
- package/dist/transformer/video-transformer.d.ts +144 -142
- package/dist/transformer/video-transformer.js +1 -310
- package/package.json +202 -51
- package/dist/handler/base/base-handler-core.d.ts +0 -91
- package/dist/handler/base/base-handler-fetch.d.ts +0 -76
- package/dist/handler/base/base-handler-node.d.ts +0 -137
- package/dist/handler/multipart/multipart-base.d.ts +0 -84
- package/dist/handler/multipart/multipart-fetch.d.ts +0 -64
- package/dist/handler/multipart/multipart.d.ts +0 -49
- package/dist/handler/rest/rest-base.d.ts +0 -106
- package/dist/handler/rest/rest-fetch.d.ts +0 -88
- package/dist/handler/rest/rest.d.ts +0 -93
- package/dist/handler/tus/tus-base.d.ts +0 -152
- package/dist/handler/tus/tus-fetch.d.ts +0 -72
- package/dist/handler/tus/tus.d.ts +0 -78
- package/dist/handler/types.d.ts +0 -53
- package/dist/handler/utils/request-parser.d.ts +0 -72
- package/dist/handler/utils/response-builder.d.ts +0 -83
- package/dist/handler/utils/storage-utils.d.ts +0 -10
- package/dist/handler/utils/stream-utils.d.ts +0 -29
- package/dist/handler/utils/upload-handlers.d.ts +0 -76
- package/dist/metrics/index.d.ts +0 -2
- package/dist/metrics/no-op-metrics.d.ts +0 -15
- package/dist/metrics/opentelemetry-metrics.d.ts +0 -55
- package/dist/openapi/rest.d.ts +0 -7
- package/dist/openapi/shared.d.ts +0 -13
- package/dist/openapi/transform.d.ts +0 -3
- package/dist/openapi/tus.d.ts +0 -7
- package/dist/openapi/xhr.d.ts +0 -7
- package/dist/packem_shared/AwsLightFile-tTneXZgG.js +0 -11
- package/dist/packem_shared/AwsLightMetaStorage-BWSOtVaN.js +0 -4
- package/dist/packem_shared/AwsLightStorage-Blv-GP4v.js +0 -133
- package/dist/packem_shared/AzureFile-CesgFzps.js +0 -8
- package/dist/packem_shared/AzureSMetaStorage-CFs-OYJT.js +0 -88
- package/dist/packem_shared/AzureStorage-B0v048hG.js +0 -357
- package/dist/packem_shared/BaseTransformer-C2gLib6v.js +0 -82
- package/dist/packem_shared/DiskStorage-Ck5yGQsq.js +0 -12
- package/dist/packem_shared/DiskStorageWithChecksum-BRl-V5x2.js +0 -238
- package/dist/packem_shared/ERRORS-D0apMqnc.js +0 -97
- package/dist/packem_shared/File-Bb3P23dr.js +0 -69
- package/dist/packem_shared/GCSConfig-vPP22kN6.js +0 -11
- package/dist/packem_shared/GCSFile-BIEunhAN.js +0 -8
- package/dist/packem_shared/GCSMetaStorage-CHZKMe7N.js +0 -7
- package/dist/packem_shared/GCStorage-C-gAuP0j.js +0 -406
- package/dist/packem_shared/LocalMetaStorage-CZHhKkMd.js +0 -7
- package/dist/packem_shared/MediaTransformer-D6658DL1.js +0 -1197
- package/dist/packem_shared/MetaStorage-pECeFOad.js +0 -46
- package/dist/packem_shared/Metadata-DRLXeJ0F.js +0 -89
- package/dist/packem_shared/Multipart-CRV21AUU.js +0 -128
- package/dist/packem_shared/Multipart-D2ryPMjD.js +0 -163
- package/dist/packem_shared/NetlifyBlobFile-CXzyjqrD.js +0 -14
- package/dist/packem_shared/NetlifyBlobMetaStorage-DxZ5aDvD.js +0 -9
- package/dist/packem_shared/NetlifyBlobStorage-CLPtjHqd.js +0 -376
- package/dist/packem_shared/NoOpMetrics-DhAk5rXc.js +0 -10
- package/dist/packem_shared/OpenTelemetryMetrics-BnxhqIaH.js +0 -67
- package/dist/packem_shared/Rest-DcxBMBjU.js +0 -228
- package/dist/packem_shared/Rest-DjwU3puo.js +0 -267
- package/dist/packem_shared/S3File-DZiyk9Qt.js +0 -11
- package/dist/packem_shared/S3MetaStorage-Dz9aDabA.js +0 -76
- package/dist/packem_shared/S3Storage-DHmTk-hU.js +0 -316
- package/dist/packem_shared/TUS_RESUMABLE-Dtfsffnj.js +0 -434
- package/dist/packem_shared/Tus-DFVlZHaX.js +0 -200
- package/dist/packem_shared/Tus-DaN0FmOy.js +0 -195
- package/dist/packem_shared/ValidationError-BfF1aE4h.js +0 -26
- package/dist/packem_shared/VercelBlobFile-BCg4aTEq.js +0 -18
- package/dist/packem_shared/VercelBlobMetaStorage-Bd9F-VFm.js +0 -9
- package/dist/packem_shared/VercelBlobStorage-DD9LMOS6.js +0 -261
- package/dist/packem_shared/_commonjsHelpers-BqLXS_qQ.js +0 -5
- package/dist/packem_shared/aws-light-meta-storage-DKJBgbR6.js +0 -446
- package/dist/packem_shared/backblaze-BlMnIcBC.js +0 -20
- package/dist/packem_shared/base-handler-core-BoAqTyz7.js +0 -303
- package/dist/packem_shared/base-handler-fetch-D4u2xits.js +0 -291
- package/dist/packem_shared/base-handler-node-DGzcHHAy.js +0 -730
- package/dist/packem_shared/cache-B88MXQ_2.js +0 -18
- package/dist/packem_shared/cloudflare-Bi1q8wXE.js +0 -21
- package/dist/packem_shared/defaultCloudStorageFileNameValidation-DUuacjWv.js +0 -11
- package/dist/packem_shared/digitalOcean-CWQRJM3L.js +0 -21
- package/dist/packem_shared/disk-storage-CD47QI30.js +0 -810
- package/dist/packem_shared/gcs-meta-storage-CJ8Uts_d.js +0 -158
- package/dist/packem_shared/has-content-CY66ehMK.js +0 -3
- package/dist/packem_shared/headers-YLRp1dLo.js +0 -1318
- package/dist/packem_shared/is-expired-CTThU1q5.js +0 -8
- package/dist/packem_shared/isRetryableError-Dycp7127.js +0 -82
- package/dist/packem_shared/isValidMediaType-BeDgiObq.js +0 -35
- package/dist/packem_shared/local-meta-storage-By-3SNBI.js +0 -649
- package/dist/packem_shared/minio-C2YBZQOw.js +0 -22
- package/dist/packem_shared/multipart-base-C994naBi.js +0 -102
- package/dist/packem_shared/part-match-BMNqHDYD.js +0 -96
- package/dist/packem_shared/path-CR6YkPXX-7R1-9CMk.js +0 -161
- package/dist/packem_shared/response-builder-BtnRiBUI.js +0 -45
- package/dist/packem_shared/rest-base-D9URIFkc.js +0 -457
- package/dist/packem_shared/restOpenApiSpec-D1JC_Jto.js +0 -800
- package/dist/packem_shared/s3-base-storage-C1DIHTYY.js +0 -510
- package/dist/packem_shared/sharedGet-Cpo7QUyu.js +0 -1019
- package/dist/packem_shared/storage-C6NSXb8h.js +0 -1175
- package/dist/packem_shared/tigris-Hac8TKnX.js +0 -21
- package/dist/packem_shared/transformOpenApiSpec-DWM5WtnN.js +0 -975
- package/dist/packem_shared/tusOpenApiSpec-mBZkl7he.js +0 -740
- package/dist/packem_shared/update-size-CCGm6i1J.js +0 -8
- package/dist/packem_shared/validator-BeX_lJet.js +0 -78
- package/dist/packem_shared/waitForStorage-Cscw85sx.js +0 -18
- package/dist/packem_shared/wasabi-DIyflHSd.js +0 -21
- package/dist/packem_shared/xhrOpenApiSpec-B1V5Dxrj.js +0 -264
- package/dist/storage/aws/clients/backblaze.d.ts +0 -12
- package/dist/storage/aws/clients/cloudflare.d.ts +0 -13
- package/dist/storage/aws/clients/digital-ocean.d.ts +0 -12
- package/dist/storage/aws/clients/minio.d.ts +0 -13
- package/dist/storage/aws/clients/tigris.d.ts +0 -12
- package/dist/storage/aws/clients/types.d.ts +0 -95
- package/dist/storage/aws/clients/wasabi.d.ts +0 -12
- package/dist/storage/aws/s3-base-storage.d.ts +0 -248
- package/dist/storage/aws/s3-client-adapter.d.ts +0 -110
- package/dist/storage/aws/s3-file.d.ts +0 -10
- package/dist/storage/aws/s3-meta-storage.d.ts +0 -15
- package/dist/storage/aws/s3-storage.d.ts +0 -70
- package/dist/storage/aws/types.d.ts +0 -119
- package/dist/storage/aws-light/aws-light-api-adapter.d.ts +0 -130
- package/dist/storage/aws-light/aws-light-file.d.ts +0 -10
- package/dist/storage/aws-light/aws-light-meta-storage.d.ts +0 -19
- package/dist/storage/aws-light/aws-light-storage.d.ts +0 -65
- package/dist/storage/aws-light/types.d.ts +0 -37
- package/dist/storage/azure/azure-file.d.ts +0 -6
- package/dist/storage/azure/azure-meta-storage.d.ts +0 -15
- package/dist/storage/azure/azure-storage.d.ts +0 -69
- package/dist/storage/azure/types.d.ts +0 -62
- package/dist/storage/gcs/fetch-error.d.ts +0 -11
- package/dist/storage/gcs/gcs-config.d.ts +0 -2
- package/dist/storage/gcs/gcs-file.d.ts +0 -6
- package/dist/storage/gcs/gcs-meta-storage.d.ts +0 -27
- package/dist/storage/gcs/gcs-storage.d.ts +0 -91
- package/dist/storage/gcs/types.d.ts +0 -55
- package/dist/storage/gcs/utils.d.ts +0 -7
- package/dist/storage/local/disk-storage-with-checksum.d.ts +0 -15
- package/dist/storage/local/disk-storage.d.ts +0 -135
- package/dist/storage/local/local-meta-storage.d.ts +0 -32
- package/dist/storage/meta-storage.d.ts +0 -30
- package/dist/storage/netlify-blob/netlify-blob-file.d.ts +0 -12
- package/dist/storage/netlify-blob/netlify-blob-meta-storage.d.ts +0 -7
- package/dist/storage/netlify-blob/netlify-blob-storage.d.ts +0 -93
- package/dist/storage/netlify-blob/types.d.ts +0 -30
- package/dist/storage/storage.d.ts +0 -353
- package/dist/storage/types.d.ts +0 -221
- package/dist/storage/utils/file/file.d.ts +0 -25
- package/dist/storage/utils/file/get-file-status.d.ts +0 -9
- package/dist/storage/utils/file/has-content.d.ts +0 -9
- package/dist/storage/utils/file/index.d.ts +0 -10
- package/dist/storage/utils/file/is-expired.d.ts +0 -8
- package/dist/storage/utils/file/metadata.d.ts +0 -18
- package/dist/storage/utils/file/part-match.d.ts +0 -11
- package/dist/storage/utils/file/types.d.ts +0 -37
- package/dist/storage/utils/file/update-metadata.d.ts +0 -10
- package/dist/storage/utils/file/update-size.d.ts +0 -10
- package/dist/storage/vercel-blob/types.d.ts +0 -32
- package/dist/storage/vercel-blob/vercel-blob-file.d.ts +0 -16
- package/dist/storage/vercel-blob/vercel-blob-meta-storage.d.ts +0 -7
- package/dist/storage/vercel-blob/vercel-blob-storage.d.ts +0 -76
- package/dist/transformer/base-transformer.d.ts +0 -63
- package/dist/transformer/media-transformer.d.ts +0 -332
- package/dist/transformer/types.d.ts +0 -652
- package/dist/transformer/utils.d.ts +0 -33
- package/dist/transformer/validation-error.d.ts +0 -23
- package/dist/utils/cache.d.ts +0 -32
- package/dist/utils/chunked-upload.d.ts +0 -65
- package/dist/utils/detect-file-type.d.ts +0 -28
- package/dist/utils/errors.d.ts +0 -74
- package/dist/utils/file-path-url-matcher.d.ts +0 -18
- package/dist/utils/headers.d.ts +0 -111
- package/dist/utils/http.d.ts +0 -92
- package/dist/utils/locker.d.ts +0 -26
- package/dist/utils/pipes/stream-checksum.d.ts +0 -47
- package/dist/utils/pipes/stream-length.d.ts +0 -22
- package/dist/utils/primitives/get-last-one.d.ts +0 -3
- package/dist/utils/primitives/is-record.d.ts +0 -2
- package/dist/utils/primitives/map-values.d.ts +0 -9
- package/dist/utils/primitives/pick.d.ts +0 -2
- package/dist/utils/primitives/to-milliseconds.d.ts +0 -12
- package/dist/utils/primitives/to-seconds.d.ts +0 -12
- package/dist/utils/range-checksum.d.ts +0 -33
- package/dist/utils/range-hasher.d.ts +0 -46
- package/dist/utils/retry.d.ts +0 -64
- package/dist/utils/types.d.ts +0 -108
- package/dist/utils/validation-error.d.ts +0 -22
- package/dist/utils/validator.d.ts +0 -36
|
@@ -1,975 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto';
|
|
2
|
-
import { createPaginationMetaSchemaObject, createPaginationSchemaObject } from '@visulima/pagination';
|
|
3
|
-
import { sharedFileMetaSchemaObject, sharedErrorSchemaObject, sharedFileMetaExampleObject } from './sharedGet-Cpo7QUyu.js';
|
|
4
|
-
|
|
5
|
-
const swaggerSpec = (path = "/", tags = ["Transform"]) => {
|
|
6
|
-
const pathHash = createHash("sha256").update(path).digest("base64");
|
|
7
|
-
return {
|
|
8
|
-
components: {
|
|
9
|
-
examples: sharedFileMetaExampleObject,
|
|
10
|
-
parameters: {
|
|
11
|
-
Affine: {
|
|
12
|
-
description: "Apply affine transformation",
|
|
13
|
-
in: "query",
|
|
14
|
-
name: "affine",
|
|
15
|
-
schema: {
|
|
16
|
-
type: "boolean"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
Angle: {
|
|
20
|
-
description: "Rotation angle in degrees. Note: angles other than 90°, 180°, and 270° require interpolation and may affect quality",
|
|
21
|
-
in: "query",
|
|
22
|
-
name: "angle",
|
|
23
|
-
schema: {
|
|
24
|
-
type: "number"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
Background: {
|
|
28
|
-
description: "Background color for rotation (hex, rgb, or color name)",
|
|
29
|
-
in: "query",
|
|
30
|
-
name: "background",
|
|
31
|
-
schema: {
|
|
32
|
-
type: "string"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
Bitrate: {
|
|
36
|
-
description: "Target bitrate in bits per second",
|
|
37
|
-
in: "query",
|
|
38
|
-
name: "bitrate",
|
|
39
|
-
schema: {
|
|
40
|
-
minimum: 1,
|
|
41
|
-
type: "integer"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
Blur: {
|
|
45
|
-
description: "Apply blur effect",
|
|
46
|
-
in: "query",
|
|
47
|
-
name: "blur",
|
|
48
|
-
schema: {
|
|
49
|
-
type: "boolean"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
Brightness: {
|
|
53
|
-
description: "Brightness multiplier for modulation",
|
|
54
|
-
in: "query",
|
|
55
|
-
name: "brightness",
|
|
56
|
-
schema: {
|
|
57
|
-
type: "number"
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
Clahe: {
|
|
61
|
-
description: "Apply CLAHE (Contrast Limited Adaptive Histogram Equalization)",
|
|
62
|
-
in: "query",
|
|
63
|
-
name: "clahe",
|
|
64
|
-
schema: {
|
|
65
|
-
type: "boolean"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
// Video/Audio parameters
|
|
69
|
-
Codec: {
|
|
70
|
-
description: "Video or audio codec",
|
|
71
|
-
in: "query",
|
|
72
|
-
name: "codec",
|
|
73
|
-
schema: {
|
|
74
|
-
enum: ["avc", "hevc", "vp8", "vp9", "av1", "aac", "opus", "mp3", "vorbis", "flac"],
|
|
75
|
-
type: "string"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
Colourspace: {
|
|
79
|
-
description: "Convert colourspace",
|
|
80
|
-
in: "query",
|
|
81
|
-
name: "colourspace",
|
|
82
|
-
schema: {
|
|
83
|
-
enum: ["srgb", "rgb", "cmyk", "lab", "b-w"],
|
|
84
|
-
type: "string"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
CropHeight: {
|
|
88
|
-
description: "Crop area height",
|
|
89
|
-
in: "query",
|
|
90
|
-
name: "cropHeight",
|
|
91
|
-
schema: {
|
|
92
|
-
minimum: 1,
|
|
93
|
-
type: "integer"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
CropWidth: {
|
|
97
|
-
description: "Crop area width",
|
|
98
|
-
in: "query",
|
|
99
|
-
name: "cropWidth",
|
|
100
|
-
schema: {
|
|
101
|
-
minimum: 1,
|
|
102
|
-
type: "integer"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
Dilate: {
|
|
106
|
-
description: "Apply dilation",
|
|
107
|
-
in: "query",
|
|
108
|
-
name: "dilate",
|
|
109
|
-
schema: {
|
|
110
|
-
type: "boolean"
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
EnsureAlpha: {
|
|
114
|
-
description: "Ensure alpha channel",
|
|
115
|
-
in: "query",
|
|
116
|
-
name: "ensureAlpha",
|
|
117
|
-
schema: {
|
|
118
|
-
type: "boolean"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
Erode: {
|
|
122
|
-
description: "Apply erosion",
|
|
123
|
-
in: "query",
|
|
124
|
-
name: "erode",
|
|
125
|
-
schema: {
|
|
126
|
-
type: "boolean"
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
FastShrinkOnLoad: {
|
|
130
|
-
description: "Fast shrink on load for large images",
|
|
131
|
-
in: "query",
|
|
132
|
-
name: "fastShrinkOnLoad",
|
|
133
|
-
schema: {
|
|
134
|
-
type: "boolean"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
FileID: {
|
|
138
|
-
description: "File identifier",
|
|
139
|
-
in: "path",
|
|
140
|
-
name: "id",
|
|
141
|
-
required: true,
|
|
142
|
-
schema: {
|
|
143
|
-
type: "string"
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
Fit: {
|
|
147
|
-
description: "Resize fit mode",
|
|
148
|
-
in: "query",
|
|
149
|
-
name: "fit",
|
|
150
|
-
schema: {
|
|
151
|
-
enum: ["cover", "contain", "fill", "inside", "outside"],
|
|
152
|
-
type: "string"
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
Flatten: {
|
|
156
|
-
description: "Flatten alpha channel",
|
|
157
|
-
in: "query",
|
|
158
|
-
name: "flatten",
|
|
159
|
-
schema: {
|
|
160
|
-
type: "boolean"
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
Flip: {
|
|
164
|
-
description: "Flip image vertically",
|
|
165
|
-
in: "query",
|
|
166
|
-
name: "flip",
|
|
167
|
-
schema: {
|
|
168
|
-
type: "boolean"
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
Flop: {
|
|
172
|
-
description: "Flop image horizontally",
|
|
173
|
-
in: "query",
|
|
174
|
-
name: "flop",
|
|
175
|
-
schema: {
|
|
176
|
-
type: "boolean"
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
// Common transformation parameters
|
|
180
|
-
Format: {
|
|
181
|
-
description: "Output format for the transformed media",
|
|
182
|
-
in: "query",
|
|
183
|
-
name: "format",
|
|
184
|
-
schema: {
|
|
185
|
-
enum: ["jpeg", "png", "webp", "avif", "tiff", "gif", "mp4", "webm", "mkv", "ogg", "mp3", "wav", "aac", "flac"],
|
|
186
|
-
type: "string"
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
FrameRate: {
|
|
190
|
-
description: "Video frame rate in Hz",
|
|
191
|
-
in: "query",
|
|
192
|
-
name: "frameRate",
|
|
193
|
-
schema: {
|
|
194
|
-
minimum: 1,
|
|
195
|
-
type: "number"
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
Gamma: {
|
|
199
|
-
description: "Apply gamma correction",
|
|
200
|
-
in: "query",
|
|
201
|
-
name: "gamma",
|
|
202
|
-
schema: {
|
|
203
|
-
type: "boolean"
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
Greyscale: {
|
|
207
|
-
description: "Convert to greyscale",
|
|
208
|
-
in: "query",
|
|
209
|
-
name: "greyscale",
|
|
210
|
-
schema: {
|
|
211
|
-
type: "boolean"
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
Height: {
|
|
215
|
-
description: "Desired height in pixels",
|
|
216
|
-
in: "query",
|
|
217
|
-
name: "height",
|
|
218
|
-
schema: {
|
|
219
|
-
minimum: 1,
|
|
220
|
-
type: "integer"
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
Hue: {
|
|
224
|
-
description: "Hue rotation in degrees for modulation",
|
|
225
|
-
in: "query",
|
|
226
|
-
name: "hue",
|
|
227
|
-
schema: {
|
|
228
|
-
type: "integer"
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
Kernel: {
|
|
232
|
-
description: "Resize kernel algorithm",
|
|
233
|
-
in: "query",
|
|
234
|
-
name: "kernel",
|
|
235
|
-
schema: {
|
|
236
|
-
enum: ["nearest", "cubic", "mitchell", "lanczos2", "lanczos3"],
|
|
237
|
-
type: "string"
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
KeyFrameInterval: {
|
|
241
|
-
description: "Video key frame interval in seconds",
|
|
242
|
-
in: "query",
|
|
243
|
-
name: "keyFrameInterval",
|
|
244
|
-
schema: {
|
|
245
|
-
minimum: 0.1,
|
|
246
|
-
type: "number"
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
// Crop parameters
|
|
250
|
-
Left: {
|
|
251
|
-
description: "Crop area left offset",
|
|
252
|
-
in: "query",
|
|
253
|
-
name: "left",
|
|
254
|
-
schema: {
|
|
255
|
-
minimum: 0,
|
|
256
|
-
type: "integer"
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
Lightness: {
|
|
260
|
-
description: "Lightness adjustment for modulation",
|
|
261
|
-
in: "query",
|
|
262
|
-
name: "lightness",
|
|
263
|
-
schema: {
|
|
264
|
-
type: "integer"
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
Median: {
|
|
268
|
-
description: "Apply median filter with specified size",
|
|
269
|
-
in: "query",
|
|
270
|
-
name: "median",
|
|
271
|
-
schema: {
|
|
272
|
-
minimum: 1,
|
|
273
|
-
type: "integer"
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
Modulate: {
|
|
277
|
-
description: "Apply modulation effects",
|
|
278
|
-
in: "query",
|
|
279
|
-
name: "modulate",
|
|
280
|
-
schema: {
|
|
281
|
-
type: "boolean"
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
Negate: {
|
|
285
|
-
description: "Negate (invert) the image",
|
|
286
|
-
in: "query",
|
|
287
|
-
name: "negate",
|
|
288
|
-
schema: {
|
|
289
|
-
type: "boolean"
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
Normalise: {
|
|
293
|
-
description: "Normalise the image",
|
|
294
|
-
in: "query",
|
|
295
|
-
name: "normalise",
|
|
296
|
-
schema: {
|
|
297
|
-
type: "boolean"
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
NumberOfChannels: {
|
|
301
|
-
description: "Audio channel count",
|
|
302
|
-
in: "query",
|
|
303
|
-
name: "numberOfChannels",
|
|
304
|
-
schema: {
|
|
305
|
-
enum: [1, 2, 3, 4, 5, 6, 7, 8],
|
|
306
|
-
type: "integer"
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
PipelineColourspace: {
|
|
310
|
-
description: "Set pipeline colourspace",
|
|
311
|
-
in: "query",
|
|
312
|
-
name: "pipelineColourspace",
|
|
313
|
-
schema: {
|
|
314
|
-
type: "boolean"
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
Position: {
|
|
318
|
-
description: "Position for cover/contain fits",
|
|
319
|
-
in: "query",
|
|
320
|
-
name: "position",
|
|
321
|
-
schema: {
|
|
322
|
-
oneOf: [
|
|
323
|
-
{
|
|
324
|
-
enum: ["top", "right", "bottom", "left", "center"],
|
|
325
|
-
type: "string"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
minimum: 0,
|
|
329
|
-
type: "integer"
|
|
330
|
-
}
|
|
331
|
-
]
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
Quality: {
|
|
335
|
-
description: "Quality setting (0-100 for images, affects compression)",
|
|
336
|
-
in: "query",
|
|
337
|
-
name: "quality",
|
|
338
|
-
schema: {
|
|
339
|
-
maximum: 100,
|
|
340
|
-
minimum: 1,
|
|
341
|
-
type: "integer"
|
|
342
|
-
}
|
|
343
|
-
},
|
|
344
|
-
RemoveAlpha: {
|
|
345
|
-
description: "Remove alpha channel",
|
|
346
|
-
in: "query",
|
|
347
|
-
name: "removeAlpha",
|
|
348
|
-
schema: {
|
|
349
|
-
type: "boolean"
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
SampleRate: {
|
|
353
|
-
description: "Audio sample rate in Hz",
|
|
354
|
-
in: "query",
|
|
355
|
-
name: "sampleRate",
|
|
356
|
-
schema: {
|
|
357
|
-
enum: [8e3, 11025, 16e3, 22050, 32e3, 44100, 48e3, 88200, 96e3, 192e3],
|
|
358
|
-
type: "integer"
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
Saturation: {
|
|
362
|
-
description: "Saturation multiplier for modulation",
|
|
363
|
-
in: "query",
|
|
364
|
-
name: "saturation",
|
|
365
|
-
schema: {
|
|
366
|
-
type: "number"
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
Sharpen: {
|
|
370
|
-
description: "Apply sharpening",
|
|
371
|
-
in: "query",
|
|
372
|
-
name: "sharpen",
|
|
373
|
-
schema: {
|
|
374
|
-
type: "boolean"
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
Threshold: {
|
|
378
|
-
description: "Apply thresholding with specified value (0-255)",
|
|
379
|
-
in: "query",
|
|
380
|
-
name: "threshold",
|
|
381
|
-
schema: {
|
|
382
|
-
maximum: 255,
|
|
383
|
-
minimum: 0,
|
|
384
|
-
type: "integer"
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
Tint: {
|
|
388
|
-
description: "Apply tinting",
|
|
389
|
-
in: "query",
|
|
390
|
-
name: "tint",
|
|
391
|
-
schema: {
|
|
392
|
-
type: "boolean"
|
|
393
|
-
}
|
|
394
|
-
},
|
|
395
|
-
ToColourspace: {
|
|
396
|
-
description: "Convert to colourspace",
|
|
397
|
-
in: "query",
|
|
398
|
-
name: "toColourspace",
|
|
399
|
-
schema: {
|
|
400
|
-
type: "boolean"
|
|
401
|
-
}
|
|
402
|
-
},
|
|
403
|
-
Top: {
|
|
404
|
-
description: "Crop area top offset",
|
|
405
|
-
in: "query",
|
|
406
|
-
name: "top",
|
|
407
|
-
schema: {
|
|
408
|
-
minimum: 0,
|
|
409
|
-
type: "integer"
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
Unflatten: {
|
|
413
|
-
description: "Unflatten alpha channel",
|
|
414
|
-
in: "query",
|
|
415
|
-
name: "unflatten",
|
|
416
|
-
schema: {
|
|
417
|
-
type: "boolean"
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
// Image transformation parameters
|
|
421
|
-
Width: {
|
|
422
|
-
description: "Desired width in pixels",
|
|
423
|
-
in: "query",
|
|
424
|
-
name: "width",
|
|
425
|
-
schema: {
|
|
426
|
-
minimum: 1,
|
|
427
|
-
type: "integer"
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
WithoutEnlargement: {
|
|
431
|
-
description: "Avoid enlarging images smaller than specified dimensions",
|
|
432
|
-
in: "query",
|
|
433
|
-
name: "withoutEnlargement",
|
|
434
|
-
schema: {
|
|
435
|
-
type: "boolean"
|
|
436
|
-
}
|
|
437
|
-
},
|
|
438
|
-
WithoutReduction: {
|
|
439
|
-
description: "Avoid reducing images larger than specified dimensions",
|
|
440
|
-
in: "query",
|
|
441
|
-
name: "withoutReduction",
|
|
442
|
-
schema: {
|
|
443
|
-
type: "boolean"
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
},
|
|
447
|
-
responses: {
|
|
448
|
-
404: {
|
|
449
|
-
content: {
|
|
450
|
-
"application/json": {
|
|
451
|
-
schema: {
|
|
452
|
-
$ref: "#/components/schemas/Error"
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
},
|
|
456
|
-
description: "Not Found"
|
|
457
|
-
}
|
|
458
|
-
},
|
|
459
|
-
schemas: {
|
|
460
|
-
...createPaginationSchemaObject(
|
|
461
|
-
"FileMetaPagination",
|
|
462
|
-
{
|
|
463
|
-
$ref: "#/components/schemas/PaginationMeta"
|
|
464
|
-
},
|
|
465
|
-
"#/components/schemas/PaginationMeta"
|
|
466
|
-
),
|
|
467
|
-
...createPaginationMetaSchemaObject("PaginationMeta"),
|
|
468
|
-
...sharedErrorSchemaObject,
|
|
469
|
-
...sharedFileMetaSchemaObject,
|
|
470
|
-
// Media transformation result
|
|
471
|
-
MediaTransformResult: {
|
|
472
|
-
description: "Result of media transformation",
|
|
473
|
-
properties: {
|
|
474
|
-
bitrate: {
|
|
475
|
-
description: "Bitrate for video/audio (bits per second)",
|
|
476
|
-
type: "integer"
|
|
477
|
-
},
|
|
478
|
-
buffer: {
|
|
479
|
-
description: "Binary data buffer (not included in JSON response)",
|
|
480
|
-
type: "string"
|
|
481
|
-
},
|
|
482
|
-
duration: {
|
|
483
|
-
description: "Duration for video/audio in seconds",
|
|
484
|
-
type: "number"
|
|
485
|
-
},
|
|
486
|
-
format: {
|
|
487
|
-
description: "Output format",
|
|
488
|
-
type: "string"
|
|
489
|
-
},
|
|
490
|
-
height: {
|
|
491
|
-
description: "Height for image/video in pixels",
|
|
492
|
-
type: "integer"
|
|
493
|
-
},
|
|
494
|
-
mediaType: {
|
|
495
|
-
description: "Type of media",
|
|
496
|
-
enum: ["image", "video", "audio"],
|
|
497
|
-
type: "string"
|
|
498
|
-
},
|
|
499
|
-
numberOfChannels: {
|
|
500
|
-
description: "Audio channel count",
|
|
501
|
-
type: "integer"
|
|
502
|
-
},
|
|
503
|
-
originalFile: {
|
|
504
|
-
$ref: "#/components/schemas/FileMeta"
|
|
505
|
-
},
|
|
506
|
-
sampleRate: {
|
|
507
|
-
description: "Audio sample rate in Hz",
|
|
508
|
-
type: "integer"
|
|
509
|
-
},
|
|
510
|
-
size: {
|
|
511
|
-
description: "File size in bytes",
|
|
512
|
-
type: "integer"
|
|
513
|
-
},
|
|
514
|
-
width: {
|
|
515
|
-
description: "Width for image/video in pixels",
|
|
516
|
-
type: "integer"
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
required: ["format", "mediaType", "originalFile", "size"],
|
|
520
|
-
type: "object"
|
|
521
|
-
},
|
|
522
|
-
// Validation error schema
|
|
523
|
-
ValidationError: {
|
|
524
|
-
description: "Validation error response",
|
|
525
|
-
properties: {
|
|
526
|
-
code: {
|
|
527
|
-
enum: [
|
|
528
|
-
"INVALID_PARAMS_FOR_IMAGE",
|
|
529
|
-
"INVALID_PARAMS_FOR_VIDEO",
|
|
530
|
-
"INVALID_PARAMS_FOR_AUDIO",
|
|
531
|
-
"INVALID_FIT_VALUE",
|
|
532
|
-
"INVALID_ANGLE_VALUE",
|
|
533
|
-
"INVALID_FORMAT",
|
|
534
|
-
"INCOMPLETE_CROP_PARAMS",
|
|
535
|
-
"INVALID_VIDEO_CODEC",
|
|
536
|
-
"INVALID_VIDEO_FORMAT",
|
|
537
|
-
"INVALID_WIDTH",
|
|
538
|
-
"INVALID_HEIGHT",
|
|
539
|
-
"INVALID_BITRATE",
|
|
540
|
-
"INVALID_FRAME_RATE",
|
|
541
|
-
"INVALID_KEY_FRAME_INTERVAL",
|
|
542
|
-
"INVALID_AUDIO_CODEC",
|
|
543
|
-
"INVALID_AUDIO_FORMAT",
|
|
544
|
-
"INVALID_CHANNEL_COUNT",
|
|
545
|
-
"INVALID_SAMPLE_RATE"
|
|
546
|
-
],
|
|
547
|
-
type: "string"
|
|
548
|
-
},
|
|
549
|
-
details: {
|
|
550
|
-
properties: {
|
|
551
|
-
invalidParams: {
|
|
552
|
-
items: {
|
|
553
|
-
type: "string"
|
|
554
|
-
},
|
|
555
|
-
type: "array"
|
|
556
|
-
},
|
|
557
|
-
mediaType: {
|
|
558
|
-
enum: ["image", "video", "audio"],
|
|
559
|
-
type: "string"
|
|
560
|
-
},
|
|
561
|
-
suggestions: {
|
|
562
|
-
items: {
|
|
563
|
-
type: "string"
|
|
564
|
-
},
|
|
565
|
-
type: "array"
|
|
566
|
-
},
|
|
567
|
-
validParams: {
|
|
568
|
-
items: {
|
|
569
|
-
type: "string"
|
|
570
|
-
},
|
|
571
|
-
type: "array"
|
|
572
|
-
}
|
|
573
|
-
},
|
|
574
|
-
required: ["invalidParams", "validParams", "mediaType"],
|
|
575
|
-
type: "object"
|
|
576
|
-
},
|
|
577
|
-
message: {
|
|
578
|
-
type: "string"
|
|
579
|
-
},
|
|
580
|
-
name: {
|
|
581
|
-
enum: ["ValidationError"],
|
|
582
|
-
type: "string"
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
|
-
required: ["code", "details", "message", "name"],
|
|
586
|
-
type: "object"
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
paths: {
|
|
591
|
-
[`${path.replace(/\/$/, "")}/{id}/transform`]: {
|
|
592
|
-
get: {
|
|
593
|
-
description: "Get transformation metadata for a file without downloading. Returns information about supported transformations and current file properties.",
|
|
594
|
-
operationId: `${pathHash}TransformGetMetadata`,
|
|
595
|
-
parameters: [
|
|
596
|
-
{
|
|
597
|
-
$ref: "#/components/parameters/FileID"
|
|
598
|
-
}
|
|
599
|
-
],
|
|
600
|
-
responses: {
|
|
601
|
-
200: {
|
|
602
|
-
content: {
|
|
603
|
-
"application/json": {
|
|
604
|
-
schema: {
|
|
605
|
-
description: "File transformation metadata",
|
|
606
|
-
properties: {
|
|
607
|
-
bitrate: {
|
|
608
|
-
description: "Current bitrate for video/audio",
|
|
609
|
-
type: "integer"
|
|
610
|
-
},
|
|
611
|
-
dimensions: {
|
|
612
|
-
description: "Dimensions for image/video",
|
|
613
|
-
properties: {
|
|
614
|
-
height: {
|
|
615
|
-
type: "integer"
|
|
616
|
-
},
|
|
617
|
-
width: {
|
|
618
|
-
type: "integer"
|
|
619
|
-
}
|
|
620
|
-
},
|
|
621
|
-
type: "object"
|
|
622
|
-
},
|
|
623
|
-
duration: {
|
|
624
|
-
description: "Duration for video/audio in seconds",
|
|
625
|
-
type: "number"
|
|
626
|
-
},
|
|
627
|
-
mediaType: {
|
|
628
|
-
description: "Detected media type",
|
|
629
|
-
enum: ["image", "video", "audio"],
|
|
630
|
-
type: "string"
|
|
631
|
-
},
|
|
632
|
-
numberOfChannels: {
|
|
633
|
-
description: "Current channel count for audio",
|
|
634
|
-
type: "integer"
|
|
635
|
-
},
|
|
636
|
-
originalFormat: {
|
|
637
|
-
description: "Original file format",
|
|
638
|
-
type: "string"
|
|
639
|
-
},
|
|
640
|
-
sampleRate: {
|
|
641
|
-
description: "Current sample rate for audio",
|
|
642
|
-
type: "integer"
|
|
643
|
-
},
|
|
644
|
-
supportedFormats: {
|
|
645
|
-
description: "Supported output formats for this media type",
|
|
646
|
-
items: {
|
|
647
|
-
type: "string"
|
|
648
|
-
},
|
|
649
|
-
type: "array"
|
|
650
|
-
},
|
|
651
|
-
supportedParameters: {
|
|
652
|
-
description: "Supported transformation parameters",
|
|
653
|
-
items: {
|
|
654
|
-
type: "string"
|
|
655
|
-
},
|
|
656
|
-
type: "array"
|
|
657
|
-
}
|
|
658
|
-
},
|
|
659
|
-
required: ["mediaType", "supportedFormats", "supportedParameters"],
|
|
660
|
-
type: "object"
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
description: "Transformation metadata"
|
|
665
|
-
},
|
|
666
|
-
404: {
|
|
667
|
-
$ref: "#/components/responses/404"
|
|
668
|
-
},
|
|
669
|
-
default: {
|
|
670
|
-
content: {
|
|
671
|
-
"application/json": {
|
|
672
|
-
schema: {
|
|
673
|
-
$ref: "#/components/schemas/Error"
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
},
|
|
677
|
-
description: "Error"
|
|
678
|
-
}
|
|
679
|
-
},
|
|
680
|
-
summary: "Get transformation metadata",
|
|
681
|
-
tags
|
|
682
|
-
}
|
|
683
|
-
},
|
|
684
|
-
[`${path.replace(/\/$/, "")}/{id}`]: {
|
|
685
|
-
get: {
|
|
686
|
-
description: "Retrieve and transform a file with optional media transformations. Supports resizing, cropping, format conversion, and codec changes based on query parameters.",
|
|
687
|
-
operationId: `${pathHash}TransformGetFile`,
|
|
688
|
-
parameters: [
|
|
689
|
-
{
|
|
690
|
-
$ref: "#/components/parameters/FileID"
|
|
691
|
-
},
|
|
692
|
-
// Common parameters
|
|
693
|
-
{
|
|
694
|
-
$ref: "#/components/parameters/Format"
|
|
695
|
-
},
|
|
696
|
-
{
|
|
697
|
-
$ref: "#/components/parameters/Quality"
|
|
698
|
-
},
|
|
699
|
-
// Image/Video parameters
|
|
700
|
-
{
|
|
701
|
-
$ref: "#/components/parameters/Width"
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
$ref: "#/components/parameters/Height"
|
|
705
|
-
},
|
|
706
|
-
{
|
|
707
|
-
$ref: "#/components/parameters/Fit"
|
|
708
|
-
},
|
|
709
|
-
{
|
|
710
|
-
$ref: "#/components/parameters/Position"
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
$ref: "#/components/parameters/WithoutEnlargement"
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
$ref: "#/components/parameters/WithoutReduction"
|
|
717
|
-
},
|
|
718
|
-
// Crop parameters
|
|
719
|
-
{
|
|
720
|
-
$ref: "#/components/parameters/Left"
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
$ref: "#/components/parameters/Top"
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
$ref: "#/components/parameters/CropWidth"
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
$ref: "#/components/parameters/CropHeight"
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
$ref: "#/components/parameters/Angle"
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
$ref: "#/components/parameters/Background"
|
|
736
|
-
},
|
|
737
|
-
// Resize parameters
|
|
738
|
-
{
|
|
739
|
-
$ref: "#/components/parameters/Kernel"
|
|
740
|
-
},
|
|
741
|
-
{
|
|
742
|
-
$ref: "#/components/parameters/FastShrinkOnLoad"
|
|
743
|
-
},
|
|
744
|
-
// Image operations
|
|
745
|
-
{
|
|
746
|
-
$ref: "#/components/parameters/Blur"
|
|
747
|
-
},
|
|
748
|
-
{
|
|
749
|
-
$ref: "#/components/parameters/Sharpen"
|
|
750
|
-
},
|
|
751
|
-
{
|
|
752
|
-
$ref: "#/components/parameters/Median"
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
$ref: "#/components/parameters/Clahe"
|
|
756
|
-
},
|
|
757
|
-
{
|
|
758
|
-
$ref: "#/components/parameters/Threshold"
|
|
759
|
-
},
|
|
760
|
-
{
|
|
761
|
-
$ref: "#/components/parameters/Gamma"
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
$ref: "#/components/parameters/Negate"
|
|
765
|
-
},
|
|
766
|
-
{
|
|
767
|
-
$ref: "#/components/parameters/Normalise"
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
$ref: "#/components/parameters/Flatten"
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
$ref: "#/components/parameters/Unflatten"
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
$ref: "#/components/parameters/Flip"
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
$ref: "#/components/parameters/Flop"
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
$ref: "#/components/parameters/Greyscale"
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
$ref: "#/components/parameters/Modulate"
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
$ref: "#/components/parameters/Brightness"
|
|
789
|
-
},
|
|
790
|
-
{
|
|
791
|
-
$ref: "#/components/parameters/Saturation"
|
|
792
|
-
},
|
|
793
|
-
{
|
|
794
|
-
$ref: "#/components/parameters/Hue"
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
$ref: "#/components/parameters/Lightness"
|
|
798
|
-
},
|
|
799
|
-
{
|
|
800
|
-
$ref: "#/components/parameters/Tint"
|
|
801
|
-
},
|
|
802
|
-
{
|
|
803
|
-
$ref: "#/components/parameters/Colourspace"
|
|
804
|
-
},
|
|
805
|
-
{
|
|
806
|
-
$ref: "#/components/parameters/Affine"
|
|
807
|
-
},
|
|
808
|
-
{
|
|
809
|
-
$ref: "#/components/parameters/Dilate"
|
|
810
|
-
},
|
|
811
|
-
{
|
|
812
|
-
$ref: "#/components/parameters/Erode"
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
$ref: "#/components/parameters/PipelineColourspace"
|
|
816
|
-
},
|
|
817
|
-
{
|
|
818
|
-
$ref: "#/components/parameters/ToColourspace"
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
$ref: "#/components/parameters/RemoveAlpha"
|
|
822
|
-
},
|
|
823
|
-
{
|
|
824
|
-
$ref: "#/components/parameters/EnsureAlpha"
|
|
825
|
-
},
|
|
826
|
-
// Video/Audio parameters
|
|
827
|
-
{
|
|
828
|
-
$ref: "#/components/parameters/Codec"
|
|
829
|
-
},
|
|
830
|
-
{
|
|
831
|
-
$ref: "#/components/parameters/Bitrate"
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
$ref: "#/components/parameters/FrameRate"
|
|
835
|
-
},
|
|
836
|
-
{
|
|
837
|
-
$ref: "#/components/parameters/KeyFrameInterval"
|
|
838
|
-
},
|
|
839
|
-
{
|
|
840
|
-
$ref: "#/components/parameters/NumberOfChannels"
|
|
841
|
-
},
|
|
842
|
-
{
|
|
843
|
-
$ref: "#/components/parameters/SampleRate"
|
|
844
|
-
}
|
|
845
|
-
],
|
|
846
|
-
responses: {
|
|
847
|
-
200: {
|
|
848
|
-
content: {
|
|
849
|
-
"*/*": {
|
|
850
|
-
schema: {
|
|
851
|
-
description: "Transformed media file",
|
|
852
|
-
format: "binary",
|
|
853
|
-
type: "string"
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
},
|
|
857
|
-
description: "Transformed file returned successfully",
|
|
858
|
-
headers: {
|
|
859
|
-
"Content-Type": {
|
|
860
|
-
description: "MIME type of the transformed file",
|
|
861
|
-
schema: {
|
|
862
|
-
type: "string"
|
|
863
|
-
}
|
|
864
|
-
},
|
|
865
|
-
ETag: {
|
|
866
|
-
description: "ETag of the transformed file",
|
|
867
|
-
schema: {
|
|
868
|
-
type: "string"
|
|
869
|
-
}
|
|
870
|
-
},
|
|
871
|
-
"X-Media-Type": {
|
|
872
|
-
description: "Type of media (image/video/audio)",
|
|
873
|
-
schema: {
|
|
874
|
-
enum: ["image", "video", "audio"],
|
|
875
|
-
type: "string"
|
|
876
|
-
}
|
|
877
|
-
},
|
|
878
|
-
"X-Original-Format": {
|
|
879
|
-
description: "Original file format",
|
|
880
|
-
schema: {
|
|
881
|
-
type: "string"
|
|
882
|
-
}
|
|
883
|
-
},
|
|
884
|
-
"X-Transformed-Format": {
|
|
885
|
-
description: "Transformed file format",
|
|
886
|
-
schema: {
|
|
887
|
-
type: "string"
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
},
|
|
892
|
-
400: {
|
|
893
|
-
content: {
|
|
894
|
-
"application/json": {
|
|
895
|
-
examples: {
|
|
896
|
-
ValidationError: {
|
|
897
|
-
value: {
|
|
898
|
-
error: {
|
|
899
|
-
code: "INVALID_PARAMS_FOR_IMAGE",
|
|
900
|
-
details: {
|
|
901
|
-
invalidParams: ["codec", "bitrate"],
|
|
902
|
-
mediaType: "image",
|
|
903
|
-
validParams: [
|
|
904
|
-
"format",
|
|
905
|
-
"quality",
|
|
906
|
-
"width",
|
|
907
|
-
"height",
|
|
908
|
-
"fit",
|
|
909
|
-
"position",
|
|
910
|
-
"withoutEnlargement",
|
|
911
|
-
"withoutReduction",
|
|
912
|
-
"left",
|
|
913
|
-
"top",
|
|
914
|
-
"cropWidth",
|
|
915
|
-
"cropHeight",
|
|
916
|
-
"angle",
|
|
917
|
-
"background"
|
|
918
|
-
]
|
|
919
|
-
},
|
|
920
|
-
message: "Invalid query parameters for image transformation: codec, bitrate. Images support: format, quality, width, height, fit, position, withoutEnlargement, withoutReduction, left, top, cropWidth, cropHeight, angle, background. Video/audio parameters (codec, bitrate) are not supported for images.",
|
|
921
|
-
name: "ValidationError"
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
},
|
|
926
|
-
schema: {
|
|
927
|
-
$ref: "#/components/schemas/ValidationError"
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
},
|
|
931
|
-
description: "Invalid transformation parameters"
|
|
932
|
-
},
|
|
933
|
-
404: {
|
|
934
|
-
$ref: "#/components/responses/404"
|
|
935
|
-
},
|
|
936
|
-
413: {
|
|
937
|
-
content: {
|
|
938
|
-
"application/json": {
|
|
939
|
-
schema: {
|
|
940
|
-
$ref: "#/components/schemas/Error"
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
},
|
|
944
|
-
description: "File too large for transformation"
|
|
945
|
-
},
|
|
946
|
-
415: {
|
|
947
|
-
content: {
|
|
948
|
-
"application/json": {
|
|
949
|
-
schema: {
|
|
950
|
-
$ref: "#/components/schemas/Error"
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
},
|
|
954
|
-
description: "Unsupported media type for transformation"
|
|
955
|
-
},
|
|
956
|
-
default: {
|
|
957
|
-
content: {
|
|
958
|
-
"application/json": {
|
|
959
|
-
schema: {
|
|
960
|
-
$ref: "#/components/schemas/Error"
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
},
|
|
964
|
-
description: "Error"
|
|
965
|
-
}
|
|
966
|
-
},
|
|
967
|
-
summary: "Transform and retrieve file",
|
|
968
|
-
tags
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
};
|
|
973
|
-
};
|
|
974
|
-
|
|
975
|
-
export { swaggerSpec as default };
|