eventregistry 8.11.2 → 9.1.1

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.
Files changed (65) hide show
  1. package/dist/analytics.d.ts +82 -82
  2. package/dist/analytics.js +336 -330
  3. package/dist/analytics.js.map +1 -1
  4. package/dist/base.d.ts +82 -81
  5. package/dist/base.js +261 -219
  6. package/dist/base.js.map +1 -1
  7. package/dist/counts.d.ts +81 -81
  8. package/dist/counts.js +162 -149
  9. package/dist/counts.js.map +1 -1
  10. package/dist/dailyShares.d.ts +10 -10
  11. package/dist/dailyShares.js +90 -77
  12. package/dist/dailyShares.js.map +1 -1
  13. package/dist/data.d.ts +269 -268
  14. package/dist/data.js +3 -3
  15. package/dist/eventForText.d.ts +48 -48
  16. package/dist/eventForText.js +126 -123
  17. package/dist/eventForText.js.map +1 -1
  18. package/dist/eventRegistry.d.ts +244 -224
  19. package/dist/eventRegistry.js +1098 -1018
  20. package/dist/eventRegistry.js.map +1 -1
  21. package/dist/index.d.ts +21 -20
  22. package/dist/index.js +128 -122
  23. package/dist/index.js.map +1 -1
  24. package/dist/info.d.ts +61 -61
  25. package/dist/info.js +171 -158
  26. package/dist/info.js.map +1 -1
  27. package/dist/logger.d.ts +45 -0
  28. package/dist/logger.js +156 -0
  29. package/dist/logger.js.map +1 -0
  30. package/dist/query.d.ts +53 -53
  31. package/dist/query.js +333 -290
  32. package/dist/query.js.map +1 -1
  33. package/dist/queryArticle.d.ts +61 -61
  34. package/dist/queryArticle.js +183 -168
  35. package/dist/queryArticle.js.map +1 -1
  36. package/dist/queryArticles.d.ts +144 -160
  37. package/dist/queryArticles.js +729 -701
  38. package/dist/queryArticles.js.map +1 -1
  39. package/dist/queryEvent.d.ts +140 -140
  40. package/dist/queryEvent.js +587 -569
  41. package/dist/queryEvent.js.map +1 -1
  42. package/dist/queryEvents.d.ts +210 -210
  43. package/dist/queryEvents.js +825 -798
  44. package/dist/queryEvents.js.map +1 -1
  45. package/dist/queryMentions.d.ts +96 -96
  46. package/dist/queryMentions.js +637 -600
  47. package/dist/queryMentions.js.map +1 -1
  48. package/dist/queryStory.d.ts +58 -58
  49. package/dist/queryStory.js +194 -174
  50. package/dist/queryStory.js.map +1 -1
  51. package/dist/recent.d.ts +23 -23
  52. package/dist/recent.js +199 -179
  53. package/dist/recent.js.map +1 -1
  54. package/dist/returnInfo.d.ts +68 -66
  55. package/dist/returnInfo.js +332 -304
  56. package/dist/returnInfo.js.map +1 -1
  57. package/dist/topicPage.d.ts +157 -157
  58. package/dist/topicPage.js +599 -604
  59. package/dist/topicPage.js.map +1 -1
  60. package/dist/trends.d.ts +35 -35
  61. package/dist/trends.js +115 -102
  62. package/dist/trends.js.map +1 -1
  63. package/dist/types.d.ts +2453 -2155
  64. package/dist/types.js +2 -2
  65. package/package.json +13 -13
package/dist/types.d.ts CHANGED
@@ -1,2155 +1,2453 @@
1
- import { QueryItems } from "./base";
2
- import { BaseQuery, CombinedQuery } from "./query";
3
- import { QueryArticles, RequestArticles } from "./queryArticles";
4
- import { RequestEvents } from "./queryEvents";
5
- import { RequestMentions } from "./queryMentions";
6
- import { ReturnInfo } from "./returnInfo";
7
- /**
8
- * Type definitions for different classes and functions from the Event Registry Node JS SDK.
9
- */
10
- export declare module EventRegistryStatic {
11
- interface UsageInfo {
12
- availableTokens: number;
13
- usedTokens: number;
14
- }
15
- interface ServiceStatus {
16
- [name: string]: any;
17
- }
18
- interface Config {
19
- /**
20
- * API key that should be used to make the requests to the Event Registry.
21
- * API key is assigned to each user account and can be obtained on this page:
22
- * http://eventregistry.org/me?tab=settings
23
- */
24
- apiKey?: string;
25
- /**
26
- * Host to use to access the Event Registry backend
27
- */
28
- host?: string;
29
- /**
30
- * host address to use to perform the analytics api calls
31
- */
32
- hostAnalytics?: string;
33
- /**
34
- * log all requests
35
- */
36
- logging?: boolean;
37
- /**
38
- * The minimum number of seconds between individual api calls
39
- */
40
- minDelayBetweenRequests?: number;
41
- /**
42
- * if a request fails (for example, because ER is down),
43
- * what is the max number of times the request should be repeated
44
- */
45
- repeatFailedRequestCount?: number;
46
- /**
47
- * if true, additional info about errors etc. will be printed to console
48
- */
49
- verboseOutput?: boolean;
50
- /**
51
- * print which urls are used as the hosts
52
- */
53
- printHostInfo?: boolean;
54
- settingsFName?: string;
55
- allowUseOfArchive?: boolean;
56
- }
57
- type BaseConceptType = "person" | "loc" | "org" | "wiki";
58
- type ConceptType = "person" | "loc" | "org" | "wiki" | "entities" | "concepts" | "conceptClass" | "conceptFolder";
59
- type SourceType = "place" | "country";
60
- type ConceptClassType = "dbpedia" | "custom";
61
- type DataType = "news" | "pr" | "blog";
62
- /**
63
- * Options:
64
- * * id (internal id),
65
- * * date (publishing date),
66
- * * cosSim (closeness to the event centroid),
67
- * * rel (relevance to the query),
68
- * * sourceImportance (manually curated score of source importance - high value, high importance),
69
- * * sourceImportanceRank (reverse of sourceImportance),
70
- * * sourceAlexaGlobalRank (global rank of the news source),
71
- * * sourceAlexaCountryRank (country rank of the news source),
72
- * * socialScore (total shares on social media),
73
- * * facebookShares (shares on Facebook only)
74
- */
75
- type SortBy = "id" | "date" | "cosSim" | "rel" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
76
- interface SuggestConceptsArguments {
77
- /**
78
- * What types of concepts should be returned
79
- */
80
- sources?: EventRegistryStatic.ConceptType[];
81
- /**
82
- * Language in which the prefix is specified
83
- */
84
- lang?: string | string[];
85
- /**
86
- * Languages in which the label(s) for the concepts are to be returned
87
- */
88
- conceptLang?: string | string[];
89
- /**
90
- * Page of the results (1, 2, ...)
91
- */
92
- page?: number;
93
- /**
94
- * Number of returned suggestions per page
95
- */
96
- count?: number;
97
- /**
98
- * What details about concepts should be included in the returned information
99
- */
100
- returnInfo?: ReturnInfo;
101
- }
102
- interface SuggestCategoriesArguments {
103
- /**
104
- * page of the results (1, 2, ...)
105
- */
106
- page?: number;
107
- /**
108
- * number of returned suggestions
109
- */
110
- count?: number;
111
- /**
112
- * what details about categories should be included in the returned information
113
- */
114
- returnInfo?: ReturnInfo;
115
- }
116
- interface SuggestNewsSourcesArguments {
117
- /**
118
- * page of the results (1, 2, ...)
119
- */
120
- page?: number;
121
- /**
122
- * number of returned suggestions
123
- */
124
- count?: number;
125
- /**
126
- * Suggest sources that provide content in these data types
127
- */
128
- dataType?: EventRegistryStatic.DataType[] | EventRegistryStatic.DataType;
129
- }
130
- interface SuggestSourceGroupsArguments {
131
- /**
132
- * page of the results (1, 2, ...)
133
- */
134
- page?: number;
135
- /**
136
- * number of returned suggestions
137
- */
138
- count?: number;
139
- }
140
- interface SuggestLocationsArguments {
141
- /**
142
- * What types of locations are we interested in.
143
- */
144
- sources?: EventRegistryStatic.SourceType[];
145
- /**
146
- * Language in which the prefix is specified
147
- */
148
- lang?: string;
149
- /**
150
- * Number of returned suggestions
151
- */
152
- count?: number;
153
- /**
154
- * If provided, then return only those locations that are inside the specified country
155
- */
156
- countryUri?: string;
157
- /**
158
- * If provided, then return the locations sorted by the distance to the (lat, long) provided in the tuple
159
- */
160
- sortByDistanceTo?: number[];
161
- /**
162
- * What details about locations should be included in the returned information
163
- */
164
- returnInfo?: ReturnInfo;
165
- }
166
- interface SuggestLocationsAtCoordinateArguments {
167
- /**
168
- * Limit the set of results only to cities (true) or also to general places (false)
169
- */
170
- limitToCities?: boolean;
171
- /**
172
- * Language in which the location label should be returned
173
- */
174
- lang?: string;
175
- /**
176
- * Number of returned suggestions
177
- */
178
- count?: number;
179
- /**
180
- * Ignore locations that don't have a wiki page and can not be used for concept search
181
- */
182
- ignoreNonWiki?: boolean;
183
- /**
184
- * What details about locations should be included in the returned information
185
- */
186
- returnInfo?: ReturnInfo;
187
- }
188
- interface SuggestSourcesAtPlaceArguments {
189
- /**
190
- * page of the results (1, 2, ...)
191
- */
192
- page?: number;
193
- /**
194
- * number of returned sources
195
- */
196
- count?: number;
197
- /**
198
- * type of the news source ("news", "pr", "blog" or a list of any of those)
199
- */
200
- dataType?: DataType;
201
- }
202
- interface SuggestConceptClassesArguments {
203
- /**
204
- * language in which the prefix is specified
205
- */
206
- lang?: string;
207
- /**
208
- * languages in which the label(s) for the concepts are to be returned
209
- */
210
- conceptLang?: string;
211
- /**
212
- * what types of concepts classes should be returned.
213
- */
214
- source?: EventRegistryStatic.ConceptClassType[];
215
- /**
216
- * page of the results (1, 2, ...)
217
- */
218
- page?: number;
219
- /**
220
- * number of returned suggestions
221
- */
222
- count?: number;
223
- /**
224
- * what details about categories should be included in the returned information
225
- */
226
- returnInfo?: ReturnInfo;
227
- }
228
- interface SuggestCustomConceptsArguments {
229
- /**
230
- * language in which the prefix is specified
231
- */
232
- lang?: string;
233
- /**
234
- * languages in which the label(s) for the concepts are to be returned
235
- */
236
- conceptLang?: string;
237
- /**
238
- * page of the results (1, 2, ...)
239
- */
240
- page?: number;
241
- /**
242
- * number of returned suggestions
243
- */
244
- count?: number;
245
- /**
246
- * what details about categories should be included in the returned information
247
- */
248
- returnInfo?: ReturnInfo;
249
- }
250
- interface GetConceptUriArguments {
251
- /**
252
- * language in which the prefix is specified
253
- */
254
- lang?: string;
255
- /**
256
- * what types of concepts should be returned.
257
- */
258
- sources?: EventRegistryStatic.ConceptType[];
259
- }
260
- interface GetLocationUriArguments {
261
- /**
262
- * language in which the prefix is specified
263
- */
264
- lang?: string;
265
- /**
266
- * what types of locations are we interested in.
267
- */
268
- sources?: EventRegistryStatic.SourceType | EventRegistryStatic.SourceType[];
269
- /**
270
- * if set, then filter the possible locations to the locations from that country
271
- */
272
- countryUri?: string;
273
- /**
274
- * sort candidates by distance to the given (lat, long) pair
275
- */
276
- sortByDistanceTo?: number[];
277
- }
278
- interface GetStatsArguments {
279
- addDailyArticles?: boolean;
280
- addDailyAnnArticles?: boolean;
281
- addDailyDuplArticles?: boolean;
282
- addDailyEvents?: boolean;
283
- }
284
- interface TopicPage {
285
- autoAddArticles: boolean;
286
- articleHasDuplicate: "skipHasDuplicates" | "keepOnlyHasDuplicates" | "keepAll";
287
- articleHasEvent: "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent" | "keepAll";
288
- articleIsDuplicate: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
289
- maxDaysBack: number;
290
- articleTreshWgt: number;
291
- eventTreshWgt: number;
292
- concepts: Array<{
293
- uri: string;
294
- wgt: number;
295
- required?: boolean;
296
- excluded?: boolean;
297
- }>;
298
- keywords: Array<{
299
- keyword: string;
300
- wgt: number;
301
- required?: boolean;
302
- excluded?: boolean;
303
- }>;
304
- categories: Array<{
305
- uri: string;
306
- wgt: number;
307
- required?: boolean;
308
- excluded?: boolean;
309
- }>;
310
- sources: Array<{
311
- uri: string;
312
- wgt: number;
313
- excluded?: boolean;
314
- }>;
315
- sourceGroups: Array<{
316
- uri: string;
317
- wgt: number;
318
- excluded?: boolean;
319
- }>;
320
- sourceLocations: Array<{
321
- uri: string;
322
- wgt: number;
323
- excluded?: boolean;
324
- }>;
325
- locations: Array<{
326
- uri: string;
327
- wgt: number;
328
- }>;
329
- langs: string[];
330
- startSourceRankPercentile?: number;
331
- endSourceRankPercentile?: number;
332
- restrictToSetConcepts: boolean;
333
- restrictToSetCategories: boolean;
334
- restrictToSetSources: boolean;
335
- restrictToSetLocations: boolean;
336
- dataType: EventRegistryStatic.DataType | EventRegistryStatic.DataType[];
337
- }
338
- interface TopicPageAddConceptArguments {
339
- label?: string;
340
- conceptType?: string;
341
- required?: boolean;
342
- excluded?: boolean;
343
- }
344
- interface TopicPageAddKeywordArguments {
345
- required?: boolean;
346
- excluded?: boolean;
347
- }
348
- interface TopicPageAddCategoryArguments {
349
- required?: boolean;
350
- excluded?: boolean;
351
- }
352
- interface TopicPageAddSourceArguments {
353
- excluded?: boolean;
354
- }
355
- interface TopicPageAddSourceLocationArguments {
356
- excluded?: boolean;
357
- }
358
- interface TopicPageAddSourceGroupArguments {
359
- excluded?: boolean;
360
- }
361
- interface TopicPageArticles {
362
- /**
363
- * Which page of the results to return (default: 1).
364
- */
365
- page?: number;
366
- /**
367
- * Number of articles to return (default: 100)
368
- */
369
- count?: number;
370
- /**
371
- * How are articles sorted
372
- */
373
- sortBy?: SortBy;
374
- /**
375
- * Should the results be sorted in ascending order (true) or descending (false)
376
- */
377
- sortByAsc?: boolean;
378
- dataType?: EventRegistryStatic.DataType | EventRegistryStatic.DataType[];
379
- /**
380
- * What details should be included in the returned information
381
- */
382
- returnInfo?: ReturnInfo;
383
- [name: string]: (string | number | boolean | ReturnInfo) | (string | number | boolean)[];
384
- }
385
- interface TopicPageEvents {
386
- /**
387
- * Which page of the results to return (default: 1).
388
- */
389
- page?: number;
390
- /**
391
- * Number of events to return (default: 50)
392
- */
393
- count?: number;
394
- /**
395
- * How are events sorted
396
- */
397
- sortBy?: SortBy;
398
- /**
399
- * Should the results be sorted in ascending order (true) or descending (false)
400
- */
401
- sortByAsc?: boolean;
402
- /**
403
- * What details should be included in the returned information
404
- */
405
- returnInfo?: ReturnInfo;
406
- [name: string]: (string | number | boolean | ReturnInfo) | (string | number | boolean)[];
407
- }
408
- namespace Correlations {
409
- interface TopConceptArguments {
410
- /**
411
- * An instance of QueryArticles that can be used to limit the space of concept candidates
412
- */
413
- candidateConceptsQuery?: QueryArticles;
414
- /**
415
- * If candidateConceptsQuery is provided, then this number of concepts for each valid type will be return as candidates
416
- */
417
- candidatesPerType?: number;
418
- /**
419
- * A string or an array containing the concept types that are valid candidates on which to compute top correlations
420
- * valid values are "person", "org", "loc" and/or "wiki"
421
- */
422
- conceptType?: string | string[];
423
- /**
424
- * the number of returned concepts for which the exact value of the correlation is computed
425
- */
426
- exactCount?: number;
427
- /**
428
- * the number of returned concepts for which only an approximate value of the correlation is computed
429
- */
430
- approxCount?: number;
431
- /**
432
- * specifies the details about the concepts that should be returned in the output result
433
- */
434
- returnInfo?: ReturnInfo;
435
- }
436
- interface TopCategoryArguments {
437
- /**
438
- * the number of returned categories for which the exact value of the correlation is computed
439
- */
440
- exactCount?: number;
441
- /**
442
- * the number of returned categories for which only an approximate value of the correlation is computed
443
- */
444
- approxCount?: number;
445
- /**
446
- * specifies the details about the categories that should be returned in the output result
447
- */
448
- returnInfo?: ReturnInfo;
449
- }
450
- }
451
- namespace Counts {
452
- interface Arguments {
453
- /**
454
- * input source information from which to compute top trends.
455
- */
456
- source?: "news" | "social" | "custom" | "geo" | "sentiment";
457
- /**
458
- * What do the uris represent?
459
- */
460
- type?: "concept" | "category";
461
- /**
462
- * Starting date from which to provide counts onwards (format: YYYY-MM-DD).
463
- */
464
- dateStart?: string | Date;
465
- /**
466
- * Ending date until which to provide counts (format: YYYY-MM-DD).
467
- */
468
- dateEnd?: string | Date;
469
- /**
470
- * What details should be included in the returned information.
471
- */
472
- returnInfo?: ReturnInfo;
473
- }
474
- }
475
- namespace DailyShares {
476
- interface Arguments {
477
- /**
478
- * Specify the date for which to return top shared articles. If undefined then today is used.
479
- */
480
- date?: string;
481
- /**
482
- * Number of top shared articles to return
483
- */
484
- count?: number;
485
- /**
486
- * Specifies the details that should be returned in the output result
487
- */
488
- returnInfo?: ReturnInfo;
489
- }
490
- }
491
- namespace Analytics {
492
- interface TrainTopicOnTweetsArguments {
493
- /**
494
- * Do you want to analyze the content of the tweets and extract the concepts mentioned in them?
495
- * If false, only content shared in the articles in the user's tweets will be analyzed.
496
- */
497
- useTweetText?: boolean;
498
- /**
499
- * Normalize identified concepts by their IDF in the news (punish very common concepts)
500
- */
501
- useIdfNormalization?: boolean;
502
- /**
503
- * Way to normalize the concept weights ("none", "linear")
504
- */
505
- normalization?: "none" | "linear";
506
- /**
507
- * The number of concepts to save in the final topic.
508
- */
509
- maxConcepts?: number;
510
- /**
511
- * The number of categories to save in the final topic.
512
- */
513
- maxCategories?: number;
514
- /**
515
- * The maximum number of tweets to collect for the user to analyze.
516
- */
517
- maxTweets?: number;
518
- /**
519
- * maximum number of article links in the tweets to analyze (default 500, max 2000)
520
- */
521
- maxUsedLinks?: number;
522
- /**
523
- * what types of concepts you would like to ignore in the profile. options: person, org, loc, wiki or an array with those
524
- */
525
- ignoreConceptTypes?: BaseConceptType | BaseConceptType[];
526
- /**
527
- * When finished, should we send a notification email to this address?
528
- */
529
- notifyEmailAddress?: string;
530
- }
531
- interface TrainTopicGetTrainedTopicArguments {
532
- maxConcepts?: number;
533
- maxCategories?: number;
534
- idfNormalization?: boolean;
535
- }
536
- }
537
- namespace Info {
538
- interface GetSourceInfoArguments {
539
- /**
540
- * single source uri or a list of source uris for which to return information
541
- */
542
- uriOrUriList?: string | string[];
543
- /**
544
- * what details about the source should be included in the returned information
545
- */
546
- returnInfo?: ReturnInfo;
547
- }
548
- interface GetConceptInfoArguments {
549
- /**
550
- * single concept uri or a list of concept uris for which to return information
551
- */
552
- uriOrUriList?: string | string[];
553
- /**
554
- * what details about the source should be included in the returned information
555
- */
556
- returnInfo?: ReturnInfo;
557
- }
558
- interface GetCategoryInfoArguments {
559
- /**
560
- * single category uri or a list of category uris for which to return information
561
- */
562
- uriOrUriList?: string | string[];
563
- /**
564
- * what details about the source should be included in the returned information
565
- */
566
- returnInfo?: ReturnInfo;
567
- }
568
- }
569
- namespace Query {
570
- interface BaseQueryArguments {
571
- /**
572
- * Keyword(s) to query. Either undefined, string or QueryItems.
573
- */
574
- keyword?: string | QueryItems;
575
- /**
576
- * Concept(s) to query. Either undefined, string or QueryItems.
577
- */
578
- conceptUri?: string | QueryItems;
579
- /**
580
- * Source(s) to query. Either undefined, string or QueryItems.
581
- */
582
- sourceUri?: string | QueryItems;
583
- /**
584
- * Location(s) to query. Either undefined, string or QueryItems.
585
- */
586
- locationUri?: string | QueryItems;
587
- /**
588
- * CategoryUri categories to query. Either undefined, string or QueryItems.
589
- */
590
- categoryUri?: string | QueryItems;
591
- /**
592
- * Language(s) to query. Either undefined, string or QueryItems.
593
- */
594
- lang?: string | QueryItems;
595
- /**
596
- * Starting date. Either undefined, string or date.
597
- */
598
- dateStart?: string | Date;
599
- /**
600
- * Ending date. Either undefined, string or date.
601
- */
602
- dateEnd?: string | Date;
603
- /**
604
- * Search by mentioned dates - Either undefined, string or date or a list of these types.
605
- */
606
- dateMention?: string | string[];
607
- /**
608
- * Find content generated by news sources at the specified geographic location - can be a city URI or a country URI. Multiple items can be provided using a list.
609
- */
610
- sourceLocationUri?: string | string[];
611
- /**
612
- * A single or multiple source group URIs. A source group is a group of news sources, commonly defined based on common topic or importance.
613
- */
614
- sourceGroupUri?: string | string[];
615
- /**
616
- * Author(s) to query. Either undefined, string or QueryItems.
617
- */
618
- authorUri?: string | string[];
619
- /**
620
- * Should we include the subcategories of the searched categories?
621
- */
622
- categoryIncludeSub?: boolean;
623
- /**
624
- * Where should we look when searching using the keywords provided by "keyword" parameter. "body" (default), "title", or "body,title".
625
- */
626
- keywordLoc?: "body" | "title" | "body,title";
627
- /**
628
- * A tuple containing the minimum and maximum number of articles that should be in the resulting events. Parameter relevant only if querying events.
629
- */
630
- minMaxArticlesInEvent?: [number, number];
631
- /**
632
- * A instance of BaseQuery, CombinedQuery or undefined. Used to filter out results matching the other criteria specified in this query.
633
- */
634
- exclude?: BaseQuery | CombinedQuery;
635
- }
636
- interface ComplexArticleQueryArguments {
637
- /**
638
- * Some articles can be duplicates of other articles. What should be done with them.
639
- * Possible values are:
640
- * - "skipDuplicates" (skip the resulting articles that are duplicates of other articles)
641
- * - "keepOnlyDuplicates" (return only the duplicate articles)
642
- * - "keepAll" (no filtering, default)
643
- */
644
- isDuplicateFilter?: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
645
- /**
646
- * some articles are later copied by others. What should be done with such articles.
647
- * Possible values are:
648
- * - "skipHasDuplicates" (skip the resulting articles that have been later copied by others)
649
- * - "keepOnlyHasDuplicates" (return only the articles that have been later copied by others)
650
- * - "keepAll" (no filtering, default)
651
- */
652
- hasDuplicateFilter?: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
653
- /**
654
- * Some articles describe a known event and some don't. This filter allows you to filter the resulting articles based on this criteria.
655
- * Possible values are:
656
- * - "skipArticlesWithoutEvent" (skip articles that are not describing any known event in ER)
657
- * - "keepOnlyArticlesWithoutEvent" (return only the articles that are not describing any known event in ER)
658
- * - "keepAll" (no filtering, default)
659
- */
660
- eventFilter?: "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent" | "keepAll";
661
- /**
662
- * Data type to search for. Possible values are "news" (news content), "pr" (PR content) or "blogs".
663
- * If you want to use multiple data types, put them in an array (e.g. ["news", "pr"])
664
- */
665
- dataType?: EventRegistryStatic.DataType[] | EventRegistryStatic.DataType;
666
- minSentiment?: number;
667
- maxSentiment?: number;
668
- minSocialScore?: number;
669
- minFacebookShares?: number;
670
- startSourceRankPercentile?: number;
671
- endSourceRankPercentile?: number;
672
- }
673
- interface ComplexEventQueryArguments {
674
- minSentiment?: number;
675
- maxSentiment?: number;
676
- }
677
- }
678
- namespace QueryArticle {
679
- interface RequestArticleSimilarArticlesArguments {
680
- /**
681
- * page of the articles
682
- */
683
- page?: number;
684
- /**
685
- * number of articles to return (at most 200)
686
- */
687
- count?: number;
688
- /**
689
- * in which language(s) should be the similar articles
690
- */
691
- lang?: string[];
692
- /**
693
- * max number of articles per language to return (-1 for no limit)
694
- */
695
- limitPerLang?: number;
696
- /**
697
- * what details should be included in the returned information
698
- */
699
- returnInfo?: ReturnInfo;
700
- }
701
- interface RequestArticleDuplicatedArticlesArguments {
702
- /**
703
- * page of the articles
704
- */
705
- page?: number;
706
- /**
707
- * number of articles to return (at most 200)
708
- */
709
- count?: number;
710
- /**
711
- * how are the articles sorted.
712
- */
713
- sortBy?: "id" | "date" | "cosSim" | "fq" | "socialScore" | "facebookShares" | "twitterShares";
714
- /**
715
- * should the results be sorted in ascending order (true) or descending (false)
716
- */
717
- sortByAsc?: boolean;
718
- /**
719
- * what details should be included in the returned information
720
- */
721
- returnInfo?: ReturnInfo;
722
- }
723
- }
724
- namespace QueryArticles {
725
- interface Arguments {
726
- /**
727
- * Find articles that mention the specified keywords.
728
- * A single keyword/phrase can be provided as a string, multiple keywords/phrases can be provided as a list of strings.
729
- * Use QueryItems.AND() if *all* provided keywords/phrases should be mentioned, or QueryItems.OR() if *any* of the keywords/phrases should be mentioned.
730
- * or QueryItems.OR() to specify a list of keywords where any of the keywords have to appear
731
- */
732
- keywords?: string | string[] | QueryItems;
733
- /**
734
- * Find articles where the concept with concept uri is mentioned.
735
- * A single concept uri can be provided as a string, multiple concept uris can be provided as a list of strings.
736
- * Use QueryItems.AND() if *all* provided concepts should be mentioned, or QueryItems.OR() if *any* of the concepts should be mentioned.
737
- * To obtain a concept uri using a concept label use EventRegistry.getConceptUri().
738
- */
739
- conceptUri?: string | string[] | QueryItems;
740
- /**
741
- * Find articles that are assigned into a particular category.
742
- * A single category can be provided as a string, while multiple categories can be provided as a list in QueryItems.AND() or QueryItems.OR().
743
- * A category uri can be obtained from a category name using EventRegistry.getCategoryUri().
744
- */
745
- categoryUri?: string | string[] | QueryItems;
746
- /**
747
- * find articles that were written by a news source sourceUri.
748
- * If multiple sources should be considered use QueryItems.OR() to provide the list of sources.
749
- * Source uri for a given news source name can be obtained using EventRegistry.getNewsSourceUri().
750
- */
751
- sourceUri?: string | string[] | QueryItems;
752
- /**
753
- * Find articles that were written by news sources located in the given geographic location.
754
- * If multiple source locations are provided, then put them into a list inside QueryItems.OR()
755
- * Location uri can either be a city or a country. Location uri for a given name can be obtained using EventRegistry.getLocationUri().
756
- */
757
- sourceLocationUri?: string | string[] | QueryItems;
758
- /**
759
- * Find articles that were written by news sources that are assigned to the specified source group.
760
- * If multiple source groups are provided, then put them into a list inside QueryItems.OR()
761
- * Source group uri for a given name can be obtained using EventRegistry.getSourceGroupUri().
762
- */
763
- sourceGroupUri?: string | string[] | QueryItems;
764
- /**
765
- * Find articles that were written by a specific author.
766
- * If multiple authors should be considered use QueryItems.OR() to provide the list of authors.
767
- * Author uri for a given author name can be obtained using EventRegistry.getAuthorUri().
768
- */
769
- authorUri?: string | string[] | QueryItems;
770
- /**
771
- * Find articles that describe something that occurred at a particular location.
772
- * If value can be a string or a list of strings provided in QueryItems.OR().
773
- * Location uri can either be a city or a country. Location uri for a given name can be obtained using EventRegistry.getLocationUri().
774
- */
775
- locationUri?: string | string[] | QueryItems;
776
- /**
777
- * find articles that are written in the specified language.
778
- * If more than one language is specified, resulting articles has to be written in *any* of the languages.
779
- */
780
- lang?: string | string[];
781
- /**
782
- * Find articles that were written on or after dateStart. Date should be provided in YYYY-MM-DD format.
783
- */
784
- dateStart?: string | Date;
785
- /**
786
- * Find articles that occurred before or on dateEnd. Date should be provided in YYYY-MM-DD format.
787
- */
788
- dateEnd?: string | Date;
789
- /**
790
- * Find articles that explicitly mention a date that is equal or greater than dateMentionStart.
791
- */
792
- dateMentionStart?: string | Date;
793
- /**
794
- * Find articles that explicitly mention a date that is lower or equal to dateMentionEnd.
795
- */
796
- dateMentionEnd?: string | Date;
797
- /**
798
- * Ignore articles that mention all provided keywords.
799
- */
800
- ignoreKeywords?: string | string[] | QueryItems;
801
- /**
802
- * Ignore articles that mention all provided concepts.
803
- */
804
- ignoreConceptUri?: string | string[] | QueryItems;
805
- /**
806
- * Ignore articles that are assigned to a particular category.
807
- */
808
- ignoreCategoryUri?: string | string[] | QueryItems;
809
- /**
810
- * Ignore articles that have been written by *any* of the specified news sources.
811
- */
812
- ignoreSourceUri?: string | string[] | QueryItems;
813
- /**
814
- * Ignore articles that have been written by sources located at *any* of the specified locations.
815
- */
816
- ignoreSourceLocationUri?: string | string[] | QueryItems;
817
- /**
818
- * Ignore articles that have been written by sources in *any* of the specified source groups.
819
- */
820
- ignoreSourceGroupUri?: string | string[] | QueryItems;
821
- /**
822
- * Ignore articles that were written by *any* of the specified authors.
823
- */
824
- ignoreAuthorUri?: string | string[] | QueryItems;
825
- /**
826
- * Ignore articles that occurred in any of the provided locations. A location can be a city or a place.
827
- */
828
- ignoreLocationUri?: string | string[] | QueryItems;
829
- /**
830
- * Ignore articles that are written in *any* of the provided languages.
831
- */
832
- ignoreLang?: string | string[] | QueryItems;
833
- /**
834
- * Where should we look when searching using the keywords provided by "keywords" parameter. "body" (default), "title", or "body,title".
835
- */
836
- keywordsLoc?: "body" | "title" | "body,title";
837
- /**
838
- * Where should we look when data should be used when searching using the keywords provided by "ignoreKeywords" parameter. "body" (default), "title", or "body,title".
839
- */
840
- ignoreKeywordsLoc?: "body" | "title" | "body,title";
841
- /**
842
- * Some articles can be duplicates of other articles. What should be done with them. Possible values are:
843
- * "skipDuplicates" (skip the resulting articles that are duplicates of other articles)
844
- * "keepOnlyDuplicates" (return only the duplicate articles)
845
- * "keepAll" (no filtering, default)
846
- */
847
- isDuplicateFilter?: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
848
- /**
849
- * Some articles are later copied by others. What should be done with such articles. Possible values are:
850
- * "skipHasDuplicates" (skip the resulting articles that have been later copied by others)
851
- * "keepOnlyHasDuplicates" (return only the articles that have been later copied by others)
852
- * "keepAll" (no filtering, default)
853
- */
854
- hasDuplicateFilter?: "skipHasDuplicates" | "keepOnlyHasDuplicates" | "keepAll";
855
- /**
856
- * Some articles describe a known event and some don't. This filter allows you to filter the resulting articles based on this criteria.
857
- * Possible values are:
858
- * "skipArticlesWithoutEvent" (skip articles that are not describing any known event in ER)
859
- * "keepOnlyArticlesWithoutEvent" (return only the articles that are not describing any known event in ER)
860
- * "keepAll" (no filtering, default)
861
- */
862
- eventFilter?: "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent" | "keepAll";
863
- /**
864
- * Starting percentile of the sources to consider in the results (default: 0). Value should be in range 0-90 and divisible by 10.
865
- */
866
- startSourceRankPercentile?: number;
867
- /**
868
- * Ending percentile of the sources to consider in the results (default: 100). Value should be in range 10-100 and divisible by 10.
869
- */
870
- endSourceRankPercentile?: number;
871
- /**
872
- * minimum value of the sentiment, that the returned articles should have. Range [-1, 1]. Note: setting the value will remove all articles that don't have a computed value for the sentiment (all non-English articles)
873
- */
874
- minSentiment?: number;
875
- /**
876
- * maximum value of the sentiment, that the returned articles should have. Range [-1, 1]. Note: setting the value will remove all articles that don't have a computed value for the sentiment (all non-English articles)
877
- */
878
- maxSentiment?: number;
879
- /**
880
- * what data types should we search? "news" (news content, default), "pr" (press releases), or "blogs".
881
- * If you want to use multiple data types, put them in an array (e.g. ["news", "pr"])
882
- */
883
- dataType?: EventRegistryStatic.DataType[] | EventRegistryStatic.DataType;
884
- /**
885
- * The information to return as the result of the query. By default return the list of matching articles.
886
- */
887
- requestedResult?: RequestArticles;
888
- }
889
- }
890
- namespace QueryEvent {
891
- /**
892
- * Sorting options:
893
- * - undefined (no specific sorting),
894
- * - id (internal id), date (published date),
895
- * - cosSim (closeness to event centroid),
896
- * - sourceImportance (manually curated score of source importance - high value,
897
- * - high importance), sourceImportanceRank (reverse of sourceImportance),
898
- * - sourceAlexaGlobalRank (global rank of the news source),
899
- * - sourceAlexaCountryRank (country rank of the news source),
900
- * - socialScore (total shares on social media),
901
- * - facebookShares (shares on Facebook only)
902
- */
903
- type SortByOptions = "id" | "date" | "cosSim" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
904
- interface RequestEvent {
905
- }
906
- interface IteratorArguments {
907
- /**
908
- * Array or a single language in which to return the list of matching articles
909
- */
910
- lang?: string | string[];
911
- /**
912
- * Order in which event articles are sorted.
913
- */
914
- sortBy?: SortByOptions;
915
- /**
916
- * Should the results be sorted in ascending order (True) or descending (False)
917
- */
918
- sortByAsc?: boolean;
919
- /**
920
- * What details should be included in the returned information
921
- */
922
- returnInfo?: ReturnInfo;
923
- /**
924
- * Number of articles to download at once (we are not downloading article by article) (at most 100)
925
- */
926
- articleBatchSize?: number;
927
- /**
928
- * Maximum number of items to be returned. Used to stop iteration sooner than results run out
929
- */
930
- maxItems?: number;
931
- keywords?: string | string[] | QueryItems;
932
- conceptUri?: string | string[] | QueryItems;
933
- categoryUri?: string | string[] | QueryItems;
934
- sourceUri?: string | string[] | QueryItems;
935
- sourceLocationUri?: string | string[] | QueryItems;
936
- sourceGroupUri?: string | string[] | QueryItems;
937
- authorUri?: string | string[] | QueryItems;
938
- locationUri?: string | string[] | QueryItems;
939
- dateStart?: string | Date;
940
- dateEnd?: string | Date;
941
- dateMentionStart?: string | Date;
942
- dateMentionEnd?: string | Date;
943
- keywordsLoc?: "body" | "title" | "body,title";
944
- startSourceRankPercentile?: number;
945
- endSourceRankPercentile?: number;
946
- /**
947
- * minimum value of the sentiment, that the returned articles should have. Range [-1, 1]. Note: setting the value will remove all articles that don't have a computed value for the sentiment (all articles that are not reported in English language)
948
- */
949
- minSentiment?: number;
950
- /**
951
- * maximum value of the sentiment, that the returned articles should have. Range [-1, 1]. Note: setting the value will remove all articles that don't have a computed value for the sentiment (all articles that are not reported in English language)
952
- */
953
- maxSentiment?: number;
954
- }
955
- interface RequestEventArticlesArguments {
956
- /**
957
- * page of the articles to return (1, 2, ...)
958
- */
959
- page?: number;
960
- /**
961
- * number of articles to return per page (at most 200)
962
- */
963
- count?: number;
964
- /**
965
- * a single language or an array of languages in which to return the articles
966
- */
967
- lang?: string | string[];
968
- /**
969
- * order in which event articles are sorted.
970
- */
971
- sortBy?: SortByOptions;
972
- /**
973
- * should the articles be sorted in ascending order (True) or descending (False) based on sortBy value
974
- */
975
- sortByAsc?: boolean;
976
- /**
977
- * what details should be included in the returned information
978
- */
979
- returnInfo?: ReturnInfo;
980
- keywords?: string | string[] | QueryItems;
981
- conceptUri?: string | string[] | QueryItems;
982
- categoryUri?: string | string[] | QueryItems;
983
- sourceUri?: string | string[] | QueryItems;
984
- sourceLocationUri?: string | string[] | QueryItems;
985
- sourceGroupUri?: string | string[] | QueryItems;
986
- authorUri?: string | string[] | QueryItems;
987
- locationUri?: string | string[] | QueryItems;
988
- dateStart?: string | Date;
989
- dateEnd?: string | Date;
990
- dateMentionStart?: string | Date;
991
- dateMentionEnd?: string | Date;
992
- keywordsLoc?: "body" | "title" | "body,title";
993
- startSourceRankPercentile?: number;
994
- endSourceRankPercentile?: number;
995
- }
996
- interface RequestEventArticleUriWgtsArguments {
997
- /**
998
- * a single language or an array of languages in which to return the articles
999
- */
1000
- lang?: string | string[];
1001
- /**
1002
- * order in which event articles are sorted.
1003
- */
1004
- sortBy?: SortByOptions;
1005
- /**
1006
- * should the articles be sorted in ascending order (True) or descending (False) based on sortBy value
1007
- */
1008
- sortByAsc?: boolean;
1009
- }
1010
- interface RequestEventArticleTrendArguments {
1011
- /**
1012
- * languages for which to compute the trends
1013
- */
1014
- lang?: string | string[];
1015
- /**
1016
- * page of the articles for which to return information (1, 2, ...)
1017
- */
1018
- page?: number;
1019
- /**
1020
- * number of articles returned per page (at most 200)
1021
- */
1022
- count?: number;
1023
- /**
1024
- * ignore articles that have cos similarity to centroid lower than the specified value (-1 for no limit)
1025
- */
1026
- minArticleCosSim?: number;
1027
- /**
1028
- * what details should be included in the returned information
1029
- */
1030
- returnInfo?: ReturnInfo;
1031
- }
1032
- interface RequestEventSimilarEventsArguments {
1033
- /**
1034
- * array of concepts and their importance, e.g. [{ "uri": "http://en.wikipedia.org/wiki/Barack_Obama", "wgt": 100 }, ...]
1035
- */
1036
- conceptInfoList?: Array<{
1037
- uri: string;
1038
- wgt: number;
1039
- }>;
1040
- /**
1041
- * number of similar events to return (at most 50)
1042
- */
1043
- count?: number;
1044
- dateStart?: string;
1045
- dateEnd?: string;
1046
- /**
1047
- * for the returned events compute how they were trending (intensity of reporting) in different time periods
1048
- */
1049
- addArticleTrendInfo?: boolean;
1050
- /**
1051
- * time span that is used as a unit when computing the trending info
1052
- */
1053
- aggrHours?: number;
1054
- /**
1055
- * include also the tested event in the results (True or False)
1056
- */
1057
- includeSelf?: boolean;
1058
- /**
1059
- * what details should be included in the returned information
1060
- */
1061
- returnInfo?: ReturnInfo;
1062
- }
1063
- interface RequestEventSimilarStoriesArguments {
1064
- /**
1065
- * array of concepts and their importance, e.g. [{ "uri": "http://en.wikipedia.org/wiki/Barack_Obama", "wgt": 100 }, ...]
1066
- */
1067
- conceptInfoList?: Array<{
1068
- uri: string;
1069
- wgt: number;
1070
- }>;
1071
- /**
1072
- * number of similar stories to return (at most 5')
1073
- */
1074
- count?: number;
1075
- /**
1076
- * in what language(s) should be the returned stories
1077
- */
1078
- lang?: string | string[];
1079
- /**
1080
- * maximum difference in days between the returned stories and the tested event
1081
- */
1082
- maxDayDiff?: number;
1083
- /**
1084
- * what details should be included in the returned information
1085
- */
1086
- returnInfo?: ReturnInfo;
1087
- }
1088
- }
1089
- namespace QueryMentions {
1090
- interface Arguments {
1091
- eventTypeUri?: string | string[] | QueryItems;
1092
- keywords?: string | string[] | QueryItems;
1093
- conceptUri?: string | string[] | QueryItems;
1094
- categoryUri?: string | string[] | QueryItems;
1095
- sourceUri?: string | string[] | QueryItems;
1096
- sourceLocationUri?: string | string[] | QueryItems;
1097
- sourceGroupUri?: string | string[] | QueryItems;
1098
- industryUri?: string | string[] | QueryItems;
1099
- locationUri?: string | string[] | QueryItems;
1100
- lang?: string | string[];
1101
- dateStart?: string | Date;
1102
- dateEnd?: string | Date;
1103
- ignoreEventTypeUri?: string | string[] | QueryItems;
1104
- ignoreKeywords?: string | string[] | QueryItems;
1105
- ignoreConceptUri?: string | string[] | QueryItems;
1106
- ignoreCategoryUri?: string | string[] | QueryItems;
1107
- ignoreSourceUri?: string | string[] | QueryItems;
1108
- ignoreSourceLocationUri?: string | string[] | QueryItems;
1109
- ignoreSourceGroupUri?: string | string[] | QueryItems;
1110
- ignoreIndustryUri?: string | string[] | QueryItems;
1111
- ignoreLocationUri?: string | string[] | QueryItems;
1112
- ignoreLang?: string | string[];
1113
- showDuplicates?: boolean;
1114
- startSourceRankPercentile?: number;
1115
- endSourceRankPercentile?: number;
1116
- minSentiment?: number;
1117
- maxSentiment?: number;
1118
- requestedResult?: RequestMentions;
1119
- }
1120
- interface IteratorArguments extends Arguments {
1121
- [key: string]: any;
1122
- }
1123
- interface RequestMentionsUriWgtListArguments {
1124
- /**
1125
- * page of the results to return (1, 2, ...)
1126
- */
1127
- page?: number;
1128
- /**
1129
- * number of results to return per page
1130
- */
1131
- count?: number;
1132
- /**
1133
- * how should the resulting events be sorted. Options:
1134
- * - none (no specific sorting),
1135
- * - date (by event date),
1136
- * - rel (relevance to the query),
1137
- * - size (number of articles),
1138
- * - socialScore (amount of shares in social media)
1139
- */
1140
- sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1141
- /**
1142
- * should the results be sorted in ascending order (true) or descending (false)
1143
- */
1144
- sortByAsc?: boolean;
1145
- }
1146
- interface RequestMentionsConceptAggrArguments {
1147
- /**
1148
- * number of top concepts to return
1149
- */
1150
- conceptCount?: number;
1151
- /**
1152
- * on what sample of results should the aggregate be computed
1153
- */
1154
- mentionsSampleSize?: number;
1155
- /**
1156
- * what details about the concepts should be included in the returned information
1157
- */
1158
- returnInfo?: ReturnInfo;
1159
- /**
1160
- * how should the top concepts be computed. Possible values are
1161
- * "importance" (takes into account how frequently a concept is mentioned and how relevant it is in an mention),
1162
- * "frequency" (ranks the concepts simply by how frequently the concept is mentioned in the results) and
1163
- * "uniqueness" (computes what are the top concepts that are frequently mentioned in the results of your search query but less frequently mentioned in the news in general)
1164
- */
1165
- conceptScoring?: "importance" | "frequency" | "uniqueness";
1166
- /**
1167
- * if you wish to limit the number of top concepts per type (person, org, loc, wiki) then set this to some number.
1168
- * If you want to get equal number of concepts for each type then set conceptCountPerType to conceptCount/4 (since there are 4 concept types)
1169
- */
1170
- conceptCountPerType?: number;
1171
- }
1172
- interface RequestMentionsCategoryAggrArguments {
1173
- mentionsSampleSize?: number;
1174
- returnInfo?: ReturnInfo;
1175
- }
1176
- interface RequestMentionsSourceAggrArguments {
1177
- sourceCount?: number;
1178
- normalizeBySourceArts?: boolean;
1179
- returnInfo?: ReturnInfo;
1180
- }
1181
- interface RequestMentionsKeywordAggrArguments {
1182
- mentionsSampleSize?: number;
1183
- }
1184
- interface RequestMentionsConceptGraphArguments {
1185
- /**
1186
- * number of top sources to return
1187
- */
1188
- conceptCount?: number;
1189
- linkCount?: number;
1190
- /**
1191
- * on what sample of results should the aggregate be computed
1192
- */
1193
- mentionsSampleSize?: number;
1194
- /**
1195
- * what details about the concepts should be included in the returned information
1196
- */
1197
- returnInfo?: ReturnInfo;
1198
- skipQueryConcepts?: boolean;
1199
- }
1200
- interface RequestMentionsRecentActivityArguments {
1201
- /**
1202
- * max mentions to return
1203
- */
1204
- maxMentionCount?: number;
1205
- updatesAfterUri?: string;
1206
- /**
1207
- * the time after which the events were added/updated (returned by previous call to the same method)
1208
- */
1209
- updatesAfterTm?: string | Date;
1210
- /**
1211
- * how many minutes into the past should we check (set either this or updatesAfterTm property, but not both)
1212
- */
1213
- updatesAfterMinsAgo?: number;
1214
- updatesUntilTm?: string | Date;
1215
- updatesUntilMinsAgo?: number;
1216
- /**
1217
- * return only events that have a geographic location assigned to them
1218
- */
1219
- mandatorySourceLocation?: boolean;
1220
- /**
1221
- * what details should be included in the returned information
1222
- */
1223
- returnInfo?: ReturnInfo;
1224
- }
1225
- }
1226
- namespace QueryEvents {
1227
- interface Arguments {
1228
- /**
1229
- * find events where articles mention all the specified keywords.
1230
- * A single keyword/phrase can be provided as a string,
1231
- * multiple keywords/phrases can be provided as a list of strings.
1232
- * Use QueryItems.AND() if *all* provided keywords/phrases should be mentioned,
1233
- * or QueryItems.OR() if *any* of the keywords/phrases should be mentioned.
1234
- */
1235
- keywords?: string | string[] | QueryItems;
1236
- /**
1237
- * find events where the concept with concept uri is important.
1238
- * A single concept uri can be provided as a string, multiple concept uris
1239
- * can be provided as a list of strings.
1240
- * Use QueryItems.AND() if *all* provided concepts should be mentioned, or QueryItems.OR()
1241
- * if *any* of the concepts should be mentioned.
1242
- * To obtain a concept uri using a concept label use EventRegistry.getConceptUri().
1243
- */
1244
- conceptUri?: string | string[] | QueryItems;
1245
- /**
1246
- * find events that are assigned into a particular category.
1247
- * A single category uri can be provided as a string, multiple category uris
1248
- * can be provided as a list of strings.
1249
- * Use QueryItems.AND() if *all* provided categories should be mentioned, or QueryItems.OR()
1250
- * if *any* of the categories should be mentioned.
1251
- * A category uri can be obtained from a category name using EventRegistry.getCategoryUri().
1252
- */
1253
- categoryUri?: string | string[] | QueryItems;
1254
- /**
1255
- * find events that contain one or more articles that have been written by a news source sourceUri.
1256
- * If multiple sources should be considered use QueryItems.OR() to provide the list of sources.
1257
- * Source uri for a given news source name can be obtained using EventRegistry.getNewsSourceUri().
1258
- */
1259
- sourceUri?: string | string[] | QueryItems;
1260
- /**
1261
- * find events that contain one or more articles that were written
1262
- * by news sources located in the given geographic location.
1263
- * If multiple source locations are provided, then put them into a list inside QueryItems.OR()
1264
- * Location uri can either be a city or a country.
1265
- * Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1266
- */
1267
- sourceLocationUri?: string | string[] | QueryItems;
1268
- /**
1269
- * find events that contain one or more articles that were written
1270
- * by news sources that are assigned to the specified source group.
1271
- * If multiple source groups are provided, then put them into a list inside QueryItems.OR()
1272
- * Source group uri for a given name can be obtained using EventRegistry.getSourceGroupUri().
1273
- */
1274
- sourceGroupUri?: string | string[] | QueryItems;
1275
- /**
1276
- * find events that contain one or more articles that have been written by a specific author.
1277
- * If multiple authors should be considered use QueryItems.OR() or QueryItems.AND() to provide the list of authors.
1278
- * Author uri for a given author name can be obtained using EventRegistry.getAuthorUri().
1279
- */
1280
- authorUri?: string | string[] | QueryItems;
1281
- /**
1282
- * find events that occurred at a particular location.
1283
- * If value can be a string or a list of strings provided in QueryItems.OR().
1284
- * Location uri can either be a city or a country.
1285
- * Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1286
- */
1287
- locationUri?: string | string[] | QueryItems;
1288
- /**
1289
- * find events for which we found articles in the specified language.
1290
- * If more than one language is specified, resulting events has to be reported in *any* of the languages.
1291
- */
1292
- lang?: string | string[];
1293
- /**
1294
- * find events that occurred on or after dateStart. Date should be provided in YYYY-MM-DD format.
1295
- */
1296
- dateStart?: string | Date;
1297
- /**
1298
- * find events that occurred before or on dateEnd. Date should be provided in YYYY-MM-DD format.
1299
- */
1300
- dateEnd?: string | Date;
1301
- /**
1302
- * find events where the average date of the articles about this event is on or after this date. Date should be provided in YYYY-MM-DD format, datetime.time or datetime.datetime.
1303
- */
1304
- reportingDateStart?: string | Date;
1305
- /**
1306
- * find events where the average date of the articles about this event is on or before this date. Date should be provided in YYYY-MM-DD format, datetime.time or datetime.datetime.
1307
- */
1308
- reportingDateEnd?: string | Date;
1309
- /**
1310
- * minimum value of the sentiment, that the returned events should have. Range [-1, 1]. Note: setting the value will remove all events that don't have a computed value for the sentiment (all events that are not reported in English language)
1311
- */
1312
- minSentiment?: number;
1313
- /**
1314
- * maximum value of the sentiment, that the returned events should have. Range [-1, 1]. Note: setting the value will remove all events that don't have a computed value for the sentiment (all events that are not reported in English language)
1315
- */
1316
- maxSentiment?: number;
1317
- /**
1318
- * find events that have been reported in at least minArticlesInEvent articles (regardless of language)
1319
- */
1320
- minArticlesInEvent?: number;
1321
- /**
1322
- * find events that have not been reported in more than maxArticlesInEvent articles (regardless of language)
1323
- */
1324
- maxArticlesInEvent?: number;
1325
- /**
1326
- * find events where articles explicitly mention a date that is equal or greater than dateMentionStart.
1327
- */
1328
- dateMentionStart?: string | Date;
1329
- /**
1330
- * find events where articles explicitly mention a date that is lower or equal to dateMentionEnd.
1331
- */
1332
- dateMentionEnd?: string | Date;
1333
- /**
1334
- * ignore events where articles about the event mention any of the provided keywords
1335
- */
1336
- ignoreKeywords?: string | string[] | QueryItems;
1337
- /**
1338
- * ignore events that are about any of the provided concepts
1339
- */
1340
- ignoreConceptUri?: string | string[] | QueryItems;
1341
- /**
1342
- * ignore events that are about any of the provided categories
1343
- */
1344
- ignoreCategoryUri?: string | string[] | QueryItems;
1345
- /**
1346
- * ignore events that have have articles which have been written by any of the specified news sources
1347
- */
1348
- ignoreSourceUri?: string | string[] | QueryItems;
1349
- /**
1350
- * ignore events that have articles which been written by sources located at *any* of the specified locations
1351
- */
1352
- ignoreSourceLocationUri?: string | string[] | QueryItems;
1353
- /**
1354
- * ignore events that have articles which have been written by sources in *any* of the specified source groups
1355
- */
1356
- ignoreSourceGroupUri?: string | string[] | QueryItems;
1357
- /**
1358
- * ignore articles that were written by *any* of the specified authors
1359
- */
1360
- ignoreAuthorUri?: string | string[] | QueryItems;
1361
- /**
1362
- * ignore events that occurred in any of the provided locations. A location can be a city or a place
1363
- */
1364
- ignoreLocationUri?: string | string[] | QueryItems;
1365
- /**
1366
- * ignore events that are reported in any of the provided languages
1367
- */
1368
- ignoreLang?: string | string[];
1369
- /**
1370
- * what data should be used when searching using the keywords provided by "keywords" parameter.
1371
- */
1372
- keywordsLoc?: "body" | "title" | "body,title";
1373
- /**
1374
- * what data should be used when searching using the keywords provided by "ignoreKeywords" parameter.
1375
- */
1376
- ignoreKeywordsLoc?: "body" | "title" | "body,title";
1377
- /**
1378
- * when a category is specified using categoryUri, should also all subcategories be included?
1379
- */
1380
- categoryIncludeSub?: boolean;
1381
- /**
1382
- * when a category is specified using ignoreCategoryUri, should also all subcategories be included?
1383
- */
1384
- ignoreCategoryIncludeSub?: boolean;
1385
- /**
1386
- * the information to return as the result of the query. By default return the list of matching events
1387
- */
1388
- requestedResult?: RequestEvents;
1389
- }
1390
- interface IteratorArguments extends Arguments {
1391
- /**
1392
- * how should the resulting events be sorted. Options:
1393
- * - none (no specific sorting),
1394
- * - date (by event date),
1395
- * - rel (relevance to the query),
1396
- * - size (number of articles),
1397
- * - socialScore (amount of shares in social media)
1398
- */
1399
- sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1400
- /**
1401
- * should the results be sorted in ascending order (true) or descending (false)
1402
- */
1403
- sortByAsc?: boolean;
1404
- /**
1405
- * number of events to download at once (we are not downloading event by event)
1406
- */
1407
- eventBatchSize?: number;
1408
- /**
1409
- * maximum number of items to be returned. Used to stop iteration sooner than results run out
1410
- */
1411
- maxItems?: number;
1412
- returnInfo?: ReturnInfo;
1413
- }
1414
- interface RequestEventsInfoArguments {
1415
- /**
1416
- * page of the results to return (1, 2, ...)
1417
- */
1418
- page?: number;
1419
- /**
1420
- * number of results to return per page
1421
- */
1422
- count?: number;
1423
- /**
1424
- * how should the resulting events be sorted. Options:
1425
- * - none (no specific sorting),
1426
- * - date (by event date),
1427
- * - rel (relevance to the query),
1428
- * - size (number of articles),
1429
- * - socialScore (amount of shares in social media)
1430
- */
1431
- sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1432
- /**
1433
- * should the results be sorted in ascending order (true) or descending (false)
1434
- */
1435
- sortByAsc?: boolean;
1436
- /**
1437
- * what details should be included in the returned information
1438
- */
1439
- returnInfo?: ReturnInfo;
1440
- }
1441
- interface RequestEventsUriListArguments {
1442
- /**
1443
- * page of the results to return (1, 2, ...)
1444
- */
1445
- page?: number;
1446
- /**
1447
- * number of results to return per page
1448
- */
1449
- count?: number;
1450
- /**
1451
- * how should the resulting events be sorted. Options:
1452
- * - none (no specific sorting),
1453
- * - date (by event date),
1454
- * - rel (relevance to the query),
1455
- * - size (number of articles),
1456
- * - socialScore (amount of shares in social media)
1457
- */
1458
- sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1459
- /**
1460
- * should the results be sorted in ascending order (true) or descending (false)
1461
- */
1462
- sortByAsc?: boolean;
1463
- }
1464
- interface RequestEventsUriWgtListArguments {
1465
- /**
1466
- * page of the results to return (1, 2, ...)
1467
- */
1468
- page?: number;
1469
- /**
1470
- * number of results to return per page
1471
- */
1472
- count?: number;
1473
- /**
1474
- * how should the resulting events be sorted. Options:
1475
- * - none (no specific sorting),
1476
- * - date (by event date),
1477
- * - rel (relevance to the query),
1478
- * - size (number of articles),
1479
- * - socialScore (amount of shares in social media)
1480
- */
1481
- sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1482
- /**
1483
- * should the results be sorted in ascending order (true) or descending (false)
1484
- */
1485
- sortByAsc?: boolean;
1486
- }
1487
- interface RequestEventsLocAggrArguments {
1488
- /**
1489
- * sample of events to use to compute the location aggregate
1490
- */
1491
- eventsSampleSize?: number;
1492
- /**
1493
- * what details (about locations) should be included in the returned information
1494
- */
1495
- returnInfo?: ReturnInfo;
1496
- }
1497
- interface RequestEventsLocTimeAggrArguments {
1498
- /**
1499
- * sample of events to use to compute the location aggregate
1500
- */
1501
- eventsSampleSize?: number;
1502
- /**
1503
- * what details (about locations) should be included in the returned information
1504
- */
1505
- returnInfo?: ReturnInfo;
1506
- }
1507
- interface RequestEventsConceptAggrArguments {
1508
- /**
1509
- * number of top concepts to return
1510
- */
1511
- conceptCount?: number;
1512
- /**
1513
- * on what sample of results should the aggregate be computed
1514
- */
1515
- eventsSampleSize?: number;
1516
- /**
1517
- * what details about the concepts should be included in the returned information
1518
- */
1519
- returnInfo?: ReturnInfo;
1520
- }
1521
- interface RequestEventsConceptGraphArguments {
1522
- /**
1523
- * number of top concepts to return
1524
- */
1525
- conceptCount?: number;
1526
- /**
1527
- * number of links between the concepts to return
1528
- */
1529
- linkCount?: number;
1530
- /**
1531
- * on what sample of results should the aggregate be computed
1532
- */
1533
- eventsSampleSize?: number;
1534
- /**
1535
- * what details about the concepts should be included in the returned information
1536
- */
1537
- returnInfo?: ReturnInfo;
1538
- }
1539
- interface RequestEventsConceptMatrixArguments {
1540
- /**
1541
- * number of top concepts to return
1542
- */
1543
- conceptCount?: number;
1544
- /**
1545
- * how should the interestingness between the selected pairs of concepts be computed. Options: pmi (pointwise mutual information), pairTfIdf (pair frequence * IDF of individual concepts), chiSquare
1546
- */
1547
- measure?: "pmi" | "pairTfIdf" | "chiSquare";
1548
- /**
1549
- * on what sample of results should the aggregate be computed
1550
- */
1551
- eventsSampleSize?: number;
1552
- /**
1553
- * what details about the concepts should be included in the returned information
1554
- */
1555
- returnInfo?: ReturnInfo;
1556
- }
1557
- interface RequestEventsConceptTrendsArguments {
1558
- /**
1559
- * number of top concepts to return
1560
- */
1561
- conceptCount?: number;
1562
- /**
1563
- * what details about the concepts should be included in the returned information
1564
- */
1565
- returnInfo?: ReturnInfo;
1566
- /**
1567
- * list of concept URIs for which to return trending information. If empty, then top concepts will be automatically computed.
1568
- */
1569
- conceptUris?: string[];
1570
- }
1571
- interface RequestEventsSourceAggrArguments {
1572
- /**
1573
- * number of top sources to return
1574
- */
1575
- sourceCount?: number;
1576
- /**
1577
- * on what sample of results should the aggregate be computed
1578
- */
1579
- eventsSampleSize?: number;
1580
- /**
1581
- * what details about the concepts should be included in the returned information
1582
- */
1583
- returnInfo?: ReturnInfo;
1584
- }
1585
- interface RequestEventsDateMentionAggrArguments {
1586
- /**
1587
- * ignore events that don't have a date that is more than this number of days apart from the tested event
1588
- */
1589
- minDaysApart?: number;
1590
- /**
1591
- * report only dates that are mentioned at least this number of times
1592
- */
1593
- minDateMentionCount?: number;
1594
- /**
1595
- * on what sample of results should the aggregate be computed
1596
- */
1597
- eventsSampleSize?: number;
1598
- /**
1599
- * what details about the concepts should be included in the returned information
1600
- */
1601
- returnInfo?: ReturnInfo;
1602
- }
1603
- interface RequestEventsEventClustersArguments {
1604
- /**
1605
- * number of keywords to report in each of the clusters
1606
- */
1607
- keywordCount?: number;
1608
- /**
1609
- * try to cluster at most this number of events
1610
- */
1611
- maxEventsToCluster?: number;
1612
- /**
1613
- * what details about the concepts should be included in the returned information
1614
- */
1615
- returnInfo?: ReturnInfo;
1616
- }
1617
- interface RequestEventsRecentActivityArguments {
1618
- /**
1619
- * max events to return
1620
- */
1621
- maxEventCount?: number;
1622
- /**
1623
- * the time after which the events were added/updated (returned by previous call to the same method)
1624
- */
1625
- updatesAfterTm?: string | Date;
1626
- /**
1627
- * how many minutes into the past should we check (set either this or updatesAfterTm property, but not both)
1628
- */
1629
- updatesAfterMinsAgo?: number;
1630
- /**
1631
- * return only events that have a geographic location assigned to them
1632
- */
1633
- mandatoryLocation?: boolean;
1634
- /**
1635
- * the minimum avg cos sim of the events to be returned (events with lower quality should not be included)
1636
- */
1637
- minAvgCosSim?: number;
1638
- /**
1639
- * what details should be included in the returned information
1640
- */
1641
- returnInfo?: ReturnInfo;
1642
- }
1643
- }
1644
- namespace ReturnInfo {
1645
- /**
1646
- * What information about an article should be returned by the API call
1647
- */
1648
- interface ArticleInfo {
1649
- /**
1650
- * max length of the article body (use -1 for full body, 0 for empty)
1651
- */
1652
- bodyLen?: number;
1653
- /**
1654
- * core article information -
1655
- */
1656
- basicInfo?: boolean;
1657
- /**
1658
- * article title
1659
- */
1660
- title?: boolean;
1661
- /**
1662
- * article body
1663
- */
1664
- body?: boolean;
1665
- /**
1666
- * article url
1667
- */
1668
- url?: boolean;
1669
- /**
1670
- * uri of the event to which the article belongs
1671
- */
1672
- eventUri?: boolean;
1673
- /**
1674
- * the list of authors of the news article
1675
- */
1676
- authors?: boolean;
1677
- /**
1678
- * the list of concepts mentioned in the article
1679
- */
1680
- concepts?: boolean;
1681
- /**
1682
- * the list of categories assigned to the article
1683
- */
1684
- categories?: boolean;
1685
- /**
1686
- * the list of urls of links identified in the article body
1687
- */
1688
- links?: boolean;
1689
- /**
1690
- * the list of videos assigned to the article
1691
- */
1692
- videos?: boolean;
1693
- /**
1694
- * url to the image associated with the article
1695
- */
1696
- image?: boolean;
1697
- /**
1698
- * information about the number of times the article was shared on facebook and linkedin, instagram, ...
1699
- */
1700
- socialScore?: boolean;
1701
- /**
1702
- * sentiment about the article
1703
- */
1704
- sentiment?: boolean;
1705
- /**
1706
- * the geographic location that the event mentioned in the article is about
1707
- */
1708
- location?: boolean;
1709
- /**
1710
- * the dates when the articles was crawled and the date when it was published (based on the rss feed date)
1711
- */
1712
- dates?: boolean;
1713
- /**
1714
- * the list of dates found mentioned in the article
1715
- */
1716
- extractedDates?: boolean;
1717
- /**
1718
- * if the article is a duplicate, this will provide information about the original article
1719
- */
1720
- originalArticle?: boolean;
1721
- /**
1722
- * uri of the story (cluster) to which the article belongs
1723
- */
1724
- storyUri?: boolean;
1725
- [name: string]: boolean | string | number;
1726
- }
1727
- /**
1728
- * What information about an article should be returned by the API call
1729
- */
1730
- interface ArticleInfoFlags {
1731
- /**
1732
- * max length of the article body (use -1 for full body, 0 for empty)
1733
- */
1734
- ArticleBodyLen?: number;
1735
- /**
1736
- * core article information -
1737
- */
1738
- IncludeArticleBasicInfo?: boolean;
1739
- /**
1740
- * article title
1741
- */
1742
- IncludeArticleTitle?: boolean;
1743
- /**
1744
- * article body
1745
- */
1746
- IncludeArticleBody?: boolean;
1747
- /**
1748
- * article url
1749
- */
1750
- IncludeArticleUrl?: boolean;
1751
- /**
1752
- * uri of the event to which the article belongs
1753
- */
1754
- IncludeArticleEventUri?: boolean;
1755
- /**
1756
- * the list of concepts mentioned in the article
1757
- */
1758
- IncludeArticleConcepts?: boolean;
1759
- /**
1760
- * the list of categories assigned to the article
1761
- */
1762
- IncludeArticleCategories?: boolean;
1763
- /**
1764
- * the list of urls of links identified in the article body
1765
- */
1766
- IncludeArticleLinks?: boolean;
1767
- /**
1768
- * the list of videos assigned to the article
1769
- */
1770
- IncludeArticleVideos?: boolean;
1771
- /**
1772
- * url to the image associated with the article
1773
- */
1774
- IncludeArticleImage?: boolean;
1775
- /**
1776
- * information about the number of times the article was shared on facebook and linkedin, instagram, ...
1777
- */
1778
- IncludeArticleSocialScore?: boolean;
1779
- /**
1780
- * sentiment about the article
1781
- */
1782
- IncludeArticleSentiment?: boolean;
1783
- /**
1784
- * the geographic location that the event mentioned in the article is about
1785
- */
1786
- IncludeArticleLocation?: boolean;
1787
- /**
1788
- * the dates when the articles was crawled and the date when it was published (based on the rss feed date)
1789
- */
1790
- IncludeArticleDates?: boolean;
1791
- /**
1792
- * the list of dates found mentioned in the article
1793
- */
1794
- IncludeArticleExtractedDates?: boolean;
1795
- /**
1796
- * the list of articles that are a copy of this article
1797
- */
1798
- IncludeArticleDuplicateList?: boolean;
1799
- /**
1800
- * if the article is a duplicate, this will provide information about the original article
1801
- */
1802
- IncludeArticleOriginalArticle?: boolean;
1803
- /**
1804
- * uri of the story (cluster) to which the article belongs
1805
- */
1806
- IncludeArticleStoryUri?: boolean;
1807
- }
1808
- /**
1809
- * What information about a story (cluster of articles) should be returned by the API call
1810
- */
1811
- interface StoryInfoFlags {
1812
- /**
1813
- * core stats about the story
1814
- */
1815
- IncludeStoryBasicStats?: boolean;
1816
- /**
1817
- * geographic location that the story is about
1818
- */
1819
- IncludeStoryLocation?: boolean;
1820
- /**
1821
- * date of the story
1822
- */
1823
- IncludeStoryDate?: boolean;
1824
- /**
1825
- * title of the story
1826
- */
1827
- IncludeStoryTitle?: boolean;
1828
- /**
1829
- * summary of the story
1830
- */
1831
- IncludeStorySummary?: boolean;
1832
- /**
1833
- * set of concepts associated with the story
1834
- */
1835
- IncludeStoryConcepts?: boolean;
1836
- /**
1837
- * categories associated with the story
1838
- */
1839
- IncludeStoryCategories?: boolean;
1840
- /**
1841
- * the article that is closest to the center of the cluster of articles assigned to the story
1842
- */
1843
- IncludeStoryMedoidArticle?: boolean;
1844
- /**
1845
- * dates that were frequently identified in the articles belonging to the story
1846
- */
1847
- IncludeStoryCommonDates?: boolean;
1848
- /**
1849
- * score computed based on how frequently the articles in the story were shared on social media
1850
- */
1851
- IncludeStorySocialScore?: boolean;
1852
- /**
1853
- * number of images to be returned for a story
1854
- */
1855
- StoryImageCount?: number;
1856
- }
1857
- /**
1858
- * What information about a story (cluster of articles) should be returned by the API call
1859
- */
1860
- interface StoryInfo {
1861
- /**
1862
- * core stats about the story
1863
- */
1864
- basicStats?: boolean;
1865
- /**
1866
- * geographic location that the story is about
1867
- */
1868
- location?: boolean;
1869
- /**
1870
- * date of the story
1871
- */
1872
- date?: boolean;
1873
- /**
1874
- * title of the story
1875
- */
1876
- title?: boolean;
1877
- /**
1878
- * summary of the story
1879
- */
1880
- summary?: boolean;
1881
- /**
1882
- * set of concepts associated with the story
1883
- */
1884
- concepts?: boolean;
1885
- /**
1886
- * categories associated with the story
1887
- */
1888
- categories?: boolean;
1889
- /**
1890
- * the article that is closest to the center of the cluster of articles assigned to the story
1891
- */
1892
- medoidArticle?: boolean;
1893
- /**
1894
- * the article from which we have extracted the title and summary for the story
1895
- */
1896
- infoArticle?: boolean;
1897
- /**
1898
- * dates that were frequently identified in the articles belonging to the story
1899
- */
1900
- commonDates?: boolean;
1901
- /**
1902
- * score computed based on how frequently the articles in the story were shared on social media
1903
- */
1904
- socialScore?: boolean;
1905
- /**
1906
- * number of images to be returned for a story
1907
- */
1908
- imageCount?: number;
1909
- [name: string]: boolean | string | number;
1910
- }
1911
- /**
1912
- * What information about an event should be returned by the API call
1913
- */
1914
- interface EventInfoFlags {
1915
- /**
1916
- * return the title of the event
1917
- */
1918
- IncludeEventTitle?: boolean;
1919
- /**
1920
- * return the summary of the event
1921
- */
1922
- IncludeEventSummary?: boolean;
1923
- /**
1924
- * return the number of articles that are assigned to the event
1925
- */
1926
- IncludeEventArticleCounts?: boolean;
1927
- /**
1928
- * return information about the main concepts related to the event
1929
- */
1930
- IncludeEventConcepts?: boolean;
1931
- /**
1932
- * return information about the categories related to the event
1933
- */
1934
- IncludeEventCategories?: boolean;
1935
- /**
1936
- * return the location where the event occurred
1937
- */
1938
- IncludeEventLocation?: boolean;
1939
- /**
1940
- * return information about the date of the event
1941
- */
1942
- IncludeEventDate?: boolean;
1943
- /**
1944
- * return the dates that were commonly found in the articles about the event
1945
- */
1946
- IncludeEventCommonDates?: boolean;
1947
- /**
1948
- * return the list of stories (clusters) that are about the event
1949
- */
1950
- IncludeEventStories?: boolean;
1951
- /**
1952
- * score computed based on how frequently the articles in the event were shared on social media
1953
- */
1954
- IncludeEventSocialScore?: boolean;
1955
- /**
1956
- * number of images to be returned for an event
1957
- */
1958
- EventImageCount?: number;
1959
- }
1960
- /**
1961
- * What information about an event should be returned by the API call
1962
- */
1963
- interface EventInfo {
1964
- /**
1965
- * return the title of the event
1966
- */
1967
- title?: boolean;
1968
- /**
1969
- * return the summary of the event
1970
- */
1971
- summary?: boolean;
1972
- /**
1973
- * return the number of articles that are assigned to the event
1974
- */
1975
- articleCounts?: boolean;
1976
- /**
1977
- * return information about the main concepts related to the event
1978
- */
1979
- concepts?: boolean;
1980
- /**
1981
- * return information about the categories related to the event
1982
- */
1983
- categories?: boolean;
1984
- /**
1985
- * return information about the date of the event
1986
- */
1987
- date?: boolean;
1988
- /**
1989
- * return the dates that were commonly found in the articles about the event
1990
- */
1991
- commonDates?: boolean;
1992
- /**
1993
- * return for each language the article from which we have extracted the summary and title for event for that language
1994
- */
1995
- articleInfo?: boolean;
1996
- /**
1997
- * return the list of stories (clusters) that are about the event
1998
- */
1999
- stories?: boolean;
2000
- /**
2001
- * score computed based on how frequently the articles in the event were shared on social media
2002
- */
2003
- socialScore?: boolean;
2004
- /**
2005
- * number of images to be returned for an event
2006
- */
2007
- imageCount?: number;
2008
- [name: string]: boolean | string | number;
2009
- }
2010
- /**
2011
- * What information about a news source should be returned by the API call
2012
- */
2013
- interface SourceInfoFlags {
2014
- /**
2015
- * title of the news source
2016
- */
2017
- IncludeSourceTitle?: boolean;
2018
- /**
2019
- * description of the news source
2020
- */
2021
- IncludeSourceDescription?: boolean;
2022
- /**
2023
- * geographic location of the news source
2024
- */
2025
- IncludeSourceLocation?: boolean;
2026
- /**
2027
- * a set of rankings for the news source
2028
- */
2029
- IncludeSourceRanking?: boolean;
2030
- /**
2031
- * different images associated with the news source
2032
- */
2033
- IncludeSourceImage?: boolean;
2034
- /**
2035
- * different social media accounts used by the news source
2036
- */
2037
- IncludeSourceSocialMedia?: boolean;
2038
- }
2039
- /**
2040
- * What information about a news source should be returned by the API call
2041
- */
2042
- interface SourceInfo {
2043
- /**
2044
- * title of the news source
2045
- */
2046
- title?: boolean;
2047
- /**
2048
- * description of the news source
2049
- */
2050
- description?: boolean;
2051
- /**
2052
- * geographic location of the news source
2053
- */
2054
- location?: boolean;
2055
- /**
2056
- * a set of rankings for the news source
2057
- */
2058
- ranking?: boolean;
2059
- /**
2060
- * different images associated with the news source
2061
- */
2062
- image?: boolean;
2063
- /**
2064
- * the number of articles from this news source that are stored in Event Registry
2065
- */
2066
- articleCount?: boolean;
2067
- /**
2068
- * different social media accounts used by the news source
2069
- */
2070
- socialMedia?: boolean;
2071
- /**
2072
- * info about the names of the source groups to which the source belongs to
2073
- */
2074
- sourceGroups?: boolean;
2075
- [name: string]: boolean | string | number;
2076
- }
2077
- /**
2078
- * What information about a category should be returned by the API call
2079
- */
2080
- interface CategoryInfoFlags {
2081
- IncludeCategoryTrendingScore?: boolean;
2082
- }
2083
- /**
2084
- * What information about a category should be returned by the API call
2085
- */
2086
- interface CategoryInfo {
2087
- trendingScore?: boolean;
2088
- [name: string]: boolean | string | number;
2089
- }
2090
- interface ConceptInfoFlags {
2091
- ConceptType?: ConceptType;
2092
- lang?: string | string[];
2093
- IncludeConceptLabel?: boolean;
2094
- IncludeConceptSynonyms?: boolean;
2095
- IncludeConceptImage?: boolean;
2096
- IncludeConceptDescription?: boolean;
2097
- IncludeConceptTrendingScore?: boolean;
2098
- MaxConceptsPerType?: number;
2099
- }
2100
- interface ConceptInfo {
2101
- type?: ConceptType | ConceptType[];
2102
- lang?: string | string[];
2103
- label?: boolean;
2104
- synonyms?: boolean;
2105
- image?: boolean;
2106
- description?: boolean;
2107
- trendingScore?: boolean;
2108
- maxConceptsPerType?: number;
2109
- [name: string]: boolean | string | number | (boolean | string | number)[];
2110
- }
2111
- interface LocationInfoFlags {
2112
- label?: boolean;
2113
- wikiUri?: boolean;
2114
- geoNamesId?: boolean;
2115
- population?: boolean;
2116
- geoLocation?: boolean;
2117
- countryArea?: boolean;
2118
- countryDetails?: boolean;
2119
- countryContinent?: boolean;
2120
- placeFeatureCode?: boolean;
2121
- placeCountry?: boolean;
2122
- }
2123
- interface LocationInfo {
2124
- label?: boolean;
2125
- wikiUri?: boolean;
2126
- geoNamesId?: boolean;
2127
- population?: boolean;
2128
- geoLocation?: boolean;
2129
- countryArea?: boolean;
2130
- countryDetails?: boolean;
2131
- countryContinent?: boolean;
2132
- placeFeatureCode?: boolean;
2133
- placeCountry?: boolean;
2134
- [name: string]: boolean | string | number;
2135
- }
2136
- interface ConceptClassInfoFlags {
2137
- IncludeConceptClassParentLabels?: boolean;
2138
- IncludeConceptClassConcepts?: boolean;
2139
- }
2140
- interface ConceptClassInfo {
2141
- parentLabels?: boolean;
2142
- concepts?: boolean;
2143
- [name: string]: boolean | string | number;
2144
- }
2145
- interface ConceptFolderInfoFlags {
2146
- IncludeConceptFolderDefinition?: boolean;
2147
- IncludeConceptFolderOwner?: boolean;
2148
- }
2149
- interface ConceptFolderInfo {
2150
- definition?: boolean;
2151
- owner?: boolean;
2152
- [name: string]: boolean | string | number;
2153
- }
2154
- }
2155
- }
1
+ import { QueryItems } from "./base";
2
+ import { BaseQuery, CombinedQuery } from "./query";
3
+ import { QueryArticles, RequestArticles } from "./queryArticles";
4
+ import { RequestEvents } from "./queryEvents";
5
+ import { RequestMentions } from "./queryMentions";
6
+ import { ReturnInfo } from "./returnInfo";
7
+ /**
8
+ * Type definitions for different classes and functions from the Event Registry Node JS SDK.
9
+ */
10
+ export declare namespace ER {
11
+ export type Response<T = SuccessfulResponse<unknown>, E = string> = T & ErrorResponse<E>;
12
+ export interface SuccessfulResponse<T = unknown> {
13
+ [name: string]: Results<T> | Record<string, Results<T>>;
14
+ }
15
+ export interface ErrorResponseObject {
16
+ message?: string;
17
+ response?: Record<string, string>;
18
+ }
19
+ export interface ErrorResponse<E = string> {
20
+ error?: E;
21
+ }
22
+ export interface Results<T = unknown> {
23
+ count?: number;
24
+ page?: number;
25
+ pages?: number;
26
+ warning?: string;
27
+ results: T[];
28
+ totalResults?: number;
29
+ usedResults?: number;
30
+ }
31
+ export interface UsageInfo {
32
+ availableTokens: number;
33
+ usedTokens: number;
34
+ }
35
+ export interface ServiceStatus {
36
+ [name: string]: any;
37
+ }
38
+ export interface Config {
39
+ /**
40
+ * API key that should be used to make the requests to the Event Registry.
41
+ * API key is assigned to each user account and can be obtained on this page:
42
+ * http://eventregistry.org/me?tab=settings
43
+ */
44
+ apiKey?: string;
45
+ /**
46
+ * Host to use to access the Event Registry backend
47
+ */
48
+ host?: string;
49
+ /**
50
+ * host address to use to perform the analytics api calls
51
+ */
52
+ hostAnalytics?: string;
53
+ /**
54
+ * log all requests
55
+ */
56
+ logging?: boolean;
57
+ /**
58
+ * The minimum number of seconds between individual api calls
59
+ */
60
+ minDelayBetweenRequests?: number;
61
+ /**
62
+ * if a request fails (for example, because ER is down),
63
+ * what is the max number of times the request should be repeated
64
+ */
65
+ repeatFailedRequestCount?: number;
66
+ /**
67
+ * if true, additional info about errors etc. will be printed to console
68
+ */
69
+ verboseOutput?: boolean;
70
+ /**
71
+ * print which urls are used as the hosts
72
+ */
73
+ printHostInfo?: boolean;
74
+ settingsFName?: string;
75
+ allowUseOfArchive?: boolean;
76
+ }
77
+ export type BaseConceptType = "person" | "loc" | "org" | "wiki";
78
+ export type ConceptType = "person" | "loc" | "org" | "wiki" | "entities" | "concepts" | "conceptClass" | "conceptFolder";
79
+ export type SourceType = "place" | "country";
80
+ export type ConceptClassType = "dbpedia" | "custom";
81
+ export type DataType = "news" | "pr" | "blog";
82
+ /**
83
+ * Options:
84
+ * * id (internal id),
85
+ * * date (publishing date),
86
+ * * cosSim (closeness to the event centroid),
87
+ * * rel (relevance to the query),
88
+ * * sourceImportance (manually curated score of source importance - high value, high importance),
89
+ * * sourceImportanceRank (reverse of sourceImportance),
90
+ * * sourceAlexaGlobalRank (global rank of the news source),
91
+ * * sourceAlexaCountryRank (country rank of the news source),
92
+ * * socialScore (total shares on social media),
93
+ * * facebookShares (shares on Facebook only)
94
+ */
95
+ export type SortBy = "id" | "date" | "cosSim" | "rel" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
96
+ export interface SuggestConceptsArguments {
97
+ /**
98
+ * What types of concepts should be returned
99
+ */
100
+ sources?: ER.ConceptType[];
101
+ /**
102
+ * Language in which the prefix is specified
103
+ */
104
+ lang?: string | string[];
105
+ /**
106
+ * Languages in which the label(s) for the concepts are to be returned
107
+ */
108
+ conceptLang?: string | string[];
109
+ /**
110
+ * Page of the results (1, 2, ...)
111
+ */
112
+ page?: number;
113
+ /**
114
+ * Number of returned suggestions per page
115
+ */
116
+ count?: number;
117
+ /**
118
+ * What details about concepts should be included in the returned information
119
+ */
120
+ returnInfo?: ReturnInfo;
121
+ }
122
+ export interface SuggestCategoriesArguments {
123
+ /**
124
+ * page of the results (1, 2, ...)
125
+ */
126
+ page?: number;
127
+ /**
128
+ * number of returned suggestions
129
+ */
130
+ count?: number;
131
+ /**
132
+ * what details about categories should be included in the returned information
133
+ */
134
+ returnInfo?: ReturnInfo;
135
+ }
136
+ export interface SuggestNewsSourcesArguments {
137
+ /**
138
+ * page of the results (1, 2, ...)
139
+ */
140
+ page?: number;
141
+ /**
142
+ * number of returned suggestions
143
+ */
144
+ count?: number;
145
+ /**
146
+ * Suggest sources that provide content in these data types
147
+ */
148
+ dataType?: ER.DataType[] | ER.DataType;
149
+ }
150
+ export interface SuggestSourceGroupsArguments {
151
+ /**
152
+ * page of the results (1, 2, ...)
153
+ */
154
+ page?: number;
155
+ /**
156
+ * number of returned suggestions
157
+ */
158
+ count?: number;
159
+ }
160
+ export interface SuggestLocationsArguments {
161
+ /**
162
+ * What types of locations are we interested in.
163
+ */
164
+ sources?: ER.SourceType[];
165
+ /**
166
+ * Language in which the prefix is specified
167
+ */
168
+ lang?: string;
169
+ /**
170
+ * Number of returned suggestions
171
+ */
172
+ count?: number;
173
+ /**
174
+ * If provided, then return only those locations that are inside the specified country
175
+ */
176
+ countryUri?: string;
177
+ /**
178
+ * If provided, then return the locations sorted by the distance to the (lat, long) provided in the tuple
179
+ */
180
+ sortByDistanceTo?: number[];
181
+ /**
182
+ * What details about locations should be included in the returned information
183
+ */
184
+ returnInfo?: ReturnInfo;
185
+ }
186
+ export interface SuggestLocationsAtCoordinateArguments {
187
+ /**
188
+ * Limit the set of results only to cities (true) or also to general places (false)
189
+ */
190
+ limitToCities?: boolean;
191
+ /**
192
+ * Language in which the location label should be returned
193
+ */
194
+ lang?: string;
195
+ /**
196
+ * Number of returned suggestions
197
+ */
198
+ count?: number;
199
+ /**
200
+ * Ignore locations that don't have a wiki page and can not be used for concept search
201
+ */
202
+ ignoreNonWiki?: boolean;
203
+ /**
204
+ * What details about locations should be included in the returned information
205
+ */
206
+ returnInfo?: ReturnInfo;
207
+ }
208
+ export interface SuggestSourcesAtPlaceArguments {
209
+ /**
210
+ * page of the results (1, 2, ...)
211
+ */
212
+ page?: number;
213
+ /**
214
+ * number of returned sources
215
+ */
216
+ count?: number;
217
+ /**
218
+ * type of the news source ("news", "pr", "blog" or a list of any of those)
219
+ */
220
+ dataType?: DataType;
221
+ }
222
+ export interface SuggestConceptClassesArguments {
223
+ /**
224
+ * language in which the prefix is specified
225
+ */
226
+ lang?: string;
227
+ /**
228
+ * languages in which the label(s) for the concepts are to be returned
229
+ */
230
+ conceptLang?: string;
231
+ /**
232
+ * what types of concepts classes should be returned.
233
+ */
234
+ source?: ER.ConceptClassType[];
235
+ /**
236
+ * page of the results (1, 2, ...)
237
+ */
238
+ page?: number;
239
+ /**
240
+ * number of returned suggestions
241
+ */
242
+ count?: number;
243
+ /**
244
+ * what details about categories should be included in the returned information
245
+ */
246
+ returnInfo?: ReturnInfo;
247
+ }
248
+ export interface SuggestCustomConceptsArguments {
249
+ /**
250
+ * language in which the prefix is specified
251
+ */
252
+ lang?: string;
253
+ /**
254
+ * languages in which the label(s) for the concepts are to be returned
255
+ */
256
+ conceptLang?: string;
257
+ /**
258
+ * page of the results (1, 2, ...)
259
+ */
260
+ page?: number;
261
+ /**
262
+ * number of returned suggestions
263
+ */
264
+ count?: number;
265
+ /**
266
+ * what details about categories should be included in the returned information
267
+ */
268
+ returnInfo?: ReturnInfo;
269
+ }
270
+ export interface GetConceptUriArguments {
271
+ /**
272
+ * language in which the prefix is specified
273
+ */
274
+ lang?: string;
275
+ /**
276
+ * what types of concepts should be returned.
277
+ */
278
+ sources?: ER.ConceptType[];
279
+ }
280
+ export interface GetLocationUriArguments {
281
+ /**
282
+ * language in which the prefix is specified
283
+ */
284
+ lang?: string;
285
+ /**
286
+ * what types of locations are we interested in.
287
+ */
288
+ sources?: ER.SourceType | ER.SourceType[];
289
+ /**
290
+ * if set, then filter the possible locations to the locations from that country
291
+ */
292
+ countryUri?: string;
293
+ /**
294
+ * sort candidates by distance to the given (lat, long) pair
295
+ */
296
+ sortByDistanceTo?: number[];
297
+ }
298
+ export interface GetStatsArguments {
299
+ addDailyArticles?: boolean;
300
+ addDailyAnnArticles?: boolean;
301
+ addDailyDuplArticles?: boolean;
302
+ addDailyEvents?: boolean;
303
+ }
304
+ interface Country {
305
+ type: string;
306
+ label: Label;
307
+ }
308
+ interface Label {
309
+ [name: string]: string;
310
+ }
311
+ export interface Location {
312
+ type: string;
313
+ wikiUri?: string;
314
+ label: Label;
315
+ country: Country;
316
+ lat?: number;
317
+ long?: number;
318
+ }
319
+ export interface Author {
320
+ uri: string;
321
+ name: string;
322
+ type: string;
323
+ isAgency: boolean;
324
+ isDisabled?: boolean;
325
+ articleCount?: number;
326
+ }
327
+ interface Shares {
328
+ [name: string]: number;
329
+ }
330
+ export interface Source {
331
+ uri: string;
332
+ dataType: string;
333
+ title: string;
334
+ location: Location;
335
+ private?: boolean;
336
+ disabled?: boolean;
337
+ locationValidated?: boolean;
338
+ articleCount?: string;
339
+ articles?: number;
340
+ importance?: string;
341
+ expected?: boolean;
342
+ actual?: number;
343
+ ranking?: {
344
+ alexaGlobalRank: string;
345
+ alexaCountryRank: string;
346
+ importanceRank: string;
347
+ };
348
+ }
349
+ interface BaseWeight {
350
+ wgt: number;
351
+ excluded?: boolean;
352
+ }
353
+ interface ConceptWeight extends BaseWeight {
354
+ label: string;
355
+ uri: string;
356
+ type: string;
357
+ required?: boolean;
358
+ }
359
+ interface KeywordWeight extends BaseWeight {
360
+ keyword: string;
361
+ keywordLoc?: string;
362
+ required?: boolean;
363
+ }
364
+ interface SourceWeight extends BaseWeight {
365
+ uri: string;
366
+ title: string;
367
+ }
368
+ interface CategoryWeight extends BaseWeight {
369
+ label: string;
370
+ uri: string;
371
+ required?: boolean;
372
+ }
373
+ interface LocationWeight extends BaseWeight {
374
+ label: string;
375
+ uri: string;
376
+ required?: boolean;
377
+ }
378
+ type Weight<T = any> = T extends ConceptWeight ? ConceptWeight : T extends KeywordWeight ? KeywordWeight : T extends SourceWeight ? SourceWeight : T extends CategoryWeight ? CategoryWeight : T extends LocationWeight ? LocationWeight : T;
379
+ export interface Concept<T = Record<string, string> | string> {
380
+ id?: string;
381
+ label?: T;
382
+ title?: string;
383
+ score?: number;
384
+ frequency?: number;
385
+ type?: "person" | "loc" | "org" | "concepts" | "conceptClass" | "topicPage" | "collection";
386
+ uri?: string;
387
+ wgt?: number;
388
+ image?: string;
389
+ description?: string;
390
+ disabled?: boolean;
391
+ currentType?: Record<string, string>;
392
+ lang?: string;
393
+ location?: {
394
+ country: {
395
+ label: {
396
+ [lang: string]: string;
397
+ };
398
+ };
399
+ };
400
+ lastUriPart?: string;
401
+ hierarchy?: {
402
+ [lang: string]: string;
403
+ };
404
+ conceptFolder?: {
405
+ owner: {
406
+ name: string;
407
+ };
408
+ };
409
+ conceptClass?: {
410
+ parentLabels: {
411
+ [lang: string]: string[];
412
+ };
413
+ };
414
+ topicPage?: {
415
+ visibility: number;
416
+ autoAddArticles?: boolean;
417
+ articleTreshWgt?: number | string;
418
+ eventTreshWgt?: number | string;
419
+ articleIsDuplicate?: string;
420
+ articleHasDuplicate?: string;
421
+ articleHasEvent?: string;
422
+ startSourceRankPercentile?: number;
423
+ endSourceRankPercentile?: number;
424
+ minSocialScore?: number;
425
+ minSentiment?: number;
426
+ maxSentiment?: number;
427
+ restrictToSetSources?: boolean;
428
+ restrictToSetLocations?: boolean;
429
+ restrictToSetCategories?: boolean;
430
+ restrictToSetConcepts?: boolean;
431
+ minArticlesInEvent?: number;
432
+ maxDaysBack?: number;
433
+ concepts?: Weight<ConceptWeight>[];
434
+ keywords?: Weight<KeywordWeight>[];
435
+ sources?: Weight<SourceWeight>[];
436
+ authors?: Weight<SourceWeight>[];
437
+ sourceLocations?: Weight<SourceWeight>[];
438
+ sourceGroups?: Weight<SourceWeight>[];
439
+ categories?: Weight<CategoryWeight>[];
440
+ locations?: Weight<LocationWeight>[];
441
+ langs?: string[];
442
+ dataType?: Array<"news" | "pr" | "blog">;
443
+ owner?: {
444
+ uri: string;
445
+ };
446
+ };
447
+ collection?: {
448
+ visibility: number;
449
+ };
450
+ fq?: number;
451
+ }
452
+ export interface Keyword {
453
+ keyword: string;
454
+ weight: number;
455
+ }
456
+ export interface Category {
457
+ count: number;
458
+ label: string;
459
+ uri: string;
460
+ }
461
+ export interface ArticleCounts {
462
+ [lang: string]: number;
463
+ }
464
+ export interface InfoArticle {
465
+ [lang: string]: string;
466
+ }
467
+ export interface Title {
468
+ [lang: string]: string;
469
+ }
470
+ export interface Summary {
471
+ [lang: string]: string;
472
+ }
473
+ export interface Event {
474
+ id?: string;
475
+ uri: string;
476
+ concepts: Concept[];
477
+ langs?: number;
478
+ eventDate: string;
479
+ eventDateEnd?: string;
480
+ totalArticleCount: number;
481
+ title: Title;
482
+ summary: Summary;
483
+ rtl: boolean;
484
+ infoArticle: InfoArticle;
485
+ location: Location;
486
+ locationStr: string;
487
+ categories: Category[];
488
+ stories?: unknown[];
489
+ removed?: boolean;
490
+ images: string[];
491
+ articleCounts: ArticleCounts;
492
+ socialScore: number;
493
+ sentiment: null | number;
494
+ wgt: number;
495
+ keywords?: unknown[];
496
+ entities?: unknown[];
497
+ circleSize?: number;
498
+ }
499
+ export interface Article {
500
+ id?: string;
501
+ uri?: string;
502
+ lang?: string;
503
+ isDuplicate?: boolean;
504
+ date?: string;
505
+ time?: string;
506
+ removed?: boolean;
507
+ assigned?: boolean;
508
+ dateTime?: string;
509
+ dataType?: string;
510
+ sim?: number;
511
+ url?: string;
512
+ title?: string;
513
+ fullTitle?: string;
514
+ body?: string;
515
+ source?: Source;
516
+ authors?: Author[];
517
+ concepts?: Concept[];
518
+ image?: string;
519
+ eventUri?: null | string;
520
+ sentiment?: null | number;
521
+ shares?: Shares;
522
+ wgt?: number;
523
+ rtl?: boolean;
524
+ userHasPermissions?: boolean;
525
+ categories?: Category[];
526
+ sourceName?: string;
527
+ disabled?: boolean;
528
+ }
529
+ export interface TopicPage {
530
+ autoAddArticles: boolean;
531
+ articleHasDuplicate: "skipHasDuplicates" | "keepOnlyHasDuplicates" | "keepAll";
532
+ articleHasEvent: "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent" | "keepAll";
533
+ articleIsDuplicate: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
534
+ maxDaysBack: number;
535
+ articleTreshWgt: number;
536
+ eventTreshWgt: number;
537
+ concepts: Record<string, string | number | boolean>[];
538
+ keywords: Record<string, string | number | boolean>[];
539
+ categories: Record<string, string | number | boolean>[];
540
+ sources: Record<string, string | number | boolean>[];
541
+ sourceGroups: Record<string, string | number | boolean>[];
542
+ sourceLocations: Record<string, string | number | boolean>[];
543
+ locations: Record<string, string | number | boolean>[];
544
+ langs: string[];
545
+ startSourceRankPercentile?: number;
546
+ endSourceRankPercentile?: number;
547
+ restrictToSetConcepts: boolean;
548
+ restrictToSetCategories: boolean;
549
+ restrictToSetSources: boolean;
550
+ restrictToSetLocations: boolean;
551
+ dataType: ER.DataType | ER.DataType[];
552
+ }
553
+ export interface TopicPageAddConceptArguments {
554
+ label?: string;
555
+ conceptType?: string;
556
+ required?: boolean;
557
+ excluded?: boolean;
558
+ }
559
+ export interface TopicPageAddKeywordArguments {
560
+ required?: boolean;
561
+ excluded?: boolean;
562
+ }
563
+ export interface TopicPageAddCategoryArguments {
564
+ required?: boolean;
565
+ excluded?: boolean;
566
+ }
567
+ export interface TopicPageAddSourceArguments {
568
+ excluded?: boolean;
569
+ }
570
+ export interface TopicPageAddSourceLocationArguments {
571
+ excluded?: boolean;
572
+ }
573
+ export interface TopicPageAddSourceGroupArguments {
574
+ excluded?: boolean;
575
+ }
576
+ export interface TopicPageArticles {
577
+ /**
578
+ * Which page of the results to return (default: 1).
579
+ */
580
+ page?: number;
581
+ /**
582
+ * Number of articles to return (default: 100)
583
+ */
584
+ count?: number;
585
+ /**
586
+ * How are articles sorted
587
+ */
588
+ sortBy?: SortBy;
589
+ /**
590
+ * Should the results be sorted in ascending order (true) or descending (false)
591
+ */
592
+ sortByAsc?: boolean;
593
+ dataType?: ER.DataType | ER.DataType[];
594
+ /**
595
+ * What details should be included in the returned information
596
+ */
597
+ returnInfo?: ReturnInfo;
598
+ [name: string]: (string | number | boolean | ReturnInfo) | (string | number | boolean)[];
599
+ }
600
+ export interface TopicPageEvents {
601
+ /**
602
+ * Which page of the results to return (default: 1).
603
+ */
604
+ page?: number;
605
+ /**
606
+ * Number of events to return (default: 50)
607
+ */
608
+ count?: number;
609
+ /**
610
+ * How are events sorted
611
+ */
612
+ sortBy?: SortBy;
613
+ /**
614
+ * Should the results be sorted in ascending order (true) or descending (false)
615
+ */
616
+ sortByAsc?: boolean;
617
+ /**
618
+ * What details should be included in the returned information
619
+ */
620
+ returnInfo?: ReturnInfo;
621
+ [name: string]: (string | number | boolean | ReturnInfo) | (string | number | boolean)[];
622
+ }
623
+ export namespace Correlations {
624
+ interface TopConceptArguments {
625
+ /**
626
+ * An instance of QueryArticles that can be used to limit the space of concept candidates
627
+ */
628
+ candidateConceptsQuery?: QueryArticles;
629
+ /**
630
+ * If candidateConceptsQuery is provided, then this number of concepts for each valid type will be return as candidates
631
+ */
632
+ candidatesPerType?: number;
633
+ /**
634
+ * A string or an array containing the concept types that are valid candidates on which to compute top correlations
635
+ * valid values are "person", "org", "loc" and/or "wiki"
636
+ */
637
+ conceptType?: string | string[];
638
+ /**
639
+ * the number of returned concepts for which the exact value of the correlation is computed
640
+ */
641
+ exactCount?: number;
642
+ /**
643
+ * the number of returned concepts for which only an approximate value of the correlation is computed
644
+ */
645
+ approxCount?: number;
646
+ /**
647
+ * specifies the details about the concepts that should be returned in the output result
648
+ */
649
+ returnInfo?: ReturnInfo;
650
+ }
651
+ interface TopCategoryArguments {
652
+ /**
653
+ * the number of returned categories for which the exact value of the correlation is computed
654
+ */
655
+ exactCount?: number;
656
+ /**
657
+ * the number of returned categories for which only an approximate value of the correlation is computed
658
+ */
659
+ approxCount?: number;
660
+ /**
661
+ * specifies the details about the categories that should be returned in the output result
662
+ */
663
+ returnInfo?: ReturnInfo;
664
+ }
665
+ }
666
+ export namespace Counts {
667
+ interface Arguments {
668
+ /**
669
+ * input source information from which to compute top trends.
670
+ */
671
+ source?: "news" | "social" | "custom" | "geo" | "sentiment";
672
+ /**
673
+ * What do the uris represent?
674
+ */
675
+ type?: "concept" | "category";
676
+ /**
677
+ * Starting date from which to provide counts onwards (format: YYYY-MM-DD).
678
+ */
679
+ dateStart?: string | Date;
680
+ /**
681
+ * Ending date until which to provide counts (format: YYYY-MM-DD).
682
+ */
683
+ dateEnd?: string | Date;
684
+ /**
685
+ * What details should be included in the returned information.
686
+ */
687
+ returnInfo?: ReturnInfo;
688
+ }
689
+ }
690
+ export namespace DailyShares {
691
+ interface Arguments {
692
+ /**
693
+ * Specify the date for which to return top shared articles. If undefined then today is used.
694
+ */
695
+ date?: string;
696
+ /**
697
+ * Number of top shared articles to return
698
+ */
699
+ count?: number;
700
+ /**
701
+ * Specifies the details that should be returned in the output result
702
+ */
703
+ returnInfo?: ReturnInfo;
704
+ }
705
+ }
706
+ export namespace Analytics {
707
+ type Response = ER.Response<Record<string, unknown>, ER.ErrorResponseObject>;
708
+ interface TrainTopicOnTweetsArguments {
709
+ /**
710
+ * Do you want to analyze the content of the tweets and extract the concepts mentioned in them?
711
+ * If false, only content shared in the articles in the user's tweets will be analyzed.
712
+ */
713
+ useTweetText?: boolean;
714
+ /**
715
+ * Normalize identified concepts by their IDF in the news (punish very common concepts)
716
+ */
717
+ useIdfNormalization?: boolean;
718
+ /**
719
+ * Way to normalize the concept weights ("none", "linear")
720
+ */
721
+ normalization?: "none" | "linear";
722
+ /**
723
+ * The number of concepts to save in the final topic.
724
+ */
725
+ maxConcepts?: number;
726
+ /**
727
+ * The number of categories to save in the final topic.
728
+ */
729
+ maxCategories?: number;
730
+ /**
731
+ * The maximum number of tweets to collect for the user to analyze.
732
+ */
733
+ maxTweets?: number;
734
+ /**
735
+ * maximum number of article links in the tweets to analyze (default 500, max 2000)
736
+ */
737
+ maxUsedLinks?: number;
738
+ /**
739
+ * what types of concepts you would like to ignore in the profile. options: person, org, loc, wiki or an array with those
740
+ */
741
+ ignoreConceptTypes?: BaseConceptType | BaseConceptType[];
742
+ /**
743
+ * When finished, should we send a notification email to this address?
744
+ */
745
+ notifyEmailAddress?: string;
746
+ }
747
+ interface TrainTopicGetTrainedTopicArguments {
748
+ maxConcepts?: number;
749
+ maxCategories?: number;
750
+ idfNormalization?: boolean;
751
+ }
752
+ interface Language {
753
+ code: string;
754
+ name: string;
755
+ percent: number;
756
+ }
757
+ namespace Response {
758
+ interface Annotate {
759
+ [name: string]: unknown;
760
+ }
761
+ interface Categorize {
762
+ categories: ER.Category[];
763
+ }
764
+ interface Sentiment {
765
+ avgSent: unknown;
766
+ sentimentPerSent: unknown;
767
+ }
768
+ interface SentimentSimilarity {
769
+ similarity: unknown;
770
+ }
771
+ interface DetectLanguage {
772
+ languages: ER.Analytics.Language[];
773
+ }
774
+ interface ExtractArticleInfo {
775
+ title?: string;
776
+ body?: string;
777
+ date?: string;
778
+ datetime?: string;
779
+ image?: string;
780
+ }
781
+ }
782
+ }
783
+ export namespace Info {
784
+ interface GetSourceInfoArguments {
785
+ /**
786
+ * single source uri or a list of source uris for which to return information
787
+ */
788
+ uriOrUriList?: string | string[];
789
+ /**
790
+ * what details about the source should be included in the returned information
791
+ */
792
+ returnInfo?: ReturnInfo;
793
+ }
794
+ interface GetConceptInfoArguments {
795
+ /**
796
+ * single concept uri or a list of concept uris for which to return information
797
+ */
798
+ uriOrUriList?: string | string[];
799
+ /**
800
+ * what details about the source should be included in the returned information
801
+ */
802
+ returnInfo?: ReturnInfo;
803
+ }
804
+ interface GetCategoryInfoArguments {
805
+ /**
806
+ * single category uri or a list of category uris for which to return information
807
+ */
808
+ uriOrUriList?: string | string[];
809
+ /**
810
+ * what details about the source should be included in the returned information
811
+ */
812
+ returnInfo?: ReturnInfo;
813
+ }
814
+ }
815
+ export namespace Query {
816
+ interface BaseQueryArguments {
817
+ /**
818
+ * Keyword(s) to query. Either undefined, string or QueryItems.
819
+ */
820
+ keyword?: string | QueryItems;
821
+ /**
822
+ * Concept(s) to query. Either undefined, string or QueryItems.
823
+ */
824
+ conceptUri?: string | QueryItems;
825
+ /**
826
+ * Source(s) to query. Either undefined, string or QueryItems.
827
+ */
828
+ sourceUri?: string | QueryItems;
829
+ /**
830
+ * Location(s) to query. Either undefined, string or QueryItems.
831
+ */
832
+ locationUri?: string | QueryItems;
833
+ /**
834
+ * CategoryUri categories to query. Either undefined, string or QueryItems.
835
+ */
836
+ categoryUri?: string | QueryItems;
837
+ /**
838
+ * Language(s) to query. Either undefined, string or QueryItems.
839
+ */
840
+ lang?: string | QueryItems;
841
+ /**
842
+ * Starting date. Either undefined, string or date.
843
+ */
844
+ dateStart?: string | Date;
845
+ /**
846
+ * Ending date. Either undefined, string or date.
847
+ */
848
+ dateEnd?: string | Date;
849
+ /**
850
+ * Search by mentioned dates - Either undefined, string or date or a list of these types.
851
+ */
852
+ dateMention?: string | string[];
853
+ /**
854
+ * Find content generated by news sources at the specified geographic location - can be a city URI or a country URI. Multiple items can be provided using a list.
855
+ */
856
+ sourceLocationUri?: string | string[];
857
+ /**
858
+ * A single or multiple source group URIs. A source group is a group of news sources, commonly defined based on common topic or importance.
859
+ */
860
+ sourceGroupUri?: string | string[];
861
+ /**
862
+ * Author(s) to query. Either undefined, string or QueryItems.
863
+ */
864
+ authorUri?: string | string[];
865
+ /**
866
+ * Should we include the subcategories of the searched categories?
867
+ */
868
+ categoryIncludeSub?: boolean;
869
+ /**
870
+ * Where should we look when searching using the keywords provided by "keyword" parameter. "body" (default), "title", or "body,title".
871
+ */
872
+ keywordLoc?: "body" | "title" | "body,title";
873
+ /**
874
+ * A tuple containing the minimum and maximum number of articles that should be in the resulting events. Parameter relevant only if querying events.
875
+ */
876
+ minMaxArticlesInEvent?: [number, number];
877
+ /**
878
+ * A instance of BaseQuery, CombinedQuery or undefined. Used to filter out results matching the other criteria specified in this query.
879
+ */
880
+ exclude?: BaseQuery | CombinedQuery;
881
+ }
882
+ interface ComplexArticleQueryArguments {
883
+ /**
884
+ * Some articles can be duplicates of other articles. What should be done with them.
885
+ * Possible values are:
886
+ * - "skipDuplicates" (skip the resulting articles that are duplicates of other articles)
887
+ * - "keepOnlyDuplicates" (return only the duplicate articles)
888
+ * - "keepAll" (no filtering, default)
889
+ */
890
+ isDuplicateFilter?: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
891
+ /**
892
+ * some articles are later copied by others. What should be done with such articles.
893
+ * Possible values are:
894
+ * - "skipHasDuplicates" (skip the resulting articles that have been later copied by others)
895
+ * - "keepOnlyHasDuplicates" (return only the articles that have been later copied by others)
896
+ * - "keepAll" (no filtering, default)
897
+ */
898
+ hasDuplicateFilter?: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
899
+ /**
900
+ * Some articles describe a known event and some don't. This filter allows you to filter the resulting articles based on this criteria.
901
+ * Possible values are:
902
+ * - "skipArticlesWithoutEvent" (skip articles that are not describing any known event in ER)
903
+ * - "keepOnlyArticlesWithoutEvent" (return only the articles that are not describing any known event in ER)
904
+ * - "keepAll" (no filtering, default)
905
+ */
906
+ eventFilter?: "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent" | "keepAll";
907
+ /**
908
+ * Data type to search for. Possible values are "news" (news content), "pr" (PR content) or "blogs".
909
+ * If you want to use multiple data types, put them in an array (e.g. ["news", "pr"])
910
+ */
911
+ dataType?: ER.DataType[] | ER.DataType;
912
+ minSentiment?: number;
913
+ maxSentiment?: number;
914
+ minSocialScore?: number;
915
+ minFacebookShares?: number;
916
+ startSourceRankPercentile?: number;
917
+ endSourceRankPercentile?: number;
918
+ }
919
+ interface ComplexEventQueryArguments {
920
+ minSentiment?: number;
921
+ maxSentiment?: number;
922
+ }
923
+ }
924
+ export namespace QueryArticle {
925
+ interface RequestArticleSimilarArticlesArguments {
926
+ /**
927
+ * page of the articles
928
+ */
929
+ page?: number;
930
+ /**
931
+ * number of articles to return (at most 200)
932
+ */
933
+ count?: number;
934
+ /**
935
+ * in which language(s) should be the similar articles
936
+ */
937
+ lang?: string[];
938
+ /**
939
+ * max number of articles per language to return (-1 for no limit)
940
+ */
941
+ limitPerLang?: number;
942
+ /**
943
+ * what details should be included in the returned information
944
+ */
945
+ returnInfo?: ReturnInfo;
946
+ }
947
+ interface RequestArticleDuplicatedArticlesArguments {
948
+ /**
949
+ * page of the articles
950
+ */
951
+ page?: number;
952
+ /**
953
+ * number of articles to return (at most 200)
954
+ */
955
+ count?: number;
956
+ /**
957
+ * how are the articles sorted.
958
+ */
959
+ sortBy?: "id" | "date" | "cosSim" | "fq" | "socialScore" | "facebookShares" | "twitterShares";
960
+ /**
961
+ * should the results be sorted in ascending order (true) or descending (false)
962
+ */
963
+ sortByAsc?: boolean;
964
+ /**
965
+ * what details should be included in the returned information
966
+ */
967
+ returnInfo?: ReturnInfo;
968
+ }
969
+ }
970
+ export interface RequestArticlesInfoParameters {
971
+ page?: number;
972
+ count?: number;
973
+ sortBy?: string;
974
+ sortByAsc?: boolean;
975
+ returnInfo?: ReturnInfo;
976
+ }
977
+ export interface RequestArticlesUriWgtListParameters {
978
+ page?: number;
979
+ count?: number;
980
+ sortBy?: string;
981
+ sortByAsc?: boolean;
982
+ }
983
+ export interface RequestArticlesConceptTrendsParameters {
984
+ conceptUris?: string[];
985
+ conceptCount?: number;
986
+ articlesSampleSize?: number;
987
+ returnInfo?: ReturnInfo;
988
+ }
989
+ export namespace Aggr {
990
+ namespace Source {
991
+ interface CountsPerSource {
992
+ source: ER.Source;
993
+ counts: {
994
+ frequency: number;
995
+ total: number;
996
+ };
997
+ }
998
+ interface CountsPerCountry {
999
+ uri: string;
1000
+ type: string;
1001
+ frequency: number;
1002
+ }
1003
+ }
1004
+ }
1005
+ export namespace QueryArticles {
1006
+ interface Arguments {
1007
+ /**
1008
+ * Find articles that mention the specified keywords.
1009
+ * A single keyword/phrase can be provided as a string, multiple keywords/phrases can be provided as a list of strings.
1010
+ * Use QueryItems.AND() if *all* provided keywords/phrases should be mentioned, or QueryItems.OR() if *any* of the keywords/phrases should be mentioned.
1011
+ * or QueryItems.OR() to specify a list of keywords where any of the keywords have to appear
1012
+ */
1013
+ keywords?: string | string[] | QueryItems;
1014
+ /**
1015
+ * Find articles where the concept with concept uri is mentioned.
1016
+ * A single concept uri can be provided as a string, multiple concept uris can be provided as a list of strings.
1017
+ * Use QueryItems.AND() if *all* provided concepts should be mentioned, or QueryItems.OR() if *any* of the concepts should be mentioned.
1018
+ * To obtain a concept uri using a concept label use EventRegistry.getConceptUri().
1019
+ */
1020
+ conceptUri?: string | string[] | QueryItems;
1021
+ /**
1022
+ * Find articles that are assigned into a particular category.
1023
+ * A single category can be provided as a string, while multiple categories can be provided as a list in QueryItems.AND() or QueryItems.OR().
1024
+ * A category uri can be obtained from a category name using EventRegistry.getCategoryUri().
1025
+ */
1026
+ categoryUri?: string | string[] | QueryItems;
1027
+ /**
1028
+ * find articles that were written by a news source sourceUri.
1029
+ * If multiple sources should be considered use QueryItems.OR() to provide the list of sources.
1030
+ * Source uri for a given news source name can be obtained using EventRegistry.getNewsSourceUri().
1031
+ */
1032
+ sourceUri?: string | string[] | QueryItems;
1033
+ /**
1034
+ * Find articles that were written by news sources located in the given geographic location.
1035
+ * If multiple source locations are provided, then put them into a list inside QueryItems.OR()
1036
+ * Location uri can either be a city or a country. Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1037
+ */
1038
+ sourceLocationUri?: string | string[] | QueryItems;
1039
+ /**
1040
+ * Find articles that were written by news sources that are assigned to the specified source group.
1041
+ * If multiple source groups are provided, then put them into a list inside QueryItems.OR()
1042
+ * Source group uri for a given name can be obtained using EventRegistry.getSourceGroupUri().
1043
+ */
1044
+ sourceGroupUri?: string | string[] | QueryItems;
1045
+ /**
1046
+ * Find articles that were written by a specific author.
1047
+ * If multiple authors should be considered use QueryItems.OR() to provide the list of authors.
1048
+ * Author uri for a given author name can be obtained using EventRegistry.getAuthorUri().
1049
+ */
1050
+ authorUri?: string | string[] | QueryItems;
1051
+ /**
1052
+ * Find articles that describe something that occurred at a particular location.
1053
+ * If value can be a string or a list of strings provided in QueryItems.OR().
1054
+ * Location uri can either be a city or a country. Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1055
+ */
1056
+ locationUri?: string | string[] | QueryItems;
1057
+ /**
1058
+ * find articles that are written in the specified language.
1059
+ * If more than one language is specified, resulting articles has to be written in *any* of the languages.
1060
+ */
1061
+ lang?: string | string[];
1062
+ /**
1063
+ * Find articles that were written on or after dateStart. Date should be provided in YYYY-MM-DD format.
1064
+ */
1065
+ dateStart?: string | Date;
1066
+ /**
1067
+ * Find articles that occurred before or on dateEnd. Date should be provided in YYYY-MM-DD format.
1068
+ */
1069
+ dateEnd?: string | Date;
1070
+ /**
1071
+ * Find articles that explicitly mention a date that is equal or greater than dateMentionStart.
1072
+ */
1073
+ dateMentionStart?: string | Date;
1074
+ /**
1075
+ * Find articles that explicitly mention a date that is lower or equal to dateMentionEnd.
1076
+ */
1077
+ dateMentionEnd?: string | Date;
1078
+ /**
1079
+ * Ignore articles that mention all provided keywords.
1080
+ */
1081
+ ignoreKeywords?: string | string[] | QueryItems;
1082
+ /**
1083
+ * Ignore articles that mention all provided concepts.
1084
+ */
1085
+ ignoreConceptUri?: string | string[] | QueryItems;
1086
+ /**
1087
+ * Ignore articles that are assigned to a particular category.
1088
+ */
1089
+ ignoreCategoryUri?: string | string[] | QueryItems;
1090
+ /**
1091
+ * Ignore articles that have been written by *any* of the specified news sources.
1092
+ */
1093
+ ignoreSourceUri?: string | string[] | QueryItems;
1094
+ /**
1095
+ * Ignore articles that have been written by sources located at *any* of the specified locations.
1096
+ */
1097
+ ignoreSourceLocationUri?: string | string[] | QueryItems;
1098
+ /**
1099
+ * Ignore articles that have been written by sources in *any* of the specified source groups.
1100
+ */
1101
+ ignoreSourceGroupUri?: string | string[] | QueryItems;
1102
+ /**
1103
+ * Ignore articles that were written by *any* of the specified authors.
1104
+ */
1105
+ ignoreAuthorUri?: string | string[] | QueryItems;
1106
+ /**
1107
+ * Ignore articles that occurred in any of the provided locations. A location can be a city or a place.
1108
+ */
1109
+ ignoreLocationUri?: string | string[] | QueryItems;
1110
+ /**
1111
+ * Ignore articles that are written in *any* of the provided languages.
1112
+ */
1113
+ ignoreLang?: string | string[] | QueryItems;
1114
+ /**
1115
+ * Where should we look when searching using the keywords provided by "keywords" parameter. "body" (default), "title", or "body,title".
1116
+ */
1117
+ keywordsLoc?: "body" | "title" | "body,title";
1118
+ keywordSearchMode?: "simple" | "exact" | "phrase";
1119
+ /**
1120
+ * Where should we look when data should be used when searching using the keywords provided by "ignoreKeywords" parameter. "body" (default), "title", or "body,title".
1121
+ */
1122
+ ignoreKeywordsLoc?: "body" | "title" | "body,title";
1123
+ ignoreKeywordSearchMode?: "simple" | "exact" | "phrase";
1124
+ /**
1125
+ * Some articles can be duplicates of other articles. What should be done with them. Possible values are:
1126
+ * "skipDuplicates" (skip the resulting articles that are duplicates of other articles)
1127
+ * "keepOnlyDuplicates" (return only the duplicate articles)
1128
+ * "keepAll" (no filtering, default)
1129
+ */
1130
+ isDuplicateFilter?: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
1131
+ /**
1132
+ * Some articles are later copied by others. What should be done with such articles. Possible values are:
1133
+ * "skipHasDuplicates" (skip the resulting articles that have been later copied by others)
1134
+ * "keepOnlyHasDuplicates" (return only the articles that have been later copied by others)
1135
+ * "keepAll" (no filtering, default)
1136
+ */
1137
+ hasDuplicateFilter?: "skipHasDuplicates" | "keepOnlyHasDuplicates" | "keepAll";
1138
+ /**
1139
+ * Some articles describe a known event and some don't. This filter allows you to filter the resulting articles based on this criteria.
1140
+ * Possible values are:
1141
+ * "skipArticlesWithoutEvent" (skip articles that are not describing any known event in ER)
1142
+ * "keepOnlyArticlesWithoutEvent" (return only the articles that are not describing any known event in ER)
1143
+ * "keepAll" (no filtering, default)
1144
+ */
1145
+ eventFilter?: "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent" | "keepAll";
1146
+ authorsFilter?: string;
1147
+ videosFilter?: string;
1148
+ linksFilter?: string;
1149
+ /**
1150
+ * Starting percentile of the sources to consider in the results (default: 0). Value should be in range 0-90 and divisible by 10.
1151
+ */
1152
+ startSourceRankPercentile?: number;
1153
+ /**
1154
+ * Ending percentile of the sources to consider in the results (default: 100). Value should be in range 10-100 and divisible by 10.
1155
+ */
1156
+ endSourceRankPercentile?: number;
1157
+ /**
1158
+ * minimum value of the sentiment, that the returned articles should have. Range [-1, 1]. Note: setting the value will remove all articles that don't have a computed value for the sentiment (all non-English articles)
1159
+ */
1160
+ minSentiment?: number;
1161
+ /**
1162
+ * maximum value of the sentiment, that the returned articles should have. Range [-1, 1]. Note: setting the value will remove all articles that don't have a computed value for the sentiment (all non-English articles)
1163
+ */
1164
+ maxSentiment?: number;
1165
+ /**
1166
+ * what data types should we search? "news" (news content, default), "pr" (press releases), or "blogs".
1167
+ * If you want to use multiple data types, put them in an array (e.g. ["news", "pr"])
1168
+ */
1169
+ dataType?: ER.DataType[] | ER.DataType;
1170
+ /**
1171
+ * The information to return as the result of the query. By default return the list of matching articles.
1172
+ */
1173
+ requestedResult?: RequestArticles;
1174
+ }
1175
+ }
1176
+ export namespace QueryEvent {
1177
+ /**
1178
+ * Sorting options:
1179
+ * - undefined (no specific sorting),
1180
+ * - id (internal id), date (published date),
1181
+ * - cosSim (closeness to event centroid),
1182
+ * - sourceImportance (manually curated score of source importance - high value,
1183
+ * - high importance), sourceImportanceRank (reverse of sourceImportance),
1184
+ * - sourceAlexaGlobalRank (global rank of the news source),
1185
+ * - sourceAlexaCountryRank (country rank of the news source),
1186
+ * - socialScore (total shares on social media),
1187
+ * - facebookShares (shares on Facebook only)
1188
+ */
1189
+ type SortByOptions = "id" | "date" | "cosSim" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
1190
+ interface RequestEvent {
1191
+ }
1192
+ interface IteratorArguments {
1193
+ /**
1194
+ * Array or a single language in which to return the list of matching articles
1195
+ */
1196
+ lang?: string | string[];
1197
+ /**
1198
+ * Order in which event articles are sorted.
1199
+ */
1200
+ sortBy?: SortByOptions;
1201
+ /**
1202
+ * Should the results be sorted in ascending order (True) or descending (False)
1203
+ */
1204
+ sortByAsc?: boolean;
1205
+ /**
1206
+ * What details should be included in the returned information
1207
+ */
1208
+ returnInfo?: ReturnInfo;
1209
+ /**
1210
+ * Number of articles to download at once (we are not downloading article by article) (at most 100)
1211
+ */
1212
+ articleBatchSize?: number;
1213
+ /**
1214
+ * Maximum number of items to be returned. Used to stop iteration sooner than results run out
1215
+ */
1216
+ maxItems?: number;
1217
+ keywords?: string | string[] | QueryItems;
1218
+ conceptUri?: string | string[] | QueryItems;
1219
+ categoryUri?: string | string[] | QueryItems;
1220
+ sourceUri?: string | string[] | QueryItems;
1221
+ sourceLocationUri?: string | string[] | QueryItems;
1222
+ sourceGroupUri?: string | string[] | QueryItems;
1223
+ authorUri?: string | string[] | QueryItems;
1224
+ locationUri?: string | string[] | QueryItems;
1225
+ dateStart?: string | Date;
1226
+ dateEnd?: string | Date;
1227
+ dateMentionStart?: string | Date;
1228
+ dateMentionEnd?: string | Date;
1229
+ keywordsLoc?: "body" | "title" | "body,title";
1230
+ keywordSearchMode?: "simple" | "exact" | "phrase";
1231
+ startSourceRankPercentile?: number;
1232
+ endSourceRankPercentile?: number;
1233
+ /**
1234
+ * minimum value of the sentiment, that the returned articles should have. Range [-1, 1]. Note: setting the value will remove all articles that don't have a computed value for the sentiment (all articles that are not reported in English language)
1235
+ */
1236
+ minSentiment?: number;
1237
+ /**
1238
+ * maximum value of the sentiment, that the returned articles should have. Range [-1, 1]. Note: setting the value will remove all articles that don't have a computed value for the sentiment (all articles that are not reported in English language)
1239
+ */
1240
+ maxSentiment?: number;
1241
+ }
1242
+ interface RequestEventArticlesArguments {
1243
+ /**
1244
+ * page of the articles to return (1, 2, ...)
1245
+ */
1246
+ page?: number;
1247
+ /**
1248
+ * number of articles to return per page (at most 200)
1249
+ */
1250
+ count?: number;
1251
+ /**
1252
+ * a single language or an array of languages in which to return the articles
1253
+ */
1254
+ lang?: string | string[];
1255
+ /**
1256
+ * order in which event articles are sorted.
1257
+ */
1258
+ sortBy?: SortByOptions;
1259
+ /**
1260
+ * should the articles be sorted in ascending order (True) or descending (False) based on sortBy value
1261
+ */
1262
+ sortByAsc?: boolean;
1263
+ /**
1264
+ * what details should be included in the returned information
1265
+ */
1266
+ returnInfo?: ReturnInfo;
1267
+ keywords?: string | string[] | QueryItems;
1268
+ conceptUri?: string | string[] | QueryItems;
1269
+ categoryUri?: string | string[] | QueryItems;
1270
+ sourceUri?: string | string[] | QueryItems;
1271
+ sourceLocationUri?: string | string[] | QueryItems;
1272
+ sourceGroupUri?: string | string[] | QueryItems;
1273
+ authorUri?: string | string[] | QueryItems;
1274
+ locationUri?: string | string[] | QueryItems;
1275
+ dateStart?: string | Date;
1276
+ dateEnd?: string | Date;
1277
+ dateMentionStart?: string | Date;
1278
+ dateMentionEnd?: string | Date;
1279
+ keywordsLoc?: "body" | "title" | "body,title";
1280
+ startSourceRankPercentile?: number;
1281
+ endSourceRankPercentile?: number;
1282
+ }
1283
+ interface RequestEventArticleUriWgtsArguments {
1284
+ /**
1285
+ * a single language or an array of languages in which to return the articles
1286
+ */
1287
+ lang?: string | string[];
1288
+ /**
1289
+ * order in which event articles are sorted.
1290
+ */
1291
+ sortBy?: SortByOptions;
1292
+ /**
1293
+ * should the articles be sorted in ascending order (True) or descending (False) based on sortBy value
1294
+ */
1295
+ sortByAsc?: boolean;
1296
+ }
1297
+ interface RequestEventArticleTrendArguments {
1298
+ /**
1299
+ * languages for which to compute the trends
1300
+ */
1301
+ lang?: string | string[];
1302
+ /**
1303
+ * page of the articles for which to return information (1, 2, ...)
1304
+ */
1305
+ page?: number;
1306
+ /**
1307
+ * number of articles returned per page (at most 200)
1308
+ */
1309
+ count?: number;
1310
+ /**
1311
+ * ignore articles that have cos similarity to centroid lower than the specified value (-1 for no limit)
1312
+ */
1313
+ minArticleCosSim?: number;
1314
+ /**
1315
+ * what details should be included in the returned information
1316
+ */
1317
+ returnInfo?: ReturnInfo;
1318
+ }
1319
+ interface RequestEventSimilarEventsArguments {
1320
+ /**
1321
+ * array of concepts and their importance, e.g. [{ "uri": "http://en.wikipedia.org/wiki/Barack_Obama", "wgt": 100 }, ...]
1322
+ */
1323
+ conceptInfoList?: Array<{
1324
+ uri: string;
1325
+ wgt: number;
1326
+ }>;
1327
+ /**
1328
+ * number of similar events to return (at most 50)
1329
+ */
1330
+ count?: number;
1331
+ dateStart?: string;
1332
+ dateEnd?: string;
1333
+ /**
1334
+ * for the returned events compute how they were trending (intensity of reporting) in different time periods
1335
+ */
1336
+ addArticleTrendInfo?: boolean;
1337
+ /**
1338
+ * time span that is used as a unit when computing the trending info
1339
+ */
1340
+ aggrHours?: number;
1341
+ /**
1342
+ * include also the tested event in the results (True or False)
1343
+ */
1344
+ includeSelf?: boolean;
1345
+ /**
1346
+ * what details should be included in the returned information
1347
+ */
1348
+ returnInfo?: ReturnInfo;
1349
+ }
1350
+ interface RequestEventSimilarStoriesArguments {
1351
+ /**
1352
+ * array of concepts and their importance, e.g. [{ "uri": "http://en.wikipedia.org/wiki/Barack_Obama", "wgt": 100 }, ...]
1353
+ */
1354
+ conceptInfoList?: Array<{
1355
+ uri: string;
1356
+ wgt: number;
1357
+ }>;
1358
+ /**
1359
+ * number of similar stories to return (at most 5')
1360
+ */
1361
+ count?: number;
1362
+ /**
1363
+ * in what language(s) should be the returned stories
1364
+ */
1365
+ lang?: string | string[];
1366
+ /**
1367
+ * maximum difference in days between the returned stories and the tested event
1368
+ */
1369
+ maxDayDiff?: number;
1370
+ /**
1371
+ * what details should be included in the returned information
1372
+ */
1373
+ returnInfo?: ReturnInfo;
1374
+ }
1375
+ }
1376
+ export namespace QueryMentions {
1377
+ interface Arguments {
1378
+ eventTypeUri?: string | string[] | QueryItems;
1379
+ keywords?: string | string[] | QueryItems;
1380
+ conceptUri?: string | string[] | QueryItems;
1381
+ categoryUri?: string | string[] | QueryItems;
1382
+ sourceUri?: string | string[] | QueryItems;
1383
+ sourceLocationUri?: string | string[] | QueryItems;
1384
+ sourceGroupUri?: string | string[] | QueryItems;
1385
+ industryUri?: string | string[] | QueryItems;
1386
+ sdgUri?: string | string[] | QueryItems;
1387
+ sasbUri?: string | string[] | QueryItems;
1388
+ esgUri?: string | string[] | QueryItems;
1389
+ locationUri?: string | string[] | QueryItems;
1390
+ lang?: string | string[];
1391
+ dateStart?: string | Date;
1392
+ dateEnd?: string | Date;
1393
+ ignoreEventTypeUri?: string | string[] | QueryItems;
1394
+ ignoreKeywords?: string | string[] | QueryItems;
1395
+ ignoreConceptUri?: string | string[] | QueryItems;
1396
+ ignoreCategoryUri?: string | string[] | QueryItems;
1397
+ ignoreSourceUri?: string | string[] | QueryItems;
1398
+ ignoreSourceLocationUri?: string | string[] | QueryItems;
1399
+ ignoreSourceGroupUri?: string | string[] | QueryItems;
1400
+ ignoreIndustryUri?: string | string[] | QueryItems;
1401
+ ignoreSdgUri?: string | string[] | QueryItems;
1402
+ ignoreSasbUri?: string | string[] | QueryItems;
1403
+ ignoreEsgUri?: string | string[] | QueryItems;
1404
+ ignoreLocationUri?: string | string[] | QueryItems;
1405
+ ignoreLang?: string | string[];
1406
+ showDuplicates?: boolean;
1407
+ startSourceRankPercentile?: number;
1408
+ endSourceRankPercentile?: number;
1409
+ minSentiment?: number;
1410
+ maxSentiment?: number;
1411
+ minSentenceIndex?: number;
1412
+ maxSentenceIndex?: number;
1413
+ requestedResult?: RequestMentions;
1414
+ }
1415
+ interface IteratorArguments extends Arguments {
1416
+ [key: string]: any;
1417
+ }
1418
+ interface RequestMentionsUriWgtListArguments {
1419
+ /**
1420
+ * page of the results to return (1, 2, ...)
1421
+ */
1422
+ page?: number;
1423
+ /**
1424
+ * number of results to return per page
1425
+ */
1426
+ count?: number;
1427
+ /**
1428
+ * how should the resulting events be sorted. Options:
1429
+ * - none (no specific sorting),
1430
+ * - date (by event date),
1431
+ * - rel (relevance to the query),
1432
+ * - size (number of articles),
1433
+ * - socialScore (amount of shares in social media)
1434
+ */
1435
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1436
+ /**
1437
+ * should the results be sorted in ascending order (true) or descending (false)
1438
+ */
1439
+ sortByAsc?: boolean;
1440
+ }
1441
+ interface RequestMentionsConceptAggrArguments {
1442
+ /**
1443
+ * number of top concepts to return
1444
+ */
1445
+ conceptCount?: number;
1446
+ /**
1447
+ * on what sample of results should the aggregate be computed
1448
+ */
1449
+ mentionsSampleSize?: number;
1450
+ /**
1451
+ * what details about the concepts should be included in the returned information
1452
+ */
1453
+ returnInfo?: ReturnInfo;
1454
+ /**
1455
+ * how should the top concepts be computed. Possible values are
1456
+ * "importance" (takes into account how frequently a concept is mentioned and how relevant it is in an mention),
1457
+ * "frequency" (ranks the concepts simply by how frequently the concept is mentioned in the results) and
1458
+ * "uniqueness" (computes what are the top concepts that are frequently mentioned in the results of your search query but less frequently mentioned in the news in general)
1459
+ */
1460
+ conceptScoring?: "importance" | "frequency" | "uniqueness";
1461
+ /**
1462
+ * if you wish to limit the number of top concepts per type (person, org, loc, wiki) then set this to some number.
1463
+ * If you want to get equal number of concepts for each type then set conceptCountPerType to conceptCount/4 (since there are 4 concept types)
1464
+ */
1465
+ conceptCountPerType?: number;
1466
+ }
1467
+ interface RequestMentionsCategoryAggrArguments {
1468
+ mentionsSampleSize?: number;
1469
+ returnInfo?: ReturnInfo;
1470
+ }
1471
+ interface RequestMentionsSourceAggrArguments {
1472
+ sourceCount?: number;
1473
+ normalizeBySourceArts?: boolean;
1474
+ returnInfo?: ReturnInfo;
1475
+ }
1476
+ interface RequestMentionsKeywordAggrArguments {
1477
+ mentionsSampleSize?: number;
1478
+ }
1479
+ interface RequestMentionsConceptGraphArguments {
1480
+ /**
1481
+ * number of top sources to return
1482
+ */
1483
+ conceptCount?: number;
1484
+ linkCount?: number;
1485
+ /**
1486
+ * on what sample of results should the aggregate be computed
1487
+ */
1488
+ mentionsSampleSize?: number;
1489
+ /**
1490
+ * what details about the concepts should be included in the returned information
1491
+ */
1492
+ returnInfo?: ReturnInfo;
1493
+ skipQueryConcepts?: boolean;
1494
+ }
1495
+ interface RequestMentionsRecentActivityArguments {
1496
+ /**
1497
+ * max mentions to return
1498
+ */
1499
+ maxMentionCount?: number;
1500
+ updatesAfterUri?: string;
1501
+ /**
1502
+ * the time after which the events were added/updated (returned by previous call to the same method)
1503
+ */
1504
+ updatesAfterTm?: string | Date;
1505
+ /**
1506
+ * how many minutes into the past should we check (set either this or updatesAfterTm property, but not both)
1507
+ */
1508
+ updatesAfterMinsAgo?: number;
1509
+ updatesUntilTm?: string | Date;
1510
+ updatesUntilMinsAgo?: number;
1511
+ /**
1512
+ * return only events that have a geographic location assigned to them
1513
+ */
1514
+ mandatorySourceLocation?: boolean;
1515
+ /**
1516
+ * what details should be included in the returned information
1517
+ */
1518
+ returnInfo?: ReturnInfo;
1519
+ }
1520
+ }
1521
+ export namespace QueryEvents {
1522
+ interface Arguments {
1523
+ /**
1524
+ * find events where articles mention all the specified keywords.
1525
+ * A single keyword/phrase can be provided as a string,
1526
+ * multiple keywords/phrases can be provided as a list of strings.
1527
+ * Use QueryItems.AND() if *all* provided keywords/phrases should be mentioned,
1528
+ * or QueryItems.OR() if *any* of the keywords/phrases should be mentioned.
1529
+ */
1530
+ keywords?: string | string[] | QueryItems;
1531
+ /**
1532
+ * find events where the concept with concept uri is important.
1533
+ * A single concept uri can be provided as a string, multiple concept uris
1534
+ * can be provided as a list of strings.
1535
+ * Use QueryItems.AND() if *all* provided concepts should be mentioned, or QueryItems.OR()
1536
+ * if *any* of the concepts should be mentioned.
1537
+ * To obtain a concept uri using a concept label use EventRegistry.getConceptUri().
1538
+ */
1539
+ conceptUri?: string | string[] | QueryItems;
1540
+ /**
1541
+ * find events that are assigned into a particular category.
1542
+ * A single category uri can be provided as a string, multiple category uris
1543
+ * can be provided as a list of strings.
1544
+ * Use QueryItems.AND() if *all* provided categories should be mentioned, or QueryItems.OR()
1545
+ * if *any* of the categories should be mentioned.
1546
+ * A category uri can be obtained from a category name using EventRegistry.getCategoryUri().
1547
+ */
1548
+ categoryUri?: string | string[] | QueryItems;
1549
+ /**
1550
+ * find events that contain one or more articles that have been written by a news source sourceUri.
1551
+ * If multiple sources should be considered use QueryItems.OR() to provide the list of sources.
1552
+ * Source uri for a given news source name can be obtained using EventRegistry.getNewsSourceUri().
1553
+ */
1554
+ sourceUri?: string | string[] | QueryItems;
1555
+ /**
1556
+ * find events that contain one or more articles that were written
1557
+ * by news sources located in the given geographic location.
1558
+ * If multiple source locations are provided, then put them into a list inside QueryItems.OR()
1559
+ * Location uri can either be a city or a country.
1560
+ * Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1561
+ */
1562
+ sourceLocationUri?: string | string[] | QueryItems;
1563
+ /**
1564
+ * find events that contain one or more articles that were written
1565
+ * by news sources that are assigned to the specified source group.
1566
+ * If multiple source groups are provided, then put them into a list inside QueryItems.OR()
1567
+ * Source group uri for a given name can be obtained using EventRegistry.getSourceGroupUri().
1568
+ */
1569
+ sourceGroupUri?: string | string[] | QueryItems;
1570
+ /**
1571
+ * find events that contain one or more articles that have been written by a specific author.
1572
+ * If multiple authors should be considered use QueryItems.OR() or QueryItems.AND() to provide the list of authors.
1573
+ * Author uri for a given author name can be obtained using EventRegistry.getAuthorUri().
1574
+ */
1575
+ authorUri?: string | string[] | QueryItems;
1576
+ /**
1577
+ * find events that occurred at a particular location.
1578
+ * If value can be a string or a list of strings provided in QueryItems.OR().
1579
+ * Location uri can either be a city or a country.
1580
+ * Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1581
+ */
1582
+ locationUri?: string | string[] | QueryItems;
1583
+ /**
1584
+ * find events for which we found articles in the specified language.
1585
+ * If more than one language is specified, resulting events has to be reported in *any* of the languages.
1586
+ */
1587
+ lang?: string | string[];
1588
+ /**
1589
+ * find events that occurred on or after dateStart. Date should be provided in YYYY-MM-DD format.
1590
+ */
1591
+ dateStart?: string | Date;
1592
+ /**
1593
+ * find events that occurred before or on dateEnd. Date should be provided in YYYY-MM-DD format.
1594
+ */
1595
+ dateEnd?: string | Date;
1596
+ /**
1597
+ * find events where the average date of the articles about this event is on or after this date. Date should be provided in YYYY-MM-DD format, datetime.time or datetime.datetime.
1598
+ */
1599
+ reportingDateStart?: string | Date;
1600
+ /**
1601
+ * find events where the average date of the articles about this event is on or before this date. Date should be provided in YYYY-MM-DD format, datetime.time or datetime.datetime.
1602
+ */
1603
+ reportingDateEnd?: string | Date;
1604
+ /**
1605
+ * minimum value of the sentiment, that the returned events should have. Range [-1, 1]. Note: setting the value will remove all events that don't have a computed value for the sentiment (all events that are not reported in English language)
1606
+ */
1607
+ minSentiment?: number;
1608
+ /**
1609
+ * maximum value of the sentiment, that the returned events should have. Range [-1, 1]. Note: setting the value will remove all events that don't have a computed value for the sentiment (all events that are not reported in English language)
1610
+ */
1611
+ maxSentiment?: number;
1612
+ /**
1613
+ * find events that have been reported in at least minArticlesInEvent articles (regardless of language)
1614
+ */
1615
+ minArticlesInEvent?: number;
1616
+ /**
1617
+ * find events that have not been reported in more than maxArticlesInEvent articles (regardless of language)
1618
+ */
1619
+ maxArticlesInEvent?: number;
1620
+ /**
1621
+ * find events where articles explicitly mention a date that is equal or greater than dateMentionStart.
1622
+ */
1623
+ dateMentionStart?: string | Date;
1624
+ /**
1625
+ * find events where articles explicitly mention a date that is lower or equal to dateMentionEnd.
1626
+ */
1627
+ dateMentionEnd?: string | Date;
1628
+ /**
1629
+ * ignore events where articles about the event mention any of the provided keywords
1630
+ */
1631
+ ignoreKeywords?: string | string[] | QueryItems;
1632
+ /**
1633
+ * ignore events that are about any of the provided concepts
1634
+ */
1635
+ ignoreConceptUri?: string | string[] | QueryItems;
1636
+ /**
1637
+ * ignore events that are about any of the provided categories
1638
+ */
1639
+ ignoreCategoryUri?: string | string[] | QueryItems;
1640
+ /**
1641
+ * ignore events that have have articles which have been written by any of the specified news sources
1642
+ */
1643
+ ignoreSourceUri?: string | string[] | QueryItems;
1644
+ /**
1645
+ * ignore events that have articles which been written by sources located at *any* of the specified locations
1646
+ */
1647
+ ignoreSourceLocationUri?: string | string[] | QueryItems;
1648
+ /**
1649
+ * ignore events that have articles which have been written by sources in *any* of the specified source groups
1650
+ */
1651
+ ignoreSourceGroupUri?: string | string[] | QueryItems;
1652
+ /**
1653
+ * ignore articles that were written by *any* of the specified authors
1654
+ */
1655
+ ignoreAuthorUri?: string | string[] | QueryItems;
1656
+ /**
1657
+ * ignore events that occurred in any of the provided locations. A location can be a city or a place
1658
+ */
1659
+ ignoreLocationUri?: string | string[] | QueryItems;
1660
+ /**
1661
+ * ignore events that are reported in any of the provided languages
1662
+ */
1663
+ ignoreLang?: string | string[];
1664
+ /**
1665
+ * what data should be used when searching using the keywords provided by "keywords" parameter.
1666
+ */
1667
+ keywordsLoc?: "body" | "title" | "body,title";
1668
+ /**
1669
+ * what data should be used when searching using the keywords provided by "ignoreKeywords" parameter.
1670
+ */
1671
+ ignoreKeywordsLoc?: "body" | "title" | "body,title";
1672
+ keywordSearchMode?: "simple" | "exact" | "phrase";
1673
+ ignoreKeywordSearchMode?: "simple" | "exact" | "phrase";
1674
+ /**
1675
+ * when a category is specified using categoryUri, should also all subcategories be included?
1676
+ */
1677
+ categoryIncludeSub?: boolean;
1678
+ /**
1679
+ * when a category is specified using ignoreCategoryUri, should also all subcategories be included?
1680
+ */
1681
+ ignoreCategoryIncludeSub?: boolean;
1682
+ /**
1683
+ * the information to return as the result of the query. By default return the list of matching events
1684
+ */
1685
+ requestedResult?: RequestEvents;
1686
+ }
1687
+ interface IteratorArguments extends Arguments {
1688
+ /**
1689
+ * how should the resulting events be sorted. Options:
1690
+ * - none (no specific sorting),
1691
+ * - date (by event date),
1692
+ * - rel (relevance to the query),
1693
+ * - size (number of articles),
1694
+ * - socialScore (amount of shares in social media)
1695
+ */
1696
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1697
+ /**
1698
+ * should the results be sorted in ascending order (true) or descending (false)
1699
+ */
1700
+ sortByAsc?: boolean;
1701
+ /**
1702
+ * number of events to download at once (we are not downloading event by event)
1703
+ */
1704
+ eventBatchSize?: number;
1705
+ /**
1706
+ * maximum number of items to be returned. Used to stop iteration sooner than results run out
1707
+ */
1708
+ maxItems?: number;
1709
+ returnInfo?: ReturnInfo;
1710
+ }
1711
+ interface RequestEventsInfoArguments {
1712
+ /**
1713
+ * page of the results to return (1, 2, ...)
1714
+ */
1715
+ page?: number;
1716
+ /**
1717
+ * number of results to return per page
1718
+ */
1719
+ count?: number;
1720
+ /**
1721
+ * how should the resulting events be sorted. Options:
1722
+ * - none (no specific sorting),
1723
+ * - date (by event date),
1724
+ * - rel (relevance to the query),
1725
+ * - size (number of articles),
1726
+ * - socialScore (amount of shares in social media)
1727
+ */
1728
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1729
+ /**
1730
+ * should the results be sorted in ascending order (true) or descending (false)
1731
+ */
1732
+ sortByAsc?: boolean;
1733
+ /**
1734
+ * what details should be included in the returned information
1735
+ */
1736
+ returnInfo?: ReturnInfo;
1737
+ }
1738
+ interface RequestEventsUriListArguments {
1739
+ /**
1740
+ * page of the results to return (1, 2, ...)
1741
+ */
1742
+ page?: number;
1743
+ /**
1744
+ * number of results to return per page
1745
+ */
1746
+ count?: number;
1747
+ /**
1748
+ * how should the resulting events be sorted. Options:
1749
+ * - none (no specific sorting),
1750
+ * - date (by event date),
1751
+ * - rel (relevance to the query),
1752
+ * - size (number of articles),
1753
+ * - socialScore (amount of shares in social media)
1754
+ */
1755
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1756
+ /**
1757
+ * should the results be sorted in ascending order (true) or descending (false)
1758
+ */
1759
+ sortByAsc?: boolean;
1760
+ }
1761
+ interface RequestEventsUriWgtListArguments {
1762
+ /**
1763
+ * page of the results to return (1, 2, ...)
1764
+ */
1765
+ page?: number;
1766
+ /**
1767
+ * number of results to return per page
1768
+ */
1769
+ count?: number;
1770
+ /**
1771
+ * how should the resulting events be sorted. Options:
1772
+ * - none (no specific sorting),
1773
+ * - date (by event date),
1774
+ * - rel (relevance to the query),
1775
+ * - size (number of articles),
1776
+ * - socialScore (amount of shares in social media)
1777
+ */
1778
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1779
+ /**
1780
+ * should the results be sorted in ascending order (true) or descending (false)
1781
+ */
1782
+ sortByAsc?: boolean;
1783
+ }
1784
+ interface RequestEventsLocAggrArguments {
1785
+ /**
1786
+ * sample of events to use to compute the location aggregate
1787
+ */
1788
+ eventsSampleSize?: number;
1789
+ /**
1790
+ * what details (about locations) should be included in the returned information
1791
+ */
1792
+ returnInfo?: ReturnInfo;
1793
+ }
1794
+ interface RequestEventsLocTimeAggrArguments {
1795
+ /**
1796
+ * sample of events to use to compute the location aggregate
1797
+ */
1798
+ eventsSampleSize?: number;
1799
+ /**
1800
+ * what details (about locations) should be included in the returned information
1801
+ */
1802
+ returnInfo?: ReturnInfo;
1803
+ }
1804
+ interface RequestEventsConceptAggrArguments {
1805
+ /**
1806
+ * number of top concepts to return
1807
+ */
1808
+ conceptCount?: number;
1809
+ /**
1810
+ * on what sample of results should the aggregate be computed
1811
+ */
1812
+ eventsSampleSize?: number;
1813
+ /**
1814
+ * what details about the concepts should be included in the returned information
1815
+ */
1816
+ returnInfo?: ReturnInfo;
1817
+ }
1818
+ interface RequestEventsConceptGraphArguments {
1819
+ /**
1820
+ * number of top concepts to return
1821
+ */
1822
+ conceptCount?: number;
1823
+ /**
1824
+ * number of links between the concepts to return
1825
+ */
1826
+ linkCount?: number;
1827
+ /**
1828
+ * on what sample of results should the aggregate be computed
1829
+ */
1830
+ eventsSampleSize?: number;
1831
+ /**
1832
+ * what details about the concepts should be included in the returned information
1833
+ */
1834
+ returnInfo?: ReturnInfo;
1835
+ }
1836
+ interface RequestEventsConceptMatrixArguments {
1837
+ /**
1838
+ * number of top concepts to return
1839
+ */
1840
+ conceptCount?: number;
1841
+ /**
1842
+ * how should the interestingness between the selected pairs of concepts be computed. Options: pmi (pointwise mutual information), pairTfIdf (pair frequence * IDF of individual concepts), chiSquare
1843
+ */
1844
+ measure?: "pmi" | "pairTfIdf" | "chiSquare";
1845
+ /**
1846
+ * on what sample of results should the aggregate be computed
1847
+ */
1848
+ eventsSampleSize?: number;
1849
+ /**
1850
+ * what details about the concepts should be included in the returned information
1851
+ */
1852
+ returnInfo?: ReturnInfo;
1853
+ }
1854
+ interface RequestEventsConceptTrendsArguments {
1855
+ /**
1856
+ * number of top concepts to return
1857
+ */
1858
+ conceptCount?: number;
1859
+ /**
1860
+ * what details about the concepts should be included in the returned information
1861
+ */
1862
+ returnInfo?: ReturnInfo;
1863
+ /**
1864
+ * list of concept URIs for which to return trending information. If empty, then top concepts will be automatically computed.
1865
+ */
1866
+ conceptUris?: string[];
1867
+ }
1868
+ interface RequestEventsSourceAggrArguments {
1869
+ /**
1870
+ * number of top sources to return
1871
+ */
1872
+ sourceCount?: number;
1873
+ /**
1874
+ * on what sample of results should the aggregate be computed
1875
+ */
1876
+ eventsSampleSize?: number;
1877
+ /**
1878
+ * what details about the concepts should be included in the returned information
1879
+ */
1880
+ returnInfo?: ReturnInfo;
1881
+ }
1882
+ interface RequestEventsDateMentionAggrArguments {
1883
+ /**
1884
+ * ignore events that don't have a date that is more than this number of days apart from the tested event
1885
+ */
1886
+ minDaysApart?: number;
1887
+ /**
1888
+ * report only dates that are mentioned at least this number of times
1889
+ */
1890
+ minDateMentionCount?: number;
1891
+ /**
1892
+ * on what sample of results should the aggregate be computed
1893
+ */
1894
+ eventsSampleSize?: number;
1895
+ /**
1896
+ * what details about the concepts should be included in the returned information
1897
+ */
1898
+ returnInfo?: ReturnInfo;
1899
+ }
1900
+ interface RequestEventsEventClustersArguments {
1901
+ /**
1902
+ * number of keywords to report in each of the clusters
1903
+ */
1904
+ keywordCount?: number;
1905
+ /**
1906
+ * try to cluster at most this number of events
1907
+ */
1908
+ maxEventsToCluster?: number;
1909
+ /**
1910
+ * what details about the concepts should be included in the returned information
1911
+ */
1912
+ returnInfo?: ReturnInfo;
1913
+ }
1914
+ interface RequestEventsRecentActivityArguments {
1915
+ /**
1916
+ * max events to return
1917
+ */
1918
+ maxEventCount?: number;
1919
+ /**
1920
+ * the time after which the events were added/updated (returned by previous call to the same method)
1921
+ */
1922
+ updatesAfterTm?: string | Date;
1923
+ /**
1924
+ * how many minutes into the past should we check (set either this or updatesAfterTm property, but not both)
1925
+ */
1926
+ updatesAfterMinsAgo?: number;
1927
+ /**
1928
+ * return only events that have a geographic location assigned to them
1929
+ */
1930
+ mandatoryLocation?: boolean;
1931
+ /**
1932
+ * the minimum avg cos sim of the events to be returned (events with lower quality should not be included)
1933
+ */
1934
+ minAvgCosSim?: number;
1935
+ /**
1936
+ * what details should be included in the returned information
1937
+ */
1938
+ returnInfo?: ReturnInfo;
1939
+ }
1940
+ }
1941
+ export namespace ReturnInfo {
1942
+ /**
1943
+ * What information about an article should be returned by the API call
1944
+ */
1945
+ interface ArticleInfo {
1946
+ /**
1947
+ * max length of the article body (use -1 for full body, 0 for empty)
1948
+ */
1949
+ bodyLen?: number;
1950
+ /**
1951
+ * core article information -
1952
+ */
1953
+ basicInfo?: boolean;
1954
+ /**
1955
+ * article title
1956
+ */
1957
+ title?: boolean;
1958
+ /**
1959
+ * article body
1960
+ */
1961
+ body?: boolean;
1962
+ /**
1963
+ * article url
1964
+ */
1965
+ url?: boolean;
1966
+ /**
1967
+ * uri of the event to which the article belongs
1968
+ */
1969
+ eventUri?: boolean;
1970
+ /**
1971
+ * the list of authors of the news article
1972
+ */
1973
+ authors?: boolean;
1974
+ /**
1975
+ * the list of concepts mentioned in the article
1976
+ */
1977
+ concepts?: boolean;
1978
+ /**
1979
+ * the list of categories assigned to the article
1980
+ */
1981
+ categories?: boolean;
1982
+ /**
1983
+ * the list of urls of links identified in the article body
1984
+ */
1985
+ links?: boolean;
1986
+ /**
1987
+ * the list of videos assigned to the article
1988
+ */
1989
+ videos?: boolean;
1990
+ /**
1991
+ * url to the image associated with the article
1992
+ */
1993
+ image?: boolean;
1994
+ /**
1995
+ * information about the number of times the article was shared on facebook and linkedin, instagram, ...
1996
+ */
1997
+ socialScore?: boolean;
1998
+ /**
1999
+ * sentiment about the article
2000
+ */
2001
+ sentiment?: boolean;
2002
+ /**
2003
+ * the geographic location that the event mentioned in the article is about
2004
+ */
2005
+ location?: boolean;
2006
+ /**
2007
+ * the dates when the articles was crawled and the date when it was published (based on the rss feed date)
2008
+ */
2009
+ dates?: boolean;
2010
+ /**
2011
+ * the list of dates found mentioned in the article
2012
+ */
2013
+ extractedDates?: boolean;
2014
+ /**
2015
+ * if the article is a duplicate, this will provide information about the original article
2016
+ */
2017
+ originalArticle?: boolean;
2018
+ /**
2019
+ * uri of the story (cluster) to which the article belongs
2020
+ */
2021
+ storyUri?: boolean;
2022
+ [name: string]: boolean | string | number;
2023
+ }
2024
+ /**
2025
+ * What information about an article should be returned by the API call
2026
+ */
2027
+ interface ArticleInfoFlags {
2028
+ /**
2029
+ * max length of the article body (use -1 for full body, 0 for empty)
2030
+ */
2031
+ ArticleBodyLen?: number;
2032
+ /**
2033
+ * core article information -
2034
+ */
2035
+ IncludeArticleBasicInfo?: boolean;
2036
+ /**
2037
+ * article title
2038
+ */
2039
+ IncludeArticleTitle?: boolean;
2040
+ /**
2041
+ * article body
2042
+ */
2043
+ IncludeArticleBody?: boolean;
2044
+ /**
2045
+ * article url
2046
+ */
2047
+ IncludeArticleUrl?: boolean;
2048
+ /**
2049
+ * uri of the event to which the article belongs
2050
+ */
2051
+ IncludeArticleEventUri?: boolean;
2052
+ /**
2053
+ * the list of concepts mentioned in the article
2054
+ */
2055
+ IncludeArticleConcepts?: boolean;
2056
+ /**
2057
+ * the list of categories assigned to the article
2058
+ */
2059
+ IncludeArticleCategories?: boolean;
2060
+ /**
2061
+ * the list of urls of links identified in the article body
2062
+ */
2063
+ IncludeArticleLinks?: boolean;
2064
+ /**
2065
+ * the list of videos assigned to the article
2066
+ */
2067
+ IncludeArticleVideos?: boolean;
2068
+ /**
2069
+ * url to the image associated with the article
2070
+ */
2071
+ IncludeArticleImage?: boolean;
2072
+ /**
2073
+ * information about the number of times the article was shared on facebook and linkedin, instagram, ...
2074
+ */
2075
+ IncludeArticleSocialScore?: boolean;
2076
+ /**
2077
+ * sentiment about the article
2078
+ */
2079
+ IncludeArticleSentiment?: boolean;
2080
+ /**
2081
+ * the geographic location that the event mentioned in the article is about
2082
+ */
2083
+ IncludeArticleLocation?: boolean;
2084
+ /**
2085
+ * the dates when the articles was crawled and the date when it was published (based on the rss feed date)
2086
+ */
2087
+ IncludeArticleDates?: boolean;
2088
+ /**
2089
+ * the list of dates found mentioned in the article
2090
+ */
2091
+ IncludeArticleExtractedDates?: boolean;
2092
+ /**
2093
+ * the list of articles that are a copy of this article
2094
+ */
2095
+ IncludeArticleDuplicateList?: boolean;
2096
+ /**
2097
+ * if the article is a duplicate, this will provide information about the original article
2098
+ */
2099
+ IncludeArticleOriginalArticle?: boolean;
2100
+ /**
2101
+ * uri of the story (cluster) to which the article belongs
2102
+ */
2103
+ IncludeArticleStoryUri?: boolean;
2104
+ }
2105
+ /**
2106
+ * What information about a story (cluster of articles) should be returned by the API call
2107
+ */
2108
+ interface StoryInfoFlags {
2109
+ /**
2110
+ * core stats about the story
2111
+ */
2112
+ IncludeStoryBasicStats?: boolean;
2113
+ /**
2114
+ * geographic location that the story is about
2115
+ */
2116
+ IncludeStoryLocation?: boolean;
2117
+ /**
2118
+ * date of the story
2119
+ */
2120
+ IncludeStoryDate?: boolean;
2121
+ /**
2122
+ * title of the story
2123
+ */
2124
+ IncludeStoryTitle?: boolean;
2125
+ /**
2126
+ * summary of the story
2127
+ */
2128
+ IncludeStorySummary?: boolean;
2129
+ /**
2130
+ * set of concepts associated with the story
2131
+ */
2132
+ IncludeStoryConcepts?: boolean;
2133
+ /**
2134
+ * categories associated with the story
2135
+ */
2136
+ IncludeStoryCategories?: boolean;
2137
+ /**
2138
+ * the article that is closest to the center of the cluster of articles assigned to the story
2139
+ */
2140
+ IncludeStoryMedoidArticle?: boolean;
2141
+ /**
2142
+ * dates that were frequently identified in the articles belonging to the story
2143
+ */
2144
+ IncludeStoryCommonDates?: boolean;
2145
+ /**
2146
+ * score computed based on how frequently the articles in the story were shared on social media
2147
+ */
2148
+ IncludeStorySocialScore?: boolean;
2149
+ /**
2150
+ * number of images to be returned for a story
2151
+ */
2152
+ StoryImageCount?: number;
2153
+ }
2154
+ /**
2155
+ * What information about a story (cluster of articles) should be returned by the API call
2156
+ */
2157
+ interface StoryInfo {
2158
+ /**
2159
+ * core stats about the story
2160
+ */
2161
+ basicStats?: boolean;
2162
+ /**
2163
+ * geographic location that the story is about
2164
+ */
2165
+ location?: boolean;
2166
+ /**
2167
+ * date of the story
2168
+ */
2169
+ date?: boolean;
2170
+ /**
2171
+ * title of the story
2172
+ */
2173
+ title?: boolean;
2174
+ /**
2175
+ * summary of the story
2176
+ */
2177
+ summary?: boolean;
2178
+ /**
2179
+ * set of concepts associated with the story
2180
+ */
2181
+ concepts?: boolean;
2182
+ /**
2183
+ * categories associated with the story
2184
+ */
2185
+ categories?: boolean;
2186
+ /**
2187
+ * the article that is closest to the center of the cluster of articles assigned to the story
2188
+ */
2189
+ medoidArticle?: boolean;
2190
+ /**
2191
+ * the article from which we have extracted the title and summary for the story
2192
+ */
2193
+ infoArticle?: boolean;
2194
+ /**
2195
+ * dates that were frequently identified in the articles belonging to the story
2196
+ */
2197
+ commonDates?: boolean;
2198
+ /**
2199
+ * score computed based on how frequently the articles in the story were shared on social media
2200
+ */
2201
+ socialScore?: boolean;
2202
+ /**
2203
+ * number of images to be returned for a story
2204
+ */
2205
+ imageCount?: number;
2206
+ [name: string]: boolean | string | number;
2207
+ }
2208
+ /**
2209
+ * What information about an event should be returned by the API call
2210
+ */
2211
+ interface EventInfoFlags {
2212
+ /**
2213
+ * return the title of the event
2214
+ */
2215
+ IncludeEventTitle?: boolean;
2216
+ /**
2217
+ * return the summary of the event
2218
+ */
2219
+ IncludeEventSummary?: boolean;
2220
+ /**
2221
+ * return the number of articles that are assigned to the event
2222
+ */
2223
+ IncludeEventArticleCounts?: boolean;
2224
+ /**
2225
+ * return information about the main concepts related to the event
2226
+ */
2227
+ IncludeEventConcepts?: boolean;
2228
+ /**
2229
+ * return information about the categories related to the event
2230
+ */
2231
+ IncludeEventCategories?: boolean;
2232
+ /**
2233
+ * return the location where the event occurred
2234
+ */
2235
+ IncludeEventLocation?: boolean;
2236
+ /**
2237
+ * return information about the date of the event
2238
+ */
2239
+ IncludeEventDate?: boolean;
2240
+ /**
2241
+ * return the dates that were commonly found in the articles about the event
2242
+ */
2243
+ IncludeEventCommonDates?: boolean;
2244
+ /**
2245
+ * return the list of stories (clusters) that are about the event
2246
+ */
2247
+ IncludeEventStories?: boolean;
2248
+ /**
2249
+ * score computed based on how frequently the articles in the event were shared on social media
2250
+ */
2251
+ IncludeEventSocialScore?: boolean;
2252
+ /**
2253
+ * number of images to be returned for an event
2254
+ */
2255
+ EventImageCount?: number;
2256
+ }
2257
+ /**
2258
+ * What information about an event should be returned by the API call
2259
+ */
2260
+ interface EventInfo {
2261
+ /**
2262
+ * return the title of the event
2263
+ */
2264
+ title?: boolean;
2265
+ /**
2266
+ * return the summary of the event
2267
+ */
2268
+ summary?: boolean;
2269
+ /**
2270
+ * return the number of articles that are assigned to the event
2271
+ */
2272
+ articleCounts?: boolean;
2273
+ /**
2274
+ * return information about the main concepts related to the event
2275
+ */
2276
+ concepts?: boolean;
2277
+ /**
2278
+ * return information about the categories related to the event
2279
+ */
2280
+ categories?: boolean;
2281
+ /**
2282
+ * return information about the date of the event
2283
+ */
2284
+ date?: boolean;
2285
+ /**
2286
+ * return the dates that were commonly found in the articles about the event
2287
+ */
2288
+ commonDates?: boolean;
2289
+ /**
2290
+ * return for each language the article from which we have extracted the summary and title for event for that language
2291
+ */
2292
+ articleInfo?: boolean;
2293
+ /**
2294
+ * return the list of stories (clusters) that are about the event
2295
+ */
2296
+ stories?: boolean;
2297
+ /**
2298
+ * score computed based on how frequently the articles in the event were shared on social media
2299
+ */
2300
+ socialScore?: boolean;
2301
+ /**
2302
+ * number of images to be returned for an event
2303
+ */
2304
+ imageCount?: number;
2305
+ [name: string]: boolean | string | number;
2306
+ }
2307
+ /**
2308
+ * What information about a news source should be returned by the API call
2309
+ */
2310
+ interface SourceInfoFlags {
2311
+ /**
2312
+ * title of the news source
2313
+ */
2314
+ IncludeSourceTitle?: boolean;
2315
+ /**
2316
+ * description of the news source
2317
+ */
2318
+ IncludeSourceDescription?: boolean;
2319
+ /**
2320
+ * geographic location of the news source
2321
+ */
2322
+ IncludeSourceLocation?: boolean;
2323
+ /**
2324
+ * a set of rankings for the news source
2325
+ */
2326
+ IncludeSourceRanking?: boolean;
2327
+ /**
2328
+ * different images associated with the news source
2329
+ */
2330
+ IncludeSourceImage?: boolean;
2331
+ /**
2332
+ * different social media accounts used by the news source
2333
+ */
2334
+ IncludeSourceSocialMedia?: boolean;
2335
+ }
2336
+ /**
2337
+ * What information about a news source should be returned by the API call
2338
+ */
2339
+ interface SourceInfo {
2340
+ /**
2341
+ * title of the news source
2342
+ */
2343
+ title?: boolean;
2344
+ /**
2345
+ * description of the news source
2346
+ */
2347
+ description?: boolean;
2348
+ /**
2349
+ * geographic location of the news source
2350
+ */
2351
+ location?: boolean;
2352
+ /**
2353
+ * a set of rankings for the news source
2354
+ */
2355
+ ranking?: boolean;
2356
+ /**
2357
+ * different images associated with the news source
2358
+ */
2359
+ image?: boolean;
2360
+ /**
2361
+ * the number of articles from this news source that are stored in Event Registry
2362
+ */
2363
+ articleCount?: boolean;
2364
+ /**
2365
+ * different social media accounts used by the news source
2366
+ */
2367
+ socialMedia?: boolean;
2368
+ /**
2369
+ * info about the names of the source groups to which the source belongs to
2370
+ */
2371
+ sourceGroups?: boolean;
2372
+ [name: string]: boolean | string | number;
2373
+ }
2374
+ /**
2375
+ * What information about a category should be returned by the API call
2376
+ */
2377
+ interface CategoryInfoFlags {
2378
+ IncludeCategoryTrendingScore?: boolean;
2379
+ }
2380
+ /**
2381
+ * What information about a category should be returned by the API call
2382
+ */
2383
+ interface CategoryInfo {
2384
+ trendingScore?: boolean;
2385
+ [name: string]: boolean | string | number;
2386
+ }
2387
+ interface ConceptInfoFlags {
2388
+ ConceptType?: ConceptType;
2389
+ lang?: string | string[];
2390
+ IncludeConceptLabel?: boolean;
2391
+ IncludeConceptSynonyms?: boolean;
2392
+ IncludeConceptImage?: boolean;
2393
+ IncludeConceptDescription?: boolean;
2394
+ IncludeConceptTrendingScore?: boolean;
2395
+ MaxConceptsPerType?: number;
2396
+ }
2397
+ interface ConceptInfo {
2398
+ type?: ConceptType | ConceptType[];
2399
+ lang?: string | string[];
2400
+ label?: boolean;
2401
+ synonyms?: boolean;
2402
+ image?: boolean;
2403
+ description?: boolean;
2404
+ trendingScore?: boolean;
2405
+ maxConceptsPerType?: number;
2406
+ [name: string]: boolean | string | number | (boolean | string | number)[];
2407
+ }
2408
+ interface LocationInfoFlags {
2409
+ label?: boolean;
2410
+ wikiUri?: boolean;
2411
+ geoNamesId?: boolean;
2412
+ population?: boolean;
2413
+ geoLocation?: boolean;
2414
+ countryArea?: boolean;
2415
+ countryDetails?: boolean;
2416
+ countryContinent?: boolean;
2417
+ placeFeatureCode?: boolean;
2418
+ placeCountry?: boolean;
2419
+ }
2420
+ interface LocationInfo {
2421
+ label?: boolean;
2422
+ wikiUri?: boolean;
2423
+ geoNamesId?: boolean;
2424
+ population?: boolean;
2425
+ geoLocation?: boolean;
2426
+ countryArea?: boolean;
2427
+ countryDetails?: boolean;
2428
+ countryContinent?: boolean;
2429
+ placeFeatureCode?: boolean;
2430
+ placeCountry?: boolean;
2431
+ [name: string]: boolean | string | number;
2432
+ }
2433
+ interface ConceptClassInfoFlags {
2434
+ IncludeConceptClassParentLabels?: boolean;
2435
+ IncludeConceptClassConcepts?: boolean;
2436
+ }
2437
+ interface ConceptClassInfo {
2438
+ parentLabels?: boolean;
2439
+ concepts?: boolean;
2440
+ [name: string]: boolean | string | number;
2441
+ }
2442
+ interface ConceptFolderInfoFlags {
2443
+ IncludeConceptFolderDefinition?: boolean;
2444
+ IncludeConceptFolderOwner?: boolean;
2445
+ }
2446
+ interface ConceptFolderInfo {
2447
+ definition?: boolean;
2448
+ owner?: boolean;
2449
+ [name: string]: boolean | string | number;
2450
+ }
2451
+ }
2452
+ export {};
2453
+ }