x-twitter-scraper 0.18.0 → 0.20.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 (208) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +1 -0
  3. package/client.d.mts +7 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +7 -0
  6. package/client.d.ts.map +1 -1
  7. package/client.js +6 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +6 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +3 -3
  12. package/resources/account.d.mts +1 -1
  13. package/resources/account.d.mts.map +1 -1
  14. package/resources/account.d.ts +1 -1
  15. package/resources/account.d.ts.map +1 -1
  16. package/resources/activity.d.mts +230 -0
  17. package/resources/activity.d.mts.map +1 -0
  18. package/resources/activity.d.ts +230 -0
  19. package/resources/activity.d.ts.map +1 -0
  20. package/resources/activity.js +67 -0
  21. package/resources/activity.js.map +1 -0
  22. package/resources/activity.mjs +63 -0
  23. package/resources/activity.mjs.map +1 -0
  24. package/resources/credits.d.mts +29 -0
  25. package/resources/credits.d.mts.map +1 -1
  26. package/resources/credits.d.ts +29 -0
  27. package/resources/credits.d.ts.map +1 -1
  28. package/resources/credits.js.map +1 -1
  29. package/resources/credits.mjs.map +1 -1
  30. package/resources/events.d.mts +69 -0
  31. package/resources/events.d.mts.map +1 -1
  32. package/resources/events.d.ts +69 -0
  33. package/resources/events.d.ts.map +1 -1
  34. package/resources/events.js +2 -1
  35. package/resources/events.js.map +1 -1
  36. package/resources/events.mjs +2 -1
  37. package/resources/events.mjs.map +1 -1
  38. package/resources/extractions.d.mts +56 -0
  39. package/resources/extractions.d.mts.map +1 -1
  40. package/resources/extractions.d.ts +56 -0
  41. package/resources/extractions.d.ts.map +1 -1
  42. package/resources/index.d.mts +1 -0
  43. package/resources/index.d.mts.map +1 -1
  44. package/resources/index.d.ts +1 -0
  45. package/resources/index.d.ts.map +1 -1
  46. package/resources/index.js +3 -1
  47. package/resources/index.js.map +1 -1
  48. package/resources/index.mjs +1 -0
  49. package/resources/index.mjs.map +1 -1
  50. package/resources/monitors/posts.d.mts +45 -1
  51. package/resources/monitors/posts.d.mts.map +1 -1
  52. package/resources/monitors/posts.d.ts +45 -1
  53. package/resources/monitors/posts.d.ts.map +1 -1
  54. package/resources/monitors/posts.js +1 -1
  55. package/resources/monitors/posts.mjs +1 -1
  56. package/resources/radar.d.mts +9 -0
  57. package/resources/radar.d.mts.map +1 -1
  58. package/resources/radar.d.ts +9 -0
  59. package/resources/radar.d.ts.map +1 -1
  60. package/resources/shared.d.mts +67 -1
  61. package/resources/shared.d.mts.map +1 -1
  62. package/resources/shared.d.ts +67 -1
  63. package/resources/shared.d.ts.map +1 -1
  64. package/resources/subscribe.d.mts +11 -0
  65. package/resources/subscribe.d.mts.map +1 -1
  66. package/resources/subscribe.d.ts +11 -0
  67. package/resources/subscribe.d.ts.map +1 -1
  68. package/resources/subscribe.js.map +1 -1
  69. package/resources/subscribe.mjs.map +1 -1
  70. package/resources/x/communities/communities.d.mts +17 -0
  71. package/resources/x/communities/communities.d.mts.map +1 -1
  72. package/resources/x/communities/communities.d.ts +17 -0
  73. package/resources/x/communities/communities.d.ts.map +1 -1
  74. package/resources/x/communities/communities.js +7 -4
  75. package/resources/x/communities/communities.js.map +1 -1
  76. package/resources/x/communities/communities.mjs +7 -4
  77. package/resources/x/communities/communities.mjs.map +1 -1
  78. package/resources/x/communities/join.d.mts +14 -0
  79. package/resources/x/communities/join.d.mts.map +1 -1
  80. package/resources/x/communities/join.d.ts +14 -0
  81. package/resources/x/communities/join.d.ts.map +1 -1
  82. package/resources/x/communities/join.js +4 -4
  83. package/resources/x/communities/join.js.map +1 -1
  84. package/resources/x/communities/join.mjs +4 -4
  85. package/resources/x/communities/join.mjs.map +1 -1
  86. package/resources/x/dm.d.mts +14 -0
  87. package/resources/x/dm.d.mts.map +1 -1
  88. package/resources/x/dm.d.ts +14 -0
  89. package/resources/x/dm.d.ts.map +1 -1
  90. package/resources/x/dm.js +4 -4
  91. package/resources/x/dm.js.map +1 -1
  92. package/resources/x/dm.mjs +4 -4
  93. package/resources/x/dm.mjs.map +1 -1
  94. package/resources/x/index.d.mts +2 -2
  95. package/resources/x/index.d.mts.map +1 -1
  96. package/resources/x/index.d.ts +2 -2
  97. package/resources/x/index.d.ts.map +1 -1
  98. package/resources/x/index.js.map +1 -1
  99. package/resources/x/index.mjs.map +1 -1
  100. package/resources/x/media.d.mts +43 -0
  101. package/resources/x/media.d.mts.map +1 -1
  102. package/resources/x/media.d.ts +43 -0
  103. package/resources/x/media.d.ts.map +1 -1
  104. package/resources/x/media.js +2 -2
  105. package/resources/x/media.js.map +1 -1
  106. package/resources/x/media.mjs +2 -2
  107. package/resources/x/media.mjs.map +1 -1
  108. package/resources/x/profile.d.mts +21 -0
  109. package/resources/x/profile.d.mts.map +1 -1
  110. package/resources/x/profile.d.ts +21 -0
  111. package/resources/x/profile.d.ts.map +1 -1
  112. package/resources/x/profile.js +6 -6
  113. package/resources/x/profile.js.map +1 -1
  114. package/resources/x/profile.mjs +6 -6
  115. package/resources/x/profile.mjs.map +1 -1
  116. package/resources/x/sports.d.mts +309 -2
  117. package/resources/x/sports.d.mts.map +1 -1
  118. package/resources/x/sports.d.ts +309 -2
  119. package/resources/x/sports.d.ts.map +1 -1
  120. package/resources/x/sports.js +49 -1
  121. package/resources/x/sports.js.map +1 -1
  122. package/resources/x/sports.mjs +49 -1
  123. package/resources/x/sports.mjs.map +1 -1
  124. package/resources/x/tweets/like.d.mts +14 -0
  125. package/resources/x/tweets/like.d.mts.map +1 -1
  126. package/resources/x/tweets/like.d.ts +14 -0
  127. package/resources/x/tweets/like.d.ts.map +1 -1
  128. package/resources/x/tweets/like.js +4 -4
  129. package/resources/x/tweets/like.js.map +1 -1
  130. package/resources/x/tweets/like.mjs +4 -4
  131. package/resources/x/tweets/like.mjs.map +1 -1
  132. package/resources/x/tweets/retweet.d.mts +14 -0
  133. package/resources/x/tweets/retweet.d.mts.map +1 -1
  134. package/resources/x/tweets/retweet.d.ts +14 -0
  135. package/resources/x/tweets/retweet.d.ts.map +1 -1
  136. package/resources/x/tweets/retweet.js +4 -4
  137. package/resources/x/tweets/retweet.js.map +1 -1
  138. package/resources/x/tweets/retweet.mjs +4 -4
  139. package/resources/x/tweets/retweet.mjs.map +1 -1
  140. package/resources/x/tweets/tweets.d.mts +58 -0
  141. package/resources/x/tweets/tweets.d.mts.map +1 -1
  142. package/resources/x/tweets/tweets.d.ts +58 -0
  143. package/resources/x/tweets/tweets.d.ts.map +1 -1
  144. package/resources/x/tweets/tweets.js +4 -4
  145. package/resources/x/tweets/tweets.js.map +1 -1
  146. package/resources/x/tweets/tweets.mjs +4 -4
  147. package/resources/x/tweets/tweets.mjs.map +1 -1
  148. package/resources/x/users/follow.d.mts +14 -0
  149. package/resources/x/users/follow.d.mts.map +1 -1
  150. package/resources/x/users/follow.d.ts +14 -0
  151. package/resources/x/users/follow.d.ts.map +1 -1
  152. package/resources/x/users/follow.js +4 -4
  153. package/resources/x/users/follow.js.map +1 -1
  154. package/resources/x/users/follow.mjs +4 -4
  155. package/resources/x/users/follow.mjs.map +1 -1
  156. package/resources/x/users/index.d.mts +1 -1
  157. package/resources/x/users/index.d.mts.map +1 -1
  158. package/resources/x/users/index.d.ts +1 -1
  159. package/resources/x/users/index.d.ts.map +1 -1
  160. package/resources/x/users/index.js.map +1 -1
  161. package/resources/x/users/index.mjs.map +1 -1
  162. package/resources/x/users/users.d.mts +425 -1
  163. package/resources/x/users/users.d.mts.map +1 -1
  164. package/resources/x/users/users.d.ts +425 -1
  165. package/resources/x/users/users.d.ts.map +1 -1
  166. package/resources/x/users/users.js +17 -2
  167. package/resources/x/users/users.js.map +1 -1
  168. package/resources/x/users/users.mjs +17 -2
  169. package/resources/x/users/users.mjs.map +1 -1
  170. package/resources/x/x.d.mts +4 -4
  171. package/resources/x/x.d.mts.map +1 -1
  172. package/resources/x/x.d.ts +4 -4
  173. package/resources/x/x.d.ts.map +1 -1
  174. package/resources/x/x.js.map +1 -1
  175. package/resources/x/x.mjs.map +1 -1
  176. package/skills/x-twitter-scraper/references/api-endpoints-draws.md +13 -13
  177. package/skills/x-twitter-scraper/references/draws.md +3 -3
  178. package/skills/x-twitter-scraper/references/python-examples.md +2 -2
  179. package/src/client.ts +23 -0
  180. package/src/resources/account.ts +1 -1
  181. package/src/resources/activity.ts +341 -0
  182. package/src/resources/credits.ts +35 -0
  183. package/src/resources/events.ts +85 -1
  184. package/src/resources/extractions.ts +67 -0
  185. package/src/resources/index.ts +8 -0
  186. package/src/resources/monitors/posts.ts +58 -1
  187. package/src/resources/radar.ts +10 -0
  188. package/src/resources/shared.ts +123 -0
  189. package/src/resources/subscribe.ts +13 -0
  190. package/src/resources/x/communities/communities.ts +23 -4
  191. package/src/resources/x/communities/join.ts +20 -4
  192. package/src/resources/x/dm.ts +20 -4
  193. package/src/resources/x/index.ts +13 -0
  194. package/src/resources/x/media.ts +60 -2
  195. package/src/resources/x/profile.ts +30 -6
  196. package/src/resources/x/sports.ts +379 -1
  197. package/src/resources/x/tweets/like.ts +20 -4
  198. package/src/resources/x/tweets/retweet.ts +20 -4
  199. package/src/resources/x/tweets/tweets.ts +70 -4
  200. package/src/resources/x/users/follow.ts +20 -4
  201. package/src/resources/x/users/index.ts +3 -0
  202. package/src/resources/x/users/users.ts +513 -2
  203. package/src/resources/x/x.ts +26 -0
  204. package/src/version.ts +1 -1
  205. package/version.d.mts +1 -1
  206. package/version.d.ts +1 -1
  207. package/version.js +1 -1
  208. package/version.mjs +1 -1
@@ -0,0 +1,230 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ /**
5
+ * Account activity log
6
+ */
7
+ export declare class Activity extends APIResource {
8
+ /**
9
+ * Returns the account's activity log, newest first, with the Activity page's
10
+ * filters. It covers write actions, extractions, monitor changes and events,
11
+ * webhooks, giveaways, media, support, API keys, X account connections and
12
+ * billing.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const rows = await client.activity.list({
17
+ * category: 'monitors',
18
+ * limit: 50,
19
+ * });
20
+ * ```
21
+ */
22
+ list(query?: ActivityListParams | null | undefined, options?: RequestOptions): APIPromise<ActivityListResponse>;
23
+ /**
24
+ * Returns 1 activity of the account with its full technical record. It covers
25
+ * write actions, extractions and monitor changes. The record holds the request,
26
+ * the caller, the charge, every timestamp in UTC and related activity. It never
27
+ * holds an API key value or another account's data.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const activityRecord = await client.activity.retrieve('naF3xqHLWDTs');
32
+ * ```
33
+ */
34
+ retrieve(id: string, options?: RequestOptions): APIPromise<ActivityRecord>;
35
+ /**
36
+ * Downloads the activity log rows as a CSV, Excel, JSON, Markdown, PDF or text
37
+ * file, with the same filters as list.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const response = await client.activity.export({ format: 'csv' });
42
+ *
43
+ * const content = await response.blob();
44
+ * console.log(content);
45
+ * ```
46
+ */
47
+ export(query: ActivityExportParams, options?: RequestOptions): APIPromise<Response>;
48
+ }
49
+ /**
50
+ * 1 Activity log row. A cut list ends with a row whose category is notice and
51
+ * whose activity says where it stopped.
52
+ */
53
+ export interface ActivityLogRow {
54
+ /**
55
+ * Activity ID.
56
+ */
57
+ id: string;
58
+ activity: string;
59
+ category: string;
60
+ /**
61
+ * Credits, or an empty string when the activity has none.
62
+ */
63
+ credits: number | string;
64
+ details: string;
65
+ link: string;
66
+ /**
67
+ * Result count, or an empty string when the activity has none.
68
+ */
69
+ results: number | string;
70
+ source: string;
71
+ status: string;
72
+ target: string;
73
+ /**
74
+ * ISO 8601 time in UTC to the millisecond. Empty on the notice row.
75
+ */
76
+ time: string;
77
+ type: string;
78
+ }
79
+ /**
80
+ * Full technical record of 1 activity. Timestamps are ISO 8601 in UTC to the
81
+ * millisecond.
82
+ */
83
+ export interface ActivityRecord {
84
+ /**
85
+ * Activity ID.
86
+ */
87
+ id: string;
88
+ caller: ActivityRecord.Caller;
89
+ /**
90
+ * Credits charged for this activity.
91
+ */
92
+ charge: ActivityRecord.Charge | null;
93
+ /**
94
+ * Fields of this kind of activity, such as its target.
95
+ */
96
+ details: {
97
+ [key: string]: string | number | boolean | null;
98
+ };
99
+ /**
100
+ * Kind of the activity. Only a signed-in dashboard session sees an `api_key`
101
+ * record.
102
+ */
103
+ kind: 'write_action' | 'extraction' | 'monitor_change' | 'api_key' | 'billing' | 'giveaway_draw' | 'monitor_event' | 'media_download' | 'media_share' | 'support_ticket' | 'webhook_delivery' | 'webhook_endpoint' | 'x_account_connection';
104
+ object: 'activity';
105
+ /**
106
+ * Up to 5 other activities on the same subject within 7 days, newest first.
107
+ */
108
+ related: Array<ActivityRecord.Related>;
109
+ /**
110
+ * The API request behind this activity. Null for activity from before Oct 30,
111
+ * 2026.
112
+ */
113
+ request: ActivityRecord.Request | null;
114
+ /**
115
+ * ID of the API request behind this activity.
116
+ */
117
+ requestId: string | null;
118
+ status: 'completed' | 'running' | 'failed' | 'canceled';
119
+ timestamps: ActivityRecord.Timestamps;
120
+ /**
121
+ * Type of the activity within its kind, the same as the type of its Activity log
122
+ * row. Examples are a write action type, an extraction tool type, a monitor
123
+ * change, a monitor event type or a ledger entry type.
124
+ */
125
+ type: string;
126
+ /**
127
+ * Dashboard page of this activity.
128
+ */
129
+ url: string;
130
+ }
131
+ export declare namespace ActivityRecord {
132
+ interface Caller {
133
+ /**
134
+ * Name and prefix of the API key used. Never its value.
135
+ */
136
+ apiKey: Caller.APIKey | null;
137
+ authMethod: 'api_key' | 'oauth' | 'session' | null;
138
+ oauthClient: Caller.OAuthClient | null;
139
+ }
140
+ namespace Caller {
141
+ interface APIKey {
142
+ name: string;
143
+ prefix: string;
144
+ }
145
+ interface OAuthClient {
146
+ id: string;
147
+ name: string;
148
+ }
149
+ }
150
+ interface Charge {
151
+ at: string;
152
+ balanceAfter: number;
153
+ credits: number;
154
+ }
155
+ interface Related {
156
+ id: string;
157
+ createdAt: string;
158
+ status: 'completed' | 'running' | 'failed' | 'canceled';
159
+ type: string;
160
+ url: string;
161
+ }
162
+ interface Request {
163
+ at: string;
164
+ durationMs: number;
165
+ httpStatus: number;
166
+ ipAddress: string | null;
167
+ method: 'DELETE' | 'PATCH' | 'POST' | 'PUT';
168
+ path: string;
169
+ userAgent: string | null;
170
+ }
171
+ interface Timestamps {
172
+ createdAt: string;
173
+ completedAt?: string;
174
+ confirmedAt?: string;
175
+ deliveredAt?: string;
176
+ discoveredAt?: string;
177
+ drawnAt?: string;
178
+ exhaustedAt?: string;
179
+ expiresAt?: string;
180
+ firstAttemptedAt?: string;
181
+ lastUsedAt?: string;
182
+ nextRetryAt?: string;
183
+ occurredAt?: string;
184
+ pausedAt?: string;
185
+ postedAt?: string;
186
+ updatedAt?: string;
187
+ }
188
+ }
189
+ export type ActivityListResponse = Array<ActivityLogRow>;
190
+ export interface ActivityListParams {
191
+ /**
192
+ * Activity group, like the Activity page's tabs. `all` by default, or `actions`,
193
+ * `extractions`, `monitors`, `webhooks` or `billing`.
194
+ */
195
+ category?: string;
196
+ /**
197
+ * Leave it out or pass json to get the rows. Use export for a file.
198
+ */
199
+ format?: 'json';
200
+ /**
201
+ * Most rows to return, from 1 to 100,000. 100 by default.
202
+ */
203
+ limit?: number;
204
+ /**
205
+ * Search text.
206
+ */
207
+ q?: string;
208
+ /**
209
+ * Oldest time, ISO 8601.
210
+ */
211
+ since?: string;
212
+ /**
213
+ * Comma-separated statuses.
214
+ */
215
+ status?: string;
216
+ /**
217
+ * Newest time, ISO 8601.
218
+ */
219
+ until?: string;
220
+ }
221
+ export interface ActivityExportParams extends Omit<ActivityListParams, 'format'> {
222
+ /**
223
+ * File format. PDF stops at 10,000 rows.
224
+ */
225
+ format: 'csv' | 'json' | 'md' | 'md-document' | 'pdf' | 'txt' | 'xlsx';
226
+ }
227
+ export declare namespace Activity {
228
+ export { type ActivityLogRow as ActivityLogRow, type ActivityRecord as ActivityRecord, type ActivityListResponse as ActivityListResponse, type ActivityListParams as ActivityListParams, type ActivityExportParams as ActivityExportParams, };
229
+ }
230
+ //# sourceMappingURL=activity.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.d.mts","sourceRoot":"","sources":["../src/resources/activity.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC,CAElC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC,CAEzE;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,CAOlF;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb,I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,CAAC,EAAE,MAAM,CAAC;QAEpB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAEzD,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC9E;;OAEG;IACH,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,aAAa,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CACxE;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,230 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ /**
5
+ * Account activity log
6
+ */
7
+ export declare class Activity extends APIResource {
8
+ /**
9
+ * Returns the account's activity log, newest first, with the Activity page's
10
+ * filters. It covers write actions, extractions, monitor changes and events,
11
+ * webhooks, giveaways, media, support, API keys, X account connections and
12
+ * billing.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const rows = await client.activity.list({
17
+ * category: 'monitors',
18
+ * limit: 50,
19
+ * });
20
+ * ```
21
+ */
22
+ list(query?: ActivityListParams | null | undefined, options?: RequestOptions): APIPromise<ActivityListResponse>;
23
+ /**
24
+ * Returns 1 activity of the account with its full technical record. It covers
25
+ * write actions, extractions and monitor changes. The record holds the request,
26
+ * the caller, the charge, every timestamp in UTC and related activity. It never
27
+ * holds an API key value or another account's data.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const activityRecord = await client.activity.retrieve('naF3xqHLWDTs');
32
+ * ```
33
+ */
34
+ retrieve(id: string, options?: RequestOptions): APIPromise<ActivityRecord>;
35
+ /**
36
+ * Downloads the activity log rows as a CSV, Excel, JSON, Markdown, PDF or text
37
+ * file, with the same filters as list.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const response = await client.activity.export({ format: 'csv' });
42
+ *
43
+ * const content = await response.blob();
44
+ * console.log(content);
45
+ * ```
46
+ */
47
+ export(query: ActivityExportParams, options?: RequestOptions): APIPromise<Response>;
48
+ }
49
+ /**
50
+ * 1 Activity log row. A cut list ends with a row whose category is notice and
51
+ * whose activity says where it stopped.
52
+ */
53
+ export interface ActivityLogRow {
54
+ /**
55
+ * Activity ID.
56
+ */
57
+ id: string;
58
+ activity: string;
59
+ category: string;
60
+ /**
61
+ * Credits, or an empty string when the activity has none.
62
+ */
63
+ credits: number | string;
64
+ details: string;
65
+ link: string;
66
+ /**
67
+ * Result count, or an empty string when the activity has none.
68
+ */
69
+ results: number | string;
70
+ source: string;
71
+ status: string;
72
+ target: string;
73
+ /**
74
+ * ISO 8601 time in UTC to the millisecond. Empty on the notice row.
75
+ */
76
+ time: string;
77
+ type: string;
78
+ }
79
+ /**
80
+ * Full technical record of 1 activity. Timestamps are ISO 8601 in UTC to the
81
+ * millisecond.
82
+ */
83
+ export interface ActivityRecord {
84
+ /**
85
+ * Activity ID.
86
+ */
87
+ id: string;
88
+ caller: ActivityRecord.Caller;
89
+ /**
90
+ * Credits charged for this activity.
91
+ */
92
+ charge: ActivityRecord.Charge | null;
93
+ /**
94
+ * Fields of this kind of activity, such as its target.
95
+ */
96
+ details: {
97
+ [key: string]: string | number | boolean | null;
98
+ };
99
+ /**
100
+ * Kind of the activity. Only a signed-in dashboard session sees an `api_key`
101
+ * record.
102
+ */
103
+ kind: 'write_action' | 'extraction' | 'monitor_change' | 'api_key' | 'billing' | 'giveaway_draw' | 'monitor_event' | 'media_download' | 'media_share' | 'support_ticket' | 'webhook_delivery' | 'webhook_endpoint' | 'x_account_connection';
104
+ object: 'activity';
105
+ /**
106
+ * Up to 5 other activities on the same subject within 7 days, newest first.
107
+ */
108
+ related: Array<ActivityRecord.Related>;
109
+ /**
110
+ * The API request behind this activity. Null for activity from before Oct 30,
111
+ * 2026.
112
+ */
113
+ request: ActivityRecord.Request | null;
114
+ /**
115
+ * ID of the API request behind this activity.
116
+ */
117
+ requestId: string | null;
118
+ status: 'completed' | 'running' | 'failed' | 'canceled';
119
+ timestamps: ActivityRecord.Timestamps;
120
+ /**
121
+ * Type of the activity within its kind, the same as the type of its Activity log
122
+ * row. Examples are a write action type, an extraction tool type, a monitor
123
+ * change, a monitor event type or a ledger entry type.
124
+ */
125
+ type: string;
126
+ /**
127
+ * Dashboard page of this activity.
128
+ */
129
+ url: string;
130
+ }
131
+ export declare namespace ActivityRecord {
132
+ interface Caller {
133
+ /**
134
+ * Name and prefix of the API key used. Never its value.
135
+ */
136
+ apiKey: Caller.APIKey | null;
137
+ authMethod: 'api_key' | 'oauth' | 'session' | null;
138
+ oauthClient: Caller.OAuthClient | null;
139
+ }
140
+ namespace Caller {
141
+ interface APIKey {
142
+ name: string;
143
+ prefix: string;
144
+ }
145
+ interface OAuthClient {
146
+ id: string;
147
+ name: string;
148
+ }
149
+ }
150
+ interface Charge {
151
+ at: string;
152
+ balanceAfter: number;
153
+ credits: number;
154
+ }
155
+ interface Related {
156
+ id: string;
157
+ createdAt: string;
158
+ status: 'completed' | 'running' | 'failed' | 'canceled';
159
+ type: string;
160
+ url: string;
161
+ }
162
+ interface Request {
163
+ at: string;
164
+ durationMs: number;
165
+ httpStatus: number;
166
+ ipAddress: string | null;
167
+ method: 'DELETE' | 'PATCH' | 'POST' | 'PUT';
168
+ path: string;
169
+ userAgent: string | null;
170
+ }
171
+ interface Timestamps {
172
+ createdAt: string;
173
+ completedAt?: string;
174
+ confirmedAt?: string;
175
+ deliveredAt?: string;
176
+ discoveredAt?: string;
177
+ drawnAt?: string;
178
+ exhaustedAt?: string;
179
+ expiresAt?: string;
180
+ firstAttemptedAt?: string;
181
+ lastUsedAt?: string;
182
+ nextRetryAt?: string;
183
+ occurredAt?: string;
184
+ pausedAt?: string;
185
+ postedAt?: string;
186
+ updatedAt?: string;
187
+ }
188
+ }
189
+ export type ActivityListResponse = Array<ActivityLogRow>;
190
+ export interface ActivityListParams {
191
+ /**
192
+ * Activity group, like the Activity page's tabs. `all` by default, or `actions`,
193
+ * `extractions`, `monitors`, `webhooks` or `billing`.
194
+ */
195
+ category?: string;
196
+ /**
197
+ * Leave it out or pass json to get the rows. Use export for a file.
198
+ */
199
+ format?: 'json';
200
+ /**
201
+ * Most rows to return, from 1 to 100,000. 100 by default.
202
+ */
203
+ limit?: number;
204
+ /**
205
+ * Search text.
206
+ */
207
+ q?: string;
208
+ /**
209
+ * Oldest time, ISO 8601.
210
+ */
211
+ since?: string;
212
+ /**
213
+ * Comma-separated statuses.
214
+ */
215
+ status?: string;
216
+ /**
217
+ * Newest time, ISO 8601.
218
+ */
219
+ until?: string;
220
+ }
221
+ export interface ActivityExportParams extends Omit<ActivityListParams, 'format'> {
222
+ /**
223
+ * File format. PDF stops at 10,000 rows.
224
+ */
225
+ format: 'csv' | 'json' | 'md' | 'md-document' | 'pdf' | 'txt' | 'xlsx';
226
+ }
227
+ export declare namespace Activity {
228
+ export { type ActivityLogRow as ActivityLogRow, type ActivityRecord as ActivityRecord, type ActivityListResponse as ActivityListResponse, type ActivityListParams as ActivityListParams, type ActivityExportParams as ActivityExportParams, };
229
+ }
230
+ //# sourceMappingURL=activity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../src/resources/activity.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC,CAElC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC,CAEzE;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,CAOlF;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;I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CAAC,EAAE,MAAM,CAAC;QAErB,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAEzD,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC9E;;OAEG;IACH,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,aAAa,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CACxE;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ // SPDX-FileCopyrightText: 2026 Xquik contributors
3
+ //
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Activity = void 0;
7
+ const resource_1 = require("../core/resource.js");
8
+ const headers_1 = require("../internal/headers.js");
9
+ const path_1 = require("../internal/utils/path.js");
10
+ /**
11
+ * Account activity log
12
+ */
13
+ class Activity extends resource_1.APIResource {
14
+ /**
15
+ * Returns the account's activity log, newest first, with the Activity page's
16
+ * filters. It covers write actions, extractions, monitor changes and events,
17
+ * webhooks, giveaways, media, support, API keys, X account connections and
18
+ * billing.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const rows = await client.activity.list({
23
+ * category: 'monitors',
24
+ * limit: 50,
25
+ * });
26
+ * ```
27
+ */
28
+ list(query = {}, options) {
29
+ return this._client.get('/activity', { query, ...options });
30
+ }
31
+ /**
32
+ * Returns 1 activity of the account with its full technical record. It covers
33
+ * write actions, extractions and monitor changes. The record holds the request,
34
+ * the caller, the charge, every timestamp in UTC and related activity. It never
35
+ * holds an API key value or another account's data.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const activityRecord = await client.activity.retrieve('naF3xqHLWDTs');
40
+ * ```
41
+ */
42
+ retrieve(id, options) {
43
+ return this._client.get((0, path_1.path) `/activity/${id}`, options);
44
+ }
45
+ /**
46
+ * Downloads the activity log rows as a CSV, Excel, JSON, Markdown, PDF or text
47
+ * file, with the same filters as list.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const response = await client.activity.export({ format: 'csv' });
52
+ *
53
+ * const content = await response.blob();
54
+ * console.log(content);
55
+ * ```
56
+ */
57
+ export(query, options) {
58
+ return this._client.get('/activity', {
59
+ query,
60
+ ...options,
61
+ headers: (0, headers_1.buildHeaders)([{ Accept: 'application/octet-stream' }, options?.headers]),
62
+ __binaryResponse: true,
63
+ });
64
+ }
65
+ }
66
+ exports.Activity = Activity;
67
+ //# sourceMappingURL=activity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.js","sourceRoot":"","sources":["../src/resources/activity.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEtC,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,cAAsB,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAK,GAA0C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;YACnC,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,63 @@
1
+ // SPDX-FileCopyrightText: 2026 Xquik contributors
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ import { APIResource } from "../core/resource.mjs";
5
+ import { buildHeaders } from "../internal/headers.mjs";
6
+ import { path } from "../internal/utils/path.mjs";
7
+ /**
8
+ * Account activity log
9
+ */
10
+ export class Activity extends APIResource {
11
+ /**
12
+ * Returns the account's activity log, newest first, with the Activity page's
13
+ * filters. It covers write actions, extractions, monitor changes and events,
14
+ * webhooks, giveaways, media, support, API keys, X account connections and
15
+ * billing.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const rows = await client.activity.list({
20
+ * category: 'monitors',
21
+ * limit: 50,
22
+ * });
23
+ * ```
24
+ */
25
+ list(query = {}, options) {
26
+ return this._client.get('/activity', { query, ...options });
27
+ }
28
+ /**
29
+ * Returns 1 activity of the account with its full technical record. It covers
30
+ * write actions, extractions and monitor changes. The record holds the request,
31
+ * the caller, the charge, every timestamp in UTC and related activity. It never
32
+ * holds an API key value or another account's data.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const activityRecord = await client.activity.retrieve('naF3xqHLWDTs');
37
+ * ```
38
+ */
39
+ retrieve(id, options) {
40
+ return this._client.get(path `/activity/${id}`, options);
41
+ }
42
+ /**
43
+ * Downloads the activity log rows as a CSV, Excel, JSON, Markdown, PDF or text
44
+ * file, with the same filters as list.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const response = await client.activity.export({ format: 'csv' });
49
+ *
50
+ * const content = await response.blob();
51
+ * console.log(content);
52
+ * ```
53
+ */
54
+ export(query, options) {
55
+ return this._client.get('/activity', {
56
+ query,
57
+ ...options,
58
+ headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
59
+ __binaryResponse: true,
60
+ });
61
+ }
62
+ }
63
+ //# sourceMappingURL=activity.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.mjs","sourceRoot":"","sources":["../src/resources/activity.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAK,GAA0C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;YACnC,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,4 +1,5 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
+ import * as Shared from "./shared.mjs";
2
3
  import { APIPromise } from "../core/api-promise.mjs";
3
4
  import { RequestOptions } from "../internal/request-options.mjs";
4
5
  /**
@@ -87,12 +88,30 @@ export interface CreditRetrieveTopupStatusResponse {
87
88
  * Dollar amount requested for the top-up.
88
89
  */
89
90
  amount_dollars?: number | null;
91
+ /**
92
+ * Currency the checkout charged.
93
+ */
94
+ chargedCurrency?: Shared.Currency;
95
+ /**
96
+ * Amount the checkout charged before tax, in the currency's smallest unit.
97
+ * JPY and KRW have no decimals, so 1580 JPY is ¥1,580.
98
+ */
99
+ chargedMinorUnits?: number;
90
100
  /**
91
101
  * Bigint string credit amount granted or pending.
92
102
  */
93
103
  credits?: string;
94
104
  }
95
105
  export interface CreditTopupBalanceResponse {
106
+ /**
107
+ * Currency the checkout charges.
108
+ */
109
+ chargedCurrency: Shared.Currency;
110
+ /**
111
+ * Amount the checkout charges before tax, in the currency's smallest unit.
112
+ * JPY and KRW have no decimals, so 1580 JPY is ¥1,580.
113
+ */
114
+ chargedMinorUnits: number;
96
115
  /**
97
116
  * Stable Xquik redirect URL for the active checkout.
98
117
  */
@@ -120,11 +139,21 @@ export interface CreditTopupBalanceParams {
120
139
  * Amount to top up in US dollars. Minimum 10.
121
140
  */
122
141
  dollars: number;
142
+ /**
143
+ * Currency to pay in, USD by default. Credits always match the dollar amount.
144
+ * Lowercase codes work too. chargedCurrency shows the currency charged.
145
+ */
146
+ currency?: Shared.Currency;
123
147
  /**
124
148
  * Optional site language for Stripe's return page. An unsupported 1 uses en, the
125
149
  * default.
126
150
  */
127
151
  locale?: string;
152
+ /**
153
+ * Optional Xquik tool page to return to after Checkout, such as
154
+ * /en/x-article-reader.
155
+ */
156
+ returnPath?: string;
128
157
  }
129
158
  export declare namespace Credits {
130
159
  export { type CreditRetrieveBalanceResponse as CreditRetrieveBalanceResponse, type CreditRetrieveTopupStatusResponse as CreditRetrieveTopupStatusResponse, type CreditTopupBalanceResponse as CreditTopupBalanceResponse, type CreditRedirectTopupCheckoutParams as CreditRedirectTopupCheckoutParams, type CreditRetrieveTopupStatusParams as CreditRetrieveTopupStatusParams, type CreditTopupBalanceParams as CreditTopupBalanceParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"credits.d.mts","sourceRoot":"","sources":["../src/resources/credits.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;OASG;IACH,qBAAqB,CACnB,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC,CAOlB;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC,CAEnF;IAED;;;;;;;;;OASG;IACH,mBAAmB,CACjB,KAAK,EAAE,+BAA+B,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC,CAE/C;IAED;;;;;;;;;;;OAWG;IACH,YAAY,C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