ultra-chat-bot
Version:
made with ❤️ by Mohamed Majri
83 lines • 2.06 kB
TypeScript
export interface Message {
id: string;
text: string;
sender: "user" | "bot";
timestamp: Date;
avatar?: string;
seenByAdmin?: boolean;
seenByGuest?: boolean;
seenAt?: Date;
originalSender?: string;
senderName?: string;
}
export interface ChatbotConfig {
companyName?: string;
botName?: string;
homeScreenMessage?: string;
presentationMessage?: string;
botAvatar?: string;
userAvatar?: string;
theme?: "light" | "dark";
primaryColor?: string;
secondaryColor?: string;
placeholder?: string;
welcomeMessage?: string;
socketUrl?: string;
autoConnect?: boolean;
showTypingIndicator?: boolean;
height?: string | number;
width?: string | number;
position?: "bottom-left" | "bottom-right" | "top-left" | "top-right";
firstname?: string;
lastname?: string;
email?: string;
sessionTimeoutHours?: number;
audioUrl?: string;
enableNotificationSound?: boolean;
}
export interface ChatbotProps {
UID?: string;
config?: ChatbotConfig;
onMessageSent?: (message: string) => void;
onMessageReceived?: (message: Message) => void;
onConnect?: () => void;
onDisconnect?: () => void;
className?: string;
}
export interface SessionInfo {
sessionId?: string;
chatId?: string;
reconnected?: boolean;
isReconnection?: boolean;
chatHistory?: any[];
}
export interface UserInfo {
firstname?: string;
lastname?: string;
email?: string;
}
export interface PathUpdateOptions {
companyName?: string;
visitedPaths?: string[];
currentPath?: string;
}
export interface SocketEventData {
text?: string;
sender?: string;
timestamp?: string;
_id?: string;
seenByAdmin?: boolean;
seenByGuest?: boolean;
seenAt?: string;
senderName?: string;
}
export interface AdminTypingData {
adminName: string;
chatId: string;
}
export interface MessagesSeenData {
adminName: string;
seenCount: number;
messageIds: string[];
}
//# sourceMappingURL=index.d.ts.map