@atlaskit/profilecard 24.45.2 → 24.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 24.46.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`56bb55759e4cf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/56bb55759e4cf) -
8
+ Fix the pathway missing from redirectUrl issue
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 24.45.3
15
+
16
+ ### Patch Changes
17
+
18
+ - [`1b9b44974e78b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1b9b44974e78b) -
19
+ Fix agent request
20
+ - Updated dependencies
21
+
3
22
  ## 24.45.2
4
23
 
5
24
  ### Patch Changes
@@ -41,7 +41,7 @@ var buildRovoAgentQueryByAri = function buildRovoAgentQueryByAri(agentAri) {
41
41
  }
42
42
  };
43
43
  };
44
- var buildRovoAgentQueryByAccountId = function buildRovoAgentQueryByAccountId(identityAccountId, cloudId) {
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', "24.45.1");
14
+ headers.append('atl-client-version', "24.45.3");
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', "24.45.1");
69
+ headers.append('atl-client-version', "24.45.3");
70
70
  return headers;
71
71
  };
72
72
  function getTeamFromAGG(_x, _x2, _x3) {
@@ -104,7 +104,8 @@ var useAgentUrlActions = exports.useAgentUrlActions = function useAgentUrlAction
104
104
  cloudId: cloudId
105
105
  }, createRovoParams({
106
106
  cloudId: cloudId,
107
- agentId: agentId
107
+ agentId: agentId,
108
+ pathway: 'chat'
108
109
  })));
109
110
  window.open(urlWithParams, '_blank', 'noopener, noreferrer');
110
111
  };
@@ -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: "24.45.1"
14
+ packageVersion: "24.45.3"
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: "24.45.1"
33
+ packageVersion: "24.45.3"
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 buildRovoAgentQueryByAccountId = (identityAccountId, cloudId) => ({
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', "24.45.1");
9
+ headers.append('atl-client-version', "24.45.3");
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', "24.45.1");
81
+ headers.append('atl-client-version', "24.45.3");
82
82
  return headers;
83
83
  };
84
84
  export async function getTeamFromAGG(url, teamId, siteId) {
@@ -93,7 +93,8 @@ export const useAgentUrlActions = ({
93
93
  cloudId,
94
94
  ...createRovoParams({
95
95
  cloudId,
96
- agentId
96
+ agentId,
97
+ pathway: 'chat'
97
98
  })
98
99
  });
99
100
  window.open(urlWithParams, '_blank', 'noopener, noreferrer');
@@ -1,7 +1,7 @@
1
1
  import { getPageTime } from './performance';
2
2
  export const PACKAGE_META_DATA = {
3
3
  packageName: "@atlaskit/profilecard",
4
- packageVersion: "24.45.1"
4
+ packageVersion: "24.45.3"
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: "24.45.1",
21
+ packageVersion: "24.45.3",
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 buildRovoAgentQueryByAccountId = function buildRovoAgentQueryByAccountId(identityAccountId, cloudId) {
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', "24.45.1");
7
+ headers.append('atl-client-version', "24.45.3");
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', "24.45.1");
62
+ headers.append('atl-client-version', "24.45.3");
63
63
  return headers;
64
64
  };
65
65
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -97,7 +97,8 @@ export var useAgentUrlActions = function useAgentUrlActions(_ref3) {
97
97
  cloudId: cloudId
98
98
  }, createRovoParams({
99
99
  cloudId: cloudId,
100
- agentId: agentId
100
+ agentId: agentId,
101
+ pathway: 'chat'
101
102
  })));
102
103
  window.open(urlWithParams, '_blank', 'noopener, noreferrer');
103
104
  };
@@ -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: "24.45.1"
7
+ packageVersion: "24.45.3"
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: "24.45.1"
26
+ packageVersion: "24.45.3"
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.2",
3
+ "version": "24.46.0",
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": "^50.0.0",
69
+ "@atlaskit/tmp-editor-statsig": "^52.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": [