@nanolink/operational-model 0.1.23 → 0.1.24

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.
@@ -1,4 +1,5 @@
1
1
  import { GPSPosition } from './gps';
2
+ import { TimeRange } from './timeRange';
2
3
  export type Trip = {
3
4
  startGPS?: GPSPosition;
4
5
  endGPS?: GPSPosition;
@@ -8,7 +9,4 @@ export type Trip = {
8
9
  export type TripWithId = Trip & {
9
10
  id: string;
10
11
  };
11
- export declare function tripTimeRange(trip: Trip): {
12
- start?: number;
13
- end?: number;
14
- };
12
+ export declare function tripTimeRange(trip: Trip): TimeRange;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tripTimeRange = tripTimeRange;
4
4
  function tripTimeRange(trip) {
5
5
  return {
6
- start: trip.startGPS?.stamp,
6
+ start: trip.startGPS?.stamp ?? 0,
7
7
  end: trip.completed ? trip.endGPS?.stamp : undefined,
8
8
  };
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"trip.js","sourceRoot":"","sources":["../../../src/aerospike/models/trip.ts"],"names":[],"mappings":";;AAYA,sCAKC;AALD,SAAgB,aAAa,CAAC,IAAU;IACtC,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK;QAC3B,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS;KACrD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"trip.js","sourceRoot":"","sources":["../../../src/aerospike/models/trip.ts"],"names":[],"mappings":";;AAaA,sCAKC;AALD,SAAgB,aAAa,CAAC,IAAU;IACtC,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC;QAChC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS;KACrD,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanolink/operational-model",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "TypeScript utility package.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",