@visulima/storage 1.0.9 → 1.0.10

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.
Files changed (143) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/adapter/nuxt/module.d.ts +8 -8
  3. package/dist/ai/ai-sdk/index.d.ts +51 -59
  4. package/dist/ai/claude/index.d.ts +104 -119
  5. package/dist/ai/openai/index.d.ts +86 -99
  6. package/dist/ai/tanstack/index.d.ts +53 -61
  7. package/dist/handler/http/fetch/index.d.ts +201 -201
  8. package/dist/handler/http/hono/index.d.ts +59 -59
  9. package/dist/handler/http/nextjs/index.d.ts +54 -54
  10. package/dist/handler/http/node/index.d.ts +233 -246
  11. package/dist/handler/http/solid-start/index.d.ts +54 -54
  12. package/dist/index.d.ts +70 -70
  13. package/dist/index.js +1 -1
  14. package/dist/packem_shared/{AwsLightStorage-BK-WPL0h.js → AwsLightStorage-EsqkAtU5.js} +1 -1
  15. package/dist/packem_shared/{AzureStorage-1UvDIQZd.js → AzureStorage-DL-U7qFG.js} +1 -1
  16. package/dist/packem_shared/BoxMetaStorage-CHWrhgg2.js +1 -0
  17. package/dist/packem_shared/{BoxStorage-DbGqBLux.js → BoxStorage-B8_oCz27.js} +1 -1
  18. package/dist/packem_shared/BunS3MetaStorage-CHWrhgg2.js +1 -0
  19. package/dist/packem_shared/{BunS3Storage-DNvimm9e.js → BunS3Storage-_PVXu_na.js} +1 -1
  20. package/dist/packem_shared/BunnyMetaStorage-CHWrhgg2.js +1 -0
  21. package/dist/packem_shared/{BunnyStorage-C7d0opLL.js → BunnyStorage-BsoWjScH.js} +1 -1
  22. package/dist/packem_shared/CloudinaryMetaStorage-BI9YXcwU.js +1 -0
  23. package/dist/packem_shared/{CloudinaryStorage-Dc3XA2lP.js → CloudinaryStorage-BNwiLF9V.js} +1 -1
  24. package/dist/packem_shared/{DiskStorage-CI07TVNu.js → DiskStorage-D-NtQDms.js} +1 -1
  25. package/dist/packem_shared/{DiskStorageWithChecksum-vFCubS6K.js → DiskStorageWithChecksum-UnCtyEvs.js} +1 -1
  26. package/dist/packem_shared/DropboxMetaStorage-CHWrhgg2.js +1 -0
  27. package/dist/packem_shared/{DropboxStorage-CY9Ggu3m.js → DropboxStorage-BS9kj0nH.js} +1 -1
  28. package/dist/packem_shared/FirebaseMetaStorage-BI9YXcwU.js +1 -0
  29. package/dist/packem_shared/{FirebaseStorage-D6O9CJXN.js → FirebaseStorage-DNquii2p.js} +1 -1
  30. package/dist/packem_shared/FtpMetaStorage-CHWrhgg2.js +1 -0
  31. package/dist/packem_shared/{FtpStorage-DbEjbq8z.js → FtpStorage-Bd004--s.js} +1 -1
  32. package/dist/packem_shared/{GCSMetaStorage-DT8K6zdm.js → GCSMetaStorage-Bf4qDFB1.js} +1 -1
  33. package/dist/packem_shared/{GCStorage-6BHkFlEs.js → GCStorage-ChqEpgqR.js} +1 -1
  34. package/dist/packem_shared/GoogleDriveMetaStorage-xlHfKwmR.js +1 -0
  35. package/dist/packem_shared/{GoogleDriveStorage-Bklsz7Bh.js → GoogleDriveStorage-v1glykjd.js} +1 -1
  36. package/dist/packem_shared/{LocalMetaStorage-BhicZnNl.js → LocalMetaStorage-YWPBYEe7.js} +1 -1
  37. package/dist/packem_shared/NetlifyBlobMetaStorage-BI9YXcwU.js +1 -0
  38. package/dist/packem_shared/{NetlifyBlobStorage-CkpCCoN1.js → NetlifyBlobStorage-BPyEWSnx.js} +1 -1
  39. package/dist/packem_shared/OneDriveMetaStorage-xlHfKwmR.js +1 -0
  40. package/dist/packem_shared/{OneDriveStorage-CP6MvGAa.js → OneDriveStorage-BJ3Kzxc5.js} +1 -1
  41. package/dist/packem_shared/PocketBaseMetaStorage-DnrxOQhO.js +1 -0
  42. package/dist/packem_shared/{PocketBaseStorage-2qhbI2PW.js → PocketBaseStorage-DqKHbbvn.js} +1 -1
  43. package/dist/packem_shared/{S3Storage-YGeNk3Tt.js → S3Storage-BiI2k6d1.js} +1 -1
  44. package/dist/packem_shared/SftpMetaStorage-CHWrhgg2.js +1 -0
  45. package/dist/packem_shared/{SftpStorage-2Hz396Xr.js → SftpStorage-w8XdtZtw.js} +1 -1
  46. package/dist/packem_shared/SharePointMetaStorage-CHWrhgg2.js +1 -0
  47. package/dist/packem_shared/{SharePointStorage-CrX2Pk6C.js → SharePointStorage-DpDpI7Ln.js} +1 -1
  48. package/dist/packem_shared/SupabaseMetaStorage-xlHfKwmR.js +1 -0
  49. package/dist/packem_shared/{SupabaseStorage-Dc_DBX29.js → SupabaseStorage-B_ugUCs7.js} +1 -1
  50. package/dist/packem_shared/UploadThingMetaStorage-BI9YXcwU.js +1 -0
  51. package/dist/packem_shared/{UploadThingStorage-BChykYSe.js → UploadThingStorage-_H45IVqX.js} +1 -1
  52. package/dist/packem_shared/VercelBlobMetaStorage-CHWrhgg2.js +1 -0
  53. package/dist/packem_shared/{VercelBlobStorage-CsRyPfw3.js → VercelBlobStorage-U1YMKeHs.js} +1 -1
  54. package/dist/packem_shared/{approval.d-CMAYH9GF.d.ts → approval.d-C-d-t94D.d.ts} +6 -6
  55. package/dist/packem_shared/disk-storage-BwPk2IRa.js +1 -0
  56. package/dist/packem_shared/disk-storage-with-checksum.d-CQucFacO.d.ts +146 -0
  57. package/dist/packem_shared/{executors.d-BZP2rWo3.d.ts → executors.d-DeDH3Ilt.d.ts} +2 -2
  58. package/dist/packem_shared/files.d-D8H_ge9Y.d.ts +655 -0
  59. package/dist/packem_shared/{gcs-meta-storage-B7BnctnV.js → gcs-meta-storage-DQGu_cHq.js} +1 -1
  60. package/dist/packem_shared/local-meta-storage-DJDcuxf1.js +11 -0
  61. package/dist/packem_shared/{local-meta-storage.d-D9PBfkn6.d.ts → local-meta-storage.d-DuTEzyii.d.ts} +7 -7
  62. package/dist/packem_shared/media-transformer.d-CvMFjINm.d.ts +331 -0
  63. package/dist/packem_shared/{memory-storage.d-4EU1cMt1.d.ts → memory-storage.d-BRdTiY8y.d.ts} +32 -40
  64. package/dist/packem_shared/{s3-base-storage-BoTyhuzO.js → s3-base-storage-CMUui93V.js} +1 -1
  65. package/dist/packem_shared/{s3-base-storage.d-BQgP5B-t.d.ts → s3-base-storage.d-Cg7m4FuH.d.ts} +64 -70
  66. package/dist/packem_shared/storage.d-DIav_lF1.d.ts +1163 -0
  67. package/dist/packem_shared/tus-base.d-BiEg5t4t.d.ts +102 -0
  68. package/dist/packem_shared/{types.d-CrUWY4On.d.ts → types.d-CAAzKiI6.d.ts} +134 -134
  69. package/dist/packem_shared/types.d-DgHhkCAl.d.ts +104 -0
  70. package/dist/packem_shared/{types.d-CggTCgXr.d.ts → types.d-jAs_Rp_v.d.ts} +3 -3
  71. package/dist/storage/aws/clients/index.d.ts +388 -388
  72. package/dist/storage/aws/index.d.ts +109 -113
  73. package/dist/storage/aws/index.js +1 -1
  74. package/dist/storage/aws-light/index.d.ts +63 -67
  75. package/dist/storage/aws-light/index.js +1 -1
  76. package/dist/storage/azure/index.d.ts +133 -139
  77. package/dist/storage/azure/index.js +1 -1
  78. package/dist/storage/box/index.d.ts +88 -92
  79. package/dist/storage/box/index.js +1 -1
  80. package/dist/storage/bun-s3/index.d.ts +70 -76
  81. package/dist/storage/bun-s3/index.js +1 -1
  82. package/dist/storage/bunny/index.d.ts +51 -55
  83. package/dist/storage/bunny/index.js +1 -1
  84. package/dist/storage/cloudinary/index.d.ts +53 -59
  85. package/dist/storage/cloudinary/index.js +1 -1
  86. package/dist/storage/dropbox/index.d.ts +58 -62
  87. package/dist/storage/dropbox/index.js +1 -1
  88. package/dist/storage/firebase/index.d.ts +73 -79
  89. package/dist/storage/firebase/index.js +1 -1
  90. package/dist/storage/ftp/index.d.ts +37 -43
  91. package/dist/storage/ftp/index.js +1 -1
  92. package/dist/storage/gcs/index.d.ts +89 -95
  93. package/dist/storage/gcs/index.js +1 -1
  94. package/dist/storage/google-drive/index.d.ts +68 -72
  95. package/dist/storage/google-drive/index.js +1 -1
  96. package/dist/storage/local/index.d.ts +3 -3
  97. package/dist/storage/local/index.js +1 -1
  98. package/dist/storage/memory/index.d.ts +2 -2
  99. package/dist/storage/netlify-blob/index.d.ts +85 -93
  100. package/dist/storage/netlify-blob/index.js +1 -1
  101. package/dist/storage/onedrive/index.d.ts +43 -53
  102. package/dist/storage/onedrive/index.js +1 -1
  103. package/dist/storage/pocketbase/index.d.ts +66 -72
  104. package/dist/storage/pocketbase/index.js +1 -1
  105. package/dist/storage/sftp/index.d.ts +39 -45
  106. package/dist/storage/sftp/index.js +1 -1
  107. package/dist/storage/sharepoint/index.d.ts +95 -95
  108. package/dist/storage/sharepoint/index.js +1 -1
  109. package/dist/storage/supabase/index.d.ts +49 -55
  110. package/dist/storage/supabase/index.js +1 -1
  111. package/dist/storage/uploadthing/index.d.ts +33 -37
  112. package/dist/storage/uploadthing/index.js +1 -1
  113. package/dist/storage/vercel-blob/index.d.ts +109 -115
  114. package/dist/storage/vercel-blob/index.js +1 -1
  115. package/dist/transformer/audio-transformer.d.ts +96 -96
  116. package/dist/transformer/image-transformer.d.ts +422 -422
  117. package/dist/transformer/index.d.ts +34 -34
  118. package/dist/transformer/video-transformer.d.ts +111 -111
  119. package/package.json +1 -1
  120. package/dist/packem_shared/BoxMetaStorage-BSn6Qfnf.js +0 -1
  121. package/dist/packem_shared/BunS3MetaStorage-BSn6Qfnf.js +0 -1
  122. package/dist/packem_shared/BunnyMetaStorage-BSn6Qfnf.js +0 -1
  123. package/dist/packem_shared/CloudinaryMetaStorage-DPVnmNe5.js +0 -1
  124. package/dist/packem_shared/DropboxMetaStorage-BSn6Qfnf.js +0 -1
  125. package/dist/packem_shared/FirebaseMetaStorage-DPVnmNe5.js +0 -1
  126. package/dist/packem_shared/FtpMetaStorage-BSn6Qfnf.js +0 -1
  127. package/dist/packem_shared/GoogleDriveMetaStorage-Cbwa1CHV.js +0 -1
  128. package/dist/packem_shared/NetlifyBlobMetaStorage-DPVnmNe5.js +0 -1
  129. package/dist/packem_shared/OneDriveMetaStorage-Cbwa1CHV.js +0 -1
  130. package/dist/packem_shared/PocketBaseMetaStorage-DOTLwVE7.js +0 -1
  131. package/dist/packem_shared/SftpMetaStorage-BSn6Qfnf.js +0 -1
  132. package/dist/packem_shared/SharePointMetaStorage-BSn6Qfnf.js +0 -1
  133. package/dist/packem_shared/SupabaseMetaStorage-Cbwa1CHV.js +0 -1
  134. package/dist/packem_shared/UploadThingMetaStorage-DPVnmNe5.js +0 -1
  135. package/dist/packem_shared/VercelBlobMetaStorage-BSn6Qfnf.js +0 -1
  136. package/dist/packem_shared/disk-storage-CsQcYW3s.js +0 -1
  137. package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +0 -156
  138. package/dist/packem_shared/files.d-CH0iLBNC.d.ts +0 -655
  139. package/dist/packem_shared/local-meta-storage-iuJnu90B.js +0 -11
  140. package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +0 -331
  141. package/dist/packem_shared/storage.d-CEM1upWM.d.ts +0 -1176
  142. package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +0 -106
  143. package/dist/packem_shared/types.d-Bon9GVVe.d.ts +0 -104
@@ -1,4 +1,4 @@
1
- import { F as File, k as MetaStorageOptions, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, R as RetryConfig, d as FileInit, O as OperationOptions, f as FileQuery, o as BatchOperationResponse, e as FilePart, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
1
+ import { F as File, k as MetaStorageOptions, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, R as RetryConfig, d as FileInit, O as OperationOptions, f as FileQuery, o as BatchOperationResponse, e as FilePart, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DIav_lF1.js";
2
2
  import 'node:stream';
3
3
  import { TokenCredential } from '@azure/core-auth';
4
4
  import { BlobServiceClient } from '@azure/storage-blob';
@@ -11,58 +11,58 @@ declare class AzureFile extends File {
11
11
  }
12
12
  interface ClientConfig {
13
13
  /**
14
- * Azure account key. Resolved from `AZURE_STORAGE_ACCOUNT_KEY` when omitted.
15
- */
14
+ * Azure account key. Resolved from `AZURE_STORAGE_ACCOUNT_KEY` when omitted.
15
+ */
16
16
  accountKey?: string;
17
17
  /**
18
- * Azure account name. Resolved from `AZURE_STORAGE_ACCOUNT` when omitted.
19
- */
18
+ * Azure account name. Resolved from `AZURE_STORAGE_ACCOUNT` when omitted.
19
+ */
20
20
  accountName?: string;
21
21
  /**
22
- * Azure container name.
23
- */
22
+ * Azure container name.
23
+ */
24
24
  containerName: string;
25
25
  /**
26
- * Microsoft Entra credential for Azure AD / Managed Identity workloads
27
- * (e.g. `DefaultAzureCredential` from `@azure/identity`). When supplied
28
- * without a shared key, SDK operations use token auth and signed URLs are
29
- * minted via User Delegation SAS.
30
- *
31
- * The principal must be allowed to access blob data and to call
32
- * `Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action`
33
- * (for example via Storage Blob Data Contributor + Storage Blob Delegator).
34
- */
26
+ * Microsoft Entra credential for Azure AD / Managed Identity workloads
27
+ * (e.g. `DefaultAzureCredential` from `@azure/identity`). When supplied
28
+ * without a shared key, SDK operations use token auth and signed URLs are
29
+ * minted via User Delegation SAS.
30
+ *
31
+ * The principal must be allowed to access blob data and to call
32
+ * `Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action`
33
+ * (for example via Storage Blob Data Contributor + Storage Blob Delegator).
34
+ */
35
35
  credential?: TokenCredential;
36
36
  /**
37
- * Azure endpoint.
38
- */
37
+ * Azure endpoint.
38
+ */
39
39
  endpoint?: string;
40
40
  /**
41
- * Azure root path.
42
- */
41
+ * Azure root path.
42
+ */
43
43
  root?: string;
44
44
  /**
45
- * Pre-issued SAS token (with or without a leading `?`). Resolved from
46
- * `AZURE_STORAGE_SAS_TOKEN` when omitted. SAS-token adapters can use their
47
- * configured access but cannot mint fresh signed URLs.
48
- */
45
+ * Pre-issued SAS token (with or without a leading `?`). Resolved from
46
+ * `AZURE_STORAGE_SAS_TOKEN` when omitted. SAS-token adapters can use their
47
+ * configured access but cannot mint fresh signed URLs.
48
+ */
49
49
  sasToken?: string;
50
50
  /**
51
- * Controls whether a `credential`-backed adapter mints User Delegation SAS
52
- * URLs. Defaults to `true` when `credential` is supplied; set `false` for
53
- * token-authenticated SDK operations without signed-URL support.
54
- */
51
+ * Controls whether a `credential`-backed adapter mints User Delegation SAS
52
+ * URLs. Defaults to `true` when `credential` is supplied; set `false` for
53
+ * token-authenticated SDK operations without signed-URL support.
54
+ */
55
55
  useUserDelegationSas?: boolean;
56
56
  }
57
57
  interface ClientConfig {
58
58
  connectionString?: string;
59
59
  /**
60
- * Azure container name.
61
- */
60
+ * Azure container name.
61
+ */
62
62
  containerName: string;
63
63
  /**
64
- * Azure root path.
65
- */
64
+ * Azure root path.
65
+ */
66
66
  root?: string;
67
67
  }
68
68
  interface AzureMetaStorageOptions extends ClientConfig, MetaStorageOptions {
@@ -70,23 +70,23 @@ interface AzureMetaStorageOptions extends ClientConfig, MetaStorageOptions {
70
70
  }
71
71
  interface AzureStorageOptions extends BaseStorageOptions, ClientConfig {
72
72
  /**
73
- * Configure metafiles storage
74
- * @example
75
- * ```ts
76
- * Using local metafiles
77
- * const storage = new AzureStorage({
78
- * bucket: 'upload',
79
- * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
80
- * })
81
- * ```
82
- * Using a separate bucket for metafiles
83
- * ```ts
84
- * const storage = new AzureStorage({
85
- * bucket: 'upload',
86
- * metaStorageConfig: { bucket: 'upload-metafiles' }
87
- * })
88
- * ```
89
- */
73
+ * Configure metafiles storage
74
+ * @example
75
+ * ```ts
76
+ * Using local metafiles
77
+ * const storage = new AzureStorage({
78
+ * bucket: 'upload',
79
+ * metaStorageConfig: { directory: '/tmp/upload-metafiles' }
80
+ * })
81
+ * ```
82
+ * Using a separate bucket for metafiles
83
+ * ```ts
84
+ * const storage = new AzureStorage({
85
+ * bucket: 'upload',
86
+ * metaStorageConfig: { bucket: 'upload-metafiles' }
87
+ * })
88
+ * ```
89
+ */
90
90
  metaStorageConfig?: AzureMetaStorageOptions | LocalMetaStorageOptions;
91
91
  }
92
92
  declare class AzureMetaStorage<T extends File = File> extends MetaStorage<T> {
@@ -101,18 +101,18 @@ declare class AzureMetaStorage<T extends File = File> extends MetaStorage<T> {
101
101
  list(): Promise<T[]>;
102
102
  }
103
103
  /**
104
- * Azure Blob Storage implementation.
105
- * @remarks
106
- * ## Supported Operations
107
- * - ✅ create, write, delete, get, list, update, copy, move
108
- * - ✅ Batch operations: deleteBatch (native Blob Batch API, 256/request), copyBatch + moveBatch (inherited from BaseStorage)
109
- * - ✅ exists: Implemented (checks metadata and Azure blob)
110
- * - ❌ getStream: Not implemented (use get() for file retrieval)
111
- * - ✅ getReadUrl / getUploadUrl: service SAS (shared key / connection string) or User Delegation SAS (Microsoft Entra credential). SAS-token adapters append the pre-issued token. Anonymous (public-container) adapters serve unsigned read URLs only — uploads are rejected.
112
- *
113
- * ## Authentication
114
- * Precedence: connection string, then account key + name, then Microsoft Entra `credential` (Azure AD / Managed Identity), then a pre-issued `sasToken`, then anonymous (public-container) access.
115
- */
104
+ * Azure Blob Storage implementation.
105
+ * @remarks
106
+ * ## Supported Operations
107
+ * - ✅ create, write, delete, get, list, update, copy, move
108
+ * - ✅ Batch operations: deleteBatch (native Blob Batch API, 256/request), copyBatch + moveBatch (inherited from BaseStorage)
109
+ * - ✅ exists: Implemented (checks metadata and Azure blob)
110
+ * - ❌ getStream: Not implemented (use get() for file retrieval)
111
+ * - ✅ getReadUrl / getUploadUrl: service SAS (shared key / connection string) or User Delegation SAS (Microsoft Entra credential). SAS-token adapters append the pre-issued token. Anonymous (public-container) adapters serve unsigned read URLs only — uploads are rejected.
112
+ *
113
+ * ## Authentication
114
+ * Precedence: connection string, then account key + name, then Microsoft Entra `credential` (Azure AD / Managed Identity), then a pre-issued `sasToken`, then anonymous (public-container) access.
115
+ */
116
116
  declare class AzureStorage extends BaseStorage {
117
117
  static override readonly name: string;
118
118
  override checksumTypes: string[];
@@ -131,105 +131,99 @@ declare class AzureStorage extends BaseStorage {
131
131
  protected override getRetryConfig(): RetryConfig;
132
132
  create(config: FileInit, options?: OperationOptions): Promise<AzureFile>;
133
133
  /**
134
- * Deletes an upload and its metadata.
135
- * @param query File query containing the file ID to delete.
136
- * @param query.id File ID to delete.
137
- * @returns Promise resolving to the deleted file object with status: "deleted".
138
- * @throws {UploadError} If the file metadata cannot be found.
139
- */
140
- delete({
141
- id
142
- }: FileQuery, options?: OperationOptions): Promise<AzureFile>;
143
- /**
144
- * Deletes many blobs in one round-trip using Azure's native
145
- * [Blob Batch API](https://learn.microsoft.com/rest/api/storageservices/blob-batch)
146
- * (up to 256 sub-requests per request) instead of issuing one DELETE per key.
147
- *
148
- * Sidecar metadata removal and the {@link onDelete} hook are still applied per
149
- * successfully-deleted id; a 404 sub-response is treated as success to match the
150
- * `deleteIfExists` semantics of the single-key {@link delete}. If the batch endpoint
151
- * is unavailable (e.g. an Azurite build without batch support) the call transparently
152
- * falls back to the per-key base implementation.
153
- * @param ids File ids/keys to delete.
154
- * @param options Optional per-call signal/timeout/retries.
155
- */
134
+ * Deletes an upload and its metadata.
135
+ * @param query File query containing the file ID to delete.
136
+ * @param query.id File ID to delete.
137
+ * @returns Promise resolving to the deleted file object with status: "deleted".
138
+ * @throws {UploadError} If the file metadata cannot be found.
139
+ */
140
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<AzureFile>;
141
+ /**
142
+ * Deletes many blobs in one round-trip using Azure's native
143
+ * [Blob Batch API](https://learn.microsoft.com/rest/api/storageservices/blob-batch)
144
+ * (up to 256 sub-requests per request) instead of issuing one DELETE per key.
145
+ *
146
+ * Sidecar metadata removal and the {@link onDelete} hook are still applied per
147
+ * successfully-deleted id; a 404 sub-response is treated as success to match the
148
+ * `deleteIfExists` semantics of the single-key {@link delete}. If the batch endpoint
149
+ * is unavailable (e.g. an Azurite build without batch support) the call transparently
150
+ * falls back to the per-key base implementation.
151
+ * @param ids File ids/keys to delete.
152
+ * @param options Optional per-call signal/timeout/retries.
153
+ */
156
154
  override deleteBatch(ids: string[], options?: OperationOptions): Promise<BatchOperationResponse<AzureFile>>;
157
155
  /**
158
- * Moves an upload file to a new location.
159
- * @param name Source file name/ID.
160
- * @param destination Destination file name/ID.
161
- * @returns Promise resolving to the moved file object.
162
- * @throws {UploadError} If the source file cannot be found.
163
- */
156
+ * Moves an upload file to a new location.
157
+ * @param name Source file name/ID.
158
+ * @param destination Destination file name/ID.
159
+ * @returns Promise resolving to the moved file object.
160
+ * @throws {UploadError} If the source file cannot be found.
161
+ */
164
162
  move(name: string, destination: string, options?: OperationOptions): Promise<AzureFile>;
165
163
  write(part: FilePart | FileQuery | AzureFile, options?: OperationOptions): Promise<AzureFile>;
166
- get({
167
- id
168
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
169
- /**
170
- * Checks if a file exists by verifying both metadata and the actual Azure blob.
171
- * Returns true only if both the metadata and the blob exist.
172
- * @param query File query containing the file ID to check.
173
- * @returns Promise resolving to true if both metadata and blob exist, false otherwise.
174
- */
175
- override exists({
176
- id
177
- }: FileQuery, options?: OperationOptions): Promise<boolean>;
178
- /**
179
- * Copies an upload file to a new location.
180
- * @param name Source file name/ID.
181
- * @param destination Destination file name/ID.
182
- * @returns Promise resolving to the copied file object.
183
- * @throws {UploadError} If the source file cannot be found.
184
- */
164
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
165
+ /**
166
+ * Checks if a file exists by verifying both metadata and the actual Azure blob.
167
+ * Returns true only if both the metadata and the blob exist.
168
+ * @param query File query containing the file ID to check.
169
+ * @returns Promise resolving to true if both metadata and blob exist, false otherwise.
170
+ */
171
+ override exists({ id }: FileQuery, options?: OperationOptions): Promise<boolean>;
172
+ /**
173
+ * Copies an upload file to a new location.
174
+ * @param name Source file name/ID.
175
+ * @param destination Destination file name/ID.
176
+ * @returns Promise resolving to the copied file object.
177
+ * @throws {UploadError} If the source file cannot be found.
178
+ */
185
179
  copy(name: string, destination: string, options?: OperationOptions & {
186
180
  storageClass?: string;
187
181
  }): Promise<AzureFile>;
188
182
  override list(limit?: number, options?: OperationOptions): Promise<AzureFile[]>;
189
183
  /**
190
- * Returns a download URL for the blob at `key`.
191
- *
192
- * Shared-key / connection-string and Microsoft Entra adapters mint a fresh
193
- * SAS. SAS-token adapters append the pre-issued token. Genuine anonymous
194
- * (public-container) adapters return the unsigned blob URL.
195
- * @param key Storage key.
196
- * @param options Optional expiry and response content overrides. Response
197
- * content overrides only apply when the adapter mints a fresh SAS; they are
198
- * rejected on the pre-issued `sasToken` and anonymous paths, which have no
199
- * signature in which to bind them.
200
- * @throws {UploadError} When the adapter has no way to authorise reads, or
201
- * when a response content override is supplied on a non-signing path.
202
- */
184
+ * Returns a download URL for the blob at `key`.
185
+ *
186
+ * Shared-key / connection-string and Microsoft Entra adapters mint a fresh
187
+ * SAS. SAS-token adapters append the pre-issued token. Genuine anonymous
188
+ * (public-container) adapters return the unsigned blob URL.
189
+ * @param key Storage key.
190
+ * @param options Optional expiry and response content overrides. Response
191
+ * content overrides only apply when the adapter mints a fresh SAS; they are
192
+ * rejected on the pre-issued `sasToken` and anonymous paths, which have no
193
+ * signature in which to bind them.
194
+ * @throws {UploadError} When the adapter has no way to authorise reads, or
195
+ * when a response content override is supplied on a non-signing path.
196
+ */
203
197
  override getReadUrl(key: string, options?: {
204
198
  expiresIn?: number;
205
199
  responseContentDisposition?: string;
206
200
  responseContentType?: string;
207
201
  }): Promise<string>;
208
202
  /**
209
- * Returns an upload URL (HTTP PUT, `x-ms-blob-type: BlockBlob`) for `key`.
210
- *
211
- * Shared-key / connection-string and Microsoft Entra adapters mint a fresh
212
- * SAS. SAS-token adapters append the pre-issued token. Anonymous adapters
213
- * cannot upload. The caller must send the desired `x-ms-blob-content-type`
214
- * header on the PUT — a SAS cannot pin the stored content type.
215
- * @param key Storage key.
216
- * @param options Optional expiry. `contentLength` and `contentType` are
217
- * rejected: an Azure SAS does not bind the request `Content-Type` into the
218
- * signature and has no server-enforced size limit, so accepting them would
219
- * hand the caller a guarantee that does not hold.
220
- * @throws {UploadError} When the adapter cannot authorise writes, or when an
221
- * unenforceable `contentType`/`contentLength` override is supplied.
222
- */
203
+ * Returns an upload URL (HTTP PUT, `x-ms-blob-type: BlockBlob`) for `key`.
204
+ *
205
+ * Shared-key / connection-string and Microsoft Entra adapters mint a fresh
206
+ * SAS. SAS-token adapters append the pre-issued token. Anonymous adapters
207
+ * cannot upload. The caller must send the desired `x-ms-blob-content-type`
208
+ * header on the PUT — a SAS cannot pin the stored content type.
209
+ * @param key Storage key.
210
+ * @param options Optional expiry. `contentLength` and `contentType` are
211
+ * rejected: an Azure SAS does not bind the request `Content-Type` into the
212
+ * signature and has no server-enforced size limit, so accepting them would
213
+ * hand the caller a guarantee that does not hold.
214
+ * @throws {UploadError} When the adapter cannot authorise writes, or when an
215
+ * unenforceable `contentType`/`contentLength` override is supplied.
216
+ */
223
217
  override getUploadUrl(key: string, options?: {
224
218
  contentLength?: number;
225
219
  contentType?: string;
226
220
  expiresIn?: number;
227
221
  }): Promise<string>;
228
222
  /**
229
- * Prefixes the given filePath with the storage root location (assetFolder if configured).
230
- * @param filePath Relative file path to prefix.
231
- * @returns Full path with asset folder prefix if configured, otherwise returns original path.
232
- */
223
+ * Prefixes the given filePath with the storage root location (assetFolder if configured).
224
+ * @param filePath Relative file path to prefix.
225
+ * @returns Full path with asset folder prefix if configured, otherwise returns original path.
226
+ */
233
227
  private getFullPath;
234
228
  private accessCheck;
235
229
  }
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/AzureFile-DFSaVe25.js";import{c as t}from"../../packem_shared/azure-meta-storage-ClbEsfI4.js";import{default as u}from"../../packem_shared/AzureStorage-1UvDIQZd.js";export{a as AzureFile,t as AzureSMetaStorage,u as AzureStorage};
1
+ import{default as a}from"../../packem_shared/AzureFile-DFSaVe25.js";import{c as t}from"../../packem_shared/azure-meta-storage-ClbEsfI4.js";import{default as u}from"../../packem_shared/AzureStorage-DL-U7qFG.js";export{a as AzureFile,t as AzureSMetaStorage,u as AzureStorage};
@@ -1,6 +1,6 @@
1
- import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-CEM1upWM.js";
1
+ import { F as File, L as LocalMetaStorageOptions, l as BaseStorageOptions, M as MetaStorage, d as FileInit, O as OperationOptions, e as FilePart, f as FileQuery, g as FileReturn, B as BaseStorage } from "../../packem_shared/storage.d-DIav_lF1.js";
2
2
  import 'node:stream';
3
- import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-D9PBfkn6.js";
3
+ import { L as LocalMetaStorage } from "../../packem_shared/local-meta-storage.d-DuTEzyii.js";
4
4
  import { BoxClient } from 'box-typescript-sdk-gen';
5
5
  import 'node:crypto';
6
6
  import 'node:http';
@@ -15,38 +15,38 @@ declare class BoxMetaStorage extends LocalMetaStorage<BoxFile> {
15
15
  }
16
16
  interface BoxOAuthOptions {
17
17
  /**
18
- * Box application client ID.
19
- */
18
+ * Box application client ID.
19
+ */
20
20
  clientId: string;
21
21
  /**
22
- * Box application client secret.
23
- */
22
+ * Box application client secret.
23
+ */
24
24
  clientSecret: string;
25
25
  /**
26
- * Long-lived refresh token previously obtained via Box's authorization
27
- * code flow. The adapter seeds the SDK's in-memory token storage with
28
- * this value; the SDK exchanges it for a fresh access token on first
29
- * use and re-refreshes when the access token expires.
30
- */
26
+ * Long-lived refresh token previously obtained via Box's authorization
27
+ * code flow. The adapter seeds the SDK's in-memory token storage with
28
+ * this value; the SDK exchanges it for a fresh access token on first
29
+ * use and re-refreshes when the access token expires.
30
+ */
31
31
  refreshToken: string;
32
32
  }
33
33
  interface BoxCcgOptions {
34
34
  /**
35
- * Box application client ID.
36
- */
35
+ * Box application client ID.
36
+ */
37
37
  clientId: string;
38
38
  /**
39
- * Box application client secret.
40
- */
39
+ * Box application client secret.
40
+ */
41
41
  clientSecret: string;
42
42
  /**
43
- * Pass `enterpriseId` to authenticate as the service account, or `userId`
44
- * to authenticate as a managed/app user. At least one is required.
45
- */
43
+ * Pass `enterpriseId` to authenticate as the service account, or `userId`
44
+ * to authenticate as a managed/app user. At least one is required.
45
+ */
46
46
  enterpriseId?: string;
47
47
  /**
48
- * Pass `userId` to authenticate as a managed/app user.
49
- */
48
+ * Pass `userId` to authenticate as a managed/app user.
49
+ */
50
50
  userId?: string;
51
51
  }
52
52
  type BoxJwtOptions = {
@@ -56,91 +56,91 @@ type BoxJwtOptions = {
56
56
  };
57
57
  interface BoxStorageOptions extends BaseStorageOptions {
58
58
  /**
59
- * Server-side Client Credentials Grant. Mutually exclusive with
60
- * `developerToken`, `oauth`, and `jwt`.
61
- */
59
+ * Server-side Client Credentials Grant. Mutually exclusive with
60
+ * `developerToken`, `oauth`, and `jwt`.
61
+ */
62
62
  ccg?: BoxCcgOptions;
63
63
  /**
64
- * Pre-built `BoxClient`. Escape hatch for callers that already wire
65
- * auth themselves (e.g. with a custom `NetworkSession`, proxy config,
66
- * or downscoped tokens).
67
- */
64
+ * Pre-built `BoxClient`. Escape hatch for callers that already wire
65
+ * auth themselves (e.g. with a custom `NetworkSession`, proxy config,
66
+ * or downscoped tokens).
67
+ */
68
68
  client?: BoxClient;
69
69
  /**
70
- * Default expiry, in seconds, advertised to callers of `getReadUrl()`.
71
- * Box does not document a hard maximum for download URLs (they are
72
- * short-lived by API design); this value is forwarded as documentation
73
- * only — the actual lifetime is decided by Box. Defaults to 3600.
74
- */
70
+ * Default expiry, in seconds, advertised to callers of `getReadUrl()`.
71
+ * Box does not document a hard maximum for download URLs (they are
72
+ * short-lived by API design); this value is forwarded as documentation
73
+ * only — the actual lifetime is decided by Box. Defaults to 3600.
74
+ */
75
75
  defaultUrlExpiresIn?: number;
76
76
  /**
77
- * Static developer token from the Box developer console. Useful for
78
- * scripts and trying the adapter; production apps should use OAuth,
79
- * CCG, or JWT instead. Mutually exclusive with `oauth`, `ccg`, `jwt`.
80
- */
77
+ * Static developer token from the Box developer console. Useful for
78
+ * scripts and trying the adapter; production apps should use OAuth,
79
+ * CCG, or JWT instead. Mutually exclusive with `oauth`, `ccg`, `jwt`.
80
+ */
81
81
  developerToken?: string;
82
82
  /**
83
- * JWT Server Authentication, configured via the JSON blob from Box's
84
- * developer console. Mutually exclusive with the other auth modes.
85
- */
83
+ * JWT Server Authentication, configured via the JSON blob from Box's
84
+ * developer console. Mutually exclusive with the other auth modes.
85
+ */
86
86
  jwt?: BoxJwtOptions;
87
87
  /**
88
- * Configure metafiles storage. Defaults to local tmp directory.
89
- */
88
+ * Configure metafiles storage. Defaults to local tmp directory.
89
+ */
90
90
  metaStorageConfig?: LocalMetaStorageOptions;
91
91
  /**
92
- * OAuth2 user-app flow seeded with a refresh token. Mutually exclusive
93
- * with `developerToken`, `ccg`, and `jwt`.
94
- */
92
+ * OAuth2 user-app flow seeded with a refresh token. Mutually exclusive
93
+ * with `developerToken`, `ccg`, and `jwt`.
94
+ */
95
95
  oauth?: BoxOAuthOptions;
96
96
  /**
97
- * When `true`, `getReadUrl` creates (or reuses) an `open`-access shared
98
- * link instead of a short-lived signed download URL. Public shared links
99
- * may be restricted on Box Business or Enterprise plans; the adapter
100
- * surfaces Box's `access_denied_insufficient_permissions` error
101
- * unmodified in that case.
102
- */
97
+ * When `true`, `getReadUrl` creates (or reuses) an `open`-access shared
98
+ * link instead of a short-lived signed download URL. Public shared links
99
+ * may be restricted on Box Business or Enterprise plans; the adapter
100
+ * surfaces Box's `access_denied_insufficient_permissions` error
101
+ * unmodified in that case.
102
+ */
103
103
  publicByDefault?: boolean;
104
104
  /**
105
- * Logical "bucket root" — virtual keys live under this Box folder ID.
106
- * Use `"0"` (the default) to anchor at the user's root folder. The
107
- * folder must already exist; intermediate subfolders are auto-created
108
- * on upload.
109
- */
105
+ * Logical "bucket root" — virtual keys live under this Box folder ID.
106
+ * Use `"0"` (the default) to anchor at the user's root folder. The
107
+ * folder must already exist; intermediate subfolders are auto-created
108
+ * on upload.
109
+ */
110
110
  rootFolderId?: string;
111
111
  }
112
112
  /**
113
- * Box storage backend.
114
- *
115
- * Routes virtual keys onto Box folder/file IDs under `rootFolderId`. Uploads
116
- * use `uploads.uploadFile` / `uploads.uploadFileVersion` up to 50 MB and
117
- * switch to the chunked-upload session API above that threshold. Subfolders
118
- * along a key's path are auto-created on first write.
119
- *
120
- * **Auth precedence**:
121
- * 1. `client` (pre-built `BoxClient`)
122
- * 2. `developerToken` (static, from Box developer console)
123
- * 3. `oauth` (refresh-token seeded — `clientId` + `clientSecret` + `refreshToken`)
124
- * 4. `ccg` (Client Credentials Grant — `clientId` + `clientSecret` + `enterpriseId` or `userId`)
125
- * 5. `jwt` (JWT Server Auth — `configJsonString` or `configFilePath`)
126
- * 6. Env fallback: `BOX_DEVELOPER_TOKEN`
127
- *
128
- * **Limitations**:
129
- * - `metadata` is not supported on the unified API — Box exposes file metadata
130
- * via classifications and metadata templates. Use `storage.raw.fileMetadata.*`
131
- * directly if you need them.
132
- * - `cacheControl` is not supported (Box does not expose HTTP cache headers
133
- * on file content).
134
- * - `getUploadUrl` is not supported — Box uploads require a multipart `POST`
135
- * with both an `attributes` JSON part and the file bytes part, which doesn't
136
- * fit the PUT-with-raw-body presigned-URL contract.
137
- * - `responseContentDisposition` is not supported on signed download URLs.
138
- * - `write()` buffers the full part body in memory before choosing between
139
- * the simple-upload and chunked-upload paths. Each request handler runs
140
- * independently, so concurrent multi-GB writes are bounded by the host's
141
- * available memory.
142
- * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
143
- */
113
+ * Box storage backend.
114
+ *
115
+ * Routes virtual keys onto Box folder/file IDs under `rootFolderId`. Uploads
116
+ * use `uploads.uploadFile` / `uploads.uploadFileVersion` up to 50 MB and
117
+ * switch to the chunked-upload session API above that threshold. Subfolders
118
+ * along a key's path are auto-created on first write.
119
+ *
120
+ * **Auth precedence**:
121
+ * 1. `client` (pre-built `BoxClient`)
122
+ * 2. `developerToken` (static, from Box developer console)
123
+ * 3. `oauth` (refresh-token seeded — `clientId` + `clientSecret` + `refreshToken`)
124
+ * 4. `ccg` (Client Credentials Grant — `clientId` + `clientSecret` + `enterpriseId` or `userId`)
125
+ * 5. `jwt` (JWT Server Auth — `configJsonString` or `configFilePath`)
126
+ * 6. Env fallback: `BOX_DEVELOPER_TOKEN`
127
+ *
128
+ * **Limitations**:
129
+ * - `metadata` is not supported on the unified API — Box exposes file metadata
130
+ * via classifications and metadata templates. Use `storage.raw.fileMetadata.*`
131
+ * directly if you need them.
132
+ * - `cacheControl` is not supported (Box does not expose HTTP cache headers
133
+ * on file content).
134
+ * - `getUploadUrl` is not supported — Box uploads require a multipart `POST`
135
+ * with both an `attributes` JSON part and the file bytes part, which doesn't
136
+ * fit the PUT-with-raw-body presigned-URL contract.
137
+ * - `responseContentDisposition` is not supported on signed download URLs.
138
+ * - `write()` buffers the full part body in memory before choosing between
139
+ * the simple-upload and chunked-upload paths. Each request handler runs
140
+ * independently, so concurrent multi-GB writes are bounded by the host's
141
+ * available memory.
142
+ * - ⚠️ Per-operation `signal`/`timeout` are best-effort: the underlying SDK does not support request cancellation, so an in-flight call may complete server-side even after abort. `retries` is honored.
143
+ */
144
144
  declare class BoxStorage extends BaseStorage<BoxFile> {
145
145
  static override readonly name: string;
146
146
  override checksumTypes: string[];
@@ -155,12 +155,8 @@ declare class BoxStorage extends BaseStorage<BoxFile> {
155
155
  override get raw(): BoxClient;
156
156
  create(config: FileInit, _options?: OperationOptions): Promise<BoxFile>;
157
157
  write(part: FilePart | FileQuery | BoxFile, options?: OperationOptions): Promise<BoxFile>;
158
- delete({
159
- id
160
- }: FileQuery, options?: OperationOptions): Promise<BoxFile>;
161
- get({
162
- id
163
- }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
158
+ delete({ id }: FileQuery, options?: OperationOptions): Promise<BoxFile>;
159
+ get({ id }: FileQuery, options?: OperationOptions): Promise<FileReturn>;
164
160
  copy(name: string, destination: string, options?: OperationOptions & {
165
161
  storageClass?: string;
166
162
  }): Promise<BoxFile>;
@@ -1 +1 @@
1
- import{default as a}from"../../packem_shared/BoxFile-CseIoPW1.js";import{default as r}from"../../packem_shared/BoxMetaStorage-BSn6Qfnf.js";import{default as x}from"../../packem_shared/BoxStorage-DbGqBLux.js";export{a as BoxFile,r as BoxMetaStorage,x as BoxStorage};
1
+ import{default as a}from"../../packem_shared/BoxFile-CseIoPW1.js";import{default as r}from"../../packem_shared/BoxMetaStorage-CHWrhgg2.js";import{default as x}from"../../packem_shared/BoxStorage-B8_oCz27.js";export{a as BoxFile,r as BoxMetaStorage,x as BoxStorage};