@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.
- package/dist/auth/index.d.ts +127 -122
- package/dist/auth/index.js +378 -310
- package/dist/auth/types.d.ts +65 -54
- package/dist/auth/types.js +26 -26
- package/dist/drive/backups/index.d.ts +18 -18
- package/dist/drive/backups/index.js +40 -40
- package/dist/drive/backups/types.d.ts +27 -27
- package/dist/drive/backups/types.js +2 -2
- package/dist/drive/index.d.ts +7 -7
- package/dist/drive/index.js +23 -19
- package/dist/drive/payments/index.d.ts +66 -71
- package/dist/drive/payments/index.js +206 -208
- package/dist/drive/payments/types.d.ts +180 -176
- package/dist/drive/payments/types.js +37 -37
- package/dist/drive/referrals/index.d.ts +19 -19
- package/dist/drive/referrals/index.js +54 -50
- package/dist/drive/referrals/types.d.ts +21 -21
- package/dist/drive/referrals/types.js +18 -18
- package/dist/drive/share/index.d.ts +319 -319
- package/dist/drive/share/index.js +544 -540
- package/dist/drive/share/types.d.ts +360 -360
- package/dist/drive/share/types.js +2 -2
- package/dist/drive/storage/index.d.ts +315 -315
- package/dist/drive/storage/index.js +634 -630
- package/dist/drive/storage/types.d.ts +480 -473
- package/dist/drive/storage/types.js +13 -13
- package/dist/drive/trash/index.d.ts +75 -75
- package/dist/drive/trash/index.js +184 -180
- package/dist/drive/trash/types.d.ts +29 -29
- package/dist/drive/trash/types.js +2 -2
- package/dist/drive/users/index.d.ts +135 -135
- package/dist/drive/users/index.js +208 -204
- package/dist/drive/users/types.d.ts +53 -51
- package/dist/drive/users/types.js +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +35 -31
- package/dist/network/download.d.ts +8 -8
- package/dist/network/download.js +123 -123
- package/dist/network/errors/codes.d.ts +24 -24
- package/dist/network/errors/codes.js +48 -48
- package/dist/network/errors/context.d.ts +35 -35
- package/dist/network/errors/context.js +39 -39
- package/dist/network/errors/download.d.ts +4 -4
- package/dist/network/errors/download.js +52 -48
- package/dist/network/errors/index.d.ts +3 -3
- package/dist/network/errors/index.js +19 -15
- package/dist/network/errors/upload.d.ts +13 -13
- package/dist/network/errors/upload.js +82 -78
- package/dist/network/index.d.ts +70 -70
- package/dist/network/index.js +315 -311
- package/dist/network/types.d.ts +102 -102
- package/dist/network/types.js +18 -18
- package/dist/network/upload.d.ts +4 -4
- package/dist/network/upload.js +158 -159
- package/dist/photos/devices/index.d.ts +10 -10
- package/dist/photos/devices/index.js +79 -79
- package/dist/photos/index.d.ts +17 -17
- package/dist/photos/index.js +56 -52
- package/dist/photos/photos/index.d.ts +60 -60
- package/dist/photos/photos/index.js +225 -225
- package/dist/photos/shares/index.d.ts +8 -8
- package/dist/photos/shares/index.js +34 -34
- package/dist/photos/types.d.ts +154 -154
- package/dist/photos/types.js +19 -19
- package/dist/photos/users/index.d.ts +7 -7
- package/dist/photos/users/index.js +46 -46
- package/dist/shared/headers/index.d.ts +21 -21
- package/dist/shared/headers/index.js +78 -79
- package/dist/shared/http/client.d.ts +85 -85
- package/dist/shared/http/client.js +172 -172
- package/dist/shared/http/types.d.ts +7 -7
- package/dist/shared/http/types.js +2 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +17 -13
- package/dist/shared/types/apiConnection.d.ts +12 -12
- package/dist/shared/types/apiConnection.js +2 -2
- package/dist/shared/types/appsumo.d.ts +16 -16
- package/dist/shared/types/appsumo.js +12 -12
- package/dist/shared/types/errors.d.ts +5 -5
- package/dist/shared/types/errors.js +28 -28
- package/dist/shared/types/teams.d.ts +9 -9
- package/dist/shared/types/teams.js +2 -2
- package/dist/shared/types/userSettings.d.ts +43 -29
- package/dist/shared/types/userSettings.js +2 -2
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +24 -25
- package/dist/workspaces/index.d.ts +176 -176
- package/dist/workspaces/index.js +419 -415
- package/dist/workspaces/index.test.d.ts +1 -1
- package/dist/workspaces/index.test.js +908 -903
- package/dist/workspaces/types.d.ts +294 -291
- package/dist/workspaces/types.js +2 -2
- package/package.json +13 -13
|
@@ -1,204 +1,208 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
exports
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
*
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
*
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Users.prototype.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Users = exports.UserTypes = void 0;
|
|
27
|
+
var headers_1 = require("../../shared/headers");
|
|
28
|
+
var client_1 = require("../../shared/http/client");
|
|
29
|
+
exports.UserTypes = __importStar(require("./types"));
|
|
30
|
+
var Users = /** @class */ (function () {
|
|
31
|
+
function Users(apiUrl, appDetails, apiSecurity) {
|
|
32
|
+
this.client = client_1.HttpClient.create(apiUrl, apiSecurity.unauthorizedCallback);
|
|
33
|
+
this.appDetails = appDetails;
|
|
34
|
+
this.apiSecurity = apiSecurity;
|
|
35
|
+
}
|
|
36
|
+
Users.client = function (apiUrl, appDetails, apiSecurity) {
|
|
37
|
+
return new Users(apiUrl, appDetails, apiSecurity);
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Sends an invitation to the specified email
|
|
41
|
+
* @param email
|
|
42
|
+
*/
|
|
43
|
+
Users.prototype.sendInvitation = function (email) {
|
|
44
|
+
return this.client.post('/user/invite', {
|
|
45
|
+
email: email,
|
|
46
|
+
}, this.headers());
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Initialize basic state of user and returns data after registration process
|
|
50
|
+
* @param email
|
|
51
|
+
* @param mnemonic
|
|
52
|
+
*/
|
|
53
|
+
Users.prototype.initialize = function (email, mnemonic) {
|
|
54
|
+
return this.client
|
|
55
|
+
.post('/initialize', {
|
|
56
|
+
email: email,
|
|
57
|
+
mnemonic: mnemonic,
|
|
58
|
+
}, this.headers())
|
|
59
|
+
.then(function (data) {
|
|
60
|
+
return data.user;
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Returns fresh data of the user
|
|
65
|
+
*/
|
|
66
|
+
Users.prototype.refreshUser = function () {
|
|
67
|
+
return this.client.get('/user/refresh', this.headers());
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves the user data for a specific user identified by the uuid.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} params.userUuid - The UUID of the user.
|
|
73
|
+
* @return {Promise<Object>} A promise that resolves to an object containing the user data.
|
|
74
|
+
* The object has the following properties:
|
|
75
|
+
* - `newToken` (string): The new token of the user.
|
|
76
|
+
* - `oldToken` (string): The old drive token of the user.
|
|
77
|
+
* - `user` (UserSettings): The user data.
|
|
78
|
+
*/
|
|
79
|
+
Users.prototype.getUserData = function (_a) {
|
|
80
|
+
var userUuid = _a.userUuid;
|
|
81
|
+
return this.client.get("/users/c/".concat(userUuid), this.headers());
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Updates the authentication credentials and invalidates previous tokens (Legacy backend (drive-server))
|
|
85
|
+
* @param payload
|
|
86
|
+
*
|
|
87
|
+
* @returns {Promise<{token: string, newToken: string}>} A promise that returns new tokens for this user.
|
|
88
|
+
*/
|
|
89
|
+
Users.prototype.changePasswordLegacy = function (payload) {
|
|
90
|
+
return this.client.patch('/user/password', {
|
|
91
|
+
currentPassword: payload.currentEncryptedPassword,
|
|
92
|
+
newPassword: payload.newEncryptedPassword,
|
|
93
|
+
newSalt: payload.newEncryptedSalt,
|
|
94
|
+
mnemonic: payload.encryptedMnemonic,
|
|
95
|
+
privateKey: payload.encryptedPrivateKey,
|
|
96
|
+
}, this.headers());
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Updates the authentication credentials and invalidates previous tokens (New backend (drive-server-wip))
|
|
100
|
+
* @param payload
|
|
101
|
+
*
|
|
102
|
+
* @returns {Promise<{token: string, newToken: string}>} A promise that returns new tokens for this user.
|
|
103
|
+
*/
|
|
104
|
+
Users.prototype.changePassword = function (payload) {
|
|
105
|
+
return this.client.patch('/users/password', {
|
|
106
|
+
currentPassword: payload.currentEncryptedPassword,
|
|
107
|
+
newPassword: payload.newEncryptedPassword,
|
|
108
|
+
newSalt: payload.newEncryptedSalt,
|
|
109
|
+
mnemonic: payload.encryptedMnemonic,
|
|
110
|
+
privateKey: payload.encryptedPrivateKey,
|
|
111
|
+
encryptVersion: payload.encryptVersion,
|
|
112
|
+
}, this.headers());
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Pre registers an email
|
|
116
|
+
* @param email
|
|
117
|
+
* @returns {Promise<PreCreateUserResponse>} A promise that returns a public key for this user.
|
|
118
|
+
*/
|
|
119
|
+
Users.prototype.preRegister = function (email) {
|
|
120
|
+
return this.client.post('/users/pre-create', {
|
|
121
|
+
email: email,
|
|
122
|
+
}, this.headers());
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Updates a user profile
|
|
126
|
+
* @param payload
|
|
127
|
+
*/
|
|
128
|
+
Users.prototype.updateProfile = function (payload) {
|
|
129
|
+
return this.client.patch('/user/profile', payload, this.headers());
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Updates a user avatar
|
|
133
|
+
* @param payload
|
|
134
|
+
*/
|
|
135
|
+
Users.prototype.updateAvatar = function (payload) {
|
|
136
|
+
var formData = new FormData();
|
|
137
|
+
formData.set('avatar', payload.avatar);
|
|
138
|
+
return this.client.put('/user/avatar', formData, this.headers());
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Delete current user avatar
|
|
142
|
+
*/
|
|
143
|
+
Users.prototype.deleteAvatar = function () {
|
|
144
|
+
return this.client.delete('/user/avatar', this.headers());
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Gets all friend invites created by this user
|
|
148
|
+
*/
|
|
149
|
+
Users.prototype.getFriendInvites = function () {
|
|
150
|
+
return this.client.get('/user/invite', this.headers());
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Sends verification email
|
|
154
|
+
*/
|
|
155
|
+
Users.prototype.sendVerificationEmail = function () {
|
|
156
|
+
return this.client.post('/user/sendVerificationEmail', {}, this.headers());
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Verifies user email
|
|
160
|
+
*/
|
|
161
|
+
Users.prototype.verifyEmail = function (payload) {
|
|
162
|
+
return this.client.post('/user/verifyEmail', payload, this.headers());
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Change user email by new email
|
|
166
|
+
*
|
|
167
|
+
* @param {string} newEmail
|
|
168
|
+
*
|
|
169
|
+
* @returns {Promise<void>}
|
|
170
|
+
*/
|
|
171
|
+
Users.prototype.changeUserEmail = function (newEmail) {
|
|
172
|
+
return this.client.post('users/attempt-change-email', {
|
|
173
|
+
newEmail: newEmail,
|
|
174
|
+
}, this.headers());
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Verify user email change
|
|
178
|
+
*
|
|
179
|
+
* @param {string} encryptedAttemptChangeEmailId
|
|
180
|
+
*
|
|
181
|
+
* @returns {Promise<VerifyEmailChangeResponse>}
|
|
182
|
+
*/
|
|
183
|
+
Users.prototype.verifyEmailChange = function (encryptedAttemptChangeEmailId) {
|
|
184
|
+
return this.client.post("users/attempt-change-email/".concat(encryptedAttemptChangeEmailId, "/accept"), {}, this.headers());
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Check if user email change verification link is expired
|
|
188
|
+
*
|
|
189
|
+
* @param {string} encryptedAttemptChangeEmailId
|
|
190
|
+
*
|
|
191
|
+
* @returns {Promise<CheckChangeEmailExpirationResponse>}
|
|
192
|
+
*/
|
|
193
|
+
Users.prototype.checkChangeEmailExpiration = function (encryptedAttemptChangeEmailId) {
|
|
194
|
+
return this.client.get("users/attempt-change-email/".concat(encryptedAttemptChangeEmailId, "/verify-expiration"), this.headers());
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Get public key of given email
|
|
198
|
+
*/
|
|
199
|
+
Users.prototype.getPublicKeyByEmail = function (_a) {
|
|
200
|
+
var email = _a.email;
|
|
201
|
+
return this.client.get("/users/public-key/".concat(email), this.headers());
|
|
202
|
+
};
|
|
203
|
+
Users.prototype.headers = function () {
|
|
204
|
+
return (0, headers_1.headersWithToken)(this.appDetails.clientName, this.appDetails.clientVersion, this.apiSecurity.token);
|
|
205
|
+
};
|
|
206
|
+
return Users;
|
|
207
|
+
}());
|
|
208
|
+
exports.Users = Users;
|
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
import { UUID, UserSettings } from '../../shared/types/userSettings';
|
|
2
|
-
export interface InitializeUserResponse {
|
|
3
|
-
email: string;
|
|
4
|
-
bucket: string;
|
|
5
|
-
mnemonic: string;
|
|
6
|
-
root_folder_id: number;
|
|
7
|
-
}
|
|
8
|
-
export interface ChangePasswordPayload {
|
|
9
|
-
currentEncryptedPassword: string;
|
|
10
|
-
newEncryptedPassword: string;
|
|
11
|
-
newEncryptedSalt: string;
|
|
12
|
-
encryptedMnemonic: string;
|
|
13
|
-
encryptedPrivateKey: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ChangePasswordPayloadNew {
|
|
16
|
-
currentEncryptedPassword: string;
|
|
17
|
-
newEncryptedPassword: string;
|
|
18
|
-
newEncryptedSalt: string;
|
|
19
|
-
encryptedMnemonic: string;
|
|
20
|
-
encryptedPrivateKey: string;
|
|
21
|
-
encryptVersion: string;
|
|
22
|
-
}
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
publicKey: string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
import { UUID, UserSettings } from '../../shared/types/userSettings';
|
|
2
|
+
export interface InitializeUserResponse {
|
|
3
|
+
email: string;
|
|
4
|
+
bucket: string;
|
|
5
|
+
mnemonic: string;
|
|
6
|
+
root_folder_id: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ChangePasswordPayload {
|
|
9
|
+
currentEncryptedPassword: string;
|
|
10
|
+
newEncryptedPassword: string;
|
|
11
|
+
newEncryptedSalt: string;
|
|
12
|
+
encryptedMnemonic: string;
|
|
13
|
+
encryptedPrivateKey: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ChangePasswordPayloadNew {
|
|
16
|
+
currentEncryptedPassword: string;
|
|
17
|
+
newEncryptedPassword: string;
|
|
18
|
+
newEncryptedSalt: string;
|
|
19
|
+
encryptedMnemonic: string;
|
|
20
|
+
encryptedPrivateKey: string;
|
|
21
|
+
encryptVersion: string;
|
|
22
|
+
}
|
|
23
|
+
export type UpdateProfilePayload = Partial<Pick<UserSettings, 'name' | 'lastname'>>;
|
|
24
|
+
export type PreCreateUserResponse = {
|
|
25
|
+
publicKey: string;
|
|
26
|
+
publicKyberKey: string;
|
|
27
|
+
user: {
|
|
28
|
+
uuid: UUID;
|
|
29
|
+
email: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type FriendInvite = {
|
|
33
|
+
guestEmail: string;
|
|
34
|
+
host: number;
|
|
35
|
+
accepted: boolean;
|
|
36
|
+
id: number;
|
|
37
|
+
};
|
|
38
|
+
export type UserPublicKeyResponse = {
|
|
39
|
+
publicKey: string;
|
|
40
|
+
publicKyberKey: string;
|
|
41
|
+
};
|
|
42
|
+
export type VerifyEmailChangeResponse = {
|
|
43
|
+
oldEmail: string;
|
|
44
|
+
newEmail: string;
|
|
45
|
+
newAuthentication: {
|
|
46
|
+
user: UserSettings;
|
|
47
|
+
token: string;
|
|
48
|
+
newToken: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type CheckChangeEmailExpirationResponse = {
|
|
52
|
+
isExpired: boolean;
|
|
53
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './auth';
|
|
2
|
-
export * as Drive from './drive';
|
|
3
|
-
export * as Network from './network';
|
|
4
|
-
export * as photos from './photos';
|
|
5
|
-
export * as Shared from './shared';
|
|
6
|
-
export * as Workspaces from './workspaces';
|
|
1
|
+
export * from './auth';
|
|
2
|
+
export * as Drive from './drive';
|
|
3
|
+
export * as Network from './network';
|
|
4
|
+
export * as photos from './photos';
|
|
5
|
+
export * as Shared from './shared';
|
|
6
|
+
export * as Workspaces from './workspaces';
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports
|
|
29
|
-
exports.photos =
|
|
30
|
-
|
|
31
|
-
exports.
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Workspaces = exports.Shared = exports.photos = exports.Network = exports.Drive = void 0;
|
|
30
|
+
__exportStar(require("./auth"), exports);
|
|
31
|
+
exports.Drive = __importStar(require("./drive"));
|
|
32
|
+
exports.Network = __importStar(require("./network"));
|
|
33
|
+
exports.photos = __importStar(require("./photos"));
|
|
34
|
+
exports.Shared = __importStar(require("./shared"));
|
|
35
|
+
exports.Workspaces = __importStar(require("./workspaces"));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Network } from '.';
|
|
2
|
-
import { Crypto, DecryptFileFunction, DownloadFileFunction, ToBinaryDataFunction } from './types';
|
|
3
|
-
export declare class FileVersionOneError extends Error {
|
|
4
|
-
constructor();
|
|
5
|
-
}
|
|
6
|
-
export declare function downloadFile(fileId: string, bucketId: string, mnemonic: string, network: Network, crypto: Crypto, toBinaryData: ToBinaryDataFunction, downloadFile: DownloadFileFunction, decryptFile: DecryptFileFunction, opts?: {
|
|
7
|
-
token: string;
|
|
8
|
-
}): Promise<void>;
|
|
1
|
+
import { Network } from '.';
|
|
2
|
+
import { Crypto, DecryptFileFunction, DownloadFileFunction, ToBinaryDataFunction } from './types';
|
|
3
|
+
export declare class FileVersionOneError extends Error {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
6
|
+
export declare function downloadFile(fileId: string, bucketId: string, mnemonic: string, network: Network, crypto: Crypto, toBinaryData: ToBinaryDataFunction, downloadFile: DownloadFileFunction, decryptFile: DecryptFileFunction, opts?: {
|
|
7
|
+
token: string;
|
|
8
|
+
}): Promise<void>;
|