@hello.nrfcloud.com/nrfcloud-api-helpers 3.0.59 → 3.0.60
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/dist/api/groundFix.d.ts +3 -0
- package/dist/api/groundFix.js +17 -4
- package/package.json +2 -2
package/dist/api/groundFix.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { type Static } from '@sinclair/typebox';
|
|
2
2
|
import { type ValidationError } from './validatedFetch.js';
|
|
3
|
+
export declare const lat: import("@sinclair/typebox").TNumber;
|
|
4
|
+
export declare const lng: import("@sinclair/typebox").TNumber;
|
|
5
|
+
export declare const accuracy: import("@sinclair/typebox").TNumber;
|
|
3
6
|
/**
|
|
4
7
|
* @link https://api.nrfcloud.com/v1/#tag/Ground-Fix
|
|
5
8
|
*/
|
package/dist/api/groundFix.js
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
import { accuracy as TAccuracy, lat as TLat, lng as TLng, } from '@hello.nrfcloud.com/proto/hello';
|
|
2
1
|
import { Type } from '@sinclair/typebox';
|
|
3
2
|
import { JSONPayload, validatedFetch, } from './validatedFetch.js';
|
|
3
|
+
export const lat = Type.Number({
|
|
4
|
+
minimum: -90,
|
|
5
|
+
maximum: 90,
|
|
6
|
+
description: 'Latitude in degrees',
|
|
7
|
+
});
|
|
8
|
+
export const lng = Type.Number({
|
|
9
|
+
minimum: -180,
|
|
10
|
+
maximum: 180,
|
|
11
|
+
description: 'Longitude in degrees',
|
|
12
|
+
});
|
|
13
|
+
export const accuracy = Type.Number({
|
|
14
|
+
minimum: 0,
|
|
15
|
+
description: 'HPE (horizontal positioning error) in meters',
|
|
16
|
+
});
|
|
4
17
|
/**
|
|
5
18
|
* @link https://api.nrfcloud.com/v1/#tag/Ground-Fix
|
|
6
19
|
*/
|
|
7
20
|
export const GroundFixType = Type.Object({
|
|
8
|
-
lat
|
|
9
|
-
lon:
|
|
10
|
-
uncertainty:
|
|
21
|
+
lat, // 63.41999531
|
|
22
|
+
lon: lng, // 10.42999506
|
|
23
|
+
uncertainty: accuracy, // 2420
|
|
11
24
|
fulfilledWith: Type.Literal('SCELL'),
|
|
12
25
|
});
|
|
13
26
|
export const groundFix = ({ apiKey, endpoint, }, fetchImplementation) => async (cell) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hello.nrfcloud.com/nrfcloud-api-helpers",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.60",
|
|
4
4
|
"description": "Helper functions for integrating nRF Cloud APIs in AWS lambdas written in TypeScript.",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./*": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@aws-sdk/client-ssm": "^3.583.0",
|
|
87
87
|
"@aws-sdk/util-dynamodb": "^3.584.0",
|
|
88
88
|
"@bifravst/aws-ssm-settings-helpers": "^1.1.22",
|
|
89
|
-
"@hello.nrfcloud.com/proto": "^
|
|
89
|
+
"@hello.nrfcloud.com/proto": "^13.0.0",
|
|
90
90
|
"@sinclair/typebox": "^0.32.31"
|
|
91
91
|
}
|
|
92
92
|
}
|