x-twitter-scraper 0.4.1 → 0.5.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 +12 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/resources/credits.d.mts +1 -1
- package/resources/credits.d.ts +1 -1
- package/resources/extractions.d.mts +4 -4
- package/resources/extractions.d.ts +4 -4
- package/resources/guest-wallets.d.mts +2 -2
- package/resources/guest-wallets.d.ts +2 -2
- package/resources/shared.d.mts +24 -8
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +24 -8
- package/resources/shared.d.ts.map +1 -1
- package/resources/support/tickets.d.mts +67 -4
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +67 -4
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +22 -4
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +22 -4
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/x/account-connection-challenges.d.mts +1 -1
- package/resources/x/account-connection-challenges.d.ts +1 -1
- package/resources/x/account-connection-challenges.js +1 -1
- package/resources/x/account-connection-challenges.mjs +1 -1
- package/resources/x/accounts.d.mts +9 -6
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +9 -6
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +4 -2
- package/resources/x/accounts.js.map +1 -1
- package/resources/x/accounts.mjs +4 -2
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +360 -10
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +360 -10
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +17 -4
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +17 -4
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +361 -7
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +361 -7
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +20 -5
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +20 -5
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/dm.d.mts +183 -5
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +183 -5
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +9 -2
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +9 -2
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/media.d.mts +178 -10
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +178 -10
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +9 -5
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +9 -5
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +545 -14
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +545 -14
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +25 -6
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +25 -6
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +358 -6
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +358 -6
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +17 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +17 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +358 -6
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +358 -6
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +17 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +17 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +376 -18
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +376 -18
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +25 -6
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +25 -6
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +361 -7
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +361 -7
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +20 -5
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +20 -5
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/users.d.mts +181 -5
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +181 -5
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +9 -2
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +9 -2
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/write-actions.d.mts +155 -12
- package/resources/x/write-actions.d.mts.map +1 -1
- package/resources/x/write-actions.d.ts +155 -12
- package/resources/x/write-actions.d.ts.map +1 -1
- package/src/resources/credits.ts +1 -1
- package/src/resources/extractions.ts +4 -4
- package/src/resources/guest-wallets.ts +2 -2
- package/src/resources/shared.ts +93 -9
- package/src/resources/support/tickets.ts +122 -6
- package/src/resources/x/account-connection-challenges.ts +1 -1
- package/src/resources/x/accounts.ts +9 -6
- package/src/resources/x/communities/communities.ts +515 -12
- package/src/resources/x/communities/join.ts +518 -9
- package/src/resources/x/dm.ts +261 -6
- package/src/resources/x/media.ts +258 -11
- package/src/resources/x/profile.ts +786 -17
- package/src/resources/x/tweets/like.ts +515 -8
- package/src/resources/x/tweets/retweet.ts +523 -8
- package/src/resources/x/tweets/tweets.ts +529 -23
- package/src/resources/x/users/follow.ts +518 -9
- package/src/resources/x/users/users.ts +260 -6
- package/src/resources/x/write-actions.ts +207 -14
- 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
|
@@ -17,11 +17,12 @@ export declare class Communities extends APIResource {
|
|
|
17
17
|
* const community = await client.x.communities.create({
|
|
18
18
|
* account: '@elonmusk',
|
|
19
19
|
* name: 'Example Name',
|
|
20
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
20
21
|
* description: 'A community for Tesla enthusiasts',
|
|
21
22
|
* });
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
create(
|
|
25
|
+
create(params: CommunityCreateParams, options?: RequestOptions): APIPromise<CommunityCreateResponse>;
|
|
25
26
|
/**
|
|
26
27
|
* Delete community
|
|
27
28
|
*
|
|
@@ -30,10 +31,11 @@ export declare class Communities extends APIResource {
|
|
|
30
31
|
* const community = await client.x.communities.delete('id', {
|
|
31
32
|
* account: '@elonmusk',
|
|
32
33
|
* community_name: 'Tesla Fans',
|
|
34
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
33
35
|
* });
|
|
34
36
|
* ```
|
|
35
37
|
*/
|
|
36
|
-
delete(id: string,
|
|
38
|
+
delete(id: string, params: CommunityDeleteParams, options?: RequestOptions): APIPromise<CommunityDeleteResponse>;
|
|
37
39
|
/**
|
|
38
40
|
* Get community name, description and member count
|
|
39
41
|
*
|
|
@@ -79,13 +81,347 @@ export declare class Communities extends APIResource {
|
|
|
79
81
|
*/
|
|
80
82
|
retrieveSearch(query: CommunityRetrieveSearchParams, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
81
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Durable write lifecycle record. Poll statusUrl until terminal is true. Reusing
|
|
86
|
+
* the original Idempotency-Key returns this same record. Submit a new write only
|
|
87
|
+
* when safeToRetry is true, using a new key.
|
|
88
|
+
*/
|
|
82
89
|
export interface CommunityCreateResponse {
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
id: string;
|
|
91
|
+
/**
|
|
92
|
+
* Connected account selected for the write.
|
|
93
|
+
*/
|
|
94
|
+
account: CommunityCreateResponse.Account | null;
|
|
95
|
+
action: 'create_tweet' | 'delete_tweet' | 'like' | 'unlike' | 'retweet' | 'unretweet' | 'follow' | 'unfollow' | 'remove_follower' | 'send_dm' | 'upload_media' | 'update_profile' | 'update_avatar' | 'update_banner' | 'create_community' | 'delete_community' | 'join_community' | 'leave_community';
|
|
96
|
+
/**
|
|
97
|
+
* plannedCredits is the approved maximum. chargedCredits comes from the settled
|
|
98
|
+
* credit ledger. Pending or failed writes are not charged.
|
|
99
|
+
*/
|
|
100
|
+
billing: CommunityCreateResponse.Billing;
|
|
101
|
+
charged: boolean;
|
|
102
|
+
chargedCredits: string;
|
|
103
|
+
/**
|
|
104
|
+
* Exact follow-up an API client or agent should perform.
|
|
105
|
+
*/
|
|
106
|
+
nextAction: CommunityCreateResponse.NextAction | null;
|
|
107
|
+
object: 'x_write_action';
|
|
108
|
+
pollAfterMs: number | null;
|
|
109
|
+
/**
|
|
110
|
+
* Stable fingerprint and sanitized payload for replay checks.
|
|
111
|
+
*/
|
|
112
|
+
request: CommunityCreateResponse.Request;
|
|
113
|
+
/**
|
|
114
|
+
* Confirmed result produced by the write, when available.
|
|
115
|
+
*/
|
|
116
|
+
result: CommunityCreateResponse.Result | null;
|
|
117
|
+
/**
|
|
118
|
+
* True only when a new attempt can reasonably succeed.
|
|
119
|
+
*/
|
|
120
|
+
retryable: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* True only when no write was dispatched and a new idempotency key may be used.
|
|
123
|
+
*/
|
|
124
|
+
safeToRetry: boolean;
|
|
125
|
+
sendDispatched: boolean;
|
|
126
|
+
status: 'accepted' | 'dispatching' | 'pending_confirmation' | 'success' | 'failed' | 'expired';
|
|
127
|
+
statusUrl: string;
|
|
128
|
+
success: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Existing X resource targeted by the write, when applicable.
|
|
131
|
+
*/
|
|
132
|
+
target: CommunityCreateResponse.Target | null;
|
|
133
|
+
targetId: string | null;
|
|
134
|
+
terminal: boolean;
|
|
135
|
+
writeActionId: string;
|
|
136
|
+
/**
|
|
137
|
+
* Compatibility field for a confirmed community ID.
|
|
138
|
+
*/
|
|
139
|
+
communityId?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Confirmed community name when available.
|
|
142
|
+
*/
|
|
85
143
|
communityName?: string;
|
|
144
|
+
completedAt?: string;
|
|
145
|
+
confirmationAttempts?: number;
|
|
146
|
+
confirmationCheckedAt?: string;
|
|
147
|
+
confirmedAt?: string;
|
|
148
|
+
createdAt?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Structured recovery context for a failed write.
|
|
151
|
+
*/
|
|
152
|
+
details?: {
|
|
153
|
+
[key: string]: unknown;
|
|
154
|
+
};
|
|
155
|
+
error?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Deadline for resolving a non-terminal write. This is not the Idempotency-Key
|
|
158
|
+
* retention deadline.
|
|
159
|
+
*/
|
|
160
|
+
expiresAt?: string;
|
|
161
|
+
idempotent?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Media count, kind, size, and billing details when used.
|
|
164
|
+
*/
|
|
165
|
+
media?: {
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Compatibility field for a confirmed media upload ID.
|
|
170
|
+
*/
|
|
171
|
+
mediaId?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Public media URL when the upload creates one.
|
|
174
|
+
*/
|
|
175
|
+
mediaUrl?: string;
|
|
176
|
+
message?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Compatibility field for a confirmed direct message ID.
|
|
179
|
+
*/
|
|
180
|
+
messageId?: string;
|
|
181
|
+
requestHash?: string;
|
|
182
|
+
requestId?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Compatibility result ID for other write actions.
|
|
185
|
+
*/
|
|
186
|
+
resultId?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Dispatch timestamp when the write reached execution.
|
|
189
|
+
*/
|
|
190
|
+
sendDispatchedAt?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Compatibility field for a confirmed tweet result ID.
|
|
193
|
+
*/
|
|
194
|
+
tweetId?: string;
|
|
195
|
+
updatedAt?: string;
|
|
86
196
|
}
|
|
197
|
+
export declare namespace CommunityCreateResponse {
|
|
198
|
+
/**
|
|
199
|
+
* Connected account selected for the write.
|
|
200
|
+
*/
|
|
201
|
+
interface Account {
|
|
202
|
+
id: string;
|
|
203
|
+
username: string;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* plannedCredits is the approved maximum. chargedCredits comes from the settled
|
|
207
|
+
* credit ledger. Pending or failed writes are not charged.
|
|
208
|
+
*/
|
|
209
|
+
interface Billing {
|
|
210
|
+
charged: boolean;
|
|
211
|
+
chargedCredits: string;
|
|
212
|
+
plannedCredits: string;
|
|
213
|
+
status: 'not_charged' | 'pending' | 'charged' | 'charge_failed' | 'refunded';
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Exact follow-up an API client or agent should perform.
|
|
217
|
+
*/
|
|
218
|
+
interface NextAction {
|
|
219
|
+
type: 'poll' | 'retry' | 'verify_result' | 'fix_request';
|
|
220
|
+
afterMs?: number;
|
|
221
|
+
requiresNewIdempotencyKey?: boolean;
|
|
222
|
+
url?: string;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Stable fingerprint and sanitized payload for replay checks.
|
|
226
|
+
*/
|
|
227
|
+
interface Request {
|
|
228
|
+
/**
|
|
229
|
+
* Stable hash of account, action, target, and payload.
|
|
230
|
+
*/
|
|
231
|
+
hash: string | null;
|
|
232
|
+
/**
|
|
233
|
+
* Exact sanitized payload dispatched for this action.
|
|
234
|
+
*/
|
|
235
|
+
payload: {
|
|
236
|
+
[key: string]: unknown;
|
|
237
|
+
} | null;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Confirmed result produced by the write, when available.
|
|
241
|
+
*/
|
|
242
|
+
interface Result {
|
|
243
|
+
id?: string;
|
|
244
|
+
state?: string;
|
|
245
|
+
type?: 'tweet' | 'direct_message' | 'media' | 'community' | 'state_change';
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Existing X resource targeted by the write, when applicable.
|
|
249
|
+
*/
|
|
250
|
+
interface Target {
|
|
251
|
+
id: string;
|
|
252
|
+
type: 'tweet' | 'user' | 'community';
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Durable write lifecycle record. Poll statusUrl until terminal is true. Reusing
|
|
257
|
+
* the original Idempotency-Key returns this same record. Submit a new write only
|
|
258
|
+
* when safeToRetry is true, using a new key.
|
|
259
|
+
*/
|
|
87
260
|
export interface CommunityDeleteResponse {
|
|
88
|
-
|
|
261
|
+
id: string;
|
|
262
|
+
/**
|
|
263
|
+
* Connected account selected for the write.
|
|
264
|
+
*/
|
|
265
|
+
account: CommunityDeleteResponse.Account | null;
|
|
266
|
+
action: 'create_tweet' | 'delete_tweet' | 'like' | 'unlike' | 'retweet' | 'unretweet' | 'follow' | 'unfollow' | 'remove_follower' | 'send_dm' | 'upload_media' | 'update_profile' | 'update_avatar' | 'update_banner' | 'create_community' | 'delete_community' | 'join_community' | 'leave_community';
|
|
267
|
+
/**
|
|
268
|
+
* plannedCredits is the approved maximum. chargedCredits comes from the settled
|
|
269
|
+
* credit ledger. Pending or failed writes are not charged.
|
|
270
|
+
*/
|
|
271
|
+
billing: CommunityDeleteResponse.Billing;
|
|
272
|
+
charged: boolean;
|
|
273
|
+
chargedCredits: string;
|
|
274
|
+
/**
|
|
275
|
+
* Exact follow-up an API client or agent should perform.
|
|
276
|
+
*/
|
|
277
|
+
nextAction: CommunityDeleteResponse.NextAction | null;
|
|
278
|
+
object: 'x_write_action';
|
|
279
|
+
pollAfterMs: number | null;
|
|
280
|
+
/**
|
|
281
|
+
* Stable fingerprint and sanitized payload for replay checks.
|
|
282
|
+
*/
|
|
283
|
+
request: CommunityDeleteResponse.Request;
|
|
284
|
+
/**
|
|
285
|
+
* Confirmed result produced by the write, when available.
|
|
286
|
+
*/
|
|
287
|
+
result: CommunityDeleteResponse.Result | null;
|
|
288
|
+
/**
|
|
289
|
+
* True only when a new attempt can reasonably succeed.
|
|
290
|
+
*/
|
|
291
|
+
retryable: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* True only when no write was dispatched and a new idempotency key may be used.
|
|
294
|
+
*/
|
|
295
|
+
safeToRetry: boolean;
|
|
296
|
+
sendDispatched: boolean;
|
|
297
|
+
status: 'accepted' | 'dispatching' | 'pending_confirmation' | 'success' | 'failed' | 'expired';
|
|
298
|
+
statusUrl: string;
|
|
299
|
+
success: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Existing X resource targeted by the write, when applicable.
|
|
302
|
+
*/
|
|
303
|
+
target: CommunityDeleteResponse.Target | null;
|
|
304
|
+
targetId: string | null;
|
|
305
|
+
terminal: boolean;
|
|
306
|
+
writeActionId: string;
|
|
307
|
+
/**
|
|
308
|
+
* Compatibility field for a confirmed community ID.
|
|
309
|
+
*/
|
|
310
|
+
communityId?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Confirmed community name when available.
|
|
313
|
+
*/
|
|
314
|
+
communityName?: string;
|
|
315
|
+
completedAt?: string;
|
|
316
|
+
confirmationAttempts?: number;
|
|
317
|
+
confirmationCheckedAt?: string;
|
|
318
|
+
confirmedAt?: string;
|
|
319
|
+
createdAt?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Structured recovery context for a failed write.
|
|
322
|
+
*/
|
|
323
|
+
details?: {
|
|
324
|
+
[key: string]: unknown;
|
|
325
|
+
};
|
|
326
|
+
error?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Deadline for resolving a non-terminal write. This is not the Idempotency-Key
|
|
329
|
+
* retention deadline.
|
|
330
|
+
*/
|
|
331
|
+
expiresAt?: string;
|
|
332
|
+
idempotent?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Media count, kind, size, and billing details when used.
|
|
335
|
+
*/
|
|
336
|
+
media?: {
|
|
337
|
+
[key: string]: unknown;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* Compatibility field for a confirmed media upload ID.
|
|
341
|
+
*/
|
|
342
|
+
mediaId?: string;
|
|
343
|
+
/**
|
|
344
|
+
* Public media URL when the upload creates one.
|
|
345
|
+
*/
|
|
346
|
+
mediaUrl?: string;
|
|
347
|
+
message?: string;
|
|
348
|
+
/**
|
|
349
|
+
* Compatibility field for a confirmed direct message ID.
|
|
350
|
+
*/
|
|
351
|
+
messageId?: string;
|
|
352
|
+
requestHash?: string;
|
|
353
|
+
requestId?: string;
|
|
354
|
+
/**
|
|
355
|
+
* Compatibility result ID for other write actions.
|
|
356
|
+
*/
|
|
357
|
+
resultId?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Dispatch timestamp when the write reached execution.
|
|
360
|
+
*/
|
|
361
|
+
sendDispatchedAt?: string;
|
|
362
|
+
/**
|
|
363
|
+
* Compatibility field for a confirmed tweet result ID.
|
|
364
|
+
*/
|
|
365
|
+
tweetId?: string;
|
|
366
|
+
updatedAt?: string;
|
|
367
|
+
}
|
|
368
|
+
export declare namespace CommunityDeleteResponse {
|
|
369
|
+
/**
|
|
370
|
+
* Connected account selected for the write.
|
|
371
|
+
*/
|
|
372
|
+
interface Account {
|
|
373
|
+
id: string;
|
|
374
|
+
username: string;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* plannedCredits is the approved maximum. chargedCredits comes from the settled
|
|
378
|
+
* credit ledger. Pending or failed writes are not charged.
|
|
379
|
+
*/
|
|
380
|
+
interface Billing {
|
|
381
|
+
charged: boolean;
|
|
382
|
+
chargedCredits: string;
|
|
383
|
+
plannedCredits: string;
|
|
384
|
+
status: 'not_charged' | 'pending' | 'charged' | 'charge_failed' | 'refunded';
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Exact follow-up an API client or agent should perform.
|
|
388
|
+
*/
|
|
389
|
+
interface NextAction {
|
|
390
|
+
type: 'poll' | 'retry' | 'verify_result' | 'fix_request';
|
|
391
|
+
afterMs?: number;
|
|
392
|
+
requiresNewIdempotencyKey?: boolean;
|
|
393
|
+
url?: string;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Stable fingerprint and sanitized payload for replay checks.
|
|
397
|
+
*/
|
|
398
|
+
interface Request {
|
|
399
|
+
/**
|
|
400
|
+
* Stable hash of account, action, target, and payload.
|
|
401
|
+
*/
|
|
402
|
+
hash: string | null;
|
|
403
|
+
/**
|
|
404
|
+
* Exact sanitized payload dispatched for this action.
|
|
405
|
+
*/
|
|
406
|
+
payload: {
|
|
407
|
+
[key: string]: unknown;
|
|
408
|
+
} | null;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Confirmed result produced by the write, when available.
|
|
412
|
+
*/
|
|
413
|
+
interface Result {
|
|
414
|
+
id?: string;
|
|
415
|
+
state?: string;
|
|
416
|
+
type?: 'tweet' | 'direct_message' | 'media' | 'community' | 'state_change';
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Existing X resource targeted by the write, when applicable.
|
|
420
|
+
*/
|
|
421
|
+
interface Target {
|
|
422
|
+
id: string;
|
|
423
|
+
type: 'tweet' | 'user' | 'community';
|
|
424
|
+
}
|
|
89
425
|
}
|
|
90
426
|
export interface CommunityRetrieveInfoResponse {
|
|
91
427
|
/**
|
|
@@ -179,27 +515,41 @@ export declare namespace CommunityRetrieveInfoResponse {
|
|
|
179
515
|
}
|
|
180
516
|
export interface CommunityCreateParams {
|
|
181
517
|
/**
|
|
182
|
-
* X account (@username or ID) creating the community
|
|
518
|
+
* Body param: X account (@username or ID) creating the community
|
|
183
519
|
*/
|
|
184
520
|
account: string;
|
|
185
521
|
/**
|
|
186
|
-
* Community name
|
|
522
|
+
* Body param: Community name
|
|
187
523
|
*/
|
|
188
524
|
name: string;
|
|
189
525
|
/**
|
|
190
|
-
*
|
|
526
|
+
* Header param: Generate one unique value for each intended write. Reuse it only
|
|
527
|
+
* when retrying the exact same account, action, target, and payload. A reused key
|
|
528
|
+
* returns the original action. Reusing it with different input returns 409. Replay
|
|
529
|
+
* protection remains active for at least 90 days.
|
|
530
|
+
*/
|
|
531
|
+
'Idempotency-Key': string;
|
|
532
|
+
/**
|
|
533
|
+
* Body param: Community description
|
|
191
534
|
*/
|
|
192
535
|
description?: string;
|
|
193
536
|
}
|
|
194
537
|
export interface CommunityDeleteParams {
|
|
195
538
|
/**
|
|
196
|
-
* X account (@username or ID) deleting the community
|
|
539
|
+
* Body param: X account (@username or ID) deleting the community
|
|
197
540
|
*/
|
|
198
541
|
account: string;
|
|
199
542
|
/**
|
|
200
|
-
* Community name for confirmation
|
|
543
|
+
* Body param: Community name for confirmation
|
|
201
544
|
*/
|
|
202
545
|
community_name: string;
|
|
546
|
+
/**
|
|
547
|
+
* Header param: Generate one unique value for each intended write. Reuse it only
|
|
548
|
+
* when retrying the exact same account, action, target, and payload. A reused key
|
|
549
|
+
* returns the original action. Reusing it with different input returns 409. Replay
|
|
550
|
+
* protection remains active for at least 90 days.
|
|
551
|
+
*/
|
|
552
|
+
'Idempotency-Key': string;
|
|
203
553
|
}
|
|
204
554
|
export interface CommunityRetrieveMembersParams {
|
|
205
555
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,MAAM,wBAAqB;AACvC,OAAO,KAAK,OAAO,kBAAe;AAClC,OAAO,EACL,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACtB,kBAAe;AAChB,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,EAAE,oBAAiB;AAC/E,OAAO,EAAE,UAAU,EAAE,qCAAkC;
|
|
1
|
+
{"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,MAAM,wBAAqB;AACvC,OAAO,KAAK,OAAO,kBAAe;AAClC,OAAO,EACL,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACtB,kBAAe;AAChB,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,EAAE,oBAAiB;AAC/E,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE,qBAAa,WAAY,SAAQ,WAAW;IAC1C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IACpD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IASpG;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAStC;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAI7F;;;;;;;;OAQG;IACH,eAAe,CACb,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,8BAA8B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,C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AAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -8,6 +8,7 @@ const JoinAPI = tslib_1.__importStar(require("./join.js"));
|
|
|
8
8
|
const join_1 = require("./join.js");
|
|
9
9
|
const TweetsAPI = tslib_1.__importStar(require("./tweets.js"));
|
|
10
10
|
const tweets_1 = require("./tweets.js");
|
|
11
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
11
12
|
const path_1 = require("../../../internal/utils/path.js");
|
|
12
13
|
class Communities extends resource_1.APIResource {
|
|
13
14
|
constructor() {
|
|
@@ -23,12 +24,18 @@ class Communities extends resource_1.APIResource {
|
|
|
23
24
|
* const community = await client.x.communities.create({
|
|
24
25
|
* account: '@elonmusk',
|
|
25
26
|
* name: 'Example Name',
|
|
27
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
26
28
|
* description: 'A community for Tesla enthusiasts',
|
|
27
29
|
* });
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
create(
|
|
31
|
-
|
|
32
|
+
create(params, options) {
|
|
33
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
34
|
+
return this._client.post('/x/communities', {
|
|
35
|
+
body,
|
|
36
|
+
...options,
|
|
37
|
+
headers: (0, headers_1.buildHeaders)([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
38
|
+
});
|
|
32
39
|
}
|
|
33
40
|
/**
|
|
34
41
|
* Delete community
|
|
@@ -38,11 +45,17 @@ class Communities extends resource_1.APIResource {
|
|
|
38
45
|
* const community = await client.x.communities.delete('id', {
|
|
39
46
|
* account: '@elonmusk',
|
|
40
47
|
* community_name: 'Tesla Fans',
|
|
48
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
41
49
|
* });
|
|
42
50
|
* ```
|
|
43
51
|
*/
|
|
44
|
-
delete(id,
|
|
45
|
-
|
|
52
|
+
delete(id, params, options) {
|
|
53
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
54
|
+
return this._client.delete((0, path_1.path) `/x/communities/${id}`, {
|
|
55
|
+
body,
|
|
56
|
+
...options,
|
|
57
|
+
headers: (0, headers_1.buildHeaders)([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
58
|
+
});
|
|
46
59
|
}
|
|
47
60
|
/**
|
|
48
61
|
* Get community name, description and member count
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communities.js","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,2DAAkC;AAClC,oCAMgB;AAChB,+DAAsC;AACtC,wCAA+E;
|
|
1
|
+
{"version":3,"file":"communities.js","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,2DAAkC;AAClC,oCAMgB;AAChB,+DAAsC;AACtC,wCAA+E;AAE/E,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmHhE,CAAC;IAjHC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAA6B,EAAE,OAAwB;QAC5D,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACzC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACjF,CAAC,CAAC;IACL,CAAC;I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;CACF;AArHD,kCAqHC;AA4rBD,WAAW,CAAC,IAAI,GAAG,WAAI,CAAC;AACxB,WAAW,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -4,6 +4,7 @@ import * as JoinAPI from "./join.mjs";
|
|
|
4
4
|
import { Join, } from "./join.mjs";
|
|
5
5
|
import * as TweetsAPI from "./tweets.mjs";
|
|
6
6
|
import { Tweets } from "./tweets.mjs";
|
|
7
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
7
8
|
import { path } from "../../../internal/utils/path.mjs";
|
|
8
9
|
export class Communities extends APIResource {
|
|
9
10
|
constructor() {
|
|
@@ -19,12 +20,18 @@ export class Communities extends APIResource {
|
|
|
19
20
|
* const community = await client.x.communities.create({
|
|
20
21
|
* account: '@elonmusk',
|
|
21
22
|
* name: 'Example Name',
|
|
23
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
22
24
|
* description: 'A community for Tesla enthusiasts',
|
|
23
25
|
* });
|
|
24
26
|
* ```
|
|
25
27
|
*/
|
|
26
|
-
create(
|
|
27
|
-
|
|
28
|
+
create(params, options) {
|
|
29
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
30
|
+
return this._client.post('/x/communities', {
|
|
31
|
+
body,
|
|
32
|
+
...options,
|
|
33
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
34
|
+
});
|
|
28
35
|
}
|
|
29
36
|
/**
|
|
30
37
|
* Delete community
|
|
@@ -34,11 +41,17 @@ export class Communities extends APIResource {
|
|
|
34
41
|
* const community = await client.x.communities.delete('id', {
|
|
35
42
|
* account: '@elonmusk',
|
|
36
43
|
* community_name: 'Tesla Fans',
|
|
44
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
37
45
|
* });
|
|
38
46
|
* ```
|
|
39
47
|
*/
|
|
40
|
-
delete(id,
|
|
41
|
-
|
|
48
|
+
delete(id, params, options) {
|
|
49
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
50
|
+
return this._client.delete(path `/x/communities/${id}`, {
|
|
51
|
+
body,
|
|
52
|
+
...options,
|
|
53
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
54
|
+
});
|
|
42
55
|
}
|
|
43
56
|
/**
|
|
44
57
|
* Get community name, description and member count
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communities.mjs","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,KAAK,OAAO,mBAAe;AAClC,OAAO,EACL,IAAI,GAKL,mBAAe;AAChB,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAA+C,MAAM,EAAE,qBAAiB;
|
|
1
|
+
{"version":3,"file":"communities.mjs","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,KAAK,OAAO,mBAAe;AAClC,OAAO,EACL,IAAI,GAKL,mBAAe;AAChB,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAA+C,MAAM,EAAE,qBAAiB;AAE/E,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmHhE,CAAC;IAjHC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAA6B,EAAE,OAAwB;QAC5D,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG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