import { Conversation, PEERTYPE } from "../common/models/Conversation";
import { Logger } from "../common/Logger";
import { EventEmitter } from "events";
import { Core } from "../Core";
import { GenericService } from "./GenericService";
import { Message } from "../common/models/Message";
import { DataStoreType, UrgencyType } from "../config/config.js";
import { Bubble } from "../common/models/Bubble.js";
import { Contact } from "../common/models/Contact.js";
export {};
declare class ImsService extends GenericService {
    private _conversations;
    private _pendingMessages;
    private _bulles;
    private _imOptions;
    private _fileStorage;
    private _presence;
    static getClassName(): string;
    getClassName(): string;
    static getAccessorName(): string;
    getAccessorName(): string;
    constructor(_core: Core, _eventEmitter: EventEmitter, _logger: Logger, _imOptions: any, _startConfig: {
        start_up: boolean;
        optional: boolean;
    });
    start(_options: any): Promise<unknown>;
    stop(): Promise<unknown>;
    init(enableCarbonBool: boolean, useRestAtStartup: boolean): Promise<void>;
    /**
     * @private
     * @method enableCarbon
     * @instance
     * @description
     *      Enable message carbon XEP-0280 <br>
     * @async
     * @category Ims MANAGEMENT
     * @return {Promise}
     * @fulfil {} return nothing in case of success or an ErrorManager Object depending the result
    
     */
    enableCarbon(): Promise<unknown>;
    /**
     * @private
     * @method disableCarbon
     * @instance
     * @description
     *      Disable message carbon XEP-0280 <br>
     * @async
     * @category Ims MANAGEMENT
     * @return {Promise}
     * @fulfil {} return nothing in case of success or an ErrorManager Object depending the result
    
     */
    disableCarbon(): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @since 1.39
     * @method getMessagesFromConversation
     * @instance
     * @description
     *    <b>(beta)</b> Retrieve the list of messages from a conversation <br>
     *    Calling several times this method will load older message from the history (pagination) <br>
     * @param {Conversation} conversation The conversation
     * @param {number} intNbMessage=30 The number of messages to retrieve. Optional. Default value is 30. Maximum value is 100
     * @async
     * @category Ims MESSAGES
     * @return {Promise<Conversation, ErrorManager>}
     * @fulfil {Conversation, ErrorManager} Return the conversation updated with the list of messages requested or an error (reject) if there is no more messages to retrieve
    
     */
    getMessagesFromConversation(conversation: Conversation, intNbMessage?: number): Promise<any>;
    /**
     * @public
     * @nodered true
     * @since 1.39
     * @method getMessageFromConversationById
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *    <b>(beta)</b> Retrieve a specific message in a conversation using its id <br>
     * @param {Conversation} conversation The conversation where to search for the message
     * @param {string} strMessageId The message id
     * @return {Message} The message if found or null
     */
    getMessageFromConversationById(conversation: Conversation, strMessageId: string): Promise<any>;
    /**
     * @public
     * @nodered true
     * @since 1.39
     * @method getMessageFromBubbleById
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *    Retrieve a specific message in a bubble using its id <br>
     * @param {Bubble} bubble The bubble where to search for the message
     * @param {string} strMessageId The message id
     * @return {Message} The message if found or null
     */
    getMessageFromBubbleById(bubble: Bubble, strMessageId: string): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method markMessageAsRead
     * @instance
     * @description
     *  Send a 'read' receipt to the recipient <br>
     * @param {Message} messageReceived The message received to mark as read
     * @async
     * @category Ims MESSAGES
     * @return {Promise}
     * @fulfil {} return nothing in case of success or an ErrorManager Object depending the result
    
     */
    markMessageAsRead(messageReceived: Message): Promise<any>;
    /**
     * @public
     * @nodered true
     * @since 1.39
     * @method sendMessageToConversation
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *    <b>(beta)</b> 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 recipient
     * @param {string} message The message to send
     * @param {string} lang=en The content language used
     * @param {Object} content Allow 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} subject The message subject
     * @param {UrgencyType} urgency=null The urgence of the message. String 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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} the message sent, or null in case of error, as parameter of the resolve

     */
    sendMessageToConversation(conversation: Conversation, message: string, lang: string, content: any, subject: string, urgency?: UrgencyType, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendMessageToContact
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *  Send a one-2-one message to a contact <br>
     * @param {string} message The message to send
     * @param {Contact} contact The contact (should have at least a jid_im property)
     * @param {string} lang=en The content language used
     * @param {Object} content Allow 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} subject The message subject
     * @param {UrgencyType} urgency=null The urgence of the message. String 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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} the message sent, or null in case of error, as parameter of the resolve

     */
    sendMessageToContact(message: string, contact: Contact, lang: string, content: any, subject: string, urgency?: UrgencyType, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @private
     * @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
     */
    /**
     * @private
     * @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
     */
    /**
     * @public
     * @nodered true
     * @method sendMessageToJid
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *  Send a one-2-one message to a contact identified by his Jid <br>
     * @param {string} message The message to send
     * @param {string} jid The contact Jid
     * @param {string} lang=en The content language used
     * @param {Object} content Allow 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} subject The message subject
     * @param {UrgencyType} urgency=null The urgence of the message. String 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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} - the message sent, or null in case of error, as parameter of the resolve
     */
    sendMessageToJid(message: string, jid: string, lang: string, content: any, subject: string, urgency?: UrgencyType, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendMessageToJidAnswer
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *  Send a reply to a one-2-one message to a contact identified by his Jid <br>
     * @param {string} message The message to send
     * @param {string} jid The contact Jid
     * @param {string} lang=en The content language used
     * @param {Object} content Allow 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} subject The message subject
     * @param {Object} answeredMsg The message answered
     * @param {UrgencyType} urgency=null The urgence of the message. String 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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} - the message sent, or null in case of error, as parameter of the resolve

     */
    sendMessageToJidAnswer(message: string, jid: string, lang: string, content: any, subject: string, answeredMsg: any, urgency?: UrgencyType, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendMessageToJidAcknowledged
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *  Send an Acknowledged reply to an urgent message (one to one, or bubble) <br>
     * @param {Message} message The message to acknoledge
     * @param {string} lang="EN" the lang used to acknowledged the message.
     * @param {string} ackLabel="Acknowledged" the label used to acknowledged the message.
     * @param {Array<string>} attention=null array containing a list of JID of contact to mention or a string containing a sigle JID of the contact.
     * @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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} - the message
     */
    sendMessageToJidAcknowledged(message: Message, lang?: string, ackLabel?: string, attention?: Array<string>, p_messagesDataStore?: DataStoreType): Promise<void>;
    /**
     * @public
     * @nodered true
     * @method sendMessageToJidIgnored
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *  Send an Ignored reply to an urgent message (one to one, or bubble) <br>
     * @param {Message} message The message to Ignored
     * @param {string} lang="EN" the lang used to ignore the message.
     * @param {string} ignLabel="Ignored" the label used to ignore the 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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} - the message
     */
    sendMessageToJidIgnored(message: Message, lang?: string, ignLabel?: string, p_messagesDataStore?: DataStoreType): Promise<void>;
    /**
     * @public
     * @nodered true
     * @method sendMessageToBubble
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *  Send a message to a bubble <br>
     * @param {string} message The message to send
     * @param {Bubble} bubble The bubble (should at least have a jid property)
     * @param {string} lang=en The content language used
     * @param {Object} content Allow 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} subject The message subject
     * @param {Array<string>} mentions=null array containing a list of JID of contact to mention or a string containing a single JID of the contact.
     * @param {UrgencyType} urgency=null The urgence of the message. String value can be :   'high' Urgent message, 'middle' important message, 'low' information message, "std' or null standard message
     * @param {DataStoreType} p_messagesDataStore=urgency  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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} the message sent, or null in case of error, as parameter of the resolve
     */
    sendMessageToBubble(message: string, bubble: Bubble, lang: string, content: any, subject: string, mentions?: Array<string> | string, urgency?: UrgencyType, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendMessageToBubbleJid
     * @instance
     * @async
     * @category Ims MESSAGES
     * @description
     *  Send a message to a bubble identified by its JID <br>
     * @param {string} message The message to send
     * @param {string} jid The bubble JID
     * @param {string} lang=en The content language used
     * @param {Object} content Allow 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} subject The message subject
     * @param {Array<string>} mentions=null array containing a list of JID of contact to mention or a string containing a sigle JID of the contact.
     * @param {UrgencyType} urgency=null The urgence of the message. String 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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} the message sent, or null in case of error, as parameter of the resolve
     */
    sendMessageToBubbleJid(message: string, jid: string, lang: string, content: any, subject: string, mentions?: Array<any> | string, urgency?: UrgencyType, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendMessageToBubbleJidAnswer
     * @async
     * @category Ims MESSAGES
     * @instance
     * @description
     *  Send a message to a bubble identified by its JID <br>
     * @param {string} message The message to send
     * @param {string} jid The bubble JID
     * @param {string} lang=en The content language used
     * @param {Object} content Allow 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} subject The message subject
     * @param {Object} answeredMsg The message answered
     * @param {Array<string>} mentions=null array containing a list of JID of contact to mention or a string containing a sigle JID of the contact.
     * @param {UrgencyType} urgency=null The urgence of the message. String 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.
     * @return {Promise<Message, ErrorManager>}
     * @fulfil {Message} the message sent, or null in case of error, as parameter of the resolve
     */
    sendMessageToBubbleJidAnswer(message: string, jid: string, lang: string, content: any, subject: string, answeredMsg: any, mentions?: Array<string> | string, urgency?: UrgencyType, p_messagesDataStore?: DataStoreType): Promise<any>;
    /**
     * @public
     * @nodered true
     * @since 2.21.0
     * @method retrieveXMPPMessagesByListOfMessageIds
     * @category Ims MESSAGES
     * @instance
     * @description
     *   This API allow user to retrieve it's ims by list of message Ids, peer and peer type <br>
     *       If message cannot be retrieved response will return status not found. <br>
     * @return {Promise<any>} The result
     *
     *
     * | Champ | Type | Description |
     * | --- | --- | --- |
     * | data | Object\[\] | list of retrieved message |
     * | msgId | String | xmpp id of the message |
     * | peer | String | peer jid with which message has been exchanged |
     * | status optionnel | String | request status<br><br>* unchanged: When XMPP server message copy has the same hash,<br>* not_found: When message was not found, |
     * | xml optionnel | String | message content if message has been successfully retrieved (not present if message was status unchanged) |
     * | hash optionnel | String | message hash if message has been successfully retrieved (not present if message was status unchanged) |
     * | timestamp optionnel | String | message timestamp if message has been successfully retrieved (not present if message was status unchanged) |
     *
     * @param {Array<any>} ims     list of object that contains the following: </BR>
     * [{ </BR>
     * **peer** : string jid with which message has been exchanged </BR>
     * **msgId** : string xmpp message id of the message to retrieve </BR>
     * **hash** optionnel : string md5 hash of the message to retrieve If hash is specified response will return status unchanged if XMPP message copy has the same hash Client should use hash whenever possible to reduce response size </BR>
     * **type** : string Conversation type: </BR>
     * - user: User to user, </BR>
     * - room: User to room, </BR>
     * - bot: User to bot </BR>
     * Possibles values : "user", "room", "bot" </BR>
     * }] </BR>
     *
     */
    retrieveXMPPMessagesByListOfMessageIds(ims: Array<any>): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @since 2.33.0
     * @method addPinWithPeerId
     * @category Ims MESSAGES Pin list
     * @instance
     * @description
     *   This API can be used to add a pin in user's Pins list with peerId.<br>
     *   This API can only be used by user himself<br>
     *
     * @param {string} peerId peerId unique identifier</BR>
     * @param {PEERTYPE} types type of peer id Valeurs autorisées : rooms, users
     * @param {Object} body Pin List Object.
     *
     * @return {Promise<any>} The result
     *
     *
     * | Champ            | Type   | Description                                  |
     * |-----------------|--------|----------------------------------------------|
     * | `peerId`        | String | Id of the conversation's peer.              |
     * | `peerJid`       | String | Jid of the conversation's peer.             |
     * | `conversationJid` | String | Jid of the conversation's peer.          |
     * | `messageId`     | String | XMPP message Id.                            |
     * | `messageTimestamp` | Number | Timestamp of the message.               |
     * | `text`          | String | Pin's text.                                 |
     * | `fileInfo` *(optionnel)* | Object | File information.              |
     * | `creationDate` *(optionnel)* | Number | Creation date in ms since Unix epoch. |
     * |  id 	                  | String | Pin's Id                       |
     *
     *
     */
    addPinWithPeerId(peerId: string, types: PEERTYPE, body: any): Promise<any>;
    /**
     * @public
     * @nodered true
     * @since 2.33.0
     * @method getPinWithPeerIdById
     * @category Ims MESSAGES Pin list
     * @instance
     * @description
     *   This API can be used to get a pin in user's Pins list by peerId and pinId.<br>
     *   This API can only be used by user himself<br>
     *
     * @param {PEERTYPE} types type of peer id Valeurs autorisées : rooms, users
     * @param {string} peerId peerId unique identifier</BR>
     * @param {string} pinId id of Pin.
     *
     * @return {Promise<any>} The result
     *
     *
     * | Champ            | Type   | Description                                  |
     * |-----------------|--------|----------------------------------------------|
     * | `peerId`        | String | Id of the conversation's peer.              |
     * | `peerJid`       | String | Jid of the conversation's peer.             |
     * | `conversationJid` | String | Jid of the conversation's peer.          |
     * | `messageId`     | String | XMPP message Id.                            |
     * | `messageTimestamp` | Number | Timestamp of the message.               |
     * | `text`          | String | Pin's text.                                 |
     * | `fileInfo` *(optionnel)* | Object | File information.              |
     * | `creationDate` *(optionnel)* | Number | Creation date in ms since Unix epoch. |
     * |  id 	                  | String | Pin's Id                       |
     *
     *
     */
    getPinWithPeerIdById(types: PEERTYPE, peerId: string, pinId: string): Promise<any>;
    /**
     * @public
     * @nodered true
     * @since 2.33.0
     * @method getAllPinsWithPeerId
     * @category Ims MESSAGES Pin list
     * @instance
     * @description
     *   This API can be used to get all pin in user's Pins list by peerId.<br>
     *   This API can only be used by user himself<br>
     *
     * @param {PEERTYPE} types type of peer id Valeurs autorisées : rooms, users
     * @param {string} peerId peerId unique identifier</BR>
     *
     * @return {Promise<any>} The result
     *
     * Array of pin Object : </BR>
     *
     * | Champ            | Type   | Description                                  |
     * |-----------------|--------|----------------------------------------------|
     * | `peerId`        | String | Id of the conversation's peer.              |
     * | `peerJid`       | String | Jid of the conversation's peer.             |
     * | `conversationJid` | String | Jid of the conversation's peer.          |
     * | `messageId`     | String | XMPP message Id.                            |
     * | `messageTimestamp` | Number | Timestamp of the message.               |
     * | `text`          | String | Pin's text.                                 |
     * | `fileInfo` *(optionnel)* | Object | File information.              |
     * | `creationDate` *(optionnel)* | Number | Creation date in ms since Unix epoch. |
     * |  id 	                  | String | Pin's Id                       |
     *
     *
     */
    getAllPinsWithPeerId(types: PEERTYPE, peerId: string): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @since 2.33.0
     * @method removefromWithPeerIdAndPinId
     * @category Ims MESSAGES Pin list
     * @instance
     * @description
     *   This API can be used to remove a pin in user's Pins list by peerId and pinId.<br>
     *   This API can only be used by user himself<br>
     *
     * @param {PEERTYPE} types type of peer id Valeurs autorisées : rooms, users
     * @param {string} peerId peerId unique identifier</BR>
     * @param {string} pinId id of Pin.
     *
     * @return {Promise<any>} The result
     *
     * Array of : </BR>
     *
     * | Champ            | Type   | Description                                  |
     * |-----------------|--------|----------------------------------------------|
     * | status 	     | String | deletion status.              |
     *
     *
     */
    removefromWithPeerIdAndPinId(types: PEERTYPE, peerId: string, pinId: string): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @since 2.33.0
     * @method updatePinWithPeerId
     * @category Ims MESSAGES Pin list
     * @instance
     * @description
     *   This API can be used to add a pin in user's Pins list with peerId.<br>
     *   This API can only be used by user himself<br>
     *
     * @param {string} peerId peerId unique identifier</BR>
     * @param {PEERTYPE} types type of peer id Valeurs autorisées : rooms, users
     * @param {string} pinId id of Pin.
     * @param {Object} body Pin List Object.
     *
     * @return {Promise<any>} The result
     *
     *
     * | Champ            | Type   | Description                                  |
     * |-----------------|--------|----------------------------------------------|
     * | `peerId`        | String | Id of the conversation's peer.              |
     * | `peerJid`       | String | Jid of the conversation's peer.             |
     * | `conversationJid` | String | Jid of the conversation's peer.          |
     * | `messageId`     | String | XMPP message Id.                            |
     * | `messageTimestamp` | Number | Timestamp of the message.               |
     * | `text`          | String | Pin's text.                                 |
     * | `fileInfo` *(optionnel)* | Object | File information.              |
     * | `creationDate` *(optionnel)* | Number | Creation date in ms since Unix epoch. |
     * |  id 	                  | String | Pin's Id                       |
     *
     *
     */
    updatePinWithPeerId(peerId?: string, types?: PEERTYPE, pinId?: string, body?: any): Promise<any>;
    _onmessageReceipt(receipt: any): void;
    /**
     * @public
     * @nodered true
     * @method sendIsTypingStateInBubble
     * @async
     * @category Ims TYPING
     * @instance
     * @description
     *    Switch the "is typing" state in a bubble/room<br> <br>
     * @param {Bubble} bubble The destination bubble
     * @param {boolean} status=true The status, true for setting "is Typing", false to remove it.
     * @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.
     * @return {Object} Return a promise with no parameter when succeed.
     */
    sendIsTypingStateInBubble(bubble: Bubble, status?: boolean, p_messagesDataStore?: DataStoreType): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method sendIsTypingStateInConversation
     * @instance
     * @async
     * @category Ims TYPING
     * @description
     *    Switch the "is typing" state in a conversation<br>
     * @param {Conversation} conversation The conversation recipient
     * @param {boolean} status=true The status, true for setting "is Typing", false to remove it
     * @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.
     * @return Return a promise with no parameter when succeed
     */
    sendIsTypingStateInConversation(conversation: Conversation, status?: boolean, p_messagesDataStore?: DataStoreType): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method sendApplicationMessageContactJid
     * @instance
     * @async
     * @category Ims Application Messages
     * @description
     * Sends a message to a Contact Jid that is ignored in the UCaaS app's message stream
     * (e.g., in Rainbow Web Client, Desktop, Android, or iOS).
     * Useful for bots to communicate with other bots in the same conversation
     * without involving other users via the default application.
     *
     * Note: If a peer send the same kind of message, then the SDK receive the `rainbow_onrainbowcpaasreceived` event. It is Fired when a `rainbow-cpaas` event is receveid for a private data exchange.
     * @param jid - The Contact Jid to which the message is sent
     * @param xmlElements - List of XML elements to create
     * @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.
     *
     * @return {Promise<any>} - that resolves on success
     *
     *
     * exemple:
     *
     * ```
     *
     *  const Element = require('ltx').Element;
     *  let contactEmailToSearch = "xxx@xxx.com";
     *  // Retrieve a contact by its id
     *  let contact = await rainbowSDK.contacts.getContactByLoginEmail(contactEmailToSearch);
     *  // Retrieve the associated conversation
     *  let conversation = await rainbowSDK.conversations.openConversationForContact(contact);
     *  let now = new Date().getTime();
     *  let xmlElements = new Element('instance', {'xmlns': 'tests:rainbownodesdk', 'id': now });
     *  xmlElements.cnode(new Element('displayName').t("My displayName"));
     *  xmlElements.cnode(new Element('description').t("My description"));
     *  // Send message
     *  let msgSent = await rainbowSDK.im.sendApplicationMessageContactJid(contact.jid, xmlElements);
     *
     * ```
     *
     */
    sendApplicationMessageContactJid(jid: any, xmlElements: any, p_messagesDataStore?: DataStoreType): Promise<boolean>;
    /**
     * @public
     * @nodered true
     * @method sendApplicationMessageBubbleJid
     * @instance
     * @async
     * @category Ims Application Messages
     * @description
     * Sends a message to a Bubble Jid that is ignored in the UCaaS app's message stream
     * (e.g., in Rainbow Web Client, Desktop, Android, or iOS).
     * Useful for bots to communicate with other bots in the same conversation
     * without involving other users via the default application.
     *
     * @param {any} jid - The Bubble Jid to which the message is sent
     * @param {Element} xmlElements - List of XML elements to create
     * @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.
     * @return {Promise<any>} - that resolves on success
     *
     *
     *
     */
    sendApplicationMessageBubbleJid(jid: any, xmlElements: any, p_messagesDataStore?: DataStoreType): Promise<boolean>;
    /**
     * @public
     * @nodered true
     * @method sendVoicemailTranscriptionMessage
     * @instance
     * @async
     * @category Voicemail
     * @description
     * Sends a message to a contact Jid to add a voice message in the list.
     *
     * @param {string} to - The Jid to which the message is sent
     * @param {any} transcriptInfo : { jid : string, date : string, duration : number, url : string, transcript : string} = { jid : undefined, date : new Date().toISOString(), duration : 0, url : undefined, transcript : undefined} - informations of the voice mail.
     * @param {DataStoreType} p_messagesDataStore  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.
     * @return {Promise<any>} - that resolves on success
     *
     *
     *
     */
    sendVoicemailTranscriptionMessage(to: string, transcriptInfo: {
        jid: string;
        date: string;
        duration: number;
        fileDescId: string;
        fromNumber: string;
        transcript: string;
    }, p_messagesDataStore: DataStoreType): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method sendMessageNotification
     * @instance
     * @async
     * @category Notifications
     * @description
     * Sends a notification message using REST API POST /api/rainbow/enduser/v1.0/notifications/message.
     * Body parameters must follow the server documentation: https://api.openrainbow.org/enduser/#api-notifications_IM-sendMessageNotification
     *
     * @param {object} data - Body parameters sent to the endpoint. Summary of fields from the server doc:
     * - to: string | object - Mandatory. Recipient information. Depending on the use case, this can be:
     *   - userId: string - Rainbow user identifier
     *   - loginEmail: string - Rainbow login email
     *   - jid_im: string - Recipient XMPP JID (IM)
     *   - bubbleId: string - Bubble identifier (for group messages, if supported by endpoint)
     * - type: string - Message transport/type. Ex: "im" (Instant Message). Other values per server doc.
     * - message: string - Message body text.
     * - subject: string - Optional subject/title.
     * - urgency: string - Optional urgency level if supported (e.g., "standard", "urgent").
     * - mentions: Array<object> - Optional list of mention targets (e.g., by userId or jid_im).
     * - attachments: Array<object> - Optional attachments metadata (e.g., fileId, url, name, size, mimeType) if supported.
     * - options: object - Optional flags and options provided by server (e.g., disablePush, noStore, translate, lang, replyTo, etc.).
     *
     * Notes:
     * - This is only a convenience summary. Always refer to the official API documentation linked above for the exhaustive, authoritative list of fields, constraints, and examples.
     * - The SDK forwards the payload as-is to the REST API.
     *
     * @return {Promise<any>} - resolves with server response
     */
    sendMessageNotification(data: any): Promise<any>;
}
export { ImsService };
