@pulsecharterconnect/types 0.2.71 → 0.2.73
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.
|
@@ -3,7 +3,8 @@ export declare enum FeatureFlagName {
|
|
|
3
3
|
IN_TRAINING = "in-training",
|
|
4
4
|
JET_INSIGHT_INTEGRATION = "jet-insight-integration",
|
|
5
5
|
COMMUNICATIONS = "communications",
|
|
6
|
-
LOGISTICS = "logistics"
|
|
6
|
+
LOGISTICS = "logistics",
|
|
7
|
+
PROPOSAL_SELECT_ADDITIONAL_DETAILS = "proposal-select-additional-details"
|
|
7
8
|
}
|
|
8
9
|
export interface IFeatureFlag {
|
|
9
10
|
name: FeatureFlagName;
|
|
@@ -8,6 +8,7 @@ var FeatureFlagName;
|
|
|
8
8
|
FeatureFlagName["JET_INSIGHT_INTEGRATION"] = "jet-insight-integration";
|
|
9
9
|
FeatureFlagName["COMMUNICATIONS"] = "communications";
|
|
10
10
|
FeatureFlagName["LOGISTICS"] = "logistics";
|
|
11
|
+
FeatureFlagName["PROPOSAL_SELECT_ADDITIONAL_DETAILS"] = "proposal-select-additional-details";
|
|
11
12
|
})(FeatureFlagName = exports.FeatureFlagName || (exports.FeatureFlagName = {}));
|
|
12
13
|
class FeatureFlag {
|
|
13
14
|
constructor(featureFlag) {
|
|
@@ -171,5 +171,9 @@ class Organization {
|
|
|
171
171
|
isGroundTransportationEnabled() {
|
|
172
172
|
return this.featureFlags.some((flag) => flag.name === FeatureFlag_1.FeatureFlagName.GROUND_TRANSPORTATION && flag.enabled);
|
|
173
173
|
}
|
|
174
|
+
proposalSelectRequiresAdditionalDetails() {
|
|
175
|
+
return this.featureFlags.some((flag) => flag.name === FeatureFlag_1.FeatureFlagName.PROPOSAL_SELECT_ADDITIONAL_DETAILS &&
|
|
176
|
+
flag.enabled);
|
|
177
|
+
}
|
|
174
178
|
}
|
|
175
179
|
exports.Organization = Organization;
|
|
@@ -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,
|
|
@@ -335,7 +338,7 @@ class TransportationRequest {
|
|
|
335
338
|
lat: 0,
|
|
336
339
|
lng: 0,
|
|
337
340
|
},
|
|
338
|
-
scheduledDepartureTimeTimezone:
|
|
341
|
+
scheduledDepartureTimeTimezone: localTimezone,
|
|
339
342
|
scheduledArrivalTime: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
|
|
340
343
|
.plus(recoveryTimeDuration)
|
|
341
344
|
.plus({ hours: 1, minutes: 30 })
|
|
@@ -343,12 +346,12 @@ class TransportationRequest {
|
|
|
343
346
|
.plus({ hours: 1, minutes: 30 })
|
|
344
347
|
.plus(flightTime)
|
|
345
348
|
.toMillis(),
|
|
346
|
-
scheduledArrivalTimeTimezone:
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
+
scheduledArrivalTimeTimezone: distalTimezone,
|
|
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,
|
|
@@ -411,17 +416,18 @@ class TransportationRequest {
|
|
|
411
416
|
lat: 0,
|
|
412
417
|
lng: 0,
|
|
413
418
|
},
|
|
414
|
-
scheduledDepartureTimeTimezone:
|
|
419
|
+
scheduledDepartureTimeTimezone: localTimezone,
|
|
415
420
|
scheduledArrivalTime: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
|
|
416
421
|
.plus({ hours: 1, minutes: 0 })
|
|
417
422
|
.plus(flightTime)
|
|
418
423
|
.plus({ hours: 1, minutes: 30 })
|
|
419
424
|
.plus(flightTime)
|
|
420
425
|
.toMillis(),
|
|
421
|
-
scheduledArrivalTimeTimezone:
|
|
422
|
-
}
|
|
423
|
-
|
|
426
|
+
scheduledArrivalTimeTimezone: distalTimezone,
|
|
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;
|