UNPKG

@agentdao/core

Version:

Core functionality, skills, and ready-made UI components for AgentDAO - Web3 subscriptions, content generation, social media, help support, live chat, RSS fetching, web search, and agent pricing integration

25 lines (24 loc) 1.22 kB
import { LiveChatConfig, ChatContext, ChatMessage, ChatSummary, FileMessage, ModerationResult, ChatAnalytics, User } from './types'; export declare class LiveChatSkill { private config; private chats; private onlineUsers; constructor(config: LiveChatConfig); startChat(userId: string, context: ChatContext): Promise<string>; sendMessage(chatId: string, message: string, sender: string): Promise<ChatMessage>; endChat(chatId: string): Promise<ChatSummary>; joinChat(chatId: string, userId: string): Promise<boolean>; leaveChat(chatId: string, userId: string): Promise<boolean>; getOnlineUsers(chatId: string): Promise<User[]>; uploadFile(chatId: string, file: any, userId: string): Promise<FileMessage>; downloadFile(fileId: string): Promise<any>; moderateMessage(message: string): Promise<ModerationResult>; blockUser(chatId: string, userId: string, reason: string): Promise<boolean>; getChatAnalytics(chatId: string): Promise<ChatAnalytics>; getMessageHistory(chatId: string, limit?: number): Promise<ChatMessage[]>; private uploadToStorage; private checkProfanity; private checkSpam; private generateChatId; private generateMessageId; }