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
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,GACN,oBAAgB;AACjB,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EACL,KAAK,GAKN,oBAAgB;AACjB,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EACL,OAAO,GAOR,sBAA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AAC,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
@@ -40,6 +40,7 @@ import {
40
40
  import {
41
41
  Draft,
42
42
  DraftCreateParams,
43
+ DraftCreateResponse,
43
44
  DraftDetail,
44
45
  DraftListParams,
45
46
  DraftListResponse,
@@ -137,6 +138,7 @@ import {
137
138
  } from './resources/monitors/monitors';
138
139
  import { Support } from './resources/support/support';
139
140
  import {
141
+ TrendLocation,
140
142
  X,
141
143
  XAutocompleteSearchParams,
142
144
  XAutocompleteSearchResponse,
@@ -981,6 +983,7 @@ export declare namespace XTwitterScraper {
981
983
  Drafts as Drafts,
982
984
  type Draft as Draft,
983
985
  type DraftDetail as DraftDetail,
986
+ type DraftCreateResponse as DraftCreateResponse,
984
987
  type DraftListResponse as DraftListResponse,
985
988
  type DraftCreateParams as DraftCreateParams,
986
989
  type DraftListParams as DraftListParams,
@@ -1074,6 +1077,7 @@ export declare namespace XTwitterScraper {
1074
1077
 
1075
1078
  export {
1076
1079
  X as X,
1080
+ type TrendLocation as TrendLocation,
1077
1081
  type XAutocompleteSearchResponse as XAutocompleteSearchResponse,
1078
1082
  type XGetArticleResponse as XGetArticleResponse,
1079
1083
  type XGetHashflagsResponse as XGetHashflagsResponse,
@@ -1123,6 +1127,7 @@ export declare namespace XTwitterScraper {
1123
1127
  type GuestWalletTopupParams as GuestWalletTopupParams,
1124
1128
  };
1125
1129
 
1130
+ export type Broadcast = API.Broadcast;
1126
1131
  export type Community = API.Community;
1127
1132
  export type CommunityPage = API.CommunityPage;
1128
1133
  export type CommunityTopic = API.CommunityTopic;
@@ -1130,9 +1135,16 @@ export declare namespace XTwitterScraper {
1130
1135
  export type EmbeddedTweet = API.EmbeddedTweet;
1131
1136
  export type Error = API.Error;
1132
1137
  export type EventType = API.EventType;
1138
+ export type MonitorFollow = API.MonitorFollow;
1139
+ export type PaginatedLists = API.PaginatedLists;
1133
1140
  export type PaginatedTweets = API.PaginatedTweets;
1141
+ export type PaginatedUserIds = API.PaginatedUserIds;
1134
1142
  export type PaginatedUsers = API.PaginatedUsers;
1135
1143
  export type SearchTweet = API.SearchTweet;
1144
+ export type SoftIntervention = API.SoftIntervention;
1136
1145
  export type TweetMedia = API.TweetMedia;
1146
+ export type UserListPage = API.UserListPage;
1137
1147
  export type UserProfile = API.UserProfile;
1148
+ export type XList = API.XList;
1149
+ export type XListBanner = API.XListBanner;
1138
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
  };
@@ -160,7 +160,7 @@ const addFormValue = async (form: FormData, key: string, value: unknown): Promis
160
160
  } else if (isNamedBlob(value)) {
161
161
  form.append(key, value, getName(value));
162
162
  } else if (Array.isArray(value)) {
163
- await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry)));
163
+ await Promise.all(value.map((entry) => addFormValue(form, key, entry)));
164
164
  } else if (typeof value === 'object') {
165
165
  await Promise.all(
166
166
  Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop)),
@@ -183,6 +183,12 @@ export interface AccountSetXUsernameResponse {
183
183
 
184
184
  export interface AccountUpdateLocaleResponse {
185
185
  success: true;
186
+
187
+ /**
188
+ * Fields the request sent that this route does not read, in the order sent. They
189
+ * changed nothing. The answer leaves this out when the route read every field.
190
+ */
191
+ ignoredFields?: Array<string>;
186
192
  }
187
193
 
188
194
  export interface AccountSetXUsernameParams {
@@ -121,7 +121,7 @@ export namespace ComposeCreateResponse {
121
121
  */
122
122
  action: string;
123
123
 
124
- multiplier: 'Source default; production value can vary';
124
+ multiplier: 'Source default. Production value can vary.' | 'Source default; production value can vary';
125
125
  }
126
126
 
127
127
  /**
@@ -17,14 +17,14 @@ export class Drafts extends APIResource {
17
17
  *
18
18
  * @example
19
19
  * ```ts
20
- * const draftDetail = await client.drafts.create({
20
+ * const response = await client.drafts.create({
21
21
  * text: 'AI is the future of productivity',
22
22
  * goal: 'engagement',
23
23
  * topic: 'AI trends',
24
24
  * });
25
25
  * ```
26
26
  */
27
- create(body: DraftCreateParams, options?: RequestOptions): APIPromise<DraftDetail> {
27
+ create(body: DraftCreateParams, options?: RequestOptions): APIPromise<DraftCreateResponse> {
28
28
  return this._client.post('/drafts', { body, ...options });
29
29
  }
30
30
 
@@ -93,6 +93,17 @@ export interface DraftDetail extends Draft {
93
93
  updatedAt: string;
94
94
  }
95
95
 
96
+ /**
97
+ * The created draft, with the fields the request sent that the route did not read.
98
+ */
99
+ export interface DraftCreateResponse extends DraftDetail {
100
+ /**
101
+ * Fields the request sent that this route does not read, in the order sent. They
102
+ * changed nothing. The answer leaves this out when the route read every field.
103
+ */
104
+ ignoredFields?: Array<string>;
105
+ }
106
+
96
107
  export interface DraftListResponse {
97
108
  drafts: Array<Draft>;
98
109
 
@@ -129,6 +140,7 @@ export declare namespace Drafts {
129
140
  export {
130
141
  type Draft as Draft,
131
142
  type DraftDetail as DraftDetail,
143
+ type DraftCreateResponse as DraftCreateResponse,
132
144
  type DraftListResponse as DraftListResponse,
133
145
  type DraftCreateParams as DraftCreateParams,
134
146
  type DraftListParams as DraftListParams,
@@ -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 | 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
 
@@ -94,12 +102,29 @@ export interface Event {
94
102
  * Type of monitor event fired when account activity occurs. tweet.deleted fires
95
103
  * once X confirms the account deleted a post the monitor saw. Its data is the post
96
104
  * as last seen. broadcast.started & space.started fire when the account posts its
97
- * running live video or Space. Their data is that post. A live the account does
98
- * not post is not seen. following.added & following.removed fire when the account
99
- * follows or unfollows someone, with that account's profile. Keyword monitors take
100
- * the 10 post types only.
105
+ * running live video or Space. Their data is that post. Xquik misses a live video
106
+ * the account does not post. following.added & following.removed fire when the
107
+ * account follows or unfollows someone, with that account's profile.
108
+ * follower.added & follower.removed fire when someone follows the account or
109
+ * leaves its followers, with that account's profile. Xquik names lost followers
110
+ * for accounts with up to 100,000 followers. profile.followers.changed &
111
+ * profile.following.changed fire when the account's follower or following count
112
+ * moves, at most once a minute each. X shows counts that differ by a few between
113
+ * reads, so a monitor holds the lowest. A fall counts once 2 reads show it, & a
114
+ * rise once no read for a minute showed less. Keyword monitors take the 10 post
115
+ * types only.
101
116
  */
102
- 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;
103
128
 
104
129
  /**
105
130
  * Keyword monitor ID, present for keyword monitor events.
@@ -112,6 +137,16 @@ export interface Event {
112
137
  */
113
138
  monitorName?: string;
114
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
+
115
150
  /**
116
151
  * Keyword query, present for keyword monitor events.
117
152
  */
@@ -355,6 +390,12 @@ export namespace Event {
355
390
  */
356
391
  scopes?: { [key: string]: unknown };
357
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
+
358
399
  /**
359
400
  * The app the post was sent from, as X labels it. X sends it for some posts only.
360
401
  */
@@ -390,6 +431,13 @@ export namespace Event {
390
431
  */
391
432
  unavailableAuthorId?: string;
392
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
+
393
441
  /**
394
442
  * User IDs that left this conversation.
395
443
  */
@@ -946,6 +994,10 @@ export namespace Event {
946
994
 
947
995
  export namespace Entity {
948
996
  export interface Ref {
997
+ screenName?: string;
998
+
999
+ text?: string;
1000
+
949
1001
  type?: string;
950
1002
 
951
1003
  url?: string;
@@ -1337,7 +1389,7 @@ export namespace Event {
1337
1389
  /**
1338
1390
  * Embedded post with public fields and legacy profile aliases.
1339
1391
  */
1340
- export interface QuotedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
1392
+ export interface QuotedTweet extends Shared.EmbeddedTweet {
1341
1393
  /**
1342
1394
  * Public profile with retained legacy monitor fields.
1343
1395
  */
@@ -1421,7 +1473,7 @@ export namespace Event {
1421
1473
  /**
1422
1474
  * Embedded post with public fields and legacy profile aliases.
1423
1475
  */
1424
- export interface RetweetedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
1476
+ export interface RetweetedTweet extends Shared.EmbeddedTweet {
1425
1477
  /**
1426
1478
  * Public profile with retained legacy monitor fields.
1427
1479
  */
@@ -1610,6 +1662,10 @@ export namespace Event {
1610
1662
 
1611
1663
  export namespace Entity {
1612
1664
  export interface Ref {
1665
+ screenName?: string;
1666
+
1667
+ text?: string;
1668
+
1613
1669
  type?: string;
1614
1670
 
1615
1671
  url?: string;
@@ -1622,7 +1678,8 @@ export namespace Event {
1622
1678
  }
1623
1679
 
1624
1680
  /**
1625
- * Changed profile field with its previous and current values.
1681
+ * Changed profile field with its previous and current values. The field of a count
1682
+ * event is followers or following, with both counts as integers.
1626
1683
  */
1627
1684
  export interface MonitorProfileChange {
1628
1685
  field: string;
@@ -1638,14 +1695,19 @@ export namespace Event {
1638
1695
  username: string;
1639
1696
 
1640
1697
  /**
1641
- * Profile text, flag, or pinned post IDs. Missing values are omitted.
1698
+ * Current count minus previous count. Only on the 2 count events.
1642
1699
  */
1643
- current?: string | boolean | Array<string>;
1700
+ change?: number;
1644
1701
 
1645
1702
  /**
1646
- * Profile text, flag, or pinned post IDs. Missing values are omitted.
1703
+ * Profile text, flag, count, or pinned post IDs. Missing values are omitted.
1647
1704
  */
1648
- previous?: string | boolean | Array<string>;
1705
+ current?: string | boolean | number | Array<string>;
1706
+
1707
+ /**
1708
+ * Profile text, flag, count, or pinned post IDs. Missing values are omitted.
1709
+ */
1710
+ previous?: string | boolean | number | Array<string>;
1649
1711
  }
1650
1712
 
1651
1713
  /**
@@ -1675,7 +1737,14 @@ export interface EventDetail {
1675
1737
  /**
1676
1738
  * Post or profile-change payload for the event type.
1677
1739
  */
1678
- data: EventDetail.MonitorPost | EventDetail.MonitorProfileChange | EventDetail.MonitorLegacyPost;
1740
+ data:
1741
+ | EventDetail.MonitorPost
1742
+ | EventDetail.MonitorProfileChange
1743
+ | Shared.MonitorFollow
1744
+ | PostsAPI.MonitorPostMetricChange
1745
+ | PostsAPI.MonitorPostEdit
1746
+ | PostsAPI.MonitorPostDeleted
1747
+ | EventDetail.MonitorLegacyPost;
1679
1748
 
1680
1749
  /**
1681
1750
  * Monitor ID associated with this detailed event payload.
@@ -1685,7 +1754,7 @@ export interface EventDetail {
1685
1754
  /**
1686
1755
  * Source monitor type for this detailed event.
1687
1756
  */
1688
- monitorType: 'account' | 'keyword';
1757
+ monitorType: 'account' | 'keyword' | 'post';
1689
1758
 
1690
1759
  occurredAt: string;
1691
1760
 
@@ -1693,12 +1762,19 @@ export interface EventDetail {
1693
1762
  * Type of monitor event fired when account activity occurs. tweet.deleted fires
1694
1763
  * once X confirms the account deleted a post the monitor saw. Its data is the post
1695
1764
  * as last seen. broadcast.started & space.started fire when the account posts its
1696
- * running live video or Space. Their data is that post. A live the account does
1697
- * not post is not seen. following.added & following.removed fire when the account
1698
- * follows or unfollows someone, with that account's profile. Keyword monitors take
1699
- * the 10 post types only.
1765
+ * running live video or Space. Their data is that post. Xquik misses a live video
1766
+ * the account does not post. following.added & following.removed fire when the
1767
+ * account follows or unfollows someone, with that account's profile.
1768
+ * follower.added & follower.removed fire when someone follows the account or
1769
+ * leaves its followers, with that account's profile. Xquik names lost followers
1770
+ * for accounts with up to 100,000 followers. profile.followers.changed &
1771
+ * profile.following.changed fire when the account's follower or following count
1772
+ * moves, at most once a minute each. X shows counts that differ by a few between
1773
+ * reads, so a monitor holds the lowest. A fall counts once 2 reads show it, & a
1774
+ * rise once no read for a minute showed less. Keyword monitors take the 10 post
1775
+ * types only.
1700
1776
  */
1701
- type: Shared.EventType;
1777
+ type: Shared.EventType | PostsAPI.PostEventType;
1702
1778
 
1703
1779
  /**
1704
1780
  * Keyword monitor ID included on detailed keyword events.
@@ -1956,6 +2032,12 @@ export namespace EventDetail {
1956
2032
  */
1957
2033
  scopes?: { [key: string]: unknown };
1958
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
+
1959
2041
  /**
1960
2042
  * The app the post was sent from, as X labels it. X sends it for some posts only.
1961
2043
  */
@@ -1991,6 +2073,13 @@ export namespace EventDetail {
1991
2073
  */
1992
2074
  unavailableAuthorId?: string;
1993
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
+
1994
2083
  /**
1995
2084
  * User IDs that left this conversation.
1996
2085
  */
@@ -2547,6 +2636,10 @@ export namespace EventDetail {
2547
2636
 
2548
2637
  export namespace Entity {
2549
2638
  export interface Ref {
2639
+ screenName?: string;
2640
+
2641
+ text?: string;
2642
+
2550
2643
  type?: string;
2551
2644
 
2552
2645
  url?: string;
@@ -2938,7 +3031,7 @@ export namespace EventDetail {
2938
3031
  /**
2939
3032
  * Embedded post with public fields and legacy profile aliases.
2940
3033
  */
2941
- export interface QuotedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
3034
+ export interface QuotedTweet extends Shared.EmbeddedTweet {
2942
3035
  /**
2943
3036
  * Public profile with retained legacy monitor fields.
2944
3037
  */
@@ -3022,7 +3115,7 @@ export namespace EventDetail {
3022
3115
  /**
3023
3116
  * Embedded post with public fields and legacy profile aliases.
3024
3117
  */
3025
- export interface RetweetedTweet extends Omit<Shared.EmbeddedTweet, 'author'> {
3118
+ export interface RetweetedTweet extends Shared.EmbeddedTweet {
3026
3119
  /**
3027
3120
  * Public profile with retained legacy monitor fields.
3028
3121
  */
@@ -3211,6 +3304,10 @@ export namespace EventDetail {
3211
3304
 
3212
3305
  export namespace Entity {
3213
3306
  export interface Ref {
3307
+ screenName?: string;
3308
+
3309
+ text?: string;
3310
+
3214
3311
  type?: string;
3215
3312
 
3216
3313
  url?: string;
@@ -3223,7 +3320,8 @@ export namespace EventDetail {
3223
3320
  }
3224
3321
 
3225
3322
  /**
3226
- * Changed profile field with its previous and current values.
3323
+ * Changed profile field with its previous and current values. The field of a count
3324
+ * event is followers or following, with both counts as integers.
3227
3325
  */
3228
3326
  export interface MonitorProfileChange {
3229
3327
  field: string;
@@ -3239,14 +3337,19 @@ export namespace EventDetail {
3239
3337
  username: string;
3240
3338
 
3241
3339
  /**
3242
- * Profile text, flag, or pinned post IDs. Missing values are omitted.
3340
+ * Current count minus previous count. Only on the 2 count events.
3341
+ */
3342
+ change?: number;
3343
+
3344
+ /**
3345
+ * Profile text, flag, count, or pinned post IDs. Missing values are omitted.
3243
3346
  */
3244
- current?: string | boolean | Array<string>;
3347
+ current?: string | boolean | number | Array<string>;
3245
3348
 
3246
3349
  /**
3247
- * Profile text, flag, or pinned post IDs. Missing values are omitted.
3350
+ * Profile text, flag, count, or pinned post IDs. Missing values are omitted.
3248
3351
  */
3249
- previous?: string | boolean | Array<string>;
3352
+ previous?: string | boolean | number | Array<string>;
3250
3353
  }
3251
3354
 
3252
3355
  /**
@@ -3285,7 +3388,7 @@ export interface EventListParams {
3285
3388
  /**
3286
3389
  * Filter events by type
3287
3390
  */
3288
- eventType?: Shared.EventType;
3391
+ eventType?: Shared.EventType | PostsAPI.PostEventType;
3289
3392
 
3290
3393
  /**
3291
3394
  * Keyword monitor ID. The keyword_monitor_id alias also works.
@@ -3302,6 +3405,11 @@ export interface EventListParams {
3302
3405
  * Account monitor ID. The monitor_id alias also works.
3303
3406
  */
3304
3407
  monitorId?: string;
3408
+
3409
+ /**
3410
+ * Post monitor ID. The post_monitor_id alias also works.
3411
+ */
3412
+ postMonitorId?: string;
3305
3413
  }
3306
3414
 
3307
3415
  export interface EventStreamParams {
@@ -25,6 +25,7 @@ export {
25
25
  Drafts,
26
26
  type Draft,
27
27
  type DraftDetail,
28
+ type DraftCreateResponse,
28
29
  type DraftListResponse,
29
30
  type DraftCreateParams,
30
31
  type DraftListParams,
@@ -122,6 +123,7 @@ export {
122
123
  } from './webhooks';
123
124
  export {
124
125
  X,
126
+ type TrendLocation,
125
127
  type XAutocompleteSearchResponse,
126
128
  type XGetArticleResponse,
127
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';