UNPKG

@wireapp/api-client

Version:

Wire API Client to send and receive data.

37 lines (36 loc) 2 kB
import { ClientMismatch, Conversation, ConversationIds, Conversations, ConversationUpdate, Invite, Member, MemberUpdate, NewConversation, NewOTRMessage, Typing } from '../conversation/'; import { ConversationEvent } from './event/'; import { HttpClient } from '../http/'; declare class ConversationAPI { private client; constructor(client: HttpClient); static readonly URL: { BOTS: string; CLIENTS: string; CONVERSATIONS: string; MEMBERS: string; MESSAGES: string; OTR: string; SELF: string; }; deleteBot(conversationId: string, botId: string): Promise<{}>; deleteMember(conversationId: string, userId: string): Promise<ConversationEvent>; getConversation(conversationId: string): Promise<Conversation>; getConversationIds(limit: number, conversationId?: string): Promise<ConversationIds>; getConversations(limit?: number, conversationId?: string, conversationIds?: string[]): Promise<Conversations>; getMembershipProperties(conversationId: string): Promise<Member>; post1to1(conversationData: NewConversation): Promise<{}>; postAddMembers(conversationId: string, invitationData: Invite): Promise<ConversationEvent>; postBot(conversationId: string, providerId: string, serviceId: string): Promise<{}>; postConversation(conversationData: NewConversation): Promise<Conversation>; postJoin(conversationId: string): Promise<ConversationEvent>; postOTRMessage(clientId: string, conversationId: string, messageData?: NewOTRMessage, params?: { ignore_missing?: boolean; report_missing?: string; }): Promise<ClientMismatch>; postSelf(): Promise<Conversation>; postTyping(conversationId: string, typingData: Typing): Promise<{}>; putConversation(conversationId: string, conversationData: ConversationUpdate): Promise<ConversationEvent>; putMembershipProperties(conversationId: string, memberData: MemberUpdate): Promise<{}>; } export { ConversationAPI };