triage-types 1.0.40 → 1.0.41
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
CHANGED
|
@@ -5,5 +5,6 @@ export * from "./types/AR/ARStatePermit.js";
|
|
|
5
5
|
export * from "./types/AR/ARStatePermitSource.js";
|
|
6
6
|
export * from "./types/AR/ARStatePermitSourcePollutant.js";
|
|
7
7
|
export * from "./types/KY/KYStateFacility.js";
|
|
8
|
+
export * from "./types/KY/KYStatePermit.js";
|
|
8
9
|
export * from "./types/NC/NCStateFacility.js";
|
|
9
10
|
export * from "./types/NC/NCStatePermit.js";
|
package/dist/src/index.js
CHANGED
|
@@ -5,5 +5,6 @@ export * from "./types/AR/ARStatePermit.js";
|
|
|
5
5
|
export * from "./types/AR/ARStatePermitSource.js";
|
|
6
6
|
export * from "./types/AR/ARStatePermitSourcePollutant.js";
|
|
7
7
|
export * from "./types/KY/KYStateFacility.js";
|
|
8
|
+
export * from "./types/KY/KYStatePermit.js";
|
|
8
9
|
export * from "./types/NC/NCStateFacility.js";
|
|
9
10
|
export * from "./types/NC/NCStatePermit.js";
|
|
@@ -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
|
+
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -5,5 +5,6 @@ export * from "./types/AR/ARStatePermit"
|
|
|
5
5
|
export * from "./types/AR/ARStatePermitSource"
|
|
6
6
|
export * from "./types/AR/ARStatePermitSourcePollutant"
|
|
7
7
|
export * from "./types/KY/KYStateFacility"
|
|
8
|
+
export * from "./types/KY/KYStatePermit"
|
|
8
9
|
export * from "./types/NC/NCStateFacility"
|
|
9
10
|
export * from "./types/NC/NCStatePermit"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { is_state_id, StateID } from "../State"
|
|
2
|
+
|
|
3
|
+
export class KYStatePermit {
|
|
4
|
+
readonly state_permit_id : string
|
|
5
|
+
readonly state_id : StateID
|
|
6
|
+
readonly permit_id : string
|
|
7
|
+
readonly state_facility_id : string
|
|
8
|
+
readonly issue_date? : string
|
|
9
|
+
// readonly expiration_date? : string
|
|
10
|
+
// readonly void_date? : string
|
|
11
|
+
// readonly status? : string
|
|
12
|
+
readonly type_id? : string
|
|
13
|
+
readonly subtype_id? : string
|
|
14
|
+
readonly s3_filenames? : string[]
|
|
15
|
+
readonly s3_text_filename? : string
|
|
16
|
+
readonly source_ids? : string[]
|
|
17
|
+
readonly [x : string] : any
|
|
18
|
+
|
|
19
|
+
constructor(state_permit : KYStatePermit) {
|
|
20
|
+
if (!KYStatePermit.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.void_date = state_permit.void_date
|
|
30
|
+
// this.status = state_permit.status
|
|
31
|
+
this.type_id = state_permit.type_id
|
|
32
|
+
this.subtype_id = state_permit.subtype_id
|
|
33
|
+
this.s3_filenames = state_permit.s3_filenames
|
|
34
|
+
this.s3_text_filename = state_permit.s3_text_filename
|
|
35
|
+
this.source_ids = state_permit.source_ids
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static is(state_permit : any) : state_permit is KYStatePermit {
|
|
39
|
+
return (
|
|
40
|
+
state_permit !== undefined &&
|
|
41
|
+
typeof state_permit.state_permit_id === "string" &&
|
|
42
|
+
is_state_id(state_permit.state_id) && state_permit.state_id === "KY" &&
|
|
43
|
+
typeof state_permit.permit_id === "string" &&
|
|
44
|
+
typeof state_permit.state_facility_id === "string" &&
|
|
45
|
+
(state_permit.issue_date === undefined || typeof state_permit.issue_date === "string") &&
|
|
46
|
+
// (state_permit.expiration_date === undefined || typeof state_permit.expiration_date === "string") &&
|
|
47
|
+
// (state_permit.void_date === undefined || typeof state_permit.void_date === "string") &&
|
|
48
|
+
// (state_permit.status === undefined || typeof state_permit.status === "string") &&
|
|
49
|
+
(state_permit.type_id === undefined || typeof state_permit.type_id === "string") &&
|
|
50
|
+
(state_permit.subtype_id === undefined || typeof state_permit.subtype_id === "string") &&
|
|
51
|
+
(state_permit.s3_filenames === undefined || Array.isArray(state_permit.s3_filenames) && state_permit.s3_filenames.map((s3_filename : any) => typeof s3_filename === "string")) &&
|
|
52
|
+
(state_permit.s3_text_filename === undefined || typeof state_permit.s3_text_filename === "string") &&
|
|
53
|
+
(state_permit.source_ids === undefined || Array.isArray(state_permit.source_ids) && state_permit.source_ids.map((source_id : any) => typeof source_id === "string"))
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
}
|