@pulsecharterconnect/types 0.2.35 → 0.2.37
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
|
@@ -86,6 +86,7 @@ export interface IUpdateCaseDto {
|
|
|
86
86
|
transportationRequestId?: string;
|
|
87
87
|
}
|
|
88
88
|
export interface ICaseDto extends ICase {
|
|
89
|
+
transportationRequestAdditionalDetail?: TransportationRequestAdditionalDetail;
|
|
89
90
|
trip: ITrip;
|
|
90
91
|
transportationRequest?: ITransportationRequest;
|
|
91
92
|
}
|
|
@@ -313,7 +313,7 @@ class TransportationRequest {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
createTripGroundSegmentsFromTransportationRequest(localTimezone, distalTimezone) {
|
|
316
|
-
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;
|
|
316
|
+
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;
|
|
317
317
|
const recoveryTimeInMinutes = (_a = exports.RECOVERY_TIME_DURATION[this.recoveryType]) !== null && _a !== void 0 ? _a : luxon_1.Duration.fromObject({ hours: 3, minutes: 0 });
|
|
318
318
|
const localAirportLocation = {
|
|
319
319
|
id: "1234",
|
|
@@ -325,36 +325,37 @@ class TransportationRequest {
|
|
|
325
325
|
zip: ((_f = this.recipientFacility) === null || _f === void 0 ? void 0 : _f.zip) || "",
|
|
326
326
|
location: (_g = this.recipientFacility) === null || _g === void 0 ? void 0 : _g.location,
|
|
327
327
|
utcOffsetMinutes: (_h = this.recipientFacility) === null || _h === void 0 ? void 0 : _h.utcOffsetMinutes,
|
|
328
|
+
timezone: (_j = this.recipientFacility) === null || _j === void 0 ? void 0 : _j.timezone,
|
|
328
329
|
};
|
|
329
330
|
const distalAirportLocation = this.transportationRequestType === TransportRequestType.ROUND_TRIP
|
|
330
331
|
? {
|
|
331
332
|
id: "5678",
|
|
332
|
-
displayName: `${(
|
|
333
|
+
displayName: `${(_k = this.recoveryLocation) === null || _k === void 0 ? void 0 : _k.city} area airport`,
|
|
333
334
|
formattedAddress: "",
|
|
334
|
-
city: ((
|
|
335
|
-
county: (
|
|
336
|
-
state: ((
|
|
337
|
-
zip: ((
|
|
338
|
-
location: (
|
|
339
|
-
utcOffsetMinutes: (
|
|
335
|
+
city: ((_l = this.recoveryLocation) === null || _l === void 0 ? void 0 : _l.city) || "",
|
|
336
|
+
county: (_m = this.recoveryLocation) === null || _m === void 0 ? void 0 : _m.county,
|
|
337
|
+
state: ((_o = this.recoveryLocation) === null || _o === void 0 ? void 0 : _o.state) || "",
|
|
338
|
+
zip: ((_p = this.recoveryLocation) === null || _p === void 0 ? void 0 : _p.zip) || "",
|
|
339
|
+
location: (_q = this.recoveryLocation) === null || _q === void 0 ? void 0 : _q.location,
|
|
340
|
+
utcOffsetMinutes: (_r = this.recoveryLocation) === null || _r === void 0 ? void 0 : _r.utcOffsetMinutes,
|
|
340
341
|
}
|
|
341
342
|
: {
|
|
342
343
|
id: "5678",
|
|
343
|
-
displayName: `${((
|
|
344
|
+
displayName: `${((_s = this.pickupLocation) === null || _s === void 0 ? void 0 : _s.city) || ((_t = this.recoveryLocation) === null || _t === void 0 ? void 0 : _t.city)} area airport`,
|
|
344
345
|
formattedAddress: "",
|
|
345
|
-
city: ((
|
|
346
|
-
county: ((
|
|
347
|
-
((
|
|
346
|
+
city: ((_u = this.pickupLocation) === null || _u === void 0 ? void 0 : _u.city) || ((_v = this.recoveryLocation) === null || _v === void 0 ? void 0 : _v.city) || "",
|
|
347
|
+
county: ((_w = this.pickupLocation) === null || _w === void 0 ? void 0 : _w.county) ||
|
|
348
|
+
((_x = this.recoveryLocation) === null || _x === void 0 ? void 0 : _x.county) ||
|
|
348
349
|
"",
|
|
349
|
-
state: ((
|
|
350
|
-
zip: ((
|
|
351
|
-
location: ((
|
|
352
|
-
((
|
|
350
|
+
state: ((_y = this.pickupLocation) === null || _y === void 0 ? void 0 : _y.state) || ((_z = this.recoveryLocation) === null || _z === void 0 ? void 0 : _z.state) || "",
|
|
351
|
+
zip: ((_0 = this.pickupLocation) === null || _0 === void 0 ? void 0 : _0.zip) || ((_1 = this.recoveryLocation) === null || _1 === void 0 ? void 0 : _1.zip) || "",
|
|
352
|
+
location: ((_2 = this.pickupLocation) === null || _2 === void 0 ? void 0 : _2.location) ||
|
|
353
|
+
((_3 = this.recoveryLocation) === null || _3 === void 0 ? void 0 : _3.location) || {
|
|
353
354
|
lat: 0,
|
|
354
355
|
lng: 0,
|
|
355
356
|
},
|
|
356
|
-
utcOffsetMinutes: ((
|
|
357
|
-
((
|
|
357
|
+
utcOffsetMinutes: ((_4 = this.pickupLocation) === null || _4 === void 0 ? void 0 : _4.utcOffsetMinutes) ||
|
|
358
|
+
((_5 = this.recoveryLocation) === null || _5 === void 0 ? void 0 : _5.utcOffsetMinutes),
|
|
358
359
|
};
|
|
359
360
|
const tripDistanceInMiles = this.tripDistanceInMiles || 0;
|
|
360
361
|
const flightTime = calculateTravelTime(tripDistanceInMiles, exports.AVERAGE_AIR_SPEED);
|
|
@@ -401,6 +402,7 @@ class TransportationRequest {
|
|
|
401
402
|
segmentType: Trip_1.SegmentType.GROUND_TRANSPORTATION,
|
|
402
403
|
segmentNumber: 0,
|
|
403
404
|
scheduledArrivalLocation: localAirportLocation,
|
|
405
|
+
scheduledArrivalTimeTimezone: localTimezone,
|
|
404
406
|
scheduledDepartureLocation: this.recipientFacility,
|
|
405
407
|
scheduledDepartureTime: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
|
|
406
408
|
.minus(flightTime)
|
|
@@ -411,7 +413,6 @@ class TransportationRequest {
|
|
|
411
413
|
.minus(flightTime)
|
|
412
414
|
.minus({ hours: 2, minutes: 0 })
|
|
413
415
|
.toMillis(),
|
|
414
|
-
scheduledArrivalTimeTimezone: localTimezone,
|
|
415
416
|
},
|
|
416
417
|
{
|
|
417
418
|
transportationOperatorId: this.organizationId,
|