import { IGeneralFieldState, GeneralField, FormPathPattern, IFieldFactoryProps } from '@formily/core'; declare type SchemaEnum = Array; declare type SchemaTypes = 'string' | 'object' | 'array' | 'number' | 'boolean' | 'void' | 'date' | 'datetime' | (string & {}); declare type SchemaProperties = Record>; declare type SchemaPatch = (schema: ISchema) => ISchema; declare type SchemaKey = string | number; declare type SchemaEffectTypes = 'onFieldInit' | 'onFieldMount' | 'onFieldUnmount' | 'onFieldValueChange' | 'onFieldInputValueChange' | 'onFieldInitialValueChange' | 'onFieldValidateStart' | 'onFieldValidateEnd' | 'onFieldValidateFailed' | 'onFieldValidateSuccess'; declare type SchemaReaction = { dependencies?: Array | Record; when?: string | boolean; target?: string; effects?: (SchemaEffectTypes | (string & {}))[]; fulfill?: { state?: Stringify; schema?: ISchema; run?: string; }; otherwise?: { state?: Stringify; schema?: ISchema; run?: string; }; [key: string]: any; } | ((field: Field, scope: IScopeContext) => void); declare type SchemaReactions = SchemaReaction | SchemaReaction[]; declare type SchemaItems = ISchema | ISchema[]; declare type SchemaComponents = Record; interface ISchemaFieldUpdateRequest { state?: Stringify; schema?: ISchema; run?: string; } interface IScopeContext { [key: string]: any; } interface IFieldStateSetterOptions { field: GeneralField; target?: FormPathPattern; request: ISchemaFieldUpdateRequest; runner?: string; scope?: IScopeContext; } interface ISchemaTransformerOptions { scope?: IScopeContext; } declare type Slot = { target: string; isRenderProp?: boolean; }; declare type Stringify

= { [key in keyof P]?: P[key] | (string & {}); }; declare type ISchema = Stringify<{ version?: string; name?: SchemaKey; title?: Message; description?: Message; default?: any; readOnly?: boolean; writeOnly?: boolean; type?: SchemaTypes; enum?: SchemaEnum; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string[] | boolean | string; format?: string; $ref?: string; $namespace?: string; /** nested json schema spec **/ definitions?: SchemaProperties; properties?: SchemaProperties; items?: SchemaItems; additionalItems?: ISchema; patternProperties?: SchemaProperties; additionalProperties?: ISchema; ['x-value']?: any; ['x-index']?: number; ['x-pattern']?: Pattern; ['x-display']?: Display; ['x-validator']?: Validator; ['x-decorator']?: Decorator | (string & {}) | ((...args: any[]) => any); ['x-decorator-props']?: DecoratorProps; ['x-component']?: Component | (string & {}) | ((...args: any[]) => any); ['x-component-props']?: ComponentProps; ['x-reactions']?: SchemaReactions; ['x-content']?: any; ['x-data']?: any; ['x-visible']?: boolean; ['x-hidden']?: boolean; ['x-disabled']?: boolean; ['x-editable']?: boolean; ['x-read-only']?: boolean; ['x-read-pretty']?: boolean; ['x-compile-omitted']?: string[]; [key: `x-${string | number}` | symbol]: any; }>; declare class Schema implements ISchema { parent?: Schema; root?: Schema; name?: SchemaKey; title?: Message; description?: Message; default?: any; readOnly?: boolean; writeOnly?: boolean; type?: SchemaTypes; enum?: SchemaEnum; const?: any; multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; maxLength?: number; minLength?: number; pattern?: string | RegExp; maxItems?: number; minItems?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; required?: string[] | boolean | string; format?: string; /** nested json schema spec **/ definitions?: Record>; properties?: Record>; items?: Schema | Schema[]; additionalItems?: Schema; patternProperties?: Record>; additionalProperties?: Schema; ['x-index']?: number; ['x-pattern']?: Pattern; ['x-display']?: Display; ['x-validator']?: Validator; ['x-decorator']?: Decorator; ['x-decorator-props']?: DecoratorProps; ['x-component']?: Component; ['x-component-props']?: ComponentProps; ['x-reactions']?: SchemaReaction[]; ['x-content']?: any; ['x-data']?: any; ['x-visible']?: boolean; ['x-hidden']?: boolean; ['x-disabled']?: boolean; ['x-editable']?: boolean; ['x-read-only']?: boolean; ['x-read-pretty']?: boolean; ['x-compile-omitted']?: string[]; ['x-slot-node']?: Slot; [key: `x-${string | number}` | symbol]: any; _isJSONSchemaObject: boolean; version: string; constructor(json: ISchema, parent?: Schema); addProperty: (key: SchemaKey, schema: ISchema) => Schema; removeProperty: (key: SchemaKey) => Schema; setProperties: (properties: SchemaProperties) => this; addPatternProperty: (key: SchemaKey, schema: ISchema) => Schema; removePatternProperty: (key: SchemaKey) => Schema; setPatternProperties: (properties: SchemaProperties) => this; setAdditionalProperties: (properties: ISchema) => Schema; setItems: (schema: ISchema | ISchema[]) => Schema | Schema[]; setAdditionalItems: (items: ISchema) => Schema; findDefinitions: (ref: string) => any; mapProperties: (callback?: (schema: Schema, key: SchemaKey, index: number) => T) => T[]; mapPatternProperties: (callback?: (schema: Schema, key: SchemaKey, index: number) => T) => T[]; reduceProperties: (callback?: (buffer: P, schema: Schema, key: SchemaKey, index: number) => R, predicate?: P) => R; reducePatternProperties: (callback?: (buffer: P, schema: Schema, key: SchemaKey, index: number) => R, predicate?: P) => R; compile: (scope?: any) => Schema; fromJSON: (json: ISchema) => Schema; toJSON: (recursion?: boolean) => ISchema; toFieldProps: (options?: ISchemaTransformerOptions) => IFieldFactoryProps; static getOrderProperties: (schema?: ISchema, propertiesName?: keyof ISchema) => any[]; static compile: (expression: any, scope?: any) => any; static shallowCompile: (expression: any, scope?: any) => any; static isSchemaInstance: (value: any) => value is Schema; static registerCompiler: (compiler: (expression: string, scope: any) => any) => void; static registerPatches: (...args: SchemaPatch[]) => void; static registerVoidComponents: (components: string[]) => void; static registerTypeDefaultComponents: (maps: Record) => void; static registerPolyfills: (version: string, patch: SchemaPatch) => void; static enablePolyfills: (versions?: string[]) => void; static silent: (value?: boolean) => void; } export { IFieldStateSetterOptions, ISchema, ISchemaFieldUpdateRequest, ISchemaTransformerOptions, IScopeContext, Schema, SchemaComponents, SchemaEffectTypes, SchemaEnum, SchemaItems, SchemaKey, SchemaPatch, SchemaProperties, SchemaReaction, SchemaReactions, SchemaTypes, Slot, Stringify };