x-twitter-scraper 0.3.2 → 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 +35 -0
- package/README.md +25 -5
- 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 +29 -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":"account.d.mts","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"account.d.mts","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6B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;QAE1B;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAE3B;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,iBAAiB,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,IAAI,CAAC;IAEd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/resources/account.d.ts
CHANGED
|
@@ -38,17 +38,73 @@ export declare class Account extends APIResource {
|
|
|
38
38
|
updateLocale(body: AccountUpdateLocaleParams, options?: RequestOptions): APIPromise<AccountUpdateLocaleResponse>;
|
|
39
39
|
}
|
|
40
40
|
export interface AccountRetrieveResponse {
|
|
41
|
+
monitorBilling: AccountRetrieveResponse.MonitorBilling;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Monitor slots are unlimited. Use monitorBilling.unlimitedSlots
|
|
44
|
+
* instead.
|
|
45
|
+
*/
|
|
41
46
|
monitorsAllowed: number;
|
|
42
47
|
monitorsUsed: number;
|
|
43
48
|
plan: 'active' | 'inactive';
|
|
44
49
|
creditInfo?: AccountRetrieveResponse.CreditInfo;
|
|
50
|
+
/**
|
|
51
|
+
* Linked X username, omitted when no X account is connected.
|
|
52
|
+
*/
|
|
53
|
+
xUsername?: string;
|
|
45
54
|
}
|
|
46
55
|
export declare namespace AccountRetrieveResponse {
|
|
56
|
+
interface MonitorBilling {
|
|
57
|
+
/**
|
|
58
|
+
* Estimated daily usage for currently active monitors.
|
|
59
|
+
*/
|
|
60
|
+
activeDailyEstimate: string;
|
|
61
|
+
/**
|
|
62
|
+
* Usage charged each hour for currently active monitors.
|
|
63
|
+
*/
|
|
64
|
+
activeHourlyBurn: string;
|
|
65
|
+
/**
|
|
66
|
+
* Estimated daily usage for 1 active instant monitor.
|
|
67
|
+
*/
|
|
68
|
+
creditsPerActiveMonitorDay: string;
|
|
69
|
+
/**
|
|
70
|
+
* Hourly usage charged for 1 active instant monitor.
|
|
71
|
+
*/
|
|
72
|
+
creditsPerActiveMonitorHour: string;
|
|
73
|
+
/**
|
|
74
|
+
* Webhook and event deliveries are included in monitor billing.
|
|
75
|
+
*/
|
|
76
|
+
eventsIncluded: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Active monitors check every 1 second.
|
|
79
|
+
*/
|
|
80
|
+
instantCheckIntervalSeconds: number;
|
|
81
|
+
/**
|
|
82
|
+
* Monitor slot count is unlimited.
|
|
83
|
+
*/
|
|
84
|
+
unlimitedSlots: boolean;
|
|
85
|
+
}
|
|
47
86
|
interface CreditInfo {
|
|
87
|
+
/**
|
|
88
|
+
* Dollar amount charged when automatic top-up runs.
|
|
89
|
+
*/
|
|
90
|
+
autoTopupAmountDollars: number;
|
|
48
91
|
autoTopupEnabled: boolean;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Bigint string threshold that triggers automatic top-up when enabled.
|
|
94
|
+
*/
|
|
95
|
+
autoTopupThreshold: string;
|
|
96
|
+
/**
|
|
97
|
+
* Bigint string to preserve precision above Number.MAX_SAFE_INTEGER.
|
|
98
|
+
*/
|
|
99
|
+
balance: string;
|
|
100
|
+
/**
|
|
101
|
+
* Total purchased usage as a bigint string.
|
|
102
|
+
*/
|
|
103
|
+
lifetimePurchased: string;
|
|
104
|
+
/**
|
|
105
|
+
* Total consumed usage as a bigint string.
|
|
106
|
+
*/
|
|
107
|
+
lifetimeUsed: string;
|
|
52
108
|
}
|
|
53
109
|
}
|
|
54
110
|
export interface AccountSetXUsernameResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIvE;;;;;;;;;OASG;IACH,YAAY,CACV,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;IAI1C;;;;;;;;;OASG;IACH,YAAY,CACV,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,uBAAuB,CAAC,cAAc,CAAC;IAEvD;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB,YAAY,EAAE,MAAM,CAAC;IAErB,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE5B,UAAU,CAAC,EAAE,uBAAuB,CAAC,UAAU,CAAC;IAEhD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yBAAiB,uBAAu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
{"version":3,"file":"account.mjs","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"account.mjs","sourceRoot":"","sources":["../src/resources/account.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,CACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,CACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.mts","sourceRoot":"","sources":["../src/resources/compose.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compose.d.mts","sourceRoot":"","sources":["../src/resources/compose.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAG/F;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;IAErC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;IAEjE;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IAEvC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/resources/compose.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":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;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.mjs","sourceRoot":"","sources":["../src/resources/compose.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"compose.mjs","sourceRoot":"","sources":["../src/resources/compose.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
package/resources/credits.d.mts
CHANGED
|
@@ -2,11 +2,22 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
4
|
/**
|
|
5
|
-
* Subscription, billing, and
|
|
5
|
+
* Subscription, billing, and usage balance
|
|
6
6
|
*/
|
|
7
7
|
export declare class Credits extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Redirect to an active top-up payment page
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* await client.credits.redirectTopupCheckout({
|
|
14
|
+
* session_id: 'session_id',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
redirectTopupCheckout(query: CreditRedirectTopupCheckoutParams, options?: RequestOptions): APIPromise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Get usage balance
|
|
10
21
|
*
|
|
11
22
|
* @example
|
|
12
23
|
* ```ts
|
|
@@ -15,33 +26,99 @@ export declare class Credits extends APIResource {
|
|
|
15
26
|
*/
|
|
16
27
|
retrieveBalance(options?: RequestOptions): APIPromise<CreditRetrieveBalanceResponse>;
|
|
17
28
|
/**
|
|
18
|
-
*
|
|
29
|
+
* Get top-up billing status
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response = await client.credits.retrieveTopupStatus({
|
|
34
|
+
* session_id: 'session_id',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
retrieveTopupStatus(query: CreditRetrieveTopupStatusParams, options?: RequestOptions): APIPromise<CreditRetrieveTopupStatusResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a Stripe Checkout session only after the user confirms. The request never
|
|
41
|
+
* completes payment or adds balance by itself.
|
|
19
42
|
*
|
|
20
43
|
* @example
|
|
21
44
|
* ```ts
|
|
22
45
|
* const response = await client.credits.topupBalance({
|
|
23
|
-
*
|
|
46
|
+
* dollars: 10,
|
|
24
47
|
* });
|
|
25
48
|
* ```
|
|
26
49
|
*/
|
|
27
50
|
topupBalance(body: CreditTopupBalanceParams, options?: RequestOptions): APIPromise<CreditTopupBalanceResponse>;
|
|
28
51
|
}
|
|
29
52
|
export interface CreditRetrieveBalanceResponse {
|
|
53
|
+
/**
|
|
54
|
+
* Configured dollar amount for each automatic top-up.
|
|
55
|
+
*/
|
|
56
|
+
auto_topup_amount_dollars: number;
|
|
30
57
|
auto_topup_enabled: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Usage balance threshold that triggers automatic top-up when enabled,
|
|
60
|
+
* represented as a bigint string.
|
|
61
|
+
*/
|
|
62
|
+
auto_topup_threshold: string;
|
|
63
|
+
/**
|
|
64
|
+
* Current usage balance as a bigint string to preserve precision above
|
|
65
|
+
* Number.MAX_SAFE_INTEGER.
|
|
66
|
+
*/
|
|
67
|
+
balance: string;
|
|
68
|
+
/**
|
|
69
|
+
* Lifetime purchased usage as a bigint string.
|
|
70
|
+
*/
|
|
71
|
+
lifetime_purchased: string;
|
|
72
|
+
/**
|
|
73
|
+
* Lifetime consumed usage as a bigint string.
|
|
74
|
+
*/
|
|
75
|
+
lifetime_used: string;
|
|
76
|
+
}
|
|
77
|
+
export interface CreditRetrieveTopupStatusResponse {
|
|
78
|
+
status: 'paid' | 'processing' | 'failed' | 'expired';
|
|
79
|
+
/**
|
|
80
|
+
* Dollar amount requested for the top-up.
|
|
81
|
+
*/
|
|
82
|
+
amount_dollars?: number | null;
|
|
83
|
+
/**
|
|
84
|
+
* Bigint string usage amount granted or pending.
|
|
85
|
+
*/
|
|
86
|
+
credits?: string;
|
|
34
87
|
}
|
|
35
88
|
export interface CreditTopupBalanceResponse {
|
|
36
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Stable first-party Xquik redirect URL for the active Stripe Checkout session.
|
|
91
|
+
*/
|
|
92
|
+
redirect_url: string;
|
|
93
|
+
/**
|
|
94
|
+
* Same stable first-party Xquik redirect URL as redirect_url. The response never
|
|
95
|
+
* exposes a raw Stripe Checkout URL.
|
|
96
|
+
*/
|
|
97
|
+
url: string;
|
|
98
|
+
}
|
|
99
|
+
export interface CreditRedirectTopupCheckoutParams {
|
|
100
|
+
/**
|
|
101
|
+
* Billing session ID returned by the top-up billing flow.
|
|
102
|
+
*/
|
|
103
|
+
session_id: string;
|
|
104
|
+
}
|
|
105
|
+
export interface CreditRetrieveTopupStatusParams {
|
|
106
|
+
/**
|
|
107
|
+
* Billing session ID returned by the top-up billing flow.
|
|
108
|
+
*/
|
|
109
|
+
session_id: string;
|
|
37
110
|
}
|
|
38
111
|
export interface CreditTopupBalanceParams {
|
|
39
112
|
/**
|
|
40
|
-
* Amount to top up in
|
|
113
|
+
* Amount to top up in US dollars. Minimum 10.
|
|
114
|
+
*/
|
|
115
|
+
dollars: number;
|
|
116
|
+
/**
|
|
117
|
+
* Optional checkout locale. Defaults to en.
|
|
41
118
|
*/
|
|
42
|
-
|
|
119
|
+
locale?: string;
|
|
43
120
|
}
|
|
44
121
|
export declare namespace Credits {
|
|
45
|
-
export { type CreditRetrieveBalanceResponse as CreditRetrieveBalanceResponse, type CreditTopupBalanceResponse as CreditTopupBalanceResponse, type CreditTopupBalanceParams as CreditTopupBalanceParams, };
|
|
122
|
+
export { type CreditRetrieveBalanceResponse as CreditRetrieveBalanceResponse, type CreditRetrieveTopupStatusResponse as CreditRetrieveTopupStatusResponse, type CreditTopupBalanceResponse as CreditTopupBalanceResponse, type CreditRedirectTopupCheckoutParams as CreditRedirectTopupCheckoutParams, type CreditRetrieveTopupStatusParams as CreditRetrieveTopupStatusParams, type CreditTopupBalanceParams as CreditTopupBalanceParams, };
|
|
46
123
|
}
|
|
47
124
|
//# sourceMappingURL=credits.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,qBAAqB,CACnB,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IASnB;;;;;;;OAOG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAIpF;;;;;;;;;OASG;IACH,mBAAmB,CACjB,KAAK,EAAE,+BAA+B,EACtC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EAC7D,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
package/resources/credits.d.ts
CHANGED
|
@@ -2,11 +2,22 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
/**
|
|
5
|
-
* Subscription, billing, and
|
|
5
|
+
* Subscription, billing, and usage balance
|
|
6
6
|
*/
|
|
7
7
|
export declare class Credits extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Redirect to an active top-up payment page
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* await client.credits.redirectTopupCheckout({
|
|
14
|
+
* session_id: 'session_id',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
redirectTopupCheckout(query: CreditRedirectTopupCheckoutParams, options?: RequestOptions): APIPromise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Get usage balance
|
|
10
21
|
*
|
|
11
22
|
* @example
|
|
12
23
|
* ```ts
|
|
@@ -15,33 +26,99 @@ export declare class Credits extends APIResource {
|
|
|
15
26
|
*/
|
|
16
27
|
retrieveBalance(options?: RequestOptions): APIPromise<CreditRetrieveBalanceResponse>;
|
|
17
28
|
/**
|
|
18
|
-
*
|
|
29
|
+
* Get top-up billing status
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response = await client.credits.retrieveTopupStatus({
|
|
34
|
+
* session_id: 'session_id',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
retrieveTopupStatus(query: CreditRetrieveTopupStatusParams, options?: RequestOptions): APIPromise<CreditRetrieveTopupStatusResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a Stripe Checkout session only after the user confirms. The request never
|
|
41
|
+
* completes payment or adds balance by itself.
|
|
19
42
|
*
|
|
20
43
|
* @example
|
|
21
44
|
* ```ts
|
|
22
45
|
* const response = await client.credits.topupBalance({
|
|
23
|
-
*
|
|
46
|
+
* dollars: 10,
|
|
24
47
|
* });
|
|
25
48
|
* ```
|
|
26
49
|
*/
|
|
27
50
|
topupBalance(body: CreditTopupBalanceParams, options?: RequestOptions): APIPromise<CreditTopupBalanceResponse>;
|
|
28
51
|
}
|
|
29
52
|
export interface CreditRetrieveBalanceResponse {
|
|
53
|
+
/**
|
|
54
|
+
* Configured dollar amount for each automatic top-up.
|
|
55
|
+
*/
|
|
56
|
+
auto_topup_amount_dollars: number;
|
|
30
57
|
auto_topup_enabled: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Usage balance threshold that triggers automatic top-up when enabled,
|
|
60
|
+
* represented as a bigint string.
|
|
61
|
+
*/
|
|
62
|
+
auto_topup_threshold: string;
|
|
63
|
+
/**
|
|
64
|
+
* Current usage balance as a bigint string to preserve precision above
|
|
65
|
+
* Number.MAX_SAFE_INTEGER.
|
|
66
|
+
*/
|
|
67
|
+
balance: string;
|
|
68
|
+
/**
|
|
69
|
+
* Lifetime purchased usage as a bigint string.
|
|
70
|
+
*/
|
|
71
|
+
lifetime_purchased: string;
|
|
72
|
+
/**
|
|
73
|
+
* Lifetime consumed usage as a bigint string.
|
|
74
|
+
*/
|
|
75
|
+
lifetime_used: string;
|
|
76
|
+
}
|
|
77
|
+
export interface CreditRetrieveTopupStatusResponse {
|
|
78
|
+
status: 'paid' | 'processing' | 'failed' | 'expired';
|
|
79
|
+
/**
|
|
80
|
+
* Dollar amount requested for the top-up.
|
|
81
|
+
*/
|
|
82
|
+
amount_dollars?: number | null;
|
|
83
|
+
/**
|
|
84
|
+
* Bigint string usage amount granted or pending.
|
|
85
|
+
*/
|
|
86
|
+
credits?: string;
|
|
34
87
|
}
|
|
35
88
|
export interface CreditTopupBalanceResponse {
|
|
36
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Stable first-party Xquik redirect URL for the active Stripe Checkout session.
|
|
91
|
+
*/
|
|
92
|
+
redirect_url: string;
|
|
93
|
+
/**
|
|
94
|
+
* Same stable first-party Xquik redirect URL as redirect_url. The response never
|
|
95
|
+
* exposes a raw Stripe Checkout URL.
|
|
96
|
+
*/
|
|
97
|
+
url: string;
|
|
98
|
+
}
|
|
99
|
+
export interface CreditRedirectTopupCheckoutParams {
|
|
100
|
+
/**
|
|
101
|
+
* Billing session ID returned by the top-up billing flow.
|
|
102
|
+
*/
|
|
103
|
+
session_id: string;
|
|
104
|
+
}
|
|
105
|
+
export interface CreditRetrieveTopupStatusParams {
|
|
106
|
+
/**
|
|
107
|
+
* Billing session ID returned by the top-up billing flow.
|
|
108
|
+
*/
|
|
109
|
+
session_id: string;
|
|
37
110
|
}
|
|
38
111
|
export interface CreditTopupBalanceParams {
|
|
39
112
|
/**
|
|
40
|
-
* Amount to top up in
|
|
113
|
+
* Amount to top up in US dollars. Minimum 10.
|
|
114
|
+
*/
|
|
115
|
+
dollars: number;
|
|
116
|
+
/**
|
|
117
|
+
* Optional checkout locale. Defaults to en.
|
|
41
118
|
*/
|
|
42
|
-
|
|
119
|
+
locale?: string;
|
|
43
120
|
}
|
|
44
121
|
export declare namespace Credits {
|
|
45
|
-
export { type CreditRetrieveBalanceResponse as CreditRetrieveBalanceResponse, type CreditTopupBalanceResponse as CreditTopupBalanceResponse, type CreditTopupBalanceParams as CreditTopupBalanceParams, };
|
|
122
|
+
export { type CreditRetrieveBalanceResponse as CreditRetrieveBalanceResponse, type CreditRetrieveTopupStatusResponse as CreditRetrieveTopupStatusResponse, type CreditTopupBalanceResponse as CreditTopupBalanceResponse, type CreditRedirectTopupCheckoutParams as CreditRedirectTopupCheckoutParams, type CreditRetrieveTopupStatusParams as CreditRetrieveTopupStatusParams, type CreditTopupBalanceParams as CreditTopupBalanceParams, };
|
|
46
123
|
}
|
|
47
124
|
//# sourceMappingURL=credits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,qBAAqB,CACnB,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IASnB;;;;;;;OAOG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAIpF;;;;;;;;;OASG;IACH,mBAAmB,CACjB,KAAK,EAAE,+BAA+B,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;;;;;;;;;OAUG;IACH,YAAY,CACV,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAG1C;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAElC,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;IAErD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
package/resources/credits.js
CHANGED
|
@@ -3,12 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Credits = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
6
7
|
/**
|
|
7
|
-
* Subscription, billing, and
|
|
8
|
+
* Subscription, billing, and usage balance
|
|
8
9
|
*/
|
|
9
10
|
class Credits extends resource_1.APIResource {
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* Redirect to an active top-up payment page
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* await client.credits.redirectTopupCheckout({
|
|
17
|
+
* session_id: 'session_id',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
redirectTopupCheckout(query, options) {
|
|
22
|
+
return this._client.get('/credits/topup/redirect', {
|
|
23
|
+
query,
|
|
24
|
+
...options,
|
|
25
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
26
|
+
__security: {},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get usage balance
|
|
12
31
|
*
|
|
13
32
|
* @example
|
|
14
33
|
* ```ts
|
|
@@ -19,12 +38,26 @@ class Credits extends resource_1.APIResource {
|
|
|
19
38
|
return this._client.get('/credits', options);
|
|
20
39
|
}
|
|
21
40
|
/**
|
|
22
|
-
*
|
|
41
|
+
* Get top-up billing status
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const response = await client.credits.retrieveTopupStatus({
|
|
46
|
+
* session_id: 'session_id',
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
retrieveTopupStatus(query, options) {
|
|
51
|
+
return this._client.get('/credits/topup/status', { query, ...options });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Create a Stripe Checkout session only after the user confirms. The request never
|
|
55
|
+
* completes payment or adds balance by itself.
|
|
23
56
|
*
|
|
24
57
|
* @example
|
|
25
58
|
* ```ts
|
|
26
59
|
* const response = await client.credits.topupBalance({
|
|
27
|
-
*
|
|
60
|
+
* dollars: 10,
|
|
28
61
|
* });
|
|
29
62
|
* ```
|
|
30
63
|
*/
|
package/resources/credits.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAGnD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;OASG;IACH,qBAAqB,CACnB,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE;YACjD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5D,UAAU,EAAE,EAAE;SACf,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;OASG;IACH,mBAAmB,CACjB,KAAsC,EACtC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;OAUG;IACH,YAAY,CACV,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AArED,0BAqEC"}
|
package/resources/credits.mjs
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
3
4
|
/**
|
|
4
|
-
* Subscription, billing, and
|
|
5
|
+
* Subscription, billing, and usage balance
|
|
5
6
|
*/
|
|
6
7
|
export class Credits extends APIResource {
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Redirect to an active top-up payment page
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* await client.credits.redirectTopupCheckout({
|
|
14
|
+
* session_id: 'session_id',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
redirectTopupCheckout(query, options) {
|
|
19
|
+
return this._client.get('/credits/topup/redirect', {
|
|
20
|
+
query,
|
|
21
|
+
...options,
|
|
22
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
23
|
+
__security: {},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get usage balance
|
|
9
28
|
*
|
|
10
29
|
* @example
|
|
11
30
|
* ```ts
|
|
@@ -16,12 +35,26 @@ export class Credits extends APIResource {
|
|
|
16
35
|
return this._client.get('/credits', options);
|
|
17
36
|
}
|
|
18
37
|
/**
|
|
19
|
-
*
|
|
38
|
+
* Get top-up billing status
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.credits.retrieveTopupStatus({
|
|
43
|
+
* session_id: 'session_id',
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
retrieveTopupStatus(query, options) {
|
|
48
|
+
return this._client.get('/credits/topup/status', { query, ...options });
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Create a Stripe Checkout session only after the user confirms. The request never
|
|
52
|
+
* completes payment or adds balance by itself.
|
|
20
53
|
*
|
|
21
54
|
* @example
|
|
22
55
|
* ```ts
|
|
23
56
|
* const response = await client.credits.topupBalance({
|
|
24
|
-
*
|
|
57
|
+
* dollars: 10,
|
|
25
58
|
* });
|
|
26
59
|
* ```
|
|
27
60
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.mjs","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"credits.mjs","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAGnD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,qBAAqB,CACnB,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE;YACjD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5D,UAAU,EAAE,EAAE;SACf,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;OASG;IACH,mBAAmB,CACjB,KAAsC,EACtC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;OAUG;IACH,YAAY,CACV,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
|
package/resources/drafts.d.mts
CHANGED
|
@@ -83,7 +83,10 @@ export interface DraftListParams {
|
|
|
83
83
|
*/
|
|
84
84
|
afterCursor?: string;
|
|
85
85
|
/**
|
|
86
|
-
* Maximum number of items to return (1-100, default 50)
|
|
86
|
+
* Maximum number of items to return (1-100, default 50). For paid per-result
|
|
87
|
+
* endpoints, the returned count may be lower when available usage balance cannot cover
|
|
88
|
+
* the requested page. If zero paid results are affordable, the endpoint returns
|
|
89
|
+
* 402 insufficient_credits.
|
|
87
90
|
*/
|
|
88
91
|
limit?: number;
|
|
89
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafts.d.mts","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drafts.d.mts","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIlF;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIvE;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAIhC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAM/D;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE,MAAM,CAAC;IAEb,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAErB,OAAO,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;IAEjE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/resources/drafts.d.ts
CHANGED
|
@@ -83,7 +83,10 @@ export interface DraftListParams {
|
|
|
83
83
|
*/
|
|
84
84
|
afterCursor?: string;
|
|
85
85
|
/**
|
|
86
|
-
* Maximum number of items to return (1-100, default 50)
|
|
86
|
+
* Maximum number of items to return (1-100, default 50). For paid per-result
|
|
87
|
+
* endpoints, the returned count may be lower when available usage balance cannot cover
|
|
88
|
+
* the requested page. If zero paid results are affordable, the endpoint returns
|
|
89
|
+
* 402 insufficient_credits.
|
|
87
90
|
*/
|
|
88
91
|
limit?: number;
|
|
89
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIlF;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIvE;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAIhC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAM/D;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE,MAAM,CAAC;IAEb,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAErB,OAAO,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;IAEjE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/resources/drafts.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafts.mjs","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"drafts.mjs","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE;YAC9C,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|