@chouriodev/custom-agent-sales-chatbot
Version:
VentaBot24 - Asistente de ventas inteligente 24/7 para e-commerce. Reduce mensajes de WhatsApp y aumenta conversiones con IA especializada para PyMEs venezolanas.
108 lines (94 loc) • 2.75 kB
TypeScript
import { default as default_2 } from 'react';
declare interface ApiKeyValidation {
isValid: boolean;
isActive?: boolean;
keyId?: string;
keyName?: string;
user?: {
id: string;
email: string;
fullName: string;
};
lastUsed?: string;
usageCount?: number;
chatbotConfig?: ServerChatbotConfig;
error: string | null;
isLoading?: boolean;
}
export declare interface ChatbotConfig {
title?: string;
welcomeMessage?: string;
placeholder?: string;
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
theme?: ChatbotTheme;
apiKey?: string;
onMessage?: (message: string, apiKey?: string) => Promise<string>;
enableSound?: boolean;
className?: string;
maxMessages?: number;
showTypingIndicator?: boolean;
}
export declare interface ChatbotProps {
apiKey: string;
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
className?: string;
}
export declare interface ChatbotTheme {
primary?: string;
secondary?: string;
accent?: string;
background?: string;
surface?: string;
text?: string;
textSecondary?: string;
border?: string;
font?: string;
}
export declare interface ChatMessage {
id: string;
text: string;
sender: "user" | "bot";
timestamp: Date;
}
export declare interface FloatingPosition {
bottom?: string;
right?: string;
top?: string;
left?: string;
}
export declare type MessageHandler = (message: string, apiKey?: string) => Promise<string>;
declare const ReactChatbot: default_2.FC<ChatbotProps>;
export { ReactChatbot }
export default ReactChatbot;
export declare interface ServerChatbotConfig {
title?: string;
welcomeText?: string;
placeholder?: string;
agentUrl?: string;
theme?: ChatbotTheme;
systemPrompt?: string;
}
export declare const useChatbot: ({ apiKey, }?: UseChatbotOptions) => UseChatbotReturn;
declare interface UseChatbotOptions {
apiKey?: string;
}
declare interface UseChatbotReturn {
messages: ChatMessage[];
isTyping: boolean;
isConnected: boolean;
error: string | null;
sendMessage: (message: string) => Promise<void>;
clearMessages: () => void;
clearError: () => void;
validateApiKey: () => Promise<void>;
updateWelcomeMessage: (newWelcomeMessage: string) => void;
clearSession: () => void;
getSessionInfo: () => {
sessionId: string;
deviceFingerprint: string;
created: string;
};
getEffectiveWelcomeMessage: () => string;
apiKeyValidation: ApiKeyValidation;
}
export { }