@atlaskit/profilecard 24.45.2 → 24.45.3
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/client/RovoAgentCardClient.js +11 -2
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/cjs/client/getTeamFromAGG.js +1 -1
- package/dist/cjs/util/analytics.js +2 -2
- package/dist/es2019/client/RovoAgentCardClient.js +24 -2
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/es2019/client/getTeamFromAGG.js +1 -1
- package/dist/es2019/util/analytics.js +2 -2
- package/dist/esm/client/RovoAgentCardClient.js +11 -2
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
- package/dist/esm/client/getTeamFromAGG.js +1 -1
- package/dist/esm/util/analytics.js +2 -2
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/profilecard
|
|
2
2
|
|
|
3
|
+
## 24.45.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1b9b44974e78b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1b9b44974e78b) -
|
|
8
|
+
Fix agent request
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 24.45.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -41,7 +41,7 @@ var buildRovoAgentQueryByAri = function buildRovoAgentQueryByAri(agentAri) {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
var
|
|
44
|
+
var buildRovoAgentQueryByAccountIdOld = function buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId) {
|
|
45
45
|
return {
|
|
46
46
|
query: "\n\t\tquery RovoAgentProfileCard_AgentQueryByAccountId($identityAccountId: ID!, $cloudId: ID!) {\n\t\t\tagentStudio_agentByIdentityAccountId(identityAccountId: $identityAccountId, cloudId: $cloudId) @optIn(to: \"AgentStudio\") {\n\t\t\t __typename\n\t\t\t\t... on AgentStudioAssistant {\n\t\t\t\t\tauthoringTeam {\n\t\t\t\t\t\tdisplayName\n\t\t\t\t\t\tprofileUrl\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t... on QueryError {\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
|
|
47
47
|
variables: {
|
|
@@ -50,6 +50,15 @@ var buildRovoAgentQueryByAccountId = function buildRovoAgentQueryByAccountId(ide
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
+
var buildRovoAgentQueryByAccountId = function buildRovoAgentQueryByAccountId(identityAccountId, cloudId) {
|
|
54
|
+
return {
|
|
55
|
+
query: "\n\t\tquery RovoAgentProfileCard_AgentQueryByAccountId($id: ID!, $cloudId: String!) {\n\t\t\tagentStudio_agentByIdentityAccountId(cloudId: $cloudId, id: $id) @optIn(to: \"AgentStudio\") {\n\t\t\t __typename\n\t\t\t\t... on AgentStudioAssistant {\n\t\t\t\t\tauthoringTeam {\n\t\t\t\t\t\tdisplayName\n\t\t\t\t\t\tprofileUrl\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t... on QueryError {\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
|
|
56
|
+
variables: {
|
|
57
|
+
id: identityAccountId,
|
|
58
|
+
cloudId: cloudId
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
};
|
|
53
62
|
var createHeaders = function createHeaders(product, cloudId, isBodyJson) {
|
|
54
63
|
var headers = new Headers({
|
|
55
64
|
'X-Product': product,
|
|
@@ -141,7 +150,7 @@ var RovoAgentCardClient = exports.default = /*#__PURE__*/function (_CachingClien
|
|
|
141
150
|
while (1) switch (_context3.prev = _context3.next) {
|
|
142
151
|
case 0:
|
|
143
152
|
_context3.next = 2;
|
|
144
|
-
return (0, _graphqlUtils.AGGQuery)('/gateway/api/graphql', buildRovoAgentQueryByAccountId(identityAccountId, cloudId));
|
|
153
|
+
return (0, _graphqlUtils.AGGQuery)('/gateway/api/graphql', (0, _platformFeatureFlags.fg)('jira_ai_fix_agent_profile_card_flashing') ? buildRovoAgentQueryByAccountId(identityAccountId, cloudId) : buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId));
|
|
145
154
|
case 2:
|
|
146
155
|
response = _context3.sent;
|
|
147
156
|
if (!(((_response$agentStudio2 = response.agentStudio_agentByIdentityAccountId) === null || _response$agentStudio2 === void 0 ? void 0 : _response$agentStudio2.__typename) === 'QueryError')) {
|
|
@@ -11,7 +11,7 @@ var _graphqlUtils = require("./graphqlUtils");
|
|
|
11
11
|
var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
|
|
12
12
|
var addHeaders = function addHeaders(headers) {
|
|
13
13
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
14
|
-
headers.append('atl-client-version', "
|
|
14
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
15
15
|
return headers;
|
|
16
16
|
};
|
|
17
17
|
function getOrgIdForCloudIdFromAGG(_x, _x2) {
|
|
@@ -66,7 +66,7 @@ var addHeaders = exports.addHeaders = function addHeaders(headers) {
|
|
|
66
66
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
67
67
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
68
68
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
69
|
-
headers.append('atl-client-version', "
|
|
69
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
70
70
|
return headers;
|
|
71
71
|
};
|
|
72
72
|
function getTeamFromAGG(_x, _x2, _x3) {
|
|
@@ -11,7 +11,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
11
11
|
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) { (0, _defineProperty2.default)(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; }
|
|
12
12
|
var PACKAGE_META_DATA = exports.PACKAGE_META_DATA = {
|
|
13
13
|
packageName: "@atlaskit/profilecard",
|
|
14
|
-
packageVersion: "
|
|
14
|
+
packageVersion: "0.0.0-development"
|
|
15
15
|
};
|
|
16
16
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
17
17
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -30,7 +30,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
30
30
|
actionSubjectId: actionSubjectId,
|
|
31
31
|
attributes: _objectSpread(_objectSpread({
|
|
32
32
|
packageName: "@atlaskit/profilecard",
|
|
33
|
-
packageVersion: "
|
|
33
|
+
packageVersion: "0.0.0-development"
|
|
34
34
|
}, attributes), {}, {
|
|
35
35
|
firedAt: Math.round((0, _performance.getPageTime)())
|
|
36
36
|
})
|
|
@@ -39,7 +39,7 @@ const buildRovoAgentQueryByAri = agentAri => ({
|
|
|
39
39
|
agentAri
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
const
|
|
42
|
+
const buildRovoAgentQueryByAccountIdOld = (identityAccountId, cloudId) => ({
|
|
43
43
|
query: `
|
|
44
44
|
query RovoAgentProfileCard_AgentQueryByAccountId($identityAccountId: ID!, $cloudId: ID!) {
|
|
45
45
|
agentStudio_agentByIdentityAccountId(identityAccountId: $identityAccountId, cloudId: $cloudId) @optIn(to: "AgentStudio") {
|
|
@@ -61,6 +61,28 @@ const buildRovoAgentQueryByAccountId = (identityAccountId, cloudId) => ({
|
|
|
61
61
|
cloudId
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
+
const buildRovoAgentQueryByAccountId = (identityAccountId, cloudId) => ({
|
|
65
|
+
query: `
|
|
66
|
+
query RovoAgentProfileCard_AgentQueryByAccountId($id: ID!, $cloudId: String!) {
|
|
67
|
+
agentStudio_agentByIdentityAccountId(cloudId: $cloudId, id: $id) @optIn(to: "AgentStudio") {
|
|
68
|
+
__typename
|
|
69
|
+
... on AgentStudioAssistant {
|
|
70
|
+
authoringTeam {
|
|
71
|
+
displayName
|
|
72
|
+
profileUrl
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
... on QueryError {
|
|
76
|
+
message
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`,
|
|
81
|
+
variables: {
|
|
82
|
+
id: identityAccountId,
|
|
83
|
+
cloudId
|
|
84
|
+
}
|
|
85
|
+
});
|
|
64
86
|
const createHeaders = (product, cloudId, isBodyJson) => {
|
|
65
87
|
const headers = new Headers({
|
|
66
88
|
'X-Product': product,
|
|
@@ -95,7 +117,7 @@ export default class RovoAgentCardClient extends CachingClient {
|
|
|
95
117
|
}
|
|
96
118
|
async getAgentByAccountIdAgg(identityAccountId, cloudId) {
|
|
97
119
|
var _response$agentStudio2;
|
|
98
|
-
const response = await AGGQuery('/gateway/api/graphql', buildRovoAgentQueryByAccountId(identityAccountId, cloudId));
|
|
120
|
+
const response = await AGGQuery('/gateway/api/graphql', fg('jira_ai_fix_agent_profile_card_flashing') ? buildRovoAgentQueryByAccountId(identityAccountId, cloudId) : buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId));
|
|
99
121
|
if (((_response$agentStudio2 = response.agentStudio_agentByIdentityAccountId) === null || _response$agentStudio2 === void 0 ? void 0 : _response$agentStudio2.__typename) === 'QueryError') {
|
|
100
122
|
throw new Error(`ProfileCard agentStudio_agentByIdentityAccountId returning QueryError: ${response.agentStudio_agentByIdentityAccountId.message}`);
|
|
101
123
|
}
|
|
@@ -6,7 +6,7 @@ const ORG_ID_FROM_CLOUD_ID_QUERY = `query OrgIdFromCloudId($cloudId: ID!) {
|
|
|
6
6
|
}`;
|
|
7
7
|
const addHeaders = headers => {
|
|
8
8
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
9
|
-
headers.append('atl-client-version', "
|
|
9
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
10
10
|
return headers;
|
|
11
11
|
};
|
|
12
12
|
export async function getOrgIdForCloudIdFromAGG(url, cloudId) {
|
|
@@ -78,7 +78,7 @@ export const addHeaders = headers => {
|
|
|
78
78
|
headers.append('X-ExperimentalApi', 'teams-beta');
|
|
79
79
|
headers.append('X-ExperimentalApi', 'team-members-beta');
|
|
80
80
|
headers.append('atl-client-name', "@atlaskit/profilecard");
|
|
81
|
-
headers.append('atl-client-version', "
|
|
81
|
+
headers.append('atl-client-version', "0.0.0-development");
|
|
82
82
|
return headers;
|
|
83
83
|
};
|
|
84
84
|
export async function getTeamFromAGG(url, teamId, siteId) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getPageTime } from './performance';
|
|
2
2
|
export const PACKAGE_META_DATA = {
|
|
3
3
|
packageName: "@atlaskit/profilecard",
|
|
4
|
-
packageVersion: "
|
|
4
|
+
packageVersion: "0.0.0-development"
|
|
5
5
|
};
|
|
6
6
|
const TEAM_SUBJECT = 'teamProfileCard';
|
|
7
7
|
const USER_SUBJECT = 'profilecard';
|
|
@@ -18,7 +18,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
|
|
|
18
18
|
actionSubjectId,
|
|
19
19
|
attributes: {
|
|
20
20
|
packageName: "@atlaskit/profilecard",
|
|
21
|
-
packageVersion: "
|
|
21
|
+
packageVersion: "0.0.0-development",
|
|
22
22
|
...attributes,
|
|
23
23
|
firedAt: Math.round(getPageTime())
|
|
24
24
|
}
|
|
@@ -34,7 +34,7 @@ var buildRovoAgentQueryByAri = function buildRovoAgentQueryByAri(agentAri) {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
var
|
|
37
|
+
var buildRovoAgentQueryByAccountIdOld = function buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId) {
|
|
38
38
|
return {
|
|
39
39
|
query: "\n\t\tquery RovoAgentProfileCard_AgentQueryByAccountId($identityAccountId: ID!, $cloudId: ID!) {\n\t\t\tagentStudio_agentByIdentityAccountId(identityAccountId: $identityAccountId, cloudId: $cloudId) @optIn(to: \"AgentStudio\") {\n\t\t\t __typename\n\t\t\t\t... on AgentStudioAssistant {\n\t\t\t\t\tauthoringTeam {\n\t\t\t\t\t\tdisplayName\n\t\t\t\t\t\tprofileUrl\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t... on QueryError {\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
|
|
40
40
|
variables: {
|
|
@@ -43,6 +43,15 @@ var buildRovoAgentQueryByAccountId = function buildRovoAgentQueryByAccountId(ide
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
+
var buildRovoAgentQueryByAccountId = function buildRovoAgentQueryByAccountId(identityAccountId, cloudId) {
|
|
47
|
+
return {
|
|
48
|
+
query: "\n\t\tquery RovoAgentProfileCard_AgentQueryByAccountId($id: ID!, $cloudId: String!) {\n\t\t\tagentStudio_agentByIdentityAccountId(cloudId: $cloudId, id: $id) @optIn(to: \"AgentStudio\") {\n\t\t\t __typename\n\t\t\t\t... on AgentStudioAssistant {\n\t\t\t\t\tauthoringTeam {\n\t\t\t\t\t\tdisplayName\n\t\t\t\t\t\tprofileUrl\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t... on QueryError {\n\t\t\t\t\tmessage\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
|
|
49
|
+
variables: {
|
|
50
|
+
id: identityAccountId,
|
|
51
|
+
cloudId: cloudId
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
};
|
|
46
55
|
var createHeaders = function createHeaders(product, cloudId, isBodyJson) {
|
|
47
56
|
var headers = new Headers({
|
|
48
57
|
'X-Product': product,
|
|
@@ -134,7 +143,7 @@ var RovoAgentCardClient = /*#__PURE__*/function (_CachingClient) {
|
|
|
134
143
|
while (1) switch (_context3.prev = _context3.next) {
|
|
135
144
|
case 0:
|
|
136
145
|
_context3.next = 2;
|
|
137
|
-
return AGGQuery('/gateway/api/graphql', buildRovoAgentQueryByAccountId(identityAccountId, cloudId));
|
|
146
|
+
return AGGQuery('/gateway/api/graphql', fg('jira_ai_fix_agent_profile_card_flashing') ? buildRovoAgentQueryByAccountId(identityAccountId, cloudId) : buildRovoAgentQueryByAccountIdOld(identityAccountId, cloudId));
|
|
138
147
|
case 2:
|
|
139
148
|
response = _context3.sent;
|
|
140
149
|
if (!(((_response$agentStudio2 = response.agentStudio_agentByIdentityAccountId) === null || _response$agentStudio2 === void 0 ? void 0 : _response$agentStudio2.__typename) === 'QueryError')) {
|
|
@@ -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) {
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { getPageTime } from './performance';
|
|
5
5
|
export var PACKAGE_META_DATA = {
|
|
6
6
|
packageName: "@atlaskit/profilecard",
|
|
7
|
-
packageVersion: "
|
|
7
|
+
packageVersion: "0.0.0-development"
|
|
8
8
|
};
|
|
9
9
|
var TEAM_SUBJECT = 'teamProfileCard';
|
|
10
10
|
var USER_SUBJECT = 'profilecard';
|
|
@@ -23,7 +23,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
23
23
|
actionSubjectId: actionSubjectId,
|
|
24
24
|
attributes: _objectSpread(_objectSpread({
|
|
25
25
|
packageName: "@atlaskit/profilecard",
|
|
26
|
-
packageVersion: "
|
|
26
|
+
packageVersion: "0.0.0-development"
|
|
27
27
|
}, attributes), {}, {
|
|
28
28
|
firedAt: Math.round(getPageTime())
|
|
29
29
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/profilecard",
|
|
3
|
-
"version": "24.45.
|
|
3
|
+
"version": "24.45.3",
|
|
4
4
|
"description": "A React component to display a card with user information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/teams-avatar": "^2.4.0",
|
|
67
67
|
"@atlaskit/teams-public": "^0.72.0",
|
|
68
68
|
"@atlaskit/theme": "^22.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^51.0.0",
|
|
70
70
|
"@atlaskit/tokens": "^11.4.0",
|
|
71
71
|
"@atlaskit/tooltip": "^21.0.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|
|
@@ -167,6 +167,9 @@
|
|
|
167
167
|
},
|
|
168
168
|
"jira_ai_hide_conversation_starters_profilecard": {
|
|
169
169
|
"type": "boolean"
|
|
170
|
+
},
|
|
171
|
+
"jira_ai_fix_agent_profile_card_flashing": {
|
|
172
|
+
"type": "boolean"
|
|
170
173
|
}
|
|
171
174
|
},
|
|
172
175
|
"sideEffects": [
|