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,12 +1,12 @@
|
|
|
1
1
|
import { FederalCongressBillDocument } from "../federal_congress/FederalCongressBillDocument.js";
|
|
2
2
|
import { LegistarDocument } from "../legistar/LegistarDocument.js";
|
|
3
|
-
import {
|
|
3
|
+
import { WebArticleTag } from "../web/WebArticleTag.js";
|
|
4
4
|
import { ScoutDocument } from "../scout/ScoutDocument.js";
|
|
5
5
|
import { TwitterTweet } from "../twitter/TwitterTweet.js";
|
|
6
6
|
declare const fragment_type_ids: readonly ["LINE", "CHAR"];
|
|
7
7
|
export type FragmentTypeID = typeof fragment_type_ids[number];
|
|
8
8
|
export declare function is_fragment_type_id(fragment_type_id: any): fragment_type_id is FragmentTypeID;
|
|
9
|
-
declare const document_type_ids: readonly ["federal_congress_bill_document", "legistar_document", "
|
|
9
|
+
declare const document_type_ids: readonly ["federal_congress_bill_document", "legistar_document", "web_article_tag", "scout_document", "twitter_tweet"];
|
|
10
10
|
export type DocumentTypeID = typeof document_type_ids[number];
|
|
11
11
|
export declare function is_document_type_id(document_type_id: any): document_type_id is DocumentTypeID;
|
|
12
12
|
export declare class Fragment {
|
|
@@ -25,7 +25,7 @@ export declare class Fragment {
|
|
|
25
25
|
export declare class FragmentAux extends Fragment {
|
|
26
26
|
readonly federal_congress_bill_document?: FederalCongressBillDocument;
|
|
27
27
|
readonly legistar_document?: LegistarDocument;
|
|
28
|
-
readonly
|
|
28
|
+
readonly web_article_tag?: WebArticleTag;
|
|
29
29
|
readonly scout_document?: ScoutDocument;
|
|
30
30
|
readonly twitter_tweet?: TwitterTweet;
|
|
31
31
|
constructor(fragment: FragmentAux);
|
|
@@ -43,12 +43,12 @@ export declare class LegistarDocumentFragment extends Fragment {
|
|
|
43
43
|
constructor(fragment: LegistarDocumentFragment);
|
|
44
44
|
static is(fragment: any): fragment is LegistarDocumentFragment;
|
|
45
45
|
}
|
|
46
|
-
export declare class
|
|
47
|
-
readonly document_type_id: "
|
|
48
|
-
readonly
|
|
46
|
+
export declare class WebArticleTagFragment extends Fragment {
|
|
47
|
+
readonly document_type_id: "web_article_tag";
|
|
48
|
+
readonly web_article_id: string;
|
|
49
49
|
readonly tag_id: string;
|
|
50
|
-
constructor(fragment:
|
|
51
|
-
static is(fragment: any): fragment is
|
|
50
|
+
constructor(fragment: WebArticleTagFragment);
|
|
51
|
+
static is(fragment: any): fragment is WebArticleTagFragment;
|
|
52
52
|
}
|
|
53
53
|
export declare class ScoutDocumentFragment extends Fragment {
|
|
54
54
|
readonly document_type_id: "scout_document";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FederalCongressBillDocument } from "../federal_congress/FederalCongressBillDocument.js";
|
|
2
2
|
import { LegistarDocument } from "../legistar/LegistarDocument.js";
|
|
3
|
-
import {
|
|
3
|
+
import { WebArticleTag } from "../web/WebArticleTag.js";
|
|
4
4
|
import { ScoutDocument } from "../scout/ScoutDocument.js";
|
|
5
5
|
import { TwitterTweet } from "../twitter/TwitterTweet.js";
|
|
6
6
|
const fragment_type_ids = ["LINE", "CHAR"];
|
|
7
7
|
export function is_fragment_type_id(fragment_type_id) {
|
|
8
8
|
return fragment_type_ids.includes(fragment_type_id);
|
|
9
9
|
}
|
|
10
|
-
const document_type_ids = ["federal_congress_bill_document", "legistar_document", "
|
|
10
|
+
const document_type_ids = ["federal_congress_bill_document", "legistar_document", "web_article_tag", "scout_document", "twitter_tweet"];
|
|
11
11
|
export function is_document_type_id(document_type_id) {
|
|
12
12
|
return document_type_ids.includes(document_type_id);
|
|
13
13
|
}
|
|
@@ -48,7 +48,7 @@ export class Fragment {
|
|
|
48
48
|
export class FragmentAux extends Fragment {
|
|
49
49
|
federal_congress_bill_document;
|
|
50
50
|
legistar_document;
|
|
51
|
-
|
|
51
|
+
web_article_tag;
|
|
52
52
|
scout_document;
|
|
53
53
|
twitter_tweet;
|
|
54
54
|
constructor(fragment) {
|
|
@@ -58,7 +58,7 @@ export class FragmentAux extends Fragment {
|
|
|
58
58
|
super(fragment);
|
|
59
59
|
this.federal_congress_bill_document = fragment.federal_congress_bill_document;
|
|
60
60
|
this.legistar_document = fragment.legistar_document;
|
|
61
|
-
this.
|
|
61
|
+
this.web_article_tag = fragment.web_article_tag;
|
|
62
62
|
this.scout_document = fragment.scout_document;
|
|
63
63
|
this.twitter_tweet = fragment.twitter_tweet;
|
|
64
64
|
}
|
|
@@ -66,7 +66,7 @@ export class FragmentAux extends Fragment {
|
|
|
66
66
|
return (Fragment.is(fragment) &&
|
|
67
67
|
(fragment.federal_congress_bill_document === undefined || FederalCongressBillDocument.is(fragment.federal_congress_bill_document)) &&
|
|
68
68
|
(fragment.legistar_document === undefined || LegistarDocument.is(fragment.legistar_document)) &&
|
|
69
|
-
(fragment.
|
|
69
|
+
(fragment.web_article_tag === undefined || WebArticleTag.is(fragment.web_article_tag)) &&
|
|
70
70
|
(fragment.scout_document === undefined || ScoutDocument.is(fragment.scout_document)) &&
|
|
71
71
|
(fragment.twitter_tweet === undefined || TwitterTweet.is(fragment.twitter_tweet)));
|
|
72
72
|
}
|
|
@@ -105,36 +105,36 @@ export class LegistarDocumentFragment extends Fragment {
|
|
|
105
105
|
typeof fragment.legistar_document_id === "string");
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
export class
|
|
108
|
+
export class WebArticleTagFragment extends Fragment {
|
|
109
109
|
document_type_id;
|
|
110
|
-
|
|
110
|
+
web_article_id;
|
|
111
111
|
tag_id;
|
|
112
112
|
constructor(fragment) {
|
|
113
|
-
if (!
|
|
113
|
+
if (!WebArticleTagFragment.is(fragment)) {
|
|
114
114
|
throw Error("Invalid input.");
|
|
115
115
|
}
|
|
116
116
|
super(fragment);
|
|
117
117
|
this.document_type_id = fragment.document_type_id;
|
|
118
|
-
this.
|
|
118
|
+
this.web_article_id = fragment.web_article_id;
|
|
119
119
|
this.tag_id = fragment.tag_id;
|
|
120
120
|
}
|
|
121
121
|
static is(fragment) {
|
|
122
122
|
return (Fragment.is(fragment) &&
|
|
123
|
-
fragment.document_type_id === "
|
|
124
|
-
typeof fragment.
|
|
123
|
+
fragment.document_type_id === "web_article_tag" &&
|
|
124
|
+
typeof fragment.web_article_id === "string" &&
|
|
125
125
|
typeof fragment.tag_id === "string");
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
// export class
|
|
129
|
-
// readonly
|
|
130
|
-
// constructor(fragment :
|
|
131
|
-
// if (!
|
|
128
|
+
// export class WebArticleTagFragmentAux extends WebArticleTagFragment {
|
|
129
|
+
// readonly web_article_ : WebArticleTagAux
|
|
130
|
+
// constructor(fragment : WebArticleTagFragmentAux) {
|
|
131
|
+
// if (!WebArticleTagFragmentAux.is(fragment)) {
|
|
132
132
|
// throw Error("Invalid input.")
|
|
133
133
|
// }
|
|
134
134
|
// super(fragment)
|
|
135
135
|
// this.scout_document = fragment.scout_document
|
|
136
136
|
// }
|
|
137
|
-
// static is(fragment : any) : fragment is
|
|
137
|
+
// static is(fragment : any) : fragment is WebArticleTagFragmentAux {
|
|
138
138
|
// return (
|
|
139
139
|
// Fragment.is(fragment) &&
|
|
140
140
|
// ScoutDocument.is(fragment.scout_document)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FederalCongressBillDocument } from "../federal_congress/FederalCongressBillDocument"
|
|
2
2
|
import { LegistarDocument } from "../legistar/LegistarDocument"
|
|
3
|
-
import {
|
|
3
|
+
import { WebArticleTag, WebArticleTagAux } from "../web/WebArticleTag"
|
|
4
4
|
import { ScoutDocument } from "../scout/ScoutDocument"
|
|
5
5
|
import { TwitterTweet } from "../twitter/TwitterTweet"
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ export function is_fragment_type_id(fragment_type_id : any) : fragment_type_id i
|
|
|
12
12
|
return fragment_type_ids.includes(fragment_type_id)
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const document_type_ids = ["federal_congress_bill_document", "legistar_document", "
|
|
15
|
+
const document_type_ids = ["federal_congress_bill_document", "legistar_document", "web_article_tag", "scout_document", "twitter_tweet"] as const
|
|
16
16
|
|
|
17
17
|
export type DocumentTypeID = typeof document_type_ids[number]
|
|
18
18
|
|
|
@@ -63,7 +63,7 @@ export class Fragment {
|
|
|
63
63
|
export class FragmentAux extends Fragment {
|
|
64
64
|
readonly federal_congress_bill_document? : FederalCongressBillDocument
|
|
65
65
|
readonly legistar_document? : LegistarDocument
|
|
66
|
-
readonly
|
|
66
|
+
readonly web_article_tag? : WebArticleTag
|
|
67
67
|
readonly scout_document? : ScoutDocument
|
|
68
68
|
readonly twitter_tweet? : TwitterTweet
|
|
69
69
|
|
|
@@ -74,7 +74,7 @@ export class FragmentAux extends Fragment {
|
|
|
74
74
|
super(fragment)
|
|
75
75
|
this.federal_congress_bill_document = fragment.federal_congress_bill_document
|
|
76
76
|
this.legistar_document = fragment.legistar_document
|
|
77
|
-
this.
|
|
77
|
+
this.web_article_tag = fragment.web_article_tag
|
|
78
78
|
this.scout_document = fragment.scout_document
|
|
79
79
|
this.twitter_tweet = fragment.twitter_tweet
|
|
80
80
|
}
|
|
@@ -84,7 +84,7 @@ export class FragmentAux extends Fragment {
|
|
|
84
84
|
Fragment.is(fragment) &&
|
|
85
85
|
(fragment.federal_congress_bill_document === undefined || FederalCongressBillDocument.is(fragment.federal_congress_bill_document)) &&
|
|
86
86
|
(fragment.legistar_document === undefined || LegistarDocument.is(fragment.legistar_document)) &&
|
|
87
|
-
(fragment.
|
|
87
|
+
(fragment.web_article_tag === undefined || WebArticleTag.is(fragment.web_article_tag)) &&
|
|
88
88
|
(fragment.scout_document === undefined || ScoutDocument.is(fragment.scout_document)) &&
|
|
89
89
|
(fragment.twitter_tweet === undefined || TwitterTweet.is(fragment.twitter_tweet))
|
|
90
90
|
)
|
|
@@ -135,43 +135,43 @@ export class LegistarDocumentFragment extends Fragment {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
export class
|
|
139
|
-
readonly document_type_id : "
|
|
140
|
-
readonly
|
|
138
|
+
export class WebArticleTagFragment extends Fragment {
|
|
139
|
+
readonly document_type_id : "web_article_tag"
|
|
140
|
+
readonly web_article_id : string
|
|
141
141
|
readonly tag_id : string
|
|
142
142
|
|
|
143
|
-
constructor(fragment :
|
|
144
|
-
if (!
|
|
143
|
+
constructor(fragment : WebArticleTagFragment) {
|
|
144
|
+
if (!WebArticleTagFragment.is(fragment)) {
|
|
145
145
|
throw Error("Invalid input.")
|
|
146
146
|
}
|
|
147
147
|
super(fragment)
|
|
148
148
|
this.document_type_id = fragment.document_type_id
|
|
149
|
-
this.
|
|
149
|
+
this.web_article_id = fragment.web_article_id
|
|
150
150
|
this.tag_id = fragment.tag_id
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
static is(fragment : any) : fragment is
|
|
153
|
+
static is(fragment : any) : fragment is WebArticleTagFragment {
|
|
154
154
|
return (
|
|
155
155
|
Fragment.is(fragment) &&
|
|
156
|
-
fragment.document_type_id === "
|
|
157
|
-
typeof fragment.
|
|
156
|
+
fragment.document_type_id === "web_article_tag" &&
|
|
157
|
+
typeof fragment.web_article_id === "string" &&
|
|
158
158
|
typeof fragment.tag_id === "string"
|
|
159
159
|
)
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
// export class
|
|
164
|
-
// readonly
|
|
163
|
+
// export class WebArticleTagFragmentAux extends WebArticleTagFragment {
|
|
164
|
+
// readonly web_article_ : WebArticleTagAux
|
|
165
165
|
|
|
166
|
-
// constructor(fragment :
|
|
167
|
-
// if (!
|
|
166
|
+
// constructor(fragment : WebArticleTagFragmentAux) {
|
|
167
|
+
// if (!WebArticleTagFragmentAux.is(fragment)) {
|
|
168
168
|
// throw Error("Invalid input.")
|
|
169
169
|
// }
|
|
170
170
|
// super(fragment)
|
|
171
171
|
// this.scout_document = fragment.scout_document
|
|
172
172
|
// }
|
|
173
173
|
|
|
174
|
-
// static is(fragment : any) : fragment is
|
|
174
|
+
// static is(fragment : any) : fragment is WebArticleTagFragmentAux {
|
|
175
175
|
// return (
|
|
176
176
|
// Fragment.is(fragment) &&
|
|
177
177
|
// ScoutDocument.is(fragment.scout_document)
|
|
@@ -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
|
-
}
|
package/dist/src/types/County.js
DELETED
|
@@ -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>;
|
package/dist/src/types/State.js
DELETED
|
@@ -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
|
-
};
|
package/dist/src/types/User.d.ts
DELETED
|
@@ -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
|
-
}
|
package/dist/src/types/User.js
DELETED
|
@@ -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 {};
|