bria
Version:
CounterPath Bria Desktop API for Node.js
58 lines • 2.24 kB
TypeScript
import BriaClientLeaf from './Leaf';
import { BriaClient } from '.';
import { AccountId } from './Account';
export declare type HistoryType = 'all' | 'missed';
export declare type HistoryEntryType = 'missed' | 'received' | 'dialed';
export declare type HistoryEntry = {
type: HistoryEntryType;
id: string;
number: string;
displayName: string;
accountId: AccountId;
duration: number;
timeInitiated: Date;
callEnd: Date;
};
declare type HistoryEvents = {
historyUpdated: () => Promise<void> | void;
};
export declare class BriaClientHistory extends BriaClientLeaf<HistoryEvents> {
missedCalls: number;
constructor(client: BriaClient);
populate(): Promise<void>;
/**
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiEvents.htm#postStatusChangeCallHistory
*/
private callHistoryUpdated;
/**
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiEvents.htm#postStatusChangeMissedCall
*/
private missedCall;
/**
* Show history panel and take window focus
* @param type
* @param text Filter text to input automatically
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiHistory.htm#getShowHistoryHistory
*/
showHistory(type: HistoryType, text?: string): Promise<import("sxml").XML>;
/**
* Get entries from call history
* @param type
* @param count default 10
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiHistory.htm#getStatusCallHistory
*/
getCallHistory(type: HistoryType, count?: number): Promise<HistoryEntry[]>;
/**
* Get a single call history item
* @param id
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiHistory.htm#getStatusCallHistoryItem
*/
getCallHistoryItem(id: string): Promise<HistoryEntry>;
/**
* Get missed call count
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiHistory.htm#getStatusMissedCall
*/
getMissedCallCount(): Promise<number>;
}
export {};
//# sourceMappingURL=History.d.ts.map