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 • 933 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Converter = void 0;
const main_config_1 = require("../../main.config");
/**
* Abstract class representing a generic converter.
* Concrete converter classes should extend this class and implement specific conversion logic.
*/
class Converter {
/**
* The endpoint URL for the converter.
*/
endpoint;
/**
* Creates an instance of the Converter class.
* Initializes the endpoint URL based on the provided ChromiumRoute.
*
* @param {ChromiumRoute} route - The ChromiumRoute enum value representing the conversion route.
*/
constructor(route) {
this.endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.CHROMIUM_CONVERT_PATH}/${main_config_1.Chromiumly.CHROMIUM_ROUTES[route]}`;
}
}
exports.Converter = Converter;
//# sourceMappingURL=converter.js.map