x-twitter-scraper 0.20.0 → 0.22.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 (226) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +121 -122
  3. package/client.d.mts +9 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +9 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +2 -2
  8. package/client.js.map +1 -1
  9. package/client.mjs +2 -2
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/events.d.mts +8 -0
  13. package/resources/events.d.mts.map +1 -1
  14. package/resources/events.d.ts +8 -0
  15. package/resources/events.d.ts.map +1 -1
  16. package/resources/extractions.d.mts +105 -5
  17. package/resources/extractions.d.mts.map +1 -1
  18. package/resources/extractions.d.ts +105 -5
  19. package/resources/extractions.d.ts.map +1 -1
  20. package/resources/index.d.mts +1 -1
  21. package/resources/index.d.mts.map +1 -1
  22. package/resources/index.d.ts +1 -1
  23. package/resources/index.d.ts.map +1 -1
  24. package/resources/index.js.map +1 -1
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/monitors/index.d.mts +1 -1
  27. package/resources/monitors/index.d.mts.map +1 -1
  28. package/resources/monitors/index.d.ts +1 -1
  29. package/resources/monitors/index.d.ts.map +1 -1
  30. package/resources/monitors/index.js.map +1 -1
  31. package/resources/monitors/index.mjs.map +1 -1
  32. package/resources/monitors/monitors.d.mts +38 -1
  33. package/resources/monitors/monitors.d.mts.map +1 -1
  34. package/resources/monitors/monitors.d.ts +38 -1
  35. package/resources/monitors/monitors.d.ts.map +1 -1
  36. package/resources/monitors/monitors.js +18 -0
  37. package/resources/monitors/monitors.js.map +1 -1
  38. package/resources/monitors/monitors.mjs +18 -0
  39. package/resources/monitors/monitors.mjs.map +1 -1
  40. package/resources/monitors/posts.d.mts +27 -0
  41. package/resources/monitors/posts.d.mts.map +1 -1
  42. package/resources/monitors/posts.d.ts +27 -0
  43. package/resources/monitors/posts.d.ts.map +1 -1
  44. package/resources/shared.d.mts +192 -5
  45. package/resources/shared.d.mts.map +1 -1
  46. package/resources/shared.d.ts +192 -5
  47. package/resources/shared.d.ts.map +1 -1
  48. package/resources/x/account-connection-attempts.d.mts +4 -0
  49. package/resources/x/account-connection-attempts.d.mts.map +1 -1
  50. package/resources/x/account-connection-attempts.d.ts +4 -0
  51. package/resources/x/account-connection-attempts.d.ts.map +1 -1
  52. package/resources/x/account-connection-links.d.mts +159 -0
  53. package/resources/x/account-connection-links.d.mts.map +1 -0
  54. package/resources/x/account-connection-links.d.ts +159 -0
  55. package/resources/x/account-connection-links.d.ts.map +1 -0
  56. package/resources/x/account-connection-links.js +82 -0
  57. package/resources/x/account-connection-links.js.map +1 -0
  58. package/resources/x/account-connection-links.mjs +78 -0
  59. package/resources/x/account-connection-links.mjs.map +1 -0
  60. package/resources/x/accounts.d.mts +13 -9
  61. package/resources/x/accounts.d.mts.map +1 -1
  62. package/resources/x/accounts.d.ts +13 -9
  63. package/resources/x/accounts.d.ts.map +1 -1
  64. package/resources/x/analysis.d.mts +540 -36
  65. package/resources/x/analysis.d.mts.map +1 -1
  66. package/resources/x/analysis.d.ts +540 -36
  67. package/resources/x/analysis.d.ts.map +1 -1
  68. package/resources/x/bookmarks.d.mts +5 -0
  69. package/resources/x/bookmarks.d.mts.map +1 -1
  70. package/resources/x/bookmarks.d.ts +5 -0
  71. package/resources/x/bookmarks.d.ts.map +1 -1
  72. package/resources/x/communities/communities.d.mts +2 -2
  73. package/resources/x/communities/communities.d.mts.map +1 -1
  74. package/resources/x/communities/communities.d.ts +2 -2
  75. package/resources/x/communities/communities.d.ts.map +1 -1
  76. package/resources/x/communities/communities.js.map +1 -1
  77. package/resources/x/communities/communities.mjs.map +1 -1
  78. package/resources/x/communities/join.d.mts +2 -2
  79. package/resources/x/communities/join.d.mts.map +1 -1
  80. package/resources/x/communities/join.d.ts +2 -2
  81. package/resources/x/communities/join.d.ts.map +1 -1
  82. package/resources/x/dm.d.mts +2 -2
  83. package/resources/x/dm.d.mts.map +1 -1
  84. package/resources/x/dm.d.ts +2 -2
  85. package/resources/x/dm.d.ts.map +1 -1
  86. package/resources/x/index.d.mts +3 -2
  87. package/resources/x/index.d.mts.map +1 -1
  88. package/resources/x/index.d.ts +3 -2
  89. package/resources/x/index.d.ts.map +1 -1
  90. package/resources/x/index.js +3 -1
  91. package/resources/x/index.js.map +1 -1
  92. package/resources/x/index.mjs +1 -0
  93. package/resources/x/index.mjs.map +1 -1
  94. package/resources/x/media.d.mts +48 -1
  95. package/resources/x/media.d.mts.map +1 -1
  96. package/resources/x/media.d.ts +48 -1
  97. package/resources/x/media.d.ts.map +1 -1
  98. package/resources/x/media.js.map +1 -1
  99. package/resources/x/media.mjs.map +1 -1
  100. package/resources/x/profile.d.mts +3 -3
  101. package/resources/x/profile.d.mts.map +1 -1
  102. package/resources/x/profile.d.ts +3 -3
  103. package/resources/x/profile.d.ts.map +1 -1
  104. package/resources/x/sports.d.mts +19 -1
  105. package/resources/x/sports.d.mts.map +1 -1
  106. package/resources/x/sports.d.ts +19 -1
  107. package/resources/x/sports.d.ts.map +1 -1
  108. package/resources/x/tweets/bookmark.d.mts +84 -0
  109. package/resources/x/tweets/bookmark.d.mts.map +1 -0
  110. package/resources/x/tweets/bookmark.d.ts +84 -0
  111. package/resources/x/tweets/bookmark.d.ts.map +1 -0
  112. package/resources/x/tweets/bookmark.js +55 -0
  113. package/resources/x/tweets/bookmark.js.map +1 -0
  114. package/resources/x/tweets/bookmark.mjs +51 -0
  115. package/resources/x/tweets/bookmark.mjs.map +1 -0
  116. package/resources/x/tweets/index.d.mts +1 -0
  117. package/resources/x/tweets/index.d.mts.map +1 -1
  118. package/resources/x/tweets/index.d.ts +1 -0
  119. package/resources/x/tweets/index.d.ts.map +1 -1
  120. package/resources/x/tweets/index.js +3 -1
  121. package/resources/x/tweets/index.js.map +1 -1
  122. package/resources/x/tweets/index.mjs +1 -0
  123. package/resources/x/tweets/index.mjs.map +1 -1
  124. package/resources/x/tweets/like.d.mts +2 -2
  125. package/resources/x/tweets/like.d.mts.map +1 -1
  126. package/resources/x/tweets/like.d.ts +2 -2
  127. package/resources/x/tweets/like.d.ts.map +1 -1
  128. package/resources/x/tweets/retweet.d.mts +2 -2
  129. package/resources/x/tweets/retweet.d.mts.map +1 -1
  130. package/resources/x/tweets/retweet.d.ts +2 -2
  131. package/resources/x/tweets/retweet.d.ts.map +1 -1
  132. package/resources/x/tweets/tweets.d.mts +45 -13
  133. package/resources/x/tweets/tweets.d.mts.map +1 -1
  134. package/resources/x/tweets/tweets.d.ts +45 -13
  135. package/resources/x/tweets/tweets.d.ts.map +1 -1
  136. package/resources/x/tweets/tweets.js +4 -0
  137. package/resources/x/tweets/tweets.js.map +1 -1
  138. package/resources/x/tweets/tweets.mjs +4 -0
  139. package/resources/x/tweets/tweets.mjs.map +1 -1
  140. package/resources/x/users/block.d.mts +84 -0
  141. package/resources/x/users/block.d.mts.map +1 -0
  142. package/resources/x/users/block.d.ts +84 -0
  143. package/resources/x/users/block.d.ts.map +1 -0
  144. package/resources/x/users/block.js +55 -0
  145. package/resources/x/users/block.js.map +1 -0
  146. package/resources/x/users/block.mjs +51 -0
  147. package/resources/x/users/block.mjs.map +1 -0
  148. package/resources/x/users/follow.d.mts +2 -2
  149. package/resources/x/users/follow.d.mts.map +1 -1
  150. package/resources/x/users/follow.d.ts +2 -2
  151. package/resources/x/users/follow.d.ts.map +1 -1
  152. package/resources/x/users/index.d.mts +3 -1
  153. package/resources/x/users/index.d.mts.map +1 -1
  154. package/resources/x/users/index.d.ts +3 -1
  155. package/resources/x/users/index.d.ts.map +1 -1
  156. package/resources/x/users/index.js +5 -1
  157. package/resources/x/users/index.js.map +1 -1
  158. package/resources/x/users/index.mjs +2 -0
  159. package/resources/x/users/index.mjs.map +1 -1
  160. package/resources/x/users/mute.d.mts +84 -0
  161. package/resources/x/users/mute.d.mts.map +1 -0
  162. package/resources/x/users/mute.d.ts +84 -0
  163. package/resources/x/users/mute.d.ts.map +1 -0
  164. package/resources/x/users/mute.js +55 -0
  165. package/resources/x/users/mute.js.map +1 -0
  166. package/resources/x/users/mute.mjs +51 -0
  167. package/resources/x/users/mute.mjs.map +1 -0
  168. package/resources/x/users/users.d.mts +359 -9
  169. package/resources/x/users/users.d.mts.map +1 -1
  170. package/resources/x/users/users.d.ts +359 -9
  171. package/resources/x/users/users.d.ts.map +1 -1
  172. package/resources/x/users/users.js +27 -1
  173. package/resources/x/users/users.js.map +1 -1
  174. package/resources/x/users/users.mjs +27 -1
  175. package/resources/x/users/users.mjs.map +1 -1
  176. package/resources/x/write-actions.d.mts +1 -1
  177. package/resources/x/write-actions.d.mts.map +1 -1
  178. package/resources/x/write-actions.d.ts +1 -1
  179. package/resources/x/write-actions.d.ts.map +1 -1
  180. package/resources/x/x.d.mts +17 -4
  181. package/resources/x/x.d.mts.map +1 -1
  182. package/resources/x/x.d.ts +17 -4
  183. package/resources/x/x.d.ts.map +1 -1
  184. package/resources/x/x.js +4 -0
  185. package/resources/x/x.js.map +1 -1
  186. package/resources/x/x.mjs +4 -0
  187. package/resources/x/x.mjs.map +1 -1
  188. package/src/client.ts +12 -2
  189. package/src/core/README.md +4 -0
  190. package/src/internal/README.md +6 -1
  191. package/src/resources/events.ts +10 -0
  192. package/src/resources/extractions.ts +125 -0
  193. package/src/resources/index.ts +2 -0
  194. package/src/resources/monitors/index.ts +2 -0
  195. package/src/resources/monitors/monitors.ts +49 -0
  196. package/src/resources/monitors/posts.ts +32 -0
  197. package/src/resources/shared.ts +223 -4
  198. package/src/resources/x/account-connection-attempts.ts +5 -0
  199. package/src/resources/x/account-connection-links.ts +215 -0
  200. package/src/resources/x/accounts.ts +15 -14
  201. package/src/resources/x/analysis.ts +618 -36
  202. package/src/resources/x/bookmarks.ts +6 -0
  203. package/src/resources/x/communities/communities.ts +12 -0
  204. package/src/resources/x/communities/join.ts +12 -0
  205. package/src/resources/x/dm.ts +12 -0
  206. package/src/resources/x/index.ts +16 -0
  207. package/src/resources/x/media.ts +64 -0
  208. package/src/resources/x/profile.ts +18 -0
  209. package/src/resources/x/sports.ts +22 -0
  210. package/src/resources/x/tweets/bookmark.ts +127 -0
  211. package/src/resources/x/tweets/index.ts +7 -0
  212. package/src/resources/x/tweets/like.ts +12 -0
  213. package/src/resources/x/tweets/retweet.ts +12 -0
  214. package/src/resources/x/tweets/tweets.ts +74 -10
  215. package/src/resources/x/users/block.ts +119 -0
  216. package/src/resources/x/users/follow.ts +12 -0
  217. package/src/resources/x/users/index.ts +20 -0
  218. package/src/resources/x/users/mute.ts +119 -0
  219. package/src/resources/x/users/users.ts +470 -7
  220. package/src/resources/x/write-actions.ts +6 -0
  221. package/src/resources/x/x.ts +50 -0
  222. package/src/version.ts +1 -1
  223. package/version.d.mts +1 -1
  224. package/version.d.ts +1 -1
  225. package/version.js +1 -1
  226. package/version.mjs +1 -1
@@ -4,6 +4,14 @@
4
4
 
5
5
  import { APIResource } from '../../../core/resource';
6
6
  import * as Shared from '../../shared';
7
+ import * as BlockAPI from './block';
8
+ import {
9
+ Block,
10
+ BlockCreateParams,
11
+ BlockCreateResponse,
12
+ BlockDeleteParams,
13
+ BlockDeleteResponse,
14
+ } from './block';
7
15
  import * as FollowAPI from './follow';
8
16
  import {
9
17
  Follow,
@@ -12,13 +20,17 @@ import {
12
20
  FollowDeleteAllParams,
13
21
  FollowDeleteAllResponse,
14
22
  } from './follow';
23
+ import * as MuteAPI from './mute';
24
+ import { Mute, MuteCreateParams, MuteCreateResponse, MuteDeleteParams, MuteDeleteResponse } from './mute';
15
25
  import { APIPromise } from '../../../core/api-promise';
16
26
  import { buildHeaders } from '../../../internal/headers';
17
27
  import { RequestOptions } from '../../../internal/request-options';
18
28
  import { path } from '../../../internal/utils/path';
19
29
 
20
30
  export class Users extends APIResource {
31
+ block: BlockAPI.Block = new BlockAPI.Block(this._client);
21
32
  follow: FollowAPI.Follow = new FollowAPI.Follow(this._client);
33
+ mute: MuteAPI.Mute = new MuteAPI.Mute(this._client);
22
34
 
23
35
  /**
24
36
  * Returns one public profile with counts and verification details.
@@ -130,6 +142,29 @@ export class Users extends APIResource {
130
142
  return this._client.get('/x/users/batch/tweets', { query, ...options });
131
143
  }
132
144
 
145
+ /**
146
+ * Reads the newest followers of a public account & returns a follower audit. It
147
+ * gives each follower 1 class with its score & signals, then adds coverage, a
148
+ * quality score, signal counts, arrival bands, join cohorts, countries, top
149
+ * followers & the account's engagement. Each follower read costs 1 credit, and the
150
+ * engagement adds 1 credit. Signals come from public profiles, so a real person
151
+ * can match. Older followers may differ from the newest ones.
152
+ *
153
+ * @example
154
+ * ```ts
155
+ * const response = await client.x.users.retrieveFollowerAudit(
156
+ * 'id',
157
+ * );
158
+ * ```
159
+ */
160
+ retrieveFollowerAudit(
161
+ id: string,
162
+ query: UserRetrieveFollowerAuditParams | null | undefined = {},
163
+ options?: RequestOptions,
164
+ ): APIPromise<UserRetrieveFollowerAuditResponse> {
165
+ return this._client.get(path`/x/users/${id}/follower-audit`, { query, ...options });
166
+ }
167
+
133
168
  /**
134
169
  * Returns the user IDs of the selected user's followers, newest first, up to 5,000
135
170
  * a page. Use it when you need IDs only. Each ID costs 1 credit.
@@ -242,7 +277,7 @@ export class Users extends APIResource {
242
277
 
243
278
  /**
244
279
  * Returns engagement insights for one profile: engagement rate, averages per post
245
- * and posting rate, from its counts and its last 20 posts. Reposts and the pinned
280
+ * and posting rate, from its counts and its most recent posts. It reads 20 posts unless limit names another number. Reposts and the pinned
246
281
  * post stay out of the averages. Each report costs 1 credit, whatever it reads.
247
282
  *
248
283
  * @example
@@ -347,7 +382,7 @@ export class Users extends APIResource {
347
382
  id: string,
348
383
  query: UserRetrieveMediaParams | null | undefined = {},
349
384
  options?: RequestOptions,
350
- ): APIPromise<Shared.PaginatedTweets> {
385
+ ): APIPromise<Shared.FilterablePaginatedTweets> {
351
386
  return this._client.get(path`/x/users/${id}/media`, { query, ...options });
352
387
  }
353
388
 
@@ -383,7 +418,7 @@ export class Users extends APIResource {
383
418
  id: string,
384
419
  query: UserRetrieveRepliesParams | null | undefined = {},
385
420
  options?: RequestOptions,
386
- ): APIPromise<Shared.PaginatedTweets> {
421
+ ): APIPromise<Shared.FilterablePaginatedTweets> {
387
422
  return this._client.get(path`/x/users/${id}/replies`, { query, ...options });
388
423
  }
389
424
 
@@ -481,7 +516,7 @@ export class Users extends APIResource {
481
516
  id: string,
482
517
  query: UserRetrieveTweetsParams | null | undefined = {},
483
518
  options?: RequestOptions,
484
- ): APIPromise<Shared.PaginatedTweets> {
519
+ ): APIPromise<Shared.FilterablePaginatedTweets> {
485
520
  return this._client.get(path`/x/users/${id}/tweets`, { query, ...options });
486
521
  }
487
522
 
@@ -543,8 +578,14 @@ export interface UserRemoveFollowerResponse {
543
578
  | 'unlike'
544
579
  | 'retweet'
545
580
  | 'unretweet'
581
+ | 'bookmark'
582
+ | 'unbookmark'
546
583
  | 'follow'
547
584
  | 'unfollow'
585
+ | 'block'
586
+ | 'unblock'
587
+ | 'mute'
588
+ | 'unmute'
548
589
  | 'remove_follower'
549
590
  | 'send_dm'
550
591
  | 'delete_dm'
@@ -795,6 +836,12 @@ export interface UserRetrieveBatchResponse {
795
836
  */
796
837
  next_cursor: string;
797
838
 
839
+ /**
840
+ * The unavailable IDs no account holds, as X answers for an account that was
841
+ * deactivated or deleted, in first-seen request order.
842
+ */
843
+ not_found_ids: Array<string>;
844
+
798
845
  /**
799
846
  * Number of requested IDs included in the lookup.
800
847
  */
@@ -811,7 +858,13 @@ export interface UserRetrieveBatchResponse {
811
858
  returned_count: number;
812
859
 
813
860
  /**
814
- * Processed IDs with no profile on X, in first-seen request order.
861
+ * The unavailable IDs of accounts X suspended, in first-seen request order.
862
+ */
863
+ suspended_ids: Array<string>;
864
+
865
+ /**
866
+ * Processed IDs with no profile on X, in first-seen request order. not_found_ids
867
+ * and suspended_ids split them by X's answer.
815
868
  */
816
869
  unavailable_ids: Array<string>;
817
870
 
@@ -845,11 +898,29 @@ export interface UserRetrieveBatchTweetsResponse {
845
898
  */
846
899
  next_cursor: string;
847
900
 
901
+ /**
902
+ * The unavailable users no account holds, as X answers for an account that was
903
+ * deactivated or deleted, in first-seen request order.
904
+ */
905
+ not_found_ids: Array<string>;
906
+
907
+ /**
908
+ * The unavailable users whose posts only approved followers see, in first-seen
909
+ * request order.
910
+ */
911
+ protected_ids: Array<string>;
912
+
913
+ /**
914
+ * The unavailable users X suspended, in first-seen request order.
915
+ */
916
+ suspended_ids: Array<string>;
917
+
848
918
  tweets: Array<Shared.SearchTweet>;
849
919
 
850
920
  /**
851
921
  * Users with no account on X or with protected posts, in first-seen request order.
852
- * They cost nothing.
922
+ * They cost nothing. not_found_ids, suspended_ids and protected_ids split them by
923
+ * X's answer.
853
924
  */
854
925
  unavailable_ids: Array<string>;
855
926
 
@@ -860,6 +931,266 @@ export interface UserRetrieveBatchTweetsResponse {
860
931
  unprocessed_ids: Array<string>;
861
932
  }
862
933
 
934
+ export interface UserRetrieveFollowerAuditResponse {
935
+ /**
936
+ * Report on the followers read. Classes rest on public profile signals, so they
937
+ * say what a profile looks like, never who runs it.
938
+ */
939
+ audit: FollowerAudit;
940
+ }
941
+
942
+ /**
943
+ * Report on the followers read. Classes rest on public profile signals, so they say
944
+ * what a profile looks like, never who runs it.
945
+ */
946
+ export interface FollowerAudit {
947
+ /**
948
+ * The audited account's engagement insights.
949
+ */
950
+ account: UserRetrieveInsightsResponse.Insights;
951
+
952
+ /**
953
+ * Likely fake share by position in the newest-first list.
954
+ */
955
+ arrivalBands: Array<FollowerAudit.ArrivalBand>;
956
+
957
+ /**
958
+ * How many followers fall in each class.
959
+ */
960
+ classes: Array<FollowerAudit.Class>;
961
+
962
+ /**
963
+ * Followers who joined X in the same UTC week.
964
+ */
965
+ cohorts: Array<FollowerAudit.Cohort>;
966
+
967
+ /**
968
+ * How many of the account's followers the audit read.
969
+ */
970
+ coverage: FollowerAudit.Coverage;
971
+
972
+ /**
973
+ * Each follower the audit read, newest first.
974
+ */
975
+ followers: Array<AuditedFollower>;
976
+
977
+ /**
978
+ * How many followers share each profile language.
979
+ */
980
+ languages: Array<FollowerValueCount>;
981
+
982
+ /**
983
+ * How many followers share each profile place.
984
+ */
985
+ places: Array<FollowerValueCount>;
986
+
987
+ /**
988
+ * The audit's grade & score for the followers read.
989
+ */
990
+ quality: FollowerAudit.Quality;
991
+
992
+ /**
993
+ * How many followers match each signal & the points it adds.
994
+ */
995
+ signals: Array<FollowerAudit.Signal>;
996
+
997
+ /**
998
+ * The followers the audit ranks highest.
999
+ */
1000
+ topFollowers: Array<AuditedFollower>;
1001
+
1002
+ /**
1003
+ * How many followers are verified.
1004
+ */
1005
+ verified: FollowerAudit.Verified;
1006
+ }
1007
+
1008
+ export namespace FollowerAudit {
1009
+ export interface ArrivalBand {
1010
+ /**
1011
+ * Whole number from 0.
1012
+ */
1013
+ count: number;
1014
+
1015
+ /**
1016
+ * Whole number from 0.
1017
+ */
1018
+ from: number;
1019
+
1020
+ percent: number;
1021
+
1022
+ /**
1023
+ * Whole number from 0.
1024
+ */
1025
+ read: number;
1026
+
1027
+ /**
1028
+ * Whole number from 0.
1029
+ */
1030
+ to: number;
1031
+ }
1032
+
1033
+ export interface Class {
1034
+ /**
1035
+ * What 1 follower looks like from its public profile.
1036
+ */
1037
+ class: FollowerClass;
1038
+
1039
+ /**
1040
+ * Whole number from 0.
1041
+ */
1042
+ count: number;
1043
+
1044
+ percent: number;
1045
+ }
1046
+
1047
+ export interface Cohort {
1048
+ /**
1049
+ * Whole number from 0.
1050
+ */
1051
+ count: number;
1052
+
1053
+ /**
1054
+ * Followers in the cohort the audit classes as likelyFake. Whole number from 0.
1055
+ */
1056
+ likelyFake: number;
1057
+
1058
+ percent: number;
1059
+
1060
+ /**
1061
+ * Start of the UTC week, in milliseconds since the Unix epoch.
1062
+ */
1063
+ weekStartMs: number;
1064
+ }
1065
+
1066
+ export interface Coverage {
1067
+ percent: number;
1068
+
1069
+ /**
1070
+ * Whole number from 0.
1071
+ */
1072
+ read: number;
1073
+
1074
+ /**
1075
+ * Whole number from 0.
1076
+ */
1077
+ total: number;
1078
+ }
1079
+
1080
+ export interface Quality {
1081
+ grade: 'A' | 'B' | 'C' | 'D' | 'F';
1082
+
1083
+ /**
1084
+ * Whole number from 0 to 100.
1085
+ */
1086
+ score: number;
1087
+ }
1088
+
1089
+ export interface Signal {
1090
+ /**
1091
+ * Whole number from 0.
1092
+ */
1093
+ count: number;
1094
+
1095
+ id: string;
1096
+
1097
+ percent: number;
1098
+
1099
+ /**
1100
+ * Whole number from 0.
1101
+ */
1102
+ points: number;
1103
+ }
1104
+
1105
+ export interface Verified {
1106
+ /**
1107
+ * Whole number from 0.
1108
+ */
1109
+ count: number;
1110
+
1111
+ percent: number;
1112
+ }
1113
+ }
1114
+
1115
+ /**
1116
+ * 1 follower the audit read, with its class, score & signals.
1117
+ */
1118
+ export interface AuditedFollower {
1119
+ id: string;
1120
+
1121
+ /**
1122
+ * What 1 follower looks like from its public profile.
1123
+ */
1124
+ class: FollowerClass;
1125
+
1126
+ /**
1127
+ * Whole number from 0.
1128
+ */
1129
+ followers: number;
1130
+
1131
+ /**
1132
+ * Whole number from 0.
1133
+ */
1134
+ following: number;
1135
+
1136
+ /**
1137
+ * Whole number from 0.
1138
+ */
1139
+ likes: number;
1140
+
1141
+ name: string;
1142
+
1143
+ /**
1144
+ * The follower's place in the newest-first list. Whole number from 0.
1145
+ */
1146
+ position: number;
1147
+
1148
+ /**
1149
+ * Whole number from 0.
1150
+ */
1151
+ posts: number;
1152
+
1153
+ /**
1154
+ * Whole number from 0.
1155
+ */
1156
+ score: number;
1157
+
1158
+ signals: Array<string>;
1159
+
1160
+ userName: string;
1161
+
1162
+ /**
1163
+ * When the follower joined X, in milliseconds since the Unix epoch.
1164
+ */
1165
+ joinedAtMs?: number;
1166
+
1167
+ /**
1168
+ * Account that runs an automated follower, when X names it.
1169
+ */
1170
+ owner?: string;
1171
+
1172
+ pictureUrl?: string;
1173
+ }
1174
+
1175
+ /**
1176
+ * What 1 follower looks like from its public profile.
1177
+ */
1178
+ export type FollowerClass = 'automated' | 'inactive' | 'likelyFake' | 'likelyReal' | 'tooNew';
1179
+
1180
+ /**
1181
+ * How many followers share 1 value, such as a language or place.
1182
+ */
1183
+ export interface FollowerValueCount {
1184
+ /**
1185
+ * Whole number from 0.
1186
+ */
1187
+ count: number;
1188
+
1189
+ percent: number;
1190
+
1191
+ value: string;
1192
+ }
1193
+
863
1194
  export type UserRetrieveFollowerIDsResponse = Shared.PaginatedUserIds;
864
1195
 
865
1196
  /**
@@ -1244,9 +1575,15 @@ export namespace UserRetrieveInsightsResponse {
1244
1575
  oldestAt: string | null;
1245
1576
 
1246
1577
  /**
1247
- * Posts read.
1578
+ * Posts the averages used. Reposts and the pinned post stay out, so this can be
1579
+ * lower than `read`.
1248
1580
  */
1249
1581
  posts: number;
1582
+
1583
+ /**
1584
+ * Posts read, reposts and the pinned post included.
1585
+ */
1586
+ read: number;
1250
1587
  }
1251
1588
  }
1252
1589
  }
@@ -2759,6 +3096,32 @@ export interface UserRetrieveBatchTweetsParams {
2759
3096
  usernames?: string;
2760
3097
  }
2761
3098
 
3099
+ export interface UserRetrieveFollowerAuditParams {
3100
+ /**
3101
+ * Fields to keep in each row, comma-separated. Use dots for nested fields, such as
3102
+ * author.username. A list keeps the field in each item. Case & underscores do not
3103
+ * matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
3104
+ * always stay. An unknown name answers 400 unknown_field with the valid names,
3105
+ * before any read. The price stays the same. SDK row types then hold only the
3106
+ * named fields.
3107
+ */
3108
+ fields?: string;
3109
+
3110
+ /**
3111
+ * Most followers to read, newest first. Left out, a read takes up to 200 and a low
3112
+ * balance reads fewer. A very long read returns what it finished, & coverage shows
3113
+ * how many. Its aliases are pageSize, count, max_results, maxItems, max_items &
3114
+ * per_page.
3115
+ */
3116
+ limit?: number;
3117
+
3118
+ /**
3119
+ * Fields to drop from each row, comma-separated. It takes the same names as
3120
+ * fields. With fields, it drops from the kept fields.
3121
+ */
3122
+ omit?: string;
3123
+ }
3124
+
2762
3125
  export interface UserRetrieveFollowerIDsParams {
2763
3126
  /**
2764
3127
  * Pagination cursor for collection results. Also read as next_cursor, next_token,
@@ -3446,6 +3809,13 @@ export interface UserRetrieveInsightsParams {
3446
3809
  */
3447
3810
  fields?: string;
3448
3811
 
3812
+ /**
3813
+ * Recent posts to read for the averages and rates. The read stops at this count,
3814
+ * at the end of the timeline or after about 40 seconds, and `sample.posts` says
3815
+ * how many it read.
3816
+ */
3817
+ limit?: number;
3818
+
3449
3819
  /**
3450
3820
  * Fields to drop from each row, comma-separated. It takes the same names as
3451
3821
  * fields. With fields, it drops from the kept fields.
@@ -3864,6 +4234,16 @@ export interface UserRetrieveMediaParams {
3864
4234
  */
3865
4235
  hashtags?: string;
3866
4236
 
4237
+ /**
4238
+ * Keep only posts whose photos show this. Send charts, screenshots, product_photos,
4239
+ * memes or people, or describe it in words, such as a rocket. AI-powered analysis
4240
+ * checks posts with photos X doesn't mark sensitive & keeps scores of 0.5 or more.
4241
+ * Other posts stay out at no charge. Each kept post costs 2 credits, the AI analysis
4242
+ * price, instead of the read price, & a post the filter drops costs nothing.
4243
+ * imageFilter states the cutoff & counts.
4244
+ */
4245
+ imageShows?: string;
4246
+
3867
4247
  /**
3868
4248
  * Only replies to this tweet ID.
3869
4249
  */
@@ -4017,6 +4397,15 @@ export interface UserRetrieveMediaParams {
4017
4397
  */
4018
4398
  source?: string;
4019
4399
 
4400
+ /**
4401
+ * Keep only posts about this topic. AI-powered analysis asks "Is this post about
4402
+ * <topic>?" of each post & keeps scores of 0.5 or more. It reads post text & safe
4403
+ * photos. Each kept post costs 2 credits, the AI analysis price, instead of the read
4404
+ * price, & a post the filter drops costs nothing. limit counts checked posts, & only
4405
+ * kept posts come back. topicFilter states the cutoff & counts.
4406
+ */
4407
+ topic?: string;
4408
+
4020
4409
  /**
4021
4410
  * Filter replies sent to a username.
4022
4411
  */
@@ -4223,6 +4612,12 @@ export interface UserRetrieveMentionsParams {
4223
4612
  */
4224
4613
  omit?: string;
4225
4614
 
4615
+ /**
4616
+ * With replies=exclude, also leaves out replies to the author's own posts, so the
4617
+ * search skips every reply.
4618
+ */
4619
+ ownThreads?: 'exclude';
4620
+
4226
4621
  /**
4227
4622
  * Items per page (1-100, default 20). Source, filters or credits can return fewer.
4228
4623
  * Follow next_cursor for more pages. Aliases: limit, count, max_results, maxItems,
@@ -4406,6 +4801,16 @@ export interface UserRetrieveRepliesParams {
4406
4801
  */
4407
4802
  hashtags?: string;
4408
4803
 
4804
+ /**
4805
+ * Keep only posts whose photos show this. Send charts, screenshots, product_photos,
4806
+ * memes or people, or describe it in words, such as a rocket. AI-powered analysis
4807
+ * checks posts with photos X doesn't mark sensitive & keeps scores of 0.5 or more.
4808
+ * Other posts stay out at no charge. Each kept post costs 2 credits, the AI analysis
4809
+ * price, instead of the read price, & a post the filter drops costs nothing.
4810
+ * imageFilter states the cutoff & counts.
4811
+ */
4812
+ imageShows?: string;
4813
+
4409
4814
  /**
4410
4815
  * Include each reply's parent tweet as parentTweet on the reply. A reply whose
4411
4816
  * parent X does not return comes without it. Search-only filters such as keywords
@@ -4604,6 +5009,15 @@ export interface UserRetrieveRepliesParams {
4604
5009
  */
4605
5010
  source?: string;
4606
5011
 
5012
+ /**
5013
+ * Keep only posts about this topic. AI-powered analysis asks "Is this post about
5014
+ * <topic>?" of each post & keeps scores of 0.5 or more. It reads post text & safe
5015
+ * photos. Each kept post costs 2 credits, the AI analysis price, instead of the read
5016
+ * price, & a post the filter drops costs nothing. limit counts checked posts, & only
5017
+ * kept posts come back. topicFilter states the cutoff & counts.
5018
+ */
5019
+ topic?: string;
5020
+
4607
5021
  /**
4608
5022
  * Filter replies sent to a username.
4609
5023
  */
@@ -4788,6 +5202,12 @@ export interface UserRetrieveShadowbanParams {
4788
5202
  */
4789
5203
  fields?: string;
4790
5204
 
5205
+ /**
5206
+ * Recent posts to read for the timeline, engagement & reply checks. The read stops
5207
+ * at this count, at the end of the timeline or after about 40 seconds.
5208
+ */
5209
+ limit?: number;
5210
+
4791
5211
  /**
4792
5212
  * Fields to drop from each row, comma-separated. It takes the same names as
4793
5213
  * fields. With fields, it drops from the kept fields.
@@ -5128,6 +5548,16 @@ export interface UserRetrieveTweetsParams {
5128
5548
  */
5129
5549
  hashtags?: string;
5130
5550
 
5551
+ /**
5552
+ * Keep only posts whose photos show this. Send charts, screenshots, product_photos,
5553
+ * memes or people, or describe it in words, such as a rocket. AI-powered analysis
5554
+ * checks posts with photos X doesn't mark sensitive & keeps scores of 0.5 or more.
5555
+ * Other posts stay out at no charge. Each kept post costs 2 credits, the AI analysis
5556
+ * price, instead of the read price, & a post the filter drops costs nothing.
5557
+ * imageFilter states the cutoff & counts.
5558
+ */
5559
+ imageShows?: string;
5560
+
5131
5561
  /**
5132
5562
  * Include each reply's parent tweet as parentTweet on the reply. A reply whose
5133
5563
  * parent X does not return comes without it. Search-only filters such as keywords
@@ -5331,6 +5761,15 @@ export interface UserRetrieveTweetsParams {
5331
5761
  */
5332
5762
  source?: string;
5333
5763
 
5764
+ /**
5765
+ * Keep only posts about this topic. AI-powered analysis asks "Is this post about
5766
+ * <topic>?" of each post & keeps scores of 0.5 or more. It reads post text & safe
5767
+ * photos. Each kept post costs 2 credits, the AI analysis price, instead of the read
5768
+ * price, & a post the filter drops costs nothing. limit counts checked posts, & only
5769
+ * kept posts come back. topicFilter states the cutoff & counts.
5770
+ */
5771
+ topic?: string;
5772
+
5334
5773
  /**
5335
5774
  * Filter replies sent to a username.
5336
5775
  */
@@ -5549,13 +5988,20 @@ export interface UserTranslateBioParams {
5549
5988
  omit?: string;
5550
5989
  }
5551
5990
 
5991
+ Users.Block = Block;
5552
5992
  Users.Follow = Follow;
5993
+ Users.Mute = Mute;
5553
5994
 
5554
5995
  export declare namespace Users {
5555
5996
  export {
5556
5997
  type UserRemoveFollowerResponse as UserRemoveFollowerResponse,
5557
5998
  type UserRetrieveBatchResponse as UserRetrieveBatchResponse,
5558
5999
  type UserRetrieveBatchTweetsResponse as UserRetrieveBatchTweetsResponse,
6000
+ type UserRetrieveFollowerAuditResponse as UserRetrieveFollowerAuditResponse,
6001
+ type FollowerAudit as FollowerAudit,
6002
+ type AuditedFollower as AuditedFollower,
6003
+ type FollowerClass as FollowerClass,
6004
+ type FollowerValueCount as FollowerValueCount,
5559
6005
  type UserRetrieveFollowerIDsResponse as UserRetrieveFollowerIDsResponse,
5560
6006
  type UserRetrieveFollowersResponse as UserRetrieveFollowersResponse,
5561
6007
  type UserRetrieveFollowingResponse as UserRetrieveFollowingResponse,
@@ -5574,6 +6020,7 @@ export declare namespace Users {
5574
6020
  type UserRetrieveArticlesParams as UserRetrieveArticlesParams,
5575
6021
  type UserRetrieveBatchParams as UserRetrieveBatchParams,
5576
6022
  type UserRetrieveBatchTweetsParams as UserRetrieveBatchTweetsParams,
6023
+ type UserRetrieveFollowerAuditParams as UserRetrieveFollowerAuditParams,
5577
6024
  type UserRetrieveFollowerIDsParams as UserRetrieveFollowerIDsParams,
5578
6025
  type UserRetrieveFollowersParams as UserRetrieveFollowersParams,
5579
6026
  type UserRetrieveFollowersYouKnowParams as UserRetrieveFollowersYouKnowParams,
@@ -5597,6 +6044,14 @@ export declare namespace Users {
5597
6044
  type UserTranslateBioParams as UserTranslateBioParams,
5598
6045
  };
5599
6046
 
6047
+ export {
6048
+ Block as Block,
6049
+ type BlockCreateResponse as BlockCreateResponse,
6050
+ type BlockDeleteResponse as BlockDeleteResponse,
6051
+ type BlockCreateParams as BlockCreateParams,
6052
+ type BlockDeleteParams as BlockDeleteParams,
6053
+ };
6054
+
5600
6055
  export {
5601
6056
  Follow as Follow,
5602
6057
  type FollowCreateResponse as FollowCreateResponse,
@@ -5604,4 +6059,12 @@ export declare namespace Users {
5604
6059
  type FollowCreateParams as FollowCreateParams,
5605
6060
  type FollowDeleteAllParams as FollowDeleteAllParams,
5606
6061
  };
6062
+
6063
+ export {
6064
+ Mute as Mute,
6065
+ type MuteCreateResponse as MuteCreateResponse,
6066
+ type MuteDeleteResponse as MuteDeleteResponse,
6067
+ type MuteCreateParams as MuteCreateParams,
6068
+ type MuteDeleteParams as MuteDeleteParams,
6069
+ };
5607
6070
  }
@@ -46,8 +46,14 @@ export interface WriteActionRetrieveResponse {
46
46
  | 'unlike'
47
47
  | 'retweet'
48
48
  | 'unretweet'
49
+ | 'bookmark'
50
+ | 'unbookmark'
49
51
  | 'follow'
50
52
  | 'unfollow'
53
+ | 'block'
54
+ | 'unblock'
55
+ | 'mute'
56
+ | 'unmute'
51
57
  | 'remove_follower'
52
58
  | 'send_dm'
53
59
  | 'delete_dm'