elections-types 1.0.86 → 1.0.88
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/Candidate.d.ts +1 -1
- package/dist/src/types/Candidate.js +5 -5
- package/dist/src/types/Committee.d.ts +1 -1
- package/dist/src/types/Committee.js +7 -7
- package/dist/src/types/Expenditure.d.ts +1 -1
- package/dist/src/types/Expenditure.js +3 -3
- package/package.json +1 -1
- package/src/types/Candidate.ts +5 -5
- package/src/types/Committee.ts +7 -7
- package/src/types/Expenditure.ts +3 -3
|
@@ -31,7 +31,7 @@ export declare class Candidate {
|
|
|
31
31
|
}
|
|
32
32
|
export declare class CandidateAux extends Candidate {
|
|
33
33
|
readonly committees: CommitteeAux[];
|
|
34
|
-
readonly
|
|
34
|
+
readonly federal_election_f3_files: FederalElectionF3File[];
|
|
35
35
|
readonly expenditures: ExpenditureAux[];
|
|
36
36
|
constructor(candidate: any);
|
|
37
37
|
static is(candidate: any): candidate is CandidateAux;
|
|
@@ -76,7 +76,7 @@ export class Candidate {
|
|
|
76
76
|
}
|
|
77
77
|
export class CandidateAux extends Candidate {
|
|
78
78
|
committees;
|
|
79
|
-
|
|
79
|
+
federal_election_f3_files;
|
|
80
80
|
expenditures;
|
|
81
81
|
constructor(candidate) {
|
|
82
82
|
if (!CandidateAux.is(candidate)) {
|
|
@@ -84,15 +84,15 @@ export class CandidateAux extends Candidate {
|
|
|
84
84
|
}
|
|
85
85
|
super(candidate);
|
|
86
86
|
this.committees = candidate.committees;
|
|
87
|
-
this.
|
|
88
|
-
this.expenditures = candidate.expenditures
|
|
87
|
+
this.federal_election_f3_files = candidate.federal_election_f3_files;
|
|
88
|
+
this.expenditures = candidate.expenditures;
|
|
89
89
|
}
|
|
90
90
|
static is(candidate) {
|
|
91
91
|
return (Candidate.is(candidate) &&
|
|
92
92
|
Array.isArray(candidate.committees) &&
|
|
93
93
|
candidate.committees.every(CommitteeAux.is) &&
|
|
94
|
-
Array.isArray(candidate.
|
|
95
|
-
candidate.
|
|
94
|
+
Array.isArray(candidate.federal_election_f3_files) &&
|
|
95
|
+
candidate.federal_election_f3_files.every(FederalElectionF3File.is) &&
|
|
96
96
|
Array.isArray(candidate.expenditures) &&
|
|
97
97
|
candidate.expenditures.every(ExpenditureAux.is));
|
|
98
98
|
}
|
|
@@ -18,7 +18,7 @@ export declare class Committee {
|
|
|
18
18
|
}
|
|
19
19
|
export declare class CommitteeAux extends Committee {
|
|
20
20
|
readonly candidates: Candidate[];
|
|
21
|
-
readonly
|
|
21
|
+
readonly federal_election_f3_files: FederalElectionF3File[];
|
|
22
22
|
readonly jfp_committees?: Committee[];
|
|
23
23
|
readonly jfr_committees: Committee[];
|
|
24
24
|
readonly aff_committees: Committee[];
|
|
@@ -40,7 +40,7 @@ export class Committee {
|
|
|
40
40
|
}
|
|
41
41
|
export class CommitteeAux extends Committee {
|
|
42
42
|
candidates;
|
|
43
|
-
|
|
43
|
+
federal_election_f3_files;
|
|
44
44
|
jfp_committees;
|
|
45
45
|
jfr_committees;
|
|
46
46
|
aff_committees;
|
|
@@ -50,17 +50,17 @@ export class CommitteeAux extends Committee {
|
|
|
50
50
|
}
|
|
51
51
|
super(committee);
|
|
52
52
|
this.candidates = committee.candidates;
|
|
53
|
-
this.
|
|
54
|
-
this.jfp_committees = committee.jfp_committees
|
|
55
|
-
this.jfr_committees = committee.jfr_committees
|
|
56
|
-
this.aff_committees = committee.aff_committees
|
|
53
|
+
this.federal_election_f3_files = committee.federal_election_f3_files;
|
|
54
|
+
this.jfp_committees = committee.jfp_committees;
|
|
55
|
+
this.jfr_committees = committee.jfr_committees;
|
|
56
|
+
this.aff_committees = committee.aff_committees;
|
|
57
57
|
}
|
|
58
58
|
static is(committee) {
|
|
59
59
|
return (Committee.is(committee) &&
|
|
60
60
|
Array.isArray(committee.candidates) &&
|
|
61
61
|
committee.candidates.every(Candidate.is) &&
|
|
62
|
-
Array.isArray(committee.
|
|
63
|
-
committee.
|
|
62
|
+
Array.isArray(committee.federal_election_f3_files) &&
|
|
63
|
+
committee.federal_election_f3_files.every(FederalElectionF3File.is) &&
|
|
64
64
|
(committee.jfp_committees === undefined || Array.isArray(committee.jfp_committees) && committee.jfp_committees.every(Committee.is)) &&
|
|
65
65
|
(Array.isArray(committee.jfr_committees) && committee.jfr_committees.every(Committee.is)) &&
|
|
66
66
|
(Array.isArray(committee.aff_committees) && committee.aff_committees.every(Committee.is)));
|
|
@@ -22,7 +22,7 @@ export declare class Expenditure {
|
|
|
22
22
|
export declare class ExpenditureAux extends Expenditure {
|
|
23
23
|
readonly candidate: Candidate;
|
|
24
24
|
readonly committee: Committee;
|
|
25
|
-
readonly
|
|
25
|
+
readonly federal_election_f24_file: FederalElectionF24File;
|
|
26
26
|
constructor(expenditure: any);
|
|
27
27
|
static is(expenditure: any): expenditure is ExpenditureAux;
|
|
28
28
|
}
|
|
@@ -51,7 +51,7 @@ export class Expenditure {
|
|
|
51
51
|
export class ExpenditureAux extends Expenditure {
|
|
52
52
|
candidate;
|
|
53
53
|
committee;
|
|
54
|
-
|
|
54
|
+
federal_election_f24_file;
|
|
55
55
|
constructor(expenditure) {
|
|
56
56
|
if (!ExpenditureAux.is(expenditure)) {
|
|
57
57
|
throw Error("Invalid input.");
|
|
@@ -59,12 +59,12 @@ export class ExpenditureAux extends Expenditure {
|
|
|
59
59
|
super(expenditure);
|
|
60
60
|
this.candidate = new Candidate(expenditure.candidate);
|
|
61
61
|
this.committee = new Committee(expenditure.committee);
|
|
62
|
-
this.
|
|
62
|
+
this.federal_election_f24_file = new FederalElectionF24File(expenditure.federal_election_f24_file);
|
|
63
63
|
}
|
|
64
64
|
static is(expenditure) {
|
|
65
65
|
return (Expenditure.is(expenditure) &&
|
|
66
66
|
Candidate.is(expenditure.candidate) &&
|
|
67
67
|
Committee.is(expenditure.committee) &&
|
|
68
|
-
FederalElectionF24File.is(expenditure.
|
|
68
|
+
FederalElectionF24File.is(expenditure.federal_election_f24_file));
|
|
69
69
|
}
|
|
70
70
|
}
|
package/package.json
CHANGED
package/src/types/Candidate.ts
CHANGED
|
@@ -91,7 +91,7 @@ export class Candidate {
|
|
|
91
91
|
|
|
92
92
|
export class CandidateAux extends Candidate {
|
|
93
93
|
readonly committees : CommitteeAux[]
|
|
94
|
-
readonly
|
|
94
|
+
readonly federal_election_f3_files : FederalElectionF3File[]
|
|
95
95
|
readonly expenditures : ExpenditureAux[]
|
|
96
96
|
|
|
97
97
|
constructor(candidate : any) {
|
|
@@ -100,8 +100,8 @@ export class CandidateAux extends Candidate {
|
|
|
100
100
|
}
|
|
101
101
|
super(candidate)
|
|
102
102
|
this.committees = candidate.committees
|
|
103
|
-
this.
|
|
104
|
-
this.expenditures = candidate.expenditures
|
|
103
|
+
this.federal_election_f3_files = candidate.federal_election_f3_files
|
|
104
|
+
this.expenditures = candidate.expenditures
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
static is(candidate : any) : candidate is CandidateAux {
|
|
@@ -109,8 +109,8 @@ export class CandidateAux extends Candidate {
|
|
|
109
109
|
Candidate.is(candidate) &&
|
|
110
110
|
Array.isArray(candidate.committees) &&
|
|
111
111
|
candidate.committees.every(CommitteeAux.is) &&
|
|
112
|
-
Array.isArray(candidate.
|
|
113
|
-
candidate.
|
|
112
|
+
Array.isArray(candidate.federal_election_f3_files) &&
|
|
113
|
+
candidate.federal_election_f3_files.every(FederalElectionF3File.is) &&
|
|
114
114
|
Array.isArray(candidate.expenditures) &&
|
|
115
115
|
candidate.expenditures.every(ExpenditureAux.is)
|
|
116
116
|
)
|
package/src/types/Committee.ts
CHANGED
|
@@ -52,7 +52,7 @@ export class Committee {
|
|
|
52
52
|
|
|
53
53
|
export class CommitteeAux extends Committee {
|
|
54
54
|
readonly candidates : Candidate[]
|
|
55
|
-
readonly
|
|
55
|
+
readonly federal_election_f3_files : FederalElectionF3File[]
|
|
56
56
|
readonly jfp_committees? : Committee[]
|
|
57
57
|
readonly jfr_committees : Committee[]
|
|
58
58
|
readonly aff_committees : Committee[]
|
|
@@ -63,10 +63,10 @@ export class CommitteeAux extends Committee {
|
|
|
63
63
|
}
|
|
64
64
|
super(committee)
|
|
65
65
|
this.candidates = committee.candidates
|
|
66
|
-
this.
|
|
67
|
-
this.jfp_committees = committee.jfp_committees
|
|
68
|
-
this.jfr_committees = committee.jfr_committees
|
|
69
|
-
this.aff_committees = committee.aff_committees
|
|
66
|
+
this.federal_election_f3_files = committee.federal_election_f3_files
|
|
67
|
+
this.jfp_committees = committee.jfp_committees
|
|
68
|
+
this.jfr_committees = committee.jfr_committees
|
|
69
|
+
this.aff_committees = committee.aff_committees
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
static is(committee : any) : committee is CommitteeAux {
|
|
@@ -74,8 +74,8 @@ export class CommitteeAux extends Committee {
|
|
|
74
74
|
Committee.is(committee) &&
|
|
75
75
|
Array.isArray(committee.candidates) &&
|
|
76
76
|
committee.candidates.every(Candidate.is) &&
|
|
77
|
-
Array.isArray(committee.
|
|
78
|
-
committee.
|
|
77
|
+
Array.isArray(committee.federal_election_f3_files) &&
|
|
78
|
+
committee.federal_election_f3_files.every(FederalElectionF3File.is) &&
|
|
79
79
|
(committee.jfp_committees === undefined || Array.isArray(committee.jfp_committees) && committee.jfp_committees.every(Committee.is)) &&
|
|
80
80
|
(Array.isArray(committee.jfr_committees) && committee.jfr_committees.every(Committee.is)) &&
|
|
81
81
|
(Array.isArray(committee.aff_committees) && committee.aff_committees.every(Committee.is))
|
package/src/types/Expenditure.ts
CHANGED
|
@@ -59,7 +59,7 @@ export class Expenditure {
|
|
|
59
59
|
export class ExpenditureAux extends Expenditure {
|
|
60
60
|
readonly candidate : Candidate
|
|
61
61
|
readonly committee : Committee
|
|
62
|
-
readonly
|
|
62
|
+
readonly federal_election_f24_file : FederalElectionF24File
|
|
63
63
|
|
|
64
64
|
constructor(expenditure : any) {
|
|
65
65
|
if (!ExpenditureAux.is(expenditure)) {
|
|
@@ -68,7 +68,7 @@ export class ExpenditureAux extends Expenditure {
|
|
|
68
68
|
super(expenditure)
|
|
69
69
|
this.candidate = new Candidate(expenditure.candidate)
|
|
70
70
|
this.committee = new Committee(expenditure.committee)
|
|
71
|
-
this.
|
|
71
|
+
this.federal_election_f24_file = new FederalElectionF24File(expenditure.federal_election_f24_file)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
static is(expenditure : any) : expenditure is ExpenditureAux {
|
|
@@ -76,7 +76,7 @@ export class ExpenditureAux extends Expenditure {
|
|
|
76
76
|
Expenditure.is(expenditure) &&
|
|
77
77
|
Candidate.is(expenditure.candidate) &&
|
|
78
78
|
Committee.is(expenditure.committee) &&
|
|
79
|
-
FederalElectionF24File.is(expenditure.
|
|
79
|
+
FederalElectionF24File.is(expenditure.federal_election_f24_file)
|
|
80
80
|
)
|
|
81
81
|
}
|
|
82
82
|
}
|