/** * @module Favorites */ import { Subject } from "rxjs"; import { Contact } from "../models/contact.model"; import { Bubble } from '../models/bubble.model'; import { User } from '../models/user.model'; import { Conversation } from "../models/conversation.model"; export declare enum FavoriteType { /** * Rainbow user */ USER = "user", /** * Rainbow bubble */ ROOM = "room", /** * Directory contact, from Rainbow Personal or Rainbow Business directories. */ DIRECTORY = "directory", /** * Microsoft Azure AD users/Microsoft O365 contact */ OFFICE365 = "office365", /** * Rainbow bot */ BOT = "bot", /** * Microsoft Outlook contact */ OUTLOOK = "outlook" } export interface Favorite { /** * The identifier of the favorite. * @readonly */ id: string; /** * Type of the favorite, one of the following values defined in *FavoriteType* enum. * @readonly */ type: FavoriteType; /** * Peer object related to the favorite. * The object is an instance of Bubble if the associated *type* property is set to **room**. * The object is an instance of User in all other cases. */ peer: Bubble | User | undefined; } /** * @ignore */ export declare class FavoriteRB implements Favorite { /** * The identifier of the favorite. * @readonly */ id: string; /** * Id of the peer linked to the favorite. * @readonly */ peerId: string; /** * Type of the favorite, one of the following values defined in FavoriteType enum. * @readonly */ type: FavoriteType; /** * Peer object related to the favorite. * The object is an instance of Bubble if the associated 'type' property is set to 'room'. * The object is an instance of User in all other cases. */ peer: Bubble | User | undefined; /** * Conversation object related to the favorite * A conversation can only be present for 'user', 'bot', and 'room' favorite types. * But not for directory favorite (from personal/business/office365 directory as they are only contact cards. */ conv: Conversation | undefined; innerRxSubject: Subject; constructor(id: string, peerId: string, type: FavoriteType); /** * Update the contact information of a favorite * This is useful if one of the names (lastname, firstname) or the avatar of the contact has been changed. * Updating the contact property(s) allows to refresh the display of the favorites list. * @param contact - The new contact that will be associated to the favorite */ updateContact(contact: Contact): void; } //# sourceMappingURL=favorite.model.d.ts.map