import { Schema } from "./schema-types.mjs"; import { SchemaRule } from "./rule-types.mjs"; //#region ../@warlock.js/seal/src/types/context-types.d.ts type RuleTranslation = { rule: SchemaRule; context: SchemaContext; attributes: { input: string; path: string; key: string; value: any; [key: string]: any; }; }; type AttributeTranslation = { attribute: string; context: SchemaContext; rule: SchemaRule; }; /** * Validation context passed to validators and rules */ type SchemaContext = { /** All input values */allValues: any; /** Parent object if nested */ parent: any; /** Current value being validated */ value: any; /** Current key */ key: string; /** Full path to the current value */ path: string; /** Schema definition if object validator */ schema?: Schema; /** Additional context */ context?: Record; /** Root context */ rootContext?: Record; /** Translation function for error messages */ translateRule: (ruleTranslation: RuleTranslation) => string; translateAttribute: (attributeTranslation: AttributeTranslation) => string; /** Validation configurations */ configurations?: { firstErrorOnly?: boolean; }; }; //#endregion export { AttributeTranslation, RuleTranslation, SchemaContext }; //# sourceMappingURL=context-types.d.mts.map