elections-types 1.1.21 → 1.1.22

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.
@@ -2,6 +2,8 @@ import { PressArticle } from "./PressArticle.js";
2
2
  export declare class PressArticleTag {
3
3
  readonly press_article_id: string;
4
4
  readonly tag_id: string;
5
+ readonly publish_date: string;
6
+ readonly relevance?: string;
5
7
  readonly [x: string]: any;
6
8
  constructor(press_article_tag: PressArticleTag);
7
9
  static is(press_article_tag: any): press_article_tag is PressArticleTag;
@@ -2,17 +2,23 @@ import { PressArticle } from "./PressArticle.js";
2
2
  export class PressArticleTag {
3
3
  press_article_id;
4
4
  tag_id;
5
+ publish_date;
6
+ relevance;
5
7
  constructor(press_article_tag) {
6
8
  if (!PressArticleTag.is(press_article_tag)) {
7
9
  throw Error("Invalid input.");
8
10
  }
9
11
  this.press_article_id = press_article_tag.press_article_id;
10
12
  this.tag_id = press_article_tag.tag_id;
13
+ this.publish_date = press_article_tag.publish_date;
14
+ this.relevance = press_article_tag.relevance;
11
15
  }
12
16
  static is(press_article_tag) {
13
17
  return (press_article_tag !== undefined &&
14
18
  typeof press_article_tag.press_article_id === "string" &&
15
- typeof press_article_tag.tag_id === "string");
19
+ typeof press_article_tag.tag_id === "string" &&
20
+ typeof press_article_tag.publish_date === "string" &&
21
+ (press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string"));
16
22
  }
17
23
  }
18
24
  export class PressArticleTagAux extends PressArticleTag {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elections-types",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -3,6 +3,8 @@ import { PressArticle } from "./PressArticle"
3
3
  export class PressArticleTag {
4
4
  readonly press_article_id : string
5
5
  readonly tag_id : string
6
+ readonly publish_date : string
7
+ readonly relevance? : string
6
8
  readonly [x : string] : any
7
9
 
8
10
  constructor(press_article_tag : PressArticleTag) {
@@ -11,13 +13,17 @@ export class PressArticleTag {
11
13
  }
12
14
  this.press_article_id = press_article_tag.press_article_id
13
15
  this.tag_id = press_article_tag.tag_id
16
+ this.publish_date = press_article_tag.publish_date
17
+ this.relevance = press_article_tag.relevance
14
18
  }
15
19
 
16
20
  static is(press_article_tag : any) : press_article_tag is PressArticleTag {
17
21
  return (
18
22
  press_article_tag !== undefined &&
19
23
  typeof press_article_tag.press_article_id === "string" &&
20
- typeof press_article_tag.tag_id === "string"
24
+ typeof press_article_tag.tag_id === "string" &&
25
+ typeof press_article_tag.publish_date === "string" &&
26
+ (press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string")
21
27
  )
22
28
  }
23
29
  }