import { Service } from '../Core/index'; import { LocalizedTemplateCreation, TemplateCreation, TemplateListRequest, TemplateListResult, TemplateRemoval, TemplateRequest, TemplateResult } from './TemplateTypes'; /** * Template engine * * Template engine to produce documents from parameterized templates *
An admin creates templates *
Users produce documents *
The implementation uses the freemarker engine * * */ export declare class Template extends Service { /** * Get deployment type associated to Template service * @return {string} */ static readonly DEPLOYMENT_TYPE: string; /** * Get default deployment id associated to Template service * @return {string} */ static readonly DEFAULT_DEPLOYMENT_ID: string; /** * User API for templates * * Users use this API to evaluate pre-configured templates. * @access public * */ /** * Evaluates a template * * Evaluates the given template and returns the result as a string. * Templates are parsed the first time they are evaluated. Evaluation may fail early due to a parsing error. * @access public * */ evaluate(body: TemplateRequest): Promise; /** * User API for templates management * * Users use this API to configure templates. * @access public * */ /** * Creates a localized template * * Creates a new localized template for the given 'name' and 'languageTag' (IETF BCP 47), replacing an existing one if it already exists. The default template for the given 'name' must exist. * @access public * */ add(body: LocalizedTemplateCreation): void; /** * Creates a template * * Creates a new default template for the given 'name', replacing an existing one if it already exists. * @access public * */ create(body: TemplateCreation): void; /** * Removes a template * * Removes an existing localized template for the given 'name' and 'languageTag'. * If you omit the languageTag, all localizations will be removed, including the default. * @access public * */ delete(body: TemplateRemoval): void; /** * Lists template information * * Returns a paginated list of previously uploaded template information. * @access public * */ list(body: TemplateListRequest): Promise; }