@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 +19 -0
- package/dist/cjs/common/types.js +2 -3
- package/dist/cjs/common/utils/ari.js +1 -14
- package/dist/cjs/common/utils/permissions/constants.js +3 -2
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/services/legion-client/index.js +46 -47
- package/dist/cjs/services/main.js +13 -13
- package/dist/es2019/common/types.js +1 -2
- package/dist/es2019/common/utils/ari.js +1 -12
- package/dist/es2019/common/utils/permissions/constants.js +3 -2
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/services/legion-client/index.js +3 -4
- package/dist/es2019/services/main.js +2 -2
- package/dist/esm/common/types.js +1 -2
- package/dist/esm/common/utils/ari.js +1 -14
- package/dist/esm/common/utils/permissions/constants.js +3 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/services/legion-client/index.js +46 -47
- package/dist/esm/services/main.js +13 -13
- package/dist/types/common/types.d.ts +0 -2
- package/dist/types/common/utils/ari.d.ts +1 -6
- package/dist/types/index.d.ts +1 -1
- package/dist/types/services/main.d.ts +1 -1
- package/dist/types-ts4.5/common/types.d.ts +0 -2
- package/dist/types-ts4.5/common/utils/ari.d.ts +1 -6
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/services/main.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { toTeamTypeId } from '../../common/utils/ari';
|
|
2
1
|
import { DEFAULT_CONFIG } from '../constants';
|
|
3
2
|
import { RestClient } from '../rest-client';
|
|
4
3
|
|
|
@@ -53,8 +52,8 @@ export class LegionClient extends RestClient {
|
|
|
53
52
|
this.serviceUrlRoot = url;
|
|
54
53
|
this.setServiceUrl(url);
|
|
55
54
|
}
|
|
56
|
-
async getTeamById(teamId) {
|
|
57
|
-
const siteId = this.getCloudId();
|
|
55
|
+
async getTeamById(teamId, cloudId) {
|
|
56
|
+
const siteId = this.getCloudId(cloudId);
|
|
58
57
|
const teamResponse = await this.getResource(`${v4UrlPath}/${this.trimTeamARI(teamId)}?siteId=${siteId}`);
|
|
59
58
|
return this.mapTeamResponseV4ToTeam(teamResponse);
|
|
60
59
|
}
|
|
@@ -286,7 +285,7 @@ export class LegionClient extends RestClient {
|
|
|
286
285
|
siteId: this.getCloudId(),
|
|
287
286
|
organizationId: organizationId,
|
|
288
287
|
members: [...new Set(members)],
|
|
289
|
-
typeId: typeId
|
|
288
|
+
typeId: typeId
|
|
290
289
|
});
|
|
291
290
|
return this.mapTeamCreateResponseV4ToTeam(legionTeam);
|
|
292
291
|
}
|
|
@@ -194,8 +194,8 @@ export class TeamsClient {
|
|
|
194
194
|
* @param teamId
|
|
195
195
|
* @returns {Promise<TeamWithImageUrls>}
|
|
196
196
|
*/
|
|
197
|
-
async getTeamById(teamId) {
|
|
198
|
-
return this.measurePerformance('getTeamById', () => this._legionClient.getTeamById(teamId));
|
|
197
|
+
async getTeamById(teamId, cloudId) {
|
|
198
|
+
return this.measurePerformance('getTeamById', () => this._legionClient.getTeamById(teamId, cloudId));
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
/**
|
package/dist/esm/common/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TEAM_ARI_PREFIX,
|
|
1
|
+
import { TEAM_ARI_PREFIX, USER_ARI_PREFIX } from '../types';
|
|
2
2
|
export var isUserARI = function isUserARI(ari) {
|
|
3
3
|
return ari.startsWith(USER_ARI_PREFIX);
|
|
4
4
|
};
|
|
@@ -22,17 +22,4 @@ export var toTeamId = function toTeamId(ari) {
|
|
|
22
22
|
};
|
|
23
23
|
export var toTeamARI = function toTeamARI(teamId) {
|
|
24
24
|
return isTeamARI(teamId) ? teamId : "".concat(TEAM_ARI_PREFIX).concat(teamId);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* TODO: Replace these team type ari utils with @atlassian/ari when it is published
|
|
29
|
-
*/
|
|
30
|
-
export var isTeamTypeAri = function isTeamTypeAri(ari) {
|
|
31
|
-
return ari.startsWith(TEAM_TYPE_ARI_PREFIX);
|
|
32
|
-
};
|
|
33
|
-
export var toTeamTypeId = function toTeamTypeId(teamTypeAriOrId) {
|
|
34
|
-
if (isTeamTypeAri(teamTypeAriOrId)) {
|
|
35
|
-
return teamTypeAriOrId.replace(TEAM_TYPE_ARI_PREFIX, '');
|
|
36
|
-
}
|
|
37
|
-
return teamTypeAriOrId;
|
|
38
25
|
};
|
|
@@ -104,7 +104,6 @@ var getActiveTeamPermissionMap = function getActiveTeamPermissionMap(settings, p
|
|
|
104
104
|
ADD_AGENT_TO_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
|
|
105
105
|
REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
|
|
106
106
|
ARCHIVE_TEAM: isArchiveTeamEnabled && isOrgAdmin,
|
|
107
|
-
EDIT_TEAM_TYPE: isOrgAdmin,
|
|
108
107
|
CAN_EDIT_HIERARCHY: permission === 'FULL_WRITE' && isOrgAdmin
|
|
109
108
|
});
|
|
110
109
|
} else if (settings === 'ORG_ADMIN_MANAGED') {
|
|
@@ -115,7 +114,9 @@ var getActiveTeamPermissionMap = function getActiveTeamPermissionMap(settings, p
|
|
|
115
114
|
REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || permission === 'FULL_WRITE'),
|
|
116
115
|
ARCHIVE_TEAM: isArchiveTeamEnabled && permission === 'FULL_WRITE',
|
|
117
116
|
CAN_EDIT_HIERARCHY: permission === 'FULL_WRITE',
|
|
118
|
-
EDIT_TEAM_TYPE: permission === 'FULL_WRITE'
|
|
117
|
+
EDIT_TEAM_TYPE: permission === 'FULL_WRITE',
|
|
118
|
+
// ORG_ADMIN_MANAGED teams should not provide options to edit membership settings
|
|
119
|
+
EDIT_TEAM_MEMBERSHIP: false
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
122
|
return allPermissions(false, false, false);
|
package/dist/esm/index.js
CHANGED
|
@@ -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
|
|
18
|
+
export { toUserARI, toUserId, toTeamARI, toTeamId } from './common/utils/ari';
|
|
19
19
|
export { useLazyQueryLight, useQueryLight, UseQueryLightError } from './services/use-query-light';
|
|
@@ -13,7 +13,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
13
13
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
14
14
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
15
15
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
16
|
-
import { toTeamTypeId } from '../../common/utils/ari';
|
|
17
16
|
import { DEFAULT_CONFIG } from '../constants';
|
|
18
17
|
import { RestClient } from '../rest-client';
|
|
19
18
|
|
|
@@ -77,12 +76,12 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
77
76
|
}, {
|
|
78
77
|
key: "getTeamById",
|
|
79
78
|
value: function () {
|
|
80
|
-
var _getTeamById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(teamId) {
|
|
79
|
+
var _getTeamById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(teamId, cloudId) {
|
|
81
80
|
var siteId, teamResponse;
|
|
82
81
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
83
82
|
while (1) switch (_context.prev = _context.next) {
|
|
84
83
|
case 0:
|
|
85
|
-
siteId = this.getCloudId();
|
|
84
|
+
siteId = this.getCloudId(cloudId);
|
|
86
85
|
_context.next = 3;
|
|
87
86
|
return this.getResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "?siteId=").concat(siteId));
|
|
88
87
|
case 3:
|
|
@@ -94,7 +93,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
94
93
|
}
|
|
95
94
|
}, _callee, this);
|
|
96
95
|
}));
|
|
97
|
-
function getTeamById(_x) {
|
|
96
|
+
function getTeamById(_x, _x2) {
|
|
98
97
|
return _getTeamById.apply(this, arguments);
|
|
99
98
|
}
|
|
100
99
|
return getTeamById;
|
|
@@ -153,7 +152,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
153
152
|
}
|
|
154
153
|
}, _callee2, this, [[0, 12]]);
|
|
155
154
|
}));
|
|
156
|
-
function getAllTeams(
|
|
155
|
+
function getAllTeams(_x3) {
|
|
157
156
|
return _getAllTeams.apply(this, arguments);
|
|
158
157
|
}
|
|
159
158
|
return getAllTeams;
|
|
@@ -177,7 +176,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
177
176
|
}
|
|
178
177
|
}, _callee3, this);
|
|
179
178
|
}));
|
|
180
|
-
function updateTeamById(
|
|
179
|
+
function updateTeamById(_x4, _x5) {
|
|
181
180
|
return _updateTeamById.apply(this, arguments);
|
|
182
181
|
}
|
|
183
182
|
return updateTeamById;
|
|
@@ -220,7 +219,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
220
219
|
}
|
|
221
220
|
}, _callee4, this);
|
|
222
221
|
}));
|
|
223
|
-
function inviteUsersToTeam(
|
|
222
|
+
function inviteUsersToTeam(_x6, _x7, _x8) {
|
|
224
223
|
return _inviteUsersToTeam.apply(this, arguments);
|
|
225
224
|
}
|
|
226
225
|
return inviteUsersToTeam;
|
|
@@ -243,7 +242,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
243
242
|
}
|
|
244
243
|
}, _callee5, this);
|
|
245
244
|
}));
|
|
246
|
-
function getMyTeamMembership(
|
|
245
|
+
function getMyTeamMembership(_x9) {
|
|
247
246
|
return _getMyTeamMembership.apply(this, arguments);
|
|
248
247
|
}
|
|
249
248
|
return getMyTeamMembership;
|
|
@@ -268,7 +267,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
268
267
|
}
|
|
269
268
|
}, _callee6, this);
|
|
270
269
|
}));
|
|
271
|
-
function getTeamLinksByTeamId(
|
|
270
|
+
function getTeamLinksByTeamId(_x0) {
|
|
272
271
|
return _getTeamLinksByTeamId.apply(this, arguments);
|
|
273
272
|
}
|
|
274
273
|
return getTeamLinksByTeamId;
|
|
@@ -301,7 +300,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
301
300
|
}
|
|
302
301
|
}, _callee7, this);
|
|
303
302
|
}));
|
|
304
|
-
function createTeamLink(
|
|
303
|
+
function createTeamLink(_x1, _x10) {
|
|
305
304
|
return _createTeamLink.apply(this, arguments);
|
|
306
305
|
}
|
|
307
306
|
return createTeamLink;
|
|
@@ -328,7 +327,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
328
327
|
}
|
|
329
328
|
}, _callee8, this);
|
|
330
329
|
}));
|
|
331
|
-
function updateTeamLink(
|
|
330
|
+
function updateTeamLink(_x11, _x12, _x13) {
|
|
332
331
|
return _updateTeamLink.apply(this, arguments);
|
|
333
332
|
}
|
|
334
333
|
return updateTeamLink;
|
|
@@ -347,7 +346,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
347
346
|
}
|
|
348
347
|
}, _callee9, this);
|
|
349
348
|
}));
|
|
350
|
-
function deleteTeamLink(
|
|
349
|
+
function deleteTeamLink(_x14, _x15) {
|
|
351
350
|
return _deleteTeamLink.apply(this, arguments);
|
|
352
351
|
}
|
|
353
352
|
return deleteTeamLink;
|
|
@@ -368,7 +367,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
368
367
|
}
|
|
369
368
|
}, _callee0, this);
|
|
370
369
|
}));
|
|
371
|
-
function reorderTeamLink(
|
|
370
|
+
function reorderTeamLink(_x16, _x17, _x18) {
|
|
372
371
|
return _reorderTeamLink.apply(this, arguments);
|
|
373
372
|
}
|
|
374
373
|
return reorderTeamLink;
|
|
@@ -420,7 +419,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
420
419
|
}
|
|
421
420
|
}, _callee10, this);
|
|
422
421
|
}));
|
|
423
|
-
function acceptTeamInvitation(
|
|
422
|
+
function acceptTeamInvitation(_x19) {
|
|
424
423
|
return _acceptTeamInvitation.apply(this, arguments);
|
|
425
424
|
}
|
|
426
425
|
return acceptTeamInvitation;
|
|
@@ -444,7 +443,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
444
443
|
}
|
|
445
444
|
}, _callee11, this);
|
|
446
445
|
}));
|
|
447
|
-
function declineTeamInvitation(
|
|
446
|
+
function declineTeamInvitation(_x20) {
|
|
448
447
|
return _declineTeamInvitation.apply(this, arguments);
|
|
449
448
|
}
|
|
450
449
|
return declineTeamInvitation;
|
|
@@ -467,7 +466,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
467
466
|
}
|
|
468
467
|
}, _callee12, this);
|
|
469
468
|
}));
|
|
470
|
-
function selfJoinTeam(
|
|
469
|
+
function selfJoinTeam(_x21, _x22) {
|
|
471
470
|
return _selfJoinTeam.apply(this, arguments);
|
|
472
471
|
}
|
|
473
472
|
return selfJoinTeam;
|
|
@@ -504,7 +503,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
504
503
|
}
|
|
505
504
|
}, _callee13, this, [[4, 9]]);
|
|
506
505
|
}));
|
|
507
|
-
function addAgentsToTeam(
|
|
506
|
+
function addAgentsToTeam(_x23, _x24) {
|
|
508
507
|
return _addAgentsToTeam.apply(this, arguments);
|
|
509
508
|
}
|
|
510
509
|
return addAgentsToTeam;
|
|
@@ -531,7 +530,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
531
530
|
}
|
|
532
531
|
}, _callee14, this, [[0, 5]]);
|
|
533
532
|
}));
|
|
534
|
-
function removeAgentTeamAssociation(
|
|
533
|
+
function removeAgentTeamAssociation(_x25, _x26) {
|
|
535
534
|
return _removeAgentTeamAssociation.apply(this, arguments);
|
|
536
535
|
}
|
|
537
536
|
return removeAgentTeamAssociation;
|
|
@@ -550,7 +549,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
550
549
|
}
|
|
551
550
|
}, _callee15, this);
|
|
552
551
|
}));
|
|
553
|
-
function cancelJoinRequest(
|
|
552
|
+
function cancelJoinRequest(_x27) {
|
|
554
553
|
return _cancelJoinRequest.apply(this, arguments);
|
|
555
554
|
}
|
|
556
555
|
return cancelJoinRequest;
|
|
@@ -569,7 +568,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
569
568
|
}
|
|
570
569
|
}, _callee16, this);
|
|
571
570
|
}));
|
|
572
|
-
function acceptJoinRequest(
|
|
571
|
+
function acceptJoinRequest(_x28, _x29) {
|
|
573
572
|
return _acceptJoinRequest.apply(this, arguments);
|
|
574
573
|
}
|
|
575
574
|
return acceptJoinRequest;
|
|
@@ -588,7 +587,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
588
587
|
}
|
|
589
588
|
}, _callee17, this);
|
|
590
589
|
}));
|
|
591
|
-
function declineJoinRequest(
|
|
590
|
+
function declineJoinRequest(_x30, _x31) {
|
|
592
591
|
return _declineJoinRequest.apply(this, arguments);
|
|
593
592
|
}
|
|
594
593
|
return declineJoinRequest;
|
|
@@ -611,7 +610,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
611
610
|
}
|
|
612
611
|
}, _callee18, this);
|
|
613
612
|
}));
|
|
614
|
-
function deleteTeamMembership(
|
|
613
|
+
function deleteTeamMembership(_x32, _x33) {
|
|
615
614
|
return _deleteTeamMembership.apply(this, arguments);
|
|
616
615
|
}
|
|
617
616
|
return deleteTeamMembership;
|
|
@@ -635,7 +634,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
635
634
|
}
|
|
636
635
|
}, _callee19, this);
|
|
637
636
|
}));
|
|
638
|
-
function revokeTeamInvite(
|
|
637
|
+
function revokeTeamInvite(_x34, _x35) {
|
|
639
638
|
return _revokeTeamInvite.apply(this, arguments);
|
|
640
639
|
}
|
|
641
640
|
return revokeTeamInvite;
|
|
@@ -654,7 +653,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
654
653
|
}
|
|
655
654
|
}, _callee20, this);
|
|
656
655
|
}));
|
|
657
|
-
function deleteTeam(
|
|
656
|
+
function deleteTeam(_x36) {
|
|
658
657
|
return _deleteTeam.apply(this, arguments);
|
|
659
658
|
}
|
|
660
659
|
return deleteTeam;
|
|
@@ -675,7 +674,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
675
674
|
}
|
|
676
675
|
}, _callee21, this);
|
|
677
676
|
}));
|
|
678
|
-
function archiveTeam(
|
|
677
|
+
function archiveTeam(_x37) {
|
|
679
678
|
return _archiveTeam.apply(this, arguments);
|
|
680
679
|
}
|
|
681
680
|
return archiveTeam;
|
|
@@ -696,7 +695,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
696
695
|
}
|
|
697
696
|
}, _callee22, this);
|
|
698
697
|
}));
|
|
699
|
-
function unArchiveTeam(
|
|
698
|
+
function unArchiveTeam(_x38) {
|
|
700
699
|
return _unArchiveTeam.apply(this, arguments);
|
|
701
700
|
}
|
|
702
701
|
return unArchiveTeam;
|
|
@@ -717,7 +716,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
717
716
|
}
|
|
718
717
|
}, _callee23, this);
|
|
719
718
|
}));
|
|
720
|
-
function unlinkTeamFromGroup(
|
|
719
|
+
function unlinkTeamFromGroup(_x39, _x40) {
|
|
721
720
|
return _unlinkTeamFromGroup.apply(this, arguments);
|
|
722
721
|
}
|
|
723
722
|
return unlinkTeamFromGroup;
|
|
@@ -745,7 +744,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
745
744
|
}
|
|
746
745
|
}, _callee24, this);
|
|
747
746
|
}));
|
|
748
|
-
function isSingleFullMemberTeam(
|
|
747
|
+
function isSingleFullMemberTeam(_x41) {
|
|
749
748
|
return _isSingleFullMemberTeam.apply(this, arguments);
|
|
750
749
|
}
|
|
751
750
|
return isSingleFullMemberTeam;
|
|
@@ -784,7 +783,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
784
783
|
siteId: this.getCloudId(),
|
|
785
784
|
organizationId: organizationId,
|
|
786
785
|
members: _toConsumableArray(new Set(members)),
|
|
787
|
-
typeId: typeId
|
|
786
|
+
typeId: typeId
|
|
788
787
|
});
|
|
789
788
|
case 10:
|
|
790
789
|
legionTeam = _context25.sent;
|
|
@@ -795,7 +794,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
795
794
|
}
|
|
796
795
|
}, _callee25, this);
|
|
797
796
|
}));
|
|
798
|
-
function createTeam(
|
|
797
|
+
function createTeam(_x42, _x43, _x44) {
|
|
799
798
|
return _createTeam.apply(this, arguments);
|
|
800
799
|
}
|
|
801
800
|
return createTeam;
|
|
@@ -836,7 +835,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
836
835
|
}
|
|
837
836
|
}, _callee26, this);
|
|
838
837
|
}));
|
|
839
|
-
function createExternalTeam(
|
|
838
|
+
function createExternalTeam(_x45, _x46, _x47, _x48) {
|
|
840
839
|
return _createExternalTeam.apply(this, arguments);
|
|
841
840
|
}
|
|
842
841
|
return createExternalTeam;
|
|
@@ -860,7 +859,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
860
859
|
}
|
|
861
860
|
}, _callee27, this);
|
|
862
861
|
}));
|
|
863
|
-
function getTeamAndGroupDiff(
|
|
862
|
+
function getTeamAndGroupDiff(_x49, _x50) {
|
|
864
863
|
return _getTeamAndGroupDiff.apply(this, arguments);
|
|
865
864
|
}
|
|
866
865
|
return getTeamAndGroupDiff;
|
|
@@ -884,7 +883,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
884
883
|
}
|
|
885
884
|
}, _callee28, this);
|
|
886
885
|
}));
|
|
887
|
-
function linkExistingTeamToGroup(
|
|
886
|
+
function linkExistingTeamToGroup(_x51, _x52) {
|
|
888
887
|
return _linkExistingTeamToGroup.apply(this, arguments);
|
|
889
888
|
}
|
|
890
889
|
return linkExistingTeamToGroup;
|
|
@@ -934,7 +933,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
934
933
|
}
|
|
935
934
|
}, _callee30, this);
|
|
936
935
|
}));
|
|
937
|
-
function getSoftDeletedTeamById(
|
|
936
|
+
function getSoftDeletedTeamById(_x53) {
|
|
938
937
|
return _getSoftDeletedTeamById.apply(this, arguments);
|
|
939
938
|
}
|
|
940
939
|
return getSoftDeletedTeamById;
|
|
@@ -963,7 +962,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
963
962
|
}
|
|
964
963
|
}, _callee31, this);
|
|
965
964
|
}));
|
|
966
|
-
function getUserInSiteUserBase(
|
|
965
|
+
function getUserInSiteUserBase(_x54) {
|
|
967
966
|
return _getUserInSiteUserBase.apply(this, arguments);
|
|
968
967
|
}
|
|
969
968
|
return getUserInSiteUserBase;
|
|
@@ -986,7 +985,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
986
985
|
}
|
|
987
986
|
}, _callee32, this);
|
|
988
987
|
}));
|
|
989
|
-
function retrieveBrowseUserPermission(
|
|
988
|
+
function retrieveBrowseUserPermission(_x55) {
|
|
990
989
|
return _retrieveBrowseUserPermission.apply(this, arguments);
|
|
991
990
|
}
|
|
992
991
|
return retrieveBrowseUserPermission;
|
|
@@ -1053,7 +1052,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1053
1052
|
}
|
|
1054
1053
|
}, _callee34, this);
|
|
1055
1054
|
}));
|
|
1056
|
-
function getLinkedTeamsBulk(
|
|
1055
|
+
function getLinkedTeamsBulk(_x56) {
|
|
1057
1056
|
return _getLinkedTeamsBulk.apply(this, arguments);
|
|
1058
1057
|
}
|
|
1059
1058
|
return getLinkedTeamsBulk;
|
|
@@ -1086,7 +1085,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1086
1085
|
}
|
|
1087
1086
|
}, _callee35, this);
|
|
1088
1087
|
}));
|
|
1089
|
-
function getTeamProfileDetails(
|
|
1088
|
+
function getTeamProfileDetails(_x57, _x58) {
|
|
1090
1089
|
return _getTeamProfileDetails.apply(this, arguments);
|
|
1091
1090
|
}
|
|
1092
1091
|
return getTeamProfileDetails;
|
|
@@ -1146,7 +1145,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1146
1145
|
}
|
|
1147
1146
|
}, _callee37, this);
|
|
1148
1147
|
}));
|
|
1149
|
-
function restoreTeamToSyncedGroup(
|
|
1148
|
+
function restoreTeamToSyncedGroup(_x59, _x60) {
|
|
1150
1149
|
return _restoreTeamToSyncedGroup.apply(this, arguments);
|
|
1151
1150
|
}
|
|
1152
1151
|
return restoreTeamToSyncedGroup;
|
|
@@ -1165,7 +1164,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1165
1164
|
}
|
|
1166
1165
|
}, _callee38, this);
|
|
1167
1166
|
}));
|
|
1168
|
-
function createTeamContainers(
|
|
1167
|
+
function createTeamContainers(_x61) {
|
|
1169
1168
|
return _createTeamContainers.apply(this, arguments);
|
|
1170
1169
|
}
|
|
1171
1170
|
return createTeamContainers;
|
|
@@ -1189,7 +1188,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1189
1188
|
}
|
|
1190
1189
|
}, _callee39, this);
|
|
1191
1190
|
}));
|
|
1192
|
-
function getTeamEnabledSites(
|
|
1191
|
+
function getTeamEnabledSites(_x62) {
|
|
1193
1192
|
return _getTeamEnabledSites.apply(this, arguments);
|
|
1194
1193
|
}
|
|
1195
1194
|
return getTeamEnabledSites;
|
|
@@ -1216,7 +1215,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1216
1215
|
}
|
|
1217
1216
|
}, _callee40, this);
|
|
1218
1217
|
}));
|
|
1219
|
-
function assignTeamsToSites(
|
|
1218
|
+
function assignTeamsToSites(_x63) {
|
|
1220
1219
|
return _assignTeamsToSites.apply(this, arguments);
|
|
1221
1220
|
}
|
|
1222
1221
|
return assignTeamsToSites;
|
|
@@ -1238,7 +1237,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1238
1237
|
}
|
|
1239
1238
|
}, _callee41, this);
|
|
1240
1239
|
}));
|
|
1241
|
-
function getTeamsToBeClonedToJsmSites(
|
|
1240
|
+
function getTeamsToBeClonedToJsmSites(_x64) {
|
|
1242
1241
|
return _getTeamsToBeClonedToJsmSites.apply(this, arguments);
|
|
1243
1242
|
}
|
|
1244
1243
|
return getTeamsToBeClonedToJsmSites;
|
|
@@ -1260,7 +1259,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1260
1259
|
}
|
|
1261
1260
|
}, _callee42, this);
|
|
1262
1261
|
}));
|
|
1263
|
-
function setTeamSiteAssignmentPermission(
|
|
1262
|
+
function setTeamSiteAssignmentPermission(_x65, _x66) {
|
|
1264
1263
|
return _setTeamSiteAssignmentPermission.apply(this, arguments);
|
|
1265
1264
|
}
|
|
1266
1265
|
return setTeamSiteAssignmentPermission;
|
|
@@ -1289,7 +1288,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1289
1288
|
}
|
|
1290
1289
|
}, _callee43, this);
|
|
1291
1290
|
}));
|
|
1292
|
-
function getAssignedTeams(
|
|
1291
|
+
function getAssignedTeams(_x67, _x68, _x69, _x70) {
|
|
1293
1292
|
return _getAssignedTeams.apply(this, arguments);
|
|
1294
1293
|
}
|
|
1295
1294
|
return getAssignedTeams;
|
|
@@ -1318,7 +1317,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1318
1317
|
}
|
|
1319
1318
|
}, _callee44, this);
|
|
1320
1319
|
}));
|
|
1321
|
-
function getUnassignedTeams(
|
|
1320
|
+
function getUnassignedTeams(_x71, _x72, _x73, _x74) {
|
|
1322
1321
|
return _getUnassignedTeams.apply(this, arguments);
|
|
1323
1322
|
}
|
|
1324
1323
|
return getUnassignedTeams;
|
|
@@ -1519,7 +1518,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
1519
1518
|
}
|
|
1520
1519
|
}, _callee46, this, [[0, 4]]);
|
|
1521
1520
|
}));
|
|
1522
|
-
function getTeamStatesInBulk(
|
|
1521
|
+
function getTeamStatesInBulk(_x75, _x76) {
|
|
1523
1522
|
return _getTeamStatesInBulk.apply(this, arguments);
|
|
1524
1523
|
}
|
|
1525
1524
|
return getTeamStatesInBulk;
|
|
@@ -377,13 +377,13 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
377
377
|
}, {
|
|
378
378
|
key: "getTeamById",
|
|
379
379
|
value: (function () {
|
|
380
|
-
var _getTeamById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(teamId) {
|
|
380
|
+
var _getTeamById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(teamId, cloudId) {
|
|
381
381
|
var _this5 = this;
|
|
382
382
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
383
383
|
while (1) switch (_context9.prev = _context9.next) {
|
|
384
384
|
case 0:
|
|
385
385
|
return _context9.abrupt("return", this.measurePerformance('getTeamById', function () {
|
|
386
|
-
return _this5._legionClient.getTeamById(teamId);
|
|
386
|
+
return _this5._legionClient.getTeamById(teamId, cloudId);
|
|
387
387
|
}));
|
|
388
388
|
case 1:
|
|
389
389
|
case "end":
|
|
@@ -391,7 +391,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
391
391
|
}
|
|
392
392
|
}, _callee9, this);
|
|
393
393
|
}));
|
|
394
|
-
function getTeamById(_x8) {
|
|
394
|
+
function getTeamById(_x8, _x9) {
|
|
395
395
|
return _getTeamById.apply(this, arguments);
|
|
396
396
|
}
|
|
397
397
|
return getTeamById;
|
|
@@ -554,7 +554,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
554
554
|
}
|
|
555
555
|
}, _callee12, this);
|
|
556
556
|
}));
|
|
557
|
-
function getTeamLinksByTeamId(
|
|
557
|
+
function getTeamLinksByTeamId(_x0) {
|
|
558
558
|
return _getTeamLinksByTeamId.apply(this, arguments);
|
|
559
559
|
}
|
|
560
560
|
return getTeamLinksByTeamId;
|
|
@@ -909,7 +909,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
909
909
|
}
|
|
910
910
|
}, _callee23, this);
|
|
911
911
|
}));
|
|
912
|
-
function cancelJoinRequest(
|
|
912
|
+
function cancelJoinRequest(_x1) {
|
|
913
913
|
return _cancelJoinRequest.apply(this, arguments);
|
|
914
914
|
}
|
|
915
915
|
return cancelJoinRequest;
|
|
@@ -1071,7 +1071,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
}, _callee28, this);
|
|
1073
1073
|
}));
|
|
1074
|
-
function deleteTeam(
|
|
1074
|
+
function deleteTeam(_x10) {
|
|
1075
1075
|
return _deleteTeam.apply(this, arguments);
|
|
1076
1076
|
}
|
|
1077
1077
|
return deleteTeam;
|
|
@@ -1097,7 +1097,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
1097
1097
|
}
|
|
1098
1098
|
}, _callee29, this);
|
|
1099
1099
|
}));
|
|
1100
|
-
function archiveTeam(
|
|
1100
|
+
function archiveTeam(_x11) {
|
|
1101
1101
|
return _archiveTeam.apply(this, arguments);
|
|
1102
1102
|
}
|
|
1103
1103
|
return archiveTeam;
|
|
@@ -1123,7 +1123,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
}, _callee30, this);
|
|
1125
1125
|
}));
|
|
1126
|
-
function unarchiveTeam(
|
|
1126
|
+
function unarchiveTeam(_x12) {
|
|
1127
1127
|
return _unarchiveTeam.apply(this, arguments);
|
|
1128
1128
|
}
|
|
1129
1129
|
return unarchiveTeam;
|
|
@@ -1149,7 +1149,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
}, _callee31, this);
|
|
1151
1151
|
}));
|
|
1152
|
-
function unlinkTeamFromGroup(
|
|
1152
|
+
function unlinkTeamFromGroup(_x13) {
|
|
1153
1153
|
return _unlinkTeamFromGroup.apply(this, arguments);
|
|
1154
1154
|
}
|
|
1155
1155
|
return unlinkTeamFromGroup;
|
|
@@ -1173,7 +1173,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}, _callee32, this);
|
|
1175
1175
|
}));
|
|
1176
|
-
function isSingleFullMemberTeam(
|
|
1176
|
+
function isSingleFullMemberTeam(_x14) {
|
|
1177
1177
|
return _isSingleFullMemberTeam.apply(this, arguments);
|
|
1178
1178
|
}
|
|
1179
1179
|
return isSingleFullMemberTeam;
|
|
@@ -1517,7 +1517,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
1517
1517
|
}
|
|
1518
1518
|
}, _callee42, this);
|
|
1519
1519
|
}));
|
|
1520
|
-
function getSoftDeletdTeamById(
|
|
1520
|
+
function getSoftDeletdTeamById(_x15) {
|
|
1521
1521
|
return _getSoftDeletdTeamById.apply(this, arguments);
|
|
1522
1522
|
}
|
|
1523
1523
|
return getSoftDeletdTeamById;
|
|
@@ -1545,7 +1545,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
}, _callee43, this);
|
|
1547
1547
|
}));
|
|
1548
|
-
function getUserInSiteUserBase(
|
|
1548
|
+
function getUserInSiteUserBase(_x16) {
|
|
1549
1549
|
return _getUserInSiteUserBase.apply(this, arguments);
|
|
1550
1550
|
}
|
|
1551
1551
|
return getUserInSiteUserBase;
|
|
@@ -2035,7 +2035,7 @@ export var TeamsClient = /*#__PURE__*/function () {
|
|
|
2035
2035
|
}
|
|
2036
2036
|
}, _callee55, this);
|
|
2037
2037
|
}));
|
|
2038
|
-
function updateUserHeaderImage(
|
|
2038
|
+
function updateUserHeaderImage(_x17) {
|
|
2039
2039
|
return _updateUserHeaderImage.apply(this, arguments);
|
|
2040
2040
|
}
|
|
2041
2041
|
return updateUserHeaderImage;
|
|
@@ -2,5 +2,3 @@ export declare const USER_ARI_PREFIX: "ari:cloud:identity::user/";
|
|
|
2
2
|
export type UserARI = `${typeof USER_ARI_PREFIX}${string}`;
|
|
3
3
|
export declare const TEAM_ARI_PREFIX: "ari:cloud:identity::team/";
|
|
4
4
|
export type TeamARI = `${typeof TEAM_ARI_PREFIX}${string}`;
|
|
5
|
-
export declare const TEAM_TYPE_ARI_PREFIX: "ari:cloud:identity::team-type/";
|
|
6
|
-
export type TeamTypeAri = `${typeof TEAM_TYPE_ARI_PREFIX}${string}`;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { type TeamARI, type
|
|
1
|
+
import { type TeamARI, type UserARI } from '../types';
|
|
2
2
|
export declare const isUserARI: (ari: string) => ari is UserARI;
|
|
3
3
|
export declare const toUserId: (ari: UserARI | string) => string;
|
|
4
4
|
export declare const toUserARI: (userId: string) => UserARI;
|
|
5
5
|
export declare const isTeamARI: (ari: string) => ari is TeamARI;
|
|
6
6
|
export declare const toTeamId: (ari: TeamARI | string) => string;
|
|
7
7
|
export declare const toTeamARI: (teamId: string) => TeamARI;
|
|
8
|
-
/**
|
|
9
|
-
* TODO: Replace these team type ari utils with @atlassian/ari when it is published
|
|
10
|
-
*/
|
|
11
|
-
export declare const isTeamTypeAri: (ari: string) => ari is TeamTypeAri;
|
|
12
|
-
export declare const toTeamTypeId: (teamTypeAriOrId: TeamTypeAri | string) => string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export { logException, logInfoMessage } from './services/sentry/main';
|
|
|
10
10
|
export type { SentryClient } from './services/sentry/types';
|
|
11
11
|
export { userInfoProvider, UserInfoProvider } from './services/user-info-provider';
|
|
12
12
|
export { sortMembersByType, isInvited, isMember, isNonMember, isRequestingJoin, } from './common/utils';
|
|
13
|
-
export { toUserARI, toUserId, toTeamARI, toTeamId
|
|
13
|
+
export { toUserARI, toUserId, toTeamARI, toTeamId } from './common/utils/ari';
|
|
14
14
|
export { useLazyQueryLight, useQueryLight, UseQueryLightError, type ActualGraphQLError, } from './services/use-query-light';
|
|
15
15
|
export type { FetchMoreArgs, QueryOptions } from './services/use-query-light';
|
|
@@ -108,7 +108,7 @@ export declare class TeamsClient {
|
|
|
108
108
|
* @param teamId
|
|
109
109
|
* @returns {Promise<TeamWithImageUrls>}
|
|
110
110
|
*/
|
|
111
|
-
getTeamById(teamId: string): Promise<AwaitedReturn<typeof defaultLegionClient.getTeamById>>;
|
|
111
|
+
getTeamById(teamId: string, cloudId?: string): Promise<AwaitedReturn<typeof defaultLegionClient.getTeamById>>;
|
|
112
112
|
/**
|
|
113
113
|
* Search teams based on query
|
|
114
114
|
*/
|
|
@@ -2,5 +2,3 @@ export declare const USER_ARI_PREFIX: "ari:cloud:identity::user/";
|
|
|
2
2
|
export type UserARI = `${typeof USER_ARI_PREFIX}${string}`;
|
|
3
3
|
export declare const TEAM_ARI_PREFIX: "ari:cloud:identity::team/";
|
|
4
4
|
export type TeamARI = `${typeof TEAM_ARI_PREFIX}${string}`;
|
|
5
|
-
export declare const TEAM_TYPE_ARI_PREFIX: "ari:cloud:identity::team-type/";
|
|
6
|
-
export type TeamTypeAri = `${typeof TEAM_TYPE_ARI_PREFIX}${string}`;
|