@glagan/rettiwt-api 7.0.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/.eslintrc.js +166 -0
- package/.gitattributes +3 -0
- package/.github/FUNDING.yml +4 -0
- package/.github/ISSUE_TEMPLATE/bug-report.yml +57 -0
- package/.github/ISSUE_TEMPLATE/feature-request.yml +20 -0
- package/.github/ISSUE_TEMPLATE/question.yml +15 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +32 -0
- package/.github/workflows/ci.yml +32 -0
- package/.github/workflows/publish.yml +23 -0
- package/.nvmrc +1 -0
- package/.prettierignore +3 -0
- package/.prettierrc +13 -0
- package/LICENSE +21 -0
- package/README.md +566 -0
- package/dist/cli.js +43 -0
- package/eslint.config.mjs +17 -0
- package/package.json +50 -0
- package/src/Rettiwt.ts +97 -0
- package/src/cli.ts +48 -0
- package/src/collections/Extractors.ts +155 -0
- package/src/collections/Groups.ts +81 -0
- package/src/collections/Requests.ts +89 -0
- package/src/collections/Tweet.ts +17 -0
- package/src/commands/DirectMessage.ts +62 -0
- package/src/commands/List.ts +90 -0
- package/src/commands/Tweet.ts +437 -0
- package/src/commands/User.ts +367 -0
- package/src/enums/Api.ts +10 -0
- package/src/enums/Authentication.ts +10 -0
- package/src/enums/Data.ts +13 -0
- package/src/enums/Logging.ts +14 -0
- package/src/enums/Media.ts +10 -0
- package/src/enums/Notification.ts +12 -0
- package/src/enums/Resource.ts +69 -0
- package/src/enums/Tweet.ts +8 -0
- package/src/enums/raw/Analytics.ts +32 -0
- package/src/enums/raw/Media.ts +10 -0
- package/src/enums/raw/Notification.ts +11 -0
- package/src/enums/raw/Tweet.ts +20 -0
- package/src/helper/CliUtils.ts +17 -0
- package/src/helper/JsonUtils.ts +70 -0
- package/src/index.ts +128 -0
- package/src/models/RettiwtConfig.ts +101 -0
- package/src/models/args/FetchArgs.ts +169 -0
- package/src/models/args/PostArgs.ts +93 -0
- package/src/models/args/ProfileArgs.ts +68 -0
- package/src/models/auth/AuthCookie.ts +58 -0
- package/src/models/auth/AuthCredential.ts +83 -0
- package/src/models/data/Analytics.ts +97 -0
- package/src/models/data/BookmarkFolder.ts +73 -0
- package/src/models/data/Conversation.ts +344 -0
- package/src/models/data/CursoredData.ts +64 -0
- package/src/models/data/DirectMessage.ts +335 -0
- package/src/models/data/Inbox.ts +124 -0
- package/src/models/data/List.ts +113 -0
- package/src/models/data/Notification.ts +84 -0
- package/src/models/data/Tweet.ts +388 -0
- package/src/models/data/User.ts +187 -0
- package/src/models/errors/TwitterError.ts +65 -0
- package/src/models/params/Variables.ts +62 -0
- package/src/requests/DirectMessage.ts +229 -0
- package/src/requests/List.ts +203 -0
- package/src/requests/Media.ts +67 -0
- package/src/requests/Tweet.ts +607 -0
- package/src/requests/User.ts +1191 -0
- package/src/services/internal/AuthService.ts +115 -0
- package/src/services/internal/ErrorService.ts +41 -0
- package/src/services/internal/LogService.ts +34 -0
- package/src/services/public/DirectMessageService.ts +159 -0
- package/src/services/public/FetcherService.ts +366 -0
- package/src/services/public/ListService.ts +241 -0
- package/src/services/public/TweetService.ts +886 -0
- package/src/services/public/UserService.ts +1154 -0
- package/src/types/ErrorHandler.ts +13 -0
- package/src/types/Fetch.ts +3 -0
- package/src/types/RettiwtConfig.ts +48 -0
- package/src/types/args/FetchArgs.ts +233 -0
- package/src/types/args/PostArgs.ts +142 -0
- package/src/types/args/ProfileArgs.ts +33 -0
- package/src/types/auth/AuthCookie.ts +22 -0
- package/src/types/auth/AuthCredential.ts +28 -0
- package/src/types/auth/TransactionHeader.ts +8 -0
- package/src/types/data/Analytics.ts +58 -0
- package/src/types/data/BookmarkFolder.ts +12 -0
- package/src/types/data/Conversation.ts +44 -0
- package/src/types/data/CursoredData.ts +24 -0
- package/src/types/data/DirectMessage.ts +33 -0
- package/src/types/data/Inbox.ts +23 -0
- package/src/types/data/List.ts +33 -0
- package/src/types/data/Notification.ts +26 -0
- package/src/types/data/Tweet.ts +99 -0
- package/src/types/data/User.ts +54 -0
- package/src/types/errors/TwitterError.ts +37 -0
- package/src/types/params/Variables.ts +41 -0
- package/src/types/raw/base/Analytic.ts +32 -0
- package/src/types/raw/base/BookmarkFolder.ts +12 -0
- package/src/types/raw/base/Cursor.ts +13 -0
- package/src/types/raw/base/Error.ts +38 -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/Message.ts +22 -0
- package/src/types/raw/base/Notification.ts +66 -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 +182 -0
- package/src/types/raw/composite/DataResult.ts +8 -0
- package/src/types/raw/composite/TimelineList.ts +10 -0
- package/src/types/raw/composite/TimelineTweet.ts +14 -0
- package/src/types/raw/composite/TimelineUser.ts +13 -0
- package/src/types/raw/dm/Conversation.ts +59 -0
- package/src/types/raw/dm/InboxInitial.ts +155 -0
- package/src/types/raw/dm/InboxTimeline.ts +301 -0
- package/src/types/raw/dm/UserUpdates.ts +46 -0
- package/src/types/raw/generic/Response.ts +10 -0
- package/src/types/raw/list/AddMember.ts +175 -0
- package/src/types/raw/list/Details.ts +176 -0
- package/src/types/raw/list/Members.ts +154 -0
- package/src/types/raw/list/RemoveMember.ts +174 -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/Bookmark.ts +14 -0
- package/src/types/raw/tweet/Details.ts +210 -0
- package/src/types/raw/tweet/DetailsBulk.ts +338 -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/Unbookmark.ts +14 -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 +23 -0
- package/src/types/raw/user/BookmarkFolderTweets.ts +53 -0
- package/src/types/raw/user/BookmarkFolders.ts +41 -0
- package/src/types/raw/user/Bookmarks.ts +637 -0
- package/src/types/raw/user/Details.ts +185 -0
- package/src/types/raw/user/DetailsBulk.ts +104 -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/Lists.ts +378 -0
- package/src/types/raw/user/Media.ts +1738 -0
- package/src/types/raw/user/Notifications.ts +499 -0
- package/src/types/raw/user/ProfileUpdate.ts +80 -0
- package/src/types/raw/user/Recommended.ts +2319 -0
- package/src/types/raw/user/Scheduled.ts +37 -0
- package/src/types/raw/user/Search.ts +230 -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 +97 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The raw data received when fetching the members of a tweet list.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface IListMembersResponse {
|
|
9
|
+
data: Data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface Data {
|
|
13
|
+
list: List;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface List {
|
|
17
|
+
members_timeline: MembersTimeline;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface MembersTimeline {
|
|
21
|
+
timeline: Timeline;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface Timeline {
|
|
25
|
+
instructions: Instruction[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface Instruction {
|
|
29
|
+
type: string;
|
|
30
|
+
entries: Entry[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface Entry {
|
|
34
|
+
entryId: string;
|
|
35
|
+
sortIndex: string;
|
|
36
|
+
content: Content;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface Content {
|
|
40
|
+
entryType: string;
|
|
41
|
+
__typename: string;
|
|
42
|
+
itemContent?: ItemContent;
|
|
43
|
+
clientEventInfo?: ClientEventInfo;
|
|
44
|
+
value?: string;
|
|
45
|
+
cursorType?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface ItemContent {
|
|
49
|
+
itemType: string;
|
|
50
|
+
__typename: string;
|
|
51
|
+
user_results: UserResults;
|
|
52
|
+
userDisplayType: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface UserResults {
|
|
56
|
+
result: Result;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface Result {
|
|
60
|
+
__typename: string;
|
|
61
|
+
id: string;
|
|
62
|
+
rest_id: string;
|
|
63
|
+
affiliates_highlighted_label: AffiliatesHighlightedLabel;
|
|
64
|
+
has_graduated_access: boolean;
|
|
65
|
+
is_blue_verified: boolean;
|
|
66
|
+
profile_image_shape: string;
|
|
67
|
+
legacy: Legacy;
|
|
68
|
+
tipjar_settings: TipjarSettings;
|
|
69
|
+
verified_phone_status: boolean;
|
|
70
|
+
professional?: Professional;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface AffiliatesHighlightedLabel {}
|
|
74
|
+
|
|
75
|
+
interface Legacy {
|
|
76
|
+
following: boolean;
|
|
77
|
+
can_dm: boolean;
|
|
78
|
+
can_media_tag: boolean;
|
|
79
|
+
created_at: string;
|
|
80
|
+
default_profile: boolean;
|
|
81
|
+
default_profile_image: boolean;
|
|
82
|
+
description: string;
|
|
83
|
+
entities: Entities;
|
|
84
|
+
fast_followers_count: number;
|
|
85
|
+
favourites_count: number;
|
|
86
|
+
followers_count: number;
|
|
87
|
+
friends_count: number;
|
|
88
|
+
has_custom_timelines: boolean;
|
|
89
|
+
is_translator: boolean;
|
|
90
|
+
listed_count: number;
|
|
91
|
+
location: string;
|
|
92
|
+
media_count: number;
|
|
93
|
+
name: string;
|
|
94
|
+
normal_followers_count: number;
|
|
95
|
+
pinned_tweet_ids_str: string[];
|
|
96
|
+
possibly_sensitive: boolean;
|
|
97
|
+
profile_banner_url?: string;
|
|
98
|
+
profile_image_url_https: string;
|
|
99
|
+
profile_interstitial_type: string;
|
|
100
|
+
screen_name: string;
|
|
101
|
+
statuses_count: number;
|
|
102
|
+
translator_type: string;
|
|
103
|
+
verified: boolean;
|
|
104
|
+
want_retweets: boolean;
|
|
105
|
+
withheld_in_countries: any[];
|
|
106
|
+
url?: string;
|
|
107
|
+
verified_type?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface Entities {
|
|
111
|
+
description: Description;
|
|
112
|
+
url?: Url2;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface Description {
|
|
116
|
+
urls: Url[];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
interface Url {
|
|
120
|
+
display_url: string;
|
|
121
|
+
expanded_url: string;
|
|
122
|
+
url: string;
|
|
123
|
+
indices: number[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
interface Url2 {
|
|
127
|
+
urls: Url3[];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
interface Url3 {
|
|
131
|
+
display_url: string;
|
|
132
|
+
expanded_url: string;
|
|
133
|
+
url: string;
|
|
134
|
+
indices: number[];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface TipjarSettings {}
|
|
138
|
+
|
|
139
|
+
interface Professional {
|
|
140
|
+
rest_id: string;
|
|
141
|
+
professional_type: string;
|
|
142
|
+
category: Category[];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
interface Category {
|
|
146
|
+
id: number;
|
|
147
|
+
name: string;
|
|
148
|
+
icon_name: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
interface ClientEventInfo {
|
|
152
|
+
component: string;
|
|
153
|
+
element: string;
|
|
154
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The raw data received after removing a member from a tweet list.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface IListMemberRemoveResponse {
|
|
9
|
+
data: Data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Data {
|
|
13
|
+
list: List;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface List {
|
|
17
|
+
created_at: number;
|
|
18
|
+
default_banner_media: DefaultBannerMedia;
|
|
19
|
+
default_banner_media_results: DefaultBannerMediaResults;
|
|
20
|
+
description: string;
|
|
21
|
+
facepile_urls: any[];
|
|
22
|
+
following: boolean;
|
|
23
|
+
id: string;
|
|
24
|
+
id_str: string;
|
|
25
|
+
is_member: boolean;
|
|
26
|
+
member_count: number;
|
|
27
|
+
mode: string;
|
|
28
|
+
muting: boolean;
|
|
29
|
+
name: string;
|
|
30
|
+
pinning: boolean;
|
|
31
|
+
subscriber_count: number;
|
|
32
|
+
user_results: UserResults;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DefaultBannerMedia {
|
|
36
|
+
media_info: MediaInfo;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface MediaInfo {
|
|
40
|
+
original_img_url: string;
|
|
41
|
+
original_img_width: number;
|
|
42
|
+
original_img_height: number;
|
|
43
|
+
salient_rect: SalientRect;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface SalientRect {
|
|
47
|
+
left: number;
|
|
48
|
+
top: number;
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface DefaultBannerMediaResults {
|
|
54
|
+
result: Result;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface Result {
|
|
58
|
+
id: string;
|
|
59
|
+
media_key: string;
|
|
60
|
+
media_id: string;
|
|
61
|
+
media_info: MediaInfo2;
|
|
62
|
+
__typename: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface MediaInfo2 {
|
|
66
|
+
__typename: string;
|
|
67
|
+
original_img_height: number;
|
|
68
|
+
original_img_width: number;
|
|
69
|
+
original_img_url: string;
|
|
70
|
+
salient_rect: SalientRect2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface SalientRect2 {
|
|
74
|
+
height: number;
|
|
75
|
+
left: number;
|
|
76
|
+
top: number;
|
|
77
|
+
width: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface UserResults {
|
|
81
|
+
result: Result2;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface Result2 {
|
|
85
|
+
__typename: string;
|
|
86
|
+
id: string;
|
|
87
|
+
rest_id: string;
|
|
88
|
+
affiliates_highlighted_label: AffiliatesHighlightedLabel;
|
|
89
|
+
avatar: Avatar;
|
|
90
|
+
core: Core;
|
|
91
|
+
dm_permissions: DmPermissions;
|
|
92
|
+
has_graduated_access: boolean;
|
|
93
|
+
is_blue_verified: boolean;
|
|
94
|
+
legacy: Legacy;
|
|
95
|
+
location: Location;
|
|
96
|
+
media_permissions: MediaPermissions;
|
|
97
|
+
parody_commentary_fan_label: string;
|
|
98
|
+
profile_image_shape: string;
|
|
99
|
+
privacy: Privacy;
|
|
100
|
+
relationship_perspectives: RelationshipPerspectives;
|
|
101
|
+
tipjar_settings: TipjarSettings;
|
|
102
|
+
verification: Verification;
|
|
103
|
+
verified_phone_status: boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface AffiliatesHighlightedLabel {}
|
|
107
|
+
|
|
108
|
+
export interface Avatar {
|
|
109
|
+
image_url: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface Core {
|
|
113
|
+
created_at: string;
|
|
114
|
+
name: string;
|
|
115
|
+
screen_name: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface DmPermissions {
|
|
119
|
+
can_dm: boolean;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface Legacy {
|
|
123
|
+
default_profile: boolean;
|
|
124
|
+
default_profile_image: boolean;
|
|
125
|
+
description: string;
|
|
126
|
+
entities: Entities;
|
|
127
|
+
fast_followers_count: number;
|
|
128
|
+
favourites_count: number;
|
|
129
|
+
followers_count: number;
|
|
130
|
+
friends_count: number;
|
|
131
|
+
has_custom_timelines: boolean;
|
|
132
|
+
is_translator: boolean;
|
|
133
|
+
listed_count: number;
|
|
134
|
+
media_count: number;
|
|
135
|
+
needs_phone_verification: boolean;
|
|
136
|
+
normal_followers_count: number;
|
|
137
|
+
pinned_tweet_ids_str: any[];
|
|
138
|
+
possibly_sensitive: boolean;
|
|
139
|
+
profile_interstitial_type: string;
|
|
140
|
+
statuses_count: number;
|
|
141
|
+
translator_type: string;
|
|
142
|
+
want_retweets: boolean;
|
|
143
|
+
withheld_in_countries: any[];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface Entities {
|
|
147
|
+
description: Description;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface Description {
|
|
151
|
+
urls: any[];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface Location {
|
|
155
|
+
location: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface MediaPermissions {
|
|
159
|
+
can_media_tag: boolean;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface Privacy {
|
|
163
|
+
protected: boolean;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface RelationshipPerspectives {
|
|
167
|
+
following: boolean;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface TipjarSettings {}
|
|
171
|
+
|
|
172
|
+
export interface Verification {
|
|
173
|
+
verified: boolean;
|
|
174
|
+
}
|