elections-types 1.0.24 → 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elections-types",
3
- "version": "1.0.24",
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
  }