@atlaskit/rovo-agent-components 3.26.0 → 3.27.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 (20) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/ui/agent-dropdown-menu/index.js +0 -1
  3. package/dist/cjs/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.js +5 -2
  4. package/dist/cjs/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.js +16 -15
  5. package/dist/cjs/ui/agent-verification-dropdown-item/index.js +7 -4
  6. package/dist/es2019/ui/agent-dropdown-menu/index.js +0 -1
  7. package/dist/es2019/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.js +5 -2
  8. package/dist/es2019/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.js +16 -15
  9. package/dist/es2019/ui/agent-verification-dropdown-item/index.js +6 -3
  10. package/dist/esm/ui/agent-dropdown-menu/index.js +0 -1
  11. package/dist/esm/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.js +5 -2
  12. package/dist/esm/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.js +16 -15
  13. package/dist/esm/ui/agent-verification-dropdown-item/index.js +7 -4
  14. package/dist/types/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.d.ts +2 -1
  15. package/dist/types/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.d.ts +2 -2
  16. package/dist/types/ui/agent-verification-dropdown-item/index.d.ts +1 -2
  17. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.d.ts +2 -1
  18. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.d.ts +2 -2
  19. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/index.d.ts +1 -2
  20. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 3.27.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`f308049ef65c0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f308049ef65c0) -
8
+ Removed `id` property from `AgentVerificationDropdownItemProps` and refactored usage. The ID
9
+ property now comes from graqhql fragment.
10
+
3
11
  ## 3.26.0
4
12
 
5
13
  ### Minor Changes
@@ -198,7 +198,6 @@ var AgentDropdownMenu = exports.AgentDropdownMenu = function AgentDropdownMenu(_
198
198
  onCopyAgent === null || onCopyAgent === void 0 || onCopyAgent(e);
199
199
  }
200
200
  }, formatMessage(hasBeenCopied ? _messages.default.linkedCopiedToProfile : _messages.default.copyLinkToProfile)), agentRef && userPermissionsRef && (0, _platformFeatureFlags.fg)('rovo_agents_agent_verification') && /*#__PURE__*/_react.default.createElement(_agentVerificationDropdownItem.AgentVerificationDropdownItem, {
201
- agentId: agentId,
202
201
  agentRef: agentRef !== null && agentRef !== void 0 ? agentRef : null,
203
202
  userPermissionsRef: userPermissionsRef !== null && userPermissionsRef !== void 0 ? userPermissionsRef : null,
204
203
  testId: "agent-actions-menu-verification"
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<9817b3677a18810cda2656cb77948845>>
8
+ * @generated SignedSource<<357f24b825d89a67284b9e7ef5d78f83>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  * @codegen-command: yarn relay
@@ -20,10 +20,13 @@ var node = {
20
20
  "kind": "Fragment",
21
21
  "name": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef",
22
22
  "selections": [{
23
+ "kind": "ScalarField",
24
+ "name": "id"
25
+ }, {
23
26
  "kind": "ScalarField",
24
27
  "name": "isVerified"
25
28
  }],
26
29
  "type": "AgentStudioAssistant"
27
30
  };
28
- node.hash = "1635a55a6ff272864bba57326c99a315";
31
+ node.hash = "176b570bcbf4e92ccef358e70f74443d";
29
32
  var _default = exports.default = node;
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<251e7c171e33da0a0b2e0e8041d77493>>
9
- * @relayHash 79a628a32ef254ccf6142a38adf8ecca
8
+ * @generated SignedSource<<b3f6a07649eb82e75b49c0affe972388>>
9
+ * @relayHash c95a4b89f332b56ac41d44591442026c
10
10
  * @lightSyntaxTransform
11
11
  * @nogrep
12
12
  * @codegen-command: yarn relay
@@ -16,7 +16,7 @@ exports.default = void 0;
16
16
  /* eslint-disable */
17
17
  // @ts-nocheck
18
18
 
19
- // @relayRequestID 790e12806b8a31f23c8834d4c00327ae778a10fab62bf682c07e39e2b2349465
19
+ // @relayRequestID 8de69dcbcbaf21d9b6c334ea3f571232b1f22ba3798b5f801731c6faaf2bfb78
20
20
 
21
21
  var node = function () {
22
22
  var v0 = [{
@@ -34,12 +34,16 @@ var node = function () {
34
34
  "name": "__typename"
35
35
  },
36
36
  v3 = {
37
+ "kind": "ScalarField",
38
+ "name": "id"
39
+ },
40
+ v4 = {
37
41
  "enumValues": null,
38
42
  "nullable": false,
39
43
  "plural": false,
40
44
  "type": "String"
41
45
  },
42
- v4 = {
46
+ v5 = {
43
47
  "enumValues": null,
44
48
  "nullable": true,
45
49
  "plural": false,
@@ -104,17 +108,14 @@ var node = function () {
104
108
  "plural": false,
105
109
  "selections": [v2 /*: any*/, {
106
110
  "kind": "InlineFragment",
107
- "selections": [{
111
+ "selections": [v3 /*: any*/, {
108
112
  "kind": "ScalarField",
109
113
  "name": "isVerified"
110
114
  }],
111
115
  "type": "AgentStudioAssistant"
112
116
  }, {
113
117
  "kind": "InlineFragment",
114
- "selections": [{
115
- "kind": "ScalarField",
116
- "name": "id"
117
- }],
118
+ "selections": [v3 /*: any*/],
118
119
  "type": "Node",
119
120
  "abstractKey": "__isNode"
120
121
  }],
@@ -142,7 +143,7 @@ var node = function () {
142
143
  }]
143
144
  },
144
145
  "params": {
145
- "id": "790e12806b8a31f23c8834d4c00327ae778a10fab62bf682c07e39e2b2349465",
146
+ "id": "8de69dcbcbaf21d9b6c334ea3f571232b1f22ba3798b5f801731c6faaf2bfb78",
146
147
  "metadata": {
147
148
  "relayTestingSelectionTypeInfo": {
148
149
  "agentStudio_agentById": {
@@ -151,29 +152,29 @@ var node = function () {
151
152
  "plural": false,
152
153
  "type": "AgentStudioAgentResult"
153
154
  },
154
- "agentStudio_agentById.__isNode": v3 /*: any*/,
155
- "agentStudio_agentById.__typename": v3 /*: any*/,
155
+ "agentStudio_agentById.__isNode": v4 /*: any*/,
156
+ "agentStudio_agentById.__typename": v4 /*: any*/,
156
157
  "agentStudio_agentById.id": {
157
158
  "enumValues": null,
158
159
  "nullable": false,
159
160
  "plural": false,
160
161
  "type": "ID"
161
162
  },
162
- "agentStudio_agentById.isVerified": v4 /*: any*/,
163
+ "agentStudio_agentById.isVerified": v5 /*: any*/,
163
164
  "atlassianStudio_userSiteContext": {
164
165
  "enumValues": null,
165
166
  "nullable": true,
166
167
  "plural": false,
167
168
  "type": "AtlassianStudioUserSiteContextResult"
168
169
  },
169
- "atlassianStudio_userSiteContext.__typename": v3 /*: any*/,
170
+ "atlassianStudio_userSiteContext.__typename": v4 /*: any*/,
170
171
  "atlassianStudio_userSiteContext.userPermissions": {
171
172
  "enumValues": null,
172
173
  "nullable": true,
173
174
  "plural": false,
174
175
  "type": "AtlassianStudioUserProductPermissions"
175
176
  },
176
- "atlassianStudio_userSiteContext.userPermissions.isAbleToGovernAgents": v4 /*: any*/
177
+ "atlassianStudio_userSiteContext.userPermissions.isAbleToGovernAgents": v5 /*: any*/
177
178
  }
178
179
  },
179
180
  "name": "testAgentVerificationDropdownItemQuery",
@@ -27,8 +27,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
27
27
  */
28
28
  var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = function AgentVerificationDropdownItem(_ref) {
29
29
  var _userPermissions$isAb, _agentData$isVerified;
30
- var agentId = _ref.agentId,
31
- agentRef = _ref.agentRef,
30
+ var agentRef = _ref.agentRef,
32
31
  userPermissionsRef = _ref.userPermissionsRef,
33
32
  onClick = _ref.onClick,
34
33
  testId = _ref.testId;
@@ -40,6 +39,7 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
40
39
  var userPermissions = (0, _reactRelay.useFragment)(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef2.default, userPermissionsRef);
41
40
  var isAbleToGovernAgents = (_userPermissions$isAb = userPermissions === null || userPermissions === void 0 ? void 0 : userPermissions.isAbleToGovernAgents) !== null && _userPermissions$isAb !== void 0 ? _userPermissions$isAb : false;
42
41
  var isVerified = (_agentData$isVerified = agentData === null || agentData === void 0 ? void 0 : agentData.isVerified) !== null && _agentData$isVerified !== void 0 ? _agentData$isVerified : false;
42
+ var agentId = agentData === null || agentData === void 0 ? void 0 : agentData.id;
43
43
  var _useRovoAgentActionAn = (0, _actions.useRovoAgentActionAnalytics)({
44
44
  touchPoint: 'agent-verification-dropdown-item',
45
45
  agentId: agentId,
@@ -64,6 +64,7 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
64
64
  });
65
65
  }, [formatMessage, showFlag]);
66
66
  var handleUpdateVerification = (0, _react.useCallback)(function (verified) {
67
+ if (!agentId) return;
67
68
  onClick === null || onClick === void 0 || onClick();
68
69
  commitUpdateVerification({
69
70
  variables: {
@@ -98,9 +99,11 @@ var AgentVerificationDropdownItem = exports.AgentVerificationDropdownItem = func
98
99
  }
99
100
  });
100
101
  }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, showFlag, trackAgentAction, trackAgentActionError]);
101
-
102
+ if (
103
+ // Don't render if agent ID is not available
104
+ !agentId ||
102
105
  // Don't render if user doesn't have permission
103
- if (!isAbleToGovernAgents) {
106
+ !isAbleToGovernAgents) {
104
107
  return null;
105
108
  }
106
109
  return /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
@@ -158,7 +158,6 @@ export const AgentDropdownMenu = ({
158
158
  onCopyAgent === null || onCopyAgent === void 0 ? void 0 : onCopyAgent(e);
159
159
  }
160
160
  }, formatMessage(hasBeenCopied ? messages.linkedCopiedToProfile : messages.copyLinkToProfile)), agentRef && userPermissionsRef && fg('rovo_agents_agent_verification') && /*#__PURE__*/React.createElement(AgentVerificationDropdownItem, {
161
- agentId: agentId,
162
161
  agentRef: agentRef !== null && agentRef !== void 0 ? agentRef : null,
163
162
  userPermissionsRef: userPermissionsRef !== null && userPermissionsRef !== void 0 ? userPermissionsRef : null,
164
163
  testId: "agent-actions-menu-verification"
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<9817b3677a18810cda2656cb77948845>>
2
+ * @generated SignedSource<<357f24b825d89a67284b9e7ef5d78f83>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  * @codegen-command: yarn relay
@@ -14,10 +14,13 @@ const node = {
14
14
  "kind": "Fragment",
15
15
  "name": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef",
16
16
  "selections": [{
17
+ "kind": "ScalarField",
18
+ "name": "id"
19
+ }, {
17
20
  "kind": "ScalarField",
18
21
  "name": "isVerified"
19
22
  }],
20
23
  "type": "AgentStudioAssistant"
21
24
  };
22
- node.hash = "1635a55a6ff272864bba57326c99a315";
25
+ node.hash = "176b570bcbf4e92ccef358e70f74443d";
23
26
  export default node;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @generated SignedSource<<251e7c171e33da0a0b2e0e8041d77493>>
3
- * @relayHash 79a628a32ef254ccf6142a38adf8ecca
2
+ * @generated SignedSource<<b3f6a07649eb82e75b49c0affe972388>>
3
+ * @relayHash c95a4b89f332b56ac41d44591442026c
4
4
  * @lightSyntaxTransform
5
5
  * @nogrep
6
6
  * @codegen-command: yarn relay
@@ -10,7 +10,7 @@
10
10
  /* eslint-disable */
11
11
  // @ts-nocheck
12
12
 
13
- // @relayRequestID 790e12806b8a31f23c8834d4c00327ae778a10fab62bf682c07e39e2b2349465
13
+ // @relayRequestID 8de69dcbcbaf21d9b6c334ea3f571232b1f22ba3798b5f801731c6faaf2bfb78
14
14
 
15
15
  const node = function () {
16
16
  var v0 = [{
@@ -28,12 +28,16 @@ const node = function () {
28
28
  "name": "__typename"
29
29
  },
30
30
  v3 = {
31
+ "kind": "ScalarField",
32
+ "name": "id"
33
+ },
34
+ v4 = {
31
35
  "enumValues": null,
32
36
  "nullable": false,
33
37
  "plural": false,
34
38
  "type": "String"
35
39
  },
36
- v4 = {
40
+ v5 = {
37
41
  "enumValues": null,
38
42
  "nullable": true,
39
43
  "plural": false,
@@ -98,17 +102,14 @@ const node = function () {
98
102
  "plural": false,
99
103
  "selections": [v2 /*: any*/, {
100
104
  "kind": "InlineFragment",
101
- "selections": [{
105
+ "selections": [v3 /*: any*/, {
102
106
  "kind": "ScalarField",
103
107
  "name": "isVerified"
104
108
  }],
105
109
  "type": "AgentStudioAssistant"
106
110
  }, {
107
111
  "kind": "InlineFragment",
108
- "selections": [{
109
- "kind": "ScalarField",
110
- "name": "id"
111
- }],
112
+ "selections": [v3 /*: any*/],
112
113
  "type": "Node",
113
114
  "abstractKey": "__isNode"
114
115
  }],
@@ -136,7 +137,7 @@ const node = function () {
136
137
  }]
137
138
  },
138
139
  "params": {
139
- "id": "790e12806b8a31f23c8834d4c00327ae778a10fab62bf682c07e39e2b2349465",
140
+ "id": "8de69dcbcbaf21d9b6c334ea3f571232b1f22ba3798b5f801731c6faaf2bfb78",
140
141
  "metadata": {
141
142
  "relayTestingSelectionTypeInfo": {
142
143
  "agentStudio_agentById": {
@@ -145,29 +146,29 @@ const node = function () {
145
146
  "plural": false,
146
147
  "type": "AgentStudioAgentResult"
147
148
  },
148
- "agentStudio_agentById.__isNode": v3 /*: any*/,
149
- "agentStudio_agentById.__typename": v3 /*: any*/,
149
+ "agentStudio_agentById.__isNode": v4 /*: any*/,
150
+ "agentStudio_agentById.__typename": v4 /*: any*/,
150
151
  "agentStudio_agentById.id": {
151
152
  "enumValues": null,
152
153
  "nullable": false,
153
154
  "plural": false,
154
155
  "type": "ID"
155
156
  },
156
- "agentStudio_agentById.isVerified": v4 /*: any*/,
157
+ "agentStudio_agentById.isVerified": v5 /*: any*/,
157
158
  "atlassianStudio_userSiteContext": {
158
159
  "enumValues": null,
159
160
  "nullable": true,
160
161
  "plural": false,
161
162
  "type": "AtlassianStudioUserSiteContextResult"
162
163
  },
163
- "atlassianStudio_userSiteContext.__typename": v3 /*: any*/,
164
+ "atlassianStudio_userSiteContext.__typename": v4 /*: any*/,
164
165
  "atlassianStudio_userSiteContext.userPermissions": {
165
166
  "enumValues": null,
166
167
  "nullable": true,
167
168
  "plural": false,
168
169
  "type": "AtlassianStudioUserProductPermissions"
169
170
  },
170
- "atlassianStudio_userSiteContext.userPermissions.isAbleToGovernAgents": v4 /*: any*/
171
+ "atlassianStudio_userSiteContext.userPermissions.isAbleToGovernAgents": v5 /*: any*/
171
172
  }
172
173
  },
173
174
  "name": "testAgentVerificationDropdownItemQuery",
@@ -16,7 +16,6 @@ import messages from './messages';
16
16
  * Returns null if the user doesn't have permission to govern agents or the feature flag is off.
17
17
  */
18
18
  export const AgentVerificationDropdownItem = ({
19
- agentId,
20
19
  agentRef,
21
20
  userPermissionsRef,
22
21
  onClick,
@@ -33,6 +32,7 @@ export const AgentVerificationDropdownItem = ({
33
32
  const userPermissions = useFragment(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef, userPermissionsRef);
34
33
  const isAbleToGovernAgents = (_userPermissions$isAb = userPermissions === null || userPermissions === void 0 ? void 0 : userPermissions.isAbleToGovernAgents) !== null && _userPermissions$isAb !== void 0 ? _userPermissions$isAb : false;
35
34
  const isVerified = (_agentData$isVerified = agentData === null || agentData === void 0 ? void 0 : agentData.isVerified) !== null && _agentData$isVerified !== void 0 ? _agentData$isVerified : false;
35
+ const agentId = agentData === null || agentData === void 0 ? void 0 : agentData.id;
36
36
  const {
37
37
  trackAgentAction,
38
38
  trackAgentActionError
@@ -56,6 +56,7 @@ export const AgentVerificationDropdownItem = ({
56
56
  });
57
57
  }, [formatMessage, showFlag]);
58
58
  const handleUpdateVerification = useCallback(verified => {
59
+ if (!agentId) return;
59
60
  onClick === null || onClick === void 0 ? void 0 : onClick();
60
61
  commitUpdateVerification({
61
62
  variables: {
@@ -90,9 +91,11 @@ export const AgentVerificationDropdownItem = ({
90
91
  }
91
92
  });
92
93
  }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, showFlag, trackAgentAction, trackAgentActionError]);
93
-
94
+ if (
95
+ // Don't render if agent ID is not available
96
+ !agentId ||
94
97
  // Don't render if user doesn't have permission
95
- if (!isAbleToGovernAgents) {
98
+ !isAbleToGovernAgents) {
96
99
  return null;
97
100
  }
98
101
  return /*#__PURE__*/React.createElement(DropdownItem, {
@@ -189,7 +189,6 @@ export var AgentDropdownMenu = function AgentDropdownMenu(_ref2) {
189
189
  onCopyAgent === null || onCopyAgent === void 0 || onCopyAgent(e);
190
190
  }
191
191
  }, formatMessage(hasBeenCopied ? messages.linkedCopiedToProfile : messages.copyLinkToProfile)), agentRef && userPermissionsRef && fg('rovo_agents_agent_verification') && /*#__PURE__*/React.createElement(AgentVerificationDropdownItem, {
192
- agentId: agentId,
193
192
  agentRef: agentRef !== null && agentRef !== void 0 ? agentRef : null,
194
193
  userPermissionsRef: userPermissionsRef !== null && userPermissionsRef !== void 0 ? userPermissionsRef : null,
195
194
  testId: "agent-actions-menu-verification"
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<9817b3677a18810cda2656cb77948845>>
2
+ * @generated SignedSource<<357f24b825d89a67284b9e7ef5d78f83>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  * @codegen-command: yarn relay
@@ -14,10 +14,13 @@ var node = {
14
14
  "kind": "Fragment",
15
15
  "name": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef",
16
16
  "selections": [{
17
+ "kind": "ScalarField",
18
+ "name": "id"
19
+ }, {
17
20
  "kind": "ScalarField",
18
21
  "name": "isVerified"
19
22
  }],
20
23
  "type": "AgentStudioAssistant"
21
24
  };
22
- node.hash = "1635a55a6ff272864bba57326c99a315";
25
+ node.hash = "176b570bcbf4e92ccef358e70f74443d";
23
26
  export default node;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @generated SignedSource<<251e7c171e33da0a0b2e0e8041d77493>>
3
- * @relayHash 79a628a32ef254ccf6142a38adf8ecca
2
+ * @generated SignedSource<<b3f6a07649eb82e75b49c0affe972388>>
3
+ * @relayHash c95a4b89f332b56ac41d44591442026c
4
4
  * @lightSyntaxTransform
5
5
  * @nogrep
6
6
  * @codegen-command: yarn relay
@@ -10,7 +10,7 @@
10
10
  /* eslint-disable */
11
11
  // @ts-nocheck
12
12
 
13
- // @relayRequestID 790e12806b8a31f23c8834d4c00327ae778a10fab62bf682c07e39e2b2349465
13
+ // @relayRequestID 8de69dcbcbaf21d9b6c334ea3f571232b1f22ba3798b5f801731c6faaf2bfb78
14
14
 
15
15
  var node = function () {
16
16
  var v0 = [{
@@ -28,12 +28,16 @@ var node = function () {
28
28
  "name": "__typename"
29
29
  },
30
30
  v3 = {
31
+ "kind": "ScalarField",
32
+ "name": "id"
33
+ },
34
+ v4 = {
31
35
  "enumValues": null,
32
36
  "nullable": false,
33
37
  "plural": false,
34
38
  "type": "String"
35
39
  },
36
- v4 = {
40
+ v5 = {
37
41
  "enumValues": null,
38
42
  "nullable": true,
39
43
  "plural": false,
@@ -98,17 +102,14 @@ var node = function () {
98
102
  "plural": false,
99
103
  "selections": [v2 /*: any*/, {
100
104
  "kind": "InlineFragment",
101
- "selections": [{
105
+ "selections": [v3 /*: any*/, {
102
106
  "kind": "ScalarField",
103
107
  "name": "isVerified"
104
108
  }],
105
109
  "type": "AgentStudioAssistant"
106
110
  }, {
107
111
  "kind": "InlineFragment",
108
- "selections": [{
109
- "kind": "ScalarField",
110
- "name": "id"
111
- }],
112
+ "selections": [v3 /*: any*/],
112
113
  "type": "Node",
113
114
  "abstractKey": "__isNode"
114
115
  }],
@@ -136,7 +137,7 @@ var node = function () {
136
137
  }]
137
138
  },
138
139
  "params": {
139
- "id": "790e12806b8a31f23c8834d4c00327ae778a10fab62bf682c07e39e2b2349465",
140
+ "id": "8de69dcbcbaf21d9b6c334ea3f571232b1f22ba3798b5f801731c6faaf2bfb78",
140
141
  "metadata": {
141
142
  "relayTestingSelectionTypeInfo": {
142
143
  "agentStudio_agentById": {
@@ -145,29 +146,29 @@ var node = function () {
145
146
  "plural": false,
146
147
  "type": "AgentStudioAgentResult"
147
148
  },
148
- "agentStudio_agentById.__isNode": v3 /*: any*/,
149
- "agentStudio_agentById.__typename": v3 /*: any*/,
149
+ "agentStudio_agentById.__isNode": v4 /*: any*/,
150
+ "agentStudio_agentById.__typename": v4 /*: any*/,
150
151
  "agentStudio_agentById.id": {
151
152
  "enumValues": null,
152
153
  "nullable": false,
153
154
  "plural": false,
154
155
  "type": "ID"
155
156
  },
156
- "agentStudio_agentById.isVerified": v4 /*: any*/,
157
+ "agentStudio_agentById.isVerified": v5 /*: any*/,
157
158
  "atlassianStudio_userSiteContext": {
158
159
  "enumValues": null,
159
160
  "nullable": true,
160
161
  "plural": false,
161
162
  "type": "AtlassianStudioUserSiteContextResult"
162
163
  },
163
- "atlassianStudio_userSiteContext.__typename": v3 /*: any*/,
164
+ "atlassianStudio_userSiteContext.__typename": v4 /*: any*/,
164
165
  "atlassianStudio_userSiteContext.userPermissions": {
165
166
  "enumValues": null,
166
167
  "nullable": true,
167
168
  "plural": false,
168
169
  "type": "AtlassianStudioUserProductPermissions"
169
170
  },
170
- "atlassianStudio_userSiteContext.userPermissions.isAbleToGovernAgents": v4 /*: any*/
171
+ "atlassianStudio_userSiteContext.userPermissions.isAbleToGovernAgents": v5 /*: any*/
171
172
  }
172
173
  },
173
174
  "name": "testAgentVerificationDropdownItemQuery",
@@ -18,8 +18,7 @@ import messages from './messages';
18
18
  */
19
19
  export var AgentVerificationDropdownItem = function AgentVerificationDropdownItem(_ref) {
20
20
  var _userPermissions$isAb, _agentData$isVerified;
21
- var agentId = _ref.agentId,
22
- agentRef = _ref.agentRef,
21
+ var agentRef = _ref.agentRef,
23
22
  userPermissionsRef = _ref.userPermissionsRef,
24
23
  onClick = _ref.onClick,
25
24
  testId = _ref.testId;
@@ -31,6 +30,7 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
31
30
  var userPermissions = useFragment(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef, userPermissionsRef);
32
31
  var isAbleToGovernAgents = (_userPermissions$isAb = userPermissions === null || userPermissions === void 0 ? void 0 : userPermissions.isAbleToGovernAgents) !== null && _userPermissions$isAb !== void 0 ? _userPermissions$isAb : false;
33
32
  var isVerified = (_agentData$isVerified = agentData === null || agentData === void 0 ? void 0 : agentData.isVerified) !== null && _agentData$isVerified !== void 0 ? _agentData$isVerified : false;
33
+ var agentId = agentData === null || agentData === void 0 ? void 0 : agentData.id;
34
34
  var _useRovoAgentActionAn = useRovoAgentActionAnalytics({
35
35
  touchPoint: 'agent-verification-dropdown-item',
36
36
  agentId: agentId,
@@ -55,6 +55,7 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
55
55
  });
56
56
  }, [formatMessage, showFlag]);
57
57
  var handleUpdateVerification = useCallback(function (verified) {
58
+ if (!agentId) return;
58
59
  onClick === null || onClick === void 0 || onClick();
59
60
  commitUpdateVerification({
60
61
  variables: {
@@ -89,9 +90,11 @@ export var AgentVerificationDropdownItem = function AgentVerificationDropdownIte
89
90
  }
90
91
  });
91
92
  }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, showFlag, trackAgentAction, trackAgentActionError]);
92
-
93
+ if (
94
+ // Don't render if agent ID is not available
95
+ !agentId ||
93
96
  // Don't render if user doesn't have permission
94
- if (!isAbleToGovernAgents) {
97
+ !isAbleToGovernAgents) {
95
98
  return null;
96
99
  }
97
100
  return /*#__PURE__*/React.createElement(DropdownItem, {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<9817b3677a18810cda2656cb77948845>>
2
+ * @generated SignedSource<<357f24b825d89a67284b9e7ef5d78f83>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  * @codegen-command: yarn relay
@@ -7,6 +7,7 @@
7
7
  import type { ReaderFragment } from 'relay-runtime';
8
8
  import type { FragmentRefs } from "relay-runtime";
9
9
  export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$data = {
10
+ readonly id: string;
10
11
  readonly isVerified: boolean | null | undefined;
11
12
  readonly " $fragmentType": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef";
12
13
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @generated SignedSource<<251e7c171e33da0a0b2e0e8041d77493>>
3
- * @relayHash 79a628a32ef254ccf6142a38adf8ecca
2
+ * @generated SignedSource<<b3f6a07649eb82e75b49c0affe972388>>
3
+ * @relayHash c95a4b89f332b56ac41d44591442026c
4
4
  * @lightSyntaxTransform
5
5
  * @nogrep
6
6
  * @codegen-command: yarn relay
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql';
3
3
  import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql';
4
4
  export type AgentVerificationDropdownItemProps = {
5
- agentId: string;
6
5
  agentRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key | null;
7
6
  userPermissionsRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key | null;
8
7
  /**
@@ -19,4 +18,4 @@ export type AgentVerificationDropdownItemProps = {
19
18
  * Renders "Verify agent" if the agent is not verified, or "Unverify agent" if it is.
20
19
  * Returns null if the user doesn't have permission to govern agents or the feature flag is off.
21
20
  */
22
- export declare const AgentVerificationDropdownItem: ({ agentId, agentRef, userPermissionsRef, onClick, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
21
+ export declare const AgentVerificationDropdownItem: ({ agentRef, userPermissionsRef, onClick, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<9817b3677a18810cda2656cb77948845>>
2
+ * @generated SignedSource<<357f24b825d89a67284b9e7ef5d78f83>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  * @codegen-command: yarn relay
@@ -7,6 +7,7 @@
7
7
  import type { ReaderFragment } from 'relay-runtime';
8
8
  import type { FragmentRefs } from "relay-runtime";
9
9
  export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$data = {
10
+ readonly id: string;
10
11
  readonly isVerified: boolean | null | undefined;
11
12
  readonly " $fragmentType": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef";
12
13
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @generated SignedSource<<251e7c171e33da0a0b2e0e8041d77493>>
3
- * @relayHash 79a628a32ef254ccf6142a38adf8ecca
2
+ * @generated SignedSource<<b3f6a07649eb82e75b49c0affe972388>>
3
+ * @relayHash c95a4b89f332b56ac41d44591442026c
4
4
  * @lightSyntaxTransform
5
5
  * @nogrep
6
6
  * @codegen-command: yarn relay
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql';
3
3
  import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql';
4
4
  export type AgentVerificationDropdownItemProps = {
5
- agentId: string;
6
5
  agentRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key | null;
7
6
  userPermissionsRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key | null;
8
7
  /**
@@ -19,4 +18,4 @@ export type AgentVerificationDropdownItemProps = {
19
18
  * Renders "Verify agent" if the agent is not verified, or "Unverify agent" if it is.
20
19
  * Returns null if the user doesn't have permission to govern agents or the feature flag is off.
21
20
  */
22
- export declare const AgentVerificationDropdownItem: ({ agentId, agentRef, userPermissionsRef, onClick, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
21
+ export declare const AgentVerificationDropdownItem: ({ agentRef, userPermissionsRef, onClick, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "3.26.0",
3
+ "version": "3.27.0",
4
4
  "description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",