@woosmap/react-native-plugin-geofencing 0.3.0 → 0.4.1

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.
Files changed (32) hide show
  1. package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingModule.java +52 -6
  2. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapMessageAndKey.java +1 -0
  3. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapTask.java +50 -3
  4. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapUtil.java +35 -0
  5. package/ios/DataPOI.swift +7 -1
  6. package/ios/PluginGeofencing.m +10 -0
  7. package/ios/PluginGeofencing.swift +88 -0
  8. package/ios/WoosmapGeofenceMessage.swift +2 -0
  9. package/ios/WoosmapGeofenceService.swift +37 -6
  10. package/lib/commonjs/index.js +70 -12
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/internal/IndoorBeacon.js +76 -0
  13. package/lib/commonjs/internal/IndoorBeacon.js.map +1 -0
  14. package/lib/commonjs/internal/Location.js +1 -2
  15. package/lib/commonjs/internal/Location.js.map +1 -1
  16. package/lib/commonjs/internal/Poi.js +5 -4
  17. package/lib/commonjs/internal/Poi.js.map +1 -1
  18. package/lib/commonjs/internal/Region.js +1 -2
  19. package/lib/commonjs/internal/Region.js.map +1 -1
  20. package/lib/commonjs/internal/nativeInterface.js +1 -2
  21. package/lib/commonjs/internal/nativeInterface.js.map +1 -1
  22. package/lib/module/index.js +69 -10
  23. package/lib/module/index.js.map +1 -1
  24. package/lib/module/internal/IndoorBeacon.js +70 -0
  25. package/lib/module/internal/IndoorBeacon.js.map +1 -0
  26. package/lib/module/internal/Poi.js +4 -2
  27. package/lib/module/internal/Poi.js.map +1 -1
  28. package/lib/typescript/index.d.ts +16 -1
  29. package/lib/typescript/internal/IndoorBeacon.d.ts +49 -0
  30. package/lib/typescript/internal/Poi.d.ts +2 -1
  31. package/package.json +3 -3
  32. package/react-native-plugin-geofencing.podspec +1 -1
@@ -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;E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AAOuB,SAASA,CAACC,IAAS,EAAE;IAC1B,OAAO,IAAItC,GAAG,CACZsC,IAAI,CAACpC,QAAQ,EACboC,IAAI,CAACnC,IAAI,EACTmC,IAAI,CAAClC,OAAO,EACZkC,IAAI,CAACjC,IAAI,EACTiC,IAAI,CAAChC,IAAI,EACTgC,IAAI,CAAC/B,QAAQ,EACb+B,IAAI,CAAC9B,QAAQ,EACb8B,IAAI,CAAC7B,QAAQ,EACb6B,IAAI,CAAC5B,UAAU,EACf4B,IAAI,CAAC3B,SAAS,EACd2B,IAAI,CAAC1B,OAAO,EACZ0B,IAAI,CAACzB,MAAM,EACXyB,IAAI,CAACxB,OAAO,EACZwB,IAAI,CAACvB,WAAW,EAChBuB,IAAI,CAACtB,IAAI,EACTsB,IAAI,CAACrB,KAAK,EACVqB,IAAI,CAACpB,OACP,CAAC;EACH;AACF;AACA,eAAelB,GAAG"}
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,SA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C,QAAQ,EACbqC,IAAI,CAACpC,IAAI,EACToC,IAAI,CAACnC,OAAO,EACZmC,IAAI,CAAClC,IAAI,EACTkC,IAAI,CAACjC,IAAI,EACTiC,IAAI,CAAChC,QAAQ,EACbgC,IAAI,CAAC/B,QAAQ,EACb+B,IAAI,CAAC9B,QAAQ,EACb8B,IAAI,CAAC7B,UAAU,EACf6B,IAAI,CAAC5B,SAAS,EACd4B,IAAI,CAAC3B,OAAO,EACZ2B,IAAI,CAAC1B,MAAM,EACX0B,IAAI,CAACzB,OAAO,EACZyB,IAAI,CAACxB,WAAW,EAChBwB,IAAI,CAACvB,IAAI,EACTuB,IAAI,CAACtB,KAAK,EACVsB,IAAI,CAACrB,OAAO,EACZqB,IAAI,CAACpB,cACP,CAAC;EACH;AACF;AACA,eAAenB,GAAG"}
@@ -1,6 +1,7 @@
1
1
  import 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
@@ -141,7 +142,19 @@ declare function removePois(): Promise<string>;
141
142
  * @returns promise with A callback that will be called on success or error.
142
143
  */
143
144
  declare function startCustomTracking(sourceType: ProfileSource, source: string): Promise<string>;
144
- export type { RegionType, GeofenceRegion, Region, Location, Poi, ProfileSource, };
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, };
145
158
  declare const WoosmapGeofencing: {
146
159
  initialize: typeof initialize;
147
160
  setWoosmapApiKey: typeof setWoosmapApiKey;
@@ -165,5 +178,7 @@ declare const WoosmapGeofencing: {
165
178
  getPois: typeof getPois;
166
179
  removePois: typeof removePois;
167
180
  startCustomTracking: typeof startCustomTracking;
181
+ getIndoorBeacons: typeof getIndoorBeacons;
182
+ removeIndoorBeacons: typeof removeIndoorBeacons;
168
183
  };
169
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
- 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);
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.0",
3
+ "version": "0.4.1",
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.62.13",
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": "16.13.1",
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",
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
17
17
 
18
18
  s.dependency "React-Core"
19
- s.dependency "WoosmapGeofencing", '~> 4.0.0'
19
+ s.dependency "WoosmapGeofencing", '~> 4.0'
20
20
  s.default_subspec = :default
21
21
 
22
22
  s.subspec "default" do |spec|