import { GenericService } from "./GenericService";
export {};
import { Logger } from "../common/Logger";
import { Contact } from "../common/models/Contact";
import { EventEmitter } from "events";
import { Core } from "../Core";
declare class GroupsService extends GenericService {
    private _groups;
    static getClassName(): string;
    getClassName(): string;
    static getAccessorName(): string;
    getAccessorName(): string;
    constructor(_core: Core, _eventEmitter: EventEmitter, _logger: Logger, _startConfig: {
        start_up: boolean;
        optional: boolean;
    });
    start(_options: any): Promise<unknown>;
    stop(): Promise<unknown>;
    init(useRestAtStartup: boolean): Promise<void>;
    /**
     * @public
     * @nodered true
     * @method createGroup
     * @instance
     * @param {string} name The name of the group to create
     * @param {string} comment The comment of the group to create
     * @param {boolean} isFavorite If true, the group is flagged as favorite
     * @description
     *      Create a new group <br>
     * @async
     * @category Groups MANAGEMENT
     * @return {Promise<Object, ErrorManager>} The result
     * @fulfil {Group} - Created group object or an error object depending on the result
     * @category async
     */
    createGroup(name: string, comment: string, isFavorite: boolean): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method deleteGroup
     * @instance
     * @param {Object} group The group to delete
     * @description
     *    Delete an owned group <br>
     * @async
     * @category Groups MANAGEMENT
     * @return {Promise<Object, ErrorManager>} The result
     * @fulfil {Group} - Deleted group object or an error object depending on the result
     * @category async
     */
    deleteGroup(group: any): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method deleteAllGroups
     * @instance
     * @async
     * @category Groups MANAGEMENT
     * @description
     *    Delete all existing owned groups <br>
     *    Return a promise <br>
     * @return {Object} Nothing or an error object depending on the result
     */
    deleteAllGroups(): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method updateGroupName
     * @instance
     * @async
     * @category Groups MANAGEMENT
     * @param {Object} group The group to update
     * @param {string} name The new name of the group
     * @description
     *          Update the name of a group <br>
     * @return {Promise<Object, ErrorManager>} The result
     * @fulfil {Group} - Updated group object or an error object depending on the result
     * @category async
     */
    updateGroupName(group: any, name: string): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method updateGroupComment
     * @instance
     * @async
     * @category Groups MANAGEMENT
     * @param {Object} group The group to update
     * @param {string} comment The new comment of the group
     * @description
     *          Update the comment of a group <br>
     * @return {Promise<Object, ErrorManager>} The result
     * @fulfil {Group} - Updated group object or an error object depending on the result
     * @category async
     */
    updateGroupComment(group: any, comment: string): Promise<unknown>;
    /**
     * @private
     * @category Groups MANAGEMENT
     * @description
     *      Internal method <br>
     */
    getGroups(): Promise<unknown>;
    /**
    * @public
     * @nodered true
     * @method setGroupAsFavorite
    * @since 1.67.0
    * @async
    * @category Groups MANAGEMENT
    * @instance
    * @param {Object} group The group
    * @description
    *          Set a group as a favorite one of the curent loggued in user. <br>
    * @return {Promise<Object, ErrorManager>} The result
    * @fulfil {Group} - Updated group or an error object depending on the result
    * @category async
    */
    setGroupAsFavorite(group: any): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method unsetGroupAsFavorite
     * @since 1.67.0
     * @category Groups MANAGEMENT
     * @async
     * @instance
     * @param {Object} group The group
     * @description
     *          Remove the favorite state of a group of the curent loggued in user. <br>
     * @return {Promise<Object, ErrorManager>} The result
     * @fulfil {Group} - Updated group or an error object depending on the result
     * @category async
     */
    unsetGroupAsFavorite(group: any): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method getAll
     * @category Groups MANAGEMENT
     * @instance
     * @return {Array} The list of existing groups with following fields: id, name, comment, isFavorite, owner, creationDate, array of users in the group
     * @description
     *  Return the list of existing groups <br>
     */
    getAll(): any;
    /**
     * @public
     * @nodered true
     * @method getFavoriteGroups
     * @category Groups MANAGEMENT
     * @instance
     * @return {Array} The list of favorite groups with following fields: id, name, comment, isFavorite, owner, creationDate, array of users in the group
     * @description
     *  Return the list of favorite groups <br>
     */
    getFavoriteGroups(): any;
    /**
     * @public
     * @nodered true
     * @method getGroupById
     * @category Groups MANAGEMENT
     * @instance
     * @async
     * @param {String} id group Id of the group to found
     * @return {Promise<any>} The group found if exist or undefined
     * @description
     *  Return a group by its id <br>
     */
    getGroupById(id: string, forceServerSearch?: boolean): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method getGroupByName
     * @category Groups MANAGEMENT
     * @instance
     * @async
     * @param {String} name Name of the group to found
     * @param {boolean} forceServerSearch=false force the update from server.
     * @return {Promise<any>} The group found if exist or undefined
     * @description
     *  Return a group by its id <br>
     */
    getGroupByName(name: string, forceServerSearch?: boolean): Promise<any>;
    /**
     * @public
     * @nodered true
     * @method addUserInGroup
     * @instance
     * @async
     * @category Groups USERS
     * @param {Contact} contact The user to add in group
     * @param {Object} group The group
     * @description
     *          Add a contact in a group <br>
     * @return {Promise<Object, ErrorManager>} The result
     *
     *
     * | Champ | Type | Description |
     * | --- | --- | --- |
     * | data | Object | Group Object. |
     * | id  | String | Group unique identifier. |
     * | name | String | Group name. |
     * | comment | String | Group comment. |
     * | isFavorite | Boolean | Is group flagged as favorite. |
     * | owner | String | Rainbow Id of group owner. |
     * | creationDate | Date-Time | Creation date of the group (read only, set automatically during group creation). |
     * | users | String\[\] | List of Rainbow users being in the group. |
     *
     * @fulfil {Group} - Updated group with the new contact added or an error object depending on the result
     * @category async
     */
    addUserInGroup(contact: Contact, group: any): Promise<unknown>;
    /**
     * @public
     * @nodered true
     * @method removeUserFromGroup
     * @instance
     * @async
     * @category Groups USERS
     * @param {Contact} contact The user to remove from the group
     * @param {Object} group The destination group
     * @description
     *          Remove a contact from a group <br>
     * @return {Promise<Object, ErrorManager>} The result
     * @fulfil {Group} - Updated group without the removed contact or an error object depending on the result
     * @category async
     */
    removeUserFromGroup(contact: Contact, group: any): Promise<unknown>;
    /**
     * @private
     * @method _onGroupCreated
     * @instance
     * @param {Object} data Contains the groupId of the created group
     * @description
     *          Method called when a group is created <br>
     */
    _onGroupCreated(data: any): Promise<void>;
    /**
     * @private
     * @method _onGroupDeleted
     * @instance
     * @param {Object} data Contains the groupId of the deleted group
     * @description
     *          Method called when a group is deleted <br>
     */
    _onGroupDeleted(data: any): Promise<void>;
    /**
     * @private
     * @method _onGroupUpdated
     * @instance
     * @param {Object} data Contains the groupId of the updated group
     * @description
     *          Method called when a group is updated (name, comment, isFavorite) <br>
     */
    _onGroupUpdated(data: any): Promise<void>;
    /**
     * @private
     * @method _onUserAddedInGroup
     * @instance
     * @param {Object} data Contains the groupId and the userId
     * @description
     *          Method called when a user is added to a group <br>
     */
    _onUserAddedInGroup(data: any): Promise<void>;
    /**
     * @private
     * @method _onUserRemovedFromGroup
     * @instance
     * @param {Object} data Contains the groupId and the userId
     * @description
     *          Method called when a user is removed from a group <br>
     */
    _onUserRemovedFromGroup(data: any): Promise<void>;
}
export { GroupsService as GroupsService };
