triangle-types 1.0.129 → 1.0.131

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,8 +3,8 @@ export * from "./types/application/ApplicationStage.js";
3
3
  export * from "./types/twitter/TwitterTweet.js";
4
4
  export * from "./types/twitter/TwitterUser.js";
5
5
  export * from "./types/twitter/TwitterUserTag.js";
6
- export * from "./types/www/WWWArticle.js";
7
- export * from "./types/www/WWWArticleTag.js";
6
+ export * from "./types/web/WebArticle.js";
7
+ export * from "./types/web/WebArticleTag.js";
8
8
  export * from "./types/youtube/YoutubeChannel.js";
9
9
  export * from "./types/youtube/YoutubeVideo.js";
10
10
  export * from "./types/youtube/YoutubeVideoTag.js";
package/dist/src/index.js CHANGED
@@ -3,8 +3,8 @@ export * from "./types/application/ApplicationStage.js";
3
3
  export * from "./types/twitter/TwitterTweet.js";
4
4
  export * from "./types/twitter/TwitterUser.js";
5
5
  export * from "./types/twitter/TwitterUserTag.js";
6
- export * from "./types/www/WWWArticle.js";
7
- export * from "./types/www/WWWArticleTag.js";
6
+ export * from "./types/web/WebArticle.js";
7
+ export * from "./types/web/WebArticleTag.js";
8
8
  export * from "./types/youtube/YoutubeChannel.js";
9
9
  export * from "./types/youtube/YoutubeVideo.js";
10
10
  export * from "./types/youtube/YoutubeVideoTag.js";
@@ -1,8 +1,8 @@
1
1
  export declare class Scout {
2
2
  readonly scout_id: string;
3
3
  readonly name: string;
4
- readonly www_ballotpedia_article_id?: string;
5
- readonly www_wikipedia_article_id?: string;
4
+ readonly ballotpedia_article_id?: string;
5
+ readonly wikipedia_article_id?: string;
6
6
  readonly s3_id_img?: string;
7
7
  readonly [x: string]: any;
8
8
  constructor(scout: any);
@@ -7,8 +7,8 @@ export class Scout {
7
7
  scout_id;
8
8
  // readonly scout_type_id : ScoutTypeID
9
9
  name;
10
- www_ballotpedia_article_id;
11
- www_wikipedia_article_id;
10
+ ballotpedia_article_id;
11
+ wikipedia_article_id;
12
12
  s3_id_img;
13
13
  constructor(scout) {
14
14
  if (!Scout.is(scout)) {
@@ -17,8 +17,8 @@ export class Scout {
17
17
  this.scout_id = scout.scout_id;
18
18
  // this.scout_type_id = scout.scout_type_id
19
19
  this.name = scout.name;
20
- this.www_ballotpedia_article_id = scout.www_ballotpedia_article_id;
21
- this.www_wikipedia_article_id = scout.www_wikipedia_article_id;
20
+ this.ballotpedia_article_id = scout.ballotpedia_article_id;
21
+ this.wikipedia_article_id = scout.wikipedia_article_id;
22
22
  this.s3_id_img = scout.s3_id_img;
23
23
  }
24
24
  static is(scout) {
@@ -26,8 +26,8 @@ export class Scout {
26
26
  typeof scout.scout_id === "string" &&
27
27
  // is_scout_type_id(scout.scout_type_id) &&
28
28
  typeof scout.name === "string" &&
29
- (scout.www_ballotpedia_article_id === undefined || typeof scout.www_ballotpedia_article_id === "string") &&
30
- (scout.www_wikipedia_article_id === undefined || typeof scout.www_wikipedia_article_id === "string") &&
29
+ (scout.ballotpedia_article_id === undefined || typeof scout.ballotpedia_article_id === "string") &&
30
+ (scout.wikipedia_article_id === undefined || typeof scout.wikipedia_article_id === "string") &&
31
31
  (scout.s3_id_img === undefined || typeof scout.s3_id_img === "string"));
32
32
  }
33
33
  }
@@ -0,0 +1,11 @@
1
+ export declare class WebArticle {
2
+ readonly web_article_id: string;
3
+ readonly url: string;
4
+ readonly title?: string;
5
+ readonly date?: string;
6
+ readonly relevance?: string;
7
+ readonly s3_id_html?: string;
8
+ readonly s3_id_txt?: string;
9
+ constructor(web_article: WebArticle);
10
+ static is(web_article: any): web_article is WebArticle;
11
+ }
@@ -0,0 +1,31 @@
1
+ export class WebArticle {
2
+ web_article_id;
3
+ url;
4
+ title;
5
+ date;
6
+ relevance;
7
+ s3_id_html;
8
+ s3_id_txt;
9
+ constructor(web_article) {
10
+ if (!WebArticle.is(web_article)) {
11
+ throw Error("Invalid input.");
12
+ }
13
+ this.web_article_id = web_article.web_article_id;
14
+ this.url = web_article.url;
15
+ this.title = web_article.title;
16
+ this.date = web_article.date;
17
+ this.relevance = web_article.relevance;
18
+ this.s3_id_html = web_article.s3_id_html;
19
+ this.s3_id_txt = web_article.s3_id_txt;
20
+ }
21
+ static is(web_article) {
22
+ return (web_article !== undefined &&
23
+ typeof web_article.web_article_id === "string" &&
24
+ typeof web_article.url === "string" &&
25
+ (web_article.title === undefined || typeof web_article.title === "string") &&
26
+ (web_article.date === undefined || typeof web_article.date === "string") &&
27
+ (web_article.relevance === undefined || typeof web_article.relevance === "string") &&
28
+ (web_article.s3_id_html === undefined || typeof web_article.s3_id_html === "string") &&
29
+ (web_article.s3_id_txt === undefined || typeof web_article.s3_id_txt === "string"));
30
+ }
31
+ }
@@ -0,0 +1,17 @@
1
+ import { WebArticle } from "./WebArticle.js";
2
+ export declare class WebArticleTag {
3
+ readonly web_article_id: string;
4
+ readonly tag_id: string;
5
+ readonly url: string;
6
+ readonly date?: string;
7
+ readonly relevance?: string;
8
+ readonly sentiment?: string;
9
+ readonly [x: string]: any;
10
+ constructor(web_article_tag: WebArticleTag);
11
+ static is(web_article_tag: any): web_article_tag is WebArticleTag;
12
+ }
13
+ export declare class WebArticleTagAux extends WebArticleTag {
14
+ readonly web_article: WebArticle;
15
+ constructor(web_article_tag: any);
16
+ static is(web_article_tag: any): web_article_tag is WebArticleTagAux;
17
+ }
@@ -0,0 +1,43 @@
1
+ import { WebArticle } from "./WebArticle.js";
2
+ export class WebArticleTag {
3
+ web_article_id;
4
+ tag_id;
5
+ url;
6
+ date;
7
+ relevance;
8
+ sentiment;
9
+ constructor(web_article_tag) {
10
+ if (!WebArticleTag.is(web_article_tag)) {
11
+ throw Error("Invalid input.");
12
+ }
13
+ this.web_article_id = web_article_tag.web_article_id;
14
+ this.tag_id = web_article_tag.tag_id;
15
+ this.url = web_article_tag.url;
16
+ this.date = web_article_tag.date;
17
+ this.relevance = web_article_tag.relevance;
18
+ this.sentiment = web_article_tag.sentiment;
19
+ }
20
+ static is(web_article_tag) {
21
+ return (web_article_tag !== undefined &&
22
+ typeof web_article_tag.web_article_id === "string" &&
23
+ typeof web_article_tag.tag_id === "string" &&
24
+ typeof web_article_tag.url === "string" &&
25
+ (web_article_tag.date === undefined || typeof web_article_tag.date === "string") &&
26
+ (web_article_tag.relevance === undefined || typeof web_article_tag.relevance === "string") &&
27
+ (web_article_tag.sentiment === undefined || typeof web_article_tag.sentiment === "string"));
28
+ }
29
+ }
30
+ export class WebArticleTagAux extends WebArticleTag {
31
+ web_article;
32
+ constructor(web_article_tag) {
33
+ if (!WebArticleTagAux.is(web_article_tag)) {
34
+ throw Error("Invalid input.");
35
+ }
36
+ super(web_article_tag);
37
+ this.web_article = web_article_tag.web_article;
38
+ }
39
+ static is(web_article_tag) {
40
+ return (WebArticleTag.is(web_article_tag) &&
41
+ WebArticle.is(web_article_tag.web_article));
42
+ }
43
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.129",
3
+ "version": "1.0.131",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -5,8 +5,8 @@ export * from "./types/application/ApplicationStage"
5
5
  export * from "./types/twitter/TwitterTweet"
6
6
  export * from "./types/twitter/TwitterUser"
7
7
  export * from "./types/twitter/TwitterUserTag"
8
- export * from "./types/www/WWWArticle"
9
- export * from "./types/www/WWWArticleTag"
8
+ export * from "./types/web/WebArticle"
9
+ export * from "./types/web/WebArticleTag"
10
10
  export * from "./types/youtube/YoutubeChannel"
11
11
  export * from "./types/youtube/YoutubeVideo"
12
12
  export * from "./types/youtube/YoutubeVideoTag"
@@ -13,8 +13,8 @@ export class Scout {
13
13
  readonly scout_id : string
14
14
  // readonly scout_type_id : ScoutTypeID
15
15
  readonly name : string
16
- readonly www_ballotpedia_article_id? : string
17
- readonly www_wikipedia_article_id? : string
16
+ readonly ballotpedia_article_id? : string
17
+ readonly wikipedia_article_id? : string
18
18
  readonly s3_id_img? : string
19
19
  readonly [x : string] : any
20
20
 
@@ -25,8 +25,8 @@ export class Scout {
25
25
  this.scout_id = scout.scout_id
26
26
  // this.scout_type_id = scout.scout_type_id
27
27
  this.name = scout.name
28
- this.www_ballotpedia_article_id = scout.www_ballotpedia_article_id
29
- this.www_wikipedia_article_id = scout.www_wikipedia_article_id
28
+ this.ballotpedia_article_id = scout.ballotpedia_article_id
29
+ this.wikipedia_article_id = scout.wikipedia_article_id
30
30
  this.s3_id_img = scout.s3_id_img
31
31
  }
32
32
 
@@ -36,8 +36,8 @@ export class Scout {
36
36
  typeof scout.scout_id === "string" &&
37
37
  // is_scout_type_id(scout.scout_type_id) &&
38
38
  typeof scout.name === "string" &&
39
- (scout.www_ballotpedia_article_id === undefined || typeof scout.www_ballotpedia_article_id === "string") &&
40
- (scout.www_wikipedia_article_id === undefined || typeof scout.www_wikipedia_article_id === "string") &&
39
+ (scout.ballotpedia_article_id === undefined || typeof scout.ballotpedia_article_id === "string") &&
40
+ (scout.wikipedia_article_id === undefined || typeof scout.wikipedia_article_id === "string") &&
41
41
  (scout.s3_id_img === undefined || typeof scout.s3_id_img === "string")
42
42
  )
43
43
  }
@@ -0,0 +1,35 @@
1
+ export class WebArticle {
2
+ readonly web_article_id : string
3
+ readonly url : string
4
+ readonly title? : string
5
+ readonly date? : string
6
+ readonly relevance? : string
7
+ readonly s3_id_html? : string
8
+ readonly s3_id_txt? : string
9
+
10
+ constructor(web_article : WebArticle) {
11
+ if (!WebArticle.is(web_article)) {
12
+ throw Error("Invalid input.")
13
+ }
14
+ this.web_article_id = web_article.web_article_id
15
+ this.url = web_article.url
16
+ this.title = web_article.title
17
+ this.date = web_article.date
18
+ this.relevance = web_article.relevance
19
+ this.s3_id_html = web_article.s3_id_html
20
+ this.s3_id_txt = web_article.s3_id_txt
21
+ }
22
+
23
+ static is(web_article : any) : web_article is WebArticle {
24
+ return (
25
+ web_article !== undefined &&
26
+ typeof web_article.web_article_id === "string" &&
27
+ typeof web_article.url === "string" &&
28
+ (web_article.title === undefined || typeof web_article.title === "string") &&
29
+ (web_article.date === undefined || typeof web_article.date === "string") &&
30
+ (web_article.relevance === undefined || typeof web_article.relevance === "string") &&
31
+ (web_article.s3_id_html === undefined || typeof web_article.s3_id_html === "string") &&
32
+ (web_article.s3_id_txt === undefined || typeof web_article.s3_id_txt === "string")
33
+ )
34
+ }
35
+ }
@@ -0,0 +1,54 @@
1
+ import { WebArticle } from "./WebArticle"
2
+
3
+ export class WebArticleTag {
4
+ readonly web_article_id : string
5
+ readonly tag_id : string
6
+ readonly url : string
7
+ readonly date? : string
8
+ readonly relevance? : string
9
+ readonly sentiment? : string
10
+ readonly [x : string] : any
11
+
12
+ constructor(web_article_tag : WebArticleTag) {
13
+ if (!WebArticleTag.is(web_article_tag)) {
14
+ throw Error("Invalid input.")
15
+ }
16
+ this.web_article_id = web_article_tag.web_article_id
17
+ this.tag_id = web_article_tag.tag_id
18
+ this.url = web_article_tag.url
19
+ this.date = web_article_tag.date
20
+ this.relevance = web_article_tag.relevance
21
+ this.sentiment = web_article_tag.sentiment
22
+ }
23
+
24
+ static is(web_article_tag : any) : web_article_tag is WebArticleTag {
25
+ return (
26
+ web_article_tag !== undefined &&
27
+ typeof web_article_tag.web_article_id === "string" &&
28
+ typeof web_article_tag.tag_id === "string" &&
29
+ typeof web_article_tag.url === "string" &&
30
+ (web_article_tag.date === undefined || typeof web_article_tag.date === "string") &&
31
+ (web_article_tag.relevance === undefined || typeof web_article_tag.relevance === "string") &&
32
+ (web_article_tag.sentiment === undefined || typeof web_article_tag.sentiment === "string")
33
+ )
34
+ }
35
+ }
36
+
37
+ export class WebArticleTagAux extends WebArticleTag {
38
+ readonly web_article : WebArticle
39
+
40
+ constructor(web_article_tag : any) {
41
+ if (!WebArticleTagAux.is(web_article_tag)) {
42
+ throw Error("Invalid input.")
43
+ }
44
+ super(web_article_tag)
45
+ this.web_article = web_article_tag.web_article
46
+ }
47
+
48
+ static is(web_article_tag : any) : web_article_tag is WebArticleTagAux {
49
+ return (
50
+ WebArticleTag.is(web_article_tag) &&
51
+ WebArticle.is(web_article_tag.web_article)
52
+ )
53
+ }
54
+ }
@@ -1,35 +0,0 @@
1
- export class WWWArticle {
2
- readonly www_article_id : string
3
- readonly url : string
4
- readonly title? : string
5
- readonly date? : string
6
- readonly relevance? : string
7
- readonly s3_id_html? : string
8
- readonly s3_id_txt? : string
9
-
10
- constructor(www_article : WWWArticle) {
11
- if (!WWWArticle.is(www_article)) {
12
- throw Error("Invalid input.")
13
- }
14
- this.www_article_id = www_article.www_article_id
15
- this.url = www_article.url
16
- this.title = www_article.title
17
- this.date = www_article.date
18
- this.relevance = www_article.relevance
19
- this.s3_id_html = www_article.s3_id_html
20
- this.s3_id_txt = www_article.s3_id_txt
21
- }
22
-
23
- static is(www_article : any) : www_article is WWWArticle {
24
- return (
25
- www_article !== undefined &&
26
- typeof www_article.www_article_id === "string" &&
27
- typeof www_article.url === "string" &&
28
- (www_article.title === undefined || typeof www_article.title === "string") &&
29
- (www_article.date === undefined || typeof www_article.date === "string") &&
30
- (www_article.relevance === undefined || typeof www_article.relevance === "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")
33
- )
34
- }
35
- }
@@ -1,54 +0,0 @@
1
- import { WWWArticle } from "./WWWArticle"
2
-
3
- export class WWWArticleTag {
4
- readonly www_article_id : string
5
- readonly tag_id : string
6
- readonly url : string
7
- readonly date? : string
8
- readonly relevance? : string
9
- readonly sentiment? : string
10
- readonly [x : string] : any
11
-
12
- constructor(www_article_tag : WWWArticleTag) {
13
- if (!WWWArticleTag.is(www_article_tag)) {
14
- throw Error("Invalid input.")
15
- }
16
- this.www_article_id = www_article_tag.www_article_id
17
- this.tag_id = www_article_tag.tag_id
18
- this.url = www_article_tag.url
19
- this.date = www_article_tag.date
20
- this.relevance = www_article_tag.relevance
21
- this.sentiment = www_article_tag.sentiment
22
- }
23
-
24
- static is(www_article_tag : any) : www_article_tag is WWWArticleTag {
25
- return (
26
- www_article_tag !== undefined &&
27
- typeof www_article_tag.www_article_id === "string" &&
28
- typeof www_article_tag.tag_id === "string" &&
29
- typeof www_article_tag.url === "string" &&
30
- (www_article_tag.date === undefined || typeof www_article_tag.date === "string") &&
31
- (www_article_tag.relevance === undefined || typeof www_article_tag.relevance === "string") &&
32
- (www_article_tag.sentiment === undefined || typeof www_article_tag.sentiment === "string")
33
- )
34
- }
35
- }
36
-
37
- export class WWWArticleTagAux extends WWWArticleTag {
38
- readonly www_article : WWWArticle
39
-
40
- constructor(www_article_tag : any) {
41
- if (!WWWArticleTagAux.is(www_article_tag)) {
42
- throw Error("Invalid input.")
43
- }
44
- super(www_article_tag)
45
- this.www_article = www_article_tag.www_article
46
- }
47
-
48
- static is(www_article_tag : any) : www_article_tag is WWWArticleTagAux {
49
- return (
50
- WWWArticleTag.is(www_article_tag) &&
51
- WWWArticle.is(www_article_tag.www_article)
52
- )
53
- }
54
- }