import { Subject, Subscription } from 'rxjs'; import Bubble = Rainbow.Bubble; export declare class RainbowService { _sdk: Rainbow.SDK; _options: RainbowOptions; _events: { [key: string]: Subject; }; _me: Rainbow.Contact; _adminBubble: Rainbow.Bubble; portalIsReachable: boolean; noEventDebugMsg: string[]; sdk(): Rainbow.SDK; constructor(options: RainbowOptions); get adminBubbleJid(): any; setupEvents(): void; setupAdminBubble(BOTadminbubble: any, BOTadminjid: any): Promise; get me(): Rainbow.Contact; get version(): any; unsubscribeAllEvents: Subject; subscribe(event: Rainbow.EVENT, callback: any): Subscription; start(): Promise; signin(): void; stop(): Promise; pollConnectionWithPortal(): any; im(jid: any, msg: any, bubble?: string, lang?: string): Promise; fim(jid: any, msg: any, fmsg: any, title: any, bubble?: string): Promise; bim(bjid: any, msg: any): Promise; fbim(bjid: any, msg: any, fmsg: any, title: any): Promise; createGuestAccount(expTime: any): Promise; createUserAccount(email: any, passwd: any, firstName: any, lastName: any): Promise; getContactByEmail(email: any): Promise; getContactByJid(jid: any): Promise; addToContacts(ct: any): Promise; createGroup(name: any, comment: any): Promise; addContactToGroup(contact: any, group: any): Promise; getGroup(name: any): Promise; createPublicChannel(name: any, description: any): Promise; createPrivateChannel(name: any, description: any): Promise; addOneMemberToChannel(user: any, channel: any): Promise; addMembersToChannel(users: any, channel: any): Promise; getChannel(name: any): Promise; deleteChannel(channel: any): Promise; deleteAllChannels(): Promise; getAllChannels(): Rainbow.Channel[]; getChannelUsersByName(channelName: any): Promise; getChannelUsers(channel: any): Promise; publishMsgToChannel(channel: any, message: any, title?: string, url?: string): Promise; inviteToRainbow(email: any, txt: any): Promise; broadcast(jidusers: any, msg: any): Promise; createAdminBubble(name: any, desc: any): Promise; addContactToAdminBubble(jid: any): Promise; groupbroadcast(jidusers: any, msg: any): Promise; groupbroadcast2(jidusers: any, msg: any): Promise; getFile(fileInfo: any): Promise; retrieveFile(fileInfo: any): Promise; createCompany(companyName: any): Promise; getCompany(companyName: any, userId: any): Promise; getAllGuestUsers(): Promise; updateCompany(companyId: any, data: any): Promise; addRoomTVtoBubble(bubble: Bubble, roomTVId: any): Promise; restGet(url: any): Promise; restPut(url: any, data: any): Promise; restPost(url: any, data: any): Promise; } export declare class RainbowOptions { constructor(login: string, passwd: string, appID: string, appSecret: string, hostType?: Rainbow.HOSTTYPE); rainbow: { host: string; }; credentials: { login: string; password: string; }; application: { 'appID': string; 'appSecret': string; }; logs: { enableConsoleLogs: boolean; enableFileLogs: boolean; file: { path: string; level: string; }; }; im: { sendReadReceipt: boolean; }; } export declare class RBmsg { txt: string; altContent: any; bubbleJid: string; isBubbleMsg: boolean; isAdminMsg: boolean; fromContact: Rainbow.Contact; fromJid: string; fromId: string; conversation: Rainbow.Conversation; attachment: null; lang: string; } export declare namespace Rainbow { export interface SDK { im: any; channels: Channels; contacts: any; conversations: any; presence: any; bubbles: any; groups: any; events: any; admin: any; settings: any; state: any; version: any; connectedUser: any; telephony: any; rest: any; fileServer: any; start(): any; stop(): any; } export interface Bubble { id: any; name: any; topic: any; jid: any; creator: any; history: any; users: any; creationDate: any; visibility: any; customData: any; } interface Channels { createChannel(name: any, channelTopic?: any): Promise; createPublicChannel(name: any, channelTopic?: any, category?: any): Promise; createClosedChannel(name: any, description?: any): Promise; createClosedChannel(name: any, description?: any, category?: any): Promise; deleteChannel(channel: any): Promise; findChannelsByName(name: any): Promise; findChannelsByTopic(topic: any): Promise; getChannelById(id: any, force?: any): Promise; fetchChannel(id: any, force?: any): Promise; getAllChannels(): Channel[]; getAllOwnedChannel(): Channel[]; getAllOwnedChannels(): Channel[]; getAllSubscribedChannel(): Channel[]; getAllSubscribedChannels(): Channel[]; getAllPendingChannels(): Channel[]; publishMessageToChannel(channel: any, message: any, title?: any, url?: any, imagesIds?: any, type?: any): Promise; createItem(channel: any, message: any, title?: any, url?: any, imagesIds?: any, type?: any): Promise; subscribeToChannel(channel: any): Promise; subscribeToChannelById(id: any): Object; unsubscribeFromChannel(channel: any): Promise; updateChannelTopic(channel: any, description: any): Promise; updateChannelDescription(channel: any, description: any): Promise; updateChannelName(channel: any, channelName: any): Channel; updateChannel(id: any, channelTopic?: any, visibility?: any, max_items?: any, max_payload_size?: any, channelName?: any, category?: any): Promise; updateChannelAvatar(channel: any, urlAvatar: any): Channel; deleteChannelAvatar(channel: any): Channel; fetchChannelUsers(channel: any, options?: any): Promise; fetchChannelUsers(channel: any, options?: any): Promise; removeAllUsersFromChannel(channel: any): Promise; deleteAllUsersFromChannel(channel: any): Promise; updateChannelUsers(channelId: any, users: any): Promise; addOwnersToChannel(channel: any, owners: any): Promise; addPublishersToChannel(channel: any, users: any): Promise; addMembersToChannel(channel: any, users: any): Promise; removeUsersFromChannel1(channel: any, users: any): Promise; deleteUsersFromChannel(channel: any, users: any): Promise; getMessagesFromChannel(channel: any): Promise; fetchChannelItems(channel: any): Promise; deleteMessageFromChannel(channelId: any, messageId: any): Promise; deleteItemFromChannel(channelId: any, itemId: any): Promise; } export interface Channel { name: any; id: any; visibility: any; topic: any; creatorId: any; companyId: any; creationDate: any; type: any; users_count: any; subscribers_count: any; category: any; mode: any; } export interface Contact { id: any; name: any; companyName: any; loginEmail: any; nickName: any; title: any; jobTitle: any; country: any; timezone: any; organisationId: any; siteId: any; companyId: any; jid_im: any; jid: any; jid_tel: any; jidtel: any; avatar: any; lastAvatarUpdateDate: any; lastUpdateDate: any; adminType: any; roles: any; phoneNumbers: any; phonePro: any; phoneProCan: any; phonePbx: any; phoneInternalNumber: any; pbxId: any; mobilePro: any; mobileProCan: any; phonePerso: any; phonePersoCan: any; mobilePerso: any; mobilePersoCan: any; voicemailNumber: any; emails: any; emailPro: any; emailPerso: any; lastName: any; firstName: any; isTerminated: any; language: any; presence: any; status: any; resources: any; nameUpdatePrio: any; initials: any; nickname: any; roster: any; displayName: any; } export interface Conversation { id: any; dbId: any; type: Conversation.Type; contact: any; bubble: any; capabilities: any; avatar: any; filterName: any; missedCounter: any; missedCalls: any; messages: any; status: Conversation.Status; historyComplete: any; lastModification: any; creationDate: any; lastMessageText: any; lastMessageSender: any; videoCall: any; audioCall: any; pstnConferenceSession: any; webConferenceSession: any; } export namespace Conversation { enum Type { ONE_TO_ONE = 0, ROOM = 1, BOT = 2 } enum Status { ACTIVE = 0, INACTIVE = 1, COMPOSING = 2, PAUSED = 3 } } export interface Message { id: any; fromJid: any; side: Message.Side; resource: any; date: any; toJid: any; type: Message.Type; content: any; receiptStatus: Message.ReceiptStatus; lang: any; fileId: any; cc: any; cctype: any; isEvent: any; event: any; alternativeContent: any; isMarkdown: any; subject: any; oob: any; fromBubbleJid: any; fromBubbleUserJid: any; getMessagesFromConversation(conversation: any, intNbMessage: any): Promise; sendMessageToConversation(conversation: any, message: any, lang?: any, content?: any, subject?: any): Promise; sendMessageToContact(message: any, contact: any, lang?: any, content?: any, subject?: any): Promise; sendMessageToJid(message: any, jid: any, lang?: any, content?: any, subject?: any): Promise; sendMessageToBubble(message: any, bubble: any, lang?: any, content?: any, subject?: any): Promise; sendMessageToBubbleJid(message: any, jid: any, lang?: any, content?: any, subject?: any): Promise; markMessageAsRead(messageReceived: any): Promise; } export interface MessageContent { type: Message.ContentType; message: string; } export namespace Message { enum Type { CHAT = 0, FILE = 1, FS = 2, WEBRTC = 3, RECORDING = 4 } enum ReceiptStatus { NONE = 0, ERROR = 1, IN_PROGRESS = 2, SENT = 3, UNREAD = 4, READ = 5 } enum Side { LEFT = "L", RIGHT = "R", ADMIN = "ADMIN" } type ContentType = 'text' | 'markdown'; } export enum EVENT { onmessageserverreceiptreceived = "rainbow_onmessageserverreceiptreceived", onmessagereceiptreceived = "rainbow_onmessagereceiptreceived", onmessagereceiptreadreceived = "rainbow_onmessagereceiptreadreceived", onmessagereceived = "rainbow_onmessagereceived", oncontactpresencechanged = "rainbow_oncontactpresencechanged", onconversationremoved = "rainbow_onconversationremoved", onconversationchanged = "rainbow_onconversationchanged", onchatstate = "rainbow_onchatstate", oncontactinformationchanged = "rainbow_oncontactinformationchanged", onbubbleaffiliationchanged = "rainbow_onbubbleaffiliationchanged", onbubbleownaffiliationchanged = "rainbow_onbubbleownaffiliationchanged", onbubbleinvitationreceived = "rainbow_onbubbleinvitationreceived", onbubblecustomdatachanged = "rainbow_onbubblecustomdatachanged", bubbletopicchanged = "rainbow_bubbletopicchanged", bubblenamechanged = "rainbow_bubblenamechanged", ongroupcreated = "rainbow_ongroupcreated", ongroupdeleted = "rainbow_ongroupdeleted", ongroupupdated = "rainbow_ongroupupdated", onuseraddedingroup = "rainbow_onuseraddedingroup", onuserremovedfromgroup = "rainbow_onuserremovedfromgroup", onchannelmessagereceived = "rainbow_onchannelmessagereceived", onchannelmessagedeletedreceived = "rainbow_onchannelmessagedeletedreceived", onprofilefeatureupdated = "rainbow_onprofilefeatureupdated", oncallupdated = "rainbow_oncallupdated", onvoicemessageupdated = "rainbow_onvoicemessageupdated", oncallforwarded = "rainbow_oncallforwarded", onfilecreated = "rainbow_onfilecreated", onfileupdated = "rainbow_onfileupdated", onfiledeleted = "rainbow_onfiledeleted", onthumbnailcreated = "rainbow_onthumbnailcreated", onchannelcreated = "rainbow_onchannelcreated", onchanneldeleted = "rainbow_onchanneldeleted", onstarted = "rainbow_onstarted", onstopped = "rainbow_onstopped", onconnected = "rainbow_onconnected", onconnectionerror = "rainbow_onconnectionerror", ondisconnected = "rainbow_ondisconnected", onreconnecting = "rainbow_onreconnecting", onfailed = "rainbow_onfailed", onready = "rainbow_onready", onerror = "rainbow_onerror" } export enum HOSTTYPE { OFFICIAL = "official", SANDBOX = "sandbox" } export {}; }