import { type Oas3Visitor, type Oas3Parameter, type Oas3Schema, type Oas3_1Schema, type Referenced } from '@redocly/openapi-core';
import type { DebugMediaTypeLog, DebugSchemaEntry, DocumentMetrics, OperationMetrics, SchemaStats } from '../types.js';
type Schema = Oas3Schema | Oas3_1Schema;
type Param = Oas3Parameter<Schema>;
export interface SchemaWalkState {
    depth: number;
    maxDepth: number;
    polymorphismCount: number;
    anyOfCount: number;
    hasDiscriminator: boolean;
    totalSchemaProperties: number;
    schemaPropertiesWithDescription: number;
    constraintCount: number;
    hasPropertyExamples: boolean;
    writableTopLevelFields: number;
    refsUsed: string[];
    debugEntries: DebugSchemaEntry[] | null;
    pendingRef: string | null;
}
export declare function createSchemaWalkState(): SchemaWalkState;
export declare function resetSchemaWalkState(s: SchemaWalkState): void;
export declare function createSchemaMetricVisitor(state: SchemaWalkState): Oas3Visitor;
interface CurrentOperationContext {
    path: string;
    method: string;
    operationId?: string;
    operationDescriptionPresent: boolean;
    parameterCount: number;
    requiredParameterCount: number;
    paramsWithDescription: number;
    ambiguousIdentifierCount: number;
    maxRequestSchemaDepth: number;
    maxResponseSchemaDepth: number;
    totalSchemaProperties: number;
    schemaPropertiesWithDescription: number;
    constraintCount: number;
    polymorphismCount: number;
    anyOfCount: number;
    hasDiscriminator: boolean;
    topLevelWritableFieldCount: number;
    requestBodyPresent: boolean;
    requestExamplePresent: boolean;
    responseExamplePresent: boolean;
    structuredErrorResponseCount: number;
    totalErrorResponses: number;
    inRequestBody: boolean;
    inResponse: boolean;
    currentResponseCode: string;
    errorStructuredCounted: boolean;
    /** Internal: best schema walk for polymorphism + anyOf (see `effectivePolymorphismFromCounts`). */
    maxEffectivePolymorphism: number;
    refsUsed: Set<string>;
}
export interface ScoreAccumulator {
    operations: Map<string, OperationMetrics>;
    currentPath: string;
    pathLevelParams: Array<Referenced<Param>>;
    current: CurrentOperationContext | null;
    walkSchema: (schema: any, debug?: boolean) => SchemaStats;
    /** Must match scoring `weights.anyOfPenaltyMultiplier` for this run. */
    anyOfPenaltyMultiplier: number;
    debugOperationId?: string;
    debugLogs: DebugMediaTypeLog[];
}
export declare function createScoreAccumulator(walkSchema: (schema: any, debug?: boolean) => SchemaStats, anyOfPenaltyMultiplier: number, debugOperationId?: string): ScoreAccumulator;
export declare function createScoreVisitor(accumulator: ScoreAccumulator): Oas3Visitor;
export declare function getDocumentMetrics(accumulator: ScoreAccumulator): DocumentMetrics;
export {};
//# sourceMappingURL=document-metrics.d.ts.map