@atlaskit/teams-client 4.24.1 → 4.26.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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/teams-client
2
2
 
3
+ ## 4.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`8b220c96bc0d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b220c96bc0d3) -
8
+ Added optional cloudId param to getTeamById in legion client
9
+
10
+ ## 4.25.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`58a9f3b29f99d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/58a9f3b29f99d) -
15
+ Remove temporary implementation of type ARI, use the official one
16
+
17
+ ### Patch Changes
18
+
19
+ - [`da4bb4ac09df1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/da4bb4ac09df1) -
20
+ Update some type related permissions
21
+
3
22
  ## 4.24.1
4
23
 
5
24
  ### Patch Changes
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.USER_ARI_PREFIX = exports.TEAM_TYPE_ARI_PREFIX = exports.TEAM_ARI_PREFIX = void 0;
6
+ exports.USER_ARI_PREFIX = exports.TEAM_ARI_PREFIX = void 0;
7
7
  var USER_ARI_PREFIX = exports.USER_ARI_PREFIX = 'ari:cloud:identity::user/';
8
- var TEAM_ARI_PREFIX = exports.TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
9
- var TEAM_TYPE_ARI_PREFIX = exports.TEAM_TYPE_ARI_PREFIX = 'ari:cloud:identity::team-type/';
8
+ var TEAM_ARI_PREFIX = exports.TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.toUserId = exports.toUserARI = exports.toTeamTypeId = exports.toTeamId = exports.toTeamARI = exports.isUserARI = exports.isTeamTypeAri = exports.isTeamARI = void 0;
6
+ exports.toUserId = exports.toUserARI = exports.toTeamId = exports.toTeamARI = exports.isUserARI = exports.isTeamARI = void 0;
7
7
  var _types = require("../types");
8
8
  var isUserARI = exports.isUserARI = function isUserARI(ari) {
9
9
  return ari.startsWith(_types.USER_ARI_PREFIX);
@@ -28,17 +28,4 @@ var toTeamId = exports.toTeamId = function toTeamId(ari) {
28
28
  };
29
29
  var toTeamARI = exports.toTeamARI = function toTeamARI(teamId) {
30
30
  return isTeamARI(teamId) ? teamId : "".concat(_types.TEAM_ARI_PREFIX).concat(teamId);
31
- };
32
-
33
- /**
34
- * TODO: Replace these team type ari utils with @atlassian/ari when it is published
35
- */
36
- var isTeamTypeAri = exports.isTeamTypeAri = function isTeamTypeAri(ari) {
37
- return ari.startsWith(_types.TEAM_TYPE_ARI_PREFIX);
38
- };
39
- var toTeamTypeId = exports.toTeamTypeId = function toTeamTypeId(teamTypeAriOrId) {
40
- if (isTeamTypeAri(teamTypeAriOrId)) {
41
- return teamTypeAriOrId.replace(_types.TEAM_TYPE_ARI_PREFIX, '');
42
- }
43
- return teamTypeAriOrId;
44
31
  };
@@ -111,7 +111,6 @@ var getActiveTeamPermissionMap = function getActiveTeamPermissionMap(settings, p
111
111
  ADD_AGENT_TO_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
112
112
  REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
113
113
  ARCHIVE_TEAM: isArchiveTeamEnabled && isOrgAdmin,
114
- EDIT_TEAM_TYPE: isOrgAdmin,
115
114
  CAN_EDIT_HIERARCHY: permission === 'FULL_WRITE' && isOrgAdmin
116
115
  });
117
116
  } else if (settings === 'ORG_ADMIN_MANAGED') {
@@ -122,7 +121,9 @@ var getActiveTeamPermissionMap = function getActiveTeamPermissionMap(settings, p
122
121
  REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || permission === 'FULL_WRITE'),
123
122
  ARCHIVE_TEAM: isArchiveTeamEnabled && permission === 'FULL_WRITE',
124
123
  CAN_EDIT_HIERARCHY: permission === 'FULL_WRITE',
125
- EDIT_TEAM_TYPE: permission === 'FULL_WRITE'
124
+ EDIT_TEAM_TYPE: permission === 'FULL_WRITE',
125
+ // ORG_ADMIN_MANAGED teams should not provide options to edit membership settings
126
+ EDIT_TEAM_MEMBERSHIP: false
126
127
  });
127
128
  }
128
129
  return allPermissions(false, false, false);
package/dist/cjs/index.js CHANGED
@@ -111,12 +111,6 @@ Object.defineProperty(exports, "toTeamId", {
111
111
  return _ari.toTeamId;
112
112
  }
113
113
  });
114
- Object.defineProperty(exports, "toTeamTypeId", {
115
- enumerable: true,
116
- get: function get() {
117
- return _ari.toTeamTypeId;
118
- }
119
- });
120
114
  Object.defineProperty(exports, "toUserARI", {
121
115
  enumerable: true,
122
116
  get: function get() {
@@ -15,7 +15,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
15
15
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
16
16
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
17
17
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
18
- var _ari = require("../../common/utils/ari");
19
18
  var _constants = require("../constants");
20
19
  var _restClient = require("../rest-client");
21
20
  var _excluded = ["linkUri"];
@@ -83,12 +82,12 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
83
82
  }, {
84
83
  key: "getTeamById",
85
84
  value: function () {
86
- var _getTeamById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(teamId) {
85
+ var _getTeamById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(teamId, cloudId) {
87
86
  var siteId, teamResponse;
88
87
  return _regenerator.default.wrap(function _callee$(_context) {
89
88
  while (1) switch (_context.prev = _context.next) {
90
89
  case 0:
91
- siteId = this.getCloudId();
90
+ siteId = this.getCloudId(cloudId);
92
91
  _context.next = 3;
93
92
  return this.getResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "?siteId=").concat(siteId));
94
93
  case 3:
@@ -100,7 +99,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
100
99
  }
101
100
  }, _callee, this);
102
101
  }));
103
- function getTeamById(_x) {
102
+ function getTeamById(_x, _x2) {
104
103
  return _getTeamById.apply(this, arguments);
105
104
  }
106
105
  return getTeamById;
@@ -159,7 +158,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
159
158
  }
160
159
  }, _callee2, this, [[0, 12]]);
161
160
  }));
162
- function getAllTeams(_x2) {
161
+ function getAllTeams(_x3) {
163
162
  return _getAllTeams.apply(this, arguments);
164
163
  }
165
164
  return getAllTeams;
@@ -183,7 +182,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
183
182
  }
184
183
  }, _callee3, this);
185
184
  }));
186
- function updateTeamById(_x3, _x4) {
185
+ function updateTeamById(_x4, _x5) {
187
186
  return _updateTeamById.apply(this, arguments);
188
187
  }
189
188
  return updateTeamById;
@@ -226,7 +225,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
226
225
  }
227
226
  }, _callee4, this);
228
227
  }));
229
- function inviteUsersToTeam(_x5, _x6, _x7) {
228
+ function inviteUsersToTeam(_x6, _x7, _x8) {
230
229
  return _inviteUsersToTeam.apply(this, arguments);
231
230
  }
232
231
  return inviteUsersToTeam;
@@ -249,7 +248,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
249
248
  }
250
249
  }, _callee5, this);
251
250
  }));
252
- function getMyTeamMembership(_x8) {
251
+ function getMyTeamMembership(_x9) {
253
252
  return _getMyTeamMembership.apply(this, arguments);
254
253
  }
255
254
  return getMyTeamMembership;
@@ -274,7 +273,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
274
273
  }
275
274
  }, _callee6, this);
276
275
  }));
277
- function getTeamLinksByTeamId(_x9) {
276
+ function getTeamLinksByTeamId(_x0) {
278
277
  return _getTeamLinksByTeamId.apply(this, arguments);
279
278
  }
280
279
  return getTeamLinksByTeamId;
@@ -307,7 +306,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
307
306
  }
308
307
  }, _callee7, this);
309
308
  }));
310
- function createTeamLink(_x0, _x1) {
309
+ function createTeamLink(_x1, _x10) {
311
310
  return _createTeamLink.apply(this, arguments);
312
311
  }
313
312
  return createTeamLink;
@@ -334,7 +333,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
334
333
  }
335
334
  }, _callee8, this);
336
335
  }));
337
- function updateTeamLink(_x10, _x11, _x12) {
336
+ function updateTeamLink(_x11, _x12, _x13) {
338
337
  return _updateTeamLink.apply(this, arguments);
339
338
  }
340
339
  return updateTeamLink;
@@ -353,7 +352,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
353
352
  }
354
353
  }, _callee9, this);
355
354
  }));
356
- function deleteTeamLink(_x13, _x14) {
355
+ function deleteTeamLink(_x14, _x15) {
357
356
  return _deleteTeamLink.apply(this, arguments);
358
357
  }
359
358
  return deleteTeamLink;
@@ -374,7 +373,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
374
373
  }
375
374
  }, _callee0, this);
376
375
  }));
377
- function reorderTeamLink(_x15, _x16, _x17) {
376
+ function reorderTeamLink(_x16, _x17, _x18) {
378
377
  return _reorderTeamLink.apply(this, arguments);
379
378
  }
380
379
  return reorderTeamLink;
@@ -426,7 +425,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
426
425
  }
427
426
  }, _callee10, this);
428
427
  }));
429
- function acceptTeamInvitation(_x18) {
428
+ function acceptTeamInvitation(_x19) {
430
429
  return _acceptTeamInvitation.apply(this, arguments);
431
430
  }
432
431
  return acceptTeamInvitation;
@@ -450,7 +449,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
450
449
  }
451
450
  }, _callee11, this);
452
451
  }));
453
- function declineTeamInvitation(_x19) {
452
+ function declineTeamInvitation(_x20) {
454
453
  return _declineTeamInvitation.apply(this, arguments);
455
454
  }
456
455
  return declineTeamInvitation;
@@ -473,7 +472,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
473
472
  }
474
473
  }, _callee12, this);
475
474
  }));
476
- function selfJoinTeam(_x20, _x21) {
475
+ function selfJoinTeam(_x21, _x22) {
477
476
  return _selfJoinTeam.apply(this, arguments);
478
477
  }
479
478
  return selfJoinTeam;
@@ -510,7 +509,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
510
509
  }
511
510
  }, _callee13, this, [[4, 9]]);
512
511
  }));
513
- function addAgentsToTeam(_x22, _x23) {
512
+ function addAgentsToTeam(_x23, _x24) {
514
513
  return _addAgentsToTeam.apply(this, arguments);
515
514
  }
516
515
  return addAgentsToTeam;
@@ -537,7 +536,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
537
536
  }
538
537
  }, _callee14, this, [[0, 5]]);
539
538
  }));
540
- function removeAgentTeamAssociation(_x24, _x25) {
539
+ function removeAgentTeamAssociation(_x25, _x26) {
541
540
  return _removeAgentTeamAssociation.apply(this, arguments);
542
541
  }
543
542
  return removeAgentTeamAssociation;
@@ -556,7 +555,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
556
555
  }
557
556
  }, _callee15, this);
558
557
  }));
559
- function cancelJoinRequest(_x26) {
558
+ function cancelJoinRequest(_x27) {
560
559
  return _cancelJoinRequest.apply(this, arguments);
561
560
  }
562
561
  return cancelJoinRequest;
@@ -575,7 +574,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
575
574
  }
576
575
  }, _callee16, this);
577
576
  }));
578
- function acceptJoinRequest(_x27, _x28) {
577
+ function acceptJoinRequest(_x28, _x29) {
579
578
  return _acceptJoinRequest.apply(this, arguments);
580
579
  }
581
580
  return acceptJoinRequest;
@@ -594,7 +593,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
594
593
  }
595
594
  }, _callee17, this);
596
595
  }));
597
- function declineJoinRequest(_x29, _x30) {
596
+ function declineJoinRequest(_x30, _x31) {
598
597
  return _declineJoinRequest.apply(this, arguments);
599
598
  }
600
599
  return declineJoinRequest;
@@ -617,7 +616,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
617
616
  }
618
617
  }, _callee18, this);
619
618
  }));
620
- function deleteTeamMembership(_x31, _x32) {
619
+ function deleteTeamMembership(_x32, _x33) {
621
620
  return _deleteTeamMembership.apply(this, arguments);
622
621
  }
623
622
  return deleteTeamMembership;
@@ -641,7 +640,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
641
640
  }
642
641
  }, _callee19, this);
643
642
  }));
644
- function revokeTeamInvite(_x33, _x34) {
643
+ function revokeTeamInvite(_x34, _x35) {
645
644
  return _revokeTeamInvite.apply(this, arguments);
646
645
  }
647
646
  return revokeTeamInvite;
@@ -660,7 +659,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
660
659
  }
661
660
  }, _callee20, this);
662
661
  }));
663
- function deleteTeam(_x35) {
662
+ function deleteTeam(_x36) {
664
663
  return _deleteTeam.apply(this, arguments);
665
664
  }
666
665
  return deleteTeam;
@@ -681,7 +680,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
681
680
  }
682
681
  }, _callee21, this);
683
682
  }));
684
- function archiveTeam(_x36) {
683
+ function archiveTeam(_x37) {
685
684
  return _archiveTeam.apply(this, arguments);
686
685
  }
687
686
  return archiveTeam;
@@ -702,7 +701,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
702
701
  }
703
702
  }, _callee22, this);
704
703
  }));
705
- function unArchiveTeam(_x37) {
704
+ function unArchiveTeam(_x38) {
706
705
  return _unArchiveTeam.apply(this, arguments);
707
706
  }
708
707
  return unArchiveTeam;
@@ -723,7 +722,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
723
722
  }
724
723
  }, _callee23, this);
725
724
  }));
726
- function unlinkTeamFromGroup(_x38, _x39) {
725
+ function unlinkTeamFromGroup(_x39, _x40) {
727
726
  return _unlinkTeamFromGroup.apply(this, arguments);
728
727
  }
729
728
  return unlinkTeamFromGroup;
@@ -751,7 +750,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
751
750
  }
752
751
  }, _callee24, this);
753
752
  }));
754
- function isSingleFullMemberTeam(_x40) {
753
+ function isSingleFullMemberTeam(_x41) {
755
754
  return _isSingleFullMemberTeam.apply(this, arguments);
756
755
  }
757
756
  return isSingleFullMemberTeam;
@@ -790,7 +789,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
790
789
  siteId: this.getCloudId(),
791
790
  organizationId: organizationId,
792
791
  members: (0, _toConsumableArray2.default)(new Set(members)),
793
- typeId: typeId ? (0, _ari.toTeamTypeId)(typeId) : undefined
792
+ typeId: typeId
794
793
  });
795
794
  case 10:
796
795
  legionTeam = _context25.sent;
@@ -801,7 +800,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
801
800
  }
802
801
  }, _callee25, this);
803
802
  }));
804
- function createTeam(_x41, _x42, _x43) {
803
+ function createTeam(_x42, _x43, _x44) {
805
804
  return _createTeam.apply(this, arguments);
806
805
  }
807
806
  return createTeam;
@@ -842,7 +841,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
842
841
  }
843
842
  }, _callee26, this);
844
843
  }));
845
- function createExternalTeam(_x44, _x45, _x46, _x47) {
844
+ function createExternalTeam(_x45, _x46, _x47, _x48) {
846
845
  return _createExternalTeam.apply(this, arguments);
847
846
  }
848
847
  return createExternalTeam;
@@ -866,7 +865,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
866
865
  }
867
866
  }, _callee27, this);
868
867
  }));
869
- function getTeamAndGroupDiff(_x48, _x49) {
868
+ function getTeamAndGroupDiff(_x49, _x50) {
870
869
  return _getTeamAndGroupDiff.apply(this, arguments);
871
870
  }
872
871
  return getTeamAndGroupDiff;
@@ -890,7 +889,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
890
889
  }
891
890
  }, _callee28, this);
892
891
  }));
893
- function linkExistingTeamToGroup(_x50, _x51) {
892
+ function linkExistingTeamToGroup(_x51, _x52) {
894
893
  return _linkExistingTeamToGroup.apply(this, arguments);
895
894
  }
896
895
  return linkExistingTeamToGroup;
@@ -940,7 +939,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
940
939
  }
941
940
  }, _callee30, this);
942
941
  }));
943
- function getSoftDeletedTeamById(_x52) {
942
+ function getSoftDeletedTeamById(_x53) {
944
943
  return _getSoftDeletedTeamById.apply(this, arguments);
945
944
  }
946
945
  return getSoftDeletedTeamById;
@@ -969,7 +968,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
969
968
  }
970
969
  }, _callee31, this);
971
970
  }));
972
- function getUserInSiteUserBase(_x53) {
971
+ function getUserInSiteUserBase(_x54) {
973
972
  return _getUserInSiteUserBase.apply(this, arguments);
974
973
  }
975
974
  return getUserInSiteUserBase;
@@ -992,7 +991,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
992
991
  }
993
992
  }, _callee32, this);
994
993
  }));
995
- function retrieveBrowseUserPermission(_x54) {
994
+ function retrieveBrowseUserPermission(_x55) {
996
995
  return _retrieveBrowseUserPermission.apply(this, arguments);
997
996
  }
998
997
  return retrieveBrowseUserPermission;
@@ -1059,7 +1058,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1059
1058
  }
1060
1059
  }, _callee34, this);
1061
1060
  }));
1062
- function getLinkedTeamsBulk(_x55) {
1061
+ function getLinkedTeamsBulk(_x56) {
1063
1062
  return _getLinkedTeamsBulk.apply(this, arguments);
1064
1063
  }
1065
1064
  return getLinkedTeamsBulk;
@@ -1092,7 +1091,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1092
1091
  }
1093
1092
  }, _callee35, this);
1094
1093
  }));
1095
- function getTeamProfileDetails(_x56, _x57) {
1094
+ function getTeamProfileDetails(_x57, _x58) {
1096
1095
  return _getTeamProfileDetails.apply(this, arguments);
1097
1096
  }
1098
1097
  return getTeamProfileDetails;
@@ -1152,7 +1151,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1152
1151
  }
1153
1152
  }, _callee37, this);
1154
1153
  }));
1155
- function restoreTeamToSyncedGroup(_x58, _x59) {
1154
+ function restoreTeamToSyncedGroup(_x59, _x60) {
1156
1155
  return _restoreTeamToSyncedGroup.apply(this, arguments);
1157
1156
  }
1158
1157
  return restoreTeamToSyncedGroup;
@@ -1171,7 +1170,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1171
1170
  }
1172
1171
  }, _callee38, this);
1173
1172
  }));
1174
- function createTeamContainers(_x60) {
1173
+ function createTeamContainers(_x61) {
1175
1174
  return _createTeamContainers.apply(this, arguments);
1176
1175
  }
1177
1176
  return createTeamContainers;
@@ -1195,7 +1194,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1195
1194
  }
1196
1195
  }, _callee39, this);
1197
1196
  }));
1198
- function getTeamEnabledSites(_x61) {
1197
+ function getTeamEnabledSites(_x62) {
1199
1198
  return _getTeamEnabledSites.apply(this, arguments);
1200
1199
  }
1201
1200
  return getTeamEnabledSites;
@@ -1222,7 +1221,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1222
1221
  }
1223
1222
  }, _callee40, this);
1224
1223
  }));
1225
- function assignTeamsToSites(_x62) {
1224
+ function assignTeamsToSites(_x63) {
1226
1225
  return _assignTeamsToSites.apply(this, arguments);
1227
1226
  }
1228
1227
  return assignTeamsToSites;
@@ -1244,7 +1243,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1244
1243
  }
1245
1244
  }, _callee41, this);
1246
1245
  }));
1247
- function getTeamsToBeClonedToJsmSites(_x63) {
1246
+ function getTeamsToBeClonedToJsmSites(_x64) {
1248
1247
  return _getTeamsToBeClonedToJsmSites.apply(this, arguments);
1249
1248
  }
1250
1249
  return getTeamsToBeClonedToJsmSites;
@@ -1266,7 +1265,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1266
1265
  }
1267
1266
  }, _callee42, this);
1268
1267
  }));
1269
- function setTeamSiteAssignmentPermission(_x64, _x65) {
1268
+ function setTeamSiteAssignmentPermission(_x65, _x66) {
1270
1269
  return _setTeamSiteAssignmentPermission.apply(this, arguments);
1271
1270
  }
1272
1271
  return setTeamSiteAssignmentPermission;
@@ -1295,7 +1294,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1295
1294
  }
1296
1295
  }, _callee43, this);
1297
1296
  }));
1298
- function getAssignedTeams(_x66, _x67, _x68, _x69) {
1297
+ function getAssignedTeams(_x67, _x68, _x69, _x70) {
1299
1298
  return _getAssignedTeams.apply(this, arguments);
1300
1299
  }
1301
1300
  return getAssignedTeams;
@@ -1324,7 +1323,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1324
1323
  }
1325
1324
  }, _callee44, this);
1326
1325
  }));
1327
- function getUnassignedTeams(_x70, _x71, _x72, _x73) {
1326
+ function getUnassignedTeams(_x71, _x72, _x73, _x74) {
1328
1327
  return _getUnassignedTeams.apply(this, arguments);
1329
1328
  }
1330
1329
  return getUnassignedTeams;
@@ -1525,7 +1524,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
1525
1524
  }
1526
1525
  }, _callee46, this, [[0, 4]]);
1527
1526
  }));
1528
- function getTeamStatesInBulk(_x74, _x75) {
1527
+ function getTeamStatesInBulk(_x75, _x76) {
1529
1528
  return _getTeamStatesInBulk.apply(this, arguments);
1530
1529
  }
1531
1530
  return getTeamStatesInBulk;
@@ -382,13 +382,13 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
382
382
  }, {
383
383
  key: "getTeamById",
384
384
  value: (function () {
385
- var _getTeamById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(teamId) {
385
+ var _getTeamById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(teamId, cloudId) {
386
386
  var _this5 = this;
387
387
  return _regenerator.default.wrap(function _callee9$(_context9) {
388
388
  while (1) switch (_context9.prev = _context9.next) {
389
389
  case 0:
390
390
  return _context9.abrupt("return", this.measurePerformance('getTeamById', function () {
391
- return _this5._legionClient.getTeamById(teamId);
391
+ return _this5._legionClient.getTeamById(teamId, cloudId);
392
392
  }));
393
393
  case 1:
394
394
  case "end":
@@ -396,7 +396,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
396
396
  }
397
397
  }, _callee9, this);
398
398
  }));
399
- function getTeamById(_x8) {
399
+ function getTeamById(_x8, _x9) {
400
400
  return _getTeamById.apply(this, arguments);
401
401
  }
402
402
  return getTeamById;
@@ -559,7 +559,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
559
559
  }
560
560
  }, _callee12, this);
561
561
  }));
562
- function getTeamLinksByTeamId(_x9) {
562
+ function getTeamLinksByTeamId(_x0) {
563
563
  return _getTeamLinksByTeamId.apply(this, arguments);
564
564
  }
565
565
  return getTeamLinksByTeamId;
@@ -914,7 +914,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
914
914
  }
915
915
  }, _callee23, this);
916
916
  }));
917
- function cancelJoinRequest(_x0) {
917
+ function cancelJoinRequest(_x1) {
918
918
  return _cancelJoinRequest.apply(this, arguments);
919
919
  }
920
920
  return cancelJoinRequest;
@@ -1076,7 +1076,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
1076
1076
  }
1077
1077
  }, _callee28, this);
1078
1078
  }));
1079
- function deleteTeam(_x1) {
1079
+ function deleteTeam(_x10) {
1080
1080
  return _deleteTeam.apply(this, arguments);
1081
1081
  }
1082
1082
  return deleteTeam;
@@ -1102,7 +1102,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
1102
1102
  }
1103
1103
  }, _callee29, this);
1104
1104
  }));
1105
- function archiveTeam(_x10) {
1105
+ function archiveTeam(_x11) {
1106
1106
  return _archiveTeam.apply(this, arguments);
1107
1107
  }
1108
1108
  return archiveTeam;
@@ -1128,7 +1128,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
1128
1128
  }
1129
1129
  }, _callee30, this);
1130
1130
  }));
1131
- function unarchiveTeam(_x11) {
1131
+ function unarchiveTeam(_x12) {
1132
1132
  return _unarchiveTeam.apply(this, arguments);
1133
1133
  }
1134
1134
  return unarchiveTeam;
@@ -1154,7 +1154,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
1154
1154
  }
1155
1155
  }, _callee31, this);
1156
1156
  }));
1157
- function unlinkTeamFromGroup(_x12) {
1157
+ function unlinkTeamFromGroup(_x13) {
1158
1158
  return _unlinkTeamFromGroup.apply(this, arguments);
1159
1159
  }
1160
1160
  return unlinkTeamFromGroup;
@@ -1178,7 +1178,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
1178
1178
  }
1179
1179
  }, _callee32, this);
1180
1180
  }));
1181
- function isSingleFullMemberTeam(_x13) {
1181
+ function isSingleFullMemberTeam(_x14) {
1182
1182
  return _isSingleFullMemberTeam.apply(this, arguments);
1183
1183
  }
1184
1184
  return isSingleFullMemberTeam;
@@ -1522,7 +1522,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
1522
1522
  }
1523
1523
  }, _callee42, this);
1524
1524
  }));
1525
- function getSoftDeletdTeamById(_x14) {
1525
+ function getSoftDeletdTeamById(_x15) {
1526
1526
  return _getSoftDeletdTeamById.apply(this, arguments);
1527
1527
  }
1528
1528
  return getSoftDeletdTeamById;
@@ -1550,7 +1550,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
1550
1550
  }
1551
1551
  }, _callee43, this);
1552
1552
  }));
1553
- function getUserInSiteUserBase(_x15) {
1553
+ function getUserInSiteUserBase(_x16) {
1554
1554
  return _getUserInSiteUserBase.apply(this, arguments);
1555
1555
  }
1556
1556
  return getUserInSiteUserBase;
@@ -2040,7 +2040,7 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
2040
2040
  }
2041
2041
  }, _callee55, this);
2042
2042
  }));
2043
- function updateUserHeaderImage(_x16) {
2043
+ function updateUserHeaderImage(_x17) {
2044
2044
  return _updateUserHeaderImage.apply(this, arguments);
2045
2045
  }
2046
2046
  return updateUserHeaderImage;
@@ -1,3 +1,2 @@
1
1
  export const USER_ARI_PREFIX = 'ari:cloud:identity::user/';
2
- export const TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
3
- export const TEAM_TYPE_ARI_PREFIX = 'ari:cloud:identity::team-type/';
2
+ export const TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
@@ -1,4 +1,4 @@
1
- import { TEAM_ARI_PREFIX, TEAM_TYPE_ARI_PREFIX, USER_ARI_PREFIX } from '../types';
1
+ import { TEAM_ARI_PREFIX, USER_ARI_PREFIX } from '../types';
2
2
  export const isUserARI = ari => ari.startsWith(USER_ARI_PREFIX);
3
3
  export const toUserId = ari => {
4
4
  if (isUserARI(ari)) {
@@ -18,15 +18,4 @@ export const toTeamId = ari => {
18
18
  };
19
19
  export const toTeamARI = teamId => {
20
20
  return isTeamARI(teamId) ? teamId : `${TEAM_ARI_PREFIX}${teamId}`;
21
- };
22
-
23
- /**
24
- * TODO: Replace these team type ari utils with @atlassian/ari when it is published
25
- */
26
- export const isTeamTypeAri = ari => ari.startsWith(TEAM_TYPE_ARI_PREFIX);
27
- export const toTeamTypeId = teamTypeAriOrId => {
28
- if (isTeamTypeAri(teamTypeAriOrId)) {
29
- return teamTypeAriOrId.replace(TEAM_TYPE_ARI_PREFIX, '');
30
- }
31
- return teamTypeAriOrId;
32
21
  };
@@ -100,7 +100,6 @@ const getActiveTeamPermissionMap = (settings, permission, isMember, isOrgAdmin,
100
100
  ADD_AGENT_TO_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
101
101
  REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
102
102
  ARCHIVE_TEAM: isArchiveTeamEnabled && isOrgAdmin,
103
- EDIT_TEAM_TYPE: isOrgAdmin,
104
103
  CAN_EDIT_HIERARCHY: permission === 'FULL_WRITE' && isOrgAdmin
105
104
  };
106
105
  } else if (settings === 'ORG_ADMIN_MANAGED') {
@@ -112,7 +111,9 @@ const getActiveTeamPermissionMap = (settings, permission, isMember, isOrgAdmin,
112
111
  REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || permission === 'FULL_WRITE'),
113
112
  ARCHIVE_TEAM: isArchiveTeamEnabled && permission === 'FULL_WRITE',
114
113
  CAN_EDIT_HIERARCHY: permission === 'FULL_WRITE',
115
- EDIT_TEAM_TYPE: permission === 'FULL_WRITE'
114
+ EDIT_TEAM_TYPE: permission === 'FULL_WRITE',
115
+ // ORG_ADMIN_MANAGED teams should not provide options to edit membership settings
116
+ EDIT_TEAM_MEMBERSHIP: false
116
117
  };
117
118
  }
118
119
  return allPermissions(false, false, false);
@@ -15,5 +15,5 @@ export { userInfoProvider, UserInfoProvider } from './services/user-info-provide
15
15
 
16
16
  // /utils
17
17
  export { sortMembersByType, isInvited, isMember, isNonMember, isRequestingJoin } from './common/utils';
18
- export { toUserARI, toUserId, toTeamARI, toTeamId, toTeamTypeId } from './common/utils/ari';
18
+ export { toUserARI, toUserId, toTeamARI, toTeamId } from './common/utils/ari';
19
19
  export { useLazyQueryLight, useQueryLight, UseQueryLightError } from './services/use-query-light';