import { Subscription } from "rxjs"; import { Contact } from '../../models/contact.model'; import { Service } from "../../services/service"; import { DirectoryInternalSearchResults, DirectorySearchOptions } from "../core/directorySearch.service"; export declare const DIRECTORY_SVC = "DirectoryService"; declare class SdkApis { searchUserByLogin: any; searchUserByJid: any; searchUserByPhoneNumber: any; searchAllContacts: any; constructor(searchUserByLogin?: any, searchUserByJid?: any, searchUserByPhoneNumber?: any, searchAllContacts?: any); } /** * Rainbow Directory service allows access to contacts search * SDK supports only the APIs listed in the _sdkApis array (you can access it through i.e. rainbowSDK.directoryService._sdkApis) */ export declare class DirectoryService extends Service implements SdkApis { private centralizedService; private authService; private profileService; private contactService; private conversationService; private logger; private errorHelperService; private mainService; _sdkApis: any[]; private rxSubject; static getInstance(): DirectoryService; static build(): DirectoryService; private constructor(); start(): Promise; stop(): Promise; subscribe(observer: any): Subscription; searchRainbowUsers(searchPattern: string, options?: DirectorySearchOptions, filterOwnUser?: boolean): Promise; /** * Method searchUserByLogin * @description Search for a contact through its email address (used for login). * @memberof DirectoryService * @public * @async * @param {string} loginEmail User email address (used for login) used as search criteria * @returns {Promise} Promise that resolves with a contact matching the provided loginEmail or rejects with an Error */ searchUserByLogin(loginEmail: string): Promise; /** * Method searchUserByJid * @description Search for a contact through its jid. * @memberof DirectoryService * @public * @async * @param {string} jid User jid_im used as search criteria * @returns {Promise} Promise that resolves with a contact matching the jid provided or rejects with an Error */ searchUserByJid(jid: string): Promise; /** * Method searchUserByPhoneNumber * @description Search for a contact being associated to the requested phone number. * @memberof DirectoryService * @public * @async * @param {string} phoneNumber Phone number to search used as search criteria * @returns {Promise} Promise that resolves with a contact matching the phoneNumber provided or rejects with an Error */ searchUserByPhoneNumber(phoneNumber: string): Promise; /** * Method searchAllContacts * @description Search for a contact matching a string. * @memberof DirectoryService * @public * @async * @param {string} searchText text to search * @param {number} [limit] Max number of result. Default: 20 * @param {string} [companyId] ID of the company on which users are searched. Default = "" * companyId and excludeCompanyId parameters are exclusives, companyId parameter can only be set if excludeCompanyId parameter is not provided. * @param {boolean} [addRosters] whether or not to include our contact roster in the search. Default: true * @param {boolean} [addOutlook] whether or not to include our outlook contacts in the search. Default: true * @param {string} [excludeCompanyId] Exclude users being in the requested company ID from the search results. Default = null * companyId and excludeCompanyId parameters are exclusives, excludeCompanyId parameter can only be set if companyId parameter is not provided. * @returns {Promise} Promise that resolves with an array containing a list of contacts matching the searchText or rejects with an Error */ searchAllContacts(searchText: string, limit?: number, companyId?: string, addRosters?: boolean, addOutlook?: boolean, excludeCompanyId?: string, filterOwnUser?: boolean): Promise; private adaptOutlookContacts; private searchOutlookUsersByName; private searchOutlookUsersByEmail; } export {}; //# sourceMappingURL=directory.service.d.ts.map