ensembledata 0.0.3 → 0.1.1

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.
package/types/client.d.ts CHANGED
@@ -1,7 +1,15 @@
1
1
  export class EDClient {
2
- /** @param {{ token: string }} options */
3
- constructor({ token }: {
2
+ /**
3
+ * @param {{
4
+ * token: string;
5
+ * timeout?: number;
6
+ * maxNetworkRetries?: number;
7
+ * }} options
8
+ */
9
+ constructor({ token, timeout, maxNetworkRetries }: {
4
10
  token: string;
11
+ timeout?: number;
12
+ maxNetworkRetries?: number;
5
13
  });
6
14
  /** @readonly */
7
15
  readonly customer: CustomerEndpoints;
@@ -18,9 +26,12 @@ export class EDClient {
18
26
  /**
19
27
  * @param {string} path
20
28
  * @param {Record<string, string>} params
29
+ * @param {{ timeout?: number }} options
21
30
  * @returns {Promise<EDResponse>}
22
31
  */
23
- request(path: string, params: Record<string, string>): Promise<EDResponse>;
32
+ request(path: string, params: Record<string, string>, options?: {
33
+ timeout?: number;
34
+ }): Promise<EDResponse>;
24
35
  #private;
25
36
  }
26
37
  export type EDResponse = import("./requester").EDResponse;
@@ -32,20 +43,26 @@ declare class CustomerEndpoints {
32
43
  });
33
44
  /**
34
45
  * @param {{ date: string }} params
35
- * @param {Record<string, any>} extraParams
46
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
36
47
  * @returns {Promise<EDResponse>}
37
48
  */
38
49
  getUsage({ date }: {
39
50
  date: string;
40
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
51
+ }, options?: {
52
+ extraParams?: Record<string, any>;
53
+ timeout?: number;
54
+ }): Promise<EDResponse>;
41
55
  /**
42
56
  * @param {{ days: number }} params
43
- * @param {Record<string, any>} extraParams
57
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
44
58
  * @returns {Promise<EDResponse>}
45
59
  */
46
60
  getUsageHistory({ days }: {
47
61
  days: number;
48
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
62
+ }, options?: {
63
+ extraParams?: Record<string, any>;
64
+ timeout?: number;
65
+ }): Promise<EDResponse>;
49
66
  #private;
50
67
  }
51
68
  declare class TiktokEndpoints {
@@ -55,13 +72,16 @@ declare class TiktokEndpoints {
55
72
  });
56
73
  /**
57
74
  * @param {{ hashtag: string; cursor?: number }} params
58
- * @param {Record<string, any>} extraParams
75
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
59
76
  * @returns {Promise<EDResponse>}
60
77
  */
61
78
  hashtagSearch({ hashtag, cursor }: {
62
79
  hashtag: string;
63
80
  cursor?: number;
64
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
81
+ }, options?: {
82
+ extraParams?: Record<string, any>;
83
+ timeout?: number;
84
+ }): Promise<EDResponse>;
65
85
  /**
66
86
  * @param {{
67
87
  * hashtag: string;
@@ -69,7 +89,7 @@ declare class TiktokEndpoints {
69
89
  * remapOutput?: boolean;
70
90
  * maxCursor?: number;
71
91
  * }} params
72
- * @param {Record<string, any>} extraParams
92
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
73
93
  * @returns {Promise<EDResponse>}
74
94
  */
75
95
  fullHashtagSearch({ hashtag, days, remapOutput, maxCursor }: {
@@ -77,29 +97,35 @@ declare class TiktokEndpoints {
77
97
  days: number;
78
98
  remapOutput?: boolean;
79
99
  maxCursor?: number;
80
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
100
+ }, options?: {
101
+ extraParams?: Record<string, any>;
102
+ timeout?: number;
103
+ }): Promise<EDResponse>;
81
104
  /**
82
105
  * @param {{
83
106
  * keyword: string;
84
107
  * cursor?: number;
85
108
  * period: "0" | "1" | "7" | "30" | "90" | "180";
86
- * sorting: "0" | "1";
109
+ * sorting?: "0" | "1";
87
110
  * country?: string;
88
111
  * matchExactly?: boolean;
89
112
  * getAuthorStats?: boolean;
90
113
  * }} params
91
- * @param {Record<string, any>} extraParams
114
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
92
115
  * @returns {Promise<EDResponse>}
93
116
  */
94
117
  keywordSearch({ keyword, cursor, period, sorting, country, matchExactly, getAuthorStats, }: {
95
118
  keyword: string;
96
119
  cursor?: number;
97
120
  period: "0" | "1" | "7" | "30" | "90" | "180";
98
- sorting: "0" | "1";
121
+ sorting?: "0" | "1";
99
122
  country?: string;
100
123
  matchExactly?: boolean;
101
124
  getAuthorStats?: boolean;
102
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
125
+ }, options?: {
126
+ extraParams?: Record<string, any>;
127
+ timeout?: number;
128
+ }): Promise<EDResponse>;
103
129
  /**
104
130
  * @param {{
105
131
  * keyword: string;
@@ -108,7 +134,7 @@ declare class TiktokEndpoints {
108
134
  * country?: string;
109
135
  * matchExactly?: boolean;
110
136
  * }} params
111
- * @param {Record<string, any>} extraParams
137
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
112
138
  * @returns {Promise<EDResponse>}
113
139
  */
114
140
  fullKeywordSearch({ keyword, period, sorting, country, matchExactly, }: {
@@ -117,7 +143,10 @@ declare class TiktokEndpoints {
117
143
  sorting?: "0" | "1";
118
144
  country?: string;
119
145
  matchExactly?: boolean;
120
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
146
+ }, options?: {
147
+ extraParams?: Record<string, any>;
148
+ timeout?: number;
149
+ }): Promise<EDResponse>;
121
150
  /**
122
151
  * @param {{
123
152
  * username: string;
@@ -126,7 +155,7 @@ declare class TiktokEndpoints {
126
155
  * oldestCreatetime?: number;
127
156
  * alternativeMethod?: boolean;
128
157
  * }} params
129
- * @param {Record<string, any>} extraParams
158
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
130
159
  * @returns {Promise<EDResponse>}
131
160
  */
132
161
  userPostsFromUsername({ username, depth, cursor, oldestCreatetime, alternativeMethod, }: {
@@ -135,7 +164,10 @@ declare class TiktokEndpoints {
135
164
  cursor?: number;
136
165
  oldestCreatetime?: number;
137
166
  alternativeMethod?: boolean;
138
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
167
+ }, options?: {
168
+ extraParams?: Record<string, any>;
169
+ timeout?: number;
170
+ }): Promise<EDResponse>;
139
171
  /**
140
172
  * @param {{
141
173
  * secUid: string;
@@ -144,7 +176,7 @@ declare class TiktokEndpoints {
144
176
  * oldestCreatetime?: number;
145
177
  * alternativeMethod?: boolean;
146
178
  * }} params
147
- * @param {Record<string, any>} extraParams
179
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
148
180
  * @returns {Promise<EDResponse>}
149
181
  */
150
182
  userPostsFromSecuid({ secUid, depth, cursor, oldestCreatetime, alternativeMethod, }: {
@@ -153,111 +185,147 @@ declare class TiktokEndpoints {
153
185
  cursor?: number;
154
186
  oldestCreatetime?: number;
155
187
  alternativeMethod?: boolean;
156
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
188
+ }, options?: {
189
+ extraParams?: Record<string, any>;
190
+ timeout?: number;
191
+ }): Promise<EDResponse>;
157
192
  /**
158
193
  * @param {{ username: string }} params
159
- * @param {Record<string, any>} extraParams
194
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
160
195
  * @returns {Promise<EDResponse>}
161
196
  */
162
197
  userInfoFromUsername({ username }: {
163
198
  username: string;
164
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
199
+ }, options?: {
200
+ extraParams?: Record<string, any>;
201
+ timeout?: number;
202
+ }): Promise<EDResponse>;
165
203
  /**
166
204
  * @param {{ secUid: string; alternativeMethod?: boolean }} params
167
- * @param {Record<string, any>} extraParams
205
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
168
206
  * @returns {Promise<EDResponse>}
169
207
  */
170
208
  userInfoFromSecuid({ secUid, alternativeMethod }: {
171
209
  secUid: string;
172
210
  alternativeMethod?: boolean;
173
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
211
+ }, options?: {
212
+ extraParams?: Record<string, any>;
213
+ timeout?: number;
214
+ }): Promise<EDResponse>;
174
215
  /**
175
216
  * @param {{ keyword: string; cursor?: number }} params
176
- * @param {Record<string, any>} extraParams
217
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
177
218
  * @returns {Promise<EDResponse>}
178
219
  */
179
220
  userSearch({ keyword, cursor }: {
180
221
  keyword: string;
181
222
  cursor?: number;
182
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
223
+ }, options?: {
224
+ extraParams?: Record<string, any>;
225
+ timeout?: number;
226
+ }): Promise<EDResponse>;
183
227
  /**
184
228
  * @param {{ url: string }} params
185
- * @param {Record<string, any>} extraParams
229
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
186
230
  * @returns {Promise<EDResponse>}
187
231
  */
188
232
  postInfo({ url }: {
189
233
  url: string;
190
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
234
+ }, options?: {
235
+ extraParams?: Record<string, any>;
236
+ timeout?: number;
237
+ }): Promise<EDResponse>;
191
238
  /**
192
239
  * @param {{ awemeIds: string[] }} params
193
- * @param {Record<string, any>} extraParams
240
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
194
241
  * @returns {Promise<EDResponse>}
195
242
  */
196
243
  multiPostInfo({ awemeIds }: {
197
244
  awemeIds: string[];
198
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
245
+ }, options?: {
246
+ extraParams?: Record<string, any>;
247
+ timeout?: number;
248
+ }): Promise<EDResponse>;
199
249
  /**
200
250
  * @param {{ awemeId: string; cursor?: number }} params
201
- * @param {Record<string, any>} extraParams
251
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
202
252
  * @returns {Promise<EDResponse>}
203
253
  */
204
254
  postComments({ awemeId, cursor }: {
205
255
  awemeId: string;
206
256
  cursor?: number;
207
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
257
+ }, options?: {
258
+ extraParams?: Record<string, any>;
259
+ timeout?: number;
260
+ }): Promise<EDResponse>;
208
261
  /**
209
262
  * @param {{ awemeId: string; commentId: string; cursor?: number }} params
210
- * @param {Record<string, any>} extraParams
263
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
211
264
  * @returns {Promise<EDResponse>}
212
265
  */
213
266
  postCommentReplies({ awemeId, commentId, cursor }: {
214
267
  awemeId: string;
215
268
  commentId: string;
216
269
  cursor?: number;
217
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
270
+ }, options?: {
271
+ extraParams?: Record<string, any>;
272
+ timeout?: number;
273
+ }): Promise<EDResponse>;
218
274
  /**
219
275
  * @param {{
220
276
  * keyword: string;
221
277
  * cursor?: number;
222
- * sorting: "0" | "1" | "2" | "3" | "4";
223
- * filterBy: "0" | "1" | "2";
278
+ * sorting?: "0" | "1" | "2" | "3" | "4";
279
+ * filterBy?: "0" | "1" | "2";
224
280
  * }} params
225
- * @param {Record<string, any>} extraParams
281
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
226
282
  * @returns {Promise<EDResponse>}
227
283
  */
228
- musicSearch({ keyword, cursor, sorting, filterBy }: {
284
+ musicSearch({ keyword, cursor, sorting, filterBy, }: {
229
285
  keyword: string;
230
286
  cursor?: number;
231
- sorting: "0" | "1" | "2" | "3" | "4";
232
- filterBy: "0" | "1" | "2";
233
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
287
+ sorting?: "0" | "1" | "2" | "3" | "4";
288
+ filterBy?: "0" | "1" | "2";
289
+ }, options?: {
290
+ extraParams?: Record<string, any>;
291
+ timeout?: number;
292
+ }): Promise<EDResponse>;
234
293
  /**
235
294
  * @param {{ musicId: string; cursor?: number }} params
236
- * @param {Record<string, any>} extraParams
295
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
237
296
  * @returns {Promise<EDResponse>}
238
297
  */
239
298
  musicPosts({ musicId, cursor }: {
240
299
  musicId: string;
241
300
  cursor?: number;
242
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
301
+ }, options?: {
302
+ extraParams?: Record<string, any>;
303
+ timeout?: number;
304
+ }): Promise<EDResponse>;
243
305
  /**
244
306
  * @param {{ musicId: string }} params
245
- * @param {Record<string, any>} extraParams
307
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
246
308
  * @returns {Promise<EDResponse>}
247
309
  */
248
310
  musicDetails({ musicId }: {
249
311
  musicId: string;
250
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
312
+ }, options?: {
313
+ extraParams?: Record<string, any>;
314
+ timeout?: number;
315
+ }): Promise<EDResponse>;
251
316
  /**
252
317
  * @param {{ id: string; secUid: string; cursor?: number }} params
253
- * @param {Record<string, any>} extraParams
318
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
254
319
  * @returns {Promise<EDResponse>}
255
320
  */
256
321
  userFollowers({ id, secUid, cursor }: {
257
322
  id: string;
258
323
  secUid: string;
259
324
  cursor?: number;
260
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
325
+ }, options?: {
326
+ extraParams?: Record<string, any>;
327
+ timeout?: number;
328
+ }): Promise<EDResponse>;
261
329
  /**
262
330
  * @param {{
263
331
  * id: string;
@@ -265,7 +333,7 @@ declare class TiktokEndpoints {
265
333
  * cursor?: number;
266
334
  * pageToken?: string;
267
335
  * }} params
268
- * @param {Record<string, any>} extraParams
336
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
269
337
  * @returns {Promise<EDResponse>}
270
338
  */
271
339
  userFollowings({ id, secUid, cursor, pageToken }: {
@@ -273,16 +341,22 @@ declare class TiktokEndpoints {
273
341
  secUid: string;
274
342
  cursor?: number;
275
343
  pageToken?: string;
276
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
344
+ }, options?: {
345
+ extraParams?: Record<string, any>;
346
+ timeout?: number;
347
+ }): Promise<EDResponse>;
277
348
  /**
278
349
  * @param {{ secUid: string; cursor?: number }} params
279
- * @param {Record<string, any>} extraParams
350
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
280
351
  * @returns {Promise<EDResponse>}
281
352
  */
282
353
  userLikedPosts({ secUid, cursor }: {
283
354
  secUid: string;
284
355
  cursor?: number;
285
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
356
+ }, options?: {
357
+ extraParams?: Record<string, any>;
358
+ timeout?: number;
359
+ }): Promise<EDResponse>;
286
360
  #private;
287
361
  }
288
362
  declare class YoutubeEndpoints {
@@ -299,7 +373,7 @@ declare class YoutubeEndpoints {
299
373
  * sorting?: "relevance" | "time" | "views" | "rating";
300
374
  * getAdditionalInfo?: boolean;
301
375
  * }} params
302
- * @param {Record<string, any>} extraParams
376
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
303
377
  * @returns {Promise<EDResponse>}
304
378
  */
305
379
  keywordSearch({ keyword, depth, cursor, period, sorting, getAdditionalInfo, }: {
@@ -309,108 +383,144 @@ declare class YoutubeEndpoints {
309
383
  period?: "overall" | "hour" | "today" | "week" | "month" | "year";
310
384
  sorting?: "relevance" | "time" | "views" | "rating";
311
385
  getAdditionalInfo?: boolean;
312
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
386
+ }, options?: {
387
+ extraParams?: Record<string, any>;
388
+ timeout?: number;
389
+ }): Promise<EDResponse>;
313
390
  /**
314
391
  * @param {{ keyword: string }} params
315
- * @param {Record<string, any>} extraParams
392
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
316
393
  * @returns {Promise<EDResponse>}
317
394
  */
318
395
  featuredCategoriesSearch({ keyword }: {
319
396
  keyword: string;
320
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
397
+ }, options?: {
398
+ extraParams?: Record<string, any>;
399
+ timeout?: number;
400
+ }): Promise<EDResponse>;
321
401
  /**
322
402
  * @param {{ hashtag: string; depth: number; onlyShorts?: boolean }} params
323
- * @param {Record<string, any>} extraParams
403
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
324
404
  * @returns {Promise<EDResponse>}
325
405
  */
326
406
  hashtagSearch({ hashtag, depth, onlyShorts }: {
327
407
  hashtag: string;
328
408
  depth: number;
329
409
  onlyShorts?: boolean;
330
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
410
+ }, options?: {
411
+ extraParams?: Record<string, any>;
412
+ timeout?: number;
413
+ }): Promise<EDResponse>;
331
414
  /**
332
415
  * @param {{ channelId: string; fromUrl?: boolean }} params
333
- * @param {Record<string, any>} extraParams
416
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
334
417
  * @returns {Promise<EDResponse>}
335
418
  */
336
419
  channelDetailedInfo({ channelId, fromUrl }: {
337
420
  channelId: string;
338
421
  fromUrl?: boolean;
339
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
422
+ }, options?: {
423
+ extraParams?: Record<string, any>;
424
+ timeout?: number;
425
+ }): Promise<EDResponse>;
340
426
  /**
341
427
  * @param {{ channelId: string; depth: number }} params
342
- * @param {Record<string, any>} extraParams
428
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
343
429
  * @returns {Promise<EDResponse>}
344
430
  */
345
431
  channelVideos({ channelId, depth }: {
346
432
  channelId: string;
347
433
  depth: number;
348
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
434
+ }, options?: {
435
+ extraParams?: Record<string, any>;
436
+ timeout?: number;
437
+ }): Promise<EDResponse>;
349
438
  /**
350
439
  * @param {{ channelId: string; depth: number }} params
351
- * @param {Record<string, any>} extraParams
440
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
352
441
  * @returns {Promise<EDResponse>}
353
442
  */
354
443
  channelShorts({ channelId, depth }: {
355
444
  channelId: string;
356
445
  depth: number;
357
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
446
+ }, options?: {
447
+ extraParams?: Record<string, any>;
448
+ timeout?: number;
449
+ }): Promise<EDResponse>;
358
450
  /**
359
451
  * @param {{
360
452
  * id: string;
361
453
  * alternativeMethod?: boolean;
362
454
  * getSubscribersCount?: boolean;
363
455
  * }} params
364
- * @param {Record<string, any>} extraParams
456
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
365
457
  * @returns {Promise<EDResponse>}
366
458
  */
367
459
  videoDetails({ id, alternativeMethod, getSubscribersCount }: {
368
460
  id: string;
369
461
  alternativeMethod?: boolean;
370
462
  getSubscribersCount?: boolean;
371
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
463
+ }, options?: {
464
+ extraParams?: Record<string, any>;
465
+ timeout?: number;
466
+ }): Promise<EDResponse>;
372
467
  /**
373
468
  * @param {{ channelId: string }} params
374
- * @param {Record<string, any>} extraParams
469
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
375
470
  * @returns {Promise<EDResponse>}
376
471
  */
377
472
  channelSubscribers({ channelId }: {
378
473
  channelId: string;
379
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
474
+ }, options?: {
475
+ extraParams?: Record<string, any>;
476
+ timeout?: number;
477
+ }): Promise<EDResponse>;
380
478
  /**
381
479
  * @param {{ username: string }} params
382
- * @param {Record<string, any>} extraParams
480
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
383
481
  * @returns {Promise<EDResponse>}
384
482
  */
385
483
  channelUsernameToId({ username }: {
386
484
  username: string;
387
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
485
+ }, options?: {
486
+ extraParams?: Record<string, any>;
487
+ timeout?: number;
488
+ }): Promise<EDResponse>;
388
489
  /**
389
490
  * @param {{ channelId: string }} params
390
- * @param {Record<string, any>} extraParams
491
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
391
492
  * @returns {Promise<EDResponse>}
392
493
  */
393
494
  channelIdToUsername({ channelId }: {
394
495
  channelId: string;
395
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
496
+ }, options?: {
497
+ extraParams?: Record<string, any>;
498
+ timeout?: number;
499
+ }): Promise<EDResponse>;
396
500
  /**
397
501
  * @param {{ musicId: string; depth?: number }} params
398
- * @param {Record<string, any>} extraParams
502
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
399
503
  * @returns {Promise<EDResponse>}
400
504
  */
401
505
  musicIdToShorts({ musicId, depth }: {
402
506
  musicId: string;
403
507
  depth?: number;
404
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
508
+ }, options?: {
509
+ extraParams?: Record<string, any>;
510
+ timeout?: number;
511
+ }): Promise<EDResponse>;
405
512
  /**
406
513
  * @param {{ id: string; cursor?: string }} params
407
- * @param {Record<string, any>} extraParams
514
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
408
515
  * @returns {Promise<EDResponse>}
409
516
  */
410
517
  videoComments({ id, cursor }: {
411
518
  id: string;
412
519
  cursor?: string;
413
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
520
+ }, options?: {
521
+ extraParams?: Record<string, any>;
522
+ timeout?: number;
523
+ }): Promise<EDResponse>;
414
524
  #private;
415
525
  }
416
526
  declare class InstagramEndpoints {
@@ -427,7 +537,7 @@ declare class InstagramEndpoints {
427
537
  * cursor?: string;
428
538
  * alternativeMethod?: boolean;
429
539
  * }} params
430
- * @param {Record<string, any>} extraParams
540
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
431
541
  * @returns {Promise<EDResponse>}
432
542
  */
433
543
  userPosts({ userId, depth, oldestTimestamp, chunkSize, cursor, alternativeMethod, }: {
@@ -437,39 +547,54 @@ declare class InstagramEndpoints {
437
547
  chunkSize?: number;
438
548
  cursor?: string;
439
549
  alternativeMethod?: boolean;
440
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
550
+ }, options?: {
551
+ extraParams?: Record<string, any>;
552
+ timeout?: number;
553
+ }): Promise<EDResponse>;
441
554
  /**
442
555
  * @param {{ userId: number }} params
443
- * @param {Record<string, any>} extraParams
556
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
444
557
  * @returns {Promise<EDResponse>}
445
558
  */
446
559
  userBasicStats({ userId }: {
447
560
  userId: number;
448
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
561
+ }, options?: {
562
+ extraParams?: Record<string, any>;
563
+ timeout?: number;
564
+ }): Promise<EDResponse>;
449
565
  /**
450
566
  * @param {{ username: string }} params
451
- * @param {Record<string, any>} extraParams
567
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
452
568
  * @returns {Promise<EDResponse>}
453
569
  */
454
570
  userInfo({ username }: {
455
571
  username: string;
456
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
572
+ }, options?: {
573
+ extraParams?: Record<string, any>;
574
+ timeout?: number;
575
+ }): Promise<EDResponse>;
457
576
  /**
458
577
  * @param {{ username: string }} params
459
- * @param {Record<string, any>} extraParams
578
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
460
579
  * @returns {Promise<EDResponse>}
461
580
  */
462
581
  userDetailedInfo({ username }: {
463
582
  username: string;
464
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
583
+ }, options?: {
584
+ extraParams?: Record<string, any>;
585
+ timeout?: number;
586
+ }): Promise<EDResponse>;
465
587
  /**
466
588
  * @param {{ userId: number }} params
467
- * @param {Record<string, any>} extraParams
589
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
468
590
  * @returns {Promise<EDResponse>}
469
591
  */
470
592
  userFollowers({ userId }: {
471
593
  userId: number;
472
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
594
+ }, options?: {
595
+ extraParams?: Record<string, any>;
596
+ timeout?: number;
597
+ }): Promise<EDResponse>;
473
598
  /**
474
599
  * @param {{
475
600
  * userId: number;
@@ -479,7 +604,7 @@ declare class InstagramEndpoints {
479
604
  * cursor?: string;
480
605
  * chunkSize?: number;
481
606
  * }} params
482
- * @param {Record<string, any>} extraParams
607
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
483
608
  * @returns {Promise<EDResponse>}
484
609
  */
485
610
  userReels({ userId, depth, includeFeedVideo, oldestTimestamp, cursor, chunkSize, }: {
@@ -489,26 +614,35 @@ declare class InstagramEndpoints {
489
614
  oldestTimestamp?: number;
490
615
  cursor?: string;
491
616
  chunkSize?: number;
492
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
617
+ }, options?: {
618
+ extraParams?: Record<string, any>;
619
+ timeout?: number;
620
+ }): Promise<EDResponse>;
493
621
  /**
494
622
  * @param {{ userId: number; cursor?: string; chunkSize?: number }} params
495
- * @param {Record<string, any>} extraParams
623
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
496
624
  * @returns {Promise<EDResponse>}
497
625
  */
498
626
  userTaggedPosts({ userId, cursor, chunkSize }: {
499
627
  userId: number;
500
628
  cursor?: string;
501
629
  chunkSize?: number;
502
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
630
+ }, options?: {
631
+ extraParams?: Record<string, any>;
632
+ timeout?: number;
633
+ }): Promise<EDResponse>;
503
634
  /**
504
635
  * @param {{ code: string; numComments?: number }} params
505
- * @param {Record<string, any>} extraParams
636
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
506
637
  * @returns {Promise<EDResponse>}
507
638
  */
508
639
  postInfoAndComments({ code, numComments }: {
509
640
  code: string;
510
641
  numComments?: number;
511
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
642
+ }, options?: {
643
+ extraParams?: Record<string, any>;
644
+ timeout?: number;
645
+ }): Promise<EDResponse>;
512
646
  /**
513
647
  * @param {{
514
648
  * hashtag: string;
@@ -517,7 +651,7 @@ declare class InstagramEndpoints {
517
651
  * getAuthorInfo?: boolean;
518
652
  * alternativeMethod?: boolean;
519
653
  * }} params
520
- * @param {Record<string, any>} extraParams
654
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
521
655
  * @returns {Promise<EDResponse>}
522
656
  */
523
657
  hashtagPosts({ hashtag, cursor, chunkSize, getAuthorInfo, alternativeMethod, }: {
@@ -526,24 +660,33 @@ declare class InstagramEndpoints {
526
660
  chunkSize?: number;
527
661
  getAuthorInfo?: boolean;
528
662
  alternativeMethod?: boolean;
529
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
663
+ }, options?: {
664
+ extraParams?: Record<string, any>;
665
+ timeout?: number;
666
+ }): Promise<EDResponse>;
530
667
  /**
531
668
  * @param {{ musicId: string; cursor?: string }} params
532
- * @param {Record<string, any>} extraParams
669
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
533
670
  * @returns {Promise<EDResponse>}
534
671
  */
535
672
  musicPosts({ musicId, cursor }: {
536
673
  musicId: string;
537
674
  cursor?: string;
538
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
675
+ }, options?: {
676
+ extraParams?: Record<string, any>;
677
+ timeout?: number;
678
+ }): Promise<EDResponse>;
539
679
  /**
540
680
  * @param {{ text: string }} params
541
- * @param {Record<string, any>} extraParams
681
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
542
682
  * @returns {Promise<EDResponse>}
543
683
  */
544
684
  search({ text }: {
545
685
  text: string;
546
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
686
+ }, options?: {
687
+ extraParams?: Record<string, any>;
688
+ timeout?: number;
689
+ }): Promise<EDResponse>;
547
690
  #private;
548
691
  }
549
692
  declare class TwitchEndpoints {
@@ -557,22 +700,28 @@ declare class TwitchEndpoints {
557
700
  * depth: number;
558
701
  * type: "videos" | "channels" | "games";
559
702
  * }} params
560
- * @param {Record<string, any>} extraParams
703
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
561
704
  * @returns {Promise<EDResponse>}
562
705
  */
563
706
  keywordSearch({ keyword, depth, type }: {
564
707
  keyword: string;
565
708
  depth: number;
566
709
  type: "videos" | "channels" | "games";
567
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
710
+ }, options?: {
711
+ extraParams?: Record<string, any>;
712
+ timeout?: number;
713
+ }): Promise<EDResponse>;
568
714
  /**
569
715
  * @param {{ username: string }} params
570
- * @param {Record<string, any>} extraParams
716
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
571
717
  * @returns {Promise<EDResponse>}
572
718
  */
573
719
  userFollowers({ username }: {
574
720
  username: string;
575
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
721
+ }, options?: {
722
+ extraParams?: Record<string, any>;
723
+ timeout?: number;
724
+ }): Promise<EDResponse>;
576
725
  #private;
577
726
  }
578
727
  declare class RedditEndpoints {
@@ -587,7 +736,7 @@ declare class RedditEndpoints {
587
736
  * period: "hour" | "day" | "week" | "month" | "year" | "all";
588
737
  * cursor?: string;
589
738
  * }} params
590
- * @param {Record<string, any>} extraParams
739
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
591
740
  * @returns {Promise<EDResponse>}
592
741
  */
593
742
  subredditPosts({ name, sort, period, cursor }: {
@@ -595,16 +744,22 @@ declare class RedditEndpoints {
595
744
  sort: "hot" | "new" | "top" | "rising";
596
745
  period: "hour" | "day" | "week" | "month" | "year" | "all";
597
746
  cursor?: string;
598
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
747
+ }, options?: {
748
+ extraParams?: Record<string, any>;
749
+ timeout?: number;
750
+ }): Promise<EDResponse>;
599
751
  /**
600
752
  * @param {{ id: string; cursor?: string }} params
601
- * @param {Record<string, any>} extraParams
753
+ * @param {{ extraParams?: Record<string, any>; timeout?: number }} options
602
754
  * @returns {Promise<EDResponse>}
603
755
  */
604
756
  postComments({ id, cursor }: {
605
757
  id: string;
606
758
  cursor?: string;
607
- }, extraParams?: Record<string, any>): Promise<EDResponse>;
759
+ }, options?: {
760
+ extraParams?: Record<string, any>;
761
+ timeout?: number;
762
+ }): Promise<EDResponse>;
608
763
  #private;
609
764
  }
610
765
  import { Requester } from "./requester.js";