declare module 'react-native-ble-stream' { export interface Peripheral { id: string; rssi: number; name?: string; advertising: AdvertisingData; } export interface AdvertisingData { isConnectable?: boolean; localName?: string; manufacturerData?: any; serviceUUIDs?: string[]; txPowerLevel?: number; } export interface StartOptions { showAlert?: boolean restoreIdentifierKey?: string forceLegacy?: boolean } export interface ChannelOptions { psm: number } export function start(options?: StartOptions): Promise export interface ScanOptions { numberOfMatches?: number; matchMode?: number; scanMode?: number; } export function scan(serviceUUIDs: string[], seconds: number, allowDuplicates?: boolean, options?: ScanOptions): Promise; export function stopScan(): Promise; export function connect(peripheralID: string): Promise export function openChannel(periperhalID: string, channelOptions: ChannelOptions): Promise; export function disconnect(peripheralID: string, force?:boolean): Promise export function checkState(): void; export function startNotification(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise export function stopNotification(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise export function read(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise export function write(peripheralID: string, serviceUUID: string, characteristicUUID: string, data: any, maxByteSize?: number): Promise export function writeWithoutResponse(peripheralID: string, serviceUUID: string, characteristicUUID: string, data: any, maxByteSize?: number, queueSleepTime?: number): Promise export function readRSSI(peripheralID: string): Promise export function getConnectedPeripherals(serviceUUIDs: string[]): Promise export function getDiscoveredPeripherals(): Promise export function isPeripheralConnected(peripheralID: string, serviceUUIDs: string[]): Promise // [Android only API 21+] export enum ConnectionPriority { balanced = 0, high = 1, low = 2 } export function requestConnectionPriority(peripheralID: string, connectionPriority: ConnectionPriority): Promise /// Android only export function enableBluetooth(): Promise // [Android only] export function refreshCache(peripheralID: string): Promise // [Android only API 21+] export function requestMTU(peripheralID: string, mtu: number): Promise export function createBond(peripheralID: string): Promise export function removeBond(peripheralID: string): Promise export function getBondedPeripherals(): Promise export function removePeripheral(peripheralID: string): Promise export interface PeripheralInfo { } export function retrieveServices(peripheralID: string, serviceUUIDs?: string[]): Promise }