node-switchbot 3.0.2-beta.3 → 3.0.2-beta.5

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.
@@ -74,12 +74,12 @@ export declare class SwitchBotOpenAPI extends EventEmitter {
74
74
  * @param command - The command to send to the device.
75
75
  * @param parameter - The parameter for the command.
76
76
  * @param commandType - The type of the command, defaults to 'command'.
77
- * @returns {Promise<{ response: pushResponse['body'], statusCode: number }>} A promise that resolves to an object containing the API response.
77
+ * @returns {Promise<{ response: pushResponse['body'], statusCode: pushResponse['statusCode'] }>} A promise that resolves to an object containing the API response.
78
78
  * @throws An error if the device control fails.
79
79
  */
80
80
  controlDevice(deviceId: string, command: string, parameter: string, commandType?: string): Promise<{
81
81
  response: pushResponse['body'];
82
- statusCode: number;
82
+ statusCode: pushResponse['statusCode'];
83
83
  }>;
84
84
  /**
85
85
  * Retrieves the status of a specific device.
@@ -1 +1 @@
1
- {"version":3,"file":"switchbot-openapi.d.ts","sourceRoot":"","sources":["../src/switchbot-openapi.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,MAAM,EAAkB,MAAM,WAAW,CAAA;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAK3D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAO1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAQ;IAEvB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAO;IAE3C;;;;;OAKG;gBACS,KAAK,EAAE,MAAM,EAAE,MAAM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AAY;IAChD,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAQ;IAEvB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAO;IAE3C;;;;;OAKG;gBACS,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAOzC;;;;;OAKG;YACW,OAAO;IAIrB;;;;;OAKG;IACG,UAAU,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAatE;;;;;;;;;OASG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,GAAE,MAAkB,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;KAAE,CAAC;IAqB/L;;;;;;OAMG;IACG,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,YAAY,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAgBhG;;;;;;;;;OASG;IACH,OAAO,CAAC,eAAe,CAiBtB;IAED;;;;;;;;;;;;;OAaG;IACG,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6F9C;;;;;;;OAOG;IACG,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBhD"}
@@ -91,7 +91,7 @@ export class SwitchBotOpenAPI extends EventEmitter {
91
91
  * @param command - The command to send to the device.
92
92
  * @param parameter - The parameter for the command.
93
93
  * @param commandType - The type of the command, defaults to 'command'.
94
- * @returns {Promise<{ response: pushResponse['body'], statusCode: number }>} A promise that resolves to an object containing the API response.
94
+ * @returns {Promise<{ response: pushResponse['body'], statusCode: pushResponse['statusCode'] }>} A promise that resolves to an object containing the API response.
95
95
  * @throws An error if the device control fails.
96
96
  */
97
97
  async controlDevice(deviceId, command, parameter, commandType = 'command') {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-switchbot",
3
3
  "type": "module",
4
- "version": "3.0.2-beta.3",
4
+ "version": "3.0.2-beta.5",
5
5
  "description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",
6
6
  "author": "OpenWonderLabs (https://github.com/OpenWonderLabs)",
7
7
  "license": "MIT",