@atlaskit/teams-client 4.33.0 → 4.33.1

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 (63) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/common/utils/http.js +8 -8
  3. package/dist/cjs/common/utils/permissions/has-permission.js +4 -0
  4. package/dist/cjs/common/utils/ufo/index.js +2 -2
  5. package/dist/cjs/services/agg-client/index.js +28 -28
  6. package/dist/cjs/services/directory-client/index.js +38 -36
  7. package/dist/cjs/services/graphql-client/main.js +13 -12
  8. package/dist/cjs/services/graphql-client/utils/index.js +32 -31
  9. package/dist/cjs/services/identity-client/index.js +10 -10
  10. package/dist/cjs/services/invitations-client/index.js +40 -38
  11. package/dist/cjs/services/legion-client/index.js +163 -162
  12. package/dist/cjs/services/main.js +162 -162
  13. package/dist/cjs/services/mutability-client/index.js +1 -1
  14. package/dist/cjs/services/object-resolver-client/index.js +18 -18
  15. package/dist/cjs/services/public-api-client/index.js +69 -68
  16. package/dist/cjs/services/replines-client/index.js +2 -2
  17. package/dist/cjs/services/reporting-lines-client/index.js +4 -4
  18. package/dist/cjs/services/rest-client/index.js +28 -28
  19. package/dist/cjs/services/rest-client/utils/parse-error-message.js +18 -18
  20. package/dist/cjs/services/sentry/main.js +23 -22
  21. package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
  22. package/dist/cjs/services/sentry/utils/initialise-sentry.js +6 -6
  23. package/dist/cjs/services/sentry/utils/sentry-client.js +20 -19
  24. package/dist/cjs/services/sentry/utils/use-teams-sentry-client-setup.js +4 -4
  25. package/dist/cjs/services/team-central-client/index.js +36 -36
  26. package/dist/cjs/services/teams-in-slack-client/index.js +3 -3
  27. package/dist/cjs/services/use-query-light/main.js +38 -38
  28. package/dist/cjs/services/user-preferences-client/index.js +6 -6
  29. package/dist/es2019/common/utils/permissions/has-permission.js +4 -0
  30. package/dist/es2019/common/utils/ufo/index.js +2 -2
  31. package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
  32. package/dist/esm/common/utils/http.js +8 -8
  33. package/dist/esm/common/utils/permissions/has-permission.js +4 -0
  34. package/dist/esm/common/utils/ufo/index.js +2 -2
  35. package/dist/esm/services/agg-client/index.js +28 -28
  36. package/dist/esm/services/directory-client/index.js +38 -36
  37. package/dist/esm/services/graphql-client/main.js +13 -12
  38. package/dist/esm/services/graphql-client/utils/index.js +32 -31
  39. package/dist/esm/services/identity-client/index.js +10 -10
  40. package/dist/esm/services/invitations-client/index.js +40 -38
  41. package/dist/esm/services/legion-client/index.js +163 -162
  42. package/dist/esm/services/main.js +162 -162
  43. package/dist/esm/services/mutability-client/index.js +1 -1
  44. package/dist/esm/services/object-resolver-client/index.js +18 -18
  45. package/dist/esm/services/public-api-client/index.js +69 -68
  46. package/dist/esm/services/replines-client/index.js +2 -2
  47. package/dist/esm/services/reporting-lines-client/index.js +4 -4
  48. package/dist/esm/services/rest-client/index.js +28 -28
  49. package/dist/esm/services/rest-client/utils/parse-error-message.js +18 -18
  50. package/dist/esm/services/sentry/main.js +23 -22
  51. package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
  52. package/dist/esm/services/sentry/utils/initialise-sentry.js +6 -6
  53. package/dist/esm/services/sentry/utils/sentry-client.js +19 -18
  54. package/dist/esm/services/sentry/utils/use-teams-sentry-client-setup.js +4 -4
  55. package/dist/esm/services/team-central-client/index.js +36 -36
  56. package/dist/esm/services/teams-in-slack-client/index.js +3 -3
  57. package/dist/esm/services/use-query-light/main.js +38 -38
  58. package/dist/esm/services/user-preferences-client/index.js +6 -6
  59. package/dist/types/common/utils/permissions/has-permission.d.ts +4 -0
  60. package/dist/types/types/index.d.ts +1 -1
  61. package/dist/types-ts4.5/common/utils/permissions/has-permission.d.ts +4 -0
  62. package/dist/types-ts4.5/types/index.d.ts +1 -1
  63. package/package.json +2 -1
@@ -65,7 +65,7 @@ export var DirectoryClient = /*#__PURE__*/function (_BaseGraphQlClient) {
65
65
  */
66
66
  cloudId, flags) {
67
67
  var queryFeatureFlags, _yield$this$makeGraph, FeatureFlags;
68
- return _regeneratorRuntime.wrap(function _callee$(_context) {
68
+ return _regeneratorRuntime.wrap(function (_context) {
69
69
  while (1) switch (_context.prev = _context.next) {
70
70
  case 0:
71
71
  queryFeatureFlags = {
@@ -75,11 +75,11 @@ export var DirectoryClient = /*#__PURE__*/function (_BaseGraphQlClient) {
75
75
  flags: flags
76
76
  }
77
77
  };
78
- _context.next = 3;
78
+ _context.next = 1;
79
79
  return this.makeGraphQLRequest(queryFeatureFlags, {
80
80
  operationName: 'FeatureFlags'
81
81
  });
82
- case 3:
82
+ case 1:
83
83
  _yield$this$makeGraph = _context.sent;
84
84
  FeatureFlags = _yield$this$makeGraph.FeatureFlags;
85
85
  return _context.abrupt("return", FeatureFlags.map(function (_ref) {
@@ -89,7 +89,7 @@ export var DirectoryClient = /*#__PURE__*/function (_BaseGraphQlClient) {
89
89
  }).reduce(function (acc, val) {
90
90
  return acc[val[0]] = val[1], acc;
91
91
  }, {}));
92
- case 6:
92
+ case 2:
93
93
  case "end":
94
94
  return _context.stop();
95
95
  }
@@ -125,37 +125,38 @@ export var DirectoryClient = /*#__PURE__*/function (_BaseGraphQlClient) {
125
125
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
126
126
  var pendingRetries,
127
127
  backoffMaxDelay,
128
- _args2 = arguments;
129
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
128
+ _args2 = arguments,
129
+ _t;
130
+ return _regeneratorRuntime.wrap(function (_context2) {
130
131
  while (1) switch (_context2.prev = _context2.next) {
131
132
  case 0:
132
133
  pendingRetries = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : 3;
133
134
  backoffMaxDelay = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 2000;
134
- _context2.prev = 2;
135
- _context2.next = 5;
135
+ _context2.prev = 1;
136
+ _context2.next = 2;
136
137
  return _this.makeGraphQLRequest(teamMembershipsQuery, {
137
138
  operationName: 'TeamMembership'
138
139
  });
139
- case 5:
140
+ case 2:
140
141
  return _context2.abrupt("return", _context2.sent);
141
- case 8:
142
- _context2.prev = 8;
143
- _context2.t0 = _context2["catch"](2);
144
- if (!_this.canRetryError(pendingRetries, _context2.t0)) {
145
- _context2.next = 14;
142
+ case 3:
143
+ _context2.prev = 3;
144
+ _t = _context2["catch"](1);
145
+ if (!_this.canRetryError(pendingRetries, _t)) {
146
+ _context2.next = 5;
146
147
  break;
147
148
  }
148
- _context2.next = 13;
149
+ _context2.next = 4;
149
150
  return delay(backoffMaxDelay / pendingRetries);
150
- case 13:
151
+ case 4:
151
152
  return _context2.abrupt("return", _performRequest(pendingRetries - 1));
152
- case 14:
153
- throw _context2.t0;
154
- case 15:
153
+ case 5:
154
+ throw _t;
155
+ case 6:
155
156
  case "end":
156
157
  return _context2.stop();
157
158
  }
158
- }, _callee2, null, [[2, 8]]);
159
+ }, _callee2, null, [[1, 3]]);
159
160
  }));
160
161
  return function performRequest() {
161
162
  return _ref2.apply(this, arguments);
@@ -186,37 +187,38 @@ export var DirectoryClient = /*#__PURE__*/function (_BaseGraphQlClient) {
186
187
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
187
188
  var pendingRetries,
188
189
  backoffMaxDelay,
189
- _args3 = arguments;
190
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
190
+ _args3 = arguments,
191
+ _t2;
192
+ return _regeneratorRuntime.wrap(function (_context3) {
191
193
  while (1) switch (_context3.prev = _context3.next) {
192
194
  case 0:
193
195
  pendingRetries = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : 3;
194
196
  backoffMaxDelay = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : 2000;
195
- _context3.prev = 2;
196
- _context3.next = 5;
197
+ _context3.prev = 1;
198
+ _context3.next = 2;
197
199
  return _this2.makeGraphQLRequest(userQuery, {
198
200
  operationName: 'CloudUser'
199
201
  });
200
- case 5:
202
+ case 2:
201
203
  return _context3.abrupt("return", _context3.sent);
202
- case 8:
203
- _context3.prev = 8;
204
- _context3.t0 = _context3["catch"](2);
205
- if (!_this2.canRetryError(pendingRetries, _context3.t0)) {
206
- _context3.next = 14;
204
+ case 3:
205
+ _context3.prev = 3;
206
+ _t2 = _context3["catch"](1);
207
+ if (!_this2.canRetryError(pendingRetries, _t2)) {
208
+ _context3.next = 5;
207
209
  break;
208
210
  }
209
- _context3.next = 13;
211
+ _context3.next = 4;
210
212
  return delay(backoffMaxDelay / pendingRetries);
211
- case 13:
213
+ case 4:
212
214
  return _context3.abrupt("return", _performRequest2(pendingRetries - 1));
213
- case 14:
214
- throw _context3.t0;
215
- case 15:
215
+ case 5:
216
+ throw _t2;
217
+ case 6:
216
218
  case "end":
217
219
  return _context3.stop();
218
220
  }
219
- }, _callee3, null, [[2, 8]]);
221
+ }, _callee3, null, [[1, 3]]);
220
222
  }));
221
223
  return function performRequest() {
222
224
  return _ref4.apply(this, arguments);
@@ -75,8 +75,9 @@ export var BaseGraphQlClient = /*#__PURE__*/function (_BaseClient) {
75
75
  cloudId,
76
76
  queryContextHeaders,
77
77
  mergedOptions,
78
- _args = arguments;
79
- return _regeneratorRuntime.wrap(function _callee$(_context) {
78
+ _args = arguments,
79
+ _t;
80
+ return _regeneratorRuntime.wrap(function (_context) {
80
81
  while (1) switch (_context.prev = _context.next) {
81
82
  case 0:
82
83
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
@@ -88,22 +89,22 @@ export var BaseGraphQlClient = /*#__PURE__*/function (_BaseClient) {
88
89
  headers: _objectSpread(_objectSpread({}, queryContextHeaders), options.headers)
89
90
  });
90
91
  return _context.abrupt("return", handleGraphQLRequest(this.serviceUrl, body, mergedOptions));
91
- case 8:
92
- _context.prev = 8;
93
- _context.t0 = _context["catch"](1);
94
- if (!(_context.t0 instanceof GraphQLError)) {
95
- _context.next = 12;
92
+ case 2:
93
+ _context.prev = 2;
94
+ _t = _context["catch"](1);
95
+ if (!(_t instanceof GraphQLError)) {
96
+ _context.next = 3;
96
97
  break;
97
98
  }
98
- throw _context.t0;
99
- case 12:
100
- this.logException(_context.t0, 'UnknownError in GraphQLClient.makeGraphQLRequestWithoutRetries');
99
+ throw _t;
100
+ case 3:
101
+ this.logException(_t, 'UnknownError in GraphQLClient.makeGraphQLRequestWithoutRetries');
101
102
  throw new DefaultError({});
102
- case 14:
103
+ case 4:
103
104
  case "end":
104
105
  return _context.stop();
105
106
  }
106
- }, _callee, this, [[1, 8]]);
107
+ }, _callee, this, [[1, 2]]);
107
108
  }));
108
109
  function makeGraphQLRequest(_x) {
109
110
  return _makeGraphQLRequest.apply(this, arguments);
@@ -18,8 +18,9 @@ function _makeGraphQLRequestWithoutRetries() {
18
18
  request,
19
19
  response,
20
20
  errors,
21
- _args = arguments;
22
- return _regeneratorRuntime.wrap(function _callee$(_context) {
21
+ _args = arguments,
22
+ _t;
23
+ return _regeneratorRuntime.wrap(function (_context) {
23
24
  while (1) switch (_context.prev = _context.next) {
24
25
  case 0:
25
26
  options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
@@ -40,24 +41,24 @@ function _makeGraphQLRequestWithoutRetries() {
40
41
  throw res;
41
42
  }
42
43
  });
43
- _context.prev = 5;
44
- _context.next = 8;
44
+ _context.prev = 1;
45
+ _context.next = 2;
45
46
  return request;
46
- case 8:
47
+ case 2:
47
48
  response = _context.sent;
48
49
  errors = response.errors;
49
50
  if (!errors) {
50
- _context.next = 17;
51
+ _context.next = 4;
51
52
  break;
52
53
  }
53
54
  if (!(errorPolicy === 'none')) {
54
- _context.next = 15;
55
+ _context.next = 3;
55
56
  break;
56
57
  }
57
58
  throw GraphQLError.from(errors);
58
- case 15:
59
+ case 3:
59
60
  if (!(errorPolicy === 'all')) {
60
- _context.next = 17;
61
+ _context.next = 4;
61
62
  break;
62
63
  }
63
64
  return _context.abrupt("return", new Promise(function (_resolve, reject) {
@@ -65,31 +66,31 @@ function _makeGraphQLRequestWithoutRetries() {
65
66
  reject(GraphQLError.from(errors));
66
67
  }, 0);
67
68
  }));
68
- case 17:
69
+ case 4:
69
70
  return _context.abrupt("return", response.data);
70
- case 20:
71
- _context.prev = 20;
72
- _context.t0 = _context["catch"](5);
73
- if (!(_context.t0 instanceof Response)) {
74
- _context.next = 24;
71
+ case 5:
72
+ _context.prev = 5;
73
+ _t = _context["catch"](1);
74
+ if (!(_t instanceof Response)) {
75
+ _context.next = 6;
75
76
  break;
76
77
  }
77
78
  return _context.abrupt("return", {
78
- response: _context.t0
79
+ response: _t
79
80
  });
80
- case 24:
81
- if (!Object(_context.t0).hasOwnProperty('response')) {
82
- _context.next = 26;
81
+ case 6:
82
+ if (!Object(_t).hasOwnProperty('response')) {
83
+ _context.next = 7;
83
84
  break;
84
85
  }
85
- throw _context.t0;
86
- case 26:
87
- return _context.abrupt("return", _context.t0);
88
- case 27:
86
+ throw _t;
87
+ case 7:
88
+ return _context.abrupt("return", _t);
89
+ case 8:
89
90
  case "end":
90
91
  return _context.stop();
91
92
  }
92
- }, _callee, null, [[5, 20]]);
93
+ }, _callee, null, [[1, 5]]);
93
94
  }));
94
95
  return _makeGraphQLRequestWithoutRetries.apply(this, arguments);
95
96
  }
@@ -106,7 +107,7 @@ function _handleGraphQLRequest() {
106
107
  statusText,
107
108
  traceId,
108
109
  _args2 = arguments;
109
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
110
+ return _regeneratorRuntime.wrap(function (_context2) {
110
111
  while (1) switch (_context2.prev = _context2.next) {
111
112
  case 0:
112
113
  options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
@@ -118,13 +119,13 @@ function _handleGraphQLRequest() {
118
119
  return isFetchResponse(data) && is5xx(data.response.status);
119
120
  }
120
121
  });
121
- _context2.next = 4;
122
+ _context2.next = 1;
122
123
  return makeGraphQLRequestWithRetries(serviceUrl, body, options);
123
- case 4:
124
+ case 1:
124
125
  result = _context2.sent;
125
126
  response = result === null || result === void 0 ? void 0 : result.response;
126
127
  if (!response) {
127
- _context2.next = 13;
128
+ _context2.next = 2;
128
129
  break;
129
130
  }
130
131
  status = response.status;
@@ -132,7 +133,7 @@ function _handleGraphQLRequest() {
132
133
  traceId = response.headers.get('atl-traceid');
133
134
  handleResponse(response);
134
135
  if (!(status > 400 && status <= 599)) {
135
- _context2.next = 13;
136
+ _context2.next = 2;
136
137
  break;
137
138
  }
138
139
  throw new HttpError({
@@ -140,9 +141,9 @@ function _handleGraphQLRequest() {
140
141
  status: status,
141
142
  traceId: traceId !== null && traceId !== void 0 ? traceId : undefined
142
143
  });
143
- case 13:
144
+ case 2:
144
145
  return _context2.abrupt("return", result);
145
- case 14:
146
+ case 3:
146
147
  case "end":
147
148
  return _context2.stop();
148
149
  }
@@ -31,7 +31,7 @@ export var IdentityClient = /*#__PURE__*/function (_RestClient) {
31
31
  key: "getUserManageConfig",
32
32
  value: function () {
33
33
  var _getUserManageConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(userId) {
34
- return _regeneratorRuntime.wrap(function _callee$(_context) {
34
+ return _regeneratorRuntime.wrap(function (_context) {
35
35
  while (1) switch (_context.prev = _context.next) {
36
36
  case 0:
37
37
  return _context.abrupt("return", this.getResourceCached("/".concat(userId, "/manage")).then(function (resp) {
@@ -56,7 +56,7 @@ export var IdentityClient = /*#__PURE__*/function (_RestClient) {
56
56
  key: "getMyAvatarUploadedStatus",
57
57
  value: (function () {
58
58
  var _getMyAvatarUploadedStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(userId) {
59
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
59
+ return _regeneratorRuntime.wrap(function (_context2) {
60
60
  while (1) switch (_context2.prev = _context2.next) {
61
61
  case 0:
62
62
  return _context2.abrupt("return", this.fetchUserAvatarInfo(userId));
@@ -75,7 +75,7 @@ export var IdentityClient = /*#__PURE__*/function (_RestClient) {
75
75
  key: "deleteAvatar",
76
76
  value: function () {
77
77
  var _deleteAvatar = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(userId) {
78
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
78
+ return _regeneratorRuntime.wrap(function (_context3) {
79
79
  while (1) switch (_context3.prev = _context3.next) {
80
80
  case 0:
81
81
  return _context3.abrupt("return", this.deleteResource("/".concat(userId, "/manage/avatar")));
@@ -94,7 +94,7 @@ export var IdentityClient = /*#__PURE__*/function (_RestClient) {
94
94
  key: "fetchUserAvatarInfo",
95
95
  value: function () {
96
96
  var _fetchUserAvatarInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(userId) {
97
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
97
+ return _regeneratorRuntime.wrap(function (_context4) {
98
98
  while (1) switch (_context4.prev = _context4.next) {
99
99
  case 0:
100
100
  return _context4.abrupt("return", this.getResource("/".concat(userId, "/manage/avatar")));
@@ -114,12 +114,12 @@ export var IdentityClient = /*#__PURE__*/function (_RestClient) {
114
114
  value: function () {
115
115
  var _updateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref) {
116
116
  var id, user;
117
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
117
+ return _regeneratorRuntime.wrap(function (_context5) {
118
118
  while (1) switch (_context5.prev = _context5.next) {
119
119
  case 0:
120
120
  id = _ref.id, user = _objectWithoutProperties(_ref, _excluded);
121
121
  return _context5.abrupt("return", this.patchResource("/".concat(id, "/manage/profile"), toManageAPIInput(user)));
122
- case 2:
122
+ case 1:
123
123
  case "end":
124
124
  return _context5.stop();
125
125
  }
@@ -135,22 +135,22 @@ export var IdentityClient = /*#__PURE__*/function (_RestClient) {
135
135
  value: function () {
136
136
  var _updateUserAvatar = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref2) {
137
137
  var id, fileURI, fileObject, formData, response;
138
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
138
+ return _regeneratorRuntime.wrap(function (_context6) {
139
139
  while (1) switch (_context6.prev = _context6.next) {
140
140
  case 0:
141
141
  id = _ref2.id, fileURI = _ref2.fileURI;
142
142
  fileObject = dataURItoFile(fileURI);
143
143
  formData = new FormData();
144
144
  formData.append('file', fileObject);
145
- _context6.next = 6;
145
+ _context6.next = 1;
146
146
  return this.makeRequest("/".concat(id, "/manage/avatar"), {
147
147
  method: 'PUT',
148
148
  body: formData
149
149
  });
150
- case 6:
150
+ case 1:
151
151
  response = _context6.sent;
152
152
  return _context6.abrupt("return", response.url);
153
- case 8:
153
+ case 2:
154
154
  case "end":
155
155
  return _context6.stop();
156
156
  }
@@ -34,13 +34,14 @@ export var InvitationsClient = /*#__PURE__*/function (_RestClient) {
34
34
  productQueryParams,
35
35
  capabilityQueryParams,
36
36
  url,
37
- _args = arguments;
38
- return _regeneratorRuntime.wrap(function _callee$(_context) {
37
+ _args = arguments,
38
+ _t;
39
+ return _regeneratorRuntime.wrap(function (_context) {
39
40
  while (1) switch (_context.prev = _context.next) {
40
41
  case 0:
41
42
  supportedProducts = _args.length > 0 && _args[0] !== undefined ? _args[0] : ALL_SUPPORTED_PRODUCTS;
42
43
  capabilities = _args.length > 1 ? _args[1] : undefined;
43
- _context.prev = 2;
44
+ _context.prev = 1;
44
45
  orgId = this.getOrgId();
45
46
  queryProducts = supportedProducts && supportedProducts.length > 0 ? supportedProducts : ALL_SUPPORTED_PRODUCTS;
46
47
  productQueryParams = queryProducts.map(function (product) {
@@ -50,20 +51,20 @@ export var InvitationsClient = /*#__PURE__*/function (_RestClient) {
50
51
  return "capability=".concat(capability);
51
52
  }).join('&') : '';
52
53
  url = "".concat(PRODUCT_RECCOMENDATIONS, "?orgId=").concat(orgId, "&").concat(productQueryParams).concat(capabilityQueryParams);
53
- _context.next = 10;
54
+ _context.next = 2;
54
55
  return this.getResource(url);
55
- case 10:
56
+ case 2:
56
57
  return _context.abrupt("return", _context.sent);
57
- case 13:
58
- _context.prev = 13;
59
- _context.t0 = _context["catch"](2);
60
- this.logException(_context.t0, 'An error occurred while getting product recommendations.');
61
- throw _context.t0;
62
- case 17:
58
+ case 3:
59
+ _context.prev = 3;
60
+ _t = _context["catch"](1);
61
+ this.logException(_t, 'An error occurred while getting product recommendations.');
62
+ throw _t;
63
+ case 4:
63
64
  case "end":
64
65
  return _context.stop();
65
66
  }
66
- }, _callee, this, [[2, 13]]);
67
+ }, _callee, this, [[1, 3]]);
67
68
  }));
68
69
  function getProductRecommendationsInner() {
69
70
  return _getProductRecommendationsInner.apply(this, arguments);
@@ -78,29 +79,30 @@ export var InvitationsClient = /*#__PURE__*/function (_RestClient) {
78
79
  capabilities,
79
80
  result,
80
81
  deduplicatedResult,
81
- _args2 = arguments;
82
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
82
+ _args2 = arguments,
83
+ _t2;
84
+ return _regeneratorRuntime.wrap(function (_context2) {
83
85
  while (1) switch (_context2.prev = _context2.next) {
84
86
  case 0:
85
87
  supportedProducts = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : ALL_SUPPORTED_PRODUCTS;
86
88
  capabilities = _args2.length > 1 ? _args2[1] : undefined;
87
- _context2.next = 4;
89
+ _context2.next = 1;
88
90
  return this.getProductRecommendationsInner(supportedProducts, capabilities);
89
- case 4:
91
+ case 1:
90
92
  result = _context2.sent;
91
- _context2.prev = 5;
93
+ _context2.prev = 2;
92
94
  deduplicatedResult = removeDuplicateRecommendations(result);
93
95
  return _context2.abrupt("return", deduplicatedResult);
94
- case 10:
95
- _context2.prev = 10;
96
- _context2.t0 = _context2["catch"](5);
97
- this.logException(_context2.t0, 'An error occurred while deduplicating product recommendations.');
98
- throw _context2.t0;
99
- case 14:
96
+ case 3:
97
+ _context2.prev = 3;
98
+ _t2 = _context2["catch"](2);
99
+ this.logException(_t2, 'An error occurred while deduplicating product recommendations.');
100
+ throw _t2;
101
+ case 4:
100
102
  case "end":
101
103
  return _context2.stop();
102
104
  }
103
- }, _callee2, this, [[5, 10]]);
105
+ }, _callee2, this, [[2, 3]]);
104
106
  }));
105
107
  function getProductRecommendations() {
106
108
  return _getProductRecommendations.apply(this, arguments);
@@ -111,17 +113,17 @@ export var InvitationsClient = /*#__PURE__*/function (_RestClient) {
111
113
  key: "joinOrRequestDefaultAccessToProductsBulk",
112
114
  value: function () {
113
115
  var _joinOrRequestDefaultAccessToProductsBulk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(simplifiedRequest) {
114
- var resources, request;
115
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
116
+ var resources, request, _t3;
117
+ return _regeneratorRuntime.wrap(function (_context3) {
116
118
  while (1) switch (_context3.prev = _context3.next) {
117
119
  case 0:
118
120
  if (!(simplifiedRequest.productAris.length === 0)) {
119
- _context3.next = 2;
121
+ _context3.next = 1;
120
122
  break;
121
123
  }
122
124
  return _context3.abrupt("return", Promise.resolve([]));
123
- case 2:
124
- _context3.prev = 2;
125
+ case 1:
126
+ _context3.prev = 1;
125
127
  resources = simplifiedRequest.productAris.map(function (ari) {
126
128
  return {
127
129
  ari: ari,
@@ -134,20 +136,20 @@ export var InvitationsClient = /*#__PURE__*/function (_RestClient) {
134
136
  accessMode: simplifiedRequest.accessMode,
135
137
  source: simplifiedRequest.source
136
138
  };
137
- _context3.next = 7;
139
+ _context3.next = 2;
138
140
  return this.postResource(PRODUCT_JOIN_OR_REQUEST_BULK, request);
139
- case 7:
141
+ case 2:
140
142
  return _context3.abrupt("return", _context3.sent);
141
- case 10:
142
- _context3.prev = 10;
143
- _context3.t0 = _context3["catch"](2);
144
- this.logException(_context3.t0, 'An error occurred while joining or requesting access to products.');
145
- throw _context3.t0;
146
- case 14:
143
+ case 3:
144
+ _context3.prev = 3;
145
+ _t3 = _context3["catch"](1);
146
+ this.logException(_t3, 'An error occurred while joining or requesting access to products.');
147
+ throw _t3;
148
+ case 4:
147
149
  case "end":
148
150
  return _context3.stop();
149
151
  }
150
- }, _callee3, this, [[2, 10]]);
152
+ }, _callee3, this, [[1, 3]]);
151
153
  }));
152
154
  function joinOrRequestDefaultAccessToProductsBulk(_x) {
153
155
  return _joinOrRequestDefaultAccessToProductsBulk.apply(this, arguments);