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