@pulsecharterconnect/types 0.1.7 → 0.1.8

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.
@@ -13,7 +13,7 @@ export interface IProposalSegment {
13
13
  export declare enum CrewMemberTypes {
14
14
  PILOT = "pilot",
15
15
  COPILOT = "copilot",
16
- FLIGHT_ATTENDANT = "flight_attendant"
16
+ FLIGHT_ATTENDANT = "flight-attendant"
17
17
  }
18
18
  export interface ICrewMember {
19
19
  crewMemberType: CrewMemberTypes;
@@ -73,7 +73,7 @@ export interface IProposal {
73
73
  createdAt?: number;
74
74
  updatedAt?: number;
75
75
  }
76
- export declare class Proposal {
76
+ export declare class Proposal implements IProposal {
77
77
  id: string;
78
78
  requestForProposalId: string;
79
79
  transportationOperatorId: string;
@@ -11,7 +11,7 @@ var CrewMemberTypes;
11
11
  (function (CrewMemberTypes) {
12
12
  CrewMemberTypes["PILOT"] = "pilot";
13
13
  CrewMemberTypes["COPILOT"] = "copilot";
14
- CrewMemberTypes["FLIGHT_ATTENDANT"] = "flight_attendant";
14
+ CrewMemberTypes["FLIGHT_ATTENDANT"] = "flight-attendant";
15
15
  })(CrewMemberTypes = exports.CrewMemberTypes || (exports.CrewMemberTypes = {}));
16
16
  var GroundSegmentLocationType;
17
17
  (function (GroundSegmentLocationType) {
@@ -0,0 +1,152 @@
1
+ import { Facility, GroundService } from "./Organization";
2
+ import { IGroundTransportationService, IProposalSegment } from "./Proposal";
3
+ export declare enum TripStatus {
4
+ PREPARATION = "preparation",
5
+ IN_PROGRESS = "in-progress",
6
+ COMPLETED = "completed",
7
+ CANCELLED = "cancelled",
8
+ ABORTED = "aborted"
9
+ }
10
+ export declare enum SegmentStatus {
11
+ START_SEGMENT = "start-segment",
12
+ TRANSPORTATION_SEGMENT_EN_ROUTE = "transportation-segment-en-route",
13
+ ORGAN_RECOVERY_SEGMENT_IN_PROCESS = "organ-recovery-segment-in-process",
14
+ SEGMENT_COMPLETED = "segment-completed"
15
+ }
16
+ export declare enum OrganRecoveryInProcessStatus {
17
+ IN_OPERATING_ROOM = "in-operating-room",
18
+ INCISION_MADE = "incision-made",
19
+ CROSS_CLAMP = "cross-clamp",
20
+ ORGAN_RECOVERED = "organ-recovered"
21
+ }
22
+ export declare enum SegmentType {
23
+ AIR_TRANSPORTATION = "air-transportation",
24
+ GROUND_TRANSPORTATION = "ground-transportation",
25
+ ORGAN_RECOVERY = "organ-recovery"
26
+ }
27
+ export declare enum TripActions {
28
+ START_TRIP = "startTrip",
29
+ START_SEGMENT = "startSegment",
30
+ ARRIVE_AT_DESTINATION = "arriveAtDestination",
31
+ ABORT_TRIP = "abortTrip",
32
+ COMPLETE_TRIP = "completeTrip",
33
+ COMPLETE_ORGAN_RECOVERY = "completeOrganRecovery",
34
+ INCISION_MADE = "incisionMade",
35
+ CROSS_CLAMP_APPLIED = "crossClampApplied",
36
+ HEPARIN_ADMINISTERED = "heparinAdministered",
37
+ ORGAN_REMOVED = "organRemoved"
38
+ }
39
+ export interface ITripSegment extends IProposalSegment {
40
+ transportationOperatorId: string;
41
+ segmentType: SegmentType;
42
+ actualDepartureTime: number;
43
+ actualArrivalTime: number;
44
+ segmentStatus: SegmentStatus;
45
+ passengers: ITripParticipant[];
46
+ additionalInformation?: string;
47
+ }
48
+ export interface ITripGroundTransportationService {
49
+ groundService: GroundService;
50
+ vehicleId?: string;
51
+ driver?: IParticipant;
52
+ }
53
+ export interface ITripGroundSegment extends ITripSegment {
54
+ actualDepartureLocation: Facility;
55
+ actualArrivalLocation: Facility;
56
+ groundTransportationServices: ITripGroundTransportationService[];
57
+ }
58
+ export interface ITripAirSegment extends ITripSegment {
59
+ actualDepartureAirportCode: string;
60
+ actualDepartureFBO?: Facility;
61
+ actualArrivalAirportCode: string;
62
+ actualArrivalFBO?: Facility;
63
+ crew?: ITripParticipant[];
64
+ scheduledTailNumber?: string;
65
+ actualTailNumber?: string;
66
+ }
67
+ export declare enum TripParticipantRole {
68
+ SURGEON = "surgeon",
69
+ SURGICAL_SUPPORT = "surgical-support",
70
+ TRANSPLANT_COORDINATOR = "transplant-coordinator",
71
+ PILOT = "pilot",
72
+ COPILOT = "copilot",
73
+ DRIVER = "driver",
74
+ TRANSPORATION_OPERATOR_DISPATCHER = "charter-operator-dispatcher",
75
+ OTHER = "other"
76
+ }
77
+ export declare enum Gender {
78
+ MALE = "male",
79
+ FEMALE = "female",
80
+ UNSPECIFIED = "unspecified"
81
+ }
82
+ export interface IParticipant {
83
+ id: string;
84
+ organizationId: string;
85
+ firstName: string;
86
+ lastName: string;
87
+ phoneNumber: string;
88
+ gender?: Gender;
89
+ weightInPounds?: number;
90
+ dietaryPreferences?: string;
91
+ email?: string;
92
+ birthdate?: number;
93
+ userId?: string;
94
+ createdAt?: number;
95
+ updatedAt?: number;
96
+ }
97
+ export declare class Participant implements IParticipant {
98
+ id: string;
99
+ organizationId: string;
100
+ firstName: string;
101
+ lastName: string;
102
+ phoneNumber: string;
103
+ gender?: Gender;
104
+ birthdate?: number;
105
+ weightInPounds?: number;
106
+ dietaryPreferences?: string;
107
+ email?: string;
108
+ userId?: string;
109
+ createdAt?: number;
110
+ updatedAt?: number;
111
+ constructor(participant: IParticipant);
112
+ }
113
+ export interface ITripParticipant {
114
+ participantRole: TripParticipantRole;
115
+ participant: IParticipant;
116
+ pilotTimeout?: number;
117
+ }
118
+ export interface ITripOrganRecoverySegment extends ITripSegment {
119
+ organRecoveryInProcessStatus: OrganRecoveryInProcessStatus;
120
+ organRecoveryLocation: Facility;
121
+ scheduledORTime: number;
122
+ actualORTime: number;
123
+ estimatedOrganRecoveryTime: number;
124
+ actualOrganRecoveryTime: number;
125
+ surgicalTeam: ITripParticipant[];
126
+ organRecoveryServices?: IGroundTransportationService[];
127
+ }
128
+ export interface ITrip {
129
+ id: string;
130
+ transportationRequestId: string;
131
+ tripSegments: Array<ITripGroundSegment | ITripAirSegment>;
132
+ scheduledStartTime: number;
133
+ scheduledCompletionTime: number;
134
+ participants: ITripParticipant[];
135
+ actualStartTime?: number;
136
+ actualCompletionTime?: number;
137
+ createdAt?: number;
138
+ updatedAt?: number;
139
+ }
140
+ export declare class Trip implements ITrip {
141
+ id: string;
142
+ transportationRequestId: string;
143
+ tripSegments: Array<ITripGroundSegment | ITripAirSegment>;
144
+ scheduledStartTime: number;
145
+ scheduledCompletionTime: number;
146
+ participants: ITripParticipant[];
147
+ actualStartTime?: number;
148
+ actualCompletionTime?: number;
149
+ createdAt?: number;
150
+ updatedAt?: number;
151
+ constructor(trip: ITrip);
152
+ }
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Trip = exports.Participant = exports.Gender = exports.TripParticipantRole = exports.TripActions = exports.SegmentType = exports.OrganRecoveryInProcessStatus = exports.SegmentStatus = exports.TripStatus = void 0;
4
+ var TripStatus;
5
+ (function (TripStatus) {
6
+ TripStatus["PREPARATION"] = "preparation";
7
+ TripStatus["IN_PROGRESS"] = "in-progress";
8
+ TripStatus["COMPLETED"] = "completed";
9
+ TripStatus["CANCELLED"] = "cancelled";
10
+ TripStatus["ABORTED"] = "aborted";
11
+ })(TripStatus = exports.TripStatus || (exports.TripStatus = {}));
12
+ var SegmentStatus;
13
+ (function (SegmentStatus) {
14
+ SegmentStatus["START_SEGMENT"] = "start-segment";
15
+ SegmentStatus["TRANSPORTATION_SEGMENT_EN_ROUTE"] = "transportation-segment-en-route";
16
+ SegmentStatus["ORGAN_RECOVERY_SEGMENT_IN_PROCESS"] = "organ-recovery-segment-in-process";
17
+ SegmentStatus["SEGMENT_COMPLETED"] = "segment-completed";
18
+ })(SegmentStatus = exports.SegmentStatus || (exports.SegmentStatus = {}));
19
+ var OrganRecoveryInProcessStatus;
20
+ (function (OrganRecoveryInProcessStatus) {
21
+ OrganRecoveryInProcessStatus["IN_OPERATING_ROOM"] = "in-operating-room";
22
+ OrganRecoveryInProcessStatus["INCISION_MADE"] = "incision-made";
23
+ OrganRecoveryInProcessStatus["CROSS_CLAMP"] = "cross-clamp";
24
+ OrganRecoveryInProcessStatus["ORGAN_RECOVERED"] = "organ-recovered";
25
+ })(OrganRecoveryInProcessStatus = exports.OrganRecoveryInProcessStatus || (exports.OrganRecoveryInProcessStatus = {}));
26
+ var SegmentType;
27
+ (function (SegmentType) {
28
+ SegmentType["AIR_TRANSPORTATION"] = "air-transportation";
29
+ SegmentType["GROUND_TRANSPORTATION"] = "ground-transportation";
30
+ SegmentType["ORGAN_RECOVERY"] = "organ-recovery";
31
+ })(SegmentType = exports.SegmentType || (exports.SegmentType = {}));
32
+ var TripActions;
33
+ (function (TripActions) {
34
+ TripActions["START_TRIP"] = "startTrip";
35
+ TripActions["START_SEGMENT"] = "startSegment";
36
+ TripActions["ARRIVE_AT_DESTINATION"] = "arriveAtDestination";
37
+ TripActions["ABORT_TRIP"] = "abortTrip";
38
+ TripActions["COMPLETE_TRIP"] = "completeTrip";
39
+ TripActions["COMPLETE_ORGAN_RECOVERY"] = "completeOrganRecovery";
40
+ TripActions["INCISION_MADE"] = "incisionMade";
41
+ TripActions["CROSS_CLAMP_APPLIED"] = "crossClampApplied";
42
+ TripActions["HEPARIN_ADMINISTERED"] = "heparinAdministered";
43
+ TripActions["ORGAN_REMOVED"] = "organRemoved";
44
+ })(TripActions = exports.TripActions || (exports.TripActions = {}));
45
+ var TripParticipantRole;
46
+ (function (TripParticipantRole) {
47
+ TripParticipantRole["SURGEON"] = "surgeon";
48
+ TripParticipantRole["SURGICAL_SUPPORT"] = "surgical-support";
49
+ TripParticipantRole["TRANSPLANT_COORDINATOR"] = "transplant-coordinator";
50
+ TripParticipantRole["PILOT"] = "pilot";
51
+ TripParticipantRole["COPILOT"] = "copilot";
52
+ TripParticipantRole["DRIVER"] = "driver";
53
+ TripParticipantRole["TRANSPORATION_OPERATOR_DISPATCHER"] = "charter-operator-dispatcher";
54
+ TripParticipantRole["OTHER"] = "other";
55
+ })(TripParticipantRole = exports.TripParticipantRole || (exports.TripParticipantRole = {}));
56
+ var Gender;
57
+ (function (Gender) {
58
+ Gender["MALE"] = "male";
59
+ Gender["FEMALE"] = "female";
60
+ Gender["UNSPECIFIED"] = "unspecified";
61
+ })(Gender = exports.Gender || (exports.Gender = {}));
62
+ class Participant {
63
+ constructor(participant) {
64
+ this.id = participant.id;
65
+ this.organizationId = participant.organizationId;
66
+ this.firstName = participant.firstName;
67
+ this.lastName = participant.lastName;
68
+ this.phoneNumber = participant.phoneNumber;
69
+ this.gender = participant.gender || undefined;
70
+ this.dietaryPreferences = participant.dietaryPreferences || undefined;
71
+ this.weightInPounds = participant.weightInPounds || undefined;
72
+ this.birthdate = participant.birthdate || undefined;
73
+ this.email = participant.email || undefined;
74
+ this.userId = participant.userId || undefined;
75
+ this.createdAt = participant.createdAt || undefined;
76
+ this.updatedAt = participant.updatedAt || undefined;
77
+ }
78
+ }
79
+ exports.Participant = Participant;
80
+ class Trip {
81
+ constructor(trip) {
82
+ this.id = trip.id;
83
+ this.transportationRequestId = trip.transportationRequestId;
84
+ this.tripSegments = trip.tripSegments || [];
85
+ this.scheduledStartTime = trip.scheduledStartTime;
86
+ this.scheduledCompletionTime = trip.scheduledCompletionTime;
87
+ this.participants = trip.participants || [];
88
+ this.actualStartTime = trip.actualStartTime || undefined;
89
+ this.actualCompletionTime = trip.actualCompletionTime || undefined;
90
+ this.createdAt = trip.createdAt;
91
+ this.updatedAt = trip.updatedAt;
92
+ }
93
+ }
94
+ exports.Trip = Trip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulsecharterconnect/types",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "A TypeScript library for enhanced type safety.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,4 +26,4 @@
26
26
  "dependencies": {
27
27
  "@types/express": "^5.0.0"
28
28
  }
29
- }
29
+ }