react-native-radar 3.10.0-beta.2 → 3.10.0-beta.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.
@@ -18,7 +18,7 @@ android {
18
18
  minSdkVersion 16
19
19
  targetSdkVersion 31
20
20
  versionCode 1
21
- versionName '3.10.0-beta.2'
21
+ versionName '3.10.0-beta.4'
22
22
  }
23
23
  lintOptions {
24
24
  abortOnError false
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.0-beta.2",
6
+ "version": "3.10.0-beta.4",
7
7
  "main": "dist/src/index.js",
8
8
  "files": [
9
9
  "android",
@@ -1,4 +1,4 @@
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, RadarListenerCallback, RadarGetMatrixOptions } from "./types";
1
+ import { Location, RadarAutocompleteOptions, RadarContextCallback, RadarAddressCallback, 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, RadarListenerCallback, RadarGetMatrixOptions, RadarMetadata, RadarIPGeocodeCallback } from "./types";
2
2
  export interface RadarNativeInterface {
3
3
  initialize: (publishableKey: string, fraud: boolean) => void;
4
4
  setLogLevel: (level: RadarLogLevel) => void;
@@ -6,8 +6,8 @@ export interface RadarNativeInterface {
6
6
  getUserId: () => Promise<string>;
7
7
  setDescription: (description: string) => void;
8
8
  getDescription: () => Promise<string>;
9
- setMetadata: (metadata: object) => void;
10
- getMetadata: () => Promise<object>;
9
+ setMetadata: (metadata: RadarMetadata) => void;
10
+ getMetadata: () => Promise<RadarMetadata>;
11
11
  setAnonymousTrackingEnabled: (enabled: boolean) => void;
12
12
  getPermissionsStatus: () => Promise<RadarPermissionsStatus>;
13
13
  requestPermissions: (background: boolean) => Promise<RadarPermissionsStatus>;
@@ -36,16 +36,16 @@ export interface RadarNativeInterface {
36
36
  getContext: (location?: Location) => Promise<RadarContextCallback>;
37
37
  searchPlaces: (options: RadarSearchPlacesOptions) => Promise<RadarSearchPlacesCallback>;
38
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>;
39
+ autocomplete: (options: RadarAutocompleteOptions) => Promise<RadarAddressCallback>;
40
+ geocode: (address: string) => Promise<RadarAddressCallback>;
41
+ reverseGeocode: (location: any) => Promise<RadarAddressCallback>;
42
+ ipGeocode: () => Promise<RadarIPGeocodeCallback>;
43
43
  getDistance: (option: RadarGetDistanceOptions) => Promise<RadarRouteCallback>;
44
44
  getMatrix: (option: RadarGetMatrixOptions) => Promise<RadarRouteMatrix>;
45
45
  logConversion: (options: RadarLogConversionOptions) => Promise<RadarLogConversionCallback>;
46
- sendEvent: (name: string, metadata: object) => void;
46
+ sendEvent: (name: string, metadata: RadarMetadata) => void;
47
47
  on: (event: Event, callback: RadarListenerCallback) => void;
48
- off: (event: Event, callback: Function | undefined) => void;
48
+ off: (event: Event, callback?: Function | undefined) => void;
49
49
  nativeSdkVersion: () => Promise<string>;
50
50
  rnSdkVersion: () => string;
51
51
  }
@@ -1,8 +1,46 @@
1
+ export type RadarMetadata = Record<string, string | number | boolean>;
1
2
  export interface RadarTrackOnceOptions {
2
3
  location?: Location;
3
4
  desiredAccuracy?: RadarTrackingOptionsDesiredAccuracy;
4
5
  beacons?: boolean;
5
6
  }
7
+ /**
8
+ * Options for tracking the user's location.
9
+ * @see {@link https://radar.com/documentation/sdk/tracking}
10
+ */
11
+ export interface RadarTrackingOptions {
12
+ desiredStoppedUpdateInterval: number;
13
+ fastestStoppedUpdateInterval?: number;
14
+ desiredMovingUpdateInterval: number;
15
+ fastestMovingUpdateInterval?: number;
16
+ desiredSyncInterval: number;
17
+ desiredAccuracy: String;
18
+ stopDuration: number;
19
+ stopDistance: number;
20
+ sync: String;
21
+ replay: String;
22
+ useStoppedGeofence: boolean;
23
+ showBlueBar?: boolean;
24
+ startTrackingAfter?: number;
25
+ stopTrackingAfter?: number;
26
+ syncLocations?: String;
27
+ stoppedGeofenceRadius: number;
28
+ useMovingGeofence: boolean;
29
+ movingGeofenceRadius: number;
30
+ syncGeofences: boolean;
31
+ useVisits?: boolean;
32
+ useSignificantLocationChanges?: boolean;
33
+ beacons: boolean;
34
+ syncGeofencesLimit?: number;
35
+ foregroundServiceEnabled?: boolean;
36
+ }
37
+ export interface RadarMockTrackingOptions {
38
+ origin: Location;
39
+ destination: Location;
40
+ mode: RadarRouteMode;
41
+ steps: number;
42
+ interval: number;
43
+ }
6
44
  export interface RadarGetDistanceOptions {
7
45
  origin?: Location;
8
46
  destination?: Location;
@@ -23,10 +61,64 @@ export interface RadarStartTripOptions {
23
61
  tripOptions: RadarTripOptions;
24
62
  trackingOptions?: RadarTrackingOptions;
25
63
  }
26
- export interface RadarLocationCallback {
27
- status: string;
28
- location?: Location;
29
- stopped: boolean;
64
+ export interface RadarSearchGeofencesOptions {
65
+ near?: Location;
66
+ radius?: number;
67
+ metadata?: RadarMetadata;
68
+ tags?: string[];
69
+ limit?: number;
70
+ }
71
+ export interface RadarTrackingOptionsForegroundServiceOptions {
72
+ text?: string;
73
+ title?: string;
74
+ updatesOnly: boolean;
75
+ activity?: string;
76
+ importance?: number;
77
+ id?: number;
78
+ channelName?: string;
79
+ iconString?: string;
80
+ iconColor?: string;
81
+ }
82
+ export interface RadarSearchPlacesOptions {
83
+ near?: Location;
84
+ radius?: number;
85
+ chains?: string[];
86
+ chainMetadata?: RadarMetadata;
87
+ categories?: string[];
88
+ groups?: string[];
89
+ limit?: number;
90
+ }
91
+ export interface RadarAutocompleteOptions {
92
+ query: string;
93
+ near?: Location;
94
+ layers?: string[];
95
+ limit: number;
96
+ country?: string;
97
+ /** @deprecated this is always true, regardless of the value passed here */
98
+ expandUnits?: boolean;
99
+ mailable?: boolean;
100
+ }
101
+ export interface RadarNotificationOptions {
102
+ iconString?: string;
103
+ iconColor?: string;
104
+ foregroundServiceIconString?: string;
105
+ foregroundServiceIconColor?: string;
106
+ eventIconString?: string;
107
+ eventIconColor?: string;
108
+ }
109
+ export interface RadarLogConversionOptions {
110
+ name: string;
111
+ revenue?: number;
112
+ metadata?: RadarMetadata;
113
+ }
114
+ export interface RadarTripOptions {
115
+ externalId: string;
116
+ metadata?: RadarMetadata;
117
+ destinationGeofenceTag?: string;
118
+ destinationGeofenceExternalId?: string;
119
+ mode?: RadarRouteMode;
120
+ scheduledArrivalAt?: Date;
121
+ approachingThreshold?: number;
30
122
  }
31
123
  export interface RadarTrackCallback {
32
124
  status: string;
@@ -34,12 +126,10 @@ export interface RadarTrackCallback {
34
126
  user?: RadarUser;
35
127
  events?: RadarEvent[];
36
128
  }
37
- export type RadarPermissionsStatus = "GRANTED_FOREGROUND" | "GRANTED_FOREGROUND" | "DENIED" | "NOT_DETERMINED" | "UNKNOWN";
38
- export type Event = "clientLocation" | "location" | "error" | "events";
39
- export type RadarLogLevel = "info" | "debug" | "warning" | "error" | "none";
40
- export interface RadarTrackTokenCallback {
129
+ export interface RadarLocationCallback {
41
130
  status: string;
42
- token?: String;
131
+ location?: Location;
132
+ stopped: boolean;
43
133
  }
44
134
  export interface RadarTripCallback {
45
135
  status: string;
@@ -61,58 +151,72 @@ export interface RadarSearchGeofencesCallback {
61
151
  location?: Location;
62
152
  geofences?: RadarGeofence[];
63
153
  }
64
- export interface RadarSearchGeofencesOptions {
65
- near?: Location;
66
- radius?: number;
67
- metadata?: object;
68
- tags?: string[];
69
- limit?: number;
70
- }
71
- export interface RadarGeocodeCallback {
154
+ export interface RadarAddressCallback {
72
155
  status: string;
73
156
  addresses?: RadarAddress[];
74
157
  }
158
+ export interface RadarIPGeocodeCallback {
159
+ status: string;
160
+ address?: RadarAddress;
161
+ proxy?: boolean;
162
+ }
75
163
  export interface RadarValidateAddressCallback {
76
164
  status: string;
77
165
  address?: RadarAddress;
78
- verificationStatus?: RadarAddressVerificationStatus;
166
+ verificationStatus?: RadarVerificationStatus;
79
167
  }
80
168
  export interface RadarIPGeocodeCallback {
81
169
  status: string;
82
170
  address?: RadarAddress;
83
171
  proxy?: boolean;
84
172
  }
85
- export interface RadarTrackingOptionsForegroundServiceOptions {
86
- text?: string;
87
- title?: string;
88
- updatesOnly: boolean;
89
- activity?: string;
90
- importance?: number;
91
- id?: number;
92
- channelName?: string;
93
- iconString?: string;
94
- iconColor?: string;
95
- }
96
173
  export interface RadarRouteCallback {
97
174
  status: string;
98
175
  routes?: RadarRoutes;
99
176
  }
100
177
  export interface RadarLogConversionCallback {
101
178
  status: string;
102
- event: RadarEvent;
179
+ event?: RadarEvent;
103
180
  }
104
- export interface RadarRouteMatrix {
181
+ export interface RadarTrackTokenCallback {
105
182
  status: string;
106
- matrix?: object[];
183
+ token?: String;
107
184
  }
108
- export interface RadarSearchPlacesOptions {
109
- near?: Location;
110
- radius?: number;
111
- chains?: string[];
112
- chainMetadata?: object;
113
- categories?: string[];
114
- groups?: string[];
115
- limit?: number;
185
+ export interface RadarEventUpdate {
186
+ user?: RadarUser;
187
+ events: RadarEvent[];
188
+ }
189
+ export interface RadarEventUpdateCallback {
190
+ (args: RadarEventUpdate): void;
191
+ }
192
+ export interface RadarLocationUpdate {
193
+ location: Location;
194
+ user: RadarUser;
195
+ }
196
+ export interface RadarLocationUpdateCallback {
197
+ (args: RadarLocationUpdate): void;
198
+ }
199
+ export interface RadarClientLocationUpdate {
200
+ location: Location;
201
+ stopped: boolean;
202
+ source: string;
203
+ }
204
+ export interface RadarClientLocationUpdateCallback {
205
+ (args: RadarClientLocationUpdate): void;
206
+ }
207
+ export interface RadarErrorCallback {
208
+ (status: string): void;
209
+ }
210
+ export interface RadarLogUpdateCallback {
211
+ (status: string): void;
212
+ }
213
+ export type RadarListenerCallback = RadarEventUpdateCallback | RadarLocationUpdateCallback | RadarClientLocationUpdateCallback | RadarErrorCallback | RadarLogUpdateCallback;
214
+ export type RadarPermissionsStatus = "GRANTED_FOREGROUND" | "GRANTED_FOREGROUND" | "DENIED" | "NOT_DETERMINED" | "UNKNOWN";
215
+ export type Event = "clientLocation" | "location" | "error" | "events" | "log";
216
+ export type RadarLogLevel = "info" | "debug" | "warning" | "error" | "none";
217
+ export interface RadarRouteMatrix {
218
+ status: string;
219
+ matrix?: RadarRoute[][];
116
220
  }
117
221
  export interface Location {
118
222
  latitude: number;
@@ -131,7 +235,7 @@ export interface RadarUser {
131
235
  userId?: string;
132
236
  deviceId?: string;
133
237
  description?: string;
134
- metadata?: object;
238
+ metadata?: RadarMetadata;
135
239
  location?: RadarCoordinate;
136
240
  geofences?: RadarGeofence[];
137
241
  place?: RadarPlace;
@@ -142,22 +246,14 @@ export interface RadarUser {
142
246
  state?: RadarRegion;
143
247
  dma?: RadarRegion;
144
248
  postalCode?: RadarRegion;
145
- nearbyPlaceChains?: RadarPlace[];
249
+ nearbyPlaceChains?: RadarChain[];
146
250
  segments?: RadarSegment[];
147
- topChains?: RadarPlace[];
251
+ topChains?: RadarChain[];
148
252
  source?: LocationSource;
149
253
  trip?: RadarTrip;
150
254
  debug?: boolean;
151
255
  fraud?: RadarFraud;
152
256
  }
153
- export interface RadarAutocompleteOptions {
154
- query: string;
155
- near?: Location;
156
- layers?: string[];
157
- limit: number;
158
- country?: string;
159
- expandUnits?: boolean;
160
- }
161
257
  export interface RadarCoordinate {
162
258
  type: string;
163
259
  coordinates: [number, number];
@@ -166,13 +262,14 @@ export type LocationSource = "FOREGROUND_LOCATION" | "BACKGROUND_LOCATION" | "MA
166
262
  export interface RadarTrip {
167
263
  _id: string;
168
264
  externalId: string;
169
- metadata?: object;
265
+ metadata?: RadarMetadata;
170
266
  destinationGeofenceTag?: string;
171
267
  destinationGeofenceExternalId?: string;
172
268
  mode?: string;
173
269
  eta?: RadarTripEta;
174
270
  status: string;
175
271
  scheduledArrivalAt?: Date;
272
+ destinationLocation: Location;
176
273
  }
177
274
  export interface RadarSegment {
178
275
  description: string;
@@ -199,7 +296,10 @@ export interface RadarEvent {
199
296
  trip?: RadarTrip;
200
297
  alternatePlaces?: RadarPlace[];
201
298
  location?: RadarCoordinate;
202
- metadata?: object;
299
+ metadata?: RadarMetadata;
300
+ replayed?: boolean;
301
+ createdAt: string;
302
+ actualCreatedAt: string;
203
303
  }
204
304
  export declare enum RadarEventConfidence {
205
305
  none = 0,
@@ -220,15 +320,15 @@ export interface RadarGeofence {
220
320
  description: string;
221
321
  tag?: string;
222
322
  externalId?: string;
223
- metadata?: object;
224
- type?: string;
323
+ metadata?: RadarMetadata;
324
+ type?: "Circle" | "Polygon";
225
325
  geometryRadius?: number;
226
326
  geometryCenter?: RadarCoordinate;
227
327
  coordinates?: number[][];
228
328
  }
229
329
  export interface RadarBeacon {
230
330
  _id: string;
231
- metadata?: object;
331
+ metadata?: RadarMetadata;
232
332
  type: RadarBeaconType;
233
333
  uuid?: string;
234
334
  instance?: string;
@@ -242,12 +342,15 @@ export interface RadarPlace {
242
342
  name: string;
243
343
  categories: string[];
244
344
  chain?: RadarChain;
345
+ location: Location;
346
+ metadata?: RadarMetadata;
347
+ group?: string;
245
348
  }
246
349
  export interface RadarChain {
247
350
  name: string;
248
351
  slug: string;
249
352
  externalId?: string;
250
- metadata?: object;
353
+ metadata?: RadarMetadata;
251
354
  }
252
355
  export interface RadarRegion {
253
356
  _id: string;
@@ -257,61 +360,55 @@ export interface RadarRegion {
257
360
  allowed?: boolean;
258
361
  flag?: string;
259
362
  }
260
- export interface RadarLocationPermissionsCallback {
261
- status: string;
262
- }
263
363
  export interface RadarAddress {
264
- latitude: number;
265
- longitude: number;
266
- placeLabel?: string;
267
364
  addressLabel?: string;
268
- formattedAddress?: string;
365
+ borough?: string;
366
+ city?: string;
367
+ confidence?: string;
269
368
  country?: string;
270
369
  countryCode?: string;
271
370
  countryFlag?: string;
272
- state?: string;
273
- stateCode?: string;
274
- postalCode?: string;
275
- city?: string;
276
- borough?: string;
277
371
  county?: string;
372
+ distance?: number;
373
+ dma?: string;
374
+ dmaCode?: string;
375
+ formattedAddress?: string;
376
+ latitude: number;
377
+ layer?: string;
378
+ longitude: number;
379
+ metadata?: RadarMetadata;
278
380
  neighborhood?: string;
279
381
  number?: string;
382
+ placeLabel?: string;
383
+ plus4?: string;
384
+ postalCode?: string;
385
+ state?: string;
386
+ stateCode?: string;
280
387
  street?: string;
281
388
  unit?: string;
282
- distance?: number;
283
- confidence?: string;
284
- layer?: string;
285
- plus4?: string;
286
- dmaCode?: string;
287
- dma?: string;
288
- metadata?: object;
289
- }
290
- export interface RadarAddressVerificationStatus {
291
- status: string;
292
389
  }
390
+ export type RadarVerificationStatus = "verified" | "partially verified" | "ambiguous" | "unverified";
293
391
  export interface RadarRoutes {
294
392
  geodesic?: RadarRouteDistance;
295
393
  foot?: RadarRoute;
296
394
  bike?: RadarRoute;
297
395
  car?: RadarRoute;
396
+ truck?: RadarRoute;
397
+ motorbike?: RadarRoute;
398
+ }
399
+ export interface RadarRouteGeometry {
400
+ type: string;
401
+ coordinates: number[][];
298
402
  }
299
403
  export interface RadarRoute {
300
404
  distance?: RadarRouteDistance;
301
405
  duration?: RadarRouteDuration;
406
+ geometry?: RadarRouteGeometry;
302
407
  }
303
408
  export interface RadarRouteDistance {
304
409
  value: number;
305
410
  text: string;
306
411
  }
307
- export interface RadarNotificationOptions {
308
- iconString?: string;
309
- iconColor?: string;
310
- foregroundServiceIconString?: string;
311
- foregroundServiceIconColor?: string;
312
- eventIconString?: string;
313
- eventIconColor?: string;
314
- }
315
412
  export interface RadarRouteDuration {
316
413
  value: number;
317
414
  text: string;
@@ -329,50 +426,9 @@ export interface RadarFraud {
329
426
  compromised: boolean;
330
427
  jumped: boolean;
331
428
  }
332
- export interface RadarMockTrackingOptions {
333
- origin: Location;
334
- destination: Location;
335
- mode: RadarRouteMode;
336
- steps: number;
337
- interval: number;
338
- }
339
429
  export type RadarTrackingOptionsReplay = "all" | "stops" | "none";
340
430
  export type RadarTrackingOptionsSync = "none" | "stopsAndExits" | "all";
341
- export interface RadarTrackingOptions {
342
- desiredStoppedUpdateInterval: number;
343
- fastestStoppedUpdateInterval?: number;
344
- desiredMovingUpdateInterval: number;
345
- fastestMovingUpdateInterval?: number;
346
- desiredSyncInterval: number;
347
- desiredAccuracy: String;
348
- stopDuration: number;
349
- stopDistance: number;
350
- sync: String;
351
- replay: String;
352
- useStoppedGeofence: boolean;
353
- showBlueBar?: boolean;
354
- foregroundServiceEnabled?: boolean;
355
- startTrackingAfter?: number | undefined;
356
- stopTrackingAfter?: number | undefined;
357
- syncLocations?: String;
358
- stoppedGeofenceRadius: number;
359
- useMovingGeofence: boolean;
360
- movingGeofenceRadius: number;
361
- syncGeofences: boolean;
362
- useVisits?: boolean;
363
- useSignificantLocationChanges?: boolean;
364
- beacons: boolean;
365
- syncGeofencesLimit?: number;
366
- }
367
- export interface RadarLogConversionOptions {
368
- name: string;
369
- revenue?: number;
370
- metadata?: object;
371
- }
372
431
  export type RadarRouteMode = "foot" | "bike" | "car";
373
- export interface RadarTrackingStatus {
374
- isTracking: string;
375
- }
376
432
  export interface RadarTrackingOptionsForegroundService {
377
433
  text?: string;
378
434
  title?: string;
@@ -383,43 +439,4 @@ export interface RadarTrackingOptionsForegroundService {
383
439
  id?: number;
384
440
  channelName?: string;
385
441
  }
386
- export interface RadarTripOptions {
387
- externalId: string;
388
- metadata?: object;
389
- destinationGeofenceTag?: string;
390
- destinationGeofenceExternalId?: string;
391
- mode?: RadarRouteMode;
392
- scheduledArrivalAt?: Date;
393
- approachingThreshold?: number;
394
- }
395
442
  export type RadarTripStatus = "unknown" | "started" | "approaching" | "arrived" | "expired" | "completed" | "canceled";
396
- interface RadarEventUpdate {
397
- user: RadarUser;
398
- events: RadarEvent[];
399
- }
400
- interface RadarEventUpdateCallback {
401
- (args: RadarEventUpdate): void;
402
- }
403
- interface RadarLocationUpdate {
404
- location: Location;
405
- user: RadarUser;
406
- }
407
- interface RadarLocationUpdateCallback {
408
- (args: RadarLocationUpdate): void;
409
- }
410
- interface RadarClientLocationUpdate {
411
- location: Location;
412
- stopped: boolean;
413
- source: string;
414
- }
415
- interface RadarClientLocationUpdateCallback {
416
- (args: RadarClientLocationUpdate): void;
417
- }
418
- interface RadarErrorCallback {
419
- (status: string): void;
420
- }
421
- interface RadarLogUpdateCallback {
422
- (status: string): void;
423
- }
424
- export type RadarListenerCallback = RadarEventUpdateCallback | RadarLocationUpdateCallback | RadarClientLocationUpdateCallback | RadarErrorCallback | RadarLogUpdateCallback;
425
- export {};
package/dist/src/index.js CHANGED
@@ -18,14 +18,8 @@ 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
- //type RadarInterface = Platform["OS"] extends "web" ? RadarNativeInterface : any;
22
- //type RadarInterface = RadarNativeInterface;
23
21
  let module;
24
- // if (Platform.OS === "web") {
25
- // module = require("./index.web").default;
26
- // } else {
27
22
  module = require("./index.native").default;
28
- //}
29
23
  exports.default = module;
30
24
  var index_web_1 = require("./index.web");
31
25
  Object.defineProperty(exports, "RadarRNWeb", { enumerable: true, get: function () { return __importDefault(index_web_1).default; } });
@@ -33,9 +33,7 @@ const trackOnce = (options) => {
33
33
  let backCompatibleOptions = options;
34
34
  if (options && "latitude" in options) {
35
35
  backCompatibleOptions = {
36
- location: {
37
- ...options,
38
- },
36
+ location: Object.assign({}, options),
39
37
  };
40
38
  }
41
39
  return react_native_1.NativeModules.RNRadar.trackOnce(backCompatibleOptions);
@@ -53,7 +51,6 @@ const isUsingRemoteTrackingOptions = () => react_native_1.NativeModules.RNRadar.
53
51
  const isTracking = () => react_native_1.NativeModules.RNRadar.isTracking();
54
52
  const setForegroundServiceOptions = (options) => react_native_1.NativeModules.RNRadar.setForegroundServiceOptions(options);
55
53
  const setNotificationOptions = (options) => react_native_1.NativeModules.RNRadar.setNotificationOptions(options);
56
- // Take a closer look?
57
54
  const getTripOptions = () => react_native_1.NativeModules.RNRadar.getTripOptions();
58
55
  const startTrip = (options) => react_native_1.NativeModules.RNRadar.startTrip(options);
59
56
  const completeTrip = () => react_native_1.NativeModules.RNRadar.completeTrip();