import { ComponentChild } from 'preact'; declare type AnyTool = Tool; declare type AsyncRenderToolResult = RenderToolResult | Promise; export declare const clearChat: () => void; export declare interface Config { apiUrl: string; accountId: string; agentId: string; actorId?: string; context?: Record; addToCart?: (product: Product) => void; tools?: AnyTool[]; disabledTools?: DefaultToolName[] | '*'; ui?: UiConfig; loadConfigFromApi?: boolean; } declare const DEFAULT_TOOL_NAMES: readonly ["retrieve_page_context", "display_products"]; export declare type DefaultToolName = (typeof DEFAULT_TOOL_NAMES)[number]; export declare const initialize: (config: Config) => Promise; declare interface Product { id: string; title: string; url: string; imageUrl?: string; price?: number; salePrice?: number; rating?: number; brand?: string; sku?: string; description?: string; } export declare interface RenderToolData { input: TInput; status: ToolRenderStatus | undefined; } export declare interface RenderToolHelpers { sendMessage: (text: string) => Promise; } export declare type RenderToolResult = ComponentChild | HTMLElement | null; export declare const sendMessage: (message?: string, files?: File[]) => Promise; export declare const setActorId: (value: string | undefined) => void; export declare const setContext: (context: Record | undefined) => void; export declare const toggle: (open: boolean) => void; export declare interface Tool { name: string; description: string; inputSchema: { type: 'object'; properties: Record; required?: string[]; }; execute: (input: TInput, options?: ToolExecuteOptions) => Promise; render?: (data: RenderToolData, helpers: RenderToolHelpers) => AsyncRenderToolResult; } export declare interface ToolExecuteOptions { signal?: AbortSignal; } export declare type ToolRenderStatus = 'pending' | 'success' | 'error'; export declare interface UiConfig { open?: boolean; display?: 'window' | 'drawer'; position?: 'left' | 'right'; theme?: 'light' | 'dark' | 'auto'; allowFullScreen?: boolean; allowFileUpload?: boolean; logoUrl?: string; heading?: string; initialMessage?: string; promptOptions?: string[]; placeholder?: string; showDisclaimer?: boolean; disclaimer?: string; colors?: { primary?: { default: string; hover: string; }; focus?: { light?: string; dark?: string; }; }; styles?: string; stylesheetUrl?: string; } export { } declare global { interface HawkAINamespace { Assistant: { config: Config; initialize: (config: Config) => Promise; setActorId: (value: string | undefined) => void; setContext: (context: Record | undefined) => void; toggle: (open: boolean) => void; sendMessage: (message?: string, files?: File[]) => Promise; clearChat: () => void; }; } interface Window { HawkAI: HawkAINamespace; } }