@visulima/storage 1.0.0-alpha.8 → 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 +578 -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 -50
- 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-BlltBst6.js +0 -12
- package/dist/packem_shared/DiskStorageWithChecksum-BJTmMklc.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-BYhwecZl.js +0 -7
- package/dist/packem_shared/GCStorage-BmnoK7Rz.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-5Xpy7WhY.js +0 -163
- package/dist/packem_shared/Multipart-C-iU9LXj.js +0 -128
- 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-DO7OslCs.js +0 -267
- package/dist/packem_shared/Rest-DTaszQ6n.js +0 -228
- 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-BfguFdM1.js +0 -434
- package/dist/packem_shared/Tus-BQItPVAC.js +0 -200
- package/dist/packem_shared/Tus-BibjweWH.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-B85MJLTf.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-DLEVHemv.js +0 -303
- package/dist/packem_shared/base-handler-fetch-A7V0N6AJ.js +0 -291
- package/dist/packem_shared/base-handler-node-Dx7ce3sU.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-Bh2wy3YW.js +0 -810
- package/dist/packem_shared/gcs-meta-storage-DqNjM7DP.js +0 -158
- package/dist/packem_shared/has-content-CY66ehMK.js +0 -3
- package/dist/packem_shared/headers-C9DasoT1.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-BY0rhkw5.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-Bt9Np3M8.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,800 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto';
|
|
2
|
-
import { createPaginationMetaSchemaObject, createPaginationSchemaObject } from '@visulima/pagination';
|
|
3
|
-
import { sharedFileMetaSchemaObject, sharedErrorSchemaObject, sharedFileMetaExampleObject, sharedGetList, sharedGet, sharedGetMeta } from './sharedGet-Cpo7QUyu.js';
|
|
4
|
-
|
|
5
|
-
const swaggerSpec = (origin, path, options) => {
|
|
6
|
-
const { supportedTransformerFormat, tags, transformer } = { tags: ["REST"], transformer: false, ...options };
|
|
7
|
-
const pathHash = createHash("sha256").update(path).digest("base64");
|
|
8
|
-
return {
|
|
9
|
-
components: {
|
|
10
|
-
examples: sharedFileMetaExampleObject,
|
|
11
|
-
parameters: {
|
|
12
|
-
UploadIDinPath: {
|
|
13
|
-
description: "Upload ID",
|
|
14
|
-
in: "path",
|
|
15
|
-
name: "id",
|
|
16
|
-
schema: {
|
|
17
|
-
type: "string"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
responses: {
|
|
22
|
-
404: {
|
|
23
|
-
content: {
|
|
24
|
-
"application/json": {
|
|
25
|
-
example: {
|
|
26
|
-
error: {
|
|
27
|
-
code: "FileNotFound",
|
|
28
|
-
message: "Not found"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
schema: {
|
|
32
|
-
$ref: "#/components/schemas/Error"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
description: "Not Found"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
schemas: {
|
|
40
|
-
"X-Chunk-Checksum": {
|
|
41
|
-
description: "SHA256 checksum of the chunk data for validation. Format: 'sha256 <base64-encoded-checksum>'.",
|
|
42
|
-
type: "string"
|
|
43
|
-
},
|
|
44
|
-
"X-Chunk-Offset": {
|
|
45
|
-
description: "Byte offset for the chunk being uploaded. Required for PATCH requests in chunked uploads.",
|
|
46
|
-
type: "integer"
|
|
47
|
-
},
|
|
48
|
-
"X-Chunked-Upload": {
|
|
49
|
-
description: "Header to indicate chunked upload initialization. Set to 'true' to initialize a chunked upload session.",
|
|
50
|
-
enum: ["true"],
|
|
51
|
-
type: "string"
|
|
52
|
-
},
|
|
53
|
-
"X-Chunked-Upload-Response": {
|
|
54
|
-
description: "Indicates this is a chunked upload session. Returned in HEAD responses.",
|
|
55
|
-
enum: ["true"],
|
|
56
|
-
type: "string"
|
|
57
|
-
},
|
|
58
|
-
"X-Received-Chunks": {
|
|
59
|
-
description: "JSON array of received chunk offsets. Used for resumable uploads.",
|
|
60
|
-
type: "string"
|
|
61
|
-
},
|
|
62
|
-
"X-Total-Size": {
|
|
63
|
-
description: "Total size of the file in bytes for chunked uploads. Required when X-Chunked-Upload is 'true'.",
|
|
64
|
-
type: "integer"
|
|
65
|
-
},
|
|
66
|
-
"X-Upload-Complete": {
|
|
67
|
-
description: "Indicates if the upload is complete. Set to 'true' when all chunks have been uploaded.",
|
|
68
|
-
enum: ["true", "false"],
|
|
69
|
-
type: "string"
|
|
70
|
-
},
|
|
71
|
-
"X-Upload-Offset": {
|
|
72
|
-
description: "Current upload offset in bytes. Returned in responses for chunked uploads.",
|
|
73
|
-
type: "integer"
|
|
74
|
-
},
|
|
75
|
-
...createPaginationSchemaObject(
|
|
76
|
-
"FileMetaPagination",
|
|
77
|
-
{
|
|
78
|
-
$ref: "#/components/schemas/PaginationMeta"
|
|
79
|
-
},
|
|
80
|
-
"#/components/schemas/PaginationMeta"
|
|
81
|
-
),
|
|
82
|
-
...createPaginationMetaSchemaObject("PaginationMeta"),
|
|
83
|
-
...sharedErrorSchemaObject,
|
|
84
|
-
...sharedFileMetaSchemaObject
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
paths: {
|
|
88
|
-
[`${path.replace(/\/$/, "")}/{id}/metadata`]: {
|
|
89
|
-
get: sharedGetMeta(`${pathHash}RestGetFileMeta`, tags)
|
|
90
|
-
},
|
|
91
|
-
[`${path.replace(/\/$/, "")}/{id}`]: {
|
|
92
|
-
delete: {
|
|
93
|
-
description: "Delete a single file",
|
|
94
|
-
operationId: `${pathHash}RestDeleteFile`,
|
|
95
|
-
parameters: [
|
|
96
|
-
{
|
|
97
|
-
$ref: "#/components/parameters/UploadIDinPath"
|
|
98
|
-
}
|
|
99
|
-
],
|
|
100
|
-
responses: {
|
|
101
|
-
204: {
|
|
102
|
-
description: "No Content - File deleted successfully"
|
|
103
|
-
},
|
|
104
|
-
404: {
|
|
105
|
-
$ref: "#/components/responses/404"
|
|
106
|
-
},
|
|
107
|
-
default: {
|
|
108
|
-
content: {
|
|
109
|
-
"application/json": {
|
|
110
|
-
schema: {
|
|
111
|
-
$ref: "#/components/schemas/Error"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
description: "Error"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
summary: "Delete file",
|
|
119
|
-
tags
|
|
120
|
-
},
|
|
121
|
-
get: sharedGet(`${pathHash}RestGetFile`, tags, transformer, supportedTransformerFormat),
|
|
122
|
-
head: {
|
|
123
|
-
description: "Get file metadata and upload progress. For chunked uploads, returns progress information including current offset and completion status.",
|
|
124
|
-
operationId: `${pathHash}RestHeadFile`,
|
|
125
|
-
parameters: [
|
|
126
|
-
{
|
|
127
|
-
$ref: "#/components/parameters/UploadIDinPath"
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
responses: {
|
|
131
|
-
200: {
|
|
132
|
-
description: "OK",
|
|
133
|
-
headers: {
|
|
134
|
-
"Content-Length": {
|
|
135
|
-
description: "File size in bytes",
|
|
136
|
-
schema: {
|
|
137
|
-
type: "integer"
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"Content-Type": {
|
|
141
|
-
description: "MIME type of the file",
|
|
142
|
-
schema: {
|
|
143
|
-
type: "string"
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
ETag: {
|
|
147
|
-
description: "Entity tag for caching",
|
|
148
|
-
schema: {
|
|
149
|
-
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
150
|
-
type: "string"
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"Last-Modified": {
|
|
154
|
-
description: "Last modified date",
|
|
155
|
-
schema: {
|
|
156
|
-
example: "2021-08-25T11:12:26.635Z",
|
|
157
|
-
format: "date-time",
|
|
158
|
-
type: "string"
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
"X-Chunked-Upload": {
|
|
162
|
-
description: "Indicates this is a chunked upload session",
|
|
163
|
-
schema: {
|
|
164
|
-
$ref: "#/components/schemas/X-Chunked-Upload-Response"
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
"X-Received-Chunks": {
|
|
168
|
-
description: "JSON array of received chunk offsets (chunked uploads only)",
|
|
169
|
-
schema: {
|
|
170
|
-
$ref: "#/components/schemas/X-Received-Chunks"
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
"X-Upload-Complete": {
|
|
174
|
-
description: "Indicates if upload is complete (chunked uploads only)",
|
|
175
|
-
schema: {
|
|
176
|
-
$ref: "#/components/schemas/X-Upload-Complete"
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
"X-Upload-Expires": {
|
|
180
|
-
description: "Upload expiration date",
|
|
181
|
-
schema: {
|
|
182
|
-
example: "2021-08-25T11:12:26.635Z",
|
|
183
|
-
format: "date-time",
|
|
184
|
-
type: "string"
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
"X-Upload-Offset": {
|
|
188
|
-
description: "Current upload offset in bytes (chunked uploads only)",
|
|
189
|
-
schema: {
|
|
190
|
-
$ref: "#/components/schemas/X-Upload-Offset"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
404: {
|
|
196
|
-
$ref: "#/components/responses/404"
|
|
197
|
-
},
|
|
198
|
-
default: {
|
|
199
|
-
content: {
|
|
200
|
-
"application/json": {
|
|
201
|
-
schema: {
|
|
202
|
-
$ref: "#/components/schemas/Error"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
description: "Error"
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
summary: "Get file metadata",
|
|
210
|
-
tags
|
|
211
|
-
},
|
|
212
|
-
patch: {
|
|
213
|
-
description: "Upload a chunk for chunked uploads. Requires X-Chunk-Offset header and chunk data in the request body.",
|
|
214
|
-
operationId: `${pathHash}RestPatchChunk`,
|
|
215
|
-
parameters: [
|
|
216
|
-
{
|
|
217
|
-
$ref: "#/components/parameters/UploadIDinPath"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
description: "Byte offset for this chunk",
|
|
221
|
-
in: "header",
|
|
222
|
-
name: "X-Chunk-Offset",
|
|
223
|
-
required: true,
|
|
224
|
-
schema: {
|
|
225
|
-
$ref: "#/components/schemas/X-Chunk-Offset"
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
description: "SHA256 checksum of the chunk (optional)",
|
|
230
|
-
in: "header",
|
|
231
|
-
name: "X-Chunk-Checksum",
|
|
232
|
-
required: false,
|
|
233
|
-
schema: {
|
|
234
|
-
$ref: "#/components/schemas/X-Chunk-Checksum"
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
],
|
|
238
|
-
requestBody: {
|
|
239
|
-
content: {
|
|
240
|
-
"application/octet-stream": {
|
|
241
|
-
description: "Chunk data as raw binary",
|
|
242
|
-
schema: {
|
|
243
|
-
format: "binary",
|
|
244
|
-
type: "string"
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
description: "Chunk data",
|
|
249
|
-
required: true
|
|
250
|
-
},
|
|
251
|
-
responses: {
|
|
252
|
-
200: {
|
|
253
|
-
description: "Chunk uploaded successfully",
|
|
254
|
-
headers: {
|
|
255
|
-
ETag: {
|
|
256
|
-
description: "Upload ETag",
|
|
257
|
-
schema: {
|
|
258
|
-
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
259
|
-
type: "string"
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
Location: {
|
|
263
|
-
description: "File URL",
|
|
264
|
-
schema: {
|
|
265
|
-
example: `${origin}${path}/file-id`,
|
|
266
|
-
format: "uri",
|
|
267
|
-
type: "string"
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
"X-Upload-Complete": {
|
|
271
|
-
description: "Indicates if upload is complete",
|
|
272
|
-
schema: {
|
|
273
|
-
$ref: "#/components/schemas/X-Upload-Complete"
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
"X-Upload-Expires": {
|
|
277
|
-
description: "Upload expiration date",
|
|
278
|
-
schema: {
|
|
279
|
-
example: "2021-08-25T11:12:26.635Z",
|
|
280
|
-
format: "date-time",
|
|
281
|
-
type: "string"
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
"X-Upload-Offset": {
|
|
285
|
-
description: "Current upload offset after this chunk",
|
|
286
|
-
schema: {
|
|
287
|
-
$ref: "#/components/schemas/X-Upload-Offset"
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
201: {
|
|
293
|
-
description: "Upload completed (all chunks received)",
|
|
294
|
-
headers: {
|
|
295
|
-
ETag: {
|
|
296
|
-
description: "Upload ETag",
|
|
297
|
-
schema: {
|
|
298
|
-
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
299
|
-
type: "string"
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
Location: {
|
|
303
|
-
description: "File URL",
|
|
304
|
-
schema: {
|
|
305
|
-
example: `${origin}${path}/file-id`,
|
|
306
|
-
format: "uri",
|
|
307
|
-
type: "string"
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
"X-Upload-Complete": {
|
|
311
|
-
description: "Upload is complete",
|
|
312
|
-
schema: {
|
|
313
|
-
enum: ["true"],
|
|
314
|
-
type: "string"
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
"X-Upload-Expires": {
|
|
318
|
-
description: "Upload expiration date",
|
|
319
|
-
schema: {
|
|
320
|
-
example: "2021-08-25T11:12:26.635Z",
|
|
321
|
-
format: "date-time",
|
|
322
|
-
type: "string"
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
400: {
|
|
328
|
-
content: {
|
|
329
|
-
"application/json": {
|
|
330
|
-
example: {
|
|
331
|
-
error: {
|
|
332
|
-
code: "BadRequest",
|
|
333
|
-
message: "X-Chunk-Offset header is required"
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
schema: {
|
|
337
|
-
$ref: "#/components/schemas/Error"
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
description: "Bad Request"
|
|
342
|
-
},
|
|
343
|
-
404: {
|
|
344
|
-
content: {
|
|
345
|
-
"application/json": {
|
|
346
|
-
example: {
|
|
347
|
-
error: {
|
|
348
|
-
code: "FileNotFound",
|
|
349
|
-
message: "Upload session not found"
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
schema: {
|
|
353
|
-
$ref: "#/components/schemas/Error"
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
description: "Not Found"
|
|
358
|
-
},
|
|
359
|
-
413: {
|
|
360
|
-
content: {
|
|
361
|
-
"application/json": {
|
|
362
|
-
example: {
|
|
363
|
-
error: {
|
|
364
|
-
code: "RequestEntityTooLarge",
|
|
365
|
-
message: "Chunk size exceeds maximum allowed size of 104857600 bytes"
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
schema: {
|
|
369
|
-
$ref: "#/components/schemas/Error"
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
description: "Request Entity Too Large"
|
|
374
|
-
},
|
|
375
|
-
default: {
|
|
376
|
-
content: {
|
|
377
|
-
"application/json": {
|
|
378
|
-
schema: {
|
|
379
|
-
$ref: "#/components/schemas/Error"
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
},
|
|
383
|
-
description: "Error"
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
summary: "Upload chunk",
|
|
387
|
-
tags
|
|
388
|
-
},
|
|
389
|
-
put: {
|
|
390
|
-
description: "Create or update a file. Requires file ID in the URL path. If file exists, it will be overwritten.",
|
|
391
|
-
operationId: `${pathHash}RestPutFile`,
|
|
392
|
-
parameters: [
|
|
393
|
-
{
|
|
394
|
-
$ref: "#/components/parameters/UploadIDinPath"
|
|
395
|
-
}
|
|
396
|
-
],
|
|
397
|
-
requestBody: {
|
|
398
|
-
content: {
|
|
399
|
-
"application/octet-stream": {
|
|
400
|
-
description: "File data as raw binary",
|
|
401
|
-
schema: {
|
|
402
|
-
format: "binary",
|
|
403
|
-
type: "string"
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
description: "File data",
|
|
408
|
-
required: true
|
|
409
|
-
},
|
|
410
|
-
responses: {
|
|
411
|
-
200: {
|
|
412
|
-
description: "File updated successfully",
|
|
413
|
-
headers: {
|
|
414
|
-
ETag: {
|
|
415
|
-
description: "Upload ETag",
|
|
416
|
-
schema: {
|
|
417
|
-
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
418
|
-
type: "string"
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
Location: {
|
|
422
|
-
description: "File URL",
|
|
423
|
-
schema: {
|
|
424
|
-
example: `${origin}${path}/file-id`,
|
|
425
|
-
format: "uri",
|
|
426
|
-
type: "string"
|
|
427
|
-
}
|
|
428
|
-
},
|
|
429
|
-
"X-Upload-Expires": {
|
|
430
|
-
description: "Upload expiration date",
|
|
431
|
-
schema: {
|
|
432
|
-
example: "2021-08-25T11:12:26.635Z",
|
|
433
|
-
format: "date-time",
|
|
434
|
-
type: "string"
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
},
|
|
439
|
-
201: {
|
|
440
|
-
description: "File created successfully",
|
|
441
|
-
headers: {
|
|
442
|
-
ETag: {
|
|
443
|
-
description: "Upload ETag",
|
|
444
|
-
schema: {
|
|
445
|
-
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
446
|
-
type: "string"
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
Location: {
|
|
450
|
-
description: "File URL",
|
|
451
|
-
schema: {
|
|
452
|
-
example: `${origin}${path}/file-id`,
|
|
453
|
-
format: "uri",
|
|
454
|
-
type: "string"
|
|
455
|
-
}
|
|
456
|
-
},
|
|
457
|
-
"X-Upload-Expires": {
|
|
458
|
-
description: "Upload expiration date",
|
|
459
|
-
schema: {
|
|
460
|
-
example: "2021-08-25T11:12:26.635Z",
|
|
461
|
-
format: "date-time",
|
|
462
|
-
type: "string"
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
},
|
|
467
|
-
400: {
|
|
468
|
-
content: {
|
|
469
|
-
"application/json": {
|
|
470
|
-
example: {
|
|
471
|
-
error: {
|
|
472
|
-
code: "BadRequest",
|
|
473
|
-
message: "Request body is required"
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
schema: {
|
|
477
|
-
$ref: "#/components/schemas/Error"
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
description: "Bad Request"
|
|
482
|
-
},
|
|
483
|
-
413: {
|
|
484
|
-
content: {
|
|
485
|
-
"application/json": {
|
|
486
|
-
example: {
|
|
487
|
-
error: {
|
|
488
|
-
code: "RequestEntityTooLarge",
|
|
489
|
-
message: "File size exceeds maximum allowed size"
|
|
490
|
-
}
|
|
491
|
-
},
|
|
492
|
-
schema: {
|
|
493
|
-
$ref: "#/components/schemas/Error"
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
},
|
|
497
|
-
description: "Request Entity Too Large"
|
|
498
|
-
},
|
|
499
|
-
default: {
|
|
500
|
-
content: {
|
|
501
|
-
"application/json": {
|
|
502
|
-
schema: {
|
|
503
|
-
$ref: "#/components/schemas/Error"
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
},
|
|
507
|
-
description: "Error"
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
summary: "Create or update file",
|
|
511
|
-
tags
|
|
512
|
-
}
|
|
513
|
-
},
|
|
514
|
-
[path.trimEnd()]: {
|
|
515
|
-
delete: {
|
|
516
|
-
description: 'Delete multiple files. Supports batch delete via query parameter (?ids=id1,id2,id3) or JSON body ({ids: ["id1", "id2"]} or ["id1", "id2"]).',
|
|
517
|
-
operationId: `${pathHash}RestBatchDelete`,
|
|
518
|
-
parameters: [
|
|
519
|
-
{
|
|
520
|
-
description: "Comma-separated list of file IDs to delete",
|
|
521
|
-
in: "query",
|
|
522
|
-
name: "ids",
|
|
523
|
-
required: false,
|
|
524
|
-
schema: {
|
|
525
|
-
example: "id1,id2,id3",
|
|
526
|
-
type: "string"
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
],
|
|
530
|
-
requestBody: {
|
|
531
|
-
content: {
|
|
532
|
-
"application/json": {
|
|
533
|
-
schema: {
|
|
534
|
-
oneOf: [
|
|
535
|
-
{
|
|
536
|
-
properties: {
|
|
537
|
-
ids: {
|
|
538
|
-
description: "Array of file IDs to delete",
|
|
539
|
-
items: {
|
|
540
|
-
type: "string"
|
|
541
|
-
},
|
|
542
|
-
type: "array"
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
required: ["ids"],
|
|
546
|
-
type: "object"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
description: "Array of file IDs to delete",
|
|
550
|
-
items: {
|
|
551
|
-
type: "string"
|
|
552
|
-
},
|
|
553
|
-
type: "array"
|
|
554
|
-
}
|
|
555
|
-
]
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
},
|
|
559
|
-
description: "File IDs to delete (optional if using query parameter)",
|
|
560
|
-
required: false
|
|
561
|
-
},
|
|
562
|
-
responses: {
|
|
563
|
-
204: {
|
|
564
|
-
description: "All files deleted successfully"
|
|
565
|
-
},
|
|
566
|
-
207: {
|
|
567
|
-
description: "Multi-Status - Some files deleted successfully",
|
|
568
|
-
headers: {
|
|
569
|
-
"X-Delete-Errors": {
|
|
570
|
-
description: "JSON array of deletion errors",
|
|
571
|
-
schema: {
|
|
572
|
-
type: "string"
|
|
573
|
-
}
|
|
574
|
-
},
|
|
575
|
-
"X-Delete-Failed": {
|
|
576
|
-
description: "Number of files that failed to delete",
|
|
577
|
-
schema: {
|
|
578
|
-
type: "integer"
|
|
579
|
-
}
|
|
580
|
-
},
|
|
581
|
-
"X-Delete-Successful": {
|
|
582
|
-
description: "Number of files successfully deleted",
|
|
583
|
-
schema: {
|
|
584
|
-
type: "integer"
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
},
|
|
589
|
-
400: {
|
|
590
|
-
content: {
|
|
591
|
-
"application/json": {
|
|
592
|
-
example: {
|
|
593
|
-
error: {
|
|
594
|
-
code: "BadRequest",
|
|
595
|
-
message: "No file IDs provided"
|
|
596
|
-
}
|
|
597
|
-
},
|
|
598
|
-
schema: {
|
|
599
|
-
$ref: "#/components/schemas/Error"
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
description: "Bad Request"
|
|
604
|
-
},
|
|
605
|
-
404: {
|
|
606
|
-
content: {
|
|
607
|
-
"application/json": {
|
|
608
|
-
example: {
|
|
609
|
-
error: {
|
|
610
|
-
code: "FileNotFound",
|
|
611
|
-
message: "Failed to delete files: id1, id2"
|
|
612
|
-
}
|
|
613
|
-
},
|
|
614
|
-
schema: {
|
|
615
|
-
$ref: "#/components/schemas/Error"
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
},
|
|
619
|
-
description: "Not Found"
|
|
620
|
-
},
|
|
621
|
-
default: {
|
|
622
|
-
content: {
|
|
623
|
-
"application/json": {
|
|
624
|
-
schema: {
|
|
625
|
-
$ref: "#/components/schemas/Error"
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
},
|
|
629
|
-
description: "Error"
|
|
630
|
-
}
|
|
631
|
-
},
|
|
632
|
-
summary: "Batch delete files",
|
|
633
|
-
tags
|
|
634
|
-
},
|
|
635
|
-
get: sharedGetList(`${pathHash}RestGetList`, tags),
|
|
636
|
-
post: {
|
|
637
|
-
description: "Upload a file with raw binary data or initialize a chunked upload session. For chunked uploads, set X-Chunked-Upload: true and X-Total-Size headers.",
|
|
638
|
-
operationId: `${pathHash}RestPostFile`,
|
|
639
|
-
parameters: [
|
|
640
|
-
{
|
|
641
|
-
description: "Set to 'true' to initialize a chunked upload session",
|
|
642
|
-
in: "header",
|
|
643
|
-
name: "X-Chunked-Upload",
|
|
644
|
-
required: false,
|
|
645
|
-
schema: {
|
|
646
|
-
$ref: "#/components/schemas/X-Chunked-Upload"
|
|
647
|
-
}
|
|
648
|
-
},
|
|
649
|
-
{
|
|
650
|
-
description: "Total size of the file in bytes (required for chunked uploads)",
|
|
651
|
-
in: "header",
|
|
652
|
-
name: "X-Total-Size",
|
|
653
|
-
required: false,
|
|
654
|
-
schema: {
|
|
655
|
-
$ref: "#/components/schemas/X-Total-Size"
|
|
656
|
-
}
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
description: "Optional filename",
|
|
660
|
-
in: "header",
|
|
661
|
-
name: "Content-Disposition",
|
|
662
|
-
required: false,
|
|
663
|
-
schema: {
|
|
664
|
-
example: 'attachment; filename="photo.jpg"',
|
|
665
|
-
type: "string"
|
|
666
|
-
}
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
description: "Optional JSON metadata",
|
|
670
|
-
in: "header",
|
|
671
|
-
name: "X-File-Metadata",
|
|
672
|
-
required: false,
|
|
673
|
-
schema: {
|
|
674
|
-
example: '{"description":"My photo"}',
|
|
675
|
-
type: "string"
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
],
|
|
679
|
-
requestBody: {
|
|
680
|
-
content: {
|
|
681
|
-
"application/octet-stream": {
|
|
682
|
-
description: "File data as raw binary. For chunked upload initialization, body can be empty.",
|
|
683
|
-
schema: {
|
|
684
|
-
format: "binary",
|
|
685
|
-
type: "string"
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
},
|
|
689
|
-
description: "File data (optional for chunked upload initialization)",
|
|
690
|
-
required: false
|
|
691
|
-
},
|
|
692
|
-
responses: {
|
|
693
|
-
200: {
|
|
694
|
-
description: "The file already exists, send a resume request",
|
|
695
|
-
headers: {
|
|
696
|
-
ETag: {
|
|
697
|
-
description: "Upload ETag",
|
|
698
|
-
schema: {
|
|
699
|
-
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
700
|
-
type: "string"
|
|
701
|
-
}
|
|
702
|
-
},
|
|
703
|
-
Location: {
|
|
704
|
-
description: "File URL",
|
|
705
|
-
schema: {
|
|
706
|
-
example: `${origin}${path}/file-id`,
|
|
707
|
-
format: "uri",
|
|
708
|
-
type: "string"
|
|
709
|
-
}
|
|
710
|
-
},
|
|
711
|
-
"X-Upload-Expires": {
|
|
712
|
-
description: "Upload expiration date",
|
|
713
|
-
schema: {
|
|
714
|
-
example: "2021-08-25T11:12:26.635Z",
|
|
715
|
-
format: "date-time",
|
|
716
|
-
type: "string"
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
},
|
|
721
|
-
201: {
|
|
722
|
-
description: "File uploaded successfully or chunked upload session initialized",
|
|
723
|
-
headers: {
|
|
724
|
-
ETag: {
|
|
725
|
-
description: "Upload ETag",
|
|
726
|
-
schema: {
|
|
727
|
-
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
728
|
-
type: "string"
|
|
729
|
-
}
|
|
730
|
-
},
|
|
731
|
-
Location: {
|
|
732
|
-
description: "File URL or chunked upload session URL",
|
|
733
|
-
schema: {
|
|
734
|
-
example: `${origin}${path}/file-id`,
|
|
735
|
-
format: "uri",
|
|
736
|
-
type: "string"
|
|
737
|
-
}
|
|
738
|
-
},
|
|
739
|
-
"X-Upload-Expires": {
|
|
740
|
-
description: "Upload expiration date",
|
|
741
|
-
schema: {
|
|
742
|
-
example: "2021-08-25T11:12:26.635Z",
|
|
743
|
-
format: "date-time",
|
|
744
|
-
type: "string"
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
},
|
|
749
|
-
400: {
|
|
750
|
-
content: {
|
|
751
|
-
"application/json": {
|
|
752
|
-
example: {
|
|
753
|
-
error: {
|
|
754
|
-
code: "BadRequest",
|
|
755
|
-
message: "Request body is required for non-chunked uploads"
|
|
756
|
-
}
|
|
757
|
-
},
|
|
758
|
-
schema: {
|
|
759
|
-
$ref: "#/components/schemas/Error"
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
},
|
|
763
|
-
description: "Bad Request"
|
|
764
|
-
},
|
|
765
|
-
413: {
|
|
766
|
-
content: {
|
|
767
|
-
"application/json": {
|
|
768
|
-
example: {
|
|
769
|
-
error: {
|
|
770
|
-
code: "RequestEntityTooLarge",
|
|
771
|
-
message: "File size exceeds maximum allowed size"
|
|
772
|
-
}
|
|
773
|
-
},
|
|
774
|
-
schema: {
|
|
775
|
-
$ref: "#/components/schemas/Error"
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
},
|
|
779
|
-
description: "Request Entity Too Large"
|
|
780
|
-
},
|
|
781
|
-
default: {
|
|
782
|
-
content: {
|
|
783
|
-
"application/json": {
|
|
784
|
-
schema: {
|
|
785
|
-
$ref: "#/components/schemas/Error"
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
},
|
|
789
|
-
description: "Error"
|
|
790
|
-
}
|
|
791
|
-
},
|
|
792
|
-
summary: "Upload file or initialize chunked upload",
|
|
793
|
-
tags
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
};
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
export { swaggerSpec as default };
|