elections-types 1.0.25 → 1.0.27

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.
@@ -3,12 +3,12 @@ export declare class Article {
3
3
  readonly publish_date: string;
4
4
  readonly hash: string;
5
5
  readonly title: string;
6
- readonly publisher: string;
6
+ readonly publisher?: string;
7
7
  readonly domain: string;
8
8
  readonly url: string;
9
9
  readonly fetch_time: string;
10
10
  readonly relevance_title?: string;
11
- readonly s3_filename?: string;
11
+ readonly text_status?: string;
12
12
  constructor(article: any);
13
13
  static is(article: any): article is Article;
14
14
  }
@@ -8,7 +8,7 @@ export class Article {
8
8
  url;
9
9
  fetch_time;
10
10
  relevance_title;
11
- s3_filename;
11
+ text_status;
12
12
  constructor(article) {
13
13
  if (!Article.is(article)) {
14
14
  throw Error("Invalid input.");
@@ -22,7 +22,7 @@ export class Article {
22
22
  this.url = article.url;
23
23
  this.fetch_time = article.fetch_time;
24
24
  this.relevance_title = article.relevance_title;
25
- this.s3_filename = article.s3_filename;
25
+ this.text_status = article.text_status;
26
26
  }
27
27
  static is(article) {
28
28
  return (article !== undefined &&
@@ -30,11 +30,11 @@ export class Article {
30
30
  typeof article.publish_date === "string" &&
31
31
  typeof article.hash === "string" &&
32
32
  typeof article.title === "string" &&
33
- typeof article.publisher === "string" &&
33
+ (article.publisher === undefined || typeof article.publisher === "string") &&
34
34
  typeof article.domain === "string" &&
35
35
  typeof article.url === "string" &&
36
36
  typeof article.fetch_time === "string" &&
37
37
  (article.relevance_title === undefined || typeof article.relevance_title === "string") &&
38
- (article.s3_filename === undefined || typeof article.s3_filename === "string"));
38
+ (article.text_status === undefined || typeof article.text_status === "string"));
39
39
  }
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elections-types",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -3,12 +3,12 @@ export class Article {
3
3
  readonly publish_date : string
4
4
  readonly hash : string
5
5
  readonly title : string
6
- readonly publisher : string
6
+ readonly publisher? : string
7
7
  readonly domain : string
8
8
  readonly url : string
9
9
  readonly fetch_time : string
10
10
  readonly relevance_title? : string
11
- readonly s3_filename? : string
11
+ readonly text_status? : string
12
12
 
13
13
  constructor(article : any) {
14
14
  if (!Article.is(article)) {
@@ -23,7 +23,7 @@ export class Article {
23
23
  this.url = article.url
24
24
  this.fetch_time = article.fetch_time
25
25
  this.relevance_title = article.relevance_title
26
- this.s3_filename = article.s3_filename
26
+ this.text_status = article.text_status
27
27
  }
28
28
 
29
29
  static is(article : any) : article is Article {
@@ -33,12 +33,12 @@ export class Article {
33
33
  typeof article.publish_date === "string" &&
34
34
  typeof article.hash === "string" &&
35
35
  typeof article.title === "string" &&
36
- typeof article.publisher === "string" &&
36
+ (article.publisher === undefined || typeof article.publisher === "string") &&
37
37
  typeof article.domain === "string" &&
38
38
  typeof article.url === "string" &&
39
39
  typeof article.fetch_time === "string" &&
40
40
  (article.relevance_title === undefined || typeof article.relevance_title === "string") &&
41
- (article.s3_filename === undefined || typeof article.s3_filename === "string")
41
+ (article.text_status === undefined || typeof article.text_status === "string")
42
42
  )
43
43
  }
44
44
  }