eventregistry 9.1.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/CHANGELOG.md +207 -0
  2. package/LICENSE +21 -21
  3. package/MIGRATION.md +177 -0
  4. package/README.md +292 -234
  5. package/dist/{analytics.d.ts → cjs/analytics.d.ts} +2 -1
  6. package/dist/cjs/analytics.js +174 -0
  7. package/dist/cjs/analytics.js.map +1 -0
  8. package/dist/{base.d.ts → cjs/base.d.ts} +9 -9
  9. package/dist/cjs/base.js +189 -0
  10. package/dist/cjs/base.js.map +1 -0
  11. package/dist/cjs/counts.js +120 -0
  12. package/dist/cjs/counts.js.map +1 -0
  13. package/dist/cjs/dailyShares.js +46 -0
  14. package/dist/cjs/dailyShares.js.map +1 -0
  15. package/dist/{data.d.ts → cjs/data.d.ts} +32 -5
  16. package/dist/cjs/data.js.map +1 -0
  17. package/dist/{eventForText.d.ts → cjs/eventForText.d.ts} +1 -1
  18. package/dist/cjs/eventForText.js +61 -0
  19. package/dist/cjs/eventForText.js.map +1 -0
  20. package/dist/{eventRegistry.d.ts → cjs/eventRegistry.d.ts} +127 -28
  21. package/dist/cjs/eventRegistry.js +887 -0
  22. package/dist/cjs/eventRegistry.js.map +1 -0
  23. package/dist/cjs/fluent/analytics.d.ts +24 -0
  24. package/dist/cjs/fluent/analytics.js +47 -0
  25. package/dist/cjs/fluent/analytics.js.map +1 -0
  26. package/dist/cjs/fluent/articles.d.ts +23 -0
  27. package/dist/cjs/fluent/articles.js +34 -0
  28. package/dist/cjs/fluent/articles.js.map +1 -0
  29. package/dist/cjs/fluent/counts.d.ts +8 -0
  30. package/dist/cjs/fluent/counts.js +17 -0
  31. package/dist/cjs/fluent/counts.js.map +1 -0
  32. package/dist/cjs/fluent/eventForText.d.ts +4 -0
  33. package/dist/cjs/fluent/eventForText.js +8 -0
  34. package/dist/cjs/fluent/eventForText.js.map +1 -0
  35. package/dist/cjs/fluent/events.d.ts +23 -0
  36. package/dist/cjs/fluent/events.js +34 -0
  37. package/dist/cjs/fluent/events.js.map +1 -0
  38. package/dist/cjs/fluent/info.d.ts +10 -0
  39. package/dist/cjs/fluent/info.js +23 -0
  40. package/dist/cjs/fluent/info.js.map +1 -0
  41. package/dist/cjs/fluent/mentions.d.ts +18 -0
  42. package/dist/cjs/fluent/mentions.js +31 -0
  43. package/dist/cjs/fluent/mentions.js.map +1 -0
  44. package/dist/cjs/fluent/recent.d.ts +8 -0
  45. package/dist/cjs/fluent/recent.js +17 -0
  46. package/dist/cjs/fluent/recent.js.map +1 -0
  47. package/dist/cjs/fluent/shares.d.ts +8 -0
  48. package/dist/cjs/fluent/shares.js +17 -0
  49. package/dist/cjs/fluent/shares.js.map +1 -0
  50. package/dist/cjs/fluent/stories.d.ts +8 -0
  51. package/dist/cjs/fluent/stories.js +14 -0
  52. package/dist/cjs/fluent/stories.js.map +1 -0
  53. package/dist/cjs/fluent/topicPages.d.ts +10 -0
  54. package/dist/cjs/fluent/topicPages.js +20 -0
  55. package/dist/cjs/fluent/topicPages.js.map +1 -0
  56. package/dist/cjs/fluent/trends.d.ts +11 -0
  57. package/dist/cjs/fluent/trends.js +23 -0
  58. package/dist/cjs/fluent/trends.js.map +1 -0
  59. package/dist/cjs/helpers/analytics.d.ts +68 -0
  60. package/dist/cjs/helpers/analytics.js +100 -0
  61. package/dist/cjs/helpers/analytics.js.map +1 -0
  62. package/dist/cjs/helpers/articles.d.ts +24 -0
  63. package/dist/cjs/helpers/articles.js +31 -0
  64. package/dist/cjs/helpers/articles.js.map +1 -0
  65. package/dist/cjs/helpers/counts.d.ts +4 -0
  66. package/dist/cjs/helpers/counts.js +12 -0
  67. package/dist/cjs/helpers/counts.js.map +1 -0
  68. package/dist/cjs/helpers/eventForText.d.ts +6 -0
  69. package/dist/cjs/helpers/eventForText.js +13 -0
  70. package/dist/cjs/helpers/eventForText.js.map +1 -0
  71. package/dist/cjs/helpers/events.d.ts +18 -0
  72. package/dist/cjs/helpers/events.js +31 -0
  73. package/dist/cjs/helpers/events.js.map +1 -0
  74. package/dist/cjs/helpers/info.d.ts +6 -0
  75. package/dist/cjs/helpers/info.js +20 -0
  76. package/dist/cjs/helpers/info.js.map +1 -0
  77. package/dist/cjs/helpers/mentions.d.ts +10 -0
  78. package/dist/cjs/helpers/mentions.js +21 -0
  79. package/dist/cjs/helpers/mentions.js.map +1 -0
  80. package/dist/cjs/helpers/recent.d.ts +10 -0
  81. package/dist/cjs/helpers/recent.js +18 -0
  82. package/dist/cjs/helpers/recent.js.map +1 -0
  83. package/dist/cjs/helpers/shares.d.ts +4 -0
  84. package/dist/cjs/helpers/shares.js +12 -0
  85. package/dist/cjs/helpers/shares.js.map +1 -0
  86. package/dist/cjs/helpers/stories.d.ts +7 -0
  87. package/dist/cjs/helpers/stories.js +13 -0
  88. package/dist/cjs/helpers/stories.js.map +1 -0
  89. package/dist/cjs/helpers/topicPages.d.ts +16 -0
  90. package/dist/cjs/helpers/topicPages.js +29 -0
  91. package/dist/cjs/helpers/topicPages.js.map +1 -0
  92. package/dist/cjs/helpers/trends.d.ts +7 -0
  93. package/dist/cjs/helpers/trends.js +20 -0
  94. package/dist/cjs/helpers/trends.js.map +1 -0
  95. package/dist/cjs/helpers/uri.d.ts +42 -0
  96. package/dist/cjs/helpers/uri.js +78 -0
  97. package/dist/cjs/helpers/uri.js.map +1 -0
  98. package/dist/cjs/http.d.ts +18 -0
  99. package/dist/cjs/http.js +88 -0
  100. package/dist/cjs/http.js.map +1 -0
  101. package/dist/cjs/index.d.ts +47 -0
  102. package/dist/{index.js → cjs/index.js} +90 -2
  103. package/dist/cjs/index.js.map +1 -0
  104. package/dist/cjs/info.js +115 -0
  105. package/dist/cjs/info.js.map +1 -0
  106. package/dist/{logger.d.ts → cjs/logger.d.ts} +13 -10
  107. package/dist/cjs/logger.js +179 -0
  108. package/dist/cjs/logger.js.map +1 -0
  109. package/dist/cjs/mutex.d.ts +6 -0
  110. package/dist/cjs/mutex.js +27 -0
  111. package/dist/cjs/mutex.js.map +1 -0
  112. package/dist/cjs/package.json +3 -0
  113. package/dist/{query.d.ts → cjs/query.d.ts} +5 -8
  114. package/dist/cjs/query.js +248 -0
  115. package/dist/cjs/query.js.map +1 -0
  116. package/dist/{queryArticle.d.ts → cjs/queryArticle.d.ts} +5 -5
  117. package/dist/cjs/queryArticle.js +120 -0
  118. package/dist/cjs/queryArticle.js.map +1 -0
  119. package/dist/{queryArticles.d.ts → cjs/queryArticles.d.ts} +40 -73
  120. package/dist/cjs/queryArticles.js +456 -0
  121. package/dist/cjs/queryArticles.js.map +1 -0
  122. package/dist/{queryEvent.d.ts → cjs/queryEvent.d.ts} +6 -6
  123. package/dist/cjs/queryEvent.js +417 -0
  124. package/dist/cjs/queryEvent.js.map +1 -0
  125. package/dist/{queryEvents.d.ts → cjs/queryEvents.d.ts} +30 -39
  126. package/dist/cjs/queryEvents.js +567 -0
  127. package/dist/cjs/queryEvents.js.map +1 -0
  128. package/dist/cjs/queryIterator.d.ts +34 -0
  129. package/dist/cjs/queryIterator.js +77 -0
  130. package/dist/cjs/queryIterator.js.map +1 -0
  131. package/dist/{queryMentions.d.ts → cjs/queryMentions.d.ts} +18 -18
  132. package/dist/cjs/queryMentions.js +440 -0
  133. package/dist/cjs/queryMentions.js.map +1 -0
  134. package/dist/{queryStory.d.ts → cjs/queryStory.d.ts} +23 -23
  135. package/dist/cjs/queryStory.js +120 -0
  136. package/dist/cjs/queryStory.js.map +1 -0
  137. package/dist/{recent.d.ts → cjs/recent.d.ts} +8 -8
  138. package/dist/cjs/recent.js +63 -0
  139. package/dist/cjs/recent.js.map +1 -0
  140. package/dist/{returnInfo.d.ts → cjs/returnInfo.d.ts} +21 -23
  141. package/dist/cjs/returnInfo.js +292 -0
  142. package/dist/cjs/returnInfo.js.map +1 -0
  143. package/dist/{topicPage.d.ts → cjs/topicPage.d.ts} +3 -3
  144. package/dist/cjs/topicPage.js +454 -0
  145. package/dist/cjs/topicPage.js.map +1 -0
  146. package/dist/cjs/topicPages.d.ts +13 -0
  147. package/dist/cjs/topicPages.js +22 -0
  148. package/dist/cjs/topicPages.js.map +1 -0
  149. package/dist/{trends.d.ts → cjs/trends.d.ts} +13 -13
  150. package/dist/cjs/trends.js +64 -0
  151. package/dist/cjs/trends.js.map +1 -0
  152. package/dist/{types.d.ts → cjs/types.d.ts} +135 -33
  153. package/dist/cjs/types.js.map +1 -0
  154. package/dist/cjs/version.d.ts +1 -0
  155. package/dist/cjs/version.js +5 -0
  156. package/dist/cjs/version.js.map +1 -0
  157. package/dist/esm/analytics.d.ts +83 -0
  158. package/dist/esm/analytics.js +170 -0
  159. package/dist/esm/analytics.js.map +1 -0
  160. package/dist/esm/base.d.ts +82 -0
  161. package/dist/esm/base.js +182 -0
  162. package/dist/esm/base.js.map +1 -0
  163. package/dist/esm/counts.d.ts +81 -0
  164. package/dist/esm/counts.js +114 -0
  165. package/dist/esm/counts.js.map +1 -0
  166. package/dist/esm/dailyShares.d.ts +10 -0
  167. package/dist/esm/dailyShares.js +41 -0
  168. package/dist/esm/dailyShares.js.map +1 -0
  169. package/dist/esm/data.d.ts +296 -0
  170. package/dist/esm/data.js +3 -0
  171. package/dist/esm/data.js.map +1 -0
  172. package/dist/esm/eventForText.d.ts +48 -0
  173. package/dist/esm/eventForText.js +57 -0
  174. package/dist/esm/eventForText.js.map +1 -0
  175. package/dist/esm/eventRegistry.d.ts +343 -0
  176. package/dist/esm/eventRegistry.js +849 -0
  177. package/dist/esm/eventRegistry.js.map +1 -0
  178. package/dist/esm/fluent/analytics.d.ts +24 -0
  179. package/dist/esm/fluent/analytics.js +43 -0
  180. package/dist/esm/fluent/analytics.js.map +1 -0
  181. package/dist/esm/fluent/articles.d.ts +23 -0
  182. package/dist/esm/fluent/articles.js +30 -0
  183. package/dist/esm/fluent/articles.js.map +1 -0
  184. package/dist/esm/fluent/counts.d.ts +8 -0
  185. package/dist/esm/fluent/counts.js +13 -0
  186. package/dist/esm/fluent/counts.js.map +1 -0
  187. package/dist/esm/fluent/eventForText.d.ts +4 -0
  188. package/dist/esm/fluent/eventForText.js +5 -0
  189. package/dist/esm/fluent/eventForText.js.map +1 -0
  190. package/dist/esm/fluent/events.d.ts +23 -0
  191. package/dist/esm/fluent/events.js +30 -0
  192. package/dist/esm/fluent/events.js.map +1 -0
  193. package/dist/esm/fluent/info.d.ts +10 -0
  194. package/dist/esm/fluent/info.js +19 -0
  195. package/dist/esm/fluent/info.js.map +1 -0
  196. package/dist/esm/fluent/mentions.d.ts +18 -0
  197. package/dist/esm/fluent/mentions.js +27 -0
  198. package/dist/esm/fluent/mentions.js.map +1 -0
  199. package/dist/esm/fluent/recent.d.ts +8 -0
  200. package/dist/esm/fluent/recent.js +13 -0
  201. package/dist/esm/fluent/recent.js.map +1 -0
  202. package/dist/esm/fluent/shares.d.ts +8 -0
  203. package/dist/esm/fluent/shares.js +13 -0
  204. package/dist/esm/fluent/shares.js.map +1 -0
  205. package/dist/esm/fluent/stories.d.ts +8 -0
  206. package/dist/esm/fluent/stories.js +10 -0
  207. package/dist/esm/fluent/stories.js.map +1 -0
  208. package/dist/esm/fluent/topicPages.d.ts +10 -0
  209. package/dist/esm/fluent/topicPages.js +16 -0
  210. package/dist/esm/fluent/topicPages.js.map +1 -0
  211. package/dist/esm/fluent/trends.d.ts +11 -0
  212. package/dist/esm/fluent/trends.js +19 -0
  213. package/dist/esm/fluent/trends.js.map +1 -0
  214. package/dist/esm/helpers/analytics.d.ts +68 -0
  215. package/dist/esm/helpers/analytics.js +86 -0
  216. package/dist/esm/helpers/analytics.js.map +1 -0
  217. package/dist/esm/helpers/articles.d.ts +24 -0
  218. package/dist/esm/helpers/articles.js +26 -0
  219. package/dist/esm/helpers/articles.js.map +1 -0
  220. package/dist/esm/helpers/counts.d.ts +4 -0
  221. package/dist/esm/helpers/counts.js +8 -0
  222. package/dist/esm/helpers/counts.js.map +1 -0
  223. package/dist/esm/helpers/eventForText.d.ts +6 -0
  224. package/dist/esm/helpers/eventForText.js +10 -0
  225. package/dist/esm/helpers/eventForText.js.map +1 -0
  226. package/dist/esm/helpers/events.d.ts +18 -0
  227. package/dist/esm/helpers/events.js +26 -0
  228. package/dist/esm/helpers/events.js.map +1 -0
  229. package/dist/esm/helpers/info.d.ts +6 -0
  230. package/dist/esm/helpers/info.js +14 -0
  231. package/dist/esm/helpers/info.js.map +1 -0
  232. package/dist/esm/helpers/mentions.d.ts +10 -0
  233. package/dist/esm/helpers/mentions.js +17 -0
  234. package/dist/esm/helpers/mentions.js.map +1 -0
  235. package/dist/esm/helpers/recent.d.ts +10 -0
  236. package/dist/esm/helpers/recent.js +14 -0
  237. package/dist/esm/helpers/recent.js.map +1 -0
  238. package/dist/esm/helpers/shares.d.ts +4 -0
  239. package/dist/esm/helpers/shares.js +8 -0
  240. package/dist/esm/helpers/shares.js.map +1 -0
  241. package/dist/esm/helpers/stories.d.ts +7 -0
  242. package/dist/esm/helpers/stories.js +10 -0
  243. package/dist/esm/helpers/stories.js.map +1 -0
  244. package/dist/esm/helpers/topicPages.d.ts +16 -0
  245. package/dist/esm/helpers/topicPages.js +24 -0
  246. package/dist/esm/helpers/topicPages.js.map +1 -0
  247. package/dist/esm/helpers/trends.d.ts +7 -0
  248. package/dist/esm/helpers/trends.js +14 -0
  249. package/dist/esm/helpers/trends.js.map +1 -0
  250. package/dist/esm/helpers/uri.d.ts +42 -0
  251. package/dist/esm/helpers/uri.js +68 -0
  252. package/dist/esm/helpers/uri.js.map +1 -0
  253. package/dist/esm/http.d.ts +18 -0
  254. package/dist/esm/http.js +85 -0
  255. package/dist/esm/http.js.map +1 -0
  256. package/dist/esm/index.d.ts +47 -0
  257. package/dist/esm/index.js +47 -0
  258. package/dist/esm/index.js.map +1 -0
  259. package/dist/esm/info.d.ts +61 -0
  260. package/dist/esm/info.js +108 -0
  261. package/dist/esm/info.js.map +1 -0
  262. package/dist/esm/logger.d.ts +47 -0
  263. package/dist/esm/logger.js +142 -0
  264. package/dist/esm/logger.js.map +1 -0
  265. package/dist/esm/mutex.d.ts +6 -0
  266. package/dist/esm/mutex.js +23 -0
  267. package/dist/esm/mutex.js.map +1 -0
  268. package/dist/esm/package.json +3 -0
  269. package/dist/esm/query.d.ts +50 -0
  270. package/dist/esm/query.js +240 -0
  271. package/dist/esm/query.js.map +1 -0
  272. package/dist/esm/queryArticle.d.ts +61 -0
  273. package/dist/esm/queryArticle.js +111 -0
  274. package/dist/esm/queryArticle.js.map +1 -0
  275. package/dist/esm/queryArticles.d.ts +111 -0
  276. package/dist/esm/queryArticles.js +438 -0
  277. package/dist/esm/queryArticles.js.map +1 -0
  278. package/dist/esm/queryEvent.d.ts +140 -0
  279. package/dist/esm/queryEvent.js +403 -0
  280. package/dist/esm/queryEvent.js.map +1 -0
  281. package/dist/esm/queryEvents.d.ts +201 -0
  282. package/dist/esm/queryEvents.js +545 -0
  283. package/dist/esm/queryEvents.js.map +1 -0
  284. package/dist/esm/queryIterator.d.ts +34 -0
  285. package/dist/esm/queryIterator.js +73 -0
  286. package/dist/esm/queryIterator.js.map +1 -0
  287. package/dist/esm/queryMentions.d.ts +96 -0
  288. package/dist/esm/queryMentions.js +425 -0
  289. package/dist/esm/queryMentions.js.map +1 -0
  290. package/dist/esm/queryStory.d.ts +58 -0
  291. package/dist/esm/queryStory.js +110 -0
  292. package/dist/esm/queryStory.js.map +1 -0
  293. package/dist/esm/recent.d.ts +23 -0
  294. package/dist/esm/recent.js +58 -0
  295. package/dist/esm/recent.js.map +1 -0
  296. package/dist/esm/returnInfo.d.ts +66 -0
  297. package/dist/esm/returnInfo.js +245 -0
  298. package/dist/esm/returnInfo.js.map +1 -0
  299. package/dist/esm/topicPage.d.ts +157 -0
  300. package/dist/esm/topicPage.js +417 -0
  301. package/dist/esm/topicPage.js.map +1 -0
  302. package/dist/esm/topicPages.d.ts +13 -0
  303. package/dist/esm/topicPages.js +18 -0
  304. package/dist/esm/topicPages.js.map +1 -0
  305. package/dist/esm/trends.d.ts +35 -0
  306. package/dist/esm/trends.js +56 -0
  307. package/dist/esm/trends.js.map +1 -0
  308. package/dist/esm/types.d.ts +2555 -0
  309. package/dist/esm/types.js +2 -0
  310. package/dist/esm/types.js.map +1 -0
  311. package/dist/esm/version.d.ts +1 -0
  312. package/dist/esm/version.js +2 -0
  313. package/dist/esm/version.js.map +1 -0
  314. package/package.json +71 -42
  315. package/src/analytics.ts +197 -0
  316. package/src/base.ts +200 -0
  317. package/src/counts.ts +118 -0
  318. package/src/dailyShares.ts +46 -0
  319. package/src/data.ts +310 -0
  320. package/src/eventForText.ts +60 -0
  321. package/src/eventRegistry.ts +1005 -0
  322. package/src/fluent/analytics.ts +84 -0
  323. package/src/fluent/articles.ts +40 -0
  324. package/src/fluent/counts.ts +15 -0
  325. package/src/fluent/eventForText.ts +10 -0
  326. package/src/fluent/events.ts +40 -0
  327. package/src/fluent/info.ts +23 -0
  328. package/src/fluent/mentions.ts +34 -0
  329. package/src/fluent/recent.ts +15 -0
  330. package/src/fluent/shares.ts +15 -0
  331. package/src/fluent/stories.ts +12 -0
  332. package/src/fluent/topicPages.ts +20 -0
  333. package/src/fluent/trends.ts +34 -0
  334. package/src/helpers/analytics.ts +134 -0
  335. package/src/helpers/articles.ts +42 -0
  336. package/src/helpers/counts.ts +19 -0
  337. package/src/helpers/eventForText.ts +16 -0
  338. package/src/helpers/events.ts +43 -0
  339. package/src/helpers/info.ts +31 -0
  340. package/src/helpers/mentions.ts +27 -0
  341. package/src/helpers/recent.ts +22 -0
  342. package/src/helpers/shares.ts +17 -0
  343. package/src/helpers/stories.ts +16 -0
  344. package/src/helpers/topicPages.ts +28 -0
  345. package/src/helpers/trends.ts +36 -0
  346. package/src/helpers/uri.ts +78 -0
  347. package/src/http.ts +110 -0
  348. package/src/index.ts +205 -0
  349. package/src/info.ts +120 -0
  350. package/src/logger.ts +177 -0
  351. package/src/mutex.ts +22 -0
  352. package/src/query.ts +258 -0
  353. package/src/queryArticle.ts +138 -0
  354. package/src/queryArticles.ts +576 -0
  355. package/src/queryEvent.ts +503 -0
  356. package/src/queryEvents.ts +672 -0
  357. package/src/queryIterator.ts +89 -0
  358. package/src/queryMentions.ts +552 -0
  359. package/src/queryStory.ts +152 -0
  360. package/src/recent.ts +73 -0
  361. package/src/returnInfo.ts +372 -0
  362. package/src/topicPage.ts +481 -0
  363. package/src/topicPages.ts +18 -0
  364. package/src/trends.ts +62 -0
  365. package/src/types.ts +2678 -0
  366. package/src/version.ts +1 -0
  367. package/dist/analytics.js +0 -337
  368. package/dist/analytics.js.map +0 -1
  369. package/dist/base.js +0 -262
  370. package/dist/base.js.map +0 -1
  371. package/dist/counts.js +0 -163
  372. package/dist/counts.js.map +0 -1
  373. package/dist/dailyShares.js +0 -91
  374. package/dist/dailyShares.js.map +0 -1
  375. package/dist/data.js.map +0 -1
  376. package/dist/eventForText.js +0 -127
  377. package/dist/eventForText.js.map +0 -1
  378. package/dist/eventRegistry.js +0 -1099
  379. package/dist/eventRegistry.js.map +0 -1
  380. package/dist/index.d.ts +0 -21
  381. package/dist/index.js.map +0 -1
  382. package/dist/info.js +0 -172
  383. package/dist/info.js.map +0 -1
  384. package/dist/logger.js +0 -144
  385. package/dist/logger.js.map +0 -1
  386. package/dist/query.js +0 -334
  387. package/dist/query.js.map +0 -1
  388. package/dist/queryArticle.js +0 -184
  389. package/dist/queryArticle.js.map +0 -1
  390. package/dist/queryArticles.js +0 -730
  391. package/dist/queryArticles.js.map +0 -1
  392. package/dist/queryEvent.js +0 -588
  393. package/dist/queryEvent.js.map +0 -1
  394. package/dist/queryEvents.js +0 -826
  395. package/dist/queryEvents.js.map +0 -1
  396. package/dist/queryMentions.js +0 -638
  397. package/dist/queryMentions.js.map +0 -1
  398. package/dist/queryStory.js +0 -195
  399. package/dist/queryStory.js.map +0 -1
  400. package/dist/recent.js +0 -200
  401. package/dist/recent.js.map +0 -1
  402. package/dist/returnInfo.js +0 -333
  403. package/dist/returnInfo.js.map +0 -1
  404. package/dist/topicPage.js +0 -600
  405. package/dist/topicPage.js.map +0 -1
  406. package/dist/trends.js +0 -116
  407. package/dist/trends.js.map +0 -1
  408. package/dist/types.js.map +0 -1
  409. /package/dist/{counts.d.ts → cjs/counts.d.ts} +0 -0
  410. /package/dist/{dailyShares.d.ts → cjs/dailyShares.d.ts} +0 -0
  411. /package/dist/{data.js → cjs/data.js} +0 -0
  412. /package/dist/{info.d.ts → cjs/info.d.ts} +0 -0
  413. /package/dist/{types.js → cjs/types.js} +0 -0
@@ -0,0 +1,2555 @@
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
+ * @default "https://eventregistry.org"
48
+ */
49
+ host?: string;
50
+ /**
51
+ * Host address to use to perform the analytics api calls.
52
+ * @default "https://analytics.eventregistry.org"
53
+ */
54
+ hostAnalytics?: string;
55
+ /**
56
+ * Log all requests.
57
+ */
58
+ logging?: boolean;
59
+ /**
60
+ * The minimum number of seconds between individual api calls.
61
+ * @default 0.5
62
+ */
63
+ minDelayBetweenRequests?: number;
64
+ /**
65
+ * If a request fails (for example, because ER is down),
66
+ * what is the max number of times the request should be repeated.
67
+ * @default -1
68
+ */
69
+ repeatFailedRequestCount?: number;
70
+ /**
71
+ * If true, additional info about errors etc. will be printed to console.
72
+ */
73
+ verboseOutput?: 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?: ("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)[] | undefined;
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)[] | undefined;
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 interface RequestArticlesRecentActivityParameters {
990
+ maxArticleCount?: number;
991
+ updatesAfterNewsUri?: string;
992
+ updatesafterBlogUri?: string;
993
+ updatesAfterPrUri?: string;
994
+ updatesAfterTm?: string | Date;
995
+ updatesAfterMinsAgo?: number;
996
+ updatesUntilTm?: string | Date;
997
+ updatesUntilMinsAgo?: number;
998
+ mandatorySourceLocation?: boolean;
999
+ returnInfo?: ReturnInfo;
1000
+ }
1001
+ export namespace Aggr {
1002
+ namespace Source {
1003
+ interface CountsPerSource {
1004
+ source: ER.Source;
1005
+ counts: {
1006
+ frequency: number;
1007
+ total: number;
1008
+ };
1009
+ }
1010
+ interface CountsPerCountry {
1011
+ uri: string;
1012
+ type: string;
1013
+ frequency: number;
1014
+ }
1015
+ }
1016
+ }
1017
+ export namespace QueryArticles {
1018
+ interface Arguments {
1019
+ /**
1020
+ * Find articles that mention the specified keywords.
1021
+ * A single keyword/phrase can be provided as a string, multiple keywords/phrases can be provided as a list of strings.
1022
+ * Use QueryItems.AND() if *all* provided keywords/phrases should be mentioned, or QueryItems.OR() if *any* of the keywords/phrases should be mentioned.
1023
+ * or QueryItems.OR() to specify a list of keywords where any of the keywords have to appear
1024
+ */
1025
+ keywords?: string | string[] | QueryItems;
1026
+ /**
1027
+ * Find articles where the concept with concept uri is mentioned.
1028
+ * A single concept uri can be provided as a string, multiple concept uris can be provided as a list of strings.
1029
+ * Use QueryItems.AND() if *all* provided concepts should be mentioned, or QueryItems.OR() if *any* of the concepts should be mentioned.
1030
+ * To obtain a concept uri using a concept label use EventRegistry.getConceptUri().
1031
+ */
1032
+ conceptUri?: string | string[] | QueryItems;
1033
+ /**
1034
+ * Find articles that are assigned into a particular category.
1035
+ * A single category can be provided as a string, while multiple categories can be provided as a list in QueryItems.AND() or QueryItems.OR().
1036
+ * A category uri can be obtained from a category name using EventRegistry.getCategoryUri().
1037
+ */
1038
+ categoryUri?: string | string[] | QueryItems;
1039
+ /**
1040
+ * find articles that were written by a news source sourceUri.
1041
+ * If multiple sources should be considered use QueryItems.OR() to provide the list of sources.
1042
+ * Source uri for a given news source name can be obtained using EventRegistry.getNewsSourceUri().
1043
+ */
1044
+ sourceUri?: string | string[] | QueryItems;
1045
+ /**
1046
+ * Find articles that were written by news sources located in the given geographic location.
1047
+ * If multiple source locations are provided, then put them into a list inside QueryItems.OR()
1048
+ * Location uri can either be a city or a country. Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1049
+ */
1050
+ sourceLocationUri?: string | string[] | QueryItems;
1051
+ /**
1052
+ * Find articles that were written by news sources that are assigned to the specified source group.
1053
+ * If multiple source groups are provided, then put them into a list inside QueryItems.OR()
1054
+ * Source group uri for a given name can be obtained using EventRegistry.getSourceGroupUri().
1055
+ */
1056
+ sourceGroupUri?: string | string[] | QueryItems;
1057
+ /**
1058
+ * Find articles that were written by a specific author.
1059
+ * If multiple authors should be considered use QueryItems.OR() to provide the list of authors.
1060
+ * Author uri for a given author name can be obtained using EventRegistry.getAuthorUri().
1061
+ */
1062
+ authorUri?: string | string[] | QueryItems;
1063
+ /**
1064
+ * Find articles that describe something that occurred at a particular location.
1065
+ * If value can be a string or a list of strings provided in QueryItems.OR().
1066
+ * Location uri can either be a city or a country. Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1067
+ */
1068
+ locationUri?: string | string[] | QueryItems;
1069
+ /**
1070
+ * find articles that are written in the specified language.
1071
+ * If more than one language is specified, resulting articles has to be written in *any* of the languages.
1072
+ */
1073
+ lang?: string | string[];
1074
+ /**
1075
+ * Find articles that were written on or after dateStart. Date should be provided in YYYY-MM-DD format.
1076
+ */
1077
+ dateStart?: string | Date;
1078
+ /**
1079
+ * Find articles that occurred before or on dateEnd. Date should be provided in YYYY-MM-DD format.
1080
+ */
1081
+ dateEnd?: string | Date;
1082
+ /**
1083
+ * Find articles that explicitly mention a date that is equal or greater than dateMentionStart.
1084
+ */
1085
+ dateMentionStart?: string | Date;
1086
+ /**
1087
+ * Find articles that explicitly mention a date that is lower or equal to dateMentionEnd.
1088
+ */
1089
+ dateMentionEnd?: string | Date;
1090
+ /**
1091
+ * Ignore articles that mention all provided keywords.
1092
+ */
1093
+ ignoreKeywords?: string | string[] | QueryItems;
1094
+ /**
1095
+ * Ignore articles that mention all provided concepts.
1096
+ */
1097
+ ignoreConceptUri?: string | string[] | QueryItems;
1098
+ /**
1099
+ * Ignore articles that are assigned to a particular category.
1100
+ */
1101
+ ignoreCategoryUri?: string | string[] | QueryItems;
1102
+ /**
1103
+ * Ignore articles that have been written by *any* of the specified news sources.
1104
+ */
1105
+ ignoreSourceUri?: string | string[] | QueryItems;
1106
+ /**
1107
+ * Ignore articles that have been written by sources located at *any* of the specified locations.
1108
+ */
1109
+ ignoreSourceLocationUri?: string | string[] | QueryItems;
1110
+ /**
1111
+ * Ignore articles that have been written by sources in *any* of the specified source groups.
1112
+ */
1113
+ ignoreSourceGroupUri?: string | string[] | QueryItems;
1114
+ /**
1115
+ * Ignore articles that were written by *any* of the specified authors.
1116
+ */
1117
+ ignoreAuthorUri?: string | string[] | QueryItems;
1118
+ /**
1119
+ * Ignore articles that occurred in any of the provided locations. A location can be a city or a place.
1120
+ */
1121
+ ignoreLocationUri?: string | string[] | QueryItems;
1122
+ /**
1123
+ * Ignore articles that are written in *any* of the provided languages.
1124
+ */
1125
+ ignoreLang?: string | string[] | QueryItems;
1126
+ /**
1127
+ * Where should we look when searching using the keywords provided by "keywords" parameter. "body" (default), "title", or "body,title".
1128
+ */
1129
+ keywordsLoc?: "body" | "title" | "body,title";
1130
+ keywordSearchMode?: "simple" | "exact" | "phrase";
1131
+ /**
1132
+ * Where should we look when data should be used when searching using the keywords provided by "ignoreKeywords" parameter. "body" (default), "title", or "body,title".
1133
+ */
1134
+ ignoreKeywordsLoc?: "body" | "title" | "body,title";
1135
+ ignoreKeywordSearchMode?: "simple" | "exact" | "phrase";
1136
+ /**
1137
+ * Some articles can be duplicates of other articles. What should be done with them. Possible values are:
1138
+ * "skipDuplicates" (skip the resulting articles that are duplicates of other articles)
1139
+ * "keepOnlyDuplicates" (return only the duplicate articles)
1140
+ * "keepAll" (no filtering, default)
1141
+ */
1142
+ isDuplicateFilter?: "skipDuplicates" | "keepOnlyDuplicates" | "keepAll";
1143
+ /**
1144
+ * Some articles are later copied by others. What should be done with such articles. Possible values are:
1145
+ * "skipHasDuplicates" (skip the resulting articles that have been later copied by others)
1146
+ * "keepOnlyHasDuplicates" (return only the articles that have been later copied by others)
1147
+ * "keepAll" (no filtering, default)
1148
+ */
1149
+ hasDuplicateFilter?: "skipHasDuplicates" | "keepOnlyHasDuplicates" | "keepAll";
1150
+ /**
1151
+ * Some articles describe a known event and some don't. This filter allows you to filter the resulting articles based on this criteria.
1152
+ * Possible values are:
1153
+ * "skipArticlesWithoutEvent" (skip articles that are not describing any known event in ER)
1154
+ * "keepOnlyArticlesWithoutEvent" (return only the articles that are not describing any known event in ER)
1155
+ * "keepAll" (no filtering, default)
1156
+ */
1157
+ eventFilter?: "skipArticlesWithoutEvent" | "keepOnlyArticlesWithoutEvent" | "keepAll";
1158
+ /**
1159
+ * Some articles have an extracted author and some don't. What should be done with them. Possible values are:
1160
+ * "skipIfHasAuthors" (skip articles for which we have identified the author)
1161
+ * "keepOnlyIfHasAuthors" (return only articles for which we have extracted the author)
1162
+ * "keepAll" (no filtering, default)
1163
+ */
1164
+ authorsFilter?: "skipIfHasAuthors" | "keepOnlyIfHasAuthors" | "keepAll";
1165
+ /**
1166
+ * Some articles contain a link to a video and some don't. What should be done with them. Possible values are:
1167
+ * "skipIfHasVideos" (skip articles that contain a link to a video)
1168
+ * "keepOnlyIfHasVideos" (return only articles that contain a link to a video)
1169
+ * "keepAll" (no filtering, default)
1170
+ */
1171
+ videosFilter?: "skipIfHasVideos" | "keepOnlyIfHasVideos" | "keepAll";
1172
+ /**
1173
+ * Some articles contain links to other URLs and some don't. What should be done with them. Possible values are:
1174
+ * "skipIfHasLinks" (skip articles that contain one or more links)
1175
+ * "keepOnlyIfHasLinks" (return only articles that contain a link to other URLs)
1176
+ * "keepAll" (no filtering, default)
1177
+ */
1178
+ linksFilter?: "skipIfHasLinks" | "keepOnlyIfHasLinks" | "keepAll";
1179
+ /**
1180
+ * Starting percentile of the sources to consider in the results (default: 0). Value should be in range 0-90 and divisible by 10.
1181
+ */
1182
+ startSourceRankPercentile?: number;
1183
+ /**
1184
+ * Ending percentile of the sources to consider in the results (default: 100). Value should be in range 10-100 and divisible by 10.
1185
+ */
1186
+ endSourceRankPercentile?: number;
1187
+ /**
1188
+ * 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)
1189
+ */
1190
+ minSentiment?: number;
1191
+ /**
1192
+ * 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)
1193
+ */
1194
+ maxSentiment?: number;
1195
+ /**
1196
+ * what data types should we search? "news" (news content, default), "pr" (press releases), or "blogs".
1197
+ * If you want to use multiple data types, put them in an array (e.g. ["news", "pr"])
1198
+ */
1199
+ dataType?: ER.DataType[] | ER.DataType;
1200
+ /**
1201
+ * The information to return as the result of the query. By default return the list of matching articles.
1202
+ */
1203
+ requestedResult?: RequestArticles;
1204
+ }
1205
+ interface IteratorArguments extends Arguments {
1206
+ /**
1207
+ * how should the resulting articles be sorted. Options: "rel" (relevance), "date" (published date), "sourceImportance", "sourceImportanceRank", "sourceAlexaGlobalRank", "sourceAlexaCountryRank", "socialScore", "facebookShares"
1208
+ */
1209
+ sortBy?: string;
1210
+ /**
1211
+ * should the results be sorted in ascending order (true) or descending (false)
1212
+ */
1213
+ sortByAsc?: boolean;
1214
+ /**
1215
+ * what details should be included in the returned information
1216
+ */
1217
+ returnInfo?: ReturnInfo;
1218
+ /**
1219
+ * maximum number of items to be returned. Used to stop iteration sooner than results run out
1220
+ */
1221
+ maxItems?: number;
1222
+ }
1223
+ }
1224
+ export namespace QueryEvent {
1225
+ /**
1226
+ * Sorting options:
1227
+ * - undefined (no specific sorting),
1228
+ * - id (internal id), date (published date),
1229
+ * - cosSim (closeness to event centroid),
1230
+ * - sourceImportance (manually curated score of source importance - high value,
1231
+ * - high importance), sourceImportanceRank (reverse of sourceImportance),
1232
+ * - sourceAlexaGlobalRank (global rank of the news source),
1233
+ * - sourceAlexaCountryRank (country rank of the news source),
1234
+ * - socialScore (total shares on social media),
1235
+ * - facebookShares (shares on Facebook only)
1236
+ */
1237
+ type SortByOptions = "id" | "date" | "cosSim" | "sourceImportance" | "sourceImportanceRank" | "sourceAlexaGlobalRank" | "sourceAlexaCountryRank" | "socialScore" | "facebookShares";
1238
+ type RequestEvent = Record<string, never>;
1239
+ interface IteratorArguments {
1240
+ /**
1241
+ * Array or a single language in which to return the list of matching articles
1242
+ */
1243
+ lang?: string | string[];
1244
+ /**
1245
+ * Order in which event articles are sorted.
1246
+ */
1247
+ sortBy?: SortByOptions;
1248
+ /**
1249
+ * Should the results be sorted in ascending order (True) or descending (False)
1250
+ */
1251
+ sortByAsc?: boolean;
1252
+ /**
1253
+ * What details should be included in the returned information
1254
+ */
1255
+ returnInfo?: ReturnInfo;
1256
+ /**
1257
+ * Number of articles to download at once (we are not downloading article by article) (at most 100)
1258
+ */
1259
+ articleBatchSize?: number;
1260
+ /**
1261
+ * Maximum number of items to be returned. Used to stop iteration sooner than results run out
1262
+ */
1263
+ maxItems?: number;
1264
+ keywords?: string | string[] | QueryItems;
1265
+ conceptUri?: string | string[] | QueryItems;
1266
+ categoryUri?: string | string[] | QueryItems;
1267
+ sourceUri?: string | string[] | QueryItems;
1268
+ sourceLocationUri?: string | string[] | QueryItems;
1269
+ sourceGroupUri?: string | string[] | QueryItems;
1270
+ authorUri?: string | string[] | QueryItems;
1271
+ locationUri?: string | string[] | QueryItems;
1272
+ dateStart?: string | Date;
1273
+ dateEnd?: string | Date;
1274
+ dateMentionStart?: string | Date;
1275
+ dateMentionEnd?: string | Date;
1276
+ keywordsLoc?: "body" | "title" | "body,title";
1277
+ keywordSearchMode?: "simple" | "exact" | "phrase";
1278
+ startSourceRankPercentile?: number;
1279
+ endSourceRankPercentile?: number;
1280
+ /**
1281
+ * 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)
1282
+ */
1283
+ minSentiment?: number;
1284
+ /**
1285
+ * 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)
1286
+ */
1287
+ maxSentiment?: number;
1288
+ }
1289
+ interface RequestEventArticlesArguments {
1290
+ /**
1291
+ * page of the articles to return (1, 2, ...)
1292
+ */
1293
+ page?: number;
1294
+ /**
1295
+ * number of articles to return per page (at most 200)
1296
+ */
1297
+ count?: number;
1298
+ /**
1299
+ * a single language or an array of languages in which to return the articles
1300
+ */
1301
+ lang?: string | string[];
1302
+ /**
1303
+ * order in which event articles are sorted.
1304
+ */
1305
+ sortBy?: SortByOptions;
1306
+ /**
1307
+ * should the articles be sorted in ascending order (True) or descending (False) based on sortBy value
1308
+ */
1309
+ sortByAsc?: boolean;
1310
+ /**
1311
+ * what details should be included in the returned information
1312
+ */
1313
+ returnInfo?: ReturnInfo;
1314
+ keywords?: string | string[] | QueryItems;
1315
+ conceptUri?: string | string[] | QueryItems;
1316
+ categoryUri?: string | string[] | QueryItems;
1317
+ sourceUri?: string | string[] | QueryItems;
1318
+ sourceLocationUri?: string | string[] | QueryItems;
1319
+ sourceGroupUri?: string | string[] | QueryItems;
1320
+ authorUri?: string | string[] | QueryItems;
1321
+ locationUri?: string | string[] | QueryItems;
1322
+ dateStart?: string | Date;
1323
+ dateEnd?: string | Date;
1324
+ dateMentionStart?: string | Date;
1325
+ dateMentionEnd?: string | Date;
1326
+ keywordsLoc?: "body" | "title" | "body,title";
1327
+ startSourceRankPercentile?: number;
1328
+ endSourceRankPercentile?: number;
1329
+ }
1330
+ interface RequestEventArticleUriWgtsArguments {
1331
+ /**
1332
+ * a single language or an array of languages in which to return the articles
1333
+ */
1334
+ lang?: string | string[];
1335
+ /**
1336
+ * order in which event articles are sorted.
1337
+ */
1338
+ sortBy?: SortByOptions;
1339
+ /**
1340
+ * should the articles be sorted in ascending order (True) or descending (False) based on sortBy value
1341
+ */
1342
+ sortByAsc?: boolean;
1343
+ }
1344
+ interface RequestEventArticleTrendArguments {
1345
+ /**
1346
+ * languages for which to compute the trends
1347
+ */
1348
+ lang?: string | string[];
1349
+ /**
1350
+ * page of the articles for which to return information (1, 2, ...)
1351
+ */
1352
+ page?: number;
1353
+ /**
1354
+ * number of articles returned per page (at most 200)
1355
+ */
1356
+ count?: number;
1357
+ /**
1358
+ * ignore articles that have cos similarity to centroid lower than the specified value (-1 for no limit)
1359
+ */
1360
+ minArticleCosSim?: number;
1361
+ /**
1362
+ * what details should be included in the returned information
1363
+ */
1364
+ returnInfo?: ReturnInfo;
1365
+ }
1366
+ interface RequestEventSimilarEventsArguments {
1367
+ /**
1368
+ * array of concepts and their importance, e.g. [{ "uri": "http://en.wikipedia.org/wiki/Barack_Obama", "wgt": 100 }, ...]
1369
+ */
1370
+ conceptInfoList?: {
1371
+ uri: string;
1372
+ wgt: number;
1373
+ }[];
1374
+ /**
1375
+ * number of similar events to return (at most 50)
1376
+ */
1377
+ count?: number;
1378
+ dateStart?: string;
1379
+ dateEnd?: string;
1380
+ /**
1381
+ * for the returned events compute how they were trending (intensity of reporting) in different time periods
1382
+ */
1383
+ addArticleTrendInfo?: boolean;
1384
+ /**
1385
+ * time span that is used as a unit when computing the trending info
1386
+ */
1387
+ aggrHours?: number;
1388
+ /**
1389
+ * include also the tested event in the results (True or False)
1390
+ */
1391
+ includeSelf?: boolean;
1392
+ /**
1393
+ * what details should be included in the returned information
1394
+ */
1395
+ returnInfo?: ReturnInfo;
1396
+ }
1397
+ interface RequestEventSimilarStoriesArguments {
1398
+ /**
1399
+ * array of concepts and their importance, e.g. [{ "uri": "http://en.wikipedia.org/wiki/Barack_Obama", "wgt": 100 }, ...]
1400
+ */
1401
+ conceptInfoList?: {
1402
+ uri: string;
1403
+ wgt: number;
1404
+ }[];
1405
+ /**
1406
+ * number of similar stories to return (at most 5')
1407
+ */
1408
+ count?: number;
1409
+ /**
1410
+ * in what language(s) should be the returned stories
1411
+ */
1412
+ lang?: string | string[];
1413
+ /**
1414
+ * maximum difference in days between the returned stories and the tested event
1415
+ */
1416
+ maxDayDiff?: number;
1417
+ /**
1418
+ * what details should be included in the returned information
1419
+ */
1420
+ returnInfo?: ReturnInfo;
1421
+ }
1422
+ }
1423
+ export namespace QueryMentions {
1424
+ interface Arguments {
1425
+ eventTypeUri?: string | string[] | QueryItems;
1426
+ keywords?: string | string[] | QueryItems;
1427
+ conceptUri?: string | string[] | QueryItems;
1428
+ categoryUri?: string | string[] | QueryItems;
1429
+ sourceUri?: string | string[] | QueryItems;
1430
+ sourceLocationUri?: string | string[] | QueryItems;
1431
+ sourceGroupUri?: string | string[] | QueryItems;
1432
+ industryUri?: string | string[] | QueryItems;
1433
+ sdgUri?: string | string[] | QueryItems;
1434
+ sasbUri?: string | string[] | QueryItems;
1435
+ esgUri?: string | string[] | QueryItems;
1436
+ locationUri?: string | string[] | QueryItems;
1437
+ lang?: string | string[];
1438
+ dateStart?: string | Date;
1439
+ dateEnd?: string | Date;
1440
+ ignoreEventTypeUri?: string | string[] | QueryItems;
1441
+ ignoreKeywords?: string | string[] | QueryItems;
1442
+ ignoreConceptUri?: string | string[] | QueryItems;
1443
+ ignoreCategoryUri?: string | string[] | QueryItems;
1444
+ ignoreSourceUri?: string | string[] | QueryItems;
1445
+ ignoreSourceLocationUri?: string | string[] | QueryItems;
1446
+ ignoreSourceGroupUri?: string | string[] | QueryItems;
1447
+ ignoreIndustryUri?: string | string[] | QueryItems;
1448
+ ignoreSdgUri?: string | string[] | QueryItems;
1449
+ ignoreSasbUri?: string | string[] | QueryItems;
1450
+ ignoreEsgUri?: string | string[] | QueryItems;
1451
+ ignoreLocationUri?: string | string[] | QueryItems;
1452
+ ignoreLang?: string | string[];
1453
+ showDuplicates?: boolean;
1454
+ startSourceRankPercentile?: number;
1455
+ endSourceRankPercentile?: number;
1456
+ minSentiment?: number;
1457
+ maxSentiment?: number;
1458
+ minSentenceIndex?: number;
1459
+ maxSentenceIndex?: number;
1460
+ requestedResult?: RequestMentions;
1461
+ }
1462
+ interface IteratorArguments extends Arguments {
1463
+ /**
1464
+ * how should the resulting mentions be sorted. Options: "none", "rel" (relevance), "date" (published date), "size", "socialScore"
1465
+ */
1466
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1467
+ /**
1468
+ * should the results be sorted in ascending order (true) or descending (false)
1469
+ */
1470
+ sortByAsc?: boolean;
1471
+ /**
1472
+ * what details should be included in the returned information
1473
+ */
1474
+ returnInfo?: ReturnInfo;
1475
+ /**
1476
+ * maximum number of items to be returned. Used to stop iteration sooner than results run out
1477
+ */
1478
+ maxItems?: number;
1479
+ }
1480
+ interface RequestMentionsInfoArguments {
1481
+ /**
1482
+ * page of the results to return (1, 2, ...)
1483
+ */
1484
+ page?: number;
1485
+ /**
1486
+ * number of results to return per page
1487
+ */
1488
+ count?: number;
1489
+ /**
1490
+ * how mentions should be sorted
1491
+ */
1492
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1493
+ /**
1494
+ * should the results be sorted in ascending order (true) or descending (false)
1495
+ */
1496
+ sortByAsc?: boolean;
1497
+ /**
1498
+ * what details should be included in the returned information
1499
+ */
1500
+ returnInfo?: ReturnInfo;
1501
+ }
1502
+ interface RequestMentionsUriWgtListArguments {
1503
+ /**
1504
+ * page of the results to return (1, 2, ...)
1505
+ */
1506
+ page?: number;
1507
+ /**
1508
+ * number of results to return per page
1509
+ */
1510
+ count?: number;
1511
+ /**
1512
+ * how should the resulting events be sorted. Options:
1513
+ * - none (no specific sorting),
1514
+ * - date (by event date),
1515
+ * - rel (relevance to the query),
1516
+ * - size (number of articles),
1517
+ * - socialScore (amount of shares in social media)
1518
+ */
1519
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1520
+ /**
1521
+ * should the results be sorted in ascending order (true) or descending (false)
1522
+ */
1523
+ sortByAsc?: boolean;
1524
+ }
1525
+ interface RequestMentionsConceptAggrArguments {
1526
+ /**
1527
+ * number of top concepts to return
1528
+ */
1529
+ conceptCount?: number;
1530
+ /**
1531
+ * on what sample of results should the aggregate be computed
1532
+ */
1533
+ mentionsSampleSize?: number;
1534
+ /**
1535
+ * what details about the concepts should be included in the returned information
1536
+ */
1537
+ returnInfo?: ReturnInfo;
1538
+ /**
1539
+ * how should the top concepts be computed. Possible values are
1540
+ * "importance" (takes into account how frequently a concept is mentioned and how relevant it is in an mention),
1541
+ * "frequency" (ranks the concepts simply by how frequently the concept is mentioned in the results) and
1542
+ * "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)
1543
+ */
1544
+ conceptScoring?: "importance" | "frequency" | "uniqueness";
1545
+ /**
1546
+ * if you wish to limit the number of top concepts per type (person, org, loc, wiki) then set this to some number.
1547
+ * If you want to get equal number of concepts for each type then set conceptCountPerType to conceptCount/4 (since there are 4 concept types)
1548
+ */
1549
+ conceptCountPerType?: number;
1550
+ }
1551
+ interface RequestMentionsCategoryAggrArguments {
1552
+ mentionsSampleSize?: number;
1553
+ returnInfo?: ReturnInfo;
1554
+ }
1555
+ interface RequestMentionsSourceAggrArguments {
1556
+ sourceCount?: number;
1557
+ normalizeBySourceArts?: boolean;
1558
+ returnInfo?: ReturnInfo;
1559
+ }
1560
+ interface RequestMentionsKeywordAggrArguments {
1561
+ mentionsSampleSize?: number;
1562
+ }
1563
+ interface RequestMentionsConceptGraphArguments {
1564
+ /**
1565
+ * number of top sources to return
1566
+ */
1567
+ conceptCount?: number;
1568
+ linkCount?: number;
1569
+ /**
1570
+ * on what sample of results should the aggregate be computed
1571
+ */
1572
+ mentionsSampleSize?: number;
1573
+ /**
1574
+ * what details about the concepts should be included in the returned information
1575
+ */
1576
+ returnInfo?: ReturnInfo;
1577
+ skipQueryConcepts?: boolean;
1578
+ }
1579
+ interface RequestMentionsRecentActivityArguments {
1580
+ /**
1581
+ * max mentions to return
1582
+ */
1583
+ maxMentionCount?: number;
1584
+ updatesAfterUri?: string;
1585
+ /**
1586
+ * the time after which the events were added/updated (returned by previous call to the same method)
1587
+ */
1588
+ updatesAfterTm?: string | Date;
1589
+ /**
1590
+ * how many minutes into the past should we check (set either this or updatesAfterTm property, but not both)
1591
+ */
1592
+ updatesAfterMinsAgo?: number;
1593
+ updatesUntilTm?: string | Date;
1594
+ updatesUntilMinsAgo?: number;
1595
+ /**
1596
+ * return only events that have a geographic location assigned to them
1597
+ */
1598
+ mandatorySourceLocation?: boolean;
1599
+ /**
1600
+ * what details should be included in the returned information
1601
+ */
1602
+ returnInfo?: ReturnInfo;
1603
+ }
1604
+ }
1605
+ export namespace QueryEvents {
1606
+ interface Arguments {
1607
+ /**
1608
+ * find events where articles mention all the specified keywords.
1609
+ * A single keyword/phrase can be provided as a string,
1610
+ * multiple keywords/phrases can be provided as a list of strings.
1611
+ * Use QueryItems.AND() if *all* provided keywords/phrases should be mentioned,
1612
+ * or QueryItems.OR() if *any* of the keywords/phrases should be mentioned.
1613
+ */
1614
+ keywords?: string | string[] | QueryItems;
1615
+ /**
1616
+ * find events where the concept with concept uri is important.
1617
+ * A single concept uri can be provided as a string, multiple concept uris
1618
+ * can be provided as a list of strings.
1619
+ * Use QueryItems.AND() if *all* provided concepts should be mentioned, or QueryItems.OR()
1620
+ * if *any* of the concepts should be mentioned.
1621
+ * To obtain a concept uri using a concept label use EventRegistry.getConceptUri().
1622
+ */
1623
+ conceptUri?: string | string[] | QueryItems;
1624
+ /**
1625
+ * find events that are assigned into a particular category.
1626
+ * A single category uri can be provided as a string, multiple category uris
1627
+ * can be provided as a list of strings.
1628
+ * Use QueryItems.AND() if *all* provided categories should be mentioned, or QueryItems.OR()
1629
+ * if *any* of the categories should be mentioned.
1630
+ * A category uri can be obtained from a category name using EventRegistry.getCategoryUri().
1631
+ */
1632
+ categoryUri?: string | string[] | QueryItems;
1633
+ /**
1634
+ * find events that contain one or more articles that have been written by a news source sourceUri.
1635
+ * If multiple sources should be considered use QueryItems.OR() to provide the list of sources.
1636
+ * Source uri for a given news source name can be obtained using EventRegistry.getNewsSourceUri().
1637
+ */
1638
+ sourceUri?: string | string[] | QueryItems;
1639
+ /**
1640
+ * find events that contain one or more articles that were written
1641
+ * by news sources located in the given geographic location.
1642
+ * If multiple source locations are provided, then put them into a list inside QueryItems.OR()
1643
+ * Location uri can either be a city or a country.
1644
+ * Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1645
+ */
1646
+ sourceLocationUri?: string | string[] | QueryItems;
1647
+ /**
1648
+ * find events that contain one or more articles that were written
1649
+ * by news sources that are assigned to the specified source group.
1650
+ * If multiple source groups are provided, then put them into a list inside QueryItems.OR()
1651
+ * Source group uri for a given name can be obtained using EventRegistry.getSourceGroupUri().
1652
+ */
1653
+ sourceGroupUri?: string | string[] | QueryItems;
1654
+ /**
1655
+ * find events that contain one or more articles that have been written by a specific author.
1656
+ * If multiple authors should be considered use QueryItems.OR() or QueryItems.AND() to provide the list of authors.
1657
+ * Author uri for a given author name can be obtained using EventRegistry.getAuthorUri().
1658
+ */
1659
+ authorUri?: string | string[] | QueryItems;
1660
+ /**
1661
+ * find events that occurred at a particular location.
1662
+ * If value can be a string or a list of strings provided in QueryItems.OR().
1663
+ * Location uri can either be a city or a country.
1664
+ * Location uri for a given name can be obtained using EventRegistry.getLocationUri().
1665
+ */
1666
+ locationUri?: string | string[] | QueryItems;
1667
+ /**
1668
+ * find events for which we found articles in the specified language.
1669
+ * If more than one language is specified, resulting events has to be reported in *any* of the languages.
1670
+ */
1671
+ lang?: string | string[];
1672
+ /**
1673
+ * find events that occurred on or after dateStart. Date should be provided in YYYY-MM-DD format.
1674
+ */
1675
+ dateStart?: string | Date;
1676
+ /**
1677
+ * find events that occurred before or on dateEnd. Date should be provided in YYYY-MM-DD format.
1678
+ */
1679
+ dateEnd?: string | Date;
1680
+ /**
1681
+ * 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.
1682
+ */
1683
+ reportingDateStart?: string | Date;
1684
+ /**
1685
+ * 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.
1686
+ */
1687
+ reportingDateEnd?: string | Date;
1688
+ /**
1689
+ * 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)
1690
+ */
1691
+ minSentiment?: number;
1692
+ /**
1693
+ * 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)
1694
+ */
1695
+ maxSentiment?: number;
1696
+ /**
1697
+ * find events that have been reported in at least minArticlesInEvent articles (regardless of language)
1698
+ */
1699
+ minArticlesInEvent?: number;
1700
+ /**
1701
+ * find events that have not been reported in more than maxArticlesInEvent articles (regardless of language)
1702
+ */
1703
+ maxArticlesInEvent?: number;
1704
+ /**
1705
+ * find events where articles explicitly mention a date that is equal or greater than dateMentionStart.
1706
+ */
1707
+ dateMentionStart?: string | Date;
1708
+ /**
1709
+ * find events where articles explicitly mention a date that is lower or equal to dateMentionEnd.
1710
+ */
1711
+ dateMentionEnd?: string | Date;
1712
+ /**
1713
+ * ignore events where articles about the event mention any of the provided keywords
1714
+ */
1715
+ ignoreKeywords?: string | string[] | QueryItems;
1716
+ /**
1717
+ * ignore events that are about any of the provided concepts
1718
+ */
1719
+ ignoreConceptUri?: string | string[] | QueryItems;
1720
+ /**
1721
+ * ignore events that are about any of the provided categories
1722
+ */
1723
+ ignoreCategoryUri?: string | string[] | QueryItems;
1724
+ /**
1725
+ * ignore events that have have articles which have been written by any of the specified news sources
1726
+ */
1727
+ ignoreSourceUri?: string | string[] | QueryItems;
1728
+ /**
1729
+ * ignore events that have articles which been written by sources located at *any* of the specified locations
1730
+ */
1731
+ ignoreSourceLocationUri?: string | string[] | QueryItems;
1732
+ /**
1733
+ * ignore events that have articles which have been written by sources in *any* of the specified source groups
1734
+ */
1735
+ ignoreSourceGroupUri?: string | string[] | QueryItems;
1736
+ /**
1737
+ * ignore articles that were written by *any* of the specified authors
1738
+ */
1739
+ ignoreAuthorUri?: string | string[] | QueryItems;
1740
+ /**
1741
+ * ignore events that occurred in any of the provided locations. A location can be a city or a place
1742
+ */
1743
+ ignoreLocationUri?: string | string[] | QueryItems;
1744
+ /**
1745
+ * ignore events that are reported in any of the provided languages
1746
+ */
1747
+ ignoreLang?: string | string[];
1748
+ /**
1749
+ * what data should be used when searching using the keywords provided by "keywords" parameter.
1750
+ */
1751
+ keywordsLoc?: "body" | "title" | "body,title";
1752
+ /**
1753
+ * what data should be used when searching using the keywords provided by "ignoreKeywords" parameter.
1754
+ */
1755
+ ignoreKeywordsLoc?: "body" | "title" | "body,title";
1756
+ keywordSearchMode?: "simple" | "exact" | "phrase";
1757
+ ignoreKeywordSearchMode?: "simple" | "exact" | "phrase";
1758
+ /**
1759
+ * when a category is specified using categoryUri, should also all subcategories be included?
1760
+ */
1761
+ categoryIncludeSub?: boolean;
1762
+ /**
1763
+ * when a category is specified using ignoreCategoryUri, should also all subcategories be included?
1764
+ */
1765
+ ignoreCategoryIncludeSub?: boolean;
1766
+ /**
1767
+ * the information to return as the result of the query. By default return the list of matching events
1768
+ */
1769
+ requestedResult?: RequestEvents;
1770
+ }
1771
+ interface IteratorArguments extends Arguments {
1772
+ /**
1773
+ * how should the resulting events be sorted. Options:
1774
+ * - none (no specific sorting),
1775
+ * - date (by event date),
1776
+ * - rel (relevance to the query),
1777
+ * - size (number of articles),
1778
+ * - socialScore (amount of shares in social media)
1779
+ */
1780
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1781
+ /**
1782
+ * should the results be sorted in ascending order (true) or descending (false)
1783
+ */
1784
+ sortByAsc?: boolean;
1785
+ /**
1786
+ * number of events to download at once (we are not downloading event by event)
1787
+ */
1788
+ eventBatchSize?: number;
1789
+ /**
1790
+ * maximum number of items to be returned. Used to stop iteration sooner than results run out
1791
+ */
1792
+ maxItems?: number;
1793
+ returnInfo?: ReturnInfo;
1794
+ }
1795
+ interface RequestEventsInfoArguments {
1796
+ /**
1797
+ * page of the results to return (1, 2, ...)
1798
+ */
1799
+ page?: number;
1800
+ /**
1801
+ * number of results to return per page
1802
+ */
1803
+ count?: number;
1804
+ /**
1805
+ * how should the resulting events be sorted. Options:
1806
+ * - none (no specific sorting),
1807
+ * - date (by event date),
1808
+ * - rel (relevance to the query),
1809
+ * - size (number of articles),
1810
+ * - socialScore (amount of shares in social media)
1811
+ */
1812
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1813
+ /**
1814
+ * should the results be sorted in ascending order (true) or descending (false)
1815
+ */
1816
+ sortByAsc?: boolean;
1817
+ /**
1818
+ * what details should be included in the returned information
1819
+ */
1820
+ returnInfo?: ReturnInfo;
1821
+ }
1822
+ interface RequestEventsUriListArguments {
1823
+ /**
1824
+ * page of the results to return (1, 2, ...)
1825
+ */
1826
+ page?: number;
1827
+ /**
1828
+ * number of results to return per page
1829
+ */
1830
+ count?: number;
1831
+ /**
1832
+ * how should the resulting events be sorted. Options:
1833
+ * - none (no specific sorting),
1834
+ * - date (by event date),
1835
+ * - rel (relevance to the query),
1836
+ * - size (number of articles),
1837
+ * - socialScore (amount of shares in social media)
1838
+ */
1839
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1840
+ /**
1841
+ * should the results be sorted in ascending order (true) or descending (false)
1842
+ */
1843
+ sortByAsc?: boolean;
1844
+ }
1845
+ interface RequestEventsUriWgtListArguments {
1846
+ /**
1847
+ * page of the results to return (1, 2, ...)
1848
+ */
1849
+ page?: number;
1850
+ /**
1851
+ * number of results to return per page
1852
+ */
1853
+ count?: number;
1854
+ /**
1855
+ * how should the resulting events be sorted. Options:
1856
+ * - none (no specific sorting),
1857
+ * - date (by event date),
1858
+ * - rel (relevance to the query),
1859
+ * - size (number of articles),
1860
+ * - socialScore (amount of shares in social media)
1861
+ */
1862
+ sortBy?: "none" | "rel" | "date" | "size" | "socialScore";
1863
+ /**
1864
+ * should the results be sorted in ascending order (true) or descending (false)
1865
+ */
1866
+ sortByAsc?: boolean;
1867
+ }
1868
+ interface RequestEventsLocAggrArguments {
1869
+ /**
1870
+ * sample of events to use to compute the location aggregate
1871
+ */
1872
+ eventsSampleSize?: number;
1873
+ /**
1874
+ * what details (about locations) should be included in the returned information
1875
+ */
1876
+ returnInfo?: ReturnInfo;
1877
+ }
1878
+ interface RequestEventsLocTimeAggrArguments {
1879
+ /**
1880
+ * sample of events to use to compute the location aggregate
1881
+ */
1882
+ eventsSampleSize?: number;
1883
+ /**
1884
+ * what details (about locations) should be included in the returned information
1885
+ */
1886
+ returnInfo?: ReturnInfo;
1887
+ }
1888
+ interface RequestEventsConceptAggrArguments {
1889
+ /**
1890
+ * number of top concepts to return
1891
+ */
1892
+ conceptCount?: number;
1893
+ /**
1894
+ * on what sample of results should the aggregate be computed
1895
+ */
1896
+ eventsSampleSize?: number;
1897
+ /**
1898
+ * what details about the concepts should be included in the returned information
1899
+ */
1900
+ returnInfo?: ReturnInfo;
1901
+ }
1902
+ interface RequestEventsConceptGraphArguments {
1903
+ /**
1904
+ * number of top concepts to return
1905
+ */
1906
+ conceptCount?: number;
1907
+ /**
1908
+ * number of links between the concepts to return
1909
+ */
1910
+ linkCount?: number;
1911
+ /**
1912
+ * on what sample of results should the aggregate be computed
1913
+ */
1914
+ eventsSampleSize?: number;
1915
+ /**
1916
+ * what details about the concepts should be included in the returned information
1917
+ */
1918
+ returnInfo?: ReturnInfo;
1919
+ }
1920
+ interface RequestEventsConceptMatrixArguments {
1921
+ /**
1922
+ * number of top concepts to return
1923
+ */
1924
+ conceptCount?: number;
1925
+ /**
1926
+ * 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
1927
+ */
1928
+ measure?: "pmi" | "pairTfIdf" | "chiSquare";
1929
+ /**
1930
+ * on what sample of results should the aggregate be computed
1931
+ */
1932
+ eventsSampleSize?: number;
1933
+ /**
1934
+ * what details about the concepts should be included in the returned information
1935
+ */
1936
+ returnInfo?: ReturnInfo;
1937
+ }
1938
+ interface RequestEventsConceptTrendsArguments {
1939
+ /**
1940
+ * number of top concepts to return
1941
+ */
1942
+ conceptCount?: number;
1943
+ /**
1944
+ * what details about the concepts should be included in the returned information
1945
+ */
1946
+ returnInfo?: ReturnInfo;
1947
+ /**
1948
+ * list of concept URIs for which to return trending information. If empty, then top concepts will be automatically computed.
1949
+ */
1950
+ conceptUris?: string[];
1951
+ }
1952
+ interface RequestEventsSourceAggrArguments {
1953
+ /**
1954
+ * number of top sources to return
1955
+ */
1956
+ sourceCount?: number;
1957
+ /**
1958
+ * on what sample of results should the aggregate be computed
1959
+ */
1960
+ eventsSampleSize?: number;
1961
+ /**
1962
+ * what details about the concepts should be included in the returned information
1963
+ */
1964
+ returnInfo?: ReturnInfo;
1965
+ }
1966
+ interface RequestEventsDateMentionAggrArguments {
1967
+ /**
1968
+ * ignore events that don't have a date that is more than this number of days apart from the tested event
1969
+ */
1970
+ minDaysApart?: number;
1971
+ /**
1972
+ * report only dates that are mentioned at least this number of times
1973
+ */
1974
+ minDateMentionCount?: number;
1975
+ /**
1976
+ * on what sample of results should the aggregate be computed
1977
+ */
1978
+ eventsSampleSize?: number;
1979
+ /**
1980
+ * what details about the concepts should be included in the returned information
1981
+ */
1982
+ returnInfo?: ReturnInfo;
1983
+ }
1984
+ interface RequestEventsEventClustersArguments {
1985
+ /**
1986
+ * number of keywords to report in each of the clusters
1987
+ */
1988
+ keywordCount?: number;
1989
+ /**
1990
+ * try to cluster at most this number of events
1991
+ */
1992
+ maxEventsToCluster?: number;
1993
+ /**
1994
+ * what details about the concepts should be included in the returned information
1995
+ */
1996
+ returnInfo?: ReturnInfo;
1997
+ }
1998
+ interface RequestEventsRecentActivityArguments {
1999
+ /**
2000
+ * max events to return
2001
+ */
2002
+ maxEventCount?: number;
2003
+ /**
2004
+ * the time after which the events were added/updated (returned by previous call to the same method)
2005
+ */
2006
+ updatesAfterTm?: string | Date;
2007
+ /**
2008
+ * how many minutes into the past should we check (set either this or updatesAfterTm property, but not both)
2009
+ */
2010
+ updatesAfterMinsAgo?: number;
2011
+ /**
2012
+ * return only events that have a geographic location assigned to them
2013
+ */
2014
+ mandatoryLocation?: boolean;
2015
+ /**
2016
+ * the minimum avg cos sim of the events to be returned (events with lower quality should not be included)
2017
+ */
2018
+ minAvgCosSim?: number;
2019
+ /**
2020
+ * what details should be included in the returned information
2021
+ */
2022
+ returnInfo?: ReturnInfo;
2023
+ }
2024
+ interface RequestEventsBreakingEventsArguments {
2025
+ /**
2026
+ * page of the results to return (1, 2, ...)
2027
+ */
2028
+ page?: number;
2029
+ /**
2030
+ * max events to return (at most 50)
2031
+ */
2032
+ count?: number;
2033
+ /**
2034
+ * the minimum score of "breakingness" of the events to be returned
2035
+ */
2036
+ minBreakingScore?: number;
2037
+ /**
2038
+ * what details should be included in the returned information
2039
+ */
2040
+ returnInfo?: ReturnInfo;
2041
+ }
2042
+ }
2043
+ export namespace ReturnInfo {
2044
+ /**
2045
+ * What information about an article should be returned by the API call
2046
+ */
2047
+ interface ArticleInfo {
2048
+ /**
2049
+ * max length of the article body (use -1 for full body, 0 for empty)
2050
+ */
2051
+ bodyLen?: number;
2052
+ /**
2053
+ * core article information -
2054
+ */
2055
+ basicInfo?: boolean;
2056
+ /**
2057
+ * article title
2058
+ */
2059
+ title?: boolean;
2060
+ /**
2061
+ * article body
2062
+ */
2063
+ body?: boolean;
2064
+ /**
2065
+ * article url
2066
+ */
2067
+ url?: boolean;
2068
+ /**
2069
+ * uri of the event to which the article belongs
2070
+ */
2071
+ eventUri?: boolean;
2072
+ /**
2073
+ * the list of authors of the news article
2074
+ */
2075
+ authors?: boolean;
2076
+ /**
2077
+ * the list of concepts mentioned in the article
2078
+ */
2079
+ concepts?: boolean;
2080
+ /**
2081
+ * the list of categories assigned to the article
2082
+ */
2083
+ categories?: boolean;
2084
+ /**
2085
+ * the list of urls of links identified in the article body
2086
+ */
2087
+ links?: boolean;
2088
+ /**
2089
+ * the list of videos assigned to the article
2090
+ */
2091
+ videos?: boolean;
2092
+ /**
2093
+ * url to the image associated with the article
2094
+ */
2095
+ image?: boolean;
2096
+ /**
2097
+ * information about the number of times the article was shared on facebook and linkedin, instagram, ...
2098
+ */
2099
+ socialScore?: boolean;
2100
+ /**
2101
+ * sentiment about the article
2102
+ */
2103
+ sentiment?: boolean;
2104
+ /**
2105
+ * the geographic location that the event mentioned in the article is about
2106
+ */
2107
+ location?: boolean;
2108
+ /**
2109
+ * the dates when the articles was crawled and the date when it was published (based on the rss feed date)
2110
+ */
2111
+ dates?: boolean;
2112
+ /**
2113
+ * the list of dates found mentioned in the article
2114
+ */
2115
+ extractedDates?: boolean;
2116
+ /**
2117
+ * if the article is a duplicate, this will provide information about the original article
2118
+ */
2119
+ originalArticle?: boolean;
2120
+ /**
2121
+ * uri of the story (cluster) to which the article belongs
2122
+ */
2123
+ storyUri?: boolean;
2124
+ [name: string]: boolean | string | number | undefined;
2125
+ }
2126
+ /**
2127
+ * What information about an article should be returned by the API call
2128
+ */
2129
+ interface ArticleInfoFlags {
2130
+ /**
2131
+ * max length of the article body (use -1 for full body, 0 for empty)
2132
+ */
2133
+ ArticleBodyLen?: number;
2134
+ /**
2135
+ * core article information -
2136
+ */
2137
+ IncludeArticleBasicInfo?: boolean;
2138
+ /**
2139
+ * article title
2140
+ */
2141
+ IncludeArticleTitle?: boolean;
2142
+ /**
2143
+ * article body
2144
+ */
2145
+ IncludeArticleBody?: boolean;
2146
+ /**
2147
+ * article url
2148
+ */
2149
+ IncludeArticleUrl?: boolean;
2150
+ /**
2151
+ * uri of the event to which the article belongs
2152
+ */
2153
+ IncludeArticleEventUri?: boolean;
2154
+ /**
2155
+ * the list of concepts mentioned in the article
2156
+ */
2157
+ IncludeArticleConcepts?: boolean;
2158
+ /**
2159
+ * the list of categories assigned to the article
2160
+ */
2161
+ IncludeArticleCategories?: boolean;
2162
+ /**
2163
+ * the list of urls of links identified in the article body
2164
+ */
2165
+ IncludeArticleLinks?: boolean;
2166
+ /**
2167
+ * the list of videos assigned to the article
2168
+ */
2169
+ IncludeArticleVideos?: boolean;
2170
+ /**
2171
+ * url to the image associated with the article
2172
+ */
2173
+ IncludeArticleImage?: boolean;
2174
+ /**
2175
+ * information about the number of times the article was shared on facebook and linkedin, instagram, ...
2176
+ */
2177
+ IncludeArticleSocialScore?: boolean;
2178
+ /**
2179
+ * sentiment about the article
2180
+ */
2181
+ IncludeArticleSentiment?: boolean;
2182
+ /**
2183
+ * the geographic location that the event mentioned in the article is about
2184
+ */
2185
+ IncludeArticleLocation?: boolean;
2186
+ /**
2187
+ * the dates when the articles was crawled and the date when it was published (based on the rss feed date)
2188
+ */
2189
+ IncludeArticleDates?: boolean;
2190
+ /**
2191
+ * the list of dates found mentioned in the article
2192
+ */
2193
+ IncludeArticleExtractedDates?: boolean;
2194
+ /**
2195
+ * the list of articles that are a copy of this article
2196
+ */
2197
+ IncludeArticleDuplicateList?: boolean;
2198
+ /**
2199
+ * if the article is a duplicate, this will provide information about the original article
2200
+ */
2201
+ IncludeArticleOriginalArticle?: boolean;
2202
+ /**
2203
+ * uri of the story (cluster) to which the article belongs
2204
+ */
2205
+ IncludeArticleStoryUri?: boolean;
2206
+ }
2207
+ /**
2208
+ * What information about a story (cluster of articles) should be returned by the API call
2209
+ */
2210
+ interface StoryInfoFlags {
2211
+ /**
2212
+ * core stats about the story
2213
+ */
2214
+ IncludeStoryBasicStats?: boolean;
2215
+ /**
2216
+ * geographic location that the story is about
2217
+ */
2218
+ IncludeStoryLocation?: boolean;
2219
+ /**
2220
+ * date of the story
2221
+ */
2222
+ IncludeStoryDate?: boolean;
2223
+ /**
2224
+ * title of the story
2225
+ */
2226
+ IncludeStoryTitle?: boolean;
2227
+ /**
2228
+ * summary of the story
2229
+ */
2230
+ IncludeStorySummary?: boolean;
2231
+ /**
2232
+ * set of concepts associated with the story
2233
+ */
2234
+ IncludeStoryConcepts?: boolean;
2235
+ /**
2236
+ * categories associated with the story
2237
+ */
2238
+ IncludeStoryCategories?: boolean;
2239
+ /**
2240
+ * the article that is closest to the center of the cluster of articles assigned to the story
2241
+ */
2242
+ IncludeStoryMedoidArticle?: boolean;
2243
+ /**
2244
+ * dates that were frequently identified in the articles belonging to the story
2245
+ */
2246
+ IncludeStoryCommonDates?: boolean;
2247
+ /**
2248
+ * score computed based on how frequently the articles in the story were shared on social media
2249
+ */
2250
+ IncludeStorySocialScore?: boolean;
2251
+ /**
2252
+ * number of images to be returned for a story
2253
+ */
2254
+ StoryImageCount?: number;
2255
+ }
2256
+ /**
2257
+ * What information about a story (cluster of articles) should be returned by the API call
2258
+ */
2259
+ interface StoryInfo {
2260
+ /**
2261
+ * core stats about the story
2262
+ */
2263
+ basicStats?: boolean;
2264
+ /**
2265
+ * geographic location that the story is about
2266
+ */
2267
+ location?: boolean;
2268
+ /**
2269
+ * date of the story
2270
+ */
2271
+ date?: boolean;
2272
+ /**
2273
+ * title of the story
2274
+ */
2275
+ title?: boolean;
2276
+ /**
2277
+ * summary of the story
2278
+ */
2279
+ summary?: boolean;
2280
+ /**
2281
+ * set of concepts associated with the story
2282
+ */
2283
+ concepts?: boolean;
2284
+ /**
2285
+ * categories associated with the story
2286
+ */
2287
+ categories?: boolean;
2288
+ /**
2289
+ * the article that is closest to the center of the cluster of articles assigned to the story
2290
+ */
2291
+ medoidArticle?: boolean;
2292
+ /**
2293
+ * the article from which we have extracted the title and summary for the story
2294
+ */
2295
+ infoArticle?: boolean;
2296
+ /**
2297
+ * dates that were frequently identified in the articles belonging to the story
2298
+ */
2299
+ commonDates?: boolean;
2300
+ /**
2301
+ * score computed based on how frequently the articles in the story were shared on social media
2302
+ */
2303
+ socialScore?: boolean;
2304
+ /**
2305
+ * number of images to be returned for a story
2306
+ */
2307
+ imageCount?: number;
2308
+ [name: string]: boolean | string | number | undefined;
2309
+ }
2310
+ /**
2311
+ * What information about an event should be returned by the API call
2312
+ */
2313
+ interface EventInfoFlags {
2314
+ /**
2315
+ * return the title of the event
2316
+ */
2317
+ IncludeEventTitle?: boolean;
2318
+ /**
2319
+ * return the summary of the event
2320
+ */
2321
+ IncludeEventSummary?: boolean;
2322
+ /**
2323
+ * return the number of articles that are assigned to the event
2324
+ */
2325
+ IncludeEventArticleCounts?: boolean;
2326
+ /**
2327
+ * return information about the main concepts related to the event
2328
+ */
2329
+ IncludeEventConcepts?: boolean;
2330
+ /**
2331
+ * return information about the categories related to the event
2332
+ */
2333
+ IncludeEventCategories?: boolean;
2334
+ /**
2335
+ * return the location where the event occurred
2336
+ */
2337
+ IncludeEventLocation?: boolean;
2338
+ /**
2339
+ * return information about the date of the event
2340
+ */
2341
+ IncludeEventDate?: boolean;
2342
+ /**
2343
+ * return the dates that were commonly found in the articles about the event
2344
+ */
2345
+ IncludeEventCommonDates?: boolean;
2346
+ /**
2347
+ * return the list of stories (clusters) that are about the event
2348
+ */
2349
+ IncludeEventStories?: boolean;
2350
+ /**
2351
+ * score computed based on how frequently the articles in the event were shared on social media
2352
+ */
2353
+ IncludeEventSocialScore?: boolean;
2354
+ /**
2355
+ * number of images to be returned for an event
2356
+ */
2357
+ EventImageCount?: number;
2358
+ }
2359
+ /**
2360
+ * What information about an event should be returned by the API call
2361
+ */
2362
+ interface EventInfo {
2363
+ /**
2364
+ * return the title of the event
2365
+ */
2366
+ title?: boolean;
2367
+ /**
2368
+ * return the summary of the event
2369
+ */
2370
+ summary?: boolean;
2371
+ /**
2372
+ * return the number of articles that are assigned to the event
2373
+ */
2374
+ articleCounts?: boolean;
2375
+ /**
2376
+ * return information about the main concepts related to the event
2377
+ */
2378
+ concepts?: boolean;
2379
+ /**
2380
+ * return information about the categories related to the event
2381
+ */
2382
+ categories?: boolean;
2383
+ /**
2384
+ * return information about the date of the event
2385
+ */
2386
+ date?: boolean;
2387
+ /**
2388
+ * return the dates that were commonly found in the articles about the event
2389
+ */
2390
+ commonDates?: boolean;
2391
+ /**
2392
+ * return for each language the article from which we have extracted the summary and title for event for that language
2393
+ */
2394
+ articleInfo?: boolean;
2395
+ /**
2396
+ * return the list of stories (clusters) that are about the event
2397
+ */
2398
+ stories?: boolean;
2399
+ /**
2400
+ * score computed based on how frequently the articles in the event were shared on social media
2401
+ */
2402
+ socialScore?: boolean;
2403
+ /**
2404
+ * number of images to be returned for an event
2405
+ */
2406
+ imageCount?: number;
2407
+ [name: string]: boolean | string | number | undefined;
2408
+ }
2409
+ /**
2410
+ * What information about a news source should be returned by the API call
2411
+ */
2412
+ interface SourceInfoFlags {
2413
+ /**
2414
+ * title of the news source
2415
+ */
2416
+ IncludeSourceTitle?: boolean;
2417
+ /**
2418
+ * description of the news source
2419
+ */
2420
+ IncludeSourceDescription?: boolean;
2421
+ /**
2422
+ * geographic location of the news source
2423
+ */
2424
+ IncludeSourceLocation?: boolean;
2425
+ /**
2426
+ * a set of rankings for the news source
2427
+ */
2428
+ IncludeSourceRanking?: boolean;
2429
+ /**
2430
+ * different images associated with the news source
2431
+ */
2432
+ IncludeSourceImage?: boolean;
2433
+ /**
2434
+ * different social media accounts used by the news source
2435
+ */
2436
+ IncludeSourceSocialMedia?: boolean;
2437
+ }
2438
+ /**
2439
+ * What information about a news source should be returned by the API call
2440
+ */
2441
+ interface SourceInfo {
2442
+ /**
2443
+ * title of the news source
2444
+ */
2445
+ title?: boolean;
2446
+ /**
2447
+ * description of the news source
2448
+ */
2449
+ description?: boolean;
2450
+ /**
2451
+ * geographic location of the news source
2452
+ */
2453
+ location?: boolean;
2454
+ /**
2455
+ * a set of rankings for the news source
2456
+ */
2457
+ ranking?: boolean;
2458
+ /**
2459
+ * different images associated with the news source
2460
+ */
2461
+ image?: boolean;
2462
+ /**
2463
+ * the number of articles from this news source that are stored in Event Registry
2464
+ */
2465
+ articleCount?: boolean;
2466
+ /**
2467
+ * different social media accounts used by the news source
2468
+ */
2469
+ socialMedia?: boolean;
2470
+ /**
2471
+ * info about the names of the source groups to which the source belongs to
2472
+ */
2473
+ sourceGroups?: boolean;
2474
+ [name: string]: boolean | string | number | undefined;
2475
+ }
2476
+ /**
2477
+ * What information about a category should be returned by the API call
2478
+ */
2479
+ interface CategoryInfoFlags {
2480
+ IncludeCategoryTrendingScore?: boolean;
2481
+ }
2482
+ /**
2483
+ * What information about a category should be returned by the API call
2484
+ */
2485
+ interface CategoryInfo {
2486
+ trendingScore?: boolean;
2487
+ [name: string]: boolean | string | number | undefined;
2488
+ }
2489
+ interface ConceptInfoFlags {
2490
+ ConceptType?: ConceptType;
2491
+ lang?: string | string[];
2492
+ IncludeConceptLabel?: boolean;
2493
+ IncludeConceptSynonyms?: boolean;
2494
+ IncludeConceptImage?: boolean;
2495
+ IncludeConceptDescription?: boolean;
2496
+ IncludeConceptTrendingScore?: boolean;
2497
+ MaxConceptsPerType?: number;
2498
+ }
2499
+ interface ConceptInfo {
2500
+ type?: ConceptType | ConceptType[];
2501
+ lang?: string | string[];
2502
+ label?: boolean;
2503
+ synonyms?: boolean;
2504
+ image?: boolean;
2505
+ description?: boolean;
2506
+ trendingScore?: boolean;
2507
+ maxConceptsPerType?: number;
2508
+ [name: string]: boolean | string | number | (boolean | string | number)[] | undefined;
2509
+ }
2510
+ interface LocationInfoFlags {
2511
+ label?: boolean;
2512
+ wikiUri?: boolean;
2513
+ geoNamesId?: boolean;
2514
+ population?: boolean;
2515
+ geoLocation?: boolean;
2516
+ countryArea?: boolean;
2517
+ countryDetails?: boolean;
2518
+ countryContinent?: boolean;
2519
+ placeFeatureCode?: boolean;
2520
+ placeCountry?: boolean;
2521
+ }
2522
+ interface LocationInfo {
2523
+ label?: boolean;
2524
+ wikiUri?: boolean;
2525
+ geoNamesId?: boolean;
2526
+ population?: boolean;
2527
+ geoLocation?: boolean;
2528
+ countryArea?: boolean;
2529
+ countryDetails?: boolean;
2530
+ countryContinent?: boolean;
2531
+ placeFeatureCode?: boolean;
2532
+ placeCountry?: boolean;
2533
+ [name: string]: boolean | string | number | undefined;
2534
+ }
2535
+ interface ConceptClassInfoFlags {
2536
+ IncludeConceptClassParentLabels?: boolean;
2537
+ IncludeConceptClassConcepts?: boolean;
2538
+ }
2539
+ interface ConceptClassInfo {
2540
+ parentLabels?: boolean;
2541
+ concepts?: boolean;
2542
+ [name: string]: boolean | string | number | undefined;
2543
+ }
2544
+ interface ConceptFolderInfoFlags {
2545
+ IncludeConceptFolderDefinition?: boolean;
2546
+ IncludeConceptFolderOwner?: boolean;
2547
+ }
2548
+ interface ConceptFolderInfo {
2549
+ definition?: boolean;
2550
+ owner?: boolean;
2551
+ [name: string]: boolean | string | number | undefined;
2552
+ }
2553
+ }
2554
+ export {};
2555
+ }