@woosmap/react-native-plugin-geofencing 0.1.2

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 (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +340 -0
  3. package/android/.gradle/7.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  4. package/android/.gradle/7.1.1/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/7.1.1/executionHistory/executionHistory.lock +0 -0
  6. package/android/.gradle/7.1.1/fileChanges/last-build.bin +0 -0
  7. package/android/.gradle/7.1.1/fileHashes/fileHashes.lock +0 -0
  8. package/android/.gradle/7.1.1/gc.properties +0 -0
  9. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  10. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  11. package/android/.gradle/checksums/checksums.lock +0 -0
  12. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  13. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  14. package/android/.gradle/vcs-1/gc.properties +0 -0
  15. package/android/build.gradle +60 -0
  16. package/android/src/main/AndroidManifest.xml +4 -0
  17. package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingModule.java +365 -0
  18. package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingPackage.java +28 -0
  19. package/android/src/main/java/com/reactnativeplugingeofencing/WoosLocationReadyListener.java +38 -0
  20. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapMessageAndKey.java +36 -0
  21. package/android/src/main/java/com/reactnativeplugingeofencing/WoosmapUtil.java +34 -0
  22. package/ios/AirshipEvents.swift +73 -0
  23. package/ios/DataDistance.swift +61 -0
  24. package/ios/DataLocation.swift +36 -0
  25. package/ios/DataPOI.swift +38 -0
  26. package/ios/DataRegion.swift +78 -0
  27. package/ios/DataVisit.swift +30 -0
  28. package/ios/DataZOI.swift +22 -0
  29. package/ios/MarketingCloudEvents.swift +64 -0
  30. package/ios/MockDataVisit.swift +167 -0
  31. package/ios/PluginGeofencing-Bridging-Header.h +3 -0
  32. package/ios/PluginGeofencing.m +62 -0
  33. package/ios/PluginGeofencing.swift +688 -0
  34. package/ios/PluginGeofencing.xcodeproj/project.pbxproj +293 -0
  35. package/ios/WoosmapGeofenceMessage.swift +40 -0
  36. package/ios/WoosmapGeofenceService.swift +474 -0
  37. package/ios/WoosmapGeofencingPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  38. package/ios/WoosmapGeofencingPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  39. package/ios/WoosmapGeofencingPlugin.xcodeproj/project.xcworkspace/xcuserdata/saturn.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  40. package/ios/WoosmapGeofencingPlugin.xcodeproj/xcuserdata/saturn.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  41. package/lib/commonjs/Airship.js +35 -0
  42. package/lib/commonjs/Airship.js.map +1 -0
  43. package/lib/commonjs/Location.js +54 -0
  44. package/lib/commonjs/Location.js.map +1 -0
  45. package/lib/commonjs/MarketingCloud.js +35 -0
  46. package/lib/commonjs/MarketingCloud.js.map +1 -0
  47. package/lib/commonjs/Poi.js +96 -0
  48. package/lib/commonjs/Poi.js.map +1 -0
  49. package/lib/commonjs/Region.js +62 -0
  50. package/lib/commonjs/Region.js.map +1 -0
  51. package/lib/commonjs/Visit.js +50 -0
  52. package/lib/commonjs/Visit.js.map +1 -0
  53. package/lib/commonjs/Zoi.js +97 -0
  54. package/lib/commonjs/Zoi.js.map +1 -0
  55. package/lib/commonjs/index.js +276 -0
  56. package/lib/commonjs/index.js.map +1 -0
  57. package/lib/module/Airship.js +33 -0
  58. package/lib/module/Airship.js.map +1 -0
  59. package/lib/module/Location.js +46 -0
  60. package/lib/module/Location.js.map +1 -0
  61. package/lib/module/MarketingCloud.js +33 -0
  62. package/lib/module/MarketingCloud.js.map +1 -0
  63. package/lib/module/Poi.js +94 -0
  64. package/lib/module/Poi.js.map +1 -0
  65. package/lib/module/Region.js +54 -0
  66. package/lib/module/Region.js.map +1 -0
  67. package/lib/module/Visit.js +48 -0
  68. package/lib/module/Visit.js.map +1 -0
  69. package/lib/module/Zoi.js +95 -0
  70. package/lib/module/Zoi.js.map +1 -0
  71. package/lib/module/index.js +261 -0
  72. package/lib/module/index.js.map +1 -0
  73. package/lib/typescript/Airship.d.ts +18 -0
  74. package/lib/typescript/Location.d.ts +26 -0
  75. package/lib/typescript/MarketingCloud.d.ts +18 -0
  76. package/lib/typescript/Poi.d.ts +48 -0
  77. package/lib/typescript/Region.d.ts +30 -0
  78. package/lib/typescript/Visit.d.ts +25 -0
  79. package/lib/typescript/Zoi.d.ts +49 -0
  80. package/lib/typescript/index.d.ts +97 -0
  81. package/package.json +150 -0
  82. package/react-native-plugin-geofencing.podspec +20 -0
  83. package/src/Airship.tsx +24 -0
  84. package/src/Location.tsx +46 -0
  85. package/src/MarketingCloud.tsx +24 -0
  86. package/src/Poi.tsx +106 -0
  87. package/src/Region.tsx +56 -0
  88. package/src/Visit.tsx +49 -0
  89. package/src/Zoi.tsx +107 -0
  90. package/src/index.tsx +255 -0
@@ -0,0 +1,261 @@
1
+ import { NativeModules, NativeEventEmitter } from 'react-native';
2
+ import uuid from 'react-native-uuid';
3
+ import Location from './Location';
4
+ import Region from './Region'; // const LINKING_ERROR =
5
+ // `The package 'react-native-plugin-geofencing' doesn't seem to be linked. Make sure: \n\n` +
6
+ // Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
7
+ // '- You rebuilt the app after installing the package\n' +
8
+ // '- You are not using Expo managed workflow\n';
9
+ // const PluginGeofencing = NativeModules.PluginGeofencing
10
+ // ? NativeModules.PluginGeofencing
11
+ // : new Proxy(
12
+ // {},
13
+ // {
14
+ // get() {
15
+ // throw new Error(LINKING_ERROR);
16
+ // },
17
+ // }
18
+ // );
19
+
20
+ if (!NativeModules.PluginGeofencing) {
21
+ throw new Error('NativeModules.PluginGeofencing is undefined');
22
+ }
23
+
24
+ const PluginGeofencing = NativeModules.PluginGeofencing; // ? NativeModules.PluginGeofencing
25
+ // : new Proxy(
26
+ // {},
27
+ // {
28
+ // get() {
29
+ // throw new Error(LINKING_ERROR);
30
+ // },
31
+ // }
32
+ // );
33
+
34
+ const eventEmitter = new NativeEventEmitter(PluginGeofencing);
35
+ let subscriptionsLocation = {};
36
+ let subscriptionsRegion = {};
37
+
38
+ function multiply(a, b) {
39
+ return PluginGeofencing.multiply(a, b);
40
+ }
41
+ /**
42
+ * Initializes the Woosmap object
43
+ * @param arg0 A JSON object with Woosmap Key (optional) and tracking profile (`liveTracking`,`passiveTracking`,`visitsTracking`).
44
+ * @returns promise:success - A callback function that will be called on success.
45
+ error - A callback function that will be called on error.
46
+ */
47
+
48
+
49
+ function initialize(arg0) {
50
+ if (arg0 == null) {
51
+ arg0 = {};
52
+ }
53
+
54
+ return PluginGeofencing.initialize(arg0);
55
+ }
56
+ /**
57
+ * A method that sets Woosmap private API key
58
+ * @param apiKey new API key.
59
+ * @returns promise:success - A callback function that will be called on success.
60
+ error - A callback function that will be called on error.
61
+ */
62
+
63
+
64
+ function setWoosmapApiKey(apiKey) {
65
+ return PluginGeofencing.setWoosmapApiKey([apiKey]);
66
+ }
67
+ /**
68
+ * A method to start tracking the user's location.
69
+ * @param trackingProfile The configuration profile to use. Values could be anyone of the following: liveTracking, passiveTracking and visitsTracking.
70
+ * @returns promise:success - A callback function that will be called on success.
71
+ error - A callback function that will be called on error.
72
+ */
73
+
74
+
75
+ function startTracking(trackingProfile) {
76
+ return PluginGeofencing.startTracking([trackingProfile]);
77
+ }
78
+ /**
79
+ * Stops tracking the user's location.
80
+ * @returns promise:success - A callback function that will be called on success.
81
+ error - A callback function that will be called on error.
82
+ */
83
+
84
+
85
+ function stopTracking() {
86
+ return PluginGeofencing.stopTracking();
87
+ }
88
+ /**
89
+ * A method to request the required permissions to collect locations.
90
+ * @param background - A boolean value indicating whether the permissions to request is for background or foreground permission.
91
+ * @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'.
92
+ */
93
+
94
+
95
+ function requestPermissions(background) {
96
+ if (background == null) {
97
+ background = false;
98
+ }
99
+
100
+ return PluginGeofencing.requestPermissions([background]);
101
+ }
102
+ /**
103
+ * A method to check if the app has granted required permissions to track location.
104
+ * @returns A callback that will be called with the following status - GRANTED_BACKGROUND, GRANTED_FOREGROUND, DENIED
105
+ */
106
+
107
+
108
+ function getPermissionsStatus() {
109
+ return PluginGeofencing.getPermissionsStatus();
110
+ }
111
+ /**
112
+ * Method will
113
+ invoke callback and pass a location object as a parameter. Method will return a watchId . This id can be used to remove a callback.
114
+ * @param success new location found callback
115
+ * @param error error status callback
116
+ * @returns watchid
117
+ */
118
+
119
+
120
+ function watchLocation(success, error) {
121
+ const watchID = uuid.v1().toString();
122
+
123
+ const successCallback = result => {
124
+ success(Location.jsonToObj(result));
125
+ };
126
+
127
+ subscriptionsLocation[watchID] = [eventEmitter.addListener('geolocationDidChange', successCallback), error ? eventEmitter.addListener('geolocationError', error) : null];
128
+ return PluginGeofencing.watchLocation(watchID);
129
+ }
130
+ /**
131
+ * A method to stop tracking location for a specified watch. If watchId is null or undefined the plugin will clear all watches.
132
+ * @param watchID Reference ID.
133
+ * @returns return promise with same id back in case of success otherwise error info
134
+ */
135
+
136
+
137
+ function clearLocationWatch(watchID) {
138
+ if (watchID == null) {
139
+ eventEmitter.removeAllListeners('geolocationDidChange');
140
+ eventEmitter.removeAllListeners('geolocationError');
141
+ subscriptionsLocation = {};
142
+ return PluginGeofencing.clearAllLocationWatch();
143
+ } else {
144
+ const saved = subscriptionsLocation[watchID];
145
+
146
+ if (saved) {
147
+ const arg0 = saved[0];
148
+ eventEmitter.removeListener('geolocationDidChange', arg0);
149
+ const arg1 = saved[1];
150
+
151
+ if (arg1) {
152
+ eventEmitter.removeListener('geolocationError', arg1);
153
+ }
154
+
155
+ subscriptionsLocation[watchID] = undefined;
156
+ }
157
+
158
+ return PluginGeofencing.clearLocationWatch(watchID);
159
+ }
160
+ }
161
+ /**
162
+ * A method to to track Regions. Method will invoke a callback with Region object. Method will return
163
+ a watch id which can be used later to remove the callback.
164
+ * @param success new location found callback
165
+ * @param error error status callback
166
+ * @returns watchid
167
+ */
168
+
169
+
170
+ function watchRegions(success, error) {
171
+ const watchID = uuid.v1().toString();
172
+
173
+ const successCallback = result => {
174
+ success(Region.jsonToObj(result));
175
+ };
176
+
177
+ subscriptionsRegion[watchID] = [eventEmitter.addListener('woosmapgeofenceRegionDidChange', successCallback), error ? eventEmitter.addListener('woosmapgeofenceRegionError', error) : null];
178
+ return PluginGeofencing.watchRegions(watchID);
179
+ }
180
+ /**
181
+ * 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.
182
+ * @param watchID Reference ID.
183
+ * @returns return promise with same id back in case of success otherwise error info
184
+ */
185
+
186
+
187
+ function clearRegionsWatch(watchID) {
188
+ if (watchID == null) {
189
+ eventEmitter.removeAllListeners('woosmapgeofenceRegionDidChange');
190
+ eventEmitter.removeAllListeners('woosmapgeofenceRegionError');
191
+ subscriptionsRegion = {};
192
+ return PluginGeofencing.clearAllRegionsWatch();
193
+ } else {
194
+ const saved = subscriptionsRegion[watchID];
195
+
196
+ if (saved) {
197
+ const arg0 = saved[0];
198
+ eventEmitter.removeListener('woosmapgeofenceRegionDidChange', arg0);
199
+ const arg1 = saved[1];
200
+
201
+ if (arg1) {
202
+ eventEmitter.removeListener('woosmapgeofenceRegionError', arg1);
203
+ }
204
+
205
+ subscriptionsRegion[watchID] = undefined;
206
+ }
207
+
208
+ return PluginGeofencing.clearRegionsWatch(watchID);
209
+ }
210
+ }
211
+ /**
212
+ * Sets Sales Force Marketing Cloud (SFMC) credentials
213
+ * @param arg0 A JSON object with SFMC credentials. Keys authenticationBaseURI, restBaseURI, client_id, client_secret and contactKey are required.
214
+ * @returns promise with A callback that will be called on success or error.
215
+ */
216
+
217
+
218
+ function setSFMCCredentials(arg0) {
219
+ return PluginGeofencing.setSFMCCredentials(arg0);
220
+ }
221
+ /**
222
+ * 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").
223
+ * @param radius can be integer or string.
224
+ * @returns promise with A callback that will be called on success or error.
225
+ */
226
+
227
+
228
+ function setPoiRadius(radius) {
229
+ return PluginGeofencing.setPoiRadius(radius);
230
+ }
231
+
232
+ const WoosmapGeofencing = {
233
+ multiply,
234
+ initialize,
235
+ setWoosmapApiKey,
236
+ startTracking,
237
+ requestPermissions,
238
+ getPermissionsStatus,
239
+ stopTracking,
240
+ watchLocation,
241
+ clearLocationWatch,
242
+ watchRegions,
243
+ clearRegionsWatch,
244
+ setSFMCCredentials,
245
+ setPoiRadius
246
+ };
247
+ /* We export the native interface in this way to give easy shared access to it between the
248
+ * JavaScript code and the tests
249
+ */
250
+ //let nativeEventEmitter: NativeEventEmitter | null = null;
251
+
252
+ export default WoosmapGeofencing; // module.exports = {
253
+ // WoosmapGeofencing,
254
+ // get GeolocationEventEmitter() {
255
+ // if (!nativeEventEmitter) {
256
+ // nativeEventEmitter = new NativeEventEmitter(PluginGeofencing);
257
+ // }
258
+ // return nativeEventEmitter;
259
+ // },
260
+ // };
261
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.tsx"],"names":["NativeModules","NativeEventEmitter","uuid","Location","Region","PluginGeofencing","Error","eventEmitter","subscriptionsLocation","subscriptionsRegion","multiply","a","b","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","WoosmapGeofencing"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,kBAAxB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ACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":["import { NativeModules, NativeEventEmitter } from 'react-native';\nimport uuid from 'react-native-uuid';\nimport Location from './Location';\nimport Region from './Region';\n\n// const LINKING_ERROR =\n// `The package 'react-native-plugin-geofencing' doesn't seem to be linked. Make sure: \\n\\n` +\n// Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n// '- You rebuilt the app after installing the package\\n' +\n// '- You are not using Expo managed workflow\\n';\n\n// const PluginGeofencing = NativeModules.PluginGeofencing\n// ? NativeModules.PluginGeofencing\n// : new Proxy(\n// {},\n// {\n// get() {\n// throw new Error(LINKING_ERROR);\n// },\n// }\n// );\n\nif (!NativeModules.PluginGeofencing) {\n throw new Error('NativeModules.PluginGeofencing is undefined');\n}\nconst PluginGeofencing = NativeModules.PluginGeofencing;\n// ? NativeModules.PluginGeofencing\n// : new Proxy(\n// {},\n// {\n// get() {\n// throw new Error(LINKING_ERROR);\n// },\n// }\n// );\nconst eventEmitter = new NativeEventEmitter(PluginGeofencing);\n\nlet subscriptionsLocation: any = {};\nlet subscriptionsRegion: any = {};\n\nfunction multiply(a: number, b: number): Promise<number> {\n return PluginGeofencing.multiply(a, b);\n}\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\nconst WoosmapGeofencing = {\n multiply,\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};\n\n/* We export the native interface in this way to give easy shared access to it between the\n * JavaScript code and the tests\n */\n//let nativeEventEmitter: NativeEventEmitter | null = null;\n\nexport default WoosmapGeofencing;\n// module.exports = {\n// WoosmapGeofencing,\n// get GeolocationEventEmitter() {\n// if (!nativeEventEmitter) {\n// nativeEventEmitter = new NativeEventEmitter(PluginGeofencing);\n// }\n// return nativeEventEmitter;\n// },\n// };\n"]}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @classdesc A class that represents the Airship object.
3
+ * @constructs Airship
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
+ declare class Airship {
8
+ Name: String;
9
+ Properties: String;
10
+ constructor(name: String, properties: String);
11
+ /**
12
+ * Converts json object to an object of type Airship.
13
+ * @param {Object} json The json representation of Airship.
14
+ * @returns Object
15
+ * @memberof Airship
16
+ */
17
+ static jsonToObj(json: any): Airship;
18
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @classdesc A class that represents the location object.
3
+ * @constructs Location
4
+ * @param {number} date The datetime stamp.
5
+ * @param {number} latitude The latitude of the location.
6
+
7
+ * @param {string} Locationdescription The description of the location.
8
+ * @param {string} Locationid A unique identifier for the location.
9
+ * @param {number} longitude The longitude of the location.
10
+ */
11
+ declare class Location {
12
+ Date: number;
13
+ Latitude: number;
14
+ Locationdescription: string;
15
+ Locationid: string;
16
+ Longitude: number;
17
+ constructor(date: number, latitude: number, locationdescription: string, locationid: string, longitude: number);
18
+ /**
19
+ * Converts json object to an object of type Location.
20
+ * @param {Object} json The json representation of the Location.
21
+ * @returns Object
22
+ * @memberof Location
23
+ */
24
+ static jsonToObj(json: any): Location;
25
+ }
26
+ export default Location;
@@ -0,0 +1,18 @@
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
+ declare class MarketingCloud {
8
+ Name: string;
9
+ Properties: string;
10
+ constructor(name: string, properties: string);
11
+ /**
12
+ * Converts json object to an object of type MarketingCloud.
13
+ * @param {Object} json The json representation of MarketingCloud.
14
+ * @returns Object
15
+ * @memberof MarketingCloud
16
+ */
17
+ static jsonToObj(json: any): MarketingCloud;
18
+ }
@@ -0,0 +1,48 @@
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 {number} longitude The longitude of the POI.
14
+ * @param {string} zipcode The zip code of the POI.
15
+ * @param {number} radius The radius of the POI.
16
+ * @param {string} address The address of the POI.
17
+ * @param {string} countrycode The countrycode of the POI.
18
+ * @param {string} tags The tags for the POI.
19
+ * @param {string} types The types of the POI.
20
+ * @param {string} contact The contact for the POI.
21
+ */
22
+ declare class Poi {
23
+ Jsondata: object;
24
+ City: string;
25
+ Idstore: string;
26
+ Name: string;
27
+ Date: number;
28
+ Distance: number;
29
+ Duration: number;
30
+ Latitude: number;
31
+ Locationid: number;
32
+ Longitude: number;
33
+ Zipcode: string;
34
+ Radius: number;
35
+ Countrycode: string;
36
+ Tags: string;
37
+ Types: string;
38
+ Contact: string;
39
+ Address: string;
40
+ constructor(jsondata: object, city: string, idstore: string, name: string, date: number, distance: number, duration: number, latitude: number, locationid: number, longitude: number, zipcode: string, radius: number, address: string, countrycode: string, tags: string, types: string, contact: string);
41
+ /**
42
+ * Converts json object to an object of type Poi.
43
+ * @param {Object} json The json representation of the Poi.
44
+ * @returns Object
45
+ * @memberof Poi
46
+ */
47
+ static jsonToObj(json: any): Poi;
48
+ }
@@ -0,0 +1,30 @@
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 cuurent position is inside the region.
12
+ */
13
+ declare class Region {
14
+ Date: number;
15
+ Didenter: boolean;
16
+ Identifier: string;
17
+ Latitude: number;
18
+ Longitude: number;
19
+ Radius: number;
20
+ Frompositiondetection: boolean;
21
+ constructor(date: number, didenter: boolean, identifier: string, latitude: number, longitude: number, radius: number, frompositiondetection: boolean);
22
+ /**
23
+ * Converts json object to an object of type Region.
24
+ * @param {Object} json The json representation of the region.
25
+ * @returns Object
26
+ * @memberof Region
27
+ */
28
+ static jsonToObj(json: any): Region;
29
+ }
30
+ export default Region;
@@ -0,0 +1,25 @@
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
+ declare class Visit {
11
+ Accuracy: number;
12
+ Arrivaldate: number;
13
+ Date: number;
14
+ Departuredate: number;
15
+ Latitude: number;
16
+ Longitude: number;
17
+ constructor(accuracy: number, arrivaldate: number, date: number, departuredate: number, latitude: number, longitude: number);
18
+ /**
19
+ * Converts json object to an object of type Visits.
20
+ * @param {Object} json The json representation of the Visits.
21
+ * @returns Visit
22
+ * @memberof Visit
23
+ */
24
+ static jsonToObj(json: any): Visit;
25
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @classdesc A class that represents the Zones of Interest (ZOI) object.
3
+ * @constructs Zoi
4
+ * @param {number} accumulator Represents the number of visits used to build the ZOI (only for calculation of ZOI)
5
+ * @param {number} age Age is used to determine if a ZOI should be deleted by the algorithm (only for calculation of ZOI)
6
+ * @param {number} covariance_det The covariance determinant (only for calculation of ZOI)
7
+ * @param {number} duration The duration of all the accumulated visits of the ZOI
8
+ * @param {number} endtime The exit date of the last ZOI visit
9
+ * @param {string[]} idvisits The list of id visits included in this ZOI
10
+ * @param {number} latmean The latitude of the center of the ZOI
11
+ * @param {number} lngmean The longitude of the center of the ZOI
12
+ * @param {string} period The classification of the period (HOME, WORK, OTHER or NO QUALIFIER)
13
+ * @param {number} prior_probability Estimation of probability (only for calculation of ZOI)
14
+ * @param {number} starttime The entry date for the first ZOI visit
15
+ * @param {number} weekly_density The weekly density of the ZOI visit (only for classification of ZOI)
16
+ * @param {string} wktpolygon This is the Well-known text representation of geometry of the ZOI polygon.
17
+ * @param {number} x00covariance_matrix_inverse The covariance of a cluster (only for calculation of ZOI)
18
+ * @param {number} x01covariance_matrix_inverse The covariance of a cluster (only for calculation of ZOI)
19
+ * @param {number} x10covariance_matrix_inverse The covariance of a cluster (only for calculation of ZOI)
20
+ * @param {number} x11covariance_matrix_inverse The covariance of a cluster (only for calculation of ZOI)
21
+
22
+ */
23
+ declare class Zoi {
24
+ Accumulator: number;
25
+ Age: number;
26
+ Covariance_Det: number;
27
+ Duration: number;
28
+ Endtime: number;
29
+ Idvisits: string[];
30
+ Latmean: number;
31
+ Lngmean: number;
32
+ Period: string;
33
+ Prior_Probability: number;
34
+ Starttime: number;
35
+ Weekly_Density: number;
36
+ X00Covariance_Matrix_Inverse: number;
37
+ X01Covariance_Matrix_Inverse: number;
38
+ X10Covariance_Matrix_Inverse: number;
39
+ X11Covariance_Matrix_Inverse: number;
40
+ Wktpolygon: string;
41
+ constructor(accumulator: number, age: number, covariance_det: number, duration: number, endtime: number, idvisits: string[], latmean: number, lngmean: number, period: string, prior_probability: number, starttime: number, weekly_density: number, wktpolygon: string, x00covariance_matrix_inverse: number, x01covariance_matrix_inverse: number, x10covariance_matrix_inverse: number, x11covariance_matrix_inverse: number);
42
+ /**
43
+ * Converts json object to an object of type Zoi.
44
+ * @param {Object} json The json representation of the Zoi.
45
+ * @returns Object
46
+ * @memberof Zoi
47
+ */
48
+ static jsonToObj(json: any): Zoi;
49
+ }
@@ -0,0 +1,97 @@
1
+ import Location from './Location';
2
+ import Region from './Region';
3
+ declare function multiply(a: number, b: number): Promise<number>;
4
+ /**
5
+ * Initializes the Woosmap object
6
+ * @param arg0 A JSON object with Woosmap Key (optional) and tracking profile (`liveTracking`,`passiveTracking`,`visitsTracking`).
7
+ * @returns promise:success - A callback function that will be called on success.
8
+ error - A callback function that will be called on error.
9
+ */
10
+ declare function initialize(arg0?: any): Promise<string>;
11
+ /**
12
+ * A method that sets Woosmap private API key
13
+ * @param apiKey new API key.
14
+ * @returns promise:success - A callback function that will be called on success.
15
+ error - A callback function that will be called on error.
16
+ */
17
+ declare function setWoosmapApiKey(apiKey: string): Promise<string>;
18
+ /**
19
+ * A method to start tracking the user's location.
20
+ * @param trackingProfile The configuration profile to use. Values could be anyone of the following: liveTracking, passiveTracking and visitsTracking.
21
+ * @returns promise:success - A callback function that will be called on success.
22
+ error - A callback function that will be called on error.
23
+ */
24
+ declare function startTracking(trackingProfile: string): Promise<string>;
25
+ /**
26
+ * Stops tracking the user's location.
27
+ * @returns promise:success - A callback function that will be called on success.
28
+ error - A callback function that will be called on error.
29
+ */
30
+ declare function stopTracking(): Promise<string>;
31
+ /**
32
+ * A method to request the required permissions to collect locations.
33
+ * @param background - A boolean value indicating whether the permissions to request is for background or foreground permission.
34
+ * @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'.
35
+ */
36
+ declare function requestPermissions(background?: boolean): Promise<string>;
37
+ /**
38
+ * A method to check if the app has granted required permissions to track location.
39
+ * @returns A callback that will be called with the following status - GRANTED_BACKGROUND, GRANTED_FOREGROUND, DENIED
40
+ */
41
+ declare function getPermissionsStatus(): Promise<string>;
42
+ /**
43
+ * Method will
44
+ invoke callback and pass a location object as a parameter. Method will return a watchId . This id can be used to remove a callback.
45
+ * @param success new location found callback
46
+ * @param error error status callback
47
+ * @returns watchid
48
+ */
49
+ declare function watchLocation(success: (result: Location) => any, error?: any): Promise<string>;
50
+ /**
51
+ * A method to stop tracking location for a specified watch. If watchId is null or undefined the plugin will clear all watches.
52
+ * @param watchID Reference ID.
53
+ * @returns return promise with same id back in case of success otherwise error info
54
+ */
55
+ declare function clearLocationWatch(watchID?: string): Promise<string>;
56
+ /**
57
+ * A method to to track Regions. Method will invoke a callback with Region object. Method will return
58
+ a watch id which can be used later to remove the callback.
59
+ * @param success new location found callback
60
+ * @param error error status callback
61
+ * @returns watchid
62
+ */
63
+ declare function watchRegions(success: (result: Region) => any, error?: any): Promise<string>;
64
+ /**
65
+ * 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.
66
+ * @param watchID Reference ID.
67
+ * @returns return promise with same id back in case of success otherwise error info
68
+ */
69
+ declare function clearRegionsWatch(watchID: string): Promise<string>;
70
+ /**
71
+ * Sets Sales Force Marketing Cloud (SFMC) credentials
72
+ * @param arg0 A JSON object with SFMC credentials. Keys authenticationBaseURI, restBaseURI, client_id, client_secret and contactKey are required.
73
+ * @returns promise with A callback that will be called on success or error.
74
+ */
75
+ declare function setSFMCCredentials(arg0: Object): Promise<string>;
76
+ /**
77
+ * 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").
78
+ * @param radius can be integer or string.
79
+ * @returns promise with A callback that will be called on success or error.
80
+ */
81
+ declare function setPoiRadius(radius: string): Promise<string>;
82
+ declare const WoosmapGeofencing: {
83
+ multiply: typeof multiply;
84
+ initialize: typeof initialize;
85
+ setWoosmapApiKey: typeof setWoosmapApiKey;
86
+ startTracking: typeof startTracking;
87
+ requestPermissions: typeof requestPermissions;
88
+ getPermissionsStatus: typeof getPermissionsStatus;
89
+ stopTracking: typeof stopTracking;
90
+ watchLocation: typeof watchLocation;
91
+ clearLocationWatch: typeof clearLocationWatch;
92
+ watchRegions: typeof watchRegions;
93
+ clearRegionsWatch: typeof clearRegionsWatch;
94
+ setSFMCCredentials: typeof setSFMCCredentials;
95
+ setPoiRadius: typeof setPoiRadius;
96
+ };
97
+ export default WoosmapGeofencing;