x-twitter-scraper 0.18.0 → 0.19.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 (117) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +7 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +3 -3
  11. package/resources/account.d.mts +1 -1
  12. package/resources/account.d.mts.map +1 -1
  13. package/resources/account.d.ts +1 -1
  14. package/resources/account.d.ts.map +1 -1
  15. package/resources/activity.d.mts +214 -0
  16. package/resources/activity.d.mts.map +1 -0
  17. package/resources/activity.d.ts +214 -0
  18. package/resources/activity.d.ts.map +1 -0
  19. package/resources/activity.js +67 -0
  20. package/resources/activity.js.map +1 -0
  21. package/resources/activity.mjs +63 -0
  22. package/resources/activity.mjs.map +1 -0
  23. package/resources/credits.d.mts +24 -0
  24. package/resources/credits.d.mts.map +1 -1
  25. package/resources/credits.d.ts +24 -0
  26. package/resources/credits.d.ts.map +1 -1
  27. package/resources/credits.js.map +1 -1
  28. package/resources/credits.mjs.map +1 -1
  29. package/resources/events.d.mts +69 -0
  30. package/resources/events.d.mts.map +1 -1
  31. package/resources/events.d.ts +69 -0
  32. package/resources/events.d.ts.map +1 -1
  33. package/resources/events.js +2 -1
  34. package/resources/events.js.map +1 -1
  35. package/resources/events.mjs +2 -1
  36. package/resources/events.mjs.map +1 -1
  37. package/resources/extractions.d.mts +8 -0
  38. package/resources/extractions.d.mts.map +1 -1
  39. package/resources/extractions.d.ts +8 -0
  40. package/resources/extractions.d.ts.map +1 -1
  41. package/resources/index.d.mts +1 -0
  42. package/resources/index.d.mts.map +1 -1
  43. package/resources/index.d.ts +1 -0
  44. package/resources/index.d.ts.map +1 -1
  45. package/resources/index.js +3 -1
  46. package/resources/index.js.map +1 -1
  47. package/resources/index.mjs +1 -0
  48. package/resources/index.mjs.map +1 -1
  49. package/resources/monitors/posts.d.mts +45 -1
  50. package/resources/monitors/posts.d.mts.map +1 -1
  51. package/resources/monitors/posts.d.ts +45 -1
  52. package/resources/monitors/posts.d.ts.map +1 -1
  53. package/resources/monitors/posts.js +1 -1
  54. package/resources/monitors/posts.mjs +1 -1
  55. package/resources/shared.d.mts +67 -1
  56. package/resources/shared.d.mts.map +1 -1
  57. package/resources/shared.d.ts +67 -1
  58. package/resources/shared.d.ts.map +1 -1
  59. package/resources/subscribe.d.mts +11 -0
  60. package/resources/subscribe.d.mts.map +1 -1
  61. package/resources/subscribe.d.ts +11 -0
  62. package/resources/subscribe.d.ts.map +1 -1
  63. package/resources/subscribe.js.map +1 -1
  64. package/resources/subscribe.mjs.map +1 -1
  65. package/resources/x/index.d.mts +1 -1
  66. package/resources/x/index.d.mts.map +1 -1
  67. package/resources/x/index.d.ts +1 -1
  68. package/resources/x/index.d.ts.map +1 -1
  69. package/resources/x/index.js.map +1 -1
  70. package/resources/x/index.mjs.map +1 -1
  71. package/resources/x/media.d.mts +36 -0
  72. package/resources/x/media.d.mts.map +1 -1
  73. package/resources/x/media.d.ts +36 -0
  74. package/resources/x/media.d.ts.map +1 -1
  75. package/resources/x/sports.d.mts +309 -2
  76. package/resources/x/sports.d.mts.map +1 -1
  77. package/resources/x/sports.d.ts +309 -2
  78. package/resources/x/sports.d.ts.map +1 -1
  79. package/resources/x/sports.js +49 -1
  80. package/resources/x/sports.js.map +1 -1
  81. package/resources/x/sports.mjs +49 -1
  82. package/resources/x/sports.mjs.map +1 -1
  83. package/resources/x/tweets/tweets.d.mts +31 -0
  84. package/resources/x/tweets/tweets.d.mts.map +1 -1
  85. package/resources/x/tweets/tweets.d.ts +31 -0
  86. package/resources/x/tweets/tweets.d.ts.map +1 -1
  87. package/resources/x/tweets/tweets.js.map +1 -1
  88. package/resources/x/tweets/tweets.mjs.map +1 -1
  89. package/resources/x/x.d.mts +2 -2
  90. package/resources/x/x.d.mts.map +1 -1
  91. package/resources/x/x.d.ts +2 -2
  92. package/resources/x/x.d.ts.map +1 -1
  93. package/resources/x/x.js.map +1 -1
  94. package/resources/x/x.mjs.map +1 -1
  95. package/skills/x-twitter-scraper/references/api-endpoints-draws.md +13 -13
  96. package/skills/x-twitter-scraper/references/draws.md +3 -3
  97. package/skills/x-twitter-scraper/references/python-examples.md +2 -2
  98. package/src/client.ts +23 -0
  99. package/src/resources/account.ts +1 -1
  100. package/src/resources/activity.ts +302 -0
  101. package/src/resources/credits.ts +29 -0
  102. package/src/resources/events.ts +85 -1
  103. package/src/resources/extractions.ts +9 -0
  104. package/src/resources/index.ts +8 -0
  105. package/src/resources/monitors/posts.ts +58 -1
  106. package/src/resources/shared.ts +113 -0
  107. package/src/resources/subscribe.ts +13 -0
  108. package/src/resources/x/index.ts +10 -0
  109. package/src/resources/x/media.ts +50 -0
  110. package/src/resources/x/sports.ts +379 -1
  111. package/src/resources/x/tweets/tweets.ts +35 -0
  112. package/src/resources/x/x.ts +20 -0
  113. package/src/version.ts +1 -1
  114. package/version.d.mts +1 -1
  115. package/version.d.ts +1 -1
  116. package/version.js +1 -1
  117. package/version.mjs +1 -1
@@ -0,0 +1,302 @@
1
+ // SPDX-FileCopyrightText: 2026 Xquik contributors
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+
5
+ import { APIResource } from '../core/resource';
6
+ import { APIPromise } from '../core/api-promise';
7
+ import { buildHeaders } from '../internal/headers';
8
+ import { RequestOptions } from '../internal/request-options';
9
+ import { path } from '../internal/utils/path';
10
+
11
+ /**
12
+ * Account activity log
13
+ */
14
+ export class Activity extends APIResource {
15
+ /**
16
+ * Returns the account's activity log, newest first, with the Activity page's
17
+ * filters. It covers write actions, extractions, monitor changes and events,
18
+ * webhooks, giveaways, media, support, API keys, X account connections and
19
+ * billing.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const rows = await client.activity.list({
24
+ * category: 'monitors',
25
+ * limit: 50,
26
+ * });
27
+ * ```
28
+ */
29
+ list(
30
+ query: ActivityListParams | null | undefined = {},
31
+ options?: RequestOptions,
32
+ ): APIPromise<ActivityListResponse> {
33
+ return this._client.get('/activity', { query, ...options });
34
+ }
35
+
36
+ /**
37
+ * Returns 1 activity of the account with its full technical record. It covers
38
+ * write actions, extractions and monitor changes. The record holds the request,
39
+ * the caller, the charge, every timestamp in UTC and related activity. It never
40
+ * holds an API key value or another account's data.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const activityRecord = await client.activity.retrieve('naF3xqHLWDTs');
45
+ * ```
46
+ */
47
+ retrieve(id: string, options?: RequestOptions): APIPromise<ActivityRecord> {
48
+ return this._client.get(path`/activity/${id}`, options);
49
+ }
50
+
51
+ /**
52
+ * Downloads the activity log rows as a CSV, Excel, JSON, Markdown, PDF or text
53
+ * file, with the same filters as list.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const response = await client.activity.export({ format: 'csv' });
58
+ *
59
+ * const content = await response.blob();
60
+ * console.log(content);
61
+ * ```
62
+ */
63
+ export(query: ActivityExportParams, options?: RequestOptions): APIPromise<Response> {
64
+ return this._client.get('/activity', {
65
+ query,
66
+ ...options,
67
+ headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
68
+ __binaryResponse: true,
69
+ });
70
+ }
71
+ }
72
+
73
+ /**
74
+ * 1 Activity log row. A cut list ends with a row whose category is notice and
75
+ * whose activity says where it stopped.
76
+ */
77
+ export interface ActivityLogRow {
78
+ /**
79
+ * Activity ID.
80
+ */
81
+ id: string;
82
+
83
+ activity: string;
84
+
85
+ category: string;
86
+
87
+ /**
88
+ * Credits, or an empty string when the activity has none.
89
+ */
90
+ credits: number | string;
91
+
92
+ details: string;
93
+
94
+ link: string;
95
+
96
+ /**
97
+ * Result count, or an empty string when the activity has none.
98
+ */
99
+ results: number | string;
100
+
101
+ source: string;
102
+
103
+ status: string;
104
+
105
+ target: string;
106
+
107
+ /**
108
+ * ISO 8601 time in UTC to the millisecond. Empty on the notice row.
109
+ */
110
+ time: string;
111
+
112
+ type: string;
113
+ }
114
+
115
+ /**
116
+ * Full technical record of 1 activity. Timestamps are ISO 8601 in UTC to the
117
+ * millisecond.
118
+ */
119
+ export interface ActivityRecord {
120
+ /**
121
+ * Activity ID.
122
+ */
123
+ id: string;
124
+
125
+ caller: ActivityRecord.Caller;
126
+
127
+ /**
128
+ * Credits charged for this activity.
129
+ */
130
+ charge: ActivityRecord.Charge | null;
131
+
132
+ /**
133
+ * Fields of this kind of activity, such as its target.
134
+ */
135
+ details: { [key: string]: string | number | boolean | null };
136
+
137
+ kind: 'write_action' | 'extraction' | 'monitor_change';
138
+
139
+ object: 'activity';
140
+
141
+ /**
142
+ * Up to 5 other activities on the same subject within 7 days, newest first.
143
+ */
144
+ related: Array<ActivityRecord.Related>;
145
+
146
+ /**
147
+ * The API request behind this activity. Null for activity from before Oct 30,
148
+ * 2026.
149
+ */
150
+ request: ActivityRecord.Request | null;
151
+
152
+ /**
153
+ * ID of the API request behind this activity.
154
+ */
155
+ requestId: string | null;
156
+
157
+ status: 'completed' | 'running' | 'failed' | 'canceled';
158
+
159
+ timestamps: ActivityRecord.Timestamps;
160
+
161
+ /**
162
+ * Write action type, extraction tool type or monitor change.
163
+ */
164
+ type: string;
165
+
166
+ /**
167
+ * Dashboard page of this activity.
168
+ */
169
+ url: string;
170
+ }
171
+
172
+ export namespace ActivityRecord {
173
+ export interface Caller {
174
+ /**
175
+ * Name and prefix of the API key used. Never its value.
176
+ */
177
+ apiKey: Caller.APIKey | null;
178
+
179
+ authMethod: 'api_key' | 'oauth' | 'session' | null;
180
+
181
+ oauthClient: Caller.OAuthClient | null;
182
+ }
183
+
184
+ export namespace Caller {
185
+ export interface APIKey {
186
+ name: string;
187
+
188
+ prefix: string;
189
+ }
190
+
191
+ export interface OAuthClient {
192
+ id: string;
193
+
194
+ name: string;
195
+ }
196
+ }
197
+
198
+ export interface Charge {
199
+ at: string;
200
+
201
+ balanceAfter: number;
202
+
203
+ credits: number;
204
+ }
205
+
206
+ export interface Related {
207
+ id: string;
208
+
209
+ createdAt: string;
210
+
211
+ status: 'completed' | 'running' | 'failed' | 'canceled';
212
+
213
+ type: string;
214
+
215
+ url: string;
216
+ }
217
+
218
+ export interface Request {
219
+ at: string;
220
+
221
+ durationMs: number;
222
+
223
+ httpStatus: number;
224
+
225
+ ipAddress: string | null;
226
+
227
+ method: 'DELETE' | 'PATCH' | 'POST' | 'PUT';
228
+
229
+ path: string;
230
+
231
+ userAgent: string | null;
232
+ }
233
+
234
+ export interface Timestamps {
235
+ createdAt: string;
236
+
237
+ completedAt?: string;
238
+
239
+ confirmedAt?: string;
240
+
241
+ expiresAt?: string;
242
+
243
+ updatedAt?: string;
244
+ }
245
+ }
246
+
247
+ export type ActivityListResponse = Array<ActivityLogRow>;
248
+
249
+ export interface ActivityListParams {
250
+ /**
251
+ * Activity group, like the Activity page's tabs. `all` by default, or `actions`,
252
+ * `extractions`, `monitors`, `webhooks` or `billing`.
253
+ */
254
+ category?: string;
255
+
256
+ /**
257
+ * Leave it out or pass json to get the rows. Use export for a file.
258
+ */
259
+ format?: 'json';
260
+
261
+ /**
262
+ * Most rows to return, from 1 to 100,000. 100 by default.
263
+ */
264
+ limit?: number;
265
+
266
+ /**
267
+ * Search text.
268
+ */
269
+ q?: string;
270
+
271
+ /**
272
+ * Oldest time, ISO 8601.
273
+ */
274
+ since?: string;
275
+
276
+ /**
277
+ * Comma-separated statuses.
278
+ */
279
+ status?: string;
280
+
281
+ /**
282
+ * Newest time, ISO 8601.
283
+ */
284
+ until?: string;
285
+ }
286
+
287
+ export interface ActivityExportParams extends Omit<ActivityListParams, 'format'> {
288
+ /**
289
+ * File format. PDF stops at 10,000 rows.
290
+ */
291
+ format: 'csv' | 'json' | 'md' | 'md-document' | 'pdf' | 'txt' | 'xlsx';
292
+ }
293
+
294
+ export declare namespace Activity {
295
+ export {
296
+ type ActivityLogRow as ActivityLogRow,
297
+ type ActivityRecord as ActivityRecord,
298
+ type ActivityListResponse as ActivityListResponse,
299
+ type ActivityListParams as ActivityListParams,
300
+ type ActivityExportParams as ActivityExportParams,
301
+ };
302
+ }
@@ -3,6 +3,7 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
 
5
5
  import { APIResource } from '../core/resource';
6
+ import * as Shared from './shared';
6
7
  import { APIPromise } from '../core/api-promise';
7
8
  import { buildHeaders } from '../internal/headers';
8
9
  import { RequestOptions } from '../internal/request-options';
@@ -128,6 +129,17 @@ export interface CreditRetrieveTopupStatusResponse {
128
129
  */
129
130
  amount_dollars?: number | null;
130
131
 
132
+ /**
133
+ * Currency the checkout charged.
134
+ */
135
+ chargedCurrency?: Shared.Currency;
136
+
137
+ /**
138
+ * Amount the checkout charged before tax, in the currency's smallest unit.
139
+ * JPY and KRW have no decimals, so 1580 JPY is ¥1,580.
140
+ */
141
+ chargedMinorUnits?: number;
142
+
131
143
  /**
132
144
  * Bigint string credit amount granted or pending.
133
145
  */
@@ -135,6 +147,17 @@ export interface CreditRetrieveTopupStatusResponse {
135
147
  }
136
148
 
137
149
  export interface CreditTopupBalanceResponse {
150
+ /**
151
+ * Currency the checkout charges.
152
+ */
153
+ chargedCurrency: Shared.Currency;
154
+
155
+ /**
156
+ * Amount the checkout charges before tax, in the currency's smallest unit.
157
+ * JPY and KRW have no decimals, so 1580 JPY is ¥1,580.
158
+ */
159
+ chargedMinorUnits: number;
160
+
138
161
  /**
139
162
  * Stable Xquik redirect URL for the active checkout.
140
163
  */
@@ -167,6 +190,12 @@ export interface CreditTopupBalanceParams {
167
190
  */
168
191
  dollars: number;
169
192
 
193
+ /**
194
+ * Currency to pay in, USD by default. Credits always match the dollar amount.
195
+ * Lowercase codes work too. chargedCurrency shows the currency charged.
196
+ */
197
+ currency?: Shared.Currency;
198
+
170
199
  /**
171
200
  * Optional site language for Stripe's return page. An unsupported 1 uses en, the
172
201
  * default.
@@ -53,8 +53,9 @@ export class Events extends APIResource {
53
53
  params: EventStreamParams | null | undefined = {},
54
54
  options?: RequestOptions,
55
55
  ): APIPromise<Stream<Event>> {
56
- const { 'Last-Event-ID': lastEventID } = params ?? {};
56
+ const { 'Last-Event-ID': lastEventID, ...query } = params ?? {};
57
57
  return this._client.get('/events/stream', {
58
+ query,
58
59
  ...options,
59
60
  headers: buildHeaders([
60
61
  {
@@ -322,6 +323,11 @@ export namespace Event {
322
323
  */
323
324
  limitedActions?: Array<MonitorPost.LimitedAction>;
324
325
 
326
+ /**
327
+ * The live event the post belongs to, such as an election.
328
+ */
329
+ liveEventContext?: MonitorPost.LiveEventContext;
330
+
325
331
  /**
326
332
  * Media, omitted when unavailable.
327
333
  */
@@ -438,6 +444,12 @@ export namespace Event {
438
444
  'retweetCount' | 'replyCount' | 'likeCount' | 'quoteCount' | 'viewCount' | 'bookmarkCount'
439
445
  >;
440
446
 
447
+ /**
448
+ * The fields X did not send for this post. text reads empty, so treat it as
449
+ * unknown rather than empty. Left out when X sent the text.
450
+ */
451
+ unknownFields?: Array<'text'>;
452
+
441
453
  /**
442
454
  * User IDs that left this conversation.
443
455
  */
@@ -1029,6 +1041,23 @@ export namespace Event {
1029
1041
  }
1030
1042
  }
1031
1043
 
1044
+ export interface LiveEventContext {
1045
+ /**
1046
+ * The event's image.
1047
+ */
1048
+ imageUrl?: string;
1049
+
1050
+ /**
1051
+ * Event name.
1052
+ */
1053
+ title?: string;
1054
+
1055
+ /**
1056
+ * The event's page on X.
1057
+ */
1058
+ url?: string;
1059
+ }
1060
+
1032
1061
  /**
1033
1062
  * Complete Note Tweet content and rich-text metadata.
1034
1063
  */
@@ -1441,6 +1470,13 @@ export namespace Event {
1441
1470
  }
1442
1471
 
1443
1472
  export interface ReactionContext {
1473
+ /**
1474
+ * The post this one reacts to, with the same fields. X often sends only its
1475
+ * ID, author & edit history. Then unknownFields lists text, and the flags X
1476
+ * did not send are left out.
1477
+ */
1478
+ reactedToPost?: QuotedTweet;
1479
+
1444
1480
  reactedToPostId?: string;
1445
1481
 
1446
1482
  /**
@@ -1964,6 +2000,11 @@ export namespace EventDetail {
1964
2000
  */
1965
2001
  limitedActions?: Array<MonitorPost.LimitedAction>;
1966
2002
 
2003
+ /**
2004
+ * The live event the post belongs to, such as an election.
2005
+ */
2006
+ liveEventContext?: MonitorPost.LiveEventContext;
2007
+
1967
2008
  /**
1968
2009
  * Media, omitted when unavailable.
1969
2010
  */
@@ -2080,6 +2121,12 @@ export namespace EventDetail {
2080
2121
  'retweetCount' | 'replyCount' | 'likeCount' | 'quoteCount' | 'viewCount' | 'bookmarkCount'
2081
2122
  >;
2082
2123
 
2124
+ /**
2125
+ * The fields X did not send for this post. text reads empty, so treat it as
2126
+ * unknown rather than empty. Left out when X sent the text.
2127
+ */
2128
+ unknownFields?: Array<'text'>;
2129
+
2083
2130
  /**
2084
2131
  * User IDs that left this conversation.
2085
2132
  */
@@ -2671,6 +2718,23 @@ export namespace EventDetail {
2671
2718
  }
2672
2719
  }
2673
2720
 
2721
+ export interface LiveEventContext {
2722
+ /**
2723
+ * The event's image.
2724
+ */
2725
+ imageUrl?: string;
2726
+
2727
+ /**
2728
+ * Event name.
2729
+ */
2730
+ title?: string;
2731
+
2732
+ /**
2733
+ * The event's page on X.
2734
+ */
2735
+ url?: string;
2736
+ }
2737
+
2674
2738
  /**
2675
2739
  * Complete Note Tweet content and rich-text metadata.
2676
2740
  */
@@ -3083,6 +3147,13 @@ export namespace EventDetail {
3083
3147
  }
3084
3148
 
3085
3149
  export interface ReactionContext {
3150
+ /**
3151
+ * The post this one reacts to, with the same fields. X often sends only its
3152
+ * ID, author & edit history. Then unknownFields lists text, and the flags X
3153
+ * did not send are left out.
3154
+ */
3155
+ reactedToPost?: QuotedTweet;
3156
+
3086
3157
  reactedToPostId?: string;
3087
3158
 
3088
3159
  /**
@@ -3417,6 +3488,19 @@ export interface EventStreamParams {
3417
3488
  * The last event ID the client got. The stream first sends every event after it.
3418
3489
  */
3419
3490
  'Last-Event-ID'?: string;
3491
+
3492
+ /**
3493
+ * Set to post_metrics to also get each post monitor's saved numbers. Any other
3494
+ * value is refused.
3495
+ */
3496
+ include?: 'post_metrics';
3497
+
3498
+ /**
3499
+ * Set to true to resume 30 seconds before Last-Event-ID, so late events still
3500
+ * arrive. Events you have can arrive again, so skip IDs you've seen. An ID the
3501
+ * stream can't find starts 5 minutes back, not 30 days.
3502
+ */
3503
+ lookBack?: boolean;
3420
3504
  }
3421
3505
 
3422
3506
  export declare namespace Events {
@@ -322,6 +322,15 @@ export namespace ExtractionRetrieveResponse {
322
322
 
323
323
  tweetUrl?: string;
324
324
 
325
+ /**
326
+ * Badge type X shows on the account, with outputPreset=flat. Business is the gold
327
+ * badge of a verified organization. Government is the grey badge of a government
328
+ * or multilateral account. Blue is the badge of X Premium. Default nested output
329
+ * uses enrichmentData.user.verifiedType. Absent when the account has none of these
330
+ * badges.
331
+ */
332
+ verifiedType?: string;
333
+
325
334
  /**
326
335
  * Whole number from 0.
327
336
  */
@@ -11,6 +11,14 @@ export {
11
11
  type AccountSetXUsernameParams,
12
12
  type AccountUpdateLocaleParams,
13
13
  } from './account';
14
+ export {
15
+ Activity,
16
+ type ActivityLogRow,
17
+ type ActivityRecord,
18
+ type ActivityListResponse,
19
+ type ActivityListParams,
20
+ type ActivityExportParams,
21
+ } from './activity';
14
22
  export { Compose, type ComposeCreateResponse, type ComposeCreateParams } from './compose';
15
23
  export {
16
24
  Credits,
@@ -20,7 +20,7 @@ export class Posts extends APIResource {
20
20
  * @example
21
21
  * ```ts
22
22
  * const postMonitor = await client.monitors.posts.create({
23
- * post: 'https://x.com/xquik/status/2104984505677430978',
23
+ * post: 'https://x.com/NASA/status/2102882545427714266',
24
24
  * });
25
25
  * ```
26
26
  */
@@ -192,6 +192,21 @@ export interface PostMonitor {
192
192
 
193
193
  authorName: string;
194
194
 
195
+ /**
196
+ * The author's profile picture. Omitted when X shows none.
197
+ */
198
+ authorAvatarUrl?: string;
199
+
200
+ /**
201
+ * The author's verified badge on X. Omitted when the author has none.
202
+ */
203
+ authorVerified?: 'blue' | 'business' | 'government';
204
+
205
+ /**
206
+ * Photos, videos & GIFs on the post, in X's order.
207
+ */
208
+ media: Array<PostMonitor.Media>;
209
+
195
210
  /**
196
211
  * Text of the newest version Xquik read.
197
212
  */
@@ -214,6 +229,12 @@ export interface PostMonitor {
214
229
  */
215
230
  nextBillingAt: string;
216
231
 
232
+ /**
233
+ * The post's counts when tracking began. Each metric's gain counts from here.
234
+ * views is null when X showed no view count.
235
+ */
236
+ baseline: PostMonitor.Baseline;
237
+
217
238
  /**
218
239
  * The 6 metrics of a post.
219
240
  */
@@ -238,6 +259,42 @@ export interface PostMonitor {
238
259
  pausedAt?: string;
239
260
  }
240
261
 
262
+ export namespace PostMonitor {
263
+ /**
264
+ * 1 photo, video or GIF on the post.
265
+ */
266
+ export interface Media {
267
+ kind: 'gif' | 'photo' | 'video';
268
+
269
+ /**
270
+ * The image URL. For a video or GIF, its preview image.
271
+ */
272
+ url: string;
273
+ }
274
+
275
+ /**
276
+ * The post's counts when tracking began.
277
+ */
278
+ export interface Baseline {
279
+ /**
280
+ * When tracking began.
281
+ */
282
+ at: string;
283
+
284
+ views: number | null;
285
+
286
+ likes: number;
287
+
288
+ retweets: number;
289
+
290
+ replies: number;
291
+
292
+ quotes: number;
293
+
294
+ bookmarks: number;
295
+ }
296
+ }
297
+
241
298
  /**
242
299
  * A metric's value at the hour's end & its gain over that hour. Both are null
243
300
  * when X shows no count.