import { Type, Field, FieldOptions, PolymorphicOptions, ForeignKey } from "./schema"; export declare abstract class BaseField { name: string; nullable?: boolean; storageKey?: string; serverDefault?: any; unique?: boolean; hideFromGraphQL?: boolean; private?: boolean; sensitive?: boolean; graphqlName?: string; index?: boolean; foreignKey?: ForeignKey; polymorphic?: boolean | PolymorphicOptions; derivedFields?: Field[]; derivedWhenEmbedded?: boolean; logValue(val: any): any; } export declare class UUIDField extends BaseField implements Field { type: Type; constructor(options: FieldOptions); } export declare function UUIDType(options: FieldOptions): UUIDField; export declare class IntegerField extends BaseField implements Field { type: Type; } export declare function IntegerType(options: FieldOptions): IntegerField; export declare class FloatField extends BaseField implements Field { type: Type; } export declare function FloatType(options: FieldOptions): FloatField; export declare class BooleanField extends BaseField implements Field { type: Type; } export declare function BooleanType(options: FieldOptions): BooleanField; export interface StringOptions extends FieldOptions { minLen?: number; maxLen?: number; length?: number; toLowerCase?: boolean; toUpperCase?: boolean; match?: string | RegExp; doesNotMatch?: string | RegExp; trim?: boolean; trimLeft?: boolean; trimRight?: boolean; } export declare class StringField extends BaseField implements Field { type: Type; private validators; private formatters; constructor(options?: StringOptions); getOptions(): StringOptions; private handleOptions; minLen(l: number): StringField; maxLen(l: number): StringField; length(l: number): StringField; valid(val: any): boolean; format(val: any): any; validate(validator: (str: string) => boolean): StringField; formatter(formatter: (str: string) => string): StringField; match(pattern: string | RegExp): StringField; doesNotMatch(pattern: string | RegExp): StringField; toLowerCase(): StringField; toUpperCase(): StringField; trim(): StringField; trimLeft(): StringField; trimRight(): StringField; } export declare function StringType(options: StringOptions): StringField; export interface TimestampOptions extends FieldOptions { withTimezone?: boolean; } export declare class TimestampField extends BaseField implements Field { type: Type; withTimezone?: boolean; constructor(options: TimestampOptions); format(val: Date): any; } export declare function TimestampType(options: TimestampOptions): TimestampField; export declare function TimestamptzType(options: FieldOptions): TimestampField; export interface TimeOptions extends FieldOptions { withTimezone?: boolean; precision?: number; } export declare const leftPad: (val: number) => string; export declare class TimeField extends BaseField implements Field { type: Type; withTimezone?: boolean; constructor(options: TimeOptions); format(val: any): any; } export declare function TimeType(options: TimeOptions): TimeField; export declare function TimetzType(options: FieldOptions): TimeField; export declare class DateField extends BaseField implements Field { type: Type; format(val: any): any; } export declare function DateType(options: FieldOptions): DateField; export interface EnumOptions extends FieldOptions { values?: string[]; tsType?: string; graphQLType?: string; createEnumType?: boolean; } export declare class EnumField extends BaseField implements Field { type: Type; private values?; constructor(options: EnumOptions); convertForGQL(value: string): string; valid(val: any): boolean; format(val: any): any; } export declare function EnumType(options: EnumOptions): EnumField; export declare class ListField extends BaseField { private field; type: Type; constructor(field: Field, options: FieldOptions); valid(val: any): boolean; format(val: any): any; } export declare function StringListType(options: StringOptions): ListField; export declare function IntListType(options: FieldOptions): ListField; export declare function FloatListType(options: FieldOptions): ListField; export declare function BooleanListType(options: FieldOptions): ListField; export declare function TimestampListType(options: TimestampOptions): ListField; export declare function TimestamptzListType(options: TimestampOptions): ListField; export declare function TimeListType(options: TimeOptions): ListField; export declare function TimetzListType(options: TimeOptions): ListField; export declare function DateListType(options: FieldOptions): ListField; export declare function EnumListType(options: EnumOptions): ListField;