@atlaskit/teams-client 4.8.1 → 4.9.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.
@@ -509,58 +509,85 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
509
509
  return addAgentsToTeam;
510
510
  }()
511
511
  }, {
512
- key: "cancelJoinRequest",
512
+ key: "removeAgentTeamAssociation",
513
513
  value: function () {
514
- var _cancelJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(teamId) {
514
+ var _removeAgentTeamAssociation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(teamId, agentId) {
515
+ var url;
515
516
  return _regeneratorRuntime.wrap(function _callee14$(_context14) {
516
517
  while (1) switch (_context14.prev = _context14.next) {
517
518
  case 0:
518
- return _context14.abrupt("return", this.deleteResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/request")));
519
- case 1:
519
+ _context14.prev = 0;
520
+ url = "".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/agents/").concat(agentId);
521
+ return _context14.abrupt("return", this.deleteResource(url));
522
+ case 5:
523
+ _context14.prev = 5;
524
+ _context14.t0 = _context14["catch"](0);
525
+ this.logException(_context14.t0, 'removeAgentTeamAssociation');
526
+ throw _context14.t0;
527
+ case 9:
520
528
  case "end":
521
529
  return _context14.stop();
522
530
  }
523
- }, _callee14, this);
531
+ }, _callee14, this, [[0, 5]]);
524
532
  }));
525
- function cancelJoinRequest(_x24) {
526
- return _cancelJoinRequest.apply(this, arguments);
533
+ function removeAgentTeamAssociation(_x24, _x25) {
534
+ return _removeAgentTeamAssociation.apply(this, arguments);
527
535
  }
528
- return cancelJoinRequest;
536
+ return removeAgentTeamAssociation;
529
537
  }()
530
538
  }, {
531
- key: "acceptJoinRequest",
539
+ key: "cancelJoinRequest",
532
540
  value: function () {
533
- var _acceptJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(teamId, memberId) {
541
+ var _cancelJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(teamId) {
534
542
  return _regeneratorRuntime.wrap(function _callee15$(_context15) {
535
543
  while (1) switch (_context15.prev = _context15.next) {
536
544
  case 0:
537
- return _context15.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/accept")));
545
+ return _context15.abrupt("return", this.deleteResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/request")));
538
546
  case 1:
539
547
  case "end":
540
548
  return _context15.stop();
541
549
  }
542
550
  }, _callee15, this);
543
551
  }));
544
- function acceptJoinRequest(_x25, _x26) {
545
- return _acceptJoinRequest.apply(this, arguments);
552
+ function cancelJoinRequest(_x26) {
553
+ return _cancelJoinRequest.apply(this, arguments);
546
554
  }
547
- return acceptJoinRequest;
555
+ return cancelJoinRequest;
548
556
  }()
549
557
  }, {
550
- key: "declineJoinRequest",
558
+ key: "acceptJoinRequest",
551
559
  value: function () {
552
- var _declineJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(teamId, memberId) {
560
+ var _acceptJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(teamId, memberId) {
553
561
  return _regeneratorRuntime.wrap(function _callee16$(_context16) {
554
562
  while (1) switch (_context16.prev = _context16.next) {
555
563
  case 0:
556
- return _context16.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/decline")));
564
+ return _context16.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/accept")));
557
565
  case 1:
558
566
  case "end":
559
567
  return _context16.stop();
560
568
  }
561
569
  }, _callee16, this);
562
570
  }));
563
- function declineJoinRequest(_x27, _x28) {
571
+ function acceptJoinRequest(_x27, _x28) {
572
+ return _acceptJoinRequest.apply(this, arguments);
573
+ }
574
+ return acceptJoinRequest;
575
+ }()
576
+ }, {
577
+ key: "declineJoinRequest",
578
+ value: function () {
579
+ var _declineJoinRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(teamId, memberId) {
580
+ return _regeneratorRuntime.wrap(function _callee17$(_context17) {
581
+ while (1) switch (_context17.prev = _context17.next) {
582
+ case 0:
583
+ return _context17.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/request/decline")));
584
+ case 1:
585
+ case "end":
586
+ return _context17.stop();
587
+ }
588
+ }, _callee17, this);
589
+ }));
590
+ function declineJoinRequest(_x29, _x30) {
564
591
  return _declineJoinRequest.apply(this, arguments);
565
592
  }
566
593
  return declineJoinRequest;
@@ -572,18 +599,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
572
599
  }, {
573
600
  key: "deleteTeamMembership",
574
601
  value: (function () {
575
- var _deleteTeamMembership = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(teamId, memberId) {
576
- return _regeneratorRuntime.wrap(function _callee17$(_context17) {
577
- while (1) switch (_context17.prev = _context17.next) {
602
+ var _deleteTeamMembership = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(teamId, memberId) {
603
+ return _regeneratorRuntime.wrap(function _callee18$(_context18) {
604
+ while (1) switch (_context18.prev = _context18.next) {
578
605
  case 0:
579
- return _context17.abrupt("return", this.deleteResource("".concat(v3UrlPath, "/").concat(this.trimTeamARI(teamId), "/members/").concat(memberId)));
606
+ return _context18.abrupt("return", this.deleteResource("".concat(v3UrlPath, "/").concat(this.trimTeamARI(teamId), "/members/").concat(memberId)));
580
607
  case 1:
581
608
  case "end":
582
- return _context17.stop();
609
+ return _context18.stop();
583
610
  }
584
- }, _callee17, this);
611
+ }, _callee18, this);
585
612
  }));
586
- function deleteTeamMembership(_x29, _x30) {
613
+ function deleteTeamMembership(_x31, _x32) {
587
614
  return _deleteTeamMembership.apply(this, arguments);
588
615
  }
589
616
  return deleteTeamMembership;
@@ -596,18 +623,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
596
623
  }, {
597
624
  key: "revokeTeamInvite",
598
625
  value: (function () {
599
- var _revokeTeamInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(teamId, memberId) {
600
- return _regeneratorRuntime.wrap(function _callee18$(_context18) {
601
- while (1) switch (_context18.prev = _context18.next) {
626
+ var _revokeTeamInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(teamId, memberId) {
627
+ return _regeneratorRuntime.wrap(function _callee19$(_context19) {
628
+ while (1) switch (_context19.prev = _context19.next) {
602
629
  case 0:
603
- return _context18.abrupt("return", this.deleteResource("".concat(v3UrlPath, "/ui/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/revoke")));
630
+ return _context19.abrupt("return", this.deleteResource("".concat(v3UrlPath, "/ui/").concat(this.trimTeamARI(teamId), "/membership/").concat(memberId, "/revoke")));
604
631
  case 1:
605
632
  case "end":
606
- return _context18.stop();
633
+ return _context19.stop();
607
634
  }
608
- }, _callee18, this);
635
+ }, _callee19, this);
609
636
  }));
610
- function revokeTeamInvite(_x31, _x32) {
637
+ function revokeTeamInvite(_x33, _x34) {
611
638
  return _revokeTeamInvite.apply(this, arguments);
612
639
  }
613
640
  return revokeTeamInvite;
@@ -615,18 +642,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
615
642
  }, {
616
643
  key: "deleteTeam",
617
644
  value: function () {
618
- var _deleteTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(teamId) {
619
- return _regeneratorRuntime.wrap(function _callee19$(_context19) {
620
- while (1) switch (_context19.prev = _context19.next) {
645
+ var _deleteTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(teamId) {
646
+ return _regeneratorRuntime.wrap(function _callee20$(_context20) {
647
+ while (1) switch (_context20.prev = _context20.next) {
621
648
  case 0:
622
- return _context19.abrupt("return", this.deleteResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId))));
649
+ return _context20.abrupt("return", this.deleteResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId))));
623
650
  case 1:
624
651
  case "end":
625
- return _context19.stop();
652
+ return _context20.stop();
626
653
  }
627
- }, _callee19, this);
654
+ }, _callee20, this);
628
655
  }));
629
- function deleteTeam(_x33) {
656
+ function deleteTeam(_x35) {
630
657
  return _deleteTeam.apply(this, arguments);
631
658
  }
632
659
  return deleteTeam;
@@ -638,23 +665,23 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
638
665
  }, {
639
666
  key: "isSingleFullMemberTeam",
640
667
  value: (function () {
641
- var _isSingleFullMemberTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(teamId) {
668
+ var _isSingleFullMemberTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(teamId) {
642
669
  var members;
643
- return _regeneratorRuntime.wrap(function _callee20$(_context20) {
644
- while (1) switch (_context20.prev = _context20.next) {
670
+ return _regeneratorRuntime.wrap(function _callee21$(_context21) {
671
+ while (1) switch (_context21.prev = _context21.next) {
645
672
  case 0:
646
- _context20.next = 2;
673
+ _context21.next = 2;
647
674
  return this.getResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/members?size=2&membershipState=FULL_MEMBER&siteId=").concat(this.getCloudId()));
648
675
  case 2:
649
- members = _context20.sent;
650
- return _context20.abrupt("return", members.entities.length === 1);
676
+ members = _context21.sent;
677
+ return _context21.abrupt("return", members.entities.length === 1);
651
678
  case 4:
652
679
  case "end":
653
- return _context20.stop();
680
+ return _context21.stop();
654
681
  }
655
- }, _callee20, this);
682
+ }, _callee21, this);
656
683
  }));
657
- function isSingleFullMemberTeam(_x34) {
684
+ function isSingleFullMemberTeam(_x36) {
658
685
  return _isSingleFullMemberTeam.apply(this, arguments);
659
686
  }
660
687
  return isSingleFullMemberTeam;
@@ -662,20 +689,20 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
662
689
  }, {
663
690
  key: "createTeam",
664
691
  value: function () {
665
- var _createTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(displayName, originQuery, members) {
692
+ var _createTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(displayName, originQuery, members) {
666
693
  var membershipSettings,
667
694
  organizationId,
668
695
  err,
669
696
  url,
670
697
  legionTeam,
671
- _args21 = arguments;
672
- return _regeneratorRuntime.wrap(function _callee21$(_context21) {
673
- while (1) switch (_context21.prev = _context21.next) {
698
+ _args22 = arguments;
699
+ return _regeneratorRuntime.wrap(function _callee22$(_context22) {
700
+ while (1) switch (_context22.prev = _context22.next) {
674
701
  case 0:
675
- membershipSettings = _args21.length > 3 && _args21[3] !== undefined ? _args21[3] : 'OPEN';
702
+ membershipSettings = _args22.length > 3 && _args22[3] !== undefined ? _args22[3] : 'OPEN';
676
703
  organizationId = this.getContext().orgId;
677
704
  if (organizationId) {
678
- _context21.next = 6;
705
+ _context22.next = 6;
679
706
  break;
680
707
  }
681
708
  err = new Error('Organization ID is required');
@@ -683,7 +710,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
683
710
  throw err;
684
711
  case 6:
685
712
  url = "".concat(v4UrlPath, "?").concat(this.constructProductOriginParams(originQuery));
686
- _context21.next = 9;
713
+ _context22.next = 9;
687
714
  return this.postResource(url, {
688
715
  displayName: displayName,
689
716
  description: '',
@@ -693,15 +720,15 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
693
720
  members: _toConsumableArray(new Set(members))
694
721
  });
695
722
  case 9:
696
- legionTeam = _context21.sent;
697
- return _context21.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionTeam));
723
+ legionTeam = _context22.sent;
724
+ return _context22.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionTeam));
698
725
  case 11:
699
726
  case "end":
700
- return _context21.stop();
727
+ return _context22.stop();
701
728
  }
702
- }, _callee21, this);
729
+ }, _callee22, this);
703
730
  }));
704
- function createTeam(_x35, _x36, _x37) {
731
+ function createTeam(_x37, _x38, _x39) {
705
732
  return _createTeam.apply(this, arguments);
706
733
  }
707
734
  return createTeam;
@@ -709,15 +736,15 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
709
736
  }, {
710
737
  key: "createExternalTeam",
711
738
  value: function () {
712
- var _createExternalTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(description, externalReference, teamName, siteId) {
739
+ var _createExternalTeam = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(description, externalReference, teamName, siteId) {
713
740
  var organizationId, cloudId, err, url, legionExternalTeam;
714
- return _regeneratorRuntime.wrap(function _callee22$(_context22) {
715
- while (1) switch (_context22.prev = _context22.next) {
741
+ return _regeneratorRuntime.wrap(function _callee23$(_context23) {
742
+ while (1) switch (_context23.prev = _context23.next) {
716
743
  case 0:
717
744
  organizationId = this.getContext().orgId;
718
745
  cloudId = this.getContext().cloudId;
719
746
  if (organizationId) {
720
- _context22.next = 6;
747
+ _context23.next = 6;
721
748
  break;
722
749
  }
723
750
  err = new Error('Organization ID is required');
@@ -725,7 +752,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
725
752
  throw err;
726
753
  case 6:
727
754
  url = "".concat(v4UrlPath, "/external?origin.cloudId=").concat(encodeURIComponent(this.getCloudId(siteId || cloudId)));
728
- _context22.next = 9;
755
+ _context23.next = 9;
729
756
  return this.postResource(url, {
730
757
  description: description,
731
758
  externalReference: externalReference,
@@ -734,15 +761,15 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
734
761
  displayName: teamName
735
762
  });
736
763
  case 9:
737
- legionExternalTeam = _context22.sent;
738
- return _context22.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionExternalTeam));
764
+ legionExternalTeam = _context23.sent;
765
+ return _context23.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionExternalTeam));
739
766
  case 11:
740
767
  case "end":
741
- return _context22.stop();
768
+ return _context23.stop();
742
769
  }
743
- }, _callee22, this);
770
+ }, _callee23, this);
744
771
  }));
745
- function createExternalTeam(_x38, _x39, _x40, _x41) {
772
+ function createExternalTeam(_x40, _x41, _x42, _x43) {
746
773
  return _createExternalTeam.apply(this, arguments);
747
774
  }
748
775
  return createExternalTeam;
@@ -750,23 +777,23 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
750
777
  }, {
751
778
  key: "getTeamAndGroupDiff",
752
779
  value: function () {
753
- var _getTeamAndGroupDiff = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(teamId, externalReference) {
780
+ var _getTeamAndGroupDiff = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(teamId, externalReference) {
754
781
  var siteId;
755
- return _regeneratorRuntime.wrap(function _callee23$(_context23) {
756
- while (1) switch (_context23.prev = _context23.next) {
782
+ return _regeneratorRuntime.wrap(function _callee24$(_context24) {
783
+ while (1) switch (_context24.prev = _context24.next) {
757
784
  case 0:
758
785
  siteId = this.getCloudId();
759
- return _context23.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/diff"), {
786
+ return _context24.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/diff"), {
760
787
  siteId: siteId,
761
788
  externalReference: externalReference
762
789
  }));
763
790
  case 2:
764
791
  case "end":
765
- return _context23.stop();
792
+ return _context24.stop();
766
793
  }
767
- }, _callee23, this);
794
+ }, _callee24, this);
768
795
  }));
769
- function getTeamAndGroupDiff(_x42, _x43) {
796
+ function getTeamAndGroupDiff(_x44, _x45) {
770
797
  return _getTeamAndGroupDiff.apply(this, arguments);
771
798
  }
772
799
  return getTeamAndGroupDiff;
@@ -774,23 +801,23 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
774
801
  }, {
775
802
  key: "linkExistingTeamToGroup",
776
803
  value: function () {
777
- var _linkExistingTeamToGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(teamId, externalReference) {
804
+ var _linkExistingTeamToGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(teamId, externalReference) {
778
805
  var siteId;
779
- return _regeneratorRuntime.wrap(function _callee24$(_context24) {
780
- while (1) switch (_context24.prev = _context24.next) {
806
+ return _regeneratorRuntime.wrap(function _callee25$(_context25) {
807
+ while (1) switch (_context25.prev = _context25.next) {
781
808
  case 0:
782
809
  siteId = this.getCloudId();
783
- return _context24.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/link"), {
810
+ return _context25.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/link"), {
784
811
  externalReference: externalReference,
785
812
  siteId: siteId
786
813
  }));
787
814
  case 2:
788
815
  case "end":
789
- return _context24.stop();
816
+ return _context25.stop();
790
817
  }
791
- }, _callee24, this);
818
+ }, _callee25, this);
792
819
  }));
793
- function linkExistingTeamToGroup(_x44, _x45) {
820
+ function linkExistingTeamToGroup(_x46, _x47) {
794
821
  return _linkExistingTeamToGroup.apply(this, arguments);
795
822
  }
796
823
  return linkExistingTeamToGroup;
@@ -798,11 +825,11 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
798
825
  }, {
799
826
  key: "getWriteMediaToken",
800
827
  value: function () {
801
- var _getWriteMediaToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
802
- return _regeneratorRuntime.wrap(function _callee25$(_context25) {
803
- while (1) switch (_context25.prev = _context25.next) {
828
+ var _getWriteMediaToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
829
+ return _regeneratorRuntime.wrap(function _callee26$(_context26) {
830
+ while (1) switch (_context26.prev = _context26.next) {
804
831
  case 0:
805
- return _context25.abrupt("return", this.getResource('/v4/teams/header-image/media-upload').then(function (response) {
832
+ return _context26.abrupt("return", this.getResource('/v4/teams/header-image/media-upload').then(function (response) {
806
833
  var _response$baseUrl;
807
834
  return _objectSpread(_objectSpread({}, response), {}, {
808
835
  baseUrl: (_response$baseUrl = response.baseUrl) !== null && _response$baseUrl !== void 0 && _response$baseUrl.endsWith('/') ? response.baseUrl.slice(0, -1) : response.baseUrl
@@ -810,9 +837,9 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
810
837
  }));
811
838
  case 1:
812
839
  case "end":
813
- return _context25.stop();
840
+ return _context26.stop();
814
841
  }
815
- }, _callee25, this);
842
+ }, _callee26, this);
816
843
  }));
817
844
  function getWriteMediaToken() {
818
845
  return _getWriteMediaToken.apply(this, arguments);
@@ -822,25 +849,25 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
822
849
  }, {
823
850
  key: "getSoftDeletedTeamById",
824
851
  value: function () {
825
- var _getSoftDeletedTeamById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(teamId) {
852
+ var _getSoftDeletedTeamById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(teamId) {
826
853
  var orgId, siteId;
827
- return _regeneratorRuntime.wrap(function _callee26$(_context26) {
828
- while (1) switch (_context26.prev = _context26.next) {
854
+ return _regeneratorRuntime.wrap(function _callee27$(_context27) {
855
+ while (1) switch (_context27.prev = _context27.next) {
829
856
  case 0:
830
857
  orgId = this.getOrgId();
831
858
  siteId = this.getCloudId();
832
- return _context26.abrupt("return", this.getResource("".concat(v4UrlPath, "/org/").concat(orgId, "/soft-deleted/").concat(this.trimTeamARI(teamId), "?siteId=").concat(siteId)).then(function (response) {
859
+ return _context27.abrupt("return", this.getResource("".concat(v4UrlPath, "/org/").concat(orgId, "/soft-deleted/").concat(this.trimTeamARI(teamId), "?siteId=").concat(siteId)).then(function (response) {
833
860
  return _objectSpread(_objectSpread({}, response.teamResponse), {}, {
834
861
  id: teamId
835
862
  });
836
863
  }));
837
864
  case 3:
838
865
  case "end":
839
- return _context26.stop();
866
+ return _context27.stop();
840
867
  }
841
- }, _callee26, this);
868
+ }, _callee27, this);
842
869
  }));
843
- function getSoftDeletedTeamById(_x46) {
870
+ function getSoftDeletedTeamById(_x48) {
844
871
  return _getSoftDeletedTeamById.apply(this, arguments);
845
872
  }
846
873
  return getSoftDeletedTeamById;
@@ -851,13 +878,13 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
851
878
  }, {
852
879
  key: "getUserInSiteUserBase",
853
880
  value: (function () {
854
- var _getUserInSiteUserBase = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(userId) {
881
+ var _getUserInSiteUserBase = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(userId) {
855
882
  var siteId;
856
- return _regeneratorRuntime.wrap(function _callee27$(_context27) {
857
- while (1) switch (_context27.prev = _context27.next) {
883
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
884
+ while (1) switch (_context28.prev = _context28.next) {
858
885
  case 0:
859
886
  siteId = this.getCloudId();
860
- return _context27.abrupt("return", this.getResource("/teams/site/".concat(siteId, "/users/").concat(userId, "/exists"), {
887
+ return _context28.abrupt("return", this.getResource("/teams/site/".concat(siteId, "/users/").concat(userId, "/exists"), {
861
888
  headers: {
862
889
  Accept: 'application/json',
863
890
  'X-header-client-id': 'ptc-fe'
@@ -865,11 +892,11 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
865
892
  }));
866
893
  case 2:
867
894
  case "end":
868
- return _context27.stop();
895
+ return _context28.stop();
869
896
  }
870
- }, _callee27, this);
897
+ }, _callee28, this);
871
898
  }));
872
- function getUserInSiteUserBase(_x47) {
899
+ function getUserInSiteUserBase(_x49) {
873
900
  return _getUserInSiteUserBase.apply(this, arguments);
874
901
  }
875
902
  return getUserInSiteUserBase;
@@ -877,22 +904,22 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
877
904
  }, {
878
905
  key: "retrieveBrowseUserPermission",
879
906
  value: function () {
880
- var _retrieveBrowseUserPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(product) {
881
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
882
- while (1) switch (_context28.prev = _context28.next) {
907
+ var _retrieveBrowseUserPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(product) {
908
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
909
+ while (1) switch (_context29.prev = _context29.next) {
883
910
  case 0:
884
- return _context28.abrupt("return", this.getResourceCached("/teams/site/".concat(this.getCloudId(), "/canSearchUsers?product=").concat(product), undefined,
911
+ return _context29.abrupt("return", this.getResourceCached("/teams/site/".concat(this.getCloudId(), "/canSearchUsers?product=").concat(product), undefined,
885
912
  // 2 minute expiration, resolves duplicate calls in initial load
886
913
  {
887
914
  expiration: 1000 * 60 * 2
888
915
  }));
889
916
  case 1:
890
917
  case "end":
891
- return _context28.stop();
918
+ return _context29.stop();
892
919
  }
893
- }, _callee28, this);
920
+ }, _callee29, this);
894
921
  }));
895
- function retrieveBrowseUserPermission(_x48) {
922
+ function retrieveBrowseUserPermission(_x50) {
896
923
  return _retrieveBrowseUserPermission.apply(this, arguments);
897
924
  }
898
925
  return retrieveBrowseUserPermission;
@@ -900,27 +927,27 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
900
927
  }, {
901
928
  key: "getPermissions",
902
929
  value: function () {
903
- var _getPermissions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
930
+ var _getPermissions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30() {
904
931
  var orgId, siteId, err;
905
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
906
- while (1) switch (_context29.prev = _context29.next) {
932
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
933
+ while (1) switch (_context30.prev = _context30.next) {
907
934
  case 0:
908
935
  orgId = this.getContext().orgId;
909
936
  siteId = this.getCloudId();
910
937
  if (orgId) {
911
- _context29.next = 6;
938
+ _context30.next = 6;
912
939
  break;
913
940
  }
914
941
  err = new Error('Organization ID is required');
915
942
  this.logException(err, 'getPermissions');
916
943
  throw err;
917
944
  case 6:
918
- return _context29.abrupt("return", this.getResourceCached("".concat(v4UrlPath, "/permission/self/organization/").concat(orgId, "?siteId=").concat(siteId)));
945
+ return _context30.abrupt("return", this.getResourceCached("".concat(v4UrlPath, "/permission/self/organization/").concat(orgId, "?siteId=").concat(siteId)));
919
946
  case 7:
920
947
  case "end":
921
- return _context29.stop();
948
+ return _context30.stop();
922
949
  }
923
- }, _callee29, this);
950
+ }, _callee30, this);
924
951
  }));
925
952
  function getPermissions() {
926
953
  return _getPermissions.apply(this, arguments);
@@ -930,36 +957,36 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
930
957
  }, {
931
958
  key: "getLinkedTeamsBulk",
932
959
  value: function () {
933
- var _getLinkedTeamsBulk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(groupIds) {
960
+ var _getLinkedTeamsBulk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(groupIds) {
934
961
  var organizationId, err, legionExternalTeam;
935
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
936
- while (1) switch (_context30.prev = _context30.next) {
962
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
963
+ while (1) switch (_context31.prev = _context31.next) {
937
964
  case 0:
938
965
  organizationId = this.getContext().orgId;
939
966
  if (organizationId) {
940
- _context30.next = 5;
967
+ _context31.next = 5;
941
968
  break;
942
969
  }
943
970
  err = new Error('Organization ID is required');
944
971
  this.logException(err, 'getLinkedTeamsBulk');
945
972
  throw err;
946
973
  case 5:
947
- _context30.next = 7;
974
+ _context31.next = 7;
948
975
  return this.postResource("".concat(v4UrlPath, "/external/bulk"), {
949
976
  organizationId: organizationId,
950
977
  source: 'ATLASSIAN_GROUP',
951
978
  externalIds: groupIds
952
979
  });
953
980
  case 7:
954
- legionExternalTeam = _context30.sent;
955
- return _context30.abrupt("return", legionExternalTeam);
981
+ legionExternalTeam = _context31.sent;
982
+ return _context31.abrupt("return", legionExternalTeam);
956
983
  case 9:
957
984
  case "end":
958
- return _context30.stop();
985
+ return _context31.stop();
959
986
  }
960
- }, _callee30, this);
987
+ }, _callee31, this);
961
988
  }));
962
- function getLinkedTeamsBulk(_x49) {
989
+ function getLinkedTeamsBulk(_x51) {
963
990
  return _getLinkedTeamsBulk.apply(this, arguments);
964
991
  }
965
992
  return getLinkedTeamsBulk;
@@ -967,32 +994,32 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
967
994
  }, {
968
995
  key: "getTeamProfileDetails",
969
996
  value: function () {
970
- var _getTeamProfileDetails = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(teamId) {
997
+ var _getTeamProfileDetails = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(teamId) {
971
998
  var siteId, err, linkedTeamsProfileDetails;
972
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
973
- while (1) switch (_context31.prev = _context31.next) {
999
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1000
+ while (1) switch (_context32.prev = _context32.next) {
974
1001
  case 0:
975
1002
  siteId = this.getCloudId();
976
1003
  if (siteId) {
977
- _context31.next = 5;
1004
+ _context32.next = 5;
978
1005
  break;
979
1006
  }
980
1007
  err = new Error('Site ID is required');
981
1008
  this.logException(err, 'getTeamProfileDetails');
982
1009
  throw err;
983
1010
  case 5:
984
- _context31.next = 7;
1011
+ _context32.next = 7;
985
1012
  return this.getResource("".concat(v4UrlPath, "/").concat(teamId, "/profile?siteId=").concat(this.getCloudId()));
986
1013
  case 7:
987
- linkedTeamsProfileDetails = _context31.sent;
988
- return _context31.abrupt("return", linkedTeamsProfileDetails);
1014
+ linkedTeamsProfileDetails = _context32.sent;
1015
+ return _context32.abrupt("return", linkedTeamsProfileDetails);
989
1016
  case 9:
990
1017
  case "end":
991
- return _context31.stop();
1018
+ return _context32.stop();
992
1019
  }
993
- }, _callee31, this);
1020
+ }, _callee32, this);
994
1021
  }));
995
- function getTeamProfileDetails(_x50) {
1022
+ function getTeamProfileDetails(_x52) {
996
1023
  return _getTeamProfileDetails.apply(this, arguments);
997
1024
  }
998
1025
  return getTeamProfileDetails;
@@ -1000,30 +1027,30 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1000
1027
  }, {
1001
1028
  key: "getOrgScope",
1002
1029
  value: function () {
1003
- var _getOrgScope = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
1030
+ var _getOrgScope = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33() {
1004
1031
  var orgId, err, orgScope;
1005
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
1006
- while (1) switch (_context32.prev = _context32.next) {
1032
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
1033
+ while (1) switch (_context33.prev = _context33.next) {
1007
1034
  case 0:
1008
1035
  orgId = this.getContext().orgId;
1009
1036
  if (orgId) {
1010
- _context32.next = 5;
1037
+ _context33.next = 5;
1011
1038
  break;
1012
1039
  }
1013
1040
  err = new Error('Organization ID is required');
1014
1041
  this.logException(err, 'getOrgScope');
1015
1042
  throw err;
1016
1043
  case 5:
1017
- _context32.next = 7;
1044
+ _context33.next = 7;
1018
1045
  return this.getResourceCached("".concat(v4UrlPath, "/org/").concat(orgId, "/scope"));
1019
1046
  case 7:
1020
- orgScope = _context32.sent;
1021
- return _context32.abrupt("return", orgScope);
1047
+ orgScope = _context33.sent;
1048
+ return _context33.abrupt("return", orgScope);
1022
1049
  case 9:
1023
1050
  case "end":
1024
- return _context32.stop();
1051
+ return _context33.stop();
1025
1052
  }
1026
- }, _callee32, this);
1053
+ }, _callee33, this);
1027
1054
  }));
1028
1055
  function getOrgScope() {
1029
1056
  return _getOrgScope.apply(this, arguments);
@@ -1033,26 +1060,26 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1033
1060
  }, {
1034
1061
  key: "restoreTeamToSyncedGroup",
1035
1062
  value: function () {
1036
- var _restoreTeamToSyncedGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(teamId, externalReference) {
1063
+ var _restoreTeamToSyncedGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(teamId, externalReference) {
1037
1064
  var siteId;
1038
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
1039
- while (1) switch (_context33.prev = _context33.next) {
1065
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
1066
+ while (1) switch (_context34.prev = _context34.next) {
1040
1067
  case 0:
1041
1068
  siteId = this.getCloudId();
1042
- _context33.next = 3;
1069
+ _context34.next = 3;
1043
1070
  return this.postResource("".concat(v4UrlPath, "/").concat(teamId, "/external/restore"), {
1044
1071
  externalReference: externalReference,
1045
1072
  siteId: siteId
1046
1073
  });
1047
1074
  case 3:
1048
- return _context33.abrupt("return", _context33.sent);
1075
+ return _context34.abrupt("return", _context34.sent);
1049
1076
  case 4:
1050
1077
  case "end":
1051
- return _context33.stop();
1078
+ return _context34.stop();
1052
1079
  }
1053
- }, _callee33, this);
1080
+ }, _callee34, this);
1054
1081
  }));
1055
- function restoreTeamToSyncedGroup(_x51, _x52) {
1082
+ function restoreTeamToSyncedGroup(_x53, _x54) {
1056
1083
  return _restoreTeamToSyncedGroup.apply(this, arguments);
1057
1084
  }
1058
1085
  return restoreTeamToSyncedGroup;
@@ -1060,18 +1087,18 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1060
1087
  }, {
1061
1088
  key: "createTeamContainers",
1062
1089
  value: function () {
1063
- var _createTeamContainers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(payload) {
1064
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
1065
- while (1) switch (_context34.prev = _context34.next) {
1090
+ var _createTeamContainers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(payload) {
1091
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
1092
+ while (1) switch (_context35.prev = _context35.next) {
1066
1093
  case 0:
1067
- return _context34.abrupt("return", this.postResource("".concat(v4UrlPath, "/containers"), _objectSpread({}, payload)));
1094
+ return _context35.abrupt("return", this.postResource("".concat(v4UrlPath, "/containers"), _objectSpread({}, payload)));
1068
1095
  case 1:
1069
1096
  case "end":
1070
- return _context34.stop();
1097
+ return _context35.stop();
1071
1098
  }
1072
- }, _callee34, this);
1099
+ }, _callee35, this);
1073
1100
  }));
1074
- function createTeamContainers(_x53) {
1101
+ function createTeamContainers(_x55) {
1075
1102
  return _createTeamContainers.apply(this, arguments);
1076
1103
  }
1077
1104
  return createTeamContainers;