@atlaskit/teams-client 4.13.0 → 4.14.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/common/utils/permissions/constants.js +5 -1
  3. package/dist/cjs/common/utils/ufo/index.js +2 -2
  4. package/dist/cjs/services/hooks/use-teams-client-setup.js +12 -0
  5. package/dist/cjs/services/main.js +69 -48
  6. package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
  7. package/dist/cjs/services/team-central-client/index.js +99 -66
  8. package/dist/cjs/services/team-central-client/queries/is-team-watcher.graphql.js +12 -0
  9. package/dist/es2019/common/utils/permissions/constants.js +4 -1
  10. package/dist/es2019/common/utils/ufo/index.js +2 -2
  11. package/dist/es2019/services/hooks/use-teams-client-setup.js +8 -1
  12. package/dist/es2019/services/main.js +3 -0
  13. package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
  14. package/dist/es2019/services/team-central-client/index.js +13 -0
  15. package/dist/es2019/services/team-central-client/queries/is-team-watcher.graphql.js +9 -0
  16. package/dist/esm/common/utils/permissions/constants.js +5 -1
  17. package/dist/esm/common/utils/ufo/index.js +2 -2
  18. package/dist/esm/services/hooks/use-teams-client-setup.js +12 -1
  19. package/dist/esm/services/main.js +69 -48
  20. package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
  21. package/dist/esm/services/team-central-client/index.js +99 -66
  22. package/dist/esm/services/team-central-client/queries/is-team-watcher.graphql.js +5 -0
  23. package/dist/types/services/hooks/use-teams-client-setup.d.ts +3 -1
  24. package/dist/types/services/main.d.ts +1 -0
  25. package/dist/types/services/team-central-client/index.d.ts +2 -0
  26. package/dist/types/services/team-central-client/queries/is-team-watcher.graphql.d.ts +8 -0
  27. package/dist/types-ts4.5/services/hooks/use-teams-client-setup.d.ts +3 -1
  28. package/dist/types-ts4.5/services/main.d.ts +1 -0
  29. package/dist/types-ts4.5/services/team-central-client/index.d.ts +2 -0
  30. package/dist/types-ts4.5/services/team-central-client/queries/is-team-watcher.graphql.d.ts +8 -0
  31. package/package.json +5 -2
@@ -2347,147 +2347,168 @@ export var TeamsClient = /*#__PURE__*/function () {
2347
2347
  return addTeamWatcher;
2348
2348
  }()
2349
2349
  }, {
2350
- key: "removeTeamWatcher",
2350
+ key: "isTeamWatcher",
2351
2351
  value: function () {
2352
- var _removeTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65() {
2352
+ var _isTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee65() {
2353
2353
  var _this$_teamCentralCli2;
2354
2354
  var _args65 = arguments;
2355
2355
  return _regeneratorRuntime.wrap(function _callee65$(_context65) {
2356
2356
  while (1) switch (_context65.prev = _context65.next) {
2357
2357
  case 0:
2358
- return _context65.abrupt("return", (_this$_teamCentralCli2 = this._teamCentralClient).removeTeamWatcher.apply(_this$_teamCentralCli2, _args65));
2358
+ return _context65.abrupt("return", (_this$_teamCentralCli2 = this._teamCentralClient).isTeamWatcher.apply(_this$_teamCentralCli2, _args65));
2359
2359
  case 1:
2360
2360
  case "end":
2361
2361
  return _context65.stop();
2362
2362
  }
2363
2363
  }, _callee65, this);
2364
2364
  }));
2365
- function removeTeamWatcher() {
2366
- return _removeTeamWatcher.apply(this, arguments);
2365
+ function isTeamWatcher() {
2366
+ return _isTeamWatcher.apply(this, arguments);
2367
2367
  }
2368
- return removeTeamWatcher;
2368
+ return isTeamWatcher;
2369
2369
  }()
2370
2370
  }, {
2371
- key: "deleteKudos",
2371
+ key: "removeTeamWatcher",
2372
2372
  value: function () {
2373
- var _deleteKudos = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66() {
2373
+ var _removeTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee66() {
2374
2374
  var _this$_teamCentralCli3;
2375
2375
  var _args66 = arguments;
2376
2376
  return _regeneratorRuntime.wrap(function _callee66$(_context66) {
2377
2377
  while (1) switch (_context66.prev = _context66.next) {
2378
2378
  case 0:
2379
- return _context66.abrupt("return", (_this$_teamCentralCli3 = this._teamCentralClient).deleteKudos.apply(_this$_teamCentralCli3, _args66));
2379
+ return _context66.abrupt("return", (_this$_teamCentralCli3 = this._teamCentralClient).removeTeamWatcher.apply(_this$_teamCentralCli3, _args66));
2380
2380
  case 1:
2381
2381
  case "end":
2382
2382
  return _context66.stop();
2383
2383
  }
2384
2384
  }, _callee66, this);
2385
2385
  }));
2386
- function deleteKudos() {
2387
- return _deleteKudos.apply(this, arguments);
2386
+ function removeTeamWatcher() {
2387
+ return _removeTeamWatcher.apply(this, arguments);
2388
2388
  }
2389
- return deleteKudos;
2389
+ return removeTeamWatcher;
2390
2390
  }()
2391
2391
  }, {
2392
- key: "queryTagList",
2392
+ key: "deleteKudos",
2393
2393
  value: function () {
2394
- var _queryTagList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67() {
2394
+ var _deleteKudos = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee67() {
2395
2395
  var _this$_teamCentralCli4;
2396
2396
  var _args67 = arguments;
2397
2397
  return _regeneratorRuntime.wrap(function _callee67$(_context67) {
2398
2398
  while (1) switch (_context67.prev = _context67.next) {
2399
2399
  case 0:
2400
- return _context67.abrupt("return", (_this$_teamCentralCli4 = this._teamCentralClient).queryTagList.apply(_this$_teamCentralCli4, _args67));
2400
+ return _context67.abrupt("return", (_this$_teamCentralCli4 = this._teamCentralClient).deleteKudos.apply(_this$_teamCentralCli4, _args67));
2401
2401
  case 1:
2402
2402
  case "end":
2403
2403
  return _context67.stop();
2404
2404
  }
2405
2405
  }, _callee67, this);
2406
2406
  }));
2407
- function queryTagList() {
2408
- return _queryTagList.apply(this, arguments);
2407
+ function deleteKudos() {
2408
+ return _deleteKudos.apply(this, arguments);
2409
2409
  }
2410
- return queryTagList;
2410
+ return deleteKudos;
2411
2411
  }()
2412
2412
  }, {
2413
- key: "createTag",
2413
+ key: "queryTagList",
2414
2414
  value: function () {
2415
- var _createTag = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68() {
2415
+ var _queryTagList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee68() {
2416
2416
  var _this$_teamCentralCli5;
2417
2417
  var _args68 = arguments;
2418
2418
  return _regeneratorRuntime.wrap(function _callee68$(_context68) {
2419
2419
  while (1) switch (_context68.prev = _context68.next) {
2420
2420
  case 0:
2421
- return _context68.abrupt("return", (_this$_teamCentralCli5 = this._teamCentralClient).createTag.apply(_this$_teamCentralCli5, _args68));
2421
+ return _context68.abrupt("return", (_this$_teamCentralCli5 = this._teamCentralClient).queryTagList.apply(_this$_teamCentralCli5, _args68));
2422
2422
  case 1:
2423
2423
  case "end":
2424
2424
  return _context68.stop();
2425
2425
  }
2426
2426
  }, _callee68, this);
2427
2427
  }));
2428
- function createTag() {
2429
- return _createTag.apply(this, arguments);
2428
+ function queryTagList() {
2429
+ return _queryTagList.apply(this, arguments);
2430
2430
  }
2431
- return createTag;
2431
+ return queryTagList;
2432
2432
  }()
2433
2433
  }, {
2434
- key: "createHelpPointer",
2434
+ key: "createTag",
2435
2435
  value: function () {
2436
- var _createHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69() {
2436
+ var _createTag = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee69() {
2437
2437
  var _this$_teamCentralCli6;
2438
2438
  var _args69 = arguments;
2439
2439
  return _regeneratorRuntime.wrap(function _callee69$(_context69) {
2440
2440
  while (1) switch (_context69.prev = _context69.next) {
2441
2441
  case 0:
2442
- return _context69.abrupt("return", (_this$_teamCentralCli6 = this._teamCentralClient).createHelpPointer.apply(_this$_teamCentralCli6, _args69));
2442
+ return _context69.abrupt("return", (_this$_teamCentralCli6 = this._teamCentralClient).createTag.apply(_this$_teamCentralCli6, _args69));
2443
2443
  case 1:
2444
2444
  case "end":
2445
2445
  return _context69.stop();
2446
2446
  }
2447
2447
  }, _callee69, this);
2448
2448
  }));
2449
- function createHelpPointer() {
2450
- return _createHelpPointer.apply(this, arguments);
2449
+ function createTag() {
2450
+ return _createTag.apply(this, arguments);
2451
2451
  }
2452
- return createHelpPointer;
2452
+ return createTag;
2453
2453
  }()
2454
2454
  }, {
2455
- key: "updateHelpPointer",
2455
+ key: "createHelpPointer",
2456
2456
  value: function () {
2457
- var _updateHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70() {
2457
+ var _createHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee70() {
2458
2458
  var _this$_teamCentralCli7;
2459
2459
  var _args70 = arguments;
2460
2460
  return _regeneratorRuntime.wrap(function _callee70$(_context70) {
2461
2461
  while (1) switch (_context70.prev = _context70.next) {
2462
2462
  case 0:
2463
- return _context70.abrupt("return", (_this$_teamCentralCli7 = this._teamCentralClient).updateHelpPointer.apply(_this$_teamCentralCli7, _args70));
2463
+ return _context70.abrupt("return", (_this$_teamCentralCli7 = this._teamCentralClient).createHelpPointer.apply(_this$_teamCentralCli7, _args70));
2464
2464
  case 1:
2465
2465
  case "end":
2466
2466
  return _context70.stop();
2467
2467
  }
2468
2468
  }, _callee70, this);
2469
2469
  }));
2470
- function updateHelpPointer() {
2471
- return _updateHelpPointer.apply(this, arguments);
2470
+ function createHelpPointer() {
2471
+ return _createHelpPointer.apply(this, arguments);
2472
2472
  }
2473
- return updateHelpPointer;
2473
+ return createHelpPointer;
2474
2474
  }()
2475
2475
  }, {
2476
- key: "deleteHelpPointer",
2476
+ key: "updateHelpPointer",
2477
2477
  value: function () {
2478
- var _deleteHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71() {
2478
+ var _updateHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee71() {
2479
2479
  var _this$_teamCentralCli8;
2480
2480
  var _args71 = arguments;
2481
2481
  return _regeneratorRuntime.wrap(function _callee71$(_context71) {
2482
2482
  while (1) switch (_context71.prev = _context71.next) {
2483
2483
  case 0:
2484
- return _context71.abrupt("return", (_this$_teamCentralCli8 = this._teamCentralClient).deleteHelpPointer.apply(_this$_teamCentralCli8, _args71));
2484
+ return _context71.abrupt("return", (_this$_teamCentralCli8 = this._teamCentralClient).updateHelpPointer.apply(_this$_teamCentralCli8, _args71));
2485
2485
  case 1:
2486
2486
  case "end":
2487
2487
  return _context71.stop();
2488
2488
  }
2489
2489
  }, _callee71, this);
2490
2490
  }));
2491
+ function updateHelpPointer() {
2492
+ return _updateHelpPointer.apply(this, arguments);
2493
+ }
2494
+ return updateHelpPointer;
2495
+ }()
2496
+ }, {
2497
+ key: "deleteHelpPointer",
2498
+ value: function () {
2499
+ var _deleteHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72() {
2500
+ var _this$_teamCentralCli9;
2501
+ var _args72 = arguments;
2502
+ return _regeneratorRuntime.wrap(function _callee72$(_context72) {
2503
+ while (1) switch (_context72.prev = _context72.next) {
2504
+ case 0:
2505
+ return _context72.abrupt("return", (_this$_teamCentralCli9 = this._teamCentralClient).deleteHelpPointer.apply(_this$_teamCentralCli9, _args72));
2506
+ case 1:
2507
+ case "end":
2508
+ return _context72.stop();
2509
+ }
2510
+ }, _callee72, this);
2511
+ }));
2491
2512
  function deleteHelpPointer() {
2492
2513
  return _deleteHelpPointer.apply(this, arguments);
2493
2514
  }
@@ -2496,27 +2517,27 @@ export var TeamsClient = /*#__PURE__*/function () {
2496
2517
  }, {
2497
2518
  key: "getUserTenure",
2498
2519
  value: function () {
2499
- var _getUserTenure = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee72() {
2520
+ var _getUserTenure = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee73() {
2500
2521
  var _this65 = this;
2501
2522
  var _len53,
2502
2523
  args,
2503
2524
  _key53,
2504
- _args72 = arguments;
2505
- return _regeneratorRuntime.wrap(function _callee72$(_context72) {
2506
- while (1) switch (_context72.prev = _context72.next) {
2525
+ _args73 = arguments;
2526
+ return _regeneratorRuntime.wrap(function _callee73$(_context73) {
2527
+ while (1) switch (_context73.prev = _context73.next) {
2507
2528
  case 0:
2508
- for (_len53 = _args72.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) {
2509
- args[_key53] = _args72[_key53];
2529
+ for (_len53 = _args73.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) {
2530
+ args[_key53] = _args73[_key53];
2510
2531
  }
2511
- return _context72.abrupt("return", this.measurePerformance('getUserTenure', function () {
2532
+ return _context73.abrupt("return", this.measurePerformance('getUserTenure', function () {
2512
2533
  var _this65$_replinesClie;
2513
2534
  return (_this65$_replinesClie = _this65._replinesClient).getUserTenure.apply(_this65$_replinesClie, args);
2514
2535
  }));
2515
2536
  case 2:
2516
2537
  case "end":
2517
- return _context72.stop();
2538
+ return _context73.stop();
2518
2539
  }
2519
- }, _callee72, this);
2540
+ }, _callee73, this);
2520
2541
  }));
2521
2542
  function getUserTenure() {
2522
2543
  return _getUserTenure.apply(this, arguments);
@@ -29,7 +29,7 @@ export function getSentryConfig(options) {
29
29
  return _objectSpread(_objectSpread(_objectSpread({}, otherOptions), DEFAULT_SENTRY_CONFIG), {}, {
30
30
  // Standalone __VERSION__ is set from `bin/set-release-version.sh`
31
31
  // when building to deploy to production
32
- release: "".concat("@atlaskit/teams-client", "@").concat("4.12.0") ||
32
+ release: "".concat("@atlaskit/teams-client", "@").concat("0.0.0-development") ||
33
33
  // @ts-ignore Jira - window.BUILD_KEY
34
34
  window.BUILD_KEY || ( // @ts-ignore Confluence - window.__buildInfo
35
35
  (_window$__buildInfo = window.__buildInfo) === null || _window$__buildInfo === void 0 ? void 0 : _window$__buildInfo.FRONTEND_VERSION) || '---',
@@ -17,6 +17,7 @@ import { HelpPointerDeleteMutation } from './mutations/help-pointer-delete-mutat
17
17
  import { HelpPointerUpdateMutation } from './mutations/help-pointer-update-mutation.graphql';
18
18
  import { KudosDeleteMutation } from './mutations/kudos-delete-mutation.graphql';
19
19
  import { RemoveTeamWatcherMutation } from './mutations/remove-team-watcher.graphql';
20
+ import { IsTeamWatcherQuery } from './queries/is-team-watcher.graphql';
20
21
  import { TagListQuery } from './queries/tag-list-query.graphql';
21
22
  import { getTeamCentralGraphqlUrl, getUnshardedTeamCentralGraphqlUrl } from './utils';
22
23
  export var TeamCentralClient = /*#__PURE__*/function (_BaseGraphQlClient) {
@@ -34,241 +35,273 @@ export var TeamCentralClient = /*#__PURE__*/function (_BaseGraphQlClient) {
34
35
  this.setServiceUrl(cloudId && cloudId !== 'None' ? getTeamCentralGraphqlUrl(baseUrl, cloudId) : getUnshardedTeamCentralGraphqlUrl(baseUrl));
35
36
  }
36
37
  }, {
37
- key: "addTeamWatcher",
38
+ key: "isTeamWatcher",
38
39
  value: function () {
39
- var _addTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(teamId, cloudId) {
40
+ var _isTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(teamId, cloudId) {
40
41
  var response;
41
42
  return _regeneratorRuntime.wrap(function _callee$(_context) {
42
43
  while (1) switch (_context.prev = _context.next) {
43
44
  case 0:
44
45
  _context.next = 2;
45
46
  return this.makeGraphQLRequest({
46
- query: AddTeamWatcherMutation,
47
+ query: IsTeamWatcherQuery,
47
48
  variables: {
48
- teamId: teamId,
49
- cloudId: cloudId
49
+ teamId: teamId.replace('ari:cloud:identity::team/', ''),
50
+ cloudId: cloudId || 'None'
50
51
  }
51
52
  }, {
52
- operationName: 'addTeamWatcher'
53
+ operationName: 'isTeamWatcher'
53
54
  });
54
55
  case 2:
55
56
  response = _context.sent;
56
- return _context.abrupt("return", response.addTeamWatcher);
57
+ return _context.abrupt("return", response.isTeamWatcher);
57
58
  case 4:
58
59
  case "end":
59
60
  return _context.stop();
60
61
  }
61
62
  }, _callee, this);
62
63
  }));
63
- function addTeamWatcher(_x, _x2) {
64
- return _addTeamWatcher.apply(this, arguments);
64
+ function isTeamWatcher(_x, _x2) {
65
+ return _isTeamWatcher.apply(this, arguments);
65
66
  }
66
- return addTeamWatcher;
67
+ return isTeamWatcher;
67
68
  }()
68
69
  }, {
69
- key: "removeTeamWatcher",
70
+ key: "addTeamWatcher",
70
71
  value: function () {
71
- var _removeTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(teamId, cloudId) {
72
+ var _addTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(teamId, cloudId) {
72
73
  var response;
73
74
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
74
75
  while (1) switch (_context2.prev = _context2.next) {
75
76
  case 0:
76
77
  _context2.next = 2;
77
78
  return this.makeGraphQLRequest({
78
- query: RemoveTeamWatcherMutation,
79
+ query: AddTeamWatcherMutation,
79
80
  variables: {
80
81
  teamId: teamId,
81
82
  cloudId: cloudId
82
83
  }
83
84
  }, {
84
- operationName: 'removeTeamWatcher'
85
+ operationName: 'addTeamWatcher'
85
86
  });
86
87
  case 2:
87
88
  response = _context2.sent;
88
- return _context2.abrupt("return", response.removeTeamWatcher);
89
+ return _context2.abrupt("return", response.addTeamWatcher);
89
90
  case 4:
90
91
  case "end":
91
92
  return _context2.stop();
92
93
  }
93
94
  }, _callee2, this);
94
95
  }));
95
- function removeTeamWatcher(_x3, _x4) {
96
- return _removeTeamWatcher.apply(this, arguments);
96
+ function addTeamWatcher(_x3, _x4) {
97
+ return _addTeamWatcher.apply(this, arguments);
97
98
  }
98
- return removeTeamWatcher;
99
+ return addTeamWatcher;
99
100
  }()
100
101
  }, {
101
- key: "deleteKudos",
102
+ key: "removeTeamWatcher",
102
103
  value: function () {
103
- var _deleteKudos = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id) {
104
+ var _removeTeamWatcher = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(teamId, cloudId) {
104
105
  var response;
105
106
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
106
107
  while (1) switch (_context3.prev = _context3.next) {
107
108
  case 0:
108
109
  _context3.next = 2;
109
110
  return this.makeGraphQLRequest({
110
- query: KudosDeleteMutation,
111
+ query: RemoveTeamWatcherMutation,
111
112
  variables: {
112
- id: id
113
+ teamId: teamId,
114
+ cloudId: cloudId
113
115
  }
114
116
  }, {
115
- operationName: 'DeleteKudos'
117
+ operationName: 'removeTeamWatcher'
116
118
  });
117
119
  case 2:
118
120
  response = _context3.sent;
119
- return _context3.abrupt("return", response.deleteKudos);
121
+ return _context3.abrupt("return", response.removeTeamWatcher);
120
122
  case 4:
121
123
  case "end":
122
124
  return _context3.stop();
123
125
  }
124
126
  }, _callee3, this);
125
127
  }));
126
- function deleteKudos(_x5) {
127
- return _deleteKudos.apply(this, arguments);
128
+ function removeTeamWatcher(_x5, _x6) {
129
+ return _removeTeamWatcher.apply(this, arguments);
128
130
  }
129
- return deleteKudos;
131
+ return removeTeamWatcher;
130
132
  }()
131
133
  }, {
132
- key: "queryTagList",
134
+ key: "deleteKudos",
133
135
  value: function () {
134
- var _queryTagList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(variables) {
136
+ var _deleteKudos = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(id) {
135
137
  var response;
136
138
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
137
139
  while (1) switch (_context4.prev = _context4.next) {
138
140
  case 0:
139
141
  _context4.next = 2;
140
142
  return this.makeGraphQLRequest({
141
- query: TagListQuery,
142
- variables: variables
143
+ query: KudosDeleteMutation,
144
+ variables: {
145
+ id: id
146
+ }
143
147
  }, {
144
- operationName: 'TagListByCloudId'
148
+ operationName: 'DeleteKudos'
145
149
  });
146
150
  case 2:
147
151
  response = _context4.sent;
148
- return _context4.abrupt("return", response.tagSearchByCloudId);
152
+ return _context4.abrupt("return", response.deleteKudos);
149
153
  case 4:
150
154
  case "end":
151
155
  return _context4.stop();
152
156
  }
153
157
  }, _callee4, this);
154
158
  }));
155
- function queryTagList(_x6) {
156
- return _queryTagList.apply(this, arguments);
159
+ function deleteKudos(_x7) {
160
+ return _deleteKudos.apply(this, arguments);
157
161
  }
158
- return queryTagList;
162
+ return deleteKudos;
159
163
  }()
160
164
  }, {
161
- key: "createTag",
165
+ key: "queryTagList",
162
166
  value: function () {
163
- var _createTag = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(variables) {
167
+ var _queryTagList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(variables) {
164
168
  var response;
165
169
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
166
170
  while (1) switch (_context5.prev = _context5.next) {
167
171
  case 0:
168
172
  _context5.next = 2;
169
173
  return this.makeGraphQLRequest({
170
- query: CreateTagMutation,
174
+ query: TagListQuery,
171
175
  variables: variables
172
176
  }, {
173
- operationName: 'createTagForCloudId'
177
+ operationName: 'TagListByCloudId'
174
178
  });
175
179
  case 2:
176
180
  response = _context5.sent;
177
- return _context5.abrupt("return", response.createTagForCloudId);
181
+ return _context5.abrupt("return", response.tagSearchByCloudId);
178
182
  case 4:
179
183
  case "end":
180
184
  return _context5.stop();
181
185
  }
182
186
  }, _callee5, this);
183
187
  }));
184
- function createTag(_x7) {
185
- return _createTag.apply(this, arguments);
188
+ function queryTagList(_x8) {
189
+ return _queryTagList.apply(this, arguments);
186
190
  }
187
- return createTag;
191
+ return queryTagList;
188
192
  }()
189
193
  }, {
190
- key: "createHelpPointer",
194
+ key: "createTag",
191
195
  value: function () {
192
- var _createHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(variables) {
196
+ var _createTag = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(variables) {
193
197
  var response;
194
198
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
195
199
  while (1) switch (_context6.prev = _context6.next) {
196
200
  case 0:
197
201
  _context6.next = 2;
198
202
  return this.makeGraphQLRequest({
199
- query: HelpPointerCreateMutation,
203
+ query: CreateTagMutation,
200
204
  variables: variables
201
205
  }, {
202
- operationName: 'CreateHelpPointer'
206
+ operationName: 'createTagForCloudId'
203
207
  });
204
208
  case 2:
205
209
  response = _context6.sent;
206
- return _context6.abrupt("return", response.createHelpPointer);
210
+ return _context6.abrupt("return", response.createTagForCloudId);
207
211
  case 4:
208
212
  case "end":
209
213
  return _context6.stop();
210
214
  }
211
215
  }, _callee6, this);
212
216
  }));
213
- function createHelpPointer(_x8) {
214
- return _createHelpPointer.apply(this, arguments);
217
+ function createTag(_x9) {
218
+ return _createTag.apply(this, arguments);
215
219
  }
216
- return createHelpPointer;
220
+ return createTag;
217
221
  }()
218
222
  }, {
219
- key: "updateHelpPointer",
223
+ key: "createHelpPointer",
220
224
  value: function () {
221
- var _updateHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(variables) {
225
+ var _createHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(variables) {
222
226
  var response;
223
227
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
224
228
  while (1) switch (_context7.prev = _context7.next) {
225
229
  case 0:
226
230
  _context7.next = 2;
227
231
  return this.makeGraphQLRequest({
228
- query: HelpPointerUpdateMutation,
232
+ query: HelpPointerCreateMutation,
229
233
  variables: variables
230
234
  }, {
231
- operationName: 'UpdateHelpPointer'
235
+ operationName: 'CreateHelpPointer'
232
236
  });
233
237
  case 2:
234
238
  response = _context7.sent;
235
- return _context7.abrupt("return", response.updateHelpPointer);
239
+ return _context7.abrupt("return", response.createHelpPointer);
236
240
  case 4:
237
241
  case "end":
238
242
  return _context7.stop();
239
243
  }
240
244
  }, _callee7, this);
241
245
  }));
242
- function updateHelpPointer(_x9) {
243
- return _updateHelpPointer.apply(this, arguments);
246
+ function createHelpPointer(_x0) {
247
+ return _createHelpPointer.apply(this, arguments);
244
248
  }
245
- return updateHelpPointer;
249
+ return createHelpPointer;
246
250
  }()
247
251
  }, {
248
- key: "deleteHelpPointer",
252
+ key: "updateHelpPointer",
249
253
  value: function () {
250
- var _deleteHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(variables) {
254
+ var _updateHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(variables) {
251
255
  var response;
252
256
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
253
257
  while (1) switch (_context8.prev = _context8.next) {
254
258
  case 0:
255
259
  _context8.next = 2;
256
260
  return this.makeGraphQLRequest({
257
- query: HelpPointerDeleteMutation,
261
+ query: HelpPointerUpdateMutation,
258
262
  variables: variables
259
263
  }, {
260
- operationName: 'DeleteHelpPointer'
264
+ operationName: 'UpdateHelpPointer'
261
265
  });
262
266
  case 2:
263
267
  response = _context8.sent;
264
- return _context8.abrupt("return", response.deleteHelpPointer);
268
+ return _context8.abrupt("return", response.updateHelpPointer);
265
269
  case 4:
266
270
  case "end":
267
271
  return _context8.stop();
268
272
  }
269
273
  }, _callee8, this);
270
274
  }));
271
- function deleteHelpPointer(_x0) {
275
+ function updateHelpPointer(_x1) {
276
+ return _updateHelpPointer.apply(this, arguments);
277
+ }
278
+ return updateHelpPointer;
279
+ }()
280
+ }, {
281
+ key: "deleteHelpPointer",
282
+ value: function () {
283
+ var _deleteHelpPointer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(variables) {
284
+ var response;
285
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
286
+ while (1) switch (_context9.prev = _context9.next) {
287
+ case 0:
288
+ _context9.next = 2;
289
+ return this.makeGraphQLRequest({
290
+ query: HelpPointerDeleteMutation,
291
+ variables: variables
292
+ }, {
293
+ operationName: 'DeleteHelpPointer'
294
+ });
295
+ case 2:
296
+ response = _context9.sent;
297
+ return _context9.abrupt("return", response.deleteHelpPointer);
298
+ case 4:
299
+ case "end":
300
+ return _context9.stop();
301
+ }
302
+ }, _callee9, this);
303
+ }));
304
+ function deleteHelpPointer(_x10) {
272
305
  return _deleteHelpPointer.apply(this, arguments);
273
306
  }
274
307
  return deleteHelpPointer;
@@ -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 IsTeamWatcherQuery = print(gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tquery IsTeamWatcher($teamId: String!, $cloudId: String!) {\n\t\tisTeamWatcher: teamByTeamId(teamId: $teamId, cloudId: $cloudId) {\n\t\t\twatching\n\t\t}\n\t}\n"]))));
@@ -8,5 +8,7 @@ type TeamsClientSetupProps = {
8
8
  orgId?: string;
9
9
  principalUserId?: string;
10
10
  };
11
- export declare const useTeamsClientSetupNext: ({ stargateRoot, cloudId, orgId, principalUserId, }: TeamsClientSetupProps) => void;
11
+ export declare const useTeamsClientSetupNext: ({ stargateRoot, cloudId, orgId, principalUserId, }: TeamsClientSetupProps) => {
12
+ isClientReady: boolean;
13
+ };
12
14
  export {};
@@ -372,6 +372,7 @@ export declare class TeamsClient {
372
372
  updateUser(...args: Parameters<typeof identityClient.updateUser>): Promise<AwaitedReturn<typeof identityClient.updateUser>>;
373
373
  updateUserAvatar(...args: Parameters<typeof identityClient.updateUserAvatar>): Promise<AwaitedReturn<typeof identityClient.updateUserAvatar>>;
374
374
  addTeamWatcher(...args: Parameters<typeof teamCentralClient.addTeamWatcher>): Promise<AwaitedReturn<typeof teamCentralClient.addTeamWatcher>>;
375
+ isTeamWatcher(...args: Parameters<typeof teamCentralClient.isTeamWatcher>): Promise<AwaitedReturn<typeof teamCentralClient.isTeamWatcher>>;
375
376
  removeTeamWatcher(...args: Parameters<typeof teamCentralClient.removeTeamWatcher>): Promise<AwaitedReturn<typeof teamCentralClient.removeTeamWatcher>>;
376
377
  deleteKudos(...args: Parameters<typeof teamCentralClient.deleteKudos>): Promise<AwaitedReturn<typeof teamCentralClient.deleteKudos>>;
377
378
  queryTagList(...args: Parameters<typeof teamCentralClient.queryTagList>): Promise<AwaitedReturn<typeof teamCentralClient.queryTagList>>;
@@ -7,10 +7,12 @@ import { type HelpPointerDeleteMutationResponse, type HelpPointerDeleteMutationV
7
7
  import { type HelpPointerUpdateMutationResponse, type HelpPointerUpdateMutationVariables } from './mutations/help-pointer-update-mutation.graphql';
8
8
  import { type KudosDeleteMutationResponse } from './mutations/kudos-delete-mutation.graphql';
9
9
  import { type RemoveTeamWatcherMutationResponse } from './mutations/remove-team-watcher.graphql';
10
+ import { type IsTeamWatcherQueryResponse } from './queries/is-team-watcher.graphql';
10
11
  import { type TagListQueryResponse, type TagListQueryVariables } from './queries/tag-list-query.graphql';
11
12
  export declare class TeamCentralClient extends BaseGraphQlClient {
12
13
  constructor(baseUrl: string, config: ClientConfig);
13
14
  setBaseUrl(baseUrl: string): void;
15
+ isTeamWatcher(teamId: string, cloudId?: string): Promise<IsTeamWatcherQueryResponse>;
14
16
  addTeamWatcher(teamId: string, cloudId?: string): Promise<AddTeamWatcherMutationResponse>;
15
17
  removeTeamWatcher(teamId: string, cloudId?: string): Promise<RemoveTeamWatcherMutationResponse>;
16
18
  deleteKudos(id: string): Promise<KudosDeleteMutationResponse>;
@@ -0,0 +1,8 @@
1
+ export declare const IsTeamWatcherQuery: string;
2
+ export type IsTeamWatcherQueryVariables = {
3
+ teamId: string;
4
+ cloudId: string;
5
+ };
6
+ export type IsTeamWatcherQueryResponse = {
7
+ watching: boolean;
8
+ };