feat: Passwordless cross-device authentication

- Arkitektur: docs/auth/passwordless-architecture.md
- Backend: iom/quixzoom-auth-service/ (FastAPI + Redis)
- Webb: quixzoom-market-pages/se/login/ (QR-kod + polling)
- App: iom/quixzoom-app/src/features/auth/ (push + deep links)

Flöde: QR-kod → app-godkännande → webb-inloggad
This commit is contained in:
Bernt
2026-07-07 07:11:50 +00:00
parent 4aa984ad74
commit 6989a98d75
61843 changed files with 5491611 additions and 872231 deletions
+401
View File
@@ -0,0 +1,401 @@
# Changelog
## [0.4.2](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.4.1...webdriver-bidi-protocol-v0.4.2) (2026-05-22)
### Bug Fixes
* re-generate types based on spec updates ([#330](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/330)) ([d6db955](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d6db955281b2019ce29c62c82fec64bcf5a31156))
## [0.4.1](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.4.0...webdriver-bidi-protocol-v0.4.1) (2026-02-11)
### Bug Fixes
* re-generate types based on spec updates ([#323](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/323)) ([ea25193](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/ea25193553542688555e820afa255c7cccaf8802))
## [0.4.0](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.11...webdriver-bidi-protocol-v0.4.0) (2026-01-20)
### Features
* add `ua-client-hints` spec support ([#313](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/313)) ([85b944b](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/85b944bc24f1408b5f9bad655898e0f7c00fe9da))
## [0.3.11](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.10...webdriver-bidi-protocol-v0.3.11) (2026-01-13)
### Bug Fixes
* re-generate types based on spec updates ([#307](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/307)) ([4cd0699](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/4cd0699fa6030eea6f8738c01caefa6c4c23f0b2))
* re-generate types based on spec updates ([#310](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/310)) ([adad548](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/adad548563ef2f604752e2d9e8164282f2b4416a))
## [0.3.10](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.9...webdriver-bidi-protocol-v0.3.10) (2025-12-11)
### Bug Fixes
* re-generate types based on spec updates ([#295](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/295)) ([ed33e2a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/ed33e2a815ced96e393faa40195fbdd02f9cffc5))
* re-generate types based on spec updates ([#298](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/298)) ([8a5cec8](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/8a5cec8b67df4046f1568b4bd0db5c2b147f62d9))
## [0.3.9](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.8...webdriver-bidi-protocol-v0.3.9) (2025-11-19)
### Bug Fixes
* re-generate types based on spec updates ([#288](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/288)) ([344664a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/344664acc11292530bc7f40db7542e2aca18e817))
* re-generate types based on spec updates ([#292](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/292)) ([b9e9a8e](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/b9e9a8e9680169cd741401f786958fc25f36a762))
## [0.3.8](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.7...webdriver-bidi-protocol-v0.3.8) (2025-10-12)
### Bug Fixes
* re-generate types based on specifciation updates ([#278](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/278)) ([e4eea99](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e4eea99d53be065c0f16b676570ca49c5c89766f))
## [0.3.7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.6...webdriver-bidi-protocol-v0.3.7) (2025-10-07)
### Bug Fixes
* only include relevant files ([#274](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/274)) ([f7480d3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/f7480d33987f158a2eb566e8072646b265f473f2))
* re-generate types based on specifciation updates ([#273](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/273)) ([a9e97d1](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/a9e97d11381f6145e3a2dfa1689b0a4548e018d0))
## [0.3.6](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.5...webdriver-bidi-protocol-v0.3.6) (2025-09-26)
### Bug Fixes
* re-generate types based on specifciation updates ([#267](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/267)) ([de75a21](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/de75a21694be7d7d5fd5a9afd7081b96080d361a))
## [0.3.5](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.4...webdriver-bidi-protocol-v0.3.5) (2025-09-25)
### Bug Fixes
* rename mapping back to Commands ([#264](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/264)) ([a7b19c3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/a7b19c3b173f268beef870449bfad714952dd478))
## [0.3.4](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.3...webdriver-bidi-protocol-v0.3.4) (2025-09-25)
### Bug Fixes
* generation should not emit ts imports ([#262](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/262)) ([74bf1ad](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/74bf1adb89582b073fa8741ddf3680549dada469))
## [0.3.3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.2...webdriver-bidi-protocol-v0.3.3) (2025-09-25)
### Bug Fixes
* correctly re-export mapping ([#259](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/259)) ([dc18802](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/dc188026fc8869c6ac73297dea1681ea509656a0))
* re-generate types based on specifciation updates ([#261](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/261)) ([0c0ea74](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/0c0ea744335453d18e459522b094de6be616f4ff))
## [0.3.2](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.1...webdriver-bidi-protocol-v0.3.2) (2025-09-24)
### Bug Fixes
* re-generate types based on specifciation updates ([#257](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/257)) ([d5a2c22](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d5a2c22c5623f914ad309fc78f58bf90e610e816))
## [0.3.1](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.3.0...webdriver-bidi-protocol-v0.3.1) (2025-09-23)
### Bug Fixes
* generation of mapping ([#251](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/251)) ([6c52528](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/6c52528e916d47188659904c67fca20c752f714f))
* re-generate types based on specifciation updates ([#249](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/249)) ([d625fd2](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d625fd2e173294e9a80bd3e90572b85c168c3137))
* re-generate types based on specifciation updates ([#252](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/252)) ([d045d7b](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d045d7bef06acd6a7df6508ec90f3a178b95070a))
## [0.3.0](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.11...webdriver-bidi-protocol-v0.3.0) (2025-09-15)
### Features
* automatically generate command mapped types ([#243](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/243)) ([3eb25f3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/3eb25f35e1a17885c1af7a63037de1fc74c83d05))
### Bug Fixes
* re-generate types based on specifciation updates ([#245](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/245)) ([c32b70d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/c32b70de5fb4dda145c872025192f5cd59177c34))
## [0.2.11](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.10...webdriver-bidi-protocol-v0.2.11) (2025-09-10)
### Bug Fixes
* add user agent override to the mapping ([#240](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/240)) ([0336e7f](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/0336e7faa0988ac4b0582a86345e5644ee8132bb))
* re-generate types based on specifciation updates ([#239](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/239)) ([2e52f5a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/2e52f5ae40367410699d3a9820ad8856e7485712))
* re-generate types based on specifciation updates ([#242](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/242)) ([8ae63cc](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/8ae63cc2032ac3889b261d78c57b6b5cce412cad))
## [0.2.10](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.9...webdriver-bidi-protocol-v0.2.10) (2025-09-09)
### Bug Fixes
* re-generate types based on specifciation updates ([#236](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/236)) ([7b33604](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/7b336043c3aaf0591c9f4729c00b949563274b08))
## [0.2.9](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.8...webdriver-bidi-protocol-v0.2.9) (2025-09-09)
### Bug Fixes
* add emulation.setScriptingEnabled ([#234](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/234)) ([d1a7de7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d1a7de7dfb7abdc3178524457a5c011f32d08561))
## [0.2.8](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.7...webdriver-bidi-protocol-v0.2.8) (2025-09-09)
### Bug Fixes
* re-generate types based on specifciation updates ([#233](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/233)) ([42c83fd](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/42c83fd2e364a3097da2494b4d2f7e1a6419358b))
* use a helper for commands and events ([#231](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/231)) ([e302d10](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e302d10cf32e02295b5910a541141d5435c80292))
## [0.2.7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.6...webdriver-bidi-protocol-v0.2.7) (2025-09-08)
### Bug Fixes
* add emulation mapping ([#226](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/226)) ([f4851fe](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/f4851fe000293cad2aa38cf6d9290d4dd3dd27b4))
* re-generate types based on specifciation updates ([#229](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/229)) ([fbf9511](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/fbf951111ca4eaafea5aa03c02292aa9331a6b8e))
## [0.2.6](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.5...webdriver-bidi-protocol-v0.2.6) (2025-08-26)
### Bug Fixes
* re-generate types based on specifciation updates ([#221](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/221)) ([53d49a7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/53d49a7ffcb5ef4de3f4f8f4828bf64e4552f599))
## [0.2.5](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.4...webdriver-bidi-protocol-v0.2.5) (2025-08-08)
### Bug Fixes
* re-generate types based on specifciation updates ([#213](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/213)) ([eb37bb4](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/eb37bb4fb84ec00e23fe9bfa58dbb250abd2f040))
## [0.2.4](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.3...webdriver-bidi-protocol-v0.2.4) (2025-08-01)
### Bug Fixes
* add latest commands to the mapping ([#207](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/207)) ([d53fd56](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d53fd56538f068a88900475955a54a4ea74bf305))
## [0.2.3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.2...webdriver-bidi-protocol-v0.2.3) (2025-08-01)
### Bug Fixes
* re-generate types based on specifciation updates ([#202](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/202)) ([db6f116](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/db6f116160068345715e17c686f9ddf3bf53423f))
* re-generate types based on specifciation updates ([#205](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/205)) ([8e75f89](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/8e75f892bdbce2360b271b4197154d9db65bb35a))
## [0.2.2](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.1...webdriver-bidi-protocol-v0.2.2) (2025-07-14)
### Bug Fixes
* re-generate types based on specifciation updates ([#190](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/190)) ([7387ba3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/7387ba3287a187cc3a48d5ca4f735c650f8a2d1a))
## [0.2.1](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.2.0...webdriver-bidi-protocol-v0.2.1) (2025-07-01)
### Bug Fixes
* re-generate types based on specifciation updates ([#183](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/183)) ([daf944c](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/daf944c89cda0387cc0eac163c858515b60ea480))
* re-generate types based on specifciation updates ([#187](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/187)) ([d847f6a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d847f6afbd310e9587c79a942e33e09afe654729))
## [0.2.0](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.10...webdriver-bidi-protocol-v0.2.0) (2025-06-26)
### Features
* add bluetooth ([#66](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/66)) ([e42e8d9](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e42e8d9896540020955d81b08066bdf92ed16602))
### Bug Fixes
* add repository ([#19](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/19)) ([91def9d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/91def9dd0baeab3476e7154676e40d5a709da2c3))
* another repository fix ([72c215c](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/72c215cbcf76c97317deff925d1ff73732ed5bab))
* bump specs/webdriver-bidi from `0575bf7` to `9eaa877` ([#65](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/65)) ([d0ed8ef](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d0ed8ef0254fb7786b5e2cd7b716aa772cc49fcd))
* bump specs/webdriver-bidi from `05a283e` to `62b8dfe` ([#16](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/16)) ([51dac71](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/51dac71ca4ea2e4e85eee7ba82a6a8ac7ff584a4))
* bump specs/webdriver-bidi from `0c366b0` to `a46d71b` ([#30](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/30)) ([c926381](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/c92638156ca8cbe36e2485fde2c3eca4b6d14cd7))
* bump specs/webdriver-bidi from `0fa2d99` to `712c17f` ([#36](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/36)) ([5e35acb](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/5e35acb0af5663fdace139da9648a298adf4b863))
* bump specs/webdriver-bidi from `287e9c6` to `0575bf7` ([#59](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/59)) ([20ec66a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/20ec66ae46acdb49211991f603826bfbab0c0762))
* bump specs/webdriver-bidi from `62b8dfe` to `0c366b0` ([#25](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/25)) ([e6da243](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e6da2439e38f2c403319ce1dbed16c9b8029667d))
* bump specs/webdriver-bidi from `712c17f` to `287e9c6` ([#43](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/43)) ([2f378f5](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/2f378f5890cbfec58e62f466b73fda0523083216))
* bump specs/webdriver-bidi from `a46d71b` to `0fa2d99` ([#33](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/33)) ([596a0ab](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/596a0ab776e061bccbc67a4fc38db4d5cce84643))
* document usage ([#7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/7)) ([d98a6ee](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d98a6ee23cbaa943440e2b40831a0c56aa0d6c18))
* re-gen types based on the spec changes ([#75](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/75)) ([e95b00e](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e95b00e96333781b8843325d928e75f49768f06f))
* re-generate types based on specifciation updates ([#101](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/101)) ([c2aa431](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/c2aa431b0e7fe5c229f51d7b549fb6eb51009087))
* re-generate types based on specifciation updates ([#105](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/105)) ([adec09b](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/adec09b1c6fc6a29952a9c0a641ebd5d22f7370d))
* re-generate types based on specifciation updates ([#108](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/108)) ([00199dc](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/00199dc6e53e35cb12e1e67ce441a2d06f87e9ae))
* re-generate types based on specifciation updates ([#114](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/114)) ([f1a380a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/f1a380afeebcb5f9a2ab66732f0971336c80bb0e))
* re-generate types based on specifciation updates ([#125](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/125)) ([95501b6](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/95501b6d1a81516aa55cd84af1a5d3f8c060174a))
* re-generate types based on specifciation updates ([#128](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/128)) ([852b2ab](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/852b2abfacb13c969f82f9507cccb50a2bbfeca0))
* re-generate types based on specifciation updates ([#140](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/140)) ([b769928](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/b769928b05cfc936a949384cc7b345f995895b54))
* re-generate types based on specifciation updates ([#143](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/143)) ([946a803](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/946a80305ad8c226519667a3c4d6bfc84d7a8fe1))
* re-generate types based on specifciation updates ([#147](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/147)) ([b568837](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/b5688371c4ce32b6d62ff6b1a08854f0c000bcbe))
* re-generate types based on specifciation updates ([#154](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/154)) ([5e9bfdd](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/5e9bfdde05a80e6852dbd81ac4e124702765b11c))
* re-generate types based on specifciation updates ([#156](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/156)) ([a917e79](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/a917e79b9abd17e312c52227310bfe8aa7e21abb))
* re-generate types based on specifciation updates ([#162](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/162)) ([bb92e98](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/bb92e98a232b060cc94a058fef92e10d8f8d6601))
* re-generate types based on specifciation updates ([#166](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/166)) ([42664dd](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/42664dd5c7401588e55dda5573c3b7096f700953))
* re-generate types based on specifciation updates ([#178](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/178)) ([6ee5f05](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/6ee5f05ae9298e59ff34c4859543bebcc4ad658d))
* re-generate types based on specifciation updates ([#83](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/83)) ([ac66a29](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/ac66a29bc3396c2bdabb133d5dfb63fc2b029add))
* re-generate types based on specifciation updates ([#88](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/88)) ([d3c2c6f](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d3c2c6fcf973551d4bef5cbee5291e3581ae257c))
* re-generate types based on specifciation updates ([#95](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/95)) ([64abd1d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/64abd1d65d99e75d7ec1e885fe22c0f093323843))
* update repository ([28cf911](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/28cf911e59ad5b177df47d04fc012d8c9cfe7fde))
## [0.1.10](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.9...webdriver-bidi-protocol-v0.1.10) (2025-06-26)
### Bug Fixes
* re-generate types based on specifciation updates ([#178](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/178)) ([6ee5f05](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/6ee5f05ae9298e59ff34c4859543bebcc4ad658d))
## [0.1.9](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.8...webdriver-bidi-protocol-v0.1.9) (2025-06-03)
### Bug Fixes
* re-generate types based on specifciation updates ([#147](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/147)) ([b568837](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/b5688371c4ce32b6d62ff6b1a08854f0c000bcbe))
* re-generate types based on specifciation updates ([#154](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/154)) ([5e9bfdd](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/5e9bfdde05a80e6852dbd81ac4e124702765b11c))
* re-generate types based on specifciation updates ([#156](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/156)) ([a917e79](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/a917e79b9abd17e312c52227310bfe8aa7e21abb))
* re-generate types based on specifciation updates ([#162](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/162)) ([bb92e98](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/bb92e98a232b060cc94a058fef92e10d8f8d6601))
* re-generate types based on specifciation updates ([#166](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/166)) ([42664dd](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/42664dd5c7401588e55dda5573c3b7096f700953))
## [0.1.8](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.7...webdriver-bidi-protocol-v0.1.8) (2025-04-04)
### Bug Fixes
* re-generate types based on specifciation updates ([#140](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/140)) ([b769928](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/b769928b05cfc936a949384cc7b345f995895b54))
* re-generate types based on specifciation updates ([#143](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/143)) ([946a803](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/946a80305ad8c226519667a3c4d6bfc84d7a8fe1))
## [0.1.7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.6...webdriver-bidi-protocol-v0.1.7) (2025-03-06)
### Bug Fixes
* re-generate types based on specifciation updates ([#114](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/114)) ([f1a380a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/f1a380afeebcb5f9a2ab66732f0971336c80bb0e))
* re-generate types based on specifciation updates ([#125](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/125)) ([95501b6](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/95501b6d1a81516aa55cd84af1a5d3f8c060174a))
* re-generate types based on specifciation updates ([#128](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/128)) ([852b2ab](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/852b2abfacb13c969f82f9507cccb50a2bbfeca0))
## [0.1.6](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.5...webdriver-bidi-protocol-v0.1.6) (2025-01-20)
### Bug Fixes
* re-generate types based on specifciation updates ([#108](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/108)) ([00199dc](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/00199dc6e53e35cb12e1e67ce441a2d06f87e9ae))
## [0.1.5](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.4...webdriver-bidi-protocol-v0.1.5) (2025-01-19)
### Bug Fixes
* re-generate types based on specifciation updates ([#101](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/101)) ([c2aa431](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/c2aa431b0e7fe5c229f51d7b549fb6eb51009087))
* re-generate types based on specifciation updates ([#105](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/105)) ([adec09b](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/adec09b1c6fc6a29952a9c0a641ebd5d22f7370d))
## [0.1.4](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.3...webdriver-bidi-protocol-v0.1.4) (2025-01-08)
### Bug Fixes
* re-generate types based on specifciation updates ([#95](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/95)) ([64abd1d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/64abd1d65d99e75d7ec1e885fe22c0f093323843))
## [0.1.3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.2...webdriver-bidi-protocol-v0.1.3) (2024-12-20)
### Bug Fixes
* re-generate types based on specifciation updates ([#88](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/88)) ([d3c2c6f](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d3c2c6fcf973551d4bef5cbee5291e3581ae257c))
## [0.1.2](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.1...webdriver-bidi-protocol-v0.1.2) (2024-12-08)
### Bug Fixes
* re-generate types based on specifciation updates ([#83](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/83)) ([ac66a29](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/ac66a29bc3396c2bdabb133d5dfb63fc2b029add))
## [0.1.1](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.1.0...webdriver-bidi-protocol-v0.1.1) (2024-12-03)
### Bug Fixes
* re-gen types based on the spec changes ([#75](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/75)) ([e95b00e](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e95b00e96333781b8843325d928e75f49768f06f))
## [0.1.0](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.9...webdriver-bidi-protocol-v0.1.0) (2024-12-02)
### Features
* add bluetooth ([#66](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/66)) ([e42e8d9](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e42e8d9896540020955d81b08066bdf92ed16602))
### Bug Fixes
* add repository ([#19](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/19)) ([91def9d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/91def9dd0baeab3476e7154676e40d5a709da2c3))
* another repository fix ([72c215c](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/72c215cbcf76c97317deff925d1ff73732ed5bab))
* bump specs/webdriver-bidi from `0575bf7` to `9eaa877` ([#65](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/65)) ([d0ed8ef](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d0ed8ef0254fb7786b5e2cd7b716aa772cc49fcd))
* bump specs/webdriver-bidi from `05a283e` to `62b8dfe` ([#16](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/16)) ([51dac71](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/51dac71ca4ea2e4e85eee7ba82a6a8ac7ff584a4))
* bump specs/webdriver-bidi from `0c366b0` to `a46d71b` ([#30](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/30)) ([c926381](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/c92638156ca8cbe36e2485fde2c3eca4b6d14cd7))
* bump specs/webdriver-bidi from `0fa2d99` to `712c17f` ([#36](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/36)) ([5e35acb](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/5e35acb0af5663fdace139da9648a298adf4b863))
* bump specs/webdriver-bidi from `287e9c6` to `0575bf7` ([#59](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/59)) ([20ec66a](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/20ec66ae46acdb49211991f603826bfbab0c0762))
* bump specs/webdriver-bidi from `62b8dfe` to `0c366b0` ([#25](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/25)) ([e6da243](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e6da2439e38f2c403319ce1dbed16c9b8029667d))
* bump specs/webdriver-bidi from `712c17f` to `287e9c6` ([#43](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/43)) ([2f378f5](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/2f378f5890cbfec58e62f466b73fda0523083216))
* bump specs/webdriver-bidi from `a46d71b` to `0fa2d99` ([#33](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/33)) ([596a0ab](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/596a0ab776e061bccbc67a4fc38db4d5cce84643))
* document usage ([#7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/7)) ([d98a6ee](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d98a6ee23cbaa943440e2b40831a0c56aa0d6c18))
* update repository ([28cf911](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/28cf911e59ad5b177df47d04fc012d8c9cfe7fde))
## [0.0.9](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.8...webdriver-bidi-protocol-v0.0.9) (2024-09-03)
### Bug Fixes
* bump specs/webdriver-bidi from `0fa2d99` to `712c17f` ([#36](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/36)) ([5e35acb](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/5e35acb0af5663fdace139da9648a298adf4b863))
* bump specs/webdriver-bidi from `712c17f` to `287e9c6` ([#43](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/43)) ([2f378f5](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/2f378f5890cbfec58e62f466b73fda0523083216))
## [0.0.8](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.7...webdriver-bidi-protocol-v0.0.8) (2024-07-10)
### Bug Fixes
* bump specs/webdriver-bidi from `a46d71b` to `0fa2d99` ([#33](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/33)) ([596a0ab](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/596a0ab776e061bccbc67a4fc38db4d5cce84643))
## [0.0.7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.6...webdriver-bidi-protocol-v0.0.7) (2024-07-04)
### Bug Fixes
* bump specs/webdriver-bidi from `0c366b0` to `a46d71b` ([#30](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/30)) ([c926381](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/c92638156ca8cbe36e2485fde2c3eca4b6d14cd7))
## [0.0.6](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.5...webdriver-bidi-protocol-v0.0.6) (2024-07-02)
### Bug Fixes
* bump specs/webdriver-bidi from `62b8dfe` to `0c366b0` ([#25](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/25)) ([e6da243](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e6da2439e38f2c403319ce1dbed16c9b8029667d))
## [0.0.5](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.4...webdriver-bidi-protocol-v0.0.5) (2024-06-28)
### Bug Fixes
* another repository fix ([72c215c](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/72c215cbcf76c97317deff925d1ff73732ed5bab))
## [0.0.4](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.3...webdriver-bidi-protocol-v0.0.4) (2024-06-28)
### Bug Fixes
* update repository ([28cf911](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/28cf911e59ad5b177df47d04fc012d8c9cfe7fde))
## [0.0.3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.2...webdriver-bidi-protocol-v0.0.3) (2024-06-28)
### Bug Fixes
* add repository ([#19](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/19)) ([91def9d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/91def9dd0baeab3476e7154676e40d5a709da2c3))
## [0.0.2](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.1...webdriver-bidi-protocol-v0.0.2) (2024-06-28)
### Bug Fixes
* bump specs/webdriver-bidi from `05a283e` to `62b8dfe` ([#16](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/16)) ([51dac71](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/51dac71ca4ea2e4e85eee7ba82a6a8ac7ff584a4))
* document usage ([#7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/7)) ([d98a6ee](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d98a6ee23cbaa943440e2b40831a0c56aa0d6c18))
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2024 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+39
View File
@@ -0,0 +1,39 @@
# webdriver-bidi-protocol
This repository contains TypeScript types conforming to the [WebDriver
BiDi](https://w3c.github.io/webdriver-bidi/) specification. It also
supports WebDriver BiDi extension modules defined in other
specifications:
- [Permissions](https://w3c.github.io/permissions/#automation-webdriver-bidi)
- [Web Bluetooth](https://webbluetoothcg.github.io/web-bluetooth/#automated-testing)
## Installation
```
npm install webdriver-bidi-protocol
```
## Usage
In your TypeScript client implementation, you can now import WebDriver
BiDi types:
```ts
import {Commands} from 'webdriver-bidi-protocol';
async function sendCommand<T extends keyof Commands>(
method: T,
params: Commands[T]['params']
): {result: Commands[T]['returnType']} {
// Implementation for sending the data using WebSockets.
}
// Now TypeScript validates that the params match the spec for 'browsingContext.print'.
await sendCommand('browsingContext.print', {context: 'xxx'});
```
## Versioning
This package patch version will be incremented whenever there are
specification updates.
+3007
View File
@@ -0,0 +1,3007 @@
export type Command = {
id: JsUint;
} & CommandData &
Extensible;
export type CommandData =
| BrowserCommand
| BrowsingContextCommand
| EmulationCommand
| InputCommand
| NetworkCommand
| ScriptCommand
| SessionCommand
| StorageCommand
| WebExtensionCommand;
export type EmptyParams = Extensible;
export type Message = CommandResponse | ErrorResponse | Event;
export type CommandResponse = {
type: 'success';
id: JsUint;
result: ResultData;
} & Extensible;
export type ErrorResponse = {
type: 'error';
id: JsUint | null;
error: ErrorCode;
message: string;
stacktrace?: string;
} & Extensible;
export type ResultData =
| BrowserResult
| BrowsingContextResult
| EmulationResult
| InputResult
| NetworkResult
| ScriptResult
| SessionResult
| StorageResult
| WebExtensionResult;
export type EmptyResult = Extensible;
export type Event = {
type: 'event';
} & EventData &
Extensible;
export type EventData =
| BrowsingContextEvent
| InputEvent
| LogEvent
| NetworkEvent
| ScriptEvent;
export type Extensible = {
[key: string]: any;
};
/**
* Must be between `-9007199254740991` and `9007199254740991`, inclusive.
*/
export type JsInt = number;
/**
* Must be between `0` and `9007199254740991`, inclusive.
*/
export type JsUint = number;
export declare const enum ErrorCode {
InvalidArgument = 'invalid argument',
InvalidSelector = 'invalid selector',
InvalidSessionId = 'invalid session id',
InvalidWebExtension = 'invalid web extension',
MoveTargetOutOfBounds = 'move target out of bounds',
NoSuchAlert = 'no such alert',
NoSuchNetworkCollector = 'no such network collector',
NoSuchElement = 'no such element',
NoSuchFrame = 'no such frame',
NoSuchHandle = 'no such handle',
NoSuchHistoryEntry = 'no such history entry',
NoSuchIntercept = 'no such intercept',
NoSuchNetworkData = 'no such network data',
NoSuchNode = 'no such node',
NoSuchRequest = 'no such request',
NoSuchScript = 'no such script',
NoSuchStoragePartition = 'no such storage partition',
NoSuchUserContext = 'no such user context',
NoSuchWebExtension = 'no such web extension',
SessionNotCreated = 'session not created',
UnableToCaptureScreen = 'unable to capture screen',
UnableToCloseBrowser = 'unable to close browser',
UnableToSetCookie = 'unable to set cookie',
UnableToSetFileInput = 'unable to set file input',
UnavailableNetworkData = 'unavailable network data',
UnderspecifiedStoragePartition = 'underspecified storage partition',
UnknownCommand = 'unknown command',
UnknownError = 'unknown error',
UnsupportedOperation = 'unsupported operation',
}
export type SessionCommand =
| Session.End
| Session.New
| Session.Status
| Session.Subscribe
| Session.Unsubscribe;
export type SessionResult =
| Session.EndResult
| Session.NewResult
| Session.StatusResult
| Session.SubscribeResult
| Session.UnsubscribeResult;
export declare namespace Session {
type CapabilitiesRequest = {
alwaysMatch?: Session.CapabilityRequest;
firstMatch?: [...Session.CapabilityRequest[]];
};
}
export declare namespace Session {
type CapabilityRequest = {
acceptInsecureCerts?: boolean;
browserName?: string;
browserVersion?: string;
platformName?: string;
proxy?: Session.ProxyConfiguration;
unhandledPromptBehavior?: Session.UserPromptHandler;
} & Extensible;
}
export declare namespace Session {
type ProxyConfiguration =
| Session.AutodetectProxyConfiguration
| Session.DirectProxyConfiguration
| Session.ManualProxyConfiguration
| Session.PacProxyConfiguration
| Session.SystemProxyConfiguration;
}
export declare namespace Session {
type AutodetectProxyConfiguration = {
proxyType: 'autodetect';
} & Extensible;
}
export declare namespace Session {
type DirectProxyConfiguration = {
proxyType: 'direct';
} & Extensible;
}
export declare namespace Session {
type ManualProxyConfiguration = {
proxyType: 'manual';
httpProxy?: string;
sslProxy?: string;
} & ({} | Session.SocksProxyConfiguration) & {
noProxy?: [...string[]];
} & Extensible;
}
export declare namespace Session {
type SocksProxyConfiguration = {
socksProxy: string;
/**
* Must be between `0` and `255`, inclusive.
*/
socksVersion: number;
};
}
export declare namespace Session {
type PacProxyConfiguration = {
proxyType: 'pac';
proxyAutoconfigUrl: string;
} & Extensible;
}
export declare namespace Session {
type SystemProxyConfiguration = {
proxyType: 'system';
} & Extensible;
}
export declare namespace Session {
type UserPromptHandler = {
alert?: Session.UserPromptHandlerType;
beforeUnload?: Session.UserPromptHandlerType;
confirm?: Session.UserPromptHandlerType;
default?: Session.UserPromptHandlerType;
file?: Session.UserPromptHandlerType;
prompt?: Session.UserPromptHandlerType;
};
}
export declare namespace Session {
const enum UserPromptHandlerType {
Accept = 'accept',
Dismiss = 'dismiss',
Ignore = 'ignore',
}
}
export declare namespace Session {
type Subscription = string;
}
export declare namespace Session {
type SubscribeParameters = {
events: [string, ...string[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Session {
type UnsubscribeByIdRequest = {
subscriptions: [Session.Subscription, ...Session.Subscription[]];
};
}
export declare namespace Session {
type UnsubscribeByAttributesRequest = {
events: [string, ...string[]];
};
}
export declare namespace Session {
type Status = {
method: 'session.status';
params: EmptyParams;
};
}
export declare namespace Session {
type StatusResult = {
ready: boolean;
message: string;
};
}
export declare namespace Session {
type New = {
method: 'session.new';
params: Session.NewParameters;
};
}
export declare namespace Session {
type NewParameters = {
capabilities: Session.CapabilitiesRequest;
};
}
export declare namespace Session {
type NewResult = {
sessionId: string;
capabilities: {
acceptInsecureCerts: boolean;
browserName: string;
browserVersion: string;
platformName: string;
setWindowRect: boolean;
userAgent: string;
proxy?: Session.ProxyConfiguration;
unhandledPromptBehavior?: Session.UserPromptHandler;
webSocketUrl?: string;
} & Extensible;
};
}
export declare namespace Session {
type End = {
method: 'session.end';
params: EmptyParams;
};
}
export declare namespace Session {
type EndResult = EmptyResult;
}
export declare namespace Session {
type Subscribe = {
method: 'session.subscribe';
params: Session.SubscribeParameters;
};
}
export declare namespace Session {
type SubscribeResult = {
subscription: Session.Subscription;
};
}
export declare namespace Session {
type Unsubscribe = {
method: 'session.unsubscribe';
params: Session.UnsubscribeParameters;
};
}
export declare namespace Session {
type UnsubscribeParameters =
| Session.UnsubscribeByAttributesRequest
| Session.UnsubscribeByIdRequest;
}
export declare namespace Session {
type UnsubscribeResult = EmptyResult;
}
export type BrowserCommand =
| Browser.Close
| Browser.CreateUserContext
| Browser.GetClientWindows
| Browser.GetUserContexts
| Browser.RemoveUserContext
| Browser.SetClientWindowState
| Browser.SetDownloadBehavior;
export type BrowserResult =
| Browser.CloseResult
| Browser.CreateUserContextResult
| Browser.GetClientWindowsResult
| Browser.GetUserContextsResult
| Browser.RemoveUserContextResult
| Browser.SetClientWindowStateResult
| Browser.SetDownloadBehaviorResult;
export declare namespace Browser {
type ClientWindow = string;
}
export declare namespace Browser {
type ClientWindowInfo = {
active: boolean;
clientWindow: Browser.ClientWindow;
height: JsUint;
state: 'fullscreen' | 'maximized' | 'minimized' | 'normal';
width: JsUint;
x: JsInt;
y: JsInt;
};
}
export declare namespace Browser {
type UserContext = string;
}
export declare namespace Browser {
type UserContextInfo = {
userContext: Browser.UserContext;
};
}
export declare namespace Browser {
type Close = {
method: 'browser.close';
params: EmptyParams;
};
}
export declare namespace Browser {
type CloseResult = EmptyResult;
}
export declare namespace Browser {
type CreateUserContext = {
method: 'browser.createUserContext';
params: Browser.CreateUserContextParameters;
};
}
export declare namespace Browser {
type CreateUserContextParameters = {
acceptInsecureCerts?: boolean;
proxy?: Session.ProxyConfiguration;
unhandledPromptBehavior?: Session.UserPromptHandler;
};
}
export declare namespace Browser {
type CreateUserContextResult = Browser.UserContextInfo;
}
export declare namespace Browser {
type GetClientWindows = {
method: 'browser.getClientWindows';
params: EmptyParams;
};
}
export declare namespace Browser {
type GetClientWindowsResult = {
clientWindows: [...Browser.ClientWindowInfo[]];
};
}
export declare namespace Browser {
type GetUserContexts = {
method: 'browser.getUserContexts';
params: EmptyParams;
};
}
export declare namespace Browser {
type GetUserContextsResult = {
userContexts: [Browser.UserContextInfo, ...Browser.UserContextInfo[]];
};
}
export declare namespace Browser {
type RemoveUserContext = {
method: 'browser.removeUserContext';
params: Browser.RemoveUserContextParameters;
};
}
export declare namespace Browser {
type RemoveUserContextParameters = {
userContext: Browser.UserContext;
};
}
export declare namespace Browser {
type RemoveUserContextResult = EmptyResult;
}
export declare namespace Browser {
type SetClientWindowState = {
method: 'browser.setClientWindowState';
params: Browser.SetClientWindowStateParameters;
};
}
export declare namespace Browser {
type SetClientWindowStateParameters = {
clientWindow: Browser.ClientWindow;
} & (Browser.ClientWindowNamedState | Browser.ClientWindowRectState);
}
export declare namespace Browser {
type ClientWindowNamedState = {
state: 'fullscreen' | 'maximized' | 'minimized';
};
}
export declare namespace Browser {
type ClientWindowRectState = {
state: 'normal';
width?: JsUint;
height?: JsUint;
x?: JsInt;
y?: JsInt;
};
}
export declare namespace Browser {
type SetClientWindowStateResult = Browser.ClientWindowInfo;
}
export declare namespace Browser {
type SetDownloadBehavior = {
method: 'browser.setDownloadBehavior';
params: Browser.SetDownloadBehaviorParameters;
};
}
export declare namespace Browser {
type SetDownloadBehaviorParameters = {
downloadBehavior: Browser.DownloadBehavior | null;
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Browser {
type DownloadBehavior =
| Browser.DownloadBehaviorAllowed
| Browser.DownloadBehaviorDenied;
}
export declare namespace Browser {
type DownloadBehaviorAllowed = {
type: 'allowed';
destinationFolder: string;
};
}
export declare namespace Browser {
type DownloadBehaviorDenied = {
type: 'denied';
};
}
export declare namespace Browser {
type SetDownloadBehaviorResult = EmptyResult;
}
export type BrowsingContextCommand =
| BrowsingContext.Activate
| BrowsingContext.CaptureScreenshot
| BrowsingContext.Close
| BrowsingContext.Create
| BrowsingContext.GetTree
| BrowsingContext.HandleUserPrompt
| BrowsingContext.LocateNodes
| BrowsingContext.Navigate
| BrowsingContext.Print
| BrowsingContext.Reload
| BrowsingContext.SetViewport
| BrowsingContext.TraverseHistory;
export type BrowsingContextResult =
| BrowsingContext.ActivateResult
| BrowsingContext.CaptureScreenshotResult
| BrowsingContext.CloseResult
| BrowsingContext.CreateResult
| BrowsingContext.GetTreeResult
| BrowsingContext.HandleUserPromptResult
| BrowsingContext.LocateNodesResult
| BrowsingContext.NavigateResult
| BrowsingContext.PrintResult
| BrowsingContext.ReloadResult
| BrowsingContext.SetViewportResult
| BrowsingContext.TraverseHistoryResult;
export type BrowsingContextEvent =
| BrowsingContext.ContextCreated
| BrowsingContext.ContextDestroyed
| BrowsingContext.DomContentLoaded
| BrowsingContext.DownloadEnd
| BrowsingContext.DownloadWillBegin
| BrowsingContext.FragmentNavigated
| BrowsingContext.HistoryUpdated
| BrowsingContext.Load
| BrowsingContext.NavigationAborted
| BrowsingContext.NavigationCommitted
| BrowsingContext.NavigationFailed
| BrowsingContext.NavigationStarted
| BrowsingContext.UserPromptClosed
| BrowsingContext.UserPromptOpened;
export declare namespace BrowsingContext {
type BrowsingContext = string;
}
export declare namespace BrowsingContext {
type InfoList = [...BrowsingContext.Info[]];
}
export declare namespace BrowsingContext {
type Info = {
children: BrowsingContext.InfoList | null;
clientWindow: Browser.ClientWindow;
context: BrowsingContext.BrowsingContext;
originalOpener: BrowsingContext.BrowsingContext | null;
url: string;
userContext: Browser.UserContext;
parent?: BrowsingContext.BrowsingContext | null;
};
}
export declare namespace BrowsingContext {
type Locator =
| BrowsingContext.AccessibilityLocator
| BrowsingContext.CssLocator
| BrowsingContext.ContextLocator
| BrowsingContext.InnerTextLocator
| BrowsingContext.XPathLocator;
}
export declare namespace BrowsingContext {
type AccessibilityLocator = {
type: 'accessibility';
value: {
name?: string;
role?: string;
};
};
}
export declare namespace BrowsingContext {
type CssLocator = {
type: 'css';
value: string;
};
}
export declare namespace BrowsingContext {
type ContextLocator = {
type: 'context';
value: {
context: BrowsingContext.BrowsingContext;
};
};
}
export declare namespace BrowsingContext {
type InnerTextLocator = {
type: 'innerText';
value: string;
ignoreCase?: boolean;
matchType?: 'full' | 'partial';
maxDepth?: JsUint;
};
}
export declare namespace BrowsingContext {
type XPathLocator = {
type: 'xpath';
value: string;
};
}
export declare namespace BrowsingContext {
type Navigation = string;
}
export declare namespace BrowsingContext {
type BaseNavigationInfo = {
context: BrowsingContext.BrowsingContext;
navigation: BrowsingContext.Navigation | null;
timestamp: JsUint;
url: string;
userContext?: Browser.UserContext;
};
}
export declare namespace BrowsingContext {
type NavigationInfo = BrowsingContext.BaseNavigationInfo;
}
export declare namespace BrowsingContext {
const enum ReadinessState {
None = 'none',
Interactive = 'interactive',
Complete = 'complete',
}
}
export declare namespace BrowsingContext {
const enum UserPromptType {
Alert = 'alert',
Beforeunload = 'beforeunload',
Confirm = 'confirm',
Prompt = 'prompt',
}
}
export declare namespace BrowsingContext {
type Activate = {
method: 'browsingContext.activate';
params: BrowsingContext.ActivateParameters;
};
}
export declare namespace BrowsingContext {
type ActivateParameters = {
context: BrowsingContext.BrowsingContext;
};
}
export declare namespace BrowsingContext {
type ActivateResult = EmptyResult;
}
export declare namespace BrowsingContext {
type CaptureScreenshot = {
method: 'browsingContext.captureScreenshot';
params: BrowsingContext.CaptureScreenshotParameters;
};
}
export declare namespace BrowsingContext {
type CaptureScreenshotParameters = {
context: BrowsingContext.BrowsingContext;
/**
* @defaultValue `"viewport"`
*/
origin?: 'viewport' | 'document';
format?: BrowsingContext.ImageFormat;
clip?: BrowsingContext.ClipRectangle;
};
}
export declare namespace BrowsingContext {
type ImageFormat = {
type: string;
/**
* Must be between `0` and `1`, inclusive.
*/
quality?: number;
};
}
export declare namespace BrowsingContext {
type ClipRectangle =
| BrowsingContext.BoxClipRectangle
| BrowsingContext.ElementClipRectangle;
}
export declare namespace BrowsingContext {
type ElementClipRectangle = {
type: 'element';
element: Script.SharedReference;
};
}
export declare namespace BrowsingContext {
type BoxClipRectangle = {
type: 'box';
x: number;
y: number;
width: number;
height: number;
};
}
export declare namespace BrowsingContext {
type CaptureScreenshotResult = {
data: string;
};
}
export declare namespace BrowsingContext {
type Close = {
method: 'browsingContext.close';
params: BrowsingContext.CloseParameters;
};
}
export declare namespace BrowsingContext {
type CloseParameters = {
context: BrowsingContext.BrowsingContext;
/**
* @defaultValue `false`
*/
promptUnload?: boolean;
};
}
export declare namespace BrowsingContext {
type CloseResult = EmptyResult;
}
export declare namespace BrowsingContext {
type Create = {
method: 'browsingContext.create';
params: BrowsingContext.CreateParameters;
};
}
export declare namespace BrowsingContext {
const enum CreateType {
Tab = 'tab',
Window = 'window',
}
}
export declare namespace BrowsingContext {
type CreateParameters = {
type: BrowsingContext.CreateType;
referenceContext?: BrowsingContext.BrowsingContext;
/**
* @defaultValue `false`
*/
background?: boolean;
userContext?: Browser.UserContext;
};
}
export declare namespace BrowsingContext {
type CreateResult = {
context: BrowsingContext.BrowsingContext;
userContext?: Browser.UserContext;
};
}
export declare namespace BrowsingContext {
type GetTree = {
method: 'browsingContext.getTree';
params: BrowsingContext.GetTreeParameters;
};
}
export declare namespace BrowsingContext {
type GetTreeParameters = {
maxDepth?: JsUint;
root?: BrowsingContext.BrowsingContext;
};
}
export declare namespace BrowsingContext {
type GetTreeResult = {
contexts: BrowsingContext.InfoList;
};
}
export declare namespace BrowsingContext {
type HandleUserPrompt = {
method: 'browsingContext.handleUserPrompt';
params: BrowsingContext.HandleUserPromptParameters;
};
}
export declare namespace BrowsingContext {
type HandleUserPromptParameters = {
context: BrowsingContext.BrowsingContext;
accept?: boolean;
userText?: string;
};
}
export declare namespace BrowsingContext {
type HandleUserPromptResult = EmptyResult;
}
export declare namespace BrowsingContext {
type LocateNodes = {
method: 'browsingContext.locateNodes';
params: BrowsingContext.LocateNodesParameters;
};
}
export declare namespace BrowsingContext {
type LocateNodesParameters = {
context: BrowsingContext.BrowsingContext;
locator: BrowsingContext.Locator;
/**
* Must be greater than or equal to `1`.
*/
maxNodeCount?: JsUint;
serializationOptions?: Script.SerializationOptions;
startNodes?: [Script.SharedReference, ...Script.SharedReference[]];
};
}
export declare namespace BrowsingContext {
type LocateNodesResult = {
nodes: [...Script.NodeRemoteValue[]];
};
}
export declare namespace BrowsingContext {
type Navigate = {
method: 'browsingContext.navigate';
params: BrowsingContext.NavigateParameters;
};
}
export declare namespace BrowsingContext {
type NavigateParameters = {
context: BrowsingContext.BrowsingContext;
url: string;
wait?: BrowsingContext.ReadinessState;
};
}
export declare namespace BrowsingContext {
type NavigateResult = {
navigation: BrowsingContext.Navigation | null;
url: string;
};
}
export declare namespace BrowsingContext {
type Print = {
method: 'browsingContext.print';
params: BrowsingContext.PrintParameters;
};
}
export declare namespace BrowsingContext {
type PrintParameters = {
context: BrowsingContext.BrowsingContext;
/**
* @defaultValue `false`
*/
background?: boolean;
margin?: BrowsingContext.PrintMarginParameters;
/**
* @defaultValue `"portrait"`
*/
orientation?: 'portrait' | 'landscape';
page?: BrowsingContext.PrintPageParameters;
pageRanges?: [...(JsUint | string)[]];
/**
* Must be between `0.1` and `2`, inclusive.
*
* @defaultValue `1`
*/
scale?: number;
/**
* @defaultValue `true`
*/
shrinkToFit?: boolean;
};
}
export declare namespace BrowsingContext {
type PrintMarginParameters = {
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
bottom?: number;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
left?: number;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
right?: number;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
top?: number;
};
}
export declare namespace BrowsingContext {
type PrintPageParameters = {
/**
* Must be greater than or equal to `0.0352`.
*
* @defaultValue `27.94`
*/
height?: number;
/**
* Must be greater than or equal to `0.0352`.
*
* @defaultValue `21.59`
*/
width?: number;
};
}
export declare namespace BrowsingContext {
type PrintResult = {
data: string;
};
}
export declare namespace BrowsingContext {
type Reload = {
method: 'browsingContext.reload';
params: BrowsingContext.ReloadParameters;
};
}
export declare namespace BrowsingContext {
type ReloadParameters = {
context: BrowsingContext.BrowsingContext;
ignoreCache?: boolean;
wait?: BrowsingContext.ReadinessState;
};
}
export declare namespace BrowsingContext {
type ReloadResult = BrowsingContext.NavigateResult;
}
export declare namespace BrowsingContext {
type SetViewport = {
method: 'browsingContext.setViewport';
params: BrowsingContext.SetViewportParameters;
};
}
export declare namespace BrowsingContext {
type SetViewportParameters = {
context?: BrowsingContext.BrowsingContext;
viewport?: BrowsingContext.Viewport | null;
/**
* Must be greater than `0`.
*/
devicePixelRatio?: number | null;
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace BrowsingContext {
type Viewport = {
width: JsUint;
height: JsUint;
};
}
export declare namespace BrowsingContext {
type SetViewportResult = EmptyResult;
}
export declare namespace BrowsingContext {
type TraverseHistory = {
method: 'browsingContext.traverseHistory';
params: BrowsingContext.TraverseHistoryParameters;
};
}
export declare namespace BrowsingContext {
type TraverseHistoryParameters = {
context: BrowsingContext.BrowsingContext;
delta: JsInt;
};
}
export declare namespace BrowsingContext {
type TraverseHistoryResult = EmptyResult;
}
export declare namespace BrowsingContext {
type ContextCreated = {
method: 'browsingContext.contextCreated';
params: BrowsingContext.Info;
};
}
export declare namespace BrowsingContext {
type ContextDestroyed = {
method: 'browsingContext.contextDestroyed';
params: BrowsingContext.Info;
};
}
export declare namespace BrowsingContext {
type NavigationStarted = {
method: 'browsingContext.navigationStarted';
params: BrowsingContext.NavigationInfo;
};
}
export declare namespace BrowsingContext {
type FragmentNavigated = {
method: 'browsingContext.fragmentNavigated';
params: BrowsingContext.NavigationInfo;
};
}
export declare namespace BrowsingContext {
type HistoryUpdated = {
method: 'browsingContext.historyUpdated';
params: BrowsingContext.HistoryUpdatedParameters;
};
}
export declare namespace BrowsingContext {
type HistoryUpdatedParameters = {
context: BrowsingContext.BrowsingContext;
timestamp: JsUint;
url: string;
userContext?: Browser.UserContext;
};
}
export declare namespace BrowsingContext {
type DomContentLoaded = {
method: 'browsingContext.domContentLoaded';
params: BrowsingContext.NavigationInfo;
};
}
export declare namespace BrowsingContext {
type Load = {
method: 'browsingContext.load';
params: BrowsingContext.NavigationInfo;
};
}
export declare namespace BrowsingContext {
type DownloadWillBegin = {
method: 'browsingContext.downloadWillBegin';
params: BrowsingContext.DownloadWillBeginParams;
};
}
export declare namespace BrowsingContext {
type DownloadWillBeginParams = {
suggestedFilename: string;
} & BrowsingContext.BaseNavigationInfo;
}
export declare namespace BrowsingContext {
type DownloadEnd = {
method: 'browsingContext.downloadEnd';
params: BrowsingContext.DownloadEndParams;
};
}
export declare namespace BrowsingContext {
type DownloadEndParams =
| BrowsingContext.DownloadCanceledParams
| BrowsingContext.DownloadCompleteParams;
}
export declare namespace BrowsingContext {
type DownloadCanceledParams = {
status: 'canceled';
} & BrowsingContext.BaseNavigationInfo;
}
export declare namespace BrowsingContext {
type DownloadCompleteParams = {
status: 'complete';
filepath: string | null;
} & BrowsingContext.BaseNavigationInfo;
}
export declare namespace BrowsingContext {
type NavigationAborted = {
method: 'browsingContext.navigationAborted';
params: BrowsingContext.NavigationInfo;
};
}
export declare namespace BrowsingContext {
type NavigationCommitted = {
method: 'browsingContext.navigationCommitted';
params: BrowsingContext.NavigationInfo;
};
}
export declare namespace BrowsingContext {
type NavigationFailed = {
method: 'browsingContext.navigationFailed';
params: BrowsingContext.NavigationInfo;
};
}
export declare namespace BrowsingContext {
type UserPromptClosed = {
method: 'browsingContext.userPromptClosed';
params: BrowsingContext.UserPromptClosedParameters;
};
}
export declare namespace BrowsingContext {
type UserPromptClosedParameters = {
context: BrowsingContext.BrowsingContext;
accepted: boolean;
type: BrowsingContext.UserPromptType;
userContext?: Browser.UserContext;
userText?: string;
};
}
export declare namespace BrowsingContext {
type UserPromptOpened = {
method: 'browsingContext.userPromptOpened';
params: BrowsingContext.UserPromptOpenedParameters;
};
}
export declare namespace BrowsingContext {
type UserPromptOpenedParameters = {
context: BrowsingContext.BrowsingContext;
handler: Session.UserPromptHandlerType;
message: string;
type: BrowsingContext.UserPromptType;
userContext?: Browser.UserContext;
defaultValue?: string;
};
}
export type EmulationCommand =
| Emulation.SetForcedColorsModeThemeOverride
| Emulation.SetGeolocationOverride
| Emulation.SetLocaleOverride
| Emulation.SetNetworkConditions
| Emulation.SetScreenOrientationOverride
| Emulation.SetScreenSettingsOverride
| Emulation.SetScriptingEnabled
| Emulation.SetScrollbarTypeOverride
| Emulation.SetTimezoneOverride
| Emulation.SetTouchOverride
| Emulation.SetUserAgentOverride;
export type EmulationResult =
| Emulation.SetForcedColorsModeThemeOverrideResult
| Emulation.SetGeolocationOverrideResult
| Emulation.SetLocaleOverrideResult
| Emulation.SetScreenOrientationOverrideResult
| Emulation.SetScriptingEnabledResult
| Emulation.SetScrollbarTypeOverrideResult
| Emulation.SetTimezoneOverrideResult
| Emulation.SetTouchOverrideResult
| Emulation.SetUserAgentOverrideResult;
export declare namespace Emulation {
type SetForcedColorsModeThemeOverride = {
method: 'emulation.setForcedColorsModeThemeOverride';
params: Emulation.SetForcedColorsModeThemeOverrideParameters;
};
}
export declare namespace Emulation {
type SetForcedColorsModeThemeOverrideParameters = {
theme: Emulation.ForcedColorsModeTheme | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
const enum ForcedColorsModeTheme {
Light = 'light',
Dark = 'dark',
}
}
export declare namespace Emulation {
type SetForcedColorsModeThemeOverrideResult = EmptyResult;
}
export declare namespace Emulation {
type SetGeolocationOverride = {
method: 'emulation.setGeolocationOverride';
params: Emulation.SetGeolocationOverrideParameters;
};
}
export declare namespace Emulation {
type SetGeolocationOverrideParameters = (
| {
coordinates: Emulation.GeolocationCoordinates | null;
}
| {
error: Emulation.GeolocationPositionError;
}
) & {
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type GeolocationCoordinates = {
/**
* Must be between `-90` and `90`, inclusive.
*/
latitude: number;
/**
* Must be between `-180` and `180`, inclusive.
*/
longitude: number;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
accuracy?: number;
/**
* @defaultValue `null`
*/
altitude?: number | null;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `null`
*/
altitudeAccuracy?: number | null;
/**
* Must be between `0` and `360`.
*
* @defaultValue `null`
*/
heading?: number | null;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `null`
*/
speed?: number | null;
};
}
export declare namespace Emulation {
type GeolocationPositionError = {
type: 'positionUnavailable';
};
}
export declare namespace Emulation {
type SetGeolocationOverrideResult = EmptyResult;
}
export declare namespace Emulation {
type SetLocaleOverride = {
method: 'emulation.setLocaleOverride';
params: Emulation.SetLocaleOverrideParameters;
};
}
export declare namespace Emulation {
type SetLocaleOverrideParameters = {
locale: string | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type SetLocaleOverrideResult = EmptyResult;
}
export declare namespace Emulation {
type SetNetworkConditions = {
method: 'emulation.setNetworkConditions';
params: Emulation.SetNetworkConditionsParameters;
};
}
export declare namespace Emulation {
type SetNetworkConditionsParameters = {
networkConditions: Emulation.NetworkConditions | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type NetworkConditions = Emulation.NetworkConditionsOffline;
}
export declare namespace Emulation {
type NetworkConditionsOffline = {
type: 'offline';
};
}
export declare namespace Emulation {
type SetNetworkConditionsResult = EmptyResult;
}
export declare namespace Emulation {
type SetScreenSettingsOverride = {
method: 'emulation.setScreenSettingsOverride';
params: Emulation.SetScreenSettingsOverrideParameters;
};
}
export declare namespace Emulation {
type ScreenArea = {
width: JsUint;
height: JsUint;
};
}
export declare namespace Emulation {
type SetScreenSettingsOverrideParameters = {
screenArea: Emulation.ScreenArea | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type SetScreenSettingsOverrideResult = EmptyResult;
}
export declare namespace Emulation {
type SetScreenOrientationOverride = {
method: 'emulation.setScreenOrientationOverride';
params: Emulation.SetScreenOrientationOverrideParameters;
};
}
export declare namespace Emulation {
const enum ScreenOrientationNatural {
Portrait = 'portrait',
Landscape = 'landscape',
}
}
export declare namespace Emulation {
type ScreenOrientationType =
| 'portrait-primary'
| 'portrait-secondary'
| 'landscape-primary'
| 'landscape-secondary';
}
export declare namespace Emulation {
type ScreenOrientation = {
natural: Emulation.ScreenOrientationNatural;
type: Emulation.ScreenOrientationType;
};
}
export declare namespace Emulation {
type SetScreenOrientationOverrideParameters = {
screenOrientation: Emulation.ScreenOrientation | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type SetScreenOrientationOverrideResult = EmptyResult;
}
export declare namespace Emulation {
type SetUserAgentOverride = {
method: 'emulation.setUserAgentOverride';
params: Emulation.SetUserAgentOverrideParameters;
};
}
export declare namespace Emulation {
type SetUserAgentOverrideParameters = {
userAgent: string | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type SetUserAgentOverrideResult = EmptyResult;
}
export declare namespace Emulation {
type SetScriptingEnabled = {
method: 'emulation.setScriptingEnabled';
params: Emulation.SetScriptingEnabledParameters;
};
}
export declare namespace Emulation {
type SetScriptingEnabledParameters = {
enabled: false | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type SetScriptingEnabledResult = EmptyResult;
}
export declare namespace Emulation {
type SetScrollbarTypeOverride = {
method: 'emulation.setScrollbarTypeOverride';
params: Emulation.SetScrollbarTypeOverrideParameters;
};
}
export declare namespace Emulation {
type SetScrollbarTypeOverrideParameters = {
scrollbarType: 'classic' | 'overlay' | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type SetScrollbarTypeOverrideResult = EmptyResult;
}
export declare namespace Emulation {
type SetTimezoneOverride = {
method: 'emulation.setTimezoneOverride';
params: Emulation.SetTimezoneOverrideParameters;
};
}
export declare namespace Emulation {
type SetTimezoneOverrideParameters = {
timezone: string | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type SetTimezoneOverrideResult = EmptyResult;
}
export declare namespace Emulation {
type SetTouchOverride = {
method: 'emulation.setTouchOverride';
params: Emulation.SetTouchOverrideParameters;
};
}
export declare namespace Emulation {
type SetTouchOverrideParameters = {
/**
* Must be greater than or equal to `1`.
*/
maxTouchPoints: JsUint | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Emulation {
type SetTouchOverrideResult = EmptyResult;
}
export type NetworkCommand =
| Network.AddDataCollector
| Network.AddIntercept
| Network.ContinueRequest
| Network.ContinueResponse
| Network.ContinueWithAuth
| Network.DisownData
| Network.FailRequest
| Network.GetData
| Network.ProvideResponse
| Network.RemoveDataCollector
| Network.RemoveIntercept
| Network.SetCacheBehavior
| Network.SetExtraHeaders;
export type NetworkResult =
| Network.AddDataCollectorResult
| Network.AddInterceptResult
| Network.ContinueRequestResult
| Network.ContinueResponseResult
| Network.ContinueWithAuthResult
| Network.DisownDataResult
| Network.FailRequestResult
| Network.GetDataResult
| Network.ProvideResponseResult
| Network.RemoveDataCollectorResult
| Network.RemoveInterceptResult
| Network.SetCacheBehaviorResult
| Network.SetExtraHeadersResult;
export type NetworkEvent =
| Network.AuthRequired
| Network.BeforeRequestSent
| Network.FetchError
| Network.ResponseCompleted
| Network.ResponseStarted;
export declare namespace Network {
type AuthChallenge = {
scheme: string;
realm: string;
};
}
export declare namespace Network {
type AuthCredentials = {
type: 'password';
username: string;
password: string;
};
}
export declare namespace Network {
type BaseParameters = {
context: BrowsingContext.BrowsingContext | null;
isBlocked: boolean;
navigation: BrowsingContext.Navigation | null;
redirectCount: JsUint;
request: Network.RequestData;
timestamp: JsUint;
userContext?: Browser.UserContext | null;
intercepts?: [Network.Intercept, ...Network.Intercept[]];
};
}
export declare namespace Network {
type BytesValue = Network.StringValue | Network.Base64Value;
}
export declare namespace Network {
type StringValue = {
type: 'string';
value: string;
};
}
export declare namespace Network {
type Base64Value = {
type: 'base64';
value: string;
};
}
export declare namespace Network {
type Collector = string;
}
export declare namespace Network {
const enum CollectorType {
Blob = 'blob',
}
}
export declare namespace Network {
const enum SameSite {
Strict = 'strict',
Lax = 'lax',
None = 'none',
Default = 'default',
}
}
export declare namespace Network {
type Cookie = {
name: string;
value: Network.BytesValue;
domain: string;
path: string;
size: JsUint;
httpOnly: boolean;
secure: boolean;
sameSite: Network.SameSite;
expiry?: JsUint;
} & Extensible;
}
export declare namespace Network {
type CookieHeader = {
name: string;
value: Network.BytesValue;
};
}
export declare namespace Network {
const enum DataType {
Request = 'request',
Response = 'response',
}
}
export declare namespace Network {
type FetchTimingInfo = {
timeOrigin: number;
requestTime: number;
redirectStart: number;
redirectEnd: number;
fetchStart: number;
dnsStart: number;
dnsEnd: number;
connectStart: number;
connectEnd: number;
tlsStart: number;
requestStart: number;
responseStart: number;
responseEnd: number;
};
}
export declare namespace Network {
type Header = {
name: string;
value: Network.BytesValue;
};
}
export declare namespace Network {
type Initiator = {
columnNumber?: JsUint;
lineNumber?: JsUint;
request?: Network.Request;
stackTrace?: Script.StackTrace;
type?: 'parser' | 'script' | 'preflight' | 'other';
};
}
export declare namespace Network {
type Intercept = string;
}
export declare namespace Network {
type Request = string;
}
export declare namespace Network {
type RequestData = {
request: Network.Request;
url: string;
method: string;
headers: [...Network.Header[]];
cookies: [...Network.Cookie[]];
headersSize: JsUint;
bodySize: JsUint | null;
destination: string;
initiatorType: string | null;
timings: Network.FetchTimingInfo;
};
}
export declare namespace Network {
type ResponseContent = {
size: JsUint;
};
}
export declare namespace Network {
type ResponseData = {
url: string;
protocol: string;
status: JsUint;
statusText: string;
fromCache: boolean;
headers: [...Network.Header[]];
mimeType: string;
bytesReceived: JsUint;
headersSize: JsUint | null;
bodySize: JsUint | null;
content: Network.ResponseContent;
authChallenges?: [...Network.AuthChallenge[]];
};
}
export declare namespace Network {
type SetCookieHeader = {
name: string;
value: Network.BytesValue;
domain?: string;
httpOnly?: boolean;
expiry?: string;
maxAge?: JsInt;
path?: string;
sameSite?: Network.SameSite;
secure?: boolean;
};
}
export declare namespace Network {
type UrlPattern = Network.UrlPatternPattern | Network.UrlPatternString;
}
export declare namespace Network {
type UrlPatternPattern = {
type: 'pattern';
protocol?: string;
hostname?: string;
port?: string;
pathname?: string;
search?: string;
};
}
export declare namespace Network {
type UrlPatternString = {
type: 'string';
pattern: string;
};
}
export declare namespace Network {
type AddDataCollector = {
method: 'network.addDataCollector';
params: Network.AddDataCollectorParameters;
};
}
export declare namespace Network {
type AddDataCollectorParameters = {
dataTypes: [Network.DataType, ...Network.DataType[]];
maxEncodedDataSize: JsUint;
/**
* @defaultValue `"blob"`
*/
collectorType?: Network.CollectorType;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Network {
type AddDataCollectorResult = {
collector: Network.Collector;
};
}
export declare namespace Network {
type AddIntercept = {
method: 'network.addIntercept';
params: Network.AddInterceptParameters;
};
}
export declare namespace Network {
type AddInterceptParameters = {
phases: [Network.InterceptPhase, ...Network.InterceptPhase[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
urlPatterns?: [...Network.UrlPattern[]];
};
}
export declare namespace Network {
const enum InterceptPhase {
BeforeRequestSent = 'beforeRequestSent',
ResponseStarted = 'responseStarted',
AuthRequired = 'authRequired',
}
}
export declare namespace Network {
type AddInterceptResult = {
intercept: Network.Intercept;
};
}
export declare namespace Network {
type ContinueRequest = {
method: 'network.continueRequest';
params: Network.ContinueRequestParameters;
};
}
export declare namespace Network {
type ContinueRequestParameters = {
request: Network.Request;
body?: Network.BytesValue;
cookies?: [...Network.CookieHeader[]];
headers?: [...Network.Header[]];
method?: string;
url?: string;
};
}
export declare namespace Network {
type ContinueRequestResult = EmptyResult;
}
export declare namespace Network {
type ContinueResponse = {
method: 'network.continueResponse';
params: Network.ContinueResponseParameters;
};
}
export declare namespace Network {
type ContinueResponseParameters = {
request: Network.Request;
cookies?: [...Network.SetCookieHeader[]];
credentials?: Network.AuthCredentials;
headers?: [...Network.Header[]];
reasonPhrase?: string;
statusCode?: JsUint;
};
}
export declare namespace Network {
type ContinueResponseResult = EmptyResult;
}
export declare namespace Network {
type ContinueWithAuth = {
method: 'network.continueWithAuth';
params: Network.ContinueWithAuthParameters;
};
}
export declare namespace Network {
type ContinueWithAuthParameters = {
request: Network.Request;
} & (
| Network.ContinueWithAuthCredentials
| Network.ContinueWithAuthNoCredentials
);
}
export declare namespace Network {
type ContinueWithAuthCredentials = {
action: 'provideCredentials';
credentials: Network.AuthCredentials;
};
}
export declare namespace Network {
type ContinueWithAuthNoCredentials = {
action: 'default' | 'cancel';
};
}
export declare namespace Network {
type ContinueWithAuthResult = EmptyResult;
}
export declare namespace Network {
type DisownData = {
method: 'network.disownData';
params: Network.DisownDataParameters;
};
}
export declare namespace Network {
type DisownDataParameters = {
dataType: Network.DataType;
collector: Network.Collector;
request: Network.Request;
};
}
export declare namespace Network {
type DisownDataResult = EmptyResult;
}
export declare namespace Network {
type FailRequest = {
method: 'network.failRequest';
params: Network.FailRequestParameters;
};
}
export declare namespace Network {
type FailRequestParameters = {
request: Network.Request;
};
}
export declare namespace Network {
type FailRequestResult = EmptyResult;
}
export declare namespace Network {
type GetData = {
method: 'network.getData';
params: Network.GetDataParameters;
};
}
export declare namespace Network {
type GetDataParameters = {
dataType: Network.DataType;
collector?: Network.Collector;
/**
* @defaultValue `false`
*/
disown?: boolean;
request: Network.Request;
};
}
export declare namespace Network {
type GetDataResult = {
bytes: Network.BytesValue;
};
}
export declare namespace Network {
type ProvideResponse = {
method: 'network.provideResponse';
params: Network.ProvideResponseParameters;
};
}
export declare namespace Network {
type ProvideResponseParameters = {
request: Network.Request;
body?: Network.BytesValue;
cookies?: [...Network.SetCookieHeader[]];
headers?: [...Network.Header[]];
reasonPhrase?: string;
statusCode?: JsUint;
};
}
export declare namespace Network {
type ProvideResponseResult = EmptyResult;
}
export declare namespace Network {
type RemoveDataCollector = {
method: 'network.removeDataCollector';
params: Network.RemoveDataCollectorParameters;
};
}
export declare namespace Network {
type RemoveDataCollectorParameters = {
collector: Network.Collector;
};
}
export declare namespace Network {
type RemoveDataCollectorResult = EmptyResult;
}
export declare namespace Network {
type RemoveIntercept = {
method: 'network.removeIntercept';
params: Network.RemoveInterceptParameters;
};
}
export declare namespace Network {
type RemoveInterceptParameters = {
intercept: Network.Intercept;
};
}
export declare namespace Network {
type RemoveInterceptResult = EmptyResult;
}
export declare namespace Network {
type SetCacheBehavior = {
method: 'network.setCacheBehavior';
params: Network.SetCacheBehaviorParameters;
};
}
export declare namespace Network {
type SetCacheBehaviorParameters = {
cacheBehavior: 'default' | 'bypass';
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
};
}
export declare namespace Network {
type SetCacheBehaviorResult = EmptyResult;
}
export declare namespace Network {
type SetExtraHeaders = {
method: 'network.setExtraHeaders';
params: Network.SetExtraHeadersParameters;
};
}
export declare namespace Network {
type SetExtraHeadersParameters = {
headers: [...Network.Header[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export declare namespace Network {
type SetExtraHeadersResult = EmptyResult;
}
export declare namespace Network {
type AuthRequired = {
method: 'network.authRequired';
params: Network.AuthRequiredParameters;
};
}
export declare namespace Network {
type AuthRequiredParameters = Network.BaseParameters & {
response: Network.ResponseData;
};
}
export declare namespace Network {
type BeforeRequestSent = {
method: 'network.beforeRequestSent';
params: Network.BeforeRequestSentParameters;
};
}
export declare namespace Network {
type BeforeRequestSentParameters = Network.BaseParameters & {
initiator?: Network.Initiator;
};
}
export declare namespace Network {
type FetchError = {
method: 'network.fetchError';
params: Network.FetchErrorParameters;
};
}
export declare namespace Network {
type FetchErrorParameters = Network.BaseParameters & {
errorText: string;
};
}
export declare namespace Network {
type ResponseCompleted = {
method: 'network.responseCompleted';
params: Network.ResponseCompletedParameters;
};
}
export declare namespace Network {
type ResponseCompletedParameters = Network.BaseParameters & {
response: Network.ResponseData;
};
}
export declare namespace Network {
type ResponseStarted = {
method: 'network.responseStarted';
params: Network.ResponseStartedParameters;
};
}
export declare namespace Network {
type ResponseStartedParameters = Network.BaseParameters & {
response: Network.ResponseData;
};
}
export type ScriptCommand =
| Script.AddPreloadScript
| Script.CallFunction
| Script.Disown
| Script.Evaluate
| Script.GetRealms
| Script.RemovePreloadScript;
export type ScriptResult =
| Script.AddPreloadScriptResult
| Script.CallFunctionResult
| Script.DisownResult
| Script.EvaluateResult
| Script.GetRealmsResult
| Script.RemovePreloadScriptResult;
export type ScriptEvent =
| Script.Message
| Script.RealmCreated
| Script.RealmDestroyed;
export declare namespace Script {
type Channel = string;
}
export declare namespace Script {
type ChannelValue = {
type: 'channel';
value: Script.ChannelProperties;
};
}
export declare namespace Script {
type ChannelProperties = {
channel: Script.Channel;
serializationOptions?: Script.SerializationOptions;
ownership?: Script.ResultOwnership;
};
}
export declare namespace Script {
type EvaluateResult =
| Script.EvaluateResultSuccess
| Script.EvaluateResultException;
}
export declare namespace Script {
type EvaluateResultSuccess = {
type: 'success';
result: Script.RemoteValue;
realm: Script.Realm;
};
}
export declare namespace Script {
type EvaluateResultException = {
type: 'exception';
exceptionDetails: Script.ExceptionDetails;
realm: Script.Realm;
};
}
export declare namespace Script {
type ExceptionDetails = {
columnNumber: JsUint;
exception: Script.RemoteValue;
lineNumber: JsUint;
stackTrace: Script.StackTrace;
text: string;
};
}
export declare namespace Script {
type Handle = string;
}
export declare namespace Script {
type InternalId = string;
}
export declare namespace Script {
type LocalValue =
| Script.RemoteReference
| Script.PrimitiveProtocolValue
| Script.ChannelValue
| Script.ArrayLocalValue
| Script.DateLocalValue
| Script.MapLocalValue
| Script.ObjectLocalValue
| Script.RegExpLocalValue
| Script.SetLocalValue;
}
export declare namespace Script {
type ListLocalValue = [...Script.LocalValue[]];
}
export declare namespace Script {
type ArrayLocalValue = {
type: 'array';
value: Script.ListLocalValue;
};
}
export declare namespace Script {
type DateLocalValue = {
type: 'date';
value: string;
};
}
export declare namespace Script {
type MappingLocalValue = [
...[Script.LocalValue | string, Script.LocalValue][],
];
}
export declare namespace Script {
type MapLocalValue = {
type: 'map';
value: Script.MappingLocalValue;
};
}
export declare namespace Script {
type ObjectLocalValue = {
type: 'object';
value: Script.MappingLocalValue;
};
}
export declare namespace Script {
type RegExpValue = {
pattern: string;
flags?: string;
};
}
export declare namespace Script {
type RegExpLocalValue = {
type: 'regexp';
value: Script.RegExpValue;
};
}
export declare namespace Script {
type SetLocalValue = {
type: 'set';
value: Script.ListLocalValue;
};
}
export declare namespace Script {
type PreloadScript = string;
}
export declare namespace Script {
type Realm = string;
}
export declare namespace Script {
type PrimitiveProtocolValue =
| Script.UndefinedValue
| Script.NullValue
| Script.StringValue
| Script.NumberValue
| Script.BooleanValue
| Script.BigIntValue;
}
export declare namespace Script {
type UndefinedValue = {
type: 'undefined';
};
}
export declare namespace Script {
type NullValue = {
type: 'null';
};
}
export declare namespace Script {
type StringValue = {
type: 'string';
value: string;
};
}
export declare namespace Script {
type SpecialNumber = 'NaN' | '-0' | 'Infinity' | '-Infinity';
}
export declare namespace Script {
type NumberValue = {
type: 'number';
value: number | Script.SpecialNumber;
};
}
export declare namespace Script {
type BooleanValue = {
type: 'boolean';
value: boolean;
};
}
export declare namespace Script {
type BigIntValue = {
type: 'bigint';
value: string;
};
}
export declare namespace Script {
type RealmInfo =
| Script.WindowRealmInfo
| Script.DedicatedWorkerRealmInfo
| Script.SharedWorkerRealmInfo
| Script.ServiceWorkerRealmInfo
| Script.WorkerRealmInfo
| Script.PaintWorkletRealmInfo
| Script.AudioWorkletRealmInfo
| Script.WorkletRealmInfo;
}
export declare namespace Script {
type BaseRealmInfo = {
realm: Script.Realm;
origin: string;
};
}
export declare namespace Script {
type WindowRealmInfo = Script.BaseRealmInfo & {
type: 'window';
context: BrowsingContext.BrowsingContext;
userContext?: Browser.UserContext;
sandbox?: string;
};
}
export declare namespace Script {
type DedicatedWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'dedicated-worker';
owners: [Script.Realm];
};
}
export declare namespace Script {
type SharedWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'shared-worker';
};
}
export declare namespace Script {
type ServiceWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'service-worker';
};
}
export declare namespace Script {
type WorkerRealmInfo = Script.BaseRealmInfo & {
type: 'worker';
};
}
export declare namespace Script {
type PaintWorkletRealmInfo = Script.BaseRealmInfo & {
type: 'paint-worklet';
};
}
export declare namespace Script {
type AudioWorkletRealmInfo = Script.BaseRealmInfo & {
type: 'audio-worklet';
};
}
export declare namespace Script {
type WorkletRealmInfo = Script.BaseRealmInfo & {
type: 'worklet';
};
}
export declare namespace Script {
type RealmType =
| 'window'
| 'dedicated-worker'
| 'shared-worker'
| 'service-worker'
| 'worker'
| 'paint-worklet'
| 'audio-worklet'
| 'worklet';
}
export declare namespace Script {
type RemoteReference = Script.SharedReference | Script.RemoteObjectReference;
}
export declare namespace Script {
type SharedReference = {
sharedId: Script.SharedId;
handle?: Script.Handle;
} & Extensible;
}
export declare namespace Script {
type RemoteObjectReference = {
handle: Script.Handle;
sharedId?: Script.SharedId;
} & Extensible;
}
export declare namespace Script {
type RemoteValue =
| Script.PrimitiveProtocolValue
| Script.SymbolRemoteValue
| Script.ArrayRemoteValue
| Script.ObjectRemoteValue
| Script.FunctionRemoteValue
| Script.RegExpRemoteValue
| Script.DateRemoteValue
| Script.MapRemoteValue
| Script.SetRemoteValue
| Script.WeakMapRemoteValue
| Script.WeakSetRemoteValue
| Script.GeneratorRemoteValue
| Script.ErrorRemoteValue
| Script.ProxyRemoteValue
| Script.PromiseRemoteValue
| Script.TypedArrayRemoteValue
| Script.ArrayBufferRemoteValue
| Script.NodeListRemoteValue
| Script.HtmlCollectionRemoteValue
| Script.NodeRemoteValue
| Script.WindowProxyRemoteValue;
}
export declare namespace Script {
type ListRemoteValue = [...Script.RemoteValue[]];
}
export declare namespace Script {
type MappingRemoteValue = [
...[Script.RemoteValue | string, Script.RemoteValue][],
];
}
export declare namespace Script {
type SymbolRemoteValue = {
type: 'symbol';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type ArrayRemoteValue = {
type: 'array';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.ListRemoteValue;
};
}
export declare namespace Script {
type ObjectRemoteValue = {
type: 'object';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.MappingRemoteValue;
};
}
export declare namespace Script {
type FunctionRemoteValue = {
type: 'function';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type RegExpRemoteValue = Script.RegExpLocalValue & {
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type DateRemoteValue = Script.DateLocalValue & {
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type MapRemoteValue = {
type: 'map';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.MappingRemoteValue;
};
}
export declare namespace Script {
type SetRemoteValue = {
type: 'set';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.ListRemoteValue;
};
}
export declare namespace Script {
type WeakMapRemoteValue = {
type: 'weakmap';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type WeakSetRemoteValue = {
type: 'weakset';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type GeneratorRemoteValue = {
type: 'generator';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type ErrorRemoteValue = {
type: 'error';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type ProxyRemoteValue = {
type: 'proxy';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type PromiseRemoteValue = {
type: 'promise';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type TypedArrayRemoteValue = {
type: 'typedarray';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type ArrayBufferRemoteValue = {
type: 'arraybuffer';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type NodeListRemoteValue = {
type: 'nodelist';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.ListRemoteValue;
};
}
export declare namespace Script {
type HtmlCollectionRemoteValue = {
type: 'htmlcollection';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.ListRemoteValue;
};
}
export declare namespace Script {
type NodeRemoteValue = {
type: 'node';
sharedId?: Script.SharedId;
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.NodeProperties;
};
}
export declare namespace Script {
type NodeProperties = {
nodeType: JsUint;
childNodeCount: JsUint;
attributes?: {
[key: string]: string;
};
children?: [...Script.NodeRemoteValue[]];
localName?: string;
mode?: 'open' | 'closed';
namespaceURI?: string;
nodeValue?: string;
shadowRoot?: Script.NodeRemoteValue | null;
};
}
export declare namespace Script {
type WindowProxyRemoteValue = {
type: 'window';
value: Script.WindowProxyProperties;
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export declare namespace Script {
type WindowProxyProperties = {
context: BrowsingContext.BrowsingContext;
};
}
export declare namespace Script {
const enum ResultOwnership {
Root = 'root',
None = 'none',
}
}
export declare namespace Script {
type SerializationOptions = {
/**
* @defaultValue `0`
*/
maxDomDepth?: JsUint | null;
/**
* @defaultValue `null`
*/
maxObjectDepth?: JsUint | null;
/**
* @defaultValue `"none"`
*/
includeShadowTree?: 'none' | 'open' | 'all';
};
}
export declare namespace Script {
type SharedId = string;
}
export declare namespace Script {
type StackFrame = {
columnNumber: JsUint;
functionName: string;
lineNumber: JsUint;
url: string;
};
}
export declare namespace Script {
type StackTrace = {
callFrames: [...Script.StackFrame[]];
};
}
export declare namespace Script {
type Source = {
realm: Script.Realm;
context?: BrowsingContext.BrowsingContext;
userContext?: Browser.UserContext;
};
}
export declare namespace Script {
type RealmTarget = {
realm: Script.Realm;
};
}
export declare namespace Script {
type ContextTarget = {
context: BrowsingContext.BrowsingContext;
sandbox?: string;
};
}
export declare namespace Script {
type Target = Script.ContextTarget | Script.RealmTarget;
}
export declare namespace Script {
type AddPreloadScript = {
method: 'script.addPreloadScript';
params: Script.AddPreloadScriptParameters;
};
}
export declare namespace Script {
type AddPreloadScriptParameters = {
functionDeclaration: string;
arguments?: [...Script.ChannelValue[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
sandbox?: string;
};
}
export declare namespace Script {
type AddPreloadScriptResult = {
script: Script.PreloadScript;
};
}
export declare namespace Script {
type Disown = {
method: 'script.disown';
params: Script.DisownParameters;
};
}
export declare namespace Script {
type DisownParameters = {
handles: [...Script.Handle[]];
target: Script.Target;
};
}
export declare namespace Script {
type DisownResult = EmptyResult;
}
export declare namespace Script {
type CallFunction = {
method: 'script.callFunction';
params: Script.CallFunctionParameters;
};
}
export declare namespace Script {
type CallFunctionParameters = {
functionDeclaration: string;
awaitPromise: boolean;
target: Script.Target;
arguments?: [...Script.LocalValue[]];
resultOwnership?: Script.ResultOwnership;
serializationOptions?: Script.SerializationOptions;
this?: Script.LocalValue;
/**
* @defaultValue `false`
*/
userActivation?: boolean;
};
}
export declare namespace Script {
type CallFunctionResult = Script.EvaluateResult;
}
export declare namespace Script {
type Evaluate = {
method: 'script.evaluate';
params: Script.EvaluateParameters;
};
}
export declare namespace Script {
type EvaluateParameters = {
expression: string;
target: Script.Target;
awaitPromise: boolean;
resultOwnership?: Script.ResultOwnership;
serializationOptions?: Script.SerializationOptions;
/**
* @defaultValue `false`
*/
userActivation?: boolean;
};
}
export declare namespace Script {
type GetRealms = {
method: 'script.getRealms';
params: Script.GetRealmsParameters;
};
}
export declare namespace Script {
type GetRealmsParameters = {
context?: BrowsingContext.BrowsingContext;
type?: Script.RealmType;
};
}
export declare namespace Script {
type GetRealmsResult = {
realms: [...Script.RealmInfo[]];
};
}
export declare namespace Script {
type RemovePreloadScript = {
method: 'script.removePreloadScript';
params: Script.RemovePreloadScriptParameters;
};
}
export declare namespace Script {
type RemovePreloadScriptParameters = {
script: Script.PreloadScript;
};
}
export declare namespace Script {
type RemovePreloadScriptResult = EmptyResult;
}
export declare namespace Script {
type Message = {
method: 'script.message';
params: Script.MessageParameters;
};
}
export declare namespace Script {
type MessageParameters = {
channel: Script.Channel;
data: Script.RemoteValue;
source: Script.Source;
};
}
export declare namespace Script {
type RealmCreated = {
method: 'script.realmCreated';
params: Script.RealmInfo;
};
}
export declare namespace Script {
type RealmDestroyed = {
method: 'script.realmDestroyed';
params: Script.RealmDestroyedParameters;
};
}
export declare namespace Script {
type RealmDestroyedParameters = {
realm: Script.Realm;
};
}
export type StorageCommand =
| Storage.DeleteCookies
| Storage.GetCookies
| Storage.SetCookie;
export type StorageResult =
| Storage.DeleteCookiesResult
| Storage.GetCookiesResult
| Storage.SetCookieResult;
export declare namespace Storage {
type PartitionKey = {
userContext?: string;
sourceOrigin?: string;
} & Extensible;
}
export declare namespace Storage {
type GetCookies = {
method: 'storage.getCookies';
params: Storage.GetCookiesParameters;
};
}
export declare namespace Storage {
type CookieFilter = {
name?: string;
value?: Network.BytesValue;
domain?: string;
path?: string;
size?: JsUint;
httpOnly?: boolean;
secure?: boolean;
sameSite?: Network.SameSite;
expiry?: JsUint;
} & Extensible;
}
export declare namespace Storage {
type BrowsingContextPartitionDescriptor = {
type: 'context';
context: BrowsingContext.BrowsingContext;
};
}
export declare namespace Storage {
type StorageKeyPartitionDescriptor = {
type: 'storageKey';
userContext?: string;
sourceOrigin?: string;
} & Extensible;
}
export declare namespace Storage {
type PartitionDescriptor =
| Storage.BrowsingContextPartitionDescriptor
| Storage.StorageKeyPartitionDescriptor;
}
export declare namespace Storage {
type GetCookiesParameters = {
filter?: Storage.CookieFilter;
partition?: Storage.PartitionDescriptor;
};
}
export declare namespace Storage {
type GetCookiesResult = {
cookies: [...Network.Cookie[]];
partitionKey: Storage.PartitionKey;
};
}
export declare namespace Storage {
type SetCookie = {
method: 'storage.setCookie';
params: Storage.SetCookieParameters;
};
}
export declare namespace Storage {
type PartialCookie = {
name: string;
value: Network.BytesValue;
domain: string;
path?: string;
httpOnly?: boolean;
secure?: boolean;
sameSite?: Network.SameSite;
expiry?: JsUint;
} & Extensible;
}
export declare namespace Storage {
type SetCookieParameters = {
cookie: Storage.PartialCookie;
partition?: Storage.PartitionDescriptor;
};
}
export declare namespace Storage {
type SetCookieResult = {
partitionKey: Storage.PartitionKey;
};
}
export declare namespace Storage {
type DeleteCookies = {
method: 'storage.deleteCookies';
params: Storage.DeleteCookiesParameters;
};
}
export declare namespace Storage {
type DeleteCookiesParameters = {
filter?: Storage.CookieFilter;
partition?: Storage.PartitionDescriptor;
};
}
export declare namespace Storage {
type DeleteCookiesResult = {
partitionKey: Storage.PartitionKey;
};
}
export type LogEvent = Log.EntryAdded;
export declare namespace Log {
const enum Level {
Debug = 'debug',
Info = 'info',
Warn = 'warn',
Error = 'error',
}
}
export declare namespace Log {
type Entry =
| Log.GenericLogEntry
| Log.ConsoleLogEntry
| Log.JavascriptLogEntry;
}
export declare namespace Log {
type BaseLogEntry = {
level: Log.Level;
source: Script.Source;
text: string | null;
timestamp: JsUint;
stackTrace?: Script.StackTrace;
};
}
export declare namespace Log {
type GenericLogEntry = Log.BaseLogEntry & {
type: string;
};
}
export declare namespace Log {
type ConsoleLogEntry = Log.BaseLogEntry & {
type: 'console';
method: string;
args: [...Script.RemoteValue[]];
};
}
export declare namespace Log {
type JavascriptLogEntry = Log.BaseLogEntry & {
type: 'javascript';
};
}
export declare namespace Log {
type EntryAdded = {
method: 'log.entryAdded';
params: Log.Entry;
};
}
export type InputCommand =
| Input.PerformActions
| Input.ReleaseActions
| Input.SetFiles;
export type InputResult =
| Input.PerformActionsResult
| Input.ReleaseActionsResult
| Input.SetFilesResult;
export type InputEvent = Input.FileDialogOpened;
export declare namespace Input {
type ElementOrigin = {
type: 'element';
element: Script.SharedReference;
};
}
export declare namespace Input {
type PerformActions = {
method: 'input.performActions';
params: Input.PerformActionsParameters;
};
}
export declare namespace Input {
type PerformActionsParameters = {
context: BrowsingContext.BrowsingContext;
actions: [...Input.SourceActions[]];
};
}
export declare namespace Input {
type SourceActions =
| Input.NoneSourceActions
| Input.KeySourceActions
| Input.PointerSourceActions
| Input.WheelSourceActions;
}
export declare namespace Input {
type NoneSourceActions = {
type: 'none';
id: string;
actions: [...Input.NoneSourceAction[]];
};
}
export declare namespace Input {
type NoneSourceAction = Input.PauseAction;
}
export declare namespace Input {
type KeySourceActions = {
type: 'key';
id: string;
actions: [...Input.KeySourceAction[]];
};
}
export declare namespace Input {
type KeySourceAction =
| Input.PauseAction
| Input.KeyDownAction
| Input.KeyUpAction;
}
export declare namespace Input {
type PointerSourceActions = {
type: 'pointer';
id: string;
parameters?: Input.PointerParameters;
actions: [...Input.PointerSourceAction[]];
};
}
export declare namespace Input {
const enum PointerType {
Mouse = 'mouse',
Pen = 'pen',
Touch = 'touch',
}
}
export declare namespace Input {
type PointerParameters = {
/**
* @defaultValue `"mouse"`
*/
pointerType?: Input.PointerType;
};
}
export declare namespace Input {
type PointerSourceAction =
| Input.PauseAction
| Input.PointerDownAction
| Input.PointerUpAction
| Input.PointerMoveAction;
}
export declare namespace Input {
type WheelSourceActions = {
type: 'wheel';
id: string;
actions: [...Input.WheelSourceAction[]];
};
}
export declare namespace Input {
type WheelSourceAction = Input.PauseAction | Input.WheelScrollAction;
}
export declare namespace Input {
type PauseAction = {
type: 'pause';
duration?: JsUint;
};
}
export declare namespace Input {
type KeyDownAction = {
type: 'keyDown';
value: string;
};
}
export declare namespace Input {
type KeyUpAction = {
type: 'keyUp';
value: string;
};
}
export declare namespace Input {
type PointerUpAction = {
type: 'pointerUp';
button: JsUint;
};
}
export declare namespace Input {
type PointerDownAction = {
type: 'pointerDown';
button: JsUint;
} & Input.PointerCommonProperties;
}
export declare namespace Input {
type PointerMoveAction = {
type: 'pointerMove';
x: number;
y: number;
duration?: JsUint;
origin?: Input.Origin;
} & Input.PointerCommonProperties;
}
export declare namespace Input {
type WheelScrollAction = {
type: 'scroll';
x: JsInt;
y: JsInt;
deltaX: JsInt;
deltaY: JsInt;
duration?: JsUint;
/**
* @defaultValue `"viewport"`
*/
origin?: Input.Origin;
};
}
export declare namespace Input {
type PointerCommonProperties = {
/**
* @defaultValue `1`
*/
width?: JsUint;
/**
* @defaultValue `1`
*/
height?: JsUint;
/**
* @defaultValue `0`
*/
pressure?: number;
/**
* @defaultValue `0`
*/
tangentialPressure?: number;
/**
* Must be between `0` and `359`, inclusive.
*
* @defaultValue `0`
*/
twist?: number;
/**
* Must be between `0` and `1.5707963267948966`, inclusive.
*
* @defaultValue `0`
*/
altitudeAngle?: number;
/**
* Must be between `0` and `6.283185307179586`, inclusive.
*
* @defaultValue `0`
*/
azimuthAngle?: number;
};
}
export declare namespace Input {
type Origin = 'viewport' | 'pointer' | Input.ElementOrigin;
}
export declare namespace Input {
type PerformActionsResult = EmptyResult;
}
export declare namespace Input {
type ReleaseActions = {
method: 'input.releaseActions';
params: Input.ReleaseActionsParameters;
};
}
export declare namespace Input {
type ReleaseActionsParameters = {
context: BrowsingContext.BrowsingContext;
};
}
export declare namespace Input {
type ReleaseActionsResult = EmptyResult;
}
export declare namespace Input {
type SetFiles = {
method: 'input.setFiles';
params: Input.SetFilesParameters;
};
}
export declare namespace Input {
type SetFilesParameters = {
context: BrowsingContext.BrowsingContext;
element: Script.SharedReference;
files: [...string[]];
};
}
export declare namespace Input {
type SetFilesResult = EmptyResult;
}
export declare namespace Input {
type FileDialogOpened = {
method: 'input.fileDialogOpened';
params: Input.FileDialogInfo;
};
}
export declare namespace Input {
type FileDialogInfo = {
context: BrowsingContext.BrowsingContext;
userContext?: Browser.UserContext;
element?: Script.SharedReference;
multiple: boolean;
};
}
export type WebExtensionCommand = WebExtension.Install | WebExtension.Uninstall;
export type WebExtensionResult =
| WebExtension.InstallResult
| WebExtension.UninstallResult;
export declare namespace WebExtension {
type Extension = string;
}
export declare namespace WebExtension {
type Install = {
method: 'webExtension.install';
params: WebExtension.InstallParameters;
};
}
export declare namespace WebExtension {
type InstallParameters = {
extensionData: WebExtension.ExtensionData;
};
}
export declare namespace WebExtension {
type ExtensionData =
| WebExtension.ExtensionArchivePath
| WebExtension.ExtensionBase64Encoded
| WebExtension.ExtensionPath;
}
export declare namespace WebExtension {
type ExtensionPath = {
type: 'path';
path: string;
};
}
export declare namespace WebExtension {
type ExtensionArchivePath = {
type: 'archivePath';
path: string;
};
}
export declare namespace WebExtension {
type ExtensionBase64Encoded = {
type: 'base64';
value: string;
};
}
export declare namespace WebExtension {
type InstallResult = {
extension: WebExtension.Extension;
};
}
export declare namespace WebExtension {
type Uninstall = {
method: 'webExtension.uninstall';
params: WebExtension.UninstallParameters;
};
}
export declare namespace WebExtension {
type UninstallParameters = {
extension: WebExtension.Extension;
};
}
export declare namespace WebExtension {
type UninstallResult = EmptyResult;
}
+2
View File
@@ -0,0 +1,2 @@
'use strict';
Object.defineProperty(exports, '__esModule', {value: true});
+314
View File
@@ -0,0 +1,314 @@
import type * as Bidi from './main.js';
import type * as BidiPermissions from './permissions.js';
import type * as BidiBluetooth from './web-bluetooth.js';
import type * as BidiUaClientHints from './ua-client-hints.js';
export interface Commands {
'bluetooth.disableSimulation': {
params: BidiBluetooth.Bluetooth.DisableSimulationParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.handleRequestDevicePrompt': {
params: BidiBluetooth.Bluetooth.HandleRequestDevicePromptParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateAdapter': {
params: BidiBluetooth.Bluetooth.SimulateAdapterParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateAdvertisement': {
params: BidiBluetooth.Bluetooth.SimulateAdvertisementParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateCharacteristic': {
params: BidiBluetooth.Bluetooth.SimulateCharacteristicParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateCharacteristicResponse': {
params: BidiBluetooth.Bluetooth.SimulateCharacteristicResponseParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateDescriptor': {
params: BidiBluetooth.Bluetooth.SimulateDescriptorParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateDescriptorResponse': {
params: BidiBluetooth.Bluetooth.SimulateDescriptorResponseParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateGattConnectionResponse': {
params: BidiBluetooth.Bluetooth.SimulateGattConnectionResponseParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateGattDisconnection': {
params: BidiBluetooth.Bluetooth.SimulateGattDisconnectionParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulatePreconnectedPeripheral': {
params: BidiBluetooth.Bluetooth.SimulatePreconnectedPeripheralParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateService': {
params: BidiBluetooth.Bluetooth.SimulateServiceParameters;
returnType: Bidi.EmptyResult;
};
'browser.close': {
params: Bidi.Extensible;
returnType: Bidi.Browser.CloseResult;
};
'browser.createUserContext': {
params: Bidi.Browser.CreateUserContextParameters;
returnType: Bidi.Browser.CreateUserContextResult;
};
'browser.getClientWindows': {
params: Bidi.Extensible;
returnType: Bidi.Browser.GetClientWindowsResult;
};
'browser.getUserContexts': {
params: Bidi.Extensible;
returnType: Bidi.Browser.GetUserContextsResult;
};
'browser.removeUserContext': {
params: Bidi.Browser.RemoveUserContextParameters;
returnType: Bidi.Browser.RemoveUserContextResult;
};
'browser.setClientWindowState': {
params: Bidi.Browser.SetClientWindowStateParameters;
returnType: Bidi.Browser.SetClientWindowStateResult;
};
'browser.setDownloadBehavior': {
params: Bidi.Browser.SetDownloadBehaviorParameters;
returnType: Bidi.Browser.SetDownloadBehaviorResult;
};
'browsingContext.activate': {
params: Bidi.BrowsingContext.ActivateParameters;
returnType: Bidi.BrowsingContext.ActivateResult;
};
'browsingContext.captureScreenshot': {
params: Bidi.BrowsingContext.CaptureScreenshotParameters;
returnType: Bidi.BrowsingContext.CaptureScreenshotResult;
};
'browsingContext.close': {
params: Bidi.BrowsingContext.CloseParameters;
returnType: Bidi.BrowsingContext.CloseResult;
};
'browsingContext.create': {
params: Bidi.BrowsingContext.CreateParameters;
returnType: Bidi.BrowsingContext.CreateResult;
};
'browsingContext.getTree': {
params: Bidi.BrowsingContext.GetTreeParameters;
returnType: Bidi.BrowsingContext.GetTreeResult;
};
'browsingContext.handleUserPrompt': {
params: Bidi.BrowsingContext.HandleUserPromptParameters;
returnType: Bidi.BrowsingContext.HandleUserPromptResult;
};
'browsingContext.locateNodes': {
params: Bidi.BrowsingContext.LocateNodesParameters;
returnType: Bidi.BrowsingContext.LocateNodesResult;
};
'browsingContext.navigate': {
params: Bidi.BrowsingContext.NavigateParameters;
returnType: Bidi.BrowsingContext.NavigateResult;
};
'browsingContext.print': {
params: Bidi.BrowsingContext.PrintParameters;
returnType: Bidi.BrowsingContext.PrintResult;
};
'browsingContext.reload': {
params: Bidi.BrowsingContext.ReloadParameters;
returnType: Bidi.BrowsingContext.ReloadResult;
};
'browsingContext.setViewport': {
params: Bidi.BrowsingContext.SetViewportParameters;
returnType: Bidi.BrowsingContext.SetViewportResult;
};
'browsingContext.traverseHistory': {
params: Bidi.BrowsingContext.TraverseHistoryParameters;
returnType: Bidi.BrowsingContext.TraverseHistoryResult;
};
'emulation.setForcedColorsModeThemeOverride': {
params: Bidi.Emulation.SetForcedColorsModeThemeOverrideParameters;
returnType: Bidi.Emulation.SetForcedColorsModeThemeOverrideResult;
};
'emulation.setGeolocationOverride': {
params: Bidi.Emulation.SetGeolocationOverrideParameters;
returnType: Bidi.Emulation.SetGeolocationOverrideResult;
};
'emulation.setLocaleOverride': {
params: Bidi.Emulation.SetLocaleOverrideParameters;
returnType: Bidi.Emulation.SetLocaleOverrideResult;
};
'emulation.setNetworkConditions': {
params: Bidi.Emulation.SetNetworkConditionsParameters;
returnType: Bidi.Emulation.SetNetworkConditionsResult;
};
'emulation.setScreenOrientationOverride': {
params: Bidi.Emulation.SetScreenOrientationOverrideParameters;
returnType: Bidi.Emulation.SetScreenOrientationOverrideResult;
};
'emulation.setScreenSettingsOverride': {
params: Bidi.Emulation.SetScreenSettingsOverrideParameters;
returnType: Bidi.Emulation.SetScreenSettingsOverrideResult;
};
'emulation.setScriptingEnabled': {
params: Bidi.Emulation.SetScriptingEnabledParameters;
returnType: Bidi.Emulation.SetScriptingEnabledResult;
};
'emulation.setScrollbarTypeOverride': {
params: Bidi.Emulation.SetScrollbarTypeOverrideParameters;
returnType: Bidi.Emulation.SetScrollbarTypeOverrideResult;
};
'emulation.setTimezoneOverride': {
params: Bidi.Emulation.SetTimezoneOverrideParameters;
returnType: Bidi.Emulation.SetTimezoneOverrideResult;
};
'emulation.setTouchOverride': {
params: Bidi.Emulation.SetTouchOverrideParameters;
returnType: Bidi.Emulation.SetTouchOverrideResult;
};
'emulation.setUserAgentOverride': {
params: Bidi.Emulation.SetUserAgentOverrideParameters;
returnType: Bidi.Emulation.SetUserAgentOverrideResult;
};
'input.performActions': {
params: Bidi.Input.PerformActionsParameters;
returnType: Bidi.Input.PerformActionsResult;
};
'input.releaseActions': {
params: Bidi.Input.ReleaseActionsParameters;
returnType: Bidi.Input.ReleaseActionsResult;
};
'input.setFiles': {
params: Bidi.Input.SetFilesParameters;
returnType: Bidi.Input.SetFilesResult;
};
'network.addDataCollector': {
params: Bidi.Network.AddDataCollectorParameters;
returnType: Bidi.Network.AddDataCollectorResult;
};
'network.addIntercept': {
params: Bidi.Network.AddInterceptParameters;
returnType: Bidi.Network.AddInterceptResult;
};
'network.continueRequest': {
params: Bidi.Network.ContinueRequestParameters;
returnType: Bidi.Network.ContinueRequestResult;
};
'network.continueResponse': {
params: Bidi.Network.ContinueResponseParameters;
returnType: Bidi.Network.ContinueResponseResult;
};
'network.continueWithAuth': {
params: Bidi.Network.ContinueWithAuthParameters;
returnType: Bidi.Network.ContinueWithAuthResult;
};
'network.disownData': {
params: Bidi.Network.DisownDataParameters;
returnType: Bidi.Network.DisownDataResult;
};
'network.failRequest': {
params: Bidi.Network.FailRequestParameters;
returnType: Bidi.Network.FailRequestResult;
};
'network.getData': {
params: Bidi.Network.GetDataParameters;
returnType: Bidi.Network.GetDataResult;
};
'network.provideResponse': {
params: Bidi.Network.ProvideResponseParameters;
returnType: Bidi.Network.ProvideResponseResult;
};
'network.removeDataCollector': {
params: Bidi.Network.RemoveDataCollectorParameters;
returnType: Bidi.Network.RemoveDataCollectorResult;
};
'network.removeIntercept': {
params: Bidi.Network.RemoveInterceptParameters;
returnType: Bidi.Network.RemoveInterceptResult;
};
'network.setCacheBehavior': {
params: Bidi.Network.SetCacheBehaviorParameters;
returnType: Bidi.Network.SetCacheBehaviorResult;
};
'network.setExtraHeaders': {
params: Bidi.Network.SetExtraHeadersParameters;
returnType: Bidi.Network.SetExtraHeadersResult;
};
'permissions.setPermission': {
params: BidiPermissions.Permissions.SetPermissionParameters;
returnType: Bidi.EmptyResult;
};
'script.addPreloadScript': {
params: Bidi.Script.AddPreloadScriptParameters;
returnType: Bidi.Script.AddPreloadScriptResult;
};
'script.callFunction': {
params: Bidi.Script.CallFunctionParameters;
returnType: Bidi.Script.CallFunctionResult;
};
'script.disown': {
params: Bidi.Script.DisownParameters;
returnType: Bidi.Script.DisownResult;
};
'script.evaluate': {
params: Bidi.Script.EvaluateParameters;
returnType: Bidi.Script.EvaluateResult;
};
'script.getRealms': {
params: Bidi.Script.GetRealmsParameters;
returnType: Bidi.Script.GetRealmsResult;
};
'script.removePreloadScript': {
params: Bidi.Script.RemovePreloadScriptParameters;
returnType: Bidi.Script.RemovePreloadScriptResult;
};
'session.end': {
params: Bidi.Extensible;
returnType: Bidi.Session.EndResult;
};
'session.new': {
params: Bidi.Session.NewParameters;
returnType: Bidi.Session.NewResult;
};
'session.status': {
params: Bidi.Extensible;
returnType: Bidi.Session.StatusResult;
};
'session.subscribe': {
params: Bidi.Session.SubscribeParameters;
returnType: Bidi.Session.SubscribeResult;
};
'session.unsubscribe': {
params: Bidi.Session.UnsubscribeParameters;
returnType: Bidi.Session.UnsubscribeResult;
};
'storage.deleteCookies': {
params: Bidi.Storage.DeleteCookiesParameters;
returnType: Bidi.Storage.DeleteCookiesResult;
};
'storage.getCookies': {
params: Bidi.Storage.GetCookiesParameters;
returnType: Bidi.Storage.GetCookiesResult;
};
'storage.setCookie': {
params: Bidi.Storage.SetCookieParameters;
returnType: Bidi.Storage.SetCookieResult;
};
'userAgentClientHints.setClientHintsOverride': {
params: {
clientHints: BidiUaClientHints.UserAgentClientHints.ClientHintsMetadata | null;
contexts?: [string, ...string[]];
userContexts?: [string, ...string[]];
};
returnType: BidiUaClientHints.UserAgentClientHints.SetClientHintsOverrideResult;
};
'webExtension.install': {
params: Bidi.WebExtension.InstallParameters;
returnType: Bidi.WebExtension.InstallResult;
};
'webExtension.uninstall': {
params: Bidi.WebExtension.UninstallParameters;
returnType: Bidi.WebExtension.UninstallResult;
};
}
+2
View File
@@ -0,0 +1,2 @@
'use strict';
Object.defineProperty(exports, '__esModule', {value: true});
+28
View File
@@ -0,0 +1,28 @@
export type PermissionsCommand = Permissions.SetPermission;
export declare namespace Permissions {
type PermissionDescriptor = {
name: string;
};
}
export declare namespace Permissions {
const enum PermissionState {
Granted = 'granted',
Denied = 'denied',
Prompt = 'prompt',
}
}
export declare namespace Permissions {
type SetPermission = {
method: 'permissions.setPermission';
params: Permissions.SetPermissionParameters;
};
}
export declare namespace Permissions {
type SetPermissionParameters = {
descriptor: Permissions.PermissionDescriptor;
state: Permissions.PermissionState;
origin: string;
embeddedOrigin?: string;
userContext?: string;
};
}
+2
View File
@@ -0,0 +1,2 @@
'use strict';
Object.defineProperty(exports, '__esModule', {value: true});
@@ -0,0 +1,35 @@
export type UserAgentClientHintsCommand =
UserAgentClientHints.SetClientHintsOverrideCommand;
export declare namespace UserAgentClientHints {
type SetClientHintsOverrideCommand = {
method: 'userAgentClientHints.setClientHintsOverride';
params: {
clientHints: UserAgentClientHints.ClientHintsMetadata | null;
contexts?: [string, ...string[]];
userContexts?: [string, ...string[]];
};
};
}
export declare namespace UserAgentClientHints {
type ClientHintsMetadata = {
brands?: [...UserAgentClientHints.BrandVersion[]];
fullVersionList?: [...UserAgentClientHints.BrandVersion[]];
platform?: string;
platformVersion?: string;
architecture?: string;
model?: string;
mobile?: boolean;
bitness?: string;
wow64?: boolean;
formFactors?: [...string[]];
};
}
export declare namespace UserAgentClientHints {
type BrandVersion = {
brand: string;
version: string;
};
}
export declare namespace UserAgentClientHints {
type SetClientHintsOverrideResult = Record<string, never>;
}
@@ -0,0 +1,2 @@
'use strict';
Object.defineProperty(exports, '__esModule', {value: true});
+314
View File
@@ -0,0 +1,314 @@
export declare namespace Bluetooth {
type BluetoothUuid = string;
}
export declare namespace Bluetooth {
type BluetoothManufacturerData = {
key: number;
data: string;
};
}
export declare namespace Bluetooth {
type CharacteristicProperties = {
broadcast?: boolean;
read?: boolean;
writeWithoutResponse?: boolean;
write?: boolean;
notify?: boolean;
indicate?: boolean;
authenticatedSignedWrites?: boolean;
extendedProperties?: boolean;
};
}
export declare namespace Bluetooth {
type RequestDevice = string;
}
export declare namespace Bluetooth {
type RequestDeviceInfo = {
id: Bluetooth.RequestDevice;
name: string | null;
};
}
export declare namespace Bluetooth {
type RequestDevicePrompt = string;
}
export declare namespace Bluetooth {
type ScanRecord = {
name?: string;
uuids?: [...Bluetooth.BluetoothUuid[]];
appearance?: number;
manufacturerData?: [...Bluetooth.BluetoothManufacturerData[]];
};
}
export type BluetoothCommand =
| Bluetooth.HandleRequestDevicePrompt
| Bluetooth.SimulateAdapter
| Bluetooth.DisableSimulation
| Bluetooth.SimulatePreconnectedPeripheral
| Bluetooth.SimulateAdvertisement
| Bluetooth.SimulateGattConnectionResponse
| Bluetooth.SimulateGattDisconnection
| Bluetooth.SimulateService
| Bluetooth.SimulateCharacteristic
| Bluetooth.SimulateCharacteristicResponse
| Bluetooth.SimulateDescriptor
| Bluetooth.SimulateDescriptorResponse;
export declare namespace Bluetooth {
type HandleRequestDevicePrompt = {
method: 'bluetooth.handleRequestDevicePrompt';
params: Bluetooth.HandleRequestDevicePromptParameters;
};
}
export declare namespace Bluetooth {
type HandleRequestDevicePromptParameters = {
context: string;
prompt: Bluetooth.RequestDevicePrompt;
} & (
| Bluetooth.HandleRequestDevicePromptAcceptParameters
| Bluetooth.HandleRequestDevicePromptCancelParameters
);
}
export declare namespace Bluetooth {
type HandleRequestDevicePromptAcceptParameters = {
accept: true;
device: Bluetooth.RequestDevice;
};
}
export declare namespace Bluetooth {
type HandleRequestDevicePromptCancelParameters = {
accept: false;
};
}
export declare namespace Bluetooth {
type SimulateAdapter = {
method: 'bluetooth.simulateAdapter';
params: Bluetooth.SimulateAdapterParameters;
};
}
export declare namespace Bluetooth {
type SimulateAdapterParameters = {
context: string;
leSupported?: boolean;
state: 'absent' | 'powered-off' | 'powered-on';
};
}
export declare namespace Bluetooth {
type DisableSimulation = {
method: 'bluetooth.disableSimulation';
params: Bluetooth.DisableSimulationParameters;
};
}
export declare namespace Bluetooth {
type DisableSimulationParameters = {
context: string;
};
}
export declare namespace Bluetooth {
type SimulatePreconnectedPeripheral = {
method: 'bluetooth.simulatePreconnectedPeripheral';
params: Bluetooth.SimulatePreconnectedPeripheralParameters;
};
}
export declare namespace Bluetooth {
type SimulatePreconnectedPeripheralParameters = {
context: string;
address: string;
name: string;
manufacturerData: [...Bluetooth.BluetoothManufacturerData[]];
knownServiceUuids: [...Bluetooth.BluetoothUuid[]];
};
}
export declare namespace Bluetooth {
type SimulateAdvertisement = {
method: 'bluetooth.simulateAdvertisement';
params: Bluetooth.SimulateAdvertisementParameters;
};
}
export declare namespace Bluetooth {
type SimulateAdvertisementParameters = {
context: string;
scanEntry: Bluetooth.SimulateAdvertisementScanEntryParameters;
};
}
export declare namespace Bluetooth {
type SimulateAdvertisementScanEntryParameters = {
deviceAddress: string;
rssi: number;
scanRecord: Bluetooth.ScanRecord;
};
}
export declare namespace Bluetooth {
type SimulateGattConnectionResponse = {
method: 'bluetooth.simulateGattConnectionResponse';
params: Bluetooth.SimulateGattConnectionResponseParameters;
};
}
export declare namespace Bluetooth {
type SimulateGattConnectionResponseParameters = {
context: string;
address: string;
code: number;
};
}
export declare namespace Bluetooth {
type SimulateGattDisconnection = {
method: 'bluetooth.simulateGattDisconnection';
params: Bluetooth.SimulateGattDisconnectionParameters;
};
}
export declare namespace Bluetooth {
type SimulateGattDisconnectionParameters = {
context: string;
address: string;
};
}
export declare namespace Bluetooth {
type SimulateService = {
method: 'bluetooth.simulateService';
params: Bluetooth.SimulateServiceParameters;
};
}
export declare namespace Bluetooth {
type SimulateServiceParameters = {
context: string;
address: string;
uuid: Bluetooth.BluetoothUuid;
type: 'add' | 'remove';
};
}
export declare namespace Bluetooth {
type SimulateCharacteristic = {
method: 'bluetooth.simulateCharacteristic';
params: Bluetooth.SimulateCharacteristicParameters;
};
}
export declare namespace Bluetooth {
type SimulateCharacteristicParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
characteristicProperties?: Bluetooth.CharacteristicProperties;
type: 'add' | 'remove';
};
}
export declare namespace Bluetooth {
type SimulateCharacteristicResponse = {
method: 'bluetooth.simulateCharacteristicResponse';
params: Bluetooth.SimulateCharacteristicResponseParameters;
};
}
export declare namespace Bluetooth {
type SimulateCharacteristicResponseParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
type:
| 'read'
| 'write'
| 'subscribe-to-notifications'
| 'unsubscribe-from-notifications';
code: number;
data?: [...number[]];
};
}
export declare namespace Bluetooth {
type SimulateDescriptor = {
method: 'bluetooth.simulateDescriptor';
params: Bluetooth.SimulateDescriptorParameters;
};
}
export declare namespace Bluetooth {
type SimulateDescriptorParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'add' | 'remove';
};
}
export declare namespace Bluetooth {
type SimulateDescriptorResponse = {
method: 'bluetooth.simulateDescriptorResponse';
params: Bluetooth.SimulateDescriptorResponseParameters;
};
}
export declare namespace Bluetooth {
type SimulateDescriptorResponseParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'read' | 'write';
code: number;
data?: [...number[]];
};
}
export type BluetoothEvent =
| Bluetooth.RequestDevicePromptUpdated
| Bluetooth.GattConnectionAttempted;
export declare namespace Bluetooth {
type RequestDevicePromptUpdated = {
method: 'bluetooth.requestDevicePromptUpdated';
params: Bluetooth.RequestDevicePromptUpdatedParameters;
};
}
export declare namespace Bluetooth {
type RequestDevicePromptUpdatedParameters = {
context: string;
prompt: Bluetooth.RequestDevicePrompt;
devices: [...Bluetooth.RequestDeviceInfo[]];
};
}
export declare namespace Bluetooth {
type GattConnectionAttempted = {
method: 'bluetooth.gattConnectionAttempted';
params: Bluetooth.GattConnectionAttemptedParameters;
};
}
export declare namespace Bluetooth {
type GattConnectionAttemptedParameters = {
context: string;
address: string;
};
}
export declare namespace Bluetooth {
type CharacteristicEventGenerated = {
method: 'bluetooth.characteristicEventGenerated';
params: Bluetooth.CharacteristicEventGeneratedParameters;
};
}
export declare namespace Bluetooth {
type CharacteristicEventGeneratedParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
type:
| 'read'
| 'write-with-response'
| 'write-without-response'
| 'subscribe-to-notifications'
| 'unsubscribe-from-notifications';
data?: [...number[]];
};
}
export declare namespace Bluetooth {
type DescriptorEventGenerated = {
method: 'bluetooth.descriptorEventGenerated';
params: Bluetooth.DescriptorEventGeneratedParameters;
};
}
export declare namespace Bluetooth {
type DescriptorEventGeneratedParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'read' | 'write';
data?: [...number[]];
};
}
@@ -0,0 +1,2 @@
'use strict';
Object.defineProperty(exports, '__esModule', {value: true});
+31
View File
@@ -0,0 +1,31 @@
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
import * as Bidi from './gen/main.js';
import * as BidiPermissions from './gen/permissions.js';
import * as BidiBluetooth from './gen/web-bluetooth.js';
import * as BidiUaClientHints from './gen/ua-client-hints.js';
export * from './gen/main.js';
export * from './gen/permissions.js';
export * from './gen/web-bluetooth.js';
export {UserAgentClientHintsCommand} from './gen/ua-client-hints.js';
export {BidiUaClientHints};
export * from './gen/mapping.js';
type ExternalSpecCommand<T> = {
id: Bidi.JsUint;
} & T;
export type Result = Bidi.ResultData;
export type Command =
| Bidi.Command
| ExternalSpecCommand<BidiPermissions.PermissionsCommand>
| ExternalSpecCommand<BidiBluetooth.BluetoothCommand>
| ExternalSpecCommand<BidiUaClientHints.UserAgentClientHintsCommand>;
type ExternalSpecEvent<T> = {
type: 'event';
} & T &
Bidi.Extensible;
export type Event =
| Bidi.Event
| ExternalSpecEvent<BidiBluetooth.BluetoothEvent>;
+77
View File
@@ -0,0 +1,77 @@
'use strict';
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
var __createBinding =
(this && this.__createBinding) ||
(Object.create
? function (o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (
!desc ||
('get' in desc ? !m.__esModule : desc.writable || desc.configurable)
) {
desc = {
enumerable: true,
get: function () {
return m[k];
},
};
}
Object.defineProperty(o, k2, desc);
}
: function (o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
});
var __setModuleDefault =
(this && this.__setModuleDefault) ||
(Object.create
? function (o, v) {
Object.defineProperty(o, 'default', {enumerable: true, value: v});
}
: function (o, v) {
o['default'] = v;
});
var __importStar =
(this && this.__importStar) ||
(function () {
var ownKeys = function (o) {
ownKeys =
Object.getOwnPropertyNames ||
function (o) {
var ar = [];
for (var k in o)
if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null)
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
if (k[i] !== 'default') __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __exportStar =
(this && this.__exportStar) ||
function (m, exports) {
for (var p in m)
if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p))
__createBinding(exports, m, p);
};
Object.defineProperty(exports, '__esModule', {value: true});
exports.BidiUaClientHints = void 0;
const BidiUaClientHints = __importStar(require('./gen/ua-client-hints.js'));
exports.BidiUaClientHints = BidiUaClientHints;
__exportStar(require('./gen/main.js'), exports);
__exportStar(require('./gen/permissions.js'), exports);
__exportStar(require('./gen/web-bluetooth.js'), exports);
__exportStar(require('./gen/mapping.js'), exports);
+35
View File
@@ -0,0 +1,35 @@
{
"name": "webdriver-bidi-protocol",
"version": "0.4.2",
"description": "",
"main": "out/index.js",
"types": "out/index.d.ts",
"files": [
"out/**/*",
"src/**/*",
"CHANGELOG.md"
],
"keywords": [
"webdriver",
"bidi",
"protocol"
],
"author": "The Chromium Authors",
"license": "Apache-2.0",
"scripts": {
"test": "./tools/build.sh",
"format": "prettier -w 'out/**/*' 'src/**/*' 'test-d/**/*'"
},
"repository": {
"type": "git",
"url": "git+https://github.com/GoogleChromeLabs/webdriver-bidi-protocol.git"
},
"devDependencies": {
"@types/node": "^25.0.2",
"parse5": "^8.0.0",
"prettier": "3.8.1",
"tsd": "0.33.0",
"typescript": "5.9.3",
"ts-morph": "27.0.2"
}
}
+3011
View File
@@ -0,0 +1,3011 @@
export type Command = {
id: JsUint;
} & CommandData &
Extensible;
export type CommandData =
| BrowserCommand
| BrowsingContextCommand
| EmulationCommand
| InputCommand
| NetworkCommand
| ScriptCommand
| SessionCommand
| StorageCommand
| WebExtensionCommand;
export type EmptyParams = Extensible;
export type Message = CommandResponse | ErrorResponse | Event;
export type CommandResponse = {
type: 'success';
id: JsUint;
result: ResultData;
} & Extensible;
export type ErrorResponse = {
type: 'error';
id: JsUint | null;
error: ErrorCode;
message: string;
stacktrace?: string;
} & Extensible;
export type ResultData =
| BrowserResult
| BrowsingContextResult
| EmulationResult
| InputResult
| NetworkResult
| ScriptResult
| SessionResult
| StorageResult
| WebExtensionResult;
export type EmptyResult = Extensible;
export type Event = {
type: 'event';
} & EventData &
Extensible;
export type EventData =
| BrowsingContextEvent
| InputEvent
| LogEvent
| NetworkEvent
| ScriptEvent;
export type Extensible = {
[key: string]: any;
};
/**
* Must be between `-9007199254740991` and `9007199254740991`, inclusive.
*/
export type JsInt = number;
/**
* Must be between `0` and `9007199254740991`, inclusive.
*/
export type JsUint = number;
export const enum ErrorCode {
InvalidArgument = 'invalid argument',
InvalidSelector = 'invalid selector',
InvalidSessionId = 'invalid session id',
InvalidWebExtension = 'invalid web extension',
MoveTargetOutOfBounds = 'move target out of bounds',
NoSuchAlert = 'no such alert',
NoSuchNetworkCollector = 'no such network collector',
NoSuchElement = 'no such element',
NoSuchFrame = 'no such frame',
NoSuchHandle = 'no such handle',
NoSuchHistoryEntry = 'no such history entry',
NoSuchIntercept = 'no such intercept',
NoSuchNetworkData = 'no such network data',
NoSuchNode = 'no such node',
NoSuchRequest = 'no such request',
NoSuchScript = 'no such script',
NoSuchStoragePartition = 'no such storage partition',
NoSuchUserContext = 'no such user context',
NoSuchWebExtension = 'no such web extension',
SessionNotCreated = 'session not created',
UnableToCaptureScreen = 'unable to capture screen',
UnableToCloseBrowser = 'unable to close browser',
UnableToSetCookie = 'unable to set cookie',
UnableToSetFileInput = 'unable to set file input',
UnavailableNetworkData = 'unavailable network data',
UnderspecifiedStoragePartition = 'underspecified storage partition',
UnknownCommand = 'unknown command',
UnknownError = 'unknown error',
UnsupportedOperation = 'unsupported operation',
}
export type SessionCommand =
| Session.End
| Session.New
| Session.Status
| Session.Subscribe
| Session.Unsubscribe;
export type SessionResult =
| Session.EndResult
| Session.NewResult
| Session.StatusResult
| Session.SubscribeResult
| Session.UnsubscribeResult;
export namespace Session {
export type CapabilitiesRequest = {
alwaysMatch?: Session.CapabilityRequest;
firstMatch?: [...Session.CapabilityRequest[]];
};
}
export namespace Session {
export type CapabilityRequest = {
acceptInsecureCerts?: boolean;
browserName?: string;
browserVersion?: string;
platformName?: string;
proxy?: Session.ProxyConfiguration;
unhandledPromptBehavior?: Session.UserPromptHandler;
} & Extensible;
}
export namespace Session {
export type ProxyConfiguration =
| Session.AutodetectProxyConfiguration
| Session.DirectProxyConfiguration
| Session.ManualProxyConfiguration
| Session.PacProxyConfiguration
| Session.SystemProxyConfiguration;
}
export namespace Session {
export type AutodetectProxyConfiguration = {
proxyType: 'autodetect';
} & Extensible;
}
export namespace Session {
export type DirectProxyConfiguration = {
proxyType: 'direct';
} & Extensible;
}
export namespace Session {
export type ManualProxyConfiguration = {
proxyType: 'manual';
httpProxy?: string;
sslProxy?: string;
} & ({} | Session.SocksProxyConfiguration) & {
noProxy?: [...string[]];
} & Extensible;
}
export namespace Session {
export type SocksProxyConfiguration = {
socksProxy: string;
/**
* Must be between `0` and `255`, inclusive.
*/
socksVersion: number;
};
}
export namespace Session {
export type PacProxyConfiguration = {
proxyType: 'pac';
proxyAutoconfigUrl: string;
} & Extensible;
}
export namespace Session {
export type SystemProxyConfiguration = {
proxyType: 'system';
} & Extensible;
}
export namespace Session {
export type UserPromptHandler = {
alert?: Session.UserPromptHandlerType;
beforeUnload?: Session.UserPromptHandlerType;
confirm?: Session.UserPromptHandlerType;
default?: Session.UserPromptHandlerType;
file?: Session.UserPromptHandlerType;
prompt?: Session.UserPromptHandlerType;
};
}
export namespace Session {
export const enum UserPromptHandlerType {
Accept = 'accept',
Dismiss = 'dismiss',
Ignore = 'ignore',
}
}
export namespace Session {
export type Subscription = string;
}
export namespace Session {
export type SubscribeParameters = {
events: [string, ...string[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Session {
export type UnsubscribeByIdRequest = {
subscriptions: [Session.Subscription, ...Session.Subscription[]];
};
}
export namespace Session {
export type UnsubscribeByAttributesRequest = {
events: [string, ...string[]];
};
}
export namespace Session {
export type Status = {
method: 'session.status';
params: EmptyParams;
};
}
export namespace Session {
export type StatusResult = {
ready: boolean;
message: string;
};
}
export namespace Session {
export type New = {
method: 'session.new';
params: Session.NewParameters;
};
}
export namespace Session {
export type NewParameters = {
capabilities: Session.CapabilitiesRequest;
};
}
export namespace Session {
export type NewResult = {
sessionId: string;
capabilities: {
acceptInsecureCerts: boolean;
browserName: string;
browserVersion: string;
platformName: string;
setWindowRect: boolean;
userAgent: string;
proxy?: Session.ProxyConfiguration;
unhandledPromptBehavior?: Session.UserPromptHandler;
webSocketUrl?: string;
} & Extensible;
};
}
export namespace Session {
export type End = {
method: 'session.end';
params: EmptyParams;
};
}
export namespace Session {
export type EndResult = EmptyResult;
}
export namespace Session {
export type Subscribe = {
method: 'session.subscribe';
params: Session.SubscribeParameters;
};
}
export namespace Session {
export type SubscribeResult = {
subscription: Session.Subscription;
};
}
export namespace Session {
export type Unsubscribe = {
method: 'session.unsubscribe';
params: Session.UnsubscribeParameters;
};
}
export namespace Session {
export type UnsubscribeParameters =
| Session.UnsubscribeByAttributesRequest
| Session.UnsubscribeByIdRequest;
}
export namespace Session {
export type UnsubscribeResult = EmptyResult;
}
export type BrowserCommand =
| Browser.Close
| Browser.CreateUserContext
| Browser.GetClientWindows
| Browser.GetUserContexts
| Browser.RemoveUserContext
| Browser.SetClientWindowState
| Browser.SetDownloadBehavior;
export type BrowserResult =
| Browser.CloseResult
| Browser.CreateUserContextResult
| Browser.GetClientWindowsResult
| Browser.GetUserContextsResult
| Browser.RemoveUserContextResult
| Browser.SetClientWindowStateResult
| Browser.SetDownloadBehaviorResult;
export namespace Browser {
export type ClientWindow = string;
}
export namespace Browser {
export type ClientWindowInfo = {
active: boolean;
clientWindow: Browser.ClientWindow;
height: JsUint;
state: 'fullscreen' | 'maximized' | 'minimized' | 'normal';
width: JsUint;
x: JsInt;
y: JsInt;
};
}
export namespace Browser {
export type UserContext = string;
}
export namespace Browser {
export type UserContextInfo = {
userContext: Browser.UserContext;
};
}
export namespace Browser {
export type Close = {
method: 'browser.close';
params: EmptyParams;
};
}
export namespace Browser {
export type CloseResult = EmptyResult;
}
export namespace Browser {
export type CreateUserContext = {
method: 'browser.createUserContext';
params: Browser.CreateUserContextParameters;
};
}
export namespace Browser {
export type CreateUserContextParameters = {
acceptInsecureCerts?: boolean;
proxy?: Session.ProxyConfiguration;
unhandledPromptBehavior?: Session.UserPromptHandler;
};
}
export namespace Browser {
export type CreateUserContextResult = Browser.UserContextInfo;
}
export namespace Browser {
export type GetClientWindows = {
method: 'browser.getClientWindows';
params: EmptyParams;
};
}
export namespace Browser {
export type GetClientWindowsResult = {
clientWindows: [...Browser.ClientWindowInfo[]];
};
}
export namespace Browser {
export type GetUserContexts = {
method: 'browser.getUserContexts';
params: EmptyParams;
};
}
export namespace Browser {
export type GetUserContextsResult = {
userContexts: [Browser.UserContextInfo, ...Browser.UserContextInfo[]];
};
}
export namespace Browser {
export type RemoveUserContext = {
method: 'browser.removeUserContext';
params: Browser.RemoveUserContextParameters;
};
}
export namespace Browser {
export type RemoveUserContextParameters = {
userContext: Browser.UserContext;
};
}
export namespace Browser {
export type RemoveUserContextResult = EmptyResult;
}
export namespace Browser {
export type SetClientWindowState = {
method: 'browser.setClientWindowState';
params: Browser.SetClientWindowStateParameters;
};
}
export namespace Browser {
export type SetClientWindowStateParameters = {
clientWindow: Browser.ClientWindow;
} & (Browser.ClientWindowNamedState | Browser.ClientWindowRectState);
}
export namespace Browser {
export type ClientWindowNamedState = {
state: 'fullscreen' | 'maximized' | 'minimized';
};
}
export namespace Browser {
export type ClientWindowRectState = {
state: 'normal';
width?: JsUint;
height?: JsUint;
x?: JsInt;
y?: JsInt;
};
}
export namespace Browser {
export type SetClientWindowStateResult = Browser.ClientWindowInfo;
}
export namespace Browser {
export type SetDownloadBehavior = {
method: 'browser.setDownloadBehavior';
params: Browser.SetDownloadBehaviorParameters;
};
}
export namespace Browser {
export type SetDownloadBehaviorParameters = {
downloadBehavior: Browser.DownloadBehavior | null;
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Browser {
export type DownloadBehavior =
| Browser.DownloadBehaviorAllowed
| Browser.DownloadBehaviorDenied;
}
export namespace Browser {
export type DownloadBehaviorAllowed = {
type: 'allowed';
destinationFolder: string;
};
}
export namespace Browser {
export type DownloadBehaviorDenied = {
type: 'denied';
};
}
export namespace Browser {
export type SetDownloadBehaviorResult = EmptyResult;
}
export type BrowsingContextCommand =
| BrowsingContext.Activate
| BrowsingContext.CaptureScreenshot
| BrowsingContext.Close
| BrowsingContext.Create
| BrowsingContext.GetTree
| BrowsingContext.HandleUserPrompt
| BrowsingContext.LocateNodes
| BrowsingContext.Navigate
| BrowsingContext.Print
| BrowsingContext.Reload
| BrowsingContext.SetViewport
| BrowsingContext.TraverseHistory;
export type BrowsingContextResult =
| BrowsingContext.ActivateResult
| BrowsingContext.CaptureScreenshotResult
| BrowsingContext.CloseResult
| BrowsingContext.CreateResult
| BrowsingContext.GetTreeResult
| BrowsingContext.HandleUserPromptResult
| BrowsingContext.LocateNodesResult
| BrowsingContext.NavigateResult
| BrowsingContext.PrintResult
| BrowsingContext.ReloadResult
| BrowsingContext.SetViewportResult
| BrowsingContext.TraverseHistoryResult;
export type BrowsingContextEvent =
| BrowsingContext.ContextCreated
| BrowsingContext.ContextDestroyed
| BrowsingContext.DomContentLoaded
| BrowsingContext.DownloadEnd
| BrowsingContext.DownloadWillBegin
| BrowsingContext.FragmentNavigated
| BrowsingContext.HistoryUpdated
| BrowsingContext.Load
| BrowsingContext.NavigationAborted
| BrowsingContext.NavigationCommitted
| BrowsingContext.NavigationFailed
| BrowsingContext.NavigationStarted
| BrowsingContext.UserPromptClosed
| BrowsingContext.UserPromptOpened;
export namespace BrowsingContext {
export type BrowsingContext = string;
}
export namespace BrowsingContext {
export type InfoList = [...BrowsingContext.Info[]];
}
export namespace BrowsingContext {
export type Info = {
children: BrowsingContext.InfoList | null;
clientWindow: Browser.ClientWindow;
context: BrowsingContext.BrowsingContext;
originalOpener: BrowsingContext.BrowsingContext | null;
url: string;
userContext: Browser.UserContext;
parent?: BrowsingContext.BrowsingContext | null;
};
}
export namespace BrowsingContext {
export type Locator =
| BrowsingContext.AccessibilityLocator
| BrowsingContext.CssLocator
| BrowsingContext.ContextLocator
| BrowsingContext.InnerTextLocator
| BrowsingContext.XPathLocator;
}
export namespace BrowsingContext {
export type AccessibilityLocator = {
type: 'accessibility';
value: {
name?: string;
role?: string;
};
};
}
export namespace BrowsingContext {
export type CssLocator = {
type: 'css';
value: string;
};
}
export namespace BrowsingContext {
export type ContextLocator = {
type: 'context';
value: {
context: BrowsingContext.BrowsingContext;
};
};
}
export namespace BrowsingContext {
export type InnerTextLocator = {
type: 'innerText';
value: string;
ignoreCase?: boolean;
matchType?: 'full' | 'partial';
maxDepth?: JsUint;
};
}
export namespace BrowsingContext {
export type XPathLocator = {
type: 'xpath';
value: string;
};
}
export namespace BrowsingContext {
export type Navigation = string;
}
export namespace BrowsingContext {
export type BaseNavigationInfo = {
context: BrowsingContext.BrowsingContext;
navigation: BrowsingContext.Navigation | null;
timestamp: JsUint;
url: string;
userContext?: Browser.UserContext;
};
}
export namespace BrowsingContext {
export type NavigationInfo = BrowsingContext.BaseNavigationInfo;
}
export namespace BrowsingContext {
export const enum ReadinessState {
None = 'none',
Interactive = 'interactive',
Complete = 'complete',
}
}
export namespace BrowsingContext {
export const enum UserPromptType {
Alert = 'alert',
Beforeunload = 'beforeunload',
Confirm = 'confirm',
Prompt = 'prompt',
}
}
export namespace BrowsingContext {
export type Activate = {
method: 'browsingContext.activate';
params: BrowsingContext.ActivateParameters;
};
}
export namespace BrowsingContext {
export type ActivateParameters = {
context: BrowsingContext.BrowsingContext;
};
}
export namespace BrowsingContext {
export type ActivateResult = EmptyResult;
}
export namespace BrowsingContext {
export type CaptureScreenshot = {
method: 'browsingContext.captureScreenshot';
params: BrowsingContext.CaptureScreenshotParameters;
};
}
export namespace BrowsingContext {
export type CaptureScreenshotParameters = {
context: BrowsingContext.BrowsingContext;
/**
* @defaultValue `"viewport"`
*/
origin?: 'viewport' | 'document';
format?: BrowsingContext.ImageFormat;
clip?: BrowsingContext.ClipRectangle;
};
}
export namespace BrowsingContext {
export type ImageFormat = {
type: string;
/**
* Must be between `0` and `1`, inclusive.
*/
quality?: number;
};
}
export namespace BrowsingContext {
export type ClipRectangle =
| BrowsingContext.BoxClipRectangle
| BrowsingContext.ElementClipRectangle;
}
export namespace BrowsingContext {
export type ElementClipRectangle = {
type: 'element';
element: Script.SharedReference;
};
}
export namespace BrowsingContext {
export type BoxClipRectangle = {
type: 'box';
x: number;
y: number;
width: number;
height: number;
};
}
export namespace BrowsingContext {
export type CaptureScreenshotResult = {
data: string;
};
}
export namespace BrowsingContext {
export type Close = {
method: 'browsingContext.close';
params: BrowsingContext.CloseParameters;
};
}
export namespace BrowsingContext {
export type CloseParameters = {
context: BrowsingContext.BrowsingContext;
/**
* @defaultValue `false`
*/
promptUnload?: boolean;
};
}
export namespace BrowsingContext {
export type CloseResult = EmptyResult;
}
export namespace BrowsingContext {
export type Create = {
method: 'browsingContext.create';
params: BrowsingContext.CreateParameters;
};
}
export namespace BrowsingContext {
export const enum CreateType {
Tab = 'tab',
Window = 'window',
}
}
export namespace BrowsingContext {
export type CreateParameters = {
type: BrowsingContext.CreateType;
referenceContext?: BrowsingContext.BrowsingContext;
/**
* @defaultValue `false`
*/
background?: boolean;
userContext?: Browser.UserContext;
};
}
export namespace BrowsingContext {
export type CreateResult = {
context: BrowsingContext.BrowsingContext;
userContext?: Browser.UserContext;
};
}
export namespace BrowsingContext {
export type GetTree = {
method: 'browsingContext.getTree';
params: BrowsingContext.GetTreeParameters;
};
}
export namespace BrowsingContext {
export type GetTreeParameters = {
maxDepth?: JsUint;
root?: BrowsingContext.BrowsingContext;
};
}
export namespace BrowsingContext {
export type GetTreeResult = {
contexts: BrowsingContext.InfoList;
};
}
export namespace BrowsingContext {
export type HandleUserPrompt = {
method: 'browsingContext.handleUserPrompt';
params: BrowsingContext.HandleUserPromptParameters;
};
}
export namespace BrowsingContext {
export type HandleUserPromptParameters = {
context: BrowsingContext.BrowsingContext;
accept?: boolean;
userText?: string;
};
}
export namespace BrowsingContext {
export type HandleUserPromptResult = EmptyResult;
}
export namespace BrowsingContext {
export type LocateNodes = {
method: 'browsingContext.locateNodes';
params: BrowsingContext.LocateNodesParameters;
};
}
export namespace BrowsingContext {
export type LocateNodesParameters = {
context: BrowsingContext.BrowsingContext;
locator: BrowsingContext.Locator;
/**
* Must be greater than or equal to `1`.
*/
maxNodeCount?: JsUint;
serializationOptions?: Script.SerializationOptions;
startNodes?: [Script.SharedReference, ...Script.SharedReference[]];
};
}
export namespace BrowsingContext {
export type LocateNodesResult = {
nodes: [...Script.NodeRemoteValue[]];
};
}
export namespace BrowsingContext {
export type Navigate = {
method: 'browsingContext.navigate';
params: BrowsingContext.NavigateParameters;
};
}
export namespace BrowsingContext {
export type NavigateParameters = {
context: BrowsingContext.BrowsingContext;
url: string;
wait?: BrowsingContext.ReadinessState;
};
}
export namespace BrowsingContext {
export type NavigateResult = {
navigation: BrowsingContext.Navigation | null;
url: string;
};
}
export namespace BrowsingContext {
export type Print = {
method: 'browsingContext.print';
params: BrowsingContext.PrintParameters;
};
}
export namespace BrowsingContext {
export type PrintParameters = {
context: BrowsingContext.BrowsingContext;
/**
* @defaultValue `false`
*/
background?: boolean;
margin?: BrowsingContext.PrintMarginParameters;
/**
* @defaultValue `"portrait"`
*/
orientation?: 'portrait' | 'landscape';
page?: BrowsingContext.PrintPageParameters;
pageRanges?: [...(JsUint | string)[]];
/**
* Must be between `0.1` and `2`, inclusive.
*
* @defaultValue `1`
*/
scale?: number;
/**
* @defaultValue `true`
*/
shrinkToFit?: boolean;
};
}
export namespace BrowsingContext {
export type PrintMarginParameters = {
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
bottom?: number;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
left?: number;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
right?: number;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
top?: number;
};
}
export namespace BrowsingContext {
export type PrintPageParameters = {
/**
* Must be greater than or equal to `0.0352`.
*
* @defaultValue `27.94`
*/
height?: number;
/**
* Must be greater than or equal to `0.0352`.
*
* @defaultValue `21.59`
*/
width?: number;
};
}
export namespace BrowsingContext {
export type PrintResult = {
data: string;
};
}
export namespace BrowsingContext {
export type Reload = {
method: 'browsingContext.reload';
params: BrowsingContext.ReloadParameters;
};
}
export namespace BrowsingContext {
export type ReloadParameters = {
context: BrowsingContext.BrowsingContext;
ignoreCache?: boolean;
wait?: BrowsingContext.ReadinessState;
};
}
export namespace BrowsingContext {
export type ReloadResult = BrowsingContext.NavigateResult;
}
export namespace BrowsingContext {
export type SetViewport = {
method: 'browsingContext.setViewport';
params: BrowsingContext.SetViewportParameters;
};
}
export namespace BrowsingContext {
export type SetViewportParameters = {
context?: BrowsingContext.BrowsingContext;
viewport?: BrowsingContext.Viewport | null;
/**
* Must be greater than `0`.
*/
devicePixelRatio?: number | null;
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace BrowsingContext {
export type Viewport = {
width: JsUint;
height: JsUint;
};
}
export namespace BrowsingContext {
export type SetViewportResult = EmptyResult;
}
export namespace BrowsingContext {
export type TraverseHistory = {
method: 'browsingContext.traverseHistory';
params: BrowsingContext.TraverseHistoryParameters;
};
}
export namespace BrowsingContext {
export type TraverseHistoryParameters = {
context: BrowsingContext.BrowsingContext;
delta: JsInt;
};
}
export namespace BrowsingContext {
export type TraverseHistoryResult = EmptyResult;
}
export namespace BrowsingContext {
export type ContextCreated = {
method: 'browsingContext.contextCreated';
params: BrowsingContext.Info;
};
}
export namespace BrowsingContext {
export type ContextDestroyed = {
method: 'browsingContext.contextDestroyed';
params: BrowsingContext.Info;
};
}
export namespace BrowsingContext {
export type NavigationStarted = {
method: 'browsingContext.navigationStarted';
params: BrowsingContext.NavigationInfo;
};
}
export namespace BrowsingContext {
export type FragmentNavigated = {
method: 'browsingContext.fragmentNavigated';
params: BrowsingContext.NavigationInfo;
};
}
export namespace BrowsingContext {
export type HistoryUpdated = {
method: 'browsingContext.historyUpdated';
params: BrowsingContext.HistoryUpdatedParameters;
};
}
export namespace BrowsingContext {
export type HistoryUpdatedParameters = {
context: BrowsingContext.BrowsingContext;
timestamp: JsUint;
url: string;
userContext?: Browser.UserContext;
};
}
export namespace BrowsingContext {
export type DomContentLoaded = {
method: 'browsingContext.domContentLoaded';
params: BrowsingContext.NavigationInfo;
};
}
export namespace BrowsingContext {
export type Load = {
method: 'browsingContext.load';
params: BrowsingContext.NavigationInfo;
};
}
export namespace BrowsingContext {
export type DownloadWillBegin = {
method: 'browsingContext.downloadWillBegin';
params: BrowsingContext.DownloadWillBeginParams;
};
}
export namespace BrowsingContext {
export type DownloadWillBeginParams = {
suggestedFilename: string;
} & BrowsingContext.BaseNavigationInfo;
}
export namespace BrowsingContext {
export type DownloadEnd = {
method: 'browsingContext.downloadEnd';
params: BrowsingContext.DownloadEndParams;
};
}
export namespace BrowsingContext {
export type DownloadEndParams =
| BrowsingContext.DownloadCanceledParams
| BrowsingContext.DownloadCompleteParams;
}
export namespace BrowsingContext {
export type DownloadCanceledParams = {
status: 'canceled';
} & BrowsingContext.BaseNavigationInfo;
}
export namespace BrowsingContext {
export type DownloadCompleteParams = {
status: 'complete';
filepath: string | null;
} & BrowsingContext.BaseNavigationInfo;
}
export namespace BrowsingContext {
export type NavigationAborted = {
method: 'browsingContext.navigationAborted';
params: BrowsingContext.NavigationInfo;
};
}
export namespace BrowsingContext {
export type NavigationCommitted = {
method: 'browsingContext.navigationCommitted';
params: BrowsingContext.NavigationInfo;
};
}
export namespace BrowsingContext {
export type NavigationFailed = {
method: 'browsingContext.navigationFailed';
params: BrowsingContext.NavigationInfo;
};
}
export namespace BrowsingContext {
export type UserPromptClosed = {
method: 'browsingContext.userPromptClosed';
params: BrowsingContext.UserPromptClosedParameters;
};
}
export namespace BrowsingContext {
export type UserPromptClosedParameters = {
context: BrowsingContext.BrowsingContext;
accepted: boolean;
type: BrowsingContext.UserPromptType;
userContext?: Browser.UserContext;
userText?: string;
};
}
export namespace BrowsingContext {
export type UserPromptOpened = {
method: 'browsingContext.userPromptOpened';
params: BrowsingContext.UserPromptOpenedParameters;
};
}
export namespace BrowsingContext {
export type UserPromptOpenedParameters = {
context: BrowsingContext.BrowsingContext;
handler: Session.UserPromptHandlerType;
message: string;
type: BrowsingContext.UserPromptType;
userContext?: Browser.UserContext;
defaultValue?: string;
};
}
export type EmulationCommand =
| Emulation.SetForcedColorsModeThemeOverride
| Emulation.SetGeolocationOverride
| Emulation.SetLocaleOverride
| Emulation.SetNetworkConditions
| Emulation.SetScreenOrientationOverride
| Emulation.SetScreenSettingsOverride
| Emulation.SetScriptingEnabled
| Emulation.SetScrollbarTypeOverride
| Emulation.SetTimezoneOverride
| Emulation.SetTouchOverride
| Emulation.SetUserAgentOverride;
export type EmulationResult =
| Emulation.SetForcedColorsModeThemeOverrideResult
| Emulation.SetGeolocationOverrideResult
| Emulation.SetLocaleOverrideResult
| Emulation.SetScreenOrientationOverrideResult
| Emulation.SetScriptingEnabledResult
| Emulation.SetScrollbarTypeOverrideResult
| Emulation.SetTimezoneOverrideResult
| Emulation.SetTouchOverrideResult
| Emulation.SetUserAgentOverrideResult;
export namespace Emulation {
export type SetForcedColorsModeThemeOverride = {
method: 'emulation.setForcedColorsModeThemeOverride';
params: Emulation.SetForcedColorsModeThemeOverrideParameters;
};
}
export namespace Emulation {
export type SetForcedColorsModeThemeOverrideParameters = {
theme: Emulation.ForcedColorsModeTheme | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export const enum ForcedColorsModeTheme {
Light = 'light',
Dark = 'dark',
}
}
export namespace Emulation {
export type SetForcedColorsModeThemeOverrideResult = EmptyResult;
}
export namespace Emulation {
export type SetGeolocationOverride = {
method: 'emulation.setGeolocationOverride';
params: Emulation.SetGeolocationOverrideParameters;
};
}
export namespace Emulation {
export type SetGeolocationOverrideParameters = (
| {
coordinates: Emulation.GeolocationCoordinates | null;
}
| {
error: Emulation.GeolocationPositionError;
}
) & {
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type GeolocationCoordinates = {
/**
* Must be between `-90` and `90`, inclusive.
*/
latitude: number;
/**
* Must be between `-180` and `180`, inclusive.
*/
longitude: number;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `1`
*/
accuracy?: number;
/**
* @defaultValue `null`
*/
altitude?: number | null;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `null`
*/
altitudeAccuracy?: number | null;
/**
* Must be between `0` and `360`.
*
* @defaultValue `null`
*/
heading?: number | null;
/**
* Must be greater than or equal to `0`.
*
* @defaultValue `null`
*/
speed?: number | null;
};
}
export namespace Emulation {
export type GeolocationPositionError = {
type: 'positionUnavailable';
};
}
export namespace Emulation {
export type SetGeolocationOverrideResult = EmptyResult;
}
export namespace Emulation {
export type SetLocaleOverride = {
method: 'emulation.setLocaleOverride';
params: Emulation.SetLocaleOverrideParameters;
};
}
export namespace Emulation {
export type SetLocaleOverrideParameters = {
locale: string | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type SetLocaleOverrideResult = EmptyResult;
}
export namespace Emulation {
export type SetNetworkConditions = {
method: 'emulation.setNetworkConditions';
params: Emulation.SetNetworkConditionsParameters;
};
}
export namespace Emulation {
export type SetNetworkConditionsParameters = {
networkConditions: Emulation.NetworkConditions | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type NetworkConditions = Emulation.NetworkConditionsOffline;
}
export namespace Emulation {
export type NetworkConditionsOffline = {
type: 'offline';
};
}
export namespace Emulation {
export type SetNetworkConditionsResult = EmptyResult;
}
export namespace Emulation {
export type SetScreenSettingsOverride = {
method: 'emulation.setScreenSettingsOverride';
params: Emulation.SetScreenSettingsOverrideParameters;
};
}
export namespace Emulation {
export type ScreenArea = {
width: JsUint;
height: JsUint;
};
}
export namespace Emulation {
export type SetScreenSettingsOverrideParameters = {
screenArea: Emulation.ScreenArea | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type SetScreenSettingsOverrideResult = EmptyResult;
}
export namespace Emulation {
export type SetScreenOrientationOverride = {
method: 'emulation.setScreenOrientationOverride';
params: Emulation.SetScreenOrientationOverrideParameters;
};
}
export namespace Emulation {
export const enum ScreenOrientationNatural {
Portrait = 'portrait',
Landscape = 'landscape',
}
}
export namespace Emulation {
export type ScreenOrientationType =
| 'portrait-primary'
| 'portrait-secondary'
| 'landscape-primary'
| 'landscape-secondary';
}
export namespace Emulation {
export type ScreenOrientation = {
natural: Emulation.ScreenOrientationNatural;
type: Emulation.ScreenOrientationType;
};
}
export namespace Emulation {
export type SetScreenOrientationOverrideParameters = {
screenOrientation: Emulation.ScreenOrientation | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type SetScreenOrientationOverrideResult = EmptyResult;
}
export namespace Emulation {
export type SetUserAgentOverride = {
method: 'emulation.setUserAgentOverride';
params: Emulation.SetUserAgentOverrideParameters;
};
}
export namespace Emulation {
export type SetUserAgentOverrideParameters = {
userAgent: string | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type SetUserAgentOverrideResult = EmptyResult;
}
export namespace Emulation {
export type SetScriptingEnabled = {
method: 'emulation.setScriptingEnabled';
params: Emulation.SetScriptingEnabledParameters;
};
}
export namespace Emulation {
export type SetScriptingEnabledParameters = {
enabled: false | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type SetScriptingEnabledResult = EmptyResult;
}
export namespace Emulation {
export type SetScrollbarTypeOverride = {
method: 'emulation.setScrollbarTypeOverride';
params: Emulation.SetScrollbarTypeOverrideParameters;
};
}
export namespace Emulation {
export type SetScrollbarTypeOverrideParameters = {
scrollbarType: 'classic' | 'overlay' | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type SetScrollbarTypeOverrideResult = EmptyResult;
}
export namespace Emulation {
export type SetTimezoneOverride = {
method: 'emulation.setTimezoneOverride';
params: Emulation.SetTimezoneOverrideParameters;
};
}
export namespace Emulation {
export type SetTimezoneOverrideParameters = {
timezone: string | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type SetTimezoneOverrideResult = EmptyResult;
}
export namespace Emulation {
export type SetTouchOverride = {
method: 'emulation.setTouchOverride';
params: Emulation.SetTouchOverrideParameters;
};
}
export namespace Emulation {
export type SetTouchOverrideParameters = {
/**
* Must be greater than or equal to `1`.
*/
maxTouchPoints: JsUint | null;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Emulation {
export type SetTouchOverrideResult = EmptyResult;
}
export type NetworkCommand =
| Network.AddDataCollector
| Network.AddIntercept
| Network.ContinueRequest
| Network.ContinueResponse
| Network.ContinueWithAuth
| Network.DisownData
| Network.FailRequest
| Network.GetData
| Network.ProvideResponse
| Network.RemoveDataCollector
| Network.RemoveIntercept
| Network.SetCacheBehavior
| Network.SetExtraHeaders;
export type NetworkResult =
| Network.AddDataCollectorResult
| Network.AddInterceptResult
| Network.ContinueRequestResult
| Network.ContinueResponseResult
| Network.ContinueWithAuthResult
| Network.DisownDataResult
| Network.FailRequestResult
| Network.GetDataResult
| Network.ProvideResponseResult
| Network.RemoveDataCollectorResult
| Network.RemoveInterceptResult
| Network.SetCacheBehaviorResult
| Network.SetExtraHeadersResult;
export type NetworkEvent =
| Network.AuthRequired
| Network.BeforeRequestSent
| Network.FetchError
| Network.ResponseCompleted
| Network.ResponseStarted;
export namespace Network {
export type AuthChallenge = {
scheme: string;
realm: string;
};
}
export namespace Network {
export type AuthCredentials = {
type: 'password';
username: string;
password: string;
};
}
export namespace Network {
export type BaseParameters = {
context: BrowsingContext.BrowsingContext | null;
isBlocked: boolean;
navigation: BrowsingContext.Navigation | null;
redirectCount: JsUint;
request: Network.RequestData;
timestamp: JsUint;
userContext?: Browser.UserContext | null;
intercepts?: [Network.Intercept, ...Network.Intercept[]];
};
}
export namespace Network {
export type BytesValue = Network.StringValue | Network.Base64Value;
}
export namespace Network {
export type StringValue = {
type: 'string';
value: string;
};
}
export namespace Network {
export type Base64Value = {
type: 'base64';
value: string;
};
}
export namespace Network {
export type Collector = string;
}
export namespace Network {
export const enum CollectorType {
Blob = 'blob',
}
}
export namespace Network {
export const enum SameSite {
Strict = 'strict',
Lax = 'lax',
None = 'none',
Default = 'default',
}
}
export namespace Network {
export type Cookie = {
name: string;
value: Network.BytesValue;
domain: string;
path: string;
size: JsUint;
httpOnly: boolean;
secure: boolean;
sameSite: Network.SameSite;
expiry?: JsUint;
} & Extensible;
}
export namespace Network {
export type CookieHeader = {
name: string;
value: Network.BytesValue;
};
}
export namespace Network {
export const enum DataType {
Request = 'request',
Response = 'response',
}
}
export namespace Network {
export type FetchTimingInfo = {
timeOrigin: number;
requestTime: number;
redirectStart: number;
redirectEnd: number;
fetchStart: number;
dnsStart: number;
dnsEnd: number;
connectStart: number;
connectEnd: number;
tlsStart: number;
requestStart: number;
responseStart: number;
responseEnd: number;
};
}
export namespace Network {
export type Header = {
name: string;
value: Network.BytesValue;
};
}
export namespace Network {
export type Initiator = {
columnNumber?: JsUint;
lineNumber?: JsUint;
request?: Network.Request;
stackTrace?: Script.StackTrace;
type?: 'parser' | 'script' | 'preflight' | 'other';
};
}
export namespace Network {
export type Intercept = string;
}
export namespace Network {
export type Request = string;
}
export namespace Network {
export type RequestData = {
request: Network.Request;
url: string;
method: string;
headers: [...Network.Header[]];
cookies: [...Network.Cookie[]];
headersSize: JsUint;
bodySize: JsUint | null;
destination: string;
initiatorType: string | null;
timings: Network.FetchTimingInfo;
};
}
export namespace Network {
export type ResponseContent = {
size: JsUint;
};
}
export namespace Network {
export type ResponseData = {
url: string;
protocol: string;
status: JsUint;
statusText: string;
fromCache: boolean;
headers: [...Network.Header[]];
mimeType: string;
bytesReceived: JsUint;
headersSize: JsUint | null;
bodySize: JsUint | null;
content: Network.ResponseContent;
authChallenges?: [...Network.AuthChallenge[]];
};
}
export namespace Network {
export type SetCookieHeader = {
name: string;
value: Network.BytesValue;
domain?: string;
httpOnly?: boolean;
expiry?: string;
maxAge?: JsInt;
path?: string;
sameSite?: Network.SameSite;
secure?: boolean;
};
}
export namespace Network {
export type UrlPattern = Network.UrlPatternPattern | Network.UrlPatternString;
}
export namespace Network {
export type UrlPatternPattern = {
type: 'pattern';
protocol?: string;
hostname?: string;
port?: string;
pathname?: string;
search?: string;
};
}
export namespace Network {
export type UrlPatternString = {
type: 'string';
pattern: string;
};
}
export namespace Network {
export type AddDataCollector = {
method: 'network.addDataCollector';
params: Network.AddDataCollectorParameters;
};
}
export namespace Network {
export type AddDataCollectorParameters = {
dataTypes: [Network.DataType, ...Network.DataType[]];
maxEncodedDataSize: JsUint;
/**
* @defaultValue `"blob"`
*/
collectorType?: Network.CollectorType;
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Network {
export type AddDataCollectorResult = {
collector: Network.Collector;
};
}
export namespace Network {
export type AddIntercept = {
method: 'network.addIntercept';
params: Network.AddInterceptParameters;
};
}
export namespace Network {
export type AddInterceptParameters = {
phases: [Network.InterceptPhase, ...Network.InterceptPhase[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
urlPatterns?: [...Network.UrlPattern[]];
};
}
export namespace Network {
export const enum InterceptPhase {
BeforeRequestSent = 'beforeRequestSent',
ResponseStarted = 'responseStarted',
AuthRequired = 'authRequired',
}
}
export namespace Network {
export type AddInterceptResult = {
intercept: Network.Intercept;
};
}
export namespace Network {
export type ContinueRequest = {
method: 'network.continueRequest';
params: Network.ContinueRequestParameters;
};
}
export namespace Network {
export type ContinueRequestParameters = {
request: Network.Request;
body?: Network.BytesValue;
cookies?: [...Network.CookieHeader[]];
headers?: [...Network.Header[]];
method?: string;
url?: string;
};
}
export namespace Network {
export type ContinueRequestResult = EmptyResult;
}
export namespace Network {
export type ContinueResponse = {
method: 'network.continueResponse';
params: Network.ContinueResponseParameters;
};
}
export namespace Network {
export type ContinueResponseParameters = {
request: Network.Request;
cookies?: [...Network.SetCookieHeader[]];
credentials?: Network.AuthCredentials;
headers?: [...Network.Header[]];
reasonPhrase?: string;
statusCode?: JsUint;
};
}
export namespace Network {
export type ContinueResponseResult = EmptyResult;
}
export namespace Network {
export type ContinueWithAuth = {
method: 'network.continueWithAuth';
params: Network.ContinueWithAuthParameters;
};
}
export namespace Network {
export type ContinueWithAuthParameters = {
request: Network.Request;
} & (
| Network.ContinueWithAuthCredentials
| Network.ContinueWithAuthNoCredentials
);
}
export namespace Network {
export type ContinueWithAuthCredentials = {
action: 'provideCredentials';
credentials: Network.AuthCredentials;
};
}
export namespace Network {
export type ContinueWithAuthNoCredentials = {
action: 'default' | 'cancel';
};
}
export namespace Network {
export type ContinueWithAuthResult = EmptyResult;
}
export namespace Network {
export type DisownData = {
method: 'network.disownData';
params: Network.DisownDataParameters;
};
}
export namespace Network {
export type DisownDataParameters = {
dataType: Network.DataType;
collector: Network.Collector;
request: Network.Request;
};
}
export namespace Network {
export type DisownDataResult = EmptyResult;
}
export namespace Network {
export type FailRequest = {
method: 'network.failRequest';
params: Network.FailRequestParameters;
};
}
export namespace Network {
export type FailRequestParameters = {
request: Network.Request;
};
}
export namespace Network {
export type FailRequestResult = EmptyResult;
}
export namespace Network {
export type GetData = {
method: 'network.getData';
params: Network.GetDataParameters;
};
}
export namespace Network {
export type GetDataParameters = {
dataType: Network.DataType;
collector?: Network.Collector;
/**
* @defaultValue `false`
*/
disown?: boolean;
request: Network.Request;
};
}
export namespace Network {
export type GetDataResult = {
bytes: Network.BytesValue;
};
}
export namespace Network {
export type ProvideResponse = {
method: 'network.provideResponse';
params: Network.ProvideResponseParameters;
};
}
export namespace Network {
export type ProvideResponseParameters = {
request: Network.Request;
body?: Network.BytesValue;
cookies?: [...Network.SetCookieHeader[]];
headers?: [...Network.Header[]];
reasonPhrase?: string;
statusCode?: JsUint;
};
}
export namespace Network {
export type ProvideResponseResult = EmptyResult;
}
export namespace Network {
export type RemoveDataCollector = {
method: 'network.removeDataCollector';
params: Network.RemoveDataCollectorParameters;
};
}
export namespace Network {
export type RemoveDataCollectorParameters = {
collector: Network.Collector;
};
}
export namespace Network {
export type RemoveDataCollectorResult = EmptyResult;
}
export namespace Network {
export type RemoveIntercept = {
method: 'network.removeIntercept';
params: Network.RemoveInterceptParameters;
};
}
export namespace Network {
export type RemoveInterceptParameters = {
intercept: Network.Intercept;
};
}
export namespace Network {
export type RemoveInterceptResult = EmptyResult;
}
export namespace Network {
export type SetCacheBehavior = {
method: 'network.setCacheBehavior';
params: Network.SetCacheBehaviorParameters;
};
}
export namespace Network {
export type SetCacheBehaviorParameters = {
cacheBehavior: 'default' | 'bypass';
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
};
}
export namespace Network {
export type SetCacheBehaviorResult = EmptyResult;
}
export namespace Network {
export type SetExtraHeaders = {
method: 'network.setExtraHeaders';
params: Network.SetExtraHeadersParameters;
};
}
export namespace Network {
export type SetExtraHeadersParameters = {
headers: [...Network.Header[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
};
}
export namespace Network {
export type SetExtraHeadersResult = EmptyResult;
}
export namespace Network {
export type AuthRequired = {
method: 'network.authRequired';
params: Network.AuthRequiredParameters;
};
}
export namespace Network {
export type AuthRequiredParameters = Network.BaseParameters & {
response: Network.ResponseData;
};
}
export namespace Network {
export type BeforeRequestSent = {
method: 'network.beforeRequestSent';
params: Network.BeforeRequestSentParameters;
};
}
export namespace Network {
export type BeforeRequestSentParameters = Network.BaseParameters & {
initiator?: Network.Initiator;
};
}
export namespace Network {
export type FetchError = {
method: 'network.fetchError';
params: Network.FetchErrorParameters;
};
}
export namespace Network {
export type FetchErrorParameters = Network.BaseParameters & {
errorText: string;
};
}
export namespace Network {
export type ResponseCompleted = {
method: 'network.responseCompleted';
params: Network.ResponseCompletedParameters;
};
}
export namespace Network {
export type ResponseCompletedParameters = Network.BaseParameters & {
response: Network.ResponseData;
};
}
export namespace Network {
export type ResponseStarted = {
method: 'network.responseStarted';
params: Network.ResponseStartedParameters;
};
}
export namespace Network {
export type ResponseStartedParameters = Network.BaseParameters & {
response: Network.ResponseData;
};
}
export type ScriptCommand =
| Script.AddPreloadScript
| Script.CallFunction
| Script.Disown
| Script.Evaluate
| Script.GetRealms
| Script.RemovePreloadScript;
export type ScriptResult =
| Script.AddPreloadScriptResult
| Script.CallFunctionResult
| Script.DisownResult
| Script.EvaluateResult
| Script.GetRealmsResult
| Script.RemovePreloadScriptResult;
export type ScriptEvent =
| Script.Message
| Script.RealmCreated
| Script.RealmDestroyed;
export namespace Script {
export type Channel = string;
}
export namespace Script {
export type ChannelValue = {
type: 'channel';
value: Script.ChannelProperties;
};
}
export namespace Script {
export type ChannelProperties = {
channel: Script.Channel;
serializationOptions?: Script.SerializationOptions;
ownership?: Script.ResultOwnership;
};
}
export namespace Script {
export type EvaluateResult =
| Script.EvaluateResultSuccess
| Script.EvaluateResultException;
}
export namespace Script {
export type EvaluateResultSuccess = {
type: 'success';
result: Script.RemoteValue;
realm: Script.Realm;
};
}
export namespace Script {
export type EvaluateResultException = {
type: 'exception';
exceptionDetails: Script.ExceptionDetails;
realm: Script.Realm;
};
}
export namespace Script {
export type ExceptionDetails = {
columnNumber: JsUint;
exception: Script.RemoteValue;
lineNumber: JsUint;
stackTrace: Script.StackTrace;
text: string;
};
}
export namespace Script {
export type Handle = string;
}
export namespace Script {
export type InternalId = string;
}
export namespace Script {
export type LocalValue =
| Script.RemoteReference
| Script.PrimitiveProtocolValue
| Script.ChannelValue
| Script.ArrayLocalValue
| Script.DateLocalValue
| Script.MapLocalValue
| Script.ObjectLocalValue
| Script.RegExpLocalValue
| Script.SetLocalValue;
}
export namespace Script {
export type ListLocalValue = [...Script.LocalValue[]];
}
export namespace Script {
export type ArrayLocalValue = {
type: 'array';
value: Script.ListLocalValue;
};
}
export namespace Script {
export type DateLocalValue = {
type: 'date';
value: string;
};
}
export namespace Script {
export type MappingLocalValue = [
...[Script.LocalValue | string, Script.LocalValue][],
];
}
export namespace Script {
export type MapLocalValue = {
type: 'map';
value: Script.MappingLocalValue;
};
}
export namespace Script {
export type ObjectLocalValue = {
type: 'object';
value: Script.MappingLocalValue;
};
}
export namespace Script {
export type RegExpValue = {
pattern: string;
flags?: string;
};
}
export namespace Script {
export type RegExpLocalValue = {
type: 'regexp';
value: Script.RegExpValue;
};
}
export namespace Script {
export type SetLocalValue = {
type: 'set';
value: Script.ListLocalValue;
};
}
export namespace Script {
export type PreloadScript = string;
}
export namespace Script {
export type Realm = string;
}
export namespace Script {
export type PrimitiveProtocolValue =
| Script.UndefinedValue
| Script.NullValue
| Script.StringValue
| Script.NumberValue
| Script.BooleanValue
| Script.BigIntValue;
}
export namespace Script {
export type UndefinedValue = {
type: 'undefined';
};
}
export namespace Script {
export type NullValue = {
type: 'null';
};
}
export namespace Script {
export type StringValue = {
type: 'string';
value: string;
};
}
export namespace Script {
export type SpecialNumber = 'NaN' | '-0' | 'Infinity' | '-Infinity';
}
export namespace Script {
export type NumberValue = {
type: 'number';
value: number | Script.SpecialNumber;
};
}
export namespace Script {
export type BooleanValue = {
type: 'boolean';
value: boolean;
};
}
export namespace Script {
export type BigIntValue = {
type: 'bigint';
value: string;
};
}
export namespace Script {
export type RealmInfo =
| Script.WindowRealmInfo
| Script.DedicatedWorkerRealmInfo
| Script.SharedWorkerRealmInfo
| Script.ServiceWorkerRealmInfo
| Script.WorkerRealmInfo
| Script.PaintWorkletRealmInfo
| Script.AudioWorkletRealmInfo
| Script.WorkletRealmInfo;
}
export namespace Script {
export type BaseRealmInfo = {
realm: Script.Realm;
origin: string;
};
}
export namespace Script {
export type WindowRealmInfo = Script.BaseRealmInfo & {
type: 'window';
context: BrowsingContext.BrowsingContext;
userContext?: Browser.UserContext;
sandbox?: string;
};
}
export namespace Script {
export type DedicatedWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'dedicated-worker';
owners: [Script.Realm];
};
}
export namespace Script {
export type SharedWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'shared-worker';
};
}
export namespace Script {
export type ServiceWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'service-worker';
};
}
export namespace Script {
export type WorkerRealmInfo = Script.BaseRealmInfo & {
type: 'worker';
};
}
export namespace Script {
export type PaintWorkletRealmInfo = Script.BaseRealmInfo & {
type: 'paint-worklet';
};
}
export namespace Script {
export type AudioWorkletRealmInfo = Script.BaseRealmInfo & {
type: 'audio-worklet';
};
}
export namespace Script {
export type WorkletRealmInfo = Script.BaseRealmInfo & {
type: 'worklet';
};
}
export namespace Script {
export type RealmType =
| 'window'
| 'dedicated-worker'
| 'shared-worker'
| 'service-worker'
| 'worker'
| 'paint-worklet'
| 'audio-worklet'
| 'worklet';
}
export namespace Script {
export type RemoteReference =
| Script.SharedReference
| Script.RemoteObjectReference;
}
export namespace Script {
export type SharedReference = {
sharedId: Script.SharedId;
handle?: Script.Handle;
} & Extensible;
}
export namespace Script {
export type RemoteObjectReference = {
handle: Script.Handle;
sharedId?: Script.SharedId;
} & Extensible;
}
export namespace Script {
export type RemoteValue =
| Script.PrimitiveProtocolValue
| Script.SymbolRemoteValue
| Script.ArrayRemoteValue
| Script.ObjectRemoteValue
| Script.FunctionRemoteValue
| Script.RegExpRemoteValue
| Script.DateRemoteValue
| Script.MapRemoteValue
| Script.SetRemoteValue
| Script.WeakMapRemoteValue
| Script.WeakSetRemoteValue
| Script.GeneratorRemoteValue
| Script.ErrorRemoteValue
| Script.ProxyRemoteValue
| Script.PromiseRemoteValue
| Script.TypedArrayRemoteValue
| Script.ArrayBufferRemoteValue
| Script.NodeListRemoteValue
| Script.HtmlCollectionRemoteValue
| Script.NodeRemoteValue
| Script.WindowProxyRemoteValue;
}
export namespace Script {
export type ListRemoteValue = [...Script.RemoteValue[]];
}
export namespace Script {
export type MappingRemoteValue = [
...[Script.RemoteValue | string, Script.RemoteValue][],
];
}
export namespace Script {
export type SymbolRemoteValue = {
type: 'symbol';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type ArrayRemoteValue = {
type: 'array';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.ListRemoteValue;
};
}
export namespace Script {
export type ObjectRemoteValue = {
type: 'object';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.MappingRemoteValue;
};
}
export namespace Script {
export type FunctionRemoteValue = {
type: 'function';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type RegExpRemoteValue = Script.RegExpLocalValue & {
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type DateRemoteValue = Script.DateLocalValue & {
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type MapRemoteValue = {
type: 'map';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.MappingRemoteValue;
};
}
export namespace Script {
export type SetRemoteValue = {
type: 'set';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.ListRemoteValue;
};
}
export namespace Script {
export type WeakMapRemoteValue = {
type: 'weakmap';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type WeakSetRemoteValue = {
type: 'weakset';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type GeneratorRemoteValue = {
type: 'generator';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type ErrorRemoteValue = {
type: 'error';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type ProxyRemoteValue = {
type: 'proxy';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type PromiseRemoteValue = {
type: 'promise';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type TypedArrayRemoteValue = {
type: 'typedarray';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type ArrayBufferRemoteValue = {
type: 'arraybuffer';
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type NodeListRemoteValue = {
type: 'nodelist';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.ListRemoteValue;
};
}
export namespace Script {
export type HtmlCollectionRemoteValue = {
type: 'htmlcollection';
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.ListRemoteValue;
};
}
export namespace Script {
export type NodeRemoteValue = {
type: 'node';
sharedId?: Script.SharedId;
handle?: Script.Handle;
internalId?: Script.InternalId;
value?: Script.NodeProperties;
};
}
export namespace Script {
export type NodeProperties = {
nodeType: JsUint;
childNodeCount: JsUint;
attributes?: {
[key: string]: string;
};
children?: [...Script.NodeRemoteValue[]];
localName?: string;
mode?: 'open' | 'closed';
namespaceURI?: string;
nodeValue?: string;
shadowRoot?: Script.NodeRemoteValue | null;
};
}
export namespace Script {
export type WindowProxyRemoteValue = {
type: 'window';
value: Script.WindowProxyProperties;
handle?: Script.Handle;
internalId?: Script.InternalId;
};
}
export namespace Script {
export type WindowProxyProperties = {
context: BrowsingContext.BrowsingContext;
};
}
export namespace Script {
export const enum ResultOwnership {
Root = 'root',
None = 'none',
}
}
export namespace Script {
export type SerializationOptions = {
/**
* @defaultValue `0`
*/
maxDomDepth?: JsUint | null;
/**
* @defaultValue `null`
*/
maxObjectDepth?: JsUint | null;
/**
* @defaultValue `"none"`
*/
includeShadowTree?: 'none' | 'open' | 'all';
};
}
export namespace Script {
export type SharedId = string;
}
export namespace Script {
export type StackFrame = {
columnNumber: JsUint;
functionName: string;
lineNumber: JsUint;
url: string;
};
}
export namespace Script {
export type StackTrace = {
callFrames: [...Script.StackFrame[]];
};
}
export namespace Script {
export type Source = {
realm: Script.Realm;
context?: BrowsingContext.BrowsingContext;
userContext?: Browser.UserContext;
};
}
export namespace Script {
export type RealmTarget = {
realm: Script.Realm;
};
}
export namespace Script {
export type ContextTarget = {
context: BrowsingContext.BrowsingContext;
sandbox?: string;
};
}
export namespace Script {
export type Target = Script.ContextTarget | Script.RealmTarget;
}
export namespace Script {
export type AddPreloadScript = {
method: 'script.addPreloadScript';
params: Script.AddPreloadScriptParameters;
};
}
export namespace Script {
export type AddPreloadScriptParameters = {
functionDeclaration: string;
arguments?: [...Script.ChannelValue[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[],
];
userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
sandbox?: string;
};
}
export namespace Script {
export type AddPreloadScriptResult = {
script: Script.PreloadScript;
};
}
export namespace Script {
export type Disown = {
method: 'script.disown';
params: Script.DisownParameters;
};
}
export namespace Script {
export type DisownParameters = {
handles: [...Script.Handle[]];
target: Script.Target;
};
}
export namespace Script {
export type DisownResult = EmptyResult;
}
export namespace Script {
export type CallFunction = {
method: 'script.callFunction';
params: Script.CallFunctionParameters;
};
}
export namespace Script {
export type CallFunctionParameters = {
functionDeclaration: string;
awaitPromise: boolean;
target: Script.Target;
arguments?: [...Script.LocalValue[]];
resultOwnership?: Script.ResultOwnership;
serializationOptions?: Script.SerializationOptions;
this?: Script.LocalValue;
/**
* @defaultValue `false`
*/
userActivation?: boolean;
};
}
export namespace Script {
export type CallFunctionResult = Script.EvaluateResult;
}
export namespace Script {
export type Evaluate = {
method: 'script.evaluate';
params: Script.EvaluateParameters;
};
}
export namespace Script {
export type EvaluateParameters = {
expression: string;
target: Script.Target;
awaitPromise: boolean;
resultOwnership?: Script.ResultOwnership;
serializationOptions?: Script.SerializationOptions;
/**
* @defaultValue `false`
*/
userActivation?: boolean;
};
}
export namespace Script {
export type GetRealms = {
method: 'script.getRealms';
params: Script.GetRealmsParameters;
};
}
export namespace Script {
export type GetRealmsParameters = {
context?: BrowsingContext.BrowsingContext;
type?: Script.RealmType;
};
}
export namespace Script {
export type GetRealmsResult = {
realms: [...Script.RealmInfo[]];
};
}
export namespace Script {
export type RemovePreloadScript = {
method: 'script.removePreloadScript';
params: Script.RemovePreloadScriptParameters;
};
}
export namespace Script {
export type RemovePreloadScriptParameters = {
script: Script.PreloadScript;
};
}
export namespace Script {
export type RemovePreloadScriptResult = EmptyResult;
}
export namespace Script {
export type Message = {
method: 'script.message';
params: Script.MessageParameters;
};
}
export namespace Script {
export type MessageParameters = {
channel: Script.Channel;
data: Script.RemoteValue;
source: Script.Source;
};
}
export namespace Script {
export type RealmCreated = {
method: 'script.realmCreated';
params: Script.RealmInfo;
};
}
export namespace Script {
export type RealmDestroyed = {
method: 'script.realmDestroyed';
params: Script.RealmDestroyedParameters;
};
}
export namespace Script {
export type RealmDestroyedParameters = {
realm: Script.Realm;
};
}
export type StorageCommand =
| Storage.DeleteCookies
| Storage.GetCookies
| Storage.SetCookie;
export type StorageResult =
| Storage.DeleteCookiesResult
| Storage.GetCookiesResult
| Storage.SetCookieResult;
export namespace Storage {
export type PartitionKey = {
userContext?: string;
sourceOrigin?: string;
} & Extensible;
}
export namespace Storage {
export type GetCookies = {
method: 'storage.getCookies';
params: Storage.GetCookiesParameters;
};
}
export namespace Storage {
export type CookieFilter = {
name?: string;
value?: Network.BytesValue;
domain?: string;
path?: string;
size?: JsUint;
httpOnly?: boolean;
secure?: boolean;
sameSite?: Network.SameSite;
expiry?: JsUint;
} & Extensible;
}
export namespace Storage {
export type BrowsingContextPartitionDescriptor = {
type: 'context';
context: BrowsingContext.BrowsingContext;
};
}
export namespace Storage {
export type StorageKeyPartitionDescriptor = {
type: 'storageKey';
userContext?: string;
sourceOrigin?: string;
} & Extensible;
}
export namespace Storage {
export type PartitionDescriptor =
| Storage.BrowsingContextPartitionDescriptor
| Storage.StorageKeyPartitionDescriptor;
}
export namespace Storage {
export type GetCookiesParameters = {
filter?: Storage.CookieFilter;
partition?: Storage.PartitionDescriptor;
};
}
export namespace Storage {
export type GetCookiesResult = {
cookies: [...Network.Cookie[]];
partitionKey: Storage.PartitionKey;
};
}
export namespace Storage {
export type SetCookie = {
method: 'storage.setCookie';
params: Storage.SetCookieParameters;
};
}
export namespace Storage {
export type PartialCookie = {
name: string;
value: Network.BytesValue;
domain: string;
path?: string;
httpOnly?: boolean;
secure?: boolean;
sameSite?: Network.SameSite;
expiry?: JsUint;
} & Extensible;
}
export namespace Storage {
export type SetCookieParameters = {
cookie: Storage.PartialCookie;
partition?: Storage.PartitionDescriptor;
};
}
export namespace Storage {
export type SetCookieResult = {
partitionKey: Storage.PartitionKey;
};
}
export namespace Storage {
export type DeleteCookies = {
method: 'storage.deleteCookies';
params: Storage.DeleteCookiesParameters;
};
}
export namespace Storage {
export type DeleteCookiesParameters = {
filter?: Storage.CookieFilter;
partition?: Storage.PartitionDescriptor;
};
}
export namespace Storage {
export type DeleteCookiesResult = {
partitionKey: Storage.PartitionKey;
};
}
export type LogEvent = Log.EntryAdded;
export namespace Log {
export const enum Level {
Debug = 'debug',
Info = 'info',
Warn = 'warn',
Error = 'error',
}
}
export namespace Log {
export type Entry =
| Log.GenericLogEntry
| Log.ConsoleLogEntry
| Log.JavascriptLogEntry;
}
export namespace Log {
export type BaseLogEntry = {
level: Log.Level;
source: Script.Source;
text: string | null;
timestamp: JsUint;
stackTrace?: Script.StackTrace;
};
}
export namespace Log {
export type GenericLogEntry = Log.BaseLogEntry & {
type: string;
};
}
export namespace Log {
export type ConsoleLogEntry = Log.BaseLogEntry & {
type: 'console';
method: string;
args: [...Script.RemoteValue[]];
};
}
export namespace Log {
export type JavascriptLogEntry = Log.BaseLogEntry & {
type: 'javascript';
};
}
export namespace Log {
export type EntryAdded = {
method: 'log.entryAdded';
params: Log.Entry;
};
}
export type InputCommand =
| Input.PerformActions
| Input.ReleaseActions
| Input.SetFiles;
export type InputResult =
| Input.PerformActionsResult
| Input.ReleaseActionsResult
| Input.SetFilesResult;
export type InputEvent = Input.FileDialogOpened;
export namespace Input {
export type ElementOrigin = {
type: 'element';
element: Script.SharedReference;
};
}
export namespace Input {
export type PerformActions = {
method: 'input.performActions';
params: Input.PerformActionsParameters;
};
}
export namespace Input {
export type PerformActionsParameters = {
context: BrowsingContext.BrowsingContext;
actions: [...Input.SourceActions[]];
};
}
export namespace Input {
export type SourceActions =
| Input.NoneSourceActions
| Input.KeySourceActions
| Input.PointerSourceActions
| Input.WheelSourceActions;
}
export namespace Input {
export type NoneSourceActions = {
type: 'none';
id: string;
actions: [...Input.NoneSourceAction[]];
};
}
export namespace Input {
export type NoneSourceAction = Input.PauseAction;
}
export namespace Input {
export type KeySourceActions = {
type: 'key';
id: string;
actions: [...Input.KeySourceAction[]];
};
}
export namespace Input {
export type KeySourceAction =
| Input.PauseAction
| Input.KeyDownAction
| Input.KeyUpAction;
}
export namespace Input {
export type PointerSourceActions = {
type: 'pointer';
id: string;
parameters?: Input.PointerParameters;
actions: [...Input.PointerSourceAction[]];
};
}
export namespace Input {
export const enum PointerType {
Mouse = 'mouse',
Pen = 'pen',
Touch = 'touch',
}
}
export namespace Input {
export type PointerParameters = {
/**
* @defaultValue `"mouse"`
*/
pointerType?: Input.PointerType;
};
}
export namespace Input {
export type PointerSourceAction =
| Input.PauseAction
| Input.PointerDownAction
| Input.PointerUpAction
| Input.PointerMoveAction;
}
export namespace Input {
export type WheelSourceActions = {
type: 'wheel';
id: string;
actions: [...Input.WheelSourceAction[]];
};
}
export namespace Input {
export type WheelSourceAction = Input.PauseAction | Input.WheelScrollAction;
}
export namespace Input {
export type PauseAction = {
type: 'pause';
duration?: JsUint;
};
}
export namespace Input {
export type KeyDownAction = {
type: 'keyDown';
value: string;
};
}
export namespace Input {
export type KeyUpAction = {
type: 'keyUp';
value: string;
};
}
export namespace Input {
export type PointerUpAction = {
type: 'pointerUp';
button: JsUint;
};
}
export namespace Input {
export type PointerDownAction = {
type: 'pointerDown';
button: JsUint;
} & Input.PointerCommonProperties;
}
export namespace Input {
export type PointerMoveAction = {
type: 'pointerMove';
x: number;
y: number;
duration?: JsUint;
origin?: Input.Origin;
} & Input.PointerCommonProperties;
}
export namespace Input {
export type WheelScrollAction = {
type: 'scroll';
x: JsInt;
y: JsInt;
deltaX: JsInt;
deltaY: JsInt;
duration?: JsUint;
/**
* @defaultValue `"viewport"`
*/
origin?: Input.Origin;
};
}
export namespace Input {
export type PointerCommonProperties = {
/**
* @defaultValue `1`
*/
width?: JsUint;
/**
* @defaultValue `1`
*/
height?: JsUint;
/**
* @defaultValue `0`
*/
pressure?: number;
/**
* @defaultValue `0`
*/
tangentialPressure?: number;
/**
* Must be between `0` and `359`, inclusive.
*
* @defaultValue `0`
*/
twist?: number;
/**
* Must be between `0` and `1.5707963267948966`, inclusive.
*
* @defaultValue `0`
*/
altitudeAngle?: number;
/**
* Must be between `0` and `6.283185307179586`, inclusive.
*
* @defaultValue `0`
*/
azimuthAngle?: number;
};
}
export namespace Input {
export type Origin = 'viewport' | 'pointer' | Input.ElementOrigin;
}
export namespace Input {
export type PerformActionsResult = EmptyResult;
}
export namespace Input {
export type ReleaseActions = {
method: 'input.releaseActions';
params: Input.ReleaseActionsParameters;
};
}
export namespace Input {
export type ReleaseActionsParameters = {
context: BrowsingContext.BrowsingContext;
};
}
export namespace Input {
export type ReleaseActionsResult = EmptyResult;
}
export namespace Input {
export type SetFiles = {
method: 'input.setFiles';
params: Input.SetFilesParameters;
};
}
export namespace Input {
export type SetFilesParameters = {
context: BrowsingContext.BrowsingContext;
element: Script.SharedReference;
files: [...string[]];
};
}
export namespace Input {
export type SetFilesResult = EmptyResult;
}
export namespace Input {
export type FileDialogOpened = {
method: 'input.fileDialogOpened';
params: Input.FileDialogInfo;
};
}
export namespace Input {
export type FileDialogInfo = {
context: BrowsingContext.BrowsingContext;
userContext?: Browser.UserContext;
element?: Script.SharedReference;
multiple: boolean;
};
}
export type WebExtensionCommand = WebExtension.Install | WebExtension.Uninstall;
export type WebExtensionResult =
| WebExtension.InstallResult
| WebExtension.UninstallResult;
export namespace WebExtension {
export type Extension = string;
}
export namespace WebExtension {
export type Install = {
method: 'webExtension.install';
params: WebExtension.InstallParameters;
};
}
export namespace WebExtension {
export type InstallParameters = {
extensionData: WebExtension.ExtensionData;
};
}
export namespace WebExtension {
export type ExtensionData =
| WebExtension.ExtensionArchivePath
| WebExtension.ExtensionBase64Encoded
| WebExtension.ExtensionPath;
}
export namespace WebExtension {
export type ExtensionPath = {
type: 'path';
path: string;
};
}
export namespace WebExtension {
export type ExtensionArchivePath = {
type: 'archivePath';
path: string;
};
}
export namespace WebExtension {
export type ExtensionBase64Encoded = {
type: 'base64';
value: string;
};
}
export namespace WebExtension {
export type InstallResult = {
extension: WebExtension.Extension;
};
}
export namespace WebExtension {
export type Uninstall = {
method: 'webExtension.uninstall';
params: WebExtension.UninstallParameters;
};
}
export namespace WebExtension {
export type UninstallParameters = {
extension: WebExtension.Extension;
};
}
export namespace WebExtension {
export type UninstallResult = EmptyResult;
}
+315
View File
@@ -0,0 +1,315 @@
import type * as Bidi from './main.js';
import type * as BidiPermissions from './permissions.js';
import type * as BidiBluetooth from './web-bluetooth.js';
import type * as BidiUaClientHints from './ua-client-hints.js';
export interface Commands {
'bluetooth.disableSimulation': {
params: BidiBluetooth.Bluetooth.DisableSimulationParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.handleRequestDevicePrompt': {
params: BidiBluetooth.Bluetooth.HandleRequestDevicePromptParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateAdapter': {
params: BidiBluetooth.Bluetooth.SimulateAdapterParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateAdvertisement': {
params: BidiBluetooth.Bluetooth.SimulateAdvertisementParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateCharacteristic': {
params: BidiBluetooth.Bluetooth.SimulateCharacteristicParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateCharacteristicResponse': {
params: BidiBluetooth.Bluetooth.SimulateCharacteristicResponseParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateDescriptor': {
params: BidiBluetooth.Bluetooth.SimulateDescriptorParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateDescriptorResponse': {
params: BidiBluetooth.Bluetooth.SimulateDescriptorResponseParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateGattConnectionResponse': {
params: BidiBluetooth.Bluetooth.SimulateGattConnectionResponseParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateGattDisconnection': {
params: BidiBluetooth.Bluetooth.SimulateGattDisconnectionParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulatePreconnectedPeripheral': {
params: BidiBluetooth.Bluetooth.SimulatePreconnectedPeripheralParameters;
returnType: Bidi.EmptyResult;
};
'bluetooth.simulateService': {
params: BidiBluetooth.Bluetooth.SimulateServiceParameters;
returnType: Bidi.EmptyResult;
};
'browser.close': {
params: Bidi.Extensible;
returnType: Bidi.Browser.CloseResult;
};
'browser.createUserContext': {
params: Bidi.Browser.CreateUserContextParameters;
returnType: Bidi.Browser.CreateUserContextResult;
};
'browser.getClientWindows': {
params: Bidi.Extensible;
returnType: Bidi.Browser.GetClientWindowsResult;
};
'browser.getUserContexts': {
params: Bidi.Extensible;
returnType: Bidi.Browser.GetUserContextsResult;
};
'browser.removeUserContext': {
params: Bidi.Browser.RemoveUserContextParameters;
returnType: Bidi.Browser.RemoveUserContextResult;
};
'browser.setClientWindowState': {
params: Bidi.Browser.SetClientWindowStateParameters;
returnType: Bidi.Browser.SetClientWindowStateResult;
};
'browser.setDownloadBehavior': {
params: Bidi.Browser.SetDownloadBehaviorParameters;
returnType: Bidi.Browser.SetDownloadBehaviorResult;
};
'browsingContext.activate': {
params: Bidi.BrowsingContext.ActivateParameters;
returnType: Bidi.BrowsingContext.ActivateResult;
};
'browsingContext.captureScreenshot': {
params: Bidi.BrowsingContext.CaptureScreenshotParameters;
returnType: Bidi.BrowsingContext.CaptureScreenshotResult;
};
'browsingContext.close': {
params: Bidi.BrowsingContext.CloseParameters;
returnType: Bidi.BrowsingContext.CloseResult;
};
'browsingContext.create': {
params: Bidi.BrowsingContext.CreateParameters;
returnType: Bidi.BrowsingContext.CreateResult;
};
'browsingContext.getTree': {
params: Bidi.BrowsingContext.GetTreeParameters;
returnType: Bidi.BrowsingContext.GetTreeResult;
};
'browsingContext.handleUserPrompt': {
params: Bidi.BrowsingContext.HandleUserPromptParameters;
returnType: Bidi.BrowsingContext.HandleUserPromptResult;
};
'browsingContext.locateNodes': {
params: Bidi.BrowsingContext.LocateNodesParameters;
returnType: Bidi.BrowsingContext.LocateNodesResult;
};
'browsingContext.navigate': {
params: Bidi.BrowsingContext.NavigateParameters;
returnType: Bidi.BrowsingContext.NavigateResult;
};
'browsingContext.print': {
params: Bidi.BrowsingContext.PrintParameters;
returnType: Bidi.BrowsingContext.PrintResult;
};
'browsingContext.reload': {
params: Bidi.BrowsingContext.ReloadParameters;
returnType: Bidi.BrowsingContext.ReloadResult;
};
'browsingContext.setViewport': {
params: Bidi.BrowsingContext.SetViewportParameters;
returnType: Bidi.BrowsingContext.SetViewportResult;
};
'browsingContext.traverseHistory': {
params: Bidi.BrowsingContext.TraverseHistoryParameters;
returnType: Bidi.BrowsingContext.TraverseHistoryResult;
};
'emulation.setForcedColorsModeThemeOverride': {
params: Bidi.Emulation.SetForcedColorsModeThemeOverrideParameters;
returnType: Bidi.Emulation.SetForcedColorsModeThemeOverrideResult;
};
'emulation.setGeolocationOverride': {
params: Bidi.Emulation.SetGeolocationOverrideParameters;
returnType: Bidi.Emulation.SetGeolocationOverrideResult;
};
'emulation.setLocaleOverride': {
params: Bidi.Emulation.SetLocaleOverrideParameters;
returnType: Bidi.Emulation.SetLocaleOverrideResult;
};
'emulation.setNetworkConditions': {
params: Bidi.Emulation.SetNetworkConditionsParameters;
returnType: Bidi.Emulation.SetNetworkConditionsResult;
};
'emulation.setScreenOrientationOverride': {
params: Bidi.Emulation.SetScreenOrientationOverrideParameters;
returnType: Bidi.Emulation.SetScreenOrientationOverrideResult;
};
'emulation.setScreenSettingsOverride': {
params: Bidi.Emulation.SetScreenSettingsOverrideParameters;
returnType: Bidi.Emulation.SetScreenSettingsOverrideResult;
};
'emulation.setScriptingEnabled': {
params: Bidi.Emulation.SetScriptingEnabledParameters;
returnType: Bidi.Emulation.SetScriptingEnabledResult;
};
'emulation.setScrollbarTypeOverride': {
params: Bidi.Emulation.SetScrollbarTypeOverrideParameters;
returnType: Bidi.Emulation.SetScrollbarTypeOverrideResult;
};
'emulation.setTimezoneOverride': {
params: Bidi.Emulation.SetTimezoneOverrideParameters;
returnType: Bidi.Emulation.SetTimezoneOverrideResult;
};
'emulation.setTouchOverride': {
params: Bidi.Emulation.SetTouchOverrideParameters;
returnType: Bidi.Emulation.SetTouchOverrideResult;
};
'emulation.setUserAgentOverride': {
params: Bidi.Emulation.SetUserAgentOverrideParameters;
returnType: Bidi.Emulation.SetUserAgentOverrideResult;
};
'input.performActions': {
params: Bidi.Input.PerformActionsParameters;
returnType: Bidi.Input.PerformActionsResult;
};
'input.releaseActions': {
params: Bidi.Input.ReleaseActionsParameters;
returnType: Bidi.Input.ReleaseActionsResult;
};
'input.setFiles': {
params: Bidi.Input.SetFilesParameters;
returnType: Bidi.Input.SetFilesResult;
};
'network.addDataCollector': {
params: Bidi.Network.AddDataCollectorParameters;
returnType: Bidi.Network.AddDataCollectorResult;
};
'network.addIntercept': {
params: Bidi.Network.AddInterceptParameters;
returnType: Bidi.Network.AddInterceptResult;
};
'network.continueRequest': {
params: Bidi.Network.ContinueRequestParameters;
returnType: Bidi.Network.ContinueRequestResult;
};
'network.continueResponse': {
params: Bidi.Network.ContinueResponseParameters;
returnType: Bidi.Network.ContinueResponseResult;
};
'network.continueWithAuth': {
params: Bidi.Network.ContinueWithAuthParameters;
returnType: Bidi.Network.ContinueWithAuthResult;
};
'network.disownData': {
params: Bidi.Network.DisownDataParameters;
returnType: Bidi.Network.DisownDataResult;
};
'network.failRequest': {
params: Bidi.Network.FailRequestParameters;
returnType: Bidi.Network.FailRequestResult;
};
'network.getData': {
params: Bidi.Network.GetDataParameters;
returnType: Bidi.Network.GetDataResult;
};
'network.provideResponse': {
params: Bidi.Network.ProvideResponseParameters;
returnType: Bidi.Network.ProvideResponseResult;
};
'network.removeDataCollector': {
params: Bidi.Network.RemoveDataCollectorParameters;
returnType: Bidi.Network.RemoveDataCollectorResult;
};
'network.removeIntercept': {
params: Bidi.Network.RemoveInterceptParameters;
returnType: Bidi.Network.RemoveInterceptResult;
};
'network.setCacheBehavior': {
params: Bidi.Network.SetCacheBehaviorParameters;
returnType: Bidi.Network.SetCacheBehaviorResult;
};
'network.setExtraHeaders': {
params: Bidi.Network.SetExtraHeadersParameters;
returnType: Bidi.Network.SetExtraHeadersResult;
};
'permissions.setPermission': {
params: BidiPermissions.Permissions.SetPermissionParameters;
returnType: Bidi.EmptyResult;
};
'script.addPreloadScript': {
params: Bidi.Script.AddPreloadScriptParameters;
returnType: Bidi.Script.AddPreloadScriptResult;
};
'script.callFunction': {
params: Bidi.Script.CallFunctionParameters;
returnType: Bidi.Script.CallFunctionResult;
};
'script.disown': {
params: Bidi.Script.DisownParameters;
returnType: Bidi.Script.DisownResult;
};
'script.evaluate': {
params: Bidi.Script.EvaluateParameters;
returnType: Bidi.Script.EvaluateResult;
};
'script.getRealms': {
params: Bidi.Script.GetRealmsParameters;
returnType: Bidi.Script.GetRealmsResult;
};
'script.removePreloadScript': {
params: Bidi.Script.RemovePreloadScriptParameters;
returnType: Bidi.Script.RemovePreloadScriptResult;
};
'session.end': {
params: Bidi.Extensible;
returnType: Bidi.Session.EndResult;
};
'session.new': {
params: Bidi.Session.NewParameters;
returnType: Bidi.Session.NewResult;
};
'session.status': {
params: Bidi.Extensible;
returnType: Bidi.Session.StatusResult;
};
'session.subscribe': {
params: Bidi.Session.SubscribeParameters;
returnType: Bidi.Session.SubscribeResult;
};
'session.unsubscribe': {
params: Bidi.Session.UnsubscribeParameters;
returnType: Bidi.Session.UnsubscribeResult;
};
'storage.deleteCookies': {
params: Bidi.Storage.DeleteCookiesParameters;
returnType: Bidi.Storage.DeleteCookiesResult;
};
'storage.getCookies': {
params: Bidi.Storage.GetCookiesParameters;
returnType: Bidi.Storage.GetCookiesResult;
};
'storage.setCookie': {
params: Bidi.Storage.SetCookieParameters;
returnType: Bidi.Storage.SetCookieResult;
};
'userAgentClientHints.setClientHintsOverride': {
params: {
clientHints: BidiUaClientHints.UserAgentClientHints.ClientHintsMetadata | null;
contexts?: [string, ...string[]];
userContexts?: [string, ...string[]];
};
returnType: BidiUaClientHints.UserAgentClientHints.SetClientHintsOverrideResult;
};
'webExtension.install': {
params: Bidi.WebExtension.InstallParameters;
returnType: Bidi.WebExtension.InstallResult;
};
'webExtension.uninstall': {
params: Bidi.WebExtension.UninstallParameters;
returnType: Bidi.WebExtension.UninstallResult;
};
}
+28
View File
@@ -0,0 +1,28 @@
export type PermissionsCommand = Permissions.SetPermission;
export namespace Permissions {
export type PermissionDescriptor = {
name: string;
};
}
export namespace Permissions {
export const enum PermissionState {
Granted = 'granted',
Denied = 'denied',
Prompt = 'prompt',
}
}
export namespace Permissions {
export type SetPermission = {
method: 'permissions.setPermission';
params: Permissions.SetPermissionParameters;
};
}
export namespace Permissions {
export type SetPermissionParameters = {
descriptor: Permissions.PermissionDescriptor;
state: Permissions.PermissionState;
origin: string;
embeddedOrigin?: string;
userContext?: string;
};
}
@@ -0,0 +1,35 @@
export type UserAgentClientHintsCommand =
UserAgentClientHints.SetClientHintsOverrideCommand;
export namespace UserAgentClientHints {
export type SetClientHintsOverrideCommand = {
method: 'userAgentClientHints.setClientHintsOverride';
params: {
clientHints: UserAgentClientHints.ClientHintsMetadata | null;
contexts?: [string, ...string[]];
userContexts?: [string, ...string[]];
};
};
}
export namespace UserAgentClientHints {
export type ClientHintsMetadata = {
brands?: [...UserAgentClientHints.BrandVersion[]];
fullVersionList?: [...UserAgentClientHints.BrandVersion[]];
platform?: string;
platformVersion?: string;
architecture?: string;
model?: string;
mobile?: boolean;
bitness?: string;
wow64?: boolean;
formFactors?: [...string[]];
};
}
export namespace UserAgentClientHints {
export type BrandVersion = {
brand: string;
version: string;
};
}
export namespace UserAgentClientHints {
export type SetClientHintsOverrideResult = Record<string, never>;
}
+314
View File
@@ -0,0 +1,314 @@
export namespace Bluetooth {
export type BluetoothUuid = string;
}
export namespace Bluetooth {
export type BluetoothManufacturerData = {
key: number;
data: string;
};
}
export namespace Bluetooth {
export type CharacteristicProperties = {
broadcast?: boolean;
read?: boolean;
writeWithoutResponse?: boolean;
write?: boolean;
notify?: boolean;
indicate?: boolean;
authenticatedSignedWrites?: boolean;
extendedProperties?: boolean;
};
}
export namespace Bluetooth {
export type RequestDevice = string;
}
export namespace Bluetooth {
export type RequestDeviceInfo = {
id: Bluetooth.RequestDevice;
name: string | null;
};
}
export namespace Bluetooth {
export type RequestDevicePrompt = string;
}
export namespace Bluetooth {
export type ScanRecord = {
name?: string;
uuids?: [...Bluetooth.BluetoothUuid[]];
appearance?: number;
manufacturerData?: [...Bluetooth.BluetoothManufacturerData[]];
};
}
export type BluetoothCommand =
| Bluetooth.HandleRequestDevicePrompt
| Bluetooth.SimulateAdapter
| Bluetooth.DisableSimulation
| Bluetooth.SimulatePreconnectedPeripheral
| Bluetooth.SimulateAdvertisement
| Bluetooth.SimulateGattConnectionResponse
| Bluetooth.SimulateGattDisconnection
| Bluetooth.SimulateService
| Bluetooth.SimulateCharacteristic
| Bluetooth.SimulateCharacteristicResponse
| Bluetooth.SimulateDescriptor
| Bluetooth.SimulateDescriptorResponse;
export namespace Bluetooth {
export type HandleRequestDevicePrompt = {
method: 'bluetooth.handleRequestDevicePrompt';
params: Bluetooth.HandleRequestDevicePromptParameters;
};
}
export namespace Bluetooth {
export type HandleRequestDevicePromptParameters = {
context: string;
prompt: Bluetooth.RequestDevicePrompt;
} & (
| Bluetooth.HandleRequestDevicePromptAcceptParameters
| Bluetooth.HandleRequestDevicePromptCancelParameters
);
}
export namespace Bluetooth {
export type HandleRequestDevicePromptAcceptParameters = {
accept: true;
device: Bluetooth.RequestDevice;
};
}
export namespace Bluetooth {
export type HandleRequestDevicePromptCancelParameters = {
accept: false;
};
}
export namespace Bluetooth {
export type SimulateAdapter = {
method: 'bluetooth.simulateAdapter';
params: Bluetooth.SimulateAdapterParameters;
};
}
export namespace Bluetooth {
export type SimulateAdapterParameters = {
context: string;
leSupported?: boolean;
state: 'absent' | 'powered-off' | 'powered-on';
};
}
export namespace Bluetooth {
export type DisableSimulation = {
method: 'bluetooth.disableSimulation';
params: Bluetooth.DisableSimulationParameters;
};
}
export namespace Bluetooth {
export type DisableSimulationParameters = {
context: string;
};
}
export namespace Bluetooth {
export type SimulatePreconnectedPeripheral = {
method: 'bluetooth.simulatePreconnectedPeripheral';
params: Bluetooth.SimulatePreconnectedPeripheralParameters;
};
}
export namespace Bluetooth {
export type SimulatePreconnectedPeripheralParameters = {
context: string;
address: string;
name: string;
manufacturerData: [...Bluetooth.BluetoothManufacturerData[]];
knownServiceUuids: [...Bluetooth.BluetoothUuid[]];
};
}
export namespace Bluetooth {
export type SimulateAdvertisement = {
method: 'bluetooth.simulateAdvertisement';
params: Bluetooth.SimulateAdvertisementParameters;
};
}
export namespace Bluetooth {
export type SimulateAdvertisementParameters = {
context: string;
scanEntry: Bluetooth.SimulateAdvertisementScanEntryParameters;
};
}
export namespace Bluetooth {
export type SimulateAdvertisementScanEntryParameters = {
deviceAddress: string;
rssi: number;
scanRecord: Bluetooth.ScanRecord;
};
}
export namespace Bluetooth {
export type SimulateGattConnectionResponse = {
method: 'bluetooth.simulateGattConnectionResponse';
params: Bluetooth.SimulateGattConnectionResponseParameters;
};
}
export namespace Bluetooth {
export type SimulateGattConnectionResponseParameters = {
context: string;
address: string;
code: number;
};
}
export namespace Bluetooth {
export type SimulateGattDisconnection = {
method: 'bluetooth.simulateGattDisconnection';
params: Bluetooth.SimulateGattDisconnectionParameters;
};
}
export namespace Bluetooth {
export type SimulateGattDisconnectionParameters = {
context: string;
address: string;
};
}
export namespace Bluetooth {
export type SimulateService = {
method: 'bluetooth.simulateService';
params: Bluetooth.SimulateServiceParameters;
};
}
export namespace Bluetooth {
export type SimulateServiceParameters = {
context: string;
address: string;
uuid: Bluetooth.BluetoothUuid;
type: 'add' | 'remove';
};
}
export namespace Bluetooth {
export type SimulateCharacteristic = {
method: 'bluetooth.simulateCharacteristic';
params: Bluetooth.SimulateCharacteristicParameters;
};
}
export namespace Bluetooth {
export type SimulateCharacteristicParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
characteristicProperties?: Bluetooth.CharacteristicProperties;
type: 'add' | 'remove';
};
}
export namespace Bluetooth {
export type SimulateCharacteristicResponse = {
method: 'bluetooth.simulateCharacteristicResponse';
params: Bluetooth.SimulateCharacteristicResponseParameters;
};
}
export namespace Bluetooth {
export type SimulateCharacteristicResponseParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
type:
| 'read'
| 'write'
| 'subscribe-to-notifications'
| 'unsubscribe-from-notifications';
code: number;
data?: [...number[]];
};
}
export namespace Bluetooth {
export type SimulateDescriptor = {
method: 'bluetooth.simulateDescriptor';
params: Bluetooth.SimulateDescriptorParameters;
};
}
export namespace Bluetooth {
export type SimulateDescriptorParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'add' | 'remove';
};
}
export namespace Bluetooth {
export type SimulateDescriptorResponse = {
method: 'bluetooth.simulateDescriptorResponse';
params: Bluetooth.SimulateDescriptorResponseParameters;
};
}
export namespace Bluetooth {
export type SimulateDescriptorResponseParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'read' | 'write';
code: number;
data?: [...number[]];
};
}
export type BluetoothEvent =
| Bluetooth.RequestDevicePromptUpdated
| Bluetooth.GattConnectionAttempted;
export namespace Bluetooth {
export type RequestDevicePromptUpdated = {
method: 'bluetooth.requestDevicePromptUpdated';
params: Bluetooth.RequestDevicePromptUpdatedParameters;
};
}
export namespace Bluetooth {
export type RequestDevicePromptUpdatedParameters = {
context: string;
prompt: Bluetooth.RequestDevicePrompt;
devices: [...Bluetooth.RequestDeviceInfo[]];
};
}
export namespace Bluetooth {
export type GattConnectionAttempted = {
method: 'bluetooth.gattConnectionAttempted';
params: Bluetooth.GattConnectionAttemptedParameters;
};
}
export namespace Bluetooth {
export type GattConnectionAttemptedParameters = {
context: string;
address: string;
};
}
export namespace Bluetooth {
export type CharacteristicEventGenerated = {
method: 'bluetooth.characteristicEventGenerated';
params: Bluetooth.CharacteristicEventGeneratedParameters;
};
}
export namespace Bluetooth {
export type CharacteristicEventGeneratedParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
type:
| 'read'
| 'write-with-response'
| 'write-without-response'
| 'subscribe-to-notifications'
| 'unsubscribe-from-notifications';
data?: [...number[]];
};
}
export namespace Bluetooth {
export type DescriptorEventGenerated = {
method: 'bluetooth.descriptorEventGenerated';
params: Bluetooth.DescriptorEventGeneratedParameters;
};
}
export namespace Bluetooth {
export type DescriptorEventGeneratedParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'read' | 'write';
data?: [...number[]];
};
}
+46
View File
@@ -0,0 +1,46 @@
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
import * as Bidi from './gen/main.js';
import * as BidiPermissions from './gen/permissions.js';
import * as BidiBluetooth from './gen/web-bluetooth.js';
import * as BidiUaClientHints from './gen/ua-client-hints.js';
export * from './gen/main.js';
export * from './gen/permissions.js';
export * from './gen/web-bluetooth.js';
// Only `UserAgentClientHintsCommand` is exported, because the UA-CH extends
// the `emulation` WebDriver BiDi domain and exposes `Emulation` namespace
// which is already exported by main spec.
export {UserAgentClientHintsCommand} from './gen/ua-client-hints.js';
export {BidiUaClientHints};
export * from './gen/mapping.js';
type ExternalSpecCommand<T> = {
// id is defined by the main WebDriver BiDi spec and extension specs do
// not re-define it. Therefore, it's not part of generated types.
id: Bidi.JsUint;
} & T;
export type Result = Bidi.ResultData;
export type Command =
| Bidi.Command
| ExternalSpecCommand<BidiPermissions.PermissionsCommand>
| ExternalSpecCommand<BidiBluetooth.BluetoothCommand>
| ExternalSpecCommand<BidiUaClientHints.UserAgentClientHintsCommand>;
type ExternalSpecEvent<T> = {
// type is defined by the main WebDriver BiDi spec and extension specs do
// not re-define it. Therefore, it's not part of generated types.
type: 'event';
} & T &
Bidi.Extensible;
export type Event =
| Bidi.Event
| ExternalSpecEvent<BidiBluetooth.BluetoothEvent>;