x-twitter-scraper 0.19.0 → 0.20.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 +24 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/resources/activity.d.mts +18 -2
- package/resources/activity.d.mts.map +1 -1
- package/resources/activity.d.ts +18 -2
- package/resources/activity.d.ts.map +1 -1
- package/resources/credits.d.mts +5 -0
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +5 -0
- package/resources/credits.d.ts.map +1 -1
- package/resources/extractions.d.mts +48 -0
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +48 -0
- package/resources/extractions.d.ts.map +1 -1
- package/resources/radar.d.mts +9 -0
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +9 -0
- package/resources/radar.d.ts.map +1 -1
- package/resources/shared.d.mts +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/x/communities/communities.d.mts +17 -0
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +17 -0
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +7 -4
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +7 -4
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +14 -0
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +14 -0
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +4 -4
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +4 -4
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/dm.d.mts +14 -0
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +14 -0
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +4 -4
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +4 -4
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/index.d.mts +1 -1
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +1 -1
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/media.d.mts +7 -0
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +7 -0
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +2 -2
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +2 -2
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +21 -0
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +21 -0
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +6 -6
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +6 -6
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +14 -0
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +14 -0
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +4 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +4 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +14 -0
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +14 -0
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +4 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +4 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +27 -0
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +27 -0
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +4 -4
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +4 -4
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +14 -0
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +14 -0
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +4 -4
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +4 -4
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/index.d.mts +1 -1
- package/resources/x/users/index.d.mts.map +1 -1
- package/resources/x/users/index.d.ts +1 -1
- package/resources/x/users/index.d.ts.map +1 -1
- package/resources/x/users/index.js.map +1 -1
- package/resources/x/users/index.mjs.map +1 -1
- package/resources/x/users/users.d.mts +425 -1
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +425 -1
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +17 -2
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +17 -2
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/x.d.mts +2 -2
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +2 -2
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs.map +1 -1
- package/src/resources/activity.ts +41 -2
- package/src/resources/credits.ts +6 -0
- package/src/resources/extractions.ts +58 -0
- package/src/resources/radar.ts +10 -0
- package/src/resources/shared.ts +10 -0
- package/src/resources/x/communities/communities.ts +23 -4
- package/src/resources/x/communities/join.ts +20 -4
- package/src/resources/x/dm.ts +20 -4
- package/src/resources/x/index.ts +3 -0
- package/src/resources/x/media.ts +10 -2
- package/src/resources/x/profile.ts +30 -6
- package/src/resources/x/tweets/like.ts +20 -4
- package/src/resources/x/tweets/retweet.ts +20 -4
- package/src/resources/x/tweets/tweets.ts +35 -4
- package/src/resources/x/users/follow.ts +20 -4
- package/src/resources/x/users/index.ts +3 -0
- package/src/resources/x/users/users.ts +513 -2
- package/src/resources/x/x.ts +6 -0
- 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
|
@@ -52,11 +52,11 @@ export class Users extends APIResource {
|
|
|
52
52
|
params: UserRemoveFollowerParams,
|
|
53
53
|
options?: RequestOptions,
|
|
54
54
|
): APIPromise<UserRemoveFollowerResponse> {
|
|
55
|
-
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
55
|
+
const { 'Idempotency-Key': idempotencyKey, Prefer: prefer, ...body } = params;
|
|
56
56
|
return this._client.post(path`/x/users/${id}/remove-follower`, {
|
|
57
57
|
body,
|
|
58
58
|
...options,
|
|
59
|
-
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
59
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey, Prefer: prefer }, options?.headers]),
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -404,6 +404,26 @@ export class Users extends APIResource {
|
|
|
404
404
|
return this._client.get('/x/users/search', { query, ...options });
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
/**
|
|
408
|
+
* Checks 1 X account for a search ban, a search suggestion ban & reply
|
|
409
|
+
* deboosting. It also says if the account is active, protected or suspended. Each
|
|
410
|
+
* profile, post, suggestion & reply in the answer costs 1 credit.
|
|
411
|
+
*
|
|
412
|
+
* @example
|
|
413
|
+
* ```ts
|
|
414
|
+
* const shadowbanReport = await client.x.users.retrieveShadowban(
|
|
415
|
+
* 'id',
|
|
416
|
+
* );
|
|
417
|
+
* ```
|
|
418
|
+
*/
|
|
419
|
+
retrieveShadowban(
|
|
420
|
+
id: string,
|
|
421
|
+
query: UserRetrieveShadowbanParams | null | undefined = {},
|
|
422
|
+
options?: RequestOptions,
|
|
423
|
+
): APIPromise<ShadowbanReport> {
|
|
424
|
+
return this._client.get(path`/x/users/${id}/shadowban`, { query, ...options });
|
|
425
|
+
}
|
|
426
|
+
|
|
407
427
|
/**
|
|
408
428
|
* Returns the public accounts X lists as similar to the selected user, in X's
|
|
409
429
|
* order. X can list slightly different accounts on each call. Each account costs 1
|
|
@@ -1125,6 +1145,12 @@ export namespace UserRetrieveInsightsResponse {
|
|
|
1125
1145
|
*/
|
|
1126
1146
|
following: number;
|
|
1127
1147
|
|
|
1148
|
+
/**
|
|
1149
|
+
* Middle view count of the sample, so 1 viral post moves it less than the
|
|
1150
|
+
* average. Null without posts.
|
|
1151
|
+
*/
|
|
1152
|
+
medianViews: number | null;
|
|
1153
|
+
|
|
1128
1154
|
/**
|
|
1129
1155
|
* Posts the user has made.
|
|
1130
1156
|
*/
|
|
@@ -1289,6 +1315,462 @@ export namespace UserRetrieveListsResponse {
|
|
|
1289
1315
|
}
|
|
1290
1316
|
}
|
|
1291
1317
|
|
|
1318
|
+
/**
|
|
1319
|
+
* Says whether X limits 1 account in search, search suggestions, reply threads or
|
|
1320
|
+
* its timeline. Each check holds a verdict, its reason & the evidence it read.
|
|
1321
|
+
* Evidence is null for a check that couldn't read the account.
|
|
1322
|
+
*/
|
|
1323
|
+
export interface ShadowbanReport {
|
|
1324
|
+
/**
|
|
1325
|
+
* Whether the account is active, protected or suspended.
|
|
1326
|
+
*/
|
|
1327
|
+
account: 'active' | 'protected' | 'suspended';
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* When the check ran.
|
|
1331
|
+
*/
|
|
1332
|
+
checkedAt: string;
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* The 9 checks, each with a verdict, a reason & evidence.
|
|
1336
|
+
*/
|
|
1337
|
+
checks: ShadowbanReport.Checks;
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* `suspended` means X suspended the account. `limited` means at least 1 check
|
|
1341
|
+
* failed. `clear` means search & suggestions passed with no fail. `unclear` means
|
|
1342
|
+
* neither of those.
|
|
1343
|
+
*/
|
|
1344
|
+
overall: 'clear' | 'limited' | 'unclear' | 'suspended';
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* ID of the account. Null for a suspended account asked for by username.
|
|
1348
|
+
*/
|
|
1349
|
+
userId: string | null;
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* Username of the account. Null for a suspended account asked for by ID.
|
|
1353
|
+
*/
|
|
1354
|
+
username: string | null;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
export namespace ShadowbanReport {
|
|
1358
|
+
/**
|
|
1359
|
+
* The 9 checks, each with a verdict, a reason & evidence.
|
|
1360
|
+
*/
|
|
1361
|
+
export interface Checks {
|
|
1362
|
+
/**
|
|
1363
|
+
* Passes an active or protected account & fails a suspended one.
|
|
1364
|
+
*/
|
|
1365
|
+
account: Checks.Account;
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* Compares the newest 5 of the account's own posts older than 24 hours with its
|
|
1369
|
+
* earlier posts, by the median of likes, replies, reposts & quotes. `typical`
|
|
1370
|
+
* passes at 25% or more. A drop alone proves nothing, so `low` can't tell.
|
|
1371
|
+
*/
|
|
1372
|
+
engagement: Checks.Engagement;
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Opens the threads of up to 3 recent replies to other accounts. `in_thread`
|
|
1376
|
+
* passes. X ranks replies for each viewer, so `more_replies` can't tell.
|
|
1377
|
+
*/
|
|
1378
|
+
replies: Checks.Replies;
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* Reads the same reply threads as `replies`. `replies_show` passes when any
|
|
1382
|
+
* checked reply shows. X ranks replies for each viewer, so `replies_missing`
|
|
1383
|
+
* can't tell.
|
|
1384
|
+
*/
|
|
1385
|
+
replyLock: Checks.ReplyLock;
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Looks for the account's recent posts in X search, sorted by Latest. `listed`
|
|
1389
|
+
* passes & `missing` fails.
|
|
1390
|
+
*/
|
|
1391
|
+
search: Checks.Search;
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* Reads X's sensitive flag on the profile. `not_flagged` passes & `flagged`
|
|
1395
|
+
* fails.
|
|
1396
|
+
*/
|
|
1397
|
+
sensitive: Checks.Sensitive;
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* Looks for the account among the accounts X suggests for its username.
|
|
1401
|
+
* `suggested` passes & `not_suggested` fails.
|
|
1402
|
+
*/
|
|
1403
|
+
suggestion: Checks.Suggestion;
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* Looks for the account's posts on its profile timeline. `visible` passes &
|
|
1407
|
+
* `hidden` fails.
|
|
1408
|
+
*/
|
|
1409
|
+
timeline: Checks.Timeline;
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* Reads the countries where X withholds the account. `none` passes & `countries`
|
|
1413
|
+
* fails.
|
|
1414
|
+
*/
|
|
1415
|
+
withheld: Checks.Withheld;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
export namespace Checks {
|
|
1419
|
+
/**
|
|
1420
|
+
* Passes an active or protected account & fails a suspended one.
|
|
1421
|
+
*/
|
|
1422
|
+
export interface Account {
|
|
1423
|
+
/**
|
|
1424
|
+
* Where to see the account on X.
|
|
1425
|
+
*/
|
|
1426
|
+
evidence: Account.Evidence;
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* State of the account on X.
|
|
1430
|
+
*/
|
|
1431
|
+
reason: 'active' | 'protected' | 'suspended';
|
|
1432
|
+
|
|
1433
|
+
verdict: ShadowbanVerdict;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
export namespace Account {
|
|
1437
|
+
/**
|
|
1438
|
+
* Where to see the account on X.
|
|
1439
|
+
*/
|
|
1440
|
+
export interface Evidence {
|
|
1441
|
+
/**
|
|
1442
|
+
* Profile of the account on X.
|
|
1443
|
+
*/
|
|
1444
|
+
profileUrl: string;
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Compares the newest 5 of the account's own posts older than 24 hours with its
|
|
1450
|
+
* earlier posts, by the median of likes, replies, reposts & quotes. `typical`
|
|
1451
|
+
* passes at 25% or more. A drop alone proves nothing, so `low` can't tell.
|
|
1452
|
+
*/
|
|
1453
|
+
export interface Engagement {
|
|
1454
|
+
/**
|
|
1455
|
+
* The 2 medians & how many posts each one covers.
|
|
1456
|
+
*/
|
|
1457
|
+
evidence: Engagement.Evidence | null;
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* `too_few_posts` means fewer than 8 posts to compare, or earlier posts with no
|
|
1461
|
+
* engagement.
|
|
1462
|
+
*/
|
|
1463
|
+
reason: 'typical' | 'low' | 'too_few_posts' | 'unavailable' | 'protected' | 'suspended';
|
|
1464
|
+
|
|
1465
|
+
verdict: ShadowbanVerdict;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
export namespace Engagement {
|
|
1469
|
+
/**
|
|
1470
|
+
* The 2 medians & how many posts each one covers.
|
|
1471
|
+
*/
|
|
1472
|
+
export interface Evidence {
|
|
1473
|
+
/**
|
|
1474
|
+
* Median engagement of the earlier posts.
|
|
1475
|
+
*/
|
|
1476
|
+
earlierMedian: number;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* Posts in the earlier group.
|
|
1480
|
+
*/
|
|
1481
|
+
earlierPosts: number;
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Median engagement of the newest posts.
|
|
1485
|
+
*/
|
|
1486
|
+
newestMedian: number;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* Posts in the newest group, up to 5.
|
|
1490
|
+
*/
|
|
1491
|
+
newestPosts: number;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* Opens the threads of up to 3 recent replies to other accounts. `in_thread`
|
|
1497
|
+
* passes. X ranks replies for each viewer, so `more_replies` can't tell.
|
|
1498
|
+
*/
|
|
1499
|
+
export interface Replies {
|
|
1500
|
+
/**
|
|
1501
|
+
* Each reply it opened & where it showed.
|
|
1502
|
+
*/
|
|
1503
|
+
evidence: Replies.Evidence | null;
|
|
1504
|
+
|
|
1505
|
+
/**
|
|
1506
|
+
* `more_replies` means X put a reply behind its hidden replies prompt.
|
|
1507
|
+
* `not_found` means no reply showed on the pages the check read.
|
|
1508
|
+
*/
|
|
1509
|
+
reason:
|
|
1510
|
+
| 'in_thread'
|
|
1511
|
+
| 'more_replies'
|
|
1512
|
+
| 'no_recent_replies'
|
|
1513
|
+
| 'not_found'
|
|
1514
|
+
| 'unavailable'
|
|
1515
|
+
| 'protected'
|
|
1516
|
+
| 'suspended';
|
|
1517
|
+
|
|
1518
|
+
verdict: ShadowbanVerdict;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
export namespace Replies {
|
|
1522
|
+
/**
|
|
1523
|
+
* Each reply it opened & where it showed.
|
|
1524
|
+
*/
|
|
1525
|
+
export interface Evidence {
|
|
1526
|
+
/**
|
|
1527
|
+
* Up to 3 replies, newest first.
|
|
1528
|
+
*/
|
|
1529
|
+
replies: Array<Evidence.Reply>;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
export namespace Evidence {
|
|
1533
|
+
export interface Reply {
|
|
1534
|
+
/**
|
|
1535
|
+
* ID of the post it replies to.
|
|
1536
|
+
*/
|
|
1537
|
+
parentId: string;
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* The thread of that post on X.
|
|
1541
|
+
*/
|
|
1542
|
+
parentUrl: string;
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* `thread` means the reply shows in the thread. `more_replies` means it shows
|
|
1546
|
+
* only behind X's hidden replies prompt.
|
|
1547
|
+
*/
|
|
1548
|
+
placement: 'thread' | 'more_replies' | 'not_found';
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* ID of the reply.
|
|
1552
|
+
*/
|
|
1553
|
+
replyId: string;
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* The reply on X.
|
|
1557
|
+
*/
|
|
1558
|
+
replyUrl: string;
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
/**
|
|
1564
|
+
* Reads the same reply threads as `replies`. `replies_show` passes when any
|
|
1565
|
+
* checked reply shows. X ranks replies for each viewer, so `replies_missing`
|
|
1566
|
+
* can't tell.
|
|
1567
|
+
*/
|
|
1568
|
+
export interface ReplyLock {
|
|
1569
|
+
/**
|
|
1570
|
+
* How many replies it opened & how many showed.
|
|
1571
|
+
*/
|
|
1572
|
+
evidence: ReplyLock.Evidence | null;
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* `replies_show` means X showed at least 1 checked reply. `replies_missing` means
|
|
1576
|
+
* it showed none on the pages read.
|
|
1577
|
+
*/
|
|
1578
|
+
reason:
|
|
1579
|
+
'replies_show' | 'replies_missing' | 'no_recent_replies' | 'unavailable' | 'protected' | 'suspended';
|
|
1580
|
+
|
|
1581
|
+
verdict: ShadowbanVerdict;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
export namespace ReplyLock {
|
|
1585
|
+
/**
|
|
1586
|
+
* How many replies it opened & how many showed.
|
|
1587
|
+
*/
|
|
1588
|
+
export interface Evidence {
|
|
1589
|
+
/**
|
|
1590
|
+
* Replies it looked for, up to 3.
|
|
1591
|
+
*/
|
|
1592
|
+
checkedReplies: number;
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Replies that showed in their thread.
|
|
1596
|
+
*/
|
|
1597
|
+
shownReplies: number;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* Looks for the account's recent posts in X search, sorted by Latest. `listed`
|
|
1603
|
+
* passes & `missing` fails.
|
|
1604
|
+
*/
|
|
1605
|
+
export interface Search {
|
|
1606
|
+
/**
|
|
1607
|
+
* The search & the posts it looked for.
|
|
1608
|
+
*/
|
|
1609
|
+
evidence: Search.Evidence | null;
|
|
1610
|
+
|
|
1611
|
+
/**
|
|
1612
|
+
* `listed` means search shows its posts & `missing` means it shows none.
|
|
1613
|
+
* `no_recent_posts` means the account has no recent post to look for.
|
|
1614
|
+
*/
|
|
1615
|
+
reason: 'listed' | 'missing' | 'no_recent_posts' | 'unavailable' | 'protected' | 'suspended';
|
|
1616
|
+
|
|
1617
|
+
verdict: ShadowbanVerdict;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
export namespace Search {
|
|
1621
|
+
/**
|
|
1622
|
+
* The search & the posts it looked for.
|
|
1623
|
+
*/
|
|
1624
|
+
export interface Evidence {
|
|
1625
|
+
/**
|
|
1626
|
+
* Up to 5 posts of the account that search showed.
|
|
1627
|
+
*/
|
|
1628
|
+
foundPostIds: Array<string>;
|
|
1629
|
+
|
|
1630
|
+
/**
|
|
1631
|
+
* The search it ran.
|
|
1632
|
+
*/
|
|
1633
|
+
query: string;
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* Up to 5 recent posts of the account.
|
|
1637
|
+
*/
|
|
1638
|
+
recentPostIds: Array<string>;
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
* The same search on X, sorted by Latest.
|
|
1642
|
+
*/
|
|
1643
|
+
searchUrl: string;
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* Reads X's sensitive flag on the profile. `not_flagged` passes & `flagged`
|
|
1649
|
+
* fails.
|
|
1650
|
+
*/
|
|
1651
|
+
export interface Sensitive {
|
|
1652
|
+
/**
|
|
1653
|
+
* Always null, since the reason holds the answer.
|
|
1654
|
+
*/
|
|
1655
|
+
evidence: null;
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* `unknown` means X left the flag out of the profile.
|
|
1659
|
+
*/
|
|
1660
|
+
reason: 'not_flagged' | 'flagged' | 'unknown' | 'suspended';
|
|
1661
|
+
|
|
1662
|
+
verdict: ShadowbanVerdict;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
/**
|
|
1666
|
+
* Looks for the account among the accounts X suggests for its username.
|
|
1667
|
+
* `suggested` passes & `not_suggested` fails.
|
|
1668
|
+
*/
|
|
1669
|
+
export interface Suggestion {
|
|
1670
|
+
/**
|
|
1671
|
+
* The username searched & the accounts X suggested.
|
|
1672
|
+
*/
|
|
1673
|
+
evidence: Suggestion.Evidence | null;
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* `suggested` means X suggests the account for its username.
|
|
1677
|
+
*/
|
|
1678
|
+
reason: 'suggested' | 'not_suggested' | 'unavailable' | 'suspended';
|
|
1679
|
+
|
|
1680
|
+
verdict: ShadowbanVerdict;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
export namespace Suggestion {
|
|
1684
|
+
/**
|
|
1685
|
+
* The username searched & the accounts X suggested.
|
|
1686
|
+
*/
|
|
1687
|
+
export interface Evidence {
|
|
1688
|
+
/**
|
|
1689
|
+
* The username it typed.
|
|
1690
|
+
*/
|
|
1691
|
+
query: string;
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* Up to 10 accounts X suggested, in its order.
|
|
1695
|
+
*/
|
|
1696
|
+
suggestedUsernames: Array<string>;
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* Looks for the account's posts on its profile timeline. `visible` passes &
|
|
1702
|
+
* `hidden` fails.
|
|
1703
|
+
*/
|
|
1704
|
+
export interface Timeline {
|
|
1705
|
+
/**
|
|
1706
|
+
* The post count on the profile & the posts read.
|
|
1707
|
+
*/
|
|
1708
|
+
evidence: Timeline.Evidence | null;
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* `visible` means the timeline shows posts. `hidden` means X counts posts but
|
|
1712
|
+
* shows none. `no_posts` means the account has none to show.
|
|
1713
|
+
*/
|
|
1714
|
+
reason: 'visible' | 'hidden' | 'no_posts' | 'unavailable' | 'protected' | 'suspended';
|
|
1715
|
+
|
|
1716
|
+
verdict: ShadowbanVerdict;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
export namespace Timeline {
|
|
1720
|
+
/**
|
|
1721
|
+
* The post count on the profile & the posts read.
|
|
1722
|
+
*/
|
|
1723
|
+
export interface Evidence {
|
|
1724
|
+
/**
|
|
1725
|
+
* Posts X counts on the profile.
|
|
1726
|
+
*/
|
|
1727
|
+
postCount: number | null;
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* Posts the timeline read returned, up to 20.
|
|
1731
|
+
*/
|
|
1732
|
+
timelinePosts: number;
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* Reads the countries where X withholds the account. `none` passes & `countries`
|
|
1738
|
+
* fails.
|
|
1739
|
+
*/
|
|
1740
|
+
export interface Withheld {
|
|
1741
|
+
/**
|
|
1742
|
+
* The countries X lists.
|
|
1743
|
+
*/
|
|
1744
|
+
evidence: Withheld.Evidence | null;
|
|
1745
|
+
|
|
1746
|
+
/**
|
|
1747
|
+
* `countries` means X lists at least 1 country.
|
|
1748
|
+
*/
|
|
1749
|
+
reason: 'none' | 'countries' | 'suspended';
|
|
1750
|
+
|
|
1751
|
+
verdict: ShadowbanVerdict;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
export namespace Withheld {
|
|
1755
|
+
/**
|
|
1756
|
+
* The countries X lists.
|
|
1757
|
+
*/
|
|
1758
|
+
export interface Evidence {
|
|
1759
|
+
/**
|
|
1760
|
+
* Country codes as X gives them.
|
|
1761
|
+
*/
|
|
1762
|
+
countries: Array<string>;
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/**
|
|
1769
|
+
* Pass means X shows the account there, and fail means it doesn't. Unknown means
|
|
1770
|
+
* the check had nothing to test or X didn't answer.
|
|
1771
|
+
*/
|
|
1772
|
+
export type ShadowbanVerdict = 'pass' | 'fail' | 'unknown';
|
|
1773
|
+
|
|
1292
1774
|
/**
|
|
1293
1775
|
* Says whether a user broadcasts live video on X now. `broadcast` is their latest
|
|
1294
1776
|
* broadcast, live or ended, and null when X shows none.
|
|
@@ -1771,6 +2253,14 @@ export interface UserRemoveFollowerParams {
|
|
|
1771
2253
|
* days.
|
|
1772
2254
|
*/
|
|
1773
2255
|
'Idempotency-Key': string;
|
|
2256
|
+
|
|
2257
|
+
/**
|
|
2258
|
+
* Header param: A long write answers 202 with a status link, then lands on X.
|
|
2259
|
+
* `wait=<seconds>` asks for the answer within that many seconds, up to 85. If
|
|
2260
|
+
* the write is still running then, the API answers 202 with Location. Poll
|
|
2261
|
+
* Location until `terminal` is true, and don't send the write again.
|
|
2262
|
+
*/
|
|
2263
|
+
Prefer?: string;
|
|
1774
2264
|
}
|
|
1775
2265
|
|
|
1776
2266
|
export interface UserRetrieveAffiliatesParams {
|
|
@@ -4287,6 +4777,24 @@ export interface UserRetrieveSearchParams {
|
|
|
4287
4777
|
verifiedType?: string;
|
|
4288
4778
|
}
|
|
4289
4779
|
|
|
4780
|
+
export interface UserRetrieveShadowbanParams {
|
|
4781
|
+
/**
|
|
4782
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields, such as
|
|
4783
|
+
* author.username. A list keeps the field in each item. Case & underscores do not
|
|
4784
|
+
* matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
|
|
4785
|
+
* always stay. An unknown name answers 400 unknown_field with the valid names,
|
|
4786
|
+
* before any read. The price stays the same. SDK row types then hold only the
|
|
4787
|
+
* named fields.
|
|
4788
|
+
*/
|
|
4789
|
+
fields?: string;
|
|
4790
|
+
|
|
4791
|
+
/**
|
|
4792
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
4793
|
+
* fields. With fields, it drops from the kept fields.
|
|
4794
|
+
*/
|
|
4795
|
+
omit?: string;
|
|
4796
|
+
}
|
|
4797
|
+
|
|
4290
4798
|
export interface UserRetrieveSimilarParams {
|
|
4291
4799
|
/**
|
|
4292
4800
|
* Match any comma-separated or line-separated bio term, ignoring case.
|
|
@@ -5056,6 +5564,8 @@ export declare namespace Users {
|
|
|
5056
5564
|
type UserRetrieveListMembershipsResponse as UserRetrieveListMembershipsResponse,
|
|
5057
5565
|
type UserRetrieveListsResponse as UserRetrieveListsResponse,
|
|
5058
5566
|
type UserRetrieveLiveResponse as UserRetrieveLiveResponse,
|
|
5567
|
+
type ShadowbanReport as ShadowbanReport,
|
|
5568
|
+
type ShadowbanVerdict as ShadowbanVerdict,
|
|
5059
5569
|
type UserRetrieveVerifiedFollowersResponse as UserRetrieveVerifiedFollowersResponse,
|
|
5060
5570
|
type UserTranslateBioResponse as UserTranslateBioResponse,
|
|
5061
5571
|
type UserRetrieveParams as UserRetrieveParams,
|
|
@@ -5079,6 +5589,7 @@ export declare namespace Users {
|
|
|
5079
5589
|
type UserRetrieveMentionsParams as UserRetrieveMentionsParams,
|
|
5080
5590
|
type UserRetrieveRepliesParams as UserRetrieveRepliesParams,
|
|
5081
5591
|
type UserRetrieveSearchParams as UserRetrieveSearchParams,
|
|
5592
|
+
type UserRetrieveShadowbanParams as UserRetrieveShadowbanParams,
|
|
5082
5593
|
type UserRetrieveSimilarParams as UserRetrieveSimilarParams,
|
|
5083
5594
|
type UserRetrieveSubscriptionsParams as UserRetrieveSubscriptionsParams,
|
|
5084
5595
|
type UserRetrieveTweetsParams as UserRetrieveTweetsParams,
|
package/src/resources/x/x.ts
CHANGED
|
@@ -269,6 +269,8 @@ import {
|
|
|
269
269
|
} from './tweets/tweets';
|
|
270
270
|
import * as UsersAPI from './users/users';
|
|
271
271
|
import {
|
|
272
|
+
ShadowbanReport,
|
|
273
|
+
ShadowbanVerdict,
|
|
272
274
|
UserRemoveFollowerParams,
|
|
273
275
|
UserRemoveFollowerResponse,
|
|
274
276
|
UserRetrieveAffiliatesParams,
|
|
@@ -301,6 +303,7 @@ import {
|
|
|
301
303
|
UserRetrieveParams,
|
|
302
304
|
UserRetrieveRepliesParams,
|
|
303
305
|
UserRetrieveSearchParams,
|
|
306
|
+
UserRetrieveShadowbanParams,
|
|
304
307
|
UserRetrieveSimilarParams,
|
|
305
308
|
UserRetrieveSubscriptionsParams,
|
|
306
309
|
UserRetrieveTweetsParams,
|
|
@@ -1972,6 +1975,8 @@ export declare namespace X {
|
|
|
1972
1975
|
type UserRetrieveListMembershipsResponse as UserRetrieveListMembershipsResponse,
|
|
1973
1976
|
type UserRetrieveListsResponse as UserRetrieveListsResponse,
|
|
1974
1977
|
type UserRetrieveLiveResponse as UserRetrieveLiveResponse,
|
|
1978
|
+
type ShadowbanReport as ShadowbanReport,
|
|
1979
|
+
type ShadowbanVerdict as ShadowbanVerdict,
|
|
1975
1980
|
type UserRetrieveVerifiedFollowersResponse as UserRetrieveVerifiedFollowersResponse,
|
|
1976
1981
|
type UserTranslateBioResponse as UserTranslateBioResponse,
|
|
1977
1982
|
type UserRetrieveParams as UserRetrieveParams,
|
|
@@ -1995,6 +2000,7 @@ export declare namespace X {
|
|
|
1995
2000
|
type UserRetrieveMentionsParams as UserRetrieveMentionsParams,
|
|
1996
2001
|
type UserRetrieveRepliesParams as UserRetrieveRepliesParams,
|
|
1997
2002
|
type UserRetrieveSearchParams as UserRetrieveSearchParams,
|
|
2003
|
+
type UserRetrieveShadowbanParams as UserRetrieveShadowbanParams,
|
|
1998
2004
|
type UserRetrieveSimilarParams as UserRetrieveSimilarParams,
|
|
1999
2005
|
type UserRetrieveSubscriptionsParams as UserRetrieveSubscriptionsParams,
|
|
2000
2006
|
type UserRetrieveTweetsParams as UserRetrieveTweetsParams,
|
package/src/version.ts
CHANGED
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.20.0";
|
|
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.20.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED