qcloud-iotexplorer-bluetooth-adapter
Advanced tools
Comparing version 0.0.13 to 0.0.14
/// <reference types="miniprogram-api-typings" /> | ||
import EventEmitter from "event-emitter-for-miniprogram"; | ||
import { BlueToothBase } from './BlueToothBase'; | ||
import { DeviceAdapter, DeviceInfo } from './DeviceAdapter'; | ||
import { DeviceAdapter, BlueToothDeviceInfo } from './DeviceAdapter'; | ||
export interface BlueToothActions { | ||
@@ -61,3 +61,3 @@ initProductIds?: () => Promise<{ | ||
export interface StartSearchParams extends SearchDeviceBaseParams { | ||
onSearch?: (devices: DeviceInfo[]) => any; | ||
onSearch?: (devices: BlueToothDeviceInfo[]) => any; | ||
onError?: (error: Error | object | string) => any; | ||
@@ -97,3 +97,3 @@ } | ||
extendInfo?: any; | ||
}): DeviceInfo[]; | ||
}): BlueToothDeviceInfo[]; | ||
_getSupportServiceIds(): string[]; | ||
@@ -134,3 +134,3 @@ startBluetoothDevicesDiscovery(): any; | ||
*/ | ||
searchDevice({ serviceId, serviceIds, deviceName, explorerDeviceId, ignoreDeviceIds, timeout, extendInfo, }: SearchDeviceParams): Promise<DeviceInfo>; | ||
searchDevice({ serviceId, serviceIds, deviceName, explorerDeviceId, ignoreDeviceIds, timeout, extendInfo, }: SearchDeviceParams): Promise<BlueToothDeviceInfo>; | ||
getDeviceAdapter(deviceId: any): any; | ||
@@ -137,0 +137,0 @@ connectDevice({ deviceId, serviceId, mac, deviceName, name, productId, autoNotify, }: { |
/// <reference types="miniprogram-api-typings" /> | ||
import { BlueToothBase } from './BlueToothBase'; | ||
import { BlueToothActions } from "./BlueToothAdapter"; | ||
export interface DeviceInfo extends WechatMiniprogram.BlueToothDevice { | ||
export interface BlueToothDeviceInfo extends WechatMiniprogram.BlueToothDevice { | ||
deviceName: string; | ||
@@ -21,3 +21,3 @@ serviceId: string; | ||
} | ||
export declare type DeviceFilterFunction = (deviceInfo: WechatMiniprogram.BlueToothDevice, extendInfo: DeviceFilterExtendInfo) => DeviceInfo | void | false | null; | ||
export declare type DeviceFilterFunction = (deviceInfo: WechatMiniprogram.BlueToothDevice, extendInfo: DeviceFilterExtendInfo) => BlueToothDeviceInfo | void | false | null; | ||
/** | ||
@@ -24,0 +24,0 @@ * 设备适配器 |
@@ -1,2 +0,2 @@ | ||
import { BlueToothAdapter, BlueToothAdapterProps, DeviceInfo, SearchDeviceParams, StartSearchParams } from "../core"; | ||
import { BlueToothAdapter, BlueToothAdapterProps, BlueToothDeviceInfo, SearchDeviceParams, StartSearchParams } from "../core"; | ||
/** | ||
@@ -49,3 +49,3 @@ * 小程序版本在核心上拓展了: | ||
startSearch(params: StartSearchParams): Promise<void>; | ||
searchDevice(params: SearchDeviceParams): Promise<DeviceInfo>; | ||
searchDevice(params: SearchDeviceParams): Promise<BlueToothDeviceInfo>; | ||
} |
{ | ||
"name": "qcloud-iotexplorer-bluetooth-adapter", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118409