UNPKG

@accordproject/cicero-cli

Version:
112 lines (111 loc) 4.72 kB
/** * Utility class that implements the commands exposed by the Cicero CLI. * @class * @memberof module:cicero-cli */ export declare class Commands { /** * Whether the template path is to a file (template archive) * @param {string} templatePath - path to the template directory or archive * @return {boolean} true if the path is to a file, false otherwise */ static isTemplateArchive(templatePath: any): boolean; /** * Return a promise to a template from either a directory or an archive file * @param {string} templatePath - path to the template directory or archive * @param {Object} [options] - an optional set of options * @return {Promise<Template>} a Promise to the instantiated template */ static loadTemplate(templatePath: any, options: any): Promise<any>; /** * Common default params before we create an archive using a template * * @param {object} argv - the inbound argument values object * @returns {object} a modfied argument object */ static validateCommonArgs(argv: any): any; /** * Set default params before we create an archive using a template * * @param {object} argv the inbound argument values object * @returns {object} a modfied argument object */ static validateArchiveArgs(argv: any): any; /** * Create an archive using a template * * @param {string} templatePath - path to the template directory or archive * @param {string} target - target language for the archive * @param {string} outputPath - to the archive file * @param {Object} [options] - an optional set of options * @returns {object} Promise to the code creating an archive */ static archive(templatePath: any, target: any, outputPath: any, options: any): Promise<boolean>; /** * Set default params before we draft text from a template * * @param {object} argv the inbound argument values object * @returns {object} a modified argument object */ static validateDraftArgs(argv: any): any; /** * Draft sample text by merging a template with contract data * * @param {string} templatePath - path to the template directory or archive * @param {string} dataPath - path to the JSON data for the template * @param {string} outputPath - the output file, prints to the console when null * @param {string} format - the output format * @param {string} currentTime - the definition of 'now' * @param {Object} [options] - an optional set of options * @returns {Promise<string>} Promise to the drafted text */ static draft(templatePath: any, dataPath: any, outputPath: any, format: any, currentTime: any, options: any): Promise<string>; /** * Set default params before we verify signatures of template author/developer * * @param {object} argv the inbound argument values object * @returns {object} a modfied argument object */ static validateVerifyArgs(argv: any): any; /** * Verify the template developer/author's signatures * * @param {string} templatePath - path to the template directory or archive * @param {Object} [options] - an optional set of options * @returns {object} returns true if signature is valid else false */ static verify(templatePath: any, options?: any): Promise<any>; /** * Set default params before we compile a template * * @param {object} argv the inbound argument values object * @returns {object} a modfied argument object */ static validateCompileArgs(argv: any): any; /** * Compile the template to a given target * * @param {string} templatePath - path to the template directory or archive * @param {string} target - the target format * @param {string} outputPath - the output directory * @param {Object} [options] - an optional set of options * @returns {object} Promise to the result of code generation */ static compile(templatePath: any, target: any, outputPath: any, options: any): Promise<void>; /** * Set default params before we download external dependencies * * @param {object} argv the inbound argument values object * @returns {object} a modfied argument object */ static validateGetArgs(argv: any): any; /** * Fetches all external for a set of models dependencies and * saves all the models to a target directory * * @param {string} templatePath the system model * @param {string} output the output directory * @return {string} message */ static get(templatePath: any, output: any): Promise<string>; }