rettiwt-api 5.0.0-alpha.0 → 5.0.0-alpha.2
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/.eslintrc.js +2 -3
- package/.github/workflows/documentation.yml +1 -1
- package/.github/workflows/publish-alpha.yml +1 -1
- package/.github/workflows/publish.yml +1 -1
- package/.prettierignore +1 -1
- package/.tool-versions +1 -1
- package/README.md +100 -100
- package/dist/Rettiwt.d.ts +10 -3
- package/dist/Rettiwt.js +31 -12
- package/dist/Rettiwt.js.map +1 -1
- package/dist/cli.js +8 -11
- package/dist/cli.js.map +1 -1
- package/dist/collections/Extractors.d.ts +36 -2
- package/dist/collections/Extractors.js +41 -69
- package/dist/collections/Extractors.js.map +1 -1
- package/dist/collections/Groups.js +5 -1
- package/dist/collections/Groups.js.map +1 -1
- package/dist/collections/Requests.d.ts +3 -3
- package/dist/collections/Requests.js +41 -40
- package/dist/collections/Requests.js.map +1 -1
- package/dist/commands/List.js +21 -78
- package/dist/commands/List.js.map +1 -1
- package/dist/commands/Tweet.js +214 -373
- package/dist/commands/Tweet.js.map +1 -1
- package/dist/commands/User.js +138 -305
- package/dist/commands/User.js.map +1 -1
- package/dist/enums/Authentication.d.ts +10 -0
- package/dist/enums/Authentication.js +15 -0
- package/dist/enums/Authentication.js.map +1 -0
- package/dist/enums/Data.d.ts +3 -3
- package/dist/enums/Data.js +3 -3
- package/dist/enums/Media.d.ts +10 -0
- package/dist/enums/Media.js +15 -0
- package/dist/enums/Media.js.map +1 -0
- package/dist/enums/Notification.d.ts +12 -0
- package/dist/enums/Notification.js +17 -0
- package/dist/enums/Notification.js.map +1 -0
- package/dist/enums/Resource.d.ts +4 -0
- package/dist/enums/Resource.js +4 -0
- package/dist/enums/Resource.js.map +1 -1
- package/dist/enums/raw/Analytics.d.ts +28 -0
- package/dist/enums/raw/Analytics.js +34 -0
- package/dist/enums/raw/Analytics.js.map +1 -0
- package/dist/enums/raw/Media.d.ts +10 -0
- package/dist/enums/raw/Media.js +15 -0
- package/dist/enums/raw/Media.js.map +1 -0
- package/dist/enums/raw/Notification.d.ts +11 -0
- package/dist/enums/raw/Notification.js +16 -0
- package/dist/enums/raw/Notification.js.map +1 -0
- package/dist/enums/raw/Tweet.d.ts +9 -0
- package/dist/enums/raw/Tweet.js +14 -0
- package/dist/enums/raw/Tweet.js.map +1 -0
- package/dist/helper/CliUtils.js +1 -2
- package/dist/helper/CliUtils.js.map +1 -1
- package/dist/helper/JsonUtils.js +6 -11
- package/dist/helper/JsonUtils.js.map +1 -1
- package/dist/helper/TidUtils.d.ts +2 -0
- package/dist/helper/TidUtils.js +162 -0
- package/dist/helper/TidUtils.js.map +1 -0
- package/dist/index.d.ts +75 -5
- package/dist/index.js +26 -6
- package/dist/index.js.map +1 -1
- package/dist/models/RettiwtConfig.d.ts +28 -0
- package/dist/models/RettiwtConfig.js +55 -0
- package/dist/models/RettiwtConfig.js.map +1 -0
- package/dist/models/args/FetchArgs.d.ts +16 -102
- package/dist/models/args/FetchArgs.js +105 -407
- package/dist/models/args/FetchArgs.js.map +1 -1
- package/dist/models/args/PostArgs.d.ts +16 -73
- package/dist/models/args/PostArgs.js +43 -236
- package/dist/models/args/PostArgs.js.map +1 -1
- package/dist/models/auth/AuthCookie.d.ts +21 -0
- package/dist/models/auth/AuthCookie.js +55 -0
- package/dist/models/auth/AuthCookie.js.map +1 -0
- package/dist/models/auth/AuthCredential.d.ts +30 -0
- package/dist/models/auth/AuthCredential.js +78 -0
- package/dist/models/auth/AuthCredential.js.map +1 -0
- package/dist/models/data/CursoredData.d.ts +5 -15
- package/dist/models/data/CursoredData.js +25 -32
- package/dist/models/data/CursoredData.js.map +1 -1
- package/dist/models/data/List.d.ts +7 -9
- package/dist/models/data/List.js +24 -4
- package/dist/models/data/List.js.map +1 -1
- package/dist/models/data/Notification.d.ts +10 -24
- package/dist/models/data/Notification.js +38 -36
- package/dist/models/data/Notification.js.map +1 -1
- package/dist/models/data/Tweet.d.ts +34 -31
- package/dist/models/data/Tweet.js +186 -112
- package/dist/models/data/Tweet.js.map +1 -1
- package/dist/models/data/User.d.ts +19 -23
- package/dist/models/data/User.js +92 -32
- package/dist/models/data/User.js.map +1 -1
- package/dist/models/errors/ApiError.js +8 -24
- package/dist/models/errors/ApiError.js.map +1 -1
- package/dist/models/errors/HttpError.js +8 -24
- package/dist/models/errors/HttpError.js.map +1 -1
- package/dist/models/errors/RettiwtError.d.ts +3 -2
- package/dist/models/errors/RettiwtError.js +8 -25
- package/dist/models/errors/RettiwtError.js.map +1 -1
- package/dist/models/errors/TimeoutError.js +5 -22
- package/dist/models/errors/TimeoutError.js.map +1 -1
- package/dist/models/params/Variables.d.ts +41 -0
- package/dist/models/params/Variables.js +61 -0
- package/dist/models/params/Variables.js.map +1 -0
- package/dist/requests/List.d.ts +24 -0
- package/dist/requests/List.js +122 -0
- package/dist/requests/List.js.map +1 -0
- package/dist/requests/Media.d.ts +21 -0
- package/dist/requests/Media.js +70 -0
- package/dist/requests/Media.js.map +1 -0
- package/dist/requests/Tweet.d.ts +75 -0
- package/dist/requests/Tweet.js +480 -0
- package/dist/requests/Tweet.js.map +1 -0
- package/dist/requests/User.d.ts +111 -0
- package/dist/requests/User.js +762 -0
- package/dist/requests/User.js.map +1 -0
- package/dist/services/internal/AuthService.d.ts +60 -0
- package/dist/services/internal/AuthService.js +106 -0
- package/dist/services/internal/AuthService.js.map +1 -0
- package/dist/services/internal/ErrorService.js +38 -40
- package/dist/services/internal/ErrorService.js.map +1 -1
- package/dist/services/internal/LogService.d.ts +0 -6
- package/dist/services/internal/LogService.js +12 -32
- package/dist/services/internal/LogService.js.map +1 -1
- package/dist/services/internal/TidService.d.ts +44 -0
- package/dist/services/internal/TidService.js +162 -0
- package/dist/services/internal/TidService.js.map +1 -0
- package/dist/services/public/FetcherService.d.ts +22 -19
- package/dist/services/public/FetcherService.js +126 -153
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/services/public/ListService.d.ts +2 -2
- package/dist/services/public/ListService.js +31 -100
- package/dist/services/public/ListService.js.map +1 -1
- package/dist/services/public/TweetService.d.ts +63 -10
- package/dist/services/public/TweetService.js +255 -387
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +4 -4
- package/dist/services/public/UserService.js +199 -386
- package/dist/services/public/UserService.js.map +1 -1
- package/dist/types/RettiwtConfig.d.ts +17 -10
- package/dist/types/args/FetchArgs.d.ts +123 -0
- package/dist/types/{ReturnTypes.js → args/FetchArgs.js} +1 -1
- package/dist/types/args/FetchArgs.js.map +1 -0
- package/dist/types/args/PostArgs.d.ts +100 -0
- package/dist/types/args/PostArgs.js +3 -0
- package/dist/types/args/PostArgs.js.map +1 -0
- package/dist/types/auth/AuthCookie.d.ts +15 -0
- package/dist/types/auth/AuthCookie.js +3 -0
- package/dist/types/auth/AuthCookie.js.map +1 -0
- package/dist/types/auth/AuthCredential.d.ts +23 -0
- package/dist/types/auth/AuthCredential.js +3 -0
- package/dist/types/auth/AuthCredential.js.map +1 -0
- package/dist/types/auth/TidDynamicArgs.d.ts +10 -0
- package/dist/types/auth/TidDynamicArgs.js +3 -0
- package/dist/types/auth/TidDynamicArgs.js.map +1 -0
- package/dist/types/auth/TidHeader.d.ts +8 -0
- package/dist/types/auth/TidHeader.js +3 -0
- package/dist/types/auth/TidHeader.js.map +1 -0
- package/dist/types/auth/TidParams.d.ts +27 -0
- package/dist/types/auth/TidParams.js +3 -0
- package/dist/types/auth/TidParams.js.map +1 -0
- package/dist/types/auth/TidProvider.d.ts +18 -0
- package/dist/types/auth/TidProvider.js +3 -0
- package/dist/types/auth/TidProvider.js.map +1 -0
- package/dist/types/data/CursoredData.d.ts +16 -0
- package/dist/types/data/CursoredData.js +3 -0
- package/dist/types/data/CursoredData.js.map +1 -0
- package/dist/types/data/List.d.ts +21 -0
- package/dist/types/data/List.js +3 -0
- package/dist/types/data/List.js.map +1 -0
- package/dist/types/data/Notification.d.ts +20 -0
- package/dist/types/data/Notification.js +3 -0
- package/dist/types/data/Notification.js.map +1 -0
- package/dist/types/data/Tweet.d.ts +71 -0
- package/dist/types/data/Tweet.js +3 -0
- package/dist/types/data/Tweet.js.map +1 -0
- package/dist/types/data/User.d.ts +35 -0
- package/dist/types/data/User.js +3 -0
- package/dist/types/data/User.js.map +1 -0
- package/dist/types/params/Variables.d.ts +27 -0
- package/dist/types/params/Variables.js +3 -0
- package/dist/types/params/Variables.js.map +1 -0
- package/dist/types/raw/base/Analytic.d.ts +21 -0
- package/dist/types/raw/base/Analytic.js +4 -0
- package/dist/types/raw/base/Analytic.js.map +1 -0
- package/dist/types/raw/base/Cursor.d.ts +11 -0
- package/dist/types/raw/base/Cursor.js +4 -0
- package/dist/types/raw/base/Cursor.js.map +1 -0
- package/dist/types/raw/base/LimitedVisibilityTweet.d.ts +32 -0
- package/dist/types/raw/base/LimitedVisibilityTweet.js +4 -0
- package/dist/types/raw/base/LimitedVisibilityTweet.js.map +1 -0
- package/dist/types/raw/base/List.d.ts +43 -0
- package/dist/types/raw/base/List.js +4 -0
- package/dist/types/raw/base/List.js.map +1 -0
- package/dist/types/raw/base/Media.d.ts +43 -0
- package/dist/types/raw/base/Media.js +4 -0
- package/dist/types/raw/base/Media.js.map +1 -0
- package/dist/types/raw/base/Notification.d.ts +53 -0
- package/dist/types/raw/base/Notification.js +4 -0
- package/dist/types/raw/base/Notification.js.map +1 -0
- package/dist/types/raw/base/Space.d.ts +32 -0
- package/dist/types/raw/base/Space.js +4 -0
- package/dist/types/raw/base/Space.js.map +1 -0
- package/dist/types/raw/base/Tweet.d.ts +119 -0
- package/dist/types/raw/base/Tweet.js +4 -0
- package/dist/types/raw/base/Tweet.js.map +1 -0
- package/dist/types/raw/base/User.d.ts +140 -0
- package/dist/types/raw/base/User.js +4 -0
- package/dist/types/raw/base/User.js.map +1 -0
- package/dist/types/raw/composite/DataResult.d.ts +8 -0
- package/dist/types/raw/composite/DataResult.js +3 -0
- package/dist/types/raw/composite/DataResult.js.map +1 -0
- package/dist/types/raw/composite/TimelineTweet.d.ts +11 -0
- package/dist/types/raw/composite/TimelineTweet.js +4 -0
- package/dist/types/raw/composite/TimelineTweet.js.map +1 -0
- package/dist/types/raw/composite/TimelineUser.d.ts +10 -0
- package/dist/types/raw/composite/TimelineUser.js +4 -0
- package/dist/types/raw/composite/TimelineUser.js.map +1 -0
- package/dist/types/raw/generic/Error.d.ts +30 -0
- package/dist/types/raw/generic/Error.js +3 -0
- package/dist/types/raw/generic/Error.js.map +1 -0
- package/dist/types/raw/generic/Response.d.ts +12 -0
- package/dist/types/raw/generic/Response.js +3 -0
- package/dist/types/raw/generic/Response.js.map +1 -0
- package/dist/types/raw/list/Details.d.ts +122 -0
- package/dist/types/raw/list/Details.js +4 -0
- package/dist/types/raw/list/Details.js.map +1 -0
- package/dist/types/raw/list/Members.d.ts +134 -0
- package/dist/types/raw/list/Members.js +4 -0
- package/dist/types/raw/list/Members.js.map +1 -0
- package/dist/types/raw/list/Tweets.d.ts +1968 -0
- package/dist/types/raw/list/Tweets.js +4 -0
- package/dist/types/raw/list/Tweets.js.map +1 -0
- package/dist/types/raw/media/FinalizeUpload.d.ts +18 -0
- package/dist/types/raw/media/FinalizeUpload.js +4 -0
- package/dist/types/raw/media/FinalizeUpload.js.map +1 -0
- package/dist/types/raw/media/InitalizeUpload.d.ts +10 -0
- package/dist/types/raw/media/InitalizeUpload.js +4 -0
- package/dist/types/raw/media/InitalizeUpload.js.map +1 -0
- package/dist/types/raw/media/LiveVideoStream.d.ts +19 -0
- package/dist/types/raw/media/LiveVideoStream.js +4 -0
- package/dist/types/raw/media/LiveVideoStream.js.map +1 -0
- package/dist/types/raw/space/Details.d.ts +315 -0
- package/dist/types/raw/space/Details.js +4 -0
- package/dist/types/raw/space/Details.js.map +1 -0
- package/dist/types/raw/tweet/Details.d.ts +183 -0
- package/dist/types/raw/tweet/Details.js +4 -0
- package/dist/types/raw/tweet/Details.js.map +1 -0
- package/dist/types/raw/tweet/Like.d.ts +12 -0
- package/dist/types/raw/tweet/Like.js +4 -0
- package/dist/types/raw/tweet/Like.js.map +1 -0
- package/dist/types/raw/tweet/Likers.d.ts +170 -0
- package/dist/types/raw/tweet/Likers.js +4 -0
- package/dist/types/raw/tweet/Likers.js.map +1 -0
- package/dist/types/raw/tweet/Post.d.ts +133 -0
- package/dist/types/raw/tweet/Post.js +4 -0
- package/dist/types/raw/tweet/Post.js.map +1 -0
- package/dist/types/raw/tweet/Replies.d.ts +465 -0
- package/dist/types/raw/tweet/Replies.js +4 -0
- package/dist/types/raw/tweet/Replies.js.map +1 -0
- package/dist/types/raw/tweet/Retweet.d.ts +25 -0
- package/dist/types/raw/tweet/Retweet.js +4 -0
- package/dist/types/raw/tweet/Retweet.js.map +1 -0
- package/dist/types/raw/tweet/Retweeters.d.ts +177 -0
- package/dist/types/raw/tweet/Retweeters.js +4 -0
- package/dist/types/raw/tweet/Retweeters.js.map +1 -0
- package/dist/types/raw/tweet/Schedule.d.ts +15 -0
- package/dist/types/raw/tweet/Schedule.js +4 -0
- package/dist/types/raw/tweet/Schedule.js.map +1 -0
- package/dist/types/raw/tweet/Search.d.ts +518 -0
- package/dist/types/raw/tweet/Search.js +4 -0
- package/dist/types/raw/tweet/Search.js.map +1 -0
- package/dist/types/raw/tweet/Unlike.d.ts +12 -0
- package/dist/types/raw/tweet/Unlike.js +4 -0
- package/dist/types/raw/tweet/Unlike.js.map +1 -0
- package/dist/types/raw/tweet/Unpost.d.ts +17 -0
- package/dist/types/raw/tweet/Unpost.js +4 -0
- package/dist/types/raw/tweet/Unpost.js.map +1 -0
- package/dist/types/raw/tweet/Unretweet.d.ts +25 -0
- package/dist/types/raw/tweet/Unretweet.js +4 -0
- package/dist/types/raw/tweet/Unretweet.js.map +1 -0
- package/dist/types/raw/tweet/Unschedule.d.ts +12 -0
- package/dist/types/raw/tweet/Unschedule.js +4 -0
- package/dist/types/raw/tweet/Unschedule.js.map +1 -0
- package/dist/types/raw/user/Affiliates.d.ts +154 -0
- package/dist/types/raw/user/Affiliates.js +4 -0
- package/dist/types/raw/user/Affiliates.js.map +1 -0
- package/dist/types/raw/user/Analytics.d.ts +32 -0
- package/dist/types/raw/user/Analytics.js +4 -0
- package/dist/types/raw/user/Analytics.js.map +1 -0
- package/dist/types/raw/user/Bookmarks.d.ts +550 -0
- package/dist/types/raw/user/Bookmarks.js +4 -0
- package/dist/types/raw/user/Bookmarks.js.map +1 -0
- package/dist/types/raw/user/Details.d.ts +157 -0
- package/dist/types/raw/user/Details.js +4 -0
- package/dist/types/raw/user/Details.js.map +1 -0
- package/dist/types/raw/user/Follow.d.ts +248 -0
- package/dist/types/raw/user/Follow.js +4 -0
- package/dist/types/raw/user/Follow.js.map +1 -0
- package/dist/types/raw/user/Followed.d.ts +1666 -0
- package/dist/types/raw/user/Followed.js +4 -0
- package/dist/types/raw/user/Followed.js.map +1 -0
- package/dist/types/raw/user/Followers.d.ts +182 -0
- package/dist/types/raw/user/Followers.js +4 -0
- package/dist/types/raw/user/Followers.js.map +1 -0
- package/dist/types/raw/user/Following.d.ts +182 -0
- package/dist/types/raw/user/Following.js +4 -0
- package/dist/types/raw/user/Following.js.map +1 -0
- package/dist/types/raw/user/Highlights.d.ts +1106 -0
- package/dist/types/raw/user/Highlights.js +4 -0
- package/dist/types/raw/user/Highlights.js.map +1 -0
- package/dist/types/raw/user/Likes.d.ts +1065 -0
- package/dist/types/raw/user/Likes.js +4 -0
- package/dist/types/raw/user/Likes.js.map +1 -0
- package/dist/types/raw/user/Media.d.ts +1492 -0
- package/dist/types/raw/user/Media.js +4 -0
- package/dist/types/raw/user/Media.js.map +1 -0
- package/dist/types/raw/user/Notifications.d.ts +142 -0
- package/dist/types/raw/user/Notifications.js +4 -0
- package/dist/types/raw/user/Notifications.js.map +1 -0
- package/dist/types/raw/user/Recommended.d.ts +1991 -0
- package/dist/types/raw/user/Recommended.js +4 -0
- package/dist/types/raw/user/Recommended.js.map +1 -0
- package/dist/types/raw/user/Scheduled.d.ts +31 -0
- package/dist/types/raw/user/Scheduled.js +4 -0
- package/dist/types/raw/user/Scheduled.js.map +1 -0
- package/dist/types/raw/user/Subscriptions.d.ts +151 -0
- package/dist/types/raw/user/Subscriptions.js +4 -0
- package/dist/types/raw/user/Subscriptions.js.map +1 -0
- package/dist/types/raw/user/Tweets.d.ts +1065 -0
- package/dist/types/raw/user/Tweets.js +4 -0
- package/dist/types/raw/user/Tweets.js.map +1 -0
- package/dist/types/raw/user/TweetsAndReplies.d.ts +1065 -0
- package/dist/types/raw/user/TweetsAndReplies.js +4 -0
- package/dist/types/raw/user/TweetsAndReplies.js.map +1 -0
- package/dist/types/raw/user/Unfollow.d.ts +248 -0
- package/dist/types/raw/user/Unfollow.js +4 -0
- package/dist/types/raw/user/Unfollow.js.map +1 -0
- package/eslint.config.mjs +17 -0
- package/package.json +22 -19
- package/src/Rettiwt.ts +22 -7
- package/src/cli.ts +0 -2
- package/src/collections/Extractors.ts +40 -34
- package/src/collections/Groups.ts +4 -0
- package/src/collections/Requests.ts +46 -44
- package/src/commands/Tweet.ts +35 -7
- package/src/commands/User.ts +13 -2
- package/src/enums/Authentication.ts +10 -0
- package/src/enums/Data.ts +3 -3
- package/src/enums/Media.ts +10 -0
- package/src/enums/Notification.ts +12 -0
- package/src/enums/Resource.ts +4 -0
- package/src/enums/raw/Analytics.ts +29 -0
- package/src/enums/raw/Media.ts +10 -0
- package/src/enums/raw/Notification.ts +11 -0
- package/src/enums/raw/Tweet.ts +9 -0
- package/src/helper/JsonUtils.ts +1 -1
- package/src/helper/TidUtils.ts +189 -0
- package/src/index.ts +78 -44
- package/src/models/RettiwtConfig.ts +64 -0
- package/src/models/args/FetchArgs.ts +86 -436
- package/src/models/args/PostArgs.ts +24 -249
- package/src/models/auth/AuthCookie.ts +58 -0
- package/src/models/auth/AuthCredential.ts +85 -0
- package/src/models/data/CursoredData.ts +21 -26
- package/src/models/data/List.ts +18 -15
- package/src/models/data/Notification.ts +25 -38
- package/src/models/data/Tweet.ts +143 -104
- package/src/models/data/User.ts +74 -44
- package/src/models/errors/RettiwtError.ts +3 -2
- package/src/models/params/Variables.ts +62 -0
- package/src/requests/List.ts +121 -0
- package/src/requests/Media.ts +67 -0
- package/src/requests/Tweet.ts +496 -0
- package/src/requests/User.ts +783 -0
- package/src/services/{public → internal}/AuthService.ts +28 -60
- package/src/services/internal/LogService.ts +4 -19
- package/src/services/internal/TidService.ts +147 -0
- package/src/services/public/FetcherService.ts +89 -59
- package/src/services/public/ListService.ts +4 -4
- package/src/services/public/TweetService.ts +129 -42
- package/src/services/public/UserService.ts +49 -37
- package/src/types/RettiwtConfig.ts +18 -12
- package/src/types/args/FetchArgs.ts +148 -0
- package/src/types/args/PostArgs.ts +112 -0
- package/src/types/auth/AuthCookie.ts +22 -0
- package/src/types/auth/AuthCredential.ts +28 -0
- package/src/types/auth/TidDynamicArgs.ts +10 -0
- package/src/types/auth/TidHeader.ts +12 -0
- package/src/types/auth/TidParams.ts +36 -0
- package/src/types/auth/TidProvider.ts +19 -0
- package/src/types/data/CursoredData.ts +18 -0
- package/src/types/data/List.ts +27 -0
- package/src/types/data/Notification.ts +26 -0
- package/src/types/data/Tweet.ts +96 -0
- package/src/types/data/User.ts +48 -0
- package/src/types/params/Variables.ts +41 -0
- package/src/types/raw/base/Analytic.ts +26 -0
- package/src/types/raw/base/Cursor.ts +13 -0
- package/src/types/raw/base/LimitedVisibilityTweet.ts +40 -0
- package/src/types/raw/base/List.ts +50 -0
- package/src/types/raw/base/Media.ts +53 -0
- package/src/types/raw/base/Notification.ts +67 -0
- package/src/types/raw/base/Space.ts +35 -0
- package/src/types/raw/base/Tweet.ts +139 -0
- package/src/types/raw/base/User.ts +164 -0
- package/src/types/raw/composite/DataResult.ts +8 -0
- package/src/types/raw/composite/TimelineTweet.ts +14 -0
- package/src/types/raw/composite/TimelineUser.ts +13 -0
- package/src/types/raw/generic/Error.ts +35 -0
- package/src/types/raw/generic/Response.ts +13 -0
- package/src/types/raw/list/Details.ts +137 -0
- package/src/types/raw/list/Members.ts +154 -0
- package/src/types/raw/list/Tweets.ts +2296 -0
- package/src/types/raw/media/FinalizeUpload.ts +20 -0
- package/src/types/raw/media/InitalizeUpload.ts +12 -0
- package/src/types/raw/media/LiveVideoStream.ts +21 -0
- package/src/types/raw/space/Details.ts +359 -0
- package/src/types/raw/tweet/Details.ts +210 -0
- package/src/types/raw/tweet/Like.ts +14 -0
- package/src/types/raw/tweet/Likers.ts +200 -0
- package/src/types/raw/tweet/Post.ts +150 -0
- package/src/types/raw/tweet/Replies.ts +539 -0
- package/src/types/raw/tweet/Retweet.ts +31 -0
- package/src/types/raw/tweet/Retweeters.ts +208 -0
- package/src/types/raw/tweet/Schedule.ts +18 -0
- package/src/types/raw/tweet/Search.ts +597 -0
- package/src/types/raw/tweet/Unlike.ts +14 -0
- package/src/types/raw/tweet/Unpost.ts +20 -0
- package/src/types/raw/tweet/Unretweet.ts +31 -0
- package/src/types/raw/tweet/Unschedule.ts +14 -0
- package/src/types/raw/user/Affiliates.ts +179 -0
- package/src/types/raw/user/Analytics.ts +39 -0
- package/src/types/raw/user/Bookmarks.ts +637 -0
- package/src/types/raw/user/Details.ts +185 -0
- package/src/types/raw/user/Follow.ts +280 -0
- package/src/types/raw/user/Followed.ts +1942 -0
- package/src/types/raw/user/Followers.ts +215 -0
- package/src/types/raw/user/Following.ts +215 -0
- package/src/types/raw/user/Highlights.ts +1287 -0
- package/src/types/raw/user/Likes.ts +1254 -0
- package/src/types/raw/user/Media.ts +1738 -0
- package/src/types/raw/user/Notifications.ts +175 -0
- package/src/types/raw/user/Recommended.ts +2319 -0
- package/src/types/raw/user/Scheduled.ts +37 -0
- package/src/types/raw/user/Subscriptions.ts +176 -0
- package/src/types/raw/user/Tweets.ts +1254 -0
- package/src/types/raw/user/TweetsAndReplies.ts +1254 -0
- package/src/types/raw/user/Unfollow.ts +280 -0
- package/tsconfig.json +7 -5
- package/.eslintignore +0 -3
- package/dist/commands/Auth.d.ts +0 -10
- package/dist/commands/Auth.js +0 -101
- package/dist/commands/Auth.js.map +0 -1
- package/dist/models/errors/DataValidationError.d.ts +0 -30
- package/dist/models/errors/DataValidationError.js +0 -34
- package/dist/models/errors/DataValidationError.js.map +0 -1
- package/dist/services/public/AuthService.d.ts +0 -91
- package/dist/services/public/AuthService.js +0 -205
- package/dist/services/public/AuthService.js.map +0 -1
- package/dist/types/ReturnTypes.d.ts +0 -21
- package/dist/types/ReturnTypes.js.map +0 -1
- package/src/commands/Auth.ts +0 -46
- package/src/models/errors/DataValidationError.ts +0 -44
- package/src/types/ReturnTypes.ts +0 -24
package/dist/models/data/User.js
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.User = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const Logging_1 = require("../../enums/Logging");
|
|
5
|
+
const JsonUtils_1 = require("../../helper/JsonUtils");
|
|
6
|
+
const LogService_1 = require("../../services/internal/LogService");
|
|
7
7
|
/**
|
|
8
8
|
* The details of a single user.
|
|
9
9
|
*
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
class User {
|
|
13
|
+
createdAt;
|
|
14
|
+
description;
|
|
15
|
+
followersCount;
|
|
16
|
+
followingsCount;
|
|
17
|
+
fullName;
|
|
18
|
+
id;
|
|
19
|
+
isVerified;
|
|
20
|
+
likeCount;
|
|
21
|
+
location;
|
|
22
|
+
pinnedTweet;
|
|
23
|
+
profileBanner;
|
|
24
|
+
profileImage;
|
|
25
|
+
statusesCount;
|
|
26
|
+
userName;
|
|
13
27
|
/**
|
|
14
28
|
* @param user - The raw user details.
|
|
15
29
|
*/
|
|
16
|
-
|
|
30
|
+
constructor(user) {
|
|
17
31
|
this.id = user.rest_id;
|
|
18
32
|
this.userName = user.legacy.screen_name;
|
|
19
33
|
this.fullName = user.legacy.name;
|
|
20
|
-
this.createdAt = user.legacy.created_at;
|
|
34
|
+
this.createdAt = new Date(user.legacy.created_at).toISOString();
|
|
21
35
|
this.description = user.legacy.description.length ? user.legacy.description : undefined;
|
|
22
36
|
this.isVerified = user.is_blue_verified;
|
|
23
37
|
this.likeCount = user.legacy.favourites_count;
|
|
@@ -30,53 +44,51 @@ var User = /** @class */ (function () {
|
|
|
30
44
|
this.profileImage = user.legacy.profile_image_url_https;
|
|
31
45
|
}
|
|
32
46
|
/**
|
|
33
|
-
* Extracts and deserializes
|
|
47
|
+
* Extracts and deserializes multiple target users from the given raw response data.
|
|
34
48
|
*
|
|
35
49
|
* @param response - The raw response data.
|
|
50
|
+
* @param ids - The ids of the target users.
|
|
36
51
|
*
|
|
37
|
-
* @returns The deserialized
|
|
38
|
-
*
|
|
39
|
-
* @internal
|
|
52
|
+
* @returns The target deserialized users.
|
|
40
53
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var users = [];
|
|
54
|
+
static multiple(response, ids) {
|
|
55
|
+
let users = [];
|
|
44
56
|
// Extracting the matching data
|
|
45
|
-
|
|
57
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', 'User');
|
|
46
58
|
// Deserializing valid data
|
|
47
|
-
for (
|
|
48
|
-
|
|
49
|
-
if ((_b = (_a = item.user_results) === null || _a === void 0 ? void 0 : _a.result) === null || _b === void 0 ? void 0 : _b.legacy) {
|
|
59
|
+
for (const item of extract) {
|
|
60
|
+
if (item.legacy && item.legacy.created_at) {
|
|
50
61
|
// Logging
|
|
51
|
-
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.
|
|
52
|
-
users.push(new User(item
|
|
62
|
+
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.rest_id });
|
|
63
|
+
users.push(new User(item));
|
|
53
64
|
}
|
|
54
65
|
else {
|
|
55
66
|
// Logging
|
|
56
67
|
LogService_1.LogService.log(Logging_1.ELogActions.WARNING, {
|
|
57
68
|
action: Logging_1.ELogActions.DESERIALIZE,
|
|
58
|
-
message:
|
|
69
|
+
message: `User not found, skipping`,
|
|
59
70
|
});
|
|
60
71
|
}
|
|
61
72
|
}
|
|
73
|
+
// Filtering only required user, if required
|
|
74
|
+
if (ids && ids.length) {
|
|
75
|
+
users = users.filter((user) => ids.includes(user.id));
|
|
76
|
+
}
|
|
62
77
|
return users;
|
|
63
|
-
}
|
|
78
|
+
}
|
|
64
79
|
/**
|
|
65
80
|
* Extracts and deserializes a single target user from the given raw response data.
|
|
66
81
|
*
|
|
67
82
|
* @param response - The raw response data.
|
|
68
83
|
*
|
|
69
84
|
* @returns The target deserialized user.
|
|
70
|
-
*
|
|
71
|
-
* @internal
|
|
72
85
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
86
|
+
static single(response) {
|
|
87
|
+
const users = [];
|
|
75
88
|
// Extracting the matching data
|
|
76
|
-
|
|
89
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', 'User');
|
|
77
90
|
// Deserializing valid data
|
|
78
|
-
for (
|
|
79
|
-
var item = extract_2[_i];
|
|
91
|
+
for (const item of extract) {
|
|
80
92
|
if (item.legacy && item.legacy.created_at) {
|
|
81
93
|
// Logging
|
|
82
94
|
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.rest_id });
|
|
@@ -86,13 +98,61 @@ var User = /** @class */ (function () {
|
|
|
86
98
|
// Logging
|
|
87
99
|
LogService_1.LogService.log(Logging_1.ELogActions.WARNING, {
|
|
88
100
|
action: Logging_1.ELogActions.DESERIALIZE,
|
|
89
|
-
message:
|
|
101
|
+
message: `User not found, skipping`,
|
|
90
102
|
});
|
|
91
103
|
}
|
|
92
104
|
}
|
|
93
105
|
return users.length ? users[0] : undefined;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Extracts and deserializes the timeline of users from the given raw response data.
|
|
109
|
+
*
|
|
110
|
+
* @param response - The raw response data.
|
|
111
|
+
*
|
|
112
|
+
* @returns The deserialized timeline of users.
|
|
113
|
+
*/
|
|
114
|
+
static timeline(response) {
|
|
115
|
+
const users = [];
|
|
116
|
+
// Extracting the matching data
|
|
117
|
+
const extract = (0, JsonUtils_1.findByFilter)(response, '__typename', 'TimelineUser');
|
|
118
|
+
// Deserializing valid data
|
|
119
|
+
for (const item of extract) {
|
|
120
|
+
if (item.user_results?.result?.legacy) {
|
|
121
|
+
// Logging
|
|
122
|
+
LogService_1.LogService.log(Logging_1.ELogActions.DESERIALIZE, { id: item.user_results.result.rest_id });
|
|
123
|
+
users.push(new User(item.user_results.result));
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
// Logging
|
|
127
|
+
LogService_1.LogService.log(Logging_1.ELogActions.WARNING, {
|
|
128
|
+
action: Logging_1.ELogActions.DESERIALIZE,
|
|
129
|
+
message: `User not found, skipping`,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return users;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @returns A serializable JSON representation of `this` object.
|
|
137
|
+
*/
|
|
138
|
+
toJSON() {
|
|
139
|
+
return {
|
|
140
|
+
createdAt: this.createdAt,
|
|
141
|
+
description: this.description,
|
|
142
|
+
followersCount: this.followersCount,
|
|
143
|
+
followingsCount: this.followingsCount,
|
|
144
|
+
fullName: this.fullName,
|
|
145
|
+
id: this.id,
|
|
146
|
+
isVerified: this.isVerified,
|
|
147
|
+
likeCount: this.likeCount,
|
|
148
|
+
location: this.location,
|
|
149
|
+
pinnedTweet: this.pinnedTweet,
|
|
150
|
+
profileBanner: this.profileBanner,
|
|
151
|
+
profileImage: this.profileImage,
|
|
152
|
+
statusesCount: this.statusesCount,
|
|
153
|
+
userName: this.userName,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}
|
|
97
157
|
exports.User = User;
|
|
98
158
|
//# sourceMappingURL=User.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/models/data/User.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/models/data/User.ts"],"names":[],"mappings":";;;AAAA,iDAAkD;AAClD,sDAAsD;AACtD,mEAAgE;AAKhE;;;;GAIG;AACH,MAAa,IAAI;IACT,SAAS,CAAS;IAClB,WAAW,CAAU;IACrB,cAAc,CAAS;IACvB,eAAe,CAAS;IACxB,QAAQ,CAAS;IACjB,EAAE,CAAS;IACX,UAAU,CAAU;IACpB,SAAS,CAAS;IAClB,QAAQ,CAAU;IAClB,WAAW,CAAU;IACrB,aAAa,CAAU;IACvB,YAAY,CAAS;IACrB,aAAa,CAAS;IACtB,QAAQ,CAAS;IAExB;;OAEG;IACH,YAAmB,IAAc;QAChC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QAChE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;QACxF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QAC9C,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;QAClD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QACjD,IAAI,CAAC,aAAa,GAAG,IAAI,CA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 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.ApiError = void 0;
|
|
19
|
-
|
|
4
|
+
const RettiwtError_1 = require("./RettiwtError");
|
|
20
5
|
/**
|
|
21
6
|
* Represents an error that is thrown by Twitter API.
|
|
22
7
|
*
|
|
23
8
|
* @public
|
|
24
9
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
class ApiError extends RettiwtError_1.RettiwtError {
|
|
11
|
+
/** The error code thrown by Twitter API. */
|
|
12
|
+
code;
|
|
27
13
|
/**
|
|
28
14
|
* @param errorCode - The error code thrown by Twitter API.
|
|
29
15
|
* @param message - Any additional error message.
|
|
30
16
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return _this;
|
|
17
|
+
constructor(errorCode, message) {
|
|
18
|
+
super(message);
|
|
19
|
+
this.code = errorCode;
|
|
35
20
|
}
|
|
36
|
-
|
|
37
|
-
}(RettiwtError_1.RettiwtError));
|
|
21
|
+
}
|
|
38
22
|
exports.ApiError = ApiError;
|
|
39
23
|
//# sourceMappingURL=ApiError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiError.js","sourceRoot":"","sources":["../../../src/models/errors/ApiError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiError.js","sourceRoot":"","sources":["../../../src/models/errors/ApiError.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,QAAS,SAAQ,2BAAY;IACzC,4CAA4C;IACrC,IAAI,CAAS;IAEpB;;;OAGG;IACH,YAAmB,SAAiB,EAAE,OAAgB;QACrD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;IACvB,CAAC;CACD;AAbD,4BAaC"}
|
|
@@ -1,39 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.HttpError = void 0;
|
|
19
|
-
|
|
4
|
+
const RettiwtError_1 = require("./RettiwtError");
|
|
20
5
|
/**
|
|
21
6
|
* Represents an HTTP error that occues while making a request to Twitter API.
|
|
22
7
|
*
|
|
23
8
|
* @public
|
|
24
9
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
class HttpError extends RettiwtError_1.RettiwtError {
|
|
11
|
+
/** The HTTP status code. */
|
|
12
|
+
status;
|
|
27
13
|
/**
|
|
28
14
|
* @param httpStatus - The HTTP status code received upon making the request
|
|
29
15
|
* @param message - Any additional error message.
|
|
30
16
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return _this;
|
|
17
|
+
constructor(httpStatus, message) {
|
|
18
|
+
super(message);
|
|
19
|
+
this.status = httpStatus;
|
|
35
20
|
}
|
|
36
|
-
|
|
37
|
-
}(RettiwtError_1.RettiwtError));
|
|
21
|
+
}
|
|
38
22
|
exports.HttpError = HttpError;
|
|
39
23
|
//# sourceMappingURL=HttpError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../../src/models/errors/HttpError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../../src/models/errors/HttpError.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,SAAU,SAAQ,2BAAY;IAC1C,4BAA4B;IACrB,MAAM,CAAS;IAEtB;;;OAGG;IACH,YAAmB,UAAkB,EAAE,OAAgB;QACtD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;IAC1B,CAAC;CACD;AAbD,8BAaC"}
|
|
@@ -1,34 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.RettiwtError = void 0;
|
|
19
4
|
/**
|
|
20
5
|
* Represents an error that arises inside the package.
|
|
21
|
-
*
|
|
22
|
-
* @internal
|
|
23
6
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
7
|
+
class RettiwtError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* @param message - The error message.
|
|
10
|
+
*/
|
|
11
|
+
constructor(message) {
|
|
12
|
+
super(message);
|
|
13
|
+
Object.setPrototypeOf(this, RettiwtError.prototype);
|
|
30
14
|
}
|
|
31
|
-
|
|
32
|
-
}(Error));
|
|
15
|
+
}
|
|
33
16
|
exports.RettiwtError = RettiwtError;
|
|
34
17
|
//# sourceMappingURL=RettiwtError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RettiwtError.js","sourceRoot":"","sources":["../../../src/models/errors/RettiwtError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RettiwtError.js","sourceRoot":"","sources":["../../../src/models/errors/RettiwtError.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IACtC;;OAEG;IACH,YAAmB,OAAgB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;CACD;AATD,oCASC"}
|
|
@@ -1,36 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.TimeoutError = void 0;
|
|
19
|
-
|
|
4
|
+
const RettiwtError_1 = require("./RettiwtError");
|
|
20
5
|
/**
|
|
21
6
|
* Represents a timeout error that occues while making a request to Twitter API.
|
|
22
7
|
*
|
|
23
8
|
* @public
|
|
24
9
|
*/
|
|
25
|
-
|
|
26
|
-
__extends(TimeoutError, _super);
|
|
10
|
+
class TimeoutError extends RettiwtError_1.RettiwtError {
|
|
27
11
|
/**
|
|
28
12
|
* @param message - Error message with the configured timeout.
|
|
29
13
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
constructor(message) {
|
|
15
|
+
super(message);
|
|
32
16
|
}
|
|
33
|
-
|
|
34
|
-
}(RettiwtError_1.RettiwtError));
|
|
17
|
+
}
|
|
35
18
|
exports.TimeoutError = TimeoutError;
|
|
36
19
|
//# sourceMappingURL=TimeoutError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeoutError.js","sourceRoot":"","sources":["../../../src/models/errors/TimeoutError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimeoutError.js","sourceRoot":"","sources":["../../../src/models/errors/TimeoutError.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,YAAa,SAAQ,2BAAY;IAC7C;;OAEG;IACH,YAAmB,OAAgB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChB,CAAC;CACD;AAPD,oCAOC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { IMediaEntityVariable, IMediaVariable, IReplyVariable } from '../../types/params/Variables';
|
|
2
|
+
import { NewTweetMedia } from '../args/PostArgs';
|
|
3
|
+
/**
|
|
4
|
+
* Media to be sent as payload.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class MediaVariable implements IMediaVariable {
|
|
9
|
+
media_entities: MediaEntityVariable[];
|
|
10
|
+
possibly_sensitive: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @param media - The list of NewTweetMedia objects specifying the media items to be sent in the Tweet.
|
|
13
|
+
*/
|
|
14
|
+
constructor(media: NewTweetMedia[]);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Each media item in the media payload.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare class MediaEntityVariable implements IMediaEntityVariable {
|
|
22
|
+
media_id: string;
|
|
23
|
+
tagged_users: string[];
|
|
24
|
+
/**
|
|
25
|
+
* @param media - The NewTweetMedia object specifying the details of the media item to be included in the payload.
|
|
26
|
+
*/
|
|
27
|
+
constructor(media: NewTweetMedia);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Reply specific details to be sent in payload.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare class ReplyVariable implements IReplyVariable {
|
|
35
|
+
exclude_reply_user_ids: string[];
|
|
36
|
+
in_reply_to_tweet_id: string;
|
|
37
|
+
/**
|
|
38
|
+
* @param replyTo - The id of the Tweet to which this Tweet is a reply.
|
|
39
|
+
*/
|
|
40
|
+
constructor(replyTo: string);
|
|
41
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReplyVariable = exports.MediaEntityVariable = exports.MediaVariable = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Media to be sent as payload.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
class MediaVariable {
|
|
10
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
11
|
+
media_entities;
|
|
12
|
+
possibly_sensitive;
|
|
13
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
14
|
+
/**
|
|
15
|
+
* @param media - The list of NewTweetMedia objects specifying the media items to be sent in the Tweet.
|
|
16
|
+
*/
|
|
17
|
+
constructor(media) {
|
|
18
|
+
this.media_entities = media.map((item) => new MediaEntityVariable(item));
|
|
19
|
+
this.possibly_sensitive = false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.MediaVariable = MediaVariable;
|
|
23
|
+
/**
|
|
24
|
+
* Each media item in the media payload.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
class MediaEntityVariable {
|
|
29
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
30
|
+
media_id;
|
|
31
|
+
tagged_users;
|
|
32
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
33
|
+
/**
|
|
34
|
+
* @param media - The NewTweetMedia object specifying the details of the media item to be included in the payload.
|
|
35
|
+
*/
|
|
36
|
+
constructor(media) {
|
|
37
|
+
this.media_id = media.id;
|
|
38
|
+
this.tagged_users = media.tags ?? [];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.MediaEntityVariable = MediaEntityVariable;
|
|
42
|
+
/**
|
|
43
|
+
* Reply specific details to be sent in payload.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
class ReplyVariable {
|
|
48
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
49
|
+
exclude_reply_user_ids;
|
|
50
|
+
in_reply_to_tweet_id;
|
|
51
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
52
|
+
/**
|
|
53
|
+
* @param replyTo - The id of the Tweet to which this Tweet is a reply.
|
|
54
|
+
*/
|
|
55
|
+
constructor(replyTo) {
|
|
56
|
+
this.in_reply_to_tweet_id = replyTo;
|
|
57
|
+
this.exclude_reply_user_ids = [];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ReplyVariable = ReplyVariable;
|
|
61
|
+
//# sourceMappingURL=Variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Variables.js","sourceRoot":"","sources":["../../../src/models/params/Variables.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH,MAAa,aAAa;IACzB,yDAAyD;IAClD,cAAc,CAAwB;IACtC,kBAAkB,CAAU;IACnC,wDAAwD;IAExD;;OAEG;IACH,YAAmB,KAAsB;QACxC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IACjC,CAAC;CACD;AAbD,sCAaC;AAED;;;;GAIG;AACH,MAAa,mBAAmB;IAC/B,yDAAyD;IAClD,QAAQ,CAAS;IACjB,YAAY,CAAW;IAC9B,wDAAwD;IAExD;;OAEG;IACH,YAAmB,KAAoB;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;IACtC,CAAC;CACD;AAbD,kDAaC;AAED;;;;GAIG;AACH,MAAa,aAAa;IACzB,yDAAyD;IAClD,sBAAsB,CAAW;IACjC,oBAAoB,CAAS;IACpC,wDAAwD;IAExD;;OAEG;IACH,YAAmB,OAAe;QACjC,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC;QACpC,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAC;IAClC,CAAC;CACD;AAbD,sCAaC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
/**
|
|
3
|
+
* Collection of requests related to lists.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class ListRequests {
|
|
8
|
+
/**
|
|
9
|
+
* @param id - The id of the list whose details are to be fetched.
|
|
10
|
+
*/
|
|
11
|
+
static details(id: string): AxiosRequestConfig;
|
|
12
|
+
/**
|
|
13
|
+
* @param id - The id of the list whose members are to be fetched.
|
|
14
|
+
* @param count - The number of members to fetch. Must be \<= 100.
|
|
15
|
+
* @param cursor - The cursor to the batch of members to fetch.
|
|
16
|
+
*/
|
|
17
|
+
static members(id: string, count?: number, cursor?: string): AxiosRequestConfig;
|
|
18
|
+
/**
|
|
19
|
+
* @param id - The id of the list whose tweets are to be fetched.
|
|
20
|
+
* @param count - The number of tweets to fetch. Must be \<= 100.
|
|
21
|
+
* @param cursor - The cursor to the batch of tweets to fetch.
|
|
22
|
+
*/
|
|
23
|
+
static tweets(id: string, count?: number, cursor?: string): AxiosRequestConfig;
|
|
24
|
+
}
|