@pulsecharterconnect/types 0.2.72 → 0.2.74

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.
@@ -3,7 +3,8 @@ export declare enum FeatureFlagName {
3
3
  IN_TRAINING = "in-training",
4
4
  JET_INSIGHT_INTEGRATION = "jet-insight-integration",
5
5
  COMMUNICATIONS = "communications",
6
- LOGISTICS = "logistics"
6
+ LOGISTICS = "logistics",
7
+ PROPOSAL_SELECT_ADDITIONAL_DETAILS = "proposal-select-additional-details"
7
8
  }
8
9
  export interface IFeatureFlag {
9
10
  name: FeatureFlagName;
@@ -8,6 +8,7 @@ var FeatureFlagName;
8
8
  FeatureFlagName["JET_INSIGHT_INTEGRATION"] = "jet-insight-integration";
9
9
  FeatureFlagName["COMMUNICATIONS"] = "communications";
10
10
  FeatureFlagName["LOGISTICS"] = "logistics";
11
+ FeatureFlagName["PROPOSAL_SELECT_ADDITIONAL_DETAILS"] = "proposal-select-additional-details";
11
12
  })(FeatureFlagName = exports.FeatureFlagName || (exports.FeatureFlagName = {}));
12
13
  class FeatureFlag {
13
14
  constructor(featureFlag) {
@@ -1,4 +1,5 @@
1
1
  import { IFeatureFlag } from "./FeatureFlag";
2
+ import { IParticipant } from "./Trip";
2
3
  export declare enum OrganizationType {
3
4
  SYSTEM_ADMIN = "System Admin",
4
5
  TRANSPLANT_CENTER = "Transplant Center",
@@ -163,6 +164,9 @@ export interface ITranportationOperatorOrganization {
163
164
  safetyCertifications: SafetyCertifications[];
164
165
  markupPercentage?: number;
165
166
  }
167
+ export interface IOrganizationCommunicationsSettings {
168
+ alwaysAddParticipants: IParticipant[];
169
+ }
166
170
  export interface IOrganization {
167
171
  id: string;
168
172
  workOsId: string;
@@ -173,6 +177,7 @@ export interface IOrganization {
173
177
  systemAdminOrganizationDetails?: ISystemAdminOrganization;
174
178
  transplantCenterOrganizationDetails?: ITransplantCenterOrganization;
175
179
  transportationOperatorOrganizationDetails?: ITranportationOperatorOrganization;
180
+ communicationsSettings?: IOrganizationCommunicationsSettings;
176
181
  createdAt?: number;
177
182
  updatedAt?: number;
178
183
  }
@@ -190,6 +195,7 @@ export declare class Organization implements IOrganization {
190
195
  systemAdminOrganizationDetails?: ISystemAdminOrganization;
191
196
  transplantCenterOrganizationDetails?: ITransplantCenterOrganization;
192
197
  transportationOperatorOrganizationDetails?: ITranportationOperatorOrganization;
198
+ communicationsSettings?: IOrganizationCommunicationsSettings;
193
199
  createdAt?: number;
194
200
  updatedAt?: number;
195
201
  constructor(organization: IOrganization);
@@ -202,4 +208,5 @@ export declare class Organization implements IOrganization {
202
208
  isAirOperator(): boolean;
203
209
  isSystemAdmin(): boolean;
204
210
  isGroundTransportationEnabled(): boolean;
211
+ proposalSelectRequiresAdditionalDetails(): boolean;
205
212
  }
@@ -121,6 +121,11 @@ class Organization {
121
121
  throw new Error("Organization type not recognized");
122
122
  }
123
123
  this.featureFlags = organization.featureFlags || [];
124
+ if (!organization.communicationsSettings)
125
+ organization.communicationsSettings = { alwaysAddParticipants: [] };
126
+ if (!organization.communicationsSettings.alwaysAddParticipants)
127
+ organization.communicationsSettings.alwaysAddParticipants = [];
128
+ this.communicationsSettings = organization.communicationsSettings;
124
129
  this.createdAt = organization.createdAt;
125
130
  this.updatedAt = organization.updatedAt;
126
131
  }
@@ -171,5 +176,9 @@ class Organization {
171
176
  isGroundTransportationEnabled() {
172
177
  return this.featureFlags.some((flag) => flag.name === FeatureFlag_1.FeatureFlagName.GROUND_TRANSPORTATION && flag.enabled);
173
178
  }
179
+ proposalSelectRequiresAdditionalDetails() {
180
+ return this.featureFlags.some((flag) => flag.name === FeatureFlag_1.FeatureFlagName.PROPOSAL_SELECT_ADDITIONAL_DETAILS &&
181
+ flag.enabled);
182
+ }
174
183
  }
175
184
  exports.Organization = Organization;
@@ -338,7 +338,7 @@ class TransportationRequest {
338
338
  lat: 0,
339
339
  lng: 0,
340
340
  },
341
- scheduledDepartureTimeTimezone: distalTimezone,
341
+ scheduledDepartureTimeTimezone: localTimezone,
342
342
  scheduledArrivalTime: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
343
343
  .plus(recoveryTimeDuration)
344
344
  .plus({ hours: 1, minutes: 30 })
@@ -346,7 +346,7 @@ class TransportationRequest {
346
346
  .plus({ hours: 1, minutes: 30 })
347
347
  .plus(flightTime)
348
348
  .toMillis(),
349
- scheduledArrivalTimeTimezone: localTimezone,
349
+ scheduledArrivalTimeTimezone: distalTimezone,
350
350
  });
351
351
  }
352
352
  }
@@ -416,14 +416,14 @@ class TransportationRequest {
416
416
  lat: 0,
417
417
  lng: 0,
418
418
  },
419
- scheduledDepartureTimeTimezone: distalTimezone,
419
+ scheduledDepartureTimeTimezone: localTimezone,
420
420
  scheduledArrivalTime: luxon_1.DateTime.fromMillis(this.orDateTimeGMT)
421
421
  .plus({ hours: 1, minutes: 0 })
422
422
  .plus(flightTime)
423
423
  .plus({ hours: 1, minutes: 30 })
424
424
  .plus(flightTime)
425
425
  .toMillis(),
426
- scheduledArrivalTimeTimezone: localTimezone,
426
+ scheduledArrivalTimeTimezone: distalTimezone,
427
427
  });
428
428
  }
429
429
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulsecharterconnect/types",
3
- "version": "0.2.72",
3
+ "version": "0.2.74",
4
4
  "description": "A TypeScript library for enhanced type safety.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",