import { GenericService } from "./GenericService"; export {}; import { CallLogEventHandler } from '../connection/XMPPServiceHandler/calllogEventHandler'; import { EventEmitter } from "events"; import { Logger } from "../common/Logger"; import { Core } from "../Core"; declare class CallLogService extends GenericService { get calllogEventHandler(): CallLogEventHandler; private calllogs; private callLogHandlerRef; private callLogMessageAckRef; private callLogNotificationRef; private callLogsHistory; private telephonyCallLog; private telephonyCallLogHistory; private deferedObject; private callLogComplete; private callLogIndex; private calllogHandlerToken; private _contacts; private _profiles; private _calllogEventHandler; private _telephony; private iMOptions; 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; stop(): Promise; init(useRestAtStartup: boolean): Promise; attachHandlers(): void; /*********************************************************/ /** MAM REQUESTS **/ /*********************************************************/ getCallLogHistoryPage(useAfter?: any): Promise; /*********************************************************/ /** API **/ /*********************************************************/ /** * @public * @nodered true * @method getAll * @instance * @category CallLog MANAGEMENT * @description * Get all calls log history for the connected user
* @return {CallLog[]} An array of call log entry */ getAll(): any[]; /** * @public * @nodered true * @method getMissedCallLogCounter * @instance * @category CallLog MANAGEMENT * @description * Get the number of call missed (state === "missed" && direction === "incoming")
* @return {Number} The number of call missed */ getMissedCallLogCounter(): number; /** * @public * @nodered true * @method deleteOneCallLog * @instance * @category CallLog MANAGEMENT * @description * Delete a call log from it's id
* You have to listen to event `rainbow_oncalllogupdated` to know when the action is finished
* @param {string} id The call log id to remove * @return Nothing */ deleteOneCallLog(id: string): Promise; /** * @public * @nodered true * @method deleteCallLogsForContact * @instance * @category CallLog MANAGEMENT * @description * Delete all calls log items associated to a contact's given jid
* You have to listen to event `rainbow_oncalllogupdated` to know when the action is finished
* @param {string} jid The call log id to remove * @return Nothing */ deleteCallLogsForContact(jid: string): Promise; /** * @public * @nodered true * @method deleteAllCallLogs * @instance * @category CallLog MANAGEMENT * @description * Delete all call logs history
* You have to listen to event `rainbow_oncalllogupdated` to know when the action is finished
* @return Nothing */ deleteAllCallLogs(): Promise; /** * @public * @nodered true * @method markCallLogAsRead * @instance * @category CallLog MANAGEMENT * @description * Mark a call log item as read
* You have to listen to event `rainbow_oncalllogackupdated` to know when the action is finished
* @param {string} id The call log id * @return Nothing */ markCallLogAsRead(id: string): Promise; /** * @public * @nodered true * @method markAllCallsLogsAsRead * @instance * @category CallLog MANAGEMENT * @description * Mark all call log items as read
* You have to listen to event `rainbow_oncalllogackupdated` to know when the action is finished
* @return Nothing */ markAllCallsLogsAsRead(): Promise; /** * @public * @nodered true * @method isInitialized * @instance * @category CallLog INITIALISATION * @description * Check if the call log history has been received from Rainbow
* A false answer means that the call logs have not yet been retrieved from the server.
* @return {Boolean} True if the call logs have been retrieved. False elsewhere. */ isInitialized(): boolean; onCallLogUpdated(calllogs: any): Promise; onCallLogAckReceived(calllogs: any): Promise; /*********************************************************/ /** HELPER FUNCTIONS **/ /*********************************************************/ getOrderByNameCallLogs(): any[]; getOrderByDateCallLogs(): any[]; getOrderByNameCallLogsBruts(): any[]; getOrderByDateCallLogsBruts(): any[]; getSimplifiedCallLogs(): any[]; getNumberMissedCalls(): number; resetCallLogs(): Promise; } export { CallLogService };