@browserless.io/browserless 2.25.0-beta-2 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -3
- package/README.md +4 -5
- package/build/browserless.js +3 -1
- package/build/browsers/browsers.cdp.d.ts +3 -0
- package/build/browsers/browsers.cdp.js +4 -1
- package/build/browsers/browsers.playwright.d.ts +4 -0
- package/build/browsers/browsers.playwright.js +11 -2
- package/build/browsers/index.js +4 -3
- package/build/http.d.ts +9 -0
- package/build/http.js +9 -0
- package/build/routes/chrome/http/content.post.body.json +8 -8
- package/build/routes/chrome/http/pdf.post.body.json +8 -8
- package/build/routes/chrome/http/scrape.post.body.json +8 -8
- package/build/routes/chrome/http/screenshot.post.body.json +8 -8
- package/build/routes/chrome/tests/kill-sessions.spec.js +1 -1
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/pdf.post.body.json +8 -8
- package/build/routes/chromium/http/scrape.post.body.json +8 -8
- package/build/routes/chromium/http/screenshot.post.body.json +8 -8
- package/build/routes/chromium/tests/kill-sessions.spec.js +1 -1
- package/build/routes/edge/http/content.post.body.json +579 -0
- package/build/routes/edge/http/content.post.d.ts +8 -0
- package/build/routes/edge/http/content.post.js +7 -0
- package/build/routes/edge/http/content.post.query.json +183 -0
- package/build/routes/edge/http/content.post.response.json +5 -0
- package/build/routes/edge/http/download.post.body.json +32 -0
- package/build/routes/edge/http/download.post.d.ts +8 -0
- package/build/routes/edge/http/download.post.js +7 -0
- package/build/routes/edge/http/download.post.query.json +120 -0
- package/build/routes/edge/http/download.post.response.json +4 -0
- package/build/routes/edge/http/function.post.body.json +32 -0
- package/build/routes/edge/http/function.post.d.ts +8 -0
- package/build/routes/edge/http/function.post.js +7 -0
- package/build/routes/edge/http/function.post.query.json +120 -0
- package/build/routes/edge/http/function.post.response.json +4 -0
- package/build/routes/edge/http/json-list.get.d.ts +5 -0
- package/build/routes/edge/http/json-list.get.js +5 -0
- package/build/routes/edge/http/json-list.get.response.json +52 -0
- package/build/routes/edge/http/json-new.put.d.ts +5 -0
- package/build/routes/edge/http/json-new.put.js +5 -0
- package/build/routes/edge/http/json-new.put.response.json +44 -0
- package/build/routes/edge/http/json-protocol.get.d.ts +5 -0
- package/build/routes/edge/http/json-protocol.get.js +5 -0
- package/build/routes/edge/http/json-protocol.get.response.json +6 -0
- package/build/routes/edge/http/json-version.get.d.ts +5 -0
- package/build/routes/edge/http/json-version.get.js +5 -0
- package/build/routes/edge/http/json-version.get.response.json +44 -0
- package/build/routes/edge/http/pdf.post.body.json +724 -0
- package/build/routes/edge/http/pdf.post.d.ts +8 -0
- package/build/routes/edge/http/pdf.post.js +7 -0
- package/build/routes/edge/http/pdf.post.query.json +120 -0
- package/build/routes/edge/http/pdf.post.response.json +5 -0
- package/build/routes/edge/http/performance.post.body.json +26 -0
- package/build/routes/edge/http/performance.post.d.ts +8 -0
- package/build/routes/edge/http/performance.post.js +7 -0
- package/build/routes/edge/http/performance.post.query.json +120 -0
- package/build/routes/edge/http/performance.post.response.json +7 -0
- package/build/routes/edge/http/scrape.post.body.json +626 -0
- package/build/routes/edge/http/scrape.post.d.ts +8 -0
- package/build/routes/edge/http/scrape.post.js +7 -0
- package/build/routes/edge/http/scrape.post.query.json +183 -0
- package/build/routes/edge/http/scrape.post.response.json +334 -0
- package/build/routes/edge/http/screenshot.post.body.json +669 -0
- package/build/routes/edge/http/screenshot.post.d.ts +8 -0
- package/build/routes/edge/http/screenshot.post.js +7 -0
- package/build/routes/edge/http/screenshot.post.query.json +120 -0
- package/build/routes/edge/http/screenshot.post.response.json +5 -0
- package/build/routes/edge/tests/content.spec.d.ts +1 -0
- package/build/routes/edge/tests/content.spec.js +312 -0
- package/build/routes/edge/tests/download.spec.d.ts +1 -0
- package/build/routes/edge/tests/download.spec.js +67 -0
- package/build/routes/edge/tests/function.spec.d.ts +1 -0
- package/build/routes/edge/tests/function.spec.js +277 -0
- package/build/routes/edge/tests/json-version.spec.d.ts +1 -0
- package/build/routes/edge/tests/json-version.spec.js +37 -0
- package/build/routes/edge/tests/kill-sessions.spec.d.ts +1 -0
- package/build/routes/edge/tests/kill-sessions.spec.js +80 -0
- package/build/routes/edge/tests/page-websocket.spec.d.ts +1 -0
- package/build/routes/edge/tests/page-websocket.spec.js +97 -0
- package/build/routes/edge/tests/pdf.spec.d.ts +1 -0
- package/build/routes/edge/tests/pdf.spec.js +345 -0
- package/build/routes/edge/tests/performance.spec.d.ts +1 -0
- package/build/routes/edge/tests/performance.spec.js +124 -0
- package/build/routes/edge/tests/scrape.spec.d.ts +1 -0
- package/build/routes/edge/tests/scrape.spec.js +354 -0
- package/build/routes/edge/tests/screenshot.spec.d.ts +1 -0
- package/build/routes/edge/tests/screenshot.spec.js +339 -0
- package/build/routes/edge/tests/websocket.spec.d.ts +1 -0
- package/build/routes/edge/tests/websocket.spec.js +384 -0
- package/build/routes/edge/ws/browser.d.ts +7 -0
- package/build/routes/edge/ws/browser.js +6 -0
- package/build/routes/edge/ws/browser.query.json +120 -0
- package/build/routes/edge/ws/cdp.d.ts +8 -0
- package/build/routes/edge/ws/cdp.js +7 -0
- package/build/routes/edge/ws/cdp.query.json +120 -0
- package/build/routes/edge/ws/page.d.ts +8 -0
- package/build/routes/edge/ws/page.js +7 -0
- package/build/routes/edge/ws/page.query.json +120 -0
- package/build/routes/edge/ws/playwright.d.ts +8 -0
- package/build/routes/edge/ws/playwright.js +7 -0
- package/build/routes/edge/ws/playwright.query.json +100 -0
- package/build/routes/firefox/tests/kill-sessions.spec.js +1 -1
- package/build/routes/management/http/meta.get.js +3 -1
- package/build/routes/webkit/tests/kill-sessions.spec.js +1 -1
- package/build/sdk-utils.js +1 -1
- package/build/shared/scrape.http.js +2 -2
- package/build/types.d.ts +32 -0
- package/build/types.js +18 -0
- package/build/utils.d.ts +1 -0
- package/build/utils.js +16 -2
- package/docker/chrome/Dockerfile +14 -14
- package/docker/chromium/Dockerfile +14 -14
- package/docker/edge/.dockerignore +16 -0
- package/docker/edge/Dockerfile +43 -0
- package/docker/firefox/Dockerfile +14 -14
- package/docker/multi/Dockerfile +18 -18
- package/docker/sdk/Dockerfile +10 -0
- package/extensions/ublock/_locales/ar/messages.json +3 -3
- package/extensions/ublock/_locales/bg/messages.json +1 -1
- package/extensions/ublock/_locales/br_FR/messages.json +2 -2
- package/extensions/ublock/_locales/cy/messages.json +11 -11
- package/extensions/ublock/_locales/el/messages.json +2 -2
- package/extensions/ublock/_locales/hu/messages.json +1 -1
- package/extensions/ublock/_locales/id/messages.json +1 -1
- package/extensions/ublock/_locales/lv/messages.json +4 -4
- package/extensions/ublock/_locales/mk/messages.json +130 -130
- package/extensions/ublock/_locales/oc/messages.json +1 -1
- package/extensions/ublock/_locales/pt_BR/messages.json +1 -1
- package/extensions/ublock/_locales/pt_PT/messages.json +2 -2
- package/extensions/ublock/_locales/si/messages.json +100 -100
- package/extensions/ublock/_locales/sr/messages.json +4 -4
- package/extensions/ublock/_locales/vi/messages.json +19 -19
- package/extensions/ublock/_locales/zh_TW/messages.json +28 -28
- package/extensions/ublock/assets/assets.json +33 -29
- package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +2984 -3287
- package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +150 -171
- package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +37 -27
- package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +802 -888
- package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +2355 -2071
- package/extensions/ublock/assets/ublock/badlists.txt +9 -1
- package/extensions/ublock/assets/ublock/badware.min.txt +354 -243
- package/extensions/ublock/assets/ublock/filters.min.txt +5837 -5737
- package/extensions/ublock/assets/ublock/privacy.min.txt +151 -38
- package/extensions/ublock/assets/ublock/quick-fixes.min.txt +83 -127
- package/extensions/ublock/assets/ublock/unbreak.min.txt +66 -50
- package/extensions/ublock/css/codemirror.css +4 -0
- package/extensions/ublock/document-blocked.html +3 -1
- package/extensions/ublock/js/arglist-parser.js +116 -0
- package/extensions/ublock/js/background.js +1 -1
- package/extensions/ublock/js/logger-ui.js +1 -1
- package/extensions/ublock/js/messaging.js +9 -2
- package/extensions/ublock/js/pagestore.js +3 -1
- package/extensions/ublock/js/redirect-engine.js +3 -1
- package/extensions/ublock/{assets/resources/set-attr.js → js/resources/attribute.js} +115 -11
- package/extensions/ublock/js/resources/base.js +38 -0
- package/extensions/ublock/js/resources/cookie.js +419 -0
- package/extensions/ublock/js/resources/href-sanitizer.js +188 -0
- package/extensions/ublock/js/resources/localstorage.js +235 -0
- package/extensions/ublock/js/resources/parse-replace.js +54 -0
- package/extensions/ublock/js/resources/prevent-settimeout.js +236 -0
- package/extensions/ublock/js/resources/proxy-apply.js +109 -0
- package/extensions/ublock/js/resources/replace-argument.js +120 -0
- package/extensions/ublock/{assets → js}/resources/run-at.js +20 -4
- package/extensions/ublock/{assets → js}/resources/safe-self.js +5 -4
- package/extensions/ublock/{assets → js}/resources/scriptlets.js +90 -1589
- package/extensions/ublock/js/resources/set-constant.js +287 -0
- package/extensions/ublock/js/resources/shared.js +44 -0
- package/extensions/ublock/js/resources/spoof-css.js +163 -0
- package/extensions/ublock/js/s14e-serializer.js +2 -1
- package/extensions/ublock/js/scriptlet-filtering-core.js +1 -1
- package/extensions/ublock/js/scriptlet-filtering.js +1 -31
- package/extensions/ublock/js/static-dnr-filtering.js +143 -129
- package/extensions/ublock/js/static-filtering-parser.js +27 -117
- package/extensions/ublock/js/static-net-filtering.js +53 -141
- package/extensions/ublock/js/traffic.js +1 -1
- package/extensions/ublock/js/urlskip.js +166 -0
- package/extensions/ublock/js/vapi-background-ext.js +38 -14
- package/extensions/ublock/manifest.json +1 -1
- package/package.json +22 -22
- package/src/browserless.ts +4 -0
- package/src/browsers/browsers.cdp.ts +5 -0
- package/src/browsers/browsers.playwright.ts +14 -1
- package/src/browsers/index.ts +5 -2
- package/src/http.ts +9 -0
- package/src/routes/chrome/tests/kill-sessions.spec.ts +1 -1
- package/src/routes/chromium/tests/kill-sessions.spec.ts +1 -1
- package/src/routes/edge/http/content.post.ts +20 -0
- package/src/routes/edge/http/download.post.ts +20 -0
- package/src/routes/edge/http/function.post.ts +20 -0
- package/src/routes/edge/http/json-list.get.ts +7 -0
- package/src/routes/edge/http/json-new.put.ts +7 -0
- package/src/routes/edge/http/json-protocol.get.ts +7 -0
- package/src/routes/edge/http/json-version.get.ts +7 -0
- package/src/routes/edge/http/pdf.post.ts +20 -0
- package/src/routes/edge/http/performance.post.ts +20 -0
- package/src/routes/edge/http/scrape.post.ts +20 -0
- package/src/routes/edge/http/screenshot.post.ts +20 -0
- package/src/routes/edge/tests/content.spec.ts +376 -0
- package/src/routes/edge/tests/download.spec.ts +77 -0
- package/src/routes/edge/tests/function.spec.ts +317 -0
- package/src/routes/edge/tests/json-version.spec.ts +52 -0
- package/src/routes/edge/tests/kill-sessions.spec.ts +99 -0
- package/src/routes/edge/tests/page-websocket.spec.ts +129 -0
- package/src/routes/edge/tests/pdf.spec.ts +389 -0
- package/src/routes/edge/tests/performance.spec.ts +155 -0
- package/src/routes/edge/tests/scrape.spec.ts +417 -0
- package/src/routes/edge/tests/screenshot.spec.ts +387 -0
- package/src/routes/edge/tests/websocket.spec.ts +510 -0
- package/src/routes/edge/ws/browser.ts +10 -0
- package/src/routes/edge/ws/cdp.ts +17 -0
- package/src/routes/edge/ws/page.ts +10 -0
- package/src/routes/edge/ws/playwright.ts +17 -0
- package/src/routes/firefox/tests/kill-sessions.spec.ts +1 -1
- package/src/routes/management/http/meta.get.ts +6 -1
- package/src/routes/management/http/static.get.ts +1 -1
- package/src/routes/webkit/tests/kill-sessions.spec.ts +1 -1
- package/src/sdk-utils.ts +1 -1
- package/src/shared/scrape.http.ts +2 -2
- package/src/types.ts +19 -0
- package/src/utils.ts +38 -16
- package/static/docs/swagger.json +2097 -10
- package/static/docs/swagger.min.json +2096 -9
- package/static/function/client.js +141 -253
- package/static/function/index.html +141 -253
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"addScriptTag": {
|
|
5
|
+
"type": "array",
|
|
6
|
+
"items": {
|
|
7
|
+
"$ref": "#/definitions/FrameAddScriptTagOptions"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"addStyleTag": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"$ref": "#/definitions/FrameAddStyleTagOptions"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"authenticate": {
|
|
17
|
+
"anyOf": [
|
|
18
|
+
{
|
|
19
|
+
"$ref": "#/definitions/Credentials"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "null"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"bestAttempt": {
|
|
27
|
+
"description": "When bestAttempt is set to true, browserless attempt to proceed\nwhen \"awaited\" events fail or timeout. This includes things like\ngoto, waitForSelector, and more.",
|
|
28
|
+
"type": "boolean"
|
|
29
|
+
},
|
|
30
|
+
"cookies": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"$ref": "#/definitions/CookieParam"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"emulateMediaType": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"gotoOptions": {
|
|
40
|
+
"$ref": "#/definitions/GoToOptions"
|
|
41
|
+
},
|
|
42
|
+
"html": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"options": {
|
|
46
|
+
"$ref": "#/definitions/PDFOptions"
|
|
47
|
+
},
|
|
48
|
+
"rejectRequestPattern": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"rejectResourceTypes": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"enum": [
|
|
58
|
+
"cspviolationreport",
|
|
59
|
+
"document",
|
|
60
|
+
"eventsource",
|
|
61
|
+
"fetch",
|
|
62
|
+
"font",
|
|
63
|
+
"image",
|
|
64
|
+
"manifest",
|
|
65
|
+
"media",
|
|
66
|
+
"other",
|
|
67
|
+
"ping",
|
|
68
|
+
"prefetch",
|
|
69
|
+
"preflight",
|
|
70
|
+
"script",
|
|
71
|
+
"signedexchange",
|
|
72
|
+
"stylesheet",
|
|
73
|
+
"texttrack",
|
|
74
|
+
"websocket",
|
|
75
|
+
"xhr"
|
|
76
|
+
],
|
|
77
|
+
"type": "string"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"requestInterceptors": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
84
|
+
"type": "object",
|
|
85
|
+
"properties": {
|
|
86
|
+
"pattern": {
|
|
87
|
+
"description": "An array of patterns (using `req.url().match(r.pattern)` to match) and their\ncorresponding responses to use in order to fulfill those requests.",
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"response": {
|
|
91
|
+
"$ref": "#/definitions/Partial<ResponseForRequest>"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"required": [
|
|
96
|
+
"pattern",
|
|
97
|
+
"response"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"setExtraHTTPHeaders": {
|
|
102
|
+
"$ref": "#/definitions/Record<string,string>"
|
|
103
|
+
},
|
|
104
|
+
"setJavaScriptEnabled": {
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
},
|
|
107
|
+
"url": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"userAgent": {
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"viewport": {
|
|
114
|
+
"anyOf": [
|
|
115
|
+
{
|
|
116
|
+
"$ref": "#/definitions/Viewport"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "null"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"waitForEvent": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"event": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
"timeout": {
|
|
130
|
+
"type": "number"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"required": [
|
|
135
|
+
"event"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"waitForFunction": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"properties": {
|
|
141
|
+
"fn": {
|
|
142
|
+
"description": "The function, or statement, to be evaluated in browser context",
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
"polling": {
|
|
146
|
+
"description": "An interval at which the pageFunction is executed, defaults to raf.\nIf polling is a number, then it is treated as an interval in milliseconds\nat which the function would be executed. If polling is a string,\nthen it can be one of the following values: \"raf\" or \"mutation\"",
|
|
147
|
+
"type": [
|
|
148
|
+
"string",
|
|
149
|
+
"number"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"timeout": {
|
|
153
|
+
"description": "Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds).\nPass 0 to disable timeout.",
|
|
154
|
+
"type": "number"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": [
|
|
159
|
+
"fn"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"waitForSelector": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"hidden": {
|
|
166
|
+
"type": "boolean"
|
|
167
|
+
},
|
|
168
|
+
"selector": {
|
|
169
|
+
"type": "string"
|
|
170
|
+
},
|
|
171
|
+
"timeout": {
|
|
172
|
+
"type": "number"
|
|
173
|
+
},
|
|
174
|
+
"visible": {
|
|
175
|
+
"type": "boolean"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"additionalProperties": false,
|
|
179
|
+
"required": [
|
|
180
|
+
"selector"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"waitForTimeout": {
|
|
184
|
+
"type": "number"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"additionalProperties": false,
|
|
188
|
+
"definitions": {
|
|
189
|
+
"FrameAddScriptTagOptions": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"properties": {
|
|
192
|
+
"url": {
|
|
193
|
+
"description": "URL of the script to be added.",
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"path": {
|
|
197
|
+
"description": "Path to a JavaScript file to be injected into the frame.",
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"content": {
|
|
201
|
+
"description": "JavaScript to be injected into the frame.",
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"type": {
|
|
205
|
+
"description": "Sets the `type` of the script. Use `module` in order to load an ES2015 module.",
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"id": {
|
|
209
|
+
"description": "Sets the `id` of the script.",
|
|
210
|
+
"type": "string"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"additionalProperties": false
|
|
214
|
+
},
|
|
215
|
+
"FrameAddStyleTagOptions": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"properties": {
|
|
218
|
+
"url": {
|
|
219
|
+
"description": "the URL of the CSS file to be added.",
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
"path": {
|
|
223
|
+
"description": "The path to a CSS file to be injected into the frame.",
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"content": {
|
|
227
|
+
"description": "Raw CSS content to be injected into the frame.",
|
|
228
|
+
"type": "string"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"additionalProperties": false
|
|
232
|
+
},
|
|
233
|
+
"Credentials": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"username": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"password": {
|
|
240
|
+
"type": "string"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"additionalProperties": false,
|
|
244
|
+
"required": [
|
|
245
|
+
"password",
|
|
246
|
+
"username"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"CookieParam": {
|
|
250
|
+
"description": "Cookie parameter object used to set cookies in the page-level cookies\nAPI.",
|
|
251
|
+
"type": "object",
|
|
252
|
+
"properties": {
|
|
253
|
+
"name": {
|
|
254
|
+
"description": "Cookie name.",
|
|
255
|
+
"type": "string"
|
|
256
|
+
},
|
|
257
|
+
"value": {
|
|
258
|
+
"description": "Cookie value.",
|
|
259
|
+
"type": "string"
|
|
260
|
+
},
|
|
261
|
+
"url": {
|
|
262
|
+
"description": "The request-URI to associate with the setting of the cookie. This value can affect\nthe default domain, path, and source scheme values of the created cookie.",
|
|
263
|
+
"type": "string"
|
|
264
|
+
},
|
|
265
|
+
"domain": {
|
|
266
|
+
"description": "Cookie domain.",
|
|
267
|
+
"type": "string"
|
|
268
|
+
},
|
|
269
|
+
"path": {
|
|
270
|
+
"description": "Cookie path.",
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"secure": {
|
|
274
|
+
"description": "True if cookie is secure.",
|
|
275
|
+
"type": "boolean"
|
|
276
|
+
},
|
|
277
|
+
"httpOnly": {
|
|
278
|
+
"description": "True if cookie is http-only.",
|
|
279
|
+
"type": "boolean"
|
|
280
|
+
},
|
|
281
|
+
"sameSite": {
|
|
282
|
+
"description": "Cookie SameSite type.",
|
|
283
|
+
"enum": [
|
|
284
|
+
"Lax",
|
|
285
|
+
"None",
|
|
286
|
+
"Strict"
|
|
287
|
+
],
|
|
288
|
+
"type": "string"
|
|
289
|
+
},
|
|
290
|
+
"expires": {
|
|
291
|
+
"description": "Cookie expiration date, session cookie if not set",
|
|
292
|
+
"type": "number"
|
|
293
|
+
},
|
|
294
|
+
"priority": {
|
|
295
|
+
"description": "Cookie Priority. Supported only in Chrome.",
|
|
296
|
+
"enum": [
|
|
297
|
+
"High",
|
|
298
|
+
"Low",
|
|
299
|
+
"Medium"
|
|
300
|
+
],
|
|
301
|
+
"type": "string"
|
|
302
|
+
},
|
|
303
|
+
"sameParty": {
|
|
304
|
+
"description": "True if cookie is SameParty. Supported only in Chrome.",
|
|
305
|
+
"type": "boolean"
|
|
306
|
+
},
|
|
307
|
+
"sourceScheme": {
|
|
308
|
+
"description": "Cookie source scheme type. Supported only in Chrome.",
|
|
309
|
+
"enum": [
|
|
310
|
+
"NonSecure",
|
|
311
|
+
"Secure",
|
|
312
|
+
"Unset"
|
|
313
|
+
],
|
|
314
|
+
"type": "string"
|
|
315
|
+
},
|
|
316
|
+
"partitionKey": {
|
|
317
|
+
"description": "Cookie partition key. In Chrome, it matches the top-level site the\npartitioned cookie is available in. In Firefox, it matches the\nsource origin\n(https://w3c.github.io/webdriver-bidi/#type-storage-PartitionKey).",
|
|
318
|
+
"anyOf": [
|
|
319
|
+
{
|
|
320
|
+
"$ref": "#/definitions/CookiePartitionKey"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"type": "string"
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"additionalProperties": false,
|
|
329
|
+
"required": [
|
|
330
|
+
"name",
|
|
331
|
+
"value"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
"CookiePartitionKey": {
|
|
335
|
+
"description": "Represents a cookie partition key in Chrome.",
|
|
336
|
+
"type": "object",
|
|
337
|
+
"properties": {
|
|
338
|
+
"sourceOrigin": {
|
|
339
|
+
"description": "The site of the top-level URL the browser was visiting at the start of the request\nto the endpoint that set the cookie.\n\nIn Chrome, maps to the CDP's `topLevelSite` partition key.",
|
|
340
|
+
"type": "string"
|
|
341
|
+
},
|
|
342
|
+
"hasCrossSiteAncestor": {
|
|
343
|
+
"description": "Indicates if the cookie has any ancestors that are cross-site to\nthe topLevelSite.\n\nSupported only in Chrome.",
|
|
344
|
+
"type": "boolean"
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"additionalProperties": false,
|
|
348
|
+
"required": [
|
|
349
|
+
"sourceOrigin"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
"GoToOptions": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"properties": {
|
|
355
|
+
"referer": {
|
|
356
|
+
"description": "If provided, it will take preference over the referer header value set by\n{@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.",
|
|
357
|
+
"type": "string"
|
|
358
|
+
},
|
|
359
|
+
"referrerPolicy": {
|
|
360
|
+
"description": "If provided, it will take preference over the referer-policy header value\nset by {@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.",
|
|
361
|
+
"type": "string"
|
|
362
|
+
},
|
|
363
|
+
"timeout": {
|
|
364
|
+
"description": "Maximum wait time in milliseconds. Pass 0 to disable the timeout.\n\nThe default value can be changed by using the\n{@link Page.setDefaultTimeout} or {@link Page.setDefaultNavigationTimeout}\nmethods.",
|
|
365
|
+
"type": "number"
|
|
366
|
+
},
|
|
367
|
+
"waitUntil": {
|
|
368
|
+
"description": "When to consider waiting succeeds. Given an array of event strings, waiting\nis considered to be successful after all events have been fired.",
|
|
369
|
+
"anyOf": [
|
|
370
|
+
{
|
|
371
|
+
"type": "array",
|
|
372
|
+
"items": {
|
|
373
|
+
"$ref": "#/definitions/PuppeteerLifeCycleEvent"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"enum": [
|
|
378
|
+
"domcontentloaded",
|
|
379
|
+
"load",
|
|
380
|
+
"networkidle0",
|
|
381
|
+
"networkidle2"
|
|
382
|
+
],
|
|
383
|
+
"type": "string"
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
"signal": {
|
|
388
|
+
"description": "A signal object that allows you to cancel the call.",
|
|
389
|
+
"$ref": "#/definitions/AbortSignal"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"additionalProperties": false
|
|
393
|
+
},
|
|
394
|
+
"PuppeteerLifeCycleEvent": {
|
|
395
|
+
"enum": [
|
|
396
|
+
"domcontentloaded",
|
|
397
|
+
"load",
|
|
398
|
+
"networkidle0",
|
|
399
|
+
"networkidle2"
|
|
400
|
+
],
|
|
401
|
+
"type": "string"
|
|
402
|
+
},
|
|
403
|
+
"AbortSignal": {
|
|
404
|
+
"type": "object",
|
|
405
|
+
"properties": {
|
|
406
|
+
"aborted": {
|
|
407
|
+
"type": "boolean"
|
|
408
|
+
},
|
|
409
|
+
"onabort": {
|
|
410
|
+
"anyOf": [
|
|
411
|
+
{
|
|
412
|
+
"type": "object",
|
|
413
|
+
"additionalProperties": false
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"type": "null"
|
|
417
|
+
}
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
"reason": {}
|
|
421
|
+
},
|
|
422
|
+
"additionalProperties": false,
|
|
423
|
+
"required": [
|
|
424
|
+
"aborted",
|
|
425
|
+
"onabort",
|
|
426
|
+
"reason"
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
"PDFOptions": {
|
|
430
|
+
"description": "Valid options to configure PDF generation via {@link Page.pdf}.",
|
|
431
|
+
"type": "object",
|
|
432
|
+
"properties": {
|
|
433
|
+
"scale": {
|
|
434
|
+
"description": "Scales the rendering of the web page. Amount must be between `0.1` and `2`.",
|
|
435
|
+
"type": "number"
|
|
436
|
+
},
|
|
437
|
+
"displayHeaderFooter": {
|
|
438
|
+
"description": "Whether to show the header and footer.",
|
|
439
|
+
"type": "boolean"
|
|
440
|
+
},
|
|
441
|
+
"headerTemplate": {
|
|
442
|
+
"description": "HTML template for the print header. Should be valid HTML with the following\nclasses used to inject values into them:\n\n- `date` formatted print date\n\n- `title` document title\n\n- `url` document location\n\n- `pageNumber` current page number\n\n- `totalPages` total pages in the document",
|
|
443
|
+
"type": "string"
|
|
444
|
+
},
|
|
445
|
+
"footerTemplate": {
|
|
446
|
+
"description": "HTML template for the print footer. Has the same constraints and support\nfor special classes as {@link PDFOptions.headerTemplate}.",
|
|
447
|
+
"type": "string"
|
|
448
|
+
},
|
|
449
|
+
"printBackground": {
|
|
450
|
+
"description": "Set to `true` to print background graphics.",
|
|
451
|
+
"type": "boolean"
|
|
452
|
+
},
|
|
453
|
+
"landscape": {
|
|
454
|
+
"description": "Whether to print in landscape orientation.",
|
|
455
|
+
"type": "boolean"
|
|
456
|
+
},
|
|
457
|
+
"pageRanges": {
|
|
458
|
+
"description": "Paper ranges to print, e.g. `1-5, 8, 11-13`.",
|
|
459
|
+
"type": "string"
|
|
460
|
+
},
|
|
461
|
+
"format": {
|
|
462
|
+
"description": "All the valid paper format types when printing a PDF.",
|
|
463
|
+
"enum": [
|
|
464
|
+
"A0",
|
|
465
|
+
"A1",
|
|
466
|
+
"A2",
|
|
467
|
+
"A3",
|
|
468
|
+
"A4",
|
|
469
|
+
"A5",
|
|
470
|
+
"A6",
|
|
471
|
+
"LEDGER",
|
|
472
|
+
"LEGAL",
|
|
473
|
+
"LETTER",
|
|
474
|
+
"Ledger",
|
|
475
|
+
"Legal",
|
|
476
|
+
"Letter",
|
|
477
|
+
"TABLOID",
|
|
478
|
+
"Tabloid",
|
|
479
|
+
"a0",
|
|
480
|
+
"a1",
|
|
481
|
+
"a2",
|
|
482
|
+
"a3",
|
|
483
|
+
"a4",
|
|
484
|
+
"a5",
|
|
485
|
+
"a6",
|
|
486
|
+
"ledger",
|
|
487
|
+
"legal",
|
|
488
|
+
"letter",
|
|
489
|
+
"tabloid"
|
|
490
|
+
],
|
|
491
|
+
"type": "string"
|
|
492
|
+
},
|
|
493
|
+
"width": {
|
|
494
|
+
"description": "Sets the width of paper. You can pass in a number or a string with a unit.",
|
|
495
|
+
"type": [
|
|
496
|
+
"string",
|
|
497
|
+
"number"
|
|
498
|
+
]
|
|
499
|
+
},
|
|
500
|
+
"height": {
|
|
501
|
+
"description": "Sets the height of paper. You can pass in a number or a string with a unit.",
|
|
502
|
+
"type": [
|
|
503
|
+
"string",
|
|
504
|
+
"number"
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
"preferCSSPageSize": {
|
|
508
|
+
"description": "Give any CSS `@page` size declared in the page priority over what is\ndeclared in the `width` or `height` or `format` option.",
|
|
509
|
+
"type": "boolean"
|
|
510
|
+
},
|
|
511
|
+
"margin": {
|
|
512
|
+
"description": "Set the PDF margins.",
|
|
513
|
+
"$ref": "#/definitions/PDFMargin"
|
|
514
|
+
},
|
|
515
|
+
"path": {
|
|
516
|
+
"description": "The path to save the file to.",
|
|
517
|
+
"type": "string"
|
|
518
|
+
},
|
|
519
|
+
"omitBackground": {
|
|
520
|
+
"description": "Hides default white background and allows generating pdfs with transparency.",
|
|
521
|
+
"type": "boolean"
|
|
522
|
+
},
|
|
523
|
+
"tagged": {
|
|
524
|
+
"description": "Generate tagged (accessible) PDF.",
|
|
525
|
+
"type": "boolean"
|
|
526
|
+
},
|
|
527
|
+
"outline": {
|
|
528
|
+
"description": "Generate document outline.",
|
|
529
|
+
"type": "boolean"
|
|
530
|
+
},
|
|
531
|
+
"timeout": {
|
|
532
|
+
"description": "Timeout in milliseconds. Pass `0` to disable timeout.\n\nThe default value can be changed by using {@link Page.setDefaultTimeout}",
|
|
533
|
+
"type": "number"
|
|
534
|
+
},
|
|
535
|
+
"waitForFonts": {
|
|
536
|
+
"description": "If true, waits for `document.fonts.ready` to resolve. This might require\nactivating the page using {@link Page.bringToFront} if the page is in the\nbackground.",
|
|
537
|
+
"type": "boolean"
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
"additionalProperties": false
|
|
541
|
+
},
|
|
542
|
+
"PDFMargin": {
|
|
543
|
+
"type": "object",
|
|
544
|
+
"properties": {
|
|
545
|
+
"top": {
|
|
546
|
+
"type": [
|
|
547
|
+
"string",
|
|
548
|
+
"number"
|
|
549
|
+
]
|
|
550
|
+
},
|
|
551
|
+
"bottom": {
|
|
552
|
+
"type": [
|
|
553
|
+
"string",
|
|
554
|
+
"number"
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
"left": {
|
|
558
|
+
"type": [
|
|
559
|
+
"string",
|
|
560
|
+
"number"
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
"right": {
|
|
564
|
+
"type": [
|
|
565
|
+
"string",
|
|
566
|
+
"number"
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
"additionalProperties": false
|
|
571
|
+
},
|
|
572
|
+
"Partial<ResponseForRequest>": {
|
|
573
|
+
"type": "object",
|
|
574
|
+
"properties": {
|
|
575
|
+
"status": {
|
|
576
|
+
"type": "number"
|
|
577
|
+
},
|
|
578
|
+
"headers": {
|
|
579
|
+
"description": "Optional response headers.\n\nThe record values will be converted to string following:\nArrays' values will be mapped to String\n(Used when you need multiple headers with the same name).\nNon-arrays will be converted to String.",
|
|
580
|
+
"$ref": "#/definitions/Record<string,unknown>"
|
|
581
|
+
},
|
|
582
|
+
"contentType": {
|
|
583
|
+
"type": "string"
|
|
584
|
+
},
|
|
585
|
+
"body": {
|
|
586
|
+
"anyOf": [
|
|
587
|
+
{
|
|
588
|
+
"type": "object",
|
|
589
|
+
"additionalProperties": false,
|
|
590
|
+
"patternProperties": {
|
|
591
|
+
"^[0-9]+$": {
|
|
592
|
+
"type": "number"
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
"properties": {
|
|
596
|
+
"BYTES_PER_ELEMENT": {
|
|
597
|
+
"type": "number"
|
|
598
|
+
},
|
|
599
|
+
"buffer": {
|
|
600
|
+
"$ref": "#/definitions/ArrayBufferLike"
|
|
601
|
+
},
|
|
602
|
+
"byteLength": {
|
|
603
|
+
"type": "number"
|
|
604
|
+
},
|
|
605
|
+
"byteOffset": {
|
|
606
|
+
"type": "number"
|
|
607
|
+
},
|
|
608
|
+
"length": {
|
|
609
|
+
"type": "number"
|
|
610
|
+
},
|
|
611
|
+
"__@toStringTag@339568": {
|
|
612
|
+
"type": "string",
|
|
613
|
+
"const": "Uint8Array"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"required": [
|
|
617
|
+
"BYTES_PER_ELEMENT",
|
|
618
|
+
"__@toStringTag@339568",
|
|
619
|
+
"buffer",
|
|
620
|
+
"byteLength",
|
|
621
|
+
"byteOffset",
|
|
622
|
+
"length"
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"type": "string"
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
"additionalProperties": false
|
|
632
|
+
},
|
|
633
|
+
"Record<string,unknown>": {
|
|
634
|
+
"type": "object",
|
|
635
|
+
"additionalProperties": false
|
|
636
|
+
},
|
|
637
|
+
"ArrayBufferLike": {
|
|
638
|
+
"anyOf": [
|
|
639
|
+
{
|
|
640
|
+
"$ref": "#/definitions/ArrayBuffer"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"$ref": "#/definitions/SharedArrayBuffer"
|
|
644
|
+
}
|
|
645
|
+
]
|
|
646
|
+
},
|
|
647
|
+
"ArrayBuffer": {
|
|
648
|
+
"type": "object",
|
|
649
|
+
"properties": {
|
|
650
|
+
"byteLength": {
|
|
651
|
+
"type": "number"
|
|
652
|
+
},
|
|
653
|
+
"__@toStringTag@339568": {
|
|
654
|
+
"type": "string"
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
"additionalProperties": false,
|
|
658
|
+
"required": [
|
|
659
|
+
"__@toStringTag@339568",
|
|
660
|
+
"byteLength"
|
|
661
|
+
]
|
|
662
|
+
},
|
|
663
|
+
"SharedArrayBuffer": {
|
|
664
|
+
"type": "object",
|
|
665
|
+
"properties": {
|
|
666
|
+
"byteLength": {
|
|
667
|
+
"type": "number"
|
|
668
|
+
},
|
|
669
|
+
"__@species@339606": {
|
|
670
|
+
"$ref": "#/definitions/SharedArrayBuffer"
|
|
671
|
+
},
|
|
672
|
+
"__@toStringTag@339568": {
|
|
673
|
+
"type": "string",
|
|
674
|
+
"const": "SharedArrayBuffer"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
"additionalProperties": false,
|
|
678
|
+
"required": [
|
|
679
|
+
"__@species@339606",
|
|
680
|
+
"__@toStringTag@339568",
|
|
681
|
+
"byteLength"
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
"Record<string,string>": {
|
|
685
|
+
"type": "object",
|
|
686
|
+
"additionalProperties": false
|
|
687
|
+
},
|
|
688
|
+
"Viewport": {
|
|
689
|
+
"type": "object",
|
|
690
|
+
"properties": {
|
|
691
|
+
"width": {
|
|
692
|
+
"description": "The page width in CSS pixels.",
|
|
693
|
+
"type": "number"
|
|
694
|
+
},
|
|
695
|
+
"height": {
|
|
696
|
+
"description": "The page height in CSS pixels.",
|
|
697
|
+
"type": "number"
|
|
698
|
+
},
|
|
699
|
+
"deviceScaleFactor": {
|
|
700
|
+
"description": "Specify device scale factor.\nSee {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio devicePixelRatio} for more info.",
|
|
701
|
+
"type": "number"
|
|
702
|
+
},
|
|
703
|
+
"isMobile": {
|
|
704
|
+
"description": "Whether the `meta viewport` tag is taken into account.",
|
|
705
|
+
"type": "boolean"
|
|
706
|
+
},
|
|
707
|
+
"isLandscape": {
|
|
708
|
+
"description": "Specifies if the viewport is in landscape mode.",
|
|
709
|
+
"type": "boolean"
|
|
710
|
+
},
|
|
711
|
+
"hasTouch": {
|
|
712
|
+
"description": "Specify if the viewport supports touch events.",
|
|
713
|
+
"type": "boolean"
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
"additionalProperties": false,
|
|
717
|
+
"required": [
|
|
718
|
+
"height",
|
|
719
|
+
"width"
|
|
720
|
+
]
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
724
|
+
}
|