@pulsecharterconnect/types 0.2.29 → 0.2.30
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/Proposal.d.ts +3 -1
- package/dist/types/Proposal.js +55 -0
- package/package.json +1 -1
package/dist/types/Proposal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AirService, Facility, GroundService } from "./";
|
|
1
|
+
import { AirService, Facility, GroundService, ITripSegment } from "./";
|
|
2
2
|
export declare enum TypeOfService {
|
|
3
3
|
AIR = "air",
|
|
4
4
|
GROUND = "ground",
|
|
@@ -104,4 +104,6 @@ export declare class Proposal implements IProposal {
|
|
|
104
104
|
acceptedOrDeclinedByUserId?: string;
|
|
105
105
|
reasonForAcceptDeclineOrUpdate?: string;
|
|
106
106
|
constructor(proposal: IProposal);
|
|
107
|
+
createTripAirSegmentsFromProposal(tripAirSegments: ITripSegment[], proposal: Proposal): ITripSegment[];
|
|
108
|
+
createTripGroundSegmentsFromProposal(tripGroundSegments: ITripSegment[], proposal: Proposal): ITripSegment[];
|
|
107
109
|
}
|
package/dist/types/Proposal.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Proposal = exports.ProposalStatus = exports.GroundSegmentLocationType = exports.CrewMemberTypes = exports.TypeOfService = void 0;
|
|
4
|
+
const _1 = require("./");
|
|
4
5
|
var TypeOfService;
|
|
5
6
|
(function (TypeOfService) {
|
|
6
7
|
TypeOfService["AIR"] = "air";
|
|
@@ -44,5 +45,59 @@ class Proposal {
|
|
|
44
45
|
this.reasonForAcceptDeclineOrUpdate =
|
|
45
46
|
proposal.reasonForAcceptDeclineOrUpdate;
|
|
46
47
|
}
|
|
48
|
+
createTripAirSegmentsFromProposal(tripAirSegments, proposal) {
|
|
49
|
+
tripAirSegments = proposal.proposalSegments
|
|
50
|
+
.filter((segment) => segment.typeOfService === TypeOfService.AIR)
|
|
51
|
+
.map((proposalSegment) => {
|
|
52
|
+
var _a;
|
|
53
|
+
const tripAirSegment = {
|
|
54
|
+
segmentNumber: 0,
|
|
55
|
+
segmentType: _1.SegmentType.AIR_TRANSPORTATION,
|
|
56
|
+
segmentStatus: _1.SegmentStatus.NOT_STARTED,
|
|
57
|
+
additionalInformation: proposal.additionalInformation,
|
|
58
|
+
scheduledDepartureTime: proposalSegment.scheduledDepartureTime,
|
|
59
|
+
scheduledDepartureTimeTimezone: proposalSegment.scheduledDepartureTimezone || "",
|
|
60
|
+
scheduledArrivalTime: proposalSegment.scheduledArrivalTime,
|
|
61
|
+
scheduledArrivalTimeTimezone: proposalSegment.scheduledArrivalTimezone || "",
|
|
62
|
+
typeOfService: TypeOfService.AIR,
|
|
63
|
+
transportationOperatorId: proposal.transportationOperatorId,
|
|
64
|
+
scheduledDepartureAirportCode: proposalSegment.scheduledDepartureAirportCode,
|
|
65
|
+
scheduledDepartureAirportLocation: proposalSegment.scheduledDepartureAirportLocation,
|
|
66
|
+
scheduledArrivalAirportCode: proposalSegment.scheduledArrivalAirportCode,
|
|
67
|
+
scheduledArrivalAirportLocation: proposalSegment.scheduledArrivalAirportLocation,
|
|
68
|
+
scheduledDepartureFBO: proposalSegment.scheduledDepartureFBO,
|
|
69
|
+
scheduledArrivalFBO: proposalSegment.scheduledArrivalFBO,
|
|
70
|
+
passengers: [],
|
|
71
|
+
scheduledTailNumber: (_a = proposalSegment.airTransportationServices) === null || _a === void 0 ? void 0 : _a.tailNumber,
|
|
72
|
+
};
|
|
73
|
+
return tripAirSegment;
|
|
74
|
+
});
|
|
75
|
+
return tripAirSegments;
|
|
76
|
+
}
|
|
77
|
+
createTripGroundSegmentsFromProposal(tripGroundSegments, proposal) {
|
|
78
|
+
proposal.proposalSegments
|
|
79
|
+
.filter((segment) => segment.typeOfService ===
|
|
80
|
+
TypeOfService.GROUND)
|
|
81
|
+
.map((proposalSegment) => {
|
|
82
|
+
let tripGroundSegment = {
|
|
83
|
+
segmentNumber: 0,
|
|
84
|
+
segmentType: _1.SegmentType.GROUND_TRANSPORTATION,
|
|
85
|
+
segmentStatus: _1.SegmentStatus.NOT_STARTED,
|
|
86
|
+
additionalInformation: proposal.additionalInformation,
|
|
87
|
+
scheduledDepartureTime: proposalSegment.scheduledDepartureTime,
|
|
88
|
+
scheduledDepartureTimeTimezone: proposalSegment.scheduledDepartureTimezone || "",
|
|
89
|
+
scheduledArrivalTime: proposalSegment.scheduledArrivalTime,
|
|
90
|
+
scheduledArrivalTimeTimezone: proposalSegment.scheduledArrivalTimezone || "",
|
|
91
|
+
typeOfService: TypeOfService.GROUND,
|
|
92
|
+
transportationOperatorId: proposal.transportationOperatorId,
|
|
93
|
+
scheduledDepartureLocation: proposalSegment.scheduledDepartureLocation,
|
|
94
|
+
scheduledArrivalLocation: proposalSegment.scheduledArrivalLocation,
|
|
95
|
+
groundTransportationServices: [],
|
|
96
|
+
passengers: [],
|
|
97
|
+
};
|
|
98
|
+
tripGroundSegments.push(tripGroundSegment);
|
|
99
|
+
});
|
|
100
|
+
return tripGroundSegments;
|
|
101
|
+
}
|
|
47
102
|
}
|
|
48
103
|
exports.Proposal = Proposal;
|