@atlaskit/teams-client 4.13.1 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/teams-client
2
2
 
3
+ ## 4.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`9dd1cc0756413`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9dd1cc0756413) -
8
+ Created agents tab for the new profile page
9
+
3
10
  ## 4.13.1
4
11
 
5
12
  ### Patch Changes
@@ -56,13 +56,17 @@ var SCIMSyncTeamPermissions = exports.SCIMSyncTeamPermissions = function SCIMSyn
56
56
  };
57
57
  };
58
58
  var getPermissionMap = exports.getPermissionMap = function getPermissionMap(settings, permission, isMember, isOrgAdmin, source) {
59
+ var newTeamProfileEnabled = (0, _platformFeatureFlags.fg)('enable_new_team_profile');
59
60
  if (settings === 'OPEN') {
60
61
  return _objectSpread(_objectSpread({}, allPermissions(permission === 'FULL_WRITE', isMember)), openPermissions(permission));
61
62
  }
62
63
  if (settings === 'MEMBER_INVITE') {
63
64
  return _objectSpread(_objectSpread({}, allPermissions(permission === 'FULL_WRITE', isMember)), inviteOnlyPermissions(permission));
64
65
  } else if (settings === 'EXTERNAL') {
65
- return _objectSpread(_objectSpread({}, allPermissions(false, isMember)), SCIMSyncTeamPermissions(isMember, isOrgAdmin, source));
66
+ return _objectSpread(_objectSpread(_objectSpread({}, allPermissions(false, isMember)), SCIMSyncTeamPermissions(isMember, isOrgAdmin, source)), {}, {
67
+ ADD_AGENT_TO_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
68
+ REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin)
69
+ });
66
70
  }
67
71
  return allPermissions(false, false);
68
72
  };
@@ -2352,147 +2352,168 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
2352
2352
  return addTeamWatcher;
2353
2353
  }()
2354
2354
  }, {
2355
- key: "removeTeamWatcher",
2355
+ key: "isTeamWatcher",
2356
2356
  value: function () {
2357
- var _removeTeamWatcher = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee65() {
2357
+ var _isTeamWatcher = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee65() {
2358
2358
  var _this$_teamCentralCli2;
2359
2359
  var _args65 = arguments;
2360
2360
  return _regenerator.default.wrap(function _callee65$(_context65) {
2361
2361
  while (1) switch (_context65.prev = _context65.next) {
2362
2362
  case 0:
2363
- return _context65.abrupt("return", (_this$_teamCentralCli2 = this._teamCentralClient).removeTeamWatcher.apply(_this$_teamCentralCli2, _args65));
2363
+ return _context65.abrupt("return", (_this$_teamCentralCli2 = this._teamCentralClient).isTeamWatcher.apply(_this$_teamCentralCli2, _args65));
2364
2364
  case 1:
2365
2365
  case "end":
2366
2366
  return _context65.stop();
2367
2367
  }
2368
2368
  }, _callee65, this);
2369
2369
  }));
2370
- function removeTeamWatcher() {
2371
- return _removeTeamWatcher.apply(this, arguments);
2370
+ function isTeamWatcher() {
2371
+ return _isTeamWatcher.apply(this, arguments);
2372
2372
  }
2373
- return removeTeamWatcher;
2373
+ return isTeamWatcher;
2374
2374
  }()
2375
2375
  }, {
2376
- key: "deleteKudos",
2376
+ key: "removeTeamWatcher",
2377
2377
  value: function () {
2378
- var _deleteKudos = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee66() {
2378
+ var _removeTeamWatcher = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee66() {
2379
2379
  var _this$_teamCentralCli3;
2380
2380
  var _args66 = arguments;
2381
2381
  return _regenerator.default.wrap(function _callee66$(_context66) {
2382
2382
  while (1) switch (_context66.prev = _context66.next) {
2383
2383
  case 0:
2384
- return _context66.abrupt("return", (_this$_teamCentralCli3 = this._teamCentralClient).deleteKudos.apply(_this$_teamCentralCli3, _args66));
2384
+ return _context66.abrupt("return", (_this$_teamCentralCli3 = this._teamCentralClient).removeTeamWatcher.apply(_this$_teamCentralCli3, _args66));
2385
2385
  case 1:
2386
2386
  case "end":
2387
2387
  return _context66.stop();
2388
2388
  }
2389
2389
  }, _callee66, this);
2390
2390
  }));
2391
- function deleteKudos() {
2392
- return _deleteKudos.apply(this, arguments);
2391
+ function removeTeamWatcher() {
2392
+ return _removeTeamWatcher.apply(this, arguments);
2393
2393
  }
2394
- return deleteKudos;
2394
+ return removeTeamWatcher;
2395
2395
  }()
2396
2396
  }, {
2397
- key: "queryTagList",
2397
+ key: "deleteKudos",
2398
2398
  value: function () {
2399
- var _queryTagList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee67() {
2399
+ var _deleteKudos = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee67() {
2400
2400
  var _this$_teamCentralCli4;
2401
2401
  var _args67 = arguments;
2402
2402
  return _regenerator.default.wrap(function _callee67$(_context67) {
2403
2403
  while (1) switch (_context67.prev = _context67.next) {
2404
2404
  case 0:
2405
- return _context67.abrupt("return", (_this$_teamCentralCli4 = this._teamCentralClient).queryTagList.apply(_this$_teamCentralCli4, _args67));
2405
+ return _context67.abrupt("return", (_this$_teamCentralCli4 = this._teamCentralClient).deleteKudos.apply(_this$_teamCentralCli4, _args67));
2406
2406
  case 1:
2407
2407
  case "end":
2408
2408
  return _context67.stop();
2409
2409
  }
2410
2410
  }, _callee67, this);
2411
2411
  }));
2412
- function queryTagList() {
2413
- return _queryTagList.apply(this, arguments);
2412
+ function deleteKudos() {
2413
+ return _deleteKudos.apply(this, arguments);
2414
2414
  }
2415
- return queryTagList;
2415
+ return deleteKudos;
2416
2416
  }()
2417
2417
  }, {
2418
- key: "createTag",
2418
+ key: "queryTagList",
2419
2419
  value: function () {
2420
- var _createTag = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee68() {
2420
+ var _queryTagList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee68() {
2421
2421
  var _this$_teamCentralCli5;
2422
2422
  var _args68 = arguments;
2423
2423
  return _regenerator.default.wrap(function _callee68$(_context68) {
2424
2424
  while (1) switch (_context68.prev = _context68.next) {
2425
2425
  case 0:
2426
- return _context68.abrupt("return", (_this$_teamCentralCli5 = this._teamCentralClient).createTag.apply(_this$_teamCentralCli5, _args68));
2426
+ return _context68.abrupt("return", (_this$_teamCentralCli5 = this._teamCentralClient).queryTagList.apply(_this$_teamCentralCli5, _args68));
2427
2427
  case 1:
2428
2428
  case "end":
2429
2429
  return _context68.stop();
2430
2430
  }
2431
2431
  }, _callee68, this);
2432
2432
  }));
2433
- function createTag() {
2434
- return _createTag.apply(this, arguments);
2433
+ function queryTagList() {
2434
+ return _queryTagList.apply(this, arguments);
2435
2435
  }
2436
- return createTag;
2436
+ return queryTagList;
2437
2437
  }()
2438
2438
  }, {
2439
- key: "createHelpPointer",
2439
+ key: "createTag",
2440
2440
  value: function () {
2441
- var _createHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee69() {
2441
+ var _createTag = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee69() {
2442
2442
  var _this$_teamCentralCli6;
2443
2443
  var _args69 = arguments;
2444
2444
  return _regenerator.default.wrap(function _callee69$(_context69) {
2445
2445
  while (1) switch (_context69.prev = _context69.next) {
2446
2446
  case 0:
2447
- return _context69.abrupt("return", (_this$_teamCentralCli6 = this._teamCentralClient).createHelpPointer.apply(_this$_teamCentralCli6, _args69));
2447
+ return _context69.abrupt("return", (_this$_teamCentralCli6 = this._teamCentralClient).createTag.apply(_this$_teamCentralCli6, _args69));
2448
2448
  case 1:
2449
2449
  case "end":
2450
2450
  return _context69.stop();
2451
2451
  }
2452
2452
  }, _callee69, this);
2453
2453
  }));
2454
- function createHelpPointer() {
2455
- return _createHelpPointer.apply(this, arguments);
2454
+ function createTag() {
2455
+ return _createTag.apply(this, arguments);
2456
2456
  }
2457
- return createHelpPointer;
2457
+ return createTag;
2458
2458
  }()
2459
2459
  }, {
2460
- key: "updateHelpPointer",
2460
+ key: "createHelpPointer",
2461
2461
  value: function () {
2462
- var _updateHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee70() {
2462
+ var _createHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee70() {
2463
2463
  var _this$_teamCentralCli7;
2464
2464
  var _args70 = arguments;
2465
2465
  return _regenerator.default.wrap(function _callee70$(_context70) {
2466
2466
  while (1) switch (_context70.prev = _context70.next) {
2467
2467
  case 0:
2468
- return _context70.abrupt("return", (_this$_teamCentralCli7 = this._teamCentralClient).updateHelpPointer.apply(_this$_teamCentralCli7, _args70));
2468
+ return _context70.abrupt("return", (_this$_teamCentralCli7 = this._teamCentralClient).createHelpPointer.apply(_this$_teamCentralCli7, _args70));
2469
2469
  case 1:
2470
2470
  case "end":
2471
2471
  return _context70.stop();
2472
2472
  }
2473
2473
  }, _callee70, this);
2474
2474
  }));
2475
- function updateHelpPointer() {
2476
- return _updateHelpPointer.apply(this, arguments);
2475
+ function createHelpPointer() {
2476
+ return _createHelpPointer.apply(this, arguments);
2477
2477
  }
2478
- return updateHelpPointer;
2478
+ return createHelpPointer;
2479
2479
  }()
2480
2480
  }, {
2481
- key: "deleteHelpPointer",
2481
+ key: "updateHelpPointer",
2482
2482
  value: function () {
2483
- var _deleteHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee71() {
2483
+ var _updateHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee71() {
2484
2484
  var _this$_teamCentralCli8;
2485
2485
  var _args71 = arguments;
2486
2486
  return _regenerator.default.wrap(function _callee71$(_context71) {
2487
2487
  while (1) switch (_context71.prev = _context71.next) {
2488
2488
  case 0:
2489
- return _context71.abrupt("return", (_this$_teamCentralCli8 = this._teamCentralClient).deleteHelpPointer.apply(_this$_teamCentralCli8, _args71));
2489
+ return _context71.abrupt("return", (_this$_teamCentralCli8 = this._teamCentralClient).updateHelpPointer.apply(_this$_teamCentralCli8, _args71));
2490
2490
  case 1:
2491
2491
  case "end":
2492
2492
  return _context71.stop();
2493
2493
  }
2494
2494
  }, _callee71, this);
2495
2495
  }));
2496
+ function updateHelpPointer() {
2497
+ return _updateHelpPointer.apply(this, arguments);
2498
+ }
2499
+ return updateHelpPointer;
2500
+ }()
2501
+ }, {
2502
+ key: "deleteHelpPointer",
2503
+ value: function () {
2504
+ var _deleteHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee72() {
2505
+ var _this$_teamCentralCli9;
2506
+ var _args72 = arguments;
2507
+ return _regenerator.default.wrap(function _callee72$(_context72) {
2508
+ while (1) switch (_context72.prev = _context72.next) {
2509
+ case 0:
2510
+ return _context72.abrupt("return", (_this$_teamCentralCli9 = this._teamCentralClient).deleteHelpPointer.apply(_this$_teamCentralCli9, _args72));
2511
+ case 1:
2512
+ case "end":
2513
+ return _context72.stop();
2514
+ }
2515
+ }, _callee72, this);
2516
+ }));
2496
2517
  function deleteHelpPointer() {
2497
2518
  return _deleteHelpPointer.apply(this, arguments);
2498
2519
  }
@@ -2501,27 +2522,27 @@ var TeamsClient = exports.TeamsClient = /*#__PURE__*/function () {
2501
2522
  }, {
2502
2523
  key: "getUserTenure",
2503
2524
  value: function () {
2504
- var _getUserTenure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee72() {
2525
+ var _getUserTenure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee73() {
2505
2526
  var _this65 = this;
2506
2527
  var _len53,
2507
2528
  args,
2508
2529
  _key53,
2509
- _args72 = arguments;
2510
- return _regenerator.default.wrap(function _callee72$(_context72) {
2511
- while (1) switch (_context72.prev = _context72.next) {
2530
+ _args73 = arguments;
2531
+ return _regenerator.default.wrap(function _callee73$(_context73) {
2532
+ while (1) switch (_context73.prev = _context73.next) {
2512
2533
  case 0:
2513
- for (_len53 = _args72.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) {
2514
- args[_key53] = _args72[_key53];
2534
+ for (_len53 = _args73.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) {
2535
+ args[_key53] = _args73[_key53];
2515
2536
  }
2516
- return _context72.abrupt("return", this.measurePerformance('getUserTenure', function () {
2537
+ return _context73.abrupt("return", this.measurePerformance('getUserTenure', function () {
2517
2538
  var _this65$_replinesClie;
2518
2539
  return (_this65$_replinesClie = _this65._replinesClient).getUserTenure.apply(_this65$_replinesClie, args);
2519
2540
  }));
2520
2541
  case 2:
2521
2542
  case "end":
2522
- return _context72.stop();
2543
+ return _context73.stop();
2523
2544
  }
2524
- }, _callee72, this);
2545
+ }, _callee73, this);
2525
2546
  }));
2526
2547
  function getUserTenure() {
2527
2548
  return _getUserTenure.apply(this, arguments);
@@ -22,6 +22,7 @@ var _helpPointerDeleteMutation = require("./mutations/help-pointer-delete-mutati
22
22
  var _helpPointerUpdateMutation = require("./mutations/help-pointer-update-mutation.graphql");
23
23
  var _kudosDeleteMutation = require("./mutations/kudos-delete-mutation.graphql");
24
24
  var _removeTeamWatcher2 = require("./mutations/remove-team-watcher.graphql");
25
+ var _isTeamWatcher2 = require("./queries/is-team-watcher.graphql");
25
26
  var _tagListQuery = require("./queries/tag-list-query.graphql");
26
27
  var _utils = require("./utils");
27
28
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
@@ -41,241 +42,273 @@ var TeamCentralClient = exports.TeamCentralClient = /*#__PURE__*/function (_Base
41
42
  this.setServiceUrl(cloudId && cloudId !== 'None' ? (0, _utils.getTeamCentralGraphqlUrl)(baseUrl, cloudId) : (0, _utils.getUnshardedTeamCentralGraphqlUrl)(baseUrl));
42
43
  }
43
44
  }, {
44
- key: "addTeamWatcher",
45
+ key: "isTeamWatcher",
45
46
  value: function () {
46
- var _addTeamWatcher = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(teamId, cloudId) {
47
+ var _isTeamWatcher = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(teamId, cloudId) {
47
48
  var response;
48
49
  return _regenerator.default.wrap(function _callee$(_context) {
49
50
  while (1) switch (_context.prev = _context.next) {
50
51
  case 0:
51
52
  _context.next = 2;
52
53
  return this.makeGraphQLRequest({
53
- query: _addTeamWatcher2.AddTeamWatcherMutation,
54
+ query: _isTeamWatcher2.IsTeamWatcherQuery,
54
55
  variables: {
55
- teamId: teamId,
56
- cloudId: cloudId
56
+ teamId: teamId.replace('ari:cloud:identity::team/', ''),
57
+ cloudId: cloudId || 'None'
57
58
  }
58
59
  }, {
59
- operationName: 'addTeamWatcher'
60
+ operationName: 'isTeamWatcher'
60
61
  });
61
62
  case 2:
62
63
  response = _context.sent;
63
- return _context.abrupt("return", response.addTeamWatcher);
64
+ return _context.abrupt("return", response.isTeamWatcher);
64
65
  case 4:
65
66
  case "end":
66
67
  return _context.stop();
67
68
  }
68
69
  }, _callee, this);
69
70
  }));
70
- function addTeamWatcher(_x, _x2) {
71
- return _addTeamWatcher.apply(this, arguments);
71
+ function isTeamWatcher(_x, _x2) {
72
+ return _isTeamWatcher.apply(this, arguments);
72
73
  }
73
- return addTeamWatcher;
74
+ return isTeamWatcher;
74
75
  }()
75
76
  }, {
76
- key: "removeTeamWatcher",
77
+ key: "addTeamWatcher",
77
78
  value: function () {
78
- var _removeTeamWatcher = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(teamId, cloudId) {
79
+ var _addTeamWatcher = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(teamId, cloudId) {
79
80
  var response;
80
81
  return _regenerator.default.wrap(function _callee2$(_context2) {
81
82
  while (1) switch (_context2.prev = _context2.next) {
82
83
  case 0:
83
84
  _context2.next = 2;
84
85
  return this.makeGraphQLRequest({
85
- query: _removeTeamWatcher2.RemoveTeamWatcherMutation,
86
+ query: _addTeamWatcher2.AddTeamWatcherMutation,
86
87
  variables: {
87
88
  teamId: teamId,
88
89
  cloudId: cloudId
89
90
  }
90
91
  }, {
91
- operationName: 'removeTeamWatcher'
92
+ operationName: 'addTeamWatcher'
92
93
  });
93
94
  case 2:
94
95
  response = _context2.sent;
95
- return _context2.abrupt("return", response.removeTeamWatcher);
96
+ return _context2.abrupt("return", response.addTeamWatcher);
96
97
  case 4:
97
98
  case "end":
98
99
  return _context2.stop();
99
100
  }
100
101
  }, _callee2, this);
101
102
  }));
102
- function removeTeamWatcher(_x3, _x4) {
103
- return _removeTeamWatcher.apply(this, arguments);
103
+ function addTeamWatcher(_x3, _x4) {
104
+ return _addTeamWatcher.apply(this, arguments);
104
105
  }
105
- return removeTeamWatcher;
106
+ return addTeamWatcher;
106
107
  }()
107
108
  }, {
108
- key: "deleteKudos",
109
+ key: "removeTeamWatcher",
109
110
  value: function () {
110
- var _deleteKudos = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(id) {
111
+ var _removeTeamWatcher = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(teamId, cloudId) {
111
112
  var response;
112
113
  return _regenerator.default.wrap(function _callee3$(_context3) {
113
114
  while (1) switch (_context3.prev = _context3.next) {
114
115
  case 0:
115
116
  _context3.next = 2;
116
117
  return this.makeGraphQLRequest({
117
- query: _kudosDeleteMutation.KudosDeleteMutation,
118
+ query: _removeTeamWatcher2.RemoveTeamWatcherMutation,
118
119
  variables: {
119
- id: id
120
+ teamId: teamId,
121
+ cloudId: cloudId
120
122
  }
121
123
  }, {
122
- operationName: 'DeleteKudos'
124
+ operationName: 'removeTeamWatcher'
123
125
  });
124
126
  case 2:
125
127
  response = _context3.sent;
126
- return _context3.abrupt("return", response.deleteKudos);
128
+ return _context3.abrupt("return", response.removeTeamWatcher);
127
129
  case 4:
128
130
  case "end":
129
131
  return _context3.stop();
130
132
  }
131
133
  }, _callee3, this);
132
134
  }));
133
- function deleteKudos(_x5) {
134
- return _deleteKudos.apply(this, arguments);
135
+ function removeTeamWatcher(_x5, _x6) {
136
+ return _removeTeamWatcher.apply(this, arguments);
135
137
  }
136
- return deleteKudos;
138
+ return removeTeamWatcher;
137
139
  }()
138
140
  }, {
139
- key: "queryTagList",
141
+ key: "deleteKudos",
140
142
  value: function () {
141
- var _queryTagList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(variables) {
143
+ var _deleteKudos = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(id) {
142
144
  var response;
143
145
  return _regenerator.default.wrap(function _callee4$(_context4) {
144
146
  while (1) switch (_context4.prev = _context4.next) {
145
147
  case 0:
146
148
  _context4.next = 2;
147
149
  return this.makeGraphQLRequest({
148
- query: _tagListQuery.TagListQuery,
149
- variables: variables
150
+ query: _kudosDeleteMutation.KudosDeleteMutation,
151
+ variables: {
152
+ id: id
153
+ }
150
154
  }, {
151
- operationName: 'TagListByCloudId'
155
+ operationName: 'DeleteKudos'
152
156
  });
153
157
  case 2:
154
158
  response = _context4.sent;
155
- return _context4.abrupt("return", response.tagSearchByCloudId);
159
+ return _context4.abrupt("return", response.deleteKudos);
156
160
  case 4:
157
161
  case "end":
158
162
  return _context4.stop();
159
163
  }
160
164
  }, _callee4, this);
161
165
  }));
162
- function queryTagList(_x6) {
163
- return _queryTagList.apply(this, arguments);
166
+ function deleteKudos(_x7) {
167
+ return _deleteKudos.apply(this, arguments);
164
168
  }
165
- return queryTagList;
169
+ return deleteKudos;
166
170
  }()
167
171
  }, {
168
- key: "createTag",
172
+ key: "queryTagList",
169
173
  value: function () {
170
- var _createTag = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(variables) {
174
+ var _queryTagList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(variables) {
171
175
  var response;
172
176
  return _regenerator.default.wrap(function _callee5$(_context5) {
173
177
  while (1) switch (_context5.prev = _context5.next) {
174
178
  case 0:
175
179
  _context5.next = 2;
176
180
  return this.makeGraphQLRequest({
177
- query: _createTagMutation.CreateTagMutation,
181
+ query: _tagListQuery.TagListQuery,
178
182
  variables: variables
179
183
  }, {
180
- operationName: 'createTagForCloudId'
184
+ operationName: 'TagListByCloudId'
181
185
  });
182
186
  case 2:
183
187
  response = _context5.sent;
184
- return _context5.abrupt("return", response.createTagForCloudId);
188
+ return _context5.abrupt("return", response.tagSearchByCloudId);
185
189
  case 4:
186
190
  case "end":
187
191
  return _context5.stop();
188
192
  }
189
193
  }, _callee5, this);
190
194
  }));
191
- function createTag(_x7) {
192
- return _createTag.apply(this, arguments);
195
+ function queryTagList(_x8) {
196
+ return _queryTagList.apply(this, arguments);
193
197
  }
194
- return createTag;
198
+ return queryTagList;
195
199
  }()
196
200
  }, {
197
- key: "createHelpPointer",
201
+ key: "createTag",
198
202
  value: function () {
199
- var _createHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(variables) {
203
+ var _createTag = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(variables) {
200
204
  var response;
201
205
  return _regenerator.default.wrap(function _callee6$(_context6) {
202
206
  while (1) switch (_context6.prev = _context6.next) {
203
207
  case 0:
204
208
  _context6.next = 2;
205
209
  return this.makeGraphQLRequest({
206
- query: _helpPointerCreateMutation.HelpPointerCreateMutation,
210
+ query: _createTagMutation.CreateTagMutation,
207
211
  variables: variables
208
212
  }, {
209
- operationName: 'CreateHelpPointer'
213
+ operationName: 'createTagForCloudId'
210
214
  });
211
215
  case 2:
212
216
  response = _context6.sent;
213
- return _context6.abrupt("return", response.createHelpPointer);
217
+ return _context6.abrupt("return", response.createTagForCloudId);
214
218
  case 4:
215
219
  case "end":
216
220
  return _context6.stop();
217
221
  }
218
222
  }, _callee6, this);
219
223
  }));
220
- function createHelpPointer(_x8) {
221
- return _createHelpPointer.apply(this, arguments);
224
+ function createTag(_x9) {
225
+ return _createTag.apply(this, arguments);
222
226
  }
223
- return createHelpPointer;
227
+ return createTag;
224
228
  }()
225
229
  }, {
226
- key: "updateHelpPointer",
230
+ key: "createHelpPointer",
227
231
  value: function () {
228
- var _updateHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(variables) {
232
+ var _createHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(variables) {
229
233
  var response;
230
234
  return _regenerator.default.wrap(function _callee7$(_context7) {
231
235
  while (1) switch (_context7.prev = _context7.next) {
232
236
  case 0:
233
237
  _context7.next = 2;
234
238
  return this.makeGraphQLRequest({
235
- query: _helpPointerUpdateMutation.HelpPointerUpdateMutation,
239
+ query: _helpPointerCreateMutation.HelpPointerCreateMutation,
236
240
  variables: variables
237
241
  }, {
238
- operationName: 'UpdateHelpPointer'
242
+ operationName: 'CreateHelpPointer'
239
243
  });
240
244
  case 2:
241
245
  response = _context7.sent;
242
- return _context7.abrupt("return", response.updateHelpPointer);
246
+ return _context7.abrupt("return", response.createHelpPointer);
243
247
  case 4:
244
248
  case "end":
245
249
  return _context7.stop();
246
250
  }
247
251
  }, _callee7, this);
248
252
  }));
249
- function updateHelpPointer(_x9) {
250
- return _updateHelpPointer.apply(this, arguments);
253
+ function createHelpPointer(_x0) {
254
+ return _createHelpPointer.apply(this, arguments);
251
255
  }
252
- return updateHelpPointer;
256
+ return createHelpPointer;
253
257
  }()
254
258
  }, {
255
- key: "deleteHelpPointer",
259
+ key: "updateHelpPointer",
256
260
  value: function () {
257
- var _deleteHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(variables) {
261
+ var _updateHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(variables) {
258
262
  var response;
259
263
  return _regenerator.default.wrap(function _callee8$(_context8) {
260
264
  while (1) switch (_context8.prev = _context8.next) {
261
265
  case 0:
262
266
  _context8.next = 2;
263
267
  return this.makeGraphQLRequest({
264
- query: _helpPointerDeleteMutation.HelpPointerDeleteMutation,
268
+ query: _helpPointerUpdateMutation.HelpPointerUpdateMutation,
265
269
  variables: variables
266
270
  }, {
267
- operationName: 'DeleteHelpPointer'
271
+ operationName: 'UpdateHelpPointer'
268
272
  });
269
273
  case 2:
270
274
  response = _context8.sent;
271
- return _context8.abrupt("return", response.deleteHelpPointer);
275
+ return _context8.abrupt("return", response.updateHelpPointer);
272
276
  case 4:
273
277
  case "end":
274
278
  return _context8.stop();
275
279
  }
276
280
  }, _callee8, this);
277
281
  }));
278
- function deleteHelpPointer(_x0) {
282
+ function updateHelpPointer(_x1) {
283
+ return _updateHelpPointer.apply(this, arguments);
284
+ }
285
+ return updateHelpPointer;
286
+ }()
287
+ }, {
288
+ key: "deleteHelpPointer",
289
+ value: function () {
290
+ var _deleteHelpPointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(variables) {
291
+ var response;
292
+ return _regenerator.default.wrap(function _callee9$(_context9) {
293
+ while (1) switch (_context9.prev = _context9.next) {
294
+ case 0:
295
+ _context9.next = 2;
296
+ return this.makeGraphQLRequest({
297
+ query: _helpPointerDeleteMutation.HelpPointerDeleteMutation,
298
+ variables: variables
299
+ }, {
300
+ operationName: 'DeleteHelpPointer'
301
+ });
302
+ case 2:
303
+ response = _context9.sent;
304
+ return _context9.abrupt("return", response.deleteHelpPointer);
305
+ case 4:
306
+ case "end":
307
+ return _context9.stop();
308
+ }
309
+ }, _callee9, this);
310
+ }));
311
+ function deleteHelpPointer(_x10) {
279
312
  return _deleteHelpPointer.apply(this, arguments);
280
313
  }
281
314
  return deleteHelpPointer;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.IsTeamWatcherQuery = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _graphql = require("graphql");
10
+ var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
11
+ var _templateObject;
12
+ var IsTeamWatcherQuery = exports.IsTeamWatcherQuery = (0, _graphql.print)((0, _graphqlTag.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"]))));
@@ -38,6 +38,7 @@ export const SCIMSyncTeamPermissions = (isMember, isOrgAdmin, source) => ({
38
38
  EDIT_TEAM_NAME: isOrgAdmin && source === 'ATLASSIAN_GROUP' && fg('enable_edit_team_name_external_type_teams')
39
39
  });
40
40
  export const getPermissionMap = (settings, permission, isMember, isOrgAdmin, source) => {
41
+ const newTeamProfileEnabled = fg('enable_new_team_profile');
41
42
  if (settings === 'OPEN') {
42
43
  return {
43
44
  ...allPermissions(permission === 'FULL_WRITE', isMember),
@@ -52,7 +53,9 @@ export const getPermissionMap = (settings, permission, isMember, isOrgAdmin, sou
52
53
  } else if (settings === 'EXTERNAL') {
53
54
  return {
54
55
  ...allPermissions(false, isMember),
55
- ...SCIMSyncTeamPermissions(isMember, isOrgAdmin, source)
56
+ ...SCIMSyncTeamPermissions(isMember, isOrgAdmin, source),
57
+ ADD_AGENT_TO_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin),
58
+ REMOVE_AGENT_FROM_TEAM: newTeamProfileEnabled && (isMember || isOrgAdmin)
56
59
  };
57
60
  }
58
61
  return allPermissions(false, false);