UNPKG

chromiumly

Version:

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

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