import type { TestResult, RuleInput } from '../types.js'; export type RedirectHop = { url: string; status: number; }; export type RedirectChainResult = TestResult<{ hops: RedirectHop[]; finalUrl: string; chainLength: number; }, { maxChainLength: number; }>; export type RedirectChainOptions = { /** * Maximum number of redirects allowed before flagging as an issue. * Default: 3. Google recommends keeping chains under 3–5 hops. */ maxChainLength?: number; /** Request timeout in ms. Default: 10000. */ timeout?: number; userAgent?: string; }; /** * Follows redirect chains manually (fetch with redirect: 'manual') to detect: * 1. Chains longer than maxChainLength * 2. Redirect loops (cycles) * 3. HTTP→HTTPS redirects (informational) * * Pass: chain length ≤ maxChainLength and no loops * Warn: chain is long but within some tolerance; or HTTP→HTTPS redirect present * Fail: chain exceeds maxChainLength, or redirect loop detected */ export declare function checkRedirectChain(url: string, input: Pick, options?: RedirectChainOptions): Promise; declare function formatChain(hops: RedirectHop[]): string; export { formatChain as formatChainForTest }; //# sourceMappingURL=redirect-chain.d.ts.map