eventregistry 8.11.2 → 9.1.0
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.
- package/dist/analytics.d.ts +82 -82
- package/dist/analytics.js +336 -330
- package/dist/analytics.js.map +1 -1
- package/dist/base.d.ts +82 -81
- package/dist/base.js +261 -219
- package/dist/base.js.map +1 -1
- package/dist/counts.d.ts +81 -81
- package/dist/counts.js +162 -149
- package/dist/counts.js.map +1 -1
- package/dist/dailyShares.d.ts +10 -10
- package/dist/dailyShares.js +90 -77
- package/dist/dailyShares.js.map +1 -1
- package/dist/data.d.ts +269 -268
- package/dist/data.js +3 -3
- package/dist/eventForText.d.ts +48 -48
- package/dist/eventForText.js +126 -123
- package/dist/eventForText.js.map +1 -1
- package/dist/eventRegistry.d.ts +244 -224
- package/dist/eventRegistry.js +1098 -1018
- package/dist/eventRegistry.js.map +1 -1
- package/dist/index.d.ts +21 -20
- package/dist/index.js +128 -122
- package/dist/index.js.map +1 -1
- package/dist/info.d.ts +61 -61
- package/dist/info.js +171 -158
- package/dist/info.js.map +1 -1
- package/dist/logger.d.ts +44 -0
- package/dist/logger.js +144 -0
- package/dist/logger.js.map +1 -0
- package/dist/query.d.ts +53 -53
- package/dist/query.js +333 -290
- package/dist/query.js.map +1 -1
- package/dist/queryArticle.d.ts +61 -61
- package/dist/queryArticle.js +183 -168
- package/dist/queryArticle.js.map +1 -1
- package/dist/queryArticles.d.ts +144 -160
- package/dist/queryArticles.js +729 -701
- package/dist/queryArticles.js.map +1 -1
- package/dist/queryEvent.d.ts +140 -140
- package/dist/queryEvent.js +587 -569
- package/dist/queryEvent.js.map +1 -1
- package/dist/queryEvents.d.ts +210 -210
- package/dist/queryEvents.js +825 -798
- package/dist/queryEvents.js.map +1 -1
- package/dist/queryMentions.d.ts +96 -96
- package/dist/queryMentions.js +637 -600
- package/dist/queryMentions.js.map +1 -1
- package/dist/queryStory.d.ts +58 -58
- package/dist/queryStory.js +194 -174
- package/dist/queryStory.js.map +1 -1
- package/dist/recent.d.ts +23 -23
- package/dist/recent.js +199 -179
- package/dist/recent.js.map +1 -1
- package/dist/returnInfo.d.ts +68 -66
- package/dist/returnInfo.js +332 -304
- package/dist/returnInfo.js.map +1 -1
- package/dist/topicPage.d.ts +157 -157
- package/dist/topicPage.js +599 -604
- package/dist/topicPage.js.map +1 -1
- package/dist/trends.d.ts +35 -35
- package/dist/trends.js +115 -102
- package/dist/trends.js.map +1 -1
- package/dist/types.d.ts +2453 -2155
- package/dist/types.js +2 -2
- package/package.json +13 -13
package/dist/returnInfo.js
CHANGED
|
@@ -1,305 +1,333 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
}
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
d
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
ReturnInfoFlagsBase.prototype.
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
_this.
|
|
155
|
-
|
|
156
|
-
_this.setFlag("
|
|
157
|
-
_this.setFlag("
|
|
158
|
-
_this.setFlag("
|
|
159
|
-
_this.setFlag("
|
|
160
|
-
_this.setFlag("
|
|
161
|
-
_this.setFlag("
|
|
162
|
-
_this.setFlag("
|
|
163
|
-
_this.setFlag("
|
|
164
|
-
_this.setFlag("
|
|
165
|
-
_this.setFlag("
|
|
166
|
-
_this.setFlag("
|
|
167
|
-
_this.
|
|
168
|
-
_this.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
_this.
|
|
182
|
-
_this.
|
|
183
|
-
|
|
184
|
-
_this.setFlag("
|
|
185
|
-
_this.setFlag("
|
|
186
|
-
_this.setFlag("date", date);
|
|
187
|
-
_this.setFlag("
|
|
188
|
-
_this.setFlag("
|
|
189
|
-
_this.setFlag("
|
|
190
|
-
_this.setFlag("
|
|
191
|
-
_this.
|
|
192
|
-
_this.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
_this.
|
|
207
|
-
_this.
|
|
208
|
-
|
|
209
|
-
_this.setFlag("
|
|
210
|
-
_this.setFlag("
|
|
211
|
-
_this.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
_this.
|
|
237
|
-
|
|
238
|
-
_this.
|
|
239
|
-
_this.
|
|
240
|
-
_this
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
_this.
|
|
264
|
-
_this.
|
|
265
|
-
|
|
266
|
-
_this.
|
|
267
|
-
_this.
|
|
268
|
-
_this.setFlag("
|
|
269
|
-
_this.
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
_this.
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
_this.
|
|
296
|
-
|
|
297
|
-
_this.
|
|
298
|
-
_this
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
|
+
var t = {};
|
|
30
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
31
|
+
t[p] = s[p];
|
|
32
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
33
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
+
t[p[i]] = s[p[i]];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.ConceptFolderInfoFlags = exports.ConceptClassInfoFlags = exports.LocationInfoFlags = exports.ConceptInfoFlags = exports.CategoryInfoFlags = exports.SourceInfoFlags = exports.EventInfoFlags = exports.StoryInfoFlags = exports.ArticleInfoFlags = exports.ReturnInfo = exports.ReturnInfoFlagsBase = void 0;
|
|
41
|
+
var fs = require("fs");
|
|
42
|
+
var logger_1 = require("./logger");
|
|
43
|
+
var ReturnInfoFlagsBase = /** @class */ (function () {
|
|
44
|
+
function ReturnInfoFlagsBase() {
|
|
45
|
+
this.data = {};
|
|
46
|
+
}
|
|
47
|
+
ReturnInfoFlagsBase.prototype.setFlag = function (key, value, defaultValue) {
|
|
48
|
+
this.setProperty("Include" + this.type + key.charAt(0).toUpperCase() + key.slice(1), value, defaultValue);
|
|
49
|
+
};
|
|
50
|
+
ReturnInfoFlagsBase.prototype.setValue = function (key, value, defaultValue, skipKeyMod) {
|
|
51
|
+
if (skipKeyMod === void 0) { skipKeyMod = false; }
|
|
52
|
+
var constructedKey = skipKeyMod ? key.charAt(0).toUpperCase() + key.slice(1) : this.type + key.charAt(0).toUpperCase() + key.slice(1);
|
|
53
|
+
this.setProperty(constructedKey, value, defaultValue);
|
|
54
|
+
};
|
|
55
|
+
ReturnInfoFlagsBase.prototype.getProperties = function (prefix) {
|
|
56
|
+
if (prefix === void 0) { prefix = ""; }
|
|
57
|
+
var result = {};
|
|
58
|
+
for (var key in this.data) {
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(this.data, key)) {
|
|
60
|
+
var value = this.data[key];
|
|
61
|
+
var lowercaseKey = key.toLowerCase();
|
|
62
|
+
var lowercasePrefix = prefix.toLowerCase();
|
|
63
|
+
if (lowercaseKey.startsWith(lowercasePrefix)) {
|
|
64
|
+
result[this.camelCase(key)] = value;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
result[this.camelCase(prefix + key)] = value;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return result;
|
|
72
|
+
};
|
|
73
|
+
ReturnInfoFlagsBase.prototype.camelCase = function (str) {
|
|
74
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
|
|
75
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
76
|
+
}).replace(/\s+/g, '');
|
|
77
|
+
};
|
|
78
|
+
ReturnInfoFlagsBase.prototype.addProperties = function (properties) {
|
|
79
|
+
if (properties instanceof Object) {
|
|
80
|
+
for (var name_1 in properties) {
|
|
81
|
+
if (properties.hasOwnProperty(name_1)) {
|
|
82
|
+
var value = properties[name_1];
|
|
83
|
+
if (typeof value === "boolean") {
|
|
84
|
+
this.setFlag(name_1, value, !value);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
this.setValue(name_1, value);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
ReturnInfoFlagsBase.prototype.setProperty = function (key, value, defaultValue) {
|
|
94
|
+
if (value !== defaultValue) {
|
|
95
|
+
this.data[key] = value;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
return ReturnInfoFlagsBase;
|
|
99
|
+
}());
|
|
100
|
+
exports.ReturnInfoFlagsBase = ReturnInfoFlagsBase;
|
|
101
|
+
var ReturnInfo = /** @class */ (function () {
|
|
102
|
+
// Accepts all InfoFlags
|
|
103
|
+
function ReturnInfo(_a) {
|
|
104
|
+
if (_a === void 0) { _a = {}; }
|
|
105
|
+
var _b = _a.articleInfo, articleInfo = _b === void 0 ? new ArticleInfoFlags() : _b, _c = _a.eventInfo, eventInfo = _c === void 0 ? new EventInfoFlags() : _c, _d = _a.sourceInfo, sourceInfo = _d === void 0 ? new SourceInfoFlags() : _d, _e = _a.categoryInfo, categoryInfo = _e === void 0 ? new CategoryInfoFlags() : _e, _f = _a.conceptInfo, conceptInfo = _f === void 0 ? new ConceptInfoFlags() : _f, _g = _a.locationInfo, locationInfo = _g === void 0 ? new LocationInfoFlags() : _g, _h = _a.storyInfo, storyInfo = _h === void 0 ? new StoryInfoFlags() : _h, _j = _a.conceptClassInfo, conceptClassInfo = _j === void 0 ? new ConceptClassInfoFlags() : _j, _k = _a.conceptFolderInfo, conceptFolderInfo = _k === void 0 ? new ConceptFolderInfoFlags() : _k, unsupported = __rest(_a, ["articleInfo", "eventInfo", "sourceInfo", "categoryInfo", "conceptInfo", "locationInfo", "storyInfo", "conceptClassInfo", "conceptFolderInfo"]);
|
|
106
|
+
if (Object.keys(unsupported).length > 0) {
|
|
107
|
+
logger_1.Logger.warn("ReturnInfo: Unsupported parameters detected: ".concat(JSON.stringify(unsupported), ". Please check the documentation."));
|
|
108
|
+
}
|
|
109
|
+
this.articleInfo = articleInfo;
|
|
110
|
+
this.eventInfo = eventInfo;
|
|
111
|
+
this.sourceInfo = sourceInfo;
|
|
112
|
+
this.categoryInfo = categoryInfo;
|
|
113
|
+
this.conceptInfo = conceptInfo;
|
|
114
|
+
this.locationInfo = locationInfo;
|
|
115
|
+
this.storyInfo = storyInfo;
|
|
116
|
+
this.conceptClassInfo = conceptClassInfo;
|
|
117
|
+
this.conceptFolderInfo = conceptFolderInfo;
|
|
118
|
+
}
|
|
119
|
+
ReturnInfo.prototype.getParams = function (prefix) {
|
|
120
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, this.articleInfo.getProperties(prefix)), this.eventInfo.getProperties(prefix)), this.sourceInfo.getProperties(prefix)), this.categoryInfo.getProperties(prefix)), this.conceptInfo.getProperties(prefix)), this.locationInfo.getProperties(prefix)), this.storyInfo.getProperties(prefix)), this.conceptClassInfo.getProperties(prefix)), this.conceptFolderInfo.getProperties(prefix));
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* load the configuration for the ReturnInfo from a filename
|
|
124
|
+
* @param filename filename that contains the json configuration to use in the ReturnInfo
|
|
125
|
+
*/
|
|
126
|
+
ReturnInfo.loadFromFile = function (filename) {
|
|
127
|
+
if (!(fs && fs.existsSync(filename))) {
|
|
128
|
+
throw new Error("File ".concat(filename, " does not exist"));
|
|
129
|
+
}
|
|
130
|
+
var conf = JSON.parse(fs.readFileSync(filename, "utf8"));
|
|
131
|
+
return new ReturnInfo({
|
|
132
|
+
articleInfo: new ArticleInfoFlags(conf.articleInfo || {}),
|
|
133
|
+
eventInfo: new EventInfoFlags(conf.eventInfo || {}),
|
|
134
|
+
sourceInfo: new SourceInfoFlags(conf.sourceInfo || {}),
|
|
135
|
+
categoryInfo: new CategoryInfoFlags(conf.categoryInfo || {}),
|
|
136
|
+
conceptInfo: new ConceptInfoFlags(conf.conceptInfo || {}),
|
|
137
|
+
locationInfo: new LocationInfoFlags(conf.locationInfo || {}),
|
|
138
|
+
storyInfo: new StoryInfoFlags(conf.storyInfo || {}),
|
|
139
|
+
conceptClassInfo: new ConceptClassInfoFlags(conf.conceptClassInfo || {}),
|
|
140
|
+
conceptFolderInfo: new ConceptFolderInfoFlags(conf.conceptFolderInfo || {}),
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
return ReturnInfo;
|
|
144
|
+
}());
|
|
145
|
+
exports.ReturnInfo = ReturnInfo;
|
|
146
|
+
var ArticleInfoFlags = /** @class */ (function (_super) {
|
|
147
|
+
__extends(ArticleInfoFlags, _super);
|
|
148
|
+
function ArticleInfoFlags(params) {
|
|
149
|
+
if (params === void 0) { params = {}; }
|
|
150
|
+
var _this = _super.call(this) || this;
|
|
151
|
+
_this.type = "Article";
|
|
152
|
+
var _a = params.bodyLen, bodyLen = _a === void 0 ? -1 : _a, _b = params.basicInfo, basicInfo = _b === void 0 ? true : _b, _c = params.title, title = _c === void 0 ? true : _c, _d = params.body, body = _d === void 0 ? true : _d, _e = params.url, url = _e === void 0 ? true : _e, _f = params.eventUri, eventUri = _f === void 0 ? true : _f, _g = params.authors, authors = _g === void 0 ? true : _g, _h = params.concepts, concepts = _h === void 0 ? false : _h, _j = params.categories, categories = _j === void 0 ? false : _j, _k = params.links, links = _k === void 0 ? false : _k, _l = params.videos, videos = _l === void 0 ? false : _l, _m = params.image, image = _m === void 0 ? true : _m, _o = params.socialScore, socialScore = _o === void 0 ? false : _o, _p = params.sentiment, sentiment = _p === void 0 ? true : _p, _q = params.location, location = _q === void 0 ? false : _q, _r = params.extractedDates, extractedDates = _r === void 0 ? false : _r, _s = params.originalArticle, originalArticle = _s === void 0 ? false : _s, _t = params.storyUri, storyUri = _t === void 0 ? false : _t, properties = __rest(params, ["bodyLen", "basicInfo", "title", "body", "url", "eventUri", "authors", "concepts", "categories", "links", "videos", "image", "socialScore", "sentiment", "location", "extractedDates", "originalArticle", "storyUri"]);
|
|
153
|
+
_this.setValue("bodyLen", bodyLen);
|
|
154
|
+
_this.setFlag("basicInfo", basicInfo);
|
|
155
|
+
_this.setFlag("title", title);
|
|
156
|
+
_this.setFlag("body", body);
|
|
157
|
+
_this.setFlag("url", url);
|
|
158
|
+
_this.setFlag("eventUri", eventUri);
|
|
159
|
+
_this.setFlag("authors", authors);
|
|
160
|
+
_this.setFlag("concepts", concepts);
|
|
161
|
+
_this.setFlag("categories", categories);
|
|
162
|
+
_this.setFlag("links", links);
|
|
163
|
+
_this.setFlag("videos", videos);
|
|
164
|
+
_this.setFlag("image", image);
|
|
165
|
+
_this.setFlag("socialScore", socialScore);
|
|
166
|
+
_this.setFlag("sentiment", sentiment);
|
|
167
|
+
_this.setFlag("location", location);
|
|
168
|
+
_this.setFlag("extractedDates", extractedDates);
|
|
169
|
+
_this.setFlag("originalArticle", originalArticle);
|
|
170
|
+
_this.setFlag("storyUri", storyUri);
|
|
171
|
+
_this.addProperties(properties);
|
|
172
|
+
return _this;
|
|
173
|
+
}
|
|
174
|
+
return ArticleInfoFlags;
|
|
175
|
+
}(ReturnInfoFlagsBase));
|
|
176
|
+
exports.ArticleInfoFlags = ArticleInfoFlags;
|
|
177
|
+
var StoryInfoFlags = /** @class */ (function (_super) {
|
|
178
|
+
__extends(StoryInfoFlags, _super);
|
|
179
|
+
function StoryInfoFlags(params) {
|
|
180
|
+
if (params === void 0) { params = {}; }
|
|
181
|
+
var _this = _super.call(this) || this;
|
|
182
|
+
_this.type = "Story";
|
|
183
|
+
var _a = params.basicStats, basicStats = _a === void 0 ? true : _a, _b = params.location, location = _b === void 0 ? true : _b, _c = params.date, date = _c === void 0 ? false : _c, _d = params.title, title = _d === void 0 ? false : _d, _e = params.summary, summary = _e === void 0 ? false : _e, _f = params.concepts, concepts = _f === void 0 ? false : _f, _g = params.categories, categories = _g === void 0 ? false : _g, _h = params.medoidArticle, medoidArticle = _h === void 0 ? false : _h, _j = params.infoArticle, infoArticle = _j === void 0 ? false : _j, _k = params.commonDates, commonDates = _k === void 0 ? false : _k, _l = params.socialScore, socialScore = _l === void 0 ? false : _l, _m = params.imageCount, imageCount = _m === void 0 ? 0 : _m, properties = __rest(params, ["basicStats", "location", "date", "title", "summary", "concepts", "categories", "medoidArticle", "infoArticle", "commonDates", "socialScore", "imageCount"]);
|
|
184
|
+
_this.setFlag("basicStats", basicStats);
|
|
185
|
+
_this.setFlag("location", location);
|
|
186
|
+
_this.setFlag("date", date);
|
|
187
|
+
_this.setFlag("title", title);
|
|
188
|
+
_this.setFlag("summary", summary);
|
|
189
|
+
_this.setFlag("concepts", concepts);
|
|
190
|
+
_this.setFlag("categories", categories);
|
|
191
|
+
_this.setFlag("medoidArticle", medoidArticle);
|
|
192
|
+
_this.setFlag("infoArticle", infoArticle);
|
|
193
|
+
_this.setFlag("commonDates", commonDates);
|
|
194
|
+
_this.setFlag("socialScore", socialScore);
|
|
195
|
+
_this.setValue("imageCount", imageCount);
|
|
196
|
+
_this.addProperties(properties);
|
|
197
|
+
return _this;
|
|
198
|
+
}
|
|
199
|
+
return StoryInfoFlags;
|
|
200
|
+
}(ReturnInfoFlagsBase));
|
|
201
|
+
exports.StoryInfoFlags = StoryInfoFlags;
|
|
202
|
+
var EventInfoFlags = /** @class */ (function (_super) {
|
|
203
|
+
__extends(EventInfoFlags, _super);
|
|
204
|
+
function EventInfoFlags(params) {
|
|
205
|
+
if (params === void 0) { params = {}; }
|
|
206
|
+
var _this = _super.call(this) || this;
|
|
207
|
+
_this.type = "Event";
|
|
208
|
+
var _a = params.title, title = _a === void 0 ? true : _a, _b = params.summary, summary = _b === void 0 ? true : _b, _c = params.articleCounts, articleCounts = _c === void 0 ? true : _c, _d = params.concepts, concepts = _d === void 0 ? true : _d, _e = params.categories, categories = _e === void 0 ? true : _e, _f = params.date, date = _f === void 0 ? true : _f, _g = params.commonDates, commonDates = _g === void 0 ? false : _g, _h = params.infoArticle, infoArticle = _h === void 0 ? false : _h, _j = params.stories, stories = _j === void 0 ? false : _j, _k = params.socialScore, socialScore = _k === void 0 ? false : _k, _l = params.imageCount, imageCount = _l === void 0 ? 0 : _l, properties = __rest(params, ["title", "summary", "articleCounts", "concepts", "categories", "date", "commonDates", "infoArticle", "stories", "socialScore", "imageCount"]);
|
|
209
|
+
_this.setFlag("title", title);
|
|
210
|
+
_this.setFlag("summary", summary);
|
|
211
|
+
_this.setFlag("articleCounts", articleCounts);
|
|
212
|
+
_this.setFlag("concepts", concepts);
|
|
213
|
+
_this.setFlag("categories", categories);
|
|
214
|
+
_this.setFlag("date", date);
|
|
215
|
+
_this.setFlag("commonDates", commonDates);
|
|
216
|
+
_this.setFlag("infoArticle", infoArticle);
|
|
217
|
+
_this.setFlag("stories", stories);
|
|
218
|
+
_this.setFlag("socialScore", socialScore);
|
|
219
|
+
_this.setValue("imageCount", imageCount);
|
|
220
|
+
_this.addProperties(properties);
|
|
221
|
+
return _this;
|
|
222
|
+
}
|
|
223
|
+
return EventInfoFlags;
|
|
224
|
+
}(ReturnInfoFlagsBase));
|
|
225
|
+
exports.EventInfoFlags = EventInfoFlags;
|
|
226
|
+
var SourceInfoFlags = /** @class */ (function (_super) {
|
|
227
|
+
__extends(SourceInfoFlags, _super);
|
|
228
|
+
function SourceInfoFlags(params) {
|
|
229
|
+
if (params === void 0) { params = {}; }
|
|
230
|
+
var _this = _super.call(this) || this;
|
|
231
|
+
var _a = params.title, title = _a === void 0 ? true : _a, _b = params.description, description = _b === void 0 ? false : _b, _c = params.location, location = _c === void 0 ? false : _c, _d = params.ranking, ranking = _d === void 0 ? false : _d, _e = params.image, image = _e === void 0 ? false : _e, _f = params.socialMedia, socialMedia = _f === void 0 ? false : _f, properties = __rest(params, ["title", "description", "location", "ranking", "image", "socialMedia"]);
|
|
232
|
+
_this.type = "Source";
|
|
233
|
+
_this.setFlag("title", title);
|
|
234
|
+
_this.setFlag("description", description);
|
|
235
|
+
_this.setFlag("location", location);
|
|
236
|
+
_this.setFlag("ranking", ranking);
|
|
237
|
+
_this.setFlag("image", image);
|
|
238
|
+
_this.setFlag("socialMedia", socialMedia);
|
|
239
|
+
_this.addProperties(properties);
|
|
240
|
+
return _this;
|
|
241
|
+
}
|
|
242
|
+
return SourceInfoFlags;
|
|
243
|
+
}(ReturnInfoFlagsBase));
|
|
244
|
+
exports.SourceInfoFlags = SourceInfoFlags;
|
|
245
|
+
var CategoryInfoFlags = /** @class */ (function (_super) {
|
|
246
|
+
__extends(CategoryInfoFlags, _super);
|
|
247
|
+
function CategoryInfoFlags(params) {
|
|
248
|
+
if (params === void 0) { params = {}; }
|
|
249
|
+
var _this = _super.call(this) || this;
|
|
250
|
+
_this.type = "Category";
|
|
251
|
+
var _a = params.trendingScore, trendingScore = _a === void 0 ? true : _a, properties = __rest(params, ["trendingScore"]);
|
|
252
|
+
_this.setFlag("trendingScore", trendingScore);
|
|
253
|
+
_this.addProperties(properties);
|
|
254
|
+
return _this;
|
|
255
|
+
}
|
|
256
|
+
return CategoryInfoFlags;
|
|
257
|
+
}(ReturnInfoFlagsBase));
|
|
258
|
+
exports.CategoryInfoFlags = CategoryInfoFlags;
|
|
259
|
+
var ConceptInfoFlags = /** @class */ (function (_super) {
|
|
260
|
+
__extends(ConceptInfoFlags, _super);
|
|
261
|
+
function ConceptInfoFlags(params) {
|
|
262
|
+
if (params === void 0) { params = {}; }
|
|
263
|
+
var _this = _super.call(this) || this;
|
|
264
|
+
_this.type = "Concept";
|
|
265
|
+
var _a = params.type, type = _a === void 0 ? "concepts" : _a, _b = params.lang, lang = _b === void 0 ? "eng" : _b, _c = params.label, label = _c === void 0 ? true : _c, _d = params.synonyms, synonyms = _d === void 0 ? false : _d, _e = params.image, image = _e === void 0 ? false : _e, _f = params.description, description = _f === void 0 ? false : _f, _g = params.trendingScore, trendingScore = _g === void 0 ? false : _g, _h = params.maxConceptsPerType, maxConceptsPerType = _h === void 0 ? 20 : _h, properties = __rest(params, ["type", "lang", "label", "synonyms", "image", "description", "trendingScore", "maxConceptsPerType"]);
|
|
266
|
+
_this.setValue("type", type);
|
|
267
|
+
_this.setValue("lang", lang);
|
|
268
|
+
_this.setFlag("label", label);
|
|
269
|
+
_this.setFlag("synonyms", synonyms);
|
|
270
|
+
_this.setFlag("image", image);
|
|
271
|
+
_this.setFlag("description", description);
|
|
272
|
+
_this.setFlag("trendingScore", trendingScore);
|
|
273
|
+
_this.setValue("maxConceptsPerType", maxConceptsPerType, 20, true);
|
|
274
|
+
_this.addProperties(properties);
|
|
275
|
+
return _this;
|
|
276
|
+
}
|
|
277
|
+
return ConceptInfoFlags;
|
|
278
|
+
}(ReturnInfoFlagsBase));
|
|
279
|
+
exports.ConceptInfoFlags = ConceptInfoFlags;
|
|
280
|
+
var LocationInfoFlags = /** @class */ (function (_super) {
|
|
281
|
+
__extends(LocationInfoFlags, _super);
|
|
282
|
+
function LocationInfoFlags(params) {
|
|
283
|
+
if (params === void 0) { params = {}; }
|
|
284
|
+
var _this = _super.call(this) || this;
|
|
285
|
+
_this.type = "Location";
|
|
286
|
+
var _a = params.label, label = _a === void 0 ? true : _a, _b = params.wikiUri, wikiUri = _b === void 0 ? false : _b, _c = params.geoNamesId, geoNamesId = _c === void 0 ? false : _c, _d = params.population, population = _d === void 0 ? false : _d, _e = params.geoLocation, geoLocation = _e === void 0 ? false : _e, _f = params.countryArea, countryArea = _f === void 0 ? false : _f, _g = params.countryDetails, countryDetails = _g === void 0 ? false : _g, _h = params.countryContinent, countryContinent = _h === void 0 ? false : _h, _j = params.placeFeatureCode, placeFeatureCode = _j === void 0 ? false : _j, _k = params.placeCountry, placeCountry = _k === void 0 ? true : _k, properties = __rest(params, ["label", "wikiUri", "geoNamesId", "population", "geoLocation", "countryArea", "countryDetails", "countryContinent", "placeFeatureCode", "placeCountry"]);
|
|
287
|
+
_this.setFlag("label", label);
|
|
288
|
+
_this.setFlag("wikiUri", wikiUri);
|
|
289
|
+
_this.setFlag("geoNamesId", geoNamesId);
|
|
290
|
+
_this.setFlag("population", population);
|
|
291
|
+
_this.setFlag("geoLocation", geoLocation);
|
|
292
|
+
_this.setFlag("countryArea", countryArea);
|
|
293
|
+
_this.setFlag("countryDetails", countryDetails);
|
|
294
|
+
_this.setFlag("countryContinent", countryContinent);
|
|
295
|
+
_this.setFlag("placeFeatureCode", placeFeatureCode);
|
|
296
|
+
_this.setFlag("placeCountry", placeCountry);
|
|
297
|
+
_this.addProperties(properties);
|
|
298
|
+
return _this;
|
|
299
|
+
}
|
|
300
|
+
return LocationInfoFlags;
|
|
301
|
+
}(ReturnInfoFlagsBase));
|
|
302
|
+
exports.LocationInfoFlags = LocationInfoFlags;
|
|
303
|
+
var ConceptClassInfoFlags = /** @class */ (function (_super) {
|
|
304
|
+
__extends(ConceptClassInfoFlags, _super);
|
|
305
|
+
function ConceptClassInfoFlags(params) {
|
|
306
|
+
if (params === void 0) { params = {}; }
|
|
307
|
+
var _this = _super.call(this) || this;
|
|
308
|
+
_this.type = "ConceptClass";
|
|
309
|
+
var _a = params.parentLabels, parentLabels = _a === void 0 ? true : _a, _b = params.concepts, concepts = _b === void 0 ? false : _b, properties = __rest(params, ["parentLabels", "concepts"]);
|
|
310
|
+
_this.setFlag("parentLabels", parentLabels);
|
|
311
|
+
_this.setFlag("concepts", concepts);
|
|
312
|
+
_this.addProperties(properties);
|
|
313
|
+
return _this;
|
|
314
|
+
}
|
|
315
|
+
return ConceptClassInfoFlags;
|
|
316
|
+
}(ReturnInfoFlagsBase));
|
|
317
|
+
exports.ConceptClassInfoFlags = ConceptClassInfoFlags;
|
|
318
|
+
var ConceptFolderInfoFlags = /** @class */ (function (_super) {
|
|
319
|
+
__extends(ConceptFolderInfoFlags, _super);
|
|
320
|
+
function ConceptFolderInfoFlags(params) {
|
|
321
|
+
if (params === void 0) { params = {}; }
|
|
322
|
+
var _this = _super.call(this) || this;
|
|
323
|
+
_this.type = "ConceptFolder";
|
|
324
|
+
var _a = params.definition, definition = _a === void 0 ? true : _a, _b = params.owner, owner = _b === void 0 ? false : _b, properties = __rest(params, ["definition", "owner"]);
|
|
325
|
+
_this.setFlag("owner", definition);
|
|
326
|
+
_this.setFlag("owner", owner);
|
|
327
|
+
_this.addProperties(properties);
|
|
328
|
+
return _this;
|
|
329
|
+
}
|
|
330
|
+
return ConceptFolderInfoFlags;
|
|
331
|
+
}(ReturnInfoFlagsBase));
|
|
332
|
+
exports.ConceptFolderInfoFlags = ConceptFolderInfoFlags;
|
|
305
333
|
//# sourceMappingURL=returnInfo.js.map
|