export {};
import { Conversation } from "../common/models/Conversation";
import { ConversationHistoryHandler } from "../connection/XMPPServiceHandler/conversationHistoryHandler";
import { Logger } from "../common/Logger";
import { EventEmitter } from "events";
import { Contact } from "../common/models/Contact";
import { Core } from "../Core";
import { Message } from "../common/models/Message";
import { Bubble } from "../common/models/Bubble";
import { GenericService } from "./GenericService";
import { DataStoreType } from "../config/config.js";
declare class ConversationsService extends GenericService {
    get conversationHistoryHandler(): ConversationHistoryHandler;
    get pendingMessages(): any;
    private _contactsService;
    private _fileStorageService;
    private _fileServerService;
    private _presenceService;
    private _pendingMessages;
    private _conversationEventHandler;
    private _conversationHandlerToken;
    private _conversationHistoryHandlerToken;
    conversations: any;
    private _conversationServiceEventHandler;
    private _bubblesService;
    activeConversation: any;
    inCallConversations: any;
    idleConversations: any;
    involvedContactIds: any;
    involvedRoomIds: any;
    waitingBotConversations: any;
    botServiceReady: any;
    private _conversationHistoryHandler;
    private conversationsRetrievedFormat;
    private nbMaxConversations;
    private autoLoadConversations;
    private autoLoadConversationHistory;
    private storeMessagesInConversation;
    get startConfig(): {
        start_up: boolean;
        optional: boolean;
    };
    static getClassName(): string;
    getClassName(): string;
    static getAccessorName(): string;
    getAccessorName(): string;
    constructor(_core: Core, _eventEmitter: EventEmitter, _logger: Logger, _startConfig: {
        start_up: boolean;
        optional: boolean;
    }, _conversationsRetrievedFormat: string, _nbMaxConversations: number, _autoLoadConversations: boolean, _autoLoadConversationHistory: boolean);
    start(_options: any): Promise<unknown>;
    stop(): Promise<unknown>;
    init(useRestAtStartup: boolean): Promise<void>;
    attachHandlers(): void;
    _onReceipt(receipt: any): Promise<void>;
    sortFunction(aa: any, bb: any): number;
    /**
     * @private
     * @method
     * @instance
     * @description
     * Get a pstn conference <br>
     */
    getRoomConferences(conversation: any): Promise<unknown>;
    /**
     * @private
     * @method
     * @instance
     * @description
     * Update a pstn conference <br>
     */
    updateRoomConferences(): void;
    /*********************************************************/
    /**                   MESSAGES STUFF                    **/
    /*********************************************************/
    /**
     * @public
     * @nodered true
     * @method ackAllMessages
     * @instance
     * @category MESSAGES
     * @description
     *    Mark all unread messages in the conversation as read. <br>
     * @param {string} conversationDbId ID of the conversation (dbId field)
     * @param {boolean} maskRead=false if true Im won't be shown as read on peer conversation side. Default value : false
     * @async
     * @return {Promise<Conversation[]>}
     * @fulfil {Conversation[]} - Array of Conversation object
     * @category async
     */
    ackAllMessages(conversationDbId: string, maskRead?: boolean): Promise<unknown>;
    resetHistoryPageForConversation(conversation: Conversation): void;
    /**
     * @public
     * @method getHistoryPage
     * @instance
     * @category MESSAGES
     * @description
     *    Retrieve the remote history of a specific conversation. <br>
     * @param {Conversation} conversation Conversation to retrieve
     * @param {number} size=30 Maximum number of element to retrieve
     * @param {boolean} useBulk=false Does the history should be retrieved with a bulk (group) of messages
     * @async
     * @return {Promise<Conversation[]>}
     * @fulfil {Conversation[]} - Array of Conversation object
     * @category async
     */
    getHistoryPage(conversation: Conversation, size?: number, useBulk?: boolean): Promise<any>;
    /**
     * @method getS2SMessagesByConversationId
     * @instance
     * @category MESSAGES
     * @description
     *   Retrieve the remote history of a specific conversation. <br>
     * @param {string} conversationId Id of conversation
     * @param {number} limit Maximum number of messages to return (0 for counting)
     * @param {number} before Get messages before this Epoch timestamp in microseconds
     * @param {number} after Get messages after this Epoch timestamp in microseconds
     * @returns {Promise<any>}
     * @fulfil {Pomise<any>} - result object
     * @category async     */
    getS2SMessagesByConversationId(conversationId: string, limit?: number, before?: number, after?: number): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method loadConversationHistory
     * @instance
     * @category MESSAGES
     * @async
     * @description
     *    Retrieve the remote history of a specific conversation. <br>
     * @param {Conversation} conversation Conversation to retrieve
     * @param {string} pageSize=30 number of message in each page to retrieve messages.
     * @param {boolean} useBulk=false Does the history should be retrieved with a bulk (group) of messages
     * @async
     * @return {Promise<Conversation[]>}
     * @fulfil {Conversation[]} - Array of Conversation object
     * @category async
     */
    loadConversationHistory(conversation: any, pageSize?: number, useBulk?: boolean): Promise<Conversation>;
    /**
     * @public
     * @nodered true
     * @method loadConversationHistoryAsync
     * @instance
     * @category MESSAGES
     * @description
     *    Retrieve the remote history of a specific conversation asynchronously. The result only said that the request has succesfully started (or not).
     *    </br>The result of the loading process is sent with the event `rainbow_onloadConversationHistoryCompleted`<br>
     * @param {Conversation} conversation Conversation to retrieve
     * @param {string} pageSize=30 number of message in each page to retrieve messages.
     * @param {boolean} useBulk=false Does the history should be retrieved with a bulk (group) of messages
     * @async
     * @return {Promise<{code:number,label:string}>}
     * @category async
     */
    loadConversationHistoryAsync(conversation: Conversation, pageSize?: number, useBulk?: boolean): Promise<{
        code: number;
        label: string;
    }>;
    /**
     * @private
     * @method getAllS2SMessagesByConversationId
     * @instance
     * @category MESSAGES
     * @description
     *    Retrieve the remote history of a specific conversation. <br>
     *
     *    ⚠️ Warning: It is useable in S2S connection mode.
     *
     * @param {string} conversationDbId dbId of the Conversation to retrieve messages.
     * @async
     * @return {Promise<any>}
     * @fulfil {Promise<any>} - Array of Conversation object
     * @category async
     */
    getAllS2SMessagesByConversationId(conversationDbId: string): Promise<any>;
    /**
     * @private
     * @method loadEveryConversationsHistory
     * @instance
     * @category MESSAGES
     * @description
     *    Retrieve the remote history of a specific conversation. <br>
     * @param {string} pageSize=30 number of message in each page to retrieve messages.
     * @param {boolean} useBulk=true Does the history should be retrieved with a bulk (group) of messages
     * @async
     * @return {Promise<Conversation[]>}
     * @fulfil {Conversation[]} - Array of Conversation object
     * @category async
     */
    loadEveryConversationsHistory(pageSize?: number, useBulk?: boolean): void;
    /**
     *
     * @public
     * @nodered true
     * @method getOneMessageFromConversationId
     * @instance
     * @category MESSAGES
     * @description
     *    To retrieve ONE message archived on server exchanged in a conversation based on the specified message Id and the timestamp <br>
     * <br>
     *    Time stamp is mandatory - the search is performed using it. <br>
     *    Once results are returned, we look for a message with the message id specified. <br>
     * @param {string} conversationId : Id of the conversation
     * @param {string} messageId : Id of the message
     * @param {string} stamp : Time stamp. Time stamp is mandatory - the search is performed using it.
     * @async
     * @return {Promise<any>}
     */
    getOneMessageFromConversationId(conversationId: string, messageId: string, stamp: string): Promise<Message>;
    /**
     * @public
     * @nodered true
     * @method getTheNumberOfHitsOfASubstringInAllUsersconversations
     * @instance
     * @category CONVERSATIONS
     * @async
     * @since 2.21.0
     * @return {Object} The result
     *
     *
     * | Champ | Type | Description |
     * | --- | --- | --- |
     * | jid | String | the JID of the peer (P2P, BOT or ROOM) |
     * | count | Integer | The number of hits |
     *
     * @description
     *          This API can be used to search a text substring in all conversations for a given user from recent to old messages. </br>
     *          For technical reasons, the same limit value applies on all peer to peer conversations but also on all room conversations. </br>
     *          This API can only be used by user himself (i.e. userId of logged-in user). </br>
     * @param {string} userId User unique identifier
     * @param {string} substring Text to search
     * @param {number} limit=100 Max number of matching messages count (expect up to 2x limit counts since the limit applies both to P2P and Room messages). Default value : 100
     * @param {boolean} webinar=true Include webinars (excluded by default). Default value : false
     */
    getTheNumberOfHitsOfASubstringInAllUsersconversations(userId: string, substring: string, limit?: number, webinar?: boolean): Promise<unknown>;
    /**
     *
     * @public
     * @nodered true
     * @method getContactsMessagesFromConversationId
     * @instance
     * @category MESSAGES
     * @description
     *    To retrieve messages exchanged by contacts in a conversation. The result is the messages without event type. <br>
     * @param {string} conversationId : Id of the conversation
     * @param {boolean} useBulk=false Does the history should be retrieved with a bulk (group) of messages
     * @async
     * @return {Promise<any>}
     */
    getContactsMessagesFromConversationId(conversationId: string, useBulk?: boolean): Promise<Message>;
    searchMessageArchivedFromServer(conversation: Conversation, messageId: string, stamp: string): Promise<any>;
    /**
     * @private
     * @method sendFSMessage
     * @instance
     * @category MESSAGES
     * @description
     *   Send an file sharing message <br>
     */
    sendFSMessage(conversation: any, file: any, data: any, p_messagesDataStore: DataStoreType): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method sendExistingFSMessage
     * @instance
     * @category MESSAGES
     * @description
     *    Send a message to this conversation <br>
     * @return {Message} The message sent
     * @param {Conversation} conversation
     * @param {string} message
     * @param {any} fileDescriptor
     * @param {DataStoreType} p_messagesDataStore=undefined used to override the general of SDK's parameter "messagesDataStore". default value `undefined` to use the general value.</br>
     * DataStoreType.NoStore Tell the server to NOT store the messages for delay distribution or for history of the bot and the contact.</br>
     * DataStoreType.NoPermanentStore Tell the server to NOT store the messages for history of the bot and the contact. But being stored temporarily as a normal part of delivery (e.g. if the recipient is offline at the time of sending).</br>
     * DataStoreType.StoreTwinSide The messages are fully stored.</br>
     * DataStoreType.UsestoreMessagesField to follow the storeMessages SDK's parameter behaviour.</br>
     * DataStoreType.Store Offline storage and Message Archive Management (XEP-0313) [4] can define their own rules on what messages to store and usually only store messages that contain a body element.
     * However a sender may want to indicate that a message is worth storing even though it might not match those rules
     * (e.g. an encrypted message that carries the payload outside the body element). Such a message can be marked with a <store/> hint.
     */
    sendExistingFSMessage(conversation: Conversation, message: string, fileDescriptor: any, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @private
     * @method
     * @instance
     * @category MESSAGES
     * @description
     *   Send an existing file sharing message <br>
     */
    /**
     * @private
     * @method
     * @instance
     * @category MESSAGES
     * @description
     *    Send a instant message to a conversation <br>
     *    This method works for sending messages to a one-to-one conversation or to a bubble conversation<br>
     * @param {Conversation} conversation The conversation to clean
     * @param {string} data Test message to send
     * @param answeredMsg
     */
    /**
     * SEND CORRECTED MESSAGE
     */
    /**
     * @public
     * @nodered true
     * @method sendCorrectedChatMessage
     * @category MESSAGES
     * @instance
     * @description
     *    Send a corrected message to a conversation <br>
     *    This method works for sending messages to a one-to-one conversation or to a bubble conversation<br>
     *    The new message has the property originalMessageReplaced which spot on original message // Warning this is a circular depend. <br>
     *    The original message has the property replacedByMessage  which spot on the new message // Warning this is a circular depend. <br>
     *    Note: The connected user must be the sender of the original message. <br>
     * @param {Conversation} conversation
     * @param {string} data The message string corrected
     * @param {string} origMsgId The id of the original corrected message.
     * @param {Object} content Allows to send alternative text base content
     * @param {String} content.type The content message type `text/markdown`
     * @param {String} content.message The content message body
     * @param {string} urgency=std The urgence of the message. Value can be :   'high' Urgent message, 'middle' important message, 'low' information message, "std' or null standard message
     * @param {DataStoreType} p_messagesDataStore=undefined used to override the general of SDK's parameter "messagesDataStore". default value `undefined` to use the general value.</br>
     * DataStoreType.NoStore Tell the server to NOT store the messages for delay distribution or for history of the bot and the contact.</br>
     * DataStoreType.NoPermanentStore Tell the server to NOT store the messages for history of the bot and the contact. But being stored temporarily as a normal part of delivery (e.g. if the recipient is offline at the time of sending).</br>
     * DataStoreType.StoreTwinSide The messages are fully stored.</br>
     * DataStoreType.UsestoreMessagesField to follow the storeMessages SDK's parameter behaviour.</br>
     * DataStoreType.Store Offline storage and Message Archive Management (XEP-0313) [4] can define their own rules on what messages to store and usually only store messages that contain a body element.
     * However a sender may want to indicate that a message is worth storing even though it might not match those rules
     * (e.g. an encrypted message that carries the payload outside the body element). Such a message can be marked with a <store/> hint.
     * @returns {Promise<string>} message the message new correction message sent. Throw an error if the send fails.
     */
    sendCorrectedChatMessage(conversation: Conversation, data: string, origMsgId: string, content?: {
        message: string;
        type: string;
    }, urgency?: string, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @public
     * @since 1.58
     * @nodered true
     * @method deleteMessage
     * @category MESSAGES
     * @instance
     * @async
     * @description
     *    Delete a message by sending an empty string in a correctedMessage <br>
     * @param {Conversation} conversation The conversation object
     * @param {string} messageId The id of the message to be deleted
     * @param {DataStoreType} p_messagesDataStore=undefined used to override the general of SDK's parameter "messagesDataStore". default value `undefined` to use the general value.</br>
     * DataStoreType.NoStore Tell the server to NOT store the messages for delay distribution or for history of the bot and the contact.</br>
     * DataStoreType.NoPermanentStore Tell the server to NOT store the messages for history of the bot and the contact. But being stored temporarily as a normal part of delivery (e.g. if the recipient is offline at the time of sending).</br>
     * DataStoreType.StoreTwinSide The messages are fully stored.</br>
     * DataStoreType.UsestoreMessagesField to follow the storeMessages SDK's parameter behaviour.</br>
     * DataStoreType.Store Offline storage and Message Archive Management (XEP-0313) [4] can define their own rules on what messages to store and usually only store messages that contain a body element.
     * However a sender may want to indicate that a message is worth storing even though it might not match those rules
     * (e.g. an encrypted message that carries the payload outside the body element). Such a message can be marked with a <store/> hint.</br>
     * @return {Message} - message object with updated replaceMsgs property
     */
    deleteMessage(conversation: Conversation, messageId: string, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     *
     * @public
     * @since 1.67.0
     * @nodered true
     * @method deleteAllMessageInOneToOneConversation
     * @category MESSAGES
     * @instance
     * @async
     * @description
     *   Delete all messages for the connected user on a one to one conversation. <br>
     * @param {Conversation} conversation The conversation object
     * @return {Message} - message object with updated replaceMsgs property
     */
    deleteAllMessageInOneToOneConversation(conversation: Conversation): Promise<unknown>;
    /**
     * @private
     * @category MESSAGES
     * @description
     *      Store the message in a pending list. This pending list is used to wait the "_onReceipt" event from server when a message is sent. <br>
     *      It allow to give back the status of the sending process. <br>
     * @param conversation
     * @param message
     */
    storePendingMessage(conversation: any, message: any): void;
    /**
     * @private
     * @category MESSAGES
     * @description
     *      delete the message in a pending list. This pending list is used to wait the "_onReceipt" event from server when a message is sent. <br>
     *      It allow to give back the status of the sending process. <br>
     * @param message
     */
    removePendingMessage(message: any): void;
    /**
     * @public
     * @nodered true
     * @method removeAllMessages
     * @category MESSAGES
     * @instance
     * @description
     *    Cleanup a conversation by removing all previous messages<br>
     *
     *    If conversation is P2P then the messages are deleted on Bot side.
     *
     *    This method returns a promise <br>
     * @param {Conversation} conversation The conversation to clean
     * @async
     * @return {Promise}
     * @fulfil {} Return nothing in case success
     * @category async
     */
    removeAllMessages(conversation: Conversation): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method removeMessagesFromConversation
     * @category MESSAGES
     * @instance
     * @description
     *    Remove a specific range of message in a conversation<br>
     *    This method returns a promise <br>
     * @param {Conversation} conversation The conversation to clean
     * @param {Date} date The date since when the message should be deleted.
     * @param {number} number max number of messages to delete.
     * @async
     * @return {Promise}
     * @fulfil {} Return nothing in case success
     * @category async
     */
    removeMessagesFromConversation(conversation: Conversation, date: Date, number: number): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method sendIsTypingState
     * @category MESSAGES
     * @instance
     * @description
     *    Switch the "is typing" state in a conversation<br>
     * @param {Conversation} conversation The conversation recipient
     * @param {boolean} status=false The status, true for setting "is Typing", false to remove it. Default Value : false.
     * @param {DataStoreType} p_messagesDataStore=undefined used to override the general of SDK's parameter "messagesDataStore". default value `undefined` to use the general value.</br>
     * DataStoreType.NoStore Tell the server to NOT store the messages for delay distribution or for history of the bot and the contact.</br>
     * DataStoreType.NoPermanentStore Tell the server to NOT store the messages for history of the bot and the contact. But being stored temporarily as a normal part of delivery (e.g. if the recipient is offline at the time of sending).</br>
     * DataStoreType.StoreTwinSide The messages are fully stored.</br>
     * DataStoreType.UsestoreMessagesField to follow the storeMessages SDK's parameter behaviour.</br>
     * DataStoreType.Store Offline storage and Message Archive Management (XEP-0313) [4] can define their own rules on what messages to store and usually only store messages that contain a body element.
     * However a sender may want to indicate that a message is worth storing even though it might not match those rules
     * (e.g. an encrypted message that carries the payload outside the body element). Such a message can be marked with a <store/> hint.</br>
     * @return a promise with no success parameter
     */
    sendIsTypingState(conversation: Conversation, status: boolean, p_messagesDataStore: DataStoreType): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method updateConversationBookmark
     * @instance
     * @category MESSAGES
     * @async
     * @since 2.21.0
     * @return {Object} The result
     *
     *
     * | Champ | Type | Description |
     * | --- | --- | --- |
     * | status | String | Status message. |
     * | data | Object\[\] | No data (empty Array) |
     *
     * @description
     *          This API can be used to set or replace a bookmarked message in a conversation. This API can only be used by user himself. </br>
     * @param {string} userId User unique identifier.
     * @param {string} conversationId conversation unique identifier (the dbId property in Conversation).
     * @param {string} messageId message unique identifier.
     */
    updateConversationBookmark(userId: string, conversationId: string, messageId: string): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method deleteConversationBookmark
     * @instance
     * @category MESSAGES
     * @async
     * @since 2.21.0
     * @return {Object} The result
     *
     *
     * | Champ | Type | Description |
     * | --- | --- | --- |
     * | status | String | Status message. |
     * | data | Object\[\] | No data (empty Array) |
     *
     * @description
     *          This API can be used to set or replace a bookmarked message in a conversation. This API can only be used by user himself. </br>
     * @param {string} userId User unique identifier.
     * @param {string} conversationId conversation unique identifier (the dbId property in Conversation).
     */
    deleteConversationBookmark(userId: string, conversationId: string): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method showAllMatchingMessagesForAPeer
     * @since 2.21.0
     * @instance
     * @category MESSAGES
     * @description
     * This API can be used to return all matching messages for one specific peer. This API can only be used by user himself. <br>
     * @return {Promise<any>} An object of the result
     *
     *
     * | Champ | Type | Description |
     * | --- | --- | --- |
     * | timestamp | Integer | Message timestamp in microseconds |
     * | msgId | String | The message ID |
     *
     * @param {string} userId User unique identifier
     * @param {string} substring Text to search
     * @param {string} peer Peer JID
     * @param {boolean} isRoom Is the peer a room ?
     * @param {number} limit=20 Max number of matching messages references. Default value : 20
     */
    showAllMatchingMessagesForAPeer(userId: string, substring: string, peer: string, isRoom?: boolean, limit?: number): Promise<unknown>;
    /**
 * @public
     * @nodered true
     * @method getAllConversations
 * @category CONVERSATIONS
 * @instance
 * @description
 *    Allows to get the list of existing conversations (p2p and bubbles) <br>
 * @return {Conversation[]} An array of Conversation object
 */
    getAllConversations(): any[];
    /**
     * @private
     * @method
     * @category CONVERSATIONS
     * @instance
     * @description
     *      Get all conversation <br>
     * @return {Conversation[]} The conversation list to retrieve
     */
    getConversations(): any[];
    /**
     * @public
     * @nodered true
     * @method openConversationForContact
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Open a conversation to a contact <br>
     *    Create a new one if the conversation doesn't exist or reopen a closed conversation<br>
     *    This method returns a promise <br>
     * @param {Contact} contact The contact involved in the conversation
     * @return {Conversation} The conversation (created or retrieved) or null in case of error
     */
    openConversationForContact(contact: Contact): Promise<Conversation>;
    /**
     * @public
     * @nodered true
     * @method openConversationForBubble
     * @since 1.65
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Open a conversation to a bubble <br>
     *    Create a new one if the conversation doesn't exist or reopen a closed conversation<br>
     *    This method returns a promise <br>
     * @param {Bubble} bubble The bubble involved in this conversation
     * @return {Promise<Conversation>} The conversation (created or retrieved) or null in case of error
     */
    openConversationForBubble(bubble: Bubble): Promise<Conversation>;
    /**
     * @public
     * @nodered true
     * @method getS2SServerConversation
     * @since 1.65
     * @category CONVERSATIONS
     * @instance
     * @description
     *    get a conversation from id on S2S API Server.<br>
     *    This method returns a promise <br>
     * @param {string} conversationId The id of the conversation to find.
     * @return {Conversation} The conversation (created or retrieved) or null in case of error
     */
    getS2SServerConversation(conversationId: string): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method deleteServerConversation
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Allows to delete a conversation on server (p2p and bubbles) <br>
     * @param {string} conversationId of the conversation (id field)
     * @return {Promise}
     */
    deleteServerConversation(conversationId: string): Promise<any>;
    /**
     * @private
     * @method
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Allows to mute notification in a conversations (p2p and bubbles) <br>
     *    When a conversation is muted/unmuted, all user's resources will receive the notification <br>
     * @param {string} conversationId ID of the conversation (dbId field)
     * @param {Boolean} mute mutation state
     * @return {Promise}
     */
    updateServerConversation(conversationId: string, mute: boolean): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendConversationByEmail
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Allows to get the specified conversation as mail attachment to the login email of the current user (p2p and bubbles) <br>
     *    can be used to backup a conversation between a rainbow user and another one, or between a user and a room, <br>
     *    The backup of the conversation is restricted to a number of days before now. By default the limit is 30 days. <br>
     * @param {string} conversationDbId ID of the conversation (dbId field)
     * @param {Array<string>} emails Allows to send the backup to users from an emails list.</BR> When one email matchs with a Rainbow user loginEmail, the mail sent is localized using this user's language.
     * @param {string} lang="en" Language of the email notification if user language value is not available (for no Rainbow users). Default value : en
     * @async
     * @return {Promise<Conversation[]>}
     * @fulfil {Conversation[]} - Array of Conversation object
     * @category async
     */
    sendConversationByEmail(conversationDbId: string, emails?: Array<string>, lang?: string): Promise<unknown>;
    /**
     * @private
     * @method
     * @category CONVERSATIONS
     * @instance
     */
    getOrCreateOneToOneConversation(conversationId: string, conversationDbId?: string, lastModification?: string, lastMessageText?: string, missedIMCounter?: number, muted?: boolean, creationDate?: string): Promise<Conversation>;
    /**
     * @public
     * @nodered true
     * @method getConversationById
     * @category CONVERSATIONS
     * @instance
     * @description
     *      Get a p2p conversation by id <br>
     * @param {string} conversationId Conversation id of the conversation to clean
     * @return {Conversation} The conversation to retrieve
     */
    getConversationById(conversationId: string): any;
    /**
     * @public
     * @nodered true
     * @method getConversationByDbId
     * @category CONVERSATIONS
     * @instance
     * @description
     *      Get a conversation by db id <br>
     * @param {string} dbId db id of the conversation to retrieve
     * @return {Conversation} The conversation to retrieve
     */
    getConversationByDbId(dbId: string): any;
    /**
     * @public
     * @nodered true
     * @method getConversationByBubbleId
     * @category CONVERSATIONS
     * @instance
     * @description
     *      Get a bubble conversation by bubble id <br>
     * @param {string} bubbleId Bubble id of the conversation to retrieve
     * @return {Conversation} The conversation to retrieve
     */
    getConversationByBubbleId(bubbleId: string): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method getConversationByBubbleJid
     * @category CONVERSATIONS
     * @instance
     * @description
     *      Get a bubble conversation by bubble id <br>
     * @param {string} bubbleJid Bubble jid of the conversation to retrieve
     * @return {Conversation} The conversation to retrieve
     */
    getConversationByBubbleJid(bubbleJid: string): any;
    /**
     * @public
     * @nodered true
     * @method getBubbleConversation
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Get a conversation associated to a bubble (using the bubble ID to retrieve it) <br>
     * @param {string} bubbleJid JID of the bubble (dbId field)
     * @param {string} conversationDbId
     * @param {Date} lastModification
     * @param {string} lastMessageText
     * @param {number} missedIMCounter
     * @param {boolean} noError
     * @param {boolean} muted
     * @param {Date} creationDate
     * @param {string} lastMessageSender
     * @async
     * @return {Promise<Conversation>}
     * @fulfil {Conversation} - Conversation object or null if not found
     * @category async
     */
    getBubbleConversation(bubbleJid: string, conversationDbId?: string, lastModification?: Date, lastMessageText?: string, missedIMCounter?: number, noError?: boolean, muted?: boolean, creationDate?: Date, lastMessageSender?: string): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method closeConversation
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Close a conversation <br>
     *    This method returns a promise <br>
     * @param {Conversation} conversation The conversation to close
     * @async
     * @return {Promise}
     * @fulfil {} Return nothing in case success
     * @category async
     */
    closeConversation(conversation: Conversation): Promise<unknown>;
    /**
     * @private
     * @method
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Remove locally a conversation <br>
     *    This method returns a promise <br>
     * @param {Conversation} conversation The conversation to remove
     */
    removeConversation(conversation: Conversation): void;
    /**
     * @public
     * @nodered true
     * @method cleanConversations
     * @category CONVERSATIONS
     * @instance
     * @async
     * @description
     *    Allows to clean openned conversations. It keep openned the maxConversations last modified conversations. If maxConversations is not defined then keep the last 15 conversations. <br>
     * @return {Promise<any>} the result of the deletion.
     * @category async
     */
    cleanConversations(): Promise<unknown>;
    /**
     * @private
     * @method
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Allows to get the list of existing conversations from server (p2p and bubbles) <br>
     * @return {Conversation[]} An array of Conversation object
     */
    getServerConversations(): Promise<unknown>;
    /**
     * @private
     * @method
     * @category CONVERSATIONS
     * @instance
     * @description
     *    Allows to create a conversations on server (p2p and bubbles) <br>
     * @param {Conversation} conversation of the conversation (dbId field)
     * @param {boolean} mute=false The true value when conversation is muted, false otherwise. Default value : false.
     * @return {Conversation} Created conversation object
     */
    createServerConversation(conversation: Conversation, mute?: boolean): Promise<Conversation>;
    removeOlderConversations(conversations?: []): Promise<unknown>;
    /**
     * @private
     */
    onRoomChangedEvent(__event: any, bubble: any, action: any): Promise<void>;
    /**
     * @private
     */
    /**
     * @private
     */
    /*********************************************************************/
    /** Remove the conversation history                                 **/
    /*********************************************************************/
    /**
     * @private
     *
     */
    reinit(): Promise<unknown>;
    /*********************************************************************/
    /** BOT SERVICE IS RUNNING, CREATE ALL BOT CONVERSATIONS            **/
    /*********************************************************************/
    unlockWaitingBotConversations(isBotServiceReady?: any): void;
}
export { ConversationsService as ConversationsService };
