@spotto/contract 1.0.20 → 1.0.22

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/index.d.ts CHANGED
@@ -14,5 +14,4 @@ export * from './types';
14
14
  export * from './manifests';
15
15
  export * from './users';
16
16
  export * from './errors';
17
- export * from './geo-location';
18
17
  export * from './snapshots';
package/dist/index.js CHANGED
@@ -30,6 +30,5 @@ __exportStar(require("./types"), exports);
30
30
  __exportStar(require("./manifests"), exports);
31
31
  __exportStar(require("./users"), exports);
32
32
  __exportStar(require("./errors"), exports);
33
- __exportStar(require("./geo-location"), exports);
34
33
  __exportStar(require("./snapshots"), exports);
35
34
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,6CAA2B;AAC3B,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB;AACxB,2CAAyB;AACzB,iDAA+B;AAC/B,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,iDAA+B;AAC/B,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,6CAA2B;AAC3B,kDAAgC;AAChC,4CAA0B;AAC1B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB;AACxB,2CAAyB;AACzB,8CAA4B"}
@@ -1,4 +1,4 @@
1
- import { Point } from '../../geo-location';
1
+ import { type Polygon, type Point } from 'geojson';
2
2
  import { IEntityMeta, IEmbeddedEntity } from '../../shared';
3
3
  import { IAssetTelemetry } from '../../telemetry';
4
4
  export interface IEmbeddedReader extends IEmbeddedEntity {
@@ -15,11 +15,12 @@ export interface ILocationStatusLocation {
15
15
  export interface ILocationStatus {
16
16
  location?: ILocationStatusLocation;
17
17
  }
18
- export declare type LocationType = string;
18
+ export declare type LocationType = 'MOVING' | 'FIXED';
19
19
  export declare const LOCATION_TYPES: LocationType[];
20
20
  export interface GetLocationResponse {
21
21
  id: string;
22
22
  name: string;
23
+ type: LocationType;
23
24
  tagIds?: string[];
24
25
  readers?: IEmbeddedReader[];
25
26
  telemetry?: IAssetTelemetry;
@@ -27,6 +28,5 @@ export interface GetLocationResponse {
27
28
  manifestId?: string;
28
29
  status?: ILocationStatus;
29
30
  geolocation?: Point;
30
- geofence?: any;
31
- type?: LocationType;
31
+ geofence?: Polygon;
32
32
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LOCATION_TYPES = void 0;
4
- exports.LOCATION_TYPES = ['MOVING'];
4
+ exports.LOCATION_TYPES = ['MOVING', 'FIXED'];
5
5
  //# sourceMappingURL=get.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/locations/[id]/get.ts"],"names":[],"mappings":";;;AAuBa,QAAA,cAAc,GAAmB,CAAC,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/locations/[id]/get.ts"],"names":[],"mappings":";;;AAsBa,QAAA,cAAc,GAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC"}
@@ -1,10 +1,11 @@
1
+ import { type Point, type Polygon } from 'geojson';
1
2
  import { LocationType } from '../get';
2
3
  export interface UpdateLocationRequest {
3
4
  name?: string;
4
5
  tagIds?: string[];
5
6
  address?: string;
6
- geolocation?: GeoJSON.GeoJSON;
7
- geofence?: GeoJSON.GeoJSON;
7
+ geolocation?: Point;
8
+ geofence?: Polygon | {};
8
9
  manifestId?: string;
9
- type?: LocationType | null;
10
+ type?: LocationType;
10
11
  }
@@ -1,9 +1,11 @@
1
1
  import { SearchableSortFields, SortOrders } from '../../shared';
2
+ import { LocationType } from '../[id]/get';
2
3
  export declare type LocationSearchField = 'name';
3
4
  export declare type LocationEmbedField = 'meta' | 'tagIds' | 'readers' | 'telemetry' | 'status';
4
5
  export interface LocationFilters {
5
6
  ids?: string[];
6
7
  tagIds?: string[];
8
+ type?: Array<LocationType>;
7
9
  hasTags?: boolean;
8
10
  hasReaders?: boolean;
9
11
  setupComplete?: boolean;
@@ -1,10 +1,11 @@
1
+ import { type Point, type Polygon } from 'geojson';
1
2
  import { LocationType } from '../[id]/get';
2
3
  export interface PostLocationRequest {
3
4
  name: string;
4
5
  tagIds?: string[];
5
6
  address?: string;
6
- geolocation?: GeoJSON.GeoJSON;
7
- geofence?: GeoJSON.GeoJSON;
7
+ geolocation?: Point;
8
+ geofence?: Polygon | {};
8
9
  manifestId?: string;
9
10
  type?: LocationType;
10
11
  }
@@ -1,5 +1,7 @@
1
+ import { LocationType } from '../[id]/get';
1
2
  export interface GetLocationSuggestionsQuery {
2
3
  search: string;
3
4
  maxSuggestions?: number;
4
5
  maxMatches?: number;
6
+ type?: Array<LocationType>;
5
7
  }
@@ -1,4 +1,4 @@
1
- import { Point } from '../../geo-location';
1
+ import { type Point } from 'geojson';
2
2
  import { IEntityMeta, IEmbeddedEntity } from '../../shared';
3
3
  import { IReaderTelemetry } from '../../telemetry';
4
4
  import { ReaderType, DeviceType } from '../constants';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotto/contract",
3
3
  "license": "ISC",
4
- "version": "1.0.20",
4
+ "version": "1.0.22",
5
5
  "description": "Spotto's API Contract type definitions",
6
6
  "main": "./dist/index.js",
7
7
  "files": [
@@ -12,7 +12,7 @@
12
12
  "clean": "rm -rf node_modules && rm -rf dist"
13
13
  },
14
14
  "devDependencies": {
15
- "@types/geojson": "^7946.0.8"
15
+ "@types/geojson": "^7946.0.11"
16
16
  },
17
- "gitHead": "65b50e1e672613b8631505e31c9774c02ff8666a"
17
+ "gitHead": "963de297b679bebac8f0ecc361517a9c41dca674"
18
18
  }
@@ -1,15 +0,0 @@
1
- export declare type GeoJsonGeometryTypes = Geometry['type'];
2
- export declare type GeoJsonTypes = GeoJSON['type'];
3
- export declare type BBox = [number, number, number, number] | [number, number, number, number, number, number];
4
- export declare type Position = number[];
5
- export interface GeoJsonObject {
6
- type: GeoJsonTypes;
7
- bbox?: BBox | undefined;
8
- }
9
- export declare type GeoJSON = Geometry;
10
- export declare type Geometry = Point;
11
- export declare type GeometryObject = Geometry;
12
- export interface Point extends GeoJsonObject {
13
- type: 'Point';
14
- coordinates: Position;
15
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=geo-location.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geo-location.js","sourceRoot":"","sources":["../src/geo-location.ts"],"names":[],"mappings":""}