@spotto/contract 1.0.68-alpha.3 → 1.0.68-alpha.4
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/get/query.d.ts +1 -0
- package/dist/events/constants.d.ts +1 -1
- package/dist/events/constants.js +0 -1
- package/dist/events/constants.js.map +1 -1
- package/dist/events/get/response.d.ts +16 -12
- package/dist/types/[id]/get.d.ts +1 -1
- package/dist/types/post/request.d.ts +1 -1
- package/package.json +2 -2
|
@@ -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' | '
|
|
7
|
+
export declare type SlateEventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'Exited' | 'ReaderOnline' | 'ReaderOffline';
|
|
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;AAqCY,QAAA,WAAW,GAAgB;IACtC,eAAe;IACf,cAAc;IACd,SAAS;IACT,OAAO;IACP,QAAQ;IACR,cAAc;IACd,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"}
|
|
@@ -10,6 +10,15 @@ export interface EventLocation extends IEmbeddedEntity {
|
|
|
10
10
|
type: LocationType;
|
|
11
11
|
organisation?: IEmbeddedEntity;
|
|
12
12
|
}
|
|
13
|
+
export interface AssetEventLocation extends Partial<IEmbeddedEntity> {
|
|
14
|
+
type: LocationType;
|
|
15
|
+
organisation?: IEmbeddedEntity;
|
|
16
|
+
withAsset?: IEmbeddedEntity;
|
|
17
|
+
locationGPS?: {
|
|
18
|
+
type: 'Point';
|
|
19
|
+
coordinates: [number, number];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
13
22
|
export interface IBaseEvent {
|
|
14
23
|
id: string;
|
|
15
24
|
timestamp: number;
|
|
@@ -79,14 +88,14 @@ export interface IWorkflowActionExecutedEvent extends IBaseEvent {
|
|
|
79
88
|
export interface IArrivedEvent extends IBaseEvent {
|
|
80
89
|
type: 'Arrived';
|
|
81
90
|
asset: IEmbeddedEntity;
|
|
82
|
-
location:
|
|
83
|
-
reader
|
|
91
|
+
location: AssetEventLocation;
|
|
92
|
+
reader?: IEmbeddedEntity;
|
|
84
93
|
}
|
|
85
94
|
export interface IExitedEvent extends IBaseEvent {
|
|
86
95
|
type: 'Exited';
|
|
87
96
|
asset: IEmbeddedEntity;
|
|
88
|
-
location:
|
|
89
|
-
reader
|
|
97
|
+
location: AssetEventLocation;
|
|
98
|
+
reader?: IEmbeddedEntity;
|
|
90
99
|
}
|
|
91
100
|
export interface IReaderArrivedEvent extends IBaseEvent {
|
|
92
101
|
type: 'ReaderArrived';
|
|
@@ -101,13 +110,8 @@ export interface IReaderExitedEvent extends IBaseEvent {
|
|
|
101
110
|
export interface IMovedEvent extends IBaseEvent {
|
|
102
111
|
type: 'Moved';
|
|
103
112
|
asset: IEmbeddedEntity;
|
|
104
|
-
location:
|
|
105
|
-
reader
|
|
106
|
-
}
|
|
107
|
-
export interface IExplicitArrivedEvent extends IBaseEvent {
|
|
108
|
-
type: 'ExplicitArrived';
|
|
109
|
-
asset: IEmbeddedEntity;
|
|
110
|
-
location: EventLocation;
|
|
113
|
+
location: AssetEventLocation;
|
|
114
|
+
reader?: IEmbeddedEntity;
|
|
111
115
|
}
|
|
112
116
|
export interface IReaderOnlineEvent extends IBaseEvent {
|
|
113
117
|
type: 'ReaderOnline';
|
|
@@ -117,7 +121,7 @@ export interface IReaderOfflineEvent extends IBaseEvent {
|
|
|
117
121
|
type: 'ReaderOffline';
|
|
118
122
|
reader: IEmbeddedEntity;
|
|
119
123
|
}
|
|
120
|
-
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent |
|
|
124
|
+
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IWorkflowActionExecutedEvent;
|
|
121
125
|
export interface GetEventsResponse {
|
|
122
126
|
query: GetEventsQuery | null;
|
|
123
127
|
items: GetEventResponse[];
|
package/dist/types/[id]/get.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.68-alpha.
|
|
4
|
+
"version": "1.0.68-alpha.4",
|
|
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": "f9cf342454b810e6369305bbda87be58deca0ee9"
|
|
22
22
|
}
|