react-native-radar 3.10.4-beta.1 → 3.10.4-beta.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.
@@ -18,7 +18,7 @@ android {
18
18
  minSdkVersion 16
19
19
  targetSdkVersion 31
20
20
  versionCode 1
21
- versionName '3.10.4-beta.1'
21
+ versionName '3.10.4-beta.2'
22
22
  }
23
23
  lintOptions {
24
24
  abortOnError false
@@ -42,6 +42,8 @@ import org.json.JSONObject;
42
42
 
43
43
  import java.util.EnumSet;
44
44
  import java.util.Map;
45
+ import android.content.SharedPreferences;
46
+ import android.content.Context;
45
47
 
46
48
  public class RNRadarModule extends ReactContextBaseJavaModule implements PermissionListener {
47
49
 
@@ -53,11 +55,14 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
53
55
  private RNRadarVerifiedReceiver verifiedReceiver;
54
56
  private int listenerCount = 0;
55
57
  private boolean fraud = false;
58
+ private final ReactApplicationContext reactContext;
59
+
56
60
 
57
61
  public RNRadarModule(ReactApplicationContext reactContext) {
58
62
  super(reactContext);
59
63
  receiver = new RNRadarReceiver();
60
64
  verifiedReceiver = new RNRadarVerifiedReceiver();
65
+ this.reactContext = reactContext;
61
66
  }
62
67
 
63
68
  @ReactMethod
@@ -98,6 +103,10 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
98
103
  Radar.initialize(getReactApplicationContext(), publishableKey);
99
104
  Radar.setReceiver(receiver);
100
105
  }
106
+ SharedPreferences sharedPref = reactContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE);
107
+ SharedPreferences.Editor editor = sharedPref.edit();
108
+ editor.putString("x_platform_sdk_version", "3.10.4-beta.2");
109
+ editor.apply();
101
110
  }
102
111
 
103
112
  @ReactMethod
package/dist/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "React Native module for Radar, the leading geofencing and location tracking platform",
4
4
  "homepage": "https://radar.com",
5
5
  "license": "Apache-2.0",
6
- "version": "3.10.4-beta.1",
6
+ "version": "3.10.4-beta.2",
7
7
  "main": "dist/src/index.js",
8
8
  "files": [
9
9
  "android",
@@ -1,6 +1,6 @@
1
1
  import { Location, RadarAutocompleteOptions, RadarContextCallback, RadarAddressCallback, RadarEventChannel, RadarGetDistanceOptions, RadarLocationCallback, RadarLogConversionCallback, RadarLogConversionOptions, RadarLogLevel, RadarMockTrackingOptions, RadarNotificationOptions, RadarPermissionsStatus, RadarRouteCallback, RadarRouteMatrix, RadarSearchGeofencesCallback, RadarSearchGeofencesOptions, RadarSearchPlacesCallback, RadarSearchPlacesOptions, RadarStartTripOptions, RadarTrackCallback, RadarTrackOnceOptions, RadarTrackTokenCallback, RadarTrackingOptions, RadarTrackingOptionsDesiredAccuracy, RadarTrackingOptionsForegroundService, RadarTrackVerifiedOptions, RadarTripCallback, RadarTripOptions, RadarUpdateTripOptions, RadarVerifiedTrackingOptions, RadarListenerCallback, RadarGetMatrixOptions, RadarMetadata, RadarIPGeocodeCallback } from "./types";
2
2
  export interface RadarNativeInterface {
3
- initialize: (publishableKey: string, fraud: boolean) => void;
3
+ initialize: (publishableKey: string, fraud?: boolean) => void;
4
4
  setLogLevel: (level: RadarLogLevel) => void;
5
5
  setUserId: (userId: string) => void;
6
6
  getUserId: () => Promise<string>;
@@ -36,6 +36,15 @@ export interface RadarTrackingOptions {
36
36
  syncGeofencesLimit?: number;
37
37
  foregroundServiceEnabled?: boolean;
38
38
  }
39
+ export declare const presetContinuousIOS: RadarTrackingOptions;
40
+ export declare const presetContinuousAndroid: RadarTrackingOptions;
41
+ export declare const presetContinuous: RadarTrackingOptions;
42
+ export declare const presetResponsiveIOS: RadarTrackingOptions;
43
+ export declare const presetResponsiveAndroid: RadarTrackingOptions;
44
+ export declare const presetResponsive: RadarTrackingOptions;
45
+ export declare const presetEfficientIOS: RadarTrackingOptions;
46
+ export declare const presetEfficientAndroid: RadarTrackingOptions;
47
+ export declare const presetEfficient: RadarTrackingOptions;
39
48
  export interface RadarMockTrackingOptions {
40
49
  origin: Location;
41
50
  destination: Location;
@@ -446,5 +455,7 @@ export interface RadarTrackingOptionsForegroundService {
446
455
  importance?: number;
447
456
  id?: number;
448
457
  channelName?: string;
458
+ iconString?: string;
459
+ iconColor?: string;
449
460
  }
450
461
  export type RadarTripStatus = "unknown" | "started" | "approaching" | "arrived" | "expired" | "completed" | "canceled";
@@ -1,6 +1,139 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RadarEventVerification = exports.RadarEventConfidence = void 0;
3
+ exports.RadarEventVerification = exports.RadarEventConfidence = exports.presetEfficient = exports.presetEfficientAndroid = exports.presetEfficientIOS = exports.presetResponsive = exports.presetResponsiveAndroid = exports.presetResponsiveIOS = exports.presetContinuous = exports.presetContinuousAndroid = exports.presetContinuousIOS = void 0;
4
+ const react_native_1 = require("react-native");
5
+ exports.presetContinuousIOS = {
6
+ desiredStoppedUpdateInterval: 30,
7
+ desiredMovingUpdateInterval: 30,
8
+ desiredSyncInterval: 20,
9
+ desiredAccuracy: 'high',
10
+ stopDuration: 140,
11
+ stopDistance: 70,
12
+ replay: 'none',
13
+ useStoppedGeofence: false,
14
+ showBlueBar: true,
15
+ startTrackingAfter: undefined,
16
+ stopTrackingAfter: undefined,
17
+ stoppedGeofenceRadius: 0,
18
+ useMovingGeofence: false,
19
+ movingGeofenceRadius: 0,
20
+ syncGeofences: true,
21
+ useVisits: false,
22
+ useSignificantLocationChanges: false,
23
+ beacons: false,
24
+ sync: 'all',
25
+ };
26
+ exports.presetContinuousAndroid = {
27
+ desiredStoppedUpdateInterval: 30,
28
+ fastestStoppedUpdateInterval: 30,
29
+ desiredMovingUpdateInterval: 30,
30
+ fastestMovingUpdateInterval: 30,
31
+ desiredSyncInterval: 20,
32
+ desiredAccuracy: 'high',
33
+ stopDuration: 140,
34
+ stopDistance: 70,
35
+ replay: 'none',
36
+ sync: 'all',
37
+ useStoppedGeofence: false,
38
+ stoppedGeofenceRadius: 0,
39
+ useMovingGeofence: false,
40
+ movingGeofenceRadius: 0,
41
+ syncGeofences: true,
42
+ syncGeofencesLimit: 0,
43
+ foregroundServiceEnabled: true,
44
+ beacons: false,
45
+ startTrackingAfter: undefined,
46
+ stopTrackingAfter: undefined,
47
+ };
48
+ exports.presetContinuous = react_native_1.Platform.OS === 'ios' ? exports.presetContinuousIOS : exports.presetContinuousAndroid;
49
+ exports.presetResponsiveIOS = {
50
+ desiredStoppedUpdateInterval: 0,
51
+ desiredMovingUpdateInterval: 150,
52
+ desiredSyncInterval: 20,
53
+ desiredAccuracy: 'medium',
54
+ stopDuration: 140,
55
+ stopDistance: 70,
56
+ replay: 'stops',
57
+ useStoppedGeofence: true,
58
+ showBlueBar: false,
59
+ startTrackingAfter: undefined,
60
+ stopTrackingAfter: undefined,
61
+ stoppedGeofenceRadius: 100,
62
+ useMovingGeofence: true,
63
+ movingGeofenceRadius: 100,
64
+ syncGeofences: true,
65
+ useVisits: true,
66
+ useSignificantLocationChanges: true,
67
+ beacons: false,
68
+ sync: 'all',
69
+ };
70
+ exports.presetResponsiveAndroid = {
71
+ desiredStoppedUpdateInterval: 0,
72
+ fastestStoppedUpdateInterval: 0,
73
+ desiredMovingUpdateInterval: 150,
74
+ fastestMovingUpdateInterval: 30,
75
+ desiredSyncInterval: 20,
76
+ desiredAccuracy: "medium",
77
+ stopDuration: 140,
78
+ stopDistance: 70,
79
+ replay: 'stops',
80
+ sync: 'all',
81
+ useStoppedGeofence: true,
82
+ stoppedGeofenceRadius: 100,
83
+ useMovingGeofence: true,
84
+ movingGeofenceRadius: 100,
85
+ syncGeofences: true,
86
+ syncGeofencesLimit: 10,
87
+ foregroundServiceEnabled: false,
88
+ beacons: false,
89
+ startTrackingAfter: undefined,
90
+ stopTrackingAfter: undefined,
91
+ };
92
+ exports.presetResponsive = react_native_1.Platform.OS === 'ios' ? exports.presetResponsiveIOS : exports.presetResponsiveAndroid;
93
+ exports.presetEfficientIOS = {
94
+ desiredStoppedUpdateInterval: 0,
95
+ desiredMovingUpdateInterval: 0,
96
+ desiredSyncInterval: 0,
97
+ desiredAccuracy: "medium",
98
+ stopDuration: 0,
99
+ stopDistance: 0,
100
+ replay: 'stops',
101
+ useStoppedGeofence: false,
102
+ showBlueBar: false,
103
+ startTrackingAfter: undefined,
104
+ stopTrackingAfter: undefined,
105
+ stoppedGeofenceRadius: 0,
106
+ useMovingGeofence: false,
107
+ movingGeofenceRadius: 0,
108
+ syncGeofences: true,
109
+ useVisits: true,
110
+ useSignificantLocationChanges: false,
111
+ beacons: false,
112
+ sync: 'all',
113
+ };
114
+ exports.presetEfficientAndroid = {
115
+ desiredStoppedUpdateInterval: 3600,
116
+ fastestStoppedUpdateInterval: 1200,
117
+ desiredMovingUpdateInterval: 1200,
118
+ fastestMovingUpdateInterval: 360,
119
+ desiredSyncInterval: 140,
120
+ desiredAccuracy: 'medium',
121
+ stopDuration: 140,
122
+ stopDistance: 70,
123
+ replay: 'stops',
124
+ sync: 'all',
125
+ useStoppedGeofence: false,
126
+ stoppedGeofenceRadius: 0,
127
+ useMovingGeofence: false,
128
+ movingGeofenceRadius: 0,
129
+ syncGeofences: true,
130
+ syncGeofencesLimit: 10,
131
+ foregroundServiceEnabled: false,
132
+ beacons: false,
133
+ startTrackingAfter: undefined,
134
+ stopTrackingAfter: undefined,
135
+ };
136
+ exports.presetEfficient = react_native_1.Platform.OS === 'ios' ? exports.presetEfficientIOS : exports.presetEfficientAndroid;
4
137
  var RadarEventConfidence;
5
138
  (function (RadarEventConfidence) {
6
139
  RadarEventConfidence[RadarEventConfidence["none"] = 0] = "none";
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPublishableKey = exports.getHost = void 0;
4
- var react_native_1 = require("react-native");
4
+ const react_native_1 = require("react-native");
5
5
  if (!react_native_1.NativeModules.RNRadar && (react_native_1.Platform.OS === 'ios' || react_native_1.Platform.OS === 'android')) {
6
6
  throw new Error('NativeModules.RNRadar is undefined');
7
7
  }
8
- var getHost = function () { return (react_native_1.NativeModules.RNRadar.getHost()); };
8
+ const getHost = () => (react_native_1.NativeModules.RNRadar.getHost());
9
9
  exports.getHost = getHost;
10
- var getPublishableKey = function () { return (react_native_1.NativeModules.RNRadar.getPublishableKey()); };
10
+ const getPublishableKey = () => (react_native_1.NativeModules.RNRadar.getPublishableKey());
11
11
  exports.getPublishableKey = getPublishableKey;
package/dist/src/index.js CHANGED
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  exports.Map = exports.Autocomplete = exports.RadarRNWeb = void 0;
21
- var module;
21
+ let module;
22
22
  module = require("./index.native").default;
23
23
  exports.default = module;
24
24
  var index_web_1 = require("./index.web");
@@ -1,153 +1,77 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
- var react_native_1 = require("react-native");
15
- var package_json_1 = require("../package.json");
3
+ const react_native_1 = require("react-native");
4
+ const package_json_1 = require("../package.json");
16
5
  if (!react_native_1.NativeModules.RNRadar &&
17
6
  (react_native_1.Platform.OS === "ios" || react_native_1.Platform.OS === "android")) {
18
7
  throw new Error("NativeModules.RNRadar is undefined");
19
8
  }
20
- var eventEmitter = new react_native_1.NativeEventEmitter(react_native_1.NativeModules.RNRadar);
21
- var initialize = function (publishableKey, fraud) {
22
- if (fraud === void 0) { fraud = false; }
9
+ const eventEmitter = new react_native_1.NativeEventEmitter(react_native_1.NativeModules.RNRadar);
10
+ const initialize = (publishableKey, fraud = false) => {
23
11
  react_native_1.NativeModules.RNRadar.initialize(publishableKey, fraud);
24
12
  };
25
- var setLogLevel = function (level) {
13
+ const setLogLevel = (level) => {
26
14
  react_native_1.NativeModules.RNRadar.setLogLevel(level);
27
15
  };
28
- var setUserId = function (userId) {
16
+ const setUserId = (userId) => {
29
17
  react_native_1.NativeModules.RNRadar.setUserId(userId);
30
18
  };
31
- var getUserId = function () { return react_native_1.NativeModules.RNRadar.getUserId(); };
32
- var setDescription = function (description) {
19
+ const getUserId = () => react_native_1.NativeModules.RNRadar.getUserId();
20
+ const setDescription = (description) => {
33
21
  react_native_1.NativeModules.RNRadar.setDescription(description);
34
22
  };
35
- var getDescription = function () {
36
- return react_native_1.NativeModules.RNRadar.getDescription();
37
- };
38
- var setMetadata = function (metadata) {
23
+ const getDescription = () => react_native_1.NativeModules.RNRadar.getDescription();
24
+ const setMetadata = (metadata) => {
39
25
  react_native_1.NativeModules.RNRadar.setMetadata(metadata);
40
26
  };
41
- var getMetadata = function () {
42
- return react_native_1.NativeModules.RNRadar.getMetadata();
43
- };
44
- var setAnonymousTrackingEnabled = function (enabled) {
45
- return react_native_1.NativeModules.RNRadar.setAnonymousTrackingEnabled(enabled);
46
- };
47
- var getPermissionsStatus = function () {
48
- return react_native_1.NativeModules.RNRadar.getPermissionsStatus();
49
- };
50
- var requestPermissions = function (background) {
51
- return react_native_1.NativeModules.RNRadar.requestPermissions(background);
52
- };
53
- var getLocation = function (desiredAccuracy) {
54
- return react_native_1.NativeModules.RNRadar.getLocation(desiredAccuracy);
55
- };
56
- var trackOnce = function (options) {
57
- var backCompatibleOptions = options;
27
+ const getMetadata = () => react_native_1.NativeModules.RNRadar.getMetadata();
28
+ const setAnonymousTrackingEnabled = (enabled) => react_native_1.NativeModules.RNRadar.setAnonymousTrackingEnabled(enabled);
29
+ const getPermissionsStatus = () => react_native_1.NativeModules.RNRadar.getPermissionsStatus();
30
+ const requestPermissions = (background) => react_native_1.NativeModules.RNRadar.requestPermissions(background);
31
+ const getLocation = (desiredAccuracy) => react_native_1.NativeModules.RNRadar.getLocation(desiredAccuracy);
32
+ const trackOnce = (options) => {
33
+ let backCompatibleOptions = options;
58
34
  if (options && "latitude" in options) {
59
35
  backCompatibleOptions = {
60
- location: __assign({}, options),
36
+ location: Object.assign({}, options),
61
37
  };
62
38
  }
63
39
  return react_native_1.NativeModules.RNRadar.trackOnce(backCompatibleOptions);
64
40
  };
65
- var trackVerified = function (options) {
66
- return react_native_1.NativeModules.RNRadar.trackVerified(options);
67
- };
68
- var trackVerifiedToken = function (options) {
69
- return react_native_1.NativeModules.RNRadar.trackVerifiedToken(options);
70
- };
71
- var startTrackingEfficient = function () {
72
- return react_native_1.NativeModules.RNRadar.startTrackingEfficient();
73
- };
74
- var startTrackingResponsive = function () {
75
- return react_native_1.NativeModules.RNRadar.startTrackingResponsive();
76
- };
77
- var startTrackingContinuous = function () {
78
- return react_native_1.NativeModules.RNRadar.startTrackingContinuous();
79
- };
80
- var startTrackingCustom = function (options) {
81
- return react_native_1.NativeModules.RNRadar.startTrackingCustom(options);
82
- };
83
- var startTrackingVerified = function (options) {
84
- return react_native_1.NativeModules.RNRadar.startTrackingVerified(options);
85
- };
86
- var mockTracking = function (options) {
87
- return react_native_1.NativeModules.RNRadar.mockTracking(options);
88
- };
89
- var stopTracking = function () { return react_native_1.NativeModules.RNRadar.stopTracking(); };
90
- var getTrackingOptions = function () {
91
- return react_native_1.NativeModules.RNRadar.getTrackingOptions();
92
- };
93
- var isUsingRemoteTrackingOptions = function () {
94
- return react_native_1.NativeModules.RNRadar.isUsingRemoteTrackingOptions();
95
- };
96
- var isTracking = function () { return react_native_1.NativeModules.RNRadar.isTracking(); };
97
- var setForegroundServiceOptions = function (options) { return react_native_1.NativeModules.RNRadar.setForegroundServiceOptions(options); };
98
- var setNotificationOptions = function (options) {
99
- return react_native_1.NativeModules.RNRadar.setNotificationOptions(options);
100
- };
101
- var getTripOptions = function () {
102
- return react_native_1.NativeModules.RNRadar.getTripOptions();
103
- };
104
- var startTrip = function (options) { return react_native_1.NativeModules.RNRadar.startTrip(options); };
105
- var completeTrip = function () {
106
- return react_native_1.NativeModules.RNRadar.completeTrip();
107
- };
108
- var cancelTrip = function () {
109
- return react_native_1.NativeModules.RNRadar.cancelTrip();
110
- };
111
- var updateTrip = function (options) { return react_native_1.NativeModules.RNRadar.updateTrip(options); };
112
- var acceptEvent = function (eventId, verifiedPlaceId) {
113
- return react_native_1.NativeModules.RNRadar.acceptEvent(eventId, verifiedPlaceId);
114
- };
115
- var rejectEvent = function (eventId) {
116
- return react_native_1.NativeModules.RNRadar.rejectEvent(eventId);
117
- };
118
- var getContext = function (location) {
119
- return react_native_1.NativeModules.RNRadar.getContext(location);
120
- };
121
- var searchPlaces = function (options) {
122
- return react_native_1.NativeModules.RNRadar.searchPlaces(options);
123
- };
124
- var searchGeofences = function (options) {
125
- return react_native_1.NativeModules.RNRadar.searchGeofences(options);
126
- };
127
- var autocomplete = function (options) { return react_native_1.NativeModules.RNRadar.autocomplete(options); };
128
- var geocode = function (address) {
129
- return react_native_1.NativeModules.RNRadar.geocode(address);
130
- };
131
- var reverseGeocode = function (location) {
132
- return react_native_1.NativeModules.RNRadar.reverseGeocode(location);
133
- };
134
- var ipGeocode = function () {
135
- return react_native_1.NativeModules.RNRadar.ipGeocode();
136
- };
137
- var getDistance = function (options) { return react_native_1.NativeModules.RNRadar.getDistance(options); };
138
- var getMatrix = function (options) {
139
- return react_native_1.NativeModules.RNRadar.getMatrix(options);
140
- };
141
- var logConversion = function (options) {
142
- return react_native_1.NativeModules.RNRadar.logConversion(options);
143
- };
144
- var sendEvent = function (name, metadata) {
145
- return react_native_1.NativeModules.RNRadar.sendEvent(name, metadata);
146
- };
147
- var on = function (channel, callback) {
148
- return eventEmitter.addListener(channel, callback);
149
- };
150
- var off = function (channel, callback) {
41
+ const trackVerified = (options) => react_native_1.NativeModules.RNRadar.trackVerified(options);
42
+ const trackVerifiedToken = (options) => react_native_1.NativeModules.RNRadar.trackVerifiedToken(options);
43
+ const startTrackingEfficient = () => react_native_1.NativeModules.RNRadar.startTrackingEfficient();
44
+ const startTrackingResponsive = () => react_native_1.NativeModules.RNRadar.startTrackingResponsive();
45
+ const startTrackingContinuous = () => react_native_1.NativeModules.RNRadar.startTrackingContinuous();
46
+ const startTrackingCustom = (options) => react_native_1.NativeModules.RNRadar.startTrackingCustom(options);
47
+ const startTrackingVerified = (options) => react_native_1.NativeModules.RNRadar.startTrackingVerified(options);
48
+ const mockTracking = (options) => react_native_1.NativeModules.RNRadar.mockTracking(options);
49
+ const stopTracking = () => react_native_1.NativeModules.RNRadar.stopTracking();
50
+ const getTrackingOptions = () => react_native_1.NativeModules.RNRadar.getTrackingOptions();
51
+ const isUsingRemoteTrackingOptions = () => react_native_1.NativeModules.RNRadar.isUsingRemoteTrackingOptions();
52
+ const isTracking = () => react_native_1.NativeModules.RNRadar.isTracking();
53
+ const setForegroundServiceOptions = (options) => react_native_1.NativeModules.RNRadar.setForegroundServiceOptions(options);
54
+ const setNotificationOptions = (options) => react_native_1.NativeModules.RNRadar.setNotificationOptions(options);
55
+ const getTripOptions = () => react_native_1.NativeModules.RNRadar.getTripOptions();
56
+ const startTrip = (options) => react_native_1.NativeModules.RNRadar.startTrip(options);
57
+ const completeTrip = () => react_native_1.NativeModules.RNRadar.completeTrip();
58
+ const cancelTrip = () => react_native_1.NativeModules.RNRadar.cancelTrip();
59
+ const updateTrip = (options) => react_native_1.NativeModules.RNRadar.updateTrip(options);
60
+ const acceptEvent = (eventId, verifiedPlaceId) => react_native_1.NativeModules.RNRadar.acceptEvent(eventId, verifiedPlaceId);
61
+ const rejectEvent = (eventId) => react_native_1.NativeModules.RNRadar.rejectEvent(eventId);
62
+ const getContext = (location) => react_native_1.NativeModules.RNRadar.getContext(location);
63
+ const searchPlaces = (options) => react_native_1.NativeModules.RNRadar.searchPlaces(options);
64
+ const searchGeofences = (options) => react_native_1.NativeModules.RNRadar.searchGeofences(options);
65
+ const autocomplete = (options) => react_native_1.NativeModules.RNRadar.autocomplete(options);
66
+ const geocode = (address) => react_native_1.NativeModules.RNRadar.geocode(address);
67
+ const reverseGeocode = (location) => react_native_1.NativeModules.RNRadar.reverseGeocode(location);
68
+ const ipGeocode = () => react_native_1.NativeModules.RNRadar.ipGeocode();
69
+ const getDistance = (options) => react_native_1.NativeModules.RNRadar.getDistance(options);
70
+ const getMatrix = (options) => react_native_1.NativeModules.RNRadar.getMatrix(options);
71
+ const logConversion = (options) => react_native_1.NativeModules.RNRadar.logConversion(options);
72
+ const sendEvent = (name, metadata) => react_native_1.NativeModules.RNRadar.sendEvent(name, metadata);
73
+ const on = (channel, callback) => eventEmitter.addListener(channel, callback);
74
+ const off = (channel, callback) => {
151
75
  if (callback) {
152
76
  // @ts-ignore
153
77
  eventEmitter.removeListener(channel, callback);
@@ -156,59 +80,57 @@ var off = function (channel, callback) {
156
80
  eventEmitter.removeAllListeners(channel);
157
81
  }
158
82
  };
159
- var nativeSdkVersion = function () {
160
- return react_native_1.NativeModules.RNRadar.nativeSdkVersion();
161
- };
162
- var rnSdkVersion = function () { return package_json_1.version; };
163
- var Radar = {
164
- initialize: initialize,
165
- setLogLevel: setLogLevel,
166
- setUserId: setUserId,
167
- getUserId: getUserId,
168
- setDescription: setDescription,
169
- getDescription: getDescription,
170
- setMetadata: setMetadata,
171
- getMetadata: getMetadata,
172
- setAnonymousTrackingEnabled: setAnonymousTrackingEnabled,
173
- isUsingRemoteTrackingOptions: isUsingRemoteTrackingOptions,
174
- getPermissionsStatus: getPermissionsStatus,
175
- requestPermissions: requestPermissions,
176
- getLocation: getLocation,
177
- trackOnce: trackOnce,
178
- trackVerified: trackVerified,
179
- trackVerifiedToken: trackVerifiedToken,
180
- startTrackingEfficient: startTrackingEfficient,
181
- startTrackingResponsive: startTrackingResponsive,
182
- startTrackingContinuous: startTrackingContinuous,
183
- startTrackingCustom: startTrackingCustom,
184
- startTrackingVerified: startTrackingVerified,
185
- mockTracking: mockTracking,
186
- stopTracking: stopTracking,
187
- isTracking: isTracking,
188
- getTrackingOptions: getTrackingOptions,
189
- setForegroundServiceOptions: setForegroundServiceOptions,
190
- setNotificationOptions: setNotificationOptions,
191
- acceptEvent: acceptEvent,
192
- rejectEvent: rejectEvent,
193
- getTripOptions: getTripOptions,
194
- startTrip: startTrip,
195
- updateTrip: updateTrip,
196
- completeTrip: completeTrip,
197
- cancelTrip: cancelTrip,
198
- getContext: getContext,
199
- searchPlaces: searchPlaces,
200
- searchGeofences: searchGeofences,
201
- autocomplete: autocomplete,
202
- geocode: geocode,
203
- reverseGeocode: reverseGeocode,
204
- ipGeocode: ipGeocode,
205
- getDistance: getDistance,
206
- getMatrix: getMatrix,
207
- logConversion: logConversion,
208
- sendEvent: sendEvent,
209
- on: on,
210
- off: off,
211
- nativeSdkVersion: nativeSdkVersion,
212
- rnSdkVersion: rnSdkVersion,
83
+ const nativeSdkVersion = () => react_native_1.NativeModules.RNRadar.nativeSdkVersion();
84
+ const rnSdkVersion = () => package_json_1.version;
85
+ const Radar = {
86
+ initialize,
87
+ setLogLevel,
88
+ setUserId,
89
+ getUserId,
90
+ setDescription,
91
+ getDescription,
92
+ setMetadata,
93
+ getMetadata,
94
+ setAnonymousTrackingEnabled,
95
+ isUsingRemoteTrackingOptions,
96
+ getPermissionsStatus,
97
+ requestPermissions,
98
+ getLocation,
99
+ trackOnce,
100
+ trackVerified,
101
+ trackVerifiedToken,
102
+ startTrackingEfficient,
103
+ startTrackingResponsive,
104
+ startTrackingContinuous,
105
+ startTrackingCustom,
106
+ startTrackingVerified,
107
+ mockTracking,
108
+ stopTracking,
109
+ isTracking,
110
+ getTrackingOptions,
111
+ setForegroundServiceOptions,
112
+ setNotificationOptions,
113
+ acceptEvent,
114
+ rejectEvent,
115
+ getTripOptions,
116
+ startTrip,
117
+ updateTrip,
118
+ completeTrip,
119
+ cancelTrip,
120
+ getContext,
121
+ searchPlaces,
122
+ searchGeofences,
123
+ autocomplete,
124
+ geocode,
125
+ reverseGeocode,
126
+ ipGeocode,
127
+ getDistance,
128
+ getMatrix,
129
+ logConversion,
130
+ sendEvent,
131
+ on,
132
+ off,
133
+ nativeSdkVersion,
134
+ rnSdkVersion,
213
135
  };
214
136
  exports.default = Radar;