x-twitter-scraper 0.12.4 → 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 (466) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +30 -9
  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 +99 -344
  389. package/skills/x-twitter-scraper/metadata.json +2 -2
  390. package/skills/x-twitter-scraper/references/mcp-setup.md +12 -15
  391. package/skills/x-twitter-scraper/references/mcp-tools.md +105 -166
  392. package/skills/x-twitter-scraper/references/types-mcp-output-schemas.md +4 -4
  393. package/skills/x-twitter-scraper/references/types.md +0 -1
  394. package/skills/x-twitter-scraper/skill-card.md +5 -6
  395. package/skills/x-twitter-scraper/skillspector-report.md +6 -3
  396. package/skills/xquik-account-automation/LICENSE +21 -0
  397. package/skills/xquik-account-automation/SKILL.md +91 -0
  398. package/skills/xquik-social-research/SKILL.md +48 -55
  399. package/src/client.ts +47 -4
  400. package/src/core/streaming.ts +328 -0
  401. package/src/internal/decoders/line.ts +140 -0
  402. package/src/internal/parse.ts +9 -0
  403. package/src/resources/account.ts +41 -12
  404. package/src/resources/compose.ts +77 -21
  405. package/src/resources/credits.ts +19 -10
  406. package/src/resources/drafts.ts +13 -22
  407. package/src/resources/draws.ts +94 -36
  408. package/src/resources/events.ts +3225 -68
  409. package/src/resources/extractions.ts +512 -125
  410. package/src/resources/guest-wallets.ts +6 -5
  411. package/src/resources/index.ts +24 -1
  412. package/src/resources/monitors/index.ts +2 -0
  413. package/src/resources/monitors/keywords.ts +82 -14
  414. package/src/resources/monitors/monitors.ts +66 -14
  415. package/src/resources/radar.ts +32 -36
  416. package/src/resources/shared.ts +2227 -351
  417. package/src/resources/styles.ts +43 -27
  418. package/src/resources/subscribe.ts +1 -1
  419. package/src/resources/support/index.ts +1 -0
  420. package/src/resources/support/support.ts +2 -0
  421. package/src/resources/support/tickets.ts +38 -10
  422. package/src/resources/trends.ts +23 -5
  423. package/src/resources/webhooks.ts +109 -15
  424. package/src/resources/x/account-connection-attempts.ts +1 -1
  425. package/src/resources/x/account-connection-challenges.ts +39 -11
  426. package/src/resources/x/accounts.ts +46 -10
  427. package/src/resources/x/analysis.ts +3947 -0
  428. package/src/resources/x/bookmarks.ts +103 -9
  429. package/src/resources/x/broadcasts.ts +225 -0
  430. package/src/resources/x/communities/communities.ts +743 -141
  431. package/src/resources/x/communities/index.ts +9 -0
  432. package/src/resources/x/communities/join.ts +46 -23
  433. package/src/resources/x/communities/media.ts +251 -0
  434. package/src/resources/x/communities/tweets.ts +427 -20
  435. package/src/resources/x/dm.ts +334 -11
  436. package/src/resources/x/followers.ts +35 -3
  437. package/src/resources/x/index.ts +106 -1
  438. package/src/resources/x/jobs.ts +627 -0
  439. package/src/resources/x/lists.ts +1307 -28
  440. package/src/resources/x/media.ts +24 -12
  441. package/src/resources/x/profile.ts +60 -30
  442. package/src/resources/x/spaces.ts +1076 -0
  443. package/src/resources/x/tweets/index.ts +18 -0
  444. package/src/resources/x/tweets/like.ts +38 -18
  445. package/src/resources/x/tweets/retweet.ts +38 -18
  446. package/src/resources/x/tweets/tweets.ts +3695 -843
  447. package/src/resources/x/users/follow.ts +38 -18
  448. package/src/resources/x/users/index.ts +22 -0
  449. package/src/resources/x/users/users.ts +3687 -465
  450. package/src/resources/x/write-actions.ts +13 -5
  451. package/src/resources/x/x.ts +1227 -15
  452. package/src/streaming.ts +6 -0
  453. package/src/version.ts +1 -1
  454. package/streaming.d.mts +3 -0
  455. package/streaming.d.mts.map +1 -0
  456. package/streaming.d.ts +3 -0
  457. package/streaming.d.ts.map +1 -0
  458. package/streaming.js +9 -0
  459. package/streaming.js.map +1 -0
  460. package/streaming.mjs +6 -0
  461. package/streaming.mjs.map +1 -0
  462. package/version.d.mts +1 -1
  463. package/version.d.ts +1 -1
  464. package/version.js +1 -1
  465. package/version.mjs +1 -1
  466. package/skills/x-twitter-scraper/references/types-rest-api-vs-mcp-field-naming.md +0 -15
@@ -3,7 +3,25 @@ import { APIPromise } from "../../core/api-promise.js";
3
3
  import { RequestOptions } from "../../internal/request-options.js";
4
4
  export declare class Dm extends APIResource {
5
5
  /**
6
- * Get DM conversation history
6
+ * Deletes 1 DM from the account's side; the other person keeps it. Success means
7
+ * the account's conversation no longer shows it. Still shown gets 422
8
+ * `x_dm_not_deleted`, uncharged.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const response = await client.x.dm.deleteMessage(
13
+ * '321669910225',
14
+ * {
15
+ * userId: 'userId',
16
+ * account: 'account',
17
+ * 'Idempotency-Key': 'Idempotency-Key',
18
+ * },
19
+ * );
20
+ * ```
21
+ */
22
+ deleteMessage(messageID: string, params: DmDeleteMessageParams, options?: RequestOptions): APIPromise<DmDeleteMessageResponse>;
23
+ /**
24
+ * Returns message history with one user for the connected X account.
7
25
  *
8
26
  * @example
9
27
  * ```ts
@@ -15,7 +33,9 @@ export declare class Dm extends APIResource {
15
33
  */
16
34
  retrieveHistory(userID: string, query: DmRetrieveHistoryParams, options?: RequestOptions): APIPromise<DmRetrieveHistoryResponse>;
17
35
  /**
18
- * Send direct message
36
+ * Sends a direct message through a connected X account. Once X rate limits an
37
+ * account's DMs, its DMs get 429 until X's reset. Xquik sends nothing to X &
38
+ * charges nothing. `Retry-After` & `nextAction.afterMs` give the wait.
19
39
  *
20
40
  * @example
21
41
  * ```ts
@@ -29,6 +49,184 @@ export declare class Dm extends APIResource {
29
49
  */
30
50
  send(userID: string, params: DmSendParams, options?: RequestOptions): APIPromise<DmSendResponse>;
31
51
  }
52
+ /**
53
+ * Durable write record. Poll statusUrl until terminal is true. Reusing its
54
+ * Idempotency-Key returns this record. Create another action only when safeToRetry
55
+ * is true.
56
+ */
57
+ export interface DmDeleteMessageResponse {
58
+ id: string;
59
+ /**
60
+ * Connected account selected for the write.
61
+ */
62
+ account: DmDeleteMessageResponse.Account | null;
63
+ action: 'create_tweet' | 'delete_tweet' | 'like' | 'unlike' | 'retweet' | 'unretweet' | 'follow' | 'unfollow' | 'remove_follower' | 'send_dm' | 'delete_dm' | 'upload_media' | 'update_profile' | 'update_avatar' | 'update_banner' | 'create_community' | 'delete_community' | 'join_community' | 'leave_community';
64
+ /**
65
+ * plannedCredits is the approved maximum. chargedCredits comes from the settled
66
+ * credit ledger. Pending or failed writes are not charged.
67
+ */
68
+ billing: DmDeleteMessageResponse.Billing;
69
+ charged: boolean;
70
+ chargedCredits: string;
71
+ /**
72
+ * Exact follow-up an API client or agent should perform.
73
+ */
74
+ nextAction: DmDeleteMessageResponse.NextAction | null;
75
+ object: 'x_write_action';
76
+ pollAfterMs: number | null;
77
+ /**
78
+ * Stable fingerprint and sanitized payload for replay checks.
79
+ */
80
+ request: DmDeleteMessageResponse.Request;
81
+ /**
82
+ * Confirmed result produced by the write, when available.
83
+ */
84
+ result: DmDeleteMessageResponse.Result | null;
85
+ /**
86
+ * True only when a new attempt can reasonably succeed.
87
+ */
88
+ retryable: boolean;
89
+ /**
90
+ * True only when X did not get the write and a new idempotency key may be used.
91
+ */
92
+ safeToRetry: boolean;
93
+ sendDispatched: boolean;
94
+ status: 'accepted' | 'dispatching' | 'pending_confirmation' | 'success' | 'failed' | 'expired';
95
+ statusUrl: string;
96
+ success: boolean;
97
+ /**
98
+ * Existing X resource targeted by the write, when applicable.
99
+ */
100
+ target: DmDeleteMessageResponse.Target | null;
101
+ targetId: string | null;
102
+ terminal: boolean;
103
+ writeActionId: string;
104
+ /**
105
+ * Compatibility field for a confirmed community ID.
106
+ */
107
+ communityId?: string;
108
+ /**
109
+ * Confirmed community name when available.
110
+ */
111
+ communityName?: string;
112
+ completedAt?: string;
113
+ confirmationAttempts?: number;
114
+ confirmationCheckedAt?: string;
115
+ confirmedAt?: string;
116
+ createdAt?: string;
117
+ /**
118
+ * Structured recovery context for a failed write.
119
+ */
120
+ details?: {
121
+ [key: string]: unknown;
122
+ };
123
+ error?: string;
124
+ /**
125
+ * Deadline for resolving a non-terminal write. This is not the Idempotency-Key
126
+ * retention deadline.
127
+ */
128
+ expiresAt?: string;
129
+ /**
130
+ * True when this answers a retry of an earlier request with the same
131
+ * Idempotency-Key.
132
+ */
133
+ idempotent?: boolean;
134
+ /**
135
+ * Media count, kind, size, and billing details when used.
136
+ */
137
+ media?: {
138
+ [key: string]: unknown;
139
+ };
140
+ /**
141
+ * Compatibility field for a confirmed media upload ID.
142
+ */
143
+ mediaId?: string;
144
+ /**
145
+ * Public media URL when the upload creates one.
146
+ */
147
+ mediaUrl?: string;
148
+ message?: string;
149
+ /**
150
+ * Compatibility field for a confirmed direct message ID.
151
+ */
152
+ messageId?: string;
153
+ requestHash?: string;
154
+ requestId?: string;
155
+ /**
156
+ * Compatibility result ID for other write actions.
157
+ */
158
+ resultId?: string;
159
+ /**
160
+ * Dispatch timestamp when the write reached execution.
161
+ */
162
+ sendDispatchedAt?: string;
163
+ /**
164
+ * Compatibility field for a confirmed tweet result ID.
165
+ */
166
+ tweetId?: string;
167
+ updatedAt?: string;
168
+ }
169
+ export declare namespace DmDeleteMessageResponse {
170
+ /**
171
+ * Connected account selected for the write.
172
+ */
173
+ interface Account {
174
+ id: string;
175
+ username: string;
176
+ }
177
+ /**
178
+ * plannedCredits is the approved maximum. chargedCredits comes from the settled
179
+ * credit ledger. Pending or failed writes are not charged.
180
+ */
181
+ interface Billing {
182
+ charged: boolean;
183
+ chargedCredits: string;
184
+ plannedCredits: string;
185
+ status: 'not_charged' | 'pending' | 'charged' | 'charge_failed' | 'refunded';
186
+ }
187
+ /**
188
+ * Exact follow-up an API client or agent should perform.
189
+ */
190
+ interface NextAction {
191
+ type: 'poll' | 'retry' | 'verify_result' | 'fix_request';
192
+ /**
193
+ * Milliseconds to wait before you poll or retry.
194
+ */
195
+ afterMs?: number;
196
+ requiresNewIdempotencyKey?: boolean;
197
+ url?: string;
198
+ }
199
+ /**
200
+ * Stable fingerprint and sanitized payload for replay checks.
201
+ */
202
+ interface Request {
203
+ /**
204
+ * Stable hash of account, action, target, and payload.
205
+ */
206
+ hash: string | null;
207
+ /**
208
+ * Exact sanitized payload dispatched for this action.
209
+ */
210
+ payload: {
211
+ [key: string]: unknown;
212
+ } | null;
213
+ }
214
+ /**
215
+ * Confirmed result produced by the write, when available.
216
+ */
217
+ interface Result {
218
+ id?: string;
219
+ state?: string;
220
+ type?: 'tweet' | 'direct_message' | 'media' | 'community' | 'state_change';
221
+ }
222
+ /**
223
+ * Existing X resource targeted by the write, when applicable.
224
+ */
225
+ interface Target {
226
+ id: string;
227
+ type: 'tweet' | 'user' | 'community';
228
+ }
229
+ }
32
230
  export interface DmRetrieveHistoryResponse {
33
231
  has_next_page: boolean;
34
232
  messages: Array<DmRetrieveHistoryResponse.Message>;
@@ -45,13 +243,16 @@ export declare namespace DmRetrieveHistoryResponse {
45
243
  * media attachment.
46
244
  */
47
245
  mediaUrl?: string;
246
+ /**
247
+ * Text as x.com shows it, with `&`, `<` & `>` decoded.
248
+ */
48
249
  text?: string;
49
250
  }
50
251
  }
51
252
  /**
52
- * Durable write lifecycle record. Poll statusUrl until terminal is true. Reusing
53
- * the original Idempotency-Key returns this same record. Submit a new write only
54
- * when safeToRetry is true, using a new key.
253
+ * Durable write record. Poll statusUrl until terminal is true. Reusing its
254
+ * Idempotency-Key returns this record. Create another action only when safeToRetry
255
+ * is true.
55
256
  */
56
257
  export interface DmSendResponse {
57
258
  id: string;
@@ -59,7 +260,7 @@ export interface DmSendResponse {
59
260
  * Connected account selected for the write.
60
261
  */
61
262
  account: DmSendResponse.Account | null;
62
- action: 'create_tweet' | 'delete_tweet' | 'like' | 'unlike' | 'retweet' | 'unretweet' | 'follow' | 'unfollow' | 'remove_follower' | 'send_dm' | 'upload_media' | 'update_profile' | 'update_avatar' | 'update_banner' | 'create_community' | 'delete_community' | 'join_community' | 'leave_community';
263
+ action: 'create_tweet' | 'delete_tweet' | 'like' | 'unlike' | 'retweet' | 'unretweet' | 'follow' | 'unfollow' | 'remove_follower' | 'send_dm' | 'delete_dm' | 'upload_media' | 'update_profile' | 'update_avatar' | 'update_banner' | 'create_community' | 'delete_community' | 'join_community' | 'leave_community';
63
264
  /**
64
265
  * plannedCredits is the approved maximum. chargedCredits comes from the settled
65
266
  * credit ledger. Pending or failed writes are not charged.
@@ -86,7 +287,7 @@ export interface DmSendResponse {
86
287
  */
87
288
  retryable: boolean;
88
289
  /**
89
- * True only when no write was dispatched and a new idempotency key may be used.
290
+ * True only when X did not get the write and a new idempotency key may be used.
90
291
  */
91
292
  safeToRetry: boolean;
92
293
  sendDispatched: boolean;
@@ -125,6 +326,10 @@ export interface DmSendResponse {
125
326
  * retention deadline.
126
327
  */
127
328
  expiresAt?: string;
329
+ /**
330
+ * True when this answers a retry of an earlier request with the same
331
+ * Idempotency-Key.
332
+ */
128
333
  idempotent?: boolean;
129
334
  /**
130
335
  * Media count, kind, size, and billing details when used.
@@ -184,6 +389,9 @@ export declare namespace DmSendResponse {
184
389
  */
185
390
  interface NextAction {
186
391
  type: 'poll' | 'retry' | 'verify_result' | 'fix_request';
392
+ /**
393
+ * Milliseconds to wait before you poll or retry.
394
+ */
187
395
  afterMs?: number;
188
396
  requiresNewIdempotencyKey?: boolean;
189
397
  url?: string;
@@ -219,6 +427,27 @@ export declare namespace DmSendResponse {
219
427
  type: 'tweet' | 'user' | 'community';
220
428
  }
221
429
  }
430
+ export interface DmDeleteMessageParams {
431
+ /**
432
+ * Path param: The other person in the conversation: user ID, username with or
433
+ * without @, or URL-encoded profile URL, such as x.com/nasa. Xquik looks up a
434
+ * username's ID first. Anything else gets 400 `invalid_user_id`.
435
+ */
436
+ userId: string;
437
+ /**
438
+ * Query param: Connected X account (@username or ID) that sees the DM.
439
+ */
440
+ account: string;
441
+ /**
442
+ * Header param: Use one unique value per intended write. Reuse it only for an
443
+ * identical retry. A matching retry returns the first answer again, with
444
+ * idempotent: true added. It keeps the first status, body & Retry-After. It sends
445
+ * nothing to X & charges nothing. While the first request runs, a retry returns
446
+ * 202 & the action. Different input returns 409. Protection lasts at least 90
447
+ * days.
448
+ */
449
+ 'Idempotency-Key': string;
450
+ }
222
451
  export interface DmRetrieveHistoryParams {
223
452
  /**
224
453
  * X handle (without the `@` prefix) of the connected X account used to read the
@@ -226,7 +455,8 @@ export interface DmRetrieveHistoryParams {
226
455
  */
227
456
  account: string;
228
457
  /**
229
- * Pagination cursor for DM history
458
+ * Pagination cursor for collection results. Also read as next_cursor, next_token,
459
+ * pagination_token or continuation_token.
230
460
  */
231
461
  cursor?: string;
232
462
  /**
@@ -244,10 +474,12 @@ export interface DmSendParams {
244
474
  */
245
475
  text: string;
246
476
  /**
247
- * Header param: Generate one unique value for each intended write. Reuse it only
248
- * when retrying the exact same account, action, target, and payload. A reused key
249
- * returns the original action. Reusing it with different input returns 409. Replay
250
- * protection remains active for at least 90 days.
477
+ * Header param: Use one unique value per intended write. Reuse it only for an
478
+ * identical retry. A matching retry returns the first answer again, with
479
+ * idempotent: true added. It keeps the first status, body & Retry-After. It sends
480
+ * nothing to X & charges nothing. While the first request runs, a retry returns
481
+ * 202 & the action. Different input returns 409. Protection lasts at least 90
482
+ * days.
251
483
  */
252
484
  'Idempotency-Key': string;
253
485
  /**
@@ -256,6 +488,6 @@ export interface DmSendParams {
256
488
  media_ids?: Array<string>;
257
489
  }
258
490
  export declare namespace Dm {
259
- export { type DmRetrieveHistoryResponse as DmRetrieveHistoryResponse, type DmSendResponse as DmSendResponse, type DmRetrieveHistoryParams as DmRetrieveHistoryParams, type DmSendParams as DmSendParams, };
491
+ export { type DmDeleteMessageResponse as DmDeleteMessageResponse, type DmRetrieveHistoryResponse as DmRetrieveHistoryResponse, type DmSendResponse as DmSendResponse, type DmDeleteMessageParams as DmDeleteMessageParams, type DmRetrieveHistoryParams as DmRetrieveHistoryParams, type DmSendParams as DmSendParams, };
260
492
  }
261
493
  //# sourceMappingURL=dm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dm.d.ts","sourceRoot":"","sources":["../../src/resources/x/dm.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;OAUG;IACH,eAAe,CACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,uBAA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C5E;IAED;;OAEG;IACH,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;QAEX,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;KACtC;CACF;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;OAOG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,YAAY,IAAI,YAAY,GAClC,CAAC;CACH"}
package/resources/x/dm.js CHANGED
@@ -10,7 +10,32 @@ const headers_1 = require("../../internal/headers.js");
10
10
  const path_1 = require("../../internal/utils/path.js");
11
11
  class Dm extends resource_1.APIResource {
12
12
  /**
13
- * Get DM conversation history
13
+ * Deletes 1 DM from the account's side; the other person keeps it. Success means
14
+ * the account's conversation no longer shows it. Still shown gets 422
15
+ * `x_dm_not_deleted`, uncharged.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const response = await client.x.dm.deleteMessage(
20
+ * '321669910225',
21
+ * {
22
+ * userId: 'userId',
23
+ * account: 'account',
24
+ * 'Idempotency-Key': 'Idempotency-Key',
25
+ * },
26
+ * );
27
+ * ```
28
+ */
29
+ deleteMessage(messageID, params, options) {
30
+ const { userId, account, 'Idempotency-Key': idempotencyKey } = params;
31
+ return this._client.delete((0, path_1.path) `/x/dm/${userId}/messages/${messageID}`, {
32
+ query: { account },
33
+ ...options,
34
+ headers: (0, headers_1.buildHeaders)([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
35
+ });
36
+ }
37
+ /**
38
+ * Returns message history with one user for the connected X account.
14
39
  *
15
40
  * @example
16
41
  * ```ts
@@ -24,7 +49,9 @@ class Dm extends resource_1.APIResource {
24
49
  return this._client.get((0, path_1.path) `/x/dm/${userID}/history`, { query, ...options });
25
50
  }
26
51
  /**
27
- * Send direct message
52
+ * Sends a direct message through a connected X account. Once X rate limits an
53
+ * account's DMs, its DMs get 429 until X's reset. Xquik sends nothing to X &
54
+ * charges nothing. `Retry-After` & `nextAction.afterMs` give the wait.
28
55
  *
29
56
  * @example
30
57
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"dm.js","sourceRoot":"","sources":["../../src/resources/x/dm.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEtC,sFAAsF;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,EAAG,SAAQ,sBAAW;IACjC;;;;;;;;;;OAUG;IACH,eAAe,CACb,MAAc,EACd,KAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,SAAS,MAAM,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,MAAc,EA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K,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAc,EAAE,MAAoB,EAAE,OAAwB;QACjE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,SAAS,MAAM,EAAE,EAAE;YAC9C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACjF,CAAC,CAAC;IACL,CAAC;CACF;AAzED,gBAyEC"}
@@ -7,7 +7,32 @@ import { buildHeaders } from "../../internal/headers.mjs";
7
7
  import { path } from "../../internal/utils/path.mjs";
8
8
  export class Dm extends APIResource {
9
9
  /**
10
- * Get DM conversation history
10
+ * Deletes 1 DM from the account's side; the other person keeps it. Success means
11
+ * the account's conversation no longer shows it. Still shown gets 422
12
+ * `x_dm_not_deleted`, uncharged.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const response = await client.x.dm.deleteMessage(
17
+ * '321669910225',
18
+ * {
19
+ * userId: 'userId',
20
+ * account: 'account',
21
+ * 'Idempotency-Key': 'Idempotency-Key',
22
+ * },
23
+ * );
24
+ * ```
25
+ */
26
+ deleteMessage(messageID, params, options) {
27
+ const { userId, account, 'Idempotency-Key': idempotencyKey } = params;
28
+ return this._client.delete(path `/x/dm/${userId}/messages/${messageID}`, {
29
+ query: { account },
30
+ ...options,
31
+ headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
32
+ });
33
+ }
34
+ /**
35
+ * Returns message history with one user for the connected X account.
11
36
  *
12
37
  * @example
13
38
  * ```ts
@@ -21,7 +46,9 @@ export class Dm extends APIResource {
21
46
  return this._client.get(path `/x/dm/${userID}/history`, { query, ...options });
22
47
  }
23
48
  /**
24
- * Send direct message
49
+ * Sends a direct message through a connected X account. Once X rate limits an
50
+ * account's DMs, its DMs get 429 until X's reset. Xquik sends nothing to X &
51
+ * charges nothing. `Retry-After` & `nextAction.afterMs` give the wait.
25
52
  *
26
53
  * @example
27
54
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"dm.mjs","sourceRoot":"","sources":["../../src/resources/x/dm.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,EAAG,SAAQ,WAAW;IACjC;;;;;;;;;;OAUG;IACH,eAAe,CACb,MAAc,EACd,KAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,SAAS,MAAM,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,MAAc,EAAE,MAAoB,EAAE,OAAwB;QACjE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,SAAS,MAAM,EAAE,EAAE;YAC9C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACjF,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"dm.mjs","sourceRoot":"","sources":["../../src/resources/x/dm.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;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IACL,CAAC;CACF"}
@@ -6,7 +6,8 @@ import { RequestOptions } from "../../internal/request-options.mjs";
6
6
  */
7
7
  export declare class Followers extends APIResource {
8
8
  /**
9
- * Check if one user follows another
9
+ * Returns whether one public account follows another, & the reverse, with each
10
+ * account's username & user ID as X names them.
10
11
  *
11
12
  * @example
12
13
  * ```ts
@@ -22,17 +23,44 @@ export interface FollowerCheckResponse {
22
23
  isFollowedBy: boolean;
23
24
  isFollowing: boolean;
24
25
  sourceUsername: string;
26
+ /**
27
+ * The target account's username, in lower case.
28
+ */
25
29
  targetUsername: string;
30
+ /**
31
+ * The source account's user ID, as X gives it.
32
+ */
33
+ sourceId?: string;
34
+ /**
35
+ * The target account's user ID, as X gives it.
36
+ */
37
+ targetId?: string;
26
38
  }
27
39
  export interface FollowerCheckParams {
28
40
  /**
29
- * Source username, @username, or X or Twitter profile URL
41
+ * Source user ID, username, @username, or X or Twitter profile URL, such as
42
+ * x.com/i/user/11348282. A number is a user ID.
30
43
  */
31
44
  source: string;
32
45
  /**
33
- * Target username, @username, or X or Twitter profile URL
46
+ * Target user ID, username, @username, or X or Twitter profile URL, such as
47
+ * x.com/i/user/11348282. A number is a user ID.
34
48
  */
35
49
  target: string;
50
+ /**
51
+ * Fields to keep in each row, comma-separated. Use dots for nested fields, such as
52
+ * author.username. A list keeps the field in each item. Case & underscores do not
53
+ * matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
54
+ * always stay. An unknown name answers 400 unknown_field with the valid names,
55
+ * before any read. The price stays the same. SDK row types then hold only the
56
+ * named fields.
57
+ */
58
+ fields?: string;
59
+ /**
60
+ * Fields to drop from each row, comma-separated. It takes the same names as
61
+ * fields. With fields, it drops from the kept fields.
62
+ */
63
+ omit?: string;
36
64
  }
37
65
  export declare namespace Followers {
38
66
  export { type FollowerCheckResponse as FollowerCheckResponse, type FollowerCheckParams as FollowerCheckParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"followers.d.mts","sourceRoot":"","sources":["../../src/resources/x/followers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG/F;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,OAAO,CAAC;IAEtB,WAAW,EAAE,OAAO,CAAC;IAErB,cAAc,EAAE,MAAM,CAAC;IAEvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
1
+ {"version":3,"file":"followers.d.mts","sourceRoot":"","sources":["../../src/resources/x/followers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG/F;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,OAAO,CAAC;IAEtB,WAAW,EAAE,OAAO,CAAC;IAErB,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -6,7 +6,8 @@ import { RequestOptions } from "../../internal/request-options.js";
6
6
  */
7
7
  export declare class Followers extends APIResource {
8
8
  /**
9
- * Check if one user follows another
9
+ * Returns whether one public account follows another, & the reverse, with each
10
+ * account's username & user ID as X names them.
10
11
  *
11
12
  * @example
12
13
  * ```ts
@@ -22,17 +23,44 @@ export interface FollowerCheckResponse {
22
23
  isFollowedBy: boolean;
23
24
  isFollowing: boolean;
24
25
  sourceUsername: string;
26
+ /**
27
+ * The target account's username, in lower case.
28
+ */
25
29
  targetUsername: string;
30
+ /**
31
+ * The source account's user ID, as X gives it.
32
+ */
33
+ sourceId?: string;
34
+ /**
35
+ * The target account's user ID, as X gives it.
36
+ */
37
+ targetId?: string;
26
38
  }
27
39
  export interface FollowerCheckParams {
28
40
  /**
29
- * Source username, @username, or X or Twitter profile URL
41
+ * Source user ID, username, @username, or X or Twitter profile URL, such as
42
+ * x.com/i/user/11348282. A number is a user ID.
30
43
  */
31
44
  source: string;
32
45
  /**
33
- * Target username, @username, or X or Twitter profile URL
46
+ * Target user ID, username, @username, or X or Twitter profile URL, such as
47
+ * x.com/i/user/11348282. A number is a user ID.
34
48
  */
35
49
  target: string;
50
+ /**
51
+ * Fields to keep in each row, comma-separated. Use dots for nested fields, such as
52
+ * author.username. A list keeps the field in each item. Case & underscores do not
53
+ * matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
54
+ * always stay. An unknown name answers 400 unknown_field with the valid names,
55
+ * before any read. The price stays the same. SDK row types then hold only the
56
+ * named fields.
57
+ */
58
+ fields?: string;
59
+ /**
60
+ * Fields to drop from each row, comma-separated. It takes the same names as
61
+ * fields. With fields, it drops from the kept fields.
62
+ */
63
+ omit?: string;
36
64
  }
37
65
  export declare namespace Followers {
38
66
  export { type FollowerCheckResponse as FollowerCheckResponse, type FollowerCheckParams as FollowerCheckParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"followers.d.ts","sourceRoot":"","sources":["../../src/resources/x/followers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG/F;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,OAAO,CAAC;IAEtB,WAAW,EAAE,OAAO,CAAC;IAErB,cAAc,EAAE,MAAM,CAAC;IAEvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
1
+ {"version":3,"file":"followers.d.ts","sourceRoot":"","sources":["../../src/resources/x/followers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG/F;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,OAAO,CAAC;IAEtB,WAAW,EAAE,OAAO,CAAC;IAErB,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -11,7 +11,8 @@ const resource_1 = require("../../core/resource.js");
11
11
  */
12
12
  class Followers extends resource_1.APIResource {
13
13
  /**
14
- * Check if one user follows another
14
+ * Returns whether one public account follows another, & the reverse, with each
15
+ * account's username & user ID as X names them.
15
16
  *
16
17
  * @example
17
18
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"followers.js","sourceRoot":"","sources":["../../src/resources/x/followers.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEtC,sFAAsF;AAEtF,qDAAkD;AAIlD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,KAA0B,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAfD,8BAeC"}
1
+ {"version":3,"file":"followers.js","sourceRoot":"","sources":["../../src/resources/x/followers.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEtC,sFAAsF;AAEtF,qDAAkD;AAIlD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,KAA0B,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAhBD,8BAgBC"}
@@ -8,7 +8,8 @@ import { APIResource } from "../../core/resource.mjs";
8
8
  */
9
9
  export class Followers extends APIResource {
10
10
  /**
11
- * Check if one user follows another
11
+ * Returns whether one public account follows another, & the reverse, with each
12
+ * account's username & user ID as X names them.
12
13
  *
13
14
  * @example
14
15
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"followers.mjs","sourceRoot":"","sources":["../../src/resources/x/followers.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,KAA0B,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}
1
+ {"version":3,"file":"followers.mjs","sourceRoot":"","sources":["../../src/resources/x/followers.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,KAA0B,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}