import { Conversation, UserClients } from '@wireapp/api-client/src/conversation'; import { CONVERSATION_TYPING } from '@wireapp/api-client/src/conversation/data'; import { ConversationEvent, TeamEvent, UserEvent } from '@wireapp/api-client/src/event'; import { QualifiedId, User } from '@wireapp/api-client/src/user/'; import { Account } from '@wireapp/core'; import { PayloadBundle, ReactionType } from '@wireapp/core/src/main/conversation/'; import { CallingContent, FileContent, FileMetaDataContent, ImageContent, LinkPreviewContent, LocationContent, MentionContent } from '@wireapp/core/src/main/conversation/content/'; import { QuotableMessage } from '@wireapp/core/src/main/conversation/message/OtrMessage'; export declare abstract class MessageHandler { account: Account | undefined; abstract handleEvent(payload: PayloadBundle | ConversationEvent | UserEvent | TeamEvent): void; addUser(conversationId: QualifiedId, userId: string): Promise; clearConversation(conversationId: string): Promise; getConversation(conversationId: string): Promise; getConversations(conversationIds?: string[]): Promise; getUser(userId: string): Promise; getUsers(userIds: string[]): Promise; removeUser(conversationId: QualifiedId, userId: QualifiedId): Promise; setAdminRole(conversationId: string, userId: string): Promise; setMemberRole(conversationId: string, userId: string): Promise; sendButtonActionConfirmation(conversationId: string, userId: string, referenceMessageId: string, buttonId: string): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendCall(conversationId: string, content: CallingContent, userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendPoll(conversationId: string, text: string, buttons: string[], userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendConfirmation(conversationId: string, firstMessageId: string, userIds?: string[] | UserClients): Promise; sendConnectionRequest(userId: string): Promise; sendConnectionResponse(userId: string, accept: boolean): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendEditedText(conversationId: string, originalMessageId: string, newMessageText: string, newMentions?: MentionContent[], newLinkPreview?: LinkPreviewContent, userIds?: string[] | UserClients): Promise; sendFileByPath(conversationId: string, filePath: string, userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendFile(conversationId: string, file: FileContent, metadata: FileMetaDataContent, userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendImage(conversationId: string, image: ImageContent, userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendLocation(conversationId: string, location: LocationContent, userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendPing(conversationId: string, userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendReaction(conversationId: string, originalMessageId: string, type: ReactionType, userIds?: string[] | UserClients): Promise; sendQuote(conversationId: string, quotedMessage: QuotableMessage, text: string, userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendReply(conversationId: string, quotedMessage: QuotableMessage, text: string, userIds?: string[] | UserClients): Promise; /** * @param userIds Only send message to specified user IDs or to certain clients of specified user IDs */ sendText(conversationId: string, text: string, mentions?: MentionContent[], linkPreview?: LinkPreviewContent, userIds?: string[] | UserClients): Promise; sendTyping(conversationId: string, status: CONVERSATION_TYPING): Promise; }