@woosmap/react-native-plugin-geofencing 0.2.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingModule.java +135 -5
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapMessageAndKey.java +3 -0
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapTask.java +50 -3
- package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapUtil.java +35 -0
- package/ios/DataPOI.swift +6 -0
- package/ios/PluginGeofencing.m +10 -0
- package/ios/PluginGeofencing.swift +88 -0
- package/ios/WoosmapGeofenceMessage.swift +2 -0
- package/ios/WoosmapGeofenceService.swift +98 -68
- package/lib/commonjs/index.js +97 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/IndoorBeacon.js +76 -0
- package/lib/commonjs/internal/IndoorBeacon.js.map +1 -0
- package/lib/commonjs/internal/Location.js +1 -2
- package/lib/commonjs/internal/Location.js.map +1 -1
- package/lib/commonjs/internal/Poi.js +5 -4
- package/lib/commonjs/internal/Poi.js.map +1 -1
- package/lib/commonjs/internal/Region.js +1 -2
- package/lib/commonjs/internal/Region.js.map +1 -1
- package/lib/commonjs/internal/nativeInterface.js +1 -2
- package/lib/commonjs/internal/nativeInterface.js.map +1 -1
- package/lib/module/index.js +97 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/IndoorBeacon.js +70 -0
- package/lib/module/internal/IndoorBeacon.js.map +1 -0
- package/lib/module/internal/Poi.js +4 -2
- package/lib/module/internal/Poi.js.map +1 -1
- package/lib/typescript/index.d.ts +29 -1
- package/lib/typescript/internal/IndoorBeacon.d.ts +49 -0
- package/lib/typescript/internal/Poi.d.ts +2 -1
- package/package.json +3 -3
- package/react-native-plugin-geofencing.podspec +1 -1
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","uuid","PluginGeofencing","Location","Region","Poi","eventEmitter","subscriptionsLocation","subscriptionsRegion","initialize","arg0","setWoosmapApiKey","apiKey","startTracking","trackingProfile","stopTracking","requestPermissions","background","getPermissionsStatus","watchLocation","success","error","watchID","v1","toString","successCallback","result","jsonToObj","addListener","clearLocationWatch","removeAllListeners","clearAllLocationWatch","saved","removeListener","arg1","undefined","watchRegions","clearRegionsWatch","clearAllRegionsWatch","setSFMCCredentials","setPoiRadius","radius","addRegion","region","getRegions","regionID","getAllRegions","then","formatted","forEach","item","push","Promise","resolve","catch","e","reject","getLocations","locationID","getAllLocations","getLocation","getPois","poiID","getAllPois","getPoi","removeRegions","removeAllRegions","removeRegion","removeLocations","removeAllLocations","removePois","removeAllPois","startCustomTracking","sourceType","source","WoosmapGeofencing"],"sources":["index.tsx"],"sourcesContent":["import { NativeEventEmitter } from 'react-native';\nimport uuid from 'react-native-uuid';\nimport PluginGeofencing from './internal/nativeInterface';\nimport Location from './internal/Location';\nimport Region from './internal/Region';\nimport Poi from './internal/Poi';\nimport type {\n GeofenceRegion,\n RegionType,\n ProfileSource,\n} from './internal/types';\n\nconst eventEmitter = new NativeEventEmitter(PluginGeofencing);\n\nlet subscriptionsLocation: any = {};\nlet subscriptionsRegion: any = {};\n/**\n * Initializes the Woosmap object\n * @param arg0 A JSON object with Woosmap Key (optional) and tracking profile (`liveTracking`,`passiveTracking`,`visitsTracking`).\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction initialize(arg0?: any): Promise<string> {\n if (arg0 == null) {\n arg0 = {};\n }\n return PluginGeofencing.initialize(arg0);\n}\n\n/**\n * A method that sets Woosmap private API key\n * @param apiKey new API key.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction setWoosmapApiKey(apiKey: string): Promise<string> {\n return PluginGeofencing.setWoosmapApiKey([apiKey]);\n}\n\n/**\n * A method to start tracking the user's location.\n * @param trackingProfile The configuration profile to use. Values could be anyone of the following: liveTracking, passiveTracking and visitsTracking.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction startTracking(trackingProfile: string): Promise<string> {\n return PluginGeofencing.startTracking([trackingProfile]);\n}\n\n/**\n * Stops tracking the user's location.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction stopTracking(): Promise<string> {\n return PluginGeofencing.stopTracking();\n}\n\n/**\n * A method to request the required permissions to collect locations.\n * @param background - A boolean value indicating whether the permissions to request is for background or foreground permission.\n * @returns A callback that will be called on successful authorization by the app. A callback that will be called when the app denies permission. The plugin will return an object with a message - 'Permission Denied'.\n */\nfunction requestPermissions(background?: boolean): Promise<string> {\n if (background == null) {\n background = false;\n }\n return PluginGeofencing.requestPermissions([background]);\n}\n\n/**\n * A method to check if the app has granted required permissions to track location.\n * @returns A callback that will be called with the following status - GRANTED_BACKGROUND, GRANTED_FOREGROUND, DENIED\n */\nfunction getPermissionsStatus(): Promise<string> {\n return PluginGeofencing.getPermissionsStatus();\n}\n\n/**\n * Method will\ninvoke callback and pass a location object as a parameter. Method will return a watchId . This id can be used to remove a callback.\n * @param success new location found callback\n * @param error error status callback\n * @returns watchid\n */\nfunction watchLocation(\n success: (result: Location) => any,\n error?: any\n): Promise<string> {\n const watchID = uuid.v1().toString();\n\n const successCallback = (result: any) => {\n success(Location.jsonToObj(result));\n };\n\n subscriptionsLocation[watchID] = [\n eventEmitter.addListener('geolocationDidChange', successCallback),\n error ? eventEmitter.addListener('geolocationError', error) : null,\n ];\n return PluginGeofencing.watchLocation(watchID);\n}\n\n/**\n * A method to stop tracking location for a specified watch. If watchId is null or undefined the plugin will clear all watches.\n * @param watchID Reference ID.\n * @returns return promise with same id back in case of success otherwise error info\n */\nfunction clearLocationWatch(watchID?: string): Promise<string> {\n if (watchID == null) {\n eventEmitter.removeAllListeners('geolocationDidChange');\n eventEmitter.removeAllListeners('geolocationError');\n subscriptionsLocation = {};\n return PluginGeofencing.clearAllLocationWatch();\n } else {\n const saved = subscriptionsLocation[watchID];\n if (saved) {\n const arg0 = saved[0];\n eventEmitter.removeListener('geolocationDidChange', arg0);\n const arg1 = saved[1];\n if (arg1) {\n eventEmitter.removeListener('geolocationError', arg1);\n }\n subscriptionsLocation[watchID] = undefined;\n }\n return PluginGeofencing.clearLocationWatch(watchID);\n }\n}\n\n/**\n * A method to to track Regions. Method will invoke a callback with Region object. Method will return\na watch id which can be used later to remove the callback.\n * @param success new location found callback\n * @param error error status callback\n * @returns watchid\n */\nfunction watchRegions(\n success: (result: Region) => any,\n error?: any\n): Promise<string> {\n const watchID = uuid.v1().toString();\n\n const successCallback = (result: any) => {\n success(Region.jsonToObj(result));\n };\n\n subscriptionsRegion[watchID] = [\n eventEmitter.addListener('woosmapgeofenceRegionDidChange', successCallback),\n error\n ? eventEmitter.addListener('woosmapgeofenceRegionError', error)\n : null,\n ];\n return PluginGeofencing.watchRegions(watchID);\n}\n\n/**\n * A method to clear the specified watch tracing the regions. If the watchId is null or undefined then it will clear all the watches tracking the regions.\n * @param watchID Reference ID.\n * @returns return promise with same id back in case of success otherwise error info\n */\nfunction clearRegionsWatch(watchID: string): Promise<string> {\n if (watchID == null) {\n eventEmitter.removeAllListeners('woosmapgeofenceRegionDidChange');\n eventEmitter.removeAllListeners('woosmapgeofenceRegionError');\n subscriptionsRegion = {};\n return PluginGeofencing.clearAllRegionsWatch();\n } else {\n const saved = subscriptionsRegion[watchID];\n if (saved) {\n const arg0 = saved[0];\n eventEmitter.removeListener('woosmapgeofenceRegionDidChange', arg0);\n const arg1 = saved[1];\n if (arg1) {\n eventEmitter.removeListener('woosmapgeofenceRegionError', arg1);\n }\n subscriptionsRegion[watchID] = undefined;\n }\n return PluginGeofencing.clearRegionsWatch(watchID);\n }\n}\n/**\n * Sets Sales Force Marketing Cloud (SFMC) credentials\n * @param arg0 A JSON object with SFMC credentials. Keys authenticationBaseURI, restBaseURI, client_id, client_secret and contactKey are required.\n * @returns promise with A callback that will be called on success or error.\n */\nfunction setSFMCCredentials(arg0: Object): Promise<string> {\n return PluginGeofencing.setSFMCCredentials(arg0);\n}\n\n/**\n * When you create a geofence around a POI, manually define the radius value (100.0) or choose the user_properties subfield that corresponds to radius value of the geofence (\"radiusPOI\").\n * @param radius can be integer or string.\n * @returns promise with A callback that will be called on success or error.\n */\nfunction setPoiRadius(radius: string): Promise<string> {\n return PluginGeofencing.setPoiRadius(radius);\n}\n/**\n * Adds a custom region that you want to monitor.\n * @param region A GeofenceRegion object with latitude, longitude, radius and type.\n * @returns promise with A callback that will be called on success or error.\n */\n\nfunction addRegion(region: GeofenceRegion): Promise<string> {\n return PluginGeofencing.addRegion(region);\n}\n/**\n * Retrieve saved region info\n * @param regionID If it pass return info for given region or return all region info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getRegions(regionID?: string): Promise<Region[]> {\n if (regionID == null) {\n return PluginGeofencing.getAllRegions()\n .then((result: any[]) => {\n var formatted: Region[] = [];\n result.forEach((item) => {\n formatted.push(Region.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getRegions(regionID)\n .then((result: any) => {\n var formatted: Region[] = [];\n formatted.push(Region.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Retrieve saved location info\n * @param locationID - Optional in case of location id pass it return only that location info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getLocations(locationID?: string): Promise<Location[]> {\n if (locationID == null) {\n return PluginGeofencing.getAllLocations()\n .then((result: any[]) => {\n var formatted: Location[] = [];\n result.forEach((item) => {\n formatted.push(Location.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getLocation(locationID)\n .then((result: any) => {\n var formatted: Location[] = [];\n formatted.push(Location.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Retrieve saved POI info\n * @param poiID - Optional in case of poi id (LocationID or StoreID) pass it return only that POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getPois(poiID?: string): Promise<Poi[]> {\n if (poiID == null) {\n return PluginGeofencing.getAllPois()\n .then((result: any[]) => {\n var formatted: Poi[] = [];\n result.forEach((item) => {\n formatted.push(Poi.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getPoi(poiID)\n .then((result: any) => {\n var formatted: Poi[] = [];\n formatted.push(Poi.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Remove saved region info\n * @param regionID If it pass remove info for given region or removes all region info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeRegions(regionID?: string): Promise<string> {\n if (regionID == null) {\n return PluginGeofencing.removeAllRegions();\n } else {\n return PluginGeofencing.removeRegion(regionID);\n }\n}\n\n/**\n * Remove saved location info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeLocations(): Promise<string> {\n return PluginGeofencing.removeAllLocations();\n}\n\n/**\n * Remove saved POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removePois(): Promise<string> {\n return PluginGeofencing.removeAllPois();\n}\n/**\n * if preset tracking profiles don’t fit with your use cases, you can build your own profile and uses the startCustomTracking() method. \n * There are two way to host the json file:\n * - included in the client application (local)\n * - hosted externally in a file folder in your information system (external)\n * @param sourceType local/external\n * @param source location of profile to be fetch\n * @returns promise with A callback that will be called on success or error.\n */\nfunction startCustomTracking(\n sourceType: ProfileSource,\n source: string\n): Promise<string> {\n return PluginGeofencing.startCustomTracking(sourceType, source);\n}\n\nexport type {\n RegionType,\n GeofenceRegion,\n Region,\n Location,\n Poi,\n ProfileSource,\n};\n\nconst WoosmapGeofencing = {\n initialize,\n setWoosmapApiKey,\n startTracking,\n requestPermissions,\n getPermissionsStatus,\n stopTracking,\n watchLocation,\n clearLocationWatch,\n watchRegions,\n clearRegionsWatch,\n setSFMCCredentials,\n setPoiRadius,\n addRegion,\n getRegions,\n removeRegions,\n getLocations,\n removeLocations,\n getPois,\n removePois,\n startCustomTracking,\n};\n\nexport default WoosmapGeofencing;\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAOC,gBAAgB,MAAM,4BAA4B;AACzD,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,GAAG,MAAM,gBAAgB;AAOhC,MAAMC,YAAY,GAAG,IAAIN,kBAAkB,CAACE,gBAAgB,CAAC;AAE7D,IAAIK,qBAA0B,GAAG,CAAC,CAAC;AACnC,IAAIC,mBAAwB,GAAG,CAAC,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAACC,IAAU,EAAmB;EAC/C,IAAIA,IAAI,IAAI,IAAI,EAAE;IAChBA,IAAI,GAAG,CAAC,CAAC;EACX;EACA,OAAOR,gBAAgB,CAACO,UAAU,CAACC,IAAI,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAACC,MAAc,EAAmB;EACzD,OAAOV,gBAAgB,CAACS,gBAAgB,CAAC,CAACC,MAAM,CAAC,CAAC;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAACC,eAAuB,EAAmB;EAC/D,OAAOZ,gBAAgB,CAACW,aAAa,CAAC,CAACC,eAAe,CAAC,CAAC;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAAA,EAAoB;EACvC,OAAOb,gBAAgB,CAACa,YAAY,CAAC,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAAC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AAO3C,gBAAgB,CAACgE,gBAAgB,CAAC,CAAC;EAC5C,CAAC,MAAM;IACL,OAAOhE,gBAAgB,CAACiE,YAAY,CAACtB,QAAQ,CAAC;EAChD;AACF;;AAEA;AACA;AACA;AACA;AACA,SAASuB,eAAeA,CAAA,EAAoB;EAC1C,OAAOlE,gBAAgB,CAACmE,kBAAkB,CAAC,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAAA,EAAoB;EACrC,OAAOpE,gBAAgB,CAACqE,aAAa,CAAC,CAAC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,mBAAmBA,CAC1BC,UAAyB,EACzBC,MAAc,EACG;EACjB,OAAOxE,gBAAgB,CAACsE,mBAAmB,CAACC,UAAU,EAAEC,MAAM,CAAC;AACjE;AAWA,MAAMC,iBAAiB,GAAG;EACxBlE,UAAU;EACVE,gBAAgB;EAChBE,aAAa;EACbG,kBAAkB;EAClBE,oBAAoB;EACpBH,YAAY;EACZI,aAAa;EACbU,kBAAkB;EAClBO,YAAY;EACZC,iBAAiB;EACjBE,kBAAkB;EAClBC,YAAY;EACZE,SAAS;EACTE,UAAU;EACVqB,aAAa;EACbR,YAAY;EACZW,eAAe;EACfP,OAAO;EACPS,UAAU;EACVE;AACF,CAAC;AAED,eAAeG,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","Platform","uuid","PluginGeofencing","Location","Region","Poi","IndoorBeacon","eventEmitter","subscriptionsLocation","subscriptionsRegion","initialize","arg0","setWoosmapApiKey","apiKey","startTracking","trackingProfile","stopTracking","requestPermissions","background","requestBLEPermissions","OS","Promise","resolve","getPermissionsStatus","getBLEPermissionsStatus","watchLocation","success","error","watchID","v1","toString","successCallback","result","jsonToObj","addListener","clearLocationWatch","removeAllListeners","clearAllLocationWatch","saved","remove","arg1","undefined","watchRegions","clearRegionsWatch","clearAllRegionsWatch","setSFMCCredentials","setPoiRadius","radius","addRegion","region","getRegions","regionID","getAllRegions","then","formatted","forEach","item","push","catch","e","reject","getLocations","locationID","getAllLocations","getLocation","getPois","poiID","getAllPois","getPoi","removeRegions","removeAllRegions","removeRegion","removeLocations","removeAllLocations","removePois","removeAllPois","startCustomTracking","sourceType","source","getIndoorBeacons","venueID","ref","getAllIndoorBeacons","identifier","removeIndoorBeacons","WoosmapGeofencing"],"sources":["index.tsx"],"sourcesContent":["import { NativeEventEmitter, Platform } from 'react-native';\nimport uuid from 'react-native-uuid';\nimport PluginGeofencing from './internal/nativeInterface';\nimport Location from './internal/Location';\nimport Region from './internal/Region';\nimport Poi from './internal/Poi';\nimport IndoorBeacon from './internal/IndoorBeacon';\nimport type {\n GeofenceRegion,\n RegionType,\n ProfileSource,\n} from './internal/types';\n\nconst eventEmitter = new NativeEventEmitter(PluginGeofencing);\n\nlet subscriptionsLocation: any = {};\nlet subscriptionsRegion: any = {};\n/**\n * Initializes the Woosmap object\n * @param arg0 A JSON object with Woosmap Key (optional) and tracking profile (`liveTracking`,`passiveTracking`,`visitsTracking`).\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction initialize(arg0?: any): Promise<string> {\n if (arg0 == null) {\n arg0 = {};\n }\n return PluginGeofencing.initialize(arg0);\n}\n\n/**\n * A method that sets Woosmap private API key\n * @param apiKey new API key.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction setWoosmapApiKey(apiKey: string): Promise<string> {\n return PluginGeofencing.setWoosmapApiKey([apiKey]);\n}\n\n/**\n * A method to start tracking the user's location.\n * @param trackingProfile The configuration profile to use. Values could be anyone of the following: liveTracking, passiveTracking and visitsTracking.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction startTracking(trackingProfile: string): Promise<string> {\n return PluginGeofencing.startTracking([trackingProfile]);\n}\n\n/**\n * Stops tracking the user's location.\n * @returns promise:success - A callback function that will be called on success.\n error - A callback function that will be called on error.\n */\nfunction stopTracking(): Promise<string> {\n return PluginGeofencing.stopTracking();\n}\n\n/**\n * A method to request the required permissions to collect locations.\n * @param background - A boolean value indicating whether the permissions to request is for background or foreground permission.\n * @returns A callback that will be called on successful authorization by the app. A callback that will be called when the app denies permission. The plugin will return an object with a message - 'Permission Denied'.\n */\nfunction requestPermissions(background?: boolean): Promise<string> {\n if (background == null) {\n background = false;\n }\n return PluginGeofencing.requestPermissions([background]);\n}\n\n/**\n * A method to request the required permissions to collect locations.\n * @returns A callback that will be called on successful authorization by the app. A callback that will be called when the app denies permission.\n * The plugin will return an object with either one of the messages - BACKGROUND_LOCATION_DENIED, GRANTED, DENIED\n */\nfunction requestBLEPermissions(): Promise<string> {\n if (Platform.OS === 'android') {\n return PluginGeofencing.requestBLEPermissions();\n } else {\n return new Promise((resolve) => {\n resolve('GRANTED');\n });\n }\n}\n\n/**\n * A method to check if the app has granted required permissions to track location.\n * @returns A callback that will be called with the following status - GRANTED_BACKGROUND, GRANTED_FOREGROUND, DENIED\n */\nfunction getPermissionsStatus(): Promise<string> {\n return PluginGeofencing.getPermissionsStatus();\n}\n\n/**\n * A method to check if the app has granted required permissions to track location.\n * @returns A callback that will be called with the following status - BACKGROUND_LOCATION_DENIED, GRANTED, DENIED\n */\nfunction getBLEPermissionsStatus(): Promise<string> {\n if (Platform.OS == 'android') {\n return PluginGeofencing.getBLEPermissionsStatus();\n } else {\n return new Promise((resolve) => {\n resolve('GRANTED');\n });\n }\n}\n\n/**\n * Method will\ninvoke callback and pass a location object as a parameter. Method will return a watchId . This id can be used to remove a callback.\n * @param success new location found callback\n * @param error error status callback\n * @returns watchid\n */\nfunction watchLocation(\n success: (result: Location) => any,\n error?: any\n): Promise<string> {\n const watchID = uuid.v1().toString();\n\n const successCallback = (result: any) => {\n success(Location.jsonToObj(result));\n };\n\n subscriptionsLocation[watchID] = [\n eventEmitter.addListener('geolocationDidChange', successCallback),\n error ? eventEmitter.addListener('geolocationError', error) : null,\n ];\n return PluginGeofencing.watchLocation(watchID);\n}\n\n/**\n * A method to stop tracking location for a specified watch. If watchId is null or undefined the plugin will clear all watches.\n * @param watchID Reference ID.\n * @returns return promise with same id back in case of success otherwise error info\n */\nfunction clearLocationWatch(watchID?: string): Promise<string> {\n if (watchID == null) {\n eventEmitter.removeAllListeners('geolocationDidChange');\n eventEmitter.removeAllListeners('geolocationError');\n subscriptionsLocation = {};\n return PluginGeofencing.clearAllLocationWatch();\n } else {\n const saved = subscriptionsLocation[watchID];\n if (saved) {\n const arg0 = saved[0];\n arg0.remove();\n //eventEmitter.removeListener('geolocationDidChange', arg0);\n const arg1 = saved[1];\n if (arg1) {\n arg1.remove();\n //eventEmitter.removeListener('geolocationError', arg1);\n }\n subscriptionsLocation[watchID] = undefined;\n }\n return PluginGeofencing.clearLocationWatch(watchID);\n }\n}\n\n/**\n * A method to to track Regions. Method will invoke a callback with Region object. Method will return\na watch id which can be used later to remove the callback.\n * @param success new location found callback\n * @param error error status callback\n * @returns watchid\n */\nfunction watchRegions(\n success: (result: Region) => any,\n error?: any\n): Promise<string> {\n const watchID = uuid.v1().toString();\n\n const successCallback = (result: any) => {\n success(Region.jsonToObj(result));\n };\n\n subscriptionsRegion[watchID] = [\n eventEmitter.addListener('woosmapgeofenceRegionDidChange', successCallback),\n error\n ? eventEmitter.addListener('woosmapgeofenceRegionError', error)\n : null,\n ];\n return PluginGeofencing.watchRegions(watchID);\n}\n\n/**\n * A method to clear the specified watch tracing the regions. If the watchId is null or undefined then it will clear all the watches tracking the regions.\n * @param watchID Reference ID.\n * @returns return promise with same id back in case of success otherwise error info\n */\nfunction clearRegionsWatch(watchID: string): Promise<string> {\n if (watchID == null) {\n eventEmitter.removeAllListeners('woosmapgeofenceRegionDidChange');\n eventEmitter.removeAllListeners('woosmapgeofenceRegionError');\n subscriptionsRegion = {};\n return PluginGeofencing.clearAllRegionsWatch();\n } else {\n const saved = subscriptionsRegion[watchID];\n if (saved) {\n const arg0 = saved[0];\n arg0.remove();\n //eventEmitter.removeListener('woosmapgeofenceRegionDidChange', arg0);\n const arg1 = saved[1];\n if (arg1) {\n arg1.remove();\n //eventEmitter.removeListener('woosmapgeofenceRegionError', arg1);\n }\n subscriptionsRegion[watchID] = undefined;\n }\n return PluginGeofencing.clearRegionsWatch(watchID);\n }\n}\n/**\n * Sets Sales Force Marketing Cloud (SFMC) credentials\n * @param arg0 A JSON object with SFMC credentials. Keys authenticationBaseURI, restBaseURI, client_id, client_secret and contactKey are required.\n * @returns promise with A callback that will be called on success or error.\n */\nfunction setSFMCCredentials(arg0: Object): Promise<string> {\n return PluginGeofencing.setSFMCCredentials(arg0);\n}\n\n/**\n * When you create a geofence around a POI, manually define the radius value (100.0) or choose the user_properties subfield that corresponds to radius value of the geofence (\"radiusPOI\").\n * @param radius can be integer or string.\n * @returns promise with A callback that will be called on success or error.\n */\nfunction setPoiRadius(radius: string): Promise<string> {\n return PluginGeofencing.setPoiRadius(radius);\n}\n/**\n * Adds a custom region that you want to monitor.\n * @param region A GeofenceRegion object with latitude, longitude, radius and type.\n * @returns promise with A callback that will be called on success or error.\n */\n\nfunction addRegion(region: GeofenceRegion): Promise<string> {\n return PluginGeofencing.addRegion(region);\n}\n/**\n * Retrieve saved region info\n * @param regionID If it pass return info for given region or return all region info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getRegions(regionID?: string): Promise<Region[]> {\n if (regionID == null) {\n return PluginGeofencing.getAllRegions()\n .then((result: any[]) => {\n var formatted: Region[] = [];\n result.forEach((item) => {\n formatted.push(Region.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getRegions(regionID)\n .then((result: any) => {\n var formatted: Region[] = [];\n formatted.push(Region.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Retrieve saved location info\n * @param locationID - Optional in case of location id pass it return only that location info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getLocations(locationID?: string): Promise<Location[]> {\n if (locationID == null) {\n return PluginGeofencing.getAllLocations()\n .then((result: any[]) => {\n var formatted: Location[] = [];\n result.forEach((item) => {\n formatted.push(Location.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getLocation(locationID)\n .then((result: any) => {\n var formatted: Location[] = [];\n formatted.push(Location.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Retrieve saved POI info\n * @param poiID - Optional in case of poi id (LocationID or StoreID) pass it return only that POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getPois(poiID?: string): Promise<Poi[]> {\n if (poiID == null) {\n return PluginGeofencing.getAllPois()\n .then((result: any[]) => {\n var formatted: Poi[] = [];\n result.forEach((item) => {\n formatted.push(Poi.jsonToObj(item));\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getPoi(poiID)\n .then((result: any) => {\n var formatted: Poi[] = [];\n formatted.push(Poi.jsonToObj(result));\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Remove saved region info\n * @param regionID If it pass remove info for given region or removes all region info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeRegions(regionID?: string): Promise<string> {\n if (regionID == null) {\n return PluginGeofencing.removeAllRegions();\n } else {\n return PluginGeofencing.removeRegion(regionID);\n }\n}\n\n/**\n * Remove saved location info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeLocations(): Promise<string> {\n return PluginGeofencing.removeAllLocations();\n}\n\n/**\n * Remove saved POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removePois(): Promise<string> {\n return PluginGeofencing.removeAllPois();\n}\n/**\n * if preset tracking profiles don’t fit with your use cases, you can build your own profile and uses the startCustomTracking() method.\n * There are two way to host the json file:\n * - included in the client application (local)\n * - hosted externally in a file folder in your information system (external)\n * @param sourceType local/external\n * @param source location of profile to be fetch\n * @returns promise with A callback that will be called on success or error.\n */\nfunction startCustomTracking(\n sourceType: ProfileSource,\n source: string\n): Promise<string> {\n return PluginGeofencing.startCustomTracking(sourceType, source);\n}\n\n/**\n * Retrieve Beacon info for venue\n * @param venueID - Optional venue id\n * @param ref - Optional beacon id return by region event\n * @returns promise with A callback that will be called on success or error.\n */\nfunction getIndoorBeacons(\n venueID?: string,\n ref?: string\n): Promise<IndoorBeacon[]> {\n if (venueID == null) {\n return PluginGeofencing.getAllIndoorBeacons()\n .then((result: any[]) => {\n var formatted: IndoorBeacon[] = [];\n result.forEach((item) => {\n if (ref !== undefined) {\n if (item.identifier === ref) {\n formatted.push(IndoorBeacon.jsonToObj(item));\n }\n } else {\n formatted.push(IndoorBeacon.jsonToObj(item));\n }\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n } else {\n return PluginGeofencing.getIndoorBeacons(venueID)\n .then((result: any[]) => {\n var formatted: IndoorBeacon[] = [];\n result.forEach((item) => {\n if (ref !== undefined) {\n if (item.identifier === ref) {\n formatted.push(IndoorBeacon.jsonToObj(item));\n }\n } else {\n formatted.push(IndoorBeacon.jsonToObj(item));\n }\n });\n return Promise.resolve(formatted);\n })\n .catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\n/**\n * Remove saved POI info\n * @returns promise with A callback that will be called on success or error.\n */\nfunction removeIndoorBeacons(): Promise<string> {\n return PluginGeofencing.removeIndoorBeacons();\n}\n\nexport type {\n RegionType,\n GeofenceRegion,\n Region,\n Location,\n Poi,\n ProfileSource,\n IndoorBeacon,\n};\n\nconst WoosmapGeofencing = {\n initialize,\n setWoosmapApiKey,\n startTracking,\n requestPermissions,\n requestBLEPermissions,\n getPermissionsStatus,\n getBLEPermissionsStatus,\n stopTracking,\n watchLocation,\n clearLocationWatch,\n watchRegions,\n clearRegionsWatch,\n setSFMCCredentials,\n setPoiRadius,\n addRegion,\n getRegions,\n removeRegions,\n getLocations,\n removeLocations,\n getPois,\n removePois,\n startCustomTracking,\n getIndoorBeacons,\n removeIndoorBeacons,\n};\n\nexport default WoosmapGeofencing;\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAOC,gBAAgB,MAAM,4BAA4B;AACzD,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,YAAY,MAAM,yBAAyB;AAOlD,MAAMC,YAAY,GAAG,IAAIR,kBAAkB,CAACG,gBAAgB,CAAC;AAE7D,IAAIM,qBAA0B,GAAG,CAAC,CAAC;AACnC,IAAIC,mBAAwB,GAAG,CAAC,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAACC,IAAU,EAAmB;EAC/C,IAAIA,IAAI,IAAI,IAAI,EAAE;IAChBA,IAAI,GAAG,CAAC,CAAC;EACX;EACA,OAAOT,gBAAgB,CAACQ,UAAU,CAACC,IAAI,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAACC,MAAc,EAAmB;EACzD,OAAOX,gBAAgB,CAACU,gBAAgB,CAAC,CAACC,MAAM,CAAC,CAAC;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAACC,eAAuB,EAAmB;EAC/D,OAAOb,gBAAgB,CAACY,aAAa,CAAC,CAACC,eAAe,CAAC,CAAC;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAAA,EAAoB;EACvC,OAAOd,gBAAgB,CAACc,YAAY,CAAC,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,UAAoB,EAAmB;EACjE,IAAIA,U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A;AACA;AACA,SAASyB,mBAAmBA,CAAA,EAAoB;EAC9C,OAAOlF,gBAAgB,CAACkF,mBAAmB,CAAC,CAAC;AAC/C;AAYA,MAAMC,iBAAiB,GAAG;EACxB3E,UAAU;EACVE,gBAAgB;EAChBE,aAAa;EACbG,kBAAkB;EAClBE,qBAAqB;EACrBI,oBAAoB;EACpBC,uBAAuB;EACvBR,YAAY;EACZS,aAAa;EACbU,kBAAkB;EAClBO,YAAY;EACZC,iBAAiB;EACjBE,kBAAkB;EAClBC,YAAY;EACZE,SAAS;EACTE,UAAU;EACVmB,aAAa;EACbR,YAAY;EACZW,eAAe;EACfP,OAAO;EACPS,UAAU;EACVE,mBAAmB;EACnBG,gBAAgB;EAChBK;AACF,CAAC;AAED,eAAeC,iBAAiB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
/**
|
|
5
|
+
* Represents an indoor beacon.
|
|
6
|
+
* @class
|
|
7
|
+
* @param {string} beaconId - The ID of the beacon.
|
|
8
|
+
* @param {number} major - The major version number of the beacon.
|
|
9
|
+
* @param {number} minor - The minor version number of the beacon.
|
|
10
|
+
* @param {string} venueId - The ID of the venue where the beacon is located.
|
|
11
|
+
* @param {string} identifier - The identifier of the beacon.
|
|
12
|
+
* @param {number} latitude - The latitude coordinate of the beacon's location.
|
|
13
|
+
* @param {number} longitude - The longitude coordinate of the beacon's location.
|
|
14
|
+
* @param {number} date - The date when the beacon was created.
|
|
15
|
+
* @param {Object} properties - custom property share with beacon
|
|
16
|
+
*/
|
|
17
|
+
class IndoorBeacon {
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new instance of the Beacon class.
|
|
20
|
+
* @param {string} beaconId - The ID of the beacon.
|
|
21
|
+
* @param {number} major - The major version number of the beacon.
|
|
22
|
+
* @param {number} minor - The minor version number of the beacon.
|
|
23
|
+
* @param {string} venueId - The ID of the venue where the beacon is located.
|
|
24
|
+
* @param {string} identifier - The identifier of the beacon.
|
|
25
|
+
* @param {number} latitude - The latitude coordinate of the beacon's location.
|
|
26
|
+
* @param {number} longitude - The longitude coordinate of the beacon's location.
|
|
27
|
+
* @param {number} date - The date when the beacon was created.
|
|
28
|
+
* @param {Object} properties - custom property share with beacon
|
|
29
|
+
*/
|
|
30
|
+
constructor(beaconId, major, minor, venueId, identifier, latitude, longitude, date, properties) {
|
|
31
|
+
/// The UUID of the beacon.
|
|
32
|
+
_defineProperty(this, "beaconId", void 0);
|
|
33
|
+
/// The Major version of the beacon.
|
|
34
|
+
_defineProperty(this, "major", void 0);
|
|
35
|
+
/// The Minor version of the beacon.
|
|
36
|
+
_defineProperty(this, "minor", void 0);
|
|
37
|
+
/// The ID of the venue to which this beacon belongs to.
|
|
38
|
+
_defineProperty(this, "venueId", void 0);
|
|
39
|
+
/// Woosmap identifier of the beacon.
|
|
40
|
+
_defineProperty(this, "identifier", void 0);
|
|
41
|
+
/// Latitude of the beacon.
|
|
42
|
+
_defineProperty(this, "latitude", void 0);
|
|
43
|
+
/// Longitude of the beacon.
|
|
44
|
+
_defineProperty(this, "longitude", void 0);
|
|
45
|
+
/// The date when the beacon was added/updated.
|
|
46
|
+
_defineProperty(this, "date", void 0);
|
|
47
|
+
/// Custom properties associated to the beacon.
|
|
48
|
+
_defineProperty(this, "properties", void 0);
|
|
49
|
+
this.beaconId = beaconId;
|
|
50
|
+
this.major = major;
|
|
51
|
+
this.minor = minor;
|
|
52
|
+
this.venueId = venueId;
|
|
53
|
+
this.identifier = identifier;
|
|
54
|
+
this.latitude = latitude;
|
|
55
|
+
this.longitude = longitude;
|
|
56
|
+
this.date = date;
|
|
57
|
+
this.properties = properties;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Converts json object to an object of type IndoorBeacon.
|
|
61
|
+
* @param {Object} json The json representation of the IndoorBeacon.
|
|
62
|
+
* @returns Object
|
|
63
|
+
* @memberof Poi
|
|
64
|
+
*/
|
|
65
|
+
static jsonToObj(json) {
|
|
66
|
+
return new IndoorBeacon(json.beaconId, json.major, json.minor, json.venueId, json.identifier, json.latitude, json.longitude, json.date, json.properties);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export default IndoorBeacon;
|
|
70
|
+
//# sourceMappingURL=IndoorBeacon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IndoorBeacon","constructor","beaconId","major","minor","venueId","identifier","latitude","longitude","date","properties","_defineProperty","jsonToObj","json"],"sources":["IndoorBeacon.tsx"],"sourcesContent":["/**\n * Represents an indoor beacon.\n * @class\n * @param {string} beaconId - The ID of the beacon.\n * @param {number} major - The major version number of the beacon.\n * @param {number} minor - The minor version number of the beacon.\n * @param {string} venueId - The ID of the venue where the beacon is located.\n * @param {string} identifier - The identifier of the beacon.\n * @param {number} latitude - The latitude coordinate of the beacon's location.\n * @param {number} longitude - The longitude coordinate of the beacon's location.\n * @param {number} date - The date when the beacon was created.\n * @param {Object} properties - custom property share with beacon\n */\nclass IndoorBeacon {\n /// The UUID of the beacon.\n beaconId: string;\n\n /// The Major version of the beacon.\n major: number;\n\n /// The Minor version of the beacon.\n minor: number;\n\n /// The ID of the venue to which this beacon belongs to.\n venueId: string;\n\n /// Woosmap identifier of the beacon.\n identifier: string;\n\n /// Latitude of the beacon.\n latitude: number;\n\n /// Longitude of the beacon.\n longitude: number;\n\n /// The date when the beacon was added/updated.\n date: number;\n\n /// Custom properties associated to the beacon.\n properties: { [key: string]: any };\n\n /**\n * Creates a new instance of the Beacon class.\n * @param {string} beaconId - The ID of the beacon.\n * @param {number} major - The major version number of the beacon.\n * @param {number} minor - The minor version number of the beacon.\n * @param {string} venueId - The ID of the venue where the beacon is located.\n * @param {string} identifier - The identifier of the beacon.\n * @param {number} latitude - The latitude coordinate of the beacon's location.\n * @param {number} longitude - The longitude coordinate of the beacon's location.\n * @param {number} date - The date when the beacon was created.\n * @param {Object} properties - custom property share with beacon\n */\n constructor(\n beaconId: string,\n major: number,\n minor: number,\n venueId: string,\n identifier: string,\n latitude: number,\n longitude: number,\n date: number,\n properties: { [key: string]: any }\n ) {\n this.beaconId = beaconId;\n this.major = major;\n this.minor = minor;\n this.venueId = venueId;\n this.identifier = identifier;\n this.latitude = latitude;\n this.longitude = longitude;\n this.date = date;\n this.properties = properties;\n }\n /**\n * Converts json object to an object of type IndoorBeacon.\n * @param {Object} json The json representation of the IndoorBeacon.\n * @returns Object\n * @memberof Poi\n */\n static jsonToObj(json: any) {\n return new IndoorBeacon(\n json.beaconId,\n json.major,\n json.minor,\n json.venueId,\n json.identifier,\n json.latitude,\n json.longitude,\n json.date,\n json.properties\n );\n }\n}\nexport default IndoorBeacon;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,YAAY,CAAC;EA4BjB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,WAAWA,CACTC,QAAgB,EAChBC,KAAa,EACbC,KAAa,EACbC,OAAe,EACfC,UAAkB,EAClBC,QAAgB,EAChBC,SAAiB,EACjBC,IAAY,EACZC,UAAkC,EAClC;IAjDF;IAAAC,eAAA;IAGA;IAAAA,eAAA;IAGA;IAAAA,eAAA;IAGA;IAAAA,eAAA;IAGA;IAAAA,eAAA;IAGA;IAAAA,eAAA;IAGA;IAAAA,eAAA;IAGA;IAAAA,eAAA;IAGA;IAAAA,eAAA;IA0BE,IAAI,CAACT,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,UAAU,GAAGA,UAAU;EAC9B;EACA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOE,SAASA,CAACC,IAAS,EAAE;IAC1B,OAAO,IAAIb,YAAY,CACrBa,IAAI,CAACX,QAAQ,EACbW,IAAI,CAACV,KAAK,EACVU,IAAI,CAACT,KAAK,EACVS,IAAI,CAACR,OAAO,EACZQ,IAAI,CAACP,UAAU,EACfO,IAAI,CAACN,QAAQ,EACbM,IAAI,CAACL,SAAS,EACdK,IAAI,CAACJ,IAAI,EACTI,IAAI,CAACH,UACP,CAAC;EACH;AACF;AACA,eAAeV,YAAY"}
|
|
@@ -24,7 +24,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
24
24
|
* @param {string} contact The contact for the POI.
|
|
25
25
|
*/
|
|
26
26
|
class Poi {
|
|
27
|
-
constructor(jsondata, city, idstore, name, date, distance, duration, latitude, locationid, longitude, zipcode, radius, address, countrycode, tags, types, contact) {
|
|
27
|
+
constructor(jsondata, city, idstore, name, date, distance, duration, latitude, locationid, longitude, zipcode, radius, address, countrycode, tags, types, contact, userProperties) {
|
|
28
28
|
_defineProperty(this, "Jsondata", void 0);
|
|
29
29
|
_defineProperty(this, "City", void 0);
|
|
30
30
|
_defineProperty(this, "Idstore", void 0);
|
|
@@ -42,6 +42,7 @@ class Poi {
|
|
|
42
42
|
_defineProperty(this, "Types", void 0);
|
|
43
43
|
_defineProperty(this, "Contact", void 0);
|
|
44
44
|
_defineProperty(this, "Address", void 0);
|
|
45
|
+
_defineProperty(this, "userProperties", void 0);
|
|
45
46
|
this.Jsondata = jsondata;
|
|
46
47
|
this.City = city;
|
|
47
48
|
this.Idstore = idstore;
|
|
@@ -60,6 +61,7 @@ class Poi {
|
|
|
60
61
|
this.Types = types;
|
|
61
62
|
this.Contact = contact;
|
|
62
63
|
this.Address = address;
|
|
64
|
+
this.userProperties = userProperties;
|
|
63
65
|
}
|
|
64
66
|
/**
|
|
65
67
|
* Converts json object to an object of type Poi.
|
|
@@ -68,7 +70,7 @@ class Poi {
|
|
|
68
70
|
* @memberof Poi
|
|
69
71
|
*/
|
|
70
72
|
static jsonToObj(json) {
|
|
71
|
-
return new Poi(json.jsondata, json.city, json.idstore, json.name, json.date, json.distance, json.duration, json.latitude, json.locationid, json.longitude, json.zipcode, json.radius, json.address, json.countrycode, json.tags, json.types, json.contact);
|
|
73
|
+
return new Poi(json.jsondata, json.city, json.idstore, json.name, json.date, json.distance, json.duration, json.latitude, json.locationid, json.longitude, json.zipcode, json.radius, json.address, json.countrycode, json.tags, json.types, json.contact, json.userProperties);
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
export default Poi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Poi","constructor","jsondata","city","idstore","name","date","distance","duration","latitude","locationid","longitude","zipcode","radius","address","countrycode","tags","types","contact","_defineProperty","Jsondata","City","Idstore","Name","Date","Distance","Duration","Latitude","Locationid","Longitude","Zipcode","Radius","Countrycode","Tags","Types","Contact","Address","jsonToObj","json"],"sources":["Poi.tsx"],"sourcesContent":["/**\n * A class that represents the POI object.\n * @classdesc A class that represents the POI object.\n * @constructs Poi\n * @param {Object} jsonData A json object representing the POI.\n * @param {string} city The name of the city the POI belongs to.\n * @param {string} idstore A unique identifier for the POI.\n * @param {name} name The name of the POI.\n * @param {number} date The datetime stamp.\n * @param {number} distance The distance between the POI and the user's location.\n * @param {number} duration The duration to travel to the POI from the user's location.\n * @param {number} latitude The latitude of the POI.\n * @param {string} locationid Location id of the POI.\n * @param {number} longitude The longitude of the POI.\n * @param {string} zipcode The zip code of the POI.\n * @param {number} radius The radius of the POI.\n * @param {string} address The address of the POI.\n * @param {string} countrycode The countrycode of the POI.\n * @param {string} tags The tags for the POI.\n * @param {string} types The types of the POI.\n * @param {string} contact The contact for the POI.\n */\nclass Poi {\n Jsondata: object;\n City: string;\n Idstore: string;\n Name: string;\n Date: number;\n Distance: number;\n Duration: number;\n Latitude: number;\n Locationid: string;\n Longitude: number;\n Zipcode: string;\n Radius: number;\n Countrycode: string;\n Tags: string;\n Types: string;\n Contact: string;\n Address: string;\n constructor(\n jsondata: object,\n city: string,\n idstore: string,\n name: string,\n date: number,\n distance: number,\n duration: number,\n latitude: number,\n locationid: string,\n longitude: number,\n zipcode: string,\n radius: number,\n address: string,\n countrycode: string,\n tags: string,\n types: string,\n contact: string\n ) {\n this.Jsondata = jsondata;\n this.City = city;\n this.Idstore = idstore;\n this.Name = name;\n this.Date = date;\n this.Distance = distance;\n this.Duration = duration;\n this.Latitude = latitude;\n this.Locationid = locationid;\n this.Longitude = longitude;\n this.Zipcode = zipcode;\n this.Radius = radius;\n this.Idstore = idstore;\n this.Countrycode = countrycode;\n this.Tags = tags;\n this.Types = types;\n this.Contact = contact;\n this.Address = address;\n }\n /**\n * Converts json object to an object of type Poi.\n * @param {Object} json The json representation of the Poi.\n * @returns Object\n * @memberof Poi\n */\n static jsonToObj(json: any) {\n return new Poi(\n json.jsondata,\n json.city,\n json.idstore,\n json.name,\n json.date,\n json.distance,\n json.duration,\n json.latitude,\n json.locationid,\n json.longitude,\n json.zipcode,\n json.radius,\n json.address,\n json.countrycode,\n json.tags,\n json.types,\n json.contact\n );\n }\n}\nexport default Poi;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,GAAG,CAAC;
|
|
1
|
+
{"version":3,"names":["Poi","constructor","jsondata","city","idstore","name","date","distance","duration","latitude","locationid","longitude","zipcode","radius","address","countrycode","tags","types","contact","userProperties","_defineProperty","Jsondata","City","Idstore","Name","Date","Distance","Duration","Latitude","Locationid","Longitude","Zipcode","Radius","Countrycode","Tags","Types","Contact","Address","jsonToObj","json"],"sources":["Poi.tsx"],"sourcesContent":["/**\n * A class that represents the POI object.\n * @classdesc A class that represents the POI object.\n * @constructs Poi\n * @param {Object} jsonData A json object representing the POI.\n * @param {string} city The name of the city the POI belongs to.\n * @param {string} idstore A unique identifier for the POI.\n * @param {name} name The name of the POI.\n * @param {number} date The datetime stamp.\n * @param {number} distance The distance between the POI and the user's location.\n * @param {number} duration The duration to travel to the POI from the user's location.\n * @param {number} latitude The latitude of the POI.\n * @param {string} locationid Location id of the POI.\n * @param {number} longitude The longitude of the POI.\n * @param {string} zipcode The zip code of the POI.\n * @param {number} radius The radius of the POI.\n * @param {string} address The address of the POI.\n * @param {string} countrycode The countrycode of the POI.\n * @param {string} tags The tags for the POI.\n * @param {string} types The types of the POI.\n * @param {string} contact The contact for the POI.\n */\nclass Poi {\n Jsondata: object;\n City: string;\n Idstore: string;\n Name: string;\n Date: number;\n Distance: number;\n Duration: number;\n Latitude: number;\n Locationid: string;\n Longitude: number;\n Zipcode: string;\n Radius: number;\n Countrycode: string;\n Tags: string;\n Types: string;\n Contact: string;\n Address: string;\n userProperties: [string: any];\n constructor(\n jsondata: object,\n city: string,\n idstore: string,\n name: string,\n date: number,\n distance: number,\n duration: number,\n latitude: number,\n locationid: string,\n longitude: number,\n zipcode: string,\n radius: number,\n address: string,\n countrycode: string,\n tags: string,\n types: string,\n contact: string,\n userProperties: [string: any]\n ) {\n this.Jsondata = jsondata;\n this.City = city;\n this.Idstore = idstore;\n this.Name = name;\n this.Date = date;\n this.Distance = distance;\n this.Duration = duration;\n this.Latitude = latitude;\n this.Locationid = locationid;\n this.Longitude = longitude;\n this.Zipcode = zipcode;\n this.Radius = radius;\n this.Idstore = idstore;\n this.Countrycode = countrycode;\n this.Tags = tags;\n this.Types = types;\n this.Contact = contact;\n this.Address = address;\n this.userProperties = userProperties;\n }\n /**\n * Converts json object to an object of type Poi.\n * @param {Object} json The json representation of the Poi.\n * @returns Object\n * @memberof Poi\n */\n static jsonToObj(json: any) {\n return new Poi(\n json.jsondata,\n json.city,\n json.idstore,\n json.name,\n json.date,\n json.distance,\n json.duration,\n json.latitude,\n json.locationid,\n json.longitude,\n json.zipcode,\n json.radius,\n json.address,\n json.countrycode,\n json.tags,\n json.types,\n json.contact,\n json.userProperties\n );\n }\n}\nexport default Poi;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,GAAG,CAAC;EAmBRC,WAAWA,CACTC,QAAgB,EAChBC,IAAY,EACZC,OAAe,EACfC,IAAY,EACZC,IAAY,EACZC,QAAgB,EAChBC,QAAgB,EAChBC,QAAgB,EAChBC,UAAkB,EAClBC,SAAiB,EACjBC,OAAe,EACfC,MAAc,EACdC,OAAe,EACfC,WAAmB,EACnBC,IAAY,EACZC,KAAa,EACbC,OAAe,EACfC,cAA6B,EAC7B;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACA,IAAI,CAACC,QAAQ,GAAGnB,QAAQ;IACxB,IAAI,CAACoB,IAAI,GAAGnB,IAAI;IAChB,IAAI,CAACoB,OAAO,GAAGnB,OAAO;IACtB,IAAI,CAACoB,IAAI,GAAGnB,IAAI;IAChB,IAAI,CAACoB,IAAI,GAAGnB,IA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Location from './internal/Location';
|
|
2
2
|
import Region from './internal/Region';
|
|
3
3
|
import Poi from './internal/Poi';
|
|
4
|
+
import IndoorBeacon from './internal/IndoorBeacon';
|
|
4
5
|
import type { GeofenceRegion, RegionType, ProfileSource } from './internal/types';
|
|
5
6
|
/**
|
|
6
7
|
* Initializes the Woosmap object
|
|
@@ -35,11 +36,22 @@ declare function stopTracking(): Promise<string>;
|
|
|
35
36
|
* @returns A callback that will be called on successful authorization by the app. A callback that will be called when the app denies permission. The plugin will return an object with a message - 'Permission Denied'.
|
|
36
37
|
*/
|
|
37
38
|
declare function requestPermissions(background?: boolean): Promise<string>;
|
|
39
|
+
/**
|
|
40
|
+
* A method to request the required permissions to collect locations.
|
|
41
|
+
* @returns A callback that will be called on successful authorization by the app. A callback that will be called when the app denies permission.
|
|
42
|
+
* The plugin will return an object with either one of the messages - BACKGROUND_LOCATION_DENIED, GRANTED, DENIED
|
|
43
|
+
*/
|
|
44
|
+
declare function requestBLEPermissions(): Promise<string>;
|
|
38
45
|
/**
|
|
39
46
|
* A method to check if the app has granted required permissions to track location.
|
|
40
47
|
* @returns A callback that will be called with the following status - GRANTED_BACKGROUND, GRANTED_FOREGROUND, DENIED
|
|
41
48
|
*/
|
|
42
49
|
declare function getPermissionsStatus(): Promise<string>;
|
|
50
|
+
/**
|
|
51
|
+
* A method to check if the app has granted required permissions to track location.
|
|
52
|
+
* @returns A callback that will be called with the following status - BACKGROUND_LOCATION_DENIED, GRANTED, DENIED
|
|
53
|
+
*/
|
|
54
|
+
declare function getBLEPermissionsStatus(): Promise<string>;
|
|
43
55
|
/**
|
|
44
56
|
* Method will
|
|
45
57
|
invoke callback and pass a location object as a parameter. Method will return a watchId . This id can be used to remove a callback.
|
|
@@ -130,13 +142,27 @@ declare function removePois(): Promise<string>;
|
|
|
130
142
|
* @returns promise with A callback that will be called on success or error.
|
|
131
143
|
*/
|
|
132
144
|
declare function startCustomTracking(sourceType: ProfileSource, source: string): Promise<string>;
|
|
133
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Retrieve Beacon info for venue
|
|
147
|
+
* @param venueID - Optional venue id
|
|
148
|
+
* @param ref - Optional beacon id return by region event
|
|
149
|
+
* @returns promise with A callback that will be called on success or error.
|
|
150
|
+
*/
|
|
151
|
+
declare function getIndoorBeacons(venueID?: string, ref?: string): Promise<IndoorBeacon[]>;
|
|
152
|
+
/**
|
|
153
|
+
* Remove saved POI info
|
|
154
|
+
* @returns promise with A callback that will be called on success or error.
|
|
155
|
+
*/
|
|
156
|
+
declare function removeIndoorBeacons(): Promise<string>;
|
|
157
|
+
export type { RegionType, GeofenceRegion, Region, Location, Poi, ProfileSource, IndoorBeacon, };
|
|
134
158
|
declare const WoosmapGeofencing: {
|
|
135
159
|
initialize: typeof initialize;
|
|
136
160
|
setWoosmapApiKey: typeof setWoosmapApiKey;
|
|
137
161
|
startTracking: typeof startTracking;
|
|
138
162
|
requestPermissions: typeof requestPermissions;
|
|
163
|
+
requestBLEPermissions: typeof requestBLEPermissions;
|
|
139
164
|
getPermissionsStatus: typeof getPermissionsStatus;
|
|
165
|
+
getBLEPermissionsStatus: typeof getBLEPermissionsStatus;
|
|
140
166
|
stopTracking: typeof stopTracking;
|
|
141
167
|
watchLocation: typeof watchLocation;
|
|
142
168
|
clearLocationWatch: typeof clearLocationWatch;
|
|
@@ -152,5 +178,7 @@ declare const WoosmapGeofencing: {
|
|
|
152
178
|
getPois: typeof getPois;
|
|
153
179
|
removePois: typeof removePois;
|
|
154
180
|
startCustomTracking: typeof startCustomTracking;
|
|
181
|
+
getIndoorBeacons: typeof getIndoorBeacons;
|
|
182
|
+
removeIndoorBeacons: typeof removeIndoorBeacons;
|
|
155
183
|
};
|
|
156
184
|
export default WoosmapGeofencing;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an indoor beacon.
|
|
3
|
+
* @class
|
|
4
|
+
* @param {string} beaconId - The ID of the beacon.
|
|
5
|
+
* @param {number} major - The major version number of the beacon.
|
|
6
|
+
* @param {number} minor - The minor version number of the beacon.
|
|
7
|
+
* @param {string} venueId - The ID of the venue where the beacon is located.
|
|
8
|
+
* @param {string} identifier - The identifier of the beacon.
|
|
9
|
+
* @param {number} latitude - The latitude coordinate of the beacon's location.
|
|
10
|
+
* @param {number} longitude - The longitude coordinate of the beacon's location.
|
|
11
|
+
* @param {number} date - The date when the beacon was created.
|
|
12
|
+
* @param {Object} properties - custom property share with beacon
|
|
13
|
+
*/
|
|
14
|
+
declare class IndoorBeacon {
|
|
15
|
+
beaconId: string;
|
|
16
|
+
major: number;
|
|
17
|
+
minor: number;
|
|
18
|
+
venueId: string;
|
|
19
|
+
identifier: string;
|
|
20
|
+
latitude: number;
|
|
21
|
+
longitude: number;
|
|
22
|
+
date: number;
|
|
23
|
+
properties: {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new instance of the Beacon class.
|
|
28
|
+
* @param {string} beaconId - The ID of the beacon.
|
|
29
|
+
* @param {number} major - The major version number of the beacon.
|
|
30
|
+
* @param {number} minor - The minor version number of the beacon.
|
|
31
|
+
* @param {string} venueId - The ID of the venue where the beacon is located.
|
|
32
|
+
* @param {string} identifier - The identifier of the beacon.
|
|
33
|
+
* @param {number} latitude - The latitude coordinate of the beacon's location.
|
|
34
|
+
* @param {number} longitude - The longitude coordinate of the beacon's location.
|
|
35
|
+
* @param {number} date - The date when the beacon was created.
|
|
36
|
+
* @param {Object} properties - custom property share with beacon
|
|
37
|
+
*/
|
|
38
|
+
constructor(beaconId: string, major: number, minor: number, venueId: string, identifier: string, latitude: number, longitude: number, date: number, properties: {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Converts json object to an object of type IndoorBeacon.
|
|
43
|
+
* @param {Object} json The json representation of the IndoorBeacon.
|
|
44
|
+
* @returns Object
|
|
45
|
+
* @memberof Poi
|
|
46
|
+
*/
|
|
47
|
+
static jsonToObj(json: any): IndoorBeacon;
|
|
48
|
+
}
|
|
49
|
+
export default IndoorBeacon;
|
|
@@ -38,7 +38,8 @@ declare class Poi {
|
|
|
38
38
|
Types: string;
|
|
39
39
|
Contact: string;
|
|
40
40
|
Address: string;
|
|
41
|
-
|
|
41
|
+
userProperties: [string: any];
|
|
42
|
+
constructor(jsondata: object, city: string, idstore: string, name: string, date: number, distance: number, duration: number, latitude: number, locationid: string, longitude: number, zipcode: string, radius: number, address: string, countrycode: string, tags: string, types: string, contact: string, userProperties: [string: any]);
|
|
42
43
|
/**
|
|
43
44
|
* Converts json object to an object of type Poi.
|
|
44
45
|
* @param {Object} json The json representation of the Poi.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@woosmap/react-native-plugin-geofencing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "This react-native plugin extends the functionality offered by the Woosmap Geofencing Mobile SDKs. Find more about the Woosmap Geofencing SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@release-it/conventional-changelog": "^2.0.0",
|
|
47
47
|
"@types/jest": "^26.0.0",
|
|
48
48
|
"@types/react": "^16.9.19",
|
|
49
|
-
"@types/react-native": "0.
|
|
49
|
+
"@types/react-native": "^0.72.3",
|
|
50
50
|
"commitlint": "^11.0.0",
|
|
51
51
|
"eslint": "^7.2.0",
|
|
52
52
|
"eslint-config-prettier": "^7.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"jest": "^26.0.1",
|
|
56
56
|
"pod-install": "^0.1.0",
|
|
57
57
|
"prettier": "^2.0.5",
|
|
58
|
-
"react": "
|
|
58
|
+
"react": "^18.2.0",
|
|
59
59
|
"react-native": "^0.68.1",
|
|
60
60
|
"react-native-builder-bob": "^0.18.0",
|
|
61
61
|
"release-it": "^14.2.2",
|