@spotto/contract 1.0.62-alpha.1 → 1.0.62-alpha.5
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/events/constants.d.ts +1 -1
- package/dist/events/constants.js +2 -1
- package/dist/events/constants.js.map +1 -1
- package/dist/events/get/response.d.ts +7 -8
- package/dist/organisations/[id]/get.d.ts +2 -1
- package/dist/organisations/[id]/patch/request.d.ts +2 -1
- package/dist/organisations/constants.d.ts +1 -0
- package/dist/organisations/post/request.d.ts +2 -1
- package/dist/workflows/index.d.ts +5 -0
- package/package.json +2 -2
|
@@ -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,7 +4,7 @@ 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 {
|
|
7
|
+
import { ExecutedWorkflow } from '../../workflows';
|
|
8
8
|
export interface EventLocation extends IEmbeddedEntity {
|
|
9
9
|
type: LocationType;
|
|
10
10
|
organisation?: IEmbeddedEntity;
|
|
@@ -35,14 +35,9 @@ export interface IReaderEventPayload {
|
|
|
35
35
|
location?: IEmbeddedEntity;
|
|
36
36
|
}
|
|
37
37
|
export declare type ISnapshotEventPayload = Pick<GetSnapshotResponse, 'reader' | 'manifest' | 'detectedAssets' | 'sightedTypes' | 'sightedAssets' | 'computed' | 'fields' | 'submitted' | 'created' | 'geolocation'>;
|
|
38
|
-
export declare type AssetUpdates = Omit<GetAssetResponse, 'id' | 'name'> | {
|
|
39
|
-
id?: string;
|
|
40
|
-
name?: string;
|
|
41
|
-
};
|
|
42
38
|
export interface IAssetCrudEvent extends IBaseEvent {
|
|
43
39
|
type: AssetCrudEventType;
|
|
44
|
-
asset:
|
|
45
|
-
updates?: AssetUpdates;
|
|
40
|
+
asset: IEmbeddedEntity;
|
|
46
41
|
user: IEmbeddedEntity;
|
|
47
42
|
payload: IAssetEventPayload;
|
|
48
43
|
}
|
|
@@ -73,6 +68,10 @@ export interface IUserSearchEvent extends IBaseEvent {
|
|
|
73
68
|
term: string;
|
|
74
69
|
user: IEmbeddedEntity;
|
|
75
70
|
}
|
|
71
|
+
export interface IWorkflowActionExecutedEvent extends IBaseEvent {
|
|
72
|
+
type: 'WorkflowActionExecuted';
|
|
73
|
+
workflow: ExecutedWorkflow;
|
|
74
|
+
}
|
|
76
75
|
export interface IArrivedEvent extends IBaseEvent {
|
|
77
76
|
type: 'Arrived';
|
|
78
77
|
asset: IEmbeddedEntity;
|
|
@@ -114,7 +113,7 @@ export interface IReaderOfflineEvent extends IBaseEvent {
|
|
|
114
113
|
type: 'ReaderOffline';
|
|
115
114
|
reader: IEmbeddedEntity;
|
|
116
115
|
}
|
|
117
|
-
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExplicitArrivedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent;
|
|
116
|
+
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExplicitArrivedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IWorkflowActionExecutedEvent;
|
|
118
117
|
export interface GetEventsResponse {
|
|
119
118
|
query: GetEventsQuery | null;
|
|
120
119
|
items: GetEventResponse[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { IEmbeddedEntity, IEntityMeta } from '../../shared';
|
|
2
|
-
import { Preferences } from '../constants';
|
|
2
|
+
import { Preferences, Tenant } from '../constants';
|
|
3
3
|
import { Integrations } from '../../integrations/constants';
|
|
4
4
|
export interface GetOrganisationResponse {
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
7
|
+
tenant?: Tenant;
|
|
7
8
|
ancestors?: IEmbeddedEntity[];
|
|
8
9
|
preferences?: Preferences;
|
|
9
10
|
integrations?: Integrations;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { INetworkRequest } from '../../../networks';
|
|
2
|
-
import { Preferences } from '../../constants';
|
|
2
|
+
import { Tenant, Preferences } from '../../constants';
|
|
3
3
|
export interface NetworkWithDeletionFlag extends INetworkRequest {
|
|
4
4
|
deleteNetwork?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface UpdateOrganisationRequest {
|
|
7
7
|
name?: string;
|
|
8
|
+
tenant?: Tenant;
|
|
8
9
|
networks?: NetworkWithDeletionFlag[];
|
|
9
10
|
preferences?: Preferences;
|
|
10
11
|
}
|
|
@@ -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.62-alpha.
|
|
4
|
+
"version": "1.0.62-alpha.5",
|
|
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": "f2ee026976a293dde4b064966497dbb74988e7b6"
|
|
22
22
|
}
|