node-switchbot 4.0.0-beta.1 โ†’ 4.0.0-beta.11

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.
Files changed (379) hide show
  1. package/.github/copilot-instructions.md +19 -5
  2. package/BLE.md +117 -4
  3. package/CHANGELOG.md +45 -0
  4. package/README.md +7 -1
  5. package/dist/api.d.ts +3 -3
  6. package/dist/api.d.ts.map +1 -1
  7. package/dist/api.js +9 -6
  8. package/dist/api.js.map +1 -1
  9. package/dist/ble.d.ts +38 -4
  10. package/dist/ble.d.ts.map +1 -1
  11. package/dist/ble.js +409 -53
  12. package/dist/ble.js.map +1 -1
  13. package/dist/devices/base.d.ts +83 -5
  14. package/dist/devices/base.d.ts.map +1 -1
  15. package/dist/devices/base.js +371 -34
  16. package/dist/devices/base.js.map +1 -1
  17. package/dist/devices/device-override-state-during-connection.d.ts +27 -0
  18. package/dist/devices/device-override-state-during-connection.d.ts.map +1 -0
  19. package/dist/devices/device-override-state-during-connection.js +45 -0
  20. package/dist/devices/device-override-state-during-connection.js.map +1 -0
  21. package/dist/devices/index.d.ts +29 -0
  22. package/dist/devices/index.d.ts.map +1 -1
  23. package/dist/devices/index.js +29 -0
  24. package/dist/devices/index.js.map +1 -1
  25. package/dist/devices/sequence-device.d.ts +36 -0
  26. package/dist/devices/sequence-device.d.ts.map +1 -0
  27. package/dist/devices/sequence-device.js +75 -0
  28. package/dist/devices/sequence-device.js.map +1 -0
  29. package/dist/devices/wo-air-purifier.d.ts +2 -2
  30. package/dist/devices/wo-air-purifier.d.ts.map +1 -1
  31. package/dist/devices/wo-air-purifier.js +2 -2
  32. package/dist/devices/wo-air-purifier.js.map +1 -1
  33. package/dist/devices/wo-art-frame.d.ts +8 -0
  34. package/dist/devices/wo-art-frame.d.ts.map +1 -0
  35. package/dist/devices/wo-art-frame.js +12 -0
  36. package/dist/devices/wo-art-frame.js.map +1 -0
  37. package/dist/devices/wo-bulb.d.ts +10 -0
  38. package/dist/devices/wo-bulb.d.ts.map +1 -1
  39. package/dist/devices/wo-bulb.js +69 -0
  40. package/dist/devices/wo-bulb.js.map +1 -1
  41. package/dist/devices/wo-circulator-fan.d.ts +8 -0
  42. package/dist/devices/wo-circulator-fan.d.ts.map +1 -0
  43. package/dist/devices/wo-circulator-fan.js +12 -0
  44. package/dist/devices/wo-circulator-fan.js.map +1 -0
  45. package/dist/devices/wo-climate-panel.d.ts +8 -0
  46. package/dist/devices/wo-climate-panel.d.ts.map +1 -0
  47. package/dist/devices/wo-climate-panel.js +12 -0
  48. package/dist/devices/wo-climate-panel.js.map +1 -0
  49. package/dist/devices/wo-curtain.d.ts +3 -3
  50. package/dist/devices/wo-curtain.d.ts.map +1 -1
  51. package/dist/devices/wo-curtain.js +12 -9
  52. package/dist/devices/wo-curtain.js.map +1 -1
  53. package/dist/devices/wo-floor-lamp.d.ts +8 -0
  54. package/dist/devices/wo-floor-lamp.d.ts.map +1 -0
  55. package/dist/devices/wo-floor-lamp.js +12 -0
  56. package/dist/devices/wo-floor-lamp.js.map +1 -0
  57. package/dist/devices/wo-garage-door-opener.d.ts +8 -0
  58. package/dist/devices/wo-garage-door-opener.d.ts.map +1 -0
  59. package/dist/devices/wo-garage-door-opener.js +12 -0
  60. package/dist/devices/wo-garage-door-opener.js.map +1 -0
  61. package/dist/devices/wo-hand.d.ts +53 -2
  62. package/dist/devices/wo-hand.d.ts.map +1 -1
  63. package/dist/devices/wo-hand.js +121 -3
  64. package/dist/devices/wo-hand.js.map +1 -1
  65. package/dist/devices/wo-hubmini-matter.d.ts +8 -0
  66. package/dist/devices/wo-hubmini-matter.d.ts.map +1 -0
  67. package/dist/devices/wo-hubmini-matter.js +12 -0
  68. package/dist/devices/wo-hubmini-matter.js.map +1 -0
  69. package/dist/devices/wo-humi2.d.ts +12 -0
  70. package/dist/devices/wo-humi2.d.ts.map +1 -1
  71. package/dist/devices/wo-humi2.js +18 -0
  72. package/dist/devices/wo-humi2.js.map +1 -1
  73. package/dist/devices/wo-keypad-vision-pro.d.ts +18 -0
  74. package/dist/devices/wo-keypad-vision-pro.d.ts.map +1 -0
  75. package/dist/devices/wo-keypad-vision-pro.js +15 -0
  76. package/dist/devices/wo-keypad-vision-pro.js.map +1 -0
  77. package/dist/devices/wo-keypad-vision.d.ts +8 -0
  78. package/dist/devices/wo-keypad-vision.d.ts.map +1 -0
  79. package/dist/devices/wo-keypad-vision.js +12 -0
  80. package/dist/devices/wo-keypad-vision.js.map +1 -0
  81. package/dist/devices/wo-lock-lite.d.ts +7 -0
  82. package/dist/devices/wo-lock-lite.d.ts.map +1 -0
  83. package/dist/devices/wo-lock-lite.js +11 -0
  84. package/dist/devices/wo-lock-lite.js.map +1 -0
  85. package/dist/devices/wo-lock-pro-wifi.d.ts +7 -0
  86. package/dist/devices/wo-lock-pro-wifi.d.ts.map +1 -0
  87. package/dist/devices/wo-lock-pro-wifi.js +11 -0
  88. package/dist/devices/wo-lock-pro-wifi.js.map +1 -0
  89. package/dist/devices/wo-lock-pro.d.ts +11 -2
  90. package/dist/devices/wo-lock-pro.d.ts.map +1 -1
  91. package/dist/devices/wo-lock-pro.js +65 -3
  92. package/dist/devices/wo-lock-pro.js.map +1 -1
  93. package/dist/devices/wo-lock-vision-pro.d.ts +7 -0
  94. package/dist/devices/wo-lock-vision-pro.d.ts.map +1 -0
  95. package/dist/devices/wo-lock-vision-pro.js +11 -0
  96. package/dist/devices/wo-lock-vision-pro.js.map +1 -0
  97. package/dist/devices/wo-lock-vision.d.ts +7 -0
  98. package/dist/devices/wo-lock-vision.d.ts.map +1 -0
  99. package/dist/devices/wo-lock-vision.js +11 -0
  100. package/dist/devices/wo-lock-vision.js.map +1 -0
  101. package/dist/devices/wo-lock.d.ts +7 -2
  102. package/dist/devices/wo-lock.d.ts.map +1 -1
  103. package/dist/devices/wo-lock.js +58 -3
  104. package/dist/devices/wo-lock.js.map +1 -1
  105. package/dist/devices/wo-plug-mini-us.d.ts +2 -2
  106. package/dist/devices/wo-plug-mini-us.d.ts.map +1 -1
  107. package/dist/devices/wo-plug-mini-us.js +2 -2
  108. package/dist/devices/wo-plug-mini-us.js.map +1 -1
  109. package/dist/devices/wo-relay-switch-1.d.ts +4 -2
  110. package/dist/devices/wo-relay-switch-1.d.ts.map +1 -1
  111. package/dist/devices/wo-relay-switch-1.js +36 -4
  112. package/dist/devices/wo-relay-switch-1.js.map +1 -1
  113. package/dist/devices/wo-relay-switch-2pm.d.ts +21 -0
  114. package/dist/devices/wo-relay-switch-2pm.d.ts.map +1 -0
  115. package/dist/devices/wo-relay-switch-2pm.js +39 -0
  116. package/dist/devices/wo-relay-switch-2pm.js.map +1 -0
  117. package/dist/devices/wo-rgbic-bulb.d.ts +29 -0
  118. package/dist/devices/wo-rgbic-bulb.d.ts.map +1 -0
  119. package/dist/devices/wo-rgbic-bulb.js +84 -0
  120. package/dist/devices/wo-rgbic-bulb.js.map +1 -0
  121. package/dist/devices/wo-rgbicww-floor-lamp.d.ts +8 -0
  122. package/dist/devices/wo-rgbicww-floor-lamp.d.ts.map +1 -0
  123. package/dist/devices/wo-rgbicww-floor-lamp.js +12 -0
  124. package/dist/devices/wo-rgbicww-floor-lamp.js.map +1 -0
  125. package/dist/devices/wo-rgbicww-strip-light.d.ts +8 -0
  126. package/dist/devices/wo-rgbicww-strip-light.d.ts.map +1 -0
  127. package/dist/devices/wo-rgbicww-strip-light.js +12 -0
  128. package/dist/devices/wo-rgbicww-strip-light.js.map +1 -0
  129. package/dist/devices/wo-roller-shade.d.ts +8 -0
  130. package/dist/devices/wo-roller-shade.d.ts.map +1 -0
  131. package/dist/devices/wo-roller-shade.js +12 -0
  132. package/dist/devices/wo-roller-shade.js.map +1 -0
  133. package/dist/devices/wo-smart-thermostat-radiator.d.ts +8 -0
  134. package/dist/devices/wo-smart-thermostat-radiator.d.ts.map +1 -0
  135. package/dist/devices/wo-smart-thermostat-radiator.js +12 -0
  136. package/dist/devices/wo-smart-thermostat-radiator.js.map +1 -0
  137. package/dist/devices/wo-strip-light-3.d.ts +8 -0
  138. package/dist/devices/wo-strip-light-3.d.ts.map +1 -0
  139. package/dist/devices/wo-strip-light-3.js +12 -0
  140. package/dist/devices/wo-strip-light-3.js.map +1 -0
  141. package/dist/devices/wo-vacuum-k10-plus.d.ts +7 -0
  142. package/dist/devices/wo-vacuum-k10-plus.d.ts.map +1 -0
  143. package/dist/devices/wo-vacuum-k10-plus.js +11 -0
  144. package/dist/devices/wo-vacuum-k10-plus.js.map +1 -0
  145. package/dist/devices/wo-vacuum-k10-pro-combo.d.ts +7 -0
  146. package/dist/devices/wo-vacuum-k10-pro-combo.d.ts.map +1 -0
  147. package/dist/devices/wo-vacuum-k10-pro-combo.js +11 -0
  148. package/dist/devices/wo-vacuum-k10-pro-combo.js.map +1 -0
  149. package/dist/devices/wo-vacuum-k10-pro.d.ts +7 -0
  150. package/dist/devices/wo-vacuum-k10-pro.d.ts.map +1 -0
  151. package/dist/devices/wo-vacuum-k10-pro.js +11 -0
  152. package/dist/devices/wo-vacuum-k10-pro.js.map +1 -0
  153. package/dist/devices/wo-vacuum-k11-plus.d.ts +7 -0
  154. package/dist/devices/wo-vacuum-k11-plus.d.ts.map +1 -0
  155. package/dist/devices/wo-vacuum-k11-plus.js +11 -0
  156. package/dist/devices/wo-vacuum-k11-plus.js.map +1 -0
  157. package/dist/devices/wo-vacuum-k20.d.ts +7 -0
  158. package/dist/devices/wo-vacuum-k20.d.ts.map +1 -0
  159. package/dist/devices/wo-vacuum-k20.js +11 -0
  160. package/dist/devices/wo-vacuum-k20.js.map +1 -0
  161. package/dist/devices/wo-vacuum-s10.d.ts +7 -0
  162. package/dist/devices/wo-vacuum-s10.d.ts.map +1 -0
  163. package/dist/devices/wo-vacuum-s10.js +11 -0
  164. package/dist/devices/wo-vacuum-s10.js.map +1 -0
  165. package/dist/devices/wo-vacuum-s20.d.ts +7 -0
  166. package/dist/devices/wo-vacuum-s20.d.ts.map +1 -0
  167. package/dist/devices/wo-vacuum-s20.js +11 -0
  168. package/dist/devices/wo-vacuum-s20.js.map +1 -0
  169. package/dist/devices/wo-vacuum.d.ts +44 -0
  170. package/dist/devices/wo-vacuum.d.ts.map +1 -0
  171. package/dist/devices/wo-vacuum.js +117 -0
  172. package/dist/devices/wo-vacuum.js.map +1 -0
  173. package/dist/index.d.ts +4 -2
  174. package/dist/index.d.ts.map +1 -1
  175. package/dist/index.js +3 -1
  176. package/dist/index.js.map +1 -1
  177. package/dist/settings.d.ts +27 -0
  178. package/dist/settings.d.ts.map +1 -1
  179. package/dist/settings.js +76 -6
  180. package/dist/settings.js.map +1 -1
  181. package/dist/switchbot.d.ts.map +1 -1
  182. package/dist/switchbot.js +86 -9
  183. package/dist/switchbot.js.map +1 -1
  184. package/dist/types/ble.d.ts +20 -1
  185. package/dist/types/ble.d.ts.map +1 -1
  186. package/dist/types/ble.js.map +1 -1
  187. package/dist/types/device.d.ts +49 -3
  188. package/dist/types/device.d.ts.map +1 -1
  189. package/dist/types/index.d.ts +22 -0
  190. package/dist/types/index.d.ts.map +1 -1
  191. package/dist/types/index.js.map +1 -1
  192. package/dist/utils/bot-ble.d.ts +36 -0
  193. package/dist/utils/bot-ble.d.ts.map +1 -0
  194. package/dist/utils/bot-ble.js +109 -0
  195. package/dist/utils/bot-ble.js.map +1 -0
  196. package/dist/utils/circuit-breaker.d.ts +98 -0
  197. package/dist/utils/circuit-breaker.d.ts.map +1 -0
  198. package/dist/utils/circuit-breaker.js +187 -0
  199. package/dist/utils/circuit-breaker.js.map +1 -0
  200. package/dist/utils/connection-tracker.d.ts +66 -0
  201. package/dist/utils/connection-tracker.d.ts.map +1 -0
  202. package/dist/utils/connection-tracker.js +184 -0
  203. package/dist/utils/connection-tracker.js.map +1 -0
  204. package/dist/utils/fallback-handler.d.ts +68 -0
  205. package/dist/utils/fallback-handler.d.ts.map +1 -0
  206. package/dist/utils/fallback-handler.js +131 -0
  207. package/dist/utils/fallback-handler.js.map +1 -0
  208. package/dist/utils/index.d.ts +10 -0
  209. package/dist/utils/index.d.ts.map +1 -1
  210. package/dist/utils/index.js +41 -4
  211. package/dist/utils/index.js.map +1 -1
  212. package/dist/utils/retry.d.ts +55 -0
  213. package/dist/utils/retry.d.ts.map +1 -0
  214. package/dist/utils/retry.js +95 -0
  215. package/dist/utils/retry.js.map +1 -0
  216. package/docs/assets/hierarchy.js +1 -1
  217. package/docs/assets/navigation.js +1 -1
  218. package/docs/assets/search.js +1 -1
  219. package/docs/classes/APIError.html +2 -2
  220. package/docs/classes/APINotAvailableError.html +2 -2
  221. package/docs/classes/BLEConnection.html +16 -10
  222. package/docs/classes/BLENotAvailableError.html +2 -2
  223. package/docs/classes/BLEScanner.html +11 -9
  224. package/docs/classes/CommandFailedError.html +2 -2
  225. package/docs/classes/ConnectionTimeoutError.html +2 -2
  226. package/docs/classes/DeviceManager.html +13 -13
  227. package/docs/classes/DeviceNotFoundError.html +2 -2
  228. package/docs/classes/DeviceOverrideStateDuringConnection.html +56 -0
  229. package/docs/classes/DiscoveryError.html +2 -2
  230. package/docs/classes/OpenAPIClient.html +24 -24
  231. package/docs/classes/SequenceDevice.html +58 -0
  232. package/docs/classes/SwitchBot.html +11 -11
  233. package/docs/classes/SwitchBotDevice.html +43 -15
  234. package/docs/classes/SwitchBotError.html +2 -2
  235. package/docs/classes/ValidationError.html +2 -2
  236. package/docs/classes/WoAirPurifier.html +48 -18
  237. package/docs/classes/WoAirPurifierTable.html +48 -18
  238. package/docs/classes/WoArtFrame.html +71 -0
  239. package/docs/classes/WoBlindTilt.html +48 -20
  240. package/docs/classes/WoBulb.html +52 -19
  241. package/docs/classes/WoCeilingLight.html +52 -19
  242. package/docs/classes/WoCirculatorFan.html +66 -0
  243. package/docs/classes/WoClimatePanel.html +66 -0
  244. package/docs/classes/WoContact.html +42 -14
  245. package/docs/classes/WoCurtain.html +46 -18
  246. package/docs/classes/WoFloorLamp.html +71 -0
  247. package/docs/classes/WoGarageDoorOpener.html +64 -0
  248. package/docs/classes/WoHand.html +63 -19
  249. package/docs/classes/WoHub2.html +42 -14
  250. package/docs/classes/WoHub3.html +42 -14
  251. package/docs/classes/WoHubMiniMatter.html +56 -0
  252. package/docs/classes/WoHumi.html +46 -18
  253. package/docs/classes/WoHumi2.html +52 -18
  254. package/docs/classes/WoIOSensorTH.html +42 -14
  255. package/docs/classes/WoKeypad.html +42 -14
  256. package/docs/classes/WoKeypadVision.html +56 -0
  257. package/docs/classes/WoKeypadVisionPro.html +56 -0
  258. package/docs/classes/WoLeak.html +42 -14
  259. package/docs/classes/WoPlugMiniJP.html +45 -17
  260. package/docs/classes/WoPlugMiniUS.html +45 -17
  261. package/docs/classes/WoPresence.html +42 -14
  262. package/docs/classes/WoRGBICBulb.html +82 -0
  263. package/docs/classes/WoRGBICWWFloorLamp.html +82 -0
  264. package/docs/classes/WoRGBICWWStripLight.html +82 -0
  265. package/docs/classes/WoRelaySwitch1.html +47 -17
  266. package/docs/classes/WoRelaySwitch1PM.html +47 -17
  267. package/docs/classes/WoRelaySwitch2PM.html +68 -0
  268. package/docs/classes/WoRemote.html +42 -14
  269. package/docs/classes/WoRollerShade.html +64 -0
  270. package/docs/classes/WoSensorTH.html +42 -14
  271. package/docs/classes/WoSensorTHPlus.html +42 -14
  272. package/docs/classes/WoSensorTHPro.html +42 -14
  273. package/docs/classes/WoSensorTHProCO2.html +42 -14
  274. package/docs/classes/WoSmartLock.html +49 -16
  275. package/docs/classes/WoSmartLockLite.html +64 -0
  276. package/docs/classes/WoSmartLockPro.html +52 -17
  277. package/docs/classes/WoSmartLockProWiFi.html +68 -0
  278. package/docs/classes/WoSmartLockVision.html +64 -0
  279. package/docs/classes/WoSmartLockVisionPro.html +68 -0
  280. package/docs/classes/WoSmartThermostatRadiator.html +66 -0
  281. package/docs/classes/WoStrip.html +52 -19
  282. package/docs/classes/WoStripLight3.html +71 -0
  283. package/docs/classes/WoVacuum.html +71 -0
  284. package/docs/classes/WoVacuumK10Plus.html +71 -0
  285. package/docs/classes/WoVacuumK10Pro.html +71 -0
  286. package/docs/classes/WoVacuumK10ProCombo.html +71 -0
  287. package/docs/classes/WoVacuumK11Plus.html +71 -0
  288. package/docs/classes/WoVacuumK20.html +71 -0
  289. package/docs/classes/WoVacuumS10.html +71 -0
  290. package/docs/classes/WoVacuumS20.html +71 -0
  291. package/docs/enums/LogLevel.html +2 -2
  292. package/docs/enums/SwitchBotBLEModel.html +2 -2
  293. package/docs/enums/SwitchBotBLEModelName.html +2 -2
  294. package/docs/functions/updateBaseURL.html +1 -1
  295. package/docs/hierarchy.html +1 -1
  296. package/docs/index.html +2 -2
  297. package/docs/interfaces/APICommandRequest.html +2 -2
  298. package/docs/interfaces/APICommandResponse.html +2 -2
  299. package/docs/interfaces/APIDevice.html +2 -2
  300. package/docs/interfaces/APIDeviceStatus.html +2 -2
  301. package/docs/interfaces/APIErrorResponse.html +2 -2
  302. package/docs/interfaces/APIResponse.html +2 -2
  303. package/docs/interfaces/AirPurifierCommands.html +2 -2
  304. package/docs/interfaces/AirPurifierServiceData.html +20 -5
  305. package/docs/interfaces/AirPurifierStatus.html +7 -7
  306. package/docs/interfaces/BLEAdvertisement.html +3 -2
  307. package/docs/interfaces/BLEScanOptions.html +5 -5
  308. package/docs/interfaces/BLEServiceData.html +22 -5
  309. package/docs/interfaces/BlindTiltCommands.html +2 -2
  310. package/docs/interfaces/BlindTiltServiceData.html +21 -5
  311. package/docs/interfaces/BlindTiltStatus.html +6 -6
  312. package/docs/interfaces/BotCommands.html +6 -2
  313. package/docs/interfaces/BotServiceData.html +20 -5
  314. package/docs/interfaces/BotStatus.html +6 -6
  315. package/docs/interfaces/BulbCommands.html +4 -2
  316. package/docs/interfaces/BulbServiceData.html +21 -5
  317. package/docs/interfaces/BulbStatus.html +6 -6
  318. package/docs/interfaces/CeilingLightCommands.html +4 -2
  319. package/docs/interfaces/CeilingLightServiceData.html +21 -5
  320. package/docs/interfaces/CeilingLightStatus.html +6 -6
  321. package/docs/interfaces/CommandResult.html +6 -6
  322. package/docs/interfaces/ContactServiceData.html +22 -5
  323. package/docs/interfaces/ContactStatus.html +6 -6
  324. package/docs/interfaces/CurtainCommands.html +2 -2
  325. package/docs/interfaces/CurtainServiceData.html +22 -5
  326. package/docs/interfaces/CurtainStatus.html +6 -6
  327. package/docs/interfaces/DeviceInfo.html +23 -13
  328. package/docs/interfaces/DeviceListResponse.html +2 -2
  329. package/docs/interfaces/DeviceStatus.html +6 -6
  330. package/docs/interfaces/DiscoveryOptions.html +7 -7
  331. package/docs/interfaces/HubServiceData.html +22 -5
  332. package/docs/interfaces/HubStatus.html +6 -6
  333. package/docs/interfaces/HumidifierCommands.html +2 -2
  334. package/docs/interfaces/HumidifierServiceData.html +23 -6
  335. package/docs/interfaces/HumidifierStatus.html +6 -6
  336. package/docs/interfaces/KeypadStatus.html +6 -6
  337. package/docs/interfaces/LeakServiceData.html +22 -5
  338. package/docs/interfaces/LeakStatus.html +6 -6
  339. package/docs/interfaces/LockCommands.html +6 -2
  340. package/docs/interfaces/LockServiceData.html +20 -6
  341. package/docs/interfaces/LockStatus.html +6 -6
  342. package/docs/interfaces/MeterServiceData.html +22 -5
  343. package/docs/interfaces/MeterStatus.html +6 -6
  344. package/docs/interfaces/MotionServiceData.html +22 -5
  345. package/docs/interfaces/MotionStatus.html +6 -6
  346. package/docs/interfaces/PlugCommands.html +2 -2
  347. package/docs/interfaces/PlugServiceData.html +21 -5
  348. package/docs/interfaces/PlugStatus.html +6 -6
  349. package/docs/interfaces/PresenceServiceData.html +22 -5
  350. package/docs/interfaces/PresenceStatus.html +6 -6
  351. package/docs/interfaces/RelaySwitchCommands.html +2 -2
  352. package/docs/interfaces/RelaySwitchServiceData.html +21 -5
  353. package/docs/interfaces/RelaySwitchStatus.html +6 -6
  354. package/docs/interfaces/RemoteStatus.html +6 -6
  355. package/docs/interfaces/SceneListResponse.html +2 -2
  356. package/docs/interfaces/StripCommands.html +4 -2
  357. package/docs/interfaces/StripServiceData.html +21 -5
  358. package/docs/interfaces/StripStatus.html +6 -6
  359. package/docs/interfaces/SwitchBotConfig.html +21 -9
  360. package/docs/interfaces/VacuumCommands.html +8 -0
  361. package/docs/interfaces/VacuumStatus.html +16 -0
  362. package/docs/interfaces/WebhookConfig.html +2 -2
  363. package/docs/interfaces/WebhookDetails.html +2 -2
  364. package/docs/interfaces/WebhookQueryResponse.html +2 -2
  365. package/docs/interfaces/WebhookSetupResponse.html +2 -2
  366. package/docs/media/BLE.md +117 -4
  367. package/docs/modules.html +1 -1
  368. package/docs/types/ConnectionType.html +1 -1
  369. package/docs/types/PhysicalDeviceType.html +1 -1
  370. package/docs/types/VirtualDeviceType.html +1 -1
  371. package/docs/variables/urls.html +1 -1
  372. package/package.json +11 -7
  373. package/tmp-switchbot-scan.mjs +79 -0
  374. package/todo/PYSWITCHBOT_COMPARISON.md +484 -0
  375. package/todo/README.md +68 -0
  376. package/todo/completed.md +309 -0
  377. package/todo/todo.md +302 -0
  378. package/tsconfig.build.json +17 -0
  379. package/PRODUCTION_READY.md +0 -135
@@ -1,135 +0,0 @@
1
- # Production Readiness Status - v4.0.0
2
-
3
- ## โœ… Completed Production Enhancements
4
-
5
- ### ๐Ÿ“ฆ Code Quality
6
-
7
- - โœ… **Build**: TypeScript compilation passes with zero errors
8
- - โœ… **Tests**: 40/40 tests passing (5 test suites)
9
- - โœ… **Lint**: ESLint passes with @antfu/eslint-config rules
10
- - โœ… **Type Safety**: Full TypeScript coverage with strict mode
11
- - โœ… **ES Modules**: Native ES2022 module implementation
12
-
13
- ### ๐ŸŽฏ Error Handling
14
-
15
- - โœ… **Custom Error Classes**: 9 specific error types for better debugging
16
- - `SwitchBotError` (base)
17
- - `BLENotAvailableError`
18
- - `APINotAvailableError`
19
- - `DeviceNotFoundError`
20
- - `CommandFailedError`
21
- - `ConnectionTimeoutError`
22
- - `DiscoveryError`
23
- - `APIError`
24
- - `ValidationError`
25
- - โœ… **Error Codes**: Each error has a unique code for programmatic handling
26
- - โœ… **Error Context**: Errors include relevant context (device IDs, connection types, etc.)
27
-
28
- ### ๐Ÿ“š Documentation
29
-
30
- - โœ… **README**: Updated with v4 quick start and migration guide
31
- - โœ… **CHANGELOG**: Comprehensive v4.0.0 release notes
32
- - โœ… **Examples**: 6 complete usage examples
33
- - `basic-usage.js` - Hybrid BLE + API mode
34
- - `ble-only.js` - Linux BLE-only mode
35
- - `api-only.js` - Cross-platform API mode
36
- - `device-control.js` - All device types
37
- - `event-handling.js` - Event listeners
38
- - `typescript-usage.ts` - Type-safe usage
39
- - โœ… **Examples README**: Comprehensive examples documentation
40
- - โœ… **API Docs**: TypeDoc-generated documentation (run `npm run docs`)
41
-
42
- ### ๐Ÿงช Testing
43
-
44
- - โœ… **Unit Tests**: 5 test suites covering core functionality
45
- - Export validation (v4-only, no v3 legacy)
46
- - Device manager operations
47
- - Error class behaviors
48
- - Utility functions
49
- - Device base functionality
50
- - โœ… **Test Coverage**: Key paths validated
51
- - โœ… **Vitest Config**: Proper test exclusions for .dev-archive
52
-
53
- ### ๐Ÿ”ง Development Tools
54
-
55
- - โœ… **ESLint**: Auto-formatting with lint:fix
56
- - โœ… **TypeScript**: Strict compilation settings
57
- - โœ… **Vitest**: Modern testing framework
58
- - โœ… **TypeDoc**: API documentation generation
59
- - โœ… **NPM Scripts**: Complete build/test/lint workflow
60
-
61
- ### ๐Ÿ“ฆ Package Configuration
62
-
63
- - โœ… **package.json**: Updated to v4.0.0 with correct metadata
64
- - โœ… **.npmignore**: Excludes test/, examples/, .dev-archive/ from npm package
65
- - โœ… **Engine Requirements**: Node.js ^20 || ^22 || ^24
66
- - โœ… **Type Exports**: Full TypeScript definitions exported
67
-
68
- ### ๐Ÿ—๏ธ Architecture
69
-
70
- - โœ… **Hybrid BLE/API**: Unified approach with automatic fallback
71
- - โœ… **Device Manager**: Centralized device access pattern
72
- - โœ… **Event-Driven**: EventEmitter for discovery and commands
73
- - โœ… **30 Device Types**: Full support for all SwitchBot devices
74
- - โœ… **Platform Support**:
75
- - Linux: Full BLE + API
76
- - Windows/macOS: API-only (graceful BLE degradation)
77
-
78
- ### ๐Ÿ” Security
79
-
80
- - โœ… **Credential Handling**: Secure HMAC-SHA256 for API auth
81
- - โœ… **Optional Credentials**: Works in BLE-only mode without API credentials
82
- - โœ… **No Hardcoded Secrets**: Examples use environment variables
83
-
84
- ## ๐Ÿ“Š Test Results
85
-
86
- ```
87
- Test Files 5 passed (5)
88
- Tests 40 passed (40)
89
- Duration 431ms
90
- ```
91
-
92
- ### Test Coverage Breakdown
93
-
94
- - โœ… `v4-exports.test.ts` (3 tests) - Export validation
95
- - โœ… `device-manager.test.ts` (6 tests) - Device management
96
- - โœ… `errors.test.ts` (15 tests) - Error handling
97
- - โœ… `utils.test.ts` (9 tests) - Utility functions
98
- - โœ… `devices.test.ts` (7 tests) - Device functionality
99
-
100
- ## ๐Ÿšข Release Readiness
101
-
102
- ### Pre-Release Checklist
103
-
104
- - โœ… All tests passing
105
- - โœ… Build succeeds
106
- - โœ… Lint passes
107
- - โœ… Documentation complete
108
- - โœ… Examples working
109
- - โœ… CHANGELOG updated
110
- - โœ… README updated
111
- - โœ… No TODO/FIXME comments
112
- - โœ… Type definitions exported
113
- - โœ… Error handling comprehensive
114
-
115
- ### Deployment Steps
116
-
117
- 1. โœ… Version bumped to 4.0.0
118
- 2. โœ… CHANGELOG updated
119
- 3. โณ Tag release: `git tag v4.0.0`
120
- 4. โณ Push to GitHub: `git push origin latest --tags`
121
- 5. โณ CI will auto-publish to npm via GitHub Actions
122
-
123
- ## ๐ŸŽ‰ Ready for Production
124
-
125
- All production readiness criteria have been met. The v4.0.0 codebase is:
126
-
127
- - โœ… **Stable**: All tests passing, no known bugs
128
- - โœ… **Documented**: Comprehensive docs and examples
129
- - โœ… **Type-Safe**: Full TypeScript definitions
130
- - โœ… **Tested**: 40 tests covering core functionality
131
- - โœ… **Clean**: Linted and formatted code
132
- - โœ… **Maintainable**: Clear architecture and error handling
133
- - โœ… **Production-Grade**: Enterprise-ready error handling and logging
134
-
135
- **Status**: ๐ŸŸข PRODUCTION READY