triangle-types 1.0.54 → 1.0.56

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.
@@ -29,6 +29,7 @@ export * from "./types/federal_lobby/FederalLobbyDocument.js";
29
29
  export * from "./types/federal_lobby/FederalLobbyDocumentInterest.js";
30
30
  export * from "./types/federal_congress/FederalCongressBill.js";
31
31
  export * from "./types/federal_congress/FederalCongressBillDocument.js";
32
+ export * from "./types/federal_congress/FederalCongressDistrict.js";
32
33
  export * from "./types/federal_congress/FederalCongressMember.js";
33
34
  export * from "./types/federal_register/FederalRegisterAgency.js";
34
35
  export * from "./types/federal_register/FederalRegisterDocument.js";
@@ -59,6 +60,7 @@ export * from "./types/scout/ScoutTag.js";
59
60
  export * from "./types/scout/UserScout.js";
60
61
  export * from "./types/scout/UserScoutConversation.js";
61
62
  export * from "./types/scout/UserScoutConversationMessage.js";
63
+ export * from "./types/state_legislature/StateLegislatureDistrict.js";
62
64
  export * from "./types/state_permits/StateFacility.js";
63
65
  export * from "./types/state_permits/StatePermit.js";
64
66
  export * from "./types/state_permits/StatePermitDocument.js";
package/dist/src/index.js CHANGED
@@ -29,6 +29,7 @@ export * from "./types/federal_lobby/FederalLobbyDocument.js";
29
29
  export * from "./types/federal_lobby/FederalLobbyDocumentInterest.js";
30
30
  export * from "./types/federal_congress/FederalCongressBill.js";
31
31
  export * from "./types/federal_congress/FederalCongressBillDocument.js";
32
+ export * from "./types/federal_congress/FederalCongressDistrict.js";
32
33
  export * from "./types/federal_congress/FederalCongressMember.js";
33
34
  export * from "./types/federal_register/FederalRegisterAgency.js";
34
35
  export * from "./types/federal_register/FederalRegisterDocument.js";
@@ -59,6 +60,7 @@ export * from "./types/scout/ScoutTag.js";
59
60
  export * from "./types/scout/UserScout.js";
60
61
  export * from "./types/scout/UserScoutConversation.js";
61
62
  export * from "./types/scout/UserScoutConversationMessage.js";
63
+ export * from "./types/state_legislature/StateLegislatureDistrict.js";
62
64
  export * from "./types/state_permits/StateFacility.js";
63
65
  export * from "./types/state_permits/StatePermit.js";
64
66
  export * from "./types/state_permits/StatePermitDocument.js";
@@ -1,7 +1,7 @@
1
1
  import { StateID } from "../State.js";
2
2
  export declare class FederalCongressDistrict {
3
3
  readonly federal_congress_district_id: string;
4
- readonly congress_id: number;
4
+ readonly federal_congress_id: number;
5
5
  readonly chamber_id: string;
6
6
  readonly state_id: StateID;
7
7
  readonly district_id: number;
@@ -1,7 +1,7 @@
1
1
  import { is_state_id } from "../State.js";
2
2
  export class FederalCongressDistrict {
3
3
  federal_congress_district_id;
4
- congress_id;
4
+ federal_congress_id;
5
5
  chamber_id;
6
6
  state_id;
7
7
  district_id;
@@ -10,7 +10,7 @@ export class FederalCongressDistrict {
10
10
  throw Error("Invalid input.");
11
11
  }
12
12
  this.federal_congress_district_id = federal_congress_district.federal_congress_district_id;
13
- this.congress_id = federal_congress_district.congress_id;
13
+ this.federal_congress_id = federal_congress_district.federal_congress_id;
14
14
  this.chamber_id = federal_congress_district.chamber_id;
15
15
  this.state_id = federal_congress_district.state_id;
16
16
  this.district_id = federal_congress_district.district_id;
@@ -18,9 +18,9 @@ export class FederalCongressDistrict {
18
18
  static is(federal_congress_district) {
19
19
  return (federal_congress_district !== undefined &&
20
20
  typeof federal_congress_district.federal_congress_district_id === "string" &&
21
- typeof federal_congress_district.congress_id === "string" &&
21
+ typeof federal_congress_district.federal_congress_id === "number" &&
22
22
  typeof federal_congress_district.chamber_id === "string" &&
23
23
  is_state_id(federal_congress_district.state_id) &&
24
- typeof federal_congress_district === "number");
24
+ typeof federal_congress_district.district_id === "number");
25
25
  }
26
26
  }
@@ -2,7 +2,7 @@ import { StateID } from "../State.js";
2
2
  export declare class Prism {
3
3
  readonly prism_id: string;
4
4
  readonly state_id: StateID;
5
- readonly federal_congress_house_district_id?: string;
5
+ readonly federal_congress_district_id?: string;
6
6
  readonly state_legislature_house_district_id?: string;
7
7
  readonly state_legislature_senate_district_id?: string;
8
8
  constructor(prism: any);
@@ -2,7 +2,7 @@ import { is_state_id } from "../State.js";
2
2
  export class Prism {
3
3
  prism_id;
4
4
  state_id;
5
- federal_congress_house_district_id;
5
+ federal_congress_district_id;
6
6
  state_legislature_house_district_id;
7
7
  state_legislature_senate_district_id;
8
8
  constructor(prism) {
@@ -11,7 +11,7 @@ export class Prism {
11
11
  }
12
12
  this.prism_id = prism.prism_id;
13
13
  this.state_id = prism.state_id;
14
- this.federal_congress_house_district_id = prism.federal_congress_house_district_id;
14
+ this.federal_congress_district_id = prism.federal_congress_district_id;
15
15
  this.state_legislature_house_district_id = prism.state_legislature_house_district_id;
16
16
  this.state_legislature_senate_district_id = prism.state_legislature_senate_district_id;
17
17
  }
@@ -19,7 +19,7 @@ export class Prism {
19
19
  return (prism !== undefined &&
20
20
  typeof prism.prism_id === "string" &&
21
21
  is_state_id(prism.state_id) &&
22
- (prism.federal_congress_house_district_id === undefined || typeof prism.federal_congress_house_district_id === "string") &&
22
+ (prism.federal_congress_district_id === undefined || typeof prism.federal_congress_district_id === "string") &&
23
23
  (prism.state_legislature_house_district_id === undefined || typeof prism.state_legislature_house_district_id === "string") &&
24
24
  (prism.state_legislature_senate_district_id === undefined || typeof prism.state_legislature_senate_district_id === "string"));
25
25
  }
@@ -24,7 +24,7 @@ export declare class Voter {
24
24
  readonly address_mail_city?: string;
25
25
  readonly address_mail_state_id: string;
26
26
  readonly address_mail_zip?: string;
27
- readonly federal_congress_house_district_id: string;
27
+ readonly federal_congress_district_id: string;
28
28
  readonly state_legislature_house_district_id: string;
29
29
  readonly state_legislature_senate_district_id: string;
30
30
  readonly occupation_group?: string;
@@ -24,7 +24,7 @@ export class Voter {
24
24
  address_mail_city;
25
25
  address_mail_state_id;
26
26
  address_mail_zip;
27
- federal_congress_house_district_id;
27
+ federal_congress_district_id;
28
28
  state_legislature_house_district_id;
29
29
  state_legislature_senate_district_id;
30
30
  occupation_group;
@@ -65,7 +65,7 @@ export class Voter {
65
65
  this.address_mail_city = voter.address_mail_city;
66
66
  this.address_mail_state_id = voter.address_mail_state_id;
67
67
  this.address_mail_zip = voter.address_mail_zip;
68
- this.federal_congress_house_district_id = voter.federal_congress_house_district_id;
68
+ this.federal_congress_district_id = voter.federal_congress_district_id;
69
69
  this.state_legislature_house_district_id = voter.state_legislature_house_district_id;
70
70
  this.state_legislature_senate_district_id = voter.state_legislature_senate_district_id;
71
71
  this.occupation_group = voter.occupation_group;
@@ -105,7 +105,7 @@ export class Voter {
105
105
  (voter.address_mail_city === undefined || typeof voter.address_mail_city === "string") &&
106
106
  typeof voter.address_mail_state_id === "string" &&
107
107
  (voter.address_mail_zip === undefined || typeof voter.address_mail_zip === "string") &&
108
- typeof voter.federal_congress_house_district_id === "string" &&
108
+ typeof voter.federal_congress_district_id === "string" &&
109
109
  typeof voter.state_legislature_house_district_id === "string" &&
110
110
  typeof voter.state_legislature_senate_district_id === "string" &&
111
111
  (voter.occupation_group === undefined || typeof voter.occupation_group === "string") &&
@@ -5,7 +5,7 @@ export declare class VoterTarget {
5
5
  readonly target_id: string;
6
6
  readonly value: number;
7
7
  readonly state_id: StateID;
8
- readonly federal_congress_house_district_id: string;
8
+ readonly federal_congress_district_id: string;
9
9
  readonly state_legislature_house_district_id: string;
10
10
  readonly state_legislature_senate_district_id: string;
11
11
  constructor(voter_target: any);
@@ -5,7 +5,7 @@ export class VoterTarget {
5
5
  target_id;
6
6
  value;
7
7
  state_id;
8
- federal_congress_house_district_id;
8
+ federal_congress_district_id;
9
9
  state_legislature_house_district_id;
10
10
  state_legislature_senate_district_id;
11
11
  constructor(voter_target) {
@@ -17,7 +17,7 @@ export class VoterTarget {
17
17
  this.target_id = voter_target.target_id;
18
18
  this.value = voter_target.value;
19
19
  this.state_id = voter_target.state_id;
20
- this.federal_congress_house_district_id = voter_target.federal_congress_house_district_id;
20
+ this.federal_congress_district_id = voter_target.federal_congress_district_id;
21
21
  this.state_legislature_house_district_id = voter_target.state_legislature_house_district_id;
22
22
  this.state_legislature_senate_district_id = voter_target.state_legislature_senate_district_id;
23
23
  }
@@ -28,7 +28,7 @@ export class VoterTarget {
28
28
  typeof voter_target.target_id === "string" &&
29
29
  typeof voter_target.value === "number" &&
30
30
  is_state_id(voter_target.state_id) &&
31
- typeof voter_target.federal_congress_house_district_id === "string" &&
31
+ typeof voter_target.federal_congress_district_id === "string" &&
32
32
  typeof voter_target.state_legislature_house_district_id === "string" &&
33
33
  typeof voter_target.state_legislature_senate_district_id === "string");
34
34
  }
@@ -7,7 +7,7 @@ export declare class VoterTurnout {
7
7
  readonly turnout_type_id: string;
8
8
  readonly value: boolean;
9
9
  readonly state_id: StateID;
10
- readonly federal_congress_house_district_id: string;
10
+ readonly federal_congress_district_id: string;
11
11
  readonly state_legislature_house_district_id: string;
12
12
  readonly state_legislature_senate_district_id: string;
13
13
  constructor(voter_turnout: any);
@@ -7,7 +7,7 @@ export class VoterTurnout {
7
7
  turnout_type_id;
8
8
  value;
9
9
  state_id;
10
- federal_congress_house_district_id;
10
+ federal_congress_district_id;
11
11
  state_legislature_house_district_id;
12
12
  state_legislature_senate_district_id;
13
13
  constructor(voter_turnout) {
@@ -22,7 +22,7 @@ export class VoterTurnout {
22
22
  this.value = voter_turnout.value;
23
23
  this.state_id = voter_turnout.state_id;
24
24
  this.state_id = voter_turnout.state_id;
25
- this.federal_congress_house_district_id = voter_turnout.federal_congress_house_district_id;
25
+ this.federal_congress_district_id = voter_turnout.federal_congress_district_id;
26
26
  this.state_legislature_house_district_id = voter_turnout.state_legislature_house_district_id;
27
27
  this.state_legislature_senate_district_id = voter_turnout.state_legislature_senate_district_id;
28
28
  }
@@ -35,7 +35,7 @@ export class VoterTurnout {
35
35
  typeof voter_turnout.turnout_type_id === "string" &&
36
36
  typeof voter_turnout.value === "boolean" &&
37
37
  is_state_id(voter_turnout.state_id) &&
38
- typeof voter_turnout.federal_congress_house_district_id === "string" &&
38
+ typeof voter_turnout.federal_congress_district_id === "string" &&
39
39
  typeof voter_turnout.state_legislature_house_district_id === "string" &&
40
40
  typeof voter_turnout.state_legislature_senate_district_id === "string");
41
41
  }
@@ -18,9 +18,9 @@ export class StateLegislatureDistrict {
18
18
  static is(state_legislature_district) {
19
19
  return (state_legislature_district !== undefined &&
20
20
  typeof state_legislature_district.state_legislature_district_id === "string" &&
21
- typeof state_legislature_district.legislature_id === "string" &&
21
+ typeof state_legislature_district.legislature_id === "number" &&
22
22
  is_state_id(state_legislature_district.state_id) &&
23
23
  typeof state_legislature_district.chamber_id === "string" &&
24
- typeof state_legislature_district === "number");
24
+ typeof state_legislature_district.district_id === "number");
25
25
  }
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -33,6 +33,7 @@ export * from "./types/federal_lobby/FederalLobbyDocumentInterest"
33
33
 
34
34
  export * from "./types/federal_congress/FederalCongressBill"
35
35
  export * from "./types/federal_congress/FederalCongressBillDocument"
36
+ export * from "./types/federal_congress/FederalCongressDistrict"
36
37
  export * from "./types/federal_congress/FederalCongressMember"
37
38
 
38
39
  export * from "./types/federal_register/FederalRegisterAgency"
@@ -71,6 +72,8 @@ export * from "./types/scout/UserScout"
71
72
  export * from "./types/scout/UserScoutConversation"
72
73
  export * from "./types/scout/UserScoutConversationMessage"
73
74
 
75
+ export * from "./types/state_legislature/StateLegislatureDistrict"
76
+
74
77
  export * from "./types/state_permits/StateFacility"
75
78
  export * from "./types/state_permits/StatePermit"
76
79
  export * from "./types/state_permits/StatePermitDocument"
@@ -2,7 +2,7 @@ import { is_state_id, StateID } from "../State"
2
2
 
3
3
  export class FederalCongressDistrict {
4
4
  readonly federal_congress_district_id : string
5
- readonly congress_id : number
5
+ readonly federal_congress_id : number
6
6
  readonly chamber_id : string
7
7
  readonly state_id : StateID
8
8
  readonly district_id : number
@@ -13,7 +13,7 @@ export class FederalCongressDistrict {
13
13
  throw Error("Invalid input.")
14
14
  }
15
15
  this.federal_congress_district_id = federal_congress_district.federal_congress_district_id
16
- this.congress_id = federal_congress_district.congress_id
16
+ this.federal_congress_id = federal_congress_district.federal_congress_id
17
17
  this.chamber_id = federal_congress_district.chamber_id
18
18
  this.state_id = federal_congress_district.state_id
19
19
  this.district_id = federal_congress_district.district_id
@@ -23,10 +23,10 @@ export class FederalCongressDistrict {
23
23
  return (
24
24
  federal_congress_district !== undefined &&
25
25
  typeof federal_congress_district.federal_congress_district_id === "string" &&
26
- typeof federal_congress_district.congress_id === "string" &&
26
+ typeof federal_congress_district.federal_congress_id === "number" &&
27
27
  typeof federal_congress_district.chamber_id === "string" &&
28
28
  is_state_id(federal_congress_district.state_id) &&
29
- typeof federal_congress_district === "number"
29
+ typeof federal_congress_district.district_id === "number"
30
30
  )
31
31
  }
32
32
 
@@ -3,7 +3,7 @@ import { is_state_id, StateID } from "../State"
3
3
  export class Prism {
4
4
  readonly prism_id : string
5
5
  readonly state_id : StateID
6
- readonly federal_congress_house_district_id? : string
6
+ readonly federal_congress_district_id? : string
7
7
  readonly state_legislature_house_district_id? : string
8
8
  readonly state_legislature_senate_district_id? : string
9
9
 
@@ -13,7 +13,7 @@ export class Prism {
13
13
  }
14
14
  this.prism_id = prism.prism_id
15
15
  this.state_id = prism.state_id
16
- this.federal_congress_house_district_id = prism.federal_congress_house_district_id
16
+ this.federal_congress_district_id = prism.federal_congress_district_id
17
17
  this.state_legislature_house_district_id = prism.state_legislature_house_district_id
18
18
  this.state_legislature_senate_district_id = prism.state_legislature_senate_district_id
19
19
  }
@@ -23,7 +23,7 @@ export class Prism {
23
23
  prism !== undefined &&
24
24
  typeof prism.prism_id === "string" &&
25
25
  is_state_id(prism.state_id) &&
26
- (prism.federal_congress_house_district_id === undefined || typeof prism.federal_congress_house_district_id === "string") &&
26
+ (prism.federal_congress_district_id === undefined || typeof prism.federal_congress_district_id === "string") &&
27
27
  (prism.state_legislature_house_district_id === undefined || typeof prism.state_legislature_house_district_id === "string") &&
28
28
  (prism.state_legislature_senate_district_id === undefined || typeof prism.state_legislature_senate_district_id === "string")
29
29
  )
@@ -25,7 +25,7 @@ export class Voter {
25
25
  readonly address_mail_city? : string
26
26
  readonly address_mail_state_id : string
27
27
  readonly address_mail_zip? : string
28
- readonly federal_congress_house_district_id : string
28
+ readonly federal_congress_district_id : string
29
29
  readonly state_legislature_house_district_id : string
30
30
  readonly state_legislature_senate_district_id : string
31
31
  readonly occupation_group? : string
@@ -68,7 +68,7 @@ export class Voter {
68
68
  this.address_mail_city = voter.address_mail_city
69
69
  this.address_mail_state_id = voter.address_mail_state_id
70
70
  this.address_mail_zip = voter.address_mail_zip
71
- this.federal_congress_house_district_id = voter.federal_congress_house_district_id
71
+ this.federal_congress_district_id = voter.federal_congress_district_id
72
72
  this.state_legislature_house_district_id = voter.state_legislature_house_district_id
73
73
  this.state_legislature_senate_district_id = voter.state_legislature_senate_district_id
74
74
  this.occupation_group = voter.occupation_group
@@ -110,7 +110,7 @@ export class Voter {
110
110
  (voter.address_mail_city === undefined || typeof voter.address_mail_city === "string") &&
111
111
  typeof voter.address_mail_state_id === "string" &&
112
112
  (voter.address_mail_zip === undefined || typeof voter.address_mail_zip === "string") &&
113
- typeof voter.federal_congress_house_district_id === "string" &&
113
+ typeof voter.federal_congress_district_id === "string" &&
114
114
  typeof voter.state_legislature_house_district_id === "string" &&
115
115
  typeof voter.state_legislature_senate_district_id === "string" &&
116
116
  (voter.occupation_group === undefined || typeof voter.occupation_group === "string") &&
@@ -6,7 +6,7 @@ export class VoterTarget {
6
6
  readonly target_id : string
7
7
  readonly value : number
8
8
  readonly state_id : StateID
9
- readonly federal_congress_house_district_id : string
9
+ readonly federal_congress_district_id : string
10
10
  readonly state_legislature_house_district_id : string
11
11
  readonly state_legislature_senate_district_id : string
12
12
 
@@ -19,7 +19,7 @@ export class VoterTarget {
19
19
  this.target_id = voter_target.target_id
20
20
  this.value = voter_target.value
21
21
  this.state_id = voter_target.state_id
22
- this.federal_congress_house_district_id = voter_target.federal_congress_house_district_id
22
+ this.federal_congress_district_id = voter_target.federal_congress_district_id
23
23
  this.state_legislature_house_district_id = voter_target.state_legislature_house_district_id
24
24
  this.state_legislature_senate_district_id = voter_target.state_legislature_senate_district_id
25
25
  }
@@ -32,7 +32,7 @@ export class VoterTarget {
32
32
  typeof voter_target.target_id === "string" &&
33
33
  typeof voter_target.value === "number" &&
34
34
  is_state_id(voter_target.state_id) &&
35
- typeof voter_target.federal_congress_house_district_id === "string" &&
35
+ typeof voter_target.federal_congress_district_id === "string" &&
36
36
  typeof voter_target.state_legislature_house_district_id === "string" &&
37
37
  typeof voter_target.state_legislature_senate_district_id === "string"
38
38
  )
@@ -8,7 +8,7 @@ export class VoterTurnout {
8
8
  readonly turnout_type_id : string
9
9
  readonly value : boolean
10
10
  readonly state_id : StateID
11
- readonly federal_congress_house_district_id : string
11
+ readonly federal_congress_district_id : string
12
12
  readonly state_legislature_house_district_id : string
13
13
  readonly state_legislature_senate_district_id : string
14
14
 
@@ -24,7 +24,7 @@ export class VoterTurnout {
24
24
  this.value = voter_turnout.value
25
25
  this.state_id = voter_turnout.state_id
26
26
  this.state_id = voter_turnout.state_id
27
- this.federal_congress_house_district_id = voter_turnout.federal_congress_house_district_id
27
+ this.federal_congress_district_id = voter_turnout.federal_congress_district_id
28
28
  this.state_legislature_house_district_id = voter_turnout.state_legislature_house_district_id
29
29
  this.state_legislature_senate_district_id = voter_turnout.state_legislature_senate_district_id
30
30
  }
@@ -39,7 +39,7 @@ export class VoterTurnout {
39
39
  typeof voter_turnout.turnout_type_id === "string" &&
40
40
  typeof voter_turnout.value === "boolean" &&
41
41
  is_state_id(voter_turnout.state_id) &&
42
- typeof voter_turnout.federal_congress_house_district_id === "string" &&
42
+ typeof voter_turnout.federal_congress_district_id === "string" &&
43
43
  typeof voter_turnout.state_legislature_house_district_id === "string" &&
44
44
  typeof voter_turnout.state_legislature_senate_district_id === "string"
45
45
  )
@@ -23,10 +23,10 @@ export class StateLegislatureDistrict {
23
23
  return (
24
24
  state_legislature_district !== undefined &&
25
25
  typeof state_legislature_district.state_legislature_district_id === "string" &&
26
- typeof state_legislature_district.legislature_id === "string" &&
26
+ typeof state_legislature_district.legislature_id === "number" &&
27
27
  is_state_id(state_legislature_district.state_id) &&
28
28
  typeof state_legislature_district.chamber_id === "string" &&
29
- typeof state_legislature_district === "number"
29
+ typeof state_legislature_district.district_id === "number"
30
30
  )
31
31
  }
32
32