UNPKG

bria

Version:

CounterPath Bria Desktop API for Node.js

36 lines 1.37 kB
import BriaClientLeaf from './Leaf'; import { BriaClient } from '.'; export declare type AccountType = 'sip' | 'xmpp'; export declare type AccountId = number; export declare type Account = { type: AccountType; id: AccountId; name: string; enabled: boolean; registered: boolean; }; declare type AccountEvents = { accountCreate: (account: Account) => Promise<void> | void; accountUpdate: (account: Account) => Promise<void> | void; accountRemove: (account: Account) => Promise<void> | void; }; export declare class BriaClientAccount extends BriaClientLeaf<AccountEvents> { accounts: Account[]; constructor(client: BriaClient); private populateAccounts; populate(): Promise<void>; /** * @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiEvents.htm#postStatusChangeAccount */ private accountUpdated; /** * Get static list of accounts * * Instead of using this method, you should access client.account.accounts, * this method is used when Bria posts an account update event internally * @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiAccount.htm#GET/statusAccounts */ getAccounts(accountType: AccountType): Promise<Account[]>; } export {}; //# sourceMappingURL=Account.d.ts.map