1 | import type { RequestOptions } from '../request';
|
2 | import { Request } from '../request';
|
3 | import type { EnqueueLinksOptions } from './enqueue_links';
|
4 | export declare type UrlPatternObject = {
|
5 | glob?: string;
|
6 | regexp?: RegExp;
|
7 | } & Pick<RequestOptions, 'method' | 'payload' | 'label' | 'userData' | 'headers'>;
|
8 | export declare type PseudoUrlObject = {
|
9 | purl: string;
|
10 | } & Pick<RequestOptions, 'method' | 'payload' | 'label' | 'userData' | 'headers'>;
|
11 | export declare type PseudoUrlInput = string | PseudoUrlObject;
|
12 | export declare type GlobObject = {
|
13 | glob: string;
|
14 | } & Pick<RequestOptions, 'method' | 'payload' | 'label' | 'userData' | 'headers'>;
|
15 | export declare type GlobInput = string | GlobObject;
|
16 | export declare type RegExpObject = {
|
17 | regexp: RegExp;
|
18 | } & Pick<RequestOptions, 'method' | 'payload' | 'label' | 'userData' | 'headers'>;
|
19 | export declare type RegExpInput = RegExp | RegExpObject;
|
20 |
|
21 |
|
22 |
|
23 | export declare function updateEnqueueLinksPatternCache(item: GlobInput | RegExpInput | PseudoUrlInput, pattern: RegExpObject | GlobObject): void;
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare function constructRegExpObjectsFromPseudoUrls(pseudoUrls: PseudoUrlInput[]): RegExpObject[];
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare function constructGlobObjectsFromGlobs(globs: GlobInput[]): GlobObject[];
|
36 |
|
37 |
|
38 |
|
39 | export declare function validateGlobPattern(glob: string): string;
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | export declare function constructRegExpObjectsFromRegExps(regexps: RegExpInput[]): RegExpObject[];
|
46 |
|
47 |
|
48 |
|
49 | export declare function createRequests(requestOptions: (string | RequestOptions)[], urlPatternObjects?: UrlPatternObject[]): Request[];
|
50 | export declare function filterRequestsByPatterns(requests: Request[], patterns?: UrlPatternObject[]): Request[];
|
51 |
|
52 |
|
53 |
|
54 | export declare function createRequestOptions(sources: (string | Record<string, unknown>)[], options?: Pick<EnqueueLinksOptions, 'label' | 'userData'>): RequestOptions[];
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | export interface RequestTransform {
|
60 | |
61 |
|
62 |
|
63 |
|
64 | (original: RequestOptions): RequestOptions | false | undefined | null;
|
65 | }
|
66 |
|
\ | No newline at end of file |