bria
Version:
CounterPath Bria Desktop API for Node.js
51 lines • 1.98 kB
TypeScript
import BriaClientLeaf from './Leaf';
import { BriaClient } from '.';
export declare type AuthResponse = {
authenticated: boolean;
notAuthenticatedReason?: string;
serverProvidedReason?: string;
};
declare type AuthEvents = {
authenticationUpdate: (ar: AuthResponse) => Promise<void> | void;
};
export declare class BriaClientAuth extends BriaClientLeaf<AuthEvents> {
authenticated: boolean;
constructor(client: BriaClient);
populate(): Promise<void>;
/**
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiEvents.htm#postStatusChangeAuthentication
*/
private authenticationUpdate;
/**
* Sign in to Bria with provided credentials
*
* Requires Bria Solo/Teams/Enterprise client version 6.4.0 or later
* @param username
* @param password
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiLoggingInOut.htm#getSignIn
*/
signIn(username: string, password: string): Promise<import("sxml").XML>;
/**
* Sign out from Bria
*
* Requires Bria Solo/Teams/Enterprise client version 6.4.0 or later
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiLoggingInOut.htm#getSignOut
*/
signOut(): Promise<import("sxml").XML>;
/**
* Exit Bria client
*
* Requires Bria Solo/Teams/Enterprise client version 6.4.0 or later
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiLoggingInOut.htm#getExit
*/
exit(): Promise<import("sxml").XML>;
/**
* Get authentication status
*
* Requires Bria Solo/Teams/Enterprise client version 6.4.0 or later
* @see https://docs.counterpath.com/guides/desk/desk_api/clients/deskAPI/deskApiLoggingInOut.htm#getStatusAuth
*/
getAuthentication(): Promise<AuthResponse>;
}
export {};
//# sourceMappingURL=Auth.d.ts.map