@the-convocation/twitter-scraper 0.16.0 → 0.16.2

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.
@@ -79,7 +79,7 @@ declare class ErrorRateLimitStrategy implements RateLimitStrategy {
79
79
  declare class ApiError extends Error {
80
80
  readonly response: Response;
81
81
  readonly data: any;
82
- constructor(response: Response, data: any, message: string);
82
+ constructor(response: Response, data: any);
83
83
  static fromResponse(response: Response): Promise<ApiError>;
84
84
  }
85
85
  declare class AuthenticationError extends Error {
@@ -109,6 +109,7 @@ interface TwitterApiErrorRaw extends TwitterApiErrorExtensions {
109
109
  interface TwitterUserAuthFlowInitRequest {
110
110
  flow_name: string;
111
111
  input_flow_data: Record<string, unknown>;
112
+ subtask_versions: Record<string, number>;
112
113
  }
113
114
  interface TwitterUserAuthFlowSubtaskRequest {
114
115
  flow_token: string;
@@ -255,6 +256,11 @@ interface FlowSubtaskHandlerApi {
255
256
  */
256
257
  type FlowSubtaskHandler = (subtaskId: string, previousResponse: TwitterUserAuthFlowResponse, credentials: TwitterUserAuthCredentials, api: FlowSubtaskHandlerApi) => Promise<FlowTokenResult>;
257
258
 
259
+ interface CoreUserRaw {
260
+ created_at?: string;
261
+ name?: string;
262
+ screen_name?: string;
263
+ }
258
264
  interface LegacyUserRaw {
259
265
  created_at?: string;
260
266
  description?: string;
@@ -273,7 +279,7 @@ interface LegacyUserRaw {
273
279
  id_str?: string;
274
280
  listed_count?: number;
275
281
  name?: string;
276
- location: string;
282
+ location?: string;
277
283
  geo_enabled?: boolean;
278
284
  pinned_tweet_ids_str?: string[];
279
285
  profile_background_color?: string;
@@ -306,7 +312,7 @@ interface Profile {
306
312
  joined?: Date;
307
313
  likesCount?: number;
308
314
  listedCount?: number;
309
- location: string;
315
+ location?: string;
310
316
  name?: string;
311
317
  pinnedTweetIds?: string[];
312
318
  tweetsCount?: number;
@@ -433,6 +439,7 @@ interface TimelineResultRaw {
433
439
  user_results?: {
434
440
  result?: {
435
441
  is_blue_verified?: boolean;
442
+ core?: CoreUserRaw;
436
443
  legacy?: LegacyUserRaw;
437
444
  };
438
445
  };
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "scraper",
8
8
  "crawler"
9
9
  ],
10
- "version": "0.16.0",
10
+ "version": "0.16.2",
11
11
  "main": "dist/default/cjs/index.js",
12
12
  "types": "./dist/types/index.d.ts",
13
13
  "exports": {
@@ -40,6 +40,7 @@
40
40
  "dependencies": {
41
41
  "@sinclair/typebox": "^0.32.20",
42
42
  "cross-fetch": "^4.0.0-alpha.5",
43
+ "debug": "^4.4.1",
43
44
  "headers-polyfill": "^3.1.2",
44
45
  "json-stable-stringify": "^1.0.2",
45
46
  "otpauth": "^9.2.2",
@@ -51,6 +52,7 @@
51
52
  "@commitlint/cli": "^17.6.3",
52
53
  "@commitlint/config-conventional": "^17.6.3",
53
54
  "@tsconfig/node16": "^16.1.0",
55
+ "@types/debug": "^4.1.12",
54
56
  "@types/jest": "^29.5.1",
55
57
  "@types/json-stable-stringify": "^1.0.34",
56
58
  "@types/set-cookie-parser": "^2.4.2",