import { EventEmitter } from "events";
import { Logger } from "../common/Logger";
import { ProxyImpl } from "../ProxyImpl";
import { GenericService } from "./GenericService";
import { Core } from "../Core.js";
declare class S2SService extends GenericService {
    private serverURL;
    private host;
    version: any;
    jid_im: any;
    jid_tel: any;
    jid_password: any;
    fullJid: any;
    jid: any;
    userId: any;
    private proxy;
    private xmppUtils;
    private generatedRandomId;
    private hash;
    private hostCallback;
    private expressEngine;
    private app;
    private locallistenningport;
    private s2sEventHandler;
    private _contacts;
    private _conversations;
    static getClassName(): string;
    getClassName(): string;
    static getAccessorName(): string;
    getAccessorName(): string;
    constructor(_core: Core, _s2s: {
        hostCallback: string;
        locallistenningport: string;
        expressEngine: any;
    }, _im: any, _application: any, _eventEmitter: EventEmitter, _logger: Logger, _proxy: ProxyImpl, _startConfig: {
        start_up: boolean;
        optional: boolean;
    });
    start(_options: any): Promise<unknown>;
    /**
     * @private
     * @name signin
     * @param account
     * @param headers
     */
    signin(account: any, headers: any): Promise<unknown>;
    /**
     * @private
     * @param forceStop
     */
    stop(forceStop?: boolean): Promise<unknown>;
    init(useRestAtStartup: boolean): Promise<void>;
    /**
     * @public
     * @nodered true
     * @method listConnectionsS2S
     * @instance
     * @category S2S Management
     * @description
     *      List all the connected user's connexions. <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - List of connexions or an error object depending on the result
     
     */
    listConnectionsS2S(): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method checkS2Sconnection
     * @instance
     * @category S2S Management
     * @description
     *      check the S2S connection with a head request. <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - List of connexions or an error object depending on the result
     
     */
    checkS2Sconnection(): Promise<any>;
    /**
     * @private
     * @nodered true
     * @method deleteConnectionsS2S
     * @instance
     * @category S2S Management
     * @param {Array} connexions a List of connections S2S to delete
     * @description
     *      Delete one by one a list of S2S connections of the connected user. <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - List of connexions or an error object depending on the result
     
     */
    deleteConnectionsS2S(connexions: any): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method deleteAllConnectionsS2S
     * @instance
     * @category S2S Management
     * @description
     *      Delete all the connected user's S2S connexions. <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - List of connexions or an error object depending on the result
     
     */
    deleteAllConnectionsS2S(): Promise<any>;
    /**
     * @private
     * @method loginS2S
     * @instance
     * @category S2S Management
     * @param {string} callback_url The web site which is the callback where the S2S events are sent by Rainbow server
     * @description
     *      Login to S2S event server the already connected user to REST API server. <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - List of connexions or an error object depending on the result
     
     */
    loginS2S(callback_url: string): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method infoS2S
     * @instance
     * @category S2S Management
     * @param {string} s2sConnectionId The id of the S2S conneexion to retrieve information about.
     * @description
     *      Get information about a S2S connexions. <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - List of connexions or an error object depending on the result
     
     */
    infoS2S(s2sConnectionId: string): Promise<any>;
    onS2SReady(event: any): Promise<void>;
    /**
     * @private
     * @method sendS2SPresence
     * @instance
     * @category S2S Methods
     * @param {Object} obj Object {show, status} describing the presence : <br>
     *  To put presence to cases : <br>
     * "online":     {show = undefined, status = "mode=auto"} <br>
     * "away": {show = "xa", status = "away"} <br>
     * "dnd": {show = "dnd", status = ""} <br>
     * "invisible": {show = "xa", status = ""} <br>
     * @description
     *      set the presence of the connected user with s2s api . <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - List of connexions or an error object depending on the result
     
     */
    sendS2SPresence(obj: any): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendMessageInConversation
     * @instance
     * @category S2S Methods
     * @param {string} conversationId
     * @param {any} msg The message object to send. <br>
     * { <br>
     *   "message": { <br>
     *   "subject": "Greeting", <br>
     *   "lang": "en", <br>
     *   "contents": [ <br>
     *     { <br>
     *       "type": "text/markdown", <br>
     *       "data": "## Hello Bob" <br>
     *     } <br>
     *   ], <br>
     *   "body": "Hello world" <br>
     *   } <br>
     * } <br>
     * @description
     *      Send a message in a conversation. Note, corrected message is not yet supported. <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - result or an error object depending on the result
     
     */
    sendMessageInConversation(conversationId: string, msg: any): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendCorrectedChatMessage
     * @instance
     * @category S2S Methods
     * @param {string} conversationId id of the conversation
     * @param {string} origMsgId id of the original message
     * @param {any} msg The message object update. <br>
     * { <br>
     *   "message": { <br>
     *   "subject": "Greeting", <br>
     *   "lang": "en", <br>
     *   "contents": [ <br>
     *     { <br>
     *       "type": "text/markdown", <br>
     *       "data": "## Hello Bob" <br>
     *     } <br>
     *   ], <br>
     *   "body": "Hello world" <br>
     *   } <br>
     * } <br>
     * @description
     *      Send a corrected message in a conversation.  <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - result or an error object depending on the result
     */
    sendCorrectedChatMessage(conversationId: string, origMsgId: string, msg: any): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method sendForwardChatMessage
     * @instance
     * @category S2S Methods
     * @param {string} conversationId id of the conversation.
     * @param {string} msgId Message id.
     * @param {string} msg The message object to send. <br>
     * { <br>
     *   "message": { <br>
     *   "subject": "Greeting", <br>
     *   "lang": "en", <br>
     *   "contents": [ <br>
     *     { <br>
     *       "type": "text/markdown", <br>
     *       "data": "## Hello Bob" <br>
     *     } <br>
     *   ], <br>
     *   "body": "Hello world" <br>
     *   } <br>
     * } <br>
     * @param {string} conversationDestId the id of the destination conversation
     *
     *
     * Destination conversation id
     * @description
     *      Forward a message from a conversation to another one. <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - result or an error object depending on the result
     */
    sendForwardChatMessage(conversationId: string, msgId: string, msg: any, conversationDestId: string): Promise<any>;
    /**
     * @private
     * @method joinRoom
     * @param {string} bubbleId The id of the bubble to open the conversation.
     * @param {ROOMROLE} role Enum: "member" "moderator" of your role in this room
     * @category S2S Methods
     * @instance
     * @description
     *      send presence in S2S to join a bubble conversation <br>
     * @async
     * @return {Promise<Object, ErrorManager>}
     * @fulfil {Object} - List of connexions or an error object depending on the result
     
     */
    joinRoom(bubbleId: string, role: ROOMROLE): Promise<any>;
}
/**
 * The role of the Contact in the Bubble.
 * @public
 * @enum {string}
 * @readonly
 */
declare enum ROOMROLE {
    MODERATOR = "moderator",
    MEMBER = "member"
}
/**
 * The state of the Chat in the conversation.
 * @public
 * @enum {string}
 * @readonly
 */
declare enum CHATSTATE {
    ACTIVE = "active",
    COMPOSING = "composing",
    PAUSED = "paused",
    INACTIVE = "inactive",
    GONE = "gone"
}
export { S2SService, ROOMROLE, CHATSTATE };
