@shad0wz7/nestjs-pdf 3.2.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,15 +1,13 @@
1
- import { Browser, BrowserContext, PDFOptions } from "puppeteer";
1
+ import "puppeteer";
2
2
  import { StandardFonts } from "pdf-lib";
3
- import { DynamicModule, InjectionToken, ModuleMetadata, OnModuleDestroy, OnModuleInit, OptionalFactoryDependency } from "@nestjs/common";
4
- import { Browser as Browser$1 } from "@puppeteer/browsers";
5
- import { MJMLParsingOptions } from "mjml-core";
3
+ import { DynamicModule, InjectionToken, ModuleMetadata, OnModuleInit, OptionalFactoryDependency } from "@nestjs/common";
6
4
  import { Data, Options } from "ejs";
7
5
  import { EtaConfig } from "eta";
8
6
  import Handlebars from "handlebars";
7
+ import { LiquidOptions as LiquidOptions$1 } from "liquidjs";
9
8
  import { EscapeFunction } from "mustache";
10
9
  import { ConfigureOptions } from "nunjucks";
11
10
  import { LocalsObject, Options as Options$1 } from "pug";
12
- //#region src/exceptions/nestjs-pdf.exception.d.ts
13
11
  export declare enum NestjsPdfErrorCode {
14
12
  ENGINE_NOT_AVAILABLE = "ENGINE_NOT_AVAILABLE",
15
13
  TEMPLATE_CONFIGURATION_ERROR = "TEMPLATE_CONFIGURATION_ERROR",
@@ -19,7 +17,8 @@ export declare enum NestjsPdfErrorCode {
19
17
  PDF_GENERATION_ERROR = "PDF_GENERATION_ERROR",
20
18
  SIGNATURE_DEPENDENCY_ERROR = "SIGNATURE_DEPENDENCY_ERROR",
21
19
  SIGNATURE_PLACEMENT_ERROR = "SIGNATURE_PLACEMENT_ERROR",
22
- WATERMARK_ERROR = "WATERMARK_ERROR"
20
+ WATERMARK_ERROR = "WATERMARK_ERROR",
21
+ RENDERER_CONFIGURATION_ERROR = "RENDERER_CONFIGURATION_ERROR"
23
22
  }
24
23
  export declare abstract class NestjsPdfException extends Error {
25
24
  abstract readonly code: NestjsPdfErrorCode;
@@ -27,44 +26,34 @@ export declare abstract class NestjsPdfException extends Error {
27
26
  cause?: unknown;
28
27
  });
29
28
  }
30
- //#endregion
31
- //#region src/exceptions/browser-installation.exception.d.ts
32
29
  export declare class BrowserInstallationException extends NestjsPdfException {
33
30
  readonly code = NestjsPdfErrorCode.BROWSER_INSTALLATION_ERROR;
34
31
  }
35
- //#endregion
36
- //#region src/exceptions/browser-unavailable.exception.d.ts
37
32
  export declare class BrowserUnavailableException extends NestjsPdfException {
38
33
  readonly code = NestjsPdfErrorCode.BROWSER_UNAVAILABLE;
39
34
  }
40
- //#endregion
41
- //#region src/exceptions/engine-not-available.exception.d.ts
42
35
  export declare class EngineNotAvailableException extends NestjsPdfException {
43
36
  readonly code = NestjsPdfErrorCode.ENGINE_NOT_AVAILABLE;
44
- constructor(engineName: string);
37
+ constructor(engineName: string, packageName?: string, options?: {
38
+ cause?: unknown;
39
+ });
45
40
  }
46
- //#endregion
47
- //#region src/exceptions/pdf-generation.exception.d.ts
48
41
  export declare class PdfGenerationException extends NestjsPdfException {
49
42
  readonly code = NestjsPdfErrorCode.PDF_GENERATION_ERROR;
50
43
  }
51
- //#endregion
52
- //#region src/exceptions/signature-dependency.exception.d.ts
44
+ /** The PDF provider is misconfigured, or asked for an option it does not support. */
45
+ export declare class RendererConfigurationException extends NestjsPdfException {
46
+ readonly code = NestjsPdfErrorCode.RENDERER_CONFIGURATION_ERROR;
47
+ }
53
48
  export declare class SignatureDependencyException extends NestjsPdfException {
54
49
  readonly code = NestjsPdfErrorCode.SIGNATURE_DEPENDENCY_ERROR;
55
50
  }
56
- //#endregion
57
- //#region src/exceptions/signature-placement.exception.d.ts
58
51
  export declare class SignaturePlacementException extends NestjsPdfException {
59
52
  readonly code = NestjsPdfErrorCode.SIGNATURE_PLACEMENT_ERROR;
60
53
  }
61
- //#endregion
62
- //#region src/exceptions/template-configuration.exception.d.ts
63
54
  export declare class TemplateConfigurationException extends NestjsPdfException {
64
55
  readonly code = NestjsPdfErrorCode.TEMPLATE_CONFIGURATION_ERROR;
65
56
  }
66
- //#endregion
67
- //#region src/exceptions/template-render.exception.d.ts
68
57
  export declare class TemplateRenderException extends NestjsPdfException {
69
58
  readonly engine: string;
70
59
  readonly code = NestjsPdfErrorCode.TEMPLATE_RENDER_ERROR;
@@ -72,13 +61,9 @@ export declare class TemplateRenderException extends NestjsPdfException {
72
61
  cause?: unknown;
73
62
  });
74
63
  }
75
- //#endregion
76
- //#region src/exceptions/watermark.exception.d.ts
77
64
  export declare class WatermarkException extends NestjsPdfException {
78
65
  readonly code = NestjsPdfErrorCode.WATERMARK_ERROR;
79
66
  }
80
- //#endregion
81
- //#region src/helpers/getRelativePath.helper.d.ts
82
67
  /**
83
68
  * Get the relative path to a value from the module directory.
84
69
  * @param moduleDir the path of the module, typically __dirname
@@ -89,8 +74,6 @@ export declare class WatermarkException extends NestjsPdfException {
89
74
  * // returns 'context/pdf/templates/my-template.hbs' if the current working directory is '/
90
75
  */
91
76
  export declare function getRelativePathToValue(moduleDir: string, relativeToModule: string): string;
92
- //#endregion
93
- //#region src/helpers/request-guard.helper.d.ts
94
77
  /**
95
78
  * Filters what the rendered HTML may load (SSRF protection). Disabled unless set:
96
79
  * pass `{}` for the defaults (private networks and `file:` blocked).
@@ -114,8 +97,6 @@ interface PdfSecurityOptions {
114
97
  /** Set to false to disable JavaScript in the rendered page. Default: true */
115
98
  javascriptEnabled?: boolean;
116
99
  }
117
- //#endregion
118
- //#region src/helpers/watermark.helper.d.ts
119
100
  interface WatermarkOptions {
120
101
  /** Text to stamp. At least one of `text` or `image` is required. */
121
102
  text?: string;
@@ -140,8 +121,222 @@ interface WatermarkOptions {
140
121
  /** 1-based page numbers to watermark. Default: all pages */
141
122
  pages?: Array<number>;
142
123
  }
143
- //#endregion
144
- //#region src/puppeteer/browser/browser.service.d.ts
124
+ /**
125
+ * Options passed as an object to the mjml2html function
126
+ *
127
+ * https://documentation.mjml.io/#inside-node-js
128
+ */
129
+ interface MJMLParsingOptions {
130
+ /**
131
+ * Default fonts imported in the HTML rendered by HTML
132
+ * ie. { 'Open Sans': 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700' }
133
+ *
134
+ * default: @see https://github.com/mjmlio/mjml/blob/master/packages/mjml-core/src/index.js
135
+ */
136
+ fonts?: {
137
+ [key: string]: string;
138
+ } | undefined;
139
+ /**
140
+ * Option to keep comments in the HTML output
141
+ * default: true
142
+ */
143
+ keepComments?: boolean | undefined;
144
+ /**
145
+ * Beautify the HTML output using prettier (parser: 'html', printWidth: 240).
146
+ * Mutually exclusive with minify — if minify is true, beautify is skipped.
147
+ * Note: the CLI defaults this to true; the programmatic API defaults to false.
148
+ * default: false
149
+ */
150
+ beautify?: boolean | undefined;
151
+ /**
152
+ * Minify the HTML output using htmlnano (with cssnano-preset-lite for CSS).
153
+ * Takes priority over beautify when both are true.
154
+ * default: false
155
+ */
156
+ minify?: boolean | undefined;
157
+ /**
158
+ * Options passed to htmlnano when minify is true.
159
+ * The minifyCss field accepts false, true, 'lite', or a cssnano options object.
160
+ * All htmlnano v3 options are accepted.
161
+ */
162
+ minifyOptions?: MJMLMinifyOptions | undefined;
163
+ /**
164
+ * How to validate your MJML
165
+ *
166
+ * skip: your document is rendered without going through validation
167
+ * soft: your document is going through validation and is rendered, even if it has errors
168
+ * strict: your document is going through validation and is not rendered if it has any error
169
+ *
170
+ * default: soft
171
+ */
172
+ validationLevel?: "strict" | "soft" | "skip" | undefined;
173
+ /**
174
+ * Full path of the specified file to use when resolving paths from mj-include components
175
+ * default: '.'
176
+ */
177
+ filePath?: string | undefined;
178
+ /**
179
+ * Directory (or directories) outside the template's own folder from which mj-include
180
+ * partials may be loaded. Added in mjml 5.1 as part of the include path-traversal hardening;
181
+ * includes resolving outside these allowed roots are denied.
182
+ */
183
+ includePath?: string | string[] | undefined;
184
+ /**
185
+ * The path or directory of the .mjmlconfig file
186
+ * default: process.cwd()
187
+ */
188
+ mjmlConfigPath?: string | undefined;
189
+ /**
190
+ * Use the config attribute defined in the .mjmlconfig file.
191
+ * The config passed into mjml2html overrides the .mjmlconfig.
192
+ * default: false
193
+ */
194
+ useMjmlConfigOptions?: boolean | undefined;
195
+ /**
196
+ * optional setting when inlining css, see mjml-cli documentation for more info
197
+ */
198
+ juicePreserveTags?: {
199
+ [index: string]: {
200
+ start: string;
201
+ end: string;
202
+ };
203
+ } | undefined;
204
+ juiceOptions?: any;
205
+ /**
206
+ * undocumented
207
+ * a function returning html skeleton
208
+ * default: see mjml-core/src/helpers/skeleton.js
209
+ */
210
+ skeleton?: string | (() => string) | undefined;
211
+ actualPath?: string | undefined;
212
+ /**
213
+ * undocumented
214
+ * ignore mj-include elements
215
+ * default: false
216
+ */
217
+ ignoreIncludes?: any;
218
+ /**
219
+ * see mjml-parser-xml
220
+ */
221
+ preprocessors?: Array<((xml: string) => string)> | undefined;
222
+ /**
223
+ * Add media queries specific to printer when converting mjml into html. When enabling this option,
224
+ * the html might not be compatible with all email clients anymore.
225
+ */
226
+ printerSupport?: boolean | undefined;
227
+ }
228
+ interface MJMLMinifyOptions {
229
+ collapseWhitespace?: boolean | undefined;
230
+ /**
231
+ * CSS minification options passed to cssnano-preset-lite.
232
+ * Accepts false (disable), true/'lite' (use lite preset), or a cssnano options object.
233
+ * @see https://cssnano.co/docs/presets
234
+ */
235
+ minifyCss?: boolean | "lite" | {
236
+ preset?: any;
237
+ plugins?: any[];
238
+ configFile?: string;
239
+ } | undefined;
240
+ /** @deprecated use minifyCss instead */
241
+ minifyCSS?: boolean | undefined;
242
+ removeEmptyAttributes?: boolean | undefined;
243
+ minifyJs?: boolean | undefined;
244
+ removeComments?: false | "safe" | "all" | undefined;
245
+ }
246
+ type LowerCasePaperFormat = 'letter' | 'legal' | 'tabloid' | 'ledger' | 'a0' | 'a1' | 'a2' | 'a3' | 'a4' | 'a5' | 'a6';
247
+ /** Paper format, as Puppeteer's `PaperFormat`. */
248
+ type PdfPaperFormat = Uppercase<LowerCasePaperFormat> | Capitalize<LowerCasePaperFormat> | LowerCasePaperFormat;
249
+ /** Page margins: a number of pixels, or a string with a px/in/cm/mm unit. */
250
+ interface PdfMargin {
251
+ top?: string | number;
252
+ bottom?: string | number;
253
+ left?: string | number;
254
+ right?: string | number;
255
+ }
256
+ /**
257
+ * Page options, same shape as Puppeteer's `PDFOptions`. Remote providers
258
+ * translate the size, margins, orientation, backgrounds, scale, page ranges
259
+ * and header/footer templates; `path`, `timeout` and `waitForFonts` are
260
+ * Puppeteer only.
261
+ */
262
+ interface PdfOptions {
263
+ scale?: number;
264
+ displayHeaderFooter?: boolean;
265
+ headerTemplate?: string;
266
+ footerTemplate?: string;
267
+ printBackground?: boolean;
268
+ landscape?: boolean;
269
+ pageRanges?: string;
270
+ format?: PdfPaperFormat;
271
+ width?: string | number;
272
+ height?: string | number;
273
+ preferCSSPageSize?: boolean;
274
+ margin?: PdfMargin;
275
+ path?: string;
276
+ omitBackground?: boolean;
277
+ tagged?: boolean;
278
+ outline?: boolean;
279
+ timeout?: number;
280
+ waitForFonts?: boolean;
281
+ }
282
+ /** Browser to install, as the `Browser` enum of `@puppeteer/browsers` (its values are accepted). */
283
+ type PdfBrowser = 'chrome' | 'chrome-headless-shell' | 'chromium' | 'firefox' | 'chromedriver';
284
+ /** Renders the PDF with a local Chromium driven by Puppeteer (default). */
285
+ interface PuppeteerProviderOptions {
286
+ type: 'puppeteer';
287
+ }
288
+ /** Renders the PDF on a Gotenberg server (https://gotenberg.dev), Chromium route. */
289
+ interface GotenbergProviderOptions {
290
+ type: 'gotenberg';
291
+ /** Base URL of the Gotenberg server, e.g. `http://localhost:3000`. */
292
+ url: string;
293
+ /** Credentials when Gotenberg runs with `--api-enable-basic-auth`. */
294
+ basicAuth?: {
295
+ username: string;
296
+ password: string;
297
+ };
298
+ /** Extra headers sent with every request (e.g. an `Authorization` bearer for a proxy). */
299
+ headers?: Record<string, string>;
300
+ }
301
+ /** Renders the PDF with the Api2Pdf SaaS (https://www.api2pdf.com), Chrome endpoint. */
302
+ interface Api2PdfProviderOptions {
303
+ type: 'api2pdf';
304
+ /** Api2Pdf API key, sent as the `Authorization` header. */
305
+ apiKey: string;
306
+ /** API base URL. Default: `https://v2.api2pdf.com` */
307
+ baseUrl?: string;
308
+ /** Extra headers sent with every request. */
309
+ headers?: Record<string, string>;
310
+ }
311
+ type PdfProviderOptions = PuppeteerProviderOptions | GotenbergProviderOptions | Api2PdfProviderOptions;
312
+ /** A file sent to Gotenberg next to `index.html`, so the HTML can reference it by name. */
313
+ interface GotenbergAsset {
314
+ /** File name, as referenced from the HTML (e.g. `logo.png`, `style.css`). */
315
+ filename: string;
316
+ content: Uint8Array | string;
317
+ /** MIME type. Default: `application/octet-stream` */
318
+ contentType?: string;
319
+ }
320
+ /** Per-call options only read by the Gotenberg provider. */
321
+ interface GotenbergRenderOptions {
322
+ /** Local files (images, fonts, CSS...) the HTML references by relative name. */
323
+ assets?: Array<GotenbergAsset>;
324
+ /**
325
+ * Raw Gotenberg form fields (e.g. `{ pdfa: 'PDF/A-2b', waitDelay: '1s' }`),
326
+ * sent after the ones derived from `pdfOptions`, so they win.
327
+ */
328
+ formFields?: Record<string, string>;
329
+ }
330
+ /** Per-call options only read by the Api2Pdf provider. */
331
+ interface Api2PdfRenderOptions {
332
+ /** Name of the generated file on Api2Pdf's side. */
333
+ fileName?: string;
334
+ /**
335
+ * Raw Api2Pdf Chrome `options` (e.g. `{ delay: 500 }`), merged over the ones
336
+ * derived from `pdfOptions`, so they win.
337
+ */
338
+ options?: Record<string, unknown>;
339
+ }
145
340
  declare enum BrowserTag {
146
341
  LATEST = "latest",
147
342
  BETA = "beta",
@@ -149,40 +344,14 @@ declare enum BrowserTag {
149
344
  STABLE = "stable",
150
345
  CANARY = "canary"
151
346
  }
152
- type Headless = boolean | 'shell' | undefined;
153
- declare class BrowserService implements OnModuleDestroy {
154
- #private;
155
- activeJobs: number;
156
- totalJobs: number;
157
- /** Max time to wait for in-flight PDF jobs to finish before closing the browser on shutdown. */
158
- shutdownDrainTimeoutMs: number;
159
- constructor(pdfParams: PuppeteerParameters);
160
- onModuleDestroy(): Promise<void>;
161
- getBrowserInstance(args: Array<string>, headless: boolean | 'shell' | undefined, executablePathBin: string | undefined): Promise<Browser>;
162
- createContext(args: Array<string>, headless: Headless, executablePath?: string): Promise<BrowserContext>;
163
- markJobStarted(): void;
164
- markJobFinished(): Promise<void>;
165
- recycleBrowserIfNeeded(): Promise<void>;
166
- install(lock?: boolean): Promise<import("@puppeteer/browsers").InstalledBrowser | null | undefined>;
167
- getBrowser(): Browser$1;
168
- setBrowserTag(browserTag: BrowserTag): void;
169
- getBrowserTag(): BrowserTag;
170
- getBuildId(): string | undefined;
171
- hasBrowserInstalled(browser: Browser$1, buildId: string): Promise<boolean>;
172
- getExecutablePath(): Promise<string>;
173
- getLockedBuildId(browser: Browser$1): string | null;
174
- }
175
- //#endregion
176
- //#region src/puppeteer/engines/ejs/ejs.service.d.ts
177
347
  export interface EjsOptions extends Omit<Options, 'async'> {
178
348
  async?: boolean;
179
349
  }
180
350
  export declare class EjsService {
351
+ #private;
181
352
  render(template: string, data?: Data, options?: EjsOptions): Promise<string>;
182
353
  renderFile(filePath: string, data?: Data, options?: EjsOptions): Promise<string>;
183
354
  }
184
- //#endregion
185
- //#region src/puppeteer/engines/eta/eta.service.d.ts
186
355
  export interface EtaOptions extends Partial<EtaConfig> {
187
356
  cache?: boolean;
188
357
  autoEscape?: boolean;
@@ -193,7 +362,6 @@ export interface EtaOptions extends Partial<EtaConfig> {
193
362
  }
194
363
  export declare class EtaService {
195
364
  #private;
196
- constructor();
197
365
  /**
198
366
  * Render an Eta template from a string
199
367
  * @param template The template string to render
@@ -220,8 +388,6 @@ export declare class EtaService {
220
388
  */
221
389
  getCacheSize(): number;
222
390
  }
223
- //#endregion
224
- //#region src/puppeteer/engines/handlebars/handlebars.service.d.ts
225
391
  export type HandlebarsHelper = {
226
392
  name: string;
227
393
  fn: Handlebars.HelperDelegate;
@@ -247,8 +413,35 @@ export declare class HandlebarsService {
247
413
  render(template: string, parameters?: unknown, options?: HandlebarsOptions): string;
248
414
  renderFile(file: string, parameters?: unknown, options?: HandlebarsOptions): string;
249
415
  }
250
- //#endregion
251
- //#region src/puppeteer/engines/mustache/mustache.service.d.ts
416
+ export type LiquidOptions = LiquidOptions$1;
417
+ export declare class LiquidService {
418
+ #private;
419
+ /**
420
+ * Render a Liquid template from a string
421
+ * @param template The template string to render
422
+ * @param data The data object to use for rendering
423
+ * @param options Optional Liquid engine options
424
+ * @returns The rendered HTML string
425
+ */
426
+ render(template: string, data?: Record<string, unknown>, options?: LiquidOptions): string;
427
+ /**
428
+ * Render a Liquid template from a file
429
+ * @param filePath The path to the template file
430
+ * @param data The data object to use for rendering
431
+ * @param options Optional Liquid engine options
432
+ * @returns The rendered HTML string
433
+ */
434
+ renderFile(filePath: string, data?: Record<string, unknown>, options?: LiquidOptions): string;
435
+ /**
436
+ * Clear the template cache
437
+ */
438
+ clearCache(): void;
439
+ /**
440
+ * Get the current cache size
441
+ * @returns The number of cached templates
442
+ */
443
+ getCacheSize(): number;
444
+ }
252
445
  export interface MustacheOptions {
253
446
  tags?: [string, string];
254
447
  escape?: EscapeFunction;
@@ -281,8 +474,6 @@ export declare class MustacheService {
281
474
  */
282
475
  getCacheSize(): number;
283
476
  }
284
- //#endregion
285
- //#region src/puppeteer/engines/nunjucks/nunjucks.service.d.ts
286
477
  export interface NunjucksOptions extends Partial<ConfigureOptions> {
287
478
  noCache?: boolean;
288
479
  watch?: boolean;
@@ -291,21 +482,31 @@ export interface NunjucksOptions extends Partial<ConfigureOptions> {
291
482
  lstripBlocks?: boolean;
292
483
  }
293
484
  export declare class NunjucksService {
294
- constructor();
485
+ #private;
295
486
  render(template: string, data?: Record<string, unknown>, options?: NunjucksOptions): string;
296
487
  renderFile(filePath: string, data?: Record<string, unknown>, options?: NunjucksOptions): string;
297
488
  }
298
- //#endregion
299
- //#region src/puppeteer/engines/pug/pug.service.d.ts
300
489
  export type PugOptions = Options$1;
301
490
  export declare class PugService {
491
+ #private;
302
492
  render(template: string, data?: LocalsObject, options?: PugOptions): string;
303
493
  renderFile(filePath: string, data?: LocalsObject, options?: PugOptions): string;
304
494
  }
305
- //#endregion
306
- //#region src/puppeteer/puppeteer-parameters.interface.d.ts
307
495
  export interface PuppeteerParameters {
308
- pdfOptions?: PDFOptions;
496
+ /**
497
+ * Who prints the PDF: a local Chromium (`puppeteer`, default), a Gotenberg
498
+ * server or the Api2Pdf API. Module-level only: ignored in per-call options.
499
+ */
500
+ provider?: PdfProviderOptions;
501
+ /**
502
+ * Page options. Remote providers translate the size, margins, orientation,
503
+ * backgrounds, scale, page ranges and header/footer templates.
504
+ */
505
+ pdfOptions?: PdfOptions;
506
+ /** Options only read by the Gotenberg provider. */
507
+ gotenbergOptions?: GotenbergRenderOptions;
508
+ /** Options only read by the Api2Pdf provider. */
509
+ api2pdfOptions?: Api2PdfRenderOptions;
309
510
  /**
310
511
  * Cancels the generation when aborted, including while it waits for a free slot.
311
512
  * The promise rejects with `signal.reason`; use `AbortSignal.timeout(ms)` for a timeout.
@@ -313,6 +514,7 @@ export interface PuppeteerParameters {
313
514
  signal?: AbortSignal;
314
515
  /** Watermark stamped on the generated PDF. */
315
516
  watermark?: WatermarkOptions;
517
+ /** Request filter (SSRF protection). Puppeteer provider only. */
316
518
  security?: PdfSecurityOptions;
317
519
  hbsOptions?: HandlebarsOptions;
318
520
  mjmlOptions?: MJMLParsingOptions;
@@ -321,10 +523,11 @@ export interface PuppeteerParameters {
321
523
  nunjucksOptions?: NunjucksOptions;
322
524
  etaOptions?: EtaOptions;
323
525
  mustacheOptions?: MustacheOptions;
526
+ liquidOptions?: LiquidOptions;
324
527
  chromiumRevision?: string;
325
528
  buildId?: string;
326
529
  headless?: boolean | 'shell';
327
- browser?: Browser$1;
530
+ browser?: PdfBrowser;
328
531
  browserTag?: BrowserTag;
329
532
  useLockedBrowser?: boolean;
330
533
  browserInstallBaseUrl?: string;
@@ -332,8 +535,6 @@ export interface PuppeteerParameters {
332
535
  executablePath?: string;
333
536
  cleanupBrowserCacheOnExit?: boolean;
334
537
  }
335
- //#endregion
336
- //#region src/nestjs-pdf.module.d.ts
337
538
  export interface PdfLibModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
338
539
  inject?: Array<any>;
339
540
  useFactory: (...args: Array<any>) => any;
@@ -342,17 +543,31 @@ export declare class NestjsPdfModule {
342
543
  static forRoot(options: PuppeteerParameters): DynamicModule;
343
544
  static forRootAsync(options: PdfLibModuleAsyncOptions): DynamicModule;
344
545
  }
345
- //#endregion
346
- //#region src/puppeteer/engines/mjml/mjml.service.d.ts
546
+ /** Turns an HTML document into a PDF. One implementation per provider. */
547
+ interface PdfRenderer {
548
+ /**
549
+ * @param html the HTML document to print
550
+ * @param options the generation options, already merged with the module defaults
551
+ * @param signal aborts the rendering; the promise then rejects
552
+ */
553
+ render(html: string, options: PuppeteerParameters, signal?: AbortSignal): Promise<Uint8Array>;
554
+ }
347
555
  export declare class MjmlService {
556
+ #private;
348
557
  render(template: string, options?: MJMLParsingOptions): Promise<string>;
349
558
  renderFile(filePath: string, options?: MJMLParsingOptions): Promise<string>;
350
559
  }
351
- //#endregion
352
- //#region src/puppeteer/puppeteer.service.d.ts
560
+ /**
561
+ * The part of BrowserService used here. Typed as an interface so the public
562
+ * declarations of PuppeteerService do not pull Puppeteer's types in.
563
+ */
564
+ interface PdfJobTracker {
565
+ markJobStarted(): void;
566
+ markJobFinished(): Promise<void>;
567
+ }
353
568
  export declare class PuppeteerService {
354
569
  #private;
355
- constructor(browserService: BrowserService, options: PuppeteerParameters, hbsService?: HandlebarsService, mjmlService?: MjmlService, pugService?: PugService, ejsService?: EjsService, nunjucksService?: NunjucksService, etaService?: EtaService, mustacheService?: MustacheService);
570
+ constructor(renderer: PdfRenderer, jobs: PdfJobTracker, options: PuppeteerParameters, hbsService?: HandlebarsService, mjmlService?: MjmlService, pugService?: PugService, ejsService?: EjsService, nunjucksService?: NunjucksService, etaService?: EtaService, mustacheService?: MustacheService, liquidService?: LiquidService);
356
571
  generatePdfFromHtml(html: string, options?: PuppeteerParameters): Promise<Uint8Array>;
357
572
  generatePdfFromTemplateHbsString(template: string, parameters?: any, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
358
573
  generatePdfFromTemplateHbsFile(file: string, parameters?: any, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
@@ -368,9 +583,9 @@ export declare class PuppeteerService {
368
583
  generatePdfFromEtaFile(file: string, data?: Record<string, unknown>, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
369
584
  generatePdfFromMustacheString(template: string, data?: Record<string, unknown>, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
370
585
  generatePdfFromMustacheFile(file: string, data?: Record<string, unknown>, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
586
+ generatePdfFromLiquidString(template: string, data?: Record<string, unknown>, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
587
+ generatePdfFromLiquidFile(file: string, data?: Record<string, unknown>, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
371
588
  }
372
- //#endregion
373
- //#region src/nestjs-pdf.service.d.ts
374
589
  export declare class NestjsPdfService {
375
590
  #private;
376
591
  constructor(puppeteerService: PuppeteerService);
@@ -491,6 +706,22 @@ export declare class NestjsPdfService {
491
706
  * @description This method generates a PDF from a Mustache template located at the specified file path. The file path is passed as a string in the `file` parameter. The data to inject into the template is passed in the `data` object, which is used to render the template before converting it to PDF. PDF generation options can be customized by passing a `PuppeteerParameters` object as the third argument.
492
707
  */
493
708
  generatePdfFromMustacheFile(file: string, data?: Record<string, unknown>, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
709
+ /**
710
+ * @param template Liquid template string
711
+ * @param data Data to inject into the template
712
+ * @param options PDF generation options (optional)
713
+ * @returns PDF generated from the provided Liquid template with data applied
714
+ * @description This method generates a PDF from a Liquid template provided as a string. Liquid is a safe, Shopify-compatible template language with filters, tags, partials and layouts. The data to inject into the template is passed in the `data` object, which is used to render the template before converting it to PDF. PDF generation options can be customized by passing a `PuppeteerParameters` object as the third argument.
715
+ */
716
+ generatePdfFromLiquidString(template: string, data?: Record<string, unknown>, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
717
+ /**
718
+ * @param file Path to the Liquid template file
719
+ * @param data Data to inject into the template
720
+ * @param options PDF generation options (optional)
721
+ * @returns PDF generated from the Liquid template at the provided file path with data applied
722
+ * @description This method generates a PDF from a Liquid template located at the specified file path. The file path is passed as a string in the `file` parameter. The data to inject into the template is passed in the `data` object, which is used to render the template before converting it to PDF. PDF generation options can be customized by passing a `PuppeteerParameters` object as the third argument.
723
+ */
724
+ generatePdfFromLiquidFile(file: string, data?: Record<string, unknown>, options?: PuppeteerParameters): Promise<Uint8Array<ArrayBufferLike>>;
494
725
  /**
495
726
  * @param pdf The PDF bytes to modify
496
727
  * @param fieldName The name of the signature field to add (default: 'SignatureDebtor')
@@ -533,19 +764,20 @@ export declare class NestjsPdfService {
533
764
  */
534
765
  addWatermark(pdf: Uint8Array | Buffer, options: WatermarkOptions): Promise<Uint8Array<ArrayBufferLike>>;
535
766
  }
536
- //#endregion
537
- //#region src/puppeteer/puppeteer.module.d.ts
538
767
  export interface PuppeteerModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
539
768
  inject?: Array<InjectionToken | OptionalFactoryDependency>;
540
769
  useFactory: (...args: Array<any>) => Promise<PuppeteerParameters> | PuppeteerParameters;
541
770
  }
771
+ /** The part of BrowserService used here: keeps Puppeteer's types out of the public declarations. */
772
+ interface BrowserInstaller {
773
+ install(useLockedBrowser: boolean): Promise<void>;
774
+ }
542
775
  export declare class PuppeteerModule implements OnModuleInit {
543
776
  #private;
544
- constructor(browserService: BrowserService, pdfParams: PuppeteerParameters);
777
+ constructor(browserService: BrowserInstaller, pdfParams: PuppeteerParameters);
545
778
  onModuleInit(): Promise<void>;
546
779
  static forRoot(pdfParameters: PuppeteerParameters): DynamicModule;
547
780
  static forRootAsync(options: PuppeteerModuleAsyncOptions): DynamicModule;
548
781
  }
549
- //#endregion
550
- export type { PdfSecurityOptions, WatermarkOptions };
782
+ export type { Api2PdfProviderOptions, Api2PdfRenderOptions, GotenbergAsset, GotenbergProviderOptions, GotenbergRenderOptions, PdfBrowser, PdfMargin, PdfOptions, PdfPaperFormat, PdfProviderOptions, PdfSecurityOptions, PuppeteerProviderOptions, WatermarkOptions };
551
783
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/exceptions/nestjs-pdf.exception.ts","../src/exceptions/browser-installation.exception.ts","../src/exceptions/browser-unavailable.exception.ts","../src/exceptions/engine-not-available.exception.ts","../src/exceptions/pdf-generation.exception.ts","../src/exceptions/signature-dependency.exception.ts","../src/exceptions/signature-placement.exception.ts","../src/exceptions/template-configuration.exception.ts","../src/exceptions/template-render.exception.ts","../src/exceptions/watermark.exception.ts","../src/helpers/getRelativePath.helper.ts","../src/helpers/request-guard.helper.ts","../src/helpers/watermark.helper.ts","../src/puppeteer/browser/browser.service.ts","../src/puppeteer/engines/ejs/ejs.service.ts","../src/puppeteer/engines/eta/eta.service.ts","../src/puppeteer/engines/handlebars/handlebars.service.ts","../src/puppeteer/engines/mustache/mustache.service.ts","../src/puppeteer/engines/nunjucks/nunjucks.service.ts","../src/puppeteer/engines/pug/pug.service.ts","../src/puppeteer/puppeteer-parameters.interface.ts","../src/nestjs-pdf.module.ts","../src/puppeteer/engines/mjml/mjml.service.ts","../src/puppeteer/puppeteer.service.ts","../src/nestjs-pdf.service.ts","../src/puppeteer/puppeteer.module.ts"],"mappings":";;;;;;;;;;;;oBAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;8BAGoB,2BAA2B;oBAC7B,MAAM;EAEZ,YAAA,iBAAiB;IAAY;;;;;qBCb9B,qCAAqC;WAC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;;;;;;;;EAY/B,yBACE,kBACA,OAAM,cACN,UAAU,sBAAmB,QAAA,WAAA;;;;;;;;EAgB/B,uBACE,cACA,OAAM,cACN,UAAU,sBAAmB,QAAA,WAAA;;;;;;;;EAY/B,8BACE,kBACA,OAAM,yBACN,UAAU,sBAAmB,QAAA,WAAA;;;;;;;;EAgB/B,4BACE,cACA,OAAM,yBACN,UAAU,sBAAmB,QAAA,WAAA;;;;;;;;EAgB/B,yBACE,kBACA,OAAM,yBACN,UAAU,sBAAmB,QAAA,WAAA;;;;;;;;EAgB/B,uBACE,cACA,OAAM,yBACN,UAAU,sBAAmB,QAAA,WAAA;;;;;;;;EAY/B,8BACE,kBACA,OAAM,yBACN,UAAU,sBAAmB,QAAA,WAAA;;;;;;;;EAgB/B,4BACE,cACA,OAAM,yBACN,UAAU,sBAAmB,QAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;EA+BzB,oCACJ,KAAK,aAAa,QAClB,oBACA,sBAA4C,QAAA,WAAA;;;;;;;;;;;;;;;;;;EAsBxC,aAAa,KAAK,aAAa,QAAQ,SAAS,mBAAgB,QAAA,WAAA;;;;iBClSvD,oCAAoC,KACnD;EAGA,SAAS,MAAM,iBAAiB;EAChC,gBACK,MAAM,eACN,QAAQ,uBAAuB;;qBAwBzB,2BAA2B;;EAKpC,YAAA,gBAAgB,gBACQ,WAAW;EAM/B,gBAAY;SAQX,QAAQ,eAAe,sBAAsB;SA8B7C,aAAa,SAAS,8BAA8B"}
1
+ {"version":3,"file":"index.d.cts","names":["LiquidJsOptions","Options"],"sources":["../src/exceptions/nestjs-pdf.exception.ts","../src/exceptions/browser-installation.exception.ts","../src/exceptions/browser-unavailable.exception.ts","../src/exceptions/engine-not-available.exception.ts","../src/exceptions/pdf-generation.exception.ts","../src/exceptions/renderer-configuration.exception.ts","../src/exceptions/signature-dependency.exception.ts","../src/exceptions/signature-placement.exception.ts","../src/exceptions/template-configuration.exception.ts","../src/exceptions/template-render.exception.ts","../src/exceptions/watermark.exception.ts","../src/helpers/getRelativePath.helper.ts","../src/helpers/request-guard.helper.ts","../src/helpers/watermark.helper.ts","../node_modules/.pnpm/@types+mjml-core@5.1.1/node_modules/@types/mjml-core/index.d.ts","../src/renderers/pdf-options.interface.ts","../src/renderers/pdf-provider.interface.ts","../src/puppeteer/browser/browser.service.ts","../src/puppeteer/engines/ejs/ejs.service.ts","../src/puppeteer/engines/eta/eta.service.ts","../src/puppeteer/engines/handlebars/handlebars.service.ts","../src/puppeteer/engines/liquid/liquid.service.ts","../src/puppeteer/engines/mustache/mustache.service.ts","../src/puppeteer/engines/nunjucks/nunjucks.service.ts","../src/puppeteer/engines/pug/pug.service.ts","../src/puppeteer/puppeteer-parameters.interface.ts","../src/nestjs-pdf.module.ts","../src/renderers/pdf-renderer.interface.ts","../src/puppeteer/engines/mjml/mjml.service.ts","../src/puppeteer/puppeteer.service.ts","../src/nestjs-pdf.service.ts","../src/puppeteer/puppeteer.module.ts"],"ignoreList":[14],"mappings":";;;;;;;;;;oBAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;8BAGoB,2BAA2B;oBAC7B,MAAM;EAEZ,YAAA,iBAAiB;IAAY;;;qBCd9B,qCAAqC;WACvC,OAAI,mBAAA;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;EAGX,YAAA,oBACA,sBACA;IAAY;;;qBCNH,+BAA+B;WACjC,OAAI,mBAAA;;;qBCAF,uCAAuC;WACzC,OAAI,mBAAA;;qBCFF,qCAAqC;WACvC,OAAI,mBAAA;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;;qBCDF,uCAAuC;WACzC,OAAI,mBAAA;;qBCDF,gCAAgC;WAIzB;WAHT,OAAI,mBAAA;EAGK,YAAA,gBAChB,iBACA;IAAY;;;qBCNH,2BAA2B;WAC7B,OAAI,mBAAA;;;;;;;;;;;wBCQC,uBACd,mBACA;;;;;UCSe;;;;;EAKf;;;;;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