@woosmap/react-native-plugin-geofencing 0.1.25 → 0.2.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.
Files changed (70) hide show
  1. package/android/build.gradle +3 -3
  2. package/android/src/main/java/com/reactnativeplugingeofencing/AbstractPushHelper.java +7 -0
  3. package/android/src/main/java/com/reactnativeplugingeofencing/AirshipPushHelper.java +157 -0
  4. package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingModule.java +4 -0
  5. package/android/src/main/java/com/reactnativeplugingeofencing/WoosRegionReadyListener.java +8 -1
  6. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapMessageAndKey.java +1 -0
  7. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapUtil.java +17 -0
  8. package/ios/AirshipEvents.swift +48 -12
  9. package/ios/PluginGeofencing.swift +64 -54
  10. package/ios/WoosmapGeofenceService.swift +14 -13
  11. package/lib/commonjs/index.js +333 -0
  12. package/lib/commonjs/index.js.map +1 -0
  13. package/lib/commonjs/internal/Airship.js +30 -0
  14. package/lib/commonjs/internal/Airship.js.map +1 -0
  15. package/lib/commonjs/internal/Location.js +45 -0
  16. package/lib/commonjs/internal/Location.js.map +1 -0
  17. package/lib/commonjs/internal/MarketingCloud.js +30 -0
  18. package/lib/commonjs/internal/MarketingCloud.js.map +1 -0
  19. package/lib/commonjs/internal/Poi.js +82 -0
  20. package/lib/commonjs/internal/Poi.js.map +1 -0
  21. package/lib/commonjs/internal/Region.js +57 -0
  22. package/lib/commonjs/internal/Region.js.map +1 -0
  23. package/lib/commonjs/internal/Visit.js +41 -0
  24. package/lib/commonjs/internal/Visit.js.map +1 -0
  25. package/lib/commonjs/internal/Zoi.js +77 -0
  26. package/lib/commonjs/internal/Zoi.js.map +1 -0
  27. package/lib/commonjs/internal/nativeInterface.js +14 -0
  28. package/lib/commonjs/internal/nativeInterface.js.map +1 -0
  29. package/lib/commonjs/internal/types.js +2 -0
  30. package/lib/commonjs/internal/types.js.map +1 -0
  31. package/{src/index.tsx → lib/module/index.js} +73 -123
  32. package/lib/module/index.js.map +1 -0
  33. package/lib/module/internal/Airship.js +28 -0
  34. package/lib/module/internal/Airship.js.map +1 -0
  35. package/lib/module/internal/Location.js +38 -0
  36. package/lib/module/internal/Location.js.map +1 -0
  37. package/lib/module/internal/MarketingCloud.js +28 -0
  38. package/lib/module/internal/MarketingCloud.js.map +1 -0
  39. package/lib/module/internal/Poi.js +75 -0
  40. package/lib/module/internal/Poi.js.map +1 -0
  41. package/lib/module/internal/Region.js +50 -0
  42. package/lib/module/internal/Region.js.map +1 -0
  43. package/lib/module/internal/Visit.js +39 -0
  44. package/lib/module/internal/Visit.js.map +1 -0
  45. package/{src/internal/Zoi.tsx → lib/module/internal/Zoi.js} +24 -56
  46. package/lib/module/internal/Zoi.js.map +1 -0
  47. package/{src/internal/nativeInterface.tsx → lib/module/internal/nativeInterface.js} +1 -2
  48. package/lib/module/internal/nativeInterface.js.map +1 -0
  49. package/lib/module/internal/types.js +2 -0
  50. package/lib/module/internal/types.js.map +1 -0
  51. package/lib/typescript/__tests__/index.test.d.ts +0 -0
  52. package/lib/typescript/index.d.ts +156 -0
  53. package/lib/typescript/internal/Airship.d.ts +18 -0
  54. package/lib/typescript/internal/Location.d.ts +26 -0
  55. package/lib/typescript/internal/MarketingCloud.d.ts +18 -0
  56. package/lib/typescript/internal/Poi.d.ts +50 -0
  57. package/lib/typescript/internal/Region.d.ts +34 -0
  58. package/lib/typescript/internal/Visit.d.ts +25 -0
  59. package/lib/typescript/internal/Zoi.d.ts +49 -0
  60. package/lib/typescript/internal/nativeInterface.d.ts +2 -0
  61. package/{src/internal/types.tsx → lib/typescript/internal/types.d.ts} +5 -7
  62. package/package.json +144 -1
  63. package/react-native-plugin-geofencing.podspec +8 -1
  64. package/src/__tests__/index.test.tsx +0 -1
  65. package/src/internal/Airship.tsx +0 -24
  66. package/src/internal/Location.tsx +0 -46
  67. package/src/internal/MarketingCloud.tsx +0 -24
  68. package/src/internal/Poi.tsx +0 -107
  69. package/src/internal/Region.tsx +0 -66
  70. package/src/internal/Visit.tsx +0 -49
@@ -1,24 +0,0 @@
1
- /**
2
- * @classdesc A class that represents the Marketing Cloud object.
3
- * @constructs MarketingCloud
4
- * @param {string} name The name of the custom event.
5
- * @param {string} properties The attributes of the POI such as `name`, `address`, `zipCode` etc.
6
- */
7
- class MarketingCloud {
8
- Name: string;
9
- Properties: string;
10
- constructor(name: string, properties: string) {
11
- this.Name = name;
12
- this.Properties = properties;
13
- }
14
- /**
15
- * Converts json object to an object of type MarketingCloud.
16
- * @param {Object} json The json representation of MarketingCloud.
17
- * @returns Object
18
- * @memberof MarketingCloud
19
- */
20
- static jsonToObj(json: any) {
21
- return new MarketingCloud(json.name, json.properties);
22
- }
23
- }
24
- module.exports = MarketingCloud;
@@ -1,107 +0,0 @@
1
- /**
2
- * A class that represents the POI object.
3
- * @classdesc A class that represents the POI object.
4
- * @constructs Poi
5
- * @param {Object} jsonData A json object representing the POI.
6
- * @param {string} city The name of the city the POI belongs to.
7
- * @param {string} idstore A unique identifier for the POI.
8
- * @param {name} name The name of the POI.
9
- * @param {number} date The datetime stamp.
10
- * @param {number} distance The distance between the POI and the user's location.
11
- * @param {number} duration The duration to travel to the POI from the user's location.
12
- * @param {number} latitude The latitude of the POI.
13
- * @param {string} locationid Location id of the POI.
14
- * @param {number} longitude The longitude of the POI.
15
- * @param {string} zipcode The zip code of the POI.
16
- * @param {number} radius The radius of the POI.
17
- * @param {string} address The address of the POI.
18
- * @param {string} countrycode The countrycode of the POI.
19
- * @param {string} tags The tags for the POI.
20
- * @param {string} types The types of the POI.
21
- * @param {string} contact The contact for the POI.
22
- */
23
- class Poi {
24
- Jsondata: object;
25
- City: string;
26
- Idstore: string;
27
- Name: string;
28
- Date: number;
29
- Distance: number;
30
- Duration: number;
31
- Latitude: number;
32
- Locationid: string;
33
- Longitude: number;
34
- Zipcode: string;
35
- Radius: number;
36
- Countrycode: string;
37
- Tags: string;
38
- Types: string;
39
- Contact: string;
40
- Address: string;
41
- constructor(
42
- jsondata: object,
43
- city: string,
44
- idstore: string,
45
- name: string,
46
- date: number,
47
- distance: number,
48
- duration: number,
49
- latitude: number,
50
- locationid: string,
51
- longitude: number,
52
- zipcode: string,
53
- radius: number,
54
- address: string,
55
- countrycode: string,
56
- tags: string,
57
- types: string,
58
- contact: string
59
- ) {
60
- this.Jsondata = jsondata;
61
- this.City = city;
62
- this.Idstore = idstore;
63
- this.Name = name;
64
- this.Date = date;
65
- this.Distance = distance;
66
- this.Duration = duration;
67
- this.Latitude = latitude;
68
- this.Locationid = locationid;
69
- this.Longitude = longitude;
70
- this.Zipcode = zipcode;
71
- this.Radius = radius;
72
- this.Idstore = idstore;
73
- this.Countrycode = countrycode;
74
- this.Tags = tags;
75
- this.Types = types;
76
- this.Contact = contact;
77
- this.Address = address;
78
- }
79
- /**
80
- * Converts json object to an object of type Poi.
81
- * @param {Object} json The json representation of the Poi.
82
- * @returns Object
83
- * @memberof Poi
84
- */
85
- static jsonToObj(json: any) {
86
- return new Poi(
87
- json.jsondata,
88
- json.city,
89
- json.idstore,
90
- json.name,
91
- json.date,
92
- json.distance,
93
- json.duration,
94
- json.latitude,
95
- json.locationid,
96
- json.longitude,
97
- json.zipcode,
98
- json.radius,
99
- json.address,
100
- json.countrycode,
101
- json.tags,
102
- json.types,
103
- json.contact
104
- );
105
- }
106
- }
107
- export default Poi;
@@ -1,66 +0,0 @@
1
- /**
2
- * A class that represents the Region object.
3
- * @classdesc A class that represents the Region object.
4
- * @constructs Region
5
- * @param {number} date The datetime stamp.
6
- * @param {boolean} didEnter A boolean value indicating whether the region was entered.
7
- * @param {string} identifier An alphanumeric unique identifier for the region.
8
- * @param {number} latitude The latitude of the region.
9
- * @param {number} longitude The longitude of the region.
10
- * @param {number} radius The radius of the region in meters.
11
- * @param {boolean} frompositiondetection Determines whether the user's current position is inside the region.
12
- * @param {string} eventName Describe cause of region event, Entry or Exit.
13
- * @param {number} spenttime Number of seconds the user spent in region in case of event name Exit.
14
- */
15
- class Region {
16
- Date: number;
17
- Didenter: boolean;
18
- Identifier: string;
19
- Latitude: number;
20
- Longitude: number;
21
- Radius: number;
22
- Frompositiondetection: boolean;
23
- Eventname: string;
24
- SpentTime: number;
25
- constructor(
26
- date: number,
27
- didenter: boolean,
28
- identifier: string,
29
- latitude: number,
30
- longitude: number,
31
- radius: number,
32
- frompositiondetection: boolean,
33
- eventname: string,
34
- spenttime: number
35
- ) {
36
- this.Date = date;
37
- this.Didenter = didenter;
38
- this.Identifier = identifier;
39
- this.Latitude = latitude;
40
- this.Longitude = longitude;
41
- this.Radius = radius;
42
- this.Frompositiondetection = frompositiondetection;
43
- this.Eventname = eventname;
44
- this.SpentTime = spenttime;
45
- }
46
- /**
47
- * Converts json object to an object of type Region.
48
- * @param {Object} json The json representation of the region.
49
- * @returns Object
50
- * @memberof Region
51
- */
52
- static jsonToObj(json: any) {
53
- return new Region(
54
- json.date,
55
- json.didenter,
56
- json.identifier,
57
- json.latitude,
58
- json.longitude,
59
- json.radius,
60
- json.frompositiondetection,
61
- json.eventname,
62
- json.spenttime
63
- );
64
- }
65
- }
66
- export default Region;
@@ -1,49 +0,0 @@
1
- /**
2
- * @classdesc A class that represents the visits object.
3
- * @constructs Visit
4
- * @param {number} accuracy The accuracy in meters.
5
- * @param {number} arrivalDate The datetime stamp for the arrival at the place of visit.
6
- * @param {number} date Current datetime stamp.
7
- * @param {number} latitude The latitude of the place of visit.
8
- * @param {number} longitude The longitude of the plaee of visit.
9
- */
10
- class Visit {
11
- Accuracy: number;
12
- Arrivaldate: number;
13
- Date: number;
14
- Departuredate: number;
15
- Latitude: number;
16
- Longitude: number;
17
- constructor(
18
- accuracy: number,
19
- arrivaldate: number,
20
- date: number,
21
- departuredate: number,
22
- latitude: number,
23
- longitude: number
24
- ) {
25
- this.Accuracy = accuracy;
26
- this.Arrivaldate = arrivaldate;
27
- this.Date = date;
28
- this.Departuredate = departuredate;
29
- this.Latitude = latitude;
30
- this.Longitude = longitude;
31
- }
32
- /**
33
- * Converts json object to an object of type Visits.
34
- * @param {Object} json The json representation of the Visits.
35
- * @returns Visit
36
- * @memberof Visit
37
- */
38
- static jsonToObj(json: any): Visit {
39
- return new Visit(
40
- json.accuracy,
41
- json.arrivaldate,
42
- json.date,
43
- json.departuredate,
44
- json.latitude,
45
- json.longitude
46
- );
47
- }
48
- }
49
- module.exports = Visit;