import { IBeacon } from '@ionic-native/ibeacon' ; import { Observable } from 'rxjs/Observable' ; export interface Beacon { /**
     * The physical device's identifier.
     */ uuid : string ; /**
     * The beacon's major identifier number.
     */ major : number ; /**
     * The beacon's minor identifier number.
     */ minor : number ; /**
     * The proximity of the beacon relative to the phone.
     *
     * Possible options are:
     * ProximityImmediate
     * ProximityNear
     * ProximityFar
     * ProximityUnknown
     */ proximity : 'ProximityImmediate' | 'ProximityNear' | 'ProximityFar' | 'ProximityUnknown' ; /**
     * Transmission Power of the beacon. A constant emitted by the beacon which indicates what's the expected RSSI at a distance of 1 meter to the beacon.
     */ tx : number ; /**
     * Received Signal Strength Indicator. The strength of the beacon's signal when it reaches the device.
     *  RSSI ranges from aprox -26 (a few inches) to -100 (40-50 m distance).
     */ rssi : number ; /**
     * The accuracy of the ranging.
     */ accuracy : number ; } export interface BeaconRegion { /**
     * A unique identifier for this region.
     */ identifier : string ; /**
     * The the beacon identifier the device will "watch" for. Many beacons can share the same uuid.
     */ uuid : string ; /**
     * The beacon's major identifier number. Optional, of nothing is supplied
     * the plugin will treat it as a wildcard.
     */ major ? : number ; /**
     * The beacon's minor identifier number. Optional, of nothing is supplied
     * the plugin will treat it as a wildcard.
     */ minor ? : number ; /**
     * If set to true the device will scan for beacons and determine region state anytime
     * the device's screen is turned on or off. Useful for debugging.
     */ notifyEntryStateOnDisplay ? : boolean ; } export interface CircularRegion { /**
     * A unique identifier for this region.
     */ identifier : string ; /**
     * The latitude of this region.
     */ latitude : number ; /**
     * The longitude of this region.
     */ longitude : number ; /**
     * The radius of the geofence for this region.
     */ radius : number ; } export declare type Region = BeaconRegion | CircularRegion ; export interface IBeaconPluginResult { /**
     * The name of the delegate function that produced the PluginResult object.
     */ eventType : string ; /**
     * The region that triggered the event.
     */ region : Region ; /**
     * An array of beacon objects
     */ beacons : Beacon [ ] ; /**
     * The status of the location permission for iOS.
     */ authorizationStatus : string ; /**
     * The state of the phone in relation to the region. Inside/outside for example.
     */ state : 'CLRegionStateInside' | 'CLRegionStateOutside' ; /**
     * Error message, used only with monitoringDidFailForRegionWithError delegate.
     */ error : string ; } export interface IBeaconDelegate { returns { Observable < string > } didChangeAuthorizationStatus ( ) : Observable < string > ; returns { Observable < IBeaconPluginResult > } didDetermineStateForRegion ( ) : Observable < IBeaconPluginResult > ; returns { Observable < IBeaconPluginResult > } didEnterRegion ( ) : Observable < IBeaconPluginResult > ; returns { Observable < IBeaconPluginResult > } didExitRegion ( ) : Observable < IBeaconPluginResult > ; returns { Observable < IBeaconPluginResult > } didRangeBeaconsInRegion ( ) : Observable < IBeaconPluginResult > ; returns { Observable < IBeaconPluginResult > } didStartMonitoringForRegion ( ) : Observable < IBeaconPluginResult > ; returns { Observable < IBeaconPluginResult > } monitoringDidFailForRegionWithError ( ) : Observable < IBeaconPluginResult > ; returns { Observable < IBeaconPluginResult > } peripheralManagerDidStartAdvertising ( ) : Observable < IBeaconPluginResult > ; returns { Observable < IBeaconPluginResult > } peripheralManagerDidUpdateState ( ) : Observable < IBeaconPluginResult > ; } export class IBeaconMock extends IBeacon { /**
     * Instances of this class are delegates between the  LocationManager and
     * the code that consumes the messages generated on in the native layer.
     *
     *  returns { IBeaconDelegate } Delegate ( ) { let response ; return response ; } ; param { String } identifier see { CLRegion } param { String } uuid param { Number } major param { Number } minor param { BOOL } notifyEntryStateOnDisplay returns { BeaconRegion } BeaconRegion ( identifer , uuid , major ? , minor ? , notifyEntryStateOnDisplay ? ) { let response ; return response ; } ; returns { IBeaconDelegate } getDelegate ( ) { let response ; return response ; } ; param { IBeaconDelegate } delegate returns { IBeaconDelegate } setDelegate ( delegate ) { let response ; return response ; } ; returns { Promise < any > } onDomDelegateReady ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < boolean > } isBluetoothEnabled ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; returns { Promise < any > } enableBluetooth ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } disableBluetooth ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { Region } region returns { Promise < string > } startMonitoringForRegion ( region ) { let response = '' ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; param { Region } region returns { Promise < any > } stopMonitoringForRegion ( region ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { Region } region returns { Promise < any > } requestStateForRegion ( region ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { Region } region returns { Promise < any > } startRangingBeaconsInRegion ( region ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { Region } region returns { Promise < any > } stopRangingBeaconsInRegion ( region ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < IBeaconPluginResult > } getAuthorizationStatus ( ) { let response ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; returns { Promise < any > } requestWhenInUseAuthorization ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } requestAlwaysAuthorization ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < Region [ ] > } getMonitoredRegions ( ) { let response = [ ] ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; returns { Promise < Region [ ] > } getRangedRegions ( ) { let response = [ ] ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; returns { Promise < boolean > } isRangingAvailable ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; param { Region } region returns { Promise < boolean > } isMonitoringAvailableForClass ( region ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; param { Region } region param { Integer } measuredPower returns { Promise < any > } startAdvertising ( region , measuredPower ? ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } stopAdvertising ( region ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } isAdvertisingAvailable ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; returns { Promise < any > } isAdvertising ( ) { let response = true ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; returns { Promise < any > } disableDebugLogs ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } enableDebugNotifications ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } disableDebugNotifications ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } enableDebugLogs ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { String } message returns { Promise < any > } appendToDeviceLog ( message ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; }