@atlaskit/profilecard 24.19.0 → 24.20.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/client/RovoAgentCardClient.js +201 -33
  3. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  4. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  5. package/dist/cjs/components/Agent/AgentProfileCardResourced.js +50 -34
  6. package/dist/cjs/components/Agent/AgentProfileCardTrigger.js +50 -33
  7. package/dist/cjs/mocks/agent-data.js +7 -1
  8. package/dist/cjs/mocks/simple-mock-clients.js +8 -3
  9. package/dist/cjs/util/analytics.js +2 -2
  10. package/dist/es2019/client/RovoAgentCardClient.js +135 -9
  11. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  12. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  13. package/dist/es2019/components/Agent/AgentProfileCardResourced.js +21 -3
  14. package/dist/es2019/components/Agent/AgentProfileCardTrigger.js +21 -3
  15. package/dist/es2019/mocks/agent-data.js +6 -0
  16. package/dist/es2019/mocks/simple-mock-clients.js +6 -3
  17. package/dist/es2019/util/analytics.js +2 -2
  18. package/dist/esm/client/RovoAgentCardClient.js +202 -34
  19. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  20. package/dist/esm/client/getTeamFromAGG.js +1 -1
  21. package/dist/esm/components/Agent/AgentProfileCardResourced.js +50 -34
  22. package/dist/esm/components/Agent/AgentProfileCardTrigger.js +50 -33
  23. package/dist/esm/mocks/agent-data.js +6 -0
  24. package/dist/esm/mocks/simple-mock-clients.js +6 -3
  25. package/dist/esm/util/analytics.js +2 -2
  26. package/dist/types/client/ProfileCardClient.d.ts +1 -1
  27. package/dist/types/client/RovoAgentCardClient.d.ts +14 -4
  28. package/dist/types/mocks/agent-data.d.ts +2 -1
  29. package/dist/types/mocks/simple-mock-clients.d.ts +2 -2
  30. package/dist/types/types.d.ts +11 -1
  31. package/dist/types-ts4.5/client/ProfileCardClient.d.ts +1 -1
  32. package/dist/types-ts4.5/client/RovoAgentCardClient.d.ts +14 -4
  33. package/dist/types-ts4.5/mocks/agent-data.d.ts +2 -1
  34. package/dist/types-ts4.5/mocks/simple-mock-clients.d.ts +2 -2
  35. package/dist/types-ts4.5/types.d.ts +11 -1
  36. package/package.json +8 -5
@@ -34,43 +34,54 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
34
34
  }
35
35
  }, [createAnalyticsEvent]);
36
36
  var getCreator = /*#__PURE__*/function () {
37
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(creator_type, creator) {
38
- var _userId, _navigateToTeamsApp, profileHref, creatorInfo;
37
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
38
+ var creator_type, creator, authoringTeam, _userId, _authoringTeam$displa, _authoringTeam$profil, _navigateToTeamsApp, profileHref, creatorInfo;
39
39
  return _regeneratorRuntime.wrap(function _callee$(_context) {
40
40
  while (1) switch (_context.prev = _context.next) {
41
41
  case 0:
42
+ creator_type = _ref2.creator_type, creator = _ref2.creator, authoringTeam = _ref2.authoringTeam;
42
43
  if (creator) {
43
- _context.next = 2;
44
+ _context.next = 3;
44
45
  break;
45
46
  }
46
47
  return _context.abrupt("return", undefined);
47
- case 2:
48
+ case 3:
48
49
  _context.t0 = creator_type;
49
- _context.next = _context.t0 === 'SYSTEM' ? 5 : _context.t0 === 'THIRD_PARTY' ? 6 : _context.t0 === 'FORGE' ? 7 : _context.t0 === 'CUSTOMER' ? 8 : 22;
50
+ _context.next = _context.t0 === 'SYSTEM' ? 6 : _context.t0 === 'THIRD_PARTY' ? 7 : _context.t0 === 'FORGE' ? 8 : _context.t0 === 'CUSTOMER' ? 9 : 25;
50
51
  break;
51
- case 5:
52
+ case 6:
52
53
  return _context.abrupt("return", {
53
54
  type: 'SYSTEM'
54
55
  });
55
- case 6:
56
+ case 7:
56
57
  return _context.abrupt("return", {
57
58
  type: 'THIRD_PARTY',
58
59
  name: creator !== null && creator !== void 0 ? creator : ''
59
60
  });
60
- case 7:
61
+ case 8:
61
62
  return _context.abrupt("return", {
62
63
  type: 'THIRD_PARTY',
63
64
  name: creator !== null && creator !== void 0 ? creator : ''
64
65
  });
65
- case 8:
66
+ case 9:
66
67
  _userId = getAAIDFromARI(creator) || '';
67
- _context.prev = 9;
68
+ _context.prev = 10;
68
69
  if (!(!_userId || !cloudId)) {
69
- _context.next = 12;
70
+ _context.next = 13;
70
71
  break;
71
72
  }
72
73
  return _context.abrupt("return", undefined);
73
- case 12:
74
+ case 13:
75
+ if (!(authoringTeam && fg('agent_studio_permissions_settings_m3_profiles'))) {
76
+ _context.next = 15;
77
+ break;
78
+ }
79
+ return _context.abrupt("return", {
80
+ type: 'CUSTOMER',
81
+ name: (_authoringTeam$displa = authoringTeam.displayName) !== null && _authoringTeam$displa !== void 0 ? _authoringTeam$displa : '',
82
+ profileLink: (_authoringTeam$profil = authoringTeam.profileUrl) !== null && _authoringTeam$profil !== void 0 ? _authoringTeam$profil : ''
83
+ });
84
+ case 15:
74
85
  _navigateToTeamsApp = navigateToTeamsApp({
75
86
  type: 'USER',
76
87
  payload: {
@@ -78,9 +89,9 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
78
89
  },
79
90
  cloudId: cloudId
80
91
  }), profileHref = _navigateToTeamsApp.href;
81
- _context.next = 15;
92
+ _context.next = 18;
82
93
  return props.resourceClient.getProfile(cloudId, _userId, fireAnalytics, fireEventNext);
83
- case 15:
94
+ case 18:
84
95
  creatorInfo = _context.sent;
85
96
  return _context.abrupt("return", {
86
97
  type: 'CUSTOMER',
@@ -88,25 +99,26 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
88
99
  profileLink: fg('platform-adopt-teams-nav-config') ? profileHref : "/people/".concat(_userId),
89
100
  id: _userId
90
101
  });
91
- case 19:
92
- _context.prev = 19;
93
- _context.t1 = _context["catch"](9);
94
- return _context.abrupt("return", undefined);
95
102
  case 22:
103
+ _context.prev = 22;
104
+ _context.t1 = _context["catch"](10);
105
+ return _context.abrupt("return", undefined);
106
+ case 25:
96
107
  return _context.abrupt("return", undefined);
97
- case 23:
108
+ case 26:
98
109
  case "end":
99
110
  return _context.stop();
100
111
  }
101
- }, _callee, null, [[9, 19]]);
112
+ }, _callee, null, [[10, 22]]);
102
113
  }));
103
- return function getCreator(_x, _x2) {
104
- return _ref2.apply(this, arguments);
114
+ return function getCreator(_x) {
115
+ return _ref3.apply(this, arguments);
105
116
  };
106
117
  }();
107
118
  var fetchAgentProfile = /*#__PURE__*/function () {
108
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
109
- var agentInfo, agentCreatorInfo;
119
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
120
+ var _agentProfileResult$a, _agentProfileResult$a2;
121
+ var agentProfileResult, agentInfo, agentCreatorInfo;
110
122
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
111
123
  while (1) switch (_context2.prev = _context2.next) {
112
124
  case 0:
@@ -116,27 +128,32 @@ export var AgentProfileCardTrigger = /*#__PURE__*/forwardRef(function (_ref, ref
116
128
  value: userId
117
129
  }, fireAnalytics, fireEventNext);
118
130
  case 2:
119
- agentInfo = _context2.sent;
120
- _context2.next = 5;
121
- return getCreator(agentInfo.creator_type, agentInfo.creator || undefined);
122
- case 5:
131
+ agentProfileResult = _context2.sent;
132
+ agentInfo = agentProfileResult.restData;
133
+ _context2.next = 6;
134
+ return getCreator({
135
+ creator_type: agentInfo.creator_type,
136
+ creator: agentInfo.creator || undefined,
137
+ authoringTeam: (_agentProfileResult$a = (_agentProfileResult$a2 = agentProfileResult.aggData) === null || _agentProfileResult$a2 === void 0 ? void 0 : _agentProfileResult$a2.authoringTeam) !== null && _agentProfileResult$a !== void 0 ? _agentProfileResult$a : undefined
138
+ });
139
+ case 6:
123
140
  agentCreatorInfo = _context2.sent;
124
141
  return _context2.abrupt("return", _objectSpread(_objectSpread({}, agentInfo), {}, {
125
142
  creatorInfo: agentCreatorInfo
126
143
  }));
127
- case 7:
144
+ case 8:
128
145
  case "end":
129
146
  return _context2.stop();
130
147
  }
131
148
  }, _callee2);
132
149
  }));
133
150
  return function fetchAgentProfile() {
134
- return _ref3.apply(this, arguments);
151
+ return _ref4.apply(this, arguments);
135
152
  };
136
153
  }();
137
- var renderProfileCard = function renderProfileCard(_ref4) {
138
- var profileData = _ref4.profileData,
139
- error = _ref4.error;
154
+ var renderProfileCard = function renderProfileCard(_ref5) {
155
+ var profileData = _ref5.profileData,
156
+ error = _ref5.error;
140
157
  return /*#__PURE__*/React.createElement(Suspense, {
141
158
  fallback: null
142
159
  }, /*#__PURE__*/React.createElement(AgentProfileCardLazy, {
@@ -11,4 +11,10 @@ var agentData = {
11
11
  user_defined_conversation_starters: [],
12
12
  deactivated: false
13
13
  };
14
+ export var agentAggData = {
15
+ authoringTeam: {
16
+ displayName: 'Profile card agent',
17
+ profileUrl: 'https://example.com/profile'
18
+ }
19
+ };
14
20
  export default agentData;
@@ -12,7 +12,7 @@ import ProfileCardClient from '../client/ProfileCardClient';
12
12
  import RovoAgentCardClient from '../client/RovoAgentCardClient';
13
13
  import TeamProfileCardClient from '../client/TeamProfileCardClient';
14
14
  import UserProfileCardClient from '../client/UserProfileCardClient';
15
- import agentData from './agent-data';
15
+ import agentData, { agentAggData } from './agent-data';
16
16
  import profiles from './profile-data';
17
17
  import teamData from './team-data';
18
18
  import { getTimeString, getWeekday } from './util';
@@ -61,8 +61,11 @@ var SimpleMockAgentClient = /*#__PURE__*/function (_RovoAgentCardClient) {
61
61
  _inherits(SimpleMockAgentClient, _RovoAgentCardClient);
62
62
  return _createClass(SimpleMockAgentClient, [{
63
63
  key: "makeRequest",
64
- value: function makeRequest(id, cloudId) {
65
- return Promise.resolve(agentData);
64
+ value: function makeRequest(id) {
65
+ return Promise.resolve({
66
+ restData: agentData,
67
+ aggData: agentAggData
68
+ });
66
69
  }
67
70
  }]);
68
71
  }(RovoAgentCardClient);
@@ -7,7 +7,7 @@ import { getPageTime } from './performance';
7
7
  var ANALYTICS_CHANNEL = 'peopleTeams';
8
8
  export var PACKAGE_META_DATA = {
9
9
  packageName: "@atlaskit/profilecard",
10
- packageVersion: "24.18.1"
10
+ packageVersion: "24.19.0"
11
11
  };
12
12
  var runItLater = function runItLater(cb) {
13
13
  var requestIdleCallback = window.requestIdleCallback;
@@ -52,7 +52,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
52
52
  actionSubjectId: actionSubjectId,
53
53
  attributes: _objectSpread(_objectSpread({
54
54
  packageName: "@atlaskit/profilecard",
55
- packageVersion: "24.18.1"
55
+ packageVersion: "24.19.0"
56
56
  }, attributes), {}, {
57
57
  firedAt: Math.round(getPageTime())
58
58
  })
@@ -21,7 +21,7 @@ declare class ProfileCardClient implements ProfileClient {
21
21
  getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
22
22
  getTeamCentralBaseUrl(teamCentralScopes?: TeamCentralScopes): Promise<string | undefined>;
23
23
  shouldShowGiveKudos(): Promise<boolean>;
24
- getRovoAgentProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<import("../types").RovoAgent>;
24
+ getRovoAgentProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<import("../types").RovoAgentCardClientResult>;
25
25
  getRovoAgentPermissions(id: string, fireAnalytics?: ((event: AnalyticsEventPayload) => void) | undefined, analyticsNext?: FireEventType): Promise<import("../types").AgentPermissions>;
26
26
  deleteAgent(id: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
27
27
  setFavouriteAgent(id: string, isFavourite: boolean, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
@@ -1,13 +1,23 @@
1
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
2
  import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
3
- import type { AgentIdType, AgentPermissions, ProfileClientOptions, RovoAgent } from '../types';
3
+ import type { AgentIdType, AgentPermissions, ProfileClientOptions, RovoAgentCardClientResult } from '../types';
4
4
  import CachingClient from './CachingClient';
5
- export default class RovoAgentCardClient extends CachingClient<RovoAgent> {
5
+ export default class RovoAgentCardClient extends CachingClient<RovoAgentCardClientResult> {
6
6
  options: ProfileClientOptions;
7
7
  constructor(options: ProfileClientOptions);
8
8
  private basePath;
9
- makeRequest(id: AgentIdType, cloudId: string): Promise<RovoAgent>;
10
- getProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<RovoAgent>;
9
+ private getActivationId;
10
+ private getAgentByARIAgg;
11
+ private getAgentByAccountIdAgg;
12
+ makeRequest(id: AgentIdType, analyticsNext?: FireEventType): Promise<RovoAgentCardClientResult>;
13
+ /**
14
+ * This function will call both REST and AGG endpoints to get the agent profile
15
+ * There are some data that is only available in the AGG endpoint, so we need to call both
16
+ * For any new fields, please only add them to the AGG endpoint
17
+ *
18
+ * @TODO migrate everything to AGG endpoint
19
+ */
20
+ getProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<RovoAgentCardClientResult>;
11
21
  deleteAgent(agentId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
12
22
  setFavouriteAgent(agentId: string, isFavourite: boolean, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
13
23
  getPermissions(id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType): Promise<AgentPermissions>;
@@ -1,3 +1,4 @@
1
- import { type RovoAgent } from '../types';
1
+ import { type RovoAgent, type RovoAgentAgg } from '../types';
2
2
  declare const agentData: RovoAgent;
3
+ export declare const agentAggData: RovoAgentAgg;
3
4
  export default agentData;
@@ -2,7 +2,7 @@ import ProfileCardClient from '../client/ProfileCardClient';
2
2
  import RovoAgentCardClient from '../client/RovoAgentCardClient';
3
3
  import TeamProfileCardClient from '../client/TeamProfileCardClient';
4
4
  import UserProfileCardClient from '../client/UserProfileCardClient';
5
- import { type AgentIdType, type ProfileCardClientData, type RovoAgent, type Team } from '../types';
5
+ import { type AgentIdType, type ProfileCardClientData, type RovoAgentCardClientResult, type Team } from '../types';
6
6
  declare class SimpleMockTeamClient extends TeamProfileCardClient {
7
7
  makeRequest(teamId: string): Promise<Team>;
8
8
  }
@@ -10,7 +10,7 @@ declare class SimpleMockUserClient extends UserProfileCardClient {
10
10
  makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
11
11
  }
12
12
  declare class SimpleMockAgentClient extends RovoAgentCardClient {
13
- makeRequest(id: AgentIdType, cloudId: string): Promise<RovoAgent>;
13
+ makeRequest(id: AgentIdType): Promise<RovoAgentCardClientResult>;
14
14
  }
15
15
  export declare const simpleMockUserClient: SimpleMockUserClient;
16
16
  export declare const simpleMockTeamClient: SimpleMockTeamClient;
@@ -80,6 +80,16 @@ export interface RovoAgent {
80
80
  icon?: string | null;
81
81
  external_config_reference?: string;
82
82
  }
83
+ export type RovoAgentAgg = {
84
+ authoringTeam: {
85
+ displayName: string | null | undefined;
86
+ profileUrl: string | null | undefined;
87
+ } | null | undefined;
88
+ };
89
+ export type RovoAgentCardClientResult = {
90
+ restData: RovoAgent;
91
+ aggData: RovoAgentAgg | null | undefined;
92
+ };
83
93
  export interface RovoAgentCreatorInfo {
84
94
  type: 'CUSTOMER' | 'SYSTEM' | 'THIRD_PARTY' | 'FORGE';
85
95
  name?: string;
@@ -485,7 +495,7 @@ export interface ProfileClient {
485
495
  getReportingLines: (userId: string) => Promise<TeamCentralReportingLinesData>;
486
496
  shouldShowGiveKudos: () => Promise<boolean>;
487
497
  getTeamCentralBaseUrl: (teamCentralScopes?: TeamCentralScopes) => Promise<string | undefined>;
488
- getRovoAgentProfile: (id: AgentIdType, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<RovoAgent>;
498
+ getRovoAgentProfile: (id: AgentIdType, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<RovoAgentCardClientResult>;
489
499
  getRovoAgentPermissions: (id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<AgentPermissions>;
490
500
  deleteAgent: (id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<void>;
491
501
  setFavouriteAgent: (id: string, isFavourite: boolean, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<void>;
@@ -21,7 +21,7 @@ declare class ProfileCardClient implements ProfileClient {
21
21
  getReportingLines(userId: string): Promise<TeamCentralReportingLinesData>;
22
22
  getTeamCentralBaseUrl(teamCentralScopes?: TeamCentralScopes): Promise<string | undefined>;
23
23
  shouldShowGiveKudos(): Promise<boolean>;
24
- getRovoAgentProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<import("../types").RovoAgent>;
24
+ getRovoAgentProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<import("../types").RovoAgentCardClientResult>;
25
25
  getRovoAgentPermissions(id: string, fireAnalytics?: ((event: AnalyticsEventPayload) => void) | undefined, analyticsNext?: FireEventType): Promise<import("../types").AgentPermissions>;
26
26
  deleteAgent(id: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
27
27
  setFavouriteAgent(id: string, isFavourite: boolean, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
@@ -1,13 +1,23 @@
1
1
  import { type AnalyticsEventPayload } from '@atlaskit/analytics-next';
2
2
  import { type FireEventType } from '@atlaskit/teams-app-internal-analytics';
3
- import type { AgentIdType, AgentPermissions, ProfileClientOptions, RovoAgent } from '../types';
3
+ import type { AgentIdType, AgentPermissions, ProfileClientOptions, RovoAgentCardClientResult } from '../types';
4
4
  import CachingClient from './CachingClient';
5
- export default class RovoAgentCardClient extends CachingClient<RovoAgent> {
5
+ export default class RovoAgentCardClient extends CachingClient<RovoAgentCardClientResult> {
6
6
  options: ProfileClientOptions;
7
7
  constructor(options: ProfileClientOptions);
8
8
  private basePath;
9
- makeRequest(id: AgentIdType, cloudId: string): Promise<RovoAgent>;
10
- getProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<RovoAgent>;
9
+ private getActivationId;
10
+ private getAgentByARIAgg;
11
+ private getAgentByAccountIdAgg;
12
+ makeRequest(id: AgentIdType, analyticsNext?: FireEventType): Promise<RovoAgentCardClientResult>;
13
+ /**
14
+ * This function will call both REST and AGG endpoints to get the agent profile
15
+ * There are some data that is only available in the AGG endpoint, so we need to call both
16
+ * For any new fields, please only add them to the AGG endpoint
17
+ *
18
+ * @TODO migrate everything to AGG endpoint
19
+ */
20
+ getProfile(id: AgentIdType, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<RovoAgentCardClientResult>;
11
21
  deleteAgent(agentId: string, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
12
22
  setFavouriteAgent(agentId: string, isFavourite: boolean, analytics?: (event: AnalyticsEventPayload) => void, analyticsNext?: FireEventType): Promise<void>;
13
23
  getPermissions(id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType): Promise<AgentPermissions>;
@@ -1,3 +1,4 @@
1
- import { type RovoAgent } from '../types';
1
+ import { type RovoAgent, type RovoAgentAgg } from '../types';
2
2
  declare const agentData: RovoAgent;
3
+ export declare const agentAggData: RovoAgentAgg;
3
4
  export default agentData;
@@ -2,7 +2,7 @@ import ProfileCardClient from '../client/ProfileCardClient';
2
2
  import RovoAgentCardClient from '../client/RovoAgentCardClient';
3
3
  import TeamProfileCardClient from '../client/TeamProfileCardClient';
4
4
  import UserProfileCardClient from '../client/UserProfileCardClient';
5
- import { type AgentIdType, type ProfileCardClientData, type RovoAgent, type Team } from '../types';
5
+ import { type AgentIdType, type ProfileCardClientData, type RovoAgentCardClientResult, type Team } from '../types';
6
6
  declare class SimpleMockTeamClient extends TeamProfileCardClient {
7
7
  makeRequest(teamId: string): Promise<Team>;
8
8
  }
@@ -10,7 +10,7 @@ declare class SimpleMockUserClient extends UserProfileCardClient {
10
10
  makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
11
11
  }
12
12
  declare class SimpleMockAgentClient extends RovoAgentCardClient {
13
- makeRequest(id: AgentIdType, cloudId: string): Promise<RovoAgent>;
13
+ makeRequest(id: AgentIdType): Promise<RovoAgentCardClientResult>;
14
14
  }
15
15
  export declare const simpleMockUserClient: SimpleMockUserClient;
16
16
  export declare const simpleMockTeamClient: SimpleMockTeamClient;
@@ -80,6 +80,16 @@ export interface RovoAgent {
80
80
  icon?: string | null;
81
81
  external_config_reference?: string;
82
82
  }
83
+ export type RovoAgentAgg = {
84
+ authoringTeam: {
85
+ displayName: string | null | undefined;
86
+ profileUrl: string | null | undefined;
87
+ } | null | undefined;
88
+ };
89
+ export type RovoAgentCardClientResult = {
90
+ restData: RovoAgent;
91
+ aggData: RovoAgentAgg | null | undefined;
92
+ };
83
93
  export interface RovoAgentCreatorInfo {
84
94
  type: 'CUSTOMER' | 'SYSTEM' | 'THIRD_PARTY' | 'FORGE';
85
95
  name?: string;
@@ -491,7 +501,7 @@ export interface ProfileClient {
491
501
  getReportingLines: (userId: string) => Promise<TeamCentralReportingLinesData>;
492
502
  shouldShowGiveKudos: () => Promise<boolean>;
493
503
  getTeamCentralBaseUrl: (teamCentralScopes?: TeamCentralScopes) => Promise<string | undefined>;
494
- getRovoAgentProfile: (id: AgentIdType, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<RovoAgent>;
504
+ getRovoAgentProfile: (id: AgentIdType, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<RovoAgentCardClientResult>;
495
505
  getRovoAgentPermissions: (id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<AgentPermissions>;
496
506
  deleteAgent: (id: string, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<void>;
497
507
  setFavouriteAgent: (id: string, isFavourite: boolean, fireAnalytics?: (event: AnalyticsEventPayload) => void, fireAnalyticsNext?: FireEventType) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "24.19.0",
3
+ "version": "24.20.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/avatar": "^25.4.0",
46
46
  "@atlaskit/avatar-group": "^12.3.0",
47
47
  "@atlaskit/button": "^23.5.0",
48
- "@atlaskit/css": "^0.14.0",
48
+ "@atlaskit/css": "^0.15.0",
49
49
  "@atlaskit/dropdown-menu": "^16.3.0",
50
50
  "@atlaskit/empty-state": "^10.1.0",
51
51
  "@atlaskit/feature-gate-js-client": "^5.5.0",
@@ -61,16 +61,16 @@
61
61
  "@atlaskit/platform-feature-flags": "^1.1.0",
62
62
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
63
63
  "@atlaskit/popup": "^4.4.0",
64
- "@atlaskit/primitives": "^14.15.0",
64
+ "@atlaskit/primitives": "^15.0.0",
65
65
  "@atlaskit/rovo-agent-components": "^3.8.0",
66
66
  "@atlaskit/rovo-triggers": "^3.13.0",
67
67
  "@atlaskit/spinner": "^19.0.0",
68
68
  "@atlaskit/teams-app-config": "^1.12.0",
69
- "@atlaskit/teams-app-internal-analytics": "^1.15.0",
69
+ "@atlaskit/teams-app-internal-analytics": "^1.16.0",
70
70
  "@atlaskit/teams-avatar": "^2.3.0",
71
71
  "@atlaskit/teams-public": "^0.62.0",
72
72
  "@atlaskit/theme": "^21.0.0",
73
- "@atlaskit/tokens": "^6.4.0",
73
+ "@atlaskit/tokens": "^6.5.0",
74
74
  "@atlaskit/tooltip": "^20.5.0",
75
75
  "@babel/runtime": "^7.0.0",
76
76
  "@compiled/react": "^0.18.3",
@@ -173,6 +173,9 @@
173
173
  },
174
174
  "jira_ai_profilecard_hide_agent_actions": {
175
175
  "type": "boolean"
176
+ },
177
+ "agent_studio_permissions_settings_m3_profiles": {
178
+ "type": "boolean"
176
179
  }
177
180
  },
178
181
  "sideEffects": [