@atlaskit/rovo-agent-components
Version:
This package host public components related to rovo agents, the components here are needed for other public atlaskit packages
37 lines (36 loc) • 1.82 kB
TypeScript
import React from 'react';
import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef.graphql';
import type { agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key } from './__generated__/agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef.graphql';
export type AgentVerificationDropdownItemProps = {
agentRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_agentRef$key | null;
userPermissionsRef: agentVerificationDropdownItem_AtlaskitRovoAgentComponents_userPermissionsRef$key | null;
/**
* Optional callback fired when the dropdown item is clicked, before the mutation is executed.
*/
onClick?: () => void;
/**
* Optional callback fired when verification mutation succeeds.
* Called with the new verified state.
*/
onVerificationSuccess?: (verified: boolean) => void;
/**
* Test ID for the dropdown item.
*/
testId?: string;
/**
* Render function for custom dropdown component.
* If not provided, defaults to DropdownItem.
*/
renderItem?: (props: {
isPending: boolean;
isVerified: boolean;
labelText: string;
onClick: () => void;
}) => React.ReactNode;
};
/**
* A dropdown item for verifying or unverifying an agent.
* Renders "Verify agent" if the agent is not verified, or "Remove verification" if it is.
* Returns null if the user doesn't have permission to govern agents or the feature flag is off.
*/
export declare const AgentVerificationDropdownItem: ({ agentRef, userPermissionsRef, onClick, onVerificationSuccess, testId, renderItem, }: AgentVerificationDropdownItemProps) => React.JSX.Element | null;