triage-types 1.0.41 → 1.0.42
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 +13 -8
- package/dist/src/index.js +13 -8
- package/dist/src/types/federal_dockets/FederalDocket.d.ts +9 -0
- package/dist/src/types/federal_dockets/FederalDocket.js +25 -0
- package/dist/src/types/federal_dockets/FederalDocketAgency.d.ts +8 -0
- package/dist/src/types/federal_dockets/FederalDocketAgency.js +22 -0
- package/dist/src/types/federal_dockets/FederalDocketComment.d.ts +30 -0
- package/dist/src/types/federal_dockets/FederalDocketComment.js +86 -0
- package/dist/src/types/federal_dockets/FederalDocketCommentAttachment.d.ts +9 -0
- package/dist/src/types/federal_dockets/FederalDocketCommentAttachment.js +25 -0
- package/dist/src/types/federal_dockets/FederalDocketDocument.d.ts +27 -0
- package/dist/src/types/federal_dockets/FederalDocketDocument.js +74 -0
- package/dist/src/types/state_permits/AR/ARStateFacility.d.ts +19 -0
- package/dist/src/types/state_permits/AR/ARStateFacility.js +48 -0
- package/dist/src/types/state_permits/AR/ARStatePermit.d.ts +37 -0
- package/dist/src/types/state_permits/AR/ARStatePermit.js +101 -0
- package/dist/src/types/state_permits/AR/ARStatePermitSource.d.ts +50 -0
- package/dist/src/types/state_permits/AR/ARStatePermitSource.js +128 -0
- package/dist/src/types/state_permits/AR/ARStatePermitSourcePollutant.d.ts +34 -0
- package/dist/src/types/state_permits/AR/ARStatePermitSourcePollutant.js +100 -0
- package/dist/src/types/state_permits/KY/KYStateFacility.d.ts +14 -0
- package/dist/src/types/state_permits/KY/KYStateFacility.js +35 -0
- package/dist/src/types/state_permits/KY/KYStatePermit.d.ts +16 -0
- package/dist/src/types/state_permits/KY/KYStatePermit.js +50 -0
- package/dist/src/types/state_permits/NC/NCStateFacility.d.ts +14 -0
- package/dist/src/types/state_permits/NC/NCStateFacility.js +35 -0
- package/dist/src/types/state_permits/NC/NCStatePermit.d.ts +18 -0
- package/dist/src/types/state_permits/NC/NCStatePermit.js +47 -0
- package/package.json +1 -1
- package/src/index.ts +17 -8
- package/src/types/federal_dockets/FederalDocket.ts +29 -0
- package/src/types/federal_dockets/FederalDocketAgency.ts +26 -0
- package/src/types/federal_dockets/FederalDocketComment.ts +96 -0
- package/src/types/federal_dockets/FederalDocketCommentAttachment.ts +29 -0
- package/src/types/federal_dockets/FederalDocketDocument.ts +82 -0
- package/src/types/{AR → state_permits/AR}/ARStateFacility.ts +1 -1
- package/src/types/{AR → state_permits/AR}/ARStatePermit.ts +1 -1
- package/src/types/{AR → state_permits/AR}/ARStatePermitSource.ts +1 -1
- package/src/types/{AR → state_permits/AR}/ARStatePermitSourcePollutant.ts +1 -1
- package/src/types/{KY → state_permits/KY}/KYStateFacility.ts +1 -1
- package/src/types/{KY → state_permits/KY}/KYStatePermit.ts +1 -1
- package/src/types/{NC → state_permits/NC}/NCStateFacility.ts +1 -1
- package/src/types/{NC → state_permits/NC}/NCStatePermit.ts +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { is_state_id } from "../../State.js";
|
|
2
|
+
import { ARStatePermitAux } from "./ARStatePermit.js";
|
|
3
|
+
import { ARStatePermitSourcePollutant } from "./ARStatePermitSourcePollutant.js";
|
|
4
|
+
export class ARStatePermitSource {
|
|
5
|
+
state_permit_source_id;
|
|
6
|
+
state_id;
|
|
7
|
+
state_permit_id;
|
|
8
|
+
source_id;
|
|
9
|
+
type_id;
|
|
10
|
+
pollutant_ids;
|
|
11
|
+
constructor(state_permit_source) {
|
|
12
|
+
if (!ARStatePermitSource.is(state_permit_source)) {
|
|
13
|
+
throw Error("Invalid input.");
|
|
14
|
+
}
|
|
15
|
+
this.state_permit_source_id = state_permit_source.state_permit_source_id;
|
|
16
|
+
this.state_id = state_permit_source.state_id;
|
|
17
|
+
this.state_permit_id = state_permit_source.state_permit_id;
|
|
18
|
+
this.source_id = state_permit_source.source_id;
|
|
19
|
+
this.type_id = state_permit_source.type_id;
|
|
20
|
+
this.pollutant_ids = state_permit_source.pollutant_ids;
|
|
21
|
+
}
|
|
22
|
+
static is(state_permit_source) {
|
|
23
|
+
return (state_permit_source !== undefined &&
|
|
24
|
+
typeof state_permit_source.state_permit_source_id === "string" &&
|
|
25
|
+
is_state_id(state_permit_source.state_id) && state_permit_source.state_id === "AR" &&
|
|
26
|
+
typeof state_permit_source.state_permit_id === "string" &&
|
|
27
|
+
typeof state_permit_source.source_id === "string" &&
|
|
28
|
+
typeof state_permit_source.type_id === "string" &&
|
|
29
|
+
(state_permit_source.pollutant_ids === undefined || Array.isArray(state_permit_source.pollutant_ids) && state_permit_source.pollutant_ids.every((pollutant_id) => typeof pollutant_id === "string")));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export class ARStateWaterPermitSource extends ARStatePermitSource {
|
|
33
|
+
state_permit_source_id;
|
|
34
|
+
state_id;
|
|
35
|
+
state_permit_id;
|
|
36
|
+
source_id;
|
|
37
|
+
type_id;
|
|
38
|
+
description;
|
|
39
|
+
stage;
|
|
40
|
+
freq_wet_pp;
|
|
41
|
+
freq_wet_cd;
|
|
42
|
+
freq_fish_tissue;
|
|
43
|
+
constructor(state_permit_source) {
|
|
44
|
+
if (!ARStateWaterPermitSource.is(state_permit_source)) {
|
|
45
|
+
throw Error("Invalid input.");
|
|
46
|
+
}
|
|
47
|
+
super(state_permit_source);
|
|
48
|
+
this.state_permit_source_id = state_permit_source.state_permit_source_id;
|
|
49
|
+
this.state_id = state_permit_source.state_id;
|
|
50
|
+
this.state_permit_id = state_permit_source.state_permit_id;
|
|
51
|
+
this.source_id = state_permit_source.source_id;
|
|
52
|
+
this.type_id = state_permit_source.type_id;
|
|
53
|
+
this.description = state_permit_source.description;
|
|
54
|
+
this.stage = state_permit_source.stage;
|
|
55
|
+
this.freq_wet_pp = state_permit_source.freq_wet_pp;
|
|
56
|
+
this.freq_wet_cd = state_permit_source.freq_wet_cd;
|
|
57
|
+
this.freq_fish_tissue = state_permit_source.freq_fish_tissue;
|
|
58
|
+
}
|
|
59
|
+
static is(state_permit_source) {
|
|
60
|
+
return (ARStatePermitSource.is(state_permit_source) &&
|
|
61
|
+
state_permit_source.type_id === "WATER-NPDES" &&
|
|
62
|
+
(state_permit_source.description === undefined || typeof state_permit_source.description === "string") &&
|
|
63
|
+
(state_permit_source.stage === undefined || typeof state_permit_source.stage === "string") &&
|
|
64
|
+
(state_permit_source.freq_wet_pp === undefined || typeof state_permit_source.freq_wet_pp === "string") &&
|
|
65
|
+
(state_permit_source.freq_wet_cd === undefined || typeof state_permit_source.freq_wet_cd === "string") &&
|
|
66
|
+
(state_permit_source.freq_fish_tissue === undefined || typeof state_permit_source.freq_fish_tissue === "string"));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export class ARStateAirPermitSource extends ARStatePermitSource {
|
|
70
|
+
page_nums;
|
|
71
|
+
description;
|
|
72
|
+
is_rice;
|
|
73
|
+
power_quantity;
|
|
74
|
+
power_unit;
|
|
75
|
+
power_kw;
|
|
76
|
+
fuel_type_text;
|
|
77
|
+
fuel_type_id;
|
|
78
|
+
is_emergency;
|
|
79
|
+
local_state_permit_source_ids;
|
|
80
|
+
constructor(state_permit_source) {
|
|
81
|
+
if (!ARStateAirPermitSource.is(state_permit_source)) {
|
|
82
|
+
throw Error("Invalid input.");
|
|
83
|
+
}
|
|
84
|
+
super(state_permit_source);
|
|
85
|
+
this.page_nums = state_permit_source.page_nums;
|
|
86
|
+
this.description = state_permit_source.description;
|
|
87
|
+
this.is_rice = state_permit_source.is_rice;
|
|
88
|
+
this.power_quantity = state_permit_source.power_quantity;
|
|
89
|
+
this.power_unit = state_permit_source.power_unit;
|
|
90
|
+
this.power_kw = state_permit_source.power_kw;
|
|
91
|
+
this.fuel_type_text = state_permit_source.fuel_type_text;
|
|
92
|
+
this.fuel_type_id = state_permit_source.fuel_type_id;
|
|
93
|
+
this.is_emergency = state_permit_source.is_emergency;
|
|
94
|
+
this.local_state_permit_source_ids = state_permit_source.local_state_permit_source_ids;
|
|
95
|
+
}
|
|
96
|
+
static is(state_permit_source) {
|
|
97
|
+
return (ARStatePermitSource.is(state_permit_source) &&
|
|
98
|
+
state_permit_source.type_id === "AIR" &&
|
|
99
|
+
Array.isArray(state_permit_source.page_nums) && state_permit_source.page_nums.every((page_num) => typeof page_num === "number") &&
|
|
100
|
+
(state_permit_source.description === undefined || typeof state_permit_source.description === "string") &&
|
|
101
|
+
(state_permit_source.is_rice === undefined || typeof state_permit_source.is_rice === "string") &&
|
|
102
|
+
(state_permit_source.power_quantity === undefined || typeof state_permit_source.power_quantity === "number") &&
|
|
103
|
+
(state_permit_source.power_quantity === undefined || typeof state_permit_source.power_quantity === "number") &&
|
|
104
|
+
(state_permit_source.power_kw === undefined || typeof state_permit_source.power_kw === "number") &&
|
|
105
|
+
(state_permit_source.fuel_type_text === undefined || typeof state_permit_source.fuel_type_text === "string") &&
|
|
106
|
+
(state_permit_source.fuel_type_id === undefined || typeof state_permit_source.fuel_type_id === "string") &&
|
|
107
|
+
(state_permit_source.is_emergency === undefined || typeof state_permit_source.is_emergency === "string") &&
|
|
108
|
+
(state_permit_source.local_state_permit_source_ids === undefined || Array.isArray(state_permit_source.local_state_permit_source_ids) && state_permit_source.local_state_permit_source_ids.every((local_state_permit_source_id) => typeof local_state_permit_source_id === "string")));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
export class ARStatePermitSourceAux extends ARStatePermitSource {
|
|
112
|
+
state_permit;
|
|
113
|
+
state_permit_source_pollutants;
|
|
114
|
+
constructor(state_permit_source) {
|
|
115
|
+
if (!ARStatePermitSourceAux.is(state_permit_source)) {
|
|
116
|
+
throw Error("Invalid input.");
|
|
117
|
+
}
|
|
118
|
+
super(state_permit_source);
|
|
119
|
+
this.state_permit = state_permit_source.state_permit;
|
|
120
|
+
this.state_permit_source_pollutants = state_permit_source.state_permit_source_pollutants;
|
|
121
|
+
}
|
|
122
|
+
static is(state_permit_source) {
|
|
123
|
+
return (ARStatePermitSource.is(state_permit_source) &&
|
|
124
|
+
ARStatePermitAux.is(state_permit_source.state_permit) &&
|
|
125
|
+
Array.isArray(state_permit_source.state_permit_source_pollutants) &&
|
|
126
|
+
state_permit_source.state_permit_source_pollutants.every(ARStatePermitSourcePollutant.is));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { StateID } from "../../State.js";
|
|
2
|
+
export declare class ARStatePermitSourcePollutant {
|
|
3
|
+
readonly state_permit_source_pollutant_id: string;
|
|
4
|
+
readonly state_id: StateID;
|
|
5
|
+
readonly state_permit_id: string;
|
|
6
|
+
readonly state_permit_source_id: string;
|
|
7
|
+
readonly pollutant_id: string;
|
|
8
|
+
readonly [x: string]: any;
|
|
9
|
+
constructor(state_permit_source_pollutant: ARStatePermitSourcePollutant);
|
|
10
|
+
static is(state_permit_source_pollutant: any): state_permit_source_pollutant is ARStatePermitSourcePollutant;
|
|
11
|
+
}
|
|
12
|
+
export declare class ARStateAirPermitSourcePollutant extends ARStatePermitSourcePollutant {
|
|
13
|
+
readonly TPY_text: string;
|
|
14
|
+
readonly TPY?: number;
|
|
15
|
+
readonly TPY_global_rank?: number;
|
|
16
|
+
readonly TPY_global_total?: number;
|
|
17
|
+
readonly TPY_local_rank?: number;
|
|
18
|
+
readonly TPY_local_total?: number;
|
|
19
|
+
readonly LBPH_text: string;
|
|
20
|
+
readonly LBPH?: number;
|
|
21
|
+
readonly LBPH_global_rank?: number;
|
|
22
|
+
readonly LBPH_global_total?: number;
|
|
23
|
+
readonly LBPH_local_rank?: number;
|
|
24
|
+
readonly LBPH_local_total?: number;
|
|
25
|
+
readonly [x: string]: any;
|
|
26
|
+
constructor(state_permit_source_pollutant: ARStateAirPermitSourcePollutant);
|
|
27
|
+
static is(state_permit_source_pollutant: any): state_permit_source_pollutant is ARStateAirPermitSourcePollutant;
|
|
28
|
+
}
|
|
29
|
+
export declare class ARStateWaterPermitSourcePollutant extends ARStatePermitSourcePollutant {
|
|
30
|
+
readonly freq?: string;
|
|
31
|
+
readonly [x: string]: any;
|
|
32
|
+
constructor(state_permit_source_pollutant: ARStateWaterPermitSourcePollutant);
|
|
33
|
+
static is(state_permit_source_pollutant: any): state_permit_source_pollutant is ARStateWaterPermitSourcePollutant;
|
|
34
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { is_state_id } from "../../State.js";
|
|
2
|
+
export class ARStatePermitSourcePollutant {
|
|
3
|
+
state_permit_source_pollutant_id;
|
|
4
|
+
state_id;
|
|
5
|
+
state_permit_id;
|
|
6
|
+
state_permit_source_id;
|
|
7
|
+
pollutant_id;
|
|
8
|
+
constructor(state_permit_source_pollutant) {
|
|
9
|
+
if (!ARStatePermitSourcePollutant.is(state_permit_source_pollutant)) {
|
|
10
|
+
throw Error("Invalid input.");
|
|
11
|
+
}
|
|
12
|
+
this.state_permit_source_pollutant_id = state_permit_source_pollutant.state_permit_source_pollutant_id;
|
|
13
|
+
this.state_id = state_permit_source_pollutant.state_id;
|
|
14
|
+
this.state_permit_id = state_permit_source_pollutant.state_permit_id;
|
|
15
|
+
this.state_permit_source_id = state_permit_source_pollutant.state_permit_source_id;
|
|
16
|
+
this.pollutant_id = state_permit_source_pollutant.pollutant_id;
|
|
17
|
+
}
|
|
18
|
+
static is(state_permit_source_pollutant) {
|
|
19
|
+
return (state_permit_source_pollutant !== undefined &&
|
|
20
|
+
typeof state_permit_source_pollutant.state_permit_source_pollutant_id === "string" &&
|
|
21
|
+
is_state_id(state_permit_source_pollutant.state_id) && state_permit_source_pollutant.state_id === "AR" &&
|
|
22
|
+
typeof state_permit_source_pollutant.state_permit_id === "string" &&
|
|
23
|
+
typeof state_permit_source_pollutant.state_permit_source_id === "string" &&
|
|
24
|
+
typeof state_permit_source_pollutant.pollutant_id === "string");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export class ARStateAirPermitSourcePollutant extends ARStatePermitSourcePollutant {
|
|
28
|
+
TPY_text;
|
|
29
|
+
TPY;
|
|
30
|
+
TPY_global_rank;
|
|
31
|
+
TPY_global_total;
|
|
32
|
+
TPY_local_rank;
|
|
33
|
+
TPY_local_total;
|
|
34
|
+
LBPH_text;
|
|
35
|
+
LBPH;
|
|
36
|
+
LBPH_global_rank;
|
|
37
|
+
LBPH_global_total;
|
|
38
|
+
LBPH_local_rank;
|
|
39
|
+
LBPH_local_total;
|
|
40
|
+
constructor(state_permit_source_pollutant) {
|
|
41
|
+
if (!ARStateAirPermitSourcePollutant.is(state_permit_source_pollutant)) {
|
|
42
|
+
throw Error("Invalid input.");
|
|
43
|
+
}
|
|
44
|
+
super(state_permit_source_pollutant);
|
|
45
|
+
this.TPY_text = state_permit_source_pollutant.TPY_text;
|
|
46
|
+
this.TPY = state_permit_source_pollutant.TPY;
|
|
47
|
+
this.TPY_global_rank = state_permit_source_pollutant.TPY_global_rank;
|
|
48
|
+
this.TPY_global_total = state_permit_source_pollutant.TPY_global_total;
|
|
49
|
+
this.TPY_local_rank = state_permit_source_pollutant.TPY_local_rank;
|
|
50
|
+
this.TPY_local_total = state_permit_source_pollutant.TPY_local_total;
|
|
51
|
+
this.LBPH_text = state_permit_source_pollutant.LBPH_text;
|
|
52
|
+
this.LBPH = state_permit_source_pollutant.LBPH;
|
|
53
|
+
this.LBPH_global_rank = state_permit_source_pollutant.LBPH_global_rank;
|
|
54
|
+
this.LBPH_global_total = state_permit_source_pollutant.LBPH_global_total;
|
|
55
|
+
this.LBPH_local_rank = state_permit_source_pollutant.LBPH_local_rank;
|
|
56
|
+
this.LBPH_local_total = state_permit_source_pollutant.LBPH_local_total;
|
|
57
|
+
}
|
|
58
|
+
static is(state_permit_source_pollutant) {
|
|
59
|
+
return (ARStatePermitSourcePollutant.is(state_permit_source_pollutant) &&
|
|
60
|
+
typeof state_permit_source_pollutant.TPY_text === "string" &&
|
|
61
|
+
(state_permit_source_pollutant.TPY === undefined || typeof state_permit_source_pollutant.TPY === "number" && !isNaN(state_permit_source_pollutant.TPY)) &&
|
|
62
|
+
(state_permit_source_pollutant.TPY_global_rank === undefined || typeof state_permit_source_pollutant.TPY_global_rank === "number" && !isNaN(state_permit_source_pollutant.TPY_global_rank)) &&
|
|
63
|
+
(state_permit_source_pollutant.TPY_global_total === undefined || typeof state_permit_source_pollutant.TPY_global_total === "number" && !isNaN(state_permit_source_pollutant.TPY_global_total)) &&
|
|
64
|
+
(state_permit_source_pollutant.TPY_local_rank === undefined || typeof state_permit_source_pollutant.TPY_local_rank === "number" && !isNaN(state_permit_source_pollutant.TPY_local_rank)) &&
|
|
65
|
+
(state_permit_source_pollutant.TPY_local_total === undefined || typeof state_permit_source_pollutant.TPY_local_total === "number" && !isNaN(state_permit_source_pollutant.TPY_local_total)) &&
|
|
66
|
+
typeof state_permit_source_pollutant.LBPH_text === "string" &&
|
|
67
|
+
(state_permit_source_pollutant.LBPH === undefined || typeof state_permit_source_pollutant.LBPH === "number" && !isNaN(state_permit_source_pollutant.LBPH)) &&
|
|
68
|
+
(state_permit_source_pollutant.LBPH_global_rank === undefined || typeof state_permit_source_pollutant.LBPH_global_rank === "number" && !isNaN(state_permit_source_pollutant.LBPH_global_rank)) &&
|
|
69
|
+
(state_permit_source_pollutant.LBPH_global_total === undefined || typeof state_permit_source_pollutant.LBPH_global_total === "number" && !isNaN(state_permit_source_pollutant.LBPH_global_total)) &&
|
|
70
|
+
(state_permit_source_pollutant.LBPH_local_rank === undefined || typeof state_permit_source_pollutant.LBPH_local_rank === "number" && !isNaN(state_permit_source_pollutant.LBPH_local_rank)) &&
|
|
71
|
+
(state_permit_source_pollutant.LBPH_local_total === undefined || typeof state_permit_source_pollutant.LBPH_local_total === "number" && !isNaN(state_permit_source_pollutant.LBPH_local_total)));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class ARStateWaterPermitSourcePollutant extends ARStatePermitSourcePollutant {
|
|
75
|
+
freq;
|
|
76
|
+
constructor(state_permit_source_pollutant) {
|
|
77
|
+
if (!ARStateWaterPermitSourcePollutant.is(state_permit_source_pollutant)) {
|
|
78
|
+
throw Error("Invalid input.");
|
|
79
|
+
}
|
|
80
|
+
super(state_permit_source_pollutant);
|
|
81
|
+
this.freq = state_permit_source_pollutant.freq;
|
|
82
|
+
}
|
|
83
|
+
static is(state_permit_source_pollutant) {
|
|
84
|
+
return (ARStatePermitSourcePollutant.is(state_permit_source_pollutant) &&
|
|
85
|
+
(state_permit_source_pollutant.freq === undefined || typeof state_permit_source_pollutant.freq === "string"));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// export class ARStatePermitSourcePollutantAux extends ARStatePermitSourcePollutant {
|
|
89
|
+
// constructor(state_permit_source_pollutant : ARStatePermitSourcePollutantAux) {
|
|
90
|
+
// if (!ARStatePermitSourcePollutantAux.is(state_permit_source_pollutant)) {
|
|
91
|
+
// throw Error("Invalid input.")
|
|
92
|
+
// }
|
|
93
|
+
// super(state_permit_source_pollutant)
|
|
94
|
+
// }
|
|
95
|
+
// static is(state_permit_source_pollutant : any) : state_permit_source_pollutant is ARStatePermitSourcePollutantAux {
|
|
96
|
+
// return (
|
|
97
|
+
// ARStatePermitSourcePollutant.is(state_permit_source_pollutant)
|
|
98
|
+
// )
|
|
99
|
+
// }
|
|
100
|
+
// }
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StateID } from "../../State.js";
|
|
2
|
+
export declare class KYStatePermit {
|
|
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 type_id?: string;
|
|
9
|
+
readonly subtype_id?: string;
|
|
10
|
+
readonly s3_filenames?: string[];
|
|
11
|
+
readonly s3_text_filename?: string;
|
|
12
|
+
readonly source_ids?: string[];
|
|
13
|
+
readonly [x: string]: any;
|
|
14
|
+
constructor(state_permit: KYStatePermit);
|
|
15
|
+
static is(state_permit: any): state_permit is KYStatePermit;
|
|
16
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { is_state_id } from "../../State.js";
|
|
2
|
+
export class KYStatePermit {
|
|
3
|
+
state_permit_id;
|
|
4
|
+
state_id;
|
|
5
|
+
permit_id;
|
|
6
|
+
state_facility_id;
|
|
7
|
+
issue_date;
|
|
8
|
+
// readonly expiration_date? : string
|
|
9
|
+
// readonly void_date? : string
|
|
10
|
+
// readonly status? : string
|
|
11
|
+
type_id;
|
|
12
|
+
subtype_id;
|
|
13
|
+
s3_filenames;
|
|
14
|
+
s3_text_filename;
|
|
15
|
+
source_ids;
|
|
16
|
+
constructor(state_permit) {
|
|
17
|
+
if (!KYStatePermit.is(state_permit)) {
|
|
18
|
+
throw Error("Invalid input.");
|
|
19
|
+
}
|
|
20
|
+
this.state_permit_id = state_permit.state_permit_id;
|
|
21
|
+
this.state_id = state_permit.state_id;
|
|
22
|
+
this.permit_id = state_permit.permit_id;
|
|
23
|
+
this.state_facility_id = state_permit.state_facility_id;
|
|
24
|
+
this.issue_date = state_permit.issue_date;
|
|
25
|
+
// this.expiration_date = state_permit.expiration_date
|
|
26
|
+
// this.void_date = state_permit.void_date
|
|
27
|
+
// this.status = state_permit.status
|
|
28
|
+
this.type_id = state_permit.type_id;
|
|
29
|
+
this.subtype_id = state_permit.subtype_id;
|
|
30
|
+
this.s3_filenames = state_permit.s3_filenames;
|
|
31
|
+
this.s3_text_filename = state_permit.s3_text_filename;
|
|
32
|
+
this.source_ids = state_permit.source_ids;
|
|
33
|
+
}
|
|
34
|
+
static is(state_permit) {
|
|
35
|
+
return (state_permit !== undefined &&
|
|
36
|
+
typeof state_permit.state_permit_id === "string" &&
|
|
37
|
+
is_state_id(state_permit.state_id) && state_permit.state_id === "KY" &&
|
|
38
|
+
typeof state_permit.permit_id === "string" &&
|
|
39
|
+
typeof state_permit.state_facility_id === "string" &&
|
|
40
|
+
(state_permit.issue_date === undefined || typeof state_permit.issue_date === "string") &&
|
|
41
|
+
// (state_permit.expiration_date === undefined || typeof state_permit.expiration_date === "string") &&
|
|
42
|
+
// (state_permit.void_date === undefined || typeof state_permit.void_date === "string") &&
|
|
43
|
+
// (state_permit.status === undefined || typeof state_permit.status === "string") &&
|
|
44
|
+
(state_permit.type_id === undefined || typeof state_permit.type_id === "string") &&
|
|
45
|
+
(state_permit.subtype_id === undefined || typeof state_permit.subtype_id === "string") &&
|
|
46
|
+
(state_permit.s3_filenames === undefined || Array.isArray(state_permit.s3_filenames) && state_permit.s3_filenames.map((s3_filename) => typeof s3_filename === "string")) &&
|
|
47
|
+
(state_permit.s3_text_filename === undefined || typeof state_permit.s3_text_filename === "string") &&
|
|
48
|
+
(state_permit.source_ids === undefined || Array.isArray(state_permit.source_ids) && state_permit.source_ids.map((source_id) => typeof source_id === "string")));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 owner: string;
|
|
8
|
+
readonly is_active: boolean;
|
|
9
|
+
readonly type_id: string;
|
|
10
|
+
readonly site_address_county?: string;
|
|
11
|
+
readonly [x: string]: any;
|
|
12
|
+
constructor(state_facility: NCStateFacility);
|
|
13
|
+
static is(state_facility: any): state_facility is NCStateFacility;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
owner;
|
|
8
|
+
is_active;
|
|
9
|
+
type_id;
|
|
10
|
+
site_address_county;
|
|
11
|
+
constructor(state_facility) {
|
|
12
|
+
if (!NCStateFacility.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.owner = state_facility.owner;
|
|
20
|
+
this.is_active = state_facility.is_active;
|
|
21
|
+
this.type_id = state_facility.type_id;
|
|
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 === "NC" &&
|
|
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.owner === "string" &&
|
|
31
|
+
typeof state_facility.is_active === "boolean" &&
|
|
32
|
+
typeof state_facility.type_id === "string" &&
|
|
33
|
+
(state_facility.site_address_county === undefined || typeof state_facility.site_address_county === "string"));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -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 status?: string;
|
|
10
|
+
readonly type_id?: string;
|
|
11
|
+
readonly subtype_id?: string;
|
|
12
|
+
readonly s3_filenames?: 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
|
+
status;
|
|
10
|
+
type_id;
|
|
11
|
+
subtype_id;
|
|
12
|
+
s3_filenames;
|
|
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.status = state_permit.status;
|
|
26
|
+
this.type_id = state_permit.type_id;
|
|
27
|
+
this.subtype_id = state_permit.subtype_id;
|
|
28
|
+
this.s3_filenames = state_permit.s3_filenames;
|
|
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.status === undefined || typeof state_permit.status === "string") &&
|
|
41
|
+
(state_permit.type_id === undefined || typeof state_permit.type_id === "string") &&
|
|
42
|
+
(state_permit.subtype_id === undefined || typeof state_permit.subtype_id === "string") &&
|
|
43
|
+
(state_permit.s3_filenames === undefined || Array.isArray(state_permit.s3_filenames) && state_permit.s3_filenames.map((s3_filename) => typeof 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
package/src/index.ts
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
export * from "./types/APIError"
|
|
2
2
|
export * from "./types/State"
|
|
3
|
-
|
|
4
|
-
export * from "./types/
|
|
5
|
-
export * from "./types/
|
|
6
|
-
export * from "./types/
|
|
7
|
-
export * from "./types/
|
|
8
|
-
export * from "./types/
|
|
9
|
-
|
|
10
|
-
export * from "./types/
|
|
3
|
+
|
|
4
|
+
export * from "./types/federal_dockets/FederalDocketAgency"
|
|
5
|
+
export * from "./types/federal_dockets/FederalDocket"
|
|
6
|
+
export * from "./types/federal_dockets/FederalDocketDocument"
|
|
7
|
+
export * from "./types/federal_dockets/FederalDocketComment"
|
|
8
|
+
export * from "./types/federal_dockets/FederalDocketCommentAttachment"
|
|
9
|
+
|
|
10
|
+
export * from "./types/state_permits/AR/ARStateFacility"
|
|
11
|
+
export * from "./types/state_permits/AR/ARStatePermit"
|
|
12
|
+
export * from "./types/state_permits/AR/ARStatePermitSource"
|
|
13
|
+
export * from "./types/state_permits/AR/ARStatePermitSourcePollutant"
|
|
14
|
+
|
|
15
|
+
export * from "./types/state_permits/KY/KYStateFacility"
|
|
16
|
+
export * from "./types/state_permits/KY/KYStatePermit"
|
|
17
|
+
|
|
18
|
+
export * from "./types/state_permits/NC/NCStateFacility"
|
|
19
|
+
export * from "./types/state_permits/NC/NCStatePermit"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class FederalDocket {
|
|
2
|
+
readonly federal_docket_id : string
|
|
3
|
+
readonly federal_docket_agency_id : string
|
|
4
|
+
readonly is_rule : boolean
|
|
5
|
+
readonly title : string
|
|
6
|
+
readonly modify_time? : string
|
|
7
|
+
|
|
8
|
+
constructor(federal_docket : any) {
|
|
9
|
+
if (!FederalDocket.is(federal_docket)) {
|
|
10
|
+
throw Error("Invalid input.")
|
|
11
|
+
}
|
|
12
|
+
this.federal_docket_id = federal_docket.federal_docket_id
|
|
13
|
+
this.federal_docket_agency_id = federal_docket.federal_docket_agency_id
|
|
14
|
+
this.is_rule = federal_docket.is_rule
|
|
15
|
+
this.title = federal_docket.title
|
|
16
|
+
this.modify_time = federal_docket.modify_time
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static is(federal_docket : any) : federal_docket is FederalDocket {
|
|
20
|
+
return (
|
|
21
|
+
federal_docket !== undefined &&
|
|
22
|
+
typeof federal_docket.federal_docket_id === "string" &&
|
|
23
|
+
typeof federal_docket.federal_docket_agency_id === "string" &&
|
|
24
|
+
typeof federal_docket.is_rule === "boolean" &&
|
|
25
|
+
typeof federal_docket.title === "string" &&
|
|
26
|
+
(federal_docket.modify_time === undefined || typeof federal_docket.modify_time === "string")
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class FederalDocketAgency {
|
|
2
|
+
readonly federal_docket_agency_id : string
|
|
3
|
+
readonly federal_register_agency_id : number
|
|
4
|
+
readonly name : string
|
|
5
|
+
readonly supreme_federal_register_agency_id : number
|
|
6
|
+
|
|
7
|
+
constructor(federal_docket_agency : any) {
|
|
8
|
+
if (!FederalDocketAgency.is(federal_docket_agency)) {
|
|
9
|
+
throw Error("Invalid input.")
|
|
10
|
+
}
|
|
11
|
+
this.federal_docket_agency_id = federal_docket_agency.federal_docket_agency_id
|
|
12
|
+
this.federal_register_agency_id = federal_docket_agency.federal_register_agency_id
|
|
13
|
+
this.name = federal_docket_agency.name
|
|
14
|
+
this.supreme_federal_register_agency_id = federal_docket_agency.supreme_federal_register_agency_id
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static is(federal_docket_agency : any) : federal_docket_agency is FederalDocketAgency {
|
|
18
|
+
return (
|
|
19
|
+
federal_docket_agency !== undefined &&
|
|
20
|
+
typeof federal_docket_agency.federal_docket_agency_id === "string" &&
|
|
21
|
+
typeof federal_docket_agency.federal_register_agency_id === "number" &&
|
|
22
|
+
typeof federal_docket_agency.name === "string" &&
|
|
23
|
+
typeof federal_docket_agency.supreme_federal_register_agency_id === "number"
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
}
|