@doczilla/node
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -0,1 +1,10 @@ | ||
# [1.3.0](https://github.com/doczilla-app/doczilla-node/compare/v1.2.0...v1.3.0) (2024-01-04) | ||
### Features | ||
* Added `page.htmlTemplate` support ([f1fd96c](https://github.com/doczilla-app/doczilla-node/commit/f1fd96c0f42b5a405111130ddec26d79ede782a1)) | ||
# [1.2.0](https://github.com/doczilla-app/doczilla-node/compare/v1.1.0...v1.2.0) (2023-12-23) | ||
@@ -27,11 +36,1 @@ | ||
## [1.0.5](https://github.com/doczilla-app/doczilla-node/compare/v1.0.0...v1.0.5) (2023-12-16) | ||
### Bug Fixes | ||
* Fixed all calls going to `/v1/pdf` ([ec0e33a](https://github.com/doczilla-app/doczilla-node/commit/ec0e33a262206a3737942eb75f678d1bbd3f7166)) | ||
* Updated `.npmignore` ([6052575](https://github.com/doczilla-app/doczilla-node/commit/6052575de6607d7953c5dfcf65744a298125086f)) | ||
@@ -23,10 +23,11 @@ "use strict"; | ||
axiosMock.onAny().reply(200, Buffer.from('')); | ||
(0, globals_1.test)('it should encode the pdf.headerTemplate and pdf.footerTemplate options', () => __awaiter(void 0, void 0, void 0, function* () { | ||
(0, globals_1.test)('it should encode the page.html, page.htmlTemplate, pdf.headerHtml and pdf.footerHtml options', () => __awaiter(void 0, void 0, void 0, function* () { | ||
yield client.pdf.direct({ | ||
page: { | ||
html: '<div>Your first Doczilla PDF</div>' | ||
html: '<div>Your first Doczilla PDF</div>', | ||
htmlTemplate: '<div>Your first Doczilla {{ type }}</div>', | ||
}, | ||
pdf: { | ||
headerTemplate: '<div>Header template</div>', | ||
footerTemplate: '<div>Footer template</div>' | ||
headerHtml: '<div>Header template</div>', | ||
footerHtml: '<div>Footer template</div>' | ||
} | ||
@@ -37,7 +38,8 @@ }); | ||
page: { | ||
html: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIFBERjwvZGl2Pg==' | ||
html: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIFBERjwvZGl2Pg==', | ||
htmlTemplate: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIHt7IHR5cGUgfX08L2Rpdj4=' | ||
}, | ||
pdf: { | ||
headerTemplate: 'PGRpdj5IZWFkZXIgdGVtcGxhdGU8L2Rpdj4=', | ||
footerTemplate: 'PGRpdj5Gb290ZXIgdGVtcGxhdGU8L2Rpdj4=' | ||
headerHtml: 'PGRpdj5IZWFkZXIgdGVtcGxhdGU8L2Rpdj4=', | ||
footerHtml: 'PGRpdj5Gb290ZXIgdGVtcGxhdGU8L2Rpdj4=' | ||
} | ||
@@ -44,0 +46,0 @@ })); |
@@ -18,10 +18,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
axiosMock.onAny().reply(200, Buffer.from('')); | ||
test('it should encode the pdf.headerTemplate and pdf.footerTemplate options', () => __awaiter(void 0, void 0, void 0, function* () { | ||
test('it should encode the page.html, page.htmlTemplate, pdf.headerHtml and pdf.footerHtml options', () => __awaiter(void 0, void 0, void 0, function* () { | ||
yield client.pdf.direct({ | ||
page: { | ||
html: '<div>Your first Doczilla PDF</div>' | ||
html: '<div>Your first Doczilla PDF</div>', | ||
htmlTemplate: '<div>Your first Doczilla {{ type }}</div>', | ||
}, | ||
pdf: { | ||
headerTemplate: '<div>Header template</div>', | ||
footerTemplate: '<div>Footer template</div>' | ||
headerHtml: '<div>Header template</div>', | ||
footerHtml: '<div>Footer template</div>' | ||
} | ||
@@ -32,7 +33,8 @@ }); | ||
page: { | ||
html: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIFBERjwvZGl2Pg==' | ||
html: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIFBERjwvZGl2Pg==', | ||
htmlTemplate: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIHt7IHR5cGUgfX08L2Rpdj4=' | ||
}, | ||
pdf: { | ||
headerTemplate: 'PGRpdj5IZWFkZXIgdGVtcGxhdGU8L2Rpdj4=', | ||
footerTemplate: 'PGRpdj5Gb290ZXIgdGVtcGxhdGU8L2Rpdj4=' | ||
headerHtml: 'PGRpdj5IZWFkZXIgdGVtcGxhdGU8L2Rpdj4=', | ||
footerHtml: 'PGRpdj5Gb290ZXIgdGVtcGxhdGU8L2Rpdj4=' | ||
} | ||
@@ -39,0 +41,0 @@ })); |
export { AsyncJob } from './models/AsyncJob'; | ||
export type { AsyncPdf } from './models/AsyncPdf'; | ||
export type { AsyncScreenshot } from './models/AsyncScreenshot'; | ||
export type { BadRequestResponse } from './models/BadRequestResponse'; | ||
export type { CreatePdf } from './models/CreatePdf'; | ||
export type { CreateScreenshot } from './models/CreateScreenshot'; | ||
export type { ForbiddenResponse } from './models/ForbiddenResponse'; | ||
export type { InternalServerErrorResponse } from './models/InternalServerErrorResponse'; | ||
export type { PageAuthentication } from './models/PageAuthentication'; | ||
export { PageCookie } from './models/PageCookie'; | ||
export { PageOptions } from './models/PageOptions'; | ||
export type { PayloadTooLargeResponse } from './models/PayloadTooLargeResponse'; | ||
export type { PDFMargin } from './models/PDFMargin'; | ||
@@ -16,6 +20,9 @@ export { PdfOptions } from './models/PdfOptions'; | ||
export type { StorageOptions } from './models/StorageOptions'; | ||
export type { SubscriptionLimitReachedResponse } from './models/SubscriptionLimitReachedResponse'; | ||
export { SyncJob } from './models/SyncJob'; | ||
export type { SyncPdf } from './models/SyncPdf'; | ||
export type { SyncScreenshot } from './models/SyncScreenshot'; | ||
export type { TooManyRequestsResponse } from './models/TooManyRequestsResponse'; | ||
export type { UnauthorizedResponse } from './models/UnauthorizedResponse'; | ||
export { WebhookEvent } from './models/WebhookEvent'; | ||
export { WebhookOptions } from './models/WebhookOptions'; |
@@ -7,3 +7,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -10,0 +10,0 @@ page: PageOptions; |
@@ -7,3 +7,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -10,0 +10,0 @@ page: PageOptions; |
@@ -5,3 +5,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -8,0 +8,0 @@ page: PageOptions; |
@@ -5,3 +5,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -8,0 +8,0 @@ page: PageOptions; |
@@ -13,2 +13,10 @@ import type { PageAuthentication } from './PageAuthentication'; | ||
/** | ||
* HTML template to render. Needs to be base64 encoded! | ||
*/ | ||
htmlTemplate?: string | null; | ||
/** | ||
* Template data, only used in combination with `page.htmlTemplate`. | ||
*/ | ||
templateData?: Record<string, any> | null; | ||
/** | ||
* When to consider waiting succeeds. | ||
@@ -15,0 +23,0 @@ * - `auto` our smart waiting option that can handle 90% of the cases. |
@@ -19,7 +19,7 @@ import type { PDFMargin } from './PDFMargin'; | ||
*/ | ||
headerTemplate?: string | null; | ||
headerHtml?: string | null; | ||
/** | ||
* HTML template for the print footer. Has the same constraints and support for special classes as `headerTemplate`. | ||
* HTML template for the print footer. Has the same constraints and support for special classes as `headerHtml`. | ||
*/ | ||
footerTemplate?: string | null; | ||
footerHtml?: string | null; | ||
/** | ||
@@ -26,0 +26,0 @@ * Set to `true` to print background graphics. |
@@ -6,3 +6,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -9,0 +9,0 @@ page: PageOptions; |
@@ -6,3 +6,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -9,0 +9,0 @@ page: PageOptions; |
@@ -49,8 +49,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
if ((_a = requestBody.pdf) === null || _a === void 0 ? void 0 : _a.headerTemplate) { | ||
requestBody.pdf.headerTemplate = this.baseEncodeContent(requestBody.pdf.headerTemplate); | ||
if (requestBody.page.htmlTemplate) { | ||
requestBody.page.htmlTemplate = this.baseEncodeContent(requestBody.page.htmlTemplate); | ||
} | ||
if ((_b = requestBody.pdf) === null || _b === void 0 ? void 0 : _b.footerTemplate) { | ||
requestBody.pdf.footerTemplate = this.baseEncodeContent(requestBody.pdf.footerTemplate); | ||
if ((_a = requestBody.pdf) === null || _a === void 0 ? void 0 : _a.headerHtml) { | ||
requestBody.pdf.headerHtml = this.baseEncodeContent(requestBody.pdf.headerHtml); | ||
} | ||
if ((_b = requestBody.pdf) === null || _b === void 0 ? void 0 : _b.footerHtml) { | ||
requestBody.pdf.footerHtml = this.baseEncodeContent(requestBody.pdf.footerHtml); | ||
} | ||
return requestBody; | ||
@@ -57,0 +60,0 @@ } |
export { AsyncJob } from './models/AsyncJob'; | ||
export type { AsyncPdf } from './models/AsyncPdf'; | ||
export type { AsyncScreenshot } from './models/AsyncScreenshot'; | ||
export type { BadRequestResponse } from './models/BadRequestResponse'; | ||
export type { CreatePdf } from './models/CreatePdf'; | ||
export type { CreateScreenshot } from './models/CreateScreenshot'; | ||
export type { ForbiddenResponse } from './models/ForbiddenResponse'; | ||
export type { InternalServerErrorResponse } from './models/InternalServerErrorResponse'; | ||
export type { PageAuthentication } from './models/PageAuthentication'; | ||
export { PageCookie } from './models/PageCookie'; | ||
export { PageOptions } from './models/PageOptions'; | ||
export type { PayloadTooLargeResponse } from './models/PayloadTooLargeResponse'; | ||
export type { PDFMargin } from './models/PDFMargin'; | ||
@@ -16,6 +20,9 @@ export { PdfOptions } from './models/PdfOptions'; | ||
export type { StorageOptions } from './models/StorageOptions'; | ||
export type { SubscriptionLimitReachedResponse } from './models/SubscriptionLimitReachedResponse'; | ||
export { SyncJob } from './models/SyncJob'; | ||
export type { SyncPdf } from './models/SyncPdf'; | ||
export type { SyncScreenshot } from './models/SyncScreenshot'; | ||
export type { TooManyRequestsResponse } from './models/TooManyRequestsResponse'; | ||
export type { UnauthorizedResponse } from './models/UnauthorizedResponse'; | ||
export { WebhookEvent } from './models/WebhookEvent'; | ||
export { WebhookOptions } from './models/WebhookOptions'; |
@@ -7,3 +7,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -10,0 +10,0 @@ page: PageOptions; |
@@ -7,3 +7,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -10,0 +10,0 @@ page: PageOptions; |
@@ -5,3 +5,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -8,0 +8,0 @@ page: PageOptions; |
@@ -5,3 +5,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -8,0 +8,0 @@ page: PageOptions; |
@@ -13,2 +13,10 @@ import type { PageAuthentication } from './PageAuthentication'; | ||
/** | ||
* HTML template to render. Needs to be base64 encoded! | ||
*/ | ||
htmlTemplate?: string | null; | ||
/** | ||
* Template data, only used in combination with `page.htmlTemplate`. | ||
*/ | ||
templateData?: Record<string, any> | null; | ||
/** | ||
* When to consider waiting succeeds. | ||
@@ -15,0 +23,0 @@ * - `auto` our smart waiting option that can handle 90% of the cases. |
@@ -19,7 +19,7 @@ import type { PDFMargin } from './PDFMargin'; | ||
*/ | ||
headerTemplate?: string | null; | ||
headerHtml?: string | null; | ||
/** | ||
* HTML template for the print footer. Has the same constraints and support for special classes as `headerTemplate`. | ||
* HTML template for the print footer. Has the same constraints and support for special classes as `headerHtml`. | ||
*/ | ||
footerTemplate?: string | null; | ||
footerHtml?: string | null; | ||
/** | ||
@@ -26,0 +26,0 @@ * Set to `true` to print background graphics. |
@@ -6,3 +6,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -9,0 +9,0 @@ page: PageOptions; |
@@ -6,3 +6,3 @@ import type { PageOptions } from './PageOptions'; | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -9,0 +9,0 @@ page: PageOptions; |
@@ -52,8 +52,11 @@ "use strict"; | ||
} | ||
if ((_a = requestBody.pdf) === null || _a === void 0 ? void 0 : _a.headerTemplate) { | ||
requestBody.pdf.headerTemplate = this.baseEncodeContent(requestBody.pdf.headerTemplate); | ||
if (requestBody.page.htmlTemplate) { | ||
requestBody.page.htmlTemplate = this.baseEncodeContent(requestBody.page.htmlTemplate); | ||
} | ||
if ((_b = requestBody.pdf) === null || _b === void 0 ? void 0 : _b.footerTemplate) { | ||
requestBody.pdf.footerTemplate = this.baseEncodeContent(requestBody.pdf.footerTemplate); | ||
if ((_a = requestBody.pdf) === null || _a === void 0 ? void 0 : _a.headerHtml) { | ||
requestBody.pdf.headerHtml = this.baseEncodeContent(requestBody.pdf.headerHtml); | ||
} | ||
if ((_b = requestBody.pdf) === null || _b === void 0 ? void 0 : _b.footerHtml) { | ||
requestBody.pdf.footerHtml = this.baseEncodeContent(requestBody.pdf.footerHtml); | ||
} | ||
return requestBody; | ||
@@ -60,0 +63,0 @@ } |
@@ -1,58 +0,1 @@ | ||
{ | ||
"name": "@doczilla/node", | ||
"version": "1.2.0", | ||
"description": "Doczilla API wrapper", | ||
"keywords": [ | ||
"doczilla", | ||
"puppeteer", | ||
"html2pdf", | ||
"html2image", | ||
"api", | ||
"chrome", | ||
"headless" | ||
], | ||
"homepage": "https://github.com/doczilla-app/doczilla-node", | ||
"bugs": { | ||
"url": "https://github.com/doczilla-app/doczilla-node/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/doczilla-app/doczilla-node.git" | ||
}, | ||
"license": "MIT", | ||
"author": { | ||
"name": "Doczilla", | ||
"email": "hello@doczilla.app", | ||
"url": "https://www.doczilla.app" | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/esm/index.js", | ||
"scripts": { | ||
"build": "tsc && tsc -p tsconfig.esm.json", | ||
"generate:sdk": "node ./generate-models.js && yarn build", | ||
"lint": "eslint --ext .ts .", | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"axios": "^1.6.2" | ||
}, | ||
"devDependencies": { | ||
"@jest/globals": "^29.7.0", | ||
"@types/jest": "^29.5.11", | ||
"@types/node": "^20.10.4", | ||
"@typescript-eslint/eslint-plugin": "^6.15.0", | ||
"@typescript-eslint/parser": "^6.15.0", | ||
"axios-mock-adapter": "^1.22.0", | ||
"eslint": "8.56.0", | ||
"eslint-plugin-import": "2.29.1", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"jest": "^29.7.0", | ||
"openapi-typescript-codegen": "^0.25.0", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^5.3" | ||
}, | ||
"packageManager": "yarn@4.0.2", | ||
"engines": { | ||
"node": ">=18.*" | ||
} | ||
} | ||
{"name":"@doczilla/node","version":"1.3.0","description":"Doczilla API wrapper","keywords":["doczilla","puppeteer","html2pdf","html2image","api","chrome","headless"],"homepage":"https://github.com/doczilla-app/doczilla-node","bugs":{"url":"https://github.com/doczilla-app/doczilla-node/issues"},"repository":{"type":"git","url":"https://github.com/doczilla-app/doczilla-node.git"},"license":"MIT","author":{"name":"Doczilla","email":"hello@doczilla.app","url":"https://www.doczilla.app"},"main":"./dist/index.js","module":"./dist/esm/index.js","scripts":{"build":"tsc && tsc -p tsconfig.esm.json","generate:sdk":"node ./generate-models.js && yarn build","lint":"eslint --ext .ts .","test":"jest"},"dependencies":{"axios":"^1.6.2"},"devDependencies":{"@jest/globals":"^29.7.0","@types/jest":"^29.5.11","@types/node":"^20.10.4","@typescript-eslint/eslint-plugin":"^6.15.0","@typescript-eslint/parser":"^6.15.0","axios-mock-adapter":"^1.22.0","eslint":"8.56.0","eslint-plugin-import":"2.29.1","eslint-plugin-simple-import-sort":"^10.0.0","jest":"^29.7.0","openapi-typescript-codegen":"^0.25.0","ts-jest":"^29.1.1","typescript":"^5.3"},"packageManager":"yarn@4.0.2","engines":{"node":">=18.*"}} |
@@ -14,10 +14,11 @@ import { describe, expect, test } from '@jest/globals' | ||
test('it should encode the pdf.headerTemplate and pdf.footerTemplate options', async () => { | ||
test('it should encode the page.html, page.htmlTemplate, pdf.headerHtml and pdf.footerHtml options', async () => { | ||
await client.pdf.direct({ | ||
page: { | ||
html: '<div>Your first Doczilla PDF</div>' | ||
html: '<div>Your first Doczilla PDF</div>', | ||
htmlTemplate: '<div>Your first Doczilla {{ type }}</div>', | ||
}, | ||
pdf: { | ||
headerTemplate: '<div>Header template</div>', | ||
footerTemplate: '<div>Footer template</div>' | ||
headerHtml: '<div>Header template</div>', | ||
footerHtml: '<div>Footer template</div>' | ||
} | ||
@@ -29,7 +30,8 @@ }) | ||
page: { | ||
html: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIFBERjwvZGl2Pg==' | ||
html: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIFBERjwvZGl2Pg==', | ||
htmlTemplate: 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIHt7IHR5cGUgfX08L2Rpdj4=' | ||
}, | ||
pdf: { | ||
headerTemplate: 'PGRpdj5IZWFkZXIgdGVtcGxhdGU8L2Rpdj4=', | ||
footerTemplate: 'PGRpdj5Gb290ZXIgdGVtcGxhdGU8L2Rpdj4=' | ||
headerHtml: 'PGRpdj5IZWFkZXIgdGVtcGxhdGU8L2Rpdj4=', | ||
footerHtml: 'PGRpdj5Gb290ZXIgdGVtcGxhdGU8L2Rpdj4=' | ||
} | ||
@@ -36,0 +38,0 @@ })) |
@@ -9,7 +9,11 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
export type { AsyncScreenshot } from './models/AsyncScreenshot'; | ||
export type { BadRequestResponse } from './models/BadRequestResponse'; | ||
export type { CreatePdf } from './models/CreatePdf'; | ||
export type { CreateScreenshot } from './models/CreateScreenshot'; | ||
export type { ForbiddenResponse } from './models/ForbiddenResponse'; | ||
export type { InternalServerErrorResponse } from './models/InternalServerErrorResponse'; | ||
export type { PageAuthentication } from './models/PageAuthentication'; | ||
export { PageCookie } from './models/PageCookie'; | ||
export { PageOptions } from './models/PageOptions'; | ||
export type { PayloadTooLargeResponse } from './models/PayloadTooLargeResponse'; | ||
export type { PDFMargin } from './models/PDFMargin'; | ||
@@ -22,6 +26,9 @@ export { PdfOptions } from './models/PdfOptions'; | ||
export type { StorageOptions } from './models/StorageOptions'; | ||
export type { SubscriptionLimitReachedResponse } from './models/SubscriptionLimitReachedResponse'; | ||
export { SyncJob } from './models/SyncJob'; | ||
export type { SyncPdf } from './models/SyncPdf'; | ||
export type { SyncScreenshot } from './models/SyncScreenshot'; | ||
export type { TooManyRequestsResponse } from './models/TooManyRequestsResponse'; | ||
export type { UnauthorizedResponse } from './models/UnauthorizedResponse'; | ||
export { WebhookEvent } from './models/WebhookEvent'; | ||
export { WebhookOptions } from './models/WebhookOptions'; |
@@ -13,3 +13,3 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -16,0 +16,0 @@ page: PageOptions; |
@@ -13,3 +13,3 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -16,0 +16,0 @@ page: PageOptions; |
@@ -11,3 +11,3 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -14,0 +14,0 @@ page: PageOptions; |
@@ -11,3 +11,3 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -14,0 +14,0 @@ page: PageOptions; |
@@ -19,2 +19,10 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
/** | ||
* HTML template to render. Needs to be base64 encoded! | ||
*/ | ||
htmlTemplate?: string | null; | ||
/** | ||
* Template data, only used in combination with `page.htmlTemplate`. | ||
*/ | ||
templateData?: Record<string, any> | null; | ||
/** | ||
* When to consider waiting succeeds. | ||
@@ -21,0 +29,0 @@ * - `auto` our smart waiting option that can handle 90% of the cases. |
@@ -25,7 +25,7 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
*/ | ||
headerTemplate?: string | null; | ||
headerHtml?: string | null; | ||
/** | ||
* HTML template for the print footer. Has the same constraints and support for special classes as `headerTemplate`. | ||
* HTML template for the print footer. Has the same constraints and support for special classes as `headerHtml`. | ||
*/ | ||
footerTemplate?: string | null; | ||
footerHtml?: string | null; | ||
/** | ||
@@ -32,0 +32,0 @@ * Set to `true` to print background graphics. |
@@ -12,3 +12,3 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -15,0 +15,0 @@ page: PageOptions; |
@@ -12,3 +12,3 @@ /* generated using openapi-typescript-codegen -- do no edit */ | ||
/** | ||
* Page options, either provide the `url` or `html` option. | ||
* Page options, either provide the `url`, `html` or `htmlTemplate` option. | ||
*/ | ||
@@ -15,0 +15,0 @@ page: PageOptions; |
@@ -51,10 +51,14 @@ import { Axios, AxiosHeaders, AxiosRequestConfig, isAxiosError } from 'axios' | ||
if (requestBody.pdf?.headerTemplate) { | ||
requestBody.pdf.headerTemplate = this.baseEncodeContent(requestBody.pdf.headerTemplate) | ||
if (requestBody.page.htmlTemplate) { | ||
requestBody.page.htmlTemplate = this.baseEncodeContent(requestBody.page.htmlTemplate) | ||
} | ||
if (requestBody.pdf?.footerTemplate) { | ||
requestBody.pdf.footerTemplate = this.baseEncodeContent(requestBody.pdf.footerTemplate) | ||
if (requestBody.pdf?.headerHtml) { | ||
requestBody.pdf.headerHtml = this.baseEncodeContent(requestBody.pdf.headerHtml) | ||
} | ||
if (requestBody.pdf?.footerHtml) { | ||
requestBody.pdf.footerHtml = this.baseEncodeContent(requestBody.pdf.footerHtml) | ||
} | ||
return requestBody | ||
@@ -61,0 +65,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165655
193
4451