bkit-chatbot-client-test
Version:
A starter vanilla-ts (extended) template that began with Vite 3.x, prepared for writing node utility libraries in typescript. This starter is meant to provide rapid node package development and publishing onto npm.
38 lines (37 loc) • 786 B
TypeScript
export interface Conversation {
id: string;
userId: string;
chatbotId: string;
}
export interface ChatMessage {
id: string;
text: string;
senderId: string;
timestamp: number;
}
export interface ChatMessages {
messages: ChatMessage[];
}
export interface RelatedProduct {
url: string;
name: string;
imageUrl?: string;
}
export interface MessageWithRelatedProducts extends ChatMessage {
relatedProducts: RelatedProduct[];
}
export interface ChatMessagesProps {
initialMessages: MessageWithRelatedProducts[];
apiKey: string;
conversationId: string;
user: {
id: string;
name: string;
imageUrl?: string;
};
chatbot: {
id: string;
name: string;
imageUrl?: string;
};
}