@atlaskit/teams-client 4.0.0 → 4.2.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 +16 -0
- package/dist/cjs/common/utils/permissions/constants.js +1 -1
- package/dist/cjs/common/utils/ufo/index.js +2 -2
- package/dist/cjs/services/hooks/use-teams-client-setup.js +10 -0
- package/dist/cjs/services/main.js +176 -0
- package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/cjs/services/team-central-client/index.js +287 -0
- package/dist/cjs/services/team-central-client/mutations/add-team-watcher.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/create-tag-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/help-pointer-create-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/help-pointer-update-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/kudos-delete-mutation.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/mutations/remove-team-watcher.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/queries/tag-list-query.graphql.js +12 -0
- package/dist/cjs/services/team-central-client/utils.js +12 -0
- package/dist/es2019/common/utils/permissions/constants.js +1 -1
- package/dist/es2019/common/utils/ufo/index.js +2 -2
- package/dist/es2019/services/hooks/use-teams-client-setup.js +10 -0
- package/dist/es2019/services/main.js +30 -0
- package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/es2019/services/team-central-client/index.js +106 -0
- package/dist/es2019/services/team-central-client/mutations/add-team-watcher.graphql.js +10 -0
- package/dist/es2019/services/team-central-client/mutations/create-tag-mutation.graphql.js +13 -0
- package/dist/es2019/services/team-central-client/mutations/help-pointer-create-mutation.graphql.js +31 -0
- package/dist/es2019/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.js +9 -0
- package/dist/es2019/services/team-central-client/mutations/help-pointer-update-mutation.graphql.js +33 -0
- package/dist/es2019/services/team-central-client/mutations/kudos-delete-mutation.graphql.js +12 -0
- package/dist/es2019/services/team-central-client/mutations/remove-team-watcher.graphql.js +10 -0
- package/dist/es2019/services/team-central-client/queries/tag-list-query.graphql.js +26 -0
- package/dist/es2019/services/team-central-client/utils.js +2 -0
- package/dist/esm/common/utils/permissions/constants.js +1 -1
- package/dist/esm/common/utils/ufo/index.js +2 -2
- package/dist/esm/services/hooks/use-teams-client-setup.js +10 -0
- package/dist/esm/services/main.js +176 -0
- package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/services/team-central-client/index.js +280 -0
- package/dist/esm/services/team-central-client/mutations/add-team-watcher.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/create-tag-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/help-pointer-create-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/help-pointer-update-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/kudos-delete-mutation.graphql.js +5 -0
- package/dist/esm/services/team-central-client/mutations/remove-team-watcher.graphql.js +5 -0
- package/dist/esm/services/team-central-client/queries/tag-list-query.graphql.js +5 -0
- package/dist/esm/services/team-central-client/utils.js +6 -0
- package/dist/types/services/main.d.ts +11 -0
- package/dist/types/services/team-central-client/index.d.ts +24 -0
- package/dist/types/services/team-central-client/mutations/add-team-watcher.graphql.d.ts +9 -0
- package/dist/types/services/team-central-client/mutations/create-tag-mutation.graphql.d.ts +12 -0
- package/dist/types/services/team-central-client/mutations/help-pointer-create-mutation.graphql.d.ts +20 -0
- package/dist/types/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.d.ts +7 -0
- package/dist/types/services/team-central-client/mutations/help-pointer-update-mutation.graphql.d.ts +21 -0
- package/dist/types/services/team-central-client/mutations/kudos-delete-mutation.graphql.d.ts +10 -0
- package/dist/types/services/team-central-client/mutations/remove-team-watcher.graphql.d.ts +9 -0
- package/dist/types/services/team-central-client/queries/tag-list-query.graphql.d.ts +24 -0
- package/dist/types/services/team-central-client/utils.d.ts +2 -0
- package/dist/types-ts4.5/services/main.d.ts +11 -0
- package/dist/types-ts4.5/services/team-central-client/index.d.ts +24 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/add-team-watcher.graphql.d.ts +9 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/create-tag-mutation.graphql.d.ts +12 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-create-mutation.graphql.d.ts +20 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.d.ts +7 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/help-pointer-update-mutation.graphql.d.ts +21 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/kudos-delete-mutation.graphql.d.ts +10 -0
- package/dist/types-ts4.5/services/team-central-client/mutations/remove-team-watcher.graphql.d.ts +9 -0
- package/dist/types-ts4.5/services/team-central-client/queries/tag-list-query.graphql.d.ts +24 -0
- package/dist/types-ts4.5/services/team-central-client/utils.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
|
+
import { DEFAULT_CONFIG } from '../constants';
|
|
11
|
+
import { BaseGraphQlClient } from '../graphql-client';
|
|
12
|
+
import { logException } from '../sentry/main';
|
|
13
|
+
import { AddTeamWatcherMutation } from './mutations/add-team-watcher.graphql';
|
|
14
|
+
import { CreateTagMutation } from './mutations/create-tag-mutation.graphql';
|
|
15
|
+
import { HelpPointerCreateMutation } from './mutations/help-pointer-create-mutation.graphql';
|
|
16
|
+
import { HelpPointerDeleteMutation } from './mutations/help-pointer-delete-mutation.graphql';
|
|
17
|
+
import { HelpPointerUpdateMutation } from './mutations/help-pointer-update-mutation.graphql';
|
|
18
|
+
import { KudosDeleteMutation } from './mutations/kudos-delete-mutation.graphql';
|
|
19
|
+
import { RemoveTeamWatcherMutation } from './mutations/remove-team-watcher.graphql';
|
|
20
|
+
import { TagListQuery } from './queries/tag-list-query.graphql';
|
|
21
|
+
import { getTeamCentralGraphqlUrl, getUnshardedTeamCentralGraphqlUrl } from './utils';
|
|
22
|
+
export var TeamCentralClient = /*#__PURE__*/function (_BaseGraphQlClient) {
|
|
23
|
+
function TeamCentralClient(baseUrl, config) {
|
|
24
|
+
_classCallCheck(this, TeamCentralClient);
|
|
25
|
+
return _callSuper(this, TeamCentralClient, [getUnshardedTeamCentralGraphqlUrl(baseUrl), config]);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Team central url is a bit special, that it depends on cloudId.
|
|
29
|
+
_inherits(TeamCentralClient, _BaseGraphQlClient);
|
|
30
|
+
return _createClass(TeamCentralClient, [{
|
|
31
|
+
key: "setBaseUrl",
|
|
32
|
+
value: function setBaseUrl(baseUrl) {
|
|
33
|
+
var cloudId = this.getCloudId();
|
|
34
|
+
this.setServiceUrl(cloudId && cloudId !== 'None' ? getTeamCentralGraphqlUrl(baseUrl, cloudId) : getUnshardedTeamCentralGraphqlUrl(baseUrl));
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "addTeamWatcher",
|
|
38
|
+
value: function () {
|
|
39
|
+
var _addTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(teamId, cloudId) {
|
|
40
|
+
var response;
|
|
41
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
42
|
+
while (1) switch (_context.prev = _context.next) {
|
|
43
|
+
case 0:
|
|
44
|
+
_context.next = 2;
|
|
45
|
+
return this.makeGraphQLRequest({
|
|
46
|
+
query: AddTeamWatcherMutation,
|
|
47
|
+
variables: {
|
|
48
|
+
teamId: teamId,
|
|
49
|
+
cloudId: cloudId
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
operationName: 'addTeamWatcher'
|
|
53
|
+
});
|
|
54
|
+
case 2:
|
|
55
|
+
response = _context.sent;
|
|
56
|
+
return _context.abrupt("return", response.addTeamWatcher);
|
|
57
|
+
case 4:
|
|
58
|
+
case "end":
|
|
59
|
+
return _context.stop();
|
|
60
|
+
}
|
|
61
|
+
}, _callee, this);
|
|
62
|
+
}));
|
|
63
|
+
function addTeamWatcher(_x, _x2) {
|
|
64
|
+
return _addTeamWatcher.apply(this, arguments);
|
|
65
|
+
}
|
|
66
|
+
return addTeamWatcher;
|
|
67
|
+
}()
|
|
68
|
+
}, {
|
|
69
|
+
key: "removeTeamWatcher",
|
|
70
|
+
value: function () {
|
|
71
|
+
var _removeTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(teamId, cloudId) {
|
|
72
|
+
var response;
|
|
73
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
74
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
75
|
+
case 0:
|
|
76
|
+
_context2.next = 2;
|
|
77
|
+
return this.makeGraphQLRequest({
|
|
78
|
+
query: RemoveTeamWatcherMutation,
|
|
79
|
+
variables: {
|
|
80
|
+
teamId: teamId,
|
|
81
|
+
cloudId: cloudId
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
operationName: 'removeTeamWatcher'
|
|
85
|
+
});
|
|
86
|
+
case 2:
|
|
87
|
+
response = _context2.sent;
|
|
88
|
+
return _context2.abrupt("return", response.removeTeamWatcher);
|
|
89
|
+
case 4:
|
|
90
|
+
case "end":
|
|
91
|
+
return _context2.stop();
|
|
92
|
+
}
|
|
93
|
+
}, _callee2, this);
|
|
94
|
+
}));
|
|
95
|
+
function removeTeamWatcher(_x3, _x4) {
|
|
96
|
+
return _removeTeamWatcher.apply(this, arguments);
|
|
97
|
+
}
|
|
98
|
+
return removeTeamWatcher;
|
|
99
|
+
}()
|
|
100
|
+
}, {
|
|
101
|
+
key: "deleteKudos",
|
|
102
|
+
value: function () {
|
|
103
|
+
var _deleteKudos = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
|
|
104
|
+
var response;
|
|
105
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
106
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
107
|
+
case 0:
|
|
108
|
+
_context3.next = 2;
|
|
109
|
+
return this.makeGraphQLRequest({
|
|
110
|
+
query: KudosDeleteMutation,
|
|
111
|
+
variables: {
|
|
112
|
+
id: id
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
operationName: 'DeleteKudos'
|
|
116
|
+
});
|
|
117
|
+
case 2:
|
|
118
|
+
response = _context3.sent;
|
|
119
|
+
return _context3.abrupt("return", response.deleteKudos);
|
|
120
|
+
case 4:
|
|
121
|
+
case "end":
|
|
122
|
+
return _context3.stop();
|
|
123
|
+
}
|
|
124
|
+
}, _callee3, this);
|
|
125
|
+
}));
|
|
126
|
+
function deleteKudos(_x5) {
|
|
127
|
+
return _deleteKudos.apply(this, arguments);
|
|
128
|
+
}
|
|
129
|
+
return deleteKudos;
|
|
130
|
+
}()
|
|
131
|
+
}, {
|
|
132
|
+
key: "queryTagList",
|
|
133
|
+
value: function () {
|
|
134
|
+
var _queryTagList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(variables) {
|
|
135
|
+
var response;
|
|
136
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
137
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
138
|
+
case 0:
|
|
139
|
+
_context4.next = 2;
|
|
140
|
+
return this.makeGraphQLRequest({
|
|
141
|
+
query: TagListQuery,
|
|
142
|
+
variables: variables
|
|
143
|
+
}, {
|
|
144
|
+
operationName: 'TagListByCloudId'
|
|
145
|
+
});
|
|
146
|
+
case 2:
|
|
147
|
+
response = _context4.sent;
|
|
148
|
+
return _context4.abrupt("return", response.tagSearchByCloudId);
|
|
149
|
+
case 4:
|
|
150
|
+
case "end":
|
|
151
|
+
return _context4.stop();
|
|
152
|
+
}
|
|
153
|
+
}, _callee4, this);
|
|
154
|
+
}));
|
|
155
|
+
function queryTagList(_x6) {
|
|
156
|
+
return _queryTagList.apply(this, arguments);
|
|
157
|
+
}
|
|
158
|
+
return queryTagList;
|
|
159
|
+
}()
|
|
160
|
+
}, {
|
|
161
|
+
key: "createTag",
|
|
162
|
+
value: function () {
|
|
163
|
+
var _createTag = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(variables) {
|
|
164
|
+
var response;
|
|
165
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
166
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
167
|
+
case 0:
|
|
168
|
+
_context5.next = 2;
|
|
169
|
+
return this.makeGraphQLRequest({
|
|
170
|
+
query: CreateTagMutation,
|
|
171
|
+
variables: variables
|
|
172
|
+
}, {
|
|
173
|
+
operationName: 'createTagForCloudId'
|
|
174
|
+
});
|
|
175
|
+
case 2:
|
|
176
|
+
response = _context5.sent;
|
|
177
|
+
return _context5.abrupt("return", response.createTagForCloudId);
|
|
178
|
+
case 4:
|
|
179
|
+
case "end":
|
|
180
|
+
return _context5.stop();
|
|
181
|
+
}
|
|
182
|
+
}, _callee5, this);
|
|
183
|
+
}));
|
|
184
|
+
function createTag(_x7) {
|
|
185
|
+
return _createTag.apply(this, arguments);
|
|
186
|
+
}
|
|
187
|
+
return createTag;
|
|
188
|
+
}()
|
|
189
|
+
}, {
|
|
190
|
+
key: "createHelpPointer",
|
|
191
|
+
value: function () {
|
|
192
|
+
var _createHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(variables) {
|
|
193
|
+
var response;
|
|
194
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
195
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
196
|
+
case 0:
|
|
197
|
+
_context6.next = 2;
|
|
198
|
+
return this.makeGraphQLRequest({
|
|
199
|
+
query: HelpPointerCreateMutation,
|
|
200
|
+
variables: variables
|
|
201
|
+
}, {
|
|
202
|
+
operationName: 'CreateHelpPointer'
|
|
203
|
+
});
|
|
204
|
+
case 2:
|
|
205
|
+
response = _context6.sent;
|
|
206
|
+
return _context6.abrupt("return", response.createHelpPointer);
|
|
207
|
+
case 4:
|
|
208
|
+
case "end":
|
|
209
|
+
return _context6.stop();
|
|
210
|
+
}
|
|
211
|
+
}, _callee6, this);
|
|
212
|
+
}));
|
|
213
|
+
function createHelpPointer(_x8) {
|
|
214
|
+
return _createHelpPointer.apply(this, arguments);
|
|
215
|
+
}
|
|
216
|
+
return createHelpPointer;
|
|
217
|
+
}()
|
|
218
|
+
}, {
|
|
219
|
+
key: "updateHelpPointer",
|
|
220
|
+
value: function () {
|
|
221
|
+
var _updateHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(variables) {
|
|
222
|
+
var response;
|
|
223
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
224
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
225
|
+
case 0:
|
|
226
|
+
_context7.next = 2;
|
|
227
|
+
return this.makeGraphQLRequest({
|
|
228
|
+
query: HelpPointerUpdateMutation,
|
|
229
|
+
variables: variables
|
|
230
|
+
}, {
|
|
231
|
+
operationName: 'UpdateHelpPointer'
|
|
232
|
+
});
|
|
233
|
+
case 2:
|
|
234
|
+
response = _context7.sent;
|
|
235
|
+
return _context7.abrupt("return", response.updateHelpPointer);
|
|
236
|
+
case 4:
|
|
237
|
+
case "end":
|
|
238
|
+
return _context7.stop();
|
|
239
|
+
}
|
|
240
|
+
}, _callee7, this);
|
|
241
|
+
}));
|
|
242
|
+
function updateHelpPointer(_x9) {
|
|
243
|
+
return _updateHelpPointer.apply(this, arguments);
|
|
244
|
+
}
|
|
245
|
+
return updateHelpPointer;
|
|
246
|
+
}()
|
|
247
|
+
}, {
|
|
248
|
+
key: "deleteHelpPointer",
|
|
249
|
+
value: function () {
|
|
250
|
+
var _deleteHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(variables) {
|
|
251
|
+
var response;
|
|
252
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
253
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
254
|
+
case 0:
|
|
255
|
+
_context8.next = 2;
|
|
256
|
+
return this.makeGraphQLRequest({
|
|
257
|
+
query: HelpPointerDeleteMutation,
|
|
258
|
+
variables: variables
|
|
259
|
+
}, {
|
|
260
|
+
operationName: 'DeleteHelpPointer'
|
|
261
|
+
});
|
|
262
|
+
case 2:
|
|
263
|
+
response = _context8.sent;
|
|
264
|
+
return _context8.abrupt("return", response.deleteHelpPointer);
|
|
265
|
+
case 4:
|
|
266
|
+
case "end":
|
|
267
|
+
return _context8.stop();
|
|
268
|
+
}
|
|
269
|
+
}, _callee8, this);
|
|
270
|
+
}));
|
|
271
|
+
function deleteHelpPointer(_x10) {
|
|
272
|
+
return _deleteHelpPointer.apply(this, arguments);
|
|
273
|
+
}
|
|
274
|
+
return deleteHelpPointer;
|
|
275
|
+
}()
|
|
276
|
+
}]);
|
|
277
|
+
}(BaseGraphQlClient);
|
|
278
|
+
export default new TeamCentralClient(DEFAULT_CONFIG.stargateRoot, {
|
|
279
|
+
logException: logException
|
|
280
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export var AddTeamWatcherMutation = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tmutation addTeamWatcher($teamId: String!, $cloudId: String) {\n\t\taddTeamWatcher(input: { teamId: $teamId, cloudId: $cloudId }) {\n\t\t\tisWatching\n\t\t\t__typename\n\t\t}\n\t}\n"]))));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export var CreateTagMutation = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tmutation createTagForCloudId($name: String!, $cloudId: String!) {\n\t\tcreateTagForCloudId(input: { name: $name, cloudId: $cloudId }) {\n\t\t\ttag {\n\t\t\t\tid\n\t\t\t\tuuid\n\t\t\t\tname\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
package/dist/esm/services/team-central-client/mutations/help-pointer-create-mutation.graphql.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export var HelpPointerCreateMutation = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tmutation CreateHelpPointer(\n\t\t$cloudId: String!\n\t\t$description: String\n\t\t$icon: IconInput\n\t\t$tagUuids: [UUID]\n\t\t$link: String!\n\t\t$name: String!\n\t\t$teamId: String!\n\t\t$type: HelpPointerType!\n\t) {\n\t\tcreateHelpPointer(\n\t\t\tinput: {\n\t\t\t\tcloudId: $cloudId\n\t\t\t\tdescription: $description\n\t\t\t\ticon: $icon\n\t\t\t\ttagUuids: $tagUuids\n\t\t\t\tlink: $link\n\t\t\t\tname: $name\n\t\t\t\tteamId: $teamId\n\t\t\t\ttype: $type\n\t\t\t}\n\t\t) {\n\t\t\thelpPointer {\n\t\t\t\tid\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
package/dist/esm/services/team-central-client/mutations/help-pointer-delete-mutation.graphql.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export var HelpPointerDeleteMutation = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tmutation DeleteHelpPointer($id: ID!) {\n\t\tdeleteHelpPointer(input: { id: $id }) {\n\t\t\tsuccess\n\t\t}\n\t}\n"]))));
|
package/dist/esm/services/team-central-client/mutations/help-pointer-update-mutation.graphql.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export var HelpPointerUpdateMutation = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tmutation UpdateHelpPointer(\n\t\t$id: ID!\n\t\t$description: String\n\t\t$teamId: String\n\t\t$newTeamName: String\n\t\t$icon: IconInput\n\t\t$tagUuids: [UUID]\n\t\t$link: String\n\t\t$name: String\n\t\t$type: HelpPointerType\n\t) {\n\t\tupdateHelpPointer(\n\t\t\tinput: {\n\t\t\t\tid: $id\n\t\t\t\tdescription: $description\n\t\t\t\ticon: $icon\n\t\t\t\ttagUuids: $tagUuids\n\t\t\t\tlink: $link\n\t\t\t\tteamId: $teamId\n\t\t\t\tnewTeamName: $newTeamName\n\t\t\t\tname: $name\n\t\t\t\ttype: $type\n\t\t\t}\n\t\t) {\n\t\t\thelpPointer {\n\t\t\t\tid\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export var KudosDeleteMutation = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tmutation DeleteKudos($id: ID!) {\n\t\tdeleteKudos(input: { id: $id }) {\n\t\t\tsuccess\n\t\t\tkudos {\n\t\t\t\tid\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export var RemoveTeamWatcherMutation = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tmutation removeTeamWatcher($teamId: String!, $cloudId: String) {\n\t\tremoveTeamWatcher(input: { teamId: $teamId, cloudId: $cloudId }) {\n\t\t\tisWatching\n\t\t\t__typename\n\t\t}\n\t}\n"]))));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import { print } from 'graphql';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
export var TagListQuery = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tquery TagListByCloudId($q: String!, $cloudId: String!, $first: Int) {\n\t\ttagSearchByCloudId(q: $q, cloudId: $cloudId, first: $first) {\n\t\t\tedges {\n\t\t\t\tnode {\n\t\t\t\t\tid\n\t\t\t\t\tuuid\n\t\t\t\t\tname\n\t\t\t\t\tprojects {\n\t\t\t\t\t\tcount\n\t\t\t\t\t}\n\n\t\t\t\t\tgoals {\n\t\t\t\t\t\tcount\n\t\t\t\t\t}\n\n\t\t\t\t\thelpLinks {\n\t\t\t\t\t\tcount\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"]))));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var getTeamCentralGraphqlUrl = function getTeamCentralGraphqlUrl(baseUrl, cloudId) {
|
|
2
|
+
return "".concat(baseUrl, "/townsquare/s/").concat(cloudId, "/graphql");
|
|
3
|
+
};
|
|
4
|
+
export var getUnshardedTeamCentralGraphqlUrl = function getUnshardedTeamCentralGraphqlUrl(baseUrl) {
|
|
5
|
+
return "".concat(baseUrl, "/watermelon/graphql");
|
|
6
|
+
};
|
|
@@ -10,6 +10,7 @@ import mutabilityClient from './mutability-client';
|
|
|
10
10
|
import objectResolverClient from './object-resolver-client';
|
|
11
11
|
import permsClient from './perms-client';
|
|
12
12
|
import publicApiClient from './public-api-client';
|
|
13
|
+
import teamCentralClient from './team-central-client';
|
|
13
14
|
import teamsInSlackClient from './teams-in-slack-client';
|
|
14
15
|
import { type ClientContextProps } from './types';
|
|
15
16
|
import userPreferencesClient from './user-preferences-client';
|
|
@@ -36,6 +37,7 @@ export declare class TeamsClient {
|
|
|
36
37
|
private readonly _teamsInSlackClient;
|
|
37
38
|
private readonly _collaborationGraphClient;
|
|
38
39
|
private readonly _identityClient;
|
|
40
|
+
private readonly _teamCentralClient;
|
|
39
41
|
constructor(
|
|
40
42
|
/**
|
|
41
43
|
* @param {ClientContextProps} context - Context including CloudId & OrgId to be used for all requests
|
|
@@ -51,6 +53,7 @@ export declare class TeamsClient {
|
|
|
51
53
|
* Sets context including CloudId & OrgId to be used for all requests
|
|
52
54
|
*/
|
|
53
55
|
setContext(context: ClientContextProps): void;
|
|
56
|
+
setTeamCentralContext(baseUrl: string, context: ClientContextProps): void;
|
|
54
57
|
/**
|
|
55
58
|
* @private
|
|
56
59
|
* @deprecated use setBaseUrl instead
|
|
@@ -311,6 +314,14 @@ export declare class TeamsClient {
|
|
|
311
314
|
*/
|
|
312
315
|
updateUser(...args: Parameters<typeof identityClient.updateUser>): Promise<AwaitedReturn<typeof identityClient.updateUser>>;
|
|
313
316
|
updateUserAvatar(...args: Parameters<typeof identityClient.updateUserAvatar>): Promise<AwaitedReturn<typeof identityClient.updateUserAvatar>>;
|
|
317
|
+
addTeamWatcher(...args: Parameters<typeof teamCentralClient.addTeamWatcher>): Promise<AwaitedReturn<typeof teamCentralClient.addTeamWatcher>>;
|
|
318
|
+
removeTeamWatcher(...args: Parameters<typeof teamCentralClient.removeTeamWatcher>): Promise<AwaitedReturn<typeof teamCentralClient.removeTeamWatcher>>;
|
|
319
|
+
deleteKudos(...args: Parameters<typeof teamCentralClient.deleteKudos>): Promise<AwaitedReturn<typeof teamCentralClient.deleteKudos>>;
|
|
320
|
+
queryTagList(...args: Parameters<typeof teamCentralClient.queryTagList>): Promise<AwaitedReturn<typeof teamCentralClient.queryTagList>>;
|
|
321
|
+
createTag(...args: Parameters<typeof teamCentralClient.createTag>): Promise<AwaitedReturn<typeof teamCentralClient.createTag>>;
|
|
322
|
+
createHelpPointer(...args: Parameters<typeof teamCentralClient.createHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.createHelpPointer>>;
|
|
323
|
+
updateHelpPointer(...args: Parameters<typeof teamCentralClient.updateHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.updateHelpPointer>>;
|
|
324
|
+
deleteHelpPointer(...args: Parameters<typeof teamCentralClient.deleteHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.deleteHelpPointer>>;
|
|
314
325
|
}
|
|
315
326
|
export declare const teamsClient: TeamsClient;
|
|
316
327
|
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ClientConfig } from '../base-client';
|
|
2
|
+
import { BaseGraphQlClient } from '../graphql-client';
|
|
3
|
+
import { type AddTeamWatcherMutationResponse } from './mutations/add-team-watcher.graphql';
|
|
4
|
+
import { type CreateTagMutationResponse, type CreateTagMutationVariables } from './mutations/create-tag-mutation.graphql';
|
|
5
|
+
import { type HelpPointerCreateMutationResponse, type HelpPointerCreateMutationVariables } from './mutations/help-pointer-create-mutation.graphql';
|
|
6
|
+
import { type HelpPointerDeleteMutationResponse, type HelpPointerDeleteMutationVariables } from './mutations/help-pointer-delete-mutation.graphql';
|
|
7
|
+
import { type HelpPointerUpdateMutationResponse, type HelpPointerUpdateMutationVariables } from './mutations/help-pointer-update-mutation.graphql';
|
|
8
|
+
import { type KudosDeleteMutationResponse } from './mutations/kudos-delete-mutation.graphql';
|
|
9
|
+
import { type RemoveTeamWatcherMutationResponse } from './mutations/remove-team-watcher.graphql';
|
|
10
|
+
import { type TagListQueryResponse, type TagListQueryVariables } from './queries/tag-list-query.graphql';
|
|
11
|
+
export declare class TeamCentralClient extends BaseGraphQlClient {
|
|
12
|
+
constructor(baseUrl: string, config: ClientConfig);
|
|
13
|
+
setBaseUrl(baseUrl: string): void;
|
|
14
|
+
addTeamWatcher(teamId: string, cloudId?: string): Promise<AddTeamWatcherMutationResponse>;
|
|
15
|
+
removeTeamWatcher(teamId: string, cloudId?: string): Promise<RemoveTeamWatcherMutationResponse>;
|
|
16
|
+
deleteKudos(id: string): Promise<KudosDeleteMutationResponse>;
|
|
17
|
+
queryTagList(variables: TagListQueryVariables): Promise<TagListQueryResponse>;
|
|
18
|
+
createTag(variables: CreateTagMutationVariables): Promise<CreateTagMutationResponse>;
|
|
19
|
+
createHelpPointer(variables: HelpPointerCreateMutationVariables): Promise<HelpPointerCreateMutationResponse>;
|
|
20
|
+
updateHelpPointer(variables: HelpPointerUpdateMutationVariables): Promise<HelpPointerUpdateMutationResponse>;
|
|
21
|
+
deleteHelpPointer(variables: HelpPointerDeleteMutationVariables): Promise<HelpPointerDeleteMutationResponse>;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: TeamCentralClient;
|
|
24
|
+
export default _default;
|
package/dist/types/services/team-central-client/mutations/help-pointer-create-mutation.graphql.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const HelpPointerCreateMutation: string;
|
|
2
|
+
export type HelpPointerCreateMutationVariables = {
|
|
3
|
+
cloudId: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: {
|
|
6
|
+
id?: string;
|
|
7
|
+
color: string;
|
|
8
|
+
shortName: string;
|
|
9
|
+
};
|
|
10
|
+
tagUuids?: Array<string | unknown>;
|
|
11
|
+
link?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
teamId?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
};
|
|
16
|
+
export type HelpPointerCreateMutationResponse = {
|
|
17
|
+
helpPointer: {
|
|
18
|
+
id: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
package/dist/types/services/team-central-client/mutations/help-pointer-update-mutation.graphql.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const HelpPointerUpdateMutation: string;
|
|
2
|
+
export type HelpPointerUpdateMutationVariables = {
|
|
3
|
+
id: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
teamId?: string;
|
|
6
|
+
newTeamName?: string;
|
|
7
|
+
icon?: {
|
|
8
|
+
id?: string;
|
|
9
|
+
color: string;
|
|
10
|
+
shortName: string;
|
|
11
|
+
};
|
|
12
|
+
tagUuids?: Array<string | unknown>;
|
|
13
|
+
link?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
type?: string;
|
|
16
|
+
};
|
|
17
|
+
export type HelpPointerUpdateMutationResponse = {
|
|
18
|
+
helpPointer: {
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const RemoveTeamWatcherMutation: string;
|
|
2
|
+
export type RemoveTeamWatcherMutationVariables = {
|
|
3
|
+
teamId: string;
|
|
4
|
+
cloudId?: string;
|
|
5
|
+
};
|
|
6
|
+
export type RemoveTeamWatcherMutationResponse = {
|
|
7
|
+
isWatching: boolean;
|
|
8
|
+
__typename: 'removeTeamWatcherPayload';
|
|
9
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const TagListQuery: string;
|
|
2
|
+
export type TagListQueryVariables = {
|
|
3
|
+
q: string;
|
|
4
|
+
cloudId: string;
|
|
5
|
+
first?: number;
|
|
6
|
+
};
|
|
7
|
+
export type TagListQueryResponse = {
|
|
8
|
+
edges: {
|
|
9
|
+
node: {
|
|
10
|
+
id: string;
|
|
11
|
+
uuid: string;
|
|
12
|
+
name: string;
|
|
13
|
+
projects: {
|
|
14
|
+
count: number;
|
|
15
|
+
};
|
|
16
|
+
goals: {
|
|
17
|
+
count: number;
|
|
18
|
+
};
|
|
19
|
+
helpLinks: {
|
|
20
|
+
count: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
@@ -10,6 +10,7 @@ import mutabilityClient from './mutability-client';
|
|
|
10
10
|
import objectResolverClient from './object-resolver-client';
|
|
11
11
|
import permsClient from './perms-client';
|
|
12
12
|
import publicApiClient from './public-api-client';
|
|
13
|
+
import teamCentralClient from './team-central-client';
|
|
13
14
|
import teamsInSlackClient from './teams-in-slack-client';
|
|
14
15
|
import { type ClientContextProps } from './types';
|
|
15
16
|
import userPreferencesClient from './user-preferences-client';
|
|
@@ -36,6 +37,7 @@ export declare class TeamsClient {
|
|
|
36
37
|
private readonly _teamsInSlackClient;
|
|
37
38
|
private readonly _collaborationGraphClient;
|
|
38
39
|
private readonly _identityClient;
|
|
40
|
+
private readonly _teamCentralClient;
|
|
39
41
|
constructor(
|
|
40
42
|
/**
|
|
41
43
|
* @param {ClientContextProps} context - Context including CloudId & OrgId to be used for all requests
|
|
@@ -51,6 +53,7 @@ export declare class TeamsClient {
|
|
|
51
53
|
* Sets context including CloudId & OrgId to be used for all requests
|
|
52
54
|
*/
|
|
53
55
|
setContext(context: ClientContextProps): void;
|
|
56
|
+
setTeamCentralContext(baseUrl: string, context: ClientContextProps): void;
|
|
54
57
|
/**
|
|
55
58
|
* @private
|
|
56
59
|
* @deprecated use setBaseUrl instead
|
|
@@ -311,6 +314,14 @@ export declare class TeamsClient {
|
|
|
311
314
|
*/
|
|
312
315
|
updateUser(...args: Parameters<typeof identityClient.updateUser>): Promise<AwaitedReturn<typeof identityClient.updateUser>>;
|
|
313
316
|
updateUserAvatar(...args: Parameters<typeof identityClient.updateUserAvatar>): Promise<AwaitedReturn<typeof identityClient.updateUserAvatar>>;
|
|
317
|
+
addTeamWatcher(...args: Parameters<typeof teamCentralClient.addTeamWatcher>): Promise<AwaitedReturn<typeof teamCentralClient.addTeamWatcher>>;
|
|
318
|
+
removeTeamWatcher(...args: Parameters<typeof teamCentralClient.removeTeamWatcher>): Promise<AwaitedReturn<typeof teamCentralClient.removeTeamWatcher>>;
|
|
319
|
+
deleteKudos(...args: Parameters<typeof teamCentralClient.deleteKudos>): Promise<AwaitedReturn<typeof teamCentralClient.deleteKudos>>;
|
|
320
|
+
queryTagList(...args: Parameters<typeof teamCentralClient.queryTagList>): Promise<AwaitedReturn<typeof teamCentralClient.queryTagList>>;
|
|
321
|
+
createTag(...args: Parameters<typeof teamCentralClient.createTag>): Promise<AwaitedReturn<typeof teamCentralClient.createTag>>;
|
|
322
|
+
createHelpPointer(...args: Parameters<typeof teamCentralClient.createHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.createHelpPointer>>;
|
|
323
|
+
updateHelpPointer(...args: Parameters<typeof teamCentralClient.updateHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.updateHelpPointer>>;
|
|
324
|
+
deleteHelpPointer(...args: Parameters<typeof teamCentralClient.deleteHelpPointer>): Promise<AwaitedReturn<typeof teamCentralClient.deleteHelpPointer>>;
|
|
314
325
|
}
|
|
315
326
|
export declare const teamsClient: TeamsClient;
|
|
316
327
|
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ClientConfig } from '../base-client';
|
|
2
|
+
import { BaseGraphQlClient } from '../graphql-client';
|
|
3
|
+
import { type AddTeamWatcherMutationResponse } from './mutations/add-team-watcher.graphql';
|
|
4
|
+
import { type CreateTagMutationResponse, type CreateTagMutationVariables } from './mutations/create-tag-mutation.graphql';
|
|
5
|
+
import { type HelpPointerCreateMutationResponse, type HelpPointerCreateMutationVariables } from './mutations/help-pointer-create-mutation.graphql';
|
|
6
|
+
import { type HelpPointerDeleteMutationResponse, type HelpPointerDeleteMutationVariables } from './mutations/help-pointer-delete-mutation.graphql';
|
|
7
|
+
import { type HelpPointerUpdateMutationResponse, type HelpPointerUpdateMutationVariables } from './mutations/help-pointer-update-mutation.graphql';
|
|
8
|
+
import { type KudosDeleteMutationResponse } from './mutations/kudos-delete-mutation.graphql';
|
|
9
|
+
import { type RemoveTeamWatcherMutationResponse } from './mutations/remove-team-watcher.graphql';
|
|
10
|
+
import { type TagListQueryResponse, type TagListQueryVariables } from './queries/tag-list-query.graphql';
|
|
11
|
+
export declare class TeamCentralClient extends BaseGraphQlClient {
|
|
12
|
+
constructor(baseUrl: string, config: ClientConfig);
|
|
13
|
+
setBaseUrl(baseUrl: string): void;
|
|
14
|
+
addTeamWatcher(teamId: string, cloudId?: string): Promise<AddTeamWatcherMutationResponse>;
|
|
15
|
+
removeTeamWatcher(teamId: string, cloudId?: string): Promise<RemoveTeamWatcherMutationResponse>;
|
|
16
|
+
deleteKudos(id: string): Promise<KudosDeleteMutationResponse>;
|
|
17
|
+
queryTagList(variables: TagListQueryVariables): Promise<TagListQueryResponse>;
|
|
18
|
+
createTag(variables: CreateTagMutationVariables): Promise<CreateTagMutationResponse>;
|
|
19
|
+
createHelpPointer(variables: HelpPointerCreateMutationVariables): Promise<HelpPointerCreateMutationResponse>;
|
|
20
|
+
updateHelpPointer(variables: HelpPointerUpdateMutationVariables): Promise<HelpPointerUpdateMutationResponse>;
|
|
21
|
+
deleteHelpPointer(variables: HelpPointerDeleteMutationVariables): Promise<HelpPointerDeleteMutationResponse>;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: TeamCentralClient;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const HelpPointerCreateMutation: string;
|
|
2
|
+
export type HelpPointerCreateMutationVariables = {
|
|
3
|
+
cloudId: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: {
|
|
6
|
+
id?: string;
|
|
7
|
+
color: string;
|
|
8
|
+
shortName: string;
|
|
9
|
+
};
|
|
10
|
+
tagUuids?: Array<string | unknown>;
|
|
11
|
+
link?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
teamId?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
};
|
|
16
|
+
export type HelpPointerCreateMutationResponse = {
|
|
17
|
+
helpPointer: {
|
|
18
|
+
id: string;
|
|
19
|
+
};
|
|
20
|
+
};
|