@browserless.io/browserless 2.24.0-beta-5 → 2.24.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 (79) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/bin/browserless.js +1 -1
  3. package/build/browsers/browsers.playwright.d.ts +1 -0
  4. package/build/browsers/browsers.playwright.js +3 -0
  5. package/build/browsers/index.d.ts +2 -1
  6. package/build/browsers/index.js +28 -7
  7. package/build/http.d.ts +5 -0
  8. package/build/http.js +1 -0
  9. package/build/routes/chrome/http/content.post.body.json +8 -8
  10. package/build/routes/chrome/http/content.post.query.json +4 -0
  11. package/build/routes/chrome/http/download.post.query.json +4 -0
  12. package/build/routes/chrome/http/function.post.query.json +4 -0
  13. package/build/routes/chrome/http/pdf.post.body.json +8 -8
  14. package/build/routes/chrome/http/pdf.post.query.json +4 -0
  15. package/build/routes/chrome/http/performance.post.query.json +4 -0
  16. package/build/routes/chrome/http/scrape.post.body.json +8 -8
  17. package/build/routes/chrome/http/scrape.post.query.json +4 -0
  18. package/build/routes/chrome/http/screenshot.post.body.json +8 -8
  19. package/build/routes/chrome/http/screenshot.post.query.json +4 -0
  20. package/build/routes/chrome/tests/kill-sessions.spec.d.ts +1 -0
  21. package/build/routes/chrome/tests/kill-sessions.spec.js +80 -0
  22. package/build/routes/chrome/ws/browser.query.json +4 -0
  23. package/build/routes/chrome/ws/cdp.query.json +4 -0
  24. package/build/routes/chrome/ws/page.query.json +4 -0
  25. package/build/routes/chrome/ws/playwright.query.json +4 -0
  26. package/build/routes/chromium/http/content.post.body.json +8 -8
  27. package/build/routes/chromium/http/content.post.query.json +4 -0
  28. package/build/routes/chromium/http/download.post.query.json +4 -0
  29. package/build/routes/chromium/http/function.post.query.json +4 -0
  30. package/build/routes/chromium/http/pdf.post.body.json +8 -8
  31. package/build/routes/chromium/http/pdf.post.query.json +4 -0
  32. package/build/routes/chromium/http/performance.post.query.json +4 -0
  33. package/build/routes/chromium/http/scrape.post.body.json +8 -8
  34. package/build/routes/chromium/http/scrape.post.query.json +4 -0
  35. package/build/routes/chromium/http/screenshot.post.body.json +8 -8
  36. package/build/routes/chromium/http/screenshot.post.query.json +4 -0
  37. package/build/routes/chromium/tests/kill-sessions.spec.d.ts +1 -0
  38. package/build/routes/chromium/tests/kill-sessions.spec.js +80 -0
  39. package/build/routes/chromium/tests/websocket.spec.js +23 -0
  40. package/build/routes/chromium/ws/browser.query.json +4 -0
  41. package/build/routes/chromium/ws/cdp.query.json +4 -0
  42. package/build/routes/chromium/ws/page.query.json +4 -0
  43. package/build/routes/chromium/ws/playwright.query.json +4 -0
  44. package/build/routes/firefox/tests/kill-sessions.spec.d.ts +1 -0
  45. package/build/routes/firefox/tests/kill-sessions.spec.js +72 -0
  46. package/build/routes/firefox/ws/playwright.query.json +4 -0
  47. package/build/routes/management/http/kill.get.d.ts +21 -0
  48. package/build/routes/management/http/kill.get.js +19 -0
  49. package/build/routes/management/http/kill.get.query.json +193 -0
  50. package/build/routes/management/http/meta.get.js +3 -2
  51. package/build/routes/management/http/sessions.get.query.json +1 -0
  52. package/build/routes/management/tests/management.spec.js +12 -0
  53. package/build/routes/webkit/tests/kill-sessions.spec.d.ts +1 -0
  54. package/build/routes/webkit/tests/kill-sessions.spec.js +72 -0
  55. package/build/routes/webkit/ws/playwright.query.json +4 -0
  56. package/build/shared/utils/performance/main.js +2 -1
  57. package/build/types.d.ts +2 -0
  58. package/build/types.js +1 -0
  59. package/build/utils.d.ts +1 -1
  60. package/build/utils.js +1 -10
  61. package/package.json +13 -13
  62. package/src/browsers/browsers.playwright.ts +3 -0
  63. package/src/browsers/index.ts +33 -12
  64. package/src/http.ts +6 -0
  65. package/src/routes/chrome/tests/kill-sessions.spec.ts +99 -0
  66. package/src/routes/chromium/tests/kill-sessions.spec.ts +99 -0
  67. package/src/routes/chromium/tests/websocket.spec.ts +29 -0
  68. package/src/routes/firefox/tests/kill-sessions.spec.ts +99 -0
  69. package/src/routes/management/http/kill.get.ts +40 -0
  70. package/src/routes/management/http/meta.get.ts +12 -10
  71. package/src/routes/management/tests/management.spec.ts +19 -0
  72. package/src/routes/webkit/tests/kill-sessions.spec.ts +99 -0
  73. package/src/shared/utils/performance/main.ts +2 -8
  74. package/src/types.ts +1 -0
  75. package/src/utils.ts +2 -11
  76. package/static/docs/swagger.json +297 -10
  77. package/static/docs/swagger.min.json +296 -9
  78. package/static/function/client.js +157 -42
  79. package/static/function/index.html +157 -42
@@ -280,14 +280,14 @@
280
280
  "length": {
281
281
  "type": "number"
282
282
  },
283
- "__@toStringTag@43326": {
283
+ "__@toStringTag@14591": {
284
284
  "type": "string",
285
285
  "const": "Uint8Array"
286
286
  }
287
287
  },
288
288
  "required": [
289
289
  "BYTES_PER_ELEMENT",
290
- "__@toStringTag@43326",
290
+ "__@toStringTag@14591",
291
291
  "buffer",
292
292
  "byteLength",
293
293
  "byteOffset",
@@ -322,13 +322,13 @@
322
322
  "byteLength": {
323
323
  "type": "number"
324
324
  },
325
- "__@toStringTag@43326": {
325
+ "__@toStringTag@14591": {
326
326
  "type": "string"
327
327
  }
328
328
  },
329
329
  "additionalProperties": false,
330
330
  "required": [
331
- "__@toStringTag@43326",
331
+ "__@toStringTag@14591",
332
332
  "byteLength"
333
333
  ]
334
334
  },
@@ -338,18 +338,18 @@
338
338
  "byteLength": {
339
339
  "type": "number"
340
340
  },
341
- "__@species@43364": {
341
+ "__@species@14629": {
342
342
  "$ref": "#/definitions/SharedArrayBuffer"
343
343
  },
344
- "__@toStringTag@43326": {
344
+ "__@toStringTag@14591": {
345
345
  "type": "string",
346
346
  "const": "SharedArrayBuffer"
347
347
  }
348
348
  },
349
349
  "additionalProperties": false,
350
350
  "required": [
351
- "__@species@43364",
352
- "__@toStringTag@43326",
351
+ "__@species@14629",
352
+ "__@toStringTag@14591",
353
353
  "byteLength"
354
354
  ]
355
355
  },
@@ -1001,7 +1001,7 @@
1001
1001
  },
1002
1002
  "info": {
1003
1003
  "title": "Browserless",
1004
- "version": "2.24.0-beta-5",
1004
+ "version": "2.24.1",
1005
1005
  "x-logo": {
1006
1006
  "altText": "browserless logo",
1007
1007
  "url": "./docs/browserless-logo-inline.svg"
@@ -1051,6 +1051,14 @@
1051
1051
  "description": "The authorization token",
1052
1052
  "type": "string"
1053
1053
  }
1054
+ },
1055
+ {
1056
+ "in": "query",
1057
+ "name": "trackingId",
1058
+ "schema": {
1059
+ "description": "Custom session identifier",
1060
+ "type": "string"
1061
+ }
1054
1062
  }
1055
1063
  ],
1056
1064
  "requestBody": {
@@ -1337,6 +1345,14 @@
1337
1345
  "description": "The authorization token",
1338
1346
  "type": "string"
1339
1347
  }
1348
+ },
1349
+ {
1350
+ "in": "query",
1351
+ "name": "trackingId",
1352
+ "schema": {
1353
+ "description": "Custom session identifier",
1354
+ "type": "string"
1355
+ }
1340
1356
  }
1341
1357
  ],
1342
1358
  "requestBody": {
@@ -1445,6 +1461,14 @@
1445
1461
  "description": "The authorization token",
1446
1462
  "type": "string"
1447
1463
  }
1464
+ },
1465
+ {
1466
+ "in": "query",
1467
+ "name": "trackingId",
1468
+ "schema": {
1469
+ "description": "Custom session identifier",
1470
+ "type": "string"
1471
+ }
1448
1472
  }
1449
1473
  ],
1450
1474
  "requestBody": {
@@ -1907,6 +1931,14 @@
1907
1931
  "description": "The authorization token",
1908
1932
  "type": "string"
1909
1933
  }
1934
+ },
1935
+ {
1936
+ "in": "query",
1937
+ "name": "trackingId",
1938
+ "schema": {
1939
+ "description": "Custom session identifier",
1940
+ "type": "string"
1941
+ }
1910
1942
  }
1911
1943
  ],
1912
1944
  "requestBody": {
@@ -2195,6 +2227,14 @@
2195
2227
  "description": "The authorization token",
2196
2228
  "type": "string"
2197
2229
  }
2230
+ },
2231
+ {
2232
+ "in": "query",
2233
+ "name": "trackingId",
2234
+ "schema": {
2235
+ "description": "Custom session identifier",
2236
+ "type": "string"
2237
+ }
2198
2238
  }
2199
2239
  ],
2200
2240
  "requestBody": {
@@ -2318,6 +2358,14 @@
2318
2358
  "description": "The authorization token",
2319
2359
  "type": "string"
2320
2360
  }
2361
+ },
2362
+ {
2363
+ "in": "query",
2364
+ "name": "trackingId",
2365
+ "schema": {
2366
+ "description": "Custom session identifier",
2367
+ "type": "string"
2368
+ }
2321
2369
  }
2322
2370
  ],
2323
2371
  "requestBody": {
@@ -2941,6 +2989,14 @@
2941
2989
  "description": "The authorization token",
2942
2990
  "type": "string"
2943
2991
  }
2992
+ },
2993
+ {
2994
+ "in": "query",
2995
+ "name": "trackingId",
2996
+ "schema": {
2997
+ "description": "Custom session identifier",
2998
+ "type": "string"
2999
+ }
2944
3000
  }
2945
3001
  ],
2946
3002
  "requestBody": {
@@ -3243,6 +3299,14 @@
3243
3299
  "description": "The authorization token",
3244
3300
  "type": "string"
3245
3301
  }
3302
+ },
3303
+ {
3304
+ "in": "query",
3305
+ "name": "trackingId",
3306
+ "schema": {
3307
+ "description": "Custom session identifier",
3308
+ "type": "string"
3309
+ }
3246
3310
  }
3247
3311
  ],
3248
3312
  "requestBody": {
@@ -3332,6 +3396,14 @@
3332
3396
  "description": "The authorization token",
3333
3397
  "type": "string"
3334
3398
  }
3399
+ },
3400
+ {
3401
+ "in": "query",
3402
+ "name": "trackingId",
3403
+ "schema": {
3404
+ "description": "Custom session identifier",
3405
+ "type": "string"
3406
+ }
3335
3407
  }
3336
3408
  ],
3337
3409
  "requestBody": {
@@ -3421,6 +3493,14 @@
3421
3493
  "description": "The authorization token",
3422
3494
  "type": "string"
3423
3495
  }
3496
+ },
3497
+ {
3498
+ "in": "query",
3499
+ "name": "trackingId",
3500
+ "schema": {
3501
+ "description": "Custom session identifier",
3502
+ "type": "string"
3503
+ }
3424
3504
  }
3425
3505
  ],
3426
3506
  "requestBody": {
@@ -3510,6 +3590,14 @@
3510
3590
  "description": "The authorization token",
3511
3591
  "type": "string"
3512
3592
  }
3593
+ },
3594
+ {
3595
+ "in": "query",
3596
+ "name": "trackingId",
3597
+ "schema": {
3598
+ "description": "Custom session identifier",
3599
+ "type": "string"
3600
+ }
3513
3601
  }
3514
3602
  ],
3515
3603
  "requestBody": {
@@ -3598,6 +3686,14 @@
3598
3686
  "description": "The authorization token",
3599
3687
  "type": "string"
3600
3688
  }
3689
+ },
3690
+ {
3691
+ "in": "query",
3692
+ "name": "trackingId",
3693
+ "schema": {
3694
+ "description": "Custom session identifier",
3695
+ "type": "string"
3696
+ }
3601
3697
  }
3602
3698
  ],
3603
3699
  "requestBody": {
@@ -3884,6 +3980,14 @@
3884
3980
  "description": "The authorization token",
3885
3981
  "type": "string"
3886
3982
  }
3983
+ },
3984
+ {
3985
+ "in": "query",
3986
+ "name": "trackingId",
3987
+ "schema": {
3988
+ "description": "Custom session identifier",
3989
+ "type": "string"
3990
+ }
3887
3991
  }
3888
3992
  ],
3889
3993
  "requestBody": {
@@ -3992,6 +4096,14 @@
3992
4096
  "description": "The authorization token",
3993
4097
  "type": "string"
3994
4098
  }
4099
+ },
4100
+ {
4101
+ "in": "query",
4102
+ "name": "trackingId",
4103
+ "schema": {
4104
+ "description": "Custom session identifier",
4105
+ "type": "string"
4106
+ }
3995
4107
  }
3996
4108
  ],
3997
4109
  "requestBody": {
@@ -4100,6 +4212,14 @@
4100
4212
  "description": "The authorization token",
4101
4213
  "type": "string"
4102
4214
  }
4215
+ },
4216
+ {
4217
+ "in": "query",
4218
+ "name": "trackingId",
4219
+ "schema": {
4220
+ "description": "Custom session identifier",
4221
+ "type": "string"
4222
+ }
4103
4223
  }
4104
4224
  ],
4105
4225
  "requestBody": {
@@ -4388,6 +4508,14 @@
4388
4508
  "description": "The authorization token",
4389
4509
  "type": "string"
4390
4510
  }
4511
+ },
4512
+ {
4513
+ "in": "query",
4514
+ "name": "trackingId",
4515
+ "schema": {
4516
+ "description": "Custom session identifier",
4517
+ "type": "string"
4518
+ }
4391
4519
  }
4392
4520
  ],
4393
4521
  "requestBody": {
@@ -4511,6 +4639,14 @@
4511
4639
  "description": "The authorization token",
4512
4640
  "type": "string"
4513
4641
  }
4642
+ },
4643
+ {
4644
+ "in": "query",
4645
+ "name": "trackingId",
4646
+ "schema": {
4647
+ "description": "Custom session identifier",
4648
+ "type": "string"
4649
+ }
4514
4650
  }
4515
4651
  ],
4516
4652
  "requestBody": {
@@ -5134,6 +5270,14 @@
5134
5270
  "description": "The authorization token",
5135
5271
  "type": "string"
5136
5272
  }
5273
+ },
5274
+ {
5275
+ "in": "query",
5276
+ "name": "trackingId",
5277
+ "schema": {
5278
+ "description": "Custom session identifier",
5279
+ "type": "string"
5280
+ }
5137
5281
  }
5138
5282
  ],
5139
5283
  "requestBody": {
@@ -5436,6 +5580,14 @@
5436
5580
  "description": "The authorization token",
5437
5581
  "type": "string"
5438
5582
  }
5583
+ },
5584
+ {
5585
+ "in": "query",
5586
+ "name": "trackingId",
5587
+ "schema": {
5588
+ "description": "Custom session identifier",
5589
+ "type": "string"
5590
+ }
5439
5591
  }
5440
5592
  ],
5441
5593
  "requestBody": {
@@ -5525,6 +5677,14 @@
5525
5677
  "description": "The authorization token",
5526
5678
  "type": "string"
5527
5679
  }
5680
+ },
5681
+ {
5682
+ "in": "query",
5683
+ "name": "trackingId",
5684
+ "schema": {
5685
+ "description": "Custom session identifier",
5686
+ "type": "string"
5687
+ }
5528
5688
  }
5529
5689
  ],
5530
5690
  "requestBody": {
@@ -5678,6 +5838,14 @@
5678
5838
  "description": "The authorization token",
5679
5839
  "type": "string"
5680
5840
  }
5841
+ },
5842
+ {
5843
+ "in": "query",
5844
+ "name": "trackingId",
5845
+ "schema": {
5846
+ "description": "Custom session identifier",
5847
+ "type": "string"
5848
+ }
5681
5849
  }
5682
5850
  ],
5683
5851
  "requestBody": {
@@ -5929,6 +6097,116 @@
5929
6097
  ]
5930
6098
  }
5931
6099
  },
6100
+ "/kill/+([0-9a-zA-Z-_])": {
6101
+ "get": {
6102
+ "definitions": {},
6103
+ "description": "Kill running sessions based on BrowserId or TrackingId.",
6104
+ "parameters": [
6105
+ {
6106
+ "in": "query",
6107
+ "name": "token",
6108
+ "required": true,
6109
+ "schema": {
6110
+ "description": "The authorization token",
6111
+ "type": "string"
6112
+ }
6113
+ },
6114
+ {
6115
+ "in": "query",
6116
+ "name": "blockAds",
6117
+ "required": false,
6118
+ "schema": {
6119
+ "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.",
6120
+ "type": "boolean"
6121
+ }
6122
+ },
6123
+ {
6124
+ "in": "query",
6125
+ "name": "browserId",
6126
+ "required": false,
6127
+ "schema": {
6128
+ "type": "string"
6129
+ }
6130
+ },
6131
+ {
6132
+ "in": "query",
6133
+ "name": "launch",
6134
+ "required": false,
6135
+ "schema": {
6136
+ "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.",
6137
+ "anyOf": [
6138
+ {
6139
+ "$ref": "#/definitions/CDPLaunchOptions"
6140
+ },
6141
+ {
6142
+ "$ref": "#/definitions/BrowserServerOptions"
6143
+ },
6144
+ {
6145
+ "type": "string"
6146
+ }
6147
+ ]
6148
+ }
6149
+ },
6150
+ {
6151
+ "in": "query",
6152
+ "name": "timeout",
6153
+ "required": false,
6154
+ "schema": {
6155
+ "description": "Override the system-level timeout for this request.\nAccepts a value in milliseconds.",
6156
+ "type": "number"
6157
+ }
6158
+ },
6159
+ {
6160
+ "in": "query",
6161
+ "name": "trackingId",
6162
+ "required": false,
6163
+ "schema": {
6164
+ "description": "Custom session identifier",
6165
+ "type": "string"
6166
+ }
6167
+ }
6168
+ ],
6169
+ "requestBody": {
6170
+ "content": {}
6171
+ },
6172
+ "responses": {
6173
+ "400": {
6174
+ "code": 400,
6175
+ "description": "The request contains errors or didn't properly encode content.",
6176
+ "message": "HTTP/1.1 400 Bad Request"
6177
+ },
6178
+ "401": {
6179
+ "code": 401,
6180
+ "description": "The request is missing, or contains bad, authorization credentials.",
6181
+ "message": "HTTP/1.1 401 Unauthorized"
6182
+ },
6183
+ "404": {
6184
+ "code": 404,
6185
+ "description": "Resource couldn't be found.",
6186
+ "message": "HTTP/1.1 404 Not Found"
6187
+ },
6188
+ "408": {
6189
+ "code": 408,
6190
+ "description": "The request took has taken too long to process.",
6191
+ "message": "HTTP/1.1 408 Request Timeout"
6192
+ },
6193
+ "429": {
6194
+ "code": 429,
6195
+ "description": "Too many requests are currently being processed.",
6196
+ "message": "HTTP/1.1 429 Too Many Requests"
6197
+ },
6198
+ "500": {
6199
+ "code": 500,
6200
+ "description": "An internal error occurred when handling the request.",
6201
+ "message": "HTTP/1.1 500 Internal Server Error"
6202
+ }
6203
+ },
6204
+ "summary": "/kill/+([0-9a-zA-Z-_])",
6205
+ "tags": [
6206
+ "Management REST APIs"
6207
+ ]
6208
+ }
6209
+ },
5932
6210
  "/meta": {
5933
6211
  "get": {
5934
6212
  "definitions": {},
@@ -6229,6 +6507,7 @@
6229
6507
  "name": "trackingId",
6230
6508
  "required": false,
6231
6509
  "schema": {
6510
+ "description": "Custom session identifier",
6232
6511
  "type": "string"
6233
6512
  }
6234
6513
  }
@@ -6363,6 +6642,14 @@
6363
6642
  "description": "The authorization token",
6364
6643
  "type": "string"
6365
6644
  }
6645
+ },
6646
+ {
6647
+ "in": "query",
6648
+ "name": "trackingId",
6649
+ "schema": {
6650
+ "description": "Custom session identifier",
6651
+ "type": "string"
6652
+ }
6366
6653
  }
6367
6654
  ],
6368
6655
  "requestBody": {