@spotto/contract 1.0.62-alpha.2 → 1.0.63-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.
|
@@ -5,5 +5,5 @@ export declare type LocationCrudEventType = 'LocationCreated' | 'LocationUpdated
|
|
|
5
5
|
export declare type ReaderCrudEventType = 'ReaderCreated' | 'ReaderUpdated' | 'ReaderDeleted';
|
|
6
6
|
export declare type SnapshotCrudEventType = 'SnapshotCreated' | 'SnapshotDeleted';
|
|
7
7
|
export declare type SlateEventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'ExplicitArrived' | 'Exited' | 'ReaderOnline' | 'ReaderOffline';
|
|
8
|
-
export declare type EventType = SlateEventType | AssetCrudEventType | LocationCrudEventType | ReaderCrudEventType | SnapshotCrudEventType | 'UserSearch';
|
|
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,iBAAiB;IACjB,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"}
|
|
@@ -4,6 +4,8 @@ import { GetEventsQuery } from './query';
|
|
|
4
4
|
import { DeviceType, ReaderType } from '../../readers/constants';
|
|
5
5
|
import { LocationType } from '../../locations/constants';
|
|
6
6
|
import { GetSnapshotResponse } from '../../snapshots';
|
|
7
|
+
import { ExecutedWorkflow } from '../../workflows';
|
|
8
|
+
import { GetAssetResponse } from '../../assets';
|
|
7
9
|
export interface EventLocation extends IEmbeddedEntity {
|
|
8
10
|
type: LocationType;
|
|
9
11
|
organisation?: IEmbeddedEntity;
|
|
@@ -36,7 +38,7 @@ export interface IReaderEventPayload {
|
|
|
36
38
|
export declare type ISnapshotEventPayload = Pick<GetSnapshotResponse, 'reader' | 'manifest' | 'detectedAssets' | 'sightedTypes' | 'sightedAssets' | 'computed' | 'fields' | 'submitted' | 'created' | 'geolocation'>;
|
|
37
39
|
export interface IAssetCrudEvent extends IBaseEvent {
|
|
38
40
|
type: AssetCrudEventType;
|
|
39
|
-
asset: IEmbeddedEntity;
|
|
41
|
+
asset: GetAssetResponse | IEmbeddedEntity;
|
|
40
42
|
user: IEmbeddedEntity;
|
|
41
43
|
payload: IAssetEventPayload;
|
|
42
44
|
}
|
|
@@ -67,6 +69,10 @@ export interface IUserSearchEvent extends IBaseEvent {
|
|
|
67
69
|
term: string;
|
|
68
70
|
user: IEmbeddedEntity;
|
|
69
71
|
}
|
|
72
|
+
export interface IWorkflowActionExecutedEvent extends IBaseEvent {
|
|
73
|
+
type: 'WorkflowActionExecuted';
|
|
74
|
+
workflow: ExecutedWorkflow;
|
|
75
|
+
}
|
|
70
76
|
export interface IArrivedEvent extends IBaseEvent {
|
|
71
77
|
type: 'Arrived';
|
|
72
78
|
asset: IEmbeddedEntity;
|
|
@@ -108,7 +114,7 @@ export interface IReaderOfflineEvent extends IBaseEvent {
|
|
|
108
114
|
type: 'ReaderOffline';
|
|
109
115
|
reader: IEmbeddedEntity;
|
|
110
116
|
}
|
|
111
|
-
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExplicitArrivedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent;
|
|
117
|
+
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExplicitArrivedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IWorkflowActionExecutedEvent;
|
|
112
118
|
export interface GetEventsResponse {
|
|
113
119
|
query: GetEventsQuery | null;
|
|
114
120
|
items: GetEventResponse[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IPaginationQuery, SortOrders, StandardSortFields } from '../shared';
|
|
2
|
+
import { GetSnapshotResponse } from '../snapshots';
|
|
2
3
|
export declare type WorkflowActionEmail = {
|
|
3
4
|
type: 'EMAIL';
|
|
4
5
|
to: string[];
|
|
@@ -19,6 +20,10 @@ export declare type Workflow = NewWorkflow & {
|
|
|
19
20
|
organisation: string;
|
|
20
21
|
lastUpdated: number;
|
|
21
22
|
};
|
|
23
|
+
export declare type ExecutedWorkflow = Omit<Workflow, 'action'> & {
|
|
24
|
+
action: WorkflowAction;
|
|
25
|
+
snapshot: GetSnapshotResponse;
|
|
26
|
+
};
|
|
22
27
|
export declare type WorkflowSortQuery = {
|
|
23
28
|
sort?: Exclude<StandardSortFields, 'name'> | 'label';
|
|
24
29
|
sortOrder?: SortOrders;
|
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.63-alpha.0",
|
|
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": "5b4ac86e4fcbd77bf2c73a6b15d1b92d965c687e"
|
|
22
22
|
}
|