UNPKG

@jutech-devs/agent-sdk

Version:

Modern embeddable AI agent chat widget with voice support and payment integration

55 lines (50 loc) 1.4 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import React from 'react'; interface User { id?: string; name?: string; email?: string; } interface AgentWidgetProps { apiKey: string; agentId: string; baseUrl?: string; user?: User; theme?: "light" | "dark" | "auto"; position?: "bottom-right" | "bottom-left" | "top-right" | "top-left"; primaryColor?: string; allowFileUpload?: boolean; placeholder?: string; title?: string; subtitle?: string; className?: string; disableAutoConfig?: boolean; onUserUpdate?: (user: User) => void; } interface Message { id: string; content: string; role: "user" | "assistant"; timestamp: Date; isStreaming?: boolean; showEndButton?: boolean; metadata?: { showProducts?: boolean; showServices?: boolean; showBookingForm?: boolean; showCart?: boolean; showPaymentOptions?: boolean; showInvoice?: boolean; requestFeedback?: boolean; showEndButton?: boolean; }; } declare global { interface Window { SpeechRecognition: any; webkitSpeechRecognition: any; } } declare function AgentWidget(props: AgentWidgetProps): react_jsx_runtime.JSX.Element; declare const ChatbotEmbed: React.FC; export { AgentWidget, type AgentWidgetProps, ChatbotEmbed, type Message, type User };