triangle-types 1.0.130 → 1.0.132

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.
@@ -1,8 +1,8 @@
1
1
  export declare class Scout {
2
2
  readonly scout_id: string;
3
3
  readonly name: string;
4
- readonly web_ballotpedia_article_id?: string;
5
- readonly web_wikipedia_article_id?: string;
4
+ readonly ballotpedia_article_id?: string;
5
+ readonly wikipedia_article_id?: string;
6
6
  readonly s3_id_img?: string;
7
7
  readonly [x: string]: any;
8
8
  constructor(scout: any);
@@ -7,8 +7,8 @@ export class Scout {
7
7
  scout_id;
8
8
  // readonly scout_type_id : ScoutTypeID
9
9
  name;
10
- web_ballotpedia_article_id;
11
- web_wikipedia_article_id;
10
+ ballotpedia_article_id;
11
+ wikipedia_article_id;
12
12
  s3_id_img;
13
13
  constructor(scout) {
14
14
  if (!Scout.is(scout)) {
@@ -17,8 +17,8 @@ export class Scout {
17
17
  this.scout_id = scout.scout_id;
18
18
  // this.scout_type_id = scout.scout_type_id
19
19
  this.name = scout.name;
20
- this.web_ballotpedia_article_id = scout.web_ballotpedia_article_id;
21
- this.web_wikipedia_article_id = scout.web_wikipedia_article_id;
20
+ this.ballotpedia_article_id = scout.ballotpedia_article_id;
21
+ this.wikipedia_article_id = scout.wikipedia_article_id;
22
22
  this.s3_id_img = scout.s3_id_img;
23
23
  }
24
24
  static is(scout) {
@@ -26,8 +26,8 @@ export class Scout {
26
26
  typeof scout.scout_id === "string" &&
27
27
  // is_scout_type_id(scout.scout_type_id) &&
28
28
  typeof scout.name === "string" &&
29
- (scout.web_ballotpedia_article_id === undefined || typeof scout.web_ballotpedia_article_id === "string") &&
30
- (scout.web_wikipedia_article_id === undefined || typeof scout.web_wikipedia_article_id === "string") &&
29
+ (scout.ballotpedia_article_id === undefined || typeof scout.ballotpedia_article_id === "string") &&
30
+ (scout.wikipedia_article_id === undefined || typeof scout.wikipedia_article_id === "string") &&
31
31
  (scout.s3_id_img === undefined || typeof scout.s3_id_img === "string"));
32
32
  }
33
33
  }
@@ -5,6 +5,7 @@ export declare class StateLegislatureDistrict {
5
5
  readonly legislature_id: number;
6
6
  readonly chamber_id: string;
7
7
  readonly district_id: number;
8
+ readonly name: string;
8
9
  constructor(state_legislature_district: any);
9
10
  static is(state_legislature_district: any): state_legislature_district is StateLegislatureDistrict;
10
11
  }
@@ -5,6 +5,7 @@ export class StateLegislatureDistrict {
5
5
  legislature_id;
6
6
  chamber_id;
7
7
  district_id;
8
+ name;
8
9
  constructor(state_legislature_district) {
9
10
  if (!StateLegislatureDistrict.is(state_legislature_district)) {
10
11
  throw Error("Invalid input.");
@@ -14,6 +15,7 @@ export class StateLegislatureDistrict {
14
15
  this.legislature_id = state_legislature_district.legislature_id;
15
16
  this.chamber_id = state_legislature_district.chamber_id;
16
17
  this.district_id = state_legislature_district.district_id;
18
+ this.name = state_legislature_district.name;
17
19
  }
18
20
  static is(state_legislature_district) {
19
21
  return (state_legislature_district !== undefined &&
@@ -21,6 +23,7 @@ export class StateLegislatureDistrict {
21
23
  is_state_id(state_legislature_district.state_id) &&
22
24
  typeof state_legislature_district.legislature_id === "number" &&
23
25
  typeof state_legislature_district.chamber_id === "string" &&
24
- typeof state_legislature_district.district_id === "number");
26
+ typeof state_legislature_district.district_id === "number" &&
27
+ typeof state_legislature_district.name === "string");
25
28
  }
26
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.130",
3
+ "version": "1.0.132",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -13,8 +13,8 @@ export class Scout {
13
13
  readonly scout_id : string
14
14
  // readonly scout_type_id : ScoutTypeID
15
15
  readonly name : string
16
- readonly web_ballotpedia_article_id? : string
17
- readonly web_wikipedia_article_id? : string
16
+ readonly ballotpedia_article_id? : string
17
+ readonly wikipedia_article_id? : string
18
18
  readonly s3_id_img? : string
19
19
  readonly [x : string] : any
20
20
 
@@ -25,8 +25,8 @@ export class Scout {
25
25
  this.scout_id = scout.scout_id
26
26
  // this.scout_type_id = scout.scout_type_id
27
27
  this.name = scout.name
28
- this.web_ballotpedia_article_id = scout.web_ballotpedia_article_id
29
- this.web_wikipedia_article_id = scout.web_wikipedia_article_id
28
+ this.ballotpedia_article_id = scout.ballotpedia_article_id
29
+ this.wikipedia_article_id = scout.wikipedia_article_id
30
30
  this.s3_id_img = scout.s3_id_img
31
31
  }
32
32
 
@@ -36,8 +36,8 @@ export class Scout {
36
36
  typeof scout.scout_id === "string" &&
37
37
  // is_scout_type_id(scout.scout_type_id) &&
38
38
  typeof scout.name === "string" &&
39
- (scout.web_ballotpedia_article_id === undefined || typeof scout.web_ballotpedia_article_id === "string") &&
40
- (scout.web_wikipedia_article_id === undefined || typeof scout.web_wikipedia_article_id === "string") &&
39
+ (scout.ballotpedia_article_id === undefined || typeof scout.ballotpedia_article_id === "string") &&
40
+ (scout.wikipedia_article_id === undefined || typeof scout.wikipedia_article_id === "string") &&
41
41
  (scout.s3_id_img === undefined || typeof scout.s3_id_img === "string")
42
42
  )
43
43
  }
@@ -6,6 +6,7 @@ export class StateLegislatureDistrict {
6
6
  readonly legislature_id : number
7
7
  readonly chamber_id : string
8
8
  readonly district_id : number
9
+ readonly name : string
9
10
 
10
11
 
11
12
  constructor(state_legislature_district : any) {
@@ -17,6 +18,7 @@ export class StateLegislatureDistrict {
17
18
  this.legislature_id = state_legislature_district.legislature_id
18
19
  this.chamber_id = state_legislature_district.chamber_id
19
20
  this.district_id = state_legislature_district.district_id
21
+ this.name = state_legislature_district.name
20
22
  }
21
23
 
22
24
  static is(state_legislature_district : any) : state_legislature_district is StateLegislatureDistrict {
@@ -26,7 +28,8 @@ export class StateLegislatureDistrict {
26
28
  is_state_id(state_legislature_district.state_id) &&
27
29
  typeof state_legislature_district.legislature_id === "number" &&
28
30
  typeof state_legislature_district.chamber_id === "string" &&
29
- typeof state_legislature_district.district_id === "number"
31
+ typeof state_legislature_district.district_id === "number" &&
32
+ typeof state_legislature_district.name === "string"
30
33
  )
31
34
  }
32
35