elections-types 1.0.55 → 1.0.57

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.
@@ -19,7 +19,7 @@ export declare class Candidate {
19
19
  readonly party_id?: string;
20
20
  readonly active?: boolean;
21
21
  readonly status?: string;
22
- readonly file_number?: number;
22
+ readonly fec_file_id?: number;
23
23
  readonly committee_ids?: string[];
24
24
  readonly principal_committee_ids?: string[];
25
25
  readonly authorized_committee_ids?: string[];
@@ -31,7 +31,7 @@ export class Candidate {
31
31
  party_id;
32
32
  active;
33
33
  status;
34
- file_number;
34
+ fec_file_id;
35
35
  committee_ids;
36
36
  principal_committee_ids;
37
37
  authorized_committee_ids;
@@ -54,7 +54,7 @@ export class Candidate {
54
54
  this.party_id = candidate.party_id;
55
55
  this.active = candidate.active;
56
56
  this.status = candidate.status;
57
- this.file_number = candidate.file_number;
57
+ this.fec_file_id = candidate.fec_file_id;
58
58
  this.committee_ids = candidate.committee_ids;
59
59
  this.principal_committee_ids = candidate.principal_committee_ids;
60
60
  this.authorized_committee_ids = candidate.authorized_committee_ids;
@@ -76,7 +76,7 @@ export class Candidate {
76
76
  (candidate.party_id === undefined || typeof candidate.party_id === "string") &&
77
77
  (candidate.active === undefined || typeof candidate.active === "boolean") &&
78
78
  (candidate.status === undefined || typeof candidate.status === "string") &&
79
- (candidate.file_number === undefined || typeof candidate.file_number === "number") &&
79
+ (candidate.fec_file_id === undefined || typeof candidate.fec_file_id === "number" && !isNaN(candidate.fec_file_id)) &&
80
80
  (candidate.committee_ids === undefined || Array.isArray(candidate.committee_ids) && candidate.committee_ids.map((committee_id) => typeof committee_id === "string")) &&
81
81
  (candidate.principal_committee_ids === undefined || Array.isArray(candidate.principal_committee_ids) && candidate.principal_committee_ids.map((committee_id) => typeof committee_id === "string")) &&
82
82
  (candidate.authorized_committee_ids === undefined || Array.isArray(candidate.authorized_committee_ids) && candidate.authorized_committee_ids.map((committee_id) => typeof committee_id === "string")) &&
@@ -91,6 +91,7 @@ export class Candidate {
91
91
  export class CandidateAux extends Candidate {
92
92
  committees;
93
93
  fec_reports;
94
+ // readonly fec_f3_files : FEC
94
95
  constructor(candidate) {
95
96
  if (!CandidateAux.is(candidate)) {
96
97
  throw Error("Invalid input.");
@@ -8,7 +8,7 @@ export declare class Committee {
8
8
  readonly name: string;
9
9
  readonly url?: string;
10
10
  readonly designation?: CommitteeDesignation;
11
- readonly file_number?: number;
11
+ readonly fec_file_id?: number;
12
12
  readonly principal_committee_ids?: string[];
13
13
  readonly authorized_committee_ids?: string[];
14
14
  readonly sponsor_committee_ids?: string[];
@@ -9,7 +9,7 @@ export class Committee {
9
9
  name;
10
10
  url;
11
11
  designation;
12
- file_number;
12
+ fec_file_id;
13
13
  principal_committee_ids;
14
14
  authorized_committee_ids;
15
15
  sponsor_committee_ids;
@@ -26,7 +26,7 @@ export class Committee {
26
26
  this.name = committee.name;
27
27
  this.url = committee.url;
28
28
  this.designation = committee.designation;
29
- this.file_number = committee.file_number;
29
+ this.fec_file_id = committee.fec_file_id;
30
30
  this.principal_committee_ids = committee.principal_committee_ids;
31
31
  this.authorized_committee_ids = committee.authorized_committee_ids;
32
32
  this.sponsor_committee_ids = committee.sponsor_committee_ids;
@@ -42,7 +42,7 @@ export class Committee {
42
42
  typeof committee.name === "string" &&
43
43
  (committee.url === undefined || typeof committee.url === "string") &&
44
44
  (committee.designation === undefined || is_committee_designation(committee.designation)) &&
45
- (committee.file_number === undefined || typeof committee.file_number === "number" && !isNaN(committee.file_number)) &&
45
+ (committee.fec_file_id === undefined || typeof committee.fec_file_id === "number" && !isNaN(committee.fec_file_id)) &&
46
46
  (committee.principal_committee_ids === undefined || Array.isArray(committee.principal_committee_ids) && committee.principal_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
47
47
  (committee.authorized_committee_ids === undefined || Array.isArray(committee.authorized_committee_ids) && committee.authorized_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
48
48
  (committee.sponsor_committee_ids === undefined || Array.isArray(committee.sponsor_committee_ids) && committee.sponsor_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
@@ -27,7 +27,7 @@ export interface ElectionsConfig extends ElectionsUtilsConfig {
27
27
  dynamodb_candidate_tweets: string;
28
28
  dynamodb_videos: string;
29
29
  dynamodb_candidate_videos: string;
30
- dynamodb_fec_reports: string;
30
+ dynamodb_fec_files: string;
31
31
  dynamodb_federal_donations: string;
32
32
  dynamodb_fetch_history: string;
33
33
  s3_bucket: string;
@@ -5,7 +5,7 @@ export declare class FederalDonation {
5
5
  readonly sub_id: string;
6
6
  readonly committee_id: string;
7
7
  readonly target_committee_id?: string;
8
- readonly file_number: number;
8
+ readonly fec_file_id: number;
9
9
  readonly image_number: string;
10
10
  readonly amount: number;
11
11
  readonly donor_id?: string;
@@ -4,7 +4,7 @@ export class FederalDonation {
4
4
  sub_id;
5
5
  committee_id;
6
6
  target_committee_id;
7
- file_number;
7
+ fec_file_id;
8
8
  image_number;
9
9
  amount;
10
10
  donor_id;
@@ -32,7 +32,7 @@ export class FederalDonation {
32
32
  this.sub_id = federal_donation.sub_id;
33
33
  this.committee_id = federal_donation.committee_id;
34
34
  this.target_committee_id = federal_donation.target_committee_id;
35
- this.file_number = federal_donation.file_number;
35
+ this.fec_file_id = federal_donation.fec_file_id;
36
36
  this.image_number = federal_donation.image_number;
37
37
  this.amount = federal_donation.amount;
38
38
  this.donor_id = federal_donation.donor_id;
@@ -59,7 +59,7 @@ export class FederalDonation {
59
59
  typeof federal_donation.sub_id === "string" &&
60
60
  typeof federal_donation.committee_id === "string" &&
61
61
  (federal_donation.target_committee_id === undefined || typeof federal_donation.target_committee_id === "string") &&
62
- typeof federal_donation.file_number === "number" && !isNaN(federal_donation.file_number) &&
62
+ typeof federal_donation.fec_file_id === "number" && !isNaN(federal_donation.fec_file_id) &&
63
63
  typeof federal_donation.image_number === "string" &&
64
64
  typeof federal_donation.amount === "number" && !isNaN(federal_donation.amount) &&
65
65
  (federal_donation.donor_id === undefined || typeof federal_donation.donor_id === "string") &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elections-types",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -37,7 +37,7 @@ export class Candidate {
37
37
  readonly party_id? : string
38
38
  readonly active? : boolean
39
39
  readonly status? : string
40
- readonly file_number? : number
40
+ readonly fec_file_id? : number
41
41
  readonly committee_ids? : string[]
42
42
  readonly principal_committee_ids? : string[]
43
43
  readonly authorized_committee_ids? : string[]
@@ -65,7 +65,7 @@ export class Candidate {
65
65
  this.party_id = candidate.party_id
66
66
  this.active = candidate.active
67
67
  this.status = candidate.status
68
- this.file_number = candidate.file_number
68
+ this.fec_file_id = candidate.fec_file_id
69
69
  this.committee_ids = candidate.committee_ids
70
70
  this.principal_committee_ids = candidate.principal_committee_ids
71
71
  this.authorized_committee_ids = candidate.authorized_committee_ids
@@ -89,7 +89,7 @@ export class Candidate {
89
89
  (candidate.party_id === undefined || typeof candidate.party_id === "string") &&
90
90
  (candidate.active === undefined || typeof candidate.active === "boolean") &&
91
91
  (candidate.status === undefined || typeof candidate.status === "string") &&
92
- (candidate.file_number === undefined || typeof candidate.file_number === "number") &&
92
+ (candidate.fec_file_id === undefined || typeof candidate.fec_file_id === "number" && !isNaN(candidate.fec_file_id)) &&
93
93
  (candidate.committee_ids === undefined || Array.isArray(candidate.committee_ids) && candidate.committee_ids.map((committee_id : any) => typeof committee_id === "string")) &&
94
94
  (candidate.principal_committee_ids === undefined || Array.isArray(candidate.principal_committee_ids) && candidate.principal_committee_ids.map((committee_id : any) => typeof committee_id === "string")) &&
95
95
  (candidate.authorized_committee_ids === undefined || Array.isArray(candidate.authorized_committee_ids) && candidate.authorized_committee_ids.map((committee_id : any) => typeof committee_id === "string")) &&
@@ -106,6 +106,7 @@ export class Candidate {
106
106
  export class CandidateAux extends Candidate {
107
107
  readonly committees : CommitteeAux[]
108
108
  readonly fec_reports : FECReport[]
109
+ // readonly fec_f3_files : FEC
109
110
 
110
111
  constructor(candidate : any) {
111
112
  if (!CandidateAux.is(candidate)) {
@@ -14,7 +14,7 @@ export class Committee {
14
14
  readonly name : string
15
15
  readonly url? : string
16
16
  readonly designation? : CommitteeDesignation
17
- readonly file_number? : number
17
+ readonly fec_file_id? : number
18
18
  readonly principal_committee_ids? : string[]
19
19
  readonly authorized_committee_ids? : string[]
20
20
  readonly sponsor_committee_ids? : string[]
@@ -33,7 +33,7 @@ export class Committee {
33
33
  this.name = committee.name
34
34
  this.url = committee.url
35
35
  this.designation = committee.designation
36
- this.file_number = committee.file_number
36
+ this.fec_file_id = committee.fec_file_id
37
37
  this.principal_committee_ids = committee.principal_committee_ids
38
38
  this.authorized_committee_ids = committee.authorized_committee_ids
39
39
  this.sponsor_committee_ids = committee.sponsor_committee_ids
@@ -51,7 +51,7 @@ export class Committee {
51
51
  typeof committee.name === "string" &&
52
52
  (committee.url === undefined || typeof committee.url === "string") &&
53
53
  (committee.designation === undefined || is_committee_designation(committee.designation)) &&
54
- (committee.file_number === undefined || typeof committee.file_number === "number" && !isNaN(committee.file_number)) &&
54
+ (committee.fec_file_id === undefined || typeof committee.fec_file_id === "number" && !isNaN(committee.fec_file_id)) &&
55
55
  (committee.principal_committee_ids === undefined || Array.isArray(committee.principal_committee_ids) && committee.principal_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
56
56
  (committee.authorized_committee_ids === undefined || Array.isArray(committee.authorized_committee_ids) && committee.authorized_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
57
57
  (committee.sponsor_committee_ids === undefined || Array.isArray(committee.sponsor_committee_ids) && committee.sponsor_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
@@ -29,7 +29,7 @@ export interface ElectionsConfig extends ElectionsUtilsConfig {
29
29
  dynamodb_candidate_tweets : string,
30
30
  dynamodb_videos : string,
31
31
  dynamodb_candidate_videos : string,
32
- dynamodb_fec_reports : string,
32
+ dynamodb_fec_files : string,
33
33
  dynamodb_federal_donations : string,
34
34
  dynamodb_fetch_history : string,
35
35
  s3_bucket : string
@@ -6,7 +6,7 @@ export class FederalDonation {
6
6
  readonly sub_id : string
7
7
  readonly committee_id : string
8
8
  readonly target_committee_id? : string
9
- readonly file_number : number
9
+ readonly fec_file_id : number
10
10
  readonly image_number : string
11
11
  readonly amount : number
12
12
  readonly donor_id? : string
@@ -35,7 +35,7 @@ export class FederalDonation {
35
35
  this.sub_id = federal_donation.sub_id
36
36
  this.committee_id = federal_donation.committee_id
37
37
  this.target_committee_id = federal_donation.target_committee_id
38
- this.file_number = federal_donation.file_number
38
+ this.fec_file_id = federal_donation.fec_file_id
39
39
  this.image_number = federal_donation.image_number
40
40
  this.amount = federal_donation.amount
41
41
  this.donor_id = federal_donation.donor_id
@@ -64,7 +64,7 @@ export class FederalDonation {
64
64
  typeof federal_donation.sub_id === "string" &&
65
65
  typeof federal_donation.committee_id === "string" &&
66
66
  (federal_donation.target_committee_id === undefined || typeof federal_donation.target_committee_id === "string") &&
67
- typeof federal_donation.file_number === "number" && !isNaN(federal_donation.file_number) &&
67
+ typeof federal_donation.fec_file_id === "number" && !isNaN(federal_donation.fec_file_id) &&
68
68
  typeof federal_donation.image_number === "string" &&
69
69
  typeof federal_donation.amount === "number" && !isNaN(federal_donation.amount) &&
70
70
  (federal_donation.donor_id === undefined || typeof federal_donation.donor_id === "string") &&