@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
|
@@ -1,509 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"type": "array",
|
|
6
|
-
"items": {
|
|
7
|
-
"$ref": "#/definitions/FrameAddScriptTagOptions"
|
|
8
|
-
}
|
|
2
|
+
"anyOf": [
|
|
3
|
+
{
|
|
4
|
+
"$ref": "#/definitions/JSONSchema"
|
|
9
5
|
},
|
|
10
|
-
|
|
11
|
-
"type": "array",
|
|
12
|
-
"items": {
|
|
13
|
-
"$ref": "#/definitions/FrameAddStyleTagOptions"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"authenticate": {
|
|
17
|
-
"$ref": "#/definitions/Credentials"
|
|
18
|
-
},
|
|
19
|
-
"bestAttempt": {
|
|
20
|
-
"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.",
|
|
21
|
-
"type": "boolean"
|
|
22
|
-
},
|
|
23
|
-
"cookies": {
|
|
24
|
-
"type": "array",
|
|
25
|
-
"items": {
|
|
26
|
-
"$ref": "#/definitions/CookieParam"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"emulateMediaType": {
|
|
30
|
-
"type": "string"
|
|
31
|
-
},
|
|
32
|
-
"gotoOptions": {
|
|
33
|
-
"$ref": "#/definitions/GoToOptions"
|
|
34
|
-
},
|
|
35
|
-
"html": {
|
|
36
|
-
"type": "string"
|
|
37
|
-
},
|
|
38
|
-
"rejectRequestPattern": {
|
|
39
|
-
"type": "array",
|
|
40
|
-
"items": {
|
|
41
|
-
"type": "string"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"rejectResourceTypes": {
|
|
45
|
-
"type": "array",
|
|
46
|
-
"items": {
|
|
47
|
-
"enum": [
|
|
48
|
-
"cspviolationreport",
|
|
49
|
-
"document",
|
|
50
|
-
"eventsource",
|
|
51
|
-
"fetch",
|
|
52
|
-
"font",
|
|
53
|
-
"image",
|
|
54
|
-
"manifest",
|
|
55
|
-
"media",
|
|
56
|
-
"other",
|
|
57
|
-
"ping",
|
|
58
|
-
"prefetch",
|
|
59
|
-
"preflight",
|
|
60
|
-
"script",
|
|
61
|
-
"signedexchange",
|
|
62
|
-
"stylesheet",
|
|
63
|
-
"texttrack",
|
|
64
|
-
"websocket",
|
|
65
|
-
"xhr"
|
|
66
|
-
],
|
|
67
|
-
"type": "string"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"requestInterceptors": {
|
|
71
|
-
"type": "array",
|
|
72
|
-
"items": {
|
|
73
|
-
"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.",
|
|
74
|
-
"type": "object",
|
|
75
|
-
"properties": {
|
|
76
|
-
"pattern": {
|
|
77
|
-
"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.",
|
|
78
|
-
"type": "string"
|
|
79
|
-
},
|
|
80
|
-
"response": {
|
|
81
|
-
"$ref": "#/definitions/Partial<ResponseForRequest>"
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"additionalProperties": false,
|
|
85
|
-
"required": [
|
|
86
|
-
"pattern",
|
|
87
|
-
"response"
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"setExtraHTTPHeaders": {
|
|
92
|
-
"$ref": "#/definitions/Record<string,string>"
|
|
93
|
-
},
|
|
94
|
-
"setJavaScriptEnabled": {
|
|
95
|
-
"description": "Whether or not to allow JavaScript to run on the page.",
|
|
96
|
-
"type": "boolean"
|
|
97
|
-
},
|
|
98
|
-
"url": {
|
|
99
|
-
"type": "string"
|
|
100
|
-
},
|
|
101
|
-
"userAgent": {
|
|
6
|
+
{
|
|
102
7
|
"type": "string"
|
|
103
|
-
},
|
|
104
|
-
"viewport": {
|
|
105
|
-
"$ref": "#/definitions/Viewport"
|
|
106
|
-
},
|
|
107
|
-
"waitForEvent": {
|
|
108
|
-
"type": "object",
|
|
109
|
-
"properties": {
|
|
110
|
-
"event": {
|
|
111
|
-
"type": "string"
|
|
112
|
-
},
|
|
113
|
-
"timeout": {
|
|
114
|
-
"type": "number"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
"additionalProperties": false,
|
|
118
|
-
"required": [
|
|
119
|
-
"event"
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
"waitForFunction": {
|
|
123
|
-
"type": "object",
|
|
124
|
-
"properties": {
|
|
125
|
-
"fn": {
|
|
126
|
-
"description": "The function, or statement, to be evaluated in browser context",
|
|
127
|
-
"type": "string"
|
|
128
|
-
},
|
|
129
|
-
"polling": {
|
|
130
|
-
"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\"",
|
|
131
|
-
"type": [
|
|
132
|
-
"string",
|
|
133
|
-
"number"
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
"timeout": {
|
|
137
|
-
"description": "Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds).\nPass 0 to disable timeout.",
|
|
138
|
-
"type": "number"
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
"additionalProperties": false,
|
|
142
|
-
"required": [
|
|
143
|
-
"fn"
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
"waitForSelector": {
|
|
147
|
-
"type": "object",
|
|
148
|
-
"properties": {
|
|
149
|
-
"hidden": {
|
|
150
|
-
"type": "boolean"
|
|
151
|
-
},
|
|
152
|
-
"selector": {
|
|
153
|
-
"type": "string"
|
|
154
|
-
},
|
|
155
|
-
"timeout": {
|
|
156
|
-
"type": "number"
|
|
157
|
-
},
|
|
158
|
-
"visible": {
|
|
159
|
-
"type": "boolean"
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
"additionalProperties": false,
|
|
163
|
-
"required": [
|
|
164
|
-
"selector"
|
|
165
|
-
]
|
|
166
|
-
},
|
|
167
|
-
"waitForTimeout": {
|
|
168
|
-
"type": "number"
|
|
169
8
|
}
|
|
170
|
-
|
|
171
|
-
"additionalProperties": false,
|
|
9
|
+
],
|
|
172
10
|
"definitions": {
|
|
173
|
-
"
|
|
174
|
-
"type": "object",
|
|
175
|
-
"properties": {
|
|
176
|
-
"url": {
|
|
177
|
-
"description": "URL of the script to be added.",
|
|
178
|
-
"type": "string"
|
|
179
|
-
},
|
|
180
|
-
"path": {
|
|
181
|
-
"description": "Path to a JavaScript file to be injected into the frame.",
|
|
182
|
-
"type": "string"
|
|
183
|
-
},
|
|
184
|
-
"content": {
|
|
185
|
-
"description": "JavaScript to be injected into the frame.",
|
|
186
|
-
"type": "string"
|
|
187
|
-
},
|
|
188
|
-
"type": {
|
|
189
|
-
"description": "Sets the `type` of the script. Use `module` in order to load an ES2015 module.",
|
|
190
|
-
"type": "string"
|
|
191
|
-
},
|
|
192
|
-
"id": {
|
|
193
|
-
"description": "Sets the `id` of the script.",
|
|
194
|
-
"type": "string"
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
"additionalProperties": false
|
|
198
|
-
},
|
|
199
|
-
"FrameAddStyleTagOptions": {
|
|
200
|
-
"type": "object",
|
|
201
|
-
"properties": {
|
|
202
|
-
"url": {
|
|
203
|
-
"description": "the URL of the CSS file to be added.",
|
|
204
|
-
"type": "string"
|
|
205
|
-
},
|
|
206
|
-
"path": {
|
|
207
|
-
"description": "The path to a CSS file to be injected into the frame.",
|
|
208
|
-
"type": "string"
|
|
209
|
-
},
|
|
210
|
-
"content": {
|
|
211
|
-
"description": "Raw CSS content to be injected into the frame.",
|
|
212
|
-
"type": "string"
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
"additionalProperties": false
|
|
216
|
-
},
|
|
217
|
-
"Credentials": {
|
|
218
|
-
"type": "object",
|
|
219
|
-
"properties": {
|
|
220
|
-
"username": {
|
|
221
|
-
"type": "string"
|
|
222
|
-
},
|
|
223
|
-
"password": {
|
|
224
|
-
"type": "string"
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
"additionalProperties": false,
|
|
228
|
-
"required": [
|
|
229
|
-
"password",
|
|
230
|
-
"username"
|
|
231
|
-
]
|
|
232
|
-
},
|
|
233
|
-
"CookieParam": {
|
|
234
|
-
"description": "Cookie parameter object",
|
|
235
|
-
"type": "object",
|
|
236
|
-
"properties": {
|
|
237
|
-
"name": {
|
|
238
|
-
"description": "Cookie name.",
|
|
239
|
-
"type": "string"
|
|
240
|
-
},
|
|
241
|
-
"value": {
|
|
242
|
-
"description": "Cookie value.",
|
|
243
|
-
"type": "string"
|
|
244
|
-
},
|
|
245
|
-
"url": {
|
|
246
|
-
"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.",
|
|
247
|
-
"type": "string"
|
|
248
|
-
},
|
|
249
|
-
"domain": {
|
|
250
|
-
"description": "Cookie domain.",
|
|
251
|
-
"type": "string"
|
|
252
|
-
},
|
|
253
|
-
"path": {
|
|
254
|
-
"description": "Cookie path.",
|
|
255
|
-
"type": "string"
|
|
256
|
-
},
|
|
257
|
-
"secure": {
|
|
258
|
-
"description": "True if cookie is secure.",
|
|
259
|
-
"type": "boolean"
|
|
260
|
-
},
|
|
261
|
-
"httpOnly": {
|
|
262
|
-
"description": "True if cookie is http-only.",
|
|
263
|
-
"type": "boolean"
|
|
264
|
-
},
|
|
265
|
-
"sameSite": {
|
|
266
|
-
"description": "Cookie SameSite type.",
|
|
267
|
-
"enum": [
|
|
268
|
-
"Lax",
|
|
269
|
-
"None",
|
|
270
|
-
"Strict"
|
|
271
|
-
],
|
|
272
|
-
"type": "string"
|
|
273
|
-
},
|
|
274
|
-
"expires": {
|
|
275
|
-
"description": "Cookie expiration date, session cookie if not set",
|
|
276
|
-
"type": "number"
|
|
277
|
-
},
|
|
278
|
-
"priority": {
|
|
279
|
-
"description": "Cookie Priority. Supported only in Chrome.",
|
|
280
|
-
"enum": [
|
|
281
|
-
"High",
|
|
282
|
-
"Low",
|
|
283
|
-
"Medium"
|
|
284
|
-
],
|
|
285
|
-
"type": "string"
|
|
286
|
-
},
|
|
287
|
-
"sameParty": {
|
|
288
|
-
"description": "True if cookie is SameParty. Supported only in Chrome.",
|
|
289
|
-
"type": "boolean"
|
|
290
|
-
},
|
|
291
|
-
"sourceScheme": {
|
|
292
|
-
"description": "Cookie source scheme type. Supported only in Chrome.",
|
|
293
|
-
"enum": [
|
|
294
|
-
"NonSecure",
|
|
295
|
-
"Secure",
|
|
296
|
-
"Unset"
|
|
297
|
-
],
|
|
298
|
-
"type": "string"
|
|
299
|
-
},
|
|
300
|
-
"partitionKey": {
|
|
301
|
-
"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. If not set, the cookie will\nbe set as not partitioned.",
|
|
302
|
-
"type": "string"
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
"additionalProperties": false,
|
|
306
|
-
"required": [
|
|
307
|
-
"name",
|
|
308
|
-
"value"
|
|
309
|
-
]
|
|
310
|
-
},
|
|
311
|
-
"GoToOptions": {
|
|
312
|
-
"type": "object",
|
|
313
|
-
"properties": {
|
|
314
|
-
"referer": {
|
|
315
|
-
"description": "If provided, it will take preference over the referer header value set by\n{@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.",
|
|
316
|
-
"type": "string"
|
|
317
|
-
},
|
|
318
|
-
"referrerPolicy": {
|
|
319
|
-
"description": "If provided, it will take preference over the referer-policy header value\nset by {@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.",
|
|
320
|
-
"type": "string"
|
|
321
|
-
},
|
|
322
|
-
"timeout": {
|
|
323
|
-
"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.",
|
|
324
|
-
"type": "number"
|
|
325
|
-
},
|
|
326
|
-
"waitUntil": {
|
|
327
|
-
"description": "When to consider waiting succeeds. Given an array of event strings, waiting\nis considered to be successful after all events have been fired.",
|
|
328
|
-
"anyOf": [
|
|
329
|
-
{
|
|
330
|
-
"type": "array",
|
|
331
|
-
"items": {
|
|
332
|
-
"$ref": "#/definitions/PuppeteerLifeCycleEvent"
|
|
333
|
-
}
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"enum": [
|
|
337
|
-
"domcontentloaded",
|
|
338
|
-
"load",
|
|
339
|
-
"networkidle0",
|
|
340
|
-
"networkidle2"
|
|
341
|
-
],
|
|
342
|
-
"type": "string"
|
|
343
|
-
}
|
|
344
|
-
]
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
"additionalProperties": false
|
|
348
|
-
},
|
|
349
|
-
"PuppeteerLifeCycleEvent": {
|
|
350
|
-
"enum": [
|
|
351
|
-
"domcontentloaded",
|
|
352
|
-
"load",
|
|
353
|
-
"networkidle0",
|
|
354
|
-
"networkidle2"
|
|
355
|
-
],
|
|
356
|
-
"type": "string"
|
|
357
|
-
},
|
|
358
|
-
"Partial<ResponseForRequest>": {
|
|
11
|
+
"JSONSchema": {
|
|
359
12
|
"type": "object",
|
|
360
13
|
"properties": {
|
|
361
|
-
"
|
|
362
|
-
"type": "number"
|
|
363
|
-
},
|
|
364
|
-
"headers": {
|
|
365
|
-
"description": "Optional response headers. All values are converted to strings.",
|
|
366
|
-
"$ref": "#/definitions/Record<string,unknown>"
|
|
367
|
-
},
|
|
368
|
-
"contentType": {
|
|
14
|
+
"code": {
|
|
369
15
|
"type": "string"
|
|
370
16
|
},
|
|
371
|
-
"
|
|
372
|
-
"
|
|
373
|
-
{
|
|
374
|
-
"type": "object",
|
|
375
|
-
"additionalProperties": false,
|
|
376
|
-
"patternProperties": {
|
|
377
|
-
"^[0-9]+$": {
|
|
378
|
-
"type": "number"
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
"properties": {
|
|
382
|
-
"BYTES_PER_ELEMENT": {
|
|
383
|
-
"type": "number"
|
|
384
|
-
},
|
|
385
|
-
"buffer": {
|
|
386
|
-
"$ref": "#/definitions/ArrayBufferLike"
|
|
387
|
-
},
|
|
388
|
-
"byteLength": {
|
|
389
|
-
"type": "number"
|
|
390
|
-
},
|
|
391
|
-
"byteOffset": {
|
|
392
|
-
"type": "number"
|
|
393
|
-
},
|
|
394
|
-
"length": {
|
|
395
|
-
"type": "number"
|
|
396
|
-
},
|
|
397
|
-
"__@toStringTag@41599": {
|
|
398
|
-
"type": "string",
|
|
399
|
-
"const": "Uint8Array"
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
"required": [
|
|
403
|
-
"BYTES_PER_ELEMENT",
|
|
404
|
-
"__@toStringTag@41599",
|
|
405
|
-
"buffer",
|
|
406
|
-
"byteLength",
|
|
407
|
-
"byteOffset",
|
|
408
|
-
"length"
|
|
409
|
-
]
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
"type": "string"
|
|
413
|
-
}
|
|
414
|
-
]
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
"additionalProperties": false
|
|
418
|
-
},
|
|
419
|
-
"Record<string,unknown>": {
|
|
420
|
-
"type": "object",
|
|
421
|
-
"additionalProperties": false
|
|
422
|
-
},
|
|
423
|
-
"ArrayBufferLike": {
|
|
424
|
-
"anyOf": [
|
|
425
|
-
{
|
|
426
|
-
"$ref": "#/definitions/ArrayBuffer"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
"$ref": "#/definitions/SharedArrayBuffer"
|
|
430
|
-
}
|
|
431
|
-
]
|
|
432
|
-
},
|
|
433
|
-
"ArrayBuffer": {
|
|
434
|
-
"type": "object",
|
|
435
|
-
"properties": {
|
|
436
|
-
"byteLength": {
|
|
437
|
-
"type": "number"
|
|
438
|
-
},
|
|
439
|
-
"__@toStringTag@41599": {
|
|
440
|
-
"type": "string"
|
|
17
|
+
"context": {
|
|
18
|
+
"$ref": "#/definitions/Record<string,string|number>"
|
|
441
19
|
}
|
|
442
20
|
},
|
|
443
21
|
"additionalProperties": false,
|
|
444
22
|
"required": [
|
|
445
|
-
"
|
|
446
|
-
"byteLength"
|
|
23
|
+
"code"
|
|
447
24
|
]
|
|
448
25
|
},
|
|
449
|
-
"
|
|
450
|
-
"type": "object",
|
|
451
|
-
"properties": {
|
|
452
|
-
"byteLength": {
|
|
453
|
-
"type": "number"
|
|
454
|
-
},
|
|
455
|
-
"__@species@45755": {
|
|
456
|
-
"$ref": "#/definitions/SharedArrayBuffer"
|
|
457
|
-
},
|
|
458
|
-
"__@toStringTag@41599": {
|
|
459
|
-
"type": "string",
|
|
460
|
-
"const": "SharedArrayBuffer"
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
"additionalProperties": false,
|
|
464
|
-
"required": [
|
|
465
|
-
"__@species@45755",
|
|
466
|
-
"__@toStringTag@41599",
|
|
467
|
-
"byteLength"
|
|
468
|
-
]
|
|
469
|
-
},
|
|
470
|
-
"Record<string,string>": {
|
|
26
|
+
"Record<string,string|number>": {
|
|
471
27
|
"type": "object",
|
|
472
28
|
"additionalProperties": false
|
|
473
|
-
},
|
|
474
|
-
"Viewport": {
|
|
475
|
-
"type": "object",
|
|
476
|
-
"properties": {
|
|
477
|
-
"width": {
|
|
478
|
-
"description": "The page width in CSS pixels.",
|
|
479
|
-
"type": "number"
|
|
480
|
-
},
|
|
481
|
-
"height": {
|
|
482
|
-
"description": "The page height in CSS pixels.",
|
|
483
|
-
"type": "number"
|
|
484
|
-
},
|
|
485
|
-
"deviceScaleFactor": {
|
|
486
|
-
"description": "Specify device scale factor.\nSee {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio devicePixelRatio} for more info.",
|
|
487
|
-
"type": "number"
|
|
488
|
-
},
|
|
489
|
-
"isMobile": {
|
|
490
|
-
"description": "Whether the `meta viewport` tag is taken into account.",
|
|
491
|
-
"type": "boolean"
|
|
492
|
-
},
|
|
493
|
-
"isLandscape": {
|
|
494
|
-
"description": "Specifies if the viewport is in landscape mode.",
|
|
495
|
-
"type": "boolean"
|
|
496
|
-
},
|
|
497
|
-
"hasTouch": {
|
|
498
|
-
"description": "Specify if the viewport supports touch events.",
|
|
499
|
-
"type": "boolean"
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
"additionalProperties": false,
|
|
503
|
-
"required": [
|
|
504
|
-
"height",
|
|
505
|
-
"width"
|
|
506
|
-
]
|
|
507
29
|
}
|
|
508
30
|
},
|
|
509
31
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BodySchema, default as Function, QuerySchema, ResponseSchema } from '../../../shared/function.http.js';
|
|
2
2
|
import { ChromeCDP, HTTPRoutes } from '@browserless.io/browserless';
|
|
3
|
-
export default class
|
|
3
|
+
export default class ChromeFunctionPostRoute extends Function {
|
|
4
|
+
name: string;
|
|
4
5
|
browser: typeof ChromeCDP;
|
|
5
6
|
path: HTTPRoutes[];
|
|
6
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as Function, } from '../../../shared/function.http.js';
|
|
2
|
-
import { ChromeCDP, HTTPRoutes } from '@browserless.io/browserless';
|
|
3
|
-
export default class
|
|
2
|
+
import { BrowserlessRoutes, ChromeCDP, HTTPRoutes, } from '@browserless.io/browserless';
|
|
3
|
+
export default class ChromeFunctionPostRoute extends Function {
|
|
4
|
+
name = BrowserlessRoutes.ChromeFunctionPostRoute;
|
|
4
5
|
browser = ChromeCDP;
|
|
5
6
|
path = [HTTPRoutes.chromeFunction];
|
|
6
7
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"additionalProperties": false,
|
|
3
2
|
"type": "object",
|
|
4
3
|
"properties": {
|
|
5
|
-
"blockAds": {
|
|
6
|
-
"description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
|
|
7
|
-
"type": "boolean"
|
|
8
|
-
},
|
|
9
4
|
"launch": {
|
|
5
|
+
"description": "Launch options, which can be either an object\nof puppeteer.launch options or playwright.launchServer\noptions, depending on the API. Must be either JSON\nobject, or a base64-encoded JSON object.",
|
|
10
6
|
"anyOf": [
|
|
11
7
|
{
|
|
12
8
|
"$ref": "#/definitions/CDPLaunchOptions"
|
|
@@ -16,6 +12,10 @@
|
|
|
16
12
|
}
|
|
17
13
|
]
|
|
18
14
|
},
|
|
15
|
+
"blockAds": {
|
|
16
|
+
"description": "Whether or nor to load ad-blocking extensions for the session.\nThis currently uses uBlock Origin and may cause certain sites\nto not load properly.",
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
},
|
|
19
19
|
"record": {
|
|
20
20
|
"description": "Whether or nor to record the session. The browser will run\nin \"head-full\" mode, and recording is started and closed\nvia the embedded browserless API. Please refer to the \"Recording\"\nsection in the live documentation site for more details.",
|
|
21
21
|
"type": "boolean"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"type": "string"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
+
"additionalProperties": false,
|
|
32
33
|
"definitions": {
|
|
33
34
|
"CDPLaunchOptions": {
|
|
34
35
|
"type": "object",
|
|
@@ -113,70 +114,6 @@
|
|
|
113
114
|
}
|
|
114
115
|
},
|
|
115
116
|
"additionalProperties": false
|
|
116
|
-
},
|
|
117
|
-
"BrowserServerOptions": {
|
|
118
|
-
"type": "object",
|
|
119
|
-
"properties": {
|
|
120
|
-
"args": {
|
|
121
|
-
"type": "array",
|
|
122
|
-
"items": {
|
|
123
|
-
"type": "string"
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"chromiumSandbox": {
|
|
127
|
-
"type": "boolean"
|
|
128
|
-
},
|
|
129
|
-
"devtools": {
|
|
130
|
-
"type": "boolean"
|
|
131
|
-
},
|
|
132
|
-
"downloadsPath": {
|
|
133
|
-
"type": "string"
|
|
134
|
-
},
|
|
135
|
-
"headless": {
|
|
136
|
-
"type": "boolean"
|
|
137
|
-
},
|
|
138
|
-
"ignoreDefaultArgs": {
|
|
139
|
-
"anyOf": [
|
|
140
|
-
{
|
|
141
|
-
"type": "array",
|
|
142
|
-
"items": {
|
|
143
|
-
"type": "string"
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"type": "boolean"
|
|
148
|
-
}
|
|
149
|
-
]
|
|
150
|
-
},
|
|
151
|
-
"proxy": {
|
|
152
|
-
"type": "object",
|
|
153
|
-
"properties": {
|
|
154
|
-
"bypass": {
|
|
155
|
-
"type": "string"
|
|
156
|
-
},
|
|
157
|
-
"password": {
|
|
158
|
-
"type": "string"
|
|
159
|
-
},
|
|
160
|
-
"server": {
|
|
161
|
-
"type": "string"
|
|
162
|
-
},
|
|
163
|
-
"username": {
|
|
164
|
-
"type": "string"
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
"additionalProperties": false,
|
|
168
|
-
"required": [
|
|
169
|
-
"server"
|
|
170
|
-
]
|
|
171
|
-
},
|
|
172
|
-
"timeout": {
|
|
173
|
-
"type": "number"
|
|
174
|
-
},
|
|
175
|
-
"tracesDir": {
|
|
176
|
-
"type": "string"
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
"additionalProperties": false
|
|
180
117
|
}
|
|
181
118
|
},
|
|
182
119
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Responses are determined by the returned value of the function\nitself. Binary responses (PDF's, screenshots) are returned back\nas binary data, and primitive JavaScript values are returned back\nby type (HTML data is \"text/html\", Objects are \"application/json\")",
|
|
3
|
-
"type": "string",
|
|
4
3
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
5
4
|
}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ResponseSchema } from '../../../shared/json-list.http.js';
|
|
2
|
+
import { default as ChromiumJSONListGetRoute } from '../../../shared/json-list.http.js';
|
|
3
|
+
export default class ChromeJSONListGetRoute extends ChromiumJSONListGetRoute {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { BrowserlessRoutes } from '@browserless.io/browserless';
|
|
2
|
+
import { default as ChromiumJSONListGetRoute } from '../../../shared/json-list.http.js';
|
|
3
|
+
export default class ChromeJSONListGetRoute extends ChromiumJSONListGetRoute {
|
|
4
|
+
name = BrowserlessRoutes.ChromeJSONListGetRoute;
|
|
5
|
+
}
|