x-twitter-scraper 0.1.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 +17 -0
- package/LICENSE +201 -0
- package/README.md +398 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +295 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +295 -0
- package/client.d.ts.map +1 -0
- package/client.js +592 -0
- package/client.js.map +1 -0
- package/client.mjs +588 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +79 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +79 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +143 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/account.d.mts +53 -0
- package/resources/account.d.mts.map +1 -0
- package/resources/account.d.ts +53 -0
- package/resources/account.d.ts.map +1 -0
- package/resources/account.js +30 -0
- package/resources/account.js.map +1 -0
- package/resources/account.mjs +26 -0
- package/resources/account.mjs.map +1 -0
- package/resources/api-keys.d.mts +48 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +48 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +31 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +27 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/bot/bot.d.mts +10 -0
- package/resources/bot/bot.d.mts.map +1 -0
- package/resources/bot/bot.d.ts +10 -0
- package/resources/bot/bot.d.ts.map +1 -0
- package/resources/bot/bot.js +17 -0
- package/resources/bot/bot.js.map +1 -0
- package/resources/bot/bot.mjs +12 -0
- package/resources/bot/bot.mjs.map +1 -0
- package/resources/bot/index.d.mts +3 -0
- package/resources/bot/index.d.mts.map +1 -0
- package/resources/bot/index.d.ts +3 -0
- package/resources/bot/index.d.ts.map +1 -0
- package/resources/bot/index.js +9 -0
- package/resources/bot/index.js.map +1 -0
- package/resources/bot/index.mjs +4 -0
- package/resources/bot/index.mjs.map +1 -0
- package/resources/bot/platform-links.d.mts +4 -0
- package/resources/bot/platform-links.d.mts.map +1 -0
- package/resources/bot/platform-links.d.ts +4 -0
- package/resources/bot/platform-links.d.ts.map +1 -0
- package/resources/bot/platform-links.js +9 -0
- package/resources/bot/platform-links.js.map +1 -0
- package/resources/bot/platform-links.mjs +5 -0
- package/resources/bot/platform-links.mjs.map +1 -0
- package/resources/bot.d.mts +2 -0
- package/resources/bot.d.mts.map +1 -0
- package/resources/bot.d.ts +2 -0
- package/resources/bot.d.ts.map +1 -0
- package/resources/bot.js +6 -0
- package/resources/bot.js.map +1 -0
- package/resources/bot.mjs +3 -0
- package/resources/bot.mjs.map +1 -0
- package/resources/compose.d.mts +65 -0
- package/resources/compose.d.mts.map +1 -0
- package/resources/compose.d.ts +65 -0
- package/resources/compose.d.ts.map +1 -0
- package/resources/compose.js +18 -0
- package/resources/compose.js.map +1 -0
- package/resources/compose.mjs +14 -0
- package/resources/compose.mjs.map +1 -0
- package/resources/credits.d.mts +35 -0
- package/resources/credits.d.mts.map +1 -0
- package/resources/credits.d.ts +35 -0
- package/resources/credits.d.ts.map +1 -0
- package/resources/credits.js +24 -0
- package/resources/credits.js.map +1 -0
- package/resources/credits.mjs +20 -0
- package/resources/credits.mjs.map +1 -0
- package/resources/drafts.d.mts +60 -0
- package/resources/drafts.d.mts.map +1 -0
- package/resources/drafts.d.ts +60 -0
- package/resources/drafts.d.ts.map +1 -0
- package/resources/drafts.js +41 -0
- package/resources/drafts.js.map +1 -0
- package/resources/drafts.mjs +37 -0
- package/resources/drafts.mjs.map +1 -0
- package/resources/draws.d.mts +103 -0
- package/resources/draws.d.mts.map +1 -0
- package/resources/draws.d.ts +103 -0
- package/resources/draws.d.ts.map +1 -0
- package/resources/draws.js +43 -0
- package/resources/draws.js.map +1 -0
- package/resources/draws.mjs +39 -0
- package/resources/draws.mjs.map +1 -0
- package/resources/events.d.mts +56 -0
- package/resources/events.d.mts.map +1 -0
- package/resources/events.d.ts +56 -0
- package/resources/events.d.ts.map +1 -0
- package/resources/events.js +25 -0
- package/resources/events.js.map +1 -0
- package/resources/events.mjs +21 -0
- package/resources/events.mjs.map +1 -0
- package/resources/extractions.d.mts +128 -0
- package/resources/extractions.d.mts.map +1 -0
- package/resources/extractions.d.ts +128 -0
- package/resources/extractions.d.ts.map +1 -0
- package/resources/extractions.js +49 -0
- package/resources/extractions.js.map +1 -0
- package/resources/extractions.mjs +45 -0
- package/resources/extractions.mjs.map +1 -0
- package/resources/index.d.mts +20 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +20 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +43 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +21 -0
- package/resources/index.mjs.map +1 -0
- package/resources/integrations.d.mts +115 -0
- package/resources/integrations.d.mts.map +1 -0
- package/resources/integrations.d.ts +115 -0
- package/resources/integrations.d.ts.map +1 -0
- package/resources/integrations.js +55 -0
- package/resources/integrations.js.map +1 -0
- package/resources/integrations.mjs +51 -0
- package/resources/integrations.mjs.map +1 -0
- package/resources/monitors.d.mts +66 -0
- package/resources/monitors.d.mts.map +1 -0
- package/resources/monitors.d.ts +66 -0
- package/resources/monitors.d.ts.map +1 -0
- package/resources/monitors.js +43 -0
- package/resources/monitors.js.map +1 -0
- package/resources/monitors.mjs +39 -0
- package/resources/monitors.mjs.map +1 -0
- package/resources/radar.d.mts +54 -0
- package/resources/radar.d.mts.map +1 -0
- package/resources/radar.d.ts +54 -0
- package/resources/radar.d.ts.map +1 -0
- package/resources/radar.js +18 -0
- package/resources/radar.js.map +1 -0
- package/resources/radar.mjs +14 -0
- package/resources/radar.mjs.map +1 -0
- package/resources/shared.d.mts +17 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +17 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/styles.d.mts +115 -0
- package/resources/styles.d.mts.map +1 -0
- package/resources/styles.d.ts +115 -0
- package/resources/styles.d.ts.map +1 -0
- package/resources/styles.js +59 -0
- package/resources/styles.js.map +1 -0
- package/resources/styles.mjs +55 -0
- package/resources/styles.mjs.map +1 -0
- package/resources/subscribe.d.mts +21 -0
- package/resources/subscribe.d.mts.map +1 -0
- package/resources/subscribe.d.ts +21 -0
- package/resources/subscribe.d.ts.map +1 -0
- package/resources/subscribe.js +18 -0
- package/resources/subscribe.js.map +1 -0
- package/resources/subscribe.mjs +14 -0
- package/resources/subscribe.mjs.map +1 -0
- package/resources/support/index.d.mts +3 -0
- package/resources/support/index.d.mts.map +1 -0
- package/resources/support/index.d.ts +3 -0
- package/resources/support/index.d.ts.map +1 -0
- package/resources/support/index.js +9 -0
- package/resources/support/index.js.map +1 -0
- package/resources/support/index.mjs +4 -0
- package/resources/support/index.mjs.map +1 -0
- package/resources/support/support.d.mts +10 -0
- package/resources/support/support.d.mts.map +1 -0
- package/resources/support/support.d.ts +10 -0
- package/resources/support/support.d.ts.map +1 -0
- package/resources/support/support.js +17 -0
- package/resources/support/support.js.map +1 -0
- package/resources/support/support.mjs +12 -0
- package/resources/support/support.mjs.map +1 -0
- package/resources/support/tickets.d.mts +80 -0
- package/resources/support/tickets.d.mts.map +1 -0
- package/resources/support/tickets.d.ts +80 -0
- package/resources/support/tickets.d.ts.map +1 -0
- package/resources/support/tickets.js +43 -0
- package/resources/support/tickets.js.map +1 -0
- package/resources/support/tickets.mjs +39 -0
- package/resources/support/tickets.mjs.map +1 -0
- package/resources/support.d.mts +2 -0
- package/resources/support.d.mts.map +1 -0
- package/resources/support.d.ts +2 -0
- package/resources/support.d.ts.map +1 -0
- package/resources/support.js +6 -0
- package/resources/support.js.map +1 -0
- package/resources/support.mjs +3 -0
- package/resources/support.mjs.map +1 -0
- package/resources/trends.d.mts +36 -0
- package/resources/trends.d.mts.map +1 -0
- package/resources/trends.d.ts +36 -0
- package/resources/trends.d.ts.map +1 -0
- package/resources/trends.js +18 -0
- package/resources/trends.js.map +1 -0
- package/resources/trends.mjs +14 -0
- package/resources/trends.mjs.map +1 -0
- package/resources/webhooks.d.mts +87 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +87 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +49 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +45 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources/x/accounts.d.mts +98 -0
- package/resources/x/accounts.d.mts.map +1 -0
- package/resources/x/accounts.d.ts +98 -0
- package/resources/x/accounts.d.ts.map +1 -0
- package/resources/x/accounts.js +43 -0
- package/resources/x/accounts.js.map +1 -0
- package/resources/x/accounts.mjs +39 -0
- package/resources/x/accounts.mjs.map +1 -0
- package/resources/x/bookmarks.d.mts +42 -0
- package/resources/x/bookmarks.d.mts.map +1 -0
- package/resources/x/bookmarks.d.ts +42 -0
- package/resources/x/bookmarks.d.ts.map +1 -0
- package/resources/x/bookmarks.js +24 -0
- package/resources/x/bookmarks.js.map +1 -0
- package/resources/x/bookmarks.mjs +20 -0
- package/resources/x/bookmarks.mjs.map +1 -0
- package/resources/x/communities/communities.d.mts +110 -0
- package/resources/x/communities/communities.d.mts.map +1 -0
- package/resources/x/communities/communities.d.ts +110 -0
- package/resources/x/communities/communities.d.ts.map +1 -0
- package/resources/x/communities/communities.js +71 -0
- package/resources/x/communities/communities.js.map +1 -0
- package/resources/x/communities/communities.mjs +66 -0
- package/resources/x/communities/communities.mjs.map +1 -0
- package/resources/x/communities/index.d.mts +4 -0
- package/resources/x/communities/index.d.mts.map +1 -0
- package/resources/x/communities/index.d.ts +4 -0
- package/resources/x/communities/index.d.ts.map +1 -0
- package/resources/x/communities/index.js +11 -0
- package/resources/x/communities/index.js.map +1 -0
- package/resources/x/communities/index.mjs +5 -0
- package/resources/x/communities/index.mjs.map +1 -0
- package/resources/x/communities/join.d.mts +33 -0
- package/resources/x/communities/join.d.mts.map +1 -0
- package/resources/x/communities/join.d.ts +33 -0
- package/resources/x/communities/join.d.ts.map +1 -0
- package/resources/x/communities/join.js +25 -0
- package/resources/x/communities/join.js.map +1 -0
- package/resources/x/communities/join.mjs +21 -0
- package/resources/x/communities/join.mjs.map +1 -0
- package/resources/x/communities/tweets.d.mts +30 -0
- package/resources/x/communities/tweets.d.mts.map +1 -0
- package/resources/x/communities/tweets.d.ts +30 -0
- package/resources/x/communities/tweets.d.ts.map +1 -0
- package/resources/x/communities/tweets.js +23 -0
- package/resources/x/communities/tweets.js.map +1 -0
- package/resources/x/communities/tweets.mjs +19 -0
- package/resources/x/communities/tweets.mjs.map +1 -0
- package/resources/x/communities.d.mts +2 -0
- package/resources/x/communities.d.mts.map +1 -0
- package/resources/x/communities.d.ts +2 -0
- package/resources/x/communities.d.ts.map +1 -0
- package/resources/x/communities.js +6 -0
- package/resources/x/communities.js.map +1 -0
- package/resources/x/communities.mjs +3 -0
- package/resources/x/communities.mjs.map +1 -0
- package/resources/x/dm.d.mts +54 -0
- package/resources/x/dm.d.mts.map +1 -0
- package/resources/x/dm.d.ts +54 -0
- package/resources/x/dm.d.ts.map +1 -0
- package/resources/x/dm.js +22 -0
- package/resources/x/dm.js.map +1 -0
- package/resources/x/dm.mjs +18 -0
- package/resources/x/dm.mjs.map +1 -0
- package/resources/x/followers.d.mts +32 -0
- package/resources/x/followers.d.mts.map +1 -0
- package/resources/x/followers.d.ts +32 -0
- package/resources/x/followers.d.ts.map +1 -0
- package/resources/x/followers.js +18 -0
- package/resources/x/followers.js.map +1 -0
- package/resources/x/followers.mjs +14 -0
- package/resources/x/followers.mjs.map +1 -0
- package/resources/x/index.d.mts +12 -0
- package/resources/x/index.d.mts.map +1 -0
- package/resources/x/index.d.ts +12 -0
- package/resources/x/index.d.ts.map +1 -0
- package/resources/x/index.js +27 -0
- package/resources/x/index.js.map +1 -0
- package/resources/x/index.mjs +13 -0
- package/resources/x/index.mjs.map +1 -0
- package/resources/x/lists.d.mts +54 -0
- package/resources/x/lists.d.mts.map +1 -0
- package/resources/x/lists.d.ts +54 -0
- package/resources/x/lists.d.ts.map +1 -0
- package/resources/x/lists.js +44 -0
- package/resources/x/lists.js.map +1 -0
- package/resources/x/lists.mjs +40 -0
- package/resources/x/lists.mjs.map +1 -0
- package/resources/x/media.d.mts +53 -0
- package/resources/x/media.d.mts.map +1 -0
- package/resources/x/media.d.ts +53 -0
- package/resources/x/media.d.ts.map +1 -0
- package/resources/x/media.js +25 -0
- package/resources/x/media.js.map +1 -0
- package/resources/x/media.mjs +21 -0
- package/resources/x/media.mjs.map +1 -0
- package/resources/x/profile.d.mts +73 -0
- package/resources/x/profile.d.mts.map +1 -0
- package/resources/x/profile.d.ts +73 -0
- package/resources/x/profile.d.ts.map +1 -0
- package/resources/x/profile.js +31 -0
- package/resources/x/profile.js.map +1 -0
- package/resources/x/profile.mjs +27 -0
- package/resources/x/profile.mjs.map +1 -0
- package/resources/x/tweets/index.d.mts +4 -0
- package/resources/x/tweets/index.d.mts.map +1 -0
- package/resources/x/tweets/index.d.ts +4 -0
- package/resources/x/tweets/index.d.ts.map +1 -0
- package/resources/x/tweets/index.js +11 -0
- package/resources/x/tweets/index.js.map +1 -0
- package/resources/x/tweets/index.mjs +5 -0
- package/resources/x/tweets/index.mjs.map +1 -0
- package/resources/x/tweets/like.d.mts +38 -0
- package/resources/x/tweets/like.d.mts.map +1 -0
- package/resources/x/tweets/like.d.ts +38 -0
- package/resources/x/tweets/like.d.ts.map +1 -0
- package/resources/x/tweets/like.js +25 -0
- package/resources/x/tweets/like.js.map +1 -0
- package/resources/x/tweets/like.mjs +21 -0
- package/resources/x/tweets/like.mjs.map +1 -0
- package/resources/x/tweets/retweet.d.mts +38 -0
- package/resources/x/tweets/retweet.d.mts.map +1 -0
- package/resources/x/tweets/retweet.d.ts +38 -0
- package/resources/x/tweets/retweet.d.ts.map +1 -0
- package/resources/x/tweets/retweet.js +25 -0
- package/resources/x/tweets/retweet.js.map +1 -0
- package/resources/x/tweets/retweet.mjs +21 -0
- package/resources/x/tweets/retweet.mjs.map +1 -0
- package/resources/x/tweets/tweets.d.mts +207 -0
- package/resources/x/tweets/tweets.d.mts.map +1 -0
- package/resources/x/tweets/tweets.d.ts +207 -0
- package/resources/x/tweets/tweets.d.ts.map +1 -0
- package/resources/x/tweets/tweets.js +87 -0
- package/resources/x/tweets/tweets.js.map +1 -0
- package/resources/x/tweets/tweets.mjs +82 -0
- package/resources/x/tweets/tweets.mjs.map +1 -0
- package/resources/x/tweets.d.mts +2 -0
- package/resources/x/tweets.d.mts.map +1 -0
- package/resources/x/tweets.d.ts +2 -0
- package/resources/x/tweets.d.ts.map +1 -0
- package/resources/x/tweets.js +6 -0
- package/resources/x/tweets.js.map +1 -0
- package/resources/x/tweets.mjs +3 -0
- package/resources/x/tweets.mjs.map +1 -0
- package/resources/x/users/follow.d.mts +38 -0
- package/resources/x/users/follow.d.mts.map +1 -0
- package/resources/x/users/follow.d.ts +38 -0
- package/resources/x/users/follow.d.ts.map +1 -0
- package/resources/x/users/follow.js +25 -0
- package/resources/x/users/follow.js.map +1 -0
- package/resources/x/users/follow.mjs +21 -0
- package/resources/x/users/follow.mjs.map +1 -0
- package/resources/x/users/index.d.mts +3 -0
- package/resources/x/users/index.d.mts.map +1 -0
- package/resources/x/users/index.d.ts +3 -0
- package/resources/x/users/index.d.ts.map +1 -0
- package/resources/x/users/index.js +9 -0
- package/resources/x/users/index.js.map +1 -0
- package/resources/x/users/index.mjs +4 -0
- package/resources/x/users/index.mjs.map +1 -0
- package/resources/x/users/users.d.mts +162 -0
- package/resources/x/users/users.d.mts.map +1 -0
- package/resources/x/users/users.d.ts +162 -0
- package/resources/x/users/users.d.ts.map +1 -0
- package/resources/x/users/users.js +112 -0
- package/resources/x/users/users.js.map +1 -0
- package/resources/x/users/users.mjs +107 -0
- package/resources/x/users/users.mjs.map +1 -0
- package/resources/x/users.d.mts +2 -0
- package/resources/x/users.d.mts.map +1 -0
- package/resources/x/users.d.ts +2 -0
- package/resources/x/users.d.ts.map +1 -0
- package/resources/x/users.js +6 -0
- package/resources/x/users.js.map +1 -0
- package/resources/x/users.mjs +3 -0
- package/resources/x/users.mjs.map +1 -0
- package/resources/x/x.d.mts +135 -0
- package/resources/x/x.d.mts.map +1 -0
- package/resources/x/x.d.ts +135 -0
- package/resources/x/x.d.ts.map +1 -0
- package/resources/x/x.js +85 -0
- package/resources/x/x.js.map +1 -0
- package/resources/x/x.mjs +80 -0
- package/resources/x/x.mjs.map +1 -0
- package/resources/x.d.mts +2 -0
- package/resources/x.d.mts.map +1 -0
- package/resources/x.d.ts +2 -0
- package/resources/x.d.ts.map +1 -0
- package/resources/x.js +6 -0
- package/resources/x.js.map +1 -0
- package/resources/x.mjs +3 -0
- package/resources/x.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1123 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/request-options.ts +93 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +127 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/account.ts +88 -0
- package/src/resources/api-keys.ts +80 -0
- package/src/resources/bot/bot.ts +15 -0
- package/src/resources/bot/index.ts +4 -0
- package/src/resources/bot/platform-links.ts +5 -0
- package/src/resources/bot.ts +3 -0
- package/src/resources/compose.ts +83 -0
- package/src/resources/credits.ts +56 -0
- package/src/resources/drafts.ts +107 -0
- package/src/resources/draws.ts +192 -0
- package/src/resources/events.ts +89 -0
- package/src/resources/extractions.ts +321 -0
- package/src/resources/index.ts +121 -0
- package/src/resources/integrations.ts +183 -0
- package/src/resources/monitors.ts +109 -0
- package/src/resources/radar.ts +82 -0
- package/src/resources/shared.ts +57 -0
- package/src/resources/styles.ts +184 -0
- package/src/resources/subscribe.ts +29 -0
- package/src/resources/support/index.ts +14 -0
- package/src/resources/support/support.ts +35 -0
- package/src/resources/support/tickets.ts +131 -0
- package/src/resources/support.ts +3 -0
- package/src/resources/trends.ts +53 -0
- package/src/resources/webhooks.ts +147 -0
- package/src/resources/x/accounts.ts +154 -0
- package/src/resources/x/bookmarks.ts +63 -0
- package/src/resources/x/communities/communities.ts +194 -0
- package/src/resources/x/communities/index.ts +16 -0
- package/src/resources/x/communities/join.ts +52 -0
- package/src/resources/x/communities/tweets.ts +43 -0
- package/src/resources/x/communities.ts +3 -0
- package/src/resources/x/dm.ts +88 -0
- package/src/resources/x/followers.ts +46 -0
- package/src/resources/x/index.ts +95 -0
- package/src/resources/x/lists.ts +101 -0
- package/src/resources/x/media.ts +79 -0
- package/src/resources/x/profile.ts +116 -0
- package/src/resources/x/tweets/index.ts +34 -0
- package/src/resources/x/tweets/like.ts +56 -0
- package/src/resources/x/tweets/retweet.ts +64 -0
- package/src/resources/x/tweets/tweets.ts +367 -0
- package/src/resources/x/tweets.ts +3 -0
- package/src/resources/x/users/follow.ts +64 -0
- package/src/resources/x/users/index.ts +23 -0
- package/src/resources/x/users/users.ts +311 -0
- package/src/resources/x/users.ts +3 -0
- package/src/resources/x/x.ts +368 -0
- package/src/resources/x.ts +3 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
* Subscription & billing
|
|
6
|
+
*/
|
|
7
|
+
export declare class Credits extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get credits balance
|
|
10
|
+
*/
|
|
11
|
+
retrieveBalance(options?: RequestOptions): APIPromise<CreditRetrieveBalanceResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Top up credits balance
|
|
14
|
+
*/
|
|
15
|
+
topupBalance(body: CreditTopupBalanceParams, options?: RequestOptions): APIPromise<CreditTopupBalanceResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface CreditRetrieveBalanceResponse {
|
|
18
|
+
auto_topup_enabled: boolean;
|
|
19
|
+
balance: number;
|
|
20
|
+
lifetime_purchased: number;
|
|
21
|
+
lifetime_used: number;
|
|
22
|
+
}
|
|
23
|
+
export interface CreditTopupBalanceResponse {
|
|
24
|
+
success: true;
|
|
25
|
+
}
|
|
26
|
+
export interface CreditTopupBalanceParams {
|
|
27
|
+
/**
|
|
28
|
+
* Amount to top up in credits
|
|
29
|
+
*/
|
|
30
|
+
amount: number;
|
|
31
|
+
}
|
|
32
|
+
export declare namespace Credits {
|
|
33
|
+
export { type CreditRetrieveBalanceResponse as CreditRetrieveBalanceResponse, type CreditTopupBalanceResponse as CreditTopupBalanceResponse, type CreditTopupBalanceParams as CreditTopupBalanceParams, };
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=credits.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAIpF;;OAEG;IACH,YAAY,CACV,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAG1C;AAED,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,OAAO,CAAC;IAE5B,OAAO,EAAE,MAAM,CAAC;IAEhB,kBAAkB,EAAE,MAAM,CAAC;IAE3B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
* Subscription & billing
|
|
6
|
+
*/
|
|
7
|
+
export declare class Credits extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get credits balance
|
|
10
|
+
*/
|
|
11
|
+
retrieveBalance(options?: RequestOptions): APIPromise<CreditRetrieveBalanceResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Top up credits balance
|
|
14
|
+
*/
|
|
15
|
+
topupBalance(body: CreditTopupBalanceParams, options?: RequestOptions): APIPromise<CreditTopupBalanceResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface CreditRetrieveBalanceResponse {
|
|
18
|
+
auto_topup_enabled: boolean;
|
|
19
|
+
balance: number;
|
|
20
|
+
lifetime_purchased: number;
|
|
21
|
+
lifetime_used: number;
|
|
22
|
+
}
|
|
23
|
+
export interface CreditTopupBalanceResponse {
|
|
24
|
+
success: true;
|
|
25
|
+
}
|
|
26
|
+
export interface CreditTopupBalanceParams {
|
|
27
|
+
/**
|
|
28
|
+
* Amount to top up in credits
|
|
29
|
+
*/
|
|
30
|
+
amount: number;
|
|
31
|
+
}
|
|
32
|
+
export declare namespace Credits {
|
|
33
|
+
export { type CreditRetrieveBalanceResponse as CreditRetrieveBalanceResponse, type CreditTopupBalanceResponse as CreditTopupBalanceResponse, type CreditTopupBalanceParams as CreditTopupBalanceParams, };
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=credits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAIpF;;OAEG;IACH,YAAY,CACV,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAG1C;AAED,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,OAAO,CAAC;IAE5B,OAAO,EAAE,MAAM,CAAC;IAEhB,kBAAkB,EAAE,MAAM,CAAC;IAE3B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.Credits = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Subscription & billing
|
|
8
|
+
*/
|
|
9
|
+
class Credits extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Get credits balance
|
|
12
|
+
*/
|
|
13
|
+
retrieveBalance(options) {
|
|
14
|
+
return this._client.get('/credits', options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Top up credits balance
|
|
18
|
+
*/
|
|
19
|
+
topupBalance(body, options) {
|
|
20
|
+
return this._client.post('/credits/topup', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.Credits = Credits;
|
|
24
|
+
//# sourceMappingURL=credits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.js","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,eAAe,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;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;AAjBD,0BAiBC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Subscription & billing
|
|
5
|
+
*/
|
|
6
|
+
export class Credits extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get credits balance
|
|
9
|
+
*/
|
|
10
|
+
retrieveBalance(options) {
|
|
11
|
+
return this._client.get('/credits', options);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Top up credits balance
|
|
15
|
+
*/
|
|
16
|
+
topupBalance(body, options) {
|
|
17
|
+
return this._client.post('/credits/topup', { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=credits.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.mjs","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,eAAe,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
* Tweet composition, drafts, writing styles & radar
|
|
6
|
+
*/
|
|
7
|
+
export declare class Drafts extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Save a tweet draft
|
|
10
|
+
*/
|
|
11
|
+
create(body: DraftCreateParams, options?: RequestOptions): APIPromise<DraftDetail>;
|
|
12
|
+
/**
|
|
13
|
+
* Get draft by ID
|
|
14
|
+
*/
|
|
15
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<DraftDetail>;
|
|
16
|
+
/**
|
|
17
|
+
* List saved drafts
|
|
18
|
+
*/
|
|
19
|
+
list(query?: DraftListParams | null | undefined, options?: RequestOptions): APIPromise<DraftListResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Delete a draft
|
|
22
|
+
*/
|
|
23
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
24
|
+
}
|
|
25
|
+
export interface Draft {
|
|
26
|
+
id: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
text: string;
|
|
29
|
+
goal?: string;
|
|
30
|
+
topic?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface DraftDetail {
|
|
33
|
+
id: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
text: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
goal?: string;
|
|
38
|
+
topic?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface DraftListResponse {
|
|
41
|
+
drafts: Array<Draft>;
|
|
42
|
+
hasMore: boolean;
|
|
43
|
+
nextCursor?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface DraftCreateParams {
|
|
46
|
+
text: string;
|
|
47
|
+
goal?: 'engagement' | 'followers' | 'authority' | 'conversation';
|
|
48
|
+
topic?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface DraftListParams {
|
|
51
|
+
/**
|
|
52
|
+
* Cursor for pagination
|
|
53
|
+
*/
|
|
54
|
+
afterCursor?: string;
|
|
55
|
+
limit?: number;
|
|
56
|
+
}
|
|
57
|
+
export declare namespace Drafts {
|
|
58
|
+
export { type Draft as Draft, type DraftDetail as DraftDetail, type DraftListResponse as DraftListResponse, type DraftCreateParams as DraftCreateParams, type DraftListParams as DraftListParams, };
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=drafts.d.mts.map
|
|
@@ -0,0 +1 @@
|
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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,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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
* Tweet composition, drafts, writing styles & radar
|
|
6
|
+
*/
|
|
7
|
+
export declare class Drafts extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Save a tweet draft
|
|
10
|
+
*/
|
|
11
|
+
create(body: DraftCreateParams, options?: RequestOptions): APIPromise<DraftDetail>;
|
|
12
|
+
/**
|
|
13
|
+
* Get draft by ID
|
|
14
|
+
*/
|
|
15
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<DraftDetail>;
|
|
16
|
+
/**
|
|
17
|
+
* List saved drafts
|
|
18
|
+
*/
|
|
19
|
+
list(query?: DraftListParams | null | undefined, options?: RequestOptions): APIPromise<DraftListResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Delete a draft
|
|
22
|
+
*/
|
|
23
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
24
|
+
}
|
|
25
|
+
export interface Draft {
|
|
26
|
+
id: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
text: string;
|
|
29
|
+
goal?: string;
|
|
30
|
+
topic?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface DraftDetail {
|
|
33
|
+
id: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
text: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
goal?: string;
|
|
38
|
+
topic?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface DraftListResponse {
|
|
41
|
+
drafts: Array<Draft>;
|
|
42
|
+
hasMore: boolean;
|
|
43
|
+
nextCursor?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface DraftCreateParams {
|
|
46
|
+
text: string;
|
|
47
|
+
goal?: 'engagement' | 'followers' | 'authority' | 'conversation';
|
|
48
|
+
topic?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface DraftListParams {
|
|
51
|
+
/**
|
|
52
|
+
* Cursor for pagination
|
|
53
|
+
*/
|
|
54
|
+
afterCursor?: string;
|
|
55
|
+
limit?: number;
|
|
56
|
+
}
|
|
57
|
+
export declare namespace Drafts {
|
|
58
|
+
export { type Draft as Draft, type DraftDetail as DraftDetail, type DraftListResponse as DraftListResponse, type DraftCreateParams as DraftCreateParams, type DraftListParams as DraftListParams, };
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=drafts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAIlF;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OA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,EACnB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.Drafts = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Tweet composition, drafts, writing styles & radar
|
|
10
|
+
*/
|
|
11
|
+
class Drafts extends resource_1.APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Save a tweet draft
|
|
14
|
+
*/
|
|
15
|
+
create(body, options) {
|
|
16
|
+
return this._client.post('/drafts', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get draft by ID
|
|
20
|
+
*/
|
|
21
|
+
retrieve(id, options) {
|
|
22
|
+
return this._client.get((0, path_1.path) `/drafts/${id}`, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* List saved drafts
|
|
26
|
+
*/
|
|
27
|
+
list(query = {}, options) {
|
|
28
|
+
return this._client.get('/drafts', { query, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Delete a draft
|
|
32
|
+
*/
|
|
33
|
+
delete(id, options) {
|
|
34
|
+
return this._client.delete((0, path_1.path) `/drafts/${id}`, {
|
|
35
|
+
...options,
|
|
36
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Drafts = Drafts;
|
|
41
|
+
//# sourceMappingURL=drafts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drafts.js","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;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;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;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;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE;YAC9C,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAlCD,wBAkCC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Tweet composition, drafts, writing styles & radar
|
|
7
|
+
*/
|
|
8
|
+
export class Drafts extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Save a tweet draft
|
|
11
|
+
*/
|
|
12
|
+
create(body, options) {
|
|
13
|
+
return this._client.post('/drafts', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get draft by ID
|
|
17
|
+
*/
|
|
18
|
+
retrieve(id, options) {
|
|
19
|
+
return this._client.get(path `/drafts/${id}`, options);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* List saved drafts
|
|
23
|
+
*/
|
|
24
|
+
list(query = {}, options) {
|
|
25
|
+
return this._client.get('/drafts', { query, ...options });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Delete a draft
|
|
29
|
+
*/
|
|
30
|
+
delete(id, options) {
|
|
31
|
+
return this._client.delete(path `/drafts/${id}`, {
|
|
32
|
+
...options,
|
|
33
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=drafts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drafts.mjs","sourceRoot":"","sources":["../src/resources/drafts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;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;;OAEG;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;;OAEG;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;;OAEG;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"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
* Giveaway draws from tweet replies
|
|
6
|
+
*/
|
|
7
|
+
export declare class Draws extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get draw details
|
|
10
|
+
*/
|
|
11
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<DrawRetrieveResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* List draws
|
|
14
|
+
*/
|
|
15
|
+
list(query?: DrawListParams | null | undefined, options?: RequestOptions): APIPromise<DrawListResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Export draw data
|
|
18
|
+
*/
|
|
19
|
+
export(id: string, query?: DrawExportParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
|
|
20
|
+
/**
|
|
21
|
+
* Run giveaway draw
|
|
22
|
+
*/
|
|
23
|
+
run(body: DrawRunParams, options?: RequestOptions): APIPromise<DrawRunResponse>;
|
|
24
|
+
}
|
|
25
|
+
export interface DrawDetail {
|
|
26
|
+
id: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
status: string;
|
|
29
|
+
totalEntries: number;
|
|
30
|
+
tweetAuthorUsername: string;
|
|
31
|
+
tweetId: string;
|
|
32
|
+
tweetLikeCount: number;
|
|
33
|
+
tweetQuoteCount: number;
|
|
34
|
+
tweetReplyCount: number;
|
|
35
|
+
tweetRetweetCount: number;
|
|
36
|
+
tweetText: string;
|
|
37
|
+
tweetUrl: string;
|
|
38
|
+
validEntries: number;
|
|
39
|
+
drawnAt?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DrawListItem {
|
|
42
|
+
id: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
status: string;
|
|
45
|
+
totalEntries: number;
|
|
46
|
+
tweetUrl: string;
|
|
47
|
+
validEntries: number;
|
|
48
|
+
drawnAt?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface Winner {
|
|
51
|
+
authorUsername: string;
|
|
52
|
+
isBackup: boolean;
|
|
53
|
+
position: number;
|
|
54
|
+
tweetId: string;
|
|
55
|
+
}
|
|
56
|
+
export interface DrawRetrieveResponse {
|
|
57
|
+
draw: DrawDetail;
|
|
58
|
+
winners: Array<Winner>;
|
|
59
|
+
}
|
|
60
|
+
export interface DrawListResponse {
|
|
61
|
+
draws: Array<DrawListItem>;
|
|
62
|
+
hasMore: boolean;
|
|
63
|
+
nextCursor?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface DrawRunResponse {
|
|
66
|
+
id: string;
|
|
67
|
+
totalEntries: number;
|
|
68
|
+
tweetId: string;
|
|
69
|
+
validEntries: number;
|
|
70
|
+
winners: Array<Winner>;
|
|
71
|
+
}
|
|
72
|
+
export interface DrawListParams {
|
|
73
|
+
/**
|
|
74
|
+
* Cursor for pagination
|
|
75
|
+
*/
|
|
76
|
+
after?: string;
|
|
77
|
+
limit?: number;
|
|
78
|
+
}
|
|
79
|
+
export interface DrawExportParams {
|
|
80
|
+
format?: 'csv' | 'json' | 'md' | 'md-document' | 'pdf' | 'txt' | 'xlsx';
|
|
81
|
+
/**
|
|
82
|
+
* Export winners or all entries
|
|
83
|
+
*/
|
|
84
|
+
type?: 'winners' | 'entries';
|
|
85
|
+
}
|
|
86
|
+
export interface DrawRunParams {
|
|
87
|
+
tweetUrl: string;
|
|
88
|
+
backupCount?: number;
|
|
89
|
+
filterAccountAgeDays?: number;
|
|
90
|
+
filterLanguage?: string;
|
|
91
|
+
filterMinFollowers?: number;
|
|
92
|
+
mustFollowUsername?: string;
|
|
93
|
+
mustRetweet?: boolean;
|
|
94
|
+
requiredHashtags?: Array<string>;
|
|
95
|
+
requiredKeywords?: Array<string>;
|
|
96
|
+
requiredMentions?: Array<string>;
|
|
97
|
+
uniqueAuthorsOnly?: boolean;
|
|
98
|
+
winnerCount?: number;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace Draws {
|
|
101
|
+
export { type DrawDetail as DrawDetail, type DrawListItem as DrawListItem, type Winner as Winner, type DrawRetrieveResponse as DrawRetrieveResponse, type DrawListResponse as DrawListResponse, type DrawRunResponse as DrawRunResponse, type DrawListParams as DrawListParams, type DrawExportParams as DrawExportParams, type DrawRunParams as DrawRunParams, };
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=draws.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draws.d.mts","sourceRoot":"","sources":["../src/resources/draws.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIhF;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,I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EjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
* Giveaway draws from tweet replies
|
|
6
|
+
*/
|
|
7
|
+
export declare class Draws extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get draw details
|
|
10
|
+
*/
|
|
11
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<DrawRetrieveResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* List draws
|
|
14
|
+
*/
|
|
15
|
+
list(query?: DrawListParams | null | undefined, options?: RequestOptions): APIPromise<DrawListResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Export draw data
|
|
18
|
+
*/
|
|
19
|
+
export(id: string, query?: DrawExportParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
|
|
20
|
+
/**
|
|
21
|
+
* Run giveaway draw
|
|
22
|
+
*/
|
|
23
|
+
run(body: DrawRunParams, options?: RequestOptions): APIPromise<DrawRunResponse>;
|
|
24
|
+
}
|
|
25
|
+
export interface DrawDetail {
|
|
26
|
+
id: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
status: string;
|
|
29
|
+
totalEntries: number;
|
|
30
|
+
tweetAuthorUsername: string;
|
|
31
|
+
tweetId: string;
|
|
32
|
+
tweetLikeCount: number;
|
|
33
|
+
tweetQuoteCount: number;
|
|
34
|
+
tweetReplyCount: number;
|
|
35
|
+
tweetRetweetCount: number;
|
|
36
|
+
tweetText: string;
|
|
37
|
+
tweetUrl: string;
|
|
38
|
+
validEntries: number;
|
|
39
|
+
drawnAt?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DrawListItem {
|
|
42
|
+
id: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
status: string;
|
|
45
|
+
totalEntries: number;
|
|
46
|
+
tweetUrl: string;
|
|
47
|
+
validEntries: number;
|
|
48
|
+
drawnAt?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface Winner {
|
|
51
|
+
authorUsername: string;
|
|
52
|
+
isBackup: boolean;
|
|
53
|
+
position: number;
|
|
54
|
+
tweetId: string;
|
|
55
|
+
}
|
|
56
|
+
export interface DrawRetrieveResponse {
|
|
57
|
+
draw: DrawDetail;
|
|
58
|
+
winners: Array<Winner>;
|
|
59
|
+
}
|
|
60
|
+
export interface DrawListResponse {
|
|
61
|
+
draws: Array<DrawListItem>;
|
|
62
|
+
hasMore: boolean;
|
|
63
|
+
nextCursor?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface DrawRunResponse {
|
|
66
|
+
id: string;
|
|
67
|
+
totalEntries: number;
|
|
68
|
+
tweetId: string;
|
|
69
|
+
validEntries: number;
|
|
70
|
+
winners: Array<Winner>;
|
|
71
|
+
}
|
|
72
|
+
export interface DrawListParams {
|
|
73
|
+
/**
|
|
74
|
+
* Cursor for pagination
|
|
75
|
+
*/
|
|
76
|
+
after?: string;
|
|
77
|
+
limit?: number;
|
|
78
|
+
}
|
|
79
|
+
export interface DrawExportParams {
|
|
80
|
+
format?: 'csv' | 'json' | 'md' | 'md-document' | 'pdf' | 'txt' | 'xlsx';
|
|
81
|
+
/**
|
|
82
|
+
* Export winners or all entries
|
|
83
|
+
*/
|
|
84
|
+
type?: 'winners' | 'entries';
|
|
85
|
+
}
|
|
86
|
+
export interface DrawRunParams {
|
|
87
|
+
tweetUrl: string;
|
|
88
|
+
backupCount?: number;
|
|
89
|
+
filterAccountAgeDays?: number;
|
|
90
|
+
filterLanguage?: string;
|
|
91
|
+
filterMinFollowers?: number;
|
|
92
|
+
mustFollowUsername?: string;
|
|
93
|
+
mustRetweet?: boolean;
|
|
94
|
+
requiredHashtags?: Array<string>;
|
|
95
|
+
requiredKeywords?: Array<string>;
|
|
96
|
+
requiredMentions?: Array<string>;
|
|
97
|
+
uniqueAuthorsOnly?: boolean;
|
|
98
|
+
winnerCount?: number;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace Draws {
|
|
101
|
+
export { type DrawDetail as DrawDetail, type DrawListItem as DrawListItem, type Winner as Winner, type DrawRetrieveResponse as DrawRetrieveResponse, type DrawListResponse as DrawListResponse, type DrawRunResponse as DrawRunResponse, type DrawListParams as DrawListParams, type DrawExportParams as DrawExportParams, type DrawRunParams as DrawRunParams, };
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=draws.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draws.d.ts","sourceRoot":"","sources":["../src/resources/draws.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIhF;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;IAI/B;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,KAAK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KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.Draws = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Giveaway draws from tweet replies
|
|
10
|
+
*/
|
|
11
|
+
class Draws extends resource_1.APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Get draw details
|
|
14
|
+
*/
|
|
15
|
+
retrieve(id, options) {
|
|
16
|
+
return this._client.get((0, path_1.path) `/draws/${id}`, options);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* List draws
|
|
20
|
+
*/
|
|
21
|
+
list(query = {}, options) {
|
|
22
|
+
return this._client.get('/draws', { query, ...options });
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Export draw data
|
|
26
|
+
*/
|
|
27
|
+
export(id, query = {}, options) {
|
|
28
|
+
return this._client.get((0, path_1.path) `/draws/${id}/export`, {
|
|
29
|
+
query,
|
|
30
|
+
...options,
|
|
31
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: 'application/octet-stream' }, options?.headers]),
|
|
32
|
+
__binaryResponse: true,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Run giveaway draw
|
|
37
|
+
*/
|
|
38
|
+
run(body, options) {
|
|
39
|
+
return this._client.post('/draws', { body, ...options });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.Draws = Draws;
|
|
43
|
+
//# sourceMappingURL=draws.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draws.js","sourceRoot":"","sources":["../src/resources/draws.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,EAAE,SAAS,EAAE;YACjD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAmB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF;AAxCD,sBAwCC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Giveaway draws from tweet replies
|
|
7
|
+
*/
|
|
8
|
+
export class Draws extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get draw details
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id, options) {
|
|
13
|
+
return this._client.get(path `/draws/${id}`, options);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* List draws
|
|
17
|
+
*/
|
|
18
|
+
list(query = {}, options) {
|
|
19
|
+
return this._client.get('/draws', { query, ...options });
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Export draw data
|
|
23
|
+
*/
|
|
24
|
+
export(id, query = {}, options) {
|
|
25
|
+
return this._client.get(path `/draws/${id}/export`, {
|
|
26
|
+
query,
|
|
27
|
+
...options,
|
|
28
|
+
headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
|
|
29
|
+
__binaryResponse: true,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Run giveaway draw
|
|
34
|
+
*/
|
|
35
|
+
run(body, options) {
|
|
36
|
+
return this._client.post('/draws', { body, ...options });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=draws.mjs.map
|