@spotto/contract 1.0.69-alpha.19 → 1.0.69-alpha.20
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/assets/[id]/get.d.ts +17 -0
- package/dist/assets/get/query.d.ts +2 -2
- package/dist/assets/location/request.d.ts +4 -0
- package/dist/assets/summary/index.d.ts +1 -0
- package/dist/assets/summary/index.js +1 -0
- package/dist/assets/summary/index.js.map +1 -1
- package/dist/assets/summary/response.d.ts +7 -0
- package/dist/assets/summary/response.js +3 -0
- package/dist/assets/summary/response.js.map +1 -0
- package/dist/events/constants.d.ts +1 -1
- package/dist/events/constants.js +1 -0
- package/dist/events/constants.js.map +1 -1
- package/dist/events/get/response.d.ts +18 -2
- package/dist/locations/constants.d.ts +1 -1
- package/dist/locations/constants.js +2 -0
- package/dist/locations/constants.js.map +1 -1
- package/package.json +2 -2
|
@@ -29,6 +29,23 @@ export interface ILastLocation {
|
|
|
29
29
|
name: string;
|
|
30
30
|
type?: LocationType;
|
|
31
31
|
};
|
|
32
|
+
userId?: string;
|
|
33
|
+
dispatch?: {
|
|
34
|
+
location?: {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
path: string;
|
|
38
|
+
};
|
|
39
|
+
withAsset?: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
data?: Record<string, unknown>;
|
|
44
|
+
time?: number;
|
|
45
|
+
expires?: number;
|
|
46
|
+
snapshotId?: string;
|
|
47
|
+
userId?: string;
|
|
48
|
+
};
|
|
32
49
|
}
|
|
33
50
|
export interface ICandidateLocation extends IEmbeddedEntity {
|
|
34
51
|
type: LocationType;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DateCondition, SearchableSortFields, SortOrders } from '../../shared';
|
|
2
|
+
import { LocationStatus } from '../../locations/constants';
|
|
2
3
|
export declare type AssetSearchField = 'name' | 'tagIds';
|
|
3
4
|
export declare type AssetEmbedField = 'meta' | 'tagIds' | 'candidateLocations' | 'telemetry' | 'readers';
|
|
4
5
|
export declare type AssetSortField = SearchableSortFields | 'battery';
|
|
5
6
|
export declare type AssetBatteryStatus = 'critical' | 'low' | 'ok';
|
|
6
|
-
export declare type AssetLocationStatus = 'NEVERSEEN' | 'UNKNOWN' | 'HOME' | 'AWAY' | 'ROAMING' | 'MAP';
|
|
7
7
|
declare type _CustomFieldsAssetFilterBase = {
|
|
8
8
|
id: string;
|
|
9
9
|
};
|
|
@@ -32,7 +32,7 @@ export interface AssetFilters {
|
|
|
32
32
|
hasTags?: boolean;
|
|
33
33
|
hasReported?: boolean;
|
|
34
34
|
hasGeolocationState?: boolean;
|
|
35
|
-
locationStatus?: Array<
|
|
35
|
+
locationStatus?: Array<LocationStatus>;
|
|
36
36
|
visiting?: boolean;
|
|
37
37
|
battery?: AssetBatteryStatus;
|
|
38
38
|
search?: string;
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./summary"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/summary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/summary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/assets/summary/response.ts"],"names":[],"mappings":""}
|
|
@@ -4,6 +4,6 @@ export declare type AssetCrudEventType = 'AssetCreated' | 'AssetUpdated' | 'Asse
|
|
|
4
4
|
export declare type LocationCrudEventType = 'LocationCreated' | 'LocationUpdated' | 'LocationDeleted';
|
|
5
5
|
export declare type ReaderCrudEventType = 'ReaderCreated' | 'ReaderUpdated' | 'ReaderDeleted';
|
|
6
6
|
export declare type SnapshotCrudEventType = 'SnapshotCreated' | 'SnapshotDeleted';
|
|
7
|
-
export declare type SlateEventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'Exited' | 'ReaderOnline' | 'ReaderOffline';
|
|
7
|
+
export declare type SlateEventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'Exited' | 'ReaderOnline' | 'ReaderOffline' | 'AssetDispatch';
|
|
8
8
|
export declare type EventType = SlateEventType | AssetCrudEventType | LocationCrudEventType | ReaderCrudEventType | SnapshotCrudEventType | 'UserSearch' | 'WorkflowActionExecuted';
|
|
9
9
|
export declare const EVENT_TYPES: EventType[];
|
package/dist/events/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAA;AAsCY,QAAA,WAAW,GAAgB;IACtC,eAAe;IACf,cAAc;IACd,SAAS;IACT,OAAO;IACP,QAAQ;IACR,cAAc;IACd,eAAe;IACf,eAAe;IACf,cAAc;IACd,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,YAAY;IACZ,wBAAwB;CACzB,CAAA"}
|
|
@@ -85,9 +85,14 @@ export interface IWorkflowActionExecutedEvent extends IBaseEvent {
|
|
|
85
85
|
type: 'WorkflowActionExecuted';
|
|
86
86
|
workflow: ExecutedWorkflow;
|
|
87
87
|
}
|
|
88
|
+
export interface IArrivedEventAsset extends IEmbeddedEntity {
|
|
89
|
+
dispatch?: boolean;
|
|
90
|
+
userId?: string;
|
|
91
|
+
dispatchData?: Record<string, unknown>;
|
|
92
|
+
}
|
|
88
93
|
export interface IArrivedEvent extends IBaseEvent {
|
|
89
94
|
type: 'Arrived';
|
|
90
|
-
asset:
|
|
95
|
+
asset: IArrivedEventAsset;
|
|
91
96
|
location?: AssetEventLocation;
|
|
92
97
|
reader?: IEmbeddedEntity;
|
|
93
98
|
}
|
|
@@ -121,7 +126,18 @@ export interface IReaderOfflineEvent extends IBaseEvent {
|
|
|
121
126
|
type: 'ReaderOffline';
|
|
122
127
|
reader: IEmbeddedEntity;
|
|
123
128
|
}
|
|
124
|
-
export
|
|
129
|
+
export interface IAssetDispatchEventAsset extends IEmbeddedEntity {
|
|
130
|
+
dispatchUserId?: string;
|
|
131
|
+
dispatchData?: Record<string, unknown>;
|
|
132
|
+
}
|
|
133
|
+
export interface IAssetDispatchEvent extends IBaseEvent {
|
|
134
|
+
type: 'AssetDispatch';
|
|
135
|
+
asset: IAssetDispatchEventAsset;
|
|
136
|
+
locationCurrent?: Partial<IEmbeddedEntity>;
|
|
137
|
+
location?: Partial<IEmbeddedEntity>;
|
|
138
|
+
dispatchExpires: number;
|
|
139
|
+
}
|
|
140
|
+
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IAssetDispatchEvent | IWorkflowActionExecutedEvent;
|
|
125
141
|
export interface GetEventsResponse {
|
|
126
142
|
query: GetEventsQuery | null;
|
|
127
143
|
items: GetEventResponse[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare type LocationType = 'MOVING' | 'FIXED';
|
|
2
2
|
export declare const LOCATION_TYPES: LocationType[];
|
|
3
|
-
export declare type LocationStatus = 'NEVERSEEN' | 'UNKNOWN' | 'HOME' | 'AWAY' | 'ROAMING' | 'MAP';
|
|
3
|
+
export declare type LocationStatus = 'NEVERSEEN' | 'UNKNOWN' | 'HOME' | 'AWAY' | 'ROAMING' | 'MAP' | 'DISPATCH' | 'WITH';
|
|
4
4
|
export declare const LOCATION_STATUS: LocationStatus[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/locations/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,cAAc,GAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/locations/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,cAAc,GAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;AAWpD,QAAA,eAAe,GAAqB;IAC/C,WAAW;IACX,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,KAAK;IACL,UAAU;IACV,MAAM;CACP,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.69-alpha.
|
|
4
|
+
"version": "1.0.69-alpha.20",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"@types/geojson": "^7946.0.11",
|
|
19
19
|
"shx": "^0.3.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "fb9ebdac29646abb6c880aada7bf1691d1e07e9b"
|
|
22
22
|
}
|