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
@@ -0,0 +1,57 @@
1
+ import { QueryParamsBase } from "./base.js";
2
+ /**
3
+ * The GetEventForText class can be used to find the event(s) that best matches the given input text.
4
+ * The request is performed asynchronously.
5
+ *
6
+ * Note: The functionality can only be used to find the events in the last 5 days. Older events cannot
7
+ * be matched in this way
8
+ *
9
+ * Return info from the compute() method is in the form:
10
+ *
11
+ * [
12
+ * {
13
+ * "cosSim": 0.07660648086468567,
14
+ * "eventUri": "4969",
15
+ * "storyUri": "eng-af6ce79f-cb91-4010-8ddf-7ad924bc5638-40591"
16
+ * },
17
+ * {
18
+ * "cosSim": 0.05851939237670918,
19
+ * "eventUri": "5157",
20
+ * "storyUri": "eng-af6ce79f-cb91-4010-8ddf-7ad924bc5638-56286"
21
+ * },
22
+ * ...
23
+ * ]
24
+ *
25
+ * Where
26
+ * - cosSim represents the cosine similarity of the document to the cluster
27
+ * - eventUri is the uri of the corresponding event in the Event Registry
28
+ * - storyUri is the uri of the story in the Event Registry
29
+ *
30
+ * You can use QueryEvent or QueryStory to obtain more information about these events/stories
31
+ *
32
+ */
33
+ export class GetEventForText extends QueryParamsBase {
34
+ /**
35
+ * @param er instance of EventRegistry class
36
+ * @param nrOfEventsToReturn number of events to return for the given text
37
+ */
38
+ constructor(er, nrOfEventsToReturn = 5) {
39
+ super();
40
+ this.er = er;
41
+ this.nrOfEventsToReturn = nrOfEventsToReturn;
42
+ }
43
+ /**
44
+ * Compute the list of most similar events for the given text
45
+ * @param text text for which to find the most similar event
46
+ * @param lang language in which the text is written
47
+ */
48
+ async compute(text, lang = "eng") {
49
+ const params = { lang: lang, text: text, topClustersCount: this.nrOfEventsToReturn };
50
+ const response = await this.er.jsonRequest("/api/v1/getEventForText/getEventForText", params);
51
+ if (response?.data.topStories !== undefined) {
52
+ return response.data.topStories;
53
+ }
54
+ return response;
55
+ }
56
+ }
57
+ //# sourceMappingURL=eventForText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventForText.js","sourceRoot":"","sources":["../../src/eventForText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAGhD;;;OAGG;IACH,YAAY,EAAiB,EAAE,qBAA6B,CAAC;QACzD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,OAAe,KAAK;QACnD,MAAM,MAAM,GAAG,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,CAAC,kBAAkB,EAAC,CAAC;QACnF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,WAAW,CAAyB,yCAAyC,EAAE,MAAM,CAAC,CAAC;QACtH,IAAI,QAAQ,EAAE,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAC1C,OAAO,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;QACpC,CAAC;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ"}
@@ -0,0 +1,375 @@
1
+ import { Usage } from "./usage.js";
2
+ import { ErHttpResponse } from "./http.js";
3
+ import { ReturnInfo } from "./returnInfo.js";
4
+ import { ER } from "./types.js";
5
+ import { QueryArticle } from "./queryArticle.js";
6
+ import { QueryArticles } from "./queryArticles.js";
7
+ import { QueryEvents } from "./queryEvents.js";
8
+ import { QueryEvent } from "./queryEvent.js";
9
+ import { Logger } from "./logger.js";
10
+ import { ArticlesFluent } from "./fluent/articles.js";
11
+ import { EventsFluent } from "./fluent/events.js";
12
+ import { MentionsFluent } from "./fluent/mentions.js";
13
+ import { StoriesFluent } from "./fluent/stories.js";
14
+ import { TrendsFluent } from "./fluent/trends.js";
15
+ import { CountsFluent } from "./fluent/counts.js";
16
+ import { SharesFluent } from "./fluent/shares.js";
17
+ import { RecentFluent } from "./fluent/recent.js";
18
+ import { InfoFluent } from "./fluent/info.js";
19
+ import { TopicPagesFluent } from "./fluent/topicPages.js";
20
+ import { AnalyticsFluent } from "./fluent/analytics.js";
21
+ import { EventForTextFluent } from "./fluent/eventForText.js";
22
+ type UriSuggestion = {
23
+ uri?: string;
24
+ };
25
+ export declare class EventRegistry {
26
+ logger: Logger;
27
+ /** Ergonomic article search/iterate/get façade — see `ArticlesFluent`. */
28
+ readonly articles: ArticlesFluent;
29
+ /** Ergonomic event search/iterate/get façade — see `EventsFluent`. */
30
+ readonly events: EventsFluent;
31
+ /** Ergonomic mentions search/iterate façade — see `MentionsFluent`. */
32
+ readonly mentions: MentionsFluent;
33
+ /** Ergonomic story lookup façade — see `StoriesFluent`. */
34
+ readonly stories: StoriesFluent;
35
+ /** Ergonomic trending concepts/categories façade — see `TrendsFluent`. */
36
+ readonly trends: TrendsFluent;
37
+ /** Ergonomic concept/category mention-count façade — see `CountsFluent`. */
38
+ readonly counts: CountsFluent;
39
+ /** Ergonomic top-shared articles/events façade — see `SharesFluent`. */
40
+ readonly shares: SharesFluent;
41
+ /** Ergonomic recent activity façade — see `RecentFluent`. */
42
+ readonly recent: RecentFluent;
43
+ /** Ergonomic source/concept/category info façade — see `InfoFluent`. */
44
+ readonly info: InfoFluent;
45
+ /** Ergonomic topic page listing/loading/building façade — see `TopicPagesFluent`. */
46
+ readonly topicPages: TopicPagesFluent;
47
+ /** Ergonomic text analytics façade — see `AnalyticsFluent`. */
48
+ readonly analytics: AnalyticsFluent;
49
+ /** Ergonomic callable form of `GetEventForText.compute()`. */
50
+ readonly eventForText: EventForTextFluent;
51
+ /** Ergonomic concept uri resolution — see `helpers/uri.conceptUri`. */
52
+ readonly concepts: {
53
+ uri: (label: string, args?: ER.GetConceptUriArguments) => Promise<string>;
54
+ };
55
+ /** Ergonomic category uri resolution — see `helpers/uri.categoryUri`. */
56
+ readonly categories: {
57
+ uri: (label: string) => Promise<string>;
58
+ };
59
+ /** Ergonomic news source/source group uri resolution — see `helpers/uri.sourceUri`. */
60
+ readonly sources: {
61
+ uri: (label: string, dataType?: ER.DataType[] | ER.DataType) => Promise<string>;
62
+ groupUri: (label: string) => Promise<string>;
63
+ };
64
+ /** Ergonomic location uri resolution — see `helpers/uri.locationUri`. */
65
+ readonly locations: {
66
+ uri: (label: string, args?: ER.GetLocationUriArguments) => Promise<string>;
67
+ };
68
+ /** Ergonomic event type uri resolution — see `helpers/uri.eventTypeUri`. */
69
+ readonly eventTypes: {
70
+ uri: (label: string) => Promise<string>;
71
+ };
72
+ /** Ergonomic concept class uri resolution — see `helpers/uri.conceptClassUri`. */
73
+ readonly conceptClasses: {
74
+ uri: (label: string, lang?: string) => Promise<string>;
75
+ };
76
+ /** Ergonomic author uri resolution — see `helpers/uri.authorUri`. */
77
+ readonly authors: {
78
+ uri: (label: string) => Promise<string>;
79
+ };
80
+ private config;
81
+ /** Token and request accounting plus the optional `maxTokens` budget guard. */
82
+ readonly usage: Usage;
83
+ private headers;
84
+ private dailyAvailableRequests;
85
+ private remainingAvailableRequests;
86
+ private lastQueryTime;
87
+ /** `minDelayBetweenRequests` converted to milliseconds. */
88
+ private minDelayMs;
89
+ private _logRequests;
90
+ private readonly lock;
91
+ private extraParams;
92
+ private readonly stopStatusCodes;
93
+ constructor(config?: ER.Config);
94
+ /** Namespaces (`er.articles`, `er.concepts`, …) bound to `self`, so a `withOptions` view routes through itself. */
95
+ private buildNamespaces;
96
+ /** Signals and deadline applied to every call made through this instance (or `withOptions` view). */
97
+ private get requestScope();
98
+ /**
99
+ * Return a view of this client whose every call (classic, helpers, fluent namespaces and iterators)
100
+ * also observes `options.signal` and `options.timeoutMs`. State (rate limit, usage, headers, queue)
101
+ * is shared with this instance. A view's signal adds to, and its `timeoutMs` replaces, the inherited ones.
102
+ */
103
+ withOptions(options: ER.RequestOptions): EventRegistry;
104
+ getHost(): string;
105
+ getHostAnalytics(): string;
106
+ getApiKey(): string | undefined;
107
+ /** Minimum delay between requests in seconds (constructor units). */
108
+ getMinDelayBetweenRequests(): number;
109
+ getRepeatFailedRequestCount(): number;
110
+ /**
111
+ * Check the latest Node.js SDK version and log if this client is outdated.
112
+ * Prefers `/static/nodejsSDKVersion.txt` on the API host; if that file is missing
113
+ * (or the request fails), falls back to the npm registry `latest` document.
114
+ */
115
+ checkVersion(): Promise<void>;
116
+ private readHostSdkVersion;
117
+ private readNpmLatestVersion;
118
+ setExtraParams(params: Record<string, unknown> | null): void;
119
+ private createErrorResponse;
120
+ /**
121
+ * Should all requests be logged to a file or not?
122
+ */
123
+ setLogging(logging: boolean): void;
124
+ get allowUseOfArchive(): boolean | undefined;
125
+ get verboseOutput(): boolean | undefined;
126
+ /**
127
+ * Main method for executing the search queries.
128
+ * @param query instance of Query class
129
+ * @param options `signal` / `timeoutMs` for this call only
130
+ */
131
+ execQuery<T = ER.SuccessfulResponse<unknown>>(query: {
132
+ path: string;
133
+ getQueryParams: () => Record<string, unknown>;
134
+ }, allowUseOfArchive?: boolean, options?: ER.RequestOptions): Promise<ER.Response<T>>;
135
+ /** Merge instance/view defaults with per-call options into one signal (caller must `dispose()`). */
136
+ private composeCallScope;
137
+ private acquireLock;
138
+ /**
139
+ * Wait until minDelayBetweenRequests has elapsed since the last attempt.
140
+ * Must run while holding `this.lock`.
141
+ */
142
+ private waitForTurn;
143
+ jsonRequestAnalytics<T = unknown>(path: string, parameters?: Record<string, unknown>, headers?: Record<string, unknown>, cookies?: Record<string, unknown>, options?: ER.RequestOptions): Promise<ErHttpResponse<T>>;
144
+ /**
145
+ * Make a request for json data
146
+ * @param path url on er (e.g. "/api/v1/article")
147
+ * @param parameters Optional parameters to be included in the request
148
+ */
149
+ jsonRequest<T = unknown>(path: string, parameters?: Record<string, unknown>, allowUseOfArchive?: boolean, options?: ER.RequestOptions): Promise<ErHttpResponse<T>>;
150
+ /**
151
+ * Shared by `jsonRequest` and `jsonRequestAnalytics`: queue behind the lock, honour the minimum delay and
152
+ * the token budget, POST with retries, record usage, and turn failures into an error response.
153
+ */
154
+ private send;
155
+ /**
156
+ * get the number of requests that are still available for the user today. Information is only accessible after you make some query.
157
+ */
158
+ getRemainingAvailableRequests(): number;
159
+ /**
160
+ * get the total number of requests that the user can make in a day. Information is only accessible after you make some query.
161
+ */
162
+ getDailyAvailableRequests(): number;
163
+ /**
164
+ * Return the headers returned in the response object of the last executed request
165
+ */
166
+ getLastHeaders(): Headers;
167
+ /**
168
+ * Get a value of the header headerName that was set in the headers in the last response object
169
+ */
170
+ getLastHeader(headerName: string, dfltVal?: string): string | undefined;
171
+ /**
172
+ * print some statistics about the last executed request
173
+ */
174
+ printLastReqStats(): void;
175
+ /**
176
+ * return true or false depending on whether the last request used the archive or not
177
+ */
178
+ getLastReqArchiveUse(): boolean;
179
+ /**
180
+ * Return the number of used and total available tokens. Can be used at any time (also before making queries)
181
+ */
182
+ getUsageInfo(options?: ER.RequestOptions): Promise<ER.UsageInfo>;
183
+ /**
184
+ * Tokens still available on the account (`availableTokens - usedTokens` from the usage endpoint).
185
+ * Makes one request; it is exempt from the `maxTokens` guard.
186
+ */
187
+ getRemainingTokens(options?: ER.RequestOptions): Promise<number>;
188
+ getServiceStatus(): Promise<ER.UsageInfo>;
189
+ /**
190
+ * Return the GET URL for the query. Parameters are URL-encoded, arrays become repeated keys,
191
+ * objects are JSON-encoded, and apiKey is always left out so the URL is safe to log or share.
192
+ */
193
+ getUrl(query: QueryArticles | QueryArticle | QueryEvents | QueryEvent): string;
194
+ /**
195
+ * Return a list of concepts that contain the given prefix.
196
+ * Returned matching concepts are sorted based on their frequency of occurrence in news (from most to least frequent)
197
+ * @param prefix input text that should be contained in the concept
198
+ * @param args Object which contains a host of optional parameters
199
+ */
200
+ suggestConcepts(prefix: string, args?: ER.SuggestConceptsArguments): Promise<UriSuggestion[]>;
201
+ /**
202
+ * Return a list of dmoz categories that contain the prefix
203
+ * @param prefix input text that should be contained in the category name
204
+ * @param args Object which contains a host of optional parameters
205
+ */
206
+ suggestCategories(prefix: string, args?: ER.SuggestCategoriesArguments): Promise<UriSuggestion[]>;
207
+ /**
208
+ * Return a list of news sources that match the prefix
209
+ * @param prefix input text that should be contained in the source name or uri
210
+ * @param args Object which contains a host of optional parameters
211
+ */
212
+ suggestNewsSources(prefix: string, args?: ER.SuggestNewsSourcesArguments): Promise<UriSuggestion[]>;
213
+ /**
214
+ * Return a list of news source groups that match the prefix
215
+ * @param prefix input text that should be contained in the source group name or uri
216
+ * @param args Object which contains a host of optional parameters
217
+ */
218
+ suggestSourceGroups(prefix: string, args?: ER.SuggestSourceGroupsArguments): Promise<UriSuggestion[]>;
219
+ /**
220
+ * Return a list of geo locations (cities or countries) that contain the prefix
221
+ * @param prefix input text that should be contained in the location name
222
+ * @param args Object which contains a host of optional parameters
223
+ */
224
+ suggestLocations(prefix: string, args?: ER.SuggestLocationsArguments): Promise<ER.Location[]>;
225
+ /**
226
+ * Return a list of geo locations (cities or places) that are close to the provided (lat, long) values
227
+ * @param latitude latitude part of the coordinate
228
+ * @param longitude longitude part of the coordinate
229
+ * @param radiusKm radius in kilometers around the coordinates inside which the locations should be returned
230
+ * @param args Object which contains a host of optional parameters
231
+ */
232
+ suggestLocationsAtCoordinate(latitude: number, longitude: number, radiusKm: number, args?: ER.SuggestLocationsAtCoordinateArguments): Promise<unknown>;
233
+ /**
234
+ * Return a list of news sources that are close to the provided (lat, long) values
235
+ * @param latitude latitude part of the coordinate
236
+ * @param longitude longitude part of the coordinate
237
+ * @param radiusKm radius in kilometers around the coordinates inside which the news sources should be located
238
+ * @param count number of returned suggestions
239
+ */
240
+ suggestSourcesAtCoordinate(latitude: number, longitude: number, radiusKm: number, countOrArgs?: number | ER.SuggestSourcesAtCoordinateArguments): Promise<unknown>;
241
+ /**
242
+ * Return a list of news sources that are close to the provided (lat, long) values
243
+ * @param conceptUri concept that represents a geographic location for which we would like to obtain a list of sources located at the place
244
+ * @param args Object which contains a host of optional parameters
245
+ */
246
+ suggestSourcesAtPlace(conceptUri: string, args?: ER.SuggestSourcesAtPlaceArguments): Promise<unknown>;
247
+ /**
248
+ * Return a list of news sources that match the prefix
249
+ * @param prefix: input text that should be contained in the author name and source url
250
+ * @param page: page of results
251
+ * @param count: number of returned suggestions
252
+ */
253
+ suggestAuthors(prefix: string, args?: ER.SuggestPagedArguments): Promise<ER.Author[]>;
254
+ suggestAuthors(prefix: string, page?: number, count?: number): Promise<ER.Author[]>;
255
+ /**
256
+ * Return a list of event types that match the prefix
257
+ * @param prefix: input text that should be contained in the industry name
258
+ * @param page: page of results
259
+ * @param count: number of returned suggestions
260
+ */
261
+ suggestEventTypes(prefix: string, args?: ER.SuggestPagedArguments): Promise<UriSuggestion[]>;
262
+ suggestEventTypes(prefix: string, page?: number, count?: number): Promise<UriSuggestion[]>;
263
+ /**
264
+ * Return a list of industries that match the prefix. Note: Industries can only be used when querying mentions (QueryMentions, QueryMentionsIter)
265
+ * @param prefix: input text that should be contained in the industry name
266
+ * @param page: page of results
267
+ * @param count: number of returned suggestions
268
+ */
269
+ suggestIndustries(prefix: string, args?: ER.SuggestPagedArguments): Promise<unknown>;
270
+ suggestIndustries(prefix: string, page?: number, count?: number): Promise<unknown>;
271
+ /**
272
+ * Return a list of SDG uris. Note: SDGs can only be used when querying mentions (QueryMentions, QueryMentionsIter)
273
+ */
274
+ getSdgUris(): Promise<unknown>;
275
+ /**
276
+ * Return a list of SASB uris. Note: SASB uris can only be used when querying mentions (QueryMentions, QueryMentionsIter)
277
+ */
278
+ getSasbUris(): Promise<unknown>;
279
+ /**
280
+ * Return a list of concept classes that match the given prefix
281
+ * @param prefix input text that should be contained in the category name
282
+ * @param args Object which contains a host of optional parameters
283
+ */
284
+ suggestConceptClasses(prefix: string, args?: ER.SuggestConceptClassesArguments): Promise<UriSuggestion[]>;
285
+ /**
286
+ * return a concept uri that is the best match for the given concept label
287
+ * if there are multiple matches for the given conceptLabel,
288
+ * they are sorted based on their frequency of occurrence in news (most to least frequent)
289
+ * @param conceptLabel partial or full name of the concept for which to return the concept uri
290
+ * @param args Object which contains a host of optional parameters
291
+ */
292
+ getConceptUri(conceptLabel: string, args?: ER.GetConceptUriArguments): Promise<string | undefined>;
293
+ /**
294
+ * Return a location uri that is the best match for the given location label
295
+ * @param locationLabel partial or full location name for which to return the location uri
296
+ * @param args Object which contains a host of optional parameters
297
+ */
298
+ getLocationUri(locationLabel: string, args?: ER.GetLocationUriArguments): Promise<string | undefined>;
299
+ /**
300
+ * Return a category uri that is the best match for the given label
301
+ * @param categoryLabel partial or full name of the category for which to return category uri
302
+ */
303
+ getCategoryUri(categoryLabel: string): Promise<string | undefined>;
304
+ /**
305
+ * Return an event type uri that is the best match for the given label
306
+ * @param eventTypeLabel partial or full name of the event type for which to return the uri
307
+ */
308
+ getEventTypeUri(eventTypeLabel: string): Promise<string | undefined>;
309
+ /**
310
+ * Return the news source that best matches the source name
311
+ * @param sourceName partial or full name of the source or source uri for which to return source uri
312
+ * @param dataType: return the source uri that provides content of these data types
313
+ */
314
+ getNewsSourceUri(sourceName: string, dataType?: ER.DataType[] | ER.DataType): Promise<string | undefined>;
315
+ /**
316
+ * alternative (shorter) name for the method getNewsSourceUri()
317
+ */
318
+ getSourceUri(sourceName: string, dataType?: ER.DataType[] | ER.DataType): Promise<string | undefined>;
319
+ /**
320
+ * Return the URI of the source group that best matches the name
321
+ * @param sourceGroupName partial or full name of the source group
322
+ */
323
+ getSourceGroupUri(sourceGroupName: string): Promise<string | undefined>;
324
+ /**
325
+ * Return a uri of the concept class that is the best match for the given label
326
+ * @param classLabel partial or full name of the concept class for which to return class uri
327
+ * @param lang language in which the class label is specified
328
+ */
329
+ getConceptClassUri(classLabel: string, lang?: string): Promise<string | undefined>;
330
+ /**
331
+ * Return detailed information about a particular concept
332
+ * @param conceptUri uri of the concept
333
+ * @param returnInfo what details about the concept should be included in the returned information
334
+ */
335
+ getConceptInfo(conceptUri: string, returnInfo?: ReturnInfo): Promise<unknown>;
336
+ /**
337
+ * return author uri that is the best match for the given author name (and potentially source url)
338
+ * if there are multiple matches for the given author name, they are sorted based on the number of articles they have written (from most to least frequent)
339
+ * @param authorName: partial or full name of the author, potentially also containing the source url (e.g. "george brown nytimes")
340
+ */
341
+ getAuthorUri(authorName: string): Promise<string | undefined>;
342
+ static getUriFromUriWgt(uriWgtList: string[]): string[];
343
+ /**
344
+ * If you have article urls and you want to query them in ER you first have to obtain their uris in the ER.
345
+ * @param articleUrls a single article url or a list of article urls
346
+ */
347
+ getArticleUris(articleUrls: string | string[]): Promise<Record<string, unknown>>;
348
+ /**
349
+ * Return the list of source groups
350
+ */
351
+ getSourceGroups(): Promise<unknown>;
352
+ /**
353
+ * Return info about the source group
354
+ */
355
+ getSourceGroup(sourceGroupUri: string): Promise<unknown>;
356
+ }
357
+ /**
358
+ * @class ArticleMapper
359
+ * Create instance of article mapper it will map from article urls to article uris
360
+ * the mappings can be remembered so it will not repeat requests for the same article urls
361
+ */
362
+ export declare class ArticleMapper {
363
+ private er;
364
+ private readonly articleUrlToUri;
365
+ private rememberMappings;
366
+ constructor(er: EventRegistry, rememberMapping?: boolean);
367
+ /**
368
+ * Given the article url, return an array with 0, 1 or more article uris.
369
+ * Not all returned article uris are necessarily valid anymore.
370
+ * For news sources of lower importance we remove the duplicated articles and just keep the latest content
371
+ * @param articleUrl string containing the article url
372
+ */
373
+ getArticleUri(articleUrl: string): Promise<unknown>;
374
+ }
375
+ export {};