triangle-types 1.0.126 → 1.0.128

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,9 +2,10 @@ export declare class WWWArticle {
2
2
  readonly www_article_id: string;
3
3
  readonly url: string;
4
4
  readonly title: string;
5
- readonly publish_date: string;
5
+ readonly date?: string;
6
6
  readonly relevance?: string;
7
- readonly s3_id?: string;
7
+ readonly s3_id_html?: string;
8
+ readonly s3_id_txt?: string;
8
9
  constructor(www_article: WWWArticle);
9
10
  static is(www_article: any): www_article is WWWArticle;
10
11
  }
@@ -2,9 +2,10 @@ export class WWWArticle {
2
2
  www_article_id;
3
3
  url;
4
4
  title;
5
- publish_date;
5
+ date;
6
6
  relevance;
7
- s3_id;
7
+ s3_id_html;
8
+ s3_id_txt;
8
9
  constructor(www_article) {
9
10
  if (!WWWArticle.is(www_article)) {
10
11
  throw Error("Invalid input.");
@@ -12,17 +13,19 @@ export class WWWArticle {
12
13
  this.www_article_id = www_article.www_article_id;
13
14
  this.url = www_article.url;
14
15
  this.title = www_article.title;
15
- this.publish_date = www_article.publish_date;
16
+ this.date = www_article.date;
16
17
  this.relevance = www_article.relevance;
17
- this.s3_id = www_article.s3_id;
18
+ this.s3_id_html = www_article.s3_id_html;
19
+ this.s3_id_txt = www_article.s3_id_txt;
18
20
  }
19
21
  static is(www_article) {
20
22
  return (www_article !== undefined &&
21
23
  typeof www_article.www_article_id === "string" &&
22
24
  typeof www_article.url === "string" &&
23
25
  typeof www_article.title === "string" &&
24
- typeof www_article.publish_date === "string" &&
26
+ (www_article.date === undefined || typeof www_article.date === "string") &&
25
27
  (www_article.relevance === undefined || typeof www_article.relevance === "string") &&
26
- (www_article.s3_id === undefined || typeof www_article.s3_id === "string"));
28
+ (www_article.s3_id_html === undefined || typeof www_article.s3_id_html === "string") &&
29
+ (www_article.s3_id_txt === undefined || typeof www_article.s3_id_txt === "string"));
27
30
  }
28
31
  }
@@ -3,7 +3,7 @@ export declare class WWWArticleTag {
3
3
  readonly www_article_id: string;
4
4
  readonly tag_id: string;
5
5
  readonly url: string;
6
- readonly publish_date: string;
6
+ readonly date?: string;
7
7
  readonly relevance?: string;
8
8
  readonly sentiment?: string;
9
9
  readonly [x: string]: any;
@@ -3,7 +3,7 @@ export class WWWArticleTag {
3
3
  www_article_id;
4
4
  tag_id;
5
5
  url;
6
- publish_date;
6
+ date;
7
7
  relevance;
8
8
  sentiment;
9
9
  constructor(www_article_tag) {
@@ -13,7 +13,7 @@ export class WWWArticleTag {
13
13
  this.www_article_id = www_article_tag.www_article_id;
14
14
  this.tag_id = www_article_tag.tag_id;
15
15
  this.url = www_article_tag.url;
16
- this.publish_date = www_article_tag.publish_date;
16
+ this.date = www_article_tag.date;
17
17
  this.relevance = www_article_tag.relevance;
18
18
  this.sentiment = www_article_tag.sentiment;
19
19
  }
@@ -22,7 +22,7 @@ export class WWWArticleTag {
22
22
  typeof www_article_tag.www_article_id === "string" &&
23
23
  typeof www_article_tag.tag_id === "string" &&
24
24
  typeof www_article_tag.url === "string" &&
25
- typeof www_article_tag.publish_date === "string" &&
25
+ (www_article_tag.date === undefined || typeof www_article_tag.date === "string") &&
26
26
  (www_article_tag.relevance === undefined || typeof www_article_tag.relevance === "string") &&
27
27
  (www_article_tag.sentiment === undefined || typeof www_article_tag.sentiment === "string"));
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.126",
3
+ "version": "1.0.128",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -2,9 +2,10 @@ export class WWWArticle {
2
2
  readonly www_article_id : string
3
3
  readonly url : string
4
4
  readonly title : string
5
- readonly publish_date : string
5
+ readonly date? : string
6
6
  readonly relevance? : string
7
- readonly s3_id? : string
7
+ readonly s3_id_html? : string
8
+ readonly s3_id_txt? : string
8
9
 
9
10
  constructor(www_article : WWWArticle) {
10
11
  if (!WWWArticle.is(www_article)) {
@@ -13,9 +14,10 @@ export class WWWArticle {
13
14
  this.www_article_id = www_article.www_article_id
14
15
  this.url = www_article.url
15
16
  this.title = www_article.title
16
- this.publish_date = www_article.publish_date
17
+ this.date = www_article.date
17
18
  this.relevance = www_article.relevance
18
- this.s3_id = www_article.s3_id
19
+ this.s3_id_html = www_article.s3_id_html
20
+ this.s3_id_txt = www_article.s3_id_txt
19
21
  }
20
22
 
21
23
  static is(www_article : any) : www_article is WWWArticle {
@@ -24,9 +26,10 @@ export class WWWArticle {
24
26
  typeof www_article.www_article_id === "string" &&
25
27
  typeof www_article.url === "string" &&
26
28
  typeof www_article.title === "string" &&
27
- typeof www_article.publish_date === "string" &&
29
+ (www_article.date === undefined || typeof www_article.date === "string") &&
28
30
  (www_article.relevance === undefined || typeof www_article.relevance === "string") &&
29
- (www_article.s3_id === undefined || typeof www_article.s3_id === "string")
31
+ (www_article.s3_id_html === undefined || typeof www_article.s3_id_html === "string") &&
32
+ (www_article.s3_id_txt === undefined || typeof www_article.s3_id_txt === "string")
30
33
  )
31
34
  }
32
35
  }
@@ -4,7 +4,7 @@ export class WWWArticleTag {
4
4
  readonly www_article_id : string
5
5
  readonly tag_id : string
6
6
  readonly url : string
7
- readonly publish_date : string
7
+ readonly date? : string
8
8
  readonly relevance? : string
9
9
  readonly sentiment? : string
10
10
  readonly [x : string] : any
@@ -16,7 +16,7 @@ export class WWWArticleTag {
16
16
  this.www_article_id = www_article_tag.www_article_id
17
17
  this.tag_id = www_article_tag.tag_id
18
18
  this.url = www_article_tag.url
19
- this.publish_date = www_article_tag.publish_date
19
+ this.date = www_article_tag.date
20
20
  this.relevance = www_article_tag.relevance
21
21
  this.sentiment = www_article_tag.sentiment
22
22
  }
@@ -27,7 +27,7 @@ export class WWWArticleTag {
27
27
  typeof www_article_tag.www_article_id === "string" &&
28
28
  typeof www_article_tag.tag_id === "string" &&
29
29
  typeof www_article_tag.url === "string" &&
30
- typeof www_article_tag.publish_date === "string" &&
30
+ (www_article_tag.date === undefined || typeof www_article_tag.date === "string") &&
31
31
  (www_article_tag.relevance === undefined || typeof www_article_tag.relevance === "string") &&
32
32
  (www_article_tag.sentiment === undefined || typeof www_article_tag.sentiment === "string")
33
33
  )