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.
- package/CHANGELOG.md +21 -0
- package/README.md +1 -0
- package/client.d.mts +1 -1
- package/client.d.ts +1 -1
- package/client.js +1 -1
- package/client.mjs +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +2 -2
- package/resources/account.d.ts +2 -2
- package/resources/compose.d.mts +186 -65
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts +186 -65
- package/resources/compose.d.ts.map +1 -1
- package/resources/compose.js +5 -2
- package/resources/compose.js.map +1 -1
- package/resources/compose.mjs +5 -2
- package/resources/compose.mjs.map +1 -1
- package/resources/credits.d.mts +1 -1
- package/resources/credits.d.ts +1 -1
- package/resources/extractions.d.mts +4 -4
- package/resources/extractions.d.ts +4 -4
- package/resources/guest-wallets.d.mts +2 -2
- package/resources/guest-wallets.d.ts +2 -2
- package/resources/monitors/keywords.d.mts +4 -4
- package/resources/monitors/keywords.d.ts +4 -4
- package/resources/monitors/keywords.js +4 -4
- package/resources/monitors/keywords.mjs +4 -4
- package/resources/monitors/monitors.d.mts +5 -4
- package/resources/monitors/monitors.d.mts.map +1 -1
- package/resources/monitors/monitors.d.ts +5 -4
- package/resources/monitors/monitors.d.ts.map +1 -1
- package/resources/monitors/monitors.js +5 -4
- package/resources/monitors/monitors.js.map +1 -1
- package/resources/monitors/monitors.mjs +5 -4
- package/resources/monitors/monitors.mjs.map +1 -1
- package/resources/shared.d.mts +24 -8
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +24 -8
- package/resources/shared.d.ts.map +1 -1
- package/resources/support/tickets.d.mts +67 -4
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +67 -4
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +22 -4
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +22 -4
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/x/account-connection-challenges.d.mts +1 -1
- package/resources/x/account-connection-challenges.d.ts +1 -1
- package/resources/x/account-connection-challenges.js +1 -1
- package/resources/x/account-connection-challenges.mjs +1 -1
- package/resources/x/accounts.d.mts +9 -6
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +9 -6
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +4 -2
- package/resources/x/accounts.js.map +1 -1
- package/resources/x/accounts.mjs +4 -2
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +360 -10
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +360 -10
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +17 -4
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +17 -4
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +361 -7
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +361 -7
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +20 -5
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +20 -5
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/dm.d.mts +183 -5
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +183 -5
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +9 -2
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +9 -2
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/media.d.mts +178 -10
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +178 -10
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +9 -5
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +9 -5
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +545 -14
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +545 -14
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +25 -6
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +25 -6
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +358 -6
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +358 -6
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +17 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +17 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +358 -6
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +358 -6
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +17 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +17 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +376 -18
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +376 -18
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +25 -6
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +25 -6
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +361 -7
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +361 -7
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +20 -5
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +20 -5
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/users.d.mts +181 -5
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +181 -5
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +9 -2
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +9 -2
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/write-actions.d.mts +155 -12
- package/resources/x/write-actions.d.mts.map +1 -1
- package/resources/x/write-actions.d.ts +155 -12
- package/resources/x/write-actions.d.ts.map +1 -1
- package/src/client.ts +1 -1
- package/src/resources/account.ts +2 -2
- package/src/resources/compose.ts +232 -65
- package/src/resources/credits.ts +1 -1
- package/src/resources/extractions.ts +4 -4
- package/src/resources/guest-wallets.ts +2 -2
- package/src/resources/monitors/keywords.ts +4 -4
- package/src/resources/monitors/monitors.ts +5 -4
- package/src/resources/shared.ts +93 -9
- package/src/resources/support/tickets.ts +122 -6
- package/src/resources/x/account-connection-challenges.ts +1 -1
- package/src/resources/x/accounts.ts +9 -6
- package/src/resources/x/communities/communities.ts +515 -12
- package/src/resources/x/communities/join.ts +518 -9
- package/src/resources/x/dm.ts +261 -6
- package/src/resources/x/media.ts +258 -11
- package/src/resources/x/profile.ts +786 -17
- package/src/resources/x/tweets/like.ts +515 -8
- package/src/resources/x/tweets/retweet.ts +523 -8
- package/src/resources/x/tweets/tweets.ts +529 -23
- package/src/resources/x/users/follow.ts +518 -9
- package/src/resources/x/users/users.ts +260 -6
- package/src/resources/x/write-actions.ts +207 -14
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/compose.ts
CHANGED
|
@@ -9,14 +9,17 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
9
9
|
*/
|
|
10
10
|
export class Compose extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
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
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
feedback?: string;
|
|
31
|
+
export type ComposeCreateResponse =
|
|
32
|
+
| ComposeCreateResponse.ComposePrepareResult
|
|
33
|
+
| ComposeCreateResponse.ComposeRefineResult
|
|
34
|
+
| ComposeCreateResponse.ComposeScoreResult;
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Published engagement signal names. Production multipliers are not published.
|
|
45
|
+
*/
|
|
46
|
+
engagementMultipliers: Array<ComposePrepareResult.EngagementMultiplier>;
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
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
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
step: 'compose' | 'refine' | 'score';
|
|
191
|
+
export type ComposeCreateParams =
|
|
192
|
+
| ComposeCreateParams.ComposePrepareRequest
|
|
193
|
+
| ComposeCreateParams.ComposeRefineRequest
|
|
194
|
+
| ComposeCreateParams.ComposeScoreRequest;
|
|
57
195
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
additionalContext?: string;
|
|
196
|
+
export declare namespace ComposeCreateParams {
|
|
197
|
+
export interface ComposePrepareRequest {
|
|
198
|
+
step: 'compose';
|
|
62
199
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
200
|
+
/**
|
|
201
|
+
* Subject for the post.
|
|
202
|
+
*/
|
|
203
|
+
topic: string;
|
|
67
204
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
205
|
+
/**
|
|
206
|
+
* Editorial goal used to order the rules and questions.
|
|
207
|
+
*/
|
|
208
|
+
goal?: 'engagement' | 'followers' | 'authority' | 'conversation';
|
|
72
209
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
210
|
+
/**
|
|
211
|
+
* Username from a style analysis saved to this account.
|
|
212
|
+
*/
|
|
213
|
+
styleUsername?: string;
|
|
77
214
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*/
|
|
81
|
-
hasLink?: boolean;
|
|
215
|
+
[k: string]: unknown;
|
|
216
|
+
}
|
|
82
217
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
226
|
+
/**
|
|
227
|
+
* Requested writing tone.
|
|
228
|
+
*/
|
|
229
|
+
tone: string;
|
|
97
230
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
231
|
+
/**
|
|
232
|
+
* Subject for the post.
|
|
233
|
+
*/
|
|
234
|
+
topic: string;
|
|
102
235
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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 {
|
package/src/resources/credits.ts
CHANGED
|
@@ -146,7 +146,7 @@ export interface CreditRedirectTopupCheckoutParams {
|
|
|
146
146
|
|
|
147
147
|
export interface CreditRetrieveTopupStatusParams {
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
466
|
+
* Community ID used to price community_post_extractor or community_search.
|
|
467
467
|
*/
|
|
468
468
|
targetCommunityId?: string;
|
|
469
469
|
|
|
470
470
|
/**
|
|
471
|
-
*
|
|
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
|
-
*
|
|
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:
|
|
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:
|
|
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
|
-
*
|
|
10
|
+
* X account monitoring with 1-second checks
|
|
11
11
|
*/
|
|
12
12
|
export class Keywords extends APIResource {
|
|
13
13
|
/**
|
|
14
|
-
* Creates
|
|
15
|
-
*
|
|
16
|
-
* Creation requires
|
|
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
|
-
*
|
|
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
|
|
28
|
-
* 1 second. Events and webhook deliveries are
|
|
29
|
-
* available
|
|
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
|
package/src/resources/shared.ts
CHANGED
|
@@ -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
|
-
*
|
|
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
|
-
*
|
|
457
|
+
* ID of the tweet this result replies to.
|
|
374
458
|
*/
|
|
375
459
|
inReplyToId?: string;
|
|
376
460
|
|
|
377
461
|
/**
|
|
378
|
-
*
|
|
462
|
+
* ID of the user this result replies to.
|
|
379
463
|
*/
|
|
380
464
|
inReplyToUserId?: string;
|
|
381
465
|
|
|
382
466
|
/**
|
|
383
|
-
* Username
|
|
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
|
-
*
|
|
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
|
-
*
|
|
523
|
+
* Search result permalink.
|
|
440
524
|
*/
|
|
441
525
|
url?: string;
|
|
442
526
|
}
|