@atlaskit/teams-client 4.22.0 → 4.24.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.
@@ -706,6 +706,27 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
706
706
  }
707
707
  return unArchiveTeam;
708
708
  }()
709
+ }, {
710
+ key: "unlinkTeamFromGroup",
711
+ value: function () {
712
+ var _unlinkTeamFromGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(teamId, membershipSettings) {
713
+ return _regenerator.default.wrap(function _callee23$(_context23) {
714
+ while (1) switch (_context23.prev = _context23.next) {
715
+ case 0:
716
+ return _context23.abrupt("return", this.patchResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId)), {
717
+ membershipSettings: membershipSettings
718
+ }));
719
+ case 1:
720
+ case "end":
721
+ return _context23.stop();
722
+ }
723
+ }, _callee23, this);
724
+ }));
725
+ function unlinkTeamFromGroup(_x38, _x39) {
726
+ return _unlinkTeamFromGroup.apply(this, arguments);
727
+ }
728
+ return unlinkTeamFromGroup;
729
+ }()
709
730
  /**
710
731
  * @private
711
732
  * @deprecated should be other means to solve this issue
@@ -713,23 +734,23 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
713
734
  }, {
714
735
  key: "isSingleFullMemberTeam",
715
736
  value: (function () {
716
- var _isSingleFullMemberTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(teamId) {
737
+ var _isSingleFullMemberTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(teamId) {
717
738
  var members;
718
- return _regenerator.default.wrap(function _callee23$(_context23) {
719
- while (1) switch (_context23.prev = _context23.next) {
739
+ return _regenerator.default.wrap(function _callee24$(_context24) {
740
+ while (1) switch (_context24.prev = _context24.next) {
720
741
  case 0:
721
- _context23.next = 2;
742
+ _context24.next = 2;
722
743
  return this.getResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/members?size=2&membershipState=FULL_MEMBER&siteId=").concat(this.getCloudId()));
723
744
  case 2:
724
- members = _context23.sent;
725
- return _context23.abrupt("return", members.entities.length === 1);
745
+ members = _context24.sent;
746
+ return _context24.abrupt("return", members.entities.length === 1);
726
747
  case 4:
727
748
  case "end":
728
- return _context23.stop();
749
+ return _context24.stop();
729
750
  }
730
- }, _callee23, this);
751
+ }, _callee24, this);
731
752
  }));
732
- function isSingleFullMemberTeam(_x38) {
753
+ function isSingleFullMemberTeam(_x40) {
733
754
  return _isSingleFullMemberTeam.apply(this, arguments);
734
755
  }
735
756
  return isSingleFullMemberTeam;
@@ -737,46 +758,49 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
737
758
  }, {
738
759
  key: "createTeam",
739
760
  value: function () {
740
- var _createTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(displayName, originQuery, members) {
761
+ var _createTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(displayName, originQuery, members) {
741
762
  var membershipSettings,
763
+ typeId,
742
764
  organizationId,
743
765
  err,
744
766
  url,
745
767
  legionTeam,
746
- _args24 = arguments;
747
- return _regenerator.default.wrap(function _callee24$(_context24) {
748
- while (1) switch (_context24.prev = _context24.next) {
768
+ _args25 = arguments;
769
+ return _regenerator.default.wrap(function _callee25$(_context25) {
770
+ while (1) switch (_context25.prev = _context25.next) {
749
771
  case 0:
750
- membershipSettings = _args24.length > 3 && _args24[3] !== undefined ? _args24[3] : 'OPEN';
772
+ membershipSettings = _args25.length > 3 && _args25[3] !== undefined ? _args25[3] : 'OPEN';
773
+ typeId = _args25.length > 4 ? _args25[4] : undefined;
751
774
  organizationId = this.getContext().orgId;
752
775
  if (organizationId) {
753
- _context24.next = 6;
776
+ _context25.next = 7;
754
777
  break;
755
778
  }
756
779
  err = new Error('Organization ID is required');
757
780
  this.logException(err, 'createTeam');
758
781
  throw err;
759
- case 6:
782
+ case 7:
760
783
  url = "".concat(v4UrlPath, "?").concat(this.constructProductOriginParams(originQuery));
761
- _context24.next = 9;
784
+ _context25.next = 10;
762
785
  return this.postResource(url, {
763
786
  displayName: displayName,
764
787
  description: '',
765
788
  membershipSettings: membershipSettings,
766
789
  siteId: this.getCloudId(),
767
790
  organizationId: organizationId,
768
- members: (0, _toConsumableArray2.default)(new Set(members))
791
+ members: (0, _toConsumableArray2.default)(new Set(members)),
792
+ typeId: typeId
769
793
  });
770
- case 9:
771
- legionTeam = _context24.sent;
772
- return _context24.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionTeam));
773
- case 11:
794
+ case 10:
795
+ legionTeam = _context25.sent;
796
+ return _context25.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionTeam));
797
+ case 12:
774
798
  case "end":
775
- return _context24.stop();
799
+ return _context25.stop();
776
800
  }
777
- }, _callee24, this);
801
+ }, _callee25, this);
778
802
  }));
779
- function createTeam(_x39, _x40, _x41) {
803
+ function createTeam(_x41, _x42, _x43) {
780
804
  return _createTeam.apply(this, arguments);
781
805
  }
782
806
  return createTeam;
@@ -784,15 +808,15 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
784
808
  }, {
785
809
  key: "createExternalTeam",
786
810
  value: function () {
787
- var _createExternalTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(description, externalReference, teamName, siteId) {
811
+ var _createExternalTeam = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(description, externalReference, teamName, siteId) {
788
812
  var organizationId, cloudId, err, url, legionExternalTeam;
789
- return _regenerator.default.wrap(function _callee25$(_context25) {
790
- while (1) switch (_context25.prev = _context25.next) {
813
+ return _regenerator.default.wrap(function _callee26$(_context26) {
814
+ while (1) switch (_context26.prev = _context26.next) {
791
815
  case 0:
792
816
  organizationId = this.getContext().orgId;
793
817
  cloudId = this.getContext().cloudId;
794
818
  if (organizationId) {
795
- _context25.next = 6;
819
+ _context26.next = 6;
796
820
  break;
797
821
  }
798
822
  err = new Error('Organization ID is required');
@@ -800,7 +824,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
800
824
  throw err;
801
825
  case 6:
802
826
  url = "".concat(v4UrlPath, "/external?origin.cloudId=").concat(encodeURIComponent(this.getCloudId(siteId || cloudId)));
803
- _context25.next = 9;
827
+ _context26.next = 9;
804
828
  return this.postResource(url, {
805
829
  description: description,
806
830
  externalReference: externalReference,
@@ -809,15 +833,15 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
809
833
  displayName: teamName
810
834
  });
811
835
  case 9:
812
- legionExternalTeam = _context25.sent;
813
- return _context25.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionExternalTeam));
836
+ legionExternalTeam = _context26.sent;
837
+ return _context26.abrupt("return", this.mapTeamCreateResponseV4ToTeam(legionExternalTeam));
814
838
  case 11:
815
839
  case "end":
816
- return _context25.stop();
840
+ return _context26.stop();
817
841
  }
818
- }, _callee25, this);
842
+ }, _callee26, this);
819
843
  }));
820
- function createExternalTeam(_x42, _x43, _x44, _x45) {
844
+ function createExternalTeam(_x44, _x45, _x46, _x47) {
821
845
  return _createExternalTeam.apply(this, arguments);
822
846
  }
823
847
  return createExternalTeam;
@@ -825,23 +849,23 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
825
849
  }, {
826
850
  key: "getTeamAndGroupDiff",
827
851
  value: function () {
828
- var _getTeamAndGroupDiff = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(teamId, externalReference) {
852
+ var _getTeamAndGroupDiff = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(teamId, externalReference) {
829
853
  var siteId;
830
- return _regenerator.default.wrap(function _callee26$(_context26) {
831
- while (1) switch (_context26.prev = _context26.next) {
854
+ return _regenerator.default.wrap(function _callee27$(_context27) {
855
+ while (1) switch (_context27.prev = _context27.next) {
832
856
  case 0:
833
857
  siteId = this.getCloudId();
834
- return _context26.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/diff"), {
858
+ return _context27.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/diff"), {
835
859
  siteId: siteId,
836
860
  externalReference: externalReference
837
861
  }));
838
862
  case 2:
839
863
  case "end":
840
- return _context26.stop();
864
+ return _context27.stop();
841
865
  }
842
- }, _callee26, this);
866
+ }, _callee27, this);
843
867
  }));
844
- function getTeamAndGroupDiff(_x46, _x47) {
868
+ function getTeamAndGroupDiff(_x48, _x49) {
845
869
  return _getTeamAndGroupDiff.apply(this, arguments);
846
870
  }
847
871
  return getTeamAndGroupDiff;
@@ -849,23 +873,23 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
849
873
  }, {
850
874
  key: "linkExistingTeamToGroup",
851
875
  value: function () {
852
- var _linkExistingTeamToGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(teamId, externalReference) {
876
+ var _linkExistingTeamToGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(teamId, externalReference) {
853
877
  var siteId;
854
- return _regenerator.default.wrap(function _callee27$(_context27) {
855
- while (1) switch (_context27.prev = _context27.next) {
878
+ return _regenerator.default.wrap(function _callee28$(_context28) {
879
+ while (1) switch (_context28.prev = _context28.next) {
856
880
  case 0:
857
881
  siteId = this.getCloudId();
858
- return _context27.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/link"), {
882
+ return _context28.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/external/link"), {
859
883
  externalReference: externalReference,
860
884
  siteId: siteId
861
885
  }));
862
886
  case 2:
863
887
  case "end":
864
- return _context27.stop();
888
+ return _context28.stop();
865
889
  }
866
- }, _callee27, this);
890
+ }, _callee28, this);
867
891
  }));
868
- function linkExistingTeamToGroup(_x48, _x49) {
892
+ function linkExistingTeamToGroup(_x50, _x51) {
869
893
  return _linkExistingTeamToGroup.apply(this, arguments);
870
894
  }
871
895
  return linkExistingTeamToGroup;
@@ -873,11 +897,11 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
873
897
  }, {
874
898
  key: "getWriteMediaToken",
875
899
  value: function () {
876
- var _getWriteMediaToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
877
- return _regenerator.default.wrap(function _callee28$(_context28) {
878
- while (1) switch (_context28.prev = _context28.next) {
900
+ var _getWriteMediaToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
901
+ return _regenerator.default.wrap(function _callee29$(_context29) {
902
+ while (1) switch (_context29.prev = _context29.next) {
879
903
  case 0:
880
- return _context28.abrupt("return", this.getResource('/v4/teams/header-image/media-upload').then(function (response) {
904
+ return _context29.abrupt("return", this.getResource('/v4/teams/header-image/media-upload').then(function (response) {
881
905
  var _response$baseUrl;
882
906
  return _objectSpread(_objectSpread({}, response), {}, {
883
907
  baseUrl: (_response$baseUrl = response.baseUrl) !== null && _response$baseUrl !== void 0 && _response$baseUrl.endsWith('/') ? response.baseUrl.slice(0, -1) : response.baseUrl
@@ -885,9 +909,9 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
885
909
  }));
886
910
  case 1:
887
911
  case "end":
888
- return _context28.stop();
912
+ return _context29.stop();
889
913
  }
890
- }, _callee28, this);
914
+ }, _callee29, this);
891
915
  }));
892
916
  function getWriteMediaToken() {
893
917
  return _getWriteMediaToken.apply(this, arguments);
@@ -897,25 +921,25 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
897
921
  }, {
898
922
  key: "getSoftDeletedTeamById",
899
923
  value: function () {
900
- var _getSoftDeletedTeamById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(teamId) {
924
+ var _getSoftDeletedTeamById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(teamId) {
901
925
  var orgId, siteId;
902
- return _regenerator.default.wrap(function _callee29$(_context29) {
903
- while (1) switch (_context29.prev = _context29.next) {
926
+ return _regenerator.default.wrap(function _callee30$(_context30) {
927
+ while (1) switch (_context30.prev = _context30.next) {
904
928
  case 0:
905
929
  orgId = this.getOrgId();
906
930
  siteId = this.getCloudId();
907
- return _context29.abrupt("return", this.getResource("".concat(v4UrlPath, "/org/").concat(orgId, "/soft-deleted/").concat(this.trimTeamARI(teamId), "?siteId=").concat(siteId)).then(function (response) {
931
+ return _context30.abrupt("return", this.getResource("".concat(v4UrlPath, "/org/").concat(orgId, "/soft-deleted/").concat(this.trimTeamARI(teamId), "?siteId=").concat(siteId)).then(function (response) {
908
932
  return _objectSpread(_objectSpread({}, response.teamResponse), {}, {
909
933
  id: teamId
910
934
  });
911
935
  }));
912
936
  case 3:
913
937
  case "end":
914
- return _context29.stop();
938
+ return _context30.stop();
915
939
  }
916
- }, _callee29, this);
940
+ }, _callee30, this);
917
941
  }));
918
- function getSoftDeletedTeamById(_x50) {
942
+ function getSoftDeletedTeamById(_x52) {
919
943
  return _getSoftDeletedTeamById.apply(this, arguments);
920
944
  }
921
945
  return getSoftDeletedTeamById;
@@ -926,13 +950,13 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
926
950
  }, {
927
951
  key: "getUserInSiteUserBase",
928
952
  value: (function () {
929
- var _getUserInSiteUserBase = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(userId) {
953
+ var _getUserInSiteUserBase = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(userId) {
930
954
  var siteId;
931
- return _regenerator.default.wrap(function _callee30$(_context30) {
932
- while (1) switch (_context30.prev = _context30.next) {
955
+ return _regenerator.default.wrap(function _callee31$(_context31) {
956
+ while (1) switch (_context31.prev = _context31.next) {
933
957
  case 0:
934
958
  siteId = this.getCloudId();
935
- return _context30.abrupt("return", this.getResource("/teams/site/".concat(siteId, "/users/").concat(userId, "/exists"), {
959
+ return _context31.abrupt("return", this.getResource("/teams/site/".concat(siteId, "/users/").concat(userId, "/exists"), {
936
960
  headers: {
937
961
  Accept: 'application/json',
938
962
  'X-header-client-id': 'ptc-fe'
@@ -940,11 +964,11 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
940
964
  }));
941
965
  case 2:
942
966
  case "end":
943
- return _context30.stop();
967
+ return _context31.stop();
944
968
  }
945
- }, _callee30, this);
969
+ }, _callee31, this);
946
970
  }));
947
- function getUserInSiteUserBase(_x51) {
971
+ function getUserInSiteUserBase(_x53) {
948
972
  return _getUserInSiteUserBase.apply(this, arguments);
949
973
  }
950
974
  return getUserInSiteUserBase;
@@ -952,22 +976,22 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
952
976
  }, {
953
977
  key: "retrieveBrowseUserPermission",
954
978
  value: function () {
955
- var _retrieveBrowseUserPermission = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(product) {
956
- return _regenerator.default.wrap(function _callee31$(_context31) {
957
- while (1) switch (_context31.prev = _context31.next) {
979
+ var _retrieveBrowseUserPermission = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(product) {
980
+ return _regenerator.default.wrap(function _callee32$(_context32) {
981
+ while (1) switch (_context32.prev = _context32.next) {
958
982
  case 0:
959
- return _context31.abrupt("return", this.getResourceCached("/teams/site/".concat(this.getCloudId(), "/canSearchUsers?product=").concat(product), undefined,
983
+ return _context32.abrupt("return", this.getResourceCached("/teams/site/".concat(this.getCloudId(), "/canSearchUsers?product=").concat(product), undefined,
960
984
  // 2 minute expiration, resolves duplicate calls in initial load
961
985
  {
962
986
  expiration: 1000 * 60 * 2
963
987
  }));
964
988
  case 1:
965
989
  case "end":
966
- return _context31.stop();
990
+ return _context32.stop();
967
991
  }
968
- }, _callee31, this);
992
+ }, _callee32, this);
969
993
  }));
970
- function retrieveBrowseUserPermission(_x52) {
994
+ function retrieveBrowseUserPermission(_x54) {
971
995
  return _retrieveBrowseUserPermission.apply(this, arguments);
972
996
  }
973
997
  return retrieveBrowseUserPermission;
@@ -975,27 +999,27 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
975
999
  }, {
976
1000
  key: "getPermissions",
977
1001
  value: function () {
978
- var _getPermissions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
1002
+ var _getPermissions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
979
1003
  var orgId, siteId, err;
980
- return _regenerator.default.wrap(function _callee32$(_context32) {
981
- while (1) switch (_context32.prev = _context32.next) {
1004
+ return _regenerator.default.wrap(function _callee33$(_context33) {
1005
+ while (1) switch (_context33.prev = _context33.next) {
982
1006
  case 0:
983
1007
  orgId = this.getContext().orgId;
984
1008
  siteId = this.getCloudId();
985
1009
  if (orgId) {
986
- _context32.next = 6;
1010
+ _context33.next = 6;
987
1011
  break;
988
1012
  }
989
1013
  err = new Error('Organization ID is required');
990
1014
  this.logException(err, 'getPermissions');
991
1015
  throw err;
992
1016
  case 6:
993
- return _context32.abrupt("return", this.getResourceCached("".concat(v4UrlPath, "/permission/self/organization/").concat(orgId, "?siteId=").concat(siteId)));
1017
+ return _context33.abrupt("return", this.getResourceCached("".concat(v4UrlPath, "/permission/self/organization/").concat(orgId, "?siteId=").concat(siteId)));
994
1018
  case 7:
995
1019
  case "end":
996
- return _context32.stop();
1020
+ return _context33.stop();
997
1021
  }
998
- }, _callee32, this);
1022
+ }, _callee33, this);
999
1023
  }));
1000
1024
  function getPermissions() {
1001
1025
  return _getPermissions.apply(this, arguments);
@@ -1005,36 +1029,36 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1005
1029
  }, {
1006
1030
  key: "getLinkedTeamsBulk",
1007
1031
  value: function () {
1008
- var _getLinkedTeamsBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(groupIds) {
1032
+ var _getLinkedTeamsBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(groupIds) {
1009
1033
  var organizationId, err, legionExternalTeam;
1010
- return _regenerator.default.wrap(function _callee33$(_context33) {
1011
- while (1) switch (_context33.prev = _context33.next) {
1034
+ return _regenerator.default.wrap(function _callee34$(_context34) {
1035
+ while (1) switch (_context34.prev = _context34.next) {
1012
1036
  case 0:
1013
1037
  organizationId = this.getContext().orgId;
1014
1038
  if (organizationId) {
1015
- _context33.next = 5;
1039
+ _context34.next = 5;
1016
1040
  break;
1017
1041
  }
1018
1042
  err = new Error('Organization ID is required');
1019
1043
  this.logException(err, 'getLinkedTeamsBulk');
1020
1044
  throw err;
1021
1045
  case 5:
1022
- _context33.next = 7;
1046
+ _context34.next = 7;
1023
1047
  return this.postResource("".concat(v4UrlPath, "/external/bulk"), {
1024
1048
  organizationId: organizationId,
1025
1049
  source: 'ATLASSIAN_GROUP',
1026
1050
  externalIds: groupIds
1027
1051
  });
1028
1052
  case 7:
1029
- legionExternalTeam = _context33.sent;
1030
- return _context33.abrupt("return", legionExternalTeam);
1053
+ legionExternalTeam = _context34.sent;
1054
+ return _context34.abrupt("return", legionExternalTeam);
1031
1055
  case 9:
1032
1056
  case "end":
1033
- return _context33.stop();
1057
+ return _context34.stop();
1034
1058
  }
1035
- }, _callee33, this);
1059
+ }, _callee34, this);
1036
1060
  }));
1037
- function getLinkedTeamsBulk(_x53) {
1061
+ function getLinkedTeamsBulk(_x55) {
1038
1062
  return _getLinkedTeamsBulk.apply(this, arguments);
1039
1063
  }
1040
1064
  return getLinkedTeamsBulk;
@@ -1042,32 +1066,32 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1042
1066
  }, {
1043
1067
  key: "getTeamProfileDetails",
1044
1068
  value: function () {
1045
- var _getTeamProfileDetails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(teamId, siteId) {
1069
+ var _getTeamProfileDetails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(teamId, siteId) {
1046
1070
  var finalSiteId, err, linkedTeamsProfileDetails;
1047
- return _regenerator.default.wrap(function _callee34$(_context34) {
1048
- while (1) switch (_context34.prev = _context34.next) {
1071
+ return _regenerator.default.wrap(function _callee35$(_context35) {
1072
+ while (1) switch (_context35.prev = _context35.next) {
1049
1073
  case 0:
1050
1074
  finalSiteId = siteId || this.getCloudId();
1051
1075
  if (finalSiteId) {
1052
- _context34.next = 5;
1076
+ _context35.next = 5;
1053
1077
  break;
1054
1078
  }
1055
1079
  err = new Error('Site ID is required');
1056
1080
  this.logException(err, 'getTeamProfileDetails');
1057
1081
  throw err;
1058
1082
  case 5:
1059
- _context34.next = 7;
1083
+ _context35.next = 7;
1060
1084
  return this.getResource("".concat(v4UrlPath, "/").concat(teamId, "/profile?siteId=").concat(finalSiteId));
1061
1085
  case 7:
1062
- linkedTeamsProfileDetails = _context34.sent;
1063
- return _context34.abrupt("return", linkedTeamsProfileDetails);
1086
+ linkedTeamsProfileDetails = _context35.sent;
1087
+ return _context35.abrupt("return", linkedTeamsProfileDetails);
1064
1088
  case 9:
1065
1089
  case "end":
1066
- return _context34.stop();
1090
+ return _context35.stop();
1067
1091
  }
1068
- }, _callee34, this);
1092
+ }, _callee35, this);
1069
1093
  }));
1070
- function getTeamProfileDetails(_x54, _x55) {
1094
+ function getTeamProfileDetails(_x56, _x57) {
1071
1095
  return _getTeamProfileDetails.apply(this, arguments);
1072
1096
  }
1073
1097
  return getTeamProfileDetails;
@@ -1075,30 +1099,30 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1075
1099
  }, {
1076
1100
  key: "getOrgScope",
1077
1101
  value: function () {
1078
- var _getOrgScope = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35() {
1102
+ var _getOrgScope = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
1079
1103
  var orgId, err, orgScope;
1080
- return _regenerator.default.wrap(function _callee35$(_context35) {
1081
- while (1) switch (_context35.prev = _context35.next) {
1104
+ return _regenerator.default.wrap(function _callee36$(_context36) {
1105
+ while (1) switch (_context36.prev = _context36.next) {
1082
1106
  case 0:
1083
1107
  orgId = this.getContext().orgId;
1084
1108
  if (orgId) {
1085
- _context35.next = 5;
1109
+ _context36.next = 5;
1086
1110
  break;
1087
1111
  }
1088
1112
  err = new Error('Organization ID is required');
1089
1113
  this.logException(err, 'getOrgScope');
1090
1114
  throw err;
1091
1115
  case 5:
1092
- _context35.next = 7;
1116
+ _context36.next = 7;
1093
1117
  return this.getResourceCached("".concat(v4UrlPath, "/org/").concat(orgId, "/scope"));
1094
1118
  case 7:
1095
- orgScope = _context35.sent;
1096
- return _context35.abrupt("return", orgScope);
1119
+ orgScope = _context36.sent;
1120
+ return _context36.abrupt("return", orgScope);
1097
1121
  case 9:
1098
1122
  case "end":
1099
- return _context35.stop();
1123
+ return _context36.stop();
1100
1124
  }
1101
- }, _callee35, this);
1125
+ }, _callee36, this);
1102
1126
  }));
1103
1127
  function getOrgScope() {
1104
1128
  return _getOrgScope.apply(this, arguments);
@@ -1108,26 +1132,26 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1108
1132
  }, {
1109
1133
  key: "restoreTeamToSyncedGroup",
1110
1134
  value: function () {
1111
- var _restoreTeamToSyncedGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(teamId, externalReference) {
1135
+ var _restoreTeamToSyncedGroup = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(teamId, externalReference) {
1112
1136
  var siteId;
1113
- return _regenerator.default.wrap(function _callee36$(_context36) {
1114
- while (1) switch (_context36.prev = _context36.next) {
1137
+ return _regenerator.default.wrap(function _callee37$(_context37) {
1138
+ while (1) switch (_context37.prev = _context37.next) {
1115
1139
  case 0:
1116
1140
  siteId = this.getCloudId();
1117
- _context36.next = 3;
1141
+ _context37.next = 3;
1118
1142
  return this.postResource("".concat(v4UrlPath, "/").concat(teamId, "/external/restore"), {
1119
1143
  externalReference: externalReference,
1120
1144
  siteId: siteId
1121
1145
  });
1122
1146
  case 3:
1123
- return _context36.abrupt("return", _context36.sent);
1147
+ return _context37.abrupt("return", _context37.sent);
1124
1148
  case 4:
1125
1149
  case "end":
1126
- return _context36.stop();
1150
+ return _context37.stop();
1127
1151
  }
1128
- }, _callee36, this);
1152
+ }, _callee37, this);
1129
1153
  }));
1130
- function restoreTeamToSyncedGroup(_x56, _x57) {
1154
+ function restoreTeamToSyncedGroup(_x58, _x59) {
1131
1155
  return _restoreTeamToSyncedGroup.apply(this, arguments);
1132
1156
  }
1133
1157
  return restoreTeamToSyncedGroup;
@@ -1135,18 +1159,18 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1135
1159
  }, {
1136
1160
  key: "createTeamContainers",
1137
1161
  value: function () {
1138
- var _createTeamContainers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(payload) {
1139
- return _regenerator.default.wrap(function _callee37$(_context37) {
1140
- while (1) switch (_context37.prev = _context37.next) {
1162
+ var _createTeamContainers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(payload) {
1163
+ return _regenerator.default.wrap(function _callee38$(_context38) {
1164
+ while (1) switch (_context38.prev = _context38.next) {
1141
1165
  case 0:
1142
- return _context37.abrupt("return", this.postResource("".concat(v4UrlPath, "/containers"), _objectSpread({}, payload)));
1166
+ return _context38.abrupt("return", this.postResource("".concat(v4UrlPath, "/containers"), _objectSpread({}, payload)));
1143
1167
  case 1:
1144
1168
  case "end":
1145
- return _context37.stop();
1169
+ return _context38.stop();
1146
1170
  }
1147
- }, _callee37, this);
1171
+ }, _callee38, this);
1148
1172
  }));
1149
- function createTeamContainers(_x58) {
1173
+ function createTeamContainers(_x60) {
1150
1174
  return _createTeamContainers.apply(this, arguments);
1151
1175
  }
1152
1176
  return createTeamContainers;
@@ -1154,23 +1178,23 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1154
1178
  }, {
1155
1179
  key: "getTeamEnabledSites",
1156
1180
  value: function () {
1157
- var _getTeamEnabledSites = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(teamId) {
1181
+ var _getTeamEnabledSites = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(teamId) {
1158
1182
  var teamEnabledSites;
1159
- return _regenerator.default.wrap(function _callee38$(_context38) {
1160
- while (1) switch (_context38.prev = _context38.next) {
1183
+ return _regenerator.default.wrap(function _callee39$(_context39) {
1184
+ while (1) switch (_context39.prev = _context39.next) {
1161
1185
  case 0:
1162
- _context38.next = 2;
1186
+ _context39.next = 2;
1163
1187
  return this.getResourceCached("".concat(v4UrlPath, "/migrations/scope/").concat(teamId));
1164
1188
  case 2:
1165
- teamEnabledSites = _context38.sent;
1166
- return _context38.abrupt("return", teamEnabledSites);
1189
+ teamEnabledSites = _context39.sent;
1190
+ return _context39.abrupt("return", teamEnabledSites);
1167
1191
  case 4:
1168
1192
  case "end":
1169
- return _context38.stop();
1193
+ return _context39.stop();
1170
1194
  }
1171
- }, _callee38, this);
1195
+ }, _callee39, this);
1172
1196
  }));
1173
- function getTeamEnabledSites(_x59) {
1197
+ function getTeamEnabledSites(_x61) {
1174
1198
  return _getTeamEnabledSites.apply(this, arguments);
1175
1199
  }
1176
1200
  return getTeamEnabledSites;
@@ -1178,26 +1202,26 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1178
1202
  }, {
1179
1203
  key: "assignTeamsToSites",
1180
1204
  value: function () {
1181
- var _assignTeamsToSites = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(migrations) {
1205
+ var _assignTeamsToSites = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(migrations) {
1182
1206
  var assignTeamsToSitesResponse;
1183
- return _regenerator.default.wrap(function _callee39$(_context39) {
1184
- while (1) switch (_context39.prev = _context39.next) {
1207
+ return _regenerator.default.wrap(function _callee40$(_context40) {
1208
+ while (1) switch (_context40.prev = _context40.next) {
1185
1209
  case 0:
1186
- _context39.next = 2;
1210
+ _context40.next = 2;
1187
1211
  return this.postResource("".concat(v4UrlPath, "/migrations/scope"), {
1188
1212
  originOrgId: this.getContext().orgId,
1189
1213
  migrations: migrations
1190
1214
  });
1191
1215
  case 2:
1192
- assignTeamsToSitesResponse = _context39.sent;
1193
- return _context39.abrupt("return", assignTeamsToSitesResponse);
1216
+ assignTeamsToSitesResponse = _context40.sent;
1217
+ return _context40.abrupt("return", assignTeamsToSitesResponse);
1194
1218
  case 4:
1195
1219
  case "end":
1196
- return _context39.stop();
1220
+ return _context40.stop();
1197
1221
  }
1198
- }, _callee39, this);
1222
+ }, _callee40, this);
1199
1223
  }));
1200
- function assignTeamsToSites(_x60) {
1224
+ function assignTeamsToSites(_x62) {
1201
1225
  return _assignTeamsToSites.apply(this, arguments);
1202
1226
  }
1203
1227
  return assignTeamsToSites;
@@ -1205,21 +1229,21 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1205
1229
  }, {
1206
1230
  key: "getTeamsToBeClonedToJsmSites",
1207
1231
  value: function () {
1208
- var _getTeamsToBeClonedToJsmSites = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(teamsToSiteScope) {
1209
- return _regenerator.default.wrap(function _callee40$(_context40) {
1210
- while (1) switch (_context40.prev = _context40.next) {
1232
+ var _getTeamsToBeClonedToJsmSites = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(teamsToSiteScope) {
1233
+ return _regenerator.default.wrap(function _callee41$(_context41) {
1234
+ while (1) switch (_context41.prev = _context41.next) {
1211
1235
  case 0:
1212
- return _context40.abrupt("return", this.postResource("".concat(v4UrlPath, "/migrations/scope/review"), {
1236
+ return _context41.abrupt("return", this.postResource("".concat(v4UrlPath, "/migrations/scope/review"), {
1213
1237
  orgId: this.getContext().orgId,
1214
1238
  teamsToSiteScope: teamsToSiteScope
1215
1239
  }));
1216
1240
  case 1:
1217
1241
  case "end":
1218
- return _context40.stop();
1242
+ return _context41.stop();
1219
1243
  }
1220
- }, _callee40, this);
1244
+ }, _callee41, this);
1221
1245
  }));
1222
- function getTeamsToBeClonedToJsmSites(_x61) {
1246
+ function getTeamsToBeClonedToJsmSites(_x63) {
1223
1247
  return _getTeamsToBeClonedToJsmSites.apply(this, arguments);
1224
1248
  }
1225
1249
  return getTeamsToBeClonedToJsmSites;
@@ -1227,21 +1251,21 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1227
1251
  }, {
1228
1252
  key: "setTeamSiteAssignmentPermission",
1229
1253
  value: function () {
1230
- var _setTeamSiteAssignmentPermission = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(orgId, alignmentPermission) {
1231
- return _regenerator.default.wrap(function _callee41$(_context41) {
1232
- while (1) switch (_context41.prev = _context41.next) {
1254
+ var _setTeamSiteAssignmentPermission = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(orgId, alignmentPermission) {
1255
+ return _regenerator.default.wrap(function _callee42$(_context42) {
1256
+ while (1) switch (_context42.prev = _context42.next) {
1233
1257
  case 0:
1234
- return _context41.abrupt("return", this.postResource("".concat(v4UrlPath, "/migrations/scope/permissions"), {
1258
+ return _context42.abrupt("return", this.postResource("".concat(v4UrlPath, "/migrations/scope/permissions"), {
1235
1259
  orgId: orgId,
1236
1260
  alignmentPermission: alignmentPermission
1237
1261
  }));
1238
1262
  case 1:
1239
1263
  case "end":
1240
- return _context41.stop();
1264
+ return _context42.stop();
1241
1265
  }
1242
- }, _callee41, this);
1266
+ }, _callee42, this);
1243
1267
  }));
1244
- function setTeamSiteAssignmentPermission(_x62, _x63) {
1268
+ function setTeamSiteAssignmentPermission(_x64, _x65) {
1245
1269
  return _setTeamSiteAssignmentPermission.apply(this, arguments);
1246
1270
  }
1247
1271
  return setTeamSiteAssignmentPermission;
@@ -1249,12 +1273,12 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1249
1273
  }, {
1250
1274
  key: "getAssignedTeams",
1251
1275
  value: function () {
1252
- var _getAssignedTeams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(orgId, count, cursor, displayNameContains) {
1276
+ var _getAssignedTeams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43(orgId, count, cursor, displayNameContains) {
1253
1277
  var assignedTeamsResponse;
1254
- return _regenerator.default.wrap(function _callee42$(_context42) {
1255
- while (1) switch (_context42.prev = _context42.next) {
1278
+ return _regenerator.default.wrap(function _callee43$(_context43) {
1279
+ while (1) switch (_context43.prev = _context43.next) {
1256
1280
  case 0:
1257
- _context42.next = 2;
1281
+ _context43.next = 2;
1258
1282
  return this.postResource("".concat(v4UrlPath, "/migrations/scope/aligned/search"), {
1259
1283
  orgId: orgId,
1260
1284
  count: count,
@@ -1262,15 +1286,15 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1262
1286
  displayNameContains: displayNameContains
1263
1287
  });
1264
1288
  case 2:
1265
- assignedTeamsResponse = _context42.sent;
1266
- return _context42.abrupt("return", assignedTeamsResponse);
1289
+ assignedTeamsResponse = _context43.sent;
1290
+ return _context43.abrupt("return", assignedTeamsResponse);
1267
1291
  case 4:
1268
1292
  case "end":
1269
- return _context42.stop();
1293
+ return _context43.stop();
1270
1294
  }
1271
- }, _callee42, this);
1295
+ }, _callee43, this);
1272
1296
  }));
1273
- function getAssignedTeams(_x64, _x65, _x66, _x67) {
1297
+ function getAssignedTeams(_x66, _x67, _x68, _x69) {
1274
1298
  return _getAssignedTeams.apply(this, arguments);
1275
1299
  }
1276
1300
  return getAssignedTeams;
@@ -1278,12 +1302,12 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1278
1302
  }, {
1279
1303
  key: "getUnassignedTeams",
1280
1304
  value: function () {
1281
- var _getUnassignedTeams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43(orgId, count, cursor, query) {
1305
+ var _getUnassignedTeams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44(orgId, count, cursor, query) {
1282
1306
  var unassignedTeamsResponse;
1283
- return _regenerator.default.wrap(function _callee43$(_context43) {
1284
- while (1) switch (_context43.prev = _context43.next) {
1307
+ return _regenerator.default.wrap(function _callee44$(_context44) {
1308
+ while (1) switch (_context44.prev = _context44.next) {
1285
1309
  case 0:
1286
- _context43.next = 2;
1310
+ _context44.next = 2;
1287
1311
  return this.postResource("".concat(v4UrlPath, "/migrations/scope/unaligned/search"), {
1288
1312
  orgId: orgId,
1289
1313
  count: count,
@@ -1291,15 +1315,15 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1291
1315
  query: query
1292
1316
  });
1293
1317
  case 2:
1294
- unassignedTeamsResponse = _context43.sent;
1295
- return _context43.abrupt("return", unassignedTeamsResponse);
1318
+ unassignedTeamsResponse = _context44.sent;
1319
+ return _context44.abrupt("return", unassignedTeamsResponse);
1296
1320
  case 4:
1297
1321
  case "end":
1298
- return _context43.stop();
1322
+ return _context44.stop();
1299
1323
  }
1300
- }, _callee43, this);
1324
+ }, _callee44, this);
1301
1325
  }));
1302
- function getUnassignedTeams(_x68, _x69, _x70, _x71) {
1326
+ function getUnassignedTeams(_x70, _x71, _x72, _x73) {
1303
1327
  return _getUnassignedTeams.apply(this, arguments);
1304
1328
  }
1305
1329
  return getUnassignedTeams;
@@ -1307,26 +1331,26 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1307
1331
  }, {
1308
1332
  key: "getTeamSiteAssignmentOrgDetails",
1309
1333
  value: function () {
1310
- var _getTeamSiteAssignmentOrgDetails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
1334
+ var _getTeamSiteAssignmentOrgDetails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
1311
1335
  var orgId, err;
1312
- return _regenerator.default.wrap(function _callee44$(_context44) {
1313
- while (1) switch (_context44.prev = _context44.next) {
1336
+ return _regenerator.default.wrap(function _callee45$(_context45) {
1337
+ while (1) switch (_context45.prev = _context45.next) {
1314
1338
  case 0:
1315
1339
  orgId = this.getContext().orgId;
1316
1340
  if (orgId) {
1317
- _context44.next = 5;
1341
+ _context45.next = 5;
1318
1342
  break;
1319
1343
  }
1320
1344
  err = new Error('Organization ID is required');
1321
1345
  this.logException(err, 'getTeamSiteAssignmentOrgDetails');
1322
1346
  throw err;
1323
1347
  case 5:
1324
- return _context44.abrupt("return", this.getResource("".concat(v4UrlPath, "/migrations/scope/details/").concat(orgId)));
1348
+ return _context45.abrupt("return", this.getResource("".concat(v4UrlPath, "/migrations/scope/details/").concat(orgId)));
1325
1349
  case 6:
1326
1350
  case "end":
1327
- return _context44.stop();
1351
+ return _context45.stop();
1328
1352
  }
1329
- }, _callee44, this);
1353
+ }, _callee45, this);
1330
1354
  }));
1331
1355
  function getTeamSiteAssignmentOrgDetails() {
1332
1356
  return _getTeamSiteAssignmentOrgDetails.apply(this, arguments);
@@ -1480,27 +1504,27 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1480
1504
  }, {
1481
1505
  key: "getTeamStatesInBulk",
1482
1506
  value: function () {
1483
- var _getTeamStatesInBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45(orgId, teamIds) {
1484
- return _regenerator.default.wrap(function _callee45$(_context45) {
1485
- while (1) switch (_context45.prev = _context45.next) {
1507
+ var _getTeamStatesInBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46(orgId, teamIds) {
1508
+ return _regenerator.default.wrap(function _callee46$(_context46) {
1509
+ while (1) switch (_context46.prev = _context46.next) {
1486
1510
  case 0:
1487
- _context45.prev = 0;
1488
- return _context45.abrupt("return", this.postResource("".concat(v4UrlPath, "/adminhub/states/bulk"), {
1511
+ _context46.prev = 0;
1512
+ return _context46.abrupt("return", this.postResource("".concat(v4UrlPath, "/adminhub/states/bulk"), {
1489
1513
  orgId: orgId,
1490
1514
  teamIds: teamIds
1491
1515
  }));
1492
1516
  case 4:
1493
- _context45.prev = 4;
1494
- _context45.t0 = _context45["catch"](0);
1495
- this.logException(_context45.t0, 'getTeamStatesInBulk');
1496
- throw _context45.t0;
1517
+ _context46.prev = 4;
1518
+ _context46.t0 = _context46["catch"](0);
1519
+ this.logException(_context46.t0, 'getTeamStatesInBulk');
1520
+ throw _context46.t0;
1497
1521
  case 8:
1498
1522
  case "end":
1499
- return _context45.stop();
1523
+ return _context46.stop();
1500
1524
  }
1501
- }, _callee45, this, [[0, 4]]);
1525
+ }, _callee46, this, [[0, 4]]);
1502
1526
  }));
1503
- function getTeamStatesInBulk(_x72, _x73) {
1527
+ function getTeamStatesInBulk(_x74, _x75) {
1504
1528
  return _getTeamStatesInBulk.apply(this, arguments);
1505
1529
  }
1506
1530
  return getTeamStatesInBulk;