x-twitter-scraper 0.12.3 → 0.13.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 (473) hide show
  1. package/CHANGELOG.md +73 -2
  2. package/README.md +66 -51
  3. package/client.d.mts +18 -15
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +18 -15
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +4 -4
  10. package/client.mjs.map +1 -1
  11. package/core/streaming.d.mts +33 -0
  12. package/core/streaming.d.mts.map +1 -0
  13. package/core/streaming.d.ts +33 -0
  14. package/core/streaming.d.ts.map +1 -0
  15. package/core/streaming.js +270 -0
  16. package/core/streaming.js.map +1 -0
  17. package/core/streaming.mjs +265 -0
  18. package/core/streaming.mjs.map +1 -0
  19. package/internal/decoders/line.d.mts +17 -0
  20. package/internal/decoders/line.d.mts.map +1 -0
  21. package/internal/decoders/line.d.ts +17 -0
  22. package/internal/decoders/line.d.ts.map +1 -0
  23. package/internal/decoders/line.js +116 -0
  24. package/internal/decoders/line.js.map +1 -0
  25. package/internal/decoders/line.mjs +111 -0
  26. package/internal/decoders/line.mjs.map +1 -0
  27. package/internal/parse.d.mts.map +1 -1
  28. package/internal/parse.d.ts.map +1 -1
  29. package/internal/parse.js +7 -0
  30. package/internal/parse.js.map +1 -1
  31. package/internal/parse.mjs +7 -0
  32. package/internal/parse.mjs.map +1 -1
  33. package/internal/tslib.js +18 -18
  34. package/package.json +23 -5
  35. package/resources/account.d.mts +35 -12
  36. package/resources/account.d.mts.map +1 -1
  37. package/resources/account.d.ts +35 -12
  38. package/resources/account.d.ts.map +1 -1
  39. package/resources/account.js +4 -3
  40. package/resources/account.js.map +1 -1
  41. package/resources/account.mjs +4 -3
  42. package/resources/account.mjs.map +1 -1
  43. package/resources/compose.d.mts +77 -21
  44. package/resources/compose.d.mts.map +1 -1
  45. package/resources/compose.d.ts +77 -21
  46. package/resources/compose.d.ts.map +1 -1
  47. package/resources/compose.js +3 -4
  48. package/resources/compose.js.map +1 -1
  49. package/resources/compose.mjs +3 -4
  50. package/resources/compose.mjs.map +1 -1
  51. package/resources/credits.d.mts +18 -10
  52. package/resources/credits.d.mts.map +1 -1
  53. package/resources/credits.d.ts +18 -10
  54. package/resources/credits.d.ts.map +1 -1
  55. package/resources/credits.js +5 -4
  56. package/resources/credits.js.map +1 -1
  57. package/resources/credits.mjs +5 -4
  58. package/resources/credits.mjs.map +1 -1
  59. package/resources/drafts.d.mts +13 -17
  60. package/resources/drafts.d.mts.map +1 -1
  61. package/resources/drafts.d.ts +13 -17
  62. package/resources/drafts.d.ts.map +1 -1
  63. package/resources/drafts.js +4 -4
  64. package/resources/drafts.mjs +4 -4
  65. package/resources/draws.d.mts +84 -28
  66. package/resources/draws.d.mts.map +1 -1
  67. package/resources/draws.d.ts +84 -28
  68. package/resources/draws.d.ts.map +1 -1
  69. package/resources/draws.js +24 -9
  70. package/resources/draws.js.map +1 -1
  71. package/resources/draws.mjs +24 -9
  72. package/resources/draws.mjs.map +1 -1
  73. package/resources/events.d.mts +2564 -21
  74. package/resources/events.d.mts.map +1 -1
  75. package/resources/events.d.ts +2564 -21
  76. package/resources/events.d.ts.map +1 -1
  77. package/resources/events.js +34 -2
  78. package/resources/events.js.map +1 -1
  79. package/resources/events.mjs +34 -2
  80. package/resources/events.mjs.map +1 -1
  81. package/resources/extractions.d.mts +410 -128
  82. package/resources/extractions.d.mts.map +1 -1
  83. package/resources/extractions.d.ts +410 -128
  84. package/resources/extractions.d.ts.map +1 -1
  85. package/resources/extractions.js +74 -12
  86. package/resources/extractions.js.map +1 -1
  87. package/resources/extractions.mjs +74 -12
  88. package/resources/extractions.mjs.map +1 -1
  89. package/resources/guest-wallets.d.mts +6 -5
  90. package/resources/guest-wallets.d.mts.map +1 -1
  91. package/resources/guest-wallets.d.ts +6 -5
  92. package/resources/guest-wallets.d.ts.map +1 -1
  93. package/resources/guest-wallets.js +2 -1
  94. package/resources/guest-wallets.js.map +1 -1
  95. package/resources/guest-wallets.mjs +2 -1
  96. package/resources/guest-wallets.mjs.map +1 -1
  97. package/resources/index.d.mts +6 -6
  98. package/resources/index.d.mts.map +1 -1
  99. package/resources/index.d.ts +6 -6
  100. package/resources/index.d.ts.map +1 -1
  101. package/resources/index.js.map +1 -1
  102. package/resources/index.mjs +1 -1
  103. package/resources/index.mjs.map +1 -1
  104. package/resources/monitors/index.d.mts +2 -2
  105. package/resources/monitors/index.d.mts.map +1 -1
  106. package/resources/monitors/index.d.ts +2 -2
  107. package/resources/monitors/index.d.ts.map +1 -1
  108. package/resources/monitors/index.js.map +1 -1
  109. package/resources/monitors/index.mjs.map +1 -1
  110. package/resources/monitors/keywords.d.mts +66 -14
  111. package/resources/monitors/keywords.d.mts.map +1 -1
  112. package/resources/monitors/keywords.d.ts +66 -14
  113. package/resources/monitors/keywords.d.ts.map +1 -1
  114. package/resources/monitors/keywords.js +16 -10
  115. package/resources/monitors/keywords.js.map +1 -1
  116. package/resources/monitors/keywords.mjs +16 -10
  117. package/resources/monitors/keywords.mjs.map +1 -1
  118. package/resources/monitors/monitors.d.mts +53 -16
  119. package/resources/monitors/monitors.d.mts.map +1 -1
  120. package/resources/monitors/monitors.d.ts +53 -16
  121. package/resources/monitors/monitors.d.ts.map +1 -1
  122. package/resources/monitors/monitors.js +12 -10
  123. package/resources/monitors/monitors.js.map +1 -1
  124. package/resources/monitors/monitors.mjs +12 -10
  125. package/resources/monitors/monitors.mjs.map +1 -1
  126. package/resources/radar.d.mts +32 -36
  127. package/resources/radar.d.mts.map +1 -1
  128. package/resources/radar.d.ts +32 -36
  129. package/resources/radar.d.ts.map +1 -1
  130. package/resources/radar.js +1 -1
  131. package/resources/radar.mjs +1 -1
  132. package/resources/shared.d.mts +1726 -233
  133. package/resources/shared.d.mts.map +1 -1
  134. package/resources/shared.d.ts +1726 -233
  135. package/resources/shared.d.ts.map +1 -1
  136. package/resources/styles.d.mts +34 -23
  137. package/resources/styles.d.mts.map +1 -1
  138. package/resources/styles.d.ts +34 -23
  139. package/resources/styles.d.ts.map +1 -1
  140. package/resources/styles.js +11 -13
  141. package/resources/styles.js.map +1 -1
  142. package/resources/styles.mjs +11 -13
  143. package/resources/styles.mjs.map +1 -1
  144. package/resources/subscribe.d.mts +1 -1
  145. package/resources/subscribe.d.ts +1 -1
  146. package/resources/subscribe.js +1 -1
  147. package/resources/subscribe.mjs +1 -1
  148. package/resources/support/index.d.mts +1 -1
  149. package/resources/support/index.d.mts.map +1 -1
  150. package/resources/support/index.d.ts +1 -1
  151. package/resources/support/index.d.ts.map +1 -1
  152. package/resources/support/index.js.map +1 -1
  153. package/resources/support/index.mjs.map +1 -1
  154. package/resources/support/support.d.mts +2 -2
  155. package/resources/support/support.d.mts.map +1 -1
  156. package/resources/support/support.d.ts +2 -2
  157. package/resources/support/support.d.ts.map +1 -1
  158. package/resources/support/support.js.map +1 -1
  159. package/resources/support/support.mjs.map +1 -1
  160. package/resources/support/tickets.d.mts +30 -10
  161. package/resources/support/tickets.d.mts.map +1 -1
  162. package/resources/support/tickets.d.ts +30 -10
  163. package/resources/support/tickets.d.ts.map +1 -1
  164. package/resources/support/tickets.js +7 -7
  165. package/resources/support/tickets.js.map +1 -1
  166. package/resources/support/tickets.mjs +7 -7
  167. package/resources/support/tickets.mjs.map +1 -1
  168. package/resources/trends.d.mts +21 -5
  169. package/resources/trends.d.mts.map +1 -1
  170. package/resources/trends.d.ts +21 -5
  171. package/resources/trends.d.ts.map +1 -1
  172. package/resources/trends.js +2 -1
  173. package/resources/trends.js.map +1 -1
  174. package/resources/trends.mjs +2 -1
  175. package/resources/trends.mjs.map +1 -1
  176. package/resources/webhooks.d.mts +80 -14
  177. package/resources/webhooks.d.mts.map +1 -1
  178. package/resources/webhooks.d.ts +80 -14
  179. package/resources/webhooks.d.ts.map +1 -1
  180. package/resources/webhooks.js +30 -11
  181. package/resources/webhooks.js.map +1 -1
  182. package/resources/webhooks.mjs +30 -11
  183. package/resources/webhooks.mjs.map +1 -1
  184. package/resources/x/account-connection-attempts.d.mts +1 -1
  185. package/resources/x/account-connection-attempts.d.ts +1 -1
  186. package/resources/x/account-connection-attempts.js +1 -1
  187. package/resources/x/account-connection-attempts.mjs +1 -1
  188. package/resources/x/account-connection-challenges.d.mts +30 -11
  189. package/resources/x/account-connection-challenges.d.mts.map +1 -1
  190. package/resources/x/account-connection-challenges.d.ts +30 -11
  191. package/resources/x/account-connection-challenges.d.ts.map +1 -1
  192. package/resources/x/account-connection-challenges.js +5 -4
  193. package/resources/x/account-connection-challenges.js.map +1 -1
  194. package/resources/x/account-connection-challenges.mjs +5 -4
  195. package/resources/x/account-connection-challenges.mjs.map +1 -1
  196. package/resources/x/accounts.d.mts +38 -10
  197. package/resources/x/accounts.d.mts.map +1 -1
  198. package/resources/x/accounts.d.ts +38 -10
  199. package/resources/x/accounts.d.ts.map +1 -1
  200. package/resources/x/accounts.js +8 -7
  201. package/resources/x/accounts.js.map +1 -1
  202. package/resources/x/accounts.mjs +8 -7
  203. package/resources/x/accounts.mjs.map +1 -1
  204. package/resources/x/analysis.d.mts +3274 -0
  205. package/resources/x/analysis.d.mts.map +1 -0
  206. package/resources/x/analysis.d.ts +3274 -0
  207. package/resources/x/analysis.d.ts.map +1 -0
  208. package/resources/x/analysis.js +132 -0
  209. package/resources/x/analysis.js.map +1 -0
  210. package/resources/x/analysis.mjs +128 -0
  211. package/resources/x/analysis.mjs.map +1 -0
  212. package/resources/x/bookmarks.d.mts +84 -9
  213. package/resources/x/bookmarks.d.mts.map +1 -1
  214. package/resources/x/bookmarks.d.ts +84 -9
  215. package/resources/x/bookmarks.d.ts.map +1 -1
  216. package/resources/x/bookmarks.js +6 -4
  217. package/resources/x/bookmarks.js.map +1 -1
  218. package/resources/x/bookmarks.mjs +6 -4
  219. package/resources/x/bookmarks.mjs.map +1 -1
  220. package/resources/x/broadcasts.d.mts +176 -0
  221. package/resources/x/broadcasts.d.mts.map +1 -0
  222. package/resources/x/broadcasts.d.ts +176 -0
  223. package/resources/x/broadcasts.d.ts.map +1 -0
  224. package/resources/x/broadcasts.js +29 -0
  225. package/resources/x/broadcasts.js.map +1 -0
  226. package/resources/x/broadcasts.mjs +25 -0
  227. package/resources/x/broadcasts.mjs.map +1 -0
  228. package/resources/x/communities/communities.d.mts +612 -128
  229. package/resources/x/communities/communities.d.mts.map +1 -1
  230. package/resources/x/communities/communities.d.ts +612 -128
  231. package/resources/x/communities/communities.d.ts.map +1 -1
  232. package/resources/x/communities/communities.js +96 -17
  233. package/resources/x/communities/communities.js.map +1 -1
  234. package/resources/x/communities/communities.mjs +96 -17
  235. package/resources/x/communities/communities.mjs.map +1 -1
  236. package/resources/x/communities/index.d.mts +2 -1
  237. package/resources/x/communities/index.d.mts.map +1 -1
  238. package/resources/x/communities/index.d.ts +2 -1
  239. package/resources/x/communities/index.d.ts.map +1 -1
  240. package/resources/x/communities/index.js +3 -1
  241. package/resources/x/communities/index.js.map +1 -1
  242. package/resources/x/communities/index.mjs +1 -0
  243. package/resources/x/communities/index.mjs.map +1 -1
  244. package/resources/x/communities/join.d.mts +46 -25
  245. package/resources/x/communities/join.d.mts.map +1 -1
  246. package/resources/x/communities/join.d.ts +46 -25
  247. package/resources/x/communities/join.d.ts.map +1 -1
  248. package/resources/x/communities/join.js +10 -7
  249. package/resources/x/communities/join.js.map +1 -1
  250. package/resources/x/communities/join.mjs +10 -7
  251. package/resources/x/communities/join.mjs.map +1 -1
  252. package/resources/x/communities/media.d.mts +197 -0
  253. package/resources/x/communities/media.d.mts.map +1 -0
  254. package/resources/x/communities/media.d.ts +197 -0
  255. package/resources/x/communities/media.d.ts.map +1 -0
  256. package/resources/x/communities/media.js +29 -0
  257. package/resources/x/communities/media.js.map +1 -0
  258. package/resources/x/communities/media.mjs +25 -0
  259. package/resources/x/communities/media.mjs.map +1 -0
  260. package/resources/x/communities/tweets.d.mts +350 -20
  261. package/resources/x/communities/tweets.d.mts.map +1 -1
  262. package/resources/x/communities/tweets.d.ts +350 -20
  263. package/resources/x/communities/tweets.d.ts.map +1 -1
  264. package/resources/x/communities/tweets.js +8 -7
  265. package/resources/x/communities/tweets.js.map +1 -1
  266. package/resources/x/communities/tweets.mjs +8 -7
  267. package/resources/x/communities/tweets.mjs.map +1 -1
  268. package/resources/x/dm.d.mts +245 -13
  269. package/resources/x/dm.d.mts.map +1 -1
  270. package/resources/x/dm.d.ts +245 -13
  271. package/resources/x/dm.d.ts.map +1 -1
  272. package/resources/x/dm.js +29 -2
  273. package/resources/x/dm.js.map +1 -1
  274. package/resources/x/dm.mjs +29 -2
  275. package/resources/x/dm.mjs.map +1 -1
  276. package/resources/x/followers.d.mts +31 -3
  277. package/resources/x/followers.d.mts.map +1 -1
  278. package/resources/x/followers.d.ts +31 -3
  279. package/resources/x/followers.d.ts.map +1 -1
  280. package/resources/x/followers.js +2 -1
  281. package/resources/x/followers.js.map +1 -1
  282. package/resources/x/followers.mjs +2 -1
  283. package/resources/x/followers.mjs.map +1 -1
  284. package/resources/x/index.d.mts +12 -8
  285. package/resources/x/index.d.mts.map +1 -1
  286. package/resources/x/index.d.ts +12 -8
  287. package/resources/x/index.d.ts.map +1 -1
  288. package/resources/x/index.js +9 -1
  289. package/resources/x/index.js.map +1 -1
  290. package/resources/x/index.mjs +5 -1
  291. package/resources/x/index.mjs.map +1 -1
  292. package/resources/x/jobs.d.mts +506 -0
  293. package/resources/x/jobs.d.mts.map +1 -0
  294. package/resources/x/jobs.d.ts +506 -0
  295. package/resources/x/jobs.d.ts.map +1 -0
  296. package/resources/x/jobs.js +60 -0
  297. package/resources/x/jobs.js.map +1 -0
  298. package/resources/x/jobs.mjs +56 -0
  299. package/resources/x/jobs.mjs.map +1 -0
  300. package/resources/x/lists.d.mts +1058 -27
  301. package/resources/x/lists.d.mts.map +1 -1
  302. package/resources/x/lists.d.ts +1058 -27
  303. package/resources/x/lists.d.ts.map +1 -1
  304. package/resources/x/lists.js +39 -9
  305. package/resources/x/lists.js.map +1 -1
  306. package/resources/x/lists.mjs +39 -9
  307. package/resources/x/lists.mjs.map +1 -1
  308. package/resources/x/media.d.mts +24 -13
  309. package/resources/x/media.d.mts.map +1 -1
  310. package/resources/x/media.d.ts +24 -13
  311. package/resources/x/media.d.ts.map +1 -1
  312. package/resources/x/media.js +2 -2
  313. package/resources/x/media.mjs +2 -2
  314. package/resources/x/profile.d.mts +60 -33
  315. package/resources/x/profile.d.mts.map +1 -1
  316. package/resources/x/profile.d.ts +60 -33
  317. package/resources/x/profile.d.ts.map +1 -1
  318. package/resources/x/profile.js +3 -3
  319. package/resources/x/profile.mjs +3 -3
  320. package/resources/x/spaces.d.mts +857 -0
  321. package/resources/x/spaces.d.mts.map +1 -0
  322. package/resources/x/spaces.d.ts +857 -0
  323. package/resources/x/spaces.d.ts.map +1 -0
  324. package/resources/x/spaces.js +58 -0
  325. package/resources/x/spaces.js.map +1 -0
  326. package/resources/x/spaces.mjs +54 -0
  327. package/resources/x/spaces.mjs.map +1 -0
  328. package/resources/x/tweets/index.d.mts +1 -1
  329. package/resources/x/tweets/index.d.mts.map +1 -1
  330. package/resources/x/tweets/index.d.ts +1 -1
  331. package/resources/x/tweets/index.d.ts.map +1 -1
  332. package/resources/x/tweets/index.js.map +1 -1
  333. package/resources/x/tweets/index.mjs.map +1 -1
  334. package/resources/x/tweets/like.d.mts +38 -20
  335. package/resources/x/tweets/like.d.mts.map +1 -1
  336. package/resources/x/tweets/like.d.ts +38 -20
  337. package/resources/x/tweets/like.d.ts.map +1 -1
  338. package/resources/x/tweets/like.js +2 -2
  339. package/resources/x/tweets/like.mjs +2 -2
  340. package/resources/x/tweets/retweet.d.mts +38 -20
  341. package/resources/x/tweets/retweet.d.mts.map +1 -1
  342. package/resources/x/tweets/retweet.d.ts +38 -20
  343. package/resources/x/tweets/retweet.d.ts.map +1 -1
  344. package/resources/x/tweets/retweet.js +2 -2
  345. package/resources/x/tweets/retweet.mjs +2 -2
  346. package/resources/x/tweets/tweets.d.mts +2639 -326
  347. package/resources/x/tweets/tweets.d.mts.map +1 -1
  348. package/resources/x/tweets/tweets.d.ts +2639 -326
  349. package/resources/x/tweets/tweets.d.ts.map +1 -1
  350. package/resources/x/tweets/tweets.js +147 -21
  351. package/resources/x/tweets/tweets.js.map +1 -1
  352. package/resources/x/tweets/tweets.mjs +147 -21
  353. package/resources/x/tweets/tweets.mjs.map +1 -1
  354. package/resources/x/users/follow.d.mts +38 -20
  355. package/resources/x/users/follow.d.mts.map +1 -1
  356. package/resources/x/users/follow.d.ts +38 -20
  357. package/resources/x/users/follow.d.ts.map +1 -1
  358. package/resources/x/users/follow.js +2 -2
  359. package/resources/x/users/follow.mjs +2 -2
  360. package/resources/x/users/index.d.mts +1 -1
  361. package/resources/x/users/index.d.mts.map +1 -1
  362. package/resources/x/users/index.d.ts +1 -1
  363. package/resources/x/users/index.d.ts.map +1 -1
  364. package/resources/x/users/index.js.map +1 -1
  365. package/resources/x/users/index.mjs.map +1 -1
  366. package/resources/x/users/users.d.mts +3068 -457
  367. package/resources/x/users/users.d.mts.map +1 -1
  368. package/resources/x/users/users.d.ts +3068 -457
  369. package/resources/x/users/users.d.ts.map +1 -1
  370. package/resources/x/users/users.js +205 -22
  371. package/resources/x/users/users.js.map +1 -1
  372. package/resources/x/users/users.mjs +205 -22
  373. package/resources/x/users/users.mjs.map +1 -1
  374. package/resources/x/write-actions.d.mts +13 -6
  375. package/resources/x/write-actions.d.mts.map +1 -1
  376. package/resources/x/write-actions.d.ts +13 -6
  377. package/resources/x/write-actions.d.ts.map +1 -1
  378. package/resources/x/write-actions.js +1 -1
  379. package/resources/x/write-actions.mjs +1 -1
  380. package/resources/x/x.d.mts +864 -27
  381. package/resources/x/x.d.mts.map +1 -1
  382. package/resources/x/x.d.ts +864 -27
  383. package/resources/x/x.d.ts.map +1 -1
  384. package/resources/x/x.js +78 -5
  385. package/resources/x/x.js.map +1 -1
  386. package/resources/x/x.mjs +80 -7
  387. package/resources/x/x.mjs.map +1 -1
  388. package/skills/x-twitter-scraper/SKILL.md +97 -350
  389. package/skills/x-twitter-scraper/metadata.json +3 -9
  390. package/skills/x-twitter-scraper/references/draws.md +24 -24
  391. package/skills/x-twitter-scraper/references/extractions.md +71 -62
  392. package/skills/x-twitter-scraper/references/mcp-setup.md +36 -39
  393. package/skills/x-twitter-scraper/references/mcp-tools.md +105 -166
  394. package/skills/x-twitter-scraper/references/python-examples.md +5 -5
  395. package/skills/x-twitter-scraper/references/security.md +8 -8
  396. package/skills/x-twitter-scraper/references/types-mcp-output-schemas.md +4 -4
  397. package/skills/x-twitter-scraper/references/types.md +0 -1
  398. package/skills/x-twitter-scraper/references/usage.md +5 -5
  399. package/skills/x-twitter-scraper/references/webhooks.md +28 -31
  400. package/skills/x-twitter-scraper/references/workflows.md +70 -71
  401. package/skills/x-twitter-scraper/skill-card.md +13 -14
  402. package/skills/x-twitter-scraper/skillspector-report.md +8 -5
  403. package/skills/xquik-account-automation/LICENSE +21 -0
  404. package/skills/xquik-account-automation/SKILL.md +91 -0
  405. package/skills/xquik-social-research/SKILL.md +49 -56
  406. package/src/client.ts +47 -4
  407. package/src/core/streaming.ts +328 -0
  408. package/src/internal/decoders/line.ts +140 -0
  409. package/src/internal/parse.ts +9 -0
  410. package/src/resources/account.ts +41 -12
  411. package/src/resources/compose.ts +77 -21
  412. package/src/resources/credits.ts +19 -10
  413. package/src/resources/drafts.ts +13 -22
  414. package/src/resources/draws.ts +94 -36
  415. package/src/resources/events.ts +3225 -68
  416. package/src/resources/extractions.ts +512 -125
  417. package/src/resources/guest-wallets.ts +6 -5
  418. package/src/resources/index.ts +24 -1
  419. package/src/resources/monitors/index.ts +2 -0
  420. package/src/resources/monitors/keywords.ts +82 -14
  421. package/src/resources/monitors/monitors.ts +66 -14
  422. package/src/resources/radar.ts +32 -36
  423. package/src/resources/shared.ts +2227 -351
  424. package/src/resources/styles.ts +43 -27
  425. package/src/resources/subscribe.ts +1 -1
  426. package/src/resources/support/index.ts +1 -0
  427. package/src/resources/support/support.ts +2 -0
  428. package/src/resources/support/tickets.ts +38 -10
  429. package/src/resources/trends.ts +23 -5
  430. package/src/resources/webhooks.ts +109 -15
  431. package/src/resources/x/account-connection-attempts.ts +1 -1
  432. package/src/resources/x/account-connection-challenges.ts +39 -11
  433. package/src/resources/x/accounts.ts +46 -10
  434. package/src/resources/x/analysis.ts +3947 -0
  435. package/src/resources/x/bookmarks.ts +103 -9
  436. package/src/resources/x/broadcasts.ts +225 -0
  437. package/src/resources/x/communities/communities.ts +743 -141
  438. package/src/resources/x/communities/index.ts +9 -0
  439. package/src/resources/x/communities/join.ts +46 -23
  440. package/src/resources/x/communities/media.ts +251 -0
  441. package/src/resources/x/communities/tweets.ts +427 -20
  442. package/src/resources/x/dm.ts +334 -11
  443. package/src/resources/x/followers.ts +35 -3
  444. package/src/resources/x/index.ts +106 -1
  445. package/src/resources/x/jobs.ts +627 -0
  446. package/src/resources/x/lists.ts +1307 -28
  447. package/src/resources/x/media.ts +24 -12
  448. package/src/resources/x/profile.ts +60 -30
  449. package/src/resources/x/spaces.ts +1076 -0
  450. package/src/resources/x/tweets/index.ts +18 -0
  451. package/src/resources/x/tweets/like.ts +38 -18
  452. package/src/resources/x/tweets/retweet.ts +38 -18
  453. package/src/resources/x/tweets/tweets.ts +3695 -843
  454. package/src/resources/x/users/follow.ts +38 -18
  455. package/src/resources/x/users/index.ts +22 -0
  456. package/src/resources/x/users/users.ts +3687 -465
  457. package/src/resources/x/write-actions.ts +13 -5
  458. package/src/resources/x/x.ts +1227 -15
  459. package/src/streaming.ts +6 -0
  460. package/src/version.ts +1 -1
  461. package/streaming.d.mts +3 -0
  462. package/streaming.d.mts.map +1 -0
  463. package/streaming.d.ts +3 -0
  464. package/streaming.d.ts.map +1 -0
  465. package/streaming.js +9 -0
  466. package/streaming.js.map +1 -0
  467. package/streaming.mjs +6 -0
  468. package/streaming.mjs.map +1 -0
  469. package/version.d.mts +1 -1
  470. package/version.d.ts +1 -1
  471. package/version.js +1 -1
  472. package/version.mjs +1 -1
  473. package/skills/x-twitter-scraper/references/types-rest-api-vs-mcp-field-naming.md +0 -15
@@ -1,28 +1,48 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
2
  import * as Shared from "./shared.mjs";
3
3
  import { APIPromise } from "../core/api-promise.mjs";
4
+ import { Stream } from "../core/streaming.mjs";
4
5
  import { RequestOptions } from "../internal/request-options.mjs";
5
6
  /**
6
7
  * Activity events from monitored accounts
7
8
  */
8
9
  export declare class Events extends APIResource {
9
10
  /**
10
- * Get event
11
+ * Returns one monitor event owned by the account.
11
12
  */
12
13
  retrieve(id: string, options?: RequestOptions): APIPromise<EventDetail>;
13
14
  /**
14
- * List events
15
+ * Returns monitor events with cursor pagination and filters.
15
16
  */
16
17
  list(query?: EventListParams | null | undefined, options?: RequestOptions): APIPromise<EventListResponse>;
18
+ /**
19
+ * Streams the account's monitor events as server-sent events, each named by its
20
+ * event type and numbered by its event ID. A reconnect that sends Last-Event-ID
21
+ * first gets every event after that one from the last 30 days, then each new
22
+ * event. A connection lasts up to 30 minutes and sends a comment every 15 seconds
23
+ * while idle. Keep up to 5 streams open per account. Events and streams cost no
24
+ * credits.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const stream = await client.events.stream();
29
+ *
30
+ * for await (const event of stream) {
31
+ * console.log(event);
32
+ * }
33
+ * ```
34
+ */
35
+ stream(params?: EventStreamParams | null | undefined, options?: RequestOptions): APIPromise<Stream<Event>>;
17
36
  }
18
37
  /**
19
38
  * Monitor event summary with source metadata and occurrence time.
20
39
  */
21
40
  export interface Event {
22
41
  id: string;
23
- data: {
24
- [key: string]: unknown;
25
- };
42
+ /**
43
+ * Post fields match REST. Legacy fields remain available.
44
+ */
45
+ data: Event.MonitorPost | Event.MonitorProfileChange | Event.MonitorLegacyPost;
26
46
  /**
27
47
  * Account monitor ID for account events, or keyword monitor ID for keyword events.
28
48
  */
@@ -33,21 +53,1281 @@ export interface Event {
33
53
  monitorType: 'account' | 'keyword';
34
54
  occurredAt: string;
35
55
  /**
36
- * Type of monitor event fired when account activity occurs.
56
+ * Type of monitor event fired when account activity occurs. tweet.deleted fires
57
+ * once X confirms the account deleted a post the monitor saw. Its data is the post
58
+ * as last seen. broadcast.started & space.started fire when the account posts its
59
+ * running live video or Space. Their data is that post. A live the account does
60
+ * not post is not seen. following.added & following.removed fire when the account
61
+ * follows or unfollows someone, with that account's profile. Keyword monitors take
62
+ * the 10 post types only.
37
63
  */
38
64
  type: Shared.EventType;
39
65
  /**
40
66
  * Keyword monitor ID, present for keyword monitor events.
41
67
  */
42
68
  keywordMonitorId?: string;
69
+ /**
70
+ * Your monitor label when Xquik created the event, present when set. A rename
71
+ * leaves the event's label unchanged.
72
+ */
73
+ monitorName?: string;
43
74
  /**
44
75
  * Keyword query, present for keyword monitor events.
45
76
  */
46
77
  query?: string;
47
78
  /**
48
- * Account username, present for account monitor events.
79
+ * Current account username, present for account monitor events.
49
80
  */
50
81
  username?: string;
82
+ /**
83
+ * Permanent X user ID of the monitored account, present for account monitor
84
+ * events. It stays the same after a username change.
85
+ */
86
+ xUserId?: string;
87
+ }
88
+ export declare namespace Event {
89
+ /**
90
+ * Monitored post with public fields and retained legacy fields.
91
+ */
92
+ interface MonitorPost {
93
+ id: string;
94
+ bookmarkCount: number;
95
+ likeCount: number;
96
+ quoteCount: number;
97
+ replyCount: number;
98
+ retweetCount: number;
99
+ text: string;
100
+ viewCount: number;
101
+ /**
102
+ * Describes an X Article preview and its lifecycle metadata.
103
+ */
104
+ article?: MonitorPost.Article;
105
+ /**
106
+ * Public profile with retained legacy monitor fields.
107
+ */
108
+ author?: MonitorPost.Author;
109
+ /**
110
+ * Why the tweet has no author. X serves a suspended or deleted account as an
111
+ * unavailable user with a reason such as Suspended or NotFound. Omitted when the
112
+ * author is available.
113
+ */
114
+ authorUnavailable?: MonitorPost.AuthorUnavailable;
115
+ card?: MonitorPost.Card;
116
+ /**
117
+ * Price charts the author attached under the post, 1 per cashtag. Absent when the
118
+ * post has none. X may send a cashtag without a chart window.
119
+ */
120
+ cashtagAttachments?: Array<MonitorPost.CashtagAttachment>;
121
+ /**
122
+ * Community ID.
123
+ */
124
+ communityId?: string;
125
+ /**
126
+ * Community name. Present when X sends it with the post.
127
+ */
128
+ communityName?: string;
129
+ /**
130
+ * Community Note presentation metadata returned by X.
131
+ */
132
+ communityNote?: MonitorPost.CommunityNote;
133
+ /**
134
+ * Content disclosure metadata shown by X when a tweet is labeled as paid
135
+ * partnership content or AI-generated media.
136
+ */
137
+ contentDisclosure?: Shared.ContentDisclosure;
138
+ /**
139
+ * Reply policy & conversation owner.
140
+ */
141
+ conversationControl?: MonitorPost.ConversationControl;
142
+ conversationId?: string;
143
+ /**
144
+ * Author-published point, with longitude before latitude.
145
+ */
146
+ coordinates?: MonitorPost.Coordinates;
147
+ createdAt?: string;
148
+ displayTextRange?: Array<number>;
149
+ /**
150
+ * Lists edit-chain identifiers and the remaining edit window.
151
+ */
152
+ edit?: MonitorPost.Edit;
153
+ /**
154
+ * Lists hashtags, symbols, links, and mentions from tweet text.
155
+ */
156
+ entities?: MonitorPost.Entities;
157
+ /**
158
+ * Marks a subscriber-only post with the creator whose subscription unlocks it.
159
+ * Non-subscribers get the preview text & the subscribe link. Omitted on public
160
+ * posts.
161
+ */
162
+ exclusiveContent?: MonitorPost.ExclusiveContent;
163
+ /**
164
+ * Author-published point, with latitude before longitude.
165
+ */
166
+ geo?: MonitorPost.Geo;
167
+ /**
168
+ * Public metadata whose fields are defined by X.
169
+ */
170
+ grokShareAttachment?: {
171
+ [key: string]: unknown;
172
+ };
173
+ /**
174
+ * Grok's translation of the post, as X shows it.
175
+ */
176
+ grokTranslatedPost?: {
177
+ [key: string]: unknown;
178
+ };
179
+ /**
180
+ * Whether X holds Community Notes on the post, shown or not.
181
+ */
182
+ hasCommunityNotes?: boolean;
183
+ inReplyToId?: string;
184
+ inReplyToUserId?: string;
185
+ inReplyToUsername?: string;
186
+ /**
187
+ * The notice x.com covers the post with until the reader views it, such as X's
188
+ * public interest notice on a post that broke its rules but stays up.
189
+ */
190
+ interstitial?: MonitorPost.Interstitial;
191
+ isLimitedReply?: boolean;
192
+ isNoteTweet?: boolean;
193
+ isPinned?: boolean;
194
+ isQuoteStatus?: boolean;
195
+ isReply?: boolean;
196
+ isRetweet?: boolean;
197
+ isTranslatable?: boolean;
198
+ /**
199
+ * Public metadata whose fields are defined by X.
200
+ */
201
+ jetfuelAttachment?: {
202
+ [key: string]: unknown;
203
+ };
204
+ lang?: string;
205
+ /**
206
+ * Public restrictions & prompts.
207
+ */
208
+ limitedActions?: Array<MonitorPost.LimitedAction>;
209
+ /**
210
+ * Media, omitted when unavailable.
211
+ */
212
+ media?: Array<Shared.TweetMedia>;
213
+ /**
214
+ * Complete Note Tweet content and rich-text metadata.
215
+ */
216
+ noteTweet?: MonitorPost.NoteTweet;
217
+ /**
218
+ * A parent, quoted or retweeted tweet. It has the TweetPublicData fields and an
219
+ * author. Nesting stops after 4 levels.
220
+ */
221
+ parentTweet?: Shared.EmbeddedTweet;
222
+ /**
223
+ * Describes public place metadata on a geotagged tweet.
224
+ */
225
+ place?: MonitorPost.Place;
226
+ possiblySensitive?: boolean;
227
+ /**
228
+ * Public metadata whose fields are defined by X.
229
+ */
230
+ postCta?: {
231
+ [key: string]: unknown;
232
+ };
233
+ /**
234
+ * Engagement counts retained from a prior tweet edit.
235
+ */
236
+ previousCounts?: MonitorPost.PreviousCounts;
237
+ /**
238
+ * Embedded post with public fields and legacy profile aliases.
239
+ */
240
+ quoted_tweet?: MonitorPost.QuotedTweet;
241
+ quotedTweetId?: string;
242
+ /**
243
+ * The quoted post's link, kept when X withholds that post.
244
+ */
245
+ quotedTweetPermalink?: MonitorPost.QuotedTweetPermalink;
246
+ /**
247
+ * Why X shows no quoted post. Omitted when X names no reason, as its legacy
248
+ * answers never do.
249
+ */
250
+ quotedTweetUnavailable?: MonitorPost.QuotedTweetUnavailable;
251
+ reactionContext?: MonitorPost.ReactionContext;
252
+ /**
253
+ * Embedded post with public fields and legacy profile aliases.
254
+ */
255
+ retweeted_tweet?: MonitorPost.RetweetedTweet;
256
+ /**
257
+ * Repost event time in UTC. Null when unavailable; omitted for other posts.
258
+ */
259
+ retweetedAt?: string | null;
260
+ /**
261
+ * Public metadata whose fields are defined by X.
262
+ */
263
+ scopes?: {
264
+ [key: string]: unknown;
265
+ };
266
+ /**
267
+ * The app the post was sent from, as X labels it. X sends it for some posts only.
268
+ */
269
+ source?: string;
270
+ /**
271
+ * Game metadata attached to this post.
272
+ */
273
+ sportsContext?: MonitorPost.SportsContext;
274
+ /**
275
+ * The Subscriber badge X shows on a reply. The reply's author subscribes to the
276
+ * creator who started the conversation. Omitted on a post without the badge.
277
+ */
278
+ subscriberBadge?: MonitorPost.SubscriberBadge;
279
+ /**
280
+ * Where `text` matches the search, on each row a search read. Offsets count code
281
+ * points of `text`, as `displayTextRange` does. Empty when X marks nothing in the
282
+ * post. X marks matches only in a post's first 280 characters.
283
+ */
284
+ textHighlights?: Array<MonitorPost.TextHighlight>;
285
+ /**
286
+ * Public visibility notice attached to an available tweet.
287
+ */
288
+ tombstone?: MonitorPost.Tombstone;
289
+ type?: string;
290
+ /**
291
+ * The author's ID when X withholds the author's profile.
292
+ */
293
+ unavailableAuthorId?: string;
294
+ /**
295
+ * User IDs that left this conversation.
296
+ */
297
+ unmentionedUserIds?: Array<string>;
298
+ url?: string;
299
+ viewState?: string;
300
+ }
301
+ namespace MonitorPost {
302
+ /**
303
+ * Describes an X Article preview and its lifecycle metadata.
304
+ */
305
+ interface Article {
306
+ id?: string;
307
+ /**
308
+ * Public metadata whose fields are defined by X.
309
+ */
310
+ coverMedia?: {
311
+ [key: string]: unknown;
312
+ };
313
+ coverMediaUrl?: string;
314
+ /**
315
+ * Public metadata whose fields are defined by X.
316
+ */
317
+ lifecycleState?: {
318
+ [key: string]: unknown;
319
+ };
320
+ /**
321
+ * Public metadata whose fields are defined by X.
322
+ */
323
+ metadata?: {
324
+ [key: string]: unknown;
325
+ };
326
+ previewText?: string;
327
+ title?: string;
328
+ }
329
+ /**
330
+ * Public profile with retained legacy monitor fields.
331
+ */
332
+ interface Author extends Shared.UserProfile {
333
+ /**
334
+ * Original X flag. Read verified for the displayed badge.
335
+ *
336
+ * @deprecated
337
+ */
338
+ rawVerified?: boolean;
339
+ /**
340
+ * Legacy username alias. Read username instead.
341
+ *
342
+ * @deprecated
343
+ */
344
+ userName?: string;
345
+ }
346
+ /**
347
+ * Why the tweet has no author. X serves a suspended or deleted account as an
348
+ * unavailable user with a reason such as Suspended or NotFound. Omitted when the
349
+ * author is available.
350
+ */
351
+ interface AuthorUnavailable {
352
+ /**
353
+ * X's reason code.
354
+ */
355
+ reason: string;
356
+ /**
357
+ * X's notice text for the reason.
358
+ */
359
+ message?: string;
360
+ }
361
+ interface Card {
362
+ id?: string;
363
+ /**
364
+ * Public metadata whose fields are defined by X.
365
+ */
366
+ bindingValues?: {
367
+ [key: string]: unknown;
368
+ };
369
+ name?: string;
370
+ /**
371
+ * Public metadata whose fields are defined by X.
372
+ */
373
+ platform?: {
374
+ [key: string]: unknown;
375
+ };
376
+ url?: string;
377
+ /**
378
+ * Unresolved card user references.
379
+ */
380
+ userReferenceErrors?: Array<Card.UserReferenceError>;
381
+ userReferences?: Array<Card.UserReference>;
382
+ }
383
+ namespace Card {
384
+ interface UserReferenceError {
385
+ message?: string;
386
+ reason?: string;
387
+ }
388
+ /**
389
+ * Public profile with retained legacy monitor fields.
390
+ */
391
+ interface UserReference extends Shared.UserProfile {
392
+ /**
393
+ * Original X flag. Read verified for the displayed badge.
394
+ *
395
+ * @deprecated
396
+ */
397
+ rawVerified?: boolean;
398
+ /**
399
+ * Legacy username alias. Read username instead.
400
+ *
401
+ * @deprecated
402
+ */
403
+ userName?: string;
404
+ }
405
+ }
406
+ interface CashtagAttachment {
407
+ /**
408
+ * The cashtag with its `$`.
409
+ */
410
+ cashtag: string;
411
+ /**
412
+ * Span of each candle.
413
+ */
414
+ candleSize?: string;
415
+ /**
416
+ * Time of the chart's last price.
417
+ */
418
+ endTime?: string;
419
+ /**
420
+ * X's size for the chart.
421
+ */
422
+ sizeVariant?: number;
423
+ /**
424
+ * Time of the chart's first candle.
425
+ */
426
+ startTime?: string;
427
+ /**
428
+ * Span the chart covers.
429
+ */
430
+ timeframe?: string;
431
+ }
432
+ /**
433
+ * Community Note presentation metadata returned by X.
434
+ */
435
+ interface CommunityNote {
436
+ id?: string;
437
+ destinationUrl?: string;
438
+ footer?: string;
439
+ footerIconType?: string;
440
+ iconType?: string;
441
+ /**
442
+ * Public metadata whose fields are defined by X.
443
+ */
444
+ metadata?: {
445
+ [key: string]: unknown;
446
+ };
447
+ shortTitle?: string;
448
+ subtitle?: string;
449
+ title?: string;
450
+ visualStyle?: string;
451
+ }
452
+ /**
453
+ * Reply policy & conversation owner.
454
+ */
455
+ interface ConversationControl {
456
+ /**
457
+ * Regions whose accounts may reply, as country codes. Sent with the
458
+ * `country_of_origin` mode.
459
+ */
460
+ allowedCountryCodes?: Array<string>;
461
+ inviteViaMention?: boolean;
462
+ /**
463
+ * Reply policy from X's newer field, such as `my_network`, `premium` or
464
+ * `country_of_origin`. Omitted when X sends none.
465
+ */
466
+ mode?: string;
467
+ /**
468
+ * The conversation owner's account ID.
469
+ */
470
+ ownerId?: string;
471
+ ownerUsername?: string;
472
+ policy?: string;
473
+ }
474
+ /**
475
+ * Author-published point, with longitude before latitude.
476
+ */
477
+ interface Coordinates {
478
+ coordinates: Array<number>;
479
+ type: 'Point';
480
+ }
481
+ /**
482
+ * Lists edit-chain identifiers and the remaining edit window.
483
+ */
484
+ interface Edit {
485
+ editableUntilMsecs?: string;
486
+ editTweetIds?: Array<string>;
487
+ initialTweetId?: string;
488
+ }
489
+ /**
490
+ * Lists hashtags, symbols, links, and mentions from tweet text.
491
+ */
492
+ interface Entities {
493
+ hashtags?: Array<Entities.Hashtag>;
494
+ smarttags?: Array<Entities.Smarttag>;
495
+ symbols?: Array<Entities.Symbol>;
496
+ timestamps?: Array<Entities.Timestamp>;
497
+ urls?: Array<Entities.URL>;
498
+ user_mentions?: Array<Entities.UserMention>;
499
+ }
500
+ namespace Entities {
501
+ /**
502
+ * Provides hashtag text and source offsets within a tweet.
503
+ */
504
+ interface Hashtag {
505
+ text: string;
506
+ indices?: Array<number>;
507
+ /**
508
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
509
+ * platforms, which differ by reader.
510
+ */
511
+ tag?: Hashtag.Tag;
512
+ }
513
+ namespace Hashtag {
514
+ /**
515
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
516
+ * platforms, which differ by reader.
517
+ */
518
+ interface Tag {
519
+ /**
520
+ * X's ID for the SmartTag.
521
+ */
522
+ id?: string;
523
+ info?: Tag.Info;
524
+ }
525
+ namespace Tag {
526
+ interface Info {
527
+ info?: Info.Info;
528
+ }
529
+ namespace Info {
530
+ interface Info {
531
+ /**
532
+ * Whether X marks the SmartTag active.
533
+ */
534
+ active?: boolean;
535
+ name?: string;
536
+ ticker?: string;
537
+ }
538
+ }
539
+ }
540
+ }
541
+ /**
542
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
543
+ */
544
+ interface Smarttag {
545
+ indices?: Array<number>;
546
+ seconds?: number;
547
+ /**
548
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
549
+ * platforms, which differ by reader.
550
+ */
551
+ tag?: Smarttag.Tag;
552
+ text?: string;
553
+ }
554
+ namespace Smarttag {
555
+ /**
556
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
557
+ * platforms, which differ by reader.
558
+ */
559
+ interface Tag {
560
+ /**
561
+ * X's ID for the SmartTag.
562
+ */
563
+ id?: string;
564
+ info?: Tag.Info;
565
+ }
566
+ namespace Tag {
567
+ interface Info {
568
+ info?: Info.Info;
569
+ }
570
+ namespace Info {
571
+ interface Info {
572
+ /**
573
+ * Whether X marks the SmartTag active.
574
+ */
575
+ active?: boolean;
576
+ name?: string;
577
+ ticker?: string;
578
+ }
579
+ }
580
+ }
581
+ }
582
+ /**
583
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
584
+ */
585
+ interface Symbol {
586
+ indices?: Array<number>;
587
+ seconds?: number;
588
+ /**
589
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
590
+ * platforms, which differ by reader.
591
+ */
592
+ tag?: Symbol.Tag;
593
+ text?: string;
594
+ }
595
+ namespace Symbol {
596
+ /**
597
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
598
+ * platforms, which differ by reader.
599
+ */
600
+ interface Tag {
601
+ /**
602
+ * X's ID for the SmartTag.
603
+ */
604
+ id?: string;
605
+ info?: Tag.Info;
606
+ }
607
+ namespace Tag {
608
+ interface Info {
609
+ info?: Info.Info;
610
+ }
611
+ namespace Info {
612
+ interface Info {
613
+ /**
614
+ * Whether X marks the SmartTag active.
615
+ */
616
+ active?: boolean;
617
+ name?: string;
618
+ ticker?: string;
619
+ }
620
+ }
621
+ }
622
+ }
623
+ /**
624
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
625
+ */
626
+ interface Timestamp {
627
+ indices?: Array<number>;
628
+ seconds?: number;
629
+ /**
630
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
631
+ * platforms, which differ by reader.
632
+ */
633
+ tag?: Timestamp.Tag;
634
+ text?: string;
635
+ }
636
+ namespace Timestamp {
637
+ /**
638
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
639
+ * platforms, which differ by reader.
640
+ */
641
+ interface Tag {
642
+ /**
643
+ * X's ID for the SmartTag.
644
+ */
645
+ id?: string;
646
+ info?: Tag.Info;
647
+ }
648
+ namespace Tag {
649
+ interface Info {
650
+ info?: Info.Info;
651
+ }
652
+ namespace Info {
653
+ interface Info {
654
+ /**
655
+ * Whether X marks the SmartTag active.
656
+ */
657
+ active?: boolean;
658
+ name?: string;
659
+ ticker?: string;
660
+ }
661
+ }
662
+ }
663
+ }
664
+ /**
665
+ * Provides shortened, display, and expanded URLs from tweet text.
666
+ */
667
+ interface URL {
668
+ display_url?: string;
669
+ expanded_url?: string;
670
+ indices?: Array<number>;
671
+ url?: string;
672
+ }
673
+ /**
674
+ * Provides profile identity and source offsets for a mention.
675
+ */
676
+ interface UserMention {
677
+ screen_name: string;
678
+ id_str?: string;
679
+ indices?: Array<number>;
680
+ name?: string;
681
+ }
682
+ }
683
+ /**
684
+ * Marks a subscriber-only post with the creator whose subscription unlocks it.
685
+ * Non-subscribers get the preview text & the subscribe link. Omitted on public
686
+ * posts.
687
+ */
688
+ interface ExclusiveContent {
689
+ /**
690
+ * Username of the creator whose subscription unlocks the post.
691
+ */
692
+ creatorUserName: string;
693
+ /**
694
+ * Subscribe link X shows non-subscribers. Omitted when X serves the full post.
695
+ */
696
+ subscribeUrl?: string;
697
+ }
698
+ /**
699
+ * Author-published point, with latitude before longitude.
700
+ */
701
+ interface Geo {
702
+ coordinates: Array<number>;
703
+ type: 'Point';
704
+ }
705
+ /**
706
+ * The notice x.com covers the post with until the reader views it, such as X's
707
+ * public interest notice on a post that broke its rules but stays up.
708
+ */
709
+ interface Interstitial {
710
+ /**
711
+ * How x.com shows the notice. `NonCompliant` marks a post that broke X's rules.
712
+ */
713
+ displayType?: string;
714
+ text?: Interstitial.Text;
715
+ }
716
+ namespace Interstitial {
717
+ interface Text {
718
+ /**
719
+ * Links inside the notice, by character range.
720
+ */
721
+ entities?: Array<Text.Entity>;
722
+ /**
723
+ * Whether X writes it right to left.
724
+ */
725
+ rtl?: boolean;
726
+ /**
727
+ * The notice's text.
728
+ */
729
+ text?: string;
730
+ }
731
+ namespace Text {
732
+ interface Entity {
733
+ /**
734
+ * Whole number from 0.
735
+ */
736
+ fromIndex?: number;
737
+ ref?: Entity.Ref;
738
+ /**
739
+ * Whole number from 0.
740
+ */
741
+ toIndex?: number;
742
+ }
743
+ namespace Entity {
744
+ interface Ref {
745
+ type?: string;
746
+ url?: string;
747
+ urlType?: string;
748
+ }
749
+ }
750
+ }
751
+ }
752
+ interface LimitedAction {
753
+ action?: string;
754
+ prompt?: LimitedAction.Prompt;
755
+ }
756
+ namespace LimitedAction {
757
+ interface Prompt {
758
+ ctaType?: string;
759
+ headline?: string;
760
+ /**
761
+ * Public metadata whose fields are defined by X.
762
+ */
763
+ metadata?: {
764
+ [key: string]: unknown;
765
+ };
766
+ subtext?: string;
767
+ }
768
+ }
769
+ /**
770
+ * Complete Note Tweet content and rich-text metadata.
771
+ */
772
+ interface NoteTweet {
773
+ text: string;
774
+ /**
775
+ * X's global ID of the Note, base64 of `NoteTweet:<noteId>`.
776
+ */
777
+ id?: string;
778
+ /**
779
+ * Lists hashtags, symbols, links, and mentions from tweet text.
780
+ */
781
+ entities?: NoteTweet.Entities;
782
+ /**
783
+ * Inline media positions in the Note Tweet text.
784
+ */
785
+ inlineMedia?: Array<NoteTweet.InlineMedia>;
786
+ isExpandable?: boolean;
787
+ /**
788
+ * The Note's own ID, apart from the post's.
789
+ */
790
+ noteId?: string;
791
+ richtextTags?: Array<NoteTweet.RichtextTag>;
792
+ }
793
+ namespace NoteTweet {
794
+ /**
795
+ * Lists hashtags, symbols, links, and mentions from tweet text.
796
+ */
797
+ interface Entities {
798
+ hashtags?: Array<Entities.Hashtag>;
799
+ smarttags?: Array<Entities.Smarttag>;
800
+ symbols?: Array<Entities.Symbol>;
801
+ timestamps?: Array<Entities.Timestamp>;
802
+ urls?: Array<Entities.URL>;
803
+ user_mentions?: Array<Entities.UserMention>;
804
+ }
805
+ namespace Entities {
806
+ /**
807
+ * Provides hashtag text and source offsets within a tweet.
808
+ */
809
+ interface Hashtag {
810
+ text: string;
811
+ indices?: Array<number>;
812
+ /**
813
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
814
+ * platforms, which differ by reader.
815
+ */
816
+ tag?: Hashtag.Tag;
817
+ }
818
+ namespace Hashtag {
819
+ /**
820
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
821
+ * platforms, which differ by reader.
822
+ */
823
+ interface Tag {
824
+ /**
825
+ * X's ID for the SmartTag.
826
+ */
827
+ id?: string;
828
+ info?: Tag.Info;
829
+ }
830
+ namespace Tag {
831
+ interface Info {
832
+ info?: Info.Info;
833
+ }
834
+ namespace Info {
835
+ interface Info {
836
+ /**
837
+ * Whether X marks the SmartTag active.
838
+ */
839
+ active?: boolean;
840
+ name?: string;
841
+ ticker?: string;
842
+ }
843
+ }
844
+ }
845
+ }
846
+ /**
847
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
848
+ */
849
+ interface Smarttag {
850
+ indices?: Array<number>;
851
+ seconds?: number;
852
+ /**
853
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
854
+ * platforms, which differ by reader.
855
+ */
856
+ tag?: Smarttag.Tag;
857
+ text?: string;
858
+ }
859
+ namespace Smarttag {
860
+ /**
861
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
862
+ * platforms, which differ by reader.
863
+ */
864
+ interface Tag {
865
+ /**
866
+ * X's ID for the SmartTag.
867
+ */
868
+ id?: string;
869
+ info?: Tag.Info;
870
+ }
871
+ namespace Tag {
872
+ interface Info {
873
+ info?: Info.Info;
874
+ }
875
+ namespace Info {
876
+ interface Info {
877
+ /**
878
+ * Whether X marks the SmartTag active.
879
+ */
880
+ active?: boolean;
881
+ name?: string;
882
+ ticker?: string;
883
+ }
884
+ }
885
+ }
886
+ }
887
+ /**
888
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
889
+ */
890
+ interface Symbol {
891
+ indices?: Array<number>;
892
+ seconds?: number;
893
+ /**
894
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
895
+ * platforms, which differ by reader.
896
+ */
897
+ tag?: Symbol.Tag;
898
+ text?: string;
899
+ }
900
+ namespace Symbol {
901
+ /**
902
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
903
+ * platforms, which differ by reader.
904
+ */
905
+ interface Tag {
906
+ /**
907
+ * X's ID for the SmartTag.
908
+ */
909
+ id?: string;
910
+ info?: Tag.Info;
911
+ }
912
+ namespace Tag {
913
+ interface Info {
914
+ info?: Info.Info;
915
+ }
916
+ namespace Info {
917
+ interface Info {
918
+ /**
919
+ * Whether X marks the SmartTag active.
920
+ */
921
+ active?: boolean;
922
+ name?: string;
923
+ ticker?: string;
924
+ }
925
+ }
926
+ }
927
+ }
928
+ /**
929
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
930
+ */
931
+ interface Timestamp {
932
+ indices?: Array<number>;
933
+ seconds?: number;
934
+ /**
935
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
936
+ * platforms, which differ by reader.
937
+ */
938
+ tag?: Timestamp.Tag;
939
+ text?: string;
940
+ }
941
+ namespace Timestamp {
942
+ /**
943
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
944
+ * platforms, which differ by reader.
945
+ */
946
+ interface Tag {
947
+ /**
948
+ * X's ID for the SmartTag.
949
+ */
950
+ id?: string;
951
+ info?: Tag.Info;
952
+ }
953
+ namespace Tag {
954
+ interface Info {
955
+ info?: Info.Info;
956
+ }
957
+ namespace Info {
958
+ interface Info {
959
+ /**
960
+ * Whether X marks the SmartTag active.
961
+ */
962
+ active?: boolean;
963
+ name?: string;
964
+ ticker?: string;
965
+ }
966
+ }
967
+ }
968
+ }
969
+ /**
970
+ * Provides shortened, display, and expanded URLs from tweet text.
971
+ */
972
+ interface URL {
973
+ display_url?: string;
974
+ expanded_url?: string;
975
+ indices?: Array<number>;
976
+ url?: string;
977
+ }
978
+ /**
979
+ * Provides profile identity and source offsets for a mention.
980
+ */
981
+ interface UserMention {
982
+ screen_name: string;
983
+ id_str?: string;
984
+ indices?: Array<number>;
985
+ name?: string;
986
+ }
987
+ }
988
+ interface InlineMedia {
989
+ /**
990
+ * Whole number from 0.
991
+ */
992
+ index: number;
993
+ mediaId: string;
994
+ }
995
+ interface RichtextTag {
996
+ /**
997
+ * Whole number from 0.
998
+ */
999
+ fromIndex: number;
1000
+ /**
1001
+ * Whole number from 0.
1002
+ */
1003
+ toIndex: number;
1004
+ types: Array<string>;
1005
+ }
1006
+ }
1007
+ /**
1008
+ * Describes public place metadata on a geotagged tweet.
1009
+ */
1010
+ interface Place {
1011
+ id?: string;
1012
+ /**
1013
+ * Public metadata whose fields are defined by X.
1014
+ */
1015
+ boundingBox?: {
1016
+ [key: string]: unknown;
1017
+ };
1018
+ country?: string;
1019
+ countryCode?: string;
1020
+ fullName?: string;
1021
+ name?: string;
1022
+ placeType?: string;
1023
+ url?: string;
1024
+ }
1025
+ /**
1026
+ * Engagement counts retained from a prior tweet edit.
1027
+ */
1028
+ interface PreviousCounts {
1029
+ /**
1030
+ * Whole number from 0.
1031
+ */
1032
+ bookmarkCount?: number;
1033
+ /**
1034
+ * Whole number from 0.
1035
+ */
1036
+ likeCount?: number;
1037
+ /**
1038
+ * Whole number from 0.
1039
+ */
1040
+ quoteCount?: number;
1041
+ /**
1042
+ * Whole number from 0.
1043
+ */
1044
+ replyCount?: number;
1045
+ /**
1046
+ * Whole number from 0.
1047
+ */
1048
+ retweetCount?: number;
1049
+ }
1050
+ /**
1051
+ * Embedded post with public fields and legacy profile aliases.
1052
+ */
1053
+ interface QuotedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
1054
+ /**
1055
+ * Public profile with retained legacy monitor fields.
1056
+ */
1057
+ author?: QuotedTweet.Author;
1058
+ }
1059
+ namespace QuotedTweet {
1060
+ /**
1061
+ * Public profile with retained legacy monitor fields.
1062
+ */
1063
+ interface Author extends Shared.UserProfile {
1064
+ /**
1065
+ * Original X flag. Read verified for the displayed badge.
1066
+ *
1067
+ * @deprecated
1068
+ */
1069
+ rawVerified?: boolean;
1070
+ /**
1071
+ * Legacy username alias. Read username instead.
1072
+ *
1073
+ * @deprecated
1074
+ */
1075
+ userName?: string;
1076
+ }
1077
+ }
1078
+ /**
1079
+ * The quoted post's link, kept when X withholds that post.
1080
+ */
1081
+ interface QuotedTweetPermalink {
1082
+ displayUrl?: string;
1083
+ expandedUrl?: string;
1084
+ url?: string;
1085
+ }
1086
+ /**
1087
+ * Why X shows no quoted post. Omitted when X names no reason, as its legacy
1088
+ * answers never do.
1089
+ */
1090
+ interface QuotedTweetUnavailable {
1091
+ /**
1092
+ * X's reason, such as `Suspended` for a suspended author or `Protected` for an
1093
+ * author who protects their posts.
1094
+ */
1095
+ reason: string;
1096
+ }
1097
+ interface ReactionContext {
1098
+ reactedToPostId?: string;
1099
+ /**
1100
+ * Public profile with retained legacy monitor fields.
1101
+ */
1102
+ reactedToUser?: ReactionContext.ReactedToUser;
1103
+ }
1104
+ namespace ReactionContext {
1105
+ /**
1106
+ * Public profile with retained legacy monitor fields.
1107
+ */
1108
+ interface ReactedToUser extends Shared.UserProfile {
1109
+ /**
1110
+ * Original X flag. Read verified for the displayed badge.
1111
+ *
1112
+ * @deprecated
1113
+ */
1114
+ rawVerified?: boolean;
1115
+ /**
1116
+ * Legacy username alias. Read username instead.
1117
+ *
1118
+ * @deprecated
1119
+ */
1120
+ userName?: string;
1121
+ }
1122
+ }
1123
+ /**
1124
+ * Embedded post with public fields and legacy profile aliases.
1125
+ */
1126
+ interface RetweetedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
1127
+ /**
1128
+ * Public profile with retained legacy monitor fields.
1129
+ */
1130
+ author?: RetweetedTweet.Author;
1131
+ }
1132
+ namespace RetweetedTweet {
1133
+ /**
1134
+ * Public profile with retained legacy monitor fields.
1135
+ */
1136
+ interface Author extends Shared.UserProfile {
1137
+ /**
1138
+ * Original X flag. Read verified for the displayed badge.
1139
+ *
1140
+ * @deprecated
1141
+ */
1142
+ rawVerified?: boolean;
1143
+ /**
1144
+ * Legacy username alias. Read username instead.
1145
+ *
1146
+ * @deprecated
1147
+ */
1148
+ userName?: string;
1149
+ }
1150
+ }
1151
+ /**
1152
+ * Game metadata attached to this post.
1153
+ */
1154
+ interface SportsContext {
1155
+ /**
1156
+ * Teams & reported scores.
1157
+ */
1158
+ competitors?: Array<SportsContext.Competitor>;
1159
+ /**
1160
+ * Game ID.
1161
+ */
1162
+ gameId?: string;
1163
+ /**
1164
+ * League ID.
1165
+ */
1166
+ league?: string;
1167
+ /**
1168
+ * Scheduled Unix milliseconds, retaining the source type.
1169
+ */
1170
+ scheduledAtMs?: number | string;
1171
+ /**
1172
+ * Reported game state.
1173
+ */
1174
+ state?: string;
1175
+ /**
1176
+ * Game progress text.
1177
+ */
1178
+ statusText?: string;
1179
+ /**
1180
+ * Game title.
1181
+ */
1182
+ title?: string;
1183
+ /**
1184
+ * Game link.
1185
+ */
1186
+ url?: string;
1187
+ }
1188
+ namespace SportsContext {
1189
+ interface Competitor {
1190
+ /**
1191
+ * Team abbreviation.
1192
+ */
1193
+ abbreviation?: string;
1194
+ /**
1195
+ * Team display color.
1196
+ */
1197
+ color?: string;
1198
+ /**
1199
+ * Logo for dark backgrounds.
1200
+ */
1201
+ darkLogoUrl?: string;
1202
+ /**
1203
+ * Active competitor.
1204
+ */
1205
+ isActive?: boolean;
1206
+ /**
1207
+ * Winning competitor.
1208
+ */
1209
+ isWinner?: boolean;
1210
+ /**
1211
+ * Logo for light backgrounds.
1212
+ */
1213
+ logoUrl?: string;
1214
+ /**
1215
+ * Team name.
1216
+ */
1217
+ name?: string;
1218
+ /**
1219
+ * Score display text.
1220
+ */
1221
+ score?: string;
1222
+ /**
1223
+ * Team ID.
1224
+ */
1225
+ teamId?: string;
1226
+ }
1227
+ }
1228
+ /**
1229
+ * The Subscriber badge X shows on a reply. The reply's author subscribes to the
1230
+ * creator who started the conversation. Omitted on a post without the badge.
1231
+ */
1232
+ interface SubscriberBadge {
1233
+ /**
1234
+ * Account ID of the creator the author subscribes to.
1235
+ */
1236
+ creatorId: string;
1237
+ }
1238
+ interface TextHighlight {
1239
+ /**
1240
+ * The first code point after the match.
1241
+ */
1242
+ endIndex: number;
1243
+ /**
1244
+ * The first code point of the match.
1245
+ */
1246
+ startIndex: number;
1247
+ }
1248
+ /**
1249
+ * Public visibility notice attached to an available tweet.
1250
+ */
1251
+ interface Tombstone {
1252
+ text?: Tombstone.Text;
1253
+ /**
1254
+ * Visibility notice type.
1255
+ */
1256
+ type?: string;
1257
+ }
1258
+ namespace Tombstone {
1259
+ interface Text {
1260
+ entities?: Array<Text.Entity>;
1261
+ /**
1262
+ * Right-to-left text direction.
1263
+ */
1264
+ rtl?: boolean;
1265
+ /**
1266
+ * Human-readable notice text.
1267
+ */
1268
+ text?: string;
1269
+ }
1270
+ namespace Text {
1271
+ interface Entity {
1272
+ /**
1273
+ * Whole number from 0.
1274
+ */
1275
+ fromIndex?: number;
1276
+ ref?: Entity.Ref;
1277
+ /**
1278
+ * Whole number from 0.
1279
+ */
1280
+ toIndex?: number;
1281
+ }
1282
+ namespace Entity {
1283
+ interface Ref {
1284
+ type?: string;
1285
+ url?: string;
1286
+ urlType?: string;
1287
+ }
1288
+ }
1289
+ }
1290
+ }
1291
+ }
1292
+ /**
1293
+ * Changed profile field with its previous and current values.
1294
+ */
1295
+ interface MonitorProfileChange {
1296
+ field: string;
1297
+ /**
1298
+ * Permanent X user ID.
1299
+ */
1300
+ userId: string;
1301
+ /**
1302
+ * Username observed for this change.
1303
+ */
1304
+ username: string;
1305
+ /**
1306
+ * Profile text, flag, or pinned post IDs. Missing values are omitted.
1307
+ */
1308
+ current?: string | boolean | Array<string>;
1309
+ /**
1310
+ * Profile text, flag, or pinned post IDs. Missing values are omitted.
1311
+ */
1312
+ previous?: string | boolean | Array<string>;
1313
+ }
1314
+ /**
1315
+ * Older stored posts remain readable. Fields can be missing or null.
1316
+ */
1317
+ interface MonitorLegacyPost {
1318
+ id?: string;
1319
+ author?: {
1320
+ [key: string]: unknown;
1321
+ } | null;
1322
+ quoted_tweet?: {
1323
+ [key: string]: unknown;
1324
+ } | null;
1325
+ retweeted_tweet?: {
1326
+ [key: string]: unknown;
1327
+ } | null;
1328
+ text?: string;
1329
+ [k: string]: unknown;
1330
+ }
51
1331
  }
52
1332
  /**
53
1333
  * Full monitor event including payload data and optional X event ID.
@@ -55,11 +1335,9 @@ export interface Event {
55
1335
  export interface EventDetail {
56
1336
  id: string;
57
1337
  /**
58
- * Event payload - shape varies by event type (JSON)
1338
+ * Post or profile-change payload for the event type.
59
1339
  */
60
- data: {
61
- [key: string]: unknown;
62
- };
1340
+ data: EventDetail.MonitorPost | EventDetail.MonitorProfileChange | EventDetail.MonitorLegacyPost;
63
1341
  /**
64
1342
  * Monitor ID associated with this detailed event payload.
65
1343
  */
@@ -70,22 +1348,1282 @@ export interface EventDetail {
70
1348
  monitorType: 'account' | 'keyword';
71
1349
  occurredAt: string;
72
1350
  /**
73
- * Type of monitor event fired when account activity occurs.
1351
+ * Type of monitor event fired when account activity occurs. tweet.deleted fires
1352
+ * once X confirms the account deleted a post the monitor saw. Its data is the post
1353
+ * as last seen. broadcast.started & space.started fire when the account posts its
1354
+ * running live video or Space. Their data is that post. A live the account does
1355
+ * not post is not seen. following.added & following.removed fire when the account
1356
+ * follows or unfollows someone, with that account's profile. Keyword monitors take
1357
+ * the 10 post types only.
74
1358
  */
75
1359
  type: Shared.EventType;
76
1360
  /**
77
1361
  * Keyword monitor ID included on detailed keyword events.
78
1362
  */
79
1363
  keywordMonitorId?: string;
1364
+ /**
1365
+ * Your monitor label when Xquik created this event, present when set. A rename
1366
+ * leaves the event's label unchanged.
1367
+ */
1368
+ monitorName?: string;
80
1369
  /**
81
1370
  * Keyword query for this detailed monitor event.
82
1371
  */
83
1372
  query?: string;
84
1373
  /**
85
- * Account username for this detailed monitor event.
1374
+ * Current account username for this detailed event.
86
1375
  */
87
1376
  username?: string;
88
1377
  xEventId?: string;
1378
+ /**
1379
+ * Permanent X user ID of the monitored account on account events. It stays the
1380
+ * same after a username change.
1381
+ */
1382
+ xUserId?: string;
1383
+ }
1384
+ export declare namespace EventDetail {
1385
+ /**
1386
+ * Monitored post with public fields and retained legacy fields.
1387
+ */
1388
+ interface MonitorPost {
1389
+ id: string;
1390
+ bookmarkCount: number;
1391
+ likeCount: number;
1392
+ quoteCount: number;
1393
+ replyCount: number;
1394
+ retweetCount: number;
1395
+ text: string;
1396
+ viewCount: number;
1397
+ /**
1398
+ * Describes an X Article preview and its lifecycle metadata.
1399
+ */
1400
+ article?: MonitorPost.Article;
1401
+ /**
1402
+ * Public profile with retained legacy monitor fields.
1403
+ */
1404
+ author?: MonitorPost.Author;
1405
+ /**
1406
+ * Why the tweet has no author. X serves a suspended or deleted account as an
1407
+ * unavailable user with a reason such as Suspended or NotFound. Omitted when the
1408
+ * author is available.
1409
+ */
1410
+ authorUnavailable?: MonitorPost.AuthorUnavailable;
1411
+ card?: MonitorPost.Card;
1412
+ /**
1413
+ * Price charts the author attached under the post, 1 per cashtag. Absent when the
1414
+ * post has none. X may send a cashtag without a chart window.
1415
+ */
1416
+ cashtagAttachments?: Array<MonitorPost.CashtagAttachment>;
1417
+ /**
1418
+ * Community ID.
1419
+ */
1420
+ communityId?: string;
1421
+ /**
1422
+ * Community name. Present when X sends it with the post.
1423
+ */
1424
+ communityName?: string;
1425
+ /**
1426
+ * Community Note presentation metadata returned by X.
1427
+ */
1428
+ communityNote?: MonitorPost.CommunityNote;
1429
+ /**
1430
+ * Content disclosure metadata shown by X when a tweet is labeled as paid
1431
+ * partnership content or AI-generated media.
1432
+ */
1433
+ contentDisclosure?: Shared.ContentDisclosure;
1434
+ /**
1435
+ * Reply policy & conversation owner.
1436
+ */
1437
+ conversationControl?: MonitorPost.ConversationControl;
1438
+ conversationId?: string;
1439
+ /**
1440
+ * Author-published point, with longitude before latitude.
1441
+ */
1442
+ coordinates?: MonitorPost.Coordinates;
1443
+ createdAt?: string;
1444
+ displayTextRange?: Array<number>;
1445
+ /**
1446
+ * Lists edit-chain identifiers and the remaining edit window.
1447
+ */
1448
+ edit?: MonitorPost.Edit;
1449
+ /**
1450
+ * Lists hashtags, symbols, links, and mentions from tweet text.
1451
+ */
1452
+ entities?: MonitorPost.Entities;
1453
+ /**
1454
+ * Marks a subscriber-only post with the creator whose subscription unlocks it.
1455
+ * Non-subscribers get the preview text & the subscribe link. Omitted on public
1456
+ * posts.
1457
+ */
1458
+ exclusiveContent?: MonitorPost.ExclusiveContent;
1459
+ /**
1460
+ * Author-published point, with latitude before longitude.
1461
+ */
1462
+ geo?: MonitorPost.Geo;
1463
+ /**
1464
+ * Public metadata whose fields are defined by X.
1465
+ */
1466
+ grokShareAttachment?: {
1467
+ [key: string]: unknown;
1468
+ };
1469
+ /**
1470
+ * Grok's translation of the post, as X shows it.
1471
+ */
1472
+ grokTranslatedPost?: {
1473
+ [key: string]: unknown;
1474
+ };
1475
+ /**
1476
+ * Whether X holds Community Notes on the post, shown or not.
1477
+ */
1478
+ hasCommunityNotes?: boolean;
1479
+ inReplyToId?: string;
1480
+ inReplyToUserId?: string;
1481
+ inReplyToUsername?: string;
1482
+ /**
1483
+ * The notice x.com covers the post with until the reader views it, such as X's
1484
+ * public interest notice on a post that broke its rules but stays up.
1485
+ */
1486
+ interstitial?: MonitorPost.Interstitial;
1487
+ isLimitedReply?: boolean;
1488
+ isNoteTweet?: boolean;
1489
+ isPinned?: boolean;
1490
+ isQuoteStatus?: boolean;
1491
+ isReply?: boolean;
1492
+ isRetweet?: boolean;
1493
+ isTranslatable?: boolean;
1494
+ /**
1495
+ * Public metadata whose fields are defined by X.
1496
+ */
1497
+ jetfuelAttachment?: {
1498
+ [key: string]: unknown;
1499
+ };
1500
+ lang?: string;
1501
+ /**
1502
+ * Public restrictions & prompts.
1503
+ */
1504
+ limitedActions?: Array<MonitorPost.LimitedAction>;
1505
+ /**
1506
+ * Media, omitted when unavailable.
1507
+ */
1508
+ media?: Array<Shared.TweetMedia>;
1509
+ /**
1510
+ * Complete Note Tweet content and rich-text metadata.
1511
+ */
1512
+ noteTweet?: MonitorPost.NoteTweet;
1513
+ /**
1514
+ * A parent, quoted or retweeted tweet. It has the TweetPublicData fields and an
1515
+ * author. Nesting stops after 4 levels.
1516
+ */
1517
+ parentTweet?: Shared.EmbeddedTweet;
1518
+ /**
1519
+ * Describes public place metadata on a geotagged tweet.
1520
+ */
1521
+ place?: MonitorPost.Place;
1522
+ possiblySensitive?: boolean;
1523
+ /**
1524
+ * Public metadata whose fields are defined by X.
1525
+ */
1526
+ postCta?: {
1527
+ [key: string]: unknown;
1528
+ };
1529
+ /**
1530
+ * Engagement counts retained from a prior tweet edit.
1531
+ */
1532
+ previousCounts?: MonitorPost.PreviousCounts;
1533
+ /**
1534
+ * Embedded post with public fields and legacy profile aliases.
1535
+ */
1536
+ quoted_tweet?: MonitorPost.QuotedTweet;
1537
+ quotedTweetId?: string;
1538
+ /**
1539
+ * The quoted post's link, kept when X withholds that post.
1540
+ */
1541
+ quotedTweetPermalink?: MonitorPost.QuotedTweetPermalink;
1542
+ /**
1543
+ * Why X shows no quoted post. Omitted when X names no reason, as its legacy
1544
+ * answers never do.
1545
+ */
1546
+ quotedTweetUnavailable?: MonitorPost.QuotedTweetUnavailable;
1547
+ reactionContext?: MonitorPost.ReactionContext;
1548
+ /**
1549
+ * Embedded post with public fields and legacy profile aliases.
1550
+ */
1551
+ retweeted_tweet?: MonitorPost.RetweetedTweet;
1552
+ /**
1553
+ * Repost event time in UTC. Null when unavailable; omitted for other posts.
1554
+ */
1555
+ retweetedAt?: string | null;
1556
+ /**
1557
+ * Public metadata whose fields are defined by X.
1558
+ */
1559
+ scopes?: {
1560
+ [key: string]: unknown;
1561
+ };
1562
+ /**
1563
+ * The app the post was sent from, as X labels it. X sends it for some posts only.
1564
+ */
1565
+ source?: string;
1566
+ /**
1567
+ * Game metadata attached to this post.
1568
+ */
1569
+ sportsContext?: MonitorPost.SportsContext;
1570
+ /**
1571
+ * The Subscriber badge X shows on a reply. The reply's author subscribes to the
1572
+ * creator who started the conversation. Omitted on a post without the badge.
1573
+ */
1574
+ subscriberBadge?: MonitorPost.SubscriberBadge;
1575
+ /**
1576
+ * Where `text` matches the search, on each row a search read. Offsets count code
1577
+ * points of `text`, as `displayTextRange` does. Empty when X marks nothing in the
1578
+ * post. X marks matches only in a post's first 280 characters.
1579
+ */
1580
+ textHighlights?: Array<MonitorPost.TextHighlight>;
1581
+ /**
1582
+ * Public visibility notice attached to an available tweet.
1583
+ */
1584
+ tombstone?: MonitorPost.Tombstone;
1585
+ type?: string;
1586
+ /**
1587
+ * The author's ID when X withholds the author's profile.
1588
+ */
1589
+ unavailableAuthorId?: string;
1590
+ /**
1591
+ * User IDs that left this conversation.
1592
+ */
1593
+ unmentionedUserIds?: Array<string>;
1594
+ url?: string;
1595
+ viewState?: string;
1596
+ }
1597
+ namespace MonitorPost {
1598
+ /**
1599
+ * Describes an X Article preview and its lifecycle metadata.
1600
+ */
1601
+ interface Article {
1602
+ id?: string;
1603
+ /**
1604
+ * Public metadata whose fields are defined by X.
1605
+ */
1606
+ coverMedia?: {
1607
+ [key: string]: unknown;
1608
+ };
1609
+ coverMediaUrl?: string;
1610
+ /**
1611
+ * Public metadata whose fields are defined by X.
1612
+ */
1613
+ lifecycleState?: {
1614
+ [key: string]: unknown;
1615
+ };
1616
+ /**
1617
+ * Public metadata whose fields are defined by X.
1618
+ */
1619
+ metadata?: {
1620
+ [key: string]: unknown;
1621
+ };
1622
+ previewText?: string;
1623
+ title?: string;
1624
+ }
1625
+ /**
1626
+ * Public profile with retained legacy monitor fields.
1627
+ */
1628
+ interface Author extends Shared.UserProfile {
1629
+ /**
1630
+ * Original X flag. Read verified for the displayed badge.
1631
+ *
1632
+ * @deprecated
1633
+ */
1634
+ rawVerified?: boolean;
1635
+ /**
1636
+ * Legacy username alias. Read username instead.
1637
+ *
1638
+ * @deprecated
1639
+ */
1640
+ userName?: string;
1641
+ }
1642
+ /**
1643
+ * Why the tweet has no author. X serves a suspended or deleted account as an
1644
+ * unavailable user with a reason such as Suspended or NotFound. Omitted when the
1645
+ * author is available.
1646
+ */
1647
+ interface AuthorUnavailable {
1648
+ /**
1649
+ * X's reason code.
1650
+ */
1651
+ reason: string;
1652
+ /**
1653
+ * X's notice text for the reason.
1654
+ */
1655
+ message?: string;
1656
+ }
1657
+ interface Card {
1658
+ id?: string;
1659
+ /**
1660
+ * Public metadata whose fields are defined by X.
1661
+ */
1662
+ bindingValues?: {
1663
+ [key: string]: unknown;
1664
+ };
1665
+ name?: string;
1666
+ /**
1667
+ * Public metadata whose fields are defined by X.
1668
+ */
1669
+ platform?: {
1670
+ [key: string]: unknown;
1671
+ };
1672
+ url?: string;
1673
+ /**
1674
+ * Unresolved card user references.
1675
+ */
1676
+ userReferenceErrors?: Array<Card.UserReferenceError>;
1677
+ userReferences?: Array<Card.UserReference>;
1678
+ }
1679
+ namespace Card {
1680
+ interface UserReferenceError {
1681
+ message?: string;
1682
+ reason?: string;
1683
+ }
1684
+ /**
1685
+ * Public profile with retained legacy monitor fields.
1686
+ */
1687
+ interface UserReference extends Shared.UserProfile {
1688
+ /**
1689
+ * Original X flag. Read verified for the displayed badge.
1690
+ *
1691
+ * @deprecated
1692
+ */
1693
+ rawVerified?: boolean;
1694
+ /**
1695
+ * Legacy username alias. Read username instead.
1696
+ *
1697
+ * @deprecated
1698
+ */
1699
+ userName?: string;
1700
+ }
1701
+ }
1702
+ interface CashtagAttachment {
1703
+ /**
1704
+ * The cashtag with its `$`.
1705
+ */
1706
+ cashtag: string;
1707
+ /**
1708
+ * Span of each candle.
1709
+ */
1710
+ candleSize?: string;
1711
+ /**
1712
+ * Time of the chart's last price.
1713
+ */
1714
+ endTime?: string;
1715
+ /**
1716
+ * X's size for the chart.
1717
+ */
1718
+ sizeVariant?: number;
1719
+ /**
1720
+ * Time of the chart's first candle.
1721
+ */
1722
+ startTime?: string;
1723
+ /**
1724
+ * Span the chart covers.
1725
+ */
1726
+ timeframe?: string;
1727
+ }
1728
+ /**
1729
+ * Community Note presentation metadata returned by X.
1730
+ */
1731
+ interface CommunityNote {
1732
+ id?: string;
1733
+ destinationUrl?: string;
1734
+ footer?: string;
1735
+ footerIconType?: string;
1736
+ iconType?: string;
1737
+ /**
1738
+ * Public metadata whose fields are defined by X.
1739
+ */
1740
+ metadata?: {
1741
+ [key: string]: unknown;
1742
+ };
1743
+ shortTitle?: string;
1744
+ subtitle?: string;
1745
+ title?: string;
1746
+ visualStyle?: string;
1747
+ }
1748
+ /**
1749
+ * Reply policy & conversation owner.
1750
+ */
1751
+ interface ConversationControl {
1752
+ /**
1753
+ * Regions whose accounts may reply, as country codes. Sent with the
1754
+ * `country_of_origin` mode.
1755
+ */
1756
+ allowedCountryCodes?: Array<string>;
1757
+ inviteViaMention?: boolean;
1758
+ /**
1759
+ * Reply policy from X's newer field, such as `my_network`, `premium` or
1760
+ * `country_of_origin`. Omitted when X sends none.
1761
+ */
1762
+ mode?: string;
1763
+ /**
1764
+ * The conversation owner's account ID.
1765
+ */
1766
+ ownerId?: string;
1767
+ ownerUsername?: string;
1768
+ policy?: string;
1769
+ }
1770
+ /**
1771
+ * Author-published point, with longitude before latitude.
1772
+ */
1773
+ interface Coordinates {
1774
+ coordinates: Array<number>;
1775
+ type: 'Point';
1776
+ }
1777
+ /**
1778
+ * Lists edit-chain identifiers and the remaining edit window.
1779
+ */
1780
+ interface Edit {
1781
+ editableUntilMsecs?: string;
1782
+ editTweetIds?: Array<string>;
1783
+ initialTweetId?: string;
1784
+ }
1785
+ /**
1786
+ * Lists hashtags, symbols, links, and mentions from tweet text.
1787
+ */
1788
+ interface Entities {
1789
+ hashtags?: Array<Entities.Hashtag>;
1790
+ smarttags?: Array<Entities.Smarttag>;
1791
+ symbols?: Array<Entities.Symbol>;
1792
+ timestamps?: Array<Entities.Timestamp>;
1793
+ urls?: Array<Entities.URL>;
1794
+ user_mentions?: Array<Entities.UserMention>;
1795
+ }
1796
+ namespace Entities {
1797
+ /**
1798
+ * Provides hashtag text and source offsets within a tweet.
1799
+ */
1800
+ interface Hashtag {
1801
+ text: string;
1802
+ indices?: Array<number>;
1803
+ /**
1804
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1805
+ * platforms, which differ by reader.
1806
+ */
1807
+ tag?: Hashtag.Tag;
1808
+ }
1809
+ namespace Hashtag {
1810
+ /**
1811
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1812
+ * platforms, which differ by reader.
1813
+ */
1814
+ interface Tag {
1815
+ /**
1816
+ * X's ID for the SmartTag.
1817
+ */
1818
+ id?: string;
1819
+ info?: Tag.Info;
1820
+ }
1821
+ namespace Tag {
1822
+ interface Info {
1823
+ info?: Info.Info;
1824
+ }
1825
+ namespace Info {
1826
+ interface Info {
1827
+ /**
1828
+ * Whether X marks the SmartTag active.
1829
+ */
1830
+ active?: boolean;
1831
+ name?: string;
1832
+ ticker?: string;
1833
+ }
1834
+ }
1835
+ }
1836
+ }
1837
+ /**
1838
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
1839
+ */
1840
+ interface Smarttag {
1841
+ indices?: Array<number>;
1842
+ seconds?: number;
1843
+ /**
1844
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1845
+ * platforms, which differ by reader.
1846
+ */
1847
+ tag?: Smarttag.Tag;
1848
+ text?: string;
1849
+ }
1850
+ namespace Smarttag {
1851
+ /**
1852
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1853
+ * platforms, which differ by reader.
1854
+ */
1855
+ interface Tag {
1856
+ /**
1857
+ * X's ID for the SmartTag.
1858
+ */
1859
+ id?: string;
1860
+ info?: Tag.Info;
1861
+ }
1862
+ namespace Tag {
1863
+ interface Info {
1864
+ info?: Info.Info;
1865
+ }
1866
+ namespace Info {
1867
+ interface Info {
1868
+ /**
1869
+ * Whether X marks the SmartTag active.
1870
+ */
1871
+ active?: boolean;
1872
+ name?: string;
1873
+ ticker?: string;
1874
+ }
1875
+ }
1876
+ }
1877
+ }
1878
+ /**
1879
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
1880
+ */
1881
+ interface Symbol {
1882
+ indices?: Array<number>;
1883
+ seconds?: number;
1884
+ /**
1885
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1886
+ * platforms, which differ by reader.
1887
+ */
1888
+ tag?: Symbol.Tag;
1889
+ text?: string;
1890
+ }
1891
+ namespace Symbol {
1892
+ /**
1893
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1894
+ * platforms, which differ by reader.
1895
+ */
1896
+ interface Tag {
1897
+ /**
1898
+ * X's ID for the SmartTag.
1899
+ */
1900
+ id?: string;
1901
+ info?: Tag.Info;
1902
+ }
1903
+ namespace Tag {
1904
+ interface Info {
1905
+ info?: Info.Info;
1906
+ }
1907
+ namespace Info {
1908
+ interface Info {
1909
+ /**
1910
+ * Whether X marks the SmartTag active.
1911
+ */
1912
+ active?: boolean;
1913
+ name?: string;
1914
+ ticker?: string;
1915
+ }
1916
+ }
1917
+ }
1918
+ }
1919
+ /**
1920
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
1921
+ */
1922
+ interface Timestamp {
1923
+ indices?: Array<number>;
1924
+ seconds?: number;
1925
+ /**
1926
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1927
+ * platforms, which differ by reader.
1928
+ */
1929
+ tag?: Timestamp.Tag;
1930
+ text?: string;
1931
+ }
1932
+ namespace Timestamp {
1933
+ /**
1934
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1935
+ * platforms, which differ by reader.
1936
+ */
1937
+ interface Tag {
1938
+ /**
1939
+ * X's ID for the SmartTag.
1940
+ */
1941
+ id?: string;
1942
+ info?: Tag.Info;
1943
+ }
1944
+ namespace Tag {
1945
+ interface Info {
1946
+ info?: Info.Info;
1947
+ }
1948
+ namespace Info {
1949
+ interface Info {
1950
+ /**
1951
+ * Whether X marks the SmartTag active.
1952
+ */
1953
+ active?: boolean;
1954
+ name?: string;
1955
+ ticker?: string;
1956
+ }
1957
+ }
1958
+ }
1959
+ }
1960
+ /**
1961
+ * Provides shortened, display, and expanded URLs from tweet text.
1962
+ */
1963
+ interface URL {
1964
+ display_url?: string;
1965
+ expanded_url?: string;
1966
+ indices?: Array<number>;
1967
+ url?: string;
1968
+ }
1969
+ /**
1970
+ * Provides profile identity and source offsets for a mention.
1971
+ */
1972
+ interface UserMention {
1973
+ screen_name: string;
1974
+ id_str?: string;
1975
+ indices?: Array<number>;
1976
+ name?: string;
1977
+ }
1978
+ }
1979
+ /**
1980
+ * Marks a subscriber-only post with the creator whose subscription unlocks it.
1981
+ * Non-subscribers get the preview text & the subscribe link. Omitted on public
1982
+ * posts.
1983
+ */
1984
+ interface ExclusiveContent {
1985
+ /**
1986
+ * Username of the creator whose subscription unlocks the post.
1987
+ */
1988
+ creatorUserName: string;
1989
+ /**
1990
+ * Subscribe link X shows non-subscribers. Omitted when X serves the full post.
1991
+ */
1992
+ subscribeUrl?: string;
1993
+ }
1994
+ /**
1995
+ * Author-published point, with latitude before longitude.
1996
+ */
1997
+ interface Geo {
1998
+ coordinates: Array<number>;
1999
+ type: 'Point';
2000
+ }
2001
+ /**
2002
+ * The notice x.com covers the post with until the reader views it, such as X's
2003
+ * public interest notice on a post that broke its rules but stays up.
2004
+ */
2005
+ interface Interstitial {
2006
+ /**
2007
+ * How x.com shows the notice. `NonCompliant` marks a post that broke X's rules.
2008
+ */
2009
+ displayType?: string;
2010
+ text?: Interstitial.Text;
2011
+ }
2012
+ namespace Interstitial {
2013
+ interface Text {
2014
+ /**
2015
+ * Links inside the notice, by character range.
2016
+ */
2017
+ entities?: Array<Text.Entity>;
2018
+ /**
2019
+ * Whether X writes it right to left.
2020
+ */
2021
+ rtl?: boolean;
2022
+ /**
2023
+ * The notice's text.
2024
+ */
2025
+ text?: string;
2026
+ }
2027
+ namespace Text {
2028
+ interface Entity {
2029
+ /**
2030
+ * Whole number from 0.
2031
+ */
2032
+ fromIndex?: number;
2033
+ ref?: Entity.Ref;
2034
+ /**
2035
+ * Whole number from 0.
2036
+ */
2037
+ toIndex?: number;
2038
+ }
2039
+ namespace Entity {
2040
+ interface Ref {
2041
+ type?: string;
2042
+ url?: string;
2043
+ urlType?: string;
2044
+ }
2045
+ }
2046
+ }
2047
+ }
2048
+ interface LimitedAction {
2049
+ action?: string;
2050
+ prompt?: LimitedAction.Prompt;
2051
+ }
2052
+ namespace LimitedAction {
2053
+ interface Prompt {
2054
+ ctaType?: string;
2055
+ headline?: string;
2056
+ /**
2057
+ * Public metadata whose fields are defined by X.
2058
+ */
2059
+ metadata?: {
2060
+ [key: string]: unknown;
2061
+ };
2062
+ subtext?: string;
2063
+ }
2064
+ }
2065
+ /**
2066
+ * Complete Note Tweet content and rich-text metadata.
2067
+ */
2068
+ interface NoteTweet {
2069
+ text: string;
2070
+ /**
2071
+ * X's global ID of the Note, base64 of `NoteTweet:<noteId>`.
2072
+ */
2073
+ id?: string;
2074
+ /**
2075
+ * Lists hashtags, symbols, links, and mentions from tweet text.
2076
+ */
2077
+ entities?: NoteTweet.Entities;
2078
+ /**
2079
+ * Inline media positions in the Note Tweet text.
2080
+ */
2081
+ inlineMedia?: Array<NoteTweet.InlineMedia>;
2082
+ isExpandable?: boolean;
2083
+ /**
2084
+ * The Note's own ID, apart from the post's.
2085
+ */
2086
+ noteId?: string;
2087
+ richtextTags?: Array<NoteTweet.RichtextTag>;
2088
+ }
2089
+ namespace NoteTweet {
2090
+ /**
2091
+ * Lists hashtags, symbols, links, and mentions from tweet text.
2092
+ */
2093
+ interface Entities {
2094
+ hashtags?: Array<Entities.Hashtag>;
2095
+ smarttags?: Array<Entities.Smarttag>;
2096
+ symbols?: Array<Entities.Symbol>;
2097
+ timestamps?: Array<Entities.Timestamp>;
2098
+ urls?: Array<Entities.URL>;
2099
+ user_mentions?: Array<Entities.UserMention>;
2100
+ }
2101
+ namespace Entities {
2102
+ /**
2103
+ * Provides hashtag text and source offsets within a tweet.
2104
+ */
2105
+ interface Hashtag {
2106
+ text: string;
2107
+ indices?: Array<number>;
2108
+ /**
2109
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
2110
+ * platforms, which differ by reader.
2111
+ */
2112
+ tag?: Hashtag.Tag;
2113
+ }
2114
+ namespace Hashtag {
2115
+ /**
2116
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
2117
+ * platforms, which differ by reader.
2118
+ */
2119
+ interface Tag {
2120
+ /**
2121
+ * X's ID for the SmartTag.
2122
+ */
2123
+ id?: string;
2124
+ info?: Tag.Info;
2125
+ }
2126
+ namespace Tag {
2127
+ interface Info {
2128
+ info?: Info.Info;
2129
+ }
2130
+ namespace Info {
2131
+ interface Info {
2132
+ /**
2133
+ * Whether X marks the SmartTag active.
2134
+ */
2135
+ active?: boolean;
2136
+ name?: string;
2137
+ ticker?: string;
2138
+ }
2139
+ }
2140
+ }
2141
+ }
2142
+ /**
2143
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
2144
+ */
2145
+ interface Smarttag {
2146
+ indices?: Array<number>;
2147
+ seconds?: number;
2148
+ /**
2149
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
2150
+ * platforms, which differ by reader.
2151
+ */
2152
+ tag?: Smarttag.Tag;
2153
+ text?: string;
2154
+ }
2155
+ namespace Smarttag {
2156
+ /**
2157
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
2158
+ * platforms, which differ by reader.
2159
+ */
2160
+ interface Tag {
2161
+ /**
2162
+ * X's ID for the SmartTag.
2163
+ */
2164
+ id?: string;
2165
+ info?: Tag.Info;
2166
+ }
2167
+ namespace Tag {
2168
+ interface Info {
2169
+ info?: Info.Info;
2170
+ }
2171
+ namespace Info {
2172
+ interface Info {
2173
+ /**
2174
+ * Whether X marks the SmartTag active.
2175
+ */
2176
+ active?: boolean;
2177
+ name?: string;
2178
+ ticker?: string;
2179
+ }
2180
+ }
2181
+ }
2182
+ }
2183
+ /**
2184
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
2185
+ */
2186
+ interface Symbol {
2187
+ indices?: Array<number>;
2188
+ seconds?: number;
2189
+ /**
2190
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
2191
+ * platforms, which differ by reader.
2192
+ */
2193
+ tag?: Symbol.Tag;
2194
+ text?: string;
2195
+ }
2196
+ namespace Symbol {
2197
+ /**
2198
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
2199
+ * platforms, which differ by reader.
2200
+ */
2201
+ interface Tag {
2202
+ /**
2203
+ * X's ID for the SmartTag.
2204
+ */
2205
+ id?: string;
2206
+ info?: Tag.Info;
2207
+ }
2208
+ namespace Tag {
2209
+ interface Info {
2210
+ info?: Info.Info;
2211
+ }
2212
+ namespace Info {
2213
+ interface Info {
2214
+ /**
2215
+ * Whether X marks the SmartTag active.
2216
+ */
2217
+ active?: boolean;
2218
+ name?: string;
2219
+ ticker?: string;
2220
+ }
2221
+ }
2222
+ }
2223
+ }
2224
+ /**
2225
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
2226
+ */
2227
+ interface Timestamp {
2228
+ indices?: Array<number>;
2229
+ seconds?: number;
2230
+ /**
2231
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
2232
+ * platforms, which differ by reader.
2233
+ */
2234
+ tag?: Timestamp.Tag;
2235
+ text?: string;
2236
+ }
2237
+ namespace Timestamp {
2238
+ /**
2239
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
2240
+ * platforms, which differ by reader.
2241
+ */
2242
+ interface Tag {
2243
+ /**
2244
+ * X's ID for the SmartTag.
2245
+ */
2246
+ id?: string;
2247
+ info?: Tag.Info;
2248
+ }
2249
+ namespace Tag {
2250
+ interface Info {
2251
+ info?: Info.Info;
2252
+ }
2253
+ namespace Info {
2254
+ interface Info {
2255
+ /**
2256
+ * Whether X marks the SmartTag active.
2257
+ */
2258
+ active?: boolean;
2259
+ name?: string;
2260
+ ticker?: string;
2261
+ }
2262
+ }
2263
+ }
2264
+ }
2265
+ /**
2266
+ * Provides shortened, display, and expanded URLs from tweet text.
2267
+ */
2268
+ interface URL {
2269
+ display_url?: string;
2270
+ expanded_url?: string;
2271
+ indices?: Array<number>;
2272
+ url?: string;
2273
+ }
2274
+ /**
2275
+ * Provides profile identity and source offsets for a mention.
2276
+ */
2277
+ interface UserMention {
2278
+ screen_name: string;
2279
+ id_str?: string;
2280
+ indices?: Array<number>;
2281
+ name?: string;
2282
+ }
2283
+ }
2284
+ interface InlineMedia {
2285
+ /**
2286
+ * Whole number from 0.
2287
+ */
2288
+ index: number;
2289
+ mediaId: string;
2290
+ }
2291
+ interface RichtextTag {
2292
+ /**
2293
+ * Whole number from 0.
2294
+ */
2295
+ fromIndex: number;
2296
+ /**
2297
+ * Whole number from 0.
2298
+ */
2299
+ toIndex: number;
2300
+ types: Array<string>;
2301
+ }
2302
+ }
2303
+ /**
2304
+ * Describes public place metadata on a geotagged tweet.
2305
+ */
2306
+ interface Place {
2307
+ id?: string;
2308
+ /**
2309
+ * Public metadata whose fields are defined by X.
2310
+ */
2311
+ boundingBox?: {
2312
+ [key: string]: unknown;
2313
+ };
2314
+ country?: string;
2315
+ countryCode?: string;
2316
+ fullName?: string;
2317
+ name?: string;
2318
+ placeType?: string;
2319
+ url?: string;
2320
+ }
2321
+ /**
2322
+ * Engagement counts retained from a prior tweet edit.
2323
+ */
2324
+ interface PreviousCounts {
2325
+ /**
2326
+ * Whole number from 0.
2327
+ */
2328
+ bookmarkCount?: number;
2329
+ /**
2330
+ * Whole number from 0.
2331
+ */
2332
+ likeCount?: number;
2333
+ /**
2334
+ * Whole number from 0.
2335
+ */
2336
+ quoteCount?: number;
2337
+ /**
2338
+ * Whole number from 0.
2339
+ */
2340
+ replyCount?: number;
2341
+ /**
2342
+ * Whole number from 0.
2343
+ */
2344
+ retweetCount?: number;
2345
+ }
2346
+ /**
2347
+ * Embedded post with public fields and legacy profile aliases.
2348
+ */
2349
+ interface QuotedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
2350
+ /**
2351
+ * Public profile with retained legacy monitor fields.
2352
+ */
2353
+ author?: QuotedTweet.Author;
2354
+ }
2355
+ namespace QuotedTweet {
2356
+ /**
2357
+ * Public profile with retained legacy monitor fields.
2358
+ */
2359
+ interface Author extends Shared.UserProfile {
2360
+ /**
2361
+ * Original X flag. Read verified for the displayed badge.
2362
+ *
2363
+ * @deprecated
2364
+ */
2365
+ rawVerified?: boolean;
2366
+ /**
2367
+ * Legacy username alias. Read username instead.
2368
+ *
2369
+ * @deprecated
2370
+ */
2371
+ userName?: string;
2372
+ }
2373
+ }
2374
+ /**
2375
+ * The quoted post's link, kept when X withholds that post.
2376
+ */
2377
+ interface QuotedTweetPermalink {
2378
+ displayUrl?: string;
2379
+ expandedUrl?: string;
2380
+ url?: string;
2381
+ }
2382
+ /**
2383
+ * Why X shows no quoted post. Omitted when X names no reason, as its legacy
2384
+ * answers never do.
2385
+ */
2386
+ interface QuotedTweetUnavailable {
2387
+ /**
2388
+ * X's reason, such as `Suspended` for a suspended author or `Protected` for an
2389
+ * author who protects their posts.
2390
+ */
2391
+ reason: string;
2392
+ }
2393
+ interface ReactionContext {
2394
+ reactedToPostId?: string;
2395
+ /**
2396
+ * Public profile with retained legacy monitor fields.
2397
+ */
2398
+ reactedToUser?: ReactionContext.ReactedToUser;
2399
+ }
2400
+ namespace ReactionContext {
2401
+ /**
2402
+ * Public profile with retained legacy monitor fields.
2403
+ */
2404
+ interface ReactedToUser extends Shared.UserProfile {
2405
+ /**
2406
+ * Original X flag. Read verified for the displayed badge.
2407
+ *
2408
+ * @deprecated
2409
+ */
2410
+ rawVerified?: boolean;
2411
+ /**
2412
+ * Legacy username alias. Read username instead.
2413
+ *
2414
+ * @deprecated
2415
+ */
2416
+ userName?: string;
2417
+ }
2418
+ }
2419
+ /**
2420
+ * Embedded post with public fields and legacy profile aliases.
2421
+ */
2422
+ interface RetweetedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
2423
+ /**
2424
+ * Public profile with retained legacy monitor fields.
2425
+ */
2426
+ author?: RetweetedTweet.Author;
2427
+ }
2428
+ namespace RetweetedTweet {
2429
+ /**
2430
+ * Public profile with retained legacy monitor fields.
2431
+ */
2432
+ interface Author extends Shared.UserProfile {
2433
+ /**
2434
+ * Original X flag. Read verified for the displayed badge.
2435
+ *
2436
+ * @deprecated
2437
+ */
2438
+ rawVerified?: boolean;
2439
+ /**
2440
+ * Legacy username alias. Read username instead.
2441
+ *
2442
+ * @deprecated
2443
+ */
2444
+ userName?: string;
2445
+ }
2446
+ }
2447
+ /**
2448
+ * Game metadata attached to this post.
2449
+ */
2450
+ interface SportsContext {
2451
+ /**
2452
+ * Teams & reported scores.
2453
+ */
2454
+ competitors?: Array<SportsContext.Competitor>;
2455
+ /**
2456
+ * Game ID.
2457
+ */
2458
+ gameId?: string;
2459
+ /**
2460
+ * League ID.
2461
+ */
2462
+ league?: string;
2463
+ /**
2464
+ * Scheduled Unix milliseconds, retaining the source type.
2465
+ */
2466
+ scheduledAtMs?: number | string;
2467
+ /**
2468
+ * Reported game state.
2469
+ */
2470
+ state?: string;
2471
+ /**
2472
+ * Game progress text.
2473
+ */
2474
+ statusText?: string;
2475
+ /**
2476
+ * Game title.
2477
+ */
2478
+ title?: string;
2479
+ /**
2480
+ * Game link.
2481
+ */
2482
+ url?: string;
2483
+ }
2484
+ namespace SportsContext {
2485
+ interface Competitor {
2486
+ /**
2487
+ * Team abbreviation.
2488
+ */
2489
+ abbreviation?: string;
2490
+ /**
2491
+ * Team display color.
2492
+ */
2493
+ color?: string;
2494
+ /**
2495
+ * Logo for dark backgrounds.
2496
+ */
2497
+ darkLogoUrl?: string;
2498
+ /**
2499
+ * Active competitor.
2500
+ */
2501
+ isActive?: boolean;
2502
+ /**
2503
+ * Winning competitor.
2504
+ */
2505
+ isWinner?: boolean;
2506
+ /**
2507
+ * Logo for light backgrounds.
2508
+ */
2509
+ logoUrl?: string;
2510
+ /**
2511
+ * Team name.
2512
+ */
2513
+ name?: string;
2514
+ /**
2515
+ * Score display text.
2516
+ */
2517
+ score?: string;
2518
+ /**
2519
+ * Team ID.
2520
+ */
2521
+ teamId?: string;
2522
+ }
2523
+ }
2524
+ /**
2525
+ * The Subscriber badge X shows on a reply. The reply's author subscribes to the
2526
+ * creator who started the conversation. Omitted on a post without the badge.
2527
+ */
2528
+ interface SubscriberBadge {
2529
+ /**
2530
+ * Account ID of the creator the author subscribes to.
2531
+ */
2532
+ creatorId: string;
2533
+ }
2534
+ interface TextHighlight {
2535
+ /**
2536
+ * The first code point after the match.
2537
+ */
2538
+ endIndex: number;
2539
+ /**
2540
+ * The first code point of the match.
2541
+ */
2542
+ startIndex: number;
2543
+ }
2544
+ /**
2545
+ * Public visibility notice attached to an available tweet.
2546
+ */
2547
+ interface Tombstone {
2548
+ text?: Tombstone.Text;
2549
+ /**
2550
+ * Visibility notice type.
2551
+ */
2552
+ type?: string;
2553
+ }
2554
+ namespace Tombstone {
2555
+ interface Text {
2556
+ entities?: Array<Text.Entity>;
2557
+ /**
2558
+ * Right-to-left text direction.
2559
+ */
2560
+ rtl?: boolean;
2561
+ /**
2562
+ * Human-readable notice text.
2563
+ */
2564
+ text?: string;
2565
+ }
2566
+ namespace Text {
2567
+ interface Entity {
2568
+ /**
2569
+ * Whole number from 0.
2570
+ */
2571
+ fromIndex?: number;
2572
+ ref?: Entity.Ref;
2573
+ /**
2574
+ * Whole number from 0.
2575
+ */
2576
+ toIndex?: number;
2577
+ }
2578
+ namespace Entity {
2579
+ interface Ref {
2580
+ type?: string;
2581
+ url?: string;
2582
+ urlType?: string;
2583
+ }
2584
+ }
2585
+ }
2586
+ }
2587
+ }
2588
+ /**
2589
+ * Changed profile field with its previous and current values.
2590
+ */
2591
+ interface MonitorProfileChange {
2592
+ field: string;
2593
+ /**
2594
+ * Permanent X user ID.
2595
+ */
2596
+ userId: string;
2597
+ /**
2598
+ * Username observed for this change.
2599
+ */
2600
+ username: string;
2601
+ /**
2602
+ * Profile text, flag, or pinned post IDs. Missing values are omitted.
2603
+ */
2604
+ current?: string | boolean | Array<string>;
2605
+ /**
2606
+ * Profile text, flag, or pinned post IDs. Missing values are omitted.
2607
+ */
2608
+ previous?: string | boolean | Array<string>;
2609
+ }
2610
+ /**
2611
+ * Older stored posts remain readable. Fields can be missing or null.
2612
+ */
2613
+ interface MonitorLegacyPost {
2614
+ id?: string;
2615
+ author?: {
2616
+ [key: string]: unknown;
2617
+ } | null;
2618
+ quoted_tweet?: {
2619
+ [key: string]: unknown;
2620
+ } | null;
2621
+ retweeted_tweet?: {
2622
+ [key: string]: unknown;
2623
+ } | null;
2624
+ text?: string;
2625
+ [k: string]: unknown;
2626
+ }
89
2627
  }
90
2628
  export interface EventListResponse {
91
2629
  events: Array<Event>;
@@ -94,7 +2632,8 @@ export interface EventListResponse {
94
2632
  }
95
2633
  export interface EventListParams {
96
2634
  /**
97
- * Previous nextCursor.
2635
+ * Previous nextCursor. The after alias also works. Offset pagination is not
2636
+ * supported.
98
2637
  */
99
2638
  cursor?: string;
100
2639
  /**
@@ -102,22 +2641,26 @@ export interface EventListParams {
102
2641
  */
103
2642
  eventType?: Shared.EventType;
104
2643
  /**
105
- * Keyword monitor ID.
2644
+ * Keyword monitor ID. The keyword_monitor_id alias also works.
106
2645
  */
107
2646
  keywordMonitorId?: string;
108
2647
  /**
109
- * Maximum number of items to return (1-100, default 50). For paid per-result
110
- * endpoints, the returned count may be lower when available usage balance cannot cover
111
- * the requested page. If zero paid results are affordable, the endpoint returns
112
- * 402 insufficient_credits.
2648
+ * Maximum items per page: 1 to 100, default 50. Credits can reduce paid results.
2649
+ * With none affordable, it returns 402 insufficient_credits.
113
2650
  */
114
2651
  limit?: number;
115
2652
  /**
116
- * Account monitor ID.
2653
+ * Account monitor ID. The monitor_id alias also works.
117
2654
  */
118
2655
  monitorId?: string;
119
2656
  }
2657
+ export interface EventStreamParams {
2658
+ /**
2659
+ * The last event ID the client got. The stream first sends every event after it.
2660
+ */
2661
+ 'Last-Event-ID'?: string;
2662
+ }
120
2663
  export declare namespace Events {
121
- export { type Event as Event, type EventDetail as EventDetail, type EventListResponse as EventListResponse, type EventListParams as EventListParams, };
2664
+ export { type Event as Event, type EventDetail as EventDetail, type EventListResponse as EventListResponse, type EventListParams as EventListParams, type EventStreamParams as EventStreamParams, };
122
2665
  }
123
2666
  //# sourceMappingURL=events.d.mts.map