import Vnmf from '../../index' declare module '../../index' { namespace stopBeaconDiscovery { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.IBeaconError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.IBeaconError) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.IBeaconError) => void } } namespace startBeaconDiscovery { interface Option { /** iBeacon It's broadcast by equipment. uuid List */ uuids: string[] /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.IBeaconError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.IBeaconError) => void /** Verify Bluetooth Switches,Just... iOS It's working. */ ignoreBluetoothAvailable?: boolean /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.IBeaconError) => void } } namespace onBeaconUpdate { /** iBeacon The echo function for device update events */ type Callback = (result: CallbackResult) => void interface CallbackResult { /** All currently found iBeacon Device List */ beacons: IBeaconInfo[] } } namespace onBeaconServiceChange { /** iBeacon Service state change event echo function */ type Callback = ( result: CallbackResult, ) => void interface CallbackResult { /** Current availability of services */ available: boolean /** Are you currently in search status? */ discovering: boolean } } namespace getBeacons { interface Option { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.IBeaconError) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.IBeaconError) => void /** Interface calls a successful echo function */ success?: (result: CallbackResult) => void } interface CallbackResult extends VnmfGeneral.IBeaconError { /** iBeacon Device List */ beacons: IBeaconInfo[] /** Call Results */ errMsg: string } } interface IBeaconInfo { /** Beacon It's broadcast by equipment. uuid */ uuid: string /** Beacon Main of the device ID */ major: string /** Beacon Devices times ID */ minor: string /** Indicates the enumeration value of device 's distance(OnlyiOS) */ proximity: keyof IBeaconInfo.Proximity /** Beacon Distance of equipment,Units m。iOS Let's go.,proximity Yes. 0 Hour,accuracy Yes. -1。 */ accuracy: number /** Signal strength of the device,Units dBm */ rssi: number } namespace IBeaconInfo { /** proximity Legal value [v] */ interface Proximity { /** The signal is too weak to calculate distance.,or not iOS Equipment */ 0 /** Very close. */ 1 /** Closer. */ 2 /** Far */ 3 } } interface VnmfStatic { /** Stop searching around here. iBeacon Equipment * @supported weapp * @example * ```tsx * Vnmf.stopBeaconDiscovery(params).then(...) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/ibeacon/wx.stopBeaconDiscovery.html */ stopBeaconDiscovery(option?: stopBeaconDiscovery.Option): Promise /** Start searching the neighborhood. iBeacon Equipment * @supported weapp * @example * ```tsx * Vnmf.startBeaconDiscovery({ * success: function (res) { } * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/ibeacon/wx.startBeaconDiscovery.html */ startBeaconDiscovery(option: startBeaconDiscovery.Option): Promise /** Listening. iBeacon Device Update Event,Only one bug can be registered. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/ibeacon/wx.onBeaconUpdate.html */ onBeaconUpdate( /** iBeacon The echo function for device update events */ callback: onBeaconUpdate.Callback, ): void /** Listening. iBeacon Service status change event,Only one bug can be registered. * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/ibeacon/wx.onBeaconServiceChange.html */ onBeaconServiceChange( /** iBeacon Service state change event echo function */ callback: onBeaconServiceChange.Callback, ): void /** Disable listening. iBeacon Device Update Event * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/ibeacon/wx.offBeaconUpdate.html */ offBeaconUpdate( /** iBeacon The echo function for device update events */ callback: (res: VnmfGeneral.IBeaconError) => void, ): void /** Disable listening. iBeacon Service status change event * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/ibeacon/wx.offBeaconServiceChange.html */ offBeaconServiceChange( /** iBeacon Service state change event echo function */ callback: (res: VnmfGeneral.IBeaconError) => void, ): void /** Fetch All Searched iBeacon Equipment * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/ibeacon/wx.getBeacons.html */ getBeacons(option?: getBeacons.Option): Promise } }