radar-sdk-js 4.5.2 → 4.5.3

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/README.md CHANGED
@@ -56,7 +56,7 @@ Radar.initialize('prj_test_pk_...', { /* options */ });
56
56
 
57
57
  Add the following script in your `html` file
58
58
  ```html
59
- <script src="https://js.radar.com/v4.5.2/radar.min.js"></script>
59
+ <script src="https://js.radar.com/v4.5.3/radar.min.js"></script>
60
60
  ```
61
61
 
62
62
  Then initialize the Radar SDK
@@ -73,8 +73,8 @@ To create a map, first initialize the Radar SDK with your publishable key. Then
73
73
  ```html
74
74
  <html>
75
75
  <head>
76
- <link href="https://js.radar.com/v4.5.2/radar.css" rel="stylesheet">
77
- <script src="https://js.radar.com/v4.5.2/radar.min.js"></script>
76
+ <link href="https://js.radar.com/v4.5.3/radar.css" rel="stylesheet">
77
+ <script src="https://js.radar.com/v4.5.3/radar.min.js"></script>
78
78
  </head>
79
79
 
80
80
  <body>
@@ -98,8 +98,8 @@ To create an autocomplete input, first initialize the Radar SDK with your publis
98
98
  ```html
99
99
  <html>
100
100
  <head>
101
- <link href="https://js.radar.com/v4.5.2/radar.css" rel="stylesheet">
102
- <script src="https://js.radar.com/v4.5.2/radar.min.js"></script>
101
+ <link href="https://js.radar.com/v4.5.3/radar.css" rel="stylesheet">
102
+ <script src="https://js.radar.com/v4.5.3/radar.min.js"></script>
103
103
  </head>
104
104
 
105
105
  <body>
@@ -130,8 +130,8 @@ To power [geofencing](https://radar.com/documentation/geofencing/overview) exper
130
130
  ```html
131
131
  <html>
132
132
  <head>
133
- <link href="https://js.radar.com/v4.5.2/radar.css" rel="stylesheet">
134
- <script src="https://js.radar.com/v4.5.2/radar.min.js"></script>
133
+ <link href="https://js.radar.com/v4.5.3/radar.css" rel="stylesheet">
134
+ <script src="https://js.radar.com/v4.5.3/radar.min.js"></script>
135
135
  </head>
136
136
 
137
137
  <body>
package/dist/api.d.ts CHANGED
@@ -23,6 +23,7 @@ declare class Radar {
23
23
  static completeTrip(): Promise<import("./types").RadarTripResponse>;
24
24
  static cancelTrip(): Promise<import("./types").RadarTripResponse>;
25
25
  static logConversion(params: RadarConversionParams): Promise<import("./types").RadarConversionResponse>;
26
+ static setProduct(product?: string): void;
26
27
  static onTokenUpdated(callback: (token: RadarTrackVerifiedResponse) => void): void;
27
28
  static forwardGeocode(params: RadarForwardGeocodeParams): Promise<import("./types").RadarGeocodeResponse>;
28
29
  static reverseGeocode(params: RadarReverseGeocodeParams): Promise<import("./types").RadarGeocodeResponse>;
package/dist/radar.js CHANGED
@@ -90,6 +90,9 @@ class Storage {
90
90
  static get TRIP_OPTIONS() {
91
91
  return 'radar-trip-options';
92
92
  }
93
+ static get PRODUCT() {
94
+ return 'radar-product';
95
+ }
93
96
  static getStorage() {
94
97
  const storage = window === null || window === void 0 ? void 0 : window.localStorage;
95
98
  if (!storage) {
@@ -405,7 +408,7 @@ class Navigator {
405
408
  }
406
409
  }
407
410
 
408
- var SDK_VERSION = '4.5.2';
411
+ var SDK_VERSION = '4.5.3';
409
412
 
410
413
  const inFlightRequests = new Map();
411
414
  class Http {
@@ -1222,6 +1225,11 @@ class TrackAPI {
1222
1225
  if (tripOptions) {
1223
1226
  tripOptions.version = '2';
1224
1227
  }
1228
+ const headers = {};
1229
+ const product = Storage.getItem(Storage.PRODUCT);
1230
+ if (product) {
1231
+ headers['X-Radar-Product'] = product;
1232
+ }
1225
1233
  const body = Object.assign(Object.assign({}, params), { locationAuthorization,
1226
1234
  accuracy,
1227
1235
  description,
@@ -1257,6 +1265,7 @@ class TrackAPI {
1257
1265
  langs })),
1258
1266
  };
1259
1267
  const reqToken = yield signJWT(payload, dk);
1268
+ headers['X-Radar-Body-Is-Token'] = 'true';
1260
1269
  response = yield Http.request({
1261
1270
  host,
1262
1271
  method: 'POST',
@@ -1264,9 +1273,7 @@ class TrackAPI {
1264
1273
  data: {
1265
1274
  token: reqToken,
1266
1275
  },
1267
- headers: {
1268
- 'X-Radar-Body-Is-Token': 'true',
1269
- },
1276
+ headers,
1270
1277
  });
1271
1278
  let { user, events, token, expiresAt, expiresIn, passed, failureReasons, _id } = response;
1272
1279
  const location = { latitude, longitude, accuracy };
@@ -1293,6 +1300,7 @@ class TrackAPI {
1293
1300
  method: 'POST',
1294
1301
  path: 'track',
1295
1302
  data: body,
1303
+ headers,
1296
1304
  });
1297
1305
  const { user, events } = response;
1298
1306
  const location = { latitude, longitude, accuracy };
@@ -1581,6 +1589,13 @@ let Radar$1 = class Radar {
1581
1589
  static logConversion(params) {
1582
1590
  return ConversionsAPI.logConversion(params);
1583
1591
  }
1592
+ static setProduct(product) {
1593
+ if (!product) {
1594
+ Storage.removeItem(Storage.PRODUCT);
1595
+ return;
1596
+ }
1597
+ Storage.setItem(Storage.PRODUCT, String(product).trim());
1598
+ }
1584
1599
  ///////////////////////
1585
1600
  // Listeners
1586
1601
  ///////////////////////
@@ -1978,7 +1993,6 @@ const defaultRadarMapOptions = {
1978
1993
  showZoomControls: true,
1979
1994
  };
1980
1995
  const defaultMaplibreOptions = {
1981
- minZoom: 1,
1982
1996
  maxZoom: 20,
1983
1997
  attributionControl: false,
1984
1998
  dragRotate: false,
package/dist/radar.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"radar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/storage.d.ts CHANGED
@@ -7,6 +7,7 @@ declare class Storage {
7
7
  static get METADATA(): string;
8
8
  static get CACHED_LOCATION(): string;
9
9
  static get TRIP_OPTIONS(): string;
10
+ static get PRODUCT(): string;
10
11
  private static getStorage;
11
12
  static setItem(key: string, value: string): void;
12
13
  static getItem(key: string): string | null;
package/dist/types.d.ts CHANGED
@@ -53,6 +53,7 @@ export interface RadarTrackParams {
53
53
  tripOptions?: RadarTripOptions;
54
54
  desiredAccuracy?: 'high' | 'medium' | 'low';
55
55
  fraud?: boolean;
56
+ reason?: string;
56
57
  }
57
58
  export interface RadarTrackVerifiedParams {
58
59
  userId?: string;
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "4.5.2";
1
+ declare const _default: "4.5.3";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "radar-sdk-js",
3
- "version": "4.5.2",
3
+ "version": "4.5.3",
4
4
  "description": "Web Javascript SDK for Radar, location infrastructure for mobile and web apps.",
5
5
  "homepage": "https://radar.com",
6
6
  "type": "module",
package/src/api/track.ts CHANGED
@@ -12,6 +12,11 @@ import { ping } from '../util/net';
12
12
 
13
13
  import type { RadarTrackParams, RadarTrackResponse, RadarTrackVerifiedResponse } from '../types';
14
14
 
15
+ type TrackRequestHeaders = {
16
+ 'X-Radar-Body-Is-Token'?: string;
17
+ 'X-Radar-Product'?: string;
18
+ }
19
+
15
20
  class TrackAPI {
16
21
  static async trackOnce(params: RadarTrackParams) {
17
22
  const options = Config.get();
@@ -66,6 +71,13 @@ class TrackAPI {
66
71
  tripOptions.version = '2';
67
72
  }
68
73
 
74
+ const headers: TrackRequestHeaders = {}
75
+
76
+ const product = Storage.getItem(Storage.PRODUCT)
77
+ if (product) {
78
+ headers['X-Radar-Product'] = product
79
+ }
80
+
69
81
  const body = {
70
82
  ...params,
71
83
  locationAuthorization,
@@ -117,6 +129,7 @@ class TrackAPI {
117
129
  };
118
130
 
119
131
  const reqToken = await signJWT(payload, dk);
132
+ headers['X-Radar-Body-Is-Token'] = 'true'
120
133
 
121
134
  response = await Http.request({
122
135
  host,
@@ -125,9 +138,7 @@ class TrackAPI {
125
138
  data: {
126
139
  token: reqToken,
127
140
  },
128
- headers: {
129
- 'X-Radar-Body-Is-Token': 'true',
130
- },
141
+ headers,
131
142
  });
132
143
 
133
144
  let { user, events, token, expiresAt, expiresIn, passed, failureReasons, _id } = response;
@@ -159,6 +170,7 @@ class TrackAPI {
159
170
  method: 'POST',
160
171
  path: 'track',
161
172
  data: body,
173
+ headers,
162
174
  });
163
175
 
164
176
  const { user, events } = response;
package/src/api.ts CHANGED
@@ -190,6 +190,14 @@ class Radar {
190
190
  return ConversionsAPI.logConversion(params);
191
191
  }
192
192
 
193
+ public static setProduct(product?: string) {
194
+ if (!product) {
195
+ Storage.removeItem(Storage.PRODUCT);
196
+ return;
197
+ }
198
+ Storage.setItem(Storage.PRODUCT, String(product).trim());
199
+ }
200
+
193
201
  ///////////////////////
194
202
  // Listeners
195
203
  ///////////////////////
package/src/storage.ts CHANGED
@@ -28,6 +28,10 @@ class Storage {
28
28
  return 'radar-trip-options';
29
29
  }
30
30
 
31
+ public static get PRODUCT() {
32
+ return 'radar-product';
33
+ }
34
+
31
35
  private static getStorage() {
32
36
  const storage = window?.localStorage;
33
37
  if (!storage) {
package/src/types.ts CHANGED
@@ -75,6 +75,7 @@ export interface RadarTrackParams {
75
75
  tripOptions?: RadarTripOptions;
76
76
  desiredAccuracy?: 'high' | 'medium' | 'low';
77
77
  fraud?: boolean;
78
+ reason?: string;
78
79
  }
79
80
 
80
81
  export interface RadarTrackVerifiedParams {
@@ -33,7 +33,6 @@ const defaultRadarMapOptions: Partial<RadarMapOptions> = {
33
33
  };
34
34
 
35
35
  const defaultMaplibreOptions: Partial<maplibregl.MapOptions> = {
36
- minZoom: 1,
37
36
  maxZoom: 20,
38
37
  attributionControl: false,
39
38
  dragRotate: false,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export default '4.5.2';
1
+ export default '4.5.3';