x-twitter-scraper 0.4.1 → 0.5.1

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 (171) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +1 -0
  3. package/client.d.mts +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.js +1 -1
  6. package/client.mjs +1 -1
  7. package/package.json +1 -1
  8. package/resources/account.d.mts +2 -2
  9. package/resources/account.d.ts +2 -2
  10. package/resources/compose.d.mts +186 -65
  11. package/resources/compose.d.mts.map +1 -1
  12. package/resources/compose.d.ts +186 -65
  13. package/resources/compose.d.ts.map +1 -1
  14. package/resources/compose.js +5 -2
  15. package/resources/compose.js.map +1 -1
  16. package/resources/compose.mjs +5 -2
  17. package/resources/compose.mjs.map +1 -1
  18. package/resources/credits.d.mts +1 -1
  19. package/resources/credits.d.ts +1 -1
  20. package/resources/extractions.d.mts +4 -4
  21. package/resources/extractions.d.ts +4 -4
  22. package/resources/guest-wallets.d.mts +2 -2
  23. package/resources/guest-wallets.d.ts +2 -2
  24. package/resources/monitors/keywords.d.mts +4 -4
  25. package/resources/monitors/keywords.d.ts +4 -4
  26. package/resources/monitors/keywords.js +4 -4
  27. package/resources/monitors/keywords.mjs +4 -4
  28. package/resources/monitors/monitors.d.mts +5 -4
  29. package/resources/monitors/monitors.d.mts.map +1 -1
  30. package/resources/monitors/monitors.d.ts +5 -4
  31. package/resources/monitors/monitors.d.ts.map +1 -1
  32. package/resources/monitors/monitors.js +5 -4
  33. package/resources/monitors/monitors.js.map +1 -1
  34. package/resources/monitors/monitors.mjs +5 -4
  35. package/resources/monitors/monitors.mjs.map +1 -1
  36. package/resources/shared.d.mts +24 -8
  37. package/resources/shared.d.mts.map +1 -1
  38. package/resources/shared.d.ts +24 -8
  39. package/resources/shared.d.ts.map +1 -1
  40. package/resources/support/tickets.d.mts +67 -4
  41. package/resources/support/tickets.d.mts.map +1 -1
  42. package/resources/support/tickets.d.ts +67 -4
  43. package/resources/support/tickets.d.ts.map +1 -1
  44. package/resources/support/tickets.js +22 -4
  45. package/resources/support/tickets.js.map +1 -1
  46. package/resources/support/tickets.mjs +22 -4
  47. package/resources/support/tickets.mjs.map +1 -1
  48. package/resources/x/account-connection-challenges.d.mts +1 -1
  49. package/resources/x/account-connection-challenges.d.ts +1 -1
  50. package/resources/x/account-connection-challenges.js +1 -1
  51. package/resources/x/account-connection-challenges.mjs +1 -1
  52. package/resources/x/accounts.d.mts +9 -6
  53. package/resources/x/accounts.d.mts.map +1 -1
  54. package/resources/x/accounts.d.ts +9 -6
  55. package/resources/x/accounts.d.ts.map +1 -1
  56. package/resources/x/accounts.js +4 -2
  57. package/resources/x/accounts.js.map +1 -1
  58. package/resources/x/accounts.mjs +4 -2
  59. package/resources/x/accounts.mjs.map +1 -1
  60. package/resources/x/communities/communities.d.mts +360 -10
  61. package/resources/x/communities/communities.d.mts.map +1 -1
  62. package/resources/x/communities/communities.d.ts +360 -10
  63. package/resources/x/communities/communities.d.ts.map +1 -1
  64. package/resources/x/communities/communities.js +17 -4
  65. package/resources/x/communities/communities.js.map +1 -1
  66. package/resources/x/communities/communities.mjs +17 -4
  67. package/resources/x/communities/communities.mjs.map +1 -1
  68. package/resources/x/communities/join.d.mts +361 -7
  69. package/resources/x/communities/join.d.mts.map +1 -1
  70. package/resources/x/communities/join.d.ts +361 -7
  71. package/resources/x/communities/join.d.ts.map +1 -1
  72. package/resources/x/communities/join.js +20 -5
  73. package/resources/x/communities/join.js.map +1 -1
  74. package/resources/x/communities/join.mjs +20 -5
  75. package/resources/x/communities/join.mjs.map +1 -1
  76. package/resources/x/dm.d.mts +183 -5
  77. package/resources/x/dm.d.mts.map +1 -1
  78. package/resources/x/dm.d.ts +183 -5
  79. package/resources/x/dm.d.ts.map +1 -1
  80. package/resources/x/dm.js +9 -2
  81. package/resources/x/dm.js.map +1 -1
  82. package/resources/x/dm.mjs +9 -2
  83. package/resources/x/dm.mjs.map +1 -1
  84. package/resources/x/media.d.mts +178 -10
  85. package/resources/x/media.d.mts.map +1 -1
  86. package/resources/x/media.d.ts +178 -10
  87. package/resources/x/media.d.ts.map +1 -1
  88. package/resources/x/media.js +9 -5
  89. package/resources/x/media.js.map +1 -1
  90. package/resources/x/media.mjs +9 -5
  91. package/resources/x/media.mjs.map +1 -1
  92. package/resources/x/profile.d.mts +545 -14
  93. package/resources/x/profile.d.mts.map +1 -1
  94. package/resources/x/profile.d.ts +545 -14
  95. package/resources/x/profile.d.ts.map +1 -1
  96. package/resources/x/profile.js +25 -6
  97. package/resources/x/profile.js.map +1 -1
  98. package/resources/x/profile.mjs +25 -6
  99. package/resources/x/profile.mjs.map +1 -1
  100. package/resources/x/tweets/like.d.mts +358 -6
  101. package/resources/x/tweets/like.d.mts.map +1 -1
  102. package/resources/x/tweets/like.d.ts +358 -6
  103. package/resources/x/tweets/like.d.ts.map +1 -1
  104. package/resources/x/tweets/like.js +17 -4
  105. package/resources/x/tweets/like.js.map +1 -1
  106. package/resources/x/tweets/like.mjs +17 -4
  107. package/resources/x/tweets/like.mjs.map +1 -1
  108. package/resources/x/tweets/retweet.d.mts +358 -6
  109. package/resources/x/tweets/retweet.d.mts.map +1 -1
  110. package/resources/x/tweets/retweet.d.ts +358 -6
  111. package/resources/x/tweets/retweet.d.ts.map +1 -1
  112. package/resources/x/tweets/retweet.js +17 -4
  113. package/resources/x/tweets/retweet.js.map +1 -1
  114. package/resources/x/tweets/retweet.mjs +17 -4
  115. package/resources/x/tweets/retweet.mjs.map +1 -1
  116. package/resources/x/tweets/tweets.d.mts +376 -18
  117. package/resources/x/tweets/tweets.d.mts.map +1 -1
  118. package/resources/x/tweets/tweets.d.ts +376 -18
  119. package/resources/x/tweets/tweets.d.ts.map +1 -1
  120. package/resources/x/tweets/tweets.js +25 -6
  121. package/resources/x/tweets/tweets.js.map +1 -1
  122. package/resources/x/tweets/tweets.mjs +25 -6
  123. package/resources/x/tweets/tweets.mjs.map +1 -1
  124. package/resources/x/users/follow.d.mts +361 -7
  125. package/resources/x/users/follow.d.mts.map +1 -1
  126. package/resources/x/users/follow.d.ts +361 -7
  127. package/resources/x/users/follow.d.ts.map +1 -1
  128. package/resources/x/users/follow.js +20 -5
  129. package/resources/x/users/follow.js.map +1 -1
  130. package/resources/x/users/follow.mjs +20 -5
  131. package/resources/x/users/follow.mjs.map +1 -1
  132. package/resources/x/users/users.d.mts +181 -5
  133. package/resources/x/users/users.d.mts.map +1 -1
  134. package/resources/x/users/users.d.ts +181 -5
  135. package/resources/x/users/users.d.ts.map +1 -1
  136. package/resources/x/users/users.js +9 -2
  137. package/resources/x/users/users.js.map +1 -1
  138. package/resources/x/users/users.mjs +9 -2
  139. package/resources/x/users/users.mjs.map +1 -1
  140. package/resources/x/write-actions.d.mts +155 -12
  141. package/resources/x/write-actions.d.mts.map +1 -1
  142. package/resources/x/write-actions.d.ts +155 -12
  143. package/resources/x/write-actions.d.ts.map +1 -1
  144. package/src/client.ts +1 -1
  145. package/src/resources/account.ts +2 -2
  146. package/src/resources/compose.ts +232 -65
  147. package/src/resources/credits.ts +1 -1
  148. package/src/resources/extractions.ts +4 -4
  149. package/src/resources/guest-wallets.ts +2 -2
  150. package/src/resources/monitors/keywords.ts +4 -4
  151. package/src/resources/monitors/monitors.ts +5 -4
  152. package/src/resources/shared.ts +93 -9
  153. package/src/resources/support/tickets.ts +122 -6
  154. package/src/resources/x/account-connection-challenges.ts +1 -1
  155. package/src/resources/x/accounts.ts +9 -6
  156. package/src/resources/x/communities/communities.ts +515 -12
  157. package/src/resources/x/communities/join.ts +518 -9
  158. package/src/resources/x/dm.ts +261 -6
  159. package/src/resources/x/media.ts +258 -11
  160. package/src/resources/x/profile.ts +786 -17
  161. package/src/resources/x/tweets/like.ts +515 -8
  162. package/src/resources/x/tweets/retweet.ts +523 -8
  163. package/src/resources/x/tweets/tweets.ts +529 -23
  164. package/src/resources/x/users/follow.ts +518 -9
  165. package/src/resources/x/users/users.ts +260 -6
  166. package/src/resources/x/write-actions.ts +207 -14
  167. package/src/version.ts +1 -1
  168. package/version.d.mts +1 -1
  169. package/version.d.ts +1 -1
  170. package/version.js +1 -1
  171. package/version.mjs +1 -1
@@ -9,14 +9,17 @@ import { RequestOptions } from '../internal/request-options';
9
9
  */
10
10
  export class Compose extends APIResource {
11
11
  /**
12
- * Compose, refine, or score a tweet
12
+ * Run one step of Xquik's three-step writing workflow. Compose returns questions
13
+ * and editorial rules. Refine returns goal-specific guidance. Score applies
14
+ * deterministic text checks. It does not predict reach or expose X ranking
15
+ * weights.
13
16
  *
14
17
  * @example
15
18
  * ```ts
16
19
  * const compose = await client.compose.create({
17
20
  * step: 'compose',
21
+ * topic: 'PostgreSQL query planning',
18
22
  * goal: 'engagement',
19
- * topic: 'AI trends in 2025',
20
23
  * });
21
24
  * ```
22
25
  */
@@ -25,85 +28,249 @@ export class Compose extends APIResource {
25
28
  }
26
29
  }
27
30
 
28
- export interface ComposeCreateResponse {
29
- /**
30
- * AI feedback on the draft
31
- */
32
- feedback?: string;
31
+ export type ComposeCreateResponse =
32
+ | ComposeCreateResponse.ComposePrepareResult
33
+ | ComposeCreateResponse.ComposeRefineResult
34
+ | ComposeCreateResponse.ComposeScoreResult;
33
35
 
34
- /**
35
- * Engagement score (0-100)
36
- */
37
- score?: number;
36
+ export namespace ComposeCreateResponse {
37
+ export interface ComposePrepareResult {
38
+ /**
39
+ * Xquik editorial heuristics, ordered for the goal.
40
+ */
41
+ contentRules: Array<ComposePrepareResult.ContentRule>;
38
42
 
39
- /**
40
- * Improvement suggestions
41
- */
42
- suggestions?: Array<string>;
43
+ /**
44
+ * Published engagement signal names. Production multipliers are not published.
45
+ */
46
+ engagementMultipliers: Array<ComposePrepareResult.EngagementMultiplier>;
43
47
 
44
- /**
45
- * Generated or refined tweet text
46
- */
47
- text?: string;
48
+ /**
49
+ * Publication limit for timing and decay claims.
50
+ */
51
+ engagementVelocity: string;
52
+
53
+ followUpQuestions: Array<string>;
54
+
55
+ /**
56
+ * X post intent seeded with the topic.
57
+ */
58
+ intentUrl: string;
59
+
60
+ nextStep: string;
61
+
62
+ /**
63
+ * Published signal names with unpublished weights as null.
64
+ */
65
+ scorerWeights: Array<ComposePrepareResult.ScorerWeight>;
66
+
67
+ /**
68
+ * Signal source and evidence limits.
69
+ */
70
+ source: string;
71
+
72
+ /**
73
+ * Negative engagement predictions in the public model.
74
+ */
75
+ topPenalties: Array<string>;
76
+
77
+ /**
78
+ * Style analyses saved to the account.
79
+ */
80
+ savedStyles?: Array<ComposePrepareResult.SavedStyle>;
81
+
82
+ /**
83
+ * Next action when no cached style is available.
84
+ */
85
+ styleNote?: string;
86
+
87
+ /**
88
+ * Cached examples for the requested style username.
89
+ */
90
+ styleTweets?: Array<string>;
91
+ }
92
+
93
+ export namespace ComposePrepareResult {
94
+ export interface ContentRule {
95
+ rule: string;
96
+ }
97
+
98
+ export interface EngagementMultiplier {
99
+ /**
100
+ * Human-readable published signal name.
101
+ */
102
+ action: string;
103
+
104
+ multiplier: 'Production weight not published by X';
105
+ }
106
+
107
+ export interface ScorerWeight {
108
+ /**
109
+ * Signal direction and publication limit.
110
+ */
111
+ context: string;
112
+
113
+ /**
114
+ * Signal name from X's public ranking repository.
115
+ */
116
+ signal: string;
117
+
118
+ /**
119
+ * X does not publish the production weight.
120
+ */
121
+ weight: null;
122
+ }
123
+
124
+ export interface SavedStyle {
125
+ tweetCount: number;
126
+
127
+ username: string;
128
+ }
129
+ }
130
+
131
+ export interface ComposeRefineResult {
132
+ /**
133
+ * Goal, tone, media, and editorial guidance.
134
+ */
135
+ compositionGuidance: Array<string>;
136
+
137
+ examplePatterns: Array<ComposeRefineResult.ExamplePattern>;
138
+
139
+ /**
140
+ * X post intent seeded with the topic.
141
+ */
142
+ intentUrl: string;
143
+
144
+ nextStep: string;
145
+ }
146
+
147
+ export namespace ComposeRefineResult {
148
+ export interface ExamplePattern {
149
+ description: string;
150
+
151
+ pattern: string;
152
+ }
153
+ }
154
+
155
+ export interface ComposeScoreResult {
156
+ /**
157
+ * Deterministic editorial checks. Not a reach prediction.
158
+ */
159
+ checklist: Array<ComposeScoreResult.Checklist>;
160
+
161
+ nextStep: string;
162
+
163
+ passed: boolean;
164
+
165
+ passedCount: number;
166
+
167
+ topSuggestion: string;
48
168
 
49
- [k: string]: unknown;
169
+ totalChecks: 9;
170
+
171
+ /**
172
+ * Present only when every check passes.
173
+ */
174
+ intentUrl?: string;
175
+ }
176
+
177
+ export namespace ComposeScoreResult {
178
+ export interface Checklist {
179
+ factor: string;
180
+
181
+ passed: boolean;
182
+
183
+ /**
184
+ * Present only when the check fails.
185
+ */
186
+ suggestion?: string;
187
+ }
188
+ }
50
189
  }
51
190
 
52
- export interface ComposeCreateParams {
53
- /**
54
- * Workflow step
55
- */
56
- step: 'compose' | 'refine' | 'score';
191
+ export type ComposeCreateParams =
192
+ | ComposeCreateParams.ComposePrepareRequest
193
+ | ComposeCreateParams.ComposeRefineRequest
194
+ | ComposeCreateParams.ComposeScoreRequest;
57
195
 
58
- /**
59
- * Extra context or URLs (refine)
60
- */
61
- additionalContext?: string;
196
+ export declare namespace ComposeCreateParams {
197
+ export interface ComposePrepareRequest {
198
+ step: 'compose';
62
199
 
63
- /**
64
- * Desired call to action (refine)
65
- */
66
- callToAction?: string;
200
+ /**
201
+ * Subject for the post.
202
+ */
203
+ topic: string;
67
204
 
68
- /**
69
- * Tweet draft text to evaluate (score)
70
- */
71
- draft?: string;
205
+ /**
206
+ * Editorial goal used to order the rules and questions.
207
+ */
208
+ goal?: 'engagement' | 'followers' | 'authority' | 'conversation';
72
209
 
73
- /**
74
- * Optimization goal
75
- */
76
- goal?: 'engagement' | 'followers' | 'authority' | 'conversation';
210
+ /**
211
+ * Username from a style analysis saved to this account.
212
+ */
213
+ styleUsername?: string;
77
214
 
78
- /**
79
- * Whether a link is attached (score)
80
- */
81
- hasLink?: boolean;
215
+ [k: string]: unknown;
216
+ }
82
217
 
83
- /**
84
- * Whether media is attached (score)
85
- */
86
- hasMedia?: boolean;
218
+ export interface ComposeRefineRequest {
219
+ /**
220
+ * Editorial goal for the guidance.
221
+ */
222
+ goal: 'engagement' | 'followers' | 'authority' | 'conversation';
87
223
 
88
- /**
89
- * Media type (refine)
90
- */
91
- mediaType?: 'photo' | 'video' | 'none';
224
+ step: 'refine';
92
225
 
93
- /**
94
- * Cached style username for voice matching (compose)
95
- */
96
- styleUsername?: string;
226
+ /**
227
+ * Requested writing tone.
228
+ */
229
+ tone: string;
97
230
 
98
- /**
99
- * Desired tone (refine)
100
- */
101
- tone?: string;
231
+ /**
232
+ * Subject for the post.
233
+ */
234
+ topic: string;
102
235
 
103
- /**
104
- * Tweet topic (compose, refine)
105
- */
106
- topic?: string;
236
+ /**
237
+ * Audience, constraints, sources, or other writing context.
238
+ */
239
+ additionalContext?: string;
240
+
241
+ /**
242
+ * Specific action the draft should request.
243
+ */
244
+ callToAction?: string;
245
+
246
+ /**
247
+ * Planned media type.
248
+ */
249
+ mediaType?: 'photo' | 'video' | 'none';
250
+
251
+ [k: string]: unknown;
252
+ }
253
+
254
+ export interface ComposeScoreRequest {
255
+ /**
256
+ * Full post text for deterministic editorial checks.
257
+ */
258
+ draft: string;
259
+
260
+ step: 'score';
261
+
262
+ /**
263
+ * True when a separate link card is attached.
264
+ */
265
+ hasLink?: boolean;
266
+
267
+ /**
268
+ * @deprecated Ignored. Remove this field. Use hasLink for a separate link card.
269
+ */
270
+ hasMedia?: boolean;
271
+
272
+ [k: string]: unknown;
273
+ }
107
274
  }
108
275
 
109
276
  export declare namespace Compose {
@@ -146,7 +146,7 @@ export interface CreditRedirectTopupCheckoutParams {
146
146
 
147
147
  export interface CreditRetrieveTopupStatusParams {
148
148
  /**
149
- * Billing session ID returned by the top-up billing flow.
149
+ * Top-up session ID to inspect.
150
150
  */
151
151
  session_id: string;
152
152
  }
@@ -453,7 +453,7 @@ export interface ExtractionEstimateCostParams {
453
453
  retweetsOfTweetId?: string;
454
454
 
455
455
  /**
456
- * Required for tweet_search_extractor & community_search.
456
+ * Query used to price tweet_search_extractor or community_search.
457
457
  */
458
458
  searchQuery?: string;
459
459
 
@@ -463,18 +463,18 @@ export interface ExtractionEstimateCostParams {
463
463
  sinceDate?: string;
464
464
 
465
465
  /**
466
- * Required for community_post_extractor & community_search.
466
+ * Community ID used to price community_post_extractor or community_search.
467
467
  */
468
468
  targetCommunityId?: string;
469
469
 
470
470
  /**
471
- * Required for list_follower_explorer, list_member_extractor &
471
+ * List ID used to price list_follower_explorer, list_member_extractor, or
472
472
  * list_post_extractor.
473
473
  */
474
474
  targetListId?: string;
475
475
 
476
476
  /**
477
- * Required for space_explorer.
477
+ * Space ID used to price space_explorer.
478
478
  */
479
479
  targetSpaceId?: string;
480
480
 
@@ -289,7 +289,7 @@ export namespace GuestWalletTopupResponse {
289
289
 
290
290
  export interface GuestWalletCreateParams {
291
291
  /**
292
- * Body param: Confirmed USD amount in cents.
292
+ * Body param: USD cents accepted for this checkout.
293
293
  */
294
294
  amount_minor: number;
295
295
 
@@ -308,7 +308,7 @@ export interface GuestWalletCreateParams {
308
308
 
309
309
  export interface GuestWalletTopupParams {
310
310
  /**
311
- * Body param: Confirmed USD amount in cents.
311
+ * Body param: USD cents accepted for this checkout.
312
312
  */
313
313
  amount_minor: number;
314
314
 
@@ -7,13 +7,13 @@ import { RequestOptions } from '../../internal/request-options';
7
7
  import { path } from '../../internal/utils/path';
8
8
 
9
9
  /**
10
- * Real-time X account monitoring
10
+ * X account monitoring with 1-second checks
11
11
  */
12
12
  export class Keywords extends APIResource {
13
13
  /**
14
- * Creates an instant keyword monitor. Keyword monitors are unlimited. Active
15
- * monitors check every 1 second. Events and webhook deliveries are included.
16
- * Creation requires an available usage balance.
14
+ * Creates a keyword monitor. Keyword monitors are unlimited. Active monitors check
15
+ * every 1 second and cost 21 credits per hour. Events and webhook deliveries are
16
+ * included. Creation requires available credits for the first hourly charge.
17
17
  *
18
18
  * @example
19
19
  * ```ts
@@ -18,15 +18,16 @@ import { RequestOptions } from '../../internal/request-options';
18
18
  import { path } from '../../internal/utils/path';
19
19
 
20
20
  /**
21
- * Real-time X account monitoring
21
+ * X account monitoring with 1-second checks
22
22
  */
23
23
  export class Monitors extends APIResource {
24
24
  keywords: KeywordsAPI.Keywords = new KeywordsAPI.Keywords(this._client);
25
25
 
26
26
  /**
27
- * Creates an instant monitor. Monitors are unlimited. Active monitors check every
28
- * 1 second. Events and webhook deliveries are included. Creation requires an
29
- * available usage balance.
27
+ * Creates an account monitor. Monitors are unlimited. Active monitors check every
28
+ * 1 second and cost 21 credits per hour. Events and webhook deliveries are
29
+ * included. Creation requires available credits for the first hourly charge and
30
+ * username lookup.
30
31
  *
31
32
  * @example
32
33
  * ```ts
@@ -149,6 +149,39 @@ export interface Error {
149
149
  | 'unauthenticated'
150
150
  | 'unsupported_field'
151
151
  | 'user_not_found'
152
+ | 'body_too_large'
153
+ | 'checkout_unavailable'
154
+ | 'connection_challenge_expired'
155
+ | 'connection_challenge_inactive'
156
+ | 'draft_not_found'
157
+ | 'favoriters_unavailable'
158
+ | 'forbidden'
159
+ | 'guest_wallet_unavailable'
160
+ | 'guest_wallets_disabled'
161
+ | 'guest_wallets_unavailable'
162
+ | 'idempotency_conflict'
163
+ | 'idempotency_key_conflict'
164
+ | 'invalid_community_id'
165
+ | 'invalid_idempotency_key'
166
+ | 'invalid_list_id'
167
+ | 'invalid_payment_amount'
168
+ | 'invalid_range'
169
+ | 'login_rate_limited'
170
+ | 'missing_idempotency_key'
171
+ | 'missing_ids'
172
+ | 'no_cached_style'
173
+ | 'passkey_required'
174
+ | 'rate_limited'
175
+ | 'read_request_timeout'
176
+ | 'replies_incomplete'
177
+ | 'support_media_rate_limit'
178
+ | 'support_request_rate_limit'
179
+ | 'too_many_ids'
180
+ | 'unknown_field'
181
+ | 'unsupported_media_type'
182
+ | 'webhook_inactive'
183
+ | 'write_tracking_unavailable'
184
+ | 'x_write_unconfirmed'
152
185
  | 'x_account_feature_required'
153
186
  | 'x_account_protected'
154
187
  | 'x_account_suspended'
@@ -175,8 +208,27 @@ export interface Error {
175
208
  | 'x_user_lookup_failed'
176
209
  | 'x_write_ambiguous'
177
210
  | 'x_write_failed'
178
- | 'x_write_unconfirmed'
179
211
  | Error.StructuredError;
212
+
213
+ /**
214
+ * Human-readable error guidance.
215
+ */
216
+ message?: string;
217
+
218
+ /**
219
+ * Machine-readable reason for a login cooldown.
220
+ */
221
+ reason?: string;
222
+
223
+ /**
224
+ * Seconds until the next permitted request.
225
+ */
226
+ retryAfter?: number;
227
+
228
+ /**
229
+ * Required wait in milliseconds.
230
+ */
231
+ retryAfterMs?: number;
180
232
  }
181
233
 
182
234
  export namespace Error {
@@ -222,6 +274,39 @@ export namespace Error {
222
274
  | 'unauthenticated'
223
275
  | 'unsupported_field'
224
276
  | 'user_not_found'
277
+ | 'body_too_large'
278
+ | 'checkout_unavailable'
279
+ | 'connection_challenge_expired'
280
+ | 'connection_challenge_inactive'
281
+ | 'draft_not_found'
282
+ | 'favoriters_unavailable'
283
+ | 'forbidden'
284
+ | 'guest_wallet_unavailable'
285
+ | 'guest_wallets_disabled'
286
+ | 'guest_wallets_unavailable'
287
+ | 'idempotency_conflict'
288
+ | 'idempotency_key_conflict'
289
+ | 'invalid_community_id'
290
+ | 'invalid_idempotency_key'
291
+ | 'invalid_list_id'
292
+ | 'invalid_payment_amount'
293
+ | 'invalid_range'
294
+ | 'login_rate_limited'
295
+ | 'missing_idempotency_key'
296
+ | 'missing_ids'
297
+ | 'no_cached_style'
298
+ | 'passkey_required'
299
+ | 'rate_limited'
300
+ | 'read_request_timeout'
301
+ | 'replies_incomplete'
302
+ | 'support_media_rate_limit'
303
+ | 'support_request_rate_limit'
304
+ | 'too_many_ids'
305
+ | 'unknown_field'
306
+ | 'unsupported_media_type'
307
+ | 'webhook_inactive'
308
+ | 'write_tracking_unavailable'
309
+ | 'x_write_unconfirmed'
225
310
  | 'x_account_feature_required'
226
311
  | 'x_account_protected'
227
312
  | 'x_account_suspended'
@@ -247,8 +332,7 @@ export namespace Error {
247
332
  | 'x_transient_error'
248
333
  | 'x_user_lookup_failed'
249
334
  | 'x_write_ambiguous'
250
- | 'x_write_failed'
251
- | 'x_write_unconfirmed';
335
+ | 'x_write_failed';
252
336
 
253
337
  message: string;
254
338
 
@@ -359,7 +443,7 @@ export interface SearchTweet {
359
443
  createdAt?: string;
360
444
 
361
445
  /**
362
- * Start and end offsets for rendered tweet text
446
+ * Rendered text's start and end offsets.
363
447
  */
364
448
  displayTextRange?: Array<number>;
365
449
 
@@ -370,17 +454,17 @@ export interface SearchTweet {
370
454
  entities?: { [key: string]: unknown };
371
455
 
372
456
  /**
373
- * Tweet ID being replied to
457
+ * ID of the tweet this result replies to.
374
458
  */
375
459
  inReplyToId?: string;
376
460
 
377
461
  /**
378
- * User ID being replied to
462
+ * ID of the user this result replies to.
379
463
  */
380
464
  inReplyToUserId?: string;
381
465
 
382
466
  /**
383
- * Username being replied to
467
+ * Username this result replies to.
384
468
  */
385
469
  inReplyToUsername?: string;
386
470
 
@@ -405,7 +489,7 @@ export interface SearchTweet {
405
489
  isReply?: boolean;
406
490
 
407
491
  /**
408
- * Tweet language code
492
+ * Search result language code.
409
493
  */
410
494
  lang?: string;
411
495
 
@@ -436,7 +520,7 @@ export interface SearchTweet {
436
520
  type?: string;
437
521
 
438
522
  /**
439
- * Tweet permalink URL
523
+ * Search result permalink.
440
524
  */
441
525
  url?: string;
442
526
  }