webdriver-bidi-protocol 0.1.8 → 0.1.9

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.1.8"
2
+ ".": "0.1.9"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [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)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * 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))
9
+ * 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))
10
+ * 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))
11
+ * 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))
12
+ * 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))
13
+
3
14
  ## [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
15
 
5
16
 
package/out/gen/main.d.ts CHANGED
@@ -310,7 +310,13 @@ export declare namespace Browser {
310
310
  export declare namespace Browser {
311
311
  type CreateUserContext = {
312
312
  method: 'browser.createUserContext';
313
- params: EmptyParams;
313
+ params: Browser.CreateUserContextParameters;
314
+ };
315
+ }
316
+ export declare namespace Browser {
317
+ type CreateUserContextParameters = {
318
+ acceptInsecureCerts?: boolean;
319
+ proxy?: Session.ProxyConfiguration;
314
320
  };
315
321
  }
316
322
  export declare namespace Browser {
@@ -391,6 +397,7 @@ export type BrowsingContextEvent =
391
397
  | BrowsingContext.ContextCreated
392
398
  | BrowsingContext.ContextDestroyed
393
399
  | BrowsingContext.DomContentLoaded
400
+ | BrowsingContext.DownloadEnd
394
401
  | BrowsingContext.DownloadWillBegin
395
402
  | BrowsingContext.FragmentNavigated
396
403
  | BrowsingContext.HistoryUpdated
@@ -843,6 +850,7 @@ export declare namespace BrowsingContext {
843
850
  export declare namespace BrowsingContext {
844
851
  type HistoryUpdatedParameters = {
845
852
  context: BrowsingContext.BrowsingContext;
853
+ timestamp: JsUint;
846
854
  url: string;
847
855
  };
848
856
  }
@@ -869,6 +877,28 @@ export declare namespace BrowsingContext {
869
877
  suggestedFilename: string;
870
878
  } & BrowsingContext.BaseNavigationInfo;
871
879
  }
880
+ export declare namespace BrowsingContext {
881
+ type DownloadEnd = {
882
+ method: 'browsingContext.downloadEnd';
883
+ params: BrowsingContext.DownloadEndParams;
884
+ };
885
+ }
886
+ export declare namespace BrowsingContext {
887
+ type DownloadEndParams =
888
+ | BrowsingContext.DownloadCanceledParams
889
+ | BrowsingContext.DownloadCompleteParams;
890
+ }
891
+ export declare namespace BrowsingContext {
892
+ type DownloadCanceledParams = {
893
+ status: 'canceled';
894
+ } & BrowsingContext.BaseNavigationInfo;
895
+ }
896
+ export declare namespace BrowsingContext {
897
+ type DownloadCompleteParams = {
898
+ status: 'complete';
899
+ filepath: string | null;
900
+ } & BrowsingContext.BaseNavigationInfo;
901
+ }
872
902
  export declare namespace BrowsingContext {
873
903
  type NavigationAborted = {
874
904
  method: 'browsingContext.navigationAborted';
@@ -924,8 +954,14 @@ export declare namespace Emulation {
924
954
  };
925
955
  }
926
956
  export declare namespace Emulation {
927
- type SetGeolocationOverrideParameters = {
928
- coordinates: Emulation.GeolocationCoordinates | null;
957
+ type SetGeolocationOverrideParameters = (
958
+ | {
959
+ coordinates: Emulation.GeolocationCoordinates | null;
960
+ }
961
+ | {
962
+ error: Emulation.GeolocationPositionError;
963
+ }
964
+ ) & {
929
965
  contexts?: [
930
966
  BrowsingContext.BrowsingContext,
931
967
  ...BrowsingContext.BrowsingContext[],
@@ -935,9 +971,17 @@ export declare namespace Emulation {
935
971
  }
936
972
  export declare namespace Emulation {
937
973
  type GeolocationCoordinates = {
974
+ /**
975
+ * Must be between `-90` and `90`, inclusive.
976
+ */
938
977
  latitude: number;
978
+ /**
979
+ * Must be between `-180` and `180`, inclusive.
980
+ */
939
981
  longitude: number;
940
982
  /**
983
+ * Must be greater than or equal to `0`.
984
+ *
941
985
  * @defaultValue `1`
942
986
  */
943
987
  accuracy?: number;
@@ -946,19 +990,30 @@ export declare namespace Emulation {
946
990
  */
947
991
  altitude?: number | null;
948
992
  /**
993
+ * Must be greater than or equal to `0`.
994
+ *
949
995
  * @defaultValue `null`
950
996
  */
951
997
  altitudeAccuracy?: number | null;
952
998
  /**
999
+ * Must be between `0` and `360`.
1000
+ *
953
1001
  * @defaultValue `null`
954
1002
  */
955
1003
  heading?: number | null;
956
1004
  /**
1005
+ * Must be greater than or equal to `0`.
1006
+ *
957
1007
  * @defaultValue `null`
958
1008
  */
959
1009
  speed?: number | null;
960
1010
  };
961
1011
  }
1012
+ export declare namespace Emulation {
1013
+ type GeolocationPositionError = {
1014
+ type: 'positionUnavailable';
1015
+ };
1016
+ }
962
1017
  export type NetworkCommand =
963
1018
  | Network.AddIntercept
964
1019
  | Network.ContinueRequest
@@ -1666,16 +1721,16 @@ export declare namespace Script {
1666
1721
  };
1667
1722
  }
1668
1723
  export declare namespace Script {
1669
- type RegExpRemoteValue = {
1724
+ type RegExpRemoteValue = Script.RegExpLocalValue & {
1670
1725
  handle?: Script.Handle;
1671
1726
  internalId?: Script.InternalId;
1672
- } & Script.RegExpLocalValue;
1727
+ };
1673
1728
  }
1674
1729
  export declare namespace Script {
1675
- type DateRemoteValue = {
1730
+ type DateRemoteValue = Script.DateLocalValue & {
1676
1731
  handle?: Script.Handle;
1677
1732
  internalId?: Script.InternalId;
1678
- } & Script.DateLocalValue;
1733
+ };
1679
1734
  }
1680
1735
  export declare namespace Script {
1681
1736
  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.1.9",
4
4
  "description": "",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "@types/node": "^22.5.2",
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.5.3",
27
+ "tsd": "0.32.0",
28
+ "typescript": "5.8.3"
29
29
  }
30
30
  }
package/src/gen/main.ts CHANGED
@@ -312,7 +312,13 @@ export namespace Browser {
312
312
  export namespace Browser {
313
313
  export type CreateUserContext = {
314
314
  method: 'browser.createUserContext';
315
- params: EmptyParams;
315
+ params: Browser.CreateUserContextParameters;
316
+ };
317
+ }
318
+ export namespace Browser {
319
+ export type CreateUserContextParameters = {
320
+ acceptInsecureCerts?: boolean;
321
+ proxy?: Session.ProxyConfiguration;
316
322
  };
317
323
  }
318
324
  export namespace Browser {
@@ -393,6 +399,7 @@ export type BrowsingContextEvent =
393
399
  | BrowsingContext.ContextCreated
394
400
  | BrowsingContext.ContextDestroyed
395
401
  | BrowsingContext.DomContentLoaded
402
+ | BrowsingContext.DownloadEnd
396
403
  | BrowsingContext.DownloadWillBegin
397
404
  | BrowsingContext.FragmentNavigated
398
405
  | BrowsingContext.HistoryUpdated
@@ -845,6 +852,7 @@ export namespace BrowsingContext {
845
852
  export namespace BrowsingContext {
846
853
  export type HistoryUpdatedParameters = {
847
854
  context: BrowsingContext.BrowsingContext;
855
+ timestamp: JsUint;
848
856
  url: string;
849
857
  };
850
858
  }
@@ -871,6 +879,28 @@ export namespace BrowsingContext {
871
879
  suggestedFilename: string;
872
880
  } & BrowsingContext.BaseNavigationInfo;
873
881
  }
882
+ export namespace BrowsingContext {
883
+ export type DownloadEnd = {
884
+ method: 'browsingContext.downloadEnd';
885
+ params: BrowsingContext.DownloadEndParams;
886
+ };
887
+ }
888
+ export namespace BrowsingContext {
889
+ export type DownloadEndParams =
890
+ | BrowsingContext.DownloadCanceledParams
891
+ | BrowsingContext.DownloadCompleteParams;
892
+ }
893
+ export namespace BrowsingContext {
894
+ export type DownloadCanceledParams = {
895
+ status: 'canceled';
896
+ } & BrowsingContext.BaseNavigationInfo;
897
+ }
898
+ export namespace BrowsingContext {
899
+ export type DownloadCompleteParams = {
900
+ status: 'complete';
901
+ filepath: string | null;
902
+ } & BrowsingContext.BaseNavigationInfo;
903
+ }
874
904
  export namespace BrowsingContext {
875
905
  export type NavigationAborted = {
876
906
  method: 'browsingContext.navigationAborted';
@@ -926,8 +956,14 @@ export namespace Emulation {
926
956
  };
927
957
  }
928
958
  export namespace Emulation {
929
- export type SetGeolocationOverrideParameters = {
930
- coordinates: Emulation.GeolocationCoordinates | null;
959
+ export type SetGeolocationOverrideParameters = (
960
+ | {
961
+ coordinates: Emulation.GeolocationCoordinates | null;
962
+ }
963
+ | {
964
+ error: Emulation.GeolocationPositionError;
965
+ }
966
+ ) & {
931
967
  contexts?: [
932
968
  BrowsingContext.BrowsingContext,
933
969
  ...BrowsingContext.BrowsingContext[],
@@ -937,9 +973,17 @@ export namespace Emulation {
937
973
  }
938
974
  export namespace Emulation {
939
975
  export type GeolocationCoordinates = {
976
+ /**
977
+ * Must be between `-90` and `90`, inclusive.
978
+ */
940
979
  latitude: number;
980
+ /**
981
+ * Must be between `-180` and `180`, inclusive.
982
+ */
941
983
  longitude: number;
942
984
  /**
985
+ * Must be greater than or equal to `0`.
986
+ *
943
987
  * @defaultValue `1`
944
988
  */
945
989
  accuracy?: number;
@@ -948,19 +992,30 @@ export namespace Emulation {
948
992
  */
949
993
  altitude?: number | null;
950
994
  /**
995
+ * Must be greater than or equal to `0`.
996
+ *
951
997
  * @defaultValue `null`
952
998
  */
953
999
  altitudeAccuracy?: number | null;
954
1000
  /**
1001
+ * Must be between `0` and `360`.
1002
+ *
955
1003
  * @defaultValue `null`
956
1004
  */
957
1005
  heading?: number | null;
958
1006
  /**
1007
+ * Must be greater than or equal to `0`.
1008
+ *
959
1009
  * @defaultValue `null`
960
1010
  */
961
1011
  speed?: number | null;
962
1012
  };
963
1013
  }
1014
+ export namespace Emulation {
1015
+ export type GeolocationPositionError = {
1016
+ type: 'positionUnavailable';
1017
+ };
1018
+ }
964
1019
  export type NetworkCommand =
965
1020
  | Network.AddIntercept
966
1021
  | Network.ContinueRequest
@@ -1670,16 +1725,16 @@ export namespace Script {
1670
1725
  };
1671
1726
  }
1672
1727
  export namespace Script {
1673
- export type RegExpRemoteValue = {
1728
+ export type RegExpRemoteValue = Script.RegExpLocalValue & {
1674
1729
  handle?: Script.Handle;
1675
1730
  internalId?: Script.InternalId;
1676
- } & Script.RegExpLocalValue;
1731
+ };
1677
1732
  }
1678
1733
  export namespace Script {
1679
- export type DateRemoteValue = {
1734
+ export type DateRemoteValue = Script.DateLocalValue & {
1680
1735
  handle?: Script.Handle;
1681
1736
  internalId?: Script.InternalId;
1682
- } & Script.DateLocalValue;
1737
+ };
1683
1738
  }
1684
1739
  export namespace Script {
1685
1740
  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
+ }