@atlaskit/teams-client 4.24.0 → 4.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/common/utils/permissions/constants.js +3 -2
- package/dist/cjs/services/legion-client/index.js +2 -2
- package/dist/es2019/common/utils/permissions/constants.js +3 -2
- package/dist/es2019/services/legion-client/index.js +3 -3
- package/dist/esm/common/utils/permissions/constants.js +3 -2
- package/dist/esm/services/legion-client/index.js +2 -2
- package/dist/types/services/legion-client/index.d.ts +2 -2
- package/dist/types/services/main.d.ts +3 -3
- package/dist/types-ts4.5/services/legion-client/index.d.ts +2 -2
- package/dist/types-ts4.5/services/main.d.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/teams-client
|
|
2
2
|
|
|
3
|
+
## 4.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`58a9f3b29f99d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/58a9f3b29f99d) -
|
|
8
|
+
Remove temporary implementation of type ARI, use the official one
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`da4bb4ac09df1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/da4bb4ac09df1) -
|
|
13
|
+
Update some type related permissions
|
|
14
|
+
|
|
15
|
+
## 4.24.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`16637112d793a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/16637112d793a) -
|
|
20
|
+
Team creation accepts both team type ID and team type ARI
|
|
21
|
+
|
|
3
22
|
## 4.24.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -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);
|
|
@@ -673,7 +673,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
673
673
|
while (1) switch (_context21.prev = _context21.next) {
|
|
674
674
|
case 0:
|
|
675
675
|
siteId = this.getCloudId();
|
|
676
|
-
return _context21.abrupt("return", this.
|
|
676
|
+
return _context21.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/archive?siteId=").concat(siteId)));
|
|
677
677
|
case 2:
|
|
678
678
|
case "end":
|
|
679
679
|
return _context21.stop();
|
|
@@ -694,7 +694,7 @@ var LegionClient = exports.LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
694
694
|
while (1) switch (_context22.prev = _context22.next) {
|
|
695
695
|
case 0:
|
|
696
696
|
siteId = this.getCloudId();
|
|
697
|
-
return _context22.abrupt("return", this.
|
|
697
|
+
return _context22.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/unarchive?siteId=").concat(siteId)));
|
|
698
698
|
case 2:
|
|
699
699
|
case "end":
|
|
700
700
|
return _context22.stop();
|
|
@@ -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);
|
|
@@ -249,11 +249,11 @@ export class LegionClient extends RestClient {
|
|
|
249
249
|
}
|
|
250
250
|
async archiveTeam(teamId) {
|
|
251
251
|
const siteId = this.getCloudId();
|
|
252
|
-
return this.
|
|
252
|
+
return this.postResource(`${v4UrlPath}/${this.trimTeamARI(teamId)}/archive?siteId=${siteId}`);
|
|
253
253
|
}
|
|
254
254
|
async unArchiveTeam(teamId) {
|
|
255
255
|
const siteId = this.getCloudId();
|
|
256
|
-
return this.
|
|
256
|
+
return this.postResource(`${v4UrlPath}/${this.trimTeamARI(teamId)}/unarchive?siteId=${siteId}`);
|
|
257
257
|
}
|
|
258
258
|
async unlinkTeamFromGroup(teamId, membershipSettings) {
|
|
259
259
|
return this.patchResource(`${v4UrlPath}/${this.trimTeamARI(teamId)}`, {
|
|
@@ -285,7 +285,7 @@ export class LegionClient extends RestClient {
|
|
|
285
285
|
siteId: this.getCloudId(),
|
|
286
286
|
organizationId: organizationId,
|
|
287
287
|
members: [...new Set(members)],
|
|
288
|
-
typeId
|
|
288
|
+
typeId: typeId
|
|
289
289
|
});
|
|
290
290
|
return this.mapTeamCreateResponseV4ToTeam(legionTeam);
|
|
291
291
|
}
|
|
@@ -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);
|
|
@@ -667,7 +667,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
667
667
|
while (1) switch (_context21.prev = _context21.next) {
|
|
668
668
|
case 0:
|
|
669
669
|
siteId = this.getCloudId();
|
|
670
|
-
return _context21.abrupt("return", this.
|
|
670
|
+
return _context21.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/archive?siteId=").concat(siteId)));
|
|
671
671
|
case 2:
|
|
672
672
|
case "end":
|
|
673
673
|
return _context21.stop();
|
|
@@ -688,7 +688,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
|
|
|
688
688
|
while (1) switch (_context22.prev = _context22.next) {
|
|
689
689
|
case 0:
|
|
690
690
|
siteId = this.getCloudId();
|
|
691
|
-
return _context22.abrupt("return", this.
|
|
691
|
+
return _context22.abrupt("return", this.postResource("".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/unarchive?siteId=").concat(siteId)));
|
|
692
692
|
case 2:
|
|
693
693
|
case "end":
|
|
694
694
|
return _context22.stop();
|
|
@@ -88,8 +88,8 @@ export interface LegionClient {
|
|
|
88
88
|
deleteTeamMembership(teamId: string, memberId: string): Promise<TeamMembership>;
|
|
89
89
|
revokeTeamInvite(teamId: string, memberId: string): Promise<TeamMembership>;
|
|
90
90
|
deleteTeam(teamId: string): Promise<void>;
|
|
91
|
-
archiveTeam(teamId: string): Promise<
|
|
92
|
-
unArchiveTeam(teamId: string): Promise<
|
|
91
|
+
archiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
92
|
+
unArchiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
93
93
|
isSingleFullMemberTeam(teamId: string): Promise<boolean>;
|
|
94
94
|
createTeam(displayName: string, originQuery: OriginQuery, members?: string[], membershipSettings?: TeamMembershipSettings, typeId?: string): Promise<Team>;
|
|
95
95
|
createExternalTeam(description: string, externalReference: ExternalReference, teamName?: string, siteId?: string): Promise<Team>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MembershipState, type TeamMembership } from '../types';
|
|
1
|
+
import { type MembershipState, type TeamMembership, type TeamWithImageUrls } from '../types';
|
|
2
2
|
import { aggClient } from './agg-client';
|
|
3
3
|
import { type AGGPageInfoVariables, type ResultWithPageInfo } from './agg-client/types';
|
|
4
4
|
import collaborationGraphClient from './collaborationgraph-client';
|
|
@@ -196,11 +196,11 @@ export declare class TeamsClient {
|
|
|
196
196
|
/**
|
|
197
197
|
* Archive a team
|
|
198
198
|
*/
|
|
199
|
-
archiveTeam(teamId: string): Promise<
|
|
199
|
+
archiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
200
200
|
/**
|
|
201
201
|
* Unarchive a team
|
|
202
202
|
*/
|
|
203
|
-
unarchiveTeam(teamId: string): Promise<
|
|
203
|
+
unarchiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
204
204
|
/**
|
|
205
205
|
* Unlink a team from group
|
|
206
206
|
*/
|
|
@@ -88,8 +88,8 @@ export interface LegionClient {
|
|
|
88
88
|
deleteTeamMembership(teamId: string, memberId: string): Promise<TeamMembership>;
|
|
89
89
|
revokeTeamInvite(teamId: string, memberId: string): Promise<TeamMembership>;
|
|
90
90
|
deleteTeam(teamId: string): Promise<void>;
|
|
91
|
-
archiveTeam(teamId: string): Promise<
|
|
92
|
-
unArchiveTeam(teamId: string): Promise<
|
|
91
|
+
archiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
92
|
+
unArchiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
93
93
|
isSingleFullMemberTeam(teamId: string): Promise<boolean>;
|
|
94
94
|
createTeam(displayName: string, originQuery: OriginQuery, members?: string[], membershipSettings?: TeamMembershipSettings, typeId?: string): Promise<Team>;
|
|
95
95
|
createExternalTeam(description: string, externalReference: ExternalReference, teamName?: string, siteId?: string): Promise<Team>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MembershipState, type TeamMembership } from '../types';
|
|
1
|
+
import { type MembershipState, type TeamMembership, type TeamWithImageUrls } from '../types';
|
|
2
2
|
import { aggClient } from './agg-client';
|
|
3
3
|
import { type AGGPageInfoVariables, type ResultWithPageInfo } from './agg-client/types';
|
|
4
4
|
import collaborationGraphClient from './collaborationgraph-client';
|
|
@@ -196,11 +196,11 @@ export declare class TeamsClient {
|
|
|
196
196
|
/**
|
|
197
197
|
* Archive a team
|
|
198
198
|
*/
|
|
199
|
-
archiveTeam(teamId: string): Promise<
|
|
199
|
+
archiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
200
200
|
/**
|
|
201
201
|
* Unarchive a team
|
|
202
202
|
*/
|
|
203
|
-
unarchiveTeam(teamId: string): Promise<
|
|
203
|
+
unarchiveTeam(teamId: string): Promise<TeamWithImageUrls>;
|
|
204
204
|
/**
|
|
205
205
|
* Unlink a team from group
|
|
206
206
|
*/
|