@atlaskit/teams-client 4.27.0 → 4.29.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 +14 -0
- package/dist/cjs/common/utils/permissions/constants.js +5 -4
- package/dist/cjs/common/utils/ufo/index.js +2 -2
- package/dist/cjs/services/agg-client/index.js +219 -0
- package/dist/cjs/services/agg-client/utils/mutations/unlink-container-mutation.js +12 -0
- package/dist/cjs/services/agg-client/utils/queries/number-of-team-connected-to-container-query.js +12 -0
- package/dist/cjs/services/agg-client/utils/queries/team-connected-to-container-query.js +12 -0
- package/dist/cjs/services/agg-client/utils/queries/team-containers-query.js +12 -0
- package/dist/cjs/services/legion-client/index.js +3 -1
- package/dist/cjs/services/main.js +782 -631
- package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/es2019/common/utils/permissions/constants.js +5 -4
- package/dist/es2019/common/utils/ufo/index.js +2 -2
- package/dist/es2019/services/agg-client/index.js +141 -0
- package/dist/es2019/services/agg-client/utils/mutations/unlink-container-mutation.js +20 -0
- package/dist/es2019/services/agg-client/utils/queries/number-of-team-connected-to-container-query.js +14 -0
- package/dist/es2019/services/agg-client/utils/queries/team-connected-to-container-query.js +55 -0
- package/dist/es2019/services/agg-client/utils/queries/team-containers-query.js +53 -0
- package/dist/es2019/services/legion-client/index.js +3 -1
- package/dist/es2019/services/main.js +55 -0
- package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/common/utils/permissions/constants.js +5 -4
- package/dist/esm/common/utils/ufo/index.js +2 -2
- package/dist/esm/services/agg-client/index.js +221 -0
- package/dist/esm/services/agg-client/utils/mutations/unlink-container-mutation.js +5 -0
- package/dist/esm/services/agg-client/utils/queries/number-of-team-connected-to-container-query.js +5 -0
- package/dist/esm/services/agg-client/utils/queries/team-connected-to-container-query.js +5 -0
- package/dist/esm/services/agg-client/utils/queries/team-containers-query.js +5 -0
- package/dist/esm/services/legion-client/index.js +3 -1
- package/dist/esm/services/main.js +782 -631
- package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/types/common/utils/permissions/constants.d.ts +1 -0
- package/dist/types/services/agg-client/index.d.ts +23 -1
- package/dist/types/services/agg-client/utils/mutations/unlink-container-mutation.d.ts +18 -0
- package/dist/types/services/agg-client/utils/queries/number-of-team-connected-to-container-query.d.ts +11 -0
- package/dist/types/services/agg-client/utils/queries/team-connected-to-container-query.d.ts +47 -0
- package/dist/types/services/agg-client/utils/queries/team-containers-query.d.ts +52 -0
- package/dist/types/services/legion-client/index.d.ts +2 -0
- package/dist/types/services/main.d.ts +39 -2
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types-ts4.5/common/utils/permissions/constants.d.ts +1 -0
- package/dist/types-ts4.5/services/agg-client/index.d.ts +23 -1
- package/dist/types-ts4.5/services/agg-client/utils/mutations/unlink-container-mutation.d.ts +18 -0
- package/dist/types-ts4.5/services/agg-client/utils/queries/number-of-team-connected-to-container-query.d.ts +11 -0
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-connected-to-container-query.d.ts +47 -0
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-containers-query.d.ts +52 -0
- package/dist/types-ts4.5/services/legion-client/index.d.ts +2 -0
- package/dist/types-ts4.5/services/main.d.ts +39 -2
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -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.28.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) || '---',
|
|
@@ -22,7 +22,7 @@ export const allPermissions = (defaultPermission, isMember, isOrgAdmin) => ({
|
|
|
22
22
|
ADD_AGENT_TO_TEAM: defaultPermission,
|
|
23
23
|
ARCHIVE_TEAM: defaultPermission && isMember,
|
|
24
24
|
UNARCHIVE_TEAM: false,
|
|
25
|
-
CAN_EDIT_HIERARCHY: defaultPermission
|
|
25
|
+
CAN_EDIT_HIERARCHY: defaultPermission,
|
|
26
26
|
CAN_CHANGE_MEMBERSHIP_SETTINGS: defaultPermission
|
|
27
27
|
});
|
|
28
28
|
export const vanityActions = ['EDIT_DESCRIPTION', 'EDIT_TEAM_NAME', 'EDIT_PROFILE_HEADER', 'EDIT_TEAM_LINK'];
|
|
@@ -41,7 +41,9 @@ export const SCIMSyncTeamPermissions = (isMember, isOrgAdmin, source) => ({
|
|
|
41
41
|
EDIT_DESCRIPTION: isMember || isOrgAdmin,
|
|
42
42
|
EDIT_TEAM_SETTINGS: isMember || isOrgAdmin,
|
|
43
43
|
EDIT_TEAM_LINK: isMember || isOrgAdmin,
|
|
44
|
-
EDIT_TEAM_NAME: isOrgAdmin && source === 'ATLASSIAN_GROUP' && fg('enable_edit_team_name_external_type_teams')
|
|
44
|
+
EDIT_TEAM_NAME: isOrgAdmin && source === 'ATLASSIAN_GROUP' && fg('enable_edit_team_name_external_type_teams'),
|
|
45
|
+
//Org admins should not be able to edit hierarchies of HRIS synced teams
|
|
46
|
+
CAN_EDIT_HIERARCHY: source === 'ATLASSIAN_GROUP' && isOrgAdmin
|
|
45
47
|
});
|
|
46
48
|
|
|
47
49
|
/**
|
|
@@ -99,8 +101,7 @@ const getActiveTeamPermissionMap = (settings, permission, isMember, isOrgAdmin,
|
|
|
99
101
|
...SCIMSyncTeamPermissions(isMember, isOrgAdmin, source),
|
|
100
102
|
ADD_AGENT_TO_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
|
|
101
103
|
REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
|
|
102
|
-
ARCHIVE_TEAM: isArchiveTeamEnabled && isOrgAdmin
|
|
103
|
-
CAN_EDIT_HIERARCHY: permission === 'FULL_WRITE' && isOrgAdmin
|
|
104
|
+
ARCHIVE_TEAM: isArchiveTeamEnabled && isOrgAdmin
|
|
104
105
|
};
|
|
105
106
|
} else if (settings === 'ORG_ADMIN_MANAGED') {
|
|
106
107
|
// NOTE: Only org admins will received FULL_WRITE permission
|
|
@@ -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.28.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.28.0",
|
|
39
39
|
packageName: "@atlaskit/teams-client"
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -2,10 +2,17 @@ import { toTeamARI, toUserId } from '../../common/utils/ari';
|
|
|
2
2
|
import { DEFAULT_CONFIG } from '../constants';
|
|
3
3
|
import { BaseGraphQlClient } from '../graphql-client';
|
|
4
4
|
import { logException } from '../sentry/main';
|
|
5
|
+
import { UnlinkContainerMutation } from './utils/mutations/unlink-container-mutation';
|
|
6
|
+
import { NumberOfTeamConnectedToContainerQuery } from './utils/queries/number-of-team-connected-to-container-query';
|
|
7
|
+
import { TeamConnectedToContainerQuery } from './utils/queries/team-connected-to-container-query';
|
|
8
|
+
import { TeamContainersQueryV2 } from './utils/queries/team-containers-query';
|
|
5
9
|
import { TeamHasAgentsQuery } from './utils/queries/team-has-agents-query';
|
|
6
10
|
import TeamMembershipsQuery from './utils/queries/team-membership-query';
|
|
7
11
|
import { TeamsUserQuery } from './utils/queries/user-query';
|
|
8
12
|
import { toUserType } from './utils/user-type';
|
|
13
|
+
|
|
14
|
+
// Local type definition to avoid circular dependency with teams-public
|
|
15
|
+
|
|
9
16
|
export class AGGClient extends BaseGraphQlClient {
|
|
10
17
|
constructor(baseUrl, config) {
|
|
11
18
|
super(`${baseUrl}/graphql`, config);
|
|
@@ -92,6 +99,140 @@ export class AGGClient extends BaseGraphQlClient {
|
|
|
92
99
|
}
|
|
93
100
|
}));
|
|
94
101
|
}
|
|
102
|
+
async getTeamContainers(teamId) {
|
|
103
|
+
const teamAri = toTeamARI(teamId);
|
|
104
|
+
const cypherQuery = `MATCH (team:IdentityTeam {ari: '${teamAri}'})-[:team_connected_to_container]->(container) RETURN container`;
|
|
105
|
+
const response = await this.makeGraphQLRequest({
|
|
106
|
+
query: TeamContainersQueryV2,
|
|
107
|
+
variables: {
|
|
108
|
+
cypherQuery,
|
|
109
|
+
params: {
|
|
110
|
+
id: teamAri
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
operationName: 'TeamContainersQueryV2'
|
|
115
|
+
});
|
|
116
|
+
return this.processV2Response(response);
|
|
117
|
+
}
|
|
118
|
+
processV2Response(response) {
|
|
119
|
+
const containersResult = response.graphStore.cypherQueryV2.edges.reduce((containers, edge) => {
|
|
120
|
+
edge.node.columns.forEach(column => {
|
|
121
|
+
var _column$value;
|
|
122
|
+
const containerData = (_column$value = column.value) === null || _column$value === void 0 ? void 0 : _column$value.data;
|
|
123
|
+
if (!containerData) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'ConfluenceSpace') {
|
|
127
|
+
containers.push({
|
|
128
|
+
id: containerData.id,
|
|
129
|
+
type: containerData.__typename,
|
|
130
|
+
name: containerData.confluenceSpaceName || '',
|
|
131
|
+
icon: `${containerData.links.base}${containerData.icon.path}`,
|
|
132
|
+
createdDate: new Date(containerData.createdDate),
|
|
133
|
+
link: `${containerData.links.base}${containerData.links.webUi}`,
|
|
134
|
+
containerTypeProperties: {
|
|
135
|
+
subType: undefined,
|
|
136
|
+
name: undefined
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
} else if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'JiraProject') {
|
|
140
|
+
containers.push({
|
|
141
|
+
id: containerData.id,
|
|
142
|
+
type: containerData.__typename,
|
|
143
|
+
name: containerData.jiraProjectName,
|
|
144
|
+
icon: containerData.avatar.medium,
|
|
145
|
+
createdDate: new Date(containerData.created),
|
|
146
|
+
link: containerData.webUrl,
|
|
147
|
+
containerTypeProperties: {
|
|
148
|
+
subType: containerData.projectType || '',
|
|
149
|
+
name: containerData.projectTypeName || ''
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
} else if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'LoomSpace') {
|
|
153
|
+
containers.push({
|
|
154
|
+
id: containerData.id,
|
|
155
|
+
type: containerData.__typename,
|
|
156
|
+
name: containerData.loomSpaceName,
|
|
157
|
+
icon: '',
|
|
158
|
+
link: containerData.url
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
return containers;
|
|
163
|
+
}, []);
|
|
164
|
+
return containersResult;
|
|
165
|
+
}
|
|
166
|
+
async unlinkTeamContainer(teamId, containerId) {
|
|
167
|
+
const teamAri = toTeamARI(teamId);
|
|
168
|
+
const response = await this.makeGraphQLRequest({
|
|
169
|
+
query: UnlinkContainerMutation,
|
|
170
|
+
variables: {
|
|
171
|
+
containerId,
|
|
172
|
+
teamId: teamAri
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
operationName: 'UnlinkContainerMutation'
|
|
176
|
+
});
|
|
177
|
+
return response.graphStore;
|
|
178
|
+
}
|
|
179
|
+
async queryNumberOfTeamConnectedToContainer(containerId) {
|
|
180
|
+
var _response$graphStore, _response$graphStore$, _response$graphStore$2;
|
|
181
|
+
const response = await this.makeGraphQLRequest({
|
|
182
|
+
query: NumberOfTeamConnectedToContainerQuery,
|
|
183
|
+
variables: {
|
|
184
|
+
containerId
|
|
185
|
+
}
|
|
186
|
+
}, {
|
|
187
|
+
operationName: 'NumberOfTeamConnectedToContainerQuery'
|
|
188
|
+
});
|
|
189
|
+
return response === null || response === void 0 ? void 0 : (_response$graphStore = response.graphStore) === null || _response$graphStore === void 0 ? void 0 : (_response$graphStore$ = _response$graphStore.teamConnectedToContainerInverse) === null || _response$graphStore$ === void 0 ? void 0 : (_response$graphStore$2 = _response$graphStore$.edges) === null || _response$graphStore$2 === void 0 ? void 0 : _response$graphStore$2.length;
|
|
190
|
+
}
|
|
191
|
+
async queryTeamsConnectedToContainer(containerId) {
|
|
192
|
+
var _response$graphStore2, _response$graphStore3, _response$graphStore4;
|
|
193
|
+
const response = await this.makeGraphQLRequest({
|
|
194
|
+
query: TeamConnectedToContainerQuery,
|
|
195
|
+
variables: {
|
|
196
|
+
containerId
|
|
197
|
+
}
|
|
198
|
+
}, {
|
|
199
|
+
operationName: 'TeamConnectedToContainerQuery'
|
|
200
|
+
});
|
|
201
|
+
return response === null || response === void 0 ? void 0 : (_response$graphStore2 = response.graphStore) === null || _response$graphStore2 === void 0 ? void 0 : (_response$graphStore3 = _response$graphStore2.teamConnectedToContainerInverse) === null || _response$graphStore3 === void 0 ? void 0 : (_response$graphStore4 = _response$graphStore3.edges) === null || _response$graphStore4 === void 0 ? void 0 : _response$graphStore4.map(({
|
|
202
|
+
node
|
|
203
|
+
}) => {
|
|
204
|
+
var _node$creator, _node$members$nodes$m, _node$members, _node$members$nodes$l, _node$members2;
|
|
205
|
+
return {
|
|
206
|
+
id: node.id,
|
|
207
|
+
displayName: node.displayName,
|
|
208
|
+
description: node.description,
|
|
209
|
+
state: node.state,
|
|
210
|
+
membershipSettings: node.membershipSettings,
|
|
211
|
+
organizationId: node.organizationId,
|
|
212
|
+
creatorId: (_node$creator = node.creator) === null || _node$creator === void 0 ? void 0 : _node$creator.id,
|
|
213
|
+
isVerified: node.isVerified,
|
|
214
|
+
members: (_node$members$nodes$m = (_node$members = node.members) === null || _node$members === void 0 ? void 0 : _node$members.nodes.map(({
|
|
215
|
+
member
|
|
216
|
+
}) => {
|
|
217
|
+
var _member$name;
|
|
218
|
+
return {
|
|
219
|
+
id: member !== null && member !== void 0 && member.id ? toUserId(member === null || member === void 0 ? void 0 : member.id) : '',
|
|
220
|
+
fullName: (_member$name = member === null || member === void 0 ? void 0 : member.name) !== null && _member$name !== void 0 ? _member$name : '',
|
|
221
|
+
avatarUrl: member === null || member === void 0 ? void 0 : member.picture,
|
|
222
|
+
status: member === null || member === void 0 ? void 0 : member.accountStatus
|
|
223
|
+
};
|
|
224
|
+
})) !== null && _node$members$nodes$m !== void 0 ? _node$members$nodes$m : [],
|
|
225
|
+
includesYou: false,
|
|
226
|
+
// to-do - this needs to be computed - https://product-fabric.atlassian.net/browse/CCECO-4368
|
|
227
|
+
memberCount: (_node$members$nodes$l = (_node$members2 = node.members) === null || _node$members2 === void 0 ? void 0 : _node$members2.nodes.length) !== null && _node$members$nodes$l !== void 0 ? _node$members$nodes$l : 0,
|
|
228
|
+
largeAvatarImageUrl: node.largeAvatarImageUrl,
|
|
229
|
+
smallAvatarImageUrl: node.smallAvatarImageUrl,
|
|
230
|
+
largeHeaderImageUrl: node.largeHeaderImageUrl,
|
|
231
|
+
smallHeaderImageUrl: node.smallHeaderImageUrl,
|
|
232
|
+
restriction: 'ORG_MEMBERS' // deprecated field, kept for backwards compatibility
|
|
233
|
+
};
|
|
234
|
+
});
|
|
235
|
+
}
|
|
95
236
|
}
|
|
96
237
|
export const aggClient = new AGGClient(DEFAULT_CONFIG.stargateRoot, {
|
|
97
238
|
logException
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const UnlinkContainerMutation = print(gql`
|
|
4
|
+
mutation unlinkTeamToContainerMutation($teamId: ID!, $containerId: ID!) {
|
|
5
|
+
graphStore @optIn(to: ["GraphStoreMutation"]) {
|
|
6
|
+
deleteTeamConnectedToContainer(
|
|
7
|
+
input: { relationships: [{ from: $teamId, to: $containerId }] }
|
|
8
|
+
) @optIn(to: ["GraphStoreTeamConnectedToContainer"]) {
|
|
9
|
+
errors {
|
|
10
|
+
message
|
|
11
|
+
extensions {
|
|
12
|
+
statusCode
|
|
13
|
+
errorType
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
success
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`);
|
package/dist/es2019/services/agg-client/utils/queries/number-of-team-connected-to-container-query.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const NumberOfTeamConnectedToContainerQuery = print(gql`
|
|
4
|
+
query getNumberOfTeamsForContainer($containerId: ID!) {
|
|
5
|
+
graphStore @optIn(to: "GraphStore") {
|
|
6
|
+
teamConnectedToContainerInverse(id: $containerId, consistentRead: true)
|
|
7
|
+
@optIn(to: "GraphStoreTeamConnectedToContainer") {
|
|
8
|
+
edges {
|
|
9
|
+
id
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const TeamConnectedToContainerQuery = print(gql`
|
|
4
|
+
query getTeamsForContainer($containerId: ID!) {
|
|
5
|
+
graphStore @optIn(to: "GraphStore") {
|
|
6
|
+
teamConnectedToContainerInverse(id: $containerId, consistentRead: true)
|
|
7
|
+
@optIn(to: "GraphStoreTeamConnectedToContainer") {
|
|
8
|
+
edges {
|
|
9
|
+
node {
|
|
10
|
+
... on TeamV2 {
|
|
11
|
+
id
|
|
12
|
+
description
|
|
13
|
+
displayName
|
|
14
|
+
creator {
|
|
15
|
+
id
|
|
16
|
+
}
|
|
17
|
+
smallAvatarImageUrl
|
|
18
|
+
smallHeaderImageUrl
|
|
19
|
+
largeAvatarImageUrl
|
|
20
|
+
largeHeaderImageUrl
|
|
21
|
+
members {
|
|
22
|
+
nodes {
|
|
23
|
+
member {
|
|
24
|
+
id
|
|
25
|
+
name
|
|
26
|
+
picture
|
|
27
|
+
accountStatus
|
|
28
|
+
... on AtlassianAccountUser {
|
|
29
|
+
extendedProfile {
|
|
30
|
+
jobTitle
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
... on AppUser {
|
|
34
|
+
appType
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
role
|
|
38
|
+
state
|
|
39
|
+
}
|
|
40
|
+
pageInfo {
|
|
41
|
+
endCursor
|
|
42
|
+
hasNextPage
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
organizationId
|
|
46
|
+
membershipSettings
|
|
47
|
+
isVerified
|
|
48
|
+
state
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { print } from 'graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export const TeamContainersQueryV2 = print(gql`
|
|
4
|
+
query TeamContainersQueryV2($cypherQuery: String!, $params: JSON!) {
|
|
5
|
+
graphStore @optIn(to: ["GraphStore", "GraphStoreCypherQueryV2"]) {
|
|
6
|
+
cypherQueryV2(query: $cypherQuery, params: $params) {
|
|
7
|
+
edges {
|
|
8
|
+
node {
|
|
9
|
+
columns {
|
|
10
|
+
key
|
|
11
|
+
value {
|
|
12
|
+
... on GraphStoreCypherQueryV2AriNode {
|
|
13
|
+
data {
|
|
14
|
+
__typename
|
|
15
|
+
... on ConfluenceSpace {
|
|
16
|
+
id
|
|
17
|
+
confluenceSpaceName: name
|
|
18
|
+
type
|
|
19
|
+
createdDate
|
|
20
|
+
links {
|
|
21
|
+
base
|
|
22
|
+
webUi
|
|
23
|
+
}
|
|
24
|
+
icon {
|
|
25
|
+
path
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
... on JiraProject {
|
|
29
|
+
id
|
|
30
|
+
jiraProjectName: name
|
|
31
|
+
webUrl
|
|
32
|
+
created
|
|
33
|
+
avatar {
|
|
34
|
+
medium
|
|
35
|
+
}
|
|
36
|
+
projectType
|
|
37
|
+
projectTypeName
|
|
38
|
+
}
|
|
39
|
+
... on LoomSpace {
|
|
40
|
+
id
|
|
41
|
+
loomSpaceName: name
|
|
42
|
+
url
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`);
|
|
@@ -11,6 +11,7 @@ import { RestClient } from '../rest-client';
|
|
|
11
11
|
* @property {string[]} memberAccountIds - List of member account IDs to filter teams
|
|
12
12
|
* @property {boolean} useDefaultSort - Whether to use the default sort order
|
|
13
13
|
* @property {boolean} showEmptyTeams - Whether to return empty teams in the search
|
|
14
|
+
* @property {string[]} teamTypeIdsFilter - List of team type IDs to filter teams
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -77,7 +78,8 @@ export class LegionClient extends RestClient {
|
|
|
77
78
|
membership: {
|
|
78
79
|
memberAccountIds: allTeamsQuery.memberAccountIds
|
|
79
80
|
},
|
|
80
|
-
showEmptyTeams: allTeamsQuery.showEmptyTeams
|
|
81
|
+
showEmptyTeams: allTeamsQuery.showEmptyTeams,
|
|
82
|
+
teamTypeIdsFilter: allTeamsQuery.teamTypeIdsFilter
|
|
81
83
|
});
|
|
82
84
|
const teams = entities.map(t => this.mapTeamSearchResponseV4ToTeamWithMembership(t));
|
|
83
85
|
return {
|
|
@@ -177,6 +177,61 @@ export class TeamsClient {
|
|
|
177
177
|
return this._aggClient.queryTeamHasAgents(teamId);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Get containers associated with the team
|
|
182
|
+
* @param {string} teamId
|
|
183
|
+
* @returns {Promise<TeamContainers>}
|
|
184
|
+
*/
|
|
185
|
+
async getTeamContainers(teamId) {
|
|
186
|
+
return this._aggClient.getTeamContainers(teamId);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Unlink a container from a team
|
|
191
|
+
* @param {string} teamId
|
|
192
|
+
* @param {string} containerId
|
|
193
|
+
* @returns {Promise}
|
|
194
|
+
*/
|
|
195
|
+
async unlinkTeamContainer(teamId, containerId) {
|
|
196
|
+
return this._aggClient.unlinkTeamContainer(teamId, containerId);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Get the number of teams connected to a container
|
|
201
|
+
* @param {string} containerId
|
|
202
|
+
* @returns {Promise<number>}
|
|
203
|
+
*/
|
|
204
|
+
async queryNumberOfTeamConnectedToContainer(containerId) {
|
|
205
|
+
return this._aggClient.queryNumberOfTeamConnectedToContainer(containerId);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Get the number of teams connected to a container (Confluence space or Jira project)
|
|
210
|
+
* @param {string} containerId
|
|
211
|
+
* @returns {Promise<number>}
|
|
212
|
+
*/
|
|
213
|
+
async getNumberOfConnectedTeams(containerId) {
|
|
214
|
+
return this.queryNumberOfTeamConnectedToContainer(containerId);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Get teams connected to a container
|
|
219
|
+
* @param {string} containerId
|
|
220
|
+
* @returns {Promise<TeamWithMemberships[]>}
|
|
221
|
+
*/
|
|
222
|
+
async queryTeamsConnectedToContainer(containerId) {
|
|
223
|
+
return this._aggClient.queryTeamsConnectedToContainer(containerId);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Get teams connected to a container (Confluence space or Jira project)
|
|
228
|
+
* @param {string} containerId
|
|
229
|
+
* @returns {Promise<TeamWithMemberships[]>}
|
|
230
|
+
*/
|
|
231
|
+
async getConnectedTeams(containerId) {
|
|
232
|
+
return this.queryTeamsConnectedToContainer(containerId);
|
|
233
|
+
}
|
|
234
|
+
|
|
180
235
|
/**
|
|
181
236
|
* Get user information of a member of a team
|
|
182
237
|
* @param {string} userId
|
|
@@ -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.28.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) || '---',
|
|
@@ -26,7 +26,7 @@ export var allPermissions = function allPermissions(defaultPermission, isMember,
|
|
|
26
26
|
ADD_AGENT_TO_TEAM: defaultPermission,
|
|
27
27
|
ARCHIVE_TEAM: defaultPermission && isMember,
|
|
28
28
|
UNARCHIVE_TEAM: false,
|
|
29
|
-
CAN_EDIT_HIERARCHY: defaultPermission
|
|
29
|
+
CAN_EDIT_HIERARCHY: defaultPermission,
|
|
30
30
|
CAN_CHANGE_MEMBERSHIP_SETTINGS: defaultPermission
|
|
31
31
|
};
|
|
32
32
|
};
|
|
@@ -51,7 +51,9 @@ export var SCIMSyncTeamPermissions = function SCIMSyncTeamPermissions(isMember,
|
|
|
51
51
|
EDIT_DESCRIPTION: isMember || isOrgAdmin,
|
|
52
52
|
EDIT_TEAM_SETTINGS: isMember || isOrgAdmin,
|
|
53
53
|
EDIT_TEAM_LINK: isMember || isOrgAdmin,
|
|
54
|
-
EDIT_TEAM_NAME: isOrgAdmin && source === 'ATLASSIAN_GROUP' && fg('enable_edit_team_name_external_type_teams')
|
|
54
|
+
EDIT_TEAM_NAME: isOrgAdmin && source === 'ATLASSIAN_GROUP' && fg('enable_edit_team_name_external_type_teams'),
|
|
55
|
+
//Org admins should not be able to edit hierarchies of HRIS synced teams
|
|
56
|
+
CAN_EDIT_HIERARCHY: source === 'ATLASSIAN_GROUP' && isOrgAdmin
|
|
55
57
|
};
|
|
56
58
|
};
|
|
57
59
|
|
|
@@ -103,8 +105,7 @@ var getActiveTeamPermissionMap = function getActiveTeamPermissionMap(settings, p
|
|
|
103
105
|
return _objectSpread(_objectSpread(_objectSpread({}, allPermissions(false, isMember, isOrgAdmin)), SCIMSyncTeamPermissions(isMember, isOrgAdmin, source)), {}, {
|
|
104
106
|
ADD_AGENT_TO_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
|
|
105
107
|
REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
|
|
106
|
-
ARCHIVE_TEAM: isArchiveTeamEnabled && isOrgAdmin
|
|
107
|
-
CAN_EDIT_HIERARCHY: permission === 'FULL_WRITE' && isOrgAdmin
|
|
108
|
+
ARCHIVE_TEAM: isArchiveTeamEnabled && isOrgAdmin
|
|
108
109
|
});
|
|
109
110
|
} else if (settings === 'ORG_ADMIN_MANAGED') {
|
|
110
111
|
// NOTE: Only org admins will received FULL_WRITE permission
|
|
@@ -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.28.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.28.0",
|
|
57
57
|
packageName: "@atlaskit/teams-client"
|
|
58
58
|
}
|
|
59
59
|
}]);
|