triage-types 1.0.37 → 1.0.39

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.
@@ -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 active: boolean;
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
- active;
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.active = state_facility.active;
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.active === "boolean" &&
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 active: boolean;
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
- active;
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.active = state_facility.active;
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.active === "boolean" &&
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
  }
@@ -9,7 +9,7 @@ export declare class NCStatePermit {
9
9
  readonly status?: string;
10
10
  readonly type_id?: string;
11
11
  readonly subtype_id?: string;
12
- readonly s3_filename?: string;
12
+ readonly s3_filenames?: string[];
13
13
  readonly s3_text_filename?: string;
14
14
  readonly source_ids?: string[];
15
15
  readonly [x: string]: any;
@@ -9,7 +9,7 @@ export class NCStatePermit {
9
9
  status;
10
10
  type_id;
11
11
  subtype_id;
12
- s3_filename;
12
+ s3_filenames;
13
13
  s3_text_filename;
14
14
  source_ids;
15
15
  constructor(state_permit) {
@@ -25,7 +25,7 @@ export class NCStatePermit {
25
25
  this.status = state_permit.status;
26
26
  this.type_id = state_permit.type_id;
27
27
  this.subtype_id = state_permit.subtype_id;
28
- this.s3_filename = state_permit.s3_filename;
28
+ this.s3_filenames = state_permit.s3_filenames;
29
29
  this.s3_text_filename = state_permit.s3_text_filename;
30
30
  this.source_ids = state_permit.source_ids;
31
31
  }
@@ -40,7 +40,7 @@ export class NCStatePermit {
40
40
  (state_permit.status === undefined || typeof state_permit.status === "string") &&
41
41
  (state_permit.type_id === undefined || typeof state_permit.type_id === "string") &&
42
42
  (state_permit.subtype_id === undefined || typeof state_permit.subtype_id === "string") &&
43
- (state_permit.s3_filename === undefined || typeof state_permit.s3_filename === "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
44
  (state_permit.s3_text_filename === undefined || typeof state_permit.s3_text_filename === "string") &&
45
45
  (state_permit.source_ids === undefined || Array.isArray(state_permit.source_ids) && state_permit.source_ids.map((source_id) => typeof source_id === "string")));
46
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triage-types",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -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 active : boolean
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.active = state_facility.active
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.active === "boolean" &&
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 active : boolean
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.active = state_facility.active
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.active === "boolean" &&
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
  )
@@ -11,7 +11,7 @@ export class NCStatePermit {
11
11
  readonly status? : string
12
12
  readonly type_id? : string
13
13
  readonly subtype_id? : string
14
- readonly s3_filename? : string
14
+ readonly s3_filenames? : string[]
15
15
  readonly s3_text_filename? : string
16
16
  readonly source_ids? : string[]
17
17
  readonly [x : string] : any
@@ -29,7 +29,7 @@ export class NCStatePermit {
29
29
  this.status = state_permit.status
30
30
  this.type_id = state_permit.type_id
31
31
  this.subtype_id = state_permit.subtype_id
32
- this.s3_filename = state_permit.s3_filename
32
+ this.s3_filenames = state_permit.s3_filenames
33
33
  this.s3_text_filename = state_permit.s3_text_filename
34
34
  this.source_ids = state_permit.source_ids
35
35
  }
@@ -46,7 +46,7 @@ export class NCStatePermit {
46
46
  (state_permit.status === undefined || typeof state_permit.status === "string") &&
47
47
  (state_permit.type_id === undefined || typeof state_permit.type_id === "string") &&
48
48
  (state_permit.subtype_id === undefined || typeof state_permit.subtype_id === "string") &&
49
- (state_permit.s3_filename === undefined || typeof state_permit.s3_filename === "string") &&
49
+ (state_permit.s3_filenames === undefined || Array.isArray(state_permit.s3_filenames) && state_permit.s3_filenames.map((s3_filename : any) => typeof s3_filename === "string")) &&
50
50
  (state_permit.s3_text_filename === undefined || typeof state_permit.s3_text_filename === "string") &&
51
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
52
  )