devtools-protocol 0.0.1336433 → 0.0.1337664
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.
@@ -26656,6 +26656,155 @@
|
|
26656
26656
|
]
|
26657
26657
|
}
|
26658
26658
|
]
|
26659
|
+
},
|
26660
|
+
{
|
26661
|
+
"domain": "BluetoothEmulation",
|
26662
|
+
"description": "This domain allows configuring virtual Bluetooth devices to test\nthe web-bluetooth API.",
|
26663
|
+
"experimental": true,
|
26664
|
+
"types": [
|
26665
|
+
{
|
26666
|
+
"id": "CentralState",
|
26667
|
+
"description": "Indicates the various states of Central.",
|
26668
|
+
"type": "string",
|
26669
|
+
"enum": [
|
26670
|
+
"absent",
|
26671
|
+
"powered-off",
|
26672
|
+
"powered-on"
|
26673
|
+
]
|
26674
|
+
},
|
26675
|
+
{
|
26676
|
+
"id": "ManufacturerData",
|
26677
|
+
"description": "Stores the manufacturer data",
|
26678
|
+
"type": "object",
|
26679
|
+
"properties": [
|
26680
|
+
{
|
26681
|
+
"name": "key",
|
26682
|
+
"description": "Company identifier\nhttps://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml\nhttps://usb.org/developers",
|
26683
|
+
"type": "integer"
|
26684
|
+
},
|
26685
|
+
{
|
26686
|
+
"name": "data",
|
26687
|
+
"description": "Manufacturer-specific data (Encoded as a base64 string when passed over JSON)",
|
26688
|
+
"type": "string"
|
26689
|
+
}
|
26690
|
+
]
|
26691
|
+
},
|
26692
|
+
{
|
26693
|
+
"id": "ScanRecord",
|
26694
|
+
"description": "Stores the byte data of the advertisement packet sent by a Bluetooth device.",
|
26695
|
+
"type": "object",
|
26696
|
+
"properties": [
|
26697
|
+
{
|
26698
|
+
"name": "name",
|
26699
|
+
"optional": true,
|
26700
|
+
"type": "string"
|
26701
|
+
},
|
26702
|
+
{
|
26703
|
+
"name": "uuids",
|
26704
|
+
"optional": true,
|
26705
|
+
"type": "array",
|
26706
|
+
"items": {
|
26707
|
+
"type": "string"
|
26708
|
+
}
|
26709
|
+
},
|
26710
|
+
{
|
26711
|
+
"name": "appearance",
|
26712
|
+
"description": "Stores the external appearance description of the device.",
|
26713
|
+
"optional": true,
|
26714
|
+
"type": "integer"
|
26715
|
+
},
|
26716
|
+
{
|
26717
|
+
"name": "txPower",
|
26718
|
+
"description": "Stores the transmission power of a broadcasting device.",
|
26719
|
+
"optional": true,
|
26720
|
+
"type": "integer"
|
26721
|
+
},
|
26722
|
+
{
|
26723
|
+
"name": "manufacturerData",
|
26724
|
+
"description": "Key is the company identifier and the value is an array of bytes of\nmanufacturer specific data.",
|
26725
|
+
"optional": true,
|
26726
|
+
"type": "array",
|
26727
|
+
"items": {
|
26728
|
+
"$ref": "ManufacturerData"
|
26729
|
+
}
|
26730
|
+
}
|
26731
|
+
]
|
26732
|
+
},
|
26733
|
+
{
|
26734
|
+
"id": "ScanEntry",
|
26735
|
+
"description": "Stores the advertisement packet information that is sent by a Bluetooth device.",
|
26736
|
+
"type": "object",
|
26737
|
+
"properties": [
|
26738
|
+
{
|
26739
|
+
"name": "deviceAddress",
|
26740
|
+
"type": "string"
|
26741
|
+
},
|
26742
|
+
{
|
26743
|
+
"name": "rssi",
|
26744
|
+
"type": "integer"
|
26745
|
+
},
|
26746
|
+
{
|
26747
|
+
"name": "scanRecord",
|
26748
|
+
"$ref": "ScanRecord"
|
26749
|
+
}
|
26750
|
+
]
|
26751
|
+
}
|
26752
|
+
],
|
26753
|
+
"commands": [
|
26754
|
+
{
|
26755
|
+
"name": "enable",
|
26756
|
+
"description": "Enable the BluetoothEmulation domain.",
|
26757
|
+
"parameters": [
|
26758
|
+
{
|
26759
|
+
"name": "state",
|
26760
|
+
"description": "State of the simulated central.",
|
26761
|
+
"$ref": "CentralState"
|
26762
|
+
}
|
26763
|
+
]
|
26764
|
+
},
|
26765
|
+
{
|
26766
|
+
"name": "disable",
|
26767
|
+
"description": "Disable the BluetoothEmulation domain."
|
26768
|
+
},
|
26769
|
+
{
|
26770
|
+
"name": "simulatePreconnectedPeripheral",
|
26771
|
+
"description": "Simulates a peripheral with |address|, |name| and |knownServiceUuids|\nthat has already been connected to the system.",
|
26772
|
+
"parameters": [
|
26773
|
+
{
|
26774
|
+
"name": "address",
|
26775
|
+
"type": "string"
|
26776
|
+
},
|
26777
|
+
{
|
26778
|
+
"name": "name",
|
26779
|
+
"type": "string"
|
26780
|
+
},
|
26781
|
+
{
|
26782
|
+
"name": "manufacturerData",
|
26783
|
+
"type": "array",
|
26784
|
+
"items": {
|
26785
|
+
"$ref": "ManufacturerData"
|
26786
|
+
}
|
26787
|
+
},
|
26788
|
+
{
|
26789
|
+
"name": "knownServiceUuids",
|
26790
|
+
"type": "array",
|
26791
|
+
"items": {
|
26792
|
+
"type": "string"
|
26793
|
+
}
|
26794
|
+
}
|
26795
|
+
]
|
26796
|
+
},
|
26797
|
+
{
|
26798
|
+
"name": "simulateAdvertisement",
|
26799
|
+
"description": "Simulates an advertisement packet described in |entry| being received by\nthe central.",
|
26800
|
+
"parameters": [
|
26801
|
+
{
|
26802
|
+
"name": "entry",
|
26803
|
+
"$ref": "ScanEntry"
|
26804
|
+
}
|
26805
|
+
]
|
26806
|
+
}
|
26807
|
+
]
|
26659
26808
|
}
|
26660
26809
|
]
|
26661
26810
|
}
|
package/package.json
CHANGED
package/pdl/browser_protocol.pdl
CHANGED
@@ -12612,3 +12612,67 @@ experimental domain PWA
|
|
12612
12612
|
# supported yet.
|
12613
12613
|
optional boolean linkCapturing
|
12614
12614
|
optional DisplayMode displayMode
|
12615
|
+
|
12616
|
+
# This domain allows configuring virtual Bluetooth devices to test
|
12617
|
+
# the web-bluetooth API.
|
12618
|
+
experimental domain BluetoothEmulation
|
12619
|
+
# Indicates the various states of Central.
|
12620
|
+
type CentralState extends string
|
12621
|
+
enum
|
12622
|
+
absent
|
12623
|
+
powered-off
|
12624
|
+
powered-on
|
12625
|
+
|
12626
|
+
# Stores the manufacturer data
|
12627
|
+
type ManufacturerData extends object
|
12628
|
+
properties
|
12629
|
+
# Company identifier
|
12630
|
+
# https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml
|
12631
|
+
# https://usb.org/developers
|
12632
|
+
integer key
|
12633
|
+
# Manufacturer-specific data
|
12634
|
+
binary data
|
12635
|
+
|
12636
|
+
# Stores the byte data of the advertisement packet sent by a Bluetooth device.
|
12637
|
+
type ScanRecord extends object
|
12638
|
+
properties
|
12639
|
+
optional string name
|
12640
|
+
optional array of string uuids
|
12641
|
+
# Stores the external appearance description of the device.
|
12642
|
+
optional integer appearance
|
12643
|
+
# Stores the transmission power of a broadcasting device.
|
12644
|
+
optional integer txPower
|
12645
|
+
# Key is the company identifier and the value is an array of bytes of
|
12646
|
+
# manufacturer specific data.
|
12647
|
+
optional array of ManufacturerData manufacturerData
|
12648
|
+
|
12649
|
+
# Stores the advertisement packet information that is sent by a Bluetooth device.
|
12650
|
+
type ScanEntry extends object
|
12651
|
+
properties
|
12652
|
+
string deviceAddress
|
12653
|
+
integer rssi
|
12654
|
+
ScanRecord scanRecord
|
12655
|
+
|
12656
|
+
# Enable the BluetoothEmulation domain.
|
12657
|
+
command enable
|
12658
|
+
parameters
|
12659
|
+
# State of the simulated central.
|
12660
|
+
CentralState state
|
12661
|
+
|
12662
|
+
# Disable the BluetoothEmulation domain.
|
12663
|
+
command disable
|
12664
|
+
|
12665
|
+
# Simulates a peripheral with |address|, |name| and |knownServiceUuids|
|
12666
|
+
# that has already been connected to the system.
|
12667
|
+
command simulatePreconnectedPeripheral
|
12668
|
+
parameters
|
12669
|
+
string address
|
12670
|
+
string name
|
12671
|
+
array of ManufacturerData manufacturerData
|
12672
|
+
array of string knownServiceUuids
|
12673
|
+
|
12674
|
+
# Simulates an advertisement packet described in |entry| being received by
|
12675
|
+
# the central.
|
12676
|
+
command simulateAdvertisement
|
12677
|
+
parameters
|
12678
|
+
ScanEntry entry
|
@@ -5079,6 +5079,36 @@ export namespace ProtocolMapping {
|
|
5079
5079
|
paramsType: [Protocol.PWA.ChangeAppUserSettingsRequest];
|
5080
5080
|
returnType: void;
|
5081
5081
|
};
|
5082
|
+
/**
|
5083
|
+
* Enable the BluetoothEmulation domain.
|
5084
|
+
*/
|
5085
|
+
'BluetoothEmulation.enable': {
|
5086
|
+
paramsType: [Protocol.BluetoothEmulation.EnableRequest];
|
5087
|
+
returnType: void;
|
5088
|
+
};
|
5089
|
+
/**
|
5090
|
+
* Disable the BluetoothEmulation domain.
|
5091
|
+
*/
|
5092
|
+
'BluetoothEmulation.disable': {
|
5093
|
+
paramsType: [];
|
5094
|
+
returnType: void;
|
5095
|
+
};
|
5096
|
+
/**
|
5097
|
+
* Simulates a peripheral with |address|, |name| and |knownServiceUuids|
|
5098
|
+
* that has already been connected to the system.
|
5099
|
+
*/
|
5100
|
+
'BluetoothEmulation.simulatePreconnectedPeripheral': {
|
5101
|
+
paramsType: [Protocol.BluetoothEmulation.SimulatePreconnectedPeripheralRequest];
|
5102
|
+
returnType: void;
|
5103
|
+
};
|
5104
|
+
/**
|
5105
|
+
* Simulates an advertisement packet described in |entry| being received by
|
5106
|
+
* the central.
|
5107
|
+
*/
|
5108
|
+
'BluetoothEmulation.simulateAdvertisement': {
|
5109
|
+
paramsType: [Protocol.BluetoothEmulation.SimulateAdvertisementRequest];
|
5110
|
+
returnType: void;
|
5111
|
+
};
|
5082
5112
|
}
|
5083
5113
|
}
|
5084
5114
|
|
@@ -116,6 +116,8 @@ export namespace ProtocolProxyApi {
|
|
116
116
|
|
117
117
|
PWA: PWAApi;
|
118
118
|
|
119
|
+
BluetoothEmulation: BluetoothEmulationApi;
|
120
|
+
|
119
121
|
}
|
120
122
|
|
121
123
|
|
@@ -4339,6 +4341,31 @@ export namespace ProtocolProxyApi {
|
|
4339
4341
|
changeAppUserSettings(params: Protocol.PWA.ChangeAppUserSettingsRequest): Promise<void>;
|
4340
4342
|
|
4341
4343
|
}
|
4344
|
+
|
4345
|
+
export interface BluetoothEmulationApi {
|
4346
|
+
/**
|
4347
|
+
* Enable the BluetoothEmulation domain.
|
4348
|
+
*/
|
4349
|
+
enable(params: Protocol.BluetoothEmulation.EnableRequest): Promise<void>;
|
4350
|
+
|
4351
|
+
/**
|
4352
|
+
* Disable the BluetoothEmulation domain.
|
4353
|
+
*/
|
4354
|
+
disable(): Promise<void>;
|
4355
|
+
|
4356
|
+
/**
|
4357
|
+
* Simulates a peripheral with |address|, |name| and |knownServiceUuids|
|
4358
|
+
* that has already been connected to the system.
|
4359
|
+
*/
|
4360
|
+
simulatePreconnectedPeripheral(params: Protocol.BluetoothEmulation.SimulatePreconnectedPeripheralRequest): Promise<void>;
|
4361
|
+
|
4362
|
+
/**
|
4363
|
+
* Simulates an advertisement packet described in |entry| being received by
|
4364
|
+
* the central.
|
4365
|
+
*/
|
4366
|
+
simulateAdvertisement(params: Protocol.BluetoothEmulation.SimulateAdvertisementRequest): Promise<void>;
|
4367
|
+
|
4368
|
+
}
|
4342
4369
|
}
|
4343
4370
|
|
4344
4371
|
export default ProtocolProxyApi;
|
@@ -116,6 +116,8 @@ export namespace ProtocolTestsProxyApi {
|
|
116
116
|
|
117
117
|
PWA: PWAApi;
|
118
118
|
|
119
|
+
BluetoothEmulation: BluetoothEmulationApi;
|
120
|
+
|
119
121
|
}
|
120
122
|
|
121
123
|
|
@@ -4725,6 +4727,31 @@ export namespace ProtocolTestsProxyApi {
|
|
4725
4727
|
changeAppUserSettings(params: Protocol.PWA.ChangeAppUserSettingsRequest): Promise<{id: number, result: void, sessionId: string}>;
|
4726
4728
|
|
4727
4729
|
}
|
4730
|
+
|
4731
|
+
export interface BluetoothEmulationApi {
|
4732
|
+
/**
|
4733
|
+
* Enable the BluetoothEmulation domain.
|
4734
|
+
*/
|
4735
|
+
enable(params: Protocol.BluetoothEmulation.EnableRequest): Promise<{id: number, result: void, sessionId: string}>;
|
4736
|
+
|
4737
|
+
/**
|
4738
|
+
* Disable the BluetoothEmulation domain.
|
4739
|
+
*/
|
4740
|
+
disable(): Promise<{id: number, result: void, sessionId: string}>;
|
4741
|
+
|
4742
|
+
/**
|
4743
|
+
* Simulates a peripheral with |address|, |name| and |knownServiceUuids|
|
4744
|
+
* that has already been connected to the system.
|
4745
|
+
*/
|
4746
|
+
simulatePreconnectedPeripheral(params: Protocol.BluetoothEmulation.SimulatePreconnectedPeripheralRequest): Promise<{id: number, result: void, sessionId: string}>;
|
4747
|
+
|
4748
|
+
/**
|
4749
|
+
* Simulates an advertisement packet described in |entry| being received by
|
4750
|
+
* the central.
|
4751
|
+
*/
|
4752
|
+
simulateAdvertisement(params: Protocol.BluetoothEmulation.SimulateAdvertisementRequest): Promise<{id: number, result: void, sessionId: string}>;
|
4753
|
+
|
4754
|
+
}
|
4728
4755
|
}
|
4729
4756
|
|
4730
4757
|
export default ProtocolTestsProxyApi;
|
package/types/protocol.d.ts
CHANGED
@@ -18755,6 +18755,82 @@ export namespace Protocol {
|
|
18755
18755
|
displayMode?: DisplayMode;
|
18756
18756
|
}
|
18757
18757
|
}
|
18758
|
+
|
18759
|
+
/**
|
18760
|
+
* This domain allows configuring virtual Bluetooth devices to test
|
18761
|
+
* the web-bluetooth API.
|
18762
|
+
*/
|
18763
|
+
export namespace BluetoothEmulation {
|
18764
|
+
|
18765
|
+
/**
|
18766
|
+
* Indicates the various states of Central.
|
18767
|
+
*/
|
18768
|
+
export type CentralState = ('absent' | 'powered-off' | 'powered-on');
|
18769
|
+
|
18770
|
+
/**
|
18771
|
+
* Stores the manufacturer data
|
18772
|
+
*/
|
18773
|
+
export interface ManufacturerData {
|
18774
|
+
/**
|
18775
|
+
* Company identifier
|
18776
|
+
* https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml
|
18777
|
+
* https://usb.org/developers
|
18778
|
+
*/
|
18779
|
+
key: integer;
|
18780
|
+
/**
|
18781
|
+
* Manufacturer-specific data (Encoded as a base64 string when passed over JSON)
|
18782
|
+
*/
|
18783
|
+
data: string;
|
18784
|
+
}
|
18785
|
+
|
18786
|
+
/**
|
18787
|
+
* Stores the byte data of the advertisement packet sent by a Bluetooth device.
|
18788
|
+
*/
|
18789
|
+
export interface ScanRecord {
|
18790
|
+
name?: string;
|
18791
|
+
uuids?: string[];
|
18792
|
+
/**
|
18793
|
+
* Stores the external appearance description of the device.
|
18794
|
+
*/
|
18795
|
+
appearance?: integer;
|
18796
|
+
/**
|
18797
|
+
* Stores the transmission power of a broadcasting device.
|
18798
|
+
*/
|
18799
|
+
txPower?: integer;
|
18800
|
+
/**
|
18801
|
+
* Key is the company identifier and the value is an array of bytes of
|
18802
|
+
* manufacturer specific data.
|
18803
|
+
*/
|
18804
|
+
manufacturerData?: ManufacturerData[];
|
18805
|
+
}
|
18806
|
+
|
18807
|
+
/**
|
18808
|
+
* Stores the advertisement packet information that is sent by a Bluetooth device.
|
18809
|
+
*/
|
18810
|
+
export interface ScanEntry {
|
18811
|
+
deviceAddress: string;
|
18812
|
+
rssi: integer;
|
18813
|
+
scanRecord: ScanRecord;
|
18814
|
+
}
|
18815
|
+
|
18816
|
+
export interface EnableRequest {
|
18817
|
+
/**
|
18818
|
+
* State of the simulated central.
|
18819
|
+
*/
|
18820
|
+
state: CentralState;
|
18821
|
+
}
|
18822
|
+
|
18823
|
+
export interface SimulatePreconnectedPeripheralRequest {
|
18824
|
+
address: string;
|
18825
|
+
name: string;
|
18826
|
+
manufacturerData: ManufacturerData[];
|
18827
|
+
knownServiceUuids: string[];
|
18828
|
+
}
|
18829
|
+
|
18830
|
+
export interface SimulateAdvertisementRequest {
|
18831
|
+
entry: ScanEntry;
|
18832
|
+
}
|
18833
|
+
}
|
18758
18834
|
}
|
18759
18835
|
|
18760
18836
|
export default Protocol;
|