@pulsecharterconnect/types 0.0.5 → 0.0.7
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.
|
@@ -7,7 +7,7 @@ export interface IApiResult<T = any> {
|
|
|
7
7
|
data?: T;
|
|
8
8
|
message?: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export declare class ApiResult<TData = any> implements IApiResult<TData> {
|
|
11
11
|
/** Create a failed API result */
|
|
12
12
|
static failure<TData = any>(message?: string, data?: TData | undefined): ApiResult<TData>;
|
|
13
13
|
/** Create a successful API result */
|
package/dist/types/ApiResult.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApiResultWithError = exports.ApiResultStatus = void 0;
|
|
3
|
+
exports.ApiResultWithError = exports.ApiResult = exports.ApiResultStatus = void 0;
|
|
4
4
|
var ApiResultStatus;
|
|
5
5
|
(function (ApiResultStatus) {
|
|
6
6
|
ApiResultStatus["Success"] = "success";
|
|
@@ -49,7 +49,7 @@ class ApiResult {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
exports.
|
|
52
|
+
exports.ApiResult = ApiResult;
|
|
53
53
|
/**
|
|
54
54
|
* Use this as a base class when the API returns a different data struct for an Error then a Success response.
|
|
55
55
|
*/
|
|
@@ -0,0 +1,66 @@
|
|
|
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 type OrganizationDetails = {
|
|
23
|
+
type: 'System Admin';
|
|
24
|
+
details: ISystemAdminOrganization;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'Transplant Center';
|
|
27
|
+
details: ITransplantCenterOrganization;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'Transportation Provider';
|
|
30
|
+
details: ITranportationOperatorOrganization;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'Surgical Provider';
|
|
33
|
+
details: {};
|
|
34
|
+
} | {
|
|
35
|
+
type: 'Donor Hospital';
|
|
36
|
+
details: {};
|
|
37
|
+
};
|
|
38
|
+
export interface ISystemAdminOrganization {
|
|
39
|
+
}
|
|
40
|
+
export interface ITransplantCenterOrganization {
|
|
41
|
+
facilities: Facility[];
|
|
42
|
+
safetyRequirements: SafetyRequirements[];
|
|
43
|
+
}
|
|
44
|
+
export interface ITranportationOperatorOrganization {
|
|
45
|
+
transportationServicesProvided: {
|
|
46
|
+
air: AirService[];
|
|
47
|
+
ground: GroundService[];
|
|
48
|
+
};
|
|
49
|
+
safetyCertifications: SafetyCertifications[];
|
|
50
|
+
airFleet?: Aircraft[];
|
|
51
|
+
}
|
|
52
|
+
export interface IOrganization {
|
|
53
|
+
id: string;
|
|
54
|
+
workOsId: string;
|
|
55
|
+
name: string;
|
|
56
|
+
type: OrganizationType;
|
|
57
|
+
organizationDetails: OrganizationDetails;
|
|
58
|
+
}
|
|
59
|
+
export declare class Organization implements IOrganization {
|
|
60
|
+
id: string;
|
|
61
|
+
workOsId: string;
|
|
62
|
+
name: string;
|
|
63
|
+
type: OrganizationType;
|
|
64
|
+
organizationDetails: OrganizationDetails;
|
|
65
|
+
constructor(id: string, workOsId: string, name: string, type: OrganizationType, organizationDetails: OrganizationDetails);
|
|
66
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Organization = void 0;
|
|
4
|
+
class Organization {
|
|
5
|
+
constructor(id, workOsId, name, type, organizationDetails) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.workOsId = workOsId;
|
|
8
|
+
this.name = name;
|
|
9
|
+
this.type = type;
|
|
10
|
+
this.organizationDetails = organizationDetails;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
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.7",
|
|
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
|
+
}
|