@internxt/sdk 1.9.24 → 1.9.25

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.
@@ -126,8 +126,16 @@ export declare class Storage {
126
126
  /**
127
127
  * Removes a specific folder from the centralized persistence
128
128
  * @param folderId
129
+ * @deprecated Use `deleteFolderByUuid` instead.
129
130
  */
130
131
  deleteFolder(folderId: number): Promise<unknown>;
132
+ /**
133
+ * Deletes a folder from the storage system using its unique identifier (UUID).
134
+ *
135
+ * @param folderId - The UUID of the folder to be deleted.
136
+ * @returns A promise that resolves with the response of the delete operation.
137
+ */
138
+ deleteFolderByUuid(folderId: string): Promise<void>;
131
139
  /**
132
140
  * Returns the total size of a folder
133
141
  * @param folderId
@@ -188,8 +196,18 @@ export declare class Storage {
188
196
  /**
189
197
  * Deletes a specific file entry
190
198
  * @param payload
199
+ * @deprecated Use `deleteFileByUuid` instead.
191
200
  */
192
201
  deleteFile(payload: DeleteFilePayload): Promise<unknown>;
202
+ /**
203
+ * Deletes a file from the storage system using its unique identifier (UUID).
204
+ *
205
+ * @param fileId - The UUID of the file to be deleted.
206
+ * @returns A promise that resolves with the response of the delete operation.
207
+ */
208
+ deleteFileByUuid(fileId: string): Promise<{
209
+ deleted: boolean;
210
+ }>;
193
211
  /**
194
212
  * Updates the persisted path of a file entry
195
213
  * @param payload
@@ -313,10 +313,20 @@ var Storage = /** @class */ (function () {
313
313
  /**
314
314
  * Removes a specific folder from the centralized persistence
315
315
  * @param folderId
316
+ * @deprecated Use `deleteFolderByUuid` instead.
316
317
  */
317
318
  Storage.prototype.deleteFolder = function (folderId) {
318
319
  return this.client.delete("/storage/folder/".concat(folderId), this.headers());
319
320
  };
321
+ /**
322
+ * Deletes a folder from the storage system using its unique identifier (UUID).
323
+ *
324
+ * @param folderId - The UUID of the folder to be deleted.
325
+ * @returns A promise that resolves with the response of the delete operation.
326
+ */
327
+ Storage.prototype.deleteFolderByUuid = function (folderId) {
328
+ return this.client.delete("/folders/".concat(folderId), this.headers());
329
+ };
320
330
  /**
321
331
  * Returns the total size of a folder
322
332
  * @param folderId
@@ -420,10 +430,20 @@ var Storage = /** @class */ (function () {
420
430
  /**
421
431
  * Deletes a specific file entry
422
432
  * @param payload
433
+ * @deprecated Use `deleteFileByUuid` instead.
423
434
  */
424
435
  Storage.prototype.deleteFile = function (payload) {
425
436
  return this.client.delete("/storage/folder/".concat(payload.folderId, "/file/").concat(payload.fileId), this.headers());
426
437
  };
438
+ /**
439
+ * Deletes a file from the storage system using its unique identifier (UUID).
440
+ *
441
+ * @param fileId - The UUID of the file to be deleted.
442
+ * @returns A promise that resolves with the response of the delete operation.
443
+ */
444
+ Storage.prototype.deleteFileByUuid = function (fileId) {
445
+ return this.client.delete("/files/".concat(fileId), this.headers());
446
+ };
427
447
  /**
428
448
  * Updates the persisted path of a file entry
429
449
  * @param payload
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@internxt/sdk",
3
3
  "author": "Internxt <hello@internxt.com>",
4
- "version": "1.9.24",
4
+ "version": "1.9.25",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",