liveperson-functions-cli
Version:
LivePerson Functions CLI
44 lines (43 loc) • 1.2 kB
TypeScript
import { Got } from 'got';
import { CsdsClient } from './csds.service';
export interface ILoginResponse {
bearer: string;
csrf: string;
sessionId: string;
config: {
userId: string;
loginName: string;
};
}
interface ILoginServiceConfig {
csdsClient?: CsdsClient;
gotDefault?: Got;
}
export declare class LoginService {
private readonly csdsClient;
private readonly got;
constructor({ csdsClient, gotDefault, }?: ILoginServiceConfig);
/**
* Checks if the token is still valid
* @param { token, accountId, userId }
* @returns {Promise<boolean>}
* @memberof LoginService
*/
isTokenValid({ csrf, accountId, sessionId, }: {
csrf: string;
accountId: string;
sessionId: string;
}): Promise<boolean>;
/**
* Performs the login to the agentVep service
* @param { accountId, username, password }
* @returns {Promise<ILoginResponse>} - bearer, username and userId
* @memberof LoginService
*/
login({ accountId, username, password, }: {
accountId: string;
username: string;
password: string;
}): Promise<ILoginResponse>;
}
export {};