@atlaskit/profilecard 24.14.0 → 24.15.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 +21 -0
- package/__tests__/vr-tests/__snapshots__/user-profilecard/error-state--default.png +0 -0
- package/__tests__/vr-tests/agent-profilecard.vr.tsx +7 -1
- package/__tests__/vr-tests/user-profilecard.vr.tsx +42 -6
- package/dist/cjs/client/ProfileCardClient.js +10 -10
- package/dist/cjs/client/RovoAgentCardClient.js +172 -56
- package/dist/cjs/client/TeamProfileCardClient.js +44 -14
- package/dist/cjs/client/UserProfileCardClient.js +2 -9
- package/dist/cjs/client/errorUtils.js +83 -5
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/components/Agent/Actions.js +25 -11
- package/dist/cjs/components/Agent/ActionsCompiled.compiled.css +19 -0
- package/dist/cjs/components/Agent/ActionsCompiled.js +150 -0
- package/dist/cjs/components/Agent/AgentDeleteConfirmationModal.js +2 -4
- package/dist/cjs/components/Agent/AgentProfileCard.js +28 -14
- package/dist/cjs/components/Agent/AgentProfileCardCompiled.compiled.css +8 -0
- package/dist/cjs/components/Agent/AgentProfileCardCompiled.js +257 -0
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +8 -5
- package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +6 -2
- package/dist/cjs/components/Agent/AgentProfileCardWrapper.compiled.css +1 -0
- package/dist/cjs/components/Agent/AgentProfileCardWrapper.js +9 -8
- package/dist/cjs/components/Agent/ConversationStarters.js +2 -4
- package/dist/cjs/components/Agent/hooks/useAgentActions.js +61 -30
- package/dist/cjs/components/Error/ErrorMessage.js +3 -3
- package/dist/cjs/components/Team/TeamForbiddenErrorState.js +21 -6
- package/dist/cjs/components/Team/TeamLoadingState.js +21 -6
- package/dist/cjs/components/Team/TeamProfileCard.js +155 -60
- package/dist/cjs/components/Team/TeamProfileCardTrigger.js +107 -36
- package/dist/cjs/components/User/ProfileCardDetails.compiled.css +0 -1
- package/dist/cjs/components/User/ProfileCardDetails.js +2 -4
- package/dist/cjs/components/User/ReportingLinesDetails.js +4 -1
- package/dist/cjs/components/User/ReportingLinesDetailsCompiled.compiled.css +11 -0
- package/dist/cjs/components/User/ReportingLinesDetailsCompiled.js +109 -0
- package/dist/cjs/components/common/ProfileCardWrapper.compiled.css +1 -0
- package/dist/cjs/components/common/ProfileCardWrapper.js +9 -8
- package/dist/cjs/components/team-profile-card/main.js +18 -9
- package/dist/cjs/components/team-profile-card/team-actions/more-actions/index.js +2 -4
- package/dist/cjs/components/team-profile-card/team-connections/main.js +36 -17
- package/dist/cjs/styled/CoverImage.compiled.css +2 -0
- package/dist/cjs/styled/CoverImage.js +4 -2
- package/dist/cjs/styled/Error.compiled.css +0 -2
- package/dist/cjs/styled/Error.js +5 -3
- package/dist/cjs/util/analytics.js +57 -2
- package/dist/es2019/client/ProfileCardClient.js +10 -10
- package/dist/es2019/client/RovoAgentCardClient.js +186 -58
- package/dist/es2019/client/TeamProfileCardClient.js +49 -16
- package/dist/es2019/client/UserProfileCardClient.js +3 -10
- package/dist/es2019/client/errorUtils.js +84 -3
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/components/Agent/Actions.js +26 -11
- package/dist/es2019/components/Agent/ActionsCompiled.compiled.css +19 -0
- package/dist/es2019/components/Agent/ActionsCompiled.js +127 -0
- package/dist/es2019/components/Agent/AgentDeleteConfirmationModal.js +1 -2
- package/dist/es2019/components/Agent/AgentProfileCard.js +28 -13
- package/dist/es2019/components/Agent/AgentProfileCardCompiled.compiled.css +8 -0
- package/dist/es2019/components/Agent/AgentProfileCardCompiled.js +200 -0
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +9 -5
- package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +7 -2
- package/dist/es2019/components/Agent/AgentProfileCardWrapper.compiled.css +1 -0
- package/dist/es2019/components/Agent/AgentProfileCardWrapper.js +8 -7
- package/dist/es2019/components/Agent/ConversationStarters.js +1 -3
- package/dist/es2019/components/Agent/hooks/useAgentActions.js +62 -30
- package/dist/es2019/components/Error/ErrorMessage.js +1 -2
- package/dist/es2019/components/Team/TeamForbiddenErrorState.js +17 -6
- package/dist/es2019/components/Team/TeamLoadingState.js +17 -6
- package/dist/es2019/components/Team/TeamProfileCard.js +144 -54
- package/dist/es2019/components/Team/TeamProfileCardTrigger.js +75 -12
- package/dist/es2019/components/User/ProfileCardDetails.compiled.css +0 -1
- package/dist/es2019/components/User/ProfileCardDetails.js +1 -4
- package/dist/es2019/components/User/ReportingLinesDetails.js +4 -1
- package/dist/es2019/components/User/ReportingLinesDetailsCompiled.compiled.css +11 -0
- package/dist/es2019/components/User/ReportingLinesDetailsCompiled.js +96 -0
- package/dist/es2019/components/common/ProfileCardWrapper.compiled.css +1 -0
- package/dist/es2019/components/common/ProfileCardWrapper.js +8 -7
- package/dist/es2019/components/team-profile-card/main.js +19 -9
- package/dist/es2019/components/team-profile-card/team-actions/more-actions/index.js +1 -2
- package/dist/es2019/components/team-profile-card/team-connections/main.js +38 -17
- package/dist/es2019/styled/CoverImage.compiled.css +2 -0
- package/dist/es2019/styled/CoverImage.js +4 -2
- package/dist/es2019/styled/Error.compiled.css +0 -2
- package/dist/es2019/styled/Error.js +6 -4
- package/dist/es2019/util/analytics.js +57 -2
- package/dist/esm/client/ProfileCardClient.js +10 -10
- package/dist/esm/client/RovoAgentCardClient.js +174 -58
- package/dist/esm/client/TeamProfileCardClient.js +46 -16
- package/dist/esm/client/UserProfileCardClient.js +3 -10
- package/dist/esm/client/errorUtils.js +82 -4
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/components/Agent/Actions.js +25 -11
- package/dist/esm/components/Agent/ActionsCompiled.compiled.css +19 -0
- package/dist/esm/components/Agent/ActionsCompiled.js +141 -0
- package/dist/esm/components/Agent/AgentDeleteConfirmationModal.js +1 -2
- package/dist/esm/components/Agent/AgentProfileCard.js +29 -13
- package/dist/esm/components/Agent/AgentProfileCardCompiled.compiled.css +8 -0
- package/dist/esm/components/Agent/AgentProfileCardCompiled.js +248 -0
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +8 -5
- package/dist/esm/components/Agent/AgentProfileCardTrigger.js +6 -2
- package/dist/esm/components/Agent/AgentProfileCardWrapper.compiled.css +1 -0
- package/dist/esm/components/Agent/AgentProfileCardWrapper.js +8 -7
- package/dist/esm/components/Agent/ConversationStarters.js +1 -3
- package/dist/esm/components/Agent/hooks/useAgentActions.js +61 -30
- package/dist/esm/components/Error/ErrorMessage.js +1 -2
- package/dist/esm/components/Team/TeamForbiddenErrorState.js +22 -7
- package/dist/esm/components/Team/TeamLoadingState.js +22 -7
- package/dist/esm/components/Team/TeamProfileCard.js +156 -61
- package/dist/esm/components/Team/TeamProfileCardTrigger.js +106 -36
- package/dist/esm/components/User/ProfileCardDetails.compiled.css +0 -1
- package/dist/esm/components/User/ProfileCardDetails.js +1 -4
- package/dist/esm/components/User/ReportingLinesDetails.js +4 -1
- package/dist/esm/components/User/ReportingLinesDetailsCompiled.compiled.css +11 -0
- package/dist/esm/components/User/ReportingLinesDetailsCompiled.js +102 -0
- package/dist/esm/components/common/ProfileCardWrapper.compiled.css +1 -0
- package/dist/esm/components/common/ProfileCardWrapper.js +8 -7
- package/dist/esm/components/team-profile-card/main.js +18 -9
- package/dist/esm/components/team-profile-card/team-actions/more-actions/index.js +1 -2
- package/dist/esm/components/team-profile-card/team-connections/main.js +36 -17
- package/dist/esm/styled/CoverImage.compiled.css +2 -0
- package/dist/esm/styled/CoverImage.js +4 -2
- package/dist/esm/styled/Error.compiled.css +0 -2
- package/dist/esm/styled/Error.js +6 -4
- package/dist/esm/util/analytics.js +57 -2
- package/dist/types/client/ProfileCardClient.d.ts +5 -5
- package/dist/types/client/RovoAgentCardClient.d.ts +5 -4
- package/dist/types/client/TeamProfileCardClient.d.ts +2 -1
- package/dist/types/client/errorUtils.d.ts +2 -1
- package/dist/types/client/types.d.ts +14 -2
- package/dist/types/components/Agent/Actions.d.ts +10 -1
- package/dist/types/components/Agent/ActionsCompiled.d.ts +14 -0
- package/dist/types/components/Agent/AgentProfileCard.d.ts +13 -3
- package/dist/types/components/Agent/AgentProfileCardCompiled.d.ts +4 -0
- package/dist/types/components/Agent/lazyAgentProfileCard.d.ts +12 -1
- package/dist/types/components/Team/TeamForbiddenErrorState.d.ts +2 -1
- package/dist/types/components/Team/TeamLoadingState.d.ts +2 -1
- package/dist/types/components/Team/TeamProfileCardTrigger.d.ts +7 -2
- package/dist/types/components/User/ReportingLinesDetails.d.ts +2 -2
- package/dist/types/components/User/ReportingLinesDetailsCompiled.d.ts +5 -0
- package/dist/types/types.d.ts +2 -0
- package/dist/types/util/analytics.d.ts +46 -2
- package/dist/types-ts4.5/client/ProfileCardClient.d.ts +5 -5
- package/dist/types-ts4.5/client/RovoAgentCardClient.d.ts +5 -4
- package/dist/types-ts4.5/client/TeamProfileCardClient.d.ts +2 -1
- package/dist/types-ts4.5/client/errorUtils.d.ts +2 -1
- package/dist/types-ts4.5/client/types.d.ts +14 -2
- package/dist/types-ts4.5/components/Agent/Actions.d.ts +10 -1
- package/dist/types-ts4.5/components/Agent/ActionsCompiled.d.ts +14 -0
- package/dist/types-ts4.5/components/Agent/AgentProfileCard.d.ts +13 -3
- package/dist/types-ts4.5/components/Agent/AgentProfileCardCompiled.d.ts +4 -0
- package/dist/types-ts4.5/components/Agent/lazyAgentProfileCard.d.ts +12 -1
- package/dist/types-ts4.5/components/Team/TeamForbiddenErrorState.d.ts +2 -1
- package/dist/types-ts4.5/components/Team/TeamLoadingState.d.ts +2 -1
- package/dist/types-ts4.5/components/Team/TeamProfileCardTrigger.d.ts +7 -2
- package/dist/types-ts4.5/components/User/ReportingLinesDetails.d.ts +2 -2
- package/dist/types-ts4.5/components/User/ReportingLinesDetailsCompiled.d.ts +5 -0
- package/dist/types-ts4.5/types.d.ts +2 -0
- package/dist/types-ts4.5/util/analytics.d.ts +46 -2
- package/package.json +15 -9
|
@@ -11,10 +11,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
11
11
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
12
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
-
import { agentRequestAnalytics } from '../util/analytics';
|
|
14
|
+
import { agentRequestAnalytics, PACKAGE_META_DATA } from '../util/analytics';
|
|
15
15
|
import { getPageTime } from '../util/performance';
|
|
16
16
|
import CachingClient from './CachingClient';
|
|
17
|
-
import { getErrorAttributes } from './errorUtils';
|
|
17
|
+
import { DEPRECATED_getErrorAttributes, getErrorAttributes } from './errorUtils';
|
|
18
18
|
var createHeaders = function createHeaders(product, cloudId, isBodyJson) {
|
|
19
19
|
var headers = new Headers({
|
|
20
20
|
'X-Product': product,
|
|
@@ -66,7 +66,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
66
66
|
}
|
|
67
67
|
}, {
|
|
68
68
|
key: "getProfile",
|
|
69
|
-
value: function getProfile(id, analytics) {
|
|
69
|
+
value: function getProfile(id, analytics, analyticsNext) {
|
|
70
70
|
var _this2 = this;
|
|
71
71
|
if (!id.value) {
|
|
72
72
|
return Promise.reject(new Error('Id is missing'));
|
|
@@ -80,27 +80,56 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
80
80
|
}
|
|
81
81
|
return new Promise(function (resolve, reject) {
|
|
82
82
|
var startTime = getPageTime();
|
|
83
|
-
if (analytics) {
|
|
84
|
-
|
|
83
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
84
|
+
if (analyticsNext) {
|
|
85
|
+
analyticsNext('operational.rovoAgentProfilecard.triggered.request', _objectSpread({
|
|
86
|
+
firedAt: Math.round(getPageTime())
|
|
87
|
+
}, PACKAGE_META_DATA));
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
if (analytics) {
|
|
91
|
+
analytics(agentRequestAnalytics('triggered'));
|
|
92
|
+
}
|
|
85
93
|
}
|
|
86
94
|
_this2.makeRequest(id, _this2.options.cloudId || '').then(function (data) {
|
|
87
95
|
if (_this2.cache) {
|
|
88
96
|
_this2.setCachedProfile(id.value, data);
|
|
89
97
|
}
|
|
90
|
-
if (analytics) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
99
|
+
if (analyticsNext) {
|
|
100
|
+
analyticsNext('operational.rovoAgentProfilecard.succeeded.request', _objectSpread({
|
|
101
|
+
duration: getPageTime() - startTime,
|
|
102
|
+
gateway: true,
|
|
103
|
+
firedAt: Math.round(getPageTime())
|
|
104
|
+
}, PACKAGE_META_DATA));
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
if (analytics) {
|
|
108
|
+
analytics(agentRequestAnalytics('succeeded', 'request', {
|
|
109
|
+
duration: getPageTime() - startTime,
|
|
110
|
+
gateway: true
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
95
113
|
}
|
|
96
114
|
resolve(data);
|
|
97
115
|
}).catch(function (error) {
|
|
98
|
-
if (analytics) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
116
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
117
|
+
if (analyticsNext) {
|
|
118
|
+
analyticsNext('operational.rovoAgentProfilecard.failed.request', _objectSpread(_objectSpread({
|
|
119
|
+
duration: getPageTime() - startTime
|
|
120
|
+
}, getErrorAttributes(error)), {}, {
|
|
121
|
+
gateway: true,
|
|
122
|
+
firedAt: Math.round(getPageTime())
|
|
123
|
+
}, PACKAGE_META_DATA));
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
if (analytics) {
|
|
127
|
+
analytics(agentRequestAnalytics('failed', 'request', _objectSpread(_objectSpread({
|
|
128
|
+
duration: getPageTime() - startTime
|
|
129
|
+
}, DEPRECATED_getErrorAttributes(error)), {}, {
|
|
130
|
+
gateway: true
|
|
131
|
+
})));
|
|
132
|
+
}
|
|
104
133
|
}
|
|
105
134
|
reject(error);
|
|
106
135
|
});
|
|
@@ -108,7 +137,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
108
137
|
}
|
|
109
138
|
}, {
|
|
110
139
|
key: "deleteAgent",
|
|
111
|
-
value: function deleteAgent(agentId, analytics) {
|
|
140
|
+
value: function deleteAgent(agentId, analytics, analyticsNext) {
|
|
112
141
|
var _this3 = this;
|
|
113
142
|
if (!this.options.cloudId) {
|
|
114
143
|
return Promise.reject(new Error('cloudId is missing'));
|
|
@@ -116,8 +145,16 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
116
145
|
return new Promise(function (resolve, reject) {
|
|
117
146
|
var startTime = getPageTime();
|
|
118
147
|
var product = _this3.options.productIdentifier || 'rovo';
|
|
119
|
-
if (analytics) {
|
|
120
|
-
|
|
148
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
149
|
+
if (analyticsNext) {
|
|
150
|
+
analyticsNext('operational.rovoAgentProfilecard.triggered.request', _objectSpread({
|
|
151
|
+
firedAt: Math.round(getPageTime())
|
|
152
|
+
}, PACKAGE_META_DATA));
|
|
153
|
+
}
|
|
154
|
+
} else {
|
|
155
|
+
if (analytics) {
|
|
156
|
+
analytics(agentRequestAnalytics('triggered'));
|
|
157
|
+
}
|
|
121
158
|
}
|
|
122
159
|
var headers = createHeaders(product, _this3.options.cloudId);
|
|
123
160
|
fetch(new Request("".concat(_this3.basePath(), "/").concat(agentId), {
|
|
@@ -126,20 +163,41 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
126
163
|
mode: 'cors',
|
|
127
164
|
headers: headers
|
|
128
165
|
})).then(function () {
|
|
129
|
-
if (analytics) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
166
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
167
|
+
if (analyticsNext) {
|
|
168
|
+
analyticsNext('operational.rovoAgentProfilecard.succeeded.deleteAgent', _objectSpread({
|
|
169
|
+
duration: getPageTime() - startTime,
|
|
170
|
+
gateway: true,
|
|
171
|
+
firedAt: Math.round(getPageTime())
|
|
172
|
+
}, PACKAGE_META_DATA));
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
if (analytics) {
|
|
176
|
+
analytics(agentRequestAnalytics('succeeded', 'deleteAgent', {
|
|
177
|
+
duration: getPageTime() - startTime,
|
|
178
|
+
gateway: true
|
|
179
|
+
}));
|
|
180
|
+
}
|
|
134
181
|
}
|
|
135
182
|
resolve();
|
|
136
183
|
}).catch(function (error) {
|
|
137
|
-
if (analytics) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
184
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
185
|
+
if (analyticsNext) {
|
|
186
|
+
analyticsNext('operational.rovoAgentProfilecard.failed.deleteAgent', _objectSpread(_objectSpread({
|
|
187
|
+
duration: getPageTime() - startTime
|
|
188
|
+
}, getErrorAttributes(error)), {}, {
|
|
189
|
+
gateway: true,
|
|
190
|
+
firedAt: Math.round(getPageTime())
|
|
191
|
+
}, PACKAGE_META_DATA));
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
if (analytics) {
|
|
195
|
+
analytics(agentRequestAnalytics('failed', 'deleteAgent', _objectSpread(_objectSpread({
|
|
196
|
+
duration: getPageTime() - startTime
|
|
197
|
+
}, DEPRECATED_getErrorAttributes(error)), {}, {
|
|
198
|
+
gateway: true
|
|
199
|
+
})));
|
|
200
|
+
}
|
|
143
201
|
}
|
|
144
202
|
reject(error);
|
|
145
203
|
});
|
|
@@ -147,7 +205,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
147
205
|
}
|
|
148
206
|
}, {
|
|
149
207
|
key: "setFavouriteAgent",
|
|
150
|
-
value: function setFavouriteAgent(agentId, isFavourite, analytics) {
|
|
208
|
+
value: function setFavouriteAgent(agentId, isFavourite, analytics, analyticsNext) {
|
|
151
209
|
var _this4 = this;
|
|
152
210
|
if (!this.options.cloudId) {
|
|
153
211
|
return Promise.reject(new Error('cloudId is missing'));
|
|
@@ -162,8 +220,16 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
162
220
|
product = _this4.options.productIdentifier || 'rovo';
|
|
163
221
|
actionSubjectId = isFavourite ? 'favourite' : 'unfavourite';
|
|
164
222
|
requestMethod = isFavourite ? 'POST' : 'DELETE';
|
|
165
|
-
if (analytics) {
|
|
166
|
-
|
|
223
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
224
|
+
if (analyticsNext) {
|
|
225
|
+
analyticsNext("operational.rovoAgentProfilecard.triggered.".concat(actionSubjectId), _objectSpread({
|
|
226
|
+
firedAt: Math.round(getPageTime())
|
|
227
|
+
}, PACKAGE_META_DATA));
|
|
228
|
+
}
|
|
229
|
+
} else {
|
|
230
|
+
if (analytics) {
|
|
231
|
+
analytics(agentRequestAnalytics('triggered', 'actionSubjectId'));
|
|
232
|
+
}
|
|
167
233
|
}
|
|
168
234
|
headers = createHeaders(product, _this4.options.cloudId);
|
|
169
235
|
_context.next = 8;
|
|
@@ -173,20 +239,41 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
173
239
|
mode: 'cors',
|
|
174
240
|
headers: headers
|
|
175
241
|
})).then(function () {
|
|
176
|
-
if (analytics) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
242
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
243
|
+
if (analyticsNext) {
|
|
244
|
+
analyticsNext("operational.rovoAgentProfilecard.succeeded.".concat(actionSubjectId), _objectSpread({
|
|
245
|
+
duration: getPageTime() - startTime,
|
|
246
|
+
gateway: true,
|
|
247
|
+
firedAt: Math.round(getPageTime())
|
|
248
|
+
}, PACKAGE_META_DATA));
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
if (analytics) {
|
|
252
|
+
analytics(agentRequestAnalytics('succeeded', actionSubjectId, {
|
|
253
|
+
duration: getPageTime() - startTime,
|
|
254
|
+
gateway: true
|
|
255
|
+
}));
|
|
256
|
+
}
|
|
181
257
|
}
|
|
182
258
|
resolve();
|
|
183
259
|
}).catch(function (error) {
|
|
184
|
-
if (analytics) {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
260
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
261
|
+
if (analyticsNext) {
|
|
262
|
+
analyticsNext("operational.rovoAgentProfilecard.failed.".concat(actionSubjectId), _objectSpread(_objectSpread({
|
|
263
|
+
duration: getPageTime() - startTime
|
|
264
|
+
}, getErrorAttributes(error)), {}, {
|
|
265
|
+
gateway: true,
|
|
266
|
+
firedAt: Math.round(getPageTime())
|
|
267
|
+
}, PACKAGE_META_DATA));
|
|
268
|
+
}
|
|
269
|
+
} else {
|
|
270
|
+
if (analytics) {
|
|
271
|
+
analytics(agentRequestAnalytics('failed', actionSubjectId, _objectSpread(_objectSpread({
|
|
272
|
+
duration: getPageTime() - startTime
|
|
273
|
+
}, DEPRECATED_getErrorAttributes(error)), {}, {
|
|
274
|
+
gateway: true
|
|
275
|
+
})));
|
|
276
|
+
}
|
|
190
277
|
}
|
|
191
278
|
reject(error);
|
|
192
279
|
});
|
|
@@ -203,7 +290,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
203
290
|
}
|
|
204
291
|
}, {
|
|
205
292
|
key: "getPermissions",
|
|
206
|
-
value: function getPermissions(id, fireAnalytics) {
|
|
293
|
+
value: function getPermissions(id, fireAnalytics, fireAnalyticsNext) {
|
|
207
294
|
var _this5 = this;
|
|
208
295
|
if (!this.options.cloudId) {
|
|
209
296
|
return Promise.reject(new Error('cloudId is missing'));
|
|
@@ -211,8 +298,16 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
211
298
|
return new Promise(function (resolve, reject) {
|
|
212
299
|
var startTime = getPageTime();
|
|
213
300
|
var product = _this5.options.productIdentifier || 'rovo';
|
|
214
|
-
if (
|
|
215
|
-
|
|
301
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
302
|
+
if (fireAnalyticsNext) {
|
|
303
|
+
fireAnalyticsNext('operational.rovoAgentProfilecard.triggered.request', _objectSpread({
|
|
304
|
+
firedAt: Math.round(getPageTime())
|
|
305
|
+
}, PACKAGE_META_DATA));
|
|
306
|
+
}
|
|
307
|
+
} else {
|
|
308
|
+
if (fireAnalytics) {
|
|
309
|
+
fireAnalytics(agentRequestAnalytics('triggered'));
|
|
310
|
+
}
|
|
216
311
|
}
|
|
217
312
|
var headers = createHeaders(product, _this5.options.cloudId, true);
|
|
218
313
|
fetch(new Request("/gateway/api/assist/api/rovo/v2/permissions/agents/".concat(id), {
|
|
@@ -226,20 +321,41 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
226
321
|
})).then(function (response) {
|
|
227
322
|
return response.json();
|
|
228
323
|
}).then(function (data) {
|
|
229
|
-
if (
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
324
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
325
|
+
if (fireAnalyticsNext) {
|
|
326
|
+
fireAnalyticsNext('operational.rovoAgentProfilecard.succeeded.getAgentPermissions', _objectSpread({
|
|
327
|
+
duration: getPageTime() - startTime,
|
|
328
|
+
gateway: true,
|
|
329
|
+
firedAt: Math.round(getPageTime())
|
|
330
|
+
}, PACKAGE_META_DATA));
|
|
331
|
+
}
|
|
332
|
+
} else {
|
|
333
|
+
if (fireAnalytics) {
|
|
334
|
+
fireAnalytics(agentRequestAnalytics('succeeded', 'getAgentPermissions', {
|
|
335
|
+
duration: getPageTime() - startTime,
|
|
336
|
+
gateway: true
|
|
337
|
+
}));
|
|
338
|
+
}
|
|
234
339
|
}
|
|
235
340
|
resolve(data);
|
|
236
341
|
}).catch(function (error) {
|
|
237
|
-
if (
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
342
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
343
|
+
if (fireAnalyticsNext) {
|
|
344
|
+
fireAnalyticsNext('operational.rovoAgentProfilecard.failed.getAgentPermissions', _objectSpread(_objectSpread({
|
|
345
|
+
duration: getPageTime() - startTime
|
|
346
|
+
}, getErrorAttributes(error)), {}, {
|
|
347
|
+
gateway: true,
|
|
348
|
+
firedAt: Math.round(getPageTime())
|
|
349
|
+
}, PACKAGE_META_DATA));
|
|
350
|
+
}
|
|
351
|
+
} else {
|
|
352
|
+
if (fireAnalytics) {
|
|
353
|
+
fireAnalytics(agentRequestAnalytics('failed', 'getAgentPermissions', _objectSpread(_objectSpread({
|
|
354
|
+
duration: getPageTime() - startTime
|
|
355
|
+
}, DEPRECATED_getErrorAttributes(error)), {}, {
|
|
356
|
+
gateway: true
|
|
357
|
+
})));
|
|
358
|
+
}
|
|
243
359
|
}
|
|
244
360
|
reject(error);
|
|
245
361
|
});
|
|
@@ -8,10 +8,11 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
-
import {
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { PACKAGE_META_DATA, teamRequestAnalytics } from '../util/analytics';
|
|
12
13
|
import { getPageTime } from '../util/performance';
|
|
13
14
|
import CachingClient from './CachingClient';
|
|
14
|
-
import { getErrorAttributes } from './errorUtils';
|
|
15
|
+
import { DEPRECATED_getErrorAttributes, getErrorAttributes } from './errorUtils';
|
|
15
16
|
import { getTeamFromAGG } from './getTeamFromAGG';
|
|
16
17
|
var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
17
18
|
function TeamProfileCardClient(options) {
|
|
@@ -32,7 +33,7 @@ var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
32
33
|
}
|
|
33
34
|
}, {
|
|
34
35
|
key: "getProfile",
|
|
35
|
-
value: function getProfile(teamId, orgId, analytics) {
|
|
36
|
+
value: function getProfile(teamId, orgId, analytics, analyticsNext) {
|
|
36
37
|
var _this2 = this;
|
|
37
38
|
if (!teamId) {
|
|
38
39
|
return Promise.reject(new Error('teamId is missing'));
|
|
@@ -43,27 +44,56 @@ var TeamProfileCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
43
44
|
}
|
|
44
45
|
return new Promise(function (resolve, reject) {
|
|
45
46
|
var startTime = getPageTime();
|
|
46
|
-
if (analytics) {
|
|
47
|
-
|
|
47
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
48
|
+
if (analyticsNext) {
|
|
49
|
+
analyticsNext('operational.teamProfileCard.triggered.request', _objectSpread({
|
|
50
|
+
firedAt: Math.round(getPageTime())
|
|
51
|
+
}, PACKAGE_META_DATA));
|
|
52
|
+
}
|
|
53
|
+
} else {
|
|
54
|
+
if (analytics) {
|
|
55
|
+
analytics(teamRequestAnalytics('triggered'));
|
|
56
|
+
}
|
|
48
57
|
}
|
|
49
58
|
_this2.makeRequest(teamId, orgId).then(function (data) {
|
|
50
59
|
if (_this2.cache) {
|
|
51
60
|
_this2.setCachedProfile(teamId, data);
|
|
52
61
|
}
|
|
53
|
-
if (analytics) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
63
|
+
if (analyticsNext) {
|
|
64
|
+
analyticsNext('operational.teamProfileCard.succeeded.request', _objectSpread({
|
|
65
|
+
duration: getPageTime() - startTime,
|
|
66
|
+
gateway: true,
|
|
67
|
+
firedAt: Math.round(getPageTime())
|
|
68
|
+
}, PACKAGE_META_DATA));
|
|
69
|
+
}
|
|
70
|
+
} else {
|
|
71
|
+
if (analytics) {
|
|
72
|
+
analytics(teamRequestAnalytics('succeeded', {
|
|
73
|
+
duration: getPageTime() - startTime,
|
|
74
|
+
gateway: true
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
58
77
|
}
|
|
59
78
|
resolve(data);
|
|
60
79
|
}).catch(function (error) {
|
|
61
|
-
if (analytics) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
80
|
+
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
81
|
+
if (analyticsNext) {
|
|
82
|
+
analyticsNext('operational.teamProfileCard.failed.request', _objectSpread(_objectSpread({
|
|
83
|
+
duration: getPageTime() - startTime
|
|
84
|
+
}, getErrorAttributes(error)), {}, {
|
|
85
|
+
gateway: true,
|
|
86
|
+
firedAt: Math.round(getPageTime())
|
|
87
|
+
}, PACKAGE_META_DATA));
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
if (analytics) {
|
|
91
|
+
analytics(teamRequestAnalytics('failed', _objectSpread(_objectSpread({
|
|
92
|
+
duration: getPageTime() - startTime
|
|
93
|
+
}, DEPRECATED_getErrorAttributes(error)), {}, {
|
|
94
|
+
gateway: true
|
|
95
|
+
})));
|
|
96
|
+
}
|
|
67
97
|
}
|
|
68
98
|
reject(error);
|
|
69
99
|
});
|
|
@@ -19,7 +19,7 @@ import { PACKAGE_META_DATA, userRequestAnalytics } from '../util/analytics';
|
|
|
19
19
|
import { localTime } from '../util/date';
|
|
20
20
|
import { getPageTime } from '../util/performance';
|
|
21
21
|
import CachingClient from './CachingClient';
|
|
22
|
-
import { getErrorAttributes } from './errorUtils';
|
|
22
|
+
import { DEPRECATED_getErrorAttributes, getErrorAttributes } from './errorUtils';
|
|
23
23
|
import { AGGQuery } from './graphqlUtils';
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -192,16 +192,9 @@ var UserProfileCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
192
192
|
}).catch(function (error) {
|
|
193
193
|
if (fg('ptc-enable-profile-card-analytics-refactor')) {
|
|
194
194
|
if (analyticsNext) {
|
|
195
|
-
var errorAttributes = getErrorAttributes(error);
|
|
196
195
|
analyticsNext('operational.profilecard.failed.request', _objectSpread(_objectSpread({
|
|
197
196
|
duration: getPageTime() - startTime
|
|
198
|
-
},
|
|
199
|
-
traceId: errorAttributes.traceId || null,
|
|
200
|
-
errorCategory: errorAttributes.errorCategory || null,
|
|
201
|
-
errorType: errorAttributes.errorType || null,
|
|
202
|
-
errorPath: errorAttributes.errorPath || null,
|
|
203
|
-
errorNumber: errorAttributes.errorNumber || null,
|
|
204
|
-
errorStatusCode: errorAttributes.errorStatusCode || null,
|
|
197
|
+
}, getErrorAttributes(error)), {}, {
|
|
205
198
|
firedAt: Math.round(getPageTime())
|
|
206
199
|
}, PACKAGE_META_DATA));
|
|
207
200
|
}
|
|
@@ -209,7 +202,7 @@ var UserProfileCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
209
202
|
if (analytics) {
|
|
210
203
|
analytics(userRequestAnalytics('failed', _objectSpread({
|
|
211
204
|
duration: getPageTime() - startTime
|
|
212
|
-
},
|
|
205
|
+
}, DEPRECATED_getErrorAttributes(error))));
|
|
213
206
|
}
|
|
214
207
|
}
|
|
215
208
|
reject(error);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1
4
|
import { AGGError, AGGErrors, DirectoryGraphQLError, DirectoryGraphQLErrors } from '../util/errors';
|
|
2
5
|
var IGNORED_ERROR_REASONS_DIRECTORY = [
|
|
3
6
|
// Error categories from pf-directory
|
|
@@ -15,12 +18,12 @@ function isIgnoredError(error) {
|
|
|
15
18
|
}
|
|
16
19
|
return false;
|
|
17
20
|
}
|
|
18
|
-
var
|
|
21
|
+
var _DEPRECATED_getErrorAttributes = function DEPRECATED_getErrorAttributes(error) {
|
|
19
22
|
if (error instanceof DirectoryGraphQLErrors) {
|
|
20
23
|
return {
|
|
21
24
|
errorMessage: error.message,
|
|
22
25
|
errorCount: error.errors.length,
|
|
23
|
-
errorDetails: error.errors.map(
|
|
26
|
+
errorDetails: error.errors.map(_DEPRECATED_getErrorAttributes),
|
|
24
27
|
isSLOFailure: !error.errors.every(isIgnoredError),
|
|
25
28
|
traceId: error.traceId
|
|
26
29
|
};
|
|
@@ -37,7 +40,7 @@ var _getErrorAttributes = function getErrorAttributes(error) {
|
|
|
37
40
|
return {
|
|
38
41
|
errorMessage: error.message,
|
|
39
42
|
errorCount: error.errors.length,
|
|
40
|
-
errorDetails: error.errors.map(
|
|
43
|
+
errorDetails: error.errors.map(_DEPRECATED_getErrorAttributes),
|
|
41
44
|
isSLOFailure: !error.errors.every(isIgnoredError),
|
|
42
45
|
traceId: error.traceId
|
|
43
46
|
};
|
|
@@ -55,7 +58,7 @@ var _getErrorAttributes = function getErrorAttributes(error) {
|
|
|
55
58
|
if (error.hasOwnProperty('cause')) {
|
|
56
59
|
var causeError = error.cause;
|
|
57
60
|
if (causeError instanceof DirectoryGraphQLErrors || causeError instanceof AGGErrors) {
|
|
58
|
-
return
|
|
61
|
+
return _DEPRECATED_getErrorAttributes(causeError);
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
return {
|
|
@@ -75,6 +78,81 @@ var _getErrorAttributes = function getErrorAttributes(error) {
|
|
|
75
78
|
isSLOFailure: true
|
|
76
79
|
};
|
|
77
80
|
};
|
|
81
|
+
export { _DEPRECATED_getErrorAttributes as DEPRECATED_getErrorAttributes };
|
|
82
|
+
var _getErrorAttributes = function getErrorAttributes(error) {
|
|
83
|
+
var defaultErrorAttributes = {
|
|
84
|
+
errorCount: null,
|
|
85
|
+
errorDetails: null,
|
|
86
|
+
errorCategory: null,
|
|
87
|
+
errorType: null,
|
|
88
|
+
errorPath: null,
|
|
89
|
+
errorNumber: null,
|
|
90
|
+
errorStatusCode: null,
|
|
91
|
+
traceId: null
|
|
92
|
+
};
|
|
93
|
+
if (error instanceof DirectoryGraphQLErrors) {
|
|
94
|
+
var _error$traceId;
|
|
95
|
+
return _objectSpread(_objectSpread({}, defaultErrorAttributes), {}, {
|
|
96
|
+
errorMessage: error.message,
|
|
97
|
+
errorCount: error.errors.length,
|
|
98
|
+
errorDetails: error.errors.map(_getErrorAttributes),
|
|
99
|
+
isSLOFailure: !error.errors.every(isIgnoredError),
|
|
100
|
+
traceId: (_error$traceId = error.traceId) !== null && _error$traceId !== void 0 ? _error$traceId : null
|
|
101
|
+
});
|
|
102
|
+
} else if (error instanceof DirectoryGraphQLError) {
|
|
103
|
+
var _error$errorNumber;
|
|
104
|
+
return _objectSpread(_objectSpread({}, defaultErrorAttributes), {}, {
|
|
105
|
+
errorMessage: error.message,
|
|
106
|
+
errorCategory: error.category,
|
|
107
|
+
errorType: error.type,
|
|
108
|
+
errorPath: error.path,
|
|
109
|
+
errorNumber: (_error$errorNumber = error.errorNumber) !== null && _error$errorNumber !== void 0 ? _error$errorNumber : null,
|
|
110
|
+
isSLOFailure: !isIgnoredError(error)
|
|
111
|
+
});
|
|
112
|
+
} else if (error instanceof AGGErrors) {
|
|
113
|
+
var _error$traceId2;
|
|
114
|
+
return _objectSpread(_objectSpread({}, defaultErrorAttributes), {}, {
|
|
115
|
+
errorMessage: error.message,
|
|
116
|
+
errorCount: error.errors.length,
|
|
117
|
+
errorDetails: error.errors.map(_getErrorAttributes),
|
|
118
|
+
isSLOFailure: !error.errors.every(isIgnoredError),
|
|
119
|
+
traceId: (_error$traceId2 = error.traceId) !== null && _error$traceId2 !== void 0 ? _error$traceId2 : null
|
|
120
|
+
});
|
|
121
|
+
} else if (error instanceof AGGError) {
|
|
122
|
+
var _error$errorType, _error$statusCode, _error$classification;
|
|
123
|
+
return _objectSpread(_objectSpread({}, defaultErrorAttributes), {}, {
|
|
124
|
+
errorMessage: error.message,
|
|
125
|
+
errorType: (_error$errorType = error.errorType) !== null && _error$errorType !== void 0 ? _error$errorType : null,
|
|
126
|
+
errorStatusCode: (_error$statusCode = error.statusCode) !== null && _error$statusCode !== void 0 ? _error$statusCode : null,
|
|
127
|
+
isSLOFailure: !isIgnoredError(error),
|
|
128
|
+
errorCategory: (_error$classification = error.classification) !== null && _error$classification !== void 0 ? _error$classification : null
|
|
129
|
+
});
|
|
130
|
+
} else if (error instanceof Error) {
|
|
131
|
+
// Jira custom profile card client error, they wrap the error & put the underlying error in the cause property
|
|
132
|
+
if (error.message.startsWith('Unable to fetch user:')) {
|
|
133
|
+
if (error.hasOwnProperty('cause')) {
|
|
134
|
+
var causeError = error.cause;
|
|
135
|
+
if (causeError instanceof DirectoryGraphQLErrors || causeError instanceof AGGErrors) {
|
|
136
|
+
return _getErrorAttributes(causeError);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return _objectSpread(_objectSpread({}, defaultErrorAttributes), {}, {
|
|
140
|
+
errorMessage: error.message,
|
|
141
|
+
isSLOFailure: false
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return _objectSpread(_objectSpread({}, defaultErrorAttributes), {}, {
|
|
145
|
+
errorMessage: error.message,
|
|
146
|
+
isSLOFailure: true
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Unknown
|
|
151
|
+
return _objectSpread(_objectSpread({}, defaultErrorAttributes), {}, {
|
|
152
|
+
errorMessage: 'Unknown error',
|
|
153
|
+
isSLOFailure: true
|
|
154
|
+
});
|
|
155
|
+
};
|
|
78
156
|
export { _getErrorAttributes as getErrorAttributes };
|
|
79
157
|
export var handleDirectoryGraphQLErrors = function handleDirectoryGraphQLErrors(errors, traceId) {
|
|
80
158
|
throw new DirectoryGraphQLErrors(errors, traceId);
|
|
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
|
|
|
4
4
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
5
5
|
var addHeaders = function addHeaders(headers) {
|
|
6
6
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
7
|
-
headers.append('atl-client-version', "
|
|
7
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
8
8
|
return headers;
|
|
9
9
|
};
|
|
10
10
|
export function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -59,7 +59,7 @@ export var addHeaders = function addHeaders(headers) {
|
|
|
59
59
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
60
60
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
61
61
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
62
|
-
headers.append('atl-client-version', "
|
|
62
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
63
63
|
return headers;
|
|
64
64
|
};
|
|
65
65
|
export function getTeamFromAGG(_x, _x2, _x3) {
|