@pulsecharterconnect/types 0.2.70 → 0.2.72
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/types/Case.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ export interface ICreateCaseDto {
|
|
|
71
71
|
casePickupLocation?: Facility;
|
|
72
72
|
transportationRequested: boolean;
|
|
73
73
|
transportationRequestAdditionalDetail?: TransportationRequestAdditionalDetail;
|
|
74
|
+
equipmentReturnRequested?: boolean;
|
|
74
75
|
}
|
|
75
76
|
export interface IUpdateCaseDto {
|
|
76
77
|
id: string;
|
|
@@ -84,6 +85,7 @@ export interface IUpdateCaseDto {
|
|
|
84
85
|
transportationRequestAdditionalDetail?: TransportationRequestAdditionalDetail;
|
|
85
86
|
tripId: string;
|
|
86
87
|
transportationRequestId?: string;
|
|
88
|
+
equipmentReturnRequested?: boolean;
|
|
87
89
|
}
|
|
88
90
|
export interface ICaseDto extends ICase {
|
|
89
91
|
transportationRequestAdditionalDetail?: TransportationRequestAdditionalDetail;
|
|
@@ -101,7 +103,6 @@ export interface ICase {
|
|
|
101
103
|
caseRecipientFacility: Facility;
|
|
102
104
|
caseRecoveryLocation: Facility;
|
|
103
105
|
casePickupLocation?: Facility;
|
|
104
|
-
equipmentReturnRequested?: boolean;
|
|
105
106
|
createdAt?: number;
|
|
106
107
|
updatedAt?: number;
|
|
107
108
|
}
|
|
@@ -116,7 +117,6 @@ export declare class Case implements ICase {
|
|
|
116
117
|
caseRecipientFacility: Facility;
|
|
117
118
|
caseRecoveryLocation: Facility;
|
|
118
119
|
casePickupLocation?: Facility;
|
|
119
|
-
equipmentReturnRequested?: boolean;
|
|
120
120
|
createdAt?: number;
|
|
121
121
|
updatedAt?: number;
|
|
122
122
|
constructor(caseData: ICase);
|
package/dist/types/Case.js
CHANGED
|
@@ -60,7 +60,6 @@ class Case {
|
|
|
60
60
|
this.caseRecipientFacility = caseData.caseRecipientFacility;
|
|
61
61
|
this.caseRecoveryLocation = caseData.caseRecoveryLocation;
|
|
62
62
|
this.casePickupLocation = caseData.casePickupLocation;
|
|
63
|
-
this.equipmentReturnRequested = caseData.equipmentReturnRequested || false;
|
|
64
63
|
this.createdAt = caseData.createdAt;
|
|
65
64
|
this.updatedAt = caseData.updatedAt;
|
|
66
65
|
}
|
|
@@ -216,6 +216,7 @@ class TransportationRequest {
|
|
|
216
216
|
: (_a = exports.RECOVERY_TIME_DURATION[this.recoveryType]) !== null && _a !== void 0 ? _a : luxon_1.Duration.fromObject({ hours: 3, minutes: 0 });
|
|
217
217
|
const tripDistanceInMiles = this.tripDistanceInMiles || 0;
|
|
218
218
|
const flightTime = calculateTravelTime(tripDistanceInMiles, exports.AVERAGE_AIR_SPEED);
|
|
219
|
+
let tripAirSegments = [];
|
|
219
220
|
if (this.transportationRequestType === TransportRequestType.ROUND_TRIP) {
|
|
220
221
|
// Local Airport -> Distal Airport
|
|
221
222
|
// Air Departure Time =
|
|
@@ -246,7 +247,7 @@ class TransportationRequest {
|
|
|
246
247
|
// Air Arrival Time =
|
|
247
248
|
// Air Departure Time + flight time
|
|
248
249
|
//
|
|
249
|
-
|
|
250
|
+
tripAirSegments = [
|
|
250
251
|
{
|
|
251
252
|
transportationOperatorId: this.organizationId,
|
|
252
253
|
segmentType: Trip_1.SegmentType.AIR_TRANSPORTATION,
|
|
@@ -309,7 +310,9 @@ class TransportationRequest {
|
|
|
309
310
|
.toMillis(),
|
|
310
311
|
scheduledArrivalTimeTimezone: localTimezone,
|
|
311
312
|
},
|
|
312
|
-
|
|
313
|
+
];
|
|
314
|
+
if (this.equipmentReturnRequested) {
|
|
315
|
+
tripAirSegments.push({
|
|
313
316
|
transportationOperatorId: this.organizationId,
|
|
314
317
|
passengers: [],
|
|
315
318
|
segmentStatus: Trip_1.SegmentStatus.NOT_STARTED,
|
|
@@ -344,11 +347,11 @@ class TransportationRequest {
|
|
|
344
347
|
.plus(flightTime)
|
|
345
348
|
.toMillis(),
|
|
346
349
|
scheduledArrivalTimeTimezone: localTimezone,
|
|
347
|
-
}
|
|
348
|
-
|
|
350
|
+
});
|
|
351
|
+
}
|
|
349
352
|
}
|
|
350
353
|
else {
|
|
351
|
-
|
|
354
|
+
tripAirSegments = [
|
|
352
355
|
{
|
|
353
356
|
transportationOperatorId: this.organizationId,
|
|
354
357
|
passengers: [],
|
|
@@ -385,7 +388,9 @@ class TransportationRequest {
|
|
|
385
388
|
.toMillis(),
|
|
386
389
|
scheduledArrivalTimeTimezone: localTimezone,
|
|
387
390
|
},
|
|
388
|
-
|
|
391
|
+
];
|
|
392
|
+
if (this.equipmentReturnRequested) {
|
|
393
|
+
tripAirSegments.push({
|
|
389
394
|
transportationOperatorId: this.organizationId,
|
|
390
395
|
passengers: [],
|
|
391
396
|
segmentStatus: Trip_1.SegmentStatus.NOT_STARTED,
|
|
@@ -419,9 +424,10 @@ class TransportationRequest {
|
|
|
419
424
|
.plus(flightTime)
|
|
420
425
|
.toMillis(),
|
|
421
426
|
scheduledArrivalTimeTimezone: localTimezone,
|
|
422
|
-
}
|
|
423
|
-
|
|
427
|
+
});
|
|
428
|
+
}
|
|
424
429
|
}
|
|
430
|
+
return tripAirSegments;
|
|
425
431
|
}
|
|
426
432
|
createTripGroundSegmentsFromTransportationRequest(localTimezone, distalTimezone) {
|
|
427
433
|
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;
|