triage-types 1.0.38 → 1.0.40
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.
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/types/AR/ARStateFacility.d.ts +1 -1
- package/dist/src/types/AR/ARStateFacility.js +3 -3
- package/dist/src/types/KY/KYStateFacility.d.ts +14 -0
- package/dist/src/types/KY/KYStateFacility.js +35 -0
- package/dist/src/types/NC/NCStateFacility.d.ts +1 -1
- package/dist/src/types/NC/NCStateFacility.js +3 -3
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/types/AR/ARStateFacility.ts +3 -3
- package/src/types/KY/KYStateFacility.ts +41 -0
- package/src/types/NC/NCStateFacility.ts +3 -3
package/dist/src/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export * from "./types/AR/ARStateFacility.js";
|
|
|
4
4
|
export * from "./types/AR/ARStatePermit.js";
|
|
5
5
|
export * from "./types/AR/ARStatePermitSource.js";
|
|
6
6
|
export * from "./types/AR/ARStatePermitSourcePollutant.js";
|
|
7
|
+
export * from "./types/KY/KYStateFacility.js";
|
|
7
8
|
export * from "./types/NC/NCStateFacility.js";
|
|
8
9
|
export * from "./types/NC/NCStatePermit.js";
|
package/dist/src/index.js
CHANGED
|
@@ -4,5 +4,6 @@ export * from "./types/AR/ARStateFacility.js";
|
|
|
4
4
|
export * from "./types/AR/ARStatePermit.js";
|
|
5
5
|
export * from "./types/AR/ARStatePermitSource.js";
|
|
6
6
|
export * from "./types/AR/ARStatePermitSourcePollutant.js";
|
|
7
|
+
export * from "./types/KY/KYStateFacility.js";
|
|
7
8
|
export * from "./types/NC/NCStateFacility.js";
|
|
8
9
|
export * from "./types/NC/NCStatePermit.js";
|
|
@@ -5,7 +5,7 @@ export declare class ARStateFacility {
|
|
|
5
5
|
readonly state_id: StateID;
|
|
6
6
|
readonly facility_id: string;
|
|
7
7
|
readonly name: string;
|
|
8
|
-
readonly
|
|
8
|
+
readonly is_active: boolean;
|
|
9
9
|
readonly type_id: string;
|
|
10
10
|
readonly site_address_city?: string;
|
|
11
11
|
readonly [x: string]: any;
|
|
@@ -5,7 +5,7 @@ export class ARStateFacility {
|
|
|
5
5
|
state_id;
|
|
6
6
|
facility_id;
|
|
7
7
|
name;
|
|
8
|
-
|
|
8
|
+
is_active;
|
|
9
9
|
type_id;
|
|
10
10
|
site_address_city;
|
|
11
11
|
constructor(state_facility) {
|
|
@@ -16,7 +16,7 @@ export class ARStateFacility {
|
|
|
16
16
|
this.state_id = state_facility.state_id;
|
|
17
17
|
this.facility_id = state_facility.facility_id;
|
|
18
18
|
this.name = state_facility.name;
|
|
19
|
-
this.
|
|
19
|
+
this.is_active = state_facility.is_active;
|
|
20
20
|
this.type_id = state_facility.type_id;
|
|
21
21
|
this.site_address_city = state_facility.site_address_city;
|
|
22
22
|
}
|
|
@@ -26,7 +26,7 @@ export class ARStateFacility {
|
|
|
26
26
|
typeof state_facility.state_facility_id === "string" &&
|
|
27
27
|
typeof state_facility.facility_id === "string" &&
|
|
28
28
|
typeof state_facility.name === "string" &&
|
|
29
|
-
typeof state_facility.
|
|
29
|
+
typeof state_facility.is_active === "boolean" &&
|
|
30
30
|
typeof state_facility.type_id === "string" &&
|
|
31
31
|
(state_facility.site_address_city === undefined || typeof state_facility.site_address_city === "string"));
|
|
32
32
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StateID } from "../State.js";
|
|
2
|
+
export declare class KYStateFacility {
|
|
3
|
+
readonly state_facility_id: string;
|
|
4
|
+
readonly state_id: StateID;
|
|
5
|
+
readonly facility_id: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly is_active: boolean;
|
|
8
|
+
readonly type_id: string;
|
|
9
|
+
readonly site_address_city: string;
|
|
10
|
+
readonly site_address_county: string;
|
|
11
|
+
readonly [x: string]: any;
|
|
12
|
+
constructor(state_facility: KYStateFacility);
|
|
13
|
+
static is(state_facility: any): state_facility is KYStateFacility;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { is_state_id } from "../State.js";
|
|
2
|
+
export class KYStateFacility {
|
|
3
|
+
state_facility_id;
|
|
4
|
+
state_id;
|
|
5
|
+
facility_id;
|
|
6
|
+
name;
|
|
7
|
+
is_active;
|
|
8
|
+
type_id;
|
|
9
|
+
site_address_city;
|
|
10
|
+
site_address_county;
|
|
11
|
+
constructor(state_facility) {
|
|
12
|
+
if (!KYStateFacility.is(state_facility)) {
|
|
13
|
+
throw Error("Invalid input.");
|
|
14
|
+
}
|
|
15
|
+
this.state_facility_id = state_facility.state_facility_id;
|
|
16
|
+
this.state_id = state_facility.state_id;
|
|
17
|
+
this.facility_id = state_facility.facility_id;
|
|
18
|
+
this.name = state_facility.name;
|
|
19
|
+
this.is_active = state_facility.is_active;
|
|
20
|
+
this.type_id = state_facility.type_id;
|
|
21
|
+
this.site_address_city = state_facility.site_address_city;
|
|
22
|
+
this.site_address_county = state_facility.site_address_county;
|
|
23
|
+
}
|
|
24
|
+
static is(state_facility) {
|
|
25
|
+
return (state_facility !== undefined &&
|
|
26
|
+
is_state_id(state_facility.state_id) && state_facility.state_id === "KY" &&
|
|
27
|
+
typeof state_facility.state_facility_id === "string" &&
|
|
28
|
+
typeof state_facility.facility_id === "string" &&
|
|
29
|
+
typeof state_facility.name === "string" &&
|
|
30
|
+
typeof state_facility.is_active === "boolean" &&
|
|
31
|
+
typeof state_facility.type_id === "string" &&
|
|
32
|
+
(state_facility.site_address_city === undefined || typeof state_facility.site_address_city === "string") &&
|
|
33
|
+
(state_facility.site_address_county === undefined || typeof state_facility.site_address_county === "string"));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -5,7 +5,7 @@ export declare class NCStateFacility {
|
|
|
5
5
|
readonly facility_id: string;
|
|
6
6
|
readonly name: string;
|
|
7
7
|
readonly owner: string;
|
|
8
|
-
readonly
|
|
8
|
+
readonly is_active: boolean;
|
|
9
9
|
readonly type_id: string;
|
|
10
10
|
readonly site_address_county?: string;
|
|
11
11
|
readonly [x: string]: any;
|
|
@@ -5,7 +5,7 @@ export class NCStateFacility {
|
|
|
5
5
|
facility_id;
|
|
6
6
|
name;
|
|
7
7
|
owner;
|
|
8
|
-
|
|
8
|
+
is_active;
|
|
9
9
|
type_id;
|
|
10
10
|
site_address_county;
|
|
11
11
|
constructor(state_facility) {
|
|
@@ -17,7 +17,7 @@ export class NCStateFacility {
|
|
|
17
17
|
this.facility_id = state_facility.facility_id;
|
|
18
18
|
this.name = state_facility.name;
|
|
19
19
|
this.owner = state_facility.owner;
|
|
20
|
-
this.
|
|
20
|
+
this.is_active = state_facility.is_active;
|
|
21
21
|
this.type_id = state_facility.type_id;
|
|
22
22
|
this.site_address_county = state_facility.site_address_county;
|
|
23
23
|
}
|
|
@@ -28,7 +28,7 @@ export class NCStateFacility {
|
|
|
28
28
|
typeof state_facility.facility_id === "string" &&
|
|
29
29
|
typeof state_facility.name === "string" &&
|
|
30
30
|
typeof state_facility.owner === "string" &&
|
|
31
|
-
typeof state_facility.
|
|
31
|
+
typeof state_facility.is_active === "boolean" &&
|
|
32
32
|
typeof state_facility.type_id === "string" &&
|
|
33
33
|
(state_facility.site_address_county === undefined || typeof state_facility.site_address_county === "string"));
|
|
34
34
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,5 +4,6 @@ export * from "./types/AR/ARStateFacility"
|
|
|
4
4
|
export * from "./types/AR/ARStatePermit"
|
|
5
5
|
export * from "./types/AR/ARStatePermitSource"
|
|
6
6
|
export * from "./types/AR/ARStatePermitSourcePollutant"
|
|
7
|
+
export * from "./types/KY/KYStateFacility"
|
|
7
8
|
export * from "./types/NC/NCStateFacility"
|
|
8
9
|
export * from "./types/NC/NCStatePermit"
|
|
@@ -6,7 +6,7 @@ export class ARStateFacility {
|
|
|
6
6
|
readonly state_id : StateID
|
|
7
7
|
readonly facility_id : string
|
|
8
8
|
readonly name : string
|
|
9
|
-
readonly
|
|
9
|
+
readonly is_active : boolean
|
|
10
10
|
readonly type_id : string
|
|
11
11
|
readonly site_address_city? : string
|
|
12
12
|
readonly [x : string] : any
|
|
@@ -19,7 +19,7 @@ export class ARStateFacility {
|
|
|
19
19
|
this.state_id = state_facility.state_id
|
|
20
20
|
this.facility_id = state_facility.facility_id
|
|
21
21
|
this.name = state_facility.name
|
|
22
|
-
this.
|
|
22
|
+
this.is_active = state_facility.is_active
|
|
23
23
|
this.type_id = state_facility.type_id
|
|
24
24
|
this.site_address_city = state_facility.site_address_city
|
|
25
25
|
}
|
|
@@ -31,7 +31,7 @@ export class ARStateFacility {
|
|
|
31
31
|
typeof state_facility.state_facility_id === "string" &&
|
|
32
32
|
typeof state_facility.facility_id === "string" &&
|
|
33
33
|
typeof state_facility.name === "string" &&
|
|
34
|
-
typeof state_facility.
|
|
34
|
+
typeof state_facility.is_active === "boolean" &&
|
|
35
35
|
typeof state_facility.type_id === "string" &&
|
|
36
36
|
(state_facility.site_address_city=== undefined || typeof state_facility.site_address_city === "string")
|
|
37
37
|
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { is_state_id, StateID } from "../State"
|
|
2
|
+
|
|
3
|
+
export class KYStateFacility {
|
|
4
|
+
readonly state_facility_id : string
|
|
5
|
+
readonly state_id : StateID
|
|
6
|
+
readonly facility_id : string
|
|
7
|
+
readonly name : string
|
|
8
|
+
readonly is_active : boolean
|
|
9
|
+
readonly type_id : string
|
|
10
|
+
readonly site_address_city : string
|
|
11
|
+
readonly site_address_county : string
|
|
12
|
+
readonly [x : string] : any
|
|
13
|
+
|
|
14
|
+
constructor(state_facility : KYStateFacility) {
|
|
15
|
+
if (!KYStateFacility.is(state_facility)) {
|
|
16
|
+
throw Error("Invalid input.")
|
|
17
|
+
}
|
|
18
|
+
this.state_facility_id = state_facility.state_facility_id
|
|
19
|
+
this.state_id = state_facility.state_id
|
|
20
|
+
this.facility_id = state_facility.facility_id
|
|
21
|
+
this.name = state_facility.name
|
|
22
|
+
this.is_active = state_facility.is_active
|
|
23
|
+
this.type_id = state_facility.type_id
|
|
24
|
+
this.site_address_city = state_facility.site_address_city
|
|
25
|
+
this.site_address_county = state_facility.site_address_county
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static is(state_facility : any) : state_facility is KYStateFacility {
|
|
29
|
+
return (
|
|
30
|
+
state_facility !== undefined &&
|
|
31
|
+
is_state_id(state_facility.state_id) && state_facility.state_id === "KY" &&
|
|
32
|
+
typeof state_facility.state_facility_id === "string" &&
|
|
33
|
+
typeof state_facility.facility_id === "string" &&
|
|
34
|
+
typeof state_facility.name === "string" &&
|
|
35
|
+
typeof state_facility.is_active === "boolean" &&
|
|
36
|
+
typeof state_facility.type_id === "string" &&
|
|
37
|
+
(state_facility.site_address_city === undefined || typeof state_facility.site_address_city === "string") &&
|
|
38
|
+
(state_facility.site_address_county === undefined || typeof state_facility.site_address_county === "string")
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -6,7 +6,7 @@ export class NCStateFacility {
|
|
|
6
6
|
readonly facility_id : string
|
|
7
7
|
readonly name : string
|
|
8
8
|
readonly owner : string
|
|
9
|
-
readonly
|
|
9
|
+
readonly is_active : boolean
|
|
10
10
|
readonly type_id : string
|
|
11
11
|
readonly site_address_county? : string
|
|
12
12
|
readonly [x : string] : any
|
|
@@ -20,7 +20,7 @@ export class NCStateFacility {
|
|
|
20
20
|
this.facility_id = state_facility.facility_id
|
|
21
21
|
this.name = state_facility.name
|
|
22
22
|
this.owner = state_facility.owner
|
|
23
|
-
this.
|
|
23
|
+
this.is_active = state_facility.is_active
|
|
24
24
|
this.type_id = state_facility.type_id
|
|
25
25
|
this.site_address_county = state_facility.site_address_county
|
|
26
26
|
}
|
|
@@ -33,7 +33,7 @@ export class NCStateFacility {
|
|
|
33
33
|
typeof state_facility.facility_id === "string" &&
|
|
34
34
|
typeof state_facility.name === "string" &&
|
|
35
35
|
typeof state_facility.owner === "string" &&
|
|
36
|
-
typeof state_facility.
|
|
36
|
+
typeof state_facility.is_active === "boolean" &&
|
|
37
37
|
typeof state_facility.type_id === "string" &&
|
|
38
38
|
(state_facility.site_address_county === undefined || typeof state_facility.site_address_county === "string")
|
|
39
39
|
)
|