@browserless.io/browserless 2.25.0-beta-2 → 2.25.1

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.
Files changed (224) hide show
  1. package/CHANGELOG.md +43 -3
  2. package/README.md +4 -5
  3. package/build/browserless.js +3 -1
  4. package/build/browsers/browsers.cdp.d.ts +3 -0
  5. package/build/browsers/browsers.cdp.js +4 -1
  6. package/build/browsers/browsers.playwright.d.ts +4 -0
  7. package/build/browsers/browsers.playwright.js +11 -2
  8. package/build/browsers/index.js +4 -3
  9. package/build/http.d.ts +9 -0
  10. package/build/http.js +9 -0
  11. package/build/routes/chrome/http/content.post.body.json +8 -8
  12. package/build/routes/chrome/http/pdf.post.body.json +8 -8
  13. package/build/routes/chrome/http/scrape.post.body.json +8 -8
  14. package/build/routes/chrome/http/screenshot.post.body.json +8 -8
  15. package/build/routes/chrome/tests/kill-sessions.spec.js +1 -1
  16. package/build/routes/chromium/http/content.post.body.json +8 -8
  17. package/build/routes/chromium/http/pdf.post.body.json +8 -8
  18. package/build/routes/chromium/http/scrape.post.body.json +8 -8
  19. package/build/routes/chromium/http/screenshot.post.body.json +8 -8
  20. package/build/routes/chromium/tests/kill-sessions.spec.js +1 -1
  21. package/build/routes/edge/http/content.post.body.json +579 -0
  22. package/build/routes/edge/http/content.post.d.ts +8 -0
  23. package/build/routes/edge/http/content.post.js +7 -0
  24. package/build/routes/edge/http/content.post.query.json +183 -0
  25. package/build/routes/edge/http/content.post.response.json +5 -0
  26. package/build/routes/edge/http/download.post.body.json +32 -0
  27. package/build/routes/edge/http/download.post.d.ts +8 -0
  28. package/build/routes/edge/http/download.post.js +7 -0
  29. package/build/routes/edge/http/download.post.query.json +120 -0
  30. package/build/routes/edge/http/download.post.response.json +4 -0
  31. package/build/routes/edge/http/function.post.body.json +32 -0
  32. package/build/routes/edge/http/function.post.d.ts +8 -0
  33. package/build/routes/edge/http/function.post.js +7 -0
  34. package/build/routes/edge/http/function.post.query.json +120 -0
  35. package/build/routes/edge/http/function.post.response.json +4 -0
  36. package/build/routes/edge/http/json-list.get.d.ts +5 -0
  37. package/build/routes/edge/http/json-list.get.js +5 -0
  38. package/build/routes/edge/http/json-list.get.response.json +52 -0
  39. package/build/routes/edge/http/json-new.put.d.ts +5 -0
  40. package/build/routes/edge/http/json-new.put.js +5 -0
  41. package/build/routes/edge/http/json-new.put.response.json +44 -0
  42. package/build/routes/edge/http/json-protocol.get.d.ts +5 -0
  43. package/build/routes/edge/http/json-protocol.get.js +5 -0
  44. package/build/routes/edge/http/json-protocol.get.response.json +6 -0
  45. package/build/routes/edge/http/json-version.get.d.ts +5 -0
  46. package/build/routes/edge/http/json-version.get.js +5 -0
  47. package/build/routes/edge/http/json-version.get.response.json +44 -0
  48. package/build/routes/edge/http/pdf.post.body.json +724 -0
  49. package/build/routes/edge/http/pdf.post.d.ts +8 -0
  50. package/build/routes/edge/http/pdf.post.js +7 -0
  51. package/build/routes/edge/http/pdf.post.query.json +120 -0
  52. package/build/routes/edge/http/pdf.post.response.json +5 -0
  53. package/build/routes/edge/http/performance.post.body.json +26 -0
  54. package/build/routes/edge/http/performance.post.d.ts +8 -0
  55. package/build/routes/edge/http/performance.post.js +7 -0
  56. package/build/routes/edge/http/performance.post.query.json +120 -0
  57. package/build/routes/edge/http/performance.post.response.json +7 -0
  58. package/build/routes/edge/http/scrape.post.body.json +626 -0
  59. package/build/routes/edge/http/scrape.post.d.ts +8 -0
  60. package/build/routes/edge/http/scrape.post.js +7 -0
  61. package/build/routes/edge/http/scrape.post.query.json +183 -0
  62. package/build/routes/edge/http/scrape.post.response.json +334 -0
  63. package/build/routes/edge/http/screenshot.post.body.json +669 -0
  64. package/build/routes/edge/http/screenshot.post.d.ts +8 -0
  65. package/build/routes/edge/http/screenshot.post.js +7 -0
  66. package/build/routes/edge/http/screenshot.post.query.json +120 -0
  67. package/build/routes/edge/http/screenshot.post.response.json +5 -0
  68. package/build/routes/edge/tests/content.spec.d.ts +1 -0
  69. package/build/routes/edge/tests/content.spec.js +312 -0
  70. package/build/routes/edge/tests/download.spec.d.ts +1 -0
  71. package/build/routes/edge/tests/download.spec.js +67 -0
  72. package/build/routes/edge/tests/function.spec.d.ts +1 -0
  73. package/build/routes/edge/tests/function.spec.js +277 -0
  74. package/build/routes/edge/tests/json-version.spec.d.ts +1 -0
  75. package/build/routes/edge/tests/json-version.spec.js +37 -0
  76. package/build/routes/edge/tests/kill-sessions.spec.d.ts +1 -0
  77. package/build/routes/edge/tests/kill-sessions.spec.js +80 -0
  78. package/build/routes/edge/tests/page-websocket.spec.d.ts +1 -0
  79. package/build/routes/edge/tests/page-websocket.spec.js +97 -0
  80. package/build/routes/edge/tests/pdf.spec.d.ts +1 -0
  81. package/build/routes/edge/tests/pdf.spec.js +345 -0
  82. package/build/routes/edge/tests/performance.spec.d.ts +1 -0
  83. package/build/routes/edge/tests/performance.spec.js +124 -0
  84. package/build/routes/edge/tests/scrape.spec.d.ts +1 -0
  85. package/build/routes/edge/tests/scrape.spec.js +354 -0
  86. package/build/routes/edge/tests/screenshot.spec.d.ts +1 -0
  87. package/build/routes/edge/tests/screenshot.spec.js +339 -0
  88. package/build/routes/edge/tests/websocket.spec.d.ts +1 -0
  89. package/build/routes/edge/tests/websocket.spec.js +384 -0
  90. package/build/routes/edge/ws/browser.d.ts +7 -0
  91. package/build/routes/edge/ws/browser.js +6 -0
  92. package/build/routes/edge/ws/browser.query.json +120 -0
  93. package/build/routes/edge/ws/cdp.d.ts +8 -0
  94. package/build/routes/edge/ws/cdp.js +7 -0
  95. package/build/routes/edge/ws/cdp.query.json +120 -0
  96. package/build/routes/edge/ws/page.d.ts +8 -0
  97. package/build/routes/edge/ws/page.js +7 -0
  98. package/build/routes/edge/ws/page.query.json +120 -0
  99. package/build/routes/edge/ws/playwright.d.ts +8 -0
  100. package/build/routes/edge/ws/playwright.js +7 -0
  101. package/build/routes/edge/ws/playwright.query.json +100 -0
  102. package/build/routes/firefox/tests/kill-sessions.spec.js +1 -1
  103. package/build/routes/management/http/meta.get.js +3 -1
  104. package/build/routes/webkit/tests/kill-sessions.spec.js +1 -1
  105. package/build/sdk-utils.js +1 -1
  106. package/build/shared/scrape.http.js +2 -2
  107. package/build/types.d.ts +32 -0
  108. package/build/types.js +18 -0
  109. package/build/utils.d.ts +1 -0
  110. package/build/utils.js +16 -2
  111. package/docker/chrome/Dockerfile +14 -14
  112. package/docker/chromium/Dockerfile +14 -14
  113. package/docker/edge/.dockerignore +16 -0
  114. package/docker/edge/Dockerfile +43 -0
  115. package/docker/firefox/Dockerfile +14 -14
  116. package/docker/multi/Dockerfile +18 -18
  117. package/docker/sdk/Dockerfile +10 -0
  118. package/extensions/ublock/_locales/ar/messages.json +3 -3
  119. package/extensions/ublock/_locales/bg/messages.json +1 -1
  120. package/extensions/ublock/_locales/br_FR/messages.json +2 -2
  121. package/extensions/ublock/_locales/cy/messages.json +11 -11
  122. package/extensions/ublock/_locales/el/messages.json +2 -2
  123. package/extensions/ublock/_locales/hu/messages.json +1 -1
  124. package/extensions/ublock/_locales/id/messages.json +1 -1
  125. package/extensions/ublock/_locales/lv/messages.json +4 -4
  126. package/extensions/ublock/_locales/mk/messages.json +130 -130
  127. package/extensions/ublock/_locales/oc/messages.json +1 -1
  128. package/extensions/ublock/_locales/pt_BR/messages.json +1 -1
  129. package/extensions/ublock/_locales/pt_PT/messages.json +2 -2
  130. package/extensions/ublock/_locales/si/messages.json +100 -100
  131. package/extensions/ublock/_locales/sr/messages.json +4 -4
  132. package/extensions/ublock/_locales/vi/messages.json +19 -19
  133. package/extensions/ublock/_locales/zh_TW/messages.json +28 -28
  134. package/extensions/ublock/assets/assets.json +33 -29
  135. package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +2984 -3287
  136. package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +150 -171
  137. package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +37 -27
  138. package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +802 -888
  139. package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +2355 -2071
  140. package/extensions/ublock/assets/ublock/badlists.txt +9 -1
  141. package/extensions/ublock/assets/ublock/badware.min.txt +354 -243
  142. package/extensions/ublock/assets/ublock/filters.min.txt +5837 -5737
  143. package/extensions/ublock/assets/ublock/privacy.min.txt +151 -38
  144. package/extensions/ublock/assets/ublock/quick-fixes.min.txt +83 -127
  145. package/extensions/ublock/assets/ublock/unbreak.min.txt +66 -50
  146. package/extensions/ublock/css/codemirror.css +4 -0
  147. package/extensions/ublock/document-blocked.html +3 -1
  148. package/extensions/ublock/js/arglist-parser.js +116 -0
  149. package/extensions/ublock/js/background.js +1 -1
  150. package/extensions/ublock/js/logger-ui.js +1 -1
  151. package/extensions/ublock/js/messaging.js +9 -2
  152. package/extensions/ublock/js/pagestore.js +3 -1
  153. package/extensions/ublock/js/redirect-engine.js +3 -1
  154. package/extensions/ublock/{assets/resources/set-attr.js → js/resources/attribute.js} +115 -11
  155. package/extensions/ublock/js/resources/base.js +38 -0
  156. package/extensions/ublock/js/resources/cookie.js +419 -0
  157. package/extensions/ublock/js/resources/href-sanitizer.js +188 -0
  158. package/extensions/ublock/js/resources/localstorage.js +235 -0
  159. package/extensions/ublock/js/resources/parse-replace.js +54 -0
  160. package/extensions/ublock/js/resources/prevent-settimeout.js +236 -0
  161. package/extensions/ublock/js/resources/proxy-apply.js +109 -0
  162. package/extensions/ublock/js/resources/replace-argument.js +120 -0
  163. package/extensions/ublock/{assets → js}/resources/run-at.js +20 -4
  164. package/extensions/ublock/{assets → js}/resources/safe-self.js +5 -4
  165. package/extensions/ublock/{assets → js}/resources/scriptlets.js +90 -1589
  166. package/extensions/ublock/js/resources/set-constant.js +287 -0
  167. package/extensions/ublock/js/resources/shared.js +44 -0
  168. package/extensions/ublock/js/resources/spoof-css.js +163 -0
  169. package/extensions/ublock/js/s14e-serializer.js +2 -1
  170. package/extensions/ublock/js/scriptlet-filtering-core.js +1 -1
  171. package/extensions/ublock/js/scriptlet-filtering.js +1 -31
  172. package/extensions/ublock/js/static-dnr-filtering.js +143 -129
  173. package/extensions/ublock/js/static-filtering-parser.js +27 -117
  174. package/extensions/ublock/js/static-net-filtering.js +53 -141
  175. package/extensions/ublock/js/traffic.js +1 -1
  176. package/extensions/ublock/js/urlskip.js +166 -0
  177. package/extensions/ublock/js/vapi-background-ext.js +38 -14
  178. package/extensions/ublock/manifest.json +1 -1
  179. package/package.json +22 -22
  180. package/src/browserless.ts +4 -0
  181. package/src/browsers/browsers.cdp.ts +5 -0
  182. package/src/browsers/browsers.playwright.ts +14 -1
  183. package/src/browsers/index.ts +5 -2
  184. package/src/http.ts +9 -0
  185. package/src/routes/chrome/tests/kill-sessions.spec.ts +1 -1
  186. package/src/routes/chromium/tests/kill-sessions.spec.ts +1 -1
  187. package/src/routes/edge/http/content.post.ts +20 -0
  188. package/src/routes/edge/http/download.post.ts +20 -0
  189. package/src/routes/edge/http/function.post.ts +20 -0
  190. package/src/routes/edge/http/json-list.get.ts +7 -0
  191. package/src/routes/edge/http/json-new.put.ts +7 -0
  192. package/src/routes/edge/http/json-protocol.get.ts +7 -0
  193. package/src/routes/edge/http/json-version.get.ts +7 -0
  194. package/src/routes/edge/http/pdf.post.ts +20 -0
  195. package/src/routes/edge/http/performance.post.ts +20 -0
  196. package/src/routes/edge/http/scrape.post.ts +20 -0
  197. package/src/routes/edge/http/screenshot.post.ts +20 -0
  198. package/src/routes/edge/tests/content.spec.ts +376 -0
  199. package/src/routes/edge/tests/download.spec.ts +77 -0
  200. package/src/routes/edge/tests/function.spec.ts +317 -0
  201. package/src/routes/edge/tests/json-version.spec.ts +52 -0
  202. package/src/routes/edge/tests/kill-sessions.spec.ts +99 -0
  203. package/src/routes/edge/tests/page-websocket.spec.ts +129 -0
  204. package/src/routes/edge/tests/pdf.spec.ts +389 -0
  205. package/src/routes/edge/tests/performance.spec.ts +155 -0
  206. package/src/routes/edge/tests/scrape.spec.ts +417 -0
  207. package/src/routes/edge/tests/screenshot.spec.ts +387 -0
  208. package/src/routes/edge/tests/websocket.spec.ts +510 -0
  209. package/src/routes/edge/ws/browser.ts +10 -0
  210. package/src/routes/edge/ws/cdp.ts +17 -0
  211. package/src/routes/edge/ws/page.ts +10 -0
  212. package/src/routes/edge/ws/playwright.ts +17 -0
  213. package/src/routes/firefox/tests/kill-sessions.spec.ts +1 -1
  214. package/src/routes/management/http/meta.get.ts +6 -1
  215. package/src/routes/management/http/static.get.ts +1 -1
  216. package/src/routes/webkit/tests/kill-sessions.spec.ts +1 -1
  217. package/src/sdk-utils.ts +1 -1
  218. package/src/shared/scrape.http.ts +2 -2
  219. package/src/types.ts +19 -0
  220. package/src/utils.ts +38 -16
  221. package/static/docs/swagger.json +2097 -10
  222. package/static/docs/swagger.min.json +2096 -9
  223. package/static/function/client.js +141 -253
  224. package/static/function/index.html +141 -253
@@ -0,0 +1,626 @@
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
+ "debugOpts": {
37
+ "$ref": "#/definitions/ScrapeDebugOptions"
38
+ },
39
+ "elements": {
40
+ "type": "array",
41
+ "items": {
42
+ "$ref": "#/definitions/ScrapeElementSelector"
43
+ }
44
+ },
45
+ "emulateMediaType": {
46
+ "type": "string"
47
+ },
48
+ "gotoOptions": {
49
+ "$ref": "#/definitions/GoToOptions"
50
+ },
51
+ "html": {
52
+ "type": "string"
53
+ },
54
+ "rejectRequestPattern": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "rejectResourceTypes": {
61
+ "type": "array",
62
+ "items": {
63
+ "enum": [
64
+ "cspviolationreport",
65
+ "document",
66
+ "eventsource",
67
+ "fetch",
68
+ "font",
69
+ "image",
70
+ "manifest",
71
+ "media",
72
+ "other",
73
+ "ping",
74
+ "prefetch",
75
+ "preflight",
76
+ "script",
77
+ "signedexchange",
78
+ "stylesheet",
79
+ "texttrack",
80
+ "websocket",
81
+ "xhr"
82
+ ],
83
+ "type": "string"
84
+ }
85
+ },
86
+ "requestInterceptors": {
87
+ "type": "array",
88
+ "items": {
89
+ "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.",
90
+ "type": "object",
91
+ "properties": {
92
+ "pattern": {
93
+ "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.",
94
+ "type": "string"
95
+ },
96
+ "response": {
97
+ "$ref": "#/definitions/Partial<ResponseForRequest>"
98
+ }
99
+ },
100
+ "additionalProperties": false,
101
+ "required": [
102
+ "pattern",
103
+ "response"
104
+ ]
105
+ }
106
+ },
107
+ "setExtraHTTPHeaders": {
108
+ "$ref": "#/definitions/Record<string,string>"
109
+ },
110
+ "setJavaScriptEnabled": {
111
+ "type": "boolean"
112
+ },
113
+ "url": {
114
+ "type": "string"
115
+ },
116
+ "userAgent": {
117
+ "type": "string"
118
+ },
119
+ "viewport": {
120
+ "anyOf": [
121
+ {
122
+ "$ref": "#/definitions/Viewport"
123
+ },
124
+ {
125
+ "type": "null"
126
+ }
127
+ ]
128
+ },
129
+ "waitForEvent": {
130
+ "type": "object",
131
+ "properties": {
132
+ "event": {
133
+ "type": "string"
134
+ },
135
+ "timeout": {
136
+ "type": "number"
137
+ }
138
+ },
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "event"
142
+ ]
143
+ },
144
+ "waitForFunction": {
145
+ "type": "object",
146
+ "properties": {
147
+ "fn": {
148
+ "description": "The function, or statement, to be evaluated in browser context",
149
+ "type": "string"
150
+ },
151
+ "polling": {
152
+ "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\"",
153
+ "type": [
154
+ "string",
155
+ "number"
156
+ ]
157
+ },
158
+ "timeout": {
159
+ "description": "Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds).\nPass 0 to disable timeout.",
160
+ "type": "number"
161
+ }
162
+ },
163
+ "additionalProperties": false,
164
+ "required": [
165
+ "fn"
166
+ ]
167
+ },
168
+ "waitForSelector": {
169
+ "type": "object",
170
+ "properties": {
171
+ "hidden": {
172
+ "type": "boolean"
173
+ },
174
+ "selector": {
175
+ "type": "string"
176
+ },
177
+ "timeout": {
178
+ "type": "number"
179
+ },
180
+ "visible": {
181
+ "type": "boolean"
182
+ }
183
+ },
184
+ "additionalProperties": false,
185
+ "required": [
186
+ "selector"
187
+ ]
188
+ },
189
+ "waitForTimeout": {
190
+ "type": "number"
191
+ }
192
+ },
193
+ "additionalProperties": false,
194
+ "required": [
195
+ "elements"
196
+ ],
197
+ "definitions": {
198
+ "FrameAddScriptTagOptions": {
199
+ "type": "object",
200
+ "properties": {
201
+ "url": {
202
+ "description": "URL of the script to be added.",
203
+ "type": "string"
204
+ },
205
+ "path": {
206
+ "description": "Path to a JavaScript file to be injected into the frame.",
207
+ "type": "string"
208
+ },
209
+ "content": {
210
+ "description": "JavaScript to be injected into the frame.",
211
+ "type": "string"
212
+ },
213
+ "type": {
214
+ "description": "Sets the `type` of the script. Use `module` in order to load an ES2015 module.",
215
+ "type": "string"
216
+ },
217
+ "id": {
218
+ "description": "Sets the `id` of the script.",
219
+ "type": "string"
220
+ }
221
+ },
222
+ "additionalProperties": false
223
+ },
224
+ "FrameAddStyleTagOptions": {
225
+ "type": "object",
226
+ "properties": {
227
+ "url": {
228
+ "description": "the URL of the CSS file to be added.",
229
+ "type": "string"
230
+ },
231
+ "path": {
232
+ "description": "The path to a CSS file to be injected into the frame.",
233
+ "type": "string"
234
+ },
235
+ "content": {
236
+ "description": "Raw CSS content to be injected into the frame.",
237
+ "type": "string"
238
+ }
239
+ },
240
+ "additionalProperties": false
241
+ },
242
+ "Credentials": {
243
+ "type": "object",
244
+ "properties": {
245
+ "username": {
246
+ "type": "string"
247
+ },
248
+ "password": {
249
+ "type": "string"
250
+ }
251
+ },
252
+ "additionalProperties": false,
253
+ "required": [
254
+ "password",
255
+ "username"
256
+ ]
257
+ },
258
+ "CookieParam": {
259
+ "description": "Cookie parameter object used to set cookies in the page-level cookies\nAPI.",
260
+ "type": "object",
261
+ "properties": {
262
+ "name": {
263
+ "description": "Cookie name.",
264
+ "type": "string"
265
+ },
266
+ "value": {
267
+ "description": "Cookie value.",
268
+ "type": "string"
269
+ },
270
+ "url": {
271
+ "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.",
272
+ "type": "string"
273
+ },
274
+ "domain": {
275
+ "description": "Cookie domain.",
276
+ "type": "string"
277
+ },
278
+ "path": {
279
+ "description": "Cookie path.",
280
+ "type": "string"
281
+ },
282
+ "secure": {
283
+ "description": "True if cookie is secure.",
284
+ "type": "boolean"
285
+ },
286
+ "httpOnly": {
287
+ "description": "True if cookie is http-only.",
288
+ "type": "boolean"
289
+ },
290
+ "sameSite": {
291
+ "description": "Cookie SameSite type.",
292
+ "enum": [
293
+ "Lax",
294
+ "None",
295
+ "Strict"
296
+ ],
297
+ "type": "string"
298
+ },
299
+ "expires": {
300
+ "description": "Cookie expiration date, session cookie if not set",
301
+ "type": "number"
302
+ },
303
+ "priority": {
304
+ "description": "Cookie Priority. Supported only in Chrome.",
305
+ "enum": [
306
+ "High",
307
+ "Low",
308
+ "Medium"
309
+ ],
310
+ "type": "string"
311
+ },
312
+ "sameParty": {
313
+ "description": "True if cookie is SameParty. Supported only in Chrome.",
314
+ "type": "boolean"
315
+ },
316
+ "sourceScheme": {
317
+ "description": "Cookie source scheme type. Supported only in Chrome.",
318
+ "enum": [
319
+ "NonSecure",
320
+ "Secure",
321
+ "Unset"
322
+ ],
323
+ "type": "string"
324
+ },
325
+ "partitionKey": {
326
+ "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).",
327
+ "anyOf": [
328
+ {
329
+ "$ref": "#/definitions/CookiePartitionKey"
330
+ },
331
+ {
332
+ "type": "string"
333
+ }
334
+ ]
335
+ }
336
+ },
337
+ "additionalProperties": false,
338
+ "required": [
339
+ "name",
340
+ "value"
341
+ ]
342
+ },
343
+ "CookiePartitionKey": {
344
+ "description": "Represents a cookie partition key in Chrome.",
345
+ "type": "object",
346
+ "properties": {
347
+ "sourceOrigin": {
348
+ "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.",
349
+ "type": "string"
350
+ },
351
+ "hasCrossSiteAncestor": {
352
+ "description": "Indicates if the cookie has any ancestors that are cross-site to\nthe topLevelSite.\n\nSupported only in Chrome.",
353
+ "type": "boolean"
354
+ }
355
+ },
356
+ "additionalProperties": false,
357
+ "required": [
358
+ "sourceOrigin"
359
+ ]
360
+ },
361
+ "ScrapeDebugOptions": {
362
+ "type": "object",
363
+ "properties": {
364
+ "console": {
365
+ "type": "boolean"
366
+ },
367
+ "cookies": {
368
+ "type": "boolean"
369
+ },
370
+ "html": {
371
+ "type": "boolean"
372
+ },
373
+ "network": {
374
+ "type": "boolean"
375
+ },
376
+ "screenshot": {
377
+ "type": "boolean"
378
+ }
379
+ },
380
+ "additionalProperties": false
381
+ },
382
+ "ScrapeElementSelector": {
383
+ "type": "object",
384
+ "properties": {
385
+ "selector": {
386
+ "type": "string"
387
+ },
388
+ "timeout": {
389
+ "type": "number"
390
+ }
391
+ },
392
+ "additionalProperties": false,
393
+ "required": [
394
+ "selector"
395
+ ]
396
+ },
397
+ "GoToOptions": {
398
+ "type": "object",
399
+ "properties": {
400
+ "referer": {
401
+ "description": "If provided, it will take preference over the referer header value set by\n{@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.",
402
+ "type": "string"
403
+ },
404
+ "referrerPolicy": {
405
+ "description": "If provided, it will take preference over the referer-policy header value\nset by {@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.",
406
+ "type": "string"
407
+ },
408
+ "timeout": {
409
+ "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.",
410
+ "type": "number"
411
+ },
412
+ "waitUntil": {
413
+ "description": "When to consider waiting succeeds. Given an array of event strings, waiting\nis considered to be successful after all events have been fired.",
414
+ "anyOf": [
415
+ {
416
+ "type": "array",
417
+ "items": {
418
+ "$ref": "#/definitions/PuppeteerLifeCycleEvent"
419
+ }
420
+ },
421
+ {
422
+ "enum": [
423
+ "domcontentloaded",
424
+ "load",
425
+ "networkidle0",
426
+ "networkidle2"
427
+ ],
428
+ "type": "string"
429
+ }
430
+ ]
431
+ },
432
+ "signal": {
433
+ "description": "A signal object that allows you to cancel the call.",
434
+ "$ref": "#/definitions/AbortSignal"
435
+ }
436
+ },
437
+ "additionalProperties": false
438
+ },
439
+ "PuppeteerLifeCycleEvent": {
440
+ "enum": [
441
+ "domcontentloaded",
442
+ "load",
443
+ "networkidle0",
444
+ "networkidle2"
445
+ ],
446
+ "type": "string"
447
+ },
448
+ "AbortSignal": {
449
+ "type": "object",
450
+ "properties": {
451
+ "aborted": {
452
+ "type": "boolean"
453
+ },
454
+ "onabort": {
455
+ "anyOf": [
456
+ {
457
+ "type": "object",
458
+ "additionalProperties": false
459
+ },
460
+ {
461
+ "type": "null"
462
+ }
463
+ ]
464
+ },
465
+ "reason": {}
466
+ },
467
+ "additionalProperties": false,
468
+ "required": [
469
+ "aborted",
470
+ "onabort",
471
+ "reason"
472
+ ]
473
+ },
474
+ "Partial<ResponseForRequest>": {
475
+ "type": "object",
476
+ "properties": {
477
+ "status": {
478
+ "type": "number"
479
+ },
480
+ "headers": {
481
+ "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.",
482
+ "$ref": "#/definitions/Record<string,unknown>"
483
+ },
484
+ "contentType": {
485
+ "type": "string"
486
+ },
487
+ "body": {
488
+ "anyOf": [
489
+ {
490
+ "type": "object",
491
+ "additionalProperties": false,
492
+ "patternProperties": {
493
+ "^[0-9]+$": {
494
+ "type": "number"
495
+ }
496
+ },
497
+ "properties": {
498
+ "BYTES_PER_ELEMENT": {
499
+ "type": "number"
500
+ },
501
+ "buffer": {
502
+ "$ref": "#/definitions/ArrayBufferLike"
503
+ },
504
+ "byteLength": {
505
+ "type": "number"
506
+ },
507
+ "byteOffset": {
508
+ "type": "number"
509
+ },
510
+ "length": {
511
+ "type": "number"
512
+ },
513
+ "__@toStringTag@377245": {
514
+ "type": "string",
515
+ "const": "Uint8Array"
516
+ }
517
+ },
518
+ "required": [
519
+ "BYTES_PER_ELEMENT",
520
+ "__@toStringTag@377245",
521
+ "buffer",
522
+ "byteLength",
523
+ "byteOffset",
524
+ "length"
525
+ ]
526
+ },
527
+ {
528
+ "type": "string"
529
+ }
530
+ ]
531
+ }
532
+ },
533
+ "additionalProperties": false
534
+ },
535
+ "Record<string,unknown>": {
536
+ "type": "object",
537
+ "additionalProperties": false
538
+ },
539
+ "ArrayBufferLike": {
540
+ "anyOf": [
541
+ {
542
+ "$ref": "#/definitions/ArrayBuffer"
543
+ },
544
+ {
545
+ "$ref": "#/definitions/SharedArrayBuffer"
546
+ }
547
+ ]
548
+ },
549
+ "ArrayBuffer": {
550
+ "type": "object",
551
+ "properties": {
552
+ "byteLength": {
553
+ "type": "number"
554
+ },
555
+ "__@toStringTag@377245": {
556
+ "type": "string"
557
+ }
558
+ },
559
+ "additionalProperties": false,
560
+ "required": [
561
+ "__@toStringTag@377245",
562
+ "byteLength"
563
+ ]
564
+ },
565
+ "SharedArrayBuffer": {
566
+ "type": "object",
567
+ "properties": {
568
+ "byteLength": {
569
+ "type": "number"
570
+ },
571
+ "__@species@377283": {
572
+ "$ref": "#/definitions/SharedArrayBuffer"
573
+ },
574
+ "__@toStringTag@377245": {
575
+ "type": "string",
576
+ "const": "SharedArrayBuffer"
577
+ }
578
+ },
579
+ "additionalProperties": false,
580
+ "required": [
581
+ "__@species@377283",
582
+ "__@toStringTag@377245",
583
+ "byteLength"
584
+ ]
585
+ },
586
+ "Record<string,string>": {
587
+ "type": "object",
588
+ "additionalProperties": false
589
+ },
590
+ "Viewport": {
591
+ "type": "object",
592
+ "properties": {
593
+ "width": {
594
+ "description": "The page width in CSS pixels.",
595
+ "type": "number"
596
+ },
597
+ "height": {
598
+ "description": "The page height in CSS pixels.",
599
+ "type": "number"
600
+ },
601
+ "deviceScaleFactor": {
602
+ "description": "Specify device scale factor.\nSee {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio devicePixelRatio} for more info.",
603
+ "type": "number"
604
+ },
605
+ "isMobile": {
606
+ "description": "Whether the `meta viewport` tag is taken into account.",
607
+ "type": "boolean"
608
+ },
609
+ "isLandscape": {
610
+ "description": "Specifies if the viewport is in landscape mode.",
611
+ "type": "boolean"
612
+ },
613
+ "hasTouch": {
614
+ "description": "Specify if the viewport supports touch events.",
615
+ "type": "boolean"
616
+ }
617
+ },
618
+ "additionalProperties": false,
619
+ "required": [
620
+ "height",
621
+ "width"
622
+ ]
623
+ }
624
+ },
625
+ "$schema": "http://json-schema.org/draft-07/schema#"
626
+ }
@@ -0,0 +1,8 @@
1
+ import { EdgeCDP, HTTPRoutes } from '@browserless.io/browserless';
2
+ import { BodySchema, QuerySchema, ResponseSchema, default as Scrape } from '../../../shared/scrape.http.js';
3
+ export default class EdgeScrapePostRoute extends Scrape {
4
+ name: string;
5
+ browser: typeof EdgeCDP;
6
+ path: HTTPRoutes[];
7
+ }
8
+ export { BodySchema, QuerySchema, ResponseSchema };
@@ -0,0 +1,7 @@
1
+ import { BrowserlessRoutes, EdgeCDP, HTTPRoutes, } from '@browserless.io/browserless';
2
+ import { default as Scrape, } from '../../../shared/scrape.http.js';
3
+ export default class EdgeScrapePostRoute extends Scrape {
4
+ name = BrowserlessRoutes.EdgeScrapePostRoute;
5
+ browser = EdgeCDP;
6
+ path = [HTTPRoutes.edgeScrape];
7
+ }