rettiwt-api 6.3.0-alpha.1 → 7.0.1
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/README.md +81 -31
- package/dist/Rettiwt.d.ts +6 -2
- package/dist/Rettiwt.js +7 -3
- package/dist/Rettiwt.js.map +1 -1
- package/dist/cli.js +3 -1
- package/dist/cli.js.map +1 -1
- package/dist/collections/Extractors.d.ts +15 -2
- package/dist/collections/Extractors.js +12 -1
- package/dist/collections/Extractors.js.map +1 -1
- package/dist/collections/Groups.js +8 -0
- package/dist/collections/Groups.js.map +1 -1
- package/dist/collections/Requests.js +8 -0
- package/dist/collections/Requests.js.map +1 -1
- package/dist/commands/Space.d.ts +10 -0
- package/dist/commands/Space.js +38 -0
- package/dist/commands/Space.js.map +1 -0
- package/dist/commands/User.js +139 -0
- package/dist/commands/User.js.map +1 -1
- package/dist/enums/Resource.d.ts +8 -1
- package/dist/enums/Resource.js +8 -0
- package/dist/enums/Resource.js.map +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/models/RettiwtConfig.d.ts +26 -3
- package/dist/models/RettiwtConfig.js +68 -3
- package/dist/models/RettiwtConfig.js.map +1 -1
- package/dist/models/args/FetchArgs.d.ts +3 -0
- package/dist/models/args/FetchArgs.js +6 -0
- package/dist/models/args/FetchArgs.js.map +1 -1
- package/dist/models/args/PostArgs.d.ts +24 -1
- package/dist/models/args/PostArgs.js +52 -1
- package/dist/models/args/PostArgs.js.map +1 -1
- package/dist/models/data/Space.d.ts +70 -0
- package/dist/models/data/Space.js +177 -0
- package/dist/models/data/Space.js.map +1 -0
- package/dist/models/data/User.d.ts +1 -1
- package/dist/models/data/User.js +3 -3
- package/dist/models/data/User.js.map +1 -1
- package/dist/models/data/UserAbout.d.ts +44 -0
- package/dist/models/data/UserAbout.js +129 -0
- package/dist/models/data/UserAbout.js.map +1 -0
- package/dist/requests/Space.d.ts +15 -0
- package/dist/requests/Space.js +74 -0
- package/dist/requests/Space.js.map +1 -0
- package/dist/requests/Tweet.d.ts +4 -0
- package/dist/requests/Tweet.js +57 -0
- package/dist/requests/Tweet.js.map +1 -1
- package/dist/requests/User.d.ts +21 -0
- package/dist/requests/User.js +64 -0
- package/dist/requests/User.js.map +1 -1
- package/dist/services/internal/AuthService.d.ts +25 -0
- package/dist/services/internal/AuthService.js +121 -0
- package/dist/services/internal/AuthService.js.map +1 -1
- package/dist/services/public/DirectMessageService.js +3 -3
- package/dist/services/public/DirectMessageService.js.map +1 -1
- package/dist/services/public/FetcherService.d.ts +4 -3
- package/dist/services/public/FetcherService.js +22 -16
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/services/public/ListService.js +5 -5
- package/dist/services/public/ListService.js.map +1 -1
- package/dist/services/public/SpaceService.d.ts +42 -0
- package/dist/services/public/SpaceService.js +60 -0
- package/dist/services/public/SpaceService.js.map +1 -0
- package/dist/services/public/TweetService.js +26 -23
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +79 -0
- package/dist/services/public/UserService.js +203 -23
- package/dist/services/public/UserService.js.map +1 -1
- package/dist/types/RettiwtConfig.d.ts +33 -3
- package/dist/types/args/FetchArgs.d.ts +35 -1
- package/dist/types/args/PostArgs.d.ts +44 -1
- package/dist/types/data/Space.d.ts +89 -0
- package/dist/types/data/Space.js +3 -0
- package/dist/types/data/Space.js.map +1 -0
- package/dist/types/data/User.d.ts +2 -2
- package/dist/types/data/UserAbout.d.ts +68 -0
- package/dist/types/data/UserAbout.js +3 -0
- package/dist/types/data/UserAbout.js.map +1 -0
- package/dist/types/raw/base/Space.d.ts +43 -22
- package/dist/types/raw/base/User.d.ts +1 -1
- package/dist/types/raw/space/AudioSpaceById.d.ts +50 -0
- package/dist/types/raw/space/AudioSpaceById.js +4 -0
- package/dist/types/raw/space/AudioSpaceById.js.map +1 -0
- package/dist/types/raw/space/Details.d.ts +2 -309
- package/dist/types/raw/tweet/Post.d.ts +16 -1
- package/dist/types/raw/user/About.d.ts +65 -0
- package/dist/types/raw/user/About.js +4 -0
- package/dist/types/raw/user/About.js.map +1 -0
- package/dist/types/raw/user/ChangePassword.d.ts +8 -0
- package/dist/types/raw/user/ChangePassword.js +3 -0
- package/dist/types/raw/user/ChangePassword.js.map +1 -0
- package/dist/types/raw/user/ProfileUpdate.d.ts +1 -0
- package/dist/types/raw/user/Settings.d.ts +21 -0
- package/dist/types/raw/user/Settings.js +4 -0
- package/dist/types/raw/user/Settings.js.map +1 -0
- package/package.json +5 -3
- package/src/Rettiwt.ts +10 -3
- package/src/cli.ts +3 -1
- package/src/collections/Extractors.ts +22 -3
- package/src/collections/Groups.ts +8 -0
- package/src/collections/Requests.ts +11 -0
- package/src/commands/Space.ts +46 -0
- package/src/commands/User.ts +159 -0
- package/src/enums/Resource.ts +9 -0
- package/src/index.ts +11 -1
- package/src/models/RettiwtConfig.ts +81 -6
- package/src/models/args/FetchArgs.ts +6 -0
- package/src/models/args/PostArgs.ts +58 -1
- package/src/models/data/Space.ts +201 -0
- package/src/models/data/User.ts +3 -3
- package/src/models/data/UserAbout.ts +161 -0
- package/src/requests/Space.ts +76 -0
- package/src/requests/Tweet.ts +59 -0
- package/src/requests/User.ts +69 -0
- package/src/services/internal/AuthService.ts +149 -1
- package/src/services/public/DirectMessageService.ts +3 -3
- package/src/services/public/FetcherService.ts +25 -18
- package/src/services/public/ListService.ts +5 -5
- package/src/services/public/SpaceService.ts +65 -0
- package/src/services/public/TweetService.ts +27 -24
- package/src/services/public/UserService.ts +247 -23
- package/src/types/RettiwtConfig.ts +35 -3
- package/src/types/args/FetchArgs.ts +41 -1
- package/src/types/args/PostArgs.ts +50 -1
- package/src/types/data/Space.ts +122 -0
- package/src/types/data/User.ts +2 -2
- package/src/types/data/UserAbout.ts +87 -0
- package/src/types/raw/base/Space.ts +42 -22
- package/src/types/raw/base/User.ts +1 -1
- package/src/types/raw/space/AudioSpaceById.ts +57 -0
- package/src/types/raw/space/Details.ts +3 -352
- package/src/types/raw/tweet/Post.ts +19 -1
- package/src/types/raw/user/About.ts +77 -0
- package/src/types/raw/user/ChangePassword.ts +8 -0
- package/src/types/raw/user/ProfileUpdate.ts +1 -0
- package/src/types/raw/user/Settings.ts +23 -0
- package/tsconfig.json +2 -2
|
@@ -10,7 +10,8 @@ export interface ITweetPostResponse {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
interface Data {
|
|
13
|
-
create_tweet
|
|
13
|
+
create_tweet?: CreateTweet;
|
|
14
|
+
create_note_tweet?: CreateTweet;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
interface CreateTweet {
|
|
@@ -148,3 +149,20 @@ interface UserMention {
|
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
interface UnmentionInfo {}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The raw data received after creating a note tweet (long-form tweet for X Premium accounts).
|
|
155
|
+
*
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
export interface ITweetPostNoteResponse {
|
|
159
|
+
data: NoteTweetData;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface NoteTweetData {
|
|
163
|
+
notetweet_create: NoteTweetCreate;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
interface NoteTweetCreate {
|
|
167
|
+
tweet_results: TweetResults;
|
|
168
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The raw data received when fetching the about profile of the given user.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface IUserAboutResponse {
|
|
9
|
+
data: Data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface Data {
|
|
13
|
+
user_result_by_screen_name: UserResultByScreenName;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface UserResultByScreenName {
|
|
17
|
+
result: IUserAboutResult;
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IUserAboutResult {
|
|
22
|
+
__typename: string;
|
|
23
|
+
id: string;
|
|
24
|
+
rest_id: string;
|
|
25
|
+
avatar?: Avatar;
|
|
26
|
+
core?: Core;
|
|
27
|
+
profile_image_shape?: string;
|
|
28
|
+
verification?: Verification;
|
|
29
|
+
affiliates_highlighted_label?: unknown;
|
|
30
|
+
is_blue_verified?: boolean;
|
|
31
|
+
privacy?: Privacy;
|
|
32
|
+
about_profile?: AboutProfile;
|
|
33
|
+
verification_info?: VerificationInfo;
|
|
34
|
+
identity_profile_labels_highlighted_label?: unknown;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface Avatar {
|
|
38
|
+
image_url: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface Core {
|
|
42
|
+
created_at: string;
|
|
43
|
+
name: string;
|
|
44
|
+
screen_name: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface Verification {
|
|
48
|
+
verified: boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface Privacy {
|
|
52
|
+
protected: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface AboutProfile {
|
|
56
|
+
created_country_accurate?: boolean;
|
|
57
|
+
account_based_in?: string;
|
|
58
|
+
location_accurate?: boolean;
|
|
59
|
+
learn_more_url?: string;
|
|
60
|
+
source?: string;
|
|
61
|
+
username_changes?: UsernameChanges;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface UsernameChanges {
|
|
65
|
+
count?: string;
|
|
66
|
+
last_changed_at_msec?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface VerificationInfo {
|
|
70
|
+
reason?: VerificationReason;
|
|
71
|
+
id?: string;
|
|
72
|
+
is_identity_verified?: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface VerificationReason {
|
|
76
|
+
verified_since_msec?: string;
|
|
77
|
+
}
|
|
@@ -39,6 +39,7 @@ export interface IUserProfileUpdateResponse {
|
|
|
39
39
|
profile_image_url: string;
|
|
40
40
|
profile_image_url_https: string;
|
|
41
41
|
profile_banner_url: string;
|
|
42
|
+
profile_banner_url_https?: string;
|
|
42
43
|
profile_link_color: string;
|
|
43
44
|
profile_sidebar_border_color: string;
|
|
44
45
|
profile_sidebar_fill_color: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The raw data received from the account settings endpoint.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface IUserSettingsResponse {
|
|
9
|
+
screen_name: string;
|
|
10
|
+
protected: boolean;
|
|
11
|
+
language: string;
|
|
12
|
+
geo_enabled: boolean;
|
|
13
|
+
discoverable_by_email: boolean;
|
|
14
|
+
discoverable_by_mobile_phone: boolean;
|
|
15
|
+
use_cookie_personalization: boolean;
|
|
16
|
+
sleep_time: {
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
end_time: any;
|
|
19
|
+
start_time: any;
|
|
20
|
+
};
|
|
21
|
+
display_sensitive_media: boolean;
|
|
22
|
+
allow_media_tagging: string;
|
|
23
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
70
70
|
// "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
71
71
|
/* Type Checking */
|
|
72
|
-
"strict": true /* Enable all strict type-checking options.
|
|
72
|
+
"strict": true /* Enable all strict type-checking options. */,
|
|
73
73
|
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
74
74
|
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
75
75
|
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
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
95
|
"include": ["src/**/*"],
|
|
96
96
|
"exclude": ["node_modules", "**/*.spec.ts", "playground/*"]
|