radar-sdk-js 4.2.0-beta.4 → 4.2.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.
- package/README.md +7 -7
- package/dist/api/verify.d.ts +2 -2
- package/dist/errors.d.ts +3 -3
- package/dist/http.d.ts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/radar.js +1891 -1573
- package/dist/radar.js.map +1 -1
- package/dist/types.d.ts +10 -9
- package/dist/ui/map.d.ts +2 -4
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/api/search.ts +2 -0
- package/src/api/track.ts +33 -7
- package/src/api/verify.ts +13 -14
- package/src/errors.ts +9 -9
- package/src/http.ts +27 -36
- package/src/index.ts +0 -4
- package/src/navigator.ts +6 -11
- package/src/types.ts +11 -10
- package/src/ui/map.ts +141 -9
- package/src/version.ts +1 -1
- package/dist/ui/RadarLogoControl.d.ts +0 -6
- package/dist/ui/RadarMap.d.ts +0 -9
- package/dist/ui/RadarMarker.d.ts +0 -12
- package/src/ui/RadarLogoControl.ts +0 -24
- package/src/ui/RadarMap.ts +0 -166
- package/src/ui/RadarMarker.ts +0 -86
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.2.0
|
|
59
|
+
<script src="https://js.radar.com/v4.2.0/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.2.0
|
|
77
|
-
<script src="https://js.radar.com/v4.2.0
|
|
76
|
+
<link href="https://js.radar.com/v4.2.0/radar.css" rel="stylesheet">
|
|
77
|
+
<script src="https://js.radar.com/v4.2.0/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.2.0
|
|
102
|
-
<script src="https://js.radar.com/v4.2.0
|
|
101
|
+
<link href="https://js.radar.com/v4.2.0/radar.css" rel="stylesheet">
|
|
102
|
+
<script src="https://js.radar.com/v4.2.0/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.2.0
|
|
134
|
-
<script src="https://js.radar.com/v4.2.0
|
|
133
|
+
<link href="https://js.radar.com/v4.2.0/radar.css" rel="stylesheet">
|
|
134
|
+
<script src="https://js.radar.com/v4.2.0/radar.min.js"></script>
|
|
135
135
|
</head>
|
|
136
136
|
|
|
137
137
|
<body>
|
package/dist/api/verify.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RadarTrackParams,
|
|
1
|
+
import type { RadarTrackParams, RadarTrackVerifiedResponse } from '../types';
|
|
2
2
|
declare class VerifyAPI {
|
|
3
|
-
static trackVerified(params: RadarTrackParams, encrypted?: Boolean): Promise<
|
|
3
|
+
static trackVerified(params: RadarTrackParams, encrypted?: Boolean): Promise<RadarTrackVerifiedResponse>;
|
|
4
4
|
}
|
|
5
5
|
export default VerifyAPI;
|
package/dist/errors.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export declare class RadarPublishableKeyError extends RadarError {
|
|
|
8
8
|
export declare class RadarLocationError extends RadarError {
|
|
9
9
|
constructor(message: string);
|
|
10
10
|
}
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class RadarPermissionsError extends RadarError {
|
|
12
12
|
constructor(message: string);
|
|
13
13
|
}
|
|
14
|
-
export declare class
|
|
14
|
+
export declare class RadarVerifyAppError extends RadarError {
|
|
15
15
|
constructor();
|
|
16
16
|
}
|
|
17
17
|
export declare class RadarBadRequestError extends RadarError {
|
|
@@ -49,7 +49,7 @@ export declare class RadarServerError extends RadarError {
|
|
|
49
49
|
response?: any;
|
|
50
50
|
constructor(response?: any);
|
|
51
51
|
}
|
|
52
|
-
export declare class
|
|
52
|
+
export declare class RadarNetworkError extends RadarError {
|
|
53
53
|
constructor();
|
|
54
54
|
}
|
|
55
55
|
export declare class RadarUnknownError extends RadarError {
|
package/dist/http.d.ts
CHANGED
|
@@ -4,12 +4,11 @@ interface HttpResponse {
|
|
|
4
4
|
data: any;
|
|
5
5
|
}
|
|
6
6
|
declare class Http {
|
|
7
|
-
static request({ method, path, data, host,
|
|
7
|
+
static request({ method, path, data, host, headers, }: {
|
|
8
8
|
method: HttpMethod;
|
|
9
9
|
path: string;
|
|
10
10
|
data?: any;
|
|
11
11
|
host?: string;
|
|
12
|
-
versioned?: boolean;
|
|
13
12
|
headers?: Record<string, string>;
|
|
14
13
|
}): Promise<HttpResponse>;
|
|
15
14
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -62,8 +62,7 @@ declare class Radar {
|
|
|
62
62
|
static setMetadata(metadata?: RadarMetadata): void;
|
|
63
63
|
static getLocation(): Promise<import("./types").NavigatorPosition>;
|
|
64
64
|
static trackOnce(params?: RadarTrackParams): Promise<import("./types").RadarTrackResponse>;
|
|
65
|
-
static trackVerified(params?: RadarTrackParams): Promise<import("./types").
|
|
66
|
-
static trackVerifiedToken(params?: RadarTrackParams): Promise<import("./types").RadarTrackResponse | import("./types").RadarTrackTokenResponse>;
|
|
65
|
+
static trackVerified(params?: RadarTrackParams): Promise<import("./types").RadarTrackVerifiedResponse>;
|
|
67
66
|
static getContext(params: Location): Promise<import("./types").RadarContextResponse>;
|
|
68
67
|
static setTripOptions(tripOptions?: RadarTripOptions): void;
|
|
69
68
|
static clearTripOptions(): void;
|