import { Resource, EnqueueUrlOptions } from '../../index.js'; import { PageDataOptions, PageContentOptions, PatternDefinition, ConditionalPatternGroup } from '../html/index.js'; import { TechAuditOptions } from '../browser/index.js'; import { PropertyMap } from '../map-properties.js'; import { MimeTypeMap } from '../file/process-resource-file.js'; /** * Options to control the behavior of the processPage utility function. */ export interface PageAnalysisOptions extends Record { /** * Options for structured data parsing, including HTML Meta tags and other * metadata standards. Setting this to `false` skips all metadata extraction. * * Note: By default, running data extraction will overwrite any information in a * Resource object's existing `data` property. */ data?: PageDataOptions | boolean; /** * If a resource passed in for analysis has a file attachment, this mapping dictionary * determines which GenericFile class will be responsible for parsing it. * * Setting this value to `false` will bypass all downloaded file parsing. * * @defaultValues */ files?: MimeTypeMap | false; /** * One or more {@link PropertyMap} rules that determine what {@link Site} * the {@link Resource} belongs to. * * The value here corresponds to the unique key of a {@link Site}; */ site?: PropertyMap | PropertyMap[] | false; /** * Options for content analysis, including the transformation of core page content * to plaintext, readability analysis, etc. Setting this to `false` skips all content * analysis. * * Note: By default, running content analysis will overwrite any information in a * Resource object's existing `content` property. */ content?: PageContentOptions | boolean; /** * Options for technology fingerprinting. Setting this to `false` skips all fingerprinting. */ tech?: TechAuditOptions | boolean; /** * Options for rebuilding the metadata for a page's outgoing links. * * @defaultValue: false */ links?: EnqueueUrlOptions | boolean; /** * A dictionary used to map existing data on a {@link Resource} to new properties. * If this property is set to `false`, property mapping is skipped entirely. * * The key of each entry is the destination name or dot-notation path of a property * Resource, and the value of each entry is one or more {@link PropertyMap} * rules describing where the new property's value should be found. * * If an array is given, the individual {@link PropertyMap} records will be * checked in order; the first one to produce a value will be used. If no value is * produced, the destination property will remain undefined. */ properties?: Record | false; /** * An array of {@link PatternDefinition} rules or {@link ConditionalPatternGroup} used * to detect instances of known design components in each page's markup. */ patterns?: (PatternDefinition | ConditionalPatternGroup)[] | false; } export declare function analyzePage(resource: Resource, customOptions?: PageAnalysisOptions): Promise; //# sourceMappingURL=analyze-page.d.ts.map