x-twitter-scraper 0.4.1 → 0.5.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.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -0
- package/package.json +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/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/resources/credits.ts +1 -1
- package/src/resources/extractions.ts +4 -4
- package/src/resources/guest-wallets.ts +2 -2
- 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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
5
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
6
7
|
import { path } from '../../../internal/utils/path';
|
|
7
8
|
|
|
@@ -16,11 +17,17 @@ export class Join extends APIResource {
|
|
|
16
17
|
* ```ts
|
|
17
18
|
* const join = await client.x.communities.join.create('id', {
|
|
18
19
|
* account: '@elonmusk',
|
|
20
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
19
21
|
* });
|
|
20
22
|
* ```
|
|
21
23
|
*/
|
|
22
|
-
create(id: string,
|
|
23
|
-
|
|
24
|
+
create(id: string, params: JoinCreateParams, options?: RequestOptions): APIPromise<JoinCreateResponse> {
|
|
25
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
26
|
+
return this._client.post(path`/x/communities/${id}/join`, {
|
|
27
|
+
body,
|
|
28
|
+
...options,
|
|
29
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
30
|
+
});
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
/**
|
|
@@ -30,39 +37,541 @@ export class Join extends APIResource {
|
|
|
30
37
|
* ```ts
|
|
31
38
|
* const response = await client.x.communities.join.deleteAll(
|
|
32
39
|
* 'id',
|
|
33
|
-
* {
|
|
40
|
+
* {
|
|
41
|
+
* account: '@elonmusk',
|
|
42
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
43
|
+
* },
|
|
34
44
|
* );
|
|
35
45
|
* ```
|
|
36
46
|
*/
|
|
37
47
|
deleteAll(
|
|
38
48
|
id: string,
|
|
39
|
-
|
|
49
|
+
params: JoinDeleteAllParams,
|
|
40
50
|
options?: RequestOptions,
|
|
41
51
|
): APIPromise<JoinDeleteAllResponse> {
|
|
42
|
-
|
|
52
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
53
|
+
return this._client.delete(path`/x/communities/${id}/join`, {
|
|
54
|
+
body,
|
|
55
|
+
...options,
|
|
56
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
57
|
+
});
|
|
43
58
|
}
|
|
44
59
|
}
|
|
45
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Durable write lifecycle record. Poll statusUrl until terminal is true. Reusing
|
|
63
|
+
* the original Idempotency-Key returns this same record. Submit a new write only
|
|
64
|
+
* when safeToRetry is true, using a new key.
|
|
65
|
+
*/
|
|
46
66
|
export interface JoinCreateResponse {
|
|
47
|
-
|
|
67
|
+
id: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Connected account selected for the write.
|
|
71
|
+
*/
|
|
72
|
+
account: JoinCreateResponse.Account | null;
|
|
73
|
+
|
|
74
|
+
action:
|
|
75
|
+
| 'create_tweet'
|
|
76
|
+
| 'delete_tweet'
|
|
77
|
+
| 'like'
|
|
78
|
+
| 'unlike'
|
|
79
|
+
| 'retweet'
|
|
80
|
+
| 'unretweet'
|
|
81
|
+
| 'follow'
|
|
82
|
+
| 'unfollow'
|
|
83
|
+
| 'remove_follower'
|
|
84
|
+
| 'send_dm'
|
|
85
|
+
| 'upload_media'
|
|
86
|
+
| 'update_profile'
|
|
87
|
+
| 'update_avatar'
|
|
88
|
+
| 'update_banner'
|
|
89
|
+
| 'create_community'
|
|
90
|
+
| 'delete_community'
|
|
91
|
+
| 'join_community'
|
|
92
|
+
| 'leave_community';
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* plannedCredits is the approved maximum. chargedCredits comes from the settled
|
|
96
|
+
* credit ledger. Pending or failed writes are not charged.
|
|
97
|
+
*/
|
|
98
|
+
billing: JoinCreateResponse.Billing;
|
|
99
|
+
|
|
100
|
+
charged: boolean;
|
|
101
|
+
|
|
102
|
+
chargedCredits: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Exact follow-up an API client or agent should perform.
|
|
106
|
+
*/
|
|
107
|
+
nextAction: JoinCreateResponse.NextAction | null;
|
|
108
|
+
|
|
109
|
+
object: 'x_write_action';
|
|
110
|
+
|
|
111
|
+
pollAfterMs: number | null;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Stable fingerprint and sanitized payload for replay checks.
|
|
115
|
+
*/
|
|
116
|
+
request: JoinCreateResponse.Request;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Confirmed result produced by the write, when available.
|
|
120
|
+
*/
|
|
121
|
+
result: JoinCreateResponse.Result | null;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* True only when a new attempt can reasonably succeed.
|
|
125
|
+
*/
|
|
126
|
+
retryable: boolean;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* True only when no write was dispatched and a new idempotency key may be used.
|
|
130
|
+
*/
|
|
131
|
+
safeToRetry: boolean;
|
|
132
|
+
|
|
133
|
+
sendDispatched: boolean;
|
|
134
|
+
|
|
135
|
+
status: 'accepted' | 'dispatching' | 'pending_confirmation' | 'success' | 'failed' | 'expired';
|
|
136
|
+
|
|
137
|
+
statusUrl: string;
|
|
138
|
+
|
|
139
|
+
success: boolean;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Existing X resource targeted by the write, when applicable.
|
|
143
|
+
*/
|
|
144
|
+
target: JoinCreateResponse.Target | null;
|
|
145
|
+
|
|
146
|
+
targetId: string | null;
|
|
147
|
+
|
|
148
|
+
terminal: boolean;
|
|
149
|
+
|
|
150
|
+
writeActionId: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Compatibility field for a confirmed community ID.
|
|
154
|
+
*/
|
|
155
|
+
communityId?: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Confirmed community name when available.
|
|
159
|
+
*/
|
|
160
|
+
communityName?: string;
|
|
161
|
+
|
|
162
|
+
completedAt?: string;
|
|
163
|
+
|
|
164
|
+
confirmationAttempts?: number;
|
|
165
|
+
|
|
166
|
+
confirmationCheckedAt?: string;
|
|
167
|
+
|
|
168
|
+
confirmedAt?: string;
|
|
169
|
+
|
|
170
|
+
createdAt?: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Structured recovery context for a failed write.
|
|
174
|
+
*/
|
|
175
|
+
details?: { [key: string]: unknown };
|
|
176
|
+
|
|
177
|
+
error?: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Deadline for resolving a non-terminal write. This is not the Idempotency-Key
|
|
181
|
+
* retention deadline.
|
|
182
|
+
*/
|
|
183
|
+
expiresAt?: string;
|
|
184
|
+
|
|
185
|
+
idempotent?: boolean;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Media count, kind, size, and billing details when used.
|
|
189
|
+
*/
|
|
190
|
+
media?: { [key: string]: unknown };
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Compatibility field for a confirmed media upload ID.
|
|
194
|
+
*/
|
|
195
|
+
mediaId?: string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Public media URL when the upload creates one.
|
|
199
|
+
*/
|
|
200
|
+
mediaUrl?: string;
|
|
201
|
+
|
|
202
|
+
message?: string;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Compatibility field for a confirmed direct message ID.
|
|
206
|
+
*/
|
|
207
|
+
messageId?: string;
|
|
208
|
+
|
|
209
|
+
requestHash?: string;
|
|
210
|
+
|
|
211
|
+
requestId?: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Compatibility result ID for other write actions.
|
|
215
|
+
*/
|
|
216
|
+
resultId?: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Dispatch timestamp when the write reached execution.
|
|
220
|
+
*/
|
|
221
|
+
sendDispatchedAt?: string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Compatibility field for a confirmed tweet result ID.
|
|
225
|
+
*/
|
|
226
|
+
tweetId?: string;
|
|
227
|
+
|
|
228
|
+
updatedAt?: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export namespace JoinCreateResponse {
|
|
232
|
+
/**
|
|
233
|
+
* Connected account selected for the write.
|
|
234
|
+
*/
|
|
235
|
+
export interface Account {
|
|
236
|
+
id: string;
|
|
237
|
+
|
|
238
|
+
username: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* plannedCredits is the approved maximum. chargedCredits comes from the settled
|
|
243
|
+
* credit ledger. Pending or failed writes are not charged.
|
|
244
|
+
*/
|
|
245
|
+
export interface Billing {
|
|
246
|
+
charged: boolean;
|
|
247
|
+
|
|
248
|
+
chargedCredits: string;
|
|
249
|
+
|
|
250
|
+
plannedCredits: string;
|
|
251
|
+
|
|
252
|
+
status: 'not_charged' | 'pending' | 'charged' | 'charge_failed' | 'refunded';
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Exact follow-up an API client or agent should perform.
|
|
257
|
+
*/
|
|
258
|
+
export interface NextAction {
|
|
259
|
+
type: 'poll' | 'retry' | 'verify_result' | 'fix_request';
|
|
260
|
+
|
|
261
|
+
afterMs?: number;
|
|
262
|
+
|
|
263
|
+
requiresNewIdempotencyKey?: boolean;
|
|
264
|
+
|
|
265
|
+
url?: string;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Stable fingerprint and sanitized payload for replay checks.
|
|
270
|
+
*/
|
|
271
|
+
export interface Request {
|
|
272
|
+
/**
|
|
273
|
+
* Stable hash of account, action, target, and payload.
|
|
274
|
+
*/
|
|
275
|
+
hash: string | null;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Exact sanitized payload dispatched for this action.
|
|
279
|
+
*/
|
|
280
|
+
payload: { [key: string]: unknown } | null;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Confirmed result produced by the write, when available.
|
|
285
|
+
*/
|
|
286
|
+
export interface Result {
|
|
287
|
+
id?: string;
|
|
288
|
+
|
|
289
|
+
state?: string;
|
|
290
|
+
|
|
291
|
+
type?: 'tweet' | 'direct_message' | 'media' | 'community' | 'state_change';
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Existing X resource targeted by the write, when applicable.
|
|
296
|
+
*/
|
|
297
|
+
export interface Target {
|
|
298
|
+
id: string;
|
|
299
|
+
|
|
300
|
+
type: 'tweet' | 'user' | 'community';
|
|
301
|
+
}
|
|
48
302
|
}
|
|
49
303
|
|
|
304
|
+
/**
|
|
305
|
+
* Durable write lifecycle record. Poll statusUrl until terminal is true. Reusing
|
|
306
|
+
* the original Idempotency-Key returns this same record. Submit a new write only
|
|
307
|
+
* when safeToRetry is true, using a new key.
|
|
308
|
+
*/
|
|
50
309
|
export interface JoinDeleteAllResponse {
|
|
51
|
-
|
|
310
|
+
id: string;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Connected account selected for the write.
|
|
314
|
+
*/
|
|
315
|
+
account: JoinDeleteAllResponse.Account | null;
|
|
316
|
+
|
|
317
|
+
action:
|
|
318
|
+
| 'create_tweet'
|
|
319
|
+
| 'delete_tweet'
|
|
320
|
+
| 'like'
|
|
321
|
+
| 'unlike'
|
|
322
|
+
| 'retweet'
|
|
323
|
+
| 'unretweet'
|
|
324
|
+
| 'follow'
|
|
325
|
+
| 'unfollow'
|
|
326
|
+
| 'remove_follower'
|
|
327
|
+
| 'send_dm'
|
|
328
|
+
| 'upload_media'
|
|
329
|
+
| 'update_profile'
|
|
330
|
+
| 'update_avatar'
|
|
331
|
+
| 'update_banner'
|
|
332
|
+
| 'create_community'
|
|
333
|
+
| 'delete_community'
|
|
334
|
+
| 'join_community'
|
|
335
|
+
| 'leave_community';
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* plannedCredits is the approved maximum. chargedCredits comes from the settled
|
|
339
|
+
* credit ledger. Pending or failed writes are not charged.
|
|
340
|
+
*/
|
|
341
|
+
billing: JoinDeleteAllResponse.Billing;
|
|
342
|
+
|
|
343
|
+
charged: boolean;
|
|
344
|
+
|
|
345
|
+
chargedCredits: string;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Exact follow-up an API client or agent should perform.
|
|
349
|
+
*/
|
|
350
|
+
nextAction: JoinDeleteAllResponse.NextAction | null;
|
|
351
|
+
|
|
352
|
+
object: 'x_write_action';
|
|
353
|
+
|
|
354
|
+
pollAfterMs: number | null;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Stable fingerprint and sanitized payload for replay checks.
|
|
358
|
+
*/
|
|
359
|
+
request: JoinDeleteAllResponse.Request;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Confirmed result produced by the write, when available.
|
|
363
|
+
*/
|
|
364
|
+
result: JoinDeleteAllResponse.Result | null;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* True only when a new attempt can reasonably succeed.
|
|
368
|
+
*/
|
|
369
|
+
retryable: boolean;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* True only when no write was dispatched and a new idempotency key may be used.
|
|
373
|
+
*/
|
|
374
|
+
safeToRetry: boolean;
|
|
375
|
+
|
|
376
|
+
sendDispatched: boolean;
|
|
377
|
+
|
|
378
|
+
status: 'accepted' | 'dispatching' | 'pending_confirmation' | 'success' | 'failed' | 'expired';
|
|
379
|
+
|
|
380
|
+
statusUrl: string;
|
|
381
|
+
|
|
382
|
+
success: boolean;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Existing X resource targeted by the write, when applicable.
|
|
386
|
+
*/
|
|
387
|
+
target: JoinDeleteAllResponse.Target | null;
|
|
388
|
+
|
|
389
|
+
targetId: string | null;
|
|
390
|
+
|
|
391
|
+
terminal: boolean;
|
|
392
|
+
|
|
393
|
+
writeActionId: string;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Compatibility field for a confirmed community ID.
|
|
397
|
+
*/
|
|
398
|
+
communityId?: string;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Confirmed community name when available.
|
|
402
|
+
*/
|
|
403
|
+
communityName?: string;
|
|
404
|
+
|
|
405
|
+
completedAt?: string;
|
|
406
|
+
|
|
407
|
+
confirmationAttempts?: number;
|
|
408
|
+
|
|
409
|
+
confirmationCheckedAt?: string;
|
|
410
|
+
|
|
411
|
+
confirmedAt?: string;
|
|
412
|
+
|
|
413
|
+
createdAt?: string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Structured recovery context for a failed write.
|
|
417
|
+
*/
|
|
418
|
+
details?: { [key: string]: unknown };
|
|
419
|
+
|
|
420
|
+
error?: string;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Deadline for resolving a non-terminal write. This is not the Idempotency-Key
|
|
424
|
+
* retention deadline.
|
|
425
|
+
*/
|
|
426
|
+
expiresAt?: string;
|
|
427
|
+
|
|
428
|
+
idempotent?: boolean;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Media count, kind, size, and billing details when used.
|
|
432
|
+
*/
|
|
433
|
+
media?: { [key: string]: unknown };
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Compatibility field for a confirmed media upload ID.
|
|
437
|
+
*/
|
|
438
|
+
mediaId?: string;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Public media URL when the upload creates one.
|
|
442
|
+
*/
|
|
443
|
+
mediaUrl?: string;
|
|
444
|
+
|
|
445
|
+
message?: string;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Compatibility field for a confirmed direct message ID.
|
|
449
|
+
*/
|
|
450
|
+
messageId?: string;
|
|
451
|
+
|
|
452
|
+
requestHash?: string;
|
|
453
|
+
|
|
454
|
+
requestId?: string;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Compatibility result ID for other write actions.
|
|
458
|
+
*/
|
|
459
|
+
resultId?: string;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Dispatch timestamp when the write reached execution.
|
|
463
|
+
*/
|
|
464
|
+
sendDispatchedAt?: string;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Compatibility field for a confirmed tweet result ID.
|
|
468
|
+
*/
|
|
469
|
+
tweetId?: string;
|
|
470
|
+
|
|
471
|
+
updatedAt?: string;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export namespace JoinDeleteAllResponse {
|
|
475
|
+
/**
|
|
476
|
+
* Connected account selected for the write.
|
|
477
|
+
*/
|
|
478
|
+
export interface Account {
|
|
479
|
+
id: string;
|
|
480
|
+
|
|
481
|
+
username: string;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* plannedCredits is the approved maximum. chargedCredits comes from the settled
|
|
486
|
+
* credit ledger. Pending or failed writes are not charged.
|
|
487
|
+
*/
|
|
488
|
+
export interface Billing {
|
|
489
|
+
charged: boolean;
|
|
490
|
+
|
|
491
|
+
chargedCredits: string;
|
|
492
|
+
|
|
493
|
+
plannedCredits: string;
|
|
494
|
+
|
|
495
|
+
status: 'not_charged' | 'pending' | 'charged' | 'charge_failed' | 'refunded';
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Exact follow-up an API client or agent should perform.
|
|
500
|
+
*/
|
|
501
|
+
export interface NextAction {
|
|
502
|
+
type: 'poll' | 'retry' | 'verify_result' | 'fix_request';
|
|
503
|
+
|
|
504
|
+
afterMs?: number;
|
|
505
|
+
|
|
506
|
+
requiresNewIdempotencyKey?: boolean;
|
|
507
|
+
|
|
508
|
+
url?: string;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Stable fingerprint and sanitized payload for replay checks.
|
|
513
|
+
*/
|
|
514
|
+
export interface Request {
|
|
515
|
+
/**
|
|
516
|
+
* Stable hash of account, action, target, and payload.
|
|
517
|
+
*/
|
|
518
|
+
hash: string | null;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Exact sanitized payload dispatched for this action.
|
|
522
|
+
*/
|
|
523
|
+
payload: { [key: string]: unknown } | null;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Confirmed result produced by the write, when available.
|
|
528
|
+
*/
|
|
529
|
+
export interface Result {
|
|
530
|
+
id?: string;
|
|
531
|
+
|
|
532
|
+
state?: string;
|
|
533
|
+
|
|
534
|
+
type?: 'tweet' | 'direct_message' | 'media' | 'community' | 'state_change';
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Existing X resource targeted by the write, when applicable.
|
|
539
|
+
*/
|
|
540
|
+
export interface Target {
|
|
541
|
+
id: string;
|
|
542
|
+
|
|
543
|
+
type: 'tweet' | 'user' | 'community';
|
|
544
|
+
}
|
|
52
545
|
}
|
|
53
546
|
|
|
54
547
|
export interface JoinCreateParams {
|
|
55
548
|
/**
|
|
56
|
-
* X account identifier (@username or account ID)
|
|
549
|
+
* Body param: X account identifier (@username or account ID)
|
|
57
550
|
*/
|
|
58
551
|
account: string;
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Header param: Generate one unique value for each intended write. Reuse it only
|
|
555
|
+
* when retrying the exact same account, action, target, and payload. A reused key
|
|
556
|
+
* returns the original action. Reusing it with different input returns 409. Replay
|
|
557
|
+
* protection remains active for at least 90 days.
|
|
558
|
+
*/
|
|
559
|
+
'Idempotency-Key': string;
|
|
59
560
|
}
|
|
60
561
|
|
|
61
562
|
export interface JoinDeleteAllParams {
|
|
62
563
|
/**
|
|
63
|
-
* X account identifier (@username or account ID)
|
|
564
|
+
* Body param: X account identifier (@username or account ID)
|
|
64
565
|
*/
|
|
65
566
|
account: string;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Header param: Generate one unique value for each intended write. Reuse it only
|
|
570
|
+
* when retrying the exact same account, action, target, and payload. A reused key
|
|
571
|
+
* returns the original action. Reusing it with different input returns 409. Replay
|
|
572
|
+
* protection remains active for at least 90 days.
|
|
573
|
+
*/
|
|
574
|
+
'Idempotency-Key': string;
|
|
66
575
|
}
|
|
67
576
|
|
|
68
577
|
export declare namespace Join {
|