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