@atlaskit/teams-public 0.42.1 → 0.43.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 +17 -0
- package/dist/cjs/services/agg-client/index.js +122 -47
- package/dist/cjs/services/agg-client/mocks/index.js +50 -1
- package/dist/cjs/services/agg-client/utils/queries/team-containers-query.js +8 -3
- package/dist/cjs/ui/team-containers/disconnect-dialog/index.js +6 -12
- package/dist/es2019/services/agg-client/index.js +75 -9
- package/dist/es2019/services/agg-client/mocks/index.js +49 -0
- package/dist/es2019/services/agg-client/utils/queries/team-containers-query.js +56 -1
- package/dist/es2019/ui/team-containers/disconnect-dialog/index.js +21 -13
- package/dist/esm/services/agg-client/index.js +123 -48
- package/dist/esm/services/agg-client/mocks/index.js +49 -0
- package/dist/esm/services/agg-client/utils/queries/team-containers-query.js +7 -2
- package/dist/esm/ui/team-containers/disconnect-dialog/index.js +6 -12
- package/dist/types/services/agg-client/index.d.ts +2 -0
- package/dist/types/services/agg-client/mocks/index.d.ts +49 -0
- package/dist/types/services/agg-client/utils/queries/team-containers-query.d.ts +20 -0
- package/dist/types-ts4.5/services/agg-client/index.d.ts +2 -0
- package/dist/types-ts4.5/services/agg-client/mocks/index.d.ts +49 -0
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-containers-query.d.ts +20 -0
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/teams-public
|
|
2
2
|
|
|
3
|
+
## 0.43.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#183113](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183113)
|
|
8
|
+
[`fe0b718376970`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fe0b718376970) -
|
|
9
|
+
PTC-12484 Migrate team containers query from cypherQuery to cypherQueryV2 API with parameterized
|
|
10
|
+
queries and updated response structure
|
|
11
|
+
|
|
12
|
+
## 0.42.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#183882](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183882)
|
|
17
|
+
[`870803e533f40`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/870803e533f40) -
|
|
18
|
+
Update team links disconnect dialog message
|
|
19
|
+
|
|
3
20
|
## 0.42.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -38,13 +38,33 @@ var AGGClient = exports.AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
38
38
|
key: "getTeamContainers",
|
|
39
39
|
value: function () {
|
|
40
40
|
var _getTeamContainers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(teamId) {
|
|
41
|
-
var teamAri, cypherQuery, response,
|
|
41
|
+
var teamAri, cypherQuery, response, _response;
|
|
42
42
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
43
43
|
while (1) switch (_context.prev = _context.next) {
|
|
44
44
|
case 0:
|
|
45
45
|
teamAri = (0, _teamIdToAri.teamIdToAri)(teamId);
|
|
46
46
|
cypherQuery = "MATCH (team:IdentityTeam {ari: '".concat(teamAri, "'})-[:team_connected_to_container]->(container) RETURN container");
|
|
47
|
-
|
|
47
|
+
if (!(0, _platformFeatureFlags.fg)('teams_containers_cypher_query_v2_migration')) {
|
|
48
|
+
_context.next = 9;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
_context.next = 5;
|
|
52
|
+
return this.makeGraphQLRequest({
|
|
53
|
+
query: _teamContainersQuery.TeamContainersQueryV2,
|
|
54
|
+
variables: {
|
|
55
|
+
cypherQuery: cypherQuery,
|
|
56
|
+
params: {
|
|
57
|
+
id: teamAri
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
operationName: 'TeamContainersQueryV2'
|
|
62
|
+
});
|
|
63
|
+
case 5:
|
|
64
|
+
response = _context.sent;
|
|
65
|
+
return _context.abrupt("return", this.processV2Response(response));
|
|
66
|
+
case 9:
|
|
67
|
+
_context.next = 11;
|
|
48
68
|
return this.makeGraphQLRequest({
|
|
49
69
|
query: _teamContainersQuery.TeamContainersQuery,
|
|
50
70
|
variables: {
|
|
@@ -53,51 +73,10 @@ var AGGClient = exports.AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
53
73
|
}, {
|
|
54
74
|
operationName: 'TeamContainersQuery'
|
|
55
75
|
});
|
|
56
|
-
case
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return containers;
|
|
61
|
-
}
|
|
62
|
-
if (edge.node.to.data.__typename === 'ConfluenceSpace') {
|
|
63
|
-
containers.push({
|
|
64
|
-
id: edge.node.to.id,
|
|
65
|
-
type: edge.node.to.data.__typename,
|
|
66
|
-
name: edge.node.to.data.confluenceSpaceName || '',
|
|
67
|
-
icon: "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.icon.path),
|
|
68
|
-
createdDate: new Date(edge.node.to.data.createdDate),
|
|
69
|
-
link: "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.links.webUi),
|
|
70
|
-
containerTypeProperties: {
|
|
71
|
-
subType: undefined,
|
|
72
|
-
name: undefined
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
} else if (edge.node.to.data.__typename === 'JiraProject') {
|
|
76
|
-
containers.push({
|
|
77
|
-
id: edge.node.to.id,
|
|
78
|
-
type: edge.node.to.data.__typename,
|
|
79
|
-
name: edge.node.to.data.jiraProjectName,
|
|
80
|
-
icon: edge.node.to.data.avatar.medium,
|
|
81
|
-
createdDate: new Date(edge.node.to.data.created),
|
|
82
|
-
link: edge.node.to.data.webUrl,
|
|
83
|
-
containerTypeProperties: {
|
|
84
|
-
subType: edge.node.to.data.projectType || '',
|
|
85
|
-
name: edge.node.to.data.projectTypeName || ''
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
} else if (edge.node.to.data.__typename === 'LoomSpace') {
|
|
89
|
-
containers.push({
|
|
90
|
-
id: edge.node.to.id,
|
|
91
|
-
type: edge.node.to.data.__typename,
|
|
92
|
-
name: edge.node.to.data.loomSpaceName,
|
|
93
|
-
icon: '',
|
|
94
|
-
link: edge.node.to.data.url
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return containers;
|
|
98
|
-
}, []);
|
|
99
|
-
return _context.abrupt("return", containersResult);
|
|
100
|
-
case 7:
|
|
76
|
+
case 11:
|
|
77
|
+
_response = _context.sent;
|
|
78
|
+
return _context.abrupt("return", this.processV1Response(_response));
|
|
79
|
+
case 13:
|
|
101
80
|
case "end":
|
|
102
81
|
return _context.stop();
|
|
103
82
|
}
|
|
@@ -108,6 +87,102 @@ var AGGClient = exports.AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
108
87
|
}
|
|
109
88
|
return getTeamContainers;
|
|
110
89
|
}()
|
|
90
|
+
}, {
|
|
91
|
+
key: "processV2Response",
|
|
92
|
+
value: function processV2Response(response) {
|
|
93
|
+
var containersResult = response.graphStore.cypherQueryV2.edges.reduce(function (containers, edge) {
|
|
94
|
+
edge.node.columns.forEach(function (column) {
|
|
95
|
+
var _column$value;
|
|
96
|
+
var containerData = (_column$value = column.value) === null || _column$value === void 0 ? void 0 : _column$value.data;
|
|
97
|
+
if (!containerData && (0, _platformFeatureFlags.fg)('enable_team_containers_null_check')) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'ConfluenceSpace') {
|
|
101
|
+
containers.push({
|
|
102
|
+
id: containerData.id,
|
|
103
|
+
type: containerData.__typename,
|
|
104
|
+
name: containerData.confluenceSpaceName || '',
|
|
105
|
+
icon: "".concat(containerData.links.base).concat(containerData.icon.path),
|
|
106
|
+
createdDate: new Date(containerData.createdDate),
|
|
107
|
+
link: "".concat(containerData.links.base).concat(containerData.links.webUi),
|
|
108
|
+
containerTypeProperties: {
|
|
109
|
+
subType: undefined,
|
|
110
|
+
name: undefined
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
} else if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'JiraProject') {
|
|
114
|
+
containers.push({
|
|
115
|
+
id: containerData.id,
|
|
116
|
+
type: containerData.__typename,
|
|
117
|
+
name: containerData.jiraProjectName,
|
|
118
|
+
icon: containerData.avatar.medium,
|
|
119
|
+
createdDate: new Date(containerData.created),
|
|
120
|
+
link: containerData.webUrl,
|
|
121
|
+
containerTypeProperties: {
|
|
122
|
+
subType: containerData.projectType || '',
|
|
123
|
+
name: containerData.projectTypeName || ''
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
} else if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'LoomSpace') {
|
|
127
|
+
containers.push({
|
|
128
|
+
id: containerData.id,
|
|
129
|
+
type: containerData.__typename,
|
|
130
|
+
name: containerData.loomSpaceName,
|
|
131
|
+
icon: '',
|
|
132
|
+
link: containerData.url
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
return containers;
|
|
137
|
+
}, []);
|
|
138
|
+
return containersResult;
|
|
139
|
+
}
|
|
140
|
+
}, {
|
|
141
|
+
key: "processV1Response",
|
|
142
|
+
value: function processV1Response(response) {
|
|
143
|
+
var containersResult = response.graphStore.cypherQuery.edges.reduce(function (containers, edge) {
|
|
144
|
+
if (!edge.node.to.data && (0, _platformFeatureFlags.fg)('enable_team_containers_null_check')) {
|
|
145
|
+
return containers;
|
|
146
|
+
}
|
|
147
|
+
if (edge.node.to.data.__typename === 'ConfluenceSpace') {
|
|
148
|
+
containers.push({
|
|
149
|
+
id: edge.node.to.id,
|
|
150
|
+
type: edge.node.to.data.__typename,
|
|
151
|
+
name: edge.node.to.data.confluenceSpaceName || '',
|
|
152
|
+
icon: "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.icon.path),
|
|
153
|
+
createdDate: new Date(edge.node.to.data.createdDate),
|
|
154
|
+
link: "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.links.webUi),
|
|
155
|
+
containerTypeProperties: {
|
|
156
|
+
subType: undefined,
|
|
157
|
+
name: undefined
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
} else if (edge.node.to.data.__typename === 'JiraProject') {
|
|
161
|
+
containers.push({
|
|
162
|
+
id: edge.node.to.id,
|
|
163
|
+
type: edge.node.to.data.__typename,
|
|
164
|
+
name: edge.node.to.data.jiraProjectName,
|
|
165
|
+
icon: edge.node.to.data.avatar.medium,
|
|
166
|
+
createdDate: new Date(edge.node.to.data.created),
|
|
167
|
+
link: edge.node.to.data.webUrl,
|
|
168
|
+
containerTypeProperties: {
|
|
169
|
+
subType: edge.node.to.data.projectType || '',
|
|
170
|
+
name: edge.node.to.data.projectTypeName || ''
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
} else if (edge.node.to.data.__typename === 'LoomSpace') {
|
|
174
|
+
containers.push({
|
|
175
|
+
id: edge.node.to.id,
|
|
176
|
+
type: edge.node.to.data.__typename,
|
|
177
|
+
name: edge.node.to.data.loomSpaceName,
|
|
178
|
+
icon: '',
|
|
179
|
+
link: edge.node.to.data.url
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
return containers;
|
|
183
|
+
}, []);
|
|
184
|
+
return containersResult;
|
|
185
|
+
}
|
|
111
186
|
}, {
|
|
112
187
|
key: "unlinkTeamContainer",
|
|
113
188
|
value: function () {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.MOCK_TEAM_CONTAINERS = exports.MOCK_NUMBER_OF_CONNECTED_TEAMS = exports.MOCK_CONNECTED_TEAMS_RESULT = exports.MOCK_CONNECTED_TEAMS = void 0;
|
|
6
|
+
exports.MOCK_TEAM_CONTAINERSV2 = exports.MOCK_TEAM_CONTAINERS = exports.MOCK_NUMBER_OF_CONNECTED_TEAMS = exports.MOCK_CONNECTED_TEAMS_RESULT = exports.MOCK_CONNECTED_TEAMS = void 0;
|
|
7
7
|
var MOCK_TEAM_CONTAINERS = exports.MOCK_TEAM_CONTAINERS = {
|
|
8
8
|
graphStore: {
|
|
9
9
|
cypherQuery: {
|
|
@@ -50,6 +50,55 @@ var MOCK_TEAM_CONTAINERS = exports.MOCK_TEAM_CONTAINERS = {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
+
var MOCK_TEAM_CONTAINERSV2 = exports.MOCK_TEAM_CONTAINERSV2 = {
|
|
54
|
+
graphStore: {
|
|
55
|
+
cypherQueryV2: {
|
|
56
|
+
edges: [{
|
|
57
|
+
node: {
|
|
58
|
+
columns: [{
|
|
59
|
+
key: 'container',
|
|
60
|
+
value: {
|
|
61
|
+
data: {
|
|
62
|
+
__typename: 'ConfluenceSpace',
|
|
63
|
+
id: '2',
|
|
64
|
+
confluenceSpaceName: 'Confluence Space',
|
|
65
|
+
type: 'confluence',
|
|
66
|
+
createdDate: '2021-01-01',
|
|
67
|
+
links: {
|
|
68
|
+
base: 'https://example.com',
|
|
69
|
+
webUi: '/wiki/spaces/SPACE'
|
|
70
|
+
},
|
|
71
|
+
icon: {
|
|
72
|
+
path: '/wiki/download/attachments/123/icon.png'
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}]
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
node: {
|
|
80
|
+
columns: [{
|
|
81
|
+
key: 'container',
|
|
82
|
+
value: {
|
|
83
|
+
data: {
|
|
84
|
+
__typename: 'JiraProject',
|
|
85
|
+
id: '3',
|
|
86
|
+
jiraProjectName: 'Jira Project',
|
|
87
|
+
webUrl: 'https://example.com/jira/project',
|
|
88
|
+
created: '2021-01-01',
|
|
89
|
+
avatar: {
|
|
90
|
+
medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
|
|
91
|
+
},
|
|
92
|
+
projectType: 'software',
|
|
93
|
+
projectTypeName: 'Software Project'
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}]
|
|
97
|
+
}
|
|
98
|
+
}]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
53
102
|
var MOCK_NUMBER_OF_CONNECTED_TEAMS = exports.MOCK_NUMBER_OF_CONNECTED_TEAMS = {
|
|
54
103
|
graphStore: {
|
|
55
104
|
teamConnectedToContainerInverse: {
|
|
@@ -4,9 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TeamContainersQuery = void 0;
|
|
7
|
+
exports.getTeamContainersQuery = exports.TeamContainersQueryV2 = exports.TeamContainersQuery = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _graphql = require("graphql");
|
|
10
10
|
var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
+
var _templateObject, _templateObject2;
|
|
13
|
+
var TeamContainersQuery = exports.TeamContainersQuery = (0, _graphql.print)((0, _graphqlTag.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tquery TeamContainersQuery($cypherQuery: String!) {\n\t\tgraphStore @optIn(to: [\"GraphStore\"]) {\n\t\t\tcypherQuery(query: $cypherQuery) @optIn(to: [\"GraphStoreCypherQuery\"]) {\n\t\t\t\tedges {\n\t\t\t\t\t__typename\n\t\t\t\t\tnode {\n\t\t\t\t\t\tfrom {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tdata {\n\t\t\t\t\t\t\t\t__typename\n\t\t\t\t\t\t\t\t... on ConfluenceSpace {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tconfluenceSpaceName: name\n\t\t\t\t\t\t\t\t\ttype\n\t\t\t\t\t\t\t\t\tcreatedDate\n\t\t\t\t\t\t\t\t\tlinks {\n\t\t\t\t\t\t\t\t\t\tbase\n\t\t\t\t\t\t\t\t\t\twebUi\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ticon {\n\t\t\t\t\t\t\t\t\t\tpath\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t... on JiraProject {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tjiraProjectName: name\n\t\t\t\t\t\t\t\t\twebUrl\n\t\t\t\t\t\t\t\t\tcreated\n\t\t\t\t\t\t\t\t\tavatar {\n\t\t\t\t\t\t\t\t\t\tmedium\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tprojectType\n\t\t\t\t\t\t\t\t\tprojectTypeName\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t... on LoomSpace {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tloomSpaceName: name\n\t\t\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
|
14
|
+
var TeamContainersQueryV2 = exports.TeamContainersQueryV2 = (0, _graphql.print)((0, _graphqlTag.default)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\tquery TeamContainersQueryV2($cypherQuery: String!, $params: JSON!) {\n\t\tgraphStore @optIn(to: [\"GraphStore\", \"GraphStoreCypherQueryV2\"]) {\n\t\t\tcypherQueryV2(query: $cypherQuery, params: $params) {\n\t\t\t\tedges {\n\t\t\t\t\tnode {\n\t\t\t\t\t\tcolumns {\n\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\tvalue {\n\t\t\t\t\t\t\t\t... on GraphStoreCypherQueryV2AriNode {\n\t\t\t\t\t\t\t\t\tdata {\n\t\t\t\t\t\t\t\t\t\t__typename\n\t\t\t\t\t\t\t\t\t\t... on ConfluenceSpace {\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t\tconfluenceSpaceName: name\n\t\t\t\t\t\t\t\t\t\t\ttype\n\t\t\t\t\t\t\t\t\t\t\tcreatedDate\n\t\t\t\t\t\t\t\t\t\t\tlinks {\n\t\t\t\t\t\t\t\t\t\t\t\tbase\n\t\t\t\t\t\t\t\t\t\t\t\twebUi\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ticon {\n\t\t\t\t\t\t\t\t\t\t\t\tpath\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t... on JiraProject {\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t\tjiraProjectName: name\n\t\t\t\t\t\t\t\t\t\t\twebUrl\n\t\t\t\t\t\t\t\t\t\t\tcreated\n\t\t\t\t\t\t\t\t\t\t\tavatar {\n\t\t\t\t\t\t\t\t\t\t\t\tmedium\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tprojectType\n\t\t\t\t\t\t\t\t\t\t\tprojectTypeName\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t... on LoomSpace {\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t\tloomSpaceName: name\n\t\t\t\t\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
|
15
|
+
var getTeamContainersQuery = exports.getTeamContainersQuery = function getTeamContainersQuery() {
|
|
16
|
+
return (0, _platformFeatureFlags.fg)('teams_containers_cypher_query_v2_migration') ? TeamContainersQueryV2 : TeamContainersQuery;
|
|
17
|
+
};
|
|
@@ -15,7 +15,6 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
15
15
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
16
16
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
17
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
|
-
var _getContainerProperties = require("../../../common/utils/get-container-properties");
|
|
19
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
19
|
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
21
20
|
disconnectDialogTitle: {
|
|
@@ -25,12 +24,12 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
25
24
|
},
|
|
26
25
|
disconnectDialogDescription: {
|
|
27
26
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.description',
|
|
28
|
-
defaultMessage:
|
|
27
|
+
defaultMessage: "This team will no longer be connected to the {containerName} {containerType, select,\n\t\t\tJiraProject {Jira project}\n\t\t\tConfluenceSpace {Confluence space}\n\t\t\tLoomSpace {Loom space}\n\t\t\tother {link}\n\t\t}.",
|
|
29
28
|
description: 'Description of the disconnect dialog for team containers'
|
|
30
29
|
},
|
|
31
30
|
disconnectDialogDisclaimer: {
|
|
32
31
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.disclaimer',
|
|
33
|
-
defaultMessage:
|
|
32
|
+
defaultMessage: "Disconnecting the team from the {containerType, select,\n\t\t\tJiraProject {project}\n\t\t\tConfluenceSpace {space}\n\t\t\tLoomSpace {space}\n\t\t\tother {link}\n\t\t} will not affect any work connected to the team within the {containerType, select,\n\t\t\tJiraProject {project}\n\t\t\tConfluenceSpace {space}\n\t\t\tLoomSpace {space}\n\t\t\tother {link}\n\t\t}.",
|
|
34
33
|
description: 'Disclaimer of the disconnect dialog for team containers'
|
|
35
34
|
},
|
|
36
35
|
disconnectDialogDisclaimerFallback: {
|
|
@@ -78,11 +77,6 @@ var DisconnectDialog = exports.DisconnectDialog = function DisconnectDialog(_ref
|
|
|
78
77
|
return _ref2.apply(this, arguments);
|
|
79
78
|
};
|
|
80
79
|
}();
|
|
81
|
-
var _getContainerProperti = (0, _getContainerProperties.getContainerProperties)({
|
|
82
|
-
containerType: containerType
|
|
83
|
-
}),
|
|
84
|
-
containerTypeText = _getContainerProperti.containerTypeText,
|
|
85
|
-
description = _getContainerProperti.description;
|
|
86
80
|
return /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
|
|
87
81
|
onClose: onClose,
|
|
88
82
|
width: "small",
|
|
@@ -97,13 +91,13 @@ var DisconnectDialog = exports.DisconnectDialog = function DisconnectDialog(_ref
|
|
|
97
91
|
containerName: /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
98
92
|
weight: "semibold"
|
|
99
93
|
}, containerName),
|
|
100
|
-
containerType:
|
|
94
|
+
containerType: containerType
|
|
101
95
|
}
|
|
102
|
-
}))),
|
|
96
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, messages.disconnectDialogDisclaimer, {
|
|
103
97
|
values: {
|
|
104
|
-
containerType:
|
|
98
|
+
containerType: containerType
|
|
105
99
|
}
|
|
106
|
-
}))
|
|
100
|
+
})))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
107
101
|
appearance: "subtle",
|
|
108
102
|
onClick: onClose
|
|
109
103
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.disconnectDialogCancelButton)), /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
@@ -6,7 +6,7 @@ import { BaseGraphQlClient } from '../graphql-client';
|
|
|
6
6
|
import { UnlinkContainerMutation } from './utils/mutations/unlink-container-mutation';
|
|
7
7
|
import { NumberOfTeamConnectedToContainerQuery } from './utils/queries/number-of-team-connected-to-container-query';
|
|
8
8
|
import { TeamConnectedToContainerQuery } from './utils/queries/team-connected-to-container-query';
|
|
9
|
-
import { TeamContainersQuery } from './utils/queries/team-containers-query';
|
|
9
|
+
import { TeamContainersQuery, TeamContainersQueryV2 } from './utils/queries/team-containers-query';
|
|
10
10
|
export class AGGClient extends BaseGraphQlClient {
|
|
11
11
|
constructor(baseUrl, config) {
|
|
12
12
|
super(`${baseUrl}/graphql`, config);
|
|
@@ -17,14 +17,80 @@ export class AGGClient extends BaseGraphQlClient {
|
|
|
17
17
|
async getTeamContainers(teamId) {
|
|
18
18
|
const teamAri = teamIdToAri(teamId);
|
|
19
19
|
const cypherQuery = `MATCH (team:IdentityTeam {ari: '${teamAri}'})-[:team_connected_to_container]->(container) RETURN container`;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
if (fg('teams_containers_cypher_query_v2_migration')) {
|
|
21
|
+
const response = await this.makeGraphQLRequest({
|
|
22
|
+
query: TeamContainersQueryV2,
|
|
23
|
+
variables: {
|
|
24
|
+
cypherQuery,
|
|
25
|
+
params: {
|
|
26
|
+
id: teamAri
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
operationName: 'TeamContainersQueryV2'
|
|
31
|
+
});
|
|
32
|
+
return this.processV2Response(response);
|
|
33
|
+
} else {
|
|
34
|
+
const response = await this.makeGraphQLRequest({
|
|
35
|
+
query: TeamContainersQuery,
|
|
36
|
+
variables: {
|
|
37
|
+
cypherQuery
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
operationName: 'TeamContainersQuery'
|
|
41
|
+
});
|
|
42
|
+
return this.processV1Response(response);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
processV2Response(response) {
|
|
46
|
+
const containersResult = response.graphStore.cypherQueryV2.edges.reduce((containers, edge) => {
|
|
47
|
+
edge.node.columns.forEach(column => {
|
|
48
|
+
var _column$value;
|
|
49
|
+
const containerData = (_column$value = column.value) === null || _column$value === void 0 ? void 0 : _column$value.data;
|
|
50
|
+
if (!containerData && fg('enable_team_containers_null_check')) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'ConfluenceSpace') {
|
|
54
|
+
containers.push({
|
|
55
|
+
id: containerData.id,
|
|
56
|
+
type: containerData.__typename,
|
|
57
|
+
name: containerData.confluenceSpaceName || '',
|
|
58
|
+
icon: `${containerData.links.base}${containerData.icon.path}`,
|
|
59
|
+
createdDate: new Date(containerData.createdDate),
|
|
60
|
+
link: `${containerData.links.base}${containerData.links.webUi}`,
|
|
61
|
+
containerTypeProperties: {
|
|
62
|
+
subType: undefined,
|
|
63
|
+
name: undefined
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
} else if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'JiraProject') {
|
|
67
|
+
containers.push({
|
|
68
|
+
id: containerData.id,
|
|
69
|
+
type: containerData.__typename,
|
|
70
|
+
name: containerData.jiraProjectName,
|
|
71
|
+
icon: containerData.avatar.medium,
|
|
72
|
+
createdDate: new Date(containerData.created),
|
|
73
|
+
link: containerData.webUrl,
|
|
74
|
+
containerTypeProperties: {
|
|
75
|
+
subType: containerData.projectType || '',
|
|
76
|
+
name: containerData.projectTypeName || ''
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
} else if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'LoomSpace') {
|
|
80
|
+
containers.push({
|
|
81
|
+
id: containerData.id,
|
|
82
|
+
type: containerData.__typename,
|
|
83
|
+
name: containerData.loomSpaceName,
|
|
84
|
+
icon: '',
|
|
85
|
+
link: containerData.url
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return containers;
|
|
90
|
+
}, []);
|
|
91
|
+
return containersResult;
|
|
92
|
+
}
|
|
93
|
+
processV1Response(response) {
|
|
28
94
|
const containersResult = response.graphStore.cypherQuery.edges.reduce((containers, edge) => {
|
|
29
95
|
if (!edge.node.to.data && fg('enable_team_containers_null_check')) {
|
|
30
96
|
return containers;
|
|
@@ -44,6 +44,55 @@ export const MOCK_TEAM_CONTAINERS = {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
+
export const MOCK_TEAM_CONTAINERSV2 = {
|
|
48
|
+
graphStore: {
|
|
49
|
+
cypherQueryV2: {
|
|
50
|
+
edges: [{
|
|
51
|
+
node: {
|
|
52
|
+
columns: [{
|
|
53
|
+
key: 'container',
|
|
54
|
+
value: {
|
|
55
|
+
data: {
|
|
56
|
+
__typename: 'ConfluenceSpace',
|
|
57
|
+
id: '2',
|
|
58
|
+
confluenceSpaceName: 'Confluence Space',
|
|
59
|
+
type: 'confluence',
|
|
60
|
+
createdDate: '2021-01-01',
|
|
61
|
+
links: {
|
|
62
|
+
base: 'https://example.com',
|
|
63
|
+
webUi: '/wiki/spaces/SPACE'
|
|
64
|
+
},
|
|
65
|
+
icon: {
|
|
66
|
+
path: '/wiki/download/attachments/123/icon.png'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}]
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
node: {
|
|
74
|
+
columns: [{
|
|
75
|
+
key: 'container',
|
|
76
|
+
value: {
|
|
77
|
+
data: {
|
|
78
|
+
__typename: 'JiraProject',
|
|
79
|
+
id: '3',
|
|
80
|
+
jiraProjectName: 'Jira Project',
|
|
81
|
+
webUrl: 'https://example.com/jira/project',
|
|
82
|
+
created: '2021-01-01',
|
|
83
|
+
avatar: {
|
|
84
|
+
medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
|
|
85
|
+
},
|
|
86
|
+
projectType: 'software',
|
|
87
|
+
projectTypeName: 'Software Project'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}]
|
|
91
|
+
}
|
|
92
|
+
}]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
47
96
|
export const MOCK_NUMBER_OF_CONNECTED_TEAMS = {
|
|
48
97
|
graphStore: {
|
|
49
98
|
teamConnectedToContainerInverse: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { print } from 'graphql';
|
|
2
2
|
import gql from 'graphql-tag';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
export const TeamContainersQuery = print(gql`
|
|
4
5
|
query TeamContainersQuery($cypherQuery: String!) {
|
|
5
6
|
graphStore @optIn(to: ["GraphStore"]) {
|
|
@@ -50,4 +51,58 @@ export const TeamContainersQuery = print(gql`
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
`);
|
|
54
|
+
`);
|
|
55
|
+
export const TeamContainersQueryV2 = print(gql`
|
|
56
|
+
query TeamContainersQueryV2($cypherQuery: String!, $params: JSON!) {
|
|
57
|
+
graphStore @optIn(to: ["GraphStore", "GraphStoreCypherQueryV2"]) {
|
|
58
|
+
cypherQueryV2(query: $cypherQuery, params: $params) {
|
|
59
|
+
edges {
|
|
60
|
+
node {
|
|
61
|
+
columns {
|
|
62
|
+
key
|
|
63
|
+
value {
|
|
64
|
+
... on GraphStoreCypherQueryV2AriNode {
|
|
65
|
+
data {
|
|
66
|
+
__typename
|
|
67
|
+
... on ConfluenceSpace {
|
|
68
|
+
id
|
|
69
|
+
confluenceSpaceName: name
|
|
70
|
+
type
|
|
71
|
+
createdDate
|
|
72
|
+
links {
|
|
73
|
+
base
|
|
74
|
+
webUi
|
|
75
|
+
}
|
|
76
|
+
icon {
|
|
77
|
+
path
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
... on JiraProject {
|
|
81
|
+
id
|
|
82
|
+
jiraProjectName: name
|
|
83
|
+
webUrl
|
|
84
|
+
created
|
|
85
|
+
avatar {
|
|
86
|
+
medium
|
|
87
|
+
}
|
|
88
|
+
projectType
|
|
89
|
+
projectTypeName
|
|
90
|
+
}
|
|
91
|
+
... on LoomSpace {
|
|
92
|
+
id
|
|
93
|
+
loomSpaceName: name
|
|
94
|
+
url
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`);
|
|
106
|
+
export const getTeamContainersQuery = () => {
|
|
107
|
+
return fg('teams_containers_cypher_query_v2_migration') ? TeamContainersQueryV2 : TeamContainersQuery;
|
|
108
|
+
};
|
|
@@ -4,7 +4,6 @@ import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
|
4
4
|
import Button from '@atlaskit/button/new';
|
|
5
5
|
import ModalDialog, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
6
6
|
import { Box, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import { getContainerProperties } from '../../../common/utils/get-container-properties';
|
|
8
7
|
export const messages = defineMessages({
|
|
9
8
|
disconnectDialogTitle: {
|
|
10
9
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.title',
|
|
@@ -13,12 +12,27 @@ export const messages = defineMessages({
|
|
|
13
12
|
},
|
|
14
13
|
disconnectDialogDescription: {
|
|
15
14
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.description',
|
|
16
|
-
defaultMessage:
|
|
15
|
+
defaultMessage: `This team will no longer be connected to the {containerName} {containerType, select,
|
|
16
|
+
JiraProject {Jira project}
|
|
17
|
+
ConfluenceSpace {Confluence space}
|
|
18
|
+
LoomSpace {Loom space}
|
|
19
|
+
other {link}
|
|
20
|
+
}.`,
|
|
17
21
|
description: 'Description of the disconnect dialog for team containers'
|
|
18
22
|
},
|
|
19
23
|
disconnectDialogDisclaimer: {
|
|
20
24
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.disclaimer',
|
|
21
|
-
defaultMessage:
|
|
25
|
+
defaultMessage: `Disconnecting the team from the {containerType, select,
|
|
26
|
+
JiraProject {project}
|
|
27
|
+
ConfluenceSpace {space}
|
|
28
|
+
LoomSpace {space}
|
|
29
|
+
other {link}
|
|
30
|
+
} will not affect any work connected to the team within the {containerType, select,
|
|
31
|
+
JiraProject {project}
|
|
32
|
+
ConfluenceSpace {space}
|
|
33
|
+
LoomSpace {space}
|
|
34
|
+
other {link}
|
|
35
|
+
}.`,
|
|
22
36
|
description: 'Disclaimer of the disconnect dialog for team containers'
|
|
23
37
|
},
|
|
24
38
|
disconnectDialogDisclaimerFallback: {
|
|
@@ -49,12 +63,6 @@ export const DisconnectDialog = ({
|
|
|
49
63
|
await onDisconnect();
|
|
50
64
|
setIsDisconnecting(false);
|
|
51
65
|
};
|
|
52
|
-
const {
|
|
53
|
-
containerTypeText,
|
|
54
|
-
description
|
|
55
|
-
} = getContainerProperties({
|
|
56
|
-
containerType
|
|
57
|
-
});
|
|
58
66
|
return /*#__PURE__*/React.createElement(ModalDialog, {
|
|
59
67
|
onClose: onClose,
|
|
60
68
|
width: "small",
|
|
@@ -69,13 +77,13 @@ export const DisconnectDialog = ({
|
|
|
69
77
|
containerName: /*#__PURE__*/React.createElement(Text, {
|
|
70
78
|
weight: "semibold"
|
|
71
79
|
}, containerName),
|
|
72
|
-
containerType
|
|
80
|
+
containerType
|
|
73
81
|
}
|
|
74
|
-
}))),
|
|
82
|
+
}))), /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.disconnectDialogDisclaimer, {
|
|
75
83
|
values: {
|
|
76
|
-
containerType
|
|
84
|
+
containerType
|
|
77
85
|
}
|
|
78
|
-
}))
|
|
86
|
+
})))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
79
87
|
appearance: "subtle",
|
|
80
88
|
onClick: onClose
|
|
81
89
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.disconnectDialogCancelButton)), /*#__PURE__*/React.createElement(Button, {
|
|
@@ -15,7 +15,7 @@ import { BaseGraphQlClient } from '../graphql-client';
|
|
|
15
15
|
import { UnlinkContainerMutation } from './utils/mutations/unlink-container-mutation';
|
|
16
16
|
import { NumberOfTeamConnectedToContainerQuery } from './utils/queries/number-of-team-connected-to-container-query';
|
|
17
17
|
import { TeamConnectedToContainerQuery } from './utils/queries/team-connected-to-container-query';
|
|
18
|
-
import { TeamContainersQuery } from './utils/queries/team-containers-query';
|
|
18
|
+
import { TeamContainersQuery, TeamContainersQueryV2 } from './utils/queries/team-containers-query';
|
|
19
19
|
export var AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
20
20
|
function AGGClient(baseUrl, config) {
|
|
21
21
|
_classCallCheck(this, AGGClient);
|
|
@@ -31,13 +31,33 @@ export var AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
31
31
|
key: "getTeamContainers",
|
|
32
32
|
value: function () {
|
|
33
33
|
var _getTeamContainers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(teamId) {
|
|
34
|
-
var teamAri, cypherQuery, response,
|
|
34
|
+
var teamAri, cypherQuery, response, _response;
|
|
35
35
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
36
36
|
while (1) switch (_context.prev = _context.next) {
|
|
37
37
|
case 0:
|
|
38
38
|
teamAri = teamIdToAri(teamId);
|
|
39
39
|
cypherQuery = "MATCH (team:IdentityTeam {ari: '".concat(teamAri, "'})-[:team_connected_to_container]->(container) RETURN container");
|
|
40
|
-
|
|
40
|
+
if (!fg('teams_containers_cypher_query_v2_migration')) {
|
|
41
|
+
_context.next = 9;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
_context.next = 5;
|
|
45
|
+
return this.makeGraphQLRequest({
|
|
46
|
+
query: TeamContainersQueryV2,
|
|
47
|
+
variables: {
|
|
48
|
+
cypherQuery: cypherQuery,
|
|
49
|
+
params: {
|
|
50
|
+
id: teamAri
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
operationName: 'TeamContainersQueryV2'
|
|
55
|
+
});
|
|
56
|
+
case 5:
|
|
57
|
+
response = _context.sent;
|
|
58
|
+
return _context.abrupt("return", this.processV2Response(response));
|
|
59
|
+
case 9:
|
|
60
|
+
_context.next = 11;
|
|
41
61
|
return this.makeGraphQLRequest({
|
|
42
62
|
query: TeamContainersQuery,
|
|
43
63
|
variables: {
|
|
@@ -46,51 +66,10 @@ export var AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
46
66
|
}, {
|
|
47
67
|
operationName: 'TeamContainersQuery'
|
|
48
68
|
});
|
|
49
|
-
case
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return containers;
|
|
54
|
-
}
|
|
55
|
-
if (edge.node.to.data.__typename === 'ConfluenceSpace') {
|
|
56
|
-
containers.push({
|
|
57
|
-
id: edge.node.to.id,
|
|
58
|
-
type: edge.node.to.data.__typename,
|
|
59
|
-
name: edge.node.to.data.confluenceSpaceName || '',
|
|
60
|
-
icon: "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.icon.path),
|
|
61
|
-
createdDate: new Date(edge.node.to.data.createdDate),
|
|
62
|
-
link: "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.links.webUi),
|
|
63
|
-
containerTypeProperties: {
|
|
64
|
-
subType: undefined,
|
|
65
|
-
name: undefined
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
} else if (edge.node.to.data.__typename === 'JiraProject') {
|
|
69
|
-
containers.push({
|
|
70
|
-
id: edge.node.to.id,
|
|
71
|
-
type: edge.node.to.data.__typename,
|
|
72
|
-
name: edge.node.to.data.jiraProjectName,
|
|
73
|
-
icon: edge.node.to.data.avatar.medium,
|
|
74
|
-
createdDate: new Date(edge.node.to.data.created),
|
|
75
|
-
link: edge.node.to.data.webUrl,
|
|
76
|
-
containerTypeProperties: {
|
|
77
|
-
subType: edge.node.to.data.projectType || '',
|
|
78
|
-
name: edge.node.to.data.projectTypeName || ''
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
} else if (edge.node.to.data.__typename === 'LoomSpace') {
|
|
82
|
-
containers.push({
|
|
83
|
-
id: edge.node.to.id,
|
|
84
|
-
type: edge.node.to.data.__typename,
|
|
85
|
-
name: edge.node.to.data.loomSpaceName,
|
|
86
|
-
icon: '',
|
|
87
|
-
link: edge.node.to.data.url
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
return containers;
|
|
91
|
-
}, []);
|
|
92
|
-
return _context.abrupt("return", containersResult);
|
|
93
|
-
case 7:
|
|
69
|
+
case 11:
|
|
70
|
+
_response = _context.sent;
|
|
71
|
+
return _context.abrupt("return", this.processV1Response(_response));
|
|
72
|
+
case 13:
|
|
94
73
|
case "end":
|
|
95
74
|
return _context.stop();
|
|
96
75
|
}
|
|
@@ -101,6 +80,102 @@ export var AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
101
80
|
}
|
|
102
81
|
return getTeamContainers;
|
|
103
82
|
}()
|
|
83
|
+
}, {
|
|
84
|
+
key: "processV2Response",
|
|
85
|
+
value: function processV2Response(response) {
|
|
86
|
+
var containersResult = response.graphStore.cypherQueryV2.edges.reduce(function (containers, edge) {
|
|
87
|
+
edge.node.columns.forEach(function (column) {
|
|
88
|
+
var _column$value;
|
|
89
|
+
var containerData = (_column$value = column.value) === null || _column$value === void 0 ? void 0 : _column$value.data;
|
|
90
|
+
if (!containerData && fg('enable_team_containers_null_check')) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'ConfluenceSpace') {
|
|
94
|
+
containers.push({
|
|
95
|
+
id: containerData.id,
|
|
96
|
+
type: containerData.__typename,
|
|
97
|
+
name: containerData.confluenceSpaceName || '',
|
|
98
|
+
icon: "".concat(containerData.links.base).concat(containerData.icon.path),
|
|
99
|
+
createdDate: new Date(containerData.createdDate),
|
|
100
|
+
link: "".concat(containerData.links.base).concat(containerData.links.webUi),
|
|
101
|
+
containerTypeProperties: {
|
|
102
|
+
subType: undefined,
|
|
103
|
+
name: undefined
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
} else if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'JiraProject') {
|
|
107
|
+
containers.push({
|
|
108
|
+
id: containerData.id,
|
|
109
|
+
type: containerData.__typename,
|
|
110
|
+
name: containerData.jiraProjectName,
|
|
111
|
+
icon: containerData.avatar.medium,
|
|
112
|
+
createdDate: new Date(containerData.created),
|
|
113
|
+
link: containerData.webUrl,
|
|
114
|
+
containerTypeProperties: {
|
|
115
|
+
subType: containerData.projectType || '',
|
|
116
|
+
name: containerData.projectTypeName || ''
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
} else if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'LoomSpace') {
|
|
120
|
+
containers.push({
|
|
121
|
+
id: containerData.id,
|
|
122
|
+
type: containerData.__typename,
|
|
123
|
+
name: containerData.loomSpaceName,
|
|
124
|
+
icon: '',
|
|
125
|
+
link: containerData.url
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return containers;
|
|
130
|
+
}, []);
|
|
131
|
+
return containersResult;
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
key: "processV1Response",
|
|
135
|
+
value: function processV1Response(response) {
|
|
136
|
+
var containersResult = response.graphStore.cypherQuery.edges.reduce(function (containers, edge) {
|
|
137
|
+
if (!edge.node.to.data && fg('enable_team_containers_null_check')) {
|
|
138
|
+
return containers;
|
|
139
|
+
}
|
|
140
|
+
if (edge.node.to.data.__typename === 'ConfluenceSpace') {
|
|
141
|
+
containers.push({
|
|
142
|
+
id: edge.node.to.id,
|
|
143
|
+
type: edge.node.to.data.__typename,
|
|
144
|
+
name: edge.node.to.data.confluenceSpaceName || '',
|
|
145
|
+
icon: "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.icon.path),
|
|
146
|
+
createdDate: new Date(edge.node.to.data.createdDate),
|
|
147
|
+
link: "".concat(edge.node.to.data.links.base).concat(edge.node.to.data.links.webUi),
|
|
148
|
+
containerTypeProperties: {
|
|
149
|
+
subType: undefined,
|
|
150
|
+
name: undefined
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
} else if (edge.node.to.data.__typename === 'JiraProject') {
|
|
154
|
+
containers.push({
|
|
155
|
+
id: edge.node.to.id,
|
|
156
|
+
type: edge.node.to.data.__typename,
|
|
157
|
+
name: edge.node.to.data.jiraProjectName,
|
|
158
|
+
icon: edge.node.to.data.avatar.medium,
|
|
159
|
+
createdDate: new Date(edge.node.to.data.created),
|
|
160
|
+
link: edge.node.to.data.webUrl,
|
|
161
|
+
containerTypeProperties: {
|
|
162
|
+
subType: edge.node.to.data.projectType || '',
|
|
163
|
+
name: edge.node.to.data.projectTypeName || ''
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
} else if (edge.node.to.data.__typename === 'LoomSpace') {
|
|
167
|
+
containers.push({
|
|
168
|
+
id: edge.node.to.id,
|
|
169
|
+
type: edge.node.to.data.__typename,
|
|
170
|
+
name: edge.node.to.data.loomSpaceName,
|
|
171
|
+
icon: '',
|
|
172
|
+
link: edge.node.to.data.url
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return containers;
|
|
176
|
+
}, []);
|
|
177
|
+
return containersResult;
|
|
178
|
+
}
|
|
104
179
|
}, {
|
|
105
180
|
key: "unlinkTeamContainer",
|
|
106
181
|
value: function () {
|
|
@@ -44,6 +44,55 @@ export var MOCK_TEAM_CONTAINERS = {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
+
export var MOCK_TEAM_CONTAINERSV2 = {
|
|
48
|
+
graphStore: {
|
|
49
|
+
cypherQueryV2: {
|
|
50
|
+
edges: [{
|
|
51
|
+
node: {
|
|
52
|
+
columns: [{
|
|
53
|
+
key: 'container',
|
|
54
|
+
value: {
|
|
55
|
+
data: {
|
|
56
|
+
__typename: 'ConfluenceSpace',
|
|
57
|
+
id: '2',
|
|
58
|
+
confluenceSpaceName: 'Confluence Space',
|
|
59
|
+
type: 'confluence',
|
|
60
|
+
createdDate: '2021-01-01',
|
|
61
|
+
links: {
|
|
62
|
+
base: 'https://example.com',
|
|
63
|
+
webUi: '/wiki/spaces/SPACE'
|
|
64
|
+
},
|
|
65
|
+
icon: {
|
|
66
|
+
path: '/wiki/download/attachments/123/icon.png'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}]
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
node: {
|
|
74
|
+
columns: [{
|
|
75
|
+
key: 'container',
|
|
76
|
+
value: {
|
|
77
|
+
data: {
|
|
78
|
+
__typename: 'JiraProject',
|
|
79
|
+
id: '3',
|
|
80
|
+
jiraProjectName: 'Jira Project',
|
|
81
|
+
webUrl: 'https://example.com/jira/project',
|
|
82
|
+
created: '2021-01-01',
|
|
83
|
+
avatar: {
|
|
84
|
+
medium: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
|
|
85
|
+
},
|
|
86
|
+
projectType: 'software',
|
|
87
|
+
projectTypeName: 'Software Project'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}]
|
|
91
|
+
}
|
|
92
|
+
}]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
47
96
|
export var MOCK_NUMBER_OF_CONNECTED_TEAMS = {
|
|
48
97
|
graphStore: {
|
|
49
98
|
teamConnectedToContainerInverse: {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
2
|
+
var _templateObject, _templateObject2;
|
|
3
3
|
import { print } from 'graphql';
|
|
4
4
|
import gql from 'graphql-tag';
|
|
5
|
-
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
export var TeamContainersQuery = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tquery TeamContainersQuery($cypherQuery: String!) {\n\t\tgraphStore @optIn(to: [\"GraphStore\"]) {\n\t\t\tcypherQuery(query: $cypherQuery) @optIn(to: [\"GraphStoreCypherQuery\"]) {\n\t\t\t\tedges {\n\t\t\t\t\t__typename\n\t\t\t\t\tnode {\n\t\t\t\t\t\tfrom {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto {\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tdata {\n\t\t\t\t\t\t\t\t__typename\n\t\t\t\t\t\t\t\t... on ConfluenceSpace {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tconfluenceSpaceName: name\n\t\t\t\t\t\t\t\t\ttype\n\t\t\t\t\t\t\t\t\tcreatedDate\n\t\t\t\t\t\t\t\t\tlinks {\n\t\t\t\t\t\t\t\t\t\tbase\n\t\t\t\t\t\t\t\t\t\twebUi\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ticon {\n\t\t\t\t\t\t\t\t\t\tpath\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t... on JiraProject {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tjiraProjectName: name\n\t\t\t\t\t\t\t\t\twebUrl\n\t\t\t\t\t\t\t\t\tcreated\n\t\t\t\t\t\t\t\t\tavatar {\n\t\t\t\t\t\t\t\t\t\tmedium\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tprojectType\n\t\t\t\t\t\t\t\t\tprojectTypeName\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t... on LoomSpace {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tloomSpaceName: name\n\t\t\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
|
7
|
+
export var TeamContainersQueryV2 = print(gql(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\tquery TeamContainersQueryV2($cypherQuery: String!, $params: JSON!) {\n\t\tgraphStore @optIn(to: [\"GraphStore\", \"GraphStoreCypherQueryV2\"]) {\n\t\t\tcypherQueryV2(query: $cypherQuery, params: $params) {\n\t\t\t\tedges {\n\t\t\t\t\tnode {\n\t\t\t\t\t\tcolumns {\n\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\tvalue {\n\t\t\t\t\t\t\t\t... on GraphStoreCypherQueryV2AriNode {\n\t\t\t\t\t\t\t\t\tdata {\n\t\t\t\t\t\t\t\t\t\t__typename\n\t\t\t\t\t\t\t\t\t\t... on ConfluenceSpace {\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t\tconfluenceSpaceName: name\n\t\t\t\t\t\t\t\t\t\t\ttype\n\t\t\t\t\t\t\t\t\t\t\tcreatedDate\n\t\t\t\t\t\t\t\t\t\t\tlinks {\n\t\t\t\t\t\t\t\t\t\t\t\tbase\n\t\t\t\t\t\t\t\t\t\t\t\twebUi\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ticon {\n\t\t\t\t\t\t\t\t\t\t\t\tpath\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t... on JiraProject {\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t\tjiraProjectName: name\n\t\t\t\t\t\t\t\t\t\t\twebUrl\n\t\t\t\t\t\t\t\t\t\t\tcreated\n\t\t\t\t\t\t\t\t\t\t\tavatar {\n\t\t\t\t\t\t\t\t\t\t\t\tmedium\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tprojectType\n\t\t\t\t\t\t\t\t\t\t\tprojectTypeName\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t... on LoomSpace {\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t\tloomSpaceName: name\n\t\t\t\t\t\t\t\t\t\t\turl\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
|
8
|
+
export var getTeamContainersQuery = function getTeamContainersQuery() {
|
|
9
|
+
return fg('teams_containers_cypher_query_v2_migration') ? TeamContainersQueryV2 : TeamContainersQuery;
|
|
10
|
+
};
|
|
@@ -7,7 +7,6 @@ import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
|
7
7
|
import Button from '@atlaskit/button/new';
|
|
8
8
|
import ModalDialog, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
|
|
9
9
|
import { Box, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import { getContainerProperties } from '../../../common/utils/get-container-properties';
|
|
11
10
|
export var messages = defineMessages({
|
|
12
11
|
disconnectDialogTitle: {
|
|
13
12
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.title',
|
|
@@ -16,12 +15,12 @@ export var messages = defineMessages({
|
|
|
16
15
|
},
|
|
17
16
|
disconnectDialogDescription: {
|
|
18
17
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.description',
|
|
19
|
-
defaultMessage:
|
|
18
|
+
defaultMessage: "This team will no longer be connected to the {containerName} {containerType, select,\n\t\t\tJiraProject {Jira project}\n\t\t\tConfluenceSpace {Confluence space}\n\t\t\tLoomSpace {Loom space}\n\t\t\tother {link}\n\t\t}.",
|
|
20
19
|
description: 'Description of the disconnect dialog for team containers'
|
|
21
20
|
},
|
|
22
21
|
disconnectDialogDisclaimer: {
|
|
23
22
|
id: 'ptc-directory.team-profile-page.team-containers.disconnect-dialog.disclaimer',
|
|
24
|
-
defaultMessage:
|
|
23
|
+
defaultMessage: "Disconnecting the team from the {containerType, select,\n\t\t\tJiraProject {project}\n\t\t\tConfluenceSpace {space}\n\t\t\tLoomSpace {space}\n\t\t\tother {link}\n\t\t} will not affect any work connected to the team within the {containerType, select,\n\t\t\tJiraProject {project}\n\t\t\tConfluenceSpace {space}\n\t\t\tLoomSpace {space}\n\t\t\tother {link}\n\t\t}.",
|
|
25
24
|
description: 'Disclaimer of the disconnect dialog for team containers'
|
|
26
25
|
},
|
|
27
26
|
disconnectDialogDisclaimerFallback: {
|
|
@@ -69,11 +68,6 @@ export var DisconnectDialog = function DisconnectDialog(_ref) {
|
|
|
69
68
|
return _ref2.apply(this, arguments);
|
|
70
69
|
};
|
|
71
70
|
}();
|
|
72
|
-
var _getContainerProperti = getContainerProperties({
|
|
73
|
-
containerType: containerType
|
|
74
|
-
}),
|
|
75
|
-
containerTypeText = _getContainerProperti.containerTypeText,
|
|
76
|
-
description = _getContainerProperti.description;
|
|
77
71
|
return /*#__PURE__*/React.createElement(ModalDialog, {
|
|
78
72
|
onClose: onClose,
|
|
79
73
|
width: "small",
|
|
@@ -88,13 +82,13 @@ export var DisconnectDialog = function DisconnectDialog(_ref) {
|
|
|
88
82
|
containerName: /*#__PURE__*/React.createElement(Text, {
|
|
89
83
|
weight: "semibold"
|
|
90
84
|
}, containerName),
|
|
91
|
-
containerType:
|
|
85
|
+
containerType: containerType
|
|
92
86
|
}
|
|
93
|
-
}))),
|
|
87
|
+
}))), /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.disconnectDialogDisclaimer, {
|
|
94
88
|
values: {
|
|
95
|
-
containerType:
|
|
89
|
+
containerType: containerType
|
|
96
90
|
}
|
|
97
|
-
}))
|
|
91
|
+
})))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
98
92
|
appearance: "subtle",
|
|
99
93
|
onClick: onClose
|
|
100
94
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.disconnectDialogCancelButton)), /*#__PURE__*/React.createElement(Button, {
|
|
@@ -6,6 +6,8 @@ export declare class AGGClient extends BaseGraphQlClient {
|
|
|
6
6
|
constructor(baseUrl: string, config: ClientConfig);
|
|
7
7
|
setBaseUrl(baseUrl: string): void;
|
|
8
8
|
getTeamContainers(teamId: string): Promise<TeamContainers>;
|
|
9
|
+
private processV2Response;
|
|
10
|
+
private processV1Response;
|
|
9
11
|
unlinkTeamContainer(teamId: string, containerId: string): Promise<UnlinkContainerMutationResponse>;
|
|
10
12
|
queryNumberOfTeamConnectedToContainer(containerId: string): Promise<number>;
|
|
11
13
|
queryTeamsConnectedToContainer(containerId: string): Promise<TeamWithMemberships[]>;
|
|
@@ -53,6 +53,55 @@ export declare const MOCK_TEAM_CONTAINERS: {
|
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
+
export declare const MOCK_TEAM_CONTAINERSV2: {
|
|
57
|
+
graphStore: {
|
|
58
|
+
cypherQueryV2: {
|
|
59
|
+
edges: ({
|
|
60
|
+
node: {
|
|
61
|
+
columns: {
|
|
62
|
+
key: string;
|
|
63
|
+
value: {
|
|
64
|
+
data: {
|
|
65
|
+
__typename: string;
|
|
66
|
+
id: string;
|
|
67
|
+
confluenceSpaceName: string;
|
|
68
|
+
type: string;
|
|
69
|
+
createdDate: string;
|
|
70
|
+
links: {
|
|
71
|
+
base: string;
|
|
72
|
+
webUi: string;
|
|
73
|
+
};
|
|
74
|
+
icon: {
|
|
75
|
+
path: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}[];
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
node: {
|
|
83
|
+
columns: {
|
|
84
|
+
key: string;
|
|
85
|
+
value: {
|
|
86
|
+
data: {
|
|
87
|
+
__typename: string;
|
|
88
|
+
id: string;
|
|
89
|
+
jiraProjectName: string;
|
|
90
|
+
webUrl: string;
|
|
91
|
+
created: string;
|
|
92
|
+
avatar: {
|
|
93
|
+
medium: string;
|
|
94
|
+
};
|
|
95
|
+
projectType: string;
|
|
96
|
+
projectTypeName: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
}[];
|
|
100
|
+
};
|
|
101
|
+
})[];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
56
105
|
export declare const MOCK_NUMBER_OF_CONNECTED_TEAMS: {
|
|
57
106
|
graphStore: {
|
|
58
107
|
teamConnectedToContainerInverse: {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const TeamContainersQuery: string;
|
|
2
|
+
export declare const TeamContainersQueryV2: string;
|
|
3
|
+
export declare const getTeamContainersQuery: () => string;
|
|
2
4
|
export type TeamContainersQueryVariables = {
|
|
3
5
|
cypherQuery: string;
|
|
4
6
|
};
|
|
@@ -17,6 +19,24 @@ export type TeamContainersQueryResponse = {
|
|
|
17
19
|
}>;
|
|
18
20
|
};
|
|
19
21
|
};
|
|
22
|
+
export type TeamContainersQueryV2Variables = {
|
|
23
|
+
cypherQuery: string;
|
|
24
|
+
params: Record<string, any>;
|
|
25
|
+
};
|
|
26
|
+
export type TeamContainersQueryV2Response = {
|
|
27
|
+
cypherQueryV2: {
|
|
28
|
+
edges: Array<{
|
|
29
|
+
node: {
|
|
30
|
+
columns: Array<{
|
|
31
|
+
key: string;
|
|
32
|
+
value: {
|
|
33
|
+
data?: JiraProject | ConfluenceSpace | LoomSpace;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
20
40
|
type JiraProject = {
|
|
21
41
|
__typename: 'JiraProject';
|
|
22
42
|
id: string;
|
|
@@ -6,6 +6,8 @@ export declare class AGGClient extends BaseGraphQlClient {
|
|
|
6
6
|
constructor(baseUrl: string, config: ClientConfig);
|
|
7
7
|
setBaseUrl(baseUrl: string): void;
|
|
8
8
|
getTeamContainers(teamId: string): Promise<TeamContainers>;
|
|
9
|
+
private processV2Response;
|
|
10
|
+
private processV1Response;
|
|
9
11
|
unlinkTeamContainer(teamId: string, containerId: string): Promise<UnlinkContainerMutationResponse>;
|
|
10
12
|
queryNumberOfTeamConnectedToContainer(containerId: string): Promise<number>;
|
|
11
13
|
queryTeamsConnectedToContainer(containerId: string): Promise<TeamWithMemberships[]>;
|
|
@@ -53,6 +53,55 @@ export declare const MOCK_TEAM_CONTAINERS: {
|
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
+
export declare const MOCK_TEAM_CONTAINERSV2: {
|
|
57
|
+
graphStore: {
|
|
58
|
+
cypherQueryV2: {
|
|
59
|
+
edges: ({
|
|
60
|
+
node: {
|
|
61
|
+
columns: {
|
|
62
|
+
key: string;
|
|
63
|
+
value: {
|
|
64
|
+
data: {
|
|
65
|
+
__typename: string;
|
|
66
|
+
id: string;
|
|
67
|
+
confluenceSpaceName: string;
|
|
68
|
+
type: string;
|
|
69
|
+
createdDate: string;
|
|
70
|
+
links: {
|
|
71
|
+
base: string;
|
|
72
|
+
webUi: string;
|
|
73
|
+
};
|
|
74
|
+
icon: {
|
|
75
|
+
path: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}[];
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
node: {
|
|
83
|
+
columns: {
|
|
84
|
+
key: string;
|
|
85
|
+
value: {
|
|
86
|
+
data: {
|
|
87
|
+
__typename: string;
|
|
88
|
+
id: string;
|
|
89
|
+
jiraProjectName: string;
|
|
90
|
+
webUrl: string;
|
|
91
|
+
created: string;
|
|
92
|
+
avatar: {
|
|
93
|
+
medium: string;
|
|
94
|
+
};
|
|
95
|
+
projectType: string;
|
|
96
|
+
projectTypeName: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
}[];
|
|
100
|
+
};
|
|
101
|
+
})[];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
56
105
|
export declare const MOCK_NUMBER_OF_CONNECTED_TEAMS: {
|
|
57
106
|
graphStore: {
|
|
58
107
|
teamConnectedToContainerInverse: {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const TeamContainersQuery: string;
|
|
2
|
+
export declare const TeamContainersQueryV2: string;
|
|
3
|
+
export declare const getTeamContainersQuery: () => string;
|
|
2
4
|
export type TeamContainersQueryVariables = {
|
|
3
5
|
cypherQuery: string;
|
|
4
6
|
};
|
|
@@ -17,6 +19,24 @@ export type TeamContainersQueryResponse = {
|
|
|
17
19
|
}>;
|
|
18
20
|
};
|
|
19
21
|
};
|
|
22
|
+
export type TeamContainersQueryV2Variables = {
|
|
23
|
+
cypherQuery: string;
|
|
24
|
+
params: Record<string, any>;
|
|
25
|
+
};
|
|
26
|
+
export type TeamContainersQueryV2Response = {
|
|
27
|
+
cypherQueryV2: {
|
|
28
|
+
edges: Array<{
|
|
29
|
+
node: {
|
|
30
|
+
columns: Array<{
|
|
31
|
+
key: string;
|
|
32
|
+
value: {
|
|
33
|
+
data?: JiraProject | ConfluenceSpace | LoomSpace;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
20
40
|
type JiraProject = {
|
|
21
41
|
__typename: 'JiraProject';
|
|
22
42
|
id: string;
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/primitives": "^14.10.0",
|
|
47
47
|
"@atlaskit/teams-client": "^4.6.0",
|
|
48
48
|
"@atlaskit/theme": "^19.0.0",
|
|
49
|
-
"@atlaskit/tokens": "^5.
|
|
49
|
+
"@atlaskit/tokens": "^5.5.0",
|
|
50
50
|
"@atlaskit/tooltip": "^20.3.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@compiled/react": "^0.18.3",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
"name": "@atlaskit/teams-public",
|
|
116
|
-
"version": "0.
|
|
116
|
+
"version": "0.43.0",
|
|
117
117
|
"description": "Public components related to teams",
|
|
118
118
|
"author": "Atlassian Pty Ltd",
|
|
119
119
|
"license": "Apache-2.0",
|
|
@@ -142,6 +142,9 @@
|
|
|
142
142
|
},
|
|
143
143
|
"fix_team_link_card_a11y": {
|
|
144
144
|
"type": "boolean"
|
|
145
|
+
},
|
|
146
|
+
"teams_containers_cypher_query_v2_migration": {
|
|
147
|
+
"type": "boolean"
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
150
|
}
|