UNPKG

chat-video-sdk

Version:

SDK for 1:1 chat and video calling

69 lines (64 loc) 1.85 kB
import React$1 from 'react'; interface Message { id: string; content: string; senderId: string; receiverId: string; timestamp: number; status?: 'sent' | 'delivered' | 'read'; type?: 'text' | 'image' | 'file'; fileName?: string; fileUrl?: string; } interface ChatConfig { userId: string; serverUrl: string; onMessageReceived?: (message: Message) => void; } interface ChatProps { userId: string; receiverId: string; serverUrl: string; userName?: string; receiverName?: string; userAvatar?: string; receiverAvatar?: string; onSendMessage?: (message: Message) => void; onMessageReceived?: (message: Message) => void; onTyping?: (isTyping: boolean) => void; onError?: (error: Error) => void; customStyles?: ChatCustomStyles; } interface ChatCustomStyles { container?: React.CSSProperties; header?: React.CSSProperties; messageList?: React.CSSProperties; messageBubble?: { sent?: React.CSSProperties; received?: React.CSSProperties; }; inputArea?: React.CSSProperties; button?: React.CSSProperties; } interface VideoCallConfig { userId: string; serverUrl: string; onCallReceived?: (callerId: string) => void; onCallEnded?: () => void; } interface VideoCallProps { userId: string; receiverId: string; serverUrl: string; userName?: string; receiverName?: string; userAvatar?: string; receiverAvatar?: string; onCallReceived?: (callerId: string) => void; onCallEnded?: () => void; onCallStarted?: () => void; onError?: (error: Error) => void; } declare const Chat: React$1.FC<ChatProps>; declare const VideoCall: React$1.FC<VideoCallProps>; export { Chat, ChatConfig, ChatCustomStyles, ChatProps, Message, VideoCall, VideoCallConfig, VideoCallProps };