@browserless.io/browserless 2.3.0-beta-1 → 2.3.0-beta-2

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 (207) hide show
  1. package/README.md +2 -2
  2. package/bin/browserless.js +47 -18
  3. package/bin/scaffold/README.md +50 -0
  4. package/bin/scaffold/src/hello-world.http.ts +2 -1
  5. package/build/browserless.d.ts +3 -5
  6. package/build/browserless.js +17 -11
  7. package/build/browsers/chrome.cdp.js +1 -1
  8. package/build/browsers/chrome.playwright.js +1 -1
  9. package/build/browsers/index.d.ts +1 -0
  10. package/build/browsers/index.js +4 -1
  11. package/build/data/classes.json +1 -1
  12. package/build/data/selectors.json +1 -1
  13. package/build/exports.d.ts +24 -38
  14. package/build/exports.js +25 -44
  15. package/build/limiter.d.ts +2 -1
  16. package/build/limiter.js +6 -3
  17. package/build/routes/chrome/http/content.post.body.json +8 -8
  18. package/build/routes/chrome/http/content.post.d.ts +2 -1
  19. package/build/routes/chrome/http/content.post.js +3 -2
  20. package/build/routes/chrome/http/download.post.body.json +11 -489
  21. package/build/routes/chrome/http/download.post.d.ts +2 -1
  22. package/build/routes/chrome/http/download.post.js +3 -2
  23. package/build/routes/chrome/http/download.post.query.json +6 -69
  24. package/build/routes/chrome/http/download.post.response.json +0 -1
  25. package/build/routes/chrome/http/function.post.body.json +11 -489
  26. package/build/routes/chrome/http/function.post.d.ts +2 -1
  27. package/build/routes/chrome/http/function.post.js +3 -2
  28. package/build/routes/chrome/http/function.post.query.json +6 -69
  29. package/build/routes/chrome/http/function.post.response.json +0 -1
  30. package/build/routes/chrome/http/json-list.get.d.ts +5 -1
  31. package/build/routes/chrome/http/json-list.get.js +5 -1
  32. package/build/routes/chrome/http/json-list.get.response.json +49 -1
  33. package/build/routes/chrome/http/json-new.put.d.ts +5 -1
  34. package/build/routes/chrome/http/json-new.put.js +5 -1
  35. package/build/routes/chrome/http/json-new.put.response.json +41 -1
  36. package/build/routes/chrome/http/json-protocol.get.d.ts +5 -1
  37. package/build/routes/chrome/http/json-protocol.get.js +5 -1
  38. package/build/routes/chrome/http/json-protocol.get.response.json +3 -1
  39. package/build/routes/chrome/http/json-version.get.d.ts +5 -1
  40. package/build/routes/chrome/http/json-version.get.js +5 -1
  41. package/build/routes/chrome/http/json-version.get.response.json +41 -1
  42. package/build/routes/chrome/http/pdf.post.body.json +153 -9
  43. package/build/routes/chrome/http/pdf.post.d.ts +2 -1
  44. package/build/routes/chrome/http/pdf.post.js +3 -2
  45. package/build/routes/chrome/http/pdf.post.query.json +6 -69
  46. package/build/routes/chrome/http/performance.post.body.json +10 -494
  47. package/build/routes/chrome/http/performance.post.d.ts +2 -1
  48. package/build/routes/chrome/http/performance.post.js +3 -2
  49. package/build/routes/chrome/http/performance.post.query.json +6 -69
  50. package/build/routes/chrome/http/performance.post.response.json +3 -1
  51. package/build/routes/chrome/http/scrape.post.body.json +56 -9
  52. package/build/routes/chrome/http/scrape.post.d.ts +2 -1
  53. package/build/routes/chrome/http/scrape.post.js +3 -2
  54. package/build/routes/chrome/http/scrape.post.response.json +305 -1
  55. package/build/routes/chrome/http/screenshot.post.body.json +99 -9
  56. package/build/routes/chrome/http/screenshot.post.d.ts +2 -1
  57. package/build/routes/chrome/http/screenshot.post.js +3 -2
  58. package/build/routes/chrome/http/screenshot.post.query.json +6 -69
  59. package/build/routes/chrome/ws/browser.d.ts +2 -1
  60. package/build/routes/chrome/ws/browser.js +3 -2
  61. package/build/routes/chrome/ws/browser.query.json +6 -69
  62. package/build/routes/chrome/ws/cdp.d.ts +2 -1
  63. package/build/routes/chrome/ws/cdp.js +3 -2
  64. package/build/routes/chrome/ws/cdp.query.json +6 -69
  65. package/build/routes/chrome/ws/page.d.ts +3 -2
  66. package/build/routes/chrome/ws/page.js +3 -2
  67. package/build/routes/chrome/ws/page.query.json +6 -69
  68. package/build/routes/chrome/ws/playwright.d.ts +1 -0
  69. package/build/routes/chrome/ws/playwright.js +2 -1
  70. package/build/routes/chrome/ws/playwright.query.json +7 -90
  71. package/build/routes/chromium/http/content.post.body.json +8 -8
  72. package/build/routes/chromium/http/download.post.body.json +11 -489
  73. package/build/routes/chromium/http/download.post.query.json +6 -69
  74. package/build/routes/chromium/http/download.post.response.json +0 -1
  75. package/build/routes/chromium/http/function.post.body.json +11 -489
  76. package/build/routes/chromium/http/function.post.query.json +6 -69
  77. package/build/routes/chromium/http/function.post.response.json +0 -1
  78. package/build/routes/chromium/http/json-list.get.response.json +49 -1
  79. package/build/routes/chromium/http/json-new.put.response.json +41 -1
  80. package/build/routes/chromium/http/json-protocol.get.response.json +3 -1
  81. package/build/routes/chromium/http/json-version.get.response.json +41 -1
  82. package/build/routes/chromium/http/pdf.post.body.json +153 -9
  83. package/build/routes/chromium/http/pdf.post.query.json +6 -69
  84. package/build/routes/chromium/http/performance.post.body.json +10 -494
  85. package/build/routes/chromium/http/performance.post.query.json +6 -69
  86. package/build/routes/chromium/http/performance.post.response.json +3 -1
  87. package/build/routes/chromium/http/scrape.post.body.json +56 -9
  88. package/build/routes/chromium/http/scrape.post.response.json +305 -1
  89. package/build/routes/chromium/http/screenshot.post.body.json +99 -9
  90. package/build/routes/chromium/http/screenshot.post.query.json +6 -69
  91. package/build/routes/chromium/ws/browser.query.json +6 -69
  92. package/build/routes/chromium/ws/cdp.query.json +6 -69
  93. package/build/routes/chromium/ws/page.query.json +6 -69
  94. package/build/routes/chromium/ws/playwright.query.json +7 -90
  95. package/build/routes/firefox/ws/playwright.d.ts +2 -1
  96. package/build/routes/firefox/ws/playwright.js +3 -2
  97. package/build/routes/firefox/ws/playwright.query.json +30 -115
  98. package/build/routes/management/http/config.get.d.ts +1 -0
  99. package/build/routes/management/http/config.get.js +2 -1
  100. package/build/routes/management/http/config.get.response.json +104 -1
  101. package/build/routes/management/http/metrics-total.get.d.ts +1 -0
  102. package/build/routes/management/http/metrics-total.get.js +2 -1
  103. package/build/routes/management/http/metrics-total.get.response.json +69 -1
  104. package/build/routes/management/http/metrics.get.d.ts +1 -0
  105. package/build/routes/management/http/metrics.get.js +2 -1
  106. package/build/routes/management/http/metrics.get.response.json +91 -1
  107. package/build/routes/management/http/sessions.get.d.ts +1 -0
  108. package/build/routes/management/http/sessions.get.js +2 -1
  109. package/build/routes/management/http/sessions.get.response.json +232 -1
  110. package/build/routes/management/http/static.get.d.ts +1 -0
  111. package/build/routes/management/http/static.get.js +2 -1
  112. package/build/routes/webkit/ws/playwright.d.ts +2 -1
  113. package/build/routes/webkit/ws/playwright.js +3 -2
  114. package/build/routes/webkit/ws/playwright.query.json +7 -90
  115. package/build/shared/browser.ws.d.ts +2 -1
  116. package/build/shared/browser.ws.js +3 -2
  117. package/build/shared/chromium.playwright.ws.d.ts +2 -1
  118. package/build/shared/chromium.playwright.ws.js +3 -2
  119. package/build/shared/chromium.ws.d.ts +2 -1
  120. package/build/shared/chromium.ws.js +3 -2
  121. package/build/shared/content.http.d.ts +2 -1
  122. package/build/shared/content.http.js +3 -2
  123. package/build/shared/download.http.d.ts +2 -1
  124. package/build/shared/download.http.js +3 -2
  125. package/build/shared/function.http.d.ts +2 -1
  126. package/build/shared/function.http.js +3 -2
  127. package/build/shared/json-list.http.d.ts +2 -1
  128. package/build/shared/json-list.http.js +3 -2
  129. package/build/shared/json-new.http.d.ts +2 -1
  130. package/build/shared/json-new.http.js +3 -2
  131. package/build/shared/json-protocol.http.d.ts +2 -1
  132. package/build/shared/json-protocol.http.js +3 -2
  133. package/build/shared/json-version.http.d.ts +2 -1
  134. package/build/shared/json-version.http.js +3 -2
  135. package/build/shared/page.ws.d.ts +2 -1
  136. package/build/shared/page.ws.js +3 -2
  137. package/build/shared/pdf.http.d.ts +2 -1
  138. package/build/shared/pdf.http.js +3 -2
  139. package/build/shared/performance.http.d.ts +1 -0
  140. package/build/shared/performance.http.js +2 -1
  141. package/build/shared/scrape.http.d.ts +2 -1
  142. package/build/shared/scrape.http.js +3 -2
  143. package/build/shared/screenshot.http.d.ts +1 -0
  144. package/build/shared/screenshot.http.js +2 -1
  145. package/build/types.d.ts +91 -0
  146. package/build/types.js +54 -0
  147. package/build/utils.d.ts +1 -1
  148. package/build/utils.js +11 -6
  149. package/docker/chrome/Dockerfile +0 -2
  150. package/docker/chromium/Dockerfile +1 -4
  151. package/docker/firefox/Dockerfile +1 -4
  152. package/docker/multi/Dockerfile +2 -6
  153. package/docker/webkit/Dockerfile +1 -4
  154. package/package.json +11 -10
  155. package/scripts/build-open-api.js +150 -141
  156. package/scripts/build-schemas.js +3 -2
  157. package/src/browserless.ts +43 -30
  158. package/src/browsers/chrome.cdp.ts +1 -1
  159. package/src/browsers/chrome.playwright.ts +1 -1
  160. package/src/browsers/index.ts +5 -1
  161. package/src/exports.ts +25 -49
  162. package/src/limiter.ts +7 -3
  163. package/src/routes/chrome/http/content.post.ts +7 -2
  164. package/src/routes/chrome/http/download.post.ts +7 -2
  165. package/src/routes/chrome/http/function.post.ts +7 -2
  166. package/src/routes/chrome/http/json-list.get.ts +7 -1
  167. package/src/routes/chrome/http/json-new.put.ts +7 -1
  168. package/src/routes/chrome/http/json-protocol.get.ts +7 -1
  169. package/src/routes/chrome/http/json-version.get.ts +7 -1
  170. package/src/routes/chrome/http/pdf.post.ts +7 -2
  171. package/src/routes/chrome/http/performance.post.ts +7 -2
  172. package/src/routes/chrome/http/scrape.post.ts +7 -2
  173. package/src/routes/chrome/http/screenshot.post.ts +7 -2
  174. package/src/routes/chrome/ws/browser.ts +3 -2
  175. package/src/routes/chrome/ws/cdp.ts +7 -2
  176. package/src/routes/chrome/ws/page.ts +3 -2
  177. package/src/routes/chrome/ws/playwright.ts +6 -1
  178. package/src/routes/firefox/ws/playwright.ts +3 -1
  179. package/src/routes/management/http/config.get.ts +2 -0
  180. package/src/routes/management/http/metrics-total.get.ts +2 -0
  181. package/src/routes/management/http/metrics.get.ts +2 -0
  182. package/src/routes/management/http/sessions.get.ts +2 -0
  183. package/src/routes/management/http/static.get.ts +2 -0
  184. package/src/routes/webkit/ws/playwright.ts +3 -1
  185. package/src/shared/browser.ws.ts +3 -1
  186. package/src/shared/chromium.playwright.ws.ts +3 -1
  187. package/src/shared/chromium.ws.ts +3 -1
  188. package/src/shared/content.http.ts +3 -1
  189. package/src/shared/download.http.ts +3 -1
  190. package/src/shared/function.http.ts +3 -1
  191. package/src/shared/json-list.http.ts +3 -1
  192. package/src/shared/json-new.http.ts +3 -1
  193. package/src/shared/json-protocol.http.ts +3 -1
  194. package/src/shared/json-version.http.ts +3 -1
  195. package/src/shared/page.ws.ts +3 -1
  196. package/src/shared/pdf.http.ts +3 -1
  197. package/src/shared/performance.http.ts +2 -0
  198. package/src/shared/scrape.http.ts +3 -1
  199. package/src/shared/screenshot.http.ts +2 -0
  200. package/src/types.ts +66 -0
  201. package/src/utils.ts +13 -7
  202. package/static/docs/swagger.json +2511 -1520
  203. package/static/docs/swagger.min.json +6697 -0
  204. package/static/function/client.js +323 -323
  205. package/build/exports.core.d.ts +0 -24
  206. package/build/exports.core.js +0 -26
  207. package/src/exports.core.ts +0 -26
@@ -1,510 +1,26 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
- "addScriptTag": {
4
+ "budgets": {
5
5
  "type": "array",
6
6
  "items": {
7
- "$ref": "#/definitions/FrameAddScriptTagOptions"
8
- }
9
- },
10
- "addStyleTag": {
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
7
  "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
- ]
8
+ "properties": {},
9
+ "additionalProperties": true
89
10
  }
90
11
  },
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"
12
+ "config": {
13
+ "type": "object",
14
+ "properties": {},
15
+ "additionalProperties": true
97
16
  },
98
17
  "url": {
99
18
  "type": "string"
100
- },
101
- "userAgent": {
102
- "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
19
  }
170
20
  },
171
21
  "additionalProperties": false,
172
- "definitions": {
173
- "FrameAddScriptTagOptions": {
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>": {
359
- "type": "object",
360
- "properties": {
361
- "status": {
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": {
369
- "type": "string"
370
- },
371
- "body": {
372
- "anyOf": [
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@132019": {
398
- "type": "string",
399
- "const": "Uint8Array"
400
- }
401
- },
402
- "required": [
403
- "BYTES_PER_ELEMENT",
404
- "__@toStringTag@132019",
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@132019": {
440
- "type": "string"
441
- }
442
- },
443
- "additionalProperties": false,
444
- "required": [
445
- "__@toStringTag@132019",
446
- "byteLength"
447
- ]
448
- },
449
- "SharedArrayBuffer": {
450
- "type": "object",
451
- "properties": {
452
- "byteLength": {
453
- "type": "number"
454
- },
455
- "__@species@136174": {
456
- "$ref": "#/definitions/SharedArrayBuffer"
457
- },
458
- "__@toStringTag@132019": {
459
- "type": "string",
460
- "const": "SharedArrayBuffer"
461
- }
462
- },
463
- "additionalProperties": false,
464
- "required": [
465
- "__@species@136174",
466
- "__@toStringTag@132019",
467
- "byteLength"
468
- ]
469
- },
470
- "Record<string,string>": {
471
- "type": "object",
472
- "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
- }
508
- },
22
+ "required": [
23
+ "url"
24
+ ],
509
25
  "$schema": "http://json-schema.org/draft-07/schema#"
510
26
  }
@@ -1,6 +1,7 @@
1
1
  import { BodySchema, default as Performance, QuerySchema, ResponseSchema } from '../../../shared/performance.http.js';
2
2
  import { ChromeCDP, HTTPRoutes } from '@browserless.io/browserless';
3
- export default class ChromePerformance extends Performance {
3
+ export default class ChromePerformancePostRoute extends Performance {
4
+ name: string;
4
5
  browser: typeof ChromeCDP;
5
6
  path: HTTPRoutes[];
6
7
  }
@@ -1,6 +1,7 @@
1
1
  import { default as Performance, } from '../../../shared/performance.http.js';
2
- import { ChromeCDP, HTTPRoutes } from '@browserless.io/browserless';
3
- export default class ChromePerformance extends Performance {
2
+ import { BrowserlessRoutes, ChromeCDP, HTTPRoutes, } from '@browserless.io/browserless';
3
+ export default class ChromePerformancePostRoute extends Performance {
4
+ name = BrowserlessRoutes.ChromePerformancePostRoute;
4
5
  browser = ChromeCDP;
5
6
  path = [HTTPRoutes.chromePerformance];
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,7 @@
1
1
  {
2
2
  "description": "The response of the lighthouse stats. Response objects are\ndetermined by the type of budgets and config in the POST\nJSON body",
3
- "type": "string",
3
+ "type": "object",
4
+ "properties": {},
5
+ "additionalProperties": true,
4
6
  "$schema": "http://json-schema.org/draft-07/schema#"
5
7
  }