elections-types 1.1.22 → 1.1.24
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.
|
@@ -5,7 +5,6 @@ export class PressArticle {
|
|
|
5
5
|
publisher;
|
|
6
6
|
domain;
|
|
7
7
|
url;
|
|
8
|
-
fetch_time;
|
|
9
8
|
relevance;
|
|
10
9
|
s3_id;
|
|
11
10
|
constructor(press_article) {
|
|
@@ -18,7 +17,6 @@ export class PressArticle {
|
|
|
18
17
|
this.publisher = press_article.publisher;
|
|
19
18
|
this.domain = press_article.domain;
|
|
20
19
|
this.url = press_article.url;
|
|
21
|
-
this.fetch_time = press_article.fetch_time;
|
|
22
20
|
this.relevance = press_article.relevance;
|
|
23
21
|
this.s3_id = press_article.s3_id;
|
|
24
22
|
}
|
|
@@ -30,7 +28,6 @@ export class PressArticle {
|
|
|
30
28
|
(press_article.publisher === undefined || typeof press_article.publisher === "string") &&
|
|
31
29
|
typeof press_article.domain === "string" &&
|
|
32
30
|
typeof press_article.url === "string" &&
|
|
33
|
-
typeof press_article.fetch_time === "string" &&
|
|
34
31
|
(press_article.relevance === undefined || typeof press_article.relevance === "string") &&
|
|
35
32
|
(press_article.s3_id === undefined || typeof press_article.s3_id === "string"));
|
|
36
33
|
}
|
|
@@ -4,6 +4,7 @@ export declare class PressArticleTag {
|
|
|
4
4
|
readonly tag_id: string;
|
|
5
5
|
readonly publish_date: string;
|
|
6
6
|
readonly relevance?: string;
|
|
7
|
+
readonly sentiment?: string;
|
|
7
8
|
readonly [x: string]: any;
|
|
8
9
|
constructor(press_article_tag: PressArticleTag);
|
|
9
10
|
static is(press_article_tag: any): press_article_tag is PressArticleTag;
|
|
@@ -4,6 +4,7 @@ export class PressArticleTag {
|
|
|
4
4
|
tag_id;
|
|
5
5
|
publish_date;
|
|
6
6
|
relevance;
|
|
7
|
+
sentiment;
|
|
7
8
|
constructor(press_article_tag) {
|
|
8
9
|
if (!PressArticleTag.is(press_article_tag)) {
|
|
9
10
|
throw Error("Invalid input.");
|
|
@@ -12,13 +13,15 @@ export class PressArticleTag {
|
|
|
12
13
|
this.tag_id = press_article_tag.tag_id;
|
|
13
14
|
this.publish_date = press_article_tag.publish_date;
|
|
14
15
|
this.relevance = press_article_tag.relevance;
|
|
16
|
+
this.sentiment = press_article_tag.sentiment;
|
|
15
17
|
}
|
|
16
18
|
static is(press_article_tag) {
|
|
17
19
|
return (press_article_tag !== undefined &&
|
|
18
20
|
typeof press_article_tag.press_article_id === "string" &&
|
|
19
21
|
typeof press_article_tag.tag_id === "string" &&
|
|
20
22
|
typeof press_article_tag.publish_date === "string" &&
|
|
21
|
-
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string")
|
|
23
|
+
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string") &&
|
|
24
|
+
(press_article_tag.sentiment === undefined || typeof press_article_tag.sentiment === "string"));
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
export class PressArticleTagAux extends PressArticleTag {
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ export class PressArticle {
|
|
|
5
5
|
readonly publisher? : string
|
|
6
6
|
readonly domain : string
|
|
7
7
|
readonly url : string
|
|
8
|
-
readonly fetch_time : string
|
|
9
8
|
readonly relevance? : string
|
|
10
9
|
readonly s3_id? : string
|
|
11
10
|
|
|
@@ -19,7 +18,6 @@ export class PressArticle {
|
|
|
19
18
|
this.publisher = press_article.publisher
|
|
20
19
|
this.domain = press_article.domain
|
|
21
20
|
this.url = press_article.url
|
|
22
|
-
this.fetch_time = press_article.fetch_time
|
|
23
21
|
this.relevance = press_article.relevance
|
|
24
22
|
this.s3_id = press_article.s3_id
|
|
25
23
|
}
|
|
@@ -33,7 +31,6 @@ export class PressArticle {
|
|
|
33
31
|
(press_article.publisher === undefined || typeof press_article.publisher === "string") &&
|
|
34
32
|
typeof press_article.domain === "string" &&
|
|
35
33
|
typeof press_article.url === "string" &&
|
|
36
|
-
typeof press_article.fetch_time === "string" &&
|
|
37
34
|
(press_article.relevance === undefined || typeof press_article.relevance === "string") &&
|
|
38
35
|
(press_article.s3_id === undefined || typeof press_article.s3_id === "string")
|
|
39
36
|
)
|
|
@@ -5,6 +5,7 @@ export class PressArticleTag {
|
|
|
5
5
|
readonly tag_id : string
|
|
6
6
|
readonly publish_date : string
|
|
7
7
|
readonly relevance? : string
|
|
8
|
+
readonly sentiment? : string
|
|
8
9
|
readonly [x : string] : any
|
|
9
10
|
|
|
10
11
|
constructor(press_article_tag : PressArticleTag) {
|
|
@@ -15,6 +16,7 @@ export class PressArticleTag {
|
|
|
15
16
|
this.tag_id = press_article_tag.tag_id
|
|
16
17
|
this.publish_date = press_article_tag.publish_date
|
|
17
18
|
this.relevance = press_article_tag.relevance
|
|
19
|
+
this.sentiment = press_article_tag.sentiment
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
static is(press_article_tag : any) : press_article_tag is PressArticleTag {
|
|
@@ -23,7 +25,8 @@ export class PressArticleTag {
|
|
|
23
25
|
typeof press_article_tag.press_article_id === "string" &&
|
|
24
26
|
typeof press_article_tag.tag_id === "string" &&
|
|
25
27
|
typeof press_article_tag.publish_date === "string" &&
|
|
26
|
-
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string")
|
|
28
|
+
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string") &&
|
|
29
|
+
(press_article_tag.sentiment === undefined || typeof press_article_tag.sentiment === "string")
|
|
27
30
|
)
|
|
28
31
|
}
|
|
29
32
|
}
|