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,212 +1,323 @@
1
+ import * as Shared from "./shared.js";
1
2
  /**
2
- * Content disclosure metadata shown by X when a tweet is labeled as paid
3
- * partnership content or AI-generated media.
4
- */
5
- export interface ContentDisclosure {
6
- advertising?: ContentDisclosure.Advertising;
7
- aiGenerated?: ContentDisclosure.AIGenerated;
8
- }
9
- export declare namespace ContentDisclosure {
10
- interface Advertising {
11
- /**
12
- * True when X labels the tweet as paid promotion content.
13
- */
14
- isPaidPromotion?: boolean;
15
- }
16
- interface AIGenerated {
17
- /**
18
- * Source of the AI-generated media disclosure.
19
- */
20
- detectionSource?: string;
21
- /**
22
- * True when X labels the tweet as containing AI-generated media.
23
- */
24
- hasAiGeneratedMedia?: boolean;
25
- }
26
- }
27
- /**
28
- * Quoted or retweeted tweet context. Every object includes id, text, and
29
- * engagement metrics. A zero metric can mean X did not report the count. Author,
30
- * media, and conversation fields appear when available.
3
+ * Public X Community, as every Community read returns it.
31
4
  */
32
- export interface EmbeddedTweet {
5
+ export interface Community {
6
+ /**
7
+ * Unique community identifier
8
+ */
33
9
  id: string;
34
- bookmarkCount: number;
35
- likeCount: number;
36
- quoteCount: number;
37
- replyCount: number;
38
- retweetCount: number;
39
- text: string;
40
- viewCount: number;
41
10
  /**
42
- * Article metadata attached to a tweet.
11
+ * Whether the community is marked sensitive
43
12
  */
44
- article?: EmbeddedTweet.Article;
13
+ is_nsfw: boolean;
45
14
  /**
46
- * X user profile with bio, follower counts, and verification status.
15
+ * Total member count
47
16
  */
48
- author?: UserProfile;
17
+ member_count: number;
49
18
  /**
50
- * Public card metadata attached to a tweet.
19
+ * Display name of the community
51
20
  */
52
- card?: EmbeddedTweet.Card;
21
+ name: string;
53
22
  /**
54
- * Community Note presentation metadata returned by X.
23
+ * Public X profile.
55
24
  */
56
- communityNote?: EmbeddedTweet.CommunityNote;
25
+ admin?: UserProfile;
57
26
  /**
58
- * Content disclosure metadata shown by X when a tweet is labeled as paid
59
- * partnership content or AI-generated media.
27
+ * The banner X shows for a community, with its size & colors.
60
28
  */
61
- contentDisclosure?: ContentDisclosure;
62
- conversationId?: string;
63
- createdAt?: string;
64
- displayTextRange?: Array<number>;
29
+ banner?: Community.Banner;
65
30
  /**
66
- * Edit history metadata returned by X.
31
+ * Community banner image URL
67
32
  */
68
- edit?: EmbeddedTweet.Edit;
69
- entities?: {
70
- [key: string]: unknown;
71
- };
72
- inReplyToId?: string;
73
- inReplyToUserId?: string;
74
- inReplyToUsername?: string;
75
- isLimitedReply?: boolean;
76
- isNoteTweet?: boolean;
77
- isQuoteStatus?: boolean;
78
- isReply?: boolean;
79
- isTranslatable?: boolean;
80
- lang?: string;
81
- media?: Array<TweetMedia>;
33
+ banner_url?: string;
82
34
  /**
83
- * Complete Note Tweet content and rich-text metadata.
35
+ * Community creation timestamp
84
36
  */
85
- noteTweet?: EmbeddedTweet.NoteTweet;
37
+ created_at?: string;
86
38
  /**
87
- * Public place metadata attached to a tweet.
39
+ * The creator's public profile, or the ID, username and badge alone when X sends
40
+ * no profile
88
41
  */
89
- place?: EmbeddedTweet.Place;
90
- possiblySensitive?: boolean;
42
+ creator?: UserProfile | Community.UnionMember1;
91
43
  /**
92
- * Engagement counts retained from a prior tweet edit.
44
+ * About text for the community
93
45
  */
94
- previousCounts?: EmbeddedTweet.PreviousCounts;
46
+ description?: string;
95
47
  /**
96
- * Quoted or retweeted tweet context. Every object includes id, text, and
97
- * engagement metrics. A zero metric can mean X did not report the count. Author,
98
- * media, and conversation fields appear when available.
48
+ * Invitation policy
99
49
  */
100
- quoted_tweet?: EmbeddedTweet;
50
+ invites_policy?: string;
101
51
  /**
102
- * Quoted or retweeted tweet context. Every object includes id, text, and
103
- * engagement metrics. A zero metric can mean X did not report the count. Author,
104
- * media, and conversation fields appear when available.
52
+ * Join policy (open or restricted)
105
53
  */
106
- retweeted_tweet?: EmbeddedTweet;
107
- source?: string;
108
- type?: string;
109
- url?: string;
110
- viewState?: string;
111
- }
112
- export declare namespace EmbeddedTweet {
54
+ join_policy?: string;
113
55
  /**
114
- * Article metadata attached to a tweet.
56
+ * The members X previews beside the member count. A keyword or topic result gives
57
+ * each member's ID & picture only.
115
58
  */
116
- interface Article {
117
- id?: string;
118
- coverMediaUrl?: string;
119
- previewText?: string;
120
- title?: string;
121
- }
59
+ membersFacepile?: Array<UserProfile | Community.CommunityMemberPreview>;
122
60
  /**
123
- * Public card metadata attached to a tweet.
61
+ * Total moderator count
124
62
  */
125
- interface Card {
126
- id?: string;
127
- bindingValues?: {
128
- [key: string]: unknown;
129
- };
130
- name?: string;
131
- url?: string;
132
- }
63
+ moderator_count?: number;
133
64
  /**
134
- * Community Note presentation metadata returned by X.
65
+ * Primary topic. Its id is absent when X lists the community in a keyword or topic
66
+ * result.
135
67
  */
136
- interface CommunityNote {
137
- id?: string;
138
- destinationUrl?: string;
139
- footer?: string;
140
- shortTitle?: string;
141
- subtitle?: string;
142
- title?: string;
143
- visualStyle?: string;
144
- }
68
+ primary_topic?: Community.PrimaryTopic;
145
69
  /**
146
- * Edit history metadata returned by X.
70
+ * What the community asks a user who joins
147
71
  */
148
- interface Edit {
149
- editableUntilMsecs?: string;
150
- editTweetIds?: Array<string>;
151
- }
72
+ question?: string;
152
73
  /**
153
- * Complete Note Tweet content and rich-text metadata.
74
+ * Community rules
154
75
  */
155
- interface NoteTweet {
156
- text: string;
157
- id?: string;
158
- entities?: {
159
- [key: string]: unknown;
160
- };
161
- isExpandable?: boolean;
162
- richtextTags?: Array<NoteTweet.RichtextTag>;
76
+ rules?: Array<Community.Rule>;
77
+ /**
78
+ * Tags X finds the community by
79
+ */
80
+ searchTags?: Array<string>;
81
+ }
82
+ export declare namespace Community {
83
+ /**
84
+ * The banner X shows for a community, with its size & colors.
85
+ */
86
+ interface Banner {
87
+ /**
88
+ * Banner image URL at its original size
89
+ */
90
+ url: string;
91
+ /**
92
+ * Main colors of the banner, largest share first
93
+ */
94
+ colors?: Array<Banner.Color>;
95
+ /**
96
+ * Area X keeps in view when it crops the banner, in pixels from the top left
97
+ */
98
+ focus?: Banner.Focus;
99
+ /**
100
+ * Banner height in pixels
101
+ */
102
+ height?: number;
103
+ /**
104
+ * Banner width in pixels
105
+ */
106
+ width?: number;
163
107
  }
164
- namespace NoteTweet {
165
- interface RichtextTag {
166
- fromIndex: number;
167
- toIndex: number;
168
- types: Array<string>;
108
+ namespace Banner {
109
+ interface Color {
110
+ /**
111
+ * Blue value of the color
112
+ */
113
+ blue: number;
114
+ /**
115
+ * Green value of the color
116
+ */
117
+ green: number;
118
+ /**
119
+ * Share of the banner in this color
120
+ */
121
+ percentage: number;
122
+ /**
123
+ * Red value of the color
124
+ */
125
+ red: number;
126
+ }
127
+ /**
128
+ * Area X keeps in view when it crops the banner, in pixels from the top left
129
+ */
130
+ interface Focus {
131
+ /**
132
+ * Height of the area
133
+ */
134
+ height?: number;
135
+ /**
136
+ * Distance from the left edge
137
+ */
138
+ left?: number;
139
+ /**
140
+ * Distance from the top edge
141
+ */
142
+ top?: number;
143
+ /**
144
+ * Width of the area
145
+ */
146
+ width?: number;
169
147
  }
170
148
  }
149
+ interface UnionMember1 {
150
+ /**
151
+ * Numeric X user ID of the creator
152
+ */
153
+ id: string;
154
+ /**
155
+ * X username of the creator
156
+ */
157
+ username: string;
158
+ /**
159
+ * Whether X shows the creator a badge
160
+ */
161
+ verified: boolean;
162
+ }
171
163
  /**
172
- * Public place metadata attached to a tweet.
164
+ * A member X previews by ID & profile picture only.
173
165
  */
174
- interface Place {
166
+ interface CommunityMemberPreview {
167
+ /**
168
+ * Numeric X user ID of the member
169
+ */
170
+ id: string;
171
+ /**
172
+ * Profile picture URL of the member
173
+ */
174
+ profilePicture?: string;
175
+ }
176
+ /**
177
+ * Primary topic. Its id is absent when X lists the community in a keyword or topic
178
+ * result.
179
+ */
180
+ interface PrimaryTopic {
181
+ /**
182
+ * Topic name X shows on the community
183
+ */
184
+ name: string;
185
+ /**
186
+ * Topic ID that /x/communities/popular takes
187
+ */
175
188
  id?: string;
176
- boundingBox?: {
177
- [key: string]: unknown;
178
- };
179
- country?: string;
180
- countryCode?: string;
181
- fullName?: string;
189
+ }
190
+ interface Rule {
191
+ /**
192
+ * Rule ID
193
+ */
194
+ id?: string;
195
+ /**
196
+ * What the rule asks of members
197
+ */
198
+ description?: string;
199
+ /**
200
+ * Rule title
201
+ */
182
202
  name?: string;
183
- placeType?: string;
184
- url?: string;
185
203
  }
204
+ }
205
+ /**
206
+ * 1 page of X Communities, in X's order.
207
+ */
208
+ export interface CommunityPage {
186
209
  /**
187
- * Engagement counts retained from a prior tweet edit.
210
+ * Communities in X's order
188
211
  */
189
- interface PreviousCounts {
190
- bookmarkCount?: number;
191
- likeCount?: number;
192
- quoteCount?: number;
193
- replyCount?: number;
194
- retweetCount?: number;
212
+ communities: Array<Community>;
213
+ /**
214
+ * Whether another page of communities follows
215
+ */
216
+ has_next_page: boolean;
217
+ /**
218
+ * Cursor for the next page of communities. Empty at the end.
219
+ */
220
+ next_cursor: string;
221
+ }
222
+ /**
223
+ * A topic X groups communities under, with its subtopics.
224
+ */
225
+ export interface CommunityTopic {
226
+ /**
227
+ * Topic ID. Pass it as topicId to /x/communities/popular.
228
+ */
229
+ id: string;
230
+ /**
231
+ * Topic name, which topic on /x/communities/popular takes
232
+ */
233
+ name: string;
234
+ /**
235
+ * Narrower topics inside this topic
236
+ */
237
+ subtopics: Array<CommunityTopic.Subtopic>;
238
+ }
239
+ export declare namespace CommunityTopic {
240
+ interface Subtopic {
241
+ /**
242
+ * Subtopic ID, which topicId also takes
243
+ */
244
+ id: string;
245
+ /**
246
+ * Subtopic name, which topic also takes
247
+ */
248
+ name: string;
195
249
  }
196
250
  }
197
251
  /**
198
- * Error response. Default v1 returns a legacy string error code. Send
199
- * `xquik-api-contract: 2026-04-29` to receive the structured best-practice error
200
- * object.
252
+ * Content disclosure metadata shown by X when a tweet is labeled as paid
253
+ * partnership content or AI-generated media.
254
+ */
255
+ export interface ContentDisclosure {
256
+ advertising?: ContentDisclosure.Advertising;
257
+ aiGenerated?: ContentDisclosure.AIGenerated;
258
+ }
259
+ export declare namespace ContentDisclosure {
260
+ interface Advertising {
261
+ /**
262
+ * True when X labels the tweet as paid promotion content.
263
+ */
264
+ isPaidPromotion?: boolean;
265
+ }
266
+ interface AIGenerated {
267
+ /**
268
+ * How X detected AI media. X omits it for self-declared posts.
269
+ */
270
+ detectionSource?: string;
271
+ /**
272
+ * True when X labels the tweet as containing AI-generated media.
273
+ */
274
+ hasAiGeneratedMedia?: boolean;
275
+ }
276
+ }
277
+ /**
278
+ * A parent, quoted or retweeted tweet. It has the TweetPublicData fields and an
279
+ * author. Nesting stops after 4 levels.
280
+ */
281
+ export interface EmbeddedTweet {
282
+ id: string;
283
+ bookmarkCount: number;
284
+ likeCount: number;
285
+ quoteCount: number;
286
+ replyCount: number;
287
+ retweetCount: number;
288
+ text: string;
289
+ viewCount: number;
290
+ /**
291
+ * Public X profile.
292
+ */
293
+ author?: UserProfile;
294
+ [k: string]: unknown;
295
+ }
296
+ /**
297
+ * Error response. Default v1 returns a legacy string code. Send
298
+ * `xquik-api-contract: 2026-04-29` for the structured best-practice error object.
201
299
  */
202
300
  export interface Error {
203
- error: 'internal_error' | 'account_already_connected' | 'account_needs_reauth' | 'account_not_found' | 'account_required' | 'account_restricted' | 'api_key_limit_reached' | 'article_not_found' | 'dm_not_permitted' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_user_id' | 'invalid_user_ids' | 'invalid_username' | 'invalid_json' | 'insufficient_credits' | 'login_cooldown' | 'login_failed' | 'media_download_failed' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_profile_unavailable' | 'no_media' | 'no_credits' | 'no_subscription' | 'not_found' | 'payment_failed' | 'rate_limit_exceeded' | 'service_unavailable' | 'style_not_found' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'unsupported_field' | 'user_not_found' | 'body_too_large' | 'checkout_unavailable' | 'connection_challenge_expired' | 'connection_challenge_inactive' | 'coverage_cursor_gone' | 'coverage_cursor_unavailable' | 'draft_not_found' | 'favoriters_unavailable' | 'forbidden' | 'guest_wallet_unavailable' | 'guest_wallets_disabled' | 'guest_wallets_unavailable' | 'idempotency_conflict' | 'idempotency_key_conflict' | 'invalid_community_id' | 'invalid_complete_replies_request' | 'invalid_coverage_cursor' | 'invalid_coverage_request' | 'invalid_idempotency_key' | 'invalid_list_id' | 'invalid_output_options' | 'invalid_payment_amount' | 'invalid_range' | 'invalid_reply_options' | 'login_rate_limited' | 'login_service_unavailable' | 'missing_idempotency_key' | 'missing_ids' | 'no_cached_style' | 'passkey_required' | 'rate_limited' | 'read_request_timeout' | 'replies_incomplete' | 'support_media_rate_limit' | 'support_request_rate_limit' | 'too_many_ids' | 'too_many_tweets' | 'unknown_field' | 'unsupported_media_type' | 'webhook_inactive' | 'write_tracking_unavailable' | 'x_write_unconfirmed' | 'x_account_feature_required' | 'x_account_protected' | 'x_account_suspended' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized' | 'x_auth_failure' | 'x_content_too_long' | 'x_daily_limit' | 'x_dm_not_allowed' | 'x_duplicate_action' | 'x_login_auth_failed' | 'x_login_challenge' | 'x_login_denied' | 'x_login_failed' | 'x_login_proxy_error' | 'x_login_rate_limited' | 'x_login_service_unavailable' | 'x_login_suspended' | 'x_rate_limited' | 'x_rejected' | 'x_target_not_found' | 'x_transient_error' | 'x_user_lookup_failed' | 'x_write_ambiguous' | 'x_write_failed' | Error.StructuredError;
301
+ error: 'internal_error' | 'account_already_connected' | 'account_needs_reauth' | 'account_not_found' | 'account_required' | 'account_restricted' | 'api_key_limit_reached' | 'article_not_found' | 'closed' | 'dm_not_permitted' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_media_url' | 'invalid_message_id' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_user_id' | 'invalid_user_ids' | 'invalid_username' | 'invalid_json' | 'insufficient_credits' | 'job_not_found' | 'login_cooldown' | 'login_failed' | 'media_download_failed' | 'media_too_large' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_profile_unavailable' | 'no_media' | 'no_credits' | 'no_subscription' | 'not_found' | 'payment_failed' | 'rate_limit_exceeded' | 'service_unavailable' | 'style_not_found' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'unsupported_field' | 'user_not_found' | 'body_too_large' | 'bookmark_folders_unavailable' | 'broadcast_not_found' | 'checkout_unavailable' | 'connection_challenge_expired' | 'connection_challenge_inactive' | 'coverage_cursor_gone' | 'coverage_cursor_unavailable' | 'cursor_account_unavailable' | 'draft_not_found' | 'draw_too_large' | 'expired' | 'favoriters_unavailable' | 'forbidden' | 'guest_wallet_unavailable' | 'guest_wallets_disabled' | 'guest_wallets_unavailable' | 'idempotency_conflict' | 'idempotency_in_progress' | 'idempotency_key_conflict' | 'invalid_broadcast_id' | 'invalid_community_id' | 'invalid_community_topic' | 'invalid_complete_replies_request' | 'invalid_coverage_cursor' | 'invalid_coverage_request' | 'invalid_cursor' | 'invalid_idempotency_key' | 'invalid_job_filter' | 'invalid_job_id' | 'invalid_list_id' | 'invalid_output_options' | 'invalid_payment_amount' | 'invalid_range' | 'invalid_reply_options' | 'invalid_space_id' | 'likes_unavailable' | 'list_not_found' | 'login_rate_limited' | 'login_service_unavailable' | 'missing_idempotency_key' | 'missing_ids' | 'missing_url' | 'no_cached_style' | 'pagination_stalled' | 'passkey_required' | 'rate_limited' | 'read_request_timeout' | 'replay_unavailable' | 'replies_incomplete' | 'retweeters_incomplete' | 'search_unavailable' | 'space_canceled' | 'space_not_ended' | 'support_media_rate_limit' | 'support_request_rate_limit' | 'telegram_unavailable' | 'too_many_ids' | 'too_many_streams' | 'too_many_tweets' | 'unknown_field' | 'unsupported_media_combination' | 'unsupported_media_type' | 'webhook_inactive' | 'write_tracking_unavailable' | 'x_write_unconfirmed' | 'x_account_feature_required' | 'x_account_protected' | 'x_account_suspended' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized' | 'x_auth_failure' | 'x_automation_refused' | 'x_community_not_joined' | 'x_community_not_selectable' | 'x_community_post_public' | 'x_community_post_removed' | 'x_content_too_long' | 'x_daily_limit' | 'x_dm_not_allowed' | 'x_dm_not_deleted' | 'x_dm_not_sent' | 'x_duplicate_action' | 'x_login_auth_failed' | 'x_login_challenge' | 'x_login_denied' | 'x_login_failed' | 'x_login_rate_limited' | 'x_login_service_unavailable' | 'x_login_suspended' | 'x_image_invalid' | 'x_media_rejected' | 'x_post_not_sent' | 'x_rate_limited' | 'x_rejected' | 'x_reply_not_allowed' | 'x_reply_target_unavailable' | 'x_target_not_found' | 'x_transient_error' | 'x_user_lookup_failed' | 'x_write_ambiguous' | 'x_write_failed' | Error.StructuredError;
302
+ /**
303
+ * With unknown_field: the valid names where the first unknown name in fields or
304
+ * omit stopped.
305
+ */
306
+ allowedFields?: Array<string>;
307
+ /**
308
+ * With unknown_field: each unknown name in fields or omit, with the name it most
309
+ * likely meant.
310
+ */
311
+ fieldErrors?: Array<Error.FieldError>;
204
312
  /**
205
313
  * Human-readable error guidance.
206
314
  */
207
315
  message?: string;
208
316
  /**
209
- * Machine-readable reason for a login cooldown.
317
+ * Machine-readable reason. A login failure names its cause, such as
318
+ * temporary_issue. A user_not_found answer names why X shows no profile: not_found
319
+ * or suspended. A tweet_not_found answer names why X shows no post, when X said:
320
+ * deleted, author_suspended or protected.
210
321
  */
211
322
  reason?: string;
212
323
  /**
@@ -220,41 +331,121 @@ export interface Error {
220
331
  }
221
332
  export declare namespace Error {
222
333
  interface StructuredError {
223
- code: 'internal_error' | 'account_already_connected' | 'account_needs_reauth' | 'account_not_found' | 'account_required' | 'account_restricted' | 'api_key_limit_reached' | 'article_not_found' | 'dm_not_permitted' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_user_id' | 'invalid_user_ids' | 'invalid_username' | 'invalid_json' | 'insufficient_credits' | 'login_cooldown' | 'login_failed' | 'media_download_failed' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_profile_unavailable' | 'no_media' | 'no_credits' | 'no_subscription' | 'not_found' | 'payment_failed' | 'rate_limit_exceeded' | 'service_unavailable' | 'style_not_found' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'unsupported_field' | 'user_not_found' | 'body_too_large' | 'checkout_unavailable' | 'connection_challenge_expired' | 'connection_challenge_inactive' | 'coverage_cursor_gone' | 'coverage_cursor_unavailable' | 'draft_not_found' | 'favoriters_unavailable' | 'forbidden' | 'guest_wallet_unavailable' | 'guest_wallets_disabled' | 'guest_wallets_unavailable' | 'idempotency_conflict' | 'idempotency_key_conflict' | 'invalid_community_id' | 'invalid_complete_replies_request' | 'invalid_coverage_cursor' | 'invalid_coverage_request' | 'invalid_idempotency_key' | 'invalid_list_id' | 'invalid_output_options' | 'invalid_payment_amount' | 'invalid_range' | 'invalid_reply_options' | 'login_rate_limited' | 'login_service_unavailable' | 'missing_idempotency_key' | 'missing_ids' | 'no_cached_style' | 'passkey_required' | 'rate_limited' | 'read_request_timeout' | 'replies_incomplete' | 'support_media_rate_limit' | 'support_request_rate_limit' | 'too_many_ids' | 'too_many_tweets' | 'unknown_field' | 'unsupported_media_type' | 'webhook_inactive' | 'write_tracking_unavailable' | 'x_write_unconfirmed' | 'x_account_feature_required' | 'x_account_protected' | 'x_account_suspended' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized' | 'x_auth_failure' | 'x_content_too_long' | 'x_daily_limit' | 'x_dm_not_allowed' | 'x_duplicate_action' | 'x_login_auth_failed' | 'x_login_challenge' | 'x_login_denied' | 'x_login_failed' | 'x_login_proxy_error' | 'x_login_rate_limited' | 'x_login_service_unavailable' | 'x_login_suspended' | 'x_rate_limited' | 'x_rejected' | 'x_target_not_found' | 'x_transient_error' | 'x_user_lookup_failed' | 'x_write_ambiguous' | 'x_write_failed';
334
+ code: 'internal_error' | 'account_already_connected' | 'account_needs_reauth' | 'account_not_found' | 'account_required' | 'account_restricted' | 'api_key_limit_reached' | 'article_not_found' | 'closed' | 'dm_not_permitted' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_media_url' | 'invalid_message_id' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_user_id' | 'invalid_user_ids' | 'invalid_username' | 'invalid_json' | 'insufficient_credits' | 'job_not_found' | 'login_cooldown' | 'login_failed' | 'media_download_failed' | 'media_too_large' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_profile_unavailable' | 'no_media' | 'no_credits' | 'no_subscription' | 'not_found' | 'payment_failed' | 'rate_limit_exceeded' | 'service_unavailable' | 'style_not_found' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'unsupported_field' | 'user_not_found' | 'body_too_large' | 'bookmark_folders_unavailable' | 'broadcast_not_found' | 'checkout_unavailable' | 'connection_challenge_expired' | 'connection_challenge_inactive' | 'coverage_cursor_gone' | 'coverage_cursor_unavailable' | 'cursor_account_unavailable' | 'draft_not_found' | 'draw_too_large' | 'expired' | 'favoriters_unavailable' | 'forbidden' | 'guest_wallet_unavailable' | 'guest_wallets_disabled' | 'guest_wallets_unavailable' | 'idempotency_conflict' | 'idempotency_in_progress' | 'idempotency_key_conflict' | 'invalid_broadcast_id' | 'invalid_community_id' | 'invalid_community_topic' | 'invalid_complete_replies_request' | 'invalid_coverage_cursor' | 'invalid_coverage_request' | 'invalid_cursor' | 'invalid_idempotency_key' | 'invalid_job_filter' | 'invalid_job_id' | 'invalid_list_id' | 'invalid_output_options' | 'invalid_payment_amount' | 'invalid_range' | 'invalid_reply_options' | 'invalid_space_id' | 'likes_unavailable' | 'list_not_found' | 'login_rate_limited' | 'login_service_unavailable' | 'missing_idempotency_key' | 'missing_ids' | 'missing_url' | 'no_cached_style' | 'pagination_stalled' | 'passkey_required' | 'rate_limited' | 'read_request_timeout' | 'replay_unavailable' | 'replies_incomplete' | 'retweeters_incomplete' | 'search_unavailable' | 'space_canceled' | 'space_not_ended' | 'support_media_rate_limit' | 'support_request_rate_limit' | 'telegram_unavailable' | 'too_many_ids' | 'too_many_streams' | 'too_many_tweets' | 'unknown_field' | 'unsupported_media_combination' | 'unsupported_media_type' | 'webhook_inactive' | 'write_tracking_unavailable' | 'x_write_unconfirmed' | 'x_account_feature_required' | 'x_account_protected' | 'x_account_suspended' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized' | 'x_auth_failure' | 'x_automation_refused' | 'x_community_not_joined' | 'x_community_not_selectable' | 'x_community_post_public' | 'x_community_post_removed' | 'x_content_too_long' | 'x_daily_limit' | 'x_dm_not_allowed' | 'x_dm_not_deleted' | 'x_dm_not_sent' | 'x_duplicate_action' | 'x_login_auth_failed' | 'x_login_challenge' | 'x_login_denied' | 'x_login_failed' | 'x_login_rate_limited' | 'x_login_service_unavailable' | 'x_login_suspended' | 'x_image_invalid' | 'x_media_rejected' | 'x_post_not_sent' | 'x_rate_limited' | 'x_rejected' | 'x_reply_not_allowed' | 'x_reply_target_unavailable' | 'x_target_not_found' | 'x_transient_error' | 'x_user_lookup_failed' | 'x_write_ambiguous' | 'x_write_failed';
224
335
  message: string;
225
336
  type: 'api_error' | 'authentication_error' | 'billing_error' | 'dependency_error' | 'invalid_request_error' | 'permission_error' | 'rate_limit_error';
226
337
  }
338
+ interface FieldError {
339
+ code: 'unknown_field';
340
+ /**
341
+ * The name as the request wrote it.
342
+ */
343
+ field: string;
344
+ /**
345
+ * What to send instead.
346
+ */
347
+ message: string;
348
+ /**
349
+ * The parameter that held the name.
350
+ */
351
+ path: 'query.fields' | 'query.omit';
352
+ /**
353
+ * The closest valid name, when 1 is close.
354
+ */
355
+ suggestion?: string;
356
+ }
227
357
  }
228
358
  /**
229
- * Type of monitor event fired when account activity occurs.
359
+ * Type of monitor event fired when account activity occurs. tweet.deleted fires
360
+ * once X confirms the account deleted a post the monitor saw. Its data is the post
361
+ * as last seen. broadcast.started & space.started fire when the account posts its
362
+ * running live video or Space. Their data is that post. A live the account does
363
+ * not post is not seen. following.added & following.removed fire when the account
364
+ * follows or unfollows someone, with that account's profile. Keyword monitors take
365
+ * the 10 post types only.
230
366
  */
231
- export type EventType = 'tweet.new' | 'tweet.reply' | 'tweet.retweet' | 'tweet.quote' | 'tweet.media' | 'tweet.link' | 'tweet.poll' | 'tweet.mention' | 'tweet.hashtag' | 'tweet.longform' | 'profile.avatar.changed' | 'profile.banner.changed' | 'profile.name.changed' | 'profile.username.changed' | 'profile.bio.changed' | 'profile.location.changed' | 'profile.url.changed' | 'profile.verified.changed' | 'profile.protected.changed' | 'profile.pinned_tweet.changed' | 'profile.unavailable.changed';
367
+ export type EventType = 'tweet.new' | 'tweet.reply' | 'tweet.retweet' | 'tweet.quote' | 'tweet.media' | 'tweet.link' | 'tweet.poll' | 'tweet.mention' | 'tweet.hashtag' | 'tweet.longform' | 'profile.avatar.changed' | 'profile.banner.changed' | 'profile.name.changed' | 'profile.username.changed' | 'profile.bio.changed' | 'profile.location.changed' | 'profile.url.changed' | 'profile.verified.changed' | 'profile.protected.changed' | 'profile.pinned_tweet.changed' | 'profile.unavailable.changed' | 'tweet.deleted' | 'broadcast.started' | 'space.started' | 'following.added' | 'following.removed';
232
368
  /**
233
- * No-mode search, user Tweet, user reply, and direct reply reads use automatic
234
- * coverage. Shape, filters, aliases, and billing stay compatible. Unprefixed
235
- * cursors remain legacy. Follow next_cursor while has_next_page is true. An empty
236
- * filtered page can still have has_next_page true.
369
+ * Follow next_cursor while the response reports more pages. A page can hold fewer
370
+ * rows than its limit & still report more. That report decides, not the row count.
371
+ * A page can be empty & still report more, filtered or not. Automatic search, user
372
+ * Tweet & reply coverage keeps shape, filters, aliases & billing. Unprefixed
373
+ * cursors are legacy.
237
374
  */
238
375
  export interface PaginatedTweets {
239
376
  has_next_page: boolean;
240
377
  next_cursor: string;
241
378
  tweets: Array<SearchTweet>;
379
+ /**
380
+ * Whole number from 0.
381
+ */
382
+ filtered_count?: number;
383
+ /**
384
+ * How far back a filtered Latest search has read, in UTC. Every newer post was
385
+ * checked, so an empty page still moves this time back.
386
+ */
387
+ readBackTo?: string;
388
+ /**
389
+ * What X shows beside a search's posts that is the same for every reader. Present
390
+ * on a search for a cashtag X has a card for, such as $BTC.
391
+ */
392
+ searchContext?: PaginatedTweets.SearchContext;
393
+ /**
394
+ * Search q as X ran it, when Xquik fixed it.
395
+ */
396
+ searchedQuery?: string;
397
+ /**
398
+ * Present on a last page whose sources all read past its start time.
399
+ */
400
+ windowComplete?: true;
401
+ }
402
+ export declare namespace PaginatedTweets {
403
+ /**
404
+ * What X shows beside a search's posts that is the same for every reader. Present
405
+ * on a search for a cashtag X has a card for, such as $BTC.
406
+ */
407
+ interface SearchContext {
408
+ /**
409
+ * X's card for the cashtag the search names.
410
+ */
411
+ smartTag: SearchContext.SmartTag;
412
+ }
413
+ namespace SearchContext {
414
+ /**
415
+ * X's card for the cashtag the search names.
416
+ */
417
+ interface SmartTag {
418
+ /**
419
+ * The ticker X matched.
420
+ */
421
+ id: string;
422
+ /**
423
+ * Whether X lists the ticker as active.
424
+ */
425
+ active?: boolean;
426
+ /**
427
+ * Whether X charts the ticker with open, high, low & close prices.
428
+ */
429
+ supportsOhlc?: boolean;
430
+ }
431
+ }
242
432
  }
243
433
  /**
244
- * Paginated user profiles. No-mode follower, following, and verified follower
245
- * requests merge independent views automatically. Response fields, page size,
246
- * aliases, filters, and per-returned-profile billing stay unchanged. Existing
247
- * unprefixed cursors retain legacy behavior. Follow next_cursor while
248
- * has_next_page is true.
434
+ * Profile coverage preserves shape, billing, aliases, and filters. Follow
435
+ * next_cursor while the response reports more pages. Unprefixed cursors remain
436
+ * legacy.
249
437
  */
250
438
  export interface PaginatedUsers {
251
439
  has_next_page: boolean;
252
440
  next_cursor: string;
253
441
  users: Array<UserProfile>;
442
+ /**
443
+ * Whole number from 0.
444
+ */
445
+ filtered_count?: number;
254
446
  }
255
447
  /**
256
- * Tweet returned from search results with inline author info. A zero metric can
257
- * mean X did not report the count.
448
+ * Search tweet with author. Zero metrics may mean X omitted counts.
258
449
  */
259
450
  export interface SearchTweet {
260
451
  id: string;
@@ -266,17 +457,36 @@ export interface SearchTweet {
266
457
  text: string;
267
458
  viewCount: number;
268
459
  /**
269
- * Article metadata attached to a tweet.
460
+ * Describes an X Article preview and its lifecycle metadata.
270
461
  */
271
462
  article?: SearchTweet.Article;
272
463
  /**
273
- * X user profile with bio, follower counts, and verification status.
464
+ * Public X profile.
274
465
  */
275
466
  author?: UserProfile;
276
467
  /**
277
- * Public card metadata attached to a tweet.
468
+ * Why the tweet has no author. X serves a suspended or deleted account as an
469
+ * unavailable user with a reason such as Suspended or NotFound. Omitted when the
470
+ * author is available.
471
+ */
472
+ authorUnavailable?: SearchTweet.AuthorUnavailable;
473
+ /**
474
+ * Describes a public card and its referenced profiles.
278
475
  */
279
476
  card?: SearchTweet.Card;
477
+ /**
478
+ * Price charts the author attached under the post, 1 per cashtag. Absent when the
479
+ * post has none. X may send a cashtag without a chart window.
480
+ */
481
+ cashtagAttachments?: Array<SearchTweet.CashtagAttachment>;
482
+ /**
483
+ * Community ID.
484
+ */
485
+ communityId?: string;
486
+ /**
487
+ * Community name. Present when X sends it with the post.
488
+ */
489
+ communityName?: string;
280
490
  /**
281
491
  * Community Note presentation metadata returned by X.
282
492
  */
@@ -287,60 +497,78 @@ export interface SearchTweet {
287
497
  */
288
498
  contentDisclosure?: ContentDisclosure;
289
499
  /**
290
- * Root tweet ID for the search result conversation
500
+ * Reply policy & conversation owner.
291
501
  */
502
+ conversationControl?: SearchTweet.ConversationControl;
292
503
  conversationId?: string;
293
- createdAt?: string;
294
504
  /**
295
- * Rendered text's start and end offsets.
505
+ * Author-published point, with longitude before latitude.
296
506
  */
507
+ coordinates?: SearchTweet.Coordinates;
508
+ createdAt?: string;
297
509
  displayTextRange?: Array<number>;
298
510
  /**
299
- * Edit history metadata returned by X.
511
+ * Lists edit-chain identifiers and the remaining edit window.
300
512
  */
301
513
  edit?: SearchTweet.Edit;
302
514
  /**
303
- * Parsed search-result entities including URLs, mentions, hashtags, and media
304
- * markers
515
+ * Lists hashtags, symbols, links, and mentions from tweet text.
305
516
  */
306
- entities?: {
307
- [key: string]: unknown;
308
- };
517
+ entities?: SearchTweet.Entities;
309
518
  /**
310
- * ID of the tweet this result replies to.
519
+ * Marks a subscriber-only post with the creator whose subscription unlocks it.
520
+ * Non-subscribers get the preview text & the subscribe link. Omitted on public
521
+ * posts.
311
522
  */
312
- inReplyToId?: string;
523
+ exclusiveContent?: SearchTweet.ExclusiveContent;
313
524
  /**
314
- * ID of the user this result replies to.
525
+ * Author-published point, with latitude before longitude.
315
526
  */
316
- inReplyToUserId?: string;
527
+ geo?: SearchTweet.Geo;
317
528
  /**
318
- * Username this result replies to.
529
+ * Public metadata whose fields are defined by X.
319
530
  */
320
- inReplyToUsername?: string;
531
+ grokShareAttachment?: {
532
+ [key: string]: unknown;
533
+ };
321
534
  /**
322
- * Whether the tweet has limited reply permissions
535
+ * Grok's translation of the post, as X shows it.
323
536
  */
324
- isLimitedReply?: boolean;
537
+ grokTranslatedPost?: {
538
+ [key: string]: unknown;
539
+ };
325
540
  /**
326
- * True for Note Tweets (long-form content, up to 25,000 characters)
541
+ * Whether X holds Community Notes on the post, shown or not.
327
542
  */
328
- isNoteTweet?: boolean;
543
+ hasCommunityNotes?: boolean;
544
+ inReplyToId?: string;
545
+ inReplyToUserId?: string;
546
+ inReplyToUsername?: string;
329
547
  /**
330
- * True when this search result quotes another tweet
548
+ * The notice x.com covers the post with until the reader views it, such as X's
549
+ * public interest notice on a post that broke its rules but stays up.
331
550
  */
551
+ interstitial?: SearchTweet.Interstitial;
552
+ isLimitedReply?: boolean;
553
+ isNoteTweet?: boolean;
554
+ isPinned?: boolean;
332
555
  isQuoteStatus?: boolean;
333
- /**
334
- * True when this search result is a reply
335
- */
336
556
  isReply?: boolean;
557
+ isRetweet?: boolean;
337
558
  isTranslatable?: boolean;
338
559
  /**
339
- * Search result language code.
560
+ * Public metadata whose fields are defined by X.
340
561
  */
562
+ jetfuelAttachment?: {
563
+ [key: string]: unknown;
564
+ };
341
565
  lang?: string;
342
566
  /**
343
- * Search-result media attachments, omitted when no media is present
567
+ * Public restrictions & prompts.
568
+ */
569
+ limitedActions?: Array<SearchTweet.LimitedAction>;
570
+ /**
571
+ * Media, omitted when unavailable.
344
572
  */
345
573
  media?: Array<TweetMedia>;
346
574
  /**
@@ -348,57 +576,193 @@ export interface SearchTweet {
348
576
  */
349
577
  noteTweet?: SearchTweet.NoteTweet;
350
578
  /**
351
- * Public place metadata attached to a tweet.
579
+ * A parent, quoted or retweeted tweet. It has the TweetPublicData fields and an
580
+ * author. Nesting stops after 4 levels.
581
+ */
582
+ parentTweet?: EmbeddedTweet;
583
+ /**
584
+ * Describes public place metadata on a geotagged tweet.
352
585
  */
353
586
  place?: SearchTweet.Place;
354
587
  possiblySensitive?: boolean;
588
+ /**
589
+ * Public metadata whose fields are defined by X.
590
+ */
591
+ postCta?: {
592
+ [key: string]: unknown;
593
+ };
355
594
  /**
356
595
  * Engagement counts retained from a prior tweet edit.
357
596
  */
358
597
  previousCounts?: SearchTweet.PreviousCounts;
359
598
  /**
360
- * Quoted or retweeted tweet context. Every object includes id, text, and
361
- * engagement metrics. A zero metric can mean X did not report the count. Author,
362
- * media, and conversation fields appear when available.
599
+ * A parent, quoted or retweeted tweet. It has the TweetPublicData fields and an
600
+ * author. Nesting stops after 4 levels.
363
601
  */
364
602
  quoted_tweet?: EmbeddedTweet;
603
+ quotedTweetId?: string;
604
+ /**
605
+ * The quoted post's link, kept when X withholds that post.
606
+ */
607
+ quotedTweetPermalink?: SearchTweet.QuotedTweetPermalink;
365
608
  /**
366
- * Quoted or retweeted tweet context. Every object includes id, text, and
367
- * engagement metrics. A zero metric can mean X did not report the count. Author,
368
- * media, and conversation fields appear when available.
609
+ * Why X shows no quoted post. Omitted when X names no reason, as its legacy
610
+ * answers never do.
611
+ */
612
+ quotedTweetUnavailable?: SearchTweet.QuotedTweetUnavailable;
613
+ /**
614
+ * Public post & user this reaction references.
615
+ */
616
+ reactionContext?: SearchTweet.ReactionContext;
617
+ /**
618
+ * A parent, quoted or retweeted tweet. It has the TweetPublicData fields and an
619
+ * author. Nesting stops after 4 levels.
369
620
  */
370
621
  retweeted_tweet?: EmbeddedTweet;
371
622
  /**
372
- * Client application used to post the tweet
623
+ * Repost event time in UTC. Null when unavailable; omitted for other posts.
624
+ */
625
+ retweetedAt?: string | null;
626
+ /**
627
+ * Public metadata whose fields are defined by X.
628
+ */
629
+ scopes?: {
630
+ [key: string]: unknown;
631
+ };
632
+ /**
633
+ * The app the post was sent from, as X labels it. X sends it for some posts only.
373
634
  */
374
635
  source?: string;
636
+ /**
637
+ * Game metadata attached to this post.
638
+ */
639
+ sportsContext?: SearchTweet.SportsContext;
640
+ /**
641
+ * The Subscriber badge X shows on a reply. The reply's author subscribes to the
642
+ * creator who started the conversation. Omitted on a post without the badge.
643
+ */
644
+ subscriberBadge?: SearchTweet.SubscriberBadge;
645
+ /**
646
+ * Where `text` matches the search, on each row a search read. Offsets count code
647
+ * points of `text`, as `displayTextRange` does. Empty when X marks nothing in the
648
+ * post. X marks matches only in a post's first 280 characters.
649
+ */
650
+ textHighlights?: Array<SearchTweet.TextHighlight>;
651
+ /**
652
+ * Public visibility notice attached to an available tweet.
653
+ */
654
+ tombstone?: SearchTweet.Tombstone;
375
655
  type?: string;
376
656
  /**
377
- * Search result permalink.
657
+ * The author's ID when X withholds the author's profile.
658
+ */
659
+ unavailableAuthorId?: string;
660
+ /**
661
+ * User IDs that left this conversation.
378
662
  */
663
+ unmentionedUserIds?: Array<string>;
379
664
  url?: string;
380
665
  viewState?: string;
381
666
  }
382
667
  export declare namespace SearchTweet {
383
668
  /**
384
- * Article metadata attached to a tweet.
669
+ * Describes an X Article preview and its lifecycle metadata.
385
670
  */
386
671
  interface Article {
387
672
  id?: string;
673
+ /**
674
+ * Public metadata whose fields are defined by X.
675
+ */
676
+ coverMedia?: {
677
+ [key: string]: unknown;
678
+ };
388
679
  coverMediaUrl?: string;
680
+ /**
681
+ * Public metadata whose fields are defined by X.
682
+ */
683
+ lifecycleState?: {
684
+ [key: string]: unknown;
685
+ };
686
+ /**
687
+ * Public metadata whose fields are defined by X.
688
+ */
689
+ metadata?: {
690
+ [key: string]: unknown;
691
+ };
389
692
  previewText?: string;
390
693
  title?: string;
391
694
  }
392
695
  /**
393
- * Public card metadata attached to a tweet.
696
+ * Why the tweet has no author. X serves a suspended or deleted account as an
697
+ * unavailable user with a reason such as Suspended or NotFound. Omitted when the
698
+ * author is available.
699
+ */
700
+ interface AuthorUnavailable {
701
+ /**
702
+ * X's reason code.
703
+ */
704
+ reason: string;
705
+ /**
706
+ * X's notice text for the reason.
707
+ */
708
+ message?: string;
709
+ }
710
+ /**
711
+ * Describes a public card and its referenced profiles.
394
712
  */
395
713
  interface Card {
396
714
  id?: string;
715
+ /**
716
+ * Public metadata whose fields are defined by X.
717
+ */
397
718
  bindingValues?: {
398
719
  [key: string]: unknown;
399
720
  };
400
721
  name?: string;
722
+ /**
723
+ * Public metadata whose fields are defined by X.
724
+ */
725
+ platform?: {
726
+ [key: string]: unknown;
727
+ };
401
728
  url?: string;
729
+ /**
730
+ * Unresolved card user references.
731
+ */
732
+ userReferenceErrors?: Array<Card.UserReferenceError>;
733
+ userReferences?: Array<Shared.UserProfile>;
734
+ }
735
+ namespace Card {
736
+ interface UserReferenceError {
737
+ message?: string;
738
+ reason?: string;
739
+ }
740
+ }
741
+ interface CashtagAttachment {
742
+ /**
743
+ * The cashtag with its `$`.
744
+ */
745
+ cashtag: string;
746
+ /**
747
+ * Span of each candle.
748
+ */
749
+ candleSize?: string;
750
+ /**
751
+ * Time of the chart's last price.
752
+ */
753
+ endTime?: string;
754
+ /**
755
+ * X's size for the chart.
756
+ */
757
+ sizeVariant?: number;
758
+ /**
759
+ * Time of the chart's first candle.
760
+ */
761
+ startTime?: string;
762
+ /**
763
+ * Span the chart covers.
764
+ */
765
+ timeframe?: string;
402
766
  }
403
767
  /**
404
768
  * Community Note presentation metadata returned by X.
@@ -407,42 +771,582 @@ export declare namespace SearchTweet {
407
771
  id?: string;
408
772
  destinationUrl?: string;
409
773
  footer?: string;
774
+ footerIconType?: string;
775
+ iconType?: string;
776
+ /**
777
+ * Public metadata whose fields are defined by X.
778
+ */
779
+ metadata?: {
780
+ [key: string]: unknown;
781
+ };
410
782
  shortTitle?: string;
411
783
  subtitle?: string;
412
784
  title?: string;
413
785
  visualStyle?: string;
414
786
  }
415
787
  /**
416
- * Edit history metadata returned by X.
788
+ * Reply policy & conversation owner.
789
+ */
790
+ interface ConversationControl {
791
+ /**
792
+ * Regions whose accounts may reply, as country codes. Sent with the
793
+ * `country_of_origin` mode.
794
+ */
795
+ allowedCountryCodes?: Array<string>;
796
+ inviteViaMention?: boolean;
797
+ /**
798
+ * Reply policy from X's newer field, such as `my_network`, `premium` or
799
+ * `country_of_origin`. Omitted when X sends none.
800
+ */
801
+ mode?: string;
802
+ /**
803
+ * The conversation owner's account ID.
804
+ */
805
+ ownerId?: string;
806
+ ownerUsername?: string;
807
+ policy?: string;
808
+ }
809
+ /**
810
+ * Author-published point, with longitude before latitude.
811
+ */
812
+ interface Coordinates {
813
+ coordinates: Array<number>;
814
+ type: 'Point';
815
+ }
816
+ /**
817
+ * Lists edit-chain identifiers and the remaining edit window.
417
818
  */
418
819
  interface Edit {
419
820
  editableUntilMsecs?: string;
420
821
  editTweetIds?: Array<string>;
822
+ initialTweetId?: string;
823
+ }
824
+ /**
825
+ * Lists hashtags, symbols, links, and mentions from tweet text.
826
+ */
827
+ interface Entities {
828
+ hashtags?: Array<Entities.Hashtag>;
829
+ smarttags?: Array<Entities.Smarttag>;
830
+ symbols?: Array<Entities.Symbol>;
831
+ timestamps?: Array<Entities.Timestamp>;
832
+ urls?: Array<Entities.URL>;
833
+ user_mentions?: Array<Entities.UserMention>;
834
+ }
835
+ namespace Entities {
836
+ /**
837
+ * Provides hashtag text and source offsets within a tweet.
838
+ */
839
+ interface Hashtag {
840
+ text: string;
841
+ indices?: Array<number>;
842
+ /**
843
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
844
+ * platforms, which differ by reader.
845
+ */
846
+ tag?: Hashtag.Tag;
847
+ }
848
+ namespace Hashtag {
849
+ /**
850
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
851
+ * platforms, which differ by reader.
852
+ */
853
+ interface Tag {
854
+ /**
855
+ * X's ID for the SmartTag.
856
+ */
857
+ id?: string;
858
+ info?: Tag.Info;
859
+ }
860
+ namespace Tag {
861
+ interface Info {
862
+ info?: Info.Info;
863
+ }
864
+ namespace Info {
865
+ interface Info {
866
+ /**
867
+ * Whether X marks the SmartTag active.
868
+ */
869
+ active?: boolean;
870
+ name?: string;
871
+ ticker?: string;
872
+ }
873
+ }
874
+ }
875
+ }
876
+ /**
877
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
878
+ */
879
+ interface Smarttag {
880
+ indices?: Array<number>;
881
+ seconds?: number;
882
+ /**
883
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
884
+ * platforms, which differ by reader.
885
+ */
886
+ tag?: Smarttag.Tag;
887
+ text?: string;
888
+ }
889
+ namespace Smarttag {
890
+ /**
891
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
892
+ * platforms, which differ by reader.
893
+ */
894
+ interface Tag {
895
+ /**
896
+ * X's ID for the SmartTag.
897
+ */
898
+ id?: string;
899
+ info?: Tag.Info;
900
+ }
901
+ namespace Tag {
902
+ interface Info {
903
+ info?: Info.Info;
904
+ }
905
+ namespace Info {
906
+ interface Info {
907
+ /**
908
+ * Whether X marks the SmartTag active.
909
+ */
910
+ active?: boolean;
911
+ name?: string;
912
+ ticker?: string;
913
+ }
914
+ }
915
+ }
916
+ }
917
+ /**
918
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
919
+ */
920
+ interface Symbol {
921
+ indices?: Array<number>;
922
+ seconds?: number;
923
+ /**
924
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
925
+ * platforms, which differ by reader.
926
+ */
927
+ tag?: Symbol.Tag;
928
+ text?: string;
929
+ }
930
+ namespace Symbol {
931
+ /**
932
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
933
+ * platforms, which differ by reader.
934
+ */
935
+ interface Tag {
936
+ /**
937
+ * X's ID for the SmartTag.
938
+ */
939
+ id?: string;
940
+ info?: Tag.Info;
941
+ }
942
+ namespace Tag {
943
+ interface Info {
944
+ info?: Info.Info;
945
+ }
946
+ namespace Info {
947
+ interface Info {
948
+ /**
949
+ * Whether X marks the SmartTag active.
950
+ */
951
+ active?: boolean;
952
+ name?: string;
953
+ ticker?: string;
954
+ }
955
+ }
956
+ }
957
+ }
958
+ /**
959
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
960
+ */
961
+ interface Timestamp {
962
+ indices?: Array<number>;
963
+ seconds?: number;
964
+ /**
965
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
966
+ * platforms, which differ by reader.
967
+ */
968
+ tag?: Timestamp.Tag;
969
+ text?: string;
970
+ }
971
+ namespace Timestamp {
972
+ /**
973
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
974
+ * platforms, which differ by reader.
975
+ */
976
+ interface Tag {
977
+ /**
978
+ * X's ID for the SmartTag.
979
+ */
980
+ id?: string;
981
+ info?: Tag.Info;
982
+ }
983
+ namespace Tag {
984
+ interface Info {
985
+ info?: Info.Info;
986
+ }
987
+ namespace Info {
988
+ interface Info {
989
+ /**
990
+ * Whether X marks the SmartTag active.
991
+ */
992
+ active?: boolean;
993
+ name?: string;
994
+ ticker?: string;
995
+ }
996
+ }
997
+ }
998
+ }
999
+ /**
1000
+ * Provides shortened, display, and expanded URLs from tweet text.
1001
+ */
1002
+ interface URL {
1003
+ display_url?: string;
1004
+ expanded_url?: string;
1005
+ indices?: Array<number>;
1006
+ url?: string;
1007
+ }
1008
+ /**
1009
+ * Provides profile identity and source offsets for a mention.
1010
+ */
1011
+ interface UserMention {
1012
+ screen_name: string;
1013
+ id_str?: string;
1014
+ indices?: Array<number>;
1015
+ name?: string;
1016
+ }
1017
+ }
1018
+ /**
1019
+ * Marks a subscriber-only post with the creator whose subscription unlocks it.
1020
+ * Non-subscribers get the preview text & the subscribe link. Omitted on public
1021
+ * posts.
1022
+ */
1023
+ interface ExclusiveContent {
1024
+ /**
1025
+ * Username of the creator whose subscription unlocks the post.
1026
+ */
1027
+ creatorUserName: string;
1028
+ /**
1029
+ * Subscribe link X shows non-subscribers. Omitted when X serves the full post.
1030
+ */
1031
+ subscribeUrl?: string;
1032
+ }
1033
+ /**
1034
+ * Author-published point, with latitude before longitude.
1035
+ */
1036
+ interface Geo {
1037
+ coordinates: Array<number>;
1038
+ type: 'Point';
1039
+ }
1040
+ /**
1041
+ * The notice x.com covers the post with until the reader views it, such as X's
1042
+ * public interest notice on a post that broke its rules but stays up.
1043
+ */
1044
+ interface Interstitial {
1045
+ /**
1046
+ * How x.com shows the notice. `NonCompliant` marks a post that broke X's rules.
1047
+ */
1048
+ displayType?: string;
1049
+ text?: Interstitial.Text;
1050
+ }
1051
+ namespace Interstitial {
1052
+ interface Text {
1053
+ /**
1054
+ * Links inside the notice, by character range.
1055
+ */
1056
+ entities?: Array<Text.Entity>;
1057
+ /**
1058
+ * Whether X writes it right to left.
1059
+ */
1060
+ rtl?: boolean;
1061
+ /**
1062
+ * The notice's text.
1063
+ */
1064
+ text?: string;
1065
+ }
1066
+ namespace Text {
1067
+ interface Entity {
1068
+ /**
1069
+ * Whole number from 0.
1070
+ */
1071
+ fromIndex?: number;
1072
+ ref?: Entity.Ref;
1073
+ /**
1074
+ * Whole number from 0.
1075
+ */
1076
+ toIndex?: number;
1077
+ }
1078
+ namespace Entity {
1079
+ interface Ref {
1080
+ type?: string;
1081
+ url?: string;
1082
+ urlType?: string;
1083
+ }
1084
+ }
1085
+ }
1086
+ }
1087
+ interface LimitedAction {
1088
+ action?: string;
1089
+ prompt?: LimitedAction.Prompt;
1090
+ }
1091
+ namespace LimitedAction {
1092
+ interface Prompt {
1093
+ ctaType?: string;
1094
+ headline?: string;
1095
+ /**
1096
+ * Public metadata whose fields are defined by X.
1097
+ */
1098
+ metadata?: {
1099
+ [key: string]: unknown;
1100
+ };
1101
+ subtext?: string;
1102
+ }
421
1103
  }
422
1104
  /**
423
1105
  * Complete Note Tweet content and rich-text metadata.
424
1106
  */
425
1107
  interface NoteTweet {
426
1108
  text: string;
427
- id?: string;
428
- entities?: {
429
- [key: string]: unknown;
430
- };
1109
+ /**
1110
+ * X's global ID of the Note, base64 of `NoteTweet:<noteId>`.
1111
+ */
1112
+ id?: string;
1113
+ /**
1114
+ * Lists hashtags, symbols, links, and mentions from tweet text.
1115
+ */
1116
+ entities?: NoteTweet.Entities;
1117
+ /**
1118
+ * Inline media positions in the Note Tweet text.
1119
+ */
1120
+ inlineMedia?: Array<NoteTweet.InlineMedia>;
431
1121
  isExpandable?: boolean;
1122
+ /**
1123
+ * The Note's own ID, apart from the post's.
1124
+ */
1125
+ noteId?: string;
432
1126
  richtextTags?: Array<NoteTweet.RichtextTag>;
433
1127
  }
434
1128
  namespace NoteTweet {
1129
+ /**
1130
+ * Lists hashtags, symbols, links, and mentions from tweet text.
1131
+ */
1132
+ interface Entities {
1133
+ hashtags?: Array<Entities.Hashtag>;
1134
+ smarttags?: Array<Entities.Smarttag>;
1135
+ symbols?: Array<Entities.Symbol>;
1136
+ timestamps?: Array<Entities.Timestamp>;
1137
+ urls?: Array<Entities.URL>;
1138
+ user_mentions?: Array<Entities.UserMention>;
1139
+ }
1140
+ namespace Entities {
1141
+ /**
1142
+ * Provides hashtag text and source offsets within a tweet.
1143
+ */
1144
+ interface Hashtag {
1145
+ text: string;
1146
+ indices?: Array<number>;
1147
+ /**
1148
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1149
+ * platforms, which differ by reader.
1150
+ */
1151
+ tag?: Hashtag.Tag;
1152
+ }
1153
+ namespace Hashtag {
1154
+ /**
1155
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1156
+ * platforms, which differ by reader.
1157
+ */
1158
+ interface Tag {
1159
+ /**
1160
+ * X's ID for the SmartTag.
1161
+ */
1162
+ id?: string;
1163
+ info?: Tag.Info;
1164
+ }
1165
+ namespace Tag {
1166
+ interface Info {
1167
+ info?: Info.Info;
1168
+ }
1169
+ namespace Info {
1170
+ interface Info {
1171
+ /**
1172
+ * Whether X marks the SmartTag active.
1173
+ */
1174
+ active?: boolean;
1175
+ name?: string;
1176
+ ticker?: string;
1177
+ }
1178
+ }
1179
+ }
1180
+ }
1181
+ /**
1182
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
1183
+ */
1184
+ interface Smarttag {
1185
+ indices?: Array<number>;
1186
+ seconds?: number;
1187
+ /**
1188
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1189
+ * platforms, which differ by reader.
1190
+ */
1191
+ tag?: Smarttag.Tag;
1192
+ text?: string;
1193
+ }
1194
+ namespace Smarttag {
1195
+ /**
1196
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1197
+ * platforms, which differ by reader.
1198
+ */
1199
+ interface Tag {
1200
+ /**
1201
+ * X's ID for the SmartTag.
1202
+ */
1203
+ id?: string;
1204
+ info?: Tag.Info;
1205
+ }
1206
+ namespace Tag {
1207
+ interface Info {
1208
+ info?: Info.Info;
1209
+ }
1210
+ namespace Info {
1211
+ interface Info {
1212
+ /**
1213
+ * Whether X marks the SmartTag active.
1214
+ */
1215
+ active?: boolean;
1216
+ name?: string;
1217
+ ticker?: string;
1218
+ }
1219
+ }
1220
+ }
1221
+ }
1222
+ /**
1223
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
1224
+ */
1225
+ interface Symbol {
1226
+ indices?: Array<number>;
1227
+ seconds?: number;
1228
+ /**
1229
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1230
+ * platforms, which differ by reader.
1231
+ */
1232
+ tag?: Symbol.Tag;
1233
+ text?: string;
1234
+ }
1235
+ namespace Symbol {
1236
+ /**
1237
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1238
+ * platforms, which differ by reader.
1239
+ */
1240
+ interface Tag {
1241
+ /**
1242
+ * X's ID for the SmartTag.
1243
+ */
1244
+ id?: string;
1245
+ info?: Tag.Info;
1246
+ }
1247
+ namespace Tag {
1248
+ interface Info {
1249
+ info?: Info.Info;
1250
+ }
1251
+ namespace Info {
1252
+ interface Info {
1253
+ /**
1254
+ * Whether X marks the SmartTag active.
1255
+ */
1256
+ active?: boolean;
1257
+ name?: string;
1258
+ ticker?: string;
1259
+ }
1260
+ }
1261
+ }
1262
+ }
1263
+ /**
1264
+ * Indexed smart-tag, cashtag, or video timestamp metadata.
1265
+ */
1266
+ interface Timestamp {
1267
+ indices?: Array<number>;
1268
+ seconds?: number;
1269
+ /**
1270
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1271
+ * platforms, which differ by reader.
1272
+ */
1273
+ tag?: Timestamp.Tag;
1274
+ text?: string;
1275
+ }
1276
+ namespace Timestamp {
1277
+ /**
1278
+ * X's SmartTag for a cashtag, smarttag or hashtag. Xquik leaves out X's trading
1279
+ * platforms, which differ by reader.
1280
+ */
1281
+ interface Tag {
1282
+ /**
1283
+ * X's ID for the SmartTag.
1284
+ */
1285
+ id?: string;
1286
+ info?: Tag.Info;
1287
+ }
1288
+ namespace Tag {
1289
+ interface Info {
1290
+ info?: Info.Info;
1291
+ }
1292
+ namespace Info {
1293
+ interface Info {
1294
+ /**
1295
+ * Whether X marks the SmartTag active.
1296
+ */
1297
+ active?: boolean;
1298
+ name?: string;
1299
+ ticker?: string;
1300
+ }
1301
+ }
1302
+ }
1303
+ }
1304
+ /**
1305
+ * Provides shortened, display, and expanded URLs from tweet text.
1306
+ */
1307
+ interface URL {
1308
+ display_url?: string;
1309
+ expanded_url?: string;
1310
+ indices?: Array<number>;
1311
+ url?: string;
1312
+ }
1313
+ /**
1314
+ * Provides profile identity and source offsets for a mention.
1315
+ */
1316
+ interface UserMention {
1317
+ screen_name: string;
1318
+ id_str?: string;
1319
+ indices?: Array<number>;
1320
+ name?: string;
1321
+ }
1322
+ }
1323
+ interface InlineMedia {
1324
+ /**
1325
+ * Whole number from 0.
1326
+ */
1327
+ index: number;
1328
+ mediaId: string;
1329
+ }
435
1330
  interface RichtextTag {
1331
+ /**
1332
+ * Whole number from 0.
1333
+ */
436
1334
  fromIndex: number;
1335
+ /**
1336
+ * Whole number from 0.
1337
+ */
437
1338
  toIndex: number;
438
1339
  types: Array<string>;
439
1340
  }
440
1341
  }
441
1342
  /**
442
- * Public place metadata attached to a tweet.
1343
+ * Describes public place metadata on a geotagged tweet.
443
1344
  */
444
1345
  interface Place {
445
1346
  id?: string;
1347
+ /**
1348
+ * Public metadata whose fields are defined by X.
1349
+ */
446
1350
  boundingBox?: {
447
1351
  [key: string]: unknown;
448
1352
  };
@@ -457,48 +1361,248 @@ export declare namespace SearchTweet {
457
1361
  * Engagement counts retained from a prior tweet edit.
458
1362
  */
459
1363
  interface PreviousCounts {
1364
+ /**
1365
+ * Whole number from 0.
1366
+ */
460
1367
  bookmarkCount?: number;
1368
+ /**
1369
+ * Whole number from 0.
1370
+ */
461
1371
  likeCount?: number;
1372
+ /**
1373
+ * Whole number from 0.
1374
+ */
462
1375
  quoteCount?: number;
1376
+ /**
1377
+ * Whole number from 0.
1378
+ */
463
1379
  replyCount?: number;
1380
+ /**
1381
+ * Whole number from 0.
1382
+ */
464
1383
  retweetCount?: number;
465
1384
  }
1385
+ /**
1386
+ * The quoted post's link, kept when X withholds that post.
1387
+ */
1388
+ interface QuotedTweetPermalink {
1389
+ displayUrl?: string;
1390
+ expandedUrl?: string;
1391
+ url?: string;
1392
+ }
1393
+ /**
1394
+ * Why X shows no quoted post. Omitted when X names no reason, as its legacy
1395
+ * answers never do.
1396
+ */
1397
+ interface QuotedTweetUnavailable {
1398
+ /**
1399
+ * X's reason, such as `Suspended` for a suspended author or `Protected` for an
1400
+ * author who protects their posts.
1401
+ */
1402
+ reason: string;
1403
+ }
1404
+ /**
1405
+ * Public post & user this reaction references.
1406
+ */
1407
+ interface ReactionContext {
1408
+ /**
1409
+ * Referenced post ID.
1410
+ */
1411
+ reactedToPostId?: string;
1412
+ /**
1413
+ * Public X profile.
1414
+ */
1415
+ reactedToUser?: Shared.UserProfile;
1416
+ }
1417
+ /**
1418
+ * Game metadata attached to this post.
1419
+ */
1420
+ interface SportsContext {
1421
+ /**
1422
+ * Teams & reported scores.
1423
+ */
1424
+ competitors?: Array<SportsContext.Competitor>;
1425
+ /**
1426
+ * Game ID.
1427
+ */
1428
+ gameId?: string;
1429
+ /**
1430
+ * League ID.
1431
+ */
1432
+ league?: string;
1433
+ /**
1434
+ * Scheduled Unix milliseconds, retaining the source type.
1435
+ */
1436
+ scheduledAtMs?: number | string;
1437
+ /**
1438
+ * Reported game state.
1439
+ */
1440
+ state?: string;
1441
+ /**
1442
+ * Game progress text.
1443
+ */
1444
+ statusText?: string;
1445
+ /**
1446
+ * Game title.
1447
+ */
1448
+ title?: string;
1449
+ /**
1450
+ * Game link.
1451
+ */
1452
+ url?: string;
1453
+ }
1454
+ namespace SportsContext {
1455
+ interface Competitor {
1456
+ /**
1457
+ * Team abbreviation.
1458
+ */
1459
+ abbreviation?: string;
1460
+ /**
1461
+ * Team display color.
1462
+ */
1463
+ color?: string;
1464
+ /**
1465
+ * Logo for dark backgrounds.
1466
+ */
1467
+ darkLogoUrl?: string;
1468
+ /**
1469
+ * Active competitor.
1470
+ */
1471
+ isActive?: boolean;
1472
+ /**
1473
+ * Winning competitor.
1474
+ */
1475
+ isWinner?: boolean;
1476
+ /**
1477
+ * Logo for light backgrounds.
1478
+ */
1479
+ logoUrl?: string;
1480
+ /**
1481
+ * Team name.
1482
+ */
1483
+ name?: string;
1484
+ /**
1485
+ * Score display text.
1486
+ */
1487
+ score?: string;
1488
+ /**
1489
+ * Team ID.
1490
+ */
1491
+ teamId?: string;
1492
+ }
1493
+ }
1494
+ /**
1495
+ * The Subscriber badge X shows on a reply. The reply's author subscribes to the
1496
+ * creator who started the conversation. Omitted on a post without the badge.
1497
+ */
1498
+ interface SubscriberBadge {
1499
+ /**
1500
+ * Account ID of the creator the author subscribes to.
1501
+ */
1502
+ creatorId: string;
1503
+ }
1504
+ interface TextHighlight {
1505
+ /**
1506
+ * The first code point after the match.
1507
+ */
1508
+ endIndex: number;
1509
+ /**
1510
+ * The first code point of the match.
1511
+ */
1512
+ startIndex: number;
1513
+ }
1514
+ /**
1515
+ * Public visibility notice attached to an available tweet.
1516
+ */
1517
+ interface Tombstone {
1518
+ text?: Tombstone.Text;
1519
+ /**
1520
+ * Visibility notice type.
1521
+ */
1522
+ type?: string;
1523
+ }
1524
+ namespace Tombstone {
1525
+ interface Text {
1526
+ entities?: Array<Text.Entity>;
1527
+ /**
1528
+ * Right-to-left text direction.
1529
+ */
1530
+ rtl?: boolean;
1531
+ /**
1532
+ * Human-readable notice text.
1533
+ */
1534
+ text?: string;
1535
+ }
1536
+ namespace Text {
1537
+ interface Entity {
1538
+ /**
1539
+ * Whole number from 0.
1540
+ */
1541
+ fromIndex?: number;
1542
+ ref?: Entity.Ref;
1543
+ /**
1544
+ * Whole number from 0.
1545
+ */
1546
+ toIndex?: number;
1547
+ }
1548
+ namespace Entity {
1549
+ interface Ref {
1550
+ type?: string;
1551
+ url?: string;
1552
+ urlType?: string;
1553
+ }
1554
+ }
1555
+ }
1556
+ }
466
1557
  }
467
1558
  /**
468
- * Normalized media attached to a tweet.
1559
+ * Tweet media.
469
1560
  */
470
1561
  export interface TweetMedia {
471
1562
  /**
472
- * Media preview URL
1563
+ * Preview URL.
473
1564
  */
474
1565
  mediaUrl: string;
475
1566
  type: 'photo' | 'video' | 'animated_gif';
476
1567
  /**
477
- * X media link from the tweet
1568
+ * Tweet media link.
478
1569
  */
479
1570
  url: string;
480
1571
  /**
481
- * X media entity ID.
1572
+ * Media entity ID.
482
1573
  */
483
1574
  id?: string;
484
1575
  /**
485
- * Whether X permits direct media download.
1576
+ * Adult-content warning.
1577
+ */
1578
+ adultContent?: boolean;
1579
+ /**
1580
+ * Direct download permission.
486
1581
  */
487
1582
  allowDownload?: boolean;
488
1583
  /**
489
- * Accessibility text supplied for the media.
1584
+ * Accessibility text.
490
1585
  */
491
1586
  altText?: string;
492
1587
  /**
493
- * Video aspect ratio as width and height.
1588
+ * Video width and height ratio.
494
1589
  */
495
1590
  aspectRatio?: Array<number>;
496
1591
  /**
497
- * Media availability state reported by X.
1592
+ * Why X made the media unavailable, such as `Dmcaed` after a copyright report.
1593
+ * Omitted on available media.
1594
+ */
1595
+ availabilityReason?: string;
1596
+ /**
1597
+ * Availability state, such as `Available` or `Unavailable`.
498
1598
  */
499
1599
  availabilityStatus?: string;
500
1600
  /**
501
- * Display-friendly media URL reported by X.
1601
+ * Media description.
1602
+ */
1603
+ description?: string;
1604
+ /**
1605
+ * Display URL.
502
1606
  */
503
1607
  displayUrl?: string;
504
1608
  /**
@@ -506,25 +1610,41 @@ export interface TweetMedia {
506
1610
  */
507
1611
  durationMillis?: number;
508
1612
  /**
509
- * Expanded X media URL.
1613
+ * Embeddable status.
1614
+ */
1615
+ embeddable?: boolean;
1616
+ /**
1617
+ * Expanded media URL.
510
1618
  */
511
1619
  expandedUrl?: string;
512
1620
  /**
513
- * Face-aware crop rectangles grouped by media size.
1621
+ * Face crop rectangles by size.
514
1622
  */
515
1623
  faceRects?: {
516
1624
  [key: string]: Array<TweetMedia.FaceRect>;
517
1625
  };
518
1626
  /**
519
- * Suggested image crops reported by X.
1627
+ * Suggested image crops.
520
1628
  */
521
1629
  focusRects?: Array<TweetMedia.FocusRect>;
522
1630
  /**
523
- * Original media height.
1631
+ * Graphic-violence warning.
1632
+ */
1633
+ graphicViolence?: boolean;
1634
+ /**
1635
+ * Prompt a Grok image came from. Absent on other media & when X sends no prompt.
1636
+ */
1637
+ grokImageAnnotation?: TweetMedia.GrokImageAnnotation;
1638
+ /**
1639
+ * Grok post ID associated with the media.
1640
+ */
1641
+ grokPostId?: string;
1642
+ /**
1643
+ * Original height.
524
1644
  */
525
1645
  height?: number;
526
1646
  /**
527
- * Media entity offsets in the tweet text.
1647
+ * Tweet text offsets.
528
1648
  */
529
1649
  indices?: Array<number>;
530
1650
  /**
@@ -532,9 +1652,10 @@ export interface TweetMedia {
532
1652
  */
533
1653
  mediaKey?: string;
534
1654
  /**
535
- * Whether X reports the media as monetizable.
1655
+ * Monetization status.
536
1656
  */
537
1657
  monetizable?: boolean;
1658
+ otherSensitiveContent?: boolean;
538
1659
  /**
539
1660
  * Named media renditions and resize modes.
540
1661
  */
@@ -542,63 +1663,237 @@ export interface TweetMedia {
542
1663
  [key: string]: TweetMedia.Sizes;
543
1664
  };
544
1665
  /**
545
- * Available video encodings, ordered as returned
1666
+ * Source tweet ID for copied media.
1667
+ */
1668
+ sourceStatusId?: string;
1669
+ /**
1670
+ * The account that first posted the media. Some reads carry only its name, picture
1671
+ * & badges.
1672
+ */
1673
+ sourceUser?: UserProfile;
1674
+ /**
1675
+ * Source profile ID for copied media.
1676
+ */
1677
+ sourceUserId?: string;
1678
+ /**
1679
+ * Public profiles tagged in the media.
1680
+ */
1681
+ tags?: Array<TweetMedia.Tag>;
1682
+ /**
1683
+ * Media title.
1684
+ */
1685
+ title?: string;
1686
+ /**
1687
+ * Video encodings in source order.
546
1688
  */
547
1689
  videoVariants?: Array<TweetMedia.VideoVariant>;
548
1690
  /**
549
- * Original media width.
1691
+ * Public destination URL.
1692
+ */
1693
+ visitSiteUrl?: string;
1694
+ /**
1695
+ * Public media action URL.
1696
+ */
1697
+ watchNowUrl?: string;
1698
+ /**
1699
+ * Original width.
550
1700
  */
551
1701
  width?: number;
552
1702
  }
553
1703
  export declare namespace TweetMedia {
554
1704
  interface FaceRect {
1705
+ /**
1706
+ * Whole number from 0.
1707
+ */
555
1708
  h: number;
1709
+ /**
1710
+ * Whole number from 0.
1711
+ */
556
1712
  w: number;
1713
+ /**
1714
+ * Whole number from 0.
1715
+ */
557
1716
  x: number;
1717
+ /**
1718
+ * Whole number from 0.
1719
+ */
558
1720
  y: number;
559
1721
  }
560
1722
  interface FocusRect {
1723
+ /**
1724
+ * Whole number from 0.
1725
+ */
561
1726
  h: number;
1727
+ /**
1728
+ * Whole number from 0.
1729
+ */
562
1730
  w: number;
1731
+ /**
1732
+ * Whole number from 0.
1733
+ */
563
1734
  x: number;
1735
+ /**
1736
+ * Whole number from 0.
1737
+ */
564
1738
  y: number;
565
1739
  }
1740
+ /**
1741
+ * Prompt a Grok image came from. Absent on other media & when X sends no prompt.
1742
+ */
1743
+ interface GrokImageAnnotation {
1744
+ /**
1745
+ * Prompt the image came from.
1746
+ */
1747
+ prompt?: string;
1748
+ /**
1749
+ * Grok's longer rewrite of the prompt.
1750
+ */
1751
+ upsampledPrompt?: string;
1752
+ }
566
1753
  interface Sizes {
1754
+ /**
1755
+ * Whole number from 0.
1756
+ */
567
1757
  h: number;
568
1758
  resize: string;
1759
+ /**
1760
+ * Whole number from 0.
1761
+ */
569
1762
  w: number;
570
1763
  }
1764
+ interface Tag {
1765
+ name?: string;
1766
+ screen_name?: string;
1767
+ type?: string;
1768
+ user_id?: string;
1769
+ }
571
1770
  interface VideoVariant {
572
1771
  contentType: string;
573
1772
  url: string;
1773
+ /**
1774
+ * Whole number from 0.
1775
+ */
574
1776
  bitrate?: number;
575
1777
  }
576
1778
  }
577
1779
  /**
578
- * X user profile with bio, follower counts, and verification status.
1780
+ * Public X profile.
579
1781
  */
580
1782
  export interface UserProfile {
581
1783
  id: string;
582
1784
  name: string;
583
1785
  username: string;
1786
+ /**
1787
+ * Null when X shows no label.
1788
+ */
1789
+ accountBasedIn?: UserProfile.AccountBasedIn | null;
1790
+ /**
1791
+ * False when X notes accountBasedIn may be inaccurate.
1792
+ */
1793
+ accountBasedInAccurate?: boolean;
1794
+ /**
1795
+ * True when X withheld accountBasedIn from this read. Retry later.
1796
+ */
1797
+ accountBasedInUnavailable?: boolean;
1798
+ /**
1799
+ * X Ads services the account uses, such as `analytics`, `media_studio` or `smb`.
1800
+ * Empty for an account without ads.
1801
+ */
1802
+ advertiserAccountServiceLevels?: Array<string>;
1803
+ /**
1804
+ * The account's X Ads type. `none` for an account without ads, or
1805
+ * `promotable_user` for one that may run them.
1806
+ */
1807
+ advertiserAccountType?: string;
584
1808
  /**
585
1809
  * Organization affiliation label shown on an X profile.
586
1810
  */
587
1811
  affiliatesHighlightedLabel?: UserProfile.AffiliatesHighlightedLabel;
1812
+ /**
1813
+ * Handle of the organization X shows the account is affiliated with, from its
1814
+ * About page.
1815
+ */
1816
+ affiliateUsername?: string;
588
1817
  automatedBy?: string;
1818
+ /**
1819
+ * The parts of the birthday the account made public.
1820
+ */
1821
+ birthdate?: UserProfile.Birthdate;
1822
+ /**
1823
+ * Whole number from 0.
1824
+ */
589
1825
  businessAccountAffiliatesCount?: number;
1826
+ /**
1827
+ * Whether X treats the profile as a business profile. `none` or `enabled`.
1828
+ */
1829
+ businessProfileState?: string;
590
1830
  /**
591
1831
  * Community role when returned by community member reads
592
1832
  */
593
1833
  communityRole?: string;
1834
+ /**
1835
+ * How the account first connected to X.
1836
+ */
1837
+ connectedVia?: string;
1838
+ /**
1839
+ * False when X notes that country may be inaccurate.
1840
+ */
1841
+ connectedViaAccurate?: boolean;
1842
+ /**
1843
+ * Emails, phone numbers & links the account publishes on its own profile. Omitted
1844
+ * when it publishes none.
1845
+ */
1846
+ contactInfo?: UserProfile.ContactInfo;
594
1847
  coverPicture?: string;
1848
+ /**
1849
+ * Account creation time.
1850
+ */
595
1851
  createdAt?: string;
1852
+ /**
1853
+ * Whole number from 0.
1854
+ */
596
1855
  creatorSubscriptionsCount?: number;
1856
+ /**
1857
+ * Whether the profile keeps X's default theme.
1858
+ */
1859
+ defaultProfile?: boolean;
1860
+ /**
1861
+ * Whether the profile keeps X's default avatar.
1862
+ */
1863
+ defaultProfileImage?: boolean;
597
1864
  description?: string;
1865
+ /**
1866
+ * First email the account publishes on its profile, lowercased. Omitted when it
1867
+ * publishes none.
1868
+ */
1869
+ email?: string;
1870
+ /**
1871
+ * Followers X counts as fast followers.
1872
+ */
1873
+ fastFollowersCount?: number;
598
1874
  favouritesCount?: number;
1875
+ /**
1876
+ * Omitted when X sends no count, as for the account that first posted reused
1877
+ * media.
1878
+ */
599
1879
  followers?: number;
600
1880
  following?: number;
1881
+ /**
1882
+ * Whether the profile may add a location to posts.
1883
+ */
1884
+ geoEnabled?: boolean;
1885
+ /**
1886
+ * Public profile bio translation returned by X
1887
+ */
1888
+ grokTranslatedBio?: {
1889
+ [key: string]: unknown;
1890
+ };
601
1891
  hasCustomTimelines?: boolean;
1892
+ /**
1893
+ * Whether the profile filled X's extended fields, such as a birth date. True or
1894
+ * false.
1895
+ */
1896
+ hasExtendedProfile?: boolean;
602
1897
  hasGraduatedAccess?: boolean;
603
1898
  hasHiddenSubscriptionsOnProfile?: boolean;
604
1899
  /**
@@ -606,7 +1901,7 @@ export interface UserProfile {
606
1901
  */
607
1902
  highlightsInfo?: UserProfile.HighlightsInfo;
608
1903
  /**
609
- * Identity verification metadata displayed by X.
1904
+ * Identity verification X shows on the profile & its About page.
610
1905
  */
611
1906
  identityVerification?: UserProfile.IdentityVerification;
612
1907
  isAutomated?: boolean;
@@ -615,16 +1910,37 @@ export interface UserProfile {
615
1910
  */
616
1911
  isBlueVerified?: boolean;
617
1912
  isProfileTranslatable?: boolean;
1913
+ /**
1914
+ * Whether the account turned on X's translation of its posts. True or false.
1915
+ */
1916
+ isTranslationEnabled?: boolean;
618
1917
  isTranslator?: boolean;
619
1918
  /**
620
1919
  * Whether X marks the profile as verified
621
1920
  */
622
1921
  isVerified?: boolean;
1922
+ /**
1923
+ * Public lists that include the profile.
1924
+ */
1925
+ listedCount?: number;
1926
+ /**
1927
+ * Account owner's public profile location text
1928
+ */
623
1929
  location?: string;
624
1930
  mediaCount?: number;
1931
+ /**
1932
+ * Followers minus fast followers.
1933
+ */
1934
+ normalFollowersCount?: number;
625
1935
  parodyCommentaryFanLabel?: string;
626
1936
  pinnedTweetIds?: Array<string>;
627
1937
  possiblySensitive?: boolean;
1938
+ /**
1939
+ * Professional metadata with category display settings
1940
+ */
1941
+ professional?: {
1942
+ [key: string]: unknown;
1943
+ };
628
1944
  /**
629
1945
  * Structured profile bio with entity annotations
630
1946
  */
@@ -645,27 +1961,147 @@ export interface UserProfile {
645
1961
  * Whether the profile protects its posts
646
1962
  */
647
1963
  protected?: boolean;
1964
+ /**
1965
+ * UTC repost time with includeRetweetTimestamp. Null if the newest profile page
1966
+ * has no match or lookup failed; otherwise omitted.
1967
+ */
1968
+ retweetedAt?: string | null;
648
1969
  statusesCount?: number;
1970
+ /**
1971
+ * Accounts subscribed to the profile's paid Subscriptions. 0 when it has none.
1972
+ */
1973
+ subscribersCount?: number;
649
1974
  superFollowEligible?: boolean;
1975
+ /**
1976
+ * Whether X marks the subscription profile as active.
1977
+ */
1978
+ superFollowsUserProfileActive?: boolean;
1979
+ /**
1980
+ * Public payment and creator-support handles shown on X.
1981
+ */
1982
+ tipJar?: UserProfile.TipJar;
650
1983
  unavailable?: boolean;
651
1984
  unavailableReason?: string;
652
1985
  url?: string;
1986
+ /**
1987
+ * How often the account changed its username.
1988
+ */
1989
+ usernameChanges?: UserProfile.UsernameChanges;
1990
+ /**
1991
+ * X's text on why the profile is verified, with its links.
1992
+ */
1993
+ verificationReason?: UserProfile.VerificationReason;
653
1994
  verified?: boolean;
654
1995
  verifiedType?: string;
655
1996
  withheldInCountries?: Array<string>;
1997
+ /**
1998
+ * Whether X withholds a post or user
1999
+ */
2000
+ withheldScope?: string;
656
2001
  }
657
2002
  export declare namespace UserProfile {
2003
+ /**
2004
+ * X's best-effort public label inferred from aggregated account-access IP
2005
+ * addresses. It does not state nationality, residence, identity, registration,
2006
+ * post location, or exact location.
2007
+ */
2008
+ interface AccountBasedIn {
2009
+ level: 'country' | 'region';
2010
+ observedAt: string;
2011
+ value: string;
2012
+ }
658
2013
  /**
659
2014
  * Organization affiliation label shown on an X profile.
660
2015
  */
661
2016
  interface AffiliatesHighlightedLabel {
662
2017
  badgeUrl?: string;
663
2018
  description?: string;
2019
+ /**
2020
+ * Public text, ranges, references, and mention data.
2021
+ */
2022
+ longDescription?: {
2023
+ [key: string]: unknown;
2024
+ };
664
2025
  url?: string;
665
2026
  urlType?: string;
666
2027
  userLabelDisplayType?: string;
667
2028
  userLabelType?: string;
668
2029
  }
2030
+ /**
2031
+ * The parts of the birthday the account made public.
2032
+ */
2033
+ interface Birthdate {
2034
+ day?: number;
2035
+ month?: number;
2036
+ year?: number;
2037
+ }
2038
+ /**
2039
+ * Emails, phone numbers & links the account publishes on its own profile. Omitted
2040
+ * when it publishes none.
2041
+ */
2042
+ interface ContactInfo {
2043
+ /**
2044
+ * Emails in the bio, name or location, lowercased.
2045
+ */
2046
+ emails?: Array<ContactInfo.Email>;
2047
+ /**
2048
+ * The profile's website & the links in its bio.
2049
+ */
2050
+ links?: Array<ContactInfo.Link>;
2051
+ /**
2052
+ * Phone numbers on the profile. Only a spelling that can be nothing else counts.
2053
+ */
2054
+ phones?: Array<ContactInfo.Phone>;
2055
+ }
2056
+ namespace ContactInfo {
2057
+ interface Email {
2058
+ /**
2059
+ * The part after the @ sign.
2060
+ */
2061
+ domain: string;
2062
+ /**
2063
+ * Profile field that holds the email.
2064
+ */
2065
+ source: 'bio' | 'name' | 'location';
2066
+ /**
2067
+ * The email address.
2068
+ */
2069
+ value: string;
2070
+ /**
2071
+ * The account's own spelling, sent when it spelled the email out.
2072
+ */
2073
+ writtenAs?: string;
2074
+ }
2075
+ interface Link {
2076
+ /**
2077
+ * Site the link belongs to, such as `linkedin`, `github` or `telegram`. Any other
2078
+ * site is `website`.
2079
+ */
2080
+ network: string;
2081
+ /**
2082
+ * `url` for the website field, `bio` for a bio link.
2083
+ */
2084
+ source: 'url' | 'bio';
2085
+ /**
2086
+ * The link, as X expands it.
2087
+ */
2088
+ url: string;
2089
+ }
2090
+ interface Phone {
2091
+ /**
2092
+ * Profile field that holds the number.
2093
+ */
2094
+ source: 'bio' | 'name' | 'location' | 'url';
2095
+ /**
2096
+ * The digits, with a leading + when the account wrote a country code.
2097
+ */
2098
+ value: string;
2099
+ /**
2100
+ * The account's own spelling of the number.
2101
+ */
2102
+ writtenAs?: string;
2103
+ }
2104
+ }
669
2105
  /**
670
2106
  * Profile highlight availability and count metadata.
671
2107
  */
@@ -674,12 +2110,69 @@ export declare namespace UserProfile {
674
2110
  highlightedTweets?: string;
675
2111
  }
676
2112
  /**
677
- * Identity verification metadata displayed by X.
2113
+ * Identity verification X shows on the profile & its About page.
678
2114
  */
679
2115
  interface IdentityVerification {
680
2116
  description?: string;
2117
+ /**
2118
+ * Whether the owner verified their ID with X.
2119
+ */
681
2120
  isIdentityVerified?: boolean;
2121
+ /**
2122
+ * When X verified the account, in milliseconds since 1970, as text.
2123
+ */
682
2124
  verifiedSinceMsec?: string;
683
2125
  }
2126
+ /**
2127
+ * Public payment and creator-support handles shown on X.
2128
+ */
2129
+ interface TipJar {
2130
+ bandcampHandle?: string;
2131
+ bitcoinHandle?: string;
2132
+ cashAppHandle?: string;
2133
+ ethereumHandle?: string;
2134
+ gofundmeHandle?: string;
2135
+ isEnabled?: boolean;
2136
+ patreonHandle?: string;
2137
+ payPalHandle?: string;
2138
+ venmoHandle?: string;
2139
+ }
2140
+ /**
2141
+ * How often the account changed its username.
2142
+ */
2143
+ interface UsernameChanges {
2144
+ /**
2145
+ * Whole number from 0.
2146
+ */
2147
+ count: number;
2148
+ /**
2149
+ * Time of the latest change, omitted when there is none.
2150
+ */
2151
+ lastChangedAt?: string;
2152
+ }
2153
+ /**
2154
+ * X's text on why the profile is verified, with its links.
2155
+ */
2156
+ interface VerificationReason {
2157
+ /**
2158
+ * Links inside the text, by character range.
2159
+ */
2160
+ entities?: Array<VerificationReason.Entity>;
2161
+ text?: string;
2162
+ }
2163
+ namespace VerificationReason {
2164
+ interface Entity {
2165
+ /**
2166
+ * Whole number from 0.
2167
+ */
2168
+ fromIndex?: number;
2169
+ /**
2170
+ * Whole number from 0.
2171
+ */
2172
+ toIndex?: number;
2173
+ url?: string;
2174
+ urlType?: string;
2175
+ }
2176
+ }
684
2177
  }
685
2178
  //# sourceMappingURL=shared.d.ts.map