x-twitter-scraper 0.12.4 → 0.13.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 +65 -0
- package/README.md +30 -9
- package/client.d.mts +18 -15
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -15
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +4 -4
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts +33 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +33 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +270 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +265 -0
- package/core/streaming.mjs.map +1 -0
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +17 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +116 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +111 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +7 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +7 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/tslib.js +18 -18
- package/package.json +23 -5
- package/resources/account.d.mts +35 -12
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +35 -12
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +4 -3
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +4 -3
- package/resources/account.mjs.map +1 -1
- package/resources/compose.d.mts +77 -21
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts +77 -21
- package/resources/compose.d.ts.map +1 -1
- package/resources/compose.js +3 -4
- package/resources/compose.js.map +1 -1
- package/resources/compose.mjs +3 -4
- package/resources/compose.mjs.map +1 -1
- package/resources/credits.d.mts +18 -10
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +18 -10
- package/resources/credits.d.ts.map +1 -1
- package/resources/credits.js +5 -4
- package/resources/credits.js.map +1 -1
- package/resources/credits.mjs +5 -4
- package/resources/credits.mjs.map +1 -1
- package/resources/drafts.d.mts +13 -17
- package/resources/drafts.d.mts.map +1 -1
- package/resources/drafts.d.ts +13 -17
- package/resources/drafts.d.ts.map +1 -1
- package/resources/drafts.js +4 -4
- package/resources/drafts.mjs +4 -4
- package/resources/draws.d.mts +84 -28
- package/resources/draws.d.mts.map +1 -1
- package/resources/draws.d.ts +84 -28
- package/resources/draws.d.ts.map +1 -1
- package/resources/draws.js +24 -9
- package/resources/draws.js.map +1 -1
- package/resources/draws.mjs +24 -9
- package/resources/draws.mjs.map +1 -1
- package/resources/events.d.mts +2564 -21
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +2564 -21
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +34 -2
- package/resources/events.js.map +1 -1
- package/resources/events.mjs +34 -2
- package/resources/events.mjs.map +1 -1
- package/resources/extractions.d.mts +410 -128
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +410 -128
- package/resources/extractions.d.ts.map +1 -1
- package/resources/extractions.js +74 -12
- package/resources/extractions.js.map +1 -1
- package/resources/extractions.mjs +74 -12
- package/resources/extractions.mjs.map +1 -1
- package/resources/guest-wallets.d.mts +6 -5
- package/resources/guest-wallets.d.mts.map +1 -1
- package/resources/guest-wallets.d.ts +6 -5
- package/resources/guest-wallets.d.ts.map +1 -1
- package/resources/guest-wallets.js +2 -1
- package/resources/guest-wallets.js.map +1 -1
- package/resources/guest-wallets.mjs +2 -1
- package/resources/guest-wallets.mjs.map +1 -1
- package/resources/index.d.mts +6 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/monitors/index.d.mts +2 -2
- package/resources/monitors/index.d.mts.map +1 -1
- package/resources/monitors/index.d.ts +2 -2
- package/resources/monitors/index.d.ts.map +1 -1
- package/resources/monitors/index.js.map +1 -1
- package/resources/monitors/index.mjs.map +1 -1
- package/resources/monitors/keywords.d.mts +66 -14
- package/resources/monitors/keywords.d.mts.map +1 -1
- package/resources/monitors/keywords.d.ts +66 -14
- package/resources/monitors/keywords.d.ts.map +1 -1
- package/resources/monitors/keywords.js +16 -10
- package/resources/monitors/keywords.js.map +1 -1
- package/resources/monitors/keywords.mjs +16 -10
- package/resources/monitors/keywords.mjs.map +1 -1
- package/resources/monitors/monitors.d.mts +53 -16
- package/resources/monitors/monitors.d.mts.map +1 -1
- package/resources/monitors/monitors.d.ts +53 -16
- package/resources/monitors/monitors.d.ts.map +1 -1
- package/resources/monitors/monitors.js +12 -10
- package/resources/monitors/monitors.js.map +1 -1
- package/resources/monitors/monitors.mjs +12 -10
- package/resources/monitors/monitors.mjs.map +1 -1
- package/resources/radar.d.mts +32 -36
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +32 -36
- package/resources/radar.d.ts.map +1 -1
- package/resources/radar.js +1 -1
- package/resources/radar.mjs +1 -1
- package/resources/shared.d.mts +1726 -233
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +1726 -233
- package/resources/shared.d.ts.map +1 -1
- package/resources/styles.d.mts +34 -23
- package/resources/styles.d.mts.map +1 -1
- package/resources/styles.d.ts +34 -23
- package/resources/styles.d.ts.map +1 -1
- package/resources/styles.js +11 -13
- package/resources/styles.js.map +1 -1
- package/resources/styles.mjs +11 -13
- package/resources/styles.mjs.map +1 -1
- package/resources/subscribe.d.mts +1 -1
- package/resources/subscribe.d.ts +1 -1
- package/resources/subscribe.js +1 -1
- package/resources/subscribe.mjs +1 -1
- package/resources/support/index.d.mts +1 -1
- package/resources/support/index.d.mts.map +1 -1
- package/resources/support/index.d.ts +1 -1
- package/resources/support/index.d.ts.map +1 -1
- package/resources/support/index.js.map +1 -1
- package/resources/support/index.mjs.map +1 -1
- package/resources/support/support.d.mts +2 -2
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts +2 -2
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/support.js.map +1 -1
- package/resources/support/support.mjs.map +1 -1
- package/resources/support/tickets.d.mts +30 -10
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +30 -10
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +7 -7
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +7 -7
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/trends.d.mts +21 -5
- package/resources/trends.d.mts.map +1 -1
- package/resources/trends.d.ts +21 -5
- package/resources/trends.d.ts.map +1 -1
- package/resources/trends.js +2 -1
- package/resources/trends.js.map +1 -1
- package/resources/trends.mjs +2 -1
- package/resources/trends.mjs.map +1 -1
- package/resources/webhooks.d.mts +80 -14
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +80 -14
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +30 -11
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +30 -11
- package/resources/webhooks.mjs.map +1 -1
- package/resources/x/account-connection-attempts.d.mts +1 -1
- package/resources/x/account-connection-attempts.d.ts +1 -1
- package/resources/x/account-connection-attempts.js +1 -1
- package/resources/x/account-connection-attempts.mjs +1 -1
- package/resources/x/account-connection-challenges.d.mts +30 -11
- package/resources/x/account-connection-challenges.d.mts.map +1 -1
- package/resources/x/account-connection-challenges.d.ts +30 -11
- package/resources/x/account-connection-challenges.d.ts.map +1 -1
- package/resources/x/account-connection-challenges.js +5 -4
- package/resources/x/account-connection-challenges.js.map +1 -1
- package/resources/x/account-connection-challenges.mjs +5 -4
- package/resources/x/account-connection-challenges.mjs.map +1 -1
- package/resources/x/accounts.d.mts +38 -10
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +38 -10
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +8 -7
- package/resources/x/accounts.js.map +1 -1
- package/resources/x/accounts.mjs +8 -7
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/analysis.d.mts +3274 -0
- package/resources/x/analysis.d.mts.map +1 -0
- package/resources/x/analysis.d.ts +3274 -0
- package/resources/x/analysis.d.ts.map +1 -0
- package/resources/x/analysis.js +132 -0
- package/resources/x/analysis.js.map +1 -0
- package/resources/x/analysis.mjs +128 -0
- package/resources/x/analysis.mjs.map +1 -0
- package/resources/x/bookmarks.d.mts +84 -9
- package/resources/x/bookmarks.d.mts.map +1 -1
- package/resources/x/bookmarks.d.ts +84 -9
- package/resources/x/bookmarks.d.ts.map +1 -1
- package/resources/x/bookmarks.js +6 -4
- package/resources/x/bookmarks.js.map +1 -1
- package/resources/x/bookmarks.mjs +6 -4
- package/resources/x/bookmarks.mjs.map +1 -1
- package/resources/x/broadcasts.d.mts +176 -0
- package/resources/x/broadcasts.d.mts.map +1 -0
- package/resources/x/broadcasts.d.ts +176 -0
- package/resources/x/broadcasts.d.ts.map +1 -0
- package/resources/x/broadcasts.js +29 -0
- package/resources/x/broadcasts.js.map +1 -0
- package/resources/x/broadcasts.mjs +25 -0
- package/resources/x/broadcasts.mjs.map +1 -0
- package/resources/x/communities/communities.d.mts +612 -128
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +612 -128
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +96 -17
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +96 -17
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/index.d.mts +2 -1
- package/resources/x/communities/index.d.mts.map +1 -1
- package/resources/x/communities/index.d.ts +2 -1
- package/resources/x/communities/index.d.ts.map +1 -1
- package/resources/x/communities/index.js +3 -1
- package/resources/x/communities/index.js.map +1 -1
- package/resources/x/communities/index.mjs +1 -0
- package/resources/x/communities/index.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +46 -25
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +46 -25
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +10 -7
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +10 -7
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/communities/media.d.mts +197 -0
- package/resources/x/communities/media.d.mts.map +1 -0
- package/resources/x/communities/media.d.ts +197 -0
- package/resources/x/communities/media.d.ts.map +1 -0
- package/resources/x/communities/media.js +29 -0
- package/resources/x/communities/media.js.map +1 -0
- package/resources/x/communities/media.mjs +25 -0
- package/resources/x/communities/media.mjs.map +1 -0
- package/resources/x/communities/tweets.d.mts +350 -20
- package/resources/x/communities/tweets.d.mts.map +1 -1
- package/resources/x/communities/tweets.d.ts +350 -20
- package/resources/x/communities/tweets.d.ts.map +1 -1
- package/resources/x/communities/tweets.js +8 -7
- package/resources/x/communities/tweets.js.map +1 -1
- package/resources/x/communities/tweets.mjs +8 -7
- package/resources/x/communities/tweets.mjs.map +1 -1
- package/resources/x/dm.d.mts +245 -13
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +245 -13
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +29 -2
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +29 -2
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/followers.d.mts +31 -3
- package/resources/x/followers.d.mts.map +1 -1
- package/resources/x/followers.d.ts +31 -3
- package/resources/x/followers.d.ts.map +1 -1
- package/resources/x/followers.js +2 -1
- package/resources/x/followers.js.map +1 -1
- package/resources/x/followers.mjs +2 -1
- package/resources/x/followers.mjs.map +1 -1
- package/resources/x/index.d.mts +12 -8
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +12 -8
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js +9 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs +5 -1
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/jobs.d.mts +506 -0
- package/resources/x/jobs.d.mts.map +1 -0
- package/resources/x/jobs.d.ts +506 -0
- package/resources/x/jobs.d.ts.map +1 -0
- package/resources/x/jobs.js +60 -0
- package/resources/x/jobs.js.map +1 -0
- package/resources/x/jobs.mjs +56 -0
- package/resources/x/jobs.mjs.map +1 -0
- package/resources/x/lists.d.mts +1058 -27
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +1058 -27
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/lists.js +39 -9
- package/resources/x/lists.js.map +1 -1
- package/resources/x/lists.mjs +39 -9
- package/resources/x/lists.mjs.map +1 -1
- package/resources/x/media.d.mts +24 -13
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +24 -13
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +2 -2
- package/resources/x/media.mjs +2 -2
- package/resources/x/profile.d.mts +60 -33
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +60 -33
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +3 -3
- package/resources/x/profile.mjs +3 -3
- package/resources/x/spaces.d.mts +857 -0
- package/resources/x/spaces.d.mts.map +1 -0
- package/resources/x/spaces.d.ts +857 -0
- package/resources/x/spaces.d.ts.map +1 -0
- package/resources/x/spaces.js +58 -0
- package/resources/x/spaces.js.map +1 -0
- package/resources/x/spaces.mjs +54 -0
- package/resources/x/spaces.mjs.map +1 -0
- package/resources/x/tweets/index.d.mts +1 -1
- package/resources/x/tweets/index.d.mts.map +1 -1
- package/resources/x/tweets/index.d.ts +1 -1
- package/resources/x/tweets/index.d.ts.map +1 -1
- package/resources/x/tweets/index.js.map +1 -1
- package/resources/x/tweets/index.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +38 -20
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +38 -20
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +2 -2
- package/resources/x/tweets/like.mjs +2 -2
- package/resources/x/tweets/retweet.d.mts +38 -20
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +38 -20
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +2 -2
- package/resources/x/tweets/retweet.mjs +2 -2
- package/resources/x/tweets/tweets.d.mts +2639 -326
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +2639 -326
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +147 -21
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +147 -21
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +38 -20
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +38 -20
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +2 -2
- package/resources/x/users/follow.mjs +2 -2
- 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 +3068 -457
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +3068 -457
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +205 -22
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +205 -22
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/write-actions.d.mts +13 -6
- package/resources/x/write-actions.d.mts.map +1 -1
- package/resources/x/write-actions.d.ts +13 -6
- package/resources/x/write-actions.d.ts.map +1 -1
- package/resources/x/write-actions.js +1 -1
- package/resources/x/write-actions.mjs +1 -1
- package/resources/x/x.d.mts +864 -27
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +864 -27
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +78 -5
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +80 -7
- package/resources/x/x.mjs.map +1 -1
- package/skills/x-twitter-scraper/SKILL.md +99 -344
- package/skills/x-twitter-scraper/metadata.json +2 -2
- package/skills/x-twitter-scraper/references/mcp-setup.md +12 -15
- package/skills/x-twitter-scraper/references/mcp-tools.md +105 -166
- package/skills/x-twitter-scraper/references/types-mcp-output-schemas.md +4 -4
- package/skills/x-twitter-scraper/references/types.md +0 -1
- package/skills/x-twitter-scraper/skill-card.md +5 -6
- package/skills/x-twitter-scraper/skillspector-report.md +6 -3
- package/skills/xquik-account-automation/LICENSE +21 -0
- package/skills/xquik-account-automation/SKILL.md +91 -0
- package/skills/xquik-social-research/SKILL.md +48 -55
- package/src/client.ts +47 -4
- package/src/core/streaming.ts +328 -0
- package/src/internal/decoders/line.ts +140 -0
- package/src/internal/parse.ts +9 -0
- package/src/resources/account.ts +41 -12
- package/src/resources/compose.ts +77 -21
- package/src/resources/credits.ts +19 -10
- package/src/resources/drafts.ts +13 -22
- package/src/resources/draws.ts +94 -36
- package/src/resources/events.ts +3225 -68
- package/src/resources/extractions.ts +512 -125
- package/src/resources/guest-wallets.ts +6 -5
- package/src/resources/index.ts +24 -1
- package/src/resources/monitors/index.ts +2 -0
- package/src/resources/monitors/keywords.ts +82 -14
- package/src/resources/monitors/monitors.ts +66 -14
- package/src/resources/radar.ts +32 -36
- package/src/resources/shared.ts +2227 -351
- package/src/resources/styles.ts +43 -27
- package/src/resources/subscribe.ts +1 -1
- package/src/resources/support/index.ts +1 -0
- package/src/resources/support/support.ts +2 -0
- package/src/resources/support/tickets.ts +38 -10
- package/src/resources/trends.ts +23 -5
- package/src/resources/webhooks.ts +109 -15
- package/src/resources/x/account-connection-attempts.ts +1 -1
- package/src/resources/x/account-connection-challenges.ts +39 -11
- package/src/resources/x/accounts.ts +46 -10
- package/src/resources/x/analysis.ts +3947 -0
- package/src/resources/x/bookmarks.ts +103 -9
- package/src/resources/x/broadcasts.ts +225 -0
- package/src/resources/x/communities/communities.ts +743 -141
- package/src/resources/x/communities/index.ts +9 -0
- package/src/resources/x/communities/join.ts +46 -23
- package/src/resources/x/communities/media.ts +251 -0
- package/src/resources/x/communities/tweets.ts +427 -20
- package/src/resources/x/dm.ts +334 -11
- package/src/resources/x/followers.ts +35 -3
- package/src/resources/x/index.ts +106 -1
- package/src/resources/x/jobs.ts +627 -0
- package/src/resources/x/lists.ts +1307 -28
- package/src/resources/x/media.ts +24 -12
- package/src/resources/x/profile.ts +60 -30
- package/src/resources/x/spaces.ts +1076 -0
- package/src/resources/x/tweets/index.ts +18 -0
- package/src/resources/x/tweets/like.ts +38 -18
- package/src/resources/x/tweets/retweet.ts +38 -18
- package/src/resources/x/tweets/tweets.ts +3695 -843
- package/src/resources/x/users/follow.ts +38 -18
- package/src/resources/x/users/index.ts +22 -0
- package/src/resources/x/users/users.ts +3687 -465
- package/src/resources/x/write-actions.ts +13 -5
- package/src/resources/x/x.ts +1227 -15
- package/src/streaming.ts +6 -0
- package/src/version.ts +1 -1
- package/streaming.d.mts +3 -0
- package/streaming.d.mts.map +1 -0
- package/streaming.d.ts +3 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +9 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +6 -0
- package/streaming.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/skills/x-twitter-scraper/references/types-rest-api-vs-mcp-field-naming.md +0 -15
package/resources/trends.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class Trends extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Returns current regional trends through the compatibility route. Each request
|
|
10
|
+
* costs 1 credit, however many trends it returns.
|
|
10
11
|
*/
|
|
11
12
|
list(query?: TrendListParams | null | undefined, options?: RequestOptions): APIPromise<TrendListResponse>;
|
|
12
13
|
}
|
|
@@ -20,17 +21,17 @@ export declare namespace TrendListResponse {
|
|
|
20
21
|
name: string;
|
|
21
22
|
description?: string;
|
|
22
23
|
/**
|
|
23
|
-
* Promotion
|
|
24
|
+
* Promotion ID for this trend, or null when organic.
|
|
24
25
|
*/
|
|
25
26
|
promotedContent?: string | null;
|
|
26
27
|
query?: string;
|
|
27
28
|
rank?: number;
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
+
* Estimated post volume for this trend.
|
|
30
31
|
*/
|
|
31
32
|
tweetVolume?: number | null;
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* Search URL associated with this trend.
|
|
34
35
|
*/
|
|
35
36
|
url?: string;
|
|
36
37
|
}
|
|
@@ -41,7 +42,22 @@ export interface TrendListParams {
|
|
|
41
42
|
*/
|
|
42
43
|
count?: number;
|
|
43
44
|
/**
|
|
44
|
-
*
|
|
45
|
+
* Fields to keep in each row, comma-separated. Use dots for nested fields, such as
|
|
46
|
+
* author.username. A list keeps the field in each item. Case & underscores do not
|
|
47
|
+
* matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
|
|
48
|
+
* always stay. An unknown name answers 400 unknown_field with the valid names,
|
|
49
|
+
* before any read. The price stays the same. SDK row types then hold only the
|
|
50
|
+
* named fields.
|
|
51
|
+
*/
|
|
52
|
+
fields?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Fields to drop from each row, comma-separated. It takes the same names as
|
|
55
|
+
* fields. With fields, it drops from the kept fields.
|
|
56
|
+
*/
|
|
57
|
+
omit?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The WOEID of any place X lists trends for (1=Worldwide, 23424977=US,
|
|
60
|
+
* 23424975=UK, 23424969=Turkey). List places with GET /x/trends/locations.
|
|
45
61
|
*/
|
|
46
62
|
woeid?: number;
|
|
47
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trends.d.ts","sourceRoot":"","sources":["../src/resources/trends.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"trends.d.ts","sourceRoot":"","sources":["../src/resources/trends.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;CAGjC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAEvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,KAAK;QACpB,IAAI,EAAE,MAAM,CAAC;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEhC,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACjG"}
|
package/resources/trends.js
CHANGED
|
@@ -11,7 +11,8 @@ const resource_1 = require("../core/resource.js");
|
|
|
11
11
|
*/
|
|
12
12
|
class Trends extends resource_1.APIResource {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Returns current regional trends through the compatibility route. Each request
|
|
15
|
+
* costs 1 credit, however many trends it returns.
|
|
15
16
|
*/
|
|
16
17
|
list(query = {}, options) {
|
|
17
18
|
return this._client.get('/trends', { query, ...options });
|
package/resources/trends.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trends.js","sourceRoot":"","sources":["../src/resources/trends.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEtC,sFAAsF;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"trends.js","sourceRoot":"","sources":["../src/resources/trends.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEtC,sFAAsF;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;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;CACF;AAXD,wBAWC"}
|
package/resources/trends.mjs
CHANGED
|
@@ -8,7 +8,8 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
8
8
|
*/
|
|
9
9
|
export class Trends extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Returns current regional trends through the compatibility route. Each request
|
|
12
|
+
* costs 1 credit, however many trends it returns.
|
|
12
13
|
*/
|
|
13
14
|
list(query = {}, options) {
|
|
14
15
|
return this._client.get('/trends', { query, ...options });
|
package/resources/trends.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trends.mjs","sourceRoot":"","sources":["../src/resources/trends.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"trends.mjs","sourceRoot":"","sources":["../src/resources/trends.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;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;CACF"}
|
package/resources/webhooks.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class Webhooks extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Registers an endpoint for signed event deliveries.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
@@ -19,11 +19,12 @@ export declare class Webhooks extends APIResource {
|
|
|
19
19
|
*/
|
|
20
20
|
create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Updates an endpoint, event selection, or delivery settings.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
26
|
* const webhook = await client.webhooks.update('id', {
|
|
27
|
+
* eventTypes: ['tweet.new'],
|
|
27
28
|
* isActive: true,
|
|
28
29
|
* url: 'https://example.com/webhook',
|
|
29
30
|
* });
|
|
@@ -31,16 +32,32 @@ export declare class Webhooks extends APIResource {
|
|
|
31
32
|
*/
|
|
32
33
|
update(id: string, body: WebhookUpdateParams, options?: RequestOptions): APIPromise<Webhook>;
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Returns configured webhook endpoints and delivery states.
|
|
35
36
|
*
|
|
36
37
|
* @example
|
|
37
38
|
* ```ts
|
|
38
39
|
* const webhooks = await client.webhooks.list();
|
|
39
40
|
* ```
|
|
40
41
|
*/
|
|
41
|
-
list(options?: RequestOptions): APIPromise<WebhookListResponse>;
|
|
42
|
+
list(query?: WebhookListParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListResponse>;
|
|
42
43
|
/**
|
|
43
|
-
*
|
|
44
|
+
* Returns a t.me link to @XquikBot that connects a Telegram chat to the account's
|
|
45
|
+
* monitor events. Opening it & pressing Start connects the chat, which then gets
|
|
46
|
+
* each event as a message. The link works once, within 15 minutes. The chat
|
|
47
|
+
* appears in the webhook list with the URL telegram:<chat ID>, with deliveries,
|
|
48
|
+
* retries & resume as any webhook. In the chat, /stop pauses its alerts. It costs
|
|
49
|
+
* no credits.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const response = await client.webhooks.createTelegramLink({
|
|
54
|
+
* eventTypes: ['tweet.new', 'tweet.reply'],
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
createTelegramLink(body?: WebhookCreateTelegramLinkParams | null | undefined, options?: RequestOptions): APIPromise<WebhookCreateTelegramLinkResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Stops future deliveries to the selected webhook.
|
|
44
61
|
*
|
|
45
62
|
* @example
|
|
46
63
|
* ```ts
|
|
@@ -49,16 +66,16 @@ export declare class Webhooks extends APIResource {
|
|
|
49
66
|
*/
|
|
50
67
|
deactivate(id: string, options?: RequestOptions): APIPromise<WebhookDeactivateResponse>;
|
|
51
68
|
/**
|
|
52
|
-
*
|
|
69
|
+
* Returns delivery attempts and response outcomes, newest first.
|
|
53
70
|
*
|
|
54
71
|
* @example
|
|
55
72
|
* ```ts
|
|
56
73
|
* const response = await client.webhooks.listDeliveries('id');
|
|
57
74
|
* ```
|
|
58
75
|
*/
|
|
59
|
-
listDeliveries(id: string, options?: RequestOptions): APIPromise<WebhookListDeliveriesResponse>;
|
|
76
|
+
listDeliveries(id: string, query?: WebhookListDeliveriesParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListDeliveriesResponse>;
|
|
60
77
|
/**
|
|
61
|
-
*
|
|
78
|
+
* Tests the endpoint before resuming a manually paused webhook.
|
|
62
79
|
*
|
|
63
80
|
* @example
|
|
64
81
|
* ```ts
|
|
@@ -67,7 +84,7 @@ export declare class Webhooks extends APIResource {
|
|
|
67
84
|
*/
|
|
68
85
|
resume(id: string, options?: RequestOptions): APIPromise<WebhookResumeResponse>;
|
|
69
86
|
/**
|
|
70
|
-
*
|
|
87
|
+
* Sends a signed test event to the configured endpoint.
|
|
71
88
|
*
|
|
72
89
|
* @example
|
|
73
90
|
* ```ts
|
|
@@ -81,6 +98,9 @@ export declare class Webhooks extends APIResource {
|
|
|
81
98
|
*/
|
|
82
99
|
export interface Delivery {
|
|
83
100
|
id: string;
|
|
101
|
+
/**
|
|
102
|
+
* Whole number from 0.
|
|
103
|
+
*/
|
|
84
104
|
attempts: number;
|
|
85
105
|
createdAt: string;
|
|
86
106
|
status: string;
|
|
@@ -100,8 +120,8 @@ export interface Webhook {
|
|
|
100
120
|
consecutiveFailures: number;
|
|
101
121
|
createdAt: string;
|
|
102
122
|
/**
|
|
103
|
-
* Endpoint delivery state.
|
|
104
|
-
* failures.
|
|
123
|
+
* Endpoint delivery state. paused means the user paused delivery. needs_attention
|
|
124
|
+
* marks repeated failures. Delivery attempts continue.
|
|
105
125
|
*/
|
|
106
126
|
deliveryStatus: 'active' | 'paused' | 'needs_attention';
|
|
107
127
|
/**
|
|
@@ -109,7 +129,7 @@ export interface Webhook {
|
|
|
109
129
|
*/
|
|
110
130
|
eventTypes: Array<Shared.EventType>;
|
|
111
131
|
/**
|
|
112
|
-
*
|
|
132
|
+
* Maximum reported failures before needs_attention. It does not pause delivery.
|
|
113
133
|
*/
|
|
114
134
|
failureHardCap: number;
|
|
115
135
|
isActive: boolean;
|
|
@@ -129,13 +149,27 @@ export interface WebhookCreateResponse {
|
|
|
129
149
|
url: string;
|
|
130
150
|
}
|
|
131
151
|
export interface WebhookListResponse {
|
|
152
|
+
hasMore: boolean;
|
|
132
153
|
webhooks: Array<Webhook>;
|
|
154
|
+
nextCursor?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface WebhookCreateTelegramLinkResponse {
|
|
157
|
+
/**
|
|
158
|
+
* When the link stops working, 15 minutes on.
|
|
159
|
+
*/
|
|
160
|
+
expiresAt: string;
|
|
161
|
+
/**
|
|
162
|
+
* Opens @XquikBot with the link's code.
|
|
163
|
+
*/
|
|
164
|
+
url: string;
|
|
133
165
|
}
|
|
134
166
|
export interface WebhookDeactivateResponse {
|
|
135
167
|
success: true;
|
|
136
168
|
}
|
|
137
169
|
export interface WebhookListDeliveriesResponse {
|
|
138
170
|
deliveries: Array<Delivery>;
|
|
171
|
+
hasMore: boolean;
|
|
172
|
+
nextCursor?: string;
|
|
139
173
|
}
|
|
140
174
|
export interface WebhookResumeResponse {
|
|
141
175
|
statusCode: number;
|
|
@@ -156,7 +190,9 @@ export interface WebhookCreateParams {
|
|
|
156
190
|
*/
|
|
157
191
|
eventTypes: Array<Shared.EventType>;
|
|
158
192
|
/**
|
|
159
|
-
* HTTPS URL
|
|
193
|
+
* HTTPS URL. A Discord channel webhook URL gets each event as a Discord message, &
|
|
194
|
+
* a Slack incoming webhook URL as a Slack message. To deliver to Telegram, use
|
|
195
|
+
* POST /webhooks/telegram instead.
|
|
160
196
|
*/
|
|
161
197
|
url: string;
|
|
162
198
|
}
|
|
@@ -168,7 +204,37 @@ export interface WebhookUpdateParams {
|
|
|
168
204
|
isActive?: boolean;
|
|
169
205
|
url?: string;
|
|
170
206
|
}
|
|
207
|
+
export interface WebhookListParams {
|
|
208
|
+
/**
|
|
209
|
+
* Previous nextCursor. The after alias also works. Offset pagination is not
|
|
210
|
+
* supported.
|
|
211
|
+
*/
|
|
212
|
+
cursor?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Maximum items per page: 1 to 200, default 200. Pass nextCursor as cursor for the
|
|
215
|
+
* next page.
|
|
216
|
+
*/
|
|
217
|
+
limit?: number;
|
|
218
|
+
}
|
|
219
|
+
export interface WebhookCreateTelegramLinkParams {
|
|
220
|
+
/**
|
|
221
|
+
* Array of event types to subscribe to.
|
|
222
|
+
*/
|
|
223
|
+
eventTypes?: Array<Shared.EventType>;
|
|
224
|
+
}
|
|
225
|
+
export interface WebhookListDeliveriesParams {
|
|
226
|
+
/**
|
|
227
|
+
* Previous nextCursor. The after alias also works. Offset pagination is not
|
|
228
|
+
* supported.
|
|
229
|
+
*/
|
|
230
|
+
cursor?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Maximum deliveries per page: 1 to 100, default 100. Pass nextCursor as cursor
|
|
233
|
+
* for the next page.
|
|
234
|
+
*/
|
|
235
|
+
limit?: number;
|
|
236
|
+
}
|
|
171
237
|
export declare namespace Webhooks {
|
|
172
|
-
export { type Delivery as Delivery, type Webhook as Webhook, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeactivateResponse as WebhookDeactivateResponse, type WebhookListDeliveriesResponse as WebhookListDeliveriesResponse, type WebhookResumeResponse as WebhookResumeResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, };
|
|
238
|
+
export { type Delivery as Delivery, type Webhook as Webhook, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookCreateTelegramLinkResponse as WebhookCreateTelegramLinkResponse, type WebhookDeactivateResponse as WebhookDeactivateResponse, type WebhookListDeliveriesResponse as WebhookListDeliveriesResponse, type WebhookResumeResponse as WebhookResumeResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookCreateTelegramLinkParams as WebhookCreateTelegramLinkParams, type WebhookListDeliveriesParams as WebhookListDeliveriesParams, };
|
|
173
239
|
}
|
|
174
240
|
//# sourceMappingURL=webhooks.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.mts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F
|
|
1
|
+
{"version":3,"file":"webhooks.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GG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
package/resources/webhooks.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class Webhooks extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Registers an endpoint for signed event deliveries.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
@@ -19,11 +19,12 @@ export declare class Webhooks extends APIResource {
|
|
|
19
19
|
*/
|
|
20
20
|
create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Updates an endpoint, event selection, or delivery settings.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
26
|
* const webhook = await client.webhooks.update('id', {
|
|
27
|
+
* eventTypes: ['tweet.new'],
|
|
27
28
|
* isActive: true,
|
|
28
29
|
* url: 'https://example.com/webhook',
|
|
29
30
|
* });
|
|
@@ -31,16 +32,32 @@ export declare class Webhooks extends APIResource {
|
|
|
31
32
|
*/
|
|
32
33
|
update(id: string, body: WebhookUpdateParams, options?: RequestOptions): APIPromise<Webhook>;
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Returns configured webhook endpoints and delivery states.
|
|
35
36
|
*
|
|
36
37
|
* @example
|
|
37
38
|
* ```ts
|
|
38
39
|
* const webhooks = await client.webhooks.list();
|
|
39
40
|
* ```
|
|
40
41
|
*/
|
|
41
|
-
list(options?: RequestOptions): APIPromise<WebhookListResponse>;
|
|
42
|
+
list(query?: WebhookListParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListResponse>;
|
|
42
43
|
/**
|
|
43
|
-
*
|
|
44
|
+
* Returns a t.me link to @XquikBot that connects a Telegram chat to the account's
|
|
45
|
+
* monitor events. Opening it & pressing Start connects the chat, which then gets
|
|
46
|
+
* each event as a message. The link works once, within 15 minutes. The chat
|
|
47
|
+
* appears in the webhook list with the URL telegram:<chat ID>, with deliveries,
|
|
48
|
+
* retries & resume as any webhook. In the chat, /stop pauses its alerts. It costs
|
|
49
|
+
* no credits.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const response = await client.webhooks.createTelegramLink({
|
|
54
|
+
* eventTypes: ['tweet.new', 'tweet.reply'],
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
createTelegramLink(body?: WebhookCreateTelegramLinkParams | null | undefined, options?: RequestOptions): APIPromise<WebhookCreateTelegramLinkResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Stops future deliveries to the selected webhook.
|
|
44
61
|
*
|
|
45
62
|
* @example
|
|
46
63
|
* ```ts
|
|
@@ -49,16 +66,16 @@ export declare class Webhooks extends APIResource {
|
|
|
49
66
|
*/
|
|
50
67
|
deactivate(id: string, options?: RequestOptions): APIPromise<WebhookDeactivateResponse>;
|
|
51
68
|
/**
|
|
52
|
-
*
|
|
69
|
+
* Returns delivery attempts and response outcomes, newest first.
|
|
53
70
|
*
|
|
54
71
|
* @example
|
|
55
72
|
* ```ts
|
|
56
73
|
* const response = await client.webhooks.listDeliveries('id');
|
|
57
74
|
* ```
|
|
58
75
|
*/
|
|
59
|
-
listDeliveries(id: string, options?: RequestOptions): APIPromise<WebhookListDeliveriesResponse>;
|
|
76
|
+
listDeliveries(id: string, query?: WebhookListDeliveriesParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListDeliveriesResponse>;
|
|
60
77
|
/**
|
|
61
|
-
*
|
|
78
|
+
* Tests the endpoint before resuming a manually paused webhook.
|
|
62
79
|
*
|
|
63
80
|
* @example
|
|
64
81
|
* ```ts
|
|
@@ -67,7 +84,7 @@ export declare class Webhooks extends APIResource {
|
|
|
67
84
|
*/
|
|
68
85
|
resume(id: string, options?: RequestOptions): APIPromise<WebhookResumeResponse>;
|
|
69
86
|
/**
|
|
70
|
-
*
|
|
87
|
+
* Sends a signed test event to the configured endpoint.
|
|
71
88
|
*
|
|
72
89
|
* @example
|
|
73
90
|
* ```ts
|
|
@@ -81,6 +98,9 @@ export declare class Webhooks extends APIResource {
|
|
|
81
98
|
*/
|
|
82
99
|
export interface Delivery {
|
|
83
100
|
id: string;
|
|
101
|
+
/**
|
|
102
|
+
* Whole number from 0.
|
|
103
|
+
*/
|
|
84
104
|
attempts: number;
|
|
85
105
|
createdAt: string;
|
|
86
106
|
status: string;
|
|
@@ -100,8 +120,8 @@ export interface Webhook {
|
|
|
100
120
|
consecutiveFailures: number;
|
|
101
121
|
createdAt: string;
|
|
102
122
|
/**
|
|
103
|
-
* Endpoint delivery state.
|
|
104
|
-
* failures.
|
|
123
|
+
* Endpoint delivery state. paused means the user paused delivery. needs_attention
|
|
124
|
+
* marks repeated failures. Delivery attempts continue.
|
|
105
125
|
*/
|
|
106
126
|
deliveryStatus: 'active' | 'paused' | 'needs_attention';
|
|
107
127
|
/**
|
|
@@ -109,7 +129,7 @@ export interface Webhook {
|
|
|
109
129
|
*/
|
|
110
130
|
eventTypes: Array<Shared.EventType>;
|
|
111
131
|
/**
|
|
112
|
-
*
|
|
132
|
+
* Maximum reported failures before needs_attention. It does not pause delivery.
|
|
113
133
|
*/
|
|
114
134
|
failureHardCap: number;
|
|
115
135
|
isActive: boolean;
|
|
@@ -129,13 +149,27 @@ export interface WebhookCreateResponse {
|
|
|
129
149
|
url: string;
|
|
130
150
|
}
|
|
131
151
|
export interface WebhookListResponse {
|
|
152
|
+
hasMore: boolean;
|
|
132
153
|
webhooks: Array<Webhook>;
|
|
154
|
+
nextCursor?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface WebhookCreateTelegramLinkResponse {
|
|
157
|
+
/**
|
|
158
|
+
* When the link stops working, 15 minutes on.
|
|
159
|
+
*/
|
|
160
|
+
expiresAt: string;
|
|
161
|
+
/**
|
|
162
|
+
* Opens @XquikBot with the link's code.
|
|
163
|
+
*/
|
|
164
|
+
url: string;
|
|
133
165
|
}
|
|
134
166
|
export interface WebhookDeactivateResponse {
|
|
135
167
|
success: true;
|
|
136
168
|
}
|
|
137
169
|
export interface WebhookListDeliveriesResponse {
|
|
138
170
|
deliveries: Array<Delivery>;
|
|
171
|
+
hasMore: boolean;
|
|
172
|
+
nextCursor?: string;
|
|
139
173
|
}
|
|
140
174
|
export interface WebhookResumeResponse {
|
|
141
175
|
statusCode: number;
|
|
@@ -156,7 +190,9 @@ export interface WebhookCreateParams {
|
|
|
156
190
|
*/
|
|
157
191
|
eventTypes: Array<Shared.EventType>;
|
|
158
192
|
/**
|
|
159
|
-
* HTTPS URL
|
|
193
|
+
* HTTPS URL. A Discord channel webhook URL gets each event as a Discord message, &
|
|
194
|
+
* a Slack incoming webhook URL as a Slack message. To deliver to Telegram, use
|
|
195
|
+
* POST /webhooks/telegram instead.
|
|
160
196
|
*/
|
|
161
197
|
url: string;
|
|
162
198
|
}
|
|
@@ -168,7 +204,37 @@ export interface WebhookUpdateParams {
|
|
|
168
204
|
isActive?: boolean;
|
|
169
205
|
url?: string;
|
|
170
206
|
}
|
|
207
|
+
export interface WebhookListParams {
|
|
208
|
+
/**
|
|
209
|
+
* Previous nextCursor. The after alias also works. Offset pagination is not
|
|
210
|
+
* supported.
|
|
211
|
+
*/
|
|
212
|
+
cursor?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Maximum items per page: 1 to 200, default 200. Pass nextCursor as cursor for the
|
|
215
|
+
* next page.
|
|
216
|
+
*/
|
|
217
|
+
limit?: number;
|
|
218
|
+
}
|
|
219
|
+
export interface WebhookCreateTelegramLinkParams {
|
|
220
|
+
/**
|
|
221
|
+
* Array of event types to subscribe to.
|
|
222
|
+
*/
|
|
223
|
+
eventTypes?: Array<Shared.EventType>;
|
|
224
|
+
}
|
|
225
|
+
export interface WebhookListDeliveriesParams {
|
|
226
|
+
/**
|
|
227
|
+
* Previous nextCursor. The after alias also works. Offset pagination is not
|
|
228
|
+
* supported.
|
|
229
|
+
*/
|
|
230
|
+
cursor?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Maximum deliveries per page: 1 to 100, default 100. Pass nextCursor as cursor
|
|
233
|
+
* for the next page.
|
|
234
|
+
*/
|
|
235
|
+
limit?: number;
|
|
236
|
+
}
|
|
171
237
|
export declare namespace Webhooks {
|
|
172
|
-
export { type Delivery as Delivery, type Webhook as Webhook, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeactivateResponse as WebhookDeactivateResponse, type WebhookListDeliveriesResponse as WebhookListDeliveriesResponse, type WebhookResumeResponse as WebhookResumeResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, };
|
|
238
|
+
export { type Delivery as Delivery, type Webhook as Webhook, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookCreateTelegramLinkResponse as WebhookCreateTelegramLinkResponse, type WebhookDeactivateResponse as WebhookDeactivateResponse, type WebhookListDeliveriesResponse as WebhookListDeliveriesResponse, type WebhookResumeResponse as WebhookResumeResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookCreateTelegramLinkParams as WebhookCreateTelegramLinkParams, type WebhookListDeliveriesParams as WebhookListDeliveriesParams, };
|
|
173
239
|
}
|
|
174
240
|
//# sourceMappingURL=webhooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GA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AK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
package/resources/webhooks.js
CHANGED
|
@@ -12,7 +12,7 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
12
12
|
*/
|
|
13
13
|
class Webhooks extends resource_1.APIResource {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Registers an endpoint for signed event deliveries.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```ts
|
|
@@ -26,11 +26,12 @@ class Webhooks extends resource_1.APIResource {
|
|
|
26
26
|
return this._client.post('/webhooks', { body, ...options });
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Updates an endpoint, event selection, or delivery settings.
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
32
|
* ```ts
|
|
33
33
|
* const webhook = await client.webhooks.update('id', {
|
|
34
|
+
* eventTypes: ['tweet.new'],
|
|
34
35
|
* isActive: true,
|
|
35
36
|
* url: 'https://example.com/webhook',
|
|
36
37
|
* });
|
|
@@ -40,18 +41,36 @@ class Webhooks extends resource_1.APIResource {
|
|
|
40
41
|
return this._client.patch((0, path_1.path) `/webhooks/${id}`, { body, ...options });
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
|
-
*
|
|
44
|
+
* Returns configured webhook endpoints and delivery states.
|
|
44
45
|
*
|
|
45
46
|
* @example
|
|
46
47
|
* ```ts
|
|
47
48
|
* const webhooks = await client.webhooks.list();
|
|
48
49
|
* ```
|
|
49
50
|
*/
|
|
50
|
-
list(options) {
|
|
51
|
-
return this._client.get('/webhooks', options);
|
|
51
|
+
list(query = {}, options) {
|
|
52
|
+
return this._client.get('/webhooks', { query, ...options });
|
|
52
53
|
}
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
+
* Returns a t.me link to @XquikBot that connects a Telegram chat to the account's
|
|
56
|
+
* monitor events. Opening it & pressing Start connects the chat, which then gets
|
|
57
|
+
* each event as a message. The link works once, within 15 minutes. The chat
|
|
58
|
+
* appears in the webhook list with the URL telegram:<chat ID>, with deliveries,
|
|
59
|
+
* retries & resume as any webhook. In the chat, /stop pauses its alerts. It costs
|
|
60
|
+
* no credits.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const response = await client.webhooks.createTelegramLink({
|
|
65
|
+
* eventTypes: ['tweet.new', 'tweet.reply'],
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
createTelegramLink(body = {}, options) {
|
|
70
|
+
return this._client.post('/webhooks/telegram', { body, ...options });
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Stops future deliveries to the selected webhook.
|
|
55
74
|
*
|
|
56
75
|
* @example
|
|
57
76
|
* ```ts
|
|
@@ -62,18 +81,18 @@ class Webhooks extends resource_1.APIResource {
|
|
|
62
81
|
return this._client.delete((0, path_1.path) `/webhooks/${id}`, options);
|
|
63
82
|
}
|
|
64
83
|
/**
|
|
65
|
-
*
|
|
84
|
+
* Returns delivery attempts and response outcomes, newest first.
|
|
66
85
|
*
|
|
67
86
|
* @example
|
|
68
87
|
* ```ts
|
|
69
88
|
* const response = await client.webhooks.listDeliveries('id');
|
|
70
89
|
* ```
|
|
71
90
|
*/
|
|
72
|
-
listDeliveries(id, options) {
|
|
73
|
-
return this._client.get((0, path_1.path) `/webhooks/${id}/deliveries`, options);
|
|
91
|
+
listDeliveries(id, query = {}, options) {
|
|
92
|
+
return this._client.get((0, path_1.path) `/webhooks/${id}/deliveries`, { query, ...options });
|
|
74
93
|
}
|
|
75
94
|
/**
|
|
76
|
-
*
|
|
95
|
+
* Tests the endpoint before resuming a manually paused webhook.
|
|
77
96
|
*
|
|
78
97
|
* @example
|
|
79
98
|
* ```ts
|
|
@@ -84,7 +103,7 @@ class Webhooks extends resource_1.APIResource {
|
|
|
84
103
|
return this._client.post((0, path_1.path) `/webhooks/${id}/resume`, options);
|
|
85
104
|
}
|
|
86
105
|
/**
|
|
87
|
-
*
|
|
106
|
+
* Sends a signed test event to the configured endpoint.
|
|
88
107
|
*
|
|
89
108
|
* @example
|
|
90
109
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEtC,sFAAsF;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEtC,sFAAsF;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG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