export type Severity = 'error' | 'warning' | 'info'; export type RuleStatus = 'pass' | 'fail' | 'warn'; export type ExecutionContext = 'static' | 'rendered'; export type TestResult = { ruleId: string; status: RuleStatus; severity: Severity; actual: A; expected: E; selector?: string; message: string; context: ExecutionContext; url: string; duration?: number; helpUrl?: string; }; export type TitleResult = TestResult; export type DescriptionResult = TestResult; export type H1Result = TestResult; export type CanonicalResult = TestResult; export type NoindexResult = TestResult; export type LangResult = TestResult; export type OgResult = TestResult, { required: string[]; }>; export type ImgAltResult = TestResult<{ src: string; alt: string | null; }[], { allPresent: true; }>; export type StructuredDataResult = TestResult[], { required: string[]; }>; export type LinkCheckResult = TestResult<{ url: string; status: number; sourceSelector: string; }[], { maxBroken: 0; }>; export type RuleSeverityShorthand = 'error' | 'warning' | 'info' | 'off'; export type TitleLengthOptions = { min?: number; max?: number; severity?: Severity; }; export type DescriptionLengthOptions = { min?: number; max?: number; severity?: Severity; }; export type OgRequiredOptions = { tags?: string[]; severity?: Severity; }; export type BrokenLinksOptions = { scope?: 'internal' | 'external' | 'all'; severity?: Severity; externalScope?: RuleSeverityShorthand; timeout?: number; ignorePatterns?: RegExp[]; maxConcurrency?: number; userAgent?: string; }; export type StructuredDataOptions = { required?: string[]; severity?: Severity; }; export type RuleConfig = RuleSeverityShorthand | TitleLengthOptions | DescriptionLengthOptions | OgRequiredOptions | BrokenLinksOptions | StructuredDataOptions; export type WaitForStrategy = { type: 'selector'; selector: string; } | { type: 'title'; value: string | RegExp; } | { type: 'networkidle'; } | { type: 'load'; }; export type ExecutionMode = 'fast' | 'full'; export type PageConfig = { path: string; mode?: ExecutionMode; waitFor?: WaitForStrategy; rules?: Partial; }; export type DiscoveryConfig = { type: 'sitemap'; url: string; limit?: number; } | { type: 'list'; urls: string[]; } | { type: 'crawl'; startUrl: string; limit?: number; }; export type SeoRules = { 'title-length': RuleSeverityShorthand | TitleLengthOptions; 'description-length': RuleSeverityShorthand | DescriptionLengthOptions; 'img-alt': RuleSeverityShorthand; 'canonical': RuleSeverityShorthand; 'noindex': RuleSeverityShorthand; 'og-required': RuleSeverityShorthand | OgRequiredOptions; 'hreflang': RuleSeverityShorthand; 'robots-txt': RuleSeverityShorthand; 'x-robots-tag': RuleSeverityShorthand; 'broken-links': RuleSeverityShorthand | BrokenLinksOptions; 'structured-data': RuleSeverityShorthand | StructuredDataOptions; 'h1-single': RuleSeverityShorthand; 'lang': RuleSeverityShorthand; }; export type SeoConfig = { baseUrl: string; rules?: Partial; pages?: PageConfig[]; discovery?: DiscoveryConfig; }; export type RuleInput = { html: string; url: string; context: ExecutionContext; responseHeaders?: Record; }; export type RuleFunction = (input: RuleInput, options?: Record) => R | Promise; //# sourceMappingURL=types.d.ts.map