@pulsecharterconnect/types 0.2.60 → 0.2.62
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.
|
@@ -110,6 +110,8 @@ export type Facility = {
|
|
|
110
110
|
utcOffsetMinutes: number;
|
|
111
111
|
pickupInstructions?: string;
|
|
112
112
|
dropoffInstructions?: string;
|
|
113
|
+
preferredNearbyAirportCode?: string;
|
|
114
|
+
preferredNearbyFBO?: Facility;
|
|
113
115
|
};
|
|
114
116
|
export type County = {
|
|
115
117
|
countyName: string;
|
|
@@ -208,7 +208,7 @@ class TransportationRequest {
|
|
|
208
208
|
return false;
|
|
209
209
|
}
|
|
210
210
|
createTripAirSegmentsFromTransportationRequest(localTimezone, distalTimezone) {
|
|
211
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
211
|
+
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;
|
|
212
212
|
const recoveryTimeDuration = this.transportationRequestType === TransportRequestType.ONE_WAY
|
|
213
213
|
? luxon_1.Duration.fromObject({ minutes: 0 })
|
|
214
214
|
: (_a = exports.RECOVERY_TIME_DURATION[this.recoveryType]) !== null && _a !== void 0 ? _a : luxon_1.Duration.fromObject({ hours: 3, minutes: 0 });
|
|
@@ -240,14 +240,20 @@ class TransportationRequest {
|
|
|
240
240
|
segmentStatus: Trip_1.SegmentStatus.NOT_STARTED,
|
|
241
241
|
passengers: [],
|
|
242
242
|
segmentNumber: 0,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
scheduledArrivalAirportLocation: this.recoveryLocation.location || {
|
|
243
|
+
scheduledArrivalAirportCode: `${((_b = this.recoveryLocation) === null || _b === void 0 ? void 0 : _b.preferredNearbyAirportCode) ||
|
|
244
|
+
((_c = this.recoveryLocation) === null || _c === void 0 ? void 0 : _c.city) + " area airport"}`,
|
|
245
|
+
scheduledArrivalAirportLocation: ((_d = this.recoveryLocation) === null || _d === void 0 ? void 0 : _d.location) || {
|
|
246
246
|
lat: 0,
|
|
247
247
|
lng: 0,
|
|
248
248
|
},
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
scheduledArrivalFBO: (_e = this.recoveryLocation) === null || _e === void 0 ? void 0 : _e.preferredNearbyFBO,
|
|
250
|
+
scheduledArrivalTime: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
|
|
251
|
+
.minus({ hours: 1, minutes: 30 })
|
|
252
|
+
.toMillis(),
|
|
253
|
+
scheduledArrivalTimeTimezone: distalTimezone,
|
|
254
|
+
scheduledDepartureAirportCode: `${((_f = this.recipientFacility) === null || _f === void 0 ? void 0 : _f.preferredNearbyAirportCode) ||
|
|
255
|
+
((_g = this.recipientFacility) === null || _g === void 0 ? void 0 : _g.city) + " area airport"}`,
|
|
256
|
+
scheduledDepartureAirportLocation: ((_h = this.recipientFacility) === null || _h === void 0 ? void 0 : _h.location) || {
|
|
251
257
|
lat: 0,
|
|
252
258
|
lng: 0,
|
|
253
259
|
},
|
|
@@ -256,10 +262,6 @@ class TransportationRequest {
|
|
|
256
262
|
.minus({ hours: 1, minutes: 30 })
|
|
257
263
|
.toMillis(),
|
|
258
264
|
scheduledDepartureTimeTimezone: localTimezone,
|
|
259
|
-
scheduledArrivalTime: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
|
|
260
|
-
.minus({ hours: 1, minutes: 30 })
|
|
261
|
-
.toMillis(),
|
|
262
|
-
scheduledArrivalTimeTimezone: distalTimezone,
|
|
263
265
|
},
|
|
264
266
|
{
|
|
265
267
|
transportationOperatorId: this.organizationId,
|
|
@@ -267,8 +269,10 @@ class TransportationRequest {
|
|
|
267
269
|
segmentStatus: Trip_1.SegmentStatus.NOT_STARTED,
|
|
268
270
|
segmentType: Trip_1.SegmentType.AIR_TRANSPORTATION,
|
|
269
271
|
segmentNumber: 0,
|
|
270
|
-
scheduledDepartureAirportCode: `${(
|
|
271
|
-
|
|
272
|
+
scheduledDepartureAirportCode: `${((_j = this.recoveryLocation) === null || _j === void 0 ? void 0 : _j.preferredNearbyAirportCode) ||
|
|
273
|
+
((_k = this.recoveryLocation) === null || _k === void 0 ? void 0 : _k.city) + " area airport"}`,
|
|
274
|
+
scheduledDepartureFBO: (_l = this.recoveryLocation) === null || _l === void 0 ? void 0 : _l.preferredNearbyFBO,
|
|
275
|
+
scheduledDepartureAirportLocation: ((_m = this.recoveryLocation) === null || _m === void 0 ? void 0 : _m.location) || {
|
|
272
276
|
lat: 0,
|
|
273
277
|
lng: 0,
|
|
274
278
|
},
|
|
@@ -276,8 +280,10 @@ class TransportationRequest {
|
|
|
276
280
|
.plus(recoveryTimeDuration)
|
|
277
281
|
.plus({ hours: 1, minutes: 30 })
|
|
278
282
|
.toMillis(),
|
|
279
|
-
scheduledArrivalAirportCode: `${(
|
|
280
|
-
|
|
283
|
+
scheduledArrivalAirportCode: `${((_o = this.recipientFacility) === null || _o === void 0 ? void 0 : _o.preferredNearbyAirportCode) ||
|
|
284
|
+
((_p = this.recipientFacility) === null || _p === void 0 ? void 0 : _p.city) + " area airport"}`,
|
|
285
|
+
scheduledArrivalFBO: (_q = this.recipientFacility) === null || _q === void 0 ? void 0 : _q.preferredNearbyFBO,
|
|
286
|
+
scheduledArrivalAirportLocation: ((_r = this.recipientFacility) === null || _r === void 0 ? void 0 : _r.location) || {
|
|
281
287
|
lat: 0,
|
|
282
288
|
lng: 0,
|
|
283
289
|
},
|
|
@@ -299,16 +305,21 @@ class TransportationRequest {
|
|
|
299
305
|
segmentStatus: Trip_1.SegmentStatus.NOT_STARTED,
|
|
300
306
|
segmentType: Trip_1.SegmentType.AIR_TRANSPORTATION,
|
|
301
307
|
segmentNumber: 0,
|
|
302
|
-
scheduledDepartureAirportCode: `${((
|
|
303
|
-
|
|
304
|
-
this.recoveryLocation
|
|
308
|
+
scheduledDepartureAirportCode: `${((_s = this.recipientFacility) === null || _s === void 0 ? void 0 : _s.preferredNearbyAirportCode) ||
|
|
309
|
+
((_t = this.pickupLocation) === null || _t === void 0 ? void 0 : _t.city) + " area airport" ||
|
|
310
|
+
((_u = this.recoveryLocation) === null || _u === void 0 ? void 0 : _u.city) + " area airport"}`,
|
|
311
|
+
scheduledDepartureFBO: (_v = this.recipientFacility) === null || _v === void 0 ? void 0 : _v.preferredNearbyFBO,
|
|
312
|
+
scheduledDepartureAirportLocation: ((_w = this.pickupLocation) === null || _w === void 0 ? void 0 : _w.location) ||
|
|
313
|
+
((_x = this.recoveryLocation) === null || _x === void 0 ? void 0 : _x.location) || {
|
|
305
314
|
lat: 0,
|
|
306
315
|
lng: 0,
|
|
307
316
|
},
|
|
308
317
|
scheduledDepartureTime: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
|
|
309
318
|
.plus({ hours: 1, minutes: 0 })
|
|
310
319
|
.toMillis(),
|
|
311
|
-
scheduledArrivalAirportCode: `${(
|
|
320
|
+
scheduledArrivalAirportCode: `${((_y = this.recipientFacility) === null || _y === void 0 ? void 0 : _y.preferredNearbyAirportCode) ||
|
|
321
|
+
((_z = this.recipientFacility) === null || _z === void 0 ? void 0 : _z.city) + " area airport"}`,
|
|
322
|
+
scheduledArrivalFBO: (_0 = this.recipientFacility) === null || _0 === void 0 ? void 0 : _0.preferredNearbyFBO,
|
|
312
323
|
scheduledArrivalAirportLocation: this.recipientFacility.location || {
|
|
313
324
|
lat: 0,
|
|
314
325
|
lng: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulsecharterconnect/types",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.62",
|
|
4
4
|
"description": "A TypeScript library for enhanced type safety.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"types",
|
|
19
19
|
"interfaces"
|
|
20
20
|
],
|
|
21
|
-
"author": "
|
|
21
|
+
"author": "Chris Tyler",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"typescript": "^4.0.0"
|