import type { AnyObject, BaseDBEntity, JsonSchemaAllOf, JsonSchemaArray, JsonSchemaOneOf, JsonSchemaTuple } from '../index';
import type { JsonSchema, JsonSchemaAny, JsonSchemaBoolean, JsonSchemaConst, JsonSchemaEnum, JsonSchemaNull, JsonSchemaNumber, JsonSchemaObject, JsonSchemaRef, JsonSchemaString } from './jsonSchema.model';
export interface JsonSchemaBuilder<T = unknown> {
    build: () => JsonSchema<T>;
}
/**
 * Fluent (chainable) API to manually create Json Schemas.
 * Inspired by Joi
 */
export declare const jsonSchema: {
    any<T = unknown>(): JsonSchemaAnyBuilder<T, JsonSchemaAny<T>>;
    const<T = unknown>(value: T): JsonSchemaAnyBuilder<T, JsonSchemaConst<T>>;
    null(): JsonSchemaAnyBuilder<null, JsonSchemaNull>;
    ref<T = unknown>($ref: string): JsonSchemaAnyBuilder<T, JsonSchemaRef<T>>;
    enum<T = unknown>(enumValues: T[]): JsonSchemaAnyBuilder<T, JsonSchemaEnum<T>>;
    boolean(): JsonSchemaAnyBuilder<boolean, JsonSchemaBoolean>;
    buffer(): JsonSchemaAnyBuilder<Buffer<ArrayBufferLike>, JsonSchemaAny<Buffer<ArrayBufferLike>>>;
    number(): JsonSchemaNumberBuilder;
    integer(): JsonSchemaNumberBuilder;
    unixTimestamp(): JsonSchemaNumberBuilder;
    unixTimestamp2000(): JsonSchemaNumberBuilder;
    string(): JsonSchemaStringBuilder;
    dateString(): JsonSchemaStringBuilder;
    object<T extends AnyObject>(props: { [k in keyof T]: JsonSchemaAnyBuilder<T[k]>; }): JsonSchemaObjectBuilder<T>;
    rootObject<T extends AnyObject>(props: { [k in keyof T]: JsonSchemaAnyBuilder<T[k]>; }): JsonSchemaObjectBuilder<T>;
    array<ITEM = unknown>(itemSchema: JsonSchemaAnyBuilder<ITEM>): JsonSchemaArrayBuilder<ITEM>;
    tuple<T extends any[] = unknown[]>(items: JsonSchemaAnyBuilder[]): JsonSchemaTupleBuilder<T>;
    oneOf<T = unknown>(items: JsonSchemaAnyBuilder[]): JsonSchemaAnyBuilder<T, JsonSchemaOneOf<T>>;
    allOf<T = unknown>(items: JsonSchemaAnyBuilder[]): JsonSchemaAnyBuilder<T, JsonSchemaAllOf<T>>;
};
export declare class JsonSchemaAnyBuilder<T = unknown, SCHEMA_TYPE extends JsonSchema<T> = JsonSchema<T>> implements JsonSchemaBuilder<T> {
    protected schema: SCHEMA_TYPE;
    constructor(schema: SCHEMA_TYPE);
    /**
     * Used in ObjectBuilder to access schema.optionalProperty
     */
    getSchema(): SCHEMA_TYPE;
    $schema($schema: string): this;
    $schemaDraft7(): this;
    $id($id: string): this;
    title(title: string): this;
    description(description: string): this;
    deprecated(deprecated?: boolean): this;
    type(type: string): this;
    default(v: any): this;
    oneOf(schemas: JsonSchema[]): this;
    allOf(schemas: JsonSchema[]): this;
    instanceof(of: string): this;
    optional(optional?: boolean): this;
    /**
     * Produces a "clean schema object" without methods.
     * Same as if it would be JSON.stringified.
     */
    build(): SCHEMA_TYPE;
    clone(): JsonSchemaAnyBuilder<T, SCHEMA_TYPE>;
}
export declare class JsonSchemaNumberBuilder extends JsonSchemaAnyBuilder<number, JsonSchemaNumber> {
    constructor();
    integer(): this;
    multipleOf(multipleOf: number): this;
    min(minimum: number): this;
    exclusiveMin(exclusiveMinimum: number): this;
    max(maximum: number): this;
    exclusiveMax(exclusiveMaximum: number): this;
    /**
     * Both ranges are inclusive.
     */
    range(minimum: number, maximum: number): this;
    format(format: string): this;
    int32: () => this;
    int64: () => this;
    float: () => this;
    double: () => this;
    unixTimestamp: () => this;
    unixTimestamp2000: () => this;
    unixTimestampMillis: () => this;
    unixTimestampMillis2000: () => this;
    utcOffset: () => this;
    utcOffsetHours: () => this;
}
export declare class JsonSchemaStringBuilder extends JsonSchemaAnyBuilder<string, JsonSchemaString> {
    constructor();
    pattern(pattern: string): this;
    min(minLength: number): this;
    max(maxLength: number): this;
    length(minLength: number, maxLength: number): this;
    format(format: string): this;
    email: () => this;
    date: () => this;
    url: () => this;
    ipv4: () => this;
    ipv6: () => this;
    password: () => this;
    id: () => this;
    slug: () => this;
    semVer: () => this;
    languageTag: () => this;
    countryCode: () => this;
    currency: () => this;
    trim: (trim?: boolean) => this;
    toLowerCase: (toLowerCase?: boolean) => this;
    toUpperCase: (toUpperCase?: boolean) => this;
    private transformModify;
}
export declare class JsonSchemaObjectBuilder<T extends AnyObject> extends JsonSchemaAnyBuilder<T, JsonSchemaObject<T>> {
    constructor();
    addProperties(props: {
        [k in keyof T]: JsonSchemaBuilder<T[k]>;
    }): this;
    /**
     * Ensures `required` is always sorted and _uniq
     */
    required(required: (keyof T)[]): this;
    addRequired(required: (keyof T)[]): this;
    minProps(minProperties: number): this;
    maxProps(maxProperties: number): this;
    additionalProps(additionalProperties: boolean): this;
    baseDBEntity(): JsonSchemaObjectBuilder<T & BaseDBEntity>;
    extend<T2 extends AnyObject>(s2: JsonSchemaObjectBuilder<T2>): JsonSchemaObjectBuilder<T & T2>;
}
export declare class JsonSchemaArrayBuilder<ITEM> extends JsonSchemaAnyBuilder<ITEM[], JsonSchemaArray<ITEM>> {
    constructor(itemsSchema: JsonSchemaBuilder<ITEM>);
    min(minItems: number): this;
    max(maxItems: number): this;
    unique(uniqueItems: number): this;
}
export declare class JsonSchemaTupleBuilder<T extends any[]> extends JsonSchemaAnyBuilder<T, JsonSchemaTuple<T>> {
    constructor(items: JsonSchemaBuilder[]);
}
