liveperson-functions-cli
Version:
LivePerson Functions CLI
51 lines (50 loc) • 1.88 kB
TypeScript
import { Answers } from 'inquirer';
import { PrettyPrintableError } from '@oclif/core/lib/interfaces';
import { ILambda } from '../types';
import { ErrorMessage, LogMessage, Prompt, TaskList } from './printer';
import { FileService } from '../service/file.service';
interface IPushViewConfig {
emoji?: any;
log?: LogMessage;
chalk?: any;
prompt?: Prompt;
tasklist?: TaskList;
error?: ErrorMessage;
fileService?: FileService;
}
export declare class PushView {
private readonly prompt;
private readonly log;
private readonly error;
private tasklist;
private readonly chalk;
private readonly fileService;
constructor({ chalk, log, error, tasklist, prompt, fileService, }?: IPushViewConfig);
/**
* Shows an error message
* @param {string|PrettyPrintableError} message - message
* @memberof PushView
*/
showErrorMessage(message: string | PrettyPrintableError): void;
/**
* Prompts the user to confirm all of the lambdas he wants to push
* @param {ILambda[]} lambdas Lambdas the user wants to push
* @param {string} [accountId] The account ID to display in the prompt
* @returns {Promise<Answers>}
* @memberof PushView
*/
askForConfirmation(lambdas: ILambda[], accountId?: string): Promise<Answers>;
/**
* Creates and runs a Listr Task List. It creates one task for each request body
* which triggers the push request for it. Depending on the noWatch param the
* pushing is displayed or hidden in the console.
* @param {{ pushRequestBodies: ILambda[]; noWatch?: boolean }} { pushRequestBodies, noWatch = false }
* @memberof PushView
*/
showPushProcess({ pushRequestBodies, noWatch, }: {
pushRequestBodies: ILambda[];
noWatch?: boolean;
}): Promise<void>;
private preparePromptMessage;
}
export {};