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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.mts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhooks.d.mts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,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BAAmB;IAClC;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAEpC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAErC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
package/resources/webhooks.d.ts
CHANGED
|
@@ -57,6 +57,15 @@ export declare class Webhooks extends APIResource {
|
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
59
|
listDeliveries(id: string, options?: RequestOptions): APIPromise<WebhookListDeliveriesResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Test and resume webhook endpoint
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const response = await client.webhooks.resume('id');
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
resume(id: string, options?: RequestOptions): APIPromise<WebhookResumeResponse>;
|
|
60
69
|
/**
|
|
61
70
|
* Test webhook endpoint
|
|
62
71
|
*
|
|
@@ -85,11 +94,24 @@ export interface Delivery {
|
|
|
85
94
|
*/
|
|
86
95
|
export interface Webhook {
|
|
87
96
|
id: string;
|
|
97
|
+
/**
|
|
98
|
+
* Consecutive failed delivery attempts since the last success.
|
|
99
|
+
*/
|
|
100
|
+
consecutiveFailures: number;
|
|
88
101
|
createdAt: string;
|
|
102
|
+
/**
|
|
103
|
+
* Endpoint delivery state. needs_attention means delivery stopped after repeated
|
|
104
|
+
* failures.
|
|
105
|
+
*/
|
|
106
|
+
deliveryStatus: 'active' | 'paused' | 'needs_attention';
|
|
89
107
|
/**
|
|
90
108
|
* Array of event types to subscribe to.
|
|
91
109
|
*/
|
|
92
110
|
eventTypes: Array<Shared.EventType>;
|
|
111
|
+
/**
|
|
112
|
+
* Consecutive delivery failures that pause the endpoint.
|
|
113
|
+
*/
|
|
114
|
+
failureHardCap: number;
|
|
93
115
|
isActive: boolean;
|
|
94
116
|
url: string;
|
|
95
117
|
}
|
|
@@ -100,6 +122,9 @@ export interface WebhookCreateResponse {
|
|
|
100
122
|
* Array of event types to subscribe to.
|
|
101
123
|
*/
|
|
102
124
|
eventTypes: Array<Shared.EventType>;
|
|
125
|
+
/**
|
|
126
|
+
* Plaintext HMAC signing secret returned only at creation.
|
|
127
|
+
*/
|
|
103
128
|
secret: string;
|
|
104
129
|
url: string;
|
|
105
130
|
}
|
|
@@ -112,6 +137,14 @@ export interface WebhookDeactivateResponse {
|
|
|
112
137
|
export interface WebhookListDeliveriesResponse {
|
|
113
138
|
deliveries: Array<Delivery>;
|
|
114
139
|
}
|
|
140
|
+
export interface WebhookResumeResponse {
|
|
141
|
+
statusCode: number;
|
|
142
|
+
success: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Webhook endpoint registered to receive event deliveries.
|
|
145
|
+
*/
|
|
146
|
+
webhook: Webhook;
|
|
147
|
+
}
|
|
115
148
|
export interface WebhookTestResponse {
|
|
116
149
|
statusCode: number;
|
|
117
150
|
success: boolean;
|
|
@@ -136,6 +169,6 @@ export interface WebhookUpdateParams {
|
|
|
136
169
|
url?: string;
|
|
137
170
|
}
|
|
138
171
|
export declare namespace Webhooks {
|
|
139
|
-
export { type Delivery as Delivery, type Webhook as Webhook, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeactivateResponse as WebhookDeactivateResponse, type WebhookListDeliveriesResponse as WebhookListDeliveriesResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, };
|
|
172
|
+
export { type Delivery as Delivery, type Webhook as Webhook, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeactivateResponse as WebhookDeactivateResponse, type WebhookListDeliveriesResponse as WebhookListDeliveriesResponse, type WebhookResumeResponse as WebhookResumeResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, };
|
|
140
173
|
}
|
|
141
174
|
//# sourceMappingURL=webhooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC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KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
package/resources/webhooks.js
CHANGED
|
@@ -69,6 +69,17 @@ class Webhooks extends resource_1.APIResource {
|
|
|
69
69
|
listDeliveries(id, options) {
|
|
70
70
|
return this._client.get((0, path_1.path) `/webhooks/${id}/deliveries`, options);
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Test and resume webhook endpoint
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const response = await client.webhooks.resume('id');
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
resume(id, options) {
|
|
81
|
+
return this._client.post((0, path_1.path) `/webhooks/${id}/resume`, options);
|
|
82
|
+
}
|
|
72
83
|
/**
|
|
73
84
|
* Test webhook endpoint
|
|
74
85
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IA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,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,EAAU,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,EAAU,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AA1FD,4BA0FC"}
|
package/resources/webhooks.mjs
CHANGED
|
@@ -66,6 +66,17 @@ export class Webhooks extends APIResource {
|
|
|
66
66
|
listDeliveries(id, options) {
|
|
67
67
|
return this._client.get(path `/webhooks/${id}/deliveries`, options);
|
|
68
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Test and resume webhook endpoint
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const response = await client.webhooks.resume('id');
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
resume(id, options) {
|
|
78
|
+
return this._client.post(path `/webhooks/${id}/resume`, options);
|
|
79
|
+
}
|
|
69
80
|
/**
|
|
70
81
|
* Test webhook endpoint
|
|
71
82
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.mjs","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"webhooks.mjs","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,EAAU,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,EAAU,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Connected X account management
|
|
6
|
+
*/
|
|
7
|
+
export declare class AccountConnectionChallenges extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Submit X account email verification code
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.x.accountConnectionChallenges.submit('id', {
|
|
15
|
+
* email_code: '123456',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
submit(id: string, body: AccountConnectionChallengeSubmitParams, options?: RequestOptions): APIPromise<AccountConnectionChallengeSubmitResponse>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
23
|
+
*/
|
|
24
|
+
export interface AccountConnectionChallengeSubmitResponse {
|
|
25
|
+
id: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
health: 'healthy' | 'locked' | 'needsReauth' | 'recovering' | 'suspended' | 'temporaryIssue';
|
|
28
|
+
status: string;
|
|
29
|
+
xUserId: string;
|
|
30
|
+
xUsername: string;
|
|
31
|
+
}
|
|
32
|
+
export interface AccountConnectionChallengeSubmitParams {
|
|
33
|
+
/**
|
|
34
|
+
* Code sent to the account email.
|
|
35
|
+
*/
|
|
36
|
+
email_code: string;
|
|
37
|
+
}
|
|
38
|
+
export declare namespace AccountConnectionChallenges {
|
|
39
|
+
export { type AccountConnectionChallengeSubmitResponse as AccountConnectionChallengeSubmitResponse, type AccountConnectionChallengeSubmitParams as AccountConnectionChallengeSubmitParams, };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=account-connection-challenges.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-connection-challenges.d.mts","sourceRoot":"","sources":["../../src/resources/x/account-connection-challenges.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,WAAW;IAC1D;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,sCAAsC,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wCAAwC,CAAC;CAGxD;AAED;;GAEG;AACH,MAAM,WAAW,wCAAwC;IACvD,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,gBAAgB,CAAC;IAE7F,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,MAAM,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sCAAsC;IACrD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,2BAA2B,CAAC;IACnD,OAAO,EACL,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,sCAAsC,IAAI,sCAAsC,GACtF,CAAC;CACH"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Connected X account management
|
|
6
|
+
*/
|
|
7
|
+
export declare class AccountConnectionChallenges extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Submit X account email verification code
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.x.accountConnectionChallenges.submit('id', {
|
|
15
|
+
* email_code: '123456',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
submit(id: string, body: AccountConnectionChallengeSubmitParams, options?: RequestOptions): APIPromise<AccountConnectionChallengeSubmitResponse>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
23
|
+
*/
|
|
24
|
+
export interface AccountConnectionChallengeSubmitResponse {
|
|
25
|
+
id: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
health: 'healthy' | 'locked' | 'needsReauth' | 'recovering' | 'suspended' | 'temporaryIssue';
|
|
28
|
+
status: string;
|
|
29
|
+
xUserId: string;
|
|
30
|
+
xUsername: string;
|
|
31
|
+
}
|
|
32
|
+
export interface AccountConnectionChallengeSubmitParams {
|
|
33
|
+
/**
|
|
34
|
+
* Code sent to the account email.
|
|
35
|
+
*/
|
|
36
|
+
email_code: string;
|
|
37
|
+
}
|
|
38
|
+
export declare namespace AccountConnectionChallenges {
|
|
39
|
+
export { type AccountConnectionChallengeSubmitResponse as AccountConnectionChallengeSubmitResponse, type AccountConnectionChallengeSubmitParams as AccountConnectionChallengeSubmitParams, };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=account-connection-challenges.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-connection-challenges.d.ts","sourceRoot":"","sources":["../../src/resources/x/account-connection-challenges.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,WAAW;IAC1D;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,sCAAsC,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wCAAwC,CAAC;CAGxD;AAED;;GAEG;AACH,MAAM,WAAW,wCAAwC;IACvD,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,gBAAgB,CAAC;IAE7F,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,MAAM,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sCAAsC;IACrD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,2BAA2B,CAAC;IACnD,OAAO,EACL,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,sCAAsC,IAAI,sCAAsC,GACtF,CAAC;CACH"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AccountConnectionChallenges = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Connected X account management
|
|
9
|
+
*/
|
|
10
|
+
class AccountConnectionChallenges extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Submit X account email verification code
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.x.accountConnectionChallenges.submit('id', {
|
|
18
|
+
* email_code: '123456',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
submit(id, body, options) {
|
|
23
|
+
return this._client.post((0, path_1.path) `/x/account-connection-challenges/${id}/submit`, { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.AccountConnectionChallenges = AccountConnectionChallenges;
|
|
27
|
+
//# sourceMappingURL=account-connection-challenges.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-connection-challenges.js","sourceRoot":"","sources":["../../src/resources/x/account-connection-challenges.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,2BAA4B,SAAQ,sBAAW;IAC1D;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAU,EACV,IAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oCAAoC,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;CACF;AAnBD,kEAmBC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Connected X account management
|
|
6
|
+
*/
|
|
7
|
+
export class AccountConnectionChallenges extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Submit X account email verification code
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.x.accountConnectionChallenges.submit('id', {
|
|
15
|
+
* email_code: '123456',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
submit(id, body, options) {
|
|
20
|
+
return this._client.post(path `/x/account-connection-challenges/${id}/submit`, { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=account-connection-challenges.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-connection-challenges.mjs","sourceRoot":"","sources":["../../src/resources/x/account-connection-challenges.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,2BAA4B,SAAQ,WAAW;IAC1D;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAU,EACV,IAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,oCAAoC,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;CACF"}
|
|
@@ -12,7 +12,7 @@ export declare class Accounts extends APIResource {
|
|
|
12
12
|
* ```ts
|
|
13
13
|
* const account = await client.x.accounts.create({
|
|
14
14
|
* email: 'user@example.com',
|
|
15
|
-
* password: '
|
|
15
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
16
16
|
* username: 'elonmusk',
|
|
17
17
|
* });
|
|
18
18
|
* ```
|
|
@@ -63,33 +63,34 @@ export declare class Accounts extends APIResource {
|
|
|
63
63
|
* @example
|
|
64
64
|
* ```ts
|
|
65
65
|
* const response = await client.x.accounts.reauth('id', {
|
|
66
|
-
* password: '
|
|
67
|
-
* totp_secret: '
|
|
66
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
67
|
+
* totp_secret: '<TOTP_SECRET>',
|
|
68
68
|
* });
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
71
|
reauth(id: string, body: AccountReauthParams, options?: RequestOptions): APIPromise<AccountReauthResponse>;
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* Linked X account summary with
|
|
74
|
+
* Linked X account summary with connection status, health, and timestamp metadata.
|
|
75
75
|
*/
|
|
76
76
|
export interface XAccount {
|
|
77
77
|
id: string;
|
|
78
78
|
createdAt: string;
|
|
79
79
|
/**
|
|
80
|
-
* Derived
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* shortly.
|
|
80
|
+
* Derived connection health. `healthy` = ready. `needsReauth` = reconnect the
|
|
81
|
+
* account. `locked` = unlock the account on x.com first. `suspended` = X
|
|
82
|
+
* suspended the account. `recovering` = retry is available after cooldown.
|
|
83
|
+
* `temporaryIssue` = retry shortly.
|
|
85
84
|
*/
|
|
86
85
|
health: 'healthy' | 'locked' | 'needsReauth' | 'recovering' | 'suspended' | 'temporaryIssue';
|
|
87
86
|
status: string;
|
|
87
|
+
updatedAt: string;
|
|
88
88
|
xUserId: string;
|
|
89
89
|
xUsername: string;
|
|
90
|
+
cookiesObtainedAt?: string;
|
|
90
91
|
}
|
|
91
92
|
/**
|
|
92
|
-
*
|
|
93
|
+
* Connected X account details with health and timestamp metadata.
|
|
93
94
|
*/
|
|
94
95
|
export interface XAccountDetail {
|
|
95
96
|
id: string;
|
|
@@ -99,15 +100,10 @@ export interface XAccountDetail {
|
|
|
99
100
|
xUserId: string;
|
|
100
101
|
xUsername: string;
|
|
101
102
|
cookiesObtainedAt?: string;
|
|
102
|
-
proxyCountry?: string;
|
|
103
103
|
updatedAt?: string;
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
|
-
* Sanitized X account summary returned by connect and reauth.
|
|
107
|
-
* `loginCountry` field surfaced only when the selected login region was
|
|
108
|
-
* temporarily unavailable and the login used a one-time US session for this
|
|
109
|
-
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
110
|
-
* the field is omitted on normal logins.
|
|
106
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
111
107
|
*/
|
|
112
108
|
export interface AccountCreateResponse {
|
|
113
109
|
id: string;
|
|
@@ -116,12 +112,6 @@ export interface AccountCreateResponse {
|
|
|
116
112
|
status: string;
|
|
117
113
|
xUserId: string;
|
|
118
114
|
xUsername: string;
|
|
119
|
-
/**
|
|
120
|
-
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
121
|
-
* login. Present only when the US fallback was triggered because the selected
|
|
122
|
-
* login region was temporarily unavailable. Omitted otherwise.
|
|
123
|
-
*/
|
|
124
|
-
loginCountry?: string;
|
|
125
115
|
}
|
|
126
116
|
export interface AccountListResponse {
|
|
127
117
|
accounts: Array<XAccount>;
|
|
@@ -136,11 +126,7 @@ export interface AccountBulkRetryResponse {
|
|
|
136
126
|
cleared: number;
|
|
137
127
|
}
|
|
138
128
|
/**
|
|
139
|
-
* Sanitized X account summary returned by connect and reauth.
|
|
140
|
-
* `loginCountry` field surfaced only when the selected login region was
|
|
141
|
-
* temporarily unavailable and the login used a one-time US session for this
|
|
142
|
-
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
143
|
-
* the field is omitted on normal logins.
|
|
129
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
144
130
|
*/
|
|
145
131
|
export interface AccountReauthResponse {
|
|
146
132
|
id: string;
|
|
@@ -149,12 +135,6 @@ export interface AccountReauthResponse {
|
|
|
149
135
|
status: string;
|
|
150
136
|
xUserId: string;
|
|
151
137
|
xUsername: string;
|
|
152
|
-
/**
|
|
153
|
-
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
154
|
-
* login. Present only when the US fallback was triggered because the selected
|
|
155
|
-
* login region was temporarily unavailable. Omitted otherwise.
|
|
156
|
-
*/
|
|
157
|
-
loginCountry?: string;
|
|
158
138
|
}
|
|
159
139
|
export interface AccountCreateParams {
|
|
160
140
|
/**
|
|
@@ -169,10 +149,6 @@ export interface AccountCreateParams {
|
|
|
169
149
|
* X username
|
|
170
150
|
*/
|
|
171
151
|
username: string;
|
|
172
|
-
/**
|
|
173
|
-
* Proxy country code
|
|
174
|
-
*/
|
|
175
|
-
proxy_country?: string;
|
|
176
152
|
/**
|
|
177
153
|
* TOTP secret for 2FA
|
|
178
154
|
*/
|
|
@@ -187,10 +163,6 @@ export interface AccountReauthParams {
|
|
|
187
163
|
* Email for the X account (updates stored email)
|
|
188
164
|
*/
|
|
189
165
|
email?: string;
|
|
190
|
-
/**
|
|
191
|
-
* Two-letter country code for login proxy region
|
|
192
|
-
*/
|
|
193
|
-
proxy_country?: string;
|
|
194
166
|
/**
|
|
195
167
|
* TOTP secret for 2FA re-authentication
|
|
196
168
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.mts","sourceRoot":"","sources":["../../src/resources/x/accounts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accounts.d.mts","sourceRoot":"","sources":["../../src/resources/x/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;OASG;IACH,QA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ACtB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -12,7 +12,7 @@ export declare class Accounts extends APIResource {
|
|
|
12
12
|
* ```ts
|
|
13
13
|
* const account = await client.x.accounts.create({
|
|
14
14
|
* email: 'user@example.com',
|
|
15
|
-
* password: '
|
|
15
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
16
16
|
* username: 'elonmusk',
|
|
17
17
|
* });
|
|
18
18
|
* ```
|
|
@@ -63,33 +63,34 @@ export declare class Accounts extends APIResource {
|
|
|
63
63
|
* @example
|
|
64
64
|
* ```ts
|
|
65
65
|
* const response = await client.x.accounts.reauth('id', {
|
|
66
|
-
* password: '
|
|
67
|
-
* totp_secret: '
|
|
66
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
67
|
+
* totp_secret: '<TOTP_SECRET>',
|
|
68
68
|
* });
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
71
|
reauth(id: string, body: AccountReauthParams, options?: RequestOptions): APIPromise<AccountReauthResponse>;
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* Linked X account summary with
|
|
74
|
+
* Linked X account summary with connection status, health, and timestamp metadata.
|
|
75
75
|
*/
|
|
76
76
|
export interface XAccount {
|
|
77
77
|
id: string;
|
|
78
78
|
createdAt: string;
|
|
79
79
|
/**
|
|
80
|
-
* Derived
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* shortly.
|
|
80
|
+
* Derived connection health. `healthy` = ready. `needsReauth` = reconnect the
|
|
81
|
+
* account. `locked` = unlock the account on x.com first. `suspended` = X
|
|
82
|
+
* suspended the account. `recovering` = retry is available after cooldown.
|
|
83
|
+
* `temporaryIssue` = retry shortly.
|
|
85
84
|
*/
|
|
86
85
|
health: 'healthy' | 'locked' | 'needsReauth' | 'recovering' | 'suspended' | 'temporaryIssue';
|
|
87
86
|
status: string;
|
|
87
|
+
updatedAt: string;
|
|
88
88
|
xUserId: string;
|
|
89
89
|
xUsername: string;
|
|
90
|
+
cookiesObtainedAt?: string;
|
|
90
91
|
}
|
|
91
92
|
/**
|
|
92
|
-
*
|
|
93
|
+
* Connected X account details with health and timestamp metadata.
|
|
93
94
|
*/
|
|
94
95
|
export interface XAccountDetail {
|
|
95
96
|
id: string;
|
|
@@ -99,15 +100,10 @@ export interface XAccountDetail {
|
|
|
99
100
|
xUserId: string;
|
|
100
101
|
xUsername: string;
|
|
101
102
|
cookiesObtainedAt?: string;
|
|
102
|
-
proxyCountry?: string;
|
|
103
103
|
updatedAt?: string;
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
|
-
* Sanitized X account summary returned by connect and reauth.
|
|
107
|
-
* `loginCountry` field surfaced only when the selected login region was
|
|
108
|
-
* temporarily unavailable and the login used a one-time US session for this
|
|
109
|
-
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
110
|
-
* the field is omitted on normal logins.
|
|
106
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
111
107
|
*/
|
|
112
108
|
export interface AccountCreateResponse {
|
|
113
109
|
id: string;
|
|
@@ -116,12 +112,6 @@ export interface AccountCreateResponse {
|
|
|
116
112
|
status: string;
|
|
117
113
|
xUserId: string;
|
|
118
114
|
xUsername: string;
|
|
119
|
-
/**
|
|
120
|
-
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
121
|
-
* login. Present only when the US fallback was triggered because the selected
|
|
122
|
-
* login region was temporarily unavailable. Omitted otherwise.
|
|
123
|
-
*/
|
|
124
|
-
loginCountry?: string;
|
|
125
115
|
}
|
|
126
116
|
export interface AccountListResponse {
|
|
127
117
|
accounts: Array<XAccount>;
|
|
@@ -136,11 +126,7 @@ export interface AccountBulkRetryResponse {
|
|
|
136
126
|
cleared: number;
|
|
137
127
|
}
|
|
138
128
|
/**
|
|
139
|
-
* Sanitized X account summary returned by connect and reauth.
|
|
140
|
-
* `loginCountry` field surfaced only when the selected login region was
|
|
141
|
-
* temporarily unavailable and the login used a one-time US session for this
|
|
142
|
-
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
143
|
-
* the field is omitted on normal logins.
|
|
129
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
144
130
|
*/
|
|
145
131
|
export interface AccountReauthResponse {
|
|
146
132
|
id: string;
|
|
@@ -149,12 +135,6 @@ export interface AccountReauthResponse {
|
|
|
149
135
|
status: string;
|
|
150
136
|
xUserId: string;
|
|
151
137
|
xUsername: string;
|
|
152
|
-
/**
|
|
153
|
-
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
154
|
-
* login. Present only when the US fallback was triggered because the selected
|
|
155
|
-
* login region was temporarily unavailable. Omitted otherwise.
|
|
156
|
-
*/
|
|
157
|
-
loginCountry?: string;
|
|
158
138
|
}
|
|
159
139
|
export interface AccountCreateParams {
|
|
160
140
|
/**
|
|
@@ -169,10 +149,6 @@ export interface AccountCreateParams {
|
|
|
169
149
|
* X username
|
|
170
150
|
*/
|
|
171
151
|
username: string;
|
|
172
|
-
/**
|
|
173
|
-
* Proxy country code
|
|
174
|
-
*/
|
|
175
|
-
proxy_country?: string;
|
|
176
152
|
/**
|
|
177
153
|
* TOTP secret for 2FA
|
|
178
154
|
*/
|
|
@@ -187,10 +163,6 @@ export interface AccountReauthParams {
|
|
|
187
163
|
* Email for the X account (updates stored email)
|
|
188
164
|
*/
|
|
189
165
|
email?: string;
|
|
190
|
-
/**
|
|
191
|
-
* Two-letter country code for login proxy region
|
|
192
|
-
*/
|
|
193
|
-
proxy_country?: string;
|
|
194
166
|
/**
|
|
195
167
|
* TOTP secret for 2FA re-authentication
|
|
196
168
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/resources/x/accounts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/resources/x/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IAI1E;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI/D;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI/E;;;;;;;;OAQG;IACH,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIzE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG3G;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IAEX,SA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CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,gBAAgB,CAAC;IAE7F,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,MAAM,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
package/resources/x/accounts.js
CHANGED
|
@@ -15,7 +15,7 @@ class Accounts extends resource_1.APIResource {
|
|
|
15
15
|
* ```ts
|
|
16
16
|
* const account = await client.x.accounts.create({
|
|
17
17
|
* email: 'user@example.com',
|
|
18
|
-
* password: '
|
|
18
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
19
19
|
* username: 'elonmusk',
|
|
20
20
|
* });
|
|
21
21
|
* ```
|
|
@@ -76,8 +76,8 @@ class Accounts extends resource_1.APIResource {
|
|
|
76
76
|
* @example
|
|
77
77
|
* ```ts
|
|
78
78
|
* const response = await client.x.accounts.reauth('id', {
|
|
79
|
-
* password: '
|
|
80
|
-
* totp_secret: '
|
|
79
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
80
|
+
* totp_secret: '<TOTP_SECRET>',
|
|
81
81
|
* });
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
package/resources/x/accounts.mjs
CHANGED
|
@@ -12,7 +12,7 @@ export class Accounts extends APIResource {
|
|
|
12
12
|
* ```ts
|
|
13
13
|
* const account = await client.x.accounts.create({
|
|
14
14
|
* email: 'user@example.com',
|
|
15
|
-
* password: '
|
|
15
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
16
16
|
* username: 'elonmusk',
|
|
17
17
|
* });
|
|
18
18
|
* ```
|
|
@@ -73,8 +73,8 @@ export class Accounts extends APIResource {
|
|
|
73
73
|
* @example
|
|
74
74
|
* ```ts
|
|
75
75
|
* const response = await client.x.accounts.reauth('id', {
|
|
76
|
-
* password: '
|
|
77
|
-
* totp_secret: '
|
|
76
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
77
|
+
* totp_secret: '<TOTP_SECRET>',
|
|
78
78
|
* });
|
|
79
79
|
* ```
|
|
80
80
|
*/
|