triangle-types 1.0.207 → 1.0.209
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/types/fragments/Fragment.d.ts +8 -8
- package/dist/src/types/fragments/Fragment.js +16 -16
- package/package.json +1 -1
- package/src/types/fragments/Fragment.ts +19 -19
- package/dist/src/types/APIError.d.ts +0 -4
- package/dist/src/types/APIError.js +0 -19
- package/dist/src/types/County.d.ts +0 -8
- package/dist/src/types/County.js +0 -25
- package/dist/src/types/SchoolDistrict.d.ts +0 -10
- package/dist/src/types/SchoolDistrict.js +0 -26
- package/dist/src/types/State.d.ts +0 -8
- package/dist/src/types/State.js +0 -210
- package/dist/src/types/User.d.ts +0 -10
- package/dist/src/types/User.js +0 -29
- package/dist/src/types/federal_census/FederalCensusCity.d.ts +0 -11
- package/dist/src/types/federal_census/FederalCensusCity.js +0 -29
- package/dist/src/types/jurisdiction/Jurisdiction.d.ts +0 -1
- package/dist/src/types/jurisdiction/Jurisdiction.js +0 -21
- package/dist/src/types/prism/PrismMetric.d.ts +0 -9
- package/dist/src/types/prism/PrismMetric.js +0 -25
- package/dist/src/types/prism/PrismSubPrism.d.ts +0 -7
- package/dist/src/types/prism/PrismSubPrism.js +0 -16
- package/dist/src/types/prism/PrismVoter.d.ts +0 -9
- package/dist/src/types/prism/PrismVoter.js +0 -25
- package/dist/src/types/prism/TenantVoterTarget.d.ts +0 -10
- package/dist/src/types/prism/TenantVoterTarget.js +0 -47
- package/dist/src/types/prism/UserPrism.d.ts +0 -7
- package/dist/src/types/prism/UserPrism.js +0 -19
- package/dist/src/types/prism/VoterTurnout.d.ts +0 -1
- package/dist/src/types/prism/VoterTurnout.js +0 -45
- package/dist/src/types/vectors/S3Vector.d.ts +0 -1
- package/dist/src/types/vectors/S3Vector.js +0 -11
- package/dist/src/types/voters/UserStateScore.d.ts +0 -9
- package/dist/src/types/voters/UserStateScore.js +0 -22
- package/dist/src/types/voters/Voter.d.ts +0 -47
- package/dist/src/types/voters/Voter.js +0 -131
- package/dist/src/types/voters/VoterScore.d.ts +0 -9
- package/dist/src/types/voters/VoterScore.js +0 -25
- package/dist/src/types/voters/VoterTurnout.d.ts +0 -11
- package/dist/src/types/voters/VoterTurnout.js +0 -31
- package/dist/src/types/www/WWWArticle.d.ts +0 -11
- package/dist/src/types/www/WWWArticle.js +0 -31
- package/dist/src/types/www/WWWArticleTag.d.ts +0 -17
- package/dist/src/types/www/WWWArticleTag.js +0 -43
- package/src/types/press/PressArticle.ts +0 -38
- package/src/types/press/PressArticleTag.ts +0 -54
|
@@ -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,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,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
|
-
}
|