triangle-types 1.0.152 → 1.0.154

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.
@@ -10,6 +10,7 @@ export declare class FederalElectionF2File extends FederalElectionFile {
10
10
  readonly federal_election_id: string;
11
11
  readonly party_id?: string;
12
12
  readonly report_date: string;
13
+ readonly federal_election_committee_id?: string;
13
14
  constructor(federal_election_file: any);
14
15
  static is(federal_election_file: any): federal_election_file is FederalElectionF2File;
15
16
  }
@@ -10,6 +10,7 @@ export class FederalElectionF2File extends FederalElectionFile {
10
10
  federal_election_id;
11
11
  party_id;
12
12
  report_date;
13
+ federal_election_committee_id;
13
14
  constructor(federal_election_file) {
14
15
  if (!FederalElectionF2File.is(federal_election_file)) {
15
16
  throw Error("Invalid input.");
@@ -23,6 +24,7 @@ export class FederalElectionF2File extends FederalElectionFile {
23
24
  this.federal_election_id = federal_election_file.federal_election_id;
24
25
  this.party_id = federal_election_file.party_id;
25
26
  this.report_date = federal_election_file.report_date;
27
+ this.federal_election_committee_id = federal_election_file.federal_election_committee_id;
26
28
  }
27
29
  static is(federal_election_file) {
28
30
  return (FederalElectionFile.is(federal_election_file) &&
@@ -34,6 +36,7 @@ export class FederalElectionF2File extends FederalElectionFile {
34
36
  (federal_election_file.district_id === undefined || typeof federal_election_file.district_id === "number") &&
35
37
  typeof federal_election_file.federal_election_id === "string" &&
36
38
  (federal_election_file.party_id === undefined || typeof federal_election_file.party_id === "string") &&
37
- typeof federal_election_file.report_date === "string");
39
+ typeof federal_election_file.report_date === "string" &&
40
+ (federal_election_file.federal_election_committee_id === undefined || typeof federal_election_file.federal_election_committee_id === "string"));
38
41
  }
39
42
  }
@@ -7,7 +7,14 @@ export declare class TenantProvision {
7
7
  readonly provision_type_id: TenantProvisionTypeID;
8
8
  readonly name?: string;
9
9
  readonly value?: any;
10
+ readonly [x: string]: any;
10
11
  constructor(tenant_provision: TenantProvision);
11
12
  static is(tenant_provision: any): tenant_provision is TenantProvision;
12
13
  }
14
+ export declare class TenantTagProvisionAux extends TenantProvision {
15
+ readonly provision_type_id: "tag";
16
+ readonly num_voters: number;
17
+ constructor(tenant_provision: TenantTagProvisionAux);
18
+ static is(tenant_provision: any): tenant_provision is TenantTagProvisionAux;
19
+ }
13
20
  export {};
@@ -8,7 +8,6 @@ export class TenantProvision {
8
8
  provision_type_id;
9
9
  name;
10
10
  value;
11
- // readonly [x : string] : any
12
11
  constructor(tenant_provision) {
13
12
  if (!TenantProvision.is(tenant_provision)) {
14
13
  throw Error("Invalid Input.");
@@ -27,3 +26,21 @@ export class TenantProvision {
27
26
  (tenant_provision.name === undefined || typeof tenant_provision.name === "string"));
28
27
  }
29
28
  }
29
+ export class TenantTagProvisionAux extends TenantProvision {
30
+ provision_type_id;
31
+ num_voters;
32
+ // readonly [x : string] : any
33
+ constructor(tenant_provision) {
34
+ if (!TenantTagProvisionAux.is(tenant_provision)) {
35
+ throw Error("Invalid Input.");
36
+ }
37
+ super(tenant_provision);
38
+ this.provision_type_id = "tag";
39
+ this.num_voters = tenant_provision.num_voters;
40
+ }
41
+ static is(tenant_provision) {
42
+ return (TenantProvision.is(tenant_provision) &&
43
+ tenant_provision.provision_type_id === "tag" &&
44
+ typeof tenant_provision.num_voters === "number");
45
+ }
46
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.152",
3
+ "version": "1.0.154",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -11,6 +11,7 @@ export class FederalElectionF2File extends FederalElectionFile {
11
11
  readonly federal_election_id : string
12
12
  readonly party_id? : string
13
13
  readonly report_date : string
14
+ readonly federal_election_committee_id? : string
14
15
 
15
16
  constructor(federal_election_file : any) {
16
17
  if (!FederalElectionF2File.is(federal_election_file)) {
@@ -25,6 +26,7 @@ export class FederalElectionF2File extends FederalElectionFile {
25
26
  this.federal_election_id = federal_election_file.federal_election_id
26
27
  this.party_id = federal_election_file.party_id
27
28
  this.report_date = federal_election_file.report_date
29
+ this.federal_election_committee_id = federal_election_file.federal_election_committee_id
28
30
  }
29
31
 
30
32
  static is(federal_election_file : any) : federal_election_file is FederalElectionF2File {
@@ -38,7 +40,8 @@ export class FederalElectionF2File extends FederalElectionFile {
38
40
  (federal_election_file.district_id === undefined || typeof federal_election_file.district_id === "number") &&
39
41
  typeof federal_election_file.federal_election_id === "string" &&
40
42
  (federal_election_file.party_id === undefined || typeof federal_election_file.party_id === "string") &&
41
- typeof federal_election_file.report_date === "string"
43
+ typeof federal_election_file.report_date === "string" &&
44
+ (federal_election_file.federal_election_committee_id === undefined || typeof federal_election_file.federal_election_committee_id === "string")
42
45
  )
43
46
  }
44
47
  }
@@ -6,14 +6,13 @@ export function is_tenant_provision_type_id(tenant_provision_type_id : any) : te
6
6
  return tenant_provision_type_ids.includes(tenant_provision_type_id)
7
7
  }
8
8
 
9
-
10
9
  export class TenantProvision {
11
10
  readonly tenant_id : string
12
11
  readonly provision_id : string
13
12
  readonly provision_type_id : TenantProvisionTypeID
14
13
  readonly name? : string
15
14
  readonly value? : any
16
- // readonly [x : string] : any
15
+ readonly [x : string] : any
17
16
 
18
17
  constructor(tenant_provision : TenantProvision) {
19
18
  if (!TenantProvision.is(tenant_provision)) {
@@ -35,4 +34,27 @@ export class TenantProvision {
35
34
  (tenant_provision.name === undefined || typeof tenant_provision.name === "string")
36
35
  )
37
36
  }
37
+ }
38
+
39
+ export class TenantTagProvisionAux extends TenantProvision {
40
+ readonly provision_type_id : "tag"
41
+ readonly num_voters : number
42
+ // readonly [x : string] : any
43
+
44
+ constructor(tenant_provision : TenantTagProvisionAux) {
45
+ if (!TenantTagProvisionAux.is(tenant_provision)) {
46
+ throw Error("Invalid Input.")
47
+ }
48
+ super(tenant_provision)
49
+ this.provision_type_id = "tag"
50
+ this.num_voters = tenant_provision.num_voters
51
+ }
52
+
53
+ static is(tenant_provision : any) : tenant_provision is TenantTagProvisionAux {
54
+ return (
55
+ TenantProvision.is(tenant_provision) &&
56
+ tenant_provision.provision_type_id === "tag" &&
57
+ typeof tenant_provision.num_voters === "number"
58
+ )
59
+ }
38
60
  }