node-switchbot 3.6.5 → 4.0.0-beta.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.
- package/.github/npm-version-script-esm.js +97 -0
- package/CHANGELOG.md +586 -0
- package/PRODUCTION_READY.md +135 -0
- package/README.md +92 -0
- package/dist/api.d.ts +130 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +286 -0
- package/dist/api.js.map +1 -0
- package/dist/ble.d.ts +116 -0
- package/dist/ble.d.ts.map +1 -0
- package/dist/ble.js +430 -0
- package/dist/ble.js.map +1 -0
- package/dist/devices/base.d.ts +146 -0
- package/dist/devices/base.d.ts.map +1 -0
- package/dist/devices/base.js +324 -0
- package/dist/devices/base.js.map +1 -0
- package/dist/devices/index.d.ts +30 -0
- package/dist/devices/index.d.ts.map +1 -0
- package/dist/devices/index.js +34 -0
- package/dist/devices/index.js.map +1 -0
- package/dist/devices/wo-air-purifier-table.d.ts +8 -0
- package/dist/devices/wo-air-purifier-table.d.ts.map +1 -0
- package/dist/devices/wo-air-purifier-table.js +12 -0
- package/dist/devices/wo-air-purifier-table.js.map +1 -0
- package/dist/devices/wo-air-purifier.d.ts +28 -0
- package/dist/devices/wo-air-purifier.d.ts.map +1 -0
- package/dist/devices/wo-air-purifier.js +105 -0
- package/dist/devices/wo-air-purifier.js.map +1 -0
- package/dist/devices/wo-blind-tilt.d.ts +36 -0
- package/dist/devices/wo-blind-tilt.d.ts.map +1 -0
- package/dist/devices/wo-blind-tilt.js +95 -0
- package/dist/devices/wo-blind-tilt.js.map +1 -0
- package/dist/devices/wo-bulb.d.ts +32 -0
- package/dist/devices/wo-bulb.d.ts.map +1 -0
- package/dist/devices/wo-bulb.js +109 -0
- package/dist/devices/wo-bulb.js.map +1 -0
- package/dist/devices/wo-ceiling-light.d.ts +8 -0
- package/dist/devices/wo-ceiling-light.d.ts.map +1 -0
- package/dist/devices/wo-ceiling-light.js +12 -0
- package/dist/devices/wo-ceiling-light.js.map +1 -0
- package/dist/devices/wo-contact.d.ts +12 -0
- package/dist/devices/wo-contact.d.ts.map +1 -0
- package/dist/devices/wo-contact.js +50 -0
- package/dist/devices/wo-contact.js.map +1 -0
- package/dist/devices/wo-curtain.d.ts +28 -0
- package/dist/devices/wo-curtain.d.ts.map +1 -0
- package/dist/devices/wo-curtain.js +82 -0
- package/dist/devices/wo-curtain.js.map +1 -0
- package/dist/devices/wo-hand.d.ts +24 -0
- package/dist/devices/wo-hand.d.ts.map +1 -0
- package/dist/devices/wo-hand.js +70 -0
- package/dist/devices/wo-hand.js.map +1 -0
- package/dist/devices/wo-hub2.d.ts +12 -0
- package/dist/devices/wo-hub2.d.ts.map +1 -0
- package/dist/devices/wo-hub2.js +48 -0
- package/dist/devices/wo-hub2.js.map +1 -0
- package/dist/devices/wo-hub3.d.ts +8 -0
- package/dist/devices/wo-hub3.d.ts.map +1 -0
- package/dist/devices/wo-hub3.js +12 -0
- package/dist/devices/wo-hub3.js.map +1 -0
- package/dist/devices/wo-humi.d.ts +28 -0
- package/dist/devices/wo-humi.d.ts.map +1 -0
- package/dist/devices/wo-humi.js +91 -0
- package/dist/devices/wo-humi.js.map +1 -0
- package/dist/devices/wo-humi2.d.ts +8 -0
- package/dist/devices/wo-humi2.d.ts.map +1 -0
- package/dist/devices/wo-humi2.js +12 -0
- package/dist/devices/wo-humi2.js.map +1 -0
- package/dist/devices/wo-io-sensor-th.d.ts +8 -0
- package/dist/devices/wo-io-sensor-th.d.ts.map +1 -0
- package/dist/devices/wo-io-sensor-th.js +12 -0
- package/dist/devices/wo-io-sensor-th.js.map +1 -0
- package/dist/devices/wo-keypad.d.ts +13 -0
- package/dist/devices/wo-keypad.d.ts.map +1 -0
- package/dist/devices/wo-keypad.js +46 -0
- package/dist/devices/wo-keypad.js.map +1 -0
- package/dist/devices/wo-leak.d.ts +12 -0
- package/dist/devices/wo-leak.d.ts.map +1 -0
- package/dist/devices/wo-leak.js +46 -0
- package/dist/devices/wo-leak.js.map +1 -0
- package/dist/devices/wo-lock-pro.d.ts +24 -0
- package/dist/devices/wo-lock-pro.d.ts.map +1 -0
- package/dist/devices/wo-lock-pro.js +72 -0
- package/dist/devices/wo-lock-pro.js.map +1 -0
- package/dist/devices/wo-lock.d.ts +20 -0
- package/dist/devices/wo-lock.d.ts.map +1 -0
- package/dist/devices/wo-lock.js +64 -0
- package/dist/devices/wo-lock.js.map +1 -0
- package/dist/devices/wo-plug-mini-jp.d.ts +8 -0
- package/dist/devices/wo-plug-mini-jp.d.ts.map +1 -0
- package/dist/devices/wo-plug-mini-jp.js +12 -0
- package/dist/devices/wo-plug-mini-jp.js.map +1 -0
- package/dist/devices/wo-plug-mini-us.d.ts +24 -0
- package/dist/devices/wo-plug-mini-us.d.ts.map +1 -0
- package/dist/devices/wo-plug-mini-us.js +70 -0
- package/dist/devices/wo-plug-mini-us.js.map +1 -0
- package/dist/devices/wo-presence.d.ts +12 -0
- package/dist/devices/wo-presence.d.ts.map +1 -0
- package/dist/devices/wo-presence.js +48 -0
- package/dist/devices/wo-presence.js.map +1 -0
- package/dist/devices/wo-relay-switch-1.d.ts +24 -0
- package/dist/devices/wo-relay-switch-1.d.ts.map +1 -0
- package/dist/devices/wo-relay-switch-1.js +70 -0
- package/dist/devices/wo-relay-switch-1.js.map +1 -0
- package/dist/devices/wo-relay-switch-1pm.d.ts +8 -0
- package/dist/devices/wo-relay-switch-1pm.d.ts.map +1 -0
- package/dist/devices/wo-relay-switch-1pm.js +12 -0
- package/dist/devices/wo-relay-switch-1pm.js.map +1 -0
- package/dist/devices/wo-remote.d.ts +13 -0
- package/dist/devices/wo-remote.d.ts.map +1 -0
- package/dist/devices/wo-remote.js +45 -0
- package/dist/devices/wo-remote.js.map +1 -0
- package/dist/devices/wo-sensor-th-plus.d.ts +8 -0
- package/dist/devices/wo-sensor-th-plus.d.ts.map +1 -0
- package/dist/devices/wo-sensor-th-plus.js +12 -0
- package/dist/devices/wo-sensor-th-plus.js.map +1 -0
- package/dist/devices/wo-sensor-th-pro-co2.d.ts +8 -0
- package/dist/devices/wo-sensor-th-pro-co2.d.ts.map +1 -0
- package/dist/devices/wo-sensor-th-pro-co2.js +12 -0
- package/dist/devices/wo-sensor-th-pro-co2.js.map +1 -0
- package/dist/devices/wo-sensor-th-pro.d.ts +8 -0
- package/dist/devices/wo-sensor-th-pro.d.ts.map +1 -0
- package/dist/devices/wo-sensor-th-pro.js +12 -0
- package/dist/devices/wo-sensor-th-pro.js.map +1 -0
- package/dist/devices/wo-sensor-th.d.ts +12 -0
- package/dist/devices/wo-sensor-th.d.ts.map +1 -0
- package/dist/devices/wo-sensor-th.js +49 -0
- package/dist/devices/wo-sensor-th.js.map +1 -0
- package/dist/devices/wo-strip.d.ts +8 -0
- package/dist/devices/wo-strip.d.ts.map +1 -0
- package/dist/devices/wo-strip.js +12 -0
- package/dist/devices/wo-strip.js.map +1 -0
- package/dist/errors.d.ts +63 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +103 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -10
- package/dist/index.js.map +1 -1
- package/dist/settings.d.ts +126 -47
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +214 -64
- package/dist/settings.js.map +1 -1
- package/dist/switchbot.d.ts +80 -0
- package/dist/switchbot.d.ts.map +1 -0
- package/dist/switchbot.js +376 -0
- package/dist/switchbot.js.map +1 -0
- package/dist/types/api.d.ts +187 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +6 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/ble.d.ts +246 -343
- package/dist/types/ble.d.ts.map +1 -1
- package/dist/types/ble.js +94 -1
- package/dist/types/ble.js.map +1 -1
- package/dist/types/device.d.ts +209 -0
- package/dist/types/device.d.ts.map +1 -0
- package/dist/types/device.js +6 -0
- package/dist/types/device.js.map +1 -0
- package/dist/types/index.d.ts +115 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/index.d.ts +97 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +206 -0
- package/dist/utils/index.js.map +1 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +20 -6
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +3 -3
- package/docs/classes/APIError.html +6 -0
- package/docs/classes/APINotAvailableError.html +4 -0
- package/docs/classes/BLEConnection.html +17 -0
- package/docs/classes/BLENotAvailableError.html +4 -0
- package/docs/classes/BLEScanner.html +15 -0
- package/docs/classes/CommandFailedError.html +6 -0
- package/docs/classes/ConnectionTimeoutError.html +5 -0
- package/docs/classes/DeviceManager.html +25 -0
- package/docs/classes/DeviceNotFoundError.html +4 -0
- package/docs/classes/DiscoveryError.html +5 -0
- package/docs/classes/OpenAPIClient.html +66 -0
- package/docs/classes/SwitchBot.html +21 -0
- package/docs/classes/SwitchBotDevice.html +28 -0
- package/docs/classes/SwitchBotError.html +4 -0
- package/docs/classes/ValidationError.html +5 -0
- package/docs/classes/WoAirPurifier.html +32 -80
- package/docs/classes/WoAirPurifierTable.html +36 -83
- package/docs/classes/WoBlindTilt.html +34 -73
- package/docs/classes/WoBulb.html +33 -85
- package/docs/classes/WoCeilingLight.html +38 -107
- package/docs/classes/WoContact.html +27 -52
- package/docs/classes/WoCurtain.html +32 -69
- package/docs/classes/WoHand.html +30 -59
- package/docs/classes/WoHub2.html +27 -52
- package/docs/classes/WoHub3.html +28 -52
- package/docs/classes/WoHumi.html +33 -65
- package/docs/classes/WoHumi2.html +36 -67
- package/docs/classes/WoIOSensorTH.html +28 -53
- package/docs/classes/WoKeypad.html +28 -52
- package/docs/classes/WoLeak.html +27 -53
- package/docs/classes/WoPlugMiniJP.html +34 -78
- package/docs/classes/WoPlugMiniUS.html +30 -75
- package/docs/classes/WoPresence.html +27 -60
- package/docs/classes/WoRelaySwitch1.html +31 -55
- package/docs/classes/WoRelaySwitch1PM.html +34 -57
- package/docs/classes/WoRemote.html +28 -52
- package/docs/classes/WoSensorTH.html +27 -46
- package/docs/classes/WoSensorTHPlus.html +28 -46
- package/docs/classes/WoSensorTHPro.html +28 -46
- package/docs/classes/WoSensorTHProCO2.html +28 -46
- package/docs/classes/WoSmartLock.html +29 -111
- package/docs/classes/WoSmartLockPro.html +31 -111
- package/docs/classes/WoStrip.html +38 -94
- package/docs/enums/LogLevel.html +4 -7
- package/docs/enums/SwitchBotBLEModel.html +11 -5
- package/docs/enums/SwitchBotBLEModelName.html +13 -6
- package/docs/functions/updateBaseURL.html +3 -3
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +40 -6
- package/docs/interfaces/APICommandRequest.html +5 -0
- package/docs/interfaces/APICommandResponse.html +5 -0
- package/docs/interfaces/APIDevice.html +18 -0
- package/docs/interfaces/APIDeviceStatus.html +36 -0
- package/docs/interfaces/APIErrorResponse.html +5 -0
- package/docs/interfaces/APIResponse.html +5 -0
- package/docs/interfaces/AirPurifierCommands.html +5 -0
- package/docs/interfaces/AirPurifierServiceData.html +14 -0
- package/docs/interfaces/AirPurifierStatus.html +17 -0
- package/docs/interfaces/BLEAdvertisement.html +6 -0
- package/docs/interfaces/BLEScanOptions.html +10 -0
- package/docs/interfaces/BLEServiceData.html +10 -0
- package/docs/interfaces/BlindTiltCommands.html +7 -0
- package/docs/interfaces/BlindTiltServiceData.html +14 -0
- package/docs/interfaces/BlindTiltStatus.html +15 -0
- package/docs/interfaces/BotCommands.html +4 -0
- package/docs/interfaces/BotServiceData.html +12 -0
- package/docs/interfaces/BotStatus.html +14 -0
- package/docs/interfaces/BulbCommands.html +6 -0
- package/docs/interfaces/BulbServiceData.html +19 -0
- package/docs/interfaces/BulbStatus.html +16 -0
- package/docs/interfaces/CeilingLightCommands.html +6 -0
- package/docs/interfaces/CeilingLightServiceData.html +19 -0
- package/docs/interfaces/CeilingLightStatus.html +16 -0
- package/docs/interfaces/CommandResult.html +12 -0
- package/docs/interfaces/ContactServiceData.html +13 -0
- package/docs/interfaces/ContactStatus.html +15 -0
- package/docs/interfaces/CurtainCommands.html +5 -0
- package/docs/interfaces/CurtainServiceData.html +14 -0
- package/docs/interfaces/CurtainStatus.html +17 -0
- package/docs/interfaces/DeviceInfo.html +26 -0
- package/docs/interfaces/DeviceListResponse.html +4 -0
- package/docs/interfaces/DeviceStatus.html +12 -0
- package/docs/interfaces/DiscoveryOptions.html +14 -0
- package/docs/interfaces/HubServiceData.html +14 -0
- package/docs/interfaces/HubStatus.html +15 -0
- package/docs/interfaces/HumidifierCommands.html +5 -0
- package/docs/interfaces/HumidifierServiceData.html +14 -0
- package/docs/interfaces/HumidifierStatus.html +18 -0
- package/docs/interfaces/KeypadStatus.html +13 -0
- package/docs/interfaces/LeakServiceData.html +11 -0
- package/docs/interfaces/LeakStatus.html +13 -0
- package/docs/interfaces/LockCommands.html +3 -0
- package/docs/interfaces/LockServiceData.html +15 -0
- package/docs/interfaces/LockStatus.html +15 -0
- package/docs/interfaces/MeterServiceData.html +13 -0
- package/docs/interfaces/MeterStatus.html +15 -0
- package/docs/interfaces/MotionServiceData.html +13 -0
- package/docs/interfaces/MotionStatus.html +14 -0
- package/docs/interfaces/PlugCommands.html +4 -0
- package/docs/interfaces/PlugServiceData.html +17 -0
- package/docs/interfaces/PlugStatus.html +16 -0
- package/docs/interfaces/PresenceServiceData.html +12 -0
- package/docs/interfaces/PresenceStatus.html +14 -0
- package/docs/interfaces/RelaySwitchCommands.html +4 -0
- package/docs/interfaces/RelaySwitchServiceData.html +14 -0
- package/docs/interfaces/RelaySwitchStatus.html +16 -0
- package/docs/interfaces/RemoteStatus.html +12 -0
- package/docs/interfaces/SceneListResponse.html +3 -0
- package/docs/interfaces/StripCommands.html +6 -0
- package/docs/interfaces/StripServiceData.html +19 -0
- package/docs/interfaces/StripStatus.html +16 -0
- package/docs/interfaces/SwitchBotConfig.html +18 -0
- package/docs/interfaces/WebhookConfig.html +4 -0
- package/docs/interfaces/WebhookDetails.html +7 -0
- package/docs/interfaces/WebhookQueryResponse.html +5 -0
- package/docs/interfaces/WebhookSetupResponse.html +5 -0
- package/docs/modules.html +1 -1
- package/docs/types/ConnectionType.html +2 -0
- package/docs/types/PhysicalDeviceType.html +2 -0
- package/docs/types/VirtualDeviceType.html +2 -0
- package/docs/variables/urls.html +1 -1
- package/package.json +11 -20
- package/.github/scripts/npm-version-script-esm-auto.js +0 -207
- package/dist/device.d.ts +0 -1577
- package/dist/device.d.ts.map +0 -1
- package/dist/device.js +0 -3493
- package/dist/device.js.map +0 -1
- package/dist/device.test.d.ts +0 -2
- package/dist/device.test.d.ts.map +0 -1
- package/dist/device.test.js +0 -255
- package/dist/device.test.js.map +0 -1
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/index.test.js +0 -14
- package/dist/index.test.js.map +0 -1
- package/dist/parameter-checker.d.ts +0 -91
- package/dist/parameter-checker.d.ts.map +0 -1
- package/dist/parameter-checker.js +0 -262
- package/dist/parameter-checker.js.map +0 -1
- package/dist/parameter-checker.test.d.ts +0 -2
- package/dist/parameter-checker.test.d.ts.map +0 -1
- package/dist/parameter-checker.test.js +0 -56
- package/dist/parameter-checker.test.js.map +0 -1
- package/dist/settings.test.d.ts +0 -2
- package/dist/settings.test.d.ts.map +0 -1
- package/dist/settings.test.js +0 -61
- package/dist/settings.test.js.map +0 -1
- package/dist/switchbot-ble.d.ts +0 -89
- package/dist/switchbot-ble.d.ts.map +0 -1
- package/dist/switchbot-ble.js +0 -319
- package/dist/switchbot-ble.js.map +0 -1
- package/dist/switchbot-ble.test.d.ts +0 -2
- package/dist/switchbot-ble.test.d.ts.map +0 -1
- package/dist/switchbot-ble.test.js +0 -32
- package/dist/switchbot-ble.test.js.map +0 -1
- package/dist/switchbot-openapi.d.ts +0 -139
- package/dist/switchbot-openapi.d.ts.map +0 -1
- package/dist/switchbot-openapi.js +0 -375
- package/dist/switchbot-openapi.js.map +0 -1
- package/dist/switchbot-openapi.test.d.ts +0 -2
- package/dist/switchbot-openapi.test.d.ts.map +0 -1
- package/dist/switchbot-openapi.test.js +0 -36
- package/dist/switchbot-openapi.test.js.map +0 -1
- package/dist/types/ble-guards.d.ts +0 -12
- package/dist/types/ble-guards.d.ts.map +0 -1
- package/dist/types/ble-guards.js +0 -10
- package/dist/types/ble-guards.js.map +0 -1
- package/dist/types/ble-guards.test.d.ts +0 -2
- package/dist/types/ble-guards.test.d.ts.map +0 -1
- package/dist/types/ble-guards.test.js +0 -62
- package/dist/types/ble-guards.test.js.map +0 -1
- package/dist/types/openapi.d.ts +0 -635
- package/dist/types/openapi.d.ts.map +0 -1
- package/dist/types/openapi.js +0 -3
- package/dist/types/openapi.js.map +0 -1
- package/docs/classes/Advertising.html +0 -21
- package/docs/classes/ErrorUtils.html +0 -25
- package/docs/classes/ParameterChecker.html +0 -69
- package/docs/classes/SwitchBotBLE.html +0 -39
- package/docs/classes/SwitchBotOpenAPI.html +0 -57
- package/docs/classes/SwitchbotDevice.html +0 -47
- package/docs/classes/ValidationUtils.html +0 -51
- package/docs/classes/WoSmartLockUltra.html +0 -113
- package/docs/enums/SwitchBotBLEModelFriendlyName.html +0 -39
- package/docs/enums/SwitchBotModel.html +0 -52
- package/docs/interfaces/AdvertisementData.html +0 -3
- package/docs/interfaces/Chars.html +0 -4
- package/docs/interfaces/ColorLightServiceDataBase.html +0 -17
- package/docs/interfaces/ErrorObject.html +0 -3
- package/docs/interfaces/LockBaseServiceData.html +0 -15
- package/docs/interfaces/NobleTypes.html +0 -3
- package/docs/interfaces/Params.html +0 -6
- package/docs/interfaces/PlugMiniServiceDataBase.html +0 -12
- package/docs/interfaces/Rule.html +0 -9
- package/docs/interfaces/ServiceData.html +0 -2
- package/docs/interfaces/SwitchBotBLEDevice.html +0 -27
- package/docs/interfaces/SwitchBotScanner.html +0 -6
- package/docs/interfaces/TemperatureServiceDataBase.html +0 -10
- package/docs/interfaces/WebhookDetail.html +0 -6
- package/docs/interfaces/ad.html +0 -5
- package/docs/interfaces/body.html +0 -3
- package/docs/interfaces/bodyChange.html +0 -4
- package/docs/interfaces/deleteWebhookResponse.html +0 -4
- package/docs/interfaces/device.html +0 -7
- package/docs/interfaces/deviceList.html +0 -2
- package/docs/interfaces/deviceStatus.html +0 -7
- package/docs/interfaces/deviceStatusRequest.html +0 -4
- package/docs/interfaces/deviceWebhook.html +0 -4
- package/docs/interfaces/deviceWebhookContext.html +0 -4
- package/docs/interfaces/devices.html +0 -4
- package/docs/interfaces/infraredRemoteList.html +0 -2
- package/docs/interfaces/irdevice.html +0 -5
- package/docs/interfaces/pushRequest.html +0 -5
- package/docs/interfaces/pushResponse.html +0 -5
- package/docs/interfaces/pushResponseBody.html +0 -3
- package/docs/interfaces/queryWebhookResponse.html +0 -4
- package/docs/interfaces/setupWebhookResponse.html +0 -4
- package/docs/interfaces/updateWebhookResponse.html +0 -4
- package/docs/interfaces/webhookRequest.html +0 -4
- package/docs/types/BLEDeviceServiceData.html +0 -1
- package/docs/types/IndoorCam.html +0 -1
- package/docs/types/MacAddress.html +0 -1
- package/docs/types/airPurifier.html +0 -1
- package/docs/types/airPurifierPM25WebhookContext.html +0 -1
- package/docs/types/airPurifierServiceData.html +0 -1
- package/docs/types/airPurifierStatus.html +0 -1
- package/docs/types/airPurifierTable.html +0 -1
- package/docs/types/airPurifierTablePM25WebhookContext.html +0 -1
- package/docs/types/airPurifierTableServiceData.html +0 -1
- package/docs/types/airPurifierTableStatus.html +0 -1
- package/docs/types/airPurifierTableVOC.html +0 -1
- package/docs/types/airPurifierTableVOCStatus.html +0 -1
- package/docs/types/airPurifierTableVOCWebhookContext.html +0 -1
- package/docs/types/airPurifierTableWebhookContext.html +0 -1
- package/docs/types/airPurifierVOC.html +0 -1
- package/docs/types/airPurifierVOCStatus.html +0 -1
- package/docs/types/airPurifierVOCWebhookContext.html +0 -1
- package/docs/types/airPurifierWebhookContext.html +0 -1
- package/docs/types/batteryCirculatorFan.html +0 -1
- package/docs/types/batteryCirculatorFanServiceData.html +0 -1
- package/docs/types/batteryCirculatorFanStatus.html +0 -1
- package/docs/types/batteryCirculatorFanWebhookContext.html +0 -1
- package/docs/types/blindTilt.html +0 -1
- package/docs/types/blindTiltServiceData.html +0 -1
- package/docs/types/blindTiltStatus.html +0 -1
- package/docs/types/blindTiltWebhookContext.html +0 -1
- package/docs/types/bot.html +0 -1
- package/docs/types/botServiceData.html +0 -1
- package/docs/types/botStatus.html +0 -1
- package/docs/types/botWebhookContext.html +0 -1
- package/docs/types/ceilingLight.html +0 -1
- package/docs/types/ceilingLightPro.html +0 -1
- package/docs/types/ceilingLightProServiceData.html +0 -1
- package/docs/types/ceilingLightProStatus.html +0 -1
- package/docs/types/ceilingLightProWebhookContext.html +0 -1
- package/docs/types/ceilingLightServiceData.html +0 -1
- package/docs/types/ceilingLightStatus.html +0 -1
- package/docs/types/ceilingLightWebhookContext.html +0 -1
- package/docs/types/circulatorFanStatus.html +0 -1
- package/docs/types/circulatorFanWebhookContext.html +0 -1
- package/docs/types/colorBulb.html +0 -1
- package/docs/types/colorBulbServiceData.html +0 -1
- package/docs/types/colorBulbStatus.html +0 -1
- package/docs/types/colorBulbWebhookContext.html +0 -1
- package/docs/types/commandType.html +0 -2
- package/docs/types/contactSensor.html +0 -1
- package/docs/types/contactSensorServiceData.html +0 -1
- package/docs/types/contactSensorStatus.html +0 -1
- package/docs/types/contactSensorWebhookContext.html +0 -1
- package/docs/types/curtain.html +0 -1
- package/docs/types/curtain3.html +0 -1
- package/docs/types/curtain3ServiceData.html +0 -1
- package/docs/types/curtain3WebhookContext.html +0 -1
- package/docs/types/curtainServiceData.html +0 -1
- package/docs/types/curtainStatus.html +0 -1
- package/docs/types/curtainWebhookContext.html +0 -1
- package/docs/types/floorCleaningRobotS10.html +0 -1
- package/docs/types/floorCleaningRobotS10Status.html +0 -1
- package/docs/types/floorCleaningRobotS10WebhookContext.html +0 -1
- package/docs/types/hub2.html +0 -1
- package/docs/types/hub2ServiceData.html +0 -1
- package/docs/types/hub2Status.html +0 -1
- package/docs/types/hub2WebhookContext.html +0 -1
- package/docs/types/hub3ServiceData.html +0 -1
- package/docs/types/humidifier.html +0 -1
- package/docs/types/humidifier2ServiceData.html +0 -1
- package/docs/types/humidifier2Status.html +0 -1
- package/docs/types/humidifier2WebhookContext.html +0 -1
- package/docs/types/humidifierServiceData.html +0 -1
- package/docs/types/humidifierStatus.html +0 -1
- package/docs/types/humidifierWebhookContext.html +0 -1
- package/docs/types/indoorCameraWebhookContext.html +0 -1
- package/docs/types/keypad.html +0 -1
- package/docs/types/keypadDetectorServiceData.html +0 -1
- package/docs/types/keypadTouch.html +0 -1
- package/docs/types/keypadTouchWebhookContext.html +0 -1
- package/docs/types/keypadWebhookContext.html +0 -1
- package/docs/types/lock.html +0 -1
- package/docs/types/lockPro.html +0 -1
- package/docs/types/lockProServiceData.html +0 -1
- package/docs/types/lockProStatus.html +0 -1
- package/docs/types/lockProWebhookContext.html +0 -1
- package/docs/types/lockServiceData.html +0 -1
- package/docs/types/lockStatus.html +0 -1
- package/docs/types/lockWebhookContext.html +0 -1
- package/docs/types/meter.html +0 -1
- package/docs/types/meterPlus.html +0 -1
- package/docs/types/meterPlusServiceData.html +0 -1
- package/docs/types/meterPlusStatus.html +0 -1
- package/docs/types/meterPlusWebhookContext.html +0 -1
- package/docs/types/meterPro.html +0 -1
- package/docs/types/meterProCO2ServiceData.html +0 -1
- package/docs/types/meterProCO2Status.html +0 -1
- package/docs/types/meterProCO2WebhookContext.html +0 -1
- package/docs/types/meterProServiceData.html +0 -1
- package/docs/types/meterProStatus.html +0 -1
- package/docs/types/meterProWebhookContext.html +0 -1
- package/docs/types/meterServiceData.html +0 -1
- package/docs/types/meterStatus.html +0 -1
- package/docs/types/meterWebhookContext.html +0 -1
- package/docs/types/motionSensor.html +0 -1
- package/docs/types/motionSensorServiceData.html +0 -1
- package/docs/types/motionSensorStatus.html +0 -1
- package/docs/types/motionSensorWebhookContext.html +0 -1
- package/docs/types/onadvertisement.html +0 -1
- package/docs/types/ondiscover.html +0 -1
- package/docs/types/outdoorMeter.html +0 -1
- package/docs/types/outdoorMeterServiceData.html +0 -1
- package/docs/types/outdoorMeterStatus.html +0 -1
- package/docs/types/outdoorMeterWebhookContext.html +0 -1
- package/docs/types/panTiltCamWebhookContext.html +0 -1
- package/docs/types/pantiltCam.html +0 -1
- package/docs/types/pantiltCam2k.html +0 -1
- package/docs/types/plug.html +0 -1
- package/docs/types/plugMini.html +0 -1
- package/docs/types/plugMiniJPServiceData.html +0 -1
- package/docs/types/plugMiniJPWebhookContext.html +0 -1
- package/docs/types/plugMiniStatus.html +0 -1
- package/docs/types/plugMiniUSServiceData.html +0 -1
- package/docs/types/plugMiniUSWebhookContext.html +0 -1
- package/docs/types/plugStatus.html +0 -1
- package/docs/types/plugWebhookContext.html +0 -1
- package/docs/types/presenceSensor.html +0 -1
- package/docs/types/presenceSensorServiceData.html +0 -1
- package/docs/types/presenceSensorStatus.html +0 -1
- package/docs/types/presenceSensorWebhookContext.html +0 -1
- package/docs/types/relaySwitch1Context.html +0 -1
- package/docs/types/relaySwitch1PMContext.html +0 -1
- package/docs/types/relaySwitch1PMServiceData.html +0 -1
- package/docs/types/relaySwitch1PMStatus.html +0 -1
- package/docs/types/relaySwitch1ServiceData.html +0 -1
- package/docs/types/relaySwitch1Status.html +0 -1
- package/docs/types/remote.html +0 -1
- package/docs/types/remoteServiceData.html +0 -1
- package/docs/types/robotVacuumCleanerS1.html +0 -1
- package/docs/types/robotVacuumCleanerS1Plus.html +0 -1
- package/docs/types/robotVacuumCleanerS1PlusStatus.html +0 -1
- package/docs/types/robotVacuumCleanerS1PlusWebhookContext.html +0 -1
- package/docs/types/robotVacuumCleanerS1Status.html +0 -1
- package/docs/types/robotVacuumCleanerS1WebhookContext.html +0 -1
- package/docs/types/robotVacuumCleanerServiceData.html +0 -1
- package/docs/types/stripLight.html +0 -1
- package/docs/types/stripLightServiceData.html +0 -1
- package/docs/types/stripLightStatus.html +0 -1
- package/docs/types/stripLightWebhookContext.html +0 -1
- package/docs/types/waterLeakDetector.html +0 -1
- package/docs/types/waterLeakDetectorServiceData.html +0 -1
- package/docs/types/waterLeakDetectorStatus.html +0 -1
- package/docs/types/waterLeakDetectorWebhookContext.html +0 -1
- package/docs/variables/parameterChecker.html +0 -1
- package/eslint.config.js +0 -48
- package/typedoc.json +0 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wo-sensor-th.js","sourceRoot":"","sources":["../../src/devices/wo-sensor-th.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,eAAe;IAC7C;;OAEG;IACH,KAAK,CAAC,SAAS;QACb,IAAI,CAAC;YACH,6BAA6B;YAC7B,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;gBAC3C,OAAO;oBACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;oBACtB,cAAc,EAAE,KAAK;oBACrB,WAAW,EAAE,SAAS,CAAC,WAAW,IAAI,CAAC;oBACvC,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI,CAAC;oBACjC,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1B,SAAS,EAAE,IAAI,IAAI,EAAE;iBACtB,CAAA;YACH,CAAC;YAED,kBAAkB;YAClB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;gBACzC,OAAO;oBACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;oBACtB,cAAc,EAAE,KAAK;oBACrB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,CAAC;oBACrC,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,CAAC;oBAC/B,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;oBAChD,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,SAAS,EAAE,IAAI,IAAI,EAAE;iBACtB,CAAA;YACH,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAA;YAChD,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wo-strip.d.ts","sourceRoot":"","sources":["../../src/devices/wo-strip.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,MAAM;CAAG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* Copyright(C) 2024-2026, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* devices/wo-strip.ts: SwitchBot v4.0.0 - Strip Light
|
|
4
|
+
*/
|
|
5
|
+
import { WoBulb } from './wo-bulb.js';
|
|
6
|
+
/**
|
|
7
|
+
* Strip Light Device
|
|
8
|
+
* Uses same logic as Color Bulb
|
|
9
|
+
*/
|
|
10
|
+
export class WoStrip extends WoBulb {
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=wo-strip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wo-strip.js","sourceRoot":"","sources":["../../src/devices/wo-strip.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,MAAM;CAAG"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base error class for SwitchBot errors
|
|
3
|
+
*/
|
|
4
|
+
export declare class SwitchBotError extends Error {
|
|
5
|
+
readonly code?: string | undefined;
|
|
6
|
+
constructor(message: string, code?: string | undefined);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Error thrown when BLE is not available or supported
|
|
10
|
+
*/
|
|
11
|
+
export declare class BLENotAvailableError extends SwitchBotError {
|
|
12
|
+
constructor(message?: string);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Error thrown when API is not available or credentials are missing
|
|
16
|
+
*/
|
|
17
|
+
export declare class APINotAvailableError extends SwitchBotError {
|
|
18
|
+
constructor(message?: string);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error thrown when a device is not found
|
|
22
|
+
*/
|
|
23
|
+
export declare class DeviceNotFoundError extends SwitchBotError {
|
|
24
|
+
constructor(deviceId: string);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Error thrown when a command fails
|
|
28
|
+
*/
|
|
29
|
+
export declare class CommandFailedError extends SwitchBotError {
|
|
30
|
+
readonly connectionType?: "ble" | "api" | undefined;
|
|
31
|
+
readonly originalError?: Error | undefined;
|
|
32
|
+
constructor(message: string, connectionType?: "ble" | "api" | undefined, originalError?: Error | undefined);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Error thrown when a connection timeout occurs
|
|
36
|
+
*/
|
|
37
|
+
export declare class ConnectionTimeoutError extends SwitchBotError {
|
|
38
|
+
readonly timeoutMs?: number | undefined;
|
|
39
|
+
constructor(message?: string, timeoutMs?: number | undefined);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Error thrown when device discovery fails
|
|
43
|
+
*/
|
|
44
|
+
export declare class DiscoveryError extends SwitchBotError {
|
|
45
|
+
readonly originalError?: Error | undefined;
|
|
46
|
+
constructor(message: string, originalError?: Error | undefined);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Error thrown when API request fails
|
|
50
|
+
*/
|
|
51
|
+
export declare class APIError extends SwitchBotError {
|
|
52
|
+
readonly statusCode?: number | undefined;
|
|
53
|
+
readonly statusMessage?: string | undefined;
|
|
54
|
+
constructor(message: string, statusCode?: number | undefined, statusMessage?: string | undefined);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Error thrown when invalid parameters are provided
|
|
58
|
+
*/
|
|
59
|
+
export declare class ValidationError extends SwitchBotError {
|
|
60
|
+
readonly parameter?: string | undefined;
|
|
61
|
+
constructor(message: string, parameter?: string | undefined);
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;aACM,IAAI,CAAC,EAAE,MAAM;gBAA9C,OAAO,EAAE,MAAM,EAAkB,IAAI,CAAC,EAAE,MAAM,YAAA;CAK3D;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;gBAC1C,OAAO,SAAiD;CAIrE;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;gBAC1C,OAAO,SAAkD;CAItE;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;gBACzC,QAAQ,EAAE,MAAM;CAI7B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;aAGlC,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK;aAC9B,aAAa,CAAC,EAAE,KAAK;gBAFrC,OAAO,EAAE,MAAM,EACC,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,YAAA,EAC9B,aAAa,CAAC,EAAE,KAAK,YAAA;CAKxC;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;aACI,SAAS,CAAC,EAAE,MAAM;gBAAlE,OAAO,SAAuB,EAAkB,SAAS,CAAC,EAAE,MAAM,YAAA;CAI/E;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,cAAc;aACH,aAAa,CAAC,EAAE,KAAK;gBAAtD,OAAO,EAAE,MAAM,EAAkB,aAAa,CAAC,EAAE,KAAK,YAAA;CAInE;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,cAAc;aAGxB,UAAU,CAAC,EAAE,MAAM;aACnB,aAAa,CAAC,EAAE,MAAM;gBAFtC,OAAO,EAAE,MAAM,EACC,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,aAAa,CAAC,EAAE,MAAM,YAAA;CAKzC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,cAAc;aACJ,SAAS,CAAC,EAAE,MAAM;gBAAnD,OAAO,EAAE,MAAM,EAAkB,SAAS,CAAC,EAAE,MAAM,YAAA;CAIhE"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* Copyright(C) 2024-2026, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* errors.ts: SwitchBot v4.0.0 - Custom Error Classes
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Base error class for SwitchBot errors
|
|
7
|
+
*/
|
|
8
|
+
export class SwitchBotError extends Error {
|
|
9
|
+
code;
|
|
10
|
+
constructor(message, code) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.code = code;
|
|
13
|
+
this.name = 'SwitchBotError';
|
|
14
|
+
Error.captureStackTrace(this, this.constructor);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Error thrown when BLE is not available or supported
|
|
19
|
+
*/
|
|
20
|
+
export class BLENotAvailableError extends SwitchBotError {
|
|
21
|
+
constructor(message = 'BLE not available on this platform or device') {
|
|
22
|
+
super(message, 'BLE_NOT_AVAILABLE');
|
|
23
|
+
this.name = 'BLENotAvailableError';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Error thrown when API is not available or credentials are missing
|
|
28
|
+
*/
|
|
29
|
+
export class APINotAvailableError extends SwitchBotError {
|
|
30
|
+
constructor(message = 'API not available or credentials not provided') {
|
|
31
|
+
super(message, 'API_NOT_AVAILABLE');
|
|
32
|
+
this.name = 'APINotAvailableError';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Error thrown when a device is not found
|
|
37
|
+
*/
|
|
38
|
+
export class DeviceNotFoundError extends SwitchBotError {
|
|
39
|
+
constructor(deviceId) {
|
|
40
|
+
super(`Device not found: ${deviceId}`, 'DEVICE_NOT_FOUND');
|
|
41
|
+
this.name = 'DeviceNotFoundError';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Error thrown when a command fails
|
|
46
|
+
*/
|
|
47
|
+
export class CommandFailedError extends SwitchBotError {
|
|
48
|
+
connectionType;
|
|
49
|
+
originalError;
|
|
50
|
+
constructor(message, connectionType, originalError) {
|
|
51
|
+
super(message, 'COMMAND_FAILED');
|
|
52
|
+
this.connectionType = connectionType;
|
|
53
|
+
this.originalError = originalError;
|
|
54
|
+
this.name = 'CommandFailedError';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Error thrown when a connection timeout occurs
|
|
59
|
+
*/
|
|
60
|
+
export class ConnectionTimeoutError extends SwitchBotError {
|
|
61
|
+
timeoutMs;
|
|
62
|
+
constructor(message = 'Connection timeout', timeoutMs) {
|
|
63
|
+
super(message, 'CONNECTION_TIMEOUT');
|
|
64
|
+
this.timeoutMs = timeoutMs;
|
|
65
|
+
this.name = 'ConnectionTimeoutError';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Error thrown when device discovery fails
|
|
70
|
+
*/
|
|
71
|
+
export class DiscoveryError extends SwitchBotError {
|
|
72
|
+
originalError;
|
|
73
|
+
constructor(message, originalError) {
|
|
74
|
+
super(message, 'DISCOVERY_ERROR');
|
|
75
|
+
this.originalError = originalError;
|
|
76
|
+
this.name = 'DiscoveryError';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Error thrown when API request fails
|
|
81
|
+
*/
|
|
82
|
+
export class APIError extends SwitchBotError {
|
|
83
|
+
statusCode;
|
|
84
|
+
statusMessage;
|
|
85
|
+
constructor(message, statusCode, statusMessage) {
|
|
86
|
+
super(message, 'API_ERROR');
|
|
87
|
+
this.statusCode = statusCode;
|
|
88
|
+
this.statusMessage = statusMessage;
|
|
89
|
+
this.name = 'APIError';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Error thrown when invalid parameters are provided
|
|
94
|
+
*/
|
|
95
|
+
export class ValidationError extends SwitchBotError {
|
|
96
|
+
parameter;
|
|
97
|
+
constructor(message, parameter) {
|
|
98
|
+
super(message, 'VALIDATION_ERROR');
|
|
99
|
+
this.parameter = parameter;
|
|
100
|
+
this.name = 'ValidationError';
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACM;IAA7C,YAAY,OAAe,EAAkB,IAAa;QACxD,KAAK,CAAC,OAAO,CAAC,CAAA;QAD6B,SAAI,GAAJ,IAAI,CAAS;QAExD,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAA;QAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;IACjD,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IACtD,YAAY,OAAO,GAAG,8CAA8C;QAClE,KAAK,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAA;IACpC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IACtD,YAAY,OAAO,GAAG,+CAA+C;QACnE,KAAK,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAA;IACpC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IACrD,YAAY,QAAgB;QAC1B,KAAK,CAAC,qBAAqB,QAAQ,EAAE,EAAE,kBAAkB,CAAC,CAAA;QAC1D,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAA;IACnC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IAGlC;IACA;IAHlB,YACE,OAAe,EACC,cAA8B,EAC9B,aAAqB;QAErC,KAAK,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAA;QAHhB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAQ;QAGrC,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAA;IAClC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IACI;IAA5D,YAAY,OAAO,GAAG,oBAAoB,EAAkB,SAAkB;QAC5E,KAAK,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAA;QADsB,cAAS,GAAT,SAAS,CAAS;QAE5E,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAA;IACtC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,cAAc;IACH;IAA7C,YAAY,OAAe,EAAkB,aAAqB;QAChE,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA;QADU,kBAAa,GAAb,aAAa,CAAQ;QAEhE,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAA;IAC9B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,cAAc;IAGxB;IACA;IAHlB,YACE,OAAe,EACC,UAAmB,EACnB,aAAsB;QAEtC,KAAK,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;QAHX,eAAU,GAAV,UAAU,CAAS;QACnB,kBAAa,GAAb,aAAa,CAAS;QAGtC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAA;IACxB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IACJ;IAA7C,YAAY,OAAe,EAAkB,SAAkB;QAC7D,KAAK,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAA;QADS,cAAS,GAAT,SAAS,CAAS;QAE7D,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;IAC/B,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
1
|
+
export { OpenAPIClient } from './api.js';
|
|
2
|
+
export { BLEConnection, BLEScanner } from './ble.js';
|
|
3
|
+
export { DeviceManager, SwitchBotDevice } from './devices/base.js';
|
|
4
|
+
export { WoAirPurifier, WoAirPurifierTable, WoBlindTilt, WoBulb, WoCeilingLight, WoContact, WoCurtain, WoHand, WoHub2, WoHub3, WoHumi, WoHumi2, WoIOSensorTH, WoKeypad, WoLeak, WoPlugMiniJP, WoPlugMiniUS, WoPresence, WoRelaySwitch1, WoRelaySwitch1PM, WoRemote, WoSensorTH, WoSensorTHPlus, WoSensorTHPro, WoSensorTHProCO2, WoSmartLock, WoSmartLockPro, WoStrip, } from './devices/index.js';
|
|
5
|
+
export { APIError, APINotAvailableError, BLENotAvailableError, CommandFailedError, ConnectionTimeoutError, DeviceNotFoundError, DiscoveryError, SwitchBotError, ValidationError, } from './errors.js';
|
|
3
6
|
export { updateBaseURL, urls } from './settings.js';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
7
|
+
export { SwitchBot } from './switchbot.js';
|
|
8
|
+
export type { APICommandRequest, APICommandResponse, APIDevice, APIDeviceStatus, APIErrorResponse, APIResponse, DeviceListResponse, PhysicalDeviceType, SceneListResponse, VirtualDeviceType, WebhookConfig, WebhookDetails, WebhookQueryResponse, WebhookSetupResponse, } from './types/api.js';
|
|
9
|
+
export type { AirPurifierServiceData, BLEAdvertisement, BLEScanOptions, BLEServiceData, BlindTiltServiceData, BotServiceData, BulbServiceData, CeilingLightServiceData, ContactServiceData, CurtainServiceData, HubServiceData, HumidifierServiceData, LeakServiceData, LockServiceData, MeterServiceData, MotionServiceData, PlugServiceData, PresenceServiceData, RelaySwitchServiceData, StripServiceData, SwitchBotBLEModel, SwitchBotBLEModelName, } from './types/ble.js';
|
|
10
|
+
export type { AirPurifierCommands, AirPurifierStatus, BlindTiltCommands, BlindTiltStatus, BotCommands, BotStatus, BulbCommands, BulbStatus, CeilingLightCommands, CeilingLightStatus, ContactStatus, CurtainCommands, CurtainStatus, HubStatus, HumidifierCommands, HumidifierStatus, KeypadStatus, LeakStatus, LockCommands, LockStatus, MeterStatus, MotionStatus, PlugCommands, PlugStatus, PresenceStatus, RelaySwitchCommands, RelaySwitchStatus, RemoteStatus, StripCommands, StripStatus, } from './types/device.js';
|
|
11
|
+
export type { CommandResult, ConnectionType, DeviceInfo, DeviceStatus, DiscoveryOptions, LogLevel, SwitchBotConfig, } from './types/index.js';
|
|
8
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,OAAO,GACR,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAG1C,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,SAAS,EACT,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,aAAa,EACb,cAAc,EACd,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,eAAe,GAChB,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
/* Copyright(C) 2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
1
|
+
/* Copyright(C) 2024-2026, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
2
|
*
|
|
3
|
-
* index.ts:
|
|
3
|
+
* index.ts: SwitchBot v4.0.0 - Hybrid BLE/OpenAPI Main Exports
|
|
4
4
|
*/
|
|
5
|
-
//
|
|
6
|
-
export
|
|
7
|
-
export {
|
|
5
|
+
// Main classes (alphabetically by module path)
|
|
6
|
+
export { OpenAPIClient } from './api.js';
|
|
7
|
+
export { BLEConnection, BLEScanner } from './ble.js';
|
|
8
|
+
export { DeviceManager, SwitchBotDevice } from './devices/base.js';
|
|
9
|
+
export { WoAirPurifier, WoAirPurifierTable, WoBlindTilt, WoBulb, WoCeilingLight, WoContact, WoCurtain, WoHand, WoHub2, WoHub3, WoHumi, WoHumi2, WoIOSensorTH, WoKeypad, WoLeak, WoPlugMiniJP, WoPlugMiniUS, WoPresence, WoRelaySwitch1, WoRelaySwitch1PM, WoRemote, WoSensorTH, WoSensorTHPlus, WoSensorTHPro, WoSensorTHProCO2, WoSmartLock, WoSmartLockPro, WoStrip, } from './devices/index.js';
|
|
10
|
+
export { APIError, APINotAvailableError, BLENotAvailableError, CommandFailedError, ConnectionTimeoutError, DeviceNotFoundError, DiscoveryError, SwitchBotError, ValidationError, } from './errors.js';
|
|
8
11
|
export { updateBaseURL, urls } from './settings.js';
|
|
9
|
-
export
|
|
10
|
-
export * from './switchbot-openapi.js';
|
|
11
|
-
// Type definitions
|
|
12
|
-
export * from './types/ble.js';
|
|
13
|
-
export * from './types/openapi.js';
|
|
12
|
+
export { SwitchBot } from './switchbot.js';
|
|
14
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+CAA+C;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,OAAO,GACR,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/settings.d.ts
CHANGED
|
@@ -1,53 +1,132 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {string} newBaseURL - The new base URL to use.
|
|
2
|
+
* OpenAPI Configuration
|
|
4
3
|
*/
|
|
5
|
-
export declare
|
|
4
|
+
export declare const DEFAULT_BASE_URL = "https://api.switch-bot.com";
|
|
5
|
+
export declare const API_VERSION = "v1.1";
|
|
6
6
|
export declare const urls: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly updateWebhook: string;
|
|
12
|
-
readonly deleteWebhook: string;
|
|
7
|
+
base: string;
|
|
8
|
+
devices: string;
|
|
9
|
+
scenes: string;
|
|
10
|
+
webhook: string;
|
|
13
11
|
};
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export declare
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export declare
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
13
|
+
* Update the base URL for all API endpoints
|
|
14
|
+
* @param newBaseURL - The new base URL to use
|
|
15
|
+
*/
|
|
16
|
+
export declare function updateBaseURL(newBaseURL: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* BLE Configuration
|
|
19
|
+
*/
|
|
20
|
+
export declare const BLE_SERVICE_UUID = "cba20d00224d11e69fb80002a5d5c51b";
|
|
21
|
+
export declare const BLE_WRITE_CHARACTERISTIC_UUID = "cba20002224d11e69fb80002a5d5c51b";
|
|
22
|
+
export declare const BLE_NOTIFY_CHARACTERISTIC_UUID = "cba20003224d11e69fb80002a5d5c51b";
|
|
23
|
+
export declare const SERV_UUID_PRIMARY = "cba20d00-224d-11e6-9fb8-0002a5d5c51b";
|
|
24
|
+
export declare const CHAR_UUID_WRITE = "cba20002-224d-11e6-9fb8-0002a5d5c51b";
|
|
25
|
+
export declare const CHAR_UUID_NOTIFY = "cba20003-224d-11e6-9fb8-0002a5d5c51b";
|
|
26
|
+
export declare const CHAR_UUID_DEVICE = "cba20d00-224d-11e6-9fb8-0002a5d5c51b";
|
|
27
|
+
/**
|
|
28
|
+
* BLE Timeouts (in milliseconds)
|
|
29
|
+
*/
|
|
30
|
+
export declare const BLE_SCAN_TIMEOUT = 10000;
|
|
31
|
+
export declare const BLE_CONNECT_TIMEOUT = 10000;
|
|
32
|
+
export declare const BLE_COMMAND_TIMEOUT = 5000;
|
|
33
|
+
export declare const READ_TIMEOUT_MSEC = 10000;
|
|
34
|
+
export declare const WRITE_TIMEOUT_MSEC = 10000;
|
|
35
|
+
/**
|
|
36
|
+
* Device Command Constants
|
|
37
|
+
*/
|
|
38
|
+
export declare const DEVICE_COMMANDS: {
|
|
39
|
+
readonly BOT: {
|
|
40
|
+
readonly PRESS: readonly [87, 1, 0];
|
|
41
|
+
readonly TURN_ON: readonly [87, 1, 1];
|
|
42
|
+
readonly TURN_OFF: readonly [87, 1, 2];
|
|
43
|
+
readonly DOWN: readonly [87, 1, 1];
|
|
44
|
+
readonly UP: readonly [87, 1, 2];
|
|
45
|
+
};
|
|
46
|
+
readonly CURTAIN: {
|
|
47
|
+
readonly OPEN: readonly [87, 15, 69, 1, 5, 255, 0];
|
|
48
|
+
readonly CLOSE: readonly [87, 15, 69, 1, 5, 255, 100];
|
|
49
|
+
readonly PAUSE: readonly [87, 15, 69, 1, 0, 255];
|
|
50
|
+
readonly POSITION: readonly [87, 15, 69, 1, 5, 255];
|
|
51
|
+
};
|
|
52
|
+
readonly BLIND_TILT: {
|
|
53
|
+
readonly OPEN: readonly [87, 15, 69, 1, 5, 255, 50];
|
|
54
|
+
readonly CLOSE_UP: readonly [87, 15, 69, 1, 5, 255, 100];
|
|
55
|
+
readonly CLOSE_DOWN: readonly [87, 15, 69, 1, 5, 255, 0];
|
|
56
|
+
readonly PAUSE: readonly [87, 15, 69, 1, 0, 255];
|
|
57
|
+
};
|
|
58
|
+
readonly BULB: {
|
|
59
|
+
readonly BASE: readonly [87, 15, 71, 1];
|
|
60
|
+
readonly READ_STATE: readonly [87, 15, 72, 1];
|
|
61
|
+
readonly TURN_ON: readonly [1, 1];
|
|
62
|
+
readonly TURN_OFF: readonly [1, 2];
|
|
63
|
+
readonly SET_BRIGHTNESS: readonly [2, 20];
|
|
64
|
+
readonly SET_COLOR_TEMP: readonly [2, 23];
|
|
65
|
+
readonly SET_RGB: readonly [2, 18];
|
|
66
|
+
};
|
|
67
|
+
readonly HUMIDIFIER: {
|
|
68
|
+
readonly HEADER: "5701";
|
|
69
|
+
readonly TURN_ON: "570101";
|
|
70
|
+
readonly TURN_OFF: "570102";
|
|
71
|
+
readonly INCREASE: "570103";
|
|
72
|
+
readonly DECREASE: "570104";
|
|
73
|
+
readonly SET_AUTO_MODE: "570105";
|
|
74
|
+
readonly SET_MANUAL_MODE: "570106";
|
|
75
|
+
};
|
|
76
|
+
readonly AIR_PURIFIER: {
|
|
77
|
+
readonly TURN_ON: readonly [87, 1, 1];
|
|
78
|
+
readonly TURN_OFF: readonly [87, 1, 2];
|
|
79
|
+
readonly SET_MODE: readonly [87, 2];
|
|
80
|
+
readonly SET_SPEED: readonly [87, 3];
|
|
81
|
+
};
|
|
82
|
+
readonly PLUG: {
|
|
83
|
+
readonly TURN_ON: readonly [87, 15, 80, 1, 1];
|
|
84
|
+
readonly TURN_OFF: readonly [87, 15, 80, 1, 2];
|
|
85
|
+
readonly TOGGLE: readonly [87, 15, 80, 1, 0];
|
|
86
|
+
};
|
|
87
|
+
readonly COMMON: {
|
|
88
|
+
readonly POWER_ON: readonly [87, 1, 1];
|
|
89
|
+
readonly POWER_OFF: readonly [87, 1, 2];
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Lock Command Constants (WoSmartLock)
|
|
94
|
+
*/
|
|
95
|
+
export declare const WoSmartLockCommands: {
|
|
96
|
+
readonly LOCK: readonly [87, 15, 78, 1, 0];
|
|
97
|
+
readonly UNLOCK: readonly [87, 15, 78, 1, 1];
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Lock Pro Command Constants (WoSmartLockPro)
|
|
101
|
+
*/
|
|
102
|
+
export declare const WoSmartLockProCommands: {
|
|
103
|
+
readonly LOCK: readonly [87, 15, 79, 1, 0];
|
|
104
|
+
readonly UNLOCK: readonly [87, 15, 79, 1, 1];
|
|
105
|
+
readonly UNLATCH: readonly [87, 15, 79, 1, 2];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Device Model to Type Mapping
|
|
109
|
+
*/
|
|
110
|
+
export declare const DEVICE_MODEL_MAP: Record<string, string>;
|
|
111
|
+
/**
|
|
112
|
+
* Device Type to Class Name Mapping
|
|
113
|
+
*/
|
|
114
|
+
export declare const DEVICE_CLASS_MAP: Record<string, string>;
|
|
115
|
+
/**
|
|
116
|
+
* Default configuration values
|
|
117
|
+
*/
|
|
118
|
+
export declare const DEFAULTS: {
|
|
119
|
+
readonly logLevel: 2;
|
|
120
|
+
readonly scanTimeout: 10000;
|
|
121
|
+
readonly connectTimeout: 10000;
|
|
122
|
+
readonly commandTimeout: 5000;
|
|
123
|
+
readonly enableBLE: true;
|
|
124
|
+
readonly enableFallback: true;
|
|
125
|
+
readonly baseURL: "https://api.switch-bot.com";
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Platform detection
|
|
129
|
+
*/
|
|
130
|
+
export declare const IS_LINUX: boolean;
|
|
131
|
+
export declare const BLE_SUPPORTED: boolean;
|
|
53
132
|
//# sourceMappingURL=settings.d.ts.map
|
package/dist/settings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,gBAAgB,+BAA+B,CAAA;AAC5D,eAAO,MAAM,WAAW,SAAS,CAAA;AAEjC,eAAO,MAAM,IAAI,EAAE;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAMhB,CAAA;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAKtD;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,qCAAqC,CAAA;AAClE,eAAO,MAAM,6BAA6B,qCAAqC,CAAA;AAC/E,eAAO,MAAM,8BAA8B,qCAAqC,CAAA;AAGhF,eAAO,MAAM,iBAAiB,yCAAyC,CAAA;AACvE,eAAO,MAAM,eAAe,yCAAyC,CAAA;AACrE,eAAO,MAAM,gBAAgB,yCAAyC,CAAA;AACtE,eAAO,MAAM,gBAAgB,yCAAyC,CAAA;AAEtE;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AACrC,eAAO,MAAM,mBAAmB,QAAQ,CAAA;AACxC,eAAO,MAAM,mBAAmB,OAAO,CAAA;AACvC,eAAO,MAAM,iBAAiB,QAAQ,CAAA;AACtC,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAEvC;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoElB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;CAGtB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqC1C,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA0C1C,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;CAQX,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,QAAQ,SAA+B,CAAA;AACpD,eAAO,MAAM,aAAa,SAAW,CAAA"}
|