triangle-types 1.0.206 → 1.0.208

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.
Files changed (43) hide show
  1. package/dist/src/types/web/WebArticleTag.js +1 -1
  2. package/package.json +1 -1
  3. package/src/types/web/WebArticleTag.ts +1 -1
  4. package/dist/src/types/APIError.d.ts +0 -4
  5. package/dist/src/types/APIError.js +0 -19
  6. package/dist/src/types/County.d.ts +0 -8
  7. package/dist/src/types/County.js +0 -25
  8. package/dist/src/types/SchoolDistrict.d.ts +0 -10
  9. package/dist/src/types/SchoolDistrict.js +0 -26
  10. package/dist/src/types/State.d.ts +0 -8
  11. package/dist/src/types/State.js +0 -210
  12. package/dist/src/types/User.d.ts +0 -10
  13. package/dist/src/types/User.js +0 -29
  14. package/dist/src/types/federal_census/FederalCensusCity.d.ts +0 -11
  15. package/dist/src/types/federal_census/FederalCensusCity.js +0 -29
  16. package/dist/src/types/jurisdiction/Jurisdiction.d.ts +0 -1
  17. package/dist/src/types/jurisdiction/Jurisdiction.js +0 -21
  18. package/dist/src/types/prism/PrismMetric.d.ts +0 -9
  19. package/dist/src/types/prism/PrismMetric.js +0 -25
  20. package/dist/src/types/prism/PrismSubPrism.d.ts +0 -7
  21. package/dist/src/types/prism/PrismSubPrism.js +0 -16
  22. package/dist/src/types/prism/PrismVoter.d.ts +0 -9
  23. package/dist/src/types/prism/PrismVoter.js +0 -25
  24. package/dist/src/types/prism/TenantVoterTarget.d.ts +0 -10
  25. package/dist/src/types/prism/TenantVoterTarget.js +0 -47
  26. package/dist/src/types/prism/UserPrism.d.ts +0 -7
  27. package/dist/src/types/prism/UserPrism.js +0 -19
  28. package/dist/src/types/prism/VoterTurnout.d.ts +0 -1
  29. package/dist/src/types/prism/VoterTurnout.js +0 -45
  30. package/dist/src/types/vectors/S3Vector.d.ts +0 -1
  31. package/dist/src/types/vectors/S3Vector.js +0 -11
  32. package/dist/src/types/voters/UserStateScore.d.ts +0 -9
  33. package/dist/src/types/voters/UserStateScore.js +0 -22
  34. package/dist/src/types/voters/Voter.d.ts +0 -47
  35. package/dist/src/types/voters/Voter.js +0 -131
  36. package/dist/src/types/voters/VoterScore.d.ts +0 -9
  37. package/dist/src/types/voters/VoterScore.js +0 -25
  38. package/dist/src/types/voters/VoterTurnout.d.ts +0 -11
  39. package/dist/src/types/voters/VoterTurnout.js +0 -31
  40. package/dist/src/types/www/WWWArticle.d.ts +0 -11
  41. package/dist/src/types/www/WWWArticle.js +0 -31
  42. package/dist/src/types/www/WWWArticleTag.d.ts +0 -17
  43. package/dist/src/types/www/WWWArticleTag.js +0 -43
@@ -25,7 +25,7 @@ export class WebArticleTag {
25
25
  typeof web_article_tag.tag_id === "string" &&
26
26
  typeof web_article_tag.url === "string" &&
27
27
  typeof web_article_tag.domain === "string" &&
28
- web_article_tag.date === "string" &&
28
+ typeof web_article_tag.date === "string" &&
29
29
  (web_article_tag.is_relevant === undefined || typeof web_article_tag.is_relevant === "boolean") &&
30
30
  (web_article_tag.sentiment_id === undefined || typeof web_article_tag.sentiment_id === "string"));
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.206",
3
+ "version": "1.0.208",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -30,7 +30,7 @@ export class WebArticleTag {
30
30
  typeof web_article_tag.tag_id === "string" &&
31
31
  typeof web_article_tag.url === "string" &&
32
32
  typeof web_article_tag.domain === "string" &&
33
- web_article_tag.date === "string" &&
33
+ typeof web_article_tag.date === "string" &&
34
34
  (web_article_tag.is_relevant === undefined || typeof web_article_tag.is_relevant === "boolean") &&
35
35
  (web_article_tag.sentiment_id === undefined || typeof web_article_tag.sentiment_id === "string")
36
36
  )
@@ -1,4 +0,0 @@
1
- export declare class APIError extends Error {
2
- status: number;
3
- constructor(status: number, message?: string);
4
- }
@@ -1,19 +0,0 @@
1
- const default_messages_by_status = {
2
- 400: "Bad Request",
3
- 401: "Unauthorized",
4
- 403: "Forbidden",
5
- 404: "Not Found",
6
- 405: "Method Not Allowed",
7
- 500: "Internal Server Error",
8
- 504: "Gateway Timeout",
9
- 600: "Failed to Parse Output"
10
- };
11
- export class APIError extends Error {
12
- status;
13
- constructor(status, message) {
14
- const default_message = default_messages_by_status[status];
15
- super(message !== undefined ? message : default_message !== undefined ? default_message : "Error");
16
- this.name = "APIError";
17
- this.status = status;
18
- }
19
- }
@@ -1,8 +0,0 @@
1
- import { StateID } from "./State.js";
2
- export declare class County {
3
- readonly county_id: string;
4
- readonly state_id: StateID;
5
- readonly name: string;
6
- constructor(county: any);
7
- static is(county: any): county is County;
8
- }
@@ -1,25 +0,0 @@
1
- // export const county_type_ids = ["H1", "H4", "H5", "H6", "C7"] as const
2
- import { is_state_id } from "./State.js";
3
- // export type CountyTypeID = typeof county_type_ids[number]
4
- // export function is_county_type_id(county_type_id : any) : county_type_id is CountyTypeID {
5
- // return county_type_ids.includes(county_type_id)
6
- // }
7
- export class County {
8
- county_id;
9
- state_id;
10
- name;
11
- constructor(county) {
12
- if (!County.is(county)) {
13
- throw Error("Invalid input.");
14
- }
15
- this.county_id = county.county_id;
16
- this.state_id = county.state_id;
17
- this.name = county.name;
18
- }
19
- static is(county) {
20
- return (county !== undefined &&
21
- typeof county.county_id === "string" &&
22
- is_state_id(county.state_id) &&
23
- typeof county.name === "string");
24
- }
25
- }
@@ -1,10 +0,0 @@
1
- import { StateID } from "./State.js";
2
- export declare class SchoolDistrict {
3
- readonly school_district_id: string;
4
- readonly state_id: StateID;
5
- readonly county_id: string;
6
- readonly state_school_district_id: string;
7
- readonly name: string;
8
- constructor(school_district: any);
9
- static is(school_district: any): school_district is SchoolDistrict;
10
- }
@@ -1,26 +0,0 @@
1
- import { is_state_id } from "./State.js";
2
- export class SchoolDistrict {
3
- school_district_id;
4
- state_id;
5
- county_id;
6
- state_school_district_id;
7
- name;
8
- constructor(school_district) {
9
- if (!SchoolDistrict.is(school_district)) {
10
- throw Error("Invalid input.");
11
- }
12
- this.school_district_id = school_district.school_district_id;
13
- this.state_id = school_district.state_id;
14
- this.county_id = school_district.county_id;
15
- this.state_school_district_id = school_district.state_school_district_id;
16
- this.name = school_district.name;
17
- }
18
- static is(school_district) {
19
- return (school_district !== undefined &&
20
- typeof school_district.school_district_id === "string" &&
21
- is_state_id(school_district.state_id) &&
22
- typeof school_district.county_id === "string" &&
23
- typeof school_district.state_school_district_id === "string" &&
24
- typeof school_district.name === "string");
25
- }
26
- }
@@ -1,8 +0,0 @@
1
- export declare const state_ids: readonly ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"];
2
- export type StateID = typeof state_ids[number];
3
- export declare function is_state_id(state_id: any): state_id is StateID;
4
- export interface State {
5
- state_id: StateID;
6
- name: string;
7
- }
8
- export declare const states_by_state_id: Record<StateID, State>;
@@ -1,210 +0,0 @@
1
- export const state_ids = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"];
2
- export function is_state_id(state_id) {
3
- return state_ids.includes(state_id);
4
- }
5
- export const states_by_state_id = {
6
- AL: {
7
- state_id: "AL",
8
- name: "Alabama"
9
- },
10
- AK: {
11
- state_id: "AK",
12
- name: "Alaska"
13
- },
14
- AZ: {
15
- state_id: "AZ",
16
- name: "Arizona"
17
- },
18
- AR: {
19
- state_id: "AR",
20
- name: "Arkansas"
21
- },
22
- CA: {
23
- state_id: "CA",
24
- name: "California"
25
- },
26
- CO: {
27
- state_id: "CO",
28
- name: "Colorado"
29
- },
30
- CT: {
31
- state_id: "CT",
32
- name: "Connecticut"
33
- },
34
- DC: {
35
- state_id: "DC",
36
- name: "Washington D.C."
37
- },
38
- DE: {
39
- state_id: "DE",
40
- name: "Delaware"
41
- },
42
- FL: {
43
- state_id: "FL",
44
- name: "Florida"
45
- },
46
- GA: {
47
- state_id: "GA",
48
- name: "Georgia"
49
- },
50
- HI: {
51
- state_id: "HI",
52
- name: "Hawaii"
53
- },
54
- ID: {
55
- state_id: "ID",
56
- name: "Idaho"
57
- },
58
- IL: {
59
- state_id: "IL",
60
- name: "Illinois"
61
- },
62
- IN: {
63
- state_id: "IN",
64
- name: "Indiana"
65
- },
66
- IA: {
67
- state_id: "IA",
68
- name: "Iowa"
69
- },
70
- KS: {
71
- state_id: "KS",
72
- name: "Kansas"
73
- },
74
- KY: {
75
- state_id: "KY",
76
- name: "Kentucky"
77
- },
78
- LA: {
79
- state_id: "LA",
80
- name: "Louisiana"
81
- },
82
- ME: {
83
- state_id: "ME",
84
- name: "Maine"
85
- },
86
- MD: {
87
- state_id: "MD",
88
- name: "Maryland"
89
- },
90
- MA: {
91
- state_id: "MA",
92
- name: "Massachusetts"
93
- },
94
- MI: {
95
- state_id: "MI",
96
- name: "Michigan"
97
- },
98
- MN: {
99
- state_id: "MN",
100
- name: "Minnesota"
101
- },
102
- MS: {
103
- state_id: "MS",
104
- name: "Mississippi"
105
- },
106
- MO: {
107
- state_id: "MO",
108
- name: "Missouri"
109
- },
110
- MT: {
111
- state_id: "MT",
112
- name: "Montana"
113
- },
114
- NE: {
115
- state_id: "NE",
116
- name: "Nebraska"
117
- },
118
- NV: {
119
- state_id: "NV",
120
- name: "Nevada"
121
- },
122
- NH: {
123
- state_id: "NH",
124
- name: "New Hampshire"
125
- },
126
- NJ: {
127
- state_id: "NJ",
128
- name: "New Jersey"
129
- },
130
- NM: {
131
- state_id: "NM",
132
- name: "New Mexico"
133
- },
134
- NY: {
135
- state_id: "NY",
136
- name: "New York"
137
- },
138
- NC: {
139
- state_id: "NC",
140
- name: "North Carolina"
141
- },
142
- ND: {
143
- state_id: "ND",
144
- name: "North Dakota"
145
- },
146
- OH: {
147
- state_id: "OH",
148
- name: "Ohio"
149
- },
150
- OK: {
151
- state_id: "OK",
152
- name: "Oklahoma"
153
- },
154
- OR: {
155
- state_id: "OR",
156
- name: "Oregon"
157
- },
158
- PA: {
159
- state_id: "PA",
160
- name: "Pennsylvania"
161
- },
162
- RI: {
163
- state_id: "RI",
164
- name: "Rhode Island"
165
- },
166
- SC: {
167
- state_id: "SC",
168
- name: "South Carolina"
169
- },
170
- SD: {
171
- state_id: "SD",
172
- name: "South Dakota"
173
- },
174
- TN: {
175
- state_id: "TN",
176
- name: "Tennessee"
177
- },
178
- TX: {
179
- state_id: "TX",
180
- name: "Texas"
181
- },
182
- UT: {
183
- state_id: "UT",
184
- name: "Utah"
185
- },
186
- VT: {
187
- state_id: "VT",
188
- name: "Vermont"
189
- },
190
- VA: {
191
- state_id: "VA",
192
- name: "Virginia"
193
- },
194
- WA: {
195
- state_id: "WA",
196
- name: "Washington"
197
- },
198
- WV: {
199
- state_id: "WV",
200
- name: "West Virginia"
201
- },
202
- WI: {
203
- state_id: "WI",
204
- name: "Wisconsin"
205
- },
206
- WY: {
207
- state_id: "WY",
208
- name: "Wyoming"
209
- }
210
- };
@@ -1,10 +0,0 @@
1
- export declare class User {
2
- readonly user_id: string;
3
- readonly email: string;
4
- readonly is_admin_elections: boolean;
5
- readonly is_admin_prism: boolean;
6
- readonly is_admin_scout: boolean;
7
- readonly is_admin_triage: boolean;
8
- constructor(user: User);
9
- static is(user: any): user is User;
10
- }
@@ -1,29 +0,0 @@
1
- export class User {
2
- user_id;
3
- email;
4
- is_admin_elections;
5
- is_admin_prism;
6
- is_admin_scout;
7
- is_admin_triage;
8
- // readonly [x : string] : any
9
- constructor(user) {
10
- if (!User.is(user)) {
11
- throw Error("Invalid Input.");
12
- }
13
- this.user_id = user.user_id;
14
- this.email = user.email;
15
- this.is_admin_elections = user.is_admin_elections;
16
- this.is_admin_prism = user.is_admin_prism;
17
- this.is_admin_scout = user.is_admin_scout;
18
- this.is_admin_triage = user.is_admin_triage;
19
- }
20
- static is(user) {
21
- return (user !== undefined &&
22
- typeof user.user_id === "string" &&
23
- typeof user.email === "string" &&
24
- typeof user.is_admin_elections === "boolean" &&
25
- typeof user.is_admin_prism === "boolean" &&
26
- typeof user.is_admin_scout === "boolean" &&
27
- typeof user.is_admin_triage === "boolean");
28
- }
29
- }
@@ -1,11 +0,0 @@
1
- import { StateID } from "../regions/State.js";
2
- export declare class FederalCensusCity {
3
- readonly federal_census_city_id: string;
4
- readonly federal_census_id: number;
5
- readonly city_id: string;
6
- readonly state_id: StateID;
7
- readonly city_type_id?: string;
8
- readonly name: string;
9
- constructor(federal_census_city: any);
10
- static is(federal_census_city: any): federal_census_city is FederalCensusCity;
11
- }
@@ -1,29 +0,0 @@
1
- import { is_state_id } from "../regions/State.js";
2
- export class FederalCensusCity {
3
- federal_census_city_id;
4
- federal_census_id;
5
- city_id;
6
- state_id;
7
- city_type_id;
8
- name;
9
- constructor(federal_census_city) {
10
- if (!FederalCensusCity.is(federal_census_city)) {
11
- throw Error("Invalid input.");
12
- }
13
- this.federal_census_city_id = federal_census_city.federal_census_city_id;
14
- this.federal_census_id = federal_census_city.federal_census_id;
15
- this.city_id = federal_census_city.city_id;
16
- this.state_id = federal_census_city.state_id;
17
- this.city_type_id = federal_census_city.city_type_id;
18
- this.name = federal_census_city.name;
19
- }
20
- static is(federal_census_city) {
21
- return (federal_census_city !== undefined &&
22
- typeof federal_census_city.federal_census_city_id === "string" &&
23
- typeof federal_census_city.federal_census_id === "number" &&
24
- typeof federal_census_city.city_id === "string" &&
25
- is_state_id(federal_census_city.state_id) &&
26
- (federal_census_city.city_type_id === undefined || typeof federal_census_city.city_type_id === "string") &&
27
- typeof federal_census_city.name === "string");
28
- }
29
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,21 +0,0 @@
1
- // export const jurisdiction_type_ids = ["state", "federal_house_district", "state_house_district", "state_senate_district"] as const
2
- export {};
3
- // export type JurisdictionTypeID = typeof jurisdiction_type_ids[number]
4
- // export function is_jurisdiction_type_id(jurisdiction_type_id : any) : jurisdiction_type_id is JurisdictionTypeID {
5
- // return jurisdiction_type_ids.includes(jurisdiction_type_id)
6
- // }
7
- // export class Jurisdiction {
8
- // readonly jurisdiction_id : string
9
- // constructor(jurisdiction : any) {
10
- // if (!Jurisdiction.is(jurisdiction)) {
11
- // throw Error("Invalid input.")
12
- // }
13
- // this.jurisdiction_id = jurisdiction.jurisdiction_id
14
- // }
15
- // static is(jurisdiction : any) : jurisdiction is Jurisdiction {
16
- // return (
17
- // jurisdiction !== undefined &&
18
- // typeof jurisdiction.jurisdiction_id === "string"
19
- // )
20
- // }
21
- // }
@@ -1,9 +0,0 @@
1
- export declare class PrismMetric {
2
- readonly prism_metric_id: string;
3
- readonly prism_id: string;
4
- readonly metric_id: string;
5
- readonly state_id: string;
6
- readonly value: number;
7
- constructor(prism_metric: any);
8
- static is(prism_metric: any): prism_metric is PrismMetric;
9
- }
@@ -1,25 +0,0 @@
1
- export class PrismMetric {
2
- prism_metric_id;
3
- prism_id;
4
- metric_id;
5
- state_id;
6
- value;
7
- constructor(prism_metric) {
8
- if (!PrismMetric.is(prism_metric)) {
9
- throw Error("Invalid input.");
10
- }
11
- this.prism_metric_id = prism_metric.prism_metric_id;
12
- this.prism_id = prism_metric.prism_id;
13
- this.metric_id = prism_metric.metric_id;
14
- this.state_id = prism_metric.state_id;
15
- this.value = prism_metric.value;
16
- }
17
- static is(prism_metric) {
18
- return (prism_metric !== undefined &&
19
- typeof prism_metric.prism_metric_id === "string" &&
20
- typeof prism_metric.prism_id === "string" &&
21
- typeof prism_metric.metric_id === "string" &&
22
- typeof prism_metric.state_id === "string" &&
23
- typeof prism_metric.value === "number");
24
- }
25
- }
@@ -1,7 +0,0 @@
1
- export declare class PrismSubPrism {
2
- readonly prism_id: string;
3
- readonly sub_prism_id: string;
4
- readonly [x: string]: any;
5
- constructor(prism_sub_prism: PrismSubPrism);
6
- static is(prism_sub_prism: any): prism_sub_prism is PrismSubPrism;
7
- }
@@ -1,16 +0,0 @@
1
- export class PrismSubPrism {
2
- prism_id;
3
- sub_prism_id;
4
- constructor(prism_sub_prism) {
5
- if (!PrismSubPrism.is(prism_sub_prism)) {
6
- throw Error("Invalid input.");
7
- }
8
- this.prism_id = prism_sub_prism.prism_id;
9
- this.sub_prism_id = prism_sub_prism.sub_prism_id;
10
- }
11
- static is(prism_sub_prism) {
12
- return (prism_sub_prism !== undefined &&
13
- typeof prism_sub_prism.prism_id === "string" &&
14
- typeof prism_sub_prism.sub_prism_id === "string");
15
- }
16
- }
@@ -1,9 +0,0 @@
1
- export declare class PrismVoter {
2
- readonly prism_voter_id: string;
3
- readonly prism_id: string;
4
- readonly voter_id: string;
5
- readonly state_id: string;
6
- readonly value: number;
7
- constructor(prism_voter: any);
8
- static is(prism_voter: any): prism_voter is PrismVoter;
9
- }
@@ -1,25 +0,0 @@
1
- export class PrismVoter {
2
- prism_voter_id;
3
- prism_id;
4
- voter_id;
5
- state_id;
6
- value;
7
- constructor(prism_voter) {
8
- if (!PrismVoter.is(prism_voter)) {
9
- throw Error("Invalid input.");
10
- }
11
- this.prism_voter_id = prism_voter.prism_voter_id;
12
- this.prism_id = prism_voter.prism_id;
13
- this.voter_id = prism_voter.voter_id;
14
- this.state_id = prism_voter.state_id;
15
- this.value = prism_voter.value;
16
- }
17
- static is(prism_voter) {
18
- return (prism_voter !== undefined &&
19
- typeof prism_voter.prism_voter_id === "string" &&
20
- typeof prism_voter.prism_id === "string" &&
21
- typeof prism_voter.voter_id === "string" &&
22
- typeof prism_voter.state_id === "string" &&
23
- typeof prism_voter.value === "number");
24
- }
25
- }
@@ -1,10 +0,0 @@
1
- export declare class TenantVoterTarget {
2
- readonly tenant_voter_target_id: string;
3
- readonly tenant_id: string;
4
- readonly voter_id: string;
5
- readonly target_id: string;
6
- readonly value: number;
7
- readonly user_id: string;
8
- constructor(tenant_voter_target: any);
9
- static is(tenant_voter_target: any): tenant_voter_target is TenantVoterTarget;
10
- }
@@ -1,47 +0,0 @@
1
- export class TenantVoterTarget {
2
- tenant_voter_target_id;
3
- tenant_id;
4
- voter_id;
5
- target_id;
6
- value;
7
- user_id;
8
- // readonly federal_congress_district_id? : string
9
- // readonly state_legislature_house_district_id? : string
10
- // readonly state_legislature_senate_district_id? : string
11
- // readonly county_id? : string
12
- // readonly school_district_id? : string
13
- // readonly party_type_id : VoterPartyTypeID
14
- constructor(tenant_voter_target) {
15
- if (!TenantVoterTarget.is(tenant_voter_target)) {
16
- throw Error("Invalid input.");
17
- }
18
- this.tenant_voter_target_id = tenant_voter_target.tenant_voter_target_id;
19
- this.tenant_id = tenant_voter_target.tenant_id;
20
- this.voter_id = tenant_voter_target.voter_id;
21
- this.target_id = tenant_voter_target.target_id;
22
- this.value = tenant_voter_target.value;
23
- this.user_id = tenant_voter_target.user_id;
24
- // this.federal_congress_district_id = tenant_voter_target.federal_congress_district_id
25
- // this.state_legislature_house_district_id = tenant_voter_target.state_legislature_house_district_id
26
- // this.state_legislature_senate_district_id = tenant_voter_target.state_legislature_senate_district_id
27
- // this.county_id = tenant_voter_target.county_id
28
- // this.school_district_id = tenant_voter_target.school_district_id
29
- // this.party_type_id = tenant_voter_target.party_type_id
30
- }
31
- static is(tenant_voter_target) {
32
- return (tenant_voter_target !== undefined &&
33
- typeof tenant_voter_target.tenant_voter_target_id === "string" &&
34
- typeof tenant_voter_target.tenant_id === "string" &&
35
- typeof tenant_voter_target.voter_id === "string" &&
36
- typeof tenant_voter_target.target_id === "string" &&
37
- typeof tenant_voter_target.value === "number" &&
38
- typeof tenant_voter_target.user_id === "string" // &&
39
- // (tenant_voter_target.federal_congress_district_id === undefined || typeof tenant_voter_target.federal_congress_district_id === "string") &&
40
- // (tenant_voter_target.state_legislature_house_district_id === undefined || typeof tenant_voter_target.state_legislature_house_district_id === "string") &&
41
- // (tenant_voter_target.state_legislature_senate_district_id === undefined || typeof tenant_voter_target.state_legislature_senate_district_id === "string") &&
42
- // (tenant_voter_target.county_id === undefined || typeof tenant_voter_target.county_id === "string") &&
43
- // (tenant_voter_target.school_district_id === undefined || typeof tenant_voter_target.school_district_id === "string") &&
44
- // is_voter_party_type_id(tenant_voter_target.party_type_id)
45
- );
46
- }
47
- }
@@ -1,7 +0,0 @@
1
- export declare class UserPrism {
2
- readonly user_prism_id: string;
3
- readonly user_id: string;
4
- readonly prism_id: string;
5
- constructor(user_prism: any);
6
- static is(user_prism: any): user_prism is UserPrism;
7
- }
@@ -1,19 +0,0 @@
1
- export class UserPrism {
2
- user_prism_id;
3
- user_id;
4
- prism_id;
5
- constructor(user_prism) {
6
- if (!UserPrism.is(user_prism)) {
7
- throw Error("Invalid input.");
8
- }
9
- this.user_prism_id = user_prism.user_prism_id;
10
- this.user_id = user_prism.user_id;
11
- this.prism_id = user_prism.prism_id;
12
- }
13
- static is(user_prism) {
14
- return (user_prism !== undefined &&
15
- typeof user_prism.user_prism_id === "string" &&
16
- typeof user_prism.user_id === "string" &&
17
- typeof user_prism.prism_id === "string");
18
- }
19
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,45 +0,0 @@
1
- // import { is_state_id, StateID } from "../State.js"
2
- export {};
3
- // export class VoterTurnout {
4
- // readonly voter_turnout_id : string
5
- // readonly voter_id : string
6
- // readonly turnout_id : string
7
- // readonly year : number
8
- // readonly turnout_type_id : string
9
- // readonly value : boolean
10
- // readonly state_id : StateID
11
- // readonly federal_congress_district_id : string
12
- // readonly state_legislature_house_district_id : string
13
- // readonly state_legislature_senate_district_id : string
14
- // constructor(voter_turnout : any) {
15
- // if (!VoterTurnout.is(voter_turnout)) {
16
- // throw Error("Invalid input.")
17
- // }
18
- // this.voter_turnout_id = voter_turnout.voter_turnout_id
19
- // this.voter_id = voter_turnout.voter_id
20
- // this.turnout_id = voter_turnout.turnout_id
21
- // this.year = voter_turnout.year
22
- // this.turnout_type_id = voter_turnout.turnout_type_id
23
- // this.value = voter_turnout.value
24
- // this.state_id = voter_turnout.state_id
25
- // this.state_id = voter_turnout.state_id
26
- // this.federal_congress_district_id = voter_turnout.federal_congress_district_id
27
- // this.state_legislature_house_district_id = voter_turnout.state_legislature_house_district_id
28
- // this.state_legislature_senate_district_id = voter_turnout.state_legislature_senate_district_id
29
- // }
30
- // static is(voter_turnout : any) : voter_turnout is VoterTurnout {
31
- // return (
32
- // voter_turnout !== undefined &&
33
- // typeof voter_turnout.voter_turnout_id === "string" &&
34
- // typeof voter_turnout.voter_id === "string" &&
35
- // typeof voter_turnout.turnout_id === "string" &&
36
- // typeof voter_turnout.year === "number"&&
37
- // typeof voter_turnout.turnout_type_id === "string" &&
38
- // typeof voter_turnout.value === "boolean" &&
39
- // is_state_id(voter_turnout.state_id) &&
40
- // typeof voter_turnout.federal_congress_district_id === "string" &&
41
- // typeof voter_turnout.state_legislature_house_district_id === "string" &&
42
- // typeof voter_turnout.state_legislature_senate_district_id === "string"
43
- // )
44
- // }
45
- // }
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- // export class Vector {
2
- // readonly vector_id : string
3
- // readonly s3_id
4
- // }
5
- export {};
6
- // export class S3Vector {
7
- // readonly s3vector_id : string
8
- // readonly s3vector_bucket_id : string
9
- // readonly s3vector_index_id : string
10
- // readonly s3vector_key : string
11
- // }
@@ -1,9 +0,0 @@
1
- import { StateID } from "../State.js";
2
- export declare class UserStateScore {
3
- readonly user_state_score_id: string;
4
- readonly user_id: string;
5
- readonly state_id: StateID;
6
- readonly score_id: string;
7
- constructor(user_state_score: any);
8
- static is(user_state_score: any): user_state_score is UserStateScore;
9
- }
@@ -1,22 +0,0 @@
1
- export class UserStateScore {
2
- user_state_score_id;
3
- user_id;
4
- state_id;
5
- score_id;
6
- constructor(user_state_score) {
7
- if (!UserStateScore.is(user_state_score)) {
8
- throw Error("Invalid input.");
9
- }
10
- this.user_state_score_id = user_state_score.user_state_score_id;
11
- this.user_id = user_state_score.user_id;
12
- this.state_id = user_state_score.state_id;
13
- this.score_id = user_state_score.score_id;
14
- }
15
- static is(user_state_score) {
16
- return (user_state_score !== undefined &&
17
- typeof user_state_score.user_state_score_id === "string" &&
18
- typeof user_state_score.user_id === "string" &&
19
- typeof user_state_score.state_id === "string" &&
20
- typeof user_state_score.score_id === "string");
21
- }
22
- }
@@ -1,47 +0,0 @@
1
- import { VoterScore } from "./VoterScore.js";
2
- import { VoterTurnout } from "./VoterTurnout.js";
3
- export declare class Voter {
4
- readonly voter_id: string;
5
- readonly state_id: string;
6
- readonly state_voter_id: string;
7
- readonly name_first: string;
8
- readonly name_middle?: string;
9
- readonly name_last: string;
10
- readonly name_suffix?: string;
11
- readonly gender_id: string;
12
- readonly age: number;
13
- readonly birth_date?: string;
14
- readonly address_residence_1: string;
15
- readonly address_residence_2?: string;
16
- readonly address_residence_city: string;
17
- readonly address_residence_state_id: string;
18
- readonly address_residence_zip: string;
19
- readonly address_residence_latitude: number;
20
- readonly address_residence_longitude: number;
21
- readonly address_mail_1: string;
22
- readonly address_mail_2?: string;
23
- readonly address_mail_city: string;
24
- readonly address_mail_state_id: string;
25
- readonly address_mail_zip: string;
26
- readonly occupation_group?: string;
27
- readonly occupation_description?: string;
28
- readonly phone_home?: string;
29
- readonly phone_mobile?: string;
30
- readonly email?: string;
31
- readonly ethnic_group?: string;
32
- readonly ethnic_description?: string;
33
- readonly religion_description?: string;
34
- readonly party_description?: string;
35
- readonly language?: string;
36
- readonly education_level?: string;
37
- readonly marital_status?: string;
38
- readonly [x: string]: any;
39
- constructor(voter: any);
40
- static is(voter: any): voter is Voter;
41
- }
42
- export declare class VoterAux extends Voter {
43
- readonly scores: VoterScore[];
44
- readonly turnouts: VoterTurnout[];
45
- constructor(voter: any);
46
- static is(voter: any): voter is Voter;
47
- }
@@ -1,131 +0,0 @@
1
- import { VoterScore } from "./VoterScore.js";
2
- import { VoterTurnout } from "./VoterTurnout.js";
3
- export class Voter {
4
- voter_id;
5
- state_id;
6
- state_voter_id;
7
- name_first;
8
- name_middle;
9
- name_last;
10
- name_suffix;
11
- gender_id;
12
- age;
13
- birth_date;
14
- address_residence_1;
15
- address_residence_2;
16
- address_residence_city;
17
- address_residence_state_id;
18
- address_residence_zip;
19
- address_residence_latitude;
20
- address_residence_longitude;
21
- address_mail_1;
22
- address_mail_2;
23
- address_mail_city;
24
- address_mail_state_id;
25
- address_mail_zip;
26
- occupation_group;
27
- occupation_description;
28
- phone_home;
29
- phone_mobile;
30
- email;
31
- ethnic_group;
32
- ethnic_description;
33
- religion_description;
34
- party_description;
35
- language;
36
- education_level;
37
- marital_status;
38
- constructor(voter) {
39
- if (!Voter.is(voter)) {
40
- throw Error("Invalid input.");
41
- }
42
- this.voter_id = voter.voter_id;
43
- this.state_id = voter.state_id;
44
- this.state_voter_id = voter.state_voter_id;
45
- this.name_first = voter.name_first;
46
- this.name_middle = voter.name_middle;
47
- this.name_last = voter.name_last;
48
- this.name_suffix = voter.name_suffix;
49
- this.gender_id = voter.gender_id;
50
- this.age = voter.age;
51
- this.birth_date = voter.birth_date;
52
- this.address_residence_1 = voter.address_residence_1;
53
- this.address_residence_2 = voter.address_residence_2;
54
- this.address_residence_city = voter.address_residence_city;
55
- this.address_residence_state_id = voter.address_residence_state_id;
56
- this.address_residence_zip = voter.address_residence_zip;
57
- this.address_residence_latitude = voter.address_residence_latitude;
58
- this.address_residence_longitude = voter.address_residence_longitude;
59
- this.address_mail_1 = voter.address_mail_1;
60
- this.address_mail_2 = voter.address_mail_2;
61
- this.address_mail_city = voter.address_mail_city;
62
- this.address_mail_state_id = voter.address_mail_state_id;
63
- this.address_mail_zip = voter.address_mail_zip;
64
- this.occupation_group = voter.occupation_group;
65
- this.occupation_description = voter.occupation_description;
66
- this.phone_home = voter.phone_home;
67
- this.phone_mobile = voter.phone_mobile;
68
- this.email = voter.email;
69
- this.ethnic_group = voter.ethnic_group;
70
- this.ethnic_description = voter.ethnic_description;
71
- this.religion_description = voter.religion_description;
72
- this.party_description = voter.party_description;
73
- this.language = voter.language;
74
- this.education_level = voter.education_level;
75
- this.marital_status = voter.marital_status;
76
- }
77
- static is(voter) {
78
- return (voter !== undefined &&
79
- typeof voter.voter_id === "string" &&
80
- typeof voter.state_id === "string" &&
81
- typeof voter.state_voter_id === "string" &&
82
- typeof voter.name_first === "string" &&
83
- (voter.name_middle === undefined || typeof voter.name_middle === "string") &&
84
- typeof voter.name_last === "string" &&
85
- (voter.name_suffix === undefined || typeof voter.name_suffix === "string") &&
86
- typeof voter.gender_id === "string" &&
87
- typeof voter.age === "number" && !isNaN(voter.age) &&
88
- (voter.birth_date === undefined || typeof voter.birth_date === "string") &&
89
- typeof voter.address_residence_1 === "string" &&
90
- (voter.address_residence_2 === undefined || typeof voter.address_residence_2 === "string") &&
91
- typeof voter.address_residence_city === "string" &&
92
- typeof voter.address_residence_state_id === "string" &&
93
- typeof voter.address_residence_zip === "string" &&
94
- typeof voter.address_residence_latitude === "number" && !isNaN(voter.address_residence_latitude) &&
95
- typeof voter.address_residence_longitude === "number" && !isNaN(voter.address_residence_longitude) &&
96
- typeof voter.address_mail_1 === "string" &&
97
- (voter.address_mail_2 === undefined || typeof voter.address_mail_2 === "string") &&
98
- typeof voter.address_mail_city === "string" &&
99
- typeof voter.address_mail_state_id === "string" &&
100
- typeof voter.address_mail_zip === "string" &&
101
- (voter.occupation_group === undefined || typeof voter.occupation_group === "string") &&
102
- (voter.occupation_description === undefined || typeof voter.occupation_description === "string") &&
103
- (voter.phone_home === undefined || typeof voter.phone_home === "string") &&
104
- (voter.phone_mobile === undefined || typeof voter.phone_mobile === "string") &&
105
- (voter.email === undefined || typeof voter.email === "string") &&
106
- (voter.ethnic_group === undefined || typeof voter.ethnic_group === "string") &&
107
- (voter.ethnic_description === undefined || typeof voter.ethnic_description === "string") &&
108
- (voter.religion_description === undefined || typeof voter.religion_description === "string") &&
109
- (voter.party_description === undefined || typeof voter.party_description === "string") &&
110
- (voter.language === undefined || typeof voter.language === "string") &&
111
- (voter.education_level === undefined || typeof voter.education_level === "string") &&
112
- (voter.marital_status === undefined || typeof voter.marital_status === "string"));
113
- }
114
- }
115
- export class VoterAux extends Voter {
116
- scores;
117
- turnouts;
118
- constructor(voter) {
119
- if (!VoterAux.is(voter)) {
120
- throw Error("Invalid input.");
121
- }
122
- super(voter);
123
- this.scores = voter.scores;
124
- this.turnouts = voter.turnouts;
125
- }
126
- static is(voter) {
127
- return (Voter.is(voter) &&
128
- Array.isArray(voter.scores) && voter.scores.every(VoterScore.is) &&
129
- Array.isArray(voter.turnouts) && voter.turnouts.every(VoterTurnout.is));
130
- }
131
- }
@@ -1,9 +0,0 @@
1
- export declare class VoterScore {
2
- readonly voter_score_id: string;
3
- readonly voter_id: string;
4
- readonly score_id: string;
5
- readonly state_id: string;
6
- readonly value: number;
7
- constructor(voter_score: any);
8
- static is(voter_score: any): voter_score is VoterScore;
9
- }
@@ -1,25 +0,0 @@
1
- export class VoterScore {
2
- voter_score_id;
3
- voter_id;
4
- score_id;
5
- state_id;
6
- value;
7
- constructor(voter_score) {
8
- if (!VoterScore.is(voter_score)) {
9
- throw Error("Invalid input.");
10
- }
11
- this.voter_score_id = voter_score.voter_score_id;
12
- this.voter_id = voter_score.voter_id;
13
- this.score_id = voter_score.score_id;
14
- this.state_id = voter_score.state_id;
15
- this.value = voter_score.value;
16
- }
17
- static is(voter_score) {
18
- return (voter_score !== undefined &&
19
- typeof voter_score.voter_score_id === "string" &&
20
- typeof voter_score.voter_id === "string" &&
21
- typeof voter_score.score_id === "string" &&
22
- typeof voter_score.state_id === "string" &&
23
- typeof voter_score.value === "number");
24
- }
25
- }
@@ -1,11 +0,0 @@
1
- export declare class VoterTurnout {
2
- readonly voter_turnout_id: string;
3
- readonly voter_id: string;
4
- readonly turnout_id: string;
5
- readonly year: number;
6
- readonly state_id: string;
7
- readonly turnout_type_id: string;
8
- readonly value: boolean;
9
- constructor(voter_turnout: any);
10
- static is(voter_turnout: any): voter_turnout is VoterTurnout;
11
- }
@@ -1,31 +0,0 @@
1
- export class VoterTurnout {
2
- voter_turnout_id;
3
- voter_id;
4
- turnout_id;
5
- year;
6
- state_id;
7
- turnout_type_id;
8
- value;
9
- constructor(voter_turnout) {
10
- if (!VoterTurnout.is(voter_turnout)) {
11
- throw Error("Invalid input.");
12
- }
13
- this.voter_turnout_id = voter_turnout.voter_turnout_id;
14
- this.voter_id = voter_turnout.voter_id;
15
- this.turnout_id = voter_turnout.turnout_id;
16
- this.year = voter_turnout.year;
17
- this.state_id = voter_turnout.state_id;
18
- this.turnout_type_id = voter_turnout.turnout_type_id;
19
- this.value = voter_turnout.value;
20
- }
21
- static is(voter_turnout) {
22
- return (voter_turnout !== undefined &&
23
- typeof voter_turnout.voter_turnout_id === "string" &&
24
- typeof voter_turnout.voter_id === "string" &&
25
- typeof voter_turnout.turnout_id === "string" &&
26
- typeof voter_turnout.year === "number" &&
27
- typeof voter_turnout.state_id === "string" &&
28
- typeof voter_turnout.turnout_type_id === "string" &&
29
- typeof voter_turnout.value === "boolean");
30
- }
31
- }
@@ -1,11 +0,0 @@
1
- export declare class WWWArticle {
2
- readonly www_article_id: string;
3
- readonly url: string;
4
- readonly title?: string;
5
- readonly date?: string;
6
- readonly relevance?: string;
7
- readonly s3_id_html?: string;
8
- readonly s3_id_txt?: string;
9
- constructor(www_article: WWWArticle);
10
- static is(www_article: any): www_article is WWWArticle;
11
- }
@@ -1,31 +0,0 @@
1
- export class WWWArticle {
2
- www_article_id;
3
- url;
4
- title;
5
- date;
6
- relevance;
7
- s3_id_html;
8
- s3_id_txt;
9
- constructor(www_article) {
10
- if (!WWWArticle.is(www_article)) {
11
- throw Error("Invalid input.");
12
- }
13
- this.www_article_id = www_article.www_article_id;
14
- this.url = www_article.url;
15
- this.title = www_article.title;
16
- this.date = www_article.date;
17
- this.relevance = www_article.relevance;
18
- this.s3_id_html = www_article.s3_id_html;
19
- this.s3_id_txt = www_article.s3_id_txt;
20
- }
21
- static is(www_article) {
22
- return (www_article !== undefined &&
23
- typeof www_article.www_article_id === "string" &&
24
- typeof www_article.url === "string" &&
25
- (www_article.title === undefined || typeof www_article.title === "string") &&
26
- (www_article.date === undefined || typeof www_article.date === "string") &&
27
- (www_article.relevance === undefined || typeof www_article.relevance === "string") &&
28
- (www_article.s3_id_html === undefined || typeof www_article.s3_id_html === "string") &&
29
- (www_article.s3_id_txt === undefined || typeof www_article.s3_id_txt === "string"));
30
- }
31
- }
@@ -1,17 +0,0 @@
1
- import { WWWArticle } from "./WWWArticle.js";
2
- export declare class WWWArticleTag {
3
- readonly www_article_id: string;
4
- readonly tag_id: string;
5
- readonly url: string;
6
- readonly date?: string;
7
- readonly relevance?: string;
8
- readonly sentiment?: string;
9
- readonly [x: string]: any;
10
- constructor(www_article_tag: WWWArticleTag);
11
- static is(www_article_tag: any): www_article_tag is WWWArticleTag;
12
- }
13
- export declare class WWWArticleTagAux extends WWWArticleTag {
14
- readonly www_article: WWWArticle;
15
- constructor(www_article_tag: any);
16
- static is(www_article_tag: any): www_article_tag is WWWArticleTagAux;
17
- }
@@ -1,43 +0,0 @@
1
- import { WWWArticle } from "./WWWArticle.js";
2
- export class WWWArticleTag {
3
- www_article_id;
4
- tag_id;
5
- url;
6
- date;
7
- relevance;
8
- sentiment;
9
- constructor(www_article_tag) {
10
- if (!WWWArticleTag.is(www_article_tag)) {
11
- throw Error("Invalid input.");
12
- }
13
- this.www_article_id = www_article_tag.www_article_id;
14
- this.tag_id = www_article_tag.tag_id;
15
- this.url = www_article_tag.url;
16
- this.date = www_article_tag.date;
17
- this.relevance = www_article_tag.relevance;
18
- this.sentiment = www_article_tag.sentiment;
19
- }
20
- static is(www_article_tag) {
21
- return (www_article_tag !== undefined &&
22
- typeof www_article_tag.www_article_id === "string" &&
23
- typeof www_article_tag.tag_id === "string" &&
24
- typeof www_article_tag.url === "string" &&
25
- (www_article_tag.date === undefined || typeof www_article_tag.date === "string") &&
26
- (www_article_tag.relevance === undefined || typeof www_article_tag.relevance === "string") &&
27
- (www_article_tag.sentiment === undefined || typeof www_article_tag.sentiment === "string"));
28
- }
29
- }
30
- export class WWWArticleTagAux extends WWWArticleTag {
31
- www_article;
32
- constructor(www_article_tag) {
33
- if (!WWWArticleTagAux.is(www_article_tag)) {
34
- throw Error("Invalid input.");
35
- }
36
- super(www_article_tag);
37
- this.www_article = www_article_tag.www_article;
38
- }
39
- static is(www_article_tag) {
40
- return (WWWArticleTag.is(www_article_tag) &&
41
- WWWArticle.is(www_article_tag.www_article));
42
- }
43
- }