eventregistry 8.9.2 → 8.10.2

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 (71) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/eventRegistry.js +2 -2
  3. package/dist/eventRegistry.js.map +1 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +13 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/queryArticles.js +6 -0
  8. package/dist/queryArticles.js.map +1 -1
  9. package/dist/queryEvents.js +6 -0
  10. package/dist/queryEvents.js.map +1 -1
  11. package/dist/queryMentions.d.ts +95 -0
  12. package/dist/queryMentions.js +579 -0
  13. package/dist/queryMentions.js.map +1 -0
  14. package/dist/topicPage.js +2 -2
  15. package/dist/topicPage.js.map +1 -1
  16. package/{src → dist}/types.d.ts +284 -195
  17. package/dist/types.js +3 -0
  18. package/dist/types.js.map +1 -0
  19. package/package.json +6 -5
  20. package/dist/correlations.d.ts +0 -50
  21. package/dist/correlations.js +0 -397
  22. package/dist/correlations.js.map +0 -1
  23. package/examples/autoSuggestionsExamples.ts +0 -46
  24. package/examples/countsExamples.ts +0 -34
  25. package/examples/dailySharesExamples.ts +0 -54
  26. package/examples/eventForTextExamples.ts +0 -32
  27. package/examples/feedOfNewArticlesExamples.ts +0 -82
  28. package/examples/feedOfNewEventsExamples.ts +0 -70
  29. package/examples/queryArticleExamples.ts +0 -42
  30. package/examples/queryArticlesExamples.ts +0 -242
  31. package/examples/queryEventExamples.ts +0 -99
  32. package/examples/queryEventsExamples.ts +0 -232
  33. package/examples/topicPageExamples.ts +0 -97
  34. package/examples/trendsExamples.ts +0 -34
  35. package/src/analytics.ts +0 -181
  36. package/src/base.ts +0 -198
  37. package/src/counts.ts +0 -119
  38. package/src/dailyShares.ts +0 -48
  39. package/src/eventForText.ts +0 -61
  40. package/src/eventRegistry.ts +0 -733
  41. package/src/index.ts +0 -111
  42. package/src/info.ts +0 -121
  43. package/src/query.ts +0 -257
  44. package/src/queryArticle.ts +0 -139
  45. package/src/queryArticles.ts +0 -603
  46. package/src/queryEvent.ts +0 -473
  47. package/src/queryEvents.ts +0 -684
  48. package/src/queryStory.ts +0 -152
  49. package/src/recent.ts +0 -63
  50. package/src/returnInfo.ts +0 -363
  51. package/src/topicPage.ts +0 -479
  52. package/src/trends.ts +0 -63
  53. package/test/index.d.ts +0 -18
  54. package/test/jasmine.json +0 -10
  55. package/test/spec/analytics.spec.ts +0 -150
  56. package/test/spec/autoSuggestions.spec.ts +0 -54
  57. package/test/spec/info.spec.ts +0 -84
  58. package/test/spec/invalidQueries.spec.ts +0 -147
  59. package/test/spec/queryArticle.spec.ts +0 -62
  60. package/test/spec/queryArticles.spec.ts +0 -541
  61. package/test/spec/queryArticlesComplex.spec.ts +0 -298
  62. package/test/spec/queryEvent.spec.ts +0 -194
  63. package/test/spec/queryEvents.spec.ts +0 -491
  64. package/test/spec/queryEventsComplex.spec.ts +0 -188
  65. package/test/spec/queryPaging.spec.ts +0 -318
  66. package/test/spec/returnInfo.spec.ts +0 -34
  67. package/test/spec/topicPage.spec.ts +0 -83
  68. package/test/spec/utils.ts +0 -436
  69. package/test/tsconfig.json +0 -31
  70. package/tsconfig.json +0 -32
  71. package/tslint.json +0 -25
@@ -1,24 +1,21 @@
1
1
  import { QueryItems } from "./base";
2
- import { BaseQuery, CombinedQuery} from "./query";
2
+ import { BaseQuery, CombinedQuery } from "./query";
3
3
  import { QueryArticles, RequestArticles } from "./queryArticles";
4
4
  import { RequestEvents } from "./queryEvents";
5
+ import { RequestMentions } from "./queryMentions";
5
6
  import { ReturnInfo } from "./returnInfo";
6
-
7
7
  /**
8
8
  * Type definitions for different classes and functions from the Event Registry Node JS SDK.
9
9
  */
10
- export module EventRegistryStatic {
11
-
12
- export interface UsageInfo {
10
+ export declare module EventRegistryStatic {
11
+ interface UsageInfo {
13
12
  availableTokens: number;
14
13
  usedTokens: number;
15
14
  }
16
-
17
- export interface ServiceStatus {
15
+ interface ServiceStatus {
18
16
  [name: string]: any;
19
17
  }
20
-
21
- export interface Config {
18
+ interface Config {
22
19
  /**
23
20
  * API key that should be used to make the requests to the Event Registry.
24
21
  * API key is assigned to each user account and can be obtained on this page:
@@ -47,7 +44,7 @@ export module EventRegistryStatic {
47
44
  */
48
45
  repeatFailedRequestCount?: number;
49
46
  /**
50
- * if true, additional info about query times etc. will be printed to console
47
+ * if true, additional info about errors etc. will be printed to console
51
48
  */
52
49
  verboseOutput?: boolean;
53
50
  /**
@@ -57,17 +54,11 @@ export module EventRegistryStatic {
57
54
  settingsFName?: string;
58
55
  allowUseOfArchive?: boolean;
59
56
  }
60
-
61
- export type BaseConceptType = "person" | "loc" | "org" | "wiki";
62
-
63
- export type ConceptType = "person" | "loc" | "org" | "wiki" | "entities" | "concepts" | "conceptClass" | "conceptFolder";
64
-
65
- export type SourceType = "place" | "country";
66
-
67
- export type ConceptClassType = "dbpedia" | "custom";
68
-
69
- export type DataType = "news" | "pr" | "blog";
70
-
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";
71
62
  /**
72
63
  * Options:
73
64
  * * id (internal id),
@@ -81,9 +72,8 @@ export module EventRegistryStatic {
81
72
  * * socialScore (total shares on social media),
82
73
  * * facebookShares (shares on Facebook only)
83
74
  */
84
- export type SortBy = "id" | "date" | "cosSim" | "rel" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
85
-
86
- export interface SuggestConceptsArguments {
75
+ type SortBy = "id" | "date" | "cosSim" | "rel" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
76
+ interface SuggestConceptsArguments {
87
77
  /**
88
78
  * What types of concepts should be returned
89
79
  */
@@ -109,8 +99,7 @@ export module EventRegistryStatic {
109
99
  */
110
100
  returnInfo?: ReturnInfo;
111
101
  }
112
-
113
- export interface SuggestCategoriesArguments {
102
+ interface SuggestCategoriesArguments {
114
103
  /**
115
104
  * page of the results (1, 2, ...)
116
105
  */
@@ -124,8 +113,7 @@ export module EventRegistryStatic {
124
113
  */
125
114
  returnInfo?: ReturnInfo;
126
115
  }
127
-
128
- export interface SuggestNewsSourcesArguments {
116
+ interface SuggestNewsSourcesArguments {
129
117
  /**
130
118
  * page of the results (1, 2, ...)
131
119
  */
@@ -139,8 +127,7 @@ export module EventRegistryStatic {
139
127
  */
140
128
  dataType?: EventRegistryStatic.DataType[] | EventRegistryStatic.DataType;
141
129
  }
142
-
143
- export interface SuggestSourceGroupsArguments {
130
+ interface SuggestSourceGroupsArguments {
144
131
  /**
145
132
  * page of the results (1, 2, ...)
146
133
  */
@@ -150,8 +137,7 @@ export module EventRegistryStatic {
150
137
  */
151
138
  count?: number;
152
139
  }
153
-
154
- export interface SuggestLocationsArguments {
140
+ interface SuggestLocationsArguments {
155
141
  /**
156
142
  * What types of locations are we interested in.
157
143
  */
@@ -177,8 +163,7 @@ export module EventRegistryStatic {
177
163
  */
178
164
  returnInfo?: ReturnInfo;
179
165
  }
180
-
181
- export interface SuggestLocationsAtCoordinateArguments {
166
+ interface SuggestLocationsAtCoordinateArguments {
182
167
  /**
183
168
  * Limit the set of results only to cities (true) or also to general places (false)
184
169
  */
@@ -200,8 +185,7 @@ export module EventRegistryStatic {
200
185
  */
201
186
  returnInfo?: ReturnInfo;
202
187
  }
203
-
204
- export interface SuggestSourcesAtPlaceArguments {
188
+ interface SuggestSourcesAtPlaceArguments {
205
189
  /**
206
190
  * page of the results (1, 2, ...)
207
191
  */
@@ -215,8 +199,7 @@ export module EventRegistryStatic {
215
199
  */
216
200
  dataType?: DataType;
217
201
  }
218
-
219
- export interface SuggestConceptClassesArguments {
202
+ interface SuggestConceptClassesArguments {
220
203
  /**
221
204
  * language in which the prefix is specified
222
205
  */
@@ -242,8 +225,7 @@ export module EventRegistryStatic {
242
225
  */
243
226
  returnInfo?: ReturnInfo;
244
227
  }
245
-
246
- export interface SuggestCustomConceptsArguments {
228
+ interface SuggestCustomConceptsArguments {
247
229
  /**
248
230
  * language in which the prefix is specified
249
231
  */
@@ -265,8 +247,7 @@ export module EventRegistryStatic {
265
247
  */
266
248
  returnInfo?: ReturnInfo;
267
249
  }
268
-
269
- export interface GetConceptUriArguments {
250
+ interface GetConceptUriArguments {
270
251
  /**
271
252
  * language in which the prefix is specified
272
253
  */
@@ -276,8 +257,7 @@ export module EventRegistryStatic {
276
257
  */
277
258
  sources?: EventRegistryStatic.ConceptType[];
278
259
  }
279
-
280
- export interface GetLocationUriArguments {
260
+ interface GetLocationUriArguments {
281
261
  /**
282
262
  * language in which the prefix is specified
283
263
  */
@@ -295,15 +275,13 @@ export module EventRegistryStatic {
295
275
  */
296
276
  sortByDistanceTo?: number[];
297
277
  }
298
-
299
- export interface GetStatsArguments {
278
+ interface GetStatsArguments {
300
279
  addDailyArticles?: boolean;
301
280
  addDailyAnnArticles?: boolean;
302
281
  addDailyDuplArticles?: boolean;
303
282
  addDailyEvents?: boolean;
304
283
  }
305
-
306
- export interface TopicPage {
284
+ interface TopicPage {
307
285
  autoAddArticles: boolean;
308
286
  articleHasDuplicate: "skipHasDuplicates" | "keepOnlyHasDuplicates" | "keepAll";
309
287
  articleHasEvent: "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent" | "keepAll";
@@ -311,13 +289,43 @@ export module EventRegistryStatic {
311
289
  maxDaysBack: number;
312
290
  articleTreshWgt: number;
313
291
  eventTreshWgt: number;
314
- concepts: Array<{uri: string, wgt: number, required?: boolean, excluded?: boolean}>;
315
- keywords: Array<{keyword: string, wgt: number, required?: boolean, excluded?: boolean}>;
316
- categories: Array<{uri: string, wgt: number, required?: boolean, excluded?: boolean}>;
317
- sources: Array<{uri: string, wgt: number, excluded?: boolean}>;
318
- sourceGroups: Array<{uri: string, wgt: number, excluded?: boolean}>;
319
- sourceLocations: Array<{uri: string, wgt: number, excluded?: boolean}>;
320
- locations: Array<{uri: string, wgt: 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
+ }>;
321
329
  langs: string[];
322
330
  startSourceRankPercentile?: number;
323
331
  endSourceRankPercentile?: number;
@@ -327,37 +335,30 @@ export module EventRegistryStatic {
327
335
  restrictToSetLocations: boolean;
328
336
  dataType: EventRegistryStatic.DataType | EventRegistryStatic.DataType[];
329
337
  }
330
-
331
- export interface TopicPageAddConceptArguments {
338
+ interface TopicPageAddConceptArguments {
332
339
  label?: string;
333
340
  conceptType?: string;
334
341
  required?: boolean;
335
342
  excluded?: boolean;
336
343
  }
337
-
338
- export interface TopicPageAddKeywordArguments {
344
+ interface TopicPageAddKeywordArguments {
339
345
  required?: boolean;
340
346
  excluded?: boolean;
341
347
  }
342
-
343
- export interface TopicPageAddCategoryArguments {
348
+ interface TopicPageAddCategoryArguments {
344
349
  required?: boolean;
345
350
  excluded?: boolean;
346
351
  }
347
-
348
- export interface TopicPageAddSourceArguments {
352
+ interface TopicPageAddSourceArguments {
349
353
  excluded?: boolean;
350
354
  }
351
-
352
- export interface TopicPageAddSourceLocationArguments {
355
+ interface TopicPageAddSourceLocationArguments {
353
356
  excluded?: boolean;
354
357
  }
355
-
356
- export interface TopicPageAddSourceGroupArguments {
358
+ interface TopicPageAddSourceGroupArguments {
357
359
  excluded?: boolean;
358
360
  }
359
-
360
- export interface TopicPageArticles {
361
+ interface TopicPageArticles {
361
362
  /**
362
363
  * Which page of the results to return (default: 1).
363
364
  */
@@ -381,8 +382,7 @@ export module EventRegistryStatic {
381
382
  returnInfo?: ReturnInfo;
382
383
  [name: string]: (string | number | boolean | ReturnInfo) | (string | number | boolean)[];
383
384
  }
384
-
385
- export interface TopicPageEvents {
385
+ interface TopicPageEvents {
386
386
  /**
387
387
  * Which page of the results to return (default: 1).
388
388
  */
@@ -405,9 +405,8 @@ export module EventRegistryStatic {
405
405
  returnInfo?: ReturnInfo;
406
406
  [name: string]: (string | number | boolean | ReturnInfo) | (string | number | boolean)[];
407
407
  }
408
-
409
- export namespace Correlations {
410
- export interface TopConceptArguments {
408
+ namespace Correlations {
409
+ interface TopConceptArguments {
411
410
  /**
412
411
  * An instance of QueryArticles that can be used to limit the space of concept candidates
413
412
  */
@@ -434,8 +433,7 @@ export module EventRegistryStatic {
434
433
  */
435
434
  returnInfo?: ReturnInfo;
436
435
  }
437
-
438
- export interface TopCategoryArguments {
436
+ interface TopCategoryArguments {
439
437
  /**
440
438
  * the number of returned categories for which the exact value of the correlation is computed
441
439
  */
@@ -450,9 +448,8 @@ export module EventRegistryStatic {
450
448
  returnInfo?: ReturnInfo;
451
449
  }
452
450
  }
453
-
454
- export namespace Counts {
455
- export interface Arguments {
451
+ namespace Counts {
452
+ interface Arguments {
456
453
  /**
457
454
  * input source information from which to compute top trends.
458
455
  */
@@ -475,9 +472,8 @@ export module EventRegistryStatic {
475
472
  returnInfo?: ReturnInfo;
476
473
  }
477
474
  }
478
-
479
- export namespace DailyShares {
480
- export interface Arguments {
475
+ namespace DailyShares {
476
+ interface Arguments {
481
477
  /**
482
478
  * Specify the date for which to return top shared articles. If undefined then today is used.
483
479
  */
@@ -492,9 +488,8 @@ export module EventRegistryStatic {
492
488
  returnInfo?: ReturnInfo;
493
489
  }
494
490
  }
495
-
496
- export namespace Analytics {
497
- export interface TrainTopicOnTweetsArguments {
491
+ namespace Analytics {
492
+ interface TrainTopicOnTweetsArguments {
498
493
  /**
499
494
  * Do you want to analyze the content of the tweets and extract the concepts mentioned in them?
500
495
  * If false, only content shared in the articles in the user's tweets will be analyzed.
@@ -533,15 +528,14 @@ export module EventRegistryStatic {
533
528
  */
534
529
  notifyEmailAddress?: string;
535
530
  }
536
- export interface TrainTopicGetTrainedTopicArguments {
531
+ interface TrainTopicGetTrainedTopicArguments {
537
532
  maxConcepts?: number;
538
533
  maxCategories?: number;
539
534
  idfNormalization?: boolean;
540
535
  }
541
536
  }
542
-
543
- export namespace Info {
544
- export interface GetSourceInfoArguments {
537
+ namespace Info {
538
+ interface GetSourceInfoArguments {
545
539
  /**
546
540
  * single source uri or a list of source uris for which to return information
547
541
  */
@@ -551,8 +545,7 @@ export module EventRegistryStatic {
551
545
  */
552
546
  returnInfo?: ReturnInfo;
553
547
  }
554
-
555
- export interface GetConceptInfoArguments {
548
+ interface GetConceptInfoArguments {
556
549
  /**
557
550
  * single concept uri or a list of concept uris for which to return information
558
551
  */
@@ -562,8 +555,7 @@ export module EventRegistryStatic {
562
555
  */
563
556
  returnInfo?: ReturnInfo;
564
557
  }
565
-
566
- export interface GetCategoryInfoArguments {
558
+ interface GetCategoryInfoArguments {
567
559
  /**
568
560
  * single category uri or a list of category uris for which to return information
569
561
  */
@@ -574,9 +566,8 @@ export module EventRegistryStatic {
574
566
  returnInfo?: ReturnInfo;
575
567
  }
576
568
  }
577
-
578
- export namespace Query {
579
- export interface BaseQueryArguments {
569
+ namespace Query {
570
+ interface BaseQueryArguments {
580
571
  /**
581
572
  * Keyword(s) to query. Either undefined, string or QueryItems.
582
573
  */
@@ -642,8 +633,7 @@ export module EventRegistryStatic {
642
633
  */
643
634
  exclude?: BaseQuery | CombinedQuery;
644
635
  }
645
-
646
- export interface ComplexArticleQueryArguments {
636
+ interface ComplexArticleQueryArguments {
647
637
  /**
648
638
  * Some articles can be duplicates of other articles. What should be done with them.
649
639
  * Possible values are:
@@ -680,15 +670,13 @@ export module EventRegistryStatic {
680
670
  startSourceRankPercentile?: number;
681
671
  endSourceRankPercentile?: number;
682
672
  }
683
-
684
- export interface ComplexEventQueryArguments {
673
+ interface ComplexEventQueryArguments {
685
674
  minSentiment?: number;
686
675
  maxSentiment?: number;
687
676
  }
688
677
  }
689
-
690
- export namespace QueryArticle {
691
- export interface RequestArticleSimilarArticlesArguments {
678
+ namespace QueryArticle {
679
+ interface RequestArticleSimilarArticlesArguments {
692
680
  /**
693
681
  * page of the articles
694
682
  */
@@ -710,8 +698,7 @@ export module EventRegistryStatic {
710
698
  */
711
699
  returnInfo?: ReturnInfo;
712
700
  }
713
-
714
- export interface RequestArticleDuplicatedArticlesArguments {
701
+ interface RequestArticleDuplicatedArticlesArguments {
715
702
  /**
716
703
  * page of the articles
717
704
  */
@@ -734,10 +721,8 @@ export module EventRegistryStatic {
734
721
  returnInfo?: ReturnInfo;
735
722
  }
736
723
  }
737
-
738
- // tslint:disable-next-line:no-shadowed-variable
739
- export namespace QueryArticles {
740
- export interface Arguments {
724
+ namespace QueryArticles {
725
+ interface Arguments {
741
726
  /**
742
727
  * Find articles that mention the specified keywords.
743
728
  * A single keyword/phrase can be provided as a string, multiple keywords/phrases can be provided as a list of strings.
@@ -902,9 +887,7 @@ export module EventRegistryStatic {
902
887
  requestedResult?: RequestArticles;
903
888
  }
904
889
  }
905
-
906
- export namespace QueryEvent {
907
-
890
+ namespace QueryEvent {
908
891
  /**
909
892
  * Sorting options:
910
893
  * - undefined (no specific sorting),
@@ -917,13 +900,10 @@ export module EventRegistryStatic {
917
900
  * - socialScore (total shares on social media),
918
901
  * - facebookShares (shares on Facebook only)
919
902
  */
920
- export type SortByOptions = "id" | "date" | "cosSim" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
921
-
922
- // tslint:disable-next-line:no-empty-interface
923
- export interface RequestEvent {
924
-
903
+ type SortByOptions = "id" | "date" | "cosSim" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
904
+ interface RequestEvent {
925
905
  }
926
- export interface IteratorArguments {
906
+ interface IteratorArguments {
927
907
  /**
928
908
  * Array or a single language in which to return the list of matching articles
929
909
  */
@@ -972,8 +952,7 @@ export module EventRegistryStatic {
972
952
  */
973
953
  maxSentiment?: number;
974
954
  }
975
-
976
- export interface RequestEventArticlesArguments {
955
+ interface RequestEventArticlesArguments {
977
956
  /**
978
957
  * page of the articles to return (1, 2, ...)
979
958
  */
@@ -1014,8 +993,7 @@ export module EventRegistryStatic {
1014
993
  startSourceRankPercentile?: number;
1015
994
  endSourceRankPercentile?: number;
1016
995
  }
1017
-
1018
- export interface RequestEventArticleUriWgtsArguments {
996
+ interface RequestEventArticleUriWgtsArguments {
1019
997
  /**
1020
998
  * a single language or an array of languages in which to return the articles
1021
999
  */
@@ -1029,8 +1007,7 @@ export module EventRegistryStatic {
1029
1007
  */
1030
1008
  sortByAsc?: boolean;
1031
1009
  }
1032
-
1033
- export interface RequestEventArticleTrendArguments {
1010
+ interface RequestEventArticleTrendArguments {
1034
1011
  /**
1035
1012
  * languages for which to compute the trends
1036
1013
  */
@@ -1052,12 +1029,14 @@ export module EventRegistryStatic {
1052
1029
  */
1053
1030
  returnInfo?: ReturnInfo;
1054
1031
  }
1055
-
1056
- export interface RequestEventSimilarEventsArguments {
1032
+ interface RequestEventSimilarEventsArguments {
1057
1033
  /**
1058
1034
  * array of concepts and their importance, e.g. [{ "uri": "http://en.wikipedia.org/wiki/Barack_Obama", "wgt": 100 }, ...]
1059
1035
  */
1060
- conceptInfoList?: Array<{uri: string, wgt: number}>;
1036
+ conceptInfoList?: Array<{
1037
+ uri: string;
1038
+ wgt: number;
1039
+ }>;
1061
1040
  /**
1062
1041
  * number of similar events to return (at most 50)
1063
1042
  */
@@ -1081,11 +1060,14 @@ export module EventRegistryStatic {
1081
1060
  */
1082
1061
  returnInfo?: ReturnInfo;
1083
1062
  }
1084
- export interface RequestEventSimilarStoriesArguments {
1063
+ interface RequestEventSimilarStoriesArguments {
1085
1064
  /**
1086
1065
  * array of concepts and their importance, e.g. [{ "uri": "http://en.wikipedia.org/wiki/Barack_Obama", "wgt": 100 }, ...]
1087
1066
  */
1088
- conceptInfoList?: Array<{uri: string, wgt: number}>;
1067
+ conceptInfoList?: Array<{
1068
+ uri: string;
1069
+ wgt: number;
1070
+ }>;
1089
1071
  /**
1090
1072
  * number of similar stories to return (at most 5')
1091
1073
  */
@@ -1104,8 +1086,144 @@ export module EventRegistryStatic {
1104
1086
  returnInfo?: ReturnInfo;
1105
1087
  }
1106
1088
  }
1107
- export namespace QueryEvents {
1108
- export interface Arguments {
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
+ }
1122
+ interface RequestMentionsUriWgtListArguments {
1123
+ /**
1124
+ * page of the results to return (1, 2, ...)
1125
+ */
1126
+ page?: number;
1127
+ /**
1128
+ * number of results to return per page
1129
+ */
1130
+ count?: number;
1131
+ /**
1132
+ * how should the resulting events be sorted. Options:
1133
+ * - none (no specific sorting),
1134
+ * - date (by event date),
1135
+ * - rel (relevance to the query),
1136
+ * - size (number of articles),
1137
+ * - socialScore (amount of shares in social media)
1138
+ */
1139
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1140
+ /**
1141
+ * should the results be sorted in ascending order (true) or descending (false)
1142
+ */
1143
+ sortByAsc?: boolean;
1144
+ }
1145
+ interface RequestMentionsConceptAggrArguments {
1146
+ /**
1147
+ * number of top concepts to return
1148
+ */
1149
+ conceptCount?: number;
1150
+ /**
1151
+ * on what sample of results should the aggregate be computed
1152
+ */
1153
+ mentionsSampleSize?: number;
1154
+ /**
1155
+ * what details about the concepts should be included in the returned information
1156
+ */
1157
+ returnInfo?: ReturnInfo;
1158
+ /**
1159
+ * how should the top concepts be computed. Possible values are
1160
+ * "importance" (takes into account how frequently a concept is mentioned and how relevant it is in an mention),
1161
+ * "frequency" (ranks the concepts simply by how frequently the concept is mentioned in the results) and
1162
+ * "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)
1163
+ */
1164
+ conceptScoring?: "importance" | "frequency" | "uniqueness";
1165
+ /**
1166
+ * if you wish to limit the number of top concepts per type (person, org, loc, wiki) then set this to some number.
1167
+ * If you want to get equal number of concepts for each type then set conceptCountPerType to conceptCount/4 (since there are 4 concept types)
1168
+ */
1169
+ conceptCountPerType?: number;
1170
+ }
1171
+ interface RequestMentionsCategoryAggrArguments {
1172
+ mentionsSampleSize?: number;
1173
+ returnInfo?: ReturnInfo;
1174
+ }
1175
+ interface RequestMentionsSourceAggrArguments {
1176
+ sourceCount?: number;
1177
+ normalizeBySourceArts?: boolean;
1178
+ returnInfo?: ReturnInfo;
1179
+ }
1180
+ interface RequestMentionsKeywordAggrArguments {
1181
+ mentionsSampleSize?: number;
1182
+ }
1183
+ interface RequestMentionsConceptGraphArguments {
1184
+ /**
1185
+ * number of top sources to return
1186
+ */
1187
+ conceptCount?: number;
1188
+ linkCount?: number;
1189
+ /**
1190
+ * on what sample of results should the aggregate be computed
1191
+ */
1192
+ mentionsSampleSize?: number;
1193
+ /**
1194
+ * what details about the concepts should be included in the returned information
1195
+ */
1196
+ returnInfo?: ReturnInfo;
1197
+ skipQueryConcepts?: boolean;
1198
+ }
1199
+ interface RequestMentionsRecentActivityArguments {
1200
+ /**
1201
+ * max mentions to return
1202
+ */
1203
+ maxMentionCount?: number;
1204
+ updatesAfterUri?: string;
1205
+ /**
1206
+ * the time after which the events were added/updated (returned by previous call to the same method)
1207
+ */
1208
+ updatesAfterTm?: string | Date;
1209
+ /**
1210
+ * how many minutes into the past should we check (set either this or updatesAfterTm property, but not both)
1211
+ */
1212
+ updatesAfterMinsAgo?: number;
1213
+ updatesUntilTm?: string | Date;
1214
+ updatesUntilMinsAgo?: number;
1215
+ /**
1216
+ * return only events that have a geographic location assigned to them
1217
+ */
1218
+ mandatorySourceLocation?: boolean;
1219
+ /**
1220
+ * what details should be included in the returned information
1221
+ */
1222
+ returnInfo?: ReturnInfo;
1223
+ }
1224
+ }
1225
+ namespace QueryEvents {
1226
+ interface Arguments {
1109
1227
  /**
1110
1228
  * find events where articles mention all the specified keywords.
1111
1229
  * A single keyword/phrase can be provided as a string,
@@ -1268,7 +1386,7 @@ export module EventRegistryStatic {
1268
1386
  */
1269
1387
  requestedResult?: RequestEvents;
1270
1388
  }
1271
- export interface IteratorArguments extends Arguments {
1389
+ interface IteratorArguments extends Arguments {
1272
1390
  /**
1273
1391
  * how should the resulting events be sorted. Options:
1274
1392
  * - none (no specific sorting),
@@ -1292,7 +1410,7 @@ export module EventRegistryStatic {
1292
1410
  maxItems?: number;
1293
1411
  returnInfo?: ReturnInfo;
1294
1412
  }
1295
- export interface RequestEventsInfoArguments {
1413
+ interface RequestEventsInfoArguments {
1296
1414
  /**
1297
1415
  * page of the results to return (1, 2, ...)
1298
1416
  */
@@ -1309,7 +1427,7 @@ export module EventRegistryStatic {
1309
1427
  * - size (number of articles),
1310
1428
  * - socialScore (amount of shares in social media)
1311
1429
  */
1312
- sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1430
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1313
1431
  /**
1314
1432
  * should the results be sorted in ascending order (true) or descending (false)
1315
1433
  */
@@ -1319,7 +1437,7 @@ export module EventRegistryStatic {
1319
1437
  */
1320
1438
  returnInfo?: ReturnInfo;
1321
1439
  }
1322
- export interface RequestEventsUriListArguments {
1440
+ interface RequestEventsUriListArguments {
1323
1441
  /**
1324
1442
  * page of the results to return (1, 2, ...)
1325
1443
  */
@@ -1336,14 +1454,13 @@ export module EventRegistryStatic {
1336
1454
  * - size (number of articles),
1337
1455
  * - socialScore (amount of shares in social media)
1338
1456
  */
1339
- sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1457
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1340
1458
  /**
1341
1459
  * should the results be sorted in ascending order (true) or descending (false)
1342
1460
  */
1343
1461
  sortByAsc?: boolean;
1344
1462
  }
1345
-
1346
- export interface RequestEventsUriWgtListArguments {
1463
+ interface RequestEventsUriWgtListArguments {
1347
1464
  /**
1348
1465
  * page of the results to return (1, 2, ...)
1349
1466
  */
@@ -1366,8 +1483,7 @@ export module EventRegistryStatic {
1366
1483
  */
1367
1484
  sortByAsc?: boolean;
1368
1485
  }
1369
-
1370
- export interface RequestEventsLocAggrArguments {
1486
+ interface RequestEventsLocAggrArguments {
1371
1487
  /**
1372
1488
  * sample of events to use to compute the location aggregate
1373
1489
  */
@@ -1377,8 +1493,7 @@ export module EventRegistryStatic {
1377
1493
  */
1378
1494
  returnInfo?: ReturnInfo;
1379
1495
  }
1380
-
1381
- export interface RequestEventsLocTimeAggrArguments {
1496
+ interface RequestEventsLocTimeAggrArguments {
1382
1497
  /**
1383
1498
  * sample of events to use to compute the location aggregate
1384
1499
  */
@@ -1388,8 +1503,7 @@ export module EventRegistryStatic {
1388
1503
  */
1389
1504
  returnInfo?: ReturnInfo;
1390
1505
  }
1391
-
1392
- export interface RequestEventsConceptAggrArguments {
1506
+ interface RequestEventsConceptAggrArguments {
1393
1507
  /**
1394
1508
  * number of top concepts to return
1395
1509
  */
@@ -1403,7 +1517,7 @@ export module EventRegistryStatic {
1403
1517
  */
1404
1518
  returnInfo?: ReturnInfo;
1405
1519
  }
1406
- export interface RequestEventsConceptGraphArguments {
1520
+ interface RequestEventsConceptGraphArguments {
1407
1521
  /**
1408
1522
  * number of top concepts to return
1409
1523
  */
@@ -1421,8 +1535,7 @@ export module EventRegistryStatic {
1421
1535
  */
1422
1536
  returnInfo?: ReturnInfo;
1423
1537
  }
1424
-
1425
- export interface RequestEventsConceptMatrixArguments {
1538
+ interface RequestEventsConceptMatrixArguments {
1426
1539
  /**
1427
1540
  * number of top concepts to return
1428
1541
  */
@@ -1440,8 +1553,7 @@ export module EventRegistryStatic {
1440
1553
  */
1441
1554
  returnInfo?: ReturnInfo;
1442
1555
  }
1443
-
1444
- export interface RequestEventsConceptTrendsArguments {
1556
+ interface RequestEventsConceptTrendsArguments {
1445
1557
  /**
1446
1558
  * number of top concepts to return
1447
1559
  */
@@ -1455,8 +1567,7 @@ export module EventRegistryStatic {
1455
1567
  */
1456
1568
  conceptUris?: string[];
1457
1569
  }
1458
-
1459
- export interface RequestEventsSourceAggrArguments {
1570
+ interface RequestEventsSourceAggrArguments {
1460
1571
  /**
1461
1572
  * number of top sources to return
1462
1573
  */
@@ -1470,8 +1581,7 @@ export module EventRegistryStatic {
1470
1581
  */
1471
1582
  returnInfo?: ReturnInfo;
1472
1583
  }
1473
-
1474
- export interface RequestEventsDateMentionAggrArguments {
1584
+ interface RequestEventsDateMentionAggrArguments {
1475
1585
  /**
1476
1586
  * ignore events that don't have a date that is more than this number of days apart from the tested event
1477
1587
  */
@@ -1489,8 +1599,7 @@ export module EventRegistryStatic {
1489
1599
  */
1490
1600
  returnInfo?: ReturnInfo;
1491
1601
  }
1492
-
1493
- export interface RequestEventsEventClustersArguments {
1602
+ interface RequestEventsEventClustersArguments {
1494
1603
  /**
1495
1604
  * number of keywords to report in each of the clusters
1496
1605
  */
@@ -1504,8 +1613,7 @@ export module EventRegistryStatic {
1504
1613
  */
1505
1614
  returnInfo?: ReturnInfo;
1506
1615
  }
1507
-
1508
- export interface RequestEventsRecentActivityArguments {
1616
+ interface RequestEventsRecentActivityArguments {
1509
1617
  /**
1510
1618
  * max events to return
1511
1619
  */
@@ -1532,12 +1640,11 @@ export module EventRegistryStatic {
1532
1640
  returnInfo?: ReturnInfo;
1533
1641
  }
1534
1642
  }
1535
- // tslint:disable-next-line:no-shadowed-variable
1536
- export namespace ReturnInfo {
1643
+ namespace ReturnInfo {
1537
1644
  /**
1538
1645
  * What information about an article should be returned by the API call
1539
1646
  */
1540
- export interface ArticleInfo {
1647
+ interface ArticleInfo {
1541
1648
  /**
1542
1649
  * max length of the article body (use -1 for full body, 0 for empty)
1543
1650
  */
@@ -1616,11 +1723,10 @@ export module EventRegistryStatic {
1616
1723
  storyUri?: boolean;
1617
1724
  [name: string]: boolean | string | number;
1618
1725
  }
1619
-
1620
1726
  /**
1621
1727
  * What information about an article should be returned by the API call
1622
1728
  */
1623
- export interface ArticleInfoFlags {
1729
+ interface ArticleInfoFlags {
1624
1730
  /**
1625
1731
  * max length of the article body (use -1 for full body, 0 for empty)
1626
1732
  */
@@ -1698,11 +1804,10 @@ export module EventRegistryStatic {
1698
1804
  */
1699
1805
  IncludeArticleStoryUri?: boolean;
1700
1806
  }
1701
-
1702
1807
  /**
1703
1808
  * What information about a story (cluster of articles) should be returned by the API call
1704
1809
  */
1705
- export interface StoryInfoFlags {
1810
+ interface StoryInfoFlags {
1706
1811
  /**
1707
1812
  * core stats about the story
1708
1813
  */
@@ -1748,11 +1853,10 @@ export module EventRegistryStatic {
1748
1853
  */
1749
1854
  StoryImageCount?: number;
1750
1855
  }
1751
-
1752
1856
  /**
1753
1857
  * What information about a story (cluster of articles) should be returned by the API call
1754
1858
  */
1755
- export interface StoryInfo {
1859
+ interface StoryInfo {
1756
1860
  /**
1757
1861
  * core stats about the story
1758
1862
  */
@@ -1803,11 +1907,10 @@ export module EventRegistryStatic {
1803
1907
  imageCount?: number;
1804
1908
  [name: string]: boolean | string | number;
1805
1909
  }
1806
-
1807
1910
  /**
1808
1911
  * What information about an event should be returned by the API call
1809
1912
  */
1810
- export interface EventInfoFlags {
1913
+ interface EventInfoFlags {
1811
1914
  /**
1812
1915
  * return the title of the event
1813
1916
  */
@@ -1853,11 +1956,10 @@ export module EventRegistryStatic {
1853
1956
  */
1854
1957
  EventImageCount?: number;
1855
1958
  }
1856
-
1857
1959
  /**
1858
1960
  * What information about an event should be returned by the API call
1859
1961
  */
1860
- export interface EventInfo {
1962
+ interface EventInfo {
1861
1963
  /**
1862
1964
  * return the title of the event
1863
1965
  */
@@ -1904,11 +2006,10 @@ export module EventRegistryStatic {
1904
2006
  imageCount?: number;
1905
2007
  [name: string]: boolean | string | number;
1906
2008
  }
1907
-
1908
2009
  /**
1909
2010
  * What information about a news source should be returned by the API call
1910
2011
  */
1911
- export interface SourceInfoFlags {
2012
+ interface SourceInfoFlags {
1912
2013
  /**
1913
2014
  * title of the news source
1914
2015
  */
@@ -1934,11 +2035,10 @@ export module EventRegistryStatic {
1934
2035
  */
1935
2036
  IncludeSourceSocialMedia?: boolean;
1936
2037
  }
1937
-
1938
2038
  /**
1939
2039
  * What information about a news source should be returned by the API call
1940
2040
  */
1941
- export interface SourceInfo {
2041
+ interface SourceInfo {
1942
2042
  /**
1943
2043
  * title of the news source
1944
2044
  */
@@ -1973,23 +2073,20 @@ export module EventRegistryStatic {
1973
2073
  sourceGroups?: boolean;
1974
2074
  [name: string]: boolean | string | number;
1975
2075
  }
1976
-
1977
2076
  /**
1978
2077
  * What information about a category should be returned by the API call
1979
2078
  */
1980
- export interface CategoryInfoFlags {
2079
+ interface CategoryInfoFlags {
1981
2080
  IncludeCategoryTrendingScore?: boolean;
1982
2081
  }
1983
-
1984
2082
  /**
1985
2083
  * What information about a category should be returned by the API call
1986
2084
  */
1987
- export interface CategoryInfo {
2085
+ interface CategoryInfo {
1988
2086
  trendingScore?: boolean;
1989
2087
  [name: string]: boolean | string | number;
1990
2088
  }
1991
-
1992
- export interface ConceptInfoFlags {
2089
+ interface ConceptInfoFlags {
1993
2090
  ConceptType?: ConceptType;
1994
2091
  lang?: string | string[];
1995
2092
  IncludeConceptLabel?: boolean;
@@ -1999,8 +2096,7 @@ export module EventRegistryStatic {
1999
2096
  IncludeConceptTrendingScore?: boolean;
2000
2097
  MaxConceptsPerType?: number;
2001
2098
  }
2002
-
2003
- export interface ConceptInfo {
2099
+ interface ConceptInfo {
2004
2100
  type?: ConceptType | ConceptType[];
2005
2101
  lang?: string | string[];
2006
2102
  label?: boolean;
@@ -2011,8 +2107,7 @@ export module EventRegistryStatic {
2011
2107
  maxConceptsPerType?: number;
2012
2108
  [name: string]: boolean | string | number | (boolean | string | number)[];
2013
2109
  }
2014
-
2015
- export interface LocationInfoFlags {
2110
+ interface LocationInfoFlags {
2016
2111
  label?: boolean;
2017
2112
  wikiUri?: boolean;
2018
2113
  geoNamesId?: boolean;
@@ -2024,8 +2119,7 @@ export module EventRegistryStatic {
2024
2119
  placeFeatureCode?: boolean;
2025
2120
  placeCountry?: boolean;
2026
2121
  }
2027
-
2028
- export interface LocationInfo {
2122
+ interface LocationInfo {
2029
2123
  label?: boolean;
2030
2124
  wikiUri?: boolean;
2031
2125
  geoNamesId?: boolean;
@@ -2038,28 +2132,23 @@ export module EventRegistryStatic {
2038
2132
  placeCountry?: boolean;
2039
2133
  [name: string]: boolean | string | number;
2040
2134
  }
2041
-
2042
- export interface ConceptClassInfoFlags {
2135
+ interface ConceptClassInfoFlags {
2043
2136
  IncludeConceptClassParentLabels?: boolean;
2044
2137
  IncludeConceptClassConcepts?: boolean;
2045
2138
  }
2046
-
2047
- export interface ConceptClassInfo {
2139
+ interface ConceptClassInfo {
2048
2140
  parentLabels?: boolean;
2049
2141
  concepts?: boolean;
2050
2142
  [name: string]: boolean | string | number;
2051
2143
  }
2052
-
2053
- export interface ConceptFolderInfoFlags {
2144
+ interface ConceptFolderInfoFlags {
2054
2145
  IncludeConceptFolderDefinition?: boolean;
2055
2146
  IncludeConceptFolderOwner?: boolean;
2056
2147
  }
2057
-
2058
- export interface ConceptFolderInfo {
2148
+ interface ConceptFolderInfo {
2059
2149
  definition?: boolean;
2060
2150
  owner?: boolean;
2061
2151
  [name: string]: boolean | string | number;
2062
2152
  }
2063
2153
  }
2064
-
2065
2154
  }