import { SyncWaterfallHook } from "tapable-ts"; import type { Schema as SchemaType, Formatting } from "@player-ui/types"; import type { BindingInstance } from "../binding"; import type { ValidationProvider, ValidationObject } from "../validator"; import type { FormatDefinition, FormatOptions, FormatType } from "./types"; /** Expand the authored schema into a set of paths -> DataTypes */ export declare function parse(schema: SchemaType.Schema): Map; /** * The Schema is the central hub for all data invariants, and metaData associated with the data-model itself * Outside of the types defined in the JSON payload, it doesn't manage or keep any state. * It simply servers as an orchestrator for other modules to interface w/ the schema. */ export declare class SchemaController implements ValidationProvider { private formatters; private types; readonly schema: Map; private bindingSchemaNormalizedCache; readonly hooks: { resolveTypeForBinding: SyncWaterfallHook<[SchemaType.DataTypes | undefined, BindingInstance], Record>; }; constructor(schema?: SchemaType.Schema); addFormatters(fns: Array>): void; addDataTypes(types: Array>): void; getValidationsForBinding(binding: BindingInstance): Array | undefined; private normalizeBinding; getType(binding: BindingInstance): SchemaType.DataTypes | undefined; getApparentType(binding: BindingInstance): SchemaType.DataTypes | undefined; getTypeDefinition(dataType: string): SchemaType.DataType | undefined; getFormatterForType(formatReference: Formatting.Reference): FormatDefinition | undefined; /** * Given a binding, fetch a function that's responsible for formatting, and/or de-formatting the data * If no formatter is registered, it will return undefined */ getFormatter(binding: BindingInstance): FormatDefinition | undefined; } //# sourceMappingURL=schema.d.ts.map