triage-types 1.0.31 → 1.0.33
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/types/AR/ARStateFacility.js +1 -1
- package/dist/src/types/AR/ARStatePermit.d.ts +5 -0
- package/dist/src/types/AR/ARStatePermit.js +17 -1
- package/dist/src/types/AR/ARStatePermitSource.js +1 -1
- package/dist/src/types/AR/ARStatePermitSourcePollutant.js +1 -1
- package/dist/src/types/NC/NCStateFacility.d.ts +13 -0
- package/dist/src/types/NC/NCStateFacility.js +32 -0
- package/dist/src/types/NC/NCStatePermit.d.ts +18 -0
- package/dist/src/types/NC/NCStatePermit.js +47 -0
- package/package.json +1 -1
- package/src/types/AR/ARStateFacility.ts +1 -1
- package/src/types/AR/ARStatePermit.ts +22 -1
- package/src/types/AR/ARStatePermitSource.ts +1 -1
- package/src/types/AR/ARStatePermitSourcePollutant.ts +1 -1
- package/src/types/NC/NCStateFacility.ts +38 -0
- package/src/types/NC/NCStatePermit.ts +54 -0
|
@@ -22,7 +22,7 @@ export class ARStateFacility {
|
|
|
22
22
|
}
|
|
23
23
|
static is(state_facility) {
|
|
24
24
|
return (state_facility !== undefined &&
|
|
25
|
-
is_state_id(state_facility.state_id) &&
|
|
25
|
+
is_state_id(state_facility.state_id) && state_facility.state_id === "AR" &&
|
|
26
26
|
typeof state_facility.state_facility_id === "string" &&
|
|
27
27
|
typeof state_facility.facility_id === "string" &&
|
|
28
28
|
typeof state_facility.name === "string" &&
|
|
@@ -18,6 +18,11 @@ export declare class ARStatePermit {
|
|
|
18
18
|
constructor(state_permit: ARStatePermit);
|
|
19
19
|
static is(state_permit: any): state_permit is ARStatePermit;
|
|
20
20
|
}
|
|
21
|
+
export declare class ARStateAirPermit extends ARStatePermit {
|
|
22
|
+
readonly freq_fish_tissue?: string;
|
|
23
|
+
constructor(state_permit: ARStateAirPermit);
|
|
24
|
+
static is(state_permit: any): state_permit is ARStateAirPermit;
|
|
25
|
+
}
|
|
21
26
|
export declare class ARStateWaterPermit extends ARStatePermit {
|
|
22
27
|
readonly freq_fish_tissue?: string;
|
|
23
28
|
constructor(state_permit: ARStateWaterPermit);
|
|
@@ -35,7 +35,7 @@ export class ARStatePermit {
|
|
|
35
35
|
static is(state_permit) {
|
|
36
36
|
return (state_permit !== undefined &&
|
|
37
37
|
typeof state_permit.state_permit_id === "string" &&
|
|
38
|
-
is_state_id(state_permit.state_id) &&
|
|
38
|
+
is_state_id(state_permit.state_id) && state_permit.state_id === "AR" &&
|
|
39
39
|
typeof state_permit.permit_id === "string" &&
|
|
40
40
|
typeof state_permit.state_facility_id === "string" &&
|
|
41
41
|
(state_permit.issue_date === undefined || typeof state_permit.issue_date === "string") &&
|
|
@@ -49,6 +49,21 @@ export class ARStatePermit {
|
|
|
49
49
|
(state_permit.source_ids === undefined || Array.isArray(state_permit.source_ids) && state_permit.source_ids.map((source_id) => typeof source_id === "string")));
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
export class ARStateAirPermit extends ARStatePermit {
|
|
53
|
+
freq_fish_tissue;
|
|
54
|
+
constructor(state_permit) {
|
|
55
|
+
if (!ARStateAirPermit.is(state_permit)) {
|
|
56
|
+
throw Error("Invalid input.");
|
|
57
|
+
}
|
|
58
|
+
super(state_permit);
|
|
59
|
+
this.freq_fish_tissue = state_permit.freq_fish_tissue;
|
|
60
|
+
}
|
|
61
|
+
static is(state_permit) {
|
|
62
|
+
return (ARStatePermit.is(state_permit) &&
|
|
63
|
+
state_permit.type_id === "AIR" &&
|
|
64
|
+
(state_permit.freq_fish_tissue === undefined || typeof state_permit.freq_fish_tissue === "string"));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
52
67
|
export class ARStateWaterPermit extends ARStatePermit {
|
|
53
68
|
freq_fish_tissue;
|
|
54
69
|
constructor(state_permit) {
|
|
@@ -60,6 +75,7 @@ export class ARStateWaterPermit extends ARStatePermit {
|
|
|
60
75
|
}
|
|
61
76
|
static is(state_permit) {
|
|
62
77
|
return (ARStatePermit.is(state_permit) &&
|
|
78
|
+
state_permit.type_id === "WATER-NPDES" &&
|
|
63
79
|
(state_permit.freq_fish_tissue === undefined || typeof state_permit.freq_fish_tissue === "string"));
|
|
64
80
|
}
|
|
65
81
|
}
|
|
@@ -22,7 +22,7 @@ export class ARStatePermitSource {
|
|
|
22
22
|
static is(state_permit_source) {
|
|
23
23
|
return (state_permit_source !== undefined &&
|
|
24
24
|
typeof state_permit_source.state_permit_source_id === "string" &&
|
|
25
|
-
is_state_id(state_permit_source.state_id) &&
|
|
25
|
+
is_state_id(state_permit_source.state_id) && state_permit_source.state_id === "AR" &&
|
|
26
26
|
typeof state_permit_source.state_permit_id === "string" &&
|
|
27
27
|
typeof state_permit_source.source_id === "string" &&
|
|
28
28
|
typeof state_permit_source.type_id === "string" &&
|
|
@@ -18,7 +18,7 @@ export class ARStatePermitSourcePollutant {
|
|
|
18
18
|
static is(state_permit_source_pollutant) {
|
|
19
19
|
return (state_permit_source_pollutant !== undefined &&
|
|
20
20
|
typeof state_permit_source_pollutant.state_permit_source_pollutant_id === "string" &&
|
|
21
|
-
is_state_id(state_permit_source_pollutant.state_id) &&
|
|
21
|
+
is_state_id(state_permit_source_pollutant.state_id) && state_permit_source_pollutant.state_id === "AR" &&
|
|
22
22
|
typeof state_permit_source_pollutant.state_permit_id === "string" &&
|
|
23
23
|
typeof state_permit_source_pollutant.state_permit_source_id === "string" &&
|
|
24
24
|
typeof state_permit_source_pollutant.pollutant_id === "string");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StateID } from "../State.js";
|
|
2
|
+
export declare class NCStateFacility {
|
|
3
|
+
readonly state_facility_id: string;
|
|
4
|
+
readonly state_id: StateID;
|
|
5
|
+
readonly facility_id: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly active: boolean;
|
|
8
|
+
readonly type_id: string;
|
|
9
|
+
readonly site_address_county?: string;
|
|
10
|
+
readonly [x: string]: any;
|
|
11
|
+
constructor(state_facility: NCStateFacility);
|
|
12
|
+
static is(state_facility: any): state_facility is NCStateFacility;
|
|
13
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { is_state_id } from "../State.js";
|
|
2
|
+
export class NCStateFacility {
|
|
3
|
+
state_facility_id;
|
|
4
|
+
state_id;
|
|
5
|
+
facility_id;
|
|
6
|
+
name;
|
|
7
|
+
active;
|
|
8
|
+
type_id;
|
|
9
|
+
site_address_county;
|
|
10
|
+
constructor(state_facility) {
|
|
11
|
+
if (!NCStateFacility.is(state_facility)) {
|
|
12
|
+
throw Error("Invalid input.");
|
|
13
|
+
}
|
|
14
|
+
this.state_facility_id = state_facility.state_facility_id;
|
|
15
|
+
this.state_id = state_facility.state_id;
|
|
16
|
+
this.facility_id = state_facility.facility_id;
|
|
17
|
+
this.name = state_facility.name;
|
|
18
|
+
this.active = state_facility.active;
|
|
19
|
+
this.type_id = state_facility.type_id;
|
|
20
|
+
this.site_address_county = state_facility.site_address_county;
|
|
21
|
+
}
|
|
22
|
+
static is(state_facility) {
|
|
23
|
+
return (state_facility !== undefined &&
|
|
24
|
+
is_state_id(state_facility.state_id) && state_facility.state_id === "NC" &&
|
|
25
|
+
typeof state_facility.state_facility_id === "string" &&
|
|
26
|
+
typeof state_facility.facility_id === "string" &&
|
|
27
|
+
typeof state_facility.name === "string" &&
|
|
28
|
+
typeof state_facility.active === "boolean" &&
|
|
29
|
+
typeof state_facility.type_id === "string" &&
|
|
30
|
+
(state_facility.site_address_county === undefined || typeof state_facility.site_address_county === "string"));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StateID } from "../State.js";
|
|
2
|
+
export declare class NCStatePermit {
|
|
3
|
+
readonly state_permit_id: string;
|
|
4
|
+
readonly state_id: StateID;
|
|
5
|
+
readonly permit_id: string;
|
|
6
|
+
readonly state_facility_id: string;
|
|
7
|
+
readonly issue_date?: string;
|
|
8
|
+
readonly expiration_date?: string;
|
|
9
|
+
readonly url?: string;
|
|
10
|
+
readonly status?: string;
|
|
11
|
+
readonly type_id?: string;
|
|
12
|
+
readonly s3_filename?: string;
|
|
13
|
+
readonly s3_text_filename?: string;
|
|
14
|
+
readonly source_ids?: string[];
|
|
15
|
+
readonly [x: string]: any;
|
|
16
|
+
constructor(state_permit: NCStatePermit);
|
|
17
|
+
static is(state_permit: any): state_permit is NCStatePermit;
|
|
18
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { is_state_id } from "../State.js";
|
|
2
|
+
export class NCStatePermit {
|
|
3
|
+
state_permit_id;
|
|
4
|
+
state_id;
|
|
5
|
+
permit_id;
|
|
6
|
+
state_facility_id;
|
|
7
|
+
issue_date;
|
|
8
|
+
expiration_date;
|
|
9
|
+
url;
|
|
10
|
+
status;
|
|
11
|
+
type_id;
|
|
12
|
+
s3_filename;
|
|
13
|
+
s3_text_filename;
|
|
14
|
+
source_ids;
|
|
15
|
+
constructor(state_permit) {
|
|
16
|
+
if (!NCStatePermit.is(state_permit)) {
|
|
17
|
+
throw Error("Invalid input.");
|
|
18
|
+
}
|
|
19
|
+
this.state_permit_id = state_permit.state_permit_id;
|
|
20
|
+
this.state_id = state_permit.state_id;
|
|
21
|
+
this.permit_id = state_permit.permit_id;
|
|
22
|
+
this.state_facility_id = state_permit.state_facility_id;
|
|
23
|
+
this.issue_date = state_permit.issue_date;
|
|
24
|
+
this.expiration_date = state_permit.expiration_date;
|
|
25
|
+
this.url = state_permit.url;
|
|
26
|
+
this.status = state_permit.status;
|
|
27
|
+
this.type_id = state_permit.type_id;
|
|
28
|
+
this.s3_filename = state_permit.s3_filename;
|
|
29
|
+
this.s3_text_filename = state_permit.s3_text_filename;
|
|
30
|
+
this.source_ids = state_permit.source_ids;
|
|
31
|
+
}
|
|
32
|
+
static is(state_permit) {
|
|
33
|
+
return (state_permit !== undefined &&
|
|
34
|
+
typeof state_permit.state_permit_id === "string" &&
|
|
35
|
+
is_state_id(state_permit.state_id) && state_permit.state_id === "NC" &&
|
|
36
|
+
typeof state_permit.permit_id === "string" &&
|
|
37
|
+
typeof state_permit.state_facility_id === "string" &&
|
|
38
|
+
(state_permit.issue_date === undefined || typeof state_permit.issue_date === "string") &&
|
|
39
|
+
(state_permit.expiration_date === undefined || typeof state_permit.expiration_date === "string") &&
|
|
40
|
+
state_permit.url === "string" &&
|
|
41
|
+
(state_permit.status === undefined || typeof state_permit.status === "string") &&
|
|
42
|
+
(state_permit.type_id === undefined || typeof state_permit.type_id === "string") &&
|
|
43
|
+
(state_permit.s3_filename === undefined || typeof state_permit.s3_filename === "string") &&
|
|
44
|
+
(state_permit.s3_text_filename === undefined || typeof state_permit.s3_text_filename === "string") &&
|
|
45
|
+
(state_permit.source_ids === undefined || Array.isArray(state_permit.source_ids) && state_permit.source_ids.map((source_id) => typeof source_id === "string")));
|
|
46
|
+
}
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ export class ARStateFacility {
|
|
|
27
27
|
static is(state_facility : any) : state_facility is ARStateFacility {
|
|
28
28
|
return (
|
|
29
29
|
state_facility !== undefined &&
|
|
30
|
-
is_state_id(state_facility.state_id) &&
|
|
30
|
+
is_state_id(state_facility.state_id) && state_facility.state_id === "AR" &&
|
|
31
31
|
typeof state_facility.state_facility_id === "string" &&
|
|
32
32
|
typeof state_facility.facility_id === "string" &&
|
|
33
33
|
typeof state_facility.name === "string" &&
|
|
@@ -41,7 +41,7 @@ export class ARStatePermit {
|
|
|
41
41
|
return (
|
|
42
42
|
state_permit !== undefined &&
|
|
43
43
|
typeof state_permit.state_permit_id === "string" &&
|
|
44
|
-
is_state_id(state_permit.state_id) &&
|
|
44
|
+
is_state_id(state_permit.state_id) && state_permit.state_id === "AR" &&
|
|
45
45
|
typeof state_permit.permit_id === "string" &&
|
|
46
46
|
typeof state_permit.state_facility_id === "string" &&
|
|
47
47
|
(state_permit.issue_date === undefined || typeof state_permit.issue_date === "string") &&
|
|
@@ -57,6 +57,26 @@ export class ARStatePermit {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export class ARStateAirPermit extends ARStatePermit {
|
|
61
|
+
readonly freq_fish_tissue? : string
|
|
62
|
+
|
|
63
|
+
constructor(state_permit : ARStateAirPermit) {
|
|
64
|
+
if (!ARStateAirPermit.is(state_permit)) {
|
|
65
|
+
throw Error("Invalid input.")
|
|
66
|
+
}
|
|
67
|
+
super(state_permit)
|
|
68
|
+
this.freq_fish_tissue = state_permit.freq_fish_tissue
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static is(state_permit : any) : state_permit is ARStateAirPermit {
|
|
72
|
+
return (
|
|
73
|
+
ARStatePermit.is(state_permit) &&
|
|
74
|
+
state_permit.type_id === "AIR" &&
|
|
75
|
+
(state_permit.freq_fish_tissue === undefined || typeof state_permit.freq_fish_tissue === "string")
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
60
80
|
export class ARStateWaterPermit extends ARStatePermit {
|
|
61
81
|
readonly freq_fish_tissue? : string
|
|
62
82
|
|
|
@@ -71,6 +91,7 @@ export class ARStateWaterPermit extends ARStatePermit {
|
|
|
71
91
|
static is(state_permit : any) : state_permit is ARStateWaterPermit {
|
|
72
92
|
return (
|
|
73
93
|
ARStatePermit.is(state_permit) &&
|
|
94
|
+
state_permit.type_id === "WATER-NPDES" &&
|
|
74
95
|
(state_permit.freq_fish_tissue === undefined || typeof state_permit.freq_fish_tissue === "string")
|
|
75
96
|
)
|
|
76
97
|
}
|
|
@@ -27,7 +27,7 @@ export class ARStatePermitSource {
|
|
|
27
27
|
return (
|
|
28
28
|
state_permit_source !== undefined &&
|
|
29
29
|
typeof state_permit_source.state_permit_source_id === "string" &&
|
|
30
|
-
is_state_id(state_permit_source.state_id) &&
|
|
30
|
+
is_state_id(state_permit_source.state_id) && state_permit_source.state_id === "AR" &&
|
|
31
31
|
typeof state_permit_source.state_permit_id === "string" &&
|
|
32
32
|
typeof state_permit_source.source_id === "string" &&
|
|
33
33
|
typeof state_permit_source.type_id === "string" &&
|
|
@@ -23,7 +23,7 @@ export class ARStatePermitSourcePollutant {
|
|
|
23
23
|
return (
|
|
24
24
|
state_permit_source_pollutant !== undefined &&
|
|
25
25
|
typeof state_permit_source_pollutant.state_permit_source_pollutant_id === "string" &&
|
|
26
|
-
is_state_id(state_permit_source_pollutant.state_id) &&
|
|
26
|
+
is_state_id(state_permit_source_pollutant.state_id) && state_permit_source_pollutant.state_id === "AR" &&
|
|
27
27
|
typeof state_permit_source_pollutant.state_permit_id === "string" &&
|
|
28
28
|
typeof state_permit_source_pollutant.state_permit_source_id === "string" &&
|
|
29
29
|
typeof state_permit_source_pollutant.pollutant_id === "string"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { is_state_id, StateID } from "../State"
|
|
2
|
+
|
|
3
|
+
export class NCStateFacility {
|
|
4
|
+
readonly state_facility_id : string
|
|
5
|
+
readonly state_id : StateID
|
|
6
|
+
readonly facility_id : string
|
|
7
|
+
readonly name : string
|
|
8
|
+
readonly active : boolean
|
|
9
|
+
readonly type_id : string
|
|
10
|
+
readonly site_address_county? : string
|
|
11
|
+
readonly [x : string] : any
|
|
12
|
+
|
|
13
|
+
constructor(state_facility : NCStateFacility) {
|
|
14
|
+
if (!NCStateFacility.is(state_facility)) {
|
|
15
|
+
throw Error("Invalid input.")
|
|
16
|
+
}
|
|
17
|
+
this.state_facility_id = state_facility.state_facility_id
|
|
18
|
+
this.state_id = state_facility.state_id
|
|
19
|
+
this.facility_id = state_facility.facility_id
|
|
20
|
+
this.name = state_facility.name
|
|
21
|
+
this.active = state_facility.active
|
|
22
|
+
this.type_id = state_facility.type_id
|
|
23
|
+
this.site_address_county = state_facility.site_address_county
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static is(state_facility : any) : state_facility is NCStateFacility {
|
|
27
|
+
return (
|
|
28
|
+
state_facility !== undefined &&
|
|
29
|
+
is_state_id(state_facility.state_id) && state_facility.state_id === "NC" &&
|
|
30
|
+
typeof state_facility.state_facility_id === "string" &&
|
|
31
|
+
typeof state_facility.facility_id === "string" &&
|
|
32
|
+
typeof state_facility.name === "string" &&
|
|
33
|
+
typeof state_facility.active === "boolean" &&
|
|
34
|
+
typeof state_facility.type_id === "string" &&
|
|
35
|
+
(state_facility.site_address_county === undefined || typeof state_facility.site_address_county === "string")
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { is_state_id, StateID } from "../State"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export class NCStatePermit {
|
|
5
|
+
readonly state_permit_id : string
|
|
6
|
+
readonly state_id : StateID
|
|
7
|
+
readonly permit_id : string
|
|
8
|
+
readonly state_facility_id : string
|
|
9
|
+
readonly issue_date? : string
|
|
10
|
+
readonly expiration_date? : string
|
|
11
|
+
readonly url? : string
|
|
12
|
+
readonly status? : string
|
|
13
|
+
readonly type_id? : string
|
|
14
|
+
readonly s3_filename? : string
|
|
15
|
+
readonly s3_text_filename? : string
|
|
16
|
+
readonly source_ids? : string[]
|
|
17
|
+
readonly [x : string] : any
|
|
18
|
+
|
|
19
|
+
constructor(state_permit : NCStatePermit) {
|
|
20
|
+
if (!NCStatePermit.is(state_permit)) {
|
|
21
|
+
throw Error("Invalid input.")
|
|
22
|
+
}
|
|
23
|
+
this.state_permit_id = state_permit.state_permit_id
|
|
24
|
+
this.state_id = state_permit.state_id
|
|
25
|
+
this.permit_id = state_permit.permit_id
|
|
26
|
+
this.state_facility_id = state_permit.state_facility_id
|
|
27
|
+
this.issue_date = state_permit.issue_date
|
|
28
|
+
this.expiration_date = state_permit.expiration_date
|
|
29
|
+
this.url = state_permit.url
|
|
30
|
+
this.status = state_permit.status
|
|
31
|
+
this.type_id = state_permit.type_id
|
|
32
|
+
this.s3_filename = state_permit.s3_filename
|
|
33
|
+
this.s3_text_filename = state_permit.s3_text_filename
|
|
34
|
+
this.source_ids = state_permit.source_ids
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static is(state_permit : any) : state_permit is NCStatePermit {
|
|
38
|
+
return (
|
|
39
|
+
state_permit !== undefined &&
|
|
40
|
+
typeof state_permit.state_permit_id === "string" &&
|
|
41
|
+
is_state_id(state_permit.state_id) && state_permit.state_id === "NC" &&
|
|
42
|
+
typeof state_permit.permit_id === "string" &&
|
|
43
|
+
typeof state_permit.state_facility_id === "string" &&
|
|
44
|
+
(state_permit.issue_date === undefined || typeof state_permit.issue_date === "string") &&
|
|
45
|
+
(state_permit.expiration_date === undefined || typeof state_permit.expiration_date === "string") &&
|
|
46
|
+
state_permit.url === "string" &&
|
|
47
|
+
(state_permit.status === undefined || typeof state_permit.status === "string") &&
|
|
48
|
+
(state_permit.type_id === undefined || typeof state_permit.type_id === "string") &&
|
|
49
|
+
(state_permit.s3_filename === undefined || typeof state_permit.s3_filename === "string") &&
|
|
50
|
+
(state_permit.s3_text_filename === undefined || typeof state_permit.s3_text_filename === "string") &&
|
|
51
|
+
(state_permit.source_ids === undefined || Array.isArray(state_permit.source_ids) && state_permit.source_ids.map((source_id : any) => typeof source_id === "string"))
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
}
|