@browserless.io/browserless 2.3.0-beta-1 → 2.3.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 +9 -1
- package/README.md +2 -2
- package/bin/browserless.js +47 -18
- package/bin/scaffold/README.md +50 -0
- package/bin/scaffold/src/hello-world.http.ts +2 -1
- package/build/browserless.d.ts +3 -5
- package/build/browserless.js +17 -11
- package/build/browsers/chrome.cdp.js +1 -1
- package/build/browsers/chrome.playwright.js +1 -1
- package/build/browsers/index.d.ts +1 -0
- package/build/browsers/index.js +4 -1
- package/build/data/classes.json +1 -1
- package/build/data/selectors.json +1 -1
- package/build/exports.d.ts +24 -38
- package/build/exports.js +25 -44
- package/build/limiter.d.ts +2 -1
- package/build/limiter.js +6 -3
- package/build/routes/chrome/http/content.post.body.json +8 -8
- package/build/routes/chrome/http/content.post.d.ts +2 -1
- package/build/routes/chrome/http/content.post.js +3 -2
- package/build/routes/chrome/http/download.post.body.json +11 -489
- package/build/routes/chrome/http/download.post.d.ts +2 -1
- package/build/routes/chrome/http/download.post.js +3 -2
- package/build/routes/chrome/http/download.post.query.json +6 -69
- package/build/routes/chrome/http/download.post.response.json +0 -1
- package/build/routes/chrome/http/function.post.body.json +11 -489
- package/build/routes/chrome/http/function.post.d.ts +2 -1
- package/build/routes/chrome/http/function.post.js +3 -2
- package/build/routes/chrome/http/function.post.query.json +6 -69
- package/build/routes/chrome/http/function.post.response.json +0 -1
- package/build/routes/chrome/http/json-list.get.d.ts +5 -1
- package/build/routes/chrome/http/json-list.get.js +5 -1
- package/build/routes/chrome/http/json-list.get.response.json +49 -1
- package/build/routes/chrome/http/json-new.put.d.ts +5 -1
- package/build/routes/chrome/http/json-new.put.js +5 -1
- package/build/routes/chrome/http/json-new.put.response.json +41 -1
- package/build/routes/chrome/http/json-protocol.get.d.ts +5 -1
- package/build/routes/chrome/http/json-protocol.get.js +5 -1
- package/build/routes/chrome/http/json-protocol.get.response.json +3 -1
- package/build/routes/chrome/http/json-version.get.d.ts +5 -1
- package/build/routes/chrome/http/json-version.get.js +5 -1
- package/build/routes/chrome/http/json-version.get.response.json +41 -1
- package/build/routes/chrome/http/pdf.post.body.json +153 -9
- package/build/routes/chrome/http/pdf.post.d.ts +2 -1
- package/build/routes/chrome/http/pdf.post.js +3 -2
- package/build/routes/chrome/http/pdf.post.query.json +6 -69
- package/build/routes/chrome/http/performance.post.body.json +10 -494
- package/build/routes/chrome/http/performance.post.d.ts +2 -1
- package/build/routes/chrome/http/performance.post.js +3 -2
- package/build/routes/chrome/http/performance.post.query.json +6 -69
- package/build/routes/chrome/http/performance.post.response.json +3 -1
- package/build/routes/chrome/http/scrape.post.body.json +56 -9
- package/build/routes/chrome/http/scrape.post.d.ts +2 -1
- package/build/routes/chrome/http/scrape.post.js +3 -2
- package/build/routes/chrome/http/scrape.post.response.json +305 -1
- package/build/routes/chrome/http/screenshot.post.body.json +99 -9
- package/build/routes/chrome/http/screenshot.post.d.ts +2 -1
- package/build/routes/chrome/http/screenshot.post.js +3 -2
- package/build/routes/chrome/http/screenshot.post.query.json +6 -69
- package/build/routes/chrome/ws/browser.d.ts +2 -1
- package/build/routes/chrome/ws/browser.js +3 -2
- package/build/routes/chrome/ws/browser.query.json +6 -69
- package/build/routes/chrome/ws/cdp.d.ts +2 -1
- package/build/routes/chrome/ws/cdp.js +3 -2
- package/build/routes/chrome/ws/cdp.query.json +6 -69
- package/build/routes/chrome/ws/page.d.ts +3 -2
- package/build/routes/chrome/ws/page.js +3 -2
- package/build/routes/chrome/ws/page.query.json +6 -69
- package/build/routes/chrome/ws/playwright.d.ts +1 -0
- package/build/routes/chrome/ws/playwright.js +2 -1
- package/build/routes/chrome/ws/playwright.query.json +7 -90
- package/build/routes/chromium/http/content.post.body.json +8 -8
- package/build/routes/chromium/http/download.post.body.json +11 -489
- package/build/routes/chromium/http/download.post.query.json +6 -69
- package/build/routes/chromium/http/download.post.response.json +0 -1
- package/build/routes/chromium/http/function.post.body.json +11 -489
- package/build/routes/chromium/http/function.post.query.json +6 -69
- package/build/routes/chromium/http/function.post.response.json +0 -1
- package/build/routes/chromium/http/json-list.get.response.json +49 -1
- package/build/routes/chromium/http/json-new.put.response.json +41 -1
- package/build/routes/chromium/http/json-protocol.get.response.json +3 -1
- package/build/routes/chromium/http/json-version.get.response.json +41 -1
- package/build/routes/chromium/http/pdf.post.body.json +153 -9
- package/build/routes/chromium/http/pdf.post.query.json +6 -69
- package/build/routes/chromium/http/performance.post.body.json +10 -494
- package/build/routes/chromium/http/performance.post.query.json +6 -69
- package/build/routes/chromium/http/performance.post.response.json +3 -1
- package/build/routes/chromium/http/scrape.post.body.json +56 -9
- package/build/routes/chromium/http/scrape.post.response.json +305 -1
- package/build/routes/chromium/http/screenshot.post.body.json +99 -9
- package/build/routes/chromium/http/screenshot.post.query.json +6 -69
- package/build/routes/chromium/ws/browser.query.json +6 -69
- package/build/routes/chromium/ws/cdp.query.json +6 -69
- package/build/routes/chromium/ws/page.query.json +6 -69
- package/build/routes/chromium/ws/playwright.query.json +7 -90
- package/build/routes/firefox/ws/playwright.d.ts +2 -1
- package/build/routes/firefox/ws/playwright.js +3 -2
- package/build/routes/firefox/ws/playwright.query.json +30 -115
- package/build/routes/management/http/config.get.d.ts +1 -0
- package/build/routes/management/http/config.get.js +2 -1
- package/build/routes/management/http/config.get.response.json +104 -1
- package/build/routes/management/http/metrics-total.get.d.ts +1 -0
- package/build/routes/management/http/metrics-total.get.js +2 -1
- package/build/routes/management/http/metrics-total.get.response.json +69 -1
- package/build/routes/management/http/metrics.get.d.ts +1 -0
- package/build/routes/management/http/metrics.get.js +2 -1
- package/build/routes/management/http/metrics.get.response.json +91 -1
- package/build/routes/management/http/sessions.get.d.ts +1 -0
- package/build/routes/management/http/sessions.get.js +2 -1
- package/build/routes/management/http/sessions.get.response.json +232 -1
- package/build/routes/management/http/static.get.d.ts +1 -0
- package/build/routes/management/http/static.get.js +2 -1
- package/build/routes/webkit/ws/playwright.d.ts +2 -1
- package/build/routes/webkit/ws/playwright.js +3 -2
- package/build/routes/webkit/ws/playwright.query.json +7 -90
- package/build/shared/browser.ws.d.ts +2 -1
- package/build/shared/browser.ws.js +3 -2
- package/build/shared/chromium.playwright.ws.d.ts +2 -1
- package/build/shared/chromium.playwright.ws.js +3 -2
- package/build/shared/chromium.ws.d.ts +2 -1
- package/build/shared/chromium.ws.js +3 -2
- package/build/shared/content.http.d.ts +2 -1
- package/build/shared/content.http.js +3 -2
- package/build/shared/download.http.d.ts +2 -1
- package/build/shared/download.http.js +3 -2
- package/build/shared/function.http.d.ts +2 -1
- package/build/shared/function.http.js +3 -2
- package/build/shared/json-list.http.d.ts +2 -1
- package/build/shared/json-list.http.js +3 -2
- package/build/shared/json-new.http.d.ts +2 -1
- package/build/shared/json-new.http.js +3 -2
- package/build/shared/json-protocol.http.d.ts +2 -1
- package/build/shared/json-protocol.http.js +3 -2
- package/build/shared/json-version.http.d.ts +2 -1
- package/build/shared/json-version.http.js +3 -2
- package/build/shared/page.ws.d.ts +2 -1
- package/build/shared/page.ws.js +3 -2
- package/build/shared/pdf.http.d.ts +2 -1
- package/build/shared/pdf.http.js +3 -2
- package/build/shared/performance.http.d.ts +1 -0
- package/build/shared/performance.http.js +2 -1
- package/build/shared/scrape.http.d.ts +2 -1
- package/build/shared/scrape.http.js +3 -2
- package/build/shared/screenshot.http.d.ts +1 -0
- package/build/shared/screenshot.http.js +2 -1
- package/build/types.d.ts +91 -0
- package/build/types.js +54 -0
- package/build/utils.d.ts +1 -1
- package/build/utils.js +11 -6
- package/docker/chrome/Dockerfile +0 -2
- package/docker/chromium/Dockerfile +1 -4
- package/docker/firefox/Dockerfile +1 -4
- package/docker/multi/Dockerfile +2 -6
- package/docker/webkit/Dockerfile +1 -4
- package/package.json +11 -10
- package/scripts/build-open-api.js +150 -141
- package/scripts/build-schemas.js +3 -2
- package/src/browserless.ts +43 -30
- package/src/browsers/chrome.cdp.ts +1 -1
- package/src/browsers/chrome.playwright.ts +1 -1
- package/src/browsers/index.ts +5 -1
- package/src/exports.ts +25 -49
- package/src/limiter.ts +7 -3
- package/src/routes/chrome/http/content.post.ts +7 -2
- package/src/routes/chrome/http/download.post.ts +7 -2
- package/src/routes/chrome/http/function.post.ts +7 -2
- package/src/routes/chrome/http/json-list.get.ts +7 -1
- package/src/routes/chrome/http/json-new.put.ts +7 -1
- package/src/routes/chrome/http/json-protocol.get.ts +7 -1
- package/src/routes/chrome/http/json-version.get.ts +7 -1
- package/src/routes/chrome/http/pdf.post.ts +7 -2
- package/src/routes/chrome/http/performance.post.ts +7 -2
- package/src/routes/chrome/http/scrape.post.ts +7 -2
- package/src/routes/chrome/http/screenshot.post.ts +7 -2
- package/src/routes/chrome/ws/browser.ts +3 -2
- package/src/routes/chrome/ws/cdp.ts +7 -2
- package/src/routes/chrome/ws/page.ts +3 -2
- package/src/routes/chrome/ws/playwright.ts +6 -1
- package/src/routes/firefox/ws/playwright.ts +3 -1
- package/src/routes/management/http/config.get.ts +2 -0
- package/src/routes/management/http/metrics-total.get.ts +2 -0
- package/src/routes/management/http/metrics.get.ts +2 -0
- package/src/routes/management/http/sessions.get.ts +2 -0
- package/src/routes/management/http/static.get.ts +2 -0
- package/src/routes/webkit/ws/playwright.ts +3 -1
- package/src/shared/browser.ws.ts +3 -1
- package/src/shared/chromium.playwright.ws.ts +3 -1
- package/src/shared/chromium.ws.ts +3 -1
- package/src/shared/content.http.ts +3 -1
- package/src/shared/download.http.ts +3 -1
- package/src/shared/function.http.ts +3 -1
- package/src/shared/json-list.http.ts +3 -1
- package/src/shared/json-new.http.ts +3 -1
- package/src/shared/json-protocol.http.ts +3 -1
- package/src/shared/json-version.http.ts +3 -1
- package/src/shared/page.ws.ts +3 -1
- package/src/shared/pdf.http.ts +3 -1
- package/src/shared/performance.http.ts +2 -0
- package/src/shared/scrape.http.ts +3 -1
- package/src/shared/screenshot.http.ts +2 -0
- package/src/types.ts +66 -0
- package/src/utils.ts +13 -7
- package/static/docs/swagger.json +2511 -1520
- package/static/docs/swagger.min.json +6697 -0
- package/static/function/client.js +323 -323
- package/build/exports.core.d.ts +0 -24
- package/build/exports.core.js +0 -26
- package/src/exports.core.ts +0 -26
|
@@ -26,6 +26,15 @@
|
|
|
26
26
|
"$ref": "#/definitions/CookieParam"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
"debugOpts": {
|
|
30
|
+
"$ref": "#/definitions/ScrapeDebugOptions"
|
|
31
|
+
},
|
|
32
|
+
"elements": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"$ref": "#/definitions/ScrapeElementSelector"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
29
38
|
"emulateMediaType": {
|
|
30
39
|
"type": "string"
|
|
31
40
|
},
|
|
@@ -92,7 +101,6 @@
|
|
|
92
101
|
"$ref": "#/definitions/Record<string,string>"
|
|
93
102
|
},
|
|
94
103
|
"setJavaScriptEnabled": {
|
|
95
|
-
"description": "Whether or not to allow JavaScript to run on the page.",
|
|
96
104
|
"type": "boolean"
|
|
97
105
|
},
|
|
98
106
|
"url": {
|
|
@@ -169,6 +177,9 @@
|
|
|
169
177
|
}
|
|
170
178
|
},
|
|
171
179
|
"additionalProperties": false,
|
|
180
|
+
"required": [
|
|
181
|
+
"elements"
|
|
182
|
+
],
|
|
172
183
|
"definitions": {
|
|
173
184
|
"FrameAddScriptTagOptions": {
|
|
174
185
|
"type": "object",
|
|
@@ -308,6 +319,42 @@
|
|
|
308
319
|
"value"
|
|
309
320
|
]
|
|
310
321
|
},
|
|
322
|
+
"ScrapeDebugOptions": {
|
|
323
|
+
"type": "object",
|
|
324
|
+
"properties": {
|
|
325
|
+
"console": {
|
|
326
|
+
"type": "boolean"
|
|
327
|
+
},
|
|
328
|
+
"cookies": {
|
|
329
|
+
"type": "boolean"
|
|
330
|
+
},
|
|
331
|
+
"html": {
|
|
332
|
+
"type": "boolean"
|
|
333
|
+
},
|
|
334
|
+
"network": {
|
|
335
|
+
"type": "boolean"
|
|
336
|
+
},
|
|
337
|
+
"screenshot": {
|
|
338
|
+
"type": "boolean"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"additionalProperties": false
|
|
342
|
+
},
|
|
343
|
+
"ScrapeElementSelector": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"properties": {
|
|
346
|
+
"selector": {
|
|
347
|
+
"type": "string"
|
|
348
|
+
},
|
|
349
|
+
"timeout": {
|
|
350
|
+
"type": "number"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"additionalProperties": false,
|
|
354
|
+
"required": [
|
|
355
|
+
"selector"
|
|
356
|
+
]
|
|
357
|
+
},
|
|
311
358
|
"GoToOptions": {
|
|
312
359
|
"type": "object",
|
|
313
360
|
"properties": {
|
|
@@ -394,14 +441,14 @@
|
|
|
394
441
|
"length": {
|
|
395
442
|
"type": "number"
|
|
396
443
|
},
|
|
397
|
-
"__@toStringTag@
|
|
444
|
+
"__@toStringTag@206584": {
|
|
398
445
|
"type": "string",
|
|
399
446
|
"const": "Uint8Array"
|
|
400
447
|
}
|
|
401
448
|
},
|
|
402
449
|
"required": [
|
|
403
450
|
"BYTES_PER_ELEMENT",
|
|
404
|
-
"__@toStringTag@
|
|
451
|
+
"__@toStringTag@206584",
|
|
405
452
|
"buffer",
|
|
406
453
|
"byteLength",
|
|
407
454
|
"byteOffset",
|
|
@@ -436,13 +483,13 @@
|
|
|
436
483
|
"byteLength": {
|
|
437
484
|
"type": "number"
|
|
438
485
|
},
|
|
439
|
-
"__@toStringTag@
|
|
486
|
+
"__@toStringTag@206584": {
|
|
440
487
|
"type": "string"
|
|
441
488
|
}
|
|
442
489
|
},
|
|
443
490
|
"additionalProperties": false,
|
|
444
491
|
"required": [
|
|
445
|
-
"__@toStringTag@
|
|
492
|
+
"__@toStringTag@206584",
|
|
446
493
|
"byteLength"
|
|
447
494
|
]
|
|
448
495
|
},
|
|
@@ -452,18 +499,18 @@
|
|
|
452
499
|
"byteLength": {
|
|
453
500
|
"type": "number"
|
|
454
501
|
},
|
|
455
|
-
"__@species@
|
|
502
|
+
"__@species@206685": {
|
|
456
503
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
457
504
|
},
|
|
458
|
-
"__@toStringTag@
|
|
505
|
+
"__@toStringTag@206584": {
|
|
459
506
|
"type": "string",
|
|
460
507
|
"const": "SharedArrayBuffer"
|
|
461
508
|
}
|
|
462
509
|
},
|
|
463
510
|
"additionalProperties": false,
|
|
464
511
|
"required": [
|
|
465
|
-
"__@species@
|
|
466
|
-
"__@toStringTag@
|
|
512
|
+
"__@species@206685",
|
|
513
|
+
"__@toStringTag@206584",
|
|
467
514
|
"byteLength"
|
|
468
515
|
]
|
|
469
516
|
},
|
|
@@ -1,5 +1,309 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "The JSON response body",
|
|
3
|
-
"type": "
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"data": {
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"results": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"attributes": {
|
|
18
|
+
"description": "A list of HTML attributes of the element",
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"name": {
|
|
24
|
+
"description": "The name of the HTML attribute for the element",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"value": {
|
|
28
|
+
"description": "The value of the HTML attribute for the element",
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": [
|
|
34
|
+
"name",
|
|
35
|
+
"value"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"height": {
|
|
40
|
+
"description": "The height the element",
|
|
41
|
+
"type": "number"
|
|
42
|
+
},
|
|
43
|
+
"html": {
|
|
44
|
+
"description": "The HTML the element",
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"left": {
|
|
48
|
+
"description": "The amount of pixels from the left of the page",
|
|
49
|
+
"type": "number"
|
|
50
|
+
},
|
|
51
|
+
"text": {
|
|
52
|
+
"description": "The text the element",
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"top": {
|
|
56
|
+
"description": "The amount of pixels from the top of the page",
|
|
57
|
+
"type": "number"
|
|
58
|
+
},
|
|
59
|
+
"width": {
|
|
60
|
+
"description": "The width the element",
|
|
61
|
+
"type": "number"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": [
|
|
66
|
+
"attributes",
|
|
67
|
+
"height",
|
|
68
|
+
"html",
|
|
69
|
+
"left",
|
|
70
|
+
"text",
|
|
71
|
+
"top",
|
|
72
|
+
"width"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"selector": {
|
|
77
|
+
"description": "The DOM selector of the element",
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": [
|
|
83
|
+
"results",
|
|
84
|
+
"selector"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "null"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"debug": {
|
|
94
|
+
"description": "When debugOpts options are present, results are here",
|
|
95
|
+
"anyOf": [
|
|
96
|
+
{
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"console": {
|
|
100
|
+
"description": "A list of console messages from the browser",
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"cookies": {
|
|
107
|
+
"description": "List of cookies for the site or null",
|
|
108
|
+
"anyOf": [
|
|
109
|
+
{
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"$ref": "#/definitions/Cookie"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "null"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"html": {
|
|
121
|
+
"description": "The HTML string of the website or null",
|
|
122
|
+
"type": [
|
|
123
|
+
"null",
|
|
124
|
+
"string"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"network": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"inbound": {
|
|
131
|
+
"type": "array",
|
|
132
|
+
"items": {
|
|
133
|
+
"$ref": "#/definitions/InBoundRequest"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"outbound": {
|
|
137
|
+
"type": "array",
|
|
138
|
+
"items": {
|
|
139
|
+
"$ref": "#/definitions/OutBoundRequest"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"required": [
|
|
145
|
+
"inbound",
|
|
146
|
+
"outbound"
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"screenshot": {
|
|
150
|
+
"description": "A base64-encoded string of the site or null",
|
|
151
|
+
"type": [
|
|
152
|
+
"null",
|
|
153
|
+
"string"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": [
|
|
159
|
+
"console",
|
|
160
|
+
"cookies",
|
|
161
|
+
"html",
|
|
162
|
+
"network",
|
|
163
|
+
"screenshot"
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "null"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"additionalProperties": false,
|
|
173
|
+
"required": [
|
|
174
|
+
"data",
|
|
175
|
+
"debug"
|
|
176
|
+
],
|
|
177
|
+
"definitions": {
|
|
178
|
+
"Cookie": {
|
|
179
|
+
"description": "Represents a cookie object.",
|
|
180
|
+
"type": "object",
|
|
181
|
+
"properties": {
|
|
182
|
+
"name": {
|
|
183
|
+
"description": "Cookie name.",
|
|
184
|
+
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
"value": {
|
|
187
|
+
"description": "Cookie value.",
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
"domain": {
|
|
191
|
+
"description": "Cookie domain.",
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"path": {
|
|
195
|
+
"description": "Cookie path.",
|
|
196
|
+
"type": "string"
|
|
197
|
+
},
|
|
198
|
+
"expires": {
|
|
199
|
+
"description": "Cookie expiration date as the number of seconds since the UNIX epoch. Set to `-1` for\nsession cookies",
|
|
200
|
+
"type": "number"
|
|
201
|
+
},
|
|
202
|
+
"size": {
|
|
203
|
+
"description": "Cookie size.",
|
|
204
|
+
"type": "number"
|
|
205
|
+
},
|
|
206
|
+
"httpOnly": {
|
|
207
|
+
"description": "True if cookie is http-only.",
|
|
208
|
+
"type": "boolean"
|
|
209
|
+
},
|
|
210
|
+
"secure": {
|
|
211
|
+
"description": "True if cookie is secure.",
|
|
212
|
+
"type": "boolean"
|
|
213
|
+
},
|
|
214
|
+
"session": {
|
|
215
|
+
"description": "True in case of session cookie.",
|
|
216
|
+
"type": "boolean"
|
|
217
|
+
},
|
|
218
|
+
"sameSite": {
|
|
219
|
+
"description": "Cookie SameSite type.",
|
|
220
|
+
"enum": [
|
|
221
|
+
"Lax",
|
|
222
|
+
"None",
|
|
223
|
+
"Strict"
|
|
224
|
+
],
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
"priority": {
|
|
228
|
+
"description": "Cookie Priority. Supported only in Chrome.",
|
|
229
|
+
"enum": [
|
|
230
|
+
"High",
|
|
231
|
+
"Low",
|
|
232
|
+
"Medium"
|
|
233
|
+
],
|
|
234
|
+
"type": "string"
|
|
235
|
+
},
|
|
236
|
+
"sameParty": {
|
|
237
|
+
"description": "True if cookie is SameParty. Supported only in Chrome.",
|
|
238
|
+
"type": "boolean"
|
|
239
|
+
},
|
|
240
|
+
"sourceScheme": {
|
|
241
|
+
"description": "Cookie source scheme type. Supported only in Chrome.",
|
|
242
|
+
"enum": [
|
|
243
|
+
"NonSecure",
|
|
244
|
+
"Secure",
|
|
245
|
+
"Unset"
|
|
246
|
+
],
|
|
247
|
+
"type": "string"
|
|
248
|
+
},
|
|
249
|
+
"partitionKey": {
|
|
250
|
+
"description": "Cookie partition key. The site of the top-level URL the browser was visiting at the\nstart of the request to the endpoint that set the cookie. Supported only in Chrome.",
|
|
251
|
+
"type": "string"
|
|
252
|
+
},
|
|
253
|
+
"partitionKeyOpaque": {
|
|
254
|
+
"description": "True if cookie partition key is opaque. Supported only in Chrome.",
|
|
255
|
+
"type": "boolean"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"required": [
|
|
260
|
+
"domain",
|
|
261
|
+
"expires",
|
|
262
|
+
"httpOnly",
|
|
263
|
+
"name",
|
|
264
|
+
"path",
|
|
265
|
+
"secure",
|
|
266
|
+
"session",
|
|
267
|
+
"size",
|
|
268
|
+
"value"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"InBoundRequest": {
|
|
272
|
+
"type": "object",
|
|
273
|
+
"properties": {
|
|
274
|
+
"headers": {},
|
|
275
|
+
"status": {
|
|
276
|
+
"type": "number"
|
|
277
|
+
},
|
|
278
|
+
"url": {
|
|
279
|
+
"type": "string"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"additionalProperties": false,
|
|
283
|
+
"required": [
|
|
284
|
+
"headers",
|
|
285
|
+
"status",
|
|
286
|
+
"url"
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
"OutBoundRequest": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"properties": {
|
|
292
|
+
"headers": {},
|
|
293
|
+
"method": {
|
|
294
|
+
"type": "string"
|
|
295
|
+
},
|
|
296
|
+
"url": {
|
|
297
|
+
"type": "string"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"additionalProperties": false,
|
|
301
|
+
"required": [
|
|
302
|
+
"headers",
|
|
303
|
+
"method",
|
|
304
|
+
"url"
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
},
|
|
4
308
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
5
309
|
}
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
"html": {
|
|
36
36
|
"type": "string"
|
|
37
37
|
},
|
|
38
|
+
"options": {
|
|
39
|
+
"$ref": "#/definitions/ScreenshotOptions"
|
|
40
|
+
},
|
|
38
41
|
"rejectRequestPattern": {
|
|
39
42
|
"type": "array",
|
|
40
43
|
"items": {
|
|
@@ -88,11 +91,16 @@
|
|
|
88
91
|
]
|
|
89
92
|
}
|
|
90
93
|
},
|
|
94
|
+
"scrollPage": {
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
"selector": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
91
100
|
"setExtraHTTPHeaders": {
|
|
92
101
|
"$ref": "#/definitions/Record<string,string>"
|
|
93
102
|
},
|
|
94
103
|
"setJavaScriptEnabled": {
|
|
95
|
-
"description": "Whether or not to allow JavaScript to run on the page.",
|
|
96
104
|
"type": "boolean"
|
|
97
105
|
},
|
|
98
106
|
"url": {
|
|
@@ -355,6 +363,88 @@
|
|
|
355
363
|
],
|
|
356
364
|
"type": "string"
|
|
357
365
|
},
|
|
366
|
+
"ScreenshotOptions": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"properties": {
|
|
369
|
+
"optimizeForSpeed": {
|
|
370
|
+
"type": "boolean"
|
|
371
|
+
},
|
|
372
|
+
"type": {
|
|
373
|
+
"enum": [
|
|
374
|
+
"jpeg",
|
|
375
|
+
"png",
|
|
376
|
+
"webp"
|
|
377
|
+
],
|
|
378
|
+
"type": "string"
|
|
379
|
+
},
|
|
380
|
+
"quality": {
|
|
381
|
+
"description": "Quality of the image, between 0-100. Not applicable to `png` images.",
|
|
382
|
+
"type": "number"
|
|
383
|
+
},
|
|
384
|
+
"fromSurface": {
|
|
385
|
+
"description": "Capture the screenshot from the surface, rather than the view.",
|
|
386
|
+
"type": "boolean"
|
|
387
|
+
},
|
|
388
|
+
"fullPage": {
|
|
389
|
+
"description": "When `true`, takes a screenshot of the full page.",
|
|
390
|
+
"type": "boolean"
|
|
391
|
+
},
|
|
392
|
+
"omitBackground": {
|
|
393
|
+
"description": "Hides default white background and allows capturing screenshots with transparency.",
|
|
394
|
+
"type": "boolean"
|
|
395
|
+
},
|
|
396
|
+
"path": {
|
|
397
|
+
"description": "The file path to save the image to. The screenshot type will be inferred\nfrom file extension. If path is a relative path, then it is resolved\nrelative to current working directory. If no path is provided, the image\nwon't be saved to the disk.",
|
|
398
|
+
"type": "string"
|
|
399
|
+
},
|
|
400
|
+
"clip": {
|
|
401
|
+
"description": "Specifies the region of the page to clip.",
|
|
402
|
+
"$ref": "#/definitions/ScreenshotClip"
|
|
403
|
+
},
|
|
404
|
+
"encoding": {
|
|
405
|
+
"description": "Encoding of the image.",
|
|
406
|
+
"enum": [
|
|
407
|
+
"base64",
|
|
408
|
+
"binary"
|
|
409
|
+
],
|
|
410
|
+
"type": "string"
|
|
411
|
+
},
|
|
412
|
+
"captureBeyondViewport": {
|
|
413
|
+
"description": "Capture the screenshot beyond the viewport.",
|
|
414
|
+
"type": "boolean"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"additionalProperties": false
|
|
418
|
+
},
|
|
419
|
+
"ScreenshotClip": {
|
|
420
|
+
"type": "object",
|
|
421
|
+
"properties": {
|
|
422
|
+
"scale": {
|
|
423
|
+
"type": "number"
|
|
424
|
+
},
|
|
425
|
+
"width": {
|
|
426
|
+
"description": "the width of the element in pixels.",
|
|
427
|
+
"type": "number"
|
|
428
|
+
},
|
|
429
|
+
"height": {
|
|
430
|
+
"description": "the height of the element in pixels.",
|
|
431
|
+
"type": "number"
|
|
432
|
+
},
|
|
433
|
+
"x": {
|
|
434
|
+
"type": "number"
|
|
435
|
+
},
|
|
436
|
+
"y": {
|
|
437
|
+
"type": "number"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"additionalProperties": false,
|
|
441
|
+
"required": [
|
|
442
|
+
"height",
|
|
443
|
+
"width",
|
|
444
|
+
"x",
|
|
445
|
+
"y"
|
|
446
|
+
]
|
|
447
|
+
},
|
|
358
448
|
"Partial<ResponseForRequest>": {
|
|
359
449
|
"type": "object",
|
|
360
450
|
"properties": {
|
|
@@ -394,14 +484,14 @@
|
|
|
394
484
|
"length": {
|
|
395
485
|
"type": "number"
|
|
396
486
|
},
|
|
397
|
-
"__@toStringTag@
|
|
487
|
+
"__@toStringTag@239597": {
|
|
398
488
|
"type": "string",
|
|
399
489
|
"const": "Uint8Array"
|
|
400
490
|
}
|
|
401
491
|
},
|
|
402
492
|
"required": [
|
|
403
493
|
"BYTES_PER_ELEMENT",
|
|
404
|
-
"__@toStringTag@
|
|
494
|
+
"__@toStringTag@239597",
|
|
405
495
|
"buffer",
|
|
406
496
|
"byteLength",
|
|
407
497
|
"byteOffset",
|
|
@@ -436,13 +526,13 @@
|
|
|
436
526
|
"byteLength": {
|
|
437
527
|
"type": "number"
|
|
438
528
|
},
|
|
439
|
-
"__@toStringTag@
|
|
529
|
+
"__@toStringTag@239597": {
|
|
440
530
|
"type": "string"
|
|
441
531
|
}
|
|
442
532
|
},
|
|
443
533
|
"additionalProperties": false,
|
|
444
534
|
"required": [
|
|
445
|
-
"__@toStringTag@
|
|
535
|
+
"__@toStringTag@239597",
|
|
446
536
|
"byteLength"
|
|
447
537
|
]
|
|
448
538
|
},
|
|
@@ -452,18 +542,18 @@
|
|
|
452
542
|
"byteLength": {
|
|
453
543
|
"type": "number"
|
|
454
544
|
},
|
|
455
|
-
"__@species@
|
|
545
|
+
"__@species@239698": {
|
|
456
546
|
"$ref": "#/definitions/SharedArrayBuffer"
|
|
457
547
|
},
|
|
458
|
-
"__@toStringTag@
|
|
548
|
+
"__@toStringTag@239597": {
|
|
459
549
|
"type": "string",
|
|
460
550
|
"const": "SharedArrayBuffer"
|
|
461
551
|
}
|
|
462
552
|
},
|
|
463
553
|
"additionalProperties": false,
|
|
464
554
|
"required": [
|
|
465
|
-
"__@species@
|
|
466
|
-
"__@toStringTag@
|
|
555
|
+
"__@species@239698",
|
|
556
|
+
"__@toStringTag@239597",
|
|
467
557
|
"byteLength"
|
|
468
558
|
]
|
|
469
559
|
},
|