@internxt/sdk 1.11.21 → 1.11.23

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, FileVersion, FolderAncestor, FolderAncestorWorkspace, FolderMeta, FolderTreeResponse, GetFileLimitsResponse, MoveFilePayload, MoveFileResponse, MoveFileUuidPayload, MoveFolderPayload, MoveFolderResponse, MoveFolderUuidPayload, ReplaceFile, SearchResultData, Thumbnail, ThumbnailEntry, UpdateFilePayload, UpdateFolderMetadataPayload, UsageResponse, UsageResponseV2 } from './types';
6
+ import { AddItemsToTrashPayload, CheckDuplicatedFilesPayload, CheckDuplicatedFilesResponse, CheckDuplicatedFolderPayload, CheckDuplicatedFoldersResponse, CreateFolderByUuidPayload, CreateFolderPayload, CreateFolderResponse, CreateThumbnailEntryPayload, DeleteFilePayload, DriveFileData, FetchFolderContentResponse, FetchLimitResponse, FetchPaginatedFilesContent, FetchPaginatedFolderContentResponse, FetchPaginatedFoldersContent, FileEntry, FileEntryByUuid, FileMeta, FileVersion, FolderAncestor, FolderAncestorWorkspace, FolderMeta, FolderTreeResponse, GetFileLimitsResponse, MoveFilePayload, MoveFileResponse, MoveFileUuidPayload, MoveFolderPayload, MoveFolderResponse, MoveFolderUuidPayload, ReplaceFile, RestoreFileVersionResponse, 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;
@@ -384,9 +384,9 @@ export declare class Storage {
384
384
  *
385
385
  * @param {string} uuid - The UUID of the file.
386
386
  * @param {string} versionId - The UUID of the version to restore.
387
- * @returns {Promise<FileVersion>} A promise that resolves with the restored version.
387
+ * @returns {Promise<RestoreFileVersionResponse>} A promise that resolves with the restored file.
388
388
  */
389
- restoreFileVersion(uuid: string, versionId: string): Promise<FileVersion>;
389
+ restoreFileVersion(uuid: string, versionId: string): Promise<RestoreFileVersionResponse>;
390
390
  /**
391
391
  * Gets the file version limits for the user
392
392
  *
@@ -726,7 +726,7 @@ var Storage = /** @class */ (function () {
726
726
  *
727
727
  * @param {string} uuid - The UUID of the file.
728
728
  * @param {string} versionId - The UUID of the version to restore.
729
- * @returns {Promise<FileVersion>} A promise that resolves with the restored version.
729
+ * @returns {Promise<RestoreFileVersionResponse>} A promise that resolves with the restored file.
730
730
  */
731
731
  Storage.prototype.restoreFileVersion = function (uuid, versionId) {
732
732
  return this.client.post("/files/".concat(uuid, "/versions/").concat(versionId, "/restore"), {}, this.headers());
@@ -29,7 +29,7 @@ export interface DriveFileData {
29
29
  deleted: boolean;
30
30
  deletedAt: null;
31
31
  encrypt_version: string;
32
- fileId: string;
32
+ fileId: string | null;
33
33
  folderId: number;
34
34
  folder_id: number;
35
35
  folderUuid: string;
@@ -420,4 +420,5 @@ export interface CheckDuplicatedFoldersResponse {
420
420
  existentFolders: DriveFolderData[];
421
421
  }
422
422
  export type FileVersion = paths['/files/{uuid}/versions']['get']['responses']['200']['content']['application/json'][0];
423
+ export type RestoreFileVersionResponse = paths['/files/{uuid}/versions/{versionId}/restore']['post']['responses']['200']['content']['application/json'];
423
424
  export type GetFileLimitsResponse = paths['/files/limits']['get']['responses']['200']['content']['application/json'];
package/dist/schema.d.ts CHANGED
@@ -3061,10 +3061,10 @@ export interface components {
3061
3061
  */
3062
3062
  bucket: string;
3063
3063
  /**
3064
- * @description The ID of the file
3064
+ * @description The ID of the file (required when size > 0)
3065
3065
  * @example file12345
3066
3066
  */
3067
- fileId: string;
3067
+ fileId?: string;
3068
3068
  /**
3069
3069
  * @description The encryption version used for the file
3070
3070
  * @example 03-aes
@@ -3114,7 +3114,7 @@ export interface components {
3114
3114
  FileDto: {
3115
3115
  id: number;
3116
3116
  uuid: string;
3117
- fileId: string;
3117
+ fileId: string | null;
3118
3118
  name: string;
3119
3119
  type: string;
3120
3120
  size: string;
@@ -3150,7 +3150,7 @@ export interface components {
3150
3150
  };
3151
3151
  FileVersionDto: {
3152
3152
  id: string;
3153
- fileId: string;
3153
+ fileId: string | null;
3154
3154
  networkFileId: string;
3155
3155
  size: string;
3156
3156
  /** @enum {string} */
@@ -3159,13 +3159,18 @@ export interface components {
3159
3159
  createdAt: string;
3160
3160
  /** Format: date-time */
3161
3161
  updatedAt: string;
3162
+ /**
3163
+ * Format: date-time
3164
+ * @description Date when this version expires based on retention policy
3165
+ */
3166
+ expiresAt: string;
3162
3167
  };
3163
3168
  ReplaceFileDto: {
3164
3169
  /**
3165
- * @description File id
3170
+ * @description File id (required when size > 0)
3166
3171
  * @example 651300a2da9b27001f63f384
3167
3172
  */
3168
- fileId: string;
3173
+ fileId?: string;
3169
3174
  /**
3170
3175
  * Format: int64
3171
3176
  * @description New file size
@@ -3653,7 +3658,7 @@ export interface components {
3653
3658
  FileInSharedFolderDto: {
3654
3659
  id: number;
3655
3660
  uuid: string;
3656
- fileId: string;
3661
+ fileId: string | null;
3657
3662
  name: string;
3658
3663
  type: string;
3659
3664
  size: string;
@@ -3898,10 +3903,10 @@ export interface components {
3898
3903
  */
3899
3904
  bucket: string;
3900
3905
  /**
3901
- * @description The ID of the file
3906
+ * @description The ID of the file (required when size > 0)
3902
3907
  * @example file12345
3903
3908
  */
3904
- fileId: string;
3909
+ fileId?: string;
3905
3910
  /**
3906
3911
  * @description The encryption version used for the file
3907
3912
  * @example 03-aes
@@ -5298,7 +5303,7 @@ export interface operations {
5298
5303
  [name: string]: unknown;
5299
5304
  };
5300
5305
  content: {
5301
- 'application/json': components['schemas']['FileVersionDto'];
5306
+ 'application/json': components['schemas']['FileDto'];
5302
5307
  };
5303
5308
  };
5304
5309
  };
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.11.21",
4
+ "version": "1.11.23",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",
@@ -30,15 +30,15 @@
30
30
  "@internxt/eslint-config-internxt": "2.0.1",
31
31
  "@internxt/prettier-config": "1.0.2",
32
32
  "@types/jest": "30.0.0",
33
- "@types/sinon": "17.0.4",
34
- "eslint": "9.39.1",
33
+ "@types/sinon": "21.0.0",
34
+ "eslint": "9.39.2",
35
35
  "husky": "9.1.7",
36
36
  "jest": "30.2.0",
37
- "lint-staged": "16.2.6",
37
+ "lint-staged": "16.2.7",
38
38
  "openapi-typescript": "7.10.1",
39
- "prettier": "3.6.2",
39
+ "prettier": "3.7.4",
40
40
  "sinon": "21.0.0",
41
- "ts-jest": "29.4.5",
41
+ "ts-jest": "29.4.6",
42
42
  "typescript": "5.9.3"
43
43
  },
44
44
  "dependencies": {