webdriver-bidi-protocol 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,6 @@ updates:
32
32
  directory: /
33
33
  schedule:
34
34
  interval: daily
35
- open-pull-requests-limit: 1
35
+ open-pull-requests-limit: 5
36
36
  labels:
37
37
  - commit-updates
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.1.8"
2
+ ".": "0.2.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # Changelog
2
2
 
3
+ ## [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)
4
+
5
+
6
+ ### Features
7
+
8
+ * add bluetooth ([#66](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/66)) ([e42e8d9](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/e42e8d9896540020955d81b08066bdf92ed16602))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add repository ([#19](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/19)) ([91def9d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/91def9dd0baeab3476e7154676e40d5a709da2c3))
14
+ * another repository fix ([72c215c](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/72c215cbcf76c97317deff925d1ff73732ed5bab))
15
+ * 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))
16
+ * 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))
17
+ * 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))
18
+ * 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))
19
+ * 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))
20
+ * 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))
21
+ * 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))
22
+ * 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))
23
+ * document usage ([#7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/7)) ([d98a6ee](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d98a6ee23cbaa943440e2b40831a0c56aa0d6c18))
24
+ * 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))
25
+ * 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))
26
+ * 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))
27
+ * 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))
28
+ * 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))
29
+ * 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))
30
+ * 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))
31
+ * 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))
32
+ * 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))
33
+ * 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))
34
+ * 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))
35
+ * 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))
36
+ * 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))
37
+ * 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))
38
+ * 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))
39
+ * 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))
40
+ * 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))
41
+ * 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))
42
+ * update repository ([28cf911](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/28cf911e59ad5b177df47d04fc012d8c9cfe7fde))
43
+
44
+ ## [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)
45
+
46
+
47
+ ### Bug Fixes
48
+
49
+ * 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))
50
+
51
+ ## [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)
52
+
53
+
54
+ ### Bug Fixes
55
+
56
+ * 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))
57
+ * 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))
58
+ * 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))
59
+ * 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))
60
+ * 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))
61
+
3
62
  ## [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)
4
63
 
5
64
 
package/out/gen/main.d.ts CHANGED
@@ -63,11 +63,13 @@ export declare const enum ErrorCode {
63
63
  InvalidWebExtension = 'invalid web extension',
64
64
  MoveTargetOutOfBounds = 'move target out of bounds',
65
65
  NoSuchAlert = 'no such alert',
66
+ NoSuchNetworkCollector = 'no such network collector',
66
67
  NoSuchElement = 'no such element',
67
68
  NoSuchFrame = 'no such frame',
68
69
  NoSuchHandle = 'no such handle',
69
70
  NoSuchHistoryEntry = 'no such history entry',
70
71
  NoSuchIntercept = 'no such intercept',
72
+ NoSuchNetworkData = 'no such network data',
71
73
  NoSuchNode = 'no such node',
72
74
  NoSuchRequest = 'no such request',
73
75
  NoSuchScript = 'no such script',
@@ -79,6 +81,7 @@ export declare const enum ErrorCode {
79
81
  UnableToCloseBrowser = 'unable to close browser',
80
82
  UnableToSetCookie = 'unable to set cookie',
81
83
  UnableToSetFileInput = 'unable to set file input',
84
+ UnavailableNetworkData = 'unavailable network data',
82
85
  UnderspecifiedStoragePartition = 'underspecified storage partition',
83
86
  UnknownCommand = 'unknown command',
84
87
  UnknownError = 'unknown error',
@@ -131,7 +134,6 @@ export declare namespace Session {
131
134
  export declare namespace Session {
132
135
  type ManualProxyConfiguration = {
133
136
  proxyType: 'manual';
134
- ftpProxy?: string;
135
137
  httpProxy?: string;
136
138
  sslProxy?: string;
137
139
  } & ({} | Session.SocksProxyConfiguration) & {
@@ -310,7 +312,13 @@ export declare namespace Browser {
310
312
  export declare namespace Browser {
311
313
  type CreateUserContext = {
312
314
  method: 'browser.createUserContext';
313
- params: EmptyParams;
315
+ params: Browser.CreateUserContextParameters;
316
+ };
317
+ }
318
+ export declare namespace Browser {
319
+ type CreateUserContextParameters = {
320
+ acceptInsecureCerts?: boolean;
321
+ proxy?: Session.ProxyConfiguration;
314
322
  };
315
323
  }
316
324
  export declare namespace Browser {
@@ -391,6 +399,7 @@ export type BrowsingContextEvent =
391
399
  | BrowsingContext.ContextCreated
392
400
  | BrowsingContext.ContextDestroyed
393
401
  | BrowsingContext.DomContentLoaded
402
+ | BrowsingContext.DownloadEnd
394
403
  | BrowsingContext.DownloadWillBegin
395
404
  | BrowsingContext.FragmentNavigated
396
405
  | BrowsingContext.HistoryUpdated
@@ -843,6 +852,7 @@ export declare namespace BrowsingContext {
843
852
  export declare namespace BrowsingContext {
844
853
  type HistoryUpdatedParameters = {
845
854
  context: BrowsingContext.BrowsingContext;
855
+ timestamp: JsUint;
846
856
  url: string;
847
857
  };
848
858
  }
@@ -869,6 +879,28 @@ export declare namespace BrowsingContext {
869
879
  suggestedFilename: string;
870
880
  } & BrowsingContext.BaseNavigationInfo;
871
881
  }
882
+ export declare namespace BrowsingContext {
883
+ type DownloadEnd = {
884
+ method: 'browsingContext.downloadEnd';
885
+ params: BrowsingContext.DownloadEndParams;
886
+ };
887
+ }
888
+ export declare namespace BrowsingContext {
889
+ type DownloadEndParams =
890
+ | BrowsingContext.DownloadCanceledParams
891
+ | BrowsingContext.DownloadCompleteParams;
892
+ }
893
+ export declare namespace BrowsingContext {
894
+ type DownloadCanceledParams = {
895
+ status: 'canceled';
896
+ } & BrowsingContext.BaseNavigationInfo;
897
+ }
898
+ export declare namespace BrowsingContext {
899
+ type DownloadCompleteParams = {
900
+ status: 'complete';
901
+ filepath: string | null;
902
+ } & BrowsingContext.BaseNavigationInfo;
903
+ }
872
904
  export declare namespace BrowsingContext {
873
905
  type NavigationAborted = {
874
906
  method: 'browsingContext.navigationAborted';
@@ -916,7 +948,9 @@ export declare namespace BrowsingContext {
916
948
  defaultValue?: string;
917
949
  };
918
950
  }
919
- export type EmulationCommand = Emulation.SetGeolocationOverride;
951
+ export type EmulationCommand =
952
+ | Emulation.SetGeolocationOverride
953
+ | Emulation.SetScreenOrientationOverride;
920
954
  export declare namespace Emulation {
921
955
  type SetGeolocationOverride = {
922
956
  method: 'emulation.setGeolocationOverride';
@@ -924,8 +958,14 @@ export declare namespace Emulation {
924
958
  };
925
959
  }
926
960
  export declare namespace Emulation {
927
- type SetGeolocationOverrideParameters = {
928
- coordinates: Emulation.GeolocationCoordinates | null;
961
+ type SetGeolocationOverrideParameters = (
962
+ | {
963
+ coordinates: Emulation.GeolocationCoordinates | null;
964
+ }
965
+ | {
966
+ error: Emulation.GeolocationPositionError;
967
+ }
968
+ ) & {
929
969
  contexts?: [
930
970
  BrowsingContext.BrowsingContext,
931
971
  ...BrowsingContext.BrowsingContext[],
@@ -935,9 +975,17 @@ export declare namespace Emulation {
935
975
  }
936
976
  export declare namespace Emulation {
937
977
  type GeolocationCoordinates = {
978
+ /**
979
+ * Must be between `-90` and `90`, inclusive.
980
+ */
938
981
  latitude: number;
982
+ /**
983
+ * Must be between `-180` and `180`, inclusive.
984
+ */
939
985
  longitude: number;
940
986
  /**
987
+ * Must be greater than or equal to `0`.
988
+ *
941
989
  * @defaultValue `1`
942
990
  */
943
991
  accuracy?: number;
@@ -946,26 +994,75 @@ export declare namespace Emulation {
946
994
  */
947
995
  altitude?: number | null;
948
996
  /**
997
+ * Must be greater than or equal to `0`.
998
+ *
949
999
  * @defaultValue `null`
950
1000
  */
951
1001
  altitudeAccuracy?: number | null;
952
1002
  /**
1003
+ * Must be between `0` and `360`.
1004
+ *
953
1005
  * @defaultValue `null`
954
1006
  */
955
1007
  heading?: number | null;
956
1008
  /**
1009
+ * Must be greater than or equal to `0`.
1010
+ *
957
1011
  * @defaultValue `null`
958
1012
  */
959
1013
  speed?: number | null;
960
1014
  };
961
1015
  }
1016
+ export declare namespace Emulation {
1017
+ type GeolocationPositionError = {
1018
+ type: 'positionUnavailable';
1019
+ };
1020
+ }
1021
+ export declare namespace Emulation {
1022
+ type SetScreenOrientationOverride = {
1023
+ method: 'emulation.setScreenOrientationOverride';
1024
+ params: Emulation.SetScreenOrientationOverrideParameters;
1025
+ };
1026
+ }
1027
+ export declare namespace Emulation {
1028
+ const enum ScreenOrientationNatural {
1029
+ Portrait = 'portrait',
1030
+ Landscape = 'landscape',
1031
+ }
1032
+ }
1033
+ export declare namespace Emulation {
1034
+ type ScreenOrientationType =
1035
+ | 'portrait-primary'
1036
+ | 'portrait-secondary'
1037
+ | 'landscape-primary'
1038
+ | 'landscape-secondary';
1039
+ }
1040
+ export declare namespace Emulation {
1041
+ type ScreenOrientation = {
1042
+ natural: Emulation.ScreenOrientationNatural;
1043
+ type: Emulation.ScreenOrientationType;
1044
+ };
1045
+ }
1046
+ export declare namespace Emulation {
1047
+ type SetScreenOrientationOverrideParameters = {
1048
+ screenOrientation: Emulation.ScreenOrientation | null;
1049
+ contexts?: [
1050
+ BrowsingContext.BrowsingContext,
1051
+ ...BrowsingContext.BrowsingContext[],
1052
+ ];
1053
+ userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
1054
+ };
1055
+ }
962
1056
  export type NetworkCommand =
1057
+ | Network.AddDataCollector
963
1058
  | Network.AddIntercept
964
1059
  | Network.ContinueRequest
965
1060
  | Network.ContinueResponse
966
1061
  | Network.ContinueWithAuth
967
1062
  | Network.FailRequest
1063
+ | Network.GetData
968
1064
  | Network.ProvideResponse
1065
+ | Network.RemoveDataCollector
969
1066
  | Network.RemoveIntercept
970
1067
  | Network.SetCacheBehavior;
971
1068
  export type NetworkEvent =
@@ -999,6 +1096,11 @@ export declare namespace Network {
999
1096
  intercepts?: [Network.Intercept, ...Network.Intercept[]];
1000
1097
  };
1001
1098
  }
1099
+ export declare namespace Network {
1100
+ const enum DataType {
1101
+ Response = 'response',
1102
+ }
1103
+ }
1002
1104
  export declare namespace Network {
1003
1105
  type BytesValue = Network.StringValue | Network.Base64Value;
1004
1106
  }
@@ -1014,6 +1116,14 @@ export declare namespace Network {
1014
1116
  value: string;
1015
1117
  };
1016
1118
  }
1119
+ export declare namespace Network {
1120
+ type Collector = string;
1121
+ }
1122
+ export declare namespace Network {
1123
+ const enum CollectorType {
1124
+ Blob = 'blob',
1125
+ }
1126
+ }
1017
1127
  export declare namespace Network {
1018
1128
  const enum SameSite {
1019
1129
  Strict = 'strict',
@@ -1145,6 +1255,32 @@ export declare namespace Network {
1145
1255
  pattern: string;
1146
1256
  };
1147
1257
  }
1258
+ export declare namespace Network {
1259
+ type AddDataCollector = {
1260
+ method: 'network.addDataCollector';
1261
+ params: Network.AddDataCollectorParameters;
1262
+ };
1263
+ }
1264
+ export declare namespace Network {
1265
+ type AddDataCollectorParameters = {
1266
+ dataTypes: [Network.DataType, ...Network.DataType[]];
1267
+ maxEncodedDataSize: JsUint;
1268
+ /**
1269
+ * @defaultValue `"blob"`
1270
+ */
1271
+ collectorType?: Network.CollectorType;
1272
+ contexts?: [
1273
+ BrowsingContext.BrowsingContext,
1274
+ ...BrowsingContext.BrowsingContext[],
1275
+ ];
1276
+ userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
1277
+ };
1278
+ }
1279
+ export declare namespace Network {
1280
+ type AddDataCollectorResult = {
1281
+ collector: Network.Collector;
1282
+ };
1283
+ }
1148
1284
  export declare namespace Network {
1149
1285
  type AddInterceptParameters = {
1150
1286
  phases: [Network.InterceptPhase, ...Network.InterceptPhase[]];
@@ -1230,6 +1366,19 @@ export declare namespace Network {
1230
1366
  action: 'default' | 'cancel';
1231
1367
  };
1232
1368
  }
1369
+ export declare namespace Network {
1370
+ type DisownData = {
1371
+ method: 'network.disownData';
1372
+ params: Network.DisownDataParameters;
1373
+ };
1374
+ }
1375
+ export declare namespace Network {
1376
+ type DisownDataParameters = {
1377
+ dataType: Network.DataType;
1378
+ collector: Network.Collector;
1379
+ request: Network.Request;
1380
+ };
1381
+ }
1233
1382
  export declare namespace Network {
1234
1383
  type FailRequest = {
1235
1384
  method: 'network.failRequest';
@@ -1241,6 +1390,28 @@ export declare namespace Network {
1241
1390
  request: Network.Request;
1242
1391
  };
1243
1392
  }
1393
+ export declare namespace Network {
1394
+ type GetData = {
1395
+ method: 'network.getData';
1396
+ params: Network.GetDataParameters;
1397
+ };
1398
+ }
1399
+ export declare namespace Network {
1400
+ type GetDataParameters = {
1401
+ dataType: Network.DataType;
1402
+ collector?: Network.Collector;
1403
+ /**
1404
+ * @defaultValue `false`
1405
+ */
1406
+ disown?: boolean;
1407
+ request: Network.Request;
1408
+ };
1409
+ }
1410
+ export declare namespace Script {
1411
+ type GetDataResult = {
1412
+ bytes: Network.BytesValue;
1413
+ };
1414
+ }
1244
1415
  export declare namespace Network {
1245
1416
  type ProvideResponse = {
1246
1417
  method: 'network.provideResponse';
@@ -1257,6 +1428,17 @@ export declare namespace Network {
1257
1428
  statusCode?: JsUint;
1258
1429
  };
1259
1430
  }
1431
+ export declare namespace Network {
1432
+ type RemoveDataCollector = {
1433
+ method: 'network.removeDataCollector';
1434
+ params: Network.RemoveDataCollectorParameters;
1435
+ };
1436
+ }
1437
+ export declare namespace Network {
1438
+ type RemoveDataCollectorParameters = {
1439
+ collector: Network.Collector;
1440
+ };
1441
+ }
1260
1442
  export declare namespace Network {
1261
1443
  type RemoveIntercept = {
1262
1444
  method: 'network.removeIntercept';
@@ -1666,16 +1848,16 @@ export declare namespace Script {
1666
1848
  };
1667
1849
  }
1668
1850
  export declare namespace Script {
1669
- type RegExpRemoteValue = {
1851
+ type RegExpRemoteValue = Script.RegExpLocalValue & {
1670
1852
  handle?: Script.Handle;
1671
1853
  internalId?: Script.InternalId;
1672
- } & Script.RegExpLocalValue;
1854
+ };
1673
1855
  }
1674
1856
  export declare namespace Script {
1675
- type DateRemoteValue = {
1857
+ type DateRemoteValue = Script.DateLocalValue & {
1676
1858
  handle?: Script.Handle;
1677
1859
  internalId?: Script.InternalId;
1678
- } & Script.DateLocalValue;
1860
+ };
1679
1861
  }
1680
1862
  export declare namespace Script {
1681
1863
  type MapRemoteValue = {
@@ -1,5 +1,5 @@
1
1
  export declare namespace Bluetooth {
2
- type BluetoothServiceUuid = string;
2
+ type BluetoothUuid = string;
3
3
  }
4
4
  export declare namespace Bluetooth {
5
5
  type BluetoothManufacturerData = {
@@ -7,6 +7,18 @@ export declare namespace Bluetooth {
7
7
  data: string;
8
8
  };
9
9
  }
10
+ export declare namespace Bluetooth {
11
+ type CharacteristicProperties = {
12
+ broadcast?: boolean;
13
+ read?: boolean;
14
+ writeWithoutResponse?: boolean;
15
+ write?: boolean;
16
+ notify?: boolean;
17
+ indicate?: boolean;
18
+ authenticatedSignedWrites?: boolean;
19
+ extendedProperties?: boolean;
20
+ };
21
+ }
10
22
  export declare namespace Bluetooth {
11
23
  type RequestDevice = string;
12
24
  }
@@ -22,7 +34,7 @@ export declare namespace Bluetooth {
22
34
  export declare namespace Bluetooth {
23
35
  type ScanRecord = {
24
36
  name?: string;
25
- uuids?: [...Bluetooth.BluetoothServiceUuid[]];
37
+ uuids?: [...Bluetooth.BluetoothUuid[]];
26
38
  appearance?: number;
27
39
  manufacturerData?: [...Bluetooth.BluetoothManufacturerData[]];
28
40
  };
@@ -33,6 +45,13 @@ export type BluetoothCommand =
33
45
  | Bluetooth.DisableSimulation
34
46
  | Bluetooth.SimulatePreconnectedPeripheral
35
47
  | Bluetooth.SimulateAdvertisement
48
+ | Bluetooth.SimulateGattConnectionResponse
49
+ | Bluetooth.SimulateGattDisconnection
50
+ | Bluetooth.SimulateService
51
+ | Bluetooth.SimulateCharacteristic
52
+ | Bluetooth.SimulateCharacteristicResponse
53
+ | Bluetooth.SimulateDescriptor
54
+ | Bluetooth.SimulateDescriptorResponse
36
55
  | Record<string, never>;
37
56
  export declare namespace Bluetooth {
38
57
  type HandleRequestDevicePrompt = {
@@ -96,7 +115,7 @@ export declare namespace Bluetooth {
96
115
  address: string;
97
116
  name: string;
98
117
  manufacturerData: [...Bluetooth.BluetoothManufacturerData[]];
99
- knownServiceUuids: [...Bluetooth.BluetoothServiceUuid[]];
118
+ knownServiceUuids: [...Bluetooth.BluetoothUuid[]];
100
119
  };
101
120
  }
102
121
  export declare namespace Bluetooth {
@@ -118,6 +137,119 @@ export declare namespace Bluetooth {
118
137
  scanRecord: Bluetooth.ScanRecord;
119
138
  };
120
139
  }
140
+ export declare namespace Bluetooth {
141
+ type SimulateGattConnectionResponse = {
142
+ method: 'bluetooth.simulateGattConnectionResponse';
143
+ params: Bluetooth.SimulateGattConnectionResponseParameters;
144
+ };
145
+ }
146
+ export declare namespace Bluetooth {
147
+ type SimulateGattConnectionResponseParameters = {
148
+ context: string;
149
+ address: string;
150
+ code: number;
151
+ };
152
+ }
153
+ export declare namespace Bluetooth {
154
+ type SimulateGattDisconnection = {
155
+ method: 'bluetooth.simulateGattDisconnection';
156
+ params: Bluetooth.SimulateGattDisconnectionParameters;
157
+ };
158
+ }
159
+ export declare namespace Bluetooth {
160
+ type SimulateGattDisconnectionParameters = {
161
+ context: string;
162
+ address: string;
163
+ };
164
+ }
165
+ export declare namespace Bluetooth {
166
+ type SimulateService = {
167
+ method: 'bluetooth.simulateService';
168
+ params: Bluetooth.SimulateServiceParameters;
169
+ };
170
+ }
171
+ export declare namespace Bluetooth {
172
+ type SimulateServiceParameters = {
173
+ context: string;
174
+ address: string;
175
+ uuid: Bluetooth.BluetoothUuid;
176
+ type: 'add' | 'remove';
177
+ };
178
+ }
179
+ export declare namespace Bluetooth {
180
+ type SimulateCharacteristic = {
181
+ method: 'bluetooth.simulateCharacteristic';
182
+ params: Bluetooth.SimulateCharacteristicParameters;
183
+ };
184
+ }
185
+ export declare namespace Bluetooth {
186
+ type SimulateCharacteristicParameters = {
187
+ context: string;
188
+ address: string;
189
+ serviceUuid: Bluetooth.BluetoothUuid;
190
+ characteristicUuid: Bluetooth.BluetoothUuid;
191
+ characteristicProperties?: Bluetooth.CharacteristicProperties;
192
+ type: 'add' | 'remove';
193
+ };
194
+ }
195
+ export declare namespace Bluetooth {
196
+ type SimulateCharacteristicResponse = {
197
+ method: 'bluetooth.simulateCharacteristicResponse';
198
+ params: Bluetooth.SimulateCharacteristicResponseParameters;
199
+ };
200
+ }
201
+ export declare namespace Bluetooth {
202
+ type SimulateCharacteristicResponseParameters = {
203
+ context: string;
204
+ address: string;
205
+ serviceUuid: Bluetooth.BluetoothUuid;
206
+ characteristicUuid: Bluetooth.BluetoothUuid;
207
+ type:
208
+ | 'read'
209
+ | 'write'
210
+ | 'subscribe-to-notifications'
211
+ | 'unsubscribe-from-notifications';
212
+ code: number;
213
+ data?: [...number[]];
214
+ };
215
+ }
216
+ export declare namespace Bluetooth {
217
+ type SimulateDescriptor = {
218
+ method: 'bluetooth.simulateDescriptor';
219
+ params: Bluetooth.SimulateDescriptorParameters;
220
+ };
221
+ }
222
+ export declare namespace Bluetooth {
223
+ type SimulateDescriptorParameters = {
224
+ context: string;
225
+ address: string;
226
+ serviceUuid: Bluetooth.BluetoothUuid;
227
+ characteristicUuid: Bluetooth.BluetoothUuid;
228
+ descriptorUuid: Bluetooth.BluetoothUuid;
229
+ type: 'add' | 'remove';
230
+ };
231
+ }
232
+ export declare namespace Bluetooth {
233
+ type SimulateDescriptorResponse = {
234
+ method: 'bluetooth.simulateDescriptorResponse';
235
+ params: Bluetooth.SimulateDescriptorResponseParameters;
236
+ };
237
+ }
238
+ export declare namespace Bluetooth {
239
+ type SimulateDescriptorResponseParameters = {
240
+ context: string;
241
+ address: string;
242
+ serviceUuid: Bluetooth.BluetoothUuid;
243
+ characteristicUuid: Bluetooth.BluetoothUuid;
244
+ descriptorUuid: Bluetooth.BluetoothUuid;
245
+ type: 'read' | 'write';
246
+ code: number;
247
+ data?: [...number[]];
248
+ };
249
+ }
250
+ export type BluetoothEvent =
251
+ | Bluetooth.RequestDevicePromptUpdated
252
+ | Bluetooth.GattConnectionAttempted;
121
253
  export declare namespace Bluetooth {
122
254
  type RequestDevicePromptUpdated = {
123
255
  method: 'bluetooth.requestDevicePromptUpdated';
@@ -131,3 +263,53 @@ export declare namespace Bluetooth {
131
263
  devices: [...Bluetooth.RequestDeviceInfo[]];
132
264
  };
133
265
  }
266
+ export declare namespace Bluetooth {
267
+ type GattConnectionAttempted = {
268
+ method: 'bluetooth.gattConnectionAttempted';
269
+ params: Bluetooth.GattConnectionAttemptedParameters;
270
+ };
271
+ }
272
+ export declare namespace Bluetooth {
273
+ type GattConnectionAttemptedParameters = {
274
+ context: string;
275
+ address: string;
276
+ };
277
+ }
278
+ export declare namespace Bluetooth {
279
+ type CharacteristicEventGenerated = {
280
+ method: 'bluetooth.characteristicEventGenerated';
281
+ params: Bluetooth.CharacteristicEventGeneratedParameters;
282
+ };
283
+ }
284
+ export declare namespace Bluetooth {
285
+ type CharacteristicEventGeneratedParameters = {
286
+ context: string;
287
+ address: string;
288
+ serviceUuid: Bluetooth.BluetoothUuid;
289
+ characteristicUuid: Bluetooth.BluetoothUuid;
290
+ type:
291
+ | 'read'
292
+ | 'write-with-response'
293
+ | 'write-without-response'
294
+ | 'subscribe-to-notifications'
295
+ | 'unsubscribe-from-notifications';
296
+ data?: [...number[]];
297
+ };
298
+ }
299
+ export declare namespace Bluetooth {
300
+ type DescriptorEventGenerated = {
301
+ method: 'bluetooth.descriptorEventGenerated';
302
+ params: Bluetooth.DescriptorEventGeneratedParameters;
303
+ };
304
+ }
305
+ export declare namespace Bluetooth {
306
+ type DescriptorEventGeneratedParameters = {
307
+ context: string;
308
+ address: string;
309
+ serviceUuid: Bluetooth.BluetoothUuid;
310
+ characteristicUuid: Bluetooth.BluetoothUuid;
311
+ descriptorUuid: Bluetooth.BluetoothUuid;
312
+ type: 'read' | 'write';
313
+ data?: [...number[]];
314
+ };
315
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdriver-bidi-protocol",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",
@@ -20,11 +20,11 @@
20
20
  "url": "git+https://github.com/GoogleChromeLabs/webdriver-bidi-protocol.git"
21
21
  },
22
22
  "devDependencies": {
23
- "@types/node": "^22.5.2",
23
+ "@types/node": "^24.0.4",
24
24
  "gts": "^6.0.2",
25
25
  "parse5": "^7.1.2",
26
- "prettier": "3.4.2",
27
- "tsd": "0.31.2",
28
- "typescript": "5.7.3"
26
+ "prettier": "3.6.1",
27
+ "tsd": "0.32.0",
28
+ "typescript": "5.8.3"
29
29
  }
30
30
  }
package/src/gen/main.ts CHANGED
@@ -65,11 +65,13 @@ export const enum ErrorCode {
65
65
  InvalidWebExtension = 'invalid web extension',
66
66
  MoveTargetOutOfBounds = 'move target out of bounds',
67
67
  NoSuchAlert = 'no such alert',
68
+ NoSuchNetworkCollector = 'no such network collector',
68
69
  NoSuchElement = 'no such element',
69
70
  NoSuchFrame = 'no such frame',
70
71
  NoSuchHandle = 'no such handle',
71
72
  NoSuchHistoryEntry = 'no such history entry',
72
73
  NoSuchIntercept = 'no such intercept',
74
+ NoSuchNetworkData = 'no such network data',
73
75
  NoSuchNode = 'no such node',
74
76
  NoSuchRequest = 'no such request',
75
77
  NoSuchScript = 'no such script',
@@ -81,6 +83,7 @@ export const enum ErrorCode {
81
83
  UnableToCloseBrowser = 'unable to close browser',
82
84
  UnableToSetCookie = 'unable to set cookie',
83
85
  UnableToSetFileInput = 'unable to set file input',
86
+ UnavailableNetworkData = 'unavailable network data',
84
87
  UnderspecifiedStoragePartition = 'underspecified storage partition',
85
88
  UnknownCommand = 'unknown command',
86
89
  UnknownError = 'unknown error',
@@ -133,7 +136,6 @@ export namespace Session {
133
136
  export namespace Session {
134
137
  export type ManualProxyConfiguration = {
135
138
  proxyType: 'manual';
136
- ftpProxy?: string;
137
139
  httpProxy?: string;
138
140
  sslProxy?: string;
139
141
  } & ({} | Session.SocksProxyConfiguration) & {
@@ -312,7 +314,13 @@ export namespace Browser {
312
314
  export namespace Browser {
313
315
  export type CreateUserContext = {
314
316
  method: 'browser.createUserContext';
315
- params: EmptyParams;
317
+ params: Browser.CreateUserContextParameters;
318
+ };
319
+ }
320
+ export namespace Browser {
321
+ export type CreateUserContextParameters = {
322
+ acceptInsecureCerts?: boolean;
323
+ proxy?: Session.ProxyConfiguration;
316
324
  };
317
325
  }
318
326
  export namespace Browser {
@@ -393,6 +401,7 @@ export type BrowsingContextEvent =
393
401
  | BrowsingContext.ContextCreated
394
402
  | BrowsingContext.ContextDestroyed
395
403
  | BrowsingContext.DomContentLoaded
404
+ | BrowsingContext.DownloadEnd
396
405
  | BrowsingContext.DownloadWillBegin
397
406
  | BrowsingContext.FragmentNavigated
398
407
  | BrowsingContext.HistoryUpdated
@@ -845,6 +854,7 @@ export namespace BrowsingContext {
845
854
  export namespace BrowsingContext {
846
855
  export type HistoryUpdatedParameters = {
847
856
  context: BrowsingContext.BrowsingContext;
857
+ timestamp: JsUint;
848
858
  url: string;
849
859
  };
850
860
  }
@@ -871,6 +881,28 @@ export namespace BrowsingContext {
871
881
  suggestedFilename: string;
872
882
  } & BrowsingContext.BaseNavigationInfo;
873
883
  }
884
+ export namespace BrowsingContext {
885
+ export type DownloadEnd = {
886
+ method: 'browsingContext.downloadEnd';
887
+ params: BrowsingContext.DownloadEndParams;
888
+ };
889
+ }
890
+ export namespace BrowsingContext {
891
+ export type DownloadEndParams =
892
+ | BrowsingContext.DownloadCanceledParams
893
+ | BrowsingContext.DownloadCompleteParams;
894
+ }
895
+ export namespace BrowsingContext {
896
+ export type DownloadCanceledParams = {
897
+ status: 'canceled';
898
+ } & BrowsingContext.BaseNavigationInfo;
899
+ }
900
+ export namespace BrowsingContext {
901
+ export type DownloadCompleteParams = {
902
+ status: 'complete';
903
+ filepath: string | null;
904
+ } & BrowsingContext.BaseNavigationInfo;
905
+ }
874
906
  export namespace BrowsingContext {
875
907
  export type NavigationAborted = {
876
908
  method: 'browsingContext.navigationAborted';
@@ -918,7 +950,9 @@ export namespace BrowsingContext {
918
950
  defaultValue?: string;
919
951
  };
920
952
  }
921
- export type EmulationCommand = Emulation.SetGeolocationOverride;
953
+ export type EmulationCommand =
954
+ | Emulation.SetGeolocationOverride
955
+ | Emulation.SetScreenOrientationOverride;
922
956
  export namespace Emulation {
923
957
  export type SetGeolocationOverride = {
924
958
  method: 'emulation.setGeolocationOverride';
@@ -926,8 +960,14 @@ export namespace Emulation {
926
960
  };
927
961
  }
928
962
  export namespace Emulation {
929
- export type SetGeolocationOverrideParameters = {
930
- coordinates: Emulation.GeolocationCoordinates | null;
963
+ export type SetGeolocationOverrideParameters = (
964
+ | {
965
+ coordinates: Emulation.GeolocationCoordinates | null;
966
+ }
967
+ | {
968
+ error: Emulation.GeolocationPositionError;
969
+ }
970
+ ) & {
931
971
  contexts?: [
932
972
  BrowsingContext.BrowsingContext,
933
973
  ...BrowsingContext.BrowsingContext[],
@@ -937,9 +977,17 @@ export namespace Emulation {
937
977
  }
938
978
  export namespace Emulation {
939
979
  export type GeolocationCoordinates = {
980
+ /**
981
+ * Must be between `-90` and `90`, inclusive.
982
+ */
940
983
  latitude: number;
984
+ /**
985
+ * Must be between `-180` and `180`, inclusive.
986
+ */
941
987
  longitude: number;
942
988
  /**
989
+ * Must be greater than or equal to `0`.
990
+ *
943
991
  * @defaultValue `1`
944
992
  */
945
993
  accuracy?: number;
@@ -948,26 +996,75 @@ export namespace Emulation {
948
996
  */
949
997
  altitude?: number | null;
950
998
  /**
999
+ * Must be greater than or equal to `0`.
1000
+ *
951
1001
  * @defaultValue `null`
952
1002
  */
953
1003
  altitudeAccuracy?: number | null;
954
1004
  /**
1005
+ * Must be between `0` and `360`.
1006
+ *
955
1007
  * @defaultValue `null`
956
1008
  */
957
1009
  heading?: number | null;
958
1010
  /**
1011
+ * Must be greater than or equal to `0`.
1012
+ *
959
1013
  * @defaultValue `null`
960
1014
  */
961
1015
  speed?: number | null;
962
1016
  };
963
1017
  }
1018
+ export namespace Emulation {
1019
+ export type GeolocationPositionError = {
1020
+ type: 'positionUnavailable';
1021
+ };
1022
+ }
1023
+ export namespace Emulation {
1024
+ export type SetScreenOrientationOverride = {
1025
+ method: 'emulation.setScreenOrientationOverride';
1026
+ params: Emulation.SetScreenOrientationOverrideParameters;
1027
+ };
1028
+ }
1029
+ export namespace Emulation {
1030
+ export const enum ScreenOrientationNatural {
1031
+ Portrait = 'portrait',
1032
+ Landscape = 'landscape',
1033
+ }
1034
+ }
1035
+ export namespace Emulation {
1036
+ export type ScreenOrientationType =
1037
+ | 'portrait-primary'
1038
+ | 'portrait-secondary'
1039
+ | 'landscape-primary'
1040
+ | 'landscape-secondary';
1041
+ }
1042
+ export namespace Emulation {
1043
+ export type ScreenOrientation = {
1044
+ natural: Emulation.ScreenOrientationNatural;
1045
+ type: Emulation.ScreenOrientationType;
1046
+ };
1047
+ }
1048
+ export namespace Emulation {
1049
+ export type SetScreenOrientationOverrideParameters = {
1050
+ screenOrientation: Emulation.ScreenOrientation | null;
1051
+ contexts?: [
1052
+ BrowsingContext.BrowsingContext,
1053
+ ...BrowsingContext.BrowsingContext[],
1054
+ ];
1055
+ userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
1056
+ };
1057
+ }
964
1058
  export type NetworkCommand =
1059
+ | Network.AddDataCollector
965
1060
  | Network.AddIntercept
966
1061
  | Network.ContinueRequest
967
1062
  | Network.ContinueResponse
968
1063
  | Network.ContinueWithAuth
969
1064
  | Network.FailRequest
1065
+ | Network.GetData
970
1066
  | Network.ProvideResponse
1067
+ | Network.RemoveDataCollector
971
1068
  | Network.RemoveIntercept
972
1069
  | Network.SetCacheBehavior;
973
1070
  export type NetworkEvent =
@@ -1001,6 +1098,11 @@ export namespace Network {
1001
1098
  intercepts?: [Network.Intercept, ...Network.Intercept[]];
1002
1099
  };
1003
1100
  }
1101
+ export namespace Network {
1102
+ export const enum DataType {
1103
+ Response = 'response',
1104
+ }
1105
+ }
1004
1106
  export namespace Network {
1005
1107
  export type BytesValue = Network.StringValue | Network.Base64Value;
1006
1108
  }
@@ -1016,6 +1118,14 @@ export namespace Network {
1016
1118
  value: string;
1017
1119
  };
1018
1120
  }
1121
+ export namespace Network {
1122
+ export type Collector = string;
1123
+ }
1124
+ export namespace Network {
1125
+ export const enum CollectorType {
1126
+ Blob = 'blob',
1127
+ }
1128
+ }
1019
1129
  export namespace Network {
1020
1130
  export const enum SameSite {
1021
1131
  Strict = 'strict',
@@ -1147,6 +1257,32 @@ export namespace Network {
1147
1257
  pattern: string;
1148
1258
  };
1149
1259
  }
1260
+ export namespace Network {
1261
+ export type AddDataCollector = {
1262
+ method: 'network.addDataCollector';
1263
+ params: Network.AddDataCollectorParameters;
1264
+ };
1265
+ }
1266
+ export namespace Network {
1267
+ export type AddDataCollectorParameters = {
1268
+ dataTypes: [Network.DataType, ...Network.DataType[]];
1269
+ maxEncodedDataSize: JsUint;
1270
+ /**
1271
+ * @defaultValue `"blob"`
1272
+ */
1273
+ collectorType?: Network.CollectorType;
1274
+ contexts?: [
1275
+ BrowsingContext.BrowsingContext,
1276
+ ...BrowsingContext.BrowsingContext[],
1277
+ ];
1278
+ userContexts?: [Browser.UserContext, ...Browser.UserContext[]];
1279
+ };
1280
+ }
1281
+ export namespace Network {
1282
+ export type AddDataCollectorResult = {
1283
+ collector: Network.Collector;
1284
+ };
1285
+ }
1150
1286
  export namespace Network {
1151
1287
  export type AddInterceptParameters = {
1152
1288
  phases: [Network.InterceptPhase, ...Network.InterceptPhase[]];
@@ -1232,6 +1368,19 @@ export namespace Network {
1232
1368
  action: 'default' | 'cancel';
1233
1369
  };
1234
1370
  }
1371
+ export namespace Network {
1372
+ export type DisownData = {
1373
+ method: 'network.disownData';
1374
+ params: Network.DisownDataParameters;
1375
+ };
1376
+ }
1377
+ export namespace Network {
1378
+ export type DisownDataParameters = {
1379
+ dataType: Network.DataType;
1380
+ collector: Network.Collector;
1381
+ request: Network.Request;
1382
+ };
1383
+ }
1235
1384
  export namespace Network {
1236
1385
  export type FailRequest = {
1237
1386
  method: 'network.failRequest';
@@ -1243,6 +1392,28 @@ export namespace Network {
1243
1392
  request: Network.Request;
1244
1393
  };
1245
1394
  }
1395
+ export namespace Network {
1396
+ export type GetData = {
1397
+ method: 'network.getData';
1398
+ params: Network.GetDataParameters;
1399
+ };
1400
+ }
1401
+ export namespace Network {
1402
+ export type GetDataParameters = {
1403
+ dataType: Network.DataType;
1404
+ collector?: Network.Collector;
1405
+ /**
1406
+ * @defaultValue `false`
1407
+ */
1408
+ disown?: boolean;
1409
+ request: Network.Request;
1410
+ };
1411
+ }
1412
+ export namespace Script {
1413
+ export type GetDataResult = {
1414
+ bytes: Network.BytesValue;
1415
+ };
1416
+ }
1246
1417
  export namespace Network {
1247
1418
  export type ProvideResponse = {
1248
1419
  method: 'network.provideResponse';
@@ -1259,6 +1430,17 @@ export namespace Network {
1259
1430
  statusCode?: JsUint;
1260
1431
  };
1261
1432
  }
1433
+ export namespace Network {
1434
+ export type RemoveDataCollector = {
1435
+ method: 'network.removeDataCollector';
1436
+ params: Network.RemoveDataCollectorParameters;
1437
+ };
1438
+ }
1439
+ export namespace Network {
1440
+ export type RemoveDataCollectorParameters = {
1441
+ collector: Network.Collector;
1442
+ };
1443
+ }
1262
1444
  export namespace Network {
1263
1445
  export type RemoveIntercept = {
1264
1446
  method: 'network.removeIntercept';
@@ -1670,16 +1852,16 @@ export namespace Script {
1670
1852
  };
1671
1853
  }
1672
1854
  export namespace Script {
1673
- export type RegExpRemoteValue = {
1855
+ export type RegExpRemoteValue = Script.RegExpLocalValue & {
1674
1856
  handle?: Script.Handle;
1675
1857
  internalId?: Script.InternalId;
1676
- } & Script.RegExpLocalValue;
1858
+ };
1677
1859
  }
1678
1860
  export namespace Script {
1679
- export type DateRemoteValue = {
1861
+ export type DateRemoteValue = Script.DateLocalValue & {
1680
1862
  handle?: Script.Handle;
1681
1863
  internalId?: Script.InternalId;
1682
- } & Script.DateLocalValue;
1864
+ };
1683
1865
  }
1684
1866
  export namespace Script {
1685
1867
  export type MapRemoteValue = {
@@ -1,5 +1,5 @@
1
1
  export namespace Bluetooth {
2
- export type BluetoothServiceUuid = string;
2
+ export type BluetoothUuid = string;
3
3
  }
4
4
  export namespace Bluetooth {
5
5
  export type BluetoothManufacturerData = {
@@ -7,6 +7,18 @@ export namespace Bluetooth {
7
7
  data: string;
8
8
  };
9
9
  }
10
+ export namespace Bluetooth {
11
+ export type CharacteristicProperties = {
12
+ broadcast?: boolean;
13
+ read?: boolean;
14
+ writeWithoutResponse?: boolean;
15
+ write?: boolean;
16
+ notify?: boolean;
17
+ indicate?: boolean;
18
+ authenticatedSignedWrites?: boolean;
19
+ extendedProperties?: boolean;
20
+ };
21
+ }
10
22
  export namespace Bluetooth {
11
23
  export type RequestDevice = string;
12
24
  }
@@ -22,7 +34,7 @@ export namespace Bluetooth {
22
34
  export namespace Bluetooth {
23
35
  export type ScanRecord = {
24
36
  name?: string;
25
- uuids?: [...Bluetooth.BluetoothServiceUuid[]];
37
+ uuids?: [...Bluetooth.BluetoothUuid[]];
26
38
  appearance?: number;
27
39
  manufacturerData?: [...Bluetooth.BluetoothManufacturerData[]];
28
40
  };
@@ -33,6 +45,13 @@ export type BluetoothCommand =
33
45
  | Bluetooth.DisableSimulation
34
46
  | Bluetooth.SimulatePreconnectedPeripheral
35
47
  | Bluetooth.SimulateAdvertisement
48
+ | Bluetooth.SimulateGattConnectionResponse
49
+ | Bluetooth.SimulateGattDisconnection
50
+ | Bluetooth.SimulateService
51
+ | Bluetooth.SimulateCharacteristic
52
+ | Bluetooth.SimulateCharacteristicResponse
53
+ | Bluetooth.SimulateDescriptor
54
+ | Bluetooth.SimulateDescriptorResponse
36
55
  | Record<string, never>;
37
56
  export namespace Bluetooth {
38
57
  export type HandleRequestDevicePrompt = {
@@ -96,7 +115,7 @@ export namespace Bluetooth {
96
115
  address: string;
97
116
  name: string;
98
117
  manufacturerData: [...Bluetooth.BluetoothManufacturerData[]];
99
- knownServiceUuids: [...Bluetooth.BluetoothServiceUuid[]];
118
+ knownServiceUuids: [...Bluetooth.BluetoothUuid[]];
100
119
  };
101
120
  }
102
121
  export namespace Bluetooth {
@@ -118,6 +137,119 @@ export namespace Bluetooth {
118
137
  scanRecord: Bluetooth.ScanRecord;
119
138
  };
120
139
  }
140
+ export namespace Bluetooth {
141
+ export type SimulateGattConnectionResponse = {
142
+ method: 'bluetooth.simulateGattConnectionResponse';
143
+ params: Bluetooth.SimulateGattConnectionResponseParameters;
144
+ };
145
+ }
146
+ export namespace Bluetooth {
147
+ export type SimulateGattConnectionResponseParameters = {
148
+ context: string;
149
+ address: string;
150
+ code: number;
151
+ };
152
+ }
153
+ export namespace Bluetooth {
154
+ export type SimulateGattDisconnection = {
155
+ method: 'bluetooth.simulateGattDisconnection';
156
+ params: Bluetooth.SimulateGattDisconnectionParameters;
157
+ };
158
+ }
159
+ export namespace Bluetooth {
160
+ export type SimulateGattDisconnectionParameters = {
161
+ context: string;
162
+ address: string;
163
+ };
164
+ }
165
+ export namespace Bluetooth {
166
+ export type SimulateService = {
167
+ method: 'bluetooth.simulateService';
168
+ params: Bluetooth.SimulateServiceParameters;
169
+ };
170
+ }
171
+ export namespace Bluetooth {
172
+ export type SimulateServiceParameters = {
173
+ context: string;
174
+ address: string;
175
+ uuid: Bluetooth.BluetoothUuid;
176
+ type: 'add' | 'remove';
177
+ };
178
+ }
179
+ export namespace Bluetooth {
180
+ export type SimulateCharacteristic = {
181
+ method: 'bluetooth.simulateCharacteristic';
182
+ params: Bluetooth.SimulateCharacteristicParameters;
183
+ };
184
+ }
185
+ export namespace Bluetooth {
186
+ export type SimulateCharacteristicParameters = {
187
+ context: string;
188
+ address: string;
189
+ serviceUuid: Bluetooth.BluetoothUuid;
190
+ characteristicUuid: Bluetooth.BluetoothUuid;
191
+ characteristicProperties?: Bluetooth.CharacteristicProperties;
192
+ type: 'add' | 'remove';
193
+ };
194
+ }
195
+ export namespace Bluetooth {
196
+ export type SimulateCharacteristicResponse = {
197
+ method: 'bluetooth.simulateCharacteristicResponse';
198
+ params: Bluetooth.SimulateCharacteristicResponseParameters;
199
+ };
200
+ }
201
+ export namespace Bluetooth {
202
+ export type SimulateCharacteristicResponseParameters = {
203
+ context: string;
204
+ address: string;
205
+ serviceUuid: Bluetooth.BluetoothUuid;
206
+ characteristicUuid: Bluetooth.BluetoothUuid;
207
+ type:
208
+ | 'read'
209
+ | 'write'
210
+ | 'subscribe-to-notifications'
211
+ | 'unsubscribe-from-notifications';
212
+ code: number;
213
+ data?: [...number[]];
214
+ };
215
+ }
216
+ export namespace Bluetooth {
217
+ export type SimulateDescriptor = {
218
+ method: 'bluetooth.simulateDescriptor';
219
+ params: Bluetooth.SimulateDescriptorParameters;
220
+ };
221
+ }
222
+ export namespace Bluetooth {
223
+ export type SimulateDescriptorParameters = {
224
+ context: string;
225
+ address: string;
226
+ serviceUuid: Bluetooth.BluetoothUuid;
227
+ characteristicUuid: Bluetooth.BluetoothUuid;
228
+ descriptorUuid: Bluetooth.BluetoothUuid;
229
+ type: 'add' | 'remove';
230
+ };
231
+ }
232
+ export namespace Bluetooth {
233
+ export type SimulateDescriptorResponse = {
234
+ method: 'bluetooth.simulateDescriptorResponse';
235
+ params: Bluetooth.SimulateDescriptorResponseParameters;
236
+ };
237
+ }
238
+ export namespace Bluetooth {
239
+ export type SimulateDescriptorResponseParameters = {
240
+ context: string;
241
+ address: string;
242
+ serviceUuid: Bluetooth.BluetoothUuid;
243
+ characteristicUuid: Bluetooth.BluetoothUuid;
244
+ descriptorUuid: Bluetooth.BluetoothUuid;
245
+ type: 'read' | 'write';
246
+ code: number;
247
+ data?: [...number[]];
248
+ };
249
+ }
250
+ export type BluetoothEvent =
251
+ | Bluetooth.RequestDevicePromptUpdated
252
+ | Bluetooth.GattConnectionAttempted;
121
253
  export namespace Bluetooth {
122
254
  export type RequestDevicePromptUpdated = {
123
255
  method: 'bluetooth.requestDevicePromptUpdated';
@@ -131,3 +263,53 @@ export namespace Bluetooth {
131
263
  devices: [...Bluetooth.RequestDeviceInfo[]];
132
264
  };
133
265
  }
266
+ export namespace Bluetooth {
267
+ export type GattConnectionAttempted = {
268
+ method: 'bluetooth.gattConnectionAttempted';
269
+ params: Bluetooth.GattConnectionAttemptedParameters;
270
+ };
271
+ }
272
+ export namespace Bluetooth {
273
+ export type GattConnectionAttemptedParameters = {
274
+ context: string;
275
+ address: string;
276
+ };
277
+ }
278
+ export namespace Bluetooth {
279
+ export type CharacteristicEventGenerated = {
280
+ method: 'bluetooth.characteristicEventGenerated';
281
+ params: Bluetooth.CharacteristicEventGeneratedParameters;
282
+ };
283
+ }
284
+ export namespace Bluetooth {
285
+ export type CharacteristicEventGeneratedParameters = {
286
+ context: string;
287
+ address: string;
288
+ serviceUuid: Bluetooth.BluetoothUuid;
289
+ characteristicUuid: Bluetooth.BluetoothUuid;
290
+ type:
291
+ | 'read'
292
+ | 'write-with-response'
293
+ | 'write-without-response'
294
+ | 'subscribe-to-notifications'
295
+ | 'unsubscribe-from-notifications';
296
+ data?: [...number[]];
297
+ };
298
+ }
299
+ export namespace Bluetooth {
300
+ export type DescriptorEventGenerated = {
301
+ method: 'bluetooth.descriptorEventGenerated';
302
+ params: Bluetooth.DescriptorEventGeneratedParameters;
303
+ };
304
+ }
305
+ export namespace Bluetooth {
306
+ export type DescriptorEventGeneratedParameters = {
307
+ context: string;
308
+ address: string;
309
+ serviceUuid: Bluetooth.BluetoothUuid;
310
+ characteristicUuid: Bluetooth.BluetoothUuid;
311
+ descriptorUuid: Bluetooth.BluetoothUuid;
312
+ type: 'read' | 'write';
313
+ data?: [...number[]];
314
+ };
315
+ }