@spotto/contract 1.0.16 → 1.0.17-alpha.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/dist/locations/[id]/get.d.ts +18 -0
- package/dist/locations/[id]/get.js +2 -0
- package/dist/locations/[id]/get.js.map +1 -1
- package/dist/locations/[id]/index.d.ts +1 -0
- package/dist/locations/[id]/index.js +1 -0
- package/dist/locations/[id]/index.js.map +1 -1
- package/dist/locations/[id]/patch/request.d.ts +4 -1
- package/dist/locations/[id]/status.d.ts +4 -0
- package/dist/locations/[id]/status.js +3 -0
- package/dist/locations/[id]/status.js.map +1 -0
- package/dist/locations/get/query.d.ts +1 -1
- package/dist/locations/post/request.d.ts +4 -1
- package/dist/readers/[id]/get.d.ts +12 -11
- package/dist/readers/[id]/status.d.ts +2 -3
- package/dist/readers/constants/types.d.ts +1 -1
- package/dist/readers/constants/types.js +7 -1
- package/dist/readers/constants/types.js.map +1 -1
- package/dist/readers/get/query.d.ts +1 -1
- package/dist/telemetry.d.ts +0 -3
- package/package.json +2 -2
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
import { Point } from '../../geo-location';
|
|
1
2
|
import { IEntityMeta, IEmbeddedEntity } from '../../shared';
|
|
2
3
|
import { IAssetTelemetry } from '../../telemetry';
|
|
3
4
|
export interface IEmbeddedReader extends IEmbeddedEntity {
|
|
4
5
|
displayName: string;
|
|
5
6
|
}
|
|
7
|
+
export interface ILocationStatusLocation {
|
|
8
|
+
id?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
firstSeen?: number;
|
|
11
|
+
lastSeen?: number;
|
|
12
|
+
moving?: boolean;
|
|
13
|
+
geolocation?: Point;
|
|
14
|
+
}
|
|
15
|
+
export interface ILocationStatus {
|
|
16
|
+
location?: ILocationStatusLocation;
|
|
17
|
+
}
|
|
18
|
+
export declare type LocationType = string;
|
|
19
|
+
export declare const LOCATION_TYPES: LocationType[];
|
|
6
20
|
export interface GetLocationResponse {
|
|
7
21
|
id: string;
|
|
8
22
|
name: string;
|
|
@@ -11,4 +25,8 @@ export interface GetLocationResponse {
|
|
|
11
25
|
telemetry?: IAssetTelemetry;
|
|
12
26
|
meta?: IEntityMeta;
|
|
13
27
|
manifestId?: string;
|
|
28
|
+
status?: ILocationStatus;
|
|
29
|
+
geolocation?: Point;
|
|
30
|
+
geofence?: any;
|
|
31
|
+
type?: LocationType;
|
|
14
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/locations/[id]/get.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/locations/[id]/get.ts"],"names":[],"mappings":";;;AAuBa,QAAA,cAAc,GAAmB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./get"), exports);
|
|
18
18
|
__exportStar(require("./patch"), exports);
|
|
19
19
|
__exportStar(require("./inventory"), exports);
|
|
20
|
+
__exportStar(require("./status"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/locations/[id]/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB;AACxB,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/locations/[id]/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { LocationType } from '../get';
|
|
1
2
|
export interface UpdateLocationRequest {
|
|
2
3
|
name?: string;
|
|
3
4
|
tagIds?: string[];
|
|
4
5
|
address?: string;
|
|
5
|
-
|
|
6
|
+
geolocation?: GeoJSON.GeoJSON;
|
|
7
|
+
geofence?: GeoJSON.GeoJSON;
|
|
6
8
|
manifestId?: string;
|
|
9
|
+
type?: LocationType | null;
|
|
7
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/locations/[id]/status.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SearchableSortFields, SortOrders } from '../../shared';
|
|
2
2
|
export declare type LocationSearchField = 'name';
|
|
3
|
-
export declare type LocationEmbedField = 'meta' | 'tagIds' | 'readers' | 'telemetry';
|
|
3
|
+
export declare type LocationEmbedField = 'meta' | 'tagIds' | 'readers' | 'telemetry' | 'status';
|
|
4
4
|
export interface LocationFilters {
|
|
5
5
|
ids?: string[];
|
|
6
6
|
tagIds?: string[];
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { LocationType } from '../[id]/get';
|
|
1
2
|
export interface PostLocationRequest {
|
|
2
3
|
name: string;
|
|
3
4
|
tagIds?: string[];
|
|
4
5
|
address?: string;
|
|
5
|
-
|
|
6
|
+
geolocation?: GeoJSON.GeoJSON;
|
|
7
|
+
geofence?: GeoJSON.GeoJSON;
|
|
6
8
|
manifestId?: string;
|
|
9
|
+
type?: LocationType;
|
|
7
10
|
}
|
|
8
11
|
export declare type PostLocationsRequest = PostLocationRequest[];
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import { Point } from '../../geo-location';
|
|
1
2
|
import { IEntityMeta, IEmbeddedEntity } from '../../shared';
|
|
2
3
|
import { IReaderTelemetry } from '../../telemetry';
|
|
3
4
|
import { ReaderType, DeviceType } from '../constants';
|
|
5
|
+
export interface IReaderStatusLocation {
|
|
6
|
+
id?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
firstSeen?: number;
|
|
9
|
+
lastSeen?: number;
|
|
10
|
+
moving?: boolean;
|
|
11
|
+
geolocation?: Point;
|
|
12
|
+
}
|
|
4
13
|
export interface IReaderStatus {
|
|
5
14
|
online: boolean;
|
|
6
|
-
transitionTime
|
|
7
|
-
|
|
8
|
-
export interface IFixedReaderLocation extends IEmbeddedEntity {
|
|
9
|
-
type: 'FIXED';
|
|
10
|
-
}
|
|
11
|
-
export interface IRovingReaderLocation extends IEmbeddedEntity {
|
|
12
|
-
type: 'ROVING';
|
|
13
|
-
firstSeen: number;
|
|
14
|
-
lastSeen: number;
|
|
15
|
+
transitionTime: number;
|
|
16
|
+
location?: IReaderStatusLocation;
|
|
15
17
|
}
|
|
16
|
-
export declare type ReaderLocation = IFixedReaderLocation | IRovingReaderLocation;
|
|
17
18
|
export interface GetReaderResponse {
|
|
18
19
|
id: string;
|
|
19
20
|
name: string;
|
|
@@ -23,7 +24,7 @@ export interface GetReaderResponse {
|
|
|
23
24
|
deviceId?: string;
|
|
24
25
|
endpoint?: string;
|
|
25
26
|
network?: string;
|
|
26
|
-
location?:
|
|
27
|
+
location?: IEmbeddedEntity;
|
|
27
28
|
telemetry?: IReaderTelemetry;
|
|
28
29
|
meta?: IEntityMeta;
|
|
29
30
|
status?: IReaderStatus;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.READER_TYPE_DETAILS = exports.READER_TYPES = void 0;
|
|
4
|
-
exports.READER_TYPES = ['FIXED', 'ROVING'];
|
|
4
|
+
exports.READER_TYPES = ['FIXED', 'ROVING', 'MOVING'];
|
|
5
5
|
exports.READER_TYPE_DETAILS = [
|
|
6
6
|
{
|
|
7
7
|
id: 'FIXED',
|
|
@@ -15,5 +15,11 @@ exports.READER_TYPE_DETAILS = [
|
|
|
15
15
|
description: 'Readers will be portable without a zone assigned and detect RFID location tags.',
|
|
16
16
|
visible: true,
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
id: 'MOVING',
|
|
20
|
+
name: 'Moving',
|
|
21
|
+
description: 'Readers will be a vehicle/boat/aircraft',
|
|
22
|
+
visible: true,
|
|
23
|
+
},
|
|
18
24
|
];
|
|
19
25
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/readers/constants/types.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/readers/constants/types.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAU3D,QAAA,mBAAmB,GAAwB;IACtD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,0DAA0D;QACvE,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,iFAAiF;QACnF,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,IAAI;KACd;CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchableSortFields, SortOrders } from '../../shared';
|
|
2
2
|
import { ReaderType, DeviceType } from '../constants';
|
|
3
3
|
export declare type ReaderSearchField = 'name' | 'deviceId';
|
|
4
|
-
export declare type ReaderEmbedField = 'meta' | 'status' | 'telemetry';
|
|
4
|
+
export declare type ReaderEmbedField = 'meta' | 'status' | 'telemetry' | 'lastLocation';
|
|
5
5
|
export interface ReaderFilters {
|
|
6
6
|
ids?: string[];
|
|
7
7
|
locationIds?: string[];
|
package/dist/telemetry.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.17-alpha.0",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@types/geojson": "^7946.0.8"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "e033d0a1eb506809b2823471ebc8ba863a98dee4"
|
|
18
18
|
}
|