import { List } from "ts-generic-collections-linq"; import { Bubble } from "../common/models/Bubble"; import { EventEmitter } from "events"; import { Logger } from "../common/Logger"; import { Core } from "../Core"; import { Contact } from "../common/models/Contact"; import { ConferenceSession } from "../common/models/ConferenceSession"; import { GenericService } from "./GenericService"; export {}; declare class Bubbles extends GenericService { private _bubbles; private avatarDomain; private _contactsService; private _conversations; private _profileService; private _presence; private _personalConferenceBubbleId; private _personalConferenceConfEndpointId; private _conferenceEndpoints; private _conferencesSessionById; private _webrtcConferenceId; _webConferenceRoom: any; private readonly _protocol; private readonly _host; private readonly _port; private bubblesManager; static getClassName(): string; getClassName(): string; static getAccessorName(): string; getAccessorName(): string; constructor(_core: Core, _eventEmitter: EventEmitter, _http: any, _logger: Logger, _startConfig: { start_up: boolean; optional: boolean; }); /** * @method start * @private * @return {Promise} */ start(_options: any): Promise; /** * @method stop * @private * @return {Promise} */ stop(): Promise; /** * @method init * @private * @return {Promise} */ init(useRestAtStartup: boolean): Promise; reset(): Promise; /** * @private * @method _onInvitationReceived * @instance * @param {Object} invitation contains informations about bubble and user's jid * @description * Method called when receiving an invitation to join a bubble
*/ _onInvitationReceived(invitation: any): void; /** * @private * @method _onContactInvitationReceived * @instance * @param {Object} invitation contains informations about bubble and user's jid * @description * Method called when receiving an invitation to join a bubble for a contact
*/ _onContactInvitationReceived(invitation: any): void; /** * @private * @method _onAffiliationChanged * @instance * @param {Object} affiliation contains information about bubble and user's jid * @description * Method called when affilitation to a bubble changed
*/ _onAffiliationChanged(affiliation: any): Promise; /** * @private * @method _onBubbleContactChanged * @instance * @param {Object} affiliation contains information about bubble and user's jid * @description * Method called when affilitation to a bubble changed
*/ _onBubbleContactChanged(eventInfo: any): Promise; /** * @private * @method _onOwnAffiliationChanged * @instance * @param {Object} affiliation contains information about bubble and user's jid * @description * Method called when the user affilitation to a bubble changed
*/ _onOwnAffiliationChanged(affiliation: any): Promise; /** * @private * @method _onCustomDataChanged * @instance * @param {Object} data contains information about bubble and new custom data received * @description * Method called when custom data have changed for a bubble
*/ _onCustomDataChanged(data: any): void; /** * @private * @method _onTopicChanged * @instance * @param {Object} data contains information about bubble new topic received * @description * Method called when the topic has changed for a bubble
*/ _onTopicChanged(data: any): void; /** * @private * @method _onPrivilegeBubbleChanged * @instance * @param {Object} bubbleInfo modified bubble info * @description * Method called when the owner of a bubble changed.
*/ _onPrivilegeBubbleChanged(bubbleInfo: any): Promise; /** * @private * @method _onNameChanged * @instance * @param {Object} data contains information about bubble new name received * @description * Method called when the name has changed for a bubble
*/ _onNameChanged(data: any): void; _onBubblePollConfiguration(data: any): void; _onBubblePollEvent(data: any): void; /** * @private * @method _onBubblePresenceSent * @instance * @param {Object} data contains information about bubble where the presence as been sent to receiv bubble events. * @description * Method called when the presence has been sent to a bubble
*/ _onBubblePresenceSent(data: any): void; /** * @private * @method _onbubblepresencechanged * @instance * @param {Object} bubbleInfo contains information about bubble * @description * Method called when the name has changed for a bubble
*/ _onbubblepresencechanged(bubbleInfo: any): Promise; /** * @private * @method _onBubblesContainerReceived * @instance * @param {Object} infos contains informations about a bubbles container * @description * Method called when receiving an create/update/delete event of the bubbles container
*/ _onBubblesContainerReceived(infos: any): Promise; /** * @method _onBubbleConferenceStoppedReceived * @private * @param bubble * @return {Promise} */ _onBubbleConferenceStoppedReceived(bubble: any): Promise; /** * @public * @method conferenceAllowed * @since 2.6.0 * @instance * @category CONFERENCE SPECIFIC * @return {boolean} * @description * To know if the current user has the permission to start its own WebRTC Conference. * return True if it's allowed, false if it's not the case */ conferenceAllowed(): boolean; /** * @public * @method getConferenceByIdFromCache * @since 2.6.0 * @category CONFERENCE SPECIFIC * @instance * @param {string} conferenceId ID of the conference to get * @return {ConferenceSession} * @description * To get a conference from the cache using a conference Id. * RETURN A conference object or NULL if not found */ getConferenceByIdFromCache(conferenceId: string): ConferenceSession; /** * @public * @method conferenceGetListFromCache * @since 2.6.0 * @category CONFERENCE SPECIFIC * @instance * @return {boolean} * @description * To get conferences list in progress from the cache. * return The list of Conference in progress. */ conferenceGetListFromCache(): List; /** * @private * @Method retrieveConferences * @since 2.6.0 * @instance * @category CONFERENCE SPECIFIC * @deprecated * @param {string} mediaType [optional] mediaType of conference(s) to retrive. * @param {boolean} scheduled [optional] whether it is a scheduled conference or not * @param {boolean} provisioning [optional] whether it is a conference that is in provisioning state or not * @returns {Promise} a promise that resolves when conference are retrieved. Note: If no parameter is specified, then all mediaTypes are retrieved * @memberof ConferenceService */ /** * @private * @method personalConferenceGetId * @since 2.6.0 * @category PERSONAL CONFERENCE SPECIFIC * @instance * @deprecated * @description * To get teh Id of the Personal Conference * @return {string} Id of the Personal Conference or NULL */ /** * @private * @method personalConferenceGetBubbleFromCache * @since 2.6.0 * @category PERSONAL CONFERENCE SPECIFIC * @instance * @deprecated * @description * To get the bubble which contains the Personal Meeting of the end-user (if he has the permission) * @return {Promise} The Bubble which contains the Personal Meeting or null */ /** * @private * @method personalConferenceGetPublicUrl * @since 2.6.0 * @category PERSONAL CONFERENCE SPECIFIC * @instance * @deprecated * @description * To retrieve the public URL to access the Personal Meeting - So a Guest or a Rainbow user can access to it just using a URL * @return {Promise} */ /** * @private * @method personalConferenceGenerateNewPublicUrl * @since 2.6.0 * @category PERSONAL CONFERENCE SPECIFIC * @instance * @deprecated * @description * Generate a new public URL to access the Personal Meeting (So a Guest or a Rainbow user can access to it just using a URL).
* The previous URL is no more functional ! * @return {Promise} */ /** * @method removeBubbleFromCache * @private * @instance * @param {string} conferenceId */ removeConferenceFromCache(conferenceId: string): void; /** * @method addOrUpdateConferenceToCache * @private * @instance * @param {ConferenceSession} conference * @param {boolean} useConferenceV2 do a specific treatment if the conference V2 model is used. * @param {Object} updatedDatasForEvent participants added or removed */ addOrUpdateConferenceToCache(conference: ConferenceSession, updatedDatasForEvent?: any): Promise; /** * @public * @nodered true * @method getBubblesConsumption * @instance * @async * @category Manage Bubbles - Bubbles MANAGEMENT * @return {Promise} return an object describing the consumption of bubbles : { * maxValue : number // The quota associated to this offer [room] * currentValue : number // The user's current consumption [room]. * } * * @description * return an object describing the consumption of bubbles.
*/ getBubblesConsumption(): Promise; /** * @public * @nodered true * @method getBubbleById * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {string} id the id of the bubble * @param {boolean} force=false Boolean to force a request to the server * @param {string} context * @param {string} format="full" Allows to retrieve more or less room details in response.
* small: id, name, jid, isActive
* medium: id, name, jid, topic, creator, conference, guestEmails, disableNotifications, isActive, autoAcceptInvitation
* full: all room fields
* If full format is used, the list of users returned is truncated to 100 active users by default.
* The number of active users returned can be specified using the query parameter nbUsersToKeep (if set to -1, all active users are returned).
* The total number of users being member of the room is returned in the field activeUsersCounter.
* Logged in user, room creator and room moderators are always listed first to ensure they are not part of the truncated users.
* The full list of users registered in the room shall be got using API GET /api/rainbow/enduser/v1.0/rooms/:roomId/users, which is paginated and allows to sort the users list.
* If full format is used, and whatever the status of the logged in user (active or unsubscribed), then he is added in first position of the users list.
* Default value : full Possible values : small, medium, full
* @param {boolean} unsubscribed=true When true and always associated with full format, beside owner and invited/accepted users keep also unsubscribed users. Not taken in account if the logged in user is not a room moderator. Default value : false * @param {number} nbUsersToKeep=100 Allows to truncate the returned list of active users member of the bubble in order to avoid having too much data in the response (performance optimization). If value is set to -1, all active bubble members are returned. Only usable if requested format is full (otherwise users field is not returned) Default value : 100 * @async * @return {Promise} return a promise with {Bubble} The bubble found or null * @description * Get a bubble by its ID in memory and if it is not found in server.
* Get a bubble data visible by the user requesting it (a private room the user is part of or a public room) */ getBubbleById(id: any, force?: boolean, context?: string, format?: string, unsubscribed?: boolean, nbUsersToKeep?: number): Promise; /** * @public * @nodered true * @method getBubbleByJid * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {string} jid the JID of the bubble * @param {boolean} force=false True to force a request to the server * @param {string} format="full" Allows to retrieve more or less room details in response.
* small: id, name, jid, isActive
* medium: id, name, jid, topic, creator, conference, guestEmails, disableNotifications, isActive, autoAcceptInvitation
* full: all room fields
* If full format is used, the list of users returned is truncated to 100 active users by default.
* The number of active users returned can be specified using the query parameter nbUsersToKeep (if set to -1, all active users are returned).
* The total number of users being member of the room is returned in the field activeUsersCounter.
* Logged in user, room creator and room moderators are always listed first to ensure they are not part of the truncated users.
* The full list of users registered in the room shall be got using API GET /api/rainbow/enduser/v1.0/rooms/:roomId/users, which is paginated and allows to sort the users list.
* If full format is used, and whatever the status of the logged in user (active or unsubscribed), then he is added in first position of the users list.
* Default value : full Possible values : small, medium, full
* @param {boolean} unsubscribed=true When true and always associated with full format, beside owner and invited/accepted users keep also unsubscribed users. Not taken in account if the logged in user is not a room moderator. Default value : false * @param {number} nbUsersToKeep=100 Allows to truncate the returned list of active users member of the bubble in order to avoid having too much data in the response (performance optimization). If value is set to -1, all active bubble members are returned. Only usable if requested format is full (otherwise users field is not returned) Default value : 100 * @async * @return {Promise} return a promise with {Bubble} The bubble found or null * @description * Get a bubble by its JID in memory and if it is not found in server.
* Get a rooms data visible by the user requesting it (a private room the user is part of or a public room) */ getBubbleByJid(jid: any, force?: boolean, format?: string, unsubscribed?: boolean, nbUsersToKeep?: number): Promise; /** * @public * @nodered true * @method getAllBubblesJidsOfAUserIsMemberOf * @since 2.19.0 * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @async * @description * Provide the list of room JIDs a user is a member of.
* @param {boolean} isActive isActive is a flag of the room. When set to true all room users are invited to join the room.
* Else they have to wait an event from XMPP server before joining.
* This flag is reset when the room is inactive for a while (basically 60 days), and set when a first user joins the room.
* isActive=false : inactive rooms only
* isActive=true : active rooms only
* @param {boolean} webinar When true, beside room used for a conversation, rooms used for a webinar are shown in the list. * @param {boolean} unsubscribed=true When false, exclude rooms where the member status is 'unsubscribed'. Default value : true * @param {number} limit=100 Allow to specify the number of items to retrieve. Default value : 100 * @param {number} offset=0 Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned. Default value : 0. * @param {string} sortField Sort items list based on the given field. * @param {number} sortOrder=1 Specify order when sorting items list. Default value : 1. Possible values : -1, 1. * @return {Promise} return a promise with The result found or null. * * * | Champ | Type | Description | * | --- | --- | --- | * | data | String\[\] | List of room JIDs. | * | limit | Number | Number of requested items | * | offset | Number | Requested position of the first item to retrieve | * | total | Number | Total number of items | * */ getAllBubblesJidsOfAUserIsMemberOf(isActive?: boolean, webinar?: boolean, unsubscribed?: boolean, limit?: number, offset?: number, sortField?: string, sortOrder?: number): Promise; /** * @public * @nodered true * @method getAllBubblesVisibleByTheUser * @since 2.19.0 * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @async * @description * Display a list of short room description including: id - room identifier, name - room name
* Get all rooms visible by the user requesting it (the private rooms the user is part of and the public rooms)
* Admin shall be able to disallow the use of bubbles, either for the whole company, or per user. User that does not have the right to use bubbles (useRoomCustomisation is disabled) will not be able to create bubbles or participate in bubbles (chat and web conference).
* * @param {string} format="small" Allows to retrieve more or less room details in response.
* small: id, name, jid, isActive
* medium: id, name, jid, topic, creator, conference, guestEmails, disableNotifications, isActive
* full:
* if userId is used at the same time as format=full: all rooms fields else not all fields but only: id, name, jid, topic, creator, confEndpoints, conference, guestEmails, customData, disableNotifications, isActive, autoAcceptInvitation
* the list of users returned is truncated to 100 active users by default.
* The number of active users returned can be specified using the query parameter nbUsersToKeep (if set to -1, all active users are returned).
* The total number of users being member of the room is returned in the field activeUsersCounter.
* Logged in user, room creator and room moderators are always listed first to ensure they are not part of the truncated users.
* If userId is used at the same time as format=full, then this user is added in first position of the users list even if he has the status unsubscribed.
* The full list of users registered in the room shall be got using API GET /api/rainbow/enduser/v1.0/rooms/:roomId/users, which is paginated and allows to sort the users list.
*
* Whatever the used format, when userId is indicated, lastActivityDate field is append for each room data. This is the last activity date of the room (read only, set automatically on IM exchange)
* When the status of the userId in this room is ìnvited and when nothing has been shared yet in the room, the lastActivityDate is initialized with the date of the invitation.
* When the status of the userId in this room is accepted and when nothing has been shared yet in the room, the lastActivityDate is initialized with the date of the invitation or arrival. Default value : small. Possible values : small, medium, full.
* @param {string} userId user unique identifier from which to retrieve the list of rooms the user is in (like 56f42c1914e2a8a91b99e595). creator and userId parameters are exclusives. If both are set, creator is used (as the rooms created by the user are a subset of all the rooms in which the user is). * @param {string} status user's status to filter when retrieving the list of user's rooms (like 56f42c1914e2a8a91b99e595) userId query parameter can be any userid from Users with superadmin role, and only the User's id itself if not. In this case only the rooms the user is part of are returned * @param {string} confId When a room hosts a conference endpoint, retrieve the one hosting the given confEndPointId (like 5980c0aaf698c541468fd1e0). confId query parameter used with userId query parameter helps filter when retrieving the list of user's rooms. * @param {boolean} scheduled When a room is/was used for a meeting, select rooms used for an immediate or a scheduled meeting. scheduled query parameter used with userId query parameter helps filter when retrieving the list of user's rooms.
* scheduled=false : all rooms used for an instant meeting
* scheduled=true : all rooms used for a scheduled meeting
* @param {boolean} hasConf Select all rooms used for meeting. hasConf query parameter used with userId query parameter helps filter when retrieving the list of user's rooms.
* hasConf=false : all rooms never used for a meeting
* hasConf=true : all rooms used for a meeting
* @param {boolean} isActive isActive is a flag of the room. When set to true all room users are invited to share their presence.
* Else they have to wait an event from XMPP server to share the presence.
* This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence.
* isActive=false : all rooms not active yet
* isActive=true : all active rooms
* @param {string} name Allow to search room which name includes a word beginning by ... * @param {string} sortField Sort items list based on the given field. * @param {number} sortOrder=1 Specify order when sorting items list. by default sortOrder is -1 when sort=lastActivityDate is used. Default value : 1. Possible values : -1, 1. * @param {boolean} unsubscribed=false When true, beside owner and invited/accepted users keep also unsubscribed users. Default value : false. * @param {number} webinar When true, beside room used for a conversation, rooms used for a webinar are shown in the list. webinar query parameter used with userId query parameter helps filter when retrieving the list of user's rooms. * @param {number} limit=100 Allow to specify the number of items to retrieve. Default value : 100. * @param {number} offset=0 Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned. Default value : 0. * @param {number} nbUsersToKeep=100 Allows to truncate the returned list of active users member of the bubble in order to avoid having too much data in the response (performance optimization). If value is set to -1, all active bubble members are returned. Only usable if requested format is full (otherwise users field is not returned). Default value : 100. * @param {string} creator user unique identifier from which to retrieve the list of rooms created by thie user (like 56f42c1914e2a8a91b99e595) creator and userId parameters are exclusives. If both are set, creator is used (as the rooms created by the user are a subset of all the rooms in which the user is). * @param {string} context Allow to define a context of use for this API (webinar is the only awaited value) * @param {string} needIsAlertNotificationEnabled="true" Allow to specify if the field isAlertNotificationEnabled has to be returned for each room result. If this field is not needed, setting needIsAlertNotificationEnabled to false allows to improve performance and reduce server load. Default value : true. * @return {Promise} return a promise with The result found or null. * * * | Champ | Type | Description | * | --- | --- | --- | * | containerId | String | UUID of the rooms container hosting this room. See ([Rooms containers](#api-rooms_containers)). | * | containerName | String | Name of the rooms container hosting this room | * | tags | Object\[\] | Tags list | * | tag | String | Tag name | * | color | String | Tag color - Hex Color in "0x" or "#" prefixed or "non-prefixed" | * | emoji | String | Tag emoji - an unicode sequence | * | isAlertNotificationEnabled optionnel | Boolean | When set to true, allows participants in the room to send alert notifications

This field is not returned if the query parameter `needIsAlertNotificationEnabled` is set to false. | * | id | String | Room unique identifier (like 56d0277a0261b53142a5cab5) | * | name | String | Room name. | * | visibility | String | Public/private group visibility for search

Possibles values `private`, `public` | * | topic | String | Room topic | * | jid | String | Room MUC JID | * | creationDate | Date-Time | Creation date of the room (read only, set automatically during room creation) | * | lastActivityDate | Date-Time | Last activity date of the room (read only, set automatically on IM exchange) | * | creator | String | Rainbow Id of creator | * | users | Object\[\] | List of active users members of the room.
Active users members correspond to users having the status `accepted` or `invited` in the room.

**Warning**: The list of users returned is truncated to **100 active users**. The total number of users being member of the room is returned in the field `activeUsersCounter`.
Logged in user, room creator and room moderators are always listed first to ensure they are not part of the truncated users.
The full list of users registered in the room can be got using API [GET /api/rainbow/enduser/v1.0/rooms/:roomId/users](#api-rooms_users-getRoomActiveUsers), which is paginated and allows to sort the users list. | * | userId | String | User identifier | * | jid_im | String | User jid | * | additionDate | String | Date when the user has been added in the room | * | privilege | String | Privilege of the user in the room

Possibles values `user`, `moderator` | * | status | String | Status of the user in the room

Possibles values `invited`, `accepted`, `unsubscribed`, `rejected`, `deleted` | * | activeUsersCounter | Integer | The number of users with the status 'accepted' or 'invited'.
As the list of users returned is truncated to **100 active users**, this counter allows to know if all active room members are in the `users` list or not (if `users`.length < `activeUsersCounter`).
Only available when format=full | * | confEndpoints | Object\[\] | Conference end point of a room user. This user is always a 'moderator'. Only one confEndPoint per room. | * | userId | String | User identifier the user owning the confEndPoint | * | confEndPointId | String | Identifier of the conference end point | * | mediaType | String | User identifier
see also [GET /api/rainbow/confprovisioning/v1.0/conferences/{confEndpointId}](/conf-provision/#api-conferences-GetConference))

Possibles values `pstnAudio`, `webrtc` | * | conference | Object | When the room hosts or has hosted a meeting, this is a set of data usefull to display list of meetings | * | scheduled | Boolean | Kind of meeting (false: instant meeting, true: scheduled meeting) | * | scheduledStartDate | Date-Time | Scheduled meeting start date | * | scheduledEndDate | Date-Time | Scheduled meeting end date | * | scheduledDuration | Integer | Scheduled meeting duration | * | disableTimeStats | Boolean | When set to true, clients will hide the Time Stats tab from bubble meetings | * | mediaType | String | Conference type \[pstnAudio, webrtc\] | * | lastUpdateDate | Date-Time | Scheduled meeting creation or update date | * | phoneNumbers | Object\[\] | Dial In phone numbers for this room. | * | location | String | location of the Dial In phone number. | * | locationcode | String | location code of the Dial In phone number. | * | number | String | Dial In phone number. | * | numberE164 | String | Dial In phone number in E164 format.@apiSuccess {String\[\]} data.conference.guestEmails Array of non rainbow users email | * | dialInCode | String | Dial in code. | * | guestEmails | String\[\] | Array of non rainbow users email. The former conference.guestEmails field should be deprecated sooner or later | * | includeAllPhoneNumbers | Boolean | Indicates if user chooses to include all Dial In phone numbers. | * | disableNotifications | Boolean | When set to true, there is no more notifications to be sent by a room in all cases with text body (user join/leave, conference start/end) | * | isActive | Boolean | When set to true all room users are invited to share their presence. Else they have to wait an event from XMPP server.
This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence.
This flag is read-only. | * | autoRegister | String | A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link](#api-users_rooms_public_link)).
According with autoRegister value, if another person uses the link to join the room:

* autoRegister = 'unlock':
If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.
* autoRegister = 'lock':
If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.
* autoRegister = 'unlock_ack':
If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment. | * | customData optionnel | Object | Room's custom data.
Object with free keys/values.
It is up to the client to manage the room's customData (new customData provided overwrite the existing one).

Restrictions on customData Object:

* max 20 keys,
* max key length: 64 characters,
* max value length: 8192 characters. | * | data | Object\[\] | List of room Objects. | * | limit | Number | Number of requested items | * | offset | Number | Requested position of the first item to retrieve | * | total | Number | Total number of items | * | autoAcceptInvitation | Boolean | When set to true, allows to automatically add participants in the room (default behavior is that participants need to accept the room invitation first before being a member of this room) | * */ getAllBubblesVisibleByTheUser(format?: string, userId?: string, status?: string, confId?: string, scheduled?: boolean, hasConf?: boolean, isActive?: boolean, name?: string, sortField?: string, sortOrder?: number, unsubscribed?: boolean, webinar?: boolean, limit?: number, offset?: number, nbUsersToKeep?: number, creator?: string, context?: string, needIsAlertNotificationEnabled?: string): Promise; /** * @public * @nodered true * @method getBubblesDataByListOfBubblesIds * @since 2.19.0 * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @async * @description * Display a list of short bubbles description including: id - room identifier, name - room name
* Get Bubbles data by list of room ids
* User that does not have the right to use bubbles (useRoomCustomisation is disabled) will not be able to create bubbles or participate in bubbles (chat and web conference).
* * @param {Array} bubblesIds list of room's unique identifier (like 56f42c1914e2a8a91b99e595) for which requesting data. if a room identifier doesn't correspond to a room visible by userId or logged in user it is ignored. * @param {string} format="small" Allows to retrieve more or less room details in response.
* small: id, name, jid, isActive
* medium: id, name, jid, topic, creator, conference, guestEmails, disableNotifications, isActive
* full:
* if userId is used at the same time as format=full: all rooms fields else not all fields but only: id, name, jid, topic, creator, confEndpoints, conference, guestEmails, customData, disableNotifications, isActive, autoAcceptInvitation
* the list of users returned is truncated to 100 active users by default.
* The number of active users returned can be specified using the query parameter nbUsersToKeep (if set to -1, all active users are returned).
* The total number of users being member of the room is returned in the field activeUsersCounter.
* Logged in user, room creator and room moderators are always listed first to ensure they are not part of the truncated users.
* If userId is used at the same time as format=full, then this user is added in first position of the users list even if he has the status unsubscribed.
* The full list of users registered in the room shall be got using API GET /api/rainbow/enduser/v1.0/rooms/:roomId/users, which is paginated and allows to sort the users list.
*
* Whatever the used format, when userId is indicated, lastActivityDate field is append for each room data. This is the last activity date of the room (read only, set automatically on IM exchange)
* When the status of the userId in this room is ìnvited and when nothing has been shared yet in the room, the lastActivityDate is initialized with the date of the invitation.
* When the status of the userId in this room is accepted and when nothing has been shared yet in the room, the lastActivityDate is initialized with the date of the invitation or arrival. Default value : small. Possible values : small, medium, full.
* @param {string} userId user unique identifier from which to retrieve the list of rooms the user is in (like 56f42c1914e2a8a91b99e595). creator and userId parameters are exclusives. If both are set, creator is used (as the rooms created by the user are a subset of all the rooms in which the user is). * @param {string} status user's status to filter when retrieving the list of user's rooms (like 56f42c1914e2a8a91b99e595) userId query parameter can be any userid from Users with superadmin role, and only the User's id itself if not. In this case only the rooms the user is part of are returned * @param {string} confId When a room hosts a conference endpoint, retrieve the one hosting the given confEndPointId (like 5980c0aaf698c541468fd1e0). confId query parameter used with userId query parameter helps filter when retrieving the list of user's rooms. * @param {boolean} scheduled When a room is/was used for a meeting, select rooms used for an immediate or a scheduled meeting. scheduled query parameter used with userId query parameter helps filter when retrieving the list of user's rooms.
* scheduled=false : all rooms used for an instant meeting
* scheduled=true : all rooms used for a scheduled meeting
* @param {boolean} hasConf Select all rooms used for meeting. hasConf query parameter used with userId query parameter helps filter when retrieving the list of user's rooms.
* hasConf=false : all rooms never used for a meeting
* hasConf=true : all rooms used for a meeting
* @param {string} sortField Sort items list based on the given field. * @param {number} sortOrder=1 Specify order when sorting items list. by default sortOrder is -1 when sort=lastActivityDate is used. Default value : 1. Possible values : -1, 1. * @param {boolean} unsubscribed="small" When true, beside owner and invited/accepted users keep also unsubscribed users. Default value : false. * @param {number} webinar When true, beside room used for a conversation, rooms used for a webinar are shown in the list. webinar query parameter used with userId query parameter helps filter when retrieving the list of user's rooms. * @param {number} limit=100 Allow to specify the number of items to retrieve. Default value : 100. * @param {number} offset=0 Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned. Default value : 0. * @param {number} nbUsersToKeep=100 Allows to truncate the returned list of active users member of the bubble in order to avoid having too much data in the response (performance optimization). If value is set to -1, all active bubble members are returned. Only usable if requested format is full (otherwise users field is not returned). Default value : 100. creator and userId parameters are exclusives. If both are set, creator is used (as the rooms created by the user are a subset of all the rooms in which the user is). * @param {string} context Allow to define a context of use for this API (webinar is the only awaited value) * @param {string} needIsAlertNotificationEnabled="true" Allow to specify if the field isAlertNotificationEnabled has to be returned for each room result. If this field is not needed, setting needIsAlertNotificationEnabled to false allows to improve performance and reduce server load. Default value : true. * @return {Promise} return a promise with The result found or null. * * * | Champ | Type | Description | * | --- | --- | --- | * | containerId | String | UUID of the rooms container hosting this room. See ([Rooms containers](#api-rooms_containers)). | * | containerName | String | Name of the rooms container hosting this room | * | tags | Object\[\] | Tags list | * | tag | String | Tag name | * | color | String | Tag color - Hex Color in "0x" or "#" prefixed or "non-prefixed" | * | emoji | String | Tag emoji - an unicode sequence | * | isAlertNotificationEnabled optionnel | Boolean | When set to true, allows participants in the room to send alert notifications

This field is not returned if the query parameter `needIsAlertNotificationEnabled` is set to false. | * | id | String | Room unique identifier (like 56d0277a0261b53142a5cab5) | * | name | String | Room name. | * | visibility | String | Public/private group visibility for search

Possibles values `private`, `public` | * | topic | String | Room topic | * | jid | String | Room MUC JID | * | creationDate | Date-Time | Creation date of the room (read only, set automatically during room creation) | * | lastActivityDate | Date-Time | Last activity date of the room (read only, set automatically on IM exchange) | * | creator | String | Rainbow Id of creator | * | users | Object\[\] | List of active users members of the room.
Active users members correspond to users having the status `accepted` or `invited` in the room.

**Warning**: The list of users returned is truncated to **100 active users**. The total number of users being member of the room is returned in the field `activeUsersCounter`.
Logged in user, room creator and room moderators are always listed first to ensure they are not part of the truncated users.
The full list of users registered in the room can be got using API [GET /api/rainbow/enduser/v1.0/rooms/:roomId/users](#api-rooms_users-getRoomActiveUsers), which is paginated and allows to sort the users list. | * | userId | String | User identifier | * | jid_im | String | User jid | * | additionDate | String | Date when the user has been added in the room | * | privilege | String | Privilege of the user in the room

Possibles values `user`, `moderator` | * | status | String | Status of the user in the room

Possibles values `invited`, `accepted`, `unsubscribed`, `rejected`, `deleted` | * | activeUsersCounter | Integer | The number of users with the status 'accepted' or 'invited'.
As the list of users returned is truncated to **100 active users**, this counter allows to know if all active room members are in the `users` list or not (if `users`.length < `activeUsersCounter`).
Only available when format=full | * | confEndpoints | Object\[\] | Conference end point of a room user. This user is always a 'moderator'. Only one confEndPoint per room. | * | userId | String | User identifier the user owning the confEndPoint | * | confEndPointId | String | Identifier of the conference end point | * | mediaType | String | User identifier
see also [GET /api/rainbow/confprovisioning/v1.0/conferences/{confEndpointId}](/conf-provision/#api-conferences-GetConference))

Possibles values `pstnAudio`, `webrtc` | * | conference | Object | When the room hosts or has hosted a meeting, this is a set of data usefull to display list of meetings | * | scheduled | Boolean | Kind of meeting (false: instant meeting, true: scheduled meeting) | * | scheduledStartDate | Date-Time | Scheduled meeting start date | * | scheduledEndDate | Date-Time | Scheduled meeting end date | * | scheduledDuration | Integer | Scheduled meeting duration | * | disableTimeStats | Boolean | When set to true, clients will hide the Time Stats tab from bubble meetings | * | mediaType | String | Conference type \[pstnAudio, webrtc\] | * | lastUpdateDate | Date-Time | Scheduled meeting creation or update date | * | phoneNumbers | Object\[\] | Dial In phone numbers for this room. | * | location | String | location of the Dial In phone number. | * | locationcode | String | location code of the Dial In phone number. | * | number | String | Dial In phone number. | * | numberE164 | String | Dial In phone number in E164 format.@apiSuccess {String\[\]} data.conference.guestEmails Array of non rainbow users email | * | dialInCode | String | Dial in code. | * | guestEmails | String\[\] | Array of non rainbow users email. The former conference.guestEmails field should be deprecated sooner or later | * | includeAllPhoneNumbers | Boolean | Indicates if user chooses to include all Dial In phone numbers. | * | disableNotifications | Boolean | When set to true, there is no more notifications to be sent by a room in all cases with text body (user join/leave, conference start/end) | * | isActive | Boolean | When set to true all room users are invited to share their presence. Else they have to wait an event from XMPP server.
This flag is reset when the room is inactive for a while (basically 60 days), and set when the first user share his presence.
This flag is read-only. | * | autoRegister | String | A user can create a room and not have to register users. He can share instead a public link also called 'public URL'([users public link](#api-users_rooms_public_link)).
According with autoRegister value, if another person uses the link to join the room:

* autoRegister = 'unlock':
If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.
* autoRegister = 'lock':
If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.
* autoRegister = 'unlock_ack':
If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment. | * | customData optionnel | Object | Room's custom data.
Object with free keys/values.
It is up to the client to manage the room's customData (new customData provided overwrite the existing one).

Restrictions on customData Object:

* max 20 keys,
* max key length: 64 characters,
* max value length: 8192 characters. | * | data | Object\[\] | List of room Objects. | * | autoAcceptInvitation | Boolean | When set to true, allows to automatically add participants in the room (default behavior is that participants need to accept the room invitation first before being a member of this room) | * */ getBubblesDataByListOfBubblesIds(bubblesIds: Array, format?: string, userId?: string, status?: string, confId?: string, scheduled?: boolean, hasConf?: boolean, sortField?: string, sortOrder?: number, unsubscribed?: boolean, webinar?: boolean, limit?: number, offset?: number, nbUsersToKeep?: number, context?: string, needIsAlertNotificationEnabled?: string): Promise; /** * @public * @nodered true * @method getAllPendingBubbles * @category Manage Bubbles - Bubbles MANAGEMENT * @instance * @return {Bubble[]} An array of Bubbles not accepted or declined * @description * Get the list of Bubbles that have a pending invitation not yet accepted of declined
*/ getAllPendingBubbles(): Bubble[]; /** * @public * @nodered true * @method getAllActiveBubbles * @since 1.30 * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @return {Bubble[]} An array of Bubbles that are "active" for the connected user * @description * Get the list of Bubbles where the connected user can chat
*/ getAllActiveBubbles(): Bubble[]; /** * @public * @nodered true * @method getAllClosedBubbles * @since 1.30 * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @return {Bubble[]} An array of Bubbles that are closed for the connected user * @description * Get the list of Bubbles where the connected user can only read messages
*/ getAllClosedBubbles(): Bubble[]; /** * @public * @nodered true * @method createBubble * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Create a new bubble
* @param {string} name The name of the bubble to create * @param {string} description The description of the bubble to create * @param {string } history="all" (optional) Determines the amount of history available to new users. Default is "all". Allowed values: "none", "all", "number". * @param {number} p_number=0 (optional) Number of messages to retrieve when history="number". Default is 0. * @param {string} visibility="private" (optional) Group visibility for search, either "private" or "public". Default is "private". * @param {boolean} disableNotifications=false (optional) If true, no notifications will be sent. Default is false. * @param {string} autoRegister='unlock' (optional) Determines behavior for public links. Default is "unlock". Allowed values: "unlock", "lock". * @param {boolean} autoAcceptInvitation=false (optional) If true, participants are automatically added to the room. Default is false. * @param {boolean} muteUponEntry=false (optional) Automatically mutes participants when they join the conference. Default is false. * @param {boolean} playEntryTone=true (optional) Plays a sound when a participant enters the conference. Default is true. * @async * @return {Promise} * @fulfil {Bubble} - Bubble object, else an ErrorManager object */ createBubble(name: string, description: string, history?: any, p_number?: number, visibility?: string, disableNotifications?: boolean, autoRegister?: string, autoAcceptInvitation?: boolean, muteUponEntry?: boolean, playEntryTone?: boolean): Promise; /** * @public * @nodered true * @method isBubbleClosed * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {Bubble} bubble The bubble to check * @return {boolean} True if the bubble is closed * @description * Check if the bubble is closed or not.
*/ isBubbleClosed(bubble: Bubble): boolean; /** * @public * @nodered true * @method isBubbleArchived * @instance * @async * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Check if the Bubble is an Archive state (everybody unsubscribed) * @param {object} bubble Bubble to be archived * @returns {Promise} True if the Bubble is in archive state */ isBubbleArchived(bubble: Bubble): Promise; /** * @public * @nodered true * @method getAllOwnedNotArchivedBubbles * @instance * @async * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Get all the owned Bubbles which are NOT in an Archive state (everybody unsubscribed) * @returns {Promise} return a promise with an array of the owned bubbles which are NOT in an archive state */ getAllOwnedNotArchivedBubbles(): Promise<[Bubble]>; /** * @public * @nodered true * @method getAllOwnedArchivedBubbles * @instance * @async * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Get all the owned Bubbles in an Archive state (everybody unsubscribed) * @returns {Promise} return a promise with an array of the owned bubbles with an archive state */ getAllOwnedArchivedBubbles(): Promise<[Bubble]>; /** * @public * @nodered true * @method deleteAllBubbles * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Delete all existing owned bubbles
* Return a promise
* @return {void} Nothing or an error object depending on the result */ deleteAllBubbles(): void; /** * @public * @nodered true * @method closeAnddeleteAllBubbles * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Delete all existing owned bubbles
* Return a promise
* @return {Object} Nothing or an error object depending on the result */ closeAnddeleteAllBubbles(): void; /** * @public * @nodered true * @method deleteBubble * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {Bubble} bubble The bubble to delete * @description * Delete an owned bubble. When the owner deletes a bubble, the bubble and its content is no more accessible by all participants.
* @async * @return {Promise} * @fulfil {Bubble} - The bubble removed, else an ErrorManager object */ deleteBubble(bubble: Bubble): Promise; /** * @public * @nodered true * @method closeAndDeleteBubble * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {Bubble} bubble The bubble to close + delete * @description * Delete an owned bubble. When the owner deletes a bubble, the bubble and its content is no more accessible by all participants.
* @async * @return {Promise} * @fulfil {Bubble} - The bubble removed, else an ErrorManager object */ closeAndDeleteBubble(bubble: Bubble): Promise; /** * @public * @nodered true * @method closeBubble * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {Bubble} bubble The Bubble to close * @description * Close an owned bubble. When the owner closes a bubble, the bubble is archived and only accessible in read only mode for all participants.
* @async * @return {Promise} * @fulfil {Bubble} - The bubble closed, else an ErrorManager object */ closeBubble(bubble: Bubble): Promise; /** * @public * @nodered true * @method archiveBubble * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {Bubble} bubble The bubble to archive * @description * Archive a bubble.
* This API allows to close the room in one step. The other alternative is to change the status for each room users not deactivated yet.
* All users currently having the status 'invited' or 'accepted' will receive a message/stanza .
* @async * @return {Promise} * @fulfil {Bubble} - The operation result */ archiveBubble(bubble: Bubble): Promise; /** * @public * @nodered true * @method leaveBubble * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {Bubble} bubble The bubble to leave * @description * Leave a bubble. If the connected user is a moderator, an other moderator should be still present in order to leave this bubble.
* @async * @return {Promise} * @fulfil {Bubble} - The operation result */ leaveBubble(bubble: Bubble): Promise; /** * @private * @instance * @description * Internal method */ getBubbles(format?: string, unsubscribed?: boolean): Promise; /** * @public * @nodered true * @method getAll * @category Manage Bubbles - Bubbles MANAGEMENT * @instance * @return {Bubble[]} The list of existing bubbles * @description * Return the list of existing bubbles
*/ getAll(): Bubble[]; /** * @public * @nodered true * @method getAllBubbles * @nodered true * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @return {Bubble[]} The list of existing bubbles * @description * Return the list of existing bubbles
*/ getAllBubbles(): Bubble[]; /** * @public * @nodered true * @method getAllOwnedBubbles * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Get the list of bubbles created by the user
* @return {Bubble[]} An array of bubbles restricted to the ones owned by the user */ getAllOwnedBubbles(): Bubble[]; /** * @public * @nodered true * @method getAllOwnedIdBubbles * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Get the list of bubbles created by the user
* @return {Bubble[]} An array of bubbles restricted to the ones owned by the user */ getAllOwnedIdBubbles(): any[]; /** * @method getBubbleFromCache * @private * @category Manage Bubbles - Bubbles MANAGEMENT * @instance * @param {string} bubbleId * @return {Bubble} * @private */ private getBubbleFromCache; /** * @method addOrUpdateBubbleToCache * @private * @category Manage Bubbles - Bubbles MANAGEMENT * @param {any} bubble * @return {Promise} * @private */ private addOrUpdateBubbleToCache; /** * @method removeBubbleFromCache * @private * @category Manage Bubbles - Bubbles MANAGEMENT * @instance * @param {string} bubbleId * @return {Promise} * @private */ private removeBubbleFromCache; /** * @public * @nodered true * @method promoteContactInBubble * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @param {Contact} contact The contact to promote or downgraded * @param {Bubble} bubble The bubble * @param {boolean} isModerator True to promote a contact as a moderator of the bubble, and false to downgrade * @description * Promote or not a contact in a bubble
* The logged in user can't update himself. As a result, a 'moderator' can't be downgraded to 'user'.
* @async * @return {Promise} * @fulfil {Bubble} - The bubble updated with the modifications */ promoteContactInBubble(contact: Contact, bubble: Bubble, isModerator: boolean): Promise; /** * @public * @nodered true * @method promoteContactToModerator * @since 1.65 * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Promote a contact to moderator in a bubble
* Return a promise.
* @param {Contact} contact The contact to promote * @param {Bubble} bubble The destination bubble * @return {Promise} The bubble object or an error object depending on the result */ promoteContactToModerator(contact: Contact, bubble: Bubble): Promise; /** * @public * @nodered true * @method demoteContactFromModerator * @since 1.65 * @instance * @category Manage Bubbles - Bubbles MANAGEMENT * @description * Demote a contact to user in a bubble
* Return a promise.
* @param {Contact} contact The contact to promote * @param {Bubble} bubble The destination bubble * @return {Promise} The bubble object or an error object depending on the result */ demoteContactFromModerator(contact: Contact, bubble: Bubble): Promise; /** * @public * @nodered true * @method acceptInvitationToJoinBubble * @instance * @category Manage Bubbles - Bubbles INVITATIONS * @param {Bubble} bubble The Bubble to join * @description * Accept an invitation to join a bubble
* @async * @return {Promise} * @fulfil {Bubble} - The bubble updated or an error object depending on the result */ acceptInvitationToJoinBubble(bubble: Bubble): Promise; /** * @public * @nodered true * @method declineInvitationToJoinBubble * @instance * @category Manage Bubbles - Bubbles INVITATIONS * @param {Bubble} bubble The Bubble to decline * @description * Decline an invitation to join a bubble
* @async * @return {Promise} * @fulfil {Bubble} - The bubble updated or an error object depending on the result */ declineInvitationToJoinBubble(bubble: Bubble): Promise; /** * @public * @nodered true * @method inviteContactToBubble * @instance * @category Manage Bubbles - Bubbles INVITATIONS * @param {Contact} contact The contact to invite * @param {Bubble} bubble The bubble * @param {boolean} isModerator True to add a contact as a moderator of the bubble * @param {boolean} withInvitation If true, the contact will receive an invitation and will have to accept it before entering the bubble. False to force the contact directly in the bubble without sending an invitation. * @param {string} reason=null The reason of the invitation (optional) * @description * Invite a contact in a bubble
* @async * @return {Promise} * @fulfil {Bubble} - The bubble updated with the new invitation */ inviteContactToBubble(contact: Contact, bubble: Bubble, isModerator: boolean, withInvitation: boolean, reason?: string): Promise; /** * @public * @nodered true * @method inviteContactsByEmailsToBubble * @instance * @category Manage Bubbles - Bubbles INVITATIONS * @param {Array} contactsEmails The contacts email tab to invite * @param {Bubble} bubble The bubble * @description * Invite a list of contacts by emails in a bubble
* @async * @return {Promise} * @fulfil {Bubble} - The bubble updated with the new invitation */ inviteContactsByEmailsToBubble(contactsEmails: Array, bubble: Bubble): Promise; /** * @public * @nodered true * @method updateBubbleData * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {string} bubbleId The id of the Bubble to update * @param {string} visibility Public/private group visibility for search. Default value : private. Possible values : private, public. * @param {string} topic Room topic. * @param {string} name Room name. * @param {string} owner User unique identifier; New room owner must be a moderator and current owner must have valid licence (feature BUBBLE_PROMOTE_MEMBER). * @param {string} autoRegister A user can create a room and not have to register users. He can share instead a public link also called 'public URL'(users public link).
* According with autoRegister value, if another person uses the link to join the room:
* autoRegister = 'unlock':
* If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room.
* autoRegister = 'lock':
* If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room.
* autoRegister = 'unlock_ack' (value not authorized yet):
* If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment. Default value : unlock. Possible values : unlock, lock.
* * @param {boolean} autoAcceptInvitation When set to true, allows to automatically add participants in the room (default behavior is that participants need to accept the room invitation first before being a member of this room) * @param {boolean} muteUponEntry When participant enters the conference, he is automatically muted. * @param {boolean} playEntryTone Play an entry tone each time a participant enters the conference. * @param {boolean} disableTimeStats When set to true, clients will hide the Time Stats tab from bubble meetings. * @param {Object} phoneNumbers : Array of object with : {
* location : string location of the Dial In phone number
* locationcode : string location code of the Dial In phone number
* number : string Dial In phone number
* numberE164 : string Dial In phone number in E164 format
* }
* @param {boolean} includeAllPhoneNumbers Indicates if user chooses to include all Dial In phone numbers. * @description * This API allows to update room data.
* * @async * @return {Promise} * @fulfil {Bubble} - The bubble updated with the data */ updateBubbleData(bubbleId: string, visibility?: string, topic?: string, name?: string, owner?: string, autoRegister?: string, autoAcceptInvitation?: boolean, muteUponEntry?: boolean, playEntryTone?: boolean, disableTimeStats?: boolean, phoneNumbers?: Array<{ location?: string; locationcode?: string; number?: string; numberE164?: string; }>, includeAllPhoneNumbers?: boolean): Promise; /** * @public * @nodered true * @method setBubbleCustomData * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble The Bubble * @param {Object} customData Bubble's custom data area. key/value format. Maximum and size are server dependent * @description * Modify all custom data at once in a bubble
* To erase all custom data, put {} in customData
* @async * @return {Promise} * @fulfil {Bubble} - The bubble updated with the custom data set or an error object depending on the result */ setBubbleCustomData(bubble: Bubble, customData: any): Promise; /** * @private * @method setBubbleVisibilityStatus * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble The Bubble * @param {string} status Bubble's public/private group visibility for search. Either "private" (default) or "public" * @description * Set the Bubble's visibility status
* @async * @return {Promise} * @fulfil {Bubble} - The Bubble full data or an error object depending on the result */ setBubbleVisibilityStatus(bubble: Bubble, status: string): Promise; /** * @public * @nodered true * @method setBubbleTopic * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble The Bubble * @param {string} topic Bubble's topic * @description * Set the Bubble's topic
* @memberof Bubbles * @async * @return {Promise} * @fulfil {Bubble} - The Bubble full data or an error object depending on the result */ setBubbleTopic(bubble: Bubble, topic: string): Promise; /** * @public * @nodered true * @method setBubbleName * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble The Bubble * @param {string} name Bubble's name * @description * Set the Bubble's name
* @async * @return {Promise} * @fulfil {Bubble} - The Bubble full data or an error object depending on the result */ setBubbleName(bubble: Bubble, name: string): Promise; /** * @method randomString * @private * @category Manage Bubbles - Bubbles FIELDS * @instance * @param {number} length=10 * @return {string} */ randomString(length?: number): string; /** * @public * @nodered true * @method updateAvatarForBubble * @since 1.65 * @instance * @category Manage Bubbles - Bubbles FIELDS * @description * Update the bubble avatar (from given URL)
* The image will be automatically resized
* /!\ if URL isn't valid or given image isn't loadable, it'll fail
* Return a promise.
* @param {string} urlAvatar The avatarUrl * @param {Bubble} bubble The bubble to update * @return {Bubble} A bubble object of null if not found */ updateAvatarForBubble(urlAvatar: string, bubble: Bubble): Promise; /** * @private * @method setAvatarBubble * @category Manage Bubbles - Bubbles FIELDS * @instance * @param bubble * @param roomAvatarPath */ setAvatarBubble(bubble: Bubble, roomAvatarPath: any): Promise; /** * @public * @nodered true * @method deleteAvatarFromBubble * @since 1.65 * @instance * @category Manage Bubbles - Bubbles FIELDS * @description * Delete the bubble avatar
*
* Return a promise.
* @param {Bubble} bubble The bubble to update * @return {Bubble} A bubble object of null if not found */ deleteAvatarFromBubble(bubble: Bubble): Promise; /** * @private * @method deleteAvatarBubble * @category Manage Bubbles - Bubbles FIELDS * @instance * @param bubbleId */ deleteAvatarBubble(bubbleId: any): Promise; /** * @public * @nodered true * @method updateCustomDataForBubble * @since 1.64 * @instance * @category Manage Bubbles - Bubbles FIELDS * @description * Update the customData of the bubble
* Return a promise.
* @param {Object} customData * The customData to put to the bubble
* Example: { "key1" : 123, "key2" : "a string" } * @param {Bubble} bubble The bubble to update * @return {Promise} The updated Bubble */ updateCustomDataForBubble(customData: any, bubble: Bubble): Promise; /** * @public * @nodered true * @method deleteCustomDataForBubble * @since 1.65 * @instance * @category Manage Bubbles - Bubbles FIELDS * @description * Delete the customData of the bubble
* Return a promise.
* @param {Bubble} bubble The bubble to update * @return {Promise} The updated Bubble */ deleteCustomDataForBubble(bubble: Bubble): Promise; /** * @public * @nodered true * @method updateDescriptionForBubble * @since 1.65 * @instance * @category Manage Bubbles - Bubbles FIELDS * @description * Update the description of the bubble
* Return a promise.
* @param {Bubble} bubble The bubble to update * @param {string} strDescription The description of the bubble (it is the topic on server side, and result event) * @return {Bubble} A bubble object of null if not found */ updateDescriptionForBubble(bubble: Bubble, strDescription: string): Promise; /** * @public * @nodered true * @method changeBubbleOwner * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble The bubble * @param {Contact} contact The contact to set a new bubble owner * @description * Set a moderator contact as owner of a bubble
* @async * @return {Promise} * @fulfil {Bubble} - The bubble updated with the modifications */ changeBubbleOwner(bubble: Bubble, contact: Contact): Promise; /** * @public * @nodered true * @method removeContactFromBubble * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Contact} contact The contact to remove * @param {Bubble} bubble The destination bubble * @description * Remove a contact from a bubble
* @async * @return {Promise} * @fulfil {Bubble} - The bubble object or an error object depending on the result */ removeContactFromBubble(contact: Contact, bubble: Bubble): Promise; /** * @nodered true * @method getAvatarFromBubble * @public * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble The destination bubble * @async * @return {Promise<{}>} return a promise with {Object} A Blob object with data about the avatar picture. * @description * Get A Blob object with data about the avatar picture of the bubble.
*/ getAvatarFromBubble(bubble: Bubble): Promise; /** * @private * @method refreshMemberAndOrganizerLists * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble the bubble to refresh * @async * @return {Promise} return a promise with {Bubble} The bubble found or null * @description * Refresh members and organizers of the bubble.
*/ refreshMemberAndOrganizerLists(bubble: Bubble): any; /** * @public * @nodered true * @method getUsersFromBubble * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble The bubble * @param {Object} options={} The criterias to select the users to retrieve
* format : Allows to retrieve more or less user details in response, besides specifics data about room users like (privilege, status and additionDate)
* - small: userId loginEmail displayName jid_im
* - medium: userId loginEmail displayName jid_im status additionDate privilege firstName lastName companyId companyName
* - full: userId loginEmail displayName jid_im status additionDate privilege firstName lastName nickName title jobTitle emails country language timezone companyId companyName roles adminType
* sortField : Sort items list based on the given field
* privilege : Allows to filter users list on the privilege type provided in this option.
* limit : Allow to specify the number of items to retrieve.
* offset : Allow to specify the position of first item to retrieve (first item if not specified). Warning: if offset > total, no results are returned.
* sortOrder : Specify order when sorting items list. Available values -1, 1 (default)
* @description * Get a list of users in a bubble filtered by criterias.
* @async * @return {Promise} */ getUsersFromBubble(bubble: Bubble, options?: Object): Promise; /** * @public * @nodered true * @method getStatusForConnectedUserInBubble * @instance * @category Manage Bubbles - Bubbles FIELDS * @param {Bubble} bubble The bubble * @description * Get the status of the connected user in a bubble
* @async * @return {Promise} */ getStatusForConnectedUserInBubble(bubble: Bubble): any; /** * @public * @nodered true * @method retrieveAllBubblesByTags * @instance * @async * @category Manage Bubbles - Bubbles TAGS * @param {Array} tags List of tags to filter the retrieved bubbles. 64 tags max. * @param {string} format="small" Allows to retrieve more or less room details in response.
* small: id, name, jid, isActive
* medium: id, name, jid, topic, creator, conference, guestEmails, disableNotifications, isActive, autoAcceptInvitation
* full: all room fields
* If full format is used, the list of users returned is truncated to 100 active users by default.
* The number of active users returned can be specified using the query parameter nbUsersToKeep (if set to -1, all active users are returned).
* The total number of users being member of the room is returned in the field activeUsersCounter.
* Logged in user, room creator and room moderators are always listed first to ensure they are not part of the truncated users.
* If full format is used, and whatever the status of the logged in user (active or unsubscribed), then he is added in first position of the users list.
* Default value : small
* Authorized value : small, medium, full
* @param {number} nbUsersToKeep=100 Allows to truncate the returned list of active users member of the bubble in order to avoid having too much data in the response (performance optimization).
* If value is set to -1, all active bubble members are returned.
* Only usable if requested format is full (otherwise users field is not returned)
* Default value : 100
* @return {Promise<{rooms, roomDetails}>} return a promise with a list of {rooms : List of rooms having the searched tag, roomDetails : List of rooms detail data according with format and nbUsersToKeep choices} filtered by tags or null * @description * Get a list of {Bubble} filtered by tags.
*/ retrieveAllBubblesByTags(tags: Array, format?: string, nbUsersToKeep?: number): Promise; /** * @public * @nodered true * @method setTagsOnABubble * @instance * @async * @category Manage Bubbles - Bubbles TAGS * @description * Set a list of tags on a {Bubble}.
* @param {Bubble} bubble The on which the tags must be setted. * @param {Array} tags The tags to be setted on the selected bubble. Ex : [{ "tag" : "Test1Tag" }, { "tag" : "Test2Tag" }] * @return {Promise} return a promise with a Bubble's tags infos. */ setTagsOnABubble(bubble: Bubble, tags: Array): Promise; /** * * @public * @nodered true * @method deleteTagOnABubble * @instance * @async * @category Manage Bubbles - Bubbles TAGS * @description * Delete a single tag on a list of {Bubble}. If the list of bubble is empty then every bubbles are concerned.
* @param {Array} bubbles The bubbles on which the tags must be deleted. * @param {string} tag The tag to be removed on the selected bubbles. * @return {Promise} return a promise with a Bubble's tags infos. */ deleteTagOnABubble(bubbles: Array, tag: string): Promise; /** * @public * @nodered true * @method getAllBubblesContainers * @instance * @async * @category Manage Bubbles - Bubbles CONTAINERS (Bubble Folder) * @param {string} name=null name The name of a rooms container created by the logged in user.
* Two way to search containers are available:
* a word search ('all containers that contain a word beginning with...'). So name=cont or name=container leads to find "My first Container", "my second container" ..
* an exact match case insensitive for a list of container name. name=Container1&name=container2 eads to find 'Container1' and 'Container2' name (must be an exact match but we are case sensitive)
* @description * retrieve the containers of bubbles from server.
* A filter can be provided for the search by a name.
* @return {Promise} the result of the operation. * */ getAllBubblesContainers(name?: string): Promise; /** * @public * @nodered true * @method getABubblesContainersById * @instance * @category Manage Bubbles - Bubbles CONTAINERS (Bubble Folder) * @param {string} id=null The id of the container of bubbles to retreive from server. * @async * @description * retrieve a containers of bubbles from server by it's id.
* @return {Promise} the result of the operation. */ getABubblesContainersById(id?: string): Promise; /** * @public * @nodered true * @method addBubblesToContainerById * @instance * @category Manage Bubbles - Bubbles CONTAINERS (Bubble Folder) * @param {string} containerId The id of the container of bubbles to retreive from server. * @param {Array} bubbleIds List of the bubbles Id to attach to the container. * @async * @description * Add a list of bubbles to a containers of bubbles on server by it's id.
* @return {Promise} the result of the operation. */ addBubblesToContainerById(containerId: string, bubbleIds: Array): Promise; /** * @public * @nodered true * @method updateBubbleContainerNameAndDescriptionById * @instance * @category Manage Bubbles - Bubbles CONTAINERS (Bubble Folder) * @param {string} containerId The id of the container of bubbles to retreive from server. * @param {string} name The name of the container. * @param {string} description The description of the container. * @async * @description * Change one bubble container name or description from server by it's id.
* @return {Promise} the result of the operation. */ updateBubbleContainerNameAndDescriptionById(containerId: string, name: string, description?: string): Promise; /** * @public * @nodered true * @method createBubbleContainer * @instance * @category Manage Bubbles - Bubbles CONTAINERS (Bubble Folder) * @param {string} name The name of the container. * @param {string} description The description of the container. * @param {Array} bubbleIds List of the bubbles Id to attach to the container. * @async * @description * Create one bubble container with name or description.
* * @return {Promise} the result of the operation. */ createBubbleContainer(name: string, description?: string, bubbleIds?: Array): Promise; /** * @public * @nodered true * @method deleteBubbleContainer * @instance * @category Manage Bubbles - Bubbles CONTAINERS (Bubble Folder) * @param {string} containerId The id of the container of bubbles to delete from server. * @async * @description * delete one container by id.
* @return {Promise} the result of the operation. */ deleteBubbleContainer(containerId: string): Promise; /** * @public * @nodered true * @method removeBubblesFromContainer * @instance * @category Manage Bubbles - Bubbles CONTAINERS (Bubble Folder) * @param {string} containerId The id of the container. * @param {Array} bubbleIds List of the bubbles Id to remove from the container. * @async * @description * remove rooms from a container by id.
* @return {Promise} the result of the operation. */ removeBubblesFromContainer(containerId: string, bubbleIds: Array): Promise; /** * @public * @nodered true * @method getABubblePublicLinkAsModerator * @since 2.19.0 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @param {string} bubbleId Bubble unique identifier * @param {boolean} emailContent Allows to retrieve email content in the json body response. * @param {string} language Allows to provide a language to use for email content. If not provided, logged in user language is used. * @async * @description * Any member with an Organizer role (moderator privilege) should be able to share the link of the bubble. This api allow to get the openInviteId bound with the given bubble.
* @return {Promise} */ getABubblePublicLinkAsModerator(bubbleId?: string, emailContent?: boolean, language?: string): Promise; /** * @private * @method getInfoForPublicUrlFromOpenInvite * @since 1.72 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @param {Object} openInvite contains information about a bubbles invitation * @description * get infos for the PublicUrl
* @return {Promise} */ getInfoForPublicUrlFromOpenInvite(openInvite: any): Promise; /** * * @public * @nodered true * @method getAllPublicUrlOfBubbles * @since 1.72 * @category Manage Bubbles - Bubbles PUBLIC URL * @instance * @description * get all the PublicUrl belongs to the connected user
* @return {Promise} */ getAllPublicUrlOfBubbles(): Promise; /** * * @public * @nodered true * @method getAllPublicUrlOfBubblesOfAUser * @since 1.72 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @param {Contact} contact="new Contact()" user used to get all his Public Url. If not setted the connected user is used. * @description * get all the PublicUrl belongs to a user
* @return {Promise} */ getAllPublicUrlOfBubblesOfAUser(contact?: Contact): Promise; /** * * @public * @nodered true * @method getAllPublicUrlOfABubble * @since 1.72 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @param {Bubble} bubble bubble from where get the public link. * @description * get all the PublicUrl of a bubble belongs to the connected user
* @return {Promise} */ getAllPublicUrlOfABubble(bubble: Bubble): Promise; /** * * @public * @nodered true * @method getAllPublicUrlOfABubbleOfAUser * @since 1.72 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @param {Contact} contact user used to get all his Public Url. If not setted the connected user is used. * @param {Bubble} bubble bubble from where get the public link. * @description * get all the PublicUrl of a bubble belongs to a user
* @return {Promise} */ getAllPublicUrlOfABubbleOfAUser(contact: Contact, bubble: Bubble): Promise; /** * @public * @nodered true * @method createPublicUrl * @since 1.72 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @description * Create / Get the public URL used to access the specified bubble. So a Guest or a Rainbow user can access to it just using a URL
* Return a promise.
* @param {Bubble} bubble The bubble on which the public url is requested. * @return {Promise} The public url */ createPublicUrl(bubble: Bubble): Promise; /** * @public * @nodered true * @method generateNewPublicUrl * @since 1.72 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @description * Generate a new public URL to access the specified bubble (So a Guest or a Rainbow user can access to it just using a URL)
* Return a promise.
*
* !!! The previous URL is no more functional !!!
* @param {Bubble} bubble The bubble on which the public url is requested. * @return {Promise} The public url */ generateNewPublicUrl(bubble: Bubble): Promise; /** * @public * @nodered true * @method removePublicUrl * @since 1.72 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @description * 'Remove' the public URL used to access the specified bubble. So it's no more possible to access to this buble using this URL
* Return a promise.
* @param {Bubble} bubble The bubble on which the public url must be deleted. * @return {Promise} An object of the result */ removePublicUrl(bubble: Bubble): Promise; /** * @public * @nodered true * @method setBubbleAutoRegister * @since 1.86 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @description * A user can create a room and not have to register users. He can share instead a public link also called 'public URL'(users public link). * According with autoRegister value, if another person uses the link to join the room: * autoRegister = 'unlock': If this user is not yet registered inside this room, he is automatically included with the status 'accepted' and join the room. (default value). * autoRegister = 'lock': If this user is not yet registered inside this room, he can't access to the room. So that he can't join the room. * autoRegister = 'unlock_ack' (value not authorized yet): If this user is not yet registered inside this room, he can't access to the room waiting for the room's owner acknowledgment. * Return a promise.
* @param {Bubble} bubble The bubble on which the public url must be deleted. * @param {string} autoRegister="unlock" value of the share of public URL to set. * @return {Promise} An object of the result */ setBubbleAutoRegister(bubble: Bubble, autoRegister?: string): Promise; /** * @private * @method GetPublicURLFromResponseContent * @since 1.72 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @description * retrieve the public url from public url object.
* @param {Object} content Id of the bubble * @return {string} An url */ getPublicURLFromResponseContent(content: any): string; /** * @public * @nodered true * @method registerGuestForAPublicURL * @since 1.75 * @instance * @category Manage Bubbles - Bubbles PUBLIC URL * @description * register a guest user with a mail and a password and join a bubble with a public url.
* For this use case, first generate a public link using createPublicUrl(bubbleId) API for the requested bubble.
* If the provided openInviteId is valid, the user account is created in guest mode (guestMode=true)
* and automatically joins the room to which the public link is bound.
*
* Note: The guest account can be destroy only with a user having one of the following rights : superadmin,bp_admin,bp_finance,admin.
* @param {string} publicUrl the public url to get the openinviteId. * @param {string} loginEmail User email address (used for login). Must be unique (409 error is returned if a user already exists with the same email address). * @param {string} password User password.
* Rules:
* * more than 8 characters,
* * ⚠️ Warning: the minimal password length will soon be increased to 12, planned to be effective mid-june 2023 (8 characters are still accepted until this date)
* * at least 1 capital letter,
* * 1 number,
* * 1 special character.
* @param {string} firstName User first name * @param {string} lastName User last name * @param {string} nickName User nickName * @param {string} title User title (honorifics title, like Mr, Mrs, Sir, Lord, Lady, Dr, Prof,...) * @param {string} jobTitle User job title * @param {string} department User department * @return {Promise} An object of the result */ registerGuestForAPublicURL(publicUrl: string, loginEmail: string, password: string, firstName: string, lastName: string, nickName: string, title: string, jobTitle: string, department: string): Promise; /** * @public * @nodered true * @method checkOpenInviteIdValidity * @since 2.22.4 * @instance * @category Manage Bubbles - Bubbles Open Invites * @description * Rainbow users may use a public URL to join a meeting The public URL format is designed by the Rainbow application programmer and must contain at least an 'openInviteId'. This openInviteId is an UUID-V4 value.
* https://meet.openrainbow.com/d4bb04c2a2254cd3bebb28e449ce7de3
* The goal of this api is to check the validity of this URL. This API is public and no authentication is necessary. So a rate limiter is used to dissuade a brute force attack.
* @param {string} openInviteId uuid representing a part of the user's public URL to invite somebody to join a bubble. Example of public URL: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario='public-url' * @return {Promise} An object of the result * * * | Champ | Type | Description | * | --- | --- | --- | * | roomName | String | The meeting name | * | roomTopic | String | The description of the meeting | * | roomLocked | Boolean | True when the new comer for the meeting are barred | * | invitingFirstName | String | The meeting creator's first name | * | invitingLastName | String | The meeting creator's last name | * | invitingCompanyName | String | The meeting creator's company name | * */ checkOpenInviteIdValidity(openInviteId: string): Promise; /** * @public * @nodered true * @method joinBubbleByOpenInviteId * @since 2.22.4 * @instance * @category Manage Bubbles - Bubbles Open Invites * @description * Rainbow user may have a public link that will help their coworkers to join rooms. So that he just has to create a room and create a public link so called 'public URL'.
* Each user can create on demand a public URL to one of his rooms(users public link).
* The public URL format is designed by the Rainbow application programmer and must contain at least an 'openInviteId'. This openInviteId is an UUID-V4 value.
* @param {string} openInviteId uuid representing a part of the user's public URL to invite somebody to join a bubble. Example of public URL: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario='public-url' * @return {Promise} An object of the result * * * | Champ | Type | Description | * | --- | --- | --- | * | roomId | String | Room unique identifier. | * | hasAlreadyJoinThisRoom | Boolean | True when the loggedInUser has previously join this room. | * */ joinBubbleByOpenInviteId(openInviteId: string): Promise; /** * @public * @nodered true * @method createBubblePoll * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * This API allow creating a Poll for a bubble.
* @param {string} bubbleId bubble identifier. * @param {string} title="" Poll title. * @param {Object} questions * [{
* text : string //Question text (up to 20 questions).
* multipleChoice : boolean //Is multiple choice allowed?
* answers : [{
* text : string // Answer text (up to 20 answers).
* }]
* }] The questions to ask.
* @param {boolean} anonymous=false Is poll anonymous? Default value : false * @param {number} duration=0 Poll duration (from 0 to 60 minutes, 0 means no duration). Default value : 0 * @return {Promise} An object of the result * { * pollId : string // Created poll identifier. * } */ createBubblePoll(bubbleId: string, title: string, questions: Array<{ text: string; multipleChoice: boolean; answers: Array<{ text: string; }>; }>, anonymous?: boolean, duration?: number): Promise; /** * @public * @nodered true * @method deleteBubblePoll * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * This API allows deleting a Poll for a bubble.
* @param {string} pollId poll identifier. * @return {Promise} An object of the result */ deleteBubblePoll(pollId: string): Promise; /** * @public * @nodered true * @method getBubblePoll * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * This API allows getting data of a Poll for a bubble.
* @param {string} pollId poll identifier. * @param {string} format="small" If format equals small, non-anonymous polls are sent in anonymous format. Default value : small. Possible values : small, full * @return {Promise} An object of the result */ getBubblePoll(pollId: string, format?: string): Promise; /** * @public * @nodered true * @method getBubblePollsByBubble * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * Get polls for a room. They are ordered by creation date (from newest to oldest). Only moderator can get unpublished polls.
* @param {string} bubbleId Bubble identifier. * @param {string} format="small" If format equals small, non-anonymous polls are sent in anonymous format. Default value : small. Possible values : small, full * @param {number} limit=100 Allow to specify the number of data to retrieve. * @param {number} offset Allow to specify the position of first data to retrieve * @return {Promise} An object of the result * * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object\[\] | | * | id | String | Poll identifier. | * | roomId | String | Room identifier. | * | title optionnel | String | Poll title. | * | questions | Object\[\] | | * | text | String | Question text. | * | multipleChoice optionnel | Boolean | Is multiple choice allowed? | * | answers | Object\[\] | | * | text | String | Answer text. | * | votes optionnel | Number\[\] | Voter indexes in case of non-anonymous poll. | * | voters optionnel | Number | Number of voters for this question in case of anonymous poll. | * | voters optionnel | Object\[\] | | * | userId optionnel | String | Voter user identifier in case of non-anonymous poll. | * | email optionnel | String | Voter login email in case of non-anonymous poll. | * | firstName optionnel | String | Voter first name in case of non-anonymous poll. | * | lastName optionnel | String | Voter last name in case of non-anonymous poll. | * | anonymous optionnel | Boolean | Is poll anonymous? | * | duration optionnel | Number | Poll duration (0 means no duration). | * | creationDate | Date | Poll creation date. | * | publishDate optionnel | Date | Poll publication date. | * | state | String | Poll state.

Possible values : `unpublished`, `published`, `terminated` | * | voted optionnel | Boolean | In case of published or terminated poll, did requester vote? | * | limit | Number | Number of polls to retrieve. | * | offset | Number | Position of first poll to retrieve. | * | total | Number | Total number of polls. | */ getBubblePollsByBubble(bubbleId: string, format: string, limit: number, offset: number): Promise; /** * @public * @nodered true * @method publishBubblePoll * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * This API allows publishing a Poll for a bubble.
* @param {string} pollId poll bubble identifier. * @return {Promise} An object of the result * */ publishBubblePoll(pollId: string): Promise; /** * @public * @nodered true * @method terminateBubblePoll * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * This API allows terminating a Poll for a bubble.
* @param {string} pollId poll bubble identifier. * @return {Promise} An object of the result * */ terminateBubblePoll(pollId: string): Promise; /** * @public * @nodered true * @method unpublishBubblePoll * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * This API allows unpublishing a Poll for a bubble.
* @param {string} pollId poll bubble identifier. * @return {Promise} An object of the result * */ unpublishBubblePoll(pollId: string): Promise; /** * @public * @nodered true * @method updateBubblePoll * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * This API allows updating poll. When updating a question or an answer, all questions and answers must be present in body.
* @param {string} pollId poll identifier. * @param {string} bubbleId bubble identifier. * @param {string} title="" Poll title. * @param {Object} questions * [{
* text : string //Question text (up to 20 questions).
* multipleChoice : boolean //Is multiple choice allowed?
* answers : [{
* text : string // Answer text (up to 20 answers).
* }]
* }] The questions to ask.
* @param {boolean} anonymous=false Is poll anonymous? Default value : false * @param {number} duration=0 Poll duration (from 0 to 60 minutes, 0 means no duration). Default value : 0 * @return {Promise} An object of the result * */ updateBubblePoll(pollId: string, bubbleId: string, title: string, questions: Array<{ text: string; multipleChoice: boolean; answers: Array<{ text: string; }>; }>, anonymous?: boolean, duration?: number): Promise; /** * @public * @nodered true * @method votesForBubblePoll * @since 2.10.0 * @instance * @async * @category Manage Bubbles - Bubbles Polls * @description * This API allows voting for a Poll for a bubble.
* @param {string} pollId poll bubble identifier. * @param {Array} votes Array<
* question : number // Question number (starts at 0).
* answers : number // Question answers (starts at 0). >
* @return {Promise} An object of the result * */ votesForBubblePoll(pollId: string, votes: Array<{ question: number; answers: Array; }>): Promise; /** * * @public * @since 2.20.0 * @nodered true * @method deleteAllMessagesInBubble * @category Bubbles Messages * @instance * @async * @description * Delete all messages in a Bubble for everybody or hide it definitively for a specific contact.
* @param {Bubble} bubble bubble where im messages must be deleted. * @param {string} forContactJid=undefined jid of the contact we want to delete the access to messages in the bubble. If not setted, then all bubble's messages are deleted for every contacts. * @return Promise Result of the API. */ deleteAllMessagesInBubble(bubble: Bubble, forContactJid?: string): Promise; /** * @public * @nodered true * @method addPSTNParticipantToConference * @instance * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} participantPhoneNumber Phone number to call. * @param {string} country Country where the called number is from. If not provided, the user's country is taken. * @since 2.2.0 * @async * @description * Adds a PSTN participant to WebRTC conference. A SIP call is launched towards the requested phone number.
* @return {Promise} the result of the operation. */ addPSTNParticipantToConference(roomId: string, participantPhoneNumber: string, country: string): Promise; /** * @public * @nodered true * @method snapshotConference * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} limit=100 Allows to specify the number of participants to retrieve. * @param {string} offset=0 Allows to specify the position of first participant to retrieve. * @async * @description * The snapshot command returns global information about conference and the set of participants engaged in the conference.
* If conference isn't started, 'active' will be 'false' and the participants list empty.
* If conference is started and the requester is in it, the response will contain global information about conference and the requested set of participants.
* If the conference is started and the requester, not conference owner, isn't in the conference, the response will contain global information about conference and an empty participants list.
* If the conference is started and the requester, conference owner, isn't in the conference, the response will contain global information about conference and the requested set of participants.
* @return {Promise} the result of the operation. */ snapshotConference(roomId: string, limit?: number, offset?: number): Promise; /** * @public * @nodered true * @method delegateConference * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} userId User identifier. * @async * @description * Current owner of the conference delegates its control to another user (this user must support conference delegation, i.e. "delegateCapability" was set to true when joining).
* @return {Promise} the result of the operation. */ delegateConference(roomId: string, userId: string): Promise; /** * @public * @nodered true * @method disconnectPSTNParticipantFromConference * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * Disconnect PSTN participant from a conference. The request is sent by a conference's moderator.
* Conference: Moderator can drop any PSTN participant.
* Webinar: Organizer or speaker can drop any PSTN participant.
* Practice room: Not applicable
* Waiting room: Not applicable.
* @return {Promise} the result of the operation. */ disconnectPSTNParticipantFromConference(roomId: string): Promise; /** * @public * @nodered true * @method disconnectParticipantFromConference * @instance * @since 2.2.0 * @category Conference V2 * @param {string} bubbleId The id of the room. * @param {string} userId User identifier. * @async * @description * Disconnect participant from a conference. The request can be sent by participant himself or by a conference's moderator.
* Conference: Moderator can drop any participant except conference owner.
* Webinar: Organizer or speaker can drop any participant.
* Practice room: Organizer or speaker can drop any participant. When last participant is dropped, practice room stops.
* Waiting room: Not applicable.
* @return {Promise} the result of the operation. */ disconnectParticipantFromConference(bubbleId: string, userId: string): Promise; /** * @public * @nodered true * @method getTalkingTimeForAllPparticipantsInConference * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} limit=100 Allows to specify the number of participants to retrieve. * @param {string} offset=0 Allows to specify the position of first participant to retrieve. * @async * @description * The snapshot command returns global information about a conference and the set of participants engaged in the conference.
* If conference isn't started, 'active' will be 'false' and the participants list empty.
* If conference is started and the requester is in it, the response will contain global information about conference and the requested set of participants.
* If the conference is started and the requester, not conference owner, isn't in the conference, the response will contain global information about conference and an empty participants list.
* If the conference is started and the requester, conference owner, isn't in the conference, the response will contain global information about conference and the requested set of participants.
* @return {Promise} the result of the operation. */ getTalkingTimeForAllPparticipantsInConference(roomId: string, limit?: number, offset?: number): Promise; /** * @public * @nodered true * @method joinConferenceV2 * @instance * @since 2.2.0 * @category Conference V2 * @param {string} bubbleId The id of the room. * @param {string} participantPhoneNumber Join through dial. * @param {string} country Country where the called number is from. If not provided, the user's country is taken. * @param {string} deskphone=false User joins conference through his deskphone. Default value : false * @param {Array} dc=["rdeu"] TURN server prefix information associated to client location (DC = Data Center). Default Value : ["rdeu"] * @param {string} mute=false Join as muted/unmuted. * @param {string} microphone=false Has client a microphone? * @param {Array} media=["video"] Requested media. Default value : ["video"] to let the bot join without audio. Possible value : "audio", "video" . * @param {string} resourceId Jabber resource identifier for webinar attendee. Default value : the internal xmpp resource used to connect server. * @async * @description * Adds a participant to a conference. In case of PSTN conference, the user will be called to the provided phone number (dial out).
* NOTE: The join done with audio media, need a webrtc stack because the server will close the connection after one minute if the media session is not up. * @return {Promise} the result of the operation. * * * | Champ | Type | Description | * | --- | --- | --- | * | data | Object | | * | jingleJid | String | WebRTC Gateway instance. | * | transportTurn optionnel | Boolean | If true, client must use 'relay' for 'iceTransportPolicy'. | * | gatewayPrefix optionnel | String | WebRTC Gateway prefix in case of deskphone. | * | gatewaySessionId optionnel | String | WebRTC Gateway session id in case of deskphone. | * | isAlreadyConnected optionnel | String | True if user is already connected. | * */ joinConferenceV2(bubbleId: string, participantPhoneNumber?: string, country?: string, deskphone?: boolean, dc?: Array, mute?: boolean, microphone?: boolean, media?: Array, resourceId?: string): Promise; /** * @public * @nodered true * @method pauseRecording * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * Pauses the recording of a conference.
* @return {Promise} the result of the operation. */ pauseRecording(roomId: string): Promise; /** * @public * @nodered true * @method resumeRecording * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * Resume the recording of a conference.
* @return {Promise} the result of the operation. */ resumeRecording(roomId: string): Promise; /** * @public * @nodered true * @method startRecording * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * Start the recording of a conference.
* @return {Promise} the result of the operation. * */ startRecording(roomId: string): Promise; /** * @public * @nodered true * @method stopRecording * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * Stop the recording of a conference.
* @return {Promise} the result of the operation. * */ stopRecording(roomId: string): Promise; /** * @public * @nodered true * @method rejectAVideoConference * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * User indicates that he rejects the conference (only available for WebRTC conferences).
* A XMPP message will be sent to all his clients in order for them to remove the incoming call popup.
* @return {Promise} the result of the operation. * */ rejectAVideoConference(roomId: string): Promise; /** * @public * @nodered true * @method startConferenceOrWebinarInARoom * @instance * @since 2.2.0 * @category Conference V2 * @param {string} bubbleId The id of the room. * @param {Object} services Requested service types. example: { "services": [ "video-compositor" ] } * @async * @description * The start command initiates a conference in a room.
* @return {Promise} the result of the operation. * */ startConferenceOrWebinarInARoom(bubbleId: string, services?: { "services": []; }): Promise; /** * @public * @nodered true * @method stopConferenceOrWebinar * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * The stop command terminates an active conference identified in a room. All currently connected participants are disconnected.
* Conference: Only a conference owner can stop it.
* Webinar: Any organizer can stop it.
* Practice room: Any organizer or speaker can stop it.
* Waiting room: Can't be stopped through API.
* @return {Promise} the result of the operation. * */ stopConferenceOrWebinar(roomId: string): Promise; /** * @public * @nodered true * @method subscribeForParticipantVideoStream * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} userId User identifier. * @param {string} media="video" [or audioVideo] Concerned media. The default value in the case of webinar is audio+video, else video.
* default value : video
* Authorized values : audio, video, audioVideo, sharing
* @param {number} subStreamLevel=0 Sub stream level (O=low, 2=high) to activate at startup. To be used only if simulcast is available on the publisher side.
* Authorized values : 0, 1, 2
* @param {boolean} dynamicFeed=false Declare a feed as dynamic. You will subscribe first to the feed associated to publisher, then switch to active talker's feed if present.
* Default value : false
* @async * @description * Gives the possibility to a user participating in a WebRTC conference to subscribe and receive a video stream published by an other user.
* @return {Promise} the result of the operation. * */ subscribeForParticipantVideoStream(roomId: string, userId: string, media?: string, subStreamLevel?: number, dynamicFeed?: boolean): Promise; /** * @public * @nodered true * @method updatePSTNParticipantParameters * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} phoneNumber Participant phone number. * @param {string} option="unmute" Mute/unmute the participant.
* Authorized values : mute, unmute * @async * @description * The update PSTN participant command can update different options of a participant. Only one option can be updated at a time.
* @return {Promise} the result of the operation. * */ updatePSTNParticipantParameters(roomId: string, phoneNumber: string, option?: string): Promise; /** * @public * @nodered true * @method updateConferenceParameters * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} option="unmute" Following options are available:
* Mute Mutes all participants, except requester.
* Unmute Unmutes all participants.
* Lock Disables any future participant from joining a conference.
* Unlock Unlocks the conference.
* Webinar Changes practice room into webinar.
* Authorized values : mute, unmute, lock, unlock, webinar
* @async * @description * The update conference command can update different options of a conference. Only one option can be updated at a time.
* @return {Promise} the result of the operation. * */ updateConferenceParameters(roomId: string, option?: string): Promise; /** * @public * @nodered true * @method updateParticipantParameters * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} userId Conference session participant identifier. * @param {string} option Mute/unmute the participant.
* Plug/unplug the microphone.
* Update some media parameters:
* Update media bandwidth as publisher. Two parameters must be present: media and bitRate.
* Update substream level as subscriber. One parameter must be present: subStreamLevel. Parameter publisherId is optional.
* Authorized values : mute, unmute, update, plug, unplug
* @param {string} media Media for which the bitrate will be updated. * Authorized values : video, sharing * @param {number} bitRate Maximum bitrate value in kbps. If 0, no limit of bandwidth usage. * Authorized values : 0..4096 * @param {number} subStreamLevel Substream level (only when simulcast is enabled). * Authorized values : 0, 1, 2 * @param {string} publisherId Publisher identifier for which the substream level will be updated (a user identifier). * @async * @description * The update participant command can update different options of a participant. Only one option can be updated at a time.
* @return {Promise} the result of the operation. * */ updateParticipantParameters(roomId: string, userId: string, option: string, media: string, bitRate: number, subStreamLevel: number, publisherId: string): Promise; /** * @public * @nodered true * @method allowTalkWebinar * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} userId User identifier.
* @async * @description * Webinar: allow a participant who raised his hand to talk.
* @return {Promise} the result of the operation. * */ allowTalkWebinar(roomId: string, userId: string): Promise; /** * @public * @nodered true * @method disableTalkWebinar * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} userId User identifier.
* @async * @description * Webinar: disable a participant who raised his hand to talk.
* @return {Promise} the result of the operation. * */ disableTalkWebinar(roomId: string, userId: string): Promise; /** * @public * @nodered true * @method lowerHandWebinar * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * Webinar: participant lowers hand.
* @return {Promise} the result of the operation. * */ lowerHandWebinar(roomId: string): Promise; /** * @public * @nodered true * @method raiseHandWebinar * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @async * @description * Webinar: participant raises hand.
* @return {Promise} the result of the operation. * */ raiseHandWebinar(roomId: string): Promise; /** * @public * @nodered true * @method stageDescriptionWebinar * @instance * @since 2.2.0 * @category Conference V2 * @param {string} roomId The id of the room. * @param {string} userId For each actor, his user identifier. * @param {string} type For each actor, how is he on scene: as a participant (avatar or video) or as a screen sharing.
* Authorized values : participant, sharing * @param {Array} properties For each actor, up to 10 properties. * @async * @description * Webinar: stage description (up to 10 actors).
* @return {Promise} the result of the operation. * */ stageDescriptionWebinar(roomId: string, userId: string, type: string, properties: Array): Promise; /** * @public * @nodered true * @method disableDialInForABubble * @instance * @since 2.21.0 * @category Bubbles - dialIn * @param {string} bubbleId The id of the room. * @async * @description * This API allows to disable dial in for a room.
* @return {Promise} the result of the operation. * * * | Champ | Type | Description | * | --- | --- | --- | * | dialInCode | String | Dial in code. | * */ disableDialInForABubble(bubbleId: string): Promise; /** * @public * @nodered true * @method enableDialInForABubble * @instance * @since 2.21.0 * @category Bubbles - dialIn * @param {string} bubbleId The id of the room. * @async * @description * This API allows enabling dial in for a room.
* @return {Promise} the result of the operation. * * * | Champ | Type | Description | * | --- | --- | --- | * | dialInCode | String | Dial in code. | * */ enableDialInForABubble(bubbleId: string): Promise; /** * @public * @nodered true * @method resetDialInCodeForABubble * @instance * @since 2.21.0 * @category Bubbles - dialIn * @param {string} bubbleId The id of the room. * @async * @description * This API allows resetting dial in code for a room.
* @return {Promise} the result of the operation. * * * | Champ | Type | Description | * | --- | --- | --- | * | dialInCode | String | Dial in code. | * */ resetDialInCodeForABubble(bubbleId: string): Promise; /** * @public * @nodered true * @method getDialInPhoneNumbersList * @instance * @since 2.21.0 * @category Bubbles - dialIn * @param {string} shortList Allows to display phoneNumbers of the user's country in a separate list (default true). * @async * @description * This API allows retrieving the list of phone numbers to join conference by Dial In.
* @return {Promise} the result of the operation. * * * | Champ | Type | Description | * | --- | --- | --- | * | country | String | User country (ISO 3166-1 alpha3 format) | * | language | String | User language (ISO 639-1 code format, with possibility of regional variation. Ex: both 'en' and 'en-US' are supported) | * | shortList | Object\[\] | When the user's country is known, show when exist phoneNumbers located in this country | * | location | String | Country and sometime a city | * | locationcode | String | ISO 3166 location code | * | number | String | Dialable phone number | * | numberE164 | String | Dialable phone number in E.164 format | * | numberType | String | Number free of charge or not, one of `local`, `lo-call`, `tollFree`, `other` | * | phoneNumberList | Object\[\] | List of phoneNumbers ranked by country in the user's language (default: en) | * | location | String | Country and sometime a city | * | locationcode | String | ISO 3166 location code | * | number | String | Dialable phone number | * | numberE164 | String | Dialable phone number in E.164 format | * | numberType | String | Number free of charge or not, one of `local`, `lo-call`, `tollFree`, `other` | * */ getDialInPhoneNumbersList(shortList: boolean): Promise; } export { Bubbles as BubblesService };