x-twitter-scraper 0.3.3 → 0.4.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 +27 -0
- package/README.md +19 -2
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +23 -17
- package/client.d.mts.map +1 -1
- package/client.d.ts +23 -17
- package/client.d.ts.map +1 -1
- package/client.js +42 -17
- package/client.js.map +1 -1
- package/client.mjs +42 -17
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +4 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +4 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +3 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +3 -2
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +26 -16
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/account.d.mts +59 -3
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +59 -3
- package/resources/account.d.ts.map +1 -1
- package/resources/account.mjs.map +1 -1
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts.map +1 -1
- package/resources/compose.mjs.map +1 -1
- package/resources/credits.d.mts +88 -11
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +88 -11
- package/resources/credits.d.ts.map +1 -1
- package/resources/credits.js +37 -4
- package/resources/credits.js.map +1 -1
- package/resources/credits.mjs +37 -4
- package/resources/credits.mjs.map +1 -1
- package/resources/drafts.d.mts +4 -1
- package/resources/drafts.d.mts.map +1 -1
- package/resources/drafts.d.ts +4 -1
- package/resources/drafts.d.ts.map +1 -1
- package/resources/drafts.mjs.map +1 -1
- package/resources/draws.d.mts +33 -8
- package/resources/draws.d.mts.map +1 -1
- package/resources/draws.d.ts +33 -8
- package/resources/draws.d.ts.map +1 -1
- package/resources/draws.js +12 -4
- package/resources/draws.js.map +1 -1
- package/resources/draws.mjs +12 -4
- package/resources/draws.mjs.map +1 -1
- package/resources/events.d.mts +46 -7
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +46 -7
- package/resources/events.d.ts.map +1 -1
- package/resources/events.mjs.map +1 -1
- package/resources/extractions.d.mts +287 -17
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +287 -17
- package/resources/extractions.d.ts.map +1 -1
- package/resources/extractions.js +3 -2
- package/resources/extractions.js.map +1 -1
- package/resources/extractions.mjs +3 -2
- package/resources/extractions.mjs.map +1 -1
- package/resources/guest-wallets.d.mts +245 -0
- package/resources/guest-wallets.d.mts.map +1 -0
- package/resources/guest-wallets.d.ts +245 -0
- package/resources/guest-wallets.d.ts.map +1 -0
- package/resources/guest-wallets.js +79 -0
- package/resources/guest-wallets.js.map +1 -0
- package/resources/guest-wallets.mjs +75 -0
- package/resources/guest-wallets.mjs.map +1 -0
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/monitors/index.d.mts +3 -0
- package/resources/monitors/index.d.mts.map +1 -0
- package/resources/monitors/index.d.ts +3 -0
- package/resources/monitors/index.d.ts.map +1 -0
- package/resources/monitors/index.js +9 -0
- package/resources/monitors/index.js.map +1 -0
- package/resources/monitors/index.mjs +4 -0
- package/resources/monitors/index.mjs.map +1 -0
- package/resources/monitors/keywords.d.mts +164 -0
- package/resources/monitors/keywords.d.mts.map +1 -0
- package/resources/monitors/keywords.d.ts +164 -0
- package/resources/monitors/keywords.d.ts.map +1 -0
- package/resources/monitors/keywords.js +80 -0
- package/resources/monitors/keywords.js.map +1 -0
- package/resources/monitors/keywords.mjs +76 -0
- package/resources/monitors/keywords.mjs.map +1 -0
- package/resources/monitors/monitors.d.mts +127 -0
- package/resources/monitors/monitors.d.mts.map +1 -0
- package/resources/monitors/monitors.d.ts +127 -0
- package/resources/monitors/monitors.d.ts.map +1 -0
- package/resources/monitors/monitors.js +84 -0
- package/resources/monitors/monitors.js.map +1 -0
- package/resources/monitors/monitors.mjs +79 -0
- package/resources/monitors/monitors.mjs.map +1 -0
- package/resources/monitors.d.mts +1 -111
- package/resources/monitors.d.mts.map +1 -1
- package/resources/monitors.d.ts +1 -111
- package/resources/monitors.d.ts.map +1 -1
- package/resources/monitors.js +2 -70
- package/resources/monitors.js.map +1 -1
- package/resources/monitors.mjs +1 -68
- package/resources/monitors.mjs.map +1 -1
- package/resources/radar.d.mts +3 -3
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +3 -3
- package/resources/radar.d.ts.map +1 -1
- package/resources/radar.mjs.map +1 -1
- package/resources/shared.d.mts +251 -19
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +251 -19
- package/resources/shared.d.ts.map +1 -1
- package/resources/styles.d.mts.map +1 -1
- package/resources/styles.d.ts.map +1 -1
- package/resources/styles.mjs.map +1 -1
- package/resources/subscribe.d.mts +20 -6
- package/resources/subscribe.d.mts.map +1 -1
- package/resources/subscribe.d.ts +20 -6
- package/resources/subscribe.d.ts.map +1 -1
- package/resources/subscribe.js +12 -4
- package/resources/subscribe.js.map +1 -1
- package/resources/subscribe.mjs +12 -4
- package/resources/subscribe.mjs.map +1 -1
- package/resources/support/index.d.mts.map +1 -1
- package/resources/support/index.d.ts.map +1 -1
- package/resources/support/index.mjs.map +1 -1
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/support.mjs.map +1 -1
- package/resources/support/tickets.d.mts +9 -7
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +9 -7
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +9 -7
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +9 -7
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/support.d.mts.map +1 -1
- package/resources/support.d.ts.map +1 -1
- package/resources/support.mjs.map +1 -1
- package/resources/trends.d.mts +2 -2
- package/resources/trends.d.mts.map +1 -1
- package/resources/trends.d.ts +2 -2
- package/resources/trends.d.ts.map +1 -1
- package/resources/trends.mjs.map +1 -1
- package/resources/webhooks.d.mts +34 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +34 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +11 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +11 -0
- package/resources/webhooks.mjs.map +1 -1
- package/resources/x/account-connection-challenges.d.mts +41 -0
- package/resources/x/account-connection-challenges.d.mts.map +1 -0
- package/resources/x/account-connection-challenges.d.ts +41 -0
- package/resources/x/account-connection-challenges.d.ts.map +1 -0
- package/resources/x/account-connection-challenges.js +27 -0
- package/resources/x/account-connection-challenges.js.map +1 -0
- package/resources/x/account-connection-challenges.mjs +23 -0
- package/resources/x/account-connection-challenges.mjs.map +1 -0
- package/resources/x/accounts.d.mts +13 -41
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +13 -41
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +3 -3
- package/resources/x/accounts.mjs +3 -3
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/bookmarks.d.mts +6 -0
- package/resources/x/bookmarks.d.mts.map +1 -1
- package/resources/x/bookmarks.d.ts +6 -0
- package/resources/x/bookmarks.d.ts.map +1 -1
- package/resources/x/bookmarks.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +50 -14
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +50 -14
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +5 -2
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +6 -3
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/index.d.mts +2 -2
- package/resources/x/communities/index.d.mts.map +1 -1
- package/resources/x/communities/index.d.ts +2 -2
- package/resources/x/communities/index.d.ts.map +1 -1
- package/resources/x/communities/index.js.map +1 -1
- package/resources/x/communities/index.mjs +1 -1
- package/resources/x/communities/index.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +16 -12
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +16 -12
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +7 -8
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +7 -8
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/communities/tweets.d.mts +29 -6
- package/resources/x/communities/tweets.d.mts.map +1 -1
- package/resources/x/communities/tweets.d.ts +29 -6
- package/resources/x/communities/tweets.d.ts.map +1 -1
- package/resources/x/communities/tweets.js +5 -2
- package/resources/x/communities/tweets.js.map +1 -1
- package/resources/x/communities/tweets.mjs +5 -2
- package/resources/x/communities/tweets.mjs.map +1 -1
- package/resources/x/communities.d.mts.map +1 -1
- package/resources/x/communities.d.ts.map +1 -1
- package/resources/x/communities.mjs.map +1 -1
- package/resources/x/dm.d.mts +17 -5
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +17 -5
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +2 -2
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +2 -2
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/followers.d.mts +2 -2
- package/resources/x/followers.d.mts.map +1 -1
- package/resources/x/followers.d.ts +2 -2
- package/resources/x/followers.d.ts.map +1 -1
- package/resources/x/followers.mjs.map +1 -1
- package/resources/x/index.d.mts +4 -2
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +4 -2
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js +5 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs +2 -0
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/lists.d.mts +19 -0
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +19 -0
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/lists.mjs.map +1 -1
- package/resources/x/media.d.mts +17 -8
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +17 -8
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +2 -3
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +3 -4
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +8 -9
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +8 -9
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +4 -4
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +5 -5
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/index.d.mts.map +1 -1
- package/resources/x/tweets/index.d.ts.map +1 -1
- package/resources/x/tweets/index.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +442 -29
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +442 -29
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +1 -1
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +1 -1
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/tweets.d.mts.map +1 -1
- package/resources/x/tweets.d.ts.map +1 -1
- package/resources/x/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts.map +1 -1
- 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 +666 -9
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +666 -9
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +26 -4
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +26 -4
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/users.d.mts.map +1 -1
- package/resources/x/users.d.ts.map +1 -1
- package/resources/x/users.mjs.map +1 -1
- package/resources/x/write-actions.d.mts +51 -0
- package/resources/x/write-actions.d.mts.map +1 -0
- package/resources/x/write-actions.d.ts +51 -0
- package/resources/x/write-actions.d.ts.map +1 -0
- package/resources/x/write-actions.js +26 -0
- package/resources/x/write-actions.js.map +1 -0
- package/resources/x/write-actions.mjs +22 -0
- package/resources/x/write-actions.mjs.map +1 -0
- package/resources/x/x.d.mts +65 -12
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +65 -12
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +10 -1
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +10 -1
- package/resources/x/x.mjs.map +1 -1
- package/resources/x.d.mts.map +1 -1
- package/resources/x.d.ts.map +1 -1
- package/resources/x.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +86 -40
- package/src/internal/request-options.ts +2 -0
- package/src/internal/utils/log.ts +2 -1
- package/src/resources/account.ts +72 -5
- package/src/resources/credits.ts +117 -10
- package/src/resources/drafts.ts +4 -1
- package/src/resources/draws.ts +33 -12
- package/src/resources/events.ts +52 -7
- package/src/resources/extractions.ts +364 -12
- package/src/resources/guest-wallets.ts +337 -0
- package/src/resources/index.ts +15 -10
- package/src/resources/monitors/index.ts +21 -0
- package/src/resources/monitors/keywords.ts +221 -0
- package/src/resources/monitors/monitors.ts +195 -0
- package/src/resources/monitors.ts +1 -153
- package/src/resources/radar.ts +3 -3
- package/src/resources/shared.ts +463 -21
- package/src/resources/subscribe.ts +29 -8
- package/src/resources/support/tickets.ts +9 -7
- package/src/resources/trends.ts +2 -2
- package/src/resources/webhooks.ts +43 -0
- package/src/resources/x/account-connection-challenges.ts +61 -0
- package/src/resources/x/accounts.ts +15 -46
- package/src/resources/x/bookmarks.ts +6 -0
- package/src/resources/x/communities/communities.ts +68 -16
- package/src/resources/x/communities/index.ts +7 -2
- package/src/resources/x/communities/join.ts +23 -16
- package/src/resources/x/communities/tweets.ts +32 -6
- package/src/resources/x/dm.ts +20 -7
- package/src/resources/x/followers.ts +2 -2
- package/src/resources/x/index.ts +10 -1
- package/src/resources/x/lists.ts +22 -0
- package/src/resources/x/media.ts +25 -11
- package/src/resources/x/profile.ts +11 -12
- package/src/resources/x/tweets/tweets.ts +540 -32
- package/src/resources/x/users/index.ts +4 -0
- package/src/resources/x/users/users.ts +834 -8
- package/src/resources/x/write-actions.ts +79 -0
- package/src/resources/x/x.ts +107 -10
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +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/resources/api-keys.d.mts +0 -68
- package/resources/api-keys.d.mts.map +0 -1
- package/resources/api-keys.d.ts +0 -68
- package/resources/api-keys.d.ts.map +0 -1
- package/resources/api-keys.js +0 -48
- package/resources/api-keys.js.map +0 -1
- package/resources/api-keys.mjs +0 -44
- package/resources/api-keys.mjs.map +0 -1
- package/resources/bot/bot.d.mts +0 -10
- package/resources/bot/bot.d.mts.map +0 -1
- package/resources/bot/bot.d.ts +0 -10
- package/resources/bot/bot.d.ts.map +0 -1
- package/resources/bot/bot.js +0 -17
- package/resources/bot/bot.js.map +0 -1
- package/resources/bot/bot.mjs +0 -12
- package/resources/bot/bot.mjs.map +0 -1
- package/resources/bot/index.d.mts +0 -3
- package/resources/bot/index.d.mts.map +0 -1
- package/resources/bot/index.d.ts +0 -3
- package/resources/bot/index.d.ts.map +0 -1
- package/resources/bot/index.js +0 -9
- package/resources/bot/index.js.map +0 -1
- package/resources/bot/index.mjs +0 -4
- package/resources/bot/index.mjs.map +0 -1
- package/resources/bot/platform-links.d.mts +0 -4
- package/resources/bot/platform-links.d.mts.map +0 -1
- package/resources/bot/platform-links.d.ts +0 -4
- package/resources/bot/platform-links.d.ts.map +0 -1
- package/resources/bot/platform-links.js +0 -9
- package/resources/bot/platform-links.js.map +0 -1
- package/resources/bot/platform-links.mjs +0 -5
- package/resources/bot/platform-links.mjs.map +0 -1
- package/resources/bot.d.mts +0 -2
- package/resources/bot.d.mts.map +0 -1
- package/resources/bot.d.ts +0 -2
- package/resources/bot.d.ts.map +0 -1
- package/resources/bot.js +0 -6
- package/resources/bot.js.map +0 -1
- package/resources/bot.mjs +0 -3
- package/resources/bot.mjs.map +0 -1
- package/src/resources/api-keys.ts +0 -100
- package/src/resources/bot/bot.ts +0 -15
- package/src/resources/bot/index.ts +0 -4
- package/src/resources/bot/platform-links.ts +0 -5
- package/src/resources/bot.ts +0 -3
|
@@ -106,8 +106,9 @@ export const formatRequestDetails = (details: {
|
|
|
106
106
|
([name, value]) => [
|
|
107
107
|
name,
|
|
108
108
|
(
|
|
109
|
-
name.toLowerCase() === 'x-api-key' ||
|
|
110
109
|
name.toLowerCase() === 'authorization' ||
|
|
110
|
+
name.toLowerCase() === 'api-key' ||
|
|
111
|
+
name.toLowerCase() === 'x-api-key' ||
|
|
111
112
|
name.toLowerCase() === 'cookie' ||
|
|
112
113
|
name.toLowerCase() === 'set-cookie'
|
|
113
114
|
) ?
|
package/src/resources/account.ts
CHANGED
|
@@ -56,6 +56,12 @@ export class Account extends APIResource {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
export interface AccountRetrieveResponse {
|
|
59
|
+
monitorBilling: AccountRetrieveResponse.MonitorBilling;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated Monitor slots are unlimited. Use monitorBilling.unlimitedSlots
|
|
63
|
+
* instead.
|
|
64
|
+
*/
|
|
59
65
|
monitorsAllowed: number;
|
|
60
66
|
|
|
61
67
|
monitorsUsed: number;
|
|
@@ -63,17 +69,78 @@ export interface AccountRetrieveResponse {
|
|
|
63
69
|
plan: 'active' | 'inactive';
|
|
64
70
|
|
|
65
71
|
creditInfo?: AccountRetrieveResponse.CreditInfo;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Linked X username, omitted when no X account is connected.
|
|
75
|
+
*/
|
|
76
|
+
xUsername?: string;
|
|
66
77
|
}
|
|
67
78
|
|
|
68
79
|
export namespace AccountRetrieveResponse {
|
|
69
|
-
export interface
|
|
70
|
-
|
|
80
|
+
export interface MonitorBilling {
|
|
81
|
+
/**
|
|
82
|
+
* Estimated daily usage for currently active monitors.
|
|
83
|
+
*/
|
|
84
|
+
activeDailyEstimate: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Usage charged each hour for currently active monitors.
|
|
88
|
+
*/
|
|
89
|
+
activeHourlyBurn: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Estimated daily usage for 1 active instant monitor.
|
|
93
|
+
*/
|
|
94
|
+
creditsPerActiveMonitorDay: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Hourly usage charged for 1 active instant monitor.
|
|
98
|
+
*/
|
|
99
|
+
creditsPerActiveMonitorHour: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Webhook and event deliveries are included in monitor billing.
|
|
103
|
+
*/
|
|
104
|
+
eventsIncluded: boolean;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Active monitors check every 1 second.
|
|
108
|
+
*/
|
|
109
|
+
instantCheckIntervalSeconds: number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Monitor slot count is unlimited.
|
|
113
|
+
*/
|
|
114
|
+
unlimitedSlots: boolean;
|
|
115
|
+
}
|
|
71
116
|
|
|
72
|
-
|
|
117
|
+
export interface CreditInfo {
|
|
118
|
+
/**
|
|
119
|
+
* Dollar amount charged when automatic top-up runs.
|
|
120
|
+
*/
|
|
121
|
+
autoTopupAmountDollars: number;
|
|
73
122
|
|
|
74
|
-
|
|
123
|
+
autoTopupEnabled: boolean;
|
|
75
124
|
|
|
76
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Bigint string threshold that triggers automatic top-up when enabled.
|
|
127
|
+
*/
|
|
128
|
+
autoTopupThreshold: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Bigint string to preserve precision above Number.MAX_SAFE_INTEGER.
|
|
132
|
+
*/
|
|
133
|
+
balance: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Total purchased usage as a bigint string.
|
|
137
|
+
*/
|
|
138
|
+
lifetimePurchased: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Total consumed usage as a bigint string.
|
|
142
|
+
*/
|
|
143
|
+
lifetimeUsed: string;
|
|
77
144
|
}
|
|
78
145
|
}
|
|
79
146
|
|
package/src/resources/credits.ts
CHANGED
|
@@ -2,14 +2,37 @@
|
|
|
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
|
|
|
7
8
|
/**
|
|
8
|
-
* Subscription, billing, and
|
|
9
|
+
* Subscription, billing, and usage balance
|
|
9
10
|
*/
|
|
10
11
|
export class Credits extends APIResource {
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* Redirect to an active top-up payment page
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* await client.credits.redirectTopupCheckout({
|
|
18
|
+
* session_id: 'session_id',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
redirectTopupCheckout(
|
|
23
|
+
query: CreditRedirectTopupCheckoutParams,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): APIPromise<void> {
|
|
26
|
+
return this._client.get('/credits/topup/redirect', {
|
|
27
|
+
query,
|
|
28
|
+
...options,
|
|
29
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
30
|
+
__security: {},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get usage balance
|
|
13
36
|
*
|
|
14
37
|
* @example
|
|
15
38
|
* ```ts
|
|
@@ -21,12 +44,30 @@ export class Credits extends APIResource {
|
|
|
21
44
|
}
|
|
22
45
|
|
|
23
46
|
/**
|
|
24
|
-
*
|
|
47
|
+
* Get top-up billing status
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const response = await client.credits.retrieveTopupStatus({
|
|
52
|
+
* session_id: 'session_id',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
retrieveTopupStatus(
|
|
57
|
+
query: CreditRetrieveTopupStatusParams,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): APIPromise<CreditRetrieveTopupStatusResponse> {
|
|
60
|
+
return this._client.get('/credits/topup/status', { query, ...options });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Create a Stripe Checkout session only after the user confirms. The request never
|
|
65
|
+
* completes payment or adds balance by itself.
|
|
25
66
|
*
|
|
26
67
|
* @example
|
|
27
68
|
* ```ts
|
|
28
69
|
* const response = await client.credits.topupBalance({
|
|
29
|
-
*
|
|
70
|
+
* dollars: 10,
|
|
30
71
|
* });
|
|
31
72
|
* ```
|
|
32
73
|
*/
|
|
@@ -39,30 +80,96 @@ export class Credits extends APIResource {
|
|
|
39
80
|
}
|
|
40
81
|
|
|
41
82
|
export interface CreditRetrieveBalanceResponse {
|
|
83
|
+
/**
|
|
84
|
+
* Configured dollar amount for each automatic top-up.
|
|
85
|
+
*/
|
|
86
|
+
auto_topup_amount_dollars: number;
|
|
87
|
+
|
|
42
88
|
auto_topup_enabled: boolean;
|
|
43
89
|
|
|
44
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Usage balance threshold that triggers automatic top-up when enabled,
|
|
92
|
+
* represented as a bigint string.
|
|
93
|
+
*/
|
|
94
|
+
auto_topup_threshold: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Current usage balance as a bigint string to preserve precision above
|
|
98
|
+
* Number.MAX_SAFE_INTEGER.
|
|
99
|
+
*/
|
|
100
|
+
balance: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Lifetime purchased usage as a bigint string.
|
|
104
|
+
*/
|
|
105
|
+
lifetime_purchased: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Lifetime consumed usage as a bigint string.
|
|
109
|
+
*/
|
|
110
|
+
lifetime_used: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface CreditRetrieveTopupStatusResponse {
|
|
114
|
+
status: 'paid' | 'processing' | 'failed' | 'expired';
|
|
45
115
|
|
|
46
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Dollar amount requested for the top-up.
|
|
118
|
+
*/
|
|
119
|
+
amount_dollars?: number | null;
|
|
47
120
|
|
|
48
|
-
|
|
121
|
+
/**
|
|
122
|
+
* Bigint string usage amount granted or pending.
|
|
123
|
+
*/
|
|
124
|
+
credits?: string;
|
|
49
125
|
}
|
|
50
126
|
|
|
51
127
|
export interface CreditTopupBalanceResponse {
|
|
52
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Stable first-party Xquik redirect URL for the active Stripe Checkout session.
|
|
130
|
+
*/
|
|
131
|
+
redirect_url: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Same stable first-party Xquik redirect URL as redirect_url. The response never
|
|
135
|
+
* exposes a raw Stripe Checkout URL.
|
|
136
|
+
*/
|
|
137
|
+
url: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface CreditRedirectTopupCheckoutParams {
|
|
141
|
+
/**
|
|
142
|
+
* Billing session ID returned by the top-up billing flow.
|
|
143
|
+
*/
|
|
144
|
+
session_id: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface CreditRetrieveTopupStatusParams {
|
|
148
|
+
/**
|
|
149
|
+
* Billing session ID returned by the top-up billing flow.
|
|
150
|
+
*/
|
|
151
|
+
session_id: string;
|
|
53
152
|
}
|
|
54
153
|
|
|
55
154
|
export interface CreditTopupBalanceParams {
|
|
56
155
|
/**
|
|
57
|
-
* Amount to top up in
|
|
156
|
+
* Amount to top up in US dollars. Minimum 10.
|
|
157
|
+
*/
|
|
158
|
+
dollars: number;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Optional checkout locale. Defaults to en.
|
|
58
162
|
*/
|
|
59
|
-
|
|
163
|
+
locale?: string;
|
|
60
164
|
}
|
|
61
165
|
|
|
62
166
|
export declare namespace Credits {
|
|
63
167
|
export {
|
|
64
168
|
type CreditRetrieveBalanceResponse as CreditRetrieveBalanceResponse,
|
|
169
|
+
type CreditRetrieveTopupStatusResponse as CreditRetrieveTopupStatusResponse,
|
|
65
170
|
type CreditTopupBalanceResponse as CreditTopupBalanceResponse,
|
|
171
|
+
type CreditRedirectTopupCheckoutParams as CreditRedirectTopupCheckoutParams,
|
|
172
|
+
type CreditRetrieveTopupStatusParams as CreditRetrieveTopupStatusParams,
|
|
66
173
|
type CreditTopupBalanceParams as CreditTopupBalanceParams,
|
|
67
174
|
};
|
|
68
175
|
}
|
package/src/resources/drafts.ts
CHANGED
|
@@ -124,7 +124,10 @@ export interface DraftListParams {
|
|
|
124
124
|
afterCursor?: string;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* Maximum number of items to return (1-100, default 50)
|
|
127
|
+
* Maximum number of items to return (1-100, default 50). For paid per-result
|
|
128
|
+
* endpoints, the returned count may be lower when available usage balance cannot cover
|
|
129
|
+
* the requested page. If zero paid results are affordable, the endpoint returns
|
|
130
|
+
* 402 insufficient_credits.
|
|
128
131
|
*/
|
|
129
132
|
limit?: number;
|
|
130
133
|
}
|
package/src/resources/draws.ts
CHANGED
|
@@ -15,7 +15,9 @@ export class Draws extends APIResource {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
18
|
-
* const draw = await client.draws.retrieve(
|
|
18
|
+
* const draw = await client.draws.retrieve(
|
|
19
|
+
* 'f4bd00a2-7b4e-4e59-8e1b-72e2c9f12345',
|
|
20
|
+
* );
|
|
19
21
|
* ```
|
|
20
22
|
*/
|
|
21
23
|
retrieve(id: string, options?: RequestOptions): APIPromise<DrawRetrieveResponse> {
|
|
@@ -42,17 +44,16 @@ export class Draws extends APIResource {
|
|
|
42
44
|
*
|
|
43
45
|
* @example
|
|
44
46
|
* ```ts
|
|
45
|
-
* const response = await client.draws.export(
|
|
47
|
+
* const response = await client.draws.export(
|
|
48
|
+
* 'f4bd00a2-7b4e-4e59-8e1b-72e2c9f12345',
|
|
49
|
+
* { format: 'csv' },
|
|
50
|
+
* );
|
|
46
51
|
*
|
|
47
52
|
* const content = await response.blob();
|
|
48
53
|
* console.log(content);
|
|
49
54
|
* ```
|
|
50
55
|
*/
|
|
51
|
-
export(
|
|
52
|
-
id: string,
|
|
53
|
-
query: DrawExportParams | null | undefined = {},
|
|
54
|
-
options?: RequestOptions,
|
|
55
|
-
): APIPromise<Response> {
|
|
56
|
+
export(id: string, query: DrawExportParams, options?: RequestOptions): APIPromise<Response> {
|
|
56
57
|
return this._client.get(path`/draws/${id}/export`, {
|
|
57
58
|
query,
|
|
58
59
|
...options,
|
|
@@ -62,7 +63,10 @@ export class Draws extends APIResource {
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
/**
|
|
65
|
-
*
|
|
66
|
+
* Runs a giveaway draw from a source tweet. The draw first checks that the usage
|
|
67
|
+
* balance can inspect the source tweet and at least 1 candidate. Available balance
|
|
68
|
+
* caps how many replies and retweeters can be inspected before filters and winner
|
|
69
|
+
* selection run.
|
|
66
70
|
*
|
|
67
71
|
* @example
|
|
68
72
|
* ```ts
|
|
@@ -82,6 +86,9 @@ export class Draws extends APIResource {
|
|
|
82
86
|
* Full giveaway draw with tweet metrics, entries, and timing.
|
|
83
87
|
*/
|
|
84
88
|
export interface DrawDetail {
|
|
89
|
+
/**
|
|
90
|
+
* Draw public ID.
|
|
91
|
+
*/
|
|
85
92
|
id: string;
|
|
86
93
|
|
|
87
94
|
createdAt: string;
|
|
@@ -115,6 +122,9 @@ export interface DrawDetail {
|
|
|
115
122
|
* Giveaway draw summary with entry counts and status.
|
|
116
123
|
*/
|
|
117
124
|
export interface DrawListItem {
|
|
125
|
+
/**
|
|
126
|
+
* Draw public ID for detail responses.
|
|
127
|
+
*/
|
|
118
128
|
id: string;
|
|
119
129
|
|
|
120
130
|
createdAt: string;
|
|
@@ -163,10 +173,18 @@ export interface DrawListResponse {
|
|
|
163
173
|
export interface DrawRunResponse {
|
|
164
174
|
id: string;
|
|
165
175
|
|
|
176
|
+
/**
|
|
177
|
+
* Candidate entries inspected for this draw. This may
|
|
178
|
+
* be lower than the source tweet's full reply count.
|
|
179
|
+
*/
|
|
166
180
|
totalEntries: number;
|
|
167
181
|
|
|
168
182
|
tweetId: string;
|
|
169
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Entries from the inspected candidate set that passed all filters. This is not
|
|
186
|
+
* necessarily every valid reply on the source tweet when the available balance limits inspection.
|
|
187
|
+
*/
|
|
170
188
|
validEntries: number;
|
|
171
189
|
|
|
172
190
|
winners: Array<Winner>;
|
|
@@ -174,12 +192,15 @@ export interface DrawRunResponse {
|
|
|
174
192
|
|
|
175
193
|
export interface DrawListParams {
|
|
176
194
|
/**
|
|
177
|
-
* Cursor for keyset pagination
|
|
195
|
+
* Cursor for keyset pagination from prior response next_cursor
|
|
178
196
|
*/
|
|
179
|
-
|
|
197
|
+
cursor?: string;
|
|
180
198
|
|
|
181
199
|
/**
|
|
182
|
-
* Maximum number of items to return (1-100, default 50)
|
|
200
|
+
* Maximum number of items to return (1-100, default 50). For paid per-result
|
|
201
|
+
* endpoints, the returned count may be lower when available usage balance cannot cover
|
|
202
|
+
* the requested page. If zero paid results are affordable, the endpoint returns
|
|
203
|
+
* 402 insufficient_credits.
|
|
183
204
|
*/
|
|
184
205
|
limit?: number;
|
|
185
206
|
}
|
|
@@ -188,7 +209,7 @@ export interface DrawExportParams {
|
|
|
188
209
|
/**
|
|
189
210
|
* Export output format
|
|
190
211
|
*/
|
|
191
|
-
format
|
|
212
|
+
format: 'csv' | 'json' | 'md' | 'md-document' | 'pdf' | 'txt' | 'xlsx';
|
|
192
213
|
|
|
193
214
|
/**
|
|
194
215
|
* Export winners or all entries
|
package/src/resources/events.ts
CHANGED
|
@@ -29,15 +29,23 @@ export class Events extends APIResource {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Monitor event summary with
|
|
32
|
+
* Monitor event summary with source metadata and occurrence time.
|
|
33
33
|
*/
|
|
34
34
|
export interface Event {
|
|
35
35
|
id: string;
|
|
36
36
|
|
|
37
37
|
data: { [key: string]: unknown };
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Account monitor ID for account events, or keyword monitor ID for keyword events.
|
|
41
|
+
*/
|
|
39
42
|
monitorId: string;
|
|
40
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Source monitor type.
|
|
46
|
+
*/
|
|
47
|
+
monitorType: 'account' | 'keyword';
|
|
48
|
+
|
|
41
49
|
occurredAt: string;
|
|
42
50
|
|
|
43
51
|
/**
|
|
@@ -45,7 +53,20 @@ export interface Event {
|
|
|
45
53
|
*/
|
|
46
54
|
type: Shared.EventType;
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Keyword monitor ID, present for keyword monitor events.
|
|
58
|
+
*/
|
|
59
|
+
keywordMonitorId?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Keyword query, present for keyword monitor events.
|
|
63
|
+
*/
|
|
64
|
+
query?: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Account username, present for account monitor events.
|
|
68
|
+
*/
|
|
69
|
+
username?: string;
|
|
49
70
|
}
|
|
50
71
|
|
|
51
72
|
/**
|
|
@@ -55,12 +76,20 @@ export interface EventDetail {
|
|
|
55
76
|
id: string;
|
|
56
77
|
|
|
57
78
|
/**
|
|
58
|
-
* Event payload
|
|
79
|
+
* Event payload - shape varies by event type (JSON)
|
|
59
80
|
*/
|
|
60
81
|
data: { [key: string]: unknown };
|
|
61
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Monitor ID associated with this detailed event payload.
|
|
85
|
+
*/
|
|
62
86
|
monitorId: string;
|
|
63
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Source monitor type for this detailed event.
|
|
90
|
+
*/
|
|
91
|
+
monitorType: 'account' | 'keyword';
|
|
92
|
+
|
|
64
93
|
occurredAt: string;
|
|
65
94
|
|
|
66
95
|
/**
|
|
@@ -68,7 +97,20 @@ export interface EventDetail {
|
|
|
68
97
|
*/
|
|
69
98
|
type: Shared.EventType;
|
|
70
99
|
|
|
71
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Keyword monitor ID included on detailed keyword events.
|
|
102
|
+
*/
|
|
103
|
+
keywordMonitorId?: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Keyword query for this detailed monitor event.
|
|
107
|
+
*/
|
|
108
|
+
query?: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Account username for this detailed monitor event.
|
|
112
|
+
*/
|
|
113
|
+
username?: string;
|
|
72
114
|
|
|
73
115
|
xEventId?: string;
|
|
74
116
|
}
|
|
@@ -83,9 +125,9 @@ export interface EventListResponse {
|
|
|
83
125
|
|
|
84
126
|
export interface EventListParams {
|
|
85
127
|
/**
|
|
86
|
-
* Cursor for keyset pagination
|
|
128
|
+
* Cursor for keyset pagination from prior response next_cursor
|
|
87
129
|
*/
|
|
88
|
-
|
|
130
|
+
cursor?: string;
|
|
89
131
|
|
|
90
132
|
/**
|
|
91
133
|
* Filter events by type
|
|
@@ -93,7 +135,10 @@ export interface EventListParams {
|
|
|
93
135
|
eventType?: Shared.EventType;
|
|
94
136
|
|
|
95
137
|
/**
|
|
96
|
-
* Maximum number of items to return (1-100, default 50)
|
|
138
|
+
* Maximum number of items to return (1-100, default 50). For paid per-result
|
|
139
|
+
* endpoints, the returned count may be lower when available usage balance cannot cover
|
|
140
|
+
* the requested page. If zero paid results are affordable, the endpoint returns
|
|
141
|
+
* 402 insufficient_credits.
|
|
97
142
|
*/
|
|
98
143
|
limit?: number;
|
|
99
144
|
|