@pulsecharterconnect/types 0.1.57 → 0.1.59
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.
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare enum FeatureFlagName {
|
|
2
2
|
GROUND_TRANSPORTATION = "ground-transportation",
|
|
3
3
|
IN_TRAINING = "in-training",
|
|
4
|
-
JET_INSIGHT_INTEGRATION = "jet-insight-integration"
|
|
4
|
+
JET_INSIGHT_INTEGRATION = "jet-insight-integration",
|
|
5
|
+
COMMUNICATIONS = "communications",
|
|
6
|
+
LOGISTICS = "logistics"
|
|
5
7
|
}
|
|
6
8
|
export interface IFeatureFlag {
|
|
7
9
|
name: FeatureFlagName;
|
|
@@ -6,6 +6,8 @@ var FeatureFlagName;
|
|
|
6
6
|
FeatureFlagName["GROUND_TRANSPORTATION"] = "ground-transportation";
|
|
7
7
|
FeatureFlagName["IN_TRAINING"] = "in-training";
|
|
8
8
|
FeatureFlagName["JET_INSIGHT_INTEGRATION"] = "jet-insight-integration";
|
|
9
|
+
FeatureFlagName["COMMUNICATIONS"] = "communications";
|
|
10
|
+
FeatureFlagName["LOGISTICS"] = "logistics";
|
|
9
11
|
})(FeatureFlagName = exports.FeatureFlagName || (exports.FeatureFlagName = {}));
|
|
10
12
|
class FeatureFlag {
|
|
11
13
|
constructor(featureFlag) {
|
|
@@ -190,4 +190,12 @@ export declare class Organization implements IOrganization {
|
|
|
190
190
|
createdAt?: number;
|
|
191
191
|
updatedAt?: number;
|
|
192
192
|
constructor(organization: IOrganization);
|
|
193
|
+
communicationsEnabled(): boolean;
|
|
194
|
+
logisticsEnabled(): boolean;
|
|
195
|
+
inTraining(): boolean;
|
|
196
|
+
isTransplantCenter(): boolean;
|
|
197
|
+
isTransportationOperator(): boolean;
|
|
198
|
+
isGroundOperator(): boolean;
|
|
199
|
+
isAirOperator(): boolean;
|
|
200
|
+
isSystemAdmin(): boolean;
|
|
193
201
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Organization = exports.TimezoneDisplayMode = exports.SafetyRequirements = exports.StateCode = exports.GroundService = exports.AirService = exports.OrganizationType = void 0;
|
|
4
|
+
const FeatureFlag_1 = require("./FeatureFlag");
|
|
4
5
|
var OrganizationType;
|
|
5
6
|
(function (OrganizationType) {
|
|
6
7
|
OrganizationType["SYSTEM_ADMIN"] = "System Admin";
|
|
@@ -123,5 +124,49 @@ class Organization {
|
|
|
123
124
|
this.createdAt = organization.createdAt;
|
|
124
125
|
this.updatedAt = organization.updatedAt;
|
|
125
126
|
}
|
|
127
|
+
communicationsEnabled() {
|
|
128
|
+
return this.featureFlags.some((flag) => flag.name === FeatureFlag_1.FeatureFlagName.COMMUNICATIONS && flag.enabled);
|
|
129
|
+
}
|
|
130
|
+
logisticsEnabled() {
|
|
131
|
+
if (this.type !== OrganizationType.TRANSPLANT_CENTER) {
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
return this.featureFlags.some((flag) => flag.name === FeatureFlag_1.FeatureFlagName.LOGISTICS && flag.enabled);
|
|
135
|
+
}
|
|
136
|
+
inTraining() {
|
|
137
|
+
if (this.type !== OrganizationType.TRANSPLANT_CENTER) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
return this.featureFlags.some((flag) => flag.name === FeatureFlag_1.FeatureFlagName.IN_TRAINING && flag.enabled);
|
|
141
|
+
}
|
|
142
|
+
isTransplantCenter() {
|
|
143
|
+
return this.type === OrganizationType.TRANSPLANT_CENTER;
|
|
144
|
+
}
|
|
145
|
+
isTransportationOperator() {
|
|
146
|
+
return this.type === OrganizationType.TRANSPORTATION_OPERATOR;
|
|
147
|
+
}
|
|
148
|
+
isGroundOperator() {
|
|
149
|
+
var _a;
|
|
150
|
+
return ((this.type === OrganizationType.TRANSPORTATION_OPERATOR &&
|
|
151
|
+
((_a = this.transportationOperatorOrganizationDetails) === null || _a === void 0 ? void 0 : _a.transportationServicesProvided) &&
|
|
152
|
+
Array.isArray(this.transportationOperatorOrganizationDetails
|
|
153
|
+
.transportationServicesProvided.ground) &&
|
|
154
|
+
this.transportationOperatorOrganizationDetails
|
|
155
|
+
.transportationServicesProvided.ground.length > 0) ||
|
|
156
|
+
false);
|
|
157
|
+
}
|
|
158
|
+
isAirOperator() {
|
|
159
|
+
var _a;
|
|
160
|
+
return ((this.type === OrganizationType.TRANSPORTATION_OPERATOR &&
|
|
161
|
+
((_a = this.transportationOperatorOrganizationDetails) === null || _a === void 0 ? void 0 : _a.transportationServicesProvided) &&
|
|
162
|
+
Array.isArray(this.transportationOperatorOrganizationDetails
|
|
163
|
+
.transportationServicesProvided.air) &&
|
|
164
|
+
this.transportationOperatorOrganizationDetails
|
|
165
|
+
.transportationServicesProvided.air.length > 0) ||
|
|
166
|
+
false);
|
|
167
|
+
}
|
|
168
|
+
isSystemAdmin() {
|
|
169
|
+
return this.type === OrganizationType.SYSTEM_ADMIN;
|
|
170
|
+
}
|
|
126
171
|
}
|
|
127
172
|
exports.Organization = Organization;
|
package/dist/types/Trip.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Facility, GroundService } from "./Organization";
|
|
2
2
|
import { IProposalSegment } from "./Proposal";
|
|
3
|
-
import { OrganType } from "./TransportationRequest";
|
|
3
|
+
import { OrganType, RecoveryType } from "./TransportationRequest";
|
|
4
4
|
export declare enum TripStatus {
|
|
5
5
|
PREPARATION = "preparation",
|
|
6
6
|
IN_PROGRESS = "in-progress",
|
|
@@ -189,6 +189,10 @@ export interface ITrip {
|
|
|
189
189
|
transportationRequestId?: string;
|
|
190
190
|
unosId: string;
|
|
191
191
|
organTypes: OrganType[];
|
|
192
|
+
recipientFacility: Facility;
|
|
193
|
+
recoveryLocation: Facility;
|
|
194
|
+
tripDistanceInMiles?: number;
|
|
195
|
+
recoveryType: RecoveryType;
|
|
192
196
|
currentSegmentNumber?: number;
|
|
193
197
|
tripSegments?: Array<ITripGroundSegment | ITripAirSegment | ITripOrganRecoverySegment>;
|
|
194
198
|
scheduledStartTime?: number;
|
|
@@ -209,6 +213,10 @@ export declare class Trip implements ITrip {
|
|
|
209
213
|
transportationRequestId?: string;
|
|
210
214
|
unosId: string;
|
|
211
215
|
organTypes: OrganType[];
|
|
216
|
+
recipientFacility: Facility;
|
|
217
|
+
recoveryLocation: Facility;
|
|
218
|
+
tripDistanceInMiles?: number;
|
|
219
|
+
recoveryType: RecoveryType;
|
|
212
220
|
currentSegmentNumber?: number;
|
|
213
221
|
tripSegments?: Array<ITripGroundSegment | ITripAirSegment | ITripOrganRecoverySegment>;
|
|
214
222
|
scheduledStartTime?: number;
|
package/dist/types/Trip.js
CHANGED
|
@@ -142,6 +142,10 @@ class Trip {
|
|
|
142
142
|
this.transportationRequestId = trip.transportationRequestId;
|
|
143
143
|
this.unosId = trip.unosId;
|
|
144
144
|
this.organTypes = trip.organTypes || [];
|
|
145
|
+
this.recipientFacility = trip.recipientFacility;
|
|
146
|
+
this.recoveryLocation = trip.recoveryLocation;
|
|
147
|
+
this.tripDistanceInMiles = trip.tripDistanceInMiles;
|
|
148
|
+
this.recoveryType = trip.recoveryType;
|
|
145
149
|
this.currentSegmentNumber = trip.currentSegmentNumber || 0;
|
|
146
150
|
this.tripSegments = trip.tripSegments || [];
|
|
147
151
|
this.scheduledStartTime = trip.scheduledStartTime;
|