/** * @module Bubbles */ import { Bubble, BubbleCleanupData, BubbleInvitation, BubbleRB, BubbleSettings, BubbleUser, BubbleUserRole, BubbleVisibility, LobbyUser } from '../../models/bubble.model'; import { Subject, Subscription } from 'rxjs'; import { RBEvent } from '../../models/event.model'; import { Contact } from '../../models/contact.model'; import { DialInPhoneNumber } from '../../models/dial-in-phone-numbers.model'; import { Service } from '../../services/service'; import { User } from '../../models'; import { CallRB } from '../../models/call.model'; /** @internal */ export declare const BUBBLE_SVC = "BubbleService"; /** * @eventProperty * This enum lists all the `RBEvent` events generated by the BubbleService. * * They can be listened to using the `bubbleService.subscribe()` API. */ export declare enum BubbleServiceEvents { /** * @eventProperty * This `RBEvent` is send when the bubble service is started and ready to be used (also fired after loss of network and reconnection) */ ON_SERVICE_STARTED = "ON_SERVICE_STARTED", /** * @eventProperty * This RBEvent is send when a new bubble is created * **Event Data** * - **bubble**: The new created bubble * - **invitedUsersErrors?**: Status indicating whether some/all of the invited users have not successfully been added when creating the new bubble. * This information is relevant only for bubbles/rooms created by a user. * - **invalidUsersIds?**: The Id(s) of the contacts that could not be invited to the bubble */ ON_BUBBLE_CREATED = "ON_BUBBLE_CREATED", /** * @eventProperty * This RBEvent is send when a bubble has been deleted by the owner. * **Event Data** * - **id**: The id of the bubble that has been deleted */ ON_BUBBLE_DELETED = "ON_BUBBLE_DELETED", /** * @eventProperty * This `RBEvent` is sent when a there's an update on the role of the connected user role (owner, organizer, user) * **Event Data** * - **bubble**: The related bubble */ ON_CONNECTED_USER_ROLE_UPDATED = "ON_CONNECTED_USER_ROLE_UPDATED", /** * @eventProperty * This RBEvent is sent when the connected user has received an invitation to join a bubble. * **Event Data** * - **bubble**: The bubble concerned by this event */ ON_USER_INVITATION_RECEIVED = "ON_USER_INVITATION_RECEIVED", /** * @eventProperty * This `RBEvent` is sent when a user has accepted the invitation in the bubble * **Event Data** * - **bubble**: The bubble concerned by this event * - **bubbleUser**: The bubble user who has accepted the invitation */ ON_USER_INVITATION_ACCEPTED = "ON_USER_INVITATION_ACCEPTED", /** * @eventProperty * This `RBEvent` is sent when a user has declined the invitation to join the bubble * **Event Data** * - **bubble**: The bubble concerned by this event * - **bubbleUser**: The bubble user who has declined the invitation */ ON_USER_INVITATION_DECLINED = "ON_USER_INVITATION_DECLINED", /** * @eventProperty * This `RBEvent` is sent when a user has left the bubble of his own * **Event Data** * - **bubble**: The bubble concerned by this event * - **bubbleUser**: The bubble user who has left the bubble */ ON_USER_BUBBLE_LEFT = "ON_USER_BUBBLE_LEFT", /** * @eventProperty * This `RBEvent` is sent in the following cases: * - if a user has been removed from the bubble by the owner or one of the organizers. * - if the bubble in which the user was a member has been destroyed. * **Event Data** * - **bubble**: The bubble concerned by this event * - **bubbleUser**: The bubble user who has been removed from the bubble */ ON_USER_BUBBLE_REMOVED = "ON_USER_BUBBLE_REMOVED", /** * @internal * @eventProperty * This RBEvent is send when there's a request to join a bubble has been receveid * **Event Data** * - **bubble**: The bubble concerned by this event * - **lobbyUser**: The newly added lobby user */ ON_REQUEST_TO_JOIN_BUBBLE_RECEIVED = "ON_REQUEST_TO_JOIN_BUBBLE_RECEIVED", /** * @internal * @eventProperty * This RBEvent is send when there's a change in any bubble lobby list users. There's event coming inside the bubble (in case of bubble.subscribe) but this event * helps to manage a global counter and vision on all bubbles lobby list / waiting list */ ON_BUBBLES_LOBBY_LIST_CHANGE = "ON_BUBBLES_LOBBY_LIST_CHANGE", /** * @internal * @eventProperty * This RBEvent is send when there's a change in the current user's request to join bubbles. This event can also be received when the user ACK Read or removes the request. * This event helps to manage a global counter and vision on all requests to join bubbles */ ON_MY_USER_REQUESTS_TO_JOIN_BUBBLE_CHANGE = "ON_MY_USER_REQUESTS_TO_JOIN_BUBBLE_CHANGE" } /** * @internal * Conversation service internal events send to other sevices via sendInnerEvent() * Should not be used by SDK user */ export declare enum BubbleServiceInnerEvents { /** * This RB event is send when a "admin" message is added in the bubble (for hunting group voicemails etc) * @param roomJid - the room JID * @param userJid - the user JID * @param eventName - the name of the event * @param msgId - the message ID * @param extraParameters - object with extra params */ BUBBLE_ADMIN_MESSAGE_EVENT = "BUBBLE_ADMIN_MESSAGE_EVENT", /** * This event is send when the bubble history is now fully ready (on accept of new bubble for instance) * @param bubble - the related bubble */ BUBBLE_HISTORY_READY = "BUBBLE_HISTORY_READY" } /** * The `BubbleCreationData` interface describes the options that can be sent to the createBubble() method * @example * ```ts * const data = { * "description": "my bubble description", * "history": true, * "autoAcceptInvitation": true * } * createBubble("my bubble name", data); * ``` */ export interface BubbleCreationData { /** * The bubble description */ description?: string; /** * Specifies whether the previous messages history are shown or not to a new bubble user. * By default, this parameter is 'true'. */ history?: boolean; /** * Avatar image for the bubble */ bubbleAvatar?: any; /** * When set to true, allows to automatically add participants in the bubble (default behavior is that participants need to accept the bubble invitation first before being a member of this bubble) * `Default : FALSE` */ autoAcceptInvitation?: boolean; /** * In case of conference in this bubble, all participants will be muted upon join * `Default : FALSE` */ muteUponEntry?: boolean; /** * In the event of a conference in this bubble, specify whether a local tone should be played each time a participant joins the conference. * By default, this parameter is 'false'. */ playEntryTone?: boolean; /** * List of contacts that we want to invite to the bubble */ contacts?: Contact[]; /** * List of emails that we want to invite to the bubble (will receive an invitation email) */ guestEmails?: string[]; /** * Add optional body parameter role ('user', 'organizer'). By default, all users get the simple 'user' role. * Using 'role' parameter all invited users may have the same role in this bulk. */ role?: BubbleUserRole; /** * The visibility of the bubble * A public bubble can be found via a search operation (using 'searchBubbles()' method) or get by its identifier * even if a user is not a member of this bubble. Information on such bubbles are provided for guidance only. * A private bubble can be joined only by invitation or via a public link, if the bubble has been shared (bubble configuration parameter). * By default, the visibility is 'private'. */ visibility?: BubbleVisibility; } /** * List of different ways to search for a bubble */ export declare enum BubbleSearchScope { /** * The bubble search must be performed on the name of the bubble */ SEARCH_BY_BUBBLE_NAME = "SEARCH_BY_BUBBLE_NAME", /** * The bubble search must be performed on the name of the tag(s) set for the bubble */ SEARCH_BY_TAG_NAME = "SEARCH_BY_TAG_NAME", /** * The bubble search must be performed oin the bubble's participant(s) names. */ SEARCH_BY_PARTICIPANT_NAME = "SEARCH_BY_PARTICIPANT_NAME" } export declare enum BubbleSearchSortBy { /** * The list of bubbles found must be returned sorted by bubble name. */ SORT_BY_BUBBLE_NAME = "SORT_BY_BUBBLE_NAME", /** * The list of bubbles found must be returned sorted by date of last activity. */ SORT_BY_LAST_ACTIVITY = "SORT_BY_LAST_ACTIVITY" } export declare enum BubbleSearchFoundBy { /** * Specifies that a bubble was found via a pattern matching on its name */ FOUND_BY_BUBBLE_NAME = "FOUND_BY_BUBBLE_NAME", /** * Specifies that a bubble was found via a pattern matching on the name of some tag(s) set for the bubble */ FOUND_BY_TAG_NAME = "FOUND_BY_TAG_NAME", /** * Specifies that a bubble was found via a pattern matching on the bubble's participant(s) names. */ FOUND_BY_PARTICIPANT_NAME = "FOUND_BY_PARTICIPANT_NAME" } export interface BubbleSearchOptions { /** * Options to specify the scope of the search, i.e. the 'name' properties to be used as scope for the search * The name properties that can be specified are: * - The name of the bubble * - The name of tag(s) set for the bubble * - The name of bubble participants. * One or more name properties can be optionally specified to define the scope of the search. * If no scope is specified, the search is performed by default on the name of the bubble only. */ scope?: BubbleSearchScope[]; /** * Options for specifying how the list of bubbles returned as results should be sorted. */ sortBy?: BubbleSearchSortBy; } export interface BubbleSearchResult { /** * The bubble found matching the search criteria. */ bubble: Bubble; /** * Specifies how the bubble was found, i.e. on which name properties the pattern matched. */ foundBy: BubbleSearchFoundBy[]; } /** * The `BubbleService` interface defines the Rainbow SDK BubbleService API */ export interface BubbleService { /** * Indicates whether the Bubble Service has been started or not. * If this is not the case, no bubble can yet been retrieved. */ started: boolean; /** * Subscribe to the invitations updates; All events send to the callback are of type `RBEvent` * @param callback - The callback function that will be called when events are received * @param callback - The callback function that will be called when events are received * @param eventNames - (optional) A list of event names that the user wants to receive when subscribing (used as filter) */ subscribe(callback: (event: RBEvent) => any, eventNames?: BubbleServiceEvents | BubbleServiceEvents[]): Subscription; /** * Create a new bubble; This API also sends BubbleServiceEvents.ON_BUBBLE_CREATED event * Returns a Promise with the new created bubble. * @param bubbleName - The name of the bubble * @param createBubbleData - Bubble settings that can be specified when it is created. */ createBubble(bubbleName: string, createBubbleData?: BubbleCreationData): Promise; /** * Get a bubble from its identifier. * @param bubbleId - The bubble dbId or bubble JID */ getBubble(bubbleId: string): Promise; /** * Get all bubbles, restricted to one type if specified. * The 'type' parameter allows to filter the type of bubbles to be returned: * - 'IN_USE': * Returns the active bubbles of which the connected user is a member, whether as a user or as an organizer. * Note that a bubble is said to be ‘active’ if it has not been archived or deleted. * - 'MINE': * Returns the bubbles whose the connected user is the owner. * This includes bubbles that the user has created themselves as well as bubbles for which the user has benefited from the transfer of ownership. * - 'ARCHIVED': * Returns the bubbles archived by the user. * An archived bubble is a bubble that the connected user has left but has decided not to delete but to keep. * By creating an archive, the user will no longer be able to publish information, but will retain a history of the conversations of all participants. * - 'WITH_CONFERENCE': * Returns the bubbles with active conference inside * This list will contain all bubbles that current have an active conference, including the one that the user may currently participate * * If the 'type' parameter is not specified, this method returns all the bubbles "currently loaded". * This means the bubbles that are loaded by default when the service is started (those with an active conversation) and * those that are subsequently requested via the ‘type’ parameter. * * **Please note:** this method is asynchronous, as the time taken to retrieve bubbles may vary depending on whether or not they have already been requested. * @param type - The type of bubbles required. */ getBubbles(type?: 'IN_USE' | 'MINE' | 'ARCHIVED' | 'WITH_CONFERENCE'): Promise; /** * Get all invitations for which the connected user is invited to join a bubble. */ getBubbleInvitations(): BubbleInvitation[]; /** * This API allows to search Rainbow bubbles that match a search criteria applied on some name properties such as the name of the bubble * or the names of bubble participants for example. * One or more name properties can be optionally specified to define the scope of the search. * If no scope is specified, the search is performed by default on the name of the bubble only. * It is also possible to optionally specify how the list of bubbles returned as results should be sorted. * By default, the bubbles list will be sorted by bubble name. * @param searchPattern - The search criteria * @param options - Options to specify the scope of the search and how the results are to be returned. */ searchBubbles(searchPattern: string, options?: BubbleSearchOptions): Promise; /** * Method to find bubbles by tag * Takes into account tags separated by space * @param tagNames - tag names to find * @param exactMatch - whether we find exact matching tags */ searchBubblesByTag(tagNames: string, exactMatch?: boolean): Promise; /** * This API allows to evaluate the WEBRTC connectivity of the user with the conference in the bubble * The results of the test may help troubleshoot connectivity issues and evaluate the quality of the connection to Rainbow infrastructure. * @param testLength - length during wchice the timeid manually set. Drfault to 5. * */ startMediaEchoTest(testLength: number): Promise; } /** * @internal * Configuration information used for tweak bubble service start */ export declare class BubbleServiceConfig { ignoreOpenInviteData?: any; webinar?: boolean; ignoreRole?: boolean; } /** * @internal */ export declare class BubbleServiceRB extends Service implements BubbleService { openInviteIdByRoomIdSubject: Subject; starting: boolean; started: boolean; context: string; private bubbles; private rxSubject; private innerRxSubject; private preload; private portalURL?; private roomPortalURL?; private listeners; private xmppConnectionSubscription; private roomPresenceWaitingList; private userContact?; private bubblesByJids; private bubblesInProgress; private maxBubblesUsers; private maxBubblesStartupLoad; private openInviteIdByRoomId; private getBubbleByJidPromises; private createBubbleInProgress; private bubblePresenceRef?; private bubbleInfoMessageRef?; private bubbleMessageConfigRef?; private bubbleHistoryInfoRef?; private bubbleNotificationRef?; private bubbleErrorMessageRef?; private bubbleServiceConfig?; private loadAllAcceptedBubblesPromise; private lobbyUsersPerBubble; private connectedUserPendingRequests; private promiseQueue; private settingsService; private contactService; private profileService; private authService; private eventService; private logger; private xmppService; private errorHelperService; private i18n; private mainService; private fileStorageService?; private webConferenceService?; private bubbleTagService?; static getInstance(): BubbleServiceRB; static build(): BubbleServiceRB; private constructor(); start(bubbleServiceConfig?: BubbleServiceConfig): Promise; stop(): Promise; attachHandlers(): void; reconnect(attempt?: number): Promise; private onConnectionStateChange; private getInitServerRooms; private getInitServerRoomsByType; /** * Subscribe to updates from the service (All events are of RBEvent type {name: string, data: any}); * NB There might be some events that are not documented here, they're send on updates of different properties of the rooms. * @param handler - The call-back function that will be subscribed to the RxJS subject * @param eventNames - array of event to listen */ subscribe(handler: (event: RBEvent) => any, eventNames?: BubbleServiceEvents | BubbleServiceEvents[]): Subscription; /** * Bubble service events send to other services via sendEvent() * Can listen to it via bubbleService.subscribe() API * @param name - the name of the event * @param data - the data to be send (an object */ sendEvent(name: BubbleServiceEvents, data?: any): void; subscribeToInnerEvents(handler: (event: RBEvent) => any): Subscription; sendInnerEvent(name: BubbleServiceInnerEvents, data?: any): void; /** * Load all room from server in a given status * @param status - (values: 'invited', 'accepted','unsubscribed') */ getAllServerBubbles(status?: string): Promise; /** * */ private getLobbyListsFromServer; private getMyLobbyListsAsUser; private getMyLobbyListsAsModerator; private getMyAccessRequestListStatus; /** * API not used in UCAAS, but could be useful for CPAAS once we add lobbys for SDK * @param bubble - the bubble where we want to get the list of pending users */ getBubbleLobbyUsersList(bubble: BubbleRB): Promise; getUsersInLobbyForBubble(bubble: Bubble): LobbyUser[]; /** * Return an object, containing a key - value list, where key is the bubble ID */ getAllBubblesWithUsersInLobby(): Promise; /** * This API allows the user to "mark as read" an access request and/or remove it from the list * @param requestId - the request ID * @param ackRead - if the request should be marked as READ, (allows the user to manage a notification center related to updates on his pending request) An access request with the status pending, accepted or rejected can be acknowledged. These acknowledgment can't be undo * @param removeFromList - remove the access request from the list. Only an access request with the status accepted or rejected can be removed */ updateUserRequestToJoinBubble(requestId: string, ackRead?: boolean, removeFromList?: boolean): Promise; denyUsersWaitingInBubbleLobby(bubble: Bubble, lobbyContacts?: LobbyUser[]): Promise; acceptUsersWaitingInBubbleLobby(bubble: Bubble, lobbyContacts?: LobbyUser[]): Promise; /** * Add current user to the waiting lobby for a given bubble * @param bubbleInfos - Bubbles infos that contain the current bubble DB ID, the status and the addition date */ private addConnectedUserToWaitingListForBubble; getMyRequestListToJoinBubbles(): Promise<{ bubble: BubbleInvitation; requestId: string; status: string; additionDate: string; bubbleName?: string; ackRead?: boolean; }[]>; /** * Add users to the lobby for a given bubble * @param bubbleDbId - bubble DB ID * @param contactsInfos - Contact infos that are needed to construct the lobby user * Return an array of the NEWLY added lobby users, and not the whole list ! */ private addUsersToLobbyForBubble; /** * Async method which get get a bubble. * The bubble is first search in service cache then server side. * @param bubbleRef - a bubble dbId or bubble JID */ getBubble(bubbleRef: string): Promise; /** * synchronous method used to get a existing bubble from the cache * @param id - should be the bubble id or dbId */ getBubbleFromCache(id: string): Bubble | undefined; /** * Return an array of all bubbles already in the cache */ getBubblesFromCache(): Bubble[]; /** * Get all bubbles, restricted to one type if specified. * The 'type' parameter allows to filter the type of bubbles to be returned: * - 'IN_USE': * Returns the active bubbles of which the connected user is a member, whether as a user or as an organizer. * Note that a bubble is said to be ‘active’ if it has not been archived or deleted. * - 'MINE': * Returns the bubbles whose the connected user is the owner. * This includes bubbles that the user has created themselves as well as bubbles for which the user has benefited from the transfer of ownership. * - 'ARCHIVED': * Returns the bubbles archived by the user. * An archived bubble is a bubble that the connected user has left but has requested the creation of an archive for this bubble. * By archive we mean that the bubble will always be accessible to the user, but in consultation mode only. * The user will still be able to view the bubble information (name, subject), members and the conversation history up to the moment he leave the bubble. * But he will no longer be able to communicate in the bubble (sending messages or starting a conference). * * If the 'type' parameter is not specified, this method returns all the bubbles "currently loaded". * This means the bubbles that are loaded by default when the service is started (those with an active conversation) and * those that are subsequently requested via the ‘type’ parameter. * * **Please note:** this method is asynchronous, as the time taken to retrieve bubbles may vary depending on whether or not they have already been requested. * @param type - The type of bubbles required. */ getBubbles(type?: 'IN_USE' | 'MINE' | 'ARCHIVED' | 'WITH_CONFERENCE'): Promise; /** * Return an array of all bubbles with an active conference at the moment */ getBubblesWithActiveConference(): Bubble[]; /** * Return an array of all bubbles with an active conference at the moment that we've not yet joined */ getBubblesWithActiveConferenceNotJoined(): Bubble[]; /** * return an array of all MY rooms */ getMyBubbles(): Bubble[]; searchRooms(criteria: string): Bubble[]; searchBubblesByTag(searchedTagName: string, exactMatch?: boolean): Promise; startMediaEchoTest(testLength?: number): Promise; /** * Get all invitations for which the connected user is invited to join a bubble. * This means finding all the bubbles where this user has an "invited" status */ getBubbleInvitations(): BubbleInvitation[]; /** * return an array of all room where user is currently invited to participants (in "invited" state) */ getWebinarInvitations(): Bubble[]; getRoomsByContainerId(containerId: string): Bubble[]; /*** * GET ALL ROOMS ORDER BY DATE OR NAME * DEFAULT ORDER IS BY NAME */ getOrderedRooms(order?: string): Bubble[]; /*** * GET MY ROOMS ORDER BY DATE OR NAME * DEFAULT ORDER IS BY NAME */ getMyOrderedRooms(order: string): Bubble[]; updateRoomFromServer(bubble: Bubble): Promise; private updateRoomData; getServerBubble(roomId: string): Promise; /** * Get room data from server then create and store the Room instance * @param bubbleJid - the jid of the room to get * @param sendPresence - (default : true) When set to false the initial presence is not sent * @param nbUsersToKeep - number of user to keep in room data */ private getServerBubbleByJid; getServerBubblesByIds(bubbleIds: string[], sendPresence?: boolean, webinars?: boolean): Promise; areAllServerBubblesReady(status: string): boolean; loadAllAcceptedBubblesAtStartUp(): void; loadAllAcceptedBubbles(): Promise; private getServerBubblesDataPage; private getMinimalBubbleUsers; private fetchBubbleUsersContacts; getBubbleUsers(bubble: BubbleRB, role?: 'ALL' | 'USER' | 'ORGANIZER'): Promise; getAllBubbleUsers(bubble: BubbleRB): Promise; private getBubbleParticipants; private getBubbleParticipantPage; private getAllBubblesParticipants; private createOrUpdateBubbleFromData; private refreshMemberAndOrganizerLists; /** * Update the bubble avatar * @param bubble - the bubble * @param avatarImg - the image to be set */ setBubbleAvatar(bubble: Bubble, avatarImg: any, width?: number, height?: number): Promise; /** * Delete the bubble avatar * @param bubble - the bubble */ deleteBubbleAvatar(bubble: Bubble): Promise; /** * Create a new bubble. * This API also sends BubbleServiceEvents.ON_BUBBLE_CREATED event. * @param bubbleName - The name of the bubble * @param createBubbleData - Bubble properties that can be specified when it is created. */ createBubble(bubbleName?: string, createBubbleData?: BubbleCreationData): Promise; /** * Invite users and guests to the bubble; The guests will receive an email to join the bubble; * @param bubble - the bubble to invite to * @param users - the users to add bubble * @param emails - list of emails to invite to the bubble * @param role - BubbleUserRole to be applied to all invited users */ inviteUsersToBubble(bubble: Bubble, users?: User[], emails?: string[], role?: BubbleUserRole): Promise; /** * Add rainbow TVs to the bubble; * @param bubble - the bubble to invite to * @param androidTVs - the contacts of type Rainbow TV * @returns resolves once it's done */ addRainbowTVsToBubble(bubble: Bubble, androidTVs: User[]): Promise; /** * Add user to the bubble; Can be used to directly add user without invitation or as a organizer * @param bubble - the bubble * @param user - the user to add * @param reason - [optional] the reason to add * @param role - the role to be set ('user' or 'organizer'), by default is 'user' * @param withoutInvitation - if TRUE, the user will be added without invitation before */ addUserToBubble(bubble: Bubble, user: User, reason?: string, role?: BubbleUserRole, withoutInvitation?: boolean): Promise; /** * Update all users to "moderators" role; CAN BE USED ONLY BY THE OWNER * @param bubble - the bubble to update */ promoteAllUsers(bubble: Bubble): Promise; /** * Update all users to "user" role; CAN BE USED ONLY BY THE OWNER * @param bubble - the bubble to update */ demoteAllUsers(bubble: Bubble): Promise; /** * This API allows to activate and deactivate the bubble's lobby * Only the owner of the bubble can use this API * The user must have the feature key BUBBLE_WAITING_ROOM in his service plan * When the lobby is closed, all waiting users are automatically accepted. An event is sent to each bubble organizer about the current lobby state * @param bubble - the bubble to update */ manageBubbleLobby(bubble: Bubble, activate: boolean): Promise; /** * This API allows to activate and deactivate the bubble's password protection * Only the owner of the bubble can use this API * The user must have the feature key BUBBLE_PASSWORD in his service plan * @param bubble - the bubble to update */ manageBubblePassword(bubble: Bubble, activate: boolean): Promise; /** * This API allows to activate and deactivate the bubble's password protection * Only the owner of the bubble can use this API * The user must have the feature key BUBBLE_PASSWORD in his service plan * @param bubble - the bubble to update */ resetBubblePassword(bubble: Bubble): Promise; /** * This API allows to search Rainbow bubbles that match a search criteria applied on some name properties such as the name of the bubble * or the names of bubble participants for example. * One or more name properties can be optionally specified to define the scope of the search. * If no scope is specified, the search is performed by default on the name of the bubble only. * It is also possible to optionally specify how the list of bubbles returned as results should be sorted. * By default, the bubbles list will be sorted by bubble name. * @param searchPattern - The search criteria * @param options - Options to specify the scope of the search and how the results are to be returned. */ searchBubbles(searchPattern: string, options?: BubbleSearchOptions): Promise; /** * Accept invitation to join a bubble * @param bubble - the bubble to accept */ acceptBubbleInvitation(bubble: Bubble): Promise; /** * Decline invitation to join a65a13c149cd2ae437afd46c4 bubble * @param bubble - the bubble to decline the invitation */ declineBubbleInvitation(bubble: Bubble): Promise; /** * User leaves the bubble. If createArchive is TRUE, the bubble will be archived, i.e. the user can only read the * content that's already in the bubble, but no further action can be done inside the bubble * The participant will go to UNSUBSCRIBED state (read-only) * @param bubble - The bubble to leave * @param createArchive - IF TRUE, the bubble will be archived for my user */ leaveBubble(bubble: Bubble, createArchive?: boolean): Promise; /** * Delete own bubble. If createArchive is TRUE, the bubble will be archived, i.e. all users can only read the * content that's already in the bubble, but no further action can be done inside the bubble * All participants in the bubble will go to UNSUBSCRIBED state (read-only) * @param bubble - The bubble to delete * @param createArchive - IF TRUE, the bubble will be archived for all users (i.e. read only mode for all users still inside); */ deleteMyBubble(bubble: Bubble, createArchive?: boolean): Promise; /** * Remove a user from the Bubble. API only available for moderators / owner of the bubble; The user will no longer have access to this bubble * nor the history; * @param bubble - the bubble * @param user - the contact that should be removed */ removeUserFromBubble(bubble: Bubble, user: User): Promise; /** * Update user's role in the Bubble. API only available for moderators / owner of the bubble; The user can be updated to "moderator" or "user"; * @param bubble - The bubble * @param user - the user that should be update * @param role - "moderator" or "user" */ updateUserRoleInBubble(bubble: Bubble, user: User, role: string): Promise; /** * Change the owner of the bubble * @param bubble - The bubble * @param newOwner - the user that should be the new owner */ changeBubbleOwner(bubble: Bubble, newOwner: User): Promise; /** * Update the bubble custom data * @param bubble - The bubble * @param customData - the custom data to be set to the bubble */ updateBubbleCustomData(bubble: Bubble, customData: any): Promise; /** * Update the bubble settings * @param bubble - The bubble * @param bubbleSettings - the data to be updated in the bubble */ updateBubbleSettings(bubble: Bubble, bubbleSettings: BubbleSettings): Promise; /** * Get the bubble settings * @param bubble - The bubble */ getBubbleSettings(bubble: Bubble): BubbleSettings; /** * clearBubbleData * Clear some data from bubble * @param bubble - The bubble * @param clearData - array containing the data to clear */ clearBubbleData(bubble: Bubble, clearData: BubbleCleanupData[]): Promise; private createBubbleInternal; private addUsersToBubble; private sendInitialRoomPresence; sendInitialBulkRoomPresence(): Promise; sendInitialRoomPresenceSync(bubble: BubbleRB, intervalDelay?: number): Promise; private sendUnavailableRoomPresence; /** * Performs a search on the name of participants of the bubble visible by the connected user * @param searchPattern - The search criteria */ getServerBubblesByParticipantsName(searchPattern: string): Promise; /** * Archive bubble. The bubble will be archived, i.e. all users can only read the * content that's already in the bubble, but no further action can be done inside the bubble * All participants in the bubble will go to UNSUBSCRIBED state (read-only) * @param bubble - The bubble where the user wants to end the conference */ private ownerArchiveRoom; /** * Internal function - get the inviting user from the bubble * Checks bubble.users array and looks for connected user entry and finally finds its invitingUserId * @param bubble - The bubble */ getInvitingUser(bubble: BubbleRB): Contact; /*** * OWNER ROOM DELETE * Used by SDK (public) * Warning when modifying this method */ private ownerDeleteRoom; private activateAndDeleteBubble; /** Check if a participant in bubble can be promoted to owner */ checkPromoteOwner(bubble: BubbleRB, user: User): Promise; updateRoomPhoneNumbers(bubbleId: string, dialInPhoneNumbers?: DialInPhoneNumber[]): Promise; private updateMyUserInBubble; /*** * DELETE MYSELF FROM A ROOM */ private userLeaveBubble; /*********************************************************/ /** ROOM XMPP EVENT HANDLERS */ /*********************************************************/ private onBubbleErrorMessage; private onBubbleInvitationMessage; private onBubbleEventMessage; private onBubbleHistoryReadyMessage; private onRoomOpeninviteUpdates; private manageonBubbleUpdateConfigMessage; private onBubbleUpdateConfigMessage; onRoomsContainerUpdate(stanza: any): void; private extractHtmlContent; private onBubblePresence; private updateUserStatus; private updateMyUserToAcceptedStatus; resetOpenInviteId(bubble: Bubble): Promise; bindOpenInviteIdToBubble(bubble: Bubble): Promise; unbindOpenInviteFromBubble(bubble: Bubble): Promise; joinRoomUsingOpenInviteId(openInviteId: string): Promise<{ bubbleId: any; isWaitingInTheLobby: any; }>; retrieveOpenInviteData(type?: string, roomId?: string): Promise; retrieveOpenInviteIdForBubble(bubble: Bubble): Promise; retrieveOpenInviteLinkForBubble(bubble: Bubble): Promise; /** * Method checks the validity of an openInviteId * @param openInvideId - to check */ checkOpenInviteIdValidity(openInvideId: string): Promise<{ roomName: string; roomTopic: string; roomLocked: string; invitingFirstName: string; invitingLastName: string; invitingCompanyName: string; }>; getOpenInviteIdLinkForRoom(roomId: string): any; getOpenInviteIdForRoom(roomId: string): any; /*** * Method retrieve the room consumption of a given user (API request to https://api.openrainbow.org/enduser/#api-rooms-getUsersConsumption Rainbow End User portal - rooms - User Quota and Consumption) */ retrieveRoomConsumption(): Promise; startAdHocConference(caller: any, participants: any): Promise; /** * Helper API that is used to get the participant object from the CALL (PSTN or WebRTC) that can be used to create Ad-hoc conference via startAdHocConference API * @param call - The active call to conference: this call must have a status ACTIVE (it could be a PSTN call or WebRTC call) * @returns object with 2 properties, participant object that should be send to the startAdHocConference and blindTrasfer boolean if the call also needs to * be redirected to the bubble via Blind Transfer API */ getParticipantDataForAdhocFromCall(call: CallRB): { participant: any; blindTrasfer: boolean; }; private getLanguageWithIsoCode; bubbleLogger(log: string): void; private getEventFromBubbleStatus; private convertToBubbleEvents; } //# sourceMappingURL=bubble.service.d.ts.map