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
package/resources/x/x.mjs CHANGED
@@ -4,6 +4,8 @@
4
4
  import { APIResource } from "../../core/resource.mjs";
5
5
  import * as AccountConnectionAttemptsAPI from "./account-connection-attempts.mjs";
6
6
  import { AccountConnectionAttempts, } from "./account-connection-attempts.mjs";
7
+ import * as AccountConnectionLinksAPI from "./account-connection-links.mjs";
8
+ import { AccountConnectionLinks, } from "./account-connection-links.mjs";
7
9
  import * as AccountConnectionChallengesAPI from "./account-connection-challenges.mjs";
8
10
  import { AccountConnectionChallenges, } from "./account-connection-challenges.mjs";
9
11
  import * as AccountsAPI from "./accounts.mjs";
@@ -57,6 +59,7 @@ export class X extends APIResource {
57
59
  this.accounts = new AccountsAPI.Accounts(this._client);
58
60
  this.accountConnectionChallenges = new AccountConnectionChallengesAPI.AccountConnectionChallenges(this._client);
59
61
  this.accountConnectionAttempts = new AccountConnectionAttemptsAPI.AccountConnectionAttempts(this._client);
62
+ this.accountConnectionLinks = new AccountConnectionLinksAPI.AccountConnectionLinks(this._client);
60
63
  this.bookmarks = new BookmarksAPI.Bookmarks(this._client);
61
64
  this.lists = new ListsAPI.Lists(this._client);
62
65
  this.broadcasts = new BroadcastsAPI.Broadcasts(this._client);
@@ -216,6 +219,7 @@ X.Communities = Communities;
216
219
  X.Accounts = Accounts;
217
220
  X.AccountConnectionChallenges = AccountConnectionChallenges;
218
221
  X.AccountConnectionAttempts = AccountConnectionAttempts;
222
+ X.AccountConnectionLinks = AccountConnectionLinks;
219
223
  X.Bookmarks = Bookmarks;
220
224
  X.Lists = Lists;
221
225
  X.Broadcasts = Broadcasts;
@@ -1 +1 @@
1
- {"version":3,"file":"x.mjs","sourceRoot":"","sources":["../../src/resources/x/x.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,4BAA4B,0CAAsC;AAC9E,OAAO,EAEL,yBAAyB,GAC1B,0CAAsC;AACvC,OAAO,KAAK,8BAA8B,4CAAwC;AAClF,OAAO,EAGL,2BAA2B,GAC5B,4CAAwC;AACzC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAUL,QAAQ,GAGT,uBAAmB;AACpB,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EACL,QAAQ,GAaT,uBAAmB;AACpB,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAIL,SAAS,GACV,wBAAoB;AACrB,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAAO,EAAsD,UAAU,EAAE,yBAAqB;AAC9F,OAAO,KAAK,iBAAiB,8BAA0B;AACvD,OAAO,EAOL,cAAc,GAIf,8BAA0B;AAC3B,OAAO,KAAK,KAAK,iBAAa;AAC9B,OAAO,EACL,EAAE,GAOH,iBAAa;AACd,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAA8C,SAAS,EAAE,wBAAoB;AACpF,OAAO,KAAK,OAAO,mBAAe;AAClC,OAAO,EAQL,IAAI,GACL,mBAAe;AAChB,OAAO,KAAK,QAAQ,oBAAgB;AAC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UAAU,GAAG,UAAU,CAAC;AAC1B,CAAC,CAAC,cAAc,GAAG,cAAc,CAAC;AAClC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;AAClB,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC"}
package/src/client.ts CHANGED
@@ -142,6 +142,8 @@ import {
142
142
  MonitorListParams,
143
143
  MonitorListResponse,
144
144
  MonitorUpdateParams,
145
+ MonitorUpsertByUsernameParams,
146
+ MonitorUpsertByUsernameResponse,
145
147
  Monitors,
146
148
  } from './resources/monitors/monitors';
147
149
  import { Support } from './resources/support/support';
@@ -288,7 +290,7 @@ export class XTwitterScraper {
288
290
  * @param {string | null | undefined} [opts.apiKey=process.env['X_TWITTER_SCRAPER_API_KEY'] ?? null]
289
291
  * @param {string | null | undefined} [opts.bearerToken=process.env['X_TWITTER_SCRAPER_BEARER_TOKEN'] ?? null]
290
292
  * @param {string} [opts.baseURL=process.env['X_TWITTER_SCRAPER_BASE_URL'] ?? https://xquik.com/api/v1] - Override the default base URL for the API.
291
- * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
293
+ * @param {number} [opts.timeout=80 seconds] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
292
294
  * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
293
295
  * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
294
296
  * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
@@ -868,7 +870,7 @@ export class XTwitterScraper {
868
870
  }
869
871
 
870
872
  static XTwitterScraper = this;
871
- static DEFAULT_TIMEOUT = 60000;
873
+ static DEFAULT_TIMEOUT = 80000;
872
874
 
873
875
  static XTwitterScraperError = Errors.XTwitterScraperError;
874
876
  static APIError = Errors.APIError;
@@ -1037,9 +1039,11 @@ export declare namespace XTwitterScraper {
1037
1039
  type MonitorCreateResponse as MonitorCreateResponse,
1038
1040
  type MonitorListResponse as MonitorListResponse,
1039
1041
  type MonitorDeactivateResponse as MonitorDeactivateResponse,
1042
+ type MonitorUpsertByUsernameResponse as MonitorUpsertByUsernameResponse,
1040
1043
  type MonitorCreateParams as MonitorCreateParams,
1041
1044
  type MonitorUpdateParams as MonitorUpdateParams,
1042
1045
  type MonitorListParams as MonitorListParams,
1046
+ type MonitorUpsertByUsernameParams as MonitorUpsertByUsernameParams,
1043
1047
  };
1044
1048
 
1045
1049
  export {
@@ -1153,11 +1157,15 @@ export declare namespace XTwitterScraper {
1153
1157
  export type Community = API.Community;
1154
1158
  export type CommunityPage = API.CommunityPage;
1155
1159
  export type CommunityTopic = API.CommunityTopic;
1160
+ export type CommunityUnavailable = API.CommunityUnavailable;
1156
1161
  export type ContentDisclosure = API.ContentDisclosure;
1157
1162
  export type Currency = API.Currency;
1158
1163
  export type EmbeddedTweet = API.EmbeddedTweet;
1159
1164
  export type Error = API.Error;
1160
1165
  export type EventType = API.EventType;
1166
+ export type FilterablePaginatedTweets = API.FilterablePaginatedTweets;
1167
+ export type ImageFilteredTweets = API.ImageFilteredTweets;
1168
+ export type ImageFilterSummary = API.ImageFilterSummary;
1161
1169
  export type MonitorFollow = API.MonitorFollow;
1162
1170
  export type PaginatedLists = API.PaginatedLists;
1163
1171
  export type PaginatedTweets = API.PaginatedTweets;
@@ -1165,6 +1173,8 @@ export declare namespace XTwitterScraper {
1165
1173
  export type PaginatedUsers = API.PaginatedUsers;
1166
1174
  export type SearchTweet = API.SearchTweet;
1167
1175
  export type SoftIntervention = API.SoftIntervention;
1176
+ export type TopicFilteredTweets = API.TopicFilteredTweets;
1177
+ export type TopicFilterSummary = API.TopicFilterSummary;
1168
1178
  export type TweetMedia = API.TweetMedia;
1169
1179
  export type UserListPage = API.UserListPage;
1170
1180
  export type UserProfile = API.UserProfile;
@@ -1,3 +1,7 @@
1
1
  # `core`
2
2
 
3
+ [![Framer builds a tweet ticker with Xquik](https://img.youtube.com/vi/4UOSpoOoC3Y/maxresdefault.jpg)](https://youtu.be/4UOSpoOoC3Y?t=367)\
4
+ [Watch Framer build a tweet ticker with Xquik, from 6:07](https://youtu.be/4UOSpoOoC3Y?t=367).
5
+ This SDK calls the Xquik API.
6
+
3
7
  This directory holds public modules implementing non-resource-specific SDK functionality.
@@ -1,3 +1,8 @@
1
1
  # `internal`
2
2
 
3
- The modules in this directory are not importable outside this package and will change between releases.
3
+ [![Framer builds a tweet ticker with Xquik](https://img.youtube.com/vi/4UOSpoOoC3Y/maxresdefault.jpg)](https://youtu.be/4UOSpoOoC3Y?t=367)\
4
+ [Watch Framer build a tweet ticker with Xquik, from 6:07](https://youtu.be/4UOSpoOoC3Y?t=367).
5
+ This SDK calls the Xquik API.
6
+
7
+ Code outside this package can't import these modules.
8
+ They change between releases.
@@ -221,6 +221,11 @@ export namespace Event {
221
221
  */
222
222
  communityName?: string;
223
223
 
224
+ /**
225
+ * Why X shows no Community for the post. Omitted when X names no reason.
226
+ */
227
+ communityUnavailable?: Shared.CommunityUnavailable;
228
+
224
229
  /**
225
230
  * Community Note presentation metadata returned by X.
226
231
  */
@@ -1898,6 +1903,11 @@ export namespace EventDetail {
1898
1903
  */
1899
1904
  communityName?: string;
1900
1905
 
1906
+ /**
1907
+ * Why X shows no Community for the post. Omitted when X names no reason.
1908
+ */
1909
+ communityUnavailable?: Shared.CommunityUnavailable;
1910
+
1901
1911
  /**
1902
1912
  * Community Note presentation metadata returned by X.
1903
1913
  */
@@ -203,6 +203,7 @@ export interface ExtractionJob {
203
203
  | 'space_explorer'
204
204
  | 'thread_extractor'
205
205
  | 'tweet_search_extractor'
206
+ | 'user_affiliates'
206
207
  | 'user_likes'
207
208
  | 'user_media'
208
209
  | 'verified_follower_explorer';
@@ -212,6 +213,12 @@ export interface ExtractionJob {
212
213
  */
213
214
  totalResults: number;
214
215
 
216
+ /**
217
+ * Dashboard page where a signed-in user follows this job & downloads its rows as
218
+ * CSV, XLSX, JSON, Markdown, PDF or text.
219
+ */
220
+ url: string;
221
+
215
222
  completedAt?: string;
216
223
 
217
224
  /**
@@ -237,10 +244,22 @@ export interface ExtractionJob {
237
244
  */
238
245
  errorMessage?: string;
239
246
 
247
+ /**
248
+ * What the image filter asked & how many posts it kept. Present on a job that sent
249
+ * imageShows.
250
+ */
251
+ imageFilter?: Shared.ImageFilterSummary;
252
+
240
253
  /**
241
254
  * Requested result limit.
242
255
  */
243
256
  resultsLimit?: number;
257
+
258
+ /**
259
+ * What the topic filter asked & how many posts it kept. Present on a job that sent
260
+ * topic.
261
+ */
262
+ topicFilter?: Shared.TopicFilterSummary;
244
263
  }
245
264
 
246
265
  export interface ExtractionRetrieveResponse {
@@ -299,11 +318,43 @@ export namespace ExtractionRetrieveResponse {
299
318
  */
300
319
  media?: Array<Shared.TweetMedia>;
301
320
 
321
+ /**
322
+ * X's sensitive flag on the post with outputPreset=flat. Default nested output
323
+ * uses enrichmentData.tweet.possiblySensitive.
324
+ */
325
+ possiblySensitive?: boolean;
326
+
302
327
  /**
303
328
  * Whole number from 0.
304
329
  */
305
330
  quoteCount?: number;
306
331
 
332
+ /**
333
+ * True on a post its author deleted from X after Xquik saw it, with
334
+ * outputPreset=flat. Default nested output uses enrichmentData.tweet.isDeleted. An
335
+ * account post list with a date range adds such posts from the last 30 days.
336
+ * Absent on every other row.
337
+ */
338
+ isDeleted?: boolean;
339
+
340
+ /**
341
+ * Media of the quoted post with outputPreset=flat. Default nested output uses
342
+ * enrichmentData.tweet.quotedMedia.
343
+ */
344
+ quotedMedia?: Array<Shared.TweetMedia>;
345
+
346
+ /**
347
+ * X's sensitive flag on the quoted post with outputPreset=flat. Default nested
348
+ * output uses enrichmentData.tweet.quotedPossiblySensitive.
349
+ */
350
+ quotedPossiblySensitive?: boolean;
351
+
352
+ /**
353
+ * The quoted post's ID, text, date & author with outputPreset=flat. Default nested
354
+ * output uses enrichmentData.tweet.quotedPost.
355
+ */
356
+ quotedPost?: Result.QuotedPost;
357
+
307
358
  /**
308
359
  * Whole number from 0.
309
360
  */
@@ -352,6 +403,31 @@ export namespace ExtractionRetrieveResponse {
352
403
 
353
404
  [k: string]: unknown;
354
405
  }
406
+
407
+ export namespace Result {
408
+ /**
409
+ * The quoted post's ID, text, date & author with outputPreset=flat.
410
+ */
411
+ export interface QuotedPost {
412
+ id?: string;
413
+
414
+ author?: QuotedPost.Author;
415
+
416
+ createdAt?: string;
417
+
418
+ text?: string;
419
+ }
420
+
421
+ export namespace QuotedPost {
422
+ export interface Author {
423
+ name?: string;
424
+
425
+ profilePicture?: string;
426
+
427
+ userName?: string;
428
+ }
429
+ }
430
+ }
355
431
  }
356
432
 
357
433
  export interface ExtractionListResponse {
@@ -482,10 +558,18 @@ export namespace ExtractionRunResponse {
482
558
  | 'space_explorer'
483
559
  | 'thread_extractor'
484
560
  | 'tweet_search_extractor'
561
+ | 'user_affiliates'
485
562
  | 'user_likes'
486
563
  | 'user_media'
487
564
  | 'verified_follower_explorer';
488
565
 
566
+ /**
567
+ * Dashboard page of the job. A signed-in user follows its progress there and
568
+ * downloads every row as CSV, XLSX, JSON, Markdown, PDF or text, so give this link
569
+ * to a person who wants the whole list as a file.
570
+ */
571
+ url: string;
572
+
489
573
  waitUrl: string;
490
574
  }
491
575
  }
@@ -571,6 +655,7 @@ export interface ExtractionListParams {
571
655
  | 'space_explorer'
572
656
  | 'thread_extractor'
573
657
  | 'tweet_search_extractor'
658
+ | 'user_affiliates'
574
659
  | 'user_likes'
575
660
  | 'user_media'
576
661
  | 'verified_follower_explorer';
@@ -601,6 +686,7 @@ export interface ExtractionEstimateCostParams {
601
686
  | 'space_explorer'
602
687
  | 'thread_extractor'
603
688
  | 'tweet_search_extractor'
689
+ | 'user_affiliates'
604
690
  | 'user_likes'
605
691
  | 'user_media'
606
692
  | 'verified_follower_explorer';
@@ -737,6 +823,16 @@ export interface ExtractionEstimateCostParams {
737
823
  */
738
824
  hasWebsite?: boolean;
739
825
 
826
+ /**
827
+ * Keep only the posts whose photos show this. Use charts, screenshots,
828
+ * product_photos, memes or people, or describe it in your own words. Each post with
829
+ * a safe photo is checked, & each stored post costs 2 credits instead of its read
830
+ * price. Posts without a safe photo aren't checked, billed or stored, & a post the
831
+ * filter drops costs nothing. resultsLimit caps the posts read. Works with tools
832
+ * that return posts. Send topic or imageShows, not both.
833
+ */
834
+ imageShows?: string;
835
+
740
836
  /**
741
837
  * Include the source post in reply results.
742
838
  */
@@ -1077,6 +1173,15 @@ export interface ExtractionEstimateCostParams {
1077
1173
  */
1078
1174
  textOnlyTerms?: string;
1079
1175
 
1176
+ /**
1177
+ * Keep only the posts about this topic, such as "the Rust programming language".
1178
+ * Each post the job reads is checked, only matching posts are stored, & each stored
1179
+ * post costs 2 credits instead of its read price. A post the filter drops costs
1180
+ * nothing. resultsLimit caps the posts read & checked. Works with tools that return
1181
+ * posts. Send topic or imageShows, not both.
1182
+ */
1183
+ topic?: string;
1184
+
1080
1185
  /**
1081
1186
  * Replies to this username (tweet_search_extractor).
1082
1187
  */
@@ -1347,6 +1452,7 @@ export interface ExtractionRunParams {
1347
1452
  | 'space_explorer'
1348
1453
  | 'thread_extractor'
1349
1454
  | 'tweet_search_extractor'
1455
+ | 'user_affiliates'
1350
1456
  | 'user_likes'
1351
1457
  | 'user_media'
1352
1458
  | 'verified_follower_explorer';
@@ -1492,6 +1598,16 @@ export interface ExtractionRunParams {
1492
1598
  */
1493
1599
  hasWebsite?: boolean;
1494
1600
 
1601
+ /**
1602
+ * Body param: Keep only the posts whose photos show this. Use charts, screenshots,
1603
+ * product_photos, memes or people, or describe it in your own words. Each post with
1604
+ * a safe photo is checked, & each stored post costs 2 credits instead of its read
1605
+ * price. Posts without a safe photo aren't checked, billed or stored, & a post the
1606
+ * filter drops costs nothing. resultsLimit caps the posts read. Works with tools
1607
+ * that return posts. Send topic or imageShows, not both.
1608
+ */
1609
+ imageShows?: string;
1610
+
1495
1611
  /**
1496
1612
  * Body param: Include the source post in reply results.
1497
1613
  */
@@ -1838,6 +1954,15 @@ export interface ExtractionRunParams {
1838
1954
  */
1839
1955
  textOnlyTerms?: string;
1840
1956
 
1957
+ /**
1958
+ * Body param: Keep only the posts about this topic, such as "the Rust programming
1959
+ * language". Each post the job reads is checked, only matching posts are stored, &
1960
+ * each stored post costs 2 credits instead of its read price. A post the filter
1961
+ * drops costs nothing. resultsLimit caps the posts read & checked. Works with tools
1962
+ * that return posts. Send topic or imageShows, not both.
1963
+ */
1964
+ topic?: string;
1965
+
1841
1966
  /**
1842
1967
  * Body param: Replies to this username (tweet_search_extractor).
1843
1968
  */
@@ -87,9 +87,11 @@ export {
87
87
  type MonitorCreateResponse,
88
88
  type MonitorListResponse,
89
89
  type MonitorDeactivateResponse,
90
+ type MonitorUpsertByUsernameResponse,
90
91
  type MonitorCreateParams,
91
92
  type MonitorUpdateParams,
92
93
  type MonitorListParams,
94
+ type MonitorUpsertByUsernameParams,
93
95
  } from './monitors/monitors';
94
96
  export {
95
97
  Radar,
@@ -20,9 +20,11 @@ export {
20
20
  type MonitorCreateResponse,
21
21
  type MonitorListResponse,
22
22
  type MonitorDeactivateResponse,
23
+ type MonitorUpsertByUsernameResponse,
23
24
  type MonitorCreateParams,
24
25
  type MonitorUpdateParams,
25
26
  type MonitorListParams,
27
+ type MonitorUpsertByUsernameParams,
26
28
  } from './monitors';
27
29
  export {
28
30
  Posts,
@@ -122,6 +122,29 @@ export class Monitors extends APIResource {
122
122
  deactivate(id: string, options?: RequestOptions): APIPromise<MonitorDeactivateResponse> {
123
123
  return this._client.delete(path`/monitors/${id}`, options);
124
124
  }
125
+
126
+ /**
127
+ * Creates the monitor if it does not exist, or updates it if it does. Send the
128
+ * same call twice & you still have 1 monitor. `created` says which one ran.
129
+ * Creating needs the credits of the first hour, then costs 30 credits an hour. A
130
+ * stopped monitor turns back on & counts as created. Updating is free & replaces
131
+ * the event types. It changes the name only when you send one.
132
+ *
133
+ * @example
134
+ * ```ts
135
+ * const monitor = await client.monitors.upsertByUsername(
136
+ * 'elonmusk',
137
+ * { eventTypes: ['tweet.new', 'tweet.reply'] },
138
+ * );
139
+ * ```
140
+ */
141
+ upsertByUsername(
142
+ username: string,
143
+ body: MonitorUpsertByUsernameParams,
144
+ options?: RequestOptions,
145
+ ): APIPromise<MonitorUpsertByUsernameResponse> {
146
+ return this._client.put(path`/monitors/username/${username}`, { body, ...options });
147
+ }
125
148
  }
126
149
 
127
150
  /**
@@ -213,6 +236,17 @@ export interface MonitorDeactivateResponse {
213
236
  success: true;
214
237
  }
215
238
 
239
+ /**
240
+ * The account monitor an upsert created or updated.
241
+ */
242
+ export interface MonitorUpsertByUsernameResponse extends Monitor {
243
+ /**
244
+ * True when this call created the monitor or turned it back on. False when it
245
+ * updated a running monitor.
246
+ */
247
+ created: boolean;
248
+ }
249
+
216
250
  export interface MonitorCreateParams {
217
251
  /**
218
252
  * Array of event types to subscribe to.
@@ -259,6 +293,19 @@ export interface MonitorListParams {
259
293
  limit?: number;
260
294
  }
261
295
 
296
+ export interface MonitorUpsertByUsernameParams {
297
+ /**
298
+ * Array of event types to subscribe to.
299
+ */
300
+ eventTypes: Array<Shared.EventType>;
301
+
302
+ /**
303
+ * Your label for the monitor. Its events carry it as monitorName. Leave it out to
304
+ * keep the current label, or send null to remove it.
305
+ */
306
+ name?: string | null;
307
+ }
308
+
262
309
  Monitors.Keywords = Keywords;
263
310
  Monitors.Posts = Posts;
264
311
 
@@ -268,9 +315,11 @@ export declare namespace Monitors {
268
315
  type MonitorCreateResponse as MonitorCreateResponse,
269
316
  type MonitorListResponse as MonitorListResponse,
270
317
  type MonitorDeactivateResponse as MonitorDeactivateResponse,
318
+ type MonitorUpsertByUsernameResponse as MonitorUpsertByUsernameResponse,
271
319
  type MonitorCreateParams as MonitorCreateParams,
272
320
  type MonitorUpdateParams as MonitorUpdateParams,
273
321
  type MonitorListParams as MonitorListParams,
322
+ type MonitorUpsertByUsernameParams as MonitorUpsertByUsernameParams,
274
323
  };
275
324
 
276
325
  export {
@@ -202,6 +202,12 @@ export interface PostMonitor {
202
202
  */
203
203
  authorVerified?: 'blue' | 'business' | 'government';
204
204
 
205
+ /**
206
+ * The organization badge X shows beside the author's name. Omitted when X shows
207
+ * none.
208
+ */
209
+ authorAffiliate?: PostMonitor.AuthorAffiliate;
210
+
205
211
  /**
206
212
  * Photos, videos & GIFs on the post, in X's order.
207
213
  */
@@ -260,6 +266,26 @@ export interface PostMonitor {
260
266
  }
261
267
 
262
268
  export namespace PostMonitor {
269
+ /**
270
+ * The organization badge X shows beside the author's name.
271
+ */
272
+ export interface AuthorAffiliate {
273
+ /**
274
+ * The organization's badge image.
275
+ */
276
+ badgeUrl: string;
277
+
278
+ /**
279
+ * The organization's name, as X shows it.
280
+ */
281
+ description: string;
282
+
283
+ /**
284
+ * The organization's X profile, when X links one.
285
+ */
286
+ url?: string;
287
+ }
288
+
263
289
  /**
264
290
  * 1 photo, video or GIF on the post.
265
291
  */
@@ -455,6 +481,12 @@ export interface PostCreateParams {
455
481
  */
456
482
  eventTypes?: Array<PostEventType>;
457
483
 
484
+ /**
485
+ * Send false to create the monitor paused. A paused monitor reads nothing & costs
486
+ * nothing until a PATCH sets isActive to true.
487
+ */
488
+ isActive?: boolean;
489
+
458
490
  /**
459
491
  * Your own label for the post monitor. Its events carry it as monitorName.
460
492
  */