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