@spotto/contract 1.0.39-alpha.0 → 1.0.40-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.
@@ -43,6 +43,5 @@ export interface GetAssetResponse {
43
43
  candidateLocations?: ICandidateLocation[];
44
44
  homeLocationId?: string;
45
45
  homeLocationPath?: string;
46
- readerId?: string;
47
- readerName?: string;
46
+ readers?: IEmbeddedEntity[];
48
47
  }
@@ -7,5 +7,4 @@ export interface UpdateAssetRequest {
7
7
  typeId?: string;
8
8
  fieldValues?: IFieldValueWithConstraints[];
9
9
  homeLocationId?: string;
10
- readerId?: string;
11
10
  }
@@ -1,9 +1,13 @@
1
1
  import { SearchableSortFields, SortOrders } from '../../shared';
2
2
  export declare type AssetSearchField = 'name' | 'tagIds';
3
- export declare type AssetEmbedField = 'meta' | 'tagIds' | 'candidateLocations' | 'telemetry';
3
+ export declare type AssetEmbedField = 'meta' | 'tagIds' | 'candidateLocations' | 'telemetry' | 'readers';
4
4
  export declare type AssetSortField = SearchableSortFields | 'battery';
5
5
  export declare type AssetBatteryStatus = 'critical' | 'low' | 'ok';
6
6
  export declare type AssetLocationStatus = 'NEVERSEEN' | 'UNKNOWN' | 'HOME' | 'AWAY' | 'ROAMING' | 'MAP';
7
+ export interface CustomFieldsAssetFilter {
8
+ id: string;
9
+ values: string[];
10
+ }
7
11
  export interface AssetFilters {
8
12
  labels?: string[];
9
13
  ids?: string[];
@@ -23,6 +27,9 @@ export interface AssetFilters {
23
27
  locationPathBeginsWith?: string[];
24
28
  homeLocationIds?: string[];
25
29
  homeLocationPathBeginsWith?: string[];
30
+ customFieldValues?: {
31
+ values: CustomFieldsAssetFilter[];
32
+ };
26
33
  }
27
34
  export interface GetAssetsQuery extends AssetFilters {
28
35
  page?: number;
@@ -7,3 +7,4 @@ export * from './post';
7
7
  export * from './suggestions';
8
8
  export * from './upload';
9
9
  export * from './errors';
10
+ export * from './summary';
@@ -23,4 +23,5 @@ __exportStar(require("./post"), exports);
23
23
  __exportStar(require("./suggestions"), exports);
24
24
  __exportStar(require("./upload"), exports);
25
25
  __exportStar(require("./errors"), exports);
26
+ __exportStar(require("./summary"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,0CAAuB;AACvB,6CAA0B;AAC1B,wCAAqB;AACrB,6CAA0B;AAC1B,yCAAsB;AACtB,gDAA6B;AAC7B,2CAAwB;AACxB,2CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,0CAAuB;AACvB,6CAA0B;AAC1B,wCAAqB;AACrB,6CAA0B;AAC1B,yCAAsB;AACtB,gDAA6B;AAC7B,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB"}
@@ -2,6 +2,14 @@ import { GetAssetSuggestionsQuery } from './query';
2
2
  import { IEmbeddedEntity } from '../../shared';
3
3
  export interface GetAssetSuggestionsResponse {
4
4
  query: GetAssetSuggestionsQuery;
5
- suggestions: string[];
6
- matches: IEmbeddedEntity[];
5
+ suggestions: {
6
+ suggestion: string;
7
+ name: string;
8
+ matchedProp: string;
9
+ matchedPropValue: string;
10
+ }[];
11
+ matches: (IEmbeddedEntity & {
12
+ matchedProp: string;
13
+ matchedPropValue: string;
14
+ })[];
7
15
  }
@@ -0,0 +1 @@
1
+ export * from './summary';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./summary"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/summary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB"}
@@ -0,0 +1,9 @@
1
+ export interface AssetSummaryItem {
2
+ typeId: string | null;
3
+ typePath: string;
4
+ typeName: string;
5
+ locationId: string | null;
6
+ locationName: string | null;
7
+ count: number;
8
+ isMap: boolean;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../../../src/assets/summary/summary.ts"],"names":[],"mappings":""}
@@ -8,6 +8,6 @@ export interface UpdateFieldRequest {
8
8
  integerMin?: number | null;
9
9
  integerMax?: number | null;
10
10
  decimalMin?: number | null;
11
- decimalMax?: number;
11
+ decimalMax?: number | null;
12
12
  decimalPlaces?: number | null;
13
13
  }
@@ -7,6 +7,6 @@ export interface UpdateLocationRequest {
7
7
  address?: string;
8
8
  geolocation?: Point;
9
9
  geofence?: Polygon | {};
10
- manifestId?: string;
10
+ manifestId?: string | null;
11
11
  type?: LocationType;
12
12
  }
@@ -2,6 +2,14 @@ import { GetLocationSuggestionsQuery } from './query';
2
2
  import { IEmbeddedEntity } from '../../shared';
3
3
  export interface GetLocationSuggestionsResponse {
4
4
  query: GetLocationSuggestionsQuery;
5
- suggestions: string[];
6
- matches: IEmbeddedEntity[];
5
+ suggestions: {
6
+ suggestion: string;
7
+ name: string;
8
+ matchedProp: string;
9
+ matchedPropValue: string;
10
+ }[];
11
+ matches: (IEmbeddedEntity & {
12
+ matchedProp: string;
13
+ matchedPropValue: string;
14
+ })[];
7
15
  }
@@ -28,6 +28,7 @@ export interface GetReaderResponse {
28
28
  endpoint?: string;
29
29
  network?: string;
30
30
  location?: IEmbeddedEntity;
31
+ asset?: IEmbeddedEntity;
31
32
  telemetry?: IReaderTelemetry;
32
33
  meta?: IEntityMeta;
33
34
  status?: IReaderStatus;
@@ -8,4 +8,6 @@ export interface UpdateReaderRequest {
8
8
  unassignLocation?: boolean;
9
9
  deviceId?: string;
10
10
  network?: INetworkRequest;
11
+ unassignAsset?: boolean;
12
+ assetId?: string;
11
13
  }
@@ -6,13 +6,13 @@ exports.READER_TYPE_DETAILS = [
6
6
  {
7
7
  id: 'FIXED',
8
8
  name: 'Fixed',
9
- description: 'Plugged in with a Spotto location assigned. These readers are fixed in place and do not move unless the Spotto location is manually reassigned.',
9
+ description: 'Plugged in with a location assigned. These readers are fixed in place and do not move unless the location is manually reassigned.',
10
10
  visible: true
11
11
  },
12
12
  {
13
13
  id: 'ROVING',
14
14
  name: 'Handheld',
15
- description: 'Typically RFID handheld scanners or a BLE phone applications. These readers detect location tags or use GPS to locate assets instead of being linked to a Spotto location',
15
+ description: 'Typically RFID handheld scanners or a BLE phone applications. These readers detect location tags or use GPS to locate assets instead of being linked to a location',
16
16
  visible: true
17
17
  },
18
18
  {
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/readers/constants/types.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAU1D,QAAA,mBAAmB,GAAwB;IACtD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,OAAO;QACb,WAAW,EACT,iJAAiJ;QACnJ,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,UAAU;QAChB,WAAW,EACT,2KAA2K;QAC7K,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,SAAS;QACf,WAAW,EACT,+GAA+G;QACjH,OAAO,EAAE,IAAI;KACd;CACF,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/readers/constants/types.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAU1D,QAAA,mBAAmB,GAAwB;IACtD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,OAAO;QACb,WAAW,EACT,mIAAmI;QACrI,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,UAAU;QAChB,WAAW,EACT,oKAAoK;QACtK,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,SAAS;QACf,WAAW,EACT,+GAA+G;QACjH,OAAO,EAAE,IAAI;KACd;CACF,CAAA"}
@@ -2,6 +2,14 @@ import { GetReaderSuggestionsQuery } from './query';
2
2
  import { IEmbeddedEntity } from '../../shared';
3
3
  export interface GetReaderSuggestionsResponse {
4
4
  query: GetReaderSuggestionsQuery;
5
- suggestions: string[];
6
- matches: IEmbeddedEntity[];
5
+ suggestions: {
6
+ suggestion: string;
7
+ name: string;
8
+ matchedProp: string;
9
+ matchedPropValue: string;
10
+ }[];
11
+ matches: (IEmbeddedEntity & {
12
+ matchedProp: string;
13
+ matchedPropValue: string;
14
+ })[];
7
15
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotto/contract",
3
3
  "license": "ISC",
4
- "version": "1.0.39-alpha.0",
4
+ "version": "1.0.40-alpha.0",
5
5
  "description": "Spotto's API Contract type definitions",
6
6
  "main": "./dist/index.js",
7
7
  "files": [
@@ -15,5 +15,5 @@
15
15
  "@types/geojson": "^7946.0.11",
16
16
  "shx": "^0.3.4"
17
17
  },
18
- "gitHead": "1b68eadf76bf547496fabe0d174e88332105a771"
18
+ "gitHead": "77a19245757a812fd6f465c4a0238e941ef19c0d"
19
19
  }