@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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/common/utils/http.js +8 -8
- package/dist/cjs/common/utils/permissions/has-permission.js +4 -0
- package/dist/cjs/common/utils/ufo/index.js +2 -2
- package/dist/cjs/services/agg-client/index.js +28 -28
- package/dist/cjs/services/directory-client/index.js +38 -36
- package/dist/cjs/services/graphql-client/main.js +13 -12
- package/dist/cjs/services/graphql-client/utils/index.js +32 -31
- package/dist/cjs/services/identity-client/index.js +10 -10
- package/dist/cjs/services/invitations-client/index.js +40 -38
- package/dist/cjs/services/legion-client/index.js +163 -162
- package/dist/cjs/services/main.js +162 -162
- package/dist/cjs/services/mutability-client/index.js +1 -1
- package/dist/cjs/services/object-resolver-client/index.js +18 -18
- package/dist/cjs/services/public-api-client/index.js +69 -68
- package/dist/cjs/services/replines-client/index.js +2 -2
- package/dist/cjs/services/reporting-lines-client/index.js +4 -4
- package/dist/cjs/services/rest-client/index.js +28 -28
- package/dist/cjs/services/rest-client/utils/parse-error-message.js +18 -18
- package/dist/cjs/services/sentry/main.js +23 -22
- package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/cjs/services/sentry/utils/initialise-sentry.js +6 -6
- package/dist/cjs/services/sentry/utils/sentry-client.js +20 -19
- package/dist/cjs/services/sentry/utils/use-teams-sentry-client-setup.js +4 -4
- package/dist/cjs/services/team-central-client/index.js +36 -36
- package/dist/cjs/services/teams-in-slack-client/index.js +3 -3
- package/dist/cjs/services/use-query-light/main.js +38 -38
- package/dist/cjs/services/user-preferences-client/index.js +6 -6
- package/dist/es2019/common/utils/permissions/has-permission.js +4 -0
- package/dist/es2019/common/utils/ufo/index.js +2 -2
- package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/common/utils/http.js +8 -8
- package/dist/esm/common/utils/permissions/has-permission.js +4 -0
- package/dist/esm/common/utils/ufo/index.js +2 -2
- package/dist/esm/services/agg-client/index.js +28 -28
- package/dist/esm/services/directory-client/index.js +38 -36
- package/dist/esm/services/graphql-client/main.js +13 -12
- package/dist/esm/services/graphql-client/utils/index.js +32 -31
- package/dist/esm/services/identity-client/index.js +10 -10
- package/dist/esm/services/invitations-client/index.js +40 -38
- package/dist/esm/services/legion-client/index.js +163 -162
- package/dist/esm/services/main.js +162 -162
- package/dist/esm/services/mutability-client/index.js +1 -1
- package/dist/esm/services/object-resolver-client/index.js +18 -18
- package/dist/esm/services/public-api-client/index.js +69 -68
- package/dist/esm/services/replines-client/index.js +2 -2
- package/dist/esm/services/reporting-lines-client/index.js +4 -4
- package/dist/esm/services/rest-client/index.js +28 -28
- package/dist/esm/services/rest-client/utils/parse-error-message.js +18 -18
- package/dist/esm/services/sentry/main.js +23 -22
- package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
- package/dist/esm/services/sentry/utils/initialise-sentry.js +6 -6
- package/dist/esm/services/sentry/utils/sentry-client.js +19 -18
- package/dist/esm/services/sentry/utils/use-teams-sentry-client-setup.js +4 -4
- package/dist/esm/services/team-central-client/index.js +36 -36
- package/dist/esm/services/teams-in-slack-client/index.js +3 -3
- package/dist/esm/services/use-query-light/main.js +38 -38
- package/dist/esm/services/user-preferences-client/index.js +6 -6
- package/dist/types/common/utils/permissions/has-permission.d.ts +4 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types-ts4.5/common/utils/permissions/has-permission.d.ts +4 -0
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/package.json +2 -1
|
@@ -36,7 +36,7 @@ var IdentityClient = exports.IdentityClient = /*#__PURE__*/function (_RestClient
|
|
|
36
36
|
key: "getUserManageConfig",
|
|
37
37
|
value: function () {
|
|
38
38
|
var _getUserManageConfig = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(userId) {
|
|
39
|
-
return _regenerator.default.wrap(function
|
|
39
|
+
return _regenerator.default.wrap(function (_context) {
|
|
40
40
|
while (1) switch (_context.prev = _context.next) {
|
|
41
41
|
case 0:
|
|
42
42
|
return _context.abrupt("return", this.getResourceCached("/".concat(userId, "/manage")).then(function (resp) {
|
|
@@ -61,7 +61,7 @@ var IdentityClient = exports.IdentityClient = /*#__PURE__*/function (_RestClient
|
|
|
61
61
|
key: "getMyAvatarUploadedStatus",
|
|
62
62
|
value: (function () {
|
|
63
63
|
var _getMyAvatarUploadedStatus = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(userId) {
|
|
64
|
-
return _regenerator.default.wrap(function
|
|
64
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
65
65
|
while (1) switch (_context2.prev = _context2.next) {
|
|
66
66
|
case 0:
|
|
67
67
|
return _context2.abrupt("return", this.fetchUserAvatarInfo(userId));
|
|
@@ -80,7 +80,7 @@ var IdentityClient = exports.IdentityClient = /*#__PURE__*/function (_RestClient
|
|
|
80
80
|
key: "deleteAvatar",
|
|
81
81
|
value: function () {
|
|
82
82
|
var _deleteAvatar = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(userId) {
|
|
83
|
-
return _regenerator.default.wrap(function
|
|
83
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
84
84
|
while (1) switch (_context3.prev = _context3.next) {
|
|
85
85
|
case 0:
|
|
86
86
|
return _context3.abrupt("return", this.deleteResource("/".concat(userId, "/manage/avatar")));
|
|
@@ -99,7 +99,7 @@ var IdentityClient = exports.IdentityClient = /*#__PURE__*/function (_RestClient
|
|
|
99
99
|
key: "fetchUserAvatarInfo",
|
|
100
100
|
value: function () {
|
|
101
101
|
var _fetchUserAvatarInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(userId) {
|
|
102
|
-
return _regenerator.default.wrap(function
|
|
102
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
103
103
|
while (1) switch (_context4.prev = _context4.next) {
|
|
104
104
|
case 0:
|
|
105
105
|
return _context4.abrupt("return", this.getResource("/".concat(userId, "/manage/avatar")));
|
|
@@ -119,12 +119,12 @@ var IdentityClient = exports.IdentityClient = /*#__PURE__*/function (_RestClient
|
|
|
119
119
|
value: function () {
|
|
120
120
|
var _updateUser = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref) {
|
|
121
121
|
var id, user;
|
|
122
|
-
return _regenerator.default.wrap(function
|
|
122
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
123
123
|
while (1) switch (_context5.prev = _context5.next) {
|
|
124
124
|
case 0:
|
|
125
125
|
id = _ref.id, user = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
126
126
|
return _context5.abrupt("return", this.patchResource("/".concat(id, "/manage/profile"), (0, _utils.toManageAPIInput)(user)));
|
|
127
|
-
case
|
|
127
|
+
case 1:
|
|
128
128
|
case "end":
|
|
129
129
|
return _context5.stop();
|
|
130
130
|
}
|
|
@@ -140,22 +140,22 @@ var IdentityClient = exports.IdentityClient = /*#__PURE__*/function (_RestClient
|
|
|
140
140
|
value: function () {
|
|
141
141
|
var _updateUserAvatar = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(_ref2) {
|
|
142
142
|
var id, fileURI, fileObject, formData, response;
|
|
143
|
-
return _regenerator.default.wrap(function
|
|
143
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
144
144
|
while (1) switch (_context6.prev = _context6.next) {
|
|
145
145
|
case 0:
|
|
146
146
|
id = _ref2.id, fileURI = _ref2.fileURI;
|
|
147
147
|
fileObject = (0, _utils.dataURItoFile)(fileURI);
|
|
148
148
|
formData = new FormData();
|
|
149
149
|
formData.append('file', fileObject);
|
|
150
|
-
_context6.next =
|
|
150
|
+
_context6.next = 1;
|
|
151
151
|
return this.makeRequest("/".concat(id, "/manage/avatar"), {
|
|
152
152
|
method: 'PUT',
|
|
153
153
|
body: formData
|
|
154
154
|
});
|
|
155
|
-
case
|
|
155
|
+
case 1:
|
|
156
156
|
response = _context6.sent;
|
|
157
157
|
return _context6.abrupt("return", response.url);
|
|
158
|
-
case
|
|
158
|
+
case 2:
|
|
159
159
|
case "end":
|
|
160
160
|
return _context6.stop();
|
|
161
161
|
}
|
|
@@ -41,13 +41,14 @@ var InvitationsClient = exports.InvitationsClient = /*#__PURE__*/function (_Rest
|
|
|
41
41
|
productQueryParams,
|
|
42
42
|
capabilityQueryParams,
|
|
43
43
|
url,
|
|
44
|
-
_args = arguments
|
|
45
|
-
|
|
44
|
+
_args = arguments,
|
|
45
|
+
_t;
|
|
46
|
+
return _regenerator.default.wrap(function (_context) {
|
|
46
47
|
while (1) switch (_context.prev = _context.next) {
|
|
47
48
|
case 0:
|
|
48
49
|
supportedProducts = _args.length > 0 && _args[0] !== undefined ? _args[0] : ALL_SUPPORTED_PRODUCTS;
|
|
49
50
|
capabilities = _args.length > 1 ? _args[1] : undefined;
|
|
50
|
-
_context.prev =
|
|
51
|
+
_context.prev = 1;
|
|
51
52
|
orgId = this.getOrgId();
|
|
52
53
|
queryProducts = supportedProducts && supportedProducts.length > 0 ? supportedProducts : ALL_SUPPORTED_PRODUCTS;
|
|
53
54
|
productQueryParams = queryProducts.map(function (product) {
|
|
@@ -57,20 +58,20 @@ var InvitationsClient = exports.InvitationsClient = /*#__PURE__*/function (_Rest
|
|
|
57
58
|
return "capability=".concat(capability);
|
|
58
59
|
}).join('&') : '';
|
|
59
60
|
url = "".concat(PRODUCT_RECCOMENDATIONS, "?orgId=").concat(orgId, "&").concat(productQueryParams).concat(capabilityQueryParams);
|
|
60
|
-
_context.next =
|
|
61
|
+
_context.next = 2;
|
|
61
62
|
return this.getResource(url);
|
|
62
|
-
case
|
|
63
|
+
case 2:
|
|
63
64
|
return _context.abrupt("return", _context.sent);
|
|
64
|
-
case
|
|
65
|
-
_context.prev =
|
|
66
|
-
|
|
67
|
-
this.logException(
|
|
68
|
-
throw
|
|
69
|
-
case
|
|
65
|
+
case 3:
|
|
66
|
+
_context.prev = 3;
|
|
67
|
+
_t = _context["catch"](1);
|
|
68
|
+
this.logException(_t, 'An error occurred while getting product recommendations.');
|
|
69
|
+
throw _t;
|
|
70
|
+
case 4:
|
|
70
71
|
case "end":
|
|
71
72
|
return _context.stop();
|
|
72
73
|
}
|
|
73
|
-
}, _callee, this, [[
|
|
74
|
+
}, _callee, this, [[1, 3]]);
|
|
74
75
|
}));
|
|
75
76
|
function getProductRecommendationsInner() {
|
|
76
77
|
return _getProductRecommendationsInner.apply(this, arguments);
|
|
@@ -85,29 +86,30 @@ var InvitationsClient = exports.InvitationsClient = /*#__PURE__*/function (_Rest
|
|
|
85
86
|
capabilities,
|
|
86
87
|
result,
|
|
87
88
|
deduplicatedResult,
|
|
88
|
-
_args2 = arguments
|
|
89
|
-
|
|
89
|
+
_args2 = arguments,
|
|
90
|
+
_t2;
|
|
91
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
90
92
|
while (1) switch (_context2.prev = _context2.next) {
|
|
91
93
|
case 0:
|
|
92
94
|
supportedProducts = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : ALL_SUPPORTED_PRODUCTS;
|
|
93
95
|
capabilities = _args2.length > 1 ? _args2[1] : undefined;
|
|
94
|
-
_context2.next =
|
|
96
|
+
_context2.next = 1;
|
|
95
97
|
return this.getProductRecommendationsInner(supportedProducts, capabilities);
|
|
96
|
-
case
|
|
98
|
+
case 1:
|
|
97
99
|
result = _context2.sent;
|
|
98
|
-
_context2.prev =
|
|
100
|
+
_context2.prev = 2;
|
|
99
101
|
deduplicatedResult = (0, _utils.removeDuplicateRecommendations)(result);
|
|
100
102
|
return _context2.abrupt("return", deduplicatedResult);
|
|
101
|
-
case
|
|
102
|
-
_context2.prev =
|
|
103
|
-
|
|
104
|
-
this.logException(
|
|
105
|
-
throw
|
|
106
|
-
case
|
|
103
|
+
case 3:
|
|
104
|
+
_context2.prev = 3;
|
|
105
|
+
_t2 = _context2["catch"](2);
|
|
106
|
+
this.logException(_t2, 'An error occurred while deduplicating product recommendations.');
|
|
107
|
+
throw _t2;
|
|
108
|
+
case 4:
|
|
107
109
|
case "end":
|
|
108
110
|
return _context2.stop();
|
|
109
111
|
}
|
|
110
|
-
}, _callee2, this, [[
|
|
112
|
+
}, _callee2, this, [[2, 3]]);
|
|
111
113
|
}));
|
|
112
114
|
function getProductRecommendations() {
|
|
113
115
|
return _getProductRecommendations.apply(this, arguments);
|
|
@@ -118,17 +120,17 @@ var InvitationsClient = exports.InvitationsClient = /*#__PURE__*/function (_Rest
|
|
|
118
120
|
key: "joinOrRequestDefaultAccessToProductsBulk",
|
|
119
121
|
value: function () {
|
|
120
122
|
var _joinOrRequestDefaultAccessToProductsBulk = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(simplifiedRequest) {
|
|
121
|
-
var resources, request;
|
|
122
|
-
return _regenerator.default.wrap(function
|
|
123
|
+
var resources, request, _t3;
|
|
124
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
123
125
|
while (1) switch (_context3.prev = _context3.next) {
|
|
124
126
|
case 0:
|
|
125
127
|
if (!(simplifiedRequest.productAris.length === 0)) {
|
|
126
|
-
_context3.next =
|
|
128
|
+
_context3.next = 1;
|
|
127
129
|
break;
|
|
128
130
|
}
|
|
129
131
|
return _context3.abrupt("return", Promise.resolve([]));
|
|
130
|
-
case
|
|
131
|
-
_context3.prev =
|
|
132
|
+
case 1:
|
|
133
|
+
_context3.prev = 1;
|
|
132
134
|
resources = simplifiedRequest.productAris.map(function (ari) {
|
|
133
135
|
return {
|
|
134
136
|
ari: ari,
|
|
@@ -141,20 +143,20 @@ var InvitationsClient = exports.InvitationsClient = /*#__PURE__*/function (_Rest
|
|
|
141
143
|
accessMode: simplifiedRequest.accessMode,
|
|
142
144
|
source: simplifiedRequest.source
|
|
143
145
|
};
|
|
144
|
-
_context3.next =
|
|
146
|
+
_context3.next = 2;
|
|
145
147
|
return this.postResource(PRODUCT_JOIN_OR_REQUEST_BULK, request);
|
|
146
|
-
case
|
|
148
|
+
case 2:
|
|
147
149
|
return _context3.abrupt("return", _context3.sent);
|
|
148
|
-
case
|
|
149
|
-
_context3.prev =
|
|
150
|
-
|
|
151
|
-
this.logException(
|
|
152
|
-
throw
|
|
153
|
-
case
|
|
150
|
+
case 3:
|
|
151
|
+
_context3.prev = 3;
|
|
152
|
+
_t3 = _context3["catch"](1);
|
|
153
|
+
this.logException(_t3, 'An error occurred while joining or requesting access to products.');
|
|
154
|
+
throw _t3;
|
|
155
|
+
case 4:
|
|
154
156
|
case "end":
|
|
155
157
|
return _context3.stop();
|
|
156
158
|
}
|
|
157
|
-
}, _callee3, this, [[
|
|
159
|
+
}, _callee3, this, [[1, 3]]);
|
|
158
160
|
}));
|
|
159
161
|
function joinOrRequestDefaultAccessToProductsBulk(_x) {
|
|
160
162
|
return _joinOrRequestDefaultAccessToProductsBulk.apply(this, arguments);
|