@memberjunction/storage 2.38.0 → 2.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drivers/AWSFileStorage.d.ts +360 -4
- package/dist/drivers/AWSFileStorage.d.ts.map +1 -1
- package/dist/drivers/AWSFileStorage.js +357 -4
- package/dist/drivers/AWSFileStorage.js.map +1 -1
- package/dist/drivers/AzureFileStorage.d.ts +362 -2
- package/dist/drivers/AzureFileStorage.d.ts.map +1 -1
- package/dist/drivers/AzureFileStorage.js +357 -2
- package/dist/drivers/AzureFileStorage.js.map +1 -1
- package/dist/drivers/BoxFileStorage.d.ts +539 -20
- package/dist/drivers/BoxFileStorage.d.ts.map +1 -1
- package/dist/drivers/BoxFileStorage.js +521 -20
- package/dist/drivers/BoxFileStorage.js.map +1 -1
- package/dist/drivers/DropboxFileStorage.d.ts +437 -15
- package/dist/drivers/DropboxFileStorage.d.ts.map +1 -1
- package/dist/drivers/DropboxFileStorage.js +431 -15
- package/dist/drivers/DropboxFileStorage.js.map +1 -1
- package/dist/drivers/GoogleDriveFileStorage.d.ts +342 -16
- package/dist/drivers/GoogleDriveFileStorage.d.ts.map +1 -1
- package/dist/drivers/GoogleDriveFileStorage.js +340 -16
- package/dist/drivers/GoogleDriveFileStorage.js.map +1 -1
- package/dist/drivers/GoogleFileStorage.d.ts +358 -2
- package/dist/drivers/GoogleFileStorage.d.ts.map +1 -1
- package/dist/drivers/GoogleFileStorage.js +356 -2
- package/dist/drivers/GoogleFileStorage.js.map +1 -1
- package/dist/drivers/SharePointFileStorage.d.ts +434 -20
- package/dist/drivers/SharePointFileStorage.d.ts.map +1 -1
- package/dist/drivers/SharePointFileStorage.js +453 -22
- package/dist/drivers/SharePointFileStorage.js.map +1 -1
- package/dist/generic/FileStorageBase.d.ts +326 -108
- package/dist/generic/FileStorageBase.d.ts.map +1 -1
- package/dist/generic/FileStorageBase.js +54 -6
- package/dist/generic/FileStorageBase.js.map +1 -1
- package/dist/util.d.ts +125 -18
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +125 -18
- package/dist/util.js.map +1 -1
- package/package.json +4 -4
- package/readme.md +211 -1
|
@@ -1,33 +1,393 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { CreatePreAuthUploadUrlPayload, FileStorageBase, StorageListResult, StorageObjectMetadata } from '../generic/FileStorageBase';
|
|
3
|
+
/**
|
|
4
|
+
* Azure Blob Storage implementation of the FileStorageBase interface.
|
|
5
|
+
*
|
|
6
|
+
* This class provides methods for interacting with Azure Blob Storage as a file storage provider.
|
|
7
|
+
* It implements all the abstract methods defined in FileStorageBase and handles Azure-specific
|
|
8
|
+
* authentication, authorization, and file operations.
|
|
9
|
+
*
|
|
10
|
+
* It requires the following environment variables to be set:
|
|
11
|
+
* - STORAGE_AZURE_CONTAINER: The name of the Azure Storage container
|
|
12
|
+
* - STORAGE_AZURE_ACCOUNT_NAME: The Azure Storage account name
|
|
13
|
+
* - STORAGE_AZURE_ACCOUNT_KEY: The Azure Storage account key
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // Create an instance of AzureFileStorage
|
|
18
|
+
* const azureStorage = new AzureFileStorage();
|
|
19
|
+
*
|
|
20
|
+
* // Generate a pre-authenticated upload URL
|
|
21
|
+
* const { UploadUrl } = await azureStorage.CreatePreAuthUploadUrl('documents/report.pdf');
|
|
22
|
+
*
|
|
23
|
+
* // Generate a pre-authenticated download URL
|
|
24
|
+
* const downloadUrl = await azureStorage.CreatePreAuthDownloadUrl('documents/report.pdf');
|
|
25
|
+
*
|
|
26
|
+
* // List files in a directory
|
|
27
|
+
* const files = await azureStorage.ListObjects('documents/');
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
3
30
|
export declare class AzureFileStorage extends FileStorageBase {
|
|
31
|
+
/** The name of this storage provider, used in error messages */
|
|
4
32
|
protected readonly providerName = "Azure Blob Storage";
|
|
33
|
+
/** Azure Storage SharedKeyCredential for authentication */
|
|
5
34
|
private _sharedKeyCredential;
|
|
35
|
+
/** The Azure Storage container name */
|
|
6
36
|
private _container;
|
|
37
|
+
/** The Azure Storage account name */
|
|
7
38
|
private _accountName;
|
|
39
|
+
/** ContainerClient for the specified container */
|
|
8
40
|
private _containerClient;
|
|
41
|
+
/** BlobServiceClient for the Azure Storage account */
|
|
9
42
|
private _blobServiceClient;
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new instance of AzureFileStorage.
|
|
45
|
+
*
|
|
46
|
+
* Initializes the connection to Azure Blob Storage using environment variables.
|
|
47
|
+
* Throws an error if any required environment variables are missing.
|
|
48
|
+
*/
|
|
10
49
|
constructor();
|
|
11
50
|
/**
|
|
12
|
-
* Creates a BlobClient for the specified object
|
|
51
|
+
* Creates a BlobClient for the specified object.
|
|
52
|
+
*
|
|
53
|
+
* This is a helper method used internally to get a BlobClient instance
|
|
54
|
+
* for a specific blob (file) in the container.
|
|
55
|
+
*
|
|
56
|
+
* @param objectName - The name of the blob for which to create a client
|
|
57
|
+
* @returns A BlobClient instance for the specified blob
|
|
58
|
+
* @private
|
|
13
59
|
*/
|
|
14
60
|
private _getBlobClient;
|
|
15
61
|
/**
|
|
16
|
-
*
|
|
62
|
+
* Normalizes a directory path to ensure it ends with a slash.
|
|
63
|
+
*
|
|
64
|
+
* This is a helper method used internally to ensure consistency in
|
|
65
|
+
* directory path representation. Azure Blob Storage doesn't have actual
|
|
66
|
+
* directories, so we use a trailing slash to simulate them.
|
|
67
|
+
*
|
|
68
|
+
* @param path - The directory path to normalize
|
|
69
|
+
* @returns The normalized path with a trailing slash
|
|
70
|
+
* @private
|
|
17
71
|
*/
|
|
18
72
|
private _normalizeDirectoryPath;
|
|
73
|
+
/**
|
|
74
|
+
* Creates a pre-authenticated upload URL for a blob in Azure Blob Storage.
|
|
75
|
+
*
|
|
76
|
+
* This method generates a Shared Access Signature (SAS) URL that allows
|
|
77
|
+
* for uploading a blob without needing the Azure Storage account credentials.
|
|
78
|
+
* The URL is valid for 10 minutes and can only be used for writing the specified blob.
|
|
79
|
+
*
|
|
80
|
+
* @param objectName - The name of the blob to upload (including any path/directory)
|
|
81
|
+
* @returns A Promise resolving to an object with the upload URL
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* // Generate a pre-authenticated upload URL for a PDF file
|
|
86
|
+
* const { UploadUrl } = await azureStorage.CreatePreAuthUploadUrl('documents/report.pdf');
|
|
87
|
+
*
|
|
88
|
+
* // The URL can be used with tools like curl to upload the file
|
|
89
|
+
* // curl -H "x-ms-blob-type: BlockBlob" --upload-file report.pdf --url "https://accountname.blob.core.windows.net/container/documents/report.pdf?sastoken"
|
|
90
|
+
* console.log(UploadUrl);
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
19
93
|
CreatePreAuthUploadUrl(objectName: string): Promise<CreatePreAuthUploadUrlPayload>;
|
|
94
|
+
/**
|
|
95
|
+
* Creates a pre-authenticated download URL for a blob in Azure Blob Storage.
|
|
96
|
+
*
|
|
97
|
+
* This method generates a Shared Access Signature (SAS) URL that allows
|
|
98
|
+
* for downloading a blob without needing the Azure Storage account credentials.
|
|
99
|
+
* The URL is valid for 10 minutes and can only be used for reading the specified blob.
|
|
100
|
+
*
|
|
101
|
+
* @param objectName - The name of the blob to download (including any path/directory)
|
|
102
|
+
* @returns A Promise resolving to the download URL
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```typescript
|
|
106
|
+
* // Generate a pre-authenticated download URL for a PDF file
|
|
107
|
+
* const downloadUrl = await azureStorage.CreatePreAuthDownloadUrl('documents/report.pdf');
|
|
108
|
+
*
|
|
109
|
+
* // The URL can be shared with users or used in applications for direct download
|
|
110
|
+
* console.log(downloadUrl);
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
20
113
|
CreatePreAuthDownloadUrl(objectName: string): Promise<string>;
|
|
114
|
+
/**
|
|
115
|
+
* Moves a blob from one location to another within Azure Blob Storage.
|
|
116
|
+
*
|
|
117
|
+
* Since Azure Blob Storage doesn't provide a native move operation,
|
|
118
|
+
* this method implements move as a copy followed by a delete operation.
|
|
119
|
+
* It first copies the blob to the new location, and if successful,
|
|
120
|
+
* deletes the blob from the original location.
|
|
121
|
+
*
|
|
122
|
+
* @param oldObjectName - The current name/path of the blob
|
|
123
|
+
* @param newObjectName - The new name/path for the blob
|
|
124
|
+
* @returns A Promise resolving to a boolean indicating success
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```typescript
|
|
128
|
+
* // Move a file from drafts to published folder
|
|
129
|
+
* const success = await azureStorage.MoveObject(
|
|
130
|
+
* 'drafts/report.docx',
|
|
131
|
+
* 'published/final-report.docx'
|
|
132
|
+
* );
|
|
133
|
+
*
|
|
134
|
+
* if (success) {
|
|
135
|
+
* console.log('File successfully moved');
|
|
136
|
+
* } else {
|
|
137
|
+
* console.log('Failed to move file');
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
21
141
|
MoveObject(oldObjectName: string, newObjectName: string): Promise<boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* Deletes a blob from Azure Blob Storage.
|
|
144
|
+
*
|
|
145
|
+
* This method attempts to delete the specified blob if it exists.
|
|
146
|
+
* It returns true if the blob was successfully deleted or if it didn't exist.
|
|
147
|
+
*
|
|
148
|
+
* @param objectName - The name of the blob to delete (including any path/directory)
|
|
149
|
+
* @returns A Promise resolving to a boolean indicating success
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* // Delete a temporary file
|
|
154
|
+
* const deleted = await azureStorage.DeleteObject('temp/report-draft.pdf');
|
|
155
|
+
*
|
|
156
|
+
* if (deleted) {
|
|
157
|
+
* console.log('File successfully deleted');
|
|
158
|
+
* } else {
|
|
159
|
+
* console.log('Failed to delete file');
|
|
160
|
+
* }
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
22
163
|
DeleteObject(objectName: string): Promise<boolean>;
|
|
164
|
+
/**
|
|
165
|
+
* Lists blobs with the specified prefix in Azure Blob Storage.
|
|
166
|
+
*
|
|
167
|
+
* This method returns a list of blobs (files) and virtual directories under the
|
|
168
|
+
* specified path prefix. Since Azure Blob Storage doesn't have actual directories,
|
|
169
|
+
* this method simulates directory structure by looking at blob names with common
|
|
170
|
+
* prefixes and using the delimiter to identify "directory" paths.
|
|
171
|
+
*
|
|
172
|
+
* @param prefix - The path prefix to list blobs from (e.g., 'documents/')
|
|
173
|
+
* @param delimiter - The character used to simulate directory structure, defaults to '/'
|
|
174
|
+
* @returns A Promise resolving to a StorageListResult containing objects and prefixes
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```typescript
|
|
178
|
+
* // List all files and directories in the documents folder
|
|
179
|
+
* const result = await azureStorage.ListObjects('documents/');
|
|
180
|
+
*
|
|
181
|
+
* // Process files
|
|
182
|
+
* for (const file of result.objects) {
|
|
183
|
+
* console.log(`File: ${file.name}, Size: ${file.size}, Type: ${file.contentType}`);
|
|
184
|
+
* }
|
|
185
|
+
*
|
|
186
|
+
* // Process subdirectories
|
|
187
|
+
* for (const dir of result.prefixes) {
|
|
188
|
+
* console.log(`Directory: ${dir}`);
|
|
189
|
+
* }
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
23
192
|
ListObjects(prefix: string, delimiter?: string): Promise<StorageListResult>;
|
|
193
|
+
/**
|
|
194
|
+
* Creates a directory (virtual) in Azure Blob Storage.
|
|
195
|
+
*
|
|
196
|
+
* Since Azure Blob Storage doesn't have a native directory concept,
|
|
197
|
+
* this method creates a zero-byte blob with a trailing slash to
|
|
198
|
+
* simulate a directory. The blob has a special content type to
|
|
199
|
+
* indicate it's a directory.
|
|
200
|
+
*
|
|
201
|
+
* @param directoryPath - The path of the directory to create
|
|
202
|
+
* @returns A Promise resolving to a boolean indicating success
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* // Create a new directory structure
|
|
207
|
+
* const created = await azureStorage.CreateDirectory('documents/reports/annual/');
|
|
208
|
+
*
|
|
209
|
+
* if (created) {
|
|
210
|
+
* console.log('Directory created successfully');
|
|
211
|
+
* } else {
|
|
212
|
+
* console.log('Failed to create directory');
|
|
213
|
+
* }
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
24
216
|
CreateDirectory(directoryPath: string): Promise<boolean>;
|
|
217
|
+
/**
|
|
218
|
+
* Deletes a directory (virtual) and optionally its contents from Azure Blob Storage.
|
|
219
|
+
*
|
|
220
|
+
* For non-recursive deletion, this method simply deletes the directory placeholder blob.
|
|
221
|
+
* For recursive deletion, it lists all blobs with the directory path as prefix
|
|
222
|
+
* and deletes them all, including the directory placeholder.
|
|
223
|
+
*
|
|
224
|
+
* @param directoryPath - The path of the directory to delete
|
|
225
|
+
* @param recursive - If true, deletes all contents recursively (default: false)
|
|
226
|
+
* @returns A Promise resolving to a boolean indicating success
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* // Delete an empty directory
|
|
231
|
+
* const deleted = await azureStorage.DeleteDirectory('documents/temp/');
|
|
232
|
+
*
|
|
233
|
+
* // Delete a directory and all its contents
|
|
234
|
+
* const recursivelyDeleted = await azureStorage.DeleteDirectory('documents/old_projects/', true);
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
25
237
|
DeleteDirectory(directoryPath: string, recursive?: boolean): Promise<boolean>;
|
|
238
|
+
/**
|
|
239
|
+
* Retrieves metadata for a specific blob in Azure Blob Storage.
|
|
240
|
+
*
|
|
241
|
+
* This method fetches the properties of a blob without downloading its content,
|
|
242
|
+
* which is more efficient for checking file attributes like size, content type,
|
|
243
|
+
* and last modified date.
|
|
244
|
+
*
|
|
245
|
+
* @param objectName - The name of the blob to get metadata for
|
|
246
|
+
* @returns A Promise resolving to a StorageObjectMetadata object
|
|
247
|
+
* @throws Error if the blob doesn't exist or cannot be accessed
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```typescript
|
|
251
|
+
* try {
|
|
252
|
+
* const metadata = await azureStorage.GetObjectMetadata('documents/report.pdf');
|
|
253
|
+
* console.log(`File: ${metadata.name}`);
|
|
254
|
+
* console.log(`Size: ${metadata.size} bytes`);
|
|
255
|
+
* console.log(`Last modified: ${metadata.lastModified}`);
|
|
256
|
+
* } catch (error) {
|
|
257
|
+
* console.error('File does not exist or cannot be accessed');
|
|
258
|
+
* }
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
26
261
|
GetObjectMetadata(objectName: string): Promise<StorageObjectMetadata>;
|
|
262
|
+
/**
|
|
263
|
+
* Downloads a blob's content from Azure Blob Storage.
|
|
264
|
+
*
|
|
265
|
+
* This method retrieves the full content of a blob and returns it as a Buffer
|
|
266
|
+
* for processing in memory.
|
|
267
|
+
*
|
|
268
|
+
* @param objectName - The name of the blob to download
|
|
269
|
+
* @returns A Promise resolving to a Buffer containing the blob's data
|
|
270
|
+
* @throws Error if the blob doesn't exist or cannot be downloaded
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* ```typescript
|
|
274
|
+
* try {
|
|
275
|
+
* const content = await azureStorage.GetObject('documents/config.json');
|
|
276
|
+
* // Parse the JSON content
|
|
277
|
+
* const config = JSON.parse(content.toString('utf8'));
|
|
278
|
+
* console.log('Configuration loaded:', config);
|
|
279
|
+
* } catch (error) {
|
|
280
|
+
* console.error('Failed to download file:', error.message);
|
|
281
|
+
* }
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
27
284
|
GetObject(objectName: string): Promise<Buffer>;
|
|
285
|
+
/**
|
|
286
|
+
* Uploads data to a blob in Azure Blob Storage.
|
|
287
|
+
*
|
|
288
|
+
* This method directly uploads a Buffer of data to a blob with the specified name.
|
|
289
|
+
* It's useful for server-side operations where you already have the data in memory.
|
|
290
|
+
*
|
|
291
|
+
* @param objectName - The name to assign to the uploaded blob
|
|
292
|
+
* @param data - The Buffer containing the data to upload
|
|
293
|
+
* @param contentType - Optional MIME type for the blob (inferred from name if not provided)
|
|
294
|
+
* @param metadata - Optional key-value pairs of custom metadata to associate with the blob
|
|
295
|
+
* @returns A Promise resolving to a boolean indicating success
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```typescript
|
|
299
|
+
* // Upload a text file
|
|
300
|
+
* const content = Buffer.from('Hello, World!', 'utf8');
|
|
301
|
+
* const uploaded = await azureStorage.PutObject(
|
|
302
|
+
* 'documents/hello.txt',
|
|
303
|
+
* content,
|
|
304
|
+
* 'text/plain',
|
|
305
|
+
* { author: 'John Doe', department: 'Engineering' }
|
|
306
|
+
* );
|
|
307
|
+
*
|
|
308
|
+
* if (uploaded) {
|
|
309
|
+
* console.log('File uploaded successfully');
|
|
310
|
+
* } else {
|
|
311
|
+
* console.log('Failed to upload file');
|
|
312
|
+
* }
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
28
315
|
PutObject(objectName: string, data: Buffer, contentType?: string, metadata?: Record<string, string>): Promise<boolean>;
|
|
316
|
+
/**
|
|
317
|
+
* Copies a blob within Azure Blob Storage.
|
|
318
|
+
*
|
|
319
|
+
* This method creates a copy of a blob at a new location without removing the original.
|
|
320
|
+
* It uses a SAS URL to provide the source blob access for the copy operation.
|
|
321
|
+
*
|
|
322
|
+
* @param sourceObjectName - The name of the blob to copy
|
|
323
|
+
* @param destinationObjectName - The name to assign to the copied blob
|
|
324
|
+
* @returns A Promise resolving to a boolean indicating success
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```typescript
|
|
328
|
+
* // Create a backup copy of an important file
|
|
329
|
+
* const copied = await azureStorage.CopyObject(
|
|
330
|
+
* 'documents/contract.pdf',
|
|
331
|
+
* 'backups/contract_2024-05-16.pdf'
|
|
332
|
+
* );
|
|
333
|
+
*
|
|
334
|
+
* if (copied) {
|
|
335
|
+
* console.log('File copied successfully');
|
|
336
|
+
* } else {
|
|
337
|
+
* console.log('Failed to copy file');
|
|
338
|
+
* }
|
|
339
|
+
* ```
|
|
340
|
+
*/
|
|
29
341
|
CopyObject(sourceObjectName: string, destinationObjectName: string): Promise<boolean>;
|
|
342
|
+
/**
|
|
343
|
+
* Checks if a blob exists in Azure Blob Storage.
|
|
344
|
+
*
|
|
345
|
+
* This method verifies the existence of a blob without downloading its content,
|
|
346
|
+
* which is efficient for validation purposes.
|
|
347
|
+
*
|
|
348
|
+
* @param objectName - The name of the blob to check
|
|
349
|
+
* @returns A Promise resolving to a boolean indicating if the blob exists
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* ```typescript
|
|
353
|
+
* // Check if a file exists before attempting to use it
|
|
354
|
+
* const exists = await azureStorage.ObjectExists('documents/report.pdf');
|
|
355
|
+
*
|
|
356
|
+
* if (exists) {
|
|
357
|
+
* console.log('File exists, proceeding with download');
|
|
358
|
+
* const content = await azureStorage.GetObject('documents/report.pdf');
|
|
359
|
+
* // Process the content...
|
|
360
|
+
* } else {
|
|
361
|
+
* console.log('File does not exist');
|
|
362
|
+
* }
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
30
365
|
ObjectExists(objectName: string): Promise<boolean>;
|
|
366
|
+
/**
|
|
367
|
+
* Checks if a directory (virtual) exists in Azure Blob Storage.
|
|
368
|
+
*
|
|
369
|
+
* Since Azure Blob Storage doesn't have a native directory concept,
|
|
370
|
+
* this method checks for either:
|
|
371
|
+
* 1. The existence of a directory placeholder blob (zero-byte blob with trailing slash)
|
|
372
|
+
* 2. The existence of any blobs with the directory path as a prefix
|
|
373
|
+
*
|
|
374
|
+
* @param directoryPath - The path of the directory to check
|
|
375
|
+
* @returns A Promise resolving to a boolean indicating if the directory exists
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* ```typescript
|
|
379
|
+
* // Check if a directory exists before trying to save files to it
|
|
380
|
+
* const exists = await azureStorage.DirectoryExists('documents/reports/');
|
|
381
|
+
*
|
|
382
|
+
* if (!exists) {
|
|
383
|
+
* console.log('Directory does not exist, creating it first');
|
|
384
|
+
* await azureStorage.CreateDirectory('documents/reports/');
|
|
385
|
+
* }
|
|
386
|
+
*
|
|
387
|
+
* // Now safe to use the directory
|
|
388
|
+
* await azureStorage.PutObject('documents/reports/new-report.pdf', fileData);
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
31
391
|
DirectoryExists(directoryPath: string): Promise<boolean>;
|
|
32
392
|
}
|
|
33
393
|
//# sourceMappingURL=AzureFileStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureFileStorage.d.ts","sourceRoot":"","sources":["../../src/drivers/AzureFileStorage.ts"],"names":[],"mappings":";AAiBA,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAEpC,qBACa,gBAAiB,SAAQ,eAAe;IACnD,SAAS,CAAC,QAAQ,CAAC,YAAY,wBAAwB;
|
|
1
|
+
{"version":3,"file":"AzureFileStorage.d.ts","sourceRoot":"","sources":["../../src/drivers/AzureFileStorage.ts"],"names":[],"mappings":";AAiBA,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBACa,gBAAiB,SAAQ,eAAe;IACnD,gEAAgE;IAChE,SAAS,CAAC,QAAQ,CAAC,YAAY,wBAAwB;IAEvD,2DAA2D;IAC3D,OAAO,CAAC,oBAAoB,CAA6B;IAEzD,uCAAuC;IACvC,OAAO,CAAC,UAAU,CAAS;IAE3B,qCAAqC;IACrC,OAAO,CAAC,YAAY,CAAS;IAE7B,kDAAkD;IAClD,OAAO,CAAC,gBAAgB,CAAkB;IAE1C,sDAAsD;IACtD,OAAO,CAAC,kBAAkB,CAAoB;IAE9C;;;;;OAKG;;IAmBH;;;;;;;;;OASG;IACH,OAAO,CAAC,cAAc;IAItB;;;;;;;;;;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