react-native-radar 3.10.4-beta.1 → 3.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +2 -2
- package/android/src/main/java/io/radar/react/RNRadarModule.java +6 -0
- package/dist/package.json +1 -1
- package/dist/src/@types/RadarNativeInterface.d.ts +1 -1
- package/dist/src/@types/types.d.ts +11 -0
- package/dist/src/@types/types.js +134 -1
- package/dist/src/helpers.js +3 -3
- package/dist/src/index.js +1 -1
- package/dist/src/index.native.js +104 -182
- package/dist/src/index.web.js +148 -162
- package/dist/src/ui/autocomplete.js +63 -120
- package/dist/src/ui/map.js +23 -63
- package/dist/src/ui/styles.js +2 -2
- package/ios/RNRadar.m +2 -0
- package/package.json +1 -1
- package/src/@types/RadarNativeInterface.ts +1 -1
- package/src/@types/types.ts +148 -0
- package/src/index.native.ts +1 -0
package/android/build.gradle
CHANGED
|
@@ -18,7 +18,7 @@ android {
|
|
|
18
18
|
minSdkVersion 16
|
|
19
19
|
targetSdkVersion 31
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName '3.10.4
|
|
21
|
+
versionName '3.10.4'
|
|
22
22
|
}
|
|
23
23
|
lintOptions {
|
|
24
24
|
abortOnError false
|
|
@@ -45,5 +45,5 @@ repositories {
|
|
|
45
45
|
|
|
46
46
|
dependencies {
|
|
47
47
|
api 'com.facebook.react:react-native:+'
|
|
48
|
-
api 'io.radar:sdk:3.9.
|
|
48
|
+
api 'io.radar:sdk:3.9.5'
|
|
49
49
|
}
|
|
@@ -2,6 +2,8 @@ package io.radar.react;
|
|
|
2
2
|
|
|
3
3
|
import android.Manifest;
|
|
4
4
|
import android.app.Activity;
|
|
5
|
+
import android.content.Context;
|
|
6
|
+
import android.content.SharedPreferences;
|
|
5
7
|
import android.content.pm.PackageManager;
|
|
6
8
|
import android.location.Location;
|
|
7
9
|
import android.os.Build;
|
|
@@ -91,6 +93,10 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
91
93
|
@ReactMethod
|
|
92
94
|
public void initialize(String publishableKey, boolean fraud) {
|
|
93
95
|
this.fraud = fraud;
|
|
96
|
+
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
|
|
97
|
+
editor.putString("x_platform_sdk_type", "ReactNative");
|
|
98
|
+
editor.putString("x_platform_sdk_version", "3.10.4");
|
|
99
|
+
editor.apply();
|
|
94
100
|
if (fraud) {
|
|
95
101
|
Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud);
|
|
96
102
|
Radar.setVerifiedReceiver(verifiedReceiver);
|
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
|
|
6
|
+
"version": "3.10.4",
|
|
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
|
|
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";
|
package/dist/src/@types/types.js
CHANGED
|
@@ -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";
|
package/dist/src/helpers.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
8
|
+
const getHost = () => (react_native_1.NativeModules.RNRadar.getHost());
|
|
9
9
|
exports.getHost = getHost;
|
|
10
|
-
|
|
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
|
-
|
|
21
|
+
let module;
|
|
22
22
|
module = require("./index.native").default;
|
|
23
23
|
exports.default = module;
|
|
24
24
|
var index_web_1 = require("./index.web");
|
package/dist/src/index.native.js
CHANGED
|
@@ -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
|
-
|
|
15
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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
|
-
|
|
13
|
+
const setLogLevel = (level) => {
|
|
26
14
|
react_native_1.NativeModules.RNRadar.setLogLevel(level);
|
|
27
15
|
};
|
|
28
|
-
|
|
16
|
+
const setUserId = (userId) => {
|
|
29
17
|
react_native_1.NativeModules.RNRadar.setUserId(userId);
|
|
30
18
|
};
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
36
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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:
|
|
36
|
+
location: Object.assign({}, options),
|
|
61
37
|
};
|
|
62
38
|
}
|
|
63
39
|
return react_native_1.NativeModules.RNRadar.trackOnce(backCompatibleOptions);
|
|
64
40
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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;
|