@internxt/sdk 1.11.12 → 1.11.14

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.
@@ -1,7 +1,7 @@
1
1
  import { ApiSecurity, ApiUrl, AppDetails } from '../shared';
2
2
  import { TeamsSettings } from '../shared/types/teams';
3
3
  import { UserSettings, UUID } from '../shared/types/userSettings';
4
- import { ChangePasswordWithLinkPayload, CryptoProvider, Keys, LoginDetails, PrivateKeys, RegisterDetails, RegisterPreCreatedUser, RegisterPreCreatedUserResponse, SecurityDetails, Token, TwoFactorAuthQR } from './types';
4
+ import { ChangePasswordWithLinkPayload, CryptoProvider, Keys, LoginDetails, PrivateKeys, RegisterDetails, RegisterOpaqueDetails, RegisterPreCreatedUser, RegisterPreCreatedUserResponse, SecurityDetails, Token, TwoFactorAuthQR } from './types';
5
5
  import { paths } from '../schema';
6
6
  export * from './types';
7
7
  export declare class Auth {
@@ -11,6 +11,25 @@ export declare class Auth {
11
11
  private readonly apiUrl;
12
12
  static client(apiUrl: ApiUrl, appDetails: AppDetails, apiSecurity?: ApiSecurity): Auth;
13
13
  private constructor();
14
+ /**
15
+ * Runs the first phase (out of 2) of opaque registation of a new user
16
+ * @param email - The user email.
17
+ * @param registrationRequest - The opaque registration request.
18
+ * @returns The opaque sign up response.
19
+ */
20
+ registerOpaqueStart(email: string, registrationRequest: string): Promise<{
21
+ signUpResponse: string;
22
+ }>;
23
+ /**
24
+ * Runs the second phase (out of 2) of opaque registation of a new user
25
+ * @param registrationRecord - The opaque registration record.
26
+ * @param registerDetails - The user registration details.
27
+ * @param startLoginRequest - The opaque start login request.
28
+ * @returns The opaque login response.
29
+ */
30
+ registerOpaqueFinish(registrationRecord: string, registerDetails: RegisterOpaqueDetails, startLoginRequest: string): Promise<{
31
+ loginResponse: string;
32
+ }>;
14
33
  /**
15
34
  * Tries to register a new user
16
35
  * @param registerDetails
@@ -61,6 +80,25 @@ export declare class Auth {
61
80
  * @returns {Promise<void>} - Resolves successfuly when account is unblocked
62
81
  */
63
82
  unblockAccount(token: string): Promise<void>;
83
+ /**
84
+ * Runs the first phase (out of 2) of opaque log for the given user
85
+ * @param email - The user email.
86
+ * @param startLoginRequest - The opaque start login request.
87
+ * @param tfa - The two factor auth code.
88
+ * @returns The opaque login response.
89
+ */
90
+ loginOpaqueStart(email: string, startLoginRequest: string, tfa: string | undefined): Promise<{
91
+ loginResponse: string;
92
+ }>;
93
+ /**
94
+ * Runs the second phase (out of 2) of opaque log for the given user
95
+ * @param email
96
+ * @param finishLoginRequest
97
+ */
98
+ loginOpaqueFinish(email: string, finishLoginRequest: string): Promise<{
99
+ sessionID: string;
100
+ user: UserSettings;
101
+ }>;
64
102
  /**
65
103
  * Tries to log in a user given its login details
66
104
  * @param details
@@ -64,6 +64,44 @@ var Auth = /** @class */ (function () {
64
64
  Auth.client = function (apiUrl, appDetails, apiSecurity) {
65
65
  return new Auth(apiUrl, appDetails, apiSecurity);
66
66
  };
67
+ /**
68
+ * Runs the first phase (out of 2) of opaque registation of a new user
69
+ * @param email - The user email.
70
+ * @param registrationRequest - The opaque registration request.
71
+ * @returns The opaque sign up response.
72
+ */
73
+ Auth.prototype.registerOpaqueStart = function (email, registrationRequest) {
74
+ return this.client.post('/register-opaque/start', {
75
+ email: email,
76
+ registrationRequest: registrationRequest,
77
+ }, this.basicHeaders());
78
+ };
79
+ /**
80
+ * Runs the second phase (out of 2) of opaque registation of a new user
81
+ * @param registrationRecord - The opaque registration record.
82
+ * @param registerDetails - The user registration details.
83
+ * @param startLoginRequest - The opaque start login request.
84
+ * @returns The opaque login response.
85
+ */
86
+ Auth.prototype.registerOpaqueFinish = function (registrationRecord, registerDetails, startLoginRequest) {
87
+ return this.client.post('/register-opaque/finish', {
88
+ name: registerDetails.name,
89
+ lastname: registerDetails.lastname,
90
+ email: registerDetails.email,
91
+ registrationRecord: registrationRecord,
92
+ keys: {
93
+ ecc: {
94
+ publicKey: registerDetails.keys.ecc.publicKey,
95
+ privateKey: registerDetails.keys.ecc.privateKey,
96
+ },
97
+ kyber: {
98
+ publicKey: registerDetails.keys.kyber.publicKey,
99
+ privateKey: registerDetails.keys.kyber.privateKey,
100
+ },
101
+ },
102
+ startLoginRequest: startLoginRequest,
103
+ }, this.basicHeaders());
104
+ };
67
105
  /**
68
106
  * Tries to register a new user
69
107
  * @param registerDetails
@@ -189,6 +227,39 @@ var Auth = /** @class */ (function () {
189
227
  Auth.prototype.unblockAccount = function (token) {
190
228
  return this.client.put('users/unblock-account', { token: token }, this.basicHeaders());
191
229
  };
230
+ /**
231
+ * Runs the first phase (out of 2) of opaque log for the given user
232
+ * @param email - The user email.
233
+ * @param startLoginRequest - The opaque start login request.
234
+ * @param tfa - The two factor auth code.
235
+ * @returns The opaque login response.
236
+ */
237
+ Auth.prototype.loginOpaqueStart = function (email, startLoginRequest, tfa) {
238
+ return __awaiter(this, void 0, void 0, function () {
239
+ return __generator(this, function (_a) {
240
+ return [2 /*return*/, this.client.post('/auth/login-opaque/start', {
241
+ email: email,
242
+ startLoginRequest: startLoginRequest,
243
+ tfa: tfa,
244
+ }, this.basicHeaders())];
245
+ });
246
+ });
247
+ };
248
+ /**
249
+ * Runs the second phase (out of 2) of opaque log for the given user
250
+ * @param email
251
+ * @param finishLoginRequest
252
+ */
253
+ Auth.prototype.loginOpaqueFinish = function (email, finishLoginRequest) {
254
+ return __awaiter(this, void 0, void 0, function () {
255
+ return __generator(this, function (_a) {
256
+ return [2 /*return*/, this.client.post('/auth/login-opaque/finish', {
257
+ email: email,
258
+ finishLoginRequest: finishLoginRequest,
259
+ }, this.basicHeaders())];
260
+ });
261
+ });
262
+ };
192
263
  /**
193
264
  * Tries to log in a user given its login details
194
265
  * @param details
@@ -343,6 +414,7 @@ var Auth = /** @class */ (function () {
343
414
  return {
344
415
  encryptedSalt: data.sKey,
345
416
  tfaEnabled: data.tfa === true,
417
+ useOpaqueLogin: data.useOpaqueLogin === true,
346
418
  };
347
419
  });
348
420
  };
@@ -7,6 +7,26 @@ export interface LoginDetails {
7
7
  password: Password;
8
8
  tfaCode: string | undefined;
9
9
  }
10
+ export type UserKeys = {
11
+ ecc: {
12
+ publicKey: string;
13
+ privateKey: string;
14
+ };
15
+ kyber: {
16
+ publicKey: string;
17
+ privateKey: string;
18
+ };
19
+ };
20
+ export interface RegisterOpaqueDetails {
21
+ name: string;
22
+ lastname: string;
23
+ email: Email;
24
+ mnemonic: string;
25
+ keys: UserKeys;
26
+ captcha: string;
27
+ referrer?: string;
28
+ referral?: string;
29
+ }
10
30
  export interface RegisterDetails {
11
31
  name: string;
12
32
  lastname: string;
@@ -52,6 +72,7 @@ export declare class UserAccessError extends Error {
52
72
  export interface SecurityDetails {
53
73
  encryptedSalt: string;
54
74
  tfaEnabled: boolean;
75
+ useOpaqueLogin: boolean;
55
76
  }
56
77
  export interface TwoFactorAuthQR {
57
78
  qr: string;
@@ -2,6 +2,7 @@ import { paths } from '../../schema';
2
2
  import { ApiSecurity, ApiUrl, AppDetails } from '../../shared';
3
3
  import { UserSettings } from '../../shared/types/userSettings';
4
4
  import { ChangePasswordPayload, ChangePasswordPayloadNew, CheckChangeEmailExpirationResponse, FriendInvite, InitializeUserResponse, PreCreateUserResponse, Token, UpdateProfilePayload, UserPublicKeyResponse, UserPublicKeyWithCreationResponse, VerifyEmailChangeResponse } from './types';
5
+ import { UserKeys } from '../../auth/types';
5
6
  export * as UserTypes from './types';
6
7
  export declare class Users {
7
8
  private readonly client;
@@ -31,6 +32,8 @@ export declare class Users {
31
32
  avatar: UserSettings['avatar'];
32
33
  }>;
33
34
  /**
35
+ * @deprecated Use `refreshUser` instead.
36
+ *
34
37
  * Retrieves the user data for a specific user identified by the uuid.
35
38
  *
36
39
  * @param {string} params.userUuid - The UUID of the user.
@@ -67,6 +70,29 @@ export declare class Users {
67
70
  token: string;
68
71
  newToken: string;
69
72
  }>;
73
+ /**
74
+ * Runs the first phase (out of 2) of the password change.
75
+ * @param hmac - The HMAC to authenticate request.
76
+ * @param sessionID - The current session ID.
77
+ * @param registrationRequest - The opaque registration request.
78
+ * @returns {Promise<string>} A promise that returns opaque registration response.
79
+ */
80
+ changePwdOpaqueStart(hmac: string, sessionID: string, registrationRequest: string): Promise<{
81
+ registrationResponse: string;
82
+ }>;
83
+ /**
84
+ * Runs the second phase (out of 2) of the password change.
85
+ * @param hmac - The HMAC to authenticate request.
86
+ * @param sessionID - The current session ID.
87
+ * @param registrationRecord - The opaque registration record.
88
+ * @param mnemonic - The user's encrypted mnemonic.
89
+ * @param keys - The user's encrypted keys.
90
+ * @param startLoginRequest - The opaque start login request.
91
+ * @returns {Promise<string>} A promise that returns opaque login response.
92
+ */
93
+ changePwdOpaqueFinish(hmac: string, sessionID: string, registrationRecord: string, mnemonic: string, keys: UserKeys, startLoginRequest: string): Promise<{
94
+ loginResponse: string;
95
+ }>;
70
96
  /**
71
97
  * Pre registers an email
72
98
  * @param email
@@ -119,6 +119,8 @@ var Users = /** @class */ (function () {
119
119
  return this.client.get('/users/avatar/refresh', this.headers());
120
120
  };
121
121
  /**
122
+ * @deprecated Use `refreshUser` instead.
123
+ *
122
124
  * Retrieves the user data for a specific user identified by the uuid.
123
125
  *
124
126
  * @param {string} params.userUuid - The UUID of the user.
@@ -164,6 +166,40 @@ var Users = /** @class */ (function () {
164
166
  encryptVersion: payload.encryptVersion,
165
167
  }, this.headers());
166
168
  };
169
+ /**
170
+ * Runs the first phase (out of 2) of the password change.
171
+ * @param hmac - The HMAC to authenticate request.
172
+ * @param sessionID - The current session ID.
173
+ * @param registrationRequest - The opaque registration request.
174
+ * @returns {Promise<string>} A promise that returns opaque registration response.
175
+ */
176
+ Users.prototype.changePwdOpaqueStart = function (hmac, sessionID, registrationRequest) {
177
+ return this.client.patch('/users/password-opaque/start', {
178
+ hmac: hmac,
179
+ sessionID: sessionID,
180
+ registrationRequest: registrationRequest,
181
+ }, this.headers());
182
+ };
183
+ /**
184
+ * Runs the second phase (out of 2) of the password change.
185
+ * @param hmac - The HMAC to authenticate request.
186
+ * @param sessionID - The current session ID.
187
+ * @param registrationRecord - The opaque registration record.
188
+ * @param mnemonic - The user's encrypted mnemonic.
189
+ * @param keys - The user's encrypted keys.
190
+ * @param startLoginRequest - The opaque start login request.
191
+ * @returns {Promise<string>} A promise that returns opaque login response.
192
+ */
193
+ Users.prototype.changePwdOpaqueFinish = function (hmac, sessionID, registrationRecord, mnemonic, keys, startLoginRequest) {
194
+ return this.client.patch('/users/password-opaque/finish', {
195
+ hmac: hmac,
196
+ sessionID: sessionID,
197
+ keys: keys,
198
+ mnemonic: mnemonic,
199
+ registrationRecord: registrationRecord,
200
+ startLoginRequest: startLoginRequest,
201
+ }, this.headers());
202
+ };
167
203
  /**
168
204
  * Pre registers an email
169
205
  * @param email
package/dist/schema.d.ts CHANGED
@@ -192,6 +192,7 @@ export interface paths {
192
192
  path?: never;
193
193
  cookie?: never;
194
194
  };
195
+ /** @deprecated */
195
196
  get: operations['FolderController_getFolderFiles'];
196
197
  put?: never;
197
198
  post?: never;
@@ -208,6 +209,7 @@ export interface paths {
208
209
  path?: never;
209
210
  cookie?: never;
210
211
  };
212
+ /** @deprecated */
211
213
  get: operations['FolderController_checkFileExistence'];
212
214
  put?: never;
213
215
  post?: never;
@@ -294,6 +296,7 @@ export interface paths {
294
296
  path?: never;
295
297
  cookie?: never;
296
298
  };
299
+ /** @deprecated */
297
300
  get: operations['FolderController_getFolderFolders'];
298
301
  put?: never;
299
302
  post?: never;
@@ -319,6 +322,26 @@ export interface paths {
319
322
  patch?: never;
320
323
  trace?: never;
321
324
  };
325
+ '/folders/{uuid}/stats': {
326
+ parameters: {
327
+ query?: never;
328
+ header?: never;
329
+ path?: never;
330
+ cookie?: never;
331
+ };
332
+ /**
333
+ * Get folder statistics
334
+ * @description Calculates the total number of files and total size including all nested subfolders
335
+ */
336
+ get: operations['FolderController_getFolderStats'];
337
+ put?: never;
338
+ post?: never;
339
+ delete?: never;
340
+ options?: never;
341
+ head?: never;
342
+ patch?: never;
343
+ trace?: never;
344
+ };
322
345
  '/folders/{uuid}/ancestors': {
323
346
  parameters: {
324
347
  query?: never;
@@ -358,6 +381,7 @@ export interface paths {
358
381
  path?: never;
359
382
  cookie?: never;
360
383
  };
384
+ /** @deprecated */
361
385
  get: operations['FolderController_getFolderById'];
362
386
  put?: never;
363
387
  post?: never;
@@ -1746,7 +1770,10 @@ export interface paths {
1746
1770
  path?: never;
1747
1771
  cookie?: never;
1748
1772
  };
1749
- /** Get user credentials */
1773
+ /**
1774
+ * Get user credentials
1775
+ * @deprecated
1776
+ */
1750
1777
  get: operations['UserController_getUserCredentials'];
1751
1778
  put?: never;
1752
1779
  post?: never;
@@ -2169,6 +2196,26 @@ export interface paths {
2169
2196
  patch?: never;
2170
2197
  trace?: never;
2171
2198
  };
2199
+ '/users/payments/incomplete-checkout': {
2200
+ parameters: {
2201
+ query?: never;
2202
+ header?: never;
2203
+ path?: never;
2204
+ cookie?: never;
2205
+ };
2206
+ get?: never;
2207
+ put?: never;
2208
+ /**
2209
+ * Handle incomplete checkout event
2210
+ * @description Sends notification email when user abandons checkout process
2211
+ */
2212
+ post: operations['UserController_handleIncompleteCheckout'];
2213
+ delete?: never;
2214
+ options?: never;
2215
+ head?: never;
2216
+ patch?: never;
2217
+ trace?: never;
2218
+ };
2172
2219
  '/storage/share/domains': {
2173
2220
  parameters: {
2174
2221
  query?: never;
@@ -2768,7 +2815,8 @@ export interface paths {
2768
2815
  delete: operations['GatewayController_destroyWorkspace'];
2769
2816
  options?: never;
2770
2817
  head?: never;
2771
- patch?: never;
2818
+ /** Update workspace tier or storage */
2819
+ patch: operations['GatewayController_updateWorkspace'];
2772
2820
  trace?: never;
2773
2821
  };
2774
2822
  '/gateway/workspaces/storage': {
@@ -2779,7 +2827,10 @@ export interface paths {
2779
2827
  cookie?: never;
2780
2828
  };
2781
2829
  get?: never;
2782
- /** Update a workspace */
2830
+ /**
2831
+ * Update a workspace (deprecated in favor of PATCH /workspaces)
2832
+ * @deprecated
2833
+ */
2783
2834
  put: operations['GatewayController_updateWorkspaceStorage'];
2784
2835
  post?: never;
2785
2836
  delete?: never;
@@ -2822,6 +2873,23 @@ export interface paths {
2822
2873
  patch?: never;
2823
2874
  trace?: never;
2824
2875
  };
2876
+ '/gateway/users/credentials': {
2877
+ parameters: {
2878
+ query?: never;
2879
+ header?: never;
2880
+ path?: never;
2881
+ cookie?: never;
2882
+ };
2883
+ /** Get user credentials */
2884
+ get: operations['GatewayController_getUserCredentials'];
2885
+ put?: never;
2886
+ post?: never;
2887
+ delete?: never;
2888
+ options?: never;
2889
+ head?: never;
2890
+ patch?: never;
2891
+ trace?: never;
2892
+ };
2825
2893
  '/gateway/users/storage/stackability': {
2826
2894
  parameters: {
2827
2895
  query?: never;
@@ -2856,6 +2924,47 @@ export interface paths {
2856
2924
  patch: operations['GatewayController_updateUser'];
2857
2925
  trace?: never;
2858
2926
  };
2927
+ '/gateway/users/failed-payment': {
2928
+ parameters: {
2929
+ query?: never;
2930
+ header?: never;
2931
+ path?: never;
2932
+ cookie?: never;
2933
+ };
2934
+ get?: never;
2935
+ put?: never;
2936
+ /**
2937
+ * Handle failed payment notification
2938
+ * @description Sends email notification to user when payment fails
2939
+ */
2940
+ post: operations['GatewayController_handleFailedPayment'];
2941
+ delete?: never;
2942
+ options?: never;
2943
+ head?: never;
2944
+ patch?: never;
2945
+ trace?: never;
2946
+ };
2947
+ '/gateway/users/{uuid}/limits/overrides': {
2948
+ parameters: {
2949
+ query?: never;
2950
+ header?: never;
2951
+ path?: never;
2952
+ cookie?: never;
2953
+ };
2954
+ /**
2955
+ * Get user limit overrides
2956
+ * @description Returns all limit overrides assigned to a specific user. These overrides take precedence over tier limits.
2957
+ */
2958
+ get: operations['GatewayController_getUserLimitOverrides'];
2959
+ /** @description Overrides a specific feature for a user. */
2960
+ put: operations['GatewayController_overrideUserLimit'];
2961
+ post?: never;
2962
+ delete?: never;
2963
+ options?: never;
2964
+ head?: never;
2965
+ patch?: never;
2966
+ trace?: never;
2967
+ };
2859
2968
  }
2860
2969
  export type webhooks = Record<string, never>;
2861
2970
  export interface components {
@@ -3175,6 +3284,28 @@ export interface components {
3175
3284
  ResultFoldersDto: {
3176
3285
  result: components['schemas']['FolderDto'][];
3177
3286
  };
3287
+ FolderStatsDto: {
3288
+ /**
3289
+ * @description Number of files in the folder and all subfolders
3290
+ * @example 523
3291
+ */
3292
+ fileCount: number;
3293
+ /**
3294
+ * @description Whether file count is exact or capped at the maximum file count limit
3295
+ * @example true
3296
+ */
3297
+ isFileCountExact: boolean;
3298
+ /**
3299
+ * @description Total size in bytes of all files in folder and subfolders
3300
+ * @example 5368709120
3301
+ */
3302
+ totalSize: number;
3303
+ /**
3304
+ * @description Whether total size is exact or approximate due to exceeding the maximum items limit
3305
+ * @example true
3306
+ */
3307
+ isTotalSizeExact: boolean;
3308
+ };
3178
3309
  UpdateFolderMetaDto: {
3179
3310
  /**
3180
3311
  * @description New name
@@ -3919,7 +4050,7 @@ export interface components {
3919
4050
  */
3920
4051
  email: Record<string, never>;
3921
4052
  };
3922
- RefreshTokenUserResponseDto: {
4053
+ UserResponseDto: {
3923
4054
  email: string;
3924
4055
  userId: string;
3925
4056
  mnemonic: string;
@@ -3934,25 +4065,54 @@ export interface components {
3934
4065
  registerCompleted: boolean;
3935
4066
  username: string;
3936
4067
  bridgeUser: string;
4068
+ bucket: string;
3937
4069
  backupsBucket: string;
3938
4070
  avatar: string;
3939
4071
  emailVerified: boolean;
4072
+ sharedWorkspace: boolean;
4073
+ /** @deprecated */
4074
+ hasReferralsProgram: boolean;
4075
+ /** @deprecated */
4076
+ teams: boolean;
3940
4077
  /** Format: date-time */
3941
4078
  lastPasswordChangedAt: string;
4079
+ keys: components['schemas']['KeysDto'];
4080
+ /** @deprecated */
4081
+ privateKey: Record<string, never>;
4082
+ /** @deprecated */
4083
+ publicKey: Record<string, never>;
4084
+ /** @deprecated */
4085
+ revocateKey: Record<string, never>;
3942
4086
  };
3943
- RefreshTokenResponseDto: {
4087
+ RefreshUserCredentialsDto: {
3944
4088
  /**
4089
+ * @deprecated
3945
4090
  * @description The old token that has been replaced
3946
- * @example newToken1234567890
4091
+ * @example oldToken1234567890
3947
4092
  */
3948
- token: string;
4093
+ token?: string;
4094
+ /**
4095
+ * @description The new token to be used for authentication
4096
+ * @example oldToken1234567890
4097
+ */
4098
+ newToken: string;
4099
+ /** @description User information */
4100
+ user: components['schemas']['UserResponseDto'];
4101
+ };
4102
+ RefreshUserTokensDto: {
4103
+ /**
4104
+ * @deprecated
4105
+ * @description The old token that has been replaced
4106
+ * @example oldToken1234567890
4107
+ */
4108
+ oldToken?: string;
3949
4109
  /**
3950
4110
  * @description The new token to be used for authentication
3951
4111
  * @example oldToken1234567890
3952
4112
  */
3953
4113
  newToken: string;
3954
4114
  /** @description User information */
3955
- user: components['schemas']['RefreshTokenUserResponseDto'];
4115
+ user: components['schemas']['UserResponseDto'];
3956
4116
  };
3957
4117
  RefreshUserAvatarDto: {
3958
4118
  /** @description A new avatar URL for the given user */
@@ -4228,6 +4388,13 @@ export interface components {
4228
4388
  */
4229
4389
  mnemonic: string;
4230
4390
  };
4391
+ IncompleteCheckoutDto: {
4392
+ /**
4393
+ * @description URL to complete the checkout process
4394
+ * @example https://drive.internxt.com/checkout/complete
4395
+ */
4396
+ completeCheckoutUrl: string;
4397
+ };
4231
4398
  FuzzySearchResult: {
4232
4399
  id: string;
4233
4400
  itemId: string;
@@ -4468,7 +4635,7 @@ export interface components {
4468
4635
  * @description Id of file or folder (deprecated in favor of uuid)
4469
4636
  * @example 4
4470
4637
  */
4471
- id: string | null;
4638
+ id?: string;
4472
4639
  /**
4473
4640
  * @description Uuid of file or folder
4474
4641
  * @example 4
@@ -4628,12 +4795,12 @@ export interface components {
4628
4795
  * @description User password
4629
4796
  * @example password_example
4630
4797
  */
4631
- pass: string;
4798
+ pass?: string;
4632
4799
  /**
4633
4800
  * @description Code tfa
4634
4801
  * @example 123456
4635
4802
  */
4636
- code: string;
4803
+ code?: string;
4637
4804
  };
4638
4805
  CreateSendLinkDto: {
4639
4806
  /**
@@ -4680,6 +4847,11 @@ export interface components {
4680
4847
  * @example Id of the owner
4681
4848
  */
4682
4849
  ownerId: string;
4850
+ /**
4851
+ * @description Tier ID for the workspace
4852
+ * @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
4853
+ */
4854
+ tierId?: string;
4683
4855
  /**
4684
4856
  * @description Address of the workspace
4685
4857
  * @example Address from billing
@@ -4701,6 +4873,28 @@ export interface components {
4701
4873
  */
4702
4874
  numberOfSeats: number;
4703
4875
  };
4876
+ UpdateWorkspaceDto: {
4877
+ /**
4878
+ * @description UUID of the owner of the workspace
4879
+ * @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
4880
+ */
4881
+ ownerId: string;
4882
+ /**
4883
+ * @description Tier ID to update workspace tier
4884
+ * @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
4885
+ */
4886
+ tierId?: string;
4887
+ /**
4888
+ * @description Workspace max space in bytes (required if numberOfSeats is provided)
4889
+ * @example 312321312
4890
+ */
4891
+ maxSpaceBytes?: number;
4892
+ /**
4893
+ * @description Number of seats in the workspace (required if maxSpaceBytes is provided)
4894
+ * @example 5
4895
+ */
4896
+ numberOfSeats?: number;
4897
+ };
4704
4898
  UpdateWorkspaceStorageDto: {
4705
4899
  /**
4706
4900
  * @description Uuid of the owner of the space
@@ -4737,6 +4931,44 @@ export interface components {
4737
4931
  */
4738
4932
  tierId?: string;
4739
4933
  };
4934
+ FailedPaymentDto: {
4935
+ /**
4936
+ * @description UUID of the user who had a failed payment
4937
+ * @example 87204d6b-c4a7-4f38-bd99-f7f47964a643
4938
+ */
4939
+ userId: string;
4940
+ };
4941
+ UserLimitResponseDto: {
4942
+ /**
4943
+ * @description Limit ID
4944
+ * @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
4945
+ */
4946
+ id: string;
4947
+ /**
4948
+ * @description Limit label
4949
+ * @example cli-access
4950
+ */
4951
+ label: string;
4952
+ /**
4953
+ * @description Limit type (boolean or counter)
4954
+ * @example boolean
4955
+ */
4956
+ type: string;
4957
+ /**
4958
+ * @description Limit value
4959
+ * @example true
4960
+ */
4961
+ value: string;
4962
+ };
4963
+ OverrideUserLimitDto: {
4964
+ /**
4965
+ * @description Feature name
4966
+ * @example cli
4967
+ */
4968
+ feature: string;
4969
+ /** @example true */
4970
+ value: string;
4971
+ };
4740
4972
  };
4741
4973
  responses: never;
4742
4974
  parameters: never;
@@ -4749,12 +4981,19 @@ export interface operations {
4749
4981
  FileController_getFiles: {
4750
4982
  parameters: {
4751
4983
  query: {
4984
+ /** @description Items per page */
4752
4985
  limit: number;
4986
+ /** @description Offset for pagination */
4753
4987
  offset: number;
4988
+ /** @description File status filter */
4754
4989
  status: 'EXISTS' | 'TRASHED' | 'DELETED' | 'ALL';
4990
+ /** @description Bucket ID filter */
4755
4991
  bucket?: string;
4756
- sort?: string;
4757
- order?: string;
4992
+ /** @description Field to sort by */
4993
+ sort?: 'updatedAt' | 'size' | 'id' | 'plainName' | 'name' | 'uuid';
4994
+ /** @description Sort order */
4995
+ order?: 'ASC' | 'DESC';
4996
+ /** @description Filter files updated after this date */
4758
4997
  updatedAt?: string;
4759
4998
  };
4760
4999
  header?: never;
@@ -5017,10 +5256,18 @@ export interface operations {
5017
5256
  FolderController_getFolders: {
5018
5257
  parameters: {
5019
5258
  query: {
5259
+ /** @description Items per page */
5020
5260
  limit: number;
5261
+ /** @description Offset for pagination */
5021
5262
  offset: number;
5022
- status: 'EXISTS' | 'TRASHED' | 'DELETED' | 'ALL';
5263
+ /** @description Folder status filter */
5264
+ status: 'ALL' | 'EXISTS' | 'TRASHED' | 'DELETED';
5265
+ /** @description Filter folders updated after this date */
5023
5266
  updatedAt?: string;
5267
+ /** @description Field to sort by */
5268
+ sort?: 'uuid' | 'plainName' | 'updatedAt';
5269
+ /** @description Sort order */
5270
+ order?: 'ASC' | 'DESC';
5024
5271
  };
5025
5272
  header?: never;
5026
5273
  path?: never;
@@ -5102,10 +5349,14 @@ export interface operations {
5102
5349
  FolderController_getFolderContentFiles: {
5103
5350
  parameters: {
5104
5351
  query: {
5352
+ /** @description Items per page */
5105
5353
  limit: number;
5354
+ /** @description Offset for pagination */
5106
5355
  offset: number;
5107
- sort: string;
5108
- order: string;
5356
+ /** @description Field to sort by */
5357
+ sort?: 'updatedAt' | 'size' | 'id' | 'plainName' | 'name' | 'uuid';
5358
+ /** @description Sort order */
5359
+ order?: 'ASC' | 'DESC';
5109
5360
  };
5110
5361
  header?: never;
5111
5362
  path: {
@@ -5128,10 +5379,14 @@ export interface operations {
5128
5379
  FolderController_getFolderFiles: {
5129
5380
  parameters: {
5130
5381
  query: {
5382
+ /** @description Items per page */
5131
5383
  limit: number;
5384
+ /** @description Offset for pagination */
5132
5385
  offset: number;
5133
- sort?: string;
5134
- order?: string;
5386
+ /** @description Field to sort by */
5387
+ sort?: 'updatedAt' | 'size' | 'id' | 'plainName' | 'name' | 'uuid';
5388
+ /** @description Sort order */
5389
+ order?: 'ASC' | 'DESC';
5135
5390
  };
5136
5391
  header?: never;
5137
5392
  path: {
@@ -5176,10 +5431,14 @@ export interface operations {
5176
5431
  FolderController_getFolderContentFolders: {
5177
5432
  parameters: {
5178
5433
  query: {
5434
+ /** @description Items per page */
5179
5435
  limit: number;
5436
+ /** @description Offset for pagination */
5180
5437
  offset: number;
5181
- sort: string;
5182
- order: string;
5438
+ /** @description Field to sort by */
5439
+ sort?: 'updatedAt' | 'id' | 'plainName' | 'name' | 'uuid';
5440
+ /** @description Sort order */
5441
+ order?: 'ASC' | 'DESC';
5183
5442
  };
5184
5443
  header?: never;
5185
5444
  path: {
@@ -5301,10 +5560,14 @@ export interface operations {
5301
5560
  FolderController_getFolderFolders: {
5302
5561
  parameters: {
5303
5562
  query: {
5563
+ /** @description Items per page */
5304
5564
  limit: number;
5565
+ /** @description Offset for pagination */
5305
5566
  offset: number;
5306
- sort?: string;
5307
- order?: string;
5567
+ /** @description Field to sort by */
5568
+ sort?: 'updatedAt' | 'id' | 'plainName' | 'name' | 'uuid';
5569
+ /** @description Sort order */
5570
+ order?: 'ASC' | 'DESC';
5308
5571
  };
5309
5572
  header?: never;
5310
5573
  path: {
@@ -5370,6 +5633,28 @@ export interface operations {
5370
5633
  };
5371
5634
  };
5372
5635
  };
5636
+ FolderController_getFolderStats: {
5637
+ parameters: {
5638
+ query?: never;
5639
+ header?: never;
5640
+ path: {
5641
+ /** @description Folder UUID */
5642
+ uuid: string;
5643
+ };
5644
+ cookie?: never;
5645
+ };
5646
+ requestBody?: never;
5647
+ responses: {
5648
+ 200: {
5649
+ headers: {
5650
+ [name: string]: unknown;
5651
+ };
5652
+ content: {
5653
+ 'application/json': components['schemas']['FolderStatsDto'];
5654
+ };
5655
+ };
5656
+ };
5657
+ };
5373
5658
  FolderController_getFolderAncestors: {
5374
5659
  parameters: {
5375
5660
  query: {
@@ -5573,7 +5858,7 @@ export interface operations {
5573
5858
  };
5574
5859
  requestBody?: never;
5575
5860
  responses: {
5576
- /** @description Remove */
5861
+ /** @description Remove */
5577
5862
  200: {
5578
5863
  headers: {
5579
5864
  [name: string]: unknown;
@@ -6480,7 +6765,7 @@ export interface operations {
6480
6765
  status?: 'EXISTS' | 'TRASHED' | 'DELETED' | 'ALL';
6481
6766
  bucket?: string;
6482
6767
  sort?: string;
6483
- order?: string;
6768
+ order?: 'ASC' | 'DESC';
6484
6769
  updatedAt?: string;
6485
6770
  };
6486
6771
  header?: never;
@@ -7592,7 +7877,9 @@ export interface operations {
7592
7877
  headers: {
7593
7878
  [name: string]: unknown;
7594
7879
  };
7595
- content?: never;
7880
+ content: {
7881
+ 'application/json': components['schemas']['RefreshUserCredentialsDto'];
7882
+ };
7596
7883
  };
7597
7884
  };
7598
7885
  };
@@ -7605,13 +7892,13 @@ export interface operations {
7605
7892
  };
7606
7893
  requestBody?: never;
7607
7894
  responses: {
7608
- /** @description Returns a new token */
7895
+ /** @description Returns the user metadata and the authentication tokens */
7609
7896
  200: {
7610
7897
  headers: {
7611
7898
  [name: string]: unknown;
7612
7899
  };
7613
7900
  content: {
7614
- 'application/json': components['schemas']['RefreshTokenResponseDto'];
7901
+ 'application/json': components['schemas']['RefreshUserTokensDto'];
7615
7902
  };
7616
7903
  };
7617
7904
  };
@@ -8162,6 +8449,28 @@ export interface operations {
8162
8449
  };
8163
8450
  };
8164
8451
  };
8452
+ UserController_handleIncompleteCheckout: {
8453
+ parameters: {
8454
+ query?: never;
8455
+ header?: never;
8456
+ path?: never;
8457
+ cookie?: never;
8458
+ };
8459
+ requestBody: {
8460
+ content: {
8461
+ 'application/json': components['schemas']['IncompleteCheckoutDto'];
8462
+ };
8463
+ };
8464
+ responses: {
8465
+ /** @description Incomplete checkout email sent successfully */
8466
+ 200: {
8467
+ headers: {
8468
+ [name: string]: unknown;
8469
+ };
8470
+ content?: never;
8471
+ };
8472
+ };
8473
+ };
8165
8474
  ShareController_getDomains: {
8166
8475
  parameters: {
8167
8476
  query?: never;
@@ -8228,6 +8537,8 @@ export interface operations {
8228
8537
  platform?: components['schemas']['DevicePlatform'];
8229
8538
  /** @description OS Installation unique identifier */
8230
8539
  key?: string;
8540
+ /** @description Folder uuid */
8541
+ folderUuid?: string;
8231
8542
  /** @description Device hostname */
8232
8543
  hostname?: string;
8233
8544
  limit: number;
@@ -9066,6 +9377,28 @@ export interface operations {
9066
9377
  };
9067
9378
  };
9068
9379
  };
9380
+ GatewayController_updateWorkspace: {
9381
+ parameters: {
9382
+ query?: never;
9383
+ header?: never;
9384
+ path?: never;
9385
+ cookie?: never;
9386
+ };
9387
+ requestBody: {
9388
+ content: {
9389
+ 'application/json': components['schemas']['UpdateWorkspaceDto'];
9390
+ };
9391
+ };
9392
+ responses: {
9393
+ /** @description Workspace updated successfully */
9394
+ 200: {
9395
+ headers: {
9396
+ [name: string]: unknown;
9397
+ };
9398
+ content?: never;
9399
+ };
9400
+ };
9401
+ };
9069
9402
  GatewayController_updateWorkspaceStorage: {
9070
9403
  parameters: {
9071
9404
  query?: never;
@@ -9130,6 +9463,27 @@ export interface operations {
9130
9463
  };
9131
9464
  };
9132
9465
  };
9466
+ GatewayController_getUserCredentials: {
9467
+ parameters: {
9468
+ query: {
9469
+ /** @description The email of the user */
9470
+ email: string;
9471
+ };
9472
+ header?: never;
9473
+ path?: never;
9474
+ cookie?: never;
9475
+ };
9476
+ requestBody?: never;
9477
+ responses: {
9478
+ /** @description Get user credentials */
9479
+ 200: {
9480
+ headers: {
9481
+ [name: string]: unknown;
9482
+ };
9483
+ content?: never;
9484
+ };
9485
+ };
9486
+ };
9133
9487
  GatewayController_checkUserStorageExpansion: {
9134
9488
  parameters: {
9135
9489
  query: {
@@ -9176,4 +9530,79 @@ export interface operations {
9176
9530
  };
9177
9531
  };
9178
9532
  };
9533
+ GatewayController_handleFailedPayment: {
9534
+ parameters: {
9535
+ query?: never;
9536
+ header?: never;
9537
+ path?: never;
9538
+ cookie?: never;
9539
+ };
9540
+ requestBody: {
9541
+ content: {
9542
+ 'application/json': components['schemas']['FailedPaymentDto'];
9543
+ };
9544
+ };
9545
+ responses: {
9546
+ /** @description Failed payment email sent successfully */
9547
+ 200: {
9548
+ headers: {
9549
+ [name: string]: unknown;
9550
+ };
9551
+ content: {
9552
+ 'application/json': {
9553
+ /** @example true */
9554
+ success?: boolean;
9555
+ };
9556
+ };
9557
+ };
9558
+ };
9559
+ };
9560
+ GatewayController_getUserLimitOverrides: {
9561
+ parameters: {
9562
+ query?: never;
9563
+ header?: never;
9564
+ path: {
9565
+ /** @description User UUID */
9566
+ uuid: string;
9567
+ };
9568
+ cookie?: never;
9569
+ };
9570
+ requestBody?: never;
9571
+ responses: {
9572
+ /** @description List of user limit overrides */
9573
+ 200: {
9574
+ headers: {
9575
+ [name: string]: unknown;
9576
+ };
9577
+ content: {
9578
+ 'application/json': components['schemas']['UserLimitResponseDto'][];
9579
+ };
9580
+ };
9581
+ };
9582
+ };
9583
+ GatewayController_overrideUserLimit: {
9584
+ parameters: {
9585
+ query?: never;
9586
+ header?: never;
9587
+ path: {
9588
+ /** @description User UUID */
9589
+ uuid: string;
9590
+ };
9591
+ cookie?: never;
9592
+ };
9593
+ requestBody: {
9594
+ content: {
9595
+ 'application/json': components['schemas']['OverrideUserLimitDto'];
9596
+ };
9597
+ };
9598
+ responses: {
9599
+ /** @description Limit successfully set for user */
9600
+ 200: {
9601
+ headers: {
9602
+ [name: string]: unknown;
9603
+ };
9604
+ content?: never;
9605
+ };
9606
+ };
9607
+ };
9179
9608
  }
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.12",
4
+ "version": "1.11.14",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",
@@ -31,19 +31,18 @@
31
31
  "@internxt/prettier-config": "1.0.2",
32
32
  "@types/jest": "30.0.0",
33
33
  "@types/sinon": "17.0.4",
34
- "@types/uuid": "10.0.0",
35
- "eslint": "9.36.0",
34
+ "eslint": "9.39.1",
36
35
  "husky": "9.1.7",
37
36
  "jest": "30.2.0",
38
- "lint-staged": "16.2.3",
39
- "openapi-typescript": "^7.9.1",
37
+ "lint-staged": "16.2.6",
38
+ "openapi-typescript": "7.10.1",
40
39
  "prettier": "3.6.2",
41
40
  "sinon": "21.0.0",
42
- "ts-jest": "29.4.4",
41
+ "ts-jest": "29.4.5",
43
42
  "typescript": "5.9.3"
44
43
  },
45
44
  "dependencies": {
46
- "axios": "^1.12.2",
45
+ "axios": "1.13.2",
47
46
  "uuid": "11.1.0"
48
47
  },
49
48
  "lint-staged": {