x-twitter-scraper 0.7.0 → 0.8.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/CHANGELOG.md +25 -0
- package/README.md +6 -0
- package/package.json +1 -1
- package/resources/shared.d.mts +382 -15
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +382 -15
- package/resources/shared.d.ts.map +1 -1
- package/resources/support/tickets.d.mts +19 -19
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +19 -19
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/trends.d.mts +12 -0
- package/resources/trends.d.mts.map +1 -1
- package/resources/trends.d.ts +12 -0
- package/resources/trends.d.ts.map +1 -1
- package/resources/x/account-connection-challenges.d.mts +1 -1
- package/resources/x/account-connection-challenges.d.mts.map +1 -1
- package/resources/x/account-connection-challenges.d.ts +1 -1
- package/resources/x/account-connection-challenges.d.ts.map +1 -1
- package/resources/x/accounts.d.mts +40 -3
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +40 -3
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/communities/communities.d.mts +2 -12
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +2 -12
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/tweets.d.mts +4 -8
- package/resources/x/communities/tweets.d.mts.map +1 -1
- package/resources/x/communities/tweets.d.ts +4 -8
- package/resources/x/communities/tweets.d.ts.map +1 -1
- package/resources/x/index.d.mts +1 -1
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +1 -1
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/lists.d.mts +2 -4
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +2 -4
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/tweets/index.d.mts +1 -1
- package/resources/x/tweets/index.d.mts.map +1 -1
- package/resources/x/tweets/index.d.ts +1 -1
- package/resources/x/tweets/index.d.ts.map +1 -1
- package/resources/x/tweets/index.js.map +1 -1
- package/resources/x/tweets/index.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +301 -22
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +301 -22
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +5 -8
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +5 -8
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/users.d.mts +10 -20
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +10 -20
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/x.d.mts +14 -3
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +14 -3
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs.map +1 -1
- package/skills/x-twitter-scraper/SKILL.md +8 -4
- package/skills/x-twitter-scraper/metadata.json +1 -1
- package/skills/x-twitter-scraper/references/mcp-setup.md +12 -5
- package/skills/x-twitter-scraper/references/mcp-tools.md +7 -1
- package/skills/x-twitter-scraper/references/types-x-api.md +62 -12
- package/skills/x-twitter-scraper/skill-card.md +2 -2
- package/skills/x-twitter-scraper/skillspector-report.md +4 -1
- package/src/resources/shared.ts +514 -16
- package/src/resources/support/tickets.ts +19 -19
- package/src/resources/trends.ts +15 -0
- package/src/resources/x/account-connection-challenges.ts +1 -1
- package/src/resources/x/accounts.ts +59 -3
- package/src/resources/x/communities/communities.ts +2 -14
- package/src/resources/x/communities/tweets.ts +4 -8
- package/src/resources/x/index.ts +1 -0
- package/src/resources/x/lists.ts +2 -4
- package/src/resources/x/tweets/index.ts +1 -0
- package/src/resources/x/tweets/tweets.ts +393 -22
- package/src/resources/x/users/users.ts +10 -20
- package/src/resources/x/x.ts +17 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -133,28 +133,28 @@ export namespace TicketCreateResponse {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
export interface TicketRetrieveResponse {
|
|
136
|
-
createdAt
|
|
136
|
+
createdAt: string;
|
|
137
137
|
|
|
138
|
-
messages
|
|
138
|
+
messages: Array<TicketRetrieveResponse.Message>;
|
|
139
139
|
|
|
140
|
-
publicId
|
|
140
|
+
publicId: string;
|
|
141
141
|
|
|
142
|
-
status
|
|
142
|
+
status: 'open' | 'in_progress' | 'resolved' | 'closed';
|
|
143
143
|
|
|
144
|
-
subject
|
|
144
|
+
subject: string;
|
|
145
145
|
|
|
146
|
-
updatedAt
|
|
146
|
+
updatedAt: string;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
export namespace TicketRetrieveResponse {
|
|
150
150
|
export interface Message {
|
|
151
|
-
attachments
|
|
151
|
+
attachments: Array<Message.Attachment>;
|
|
152
152
|
|
|
153
|
-
body
|
|
153
|
+
body: string;
|
|
154
154
|
|
|
155
|
-
createdAt
|
|
155
|
+
createdAt: string;
|
|
156
156
|
|
|
157
|
-
sender
|
|
157
|
+
sender: 'user' | 'support' | 'system';
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
export namespace Message {
|
|
@@ -196,28 +196,28 @@ export namespace TicketRetrieveResponse {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
export interface TicketUpdateResponse {
|
|
199
|
-
publicId
|
|
199
|
+
publicId: string;
|
|
200
200
|
|
|
201
|
-
status
|
|
201
|
+
status: 'open' | 'resolved' | 'closed';
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
export interface TicketListResponse {
|
|
205
|
-
tickets
|
|
205
|
+
tickets: Array<TicketListResponse.Ticket>;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
export namespace TicketListResponse {
|
|
209
209
|
export interface Ticket {
|
|
210
|
-
createdAt
|
|
210
|
+
createdAt: string;
|
|
211
211
|
|
|
212
|
-
messageCount
|
|
212
|
+
messageCount: number;
|
|
213
213
|
|
|
214
|
-
publicId
|
|
214
|
+
publicId: string;
|
|
215
215
|
|
|
216
|
-
status
|
|
216
|
+
status: 'open' | 'in_progress' | 'resolved' | 'closed';
|
|
217
217
|
|
|
218
|
-
subject
|
|
218
|
+
subject: string;
|
|
219
219
|
|
|
220
|
-
updatedAt
|
|
220
|
+
updatedAt: string;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
package/src/resources/trends.ts
CHANGED
|
@@ -37,9 +37,24 @@ export namespace TrendListResponse {
|
|
|
37
37
|
|
|
38
38
|
description?: string;
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Promotion identifier from X. Null for organic trends.
|
|
42
|
+
*/
|
|
43
|
+
promotedContent?: string | null;
|
|
44
|
+
|
|
40
45
|
query?: string;
|
|
41
46
|
|
|
42
47
|
rank?: number;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Approximate public post volume when X supplies it.
|
|
51
|
+
*/
|
|
52
|
+
tweetVolume?: number | null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* X search URL for the trend.
|
|
56
|
+
*/
|
|
57
|
+
url?: string;
|
|
43
58
|
}
|
|
44
59
|
}
|
|
45
60
|
|
|
@@ -26,7 +26,7 @@ export class Accounts extends APIResource {
|
|
|
26
26
|
* });
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
create(body: AccountCreateParams, options?: RequestOptions): APIPromise<
|
|
29
|
+
create(body: AccountCreateParams, options?: RequestOptions): APIPromise<AccountCreateResponse> {
|
|
30
30
|
return this._client.post('/x/accounts', { body, ...options });
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -147,7 +147,63 @@ export interface XAccountDetail {
|
|
|
147
147
|
updatedAt?: string;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
152
|
+
*/
|
|
153
|
+
export type AccountCreateResponse =
|
|
154
|
+
| AccountCreateResponse.SanitizedXAccount
|
|
155
|
+
| AccountCreateResponse.XAccountConnectionAttemptPending
|
|
156
|
+
| AccountCreateResponse.XAccountConnectionChallenge;
|
|
157
|
+
|
|
158
|
+
export namespace AccountCreateResponse {
|
|
159
|
+
/**
|
|
160
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
161
|
+
*/
|
|
162
|
+
export interface SanitizedXAccount {
|
|
163
|
+
id: string;
|
|
164
|
+
|
|
165
|
+
createdAt: string;
|
|
166
|
+
|
|
167
|
+
health: 'healthy' | 'locked' | 'needsReauth' | 'recovering' | 'suspended' | 'temporaryIssue';
|
|
168
|
+
|
|
169
|
+
status: 'active';
|
|
170
|
+
|
|
171
|
+
xUserId: string;
|
|
172
|
+
|
|
173
|
+
xUsername: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The connection is still in progress.
|
|
178
|
+
*/
|
|
179
|
+
export interface XAccountConnectionAttemptPending {
|
|
180
|
+
id: string;
|
|
181
|
+
|
|
182
|
+
object: 'x_account_connection_attempt';
|
|
183
|
+
|
|
184
|
+
pollAfterMs: number;
|
|
185
|
+
|
|
186
|
+
status: 'pending';
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Resumable account connection challenge. Submit the email code to finish the same
|
|
191
|
+
* connection attempt.
|
|
192
|
+
*/
|
|
193
|
+
export interface XAccountConnectionChallenge {
|
|
194
|
+
id: string;
|
|
195
|
+
|
|
196
|
+
expiresAt: string;
|
|
197
|
+
|
|
198
|
+
message: string;
|
|
199
|
+
|
|
200
|
+
object: 'x_account_connection_challenge';
|
|
201
|
+
|
|
202
|
+
status: 'requires_email_code';
|
|
203
|
+
|
|
204
|
+
username: string;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
151
207
|
|
|
152
208
|
export interface AccountListResponse {
|
|
153
209
|
accounts: Array<XAccount>;
|
|
@@ -174,7 +230,7 @@ export interface AccountReauthResponse {
|
|
|
174
230
|
|
|
175
231
|
health: 'healthy' | 'locked' | 'needsReauth' | 'recovering' | 'suspended' | 'temporaryIssue';
|
|
176
232
|
|
|
177
|
-
status:
|
|
233
|
+
status: 'active';
|
|
178
234
|
|
|
179
235
|
xUserId: string;
|
|
180
236
|
|
|
@@ -665,11 +665,6 @@ export namespace CommunityRetrieveInfoResponse {
|
|
|
665
665
|
*/
|
|
666
666
|
invites_policy?: string;
|
|
667
667
|
|
|
668
|
-
/**
|
|
669
|
-
* Whether the authenticated viewer is a member
|
|
670
|
-
*/
|
|
671
|
-
is_member?: boolean;
|
|
672
|
-
|
|
673
668
|
/**
|
|
674
669
|
* Whether the community is marked sensitive
|
|
675
670
|
*/
|
|
@@ -700,11 +695,6 @@ export namespace CommunityRetrieveInfoResponse {
|
|
|
700
695
|
*/
|
|
701
696
|
primary_topic?: Community.PrimaryTopic;
|
|
702
697
|
|
|
703
|
-
/**
|
|
704
|
-
* Authenticated viewer's community role
|
|
705
|
-
*/
|
|
706
|
-
role?: string;
|
|
707
|
-
|
|
708
698
|
/**
|
|
709
699
|
* Community rules
|
|
710
700
|
*/
|
|
@@ -824,10 +814,8 @@ export interface CommunityRetrieveSearchParams {
|
|
|
824
814
|
cursor?: string;
|
|
825
815
|
|
|
826
816
|
/**
|
|
827
|
-
* Maximum items
|
|
828
|
-
*
|
|
829
|
-
* the available usage balance covers fewer results. Keep requesting next_cursor while
|
|
830
|
-
* has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
817
|
+
* Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
818
|
+
* results. Continue while has_next_page is true. Deprecated limit and count
|
|
831
819
|
* aliases remain accepted.
|
|
832
820
|
*/
|
|
833
821
|
pageSize?: number;
|
|
@@ -65,10 +65,8 @@ export interface TweetListParams {
|
|
|
65
65
|
cursor?: string;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* Maximum items
|
|
69
|
-
*
|
|
70
|
-
* the available usage balance covers fewer results. Keep requesting next_cursor while
|
|
71
|
-
* has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
68
|
+
* Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
69
|
+
* results. Continue while has_next_page is true. Deprecated limit and count
|
|
72
70
|
* aliases remain accepted.
|
|
73
71
|
*/
|
|
74
72
|
pageSize?: number;
|
|
@@ -86,10 +84,8 @@ export interface TweetListByCommunityParams {
|
|
|
86
84
|
cursor?: string;
|
|
87
85
|
|
|
88
86
|
/**
|
|
89
|
-
* Maximum items
|
|
90
|
-
*
|
|
91
|
-
* the available usage balance covers fewer results. Keep requesting next_cursor while
|
|
92
|
-
* has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
87
|
+
* Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
88
|
+
* results. Continue while has_next_page is true. Deprecated limit and count
|
|
93
89
|
* aliases remain accepted.
|
|
94
90
|
*/
|
|
95
91
|
pageSize?: number;
|
package/src/resources/x/index.ts
CHANGED
package/src/resources/x/lists.ts
CHANGED
|
@@ -107,10 +107,8 @@ export interface ListRetrieveTweetsParams {
|
|
|
107
107
|
includeReplies?: boolean;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* Maximum items
|
|
111
|
-
*
|
|
112
|
-
* the available usage balance covers fewer results. Keep requesting next_cursor while
|
|
113
|
-
* has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
110
|
+
* Maximum page items (1-100, default 20). Source, filters, or credits can reduce
|
|
111
|
+
* results. Continue while has_next_page is true. Deprecated limit and count
|
|
114
112
|
* aliases remain accepted.
|
|
115
113
|
*/
|
|
116
114
|
pageSize?: number;
|