x-twitter-scraper 0.16.0 → 0.18.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 (198) hide show
  1. package/CHANGELOG.md +44 -5
  2. package/README.md +1 -0
  3. package/client.d.mts +8 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +8 -2
  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/package.json +1 -1
  18. package/resources/events.d.mts +50 -11
  19. package/resources/events.d.mts.map +1 -1
  20. package/resources/events.d.ts +50 -11
  21. package/resources/events.d.ts.map +1 -1
  22. package/resources/events.js.map +1 -1
  23. package/resources/events.mjs.map +1 -1
  24. package/resources/index.d.mts +1 -1
  25. package/resources/index.d.mts.map +1 -1
  26. package/resources/index.d.ts +1 -1
  27. package/resources/index.d.ts.map +1 -1
  28. package/resources/index.js.map +1 -1
  29. package/resources/index.mjs.map +1 -1
  30. package/resources/monitors/index.d.mts +2 -1
  31. package/resources/monitors/index.d.mts.map +1 -1
  32. package/resources/monitors/index.d.ts +2 -1
  33. package/resources/monitors/index.d.ts.map +1 -1
  34. package/resources/monitors/index.js +3 -1
  35. package/resources/monitors/index.js.map +1 -1
  36. package/resources/monitors/index.mjs +1 -0
  37. package/resources/monitors/index.mjs.map +1 -1
  38. package/resources/monitors/keywords.d.mts +10 -96
  39. package/resources/monitors/keywords.d.mts.map +1 -1
  40. package/resources/monitors/keywords.d.ts +10 -96
  41. package/resources/monitors/keywords.d.ts.map +1 -1
  42. package/resources/monitors/monitors.d.mts +6 -2
  43. package/resources/monitors/monitors.d.mts.map +1 -1
  44. package/resources/monitors/monitors.d.ts +6 -2
  45. package/resources/monitors/monitors.d.ts.map +1 -1
  46. package/resources/monitors/monitors.js +4 -0
  47. package/resources/monitors/monitors.js.map +1 -1
  48. package/resources/monitors/monitors.mjs +4 -0
  49. package/resources/monitors/monitors.mjs.map +1 -1
  50. package/resources/monitors/posts.d.mts +344 -0
  51. package/resources/monitors/posts.d.mts.map +1 -0
  52. package/resources/monitors/posts.d.ts +344 -0
  53. package/resources/monitors/posts.d.ts.map +1 -0
  54. package/resources/monitors/posts.js +94 -0
  55. package/resources/monitors/posts.js.map +1 -0
  56. package/resources/monitors/posts.mjs +90 -0
  57. package/resources/monitors/posts.mjs.map +1 -0
  58. package/resources/shared.d.mts +577 -2
  59. package/resources/shared.d.mts.map +1 -1
  60. package/resources/shared.d.ts +577 -2
  61. package/resources/shared.d.ts.map +1 -1
  62. package/resources/support/index.d.mts +1 -1
  63. package/resources/support/index.d.mts.map +1 -1
  64. package/resources/support/index.d.ts +1 -1
  65. package/resources/support/index.d.ts.map +1 -1
  66. package/resources/support/index.js.map +1 -1
  67. package/resources/support/index.mjs.map +1 -1
  68. package/resources/support/support.d.mts +2 -2
  69. package/resources/support/support.d.mts.map +1 -1
  70. package/resources/support/support.d.ts +2 -2
  71. package/resources/support/support.d.ts.map +1 -1
  72. package/resources/support/support.js.map +1 -1
  73. package/resources/support/support.mjs.map +1 -1
  74. package/resources/support/tickets.d.mts +12 -20
  75. package/resources/support/tickets.d.mts.map +1 -1
  76. package/resources/support/tickets.d.ts +12 -20
  77. package/resources/support/tickets.d.ts.map +1 -1
  78. package/resources/webhooks.d.mts +5 -4
  79. package/resources/webhooks.d.mts.map +1 -1
  80. package/resources/webhooks.d.ts +5 -4
  81. package/resources/webhooks.d.ts.map +1 -1
  82. package/resources/webhooks.js.map +1 -1
  83. package/resources/webhooks.mjs.map +1 -1
  84. package/resources/x/accounts.d.mts +14 -4
  85. package/resources/x/accounts.d.mts.map +1 -1
  86. package/resources/x/accounts.d.ts +14 -4
  87. package/resources/x/accounts.d.ts.map +1 -1
  88. package/resources/x/accounts.js +6 -4
  89. package/resources/x/accounts.js.map +1 -1
  90. package/resources/x/accounts.mjs +6 -4
  91. package/resources/x/accounts.mjs.map +1 -1
  92. package/resources/x/broadcasts.d.mts +3 -131
  93. package/resources/x/broadcasts.d.mts.map +1 -1
  94. package/resources/x/broadcasts.d.ts +3 -131
  95. package/resources/x/broadcasts.d.ts.map +1 -1
  96. package/resources/x/communities/communities.d.mts +92 -1
  97. package/resources/x/communities/communities.d.mts.map +1 -1
  98. package/resources/x/communities/communities.d.ts +92 -1
  99. package/resources/x/communities/communities.d.ts.map +1 -1
  100. package/resources/x/communities/communities.js +14 -0
  101. package/resources/x/communities/communities.js.map +1 -1
  102. package/resources/x/communities/communities.mjs +14 -0
  103. package/resources/x/communities/communities.mjs.map +1 -1
  104. package/resources/x/communities/index.d.mts +1 -1
  105. package/resources/x/communities/index.d.mts.map +1 -1
  106. package/resources/x/communities/index.d.ts +1 -1
  107. package/resources/x/communities/index.d.ts.map +1 -1
  108. package/resources/x/communities/index.js.map +1 -1
  109. package/resources/x/communities/index.mjs.map +1 -1
  110. package/resources/x/community-notes.d.mts +122 -510
  111. package/resources/x/community-notes.d.mts.map +1 -1
  112. package/resources/x/community-notes.d.ts +122 -510
  113. package/resources/x/community-notes.d.ts.map +1 -1
  114. package/resources/x/community-notes.js.map +1 -1
  115. package/resources/x/community-notes.mjs.map +1 -1
  116. package/resources/x/index.d.mts +7 -6
  117. package/resources/x/index.d.mts.map +1 -1
  118. package/resources/x/index.d.ts +7 -6
  119. package/resources/x/index.d.ts.map +1 -1
  120. package/resources/x/index.js +3 -1
  121. package/resources/x/index.js.map +1 -1
  122. package/resources/x/index.mjs +1 -0
  123. package/resources/x/index.mjs.map +1 -1
  124. package/resources/x/jobs.d.mts +144 -291
  125. package/resources/x/jobs.d.mts.map +1 -1
  126. package/resources/x/jobs.d.ts +144 -291
  127. package/resources/x/jobs.d.ts.map +1 -1
  128. package/resources/x/jobs.js.map +1 -1
  129. package/resources/x/jobs.mjs.map +1 -1
  130. package/resources/x/lists.d.mts +21 -419
  131. package/resources/x/lists.d.mts.map +1 -1
  132. package/resources/x/lists.d.ts +21 -419
  133. package/resources/x/lists.d.ts.map +1 -1
  134. package/resources/x/spaces.d.mts +213 -693
  135. package/resources/x/spaces.d.mts.map +1 -1
  136. package/resources/x/spaces.d.ts +213 -693
  137. package/resources/x/spaces.d.ts.map +1 -1
  138. package/resources/x/spaces.js.map +1 -1
  139. package/resources/x/spaces.mjs.map +1 -1
  140. package/resources/x/sports.d.mts +1512 -0
  141. package/resources/x/sports.d.mts.map +1 -0
  142. package/resources/x/sports.d.ts +1512 -0
  143. package/resources/x/sports.d.ts.map +1 -0
  144. package/resources/x/sports.js +91 -0
  145. package/resources/x/sports.js.map +1 -0
  146. package/resources/x/sports.mjs +87 -0
  147. package/resources/x/sports.mjs.map +1 -0
  148. package/resources/x/tweets/tweets.d.mts +11 -13
  149. package/resources/x/tweets/tweets.d.mts.map +1 -1
  150. package/resources/x/tweets/tweets.d.ts +11 -13
  151. package/resources/x/tweets/tweets.d.ts.map +1 -1
  152. package/resources/x/users/users.d.mts +29 -585
  153. package/resources/x/users/users.d.mts.map +1 -1
  154. package/resources/x/users/users.d.ts +29 -585
  155. package/resources/x/users/users.d.ts.map +1 -1
  156. package/resources/x/users/users.js.map +1 -1
  157. package/resources/x/users/users.mjs.map +1 -1
  158. package/resources/x/x.d.mts +55 -118
  159. package/resources/x/x.d.mts.map +1 -1
  160. package/resources/x/x.d.ts +55 -118
  161. package/resources/x/x.d.ts.map +1 -1
  162. package/resources/x/x.js +4 -0
  163. package/resources/x/x.js.map +1 -1
  164. package/resources/x/x.mjs +4 -0
  165. package/resources/x/x.mjs.map +1 -1
  166. package/skills/x-twitter-scraper/references/api-endpoints-x-api.md +1 -0
  167. package/src/client.ts +8 -0
  168. package/src/internal/detect-platform.ts +2 -2
  169. package/src/resources/events.ts +72 -10
  170. package/src/resources/index.ts +1 -0
  171. package/src/resources/monitors/index.ts +21 -0
  172. package/src/resources/monitors/keywords.ts +10 -118
  173. package/src/resources/monitors/monitors.ts +46 -0
  174. package/src/resources/monitors/posts.ts +463 -0
  175. package/src/resources/shared.ts +773 -200
  176. package/src/resources/support/index.ts +1 -0
  177. package/src/resources/support/support.ts +2 -0
  178. package/src/resources/support/tickets.ts +14 -21
  179. package/src/resources/webhooks.ts +5 -4
  180. package/src/resources/x/accounts.ts +19 -4
  181. package/src/resources/x/broadcasts.ts +3 -159
  182. package/src/resources/x/communities/communities.ts +113 -0
  183. package/src/resources/x/communities/index.ts +3 -0
  184. package/src/resources/x/community-notes.ts +137 -582
  185. package/src/resources/x/index.ts +70 -0
  186. package/src/resources/x/jobs.ts +160 -334
  187. package/src/resources/x/lists.ts +21 -493
  188. package/src/resources/x/spaces.ts +227 -817
  189. package/src/resources/x/sports.ts +1877 -0
  190. package/src/resources/x/tweets/tweets.ts +15 -15
  191. package/src/resources/x/users/users.ts +29 -693
  192. package/src/resources/x/x.ts +191 -128
  193. package/src/version.ts +1 -1
  194. package/version.d.mts +1 -1
  195. package/version.d.ts +1 -1
  196. package/version.js +1 -1
  197. package/version.mjs +1 -1
  198. package/src/lib/.keep +0 -2
package/resources/x/x.mjs CHANGED
@@ -28,6 +28,8 @@ import * as MediaAPI from "./media.mjs";
28
28
  import { Media, } from "./media.mjs";
29
29
  import * as ProfileAPI from "./profile.mjs";
30
30
  import { Profile, } from "./profile.mjs";
31
+ import * as SportsAPI from "./sports.mjs";
32
+ import { Sports, } from "./sports.mjs";
31
33
  import * as SpacesAPI from "./spaces.mjs";
32
34
  import { Spaces, } from "./spaces.mjs";
33
35
  import * as WriteActionsAPI from "./write-actions.mjs";
@@ -60,6 +62,7 @@ export class X extends APIResource {
60
62
  this.broadcasts = new BroadcastsAPI.Broadcasts(this._client);
61
63
  this.communityNotes = new CommunityNotesAPI.CommunityNotes(this._client);
62
64
  this.spaces = new SpacesAPI.Spaces(this._client);
65
+ this.sports = new SportsAPI.Sports(this._client);
63
66
  }
64
67
  /**
65
68
  * Returns the accounts, topics, hashtags & cashtags X suggests while someone types
@@ -218,4 +221,5 @@ X.Lists = Lists;
218
221
  X.Broadcasts = Broadcasts;
219
222
  X.CommunityNotes = CommunityNotes;
220
223
  X.Spaces = Spaces;
224
+ X.Sports = Sports;
221
225
  //# sourceMappingURL=x.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"x.mjs","sourceRoot":"","sources":["../../src/resources/x/x.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,4BAA4B,0CAAsC;AAC9E,OAAO,EAEL,yBAAyB,GAC1B,0CAAsC;AACvC,OAAO,KAAK,8BAA8B,4CAAwC;AAClF,OAAO,EAGL,2BAA2B,GAC5B,4CAAwC;AACzC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EASL,QAAQ,GAGT,uBAAmB;AACpB,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EACL,QAAQ,GAaT,uBAAmB;AACpB,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAIL,SAAS,GACV,wBAAoB;AACrB,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAAO,EAAsD,UAAU,EAAE,yBAAqB;AAC9F,OAAO,KAAK,iBAAiB,8BAA0B;AACvD,OAAO,EAOL,cAAc,GACf,8BAA0B;AAC3B,OAAO,KAAK,KAAK,iBAAa;AAC9B,OAAO,EACL,EAAE,GAOH,iBAAa;AACd,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAA8C,SAAS,EAAE,wBAAoB;AACpF,OAAO,KAAK,OAAO,mBAAe;AAClC,OAAO,EAOL,IAAI,GACL,mBAAe;AAChB,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAUL,KAAK,G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AE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AAk0CD,CAAC,CAAC,YAAY,GAAG,YAAY,CAAC;AAC9B,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACtB,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;AAClB,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;AAChB,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC;AACxB,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;AACd,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;AACV,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;AAChB,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC;AACpB,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC;AAC5B,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACtB,CAAC,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AAC5D,CAAC,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;AACxD,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC;AACxB,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;AAChB,CAAC,CAAC,UAAU,GAAG,UAAU,CAAC;AAC1B,CAAC,CAAC,cAAc,GAAG,cAAc,CAAC;AAClC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;AAClB,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC"}
@@ -157,6 +157,7 @@ Read list followers, members, or list timeline tweets by list ID.
157
157
  ```
158
158
  GET /x/communities/search
159
159
  GET /x/communities/tweets
160
+ GET /x/communities/{id}/analytics
160
161
  GET /x/communities/{id}/info
161
162
  GET /x/communities/{id}/members
162
163
  GET /x/communities/{id}/moderators
package/src/client.ts CHANGED
@@ -138,6 +138,7 @@ import {
138
138
  } from './resources/monitors/monitors';
139
139
  import { Support } from './resources/support/support';
140
140
  import {
141
+ TrendLocation,
141
142
  X,
142
143
  XAutocompleteSearchParams,
143
144
  XAutocompleteSearchResponse,
@@ -1076,6 +1077,7 @@ export declare namespace XTwitterScraper {
1076
1077
 
1077
1078
  export {
1078
1079
  X as X,
1080
+ type TrendLocation as TrendLocation,
1079
1081
  type XAutocompleteSearchResponse as XAutocompleteSearchResponse,
1080
1082
  type XGetArticleResponse as XGetArticleResponse,
1081
1083
  type XGetHashflagsResponse as XGetHashflagsResponse,
@@ -1125,6 +1127,7 @@ export declare namespace XTwitterScraper {
1125
1127
  type GuestWalletTopupParams as GuestWalletTopupParams,
1126
1128
  };
1127
1129
 
1130
+ export type Broadcast = API.Broadcast;
1128
1131
  export type Community = API.Community;
1129
1132
  export type CommunityPage = API.CommunityPage;
1130
1133
  export type CommunityTopic = API.CommunityTopic;
@@ -1133,10 +1136,15 @@ export declare namespace XTwitterScraper {
1133
1136
  export type Error = API.Error;
1134
1137
  export type EventType = API.EventType;
1135
1138
  export type MonitorFollow = API.MonitorFollow;
1139
+ export type PaginatedLists = API.PaginatedLists;
1136
1140
  export type PaginatedTweets = API.PaginatedTweets;
1141
+ export type PaginatedUserIds = API.PaginatedUserIds;
1137
1142
  export type PaginatedUsers = API.PaginatedUsers;
1138
1143
  export type SearchTweet = API.SearchTweet;
1144
+ export type SoftIntervention = API.SoftIntervention;
1139
1145
  export type TweetMedia = API.TweetMedia;
1140
1146
  export type UserListPage = API.UserListPage;
1141
1147
  export type UserProfile = API.UserProfile;
1148
+ export type XList = API.XList;
1149
+ export type XListBanner = API.XListBanner;
1142
1150
  }
@@ -163,7 +163,7 @@ const normalizePlatform = (platform: string): PlatformName => {
163
163
  return 'Unknown';
164
164
  };
165
165
 
166
- let _platformHeaders: PlatformProperties;
166
+ let _platformHeaders: { 'X-Xquik-SDK': 'js' } & PlatformProperties;
167
167
  export const getPlatformHeaders = () => {
168
- return (_platformHeaders ??= getPlatformProperties());
168
+ return (_platformHeaders ??= { 'X-Xquik-SDK': 'js', ...getPlatformProperties() });
169
169
  };
@@ -4,6 +4,7 @@
4
4
 
5
5
  import { APIResource } from '../core/resource';
6
6
  import * as Shared from './shared';
7
+ import * as PostsAPI from './monitors/posts';
7
8
  import { APIPromise } from '../core/api-promise';
8
9
  import { Stream } from '../core/streaming';
9
10
  import { buildHeaders } from '../internal/headers';
@@ -76,7 +77,14 @@ export interface Event {
76
77
  /**
77
78
  * Post fields match REST. Legacy fields remain available.
78
79
  */
79
- data: Event.MonitorPost | Event.MonitorProfileChange | Shared.MonitorFollow | Event.MonitorLegacyPost;
80
+ data:
81
+ | Event.MonitorPost
82
+ | Event.MonitorProfileChange
83
+ | Shared.MonitorFollow
84
+ | PostsAPI.MonitorPostMetricChange
85
+ | PostsAPI.MonitorPostEdit
86
+ | PostsAPI.MonitorPostDeleted
87
+ | Event.MonitorLegacyPost;
80
88
 
81
89
  /**
82
90
  * Account monitor ID for account events, or keyword monitor ID for keyword events.
@@ -86,7 +94,7 @@ export interface Event {
86
94
  /**
87
95
  * Source monitor type.
88
96
  */
89
- monitorType: 'account' | 'keyword';
97
+ monitorType: 'account' | 'keyword' | 'post';
90
98
 
91
99
  occurredAt: string;
92
100
 
@@ -106,7 +114,17 @@ export interface Event {
106
114
  * rise once no read for a minute showed less. Keyword monitors take the 10 post
107
115
  * types only.
108
116
  */
109
- type: Shared.EventType;
117
+ type: Shared.EventType | PostsAPI.PostEventType;
118
+
119
+ /**
120
+ * Permanent X user ID of the monitored post's author, present for post events.
121
+ */
122
+ authorId?: string;
123
+
124
+ /**
125
+ * Username of the monitored post's author, present for post events.
126
+ */
127
+ authorUsername?: string;
110
128
 
111
129
  /**
112
130
  * Keyword monitor ID, present for keyword monitor events.
@@ -119,6 +137,16 @@ export interface Event {
119
137
  */
120
138
  monitorName?: string;
121
139
 
140
+ /**
141
+ * ID of the monitored post, present for post events.
142
+ */
143
+ postId?: string;
144
+
145
+ /**
146
+ * Link to the monitored post, present for post events.
147
+ */
148
+ postUrl?: string;
149
+
122
150
  /**
123
151
  * Keyword query, present for keyword monitor events.
124
152
  */
@@ -362,6 +390,12 @@ export namespace Event {
362
390
  */
363
391
  scopes?: { [key: string]: unknown };
364
392
 
393
+ /**
394
+ * The label X shows under a post whose reach it limits. It links to the page that
395
+ * explains it.
396
+ */
397
+ softIntervention?: Shared.SoftIntervention;
398
+
365
399
  /**
366
400
  * The app the post was sent from, as X labels it. X sends it for some posts only.
367
401
  */
@@ -397,6 +431,13 @@ export namespace Event {
397
431
  */
398
432
  unavailableAuthorId?: string;
399
433
 
434
+ /**
435
+ * X did not send these counts, so each 0 means unknown.
436
+ */
437
+ unknownCounts?: Array<
438
+ 'retweetCount' | 'replyCount' | 'likeCount' | 'quoteCount' | 'viewCount' | 'bookmarkCount'
439
+ >;
440
+
400
441
  /**
401
442
  * User IDs that left this conversation.
402
443
  */
@@ -1348,7 +1389,7 @@ export namespace Event {
1348
1389
  /**
1349
1390
  * Embedded post with public fields and legacy profile aliases.
1350
1391
  */
1351
- export interface QuotedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
1392
+ export interface QuotedTweet extends Shared.EmbeddedTweet {
1352
1393
  /**
1353
1394
  * Public profile with retained legacy monitor fields.
1354
1395
  */
@@ -1432,7 +1473,7 @@ export namespace Event {
1432
1473
  /**
1433
1474
  * Embedded post with public fields and legacy profile aliases.
1434
1475
  */
1435
- export interface RetweetedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
1476
+ export interface RetweetedTweet extends Shared.EmbeddedTweet {
1436
1477
  /**
1437
1478
  * Public profile with retained legacy monitor fields.
1438
1479
  */
@@ -1700,6 +1741,9 @@ export interface EventDetail {
1700
1741
  | EventDetail.MonitorPost
1701
1742
  | EventDetail.MonitorProfileChange
1702
1743
  | Shared.MonitorFollow
1744
+ | PostsAPI.MonitorPostMetricChange
1745
+ | PostsAPI.MonitorPostEdit
1746
+ | PostsAPI.MonitorPostDeleted
1703
1747
  | EventDetail.MonitorLegacyPost;
1704
1748
 
1705
1749
  /**
@@ -1710,7 +1754,7 @@ export interface EventDetail {
1710
1754
  /**
1711
1755
  * Source monitor type for this detailed event.
1712
1756
  */
1713
- monitorType: 'account' | 'keyword';
1757
+ monitorType: 'account' | 'keyword' | 'post';
1714
1758
 
1715
1759
  occurredAt: string;
1716
1760
 
@@ -1730,7 +1774,7 @@ export interface EventDetail {
1730
1774
  * rise once no read for a minute showed less. Keyword monitors take the 10 post
1731
1775
  * types only.
1732
1776
  */
1733
- type: Shared.EventType;
1777
+ type: Shared.EventType | PostsAPI.PostEventType;
1734
1778
 
1735
1779
  /**
1736
1780
  * Keyword monitor ID included on detailed keyword events.
@@ -1988,6 +2032,12 @@ export namespace EventDetail {
1988
2032
  */
1989
2033
  scopes?: { [key: string]: unknown };
1990
2034
 
2035
+ /**
2036
+ * The label X shows under a post whose reach it limits. It links to the page that
2037
+ * explains it.
2038
+ */
2039
+ softIntervention?: Shared.SoftIntervention;
2040
+
1991
2041
  /**
1992
2042
  * The app the post was sent from, as X labels it. X sends it for some posts only.
1993
2043
  */
@@ -2023,6 +2073,13 @@ export namespace EventDetail {
2023
2073
  */
2024
2074
  unavailableAuthorId?: string;
2025
2075
 
2076
+ /**
2077
+ * X did not send these counts, so each 0 means unknown.
2078
+ */
2079
+ unknownCounts?: Array<
2080
+ 'retweetCount' | 'replyCount' | 'likeCount' | 'quoteCount' | 'viewCount' | 'bookmarkCount'
2081
+ >;
2082
+
2026
2083
  /**
2027
2084
  * User IDs that left this conversation.
2028
2085
  */
@@ -2974,7 +3031,7 @@ export namespace EventDetail {
2974
3031
  /**
2975
3032
  * Embedded post with public fields and legacy profile aliases.
2976
3033
  */
2977
- export interface QuotedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
3034
+ export interface QuotedTweet extends Shared.EmbeddedTweet {
2978
3035
  /**
2979
3036
  * Public profile with retained legacy monitor fields.
2980
3037
  */
@@ -3058,7 +3115,7 @@ export namespace EventDetail {
3058
3115
  /**
3059
3116
  * Embedded post with public fields and legacy profile aliases.
3060
3117
  */
3061
- export interface RetweetedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
3118
+ export interface RetweetedTweet extends Shared.EmbeddedTweet {
3062
3119
  /**
3063
3120
  * Public profile with retained legacy monitor fields.
3064
3121
  */
@@ -3331,7 +3388,7 @@ export interface EventListParams {
3331
3388
  /**
3332
3389
  * Filter events by type
3333
3390
  */
3334
- eventType?: Shared.EventType;
3391
+ eventType?: Shared.EventType | PostsAPI.PostEventType;
3335
3392
 
3336
3393
  /**
3337
3394
  * Keyword monitor ID. The keyword_monitor_id alias also works.
@@ -3348,6 +3405,11 @@ export interface EventListParams {
3348
3405
  * Account monitor ID. The monitor_id alias also works.
3349
3406
  */
3350
3407
  monitorId?: string;
3408
+
3409
+ /**
3410
+ * Post monitor ID. The post_monitor_id alias also works.
3411
+ */
3412
+ postMonitorId?: string;
3351
3413
  }
3352
3414
 
3353
3415
  export interface EventStreamParams {
@@ -123,6 +123,7 @@ export {
123
123
  } from './webhooks';
124
124
  export {
125
125
  X,
126
+ type TrendLocation,
126
127
  type XAutocompleteSearchResponse,
127
128
  type XGetArticleResponse,
128
129
  type XGetHashflagsResponse,
@@ -4,6 +4,7 @@
4
4
 
5
5
  export {
6
6
  Keywords,
7
+ type KeywordMonitor,
7
8
  type KeywordCreateResponse,
8
9
  type KeywordRetrieveResponse,
9
10
  type KeywordUpdateResponse,
@@ -23,3 +24,23 @@ export {
23
24
  type MonitorUpdateParams,
24
25
  type MonitorListParams,
25
26
  } from './monitors';
27
+ export {
28
+ Posts,
29
+ type PostEventType,
30
+ type PostMetricReading,
31
+ type PostMetrics,
32
+ type PostMonitor,
33
+ type PostMetricPoint,
34
+ type PostMonitorMetricsBucketMetrics,
35
+ type PostMonitorMetricsBucket,
36
+ type PostMonitorMetrics,
37
+ type MonitorPostMetricChange,
38
+ type MonitorPostEdit,
39
+ type MonitorPostDeleted,
40
+ type PostListResponse,
41
+ type PostDeleteResponse,
42
+ type PostCreateParams,
43
+ type PostUpdateParams,
44
+ type PostListParams,
45
+ type PostRetrieveMetricsParams,
46
+ } from './posts';
@@ -26,7 +26,7 @@ export class Keywords extends APIResource {
26
26
  * });
27
27
  * ```
28
28
  */
29
- create(body: KeywordCreateParams, options?: RequestOptions): APIPromise<KeywordCreateResponse> {
29
+ create(body: KeywordCreateParams, options?: RequestOptions): APIPromise<KeywordMonitor> {
30
30
  return this._client.post('/monitors/keywords', { body, ...options });
31
31
  }
32
32
 
@@ -40,7 +40,7 @@ export class Keywords extends APIResource {
40
40
  * );
41
41
  * ```
42
42
  */
43
- retrieve(id: string, options?: RequestOptions): APIPromise<KeywordRetrieveResponse> {
43
+ retrieve(id: string, options?: RequestOptions): APIPromise<KeywordMonitor> {
44
44
  return this._client.get(path`/monitors/keywords/${id}`, options);
45
45
  }
46
46
 
@@ -59,7 +59,7 @@ export class Keywords extends APIResource {
59
59
  * );
60
60
  * ```
61
61
  */
62
- update(id: string, body: KeywordUpdateParams, options?: RequestOptions): APIPromise<KeywordUpdateResponse> {
62
+ update(id: string, body: KeywordUpdateParams, options?: RequestOptions): APIPromise<KeywordMonitor> {
63
63
  return this._client.patch(path`/monitors/keywords/${id}`, { body, ...options });
64
64
  }
65
65
 
@@ -97,7 +97,7 @@ export class Keywords extends APIResource {
97
97
  /**
98
98
  * Keyword monitor that tracks matching public X activity.
99
99
  */
100
- export interface KeywordCreateResponse {
100
+ export interface KeywordMonitor {
101
101
  id: string;
102
102
 
103
103
  createdAt: string;
@@ -133,88 +133,16 @@ export interface KeywordCreateResponse {
133
133
  pausedReason?: 'insufficient_credits';
134
134
  }
135
135
 
136
- /**
137
- * Keyword monitor that tracks matching public X activity.
138
- */
139
- export interface KeywordRetrieveResponse {
140
- id: string;
141
-
142
- createdAt: string;
143
-
144
- /**
145
- * Array of event types to subscribe to.
146
- */
147
- eventTypes: Array<Shared.EventType>;
148
-
149
- isActive: boolean;
150
-
151
- /**
152
- * Next hourly credit charge time for this keyword query monitor.
153
- */
154
- nextBillingAt: string;
155
-
156
- query: string;
157
-
158
- /**
159
- * Customer-set label of the keyword monitor, when set.
160
- */
161
- name?: string;
162
-
163
- /**
164
- * When Xquik paused this keyword monitor.
165
- */
166
- pausedAt?: string;
167
-
168
- /**
169
- * Why Xquik paused this keyword monitor. The balance could not pay an hour, so add
170
- * credits & resume. Absent when the monitor is active or you paused it yourself.
171
- */
172
- pausedReason?: 'insufficient_credits';
173
- }
174
-
175
- /**
176
- * Keyword monitor that tracks matching public X activity.
177
- */
178
- export interface KeywordUpdateResponse {
179
- id: string;
136
+ export type KeywordCreateResponse = KeywordMonitor;
180
137
 
181
- createdAt: string;
182
-
183
- /**
184
- * Array of event types to subscribe to.
185
- */
186
- eventTypes: Array<Shared.EventType>;
187
-
188
- isActive: boolean;
189
-
190
- /**
191
- * Next hourly credit charge time for this keyword query monitor.
192
- */
193
- nextBillingAt: string;
194
-
195
- query: string;
196
-
197
- /**
198
- * Customer-set label of the keyword monitor, when set.
199
- */
200
- name?: string;
201
-
202
- /**
203
- * When Xquik paused this keyword monitor.
204
- */
205
- pausedAt?: string;
138
+ export type KeywordRetrieveResponse = KeywordMonitor;
206
139
 
207
- /**
208
- * Why Xquik paused this keyword monitor. The balance could not pay an hour, so add
209
- * credits & resume. Absent when the monitor is active or you paused it yourself.
210
- */
211
- pausedReason?: 'insufficient_credits';
212
- }
140
+ export type KeywordUpdateResponse = KeywordMonitor;
213
141
 
214
142
  export interface KeywordListResponse {
215
143
  hasMore: boolean;
216
144
 
217
- monitors: Array<KeywordListResponse.Monitor>;
145
+ monitors: Array<KeywordMonitor>;
218
146
 
219
147
  /**
220
148
  * Keyword monitors on this page.
@@ -225,44 +153,7 @@ export interface KeywordListResponse {
225
153
  }
226
154
 
227
155
  export namespace KeywordListResponse {
228
- /**
229
- * Keyword monitor that tracks matching public X activity.
230
- */
231
- export interface Monitor {
232
- id: string;
233
-
234
- createdAt: string;
235
-
236
- /**
237
- * Array of event types to subscribe to.
238
- */
239
- eventTypes: Array<Shared.EventType>;
240
-
241
- isActive: boolean;
242
-
243
- /**
244
- * Next hourly credit charge time for this keyword query monitor.
245
- */
246
- nextBillingAt: string;
247
-
248
- query: string;
249
-
250
- /**
251
- * Customer-set label of the keyword monitor, when set.
252
- */
253
- name?: string;
254
-
255
- /**
256
- * When Xquik paused this keyword monitor.
257
- */
258
- pausedAt?: string;
259
-
260
- /**
261
- * Why Xquik paused this keyword monitor. The balance could not pay an hour, so add
262
- * credits & resume. Absent when the monitor is active or you paused it yourself.
263
- */
264
- pausedReason?: 'insufficient_credits';
265
- }
156
+ export type Monitor = KeywordMonitor;
266
157
  }
267
158
 
268
159
  export interface KeywordDeactivateResponse {
@@ -323,6 +214,7 @@ export interface KeywordListParams {
323
214
 
324
215
  export declare namespace Keywords {
325
216
  export {
217
+ type KeywordMonitor as KeywordMonitor,
326
218
  type KeywordCreateResponse as KeywordCreateResponse,
327
219
  type KeywordRetrieveResponse as KeywordRetrieveResponse,
328
220
  type KeywordUpdateResponse as KeywordUpdateResponse,
@@ -4,6 +4,27 @@
4
4
 
5
5
  import { APIResource } from '../../core/resource';
6
6
  import * as Shared from '../shared';
7
+ import * as PostsAPI from './posts';
8
+ import {
9
+ PostCreateParams,
10
+ PostDeleteResponse,
11
+ PostEventType,
12
+ PostListParams,
13
+ MonitorPostDeleted,
14
+ MonitorPostEdit,
15
+ MonitorPostMetricChange,
16
+ PostListResponse,
17
+ PostMetricPoint,
18
+ PostMetricReading,
19
+ PostMetrics,
20
+ PostMonitor,
21
+ PostMonitorMetrics,
22
+ PostMonitorMetricsBucket,
23
+ PostMonitorMetricsBucketMetrics,
24
+ PostRetrieveMetricsParams,
25
+ PostUpdateParams,
26
+ Posts,
27
+ } from './posts';
7
28
  import * as KeywordsAPI from './keywords';
8
29
  import {
9
30
  KeywordCreateParams,
@@ -11,6 +32,7 @@ import {
11
32
  KeywordDeactivateResponse,
12
33
  KeywordListParams,
13
34
  KeywordListResponse,
35
+ KeywordMonitor,
14
36
  KeywordRetrieveResponse,
15
37
  KeywordUpdateParams,
16
38
  KeywordUpdateResponse,
@@ -25,6 +47,7 @@ import { path } from '../../internal/utils/path';
25
47
  */
26
48
  export class Monitors extends APIResource {
27
49
  keywords: KeywordsAPI.Keywords = new KeywordsAPI.Keywords(this._client);
50
+ posts: PostsAPI.Posts = new PostsAPI.Posts(this._client);
28
51
 
29
52
  /**
30
53
  * Creates an account monitor, with no count limit. Active monitors check every
@@ -237,6 +260,7 @@ export interface MonitorListParams {
237
260
  }
238
261
 
239
262
  Monitors.Keywords = Keywords;
263
+ Monitors.Posts = Posts;
240
264
 
241
265
  export declare namespace Monitors {
242
266
  export {
@@ -251,6 +275,7 @@ export declare namespace Monitors {
251
275
 
252
276
  export {
253
277
  Keywords as Keywords,
278
+ type KeywordMonitor as KeywordMonitor,
254
279
  type KeywordCreateResponse as KeywordCreateResponse,
255
280
  type KeywordRetrieveResponse as KeywordRetrieveResponse,
256
281
  type KeywordUpdateResponse as KeywordUpdateResponse,
@@ -260,4 +285,25 @@ export declare namespace Monitors {
260
285
  type KeywordUpdateParams as KeywordUpdateParams,
261
286
  type KeywordListParams as KeywordListParams,
262
287
  };
288
+
289
+ export {
290
+ Posts as Posts,
291
+ type PostEventType as PostEventType,
292
+ type PostMetricReading as PostMetricReading,
293
+ type PostMetrics as PostMetrics,
294
+ type PostMonitor as PostMonitor,
295
+ type PostMetricPoint as PostMetricPoint,
296
+ type PostMonitorMetricsBucketMetrics as PostMonitorMetricsBucketMetrics,
297
+ type PostMonitorMetricsBucket as PostMonitorMetricsBucket,
298
+ type PostMonitorMetrics as PostMonitorMetrics,
299
+ type MonitorPostMetricChange as MonitorPostMetricChange,
300
+ type MonitorPostEdit as MonitorPostEdit,
301
+ type MonitorPostDeleted as MonitorPostDeleted,
302
+ type PostListResponse as PostListResponse,
303
+ type PostDeleteResponse as PostDeleteResponse,
304
+ type PostCreateParams as PostCreateParams,
305
+ type PostUpdateParams as PostUpdateParams,
306
+ type PostListParams as PostListParams,
307
+ type PostRetrieveMetricsParams as PostRetrieveMetricsParams,
308
+ };
263
309
  }