11import events from "events" ;
22import { acceptContactRequest } from "./api/accept-contact-request" ;
3+ import { addMemberToConversation } from "./api/add-member" ;
4+ import { createConversation } from "./api/create-conversation" ;
35import { declineContactRequest } from "./api/decline-contact-request" ;
46import { getContact } from "./api/get-contact" ;
57import { getConversation } from "./api/get-conversation" ;
68import { getConversations } from "./api/get-conversations" ;
9+ import { getJoinUrl } from "./api/get-join-url" ;
710import { sendImage } from "./api/send-image" ;
811import { sendMessage } from "./api/send-message" ;
12+ import { setConversationTopic } from "./api/set-conversation-topic" ;
913import { setStatus } from "./api/set-status" ;
1014import { ContactsInterface , ContactsService } from "./contacts/contacts" ;
1115import * as api from "./interfaces/api/api" ;
@@ -14,6 +18,7 @@ import { Context as ApiContext } from "./interfaces/api/context";
1418import { Conversation } from "./interfaces/api/conversation" ;
1519import * as apiEvents from "./interfaces/api/events" ;
1620import { HttpIo } from "./interfaces/http-io" ;
21+ import { AllUsers } from "./interfaces/native-api/conversation" ;
1722import { MessagesPoller } from "./polling/messages-poller" ;
1823import { Contact } from "./types/contact" ;
1924import { Invite } from "./types/invite" ;
@@ -74,6 +79,22 @@ export class Api extends events.EventEmitter implements ApiEvents {
7479 return sendMessage ( this . io , this . context , message , conversationId ) ;
7580 }
7681
82+ async setConversationTopic ( conversationId : string , topic : string ) : Promise < void > {
83+ return setConversationTopic ( this . io , this . context , conversationId , topic ) ;
84+ }
85+
86+ async getJoinUrl ( conversationId : string ) : Promise < string > {
87+ return getJoinUrl ( this . io , this . context , conversationId ) ;
88+ }
89+
90+ async addMemberToConversation ( conversationId : string , memberId : string ) : Promise < void > {
91+ return addMemberToConversation ( this . io , this . context , conversationId , memberId ) ;
92+ }
93+
94+ async createConversation ( allUsers : AllUsers ) : Promise < any > {
95+ return createConversation ( this . io , this . context , allUsers ) ;
96+ }
97+
7798 async sendImage ( message : api . NewImage , conversationId : string ) : Promise < api . SendMessageResult > {
7899 return sendImage ( this . io , this . context , message , conversationId ) ;
79100 }
0 commit comments