-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbatch-fetch.ts
More file actions
44 lines (38 loc) · 928 Bytes
/
batch-fetch.ts
File metadata and controls
44 lines (38 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import {
FetchStealthMode,
FetchOutputOptions,
FetchBrowserOptions,
FetchNavigationOptions,
FetchCacheOptions,
PageData,
} from "./common";
import { FetchStatus } from "./fetch";
export type BatchFetchJobStatus = FetchStatus;
export interface StartBatchFetchJobParams {
urls: string[];
stealth?: FetchStealthMode;
outputs?: FetchOutputOptions;
browser?: FetchBrowserOptions;
navigation?: FetchNavigationOptions;
cache?: FetchCacheOptions;
}
export interface GetBatchFetchJobParams {
page?: number;
batchSize?: number;
}
export interface StartBatchFetchJobResponse {
jobId: string;
}
export interface BatchFetchJobStatusResponse {
status: BatchFetchJobStatus;
}
export interface BatchFetchJobResponse {
jobId: string;
status: BatchFetchJobStatus;
error?: string;
data?: PageData[];
totalPages: number;
totalPageBatches: number;
currentPageBatch: number;
batchSize: number;
}