@internxt/sdk 1.5.25 → 1.6.4

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.
Files changed (93) hide show
  1. package/dist/auth/index.d.ts +127 -122
  2. package/dist/auth/index.js +378 -310
  3. package/dist/auth/types.d.ts +65 -54
  4. package/dist/auth/types.js +26 -26
  5. package/dist/drive/backups/index.d.ts +18 -18
  6. package/dist/drive/backups/index.js +40 -40
  7. package/dist/drive/backups/types.d.ts +27 -27
  8. package/dist/drive/backups/types.js +2 -2
  9. package/dist/drive/index.d.ts +7 -7
  10. package/dist/drive/index.js +23 -19
  11. package/dist/drive/payments/index.d.ts +66 -71
  12. package/dist/drive/payments/index.js +206 -208
  13. package/dist/drive/payments/types.d.ts +180 -176
  14. package/dist/drive/payments/types.js +37 -37
  15. package/dist/drive/referrals/index.d.ts +19 -19
  16. package/dist/drive/referrals/index.js +54 -50
  17. package/dist/drive/referrals/types.d.ts +21 -21
  18. package/dist/drive/referrals/types.js +18 -18
  19. package/dist/drive/share/index.d.ts +319 -319
  20. package/dist/drive/share/index.js +544 -540
  21. package/dist/drive/share/types.d.ts +360 -360
  22. package/dist/drive/share/types.js +2 -2
  23. package/dist/drive/storage/index.d.ts +315 -315
  24. package/dist/drive/storage/index.js +634 -630
  25. package/dist/drive/storage/types.d.ts +480 -473
  26. package/dist/drive/storage/types.js +13 -13
  27. package/dist/drive/trash/index.d.ts +75 -75
  28. package/dist/drive/trash/index.js +184 -180
  29. package/dist/drive/trash/types.d.ts +29 -29
  30. package/dist/drive/trash/types.js +2 -2
  31. package/dist/drive/users/index.d.ts +135 -135
  32. package/dist/drive/users/index.js +208 -204
  33. package/dist/drive/users/types.d.ts +53 -51
  34. package/dist/drive/users/types.js +2 -2
  35. package/dist/index.d.ts +6 -6
  36. package/dist/index.js +35 -31
  37. package/dist/network/download.d.ts +8 -8
  38. package/dist/network/download.js +123 -123
  39. package/dist/network/errors/codes.d.ts +24 -24
  40. package/dist/network/errors/codes.js +48 -48
  41. package/dist/network/errors/context.d.ts +35 -35
  42. package/dist/network/errors/context.js +39 -39
  43. package/dist/network/errors/download.d.ts +4 -4
  44. package/dist/network/errors/download.js +52 -48
  45. package/dist/network/errors/index.d.ts +3 -3
  46. package/dist/network/errors/index.js +19 -15
  47. package/dist/network/errors/upload.d.ts +13 -13
  48. package/dist/network/errors/upload.js +82 -78
  49. package/dist/network/index.d.ts +70 -70
  50. package/dist/network/index.js +315 -311
  51. package/dist/network/types.d.ts +102 -102
  52. package/dist/network/types.js +18 -18
  53. package/dist/network/upload.d.ts +4 -4
  54. package/dist/network/upload.js +158 -159
  55. package/dist/photos/devices/index.d.ts +10 -10
  56. package/dist/photos/devices/index.js +79 -79
  57. package/dist/photos/index.d.ts +17 -17
  58. package/dist/photos/index.js +56 -52
  59. package/dist/photos/photos/index.d.ts +60 -60
  60. package/dist/photos/photos/index.js +225 -225
  61. package/dist/photos/shares/index.d.ts +8 -8
  62. package/dist/photos/shares/index.js +34 -34
  63. package/dist/photos/types.d.ts +154 -154
  64. package/dist/photos/types.js +19 -19
  65. package/dist/photos/users/index.d.ts +7 -7
  66. package/dist/photos/users/index.js +46 -46
  67. package/dist/shared/headers/index.d.ts +21 -21
  68. package/dist/shared/headers/index.js +78 -79
  69. package/dist/shared/http/client.d.ts +85 -85
  70. package/dist/shared/http/client.js +172 -172
  71. package/dist/shared/http/types.d.ts +7 -7
  72. package/dist/shared/http/types.js +2 -2
  73. package/dist/shared/index.d.ts +1 -1
  74. package/dist/shared/index.js +17 -13
  75. package/dist/shared/types/apiConnection.d.ts +12 -12
  76. package/dist/shared/types/apiConnection.js +2 -2
  77. package/dist/shared/types/appsumo.d.ts +16 -16
  78. package/dist/shared/types/appsumo.js +12 -12
  79. package/dist/shared/types/errors.d.ts +5 -5
  80. package/dist/shared/types/errors.js +28 -28
  81. package/dist/shared/types/teams.d.ts +9 -9
  82. package/dist/shared/types/teams.js +2 -2
  83. package/dist/shared/types/userSettings.d.ts +43 -29
  84. package/dist/shared/types/userSettings.js +2 -2
  85. package/dist/utils.d.ts +3 -3
  86. package/dist/utils.js +24 -25
  87. package/dist/workspaces/index.d.ts +176 -176
  88. package/dist/workspaces/index.js +419 -415
  89. package/dist/workspaces/index.test.d.ts +1 -1
  90. package/dist/workspaces/index.test.js +908 -903
  91. package/dist/workspaces/types.d.ts +294 -291
  92. package/dist/workspaces/types.js +2 -2
  93. package/package.json +13 -13
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,135 +1,135 @@
1
- import { ApiSecurity, ApiUrl, AppDetails } from '../../shared';
2
- import { UserSettings } from '../../shared/types/userSettings';
3
- import { ChangePasswordPayload, ChangePasswordPayloadNew, CheckChangeEmailExpirationResponse, FriendInvite, InitializeUserResponse, PreCreateUserResponse, UpdateProfilePayload, UserPublicKeyResponse, VerifyEmailChangeResponse } from './types';
4
- export * as UserTypes from './types';
5
- export declare class Users {
6
- private readonly client;
7
- private readonly appDetails;
8
- private readonly apiSecurity;
9
- static client(apiUrl: ApiUrl, appDetails: AppDetails, apiSecurity: ApiSecurity): Users;
10
- private constructor();
11
- /**
12
- * Sends an invitation to the specified email
13
- * @param email
14
- */
15
- sendInvitation(email: string): Promise<void>;
16
- /**
17
- * Initialize basic state of user and returns data after registration process
18
- * @param email
19
- * @param mnemonic
20
- */
21
- initialize(email: string, mnemonic: string): Promise<InitializeUserResponse>;
22
- /**
23
- * Returns fresh data of the user
24
- */
25
- refreshUser(): Promise<{
26
- user: UserSettings;
27
- token: string;
28
- }>;
29
- /**
30
- * Retrieves the user data for a specific user identified by the uuid.
31
- *
32
- * @param {string} params.userUuid - The UUID of the user.
33
- * @return {Promise<Object>} A promise that resolves to an object containing the user data.
34
- * The object has the following properties:
35
- * - `newToken` (string): The new token of the user.
36
- * - `oldToken` (string): The old drive token of the user.
37
- * - `user` (UserSettings): The user data.
38
- */
39
- getUserData({ userUuid }: {
40
- userUuid: string;
41
- }): Promise<{
42
- newToken: string;
43
- oldToken: string;
44
- user: UserSettings;
45
- }>;
46
- /**
47
- * Updates the authentication credentials and invalidates previous tokens (Legacy backend (drive-server))
48
- * @param payload
49
- *
50
- * @returns {Promise<{token: string, newToken: string}>} A promise that returns new tokens for this user.
51
- */
52
- changePasswordLegacy(payload: ChangePasswordPayload): Promise<{
53
- token: string;
54
- newToken: string;
55
- }>;
56
- /**
57
- * Updates the authentication credentials and invalidates previous tokens (New backend (drive-server-wip))
58
- * @param payload
59
- *
60
- * @returns {Promise<{token: string, newToken: string}>} A promise that returns new tokens for this user.
61
- */
62
- changePassword(payload: ChangePasswordPayloadNew): Promise<{
63
- token: string;
64
- newToken: string;
65
- }>;
66
- /**
67
- * Pre registers an email
68
- * @param email
69
- * @returns {Promise<PreCreateUserResponse>} A promise that returns a public key for this user.
70
- */
71
- preRegister(email: string): Promise<PreCreateUserResponse>;
72
- /**
73
- * Updates a user profile
74
- * @param payload
75
- */
76
- updateProfile(payload: UpdateProfilePayload): Promise<void>;
77
- /**
78
- * Updates a user avatar
79
- * @param payload
80
- */
81
- updateAvatar(payload: {
82
- avatar: Blob;
83
- }): Promise<{
84
- avatar: string;
85
- }>;
86
- /**
87
- * Delete current user avatar
88
- */
89
- deleteAvatar(): Promise<void>;
90
- /**
91
- * Gets all friend invites created by this user
92
- */
93
- getFriendInvites(): Promise<FriendInvite[]>;
94
- /**
95
- * Sends verification email
96
- */
97
- sendVerificationEmail(): Promise<void>;
98
- /**
99
- * Verifies user email
100
- */
101
- verifyEmail(payload: {
102
- verificationToken: string;
103
- }): Promise<void>;
104
- /**
105
- * Change user email by new email
106
- *
107
- * @param {string} newEmail
108
- *
109
- * @returns {Promise<void>}
110
- */
111
- changeUserEmail(newEmail: string): Promise<void>;
112
- /**
113
- * Verify user email change
114
- *
115
- * @param {string} encryptedAttemptChangeEmailId
116
- *
117
- * @returns {Promise<VerifyEmailChangeResponse>}
118
- */
119
- verifyEmailChange(encryptedAttemptChangeEmailId: string): Promise<VerifyEmailChangeResponse>;
120
- /**
121
- * Check if user email change verification link is expired
122
- *
123
- * @param {string} encryptedAttemptChangeEmailId
124
- *
125
- * @returns {Promise<CheckChangeEmailExpirationResponse>}
126
- */
127
- checkChangeEmailExpiration(encryptedAttemptChangeEmailId: string): Promise<CheckChangeEmailExpirationResponse>;
128
- /**
129
- * Get public key of given email
130
- */
131
- getPublicKeyByEmail({ email }: {
132
- email: string;
133
- }): Promise<UserPublicKeyResponse>;
134
- private headers;
135
- }
1
+ import { ApiSecurity, ApiUrl, AppDetails } from '../../shared';
2
+ import { UserSettings } from '../../shared/types/userSettings';
3
+ import { ChangePasswordPayload, ChangePasswordPayloadNew, CheckChangeEmailExpirationResponse, FriendInvite, InitializeUserResponse, PreCreateUserResponse, UpdateProfilePayload, UserPublicKeyResponse, VerifyEmailChangeResponse } from './types';
4
+ export * as UserTypes from './types';
5
+ export declare class Users {
6
+ private readonly client;
7
+ private readonly appDetails;
8
+ private readonly apiSecurity;
9
+ static client(apiUrl: ApiUrl, appDetails: AppDetails, apiSecurity: ApiSecurity): Users;
10
+ private constructor();
11
+ /**
12
+ * Sends an invitation to the specified email
13
+ * @param email
14
+ */
15
+ sendInvitation(email: string): Promise<void>;
16
+ /**
17
+ * Initialize basic state of user and returns data after registration process
18
+ * @param email
19
+ * @param mnemonic
20
+ */
21
+ initialize(email: string, mnemonic: string): Promise<InitializeUserResponse>;
22
+ /**
23
+ * Returns fresh data of the user
24
+ */
25
+ refreshUser(): Promise<{
26
+ user: UserSettings;
27
+ token: string;
28
+ }>;
29
+ /**
30
+ * Retrieves the user data for a specific user identified by the uuid.
31
+ *
32
+ * @param {string} params.userUuid - The UUID of the user.
33
+ * @return {Promise<Object>} A promise that resolves to an object containing the user data.
34
+ * The object has the following properties:
35
+ * - `newToken` (string): The new token of the user.
36
+ * - `oldToken` (string): The old drive token of the user.
37
+ * - `user` (UserSettings): The user data.
38
+ */
39
+ getUserData({ userUuid }: {
40
+ userUuid: string;
41
+ }): Promise<{
42
+ newToken: string;
43
+ oldToken: string;
44
+ user: UserSettings;
45
+ }>;
46
+ /**
47
+ * Updates the authentication credentials and invalidates previous tokens (Legacy backend (drive-server))
48
+ * @param payload
49
+ *
50
+ * @returns {Promise<{token: string, newToken: string}>} A promise that returns new tokens for this user.
51
+ */
52
+ changePasswordLegacy(payload: ChangePasswordPayload): Promise<{
53
+ token: string;
54
+ newToken: string;
55
+ }>;
56
+ /**
57
+ * Updates the authentication credentials and invalidates previous tokens (New backend (drive-server-wip))
58
+ * @param payload
59
+ *
60
+ * @returns {Promise<{token: string, newToken: string}>} A promise that returns new tokens for this user.
61
+ */
62
+ changePassword(payload: ChangePasswordPayloadNew): Promise<{
63
+ token: string;
64
+ newToken: string;
65
+ }>;
66
+ /**
67
+ * Pre registers an email
68
+ * @param email
69
+ * @returns {Promise<PreCreateUserResponse>} A promise that returns a public key for this user.
70
+ */
71
+ preRegister(email: string): Promise<PreCreateUserResponse>;
72
+ /**
73
+ * Updates a user profile
74
+ * @param payload
75
+ */
76
+ updateProfile(payload: UpdateProfilePayload): Promise<void>;
77
+ /**
78
+ * Updates a user avatar
79
+ * @param payload
80
+ */
81
+ updateAvatar(payload: {
82
+ avatar: Blob;
83
+ }): Promise<{
84
+ avatar: string;
85
+ }>;
86
+ /**
87
+ * Delete current user avatar
88
+ */
89
+ deleteAvatar(): Promise<void>;
90
+ /**
91
+ * Gets all friend invites created by this user
92
+ */
93
+ getFriendInvites(): Promise<FriendInvite[]>;
94
+ /**
95
+ * Sends verification email
96
+ */
97
+ sendVerificationEmail(): Promise<void>;
98
+ /**
99
+ * Verifies user email
100
+ */
101
+ verifyEmail(payload: {
102
+ verificationToken: string;
103
+ }): Promise<void>;
104
+ /**
105
+ * Change user email by new email
106
+ *
107
+ * @param {string} newEmail
108
+ *
109
+ * @returns {Promise<void>}
110
+ */
111
+ changeUserEmail(newEmail: string): Promise<void>;
112
+ /**
113
+ * Verify user email change
114
+ *
115
+ * @param {string} encryptedAttemptChangeEmailId
116
+ *
117
+ * @returns {Promise<VerifyEmailChangeResponse>}
118
+ */
119
+ verifyEmailChange(encryptedAttemptChangeEmailId: string): Promise<VerifyEmailChangeResponse>;
120
+ /**
121
+ * Check if user email change verification link is expired
122
+ *
123
+ * @param {string} encryptedAttemptChangeEmailId
124
+ *
125
+ * @returns {Promise<CheckChangeEmailExpirationResponse>}
126
+ */
127
+ checkChangeEmailExpiration(encryptedAttemptChangeEmailId: string): Promise<CheckChangeEmailExpirationResponse>;
128
+ /**
129
+ * Get public key of given email
130
+ */
131
+ getPublicKeyByEmail({ email }: {
132
+ email: string;
133
+ }): Promise<UserPublicKeyResponse>;
134
+ private headers;
135
+ }