triangle-types 1.0.378 → 1.0.380

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.
@@ -31,6 +31,7 @@ export * from "./types/federal_elections/FederalElectionFile.js";
31
31
  export * from "./types/federal_elections/FederalElectionF1FileBody.js";
32
32
  export * from "./types/federal_elections/FederalElectionF2FileBody.js";
33
33
  export * from "./types/federal_elections/FederalElectionF3FileBody.js";
34
+ export * from "./types/federal_elections/FederalElectionF3XFileBody.js";
34
35
  export * from "./types/federal_elections/FederalElectionF24FileBody.js";
35
36
  export * from "./types/federal_elections/FormTypeID.js";
36
37
  export * from "./types/federal_lobby/FederalLobbyAgency.js";
package/dist/src/index.js CHANGED
@@ -31,6 +31,7 @@ export * from "./types/federal_elections/FederalElectionFile.js";
31
31
  export * from "./types/federal_elections/FederalElectionF1FileBody.js";
32
32
  export * from "./types/federal_elections/FederalElectionF2FileBody.js";
33
33
  export * from "./types/federal_elections/FederalElectionF3FileBody.js";
34
+ export * from "./types/federal_elections/FederalElectionF3XFileBody.js";
34
35
  export * from "./types/federal_elections/FederalElectionF24FileBody.js";
35
36
  export * from "./types/federal_elections/FormTypeID.js";
36
37
  export * from "./types/federal_lobby/FederalLobbyAgency.js";
@@ -0,0 +1,12 @@
1
+ export declare class FederalElectionF3XFileBody {
2
+ readonly federal_election_committee_id: string;
3
+ readonly period_id: string;
4
+ readonly period_start_date: string;
5
+ readonly period_end_date: string;
6
+ readonly cash_on_hand: number;
7
+ readonly cumulative_receipts: number;
8
+ readonly new_receipts: number;
9
+ readonly report_date: string;
10
+ constructor(federal_election_file_body: any);
11
+ static is(federal_election_file_body: any): federal_election_file_body is FederalElectionF3XFileBody;
12
+ }
@@ -0,0 +1,34 @@
1
+ export class FederalElectionF3XFileBody {
2
+ federal_election_committee_id;
3
+ period_id;
4
+ period_start_date;
5
+ period_end_date;
6
+ cash_on_hand;
7
+ cumulative_receipts;
8
+ new_receipts;
9
+ report_date;
10
+ constructor(federal_election_file_body) {
11
+ if (!FederalElectionF3XFileBody.is(federal_election_file_body)) {
12
+ throw Error("Invalid input.");
13
+ }
14
+ this.federal_election_committee_id = federal_election_file_body.federal_election_committee_id;
15
+ this.period_id = federal_election_file_body.period_id;
16
+ this.period_start_date = federal_election_file_body.period_start_date;
17
+ this.period_end_date = federal_election_file_body.period_end_date;
18
+ this.cash_on_hand = federal_election_file_body.cash_on_hand;
19
+ this.cumulative_receipts = federal_election_file_body.cumulative_receipts;
20
+ this.new_receipts = federal_election_file_body.new_receipts;
21
+ this.report_date = federal_election_file_body.report_date;
22
+ }
23
+ static is(federal_election_file_body) {
24
+ return (federal_election_file_body !== undefined &&
25
+ typeof federal_election_file_body.federal_election_committee_id === "string" &&
26
+ typeof federal_election_file_body.period_id === "string" &&
27
+ typeof federal_election_file_body.period_start_date === "string" &&
28
+ typeof federal_election_file_body.period_end_date === "string" &&
29
+ typeof federal_election_file_body.cash_on_hand === "number" &&
30
+ typeof federal_election_file_body.cumulative_receipts === "number" &&
31
+ typeof federal_election_file_body.new_receipts === "number" &&
32
+ typeof federal_election_file_body.report_date === "string");
33
+ }
34
+ }
@@ -1,3 +1,4 @@
1
+ import { FederalElectionCandidate } from "./FederalElectionCandidate.js";
1
2
  import { FederalElectionCommittee } from "./FederalElectionCommittee.js";
2
3
  export declare class FederalElectionFileExpenditure {
3
4
  readonly federal_election_file_id: number;
@@ -17,6 +18,7 @@ export declare class FederalElectionFileExpenditure {
17
18
  static is(federal_election_file_expenditure: any): federal_election_file_expenditure is FederalElectionFileExpenditure;
18
19
  }
19
20
  export declare class FederalElectionFileExpenditureAux extends FederalElectionFileExpenditure {
21
+ readonly federal_election_candidate: FederalElectionCandidate;
20
22
  readonly federal_election_committee: FederalElectionCommittee;
21
23
  constructor(federal_election_file_expenditure: any);
22
24
  static is(federal_election_file_expenditure: any): federal_election_file_expenditure is FederalElectionFileExpenditureAux;
@@ -1,3 +1,4 @@
1
+ import { FederalElectionCandidate } from "./FederalElectionCandidate.js";
1
2
  import { FederalElectionCommittee } from "./FederalElectionCommittee.js";
2
3
  export class FederalElectionFileExpenditure {
3
4
  federal_election_file_id;
@@ -46,16 +47,19 @@ export class FederalElectionFileExpenditure {
46
47
  }
47
48
  }
48
49
  export class FederalElectionFileExpenditureAux extends FederalElectionFileExpenditure {
50
+ federal_election_candidate;
49
51
  federal_election_committee;
50
52
  constructor(federal_election_file_expenditure) {
51
53
  if (!FederalElectionFileExpenditureAux.is(federal_election_file_expenditure)) {
52
54
  throw Error("Invalid input.");
53
55
  }
54
56
  super(federal_election_file_expenditure);
57
+ this.federal_election_candidate = federal_election_file_expenditure.federal_election_candidate;
55
58
  this.federal_election_committee = federal_election_file_expenditure.federal_election_committee;
56
59
  }
57
60
  static is(federal_election_file_expenditure) {
58
61
  return (FederalElectionFileExpenditure.is(federal_election_file_expenditure) &&
62
+ FederalElectionCandidate.is(federal_election_file_expenditure.federal_election_candidate) &&
59
63
  FederalElectionCommittee.is(federal_election_file_expenditure.federal_election_committee));
60
64
  }
61
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.378",
3
+ "version": "1.0.380",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -38,6 +38,7 @@ export * from "./types/federal_elections/FederalElectionFile"
38
38
  export * from "./types/federal_elections/FederalElectionF1FileBody"
39
39
  export * from "./types/federal_elections/FederalElectionF2FileBody"
40
40
  export * from "./types/federal_elections/FederalElectionF3FileBody"
41
+ export * from "./types/federal_elections/FederalElectionF3XFileBody"
41
42
  export * from "./types/federal_elections/FederalElectionF24FileBody"
42
43
  export * from "./types/federal_elections/FormTypeID"
43
44
 
@@ -0,0 +1,38 @@
1
+ export class FederalElectionF3XFileBody {
2
+ readonly federal_election_committee_id : string
3
+ readonly period_id : string
4
+ readonly period_start_date : string
5
+ readonly period_end_date : string
6
+ readonly cash_on_hand : number
7
+ readonly cumulative_receipts : number
8
+ readonly new_receipts : number
9
+ readonly report_date : string
10
+
11
+ constructor(federal_election_file_body : any) {
12
+ if (!FederalElectionF3XFileBody.is(federal_election_file_body)) {
13
+ throw Error("Invalid input.")
14
+ }
15
+ this.federal_election_committee_id = federal_election_file_body.federal_election_committee_id
16
+ this.period_id = federal_election_file_body.period_id
17
+ this.period_start_date = federal_election_file_body.period_start_date
18
+ this.period_end_date = federal_election_file_body.period_end_date
19
+ this.cash_on_hand = federal_election_file_body.cash_on_hand
20
+ this.cumulative_receipts = federal_election_file_body.cumulative_receipts
21
+ this.new_receipts = federal_election_file_body.new_receipts
22
+ this.report_date = federal_election_file_body.report_date
23
+ }
24
+
25
+ static is(federal_election_file_body : any) : federal_election_file_body is FederalElectionF3XFileBody {
26
+ return (
27
+ federal_election_file_body !== undefined &&
28
+ typeof federal_election_file_body.federal_election_committee_id === "string" &&
29
+ typeof federal_election_file_body.period_id === "string" &&
30
+ typeof federal_election_file_body.period_start_date === "string" &&
31
+ typeof federal_election_file_body.period_end_date === "string" &&
32
+ typeof federal_election_file_body.cash_on_hand === "number" &&
33
+ typeof federal_election_file_body.cumulative_receipts === "number" &&
34
+ typeof federal_election_file_body.new_receipts === "number" &&
35
+ typeof federal_election_file_body.report_date === "string"
36
+ )
37
+ }
38
+ }
@@ -56,6 +56,7 @@ export class FederalElectionFileExpenditure {
56
56
  }
57
57
 
58
58
  export class FederalElectionFileExpenditureAux extends FederalElectionFileExpenditure {
59
+ readonly federal_election_candidate : FederalElectionCandidate
59
60
  readonly federal_election_committee : FederalElectionCommittee
60
61
 
61
62
  constructor(federal_election_file_expenditure : any) {
@@ -63,12 +64,14 @@ export class FederalElectionFileExpenditureAux extends FederalElectionFileExpend
63
64
  throw Error("Invalid input.")
64
65
  }
65
66
  super(federal_election_file_expenditure)
67
+ this.federal_election_candidate = federal_election_file_expenditure.federal_election_candidate
66
68
  this.federal_election_committee = federal_election_file_expenditure.federal_election_committee
67
69
  }
68
70
 
69
71
  static is(federal_election_file_expenditure : any) : federal_election_file_expenditure is FederalElectionFileExpenditureAux {
70
72
  return (
71
73
  FederalElectionFileExpenditure.is(federal_election_file_expenditure) &&
74
+ FederalElectionCandidate.is(federal_election_file_expenditure.federal_election_candidate) &&
72
75
  FederalElectionCommittee.is(federal_election_file_expenditure.federal_election_committee)
73
76
  )
74
77
  }