import { WidgetConfig, ConversationMessage, StreamEvent, JsonValue, FollowUpSuggestion } from '../types';
export interface ApiClientConfig {
    widgetId: string;
    apiUrl: string;
    currentRoute?: string;
}
export declare class ApiError extends Error {
    status: number;
    details?: unknown;
    retryAfterMs?: number;
    constructor(message: string, status: number, options?: {
        details?: unknown;
        retryAfterMs?: number;
    });
}
export declare class WidgetApiClient {
    private config;
    private detectedTimeZone;
    constructor(config: ApiClientConfig);
    private static detectTimeZone;
    private getTimeZone;
    /**
     * Get widget configuration
     */
    getConfig(): Promise<WidgetConfig>;
    getOrCreateConversation(conversationId?: string): Promise<{
        id: string;
        messages: ConversationMessage[];
    }>;
    /**
     * Upload a file
     */
    uploadFile(conversationId: string, file: File): Promise<{
        id: string;
        filename: string;
        size: number;
    }>;
    sendAgentMessageStream(conversationId: string, message: string, fileIds?: string[], signal?: AbortSignal): AsyncGenerator<StreamEvent>;
    continueAgentMessageStream(conversationId: string, toolCallId: string, state: Record<string, JsonValue>, signal?: AbortSignal): AsyncGenerator<StreamEvent>;
    dismissAgentMessageStream(conversationId: string, toolCallId: string, signal?: AbortSignal): AsyncGenerator<StreamEvent>;
    /**
     * Submit feedback for a message
     */
    submitFeedback(sessionId: string, messageId: string, feedback: 'positive' | 'negative', meta?: {
        role?: string;
        content?: string;
        timestamp?: string;
    }): Promise<void>;
    /**
     * Generate follow-up suggestions based on conversation context and available actions.
     * Called by the frontend after receiving a "done" event from the agent.
     */
    generateFollowUps(messages: ConversationMessage[], actionIds: string[]): Promise<FollowUpSuggestion[]>;
    /**
     * Create a demo conversation with preset messages
     * Used when demo animation completes to persist the demo conversation to the database
     */
    createDemoConversation(userMessage: string, assistantMessage: string): Promise<{
        id: string;
        success: boolean;
    }>;
    /**
     * Validate widget access
     */
    validateAccess(): Promise<boolean>;
}
//# sourceMappingURL=client.d.ts.map