@atlaskit/rovo-agent-components 3.22.0 → 3.23.1

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 (38) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/agent-verification-dropdown-item/package.json +17 -0
  3. package/dist/cjs/index.js +8 -1
  4. package/dist/cjs/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.js +29 -0
  5. package/dist/cjs/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation.graphql.js +122 -0
  6. package/dist/cjs/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql.js +29 -0
  7. package/dist/cjs/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.js +186 -0
  8. package/dist/cjs/ui/agent-verification-dropdown-item/index.js +112 -0
  9. package/dist/cjs/ui/agent-verification-dropdown-item/messages.js +44 -0
  10. package/dist/es2019/index.js +2 -1
  11. package/dist/es2019/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.js +23 -0
  12. package/dist/es2019/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation.graphql.js +116 -0
  13. package/dist/es2019/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql.js +23 -0
  14. package/dist/es2019/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.js +180 -0
  15. package/dist/es2019/ui/agent-verification-dropdown-item/index.js +102 -0
  16. package/dist/es2019/ui/agent-verification-dropdown-item/messages.js +38 -0
  17. package/dist/esm/index.js +2 -1
  18. package/dist/esm/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.js +23 -0
  19. package/dist/esm/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation.graphql.js +116 -0
  20. package/dist/esm/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql.js +23 -0
  21. package/dist/esm/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.js +180 -0
  22. package/dist/esm/ui/agent-verification-dropdown-item/index.js +103 -0
  23. package/dist/esm/ui/agent-verification-dropdown-item/messages.js +38 -0
  24. package/dist/types/index.d.ts +1 -0
  25. package/dist/types/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.d.ts +18 -0
  26. package/dist/types/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation.graphql.d.ts +30 -0
  27. package/dist/types/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql.d.ts +18 -0
  28. package/dist/types/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.d.ts +26 -0
  29. package/dist/types/ui/agent-verification-dropdown-item/index.d.ts +22 -0
  30. package/dist/types/ui/agent-verification-dropdown-item/messages.d.ts +38 -0
  31. package/dist/types-ts4.5/index.d.ts +1 -0
  32. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql.d.ts +18 -0
  33. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation.graphql.d.ts +30 -0
  34. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql.d.ts +18 -0
  35. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/__generated__/testAgentVerificationDropdownItemQuery.graphql.d.ts +26 -0
  36. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/index.d.ts +22 -0
  37. package/dist/types-ts4.5/ui/agent-verification-dropdown-item/messages.d.ts +38 -0
  38. package/package.json +6 -2
@@ -0,0 +1,180 @@
1
+ /**
2
+ * @generated SignedSource<<251e7c171e33da0a0b2e0e8041d77493>>
3
+ * @relayHash 79a628a32ef254ccf6142a38adf8ecca
4
+ * @lightSyntaxTransform
5
+ * @nogrep
6
+ * @codegen-command: yarn relay
7
+ */
8
+
9
+ /* tslint:disable */
10
+ /* eslint-disable */
11
+ // @ts-nocheck
12
+
13
+ // @relayRequestID 790e12806b8a31f23c8834d4c00327ae778a10fab62bf682c07e39e2b2349465
14
+
15
+ var node = function () {
16
+ var v0 = [{
17
+ "kind": "Literal",
18
+ "name": "id",
19
+ "value": "test-agent-id"
20
+ }],
21
+ v1 = [{
22
+ "kind": "Literal",
23
+ "name": "cloudId",
24
+ "value": "test-cloud-id"
25
+ }],
26
+ v2 = {
27
+ "kind": "ScalarField",
28
+ "name": "__typename"
29
+ },
30
+ v3 = {
31
+ "enumValues": null,
32
+ "nullable": false,
33
+ "plural": false,
34
+ "type": "String"
35
+ },
36
+ v4 = {
37
+ "enumValues": null,
38
+ "nullable": true,
39
+ "plural": false,
40
+ "type": "Boolean"
41
+ };
42
+ return {
43
+ "fragment": {
44
+ "argumentDefinitions": [],
45
+ "kind": "Fragment",
46
+ "name": "testAgentVerificationDropdownItemQuery",
47
+ "selections": [{
48
+ "kind": "RequiredField",
49
+ "field": {
50
+ "args": v0 /*: any*/,
51
+ "kind": "LinkedField",
52
+ "name": "agentStudio_agentById",
53
+ "plural": false,
54
+ "selections": [{
55
+ "kind": "InlineFragment",
56
+ "selections": [{
57
+ "kind": "FragmentSpread",
58
+ "name": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef"
59
+ }],
60
+ "type": "AgentStudioAssistant"
61
+ }],
62
+ "storageKey": "agentStudio_agentById(id:\"test-agent-id\")"
63
+ },
64
+ "action": "THROW",
65
+ "path": "agentStudio_agentById"
66
+ }, {
67
+ "args": v1 /*: any*/,
68
+ "kind": "LinkedField",
69
+ "name": "atlassianStudio_userSiteContext",
70
+ "plural": false,
71
+ "selections": [{
72
+ "kind": "InlineFragment",
73
+ "selections": [{
74
+ "concreteType": "AtlassianStudioUserProductPermissions",
75
+ "kind": "LinkedField",
76
+ "name": "userPermissions",
77
+ "plural": false,
78
+ "selections": [{
79
+ "kind": "FragmentSpread",
80
+ "name": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef"
81
+ }]
82
+ }],
83
+ "type": "AtlassianStudioUserSiteContextOutput"
84
+ }],
85
+ "storageKey": "atlassianStudio_userSiteContext(cloudId:\"test-cloud-id\")"
86
+ }],
87
+ "type": "Query"
88
+ },
89
+ "kind": "Request",
90
+ "operation": {
91
+ "argumentDefinitions": [],
92
+ "kind": "Operation",
93
+ "name": "testAgentVerificationDropdownItemQuery",
94
+ "selections": [{
95
+ "args": v0 /*: any*/,
96
+ "kind": "LinkedField",
97
+ "name": "agentStudio_agentById",
98
+ "plural": false,
99
+ "selections": [v2 /*: any*/, {
100
+ "kind": "InlineFragment",
101
+ "selections": [{
102
+ "kind": "ScalarField",
103
+ "name": "isVerified"
104
+ }],
105
+ "type": "AgentStudioAssistant"
106
+ }, {
107
+ "kind": "InlineFragment",
108
+ "selections": [{
109
+ "kind": "ScalarField",
110
+ "name": "id"
111
+ }],
112
+ "type": "Node",
113
+ "abstractKey": "__isNode"
114
+ }],
115
+ "storageKey": "agentStudio_agentById(id:\"test-agent-id\")"
116
+ }, {
117
+ "args": v1 /*: any*/,
118
+ "kind": "LinkedField",
119
+ "name": "atlassianStudio_userSiteContext",
120
+ "plural": false,
121
+ "selections": [v2 /*: any*/, {
122
+ "kind": "InlineFragment",
123
+ "selections": [{
124
+ "concreteType": "AtlassianStudioUserProductPermissions",
125
+ "kind": "LinkedField",
126
+ "name": "userPermissions",
127
+ "plural": false,
128
+ "selections": [{
129
+ "kind": "ScalarField",
130
+ "name": "isAbleToGovernAgents"
131
+ }]
132
+ }],
133
+ "type": "AtlassianStudioUserSiteContextOutput"
134
+ }],
135
+ "storageKey": "atlassianStudio_userSiteContext(cloudId:\"test-cloud-id\")"
136
+ }]
137
+ },
138
+ "params": {
139
+ "id": "790e12806b8a31f23c8834d4c00327ae778a10fab62bf682c07e39e2b2349465",
140
+ "metadata": {
141
+ "relayTestingSelectionTypeInfo": {
142
+ "agentStudio_agentById": {
143
+ "enumValues": null,
144
+ "nullable": true,
145
+ "plural": false,
146
+ "type": "AgentStudioAgentResult"
147
+ },
148
+ "agentStudio_agentById.__isNode": v3 /*: any*/,
149
+ "agentStudio_agentById.__typename": v3 /*: any*/,
150
+ "agentStudio_agentById.id": {
151
+ "enumValues": null,
152
+ "nullable": false,
153
+ "plural": false,
154
+ "type": "ID"
155
+ },
156
+ "agentStudio_agentById.isVerified": v4 /*: any*/,
157
+ "atlassianStudio_userSiteContext": {
158
+ "enumValues": null,
159
+ "nullable": true,
160
+ "plural": false,
161
+ "type": "AtlassianStudioUserSiteContextResult"
162
+ },
163
+ "atlassianStudio_userSiteContext.__typename": v3 /*: any*/,
164
+ "atlassianStudio_userSiteContext.userPermissions": {
165
+ "enumValues": null,
166
+ "nullable": true,
167
+ "plural": false,
168
+ "type": "AtlassianStudioUserProductPermissions"
169
+ },
170
+ "atlassianStudio_userSiteContext.userPermissions.isAbleToGovernAgents": v4 /*: any*/
171
+ }
172
+ },
173
+ "name": "testAgentVerificationDropdownItemQuery",
174
+ "operationKind": "query",
175
+ "text": null
176
+ }
177
+ };
178
+ }();
179
+ node.hash = "19dfd01b36565c5a9ddf6cfed9c3594f";
180
+ export default node;
@@ -0,0 +1,103 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import _agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation from "./__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation.graphql";
3
+ import _agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef from "./__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql";
4
+ import _agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef from "./__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql";
5
+ import React, { useCallback } from 'react';
6
+ import { useIntl } from 'react-intl-next';
7
+ import { graphql, useFragment, useMutation } from 'react-relay';
8
+ import { DropdownItem } from '@atlaskit/dropdown-menu';
9
+ import { useFlags } from '@atlaskit/flag';
10
+ import ErrorIcon from '@atlaskit/icon/core/status-error';
11
+ import SuccessIcon from '@atlaskit/icon/core/status-success';
12
+ import { AgentActions, useRovoAgentActionAnalytics } from '@atlaskit/rovo-agent-analytics/actions';
13
+ import messages from './messages';
14
+ /**
15
+ * A dropdown item for verifying or unverifying an agent.
16
+ * Renders "Verify agent" if the agent is not verified, or "Unverify agent" if it is.
17
+ * Returns null if the user doesn't have permission to govern agents or the feature flag is off.
18
+ */
19
+ export var AgentVerificationDropdownItem = function AgentVerificationDropdownItem(_ref) {
20
+ var _userPermissions$isAb, _agentData$isVerified;
21
+ var agentId = _ref.agentId,
22
+ agentRef = _ref.agentRef,
23
+ userPermissionsRef = _ref.userPermissionsRef,
24
+ onClick = _ref.onClick,
25
+ testId = _ref.testId;
26
+ var _useIntl = useIntl(),
27
+ formatMessage = _useIntl.formatMessage;
28
+ var _useFlags = useFlags(),
29
+ showFlag = _useFlags.showFlag;
30
+ var agentData = useFragment(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef, agentRef);
31
+ var userPermissions = useFragment(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef, userPermissionsRef);
32
+ var isAbleToGovernAgents = (_userPermissions$isAb = userPermissions === null || userPermissions === void 0 ? void 0 : userPermissions.isAbleToGovernAgents) !== null && _userPermissions$isAb !== void 0 ? _userPermissions$isAb : false;
33
+ var isVerified = (_agentData$isVerified = agentData === null || agentData === void 0 ? void 0 : agentData.isVerified) !== null && _agentData$isVerified !== void 0 ? _agentData$isVerified : false;
34
+ var _useRovoAgentActionAn = useRovoAgentActionAnalytics({
35
+ touchPoint: 'agent-verification-dropdown-item',
36
+ agentId: agentId,
37
+ isAbleToGovernAgents: isAbleToGovernAgents
38
+ }),
39
+ trackAgentAction = _useRovoAgentActionAn.trackAgentAction,
40
+ trackAgentActionError = _useRovoAgentActionAn.trackAgentActionError;
41
+ var _useMutation = useMutation(_agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation),
42
+ _useMutation2 = _slicedToArray(_useMutation, 1),
43
+ commitUpdateVerification = _useMutation2[0];
44
+ var handleError = useCallback(function (verified, errorMessage) {
45
+ showFlag({
46
+ title: formatMessage(verified ? messages.verifyErrorTitle : messages.unverifyErrorTitle),
47
+ description: formatMessage(messages.errorDescription, {
48
+ errorMessage: errorMessage
49
+ }),
50
+ appearance: 'error',
51
+ icon: /*#__PURE__*/React.createElement(ErrorIcon, {
52
+ spacing: "spacious",
53
+ label: ""
54
+ })
55
+ });
56
+ }, [formatMessage, showFlag]);
57
+ var handleUpdateVerification = useCallback(function (verified) {
58
+ onClick === null || onClick === void 0 || onClick();
59
+ commitUpdateVerification({
60
+ variables: {
61
+ id: agentId,
62
+ verified: verified
63
+ },
64
+ onCompleted: function onCompleted(_, errors) {
65
+ if (errors && errors.length > 0) {
66
+ var errorMessage = errors[0].message;
67
+ trackAgentActionError(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, new Error(errorMessage), {
68
+ agentId: agentId
69
+ });
70
+ handleError(verified, errorMessage);
71
+ return;
72
+ }
73
+ trackAgentAction(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, {});
74
+ showFlag({
75
+ title: formatMessage(verified ? messages.verifySuccessTitle : messages.unverifySuccessTitle),
76
+ appearance: 'success',
77
+ isAutoDismiss: true,
78
+ icon: /*#__PURE__*/React.createElement(SuccessIcon, {
79
+ spacing: "spacious",
80
+ label: ""
81
+ })
82
+ });
83
+ },
84
+ onError: function onError(error) {
85
+ trackAgentActionError(verified ? AgentActions.VERIFY : AgentActions.UNVERIFY, error, {
86
+ agentId: agentId
87
+ });
88
+ handleError(verified, error.message);
89
+ }
90
+ });
91
+ }, [agentId, commitUpdateVerification, formatMessage, handleError, onClick, showFlag, trackAgentAction, trackAgentActionError]);
92
+
93
+ // Don't render if user doesn't have permission
94
+ if (!isAbleToGovernAgents) {
95
+ return null;
96
+ }
97
+ return /*#__PURE__*/React.createElement(DropdownItem, {
98
+ testId: testId,
99
+ onClick: function onClick() {
100
+ return handleUpdateVerification(!isVerified);
101
+ }
102
+ }, formatMessage(isVerified ? messages.unverifyAgentLabel : messages.verifyAgentLabel));
103
+ };
@@ -0,0 +1,38 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export default defineMessages({
3
+ verifyAgentLabel: {
4
+ id: 'rovo-agent-components.agent-verification-dropdown-item.verify-agent',
5
+ defaultMessage: 'Verify agent',
6
+ description: 'Label for verify agent dropdown menu item'
7
+ },
8
+ unverifyAgentLabel: {
9
+ id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-agent',
10
+ defaultMessage: 'Unverify agent',
11
+ description: 'Label for unverify agent dropdown menu item'
12
+ },
13
+ verifySuccessTitle: {
14
+ id: 'rovo-agent-components.agent-verification-dropdown-item.verify-success-title',
15
+ defaultMessage: 'Agent verified',
16
+ description: 'Title for success flag when agent is verified'
17
+ },
18
+ unverifySuccessTitle: {
19
+ id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-success-title',
20
+ defaultMessage: 'Agent unverified',
21
+ description: 'Title for success flag when agent is unverified'
22
+ },
23
+ verifyErrorTitle: {
24
+ id: 'rovo-agent-components.agent-verification-dropdown-item.verify-error-title',
25
+ defaultMessage: 'Failed to verify agent',
26
+ description: 'Title for error flag when verifying agent fails'
27
+ },
28
+ unverifyErrorTitle: {
29
+ id: 'rovo-agent-components.agent-verification-dropdown-item.unverify-error-title',
30
+ defaultMessage: 'Failed to unverify agent',
31
+ description: 'Title for error flag when unverifying agent fails'
32
+ },
33
+ errorDescription: {
34
+ id: 'rovo-agent-components.agent-verification-dropdown-item.error-description',
35
+ defaultMessage: 'An error occurred while updating agent verification status: {errorMessage}',
36
+ description: 'Description for error flag showing the error message'
37
+ }
38
+ });
@@ -11,3 +11,4 @@ export { AgentAvatar } from './ui/agent-avatar';
11
11
  export { AgentBanner, GeneratedAvatar } from './ui/agent-avatar/generated-avatars';
12
12
  export { AgentDropdownMenu } from './ui/agent-dropdown-menu';
13
13
  export { AgentMenuItemSkeleton } from './ui/agent-menu-item-skeleton';
14
+ export { AgentVerificationDropdownItem, type AgentVerificationDropdownItemProps, } from './ui/agent-verification-dropdown-item';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @generated SignedSource<<9817b3677a18810cda2656cb77948845>>
3
+ * @lightSyntaxTransform
4
+ * @nogrep
5
+ * @codegen-command: yarn relay
6
+ */
7
+ import type { ReaderFragment } from 'relay-runtime';
8
+ import type { FragmentRefs } from "relay-runtime";
9
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$data = {
10
+ readonly isVerified: boolean | null | undefined;
11
+ readonly " $fragmentType": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef";
12
+ };
13
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key = {
14
+ readonly " $data"?: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$data;
15
+ readonly " $fragmentSpreads": FragmentRefs<"agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef">;
16
+ };
17
+ declare const node: ReaderFragment;
18
+ export default node;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @generated SignedSource<<e119306497999ac48bfef5821a96f2eb>>
3
+ * @relayHash 426410e11638597e4a12069dd5a8be16
4
+ * @lightSyntaxTransform
5
+ * @nogrep
6
+ * @codegen-command: yarn relay
7
+ */
8
+ import type { ConcreteRequest } from 'relay-runtime';
9
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation$variables = {
10
+ id: string;
11
+ verified: boolean;
12
+ };
13
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation$data = {
14
+ readonly agentStudio_updateAgentVerification: {
15
+ readonly agent: {
16
+ readonly id?: string;
17
+ readonly isVerified?: boolean | null | undefined;
18
+ } | null | undefined;
19
+ readonly errors: ReadonlyArray<{
20
+ readonly message: string | null | undefined;
21
+ }> | null | undefined;
22
+ readonly success: boolean;
23
+ } | null | undefined;
24
+ };
25
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation = {
26
+ response: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation$data;
27
+ variables: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation$variables;
28
+ };
29
+ declare const node: ConcreteRequest;
30
+ export default node;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @generated SignedSource<<3ba8bcbc18cbb9766a1547794c6c98af>>
3
+ * @lightSyntaxTransform
4
+ * @nogrep
5
+ * @codegen-command: yarn relay
6
+ */
7
+ import type { ReaderFragment } from 'relay-runtime';
8
+ import type { FragmentRefs } from "relay-runtime";
9
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$data = {
10
+ readonly isAbleToGovernAgents: boolean | null | undefined;
11
+ readonly " $fragmentType": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef";
12
+ };
13
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key = {
14
+ readonly " $data"?: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$data;
15
+ readonly " $fragmentSpreads": FragmentRefs<"agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef">;
16
+ };
17
+ declare const node: ReaderFragment;
18
+ export default node;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @generated SignedSource<<251e7c171e33da0a0b2e0e8041d77493>>
3
+ * @relayHash 79a628a32ef254ccf6142a38adf8ecca
4
+ * @lightSyntaxTransform
5
+ * @nogrep
6
+ * @codegen-command: yarn relay
7
+ */
8
+ import type { ConcreteRequest } from 'relay-runtime';
9
+ import type { FragmentRefs } from "relay-runtime";
10
+ export type testAgentVerificationDropdownItemQuery$variables = Record<PropertyKey, never>;
11
+ export type testAgentVerificationDropdownItemQuery$data = {
12
+ readonly agentStudio_agentById: {
13
+ readonly " $fragmentSpreads": FragmentRefs<"agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef">;
14
+ };
15
+ readonly atlassianStudio_userSiteContext: {
16
+ readonly userPermissions?: {
17
+ readonly " $fragmentSpreads": FragmentRefs<"agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef">;
18
+ } | null | undefined;
19
+ } | null | undefined;
20
+ };
21
+ export type testAgentVerificationDropdownItemQuery = {
22
+ response: testAgentVerificationDropdownItemQuery$data;
23
+ variables: testAgentVerificationDropdownItemQuery$variables;
24
+ };
25
+ declare const node: ConcreteRequest;
26
+ export default node;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql';
3
+ import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql';
4
+ export type AgentVerificationDropdownItemProps = {
5
+ agentId: string;
6
+ agentRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key | null;
7
+ userPermissionsRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key | null;
8
+ /**
9
+ * Optional callback fired when the dropdown item is clicked, before the mutation is executed.
10
+ */
11
+ onClick?: () => void;
12
+ /**
13
+ * Test ID for the dropdown item.
14
+ */
15
+ testId?: string;
16
+ };
17
+ /**
18
+ * A dropdown item for verifying or unverifying an agent.
19
+ * Renders "Verify agent" if the agent is not verified, or "Unverify agent" if it is.
20
+ * Returns null if the user doesn't have permission to govern agents or the feature flag is off.
21
+ */
22
+ export declare const AgentVerificationDropdownItem: ({ agentId, agentRef, userPermissionsRef, onClick, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
@@ -0,0 +1,38 @@
1
+ declare const _default: {
2
+ verifyAgentLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ unverifyAgentLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ verifySuccessTitle: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ unverifySuccessTitle: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ verifyErrorTitle: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
27
+ unverifyErrorTitle: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ errorDescription: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ };
38
+ export default _default;
@@ -11,3 +11,4 @@ export { AgentAvatar } from './ui/agent-avatar';
11
11
  export { AgentBanner, GeneratedAvatar } from './ui/agent-avatar/generated-avatars';
12
12
  export { AgentDropdownMenu } from './ui/agent-dropdown-menu';
13
13
  export { AgentMenuItemSkeleton } from './ui/agent-menu-item-skeleton';
14
+ export { AgentVerificationDropdownItem, type AgentVerificationDropdownItemProps, } from './ui/agent-verification-dropdown-item';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @generated SignedSource<<9817b3677a18810cda2656cb77948845>>
3
+ * @lightSyntaxTransform
4
+ * @nogrep
5
+ * @codegen-command: yarn relay
6
+ */
7
+ import type { ReaderFragment } from 'relay-runtime';
8
+ import type { FragmentRefs } from "relay-runtime";
9
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$data = {
10
+ readonly isVerified: boolean | null | undefined;
11
+ readonly " $fragmentType": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef";
12
+ };
13
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key = {
14
+ readonly " $data"?: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$data;
15
+ readonly " $fragmentSpreads": FragmentRefs<"agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef">;
16
+ };
17
+ declare const node: ReaderFragment;
18
+ export default node;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @generated SignedSource<<e119306497999ac48bfef5821a96f2eb>>
3
+ * @relayHash 426410e11638597e4a12069dd5a8be16
4
+ * @lightSyntaxTransform
5
+ * @nogrep
6
+ * @codegen-command: yarn relay
7
+ */
8
+ import type { ConcreteRequest } from 'relay-runtime';
9
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation$variables = {
10
+ id: string;
11
+ verified: boolean;
12
+ };
13
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation$data = {
14
+ readonly agentStudio_updateAgentVerification: {
15
+ readonly agent: {
16
+ readonly id?: string;
17
+ readonly isVerified?: boolean | null | undefined;
18
+ } | null | undefined;
19
+ readonly errors: ReadonlyArray<{
20
+ readonly message: string | null | undefined;
21
+ }> | null | undefined;
22
+ readonly success: boolean;
23
+ } | null | undefined;
24
+ };
25
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation = {
26
+ response: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation$data;
27
+ variables: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_updateAgentVerificationMutation$variables;
28
+ };
29
+ declare const node: ConcreteRequest;
30
+ export default node;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @generated SignedSource<<3ba8bcbc18cbb9766a1547794c6c98af>>
3
+ * @lightSyntaxTransform
4
+ * @nogrep
5
+ * @codegen-command: yarn relay
6
+ */
7
+ import type { ReaderFragment } from 'relay-runtime';
8
+ import type { FragmentRefs } from "relay-runtime";
9
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$data = {
10
+ readonly isAbleToGovernAgents: boolean | null | undefined;
11
+ readonly " $fragmentType": "agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef";
12
+ };
13
+ export type agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key = {
14
+ readonly " $data"?: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$data;
15
+ readonly " $fragmentSpreads": FragmentRefs<"agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef">;
16
+ };
17
+ declare const node: ReaderFragment;
18
+ export default node;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @generated SignedSource<<251e7c171e33da0a0b2e0e8041d77493>>
3
+ * @relayHash 79a628a32ef254ccf6142a38adf8ecca
4
+ * @lightSyntaxTransform
5
+ * @nogrep
6
+ * @codegen-command: yarn relay
7
+ */
8
+ import type { ConcreteRequest } from 'relay-runtime';
9
+ import type { FragmentRefs } from "relay-runtime";
10
+ export type testAgentVerificationDropdownItemQuery$variables = Record<PropertyKey, never>;
11
+ export type testAgentVerificationDropdownItemQuery$data = {
12
+ readonly agentStudio_agentById: {
13
+ readonly " $fragmentSpreads": FragmentRefs<"agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef">;
14
+ };
15
+ readonly atlassianStudio_userSiteContext: {
16
+ readonly userPermissions?: {
17
+ readonly " $fragmentSpreads": FragmentRefs<"agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef">;
18
+ } | null | undefined;
19
+ } | null | undefined;
20
+ };
21
+ export type testAgentVerificationDropdownItemQuery = {
22
+ response: testAgentVerificationDropdownItemQuery$data;
23
+ variables: testAgentVerificationDropdownItemQuery$variables;
24
+ };
25
+ declare const node: ConcreteRequest;
26
+ export default node;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql';
3
+ import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql';
4
+ export type AgentVerificationDropdownItemProps = {
5
+ agentId: string;
6
+ agentRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key | null;
7
+ userPermissionsRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key | null;
8
+ /**
9
+ * Optional callback fired when the dropdown item is clicked, before the mutation is executed.
10
+ */
11
+ onClick?: () => void;
12
+ /**
13
+ * Test ID for the dropdown item.
14
+ */
15
+ testId?: string;
16
+ };
17
+ /**
18
+ * A dropdown item for verifying or unverifying an agent.
19
+ * Renders "Verify agent" if the agent is not verified, or "Unverify agent" if it is.
20
+ * Returns null if the user doesn't have permission to govern agents or the feature flag is off.
21
+ */
22
+ export declare const AgentVerificationDropdownItem: ({ agentId, agentRef, userPermissionsRef, onClick, testId, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;
@@ -0,0 +1,38 @@
1
+ declare const _default: {
2
+ verifyAgentLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ unverifyAgentLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ verifySuccessTitle: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ unverifySuccessTitle: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ verifyErrorTitle: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
27
+ unverifyErrorTitle: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ errorDescription: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ };
38
+ export default _default;