rettiwt-api 6.3.0-alpha.0 → 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.
Files changed (130) hide show
  1. package/README.md +81 -31
  2. package/dist/Rettiwt.d.ts +6 -2
  3. package/dist/Rettiwt.js +7 -3
  4. package/dist/Rettiwt.js.map +1 -1
  5. package/dist/cli.js +3 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/collections/Extractors.d.ts +15 -2
  8. package/dist/collections/Extractors.js +12 -1
  9. package/dist/collections/Extractors.js.map +1 -1
  10. package/dist/collections/Groups.js +8 -0
  11. package/dist/collections/Groups.js.map +1 -1
  12. package/dist/collections/Requests.js +8 -0
  13. package/dist/collections/Requests.js.map +1 -1
  14. package/dist/commands/Space.d.ts +10 -0
  15. package/dist/commands/Space.js +38 -0
  16. package/dist/commands/Space.js.map +1 -0
  17. package/dist/commands/User.js +139 -0
  18. package/dist/commands/User.js.map +1 -1
  19. package/dist/enums/Resource.d.ts +8 -1
  20. package/dist/enums/Resource.js +8 -0
  21. package/dist/enums/Resource.js.map +1 -1
  22. package/dist/index.d.ts +11 -1
  23. package/dist/index.js +6 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/models/RettiwtConfig.d.ts +26 -3
  26. package/dist/models/RettiwtConfig.js +68 -3
  27. package/dist/models/RettiwtConfig.js.map +1 -1
  28. package/dist/models/args/FetchArgs.d.ts +3 -0
  29. package/dist/models/args/FetchArgs.js +6 -0
  30. package/dist/models/args/FetchArgs.js.map +1 -1
  31. package/dist/models/args/PostArgs.d.ts +24 -1
  32. package/dist/models/args/PostArgs.js +52 -1
  33. package/dist/models/args/PostArgs.js.map +1 -1
  34. package/dist/models/data/Space.d.ts +70 -0
  35. package/dist/models/data/Space.js +177 -0
  36. package/dist/models/data/Space.js.map +1 -0
  37. package/dist/models/data/UserAbout.d.ts +44 -0
  38. package/dist/models/data/UserAbout.js +129 -0
  39. package/dist/models/data/UserAbout.js.map +1 -0
  40. package/dist/requests/Space.d.ts +15 -0
  41. package/dist/requests/Space.js +74 -0
  42. package/dist/requests/Space.js.map +1 -0
  43. package/dist/requests/Tweet.d.ts +4 -0
  44. package/dist/requests/Tweet.js +57 -0
  45. package/dist/requests/Tweet.js.map +1 -1
  46. package/dist/requests/User.d.ts +21 -0
  47. package/dist/requests/User.js +64 -0
  48. package/dist/requests/User.js.map +1 -1
  49. package/dist/services/internal/AuthService.d.ts +25 -0
  50. package/dist/services/internal/AuthService.js +121 -0
  51. package/dist/services/internal/AuthService.js.map +1 -1
  52. package/dist/services/public/DirectMessageService.js +3 -3
  53. package/dist/services/public/DirectMessageService.js.map +1 -1
  54. package/dist/services/public/FetcherService.d.ts +4 -3
  55. package/dist/services/public/FetcherService.js +22 -16
  56. package/dist/services/public/FetcherService.js.map +1 -1
  57. package/dist/services/public/ListService.js +5 -5
  58. package/dist/services/public/ListService.js.map +1 -1
  59. package/dist/services/public/SpaceService.d.ts +42 -0
  60. package/dist/services/public/SpaceService.js +60 -0
  61. package/dist/services/public/SpaceService.js.map +1 -0
  62. package/dist/services/public/TweetService.js +26 -23
  63. package/dist/services/public/TweetService.js.map +1 -1
  64. package/dist/services/public/UserService.d.ts +79 -0
  65. package/dist/services/public/UserService.js +203 -23
  66. package/dist/services/public/UserService.js.map +1 -1
  67. package/dist/types/RettiwtConfig.d.ts +33 -3
  68. package/dist/types/args/FetchArgs.d.ts +35 -1
  69. package/dist/types/args/PostArgs.d.ts +44 -1
  70. package/dist/types/data/Space.d.ts +89 -0
  71. package/dist/types/data/Space.js +3 -0
  72. package/dist/types/data/Space.js.map +1 -0
  73. package/dist/types/data/UserAbout.d.ts +68 -0
  74. package/dist/types/data/UserAbout.js +3 -0
  75. package/dist/types/data/UserAbout.js.map +1 -0
  76. package/dist/types/raw/base/Space.d.ts +43 -22
  77. package/dist/types/raw/space/AudioSpaceById.d.ts +50 -0
  78. package/dist/types/raw/space/AudioSpaceById.js +4 -0
  79. package/dist/types/raw/space/AudioSpaceById.js.map +1 -0
  80. package/dist/types/raw/space/Details.d.ts +2 -309
  81. package/dist/types/raw/tweet/Post.d.ts +16 -1
  82. package/dist/types/raw/user/About.d.ts +65 -0
  83. package/dist/types/raw/user/About.js +4 -0
  84. package/dist/types/raw/user/About.js.map +1 -0
  85. package/dist/types/raw/user/ChangePassword.d.ts +8 -0
  86. package/dist/types/raw/user/ChangePassword.js +3 -0
  87. package/dist/types/raw/user/ChangePassword.js.map +1 -0
  88. package/dist/types/raw/user/ProfileUpdate.d.ts +1 -0
  89. package/dist/types/raw/user/Settings.d.ts +21 -0
  90. package/dist/types/raw/user/Settings.js +4 -0
  91. package/dist/types/raw/user/Settings.js.map +1 -0
  92. package/package.json +6 -4
  93. package/src/Rettiwt.ts +10 -3
  94. package/src/cli.ts +3 -1
  95. package/src/collections/Extractors.ts +22 -3
  96. package/src/collections/Groups.ts +8 -0
  97. package/src/collections/Requests.ts +11 -0
  98. package/src/commands/Space.ts +46 -0
  99. package/src/commands/User.ts +159 -0
  100. package/src/enums/Resource.ts +9 -0
  101. package/src/index.ts +11 -1
  102. package/src/models/RettiwtConfig.ts +81 -6
  103. package/src/models/args/FetchArgs.ts +6 -0
  104. package/src/models/args/PostArgs.ts +58 -1
  105. package/src/models/data/Space.ts +201 -0
  106. package/src/models/data/UserAbout.ts +161 -0
  107. package/src/requests/Space.ts +76 -0
  108. package/src/requests/Tweet.ts +59 -0
  109. package/src/requests/User.ts +69 -0
  110. package/src/services/internal/AuthService.ts +149 -1
  111. package/src/services/public/DirectMessageService.ts +3 -3
  112. package/src/services/public/FetcherService.ts +25 -18
  113. package/src/services/public/ListService.ts +5 -5
  114. package/src/services/public/SpaceService.ts +65 -0
  115. package/src/services/public/TweetService.ts +27 -24
  116. package/src/services/public/UserService.ts +247 -23
  117. package/src/types/RettiwtConfig.ts +35 -3
  118. package/src/types/args/FetchArgs.ts +41 -1
  119. package/src/types/args/PostArgs.ts +50 -1
  120. package/src/types/data/Space.ts +122 -0
  121. package/src/types/data/UserAbout.ts +87 -0
  122. package/src/types/raw/base/Space.ts +42 -22
  123. package/src/types/raw/space/AudioSpaceById.ts +57 -0
  124. package/src/types/raw/space/Details.ts +3 -352
  125. package/src/types/raw/tweet/Post.ts +19 -1
  126. package/src/types/raw/user/About.ts +77 -0
  127. package/src/types/raw/user/ChangePassword.ts +8 -0
  128. package/src/types/raw/user/ProfileUpdate.ts +1 -0
  129. package/src/types/raw/user/Settings.ts +23 -0
  130. package/tsconfig.json +2 -2
@@ -0,0 +1,89 @@
1
+ /**
2
+ * The details of a single Space.
3
+ *
4
+ * @public
5
+ */
6
+ export interface ISpace {
7
+ /** The rest id of the space. */
8
+ id: string;
9
+ /** The current state of the space. */
10
+ state?: string;
11
+ /** The title of the space. */
12
+ title?: string;
13
+ /** The media key of the space. */
14
+ mediaKey?: string;
15
+ /** The creation date of the space. */
16
+ createdAt?: string;
17
+ /** The scheduled start time of the space. */
18
+ scheduledStart?: string;
19
+ /** The actual start time of the space. */
20
+ startedAt?: string;
21
+ /** The end time of the space. */
22
+ endedAt?: string;
23
+ /** The time at which the space was last updated. */
24
+ updatedAt?: string;
25
+ /** The id of the user who created the space. */
26
+ creatorId?: string;
27
+ /** The conversation controls value for the space. */
28
+ conversationControls?: number;
29
+ /** Whether joining the space is disallowed. */
30
+ disallowJoin?: boolean;
31
+ /** Whether the space is for employees only. */
32
+ isEmployeeOnly?: boolean;
33
+ /** Whether the space is locked. */
34
+ isLocked?: boolean;
35
+ /** Whether the space is muted. */
36
+ isMuted?: boolean;
37
+ /** Whether clipping is available for the space. */
38
+ isSpaceAvailableForClipping?: boolean;
39
+ /** Whether replay is available for the space. */
40
+ isSpaceAvailableForReplay?: boolean;
41
+ /** Whether incognito is disabled for the space. */
42
+ noIncognito?: boolean;
43
+ /** The total live listeners count for the space. */
44
+ totalLiveListeners?: number;
45
+ /** The total replay watched count for the space. */
46
+ totalReplayWatched?: number;
47
+ /** The total participant count reported in the response. */
48
+ participantCount?: number;
49
+ /** Whether the authenticated user is subscribed to the space. */
50
+ isSubscribed?: boolean;
51
+ /** The participants information for the space. */
52
+ participants?: ISpaceParticipants;
53
+ }
54
+ /**
55
+ * The participants of a Space grouped by roles.
56
+ *
57
+ * @public
58
+ */
59
+ export interface ISpaceParticipants {
60
+ /** The total count of participants. */
61
+ total?: number;
62
+ /** The list of admins in the space. */
63
+ admins: ISpaceParticipant[];
64
+ /** The list of speakers in the space. */
65
+ speakers: ISpaceParticipant[];
66
+ /** The list of listeners in the space. */
67
+ listeners: ISpaceParticipant[];
68
+ }
69
+ /**
70
+ * The details of a single space participant.
71
+ *
72
+ * @public
73
+ */
74
+ export interface ISpaceParticipant {
75
+ /** The rest id of the user. */
76
+ id?: string;
77
+ /** The screen name of the user. */
78
+ screenName?: string;
79
+ /** The display name of the user. */
80
+ displayName?: string;
81
+ /** The avatar URL of the user. */
82
+ avatarUrl?: string;
83
+ /** Whether the user is verified. */
84
+ isVerified?: boolean;
85
+ /** Whether the user is muted by admins. */
86
+ isMutedByAdmin?: boolean;
87
+ /** Whether the user is muted by guests. */
88
+ isMutedByGuest?: boolean;
89
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Space.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Space.js","sourceRoot":"","sources":["../../../src/types/data/Space.ts"],"names":[],"mappings":""}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * The about profile details of a single user.
3
+ *
4
+ * @public
5
+ */
6
+ export interface IUserAbout {
7
+ /** The rest id of the user. */
8
+ id: string;
9
+ /** The username/screenname of the user. */
10
+ userName: string;
11
+ /** The full name of the user. */
12
+ fullName: string;
13
+ /** The creation date of user's account. */
14
+ createdAt: string;
15
+ /** The url of the profile image. */
16
+ profileImage: string;
17
+ /** The shape of the profile image. */
18
+ profileImageShape?: string;
19
+ /** Whether the account is verified or not. */
20
+ isVerified: boolean;
21
+ /** Whether the account is protected. */
22
+ isProtected?: boolean;
23
+ /** About profile details of the user. */
24
+ aboutProfile?: IUserAboutProfile;
25
+ /** Verification metadata of the user. */
26
+ verificationInfo?: IUserAboutVerificationInfo;
27
+ }
28
+ /**
29
+ * About profile information for a user.
30
+ *
31
+ * @public
32
+ */
33
+ export interface IUserAboutProfile {
34
+ /** Whether the created country is accurate. */
35
+ createdCountryAccurate?: boolean;
36
+ /** The country where the account is based. */
37
+ accountBasedIn?: string;
38
+ /** Whether the location is accurate. */
39
+ locationAccurate?: boolean;
40
+ /** The help URL for verified accounts. */
41
+ learnMoreUrl?: string;
42
+ /** The source platform of the account. */
43
+ source?: string;
44
+ /** Username change metadata for the user. */
45
+ usernameChanges?: IUserAboutUsernameChanges;
46
+ }
47
+ /**
48
+ * Username change metadata for a user.
49
+ *
50
+ * @public
51
+ */
52
+ export interface IUserAboutUsernameChanges {
53
+ /** The number of username changes. */
54
+ count?: number;
55
+ /** The last time the username was changed. */
56
+ lastChangedAt?: string;
57
+ }
58
+ /**
59
+ * Verification metadata for a user.
60
+ *
61
+ * @public
62
+ */
63
+ export interface IUserAboutVerificationInfo {
64
+ /** Whether the user's identity is verified. */
65
+ isIdentityVerified?: boolean;
66
+ /** When the account was verified. */
67
+ verifiedSince?: string;
68
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=UserAbout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserAbout.js","sourceRoot":"","sources":["../../../src/types/data/UserAbout.ts"],"names":[],"mappings":""}
@@ -6,27 +6,48 @@ import { ITweet } from './Tweet';
6
6
  *
7
7
  * @public
8
8
  */
9
- export interface ISpace {
9
+ export interface IRawSpace {
10
10
  rest_id: string;
11
- state: string;
12
- title: string;
13
- media_key: string;
14
- created_at: number;
15
- started_at: number;
16
- ended_at: string;
17
- replay_start_time: number;
18
- updated_at: number;
19
- creator_results: IDataResult<IUser>;
20
- conversation_controls: number;
21
- disallow_join: boolean;
22
- is_employee_only: boolean;
23
- is_locked: boolean;
24
- is_muted: boolean;
25
- is_space_available_for_clipping: boolean;
26
- is_space_available_for_replay: boolean;
27
- narrow_cast_space_type: number;
28
- no_incognito: boolean;
29
- total_replay_watched: number;
30
- total_live_listeners: number;
31
- tweet_results: IDataResult<ITweet>;
11
+ state?: string;
12
+ title?: string;
13
+ media_key?: string;
14
+ content_type?: string;
15
+ created_at?: number | string;
16
+ scheduled_start?: number | string;
17
+ started_at?: number | string;
18
+ ended_at?: number | string;
19
+ replay_start_time?: number | string;
20
+ updated_at?: number | string;
21
+ creator_id?: string;
22
+ creator_results?: IDataResult<IUser>;
23
+ conversation_controls?: number;
24
+ disallow_join?: boolean;
25
+ is_employee_only?: boolean;
26
+ is_locked?: boolean;
27
+ is_muted?: boolean;
28
+ is_space_available_for_clipping?: boolean;
29
+ is_space_available_for_replay?: boolean;
30
+ narrow_cast_space_type?: number;
31
+ no_incognito?: boolean;
32
+ pending_admin_twitter_user_ids?: Array<{
33
+ rest_id?: string;
34
+ }>;
35
+ total_replay_watched?: number;
36
+ total_live_listeners?: number;
37
+ participant_count?: number;
38
+ subscriber_count?: number;
39
+ max_guest_sessions?: number;
40
+ max_admin_capacity?: number;
41
+ is_ticketed?: boolean | string;
42
+ lang?: string;
43
+ host_ids?: string[];
44
+ speaker_ids?: string[];
45
+ invited_user_ids?: string[];
46
+ topics?: IRawSpaceTopic[];
47
+ tweet_results?: IDataResult<ITweet>;
48
+ }
49
+ export interface IRawSpaceTopic {
50
+ id: string;
51
+ name: string;
52
+ description?: string;
32
53
  }
@@ -0,0 +1,50 @@
1
+ import { IRawSpace } from '../base/Space';
2
+ /**
3
+ * The raw data received when fetching the details of a given Space.
4
+ *
5
+ * @public
6
+ */
7
+ export interface IAudioSpaceByIdResponse {
8
+ data?: {
9
+ audioSpace?: IAudioSpace;
10
+ };
11
+ errors?: unknown[];
12
+ }
13
+ export interface IAudioSpace {
14
+ metadata?: IRawSpace;
15
+ participants?: IAudioSpaceParticipants;
16
+ sharings?: IAudioSpaceSharings;
17
+ is_subscribed?: boolean;
18
+ }
19
+ export interface IAudioSpaceParticipants {
20
+ total?: number;
21
+ admins?: IAudioSpaceParticipant[];
22
+ speakers?: IAudioSpaceParticipant[];
23
+ listeners?: IAudioSpaceParticipant[];
24
+ }
25
+ export interface IAudioSpaceParticipant {
26
+ periscope_user_id?: string;
27
+ start?: number | string;
28
+ twitter_screen_name?: string;
29
+ display_name?: string;
30
+ avatar_url?: string;
31
+ is_verified?: boolean;
32
+ is_muted_by_admin?: boolean;
33
+ is_muted_by_guest?: boolean;
34
+ user_results?: {
35
+ rest_id?: string;
36
+ result?: {
37
+ __typename?: string;
38
+ rest_id?: string;
39
+ is_blue_verified?: boolean;
40
+ verification?: {
41
+ verified_type?: string;
42
+ verified?: boolean;
43
+ };
44
+ };
45
+ };
46
+ }
47
+ export interface IAudioSpaceSharings {
48
+ items?: unknown[];
49
+ slice_info?: unknown;
50
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=AudioSpaceById.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioSpaceById.js","sourceRoot":"","sources":["../../../../src/types/raw/space/AudioSpaceById.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
@@ -1,315 +1,8 @@
1
+ import { IRawSpace } from '../base/Space';
1
2
  /**
2
3
  * The raw data received when fetching the details of a given space.
3
4
  *
4
5
  * @public
5
6
  */
6
- export interface ISpaceDetailsResponse {
7
- rest_id: string;
8
- state: string;
9
- title: string;
10
- media_key: string;
11
- created_at: number;
12
- started_at: number;
13
- ended_at: string;
14
- replay_start_time: number;
15
- updated_at: number;
16
- creator_results: CreatorResults;
17
- conversation_controls: number;
18
- disallow_join: boolean;
19
- is_employee_only: boolean;
20
- is_locked: boolean;
21
- is_muted: boolean;
22
- is_space_available_for_clipping: boolean;
23
- is_space_available_for_replay: boolean;
24
- narrow_cast_space_type: number;
25
- no_incognito: boolean;
26
- total_replay_watched: number;
27
- total_live_listeners: number;
28
- tweet_results: TweetResults;
7
+ export interface ISpaceDetailsResponse extends IRawSpace {
29
8
  }
30
- interface CreatorResults {
31
- result: Result;
32
- }
33
- interface Result {
34
- __typename: string;
35
- id: string;
36
- rest_id: string;
37
- affiliates_highlighted_label: AffiliatesHighlightedLabel;
38
- has_graduated_access: boolean;
39
- is_blue_verified: boolean;
40
- profile_image_shape: string;
41
- legacy: Legacy;
42
- professional: Professional;
43
- verified_phone_status: boolean;
44
- }
45
- interface AffiliatesHighlightedLabel {
46
- label: Label;
47
- }
48
- interface Label {
49
- url: Url;
50
- badge: Badge;
51
- description: string;
52
- userLabelType: string;
53
- userLabelDisplayType: string;
54
- }
55
- interface Url {
56
- url: string;
57
- urlType: string;
58
- }
59
- interface Badge {
60
- url: string;
61
- }
62
- interface Legacy {
63
- can_dm: boolean;
64
- can_media_tag: boolean;
65
- created_at: string;
66
- default_profile: boolean;
67
- default_profile_image: boolean;
68
- description: string;
69
- entities: Entities;
70
- fast_followers_count: number;
71
- favourites_count: number;
72
- followers_count: number;
73
- friends_count: number;
74
- has_custom_timelines: boolean;
75
- is_translator: boolean;
76
- listed_count: number;
77
- location: string;
78
- media_count: number;
79
- name: string;
80
- normal_followers_count: number;
81
- pinned_tweet_ids_str: string[];
82
- possibly_sensitive: boolean;
83
- profile_banner_url: string;
84
- profile_image_url_https: string;
85
- profile_interstitial_type: string;
86
- screen_name: string;
87
- statuses_count: number;
88
- translator_type: string;
89
- url: string;
90
- verified: boolean;
91
- want_retweets: boolean;
92
- withheld_in_countries: any[];
93
- }
94
- interface Entities {
95
- description: Description;
96
- url: Url2;
97
- }
98
- interface Description {
99
- urls: any[];
100
- }
101
- interface Url2 {
102
- urls: Url3[];
103
- }
104
- interface Url3 {
105
- display_url: string;
106
- expanded_url: string;
107
- url: string;
108
- indices: number[];
109
- }
110
- interface Professional {
111
- rest_id: string;
112
- professional_type: string;
113
- category: Category[];
114
- }
115
- interface Category {
116
- id: number;
117
- name: string;
118
- icon_name: string;
119
- }
120
- interface TweetResults {
121
- result: Result2;
122
- }
123
- interface Result2 {
124
- __typename: string;
125
- rest_id: string;
126
- core: Core;
127
- card: Card;
128
- voiceInfo: VoiceInfo;
129
- unmention_data: UnmentionData;
130
- unified_card: UnifiedCard;
131
- edit_control: EditControl;
132
- is_translatable: boolean;
133
- views: Views;
134
- source: string;
135
- legacy: Legacy4;
136
- }
137
- interface Core {
138
- user_results: UserResults;
139
- }
140
- interface UserResults {
141
- result: Result3;
142
- }
143
- interface Result3 {
144
- __typename: string;
145
- id: string;
146
- rest_id: string;
147
- affiliates_highlighted_label: AffiliatesHighlightedLabel2;
148
- has_graduated_access: boolean;
149
- is_blue_verified: boolean;
150
- profile_image_shape: string;
151
- legacy: Legacy2;
152
- professional: Professional2;
153
- verified_phone_status: boolean;
154
- }
155
- interface AffiliatesHighlightedLabel2 {
156
- label: Label2;
157
- }
158
- interface Label2 {
159
- url: Url4;
160
- badge: Badge2;
161
- description: string;
162
- userLabelType: string;
163
- userLabelDisplayType: string;
164
- }
165
- interface Url4 {
166
- url: string;
167
- urlType: string;
168
- }
169
- interface Badge2 {
170
- url: string;
171
- }
172
- interface Legacy2 {
173
- can_dm: boolean;
174
- can_media_tag: boolean;
175
- created_at: string;
176
- default_profile: boolean;
177
- default_profile_image: boolean;
178
- description: string;
179
- entities: Entities2;
180
- fast_followers_count: number;
181
- favourites_count: number;
182
- followers_count: number;
183
- friends_count: number;
184
- has_custom_timelines: boolean;
185
- is_translator: boolean;
186
- listed_count: number;
187
- location: string;
188
- media_count: number;
189
- name: string;
190
- normal_followers_count: number;
191
- pinned_tweet_ids_str: string[];
192
- possibly_sensitive: boolean;
193
- profile_banner_url: string;
194
- profile_image_url_https: string;
195
- profile_interstitial_type: string;
196
- screen_name: string;
197
- statuses_count: number;
198
- translator_type: string;
199
- url: string;
200
- verified: boolean;
201
- want_retweets: boolean;
202
- withheld_in_countries: any[];
203
- }
204
- interface Entities2 {
205
- description: Description2;
206
- url: Url5;
207
- }
208
- interface Description2 {
209
- urls: any[];
210
- }
211
- interface Url5 {
212
- urls: Url6[];
213
- }
214
- interface Url6 {
215
- display_url: string;
216
- expanded_url: string;
217
- url: string;
218
- indices: number[];
219
- }
220
- interface Professional2 {
221
- rest_id: string;
222
- professional_type: string;
223
- category: Category2[];
224
- }
225
- interface Category2 {
226
- id: number;
227
- name: string;
228
- icon_name: string;
229
- }
230
- interface Card {
231
- rest_id: string;
232
- legacy: Legacy3;
233
- }
234
- interface Legacy3 {
235
- binding_values: BindingValue[];
236
- card_platform: CardPlatform;
237
- name: string;
238
- url: string;
239
- user_refs_results: any[];
240
- }
241
- interface BindingValue {
242
- key: string;
243
- value: Value;
244
- }
245
- interface Value {
246
- string_value: string;
247
- type: string;
248
- scribe_key?: string;
249
- }
250
- interface CardPlatform {
251
- platform: Platform;
252
- }
253
- interface Platform {
254
- audience: Audience;
255
- device: Device;
256
- }
257
- interface Audience {
258
- name: string;
259
- }
260
- interface Device {
261
- name: string;
262
- version: string;
263
- }
264
- interface VoiceInfo {
265
- }
266
- interface UnmentionData {
267
- }
268
- interface UnifiedCard {
269
- card_fetch_state: string;
270
- }
271
- interface EditControl {
272
- edit_tweet_ids: string[];
273
- editable_until_msecs: string;
274
- is_edit_eligible: boolean;
275
- edits_remaining: string;
276
- }
277
- interface Views {
278
- count: string;
279
- state: string;
280
- }
281
- interface Legacy4 {
282
- bookmark_count: number;
283
- bookmarked: boolean;
284
- created_at: string;
285
- conversation_id_str: string;
286
- display_text_range: number[];
287
- entities: Entities3;
288
- favorite_count: number;
289
- favorited: boolean;
290
- full_text: string;
291
- is_quote_status: boolean;
292
- lang: string;
293
- possibly_sensitive: boolean;
294
- possibly_sensitive_editable: boolean;
295
- quote_count: number;
296
- reply_count: number;
297
- retweet_count: number;
298
- retweeted: boolean;
299
- user_id_str: string;
300
- id_str: string;
301
- }
302
- interface Entities3 {
303
- hashtags: any[];
304
- symbols: any[];
305
- timestamps: any[];
306
- urls: Url7[];
307
- user_mentions: any[];
308
- }
309
- interface Url7 {
310
- display_url: string;
311
- expanded_url: string;
312
- url: string;
313
- indices: number[];
314
- }
315
- export {};
@@ -7,7 +7,8 @@ export interface ITweetPostResponse {
7
7
  data: Data;
8
8
  }
9
9
  interface Data {
10
- create_tweet: CreateTweet;
10
+ create_tweet?: CreateTweet;
11
+ create_note_tweet?: CreateTweet;
11
12
  }
12
13
  interface CreateTweet {
13
14
  tweet_results: TweetResults;
@@ -130,4 +131,18 @@ interface UserMention {
130
131
  }
131
132
  interface UnmentionInfo {
132
133
  }
134
+ /**
135
+ * The raw data received after creating a note tweet (long-form tweet for X Premium accounts).
136
+ *
137
+ * @public
138
+ */
139
+ export interface ITweetPostNoteResponse {
140
+ data: NoteTweetData;
141
+ }
142
+ interface NoteTweetData {
143
+ notetweet_create: NoteTweetCreate;
144
+ }
145
+ interface NoteTweetCreate {
146
+ tweet_results: TweetResults;
147
+ }
133
148
  export {};