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
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The raw data received when unfollowing a given user.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface IUserUnfollowResponse {
|
|
9
|
+
id: number;
|
|
10
|
+
id_str: string;
|
|
11
|
+
name: string;
|
|
12
|
+
screen_name: string;
|
|
13
|
+
location: string;
|
|
14
|
+
description: string;
|
|
15
|
+
url: any;
|
|
16
|
+
entities: Entities;
|
|
17
|
+
protected: boolean;
|
|
18
|
+
followers_count: number;
|
|
19
|
+
fast_followers_count: number;
|
|
20
|
+
normal_followers_count: number;
|
|
21
|
+
friends_count: number;
|
|
22
|
+
listed_count: number;
|
|
23
|
+
created_at: string;
|
|
24
|
+
favourites_count: number;
|
|
25
|
+
utc_offset: any;
|
|
26
|
+
time_zone: any;
|
|
27
|
+
geo_enabled: boolean;
|
|
28
|
+
verified: boolean;
|
|
29
|
+
statuses_count: number;
|
|
30
|
+
media_count: number;
|
|
31
|
+
lang: any;
|
|
32
|
+
status: Status;
|
|
33
|
+
contributors_enabled: boolean;
|
|
34
|
+
is_translator: boolean;
|
|
35
|
+
is_translation_enabled: boolean;
|
|
36
|
+
profile_background_color: string;
|
|
37
|
+
profile_background_image_url: string;
|
|
38
|
+
profile_background_image_url_https: string;
|
|
39
|
+
profile_background_tile: boolean;
|
|
40
|
+
profile_image_url: string;
|
|
41
|
+
profile_image_url_https: string;
|
|
42
|
+
profile_banner_url: string;
|
|
43
|
+
profile_link_color: string;
|
|
44
|
+
profile_sidebar_border_color: string;
|
|
45
|
+
profile_sidebar_fill_color: string;
|
|
46
|
+
profile_text_color: string;
|
|
47
|
+
profile_use_background_image: boolean;
|
|
48
|
+
has_extended_profile: boolean;
|
|
49
|
+
default_profile: boolean;
|
|
50
|
+
default_profile_image: boolean;
|
|
51
|
+
pinned_tweet_ids: number[];
|
|
52
|
+
pinned_tweet_ids_str: string[];
|
|
53
|
+
has_custom_timelines: boolean;
|
|
54
|
+
can_media_tag: boolean;
|
|
55
|
+
followed_by: boolean;
|
|
56
|
+
following: boolean;
|
|
57
|
+
follow_request_sent: boolean;
|
|
58
|
+
notifications: boolean;
|
|
59
|
+
muting: boolean;
|
|
60
|
+
advertiser_account_type: string;
|
|
61
|
+
advertiser_account_service_levels: any[];
|
|
62
|
+
business_profile_state: string;
|
|
63
|
+
translator_type: string;
|
|
64
|
+
withheld_in_countries: any[];
|
|
65
|
+
require_some_consent: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface Entities {
|
|
69
|
+
description: Description;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface Description {
|
|
73
|
+
urls: any[];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface Status {
|
|
77
|
+
created_at: string;
|
|
78
|
+
id: number;
|
|
79
|
+
id_str: string;
|
|
80
|
+
text: string;
|
|
81
|
+
truncated: boolean;
|
|
82
|
+
entities: Entities2;
|
|
83
|
+
extended_entities: ExtendedEntities;
|
|
84
|
+
source: string;
|
|
85
|
+
in_reply_to_status_id: any;
|
|
86
|
+
in_reply_to_status_id_str: any;
|
|
87
|
+
in_reply_to_user_id: any;
|
|
88
|
+
in_reply_to_user_id_str: any;
|
|
89
|
+
in_reply_to_screen_name: any;
|
|
90
|
+
geo: any;
|
|
91
|
+
coordinates: any;
|
|
92
|
+
place: any;
|
|
93
|
+
contributors: any;
|
|
94
|
+
is_quote_status: boolean;
|
|
95
|
+
retweet_count: number;
|
|
96
|
+
favorite_count: number;
|
|
97
|
+
favorited: boolean;
|
|
98
|
+
retweeted: boolean;
|
|
99
|
+
possibly_sensitive: boolean;
|
|
100
|
+
possibly_sensitive_editable: boolean;
|
|
101
|
+
lang: string;
|
|
102
|
+
supplemental_language: any;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface Entities2 {
|
|
106
|
+
hashtags: any[];
|
|
107
|
+
symbols: any[];
|
|
108
|
+
user_mentions: any[];
|
|
109
|
+
urls: any[];
|
|
110
|
+
media: Medum[];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
interface Medum {
|
|
114
|
+
id: number;
|
|
115
|
+
id_str: string;
|
|
116
|
+
indices: number[];
|
|
117
|
+
media_url: string;
|
|
118
|
+
media_url_https: string;
|
|
119
|
+
url: string;
|
|
120
|
+
display_url: string;
|
|
121
|
+
expanded_url: string;
|
|
122
|
+
type: string;
|
|
123
|
+
original_info: OriginalInfo;
|
|
124
|
+
sizes: Sizes;
|
|
125
|
+
features: Features;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
interface OriginalInfo {
|
|
129
|
+
width: number;
|
|
130
|
+
height: number;
|
|
131
|
+
focus_rects: FocusRect[];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
interface FocusRect {
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
h: number;
|
|
138
|
+
w: number;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
interface Sizes {
|
|
142
|
+
thumb: Thumb;
|
|
143
|
+
medium: Medium;
|
|
144
|
+
large: Large;
|
|
145
|
+
small: Small;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
interface Thumb {
|
|
149
|
+
w: number;
|
|
150
|
+
h: number;
|
|
151
|
+
resize: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
interface Medium {
|
|
155
|
+
w: number;
|
|
156
|
+
h: number;
|
|
157
|
+
resize: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface Large {
|
|
161
|
+
w: number;
|
|
162
|
+
h: number;
|
|
163
|
+
resize: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
interface Small {
|
|
167
|
+
w: number;
|
|
168
|
+
h: number;
|
|
169
|
+
resize: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
interface Features {
|
|
173
|
+
medium: Medium2;
|
|
174
|
+
orig: Orig;
|
|
175
|
+
large: Large2;
|
|
176
|
+
small: Small2;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
interface Medium2 {
|
|
180
|
+
faces: any[];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
interface Orig {
|
|
184
|
+
faces: any[];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
interface Large2 {
|
|
188
|
+
faces: any[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
interface Small2 {
|
|
192
|
+
faces: any[];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
interface ExtendedEntities {
|
|
196
|
+
media: Medum2[];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface Medum2 {
|
|
200
|
+
id: number;
|
|
201
|
+
id_str: string;
|
|
202
|
+
indices: number[];
|
|
203
|
+
media_url: string;
|
|
204
|
+
media_url_https: string;
|
|
205
|
+
url: string;
|
|
206
|
+
display_url: string;
|
|
207
|
+
expanded_url: string;
|
|
208
|
+
type: string;
|
|
209
|
+
original_info: OriginalInfo2;
|
|
210
|
+
sizes: Sizes2;
|
|
211
|
+
features: Features2;
|
|
212
|
+
media_key: string;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
interface OriginalInfo2 {
|
|
216
|
+
width: number;
|
|
217
|
+
height: number;
|
|
218
|
+
focus_rects: FocusRect2[];
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
interface FocusRect2 {
|
|
222
|
+
x: number;
|
|
223
|
+
y: number;
|
|
224
|
+
h: number;
|
|
225
|
+
w: number;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
interface Sizes2 {
|
|
229
|
+
thumb: Thumb2;
|
|
230
|
+
medium: Medium3;
|
|
231
|
+
large: Large3;
|
|
232
|
+
small: Small3;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
interface Thumb2 {
|
|
236
|
+
w: number;
|
|
237
|
+
h: number;
|
|
238
|
+
resize: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
interface Medium3 {
|
|
242
|
+
w: number;
|
|
243
|
+
h: number;
|
|
244
|
+
resize: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface Large3 {
|
|
248
|
+
w: number;
|
|
249
|
+
h: number;
|
|
250
|
+
resize: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
interface Small3 {
|
|
254
|
+
w: number;
|
|
255
|
+
h: number;
|
|
256
|
+
resize: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
interface Features2 {
|
|
260
|
+
medium: Medium4;
|
|
261
|
+
orig: Orig2;
|
|
262
|
+
large: Large4;
|
|
263
|
+
small: Small4;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
interface Medium4 {
|
|
267
|
+
faces: any[];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
interface Orig2 {
|
|
271
|
+
faces: any[];
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
interface Large4 {
|
|
275
|
+
faces: any[];
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
interface Small4 {
|
|
279
|
+
faces: any[];
|
|
280
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
10
10
|
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
11
11
|
/* Language and Environment */
|
|
12
|
-
|
|
12
|
+
"target": "ES2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
13
13
|
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
14
14
|
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
15
15
|
"experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
23
23
|
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
24
24
|
/* Modules */
|
|
25
|
-
|
|
26
|
-
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
27
|
-
|
|
25
|
+
"module": "NodeNext" /* Specify what module code is generated. */,
|
|
26
|
+
"rootDir": "./src/" /* Specify the root folder within your source files. */,
|
|
27
|
+
"moduleResolution": "nodenext" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
|
28
28
|
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
29
29
|
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
30
30
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
@@ -91,5 +91,7 @@
|
|
|
91
91
|
/* Completeness */
|
|
92
92
|
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
93
93
|
// "skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
94
|
-
}
|
|
94
|
+
},
|
|
95
|
+
"include": ["src/**/*"],
|
|
96
|
+
"exclude": ["node_modules", "**/*.spec.ts"]
|
|
95
97
|
}
|
package/.eslintignore
DELETED
package/dist/commands/Auth.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { Rettiwt } from '../Rettiwt';
|
|
3
|
-
/**
|
|
4
|
-
* Creates a new 'auth' command which uses the given Rettiwt instance.
|
|
5
|
-
*
|
|
6
|
-
* @param rettiwt - The Rettiwt instance to use.
|
|
7
|
-
* @returns The created 'auth' command.
|
|
8
|
-
*/
|
|
9
|
-
declare function createAuthCommand(rettiwt: Rettiwt): Command;
|
|
10
|
-
export default createAuthCommand;
|
package/dist/commands/Auth.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var commander_1 = require("commander");
|
|
40
|
-
var CliUtils_1 = require("../helper/CliUtils");
|
|
41
|
-
/**
|
|
42
|
-
* Creates a new 'auth' command which uses the given Rettiwt instance.
|
|
43
|
-
*
|
|
44
|
-
* @param rettiwt - The Rettiwt instance to use.
|
|
45
|
-
* @returns The created 'auth' command.
|
|
46
|
-
*/
|
|
47
|
-
function createAuthCommand(rettiwt) {
|
|
48
|
-
var _this = this;
|
|
49
|
-
// Creating the 'auth' command
|
|
50
|
-
var auth = (0, commander_1.createCommand)('auth').description('Manage authentication');
|
|
51
|
-
// Login
|
|
52
|
-
auth.command('login')
|
|
53
|
-
.description('Generate a new API key using Twitter account login credentials')
|
|
54
|
-
.argument('<email>', 'The email id of the Twitter account')
|
|
55
|
-
.argument('<username>', 'The username associated with the Twitter account')
|
|
56
|
-
.argument('<password>', 'The password to the Twitter account')
|
|
57
|
-
.action(function (email, username, password) { return __awaiter(_this, void 0, void 0, function () {
|
|
58
|
-
var apiKey, error_1;
|
|
59
|
-
return __generator(this, function (_a) {
|
|
60
|
-
switch (_a.label) {
|
|
61
|
-
case 0:
|
|
62
|
-
_a.trys.push([0, 2, , 3]);
|
|
63
|
-
return [4 /*yield*/, rettiwt.auth.login(email, username, password)];
|
|
64
|
-
case 1:
|
|
65
|
-
apiKey = _a.sent();
|
|
66
|
-
(0, CliUtils_1.output)(apiKey);
|
|
67
|
-
return [3 /*break*/, 3];
|
|
68
|
-
case 2:
|
|
69
|
-
error_1 = _a.sent();
|
|
70
|
-
(0, CliUtils_1.output)(error_1);
|
|
71
|
-
return [3 /*break*/, 3];
|
|
72
|
-
case 3: return [2 /*return*/];
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}); });
|
|
76
|
-
// Guest
|
|
77
|
-
auth.command('guest')
|
|
78
|
-
.description('Generate a new guest key')
|
|
79
|
-
.action(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
80
|
-
var guestKey, error_2;
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
switch (_a.label) {
|
|
83
|
-
case 0:
|
|
84
|
-
_a.trys.push([0, 2, , 3]);
|
|
85
|
-
return [4 /*yield*/, rettiwt.auth.guest()];
|
|
86
|
-
case 1:
|
|
87
|
-
guestKey = _a.sent();
|
|
88
|
-
(0, CliUtils_1.output)(guestKey);
|
|
89
|
-
return [3 /*break*/, 3];
|
|
90
|
-
case 2:
|
|
91
|
-
error_2 = _a.sent();
|
|
92
|
-
(0, CliUtils_1.output)(error_2);
|
|
93
|
-
return [3 /*break*/, 3];
|
|
94
|
-
case 3: return [2 /*return*/];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}); });
|
|
98
|
-
return auth;
|
|
99
|
-
}
|
|
100
|
-
exports.default = createAuthCommand;
|
|
101
|
-
//# sourceMappingURL=Auth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.js","sourceRoot":"","sources":["../../src/commands/Auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAmD;AAEnD,+CAA4C;AAG5C;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,OAAgB;IAA3C,iBAgCC;IA/BA,8BAA8B;IAC9B,IAAM,IAAI,GAAG,IAAA,yBAAa,EAAC,MAAM,CAAC,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;IAExE,QAAQ;IACR,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACnB,WAAW,CAAC,gEAAgE,CAAC;SAC7E,QAAQ,CAAC,SAAS,EAAE,qCAAqC,CAAC;SAC1D,QAAQ,CAAC,YAAY,EAAE,kDAAkD,CAAC;SAC1E,QAAQ,CAAC,YAAY,EAAE,qCAAqC,CAAC;SAC7D,MAAM,CAAC,UAAO,KAAa,EAAE,QAAgB,EAAE,QAAgB;;;;;;oBAEvC,qBAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAA;;oBAApE,MAAM,GAAW,SAAmD;oBAC1E,IAAA,iBAAM,EAAC,MAAM,CAAC,CAAC;;;;oBAEf,IAAA,iBAAM,EAAC,OAAK,CAAC,CAAC;;;;;SAEf,CAAC,CAAC;IAEJ,QAAQ;IACR,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACnB,WAAW,CAAC,0BAA0B,CAAC;SACvC,MAAM,CAAC;;;;;;oBAEmB,qBAAM,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,EAAA;;oBAA7C,QAAQ,GAAW,SAA0B;oBACnD,IAAA,iBAAM,EAAC,QAAQ,CAAC,CAAC;;;;oBAEjB,IAAA,iBAAM,EAAC,OAAK,CAAC,CAAC;;;;;SAEf,CAAC,CAAC;IAEJ,OAAO,IAAI,CAAC;AACb,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ValidationError } from 'class-validator';
|
|
2
|
-
/**
|
|
3
|
-
* Represents and error when any fields of a validation-enabled class fails to validate.
|
|
4
|
-
*
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export declare class DataValidationError {
|
|
8
|
-
/** The detaied error message(s). */
|
|
9
|
-
details: ValidationErrorDetails[];
|
|
10
|
-
/** The user-friendly error message. */
|
|
11
|
-
message: string;
|
|
12
|
-
/** The name of the error. */
|
|
13
|
-
name: string;
|
|
14
|
-
/**
|
|
15
|
-
* @param data - The error details, as a list of type {@link ValidationError}
|
|
16
|
-
*/
|
|
17
|
-
constructor(errorDetails: ValidationError[]);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Represents the validation error details of a single field.
|
|
21
|
-
*
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
export declare class ValidationErrorDetails {
|
|
25
|
-
/** The constraints which failed to be validated for the given field. */
|
|
26
|
-
constraints: string[];
|
|
27
|
-
/** The name of the field which failed validation. */
|
|
28
|
-
field: string;
|
|
29
|
-
constructor(details: ValidationError);
|
|
30
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidationErrorDetails = exports.DataValidationError = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Represents and error when any fields of a validation-enabled class fails to validate.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
var DataValidationError = /** @class */ (function () {
|
|
10
|
-
/**
|
|
11
|
-
* @param data - The error details, as a list of type {@link ValidationError}
|
|
12
|
-
*/
|
|
13
|
-
function DataValidationError(errorDetails) {
|
|
14
|
-
this.name = 'VALIDATION_ERROR';
|
|
15
|
-
this.message = 'One or more validation error(s) occured, check details field.';
|
|
16
|
-
this.details = errorDetails.map(function (error) { return new ValidationErrorDetails(error); });
|
|
17
|
-
}
|
|
18
|
-
return DataValidationError;
|
|
19
|
-
}());
|
|
20
|
-
exports.DataValidationError = DataValidationError;
|
|
21
|
-
/**
|
|
22
|
-
* Represents the validation error details of a single field.
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
var ValidationErrorDetails = /** @class */ (function () {
|
|
27
|
-
function ValidationErrorDetails(details) {
|
|
28
|
-
this.field = details.property;
|
|
29
|
-
this.constraints = Object.values(details.constraints);
|
|
30
|
-
}
|
|
31
|
-
return ValidationErrorDetails;
|
|
32
|
-
}());
|
|
33
|
-
exports.ValidationErrorDetails = ValidationErrorDetails;
|
|
34
|
-
//# sourceMappingURL=DataValidationError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataValidationError.js","sourceRoot":"","sources":["../../../src/models/errors/DataValidationError.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH;IAUC;;OAEG;IACH,6BAAmB,YAA+B;QACjD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,+DAA+D,CAAC;QAC/E,IAAI,CAAC,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,IAAI,sBAAsB,CAAC,KAAK,CAAC,EAAjC,CAAiC,CAAC,CAAC;IAC/E,CAAC;IACF,0BAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,kDAAmB;AAoBhC;;;;GAIG;AACH;IAOC,gCAAmB,OAAwB;QAC1C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,WAAY,CAAC,CAAC;IACxD,CAAC;IACF,6BAAC;AAAD,CAAC,AAXD,IAWC;AAXY,wDAAsB"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { IRettiwtConfig } from '../../types/RettiwtConfig';
|
|
2
|
-
import { FetcherService } from './FetcherService';
|
|
3
|
-
/**
|
|
4
|
-
* The services that handles authentication.
|
|
5
|
-
*
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export declare class AuthService extends FetcherService {
|
|
9
|
-
/**
|
|
10
|
-
* @param config - The config object for configuring the `Rettiwt` instance.
|
|
11
|
-
*
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
constructor(config?: IRettiwtConfig);
|
|
15
|
-
/**
|
|
16
|
-
* Decodes the encoded cookie string.
|
|
17
|
-
*
|
|
18
|
-
* @param encodedCookies - The encoded cookie string to decode.
|
|
19
|
-
* @returns The decoded cookie string.
|
|
20
|
-
*/
|
|
21
|
-
static decodeCookie(encodedCookies: string): string;
|
|
22
|
-
/**
|
|
23
|
-
* Encodes the given cookie string.
|
|
24
|
-
*
|
|
25
|
-
* @param cookieString - The cookie string to encode.
|
|
26
|
-
* @returns The encoded cookie string.
|
|
27
|
-
*/
|
|
28
|
-
static encodeCookie(cookieString: string): string;
|
|
29
|
-
/**
|
|
30
|
-
* Gets the user's id from the given API key.
|
|
31
|
-
*
|
|
32
|
-
* @param apiKey - The API key.
|
|
33
|
-
* @returns The user id associated with the API key.
|
|
34
|
-
*/
|
|
35
|
-
static getUserId(apiKey: string): string;
|
|
36
|
-
/**
|
|
37
|
-
* Login to twitter as guest.
|
|
38
|
-
*
|
|
39
|
-
* @returns A new guest key.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```
|
|
43
|
-
* import { Rettiwt } from 'rettiwt-api';
|
|
44
|
-
*
|
|
45
|
-
* // Creating a new Rettiwt instance
|
|
46
|
-
* const rettiwt = new Rettiwt();
|
|
47
|
-
*
|
|
48
|
-
* // Logging in an getting a new guest key
|
|
49
|
-
* rettiwt.auth.guest()
|
|
50
|
-
* .then(guestKey => {
|
|
51
|
-
* // Use the guest key
|
|
52
|
-
* ...
|
|
53
|
-
* })
|
|
54
|
-
* .catch(err => {
|
|
55
|
-
* console.log(err);
|
|
56
|
-
* });
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
guest(): Promise<string>;
|
|
60
|
-
/**
|
|
61
|
-
* Login to twitter using account credentials.
|
|
62
|
-
*
|
|
63
|
-
* @param email - The email id associated with the Twitter account.
|
|
64
|
-
* @param userName - The username associated with the Twitter account.
|
|
65
|
-
* @param password - The password to the Twitter account.
|
|
66
|
-
*
|
|
67
|
-
* @returns The `API_KEY` for the Twitter account.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```
|
|
71
|
-
* import { Rettiwt } from 'rettiwt-api';
|
|
72
|
-
*
|
|
73
|
-
* // Creating a new Rettiwt instance
|
|
74
|
-
* const rettiwt = new Rettiwt();
|
|
75
|
-
*
|
|
76
|
-
* // Logging in an getting the API_KEY
|
|
77
|
-
* rettiwt.auth.login("email@domain.com", "username", "password")
|
|
78
|
-
* .then(apiKey => {
|
|
79
|
-
* // Use the API_KEY
|
|
80
|
-
* ...
|
|
81
|
-
* })
|
|
82
|
-
* .catch(err => {
|
|
83
|
-
* console.log(err);
|
|
84
|
-
* });
|
|
85
|
-
* ```
|
|
86
|
-
*
|
|
87
|
-
* @remarks
|
|
88
|
-
* Interchanging `email` and `userName` works too.
|
|
89
|
-
*/
|
|
90
|
-
login(email: string, userName: string, password: string): Promise<string>;
|
|
91
|
-
}
|