@frontegg/rest-api 3.0.1 → 3.0.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 (69) hide show
  1. package/ContextHolder.js +67 -101
  2. package/account-settings/index.js +4 -43
  3. package/audits/index.js +16 -69
  4. package/auth/enums.js +2 -2
  5. package/auth/index.d.ts +4 -0
  6. package/auth/index.js +354 -2044
  7. package/auth/interfaces.js +1 -1
  8. package/auth/secutiry-poilicy/index.js +45 -254
  9. package/connectivity/index.js +79 -73
  10. package/constants.js +1 -1
  11. package/error.js +9 -33
  12. package/fetch.js +165 -519
  13. package/index.js +26 -26
  14. package/jwt.js +19 -45
  15. package/metadata/index.js +19 -159
  16. package/node/ContextHolder.js +68 -104
  17. package/node/account-settings/index.js +4 -46
  18. package/node/audits/index.js +15 -68
  19. package/node/auth/enums.js +2 -2
  20. package/node/auth/index.js +487 -2099
  21. package/node/auth/interfaces.js +2 -2
  22. package/node/auth/secutiry-poilicy/index.js +36 -240
  23. package/node/connectivity/index.js +78 -71
  24. package/node/constants.js +1 -1
  25. package/node/error.js +9 -38
  26. package/node/fetch.js +166 -521
  27. package/node/index.js +47 -49
  28. package/node/jwt.js +19 -51
  29. package/node/metadata/index.js +19 -163
  30. package/node/notifications/index.js +18 -94
  31. package/node/reports/index.js +62 -171
  32. package/node/roles/index.js +34 -172
  33. package/node/routers.js +2 -2
  34. package/node/sub-tenants/index.js +12 -126
  35. package/node/subscriptions/enums.js +4 -4
  36. package/node/subscriptions/index.js +10 -10
  37. package/node/subscriptions/interfaces.js +1 -1
  38. package/node/subscriptions/invoices.js +10 -70
  39. package/node/subscriptions/managedSubscriptions.js +16 -111
  40. package/node/subscriptions/paymentMethods.js +15 -69
  41. package/node/subscriptions/paymentProviders.js +2 -26
  42. package/node/subscriptions/plans.js +4 -46
  43. package/node/subscriptions/providers/index.js +1 -1
  44. package/node/subscriptions/providers/stripe/index.js +10 -106
  45. package/node/subscriptions/subscriptions.js +16 -111
  46. package/node/subscriptions/summaries.js +2 -26
  47. package/node/subscriptions/tenantConfiguration.js +4 -46
  48. package/node/teams/index.js +57 -406
  49. package/node/tenants/index.js +8 -86
  50. package/node/vendor/index.js +2 -26
  51. package/notifications/index.js +18 -93
  52. package/package.json +1 -1
  53. package/reports/index.js +65 -175
  54. package/roles/index.js +34 -175
  55. package/routers.js +2 -2
  56. package/sub-tenants/index.js +12 -127
  57. package/subscriptions/enums.js +4 -4
  58. package/subscriptions/invoices.js +12 -70
  59. package/subscriptions/managedSubscriptions.js +20 -115
  60. package/subscriptions/paymentMethods.js +16 -70
  61. package/subscriptions/paymentProviders.js +2 -22
  62. package/subscriptions/plans.js +4 -43
  63. package/subscriptions/providers/stripe/index.js +10 -106
  64. package/subscriptions/subscriptions.js +20 -115
  65. package/subscriptions/summaries.js +2 -22
  66. package/subscriptions/tenantConfiguration.js +4 -43
  67. package/teams/index.js +56 -420
  68. package/tenants/index.js +8 -85
  69. package/vendor/index.js +2 -23
package/auth/index.js CHANGED
@@ -1,8 +1,7 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ const _excluded = ["type"],
4
+ _excluded2 = ["type"];
6
5
  import { getTenants } from "../tenants";
7
6
  export * from './secutiry-poilicy';
8
7
  export * from './enums';
@@ -10,2093 +9,404 @@ import { urls } from '../constants';
10
9
  import { ContextHolder } from '../ContextHolder';
11
10
  import { Delete, Get, Patch, Post, Put } from '../fetch';
12
11
  import { jwtDecode } from '../jwt';
13
- export function generateLoginResponse(_x) {
14
- return _generateLoginResponse.apply(this, arguments);
15
- }
16
-
17
- function _generateLoginResponse() {
18
- _generateLoginResponse = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(loginResponse) {
19
- var me, decodedContent, user;
20
- return _regeneratorRuntime.wrap(function _callee$(_context) {
21
- while (1) {
22
- switch (_context.prev = _context.next) {
23
- case 0:
24
- if (loginResponse.accessToken) {
25
- _context.next = 2;
26
- break;
27
- }
28
-
29
- return _context.abrupt("return", loginResponse);
30
-
31
- case 2:
32
- ContextHolder.setAccessToken(loginResponse.accessToken);
33
- _context.next = 5;
34
- return Get("".concat(urls.identity.users.v2, "/me"));
35
-
36
- case 5:
37
- me = _context.sent;
38
- decodedContent = loginResponse.accessToken ? jwtDecode(loginResponse.accessToken) : {};
39
- user = _extends({}, loginResponse, decodedContent, me);
40
- ContextHolder.setUser(user);
41
- return _context.abrupt("return", user);
42
-
43
- case 10:
44
- case "end":
45
- return _context.stop();
46
- }
47
- }
48
- }, _callee);
49
- }));
50
- return _generateLoginResponse.apply(this, arguments);
51
- }
52
-
53
- export function generateLoginResponseV2(_x2) {
54
- return _generateLoginResponseV.apply(this, arguments);
55
- }
56
-
57
- function _generateLoginResponseV() {
58
- _generateLoginResponseV = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(loginResponse) {
59
- var _yield$Promise$all, _yield$Promise$all2, me, tenants, decodedContent, user;
60
-
61
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
62
- while (1) {
63
- switch (_context2.prev = _context2.next) {
64
- case 0:
65
- if (loginResponse.accessToken) {
66
- _context2.next = 2;
67
- break;
68
- }
69
-
70
- return _context2.abrupt("return", {
71
- user: loginResponse
72
- });
73
-
74
- case 2:
75
- ContextHolder.setAccessToken(loginResponse.accessToken);
76
- _context2.next = 5;
77
- return Promise.all([Get("".concat(urls.identity.users.v2, "/me")), getTenants()]);
78
-
79
- case 5:
80
- _yield$Promise$all = _context2.sent;
81
- _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
82
- me = _yield$Promise$all2[0];
83
- tenants = _yield$Promise$all2[1];
84
- decodedContent = loginResponse.accessToken ? jwtDecode(loginResponse.accessToken) : {};
85
- user = _extends({}, loginResponse, decodedContent, me);
86
- ContextHolder.setUser(user);
87
- return _context2.abrupt("return", {
88
- user: user,
89
- tenants: tenants
90
- });
91
-
92
- case 13:
93
- case "end":
94
- return _context2.stop();
95
- }
96
- }
97
- }, _callee2);
98
- }));
99
- return _generateLoginResponseV.apply(this, arguments);
100
- }
101
-
102
- export function generateLoginResponseFromOAuthResponse(_x3) {
103
- return _generateLoginResponseFromOAuthResponse.apply(this, arguments);
104
- }
105
-
106
- function _generateLoginResponseFromOAuthResponse() {
107
- _generateLoginResponseFromOAuthResponse = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(oauthResponse) {
108
- var me, decodedContent, user;
109
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
110
- while (1) {
111
- switch (_context3.prev = _context3.next) {
112
- case 0:
113
- ContextHolder.setAccessToken(oauthResponse.id_token);
114
- _context3.next = 3;
115
- return Get("".concat(urls.identity.users.v2, "/me"));
116
-
117
- case 3:
118
- me = _context3.sent;
119
- decodedContent = oauthResponse.id_token ? jwtDecode(oauthResponse.id_token) : {};
120
- user = _extends({
121
- mfaRequired: false,
122
- accessToken: oauthResponse.id_token,
123
- refreshToken: oauthResponse.refresh_token
124
- }, decodedContent, me);
125
- ContextHolder.setUser(user);
126
- return _context3.abrupt("return", user);
127
-
128
- case 8:
129
- case "end":
130
- return _context3.stop();
131
- }
132
- }
133
- }, _callee3);
134
- }));
135
- return _generateLoginResponseFromOAuthResponse.apply(this, arguments);
136
- }
137
-
138
- export function preLogin(_x4) {
139
- return _preLogin.apply(this, arguments);
140
- }
141
-
142
- function _preLogin() {
143
- _preLogin = _asyncToGenerator(_regeneratorRuntime.mark(function _callee4(body) {
144
- var _yield$Post, address;
145
-
146
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
147
- while (1) {
148
- switch (_context4.prev = _context4.next) {
149
- case 0:
150
- _context4.prev = 0;
151
- _context4.next = 3;
152
- return Post("".concat(urls.identity.auth.v1, "/user/saml/prelogin"), body);
153
-
154
- case 3:
155
- _yield$Post = _context4.sent;
156
- address = _yield$Post.address;
157
- return _context4.abrupt("return", address);
158
-
159
- case 8:
160
- _context4.prev = 8;
161
- _context4.t0 = _context4["catch"](0);
162
- return _context4.abrupt("return", null);
163
-
164
- case 11:
165
- case "end":
166
- return _context4.stop();
167
- }
168
- }
169
- }, _callee4, null, [[0, 8]]);
170
- }));
171
- return _preLogin.apply(this, arguments);
172
- }
173
-
174
- export function preLoginWithIdpType(_x5) {
175
- return _preLoginWithIdpType.apply(this, arguments);
176
- }
177
-
178
- function _preLoginWithIdpType() {
179
- _preLoginWithIdpType = _asyncToGenerator(_regeneratorRuntime.mark(function _callee5(body) {
180
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
181
- while (1) {
182
- switch (_context5.prev = _context5.next) {
183
- case 0:
184
- return _context5.abrupt("return", Post("".concat(urls.identity.auth.v1, "/user/saml/prelogin"), body));
185
-
186
- case 1:
187
- case "end":
188
- return _context5.stop();
189
- }
190
- }
191
- }, _callee5);
192
- }));
193
- return _preLoginWithIdpType.apply(this, arguments);
194
- }
195
-
196
- export function postLogin(_x6) {
197
- return _postLogin.apply(this, arguments);
198
- }
199
-
200
- function _postLogin() {
201
- _postLogin = _asyncToGenerator(_regeneratorRuntime.mark(function _callee6(body) {
202
- var data;
203
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
204
- while (1) {
205
- switch (_context6.prev = _context6.next) {
206
- case 0:
207
- _context6.next = 2;
208
- return Post("".concat(urls.identity.auth.v1, "/user/saml/postlogin"), body);
209
-
210
- case 2:
211
- data = _context6.sent;
212
- return _context6.abrupt("return", generateLoginResponse(data));
213
-
214
- case 4:
215
- case "end":
216
- return _context6.stop();
217
- }
218
- }
219
- }, _callee6);
220
- }));
221
- return _postLogin.apply(this, arguments);
222
- }
223
-
224
- export function oidcPostLogin(_x7) {
225
- return _oidcPostLogin.apply(this, arguments);
226
- }
227
-
228
- function _oidcPostLogin() {
229
- _oidcPostLogin = _asyncToGenerator(_regeneratorRuntime.mark(function _callee7(body) {
230
- var data;
231
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
232
- while (1) {
233
- switch (_context7.prev = _context7.next) {
234
- case 0:
235
- _context7.next = 2;
236
- return Post("".concat(urls.identity.auth.v1, "/user/oidc/postlogin"), body);
237
-
238
- case 2:
239
- data = _context7.sent;
240
- return _context7.abrupt("return", generateLoginResponse(data));
241
-
242
- case 4:
243
- case "end":
244
- return _context7.stop();
245
- }
246
- }
247
- }, _callee7);
248
- }));
249
- return _oidcPostLogin.apply(this, arguments);
250
- }
251
-
252
- export function login(_x8) {
253
- return _login.apply(this, arguments);
254
- }
255
-
256
- function _login() {
257
- _login = _asyncToGenerator(_regeneratorRuntime.mark(function _callee8(body) {
258
- var data;
259
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
260
- while (1) {
261
- switch (_context8.prev = _context8.next) {
262
- case 0:
263
- _context8.next = 2;
264
- return Post("".concat(urls.identity.auth.v1, "/user"), body);
265
-
266
- case 2:
267
- data = _context8.sent;
268
- return _context8.abrupt("return", generateLoginResponse(data));
269
-
270
- case 4:
271
- case "end":
272
- return _context8.stop();
273
- }
274
- }
275
- }, _callee8);
276
- }));
277
- return _login.apply(this, arguments);
278
- }
279
-
280
- export function loginWithMfa(_x9) {
281
- return _loginWithMfa.apply(this, arguments);
282
- }
283
-
284
- function _loginWithMfa() {
285
- _loginWithMfa = _asyncToGenerator(_regeneratorRuntime.mark(function _callee9(body) {
286
- var data;
287
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
288
- while (1) {
289
- switch (_context9.prev = _context9.next) {
290
- case 0:
291
- _context9.next = 2;
292
- return Post("".concat(urls.identity.auth.v1, "/user/mfa/verify"), body);
293
-
294
- case 2:
295
- data = _context9.sent;
296
- return _context9.abrupt("return", generateLoginResponse(data));
297
-
298
- case 4:
299
- case "end":
300
- return _context9.stop();
301
- }
302
- }
303
- }, _callee9);
304
- }));
305
- return _loginWithMfa.apply(this, arguments);
306
- }
307
-
308
- export function activateAccount(_x10) {
309
- return _activateAccount.apply(this, arguments);
310
- }
311
-
312
- function _activateAccount() {
313
- _activateAccount = _asyncToGenerator(_regeneratorRuntime.mark(function _callee10(body) {
314
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
315
- while (1) {
316
- switch (_context10.prev = _context10.next) {
317
- case 0:
318
- return _context10.abrupt("return", Post("".concat(urls.identity.users.v1, "/activate"), body));
319
-
320
- case 1:
321
- case "end":
322
- return _context10.stop();
323
- }
324
- }
325
- }, _callee10);
326
- }));
327
- return _activateAccount.apply(this, arguments);
328
- }
329
-
330
- export function getActivateAccountStrategy(_x11) {
331
- return _getActivateAccountStrategy.apply(this, arguments);
332
- }
333
-
334
- function _getActivateAccountStrategy() {
335
- _getActivateAccountStrategy = _asyncToGenerator(_regeneratorRuntime.mark(function _callee11(params) {
336
- return _regeneratorRuntime.wrap(function _callee11$(_context11) {
337
- while (1) {
338
- switch (_context11.prev = _context11.next) {
339
- case 0:
340
- return _context11.abrupt("return", Get("".concat(urls.identity.users.v1, "/activate/strategy"), params));
341
-
342
- case 1:
343
- case "end":
344
- return _context11.stop();
345
- }
346
- }
347
- }, _callee11);
348
- }));
349
- return _getActivateAccountStrategy.apply(this, arguments);
350
- }
351
-
352
- export function resendActivationEmail(_x12) {
353
- return _resendActivationEmail.apply(this, arguments);
354
- }
355
-
356
- function _resendActivationEmail() {
357
- _resendActivationEmail = _asyncToGenerator(_regeneratorRuntime.mark(function _callee12(body) {
358
- return _regeneratorRuntime.wrap(function _callee12$(_context12) {
359
- while (1) {
360
- switch (_context12.prev = _context12.next) {
361
- case 0:
362
- return _context12.abrupt("return", Post("".concat(urls.identity.users.v1, "/activate/reset"), body));
363
-
364
- case 1:
365
- case "end":
366
- return _context12.stop();
367
- }
368
- }
369
- }, _callee12);
370
- }));
371
- return _resendActivationEmail.apply(this, arguments);
372
- }
373
-
374
- export function acceptInvitation(_x13) {
375
- return _acceptInvitation.apply(this, arguments);
376
- }
377
-
378
- function _acceptInvitation() {
379
- _acceptInvitation = _asyncToGenerator(_regeneratorRuntime.mark(function _callee13(body) {
380
- return _regeneratorRuntime.wrap(function _callee13$(_context13) {
381
- while (1) {
382
- switch (_context13.prev = _context13.next) {
383
- case 0:
384
- return _context13.abrupt("return", Post("".concat(urls.identity.users.v1, "/invitation/accept"), body));
385
-
386
- case 1:
387
- case "end":
388
- return _context13.stop();
389
- }
390
- }
391
- }, _callee13);
392
- }));
393
- return _acceptInvitation.apply(this, arguments);
394
- }
395
-
396
- export function refreshToken() {
397
- return _refreshToken.apply(this, arguments);
398
- }
399
-
400
- function _refreshToken() {
401
- _refreshToken = _asyncToGenerator(_regeneratorRuntime.mark(function _callee14() {
402
- var data;
403
- return _regeneratorRuntime.wrap(function _callee14$(_context14) {
404
- while (1) {
405
- switch (_context14.prev = _context14.next) {
406
- case 0:
407
- _context14.next = 2;
408
- return Post("".concat(urls.identity.auth.v1, "/user/token/refresh"));
409
-
410
- case 2:
411
- data = _context14.sent;
412
- return _context14.abrupt("return", generateLoginResponse(data));
413
-
414
- case 4:
415
- case "end":
416
- return _context14.stop();
417
- }
418
- }
419
- }, _callee14);
420
- }));
421
- return _refreshToken.apply(this, arguments);
422
- }
423
-
424
- export function refreshTokenV2() {
425
- return _refreshTokenV.apply(this, arguments);
426
- }
427
-
428
- function _refreshTokenV() {
429
- _refreshTokenV = _asyncToGenerator(_regeneratorRuntime.mark(function _callee15() {
430
- var data;
431
- return _regeneratorRuntime.wrap(function _callee15$(_context15) {
432
- while (1) {
433
- switch (_context15.prev = _context15.next) {
434
- case 0:
435
- _context15.next = 2;
436
- return Post("".concat(urls.identity.auth.v1, "/user/token/refresh"));
437
-
438
- case 2:
439
- data = _context15.sent;
440
- return _context15.abrupt("return", generateLoginResponseV2(data));
441
-
442
- case 4:
443
- case "end":
444
- return _context15.stop();
445
- }
446
- }
447
- }, _callee15);
448
- }));
449
- return _refreshTokenV.apply(this, arguments);
450
- }
451
-
452
- export function logout() {
453
- return _logout.apply(this, arguments);
454
- }
455
-
456
- function _logout() {
457
- _logout = _asyncToGenerator(_regeneratorRuntime.mark(function _callee16() {
458
- return _regeneratorRuntime.wrap(function _callee16$(_context16) {
459
- while (1) {
460
- switch (_context16.prev = _context16.next) {
461
- case 0:
462
- return _context16.abrupt("return", Post("".concat(urls.identity.auth.v1, "/logout")));
463
-
464
- case 1:
465
- case "end":
466
- return _context16.stop();
467
- }
468
- }
469
- }, _callee16);
470
- }));
471
- return _logout.apply(this, arguments);
472
- }
473
-
474
- export function forgotPassword(_x14) {
475
- return _forgotPassword.apply(this, arguments);
476
- }
477
-
478
- function _forgotPassword() {
479
- _forgotPassword = _asyncToGenerator(_regeneratorRuntime.mark(function _callee17(body) {
480
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
481
- while (1) {
482
- switch (_context17.prev = _context17.next) {
483
- case 0:
484
- return _context17.abrupt("return", Post("".concat(urls.identity.users.v1, "/passwords/reset"), body));
485
-
486
- case 1:
487
- case "end":
488
- return _context17.stop();
489
- }
490
- }
491
- }, _callee17);
492
- }));
493
- return _forgotPassword.apply(this, arguments);
494
- }
495
-
496
- export function resetPassword(_x15) {
497
- return _resetPassword.apply(this, arguments);
498
- }
499
-
500
- function _resetPassword() {
501
- _resetPassword = _asyncToGenerator(_regeneratorRuntime.mark(function _callee18(body) {
502
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
503
- while (1) {
504
- switch (_context18.prev = _context18.next) {
505
- case 0:
506
- return _context18.abrupt("return", Post("".concat(urls.identity.users.v1, "/passwords/reset/verify"), body));
507
-
508
- case 1:
509
- case "end":
510
- return _context18.stop();
511
- }
512
- }
513
- }, _callee18);
514
- }));
515
- return _resetPassword.apply(this, arguments);
516
- }
517
-
518
- export function loadPasswordConfig(_x16) {
519
- return _loadPasswordConfig.apply(this, arguments);
520
- }
521
-
522
- function _loadPasswordConfig() {
523
- _loadPasswordConfig = _asyncToGenerator(_regeneratorRuntime.mark(function _callee19(params) {
524
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
525
- while (1) {
526
- switch (_context19.prev = _context19.next) {
527
- case 0:
528
- return _context19.abrupt("return", Get("".concat(urls.identity.users.v1, "/passwords/config"), params));
529
-
530
- case 1:
531
- case "end":
532
- return _context19.stop();
533
- }
534
- }
535
- }, _callee19);
536
- }));
537
- return _loadPasswordConfig.apply(this, arguments);
538
- }
539
-
540
- export function recoverMfaToken(_x17) {
541
- return _recoverMfaToken.apply(this, arguments);
542
- }
543
-
544
- function _recoverMfaToken() {
545
- _recoverMfaToken = _asyncToGenerator(_regeneratorRuntime.mark(function _callee20(body) {
546
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
547
- while (1) {
548
- switch (_context20.prev = _context20.next) {
549
- case 0:
550
- return _context20.abrupt("return", Post("".concat(urls.identity.auth.v1, "/user/mfa/recover"), body));
551
-
552
- case 1:
553
- case "end":
554
- return _context20.stop();
555
- }
556
- }
557
- }, _callee20);
558
- }));
559
- return _recoverMfaToken.apply(this, arguments);
560
- }
561
-
562
- export function enrollMfa() {
563
- return _enrollMfa.apply(this, arguments);
564
- }
565
-
566
- function _enrollMfa() {
567
- _enrollMfa = _asyncToGenerator(_regeneratorRuntime.mark(function _callee21() {
568
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
569
- while (1) {
570
- switch (_context21.prev = _context21.next) {
571
- case 0:
572
- return _context21.abrupt("return", Post("".concat(urls.identity.users.v1, "/mfa/enroll")));
573
-
574
- case 1:
575
- case "end":
576
- return _context21.stop();
577
- }
578
- }
579
- }, _callee21);
580
- }));
581
- return _enrollMfa.apply(this, arguments);
582
- }
583
-
584
- export function verifyMfa(_x18) {
585
- return _verifyMfa.apply(this, arguments);
586
- }
587
-
588
- function _verifyMfa() {
589
- _verifyMfa = _asyncToGenerator(_regeneratorRuntime.mark(function _callee22(body) {
590
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
591
- while (1) {
592
- switch (_context22.prev = _context22.next) {
593
- case 0:
594
- return _context22.abrupt("return", Post("".concat(urls.identity.users.v1, "/mfa/enroll/verify"), body));
595
-
596
- case 1:
597
- case "end":
598
- return _context22.stop();
599
- }
600
- }
601
- }, _callee22);
602
- }));
603
- return _verifyMfa.apply(this, arguments);
604
- }
605
-
606
- export function disableMfa(_x19) {
607
- return _disableMfa.apply(this, arguments);
608
- }
609
-
610
- function _disableMfa() {
611
- _disableMfa = _asyncToGenerator(_regeneratorRuntime.mark(function _callee23(body) {
612
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
613
- while (1) {
614
- switch (_context23.prev = _context23.next) {
615
- case 0:
616
- return _context23.abrupt("return", Post("".concat(urls.identity.users.v1, "/mfa/disable"), body));
617
-
618
- case 1:
619
- case "end":
620
- return _context23.stop();
621
- }
622
- }
623
- }, _callee23);
624
- }));
625
- return _disableMfa.apply(this, arguments);
626
- }
627
-
628
- export function getSamlConfiguration() {
629
- return _getSamlConfiguration.apply(this, arguments);
630
- }
631
-
632
- function _getSamlConfiguration() {
633
- _getSamlConfiguration = _asyncToGenerator(_regeneratorRuntime.mark(function _callee24() {
634
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
635
- while (1) {
636
- switch (_context24.prev = _context24.next) {
637
- case 0:
638
- return _context24.abrupt("return", Get("".concat(urls.team.sso.v1, "/saml/configurations")));
639
-
640
- case 1:
641
- case "end":
642
- return _context24.stop();
643
- }
644
- }
645
- }, _callee24);
646
- }));
647
- return _getSamlConfiguration.apply(this, arguments);
648
- }
649
-
650
- export function updateSamlConfiguration(_x20) {
651
- return _updateSamlConfiguration.apply(this, arguments);
652
- }
653
-
654
- function _updateSamlConfiguration() {
655
- _updateSamlConfiguration = _asyncToGenerator(_regeneratorRuntime.mark(function _callee25(body) {
656
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
657
- while (1) {
658
- switch (_context25.prev = _context25.next) {
659
- case 0:
660
- return _context25.abrupt("return", Post("".concat(urls.team.sso.v1, "/saml/configurations"), body));
661
-
662
- case 1:
663
- case "end":
664
- return _context25.stop();
665
- }
666
- }
667
- }, _callee25);
668
- }));
669
- return _updateSamlConfiguration.apply(this, arguments);
670
- }
671
-
672
- export function getSamlVendorConfiguration() {
673
- return _getSamlVendorConfiguration.apply(this, arguments);
674
- }
675
-
676
- function _getSamlVendorConfiguration() {
677
- _getSamlVendorConfiguration = _asyncToGenerator(_regeneratorRuntime.mark(function _callee26() {
678
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
679
- while (1) {
680
- switch (_context26.prev = _context26.next) {
681
- case 0:
682
- return _context26.abrupt("return", Get("".concat(urls.team.sso.v1, "/saml/configurations/vendor-config")));
683
-
684
- case 1:
685
- case "end":
686
- return _context26.stop();
687
- }
688
- }
689
- }, _callee26);
690
- }));
691
- return _getSamlVendorConfiguration.apply(this, arguments);
692
- }
693
-
694
- export function updateSamlVendorMetadata(_x21) {
695
- return _updateSamlVendorMetadata.apply(this, arguments);
696
- }
697
-
698
- function _updateSamlVendorMetadata() {
699
- _updateSamlVendorMetadata = _asyncToGenerator(_regeneratorRuntime.mark(function _callee27(body) {
700
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
701
- while (1) {
702
- switch (_context27.prev = _context27.next) {
703
- case 0:
704
- return _context27.abrupt("return", Put("".concat(urls.team.sso.v1, "/saml/configurations/metadata"), body));
705
-
706
- case 1:
707
- case "end":
708
- return _context27.stop();
709
- }
710
- }
711
- }, _callee27);
712
- }));
713
- return _updateSamlVendorMetadata.apply(this, arguments);
714
- }
715
-
716
- export function validateSamlDomain() {
717
- return _validateSamlDomain.apply(this, arguments);
718
- }
719
-
720
- function _validateSamlDomain() {
721
- _validateSamlDomain = _asyncToGenerator(_regeneratorRuntime.mark(function _callee28() {
722
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
723
- while (1) {
724
- switch (_context28.prev = _context28.next) {
725
- case 0:
726
- return _context28.abrupt("return", Put("".concat(urls.team.sso.v1, "/saml/validations/domain")));
727
-
728
- case 1:
729
- case "end":
730
- return _context28.stop();
731
- }
732
- }
733
- }, _callee28);
734
- }));
735
- return _validateSamlDomain.apply(this, arguments);
736
- }
737
-
738
- export function getSamlRoles() {
739
- return _getSamlRoles.apply(this, arguments);
740
- }
741
-
742
- function _getSamlRoles() {
743
- _getSamlRoles = _asyncToGenerator(_regeneratorRuntime.mark(function _callee29() {
744
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
745
- while (1) {
746
- switch (_context29.prev = _context29.next) {
747
- case 0:
748
- return _context29.abrupt("return", Get("".concat(urls.team.sso.v1, "/saml/configurations/roles/default")));
749
-
750
- case 1:
751
- case "end":
752
- return _context29.stop();
753
- }
754
- }
755
- }, _callee29);
756
- }));
757
- return _getSamlRoles.apply(this, arguments);
758
- }
759
-
760
- export function getSamlRolesGroups() {
761
- return _getSamlRolesGroups.apply(this, arguments);
762
- }
763
-
764
- function _getSamlRolesGroups() {
765
- _getSamlRolesGroups = _asyncToGenerator(_regeneratorRuntime.mark(function _callee30() {
766
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
767
- while (1) {
768
- switch (_context30.prev = _context30.next) {
769
- case 0:
770
- return _context30.abrupt("return", Get("".concat(urls.team.sso.v2, "/saml/configurations/groups")));
771
-
772
- case 1:
773
- case "end":
774
- return _context30.stop();
775
- }
776
- }
777
- }, _callee30);
778
- }));
779
- return _getSamlRolesGroups.apply(this, arguments);
780
- }
781
-
782
- export function updateSamlRoles(_x22) {
783
- return _updateSamlRoles.apply(this, arguments);
784
- }
785
-
786
- function _updateSamlRoles() {
787
- _updateSamlRoles = _asyncToGenerator(_regeneratorRuntime.mark(function _callee31(_ref) {
788
- var roleIds;
789
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
790
- while (1) {
791
- switch (_context31.prev = _context31.next) {
792
- case 0:
793
- roleIds = _ref.roleIds;
794
- return _context31.abrupt("return", Post("".concat(urls.team.sso.v1, "/saml/configurations/roles/default"), {
795
- roleIds: roleIds
796
- }));
797
-
798
- case 2:
799
- case "end":
800
- return _context31.stop();
801
- }
802
- }
803
- }, _callee31);
804
- }));
805
- return _updateSamlRoles.apply(this, arguments);
806
- }
807
-
808
- export function createSamlGroup(_x23) {
809
- return _createSamlGroup.apply(this, arguments);
810
- }
811
-
812
- function _createSamlGroup() {
813
- _createSamlGroup = _asyncToGenerator(_regeneratorRuntime.mark(function _callee32(_ref2) {
814
- var roleIds, group;
815
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
816
- while (1) {
817
- switch (_context32.prev = _context32.next) {
818
- case 0:
819
- roleIds = _ref2.roleIds, group = _ref2.group;
820
- return _context32.abrupt("return", Post("".concat(urls.team.sso.v2, "/saml/configurations/groups"), {
821
- group: group,
822
- roleIds: roleIds
823
- }));
824
-
825
- case 2:
826
- case "end":
827
- return _context32.stop();
828
- }
829
- }
830
- }, _callee32);
831
- }));
832
- return _createSamlGroup.apply(this, arguments);
833
- }
834
-
835
- export function updateSamlGroup(_x24) {
836
- return _updateSamlGroup.apply(this, arguments);
837
- }
838
-
839
- function _updateSamlGroup() {
840
- _updateSamlGroup = _asyncToGenerator(_regeneratorRuntime.mark(function _callee33(_ref3) {
841
- var roleIds, group, id;
842
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
843
- while (1) {
844
- switch (_context33.prev = _context33.next) {
845
- case 0:
846
- roleIds = _ref3.roleIds, group = _ref3.group, id = _ref3.id;
847
- return _context33.abrupt("return", Patch("".concat(urls.team.sso.v2, "/saml/configurations/groups/").concat(id), {
848
- group: group,
849
- roleIds: roleIds
850
- }));
851
-
852
- case 2:
853
- case "end":
854
- return _context33.stop();
855
- }
856
- }
857
- }, _callee33);
858
- }));
859
- return _updateSamlGroup.apply(this, arguments);
860
- }
861
-
862
- export function deleteSamlGroup(_x25) {
863
- return _deleteSamlGroup.apply(this, arguments);
864
- }
865
-
866
- function _deleteSamlGroup() {
867
- _deleteSamlGroup = _asyncToGenerator(_regeneratorRuntime.mark(function _callee34(_ref4) {
868
- var id;
869
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
870
- while (1) {
871
- switch (_context34.prev = _context34.next) {
872
- case 0:
873
- id = _ref4.id;
874
- return _context34.abrupt("return", Delete("".concat(urls.team.sso.v2, "/saml/configurations/groups/").concat(id)));
875
-
876
- case 2:
877
- case "end":
878
- return _context34.stop();
879
- }
880
- }
881
- }, _callee34);
882
- }));
883
- return _deleteSamlGroup.apply(this, arguments);
884
- }
885
-
886
- export function getOidcConfiguration() {
887
- return _getOidcConfiguration.apply(this, arguments);
888
- }
889
-
890
- function _getOidcConfiguration() {
891
- _getOidcConfiguration = _asyncToGenerator(_regeneratorRuntime.mark(function _callee35() {
892
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
893
- while (1) {
894
- switch (_context35.prev = _context35.next) {
895
- case 0:
896
- return _context35.abrupt("return", Get("".concat(urls.team.sso.v1, "/oidc/configurations")));
897
-
898
- case 1:
899
- case "end":
900
- return _context35.stop();
901
- }
902
- }
903
- }, _callee35);
904
- }));
905
- return _getOidcConfiguration.apply(this, arguments);
906
- }
907
-
908
- export function getSSOPublicConfiguration() {
909
- return _getSSOPublicConfiguration.apply(this, arguments);
910
- }
911
-
912
- function _getSSOPublicConfiguration() {
913
- _getSSOPublicConfiguration = _asyncToGenerator(_regeneratorRuntime.mark(function _callee36() {
914
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
915
- while (1) {
916
- switch (_context36.prev = _context36.next) {
917
- case 0:
918
- return _context36.abrupt("return", Get("".concat(urls.team.sso.v2, "/configurations/public")));
919
-
920
- case 1:
921
- case "end":
922
- return _context36.stop();
923
- }
924
- }
925
- }, _callee36);
926
- }));
927
- return _getSSOPublicConfiguration.apply(this, arguments);
928
- }
929
-
930
- export function getSocialLoginProviders() {
931
- return _getSocialLoginProviders.apply(this, arguments);
932
- }
933
-
934
- function _getSocialLoginProviders() {
935
- _getSocialLoginProviders = _asyncToGenerator(_regeneratorRuntime.mark(function _callee37() {
936
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
937
- while (1) {
938
- switch (_context37.prev = _context37.next) {
939
- case 0:
940
- return _context37.abrupt("return", Get(urls.identity.sso.v1));
941
-
942
- case 1:
943
- case "end":
944
- return _context37.stop();
945
- }
946
- }
947
- }, _callee37);
948
- }));
949
- return _getSocialLoginProviders.apply(this, arguments);
950
- }
951
-
952
- export function getSocialLoginProvidersV2() {
953
- return _getSocialLoginProvidersV.apply(this, arguments);
954
- }
12
+ export async function generateLoginResponse(loginResponse) {
13
+ if (!loginResponse.accessToken) {
14
+ return loginResponse;
15
+ }
955
16
 
956
- function _getSocialLoginProvidersV() {
957
- _getSocialLoginProvidersV = _asyncToGenerator(_regeneratorRuntime.mark(function _callee38() {
958
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
959
- while (1) {
960
- switch (_context38.prev = _context38.next) {
961
- case 0:
962
- return _context38.abrupt("return", Get(urls.identity.sso.v2));
17
+ ContextHolder.setAccessToken(loginResponse.accessToken);
18
+ const me = await Get(`${urls.identity.users.v2}/me`);
19
+ const decodedContent = loginResponse.accessToken ? jwtDecode(loginResponse.accessToken) : {};
963
20
 
964
- case 1:
965
- case "end":
966
- return _context38.stop();
967
- }
968
- }
969
- }, _callee38);
970
- }));
971
- return _getSocialLoginProvidersV.apply(this, arguments);
972
- }
973
-
974
- export function loginViaSocialLogin(_x26) {
975
- return _loginViaSocialLogin.apply(this, arguments);
976
- }
977
-
978
- function _loginViaSocialLogin() {
979
- _loginViaSocialLogin = _asyncToGenerator(_regeneratorRuntime.mark(function _callee39(_ref5) {
980
- var provider, code, redirectUri, codeVerifier, metadata, invitationToken, state, params;
981
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
982
- while (1) {
983
- switch (_context39.prev = _context39.next) {
984
- case 0:
985
- provider = _ref5.provider, code = _ref5.code, redirectUri = _ref5.redirectUri, codeVerifier = _ref5.codeVerifier, metadata = _ref5.metadata, invitationToken = _ref5.invitationToken, state = _ref5.state;
986
- params = {
987
- code: code
988
- };
989
-
990
- if (redirectUri) {
991
- params.redirectUri = redirectUri;
992
- }
993
-
994
- if (codeVerifier) {
995
- params.code_verifier = codeVerifier;
996
- }
997
-
998
- if (state) {
999
- params.state = state;
1000
- }
1001
-
1002
- return _context39.abrupt("return", Post("".concat(urls.identity.auth.v1, "/user/sso/").concat(provider, "/postlogin"), {
1003
- metadata: metadata,
1004
- invitationToken: invitationToken
1005
- }, {
1006
- params: params
1007
- }));
1008
-
1009
- case 6:
1010
- case "end":
1011
- return _context39.stop();
1012
- }
1013
- }
1014
- }, _callee39);
1015
- }));
1016
- return _loginViaSocialLogin.apply(this, arguments);
1017
- }
1018
-
1019
- export function getVendorConfig() {
1020
- return _getVendorConfig.apply(this, arguments);
1021
- }
1022
-
1023
- function _getVendorConfig() {
1024
- _getVendorConfig = _asyncToGenerator(_regeneratorRuntime.mark(function _callee40() {
1025
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
1026
- while (1) {
1027
- switch (_context40.prev = _context40.next) {
1028
- case 0:
1029
- return _context40.abrupt("return", Get("".concat(urls.identity.configurations.v1, "/public")));
21
+ const user = _extends({}, loginResponse, decodedContent, me);
1030
22
 
1031
- case 1:
1032
- case "end":
1033
- return _context40.stop();
1034
- }
1035
- }
1036
- }, _callee40);
1037
- }));
1038
- return _getVendorConfig.apply(this, arguments);
23
+ ContextHolder.setUser(user);
24
+ return user;
1039
25
  }
26
+ export async function generateLoginResponseV2(loginResponse) {
27
+ if (!loginResponse.accessToken) {
28
+ return {
29
+ user: loginResponse
30
+ };
31
+ }
1040
32
 
1041
- export function signUpUser(_x27) {
1042
- return _signUpUser.apply(this, arguments);
1043
- }
1044
-
1045
- function _signUpUser() {
1046
- _signUpUser = _asyncToGenerator(_regeneratorRuntime.mark(function _callee41(body) {
1047
- var _yield$Post2, shouldActivate, authResponse, userId, tenantId, loginResponse;
1048
-
1049
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
1050
- while (1) {
1051
- switch (_context41.prev = _context41.next) {
1052
- case 0:
1053
- _context41.next = 2;
1054
- return Post("".concat(urls.identity.users.v1, "/signUp"), body);
1055
-
1056
- case 2:
1057
- _yield$Post2 = _context41.sent;
1058
- shouldActivate = _yield$Post2.shouldActivate;
1059
- authResponse = _yield$Post2.authResponse;
1060
- userId = _yield$Post2.userId;
1061
- tenantId = _yield$Post2.tenantId;
1062
-
1063
- if (!(!shouldActivate && authResponse)) {
1064
- _context41.next = 13;
1065
- break;
1066
- }
1067
-
1068
- _context41.next = 10;
1069
- return generateLoginResponse(authResponse);
1070
-
1071
- case 10:
1072
- _context41.t0 = _context41.sent;
1073
- _context41.next = 14;
1074
- break;
33
+ ContextHolder.setAccessToken(loginResponse.accessToken);
34
+ const [me, tenants] = await Promise.all([Get(`${urls.identity.users.v2}/me`), getTenants()]);
35
+ const decodedContent = loginResponse.accessToken ? jwtDecode(loginResponse.accessToken) : {};
1075
36
 
1076
- case 13:
1077
- _context41.t0 = undefined;
37
+ const user = _extends({}, loginResponse, decodedContent, me);
1078
38
 
1079
- case 14:
1080
- loginResponse = _context41.t0;
1081
- return _context41.abrupt("return", {
1082
- shouldActivate: shouldActivate,
1083
- user: loginResponse,
1084
- userId: userId,
1085
- tenantId: tenantId
1086
- });
1087
-
1088
- case 16:
1089
- case "end":
1090
- return _context41.stop();
1091
- }
1092
- }
1093
- }, _callee41);
1094
- }));
1095
- return _signUpUser.apply(this, arguments);
1096
- }
1097
-
1098
- export function getCurrentUserSessions() {
1099
- return _getCurrentUserSessions.apply(this, arguments);
39
+ ContextHolder.setUser(user);
40
+ return {
41
+ user,
42
+ tenants
43
+ };
1100
44
  }
45
+ export async function generateLoginResponseFromOAuthResponse(oauthResponse) {
46
+ ContextHolder.setAccessToken(oauthResponse.id_token);
47
+ const me = await Get(`${urls.identity.users.v2}/me`);
48
+ const decodedContent = oauthResponse.id_token ? jwtDecode(oauthResponse.id_token) : {};
1101
49
 
1102
- function _getCurrentUserSessions() {
1103
- _getCurrentUserSessions = _asyncToGenerator(_regeneratorRuntime.mark(function _callee42() {
1104
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
1105
- while (1) {
1106
- switch (_context42.prev = _context42.next) {
1107
- case 0:
1108
- return _context42.abrupt("return", Get(urls.identity.users.sessions.currentUser.v1));
50
+ const user = _extends({
51
+ mfaRequired: false,
52
+ accessToken: oauthResponse.id_token,
53
+ refreshToken: oauthResponse.refresh_token
54
+ }, decodedContent, me);
1109
55
 
1110
- case 1:
1111
- case "end":
1112
- return _context42.stop();
1113
- }
1114
- }
1115
- }, _callee42);
1116
- }));
1117
- return _getCurrentUserSessions.apply(this, arguments);
56
+ ContextHolder.setUser(user);
57
+ return user;
1118
58
  }
1119
-
1120
- export function getSessionConfigurations() {
1121
- return _getSessionConfigurations.apply(this, arguments);
1122
- }
1123
-
1124
- function _getSessionConfigurations() {
1125
- _getSessionConfigurations = _asyncToGenerator(_regeneratorRuntime.mark(function _callee43() {
1126
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
1127
- while (1) {
1128
- switch (_context43.prev = _context43.next) {
1129
- case 0:
1130
- return _context43.abrupt("return", Get(urls.identity.users.sessions.configurations.v1));
1131
-
1132
- case 1:
1133
- case "end":
1134
- return _context43.stop();
1135
- }
1136
- }
1137
- }, _callee43);
1138
- }));
1139
- return _getSessionConfigurations.apply(this, arguments);
1140
- }
1141
-
1142
- export function createOrUpdateSessionConfigrations(_x28) {
1143
- return _createOrUpdateSessionConfigrations.apply(this, arguments);
1144
- }
1145
-
1146
- function _createOrUpdateSessionConfigrations() {
1147
- _createOrUpdateSessionConfigrations = _asyncToGenerator(_regeneratorRuntime.mark(function _callee44(body) {
1148
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
1149
- while (1) {
1150
- switch (_context44.prev = _context44.next) {
1151
- case 0:
1152
- _context44.next = 2;
1153
- return Post(urls.identity.users.sessions.configurations.v1, body);
1154
-
1155
- case 2:
1156
- case "end":
1157
- return _context44.stop();
1158
- }
1159
- }
1160
- }, _callee44);
1161
- }));
1162
- return _createOrUpdateSessionConfigrations.apply(this, arguments);
1163
- }
1164
-
1165
- export function deleteSessionForUser(_x29) {
1166
- return _deleteSessionForUser.apply(this, arguments);
1167
- }
1168
-
1169
- function _deleteSessionForUser() {
1170
- _deleteSessionForUser = _asyncToGenerator(_regeneratorRuntime.mark(function _callee45(id) {
1171
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
1172
- while (1) {
1173
- switch (_context45.prev = _context45.next) {
1174
- case 0:
1175
- _context45.next = 2;
1176
- return Delete("".concat(urls.identity.users.sessions.currentUser.v1, "/").concat(id));
1177
-
1178
- case 2:
1179
- case "end":
1180
- return _context45.stop();
1181
- }
1182
- }
1183
- }, _callee45);
1184
- }));
1185
- return _deleteSessionForUser.apply(this, arguments);
1186
- }
1187
-
1188
- export function deleteAllSessionsForUser() {
1189
- return _deleteAllSessionsForUser.apply(this, arguments);
1190
- }
1191
-
1192
- function _deleteAllSessionsForUser() {
1193
- _deleteAllSessionsForUser = _asyncToGenerator(_regeneratorRuntime.mark(function _callee46() {
1194
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
1195
- while (1) {
1196
- switch (_context46.prev = _context46.next) {
1197
- case 0:
1198
- _context46.next = 2;
1199
- return Delete("".concat(urls.identity.users.sessions.currentUser.v1, "/all"));
1200
-
1201
- case 2:
1202
- case "end":
1203
- return _context46.stop();
1204
- }
1205
- }
1206
- }, _callee46);
1207
- }));
1208
- return _deleteAllSessionsForUser.apply(this, arguments);
1209
- }
1210
-
1211
- export function getUserApiTokensData() {
1212
- return _getUserApiTokensData.apply(this, arguments);
1213
- }
1214
-
1215
- function _getUserApiTokensData() {
1216
- _getUserApiTokensData = _asyncToGenerator(_regeneratorRuntime.mark(function _callee47() {
1217
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
1218
- while (1) {
1219
- switch (_context47.prev = _context47.next) {
1220
- case 0:
1221
- return _context47.abrupt("return", Get(urls.identity.users.apiTokens.v1));
1222
-
1223
- case 1:
1224
- case "end":
1225
- return _context47.stop();
1226
- }
1227
- }
1228
- }, _callee47);
1229
- }));
1230
- return _getUserApiTokensData.apply(this, arguments);
1231
- }
1232
-
1233
- export function getTenantApiTokensData() {
1234
- return _getTenantApiTokensData.apply(this, arguments);
1235
- }
1236
-
1237
- function _getTenantApiTokensData() {
1238
- _getTenantApiTokensData = _asyncToGenerator(_regeneratorRuntime.mark(function _callee48() {
1239
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
1240
- while (1) {
1241
- switch (_context48.prev = _context48.next) {
1242
- case 0:
1243
- return _context48.abrupt("return", Get(urls.identity.tenants.apiTokens.v1));
1244
-
1245
- case 1:
1246
- case "end":
1247
- return _context48.stop();
1248
- }
1249
- }
1250
- }, _callee48);
1251
- }));
1252
- return _getTenantApiTokensData.apply(this, arguments);
59
+ export async function preLogin(body) {
60
+ try {
61
+ const {
62
+ address
63
+ } = await Post(`${urls.identity.auth.v1}/user/saml/prelogin`, body);
64
+ return address;
65
+ } catch {
66
+ return null;
67
+ }
1253
68
  }
1254
-
1255
- export function updateUserApiTokensData(_x30) {
1256
- return _updateUserApiTokensData.apply(this, arguments);
69
+ export async function preLoginWithIdpType(body) {
70
+ return Post(`${urls.identity.auth.v1}/user/saml/prelogin`, body);
1257
71
  }
1258
-
1259
- function _updateUserApiTokensData() {
1260
- _updateUserApiTokensData = _asyncToGenerator(_regeneratorRuntime.mark(function _callee49(body) {
1261
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
1262
- while (1) {
1263
- switch (_context49.prev = _context49.next) {
1264
- case 0:
1265
- return _context49.abrupt("return", Post(urls.identity.users.apiTokens.v1, body));
1266
-
1267
- case 1:
1268
- case "end":
1269
- return _context49.stop();
1270
- }
1271
- }
1272
- }, _callee49);
1273
- }));
1274
- return _updateUserApiTokensData.apply(this, arguments);
72
+ export async function postLogin(body) {
73
+ const data = await Post(`${urls.identity.auth.v1}/user/saml/postlogin`, body);
74
+ return generateLoginResponse(data);
75
+ }
76
+ export async function oidcPostLogin(body) {
77
+ const data = await Post(`${urls.identity.auth.v1}/user/oidc/postlogin`, body);
78
+ return generateLoginResponse(data);
79
+ }
80
+ export async function login(body) {
81
+ const data = await Post(`${urls.identity.auth.v1}/user`, body);
82
+ return generateLoginResponse(data);
83
+ }
84
+ export async function loginWithMfa(body) {
85
+ const data = await Post(`${urls.identity.auth.v1}/user/mfa/verify`, body);
86
+ return generateLoginResponse(data);
87
+ }
88
+ export async function activateAccount(body) {
89
+ return Post(`${urls.identity.users.v1}/activate`, body);
1275
90
  }
1276
-
1277
- export function updateTenantApiTokensData(_x31) {
1278
- return _updateTenantApiTokensData.apply(this, arguments);
91
+ export async function getActivateAccountStrategy(params) {
92
+ return Get(`${urls.identity.users.v1}/activate/strategy`, params);
1279
93
  }
1280
-
1281
- function _updateTenantApiTokensData() {
1282
- _updateTenantApiTokensData = _asyncToGenerator(_regeneratorRuntime.mark(function _callee50(body) {
1283
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
1284
- while (1) {
1285
- switch (_context50.prev = _context50.next) {
1286
- case 0:
1287
- return _context50.abrupt("return", Post(urls.identity.tenants.apiTokens.v2, body));
1288
-
1289
- case 1:
1290
- case "end":
1291
- return _context50.stop();
1292
- }
1293
- }
1294
- }, _callee50);
1295
- }));
1296
- return _updateTenantApiTokensData.apply(this, arguments);
94
+ export async function resendActivationEmail(body) {
95
+ return Post(`${urls.identity.users.v1}/activate/reset`, body);
1297
96
  }
97
+ export async function acceptInvitation(body) {
98
+ return Post(`${urls.identity.users.v1}/invitation/accept`, body);
99
+ }
100
+ export async function refreshToken() {
101
+ const data = await Post(`${urls.identity.auth.v1}/user/token/refresh`);
102
+ return generateLoginResponse(data);
103
+ }
104
+ export async function refreshTokenV2() {
105
+ const data = await Post(`${urls.identity.auth.v1}/user/token/refresh`);
106
+ return generateLoginResponseV2(data);
107
+ }
108
+ export async function logout() {
109
+ return Post(`${urls.identity.auth.v1}/logout`);
110
+ }
111
+ export async function forgotPassword(body) {
112
+ return Post(`${urls.identity.users.v1}/passwords/reset`, body);
113
+ }
114
+ export async function resetPassword(body) {
115
+ return Post(`${urls.identity.users.v1}/passwords/reset/verify`, body);
116
+ }
117
+ export async function loadPasswordConfig(params) {
118
+ return Get(`${urls.identity.users.v1}/passwords/config`, params);
119
+ }
120
+ export async function recoverMfaToken(body) {
121
+ return Post(`${urls.identity.auth.v1}/user/mfa/recover`, body);
122
+ }
123
+ export async function enrollMfa() {
124
+ return Post(`${urls.identity.users.v1}/mfa/enroll`);
125
+ }
126
+ export async function verifyMfa(body) {
127
+ return Post(`${urls.identity.users.v1}/mfa/enroll/verify`, body);
128
+ }
129
+ export async function disableMfa(body) {
130
+ return Post(`${urls.identity.users.v1}/mfa/disable`, body);
131
+ }
132
+ export async function getSamlConfiguration() {
133
+ return Get(`${urls.team.sso.v1}/saml/configurations`);
134
+ }
135
+ export async function updateSamlConfiguration(body) {
136
+ return Post(`${urls.team.sso.v1}/saml/configurations`, body);
137
+ }
138
+ export async function getSamlVendorConfiguration() {
139
+ return Get(`${urls.team.sso.v1}/saml/configurations/vendor-config`);
140
+ }
141
+ export async function updateSamlVendorMetadata(body) {
142
+ return Put(`${urls.team.sso.v1}/saml/configurations/metadata`, body);
143
+ }
144
+ export async function validateSamlDomain() {
145
+ return Put(`${urls.team.sso.v1}/saml/validations/domain`);
146
+ }
147
+ export async function getSamlRoles() {
148
+ return Get(`${urls.team.sso.v1}/saml/configurations/roles/default`);
149
+ }
150
+ export async function getSamlRolesGroups() {
151
+ return Get(`${urls.team.sso.v2}/saml/configurations/groups`);
152
+ }
153
+ export async function updateSamlRoles({
154
+ roleIds
155
+ }) {
156
+ return Post(`${urls.team.sso.v1}/saml/configurations/roles/default`, {
157
+ roleIds
158
+ });
159
+ }
160
+ export async function createSamlGroup({
161
+ roleIds,
162
+ group
163
+ }) {
164
+ return Post(`${urls.team.sso.v2}/saml/configurations/groups`, {
165
+ group,
166
+ roleIds
167
+ });
168
+ }
169
+ export async function updateSamlGroup({
170
+ roleIds,
171
+ group,
172
+ id
173
+ }) {
174
+ return Patch(`${urls.team.sso.v2}/saml/configurations/groups/${id}`, {
175
+ group,
176
+ roleIds
177
+ });
178
+ }
179
+ export async function deleteSamlGroup({
180
+ id
181
+ }) {
182
+ return Delete(`${urls.team.sso.v2}/saml/configurations/groups/${id}`);
183
+ }
184
+ export async function getOidcConfiguration() {
185
+ return Get(`${urls.team.sso.v1}/oidc/configurations`);
186
+ }
187
+ export async function getSSOPublicConfiguration() {
188
+ return Get(`${urls.team.sso.v2}/configurations/public`);
189
+ }
190
+ export async function getSocialLoginProviders() {
191
+ return Get(urls.identity.sso.v1);
192
+ }
193
+ export async function getSocialLoginProvidersV2() {
194
+ return Get(urls.identity.sso.v2);
195
+ }
196
+ export async function loginViaSocialLogin({
197
+ provider,
198
+ code,
199
+ redirectUri,
200
+ codeVerifier,
201
+ metadata,
202
+ invitationToken,
203
+ state
204
+ }) {
205
+ const params = {
206
+ code
207
+ };
208
+
209
+ if (redirectUri) {
210
+ params.redirectUri = redirectUri;
211
+ }
212
+
213
+ if (codeVerifier) {
214
+ params.code_verifier = codeVerifier;
215
+ }
216
+
217
+ if (state) {
218
+ params.state = state;
219
+ }
220
+
221
+ return Post(`${urls.identity.auth.v1}/user/sso/${provider}/postlogin`, {
222
+ metadata,
223
+ invitationToken
224
+ }, {
225
+ params
226
+ });
227
+ }
228
+ export async function getVendorConfig() {
229
+ return Get(`${urls.identity.configurations.v1}/public`);
230
+ }
231
+ export async function signUpUser(body) {
232
+ const {
233
+ shouldActivate,
234
+ authResponse,
235
+ userId,
236
+ tenantId
237
+ } = await Post(`${urls.identity.users.v1}/signUp`, body);
238
+ const loginResponse = !shouldActivate && authResponse ? await generateLoginResponse(authResponse) : undefined;
239
+ return {
240
+ shouldActivate,
241
+ user: loginResponse,
242
+ userId,
243
+ tenantId
244
+ };
245
+ }
246
+ export async function getCurrentUserSessions() {
247
+ return Get(urls.identity.users.sessions.currentUser.v1);
248
+ }
249
+ export async function getCurrentUserSession() {
250
+ return Get(`${urls.identity.users.sessions.currentUser.v1}/current`);
251
+ }
252
+ export async function getSessionConfigurations() {
253
+ return Get(urls.identity.users.sessions.configurations.v1);
254
+ }
255
+ export async function createOrUpdateSessionConfigrations(body) {
256
+ await Post(urls.identity.users.sessions.configurations.v1, body);
257
+ }
258
+ export async function deleteSessionForUser(id) {
259
+ await Delete(`${urls.identity.users.sessions.currentUser.v1}/${id}`);
260
+ }
261
+ export async function deleteAllSessionsForUser() {
262
+ await Delete(`${urls.identity.users.sessions.currentUser.v1}/all`);
263
+ }
264
+ export async function getUserApiTokensData() {
265
+ return Get(urls.identity.users.apiTokens.v1);
266
+ }
267
+ export async function getTenantApiTokensData() {
268
+ return Get(urls.identity.tenants.apiTokens.v1);
269
+ }
270
+ export async function updateUserApiTokensData(body) {
271
+ return Post(urls.identity.users.apiTokens.v1, body);
272
+ }
273
+ export async function updateTenantApiTokensData(body) {
274
+ return Post(urls.identity.tenants.apiTokens.v2, body);
275
+ }
276
+ export async function deleteTenantApiToken({
277
+ tokenId
278
+ }) {
279
+ return Delete(`${urls.identity.tenants.apiTokens.v1}/${tokenId}`);
280
+ }
281
+ export async function deleteUserApiToken({
282
+ tokenId
283
+ }) {
284
+ return Delete(`${urls.identity.users.apiTokens.v1}/${tokenId}`);
285
+ }
286
+ export async function getUserById({
287
+ userId
288
+ }) {
289
+ return Get(`${urls.identity.users.v1}/${userId}`);
290
+ }
291
+ export async function checkIfAllowToRememberMfaDevice(mfaToken) {
292
+ return Get(`${urls.identity.configurations.v1}/mfa-policy/allow-remember-device`, {
293
+ mfaToken
294
+ });
295
+ }
296
+ export async function passwordlessPreLogin(_ref) {
297
+ let {
298
+ type
299
+ } = _ref,
300
+ body = _objectWithoutPropertiesLoose(_ref, _excluded);
1298
301
 
1299
- export function deleteTenantApiToken(_x32) {
1300
- return _deleteTenantApiToken.apply(this, arguments);
302
+ return Post(`${urls.identity.auth.v1}/passwordless/${type.toLocaleLowerCase()}/prelogin`, body);
1301
303
  }
304
+ export async function passwordlessPostLogin(_ref2) {
305
+ let {
306
+ type
307
+ } = _ref2,
308
+ body = _objectWithoutPropertiesLoose(_ref2, _excluded2);
1302
309
 
1303
- function _deleteTenantApiToken() {
1304
- _deleteTenantApiToken = _asyncToGenerator(_regeneratorRuntime.mark(function _callee51(_ref6) {
1305
- var tokenId;
1306
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
1307
- while (1) {
1308
- switch (_context51.prev = _context51.next) {
1309
- case 0:
1310
- tokenId = _ref6.tokenId;
1311
- return _context51.abrupt("return", Delete("".concat(urls.identity.tenants.apiTokens.v1, "/").concat(tokenId)));
1312
-
1313
- case 2:
1314
- case "end":
1315
- return _context51.stop();
1316
- }
1317
- }
1318
- }, _callee51);
1319
- }));
1320
- return _deleteTenantApiToken.apply(this, arguments);
310
+ return Post(`${urls.identity.auth.v1}/passwordless/${type.toLocaleLowerCase()}/postlogin`, body);
1321
311
  }
1322
-
1323
- export function deleteUserApiToken(_x33) {
1324
- return _deleteUserApiToken.apply(this, arguments);
312
+ export async function verifyInviteToken({
313
+ token
314
+ }) {
315
+ return Post(urls.identity.tenants.invites.verify.v1, {
316
+ token
317
+ });
1325
318
  }
1326
-
1327
- function _deleteUserApiToken() {
1328
- _deleteUserApiToken = _asyncToGenerator(_regeneratorRuntime.mark(function _callee52(_ref7) {
1329
- var tokenId;
1330
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
1331
- while (1) {
1332
- switch (_context52.prev = _context52.next) {
1333
- case 0:
1334
- tokenId = _ref7.tokenId;
1335
- return _context52.abrupt("return", Delete("".concat(urls.identity.users.apiTokens.v1, "/").concat(tokenId)));
1336
-
1337
- case 2:
1338
- case "end":
1339
- return _context52.stop();
1340
- }
1341
- }
1342
- }, _callee52);
1343
- }));
1344
- return _deleteUserApiToken.apply(this, arguments);
319
+ export async function getSSOConfigurations() {
320
+ return Get(`${urls.team.sso.v1}/configurations`);
1345
321
  }
1346
-
1347
- export function getUserById(_x34) {
1348
- return _getUserById.apply(this, arguments);
322
+ export async function createSSOConfiguration(body) {
323
+ return Post(`${urls.team.sso.v1}/configurations`, body);
1349
324
  }
1350
-
1351
- function _getUserById() {
1352
- _getUserById = _asyncToGenerator(_regeneratorRuntime.mark(function _callee53(_ref8) {
1353
- var userId;
1354
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
1355
- while (1) {
1356
- switch (_context53.prev = _context53.next) {
1357
- case 0:
1358
- userId = _ref8.userId;
1359
- return _context53.abrupt("return", Get("".concat(urls.identity.users.v1, "/").concat(userId)));
1360
-
1361
- case 2:
1362
- case "end":
1363
- return _context53.stop();
1364
- }
1365
- }
1366
- }, _callee53);
1367
- }));
1368
- return _getUserById.apply(this, arguments);
325
+ export async function updateSSOConfiguration(ssoConfigId, body) {
326
+ return Patch(`${urls.team.sso.v1}/configurations/${ssoConfigId}`, body);
1369
327
  }
1370
-
1371
- export function checkIfAllowToRememberMfaDevice(_x35) {
1372
- return _checkIfAllowToRememberMfaDevice.apply(this, arguments);
328
+ export async function deleteSSOConfiguration(ssoConfigId) {
329
+ return Delete(`${urls.team.sso.v1}/configurations/${ssoConfigId}`);
1373
330
  }
1374
-
1375
- function _checkIfAllowToRememberMfaDevice() {
1376
- _checkIfAllowToRememberMfaDevice = _asyncToGenerator(_regeneratorRuntime.mark(function _callee54(mfaToken) {
1377
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
1378
- while (1) {
1379
- switch (_context54.prev = _context54.next) {
1380
- case 0:
1381
- return _context54.abrupt("return", Get("".concat(urls.identity.configurations.v1, "/mfa-policy/allow-remember-device"), {
1382
- mfaToken: mfaToken
1383
- }));
1384
-
1385
- case 1:
1386
- case "end":
1387
- return _context54.stop();
1388
- }
1389
- }
1390
- }, _callee54);
1391
- }));
1392
- return _checkIfAllowToRememberMfaDevice.apply(this, arguments);
331
+ export async function createSSOConfigurationByMetadata(body) {
332
+ return Post(`${urls.team.sso.v1}/configurations/metadata`, body);
1393
333
  }
1394
-
1395
- export function passwordlessPreLogin(_x36) {
1396
- return _passwordlessPreLogin.apply(this, arguments);
334
+ export async function updateSSOConfigurationByMetadata(ssoConfigId, body) {
335
+ return Put(`${urls.team.sso.v1}/configurations/${ssoConfigId}/metadata`, body);
1397
336
  }
1398
-
1399
- function _passwordlessPreLogin() {
1400
- _passwordlessPreLogin = _asyncToGenerator(_regeneratorRuntime.mark(function _callee55(_ref9) {
1401
- var type, body;
1402
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
1403
- while (1) {
1404
- switch (_context55.prev = _context55.next) {
1405
- case 0:
1406
- type = _ref9.type, body = _objectWithoutProperties(_ref9, ["type"]);
1407
- return _context55.abrupt("return", Post("".concat(urls.identity.auth.v1, "/passwordless/").concat(type.toLocaleLowerCase(), "/prelogin"), body));
1408
-
1409
- case 2:
1410
- case "end":
1411
- return _context55.stop();
1412
- }
1413
- }
1414
- }, _callee55);
1415
- }));
1416
- return _passwordlessPreLogin.apply(this, arguments);
337
+ export async function createSSODomain(ssoConfigId, body) {
338
+ return Post(`${urls.team.sso.v1}/configurations/${ssoConfigId}/domains`, body);
1417
339
  }
1418
-
1419
- export function passwordlessPostLogin(_x37) {
1420
- return _passwordlessPostLogin.apply(this, arguments);
340
+ export async function deleteSSODomain(ssoConfigId, domainId) {
341
+ return Delete(`${urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}`);
1421
342
  }
1422
-
1423
- function _passwordlessPostLogin() {
1424
- _passwordlessPostLogin = _asyncToGenerator(_regeneratorRuntime.mark(function _callee56(_ref10) {
1425
- var type, body;
1426
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
1427
- while (1) {
1428
- switch (_context56.prev = _context56.next) {
1429
- case 0:
1430
- type = _ref10.type, body = _objectWithoutProperties(_ref10, ["type"]);
1431
- return _context56.abrupt("return", Post("".concat(urls.identity.auth.v1, "/passwordless/").concat(type.toLocaleLowerCase(), "/postlogin"), body));
1432
-
1433
- case 2:
1434
- case "end":
1435
- return _context56.stop();
1436
- }
1437
- }
1438
- }, _callee56);
1439
- }));
1440
- return _passwordlessPostLogin.apply(this, arguments);
343
+ export async function validateSSODomain(ssoConfigId, domainId) {
344
+ return Put(`${urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
1441
345
  }
1442
-
1443
- export function verifyInviteToken(_x38) {
1444
- return _verifyInviteToken.apply(this, arguments);
346
+ export async function getSSODefaultRoles(ssoConfigId) {
347
+ return Get(`${urls.team.sso.v1}/configurations/${ssoConfigId}/roles`);
1445
348
  }
1446
-
1447
- function _verifyInviteToken() {
1448
- _verifyInviteToken = _asyncToGenerator(_regeneratorRuntime.mark(function _callee57(_ref11) {
1449
- var token;
1450
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
1451
- while (1) {
1452
- switch (_context57.prev = _context57.next) {
1453
- case 0:
1454
- token = _ref11.token;
1455
- return _context57.abrupt("return", Post(urls.identity.tenants.invites.verify.v1, {
1456
- token: token
1457
- }));
1458
-
1459
- case 2:
1460
- case "end":
1461
- return _context57.stop();
1462
- }
1463
- }
1464
- }, _callee57);
1465
- }));
1466
- return _verifyInviteToken.apply(this, arguments);
349
+ export async function setSSODefaultRoles(ssoConfigId, body) {
350
+ return Put(`${urls.team.sso.v1}/configurations/${ssoConfigId}/roles`, body);
1467
351
  }
1468
-
1469
- export function getSSOConfigurations() {
1470
- return _getSSOConfigurations.apply(this, arguments);
352
+ export async function createSSOGroup(ssoConfigId, body) {
353
+ return Post(`${urls.team.sso.v1}/configurations/${ssoConfigId}/groups`, body);
1471
354
  }
1472
-
1473
- function _getSSOConfigurations() {
1474
- _getSSOConfigurations = _asyncToGenerator(_regeneratorRuntime.mark(function _callee58() {
1475
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
1476
- while (1) {
1477
- switch (_context58.prev = _context58.next) {
1478
- case 0:
1479
- return _context58.abrupt("return", Get("".concat(urls.team.sso.v1, "/configurations")));
1480
-
1481
- case 1:
1482
- case "end":
1483
- return _context58.stop();
1484
- }
1485
- }
1486
- }, _callee58);
1487
- }));
1488
- return _getSSOConfigurations.apply(this, arguments);
355
+ export async function updateSSOGroup(ssoConfigId, {
356
+ roleIds,
357
+ group,
358
+ id
359
+ }) {
360
+ return Patch(`${urls.team.sso.v1}/configurations/${ssoConfigId}/groups/${id}`, {
361
+ group,
362
+ roleIds
363
+ });
1489
364
  }
1490
-
1491
- export function createSSOConfiguration(_x39) {
1492
- return _createSSOConfiguration.apply(this, arguments);
365
+ export async function deleteSSOGroup(ssoConfigId, groupId) {
366
+ return Delete(`${urls.team.sso.v1}/configurations/${ssoConfigId}/groups/${groupId}`);
1493
367
  }
1494
-
1495
- function _createSSOConfiguration() {
1496
- _createSSOConfiguration = _asyncToGenerator(_regeneratorRuntime.mark(function _callee59(body) {
1497
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
1498
- while (1) {
1499
- switch (_context59.prev = _context59.next) {
1500
- case 0:
1501
- return _context59.abrupt("return", Post("".concat(urls.team.sso.v1, "/configurations"), body));
1502
-
1503
- case 1:
1504
- case "end":
1505
- return _context59.stop();
1506
- }
1507
- }
1508
- }, _callee59);
1509
- }));
1510
- return _createSSOConfiguration.apply(this, arguments);
368
+ export async function getSSOGroups(ssoConfigId) {
369
+ return Get(`${urls.team.sso.v1}/configurations/${ssoConfigId}/groups`);
1511
370
  }
1512
-
1513
- export function updateSSOConfiguration(_x40, _x41) {
1514
- return _updateSSOConfiguration.apply(this, arguments);
371
+ export async function preLoginV2(body) {
372
+ return Post(`${urls.identity.auth.v2}/user/sso/prelogin`, body);
1515
373
  }
1516
-
1517
- function _updateSSOConfiguration() {
1518
- _updateSSOConfiguration = _asyncToGenerator(_regeneratorRuntime.mark(function _callee60(ssoConfigId, body) {
1519
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
1520
- while (1) {
1521
- switch (_context60.prev = _context60.next) {
1522
- case 0:
1523
- return _context60.abrupt("return", Patch("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId), body));
1524
-
1525
- case 1:
1526
- case "end":
1527
- return _context60.stop();
1528
- }
1529
- }
1530
- }, _callee60);
1531
- }));
1532
- return _updateSSOConfiguration.apply(this, arguments);
374
+ export async function oidcPostLoginV2(body) {
375
+ const data = await Post(`${urls.identity.auth.v2}/user/oidc/postlogin`, body);
376
+ return generateLoginResponse(data);
1533
377
  }
1534
-
1535
- export function deleteSSOConfiguration(_x42) {
1536
- return _deleteSSOConfiguration.apply(this, arguments);
378
+ export async function exchangeOAuthTokens(body) {
379
+ const data = await Post(`${urls.oauth.v1}/token`, body);
380
+ return generateLoginResponseFromOAuthResponse(data);
1537
381
  }
1538
-
1539
- function _deleteSSOConfiguration() {
1540
- _deleteSSOConfiguration = _asyncToGenerator(_regeneratorRuntime.mark(function _callee61(ssoConfigId) {
1541
- return _regeneratorRuntime.wrap(function _callee61$(_context61) {
1542
- while (1) {
1543
- switch (_context61.prev = _context61.next) {
1544
- case 0:
1545
- return _context61.abrupt("return", Delete("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId)));
1546
-
1547
- case 1:
1548
- case "end":
1549
- return _context61.stop();
1550
- }
1551
- }
1552
- }, _callee61);
1553
- }));
1554
- return _deleteSSOConfiguration.apply(this, arguments);
382
+ export async function resetPhoneNumber(body) {
383
+ return Post(`${urls.identity.users.v1}/phone/reset`, body);
1555
384
  }
1556
-
1557
- export function createSSOConfigurationByMetadata(_x43) {
1558
- return _createSSOConfigurationByMetadata.apply(this, arguments);
385
+ export async function verifyResetPhoneNumber(body) {
386
+ return Post(`${urls.identity.users.v1}/phone/reset/verify`, body);
1559
387
  }
1560
-
1561
- function _createSSOConfigurationByMetadata() {
1562
- _createSSOConfigurationByMetadata = _asyncToGenerator(_regeneratorRuntime.mark(function _callee62(body) {
1563
- return _regeneratorRuntime.wrap(function _callee62$(_context62) {
1564
- while (1) {
1565
- switch (_context62.prev = _context62.next) {
1566
- case 0:
1567
- return _context62.abrupt("return", Post("".concat(urls.team.sso.v1, "/configurations/metadata"), body));
1568
-
1569
- case 1:
1570
- case "end":
1571
- return _context62.stop();
1572
- }
1573
- }
1574
- }, _callee62);
1575
- }));
1576
- return _createSSOConfigurationByMetadata.apply(this, arguments);
388
+ export async function changePhoneNumberWithVerification(body) {
389
+ return Post(`${urls.identity.users.v1}/phone`, body);
1577
390
  }
1578
-
1579
- export function updateSSOConfigurationByMetadata(_x44, _x45) {
1580
- return _updateSSOConfigurationByMetadata.apply(this, arguments);
391
+ export async function verifyChangePhoneNumber(body) {
392
+ return Post(`${urls.identity.users.v1}/phone/verify`, body);
1581
393
  }
1582
-
1583
- function _updateSSOConfigurationByMetadata() {
1584
- _updateSSOConfigurationByMetadata = _asyncToGenerator(_regeneratorRuntime.mark(function _callee63(ssoConfigId, body) {
1585
- return _regeneratorRuntime.wrap(function _callee63$(_context63) {
1586
- while (1) {
1587
- switch (_context63.prev = _context63.next) {
1588
- case 0:
1589
- return _context63.abrupt("return", Put("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/metadata"), body));
1590
-
1591
- case 1:
1592
- case "end":
1593
- return _context63.stop();
1594
- }
1595
- }
1596
- }, _callee63);
1597
- }));
1598
- return _updateSSOConfigurationByMetadata.apply(this, arguments);
394
+ export async function changePhoneNumber(body) {
395
+ return Put(`${urls.identity.users.v1}/phone/change`, body);
1599
396
  }
1600
-
1601
- export function createSSODomain(_x46, _x47) {
1602
- return _createSSODomain.apply(this, arguments);
397
+ export async function webAuthnPreLogin(body) {
398
+ return Post(`${urls.identity.auth.v1}/webauthn/prelogin`, body);
1603
399
  }
1604
-
1605
- function _createSSODomain() {
1606
- _createSSODomain = _asyncToGenerator(_regeneratorRuntime.mark(function _callee64(ssoConfigId, body) {
1607
- return _regeneratorRuntime.wrap(function _callee64$(_context64) {
1608
- while (1) {
1609
- switch (_context64.prev = _context64.next) {
1610
- case 0:
1611
- return _context64.abrupt("return", Post("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/domains"), body));
1612
-
1613
- case 1:
1614
- case "end":
1615
- return _context64.stop();
1616
- }
1617
- }
1618
- }, _callee64);
1619
- }));
1620
- return _createSSODomain.apply(this, arguments);
400
+ export async function webAuthnPostLogin(body) {
401
+ return Post(`${urls.identity.auth.v1}/webauthn/postlogin`, body);
1621
402
  }
1622
-
1623
- export function deleteSSODomain(_x48, _x49) {
1624
- return _deleteSSODomain.apply(this, arguments);
403
+ export async function webAuthnCreateNewDeviceSession() {
404
+ return Post(urls.identity.webAuthnDevices.v1);
1625
405
  }
1626
-
1627
- function _deleteSSODomain() {
1628
- _deleteSSODomain = _asyncToGenerator(_regeneratorRuntime.mark(function _callee65(ssoConfigId, domainId) {
1629
- return _regeneratorRuntime.wrap(function _callee65$(_context65) {
1630
- while (1) {
1631
- switch (_context65.prev = _context65.next) {
1632
- case 0:
1633
- return _context65.abrupt("return", Delete("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/domains/").concat(domainId)));
1634
-
1635
- case 1:
1636
- case "end":
1637
- return _context65.stop();
1638
- }
1639
- }
1640
- }, _callee65);
1641
- }));
1642
- return _deleteSSODomain.apply(this, arguments);
406
+ export async function verifyNewDeviceSession(body) {
407
+ return Post(`${urls.identity.webAuthnDevices.v1}/verify`, body);
1643
408
  }
1644
-
1645
- export function validateSSODomain(_x50, _x51) {
1646
- return _validateSSODomain.apply(this, arguments);
409
+ export async function getVendorPublicAuthStrategiesConfig() {
410
+ return Get(`${urls.identity.configurations.v1}/auth/strategies/public`);
1647
411
  }
1648
-
1649
- function _validateSSODomain() {
1650
- _validateSSODomain = _asyncToGenerator(_regeneratorRuntime.mark(function _callee66(ssoConfigId, domainId) {
1651
- return _regeneratorRuntime.wrap(function _callee66$(_context66) {
1652
- while (1) {
1653
- switch (_context66.prev = _context66.next) {
1654
- case 0:
1655
- return _context66.abrupt("return", Put("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/domains/").concat(domainId, "/validate")));
1656
-
1657
- case 1:
1658
- case "end":
1659
- return _context66.stop();
1660
- }
1661
- }
1662
- }, _callee66);
1663
- }));
1664
- return _validateSSODomain.apply(this, arguments);
1665
- }
1666
-
1667
- export function getSSODefaultRoles(_x52) {
1668
- return _getSSODefaultRoles.apply(this, arguments);
1669
- }
1670
-
1671
- function _getSSODefaultRoles() {
1672
- _getSSODefaultRoles = _asyncToGenerator(_regeneratorRuntime.mark(function _callee67(ssoConfigId) {
1673
- return _regeneratorRuntime.wrap(function _callee67$(_context67) {
1674
- while (1) {
1675
- switch (_context67.prev = _context67.next) {
1676
- case 0:
1677
- return _context67.abrupt("return", Get("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/roles")));
1678
-
1679
- case 1:
1680
- case "end":
1681
- return _context67.stop();
1682
- }
1683
- }
1684
- }, _callee67);
1685
- }));
1686
- return _getSSODefaultRoles.apply(this, arguments);
1687
- }
1688
-
1689
- export function setSSODefaultRoles(_x53, _x54) {
1690
- return _setSSODefaultRoles.apply(this, arguments);
1691
- }
1692
-
1693
- function _setSSODefaultRoles() {
1694
- _setSSODefaultRoles = _asyncToGenerator(_regeneratorRuntime.mark(function _callee68(ssoConfigId, body) {
1695
- return _regeneratorRuntime.wrap(function _callee68$(_context68) {
1696
- while (1) {
1697
- switch (_context68.prev = _context68.next) {
1698
- case 0:
1699
- return _context68.abrupt("return", Put("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/roles"), body));
1700
-
1701
- case 1:
1702
- case "end":
1703
- return _context68.stop();
1704
- }
1705
- }
1706
- }, _callee68);
1707
- }));
1708
- return _setSSODefaultRoles.apply(this, arguments);
1709
- }
1710
-
1711
- export function createSSOGroup(_x55, _x56) {
1712
- return _createSSOGroup.apply(this, arguments);
1713
- }
1714
-
1715
- function _createSSOGroup() {
1716
- _createSSOGroup = _asyncToGenerator(_regeneratorRuntime.mark(function _callee69(ssoConfigId, body) {
1717
- return _regeneratorRuntime.wrap(function _callee69$(_context69) {
1718
- while (1) {
1719
- switch (_context69.prev = _context69.next) {
1720
- case 0:
1721
- return _context69.abrupt("return", Post("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/groups"), body));
1722
-
1723
- case 1:
1724
- case "end":
1725
- return _context69.stop();
1726
- }
1727
- }
1728
- }, _callee69);
1729
- }));
1730
- return _createSSOGroup.apply(this, arguments);
1731
- }
1732
-
1733
- export function updateSSOGroup(_x57, _x58) {
1734
- return _updateSSOGroup.apply(this, arguments);
1735
- }
1736
-
1737
- function _updateSSOGroup() {
1738
- _updateSSOGroup = _asyncToGenerator(_regeneratorRuntime.mark(function _callee70(ssoConfigId, _ref12) {
1739
- var roleIds, group, id;
1740
- return _regeneratorRuntime.wrap(function _callee70$(_context70) {
1741
- while (1) {
1742
- switch (_context70.prev = _context70.next) {
1743
- case 0:
1744
- roleIds = _ref12.roleIds, group = _ref12.group, id = _ref12.id;
1745
- return _context70.abrupt("return", Patch("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/groups/").concat(id), {
1746
- group: group,
1747
- roleIds: roleIds
1748
- }));
1749
-
1750
- case 2:
1751
- case "end":
1752
- return _context70.stop();
1753
- }
1754
- }
1755
- }, _callee70);
1756
- }));
1757
- return _updateSSOGroup.apply(this, arguments);
1758
- }
1759
-
1760
- export function deleteSSOGroup(_x59, _x60) {
1761
- return _deleteSSOGroup.apply(this, arguments);
1762
- }
1763
-
1764
- function _deleteSSOGroup() {
1765
- _deleteSSOGroup = _asyncToGenerator(_regeneratorRuntime.mark(function _callee71(ssoConfigId, groupId) {
1766
- return _regeneratorRuntime.wrap(function _callee71$(_context71) {
1767
- while (1) {
1768
- switch (_context71.prev = _context71.next) {
1769
- case 0:
1770
- return _context71.abrupt("return", Delete("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/groups/").concat(groupId)));
1771
-
1772
- case 1:
1773
- case "end":
1774
- return _context71.stop();
1775
- }
1776
- }
1777
- }, _callee71);
1778
- }));
1779
- return _deleteSSOGroup.apply(this, arguments);
1780
- }
1781
-
1782
- export function getSSOGroups(_x61) {
1783
- return _getSSOGroups.apply(this, arguments);
1784
- }
1785
-
1786
- function _getSSOGroups() {
1787
- _getSSOGroups = _asyncToGenerator(_regeneratorRuntime.mark(function _callee72(ssoConfigId) {
1788
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
1789
- while (1) {
1790
- switch (_context72.prev = _context72.next) {
1791
- case 0:
1792
- return _context72.abrupt("return", Get("".concat(urls.team.sso.v1, "/configurations/").concat(ssoConfigId, "/groups")));
1793
-
1794
- case 1:
1795
- case "end":
1796
- return _context72.stop();
1797
- }
1798
- }
1799
- }, _callee72);
1800
- }));
1801
- return _getSSOGroups.apply(this, arguments);
1802
- }
1803
-
1804
- export function preLoginV2(_x62) {
1805
- return _preLoginV.apply(this, arguments);
1806
- }
1807
-
1808
- function _preLoginV() {
1809
- _preLoginV = _asyncToGenerator(_regeneratorRuntime.mark(function _callee73(body) {
1810
- return _regeneratorRuntime.wrap(function _callee73$(_context73) {
1811
- while (1) {
1812
- switch (_context73.prev = _context73.next) {
1813
- case 0:
1814
- return _context73.abrupt("return", Post("".concat(urls.identity.auth.v2, "/user/sso/prelogin"), body));
1815
-
1816
- case 1:
1817
- case "end":
1818
- return _context73.stop();
1819
- }
1820
- }
1821
- }, _callee73);
1822
- }));
1823
- return _preLoginV.apply(this, arguments);
1824
- }
1825
-
1826
- export function oidcPostLoginV2(_x63) {
1827
- return _oidcPostLoginV.apply(this, arguments);
1828
- }
1829
-
1830
- function _oidcPostLoginV() {
1831
- _oidcPostLoginV = _asyncToGenerator(_regeneratorRuntime.mark(function _callee74(body) {
1832
- var data;
1833
- return _regeneratorRuntime.wrap(function _callee74$(_context74) {
1834
- while (1) {
1835
- switch (_context74.prev = _context74.next) {
1836
- case 0:
1837
- _context74.next = 2;
1838
- return Post("".concat(urls.identity.auth.v2, "/user/oidc/postlogin"), body);
1839
-
1840
- case 2:
1841
- data = _context74.sent;
1842
- return _context74.abrupt("return", generateLoginResponse(data));
1843
-
1844
- case 4:
1845
- case "end":
1846
- return _context74.stop();
1847
- }
1848
- }
1849
- }, _callee74);
1850
- }));
1851
- return _oidcPostLoginV.apply(this, arguments);
1852
- }
1853
-
1854
- export function exchangeOAuthTokens(_x64) {
1855
- return _exchangeOAuthTokens.apply(this, arguments);
1856
- }
1857
-
1858
- function _exchangeOAuthTokens() {
1859
- _exchangeOAuthTokens = _asyncToGenerator(_regeneratorRuntime.mark(function _callee75(body) {
1860
- var data;
1861
- return _regeneratorRuntime.wrap(function _callee75$(_context75) {
1862
- while (1) {
1863
- switch (_context75.prev = _context75.next) {
1864
- case 0:
1865
- _context75.next = 2;
1866
- return Post("".concat(urls.oauth.v1, "/token"), body);
1867
-
1868
- case 2:
1869
- data = _context75.sent;
1870
- return _context75.abrupt("return", generateLoginResponseFromOAuthResponse(data));
1871
-
1872
- case 4:
1873
- case "end":
1874
- return _context75.stop();
1875
- }
1876
- }
1877
- }, _callee75);
1878
- }));
1879
- return _exchangeOAuthTokens.apply(this, arguments);
1880
- }
1881
-
1882
- export function resetPhoneNumber(_x65) {
1883
- return _resetPhoneNumber.apply(this, arguments);
1884
- }
1885
-
1886
- function _resetPhoneNumber() {
1887
- _resetPhoneNumber = _asyncToGenerator(_regeneratorRuntime.mark(function _callee76(body) {
1888
- return _regeneratorRuntime.wrap(function _callee76$(_context76) {
1889
- while (1) {
1890
- switch (_context76.prev = _context76.next) {
1891
- case 0:
1892
- return _context76.abrupt("return", Post("".concat(urls.identity.users.v1, "/phone/reset"), body));
1893
-
1894
- case 1:
1895
- case "end":
1896
- return _context76.stop();
1897
- }
1898
- }
1899
- }, _callee76);
1900
- }));
1901
- return _resetPhoneNumber.apply(this, arguments);
1902
- }
1903
-
1904
- export function verifyResetPhoneNumber(_x66) {
1905
- return _verifyResetPhoneNumber.apply(this, arguments);
1906
- }
1907
-
1908
- function _verifyResetPhoneNumber() {
1909
- _verifyResetPhoneNumber = _asyncToGenerator(_regeneratorRuntime.mark(function _callee77(body) {
1910
- return _regeneratorRuntime.wrap(function _callee77$(_context77) {
1911
- while (1) {
1912
- switch (_context77.prev = _context77.next) {
1913
- case 0:
1914
- return _context77.abrupt("return", Post("".concat(urls.identity.users.v1, "/phone/reset/verify"), body));
1915
-
1916
- case 1:
1917
- case "end":
1918
- return _context77.stop();
1919
- }
1920
- }
1921
- }, _callee77);
1922
- }));
1923
- return _verifyResetPhoneNumber.apply(this, arguments);
1924
- }
1925
-
1926
- export function changePhoneNumberWithVerification(_x67) {
1927
- return _changePhoneNumberWithVerification.apply(this, arguments);
1928
- }
1929
-
1930
- function _changePhoneNumberWithVerification() {
1931
- _changePhoneNumberWithVerification = _asyncToGenerator(_regeneratorRuntime.mark(function _callee78(body) {
1932
- return _regeneratorRuntime.wrap(function _callee78$(_context78) {
1933
- while (1) {
1934
- switch (_context78.prev = _context78.next) {
1935
- case 0:
1936
- return _context78.abrupt("return", Post("".concat(urls.identity.users.v1, "/phone"), body));
1937
-
1938
- case 1:
1939
- case "end":
1940
- return _context78.stop();
1941
- }
1942
- }
1943
- }, _callee78);
1944
- }));
1945
- return _changePhoneNumberWithVerification.apply(this, arguments);
1946
- }
1947
-
1948
- export function verifyChangePhoneNumber(_x68) {
1949
- return _verifyChangePhoneNumber.apply(this, arguments);
1950
- }
1951
-
1952
- function _verifyChangePhoneNumber() {
1953
- _verifyChangePhoneNumber = _asyncToGenerator(_regeneratorRuntime.mark(function _callee79(body) {
1954
- return _regeneratorRuntime.wrap(function _callee79$(_context79) {
1955
- while (1) {
1956
- switch (_context79.prev = _context79.next) {
1957
- case 0:
1958
- return _context79.abrupt("return", Post("".concat(urls.identity.users.v1, "/phone/verify"), body));
1959
-
1960
- case 1:
1961
- case "end":
1962
- return _context79.stop();
1963
- }
1964
- }
1965
- }, _callee79);
1966
- }));
1967
- return _verifyChangePhoneNumber.apply(this, arguments);
1968
- }
1969
-
1970
- export function changePhoneNumber(_x69) {
1971
- return _changePhoneNumber.apply(this, arguments);
1972
- }
1973
-
1974
- function _changePhoneNumber() {
1975
- _changePhoneNumber = _asyncToGenerator(_regeneratorRuntime.mark(function _callee80(body) {
1976
- return _regeneratorRuntime.wrap(function _callee80$(_context80) {
1977
- while (1) {
1978
- switch (_context80.prev = _context80.next) {
1979
- case 0:
1980
- return _context80.abrupt("return", Put("".concat(urls.identity.users.v1, "/phone/change"), body));
1981
-
1982
- case 1:
1983
- case "end":
1984
- return _context80.stop();
1985
- }
1986
- }
1987
- }, _callee80);
1988
- }));
1989
- return _changePhoneNumber.apply(this, arguments);
1990
- }
1991
-
1992
- export function webAuthnPreLogin(_x70) {
1993
- return _webAuthnPreLogin.apply(this, arguments);
1994
- }
1995
-
1996
- function _webAuthnPreLogin() {
1997
- _webAuthnPreLogin = _asyncToGenerator(_regeneratorRuntime.mark(function _callee81(body) {
1998
- return _regeneratorRuntime.wrap(function _callee81$(_context81) {
1999
- while (1) {
2000
- switch (_context81.prev = _context81.next) {
2001
- case 0:
2002
- return _context81.abrupt("return", Post("".concat(urls.identity.auth.v1, "/webauthn/prelogin"), body));
2003
-
2004
- case 1:
2005
- case "end":
2006
- return _context81.stop();
2007
- }
2008
- }
2009
- }, _callee81);
2010
- }));
2011
- return _webAuthnPreLogin.apply(this, arguments);
2012
- }
2013
-
2014
- export function webAuthnPostLogin(_x71) {
2015
- return _webAuthnPostLogin.apply(this, arguments);
2016
- }
2017
-
2018
- function _webAuthnPostLogin() {
2019
- _webAuthnPostLogin = _asyncToGenerator(_regeneratorRuntime.mark(function _callee82(body) {
2020
- return _regeneratorRuntime.wrap(function _callee82$(_context82) {
2021
- while (1) {
2022
- switch (_context82.prev = _context82.next) {
2023
- case 0:
2024
- return _context82.abrupt("return", Post("".concat(urls.identity.auth.v1, "/webauthn/postlogin"), body));
2025
-
2026
- case 1:
2027
- case "end":
2028
- return _context82.stop();
2029
- }
2030
- }
2031
- }, _callee82);
2032
- }));
2033
- return _webAuthnPostLogin.apply(this, arguments);
2034
- }
2035
-
2036
- export function webAuthnCreateNewDeviceSession() {
2037
- return _webAuthnCreateNewDeviceSession.apply(this, arguments);
2038
- }
2039
-
2040
- function _webAuthnCreateNewDeviceSession() {
2041
- _webAuthnCreateNewDeviceSession = _asyncToGenerator(_regeneratorRuntime.mark(function _callee83() {
2042
- return _regeneratorRuntime.wrap(function _callee83$(_context83) {
2043
- while (1) {
2044
- switch (_context83.prev = _context83.next) {
2045
- case 0:
2046
- return _context83.abrupt("return", Post(urls.identity.webAuthnDevices.v1));
2047
-
2048
- case 1:
2049
- case "end":
2050
- return _context83.stop();
2051
- }
2052
- }
2053
- }, _callee83);
2054
- }));
2055
- return _webAuthnCreateNewDeviceSession.apply(this, arguments);
2056
- }
2057
-
2058
- export function verifyNewDeviceSession(_x72) {
2059
- return _verifyNewDeviceSession.apply(this, arguments);
2060
- }
2061
-
2062
- function _verifyNewDeviceSession() {
2063
- _verifyNewDeviceSession = _asyncToGenerator(_regeneratorRuntime.mark(function _callee84(body) {
2064
- return _regeneratorRuntime.wrap(function _callee84$(_context84) {
2065
- while (1) {
2066
- switch (_context84.prev = _context84.next) {
2067
- case 0:
2068
- return _context84.abrupt("return", Post("".concat(urls.identity.webAuthnDevices.v1, "/verify"), body));
2069
-
2070
- case 1:
2071
- case "end":
2072
- return _context84.stop();
2073
- }
2074
- }
2075
- }, _callee84);
2076
- }));
2077
- return _verifyNewDeviceSession.apply(this, arguments);
2078
- }
2079
-
2080
- export function getVendorPublicAuthStrategiesConfig() {
2081
- return _getVendorPublicAuthStrategiesConfig.apply(this, arguments);
2082
- }
2083
-
2084
- function _getVendorPublicAuthStrategiesConfig() {
2085
- _getVendorPublicAuthStrategiesConfig = _asyncToGenerator(_regeneratorRuntime.mark(function _callee85() {
2086
- return _regeneratorRuntime.wrap(function _callee85$(_context85) {
2087
- while (1) {
2088
- switch (_context85.prev = _context85.next) {
2089
- case 0:
2090
- return _context85.abrupt("return", Get("".concat(urls.identity.configurations.v1, "/auth/strategies/public")));
2091
-
2092
- case 1:
2093
- case "end":
2094
- return _context85.stop();
2095
- }
2096
- }
2097
- }, _callee85);
2098
- }));
2099
- return _getVendorPublicAuthStrategiesConfig.apply(this, arguments);
2100
- }
2101
-
2102
412
  ;