triangle-types 1.0.208 → 1.0.209
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FederalCongressBillDocument } from "../federal_congress/FederalCongressBillDocument.js";
|
|
2
2
|
import { LegistarDocument } from "../legistar/LegistarDocument.js";
|
|
3
|
-
import {
|
|
3
|
+
import { WebArticleTag } from "../web/WebArticleTag.js";
|
|
4
4
|
import { ScoutDocument } from "../scout/ScoutDocument.js";
|
|
5
5
|
import { TwitterTweet } from "../twitter/TwitterTweet.js";
|
|
6
6
|
declare const fragment_type_ids: readonly ["LINE", "CHAR"];
|
|
7
7
|
export type FragmentTypeID = typeof fragment_type_ids[number];
|
|
8
8
|
export declare function is_fragment_type_id(fragment_type_id: any): fragment_type_id is FragmentTypeID;
|
|
9
|
-
declare const document_type_ids: readonly ["federal_congress_bill_document", "legistar_document", "
|
|
9
|
+
declare const document_type_ids: readonly ["federal_congress_bill_document", "legistar_document", "web_article_tag", "scout_document", "twitter_tweet"];
|
|
10
10
|
export type DocumentTypeID = typeof document_type_ids[number];
|
|
11
11
|
export declare function is_document_type_id(document_type_id: any): document_type_id is DocumentTypeID;
|
|
12
12
|
export declare class Fragment {
|
|
@@ -25,7 +25,7 @@ export declare class Fragment {
|
|
|
25
25
|
export declare class FragmentAux extends Fragment {
|
|
26
26
|
readonly federal_congress_bill_document?: FederalCongressBillDocument;
|
|
27
27
|
readonly legistar_document?: LegistarDocument;
|
|
28
|
-
readonly
|
|
28
|
+
readonly web_article_tag?: WebArticleTag;
|
|
29
29
|
readonly scout_document?: ScoutDocument;
|
|
30
30
|
readonly twitter_tweet?: TwitterTweet;
|
|
31
31
|
constructor(fragment: FragmentAux);
|
|
@@ -43,12 +43,12 @@ export declare class LegistarDocumentFragment extends Fragment {
|
|
|
43
43
|
constructor(fragment: LegistarDocumentFragment);
|
|
44
44
|
static is(fragment: any): fragment is LegistarDocumentFragment;
|
|
45
45
|
}
|
|
46
|
-
export declare class
|
|
47
|
-
readonly document_type_id: "
|
|
48
|
-
readonly
|
|
46
|
+
export declare class WebArticleTagFragment extends Fragment {
|
|
47
|
+
readonly document_type_id: "web_article_tag";
|
|
48
|
+
readonly web_article_id: string;
|
|
49
49
|
readonly tag_id: string;
|
|
50
|
-
constructor(fragment:
|
|
51
|
-
static is(fragment: any): fragment is
|
|
50
|
+
constructor(fragment: WebArticleTagFragment);
|
|
51
|
+
static is(fragment: any): fragment is WebArticleTagFragment;
|
|
52
52
|
}
|
|
53
53
|
export declare class ScoutDocumentFragment extends Fragment {
|
|
54
54
|
readonly document_type_id: "scout_document";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FederalCongressBillDocument } from "../federal_congress/FederalCongressBillDocument.js";
|
|
2
2
|
import { LegistarDocument } from "../legistar/LegistarDocument.js";
|
|
3
|
-
import {
|
|
3
|
+
import { WebArticleTag } from "../web/WebArticleTag.js";
|
|
4
4
|
import { ScoutDocument } from "../scout/ScoutDocument.js";
|
|
5
5
|
import { TwitterTweet } from "../twitter/TwitterTweet.js";
|
|
6
6
|
const fragment_type_ids = ["LINE", "CHAR"];
|
|
7
7
|
export function is_fragment_type_id(fragment_type_id) {
|
|
8
8
|
return fragment_type_ids.includes(fragment_type_id);
|
|
9
9
|
}
|
|
10
|
-
const document_type_ids = ["federal_congress_bill_document", "legistar_document", "
|
|
10
|
+
const document_type_ids = ["federal_congress_bill_document", "legistar_document", "web_article_tag", "scout_document", "twitter_tweet"];
|
|
11
11
|
export function is_document_type_id(document_type_id) {
|
|
12
12
|
return document_type_ids.includes(document_type_id);
|
|
13
13
|
}
|
|
@@ -48,7 +48,7 @@ export class Fragment {
|
|
|
48
48
|
export class FragmentAux extends Fragment {
|
|
49
49
|
federal_congress_bill_document;
|
|
50
50
|
legistar_document;
|
|
51
|
-
|
|
51
|
+
web_article_tag;
|
|
52
52
|
scout_document;
|
|
53
53
|
twitter_tweet;
|
|
54
54
|
constructor(fragment) {
|
|
@@ -58,7 +58,7 @@ export class FragmentAux extends Fragment {
|
|
|
58
58
|
super(fragment);
|
|
59
59
|
this.federal_congress_bill_document = fragment.federal_congress_bill_document;
|
|
60
60
|
this.legistar_document = fragment.legistar_document;
|
|
61
|
-
this.
|
|
61
|
+
this.web_article_tag = fragment.web_article_tag;
|
|
62
62
|
this.scout_document = fragment.scout_document;
|
|
63
63
|
this.twitter_tweet = fragment.twitter_tweet;
|
|
64
64
|
}
|
|
@@ -66,7 +66,7 @@ export class FragmentAux extends Fragment {
|
|
|
66
66
|
return (Fragment.is(fragment) &&
|
|
67
67
|
(fragment.federal_congress_bill_document === undefined || FederalCongressBillDocument.is(fragment.federal_congress_bill_document)) &&
|
|
68
68
|
(fragment.legistar_document === undefined || LegistarDocument.is(fragment.legistar_document)) &&
|
|
69
|
-
(fragment.
|
|
69
|
+
(fragment.web_article_tag === undefined || WebArticleTag.is(fragment.web_article_tag)) &&
|
|
70
70
|
(fragment.scout_document === undefined || ScoutDocument.is(fragment.scout_document)) &&
|
|
71
71
|
(fragment.twitter_tweet === undefined || TwitterTweet.is(fragment.twitter_tweet)));
|
|
72
72
|
}
|
|
@@ -105,36 +105,36 @@ export class LegistarDocumentFragment extends Fragment {
|
|
|
105
105
|
typeof fragment.legistar_document_id === "string");
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
export class
|
|
108
|
+
export class WebArticleTagFragment extends Fragment {
|
|
109
109
|
document_type_id;
|
|
110
|
-
|
|
110
|
+
web_article_id;
|
|
111
111
|
tag_id;
|
|
112
112
|
constructor(fragment) {
|
|
113
|
-
if (!
|
|
113
|
+
if (!WebArticleTagFragment.is(fragment)) {
|
|
114
114
|
throw Error("Invalid input.");
|
|
115
115
|
}
|
|
116
116
|
super(fragment);
|
|
117
117
|
this.document_type_id = fragment.document_type_id;
|
|
118
|
-
this.
|
|
118
|
+
this.web_article_id = fragment.web_article_id;
|
|
119
119
|
this.tag_id = fragment.tag_id;
|
|
120
120
|
}
|
|
121
121
|
static is(fragment) {
|
|
122
122
|
return (Fragment.is(fragment) &&
|
|
123
|
-
fragment.document_type_id === "
|
|
124
|
-
typeof fragment.
|
|
123
|
+
fragment.document_type_id === "web_article_tag" &&
|
|
124
|
+
typeof fragment.web_article_id === "string" &&
|
|
125
125
|
typeof fragment.tag_id === "string");
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
// export class
|
|
129
|
-
// readonly
|
|
130
|
-
// constructor(fragment :
|
|
131
|
-
// if (!
|
|
128
|
+
// export class WebArticleTagFragmentAux extends WebArticleTagFragment {
|
|
129
|
+
// readonly web_article_ : WebArticleTagAux
|
|
130
|
+
// constructor(fragment : WebArticleTagFragmentAux) {
|
|
131
|
+
// if (!WebArticleTagFragmentAux.is(fragment)) {
|
|
132
132
|
// throw Error("Invalid input.")
|
|
133
133
|
// }
|
|
134
134
|
// super(fragment)
|
|
135
135
|
// this.scout_document = fragment.scout_document
|
|
136
136
|
// }
|
|
137
|
-
// static is(fragment : any) : fragment is
|
|
137
|
+
// static is(fragment : any) : fragment is WebArticleTagFragmentAux {
|
|
138
138
|
// return (
|
|
139
139
|
// Fragment.is(fragment) &&
|
|
140
140
|
// ScoutDocument.is(fragment.scout_document)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FederalCongressBillDocument } from "../federal_congress/FederalCongressBillDocument"
|
|
2
2
|
import { LegistarDocument } from "../legistar/LegistarDocument"
|
|
3
|
-
import {
|
|
3
|
+
import { WebArticleTag, WebArticleTagAux } from "../web/WebArticleTag"
|
|
4
4
|
import { ScoutDocument } from "../scout/ScoutDocument"
|
|
5
5
|
import { TwitterTweet } from "../twitter/TwitterTweet"
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ export function is_fragment_type_id(fragment_type_id : any) : fragment_type_id i
|
|
|
12
12
|
return fragment_type_ids.includes(fragment_type_id)
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const document_type_ids = ["federal_congress_bill_document", "legistar_document", "
|
|
15
|
+
const document_type_ids = ["federal_congress_bill_document", "legistar_document", "web_article_tag", "scout_document", "twitter_tweet"] as const
|
|
16
16
|
|
|
17
17
|
export type DocumentTypeID = typeof document_type_ids[number]
|
|
18
18
|
|
|
@@ -63,7 +63,7 @@ export class Fragment {
|
|
|
63
63
|
export class FragmentAux extends Fragment {
|
|
64
64
|
readonly federal_congress_bill_document? : FederalCongressBillDocument
|
|
65
65
|
readonly legistar_document? : LegistarDocument
|
|
66
|
-
readonly
|
|
66
|
+
readonly web_article_tag? : WebArticleTag
|
|
67
67
|
readonly scout_document? : ScoutDocument
|
|
68
68
|
readonly twitter_tweet? : TwitterTweet
|
|
69
69
|
|
|
@@ -74,7 +74,7 @@ export class FragmentAux extends Fragment {
|
|
|
74
74
|
super(fragment)
|
|
75
75
|
this.federal_congress_bill_document = fragment.federal_congress_bill_document
|
|
76
76
|
this.legistar_document = fragment.legistar_document
|
|
77
|
-
this.
|
|
77
|
+
this.web_article_tag = fragment.web_article_tag
|
|
78
78
|
this.scout_document = fragment.scout_document
|
|
79
79
|
this.twitter_tweet = fragment.twitter_tweet
|
|
80
80
|
}
|
|
@@ -84,7 +84,7 @@ export class FragmentAux extends Fragment {
|
|
|
84
84
|
Fragment.is(fragment) &&
|
|
85
85
|
(fragment.federal_congress_bill_document === undefined || FederalCongressBillDocument.is(fragment.federal_congress_bill_document)) &&
|
|
86
86
|
(fragment.legistar_document === undefined || LegistarDocument.is(fragment.legistar_document)) &&
|
|
87
|
-
(fragment.
|
|
87
|
+
(fragment.web_article_tag === undefined || WebArticleTag.is(fragment.web_article_tag)) &&
|
|
88
88
|
(fragment.scout_document === undefined || ScoutDocument.is(fragment.scout_document)) &&
|
|
89
89
|
(fragment.twitter_tweet === undefined || TwitterTweet.is(fragment.twitter_tweet))
|
|
90
90
|
)
|
|
@@ -135,43 +135,43 @@ export class LegistarDocumentFragment extends Fragment {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
export class
|
|
139
|
-
readonly document_type_id : "
|
|
140
|
-
readonly
|
|
138
|
+
export class WebArticleTagFragment extends Fragment {
|
|
139
|
+
readonly document_type_id : "web_article_tag"
|
|
140
|
+
readonly web_article_id : string
|
|
141
141
|
readonly tag_id : string
|
|
142
142
|
|
|
143
|
-
constructor(fragment :
|
|
144
|
-
if (!
|
|
143
|
+
constructor(fragment : WebArticleTagFragment) {
|
|
144
|
+
if (!WebArticleTagFragment.is(fragment)) {
|
|
145
145
|
throw Error("Invalid input.")
|
|
146
146
|
}
|
|
147
147
|
super(fragment)
|
|
148
148
|
this.document_type_id = fragment.document_type_id
|
|
149
|
-
this.
|
|
149
|
+
this.web_article_id = fragment.web_article_id
|
|
150
150
|
this.tag_id = fragment.tag_id
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
static is(fragment : any) : fragment is
|
|
153
|
+
static is(fragment : any) : fragment is WebArticleTagFragment {
|
|
154
154
|
return (
|
|
155
155
|
Fragment.is(fragment) &&
|
|
156
|
-
fragment.document_type_id === "
|
|
157
|
-
typeof fragment.
|
|
156
|
+
fragment.document_type_id === "web_article_tag" &&
|
|
157
|
+
typeof fragment.web_article_id === "string" &&
|
|
158
158
|
typeof fragment.tag_id === "string"
|
|
159
159
|
)
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
// export class
|
|
164
|
-
// readonly
|
|
163
|
+
// export class WebArticleTagFragmentAux extends WebArticleTagFragment {
|
|
164
|
+
// readonly web_article_ : WebArticleTagAux
|
|
165
165
|
|
|
166
|
-
// constructor(fragment :
|
|
167
|
-
// if (!
|
|
166
|
+
// constructor(fragment : WebArticleTagFragmentAux) {
|
|
167
|
+
// if (!WebArticleTagFragmentAux.is(fragment)) {
|
|
168
168
|
// throw Error("Invalid input.")
|
|
169
169
|
// }
|
|
170
170
|
// super(fragment)
|
|
171
171
|
// this.scout_document = fragment.scout_document
|
|
172
172
|
// }
|
|
173
173
|
|
|
174
|
-
// static is(fragment : any) : fragment is
|
|
174
|
+
// static is(fragment : any) : fragment is WebArticleTagFragmentAux {
|
|
175
175
|
// return (
|
|
176
176
|
// Fragment.is(fragment) &&
|
|
177
177
|
// ScoutDocument.is(fragment.scout_document)
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export class PressArticle {
|
|
2
|
-
readonly press_article_id : string
|
|
3
|
-
readonly publish_date : string
|
|
4
|
-
readonly title : string
|
|
5
|
-
readonly publisher? : string
|
|
6
|
-
readonly domain : string
|
|
7
|
-
readonly url : string
|
|
8
|
-
readonly relevance? : string
|
|
9
|
-
readonly s3_id? : string
|
|
10
|
-
|
|
11
|
-
constructor(press_article : PressArticle) {
|
|
12
|
-
if (!PressArticle.is(press_article)) {
|
|
13
|
-
throw Error("Invalid input.")
|
|
14
|
-
}
|
|
15
|
-
this.press_article_id = press_article.press_article_id
|
|
16
|
-
this.publish_date = press_article.publish_date
|
|
17
|
-
this.title = press_article.title
|
|
18
|
-
this.publisher = press_article.publisher
|
|
19
|
-
this.domain = press_article.domain
|
|
20
|
-
this.url = press_article.url
|
|
21
|
-
this.relevance = press_article.relevance
|
|
22
|
-
this.s3_id = press_article.s3_id
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static is(press_article : any) : press_article is PressArticle {
|
|
26
|
-
return (
|
|
27
|
-
press_article !== undefined &&
|
|
28
|
-
typeof press_article.press_article_id === "string" &&
|
|
29
|
-
typeof press_article.publish_date === "string" &&
|
|
30
|
-
typeof press_article.title === "string" &&
|
|
31
|
-
(press_article.publisher === undefined || typeof press_article.publisher === "string") &&
|
|
32
|
-
typeof press_article.domain === "string" &&
|
|
33
|
-
typeof press_article.url === "string" &&
|
|
34
|
-
(press_article.relevance === undefined || typeof press_article.relevance === "string") &&
|
|
35
|
-
(press_article.s3_id === undefined || typeof press_article.s3_id === "string")
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { PressArticle } from "./PressArticle"
|
|
2
|
-
|
|
3
|
-
export class PressArticleTag {
|
|
4
|
-
readonly press_article_id : string
|
|
5
|
-
readonly tag_id : string
|
|
6
|
-
readonly publish_date : string
|
|
7
|
-
readonly url : string
|
|
8
|
-
readonly relevance? : string
|
|
9
|
-
readonly sentiment? : string
|
|
10
|
-
readonly [x : string] : any
|
|
11
|
-
|
|
12
|
-
constructor(press_article_tag : PressArticleTag) {
|
|
13
|
-
if (!PressArticleTag.is(press_article_tag)) {
|
|
14
|
-
throw Error("Invalid input.")
|
|
15
|
-
}
|
|
16
|
-
this.press_article_id = press_article_tag.press_article_id
|
|
17
|
-
this.tag_id = press_article_tag.tag_id
|
|
18
|
-
this.publish_date = press_article_tag.publish_date
|
|
19
|
-
this.url = press_article_tag.url
|
|
20
|
-
this.relevance = press_article_tag.relevance
|
|
21
|
-
this.sentiment = press_article_tag.sentiment
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static is(press_article_tag : any) : press_article_tag is PressArticleTag {
|
|
25
|
-
return (
|
|
26
|
-
press_article_tag !== undefined &&
|
|
27
|
-
typeof press_article_tag.press_article_id === "string" &&
|
|
28
|
-
typeof press_article_tag.tag_id === "string" &&
|
|
29
|
-
typeof press_article_tag.publish_date === "string" &&
|
|
30
|
-
typeof press_article_tag.url === "string" &&
|
|
31
|
-
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string") &&
|
|
32
|
-
(press_article_tag.sentiment === undefined || typeof press_article_tag.sentiment === "string")
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export class PressArticleTagAux extends PressArticleTag {
|
|
38
|
-
readonly press_article : PressArticle
|
|
39
|
-
|
|
40
|
-
constructor(press_article_tag : any) {
|
|
41
|
-
if (!PressArticleTagAux.is(press_article_tag)) {
|
|
42
|
-
throw Error("Invalid input.")
|
|
43
|
-
}
|
|
44
|
-
super(press_article_tag)
|
|
45
|
-
this.press_article = press_article_tag.press_article
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static is(press_article_tag : any) : press_article_tag is PressArticleTagAux {
|
|
49
|
-
return (
|
|
50
|
-
PressArticleTag.is(press_article_tag) &&
|
|
51
|
-
PressArticle.is(press_article_tag.press_article)
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
}
|