@frontegg/rest-api 3.0.1 → 3.0.2
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/ContextHolder.js +64 -100
- package/account-settings/index.js +4 -43
- package/audits/index.js +16 -69
- package/auth/enums.js +2 -2
- package/auth/index.js +352 -2045
- package/auth/interfaces.js +1 -1
- package/auth/secutiry-poilicy/index.js +45 -254
- package/connectivity/index.js +79 -73
- package/constants.js +1 -1
- package/error.js +9 -33
- package/fetch.js +159 -519
- package/index.js +26 -26
- package/jwt.js +19 -45
- package/metadata/index.js +18 -160
- package/node/ContextHolder.js +68 -104
- package/node/account-settings/index.js +4 -46
- package/node/audits/index.js +15 -68
- package/node/auth/enums.js +2 -2
- package/node/auth/index.js +481 -2099
- package/node/auth/interfaces.js +2 -2
- package/node/auth/secutiry-poilicy/index.js +36 -240
- package/node/connectivity/index.js +78 -71
- package/node/constants.js +1 -1
- package/node/error.js +9 -38
- package/node/fetch.js +166 -521
- package/node/index.js +47 -49
- package/node/jwt.js +19 -51
- package/node/metadata/index.js +19 -163
- package/node/notifications/index.js +18 -94
- package/node/reports/index.js +62 -171
- package/node/roles/index.js +34 -172
- package/node/routers.js +2 -2
- package/node/sub-tenants/index.js +12 -126
- package/node/subscriptions/enums.js +4 -4
- package/node/subscriptions/index.js +10 -10
- package/node/subscriptions/interfaces.js +1 -1
- package/node/subscriptions/invoices.js +10 -70
- package/node/subscriptions/managedSubscriptions.js +16 -111
- package/node/subscriptions/paymentMethods.js +15 -69
- package/node/subscriptions/paymentProviders.js +2 -26
- package/node/subscriptions/plans.js +4 -46
- package/node/subscriptions/providers/index.js +1 -1
- package/node/subscriptions/providers/stripe/index.js +10 -106
- package/node/subscriptions/subscriptions.js +16 -111
- package/node/subscriptions/summaries.js +2 -26
- package/node/subscriptions/tenantConfiguration.js +4 -46
- package/node/teams/index.js +57 -406
- package/node/tenants/index.js +8 -86
- package/node/vendor/index.js +2 -26
- package/notifications/index.js +18 -93
- package/package.json +1 -1
- package/reports/index.js +65 -175
- package/roles/index.js +34 -175
- package/routers.js +2 -2
- package/sub-tenants/index.js +12 -127
- package/subscriptions/enums.js +4 -4
- package/subscriptions/invoices.js +12 -70
- package/subscriptions/managedSubscriptions.js +20 -115
- package/subscriptions/paymentMethods.js +16 -70
- package/subscriptions/paymentProviders.js +2 -22
- package/subscriptions/plans.js +4 -43
- package/subscriptions/providers/stripe/index.js +10 -106
- package/subscriptions/subscriptions.js +20 -115
- package/subscriptions/summaries.js +2 -22
- package/subscriptions/tenantConfiguration.js +4 -43
- package/teams/index.js +55 -421
- package/tenants/index.js +8 -85
- package/vendor/index.js +2 -23
package/node/teams/index.js
CHANGED
|
@@ -25,454 +25,105 @@ exports.updateProfile = updateProfile;
|
|
|
25
25
|
exports.updateProfileImage = updateProfileImage;
|
|
26
26
|
exports.updateUser = updateUser;
|
|
27
27
|
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
31
|
-
|
|
32
|
-
var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
33
|
-
|
|
34
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
28
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
35
29
|
|
|
36
30
|
var _fetch = require("../fetch");
|
|
37
31
|
|
|
38
32
|
var _constants = require("../constants");
|
|
39
33
|
|
|
40
|
-
function getProfile(
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
function _getProfile() {
|
|
45
|
-
_getProfile = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(params) {
|
|
46
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
47
|
-
while (1) {
|
|
48
|
-
switch (_context.prev = _context.next) {
|
|
49
|
-
case 0:
|
|
50
|
-
return _context.abrupt("return", (0, _fetch.Get)("".concat(_constants.urls.identity.users.v2, "/me"), params != null ? params : {
|
|
51
|
-
addRoles: true
|
|
52
|
-
}));
|
|
53
|
-
|
|
54
|
-
case 1:
|
|
55
|
-
case "end":
|
|
56
|
-
return _context.stop();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}, _callee);
|
|
60
|
-
}));
|
|
61
|
-
return _getProfile.apply(this, arguments);
|
|
34
|
+
async function getProfile(params) {
|
|
35
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.users.v2}/me`, params != null ? params : {
|
|
36
|
+
addRoles: true
|
|
37
|
+
});
|
|
62
38
|
}
|
|
63
39
|
|
|
64
|
-
function updateProfile(
|
|
65
|
-
return
|
|
40
|
+
async function updateProfile(body) {
|
|
41
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.users.v2}/me`, body);
|
|
66
42
|
}
|
|
67
43
|
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
case 0:
|
|
74
|
-
return _context2.abrupt("return", (0, _fetch.Put)("".concat(_constants.urls.identity.users.v2, "/me"), body));
|
|
75
|
-
|
|
76
|
-
case 1:
|
|
77
|
-
case "end":
|
|
78
|
-
return _context2.stop();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, _callee2);
|
|
82
|
-
}));
|
|
83
|
-
return _updateProfile.apply(this, arguments);
|
|
44
|
+
async function updateProfileImage(body) {
|
|
45
|
+
return (0, _fetch.Put)(`${_constants.urls.team.profile.v1}/me/image/v1`, body, {
|
|
46
|
+
responseType: 'plain',
|
|
47
|
+
contentType: undefined
|
|
48
|
+
});
|
|
84
49
|
}
|
|
85
50
|
|
|
86
|
-
function
|
|
87
|
-
return
|
|
51
|
+
async function changePassword(body) {
|
|
52
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/passwords/change`, body);
|
|
88
53
|
}
|
|
89
54
|
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
93
|
-
while (1) {
|
|
94
|
-
switch (_context3.prev = _context3.next) {
|
|
95
|
-
case 0:
|
|
96
|
-
return _context3.abrupt("return", (0, _fetch.Put)("".concat(_constants.urls.team.profile.v1, "/me/image/v1"), body, {
|
|
97
|
-
responseType: 'plain',
|
|
98
|
-
contentType: undefined
|
|
99
|
-
}));
|
|
100
|
-
|
|
101
|
-
case 1:
|
|
102
|
-
case "end":
|
|
103
|
-
return _context3.stop();
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}, _callee3);
|
|
107
|
-
}));
|
|
108
|
-
return _updateProfileImage.apply(this, arguments);
|
|
109
|
-
}
|
|
55
|
+
async function loadUsers(params) {
|
|
56
|
+
var _params$sort, _params$sort$0$id, _params$sort2, _params$sort2$, _params$sort3, _params$sort3$;
|
|
110
57
|
|
|
111
|
-
|
|
112
|
-
|
|
58
|
+
const filters = (params.filter || []).reduce((p, n) => (0, _extends2.default)({}, p, {
|
|
59
|
+
[n.id]: n.value
|
|
60
|
+
}), {});
|
|
61
|
+
const sorts = (_params$sort = params.sort) != null && _params$sort.length ? {
|
|
62
|
+
sortBy: (_params$sort$0$id = (_params$sort2 = params.sort) == null ? void 0 : (_params$sort2$ = _params$sort2[0]) == null ? void 0 : _params$sort2$.id) != null ? _params$sort$0$id : 'name',
|
|
63
|
+
sortDirection: (_params$sort3 = params.sort) != null && (_params$sort3$ = _params$sort3[0]) != null && _params$sort3$.desc ? 'desc' : 'asc'
|
|
64
|
+
} : null;
|
|
65
|
+
return (0, _fetch.Get)(_constants.urls.team.members.v1, (0, _extends2.default)({
|
|
66
|
+
pageOffset: params.pageOffset,
|
|
67
|
+
pageSize: params.pageSize
|
|
68
|
+
}, filters, sorts));
|
|
113
69
|
}
|
|
114
70
|
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
while (1) {
|
|
119
|
-
switch (_context4.prev = _context4.next) {
|
|
120
|
-
case 0:
|
|
121
|
-
return _context4.abrupt("return", (0, _fetch.Post)("".concat(_constants.urls.identity.users.v1, "/passwords/change"), body));
|
|
122
|
-
|
|
123
|
-
case 1:
|
|
124
|
-
case "end":
|
|
125
|
-
return _context4.stop();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}, _callee4);
|
|
71
|
+
async function addUser(body) {
|
|
72
|
+
return (0, _fetch.Post)(_constants.urls.identity.users.v2, (0, _extends2.default)({}, body, {
|
|
73
|
+
provider: 'local'
|
|
129
74
|
}));
|
|
130
|
-
return _changePassword.apply(this, arguments);
|
|
131
75
|
}
|
|
132
76
|
|
|
133
|
-
function
|
|
134
|
-
return
|
|
77
|
+
async function deleteUser(body) {
|
|
78
|
+
return (0, _fetch.Delete)(`${_constants.urls.team.members.v1}/${body.userId}`);
|
|
135
79
|
}
|
|
136
80
|
|
|
137
|
-
function
|
|
138
|
-
|
|
139
|
-
var _params$sort, _params$sort$0$id, _params$sort2, _params$sort2$, _params$sort3, _params$sort3$;
|
|
140
|
-
|
|
141
|
-
var filters, sorts;
|
|
142
|
-
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
143
|
-
while (1) {
|
|
144
|
-
switch (_context5.prev = _context5.next) {
|
|
145
|
-
case 0:
|
|
146
|
-
filters = (params.filter || []).reduce(function (p, n) {
|
|
147
|
-
return (0, _extends3["default"])({}, p, (0, _defineProperty2["default"])({}, n.id, n.value));
|
|
148
|
-
}, {});
|
|
149
|
-
sorts = (_params$sort = params.sort) != null && _params$sort.length ? {
|
|
150
|
-
sortBy: (_params$sort$0$id = (_params$sort2 = params.sort) == null ? void 0 : (_params$sort2$ = _params$sort2[0]) == null ? void 0 : _params$sort2$.id) != null ? _params$sort$0$id : 'name',
|
|
151
|
-
sortDirection: (_params$sort3 = params.sort) != null && (_params$sort3$ = _params$sort3[0]) != null && _params$sort3$.desc ? 'desc' : 'asc'
|
|
152
|
-
} : null;
|
|
153
|
-
return _context5.abrupt("return", (0, _fetch.Get)(_constants.urls.team.members.v1, (0, _extends3["default"])({
|
|
154
|
-
pageOffset: params.pageOffset,
|
|
155
|
-
pageSize: params.pageSize
|
|
156
|
-
}, filters, sorts)));
|
|
157
|
-
|
|
158
|
-
case 3:
|
|
159
|
-
case "end":
|
|
160
|
-
return _context5.stop();
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}, _callee5);
|
|
164
|
-
}));
|
|
165
|
-
return _loadUsers.apply(this, arguments);
|
|
81
|
+
async function updateUser(body) {
|
|
82
|
+
return (0, _fetch.Put)(_constants.urls.team.members.v1, body);
|
|
166
83
|
}
|
|
167
84
|
|
|
168
|
-
function
|
|
169
|
-
return
|
|
85
|
+
async function createInviteUserLink(body) {
|
|
86
|
+
return (0, _fetch.Post)(_constants.urls.identity.tenants.invites.user.v1, (0, _extends2.default)({}, body));
|
|
170
87
|
}
|
|
171
88
|
|
|
172
|
-
function
|
|
173
|
-
|
|
174
|
-
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
175
|
-
while (1) {
|
|
176
|
-
switch (_context6.prev = _context6.next) {
|
|
177
|
-
case 0:
|
|
178
|
-
return _context6.abrupt("return", (0, _fetch.Post)(_constants.urls.identity.users.v2, (0, _extends3["default"])({}, body, {
|
|
179
|
-
provider: 'local'
|
|
180
|
-
})));
|
|
181
|
-
|
|
182
|
-
case 1:
|
|
183
|
-
case "end":
|
|
184
|
-
return _context6.stop();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}, _callee6);
|
|
188
|
-
}));
|
|
189
|
-
return _addUser.apply(this, arguments);
|
|
89
|
+
async function updateInviteUserLink(body) {
|
|
90
|
+
return (0, _fetch.Patch)(_constants.urls.identity.tenants.invites.user.v1, (0, _extends2.default)({}, body));
|
|
190
91
|
}
|
|
191
92
|
|
|
192
|
-
function
|
|
193
|
-
return
|
|
93
|
+
async function deleteInviteUserLink() {
|
|
94
|
+
return (0, _fetch.Delete)(_constants.urls.identity.tenants.invites.user.v1);
|
|
194
95
|
}
|
|
195
96
|
|
|
196
|
-
function
|
|
197
|
-
|
|
198
|
-
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
199
|
-
while (1) {
|
|
200
|
-
switch (_context7.prev = _context7.next) {
|
|
201
|
-
case 0:
|
|
202
|
-
return _context7.abrupt("return", (0, _fetch.Delete)("".concat(_constants.urls.team.members.v1, "/").concat(body.userId)));
|
|
203
|
-
|
|
204
|
-
case 1:
|
|
205
|
-
case "end":
|
|
206
|
-
return _context7.stop();
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}, _callee7);
|
|
210
|
-
}));
|
|
211
|
-
return _deleteUser.apply(this, arguments);
|
|
97
|
+
async function getInviteUserLink() {
|
|
98
|
+
return (0, _fetch.Get)(_constants.urls.identity.tenants.invites.user.v1);
|
|
212
99
|
}
|
|
213
100
|
|
|
214
|
-
function
|
|
215
|
-
return
|
|
101
|
+
async function getInviteLinkConfiguration() {
|
|
102
|
+
return (0, _fetch.Get)(_constants.urls.identity.tenants.invites.configuration.v1);
|
|
216
103
|
}
|
|
217
104
|
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
221
|
-
while (1) {
|
|
222
|
-
switch (_context8.prev = _context8.next) {
|
|
223
|
-
case 0:
|
|
224
|
-
return _context8.abrupt("return", (0, _fetch.Put)(_constants.urls.team.members.v1, body));
|
|
225
|
-
|
|
226
|
-
case 1:
|
|
227
|
-
case "end":
|
|
228
|
-
return _context8.stop();
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}, _callee8);
|
|
232
|
-
}));
|
|
233
|
-
return _updateUser.apply(this, arguments);
|
|
105
|
+
async function loadAvailableRoles() {
|
|
106
|
+
return (0, _fetch.Get)(_constants.urls.team.roles.v1);
|
|
234
107
|
}
|
|
235
108
|
|
|
236
|
-
function
|
|
237
|
-
return
|
|
109
|
+
async function loadAvailablePermissions() {
|
|
110
|
+
return (0, _fetch.Get)(_constants.urls.identity.permissions.v1);
|
|
238
111
|
}
|
|
239
112
|
|
|
240
|
-
function
|
|
241
|
-
|
|
242
|
-
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
243
|
-
while (1) {
|
|
244
|
-
switch (_context9.prev = _context9.next) {
|
|
245
|
-
case 0:
|
|
246
|
-
return _context9.abrupt("return", (0, _fetch.Post)(_constants.urls.identity.tenants.invites.user.v1, (0, _extends3["default"])({}, body)));
|
|
247
|
-
|
|
248
|
-
case 1:
|
|
249
|
-
case "end":
|
|
250
|
-
return _context9.stop();
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}, _callee9);
|
|
254
|
-
}));
|
|
255
|
-
return _createInviteUserLink.apply(this, arguments);
|
|
113
|
+
async function loadStats() {
|
|
114
|
+
return (0, _fetch.Get)(`${_constants.urls.team.stats.v1}/members`);
|
|
256
115
|
}
|
|
257
116
|
|
|
258
|
-
function
|
|
259
|
-
return
|
|
117
|
+
async function resendActivationLink(body) {
|
|
118
|
+
return (0, _fetch.Post)(`${_constants.urls.team.members.v1}/${body.userId}/resendActivationEmail`, {});
|
|
260
119
|
}
|
|
261
120
|
|
|
262
|
-
function
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
while (1) {
|
|
266
|
-
switch (_context10.prev = _context10.next) {
|
|
267
|
-
case 0:
|
|
268
|
-
return _context10.abrupt("return", (0, _fetch.Patch)(_constants.urls.identity.tenants.invites.user.v1, (0, _extends3["default"])({}, body)));
|
|
269
|
-
|
|
270
|
-
case 1:
|
|
271
|
-
case "end":
|
|
272
|
-
return _context10.stop();
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}, _callee10);
|
|
121
|
+
async function resendInvitationLink(body) {
|
|
122
|
+
return (0, _fetch.Post)(_constants.urls.identity.users.v2, (0, _extends2.default)({}, body, {
|
|
123
|
+
provider: 'local'
|
|
276
124
|
}));
|
|
277
|
-
return _updateInviteUserLink.apply(this, arguments);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
function deleteInviteUserLink() {
|
|
281
|
-
return _deleteInviteUserLink.apply(this, arguments);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
function _deleteInviteUserLink() {
|
|
285
|
-
_deleteInviteUserLink = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee11() {
|
|
286
|
-
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
287
|
-
while (1) {
|
|
288
|
-
switch (_context11.prev = _context11.next) {
|
|
289
|
-
case 0:
|
|
290
|
-
return _context11.abrupt("return", (0, _fetch.Delete)(_constants.urls.identity.tenants.invites.user.v1));
|
|
291
|
-
|
|
292
|
-
case 1:
|
|
293
|
-
case "end":
|
|
294
|
-
return _context11.stop();
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}, _callee11);
|
|
298
|
-
}));
|
|
299
|
-
return _deleteInviteUserLink.apply(this, arguments);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
function getInviteUserLink() {
|
|
303
|
-
return _getInviteUserLink.apply(this, arguments);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function _getInviteUserLink() {
|
|
307
|
-
_getInviteUserLink = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee12() {
|
|
308
|
-
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
309
|
-
while (1) {
|
|
310
|
-
switch (_context12.prev = _context12.next) {
|
|
311
|
-
case 0:
|
|
312
|
-
return _context12.abrupt("return", (0, _fetch.Get)(_constants.urls.identity.tenants.invites.user.v1));
|
|
313
|
-
|
|
314
|
-
case 1:
|
|
315
|
-
case "end":
|
|
316
|
-
return _context12.stop();
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}, _callee12);
|
|
320
|
-
}));
|
|
321
|
-
return _getInviteUserLink.apply(this, arguments);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
function getInviteLinkConfiguration() {
|
|
325
|
-
return _getInviteLinkConfiguration.apply(this, arguments);
|
|
326
125
|
}
|
|
327
126
|
|
|
328
|
-
function
|
|
329
|
-
|
|
330
|
-
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
|
331
|
-
while (1) {
|
|
332
|
-
switch (_context13.prev = _context13.next) {
|
|
333
|
-
case 0:
|
|
334
|
-
return _context13.abrupt("return", (0, _fetch.Get)(_constants.urls.identity.tenants.invites.configuration.v1));
|
|
335
|
-
|
|
336
|
-
case 1:
|
|
337
|
-
case "end":
|
|
338
|
-
return _context13.stop();
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}, _callee13);
|
|
342
|
-
}));
|
|
343
|
-
return _getInviteLinkConfiguration.apply(this, arguments);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
function loadAvailableRoles() {
|
|
347
|
-
return _loadAvailableRoles.apply(this, arguments);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
function _loadAvailableRoles() {
|
|
351
|
-
_loadAvailableRoles = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee14() {
|
|
352
|
-
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
|
353
|
-
while (1) {
|
|
354
|
-
switch (_context14.prev = _context14.next) {
|
|
355
|
-
case 0:
|
|
356
|
-
return _context14.abrupt("return", (0, _fetch.Get)(_constants.urls.team.roles.v1));
|
|
357
|
-
|
|
358
|
-
case 1:
|
|
359
|
-
case "end":
|
|
360
|
-
return _context14.stop();
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}, _callee14);
|
|
364
|
-
}));
|
|
365
|
-
return _loadAvailableRoles.apply(this, arguments);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
function loadAvailablePermissions() {
|
|
369
|
-
return _loadAvailablePermissions.apply(this, arguments);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
function _loadAvailablePermissions() {
|
|
373
|
-
_loadAvailablePermissions = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee15() {
|
|
374
|
-
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
|
375
|
-
while (1) {
|
|
376
|
-
switch (_context15.prev = _context15.next) {
|
|
377
|
-
case 0:
|
|
378
|
-
return _context15.abrupt("return", (0, _fetch.Get)(_constants.urls.identity.permissions.v1));
|
|
379
|
-
|
|
380
|
-
case 1:
|
|
381
|
-
case "end":
|
|
382
|
-
return _context15.stop();
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}, _callee15);
|
|
386
|
-
}));
|
|
387
|
-
return _loadAvailablePermissions.apply(this, arguments);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
function loadStats() {
|
|
391
|
-
return _loadStats.apply(this, arguments);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
function _loadStats() {
|
|
395
|
-
_loadStats = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee16() {
|
|
396
|
-
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
|
397
|
-
while (1) {
|
|
398
|
-
switch (_context16.prev = _context16.next) {
|
|
399
|
-
case 0:
|
|
400
|
-
return _context16.abrupt("return", (0, _fetch.Get)("".concat(_constants.urls.team.stats.v1, "/members")));
|
|
401
|
-
|
|
402
|
-
case 1:
|
|
403
|
-
case "end":
|
|
404
|
-
return _context16.stop();
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
}, _callee16);
|
|
408
|
-
}));
|
|
409
|
-
return _loadStats.apply(this, arguments);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
function resendActivationLink(_x11) {
|
|
413
|
-
return _resendActivationLink.apply(this, arguments);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
function _resendActivationLink() {
|
|
417
|
-
_resendActivationLink = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee17(body) {
|
|
418
|
-
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
|
419
|
-
while (1) {
|
|
420
|
-
switch (_context17.prev = _context17.next) {
|
|
421
|
-
case 0:
|
|
422
|
-
return _context17.abrupt("return", (0, _fetch.Post)("".concat(_constants.urls.team.members.v1, "/").concat(body.userId, "/resendActivationEmail"), {}));
|
|
423
|
-
|
|
424
|
-
case 1:
|
|
425
|
-
case "end":
|
|
426
|
-
return _context17.stop();
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}, _callee17);
|
|
430
|
-
}));
|
|
431
|
-
return _resendActivationLink.apply(this, arguments);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
function resendInvitationLink(_x12) {
|
|
435
|
-
return _resendInvitationLink.apply(this, arguments);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
function _resendInvitationLink() {
|
|
439
|
-
_resendInvitationLink = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee18(body) {
|
|
440
|
-
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
|
441
|
-
while (1) {
|
|
442
|
-
switch (_context18.prev = _context18.next) {
|
|
443
|
-
case 0:
|
|
444
|
-
return _context18.abrupt("return", (0, _fetch.Post)(_constants.urls.identity.users.v2, (0, _extends3["default"])({}, body, {
|
|
445
|
-
provider: 'local'
|
|
446
|
-
})));
|
|
447
|
-
|
|
448
|
-
case 1:
|
|
449
|
-
case "end":
|
|
450
|
-
return _context18.stop();
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}, _callee18);
|
|
454
|
-
}));
|
|
455
|
-
return _resendInvitationLink.apply(this, arguments);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
function resendInvitationLinkToAllTenants(_x13) {
|
|
459
|
-
return _resendInvitationLinkToAllTenants.apply(this, arguments);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
function _resendInvitationLinkToAllTenants() {
|
|
463
|
-
_resendInvitationLinkToAllTenants = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee19(body) {
|
|
464
|
-
return _regenerator["default"].wrap(function _callee19$(_context19) {
|
|
465
|
-
while (1) {
|
|
466
|
-
switch (_context19.prev = _context19.next) {
|
|
467
|
-
case 0:
|
|
468
|
-
return _context19.abrupt("return", (0, _fetch.Post)(_constants.urls.identity.users.invitation.resendAll.v1, (0, _extends3["default"])({}, body)));
|
|
469
|
-
|
|
470
|
-
case 1:
|
|
471
|
-
case "end":
|
|
472
|
-
return _context19.stop();
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}, _callee19);
|
|
476
|
-
}));
|
|
477
|
-
return _resendInvitationLinkToAllTenants.apply(this, arguments);
|
|
127
|
+
async function resendInvitationLinkToAllTenants(body) {
|
|
128
|
+
return (0, _fetch.Post)(_constants.urls.identity.users.invitation.resendAll.v1, (0, _extends2.default)({}, body));
|
|
478
129
|
}
|
package/node/tenants/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -10,98 +8,22 @@ exports.getSubTenantsAsTree = getSubTenantsAsTree;
|
|
|
10
8
|
exports.getTenants = getTenants;
|
|
11
9
|
exports.switchTenant = switchTenant;
|
|
12
10
|
|
|
13
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
14
|
-
|
|
15
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
16
|
-
|
|
17
11
|
var _fetch = require("../fetch");
|
|
18
12
|
|
|
19
13
|
var _constants = require("../constants");
|
|
20
14
|
|
|
21
|
-
function switchTenant(
|
|
22
|
-
return
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function _switchTenant() {
|
|
26
|
-
_switchTenant = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(body) {
|
|
27
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
28
|
-
while (1) {
|
|
29
|
-
switch (_context.prev = _context.next) {
|
|
30
|
-
case 0:
|
|
31
|
-
return _context.abrupt("return", (0, _fetch.Put)("".concat(_constants.urls.identity.users.v1, "/tenant"), body));
|
|
32
|
-
|
|
33
|
-
case 1:
|
|
34
|
-
case "end":
|
|
35
|
-
return _context.stop();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}, _callee);
|
|
39
|
-
}));
|
|
40
|
-
return _switchTenant.apply(this, arguments);
|
|
15
|
+
async function switchTenant(body) {
|
|
16
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.users.v1}/tenant`, body);
|
|
41
17
|
}
|
|
42
18
|
|
|
43
|
-
function getTenants() {
|
|
44
|
-
return
|
|
19
|
+
async function getTenants() {
|
|
20
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.users.v2}/me/tenants`);
|
|
45
21
|
}
|
|
46
22
|
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
50
|
-
while (1) {
|
|
51
|
-
switch (_context2.prev = _context2.next) {
|
|
52
|
-
case 0:
|
|
53
|
-
return _context2.abrupt("return", (0, _fetch.Get)("".concat(_constants.urls.identity.users.v2, "/me/tenants")));
|
|
54
|
-
|
|
55
|
-
case 1:
|
|
56
|
-
case "end":
|
|
57
|
-
return _context2.stop();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}, _callee2);
|
|
61
|
-
}));
|
|
62
|
-
return _getTenants.apply(this, arguments);
|
|
23
|
+
async function getSubTenants() {
|
|
24
|
+
return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.v1);
|
|
63
25
|
}
|
|
64
26
|
|
|
65
|
-
function
|
|
66
|
-
return
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function _getSubTenants() {
|
|
70
|
-
_getSubTenants = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3() {
|
|
71
|
-
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
72
|
-
while (1) {
|
|
73
|
-
switch (_context3.prev = _context3.next) {
|
|
74
|
-
case 0:
|
|
75
|
-
return _context3.abrupt("return", (0, _fetch.Get)(_constants.urls.tenants.hierarchy.v1));
|
|
76
|
-
|
|
77
|
-
case 1:
|
|
78
|
-
case "end":
|
|
79
|
-
return _context3.stop();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}, _callee3);
|
|
83
|
-
}));
|
|
84
|
-
return _getSubTenants.apply(this, arguments);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function getSubTenantsAsTree() {
|
|
88
|
-
return _getSubTenantsAsTree.apply(this, arguments);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function _getSubTenantsAsTree() {
|
|
92
|
-
_getSubTenantsAsTree = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4() {
|
|
93
|
-
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
94
|
-
while (1) {
|
|
95
|
-
switch (_context4.prev = _context4.next) {
|
|
96
|
-
case 0:
|
|
97
|
-
return _context4.abrupt("return", (0, _fetch.Get)(_constants.urls.tenants.hierarchy.tree.v1));
|
|
98
|
-
|
|
99
|
-
case 1:
|
|
100
|
-
case "end":
|
|
101
|
-
return _context4.stop();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}, _callee4);
|
|
105
|
-
}));
|
|
106
|
-
return _getSubTenantsAsTree.apply(this, arguments);
|
|
27
|
+
async function getSubTenantsAsTree() {
|
|
28
|
+
return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.tree.v1);
|
|
107
29
|
}
|
package/node/vendor/index.js
CHANGED
|
@@ -1,40 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.getVendorPublicInfo = getVendorPublicInfo;
|
|
9
7
|
|
|
10
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
-
|
|
12
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
-
|
|
14
8
|
var _fetch = require("../fetch");
|
|
15
9
|
|
|
16
10
|
var _constants = require("../constants");
|
|
17
11
|
|
|
18
|
-
function getVendorPublicInfo() {
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function _getVendorPublicInfo() {
|
|
23
|
-
_getVendorPublicInfo = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee() {
|
|
24
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
25
|
-
while (1) {
|
|
26
|
-
switch (_context.prev = _context.next) {
|
|
27
|
-
case 0:
|
|
28
|
-
return _context.abrupt("return", (0, _fetch.Get)("".concat(_constants.urls.vendor, "/public")));
|
|
29
|
-
|
|
30
|
-
case 1:
|
|
31
|
-
case "end":
|
|
32
|
-
return _context.stop();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}, _callee);
|
|
36
|
-
}));
|
|
37
|
-
return _getVendorPublicInfo.apply(this, arguments);
|
|
12
|
+
async function getVendorPublicInfo() {
|
|
13
|
+
return (0, _fetch.Get)(`${_constants.urls.vendor}/public`);
|
|
38
14
|
}
|
|
39
15
|
|
|
40
16
|
;
|