/**
 * Copyright (c) 2025 TaylorDB
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
interface FileInformation {
    fieldname: string;
    originalname: string;
    encoding: string;
    mimetype: string;
    destination: string;
    filename: string;
    path: string;
    size: number;
    format: string;
    width: number;
    height: number;
}
interface UploadResponse {
    collectionName: string;
    fileInformation: FileInformation;
    metadata: {
        thumbnails: any[];
        clips: any[];
    };
    baseId: string;
    storageAdaptor: string;
    _id: string;
    __v: number;
}
export interface AttachmentColumnValue {
    url: string;
    fileType: string;
    size: number;
}
export declare class Attachment {
    readonly collectionName: string;
    readonly fileInformation: FileInformation;
    readonly metadata: {
        thumbnails: any[];
        clips: any[];
    };
    readonly baseId: string;
    readonly storageAdaptor: string;
    readonly _id: string;
    constructor(data: UploadResponse);
    toColumnValue(): AttachmentColumnValue;
}
type IsWithinOperatorValue = 'pastWeek' | 'pastMonth' | 'pastYear' | 'nextWeek' | 'nextMonth' | 'nextYear' | 'daysFromNow' | 'daysAgo' | 'currentWeek' | 'currentMonth' | 'currentYear';
type DefaultDateFilterValue = ('today' | 'tomorrow' | 'yesterday' | 'oneWeekAgo' | 'oneWeekFromNow' | 'oneMonthAgo' | 'oneMonthFromNow') | ['exactDay' | 'exactTimestamp', string] | ['daysAgo' | 'daysFromNow', number];
type DateFilters = {
    '=': DefaultDateFilterValue;
    '!=': DefaultDateFilterValue;
    '<': DefaultDateFilterValue;
    '>': DefaultDateFilterValue;
    '<=': DefaultDateFilterValue;
    '>=': DefaultDateFilterValue;
    isWithIn: IsWithinOperatorValue | {
        value: 'daysAgo' | 'daysFromNow';
        date: number;
    };
    isEmpty: boolean;
    isNotEmpty: boolean;
};
type DateAggregations = {
    empty: number;
    filled: number;
    unique: number;
    percentEmpty: number;
    percentFilled: number;
    percentUnique: number;
    min: number | null;
    max: number | null;
    daysRange: number | null;
    monthRange: number | null;
};
type TextFilters = {
    '=': string;
    '!=': string;
    caseEqual: string;
    hasAnyOf: string[];
    contains: string;
    startsWith: string;
    endsWith: string;
    doesNotContain: string;
    isEmpty: never;
    isNotEmpty: never;
};
type LinkFilters = {
    hasAnyOf: number[];
    hasAllOf: number[];
    isExactly: number[];
    '=': number;
    hasNoneOf: number[];
    contains: string;
    doesNotContain: string;
    isEmpty: never;
    isNotEmpty: never;
};
type SelectFilters<O extends readonly string[]> = {
    hasAnyOf: O[number][];
    hasAllOf: O[number][];
    isExactly: O[number][];
    '=': O[number];
    hasNoneOf: O[number][];
    contains: string;
    doesNotContain: string;
    isEmpty: never;
    isNotEmpty: never;
};
type LinkAggregations = {
    empty: number;
    filled: number;
    percentEmpty: number;
    percentFilled: number;
};
type NumberFilters = {
    '=': number;
    '!=': number;
    '>': number;
    '>=': number;
    '<': number;
    '<=': number;
    hasAnyOf: number[];
    hasNoneOf: number[];
    isEmpty: never;
    isNotEmpty: never;
};
type NumberAggregations = {
    sum: number;
    average: number;
    median: number;
    min: number | null;
    max: number | null;
    range: number;
    standardDeviation: number;
    histogram: Record<string, number>;
    empty: number;
    filled: number;
    unique: number;
    percentEmpty: number;
    percentFilled: number;
    percentUnique: number;
};
type CheckboxFilters = {
    '=': number;
};
/**
 *
 * Column types
 *
 */
export type ColumnType<S, U, I, R extends boolean, F extends {
    [key: string]: any;
} = object, A extends {
    [key: string]: any;
} = object> = {
    raw: S;
    insert: I;
    update: U;
    filters: F;
    aggregations: A;
    isRequired: R;
};
export type DateColumnType<R extends boolean> = ColumnType<string, string, string, R, DateFilters, DateAggregations>;
export type TextColumnType<R extends boolean> = ColumnType<string, string, string, R, TextFilters>;
export type ALinkColumnType<T extends string, S, U, I, R extends boolean, F extends {
    [key: string]: any;
} = LinkFilters, A extends LinkAggregations = LinkAggregations> = ColumnType<S, U, I, R, F, A> & {
    linkedTo: T;
};
export type LinkColumnType<T extends string, R extends boolean> = ALinkColumnType<T, object, number[] | {
    newIds: number[];
    deletedIds: number[];
}, number[], R>;
export type AttachmentColumnType<R extends boolean> = ALinkColumnType<'attachmentTable', Attachment[], Attachment[] | {
    newIds: number[];
    deletedIds: number[];
} | number[], Attachment[] | number[], R>;
export type SingleSelectColumnType<O extends readonly string[], R extends boolean> = ColumnType<O[number], O[number], O[number], R, SelectFilters<O>>;
export type MultiSelectColumnType<O extends readonly string[], R extends boolean> = ColumnType<O[number][], O[number][], O[number][], R, SelectFilters<O>>;
export type NumberColumnType<R extends boolean> = ColumnType<number, number, number, R, NumberFilters, NumberAggregations>;
export type CheckboxColumnType<R extends boolean> = ColumnType<boolean, boolean, boolean, R, CheckboxFilters>;
export type AutoGeneratedNumberColumnType = ColumnType<number, never, never, false, NumberFilters, NumberAggregations>;
export type AutoGeneratedDateColumnType = ColumnType<string, never, never, false, DateFilters, DateAggregations>;
export type SelectTable = {
    id: AutoGeneratedNumberColumnType;
    name: TextColumnType<true>;
    color: TextColumnType<true>;
};
export type AttachmentTable = {
    id: AutoGeneratedNumberColumnType;
    name: TextColumnType<true>;
    metadata: TextColumnType<true>;
    size: NumberColumnType<true>;
    fileType: TextColumnType<true>;
    url: TextColumnType<true>;
};
export type CollaboratorsTable = {
    id: AutoGeneratedNumberColumnType;
    name: TextColumnType<true>;
    emailAddress: TextColumnType<true>;
    avatar: TextColumnType<true>;
};
export interface TaylorDatabase {
    /**
     *
     *
     * Internal tables, these tables can not be queried directly.
     *
     */
    selectTable: SelectTable;
    attachmentTable: AttachmentTable;
    collaboratorsTable: CollaboratorsTable;
}
export {};
