import type { Locator, Page } from 'playwright-core'; import type { StructuredExtractListSchema, StructuredExtractObjectSchema, StructuredExtractResult, StructuredExtractRootSchema, StructuredExtractScalarSchema } from '../types'; type CompiledStructuredExtractScalarSchema = StructuredExtractScalarSchema & { path: string; }; type CompiledStructuredExtractObjectSchema = Omit & { fields: Record; path: string; }; type CompiledStructuredExtractListSchema = Omit & { item: CompiledStructuredExtractSchema; path: string; }; export type CompiledStructuredExtractSchema = CompiledStructuredExtractScalarSchema | CompiledStructuredExtractObjectSchema | CompiledStructuredExtractListSchema; export type CompiledStructuredExtractRootSchema = CompiledStructuredExtractObjectSchema | CompiledStructuredExtractListSchema; export declare class StructuredExtractSchemaError extends Error { readonly statusCode = 400; constructor(message: string); } export interface StructuredScopeAdapter { queryAll(selector: string): Promise; text(): Promise; html(): Promise; attr(name: string): Promise; getBaseUrl(): string; } export declare class StructuredExtractRuntimeError extends Error { readonly statusCode = 422; readonly fieldPath: string; readonly reason: string; constructor(fieldPath: string, reason: string); } export declare function validateStructuredExtractSchema(schema: StructuredExtractRootSchema): CompiledStructuredExtractRootSchema; export declare function buildFieldPath(path: string, key: string | number): string; export declare function createLocatorScope(locator: Locator, baseUrl: string): StructuredScopeAdapter; export declare function extractStructuredFromScope(scope: StructuredScopeAdapter, schema: StructuredExtractRootSchema, path?: string): Promise; export declare function extractStructuredData(page: Page, schema: StructuredExtractRootSchema): Promise; export {}; //# sourceMappingURL=structured-extractor.d.ts.map