@pulsecharterconnect/types 0.2.43 → 0.2.45
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.
|
@@ -7,12 +7,12 @@ export interface IFlightTrackingLocation {
|
|
|
7
7
|
timestamp: number;
|
|
8
8
|
}
|
|
9
9
|
export interface IFlightTrackingTimes {
|
|
10
|
-
scheduledDepartureTime:
|
|
11
|
-
scheduledArrivalTime:
|
|
12
|
-
estimatedDepartureTime?:
|
|
13
|
-
estimatedArrivalTime?:
|
|
14
|
-
actualDepartureTime?:
|
|
15
|
-
actualArrivalTime?:
|
|
10
|
+
scheduledDepartureTime: number;
|
|
11
|
+
scheduledArrivalTime: number;
|
|
12
|
+
estimatedDepartureTime?: number;
|
|
13
|
+
estimatedArrivalTime?: number;
|
|
14
|
+
actualDepartureTime?: number;
|
|
15
|
+
actualArrivalTime?: number;
|
|
16
16
|
departureTimezone: string;
|
|
17
17
|
arrivalTimezone: string;
|
|
18
18
|
departureIsDelayed: boolean;
|
|
@@ -22,7 +22,7 @@ export interface IFlightTrackingInfo {
|
|
|
22
22
|
tailNumber: string;
|
|
23
23
|
currentLocation: IFlightTrackingLocation;
|
|
24
24
|
flightId: string;
|
|
25
|
-
lastUpdated:
|
|
25
|
+
lastUpdated: number;
|
|
26
26
|
originAirportCode: string;
|
|
27
27
|
originAirportName: string;
|
|
28
28
|
destinationAirportCode: string;
|
|
@@ -201,7 +201,9 @@ class TransportationRequest {
|
|
|
201
201
|
}
|
|
202
202
|
createTripAirSegmentsFromTransportationRequest(localTimezone, distalTimezone) {
|
|
203
203
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
204
|
-
const recoveryTimeDuration =
|
|
204
|
+
const recoveryTimeDuration = this.transportationRequestType === TransportRequestType.ONE_WAY
|
|
205
|
+
? luxon_1.Duration.fromObject({ minutes: 0 })
|
|
206
|
+
: (_a = exports.RECOVERY_TIME_DURATION[this.recoveryType]) !== null && _a !== void 0 ? _a : luxon_1.Duration.fromObject({ hours: 3, minutes: 0 });
|
|
205
207
|
const tripDistanceInMiles = this.tripDistanceInMiles || 0;
|
|
206
208
|
const flightTime = calculateTravelTime(tripDistanceInMiles, exports.AVERAGE_AIR_SPEED);
|
|
207
209
|
if (this.transportationRequestType === TransportRequestType.ROUND_TRIP) {
|
|
@@ -315,7 +317,9 @@ class TransportationRequest {
|
|
|
315
317
|
}
|
|
316
318
|
createTripGroundSegmentsFromTransportationRequest(localTimezone, distalTimezone) {
|
|
317
319
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
318
|
-
const recoveryTimeInMinutes =
|
|
320
|
+
const recoveryTimeInMinutes = this.transportationRequestType === TransportRequestType.ONE_WAY
|
|
321
|
+
? luxon_1.Duration.fromObject({ minutes: 0 })
|
|
322
|
+
: (_a = exports.RECOVERY_TIME_DURATION[this.recoveryType]) !== null && _a !== void 0 ? _a : luxon_1.Duration.fromObject({ hours: 3, minutes: 0 });
|
|
319
323
|
const localAirportLocation = {
|
|
320
324
|
id: "1234",
|
|
321
325
|
displayName: `${(_b = this.recipientFacility) === null || _b === void 0 ? void 0 : _b.city} area airport`,
|
|
@@ -536,16 +540,20 @@ class TransportationRequest {
|
|
|
536
540
|
organRecoveryLocation: this.recoveryLocation,
|
|
537
541
|
scheduledORTime: this.orDateTimeGMT,
|
|
538
542
|
scheduledORTimeTimezone: this.orTimezone,
|
|
539
|
-
estimatedOrganRecoveryTime:
|
|
540
|
-
|
|
541
|
-
.
|
|
543
|
+
estimatedOrganRecoveryTime: this.transportationRequestType === TransportRequestType.ONE_WAY
|
|
544
|
+
? 0
|
|
545
|
+
: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
|
|
546
|
+
.plus(exports.RECOVERY_TIME_DURATION[this.recoveryType] || "3 hours")
|
|
547
|
+
.toMillis(),
|
|
542
548
|
estimatedOrganRecoveryTimeTimezone: this.orTimezone,
|
|
543
549
|
surgicalTeam: [],
|
|
544
550
|
scheduledArrivalTimeTimezone: this.orTimezone,
|
|
545
|
-
scheduledDepartureTime:
|
|
546
|
-
|
|
547
|
-
.
|
|
548
|
-
|
|
551
|
+
scheduledDepartureTime: this.transportationRequestType === TransportRequestType.ONE_WAY
|
|
552
|
+
? this.orDateTimeGMT
|
|
553
|
+
: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
|
|
554
|
+
.plus(exports.RECOVERY_TIME_DURATION[this.recoveryType] || "3 hours")
|
|
555
|
+
.plus({ minutes: 30 })
|
|
556
|
+
.toMillis(),
|
|
549
557
|
scheduledDepartureTimeTimezone: this.orTimezone,
|
|
550
558
|
};
|
|
551
559
|
return tripOrganRecoverySegment;
|