@atlaskit/teams-client 4.20.0 → 4.21.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 +12 -0
- package/dist/cjs/common/utils/ufo/index.js +2 -2
- package/dist/cjs/services/legion-client/index.js +42 -14
- package/dist/cjs/services/main.js +30 -9
- package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/es2019/common/utils/ufo/index.js +2 -2
- package/dist/es2019/services/legion-client/index.js +15 -4
- package/dist/es2019/services/main.js +3 -0
- package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/common/utils/ufo/index.js +2 -2
- package/dist/esm/services/legion-client/index.js +42 -14
- package/dist/esm/services/main.js +30 -9
- package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/types/services/legion-client/index.d.ts +3 -2
- package/dist/types/services/legion-client/types.d.ts +7 -0
- package/dist/types/services/main.d.ts +1 -0
- package/dist/types/types/team.d.ts +1 -1
- package/dist/types-ts4.5/services/legion-client/index.d.ts +3 -2
- package/dist/types-ts4.5/services/legion-client/types.d.ts +7 -0
- package/dist/types-ts4.5/services/main.d.ts +1 -0
- package/dist/types-ts4.5/types/team.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/teams-client
|
|
2
2
|
|
|
3
|
+
## 4.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c40c12b0fcf46`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c40c12b0fcf46) -
|
|
8
|
+
Added a new API "getTeamStatesInBulk" to fetch team states in bulk in an org
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`151750f891a85`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/151750f891a85) -
|
|
13
|
+
Updated unassigned teams response type to include null for cursor
|
|
14
|
+
|
|
3
15
|
## 4.20.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -52,7 +52,7 @@ var TeamsUFOExperience = exports.TeamsUFOExperience = /*#__PURE__*/function (_UF
|
|
|
52
52
|
return _superPropGet(TeamsUFOExperience, "failure", this, 3)([{
|
|
53
53
|
metadata: {
|
|
54
54
|
error: (0, _utils.createErrorMetadata)(error),
|
|
55
|
-
packageVersion: "
|
|
55
|
+
packageVersion: "4.20.0",
|
|
56
56
|
packageName: "@atlaskit/teams-client"
|
|
57
57
|
}
|
|
58
58
|
}]);
|
|
@@ -60,7 +60,7 @@ var TeamsUFOExperience = exports.TeamsUFOExperience = /*#__PURE__*/function (_UF
|
|
|
60
60
|
return _superPropGet(TeamsUFOExperience, "failure", this, 3)([{
|
|
61
61
|
metadata: {
|
|
62
62
|
error: 'unknown error',
|
|
63
|
-
packageVersion: "
|
|
63
|
+
packageVersion: "4.20.0",
|
|
64
64
|
packageName: "@atlaskit/teams-client"
|
|
65
65
|
}
|
|
66
66
|
}]);
|
|
@@ -1021,13 +1021,13 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1021
1021
|
}, {
|
|
1022
1022
|
key: "getTeamProfileDetails",
|
|
1023
1023
|
value: function () {
|
|
1024
|
-
var _getTeamProfileDetails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(teamId) {
|
|
1025
|
-
var
|
|
1024
|
+
var _getTeamProfileDetails = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(teamId, siteId) {
|
|
1025
|
+
var finalSiteId, err, linkedTeamsProfileDetails;
|
|
1026
1026
|
return _regenerator.default.wrap(function _callee33$(_context33) {
|
|
1027
1027
|
while (1) switch (_context33.prev = _context33.next) {
|
|
1028
1028
|
case 0:
|
|
1029
|
-
|
|
1030
|
-
if (
|
|
1029
|
+
finalSiteId = siteId || this.getCloudId();
|
|
1030
|
+
if (finalSiteId) {
|
|
1031
1031
|
_context33.next = 5;
|
|
1032
1032
|
break;
|
|
1033
1033
|
}
|
|
@@ -1036,7 +1036,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1036
1036
|
throw err;
|
|
1037
1037
|
case 5:
|
|
1038
1038
|
_context33.next = 7;
|
|
1039
|
-
return this.getResource("".concat(v4UrlPath, "/").concat(teamId, "/profile?siteId=").concat(
|
|
1039
|
+
return this.getResource("".concat(v4UrlPath, "/").concat(teamId, "/profile?siteId=").concat(finalSiteId));
|
|
1040
1040
|
case 7:
|
|
1041
1041
|
linkedTeamsProfileDetails = _context33.sent;
|
|
1042
1042
|
return _context33.abrupt("return", linkedTeamsProfileDetails);
|
|
@@ -1046,7 +1046,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
}, _callee33, this);
|
|
1048
1048
|
}));
|
|
1049
|
-
function getTeamProfileDetails(_x53) {
|
|
1049
|
+
function getTeamProfileDetails(_x53, _x54) {
|
|
1050
1050
|
return _getTeamProfileDetails.apply(this, arguments);
|
|
1051
1051
|
}
|
|
1052
1052
|
return getTeamProfileDetails;
|
|
@@ -1106,7 +1106,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
}, _callee35, this);
|
|
1108
1108
|
}));
|
|
1109
|
-
function restoreTeamToSyncedGroup(
|
|
1109
|
+
function restoreTeamToSyncedGroup(_x55, _x56) {
|
|
1110
1110
|
return _restoreTeamToSyncedGroup.apply(this, arguments);
|
|
1111
1111
|
}
|
|
1112
1112
|
return restoreTeamToSyncedGroup;
|
|
@@ -1125,7 +1125,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
}, _callee36, this);
|
|
1127
1127
|
}));
|
|
1128
|
-
function createTeamContainers(
|
|
1128
|
+
function createTeamContainers(_x57) {
|
|
1129
1129
|
return _createTeamContainers.apply(this, arguments);
|
|
1130
1130
|
}
|
|
1131
1131
|
return createTeamContainers;
|
|
@@ -1149,7 +1149,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
}, _callee37, this);
|
|
1151
1151
|
}));
|
|
1152
|
-
function getTeamEnabledSites(
|
|
1152
|
+
function getTeamEnabledSites(_x58) {
|
|
1153
1153
|
return _getTeamEnabledSites.apply(this, arguments);
|
|
1154
1154
|
}
|
|
1155
1155
|
return getTeamEnabledSites;
|
|
@@ -1176,7 +1176,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
}, _callee38, this);
|
|
1178
1178
|
}));
|
|
1179
|
-
function assignTeamsToSites(
|
|
1179
|
+
function assignTeamsToSites(_x59) {
|
|
1180
1180
|
return _assignTeamsToSites.apply(this, arguments);
|
|
1181
1181
|
}
|
|
1182
1182
|
return assignTeamsToSites;
|
|
@@ -1198,7 +1198,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
}, _callee39, this);
|
|
1200
1200
|
}));
|
|
1201
|
-
function getTeamsToBeClonedToJsmSites(
|
|
1201
|
+
function getTeamsToBeClonedToJsmSites(_x60) {
|
|
1202
1202
|
return _getTeamsToBeClonedToJsmSites.apply(this, arguments);
|
|
1203
1203
|
}
|
|
1204
1204
|
return getTeamsToBeClonedToJsmSites;
|
|
@@ -1220,7 +1220,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1220
1220
|
}
|
|
1221
1221
|
}, _callee40, this);
|
|
1222
1222
|
}));
|
|
1223
|
-
function setTeamSiteAssignmentPermission(
|
|
1223
|
+
function setTeamSiteAssignmentPermission(_x61, _x62) {
|
|
1224
1224
|
return _setTeamSiteAssignmentPermission.apply(this, arguments);
|
|
1225
1225
|
}
|
|
1226
1226
|
return setTeamSiteAssignmentPermission;
|
|
@@ -1249,7 +1249,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
}, _callee41, this);
|
|
1251
1251
|
}));
|
|
1252
|
-
function getAssignedTeams(
|
|
1252
|
+
function getAssignedTeams(_x63, _x64, _x65, _x66) {
|
|
1253
1253
|
return _getAssignedTeams.apply(this, arguments);
|
|
1254
1254
|
}
|
|
1255
1255
|
return getAssignedTeams;
|
|
@@ -1278,7 +1278,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
}, _callee42, this);
|
|
1280
1280
|
}));
|
|
1281
|
-
function getUnassignedTeams(
|
|
1281
|
+
function getUnassignedTeams(_x67, _x68, _x69, _x70) {
|
|
1282
1282
|
return _getUnassignedTeams.apply(this, arguments);
|
|
1283
1283
|
}
|
|
1284
1284
|
return getUnassignedTeams;
|
|
@@ -1456,6 +1456,34 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1456
1456
|
throw e;
|
|
1457
1457
|
}
|
|
1458
1458
|
}
|
|
1459
|
+
}, {
|
|
1460
|
+
key: "getTeamStatesInBulk",
|
|
1461
|
+
value: function () {
|
|
1462
|
+
var _getTeamStatesInBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44(orgId, teamIds) {
|
|
1463
|
+
return _regenerator.default.wrap(function _callee44$(_context44) {
|
|
1464
|
+
while (1) switch (_context44.prev = _context44.next) {
|
|
1465
|
+
case 0:
|
|
1466
|
+
_context44.prev = 0;
|
|
1467
|
+
return _context44.abrupt("return", this.postResource("".concat(v4UrlPath, "/adminhub/states/bulk"), {
|
|
1468
|
+
orgId: orgId,
|
|
1469
|
+
teamIds: teamIds
|
|
1470
|
+
}));
|
|
1471
|
+
case 4:
|
|
1472
|
+
_context44.prev = 4;
|
|
1473
|
+
_context44.t0 = _context44["catch"](0);
|
|
1474
|
+
this.logException(_context44.t0, 'getTeamStatesInBulk');
|
|
1475
|
+
throw _context44.t0;
|
|
1476
|
+
case 8:
|
|
1477
|
+
case "end":
|
|
1478
|
+
return _context44.stop();
|
|
1479
|
+
}
|
|
1480
|
+
}, _callee44, this, [[0, 4]]);
|
|
1481
|
+
}));
|
|
1482
|
+
function getTeamStatesInBulk(_x71, _x72) {
|
|
1483
|
+
return _getTeamStatesInBulk.apply(this, arguments);
|
|
1484
|
+
}
|
|
1485
|
+
return getTeamStatesInBulk;
|
|
1486
|
+
}()
|
|
1459
1487
|
}]);
|
|
1460
1488
|
}(_restClient.RestClient);
|
|
1461
1489
|
var defaultLegionClient = exports.defaultLegionClient = new LegionClient(_constants.DEFAULT_CONFIG.stargateRoot);
|
|
@@ -2666,30 +2666,51 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
|
|
|
2666
2666
|
}
|
|
2667
2667
|
return checkOrgFullAlignmentStatus;
|
|
2668
2668
|
}()
|
|
2669
|
+
}, {
|
|
2670
|
+
key: "getTeamStatesInBulk",
|
|
2671
|
+
value: function () {
|
|
2672
|
+
var _getTeamStatesInBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee78() {
|
|
2673
|
+
var _this$_legionClient2;
|
|
2674
|
+
var _args78 = arguments;
|
|
2675
|
+
return _regenerator.default.wrap(function _callee78$(_context78) {
|
|
2676
|
+
while (1) switch (_context78.prev = _context78.next) {
|
|
2677
|
+
case 0:
|
|
2678
|
+
return _context78.abrupt("return", (_this$_legionClient2 = this._legionClient).getTeamStatesInBulk.apply(_this$_legionClient2, _args78));
|
|
2679
|
+
case 1:
|
|
2680
|
+
case "end":
|
|
2681
|
+
return _context78.stop();
|
|
2682
|
+
}
|
|
2683
|
+
}, _callee78, this);
|
|
2684
|
+
}));
|
|
2685
|
+
function getTeamStatesInBulk() {
|
|
2686
|
+
return _getTeamStatesInBulk.apply(this, arguments);
|
|
2687
|
+
}
|
|
2688
|
+
return getTeamStatesInBulk;
|
|
2689
|
+
}()
|
|
2669
2690
|
}, {
|
|
2670
2691
|
key: "getReportingLines",
|
|
2671
2692
|
value: function () {
|
|
2672
|
-
var _getReportingLines = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2693
|
+
var _getReportingLines = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee79() {
|
|
2673
2694
|
var _this69 = this;
|
|
2674
2695
|
var _len56,
|
|
2675
2696
|
args,
|
|
2676
2697
|
_key56,
|
|
2677
|
-
|
|
2678
|
-
return _regenerator.default.wrap(function
|
|
2679
|
-
while (1) switch (
|
|
2698
|
+
_args79 = arguments;
|
|
2699
|
+
return _regenerator.default.wrap(function _callee79$(_context79) {
|
|
2700
|
+
while (1) switch (_context79.prev = _context79.next) {
|
|
2680
2701
|
case 0:
|
|
2681
|
-
for (_len56 =
|
|
2682
|
-
args[_key56] =
|
|
2702
|
+
for (_len56 = _args79.length, args = new Array(_len56), _key56 = 0; _key56 < _len56; _key56++) {
|
|
2703
|
+
args[_key56] = _args79[_key56];
|
|
2683
2704
|
}
|
|
2684
|
-
return
|
|
2705
|
+
return _context79.abrupt("return", this.measurePerformance('getReportingLines', function () {
|
|
2685
2706
|
var _this69$_reportingLin;
|
|
2686
2707
|
return (_this69$_reportingLin = _this69._reportingLinesClient).getReportingLines.apply(_this69$_reportingLin, args);
|
|
2687
2708
|
}));
|
|
2688
2709
|
case 2:
|
|
2689
2710
|
case "end":
|
|
2690
|
-
return
|
|
2711
|
+
return _context79.stop();
|
|
2691
2712
|
}
|
|
2692
|
-
},
|
|
2713
|
+
}, _callee79, this);
|
|
2693
2714
|
}));
|
|
2694
2715
|
function getReportingLines() {
|
|
2695
2716
|
return _getReportingLines.apply(this, arguments);
|
|
@@ -36,7 +36,7 @@ function getSentryConfig(options) {
|
|
|
36
36
|
return _objectSpread(_objectSpread(_objectSpread({}, otherOptions), DEFAULT_SENTRY_CONFIG), {}, {
|
|
37
37
|
// Standalone __VERSION__ is set from `bin/set-release-version.sh`
|
|
38
38
|
// when building to deploy to production
|
|
39
|
-
release: "".concat("@atlaskit/teams-client", "@").concat("
|
|
39
|
+
release: "".concat("@atlaskit/teams-client", "@").concat("4.20.0") ||
|
|
40
40
|
// @ts-ignore Jira - window.BUILD_KEY
|
|
41
41
|
window.BUILD_KEY || ( // @ts-ignore Confluence - window.__buildInfo
|
|
42
42
|
(_window$__buildInfo = window.__buildInfo) === null || _window$__buildInfo === void 0 ? void 0 : _window$__buildInfo.FRONTEND_VERSION) || '---',
|
|
@@ -27,7 +27,7 @@ export class TeamsUFOExperience extends UFOExperience {
|
|
|
27
27
|
return super.failure({
|
|
28
28
|
metadata: {
|
|
29
29
|
error: createErrorMetadata(error),
|
|
30
|
-
packageVersion: "
|
|
30
|
+
packageVersion: "4.20.0",
|
|
31
31
|
packageName: "@atlaskit/teams-client"
|
|
32
32
|
}
|
|
33
33
|
});
|
|
@@ -35,7 +35,7 @@ export class TeamsUFOExperience extends UFOExperience {
|
|
|
35
35
|
return super.failure({
|
|
36
36
|
metadata: {
|
|
37
37
|
error: 'unknown error',
|
|
38
|
-
packageVersion: "
|
|
38
|
+
packageVersion: "4.20.0",
|
|
39
39
|
packageName: "@atlaskit/teams-client"
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -372,14 +372,14 @@ export class LegionClient extends RestClient {
|
|
|
372
372
|
});
|
|
373
373
|
return legionExternalTeam;
|
|
374
374
|
}
|
|
375
|
-
async getTeamProfileDetails(teamId) {
|
|
376
|
-
const
|
|
377
|
-
if (!
|
|
375
|
+
async getTeamProfileDetails(teamId, siteId) {
|
|
376
|
+
const finalSiteId = siteId || this.getCloudId();
|
|
377
|
+
if (!finalSiteId) {
|
|
378
378
|
const err = new Error('Site ID is required');
|
|
379
379
|
this.logException(err, 'getTeamProfileDetails');
|
|
380
380
|
throw err;
|
|
381
381
|
}
|
|
382
|
-
const linkedTeamsProfileDetails = await this.getResource(`${v4UrlPath}/${teamId}/profile?siteId=${
|
|
382
|
+
const linkedTeamsProfileDetails = await this.getResource(`${v4UrlPath}/${teamId}/profile?siteId=${finalSiteId}`);
|
|
383
383
|
return linkedTeamsProfileDetails;
|
|
384
384
|
}
|
|
385
385
|
async getOrgScope() {
|
|
@@ -578,5 +578,16 @@ export class LegionClient extends RestClient {
|
|
|
578
578
|
throw e;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
+
async getTeamStatesInBulk(orgId, teamIds) {
|
|
582
|
+
try {
|
|
583
|
+
return this.postResource(`${v4UrlPath}/adminhub/states/bulk`, {
|
|
584
|
+
orgId,
|
|
585
|
+
teamIds
|
|
586
|
+
});
|
|
587
|
+
} catch (e) {
|
|
588
|
+
this.logException(e, 'getTeamStatesInBulk');
|
|
589
|
+
throw e;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
581
592
|
}
|
|
582
593
|
export const defaultLegionClient = new LegionClient(DEFAULT_CONFIG.stargateRoot);
|
|
@@ -698,6 +698,9 @@ export class TeamsClient {
|
|
|
698
698
|
async checkOrgFullAlignmentStatus(...args) {
|
|
699
699
|
return this._legionClient.checkOrgFullAlignmentStatus(...args);
|
|
700
700
|
}
|
|
701
|
+
async getTeamStatesInBulk(...args) {
|
|
702
|
+
return this._legionClient.getTeamStatesInBulk(...args);
|
|
703
|
+
}
|
|
701
704
|
async getReportingLines(...args) {
|
|
702
705
|
return this.measurePerformance('getReportingLines', () => this._reportingLinesClient.getReportingLines(...args));
|
|
703
706
|
}
|
|
@@ -28,7 +28,7 @@ export function getSentryConfig(options) {
|
|
|
28
28
|
...DEFAULT_SENTRY_CONFIG,
|
|
29
29
|
// Standalone __VERSION__ is set from `bin/set-release-version.sh`
|
|
30
30
|
// when building to deploy to production
|
|
31
|
-
release: `${"@atlaskit/teams-client"}@${"
|
|
31
|
+
release: `${"@atlaskit/teams-client"}@${"4.20.0"}` ||
|
|
32
32
|
// @ts-ignore Jira - window.BUILD_KEY
|
|
33
33
|
window.BUILD_KEY || ( // @ts-ignore Confluence - window.__buildInfo
|
|
34
34
|
(_window$__buildInfo = window.__buildInfo) === null || _window$__buildInfo === void 0 ? void 0 : _window$__buildInfo.FRONTEND_VERSION) || '---',
|
|
@@ -45,7 +45,7 @@ export var TeamsUFOExperience = /*#__PURE__*/function (_UFOExperience) {
|
|
|
45
45
|
return _superPropGet(TeamsUFOExperience, "failure", this, 3)([{
|
|
46
46
|
metadata: {
|
|
47
47
|
error: createErrorMetadata(error),
|
|
48
|
-
packageVersion: "
|
|
48
|
+
packageVersion: "4.20.0",
|
|
49
49
|
packageName: "@atlaskit/teams-client"
|
|
50
50
|
}
|
|
51
51
|
}]);
|
|
@@ -53,7 +53,7 @@ export var TeamsUFOExperience = /*#__PURE__*/function (_UFOExperience) {
|
|
|
53
53
|
return _superPropGet(TeamsUFOExperience, "failure", this, 3)([{
|
|
54
54
|
metadata: {
|
|
55
55
|
error: 'unknown error',
|
|
56
|
-
packageVersion: "
|
|
56
|
+
packageVersion: "4.20.0",
|
|
57
57
|
packageName: "@atlaskit/teams-client"
|
|
58
58
|
}
|
|
59
59
|
}]);
|
|
@@ -1015,13 +1015,13 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1015
1015
|
}, {
|
|
1016
1016
|
key: "getTeamProfileDetails",
|
|
1017
1017
|
value: function () {
|
|
1018
|
-
var _getTeamProfileDetails = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(teamId) {
|
|
1019
|
-
var
|
|
1018
|
+
var _getTeamProfileDetails = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(teamId, siteId) {
|
|
1019
|
+
var finalSiteId, err, linkedTeamsProfileDetails;
|
|
1020
1020
|
return _regeneratorRuntime.wrap(function _callee33$(_context33) {
|
|
1021
1021
|
while (1) switch (_context33.prev = _context33.next) {
|
|
1022
1022
|
case 0:
|
|
1023
|
-
|
|
1024
|
-
if (
|
|
1023
|
+
finalSiteId = siteId || this.getCloudId();
|
|
1024
|
+
if (finalSiteId) {
|
|
1025
1025
|
_context33.next = 5;
|
|
1026
1026
|
break;
|
|
1027
1027
|
}
|
|
@@ -1030,7 +1030,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1030
1030
|
throw err;
|
|
1031
1031
|
case 5:
|
|
1032
1032
|
_context33.next = 7;
|
|
1033
|
-
return this.getResource("".concat(v4UrlPath, "/").concat(teamId, "/profile?siteId=").concat(
|
|
1033
|
+
return this.getResource("".concat(v4UrlPath, "/").concat(teamId, "/profile?siteId=").concat(finalSiteId));
|
|
1034
1034
|
case 7:
|
|
1035
1035
|
linkedTeamsProfileDetails = _context33.sent;
|
|
1036
1036
|
return _context33.abrupt("return", linkedTeamsProfileDetails);
|
|
@@ -1040,7 +1040,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
}, _callee33, this);
|
|
1042
1042
|
}));
|
|
1043
|
-
function getTeamProfileDetails(_x53) {
|
|
1043
|
+
function getTeamProfileDetails(_x53, _x54) {
|
|
1044
1044
|
return _getTeamProfileDetails.apply(this, arguments);
|
|
1045
1045
|
}
|
|
1046
1046
|
return getTeamProfileDetails;
|
|
@@ -1100,7 +1100,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
}, _callee35, this);
|
|
1102
1102
|
}));
|
|
1103
|
-
function restoreTeamToSyncedGroup(
|
|
1103
|
+
function restoreTeamToSyncedGroup(_x55, _x56) {
|
|
1104
1104
|
return _restoreTeamToSyncedGroup.apply(this, arguments);
|
|
1105
1105
|
}
|
|
1106
1106
|
return restoreTeamToSyncedGroup;
|
|
@@ -1119,7 +1119,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
}, _callee36, this);
|
|
1121
1121
|
}));
|
|
1122
|
-
function createTeamContainers(
|
|
1122
|
+
function createTeamContainers(_x57) {
|
|
1123
1123
|
return _createTeamContainers.apply(this, arguments);
|
|
1124
1124
|
}
|
|
1125
1125
|
return createTeamContainers;
|
|
@@ -1143,7 +1143,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
}, _callee37, this);
|
|
1145
1145
|
}));
|
|
1146
|
-
function getTeamEnabledSites(
|
|
1146
|
+
function getTeamEnabledSites(_x58) {
|
|
1147
1147
|
return _getTeamEnabledSites.apply(this, arguments);
|
|
1148
1148
|
}
|
|
1149
1149
|
return getTeamEnabledSites;
|
|
@@ -1170,7 +1170,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
}, _callee38, this);
|
|
1172
1172
|
}));
|
|
1173
|
-
function assignTeamsToSites(
|
|
1173
|
+
function assignTeamsToSites(_x59) {
|
|
1174
1174
|
return _assignTeamsToSites.apply(this, arguments);
|
|
1175
1175
|
}
|
|
1176
1176
|
return assignTeamsToSites;
|
|
@@ -1192,7 +1192,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
}, _callee39, this);
|
|
1194
1194
|
}));
|
|
1195
|
-
function getTeamsToBeClonedToJsmSites(
|
|
1195
|
+
function getTeamsToBeClonedToJsmSites(_x60) {
|
|
1196
1196
|
return _getTeamsToBeClonedToJsmSites.apply(this, arguments);
|
|
1197
1197
|
}
|
|
1198
1198
|
return getTeamsToBeClonedToJsmSites;
|
|
@@ -1214,7 +1214,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
}, _callee40, this);
|
|
1216
1216
|
}));
|
|
1217
|
-
function setTeamSiteAssignmentPermission(
|
|
1217
|
+
function setTeamSiteAssignmentPermission(_x61, _x62) {
|
|
1218
1218
|
return _setTeamSiteAssignmentPermission.apply(this, arguments);
|
|
1219
1219
|
}
|
|
1220
1220
|
return setTeamSiteAssignmentPermission;
|
|
@@ -1243,7 +1243,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
}, _callee41, this);
|
|
1245
1245
|
}));
|
|
1246
|
-
function getAssignedTeams(
|
|
1246
|
+
function getAssignedTeams(_x63, _x64, _x65, _x66) {
|
|
1247
1247
|
return _getAssignedTeams.apply(this, arguments);
|
|
1248
1248
|
}
|
|
1249
1249
|
return getAssignedTeams;
|
|
@@ -1272,7 +1272,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
}, _callee42, this);
|
|
1274
1274
|
}));
|
|
1275
|
-
function getUnassignedTeams(
|
|
1275
|
+
function getUnassignedTeams(_x67, _x68, _x69, _x70) {
|
|
1276
1276
|
return _getUnassignedTeams.apply(this, arguments);
|
|
1277
1277
|
}
|
|
1278
1278
|
return getUnassignedTeams;
|
|
@@ -1450,6 +1450,34 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1450
1450
|
throw e;
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
|
+
}, {
|
|
1454
|
+
key: "getTeamStatesInBulk",
|
|
1455
|
+
value: function () {
|
|
1456
|
+
var _getTeamStatesInBulk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(orgId, teamIds) {
|
|
1457
|
+
return _regeneratorRuntime.wrap(function _callee44$(_context44) {
|
|
1458
|
+
while (1) switch (_context44.prev = _context44.next) {
|
|
1459
|
+
case 0:
|
|
1460
|
+
_context44.prev = 0;
|
|
1461
|
+
return _context44.abrupt("return", this.postResource("".concat(v4UrlPath, "/adminhub/states/bulk"), {
|
|
1462
|
+
orgId: orgId,
|
|
1463
|
+
teamIds: teamIds
|
|
1464
|
+
}));
|
|
1465
|
+
case 4:
|
|
1466
|
+
_context44.prev = 4;
|
|
1467
|
+
_context44.t0 = _context44["catch"](0);
|
|
1468
|
+
this.logException(_context44.t0, 'getTeamStatesInBulk');
|
|
1469
|
+
throw _context44.t0;
|
|
1470
|
+
case 8:
|
|
1471
|
+
case "end":
|
|
1472
|
+
return _context44.stop();
|
|
1473
|
+
}
|
|
1474
|
+
}, _callee44, this, [[0, 4]]);
|
|
1475
|
+
}));
|
|
1476
|
+
function getTeamStatesInBulk(_x71, _x72) {
|
|
1477
|
+
return _getTeamStatesInBulk.apply(this, arguments);
|
|
1478
|
+
}
|
|
1479
|
+
return getTeamStatesInBulk;
|
|
1480
|
+
}()
|
|
1453
1481
|
}]);
|
|
1454
1482
|
}(RestClient);
|
|
1455
1483
|
export var defaultLegionClient = new LegionClient(DEFAULT_CONFIG.stargateRoot);
|
|
@@ -2661,30 +2661,51 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
2661
2661
|
}
|
|
2662
2662
|
return checkOrgFullAlignmentStatus;
|
|
2663
2663
|
}()
|
|
2664
|
+
}, {
|
|
2665
|
+
key: "getTeamStatesInBulk",
|
|
2666
|
+
value: function () {
|
|
2667
|
+
var _getTeamStatesInBulk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee78() {
|
|
2668
|
+
var _this$_legionClient2;
|
|
2669
|
+
var _args78 = arguments;
|
|
2670
|
+
return _regeneratorRuntime.wrap(function _callee78$(_context78) {
|
|
2671
|
+
while (1) switch (_context78.prev = _context78.next) {
|
|
2672
|
+
case 0:
|
|
2673
|
+
return _context78.abrupt("return", (_this$_legionClient2 = this._legionClient).getTeamStatesInBulk.apply(_this$_legionClient2, _args78));
|
|
2674
|
+
case 1:
|
|
2675
|
+
case "end":
|
|
2676
|
+
return _context78.stop();
|
|
2677
|
+
}
|
|
2678
|
+
}, _callee78, this);
|
|
2679
|
+
}));
|
|
2680
|
+
function getTeamStatesInBulk() {
|
|
2681
|
+
return _getTeamStatesInBulk.apply(this, arguments);
|
|
2682
|
+
}
|
|
2683
|
+
return getTeamStatesInBulk;
|
|
2684
|
+
}()
|
|
2664
2685
|
}, {
|
|
2665
2686
|
key: "getReportingLines",
|
|
2666
2687
|
value: function () {
|
|
2667
|
-
var _getReportingLines = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2688
|
+
var _getReportingLines = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee79() {
|
|
2668
2689
|
var _this69 = this;
|
|
2669
2690
|
var _len56,
|
|
2670
2691
|
args,
|
|
2671
2692
|
_key56,
|
|
2672
|
-
|
|
2673
|
-
return _regeneratorRuntime.wrap(function
|
|
2674
|
-
while (1) switch (
|
|
2693
|
+
_args79 = arguments;
|
|
2694
|
+
return _regeneratorRuntime.wrap(function _callee79$(_context79) {
|
|
2695
|
+
while (1) switch (_context79.prev = _context79.next) {
|
|
2675
2696
|
case 0:
|
|
2676
|
-
for (_len56 =
|
|
2677
|
-
args[_key56] =
|
|
2697
|
+
for (_len56 = _args79.length, args = new Array(_len56), _key56 = 0; _key56 < _len56; _key56++) {
|
|
2698
|
+
args[_key56] = _args79[_key56];
|
|
2678
2699
|
}
|
|
2679
|
-
return
|
|
2700
|
+
return _context79.abrupt("return", this.measurePerformance('getReportingLines', function () {
|
|
2680
2701
|
var _this69$_reportingLin;
|
|
2681
2702
|
return (_this69$_reportingLin = _this69._reportingLinesClient).getReportingLines.apply(_this69$_reportingLin, args);
|
|
2682
2703
|
}));
|
|
2683
2704
|
case 2:
|
|
2684
2705
|
case "end":
|
|
2685
|
-
return
|
|
2706
|
+
return _context79.stop();
|
|
2686
2707
|
}
|
|
2687
|
-
},
|
|
2708
|
+
}, _callee79, this);
|
|
2688
2709
|
}));
|
|
2689
2710
|
function getReportingLines() {
|
|
2690
2711
|
return _getReportingLines.apply(this, arguments);
|
|
@@ -29,7 +29,7 @@ export function getSentryConfig(options) {
|
|
|
29
29
|
return _objectSpread(_objectSpread(_objectSpread({}, otherOptions), DEFAULT_SENTRY_CONFIG), {}, {
|
|
30
30
|
// Standalone __VERSION__ is set from `bin/set-release-version.sh`
|
|
31
31
|
// when building to deploy to production
|
|
32
|
-
release: "".concat("@atlaskit/teams-client", "@").concat("
|
|
32
|
+
release: "".concat("@atlaskit/teams-client", "@").concat("4.20.0") ||
|
|
33
33
|
// @ts-ignore Jira - window.BUILD_KEY
|
|
34
34
|
window.BUILD_KEY || ( // @ts-ignore Confluence - window.__buildInfo
|
|
35
35
|
(_window$__buildInfo = window.__buildInfo) === null || _window$__buildInfo === void 0 ? void 0 : _window$__buildInfo.FRONTEND_VERSION) || '---',
|
|
@@ -3,7 +3,7 @@ import { type AlignmentPermission, type AssignedTeamsResponse, type AssignTeamsT
|
|
|
3
3
|
import { type ApiTeamContainerCreationPayload, type ApiTeamContainerResponse } from '../../types/team-container';
|
|
4
4
|
import { type UserInSiteUserbase } from '../../types/user';
|
|
5
5
|
import { RestClient } from '../rest-client';
|
|
6
|
-
import { type LegionAssociateAgentResponse, type LegionLinkResponseV3, type LegionLinkResponseV4, type LegionPaginatedResponse, type LegionTeamAndGroupDifferenceResponse, type OrgAlignmentStatus } from './types';
|
|
6
|
+
import { type LegionAssociateAgentResponse, type LegionLinkResponseV3, type LegionLinkResponseV4, type LegionPaginatedResponse, type LegionTeamAndGroupDifferenceResponse, type OrgAlignmentStatus, type TeamStatesInBulkResponse } from './types';
|
|
7
7
|
export interface PaginationResult<T> {
|
|
8
8
|
entities: T[];
|
|
9
9
|
}
|
|
@@ -96,7 +96,7 @@ export interface LegionClient {
|
|
|
96
96
|
canSearchUsers: boolean;
|
|
97
97
|
}>;
|
|
98
98
|
getLinkedTeamsBulk(groupIds: string[]): Promise<LinkedTeamsBulkResponse>;
|
|
99
|
-
getTeamProfileDetails(teamId: string): Promise<LinkedTeamsProfileDetails>;
|
|
99
|
+
getTeamProfileDetails(teamId: string, siteId?: string): Promise<LinkedTeamsProfileDetails>;
|
|
100
100
|
getOrgScope(): Promise<OrgScope>;
|
|
101
101
|
getPermissions(): Promise<TeamsPermissionFromApi>;
|
|
102
102
|
restoreTeamToSyncedGroup(teamId: string, externalReference: ExternalReference): Promise<void>;
|
|
@@ -111,6 +111,7 @@ export interface LegionClient {
|
|
|
111
111
|
getUnassignedTeams(orgId: string, count: number, cursor?: string | null, query?: string | null): Promise<UnassignedTeamsResponse>;
|
|
112
112
|
getTeamSiteAssignmentOrgDetails(): Promise<TeamSiteAssignmentOrgDetailsResponse>;
|
|
113
113
|
checkOrgFullAlignmentStatus(orgId: string): Promise<OrgAlignmentStatus>;
|
|
114
|
+
getTeamStatesInBulk(orgId: string, teamIds: string[]): Promise<TeamStatesInBulkResponse>;
|
|
114
115
|
}
|
|
115
116
|
/**
|
|
116
117
|
* REST Client to make calls to Legion.
|
|
@@ -118,3 +118,10 @@ export interface OrgAlignmentStatus {
|
|
|
118
118
|
orgId: string;
|
|
119
119
|
scopeAligned: boolean;
|
|
120
120
|
}
|
|
121
|
+
export interface TeamStateEntry {
|
|
122
|
+
teamId: string;
|
|
123
|
+
state: TeamState;
|
|
124
|
+
}
|
|
125
|
+
export interface TeamStatesInBulkResponse {
|
|
126
|
+
teamStates: TeamStateEntry[];
|
|
127
|
+
}
|
|
@@ -396,6 +396,7 @@ export declare class TeamsClient {
|
|
|
396
396
|
deleteHelpPointer(...args: Parameters<typeof teamCentralClient.deleteHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.deleteHelpPointer>>;
|
|
397
397
|
getUserTenure(...args: Parameters<typeof replinesClient.getUserTenure>): Promise<AwaitedReturn<typeof replinesClient.getUserTenure>>;
|
|
398
398
|
checkOrgFullAlignmentStatus(...args: Parameters<typeof defaultLegionClient.checkOrgFullAlignmentStatus>): Promise<AwaitedReturn<typeof defaultLegionClient.checkOrgFullAlignmentStatus>>;
|
|
399
|
+
getTeamStatesInBulk(...args: Parameters<typeof defaultLegionClient.getTeamStatesInBulk>): Promise<AwaitedReturn<typeof defaultLegionClient.getTeamStatesInBulk>>;
|
|
399
400
|
getReportingLines(...args: Parameters<typeof reportingLinesClient.getReportingLines>): Promise<AwaitedReturn<typeof reportingLinesClient.getReportingLines>>;
|
|
400
401
|
}
|
|
401
402
|
export declare const teamsClient: TeamsClient;
|
|
@@ -184,7 +184,7 @@ export interface UnassignedTeam {
|
|
|
184
184
|
}
|
|
185
185
|
export interface UnassignedTeamsResponse {
|
|
186
186
|
teams: UnassignedTeam[];
|
|
187
|
-
cursor: string;
|
|
187
|
+
cursor: string | null;
|
|
188
188
|
}
|
|
189
189
|
export type AlignmentPermission = 'ALL_USERS' | 'ORG_ADMIN';
|
|
190
190
|
export interface TeamSiteAssignmentOrgDetailsResponse {
|
|
@@ -3,7 +3,7 @@ import { type AlignmentPermission, type AssignedTeamsResponse, type AssignTeamsT
|
|
|
3
3
|
import { type ApiTeamContainerCreationPayload, type ApiTeamContainerResponse } from '../../types/team-container';
|
|
4
4
|
import { type UserInSiteUserbase } from '../../types/user';
|
|
5
5
|
import { RestClient } from '../rest-client';
|
|
6
|
-
import { type LegionAssociateAgentResponse, type LegionLinkResponseV3, type LegionLinkResponseV4, type LegionPaginatedResponse, type LegionTeamAndGroupDifferenceResponse, type OrgAlignmentStatus } from './types';
|
|
6
|
+
import { type LegionAssociateAgentResponse, type LegionLinkResponseV3, type LegionLinkResponseV4, type LegionPaginatedResponse, type LegionTeamAndGroupDifferenceResponse, type OrgAlignmentStatus, type TeamStatesInBulkResponse } from './types';
|
|
7
7
|
export interface PaginationResult<T> {
|
|
8
8
|
entities: T[];
|
|
9
9
|
}
|
|
@@ -96,7 +96,7 @@ export interface LegionClient {
|
|
|
96
96
|
canSearchUsers: boolean;
|
|
97
97
|
}>;
|
|
98
98
|
getLinkedTeamsBulk(groupIds: string[]): Promise<LinkedTeamsBulkResponse>;
|
|
99
|
-
getTeamProfileDetails(teamId: string): Promise<LinkedTeamsProfileDetails>;
|
|
99
|
+
getTeamProfileDetails(teamId: string, siteId?: string): Promise<LinkedTeamsProfileDetails>;
|
|
100
100
|
getOrgScope(): Promise<OrgScope>;
|
|
101
101
|
getPermissions(): Promise<TeamsPermissionFromApi>;
|
|
102
102
|
restoreTeamToSyncedGroup(teamId: string, externalReference: ExternalReference): Promise<void>;
|
|
@@ -111,6 +111,7 @@ export interface LegionClient {
|
|
|
111
111
|
getUnassignedTeams(orgId: string, count: number, cursor?: string | null, query?: string | null): Promise<UnassignedTeamsResponse>;
|
|
112
112
|
getTeamSiteAssignmentOrgDetails(): Promise<TeamSiteAssignmentOrgDetailsResponse>;
|
|
113
113
|
checkOrgFullAlignmentStatus(orgId: string): Promise<OrgAlignmentStatus>;
|
|
114
|
+
getTeamStatesInBulk(orgId: string, teamIds: string[]): Promise<TeamStatesInBulkResponse>;
|
|
114
115
|
}
|
|
115
116
|
/**
|
|
116
117
|
* REST Client to make calls to Legion.
|
|
@@ -118,3 +118,10 @@ export interface OrgAlignmentStatus {
|
|
|
118
118
|
orgId: string;
|
|
119
119
|
scopeAligned: boolean;
|
|
120
120
|
}
|
|
121
|
+
export interface TeamStateEntry {
|
|
122
|
+
teamId: string;
|
|
123
|
+
state: TeamState;
|
|
124
|
+
}
|
|
125
|
+
export interface TeamStatesInBulkResponse {
|
|
126
|
+
teamStates: TeamStateEntry[];
|
|
127
|
+
}
|
|
@@ -396,6 +396,7 @@ export declare class TeamsClient {
|
|
|
396
396
|
deleteHelpPointer(...args: Parameters<typeof teamCentralClient.deleteHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.deleteHelpPointer>>;
|
|
397
397
|
getUserTenure(...args: Parameters<typeof replinesClient.getUserTenure>): Promise<AwaitedReturn<typeof replinesClient.getUserTenure>>;
|
|
398
398
|
checkOrgFullAlignmentStatus(...args: Parameters<typeof defaultLegionClient.checkOrgFullAlignmentStatus>): Promise<AwaitedReturn<typeof defaultLegionClient.checkOrgFullAlignmentStatus>>;
|
|
399
|
+
getTeamStatesInBulk(...args: Parameters<typeof defaultLegionClient.getTeamStatesInBulk>): Promise<AwaitedReturn<typeof defaultLegionClient.getTeamStatesInBulk>>;
|
|
399
400
|
getReportingLines(...args: Parameters<typeof reportingLinesClient.getReportingLines>): Promise<AwaitedReturn<typeof reportingLinesClient.getReportingLines>>;
|
|
400
401
|
}
|
|
401
402
|
export declare const teamsClient: TeamsClient;
|
|
@@ -184,7 +184,7 @@ export interface UnassignedTeam {
|
|
|
184
184
|
}
|
|
185
185
|
export interface UnassignedTeamsResponse {
|
|
186
186
|
teams: UnassignedTeam[];
|
|
187
|
-
cursor: string;
|
|
187
|
+
cursor: string | null;
|
|
188
188
|
}
|
|
189
189
|
export type AlignmentPermission = 'ALL_USERS' | 'ORG_ADMIN';
|
|
190
190
|
export interface TeamSiteAssignmentOrgDetailsResponse {
|