@atlaskit/rovo-agent-components
Version:
This package host public components related to rovo agents, the components here are needed for other public atlaskit packages
58 lines (57 loc) • 2.99 kB
TypeScript
/**
* @jsxRuntime classic
* @jsx jsx
*/
import React from 'react';
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
import { type ButtonProps, IconButton } from '@atlaskit/button/new';
import DropdownMenu, { DropdownItem } from '@atlaskit/dropdown-menu';
import { type AgentVerificationDropdownItemProps } from '../agent-verification-dropdown-item';
type ChatToAgentButtonProps = {
onClick: ButtonProps['onClick'];
};
type CustomDropdownOption = {
id: string;
label: string;
onClick: () => void;
};
export declare const ChatToAgentButton: ({ onClick }: ChatToAgentButtonProps) => JSX.Element;
type ViewAgentOptionProps = {
showViewAgentOption: true;
onViewAgentClick: React.ComponentProps<typeof DropdownItem>['onClick'];
} | {
showViewAgentOption?: false;
onViewAgentClick?: undefined;
};
type ViewAgentFullProfileProps = {
onViewAgentFullProfileClick: React.ComponentProps<typeof DropdownItem>['onClick'];
doesAgentHaveIdentityAccountId: boolean;
} | {
onViewAgentFullProfileClick?: undefined;
doesAgentHaveIdentityAccountId?: undefined;
};
type AgentDropdownMenuProps = {
isAutodevTemplateAgent?: boolean;
agentId: string;
agentName?: string;
onEditAgent?: React.ComponentProps<typeof DropdownItem>['onClick'];
onCopyAgent?: React.ComponentProps<typeof DropdownItem>['onClick'];
onDuplicateAgent?: (e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => Promise<void>;
onDeleteAgent?: React.ComponentProps<typeof DropdownItem>['onClick'];
isForgeAgent: boolean;
onDropdownTriggerClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent) => void;
onOpenChange?: React.ComponentProps<typeof DropdownMenu>['onOpenChange'];
spacing?: React.ComponentProps<typeof IconButton>['spacing'];
appearance?: React.ComponentProps<typeof IconButton>['appearance'];
dropdownMenuTestId?: React.ComponentProps<typeof DropdownMenu>['testId'];
loadPermissionsOnMount?: boolean;
shouldTriggerStopPropagation?: boolean;
loadAgentPermissions: () => Promise<{
isCreateEnabled?: boolean;
isEditEnabled: boolean;
isDeleteEnabled: boolean;
}>;
customDropdownOptions?: CustomDropdownOption[];
} & ViewAgentOptionProps & ViewAgentFullProfileProps & Partial<Pick<AgentVerificationDropdownItemProps, 'agentRef' | 'userPermissionsRef' | 'onVerificationSuccess'>>;
export declare const AgentDropdownMenu: ({ isAutodevTemplateAgent, onEditAgent, onCopyAgent, onDuplicateAgent, onDeleteAgent, onViewAgentFullProfileClick, onOpenChange, isForgeAgent, showViewAgentOption, onViewAgentClick, onDropdownTriggerClick, spacing, appearance, dropdownMenuTestId, doesAgentHaveIdentityAccountId, loadAgentPermissions, loadPermissionsOnMount, shouldTriggerStopPropagation, agentName, agentRef, userPermissionsRef, onVerificationSuccess, customDropdownOptions, }: AgentDropdownMenuProps) => JSX.Element;
export {};