import type { lockProServiceData } from '../types/bledevicestatus.js'; import type { NobleTypes } from '../types/types.js'; import { Buffer } from 'node:buffer'; import { SwitchbotDevice } from '../device.js'; /** * Class representing a WoSmartLockPro device. * @see https://github.com/OpenWonderLabs/SwitchBotAPI-BLE/blob/latest/devicetypes/lock.md */ export declare class WoSmartLockPro extends SwitchbotDevice { iv: Buffer | null; key_id: string; encryption_key: Buffer | null; static Result: { ERROR: number; SUCCESS: number; SUCCESS_LOW_BATTERY: number; }; static validateResponse(res: Buffer): Promise; static getLockStatus(code: number): string; /** * Parses the service data from the SwitchBot Strip Light. * @param {Buffer} serviceData - The service data buffer. * @param {Buffer} manufacturerData - The manufacturer data buffer. * @param {Function} emitLog - The function to emit log messages. * @returns {Promise} - Parsed service data or null if invalid. */ static parseServiceData(serviceData: Buffer, manufacturerData: Buffer, emitLog: (level: string, message: string) => void): Promise; constructor(peripheral: NobleTypes['peripheral'], noble: NobleTypes['noble']); /** * Initializes the encryption key info for valid lock communication. * @param {string} keyId - The key ID. * @param {string} encryptionKey - The encryption key. */ setKey(keyId: string, encryptionKey: string): Promise; /** * Unlocks the Smart Lock. * @returns {Promise} - The result of the unlock operation. */ unlock(): Promise; /** * Unlocks the Smart Lock without unlatching the door. * @returns {Promise} - The result of the unlock operation. */ unlockNoUnlatch(): Promise; /** * Locks the Smart Lock. * @returns {Promise} - The result of the lock operation. */ lock(): Promise; /** * Gets general state info from the Smart Lock. * @returns {Promise} - The state object or null if an error occurred. */ info(): Promise; /** * Encrypts a string using AES-128-CTR. * @param {string} str - The string to encrypt. * @returns {Promise} - The encrypted string in hex format. */ encrypt(str: string): Promise; /** * Decrypts a buffer using AES-128-CTR. * @param {Buffer} data - The data to decrypt. * @returns {Promise} - The decrypted data. */ decrypt(data: Buffer): Promise; /** * Retrieves the IV from the device. * @returns {Promise} - The IV buffer. */ getIv(): Promise; /** * Sends an encrypted command to the device. * @param {string} key - The command key. * @returns {Promise} - The response buffer. */ encryptedCommand(key: string): Promise; /** * Operates the lock with the given command. * @param {string} key - The command key. * @param {boolean} [encrypt] - Whether to encrypt the command. * @returns {Promise} - The response buffer. */ operateLockPro(key: string, encrypt?: boolean): Promise; } //# sourceMappingURL=wosmartlockpro.d.ts.map