@pulsecharterconnect/types 0.0.6 → 0.0.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.
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type OrganizationType = 'System Admin' | 'Transplant Center' | 'Transportation Provider' | 'Surgical Provider' | 'Donor Hospital';
|
|
2
|
+
export type AirService = 'Jet' | 'TurboProp' | 'Helicopter';
|
|
3
|
+
export type GroundService = 'Ambulance' | 'Limo' | 'Car' | 'Mid-Size SUV' | 'Full-Size SUV';
|
|
4
|
+
export type Aircraft = {
|
|
5
|
+
type: AirService;
|
|
6
|
+
tailNumber: string;
|
|
7
|
+
};
|
|
8
|
+
export type SafetyRequirements = {};
|
|
9
|
+
export type SafetyCertifications = {};
|
|
10
|
+
export type Facility = {
|
|
11
|
+
id: string;
|
|
12
|
+
displayName: string;
|
|
13
|
+
formattedAddress: string;
|
|
14
|
+
city: string;
|
|
15
|
+
state: string;
|
|
16
|
+
location?: {
|
|
17
|
+
lat: number;
|
|
18
|
+
lng: number;
|
|
19
|
+
};
|
|
20
|
+
utcOffsetMinutes: number;
|
|
21
|
+
};
|
|
22
|
+
export interface ISystemAdminOrganization {
|
|
23
|
+
}
|
|
24
|
+
export interface ITransplantCenterOrganization {
|
|
25
|
+
facilities: Facility[];
|
|
26
|
+
safetyRequirements: SafetyRequirements[];
|
|
27
|
+
}
|
|
28
|
+
export interface ITranportationOperatorOrganization {
|
|
29
|
+
transportationServicesProvided: {
|
|
30
|
+
air: AirService[];
|
|
31
|
+
ground: GroundService[];
|
|
32
|
+
};
|
|
33
|
+
safetyCertifications: SafetyCertifications[];
|
|
34
|
+
airFleet?: Aircraft[];
|
|
35
|
+
}
|
|
36
|
+
export interface IOrganization {
|
|
37
|
+
id: string;
|
|
38
|
+
workOsId: string;
|
|
39
|
+
name: string;
|
|
40
|
+
type: OrganizationType;
|
|
41
|
+
systemAdminOrganizationDetails?: ISystemAdminOrganization;
|
|
42
|
+
transplantCenterOrganizationDetails?: ITransplantCenterOrganization;
|
|
43
|
+
transportationProviderOrganizationDetails?: ITranportationOperatorOrganization;
|
|
44
|
+
}
|
|
45
|
+
export declare class Organization implements IOrganization {
|
|
46
|
+
id: string;
|
|
47
|
+
workOsId: string;
|
|
48
|
+
name: string;
|
|
49
|
+
type: OrganizationType;
|
|
50
|
+
systemAdminOrganizationDetails?: ISystemAdminOrganization;
|
|
51
|
+
transplantCenterOrganizationDetails?: ITransplantCenterOrganization;
|
|
52
|
+
transportationProviderOrganizationDetails?: ITranportationOperatorOrganization;
|
|
53
|
+
constructor(id: string, workOsId: string, name: string, type: OrganizationType, systemAdminOrganizationDetails?: ISystemAdminOrganization, transplantCenterOrganizationDetails?: ITransplantCenterOrganization, transportationProviderOrganizationDetails?: ITranportationOperatorOrganization);
|
|
54
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Organization = void 0;
|
|
4
|
+
class Organization {
|
|
5
|
+
constructor(id, workOsId, name, type, systemAdminOrganizationDetails, transplantCenterOrganizationDetails, transportationProviderOrganizationDetails) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.workOsId = workOsId;
|
|
8
|
+
this.name = name;
|
|
9
|
+
this.type = type;
|
|
10
|
+
switch (type) {
|
|
11
|
+
case 'System Admin':
|
|
12
|
+
this.systemAdminOrganizationDetails = systemAdminOrganizationDetails;
|
|
13
|
+
break;
|
|
14
|
+
case 'Transplant Center':
|
|
15
|
+
this.transplantCenterOrganizationDetails = transplantCenterOrganizationDetails;
|
|
16
|
+
break;
|
|
17
|
+
case 'Transportation Provider':
|
|
18
|
+
this.transportationProviderOrganizationDetails = transportationProviderOrganizationDetails;
|
|
19
|
+
break;
|
|
20
|
+
default:
|
|
21
|
+
throw new Error('Organization type not recognized');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.Organization = Organization;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulsecharterconnect/types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.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
|
+
}
|