x-twitter-scraper 0.15.0 → 0.17.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 (238) hide show
  1. package/CHANGELOG.md +63 -5
  2. package/README.md +1 -0
  3. package/client.d.mts +12 -4
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +12 -4
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/internal/detect-platform.d.mts +3 -1
  10. package/internal/detect-platform.d.mts.map +1 -1
  11. package/internal/detect-platform.d.ts +3 -1
  12. package/internal/detect-platform.d.ts.map +1 -1
  13. package/internal/detect-platform.js +1 -1
  14. package/internal/detect-platform.js.map +1 -1
  15. package/internal/detect-platform.mjs +1 -1
  16. package/internal/detect-platform.mjs.map +1 -1
  17. package/internal/uploads.js +1 -1
  18. package/internal/uploads.js.map +1 -1
  19. package/internal/uploads.mjs +1 -1
  20. package/internal/uploads.mjs.map +1 -1
  21. package/package.json +2 -2
  22. package/resources/account.d.mts +5 -0
  23. package/resources/account.d.mts.map +1 -1
  24. package/resources/account.d.ts +5 -0
  25. package/resources/account.d.ts.map +1 -1
  26. package/resources/compose.d.mts +1 -1
  27. package/resources/compose.d.mts.map +1 -1
  28. package/resources/compose.d.ts +1 -1
  29. package/resources/compose.d.ts.map +1 -1
  30. package/resources/drafts.d.mts +13 -3
  31. package/resources/drafts.d.mts.map +1 -1
  32. package/resources/drafts.d.ts +13 -3
  33. package/resources/drafts.d.ts.map +1 -1
  34. package/resources/drafts.js +1 -1
  35. package/resources/drafts.mjs +1 -1
  36. package/resources/events.d.mts +100 -29
  37. package/resources/events.d.mts.map +1 -1
  38. package/resources/events.d.ts +100 -29
  39. package/resources/events.d.ts.map +1 -1
  40. package/resources/events.js.map +1 -1
  41. package/resources/events.mjs.map +1 -1
  42. package/resources/index.d.mts +2 -2
  43. package/resources/index.d.mts.map +1 -1
  44. package/resources/index.d.ts +2 -2
  45. package/resources/index.d.ts.map +1 -1
  46. package/resources/index.js.map +1 -1
  47. package/resources/index.mjs.map +1 -1
  48. package/resources/monitors/index.d.mts +2 -1
  49. package/resources/monitors/index.d.mts.map +1 -1
  50. package/resources/monitors/index.d.ts +2 -1
  51. package/resources/monitors/index.d.ts.map +1 -1
  52. package/resources/monitors/index.js +3 -1
  53. package/resources/monitors/index.js.map +1 -1
  54. package/resources/monitors/index.mjs +1 -0
  55. package/resources/monitors/index.mjs.map +1 -1
  56. package/resources/monitors/keywords.d.mts +15 -65
  57. package/resources/monitors/keywords.d.mts.map +1 -1
  58. package/resources/monitors/keywords.d.ts +15 -65
  59. package/resources/monitors/keywords.d.ts.map +1 -1
  60. package/resources/monitors/monitors.d.mts +12 -5
  61. package/resources/monitors/monitors.d.mts.map +1 -1
  62. package/resources/monitors/monitors.d.ts +12 -5
  63. package/resources/monitors/monitors.d.ts.map +1 -1
  64. package/resources/monitors/monitors.js +4 -0
  65. package/resources/monitors/monitors.js.map +1 -1
  66. package/resources/monitors/monitors.mjs +4 -0
  67. package/resources/monitors/monitors.mjs.map +1 -1
  68. package/resources/monitors/posts.d.mts +344 -0
  69. package/resources/monitors/posts.d.mts.map +1 -0
  70. package/resources/monitors/posts.d.ts +344 -0
  71. package/resources/monitors/posts.d.ts.map +1 -0
  72. package/resources/monitors/posts.js +94 -0
  73. package/resources/monitors/posts.js.map +1 -0
  74. package/resources/monitors/posts.mjs +90 -0
  75. package/resources/monitors/posts.mjs.map +1 -0
  76. package/resources/shared.d.mts +671 -7
  77. package/resources/shared.d.mts.map +1 -1
  78. package/resources/shared.d.ts +671 -7
  79. package/resources/shared.d.ts.map +1 -1
  80. package/resources/support/index.d.mts +1 -1
  81. package/resources/support/index.d.mts.map +1 -1
  82. package/resources/support/index.d.ts +1 -1
  83. package/resources/support/index.d.ts.map +1 -1
  84. package/resources/support/index.js.map +1 -1
  85. package/resources/support/index.mjs.map +1 -1
  86. package/resources/support/support.d.mts +2 -2
  87. package/resources/support/support.d.mts.map +1 -1
  88. package/resources/support/support.d.ts +2 -2
  89. package/resources/support/support.d.ts.map +1 -1
  90. package/resources/support/support.js.map +1 -1
  91. package/resources/support/support.mjs.map +1 -1
  92. package/resources/support/tickets.d.mts +26 -25
  93. package/resources/support/tickets.d.mts.map +1 -1
  94. package/resources/support/tickets.d.ts +26 -25
  95. package/resources/support/tickets.d.ts.map +1 -1
  96. package/resources/support/tickets.js.map +1 -1
  97. package/resources/support/tickets.mjs.map +1 -1
  98. package/resources/webhooks.d.mts +10 -4
  99. package/resources/webhooks.d.mts.map +1 -1
  100. package/resources/webhooks.d.ts +10 -4
  101. package/resources/webhooks.d.ts.map +1 -1
  102. package/resources/webhooks.js.map +1 -1
  103. package/resources/webhooks.mjs.map +1 -1
  104. package/resources/x/accounts.d.mts +14 -4
  105. package/resources/x/accounts.d.mts.map +1 -1
  106. package/resources/x/accounts.d.ts +14 -4
  107. package/resources/x/accounts.d.ts.map +1 -1
  108. package/resources/x/accounts.js +6 -4
  109. package/resources/x/accounts.js.map +1 -1
  110. package/resources/x/accounts.mjs +6 -4
  111. package/resources/x/accounts.mjs.map +1 -1
  112. package/resources/x/broadcasts.d.mts +3 -127
  113. package/resources/x/broadcasts.d.mts.map +1 -1
  114. package/resources/x/broadcasts.d.ts +3 -127
  115. package/resources/x/broadcasts.d.ts.map +1 -1
  116. package/resources/x/communities/communities.d.mts +92 -1
  117. package/resources/x/communities/communities.d.mts.map +1 -1
  118. package/resources/x/communities/communities.d.ts +92 -1
  119. package/resources/x/communities/communities.d.ts.map +1 -1
  120. package/resources/x/communities/communities.js +14 -0
  121. package/resources/x/communities/communities.js.map +1 -1
  122. package/resources/x/communities/communities.mjs +14 -0
  123. package/resources/x/communities/communities.mjs.map +1 -1
  124. package/resources/x/communities/index.d.mts +1 -1
  125. package/resources/x/communities/index.d.mts.map +1 -1
  126. package/resources/x/communities/index.d.ts +1 -1
  127. package/resources/x/communities/index.d.ts.map +1 -1
  128. package/resources/x/communities/index.js.map +1 -1
  129. package/resources/x/communities/index.mjs.map +1 -1
  130. package/resources/x/community-notes.d.mts +122 -510
  131. package/resources/x/community-notes.d.mts.map +1 -1
  132. package/resources/x/community-notes.d.ts +122 -510
  133. package/resources/x/community-notes.d.ts.map +1 -1
  134. package/resources/x/community-notes.js.map +1 -1
  135. package/resources/x/community-notes.mjs.map +1 -1
  136. package/resources/x/index.d.mts +7 -6
  137. package/resources/x/index.d.mts.map +1 -1
  138. package/resources/x/index.d.ts +7 -6
  139. package/resources/x/index.d.ts.map +1 -1
  140. package/resources/x/index.js +3 -1
  141. package/resources/x/index.js.map +1 -1
  142. package/resources/x/index.mjs +1 -0
  143. package/resources/x/index.mjs.map +1 -1
  144. package/resources/x/jobs.d.mts +144 -283
  145. package/resources/x/jobs.d.mts.map +1 -1
  146. package/resources/x/jobs.d.ts +144 -283
  147. package/resources/x/jobs.d.ts.map +1 -1
  148. package/resources/x/jobs.js.map +1 -1
  149. package/resources/x/jobs.mjs.map +1 -1
  150. package/resources/x/lists.d.mts +27 -425
  151. package/resources/x/lists.d.mts.map +1 -1
  152. package/resources/x/lists.d.ts +27 -425
  153. package/resources/x/lists.d.ts.map +1 -1
  154. package/resources/x/media.d.mts +13 -2
  155. package/resources/x/media.d.mts.map +1 -1
  156. package/resources/x/media.d.ts +13 -2
  157. package/resources/x/media.d.ts.map +1 -1
  158. package/resources/x/media.js.map +1 -1
  159. package/resources/x/media.mjs.map +1 -1
  160. package/resources/x/profile.d.mts +13 -4
  161. package/resources/x/profile.d.mts.map +1 -1
  162. package/resources/x/profile.d.ts +13 -4
  163. package/resources/x/profile.d.ts.map +1 -1
  164. package/resources/x/profile.js.map +1 -1
  165. package/resources/x/profile.mjs.map +1 -1
  166. package/resources/x/spaces.d.mts +213 -669
  167. package/resources/x/spaces.d.mts.map +1 -1
  168. package/resources/x/spaces.d.ts +213 -669
  169. package/resources/x/spaces.d.ts.map +1 -1
  170. package/resources/x/spaces.js.map +1 -1
  171. package/resources/x/spaces.mjs.map +1 -1
  172. package/resources/x/sports.d.mts +1349 -0
  173. package/resources/x/sports.d.mts.map +1 -0
  174. package/resources/x/sports.d.ts +1349 -0
  175. package/resources/x/sports.d.ts.map +1 -0
  176. package/resources/x/sports.js +76 -0
  177. package/resources/x/sports.js.map +1 -0
  178. package/resources/x/sports.mjs +72 -0
  179. package/resources/x/sports.mjs.map +1 -0
  180. package/resources/x/tweets/tweets.d.mts +32 -24
  181. package/resources/x/tweets/tweets.d.mts.map +1 -1
  182. package/resources/x/tweets/tweets.d.ts +32 -24
  183. package/resources/x/tweets/tweets.d.ts.map +1 -1
  184. package/resources/x/tweets/tweets.js.map +1 -1
  185. package/resources/x/tweets/tweets.mjs.map +1 -1
  186. package/resources/x/users/users.d.mts +62 -614
  187. package/resources/x/users/users.d.mts.map +1 -1
  188. package/resources/x/users/users.d.ts +62 -614
  189. package/resources/x/users/users.d.ts.map +1 -1
  190. package/resources/x/users/users.js.map +1 -1
  191. package/resources/x/users/users.mjs.map +1 -1
  192. package/resources/x/x.d.mts +63 -118
  193. package/resources/x/x.d.mts.map +1 -1
  194. package/resources/x/x.d.ts +63 -118
  195. package/resources/x/x.d.ts.map +1 -1
  196. package/resources/x/x.js +4 -0
  197. package/resources/x/x.js.map +1 -1
  198. package/resources/x/x.mjs +4 -0
  199. package/resources/x/x.mjs.map +1 -1
  200. package/skills/x-twitter-scraper/references/api-endpoints-x-api.md +1 -0
  201. package/src/client.ts +12 -0
  202. package/src/internal/detect-platform.ts +2 -2
  203. package/src/internal/uploads.ts +1 -1
  204. package/src/resources/account.ts +6 -0
  205. package/src/resources/compose.ts +1 -1
  206. package/src/resources/drafts.ts +14 -2
  207. package/src/resources/events.ts +137 -29
  208. package/src/resources/index.ts +2 -0
  209. package/src/resources/monitors/index.ts +21 -0
  210. package/src/resources/monitors/keywords.ts +15 -79
  211. package/src/resources/monitors/monitors.ts +52 -3
  212. package/src/resources/monitors/posts.ts +463 -0
  213. package/src/resources/shared.ts +897 -215
  214. package/src/resources/support/index.ts +1 -0
  215. package/src/resources/support/support.ts +2 -0
  216. package/src/resources/support/tickets.ts +29 -25
  217. package/src/resources/webhooks.ts +11 -4
  218. package/src/resources/x/accounts.ts +19 -4
  219. package/src/resources/x/broadcasts.ts +3 -154
  220. package/src/resources/x/communities/communities.ts +113 -0
  221. package/src/resources/x/communities/index.ts +3 -0
  222. package/src/resources/x/community-notes.ts +137 -582
  223. package/src/resources/x/index.ts +62 -0
  224. package/src/resources/x/jobs.ts +160 -324
  225. package/src/resources/x/lists.ts +27 -499
  226. package/src/resources/x/media.ts +15 -2
  227. package/src/resources/x/profile.ts +15 -4
  228. package/src/resources/x/spaces.ts +227 -787
  229. package/src/resources/x/sports.ts +1675 -0
  230. package/src/resources/x/tweets/tweets.ts +41 -26
  231. package/src/resources/x/users/users.ts +62 -721
  232. package/src/resources/x/x.ts +185 -128
  233. package/src/version.ts +1 -1
  234. package/version.d.mts +1 -1
  235. package/version.d.ts +1 -1
  236. package/version.js +1 -1
  237. package/version.mjs +1 -1
  238. package/src/lib/.keep +0 -2
@@ -1,5 +1,6 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as Shared from "../shared.js";
3
+ import * as CommunityNotesAPI from "./community-notes.js";
3
4
  import { APIPromise } from "../../core/api-promise.js";
4
5
  import { RequestOptions } from "../../internal/request-options.js";
5
6
  /**
@@ -19,7 +20,7 @@ export declare class CommunityNotes extends APIResource {
19
20
  * );
20
21
  * ```
21
22
  */
22
- listContributorDeletedNotes(alias: string, query?: CommunityNoteListContributorDeletedNotesParams | null | undefined, options?: RequestOptions): APIPromise<CommunityNoteListContributorDeletedNotesResponse>;
23
+ listContributorDeletedNotes(alias: string, query?: CommunityNoteListContributorDeletedNotesParams | null | undefined, options?: RequestOptions): APIPromise<PaginatedCommunityNotes>;
23
24
  /**
24
25
  * Returns a contributor's notes, newest first, each with the post it is on.
25
26
  * Includes notes X has not rated helpful, which x.com shows under no post. Each
@@ -31,7 +32,7 @@ export declare class CommunityNotes extends APIResource {
31
32
  * await client.x.communityNotes.listContributorNotes('alias');
32
33
  * ```
33
34
  */
34
- listContributorNotes(alias: string, query?: CommunityNoteListContributorNotesParams | null | undefined, options?: RequestOptions): APIPromise<CommunityNoteListContributorNotesResponse>;
35
+ listContributorNotes(alias: string, query?: CommunityNoteListContributorNotesParams | null | undefined, options?: RequestOptions): APIPromise<PaginatedCommunityNotes>;
35
36
  /**
36
37
  * Returns 1 Community Notes contributor by the alias X gives them. Includes note
37
38
  * counts by rating, rating counts & the deleted notes count. Each lookup costs 1
@@ -46,317 +47,108 @@ export declare class CommunityNotes extends APIResource {
46
47
  retrieveContributor(alias: string, query?: CommunityNoteRetrieveContributorParams | null | undefined, options?: RequestOptions): APIPromise<CommunityNoteRetrieveContributorResponse>;
47
48
  }
48
49
  /**
49
- * 1 page of Community Notes. Follow next_cursor while the response reports more
50
- * pages.
50
+ * A Community Notes contributor. X names contributors by an alias, never by their
51
+ * X account. A field X leaves out is left out. Beside a note, X sends its writer
52
+ * with only some of the counts.
51
53
  */
52
- export interface CommunityNoteListContributorDeletedNotesResponse {
53
- has_next_page: boolean;
54
- next_cursor: string;
55
- notes: Array<CommunityNoteListContributorDeletedNotesResponse.Note>;
54
+ export interface CommunityNotesContributor {
55
+ /**
56
+ * The alias X gives the contributor.
57
+ */
58
+ alias: string;
59
+ /**
60
+ * Notes the contributor deleted.
61
+ */
62
+ deletedNotesCount?: number;
63
+ /**
64
+ * Whether the contributor writes notes through X's API.
65
+ */
66
+ isApiContributor?: boolean;
67
+ /**
68
+ * Whether X marks the contributor as a top writer.
69
+ */
70
+ isTopWriter?: boolean;
71
+ /**
72
+ * How many notes a contributor wrote, by X's current rating.
73
+ */
74
+ notesCount?: CommunityNotesContributor.NotesCount;
75
+ /**
76
+ * How a contributor's ratings of other notes went.
77
+ */
78
+ ratingsCount?: CommunityNotesContributor.RatingsCount;
56
79
  }
57
- export declare namespace CommunityNoteListContributorDeletedNotesResponse {
80
+ export declare namespace CommunityNotesContributor {
58
81
  /**
59
- * A Community Note as its writer's page lists it, with the post it is on. A deleted
60
- * note has no text, classification or post. A field X leaves out is left out.
82
+ * How many notes a contributor wrote, by X's current rating.
61
83
  */
62
- interface Note {
63
- /**
64
- * Note ID.
65
- */
66
- id: string;
84
+ interface NotesCount {
67
85
  /**
68
- * Whether the note scores above X's bar for a possible helpful rating.
86
+ * Notes that need more ratings.
69
87
  */
70
- abovePcrhThreshold?: boolean;
88
+ awaitingMoreRatings?: number;
71
89
  /**
72
- * Whether the rating is under appeal.
90
+ * Notes X rates helpful now.
73
91
  */
74
- appealStatus?: string;
92
+ currentlyRatedHelpful?: number;
75
93
  /**
76
- * What the writer says of the post, such as MisinformedOrPotentiallyMisleading or
77
- * NotMisleading.
94
+ * Notes X rates not helpful now.
78
95
  */
79
- classification?: string;
96
+ currentlyRatedNotHelpful?: number;
80
97
  /**
81
- * The note's writer, with the counts X sends beside a note. GET
82
- * /x/community-notes/contributors/{alias} serves every count.
98
+ * When X last counted the notes.
83
99
  */
84
- contributor?: Note.Contributor;
85
- /**
86
- * When the contributor wrote the note.
87
- */
88
- createdAt?: string;
89
- /**
90
- * The X scoring model that set the rating.
91
- */
92
- decidedBy?: string;
93
- /**
94
- * Whether the writer deleted the note.
95
- */
96
- deleted?: boolean;
97
- /**
98
- * The link a link note is on, as X shows it.
99
- */
100
- displayUrl?: string;
101
- /**
102
- * Links, tags & accounts inside the text, by character range.
103
- */
104
- entities?: Array<Note.Entity>;
105
- /**
106
- * Whether X marks that scoring model as fully visible.
107
- */
108
- fullyVisibleModel?: boolean;
109
- /**
110
- * Why raters called the note helpful.
111
- */
112
- helpfulTags?: Array<string>;
113
- /**
114
- * Views of the note, when X shares them.
115
- */
116
- impressionCount?: number;
117
- /**
118
- * Whether the note came through X's API.
119
- */
120
- isApiAuthor?: boolean;
121
- /**
122
- * Whether the note is about the post's media. X can show such a note on other
123
- * posts.
124
- */
125
- isMediaNote?: boolean;
126
- /**
127
- * Whether X offers a translation of the note.
128
- */
129
- isTranslatable?: boolean;
130
- /**
131
- * Whether the note is on a link.
132
- */
133
- isUrlNote?: boolean;
134
- /**
135
- * Language code of the note.
136
- */
137
- language?: string;
138
- /**
139
- * Other posts X matched a media note to.
140
- */
141
- mediaNoteMatchCount?: number;
142
- /**
143
- * Why raters called the note not helpful.
144
- */
145
- notHelpfulTags?: Array<string>;
100
+ updatedAt?: string;
101
+ }
102
+ /**
103
+ * How a contributor's ratings of other notes went.
104
+ */
105
+ interface RatingsCount {
146
106
  /**
147
- * The post the note is on. Null when X no longer shows it.
107
+ * Ratings on notes that need more ratings.
148
108
  */
149
- post?: Shared.SearchTweet | null;
109
+ awaitingMoreRatings?: number;
150
110
  /**
151
- * ID of the post the note is on.
111
+ * Ratings made after X rated the note.
152
112
  */
153
- postId?: string;
113
+ ratedAfterDecision?: number;
154
114
  /**
155
- * Why X shows no post, when X says.
115
+ * Ratings that matched the rating X gave the note.
156
116
  */
157
- postUnavailable?: Note.PostUnavailable;
117
+ successful?: CommunityNotesRatingOutcome;
158
118
  /**
159
- * X's current rating, such as NeedsMoreRatings, CurrentlyRatedHelpful or
160
- * CurrentlyRatedNotHelpful. x.com shows only helpful notes under posts.
119
+ * Ratings that went against the rating X gave the note.
161
120
  */
162
- ratingStatus?: string;
121
+ unsuccessful?: CommunityNotesRatingOutcome;
163
122
  /**
164
- * What the note says.
123
+ * When X last counted the ratings.
165
124
  */
166
- text?: string;
167
- /**
168
- * Milliseconds from the note's creation to its helpful rating.
169
- */
170
- timeToHelpfulFromNoteMs?: number;
171
- /**
172
- * Milliseconds from the post's creation to the note's helpful rating.
173
- */
174
- timeToHelpfulFromPostMs?: number;
175
- /**
176
- * X's notice in place of a deleted note.
177
- */
178
- tombstone?: string;
179
- }
180
- namespace Note {
181
- /**
182
- * The note's writer, with the counts X sends beside a note. GET
183
- * /x/community-notes/contributors/{alias} serves every count.
184
- */
185
- interface Contributor {
186
- /**
187
- * The alias X gives the contributor.
188
- */
189
- alias: string;
190
- /**
191
- * Notes the contributor deleted.
192
- */
193
- deletedNotesCount?: number;
194
- /**
195
- * Whether the contributor writes notes through X's API.
196
- */
197
- isApiContributor?: boolean;
198
- /**
199
- * Whether X marks the contributor as a top writer.
200
- */
201
- isTopWriter?: boolean;
202
- /**
203
- * How many notes a contributor wrote, by X's current rating.
204
- */
205
- notesCount?: Contributor.NotesCount;
206
- /**
207
- * How a contributor's ratings of other notes went.
208
- */
209
- ratingsCount?: Contributor.RatingsCount;
210
- }
211
- namespace Contributor {
212
- /**
213
- * How many notes a contributor wrote, by X's current rating.
214
- */
215
- interface NotesCount {
216
- /**
217
- * Notes that need more ratings.
218
- */
219
- awaitingMoreRatings?: number;
220
- /**
221
- * Notes X rates helpful now.
222
- */
223
- currentlyRatedHelpful?: number;
224
- /**
225
- * Notes X rates not helpful now.
226
- */
227
- currentlyRatedNotHelpful?: number;
228
- /**
229
- * When X last counted the notes.
230
- */
231
- updatedAt?: string;
232
- }
233
- /**
234
- * How a contributor's ratings of other notes went.
235
- */
236
- interface RatingsCount {
237
- /**
238
- * Ratings on notes that need more ratings.
239
- */
240
- awaitingMoreRatings?: number;
241
- /**
242
- * Ratings made after X rated the note.
243
- */
244
- ratedAfterDecision?: number;
245
- /**
246
- * Ratings that matched the rating X gave the note.
247
- */
248
- successful?: RatingsCount.Successful;
249
- /**
250
- * Ratings that went against the rating X gave the note.
251
- */
252
- unsuccessful?: RatingsCount.Unsuccessful;
253
- /**
254
- * When X last counted the ratings.
255
- */
256
- updatedAt?: string;
257
- }
258
- namespace RatingsCount {
259
- /**
260
- * Ratings that matched the rating X gave the note.
261
- */
262
- interface Successful {
263
- /**
264
- * Ratings that called a note helpful.
265
- */
266
- helpfulCount?: number;
267
- /**
268
- * Ratings that called a note not helpful.
269
- */
270
- notHelpfulCount?: number;
271
- /**
272
- * All ratings in the group, when X sends the sum.
273
- */
274
- total?: number;
275
- }
276
- /**
277
- * Ratings that went against the rating X gave the note.
278
- */
279
- interface Unsuccessful {
280
- /**
281
- * Ratings that called a note helpful.
282
- */
283
- helpfulCount?: number;
284
- /**
285
- * Ratings that called a note not helpful.
286
- */
287
- notHelpfulCount?: number;
288
- /**
289
- * All ratings in the group, when X sends the sum.
290
- */
291
- total?: number;
292
- }
293
- }
294
- }
295
- /**
296
- * A link, tag or account inside a note's text.
297
- */
298
- interface Entity {
299
- /**
300
- * Where it starts in the text.
301
- */
302
- fromIndex?: number;
303
- /**
304
- * What it points at.
305
- */
306
- ref?: Entity.Ref;
307
- /**
308
- * Where it ends in the text.
309
- */
310
- toIndex?: number;
311
- }
312
- namespace Entity {
313
- /**
314
- * What it points at.
315
- */
316
- interface Ref {
317
- /**
318
- * A mentioned account's username.
319
- */
320
- screenName?: string;
321
- /**
322
- * A hashtag's or cashtag's text.
323
- */
324
- text?: string;
325
- /**
326
- * X's kind, such as TimelineUrl.
327
- */
328
- type?: string;
329
- /**
330
- * The link.
331
- */
332
- url?: string;
333
- /**
334
- * How X opens the link, such as ExternalUrl.
335
- */
336
- urlType?: string;
337
- }
338
- }
339
- /**
340
- * Why X shows no post, when X says.
341
- */
342
- interface PostUnavailable {
343
- /**
344
- * Why X shows no post, as X names it.
345
- */
346
- reason: string;
347
- }
125
+ updatedAt?: string;
348
126
  }
349
127
  }
128
+ export interface CommunityNotesRatingOutcome {
129
+ /**
130
+ * Ratings that called a note helpful.
131
+ */
132
+ helpfulCount?: number;
133
+ /**
134
+ * Ratings that called a note not helpful.
135
+ */
136
+ notHelpfulCount?: number;
137
+ /**
138
+ * All ratings in the group, when X sends the sum.
139
+ */
140
+ total?: number;
141
+ }
350
142
  /**
351
143
  * 1 page of Community Notes. Follow next_cursor while the response reports more
352
144
  * pages.
353
145
  */
354
- export interface CommunityNoteListContributorNotesResponse {
146
+ export interface PaginatedCommunityNotes {
355
147
  has_next_page: boolean;
356
148
  next_cursor: string;
357
- notes: Array<CommunityNoteListContributorNotesResponse.Note>;
149
+ notes: Array<PaginatedCommunityNotes.Note>;
358
150
  }
359
- export declare namespace CommunityNoteListContributorNotesResponse {
151
+ export declare namespace PaginatedCommunityNotes {
360
152
  /**
361
153
  * A Community Note as its writer's page lists it, with the post it is on. A deleted
362
154
  * note has no text, classification or post. A field X leaves out is left out.
@@ -383,7 +175,7 @@ export declare namespace CommunityNoteListContributorNotesResponse {
383
175
  * The note's writer, with the counts X sends beside a note. GET
384
176
  * /x/community-notes/contributors/{alias} serves every count.
385
177
  */
386
- contributor?: Note.Contributor;
178
+ contributor?: CommunityNotesContributor;
387
179
  /**
388
180
  * When the contributor wrote the note.
389
181
  */
@@ -480,120 +272,6 @@ export declare namespace CommunityNoteListContributorNotesResponse {
480
272
  tombstone?: string;
481
273
  }
482
274
  namespace Note {
483
- /**
484
- * The note's writer, with the counts X sends beside a note. GET
485
- * /x/community-notes/contributors/{alias} serves every count.
486
- */
487
- interface Contributor {
488
- /**
489
- * The alias X gives the contributor.
490
- */
491
- alias: string;
492
- /**
493
- * Notes the contributor deleted.
494
- */
495
- deletedNotesCount?: number;
496
- /**
497
- * Whether the contributor writes notes through X's API.
498
- */
499
- isApiContributor?: boolean;
500
- /**
501
- * Whether X marks the contributor as a top writer.
502
- */
503
- isTopWriter?: boolean;
504
- /**
505
- * How many notes a contributor wrote, by X's current rating.
506
- */
507
- notesCount?: Contributor.NotesCount;
508
- /**
509
- * How a contributor's ratings of other notes went.
510
- */
511
- ratingsCount?: Contributor.RatingsCount;
512
- }
513
- namespace Contributor {
514
- /**
515
- * How many notes a contributor wrote, by X's current rating.
516
- */
517
- interface NotesCount {
518
- /**
519
- * Notes that need more ratings.
520
- */
521
- awaitingMoreRatings?: number;
522
- /**
523
- * Notes X rates helpful now.
524
- */
525
- currentlyRatedHelpful?: number;
526
- /**
527
- * Notes X rates not helpful now.
528
- */
529
- currentlyRatedNotHelpful?: number;
530
- /**
531
- * When X last counted the notes.
532
- */
533
- updatedAt?: string;
534
- }
535
- /**
536
- * How a contributor's ratings of other notes went.
537
- */
538
- interface RatingsCount {
539
- /**
540
- * Ratings on notes that need more ratings.
541
- */
542
- awaitingMoreRatings?: number;
543
- /**
544
- * Ratings made after X rated the note.
545
- */
546
- ratedAfterDecision?: number;
547
- /**
548
- * Ratings that matched the rating X gave the note.
549
- */
550
- successful?: RatingsCount.Successful;
551
- /**
552
- * Ratings that went against the rating X gave the note.
553
- */
554
- unsuccessful?: RatingsCount.Unsuccessful;
555
- /**
556
- * When X last counted the ratings.
557
- */
558
- updatedAt?: string;
559
- }
560
- namespace RatingsCount {
561
- /**
562
- * Ratings that matched the rating X gave the note.
563
- */
564
- interface Successful {
565
- /**
566
- * Ratings that called a note helpful.
567
- */
568
- helpfulCount?: number;
569
- /**
570
- * Ratings that called a note not helpful.
571
- */
572
- notHelpfulCount?: number;
573
- /**
574
- * All ratings in the group, when X sends the sum.
575
- */
576
- total?: number;
577
- }
578
- /**
579
- * Ratings that went against the rating X gave the note.
580
- */
581
- interface Unsuccessful {
582
- /**
583
- * Ratings that called a note helpful.
584
- */
585
- helpfulCount?: number;
586
- /**
587
- * Ratings that called a note not helpful.
588
- */
589
- notHelpfulCount?: number;
590
- /**
591
- * All ratings in the group, when X sends the sum.
592
- */
593
- total?: number;
594
- }
595
- }
596
- }
597
275
  /**
598
276
  * A link, tag or account inside a note's text.
599
277
  */
@@ -649,128 +327,62 @@ export declare namespace CommunityNoteListContributorNotesResponse {
649
327
  }
650
328
  }
651
329
  }
330
+ export type CommunityNoteListContributorDeletedNotesResponse = CommunityNotesAPI.PaginatedCommunityNotes;
331
+ export declare namespace CommunityNoteListContributorDeletedNotesResponse {
332
+ type Note = CommunityNotesAPI.PaginatedCommunityNotes.Note;
333
+ namespace Note {
334
+ type Contributor = CommunityNotesAPI.CommunityNotesContributor;
335
+ namespace Contributor {
336
+ type NotesCount = CommunityNotesAPI.CommunityNotesContributor.NotesCount;
337
+ type RatingsCount = CommunityNotesAPI.CommunityNotesContributor.RatingsCount;
338
+ namespace RatingsCount {
339
+ type Successful = CommunityNotesAPI.CommunityNotesRatingOutcome;
340
+ type Unsuccessful = CommunityNotesAPI.CommunityNotesRatingOutcome;
341
+ }
342
+ }
343
+ type Entity = CommunityNotesAPI.PaginatedCommunityNotes.Note.Entity;
344
+ namespace Entity {
345
+ type Ref = CommunityNotesAPI.PaginatedCommunityNotes.Note.Entity.Ref;
346
+ }
347
+ type PostUnavailable = CommunityNotesAPI.PaginatedCommunityNotes.Note.PostUnavailable;
348
+ }
349
+ }
350
+ export type CommunityNoteListContributorNotesResponse = CommunityNotesAPI.PaginatedCommunityNotes;
351
+ export declare namespace CommunityNoteListContributorNotesResponse {
352
+ type Note = CommunityNotesAPI.PaginatedCommunityNotes.Note;
353
+ namespace Note {
354
+ type Contributor = CommunityNotesAPI.CommunityNotesContributor;
355
+ namespace Contributor {
356
+ type NotesCount = CommunityNotesAPI.CommunityNotesContributor.NotesCount;
357
+ type RatingsCount = CommunityNotesAPI.CommunityNotesContributor.RatingsCount;
358
+ namespace RatingsCount {
359
+ type Successful = CommunityNotesAPI.CommunityNotesRatingOutcome;
360
+ type Unsuccessful = CommunityNotesAPI.CommunityNotesRatingOutcome;
361
+ }
362
+ }
363
+ type Entity = CommunityNotesAPI.PaginatedCommunityNotes.Note.Entity;
364
+ namespace Entity {
365
+ type Ref = CommunityNotesAPI.PaginatedCommunityNotes.Note.Entity.Ref;
366
+ }
367
+ type PostUnavailable = CommunityNotesAPI.PaginatedCommunityNotes.Note.PostUnavailable;
368
+ }
369
+ }
652
370
  export interface CommunityNoteRetrieveContributorResponse {
653
371
  /**
654
372
  * A Community Notes contributor. X names contributors by an alias, never by their
655
373
  * X account. A field X leaves out is left out. Beside a note, X sends its writer
656
374
  * with only some of the counts.
657
375
  */
658
- contributor: CommunityNoteRetrieveContributorResponse.Contributor;
376
+ contributor: CommunityNotesContributor;
659
377
  }
660
378
  export declare namespace CommunityNoteRetrieveContributorResponse {
661
- /**
662
- * A Community Notes contributor. X names contributors by an alias, never by their
663
- * X account. A field X leaves out is left out. Beside a note, X sends its writer
664
- * with only some of the counts.
665
- */
666
- interface Contributor {
667
- /**
668
- * The alias X gives the contributor.
669
- */
670
- alias: string;
671
- /**
672
- * Notes the contributor deleted.
673
- */
674
- deletedNotesCount?: number;
675
- /**
676
- * Whether the contributor writes notes through X's API.
677
- */
678
- isApiContributor?: boolean;
679
- /**
680
- * Whether X marks the contributor as a top writer.
681
- */
682
- isTopWriter?: boolean;
683
- /**
684
- * How many notes a contributor wrote, by X's current rating.
685
- */
686
- notesCount?: Contributor.NotesCount;
687
- /**
688
- * How a contributor's ratings of other notes went.
689
- */
690
- ratingsCount?: Contributor.RatingsCount;
691
- }
379
+ type Contributor = CommunityNotesAPI.CommunityNotesContributor;
692
380
  namespace Contributor {
693
- /**
694
- * How many notes a contributor wrote, by X's current rating.
695
- */
696
- interface NotesCount {
697
- /**
698
- * Notes that need more ratings.
699
- */
700
- awaitingMoreRatings?: number;
701
- /**
702
- * Notes X rates helpful now.
703
- */
704
- currentlyRatedHelpful?: number;
705
- /**
706
- * Notes X rates not helpful now.
707
- */
708
- currentlyRatedNotHelpful?: number;
709
- /**
710
- * When X last counted the notes.
711
- */
712
- updatedAt?: string;
713
- }
714
- /**
715
- * How a contributor's ratings of other notes went.
716
- */
717
- interface RatingsCount {
718
- /**
719
- * Ratings on notes that need more ratings.
720
- */
721
- awaitingMoreRatings?: number;
722
- /**
723
- * Ratings made after X rated the note.
724
- */
725
- ratedAfterDecision?: number;
726
- /**
727
- * Ratings that matched the rating X gave the note.
728
- */
729
- successful?: RatingsCount.Successful;
730
- /**
731
- * Ratings that went against the rating X gave the note.
732
- */
733
- unsuccessful?: RatingsCount.Unsuccessful;
734
- /**
735
- * When X last counted the ratings.
736
- */
737
- updatedAt?: string;
738
- }
381
+ type NotesCount = CommunityNotesAPI.CommunityNotesContributor.NotesCount;
382
+ type RatingsCount = CommunityNotesAPI.CommunityNotesContributor.RatingsCount;
739
383
  namespace RatingsCount {
740
- /**
741
- * Ratings that matched the rating X gave the note.
742
- */
743
- interface Successful {
744
- /**
745
- * Ratings that called a note helpful.
746
- */
747
- helpfulCount?: number;
748
- /**
749
- * Ratings that called a note not helpful.
750
- */
751
- notHelpfulCount?: number;
752
- /**
753
- * All ratings in the group, when X sends the sum.
754
- */
755
- total?: number;
756
- }
757
- /**
758
- * Ratings that went against the rating X gave the note.
759
- */
760
- interface Unsuccessful {
761
- /**
762
- * Ratings that called a note helpful.
763
- */
764
- helpfulCount?: number;
765
- /**
766
- * Ratings that called a note not helpful.
767
- */
768
- notHelpfulCount?: number;
769
- /**
770
- * All ratings in the group, when X sends the sum.
771
- */
772
- total?: number;
773
- }
384
+ type Successful = CommunityNotesAPI.CommunityNotesRatingOutcome;
385
+ type Unsuccessful = CommunityNotesAPI.CommunityNotesRatingOutcome;
774
386
  }
775
387
  }
776
388
  }
@@ -845,6 +457,6 @@ export interface CommunityNoteRetrieveContributorParams {
845
457
  omit?: string;
846
458
  }
847
459
  export declare namespace CommunityNotes {
848
- export { type CommunityNoteListContributorDeletedNotesResponse as CommunityNoteListContributorDeletedNotesResponse, type CommunityNoteListContributorNotesResponse as CommunityNoteListContributorNotesResponse, type CommunityNoteRetrieveContributorResponse as CommunityNoteRetrieveContributorResponse, type CommunityNoteListContributorDeletedNotesParams as CommunityNoteListContributorDeletedNotesParams, type CommunityNoteListContributorNotesParams as CommunityNoteListContributorNotesParams, type CommunityNoteRetrieveContributorParams as CommunityNoteRetrieveContributorParams, };
460
+ export { type CommunityNotesContributor as CommunityNotesContributor, type CommunityNotesRatingOutcome as CommunityNotesRatingOutcome, type PaginatedCommunityNotes as PaginatedCommunityNotes, type CommunityNoteListContributorDeletedNotesResponse as CommunityNoteListContributorDeletedNotesResponse, type CommunityNoteListContributorNotesResponse as CommunityNoteListContributorNotesResponse, type CommunityNoteRetrieveContributorResponse as CommunityNoteRetrieveContributorResponse, type CommunityNoteListContributorDeletedNotesParams as CommunityNoteListContributorDeletedNotesParams, type CommunityNoteListContributorNotesParams as CommunityNoteListContributorNotesParams, type CommunityNoteRetrieveContributorParams as CommunityNoteRetrieveContributorParams, };
849
461
  }
850
462
  //# sourceMappingURL=community-notes.d.ts.map