@agnocon/piece-browserless 0.1.7
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/LICENSE.MIT-AP +24 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/capture-screenshot.d.ts +20 -0
- package/dist/lib/actions/capture-screenshot.d.ts.map +1 -0
- package/dist/lib/actions/capture-screenshot.js +176 -0
- package/dist/lib/actions/capture-screenshot.js.map +1 -0
- package/dist/lib/actions/generate-pdf.d.ts +38 -0
- package/dist/lib/actions/generate-pdf.d.ts.map +1 -0
- package/dist/lib/actions/generate-pdf.js +346 -0
- package/dist/lib/actions/generate-pdf.js.map +1 -0
- package/dist/lib/actions/get-website-performance.d.ts +20 -0
- package/dist/lib/actions/get-website-performance.d.ts.map +1 -0
- package/dist/lib/actions/get-website-performance.js +306 -0
- package/dist/lib/actions/get-website-performance.js.map +1 -0
- package/dist/lib/actions/run-bql-query.d.ts +26 -0
- package/dist/lib/actions/run-bql-query.d.ts.map +1 -0
- package/dist/lib/actions/run-bql-query.js +273 -0
- package/dist/lib/actions/run-bql-query.js.map +1 -0
- package/dist/lib/actions/scrape-url.d.ts +27 -0
- package/dist/lib/actions/scrape-url.d.ts.map +1 -0
- package/dist/lib/actions/scrape-url.js +277 -0
- package/dist/lib/actions/scrape-url.js.map +1 -0
- package/dist/lib/common/auth.d.ts +6 -0
- package/dist/lib/common/auth.d.ts.map +1 -0
- package/dist/lib/common/auth.js +62 -0
- package/dist/lib/common/auth.js.map +1 -0
- package/dist/lib/common/client.d.ts +18 -0
- package/dist/lib/common/client.d.ts.map +1 -0
- package/dist/lib/common/client.js +56 -0
- package/dist/lib/common/client.js.map +1 -0
- package/package.json +46 -0
- package/src/index.ts +26 -0
- package/src/lib/actions/capture-screenshot.ts +176 -0
- package/src/lib/actions/generate-pdf.ts +364 -0
- package/src/lib/actions/get-website-performance.ts +321 -0
- package/src/lib/actions/run-bql-query.ts +295 -0
- package/src/lib/actions/scrape-url.ts +291 -0
- package/src/lib/common/auth.ts +57 -0
- package/src/lib/common/client.ts +72 -0
package/LICENSE.MIT-AP
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Activepieces AB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Derived helpers in this folder are adapted from Activepieces (MIT) for use
|
|
24
|
+
inside CX without depending on @activepieces/* packages at runtime.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const browserless: import("@agnocon/pieces-framework").Piece<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
apiToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
region: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
|
+
customBaseUrl: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
}>>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,WAAW;;;;GAgBtB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.browserless = void 0;
|
|
4
|
+
// Vendored from Activepieces packages/pieces/community/browserless/src/index.ts (MIT).
|
|
5
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
6
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
7
|
+
const pieces_framework_2 = require("@agnocon/pieces-framework");
|
|
8
|
+
const auth_1 = require("./lib/common/auth");
|
|
9
|
+
const capture_screenshot_1 = require("./lib/actions/capture-screenshot");
|
|
10
|
+
const generate_pdf_1 = require("./lib/actions/generate-pdf");
|
|
11
|
+
const scrape_url_1 = require("./lib/actions/scrape-url");
|
|
12
|
+
const run_bql_query_1 = require("./lib/actions/run-bql-query");
|
|
13
|
+
const get_website_performance_1 = require("./lib/actions/get-website-performance");
|
|
14
|
+
exports.browserless = (0, pieces_framework_1.createPiece)({
|
|
15
|
+
displayName: 'Browserless',
|
|
16
|
+
minimumSupportedRelease: '0.36.1',
|
|
17
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/browserless.png',
|
|
18
|
+
categories: [pieces_framework_2.PieceCategory.DEVELOPER_TOOLS],
|
|
19
|
+
description: 'Browserless is a headless browser automation tool that allows you to scrape websites, take screenshots, and more.',
|
|
20
|
+
authors: ['owuzo', 'onyedikachi-david'],
|
|
21
|
+
auth: auth_1.browserlessAuth,
|
|
22
|
+
actions: [
|
|
23
|
+
capture_screenshot_1.captureScreenshot,
|
|
24
|
+
generate_pdf_1.generatePdf,
|
|
25
|
+
scrape_url_1.scrapeUrl,
|
|
26
|
+
run_bql_query_1.runBqlQuery,
|
|
27
|
+
get_website_performance_1.getWebsitePerformance,
|
|
28
|
+
],
|
|
29
|
+
triggers: [],
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uFAAuF;AACvF,qEAAqE;AACrE,gEAAwD;AACxD,gEAA0D;AAC1D,4CAAoD;AACpD,yEAAqE;AACrE,6DAAyD;AACzD,yDAAqD;AACrD,+DAA0D;AAC1D,mFAA8E;AAEjE,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,aAAa;IAC1B,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,qDAAqD;IAC9D,UAAU,EAAE,CAAC,gCAAa,CAAC,eAAe,CAAC;IAC3C,WAAW,EAAE,mHAAmH;IAChI,OAAO,EAAE,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACvC,IAAI,EAAE,sBAAe;IACrB,OAAO,EAAE;QACL,sCAAiB;QACjB,0BAAW;QACX,sBAAS;QACT,2BAAW;QACX,+CAAqB;KACxB;IACD,QAAQ,EAAE,EAAE;CACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const captureScreenshot: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
apiToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
region: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
|
+
customBaseUrl: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
}>, {
|
|
6
|
+
url: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
imageType: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
|
|
8
|
+
quality: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
9
|
+
fullPage: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
10
|
+
width: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
11
|
+
height: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
12
|
+
waitForSelector: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
13
|
+
delay: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
14
|
+
omitBackground: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
15
|
+
clipX: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
16
|
+
clipY: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
17
|
+
clipWidth: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
18
|
+
clipHeight: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=capture-screenshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capture-screenshot.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/capture-screenshot.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EA0K5B,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.captureScreenshot = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/browserless/src/lib/actions/capture-screenshot.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const auth_1 = require("../common/auth");
|
|
10
|
+
const client_1 = require("../common/client");
|
|
11
|
+
exports.captureScreenshot = (0, pieces_framework_1.createAction)({
|
|
12
|
+
name: 'capture_screenshot',
|
|
13
|
+
displayName: 'Capture Screenshot',
|
|
14
|
+
description: 'Take a screenshot of a web page',
|
|
15
|
+
audience: 'both',
|
|
16
|
+
aiMetadata: { description: 'Renders a web page in a headless browser and returns a PNG or JPEG screenshot of it. Use to capture the visual state of a public URL; the page URL is required, and options like full-page capture, viewport size, clipping region, and waiting for a CSS selector control what is rendered. Not idempotent: each call runs a fresh headless-browser render, so the returned image reflects the live page at the moment of the call.', idempotent: false },
|
|
17
|
+
auth: auth_1.browserlessAuth,
|
|
18
|
+
props: {
|
|
19
|
+
url: pieces_framework_1.Property.ShortText({
|
|
20
|
+
displayName: 'URL',
|
|
21
|
+
description: 'The URL of the page to capture',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
imageType: pieces_framework_1.Property.StaticDropdown({
|
|
25
|
+
displayName: 'Image Type',
|
|
26
|
+
description: 'Format of the screenshot image',
|
|
27
|
+
required: false,
|
|
28
|
+
defaultValue: 'png',
|
|
29
|
+
options: {
|
|
30
|
+
options: [
|
|
31
|
+
{ label: 'PNG', value: 'png' },
|
|
32
|
+
{ label: 'JPEG', value: 'jpeg' }
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}),
|
|
36
|
+
quality: pieces_framework_1.Property.Number({
|
|
37
|
+
displayName: 'Quality',
|
|
38
|
+
description: 'Image quality (0-100, only for JPEG)',
|
|
39
|
+
required: false,
|
|
40
|
+
}),
|
|
41
|
+
fullPage: pieces_framework_1.Property.Checkbox({
|
|
42
|
+
displayName: 'Full Page',
|
|
43
|
+
description: 'Capture the full scrollable page',
|
|
44
|
+
required: false,
|
|
45
|
+
defaultValue: false,
|
|
46
|
+
}),
|
|
47
|
+
width: pieces_framework_1.Property.Number({
|
|
48
|
+
displayName: 'Viewport Width',
|
|
49
|
+
description: 'Width of the browser viewport in pixels',
|
|
50
|
+
required: false,
|
|
51
|
+
}),
|
|
52
|
+
height: pieces_framework_1.Property.Number({
|
|
53
|
+
displayName: 'Viewport Height',
|
|
54
|
+
description: 'Height of the browser viewport in pixels',
|
|
55
|
+
required: false,
|
|
56
|
+
}),
|
|
57
|
+
waitForSelector: pieces_framework_1.Property.ShortText({
|
|
58
|
+
displayName: 'Wait for Selector',
|
|
59
|
+
description: 'CSS selector to wait for before taking screenshot',
|
|
60
|
+
required: false,
|
|
61
|
+
}),
|
|
62
|
+
delay: pieces_framework_1.Property.Number({
|
|
63
|
+
displayName: 'Delay (ms)',
|
|
64
|
+
description: 'Delay in milliseconds before taking screenshot',
|
|
65
|
+
required: false,
|
|
66
|
+
}),
|
|
67
|
+
omitBackground: pieces_framework_1.Property.Checkbox({
|
|
68
|
+
displayName: 'Omit Background',
|
|
69
|
+
description: 'Hide default white background for transparent screenshots',
|
|
70
|
+
required: false,
|
|
71
|
+
defaultValue: false,
|
|
72
|
+
}),
|
|
73
|
+
clipX: pieces_framework_1.Property.Number({
|
|
74
|
+
displayName: 'Clip X Position',
|
|
75
|
+
description: 'X coordinate of the top-left corner for clipping',
|
|
76
|
+
required: false,
|
|
77
|
+
}),
|
|
78
|
+
clipY: pieces_framework_1.Property.Number({
|
|
79
|
+
displayName: 'Clip Y Position',
|
|
80
|
+
description: 'Y coordinate of the top-left corner for clipping',
|
|
81
|
+
required: false,
|
|
82
|
+
}),
|
|
83
|
+
clipWidth: pieces_framework_1.Property.Number({
|
|
84
|
+
displayName: 'Clip Width',
|
|
85
|
+
description: 'Width of the clipping area',
|
|
86
|
+
required: false,
|
|
87
|
+
}),
|
|
88
|
+
clipHeight: pieces_framework_1.Property.Number({
|
|
89
|
+
displayName: 'Clip Height',
|
|
90
|
+
description: 'Height of the clipping area',
|
|
91
|
+
required: false,
|
|
92
|
+
}),
|
|
93
|
+
},
|
|
94
|
+
run(context) {
|
|
95
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
var _a;
|
|
97
|
+
const requestBody = {
|
|
98
|
+
url: context.propsValue.url,
|
|
99
|
+
options: {
|
|
100
|
+
type: context.propsValue.imageType || 'png',
|
|
101
|
+
fullPage: context.propsValue.fullPage || false,
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
if (context.propsValue.quality && context.propsValue.imageType === 'jpeg') {
|
|
105
|
+
requestBody.options.quality = context.propsValue.quality;
|
|
106
|
+
}
|
|
107
|
+
if (context.propsValue.width && context.propsValue.height) {
|
|
108
|
+
requestBody.viewport = {
|
|
109
|
+
width: context.propsValue.width,
|
|
110
|
+
height: context.propsValue.height,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
if (context.propsValue.waitForSelector) {
|
|
114
|
+
requestBody.waitForSelector = {
|
|
115
|
+
selector: context.propsValue.waitForSelector,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (context.propsValue.delay) {
|
|
119
|
+
requestBody.waitForTimeout = context.propsValue.delay;
|
|
120
|
+
}
|
|
121
|
+
if (context.propsValue.omitBackground) {
|
|
122
|
+
requestBody.options.omitBackground = context.propsValue.omitBackground;
|
|
123
|
+
}
|
|
124
|
+
if (context.propsValue.clipX !== undefined &&
|
|
125
|
+
context.propsValue.clipY !== undefined &&
|
|
126
|
+
context.propsValue.clipWidth !== undefined &&
|
|
127
|
+
context.propsValue.clipHeight !== undefined) {
|
|
128
|
+
requestBody.options.clip = {
|
|
129
|
+
x: context.propsValue.clipX,
|
|
130
|
+
y: context.propsValue.clipY,
|
|
131
|
+
width: context.propsValue.clipWidth,
|
|
132
|
+
height: context.propsValue.clipHeight,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
const response = yield client_1.browserlessCommon.apiCall({
|
|
136
|
+
auth: context.auth.props,
|
|
137
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
138
|
+
resourceUri: '/screenshot',
|
|
139
|
+
body: requestBody,
|
|
140
|
+
});
|
|
141
|
+
const imageType = context.propsValue.imageType || 'png';
|
|
142
|
+
const fileName = `screenshot.${imageType}`;
|
|
143
|
+
let fileData;
|
|
144
|
+
if (response.body instanceof ArrayBuffer) {
|
|
145
|
+
fileData = Buffer.from(response.body);
|
|
146
|
+
}
|
|
147
|
+
else if (Buffer.isBuffer(response.body)) {
|
|
148
|
+
fileData = response.body;
|
|
149
|
+
}
|
|
150
|
+
else if (typeof response.body === 'string') {
|
|
151
|
+
fileData = Buffer.from(response.body, 'latin1');
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
fileData = Buffer.from(String(response.body), 'latin1');
|
|
155
|
+
}
|
|
156
|
+
const file = yield context.files.write({
|
|
157
|
+
data: fileData,
|
|
158
|
+
fileName: fileName,
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
success: true,
|
|
162
|
+
file: file,
|
|
163
|
+
screenshotBase64: (0, client_1.convertBinaryToBase64)(fileData),
|
|
164
|
+
metadata: {
|
|
165
|
+
url: context.propsValue.url,
|
|
166
|
+
type: imageType,
|
|
167
|
+
fullPage: context.propsValue.fullPage || false,
|
|
168
|
+
timestamp: new Date().toISOString(),
|
|
169
|
+
contentType: ((_a = response.headers) === null || _a === void 0 ? void 0 : _a['content-type']) || `image/${imageType}`,
|
|
170
|
+
fileName: fileName,
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
//# sourceMappingURL=capture-screenshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capture-screenshot.js","sourceRoot":"","sources":["../../../src/lib/actions/capture-screenshot.ts"],"names":[],"mappings":";;;;AAAA,gHAAgH;AAChH,qEAAqE;AACrE,gEAAmE;AACnE,0DAAoD;AACpD,yCAAiD;AACjD,6CAA8F;AAEjF,QAAA,iBAAiB,G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,CAAC,CAAC;YAEH,OAAO;gBACH,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,IAAI;gBACV,gBAAgB,EAAE,IAAA,8BAAqB,EAAC,QAAQ,CAAC;gBACjD,QAAQ,EAAE;oBACN,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG;oBAC3B,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,IAAI,KAAK;oBAC9C,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBACnC,WAAW,EAAE,CAAA,MAAA,QAAQ,CAAC,OAAO,0CAAG,cAAc,CAAC,KAAI,SAAS,SAAS,EAAE;oBACvE,QAAQ,EAAE,QAAQ;iBACrB;aACJ,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const generatePdf: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
apiToken: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
region: import("@agnocon/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
|
+
customBaseUrl: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
}>, {
|
|
6
|
+
url: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
html: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
8
|
+
format: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
|
|
9
|
+
landscape: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
10
|
+
printBackground: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
11
|
+
marginTop: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
marginRight: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
13
|
+
marginBottom: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
marginLeft: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
15
|
+
headerTemplate: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
16
|
+
footerTemplate: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
17
|
+
displayHeaderFooter: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
18
|
+
scale: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
19
|
+
waitForSelector: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
20
|
+
waitForSelectorTimeout: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
21
|
+
waitForSelectorVisible: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
22
|
+
waitForSelectorHidden: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
23
|
+
preferCSSPageSize: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
24
|
+
pageRanges: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
25
|
+
width: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
26
|
+
height: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
27
|
+
omitBackground: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
28
|
+
tagged: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
29
|
+
outline: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
30
|
+
timeout: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
31
|
+
waitForFunction: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
32
|
+
waitForFunctionPolling: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
33
|
+
waitForFunctionTimeout: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
34
|
+
userAgent: import("@agnocon/pieces-framework").ShortTextProperty<false>;
|
|
35
|
+
waitForTimeout: import("@agnocon/pieces-framework").NumberProperty<false>;
|
|
36
|
+
bestAttempt: import("@agnocon/pieces-framework").CheckboxProperty<false>;
|
|
37
|
+
}>;
|
|
38
|
+
//# sourceMappingURL=generate-pdf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-pdf.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/generate-pdf.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsWtB,CAAC"}
|