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
@@ -0,0 +1,3274 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as Shared from "../shared.js";
3
+ import { APIPromise } from "../../core/api-promise.js";
4
+ import { RequestOptions } from "../../internal/request-options.js";
5
+ /**
6
+ * AI analysis of posts, at 2 credits per analyzed post
7
+ */
8
+ export declare class Analysis extends APIResource {
9
+ /**
10
+ * Answers whether each post is about your brand, the author's attitude toward it &
11
+ * the author's relationship with it. Name the brand in analysis.targets. Each
12
+ * analyzed post costs 2 credits.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const response = await client.x.analysis.brand({
17
+ * limit: 20,
18
+ * query: 'Artemis lang:en',
19
+ * queryType: 'Latest',
20
+ * sinceTime: '2026-09-01T00:00:00Z',
21
+ * untilTime: '2026-09-30T23:59:59Z',
22
+ * });
23
+ * ```
24
+ */
25
+ brand(body: AnalysisBrandParams, options?: RequestOptions): APIPromise<AnalysisBrandResponse>;
26
+ /**
27
+ * Answers 1 to 8 questions you write in analysis.questions. A choice picks a
28
+ * category, such as a topic. A score picks a level. A probability answers yes or
29
+ * no. Without questions it answers the sentiment questions. Each analyzed post
30
+ * costs 2 credits.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const response = await client.x.analysis.classify({
35
+ * limit: 20,
36
+ * query: 'Artemis lang:en',
37
+ * queryType: 'Latest',
38
+ * sinceTime: '2026-09-01T00:00:00Z',
39
+ * untilTime: '2026-09-30T23:59:59Z',
40
+ * });
41
+ * ```
42
+ */
43
+ classify(body: AnalysisClassifyParams, options?: RequestOptions): APIPromise<AnalysisClassifyResponse>;
44
+ /**
45
+ * Answers each post's stance on an asset, its content type, its conviction & its
46
+ * relevance. The summary counts bullish & bearish posts per cashtag. Name the
47
+ * asset in analysis.targets. Each analyzed post costs 2 credits.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const response = await client.x.analysis.marketSignals({
52
+ * limit: 20,
53
+ * query: 'Artemis lang:en',
54
+ * queryType: 'Latest',
55
+ * sinceTime: '2026-09-01T00:00:00Z',
56
+ * untilTime: '2026-09-30T23:59:59Z',
57
+ * });
58
+ * ```
59
+ */
60
+ marketSignals(body: AnalysisMarketSignalsParams, options?: RequestOptions): APIPromise<AnalysisMarketSignalsResponse>;
61
+ /**
62
+ * Answers each post's format, such as reporting, commentary or speculation, its
63
+ * source attribution & its relevance to your topic. Name the topic in
64
+ * analysis.targets. Each analyzed post costs 2 credits.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const response = await client.x.analysis.news({
69
+ * limit: 20,
70
+ * query: 'Artemis lang:en',
71
+ * queryType: 'Latest',
72
+ * sinceTime: '2026-09-01T00:00:00Z',
73
+ * untilTime: '2026-09-30T23:59:59Z',
74
+ * });
75
+ * ```
76
+ */
77
+ news(body: AnalysisNewsParams, options?: RequestOptions): APIPromise<AnalysisNewsResponse>;
78
+ /**
79
+ * Answers each post's attitude, its intensity & its sarcasm probability. Send post
80
+ * IDs, an X search, an account, a List, a post's replies or quotes, or your own
81
+ * texts. Each analyzed post costs 2 credits. A post without an analysis costs
82
+ * nothing.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const response = await client.x.analysis.sentiment({
87
+ * limit: 20,
88
+ * query: 'Artemis lang:en',
89
+ * queryType: 'Latest',
90
+ * sinceTime: '2026-09-01T00:00:00Z',
91
+ * untilTime: '2026-09-30T23:59:59Z',
92
+ * });
93
+ * ```
94
+ */
95
+ sentiment(body: AnalysisSentimentParams, options?: RequestOptions): APIPromise<AnalysisSentimentResponse>;
96
+ /**
97
+ * Answers each post's hook, clarity, payoff, humor, spam risk & likely reaction, &
98
+ * adds a Viral Score from 0 to 100 with a verdict. The score rates the wording. It
99
+ * does not predict likes or views. Send drafts in texts to score them before
100
+ * posting. Each analyzed post costs 2 credits.
101
+ *
102
+ * @example
103
+ * ```ts
104
+ * const response = await client.x.analysis.viralScore({
105
+ * limit: 20,
106
+ * query: 'Artemis lang:en',
107
+ * queryType: 'Latest',
108
+ * sinceTime: '2026-09-01T00:00:00Z',
109
+ * untilTime: '2026-09-30T23:59:59Z',
110
+ * });
111
+ * ```
112
+ */
113
+ viralScore(body: AnalysisViralScoreParams, options?: RequestOptions): APIPromise<AnalysisViralScoreResponse>;
114
+ }
115
+ /**
116
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
117
+ * row in results costs 2 credits.
118
+ */
119
+ export interface AnalysisBrandResponse {
120
+ /**
121
+ * Totals of the answers across the analyzed posts.
122
+ */
123
+ analysisSummary: AnalysisBrandResponse.AnalysisSummary;
124
+ /**
125
+ * Whether the search has more posts. Send next_cursor as cursor.
126
+ */
127
+ has_next_page: boolean;
128
+ /**
129
+ * Cursor of the search's next page, else empty.
130
+ */
131
+ next_cursor: string;
132
+ /**
133
+ * Each analyzed post with its answers.
134
+ */
135
+ results: Array<AnalysisBrandResponse.Result>;
136
+ /**
137
+ * Each post without an analysis, by ID & reason. These cost nothing.
138
+ */
139
+ unanalyzed: Array<AnalysisBrandResponse.Unanalyzed>;
140
+ }
141
+ export declare namespace AnalysisBrandResponse {
142
+ /**
143
+ * Totals of the answers across the analyzed posts.
144
+ */
145
+ interface AnalysisSummary {
146
+ /**
147
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
148
+ * the market questions.
149
+ */
150
+ cashtags: Array<AnalysisSummary.Cashtag>;
151
+ /**
152
+ * Likes, reposts, replies & quotes of the analyzed posts.
153
+ */
154
+ engagement: number;
155
+ /**
156
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
157
+ * when the answer holds no post.
158
+ */
159
+ monitor: AnalysisSummary.Monitor | null;
160
+ /**
161
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
162
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
163
+ * has mean, yes & no.
164
+ */
165
+ questions: {
166
+ [key: string]: {
167
+ [key: string]: unknown;
168
+ };
169
+ };
170
+ /**
171
+ * Posts by analysis outcome.
172
+ */
173
+ rows: AnalysisSummary.Rows;
174
+ schemaVersion: number;
175
+ /**
176
+ * Posts per linked hostname, most posts first, up to 20.
177
+ */
178
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
179
+ /**
180
+ * Mentions & answers per target in analysis.targets.
181
+ */
182
+ targets: Array<AnalysisSummary.Target>;
183
+ /**
184
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
185
+ * counts, the scores against actual engagement, a report per author & the
186
+ * leaderboards.
187
+ */
188
+ viral?: {
189
+ [key: string]: unknown;
190
+ };
191
+ }
192
+ namespace AnalysisSummary {
193
+ interface Cashtag {
194
+ cashtag: string;
195
+ /**
196
+ * Category counts of the cashtag's posts by question ID.
197
+ */
198
+ choices: {
199
+ [key: string]: unknown;
200
+ };
201
+ rows: number;
202
+ signal?: Cashtag.Signal;
203
+ }
204
+ namespace Cashtag {
205
+ interface Signal {
206
+ bearish: number;
207
+ bullish: number;
208
+ /**
209
+ * Bullish minus bearish posts, over all posts.
210
+ */
211
+ score: number;
212
+ }
213
+ }
214
+ /**
215
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
216
+ * when the answer holds no post.
217
+ */
218
+ interface Monitor {
219
+ changedRows: Array<Monitor.ChangedRow>;
220
+ /**
221
+ * Posts per monitor status.
222
+ */
223
+ statuses: {
224
+ [key: string]: number;
225
+ };
226
+ }
227
+ namespace Monitor {
228
+ interface ChangedRow {
229
+ changes: Array<ChangedRow.Change>;
230
+ tweetId: string;
231
+ }
232
+ namespace ChangedRow {
233
+ interface Change {
234
+ current: string;
235
+ previous: string;
236
+ questionId: string;
237
+ }
238
+ }
239
+ }
240
+ /**
241
+ * Posts by analysis outcome.
242
+ */
243
+ interface Rows {
244
+ analyzed: number;
245
+ failed: number;
246
+ skipped: number;
247
+ }
248
+ interface SourceDomain {
249
+ domain: string;
250
+ posts: number;
251
+ }
252
+ interface Target {
253
+ /**
254
+ * Category counts by question ID.
255
+ */
256
+ choices: {
257
+ [key: string]: unknown;
258
+ };
259
+ engagement: number;
260
+ mentions: number;
261
+ name: string;
262
+ share: number;
263
+ /**
264
+ * The most engaged posts per question ID & category.
265
+ */
266
+ top: {
267
+ [key: string]: unknown;
268
+ };
269
+ }
270
+ }
271
+ /**
272
+ * 1 analyzed post with its answers.
273
+ */
274
+ interface Result {
275
+ /**
276
+ * The answers in full, with their probabilities.
277
+ */
278
+ analysis: Result.Analysis;
279
+ /**
280
+ * Each question's decision by question ID. A choice gives its category, a score
281
+ * its level from 0, which can have decimals, & a probability its value from 0 to
282
+ * 1.
283
+ */
284
+ answers: {
285
+ [key: string]: string | number;
286
+ };
287
+ /**
288
+ * Cashtags in the post's text, in upper case.
289
+ */
290
+ cashtags: Array<string>;
291
+ /**
292
+ * How the post's answers compare with its row in baseline, as the AI Actors
293
+ * compare a run with an earlier dataset.
294
+ */
295
+ monitor: Result.Monitor;
296
+ /**
297
+ * Hostnames the post links to, without t.co.
298
+ */
299
+ sourceDomains: Array<string>;
300
+ /**
301
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
302
+ * text:2 & so on.
303
+ */
304
+ tweet: Shared.SearchTweet;
305
+ /**
306
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
307
+ * that applied & the engagement comparison.
308
+ */
309
+ viral?: {
310
+ [key: string]: unknown;
311
+ };
312
+ /**
313
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
314
+ * 1,000 followers. Null without a follower count.
315
+ */
316
+ viralActualEngagementRate?: number | null;
317
+ /**
318
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
319
+ * ranking weights, per 1,000 views or followers.
320
+ */
321
+ viralAlgorithmScore?: number | null;
322
+ /**
323
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
324
+ * trait has no answer.
325
+ */
326
+ viralScore?: number | null;
327
+ /**
328
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
329
+ * sleep_on_it.
330
+ */
331
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
332
+ }
333
+ namespace Result {
334
+ /**
335
+ * The answers in full, with their probabilities.
336
+ */
337
+ interface Analysis {
338
+ /**
339
+ * 1 answer per question, in question order.
340
+ */
341
+ answers: Array<Analysis.Answer>;
342
+ /**
343
+ * What the AI read beside the post's text.
344
+ */
345
+ contextAvailability: Analysis.ContextAvailability;
346
+ /**
347
+ * Bytes of post & settings the AI read.
348
+ */
349
+ contextBytes: number;
350
+ /**
351
+ * The ID & version of each question asked.
352
+ */
353
+ questions: Array<Analysis.Question>;
354
+ status: 'succeeded';
355
+ }
356
+ namespace Analysis {
357
+ /**
358
+ * 1 question's answer. A probability has probability. A choice or score has value,
359
+ * confidence & the probability of each category or level.
360
+ */
361
+ interface Answer {
362
+ questionId: string;
363
+ questionVersion: string;
364
+ type: 'choice' | 'score' | 'probability';
365
+ confidence?: number;
366
+ /**
367
+ * For a score. The levels the question named, from 0.
368
+ */
369
+ levels?: Array<string>;
370
+ /**
371
+ * Probability of each category, or of each level by index.
372
+ */
373
+ probabilities?: {
374
+ [key: string]: number;
375
+ };
376
+ /**
377
+ * For a probability. The chance the answer is yes.
378
+ */
379
+ probability?: number;
380
+ /**
381
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
382
+ * between levels 1 & 2.
383
+ */
384
+ value?: string | number;
385
+ }
386
+ /**
387
+ * What the AI read beside the post's text.
388
+ */
389
+ interface ContextAvailability {
390
+ article: 'text_blocks' | 'summary' | 'not_supplied';
391
+ author: 'available' | 'missing';
392
+ media: 'text_descriptions_only' | 'not_supplied';
393
+ /**
394
+ * truncated when the post was cut to fit.
395
+ */
396
+ postText: 'full' | 'truncated';
397
+ quote: 'available' | 'missing' | 'not_applicable';
398
+ reply: 'available' | 'missing' | 'not_applicable';
399
+ }
400
+ interface Question {
401
+ id: string;
402
+ version: string;
403
+ }
404
+ }
405
+ /**
406
+ * How the post's answers compare with its row in baseline, as the AI Actors
407
+ * compare a run with an earlier dataset.
408
+ */
409
+ interface Monitor {
410
+ /**
411
+ * Always null. The baseline is the rows you sent.
412
+ */
413
+ baselineDatasetId: null;
414
+ /**
415
+ * IDs of the questions whose decision changed.
416
+ */
417
+ changedQuestionIds: Array<string>;
418
+ /**
419
+ * Each changed decision, earlier & now.
420
+ */
421
+ changes: Array<Monitor.Change>;
422
+ /**
423
+ * Hash of the questions, targets & context. Rows with another hash are
424
+ * not_comparable.
425
+ */
426
+ configurationFingerprint: string;
427
+ /**
428
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
429
+ * when an answer clearly left its earlier decision. not_comparable when other
430
+ * settings made the earlier row or it answers none of these questions.
431
+ */
432
+ status: 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
433
+ }
434
+ namespace Monitor {
435
+ interface Change {
436
+ current: string;
437
+ previous: string;
438
+ questionId: string;
439
+ }
440
+ }
441
+ }
442
+ /**
443
+ * A post without an analysis. It costs nothing.
444
+ */
445
+ interface Unanalyzed {
446
+ /**
447
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
448
+ */
449
+ id: string;
450
+ /**
451
+ * post_unavailable when X returns no such post. missing_text for a post without
452
+ * text. insufficient_credits when credits ran out. context_limit when the settings
453
+ * leave the post no room. The other reasons mean the analysis failed. Send the
454
+ * post again.
455
+ */
456
+ reason: string;
457
+ status: 'failed' | 'skipped';
458
+ }
459
+ }
460
+ /**
461
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
462
+ * row in results costs 2 credits.
463
+ */
464
+ export interface AnalysisClassifyResponse {
465
+ /**
466
+ * Totals of the answers across the analyzed posts.
467
+ */
468
+ analysisSummary: AnalysisClassifyResponse.AnalysisSummary;
469
+ /**
470
+ * Whether the search has more posts. Send next_cursor as cursor.
471
+ */
472
+ has_next_page: boolean;
473
+ /**
474
+ * Cursor of the search's next page, else empty.
475
+ */
476
+ next_cursor: string;
477
+ /**
478
+ * Each analyzed post with its answers.
479
+ */
480
+ results: Array<AnalysisClassifyResponse.Result>;
481
+ /**
482
+ * Each post without an analysis, by ID & reason. These cost nothing.
483
+ */
484
+ unanalyzed: Array<AnalysisClassifyResponse.Unanalyzed>;
485
+ }
486
+ export declare namespace AnalysisClassifyResponse {
487
+ /**
488
+ * Totals of the answers across the analyzed posts.
489
+ */
490
+ interface AnalysisSummary {
491
+ /**
492
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
493
+ * the market questions.
494
+ */
495
+ cashtags: Array<AnalysisSummary.Cashtag>;
496
+ /**
497
+ * Likes, reposts, replies & quotes of the analyzed posts.
498
+ */
499
+ engagement: number;
500
+ /**
501
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
502
+ * when the answer holds no post.
503
+ */
504
+ monitor: AnalysisSummary.Monitor | null;
505
+ /**
506
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
507
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
508
+ * has mean, yes & no.
509
+ */
510
+ questions: {
511
+ [key: string]: {
512
+ [key: string]: unknown;
513
+ };
514
+ };
515
+ /**
516
+ * Posts by analysis outcome.
517
+ */
518
+ rows: AnalysisSummary.Rows;
519
+ schemaVersion: number;
520
+ /**
521
+ * Posts per linked hostname, most posts first, up to 20.
522
+ */
523
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
524
+ /**
525
+ * Mentions & answers per target in analysis.targets.
526
+ */
527
+ targets: Array<AnalysisSummary.Target>;
528
+ /**
529
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
530
+ * counts, the scores against actual engagement, a report per author & the
531
+ * leaderboards.
532
+ */
533
+ viral?: {
534
+ [key: string]: unknown;
535
+ };
536
+ }
537
+ namespace AnalysisSummary {
538
+ interface Cashtag {
539
+ cashtag: string;
540
+ /**
541
+ * Category counts of the cashtag's posts by question ID.
542
+ */
543
+ choices: {
544
+ [key: string]: unknown;
545
+ };
546
+ rows: number;
547
+ signal?: Cashtag.Signal;
548
+ }
549
+ namespace Cashtag {
550
+ interface Signal {
551
+ bearish: number;
552
+ bullish: number;
553
+ /**
554
+ * Bullish minus bearish posts, over all posts.
555
+ */
556
+ score: number;
557
+ }
558
+ }
559
+ /**
560
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
561
+ * when the answer holds no post.
562
+ */
563
+ interface Monitor {
564
+ changedRows: Array<Monitor.ChangedRow>;
565
+ /**
566
+ * Posts per monitor status.
567
+ */
568
+ statuses: {
569
+ [key: string]: number;
570
+ };
571
+ }
572
+ namespace Monitor {
573
+ interface ChangedRow {
574
+ changes: Array<ChangedRow.Change>;
575
+ tweetId: string;
576
+ }
577
+ namespace ChangedRow {
578
+ interface Change {
579
+ current: string;
580
+ previous: string;
581
+ questionId: string;
582
+ }
583
+ }
584
+ }
585
+ /**
586
+ * Posts by analysis outcome.
587
+ */
588
+ interface Rows {
589
+ analyzed: number;
590
+ failed: number;
591
+ skipped: number;
592
+ }
593
+ interface SourceDomain {
594
+ domain: string;
595
+ posts: number;
596
+ }
597
+ interface Target {
598
+ /**
599
+ * Category counts by question ID.
600
+ */
601
+ choices: {
602
+ [key: string]: unknown;
603
+ };
604
+ engagement: number;
605
+ mentions: number;
606
+ name: string;
607
+ share: number;
608
+ /**
609
+ * The most engaged posts per question ID & category.
610
+ */
611
+ top: {
612
+ [key: string]: unknown;
613
+ };
614
+ }
615
+ }
616
+ /**
617
+ * 1 analyzed post with its answers.
618
+ */
619
+ interface Result {
620
+ /**
621
+ * The answers in full, with their probabilities.
622
+ */
623
+ analysis: Result.Analysis;
624
+ /**
625
+ * Each question's decision by question ID. A choice gives its category, a score
626
+ * its level from 0, which can have decimals, & a probability its value from 0 to
627
+ * 1.
628
+ */
629
+ answers: {
630
+ [key: string]: string | number;
631
+ };
632
+ /**
633
+ * Cashtags in the post's text, in upper case.
634
+ */
635
+ cashtags: Array<string>;
636
+ /**
637
+ * How the post's answers compare with its row in baseline, as the AI Actors
638
+ * compare a run with an earlier dataset.
639
+ */
640
+ monitor: Result.Monitor;
641
+ /**
642
+ * Hostnames the post links to, without t.co.
643
+ */
644
+ sourceDomains: Array<string>;
645
+ /**
646
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
647
+ * text:2 & so on.
648
+ */
649
+ tweet: Shared.SearchTweet;
650
+ /**
651
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
652
+ * that applied & the engagement comparison.
653
+ */
654
+ viral?: {
655
+ [key: string]: unknown;
656
+ };
657
+ /**
658
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
659
+ * 1,000 followers. Null without a follower count.
660
+ */
661
+ viralActualEngagementRate?: number | null;
662
+ /**
663
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
664
+ * ranking weights, per 1,000 views or followers.
665
+ */
666
+ viralAlgorithmScore?: number | null;
667
+ /**
668
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
669
+ * trait has no answer.
670
+ */
671
+ viralScore?: number | null;
672
+ /**
673
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
674
+ * sleep_on_it.
675
+ */
676
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
677
+ }
678
+ namespace Result {
679
+ /**
680
+ * The answers in full, with their probabilities.
681
+ */
682
+ interface Analysis {
683
+ /**
684
+ * 1 answer per question, in question order.
685
+ */
686
+ answers: Array<Analysis.Answer>;
687
+ /**
688
+ * What the AI read beside the post's text.
689
+ */
690
+ contextAvailability: Analysis.ContextAvailability;
691
+ /**
692
+ * Bytes of post & settings the AI read.
693
+ */
694
+ contextBytes: number;
695
+ /**
696
+ * The ID & version of each question asked.
697
+ */
698
+ questions: Array<Analysis.Question>;
699
+ status: 'succeeded';
700
+ }
701
+ namespace Analysis {
702
+ /**
703
+ * 1 question's answer. A probability has probability. A choice or score has value,
704
+ * confidence & the probability of each category or level.
705
+ */
706
+ interface Answer {
707
+ questionId: string;
708
+ questionVersion: string;
709
+ type: 'choice' | 'score' | 'probability';
710
+ confidence?: number;
711
+ /**
712
+ * For a score. The levels the question named, from 0.
713
+ */
714
+ levels?: Array<string>;
715
+ /**
716
+ * Probability of each category, or of each level by index.
717
+ */
718
+ probabilities?: {
719
+ [key: string]: number;
720
+ };
721
+ /**
722
+ * For a probability. The chance the answer is yes.
723
+ */
724
+ probability?: number;
725
+ /**
726
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
727
+ * between levels 1 & 2.
728
+ */
729
+ value?: string | number;
730
+ }
731
+ /**
732
+ * What the AI read beside the post's text.
733
+ */
734
+ interface ContextAvailability {
735
+ article: 'text_blocks' | 'summary' | 'not_supplied';
736
+ author: 'available' | 'missing';
737
+ media: 'text_descriptions_only' | 'not_supplied';
738
+ /**
739
+ * truncated when the post was cut to fit.
740
+ */
741
+ postText: 'full' | 'truncated';
742
+ quote: 'available' | 'missing' | 'not_applicable';
743
+ reply: 'available' | 'missing' | 'not_applicable';
744
+ }
745
+ interface Question {
746
+ id: string;
747
+ version: string;
748
+ }
749
+ }
750
+ /**
751
+ * How the post's answers compare with its row in baseline, as the AI Actors
752
+ * compare a run with an earlier dataset.
753
+ */
754
+ interface Monitor {
755
+ /**
756
+ * Always null. The baseline is the rows you sent.
757
+ */
758
+ baselineDatasetId: null;
759
+ /**
760
+ * IDs of the questions whose decision changed.
761
+ */
762
+ changedQuestionIds: Array<string>;
763
+ /**
764
+ * Each changed decision, earlier & now.
765
+ */
766
+ changes: Array<Monitor.Change>;
767
+ /**
768
+ * Hash of the questions, targets & context. Rows with another hash are
769
+ * not_comparable.
770
+ */
771
+ configurationFingerprint: string;
772
+ /**
773
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
774
+ * when an answer clearly left its earlier decision. not_comparable when other
775
+ * settings made the earlier row or it answers none of these questions.
776
+ */
777
+ status: 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
778
+ }
779
+ namespace Monitor {
780
+ interface Change {
781
+ current: string;
782
+ previous: string;
783
+ questionId: string;
784
+ }
785
+ }
786
+ }
787
+ /**
788
+ * A post without an analysis. It costs nothing.
789
+ */
790
+ interface Unanalyzed {
791
+ /**
792
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
793
+ */
794
+ id: string;
795
+ /**
796
+ * post_unavailable when X returns no such post. missing_text for a post without
797
+ * text. insufficient_credits when credits ran out. context_limit when the settings
798
+ * leave the post no room. The other reasons mean the analysis failed. Send the
799
+ * post again.
800
+ */
801
+ reason: string;
802
+ status: 'failed' | 'skipped';
803
+ }
804
+ }
805
+ /**
806
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
807
+ * row in results costs 2 credits.
808
+ */
809
+ export interface AnalysisMarketSignalsResponse {
810
+ /**
811
+ * Totals of the answers across the analyzed posts.
812
+ */
813
+ analysisSummary: AnalysisMarketSignalsResponse.AnalysisSummary;
814
+ /**
815
+ * Whether the search has more posts. Send next_cursor as cursor.
816
+ */
817
+ has_next_page: boolean;
818
+ /**
819
+ * Cursor of the search's next page, else empty.
820
+ */
821
+ next_cursor: string;
822
+ /**
823
+ * Each analyzed post with its answers.
824
+ */
825
+ results: Array<AnalysisMarketSignalsResponse.Result>;
826
+ /**
827
+ * Each post without an analysis, by ID & reason. These cost nothing.
828
+ */
829
+ unanalyzed: Array<AnalysisMarketSignalsResponse.Unanalyzed>;
830
+ }
831
+ export declare namespace AnalysisMarketSignalsResponse {
832
+ /**
833
+ * Totals of the answers across the analyzed posts.
834
+ */
835
+ interface AnalysisSummary {
836
+ /**
837
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
838
+ * the market questions.
839
+ */
840
+ cashtags: Array<AnalysisSummary.Cashtag>;
841
+ /**
842
+ * Likes, reposts, replies & quotes of the analyzed posts.
843
+ */
844
+ engagement: number;
845
+ /**
846
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
847
+ * when the answer holds no post.
848
+ */
849
+ monitor: AnalysisSummary.Monitor | null;
850
+ /**
851
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
852
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
853
+ * has mean, yes & no.
854
+ */
855
+ questions: {
856
+ [key: string]: {
857
+ [key: string]: unknown;
858
+ };
859
+ };
860
+ /**
861
+ * Posts by analysis outcome.
862
+ */
863
+ rows: AnalysisSummary.Rows;
864
+ schemaVersion: number;
865
+ /**
866
+ * Posts per linked hostname, most posts first, up to 20.
867
+ */
868
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
869
+ /**
870
+ * Mentions & answers per target in analysis.targets.
871
+ */
872
+ targets: Array<AnalysisSummary.Target>;
873
+ /**
874
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
875
+ * counts, the scores against actual engagement, a report per author & the
876
+ * leaderboards.
877
+ */
878
+ viral?: {
879
+ [key: string]: unknown;
880
+ };
881
+ }
882
+ namespace AnalysisSummary {
883
+ interface Cashtag {
884
+ cashtag: string;
885
+ /**
886
+ * Category counts of the cashtag's posts by question ID.
887
+ */
888
+ choices: {
889
+ [key: string]: unknown;
890
+ };
891
+ rows: number;
892
+ signal?: Cashtag.Signal;
893
+ }
894
+ namespace Cashtag {
895
+ interface Signal {
896
+ bearish: number;
897
+ bullish: number;
898
+ /**
899
+ * Bullish minus bearish posts, over all posts.
900
+ */
901
+ score: number;
902
+ }
903
+ }
904
+ /**
905
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
906
+ * when the answer holds no post.
907
+ */
908
+ interface Monitor {
909
+ changedRows: Array<Monitor.ChangedRow>;
910
+ /**
911
+ * Posts per monitor status.
912
+ */
913
+ statuses: {
914
+ [key: string]: number;
915
+ };
916
+ }
917
+ namespace Monitor {
918
+ interface ChangedRow {
919
+ changes: Array<ChangedRow.Change>;
920
+ tweetId: string;
921
+ }
922
+ namespace ChangedRow {
923
+ interface Change {
924
+ current: string;
925
+ previous: string;
926
+ questionId: string;
927
+ }
928
+ }
929
+ }
930
+ /**
931
+ * Posts by analysis outcome.
932
+ */
933
+ interface Rows {
934
+ analyzed: number;
935
+ failed: number;
936
+ skipped: number;
937
+ }
938
+ interface SourceDomain {
939
+ domain: string;
940
+ posts: number;
941
+ }
942
+ interface Target {
943
+ /**
944
+ * Category counts by question ID.
945
+ */
946
+ choices: {
947
+ [key: string]: unknown;
948
+ };
949
+ engagement: number;
950
+ mentions: number;
951
+ name: string;
952
+ share: number;
953
+ /**
954
+ * The most engaged posts per question ID & category.
955
+ */
956
+ top: {
957
+ [key: string]: unknown;
958
+ };
959
+ }
960
+ }
961
+ /**
962
+ * 1 analyzed post with its answers.
963
+ */
964
+ interface Result {
965
+ /**
966
+ * The answers in full, with their probabilities.
967
+ */
968
+ analysis: Result.Analysis;
969
+ /**
970
+ * Each question's decision by question ID. A choice gives its category, a score
971
+ * its level from 0, which can have decimals, & a probability its value from 0 to
972
+ * 1.
973
+ */
974
+ answers: {
975
+ [key: string]: string | number;
976
+ };
977
+ /**
978
+ * Cashtags in the post's text, in upper case.
979
+ */
980
+ cashtags: Array<string>;
981
+ /**
982
+ * How the post's answers compare with its row in baseline, as the AI Actors
983
+ * compare a run with an earlier dataset.
984
+ */
985
+ monitor: Result.Monitor;
986
+ /**
987
+ * Hostnames the post links to, without t.co.
988
+ */
989
+ sourceDomains: Array<string>;
990
+ /**
991
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
992
+ * text:2 & so on.
993
+ */
994
+ tweet: Shared.SearchTweet;
995
+ /**
996
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
997
+ * that applied & the engagement comparison.
998
+ */
999
+ viral?: {
1000
+ [key: string]: unknown;
1001
+ };
1002
+ /**
1003
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
1004
+ * 1,000 followers. Null without a follower count.
1005
+ */
1006
+ viralActualEngagementRate?: number | null;
1007
+ /**
1008
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
1009
+ * ranking weights, per 1,000 views or followers.
1010
+ */
1011
+ viralAlgorithmScore?: number | null;
1012
+ /**
1013
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
1014
+ * trait has no answer.
1015
+ */
1016
+ viralScore?: number | null;
1017
+ /**
1018
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
1019
+ * sleep_on_it.
1020
+ */
1021
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
1022
+ }
1023
+ namespace Result {
1024
+ /**
1025
+ * The answers in full, with their probabilities.
1026
+ */
1027
+ interface Analysis {
1028
+ /**
1029
+ * 1 answer per question, in question order.
1030
+ */
1031
+ answers: Array<Analysis.Answer>;
1032
+ /**
1033
+ * What the AI read beside the post's text.
1034
+ */
1035
+ contextAvailability: Analysis.ContextAvailability;
1036
+ /**
1037
+ * Bytes of post & settings the AI read.
1038
+ */
1039
+ contextBytes: number;
1040
+ /**
1041
+ * The ID & version of each question asked.
1042
+ */
1043
+ questions: Array<Analysis.Question>;
1044
+ status: 'succeeded';
1045
+ }
1046
+ namespace Analysis {
1047
+ /**
1048
+ * 1 question's answer. A probability has probability. A choice or score has value,
1049
+ * confidence & the probability of each category or level.
1050
+ */
1051
+ interface Answer {
1052
+ questionId: string;
1053
+ questionVersion: string;
1054
+ type: 'choice' | 'score' | 'probability';
1055
+ confidence?: number;
1056
+ /**
1057
+ * For a score. The levels the question named, from 0.
1058
+ */
1059
+ levels?: Array<string>;
1060
+ /**
1061
+ * Probability of each category, or of each level by index.
1062
+ */
1063
+ probabilities?: {
1064
+ [key: string]: number;
1065
+ };
1066
+ /**
1067
+ * For a probability. The chance the answer is yes.
1068
+ */
1069
+ probability?: number;
1070
+ /**
1071
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
1072
+ * between levels 1 & 2.
1073
+ */
1074
+ value?: string | number;
1075
+ }
1076
+ /**
1077
+ * What the AI read beside the post's text.
1078
+ */
1079
+ interface ContextAvailability {
1080
+ article: 'text_blocks' | 'summary' | 'not_supplied';
1081
+ author: 'available' | 'missing';
1082
+ media: 'text_descriptions_only' | 'not_supplied';
1083
+ /**
1084
+ * truncated when the post was cut to fit.
1085
+ */
1086
+ postText: 'full' | 'truncated';
1087
+ quote: 'available' | 'missing' | 'not_applicable';
1088
+ reply: 'available' | 'missing' | 'not_applicable';
1089
+ }
1090
+ interface Question {
1091
+ id: string;
1092
+ version: string;
1093
+ }
1094
+ }
1095
+ /**
1096
+ * How the post's answers compare with its row in baseline, as the AI Actors
1097
+ * compare a run with an earlier dataset.
1098
+ */
1099
+ interface Monitor {
1100
+ /**
1101
+ * Always null. The baseline is the rows you sent.
1102
+ */
1103
+ baselineDatasetId: null;
1104
+ /**
1105
+ * IDs of the questions whose decision changed.
1106
+ */
1107
+ changedQuestionIds: Array<string>;
1108
+ /**
1109
+ * Each changed decision, earlier & now.
1110
+ */
1111
+ changes: Array<Monitor.Change>;
1112
+ /**
1113
+ * Hash of the questions, targets & context. Rows with another hash are
1114
+ * not_comparable.
1115
+ */
1116
+ configurationFingerprint: string;
1117
+ /**
1118
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
1119
+ * when an answer clearly left its earlier decision. not_comparable when other
1120
+ * settings made the earlier row or it answers none of these questions.
1121
+ */
1122
+ status: 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
1123
+ }
1124
+ namespace Monitor {
1125
+ interface Change {
1126
+ current: string;
1127
+ previous: string;
1128
+ questionId: string;
1129
+ }
1130
+ }
1131
+ }
1132
+ /**
1133
+ * A post without an analysis. It costs nothing.
1134
+ */
1135
+ interface Unanalyzed {
1136
+ /**
1137
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
1138
+ */
1139
+ id: string;
1140
+ /**
1141
+ * post_unavailable when X returns no such post. missing_text for a post without
1142
+ * text. insufficient_credits when credits ran out. context_limit when the settings
1143
+ * leave the post no room. The other reasons mean the analysis failed. Send the
1144
+ * post again.
1145
+ */
1146
+ reason: string;
1147
+ status: 'failed' | 'skipped';
1148
+ }
1149
+ }
1150
+ /**
1151
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
1152
+ * row in results costs 2 credits.
1153
+ */
1154
+ export interface AnalysisNewsResponse {
1155
+ /**
1156
+ * Totals of the answers across the analyzed posts.
1157
+ */
1158
+ analysisSummary: AnalysisNewsResponse.AnalysisSummary;
1159
+ /**
1160
+ * Whether the search has more posts. Send next_cursor as cursor.
1161
+ */
1162
+ has_next_page: boolean;
1163
+ /**
1164
+ * Cursor of the search's next page, else empty.
1165
+ */
1166
+ next_cursor: string;
1167
+ /**
1168
+ * Each analyzed post with its answers.
1169
+ */
1170
+ results: Array<AnalysisNewsResponse.Result>;
1171
+ /**
1172
+ * Each post without an analysis, by ID & reason. These cost nothing.
1173
+ */
1174
+ unanalyzed: Array<AnalysisNewsResponse.Unanalyzed>;
1175
+ }
1176
+ export declare namespace AnalysisNewsResponse {
1177
+ /**
1178
+ * Totals of the answers across the analyzed posts.
1179
+ */
1180
+ interface AnalysisSummary {
1181
+ /**
1182
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
1183
+ * the market questions.
1184
+ */
1185
+ cashtags: Array<AnalysisSummary.Cashtag>;
1186
+ /**
1187
+ * Likes, reposts, replies & quotes of the analyzed posts.
1188
+ */
1189
+ engagement: number;
1190
+ /**
1191
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1192
+ * when the answer holds no post.
1193
+ */
1194
+ monitor: AnalysisSummary.Monitor | null;
1195
+ /**
1196
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
1197
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
1198
+ * has mean, yes & no.
1199
+ */
1200
+ questions: {
1201
+ [key: string]: {
1202
+ [key: string]: unknown;
1203
+ };
1204
+ };
1205
+ /**
1206
+ * Posts by analysis outcome.
1207
+ */
1208
+ rows: AnalysisSummary.Rows;
1209
+ schemaVersion: number;
1210
+ /**
1211
+ * Posts per linked hostname, most posts first, up to 20.
1212
+ */
1213
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
1214
+ /**
1215
+ * Mentions & answers per target in analysis.targets.
1216
+ */
1217
+ targets: Array<AnalysisSummary.Target>;
1218
+ /**
1219
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
1220
+ * counts, the scores against actual engagement, a report per author & the
1221
+ * leaderboards.
1222
+ */
1223
+ viral?: {
1224
+ [key: string]: unknown;
1225
+ };
1226
+ }
1227
+ namespace AnalysisSummary {
1228
+ interface Cashtag {
1229
+ cashtag: string;
1230
+ /**
1231
+ * Category counts of the cashtag's posts by question ID.
1232
+ */
1233
+ choices: {
1234
+ [key: string]: unknown;
1235
+ };
1236
+ rows: number;
1237
+ signal?: Cashtag.Signal;
1238
+ }
1239
+ namespace Cashtag {
1240
+ interface Signal {
1241
+ bearish: number;
1242
+ bullish: number;
1243
+ /**
1244
+ * Bullish minus bearish posts, over all posts.
1245
+ */
1246
+ score: number;
1247
+ }
1248
+ }
1249
+ /**
1250
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1251
+ * when the answer holds no post.
1252
+ */
1253
+ interface Monitor {
1254
+ changedRows: Array<Monitor.ChangedRow>;
1255
+ /**
1256
+ * Posts per monitor status.
1257
+ */
1258
+ statuses: {
1259
+ [key: string]: number;
1260
+ };
1261
+ }
1262
+ namespace Monitor {
1263
+ interface ChangedRow {
1264
+ changes: Array<ChangedRow.Change>;
1265
+ tweetId: string;
1266
+ }
1267
+ namespace ChangedRow {
1268
+ interface Change {
1269
+ current: string;
1270
+ previous: string;
1271
+ questionId: string;
1272
+ }
1273
+ }
1274
+ }
1275
+ /**
1276
+ * Posts by analysis outcome.
1277
+ */
1278
+ interface Rows {
1279
+ analyzed: number;
1280
+ failed: number;
1281
+ skipped: number;
1282
+ }
1283
+ interface SourceDomain {
1284
+ domain: string;
1285
+ posts: number;
1286
+ }
1287
+ interface Target {
1288
+ /**
1289
+ * Category counts by question ID.
1290
+ */
1291
+ choices: {
1292
+ [key: string]: unknown;
1293
+ };
1294
+ engagement: number;
1295
+ mentions: number;
1296
+ name: string;
1297
+ share: number;
1298
+ /**
1299
+ * The most engaged posts per question ID & category.
1300
+ */
1301
+ top: {
1302
+ [key: string]: unknown;
1303
+ };
1304
+ }
1305
+ }
1306
+ /**
1307
+ * 1 analyzed post with its answers.
1308
+ */
1309
+ interface Result {
1310
+ /**
1311
+ * The answers in full, with their probabilities.
1312
+ */
1313
+ analysis: Result.Analysis;
1314
+ /**
1315
+ * Each question's decision by question ID. A choice gives its category, a score
1316
+ * its level from 0, which can have decimals, & a probability its value from 0 to
1317
+ * 1.
1318
+ */
1319
+ answers: {
1320
+ [key: string]: string | number;
1321
+ };
1322
+ /**
1323
+ * Cashtags in the post's text, in upper case.
1324
+ */
1325
+ cashtags: Array<string>;
1326
+ /**
1327
+ * How the post's answers compare with its row in baseline, as the AI Actors
1328
+ * compare a run with an earlier dataset.
1329
+ */
1330
+ monitor: Result.Monitor;
1331
+ /**
1332
+ * Hostnames the post links to, without t.co.
1333
+ */
1334
+ sourceDomains: Array<string>;
1335
+ /**
1336
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
1337
+ * text:2 & so on.
1338
+ */
1339
+ tweet: Shared.SearchTweet;
1340
+ /**
1341
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
1342
+ * that applied & the engagement comparison.
1343
+ */
1344
+ viral?: {
1345
+ [key: string]: unknown;
1346
+ };
1347
+ /**
1348
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
1349
+ * 1,000 followers. Null without a follower count.
1350
+ */
1351
+ viralActualEngagementRate?: number | null;
1352
+ /**
1353
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
1354
+ * ranking weights, per 1,000 views or followers.
1355
+ */
1356
+ viralAlgorithmScore?: number | null;
1357
+ /**
1358
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
1359
+ * trait has no answer.
1360
+ */
1361
+ viralScore?: number | null;
1362
+ /**
1363
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
1364
+ * sleep_on_it.
1365
+ */
1366
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
1367
+ }
1368
+ namespace Result {
1369
+ /**
1370
+ * The answers in full, with their probabilities.
1371
+ */
1372
+ interface Analysis {
1373
+ /**
1374
+ * 1 answer per question, in question order.
1375
+ */
1376
+ answers: Array<Analysis.Answer>;
1377
+ /**
1378
+ * What the AI read beside the post's text.
1379
+ */
1380
+ contextAvailability: Analysis.ContextAvailability;
1381
+ /**
1382
+ * Bytes of post & settings the AI read.
1383
+ */
1384
+ contextBytes: number;
1385
+ /**
1386
+ * The ID & version of each question asked.
1387
+ */
1388
+ questions: Array<Analysis.Question>;
1389
+ status: 'succeeded';
1390
+ }
1391
+ namespace Analysis {
1392
+ /**
1393
+ * 1 question's answer. A probability has probability. A choice or score has value,
1394
+ * confidence & the probability of each category or level.
1395
+ */
1396
+ interface Answer {
1397
+ questionId: string;
1398
+ questionVersion: string;
1399
+ type: 'choice' | 'score' | 'probability';
1400
+ confidence?: number;
1401
+ /**
1402
+ * For a score. The levels the question named, from 0.
1403
+ */
1404
+ levels?: Array<string>;
1405
+ /**
1406
+ * Probability of each category, or of each level by index.
1407
+ */
1408
+ probabilities?: {
1409
+ [key: string]: number;
1410
+ };
1411
+ /**
1412
+ * For a probability. The chance the answer is yes.
1413
+ */
1414
+ probability?: number;
1415
+ /**
1416
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
1417
+ * between levels 1 & 2.
1418
+ */
1419
+ value?: string | number;
1420
+ }
1421
+ /**
1422
+ * What the AI read beside the post's text.
1423
+ */
1424
+ interface ContextAvailability {
1425
+ article: 'text_blocks' | 'summary' | 'not_supplied';
1426
+ author: 'available' | 'missing';
1427
+ media: 'text_descriptions_only' | 'not_supplied';
1428
+ /**
1429
+ * truncated when the post was cut to fit.
1430
+ */
1431
+ postText: 'full' | 'truncated';
1432
+ quote: 'available' | 'missing' | 'not_applicable';
1433
+ reply: 'available' | 'missing' | 'not_applicable';
1434
+ }
1435
+ interface Question {
1436
+ id: string;
1437
+ version: string;
1438
+ }
1439
+ }
1440
+ /**
1441
+ * How the post's answers compare with its row in baseline, as the AI Actors
1442
+ * compare a run with an earlier dataset.
1443
+ */
1444
+ interface Monitor {
1445
+ /**
1446
+ * Always null. The baseline is the rows you sent.
1447
+ */
1448
+ baselineDatasetId: null;
1449
+ /**
1450
+ * IDs of the questions whose decision changed.
1451
+ */
1452
+ changedQuestionIds: Array<string>;
1453
+ /**
1454
+ * Each changed decision, earlier & now.
1455
+ */
1456
+ changes: Array<Monitor.Change>;
1457
+ /**
1458
+ * Hash of the questions, targets & context. Rows with another hash are
1459
+ * not_comparable.
1460
+ */
1461
+ configurationFingerprint: string;
1462
+ /**
1463
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
1464
+ * when an answer clearly left its earlier decision. not_comparable when other
1465
+ * settings made the earlier row or it answers none of these questions.
1466
+ */
1467
+ status: 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
1468
+ }
1469
+ namespace Monitor {
1470
+ interface Change {
1471
+ current: string;
1472
+ previous: string;
1473
+ questionId: string;
1474
+ }
1475
+ }
1476
+ }
1477
+ /**
1478
+ * A post without an analysis. It costs nothing.
1479
+ */
1480
+ interface Unanalyzed {
1481
+ /**
1482
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
1483
+ */
1484
+ id: string;
1485
+ /**
1486
+ * post_unavailable when X returns no such post. missing_text for a post without
1487
+ * text. insufficient_credits when credits ran out. context_limit when the settings
1488
+ * leave the post no room. The other reasons mean the analysis failed. Send the
1489
+ * post again.
1490
+ */
1491
+ reason: string;
1492
+ status: 'failed' | 'skipped';
1493
+ }
1494
+ }
1495
+ /**
1496
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
1497
+ * row in results costs 2 credits.
1498
+ */
1499
+ export interface AnalysisSentimentResponse {
1500
+ /**
1501
+ * Totals of the answers across the analyzed posts.
1502
+ */
1503
+ analysisSummary: AnalysisSentimentResponse.AnalysisSummary;
1504
+ /**
1505
+ * Whether the search has more posts. Send next_cursor as cursor.
1506
+ */
1507
+ has_next_page: boolean;
1508
+ /**
1509
+ * Cursor of the search's next page, else empty.
1510
+ */
1511
+ next_cursor: string;
1512
+ /**
1513
+ * Each analyzed post with its answers.
1514
+ */
1515
+ results: Array<AnalysisSentimentResponse.Result>;
1516
+ /**
1517
+ * Each post without an analysis, by ID & reason. These cost nothing.
1518
+ */
1519
+ unanalyzed: Array<AnalysisSentimentResponse.Unanalyzed>;
1520
+ }
1521
+ export declare namespace AnalysisSentimentResponse {
1522
+ /**
1523
+ * Totals of the answers across the analyzed posts.
1524
+ */
1525
+ interface AnalysisSummary {
1526
+ /**
1527
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
1528
+ * the market questions.
1529
+ */
1530
+ cashtags: Array<AnalysisSummary.Cashtag>;
1531
+ /**
1532
+ * Likes, reposts, replies & quotes of the analyzed posts.
1533
+ */
1534
+ engagement: number;
1535
+ /**
1536
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1537
+ * when the answer holds no post.
1538
+ */
1539
+ monitor: AnalysisSummary.Monitor | null;
1540
+ /**
1541
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
1542
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
1543
+ * has mean, yes & no.
1544
+ */
1545
+ questions: {
1546
+ [key: string]: {
1547
+ [key: string]: unknown;
1548
+ };
1549
+ };
1550
+ /**
1551
+ * Posts by analysis outcome.
1552
+ */
1553
+ rows: AnalysisSummary.Rows;
1554
+ schemaVersion: number;
1555
+ /**
1556
+ * Posts per linked hostname, most posts first, up to 20.
1557
+ */
1558
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
1559
+ /**
1560
+ * Mentions & answers per target in analysis.targets.
1561
+ */
1562
+ targets: Array<AnalysisSummary.Target>;
1563
+ /**
1564
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
1565
+ * counts, the scores against actual engagement, a report per author & the
1566
+ * leaderboards.
1567
+ */
1568
+ viral?: {
1569
+ [key: string]: unknown;
1570
+ };
1571
+ }
1572
+ namespace AnalysisSummary {
1573
+ interface Cashtag {
1574
+ cashtag: string;
1575
+ /**
1576
+ * Category counts of the cashtag's posts by question ID.
1577
+ */
1578
+ choices: {
1579
+ [key: string]: unknown;
1580
+ };
1581
+ rows: number;
1582
+ signal?: Cashtag.Signal;
1583
+ }
1584
+ namespace Cashtag {
1585
+ interface Signal {
1586
+ bearish: number;
1587
+ bullish: number;
1588
+ /**
1589
+ * Bullish minus bearish posts, over all posts.
1590
+ */
1591
+ score: number;
1592
+ }
1593
+ }
1594
+ /**
1595
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1596
+ * when the answer holds no post.
1597
+ */
1598
+ interface Monitor {
1599
+ changedRows: Array<Monitor.ChangedRow>;
1600
+ /**
1601
+ * Posts per monitor status.
1602
+ */
1603
+ statuses: {
1604
+ [key: string]: number;
1605
+ };
1606
+ }
1607
+ namespace Monitor {
1608
+ interface ChangedRow {
1609
+ changes: Array<ChangedRow.Change>;
1610
+ tweetId: string;
1611
+ }
1612
+ namespace ChangedRow {
1613
+ interface Change {
1614
+ current: string;
1615
+ previous: string;
1616
+ questionId: string;
1617
+ }
1618
+ }
1619
+ }
1620
+ /**
1621
+ * Posts by analysis outcome.
1622
+ */
1623
+ interface Rows {
1624
+ analyzed: number;
1625
+ failed: number;
1626
+ skipped: number;
1627
+ }
1628
+ interface SourceDomain {
1629
+ domain: string;
1630
+ posts: number;
1631
+ }
1632
+ interface Target {
1633
+ /**
1634
+ * Category counts by question ID.
1635
+ */
1636
+ choices: {
1637
+ [key: string]: unknown;
1638
+ };
1639
+ engagement: number;
1640
+ mentions: number;
1641
+ name: string;
1642
+ share: number;
1643
+ /**
1644
+ * The most engaged posts per question ID & category.
1645
+ */
1646
+ top: {
1647
+ [key: string]: unknown;
1648
+ };
1649
+ }
1650
+ }
1651
+ /**
1652
+ * 1 analyzed post with its answers.
1653
+ */
1654
+ interface Result {
1655
+ /**
1656
+ * The answers in full, with their probabilities.
1657
+ */
1658
+ analysis: Result.Analysis;
1659
+ /**
1660
+ * Each question's decision by question ID. A choice gives its category, a score
1661
+ * its level from 0, which can have decimals, & a probability its value from 0 to
1662
+ * 1.
1663
+ */
1664
+ answers: {
1665
+ [key: string]: string | number;
1666
+ };
1667
+ /**
1668
+ * Cashtags in the post's text, in upper case.
1669
+ */
1670
+ cashtags: Array<string>;
1671
+ /**
1672
+ * How the post's answers compare with its row in baseline, as the AI Actors
1673
+ * compare a run with an earlier dataset.
1674
+ */
1675
+ monitor: Result.Monitor;
1676
+ /**
1677
+ * Hostnames the post links to, without t.co.
1678
+ */
1679
+ sourceDomains: Array<string>;
1680
+ /**
1681
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
1682
+ * text:2 & so on.
1683
+ */
1684
+ tweet: Shared.SearchTweet;
1685
+ /**
1686
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
1687
+ * that applied & the engagement comparison.
1688
+ */
1689
+ viral?: {
1690
+ [key: string]: unknown;
1691
+ };
1692
+ /**
1693
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
1694
+ * 1,000 followers. Null without a follower count.
1695
+ */
1696
+ viralActualEngagementRate?: number | null;
1697
+ /**
1698
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
1699
+ * ranking weights, per 1,000 views or followers.
1700
+ */
1701
+ viralAlgorithmScore?: number | null;
1702
+ /**
1703
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
1704
+ * trait has no answer.
1705
+ */
1706
+ viralScore?: number | null;
1707
+ /**
1708
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
1709
+ * sleep_on_it.
1710
+ */
1711
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
1712
+ }
1713
+ namespace Result {
1714
+ /**
1715
+ * The answers in full, with their probabilities.
1716
+ */
1717
+ interface Analysis {
1718
+ /**
1719
+ * 1 answer per question, in question order.
1720
+ */
1721
+ answers: Array<Analysis.Answer>;
1722
+ /**
1723
+ * What the AI read beside the post's text.
1724
+ */
1725
+ contextAvailability: Analysis.ContextAvailability;
1726
+ /**
1727
+ * Bytes of post & settings the AI read.
1728
+ */
1729
+ contextBytes: number;
1730
+ /**
1731
+ * The ID & version of each question asked.
1732
+ */
1733
+ questions: Array<Analysis.Question>;
1734
+ status: 'succeeded';
1735
+ }
1736
+ namespace Analysis {
1737
+ /**
1738
+ * 1 question's answer. A probability has probability. A choice or score has value,
1739
+ * confidence & the probability of each category or level.
1740
+ */
1741
+ interface Answer {
1742
+ questionId: string;
1743
+ questionVersion: string;
1744
+ type: 'choice' | 'score' | 'probability';
1745
+ confidence?: number;
1746
+ /**
1747
+ * For a score. The levels the question named, from 0.
1748
+ */
1749
+ levels?: Array<string>;
1750
+ /**
1751
+ * Probability of each category, or of each level by index.
1752
+ */
1753
+ probabilities?: {
1754
+ [key: string]: number;
1755
+ };
1756
+ /**
1757
+ * For a probability. The chance the answer is yes.
1758
+ */
1759
+ probability?: number;
1760
+ /**
1761
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
1762
+ * between levels 1 & 2.
1763
+ */
1764
+ value?: string | number;
1765
+ }
1766
+ /**
1767
+ * What the AI read beside the post's text.
1768
+ */
1769
+ interface ContextAvailability {
1770
+ article: 'text_blocks' | 'summary' | 'not_supplied';
1771
+ author: 'available' | 'missing';
1772
+ media: 'text_descriptions_only' | 'not_supplied';
1773
+ /**
1774
+ * truncated when the post was cut to fit.
1775
+ */
1776
+ postText: 'full' | 'truncated';
1777
+ quote: 'available' | 'missing' | 'not_applicable';
1778
+ reply: 'available' | 'missing' | 'not_applicable';
1779
+ }
1780
+ interface Question {
1781
+ id: string;
1782
+ version: string;
1783
+ }
1784
+ }
1785
+ /**
1786
+ * How the post's answers compare with its row in baseline, as the AI Actors
1787
+ * compare a run with an earlier dataset.
1788
+ */
1789
+ interface Monitor {
1790
+ /**
1791
+ * Always null. The baseline is the rows you sent.
1792
+ */
1793
+ baselineDatasetId: null;
1794
+ /**
1795
+ * IDs of the questions whose decision changed.
1796
+ */
1797
+ changedQuestionIds: Array<string>;
1798
+ /**
1799
+ * Each changed decision, earlier & now.
1800
+ */
1801
+ changes: Array<Monitor.Change>;
1802
+ /**
1803
+ * Hash of the questions, targets & context. Rows with another hash are
1804
+ * not_comparable.
1805
+ */
1806
+ configurationFingerprint: string;
1807
+ /**
1808
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
1809
+ * when an answer clearly left its earlier decision. not_comparable when other
1810
+ * settings made the earlier row or it answers none of these questions.
1811
+ */
1812
+ status: 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
1813
+ }
1814
+ namespace Monitor {
1815
+ interface Change {
1816
+ current: string;
1817
+ previous: string;
1818
+ questionId: string;
1819
+ }
1820
+ }
1821
+ }
1822
+ /**
1823
+ * A post without an analysis. It costs nothing.
1824
+ */
1825
+ interface Unanalyzed {
1826
+ /**
1827
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
1828
+ */
1829
+ id: string;
1830
+ /**
1831
+ * post_unavailable when X returns no such post. missing_text for a post without
1832
+ * text. insufficient_credits when credits ran out. context_limit when the settings
1833
+ * leave the post no room. The other reasons mean the analysis failed. Send the
1834
+ * post again.
1835
+ */
1836
+ reason: string;
1837
+ status: 'failed' | 'skipped';
1838
+ }
1839
+ }
1840
+ /**
1841
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
1842
+ * row in results costs 2 credits.
1843
+ */
1844
+ export interface AnalysisViralScoreResponse {
1845
+ /**
1846
+ * Totals of the answers across the analyzed posts.
1847
+ */
1848
+ analysisSummary: AnalysisViralScoreResponse.AnalysisSummary;
1849
+ /**
1850
+ * Whether the search has more posts. Send next_cursor as cursor.
1851
+ */
1852
+ has_next_page: boolean;
1853
+ /**
1854
+ * Cursor of the search's next page, else empty.
1855
+ */
1856
+ next_cursor: string;
1857
+ /**
1858
+ * Each analyzed post with its answers.
1859
+ */
1860
+ results: Array<AnalysisViralScoreResponse.Result>;
1861
+ /**
1862
+ * Each post without an analysis, by ID & reason. These cost nothing.
1863
+ */
1864
+ unanalyzed: Array<AnalysisViralScoreResponse.Unanalyzed>;
1865
+ }
1866
+ export declare namespace AnalysisViralScoreResponse {
1867
+ /**
1868
+ * Totals of the answers across the analyzed posts.
1869
+ */
1870
+ interface AnalysisSummary {
1871
+ /**
1872
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
1873
+ * the market questions.
1874
+ */
1875
+ cashtags: Array<AnalysisSummary.Cashtag>;
1876
+ /**
1877
+ * Likes, reposts, replies & quotes of the analyzed posts.
1878
+ */
1879
+ engagement: number;
1880
+ /**
1881
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1882
+ * when the answer holds no post.
1883
+ */
1884
+ monitor: AnalysisSummary.Monitor | null;
1885
+ /**
1886
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
1887
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
1888
+ * has mean, yes & no.
1889
+ */
1890
+ questions: {
1891
+ [key: string]: {
1892
+ [key: string]: unknown;
1893
+ };
1894
+ };
1895
+ /**
1896
+ * Posts by analysis outcome.
1897
+ */
1898
+ rows: AnalysisSummary.Rows;
1899
+ schemaVersion: number;
1900
+ /**
1901
+ * Posts per linked hostname, most posts first, up to 20.
1902
+ */
1903
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
1904
+ /**
1905
+ * Mentions & answers per target in analysis.targets.
1906
+ */
1907
+ targets: Array<AnalysisSummary.Target>;
1908
+ /**
1909
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
1910
+ * counts, the scores against actual engagement, a report per author & the
1911
+ * leaderboards.
1912
+ */
1913
+ viral?: {
1914
+ [key: string]: unknown;
1915
+ };
1916
+ }
1917
+ namespace AnalysisSummary {
1918
+ interface Cashtag {
1919
+ cashtag: string;
1920
+ /**
1921
+ * Category counts of the cashtag's posts by question ID.
1922
+ */
1923
+ choices: {
1924
+ [key: string]: unknown;
1925
+ };
1926
+ rows: number;
1927
+ signal?: Cashtag.Signal;
1928
+ }
1929
+ namespace Cashtag {
1930
+ interface Signal {
1931
+ bearish: number;
1932
+ bullish: number;
1933
+ /**
1934
+ * Bullish minus bearish posts, over all posts.
1935
+ */
1936
+ score: number;
1937
+ }
1938
+ }
1939
+ /**
1940
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1941
+ * when the answer holds no post.
1942
+ */
1943
+ interface Monitor {
1944
+ changedRows: Array<Monitor.ChangedRow>;
1945
+ /**
1946
+ * Posts per monitor status.
1947
+ */
1948
+ statuses: {
1949
+ [key: string]: number;
1950
+ };
1951
+ }
1952
+ namespace Monitor {
1953
+ interface ChangedRow {
1954
+ changes: Array<ChangedRow.Change>;
1955
+ tweetId: string;
1956
+ }
1957
+ namespace ChangedRow {
1958
+ interface Change {
1959
+ current: string;
1960
+ previous: string;
1961
+ questionId: string;
1962
+ }
1963
+ }
1964
+ }
1965
+ /**
1966
+ * Posts by analysis outcome.
1967
+ */
1968
+ interface Rows {
1969
+ analyzed: number;
1970
+ failed: number;
1971
+ skipped: number;
1972
+ }
1973
+ interface SourceDomain {
1974
+ domain: string;
1975
+ posts: number;
1976
+ }
1977
+ interface Target {
1978
+ /**
1979
+ * Category counts by question ID.
1980
+ */
1981
+ choices: {
1982
+ [key: string]: unknown;
1983
+ };
1984
+ engagement: number;
1985
+ mentions: number;
1986
+ name: string;
1987
+ share: number;
1988
+ /**
1989
+ * The most engaged posts per question ID & category.
1990
+ */
1991
+ top: {
1992
+ [key: string]: unknown;
1993
+ };
1994
+ }
1995
+ }
1996
+ /**
1997
+ * 1 analyzed post with its answers.
1998
+ */
1999
+ interface Result {
2000
+ /**
2001
+ * The answers in full, with their probabilities.
2002
+ */
2003
+ analysis: Result.Analysis;
2004
+ /**
2005
+ * Each question's decision by question ID. A choice gives its category, a score
2006
+ * its level from 0, which can have decimals, & a probability its value from 0 to
2007
+ * 1.
2008
+ */
2009
+ answers: {
2010
+ [key: string]: string | number;
2011
+ };
2012
+ /**
2013
+ * Cashtags in the post's text, in upper case.
2014
+ */
2015
+ cashtags: Array<string>;
2016
+ /**
2017
+ * How the post's answers compare with its row in baseline, as the AI Actors
2018
+ * compare a run with an earlier dataset.
2019
+ */
2020
+ monitor: Result.Monitor;
2021
+ /**
2022
+ * Hostnames the post links to, without t.co.
2023
+ */
2024
+ sourceDomains: Array<string>;
2025
+ /**
2026
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
2027
+ * text:2 & so on.
2028
+ */
2029
+ tweet: Shared.SearchTweet;
2030
+ /**
2031
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
2032
+ * that applied & the engagement comparison.
2033
+ */
2034
+ viral?: {
2035
+ [key: string]: unknown;
2036
+ };
2037
+ /**
2038
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
2039
+ * 1,000 followers. Null without a follower count.
2040
+ */
2041
+ viralActualEngagementRate?: number | null;
2042
+ /**
2043
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
2044
+ * ranking weights, per 1,000 views or followers.
2045
+ */
2046
+ viralAlgorithmScore?: number | null;
2047
+ /**
2048
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
2049
+ * trait has no answer.
2050
+ */
2051
+ viralScore?: number | null;
2052
+ /**
2053
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
2054
+ * sleep_on_it.
2055
+ */
2056
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
2057
+ }
2058
+ namespace Result {
2059
+ /**
2060
+ * The answers in full, with their probabilities.
2061
+ */
2062
+ interface Analysis {
2063
+ /**
2064
+ * 1 answer per question, in question order.
2065
+ */
2066
+ answers: Array<Analysis.Answer>;
2067
+ /**
2068
+ * What the AI read beside the post's text.
2069
+ */
2070
+ contextAvailability: Analysis.ContextAvailability;
2071
+ /**
2072
+ * Bytes of post & settings the AI read.
2073
+ */
2074
+ contextBytes: number;
2075
+ /**
2076
+ * The ID & version of each question asked.
2077
+ */
2078
+ questions: Array<Analysis.Question>;
2079
+ status: 'succeeded';
2080
+ }
2081
+ namespace Analysis {
2082
+ /**
2083
+ * 1 question's answer. A probability has probability. A choice or score has value,
2084
+ * confidence & the probability of each category or level.
2085
+ */
2086
+ interface Answer {
2087
+ questionId: string;
2088
+ questionVersion: string;
2089
+ type: 'choice' | 'score' | 'probability';
2090
+ confidence?: number;
2091
+ /**
2092
+ * For a score. The levels the question named, from 0.
2093
+ */
2094
+ levels?: Array<string>;
2095
+ /**
2096
+ * Probability of each category, or of each level by index.
2097
+ */
2098
+ probabilities?: {
2099
+ [key: string]: number;
2100
+ };
2101
+ /**
2102
+ * For a probability. The chance the answer is yes.
2103
+ */
2104
+ probability?: number;
2105
+ /**
2106
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
2107
+ * between levels 1 & 2.
2108
+ */
2109
+ value?: string | number;
2110
+ }
2111
+ /**
2112
+ * What the AI read beside the post's text.
2113
+ */
2114
+ interface ContextAvailability {
2115
+ article: 'text_blocks' | 'summary' | 'not_supplied';
2116
+ author: 'available' | 'missing';
2117
+ media: 'text_descriptions_only' | 'not_supplied';
2118
+ /**
2119
+ * truncated when the post was cut to fit.
2120
+ */
2121
+ postText: 'full' | 'truncated';
2122
+ quote: 'available' | 'missing' | 'not_applicable';
2123
+ reply: 'available' | 'missing' | 'not_applicable';
2124
+ }
2125
+ interface Question {
2126
+ id: string;
2127
+ version: string;
2128
+ }
2129
+ }
2130
+ /**
2131
+ * How the post's answers compare with its row in baseline, as the AI Actors
2132
+ * compare a run with an earlier dataset.
2133
+ */
2134
+ interface Monitor {
2135
+ /**
2136
+ * Always null. The baseline is the rows you sent.
2137
+ */
2138
+ baselineDatasetId: null;
2139
+ /**
2140
+ * IDs of the questions whose decision changed.
2141
+ */
2142
+ changedQuestionIds: Array<string>;
2143
+ /**
2144
+ * Each changed decision, earlier & now.
2145
+ */
2146
+ changes: Array<Monitor.Change>;
2147
+ /**
2148
+ * Hash of the questions, targets & context. Rows with another hash are
2149
+ * not_comparable.
2150
+ */
2151
+ configurationFingerprint: string;
2152
+ /**
2153
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
2154
+ * when an answer clearly left its earlier decision. not_comparable when other
2155
+ * settings made the earlier row or it answers none of these questions.
2156
+ */
2157
+ status: 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
2158
+ }
2159
+ namespace Monitor {
2160
+ interface Change {
2161
+ current: string;
2162
+ previous: string;
2163
+ questionId: string;
2164
+ }
2165
+ }
2166
+ }
2167
+ /**
2168
+ * A post without an analysis. It costs nothing.
2169
+ */
2170
+ interface Unanalyzed {
2171
+ /**
2172
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
2173
+ */
2174
+ id: string;
2175
+ /**
2176
+ * post_unavailable when X returns no such post. missing_text for a post without
2177
+ * text. insufficient_credits when credits ran out. context_limit when the settings
2178
+ * leave the post no room. The other reasons mean the analysis failed. Send the
2179
+ * post again.
2180
+ */
2181
+ reason: string;
2182
+ status: 'failed' | 'skipped';
2183
+ }
2184
+ }
2185
+ export interface AnalysisBrandParams {
2186
+ /**
2187
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2188
+ * out for the route's own questions.
2189
+ */
2190
+ analysis?: AnalysisBrandParams.Analysis;
2191
+ /**
2192
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
2193
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
2194
+ * as not_comparable. Each result's monitor says whether the post is new, changed
2195
+ * or unchanged. The comparison costs nothing extra.
2196
+ */
2197
+ baseline?: Array<AnalysisBrandParams.Baseline>;
2198
+ /**
2199
+ * The next_cursor of the page before. Send the same search with it.
2200
+ */
2201
+ cursor?: string;
2202
+ /**
2203
+ * Maximum posts to analyze from the search. Credits can return fewer.
2204
+ */
2205
+ limit?: number;
2206
+ /**
2207
+ * Analyze a public List's posts. Send its ID or URL.
2208
+ */
2209
+ listId?: string;
2210
+ /**
2211
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
2212
+ * or lang:en. X searches up to 512 characters, counted with the other search
2213
+ * fields, as /x/tweets/search counts q.
2214
+ */
2215
+ query?: string;
2216
+ /**
2217
+ * Search order. Default Latest.
2218
+ */
2219
+ queryType?: 'Latest' | 'Top';
2220
+ /**
2221
+ * Analyze the quotes of 1 post. Send its ID or URL.
2222
+ */
2223
+ quotesOf?: string;
2224
+ /**
2225
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
2226
+ */
2227
+ repliesTo?: string;
2228
+ /**
2229
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
2230
+ * work. A time without an offset is UTC.
2231
+ */
2232
+ sinceTime?: string | number;
2233
+ /**
2234
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
2235
+ * the same as 1 analyzed post.
2236
+ */
2237
+ texts?: Array<string>;
2238
+ /**
2239
+ * Post IDs or post URLs to analyze, up to 100.
2240
+ */
2241
+ tweetIds?: Array<string>;
2242
+ /**
2243
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
2244
+ * work. A time without an offset is UTC.
2245
+ */
2246
+ untilTime?: string | number;
2247
+ /**
2248
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
2249
+ */
2250
+ username?: string;
2251
+ }
2252
+ export declare namespace AnalysisBrandParams {
2253
+ /**
2254
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2255
+ * out for the route's own questions.
2256
+ */
2257
+ interface Analysis {
2258
+ /**
2259
+ * Posts analyzed at the same time.
2260
+ */
2261
+ concurrency?: number;
2262
+ /**
2263
+ * Background the AI reads with every post.
2264
+ */
2265
+ context?: string;
2266
+ /**
2267
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
2268
+ * settings take 219 bytes, so a smaller value gets a 400.
2269
+ */
2270
+ maxContextBytes?: number;
2271
+ /**
2272
+ * A ready set of questions, used when questions is left out. complaints,
2273
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
2274
+ * how viral the wording reads.
2275
+ */
2276
+ preset?: 'brand' | 'complaints' | 'competitors' | 'purchase_intent' | 'product_feedback' | 'news' | 'sentiment' | 'market' | 'viral_lite';
2277
+ /**
2278
+ * Your own questions, which replace the route's questions. Write question IDs &
2279
+ * category names in lower case without hyphens.
2280
+ */
2281
+ questions?: Array<Analysis.Question>;
2282
+ /**
2283
+ * Brands, people, assets or topics the questions are about, each with its aliases.
2284
+ */
2285
+ targets?: Array<Analysis.Target>;
2286
+ }
2287
+ namespace Analysis {
2288
+ /**
2289
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
2290
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
2291
+ * yes or no.
2292
+ */
2293
+ interface Question {
2294
+ /**
2295
+ * Name of the answer, such as request. A name the response renames or drops gets a
2296
+ * 400, such as created_at, favorite_count, muting or blocking.
2297
+ */
2298
+ id: string;
2299
+ /**
2300
+ * The question, as the AI reads it.
2301
+ */
2302
+ instructions: string;
2303
+ type: 'choice' | 'score' | 'probability';
2304
+ /**
2305
+ * Your version of the question, such as 1.
2306
+ */
2307
+ version: string;
2308
+ /**
2309
+ * For a choice. Each category name with its description, or null.
2310
+ */
2311
+ categories?: {
2312
+ [key: string]: string | null;
2313
+ };
2314
+ /**
2315
+ * For a probability. What counts as yes & as no.
2316
+ */
2317
+ criteria?: Question.Criteria;
2318
+ /**
2319
+ * For a score. Each level's description, lowest first.
2320
+ */
2321
+ levels?: Array<string>;
2322
+ }
2323
+ namespace Question {
2324
+ /**
2325
+ * For a probability. What counts as yes & as no.
2326
+ */
2327
+ interface Criteria {
2328
+ no: string;
2329
+ yes: string;
2330
+ }
2331
+ }
2332
+ interface Target {
2333
+ name: string;
2334
+ aliases?: Array<string>;
2335
+ }
2336
+ }
2337
+ interface Baseline {
2338
+ /**
2339
+ * The earlier answers by question ID.
2340
+ */
2341
+ answers: {
2342
+ [key: string]: string | number;
2343
+ };
2344
+ /**
2345
+ * Post ID, or text:1 & so on. Else tweet.id counts.
2346
+ */
2347
+ id?: string;
2348
+ /**
2349
+ * The earlier row's monitor, with its fingerprint.
2350
+ */
2351
+ monitor?: Baseline.Monitor;
2352
+ tweet?: Baseline.Tweet;
2353
+ }
2354
+ namespace Baseline {
2355
+ /**
2356
+ * The earlier row's monitor, with its fingerprint.
2357
+ */
2358
+ interface Monitor {
2359
+ configurationFingerprint?: string;
2360
+ }
2361
+ interface Tweet {
2362
+ id: string;
2363
+ }
2364
+ }
2365
+ }
2366
+ export interface AnalysisClassifyParams {
2367
+ /**
2368
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2369
+ * out for the route's own questions.
2370
+ */
2371
+ analysis?: AnalysisClassifyParams.Analysis;
2372
+ /**
2373
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
2374
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
2375
+ * as not_comparable. Each result's monitor says whether the post is new, changed
2376
+ * or unchanged. The comparison costs nothing extra.
2377
+ */
2378
+ baseline?: Array<AnalysisClassifyParams.Baseline>;
2379
+ /**
2380
+ * The next_cursor of the page before. Send the same search with it.
2381
+ */
2382
+ cursor?: string;
2383
+ /**
2384
+ * Maximum posts to analyze from the search. Credits can return fewer.
2385
+ */
2386
+ limit?: number;
2387
+ /**
2388
+ * Analyze a public List's posts. Send its ID or URL.
2389
+ */
2390
+ listId?: string;
2391
+ /**
2392
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
2393
+ * or lang:en. X searches up to 512 characters, counted with the other search
2394
+ * fields, as /x/tweets/search counts q.
2395
+ */
2396
+ query?: string;
2397
+ /**
2398
+ * Search order. Default Latest.
2399
+ */
2400
+ queryType?: 'Latest' | 'Top';
2401
+ /**
2402
+ * Analyze the quotes of 1 post. Send its ID or URL.
2403
+ */
2404
+ quotesOf?: string;
2405
+ /**
2406
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
2407
+ */
2408
+ repliesTo?: string;
2409
+ /**
2410
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
2411
+ * work. A time without an offset is UTC.
2412
+ */
2413
+ sinceTime?: string | number;
2414
+ /**
2415
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
2416
+ * the same as 1 analyzed post.
2417
+ */
2418
+ texts?: Array<string>;
2419
+ /**
2420
+ * Post IDs or post URLs to analyze, up to 100.
2421
+ */
2422
+ tweetIds?: Array<string>;
2423
+ /**
2424
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
2425
+ * work. A time without an offset is UTC.
2426
+ */
2427
+ untilTime?: string | number;
2428
+ /**
2429
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
2430
+ */
2431
+ username?: string;
2432
+ }
2433
+ export declare namespace AnalysisClassifyParams {
2434
+ /**
2435
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2436
+ * out for the route's own questions.
2437
+ */
2438
+ interface Analysis {
2439
+ /**
2440
+ * Posts analyzed at the same time.
2441
+ */
2442
+ concurrency?: number;
2443
+ /**
2444
+ * Background the AI reads with every post.
2445
+ */
2446
+ context?: string;
2447
+ /**
2448
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
2449
+ * settings take 219 bytes, so a smaller value gets a 400.
2450
+ */
2451
+ maxContextBytes?: number;
2452
+ /**
2453
+ * A ready set of questions, used when questions is left out. complaints,
2454
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
2455
+ * how viral the wording reads.
2456
+ */
2457
+ preset?: 'brand' | 'complaints' | 'competitors' | 'purchase_intent' | 'product_feedback' | 'news' | 'sentiment' | 'market' | 'viral_lite';
2458
+ /**
2459
+ * Your own questions, which replace the route's questions. Write question IDs &
2460
+ * category names in lower case without hyphens.
2461
+ */
2462
+ questions?: Array<Analysis.Question>;
2463
+ /**
2464
+ * Brands, people, assets or topics the questions are about, each with its aliases.
2465
+ */
2466
+ targets?: Array<Analysis.Target>;
2467
+ }
2468
+ namespace Analysis {
2469
+ /**
2470
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
2471
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
2472
+ * yes or no.
2473
+ */
2474
+ interface Question {
2475
+ /**
2476
+ * Name of the answer, such as request. A name the response renames or drops gets a
2477
+ * 400, such as created_at, favorite_count, muting or blocking.
2478
+ */
2479
+ id: string;
2480
+ /**
2481
+ * The question, as the AI reads it.
2482
+ */
2483
+ instructions: string;
2484
+ type: 'choice' | 'score' | 'probability';
2485
+ /**
2486
+ * Your version of the question, such as 1.
2487
+ */
2488
+ version: string;
2489
+ /**
2490
+ * For a choice. Each category name with its description, or null.
2491
+ */
2492
+ categories?: {
2493
+ [key: string]: string | null;
2494
+ };
2495
+ /**
2496
+ * For a probability. What counts as yes & as no.
2497
+ */
2498
+ criteria?: Question.Criteria;
2499
+ /**
2500
+ * For a score. Each level's description, lowest first.
2501
+ */
2502
+ levels?: Array<string>;
2503
+ }
2504
+ namespace Question {
2505
+ /**
2506
+ * For a probability. What counts as yes & as no.
2507
+ */
2508
+ interface Criteria {
2509
+ no: string;
2510
+ yes: string;
2511
+ }
2512
+ }
2513
+ interface Target {
2514
+ name: string;
2515
+ aliases?: Array<string>;
2516
+ }
2517
+ }
2518
+ interface Baseline {
2519
+ /**
2520
+ * The earlier answers by question ID.
2521
+ */
2522
+ answers: {
2523
+ [key: string]: string | number;
2524
+ };
2525
+ /**
2526
+ * Post ID, or text:1 & so on. Else tweet.id counts.
2527
+ */
2528
+ id?: string;
2529
+ /**
2530
+ * The earlier row's monitor, with its fingerprint.
2531
+ */
2532
+ monitor?: Baseline.Monitor;
2533
+ tweet?: Baseline.Tweet;
2534
+ }
2535
+ namespace Baseline {
2536
+ /**
2537
+ * The earlier row's monitor, with its fingerprint.
2538
+ */
2539
+ interface Monitor {
2540
+ configurationFingerprint?: string;
2541
+ }
2542
+ interface Tweet {
2543
+ id: string;
2544
+ }
2545
+ }
2546
+ }
2547
+ export interface AnalysisMarketSignalsParams {
2548
+ /**
2549
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2550
+ * out for the route's own questions.
2551
+ */
2552
+ analysis?: AnalysisMarketSignalsParams.Analysis;
2553
+ /**
2554
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
2555
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
2556
+ * as not_comparable. Each result's monitor says whether the post is new, changed
2557
+ * or unchanged. The comparison costs nothing extra.
2558
+ */
2559
+ baseline?: Array<AnalysisMarketSignalsParams.Baseline>;
2560
+ /**
2561
+ * The next_cursor of the page before. Send the same search with it.
2562
+ */
2563
+ cursor?: string;
2564
+ /**
2565
+ * Maximum posts to analyze from the search. Credits can return fewer.
2566
+ */
2567
+ limit?: number;
2568
+ /**
2569
+ * Analyze a public List's posts. Send its ID or URL.
2570
+ */
2571
+ listId?: string;
2572
+ /**
2573
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
2574
+ * or lang:en. X searches up to 512 characters, counted with the other search
2575
+ * fields, as /x/tweets/search counts q.
2576
+ */
2577
+ query?: string;
2578
+ /**
2579
+ * Search order. Default Latest.
2580
+ */
2581
+ queryType?: 'Latest' | 'Top';
2582
+ /**
2583
+ * Analyze the quotes of 1 post. Send its ID or URL.
2584
+ */
2585
+ quotesOf?: string;
2586
+ /**
2587
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
2588
+ */
2589
+ repliesTo?: string;
2590
+ /**
2591
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
2592
+ * work. A time without an offset is UTC.
2593
+ */
2594
+ sinceTime?: string | number;
2595
+ /**
2596
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
2597
+ * the same as 1 analyzed post.
2598
+ */
2599
+ texts?: Array<string>;
2600
+ /**
2601
+ * Post IDs or post URLs to analyze, up to 100.
2602
+ */
2603
+ tweetIds?: Array<string>;
2604
+ /**
2605
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
2606
+ * work. A time without an offset is UTC.
2607
+ */
2608
+ untilTime?: string | number;
2609
+ /**
2610
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
2611
+ */
2612
+ username?: string;
2613
+ }
2614
+ export declare namespace AnalysisMarketSignalsParams {
2615
+ /**
2616
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2617
+ * out for the route's own questions.
2618
+ */
2619
+ interface Analysis {
2620
+ /**
2621
+ * Posts analyzed at the same time.
2622
+ */
2623
+ concurrency?: number;
2624
+ /**
2625
+ * Background the AI reads with every post.
2626
+ */
2627
+ context?: string;
2628
+ /**
2629
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
2630
+ * settings take 219 bytes, so a smaller value gets a 400.
2631
+ */
2632
+ maxContextBytes?: number;
2633
+ /**
2634
+ * A ready set of questions, used when questions is left out. complaints,
2635
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
2636
+ * how viral the wording reads.
2637
+ */
2638
+ preset?: 'brand' | 'complaints' | 'competitors' | 'purchase_intent' | 'product_feedback' | 'news' | 'sentiment' | 'market' | 'viral_lite';
2639
+ /**
2640
+ * Your own questions, which replace the route's questions. Write question IDs &
2641
+ * category names in lower case without hyphens.
2642
+ */
2643
+ questions?: Array<Analysis.Question>;
2644
+ /**
2645
+ * Brands, people, assets or topics the questions are about, each with its aliases.
2646
+ */
2647
+ targets?: Array<Analysis.Target>;
2648
+ }
2649
+ namespace Analysis {
2650
+ /**
2651
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
2652
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
2653
+ * yes or no.
2654
+ */
2655
+ interface Question {
2656
+ /**
2657
+ * Name of the answer, such as request. A name the response renames or drops gets a
2658
+ * 400, such as created_at, favorite_count, muting or blocking.
2659
+ */
2660
+ id: string;
2661
+ /**
2662
+ * The question, as the AI reads it.
2663
+ */
2664
+ instructions: string;
2665
+ type: 'choice' | 'score' | 'probability';
2666
+ /**
2667
+ * Your version of the question, such as 1.
2668
+ */
2669
+ version: string;
2670
+ /**
2671
+ * For a choice. Each category name with its description, or null.
2672
+ */
2673
+ categories?: {
2674
+ [key: string]: string | null;
2675
+ };
2676
+ /**
2677
+ * For a probability. What counts as yes & as no.
2678
+ */
2679
+ criteria?: Question.Criteria;
2680
+ /**
2681
+ * For a score. Each level's description, lowest first.
2682
+ */
2683
+ levels?: Array<string>;
2684
+ }
2685
+ namespace Question {
2686
+ /**
2687
+ * For a probability. What counts as yes & as no.
2688
+ */
2689
+ interface Criteria {
2690
+ no: string;
2691
+ yes: string;
2692
+ }
2693
+ }
2694
+ interface Target {
2695
+ name: string;
2696
+ aliases?: Array<string>;
2697
+ }
2698
+ }
2699
+ interface Baseline {
2700
+ /**
2701
+ * The earlier answers by question ID.
2702
+ */
2703
+ answers: {
2704
+ [key: string]: string | number;
2705
+ };
2706
+ /**
2707
+ * Post ID, or text:1 & so on. Else tweet.id counts.
2708
+ */
2709
+ id?: string;
2710
+ /**
2711
+ * The earlier row's monitor, with its fingerprint.
2712
+ */
2713
+ monitor?: Baseline.Monitor;
2714
+ tweet?: Baseline.Tweet;
2715
+ }
2716
+ namespace Baseline {
2717
+ /**
2718
+ * The earlier row's monitor, with its fingerprint.
2719
+ */
2720
+ interface Monitor {
2721
+ configurationFingerprint?: string;
2722
+ }
2723
+ interface Tweet {
2724
+ id: string;
2725
+ }
2726
+ }
2727
+ }
2728
+ export interface AnalysisNewsParams {
2729
+ /**
2730
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2731
+ * out for the route's own questions.
2732
+ */
2733
+ analysis?: AnalysisNewsParams.Analysis;
2734
+ /**
2735
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
2736
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
2737
+ * as not_comparable. Each result's monitor says whether the post is new, changed
2738
+ * or unchanged. The comparison costs nothing extra.
2739
+ */
2740
+ baseline?: Array<AnalysisNewsParams.Baseline>;
2741
+ /**
2742
+ * The next_cursor of the page before. Send the same search with it.
2743
+ */
2744
+ cursor?: string;
2745
+ /**
2746
+ * Maximum posts to analyze from the search. Credits can return fewer.
2747
+ */
2748
+ limit?: number;
2749
+ /**
2750
+ * Analyze a public List's posts. Send its ID or URL.
2751
+ */
2752
+ listId?: string;
2753
+ /**
2754
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
2755
+ * or lang:en. X searches up to 512 characters, counted with the other search
2756
+ * fields, as /x/tweets/search counts q.
2757
+ */
2758
+ query?: string;
2759
+ /**
2760
+ * Search order. Default Latest.
2761
+ */
2762
+ queryType?: 'Latest' | 'Top';
2763
+ /**
2764
+ * Analyze the quotes of 1 post. Send its ID or URL.
2765
+ */
2766
+ quotesOf?: string;
2767
+ /**
2768
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
2769
+ */
2770
+ repliesTo?: string;
2771
+ /**
2772
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
2773
+ * work. A time without an offset is UTC.
2774
+ */
2775
+ sinceTime?: string | number;
2776
+ /**
2777
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
2778
+ * the same as 1 analyzed post.
2779
+ */
2780
+ texts?: Array<string>;
2781
+ /**
2782
+ * Post IDs or post URLs to analyze, up to 100.
2783
+ */
2784
+ tweetIds?: Array<string>;
2785
+ /**
2786
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
2787
+ * work. A time without an offset is UTC.
2788
+ */
2789
+ untilTime?: string | number;
2790
+ /**
2791
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
2792
+ */
2793
+ username?: string;
2794
+ }
2795
+ export declare namespace AnalysisNewsParams {
2796
+ /**
2797
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2798
+ * out for the route's own questions.
2799
+ */
2800
+ interface Analysis {
2801
+ /**
2802
+ * Posts analyzed at the same time.
2803
+ */
2804
+ concurrency?: number;
2805
+ /**
2806
+ * Background the AI reads with every post.
2807
+ */
2808
+ context?: string;
2809
+ /**
2810
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
2811
+ * settings take 219 bytes, so a smaller value gets a 400.
2812
+ */
2813
+ maxContextBytes?: number;
2814
+ /**
2815
+ * A ready set of questions, used when questions is left out. complaints,
2816
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
2817
+ * how viral the wording reads.
2818
+ */
2819
+ preset?: 'brand' | 'complaints' | 'competitors' | 'purchase_intent' | 'product_feedback' | 'news' | 'sentiment' | 'market' | 'viral_lite';
2820
+ /**
2821
+ * Your own questions, which replace the route's questions. Write question IDs &
2822
+ * category names in lower case without hyphens.
2823
+ */
2824
+ questions?: Array<Analysis.Question>;
2825
+ /**
2826
+ * Brands, people, assets or topics the questions are about, each with its aliases.
2827
+ */
2828
+ targets?: Array<Analysis.Target>;
2829
+ }
2830
+ namespace Analysis {
2831
+ /**
2832
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
2833
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
2834
+ * yes or no.
2835
+ */
2836
+ interface Question {
2837
+ /**
2838
+ * Name of the answer, such as request. A name the response renames or drops gets a
2839
+ * 400, such as created_at, favorite_count, muting or blocking.
2840
+ */
2841
+ id: string;
2842
+ /**
2843
+ * The question, as the AI reads it.
2844
+ */
2845
+ instructions: string;
2846
+ type: 'choice' | 'score' | 'probability';
2847
+ /**
2848
+ * Your version of the question, such as 1.
2849
+ */
2850
+ version: string;
2851
+ /**
2852
+ * For a choice. Each category name with its description, or null.
2853
+ */
2854
+ categories?: {
2855
+ [key: string]: string | null;
2856
+ };
2857
+ /**
2858
+ * For a probability. What counts as yes & as no.
2859
+ */
2860
+ criteria?: Question.Criteria;
2861
+ /**
2862
+ * For a score. Each level's description, lowest first.
2863
+ */
2864
+ levels?: Array<string>;
2865
+ }
2866
+ namespace Question {
2867
+ /**
2868
+ * For a probability. What counts as yes & as no.
2869
+ */
2870
+ interface Criteria {
2871
+ no: string;
2872
+ yes: string;
2873
+ }
2874
+ }
2875
+ interface Target {
2876
+ name: string;
2877
+ aliases?: Array<string>;
2878
+ }
2879
+ }
2880
+ interface Baseline {
2881
+ /**
2882
+ * The earlier answers by question ID.
2883
+ */
2884
+ answers: {
2885
+ [key: string]: string | number;
2886
+ };
2887
+ /**
2888
+ * Post ID, or text:1 & so on. Else tweet.id counts.
2889
+ */
2890
+ id?: string;
2891
+ /**
2892
+ * The earlier row's monitor, with its fingerprint.
2893
+ */
2894
+ monitor?: Baseline.Monitor;
2895
+ tweet?: Baseline.Tweet;
2896
+ }
2897
+ namespace Baseline {
2898
+ /**
2899
+ * The earlier row's monitor, with its fingerprint.
2900
+ */
2901
+ interface Monitor {
2902
+ configurationFingerprint?: string;
2903
+ }
2904
+ interface Tweet {
2905
+ id: string;
2906
+ }
2907
+ }
2908
+ }
2909
+ export interface AnalysisSentimentParams {
2910
+ /**
2911
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2912
+ * out for the route's own questions.
2913
+ */
2914
+ analysis?: AnalysisSentimentParams.Analysis;
2915
+ /**
2916
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
2917
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
2918
+ * as not_comparable. Each result's monitor says whether the post is new, changed
2919
+ * or unchanged. The comparison costs nothing extra.
2920
+ */
2921
+ baseline?: Array<AnalysisSentimentParams.Baseline>;
2922
+ /**
2923
+ * The next_cursor of the page before. Send the same search with it.
2924
+ */
2925
+ cursor?: string;
2926
+ /**
2927
+ * Maximum posts to analyze from the search. Credits can return fewer.
2928
+ */
2929
+ limit?: number;
2930
+ /**
2931
+ * Analyze a public List's posts. Send its ID or URL.
2932
+ */
2933
+ listId?: string;
2934
+ /**
2935
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
2936
+ * or lang:en. X searches up to 512 characters, counted with the other search
2937
+ * fields, as /x/tweets/search counts q.
2938
+ */
2939
+ query?: string;
2940
+ /**
2941
+ * Search order. Default Latest.
2942
+ */
2943
+ queryType?: 'Latest' | 'Top';
2944
+ /**
2945
+ * Analyze the quotes of 1 post. Send its ID or URL.
2946
+ */
2947
+ quotesOf?: string;
2948
+ /**
2949
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
2950
+ */
2951
+ repliesTo?: string;
2952
+ /**
2953
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
2954
+ * work. A time without an offset is UTC.
2955
+ */
2956
+ sinceTime?: string | number;
2957
+ /**
2958
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
2959
+ * the same as 1 analyzed post.
2960
+ */
2961
+ texts?: Array<string>;
2962
+ /**
2963
+ * Post IDs or post URLs to analyze, up to 100.
2964
+ */
2965
+ tweetIds?: Array<string>;
2966
+ /**
2967
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
2968
+ * work. A time without an offset is UTC.
2969
+ */
2970
+ untilTime?: string | number;
2971
+ /**
2972
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
2973
+ */
2974
+ username?: string;
2975
+ }
2976
+ export declare namespace AnalysisSentimentParams {
2977
+ /**
2978
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2979
+ * out for the route's own questions.
2980
+ */
2981
+ interface Analysis {
2982
+ /**
2983
+ * Posts analyzed at the same time.
2984
+ */
2985
+ concurrency?: number;
2986
+ /**
2987
+ * Background the AI reads with every post.
2988
+ */
2989
+ context?: string;
2990
+ /**
2991
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
2992
+ * settings take 219 bytes, so a smaller value gets a 400.
2993
+ */
2994
+ maxContextBytes?: number;
2995
+ /**
2996
+ * A ready set of questions, used when questions is left out. complaints,
2997
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
2998
+ * how viral the wording reads.
2999
+ */
3000
+ preset?: 'brand' | 'complaints' | 'competitors' | 'purchase_intent' | 'product_feedback' | 'news' | 'sentiment' | 'market' | 'viral_lite';
3001
+ /**
3002
+ * Your own questions, which replace the route's questions. Write question IDs &
3003
+ * category names in lower case without hyphens.
3004
+ */
3005
+ questions?: Array<Analysis.Question>;
3006
+ /**
3007
+ * Brands, people, assets or topics the questions are about, each with its aliases.
3008
+ */
3009
+ targets?: Array<Analysis.Target>;
3010
+ }
3011
+ namespace Analysis {
3012
+ /**
3013
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
3014
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
3015
+ * yes or no.
3016
+ */
3017
+ interface Question {
3018
+ /**
3019
+ * Name of the answer, such as request. A name the response renames or drops gets a
3020
+ * 400, such as created_at, favorite_count, muting or blocking.
3021
+ */
3022
+ id: string;
3023
+ /**
3024
+ * The question, as the AI reads it.
3025
+ */
3026
+ instructions: string;
3027
+ type: 'choice' | 'score' | 'probability';
3028
+ /**
3029
+ * Your version of the question, such as 1.
3030
+ */
3031
+ version: string;
3032
+ /**
3033
+ * For a choice. Each category name with its description, or null.
3034
+ */
3035
+ categories?: {
3036
+ [key: string]: string | null;
3037
+ };
3038
+ /**
3039
+ * For a probability. What counts as yes & as no.
3040
+ */
3041
+ criteria?: Question.Criteria;
3042
+ /**
3043
+ * For a score. Each level's description, lowest first.
3044
+ */
3045
+ levels?: Array<string>;
3046
+ }
3047
+ namespace Question {
3048
+ /**
3049
+ * For a probability. What counts as yes & as no.
3050
+ */
3051
+ interface Criteria {
3052
+ no: string;
3053
+ yes: string;
3054
+ }
3055
+ }
3056
+ interface Target {
3057
+ name: string;
3058
+ aliases?: Array<string>;
3059
+ }
3060
+ }
3061
+ interface Baseline {
3062
+ /**
3063
+ * The earlier answers by question ID.
3064
+ */
3065
+ answers: {
3066
+ [key: string]: string | number;
3067
+ };
3068
+ /**
3069
+ * Post ID, or text:1 & so on. Else tweet.id counts.
3070
+ */
3071
+ id?: string;
3072
+ /**
3073
+ * The earlier row's monitor, with its fingerprint.
3074
+ */
3075
+ monitor?: Baseline.Monitor;
3076
+ tweet?: Baseline.Tweet;
3077
+ }
3078
+ namespace Baseline {
3079
+ /**
3080
+ * The earlier row's monitor, with its fingerprint.
3081
+ */
3082
+ interface Monitor {
3083
+ configurationFingerprint?: string;
3084
+ }
3085
+ interface Tweet {
3086
+ id: string;
3087
+ }
3088
+ }
3089
+ }
3090
+ export interface AnalysisViralScoreParams {
3091
+ /**
3092
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3093
+ * out for the route's own questions.
3094
+ */
3095
+ analysis?: AnalysisViralScoreParams.Analysis;
3096
+ /**
3097
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
3098
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
3099
+ * as not_comparable. Each result's monitor says whether the post is new, changed
3100
+ * or unchanged. The comparison costs nothing extra.
3101
+ */
3102
+ baseline?: Array<AnalysisViralScoreParams.Baseline>;
3103
+ /**
3104
+ * The next_cursor of the page before. Send the same search with it.
3105
+ */
3106
+ cursor?: string;
3107
+ /**
3108
+ * Maximum posts to analyze from the search. Credits can return fewer.
3109
+ */
3110
+ limit?: number;
3111
+ /**
3112
+ * Analyze a public List's posts. Send its ID or URL.
3113
+ */
3114
+ listId?: string;
3115
+ /**
3116
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
3117
+ * or lang:en. X searches up to 512 characters, counted with the other search
3118
+ * fields, as /x/tweets/search counts q.
3119
+ */
3120
+ query?: string;
3121
+ /**
3122
+ * Search order. Default Latest.
3123
+ */
3124
+ queryType?: 'Latest' | 'Top';
3125
+ /**
3126
+ * Analyze the quotes of 1 post. Send its ID or URL.
3127
+ */
3128
+ quotesOf?: string;
3129
+ /**
3130
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
3131
+ */
3132
+ repliesTo?: string;
3133
+ /**
3134
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
3135
+ * work. A time without an offset is UTC.
3136
+ */
3137
+ sinceTime?: string | number;
3138
+ /**
3139
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
3140
+ * the same as 1 analyzed post.
3141
+ */
3142
+ texts?: Array<string>;
3143
+ /**
3144
+ * Post IDs or post URLs to analyze, up to 100.
3145
+ */
3146
+ tweetIds?: Array<string>;
3147
+ /**
3148
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
3149
+ * work. A time without an offset is UTC.
3150
+ */
3151
+ untilTime?: string | number;
3152
+ /**
3153
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
3154
+ */
3155
+ username?: string;
3156
+ }
3157
+ export declare namespace AnalysisViralScoreParams {
3158
+ /**
3159
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3160
+ * out for the route's own questions.
3161
+ */
3162
+ interface Analysis {
3163
+ /**
3164
+ * Posts analyzed at the same time.
3165
+ */
3166
+ concurrency?: number;
3167
+ /**
3168
+ * Background the AI reads with every post.
3169
+ */
3170
+ context?: string;
3171
+ /**
3172
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
3173
+ * settings take 219 bytes, so a smaller value gets a 400.
3174
+ */
3175
+ maxContextBytes?: number;
3176
+ /**
3177
+ * A ready set of questions, used when questions is left out. complaints,
3178
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
3179
+ * how viral the wording reads.
3180
+ */
3181
+ preset?: 'brand' | 'complaints' | 'competitors' | 'purchase_intent' | 'product_feedback' | 'news' | 'sentiment' | 'market' | 'viral_lite';
3182
+ /**
3183
+ * Your own questions, which replace the route's questions. Write question IDs &
3184
+ * category names in lower case without hyphens.
3185
+ */
3186
+ questions?: Array<Analysis.Question>;
3187
+ /**
3188
+ * Brands, people, assets or topics the questions are about, each with its aliases.
3189
+ */
3190
+ targets?: Array<Analysis.Target>;
3191
+ }
3192
+ namespace Analysis {
3193
+ /**
3194
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
3195
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
3196
+ * yes or no.
3197
+ */
3198
+ interface Question {
3199
+ /**
3200
+ * Name of the answer, such as request. A name the response renames or drops gets a
3201
+ * 400, such as created_at, favorite_count, muting or blocking.
3202
+ */
3203
+ id: string;
3204
+ /**
3205
+ * The question, as the AI reads it.
3206
+ */
3207
+ instructions: string;
3208
+ type: 'choice' | 'score' | 'probability';
3209
+ /**
3210
+ * Your version of the question, such as 1.
3211
+ */
3212
+ version: string;
3213
+ /**
3214
+ * For a choice. Each category name with its description, or null.
3215
+ */
3216
+ categories?: {
3217
+ [key: string]: string | null;
3218
+ };
3219
+ /**
3220
+ * For a probability. What counts as yes & as no.
3221
+ */
3222
+ criteria?: Question.Criteria;
3223
+ /**
3224
+ * For a score. Each level's description, lowest first.
3225
+ */
3226
+ levels?: Array<string>;
3227
+ }
3228
+ namespace Question {
3229
+ /**
3230
+ * For a probability. What counts as yes & as no.
3231
+ */
3232
+ interface Criteria {
3233
+ no: string;
3234
+ yes: string;
3235
+ }
3236
+ }
3237
+ interface Target {
3238
+ name: string;
3239
+ aliases?: Array<string>;
3240
+ }
3241
+ }
3242
+ interface Baseline {
3243
+ /**
3244
+ * The earlier answers by question ID.
3245
+ */
3246
+ answers: {
3247
+ [key: string]: string | number;
3248
+ };
3249
+ /**
3250
+ * Post ID, or text:1 & so on. Else tweet.id counts.
3251
+ */
3252
+ id?: string;
3253
+ /**
3254
+ * The earlier row's monitor, with its fingerprint.
3255
+ */
3256
+ monitor?: Baseline.Monitor;
3257
+ tweet?: Baseline.Tweet;
3258
+ }
3259
+ namespace Baseline {
3260
+ /**
3261
+ * The earlier row's monitor, with its fingerprint.
3262
+ */
3263
+ interface Monitor {
3264
+ configurationFingerprint?: string;
3265
+ }
3266
+ interface Tweet {
3267
+ id: string;
3268
+ }
3269
+ }
3270
+ }
3271
+ export declare namespace Analysis {
3272
+ export { type AnalysisBrandResponse as AnalysisBrandResponse, type AnalysisClassifyResponse as AnalysisClassifyResponse, type AnalysisMarketSignalsResponse as AnalysisMarketSignalsResponse, type AnalysisNewsResponse as AnalysisNewsResponse, type AnalysisSentimentResponse as AnalysisSentimentResponse, type AnalysisViralScoreResponse as AnalysisViralScoreResponse, type AnalysisBrandParams as AnalysisBrandParams, type AnalysisClassifyParams as AnalysisClassifyParams, type AnalysisMarketSignalsParams as AnalysisMarketSignalsParams, type AnalysisNewsParams as AnalysisNewsParams, type AnalysisSentimentParams as AnalysisSentimentParams, type AnalysisViralScoreParams as AnalysisViralScoreParams, };
3273
+ }
3274
+ //# sourceMappingURL=analysis.d.ts.map