import * as m from 'monocle-ts'; import { Option } from 'fp-ts/lib/Option'; export interface DescriptionSchema { description?: string; } export interface StringSchema extends DescriptionSchema { type: 'string'; minLength?: number; maxLength?: number; format?: 'date-time' | 'date' | 'password' | 'byte' | 'binary' | 'bigint'; } export declare const StringSchema: (x?: { minLength?: number | undefined; maxLength?: number | undefined; format?: "bigint" | "date-time" | "date" | "password" | "byte" | "binary" | undefined; description?: string | undefined; } | undefined) => StringSchema; export interface EnumSchema extends DescriptionSchema { type: 'string'; enum: string[]; } export declare const EnumSchema: (p: { enum: string[]; description?: string | undefined; }) => EnumSchema; export declare const isEnumSchema: (x: JSONSchema) => x is EnumSchema; export interface NumberSchema extends DescriptionSchema { type: 'number'; multipleOf?: number; minimum?: number; exclusiveMinimum?: boolean; maximum?: number; exclusiveMaximum?: boolean; } export declare const NumberSchema: (x?: { multipleOf?: number | undefined; minimum?: number | undefined; exclusiveMinimum?: boolean | undefined; maximum?: number | undefined; exclusiveMaximum?: boolean | undefined; description?: string | undefined; } | undefined) => NumberSchema; export interface BooleanSchema extends DescriptionSchema { type: 'boolean'; } export declare const BooleanSchema: (p: { description?: string | undefined; }) => { description?: string | undefined; type: string; }; export interface ArraySchema extends DescriptionSchema { type: 'array'; items: SubSchema | SubSchema[]; } export declare const ArraySchema: (p: { items: StringSchema | NumberSchema | BooleanSchema | ArraySchema | ObjectSchema | (EnumSchema & { $schema?: string | undefined; }) | Ref | SubSchema[]; description?: string | undefined; minItems?: number | undefined; maxItems?: number | undefined; }) => { items: StringSchema | NumberSchema | BooleanSchema | ArraySchema | ObjectSchema | (EnumSchema & { $schema?: string | undefined; }) | Ref | SubSchema[]; description?: string | undefined; minItems?: number | undefined; maxItems?: number | undefined; type: "array"; }; export declare const itemsOfArrayLense: m.Lens; export interface Ref { $ref: string; } export declare const Ref: ($ref: string) => Ref; export interface ObjectSchema extends DescriptionSchema { type?: 'object'; description?: string; required?: string[]; properties?: Record; additionalProperties?: SubSchema; oneOf?: (ObjectSchema | Ref)[]; } export declare const objectSchemaOnRequired: m.Lens; export declare const ObjectSchema: (x: { description?: string | undefined; required?: string[] | undefined; properties?: Record | undefined; oneOf?: (ObjectSchema | Ref)[] | undefined; }) => ObjectSchema; export declare const isObjectSchema: (x: SubSchema) => x is ObjectSchema; export declare const jsonToObjectSchemaPrism: m.Prism; export declare type SubSchema = JSONSchema | Ref; export declare const SubSchema: (x: SubSchema) => SubSchema; export declare type Anything = {}; export declare const Anything: Anything; export declare type JSONSchema = StringSchema | NumberSchema | BooleanSchema | ArraySchema | ObjectSchema | (EnumSchema & { $schema?: string; }); export declare const isTypeObject: (schema: SubSchema) => schema is ObjectSchema; export declare const getOneOf: (obj: ObjectSchema) => Option<(ObjectSchema | Ref)[]>; export declare const isTypeArray: (schema: SubSchema) => schema is ArraySchema; export declare const isTypeRef: (schema: SubSchema) => schema is Ref; export declare const isnotTypeRef: (schema: SubSchema) => schema is JSONSchema; export declare const isNotPrimitive: (schema: SubSchema) => boolean; export declare const isStringSchema: (schema: JSONSchema) => schema is StringSchema; export declare const isNumberSchema: (schema: JSONSchema) => schema is NumberSchema; export declare const isBooleanSchema: (schema: JSONSchema) => schema is BooleanSchema; export declare const isPrimitive: (schema: SubSchema) => schema is StringSchema | NumberSchema | BooleanSchema; export declare const isObjectOrRef: (schema: SubSchema) => schema is ObjectSchema | Ref; export declare const isNamed: (schema: SubSchema) => boolean; export declare const definitionPath: (prefix: string) => (schema: SubSchema) => string; export declare const refOf: (prefix: string) => (schema: SubSchema) => Ref;