react-native-radar 3.14.0 → 3.16.0

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 (61) hide show
  1. package/README.md +10 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/io/radar/react/RNRadarModule.java +1 -1
  4. package/app.plugin.js +1 -0
  5. package/dist/{src/ui → ui}/autocomplete.d.ts +2 -1
  6. package/dist/{src/ui → ui}/autocomplete.js +1 -1
  7. package/dist/{src/ui → ui}/map.d.ts +2 -1
  8. package/ios/Cartfile.resolved +1 -1
  9. package/ios/RNRadar.m +1 -1
  10. package/package.json +18 -11
  11. package/plugin/build/index.d.ts +3 -0
  12. package/plugin/build/index.js +6 -0
  13. package/plugin/build/types.d.ts +9 -0
  14. package/plugin/build/types.js +2 -0
  15. package/plugin/build/withRadar.d.ts +4 -0
  16. package/plugin/build/withRadar.js +26 -0
  17. package/plugin/build/withRadarAndroid.d.ts +3 -0
  18. package/plugin/build/withRadarAndroid.js +107 -0
  19. package/plugin/build/withRadarIOS.d.ts +3 -0
  20. package/plugin/build/withRadarIOS.js +38 -0
  21. package/react-native-radar.podspec +1 -1
  22. package/dist/package.json +0 -84
  23. package/src/@types/RadarNativeInterface.ts +0 -106
  24. package/src/@types/types.ts +0 -784
  25. package/src/helpers.js +0 -15
  26. package/src/index.native.ts +0 -298
  27. package/src/index.ts +0 -22
  28. package/src/index.web.js +0 -410
  29. package/src/ui/autocomplete.jsx +0 -323
  30. package/src/ui/back.png +0 -0
  31. package/src/ui/close.png +0 -0
  32. package/src/ui/images.js +0 -5
  33. package/src/ui/map-logo.png +0 -0
  34. package/src/ui/map.jsx +0 -122
  35. package/src/ui/marker.png +0 -0
  36. package/src/ui/radar-logo.png +0 -0
  37. package/src/ui/search.png +0 -0
  38. package/src/ui/styles.js +0 -125
  39. /package/dist/{src/@types → @types}/RadarNativeInterface.d.ts +0 -0
  40. /package/dist/{src/@types → @types}/RadarNativeInterface.js +0 -0
  41. /package/dist/{src/@types → @types}/types.d.ts +0 -0
  42. /package/dist/{src/@types → @types}/types.js +0 -0
  43. /package/dist/{src/helpers.d.ts → helpers.d.ts} +0 -0
  44. /package/dist/{src/helpers.js → helpers.js} +0 -0
  45. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  46. /package/dist/{src/index.js → index.js} +0 -0
  47. /package/dist/{src/index.native.d.ts → index.native.d.ts} +0 -0
  48. /package/dist/{src/index.native.js → index.native.js} +0 -0
  49. /package/dist/{src/index.web.d.ts → index.web.d.ts} +0 -0
  50. /package/dist/{src/index.web.js → index.web.js} +0 -0
  51. /package/dist/{src/ui → ui}/back.png +0 -0
  52. /package/dist/{src/ui → ui}/close.png +0 -0
  53. /package/dist/{src/ui → ui}/images.d.ts +0 -0
  54. /package/dist/{src/ui → ui}/images.js +0 -0
  55. /package/dist/{src/ui → ui}/map-logo.png +0 -0
  56. /package/dist/{src/ui → ui}/map.js +0 -0
  57. /package/dist/{src/ui → ui}/marker.png +0 -0
  58. /package/dist/{src/ui → ui}/radar-logo.png +0 -0
  59. /package/dist/{src/ui → ui}/search.png +0 -0
  60. /package/dist/{src/ui → ui}/styles.d.ts +0 -0
  61. /package/dist/{src/ui → ui}/styles.js +0 -0
@@ -1,784 +0,0 @@
1
- import { Platform } from 'react-native';
2
-
3
- export type RadarMetadata = Record<string, string | number | boolean>;
4
-
5
- export interface RadarTrackOnceOptions {
6
- location?: Location;
7
- desiredAccuracy?: RadarTrackingOptionsDesiredAccuracy;
8
- beacons?: boolean;
9
- }
10
-
11
- export interface RadarTrackVerifiedOptions {
12
- beacons?: boolean;
13
- }
14
-
15
- /**
16
- * Options for tracking the user's location.
17
- * @see {@link https://radar.com/documentation/sdk/tracking}
18
- */
19
- export interface RadarTrackingOptions {
20
- desiredStoppedUpdateInterval: number;
21
- fastestStoppedUpdateInterval?: number;
22
- desiredMovingUpdateInterval: number;
23
- fastestMovingUpdateInterval?: number;
24
- desiredSyncInterval: number;
25
- desiredAccuracy: RadarTrackingOptionsDesiredAccuracy;
26
- stopDuration: number;
27
- stopDistance: number;
28
- sync: "all" | "stopsAndExits" | "none";
29
- replay: "all" | "stops" | "none";
30
- useStoppedGeofence: boolean;
31
- showBlueBar?: boolean;
32
- startTrackingAfter?: number;
33
- stopTrackingAfter?: number;
34
- stoppedGeofenceRadius: number;
35
- useMovingGeofence: boolean;
36
- movingGeofenceRadius: number;
37
- syncGeofences: boolean;
38
- useVisits?: boolean;
39
- useSignificantLocationChanges?: boolean;
40
- beacons: boolean;
41
- syncGeofencesLimit?: number;
42
- foregroundServiceEnabled?: boolean;
43
- }
44
-
45
-
46
-
47
- export const presetContinuousIOS: RadarTrackingOptions = {
48
- desiredStoppedUpdateInterval: 30,
49
- desiredMovingUpdateInterval: 30,
50
- desiredSyncInterval: 20,
51
- desiredAccuracy:'high',
52
- stopDuration: 140,
53
- stopDistance: 70,
54
- replay: 'none',
55
- useStoppedGeofence: false,
56
- showBlueBar: true,
57
- startTrackingAfter: undefined,
58
- stopTrackingAfter: undefined,
59
- stoppedGeofenceRadius: 0,
60
- useMovingGeofence: false,
61
- movingGeofenceRadius: 0,
62
- syncGeofences: true,
63
- useVisits: false,
64
- useSignificantLocationChanges: false,
65
- beacons: false,
66
- sync: 'all',
67
- };
68
-
69
- export const presetContinuousAndroid: RadarTrackingOptions = {
70
- desiredStoppedUpdateInterval: 30,
71
- fastestStoppedUpdateInterval: 30,
72
- desiredMovingUpdateInterval: 30,
73
- fastestMovingUpdateInterval: 30,
74
- desiredSyncInterval: 20,
75
- desiredAccuracy: 'high',
76
- stopDuration: 140,
77
- stopDistance: 70,
78
- replay: 'none',
79
- sync: 'all',
80
- useStoppedGeofence: false,
81
- stoppedGeofenceRadius: 0,
82
- useMovingGeofence: false,
83
- movingGeofenceRadius: 0,
84
- syncGeofences: true,
85
- syncGeofencesLimit: 0,
86
- foregroundServiceEnabled: true,
87
- beacons: false,
88
- startTrackingAfter: undefined,
89
- stopTrackingAfter: undefined,
90
- };
91
-
92
- export const presetContinuous: RadarTrackingOptions = Platform.OS === 'ios' ? presetContinuousIOS : presetContinuousAndroid;
93
-
94
- export const presetResponsiveIOS: RadarTrackingOptions = {
95
- desiredStoppedUpdateInterval: 0,
96
- desiredMovingUpdateInterval: 150,
97
- desiredSyncInterval: 20,
98
- desiredAccuracy:'medium',
99
- stopDuration: 140,
100
- stopDistance: 70,
101
- replay: 'stops',
102
- useStoppedGeofence: true,
103
- showBlueBar: false,
104
- startTrackingAfter: undefined,
105
- stopTrackingAfter: undefined,
106
- stoppedGeofenceRadius: 100,
107
- useMovingGeofence: true,
108
- movingGeofenceRadius: 100,
109
- syncGeofences: true,
110
- useVisits: true,
111
- useSignificantLocationChanges: true,
112
- beacons: false,
113
- sync: 'all',
114
- };
115
-
116
- export const presetResponsiveAndroid: RadarTrackingOptions = {
117
- desiredStoppedUpdateInterval: 0,
118
- fastestStoppedUpdateInterval: 0,
119
- desiredMovingUpdateInterval: 150,
120
- fastestMovingUpdateInterval: 30,
121
- desiredSyncInterval: 20,
122
- desiredAccuracy:"medium",
123
- stopDuration: 140,
124
- stopDistance: 70,
125
- replay: 'stops',
126
- sync: 'all',
127
- useStoppedGeofence: true,
128
- stoppedGeofenceRadius: 100,
129
- useMovingGeofence: true,
130
- movingGeofenceRadius: 100,
131
- syncGeofences: true,
132
- syncGeofencesLimit: 10,
133
- foregroundServiceEnabled: false,
134
- beacons: false,
135
- startTrackingAfter: undefined,
136
- stopTrackingAfter: undefined,
137
- };
138
-
139
- export const presetResponsive: RadarTrackingOptions = Platform.OS === 'ios' ? presetResponsiveIOS : presetResponsiveAndroid;
140
-
141
- export const presetEfficientIOS: RadarTrackingOptions = {
142
- desiredStoppedUpdateInterval: 0,
143
- desiredMovingUpdateInterval: 0,
144
- desiredSyncInterval: 0,
145
- desiredAccuracy: "medium",
146
- stopDuration: 0,
147
- stopDistance: 0,
148
- replay: 'stops',
149
- useStoppedGeofence: false,
150
- showBlueBar: false,
151
- startTrackingAfter: undefined,
152
- stopTrackingAfter: undefined,
153
- stoppedGeofenceRadius: 0,
154
- useMovingGeofence: false,
155
- movingGeofenceRadius: 0,
156
- syncGeofences: true,
157
- useVisits: true,
158
- useSignificantLocationChanges: false,
159
- beacons: false,
160
- sync: 'all',
161
- };
162
-
163
- export const presetEfficientAndroid: RadarTrackingOptions = {
164
- desiredStoppedUpdateInterval: 3600,
165
- fastestStoppedUpdateInterval: 1200,
166
- desiredMovingUpdateInterval: 1200,
167
- fastestMovingUpdateInterval: 360,
168
- desiredSyncInterval: 140,
169
- desiredAccuracy: 'medium',
170
- stopDuration: 140,
171
- stopDistance: 70,
172
- replay: 'stops',
173
- sync: 'all',
174
- useStoppedGeofence: false,
175
- stoppedGeofenceRadius: 0,
176
- useMovingGeofence: false,
177
- movingGeofenceRadius: 0,
178
- syncGeofences: true,
179
- syncGeofencesLimit: 10,
180
- foregroundServiceEnabled: false,
181
- beacons: false,
182
- startTrackingAfter: undefined,
183
- stopTrackingAfter: undefined,
184
- };
185
-
186
- export const presetEfficient: RadarTrackingOptions = Platform.OS === 'ios' ? presetEfficientIOS : presetEfficientAndroid;
187
-
188
-
189
- export interface RadarMockTrackingOptions {
190
- origin: Location;
191
- destination: Location;
192
- mode: RadarRouteMode;
193
- steps: number;
194
- interval: number;
195
- }
196
-
197
- export interface RadarVerifiedTrackingOptions {
198
- interval?: number;
199
- beacons?: boolean;
200
- }
201
-
202
- export interface RadarVerifiedLocationToken {
203
- user: RadarUser;
204
- events: RadarEvent[];
205
- token: string;
206
- expiresAt: Date;
207
- expiresIn: number;
208
- passed: boolean;
209
- }
210
-
211
- export interface RadarGetDistanceOptions {
212
- origin?: Location;
213
- destination?: Location;
214
- modes?: RadarRouteMode[];
215
- units?: "metric" | "imperial";
216
- }
217
-
218
- export interface RadarGetMatrixOptions {
219
- origins?: Location[];
220
- destinations?: Location[];
221
- mode?: RadarRouteMode;
222
- units?: "metric" | "imperial";
223
- }
224
-
225
- export interface RadarUpdateTripOptions {
226
- options: RadarTripOptions;
227
- status: RadarTripStatus;
228
- }
229
-
230
- export interface RadarStartTripOptions {
231
- tripOptions: RadarTripOptions;
232
- trackingOptions?: RadarTrackingOptions;
233
- }
234
-
235
- export interface RadarSearchGeofencesOptions {
236
- near?: Location;
237
- radius?: number;
238
- metadata?: RadarMetadata;
239
- tags?: string[];
240
- limit?: number;
241
- includeGeometry: boolean;
242
- }
243
-
244
- export interface RadarTrackingOptionsForegroundServiceOptions {
245
- text?: string;
246
- title?: string;
247
- updatesOnly: boolean;
248
- activity?: string;
249
- importance?: number;
250
- id?: number;
251
- channelName?: string;
252
- iconString?: string;
253
- iconColor?: string;
254
- }
255
-
256
- export interface RadarSearchPlacesOptions {
257
- near?: Location;
258
- radius?: number;
259
- chains?: string[];
260
- chainMetadata?: RadarMetadata;
261
- categories?: string[];
262
- groups?: string[];
263
- limit?: number;
264
- }
265
-
266
- export interface RadarAutocompleteOptions {
267
- query: string;
268
- near?: Location;
269
- layers?: string[];
270
- limit: number;
271
- country?: string;
272
- /** @deprecated this is always true, regardless of the value passed here */
273
- expandUnits?: boolean;
274
- mailable?: boolean;
275
- }
276
-
277
- export interface RadarGeocodeOptions {
278
- address: string;
279
- layers?: string[];
280
- countries?: string[];
281
- }
282
-
283
- export interface RadarReverseGeocodeOptions {
284
- location?: Location;
285
- layers?: string[];
286
- }
287
-
288
- export interface RadarNotificationOptions {
289
- iconString?: string;
290
- iconColor?: string;
291
- foregroundServiceIconString?: string;
292
- foregroundServiceIconColor?: string;
293
- eventIconString?: string;
294
- eventIconColor?: string;
295
- }
296
-
297
- export interface RadarLogConversionOptions {
298
- name: string;
299
- revenue?: number;
300
- metadata?: RadarMetadata;
301
- }
302
-
303
- export interface RadarTripOptions {
304
- externalId: string;
305
- metadata?: RadarMetadata;
306
- destinationGeofenceTag?: string;
307
- destinationGeofenceExternalId?: string;
308
- mode?: RadarRouteMode;
309
- scheduledArrivalAt?: number;
310
- approachingThreshold?: number;
311
- }
312
-
313
- export interface RadarTrackCallback {
314
- status: string;
315
- location?: Location;
316
- user?: RadarUser;
317
- events?: RadarEvent[];
318
- }
319
-
320
- export interface RadarLocationCallback {
321
- status: string;
322
- location?: Location;
323
- stopped: boolean;
324
- }
325
-
326
- export interface RadarTripCallback {
327
- status: string;
328
- trip?: RadarTrip;
329
- events?: RadarEvent[];
330
- }
331
-
332
- export interface RadarContextCallback {
333
- status: string;
334
- location?: Location;
335
- context?: RadarContext;
336
- }
337
-
338
- export interface RadarSearchPlacesCallback {
339
- status: string;
340
- location?: Location;
341
- places?: RadarPlace[];
342
- }
343
-
344
- export interface RadarSearchGeofencesCallback {
345
- status: string;
346
- location?: Location;
347
- geofences?: RadarGeofence[];
348
- }
349
-
350
- export interface RadarAddressCallback {
351
- status: string;
352
- addresses?: RadarAddress[];
353
- }
354
-
355
- export interface RadarIPGeocodeCallback {
356
- status: string;
357
- address?: RadarAddress;
358
- proxy?: boolean;
359
- }
360
-
361
- export interface RadarValidateAddressCallback {
362
- status: string;
363
- address?: RadarAddress;
364
- verificationStatus?: RadarVerificationStatus;
365
- }
366
-
367
- export interface RadarIPGeocodeCallback {
368
- status: string;
369
- address?: RadarAddress;
370
- proxy?: boolean;
371
- }
372
-
373
- export interface RadarRouteCallback {
374
- status: string;
375
- routes?: RadarRoutes;
376
- }
377
-
378
- export interface RadarLogConversionCallback {
379
- status: string;
380
- event?: RadarEvent;
381
- }
382
-
383
- export interface RadarTrackVerifiedCallback {
384
- status: string;
385
- token?: RadarVerifiedLocationToken;
386
- }
387
-
388
- export interface RadarEventUpdate {
389
- user?: RadarUser;
390
- events: RadarEvent[];
391
- }
392
-
393
- export interface RadarEventUpdateCallback {
394
- (args: RadarEventUpdate): void;
395
- }
396
-
397
- export interface RadarLocationUpdate {
398
- location: Location;
399
- user: RadarUser;
400
- }
401
-
402
- export interface RadarLocationUpdateCallback {
403
- (args: RadarLocationUpdate): void;
404
- }
405
-
406
- export interface RadarClientLocationUpdate {
407
- location: Location;
408
- stopped: boolean;
409
- source: RadarLocationSource;
410
- }
411
-
412
- export interface RadarClientLocationUpdateCallback {
413
- (args: RadarClientLocationUpdate): void;
414
- }
415
-
416
- export interface RadarErrorCallback {
417
- (status: string): void;
418
- }
419
-
420
- export interface RadarLogUpdateCallback {
421
- (status: string): void;
422
- }
423
-
424
-
425
- export type RadarListenerCallback =
426
- | RadarEventUpdateCallback
427
- | RadarLocationUpdateCallback
428
- | RadarClientLocationUpdateCallback
429
- | RadarErrorCallback
430
- | RadarLogUpdateCallback
431
-
432
- export type RadarPermissionsStatus =
433
- | "GRANTED_FOREGROUND"
434
- | "GRANTED_BACKGROUND"
435
- | "DENIED"
436
- | "NOT_DETERMINED"
437
- | "UNKNOWN";
438
-
439
- export type RadarLocationSource =
440
- | "FOREGROUND_LOCATION"
441
- | "BACKGROUND_LOCATION"
442
- | "MANUAL_LOCATION"
443
- | "VISIT_ARRIVAL"
444
- | "VISIT_DEPARTURE"
445
- | "GEOFENCE_ENTER"
446
- | "GEOFENCE_DWELL"
447
- | "GEOFENCE_EXIT"
448
- | "MOCK_LOCATION"
449
- | "BEACON_ENTER"
450
- | "BEACON_EXIT"
451
- | "UNKNOWN";
452
-
453
- export type RadarEventChannel = "clientLocation" | "location" | "error" | "events" | "log" | "token" ;
454
-
455
- export type RadarLogLevel = "info" | "debug" | "warning" | "error" | "none";
456
-
457
- export interface RadarRouteMatrix {
458
- status: string;
459
- matrix?: RadarRoute[][];
460
- }
461
-
462
- export interface Location {
463
- latitude: number;
464
- longitude: number;
465
- accuracy?: number;
466
- speed?: number;
467
- altitude?: number;
468
- course?: number;
469
- verticalAccuracy?: number;
470
- speedAccuracy?: number;
471
- courseAccuracy?: number;
472
- mocked?: boolean;
473
- }
474
-
475
- export interface RadarUser {
476
- _id: string;
477
- userId?: string;
478
- deviceId?: string;
479
- description?: string;
480
- metadata?: RadarMetadata;
481
- location?: RadarCoordinate;
482
- geofences?: RadarGeofence[];
483
- place?: RadarPlace;
484
- beacons?: RadarBeacon[];
485
- stopped?: boolean;
486
- foreground?: boolean;
487
- country?: RadarRegion;
488
- state?: RadarRegion;
489
- dma?: RadarRegion;
490
- postalCode?: RadarRegion;
491
- nearbyPlaceChains?: RadarChain[];
492
- segments?: RadarSegment[];
493
- topChains?: RadarChain[];
494
- source?: LocationSource;
495
- trip?: RadarTrip;
496
- debug?: boolean;
497
- fraud?: RadarFraud;
498
- }
499
-
500
- export interface RadarCoordinate {
501
- type: string;
502
- coordinates: [number, number];
503
- }
504
-
505
- export type LocationSource =
506
- | "FOREGROUND_LOCATION"
507
- | "BACKGROUND_LOCATION"
508
- | "MANUAL_LOCATION"
509
- | "VISIT_ARRIVAL"
510
- | "VISIT_DEPARTURE"
511
- | "GEOFENCE_ENTER"
512
- | "GEOFENCE_EXIT"
513
- | "MOCK_LOCATION"
514
- | "BEACON_ENTER"
515
- | "BEACON_EXIT"
516
- | "UNKNOWN";
517
-
518
- export interface RadarTrip {
519
- _id: string;
520
- externalId: string;
521
- metadata?: RadarMetadata;
522
- destinationGeofenceTag?: string;
523
- destinationGeofenceExternalId?: string;
524
- mode?: RadarRouteMode;
525
- eta?: RadarTripEta;
526
- status: RadarTripStatus;
527
- scheduledArrivalAt?: Date;
528
- destinationLocation: Location;
529
- delay:RadarDelay;
530
- }
531
-
532
- export interface RadarDelay {
533
- delayed:boolean;
534
- scheduledArrivalTimeDelay:number;
535
- }
536
-
537
- export interface RadarSegment {
538
- description: string;
539
- externalId: string;
540
- }
541
-
542
- export interface RadarContext {
543
- geofences?: RadarGeofence[];
544
- place?: RadarPlace;
545
- country?: RadarRegion;
546
- state?: RadarRegion;
547
- dma?: RadarRegion;
548
- postalCode?: RadarRegion;
549
- }
550
-
551
- export interface RadarEvent {
552
- _id: string;
553
- live: boolean;
554
- type: RadarEventType;
555
- geofence?: RadarGeofence;
556
- place?: RadarPlace;
557
- region?: RadarRegion;
558
- confidence: RadarEventConfidence;
559
- duration?: number;
560
- beacon?: RadarBeacon;
561
- trip?: RadarTrip;
562
- alternatePlaces?: RadarPlace[];
563
- location?: RadarCoordinate;
564
- metadata?: RadarMetadata;
565
- replayed?: boolean;
566
- createdAt: string;
567
- actualCreatedAt: string;
568
- fraud?: RadarFraud;
569
- }
570
-
571
- export enum RadarEventConfidence {
572
- none = 0,
573
- low = 1,
574
- medium = 2,
575
- high = 3,
576
- }
577
-
578
- export type RadarEventType =
579
- | "unknown"
580
- | "user.entered_geofence"
581
- | "user.entered_beacon"
582
- | "user.dwelled_in_geofence"
583
- | "user.entered_place"
584
- | "user.entered_region_country"
585
- | "user.entered_region_dma"
586
- | "user.entered_region_state"
587
- | "user.entered_region_postal_code"
588
- | "user.exited_geofence"
589
- | "user.exited_beacon"
590
- | "user.exited_place"
591
- | "user.exited_region_country"
592
- | "user.exited_region_dma"
593
- | "user.exited_region_state"
594
- | "user.exited_region_postal_code"
595
- | "user.nearby_place_chain"
596
- | "user.started_trip"
597
- | "user.updated_trip"
598
- | "user.approaching_trip_destination"
599
- | "user.arrived_at_trip_destination"
600
- | "user.stopped_trip"
601
- | "user.arrived_at_wrong_trip_destination"
602
- | "user.delayed_during_trip"
603
- | "user.failed_fraud";
604
-
605
- export type RadarTrackingOptionsDesiredAccuracy =
606
- | "high"
607
- | "medium"
608
- | "low"
609
- | "none";
610
-
611
- export enum RadarEventVerification {
612
- accept = 1,
613
- unverify = 0,
614
- reject = -1,
615
- }
616
-
617
- export type RadarBeaconType = "eddystone" | "ibeacon";
618
-
619
- export interface RadarGeofence {
620
- _id: string;
621
- description: string;
622
- tag?: string;
623
- externalId?: string;
624
- metadata?: RadarMetadata;
625
- type?: "Circle" | "Polygon";
626
- geometryRadius?: number;
627
- geometryCenter?: RadarCoordinate;
628
- // only available for geofences of type "Polygon"
629
- coordinates?: number[][];
630
- }
631
-
632
- export interface RadarBeacon {
633
- _id: string;
634
- metadata?: RadarMetadata;
635
- type: RadarBeaconType;
636
- uuid?: string;
637
- instance?: string;
638
- major?: string;
639
- minor?: string;
640
- geometry?: RadarCoordinate;
641
- rss?: number;
642
- }
643
-
644
- export interface RadarPlace {
645
- _id: string;
646
- name: string;
647
- categories: string[];
648
- chain?: RadarChain;
649
- location: Location;
650
- metadata?: RadarMetadata;
651
- group?: string;
652
- address?: RadarAddress;
653
- }
654
-
655
- export interface RadarChain {
656
- name: string;
657
- slug: string;
658
- externalId?: string;
659
- metadata?: RadarMetadata;
660
- }
661
-
662
- export interface RadarRegion {
663
- _id: string;
664
- type: string;
665
- code: string;
666
- name: string;
667
- allowed?: boolean;
668
- flag?: string;
669
- passed?: boolean;
670
- inExclusionZone?: boolean;
671
- inBufferZone?: boolean;
672
- distanceToBorder?: number;
673
- }
674
-
675
- export interface RadarAddress {
676
- addressLabel?: string;
677
- borough?: string;
678
- city?: string;
679
- confidence?: string;
680
- country?: string;
681
- countryCode?: string;
682
- countryFlag?: string;
683
- county?: string;
684
- distance?: number;
685
- dma?: string;
686
- dmaCode?: string;
687
- formattedAddress?: string;
688
- latitude: number;
689
- layer?: string;
690
- longitude: number;
691
- metadata?: RadarMetadata;
692
- neighborhood?: string;
693
- number?: string;
694
- placeLabel?: string;
695
- plus4?: string;
696
- postalCode?: string;
697
- state?: string;
698
- stateCode?: string;
699
- street?: string;
700
- unit?: string;
701
- }
702
-
703
- export type RadarVerificationStatus =
704
- | "verified"
705
- | "partially verified"
706
- | "ambiguous"
707
- | "unverified";
708
-
709
- export interface RadarRoutes {
710
- geodesic?: RadarRouteDistance;
711
- foot?: RadarRoute;
712
- bike?: RadarRoute;
713
- car?: RadarRoute;
714
- truck?: RadarRoute;
715
- motorbike?: RadarRoute;
716
- }
717
-
718
- export interface RadarRouteGeometry {
719
- type: string;
720
- coordinates: number[][];
721
- }
722
-
723
- export interface RadarRoute {
724
- distance?: RadarRouteDistance;
725
- duration?: RadarRouteDuration;
726
- geometry?: RadarRouteGeometry;
727
- }
728
-
729
- export interface RadarRouteDistance {
730
- value: number;
731
- text: string;
732
- }
733
-
734
- export interface RadarRouteDuration {
735
- value: number;
736
- text: string;
737
- }
738
-
739
- export interface RadarTripEta {
740
- distance?: number;
741
- duration?: number;
742
- }
743
-
744
- export interface RadarFraud {
745
- passed: boolean;
746
- bypassed: boolean;
747
- verified: boolean;
748
- proxy: boolean;
749
- mocked: boolean;
750
- compromised: boolean;
751
- jumped: boolean;
752
- inaccurate: boolean;
753
- blocked: boolean;
754
- sharing: boolean;
755
- }
756
-
757
- export type RadarTrackingOptionsReplay = "all" | "stops" | "none";
758
-
759
- export type RadarTrackingOptionsSync = "none" | "stopsAndExits" | "all";
760
-
761
- export type RadarRouteMode = "foot" | "bike" | "car" | "truck" | "motorbike";
762
-
763
- export interface RadarTrackingOptionsForegroundService {
764
- text?: string;
765
- title?: string;
766
- icon?: number;
767
- updatesOnly?: boolean;
768
- activity?: string;
769
- importance?: number;
770
- id?: number;
771
- channelName?: string;
772
- iconString?: string;
773
- iconColor?: string;
774
- }
775
-
776
- export type RadarTripStatus =
777
- | "unknown"
778
- | "started"
779
- | "approaching"
780
- | "arrived"
781
- | "expired"
782
- | "completed"
783
- | "canceled";
784
-