@pulsecharterconnect/types 0.1.56 → 0.1.58

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,7 @@ 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;
193
196
  }
@@ -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,20 @@ 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
+ }
126
142
  }
127
143
  exports.Organization = Organization;
@@ -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,13 +189,17 @@ 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
- tripSegments: Array<ITripGroundSegment | ITripAirSegment | ITripOrganRecoverySegment>;
194
- scheduledStartTime: number;
195
- scheduledStartTimeTimezone: string;
196
- scheduledCompletionTime: number;
197
+ tripSegments?: Array<ITripGroundSegment | ITripAirSegment | ITripOrganRecoverySegment>;
198
+ scheduledStartTime?: number;
199
+ scheduledStartTimeTimezone?: string;
200
+ scheduledCompletionTime?: number;
197
201
  scheduledCompletionTimeTimezone?: string;
198
- participants: ITripParticipant[];
202
+ participants?: ITripParticipant[];
199
203
  actualStartTime?: number;
200
204
  actualStartTimeTimezone?: string;
201
205
  actualCompletionTime?: number;
@@ -209,13 +213,17 @@ 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
- tripSegments: Array<ITripGroundSegment | ITripAirSegment | ITripOrganRecoverySegment>;
214
- scheduledStartTime: number;
215
- scheduledStartTimeTimezone: string;
216
- scheduledCompletionTime: number;
221
+ tripSegments?: Array<ITripGroundSegment | ITripAirSegment | ITripOrganRecoverySegment>;
222
+ scheduledStartTime?: number;
223
+ scheduledStartTimeTimezone?: string;
224
+ scheduledCompletionTime?: number;
217
225
  scheduledCompletionTimeTimezone?: string;
218
- participants: ITripParticipant[];
226
+ participants?: ITripParticipant[];
219
227
  actualStartTime?: number;
220
228
  actualStartTimeTimezone?: string;
221
229
  actualCompletionTime?: number;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulsecharterconnect/types",
3
- "version": "0.1.56",
3
+ "version": "0.1.58",
4
4
  "description": "A TypeScript library for enhanced type safety.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",