UNPKG

@robylon/robylon-web-react-sdk

Version:
58 lines (53 loc) 1.38 kB
import React from 'react'; interface ChatbotConfig { chatbotId: string; userId: string; token?: string; userProfile?: { email: string; name: string; mobile?: string; platform?: string; OS?: string; browser?: string; sdkVersion?: string; }; styles?: { buttonPosition?: "bottom-right" | "bottom-left"; primaryColor?: string; buttonSize?: "small" | "medium" | "large"; }; } interface ChatbotState { isLoading: boolean; isInitialized: boolean; error: string | null; } interface RobylonSdkConfig { chatbot_id: string; user_id: string; token?: string; user_profile?: { email?: string; name?: string; mobile?: string; platform?: string; OS?: string; browser?: string; sdk_version?: string; }; } declare global { interface Window { initializeRobylonSdk: (config: RobylonSdkConfig) => void; } } interface RobylonChatbotProps extends ChatbotConfig { loadingComponent?: React.ReactNode; errorComponent?: React.ComponentType<{ error: string; }>; } declare const RobylonChatbot: React.FC<RobylonChatbotProps>; declare const useChatbot: (config: ChatbotConfig) => ChatbotState; export { type ChatbotConfig, type ChatbotState, RobylonChatbot, useChatbot };