@atlaskit/teams-public 0.64.0 → 0.65.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 +11 -0
- package/dist/cjs/controllers/hooks/use-team-containers/index.js +6 -5
- package/dist/cjs/controllers/hooks/use-team-containers/mocks.js +125 -0
- package/dist/cjs/services/agg-client/index.js +8 -72
- package/dist/cjs/services/agg-client/utils/queries/team-containers-query.js +4 -6
- package/dist/es2019/controllers/hooks/use-team-containers/index.js +6 -5
- package/dist/es2019/controllers/hooks/use-team-containers/mocks.js +119 -0
- package/dist/es2019/services/agg-client/index.js +14 -71
- package/dist/es2019/services/agg-client/utils/queries/team-containers-query.js +1 -53
- package/dist/esm/controllers/hooks/use-team-containers/index.js +6 -5
- package/dist/esm/controllers/hooks/use-team-containers/mocks.js +119 -0
- package/dist/esm/services/agg-client/index.js +9 -73
- package/dist/esm/services/agg-client/utils/queries/team-containers-query.js +3 -5
- package/dist/types/controllers/hooks/use-team-containers/index.d.ts +2 -1
- package/dist/types/controllers/hooks/use-team-containers/mocks.d.ts +127 -0
- package/dist/types/services/agg-client/index.d.ts +1 -2
- package/dist/types/services/agg-client/utils/queries/team-containers-query.d.ts +0 -1
- package/dist/types/services/types.d.ts +2 -2
- package/dist/types-ts4.5/controllers/hooks/use-team-containers/index.d.ts +2 -1
- package/dist/types-ts4.5/controllers/hooks/use-team-containers/mocks.d.ts +127 -0
- package/dist/types-ts4.5/services/agg-client/index.d.ts +1 -2
- package/dist/types-ts4.5/services/agg-client/utils/queries/team-containers-query.d.ts +0 -1
- package/dist/types-ts4.5/services/types.d.ts +2 -2
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/teams-public
|
|
2
2
|
|
|
3
|
+
## 0.65.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c64239609fe7a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c64239609fe7a) -
|
|
8
|
+
Use agg-client exported from teams-client in teams-public
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 0.64.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -15,6 +15,7 @@ var _reactSweetState = require("react-sweet-state");
|
|
|
15
15
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _teamsAppInternalAnalytics = require("@atlaskit/teams-app-internal-analytics");
|
|
18
|
+
var _teamsClient = require("@atlaskit/teams-client");
|
|
18
19
|
var _analytics = require("../../../common/utils/analytics");
|
|
19
20
|
var _services = require("../../../services");
|
|
20
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -67,7 +68,7 @@ var actions = {
|
|
|
67
68
|
});
|
|
68
69
|
_context.prev = 5;
|
|
69
70
|
_context.next = 8;
|
|
70
|
-
return _services.teamsClient.getTeamContainers(teamId);
|
|
71
|
+
return (0, _platformFeatureFlags.fg)('enable_teams_public_migration_using_teams-client') ? _teamsClient.teamsClient.getTeamContainers(teamId) : _services.teamsClient.getTeamContainers(teamId);
|
|
71
72
|
case 8:
|
|
72
73
|
containers = _context.sent;
|
|
73
74
|
if ((0, _platformFeatureFlags.fg)('ptc-enable-teams-public-analytics-refactor')) {
|
|
@@ -133,7 +134,7 @@ var actions = {
|
|
|
133
134
|
case 4:
|
|
134
135
|
_context2.prev = 4;
|
|
135
136
|
_context2.next = 7;
|
|
136
|
-
return _services.teamsClient.getTeamContainers(teamId);
|
|
137
|
+
return (0, _platformFeatureFlags.fg)('enable_teams_public_migration_using_teams-client') ? _teamsClient.teamsClient.getTeamContainers(teamId) : _services.teamsClient.getTeamContainers(teamId);
|
|
137
138
|
case 7:
|
|
138
139
|
containers = _context2.sent;
|
|
139
140
|
if ((0, _platformFeatureFlags.fg)('ptc-enable-teams-public-analytics-refactor')) {
|
|
@@ -208,7 +209,7 @@ var actions = {
|
|
|
208
209
|
});
|
|
209
210
|
_context3.prev = 5;
|
|
210
211
|
_context3.next = 8;
|
|
211
|
-
return _services.teamsClient.getNumberOfConnectedTeams(containerId);
|
|
212
|
+
return (0, _platformFeatureFlags.fg)('enable_teams_public_migration_using_teams-client') ? _teamsClient.teamsClient.getNumberOfConnectedTeams(containerId) : _services.teamsClient.getNumberOfConnectedTeams(containerId);
|
|
212
213
|
case 8:
|
|
213
214
|
numberOfTeams = _context3.sent;
|
|
214
215
|
if ((0, _platformFeatureFlags.fg)('ptc-enable-teams-public-analytics-refactor')) {
|
|
@@ -297,7 +298,7 @@ var actions = {
|
|
|
297
298
|
});
|
|
298
299
|
_context4.prev = 5;
|
|
299
300
|
_context4.next = 8;
|
|
300
|
-
return _services.teamsClient.getConnectedTeams(containerId);
|
|
301
|
+
return (0, _platformFeatureFlags.fg)('enable_teams_public_migration_using_teams-client') ? _teamsClient.teamsClient.getConnectedTeams(containerId) : _services.teamsClient.getConnectedTeams(containerId);
|
|
301
302
|
case 8:
|
|
302
303
|
teams = _context4.sent;
|
|
303
304
|
if ((0, _platformFeatureFlags.fg)('ptc-enable-teams-public-analytics-refactor')) {
|
|
@@ -380,7 +381,7 @@ var actions = {
|
|
|
380
381
|
});
|
|
381
382
|
_context5.prev = 2;
|
|
382
383
|
_context5.next = 5;
|
|
383
|
-
return _services.teamsClient.unlinkTeamContainer(teamId, containerId);
|
|
384
|
+
return (0, _platformFeatureFlags.fg)('enable_teams_public_migration_using_teams-client') ? _teamsClient.teamsClient.unlinkTeamContainer(teamId, containerId) : _services.teamsClient.unlinkTeamContainer(teamId, containerId);
|
|
384
385
|
case 5:
|
|
385
386
|
mutationResult = _context5.sent;
|
|
386
387
|
if (mutationResult.deleteTeamConnectedToContainer.errors.length) {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MOCK_TEAM_CONTAINERSV2 = exports.MOCK_TEAM_CONTAINERS = exports.MOCK_CONNECTED_TEAMS_RESULT = void 0;
|
|
7
|
+
// Mock data for tests
|
|
8
|
+
var MOCK_TEAM_CONTAINERS = exports.MOCK_TEAM_CONTAINERS = {
|
|
9
|
+
graphStore: {
|
|
10
|
+
cypherQuery: {
|
|
11
|
+
edges: [{
|
|
12
|
+
node: {
|
|
13
|
+
from: {
|
|
14
|
+
id: '1'
|
|
15
|
+
},
|
|
16
|
+
to: {
|
|
17
|
+
id: '2',
|
|
18
|
+
data: {
|
|
19
|
+
__typename: 'ConfluenceSpace',
|
|
20
|
+
confluenceSpaceName: 'Confluence Space',
|
|
21
|
+
type: 'confluence',
|
|
22
|
+
createdDate: '2021-01-01',
|
|
23
|
+
links: {
|
|
24
|
+
webUi: 'web-link'
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
path: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
node: {
|
|
34
|
+
from: {
|
|
35
|
+
id: '1'
|
|
36
|
+
},
|
|
37
|
+
to: {
|
|
38
|
+
id: '3',
|
|
39
|
+
data: {
|
|
40
|
+
__typename: 'JiraProject',
|
|
41
|
+
jiraProjectName: 'Jira Project',
|
|
42
|
+
webUrl: 'web-link',
|
|
43
|
+
created: '2021-01-01',
|
|
44
|
+
avatar: {
|
|
45
|
+
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'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var MOCK_TEAM_CONTAINERSV2 = exports.MOCK_TEAM_CONTAINERSV2 = {
|
|
55
|
+
graphStore: {
|
|
56
|
+
cypherQueryV2: {
|
|
57
|
+
edges: [{
|
|
58
|
+
node: {
|
|
59
|
+
columns: [{
|
|
60
|
+
key: 'container',
|
|
61
|
+
value: {
|
|
62
|
+
data: {
|
|
63
|
+
__typename: 'ConfluenceSpace',
|
|
64
|
+
id: '2',
|
|
65
|
+
confluenceSpaceName: 'Confluence Space',
|
|
66
|
+
type: 'confluence',
|
|
67
|
+
createdDate: '2021-01-01',
|
|
68
|
+
links: {
|
|
69
|
+
base: 'https://example.com',
|
|
70
|
+
webUi: '/wiki/spaces/SPACE'
|
|
71
|
+
},
|
|
72
|
+
icon: {
|
|
73
|
+
path: '/wiki/download/attachments/123/icon.png'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}]
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
node: {
|
|
81
|
+
columns: [{
|
|
82
|
+
key: 'container',
|
|
83
|
+
value: {
|
|
84
|
+
data: {
|
|
85
|
+
__typename: 'JiraProject',
|
|
86
|
+
id: '3',
|
|
87
|
+
jiraProjectName: 'Jira Project',
|
|
88
|
+
webUrl: 'https://example.com/jira/project',
|
|
89
|
+
created: '2021-01-01',
|
|
90
|
+
avatar: {
|
|
91
|
+
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'
|
|
92
|
+
},
|
|
93
|
+
projectType: 'software',
|
|
94
|
+
projectTypeName: 'Software Project'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}]
|
|
98
|
+
}
|
|
99
|
+
}]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var MOCK_CONNECTED_TEAMS_RESULT = exports.MOCK_CONNECTED_TEAMS_RESULT = [{
|
|
104
|
+
id: 'ari:cloud:identity::team/8ee37950-7de7-41ec-aee2-2c02c95949f4',
|
|
105
|
+
displayName: 'THE SUPER TEAM',
|
|
106
|
+
description: "Super team's super description",
|
|
107
|
+
state: 'ACTIVE',
|
|
108
|
+
membershipSettings: 'MEMBER_INVITE',
|
|
109
|
+
organizationId: 'ari:cloud:platform::org/434kbc65-c30c-1a22-6933-d25085c532ca',
|
|
110
|
+
creatorId: 'ari:cloud:identity::user/70121:c17bdf1f-39db-4611-a700-2f8c1aff841e',
|
|
111
|
+
isVerified: false,
|
|
112
|
+
members: [{
|
|
113
|
+
id: '70121:c17bdf1f-39db-4611-a700-2f8c1aff841e',
|
|
114
|
+
fullName: 'Shrutha Kashyap',
|
|
115
|
+
avatarUrl: 'https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/70121:c17bdf1f-39db-4611-a700-2f8c1aff841e/cf4058fd-75f2-4824-8041-c8efa4cc0ea8/128',
|
|
116
|
+
status: 'active'
|
|
117
|
+
}],
|
|
118
|
+
includesYou: false,
|
|
119
|
+
memberCount: 1,
|
|
120
|
+
smallAvatarImageUrl: 'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/teams/avatars/0.svg',
|
|
121
|
+
smallHeaderImageUrl: 'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/gradients/0.svg',
|
|
122
|
+
largeAvatarImageUrl: 'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/teams/avatars/0.svg',
|
|
123
|
+
largeHeaderImageUrl: 'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/gradients/0.svg',
|
|
124
|
+
restriction: 'ORG_MEMBERS'
|
|
125
|
+
}];
|
|
@@ -12,7 +12,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _teamIdToAri = require("../../common/utils/team-id-to-ari");
|
|
17
16
|
var _userAri = require("../../common/utils/user-ari");
|
|
18
17
|
var _constants = require("../constants");
|
|
@@ -38,17 +37,13 @@ var AGGClient = exports.AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
38
37
|
key: "getTeamContainers",
|
|
39
38
|
value: function () {
|
|
40
39
|
var _getTeamContainers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(teamId) {
|
|
41
|
-
var teamAri, cypherQuery, response
|
|
40
|
+
var teamAri, cypherQuery, response;
|
|
42
41
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
43
42
|
while (1) switch (_context.prev = _context.next) {
|
|
44
43
|
case 0:
|
|
45
44
|
teamAri = (0, _teamIdToAri.teamIdToAri)(teamId);
|
|
46
45
|
cypherQuery = "MATCH (team:IdentityTeam {ari: '".concat(teamAri, "'})-[:team_connected_to_container]->(container) RETURN container");
|
|
47
|
-
|
|
48
|
-
_context.next = 9;
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
_context.next = 5;
|
|
46
|
+
_context.next = 4;
|
|
52
47
|
return this.makeGraphQLRequest({
|
|
53
48
|
query: _teamContainersQuery.TeamContainersQueryV2,
|
|
54
49
|
variables: {
|
|
@@ -60,23 +55,10 @@ var AGGClient = exports.AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
60
55
|
}, {
|
|
61
56
|
operationName: 'TeamContainersQueryV2'
|
|
62
57
|
});
|
|
63
|
-
case
|
|
58
|
+
case 4:
|
|
64
59
|
response = _context.sent;
|
|
65
|
-
return _context.abrupt("return", this.
|
|
66
|
-
case
|
|
67
|
-
_context.next = 11;
|
|
68
|
-
return this.makeGraphQLRequest({
|
|
69
|
-
query: _teamContainersQuery.TeamContainersQuery,
|
|
70
|
-
variables: {
|
|
71
|
-
cypherQuery: cypherQuery
|
|
72
|
-
}
|
|
73
|
-
}, {
|
|
74
|
-
operationName: 'TeamContainersQuery'
|
|
75
|
-
});
|
|
76
|
-
case 11:
|
|
77
|
-
_response = _context.sent;
|
|
78
|
-
return _context.abrupt("return", this.processV1Response(_response));
|
|
79
|
-
case 13:
|
|
60
|
+
return _context.abrupt("return", this.processResponse(response));
|
|
61
|
+
case 6:
|
|
80
62
|
case "end":
|
|
81
63
|
return _context.stop();
|
|
82
64
|
}
|
|
@@ -88,13 +70,13 @@ var AGGClient = exports.AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
88
70
|
return getTeamContainers;
|
|
89
71
|
}()
|
|
90
72
|
}, {
|
|
91
|
-
key: "
|
|
92
|
-
value: function
|
|
73
|
+
key: "processResponse",
|
|
74
|
+
value: function processResponse(response) {
|
|
93
75
|
var containersResult = response.graphStore.cypherQueryV2.edges.reduce(function (containers, edge) {
|
|
94
76
|
edge.node.columns.forEach(function (column) {
|
|
95
77
|
var _column$value;
|
|
96
78
|
var containerData = (_column$value = column.value) === null || _column$value === void 0 ? void 0 : _column$value.data;
|
|
97
|
-
if (!containerData
|
|
79
|
+
if (!containerData) {
|
|
98
80
|
return;
|
|
99
81
|
}
|
|
100
82
|
if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'ConfluenceSpace') {
|
|
@@ -137,52 +119,6 @@ var AGGClient = exports.AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
|
137
119
|
}, []);
|
|
138
120
|
return containersResult;
|
|
139
121
|
}
|
|
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
|
-
}
|
|
186
122
|
}, {
|
|
187
123
|
key: "unlinkTeamContainer",
|
|
188
124
|
value: function () {
|
|
@@ -4,14 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.getTeamContainersQuery = exports.TeamContainersQueryV2 =
|
|
7
|
+
exports.getTeamContainersQuery = exports.TeamContainersQueryV2 = 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 _templateObject,
|
|
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"]))));
|
|
11
|
+
var _templateObject;
|
|
12
|
+
var TeamContainersQueryV2 = exports.TeamContainersQueryV2 = (0, _graphql.print)((0, _graphqlTag.default)(_templateObject || (_templateObject = (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
13
|
var getTeamContainersQuery = exports.getTeamContainersQuery = function getTeamContainersQuery() {
|
|
16
|
-
return
|
|
14
|
+
return TeamContainersQueryV2;
|
|
17
15
|
};
|
|
@@ -3,6 +3,7 @@ import { createHook, createStore } from 'react-sweet-state';
|
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/teams-app-internal-analytics';
|
|
6
|
+
import { teamsClient as externalTeamsClient } from '@atlaskit/teams-client';
|
|
6
7
|
import { AnalyticsAction, usePeopleAndTeamAnalytics } from '../../../common/utils/analytics';
|
|
7
8
|
import { teamsClient } from '../../../services';
|
|
8
9
|
const initialConnectedTeamsState = {
|
|
@@ -45,7 +46,7 @@ const actions = {
|
|
|
45
46
|
hasLoaded: false
|
|
46
47
|
});
|
|
47
48
|
try {
|
|
48
|
-
const containers = await teamsClient.getTeamContainers(teamId);
|
|
49
|
+
const containers = await (fg('enable_teams_public_migration_using_teams-client') ? externalTeamsClient.getTeamContainers(teamId) : teamsClient.getTeamContainers(teamId));
|
|
49
50
|
if (fg('ptc-enable-teams-public-analytics-refactor')) {
|
|
50
51
|
fireAnalyticsNext('operational.fetchTeamContainers.succeeded', {
|
|
51
52
|
teamId
|
|
@@ -90,7 +91,7 @@ const actions = {
|
|
|
90
91
|
return;
|
|
91
92
|
}
|
|
92
93
|
try {
|
|
93
|
-
const containers = await teamsClient.getTeamContainers(teamId);
|
|
94
|
+
const containers = await (fg('enable_teams_public_migration_using_teams-client') ? externalTeamsClient.getTeamContainers(teamId) : teamsClient.getTeamContainers(teamId));
|
|
94
95
|
if (fg('ptc-enable-teams-public-analytics-refactor')) {
|
|
95
96
|
fireAnalyticsNext('operational.refetchTeamContainers.succeeded', {
|
|
96
97
|
teamId
|
|
@@ -147,7 +148,7 @@ const actions = {
|
|
|
147
148
|
}
|
|
148
149
|
});
|
|
149
150
|
try {
|
|
150
|
-
const numberOfTeams = await teamsClient.getNumberOfConnectedTeams(containerId);
|
|
151
|
+
const numberOfTeams = await (fg('enable_teams_public_migration_using_teams-client') ? externalTeamsClient.getNumberOfConnectedTeams(containerId) : teamsClient.getNumberOfConnectedTeams(containerId));
|
|
151
152
|
if (fg('ptc-enable-teams-public-analytics-refactor')) {
|
|
152
153
|
fireAnalyticsNext('operational.fetchNumberOfConnectedTeams.succeeded', {
|
|
153
154
|
numberOfTeams,
|
|
@@ -221,7 +222,7 @@ const actions = {
|
|
|
221
222
|
}
|
|
222
223
|
});
|
|
223
224
|
try {
|
|
224
|
-
const teams = await teamsClient.getConnectedTeams(containerId);
|
|
225
|
+
const teams = await (fg('enable_teams_public_migration_using_teams-client') ? externalTeamsClient.getConnectedTeams(containerId) : teamsClient.getConnectedTeams(containerId));
|
|
225
226
|
if (fg('ptc-enable-teams-public-analytics-refactor')) {
|
|
226
227
|
fireAnalyticsNext('operational.fetchConnectedTeams.succeeded', {
|
|
227
228
|
numberOfTeams: numberOfTeams || null,
|
|
@@ -284,7 +285,7 @@ const actions = {
|
|
|
284
285
|
unlinkError: null
|
|
285
286
|
});
|
|
286
287
|
try {
|
|
287
|
-
const mutationResult = await teamsClient.unlinkTeamContainer(teamId, containerId);
|
|
288
|
+
const mutationResult = await (fg('enable_teams_public_migration_using_teams-client') ? externalTeamsClient.unlinkTeamContainer(teamId, containerId) : teamsClient.unlinkTeamContainer(teamId, containerId));
|
|
288
289
|
if (mutationResult.deleteTeamConnectedToContainer.errors.length) {
|
|
289
290
|
// Just handle 1 error at a time should be suffcient as we disconenct only 1 container at a time
|
|
290
291
|
setState({
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Mock data for tests
|
|
2
|
+
export const MOCK_TEAM_CONTAINERS = {
|
|
3
|
+
graphStore: {
|
|
4
|
+
cypherQuery: {
|
|
5
|
+
edges: [{
|
|
6
|
+
node: {
|
|
7
|
+
from: {
|
|
8
|
+
id: '1'
|
|
9
|
+
},
|
|
10
|
+
to: {
|
|
11
|
+
id: '2',
|
|
12
|
+
data: {
|
|
13
|
+
__typename: 'ConfluenceSpace',
|
|
14
|
+
confluenceSpaceName: 'Confluence Space',
|
|
15
|
+
type: 'confluence',
|
|
16
|
+
createdDate: '2021-01-01',
|
|
17
|
+
links: {
|
|
18
|
+
webUi: 'web-link'
|
|
19
|
+
},
|
|
20
|
+
icon: {
|
|
21
|
+
path: 'https://avatar-management--avatars.us-west-2.staging.public.atl-paas.net/712020:2981defd-17f1-440e-a377-8c7657b72a6f/4b5b0d55-614b-4e75-858f-9da3d0c7e3f8/128'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
node: {
|
|
28
|
+
from: {
|
|
29
|
+
id: '1'
|
|
30
|
+
},
|
|
31
|
+
to: {
|
|
32
|
+
id: '3',
|
|
33
|
+
data: {
|
|
34
|
+
__typename: 'JiraProject',
|
|
35
|
+
jiraProjectName: 'Jira Project',
|
|
36
|
+
webUrl: 'web-link',
|
|
37
|
+
created: '2021-01-01',
|
|
38
|
+
avatar: {
|
|
39
|
+
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'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export const MOCK_TEAM_CONTAINERSV2 = {
|
|
49
|
+
graphStore: {
|
|
50
|
+
cypherQueryV2: {
|
|
51
|
+
edges: [{
|
|
52
|
+
node: {
|
|
53
|
+
columns: [{
|
|
54
|
+
key: 'container',
|
|
55
|
+
value: {
|
|
56
|
+
data: {
|
|
57
|
+
__typename: 'ConfluenceSpace',
|
|
58
|
+
id: '2',
|
|
59
|
+
confluenceSpaceName: 'Confluence Space',
|
|
60
|
+
type: 'confluence',
|
|
61
|
+
createdDate: '2021-01-01',
|
|
62
|
+
links: {
|
|
63
|
+
base: 'https://example.com',
|
|
64
|
+
webUi: '/wiki/spaces/SPACE'
|
|
65
|
+
},
|
|
66
|
+
icon: {
|
|
67
|
+
path: '/wiki/download/attachments/123/icon.png'
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}]
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
node: {
|
|
75
|
+
columns: [{
|
|
76
|
+
key: 'container',
|
|
77
|
+
value: {
|
|
78
|
+
data: {
|
|
79
|
+
__typename: 'JiraProject',
|
|
80
|
+
id: '3',
|
|
81
|
+
jiraProjectName: 'Jira Project',
|
|
82
|
+
webUrl: 'https://example.com/jira/project',
|
|
83
|
+
created: '2021-01-01',
|
|
84
|
+
avatar: {
|
|
85
|
+
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'
|
|
86
|
+
},
|
|
87
|
+
projectType: 'software',
|
|
88
|
+
projectTypeName: 'Software Project'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}]
|
|
92
|
+
}
|
|
93
|
+
}]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
export const MOCK_CONNECTED_TEAMS_RESULT = [{
|
|
98
|
+
id: 'ari:cloud:identity::team/8ee37950-7de7-41ec-aee2-2c02c95949f4',
|
|
99
|
+
displayName: 'THE SUPER TEAM',
|
|
100
|
+
description: "Super team's super description",
|
|
101
|
+
state: 'ACTIVE',
|
|
102
|
+
membershipSettings: 'MEMBER_INVITE',
|
|
103
|
+
organizationId: 'ari:cloud:platform::org/434kbc65-c30c-1a22-6933-d25085c532ca',
|
|
104
|
+
creatorId: 'ari:cloud:identity::user/70121:c17bdf1f-39db-4611-a700-2f8c1aff841e',
|
|
105
|
+
isVerified: false,
|
|
106
|
+
members: [{
|
|
107
|
+
id: '70121:c17bdf1f-39db-4611-a700-2f8c1aff841e',
|
|
108
|
+
fullName: 'Shrutha Kashyap',
|
|
109
|
+
avatarUrl: 'https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/70121:c17bdf1f-39db-4611-a700-2f8c1aff841e/cf4058fd-75f2-4824-8041-c8efa4cc0ea8/128',
|
|
110
|
+
status: 'active'
|
|
111
|
+
}],
|
|
112
|
+
includesYou: false,
|
|
113
|
+
memberCount: 1,
|
|
114
|
+
smallAvatarImageUrl: 'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/teams/avatars/0.svg',
|
|
115
|
+
smallHeaderImageUrl: 'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/gradients/0.svg',
|
|
116
|
+
largeAvatarImageUrl: 'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/teams/avatars/0.svg',
|
|
117
|
+
largeHeaderImageUrl: 'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/gradients/0.svg',
|
|
118
|
+
restriction: 'ORG_MEMBERS'
|
|
119
|
+
}];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { teamIdToAri } from '../../common/utils/team-id-to-ari';
|
|
3
2
|
import { toUserId } from '../../common/utils/user-ari';
|
|
4
3
|
import { DEFAULT_CONFIG } from '../constants';
|
|
@@ -6,7 +5,7 @@ import { BaseGraphQlClient } from '../graphql-client';
|
|
|
6
5
|
import { UnlinkContainerMutation } from './utils/mutations/unlink-container-mutation';
|
|
7
6
|
import { NumberOfTeamConnectedToContainerQuery } from './utils/queries/number-of-team-connected-to-container-query';
|
|
8
7
|
import { TeamConnectedToContainerQuery } from './utils/queries/team-connected-to-container-query';
|
|
9
|
-
import {
|
|
8
|
+
import { TeamContainersQueryV2 } from './utils/queries/team-containers-query';
|
|
10
9
|
export class AGGClient extends BaseGraphQlClient {
|
|
11
10
|
constructor(baseUrl, config) {
|
|
12
11
|
super(`${baseUrl}/graphql`, config);
|
|
@@ -17,37 +16,25 @@ export class AGGClient extends BaseGraphQlClient {
|
|
|
17
16
|
async getTeamContainers(teamId) {
|
|
18
17
|
const teamAri = teamIdToAri(teamId);
|
|
19
18
|
const cypherQuery = `MATCH (team:IdentityTeam {ari: '${teamAri}'})-[:team_connected_to_container]->(container) RETURN container`;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
19
|
+
const response = await this.makeGraphQLRequest({
|
|
20
|
+
query: TeamContainersQueryV2,
|
|
21
|
+
variables: {
|
|
22
|
+
cypherQuery,
|
|
23
|
+
params: {
|
|
24
|
+
id: teamAri
|
|
38
25
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
operationName: 'TeamContainersQueryV2'
|
|
29
|
+
});
|
|
30
|
+
return this.processResponse(response);
|
|
44
31
|
}
|
|
45
|
-
|
|
32
|
+
processResponse(response) {
|
|
46
33
|
const containersResult = response.graphStore.cypherQueryV2.edges.reduce((containers, edge) => {
|
|
47
34
|
edge.node.columns.forEach(column => {
|
|
48
35
|
var _column$value;
|
|
49
36
|
const containerData = (_column$value = column.value) === null || _column$value === void 0 ? void 0 : _column$value.data;
|
|
50
|
-
if (!containerData
|
|
37
|
+
if (!containerData) {
|
|
51
38
|
return;
|
|
52
39
|
}
|
|
53
40
|
if ((containerData === null || containerData === void 0 ? void 0 : containerData.__typename) === 'ConfluenceSpace') {
|
|
@@ -90,50 +77,6 @@ export class AGGClient extends BaseGraphQlClient {
|
|
|
90
77
|
}, []);
|
|
91
78
|
return containersResult;
|
|
92
79
|
}
|
|
93
|
-
processV1Response(response) {
|
|
94
|
-
const containersResult = response.graphStore.cypherQuery.edges.reduce((containers, edge) => {
|
|
95
|
-
if (!edge.node.to.data && fg('enable_team_containers_null_check')) {
|
|
96
|
-
return containers;
|
|
97
|
-
}
|
|
98
|
-
if (edge.node.to.data.__typename === 'ConfluenceSpace') {
|
|
99
|
-
containers.push({
|
|
100
|
-
id: edge.node.to.id,
|
|
101
|
-
type: edge.node.to.data.__typename,
|
|
102
|
-
name: edge.node.to.data.confluenceSpaceName || '',
|
|
103
|
-
icon: `${edge.node.to.data.links.base}${edge.node.to.data.icon.path}`,
|
|
104
|
-
createdDate: new Date(edge.node.to.data.createdDate),
|
|
105
|
-
link: `${edge.node.to.data.links.base}${edge.node.to.data.links.webUi}`,
|
|
106
|
-
containerTypeProperties: {
|
|
107
|
-
subType: undefined,
|
|
108
|
-
name: undefined
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
} else if (edge.node.to.data.__typename === 'JiraProject') {
|
|
112
|
-
containers.push({
|
|
113
|
-
id: edge.node.to.id,
|
|
114
|
-
type: edge.node.to.data.__typename,
|
|
115
|
-
name: edge.node.to.data.jiraProjectName,
|
|
116
|
-
icon: edge.node.to.data.avatar.medium,
|
|
117
|
-
createdDate: new Date(edge.node.to.data.created),
|
|
118
|
-
link: edge.node.to.data.webUrl,
|
|
119
|
-
containerTypeProperties: {
|
|
120
|
-
subType: edge.node.to.data.projectType || '',
|
|
121
|
-
name: edge.node.to.data.projectTypeName || ''
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
} else if (edge.node.to.data.__typename === 'LoomSpace') {
|
|
125
|
-
containers.push({
|
|
126
|
-
id: edge.node.to.id,
|
|
127
|
-
type: edge.node.to.data.__typename,
|
|
128
|
-
name: edge.node.to.data.loomSpaceName,
|
|
129
|
-
icon: '',
|
|
130
|
-
link: edge.node.to.data.url
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
return containers;
|
|
134
|
-
}, []);
|
|
135
|
-
return containersResult;
|
|
136
|
-
}
|
|
137
80
|
async unlinkTeamContainer(teamId, containerId) {
|
|
138
81
|
const teamAri = teamIdToAri(teamId);
|
|
139
82
|
const response = await this.makeGraphQLRequest({
|