@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.
@@ -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<AssetLocationStatus>;
35
+ locationStatus?: Array<LocationStatus>;
36
36
  visiting?: boolean;
37
37
  battery?: AssetBatteryStatus;
38
38
  search?: string;
@@ -7,4 +7,8 @@ export interface UpdateAssetsLocationRequest {
7
7
  readerId?: string;
8
8
  timestamp?: number;
9
9
  withAssetId?: string;
10
+ dispatchLocationId?: string;
11
+ dispatchWithAssetId?: string;
12
+ dispatchData?: Record<string, unknown>;
13
+ dispatchExpires?: number;
10
14
  }
@@ -1 +1,2 @@
1
1
  export * from './summary';
2
+ export * from './response';
@@ -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,7 @@
1
+ import { GetAssetsQuery } from '../get/query';
2
+ import { AssetSummaryItem } from './summary';
3
+ export interface GetAssetsSummaryResponse {
4
+ query: GetAssetsQuery | null;
5
+ total: number;
6
+ items: AssetSummaryItem[];
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -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[];
@@ -16,6 +16,7 @@ exports.EVENT_TYPES = [
16
16
  'Exited',
17
17
  'ReaderOnline',
18
18
  'ReaderOffline',
19
+ 'AssetDispatch',
19
20
  'AssetCreated',
20
21
  'AssetUpdated',
21
22
  'AssetDeleted',
@@ -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;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"}
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: IEmbeddedEntity;
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 declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IWorkflowActionExecutedEvent;
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[];
@@ -9,5 +9,7 @@ exports.LOCATION_STATUS = [
9
9
  'AWAY',
10
10
  'ROAMING',
11
11
  'MAP',
12
+ 'DISPATCH',
13
+ 'WITH',
12
14
  ];
13
15
  //# sourceMappingURL=constants.js.map
@@ -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;AASpD,QAAA,eAAe,GAAqB;IAC/C,WAAW;IACX,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,KAAK;CACN,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.19",
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": "cf106fac88bb576404dc8b301f9469dc2f0f020c"
21
+ "gitHead": "fb9ebdac29646abb6c880aada7bf1691d1e07e9b"
22
22
  }