react-native-radar 3.9.0 → 3.10.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/android/build.gradle +2 -2
  2. package/dist/package.json +79 -0
  3. package/dist/src/@types/RadarNativeInterface.d.ts +51 -0
  4. package/dist/src/@types/RadarNativeInterface.js +2 -0
  5. package/dist/src/@types/types.d.ts +379 -0
  6. package/dist/src/@types/types.js +16 -0
  7. package/dist/src/helpers.d.ts +2 -0
  8. package/dist/src/helpers.js +11 -0
  9. package/dist/src/index.d.ts +8 -0
  10. package/dist/src/index.js +37 -0
  11. package/dist/src/index.native.d.ts +3 -0
  12. package/dist/src/index.native.js +136 -0
  13. package/dist/src/index.web.d.ts +73 -0
  14. package/dist/src/index.web.js +385 -0
  15. package/dist/src/ui/autocomplete.d.ts +4 -0
  16. package/dist/src/ui/autocomplete.js +213 -0
  17. package/dist/src/ui/images.d.ts +5 -0
  18. package/dist/src/ui/images.js +8 -0
  19. package/dist/src/ui/map.d.ts +5 -0
  20. package/dist/src/ui/map.js +112 -0
  21. package/dist/src/ui/styles.d.ts +2 -0
  22. package/dist/src/ui/styles.js +125 -0
  23. package/ios/Cartfile.resolved +1 -1
  24. package/package.json +14 -8
  25. package/react-native-radar.podspec +1 -1
  26. package/src/@types/RadarNativeInterface.ts +96 -0
  27. package/src/@types/types.ts +489 -0
  28. package/src/index.native.ts +272 -0
  29. package/src/index.ts +21 -0
  30. package/{js → src}/index.web.js +1 -1
  31. package/{js → src}/ui/autocomplete.jsx +3 -3
  32. package/js/index.js +0 -12
  33. package/js/index.native.js +0 -263
  34. /package/{js → src}/helpers.js +0 -0
  35. /package/{js → src}/ui/back.png +0 -0
  36. /package/{js → src}/ui/close.png +0 -0
  37. /package/{js → src}/ui/images.js +0 -0
  38. /package/{js → src}/ui/map-logo.png +0 -0
  39. /package/{js → src}/ui/map.jsx +0 -0
  40. /package/{js → src}/ui/marker.png +0 -0
  41. /package/{js → src}/ui/radar-logo.png +0 -0
  42. /package/{js → src}/ui/search.png +0 -0
  43. /package/{js → src}/ui/styles.js +0 -0
@@ -18,7 +18,7 @@ android {
18
18
  minSdkVersion 16
19
19
  targetSdkVersion 31
20
20
  versionCode 1
21
- versionName '3.9.0'
21
+ versionName '3.10.0-beta.1'
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.0'
48
+ api 'io.radar:sdk:3.9.1'
49
49
  }
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "react-native-radar",
3
+ "description": "React Native module for Radar, the leading geofencing and location tracking platform",
4
+ "homepage": "https://radar.com",
5
+ "license": "Apache-2.0",
6
+ "version": "3.10.0-beta.1",
7
+ "main": "dist/src/index.ts",
8
+ "files": [
9
+ "android",
10
+ "ios",
11
+ "src",
12
+ "README.md",
13
+ "react-native-radar.podspec",
14
+ "/dist"
15
+ ],
16
+ "types": "dist/src/index.d.ts",
17
+ "scripts": {
18
+ "test": "jest ./test/*.test.js",
19
+ "check-latest-tag": "node ./scripts/check-latest-tag.cjs",
20
+ "check-beta-tag": "node ./scripts/check-beta-tag.cjs",
21
+ "build": "tsc"
22
+ },
23
+ "jest": {
24
+ "preset": "react-native",
25
+ "clearMocks": true,
26
+ "reporters": [
27
+ "default",
28
+ "jest-junit"
29
+ ]
30
+ },
31
+ "peerDependencies": {
32
+ "@maplibre/maplibre-react-native": "^9.0.1",
33
+ "react": ">= 16.8.6",
34
+ "react-native": ">= 0.60.0"
35
+ },
36
+ "peerDependenciesMeta": {
37
+ "@maplibre/maplibre-react-native": {
38
+ "optional": true
39
+ }
40
+ },
41
+ "devDependencies": {
42
+ "@babel/core": "^7.2.2",
43
+ "@babel/preset-env": "^7.2.3",
44
+ "@babel/preset-react": "^7.0.0",
45
+ "@babel/register": "^7.0.0",
46
+ "@types/node": "^20.11.7",
47
+ "@types/react-native": "^0.73.0",
48
+ "babel-core": "^7.0.0-bridge.0",
49
+ "babel-eslint": "^10.0.1",
50
+ "babel-jest": "^23.4.2",
51
+ "braces": ">=2.3.2",
52
+ "eslint": "^5.6.1",
53
+ "eslint-config-airbnb": "^17.1.0",
54
+ "eslint-plugin-import": "^2.14.0",
55
+ "eslint-plugin-jest": "^22.1.2",
56
+ "eslint-plugin-jsx-a11y": "^6.1.1",
57
+ "eslint-plugin-react": "^7.11.1",
58
+ "jest": "^23.6.0",
59
+ "jest-junit": "^5.2.0",
60
+ "logkitty": ">=0.7.1",
61
+ "metro-react-native-babel-preset": "^0.51.1",
62
+ "npm-run-all": "^4.1.5",
63
+ "react": "16.8.6",
64
+ "react-native": "0.60.0",
65
+ "typescript": "^5.3.3"
66
+ },
67
+ "bugs": {
68
+ "url": "https://github.com/radarlabs/react-native-radar/issues"
69
+ },
70
+ "repository": {
71
+ "type": "git",
72
+ "url": "https://github.com/radarlabs/react-native-radar.git"
73
+ },
74
+ "dependencies": {
75
+ "@babel/runtime": "^7.21.0",
76
+ "@react-native-community/netinfo": "^7.1.3",
77
+ "radar-sdk-js": "^3.6.0"
78
+ }
79
+ }
@@ -0,0 +1,51 @@
1
+ import { Location, RadarAutocompleteOptions, RadarContextCallback, RadarGeocodeCallback, RadarGetDistanceOptions, RadarLocationCallback, RadarLogConversionCallback, RadarLogConversionOptions, RadarLogLevel, RadarMockTrackingOptions, RadarNotificationOptions, RadarPermissionsStatus, RadarRouteCallback, RadarRouteMatrix, RadarSearchGeofencesCallback, RadarSearchGeofencesOptions, RadarSearchPlacesCallback, RadarSearchPlacesOptions, RadarStartTripOptions, RadarTrackCallback, RadarTrackOnceOptions, RadarTrackTokenCallback, RadarTrackingOptions, RadarTrackingOptionsDesiredAccuracy, RadarTrackingOptionsForegroundService, RadarTripCallback, RadarTripOptions, RadarUpdateTripOptions, Event } from "./types";
2
+ export interface RadarNativeInterface {
3
+ initialize: (publishableKey: string, fraud: boolean) => void;
4
+ setLogLevel: (level: RadarLogLevel) => void;
5
+ setUserId: (userId: string) => void;
6
+ getUserId: () => Promise<string>;
7
+ setDescription: (description: string) => void;
8
+ getDescription: () => Promise<string>;
9
+ setMetadata: (metadata: object) => void;
10
+ getMetadata: () => Promise<object>;
11
+ setAnonymousTrackingEnabled: (enabled: boolean) => void;
12
+ getPermissionsStatus: () => Promise<RadarPermissionsStatus>;
13
+ requestPermissions: (background: boolean) => Promise<RadarPermissionsStatus>;
14
+ getLocation: (desiredAccuracy?: RadarTrackingOptionsDesiredAccuracy) => Promise<RadarLocationCallback>;
15
+ trackOnce: (options?: RadarTrackOnceOptions | Location) => Promise<RadarTrackCallback>;
16
+ trackVerifiedToken: () => Promise<RadarTrackTokenCallback>;
17
+ trackVerified: () => Promise<RadarTrackCallback>;
18
+ startTrackingEfficient: () => void;
19
+ startTrackingResponsive: () => void;
20
+ startTrackingContinuous: () => void;
21
+ startTrackingCustom: (options: RadarTrackingOptions) => void;
22
+ mockTracking: (options: RadarMockTrackingOptions) => void;
23
+ stopTracking: () => void;
24
+ getTrackingOptions: () => Promise<RadarTrackingOptions>;
25
+ isUsingRemoteTrackingOptions: () => Promise<boolean>;
26
+ isTracking: () => boolean;
27
+ setForegroundServiceOptions: (options: RadarTrackingOptionsForegroundService) => void;
28
+ setNotificationOptions: (options: RadarNotificationOptions) => void;
29
+ getTripOptions: () => Promise<RadarTripOptions>;
30
+ startTrip: (options: RadarStartTripOptions) => Promise<RadarTripCallback>;
31
+ completeTrip: () => Promise<RadarTripCallback>;
32
+ cancelTrip: () => Promise<RadarTripCallback>;
33
+ updateTrip: (options: RadarUpdateTripOptions) => Promise<RadarTripCallback>;
34
+ acceptEvent: (eventId: string, verifiedPlaceId: string) => void;
35
+ rejectEvent: (eventId: string) => void;
36
+ getContext: (location?: Location) => Promise<RadarContextCallback>;
37
+ searchPlaces: (options: RadarSearchPlacesOptions) => Promise<RadarSearchPlacesCallback>;
38
+ searchGeofences: (options: RadarSearchGeofencesOptions) => Promise<RadarSearchGeofencesCallback>;
39
+ autocomplete: (options: RadarAutocompleteOptions) => Promise<RadarGeocodeCallback>;
40
+ geocode: (address: string) => Promise<RadarGeocodeCallback>;
41
+ reverseGeocode: (location: any) => Promise<RadarGeocodeCallback>;
42
+ ipGeocode: () => Promise<RadarGeocodeCallback>;
43
+ getDistance: (option: RadarGetDistanceOptions) => Promise<RadarRouteCallback>;
44
+ getMatrix: (option: RadarGetDistanceOptions) => Promise<RadarRouteMatrix>;
45
+ logConversion: (options: RadarLogConversionOptions) => Promise<RadarLogConversionCallback>;
46
+ sendEvent: (name: string, metadata: Object) => void;
47
+ on: (event: Event, callback: Function | undefined) => void;
48
+ off: (event: Event, callback: Function | undefined) => void;
49
+ nativeSdkVersion: () => Promise<string>;
50
+ rnSdkVersion: () => string;
51
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,379 @@
1
+ export interface RadarTrackOnceOptions {
2
+ location?: Location;
3
+ desiredAccuracy?: RadarTrackingOptionsDesiredAccuracy;
4
+ beacons?: boolean;
5
+ }
6
+ export interface RadarGetDistanceOptions {
7
+ origin?: Location;
8
+ destination?: Location;
9
+ modes: string[];
10
+ units: string;
11
+ }
12
+ export interface RadarUpdateTripOptions {
13
+ options: RadarTripOptions;
14
+ status: RadarTripStatus;
15
+ }
16
+ export interface RadarStartTripOptions {
17
+ tripOptions: RadarTripOptions;
18
+ trackingOptions: RadarTrackingOptions;
19
+ }
20
+ export interface RadarLocationCallback {
21
+ status: string;
22
+ location?: Location;
23
+ stopped?: boolean;
24
+ }
25
+ export interface RadarTrackCallback {
26
+ status: string;
27
+ location?: Location;
28
+ user?: RadarUser;
29
+ events?: RadarEvent[];
30
+ }
31
+ export type RadarPermissionsStatus = "GRANTED_FOREGROUND" | "GRANTED_FOREGROUND" | "DENIED" | "NOT_DETERMINED" | "UNKNOWN";
32
+ export type Event = "clientLocation" | "location" | "error" | "events";
33
+ export type RadarLogLevel = "info" | "debug" | "warning" | "error" | "none";
34
+ export interface RadarTrackTokenCallback {
35
+ status: string;
36
+ token?: String;
37
+ }
38
+ export interface RadarTripCallback {
39
+ status: string;
40
+ trip?: RadarTrip;
41
+ events?: RadarEvent[];
42
+ }
43
+ export interface RadarContextCallback {
44
+ status: string;
45
+ location?: Location;
46
+ context?: RadarContext;
47
+ }
48
+ export interface RadarSearchPlacesCallback {
49
+ status: string;
50
+ location?: Location;
51
+ places?: RadarPlace[];
52
+ }
53
+ export interface RadarSearchGeofencesCallback {
54
+ status: string;
55
+ location?: Location;
56
+ geofences?: RadarGeofence[];
57
+ }
58
+ export interface RadarSearchGeofencesOptions {
59
+ near?: Location;
60
+ radius: number;
61
+ metadata?: object;
62
+ tags?: string[];
63
+ limit: number;
64
+ }
65
+ export interface RadarGeocodeCallback {
66
+ status: string;
67
+ addresses?: RadarAddress[];
68
+ }
69
+ export interface RadarValidateAddressCallback {
70
+ status: string;
71
+ address?: RadarAddress;
72
+ verificationStatus?: RadarAddressVerificationStatus;
73
+ }
74
+ export interface RadarIPGeocodeCallback {
75
+ status: string;
76
+ address?: RadarAddress;
77
+ }
78
+ export interface RadarTrackingOptionsForegroundServiceOptions {
79
+ text?: string;
80
+ title?: string;
81
+ updatesOnly: boolean;
82
+ activity?: string;
83
+ importance?: number;
84
+ id?: number;
85
+ channelName?: string;
86
+ iconString?: string;
87
+ iconColor?: string;
88
+ }
89
+ export interface RadarRouteCallback {
90
+ status: string;
91
+ routes?: RadarRoutes;
92
+ }
93
+ export interface RadarLogConversionCallback {
94
+ status: string;
95
+ event: RadarEvent;
96
+ }
97
+ export interface RadarRouteMatrix {
98
+ status: string;
99
+ matrix?: object;
100
+ }
101
+ export interface RadarSearchPlacesOptions {
102
+ near?: Location;
103
+ radius: number;
104
+ chains?: string[];
105
+ chainMetadata?: object;
106
+ categories?: string[];
107
+ groups?: string[];
108
+ limit: number;
109
+ }
110
+ export interface Location {
111
+ latitude: number;
112
+ longitude: number;
113
+ accuracy?: number;
114
+ speed?: number;
115
+ altitude?: number;
116
+ course?: number;
117
+ verticalAccuracy?: number;
118
+ speedAccuracy?: number;
119
+ courseAccuracy?: number;
120
+ }
121
+ export interface RadarUser {
122
+ _id: string;
123
+ userId?: string;
124
+ deviceId?: string;
125
+ description?: string;
126
+ metadata?: object;
127
+ location?: RadarCoordinate;
128
+ geofences?: RadarGeofence[];
129
+ place?: RadarPlace;
130
+ beacons?: RadarBeacon[];
131
+ stopped?: boolean;
132
+ foreground?: boolean;
133
+ country?: RadarRegion;
134
+ state?: RadarRegion;
135
+ dma?: RadarRegion;
136
+ postalCode?: RadarRegion;
137
+ nearbyPlaceChains?: RadarPlace[];
138
+ segments?: RadarSegment[];
139
+ topChains?: RadarPlace[];
140
+ source?: LocationSource;
141
+ trip?: RadarTrip;
142
+ debug?: boolean;
143
+ fraud?: RadarFraud;
144
+ }
145
+ export interface RadarAutocompleteOptions {
146
+ query: string;
147
+ near?: Location;
148
+ layers?: string[];
149
+ limit: number;
150
+ country?: string;
151
+ expandUnits?: boolean;
152
+ }
153
+ export interface RadarCoordinate {
154
+ type: string;
155
+ coordinates: [number, number];
156
+ }
157
+ export type LocationSource = "FOREGROUND_LOCATION" | "BACKGROUND_LOCATION" | "MANUAL_LOCATION" | "VISIT_ARRIVAL" | "VISIT_DEPARTURE" | "GEOFENCE_ENTER" | "GEOFENCE_EXIT" | "MOCK_LOCATION" | "BEACON_ENTER" | "BEACON_EXIT" | "UNKNOWN";
158
+ export interface RadarTrip {
159
+ _id: string;
160
+ externalId: string;
161
+ metadata?: object;
162
+ destinationGeofenceTag?: string;
163
+ destinationGeofenceExternalId?: string;
164
+ mode?: string;
165
+ eta?: RadarTripEta;
166
+ status: string;
167
+ scheduledArrivalAt?: Date;
168
+ }
169
+ export interface RadarSegment {
170
+ description: string;
171
+ externalId: string;
172
+ }
173
+ export interface RadarContext {
174
+ geofences?: RadarGeofence[];
175
+ place?: RadarPlace;
176
+ country?: RadarRegion;
177
+ state?: RadarRegion;
178
+ dma?: RadarRegion;
179
+ postalCode?: RadarRegion;
180
+ }
181
+ export interface RadarEvent {
182
+ _id: string;
183
+ live: boolean;
184
+ type: RadarEventType;
185
+ geofence?: RadarGeofence;
186
+ place?: RadarPlace;
187
+ region?: RadarRegion;
188
+ confidence: RadarEventConfidence;
189
+ duration?: number;
190
+ beacon?: RadarBeacon;
191
+ trip?: RadarTrip;
192
+ alternatePlaces?: RadarPlace[];
193
+ location?: RadarCoordinate;
194
+ metadata?: object;
195
+ }
196
+ export declare enum RadarEventConfidence {
197
+ none = 0,
198
+ low = 1,
199
+ medium = 2,
200
+ high = 3
201
+ }
202
+ export type RadarEventType = "unknown" | "user.entered_geofence" | "user.entered_beacon" | "user.dwelled_in_geofence" | "user.entered_place" | "user.entered_region_country" | "user.entered_region_dma" | "user.entered_region_state" | "user.entered_region_postal_code" | "user.exited_geofence" | "user.exited_beacon" | "user.exited_place" | "user.exited_region_country" | "user.exited_region_dma" | "user.exited_region_state" | "user.exited_region_postal_code" | "user.nearby_place_chain" | "user.started_trip" | "user.updated_trip" | "user.approaching_trip_destination" | "user.arrived_at_trip_destination" | "user.stopped_trip";
203
+ export type RadarTrackingOptionsDesiredAccuracy = "high" | "medium" | "low" | "none";
204
+ export declare enum RadarEventVerification {
205
+ accept = 1,
206
+ unverify = 0,
207
+ reject = -1
208
+ }
209
+ export type RadarBeaconType = "eddystone" | "ibeacon";
210
+ export interface RadarGeofence {
211
+ _id: string;
212
+ description: string;
213
+ tag?: string;
214
+ externalId?: string;
215
+ metadata?: object;
216
+ type?: string;
217
+ geometryRadius?: number;
218
+ geometryCenter?: RadarCoordinate;
219
+ coordinates?: number[][];
220
+ }
221
+ export interface RadarBeacon {
222
+ _id: string;
223
+ metadata?: object;
224
+ type: RadarBeaconType;
225
+ uuid?: string;
226
+ instance?: string;
227
+ major?: string;
228
+ minor?: string;
229
+ geometry?: RadarCoordinate;
230
+ rss?: number;
231
+ }
232
+ export interface RadarPlace {
233
+ _id: string;
234
+ name: string;
235
+ categories: string[];
236
+ chain?: RadarChain;
237
+ }
238
+ export interface RadarChain {
239
+ name: string;
240
+ slug: string;
241
+ externalId?: string;
242
+ metadata?: object;
243
+ }
244
+ export interface RadarRegion {
245
+ _id: string;
246
+ type: string;
247
+ code: string;
248
+ name: string;
249
+ allowed?: boolean;
250
+ flag?: string;
251
+ }
252
+ export interface RadarLocationPermissionsCallback {
253
+ status: string;
254
+ }
255
+ export interface RadarAddress {
256
+ latitude: number;
257
+ longitude: number;
258
+ placeLabel?: string;
259
+ addressLabel?: string;
260
+ formattedAddress?: string;
261
+ country?: string;
262
+ countryCode?: string;
263
+ countryFlag?: string;
264
+ state?: string;
265
+ stateCode?: string;
266
+ postalCode?: string;
267
+ city?: string;
268
+ borough?: string;
269
+ county?: string;
270
+ neighborhood?: string;
271
+ number?: string;
272
+ distance?: number;
273
+ confidence?: string;
274
+ layer?: string;
275
+ plus4?: string;
276
+ }
277
+ export interface RadarAddressVerificationStatus {
278
+ status: string;
279
+ }
280
+ export interface RadarRoutes {
281
+ geodesic: RadarRoute;
282
+ foot?: RadarRoute;
283
+ bike?: RadarRoute;
284
+ car?: RadarRoute;
285
+ }
286
+ export interface RadarRoute {
287
+ distance?: RadarRouteDistance;
288
+ duration?: RadarRouteDuration;
289
+ }
290
+ export interface RadarRouteDistance {
291
+ value: number;
292
+ text: string;
293
+ }
294
+ export interface RadarNotificationOptions {
295
+ iconString?: string;
296
+ iconColor?: string;
297
+ foregroundServiceIconString?: string;
298
+ foregroundServiceIconColor?: string;
299
+ eventIconString?: string;
300
+ eventIconColor?: string;
301
+ }
302
+ export interface RadarRouteDuration {
303
+ value: number;
304
+ text: string;
305
+ }
306
+ export interface RadarTripEta {
307
+ distance?: number;
308
+ duration?: number;
309
+ }
310
+ export interface RadarFraud {
311
+ passed: boolean;
312
+ bypassed: boolean;
313
+ verified: boolean;
314
+ proxy: boolean;
315
+ mocked: boolean;
316
+ compromised: boolean;
317
+ jumped: boolean;
318
+ }
319
+ export interface RadarMockTrackingOptions {
320
+ origin: Location;
321
+ destination: Location;
322
+ mode: RadarRouteMode;
323
+ steps: number;
324
+ interval: number;
325
+ }
326
+ export type RadarTrackingOptionsReplay = "all" | "stops" | "none";
327
+ export type RadarTrackingOptionsSync = "none" | "stopsAndExits" | "all";
328
+ export interface RadarTrackingOptions {
329
+ desiredStoppedUpdateInterval: number;
330
+ fastestStoppedUpdateInterval: number;
331
+ desiredMovingUpdateInterval: number;
332
+ fastestMovingUpdateInterval: number;
333
+ desiredSyncInterval: number;
334
+ desiredAccuracy: RadarTrackingOptionsDesiredAccuracy;
335
+ stopDuration: number;
336
+ stopDistance: number;
337
+ startTrackingAfter?: Date;
338
+ stopTrackingAfter?: Date;
339
+ replay: RadarTrackingOptionsReplay;
340
+ sync: RadarTrackingOptionsSync;
341
+ showBlueBar: boolean;
342
+ useStoppedGeofence: boolean;
343
+ stoppedGeofenceRadius: number;
344
+ useMovingGeofence: boolean;
345
+ movingGeofenceRadius: number;
346
+ syncGeofences: boolean;
347
+ syncGeofencesLimit: number;
348
+ foregroundServiceEnabled: boolean;
349
+ beacons: boolean;
350
+ }
351
+ export interface RadarLogConversionOptions {
352
+ name: string;
353
+ revenue?: number;
354
+ metadata?: object;
355
+ }
356
+ export type RadarRouteMode = "foot" | "bike" | "car";
357
+ export interface RadarTrackingStatus {
358
+ isTracking: string;
359
+ }
360
+ export interface RadarTrackingOptionsForegroundService {
361
+ text?: string;
362
+ title?: string;
363
+ icon?: number;
364
+ updatesOnly?: boolean;
365
+ activity?: string;
366
+ importance?: number;
367
+ id?: number;
368
+ channelName?: string;
369
+ }
370
+ export interface RadarTripOptions {
371
+ externalId: string;
372
+ metadata?: object;
373
+ destinationGeofenceTag?: string;
374
+ destinationGeofenceExternalId?: string;
375
+ mode?: RadarRouteMode;
376
+ scheduledArrivalAt?: Date;
377
+ approachingThreshold?: number;
378
+ }
379
+ export type RadarTripStatus = "unknown" | "started" | "approaching" | "arrived" | "expired" | "completed" | "canceled";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RadarEventVerification = exports.RadarEventConfidence = void 0;
4
+ var RadarEventConfidence;
5
+ (function (RadarEventConfidence) {
6
+ RadarEventConfidence[RadarEventConfidence["none"] = 0] = "none";
7
+ RadarEventConfidence[RadarEventConfidence["low"] = 1] = "low";
8
+ RadarEventConfidence[RadarEventConfidence["medium"] = 2] = "medium";
9
+ RadarEventConfidence[RadarEventConfidence["high"] = 3] = "high";
10
+ })(RadarEventConfidence || (exports.RadarEventConfidence = RadarEventConfidence = {}));
11
+ var RadarEventVerification;
12
+ (function (RadarEventVerification) {
13
+ RadarEventVerification[RadarEventVerification["accept"] = 1] = "accept";
14
+ RadarEventVerification[RadarEventVerification["unverify"] = 0] = "unverify";
15
+ RadarEventVerification[RadarEventVerification["reject"] = -1] = "reject";
16
+ })(RadarEventVerification || (exports.RadarEventVerification = RadarEventVerification = {}));
@@ -0,0 +1,2 @@
1
+ export function getHost(): any;
2
+ export function getPublishableKey(): any;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPublishableKey = exports.getHost = void 0;
4
+ const react_native_1 = require("react-native");
5
+ if (!react_native_1.NativeModules.RNRadar && (react_native_1.Platform.OS === 'ios' || react_native_1.Platform.OS === 'android')) {
6
+ throw new Error('NativeModules.RNRadar is undefined');
7
+ }
8
+ const getHost = () => (react_native_1.NativeModules.RNRadar.getHost());
9
+ exports.getHost = getHost;
10
+ const getPublishableKey = () => (react_native_1.NativeModules.RNRadar.getPublishableKey());
11
+ exports.getPublishableKey = getPublishableKey;
@@ -0,0 +1,8 @@
1
+ import { RadarNativeInterface } from "./@types/RadarNativeInterface";
2
+ declare let module: RadarNativeInterface;
3
+ export default module;
4
+ export { default as RadarRNWeb } from "./index.web";
5
+ export { default as Autocomplete } from "./ui/autocomplete";
6
+ export { default as Map } from "./ui/map";
7
+ export * from "./@types/types";
8
+ export * from "./@types/RadarNativeInterface";
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.Map = exports.Autocomplete = exports.RadarRNWeb = void 0;
21
+ //type RadarInterface = Platform["OS"] extends "web" ? RadarNativeInterface : any;
22
+ //type RadarInterface = RadarNativeInterface;
23
+ let module;
24
+ // if (Platform.OS === "web") {
25
+ // module = require("./index.web").default;
26
+ // } else {
27
+ module = require("./index.native").default;
28
+ //}
29
+ exports.default = module;
30
+ var index_web_1 = require("./index.web");
31
+ Object.defineProperty(exports, "RadarRNWeb", { enumerable: true, get: function () { return __importDefault(index_web_1).default; } });
32
+ var autocomplete_1 = require("./ui/autocomplete");
33
+ Object.defineProperty(exports, "Autocomplete", { enumerable: true, get: function () { return __importDefault(autocomplete_1).default; } });
34
+ var map_1 = require("./ui/map");
35
+ Object.defineProperty(exports, "Map", { enumerable: true, get: function () { return __importDefault(map_1).default; } });
36
+ __exportStar(require("./@types/types"), exports);
37
+ __exportStar(require("./@types/RadarNativeInterface"), exports);
@@ -0,0 +1,3 @@
1
+ import { RadarNativeInterface } from "./@types/RadarNativeInterface";
2
+ declare const Radar: RadarNativeInterface;
3
+ export default Radar;