chromiumly 5.2.1 → 6.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.
Files changed (68) hide show
  1. package/README.md +663 -360
  2. package/dist/chromium/converters/html.converter.d.ts +2 -2
  3. package/dist/chromium/converters/html.converter.js +14 -4
  4. package/dist/chromium/converters/html.converter.js.map +1 -1
  5. package/dist/chromium/converters/markdown.converter.d.ts +2 -2
  6. package/dist/chromium/converters/markdown.converter.js +23 -5
  7. package/dist/chromium/converters/markdown.converter.js.map +1 -1
  8. package/dist/chromium/converters/url.converter.d.ts +2 -2
  9. package/dist/chromium/converters/url.converter.js +14 -4
  10. package/dist/chromium/converters/url.converter.js.map +1 -1
  11. package/dist/chromium/interfaces/common.types.d.ts +1 -0
  12. package/dist/chromium/interfaces/converter.types.d.ts +26 -17
  13. package/dist/chromium/interfaces/screenshot.types.d.ts +16 -7
  14. package/dist/chromium/screenshots/html.screenshot.d.ts +1 -2
  15. package/dist/chromium/screenshots/html.screenshot.js +8 -8
  16. package/dist/chromium/screenshots/html.screenshot.js.map +1 -1
  17. package/dist/chromium/screenshots/markdown.screenshot.d.ts +1 -2
  18. package/dist/chromium/screenshots/markdown.screenshot.js +14 -9
  19. package/dist/chromium/screenshots/markdown.screenshot.js.map +1 -1
  20. package/dist/chromium/screenshots/url.screenshot.d.ts +1 -2
  21. package/dist/chromium/screenshots/url.screenshot.js +4 -8
  22. package/dist/chromium/screenshots/url.screenshot.js.map +1 -1
  23. package/dist/chromium/utils/converter.utils.js +69 -43
  24. package/dist/chromium/utils/converter.utils.js.map +1 -1
  25. package/dist/chromium/utils/screenshot.utils.d.ts +0 -10
  26. package/dist/chromium/utils/screenshot.utils.js +6 -44
  27. package/dist/chromium/utils/screenshot.utils.js.map +1 -1
  28. package/dist/common/constants.d.ts +1 -0
  29. package/dist/common/constants.js +1 -0
  30. package/dist/common/constants.js.map +1 -1
  31. package/dist/common/factur-x.types.d.ts +24 -0
  32. package/dist/common/factur-x.types.js +3 -0
  33. package/dist/common/factur-x.types.js.map +1 -0
  34. package/dist/common/factur-x.utils.d.ts +6 -0
  35. package/dist/common/factur-x.utils.js +48 -0
  36. package/dist/common/factur-x.utils.js.map +1 -0
  37. package/dist/common/gotenberg.utils.d.ts +16 -2
  38. package/dist/common/gotenberg.utils.js +39 -6
  39. package/dist/common/gotenberg.utils.js.map +1 -1
  40. package/dist/common/index.d.ts +5 -1
  41. package/dist/common/index.js +5 -1
  42. package/dist/common/index.js.map +1 -1
  43. package/dist/common/pdf-engine-encryption.types.d.ts +14 -0
  44. package/dist/common/pdf-engine-encryption.types.js +3 -0
  45. package/dist/common/pdf-engine-encryption.types.js.map +1 -0
  46. package/dist/common/pdf-engine-encryption.utils.d.ts +7 -0
  47. package/dist/common/pdf-engine-encryption.utils.js +32 -0
  48. package/dist/common/pdf-engine-encryption.utils.js.map +1 -0
  49. package/dist/common/types.d.ts +29 -2
  50. package/dist/libre-office/interfaces/libre-office.types.d.ts +10 -5
  51. package/dist/libre-office/libre-office.d.ts +2 -2
  52. package/dist/libre-office/libre-office.js +12 -4
  53. package/dist/libre-office/libre-office.js.map +1 -1
  54. package/dist/libre-office/utils/constants.js +0 -2
  55. package/dist/libre-office/utils/constants.js.map +1 -1
  56. package/dist/libre-office/utils/libre-office.utils.js +8 -0
  57. package/dist/libre-office/utils/libre-office.utils.js.map +1 -1
  58. package/dist/main.config.d.ts +2 -0
  59. package/dist/main.config.js +2 -0
  60. package/dist/main.config.js.map +1 -1
  61. package/dist/pdf-engines/interfaces/pdf-engines.types.d.ts +18 -8
  62. package/dist/pdf-engines/pdf-engines.d.ts +56 -28
  63. package/dist/pdf-engines/pdf-engines.js +109 -28
  64. package/dist/pdf-engines/pdf-engines.js.map +1 -1
  65. package/dist/system/system.d.ts +20 -5
  66. package/dist/system/system.js +25 -10
  67. package/dist/system/system.js.map +1 -1
  68. package/package.json +85 -82
@@ -1,6 +1,6 @@
1
- import { PathLikeOrReadStream, PdfFormat, Metadata, PdfEngineStamp, PdfEngineWatermark } from '../common';
2
- import { DownloadFrom, WebhookOptions } from '../common/types';
3
- import { EncryptOptions, Bookmarks, MergeOptions, SplitEngineOptions } from './interfaces/pdf-engines.types';
1
+ import { FacturXOptions, PathLikeOrReadStream, Metadata, PdfEngineStamp, PdfEngineWatermark } from '../common';
2
+ import { DownloadFrom, EmbedsMetadata, OutputOptions, WebhookOptions } from '../common/types';
3
+ import { ConversionOptions, EncryptOptions, Bookmarks, MergeOptions, SplitEngineOptions } from './interfaces/pdf-engines.types';
4
4
  /**
5
5
  * Class uses PDF engines for various operations such as merging and conversion.
6
6
  */
@@ -15,10 +15,12 @@ export declare class PDFEngines {
15
15
  * @param {Metadata} [options.metadata] - Metadata to be written.
16
16
  * @param {DownloadFrom} [options.downloadFrom] - Download a file from a URL. It must return a Content-Disposition header with a filename parameter.
17
17
  * @param {boolean} [options.flatten] - Flatten the PDF document.
18
+ * @param {string} [options.userPassword] - Password for opening the resulting PDF.
19
+ * @param {string} [options.ownerPassword] - Password for full access on the resulting PDF.
18
20
  *
19
21
  * @returns {Promise<Buffer>} A Promise resolving to the merged PDF content as a buffer
20
22
  */
21
- static merge({ files, pdfa, pdfUA, metadata, downloadFrom, webhook, flatten, watermark, stamp, rotate }: MergeOptions & {
23
+ static merge({ files, pdfa, pdfUA, metadata, downloadFrom, webhook, flatten, bookmarks, autoIndexBookmarks, userPassword, ownerPassword, allowPrinting, allowCopying, allowModifying, allowAnnotating, allowFillingForms, allowAssembling, watermark, stamp, rotate, outputFilename, trace }: MergeOptions & {
22
24
  files: PathLikeOrReadStream[];
23
25
  }): Promise<Buffer>;
24
26
  /**
@@ -31,12 +33,8 @@ export declare class PDFEngines {
31
33
  * @param {DownloadFrom} [options.downloadFrom] - Download a file from a URL. It must return a Content-Disposition header with a filename parameter.
32
34
  * @returns {Promise<Buffer>} A Promise resolving to the converted PDF content as a buffer
33
35
  */
34
- static convert({ files, pdfa, pdfUA, downloadFrom, webhook }: {
36
+ static convert({ files, pdfa, pdfUA, downloadFrom, webhook, outputFilename, trace }: ConversionOptions & {
35
37
  files: PathLikeOrReadStream[];
36
- pdfa?: PdfFormat;
37
- pdfUA?: boolean;
38
- downloadFrom?: DownloadFrom;
39
- webhook?: WebhookOptions;
40
38
  }): Promise<Buffer>;
41
39
  /**
42
40
  * Splits a PDF file into multiple PDF files.
@@ -46,14 +44,17 @@ export declare class PDFEngines {
46
44
  * @param {Split} options.options - Split configuration specifying mode ('pages' or 'intervals'), span, and unify options.
47
45
  * @returns {Promise<Buffer>} A Promise resolving to the split PDF content as a buffer
48
46
  */
49
- static split({ files, options, webhook, watermark, stamp, rotate }: SplitEngineOptions): Promise<Buffer>;
47
+ static split({ files, options, webhook, pdfa, pdfUA, metadata, downloadFrom, userPassword, ownerPassword, allowPrinting, allowCopying, allowModifying, allowAnnotating, allowFillingForms, allowAssembling, watermark, stamp, rotate, outputFilename, trace }: SplitEngineOptions): Promise<Buffer>;
50
48
  /**
51
49
  * Flattens a PDF file.
52
50
  *
53
51
  * @param {PathLikeOrReadStream[]} files - An array of PathLikes or ReadStreams to the PDF files to be flattened.
52
+ * @param {WebhookOptions} [webhook] - Optional webhook delivery.
53
+ * @param {OutputOptions} [output] - Optional custom output filename and/or trace id.
54
+ * @param {DownloadFrom} [downloadFrom] - Download a file from a URL. It must return a Content-Disposition header with a filename parameter.
54
55
  * @returns {Promise<Buffer>} A Promise resolving to the flattened PDF content as a buffer
55
56
  */
56
- static flatten(files: PathLikeOrReadStream[], webhook?: WebhookOptions): Promise<Buffer>;
57
+ static flatten(files: PathLikeOrReadStream[], webhook?: WebhookOptions, output?: OutputOptions, downloadFrom?: DownloadFrom): Promise<Buffer>;
57
58
  /**
58
59
  * Rotates pages of one or more PDF files using the configured PDF engine.
59
60
  *
@@ -61,19 +62,26 @@ export declare class PDFEngines {
61
62
  * @param options.angle - Rotation angle in degrees (90, 180, or 270)
62
63
  * @param options.pages - Optional page ranges (e.g. '1-3', '5'); omit for all pages
63
64
  */
64
- static rotate({ files, angle, pages, webhook }: {
65
+ static rotate({ files, angle, pages, webhook, downloadFrom, outputFilename, trace }: {
65
66
  files: PathLikeOrReadStream[];
66
67
  angle: 90 | 180 | 270;
67
68
  pages?: string;
68
69
  webhook?: WebhookOptions;
69
- }): Promise<Buffer>;
70
+ downloadFrom?: DownloadFrom;
71
+ } & OutputOptions): Promise<Buffer>;
70
72
  /**
71
73
  * Reads metadata from the provided files.
72
74
  *
73
- * @param {PathLikeOrReadStream[]} files An array of PathLikes or ReadStreams to the PDF files.
75
+ * @param {Object} options - Options for the read metadata operation.
76
+ * @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the PDF files.
77
+ * @param {DownloadFrom} [options.downloadFrom] - Download a file from a URL. It must return a Content-Disposition header with a filename parameter.
74
78
  * @returns {Promise<Buffer>} A Promise resolving to the metadata buffer.
75
79
  */
76
- static readMetadata(files: PathLikeOrReadStream[], webhook?: WebhookOptions): Promise<Buffer>;
80
+ static readMetadata({ files, downloadFrom, webhook, outputFilename, trace }: {
81
+ files: PathLikeOrReadStream[];
82
+ downloadFrom?: DownloadFrom;
83
+ webhook?: WebhookOptions;
84
+ } & OutputOptions): Promise<Buffer>;
77
85
  /**
78
86
  * Writes metadata to the provided PDF files.
79
87
  *
@@ -81,17 +89,19 @@ export declare class PDFEngines {
81
89
  * @param {Metadata} metadata - Metadata to be written.
82
90
  * @returns {Promise<Buffer>} A Promise that resolves to the PDF file containing metadata as a buffer.
83
91
  */
84
- static writeMetadata({ files, metadata, webhook }: {
92
+ static writeMetadata({ files, metadata, webhook, downloadFrom, outputFilename, trace }: {
85
93
  files: PathLikeOrReadStream[];
86
94
  metadata: Metadata;
87
95
  webhook?: WebhookOptions;
88
- }): Promise<Buffer>;
89
- static readBookmarks(files: PathLikeOrReadStream[], webhook?: WebhookOptions): Promise<Buffer>;
90
- static writeBookmarks({ files, bookmarks, webhook }: {
96
+ downloadFrom?: DownloadFrom;
97
+ } & OutputOptions): Promise<Buffer>;
98
+ static readBookmarks(files: PathLikeOrReadStream[], webhook?: WebhookOptions, output?: OutputOptions, downloadFrom?: DownloadFrom): Promise<Buffer>;
99
+ static writeBookmarks({ files, bookmarks, webhook, downloadFrom, outputFilename, trace }: {
91
100
  files: PathLikeOrReadStream[];
92
101
  bookmarks: Bookmarks;
93
102
  webhook?: WebhookOptions;
94
- }): Promise<Buffer>;
103
+ downloadFrom?: DownloadFrom;
104
+ } & OutputOptions): Promise<Buffer>;
95
105
  /**
96
106
  * Encrypts a PDF file.
97
107
  *
@@ -100,33 +110,36 @@ export declare class PDFEngines {
100
110
  * @param {EncryptOptions} options.options - Encryption configuration specifying userPassword (required) and ownerPassword (optional).
101
111
  * @returns {Promise<Buffer>} A Promise resolving to the encrypted PDF content as a buffer
102
112
  */
103
- static encrypt({ files, options, webhook }: {
113
+ static encrypt({ files, options, webhook, downloadFrom, outputFilename, trace }: {
104
114
  files: PathLikeOrReadStream[];
105
115
  options: EncryptOptions;
106
116
  webhook?: WebhookOptions;
107
- }): Promise<Buffer>;
117
+ downloadFrom?: DownloadFrom;
118
+ } & OutputOptions): Promise<Buffer>;
108
119
  /**
109
120
  * Watermarks one or more PDF files using the configured PDF engine.
110
121
  *
111
122
  * @param options.files - PDF files to watermark
112
123
  * @param options.watermark - Watermark configuration (source, expression, pages, options, file)
113
124
  */
114
- static watermark({ files, watermark, webhook }: {
125
+ static watermark({ files, watermark, webhook, downloadFrom, outputFilename, trace }: {
115
126
  files: PathLikeOrReadStream[];
116
127
  watermark: PdfEngineWatermark;
117
128
  webhook?: WebhookOptions;
118
- }): Promise<Buffer>;
129
+ downloadFrom?: DownloadFrom;
130
+ } & OutputOptions): Promise<Buffer>;
119
131
  /**
120
132
  * Stamps one or more PDF files using the configured PDF engine.
121
133
  *
122
134
  * @param options.files - PDF files to stamp
123
135
  * @param options.stamp - Stamp configuration (source, expression, pages, options, file)
124
136
  */
125
- static stamp({ files, stamp, webhook }: {
137
+ static stamp({ files, stamp, webhook, downloadFrom, outputFilename, trace }: {
126
138
  files: PathLikeOrReadStream[];
127
139
  stamp: PdfEngineStamp;
128
140
  webhook?: WebhookOptions;
129
- }): Promise<Buffer>;
141
+ downloadFrom?: DownloadFrom;
142
+ } & OutputOptions): Promise<Buffer>;
130
143
  /**
131
144
  * Embeds attachment files into the given PDFs.
132
145
  *
@@ -136,11 +149,26 @@ export declare class PDFEngines {
136
149
  * @param {WebhookOptions} [options.webhook] - Optional webhook delivery.
137
150
  * @returns {Promise<Buffer>} PDF bytes with embedded files.
138
151
  */
139
- static embed({ files, embeds, webhook }: {
152
+ static embed({ files, embeds, embedsMetadata, webhook, downloadFrom, outputFilename, trace }: {
140
153
  files: PathLikeOrReadStream[];
141
154
  embeds: PathLikeOrReadStream[];
155
+ embedsMetadata?: EmbedsMetadata;
142
156
  webhook?: WebhookOptions;
143
- }): Promise<Buffer>;
157
+ downloadFrom?: DownloadFrom;
158
+ } & OutputOptions): Promise<Buffer>;
159
+ /**
160
+ * Turns existing PDFs into Factur-X / ZUGFeRD e-invoices: embeds the CII
161
+ * invoice XML and converts to PDF/A-3.
162
+ *
163
+ * @param options.files - PDF files to turn into Factur-X documents.
164
+ * @param options.facturx - Factur-X invoice XML and metadata.
165
+ */
166
+ static facturX({ files, facturx, webhook, downloadFrom, outputFilename, trace }: {
167
+ files: PathLikeOrReadStream[];
168
+ facturx: FacturXOptions;
169
+ webhook?: WebhookOptions;
170
+ downloadFrom?: DownloadFrom;
171
+ } & OutputOptions): Promise<Buffer>;
144
172
  /**
145
173
  * Generates a PDF file from a buffer and saves it to the "__generated__" directory.
146
174
  *
@@ -23,10 +23,12 @@ class PDFEngines {
23
23
  * @param {Metadata} [options.metadata] - Metadata to be written.
24
24
  * @param {DownloadFrom} [options.downloadFrom] - Download a file from a URL. It must return a Content-Disposition header with a filename parameter.
25
25
  * @param {boolean} [options.flatten] - Flatten the PDF document.
26
+ * @param {string} [options.userPassword] - Password for opening the resulting PDF.
27
+ * @param {string} [options.ownerPassword] - Password for full access on the resulting PDF.
26
28
  *
27
29
  * @returns {Promise<Buffer>} A Promise resolving to the merged PDF content as a buffer
28
30
  */
29
- static async merge({ files, pdfa, pdfUA, metadata, downloadFrom, webhook, flatten, watermark, stamp, rotate }) {
31
+ static async merge({ files, pdfa, pdfUA, metadata, downloadFrom, webhook, flatten, bookmarks, autoIndexBookmarks, userPassword, ownerPassword, allowPrinting, allowCopying, allowModifying, allowAnnotating, allowFillingForms, allowAssembling, watermark, stamp, rotate, outputFilename, trace }) {
30
32
  const data = new FormData();
31
33
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
32
34
  await pdf_engines_utils_1.PDFEnginesUtils.customize(data, {
@@ -37,6 +39,26 @@ class PDFEngines {
37
39
  webhook,
38
40
  flatten
39
41
  });
42
+ if (bookmarks) {
43
+ data.append('bookmarks', JSON.stringify(bookmarks));
44
+ }
45
+ if (autoIndexBookmarks) {
46
+ data.append('autoIndexBookmarks', String(autoIndexBookmarks));
47
+ }
48
+ if (userPassword) {
49
+ data.append('userPassword', userPassword);
50
+ }
51
+ if (ownerPassword) {
52
+ data.append('ownerPassword', ownerPassword);
53
+ }
54
+ (0, common_1.appendPdfEnginePermissions)(data, {
55
+ allowPrinting,
56
+ allowCopying,
57
+ allowModifying,
58
+ allowAnnotating,
59
+ allowFillingForms,
60
+ allowAssembling
61
+ });
40
62
  if (watermark || stamp) {
41
63
  await common_1.PdfEngineWatermarkStampUtils.appendPdfEngineWatermarkStamp(data, { watermark, stamp });
42
64
  }
@@ -44,7 +66,7 @@ class PDFEngines {
44
66
  (0, common_1.appendPdfEngineRotate)(data, rotate);
45
67
  }
46
68
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.merge}`;
47
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
69
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
48
70
  }
49
71
  /**
50
72
  * Converts various document formats to PDF.
@@ -56,7 +78,7 @@ class PDFEngines {
56
78
  * @param {DownloadFrom} [options.downloadFrom] - Download a file from a URL. It must return a Content-Disposition header with a filename parameter.
57
79
  * @returns {Promise<Buffer>} A Promise resolving to the converted PDF content as a buffer
58
80
  */
59
- static async convert({ files, pdfa, pdfUA, downloadFrom, webhook }) {
81
+ static async convert({ files, pdfa, pdfUA, downloadFrom, webhook, outputFilename, trace }) {
60
82
  common_1.GotenbergUtils.assert(!!pdfa || !!pdfUA, 'At least one of pdfa or pdfUA must be provided');
61
83
  const data = new FormData();
62
84
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
@@ -67,7 +89,7 @@ class PDFEngines {
67
89
  webhook
68
90
  });
69
91
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.convert}`;
70
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
92
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
71
93
  }
72
94
  /**
73
95
  * Splits a PDF file into multiple PDF files.
@@ -77,7 +99,7 @@ class PDFEngines {
77
99
  * @param {Split} options.options - Split configuration specifying mode ('pages' or 'intervals'), span, and unify options.
78
100
  * @returns {Promise<Buffer>} A Promise resolving to the split PDF content as a buffer
79
101
  */
80
- static async split({ files, options, webhook, watermark, stamp, rotate }) {
102
+ static async split({ files, options, webhook, pdfa, pdfUA, metadata, downloadFrom, userPassword, ownerPassword, allowPrinting, allowCopying, allowModifying, allowAnnotating, allowFillingForms, allowAssembling, watermark, stamp, rotate, outputFilename, trace }) {
81
103
  const data = new FormData();
82
104
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
83
105
  data.append('splitMode', options.mode);
@@ -89,6 +111,26 @@ class PDFEngines {
89
111
  common_1.GotenbergUtils.assert(options.mode === 'pages', 'split unify is only supported for pages mode');
90
112
  data.append('splitUnify', String(options.unify));
91
113
  }
114
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, {
115
+ pdfa,
116
+ pdfUA,
117
+ metadata,
118
+ downloadFrom
119
+ });
120
+ if (userPassword) {
121
+ data.append('userPassword', userPassword);
122
+ }
123
+ if (ownerPassword) {
124
+ data.append('ownerPassword', ownerPassword);
125
+ }
126
+ (0, common_1.appendPdfEnginePermissions)(data, {
127
+ allowPrinting,
128
+ allowCopying,
129
+ allowModifying,
130
+ allowAnnotating,
131
+ allowFillingForms,
132
+ allowAssembling
133
+ });
92
134
  if (watermark || stamp) {
93
135
  await common_1.PdfEngineWatermarkStampUtils.appendPdfEngineWatermarkStamp(data, { watermark, stamp });
94
136
  }
@@ -96,19 +138,23 @@ class PDFEngines {
96
138
  (0, common_1.appendPdfEngineRotate)(data, rotate);
97
139
  }
98
140
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.split}`;
99
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
141
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
100
142
  }
101
143
  /**
102
144
  * Flattens a PDF file.
103
145
  *
104
146
  * @param {PathLikeOrReadStream[]} files - An array of PathLikes or ReadStreams to the PDF files to be flattened.
147
+ * @param {WebhookOptions} [webhook] - Optional webhook delivery.
148
+ * @param {OutputOptions} [output] - Optional custom output filename and/or trace id.
149
+ * @param {DownloadFrom} [downloadFrom] - Download a file from a URL. It must return a Content-Disposition header with a filename parameter.
105
150
  * @returns {Promise<Buffer>} A Promise resolving to the flattened PDF content as a buffer
106
151
  */
107
- static async flatten(files, webhook) {
152
+ static async flatten(files, webhook, output, downloadFrom) {
108
153
  const data = new FormData();
109
154
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
155
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
110
156
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.flatten}`;
111
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
157
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders(output)));
112
158
  }
113
159
  /**
114
160
  * Rotates pages of one or more PDF files using the configured PDF engine.
@@ -117,24 +163,28 @@ class PDFEngines {
117
163
  * @param options.angle - Rotation angle in degrees (90, 180, or 270)
118
164
  * @param options.pages - Optional page ranges (e.g. '1-3', '5'); omit for all pages
119
165
  */
120
- static async rotate({ files, angle, pages, webhook }) {
166
+ static async rotate({ files, angle, pages, webhook, downloadFrom, outputFilename, trace }) {
121
167
  const data = new FormData();
122
168
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
123
169
  (0, common_1.appendPdfEngineRotate)(data, { angle, pages });
170
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
124
171
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.rotate}`;
125
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
172
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
126
173
  }
127
174
  /**
128
175
  * Reads metadata from the provided files.
129
176
  *
130
- * @param {PathLikeOrReadStream[]} files An array of PathLikes or ReadStreams to the PDF files.
177
+ * @param {Object} options - Options for the read metadata operation.
178
+ * @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the PDF files.
179
+ * @param {DownloadFrom} [options.downloadFrom] - Download a file from a URL. It must return a Content-Disposition header with a filename parameter.
131
180
  * @returns {Promise<Buffer>} A Promise resolving to the metadata buffer.
132
181
  */
133
- static async readMetadata(files, webhook) {
182
+ static async readMetadata({ files, downloadFrom, webhook, outputFilename, trace }) {
134
183
  const data = new FormData();
135
184
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
185
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
136
186
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.readMetadata}`;
137
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
187
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
138
188
  }
139
189
  /**
140
190
  * Writes metadata to the provided PDF files.
@@ -143,25 +193,28 @@ class PDFEngines {
143
193
  * @param {Metadata} metadata - Metadata to be written.
144
194
  * @returns {Promise<Buffer>} A Promise that resolves to the PDF file containing metadata as a buffer.
145
195
  */
146
- static async writeMetadata({ files, metadata, webhook }) {
196
+ static async writeMetadata({ files, metadata, webhook, downloadFrom, outputFilename, trace }) {
147
197
  const data = new FormData();
148
198
  data.append('metadata', JSON.stringify(metadata));
149
199
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
200
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
150
201
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.writeMetadata}`;
151
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
202
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
152
203
  }
153
- static async readBookmarks(files, webhook) {
204
+ static async readBookmarks(files, webhook, output, downloadFrom) {
154
205
  const data = new FormData();
155
206
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
207
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
156
208
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.readBookmarks}`;
157
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
209
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders(output)));
158
210
  }
159
- static async writeBookmarks({ files, bookmarks, webhook }) {
211
+ static async writeBookmarks({ files, bookmarks, webhook, downloadFrom, outputFilename, trace }) {
160
212
  const data = new FormData();
161
213
  data.append('bookmarks', JSON.stringify(bookmarks));
162
214
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
215
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
163
216
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.writeBookmarks}`;
164
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
217
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
165
218
  }
166
219
  /**
167
220
  * Encrypts a PDF file.
@@ -171,15 +224,20 @@ class PDFEngines {
171
224
  * @param {EncryptOptions} options.options - Encryption configuration specifying userPassword (required) and ownerPassword (optional).
172
225
  * @returns {Promise<Buffer>} A Promise resolving to the encrypted PDF content as a buffer
173
226
  */
174
- static async encrypt({ files, options, webhook }) {
227
+ static async encrypt({ files, options, webhook, downloadFrom, outputFilename, trace }) {
228
+ common_1.GotenbergUtils.assert(!!options.userPassword || !!options.ownerPassword, 'At least one of userPassword or ownerPassword must be provided');
175
229
  const data = new FormData();
176
230
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
177
- data.append('userPassword', options.userPassword);
231
+ if (options.userPassword) {
232
+ data.append('userPassword', options.userPassword);
233
+ }
178
234
  if (options.ownerPassword) {
179
235
  data.append('ownerPassword', options.ownerPassword);
180
236
  }
237
+ (0, common_1.appendPdfEnginePermissions)(data, options);
238
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
181
239
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.encrypt}`;
182
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
240
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
183
241
  }
184
242
  /**
185
243
  * Watermarks one or more PDF files using the configured PDF engine.
@@ -187,14 +245,16 @@ class PDFEngines {
187
245
  * @param options.files - PDF files to watermark
188
246
  * @param options.watermark - Watermark configuration (source, expression, pages, options, file)
189
247
  */
190
- static async watermark({ files, watermark, webhook }) {
248
+ static async watermark({ files, watermark, webhook, downloadFrom, outputFilename, trace }) {
249
+ common_1.GotenbergUtils.assert(!!watermark.source && !!watermark.expression, 'watermark.source and watermark.expression are required');
191
250
  const data = new FormData();
192
251
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
193
252
  await common_1.PdfEngineWatermarkStampUtils.appendPdfEngineWatermarkStamp(data, {
194
253
  watermark
195
254
  });
255
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
196
256
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.watermark}`;
197
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
257
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
198
258
  }
199
259
  /**
200
260
  * Stamps one or more PDF files using the configured PDF engine.
@@ -202,14 +262,16 @@ class PDFEngines {
202
262
  * @param options.files - PDF files to stamp
203
263
  * @param options.stamp - Stamp configuration (source, expression, pages, options, file)
204
264
  */
205
- static async stamp({ files, stamp, webhook }) {
265
+ static async stamp({ files, stamp, webhook, downloadFrom, outputFilename, trace }) {
266
+ common_1.GotenbergUtils.assert(!!stamp.source && !!stamp.expression, 'stamp.source and stamp.expression are required');
206
267
  const data = new FormData();
207
268
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
208
269
  await common_1.PdfEngineWatermarkStampUtils.appendPdfEngineWatermarkStamp(data, {
209
270
  stamp
210
271
  });
272
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
211
273
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.stamp}`;
212
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
274
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
213
275
  }
214
276
  /**
215
277
  * Embeds attachment files into the given PDFs.
@@ -220,12 +282,31 @@ class PDFEngines {
220
282
  * @param {WebhookOptions} [options.webhook] - Optional webhook delivery.
221
283
  * @returns {Promise<Buffer>} PDF bytes with embedded files.
222
284
  */
223
- static async embed({ files, embeds, webhook }) {
285
+ static async embed({ files, embeds, embedsMetadata, webhook, downloadFrom, outputFilename, trace }) {
224
286
  const data = new FormData();
225
287
  await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
226
288
  await pdf_engines_utils_1.PDFEnginesUtils.addFilesWithFieldName(embeds, data, 'embeds');
289
+ if (embedsMetadata) {
290
+ data.append('embedsMetadata', JSON.stringify(embedsMetadata));
291
+ }
292
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
227
293
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.embed}`;
228
- return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildWebhookHeaders(webhook));
294
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
295
+ }
296
+ /**
297
+ * Turns existing PDFs into Factur-X / ZUGFeRD e-invoices: embeds the CII
298
+ * invoice XML and converts to PDF/A-3.
299
+ *
300
+ * @param options.files - PDF files to turn into Factur-X documents.
301
+ * @param options.facturx - Factur-X invoice XML and metadata.
302
+ */
303
+ static async facturX({ files, facturx, webhook, downloadFrom, outputFilename, trace }) {
304
+ const data = new FormData();
305
+ await pdf_engines_utils_1.PDFEnginesUtils.addFiles(files, data);
306
+ await (0, common_1.appendFacturX)(data, facturx);
307
+ await pdf_engines_utils_1.PDFEnginesUtils.customize(data, { downloadFrom });
308
+ const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.PDF_ENGINES_PATH}/${main_config_1.Chromiumly.PDF_ENGINE_ROUTES.facturX}`;
309
+ return common_1.GotenbergUtils.fetch(endpoint, data, main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.combineHeaders(common_1.GotenbergUtils.buildWebhookHeaders(webhook), common_1.GotenbergUtils.buildOutputHeaders({ outputFilename, trace })));
229
310
  }
230
311
  /**
231
312
  * Generates a PDF file from a buffer and saves it to the "__generated__" directory.
@@ -1 +1 @@
1
- {"version":3,"file":"pdf-engines.js","sourceRoot":"","sources":["../../src/pdf-engines/pdf-engines.ts"],"names":[],"mappings":";;;;;;AAAA,2BAA8B;AAC9B,gDAAwB;AAExB,gDAA4C;AAC5C,sCASmB;AACnB,iEAA4D;AAS5D;;GAEG;AACH,MAAa,UAAU;IACnB;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,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C,gCAAgC,EAAE,EAC7C,wBAAU,CAAC,gCAAgC,EAAE,EAC7C,wBAAU,CAAC,oBAAoB,EAAE,EACjC,wBAAU,CAAC,kBAAkB,EAAE,EAC/B,uBAAc,CAAC,cAAc,CACzB,uBAAc,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAC3C,uBAAc,CAAC,kBAAkB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAC/D,CACJ,CAAC;IACN,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,KAAK,CAAC,QAAQ,CACxB,QAAgB,EAChB,MAAc;QAEd,MAAM,aAAa,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,CAAC;QACnE,MAAM,aAAQ,CAAC,KAAK,CAAC,cAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvE,MAAM,aAAQ,CAAC,SAAS,CAAC,cAAI,CAAC,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5E,CAAC;CACJ;AAntBD,gCAmtBC"}
@@ -1,7 +1,22 @@
1
1
  export declare class System {
2
- static getHealth(): Promise<Buffer>;
3
- static headHealth(): Promise<Buffer>;
4
- static getPrometheusMetrics(): Promise<Buffer>;
5
- static getVersion(): Promise<Buffer>;
6
- static getDebug(): Promise<Buffer>;
2
+ /**
3
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
4
+ */
5
+ static getHealth(trace?: string): Promise<Buffer>;
6
+ /**
7
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
8
+ */
9
+ static headHealth(trace?: string): Promise<Buffer>;
10
+ /**
11
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
12
+ */
13
+ static getPrometheusMetrics(trace?: string): Promise<Buffer>;
14
+ /**
15
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
16
+ */
17
+ static getVersion(trace?: string): Promise<Buffer>;
18
+ /**
19
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
20
+ */
21
+ static getDebug(trace?: string): Promise<Buffer>;
7
22
  }
@@ -4,25 +4,40 @@ exports.System = void 0;
4
4
  const common_1 = require("../common");
5
5
  const main_config_1 = require("../main.config");
6
6
  class System {
7
- static async getHealth() {
7
+ /**
8
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
9
+ */
10
+ static async getHealth(trace) {
8
11
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.SYSTEM_ROUTES.health}`;
9
- return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'GET', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey());
12
+ return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'GET', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildOutputHeaders({ trace }));
10
13
  }
11
- static async headHealth() {
14
+ /**
15
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
16
+ */
17
+ static async headHealth(trace) {
12
18
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.SYSTEM_ROUTES.health}`;
13
- return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'HEAD', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey());
19
+ return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'HEAD', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildOutputHeaders({ trace }));
14
20
  }
15
- static async getPrometheusMetrics() {
21
+ /**
22
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
23
+ */
24
+ static async getPrometheusMetrics(trace) {
16
25
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.SYSTEM_ROUTES.prometheusMetrics}`;
17
- return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'GET', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey());
26
+ return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'GET', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildOutputHeaders({ trace }));
18
27
  }
19
- static async getVersion() {
28
+ /**
29
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
30
+ */
31
+ static async getVersion(trace) {
20
32
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.SYSTEM_ROUTES.version}`;
21
- return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'GET', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey());
33
+ return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'GET', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildOutputHeaders({ trace }));
22
34
  }
23
- static async getDebug() {
35
+ /**
36
+ * @param {string} [trace] - Custom request id to identify the request in the logs.
37
+ */
38
+ static async getDebug(trace) {
24
39
  const endpoint = `${main_config_1.Chromiumly.getGotenbergEndpoint()}/${main_config_1.Chromiumly.SYSTEM_ROUTES.debug}`;
25
- return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'GET', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey());
40
+ return common_1.GotenbergUtils.fetchWithoutBody(endpoint, 'GET', main_config_1.Chromiumly.getGotenbergApiBasicAuthUsername(), main_config_1.Chromiumly.getGotenbergApiBasicAuthPassword(), main_config_1.Chromiumly.getCustomHttpHeaders(), main_config_1.Chromiumly.getGotenbergApiKey(), common_1.GotenbergUtils.buildOutputHeaders({ trace }));
26
41
  }
27
42
  }
28
43
  exports.System = System;