@atlaskit/teams-client 4.2.0 → 4.4.0
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/CHANGELOG.md +16 -0
- package/dist/cjs/common/utils/ufo/constants.js +1 -1
- package/dist/cjs/common/utils/ufo/index.js +2 -2
- package/dist/cjs/mocks/endpoints.js +17 -17
- package/dist/cjs/services/legion-client/index.js +215 -196
- package/dist/cjs/services/main.js +559 -458
- package/dist/cjs/services/object-resolver-client/index.js +24 -0
- package/dist/cjs/services/replines-client/index.js +61 -0
- package/dist/cjs/services/rest-client/index.js +3 -3
- package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/cjs/services/sentry/utils/sentry-client.js +1 -2
- package/dist/cjs/services/team-central-client/index.js +1 -1
- package/dist/cjs/types/team-container.js +19 -0
- package/dist/cjs/types/tenure.js +1 -0
- package/dist/es2019/common/utils/ufo/constants.js +1 -1
- package/dist/es2019/common/utils/ufo/index.js +2 -2
- package/dist/es2019/services/legion-client/index.js +5 -0
- package/dist/es2019/services/main.js +20 -0
- package/dist/es2019/services/object-resolver-client/index.js +8 -0
- package/dist/es2019/services/replines-client/index.js +23 -0
- package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/es2019/types/team-container.js +13 -0
- package/dist/es2019/types/tenure.js +0 -0
- package/dist/esm/common/utils/ufo/constants.js +1 -1
- package/dist/esm/common/utils/ufo/index.js +2 -2
- package/dist/esm/mocks/endpoints.js +17 -17
- package/dist/esm/services/legion-client/index.js +215 -196
- package/dist/esm/services/main.js +559 -458
- package/dist/esm/services/object-resolver-client/index.js +24 -0
- package/dist/esm/services/replines-client/index.js +54 -0
- package/dist/esm/services/rest-client/index.js +3 -3
- package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/services/team-central-client/index.js +1 -1
- package/dist/esm/types/team-container.js +13 -0
- package/dist/esm/types/tenure.js +0 -0
- package/dist/types/common/utils/ufo/constants.d.ts +2 -2
- package/dist/types/services/legion-client/index.d.ts +2 -0
- package/dist/types/services/main.d.ts +11 -0
- package/dist/types/services/object-resolver-client/index.d.ts +1 -0
- package/dist/types/services/object-resolver-client/types.d.ts +15 -0
- package/dist/types/services/replines-client/index.d.ts +11 -0
- package/dist/types/services/team-central-client/index.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/team-container.d.ts +38 -0
- package/dist/types/types/tenure.d.ts +5 -0
- package/dist/types-ts4.5/common/utils/ufo/constants.d.ts +5 -2
- package/dist/types-ts4.5/services/legion-client/index.d.ts +2 -0
- package/dist/types-ts4.5/services/main.d.ts +11 -0
- package/dist/types-ts4.5/services/object-resolver-client/index.d.ts +1 -0
- package/dist/types-ts4.5/services/object-resolver-client/types.d.ts +15 -0
- package/dist/types-ts4.5/services/replines-client/index.d.ts +11 -0
- package/dist/types-ts4.5/services/team-central-client/index.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +1 -0
- package/dist/types-ts4.5/types/team-container.d.ts +38 -0
- package/dist/types-ts4.5/types/tenure.d.ts +5 -0
- package/package.json +1 -1
|
@@ -300,7 +300,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
300
300
|
}
|
|
301
301
|
}, _callee7, this);
|
|
302
302
|
}));
|
|
303
|
-
function createTeamLink(
|
|
303
|
+
function createTeamLink(_x0, _x1) {
|
|
304
304
|
return _createTeamLink.apply(this, arguments);
|
|
305
305
|
}
|
|
306
306
|
return createTeamLink;
|
|
@@ -327,7 +327,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
327
327
|
}
|
|
328
328
|
}, _callee8, this);
|
|
329
329
|
}));
|
|
330
|
-
function updateTeamLink(
|
|
330
|
+
function updateTeamLink(_x10, _x11, _x12) {
|
|
331
331
|
return _updateTeamLink.apply(this, arguments);
|
|
332
332
|
}
|
|
333
333
|
return updateTeamLink;
|
|
@@ -346,7 +346,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
346
346
|
}
|
|
347
347
|
}, _callee9, this);
|
|
348
348
|
}));
|
|
349
|
-
function deleteTeamLink(
|
|
349
|
+
function deleteTeamLink(_x13, _x14) {
|
|
350
350
|
return _deleteTeamLink.apply(this, arguments);
|
|
351
351
|
}
|
|
352
352
|
return deleteTeamLink;
|
|
@@ -354,20 +354,20 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
354
354
|
}, {
|
|
355
355
|
key: "reorderTeamLink",
|
|
356
356
|
value: function () {
|
|
357
|
-
var _reorderTeamLink = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
357
|
+
var _reorderTeamLink = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee0(teamId, linkId, newPosition) {
|
|
358
358
|
var queryArgs;
|
|
359
|
-
return _regeneratorRuntime.wrap(function
|
|
360
|
-
while (1) switch (
|
|
359
|
+
return _regeneratorRuntime.wrap(function _callee0$(_context0) {
|
|
360
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
361
361
|
case 0:
|
|
362
362
|
queryArgs = "?linkId=".concat(linkId, "&newPosition=").concat(newPosition);
|
|
363
|
-
return
|
|
363
|
+
return _context0.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/links/order").concat(queryArgs)));
|
|
364
364
|
case 2:
|
|
365
365
|
case "end":
|
|
366
|
-
return
|
|
366
|
+
return _context0.stop();
|
|
367
367
|
}
|
|
368
|
-
},
|
|
368
|
+
}, _callee0, this);
|
|
369
369
|
}));
|
|
370
|
-
function reorderTeamLink(
|
|
370
|
+
function reorderTeamLink(_x15, _x16, _x17) {
|
|
371
371
|
return _reorderTeamLink.apply(this, arguments);
|
|
372
372
|
}
|
|
373
373
|
return reorderTeamLink;
|
|
@@ -375,26 +375,26 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
375
375
|
}, {
|
|
376
376
|
key: "getOrgEligibilityForManagedTeams",
|
|
377
377
|
value: function () {
|
|
378
|
-
var _getOrgEligibilityForManagedTeams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
378
|
+
var _getOrgEligibilityForManagedTeams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee1() {
|
|
379
379
|
var orgId, err;
|
|
380
|
-
return _regeneratorRuntime.wrap(function
|
|
381
|
-
while (1) switch (
|
|
380
|
+
return _regeneratorRuntime.wrap(function _callee1$(_context1) {
|
|
381
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
382
382
|
case 0:
|
|
383
383
|
orgId = this.getOrgId();
|
|
384
384
|
if (orgId) {
|
|
385
|
-
|
|
385
|
+
_context1.next = 5;
|
|
386
386
|
break;
|
|
387
387
|
}
|
|
388
388
|
err = new Error('Organization ID is required');
|
|
389
389
|
this.logException(err, 'getOrgEligibilityForManagedTeams');
|
|
390
390
|
throw err;
|
|
391
391
|
case 5:
|
|
392
|
-
return
|
|
392
|
+
return _context1.abrupt("return", this.getResourceCached("".concat(v4UrlPath, "/org/").concat(orgId, "/premium/eligibility")));
|
|
393
393
|
case 6:
|
|
394
394
|
case "end":
|
|
395
|
-
return
|
|
395
|
+
return _context1.stop();
|
|
396
396
|
}
|
|
397
|
-
},
|
|
397
|
+
}, _callee1, this);
|
|
398
398
|
}));
|
|
399
399
|
function getOrgEligibilityForManagedTeams() {
|
|
400
400
|
return _getOrgEligibilityForManagedTeams.apply(this, arguments);
|
|
@@ -408,18 +408,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
408
408
|
}, {
|
|
409
409
|
key: "acceptTeamInvitation",
|
|
410
410
|
value: (function () {
|
|
411
|
-
var _acceptTeamInvitation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
412
|
-
return _regeneratorRuntime.wrap(function
|
|
413
|
-
while (1) switch (
|
|
411
|
+
var _acceptTeamInvitation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(teamId) {
|
|
412
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
413
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
414
414
|
case 0:
|
|
415
|
-
return
|
|
415
|
+
return _context10.abrupt("return", this.postResource("".concat(v3UrlPath, "/ui/").concat(this.trimTeamARI(teamId), "/membership/accept")));
|
|
416
416
|
case 1:
|
|
417
417
|
case "end":
|
|
418
|
-
return
|
|
418
|
+
return _context10.stop();
|
|
419
419
|
}
|
|
420
|
-
},
|
|
420
|
+
}, _callee10, this);
|
|
421
421
|
}));
|
|
422
|
-
function acceptTeamInvitation(
|
|
422
|
+
function acceptTeamInvitation(_x18) {
|
|
423
423
|
return _acceptTeamInvitation.apply(this, arguments);
|
|
424
424
|
}
|
|
425
425
|
return acceptTeamInvitation;
|
|
@@ -432,18 +432,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
432
432
|
}, {
|
|
433
433
|
key: "declineTeamInvitation",
|
|
434
434
|
value: (function () {
|
|
435
|
-
var _declineTeamInvitation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
436
|
-
return _regeneratorRuntime.wrap(function
|
|
437
|
-
while (1) switch (
|
|
435
|
+
var _declineTeamInvitation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(teamId) {
|
|
436
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
437
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
438
438
|
case 0:
|
|
439
|
-
return
|
|
439
|
+
return _context11.abrupt("return", this.postResource("".concat(v3UrlPath, "/ui/").concat(this.trimTeamARI(teamId), "/membership/decline")));
|
|
440
440
|
case 1:
|
|
441
441
|
case "end":
|
|
442
|
-
return
|
|
442
|
+
return _context11.stop();
|
|
443
443
|
}
|
|
444
|
-
},
|
|
444
|
+
}, _callee11, this);
|
|
445
445
|
}));
|
|
446
|
-
function declineTeamInvitation(
|
|
446
|
+
function declineTeamInvitation(_x19) {
|
|
447
447
|
return _declineTeamInvitation.apply(this, arguments);
|
|
448
448
|
}
|
|
449
449
|
return declineTeamInvitation;
|
|
@@ -451,22 +451,22 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
451
451
|
}, {
|
|
452
452
|
key: "selfJoinTeam",
|
|
453
453
|
value: function () {
|
|
454
|
-
var _selfJoinTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
454
|
+
var _selfJoinTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(
|
|
455
455
|
// TODO Test me
|
|
456
456
|
teamId, originQuery) {
|
|
457
457
|
var url;
|
|
458
|
-
return _regeneratorRuntime.wrap(function
|
|
459
|
-
while (1) switch (
|
|
458
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
459
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
460
460
|
case 0:
|
|
461
461
|
url = "".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/join?").concat(this.constructProductOriginParams(originQuery));
|
|
462
|
-
return
|
|
462
|
+
return _context12.abrupt("return", this.postResource(url));
|
|
463
463
|
case 2:
|
|
464
464
|
case "end":
|
|
465
|
-
return
|
|
465
|
+
return _context12.stop();
|
|
466
466
|
}
|
|
467
|
-
},
|
|
467
|
+
}, _callee12, this);
|
|
468
468
|
}));
|
|
469
|
-
function selfJoinTeam(
|
|
469
|
+
function selfJoinTeam(_x20, _x21) {
|
|
470
470
|
return _selfJoinTeam.apply(this, arguments);
|
|
471
471
|
}
|
|
472
472
|
return selfJoinTeam;
|
|
@@ -474,18 +474,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
474
474
|
}, {
|
|
475
475
|
key: "cancelJoinRequest",
|
|
476
476
|
value: function () {
|
|
477
|
-
var _cancelJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
478
|
-
return _regeneratorRuntime.wrap(function
|
|
479
|
-
while (1) switch (
|
|
477
|
+
var _cancelJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(teamId) {
|
|
478
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
479
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
480
480
|
case 0:
|
|
481
|
-
return
|
|
481
|
+
return _context13.abrupt("return", this.deleteResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/request")));
|
|
482
482
|
case 1:
|
|
483
483
|
case "end":
|
|
484
|
-
return
|
|
484
|
+
return _context13.stop();
|
|
485
485
|
}
|
|
486
|
-
},
|
|
486
|
+
}, _callee13, this);
|
|
487
487
|
}));
|
|
488
|
-
function cancelJoinRequest(
|
|
488
|
+
function cancelJoinRequest(_x22) {
|
|
489
489
|
return _cancelJoinRequest.apply(this, arguments);
|
|
490
490
|
}
|
|
491
491
|
return cancelJoinRequest;
|
|
@@ -493,18 +493,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
493
493
|
}, {
|
|
494
494
|
key: "acceptJoinRequest",
|
|
495
495
|
value: function () {
|
|
496
|
-
var _acceptJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
497
|
-
return _regeneratorRuntime.wrap(function
|
|
498
|
-
while (1) switch (
|
|
496
|
+
var _acceptJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(teamId, memberId) {
|
|
497
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
498
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
499
499
|
case 0:
|
|
500
|
-
return
|
|
500
|
+
return _context14.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/accept")));
|
|
501
501
|
case 1:
|
|
502
502
|
case "end":
|
|
503
|
-
return
|
|
503
|
+
return _context14.stop();
|
|
504
504
|
}
|
|
505
|
-
},
|
|
505
|
+
}, _callee14, this);
|
|
506
506
|
}));
|
|
507
|
-
function acceptJoinRequest(
|
|
507
|
+
function acceptJoinRequest(_x23, _x24) {
|
|
508
508
|
return _acceptJoinRequest.apply(this, arguments);
|
|
509
509
|
}
|
|
510
510
|
return acceptJoinRequest;
|
|
@@ -512,18 +512,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
512
512
|
}, {
|
|
513
513
|
key: "declineJoinRequest",
|
|
514
514
|
value: function () {
|
|
515
|
-
var _declineJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
516
|
-
return _regeneratorRuntime.wrap(function
|
|
517
|
-
while (1) switch (
|
|
515
|
+
var _declineJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(teamId, memberId) {
|
|
516
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
517
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
518
518
|
case 0:
|
|
519
|
-
return
|
|
519
|
+
return _context15.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/decline")));
|
|
520
520
|
case 1:
|
|
521
521
|
case "end":
|
|
522
|
-
return
|
|
522
|
+
return _context15.stop();
|
|
523
523
|
}
|
|
524
|
-
},
|
|
524
|
+
}, _callee15, this);
|
|
525
525
|
}));
|
|
526
|
-
function declineJoinRequest(
|
|
526
|
+
function declineJoinRequest(_x25, _x26) {
|
|
527
527
|
return _declineJoinRequest.apply(this, arguments);
|
|
528
528
|
}
|
|
529
529
|
return declineJoinRequest;
|
|
@@ -535,18 +535,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
535
535
|
}, {
|
|
536
536
|
key: "deleteTeamMembership",
|
|
537
537
|
value: (function () {
|
|
538
|
-
var _deleteTeamMembership = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
539
|
-
return _regeneratorRuntime.wrap(function
|
|
540
|
-
while (1) switch (
|
|
538
|
+
var _deleteTeamMembership = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(teamId, memberId) {
|
|
539
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
540
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
541
541
|
case 0:
|
|
542
|
-
return
|
|
542
|
+
return _context16.abrupt("return", this.deleteResource("".concat(v3UrlPath, "/").concat(this.trimTeamARI(teamId), "/members/").concat(memberId)));
|
|
543
543
|
case 1:
|
|
544
544
|
case "end":
|
|
545
|
-
return
|
|
545
|
+
return _context16.stop();
|
|
546
546
|
}
|
|
547
|
-
},
|
|
547
|
+
}, _callee16, this);
|
|
548
548
|
}));
|
|
549
|
-
function deleteTeamMembership(
|
|
549
|
+
function deleteTeamMembership(_x27, _x28) {
|
|
550
550
|
return _deleteTeamMembership.apply(this, arguments);
|
|
551
551
|
}
|
|
552
552
|
return deleteTeamMembership;
|
|
@@ -559,18 +559,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
559
559
|
}, {
|
|
560
560
|
key: "revokeTeamInvite",
|
|
561
561
|
value: (function () {
|
|
562
|
-
var _revokeTeamInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
563
|
-
return _regeneratorRuntime.wrap(function
|
|
564
|
-
while (1) switch (
|
|
562
|
+
var _revokeTeamInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(teamId, memberId) {
|
|
563
|
+
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
564
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
565
565
|
case 0:
|
|
566
|
-
return
|
|
566
|
+
return _context17.abrupt("return", this.deleteResource("".concat(v3UrlPath, "/ui/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/revoke")));
|
|
567
567
|
case 1:
|
|
568
568
|
case "end":
|
|
569
|
-
return
|
|
569
|
+
return _context17.stop();
|
|
570
570
|
}
|
|
571
|
-
},
|
|
571
|
+
}, _callee17, this);
|
|
572
572
|
}));
|
|
573
|
-
function revokeTeamInvite(
|
|
573
|
+
function revokeTeamInvite(_x29, _x30) {
|
|
574
574
|
return _revokeTeamInvite.apply(this, arguments);
|
|
575
575
|
}
|
|
576
576
|
return revokeTeamInvite;
|
|
@@ -578,18 +578,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
578
578
|
}, {
|
|
579
579
|
key: "deleteTeam",
|
|
580
580
|
value: function () {
|
|
581
|
-
var _deleteTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
582
|
-
return _regeneratorRuntime.wrap(function
|
|
583
|
-
while (1) switch (
|
|
581
|
+
var _deleteTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(teamId) {
|
|
582
|
+
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
583
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
584
584
|
case 0:
|
|
585
|
-
return
|
|
585
|
+
return _context18.abrupt("return", this.deleteResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId))));
|
|
586
586
|
case 1:
|
|
587
587
|
case "end":
|
|
588
|
-
return
|
|
588
|
+
return _context18.stop();
|
|
589
589
|
}
|
|
590
|
-
},
|
|
590
|
+
}, _callee18, this);
|
|
591
591
|
}));
|
|
592
|
-
function deleteTeam(
|
|
592
|
+
function deleteTeam(_x31) {
|
|
593
593
|
return _deleteTeam.apply(this, arguments);
|
|
594
594
|
}
|
|
595
595
|
return deleteTeam;
|
|
@@ -601,23 +601,23 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
601
601
|
}, {
|
|
602
602
|
key: "isSingleFullMemberTeam",
|
|
603
603
|
value: (function () {
|
|
604
|
-
var _isSingleFullMemberTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
604
|
+
var _isSingleFullMemberTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(teamId) {
|
|
605
605
|
var members;
|
|
606
|
-
return _regeneratorRuntime.wrap(function
|
|
607
|
-
while (1) switch (
|
|
606
|
+
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
607
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
608
608
|
case 0:
|
|
609
|
-
|
|
609
|
+
_context19.next = 2;
|
|
610
610
|
return this.getResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/members?size=2&membershipState=FULL_MEMBER&siteId=").concat(this.getCloudId()));
|
|
611
611
|
case 2:
|
|
612
|
-
members =
|
|
613
|
-
return
|
|
612
|
+
members = _context19.sent;
|
|
613
|
+
return _context19.abrupt("return", members.entities.length === 1);
|
|
614
614
|
case 4:
|
|
615
615
|
case "end":
|
|
616
|
-
return
|
|
616
|
+
return _context19.stop();
|
|
617
617
|
}
|
|
618
|
-
},
|
|
618
|
+
}, _callee19, this);
|
|
619
619
|
}));
|
|
620
|
-
function isSingleFullMemberTeam(
|
|
620
|
+
function isSingleFullMemberTeam(_x32) {
|
|
621
621
|
return _isSingleFullMemberTeam.apply(this, arguments);
|
|
622
622
|
}
|
|
623
623
|
return isSingleFullMemberTeam;
|
|
@@ -625,20 +625,20 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
625
625
|
}, {
|
|
626
626
|
key: "createTeam",
|
|
627
627
|
value: function () {
|
|
628
|
-
var _createTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
628
|
+
var _createTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(displayName, originQuery, members) {
|
|
629
629
|
var membershipSettings,
|
|
630
630
|
organizationId,
|
|
631
631
|
err,
|
|
632
632
|
url,
|
|
633
633
|
legionTeam,
|
|
634
|
-
|
|
635
|
-
return _regeneratorRuntime.wrap(function
|
|
636
|
-
while (1) switch (
|
|
634
|
+
_args20 = arguments;
|
|
635
|
+
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
636
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
637
637
|
case 0:
|
|
638
|
-
membershipSettings =
|
|
638
|
+
membershipSettings = _args20.length > 3 && _args20[3] !== undefined ? _args20[3] : 'OPEN';
|
|
639
639
|
organizationId = this.getContext().orgId;
|
|
640
640
|
if (organizationId) {
|
|
641
|
-
|
|
641
|
+
_context20.next = 6;
|
|
642
642
|
break;
|
|
643
643
|
}
|
|
644
644
|
err = new Error('Organization ID is required');
|
|
@@ -646,7 +646,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
646
646
|
throw err;
|
|
647
647
|
case 6:
|
|
648
648
|
url = "".concat(v4UrlPath, "?").concat(this.constructProductOriginParams(originQuery));
|
|
649
|
-
|
|
649
|
+
_context20.next = 9;
|
|
650
650
|
return this.postResource(url, {
|
|
651
651
|
displayName: displayName,
|
|
652
652
|
description: '',
|
|
@@ -656,15 +656,15 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
656
656
|
members: _toConsumableArray(new Set(members))
|
|
657
657
|
});
|
|
658
658
|
case 9:
|
|
659
|
-
legionTeam =
|
|
660
|
-
return
|
|
659
|
+
legionTeam = _context20.sent;
|
|
660
|
+
return _context20.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionTeam));
|
|
661
661
|
case 11:
|
|
662
662
|
case "end":
|
|
663
|
-
return
|
|
663
|
+
return _context20.stop();
|
|
664
664
|
}
|
|
665
|
-
},
|
|
665
|
+
}, _callee20, this);
|
|
666
666
|
}));
|
|
667
|
-
function createTeam(
|
|
667
|
+
function createTeam(_x33, _x34, _x35) {
|
|
668
668
|
return _createTeam.apply(this, arguments);
|
|
669
669
|
}
|
|
670
670
|
return createTeam;
|
|
@@ -672,15 +672,15 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
672
672
|
}, {
|
|
673
673
|
key: "createExternalTeam",
|
|
674
674
|
value: function () {
|
|
675
|
-
var _createExternalTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
675
|
+
var _createExternalTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(description, externalReference, teamName, siteId) {
|
|
676
676
|
var organizationId, cloudId, err, url, legionExternalTeam;
|
|
677
|
-
return _regeneratorRuntime.wrap(function
|
|
678
|
-
while (1) switch (
|
|
677
|
+
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
678
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
679
679
|
case 0:
|
|
680
680
|
organizationId = this.getContext().orgId;
|
|
681
681
|
cloudId = this.getContext().cloudId;
|
|
682
682
|
if (organizationId) {
|
|
683
|
-
|
|
683
|
+
_context21.next = 6;
|
|
684
684
|
break;
|
|
685
685
|
}
|
|
686
686
|
err = new Error('Organization ID is required');
|
|
@@ -688,7 +688,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
688
688
|
throw err;
|
|
689
689
|
case 6:
|
|
690
690
|
url = "".concat(v4UrlPath, "/external?origin.cloudId=").concat(encodeURIComponent(this.getCloudId(siteId || cloudId)));
|
|
691
|
-
|
|
691
|
+
_context21.next = 9;
|
|
692
692
|
return this.postResource(url, {
|
|
693
693
|
description: description,
|
|
694
694
|
externalReference: externalReference,
|
|
@@ -697,15 +697,15 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
697
697
|
displayName: teamName
|
|
698
698
|
});
|
|
699
699
|
case 9:
|
|
700
|
-
legionExternalTeam =
|
|
701
|
-
return
|
|
700
|
+
legionExternalTeam = _context21.sent;
|
|
701
|
+
return _context21.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionExternalTeam));
|
|
702
702
|
case 11:
|
|
703
703
|
case "end":
|
|
704
|
-
return
|
|
704
|
+
return _context21.stop();
|
|
705
705
|
}
|
|
706
|
-
},
|
|
706
|
+
}, _callee21, this);
|
|
707
707
|
}));
|
|
708
|
-
function createExternalTeam(
|
|
708
|
+
function createExternalTeam(_x36, _x37, _x38, _x39) {
|
|
709
709
|
return _createExternalTeam.apply(this, arguments);
|
|
710
710
|
}
|
|
711
711
|
return createExternalTeam;
|
|
@@ -713,23 +713,23 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
713
713
|
}, {
|
|
714
714
|
key: "getTeamAndGroupDiff",
|
|
715
715
|
value: function () {
|
|
716
|
-
var _getTeamAndGroupDiff = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
716
|
+
var _getTeamAndGroupDiff = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(teamId, externalReference) {
|
|
717
717
|
var siteId;
|
|
718
|
-
return _regeneratorRuntime.wrap(function
|
|
719
|
-
while (1) switch (
|
|
718
|
+
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
719
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
720
720
|
case 0:
|
|
721
721
|
siteId = this.getCloudId();
|
|
722
|
-
return
|
|
722
|
+
return _context22.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/diff"), {
|
|
723
723
|
siteId: siteId,
|
|
724
724
|
externalReference: externalReference
|
|
725
725
|
}));
|
|
726
726
|
case 2:
|
|
727
727
|
case "end":
|
|
728
|
-
return
|
|
728
|
+
return _context22.stop();
|
|
729
729
|
}
|
|
730
|
-
},
|
|
730
|
+
}, _callee22, this);
|
|
731
731
|
}));
|
|
732
|
-
function getTeamAndGroupDiff(
|
|
732
|
+
function getTeamAndGroupDiff(_x40, _x41) {
|
|
733
733
|
return _getTeamAndGroupDiff.apply(this, arguments);
|
|
734
734
|
}
|
|
735
735
|
return getTeamAndGroupDiff;
|
|
@@ -737,23 +737,23 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
737
737
|
}, {
|
|
738
738
|
key: "linkExistingTeamToGroup",
|
|
739
739
|
value: function () {
|
|
740
|
-
var _linkExistingTeamToGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
740
|
+
var _linkExistingTeamToGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(teamId, externalReference) {
|
|
741
741
|
var siteId;
|
|
742
|
-
return _regeneratorRuntime.wrap(function
|
|
743
|
-
while (1) switch (
|
|
742
|
+
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
|
743
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
744
744
|
case 0:
|
|
745
745
|
siteId = this.getCloudId();
|
|
746
|
-
return
|
|
746
|
+
return _context23.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/link"), {
|
|
747
747
|
externalReference: externalReference,
|
|
748
748
|
siteId: siteId
|
|
749
749
|
}));
|
|
750
750
|
case 2:
|
|
751
751
|
case "end":
|
|
752
|
-
return
|
|
752
|
+
return _context23.stop();
|
|
753
753
|
}
|
|
754
|
-
},
|
|
754
|
+
}, _callee23, this);
|
|
755
755
|
}));
|
|
756
|
-
function linkExistingTeamToGroup(
|
|
756
|
+
function linkExistingTeamToGroup(_x42, _x43) {
|
|
757
757
|
return _linkExistingTeamToGroup.apply(this, arguments);
|
|
758
758
|
}
|
|
759
759
|
return linkExistingTeamToGroup;
|
|
@@ -761,11 +761,11 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
761
761
|
}, {
|
|
762
762
|
key: "getWriteMediaToken",
|
|
763
763
|
value: function () {
|
|
764
|
-
var _getWriteMediaToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
765
|
-
return _regeneratorRuntime.wrap(function
|
|
766
|
-
while (1) switch (
|
|
764
|
+
var _getWriteMediaToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24() {
|
|
765
|
+
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
|
766
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
767
767
|
case 0:
|
|
768
|
-
return
|
|
768
|
+
return _context24.abrupt("return", this.getResource('/v4/teams/header-image/media-upload').then(function (response) {
|
|
769
769
|
var _response$baseUrl;
|
|
770
770
|
return _objectSpread(_objectSpread({}, response), {}, {
|
|
771
771
|
baseUrl: (_response$baseUrl = response.baseUrl) !== null && _response$baseUrl !== void 0 && _response$baseUrl.endsWith('/') ? response.baseUrl.slice(0, -1) : response.baseUrl
|
|
@@ -773,9 +773,9 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
773
773
|
}));
|
|
774
774
|
case 1:
|
|
775
775
|
case "end":
|
|
776
|
-
return
|
|
776
|
+
return _context24.stop();
|
|
777
777
|
}
|
|
778
|
-
},
|
|
778
|
+
}, _callee24, this);
|
|
779
779
|
}));
|
|
780
780
|
function getWriteMediaToken() {
|
|
781
781
|
return _getWriteMediaToken.apply(this, arguments);
|
|
@@ -785,25 +785,25 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
785
785
|
}, {
|
|
786
786
|
key: "getSoftDeletedTeamById",
|
|
787
787
|
value: function () {
|
|
788
|
-
var _getSoftDeletedTeamById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
788
|
+
var _getSoftDeletedTeamById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(teamId) {
|
|
789
789
|
var orgId, siteId;
|
|
790
|
-
return _regeneratorRuntime.wrap(function
|
|
791
|
-
while (1) switch (
|
|
790
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
791
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
792
792
|
case 0:
|
|
793
793
|
orgId = this.getOrgId();
|
|
794
794
|
siteId = this.getCloudId();
|
|
795
|
-
return
|
|
795
|
+
return _context25.abrupt("return", this.getResource("".concat(v4UrlPath, "/org/").concat(orgId, "/soft-deleted/").concat(this.trimTeamARI(teamId), "?siteId=").concat(siteId)).then(function (response) {
|
|
796
796
|
return _objectSpread(_objectSpread({}, response.teamResponse), {}, {
|
|
797
797
|
id: teamId
|
|
798
798
|
});
|
|
799
799
|
}));
|
|
800
800
|
case 3:
|
|
801
801
|
case "end":
|
|
802
|
-
return
|
|
802
|
+
return _context25.stop();
|
|
803
803
|
}
|
|
804
|
-
},
|
|
804
|
+
}, _callee25, this);
|
|
805
805
|
}));
|
|
806
|
-
function getSoftDeletedTeamById(
|
|
806
|
+
function getSoftDeletedTeamById(_x44) {
|
|
807
807
|
return _getSoftDeletedTeamById.apply(this, arguments);
|
|
808
808
|
}
|
|
809
809
|
return getSoftDeletedTeamById;
|
|
@@ -814,13 +814,13 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
814
814
|
}, {
|
|
815
815
|
key: "getUserInSiteUserBase",
|
|
816
816
|
value: (function () {
|
|
817
|
-
var _getUserInSiteUserBase = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
817
|
+
var _getUserInSiteUserBase = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(userId) {
|
|
818
818
|
var siteId;
|
|
819
|
-
return _regeneratorRuntime.wrap(function
|
|
820
|
-
while (1) switch (
|
|
819
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
820
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
821
821
|
case 0:
|
|
822
822
|
siteId = this.getCloudId();
|
|
823
|
-
return
|
|
823
|
+
return _context26.abrupt("return", this.getResource("/teams/site/".concat(siteId, "/users/").concat(userId, "/exists"), {
|
|
824
824
|
headers: {
|
|
825
825
|
Accept: 'application/json',
|
|
826
826
|
'X-header-client-id': 'ptc-fe'
|
|
@@ -828,11 +828,11 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
828
828
|
}));
|
|
829
829
|
case 2:
|
|
830
830
|
case "end":
|
|
831
|
-
return
|
|
831
|
+
return _context26.stop();
|
|
832
832
|
}
|
|
833
|
-
},
|
|
833
|
+
}, _callee26, this);
|
|
834
834
|
}));
|
|
835
|
-
function getUserInSiteUserBase(
|
|
835
|
+
function getUserInSiteUserBase(_x45) {
|
|
836
836
|
return _getUserInSiteUserBase.apply(this, arguments);
|
|
837
837
|
}
|
|
838
838
|
return getUserInSiteUserBase;
|
|
@@ -840,22 +840,22 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
840
840
|
}, {
|
|
841
841
|
key: "retrieveBrowseUserPermission",
|
|
842
842
|
value: function () {
|
|
843
|
-
var _retrieveBrowseUserPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
844
|
-
return _regeneratorRuntime.wrap(function
|
|
845
|
-
while (1) switch (
|
|
843
|
+
var _retrieveBrowseUserPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(product) {
|
|
844
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
845
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
846
846
|
case 0:
|
|
847
|
-
return
|
|
847
|
+
return _context27.abrupt("return", this.getResourceCached("/teams/site/".concat(this.getCloudId(), "/canSearchUsers?product=").concat(product), undefined,
|
|
848
848
|
// 2 minute expiration, resolves duplicate calls in initial load
|
|
849
849
|
{
|
|
850
850
|
expiration: 1000 * 60 * 2
|
|
851
851
|
}));
|
|
852
852
|
case 1:
|
|
853
853
|
case "end":
|
|
854
|
-
return
|
|
854
|
+
return _context27.stop();
|
|
855
855
|
}
|
|
856
|
-
},
|
|
856
|
+
}, _callee27, this);
|
|
857
857
|
}));
|
|
858
|
-
function retrieveBrowseUserPermission(
|
|
858
|
+
function retrieveBrowseUserPermission(_x46) {
|
|
859
859
|
return _retrieveBrowseUserPermission.apply(this, arguments);
|
|
860
860
|
}
|
|
861
861
|
return retrieveBrowseUserPermission;
|
|
@@ -863,27 +863,27 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
863
863
|
}, {
|
|
864
864
|
key: "getPermissions",
|
|
865
865
|
value: function () {
|
|
866
|
-
var _getPermissions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
866
|
+
var _getPermissions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
|
|
867
867
|
var orgId, siteId, err;
|
|
868
|
-
return _regeneratorRuntime.wrap(function
|
|
869
|
-
while (1) switch (
|
|
868
|
+
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
|
869
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
870
870
|
case 0:
|
|
871
871
|
orgId = this.getContext().orgId;
|
|
872
872
|
siteId = this.getCloudId();
|
|
873
873
|
if (orgId) {
|
|
874
|
-
|
|
874
|
+
_context28.next = 6;
|
|
875
875
|
break;
|
|
876
876
|
}
|
|
877
877
|
err = new Error('Organization ID is required');
|
|
878
878
|
this.logException(err, 'getPermissions');
|
|
879
879
|
throw err;
|
|
880
880
|
case 6:
|
|
881
|
-
return
|
|
881
|
+
return _context28.abrupt("return", this.getResourceCached("".concat(v4UrlPath, "/permission/self/organization/").concat(orgId, "?siteId=").concat(siteId)));
|
|
882
882
|
case 7:
|
|
883
883
|
case "end":
|
|
884
|
-
return
|
|
884
|
+
return _context28.stop();
|
|
885
885
|
}
|
|
886
|
-
},
|
|
886
|
+
}, _callee28, this);
|
|
887
887
|
}));
|
|
888
888
|
function getPermissions() {
|
|
889
889
|
return _getPermissions.apply(this, arguments);
|
|
@@ -893,36 +893,36 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
893
893
|
}, {
|
|
894
894
|
key: "getLinkedTeamsBulk",
|
|
895
895
|
value: function () {
|
|
896
|
-
var _getLinkedTeamsBulk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
896
|
+
var _getLinkedTeamsBulk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(groupIds) {
|
|
897
897
|
var organizationId, err, legionExternalTeam;
|
|
898
|
-
return _regeneratorRuntime.wrap(function
|
|
899
|
-
while (1) switch (
|
|
898
|
+
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
|
899
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
900
900
|
case 0:
|
|
901
901
|
organizationId = this.getContext().orgId;
|
|
902
902
|
if (organizationId) {
|
|
903
|
-
|
|
903
|
+
_context29.next = 5;
|
|
904
904
|
break;
|
|
905
905
|
}
|
|
906
906
|
err = new Error('Organization ID is required');
|
|
907
907
|
this.logException(err, 'getLinkedTeamsBulk');
|
|
908
908
|
throw err;
|
|
909
909
|
case 5:
|
|
910
|
-
|
|
910
|
+
_context29.next = 7;
|
|
911
911
|
return this.postResource("".concat(v4UrlPath, "/external/bulk"), {
|
|
912
912
|
organizationId: organizationId,
|
|
913
913
|
source: 'ATLASSIAN_GROUP',
|
|
914
914
|
externalIds: groupIds
|
|
915
915
|
});
|
|
916
916
|
case 7:
|
|
917
|
-
legionExternalTeam =
|
|
918
|
-
return
|
|
917
|
+
legionExternalTeam = _context29.sent;
|
|
918
|
+
return _context29.abrupt("return", legionExternalTeam);
|
|
919
919
|
case 9:
|
|
920
920
|
case "end":
|
|
921
|
-
return
|
|
921
|
+
return _context29.stop();
|
|
922
922
|
}
|
|
923
|
-
},
|
|
923
|
+
}, _callee29, this);
|
|
924
924
|
}));
|
|
925
|
-
function getLinkedTeamsBulk(
|
|
925
|
+
function getLinkedTeamsBulk(_x47) {
|
|
926
926
|
return _getLinkedTeamsBulk.apply(this, arguments);
|
|
927
927
|
}
|
|
928
928
|
return getLinkedTeamsBulk;
|
|
@@ -930,32 +930,32 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
930
930
|
}, {
|
|
931
931
|
key: "getTeamProfileDetails",
|
|
932
932
|
value: function () {
|
|
933
|
-
var _getTeamProfileDetails = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
933
|
+
var _getTeamProfileDetails = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(teamId) {
|
|
934
934
|
var siteId, err, linkedTeamsProfileDetails;
|
|
935
|
-
return _regeneratorRuntime.wrap(function
|
|
936
|
-
while (1) switch (
|
|
935
|
+
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
|
936
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
937
937
|
case 0:
|
|
938
938
|
siteId = this.getCloudId();
|
|
939
939
|
if (siteId) {
|
|
940
|
-
|
|
940
|
+
_context30.next = 5;
|
|
941
941
|
break;
|
|
942
942
|
}
|
|
943
943
|
err = new Error('Site ID is required');
|
|
944
944
|
this.logException(err, 'getTeamProfileDetails');
|
|
945
945
|
throw err;
|
|
946
946
|
case 5:
|
|
947
|
-
|
|
947
|
+
_context30.next = 7;
|
|
948
948
|
return this.getResource("".concat(v4UrlPath, "/").concat(teamId, "/profile?siteId=").concat(this.getCloudId()));
|
|
949
949
|
case 7:
|
|
950
|
-
linkedTeamsProfileDetails =
|
|
951
|
-
return
|
|
950
|
+
linkedTeamsProfileDetails = _context30.sent;
|
|
951
|
+
return _context30.abrupt("return", linkedTeamsProfileDetails);
|
|
952
952
|
case 9:
|
|
953
953
|
case "end":
|
|
954
|
-
return
|
|
954
|
+
return _context30.stop();
|
|
955
955
|
}
|
|
956
|
-
},
|
|
956
|
+
}, _callee30, this);
|
|
957
957
|
}));
|
|
958
|
-
function getTeamProfileDetails(
|
|
958
|
+
function getTeamProfileDetails(_x48) {
|
|
959
959
|
return _getTeamProfileDetails.apply(this, arguments);
|
|
960
960
|
}
|
|
961
961
|
return getTeamProfileDetails;
|
|
@@ -963,30 +963,30 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
963
963
|
}, {
|
|
964
964
|
key: "getOrgScope",
|
|
965
965
|
value: function () {
|
|
966
|
-
var _getOrgScope = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
966
|
+
var _getOrgScope = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
|
|
967
967
|
var orgId, err, orgScope;
|
|
968
|
-
return _regeneratorRuntime.wrap(function
|
|
969
|
-
while (1) switch (
|
|
968
|
+
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
|
969
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
970
970
|
case 0:
|
|
971
971
|
orgId = this.getContext().orgId;
|
|
972
972
|
if (orgId) {
|
|
973
|
-
|
|
973
|
+
_context31.next = 5;
|
|
974
974
|
break;
|
|
975
975
|
}
|
|
976
976
|
err = new Error('Organization ID is required');
|
|
977
977
|
this.logException(err, 'getOrgScope');
|
|
978
978
|
throw err;
|
|
979
979
|
case 5:
|
|
980
|
-
|
|
980
|
+
_context31.next = 7;
|
|
981
981
|
return this.getResourceCached("".concat(v4UrlPath, "/org/").concat(orgId, "/scope"));
|
|
982
982
|
case 7:
|
|
983
|
-
orgScope =
|
|
984
|
-
return
|
|
983
|
+
orgScope = _context31.sent;
|
|
984
|
+
return _context31.abrupt("return", orgScope);
|
|
985
985
|
case 9:
|
|
986
986
|
case "end":
|
|
987
|
-
return
|
|
987
|
+
return _context31.stop();
|
|
988
988
|
}
|
|
989
|
-
},
|
|
989
|
+
}, _callee31, this);
|
|
990
990
|
}));
|
|
991
991
|
function getOrgScope() {
|
|
992
992
|
return _getOrgScope.apply(this, arguments);
|
|
@@ -996,29 +996,48 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
996
996
|
}, {
|
|
997
997
|
key: "restoreTeamToSyncedGroup",
|
|
998
998
|
value: function () {
|
|
999
|
-
var _restoreTeamToSyncedGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
999
|
+
var _restoreTeamToSyncedGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(teamId, externalReference) {
|
|
1000
1000
|
var siteId;
|
|
1001
|
-
return _regeneratorRuntime.wrap(function
|
|
1002
|
-
while (1) switch (
|
|
1001
|
+
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
|
1002
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
1003
1003
|
case 0:
|
|
1004
1004
|
siteId = this.getCloudId();
|
|
1005
|
-
|
|
1005
|
+
_context32.next = 3;
|
|
1006
1006
|
return this.postResource("".concat(v4UrlPath, "/").concat(teamId, "/external/restore"), {
|
|
1007
1007
|
externalReference: externalReference,
|
|
1008
1008
|
siteId: siteId
|
|
1009
1009
|
});
|
|
1010
1010
|
case 3:
|
|
1011
|
-
return
|
|
1011
|
+
return _context32.abrupt("return", _context32.sent);
|
|
1012
1012
|
case 4:
|
|
1013
1013
|
case "end":
|
|
1014
|
-
return
|
|
1014
|
+
return _context32.stop();
|
|
1015
1015
|
}
|
|
1016
|
-
},
|
|
1016
|
+
}, _callee32, this);
|
|
1017
1017
|
}));
|
|
1018
|
-
function restoreTeamToSyncedGroup(
|
|
1018
|
+
function restoreTeamToSyncedGroup(_x49, _x50) {
|
|
1019
1019
|
return _restoreTeamToSyncedGroup.apply(this, arguments);
|
|
1020
1020
|
}
|
|
1021
1021
|
return restoreTeamToSyncedGroup;
|
|
1022
|
+
}()
|
|
1023
|
+
}, {
|
|
1024
|
+
key: "createTeamContainers",
|
|
1025
|
+
value: function () {
|
|
1026
|
+
var _createTeamContainers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(payload) {
|
|
1027
|
+
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
1028
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
1029
|
+
case 0:
|
|
1030
|
+
return _context33.abrupt("return", this.postResource("".concat(v4UrlPath, "/containers"), _objectSpread({}, payload)));
|
|
1031
|
+
case 1:
|
|
1032
|
+
case "end":
|
|
1033
|
+
return _context33.stop();
|
|
1034
|
+
}
|
|
1035
|
+
}, _callee33, this);
|
|
1036
|
+
}));
|
|
1037
|
+
function createTeamContainers(_x51) {
|
|
1038
|
+
return _createTeamContainers.apply(this, arguments);
|
|
1039
|
+
}
|
|
1040
|
+
return createTeamContainers;
|
|
1022
1041
|
}() // some Legion APIs return team id with the team ARI
|
|
1023
1042
|
}, {
|
|
1024
1043
|
key: "trimTeamARI",
|