node-switchbot 3.6.0-beta.2 → 3.6.0-beta.3
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.
- package/dist/device.d.ts +50 -50
- package/dist/device.js +22 -22
- package/dist/switchbot-openapi.d.ts +3 -3
- package/dist/types/ble-guards.test.js +3 -3
- package/dist/types/ble.d.ts +30 -30
- package/dist/types/openapi.d.ts +50 -50
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Advertising.html +4 -4
- package/docs/classes/ErrorUtils.html +5 -5
- package/docs/classes/ParameterChecker.html +10 -10
- package/docs/classes/SwitchBotBLE.html +8 -8
- package/docs/classes/SwitchBotOpenAPI.html +9 -9
- package/docs/classes/SwitchbotDevice.html +12 -12
- package/docs/classes/ValidationUtils.html +8 -8
- package/docs/classes/WoBlindTilt.html +22 -22
- package/docs/classes/WoBulb.html +20 -20
- package/docs/classes/WoCeilingLight.html +24 -24
- package/docs/classes/WoContact.html +14 -14
- package/docs/classes/WoCurtain.html +19 -19
- package/docs/classes/WoHand.html +19 -19
- package/docs/classes/WoHub2.html +14 -14
- package/docs/classes/WoHumi.html +21 -21
- package/docs/classes/WoHumi2.html +21 -21
- package/docs/classes/WoIOSensorTH.html +14 -14
- package/docs/classes/WoKeypad.html +14 -14
- package/docs/classes/WoLeak.html +14 -14
- package/docs/classes/WoPlugMiniJP.html +19 -19
- package/docs/classes/WoPlugMiniUS.html +19 -19
- package/docs/classes/WoPresence.html +14 -14
- package/docs/classes/WoRelaySwitch1.html +16 -16
- package/docs/classes/WoRelaySwitch1PM.html +16 -16
- package/docs/classes/WoRemote.html +14 -14
- package/docs/classes/WoSensorTH.html +12 -12
- package/docs/classes/WoSensorTHPlus.html +12 -12
- package/docs/classes/WoSensorTHPro.html +12 -12
- package/docs/classes/WoSensorTHProCO2.html +12 -12
- package/docs/classes/WoSmartLock.html +24 -24
- package/docs/classes/WoSmartLockPro.html +24 -24
- package/docs/classes/WoStrip.html +21 -21
- package/docs/enums/LogLevel.html +2 -2
- package/docs/enums/SwitchBotBLEModel.html +2 -2
- package/docs/enums/SwitchBotBLEModelFriendlyName.html +2 -2
- package/docs/enums/SwitchBotBLEModelName.html +2 -2
- package/docs/enums/SwitchBotModel.html +2 -2
- package/docs/functions/updateBaseURL.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/AdvertisementData.html +2 -2
- package/docs/interfaces/Chars.html +2 -2
- package/docs/interfaces/ColorLightServiceDataBase.html +2 -2
- package/docs/interfaces/ErrorObject.html +2 -2
- package/docs/interfaces/LockBaseServiceData.html +2 -2
- package/docs/interfaces/NobleTypes.html +2 -2
- package/docs/interfaces/Params.html +2 -2
- package/docs/interfaces/PlugMiniServiceDataBase.html +2 -2
- package/docs/interfaces/PushResponse.html +2 -2
- package/docs/interfaces/Rule.html +2 -2
- package/docs/interfaces/ServiceData.html +2 -2
- package/docs/interfaces/SwitchBotBLEDevice.html +2 -2
- package/docs/interfaces/SwitchBotScanner.html +3 -3
- package/docs/interfaces/TemperatureServiceDataBase.html +2 -2
- package/docs/interfaces/WebhookDetail.html +2 -2
- package/docs/interfaces/ad.html +2 -2
- package/docs/interfaces/body.html +2 -2
- package/docs/interfaces/deleteWebhookResponse.html +2 -2
- package/docs/interfaces/{Device.html → device.html} +2 -2
- package/docs/interfaces/{DeviceList.html → deviceList.html} +2 -2
- package/docs/interfaces/deviceStatus.html +2 -2
- package/docs/interfaces/deviceStatusRequest.html +2 -2
- package/docs/interfaces/deviceWebhook.html +2 -2
- package/docs/interfaces/deviceWebhookContext.html +2 -2
- package/docs/interfaces/devices.html +2 -2
- package/docs/interfaces/infraredRemoteList.html +2 -2
- package/docs/interfaces/irdevice.html +2 -2
- package/docs/interfaces/{PushRequest.html → pushRequest.html} +3 -3
- package/docs/interfaces/{PushResponseBody.html → pushResponseBody.html} +3 -3
- package/docs/interfaces/queryWebhookResponse.html +2 -2
- package/docs/interfaces/setupWebhookResponse.html +2 -2
- package/docs/interfaces/updateWebhookResponse.html +2 -2
- package/docs/interfaces/webhookRequest.html +2 -2
- package/docs/modules.html +1 -1
- package/docs/types/BLEDeviceServiceData.html +1 -1
- package/docs/types/IndoorCam.html +1 -1
- package/docs/types/MacAddress.html +1 -1
- package/docs/types/{BatteryCirculatorFan.html → batteryCirculatorFan.html} +1 -1
- package/docs/types/{BatteryCirculatorFanServiceData.html → batteryCirculatorFanServiceData.html} +1 -1
- package/docs/types/{BatteryCirculatorFanStatus.html → batteryCirculatorFanStatus.html} +1 -1
- package/docs/types/batteryCirculatorFanWebhookContext.html +1 -1
- package/docs/types/{BlindTilt.html → blindTilt.html} +1 -1
- package/docs/types/{BlindTiltServiceData.html → blindTiltServiceData.html} +1 -1
- package/docs/types/{BlindTiltStatus.html → blindTiltStatus.html} +1 -1
- package/docs/types/blindTiltWebhookContext.html +1 -1
- package/docs/types/{Bot.html → bot.html} +1 -1
- package/docs/types/{BotServiceData.html → botServiceData.html} +1 -1
- package/docs/types/botStatus.html +1 -1
- package/docs/types/botWebhookContext.html +1 -1
- package/docs/types/{CeilingLight.html → ceilingLight.html} +1 -1
- package/docs/types/{CeilingLightPro.html → ceilingLightPro.html} +1 -1
- package/docs/types/{CeilingLightProServiceData.html → ceilingLightProServiceData.html} +1 -1
- package/docs/types/ceilingLightProStatus.html +1 -1
- package/docs/types/ceilingLightProWebhookContext.html +1 -1
- package/docs/types/{CeilingLightServiceData.html → ceilingLightServiceData.html} +1 -1
- package/docs/types/ceilingLightStatus.html +1 -1
- package/docs/types/ceilingLightWebhookContext.html +1 -1
- package/docs/types/{CirculatorFanStatus.html → circulatorFanStatus.html} +1 -1
- package/docs/types/circulatorFanWebhookContext.html +1 -1
- package/docs/types/{ColorBulb.html → colorBulb.html} +1 -1
- package/docs/types/{ColorBulbServiceData.html → colorBulbServiceData.html} +1 -1
- package/docs/types/colorBulbStatus.html +1 -1
- package/docs/types/colorBulbWebhookContext.html +1 -1
- package/docs/types/{CommandType.html → commandType.html} +2 -2
- package/docs/types/{ContactSensor.html → contactSensor.html} +1 -1
- package/docs/types/{ContactSensorServiceData.html → contactSensorServiceData.html} +1 -1
- package/docs/types/contactSensorStatus.html +1 -1
- package/docs/types/contactSensorWebhookContext.html +1 -1
- package/docs/types/{Curtain.html → curtain.html} +1 -1
- package/docs/types/{Curtain3.html → curtain3.html} +1 -1
- package/docs/types/{Curtain3ServiceData.html → curtain3ServiceData.html} +1 -1
- package/docs/types/curtain3WebhookContext.html +1 -1
- package/docs/types/{CurtainServiceData.html → curtainServiceData.html} +1 -1
- package/docs/types/curtainStatus.html +1 -1
- package/docs/types/curtainWebhookContext.html +1 -1
- package/docs/types/{FloorCleaningRobotS10.html → floorCleaningRobotS10.html} +1 -1
- package/docs/types/floorCleaningRobotS10Status.html +1 -1
- package/docs/types/floorCleaningRobotS10WebhookContext.html +1 -1
- package/docs/types/{Hub2.html → hub2.html} +1 -1
- package/docs/types/{Hub2ServiceData.html → hub2ServiceData.html} +1 -1
- package/docs/types/{Hub2Status.html → hub2Status.html} +1 -1
- package/docs/types/hub2WebhookContext.html +1 -1
- package/docs/types/{Humidifier.html → humidifier.html} +1 -1
- package/docs/types/{Humidifier2ServiceData.html → humidifier2ServiceData.html} +1 -1
- package/docs/types/{Humidifier2Status.html → humidifier2Status.html} +1 -1
- package/docs/types/humidifier2WebhookContext.html +1 -1
- package/docs/types/{HumidifierServiceData.html → humidifierServiceData.html} +1 -1
- package/docs/types/{HumidifierStatus.html → humidifierStatus.html} +1 -1
- package/docs/types/humidifierWebhookContext.html +1 -1
- package/docs/types/indoorCameraWebhookContext.html +1 -1
- package/docs/types/{Keypad.html → keypad.html} +1 -1
- package/docs/types/{KeypadDetectorServiceData.html → keypadDetectorServiceData.html} +1 -1
- package/docs/types/{KeypadTouch.html → keypadTouch.html} +1 -1
- package/docs/types/keypadTouchWebhookContext.html +1 -1
- package/docs/types/keypadWebhookContext.html +1 -1
- package/docs/types/{Lock.html → lock.html} +1 -1
- package/docs/types/{LockPro.html → lockPro.html} +1 -1
- package/docs/types/{LockProServiceData.html → lockProServiceData.html} +1 -1
- package/docs/types/lockProStatus.html +1 -1
- package/docs/types/lockProWebhookContext.html +1 -1
- package/docs/types/{LockServiceData.html → lockServiceData.html} +1 -1
- package/docs/types/lockStatus.html +1 -1
- package/docs/types/lockWebhookContext.html +1 -1
- package/docs/types/{Meter.html → meter.html} +1 -1
- package/docs/types/{MeterPlus.html → meterPlus.html} +1 -1
- package/docs/types/{MeterPlusServiceData.html → meterPlusServiceData.html} +1 -1
- package/docs/types/meterPlusStatus.html +1 -1
- package/docs/types/meterPlusWebhookContext.html +1 -1
- package/docs/types/{MeterPro.html → meterPro.html} +1 -1
- package/docs/types/{MeterProCO2ServiceData.html → meterProCO2ServiceData.html} +1 -1
- package/docs/types/meterProCO2Status.html +1 -1
- package/docs/types/meterProCO2WebhookContext.html +1 -1
- package/docs/types/{MeterProServiceData.html → meterProServiceData.html} +1 -1
- package/docs/types/meterProStatus.html +1 -1
- package/docs/types/meterProWebhookContext.html +1 -1
- package/docs/types/{MeterServiceData.html → meterServiceData.html} +1 -1
- package/docs/types/meterStatus.html +1 -1
- package/docs/types/meterWebhookContext.html +1 -1
- package/docs/types/{MotionSensor.html → motionSensor.html} +1 -1
- package/docs/types/{MotionSensorServiceData.html → motionSensorServiceData.html} +1 -1
- package/docs/types/motionSensorStatus.html +1 -1
- package/docs/types/motionSensorWebhookContext.html +1 -1
- package/docs/types/onadvertisement.html +1 -1
- package/docs/types/ondiscover.html +1 -1
- package/docs/types/{OutdoorMeter.html → outdoorMeter.html} +1 -1
- package/docs/types/{OutdoorMeterServiceData.html → outdoorMeterServiceData.html} +1 -1
- package/docs/types/outdoorMeterStatus.html +1 -1
- package/docs/types/outdoorMeterWebhookContext.html +1 -1
- package/docs/types/panTiltCamWebhookContext.html +1 -1
- package/docs/types/{PantiltCam.html → pantiltCam.html} +1 -1
- package/docs/types/{PantiltCam2k.html → pantiltCam2k.html} +1 -1
- package/docs/types/{Plug.html → plug.html} +1 -1
- package/docs/types/{PlugMini.html → plugMini.html} +1 -1
- package/docs/types/{PlugMiniJPServiceData.html → plugMiniJPServiceData.html} +1 -1
- package/docs/types/plugMiniJPWebhookContext.html +1 -1
- package/docs/types/plugMiniStatus.html +1 -1
- package/docs/types/{PlugMiniUSServiceData.html → plugMiniUSServiceData.html} +1 -1
- package/docs/types/plugMiniUSWebhookContext.html +1 -1
- package/docs/types/plugStatus.html +1 -1
- package/docs/types/plugWebhookContext.html +1 -1
- package/docs/types/relaySwitch1Context.html +1 -1
- package/docs/types/relaySwitch1PMContext.html +1 -1
- package/docs/types/{RelaySwitch1PMServiceData.html → relaySwitch1PMServiceData.html} +1 -1
- package/docs/types/relaySwitch1PMStatus.html +1 -1
- package/docs/types/{RelaySwitch1ServiceData.html → relaySwitch1ServiceData.html} +1 -1
- package/docs/types/relaySwitch1Status.html +1 -1
- package/docs/types/{Remote.html → remote.html} +1 -1
- package/docs/types/{RemoteServiceData.html → remoteServiceData.html} +1 -1
- package/docs/types/{RobotVacuumCleanerS1.html → robotVacuumCleanerS1.html} +1 -1
- package/docs/types/{RobotVacuumCleanerS1Plus.html → robotVacuumCleanerS1Plus.html} +1 -1
- package/docs/types/robotVacuumCleanerS1PlusStatus.html +1 -1
- package/docs/types/robotVacuumCleanerS1PlusWebhookContext.html +1 -1
- package/docs/types/robotVacuumCleanerS1Status.html +1 -1
- package/docs/types/robotVacuumCleanerS1WebhookContext.html +1 -1
- package/docs/types/{RobotVacuumCleanerServiceData.html → robotVacuumCleanerServiceData.html} +1 -1
- package/docs/types/{StripLight.html → stripLight.html} +1 -1
- package/docs/types/{StripLightServiceData.html → stripLightServiceData.html} +1 -1
- package/docs/types/stripLightStatus.html +1 -1
- package/docs/types/stripLightWebhookContext.html +1 -1
- package/docs/types/{WaterLeakDetector.html → waterLeakDetector.html} +1 -1
- package/docs/types/{WaterLeakDetectorServiceData.html → waterLeakDetectorServiceData.html} +1 -1
- package/docs/types/waterLeakDetectorStatus.html +1 -1
- package/docs/types/waterLeakDetectorWebhookContext.html +1 -1
- package/docs/variables/parameterChecker.html +1 -1
- package/docs/variables/urls.html +1 -1
- package/package.json +1 -1
package/dist/types/ble.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export interface LockBaseServiceData extends BLEServiceData {
|
|
|
75
75
|
auto_lock_paused: boolean;
|
|
76
76
|
night_latch: boolean;
|
|
77
77
|
}
|
|
78
|
-
export type
|
|
78
|
+
export type botServiceData = BLEServiceData & {
|
|
79
79
|
model: SwitchBotBLEModel.Bot;
|
|
80
80
|
modelName: SwitchBotBLEModelName.Bot;
|
|
81
81
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Bot;
|
|
@@ -83,12 +83,12 @@ export type BotServiceData = BLEServiceData & {
|
|
|
83
83
|
state: boolean;
|
|
84
84
|
battery: number;
|
|
85
85
|
};
|
|
86
|
-
export type
|
|
86
|
+
export type colorBulbServiceData = ColorLightServiceDataBase & {
|
|
87
87
|
model: SwitchBotBLEModel.ColorBulb;
|
|
88
88
|
modelName: SwitchBotBLEModelName.ColorBulb;
|
|
89
89
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.ColorBulb;
|
|
90
90
|
};
|
|
91
|
-
export type
|
|
91
|
+
export type contactSensorServiceData = BLEServiceData & {
|
|
92
92
|
model: SwitchBotBLEModel.ContactSensor;
|
|
93
93
|
modelName: SwitchBotBLEModelName.ContactSensor;
|
|
94
94
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.ContactSensor;
|
|
@@ -101,7 +101,7 @@ export type ContactSensorServiceData = BLEServiceData & {
|
|
|
101
101
|
button_count: number;
|
|
102
102
|
doorState: string;
|
|
103
103
|
};
|
|
104
|
-
export type
|
|
104
|
+
export type curtainServiceData = BLEServiceData & {
|
|
105
105
|
model: SwitchBotBLEModel.Curtain;
|
|
106
106
|
modelName: SwitchBotBLEModelName.Curtain;
|
|
107
107
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Curtain;
|
|
@@ -112,7 +112,7 @@ export type CurtainServiceData = BLEServiceData & {
|
|
|
112
112
|
lightLevel: number;
|
|
113
113
|
deviceChain: number;
|
|
114
114
|
};
|
|
115
|
-
export type
|
|
115
|
+
export type curtain3ServiceData = BLEServiceData & {
|
|
116
116
|
model: SwitchBotBLEModel.Curtain3;
|
|
117
117
|
modelName: SwitchBotBLEModelName.Curtain3;
|
|
118
118
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Curtain3;
|
|
@@ -123,48 +123,48 @@ export type Curtain3ServiceData = BLEServiceData & {
|
|
|
123
123
|
lightLevel: number;
|
|
124
124
|
deviceChain: number;
|
|
125
125
|
};
|
|
126
|
-
export type
|
|
126
|
+
export type stripLightServiceData = ColorLightServiceDataBase & {
|
|
127
127
|
model: SwitchBotBLEModel.StripLight;
|
|
128
128
|
modelName: SwitchBotBLEModelName.StripLight;
|
|
129
129
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.StripLight;
|
|
130
130
|
};
|
|
131
|
-
export type
|
|
131
|
+
export type lockServiceData = LockBaseServiceData & {
|
|
132
132
|
model: SwitchBotBLEModel.Lock;
|
|
133
133
|
modelName: SwitchBotBLEModelName.Lock;
|
|
134
134
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Lock;
|
|
135
135
|
};
|
|
136
|
-
export type
|
|
136
|
+
export type lockProServiceData = LockBaseServiceData & {
|
|
137
137
|
model: SwitchBotBLEModel.LockPro;
|
|
138
138
|
modelName: SwitchBotBLEModelName.LockPro;
|
|
139
139
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.LockPro;
|
|
140
140
|
};
|
|
141
|
-
export type
|
|
141
|
+
export type meterServiceData = TemperatureServiceDataBase & {
|
|
142
142
|
model: SwitchBotBLEModel.Meter;
|
|
143
143
|
modelName: SwitchBotBLEModelName.Meter;
|
|
144
144
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Meter;
|
|
145
145
|
};
|
|
146
|
-
export type
|
|
146
|
+
export type meterPlusServiceData = TemperatureServiceDataBase & {
|
|
147
147
|
model: SwitchBotBLEModel.MeterPlus;
|
|
148
148
|
modelName: SwitchBotBLEModelName.MeterPlus;
|
|
149
149
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.MeterPlus;
|
|
150
150
|
};
|
|
151
|
-
export type
|
|
151
|
+
export type meterProServiceData = TemperatureServiceDataBase & {
|
|
152
152
|
model: SwitchBotBLEModel.MeterPro;
|
|
153
153
|
modelName: SwitchBotBLEModelName.MeterPro;
|
|
154
154
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.MeterPro;
|
|
155
155
|
};
|
|
156
|
-
export type
|
|
156
|
+
export type meterProCO2ServiceData = TemperatureServiceDataBase & {
|
|
157
157
|
model: SwitchBotBLEModel.MeterProCO2;
|
|
158
158
|
modelName: SwitchBotBLEModelName.MeterProCO2;
|
|
159
159
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.MeterProCO2;
|
|
160
160
|
co2: number;
|
|
161
161
|
};
|
|
162
|
-
export type
|
|
162
|
+
export type outdoorMeterServiceData = TemperatureServiceDataBase & {
|
|
163
163
|
model: SwitchBotBLEModel.OutdoorMeter;
|
|
164
164
|
modelName: SwitchBotBLEModelName.OutdoorMeter;
|
|
165
165
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.OutdoorMeter;
|
|
166
166
|
};
|
|
167
|
-
export type
|
|
167
|
+
export type motionSensorServiceData = BLEServiceData & {
|
|
168
168
|
model: SwitchBotBLEModel.MotionSensor;
|
|
169
169
|
modelName: SwitchBotBLEModelName.MotionSensor;
|
|
170
170
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.MotionSensor;
|
|
@@ -177,17 +177,17 @@ export type MotionSensorServiceData = BLEServiceData & {
|
|
|
177
177
|
lightLevel: string;
|
|
178
178
|
is_light: boolean;
|
|
179
179
|
};
|
|
180
|
-
export type
|
|
180
|
+
export type plugMiniUSServiceData = PlugMiniServiceDataBase & {
|
|
181
181
|
model: SwitchBotBLEModel.PlugMiniUS;
|
|
182
182
|
modelName: SwitchBotBLEModelName.PlugMini;
|
|
183
183
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.PlugMini;
|
|
184
184
|
};
|
|
185
|
-
export type
|
|
185
|
+
export type plugMiniJPServiceData = PlugMiniServiceDataBase & {
|
|
186
186
|
model: SwitchBotBLEModel.PlugMiniJP;
|
|
187
187
|
modelName: SwitchBotBLEModelName.PlugMini;
|
|
188
188
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.PlugMini;
|
|
189
189
|
};
|
|
190
|
-
export type
|
|
190
|
+
export type blindTiltServiceData = BLEServiceData & {
|
|
191
191
|
model: SwitchBotBLEModel.BlindTilt;
|
|
192
192
|
modelName: SwitchBotBLEModelName.BlindTilt;
|
|
193
193
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.BlindTilt;
|
|
@@ -198,7 +198,7 @@ export type BlindTiltServiceData = BLEServiceData & {
|
|
|
198
198
|
lightLevel: number;
|
|
199
199
|
sequenceNumber: number;
|
|
200
200
|
};
|
|
201
|
-
export type
|
|
201
|
+
export type ceilingLightServiceData = BLEServiceData & {
|
|
202
202
|
model: SwitchBotBLEModel.CeilingLight;
|
|
203
203
|
modelName: SwitchBotBLEModelName.CeilingLight;
|
|
204
204
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.CeilingLight;
|
|
@@ -215,7 +215,7 @@ export type CeilingLightServiceData = BLEServiceData & {
|
|
|
215
215
|
speed: number;
|
|
216
216
|
loop_index: number;
|
|
217
217
|
};
|
|
218
|
-
export type
|
|
218
|
+
export type ceilingLightProServiceData = BLEServiceData & {
|
|
219
219
|
model: SwitchBotBLEModel.CeilingLightPro;
|
|
220
220
|
modelName: SwitchBotBLEModelName.CeilingLightPro;
|
|
221
221
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.CeilingLightPro;
|
|
@@ -232,7 +232,7 @@ export type CeilingLightProServiceData = BLEServiceData & {
|
|
|
232
232
|
speed: number;
|
|
233
233
|
loop_index: number;
|
|
234
234
|
};
|
|
235
|
-
export type
|
|
235
|
+
export type hub2ServiceData = BLEServiceData & {
|
|
236
236
|
model: SwitchBotBLEModel.Hub2;
|
|
237
237
|
modelName: SwitchBotBLEModelName.Hub2;
|
|
238
238
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Hub2;
|
|
@@ -242,14 +242,14 @@ export type Hub2ServiceData = BLEServiceData & {
|
|
|
242
242
|
humidity: number;
|
|
243
243
|
lightLevel: number;
|
|
244
244
|
};
|
|
245
|
-
export type
|
|
245
|
+
export type batteryCirculatorFanServiceData = BLEServiceData & {
|
|
246
246
|
model: SwitchBotBLEModel.Unknown;
|
|
247
247
|
modelName: SwitchBotBLEModelName.Unknown;
|
|
248
248
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Unknown;
|
|
249
249
|
state: string;
|
|
250
250
|
fanSpeed: number;
|
|
251
251
|
};
|
|
252
|
-
export type
|
|
252
|
+
export type waterLeakDetectorServiceData = BLEServiceData & {
|
|
253
253
|
model: SwitchBotBLEModel.Leak;
|
|
254
254
|
modelName: SwitchBotBLEModelName.Leak;
|
|
255
255
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Leak;
|
|
@@ -258,7 +258,7 @@ export type WaterLeakDetectorServiceData = BLEServiceData & {
|
|
|
258
258
|
battery: number;
|
|
259
259
|
low_battery: boolean;
|
|
260
260
|
};
|
|
261
|
-
export type
|
|
261
|
+
export type humidifierServiceData = BLEServiceData & {
|
|
262
262
|
model: SwitchBotBLEModel.Humidifier;
|
|
263
263
|
modelName: SwitchBotBLEModelName.Humidifier;
|
|
264
264
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Humidifier;
|
|
@@ -267,7 +267,7 @@ export type HumidifierServiceData = BLEServiceData & {
|
|
|
267
267
|
percentage: number;
|
|
268
268
|
humidity: number;
|
|
269
269
|
};
|
|
270
|
-
export type
|
|
270
|
+
export type humidifier2ServiceData = BLEServiceData & {
|
|
271
271
|
model: SwitchBotBLEModel.Humidifier2;
|
|
272
272
|
modelName: SwitchBotBLEModelName.Humidifier2;
|
|
273
273
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Humidifier2;
|
|
@@ -285,14 +285,14 @@ export type Humidifier2ServiceData = BLEServiceData & {
|
|
|
285
285
|
filterAlert: boolean;
|
|
286
286
|
waterLevel: number;
|
|
287
287
|
};
|
|
288
|
-
export type
|
|
288
|
+
export type robotVacuumCleanerServiceData = BLEServiceData & {
|
|
289
289
|
model: SwitchBotBLEModel.Unknown;
|
|
290
290
|
modelName: SwitchBotBLEModelName.Unknown;
|
|
291
291
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Unknown;
|
|
292
292
|
state: string;
|
|
293
293
|
battery: number;
|
|
294
294
|
};
|
|
295
|
-
export type
|
|
295
|
+
export type keypadDetectorServiceData = BLEServiceData & {
|
|
296
296
|
model: SwitchBotBLEModel.Keypad;
|
|
297
297
|
modelName: SwitchBotBLEModelName.Keypad;
|
|
298
298
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Keypad;
|
|
@@ -301,7 +301,7 @@ export type KeypadDetectorServiceData = BLEServiceData & {
|
|
|
301
301
|
battery: number;
|
|
302
302
|
low_battery: boolean;
|
|
303
303
|
};
|
|
304
|
-
export type
|
|
304
|
+
export type relaySwitch1ServiceData = BLEServiceData & {
|
|
305
305
|
model: SwitchBotBLEModel.RelaySwitch1;
|
|
306
306
|
modelName: SwitchBotBLEModelName.RelaySwitch1;
|
|
307
307
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.RelaySwitch1;
|
|
@@ -309,7 +309,7 @@ export type RelaySwitch1ServiceData = BLEServiceData & {
|
|
|
309
309
|
state: boolean;
|
|
310
310
|
sequence_number: number;
|
|
311
311
|
};
|
|
312
|
-
export type
|
|
312
|
+
export type relaySwitch1PMServiceData = BLEServiceData & {
|
|
313
313
|
model: SwitchBotBLEModel.RelaySwitch1PM;
|
|
314
314
|
modelName: SwitchBotBLEModelName.RelaySwitch1PM;
|
|
315
315
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.RelaySwitch1PM;
|
|
@@ -320,12 +320,12 @@ export type RelaySwitch1PMServiceData = BLEServiceData & {
|
|
|
320
320
|
voltage: number;
|
|
321
321
|
current: number;
|
|
322
322
|
};
|
|
323
|
-
export type
|
|
323
|
+
export type remoteServiceData = BLEServiceData & {
|
|
324
324
|
model: SwitchBotBLEModel.Remote;
|
|
325
325
|
modelName: SwitchBotBLEModelName.Remote;
|
|
326
326
|
modelFriendlyName: SwitchBotBLEModelFriendlyName.Remote;
|
|
327
327
|
battery: number;
|
|
328
328
|
};
|
|
329
|
-
export type BLEDeviceServiceData =
|
|
329
|
+
export type BLEDeviceServiceData = batteryCirculatorFanServiceData | blindTiltServiceData | botServiceData | ceilingLightServiceData | ceilingLightProServiceData | colorBulbServiceData | contactSensorServiceData | curtain3ServiceData | curtainServiceData | hub2ServiceData | keypadDetectorServiceData | lockProServiceData | lockServiceData | meterPlusServiceData | meterProCO2ServiceData | meterProServiceData | meterServiceData | motionSensorServiceData | outdoorMeterServiceData | plugMiniJPServiceData | plugMiniUSServiceData | relaySwitch1PMServiceData | relaySwitch1ServiceData | remoteServiceData | robotVacuumCleanerServiceData | stripLightServiceData | waterLeakDetectorServiceData | humidifier2ServiceData | humidifierServiceData;
|
|
330
330
|
export {};
|
|
331
331
|
//# sourceMappingURL=ble.d.ts.map
|
package/dist/types/openapi.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface
|
|
2
|
-
device:
|
|
1
|
+
export interface deviceList {
|
|
2
|
+
device: device[];
|
|
3
3
|
}
|
|
4
|
-
export interface
|
|
4
|
+
export interface device {
|
|
5
5
|
deviceId: string;
|
|
6
6
|
deviceName: string;
|
|
7
7
|
deviceType: string;
|
|
@@ -9,49 +9,49 @@ export interface Device {
|
|
|
9
9
|
hubDeviceId: string;
|
|
10
10
|
version?: number;
|
|
11
11
|
}
|
|
12
|
-
export type
|
|
13
|
-
export type
|
|
12
|
+
export type bot = device;
|
|
13
|
+
export type curtain = device & {
|
|
14
14
|
curtainDevicesIds: string[];
|
|
15
15
|
calibrate: boolean;
|
|
16
16
|
group: boolean;
|
|
17
17
|
master: boolean;
|
|
18
18
|
openDirection: string;
|
|
19
19
|
};
|
|
20
|
-
export type
|
|
20
|
+
export type curtain3 = device & {
|
|
21
21
|
curtainDevicesIds: string[];
|
|
22
22
|
calibrate: boolean;
|
|
23
23
|
group: boolean;
|
|
24
24
|
master: boolean;
|
|
25
25
|
openDirection?: string;
|
|
26
26
|
};
|
|
27
|
-
export type
|
|
28
|
-
export type
|
|
29
|
-
export type
|
|
30
|
-
export type
|
|
31
|
-
export type
|
|
32
|
-
export type
|
|
27
|
+
export type hub2 = device;
|
|
28
|
+
export type meter = device;
|
|
29
|
+
export type meterPlus = device;
|
|
30
|
+
export type meterPro = device;
|
|
31
|
+
export type outdoorMeter = device;
|
|
32
|
+
export type lock = device & {
|
|
33
33
|
group: boolean;
|
|
34
34
|
master: boolean;
|
|
35
35
|
groupName: string;
|
|
36
36
|
lockDevicesIds: string[];
|
|
37
37
|
};
|
|
38
|
-
export type
|
|
38
|
+
export type lockPro = device & {
|
|
39
39
|
group: boolean;
|
|
40
40
|
master: boolean;
|
|
41
41
|
groupName: string;
|
|
42
42
|
lockDevicesIds: string[];
|
|
43
43
|
};
|
|
44
|
-
export type
|
|
44
|
+
export type keypad = device & {
|
|
45
45
|
remoteType: string;
|
|
46
46
|
lockDeviceId: string;
|
|
47
|
-
keyList:
|
|
47
|
+
keyList: keyList;
|
|
48
48
|
};
|
|
49
|
-
export type
|
|
49
|
+
export type keypadTouch = device & {
|
|
50
50
|
remoteType: string;
|
|
51
51
|
lockDeviceId: string;
|
|
52
|
-
keyList:
|
|
52
|
+
keyList: keyList;
|
|
53
53
|
};
|
|
54
|
-
interface
|
|
54
|
+
interface keyList {
|
|
55
55
|
id: number;
|
|
56
56
|
name: string;
|
|
57
57
|
type: string;
|
|
@@ -60,24 +60,24 @@ interface KeyList {
|
|
|
60
60
|
status: string;
|
|
61
61
|
createTime: number;
|
|
62
62
|
}
|
|
63
|
-
export type
|
|
64
|
-
export type
|
|
65
|
-
export type
|
|
66
|
-
export type
|
|
67
|
-
export type
|
|
68
|
-
export type
|
|
69
|
-
export type
|
|
70
|
-
export type
|
|
71
|
-
export type
|
|
72
|
-
export type
|
|
73
|
-
export type
|
|
74
|
-
export type
|
|
75
|
-
export type
|
|
76
|
-
export type
|
|
77
|
-
export type IndoorCam =
|
|
78
|
-
export type
|
|
79
|
-
export type
|
|
80
|
-
export type
|
|
63
|
+
export type remote = device;
|
|
64
|
+
export type motionSensor = device;
|
|
65
|
+
export type contactSensor = device;
|
|
66
|
+
export type waterLeakDetector = device;
|
|
67
|
+
export type ceilingLight = device;
|
|
68
|
+
export type ceilingLightPro = device;
|
|
69
|
+
export type plug = device;
|
|
70
|
+
export type plugMini = device;
|
|
71
|
+
export type stripLight = device;
|
|
72
|
+
export type colorBulb = device;
|
|
73
|
+
export type robotVacuumCleanerS1 = device;
|
|
74
|
+
export type robotVacuumCleanerS1Plus = device;
|
|
75
|
+
export type floorCleaningRobotS10 = device;
|
|
76
|
+
export type humidifier = device;
|
|
77
|
+
export type IndoorCam = device;
|
|
78
|
+
export type pantiltCam = device;
|
|
79
|
+
export type pantiltCam2k = device;
|
|
80
|
+
export type blindTilt = device & {
|
|
81
81
|
blindTiltDevicesIds: string[];
|
|
82
82
|
calibrate: boolean;
|
|
83
83
|
group: boolean;
|
|
@@ -85,23 +85,23 @@ export type BlindTilt = Device & {
|
|
|
85
85
|
direction: string;
|
|
86
86
|
slidePosition: number;
|
|
87
87
|
};
|
|
88
|
-
export type
|
|
88
|
+
export type batteryCirculatorFan = device;
|
|
89
89
|
/**
|
|
90
90
|
* Allowed command types for device control.
|
|
91
91
|
*/
|
|
92
|
-
export type
|
|
92
|
+
export type commandType = 'command' | 'customize';
|
|
93
93
|
/**
|
|
94
94
|
* Request payload for controlling a device.
|
|
95
95
|
*/
|
|
96
|
-
export interface
|
|
96
|
+
export interface pushRequest {
|
|
97
97
|
command: string;
|
|
98
98
|
parameter: string;
|
|
99
|
-
commandType:
|
|
99
|
+
commandType: commandType;
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* Body of a device push response.
|
|
103
103
|
*/
|
|
104
|
-
export interface
|
|
104
|
+
export interface pushResponseBody {
|
|
105
105
|
commandId: string;
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
@@ -109,7 +109,7 @@ export interface PushResponseBody {
|
|
|
109
109
|
*/
|
|
110
110
|
export interface PushResponse {
|
|
111
111
|
statusCode: number;
|
|
112
|
-
body:
|
|
112
|
+
body: pushResponseBody;
|
|
113
113
|
message: string;
|
|
114
114
|
}
|
|
115
115
|
export interface devices {
|
|
@@ -118,7 +118,7 @@ export interface devices {
|
|
|
118
118
|
body: body;
|
|
119
119
|
}
|
|
120
120
|
export interface body {
|
|
121
|
-
deviceList:
|
|
121
|
+
deviceList: device[];
|
|
122
122
|
infraredRemoteList: infraredRemoteList;
|
|
123
123
|
}
|
|
124
124
|
export interface deviceStatusRequest {
|
|
@@ -126,7 +126,7 @@ export interface deviceStatusRequest {
|
|
|
126
126
|
message: string;
|
|
127
127
|
body: deviceStatus;
|
|
128
128
|
}
|
|
129
|
-
export interface deviceStatus extends
|
|
129
|
+
export interface deviceStatus extends device {
|
|
130
130
|
deviceId: string;
|
|
131
131
|
deviceType: string;
|
|
132
132
|
hubDeviceId: string;
|
|
@@ -249,7 +249,7 @@ export type floorCleaningRobotS10Status = deviceStatus & {
|
|
|
249
249
|
waterBaseBattery: number;
|
|
250
250
|
taskType: string;
|
|
251
251
|
};
|
|
252
|
-
export type
|
|
252
|
+
export type humidifierStatus = deviceStatus & {
|
|
253
253
|
power: string;
|
|
254
254
|
humidity: number;
|
|
255
255
|
temperature: number;
|
|
@@ -259,7 +259,7 @@ export type HumidifierStatus = deviceStatus & {
|
|
|
259
259
|
sound: boolean;
|
|
260
260
|
lackWater: boolean;
|
|
261
261
|
};
|
|
262
|
-
export type
|
|
262
|
+
export type humidifier2Status = deviceStatus & {
|
|
263
263
|
power: string;
|
|
264
264
|
humidity: number;
|
|
265
265
|
temperature: number;
|
|
@@ -269,19 +269,19 @@ export type Humidifier2Status = deviceStatus & {
|
|
|
269
269
|
sound: boolean;
|
|
270
270
|
lackWater: boolean;
|
|
271
271
|
};
|
|
272
|
-
export type
|
|
272
|
+
export type blindTiltStatus = deviceStatus & {
|
|
273
273
|
calibrate: boolean;
|
|
274
274
|
battery: number;
|
|
275
275
|
direction: string;
|
|
276
276
|
slidePosition: string;
|
|
277
277
|
lightLevel?: 'bright' | 'dim';
|
|
278
278
|
};
|
|
279
|
-
export type
|
|
279
|
+
export type hub2Status = deviceStatus & {
|
|
280
280
|
temperature: number;
|
|
281
281
|
lightLevel: number;
|
|
282
282
|
humidity: number;
|
|
283
283
|
};
|
|
284
|
-
export type
|
|
284
|
+
export type batteryCirculatorFanStatus = deviceStatus & {
|
|
285
285
|
mode: 'direct' | 'natural' | 'sleep' | 'baby';
|
|
286
286
|
version: string;
|
|
287
287
|
battery: number;
|
|
@@ -292,7 +292,7 @@ export type BatteryCirculatorFanStatus = deviceStatus & {
|
|
|
292
292
|
chargingStatus: string;
|
|
293
293
|
fanSpeed: number;
|
|
294
294
|
};
|
|
295
|
-
export type
|
|
295
|
+
export type circulatorFanStatus = deviceStatus & {
|
|
296
296
|
mode: 'direct' | 'natural' | 'sleep' | 'baby';
|
|
297
297
|
version: string;
|
|
298
298
|
power: string;
|
package/docs/assets/hierarchy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.hierarchyData = "
|
|
1
|
+
window.hierarchyData = "eJyVlktvnDAURv+L1zeNrw1+sGy6SNsZZdRJlEWUBQNOxgqPCEyrKJr/XiHUBE8m2F0hwcc5tuHa95V0bet6kt0xqSUwqe+BdOahMoWzbdOT7JUwqcdLk9eGZGT7x7piv2vdN/PbFoYAebJNSTJkCsjQVSQj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