UNPKG

chromiumly

Version:

A lightweight Typescript library that interacts with Gotenberg's different modules to convert a variety of document formats to PDF files.

25 lines 930 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Generator = void 0; const main_config_1 = require("../../main.config"); /** * Abstract class representing a generic generator. * Concrete generator classes should extend this class and implement specific generation logic. */ class Generator { /** * The endpoint URL for the generator. */ endpoint; /** * Creates an instance of the Generator class. * Initializes the endpoint URL based on the provided TemplatesRoute. * * @param {TemplatesRoute} route - The TemplatesRoute enum value representing the generation route. */ constructor(route) { this.endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.TEMPLATES_PATH}/${main_config_1.Chromiumly.TEMPLATES_ROUTES[route]}`; } } exports.Generator = Generator; //# sourceMappingURL=generator.js.map