11export declare namespace Bluetooth {
2- type BluetoothServiceUuid = string ;
2+ type BluetoothUuid = string ;
33}
44export declare namespace Bluetooth {
55 type BluetoothManufacturerData = {
66 key : number ;
77 data : string ;
88 } ;
99}
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+ }
1022export declare namespace Bluetooth {
1123 type RequestDevice = string ;
1224}
@@ -22,7 +34,7 @@ export declare namespace Bluetooth {
2234export declare namespace Bluetooth {
2335 type ScanRecord = {
2436 name ?: string ;
25- uuids ?: [ ...Bluetooth . BluetoothServiceUuid [ ] ] ;
37+ uuids ?: [ ...Bluetooth . BluetoothUuid [ ] ] ;
2638 appearance ?: number ;
2739 manufacturerData ?: [ ...Bluetooth . BluetoothManufacturerData [ ] ] ;
2840 } ;
@@ -33,6 +45,13 @@ export type BluetoothCommand =
3345 | Bluetooth . DisableSimulation
3446 | Bluetooth . SimulatePreconnectedPeripheral
3547 | Bluetooth . SimulateAdvertisement
48+ | Bluetooth . SimulateGattConnectionResponse
49+ | Bluetooth . SimulateGattDisconnection
50+ | Bluetooth . SimulateService
51+ | Bluetooth . SimulateCharacteristic
52+ | Bluetooth . SimulateCharacteristicResponse
53+ | Bluetooth . SimulateDescriptor
54+ | Bluetooth . SimulateDescriptorResponse
3655 | Record < string , never > ;
3756export declare namespace Bluetooth {
3857 type HandleRequestDevicePrompt = {
@@ -96,7 +115,7 @@ export declare namespace Bluetooth {
96115 address : string ;
97116 name : string ;
98117 manufacturerData : [ ...Bluetooth . BluetoothManufacturerData [ ] ] ;
99- knownServiceUuids : [ ...Bluetooth . BluetoothServiceUuid [ ] ] ;
118+ knownServiceUuids : [ ...Bluetooth . BluetoothUuid [ ] ] ;
100119 } ;
101120}
102121export declare namespace Bluetooth {
@@ -118,6 +137,114 @@ export declare namespace Bluetooth {
118137 scanRecord : Bluetooth . ScanRecord ;
119138 } ;
120139}
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+ } ;
214+ }
215+ export declare namespace Bluetooth {
216+ type SimulateDescriptor = {
217+ method : 'bluetooth.simulateDescriptor' ;
218+ params : Bluetooth . SimulateDescriptorParameters ;
219+ } ;
220+ }
221+ export declare namespace Bluetooth {
222+ type SimulateDescriptorParameters = {
223+ context : string ;
224+ address : string ;
225+ serviceUuid : Bluetooth . BluetoothUuid ;
226+ characteristicUuid : Bluetooth . BluetoothUuid ;
227+ descriptorUuid : Bluetooth . BluetoothUuid ;
228+ type : 'add' | 'remove' ;
229+ } ;
230+ }
231+ export declare namespace Bluetooth {
232+ type SimulateDescriptorResponse = {
233+ method : 'bluetooth.simulateDescriptorResponse' ;
234+ params : Bluetooth . SimulateDescriptorResponseParameters ;
235+ } ;
236+ }
237+ export declare namespace Bluetooth {
238+ type SimulateDescriptorResponseParameters = {
239+ context : string ;
240+ address : string ;
241+ serviceUuid : Bluetooth . BluetoothUuid ;
242+ characteristicUuid : Bluetooth . BluetoothUuid ;
243+ descriptorUuid : Bluetooth . BluetoothUuid ;
244+ type : 'read' | 'write' ;
245+ code : number ;
246+ } ;
247+ }
121248export declare namespace Bluetooth {
122249 type RequestDevicePromptUpdated = {
123250 method : 'bluetooth.requestDevicePromptUpdated' ;
@@ -131,3 +258,53 @@ export declare namespace Bluetooth {
131258 devices : [ ...Bluetooth . RequestDeviceInfo [ ] ] ;
132259 } ;
133260}
261+ export declare namespace Bluetooth {
262+ type GattConnectionAttempted = {
263+ method : 'bluetooth.gattConnectionAttempted' ;
264+ params : Bluetooth . GattConnectionAttemptedParameters ;
265+ } ;
266+ }
267+ export declare namespace Bluetooth {
268+ type GattConnectionAttemptedParameters = {
269+ context : string ;
270+ address : string ;
271+ } ;
272+ }
273+ export declare namespace Bluetooth {
274+ type CharacteristicEventGenerated = {
275+ method : 'bluetooth.characteristicEventGenerated' ;
276+ params : Bluetooth . CharacteristicEventGeneratedParameters ;
277+ } ;
278+ }
279+ export declare namespace Bluetooth {
280+ type CharacteristicEventGeneratedParameters = {
281+ context : string ;
282+ address : string ;
283+ serviceUuid : Bluetooth . BluetoothUuid ;
284+ characteristicUuid : Bluetooth . BluetoothUuid ;
285+ type :
286+ | 'read'
287+ | 'write-with-response'
288+ | 'write-without-response'
289+ | 'subscribe-to-notifications'
290+ | 'unsubscribe-from-notifications' ;
291+ data ?: [ ...number [ ] ] ;
292+ } ;
293+ }
294+ export declare namespace Bluetooth {
295+ type DescriptorEventGenerated = {
296+ method : 'bluetooth.descriptorEventGenerated' ;
297+ params : Bluetooth . DescriptorEventGeneratedParameters ;
298+ } ;
299+ }
300+ export declare namespace Bluetooth {
301+ type DescriptorEventGeneratedParameters = {
302+ context : string ;
303+ address : string ;
304+ serviceUuid : Bluetooth . BluetoothUuid ;
305+ characteristicUuid : Bluetooth . BluetoothUuid ;
306+ descriptorUuid : Bluetooth . BluetoothUuid ;
307+ type : 'read' | 'write' ;
308+ data ?: [ ...number [ ] ] ;
309+ } ;
310+ }
0 commit comments