@visulima/storage 1.0.0-alpha.3 → 1.0.0-alpha.30
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 +361 -0
- package/LICENSE.md +213 -573
- package/README.md +83 -470
- package/dist/adapter/nuxt/module.d.ts +41 -34
- package/dist/adapter/nuxt/module.js +1 -93
- package/dist/adapter/nuxt/node_modules/.bin/nuxi +22 -0
- package/dist/adapter/nuxt/node_modules/.bin/nuxt +22 -0
- 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 +361 -4
- package/dist/handler/http/node/index.js +1 -4
- 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 +58 -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/AwsLightFile-BSqjc_rD.js +1 -0
- package/dist/packem_shared/AwsLightMetaStorage-B-iQbToR.js +1 -0
- package/dist/packem_shared/AwsLightStorage-w21RxjUm.js +1 -0
- package/dist/packem_shared/AzureFile-Dgj2Tef4.js +1 -0
- package/dist/packem_shared/AzureSMetaStorage-CR-lfQNQ.js +1 -0
- package/dist/packem_shared/AzureStorage-2kl7JDXs.js +1 -0
- package/dist/packem_shared/BaseTransformer-Fpcuz4kj.js +1 -0
- package/dist/packem_shared/BoxFile-Be0S4N1L.js +1 -0
- package/dist/packem_shared/BoxMetaStorage-DLdXbZaV.js +1 -0
- package/dist/packem_shared/BoxStorage-BUeEJoGL.js +1 -0
- package/dist/packem_shared/BunS3File-D-SRiyrm.js +1 -0
- package/dist/packem_shared/BunS3MetaStorage-Bv_CTTMz.js +1 -0
- package/dist/packem_shared/BunS3Storage-WM3rF6Fw.js +1 -0
- package/dist/packem_shared/BunnyFile-Dotl-lO9.js +1 -0
- package/dist/packem_shared/BunnyMetaStorage-DNMTSeoN.js +1 -0
- package/dist/packem_shared/BunnyStorage-D3s2fRB3.js +1 -0
- package/dist/packem_shared/CloudinaryFile-B5-m33eS.js +1 -0
- package/dist/packem_shared/CloudinaryMetaStorage-DEBk5eQy.js +1 -0
- package/dist/packem_shared/CloudinaryStorage-BBE2-aVz.js +1 -0
- package/dist/packem_shared/DiskStorage-DL0GiG6k.js +1 -0
- package/dist/packem_shared/DiskStorageWithChecksum-BvUTn7O-.js +1 -0
- package/dist/packem_shared/DropboxFile-BGVG2kXM.js +1 -0
- package/dist/packem_shared/DropboxMetaStorage-C6vj1QDA.js +1 -0
- package/dist/packem_shared/DropboxStorage-BL3OIdE_.js +1 -0
- package/dist/packem_shared/ERRORS-CyOuSMLY.js +1 -0
- package/dist/packem_shared/File-BhfUgJjs.js +1 -0
- package/dist/packem_shared/Files-CJh9_N-9.js +1 -0
- package/dist/packem_shared/FirebaseFile-JEu3plMP.js +1 -0
- package/dist/packem_shared/FirebaseMetaStorage-CzyOim-J.js +1 -0
- package/dist/packem_shared/FirebaseStorage-lXMXy3Pm.js +2 -0
- package/dist/packem_shared/FtpFile-B8jaICTB.js +1 -0
- package/dist/packem_shared/FtpMetaStorage-1Njy0DpU.js +1 -0
- package/dist/packem_shared/FtpStorage-Dw94efNW.js +1 -0
- package/dist/packem_shared/GCSConfig-BQ0OpVhe.js +1 -0
- package/dist/packem_shared/GCSFile-CDQ6IWAz.js +1 -0
- package/dist/packem_shared/GCSMetaStorage-udgXA5ia.js +1 -0
- package/dist/packem_shared/GCStorage-ChY6uJuO.js +1 -0
- package/dist/packem_shared/GoogleDriveFile-D0aGfGbL.js +1 -0
- package/dist/packem_shared/GoogleDriveMetaStorage-WGuUZPyx.js +1 -0
- package/dist/packem_shared/GoogleDriveStorage-C0NhBBWH.js +1 -0
- package/dist/packem_shared/LocalMetaStorage-QMKL7McF.js +1 -0
- package/dist/packem_shared/MediaTransformer-D-1c9Q_k.js +1 -0
- package/dist/packem_shared/MetaStorage-Y4m1dWgd.js +1 -0
- package/dist/packem_shared/Metadata-B6Ir0KO7.js +1 -0
- package/dist/packem_shared/Multipart-CIFfQksD.js +1 -0
- package/dist/packem_shared/Multipart-D9WIud9R.js +1 -0
- package/dist/packem_shared/NetlifyBlobFile-PMZLJ8AC.js +1 -0
- package/dist/packem_shared/NetlifyBlobMetaStorage-ClIFdTkT.js +1 -0
- package/dist/packem_shared/NetlifyBlobStorage-CO89TGvF.js +1 -0
- package/dist/packem_shared/NoOpMetrics-Dky06sf1.js +1 -0
- package/dist/packem_shared/OneDriveFile-XbVVKIJh.js +1 -0
- package/dist/packem_shared/OneDriveMetaStorage-DS4f83X2.js +1 -0
- package/dist/packem_shared/OneDriveStorage-jAN46vRm.js +1 -0
- package/dist/packem_shared/OpenTelemetryMetrics-9uxQMSlg.js +1 -0
- package/dist/packem_shared/PocketBaseFile-CkAiSBb0.js +1 -0
- package/dist/packem_shared/PocketBaseMetaStorage-B6utPncj.js +1 -0
- package/dist/packem_shared/PocketBaseStorage-DpOjOKAt.js +1 -0
- package/dist/packem_shared/Rest-BuD3ySAg.js +1 -0
- package/dist/packem_shared/Rest-URrQ5FYM.js +1 -0
- package/dist/packem_shared/S3File-BfmCOET4.js +1 -0
- package/dist/packem_shared/S3MetaStorage-vcriiosn.js +1 -0
- package/dist/packem_shared/S3Storage-n1ohEZj4.js +1 -0
- package/dist/packem_shared/SftpFile-CQCxZNVq.js +1 -0
- package/dist/packem_shared/SftpMetaStorage-DYqXwCdM.js +1 -0
- package/dist/packem_shared/SftpStorage-Ban-WN8v.js +1 -0
- package/dist/packem_shared/SharePointFile-BA6X9Sxr.js +1 -0
- package/dist/packem_shared/SharePointMetaStorage-DVM5-X6g.js +1 -0
- package/dist/packem_shared/SharePointStorage-BY90zh1c.js +1 -0
- package/dist/packem_shared/SupabaseFile-DZ1iv9gM.js +1 -0
- package/dist/packem_shared/SupabaseMetaStorage-ivXoYVUu.js +1 -0
- package/dist/packem_shared/SupabaseStorage-pNbHAE1Y.js +1 -0
- package/dist/packem_shared/TUS_RESUMABLE-B7KtPVeC.js +1 -0
- package/dist/packem_shared/Tus-Fp_hx5ug.js +1 -0
- package/dist/packem_shared/Tus-TNG9HAY8.js +1 -0
- package/dist/packem_shared/UploadThingFile-BpG9mE8K.js +1 -0
- package/dist/packem_shared/UploadThingMetaStorage-BvKNzgm7.js +1 -0
- package/dist/packem_shared/UploadThingStorage-BcmIE2dI.js +1 -0
- package/dist/packem_shared/ValidationError-D8KKJiKA.js +1 -0
- package/dist/packem_shared/VercelBlobFile-Cni_1qwD.js +1 -0
- package/dist/packem_shared/VercelBlobMetaStorage-CwaqWucZ.js +1 -0
- package/dist/packem_shared/VercelBlobStorage-s260zfFo.js +1 -0
- package/dist/packem_shared/_commonjsHelpers-D6W6KoPK.js +1 -0
- package/dist/packem_shared/agentsListFiles-R-CnGKc4.js +1 -0
- package/dist/packem_shared/akamai-BYS9pP8S.js +1 -0
- package/dist/packem_shared/alibaba-BJQ6ijoK.js +1 -0
- package/dist/packem_shared/approval-BBeX3o4E.js +1 -0
- package/dist/packem_shared/approval.d-CMAYH9GF.d.ts +75 -0
- package/dist/packem_shared/aws-light-meta-storage-CstQBYXG.js +4 -0
- package/dist/packem_shared/azure-meta-storage-C4SrMtT2.js +1 -0
- package/dist/packem_shared/backblaze-CvdtCvJL.js +1 -0
- package/dist/packem_shared/base-handler-core-BYDQditz.js +1 -0
- package/dist/packem_shared/base-handler-fetch-DWzsPkmV.js +1 -0
- package/dist/packem_shared/base-handler-node-Dety2rQB.js +1 -0
- package/dist/packem_shared/cache-qV_5Umeq.js +1 -0
- package/dist/packem_shared/claudeListFiles-DAezbKEi.js +1 -0
- package/dist/packem_shared/cloudflare-Bm_Pg6yx.js +1 -0
- package/dist/packem_shared/createResponsesFileTools-BCep-qdO.js +1 -0
- package/dist/packem_shared/defaultCloudStorageFileNameValidation-shIZX_7L.js +1 -0
- package/dist/packem_shared/detect-file-type-5JhzC9RU.js +1 -0
- package/dist/packem_shared/digitalOcean-Lj1NfDzc.js +1 -0
- package/dist/packem_shared/disk-storage-CKAJvhcj.js +1 -0
- package/dist/packem_shared/disk-storage-with-checksum.d-mHcg2uLw.d.ts +150 -0
- package/dist/packem_shared/executors-DG6hGtvm.js +1 -0
- package/dist/packem_shared/executors.d-X4hz3zfu.d.ts +65 -0
- package/dist/packem_shared/exoscale-O0HzxoDz.js +1 -0
- package/dist/packem_shared/filebase-D-urO4Ob.js +1 -0
- package/dist/packem_shared/gcs-meta-storage-mZiqlX-9.js +1 -0
- package/dist/packem_shared/has-content-Bx2p8Okx.js +1 -0
- package/dist/packem_shared/headers-DC2MEOrK.js +27 -0
- package/dist/packem_shared/hetzner-DDxE7Gy7.js +1 -0
- package/dist/packem_shared/ibmCos-Rx_yku4H.js +1 -0
- package/dist/packem_shared/idriveE2-BFhw0Vwy.js +1 -0
- package/dist/packem_shared/index-B4ETk0Lu.js +5 -0
- package/dist/packem_shared/index.d-C4Fivh4I.d.ts +94 -0
- package/dist/packem_shared/is-expired-1JuZjDtb.js +1 -0
- package/dist/packem_shared/isRetryableError-BhizNeAz.js +1 -0
- package/dist/packem_shared/isValidMediaType-B-2UKjZx.js +1 -0
- package/dist/packem_shared/listFiles-B6VF05d-.js +1 -0
- package/dist/packem_shared/listFiles-BtP6VnUp.js +1 -0
- package/dist/packem_shared/local-meta-storage-Bi0mK6gD.js +1 -0
- package/dist/packem_shared/local-meta-storage.d-B11vHYNm.d.ts +21 -0
- package/dist/packem_shared/media-transformer.d-C3QvECD7.d.ts +331 -0
- package/dist/packem_shared/minio-T_Z3iEy7.js +1 -0
- package/dist/packem_shared/multipart-base-BxckfvQf.js +1 -0
- package/dist/packem_shared/oauth-refresh-Dg2ybc6_.js +1 -0
- package/dist/packem_shared/oracleCloud-D5T9s4JV.js +1 -0
- package/dist/packem_shared/ovhCloud-DCwef2fe.js +1 -0
- package/dist/packem_shared/part-match-B5fLLmFw.js +1 -0
- package/dist/packem_shared/path-D7rMc9nq-B718mbm6.js +1 -0
- package/dist/packem_shared/posix-dirname-CiHXPPnw.js +1 -0
- package/dist/packem_shared/response-builder-Wdo_fvcF.js +1 -0
- package/dist/packem_shared/rest-base-DI7xFXr5.js +1 -0
- package/dist/packem_shared/restOpenApiSpec-PaIVbESh.js +1 -0
- package/dist/packem_shared/s3-base-storage-Dbexfg7p.js +1 -0
- package/dist/packem_shared/s3-base-storage.d-V3N2nKCt.d.ts +260 -0
- package/dist/packem_shared/scaleway-ygRXOss9.js +1 -0
- package/dist/packem_shared/sharedGet-Ce7WGAsc.js +1 -0
- package/dist/packem_shared/storage-Dh0tJh7j.js +1 -0
- package/dist/packem_shared/storage.d-RteRC-cG.d.ts +1106 -0
- package/dist/packem_shared/storj-CVA9mM-7.js +1 -0
- package/dist/packem_shared/tencent-CAcAGaIW.js +1 -0
- package/dist/packem_shared/tigris-wmhjfsH2.js +1 -0
- package/dist/packem_shared/transformOpenApiSpec-C0vEbDTO.js +1 -0
- package/dist/packem_shared/tus-base.d-CygntIPM.d.ts +99 -0
- package/dist/packem_shared/tusOpenApiSpec-DF0-hlWV.js +1 -0
- package/dist/packem_shared/types.d-ChNXbbHG.d.ts +104 -0
- package/dist/packem_shared/types.d-DxonY4XS.d.ts +720 -0
- package/dist/packem_shared/types.d-cI_cMxcZ.d.ts +49 -0
- package/dist/packem_shared/update-size-DANV7aa2.js +1 -0
- package/dist/packem_shared/vultr-lK9L-sFk.js +1 -0
- package/dist/packem_shared/waitForStorage-ChSBLhLc.js +1 -0
- package/dist/packem_shared/wasabi-JQzxdrFy.js +1 -0
- package/dist/packem_shared/xhrOpenApiSpec-nyoboz83.js +1 -0
- package/dist/packem_shared/yandex-ZwvE77v4.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 +321 -4
- package/dist/storage/aws/index.js +1 -3
- package/dist/storage/aws-light/index.d.ts +254 -4
- package/dist/storage/aws-light/index.js +1 -3
- package/dist/storage/azure/index.d.ts +217 -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 +85 -0
- package/dist/storage/ftp/index.js +1 -0
- package/dist/storage/gcs/index.d.ts +181 -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/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 +86 -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 +195 -47
- 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-BMFEdzJ7.js +0 -7
- package/dist/packem_shared/GCStorage-DnhiwaS9.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-CNFK_Okz.js +0 -163
- package/dist/packem_shared/Multipart-CtUL7BQw.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-CAOAEkOj.js +0 -267
- package/dist/packem_shared/Rest-DNuLwBrK.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-GJzZ9R-f.js +0 -434
- package/dist/packem_shared/Tus-B8PmlMgR.js +0 -200
- package/dist/packem_shared/Tus-C4F1aYOl.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-BKuf4YLT.js +0 -303
- package/dist/packem_shared/base-handler-fetch-Cr0hLiqg.js +0 -291
- package/dist/packem_shared/base-handler-node-gk5aN9Cx.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-0tgMNnPO.js +0 -158
- package/dist/packem_shared/has-content-CY66ehMK.js +0 -3
- package/dist/packem_shared/headers-DoS5nwM-.js +0 -3220
- 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-B3i67SSX.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-GRCcnan7.js +0 -457
- package/dist/packem_shared/restOpenApiSpec-CwcHHY2C.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-6ohiToBy.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-DS17brnx.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var o=(e,s)=>c(e,"name",{value:s,configurable:!0});var n=Object.defineProperty,S=o((e,s)=>n(e,"name",{value:s,configurable:!0}),"r");const a=S(e=>{const s=e?.accessKeyId??process.env.AWS_ACCESS_KEY_ID??process.env.STORJ_ACCESS_KEY_ID??process.env.STORJ_ACCESS_KEY,t=e?.endpoint??process.env.STORJ_ENDPOINT,r=e?.secretAccessKey??process.env.AWS_SECRET_ACCESS_KEY??process.env.STORJ_SECRET_ACCESS_KEY??process.env.STORJ_SECRET_KEY;if(!s||!r)throw new Error("Missing required parameters for Storj client.");return{credentials:{accessKeyId:s,secretAccessKey:r},endpoint:t??"https://gateway.storjshare.io",forcePathStyle:!1,region:"global"}},"storj");export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=Object.defineProperty;var n=(e,s)=>t(e,"name",{value:s,configurable:!0});var E=Object.defineProperty,a=n((e,s)=>E(e,"name",{value:s,configurable:!0}),"c");const T=a(e=>{const s=e?.accessKeyId??process.env.AWS_ACCESS_KEY_ID??process.env.TENCENT_SECRET_ID,o=e?.endpoint??process.env.TENCENT_ENDPOINT,r=e?.region??process.env.TENCENT_REGION,c=e?.secretAccessKey??process.env.AWS_SECRET_ACCESS_KEY??process.env.TENCENT_SECRET_KEY;if(!r||!s||!c)throw new Error("Missing required parameters for Tencent Cloud COS client.");return{credentials:{accessKeyId:s,secretAccessKey:c},endpoint:o??`https://cos.${r}.myqcloud.com`,forcePathStyle:!1,region:r}},"tencent");export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=Object.defineProperty;var t=(e,s)=>n(e,"name",{value:s,configurable:!0});var o=Object.defineProperty,S=t((e,s)=>o(e,"name",{value:s,configurable:!0}),"r");const _=S(e=>{const s=e?.accessKeyId??process.env.AWS_ACCESS_KEY_ID??process.env.TIGRIS_ACCESS_KEY_ID??process.env.TIGRIS_ACCESS_KEY,c=e?.endpoint??process.env.TIGRIS_ENDPOINT,r=e?.secretAccessKey??process.env.AWS_SECRET_ACCESS_KEY??process.env.TIGRIS_SECRET_ACCESS_KEY??process.env.TIGRIS_SECRET_KEY;if(!s||!r)throw new Error("Missing required parameters for Tigris client.");return{credentials:{accessKeyId:s,secretAccessKey:r},endpoint:c??"https://t3.storage.dev",forcePathStyle:!1,region:"auto"}},"tigris");export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=Object.defineProperty;var n=(e,t)=>a(e,"name",{value:t,configurable:!0});import{createHash as i}from"node:crypto";import{createPaginationMetaSchemaObject as o,createPaginationSchemaObject as s}from"@visulima/pagination";import{sharedFileMetaSchemaObject as p,sharedErrorSchemaObject as m,sharedFileMetaExampleObject as c}from"./sharedGet-Ce7WGAsc.js";var d=Object.defineProperty,l=n((e,t)=>d(e,"name",{value:t,configurable:!0}),"n");const g=l((e="/",t=["Transform"])=>{const r=i("sha256").update(e).digest("base64");return{components:{examples:c,parameters:{Affine:{description:"Apply affine transformation",in:"query",name:"affine",schema:{type:"boolean"}},Angle:{description:"Rotation angle in degrees. Note: angles other than 90°, 180°, and 270° require interpolation and may affect quality",in:"query",name:"angle",schema:{type:"number"}},Background:{description:"Background color for rotation (hex, rgb, or color name)",in:"query",name:"background",schema:{type:"string"}},Bitrate:{description:"Target bitrate in bits per second",in:"query",name:"bitrate",schema:{minimum:1,type:"integer"}},Blur:{description:"Apply blur effect",in:"query",name:"blur",schema:{type:"boolean"}},Brightness:{description:"Brightness multiplier for modulation",in:"query",name:"brightness",schema:{type:"number"}},Clahe:{description:"Apply CLAHE (Contrast Limited Adaptive Histogram Equalization)",in:"query",name:"clahe",schema:{type:"boolean"}},Codec:{description:"Video or audio codec",in:"query",name:"codec",schema:{enum:["avc","hevc","vp8","vp9","av1","aac","opus","mp3","vorbis","flac"],type:"string"}},Colourspace:{description:"Convert colourspace",in:"query",name:"colourspace",schema:{enum:["srgb","rgb","cmyk","lab","b-w"],type:"string"}},CropHeight:{description:"Crop area height",in:"query",name:"cropHeight",schema:{minimum:1,type:"integer"}},CropWidth:{description:"Crop area width",in:"query",name:"cropWidth",schema:{minimum:1,type:"integer"}},Dilate:{description:"Apply dilation",in:"query",name:"dilate",schema:{type:"boolean"}},EnsureAlpha:{description:"Ensure alpha channel",in:"query",name:"ensureAlpha",schema:{type:"boolean"}},Erode:{description:"Apply erosion",in:"query",name:"erode",schema:{type:"boolean"}},FastShrinkOnLoad:{description:"Fast shrink on load for large images",in:"query",name:"fastShrinkOnLoad",schema:{type:"boolean"}},FileID:{description:"File identifier",in:"path",name:"id",required:!0,schema:{type:"string"}},Fit:{description:"Resize fit mode",in:"query",name:"fit",schema:{enum:["cover","contain","fill","inside","outside"],type:"string"}},Flatten:{description:"Flatten alpha channel",in:"query",name:"flatten",schema:{type:"boolean"}},Flip:{description:"Flip image vertically",in:"query",name:"flip",schema:{type:"boolean"}},Flop:{description:"Flop image horizontally",in:"query",name:"flop",schema:{type:"boolean"}},Format:{description:"Output format for the transformed media",in:"query",name:"format",schema:{enum:["jpeg","png","webp","avif","tiff","gif","mp4","webm","mkv","ogg","mp3","wav","aac","flac"],type:"string"}},FrameRate:{description:"Video frame rate in Hz",in:"query",name:"frameRate",schema:{minimum:1,type:"number"}},Gamma:{description:"Apply gamma correction",in:"query",name:"gamma",schema:{type:"boolean"}},Greyscale:{description:"Convert to greyscale",in:"query",name:"greyscale",schema:{type:"boolean"}},Height:{description:"Desired height in pixels",in:"query",name:"height",schema:{minimum:1,type:"integer"}},Hue:{description:"Hue rotation in degrees for modulation",in:"query",name:"hue",schema:{type:"integer"}},Kernel:{description:"Resize kernel algorithm",in:"query",name:"kernel",schema:{enum:["nearest","cubic","mitchell","lanczos2","lanczos3"],type:"string"}},KeyFrameInterval:{description:"Video key frame interval in seconds",in:"query",name:"keyFrameInterval",schema:{minimum:.1,type:"number"}},Left:{description:"Crop area left offset",in:"query",name:"left",schema:{minimum:0,type:"integer"}},Lightness:{description:"Lightness adjustment for modulation",in:"query",name:"lightness",schema:{type:"integer"}},Median:{description:"Apply median filter with specified size",in:"query",name:"median",schema:{minimum:1,type:"integer"}},Modulate:{description:"Apply modulation effects",in:"query",name:"modulate",schema:{type:"boolean"}},Negate:{description:"Negate (invert) the image",in:"query",name:"negate",schema:{type:"boolean"}},Normalise:{description:"Normalise the image",in:"query",name:"normalise",schema:{type:"boolean"}},NumberOfChannels:{description:"Audio channel count",in:"query",name:"numberOfChannels",schema:{enum:[1,2,3,4,5,6,7,8],type:"integer"}},PipelineColourspace:{description:"Set pipeline colourspace",in:"query",name:"pipelineColourspace",schema:{type:"boolean"}},Position:{description:"Position for cover/contain fits",in:"query",name:"position",schema:{oneOf:[{enum:["top","right","bottom","left","center"],type:"string"},{minimum:0,type:"integer"}]}},Quality:{description:"Quality setting (0-100 for images, affects compression)",in:"query",name:"quality",schema:{maximum:100,minimum:1,type:"integer"}},RemoveAlpha:{description:"Remove alpha channel",in:"query",name:"removeAlpha",schema:{type:"boolean"}},SampleRate:{description:"Audio sample rate in Hz",in:"query",name:"sampleRate",schema:{enum:[8e3,11025,16e3,22050,32e3,44100,48e3,88200,96e3,192e3],type:"integer"}},Saturation:{description:"Saturation multiplier for modulation",in:"query",name:"saturation",schema:{type:"number"}},Sharpen:{description:"Apply sharpening",in:"query",name:"sharpen",schema:{type:"boolean"}},Threshold:{description:"Apply thresholding with specified value (0-255)",in:"query",name:"threshold",schema:{maximum:255,minimum:0,type:"integer"}},Tint:{description:"Apply tinting",in:"query",name:"tint",schema:{type:"boolean"}},ToColourspace:{description:"Convert to colourspace",in:"query",name:"toColourspace",schema:{type:"boolean"}},Top:{description:"Crop area top offset",in:"query",name:"top",schema:{minimum:0,type:"integer"}},Unflatten:{description:"Unflatten alpha channel",in:"query",name:"unflatten",schema:{type:"boolean"}},Width:{description:"Desired width in pixels",in:"query",name:"width",schema:{minimum:1,type:"integer"}},WithoutEnlargement:{description:"Avoid enlarging images smaller than specified dimensions",in:"query",name:"withoutEnlargement",schema:{type:"boolean"}},WithoutReduction:{description:"Avoid reducing images larger than specified dimensions",in:"query",name:"withoutReduction",schema:{type:"boolean"}}},responses:{404:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Not Found"}},schemas:{...s("FileMetaPagination",{$ref:"#/components/schemas/PaginationMeta"},"#/components/schemas/PaginationMeta"),...o("PaginationMeta"),...m,...p,MediaTransformResult:{description:"Result of media transformation",properties:{bitrate:{description:"Bitrate for video/audio (bits per second)",type:"integer"},buffer:{description:"Binary data buffer (not included in JSON response)",type:"string"},duration:{description:"Duration for video/audio in seconds",type:"number"},format:{description:"Output format",type:"string"},height:{description:"Height for image/video in pixels",type:"integer"},mediaType:{description:"Type of media",enum:["image","video","audio"],type:"string"},numberOfChannels:{description:"Audio channel count",type:"integer"},originalFile:{$ref:"#/components/schemas/FileMeta"},sampleRate:{description:"Audio sample rate in Hz",type:"integer"},size:{description:"File size in bytes",type:"integer"},width:{description:"Width for image/video in pixels",type:"integer"}},required:["format","mediaType","originalFile","size"],type:"object"},ValidationError:{description:"Validation error response",properties:{code:{enum:["INVALID_PARAMS_FOR_IMAGE","INVALID_PARAMS_FOR_VIDEO","INVALID_PARAMS_FOR_AUDIO","INVALID_FIT_VALUE","INVALID_ANGLE_VALUE","INVALID_FORMAT","INCOMPLETE_CROP_PARAMS","INVALID_VIDEO_CODEC","INVALID_VIDEO_FORMAT","INVALID_WIDTH","INVALID_HEIGHT","INVALID_BITRATE","INVALID_FRAME_RATE","INVALID_KEY_FRAME_INTERVAL","INVALID_AUDIO_CODEC","INVALID_AUDIO_FORMAT","INVALID_CHANNEL_COUNT","INVALID_SAMPLE_RATE"],type:"string"},details:{properties:{invalidParams:{items:{type:"string"},type:"array"},mediaType:{enum:["image","video","audio"],type:"string"},suggestions:{items:{type:"string"},type:"array"},validParams:{items:{type:"string"},type:"array"}},required:["invalidParams","validParams","mediaType"],type:"object"},message:{type:"string"},name:{enum:["ValidationError"],type:"string"}},required:["code","details","message","name"],type:"object"}}},paths:{[`${e.replace(/\/$/,"")}/{id}/transform`]:{get:{description:"Get transformation metadata for a file without downloading. Returns information about supported transformations and current file properties.",operationId:`${r}TransformGetMetadata`,parameters:[{$ref:"#/components/parameters/FileID"}],responses:{200:{content:{"application/json":{schema:{description:"File transformation metadata",properties:{bitrate:{description:"Current bitrate for video/audio",type:"integer"},dimensions:{description:"Dimensions for image/video",properties:{height:{type:"integer"},width:{type:"integer"}},type:"object"},duration:{description:"Duration for video/audio in seconds",type:"number"},mediaType:{description:"Detected media type",enum:["image","video","audio"],type:"string"},numberOfChannels:{description:"Current channel count for audio",type:"integer"},originalFormat:{description:"Original file format",type:"string"},sampleRate:{description:"Current sample rate for audio",type:"integer"},supportedFormats:{description:"Supported output formats for this media type",items:{type:"string"},type:"array"},supportedParameters:{description:"Supported transformation parameters",items:{type:"string"},type:"array"}},required:["mediaType","supportedFormats","supportedParameters"],type:"object"}}},description:"Transformation metadata"},404:{$ref:"#/components/responses/404"},default:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Error"}},summary:"Get transformation metadata",tags:t}},[`${e.replace(/\/$/,"")}/{id}`]:{get:{description:"Retrieve and transform a file with optional media transformations. Supports resizing, cropping, format conversion, and codec changes based on query parameters.",operationId:`${r}TransformGetFile`,parameters:[{$ref:"#/components/parameters/FileID"},{$ref:"#/components/parameters/Format"},{$ref:"#/components/parameters/Quality"},{$ref:"#/components/parameters/Width"},{$ref:"#/components/parameters/Height"},{$ref:"#/components/parameters/Fit"},{$ref:"#/components/parameters/Position"},{$ref:"#/components/parameters/WithoutEnlargement"},{$ref:"#/components/parameters/WithoutReduction"},{$ref:"#/components/parameters/Left"},{$ref:"#/components/parameters/Top"},{$ref:"#/components/parameters/CropWidth"},{$ref:"#/components/parameters/CropHeight"},{$ref:"#/components/parameters/Angle"},{$ref:"#/components/parameters/Background"},{$ref:"#/components/parameters/Kernel"},{$ref:"#/components/parameters/FastShrinkOnLoad"},{$ref:"#/components/parameters/Blur"},{$ref:"#/components/parameters/Sharpen"},{$ref:"#/components/parameters/Median"},{$ref:"#/components/parameters/Clahe"},{$ref:"#/components/parameters/Threshold"},{$ref:"#/components/parameters/Gamma"},{$ref:"#/components/parameters/Negate"},{$ref:"#/components/parameters/Normalise"},{$ref:"#/components/parameters/Flatten"},{$ref:"#/components/parameters/Unflatten"},{$ref:"#/components/parameters/Flip"},{$ref:"#/components/parameters/Flop"},{$ref:"#/components/parameters/Greyscale"},{$ref:"#/components/parameters/Modulate"},{$ref:"#/components/parameters/Brightness"},{$ref:"#/components/parameters/Saturation"},{$ref:"#/components/parameters/Hue"},{$ref:"#/components/parameters/Lightness"},{$ref:"#/components/parameters/Tint"},{$ref:"#/components/parameters/Colourspace"},{$ref:"#/components/parameters/Affine"},{$ref:"#/components/parameters/Dilate"},{$ref:"#/components/parameters/Erode"},{$ref:"#/components/parameters/PipelineColourspace"},{$ref:"#/components/parameters/ToColourspace"},{$ref:"#/components/parameters/RemoveAlpha"},{$ref:"#/components/parameters/EnsureAlpha"},{$ref:"#/components/parameters/Codec"},{$ref:"#/components/parameters/Bitrate"},{$ref:"#/components/parameters/FrameRate"},{$ref:"#/components/parameters/KeyFrameInterval"},{$ref:"#/components/parameters/NumberOfChannels"},{$ref:"#/components/parameters/SampleRate"}],responses:{200:{content:{"*/*":{schema:{description:"Transformed media file",format:"binary",type:"string"}}},description:"Transformed file returned successfully",headers:{"Content-Type":{description:"MIME type of the transformed file",schema:{type:"string"}},ETag:{description:"ETag of the transformed file",schema:{type:"string"}},"X-Media-Type":{description:"Type of media (image/video/audio)",schema:{enum:["image","video","audio"],type:"string"}},"X-Original-Format":{description:"Original file format",schema:{type:"string"}},"X-Transformed-Format":{description:"Transformed file format",schema:{type:"string"}}}},400:{content:{"application/json":{examples:{ValidationError:{value:{error:{code:"INVALID_PARAMS_FOR_IMAGE",details:{invalidParams:["codec","bitrate"],mediaType:"image",validParams:["format","quality","width","height","fit","position","withoutEnlargement","withoutReduction","left","top","cropWidth","cropHeight","angle","background"]},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.",name:"ValidationError"}}}},schema:{$ref:"#/components/schemas/ValidationError"}}},description:"Invalid transformation parameters"},404:{$ref:"#/components/responses/404"},413:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"File too large for transformation"},415:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Unsupported media type for transformation"},default:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Error"}},summary:"Transform and retrieve file",tags:t}}}}},"swaggerSpec");export{g as default};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
2
|
+
import { U as UploadFile, j as ResponseBodyType, B as BaseStorage, k as ErrorResponses } from "./storage.d-RteRC-cG.js";
|
|
3
|
+
import 'node:stream';
|
|
4
|
+
import { M as MediaTransformer } from "./media-transformer.d-C3QvECD7.js";
|
|
5
|
+
import { U as UploadOptions } from "./types.d-cI_cMxcZ.js";
|
|
6
|
+
import 'node:crypto';
|
|
7
|
+
import 'node:http';
|
|
8
|
+
import 'lru-cache';
|
|
9
|
+
import '@visulima/pagination';
|
|
10
|
+
/**
|
|
11
|
+
* Core base class containing shared business logic for all handlers.
|
|
12
|
+
* This class is platform-agnostic and contains no Node.js or Web API specific code.
|
|
13
|
+
* @template TFile The file type used by this handler.
|
|
14
|
+
*/
|
|
15
|
+
declare abstract class BaseHandlerCore<TFile extends UploadFile> extends EventEmitter {
|
|
16
|
+
/**
|
|
17
|
+
* Response body type for the handler.
|
|
18
|
+
*/
|
|
19
|
+
responseType: ResponseBodyType;
|
|
20
|
+
/**
|
|
21
|
+
* Storage instance for file operations.
|
|
22
|
+
*/
|
|
23
|
+
storage: BaseStorage<TFile>;
|
|
24
|
+
/**
|
|
25
|
+
* Optional media transformer for image/video processing.
|
|
26
|
+
*/
|
|
27
|
+
mediaTransformer?: MediaTransformer;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to disable termination for finished uploads.
|
|
30
|
+
*/
|
|
31
|
+
disableTerminationForFinishedUploads?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Logger instance for debugging and error reporting.
|
|
34
|
+
*/
|
|
35
|
+
protected logger?: Console;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the logger instance.
|
|
38
|
+
* @returns Logger instance or undefined.
|
|
39
|
+
*/
|
|
40
|
+
get loggerInstance(): Console | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Internal error responses configuration.
|
|
43
|
+
*/
|
|
44
|
+
protected internalErrorResponses: ErrorResponses;
|
|
45
|
+
/**
|
|
46
|
+
* Gets the error responses configuration.
|
|
47
|
+
* @returns Error responses configuration.
|
|
48
|
+
*/
|
|
49
|
+
get errorResponses(): ErrorResponses;
|
|
50
|
+
constructor({
|
|
51
|
+
disableTerminationForFinishedUploads,
|
|
52
|
+
mediaTransformer,
|
|
53
|
+
storage
|
|
54
|
+
}: UploadOptions<TFile>);
|
|
55
|
+
/**
|
|
56
|
+
* Sets custom error responses.
|
|
57
|
+
* @param value Partial error responses to override defaults.
|
|
58
|
+
*/
|
|
59
|
+
set errorResponses(value: Partial<ErrorResponses>);
|
|
60
|
+
/**
|
|
61
|
+
* Assemble error responses by merging defaults with custom overrides.
|
|
62
|
+
* @param customErrors Custom error responses to override defaults
|
|
63
|
+
*/
|
|
64
|
+
assembleErrors: (customErrors?: {}) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Parses HTTP Range header and returns start/end byte positions for partial content requests.
|
|
67
|
+
* @param rangeHeader HTTP Range header value (e.g., "bytes=0-1023").
|
|
68
|
+
* @param fileSize Total size of the file in bytes.
|
|
69
|
+
* @returns Object with start and end positions, or undefined if range is invalid.
|
|
70
|
+
*/
|
|
71
|
+
parseRangeHeader(rangeHeader: string | undefined, fileSize: number): {
|
|
72
|
+
end: number;
|
|
73
|
+
start: number;
|
|
74
|
+
} | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Build file URL from request and file data.
|
|
77
|
+
* Platform-agnostic version that accepts URL string.
|
|
78
|
+
* @param requestUrl Request URL string
|
|
79
|
+
* @param file File object containing ID and content type
|
|
80
|
+
* @returns Constructed file URL with extension based on content type
|
|
81
|
+
*/
|
|
82
|
+
protected buildFileUrlFromString(requestUrl: string, file: TFile): string;
|
|
83
|
+
/**
|
|
84
|
+
* Negotiates content type based on Accept header and supported formats.
|
|
85
|
+
* Platform-agnostic version that accepts header string.
|
|
86
|
+
* @param acceptHeader Accept header value
|
|
87
|
+
* @param supportedTypes Array of supported MIME types to match against
|
|
88
|
+
* @returns Best matching content type or undefined if no match found
|
|
89
|
+
*/
|
|
90
|
+
negotiateContentTypeFromHeader(acceptHeader: string | undefined, supportedTypes: string[]): string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Check for undefined ID or path errors and throw appropriate HTTP errors.
|
|
93
|
+
* @param error The error to check
|
|
94
|
+
*/
|
|
95
|
+
protected checkForUndefinedIdOrPath(error: unknown): void;
|
|
96
|
+
}
|
|
97
|
+
declare const TUS_RESUMABLE: string;
|
|
98
|
+
declare const TUS_VERSION: string;
|
|
99
|
+
export { BaseHandlerCore as B, TUS_RESUMABLE as T, TUS_VERSION as a };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var o=(t,a)=>c(t,"name",{value:a,configurable:!0});import{createHash as d}from"node:crypto";import{createPaginationMetaSchemaObject as m,createPaginationSchemaObject as p}from"@visulima/pagination";import{sharedGet as u,sharedFileMetaSchemaObject as l,sharedErrorSchemaObject as f,sharedFileMetaExampleObject as T,sharedGetList as b,sharedGetMeta as r}from"./sharedGet-Ce7WGAsc.js";var U=Object.defineProperty,g=o((t,a)=>U(t,"name",{value:a,configurable:!0}),"o");const R=g((t,a)=>{const{supportedTransformerFormat:i,tags:e,transformer:h}={tags:["Tus"],transformer:!1,...a},s=d("sha256").update(t).digest("base64"),n=u(`${s}TusGetFile`,e,h,i);return{components:{examples:T,responses:{404:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Not Found"}},schemas:{"Tus-Checksum-Algorithm":{description:"Added by the checksum extension. The Tus-Checksum-Algorithm response header MUST be a comma-separated list of the checksum algorithms supported by the server.",type:"string"},"Tus-Extension":{description:"The Tus-Extension response header MUST be a comma-separated list of the extensions supported by the Server. If no extensions are supported, the Tus-Extension header MUST be omitted.",type:"string"},"Tus-Max-Size":{description:"The Tus-Max-Size response header MUST be a non-negative integer indicating the maximum allowed size of an entire upload in bytes. The Server SHOULD set this header if there is a known hard limit.",type:"integer"},"Tus-Resumable":{description:"Protocol version",enum:["1.0.0"],type:"string"},"Tus-Version":{description:"The Tus-Version response header MUST be a comma-separated list of protocol versions supported by the Server. The list MUST be sorted by Server's preference where the first one is the most preferred one.",type:"string"},"Upload-Checksum":{description:"Added by the checksum extension. The Upload-Checksum request header contains information about the checksum of the current body payload. The header MUST consist of the name of the used checksum algorithm and the Base64 encoded checksum separated by a space.",type:"string"},"Upload-Length":{description:"The Upload-Length request and response header indicates the size of the entire upload in bytes. The value MUST be a non-negative integer. In the concatenation extension, the Client MUST NOT include the Upload-Length header in the final upload creation",type:"integer"},"Upload-Offset":{description:"The Upload-Offset request and response header indicates a byte offset within a resource. The value MUST be a non-negative integer.",type:"integer"},...p("FileMetaPagination",{$ref:"#/components/schemas/PaginationMeta"},"#/components/schemas/PaginationMeta"),...m("PaginationMeta"),...f,...l}},paths:{[`${t.replace(/\/$/,"")}/{id}/metadata`]:{get:{...r(`${s}TusGetFileMeta`,e),parameters:[...r(`${s}TusGetFileMeta`,e).parameters,{description:"Version of the protocol supported by the client",in:"header",name:"Tus-Resumable",required:!0,schema:{$ref:"#/components/schemas/Tus-Resumable"}}]}},[`${t.replace(/\/$/,"")}/{id}`]:{delete:{description:"When receiving a DELETE request for an existing upload the Server SHOULD free associated resources and MUST respond with the 204 No Content status confirming that the upload was terminated. For all future requests to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone status.",operationId:`${s}TusFilesDelete`,parameters:[{in:"path",name:"id",required:!0,schema:{type:"string"}},{in:"header",name:"Tus-Resumable",required:!0,schema:{$ref:"#/components/schemas/Tus-Resumable"}}],responses:{204:{description:"Upload was terminated",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},412:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Precondition Failed",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}},"Tus-Version":{schema:{$ref:"#/components/schemas/Tus-Version"}}}}},summary:"Added by the Termination extension.",tags:e},get:{...n,parameters:[...n.parameters,{description:"Version of the protocol supported by the client",in:"header",name:"Tus-Resumable",required:!0,schema:{$ref:"#/components/schemas/Tus-Resumable"}}]},head:{description:"Used to determine the offset at which the upload should be continued.",operationId:`${s}TusFilesHead`,parameters:[{in:"path",name:"id",required:!0,schema:{type:"string"}},{in:"header",name:"Tus-Resumable",required:!0,schema:{$ref:"#/components/schemas/Tus-Resumable"}}],responses:{200:{description:"Returns offset",headers:{"Cache-Control":{schema:{enum:["no-store"],type:"string"}},"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}},"Upload-Length":{schema:{$ref:"#/components/schemas/Upload-Length"}},"Upload-Offset":{schema:{$ref:"#/components/schemas/Upload-Offset"}}}},403:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},404:{$ref:"#/components/responses/404"},410:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"If the resource is not found, the Server SHOULD return either the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset header.",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},412:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Precondition Failed",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}},"Tus-Version":{schema:{$ref:"#/components/schemas/Tus-Version"}}}}},summary:"Used to determine the offset at which the upload should be continued.",tags:e},patch:{description:"The Server SHOULD accept PATCH requests against any upload URL and apply the bytes contained in the message at the given offset specified by the Upload-Offset header. All PATCH requests MUST use Content-Type: application/offset+octet-stream, otherwise the server SHOULD return a 415 Unsupported Media Type status.",operationId:`${s}TusFilePatch`,parameters:[{in:"path",name:"id",required:!0,schema:{type:"string"}},{in:"header",name:"Tus-Resumable",required:!0,schema:{$ref:"#/components/schemas/Tus-Resumable"}},{description:"Length of the body of this request",in:"header",name:"Content-Length",required:!0,schema:{type:"integer"}},{in:"header",name:"Upload-Offset",required:!0,schema:{$ref:"#/components/schemas/Upload-Offset"}},{in:"header",name:"Upload-Checksum",schema:{$ref:"#/components/schemas/Upload-Checksum"}}],requestBody:{content:{"application/offset+octet-stream":{schema:{type:"string"}}},description:"Remaining (possibly partial) content of the file. Required if Content-Length > 0.",required:!1},responses:{204:{description:"Upload offset was updated",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}},"Upload-Expires":{description:"Added by the expiration extension. The Upload-Expires response header indicates the time after which the unfinished upload expires. A Server MAY wish to remove incomplete upload after a given period of time to prevent abandoned upload from taking up extra storage. The Client SHOULD use this header to determine if an upload is still valid before attempting to resume the upload. This header MUST be included in every PATCH response if the upload is going to expire. If the expiration is known at the creation, the Upload-Expires header MUST be included in the response to the initial POST request. Its value MAY change over time. If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the 404 Not Found or 410 Gone status. The latter one SHOULD be used if the Server is keeping track of expired upload. In both cases the Client SHOULD start a new upload. The value of the Upload-Expires header MUST be in RFC 7231 datetime format.",schema:{type:"string"}},"Upload-Offset":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},400:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Added by the checksum extension. The checksum algorithm is not supported by the server",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},403:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"In the concatenation extension, the Server MUST respond with the 403 Forbidden status to PATCH requests against a final upload URL and MUST NOT modify the final or its partial upload.",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},404:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"PATCH request against a non-existent resource",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},409:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"PATCH request with Upload-Offset unequal to the offset of the resource on the server. The Upload-Offset header's value MUST be equal to the current offset of the resource.",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},410:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"PATCH request against a non-existent resource",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},412:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Precondition Failed",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}},"Tus-Version":{schema:{$ref:"#/components/schemas/Tus-Version"}}}},415:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Content-Type was not application/offset+octet-stream",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},460:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Added by the checksum extension. Checksums mismatch",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}}},summary:"Used to resume the upload",tags:e}},[t.trimEnd()]:{get:b(`${s}TusGetList`,e),options:{operationId:`${s}TusOptions`,responses:{204:{description:"Success",headers:{"Tus-Checksum-Algorithm":{schema:{$ref:"#/components/schemas/Tus-Checksum-Algorithm"}},"Tus-Extension":{schema:{$ref:"#/components/schemas/Tus-Extension"}},"Tus-Max-Size":{schema:{$ref:"#/components/schemas/Tus-Max-Size"}},"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}},"Tus-Version":{schema:{$ref:"#/components/schemas/Tus-Version"}}}}},summary:"Request to gather information about the Server's current configuration",tags:e},post:{description:"Endpoint for the Creation extension. Modified by the Creation With Upload extension.",operationId:`${s}TusCreate`,parameters:[{description:"Must be 0 for creation extension. May be a positive number for Creation With Upload extension.",in:"header",name:"Content-Length",schema:{type:"integer"}},{in:"header",name:"Upload-Length",schema:{$ref:"#/components/schemas/Upload-Length"}},{in:"header",name:"Tus-Resumable",schema:{$ref:"#/components/schemas/Tus-Resumable"}},{description:"Added by the Creation extension. The Upload-Metadata request and response header MUST consist of one or more comma-separated key-value pairs. The key and value MUST be separated by a space. The key MUST NOT contain spaces and commas and MUST NOT be empty. The key SHOULD be ASCII encoded and the value MUST be Base64 encoded. All keys MUST be unique. The value MAY be empty. In these cases, the space, which would normally separate the key and the value, MAY be left out. Since metadata can contain arbitrary binary values, Servers SHOULD carefully validate metadata values or sanitize them before using them as header values to avoid header smuggling.",in:"header",name:"Upload-Metadata",schema:{type:"string"}},{description:"Added by the Concatenation extension. The Upload-Concat request and response header MUST be set in both partial and final upload creation requests. It indicates whether the upload is either a partial or final upload. If the upload is a partial one, the header value MUST be partial. In the case of a final upload, its value MUST be final followed by a semicolon and a space-separated list of partial upload URLs that will be concatenated. The partial upload URLs MAY be absolute or relative and MUST NOT contain spaces as defined in RFC 3986.",in:"header",name:"Upload-Concat",schema:{type:"string"}},{description:"Added by the Creation Defer Length extension. The Upload-Defer-Length request and response header indicates that the size of the upload is not known currently and will be transferred later. Its value MUST be 1. If the length of an upload is not deferred, this header MUST be omitted.",in:"header",name:"Upload-Defer-Length",schema:{enum:[1],type:"integer"}},{in:"header",name:"Upload-Offset",schema:{$ref:"#/components/schemas/Upload-Offset"}},{in:"header",name:"Upload-Checksum",schema:{$ref:"#/components/schemas/Upload-Checksum"}}],requestBody:{content:{"application/offset+octet-stream":{schema:{type:"string"}}},description:"(Possibly partial) content of the file. Required if Content-Length > 0.",required:!1},responses:{201:{description:"Created",headers:{Location:{description:"Url of the created resource.",schema:{type:"string"}},"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}},"Upload-Expires":{description:"Added by the Creation With Upload Extension in combination with the expiration extension. The Upload-Expires response header indicates the time after which the unfinished upload expires. A Server MAY wish to remove incomplete upload after a given period of time to prevent abandoned upload from taking up extra storage. The Client SHOULD use this header to determine if an upload is still valid before attempting to resume the upload. This header MUST be included in every PATCH response if the upload is going to expire. If the expiration is known at the creation, the Upload-Expires header MUST be included in the response to the initial POST request. Its value MAY change over time. If a Client does attempt to resume an upload which has since been removed by the Server, the Server SHOULD respond with the 404 Not Found or 410 Gone status. The latter one SHOULD be used if the Server is keeping track of expired upload. In both cases the Client SHOULD start a new upload. The value of the Upload-Expires header MUST be in RFC 7231 datetime format.",schema:{type:"string"}},"Upload-Offset":{schema:{$ref:"#/components/schemas/Upload-Offset"}}}},400:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Added by the Creation With Upload Extension in combination with the checksum extension. The checksum algorithm is not supported by the server",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},412:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Precondition Failed",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}},"Tus-Version":{schema:{$ref:"#/components/schemas/Tus-Version"}}}},413:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"If the length of the upload exceeds the maximum, which MAY be specified using the Tus-Max-Size header, the Server MUST respond with the 413 Request Entity Too Large status.",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},415:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Added by the Creation With Upload Extension. Content-Type was not application/offset+octet-stream",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}},460:{content:{"application/json":{schema:{$ref:"#/components/schemas/Error"}}},description:"Added by the Creation With Upload Extension in combination with the checksum extension. Checksums mismatch",headers:{"Tus-Resumable":{schema:{$ref:"#/components/schemas/Tus-Resumable"}}}}},summary:"An empty POST request is used to create a new upload resource. The Upload-Length header indicates the size of the entire upload in bytes. If the Creation With Upload extension is available, the Client MAY include parts of the upload in the initial Creation request",tags:e}}}}},"swaggerSpec");export{R as default};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { F as File, L as LocalMetaStorageOptions, i as BaseStorageOptions } from "./storage.d-RteRC-cG.js";
|
|
2
|
+
import 'node:stream';
|
|
3
|
+
import { Client } from '@microsoft/microsoft-graph-client';
|
|
4
|
+
declare class OneDriveFile extends File {
|
|
5
|
+
driveItemId?: string;
|
|
6
|
+
eTag?: string;
|
|
7
|
+
webUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
interface OneDriveClientCredentialsAuth {
|
|
10
|
+
/**
|
|
11
|
+
* Microsoft Entra (Azure AD) application (client) ID.
|
|
12
|
+
*/
|
|
13
|
+
clientId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Application (client) secret.
|
|
16
|
+
*/
|
|
17
|
+
clientSecret: string;
|
|
18
|
+
/**
|
|
19
|
+
* Microsoft Entra tenant ID (GUID or domain name).
|
|
20
|
+
*/
|
|
21
|
+
tenantId: string;
|
|
22
|
+
}
|
|
23
|
+
interface OneDriveOAuthRefreshAuth {
|
|
24
|
+
/**
|
|
25
|
+
* Microsoft Entra application (client) ID.
|
|
26
|
+
*/
|
|
27
|
+
clientId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Application client secret. Required for confidential clients (default).
|
|
30
|
+
* Public clients may omit it if the app registration allows.
|
|
31
|
+
*/
|
|
32
|
+
clientSecret?: string;
|
|
33
|
+
/**
|
|
34
|
+
* OAuth2 refresh token obtained from an interactive sign-in flow.
|
|
35
|
+
*/
|
|
36
|
+
refreshToken: string;
|
|
37
|
+
/**
|
|
38
|
+
* Tenant ID — `"common"`, `"consumers"`, `"organizations"`, or a tenant
|
|
39
|
+
* GUID/domain. Defaults to `"common"`.
|
|
40
|
+
*/
|
|
41
|
+
tenantId?: string;
|
|
42
|
+
}
|
|
43
|
+
interface OneDriveStorageOptions extends BaseStorageOptions {
|
|
44
|
+
/**
|
|
45
|
+
* Static or dynamic access token. Pass a string for a one-shot token, or
|
|
46
|
+
* a function returning a fresh token on each call.
|
|
47
|
+
*/
|
|
48
|
+
accessToken?: string | (() => string | Promise<string>);
|
|
49
|
+
/**
|
|
50
|
+
* Pre-built `@microsoft/microsoft-graph-client` `Client`. Escape hatch for
|
|
51
|
+
* callers that wire up their own `AuthenticationProvider` (e.g. with
|
|
52
|
+
* `@azure/identity` or `@azure/msal-node`).
|
|
53
|
+
*/
|
|
54
|
+
client?: Client;
|
|
55
|
+
/**
|
|
56
|
+
* Client-credentials auth — for app-only / daemon scenarios.
|
|
57
|
+
* Cannot be used with `/me/drive`; you must target via `driveId`,
|
|
58
|
+
* `siteId`, or `userId`.
|
|
59
|
+
*/
|
|
60
|
+
clientCredentials?: OneDriveClientCredentialsAuth;
|
|
61
|
+
/**
|
|
62
|
+
* Timeout, in milliseconds, for polling the async-copy monitor URL.
|
|
63
|
+
* Defaults to 60_000 (60s).
|
|
64
|
+
*/
|
|
65
|
+
copyTimeoutMs?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Target drive by ID. Mutually exclusive with `siteId` and `userId`.
|
|
68
|
+
*/
|
|
69
|
+
driveId?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Configure metafiles storage. Defaults to local tmp directory.
|
|
72
|
+
*/
|
|
73
|
+
metaStorageConfig?: LocalMetaStorageOptions;
|
|
74
|
+
/**
|
|
75
|
+
* OAuth2 refresh-token auth — for delegated user scenarios. Exchanges
|
|
76
|
+
* the refresh token at the Microsoft identity platform and caches the
|
|
77
|
+
* resulting access token until ~60s before expiry.
|
|
78
|
+
*/
|
|
79
|
+
oauth?: OneDriveOAuthRefreshAuth;
|
|
80
|
+
/**
|
|
81
|
+
* When `true`, `getReadUrl` creates an anonymous shared link with
|
|
82
|
+
* `view` permission. Otherwise it returns the short-lived pre-authenticated
|
|
83
|
+
* `@microsoft.graph.downloadUrl` from the item metadata.
|
|
84
|
+
*/
|
|
85
|
+
publicByDefault?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Logical "bucket root" — virtual keys live under this folder path within
|
|
88
|
+
* the target drive. Must already exist; the adapter does not create
|
|
89
|
+
* folders. Defaults to drive root.
|
|
90
|
+
*/
|
|
91
|
+
rootFolderPath?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Target a SharePoint site's default drive. Mutually exclusive with
|
|
94
|
+
* `driveId` and `userId`.
|
|
95
|
+
*/
|
|
96
|
+
siteId?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Target a specific user's drive. Mutually exclusive with `driveId` and
|
|
99
|
+
* `siteId`. Required when using `clientCredentials` auth (Graph does not
|
|
100
|
+
* accept `/me/drive` for app-only tokens).
|
|
101
|
+
*/
|
|
102
|
+
userId?: string;
|
|
103
|
+
}
|
|
104
|
+
export { OneDriveFile as O, OneDriveStorageOptions as a, OneDriveClientCredentialsAuth as b, OneDriveOAuthRefreshAuth as c };
|