@internxt/sdk 1.9.17 → 1.9.18

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.
@@ -3,7 +3,7 @@ import { ApiSecurity, ApiUrl, AppDetails } from '../../shared';
3
3
  import { RequestCanceler } from '../../shared/http/client';
4
4
  import { UUID } from '../../shared/types/userSettings';
5
5
  import { ItemType } from './../../workspaces/types';
6
- import { AddItemsToTrashPayload, CheckDuplicatedFilesPayload, CheckDuplicatedFilesResponse, CheckDuplicatedFolderPayload, CheckDuplicatedFoldersResponse, CreateFolderByUuidPayload, CreateFolderPayload, CreateFolderResponse, CreateThumbnailEntryPayload, DeleteFilePayload, DriveFileData, FetchFolderContentResponse, FetchLimitResponse, FetchPaginatedFilesContent, FetchPaginatedFolderContentResponse, FetchPaginatedFoldersContent, FileEntry, FileEntryByUuid, FileMeta, FolderAncestor, FolderAncestorWorkspace, FolderMeta, FolderTreeResponse, MoveFilePayload, MoveFileResponse, MoveFileUuidPayload, MoveFolderPayload, MoveFolderResponse, MoveFolderUuidPayload, ReplaceFile, SearchResultData, Thumbnail, ThumbnailEntry, UpdateFilePayload, UpdateFolderMetadataPayload, UsageResponse } from './types';
6
+ import { AddItemsToTrashPayload, CheckDuplicatedFilesPayload, CheckDuplicatedFilesResponse, CheckDuplicatedFolderPayload, CheckDuplicatedFoldersResponse, CreateFolderByUuidPayload, CreateFolderPayload, CreateFolderResponse, CreateThumbnailEntryPayload, DeleteFilePayload, DriveFileData, FetchFolderContentResponse, FetchLimitResponse, FetchPaginatedFilesContent, FetchPaginatedFolderContentResponse, FetchPaginatedFoldersContent, FileEntry, FileEntryByUuid, FileMeta, FolderAncestor, FolderAncestorWorkspace, FolderMeta, FolderTreeResponse, MoveFilePayload, MoveFileResponse, MoveFileUuidPayload, MoveFolderPayload, MoveFolderResponse, MoveFolderUuidPayload, ReplaceFile, SearchResultData, Thumbnail, ThumbnailEntry, UpdateFilePayload, UpdateFolderMetadataPayload, UsageResponse, UsageResponseV2 } from './types';
7
7
  export * as StorageTypes from './types';
8
8
  export declare class Storage {
9
9
  private readonly client;
@@ -227,12 +227,22 @@ export declare class Storage {
227
227
  searchItemsByName(plain_name: string): Promise<DriveFileData[]>;
228
228
  /**
229
229
  * Returns the current space usage of the user
230
+ * @deprecated use `spaceUsageV2` call instead.
230
231
  */
231
232
  spaceUsage(): Promise<UsageResponse>;
233
+ /**
234
+ * Returns the current space usage of the user
235
+ */
236
+ spaceUsageV2(): Promise<UsageResponseV2>;
232
237
  /**
233
238
  * Returns the current space limit for the user
239
+ * @deprecated use `spaceLimitV2` call instead.
234
240
  */
235
241
  spaceLimit(): Promise<FetchLimitResponse>;
242
+ /**
243
+ * Returns the current space limit for the user
244
+ */
245
+ spaceLimitV2(): Promise<FetchLimitResponse>;
236
246
  /**
237
247
  * Get global search items.
238
248
  *
@@ -493,16 +493,30 @@ var Storage = /** @class */ (function () {
493
493
  };
494
494
  /**
495
495
  * Returns the current space usage of the user
496
+ * @deprecated use `spaceUsageV2` call instead.
496
497
  */
497
498
  Storage.prototype.spaceUsage = function () {
498
499
  return this.client.get('/usage', this.headers());
499
500
  };
501
+ /**
502
+ * Returns the current space usage of the user
503
+ */
504
+ Storage.prototype.spaceUsageV2 = function () {
505
+ return this.client.get('/users/usage', this.headers());
506
+ };
500
507
  /**
501
508
  * Returns the current space limit for the user
509
+ * @deprecated use `spaceLimitV2` call instead.
502
510
  */
503
511
  Storage.prototype.spaceLimit = function () {
504
512
  return this.client.get('/limit', this.headers());
505
513
  };
514
+ /**
515
+ * Returns the current space limit for the user
516
+ */
517
+ Storage.prototype.spaceLimitV2 = function () {
518
+ return this.client.get('/users/limit', this.headers());
519
+ };
506
520
  /**
507
521
  * Get global search items.
508
522
  *
@@ -276,7 +276,6 @@ export interface ThumbnailEntry {
276
276
  encrypt_version: EncryptionVersion;
277
277
  }
278
278
  export interface CreateThumbnailEntryPayload {
279
- fileId: number;
280
279
  fileUuid: string;
281
280
  type: string;
282
281
  size: number;
@@ -366,6 +365,11 @@ export type UsageResponse = {
366
365
  } & {
367
366
  [k in 'drive' | 'backups' | 'total']: number;
368
367
  };
368
+ export type UsageResponseV2 = {
369
+ drive: number;
370
+ backups: number;
371
+ total: number;
372
+ };
369
373
  export interface FetchLimitResponse {
370
374
  maxSpaceBytes: number;
371
375
  }
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.17",
4
+ "version": "1.9.18",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",