@onbright/bluetooth-sdk
Advanced tools
Comparing version 1.1.28 to 1.1.29
@@ -21,2 +21,32 @@ interface Communication { | ||
declare const ONBRIGHT_AUTH_BLUE_UUID_SERVICE = "00004F42-0000-1000-8000-00805F9B34FB"; | ||
declare const ONBRIGHT_AUTH_BLUE_WRITE_UUID = "00004F00-0000-1000-8000-00805F9B34FB"; | ||
declare const ONBRIGHT_AUTH_BLUE_NOTIFY_UUID = "00004F00-0000-1000-8000-00805F9B34FB"; | ||
declare const ONBRIGHT_AUTH_BLUE_READ_UUID = "00004F00-0000-1000-8000-00805F9B34FB"; | ||
declare class Cat1LockAuthHandler { | ||
grade: string; | ||
userId: string; | ||
advertisData: ArrayBuffer; | ||
hexStr: string; | ||
padEndValue: string; | ||
timeUnix: string; | ||
private callback; | ||
constructor(grade: string, userId: string, timeUnix: string); | ||
handleAuthenticationData(): Uint8Array; | ||
handleSendData(deviceId: string, hexStr: string): Promise<void>; | ||
setCallback(callback: Cat1LockAuthCallback | null): void; | ||
onMatchingServiceCharacteristic(): BLEDeviceCharacteristicsMap; | ||
onProcessingSentData(): Promise<ArrayBuffer>; | ||
onProcessNotifyData(receivedData: WechatMiniprogram.OnBLECharacteristicValueChangeListenerResult): Promise<unknown>; | ||
onProcessReadData(receivedData: WechatMiniprogram.OnBLECharacteristicValueChangeListenerResult): Promise<unknown>; | ||
_getKey(): Promise<unknown>; | ||
_getSum(hex: string): Promise<unknown>; | ||
} | ||
interface Cat1LockAuthCallback { | ||
onAuthSuccess: onAuthSuccessCallback; | ||
onAuthFailed: onAuthFailedCallback; | ||
} | ||
type onAuthSuccessCallback = () => void; | ||
type onAuthFailedCallback = () => void; | ||
declare class BluetoothManager { | ||
@@ -27,3 +57,6 @@ private _ConnectHandler; | ||
private _BluetoothCallbackManager; | ||
private isAutoConnectDevices; | ||
private _Cat1LockAuthHandler; | ||
private _isNeedAuth; | ||
private _isHasAuth; | ||
private _isAutoConnectDevices; | ||
constructor(); | ||
@@ -33,3 +66,7 @@ private init; | ||
setDataHandler(protocolComponent: ProtocolComponent): void; | ||
setNeedAuth(isNeedAuth: Boolean): void; | ||
setAutoConnectDevices(isAutoConnectDevices: Boolean): void; | ||
setHasAuth(isHasAuth: Boolean): void; | ||
hasAuth(): Boolean; | ||
setCat1LockAuthHandler(cat1LockAuthHandler: Cat1LockAuthHandler): void; | ||
addBluetoothEventCallback(callback: BluetoothEventCallback): void; | ||
@@ -56,3 +93,6 @@ removeBluetoothEventCallback(callback: BluetoothEventCallback): void; | ||
private _onConnectStateMTUChange; | ||
private _resetNotifyBLECharacteristicValueChange; | ||
private _onTransmitDeviceData; | ||
resetBluetoothData(): void; | ||
private _handleCloseMonitoring; | ||
} | ||
@@ -70,2 +110,4 @@ declare class BluetoothEventCallback { | ||
onTransmitDeviceData(res: any): void; | ||
onAuthSuccess(): void; | ||
onAuthFailed(): void; | ||
} | ||
@@ -80,2 +122,2 @@ | ||
export { type BLEDeviceCharacteristicsMap, type Communication, type ProtocolComponent, _default as default }; | ||
export { type BLEDeviceCharacteristicsMap, type Cat1LockAuthCallback, Cat1LockAuthHandler, type Communication, ONBRIGHT_AUTH_BLUE_NOTIFY_UUID, ONBRIGHT_AUTH_BLUE_READ_UUID, ONBRIGHT_AUTH_BLUE_UUID_SERVICE, ONBRIGHT_AUTH_BLUE_WRITE_UUID, type ProtocolComponent, _default as default }; |
{ | ||
"name": "@onbright/bluetooth-sdk", | ||
"version": "1.1.28", | ||
"version": "1.1.29", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "tsup", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
508623
7361