elections-types 1.0.23 → 1.0.25

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.
@@ -7,6 +7,7 @@ export declare class Article {
7
7
  readonly domain: string;
8
8
  readonly url: string;
9
9
  readonly fetch_time: string;
10
+ readonly relevance_title?: string;
10
11
  readonly s3_filename?: string;
11
12
  constructor(article: any);
12
13
  static is(article: any): article is Article;
@@ -7,6 +7,7 @@ export class Article {
7
7
  domain;
8
8
  url;
9
9
  fetch_time;
10
+ relevance_title;
10
11
  s3_filename;
11
12
  constructor(article) {
12
13
  if (!Article.is(article)) {
@@ -20,6 +21,7 @@ export class Article {
20
21
  this.domain = article.domain;
21
22
  this.url = article.url;
22
23
  this.fetch_time = article.fetch_time;
24
+ this.relevance_title = article.relevance_title;
23
25
  this.s3_filename = article.s3_filename;
24
26
  }
25
27
  static is(article) {
@@ -32,6 +34,7 @@ export class Article {
32
34
  typeof article.domain === "string" &&
33
35
  typeof article.url === "string" &&
34
36
  typeof article.fetch_time === "string" &&
37
+ (article.relevance_title === undefined || typeof article.relevance_title === "string") &&
35
38
  (article.s3_filename === undefined || typeof article.s3_filename === "string"));
36
39
  }
37
40
  }
@@ -5,7 +5,7 @@ export declare class Committee {
5
5
  readonly committee_id: string;
6
6
  readonly name: string;
7
7
  readonly url?: string;
8
- readonly designation: CommitteeDesignation;
8
+ readonly designation?: CommitteeDesignation;
9
9
  readonly file_number?: number;
10
10
  readonly principal_committee_ids?: string[];
11
11
  readonly authorized_committee_ids?: string[];
@@ -39,7 +39,7 @@ export class Committee {
39
39
  typeof committee.committee_id === "string" &&
40
40
  typeof committee.name === "string" &&
41
41
  (committee.url === undefined || typeof committee.url === "string") &&
42
- is_committee_designation(committee.designation) &&
42
+ (committee.designation === undefined || is_committee_designation(committee.designation)) &&
43
43
  (committee.file_number === undefined || typeof committee.file_number === "number" && !isNaN(committee.file_number)) &&
44
44
  (committee.principal_committee_ids === undefined || Array.isArray(committee.principal_committee_ids) && committee.principal_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
45
45
  (committee.authorized_committee_ids === undefined || Array.isArray(committee.authorized_committee_ids) && committee.authorized_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elections-types",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -7,6 +7,7 @@ export class Article {
7
7
  readonly domain : string
8
8
  readonly url : string
9
9
  readonly fetch_time : string
10
+ readonly relevance_title? : string
10
11
  readonly s3_filename? : string
11
12
 
12
13
  constructor(article : any) {
@@ -21,6 +22,7 @@ export class Article {
21
22
  this.domain = article.domain
22
23
  this.url = article.url
23
24
  this.fetch_time = article.fetch_time
25
+ this.relevance_title = article.relevance_title
24
26
  this.s3_filename = article.s3_filename
25
27
  }
26
28
 
@@ -35,6 +37,7 @@ export class Article {
35
37
  typeof article.domain === "string" &&
36
38
  typeof article.url === "string" &&
37
39
  typeof article.fetch_time === "string" &&
40
+ (article.relevance_title === undefined || typeof article.relevance_title === "string") &&
38
41
  (article.s3_filename === undefined || typeof article.s3_filename === "string")
39
42
  )
40
43
  }
@@ -10,7 +10,7 @@ export class Committee {
10
10
  readonly committee_id : string
11
11
  readonly name : string
12
12
  readonly url? : string
13
- readonly designation : CommitteeDesignation
13
+ readonly designation? : CommitteeDesignation
14
14
  readonly file_number? : number
15
15
  readonly principal_committee_ids? : string[]
16
16
  readonly authorized_committee_ids? : string[]
@@ -47,7 +47,7 @@ export class Committee {
47
47
  typeof committee.committee_id === "string" &&
48
48
  typeof committee.name === "string" &&
49
49
  (committee.url === undefined || typeof committee.url === "string") &&
50
- is_committee_designation(committee.designation) &&
50
+ (committee.designation === undefined || is_committee_designation(committee.designation)) &&
51
51
  (committee.file_number === undefined || typeof committee.file_number === "number" && !isNaN(committee.file_number)) &&
52
52
  (committee.principal_committee_ids === undefined || Array.isArray(committee.principal_committee_ids) && committee.principal_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
53
53
  (committee.authorized_committee_ids === undefined || Array.isArray(committee.authorized_committee_ids) && committee.authorized_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&