import { ComparisonOperatorExpression, Kysely, ColumnType, Generated, Dialect, KyselyPlugin } from 'kysely';
import { jsonArrayFrom } from 'kysely/helpers/sqlite';
import * as zod from 'zod';
import zod__default, { ZodType } from 'zod';
import * as fastify from 'fastify';
import { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify';
import * as http from 'http';
import { Readable } from 'node:stream';
import * as fs from 'fs';
import * as stream from 'stream';
import { InlineConfig } from 'vite';

type FilterValue = string | Array<string> | number | Array<number>;
type FilterOperator = ComparisonOperatorExpression | "%";
type FilterObject = {
    value: FilterValue;
    operator?: FilterOperator;
};
type QueryParamFilters = Record<string, FilterObject>;

declare class CollectionBuilder extends FieldBuilder {
    #private;
    key: string;
    config: CollectionConfigSchemaType;
    includeFieldKeys: string[];
    filterableFieldKeys: FieldFilters;
    constructor(key: string, config: CollectionConfigSchemaType);
    addText(key: string, props?: CFProps<"text"> & {
        collection?: FieldCollectionConfig;
    }): this;
    addNumber(key: string, props?: CFProps<"number"> & {
        collection?: FieldCollectionConfig;
    }): this;
    addCheckbox(key: string, props?: CFProps<"checkbox"> & {
        collection?: FieldCollectionConfig;
    }): this;
    addSelect(key: string, props?: CFProps<"select"> & {
        collection?: FieldCollectionConfig;
    }): this;
    addTextarea(key: string, props?: CFProps<"textarea"> & {
        collection?: FieldCollectionConfig;
    }): this;
    addDateTime(key: string, props?: CFProps<"datetime"> & {
        collection?: FieldCollectionConfig;
    }): this;
    addUser(key: string, props?: CFProps<"user"> & {
        collection?: FieldCollectionConfig;
    }): this;
    addMedia(key: string, props?: CFProps<"media"> & {
        collection?: FieldCollectionConfig;
    }): this;
    documentFieldFilters(filters?: QueryParamFilters, allowAll?: boolean): DocumentFieldFilters[];
    queryIncludeFields(all?: boolean): string[];
    get getData(): CollectionData;
    get fixedBricks(): CollectionBrickConfig[];
    get builderBricks(): CollectionBrickConfig[];
    get brickInstances(): Array<BrickBuilder>;
}

declare const ConfigSchema: zod__default.ZodObject<{
    db: zod__default.ZodUnknown;
    host: zod__default.ZodString;
    keys: zod__default.ZodObject<{
        encryptionKey: zod__default.ZodString;
        cookieSecret: zod__default.ZodString;
        accessTokenSecret: zod__default.ZodString;
        refreshTokenSecret: zod__default.ZodString;
    }, "strip", zod__default.ZodTypeAny, {
        encryptionKey: string;
        cookieSecret: string;
        accessTokenSecret: string;
        refreshTokenSecret: string;
    }, {
        encryptionKey: string;
        cookieSecret: string;
        accessTokenSecret: string;
        refreshTokenSecret: string;
    }>;
    paths: zod__default.ZodOptional<zod__default.ZodObject<{
        emailTemplates: zod__default.ZodOptional<zod__default.ZodString>;
    }, "strip", zod__default.ZodTypeAny, {
        emailTemplates?: string | undefined;
    }, {
        emailTemplates?: string | undefined;
    }>>;
    disableSwagger: zod__default.ZodBoolean;
    localisation: zod__default.ZodOptional<zod__default.ZodObject<{
        locales: zod__default.ZodArray<zod__default.ZodObject<{
            label: zod__default.ZodString;
            code: zod__default.ZodString;
        }, "strip", zod__default.ZodTypeAny, {
            code: string;
            label: string;
        }, {
            code: string;
            label: string;
        }>, "many">;
        defaultLocale: zod__default.ZodString;
    }, "strip", zod__default.ZodTypeAny, {
        locales: {
            code: string;
            label: string;
        }[];
        defaultLocale: string;
    }, {
        locales: {
            code: string;
            label: string;
        }[];
        defaultLocale: string;
    }>>;
    email: zod__default.ZodOptional<zod__default.ZodObject<{
        from: zod__default.ZodObject<{
            email: zod__default.ZodString;
            name: zod__default.ZodString;
        }, "strip", zod__default.ZodTypeAny, {
            email: string;
            name: string;
        }, {
            email: string;
            name: string;
        }>;
        strategy: zod__default.ZodUnknown;
    }, "strip", zod__default.ZodTypeAny, {
        from: {
            email: string;
            name: string;
        };
        strategy?: unknown;
    }, {
        from: {
            email: string;
            name: string;
        };
        strategy?: unknown;
    }>>;
    media: zod__default.ZodObject<{
        storage: zod__default.ZodNumber;
        maxSize: zod__default.ZodNumber;
        processed: zod__default.ZodObject<{
            limit: zod__default.ZodNumber;
            store: zod__default.ZodBoolean;
        }, "strip", zod__default.ZodTypeAny, {
            limit: number;
            store: boolean;
        }, {
            limit: number;
            store: boolean;
        }>;
        fallbackImage: zod__default.ZodOptional<zod__default.ZodUnion<[zod__default.ZodString, zod__default.ZodBoolean]>>;
        strategy: zod__default.ZodOptional<zod__default.ZodUnknown>;
    }, "strip", zod__default.ZodTypeAny, {
        storage: number;
        maxSize: number;
        processed: {
            limit: number;
            store: boolean;
        };
        strategy?: unknown;
        fallbackImage?: string | boolean | undefined;
    }, {
        storage: number;
        maxSize: number;
        processed: {
            limit: number;
            store: boolean;
        };
        strategy?: unknown;
        fallbackImage?: string | boolean | undefined;
    }>;
    hooks: zod__default.ZodArray<zod__default.ZodObject<{
        service: zod__default.ZodString;
        event: zod__default.ZodString;
        handler: zod__default.ZodUnknown;
    }, "strip", zod__default.ZodTypeAny, {
        event: string;
        service: string;
        handler?: unknown;
    }, {
        event: string;
        service: string;
        handler?: unknown;
    }>, "many">;
    fastifyExtensions: zod__default.ZodOptional<zod__default.ZodArray<zod__default.ZodFunction<zod__default.ZodTuple<[zod__default.ZodType<FastifyInstance<fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, fastify.FastifyBaseLogger, fastify.FastifyTypeProviderDefault>, zod__default.ZodTypeDef, FastifyInstance<fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, fastify.FastifyBaseLogger, fastify.FastifyTypeProviderDefault>>], zod__default.ZodUnknown>, zod__default.ZodPromise<zod__default.ZodVoid>>, "many">>;
    collections: zod__default.ZodArray<zod__default.ZodUnknown, "many">;
    plugins: zod__default.ZodArray<zod__default.ZodUnknown, "many">;
    vite: zod__default.ZodOptional<zod__default.ZodUnknown>;
}, "strip", zod__default.ZodTypeAny, {
    media: {
        storage: number;
        maxSize: number;
        processed: {
            limit: number;
            store: boolean;
        };
        strategy?: unknown;
        fallbackImage?: string | boolean | undefined;
    };
    keys: {
        encryptionKey: string;
        cookieSecret: string;
        accessTokenSecret: string;
        refreshTokenSecret: string;
    };
    hooks: {
        event: string;
        service: string;
        handler?: unknown;
    }[];
    host: string;
    disableSwagger: boolean;
    collections: unknown[];
    plugins: unknown[];
    email?: {
        from: {
            email: string;
            name: string;
        };
        strategy?: unknown;
    } | undefined;
    db?: unknown;
    paths?: {
        emailTemplates?: string | undefined;
    } | undefined;
    localisation?: {
        locales: {
            code: string;
            label: string;
        }[];
        defaultLocale: string;
    } | undefined;
    fastifyExtensions?: ((args_0: FastifyInstance<fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, fastify.FastifyBaseLogger, fastify.FastifyTypeProviderDefault>, ...args: unknown[]) => Promise<void>)[] | undefined;
    vite?: unknown;
}, {
    media: {
        storage: number;
        maxSize: number;
        processed: {
            limit: number;
            store: boolean;
        };
        strategy?: unknown;
        fallbackImage?: string | boolean | undefined;
    };
    keys: {
        encryptionKey: string;
        cookieSecret: string;
        accessTokenSecret: string;
        refreshTokenSecret: string;
    };
    hooks: {
        event: string;
        service: string;
        handler?: unknown;
    }[];
    host: string;
    disableSwagger: boolean;
    collections: unknown[];
    plugins: unknown[];
    email?: {
        from: {
            email: string;
            name: string;
        };
        strategy?: unknown;
    } | undefined;
    db?: unknown;
    paths?: {
        emailTemplates?: string | undefined;
    } | undefined;
    localisation?: {
        locales: {
            code: string;
            label: string;
        }[];
        defaultLocale: string;
    } | undefined;
    fastifyExtensions?: ((args_0: FastifyInstance<fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, fastify.FastifyBaseLogger, fastify.FastifyTypeProviderDefault>, ...args: unknown[]) => Promise<void>)[] | undefined;
    vite?: unknown;
}>;

interface LucidErrorData {
    type?: "validation" | "basic" | "forbidden" | "authorisation" | "cron" | "toolkit";
    name?: string;
    message?: string;
    status?: number;
    code?: "csrf" | "login" | "authorisation" | "rate_limit" | "not_found";
    zod?: zod__default.ZodError;
    errorResponse?: ErrorResult;
}
type ErrorResultValue = ErrorResultObj | ErrorResultObj[] | FieldErrors[] | string | undefined;
interface ErrorResultObj {
    code?: string;
    message?: string;
    children?: ErrorResultObj[];
    [key: string]: ErrorResultValue;
}
type ErrorResult = Record<string, ErrorResultValue>;
interface FieldErrors {
    brickId: string | number | undefined;
    groupId: string | number | undefined;
    key: string;
    localeCode?: string;
    message: string;
}

declare const _default: {
    locales: readonly ["en"];
    tempDir: string;
    swaggerRoutePrefix: string;
    headers: {
        accessToken: string;
        csrf: string;
        refreshToken: string;
        clientIntegrationKey: string;
        contentLocale: string;
    };
    seedDefaults: {
        user: {
            firstName: string;
            lastName: string;
            email: string;
            username: string;
            password: string;
            superAdmin: number;
        };
        roles: {
            name: string;
            description: string;
            permissions: Permission[];
        }[];
    };
    fieldBuiler: {
        maxRepeaterDepth: number;
    };
    collectionBuilder: {
        isLocked: boolean;
        useDrafts: boolean;
        useRevisions: boolean;
        useTranslations: boolean;
    };
    customFields: {
        link: {
            targets: string[];
        };
    };
    query: {
        page: number;
        perPage: number;
    };
    locations: {
        resetPassword: string;
    };
    errors: {
        name: string;
        message: string;
        status: number;
        code: undefined;
        errorResponse: undefined;
    };
    emailTemplates: {
        resetPassword: string;
        userInvite: string;
        passwordResetSuccess: string;
        emailChanged: string;
    };
    rateLimit: {
        max: number;
        timeWindow: string;
    };
    runtimeStore: {
        dist: string;
    };
    vite: {
        outputDir: string;
        dist: string;
        mount: string;
        html: string;
        rootSelector: string;
        buildMetadata: string;
        port: number;
    };
    arguments: {
        noCache: string;
    };
    brickTypes: {
        readonly builder: "builder";
        readonly fixed: "fixed";
        readonly collectionFields: "collection-fields";
    };
    cronSchedule: string;
    csrfExpiration: number;
    refreshTokenExpiration: number;
    accessTokenExpiration: number;
    passwordResetTokenExpirationMinutes: number;
    userInviteTokenExpirationMinutes: number;
    documentation: string;
    lucidUi: string;
    mediaAwaitingSyncInterval: number;
    fastify: {
        version: string;
    };
};

type SupportedLocales = (typeof _default.locales)[number];
type LocaleValue = Partial<Record<SupportedLocales, string>> | string;
interface TranslationsObj {
    localeCode: string;
    value: string | null;
}

interface ServiceData$1<K extends string> {
    keys: Record<K, number | null>;
    items: Array<{
        translations: TranslationsObj[];
        key: K;
    }>;
}

interface ServiceData<K extends string> {
    keys: K[];
    translations: Array<{
        value: string | null;
        localeCode: string;
        key: K;
    }>;
}

declare const FieldValueSchema: zod__default.ZodOptional<zod__default.ZodUnion<[zod__default.ZodString, zod__default.ZodNumber, zod__default.ZodObject<{
    url: zod__default.ZodNullable<zod__default.ZodString>;
    target: zod__default.ZodOptional<zod__default.ZodNullable<zod__default.ZodString>>;
    label: zod__default.ZodOptional<zod__default.ZodNullable<zod__default.ZodString>>;
}, "strip", zod__default.ZodTypeAny, {
    url: string | null;
    label?: string | null | undefined;
    target?: string | null | undefined;
}, {
    url: string | null;
    label?: string | null | undefined;
    target?: string | null | undefined;
}>, zod__default.ZodNull, zod__default.ZodAny]>>;
type FieldValueSchemaType = zod__default.infer<typeof FieldValueSchema>;
declare const FieldBaseSchema: zod__default.ZodObject<{
    key: zod__default.ZodString;
    type: zod__default.ZodUnion<[zod__default.ZodLiteral<"text">, zod__default.ZodLiteral<"wysiwyg">, zod__default.ZodLiteral<"media">, zod__default.ZodLiteral<"number">, zod__default.ZodLiteral<"checkbox">, zod__default.ZodLiteral<"select">, zod__default.ZodLiteral<"textarea">, zod__default.ZodLiteral<"json">, zod__default.ZodLiteral<"colour">, zod__default.ZodLiteral<"datetime">, zod__default.ZodLiteral<"link">, zod__default.ZodLiteral<"repeater">, zod__default.ZodLiteral<"user">, zod__default.ZodLiteral<"document">]>;
    translations: zod__default.ZodOptional<zod__default.ZodRecord<zod__default.ZodString, zod__default.ZodOptional<zod__default.ZodUnion<[zod__default.ZodString, zod__default.ZodNumber, zod__default.ZodObject<{
        url: zod__default.ZodNullable<zod__default.ZodString>;
        target: zod__default.ZodOptional<zod__default.ZodNullable<zod__default.ZodString>>;
        label: zod__default.ZodOptional<zod__default.ZodNullable<zod__default.ZodString>>;
    }, "strip", zod__default.ZodTypeAny, {
        url: string | null;
        label?: string | null | undefined;
        target?: string | null | undefined;
    }, {
        url: string | null;
        label?: string | null | undefined;
        target?: string | null | undefined;
    }>, zod__default.ZodNull, zod__default.ZodAny]>>>>;
    value: zod__default.ZodOptional<zod__default.ZodOptional<zod__default.ZodUnion<[zod__default.ZodString, zod__default.ZodNumber, zod__default.ZodObject<{
        url: zod__default.ZodNullable<zod__default.ZodString>;
        target: zod__default.ZodOptional<zod__default.ZodNullable<zod__default.ZodString>>;
        label: zod__default.ZodOptional<zod__default.ZodNullable<zod__default.ZodString>>;
    }, "strip", zod__default.ZodTypeAny, {
        url: string | null;
        label?: string | null | undefined;
        target?: string | null | undefined;
    }, {
        url: string | null;
        label?: string | null | undefined;
        target?: string | null | undefined;
    }>, zod__default.ZodNull, zod__default.ZodAny]>>>;
}, "strip", zod__default.ZodTypeAny, {
    type: "number" | "json" | "media" | "text" | "wysiwyg" | "document" | "repeater" | "checkbox" | "select" | "textarea" | "colour" | "datetime" | "link" | "user";
    key: string;
    value?: any;
    translations?: Record<string, any> | undefined;
}, {
    type: "number" | "json" | "media" | "text" | "wysiwyg" | "document" | "repeater" | "checkbox" | "select" | "textarea" | "colour" | "datetime" | "link" | "user";
    key: string;
    value?: any;
    translations?: Record<string, any> | undefined;
}>;
declare const FieldSchema: zod__default.ZodType<FieldSchemaType>;
type FieldSchemaType = zod__default.infer<typeof FieldBaseSchema> & {
    groups?: {
        id: string | number;
        order?: number;
        open?: BooleanInt;
        fields: FieldSchemaType[];
    }[];
};

interface FieldInsertItem {
    key: FieldSchemaType["key"];
    type: FieldSchemaType["type"];
    value: FieldValueSchemaType;
    localeCode: string;
    groupRef?: string;
    groupId?: number | string;
}
interface GroupInsertItem {
    ref: string;
    order: number;
    repeater: string;
    open: BooleanInt;
    parentGroupRef?: string;
}

interface GroupSimpleResponse {
    group_id: number;
    ref: string | null;
}

interface BrickConfigProps {
    details?: {
        name?: LocaleValue;
        summary?: LocaleValue;
    };
    preview?: {
        image?: string;
    };
}
interface BrickConfig {
    details: {
        name: LocaleValue;
        summary?: LocaleValue;
    };
    preview?: {
        image?: string;
    };
}
type BrickTypes = (typeof _default.brickTypes)[keyof typeof _default.brickTypes];

declare const BrickSchema: zod__default.ZodObject<{
    id: zod__default.ZodUnion<[zod__default.ZodString, zod__default.ZodNumber]>;
    key: zod__default.ZodString;
    order: zod__default.ZodNumber;
    type: zod__default.ZodUnion<[zod__default.ZodLiteral<"builder">, zod__default.ZodLiteral<"fixed">]>;
    open: zod__default.ZodOptional<zod__default.ZodUnion<[zod__default.ZodLiteral<1>, zod__default.ZodLiteral<0>]>>;
    fields: zod__default.ZodOptional<zod__default.ZodArray<zod__default.ZodType<FieldSchemaType, zod__default.ZodTypeDef, FieldSchemaType>, "many">>;
}, "strip", zod__default.ZodTypeAny, {
    type: "builder" | "fixed";
    key: string;
    id: string | number;
    order: number;
    fields?: FieldSchemaType[] | undefined;
    open?: 0 | 1 | undefined;
}, {
    type: "builder" | "fixed";
    key: string;
    id: string | number;
    order: number;
    fields?: FieldSchemaType[] | undefined;
    open?: 0 | 1 | undefined;
}>;
interface BrickSchema {
    id: number | string;
    key?: string;
    order?: number;
    type: BrickTypes;
    open?: BooleanInt;
    fields?: zod__default.infer<typeof FieldSchema>[];
}

interface BrickInsertItem extends BrickSchema {
    id: number | string;
    fields: Array<FieldInsertItem>;
    groups: Array<GroupInsertItem>;
}

declare const lucidServices: {
    auth: {
        accessToken: {
            generateToken: (reply: fastify.FastifyReply, request: fastify.FastifyRequest, userId: number) => ServiceResponse<undefined>;
            verifyToken: (request: fastify.FastifyRequest) => Awaited<ServiceResponse<fastify.FastifyRequest["auth"]>>;
            clearToken: (reply: fastify.FastifyReply) => Awaited<ServiceResponse<undefined>>;
        };
        refreshToken: {
            generateToken: (reply: fastify.FastifyReply, request: fastify.FastifyRequest, userId: number) => ServiceResponse<undefined>;
            verifyToken: (request: fastify.FastifyRequest, reply: fastify.FastifyReply) => ServiceResponse<{
                user_id: number;
            }>;
            clearToken: (request: fastify.FastifyRequest, reply: fastify.FastifyReply) => ServiceResponse<undefined>;
        };
        csrf: {
            generateToken: (request: fastify.FastifyRequest, reply: fastify.FastifyReply) => ServiceResponse<string>;
            verifyToken: (request: fastify.FastifyRequest) => Awaited<ServiceResponse<undefined>>;
            clearToken: (reply: fastify.FastifyReply) => Awaited<ServiceResponse<undefined>>;
        };
        login: ServiceFn<[{
            usernameOrEmail: string;
            password: string;
        }], {
            id: number;
        }>;
    };
    collection: {
        document: {
            versions: {
                createSingle: ServiceFn<[{
                    documentId: number;
                    collection: CollectionBuilder;
                    userId: number;
                    publish: BooleanInt;
                    bricks?: Array<BrickSchema>;
                    fields?: Array<FieldSchemaType>;
                }], number>;
                promoteVersion: ServiceFn<[{
                    fromVersionId: number;
                    toVersionType: "draft" | "published";
                    collectionKey: string;
                    documentId: number;
                    userId: number;
                    skipRevisionCheck?: boolean;
                }], undefined>;
                restoreRevision: ServiceFn<[{
                    documentId: number;
                    versionId: number;
                    userId: number;
                    collectionKey: string;
                }], undefined>;
            };
            brick: {
                checks: {
                    checkValidateBricksFields: ServiceFn<[{
                        bricks: Array<BrickInsertItem>;
                        collection: CollectionBuilder;
                    }], undefined>;
                    checkDuplicateOrder: (bricks: Array<BrickInsertItem>) => Awaited<ServiceResponse<undefined>>;
                };
                deleteMultipleBricks: ServiceFn<[{
                    versionId: number;
                    apply: {
                        bricks: boolean;
                        collectionFields: boolean;
                    };
                }], undefined>;
                getMultiple: ServiceFn<[{
                    versionId: number;
                    collectionKey: string;
                    documentFieldsRelationStatus?: Exclude<DocumentVersionType, "revision">;
                }], {
                    bricks: Array<BrickResponse>;
                    fields: Array<FieldResponse>;
                }>;
                createMultiple: ServiceFn<[{
                    versionId: number;
                    documentId: number;
                    bricks?: Array<BrickSchema>;
                    fields?: Array<FieldSchemaType>;
                    collection: CollectionBuilder;
                    skipValidation?: boolean;
                }], undefined>;
                createMultipleFields: ServiceFn<[{
                    documentId: number;
                    versionId: number;
                    fields: CFInsertItem<FieldTypes>[];
                }], undefined>;
                createMultipleGroups: ServiceFn<[{
                    versionId: number;
                    documentId: number;
                    brickGroups: Array<{
                        brickId: number;
                        groups: GroupInsertItem[];
                    }>;
                }], GroupSimpleResponse[]>;
            };
            checks: {
                checkCollection: ServiceFn<[{
                    key: string;
                }], CollectionBuilder>;
                checkSingleCollectionDocumentCount: ServiceFn<[{
                    collectionKey: string;
                    collectionMode: "single" | "multiple";
                    documentId?: number;
                }], undefined>;
            };
            client: {
                getSingle: ServiceFn<[{
                    collectionKey: string;
                    status: Exclude<DocumentVersionType, "revision">;
                    query: zod.TypeOf<zod.ZodObject<{
                        filter: zod.ZodOptional<zod.ZodUnion<[zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>, zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>]>>, zod.ZodObject<{
                            documentId: zod.ZodOptional<zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>>;
                            documentCreatedBy: zod.ZodOptional<zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>>;
                            documentUpdatedBy: zod.ZodOptional<zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>>;
                            documentCreatedAt: zod.ZodOptional<zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>>;
                            documentUpdatedAt: zod.ZodOptional<zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>>;
                        }, "strip", zod.ZodTypeAny, {
                            documentId?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                        }, {
                            documentId?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                        }>]>>;
                        include: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["bricks"]>, "many">>;
                    }, "strip", zod.ZodTypeAny, {
                        filter?: Record<string, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }> | {
                            documentId?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                        } | undefined;
                        include?: "bricks"[] | undefined;
                    }, {
                        filter?: Record<string, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }> | {
                            documentId?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                        } | undefined;
                        include?: "bricks"[] | undefined;
                    }>>;
                }], ClientDocumentResponse>;
                getMultiple: ServiceFn<[{
                    collectionKey: string;
                    status: Exclude<DocumentVersionType, "revision">;
                    query: zod.TypeOf<zod.ZodObject<{
                        filter: zod.ZodOptional<zod.ZodUnion<[zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>, zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>]>>, zod.ZodObject<{
                            documentId: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>, zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>]>>;
                            documentCreatedBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>, zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>]>>;
                            documentUpdatedBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>, zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>]>>;
                            documentCreatedAt: zod.ZodOptional<zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>>;
                            documentUpdatedAt: zod.ZodOptional<zod.ZodObject<{
                                value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                                operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                            }, "strip", zod.ZodTypeAny, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }, {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            }>>;
                        }, "strip", zod.ZodTypeAny, {
                            documentId?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                        }, {
                            documentId?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                        }>]>>;
                        sort: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
                            key: zod.ZodEnum<["createdAt", "updatedAt"]>;
                            value: zod.ZodEnum<["asc", "desc"]>;
                        }, "strip", zod.ZodTypeAny, {
                            key: "createdAt" | "updatedAt";
                            value: "asc" | "desc";
                        }, {
                            key: "createdAt" | "updatedAt";
                            value: "asc" | "desc";
                        }>, "many">>;
                        page: zod.ZodNumber;
                        perPage: zod.ZodNumber;
                    }, "strip", zod.ZodTypeAny, {
                        page: number;
                        perPage: number;
                        sort?: {
                            key: "createdAt" | "updatedAt";
                            value: "asc" | "desc";
                        }[] | undefined;
                        filter?: Record<string, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }> | {
                            documentId?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                        } | undefined;
                    }, {
                        page: number;
                        perPage: number;
                        sort?: {
                            key: "createdAt" | "updatedAt";
                            value: "asc" | "desc";
                        }[] | undefined;
                        filter?: Record<string, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }> | {
                            documentId?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedBy?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | {
                                value: string | number | string[] | number[];
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentCreatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                            documentUpdatedAt?: {
                                value: string | number;
                                operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                            } | undefined;
                        } | undefined;
                    }>>;
                }], {
                    data: ClientDocumentResponse[];
                    count: number;
                }>;
            };
            upsertSingle: ServiceFn<[{
                collectionKey: string;
                userId: number;
                publish: BooleanInt;
                documentId?: number;
                bricks?: Array<BrickSchema>;
                fields?: Array<FieldSchemaType>;
            }], number>;
            getSingle: ServiceFn<[{
                id: number;
                status?: DocumentVersionType;
                versionId?: number;
                collectionKey: string;
                query: zod.TypeOf<zod.ZodObject<{
                    include: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["bricks"]>, "many">>;
                }, "strip", zod.ZodTypeAny, {
                    include?: "bricks"[] | undefined;
                }, {
                    include?: "bricks"[] | undefined;
                }>>;
            }], CollectionDocumentResponse>;
            getMultiple: ServiceFn<[{
                collectionKey: string;
                status: DocumentVersionType;
                query: zod.TypeOf<zod.ZodObject<{
                    filter: zod.ZodOptional<zod.ZodUnion<[zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>, zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>]>>, zod.ZodObject<{
                        documentId: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>, zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>]>>;
                        documentCreatedBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>, zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>]>>;
                        documentUpdatedBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>, zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>]>>;
                        documentCreatedAt: zod.ZodOptional<zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>>;
                        documentUpdatedAt: zod.ZodOptional<zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>>;
                    }, "strip", zod.ZodTypeAny, {
                        documentId?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentCreatedBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentUpdatedBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentCreatedAt?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentUpdatedAt?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                    }, {
                        documentId?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentCreatedBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentUpdatedBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentCreatedAt?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentUpdatedAt?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                    }>]>>;
                    sort: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
                        key: zod.ZodEnum<["createdAt", "updatedAt"]>;
                        value: zod.ZodEnum<["asc", "desc"]>;
                    }, "strip", zod.ZodTypeAny, {
                        key: "createdAt" | "updatedAt";
                        value: "asc" | "desc";
                    }, {
                        key: "createdAt" | "updatedAt";
                        value: "asc" | "desc";
                    }>, "many">>;
                    page: zod.ZodNumber;
                    perPage: zod.ZodNumber;
                }, "strip", zod.ZodTypeAny, {
                    page: number;
                    perPage: number;
                    sort?: {
                        key: "createdAt" | "updatedAt";
                        value: "asc" | "desc";
                    }[] | undefined;
                    filter?: Record<string, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }> | {
                        documentId?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentCreatedBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentUpdatedBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentCreatedAt?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentUpdatedAt?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                    } | undefined;
                }, {
                    page: number;
                    perPage: number;
                    sort?: {
                        key: "createdAt" | "updatedAt";
                        value: "asc" | "desc";
                    }[] | undefined;
                    filter?: Record<string, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }> | {
                        documentId?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentCreatedBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentUpdatedBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentCreatedAt?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                        documentUpdatedAt?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                    } | undefined;
                }>>;
            }], {
                data: CollectionDocumentResponse[];
                count: number;
            }>;
            getMultipleRevisions: ServiceFn<[{
                collectionKey: string;
                documentId: number;
                query: zod.TypeOf<zod.ZodObject<{
                    filter: zod.ZodOptional<zod.ZodObject<{
                        createdBy: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>, zod.ZodObject<{
                            value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                            operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                        }, "strip", zod.ZodTypeAny, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }, {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        }>]>>;
                    }, "strip", zod.ZodTypeAny, {
                        createdBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                    }, {
                        createdBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                    }>>;
                    sort: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
                        key: zod.ZodEnum<["createdAt"]>;
                        value: zod.ZodEnum<["asc", "desc"]>;
                    }, "strip", zod.ZodTypeAny, {
                        key: "createdAt";
                        value: "asc" | "desc";
                    }, {
                        key: "createdAt";
                        value: "asc" | "desc";
                    }>, "many">>;
                    page: zod.ZodNumber;
                    perPage: zod.ZodNumber;
                }, "strip", zod.ZodTypeAny, {
                    page: number;
                    perPage: number;
                    sort?: {
                        key: "createdAt";
                        value: "asc" | "desc";
                    }[] | undefined;
                    filter?: {
                        createdBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                    } | undefined;
                }, {
                    page: number;
                    perPage: number;
                    sort?: {
                        key: "createdAt";
                        value: "asc" | "desc";
                    }[] | undefined;
                    filter?: {
                        createdBy?: {
                            value: string | number;
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | {
                            value: string | number | string[] | number[];
                            operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                        } | undefined;
                    } | undefined;
                }>>;
            }], {
                data: CollectionDocumentVersionResponse[];
                count: number;
            }>;
            deleteSingle: ServiceFn<[{
                id: number;
                collectionKey: string;
                userId: number;
            }], undefined>;
            deleteMultiple: ServiceFn<[{
                ids: number[];
                collectionKey: string;
                userId: number;
            }], undefined>;
        };
        getSingle: ServiceFn<[{
            key: string;
            include?: {
                bricks?: boolean;
                fields?: boolean;
                documentId?: boolean;
            };
        }], CollectionResponse>;
        getAll: ServiceFn<[{
            includeDocumentId?: boolean;
        }], CollectionResponse[]>;
        getSingleInstance: ServiceFn<[{
            key: string;
        }], CollectionBuilder>;
    };
    account: {
        checks: {
            checkUpdatePassword: ServiceFn<[{
                encryptedSecret: string;
                password: string;
                currentPassword?: string;
                newPassword?: string;
                passwordConfirmation?: string;
                encryptionKey: string;
            }], {
                newPassword: string | undefined;
                triggerPasswordReset: 0 | 1 | undefined;
                encryptSecret: string | undefined;
            }>;
        };
        updateMe: ServiceFn<[{
            auth: fastify.FastifyRequest["auth"];
            firstName?: string;
            lastName?: string;
            username?: string;
            email?: string;
            currentPassword?: string;
            newPassword?: string;
            passwordConfirmation?: string;
        }], undefined>;
        sendResetPassword: ServiceFn<[{
            email: string;
        }], {
            message: string;
        }>;
        resetPassword: ServiceFn<[{
            token: string;
            password: string;
        }], undefined>;
    };
    user: {
        token: {
            createSingle: ServiceFn<[{
                userId: number;
                tokenType: "password_reset";
                expiryDate: string;
            }], {
                token: string;
            }>;
            getSingle: ServiceFn<[{
                tokenType: "password_reset";
                token: string;
            }], {
                id: number;
                user_id: number | null;
            }>;
        };
        checks: {
            checkRolesExist: ServiceFn<[{
                roleIds: number[];
            }], undefined>;
            checkNotLastUser: ServiceFn<[], undefined>;
        };
        createSingle: ServiceFn<[{
            email: string;
            username: string;
            firstName?: string;
            lastName?: string;
            superAdmin?: BooleanInt;
            roleIds: Array<number>;
            authSuperAdmin: BooleanInt;
        }], number>;
        getSingle: ServiceFn<[{
            userId: number;
        }], UserResponse>;
        getMultiple: ServiceFn<[{
            query: zod.TypeOf<zod.ZodObject<{
                filter: zod.ZodOptional<zod.ZodObject<{
                    firstName: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    lastName: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    email: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    username: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    roleIds: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    id: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                }, "strip", zod.ZodTypeAny, {
                    email?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    id?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    username?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    roleIds?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    firstName?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    lastName?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                }, {
                    email?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    id?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    username?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    roleIds?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    firstName?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    lastName?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                }>>;
                sort: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
                    key: zod.ZodEnum<["createdAt", "updatedAt", "firstName", "lastName", "email", "username"]>;
                    value: zod.ZodEnum<["asc", "desc"]>;
                }, "strip", zod.ZodTypeAny, {
                    key: "email" | "username" | "createdAt" | "updatedAt" | "firstName" | "lastName";
                    value: "asc" | "desc";
                }, {
                    key: "email" | "username" | "createdAt" | "updatedAt" | "firstName" | "lastName";
                    value: "asc" | "desc";
                }>, "many">>;
                include: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["permissions"]>, "many">>;
                exclude: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
                page: zod.ZodNumber;
                perPage: zod.ZodNumber;
            }, "strip", zod.ZodTypeAny, {
                page: number;
                perPage: number;
                sort?: {
                    key: "email" | "username" | "createdAt" | "updatedAt" | "firstName" | "lastName";
                    value: "asc" | "desc";
                }[] | undefined;
                filter?: {
                    email?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    id?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    username?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    roleIds?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    firstName?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    lastName?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                } | undefined;
                include?: "permissions"[] | undefined;
                exclude?: string[] | undefined;
            }, {
                page: number;
                perPage: number;
                sort?: {
                    key: "email" | "username" | "createdAt" | "updatedAt" | "firstName" | "lastName";
                    value: "asc" | "desc";
                }[] | undefined;
                filter?: {
                    email?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    id?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    username?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    roleIds?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    firstName?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    lastName?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                } | undefined;
                include?: "permissions"[] | undefined;
                exclude?: string[] | undefined;
            }>>;
        }], {
            data: UserResponse[];
            count: number;
        }>;
        deleteSingle: ServiceFn<[{
            userId: number;
            currentUserId: number;
        }], undefined>;
        updateMultipleRoles: ServiceFn<[{
            userId: number;
            roleIds?: number[];
        }], undefined>;
        updateSingle: ServiceFn<[{
            userId: number;
            firstName?: string;
            lastName?: string;
            username?: string;
            email?: string;
            password?: string;
            roleIds?: number[];
            superAdmin?: BooleanInt;
            triggerPasswordReset?: BooleanInt;
            isDeleted?: BooleanInt;
            auth: {
                id: number;
                superAdmin: BooleanInt;
            };
        }], number>;
    };
    email: {
        checks: {
            checkHasEmailConfig: ServiceFn<[], {
                from: {
                    email: string;
                    name: string;
                };
                strategy: EmailStrategy;
            }>;
        };
        renderTemplate: ServiceFn<[{
            template: string;
            data: Record<string, unknown> | null;
        }], string>;
        sendEmail: ServiceFn<[{
            type: "internal" | "external";
            to: string;
            subject: string;
            template: string;
            cc?: string;
            bcc?: string;
            replyTo?: string;
            data: Record<string, unknown>;
        }], EmailResponse>;
        getMultiple: ServiceFn<[{
            query: zod.TypeOf<zod.ZodObject<{
                filter: zod.ZodOptional<zod.ZodObject<{
                    toAddress: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    subject: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    deliveryStatus: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    type: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    template: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                }, "strip", zod.ZodTypeAny, {
                    type?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    toAddress?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    subject?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    deliveryStatus?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    template?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                }, {
                    type?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    toAddress?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    subject?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    deliveryStatus?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    template?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                }>>;
                sort: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
                    key: zod.ZodEnum<["lastAttemptAt", "lastSuccessAt", "createdAt", "sentCount", "errorCount"]>;
                    value: zod.ZodEnum<["asc", "desc"]>;
                }, "strip", zod.ZodTypeAny, {
                    key: "createdAt" | "lastAttemptAt" | "lastSuccessAt" | "sentCount" | "errorCount";
                    value: "asc" | "desc";
                }, {
                    key: "createdAt" | "lastAttemptAt" | "lastSuccessAt" | "sentCount" | "errorCount";
                    value: "asc" | "desc";
                }>, "many">>;
                include: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
                exclude: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
                page: zod.ZodNumber;
                perPage: zod.ZodNumber;
            }, "strip", zod.ZodTypeAny, {
                page: number;
                perPage: number;
                sort?: {
                    key: "createdAt" | "lastAttemptAt" | "lastSuccessAt" | "sentCount" | "errorCount";
                    value: "asc" | "desc";
                }[] | undefined;
                filter?: {
                    type?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    toAddress?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    subject?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    deliveryStatus?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    template?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                } | undefined;
                include?: string[] | undefined;
                exclude?: string[] | undefined;
            }, {
                page: number;
                perPage: number;
                sort?: {
                    key: "createdAt" | "lastAttemptAt" | "lastSuccessAt" | "sentCount" | "errorCount";
                    value: "asc" | "desc";
                }[] | undefined;
                filter?: {
                    type?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    toAddress?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    subject?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    deliveryStatus?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    template?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                } | undefined;
                include?: string[] | undefined;
                exclude?: string[] | undefined;
            }>>;
        }], {
            data: EmailResponse[];
            count: number;
        }>;
        getSingle: ServiceFn<[{
            id: number;
            renderTemplate: boolean;
        }], EmailResponse>;
        deleteSingle: ServiceFn<[{
            id: number;
        }], undefined>;
        resendSingle: ServiceFn<[{
            id: number;
        }], {
            success: boolean;
            message: string;
        }>;
        sendExternal: ServiceFn<[{
            to: string;
            subject: string;
            template: string;
            cc?: string;
            bcc?: string;
            replyTo?: string;
            data: {
                [key: string]: unknown;
            };
        }], EmailResponse>;
    };
    role: {
        createSingle: ServiceFn<[{
            name: string;
            description?: string;
            permissions: string[];
        }], number>;
        validatePermissions: ServiceFn<[{
            permissions: string[];
        }], {
            permission: Permission;
        }[]>;
        getSingle: ServiceFn<[{
            id: number;
        }], RoleResponse>;
        getMultiple: ServiceFn<[{
            query: zod.TypeOf<zod.ZodObject<{
                filter: zod.ZodOptional<zod.ZodObject<{
                    name: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    roleIds: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                }, "strip", zod.ZodTypeAny, {
                    name?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    roleIds?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                }, {
                    name?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    roleIds?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                }>>;
                sort: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
                    key: zod.ZodEnum<["createdAt", "name"]>;
                    value: zod.ZodEnum<["asc", "desc"]>;
                }, "strip", zod.ZodTypeAny, {
                    key: "name" | "createdAt";
                    value: "asc" | "desc";
                }, {
                    key: "name" | "createdAt";
                    value: "asc" | "desc";
                }>, "many">>;
                include: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["permissions"]>, "many">>;
                exclude: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
                page: zod.ZodNumber;
                perPage: zod.ZodNumber;
            }, "strip", zod.ZodTypeAny, {
                page: number;
                perPage: number;
                sort?: {
                    key: "name" | "createdAt";
                    value: "asc" | "desc";
                }[] | undefined;
                filter?: {
                    name?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    roleIds?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                } | undefined;
                include?: "permissions"[] | undefined;
                exclude?: string[] | undefined;
            }, {
                page: number;
                perPage: number;
                sort?: {
                    key: "name" | "createdAt";
                    value: "asc" | "desc";
                }[] | undefined;
                filter?: {
                    name?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    roleIds?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                } | undefined;
                include?: "permissions"[] | undefined;
                exclude?: string[] | undefined;
            }>>;
        }], {
            data: RoleResponse[];
            count: number;
        }>;
        deleteSingle: ServiceFn<[{
            id: number;
        }], undefined>;
        updateSingle: ServiceFn<[{
            id: number;
            name?: string;
            description?: string;
            permissions?: string[];
        }], undefined>;
    };
    setting: {
        getSettings: ServiceFn<[], SettingsResponse>;
    };
    option: {
        getSingle: ServiceFn<[{
            name: OptionName;
        }], OptionsResponse>;
        updateSingle: ServiceFn<[{
            name: OptionName;
            valueText?: string;
            valueInt?: number;
            valueBool?: BooleanInt;
        }], undefined>;
    };
    media: {
        checks: {
            checkCanStoreMedia: ServiceFn<[{
                size: number;
                onError?: () => Promise<void>;
            }], {
                proposedSize: number;
            }>;
            checkCanUpdateMedia: ServiceFn<[{
                size: number;
                previousSize: number;
            }], {
                proposedSize: number;
            }>;
            checkHasMediaStrategy: (context: ServiceContext) => Awaited<ServiceResponse<Exclude<Config["media"]["strategy"], undefined>>>;
            checkAwaitingSync: ServiceFn<[{
                key: string;
            }], true>;
        };
        strategies: {
            update: ServiceFn<[{
                id: number;
                fileName: string;
                previousSize: number;
                previousKey: string;
                updatedKey: string;
            }], MediaKitMeta>;
            delete: ServiceFn<[{
                key: string;
                size: number;
                processedSize: number;
            }], undefined>;
            getPresignedUrl: ServiceFn<[{
                key: string;
                mimeType: string;
                extension?: string;
            }], {
                url: string;
            }>;
            syncMedia: ServiceFn<[{
                key: string;
                fileName: string;
            }], MediaKitMeta>;
        };
        getSingle: ServiceFn<[{
            id: number;
        }], MediaResponse>;
        deleteSingle: ServiceFn<[{
            id: number;
        }], undefined>;
        getMultiple: ServiceFn<[{
            query: zod.TypeOf<zod.ZodObject<{
                filter: zod.ZodOptional<zod.ZodObject<{
                    title: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    key: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    mimeType: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    type: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                    extension: zod.ZodOptional<zod.ZodObject<{
                        value: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodString, "many">, zod.ZodNumber, zod.ZodArray<zod.ZodNumber, "many">]>;
                        operator: zod.ZodOptional<zod.ZodEnum<["=", "%", "like", "ilike", "in", "not in", "<>", "is not", "is", "!="]>>;
                    }, "strip", zod.ZodTypeAny, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }, {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    }>>;
                }, "strip", zod.ZodTypeAny, {
                    type?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    key?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    title?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    mimeType?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    extension?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                }, {
                    type?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    key?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    title?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    mimeType?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    extension?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                }>>;
                sort: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
                    key: zod.ZodEnum<["createdAt", "updatedAt", "title", "fileSize", "width", "height", "mimeType", "extension"]>;
                    value: zod.ZodEnum<["asc", "desc"]>;
                }, "strip", zod.ZodTypeAny, {
                    key: "width" | "height" | "createdAt" | "updatedAt" | "title" | "mimeType" | "extension" | "fileSize";
                    value: "asc" | "desc";
                }, {
                    key: "width" | "height" | "createdAt" | "updatedAt" | "title" | "mimeType" | "extension" | "fileSize";
                    value: "asc" | "desc";
                }>, "many">>;
                include: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<["permissions"]>, "many">>;
                exclude: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
                page: zod.ZodNumber;
                perPage: zod.ZodNumber;
            }, "strip", zod.ZodTypeAny, {
                page: number;
                perPage: number;
                sort?: {
                    key: "width" | "height" | "createdAt" | "updatedAt" | "title" | "mimeType" | "extension" | "fileSize";
                    value: "asc" | "desc";
                }[] | undefined;
                filter?: {
                    type?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    key?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    title?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    mimeType?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    extension?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                } | undefined;
                include?: "permissions"[] | undefined;
                exclude?: string[] | undefined;
            }, {
                page: number;
                perPage: number;
                sort?: {
                    key: "width" | "height" | "createdAt" | "updatedAt" | "title" | "mimeType" | "extension" | "fileSize";
                    value: "asc" | "desc";
                }[] | undefined;
                filter?: {
                    type?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    key?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    title?: {
                        value: string | number;
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    mimeType?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                    extension?: {
                        value: string | number | string[] | number[];
                        operator?: "=" | "!=" | "<>" | "in" | "not in" | "is" | "is not" | "like" | "ilike" | "%" | undefined;
                    } | undefined;
                } | undefined;
                include?: "permissions"[] | undefined;
                exclude?: string[] | undefined;
            }>>;
            localeCode: string;
        }], {
            data: MediaResponse[];
            count: number;
        }>;
        updateSingle: ServiceFn<[{
            id: number;
            key?: string;
            fileName?: string;
            title?: {
                localeCode: string;
                value: string | null;
            }[];
            alt?: {
                localeCode: string;
                value: string | null;
            }[];
        }], number | undefined>;
        getPresignedUrl: ServiceFn<[{
            fileName: string;
            mimeType: string;
        }], {
            url: string;
            key: string;
        }>;
        createSingle: ServiceFn<[{
            key: string;
            fileName: string;
            title?: {
                localeCode: string;
                value: string | null;
            }[];
            alt?: {
                localeCode: string;
                value: string | null;
            }[];
            visible?: BooleanInt;
        }], number>;
    };
    processedImage: {
        checks: {
            checkCanStore: ServiceFn<[{
                size: number;
            }], {
                proposedSize: number;
            }>;
        };
        getCount: ServiceFn<[], number>;
        clearSingle: ServiceFn<[{
            id: number;
        }], undefined>;
        clearAll: ServiceFn<[], undefined>;
        processImage: ServiceFn<[{
            key: string;
            processKey: string;
            options: zod.TypeOf<zod.ZodObject<{
                width: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                height: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                format: zod.ZodOptional<zod.ZodEnum<["jpeg", "png", "webp", "avif"]>>;
                quality: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                fallback: zod.ZodOptional<zod.ZodEnum<["1", "0"]>>;
            }, "strip", zod.ZodTypeAny, {
                width?: string | undefined;
                height?: string | undefined;
                format?: "avif" | "webp" | "jpeg" | "png" | undefined;
                quality?: string | undefined;
                fallback?: "0" | "1" | undefined;
            }, {
                width?: string | undefined;
                height?: string | undefined;
                format?: "avif" | "webp" | "jpeg" | "png" | undefined;
                quality?: string | undefined;
                fallback?: "0" | "1" | undefined;
            }>>;
        }], {
            key: string;
            contentLength: number | undefined;
            contentType: string | undefined;
            body: stream.Readable;
        }>;
        getSingleCount: ServiceFn<[{
            key: string;
        }], number>;
        optimiseImage: ServiceFn<[{
            stream: stream.Readable;
            options: zod.TypeOf<zod.ZodObject<{
                width: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                height: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                format: zod.ZodOptional<zod.ZodEnum<["jpeg", "png", "webp", "avif"]>>;
                quality: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                fallback: zod.ZodOptional<zod.ZodEnum<["1", "0"]>>;
            }, "strip", zod.ZodTypeAny, {
                width?: string | undefined;
                height?: string | undefined;
                format?: "avif" | "webp" | "jpeg" | "png" | undefined;
                quality?: string | undefined;
                fallback?: "0" | "1" | undefined;
            }, {
                width?: string | undefined;
                height?: string | undefined;
                format?: "avif" | "webp" | "jpeg" | "png" | undefined;
                quality?: string | undefined;
                fallback?: "0" | "1" | undefined;
            }>>;
        }], {
            buffer: Buffer;
            mimeType: string;
            size: number;
            width: number | null;
            height: number | null;
            extension: string;
            blurHash: null;
        }>;
    };
    cdn: {
        streamMedia: ServiceFn<[{
            key: string;
            query: zod.TypeOf<zod.ZodObject<{
                width: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                height: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                format: zod.ZodOptional<zod.ZodEnum<["jpeg", "png", "webp", "avif"]>>;
                quality: zod.ZodOptional<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>>;
                fallback: zod.ZodOptional<zod.ZodEnum<["1", "0"]>>;
            }, "strip", zod.ZodTypeAny, {
                width?: string | undefined;
                height?: string | undefined;
                format?: "avif" | "webp" | "jpeg" | "png" | undefined;
                quality?: string | undefined;
                fallback?: "0" | "1" | undefined;
            }, {
                width?: string | undefined;
                height?: string | undefined;
                format?: "avif" | "webp" | "jpeg" | "png" | undefined;
                quality?: string | undefined;
                fallback?: "0" | "1" | undefined;
            }>>;
            accept: string | undefined;
        }], {
            key: string;
            contentLength: number | undefined;
            contentType: string | undefined;
            body: stream.Readable;
        }>;
        streamErrorImage: ServiceFn<[{
            fallback?: "1" | "0";
            error: LucidErrorData;
        }], {
            body: fs.ReadStream | Buffer;
            contentType: string;
        }>;
    };
    locale: {
        checks: {
            checkLocalesExist: ServiceFn<[{
                localeCodes: string[];
            }], undefined>;
        };
        getSingle: ServiceFn<[{
            code: string;
        }], LocalesResponse>;
        getAll: ServiceFn<[], LocalesResponse[]>;
        getSingleFallback: ServiceFn<[{
            code?: string;
        }], {
            code: string;
        }>;
    };
    translation: {
        createMultiple: ServiceFn<[ServiceData<string>], Record<string, number>>;
        deleteMultiple: ServiceFn<[{
            ids: Array<number | null>;
        }], undefined>;
        upsertMultiple: ServiceFn<[ServiceData$1<string>], undefined>;
    };
    crons: {
        clearExpiredLocales: ServiceFn<[], undefined>;
        clearExpiredTokens: ServiceFn<[], undefined>;
        updateMediaStorage: ServiceFn<[], undefined>;
        deleteExpiredMedia: ServiceFn<[], undefined>;
    };
    permission: {
        getAll: ServiceFn<[], Permission[]>;
    };
    seed: {
        defaultOptions: ServiceFn<[], undefined>;
        defaultRoles: ServiceFn<[], undefined>;
        defaultUser: ServiceFn<[], undefined>;
    };
    start: {
        executeSeeds: ServiceFn<[], undefined>;
        syncLocales: ServiceFn<[], undefined>;
    };
    clientIntegrations: {
        createSingle: ServiceFn<[{
            name: string;
            description?: string;
        }], {
            apiKey: string;
        }>;
        getAll: ServiceFn<[], ClientIntegrationResponse[]>;
        deleteSingle: ServiceFn<[{
            id: number;
        }], undefined>;
        updateSingle: ServiceFn<[{
            id: number;
            name?: string;
            description?: string;
            enabled?: BooleanInt;
        }], undefined>;
        regenerateKeys: ServiceFn<[{
            id: number;
        }], {
            apiKey: string;
        }>;
        verifyApiKey: ServiceFn<[{
            key: string;
            apiKey: string;
        }], {
            id: number;
            key: string;
        }>;
        getSingle: ServiceFn<[{
            id: number;
        }], ClientIntegrationResponse>;
    };
};

type ServiceContext = {
    db: KyselyDB;
    config: Config;
    services: typeof lucidServices;
};
type ServiceProps<T> = {
    serviceConfig?: ServiceContext;
    data?: T;
    [key: string]: unknown;
};
type ServiceWrapperConfig = {
    transaction: boolean;
    schema?: ZodType<unknown>;
    schemaArgIndex?: number;
    defaultError?: Omit<Partial<LucidErrorData>, "zod" | "errorResponse">;
    logError?: boolean;
};
type ServiceResponse<T> = Promise<{
    error: LucidErrorData;
    data: undefined;
} | {
    error: undefined;
    data: T;
}>;
type ServiceFn<T extends unknown[], R> = (service: ServiceContext, ...args: T) => ServiceResponse<R>;
type ExtractServiceFnArgs<T> = T extends ServiceFn<infer Args, unknown> ? Args : never;

interface MediaKitMeta {
    mimeType: string;
    name: string;
    type: MediaType;
    extension: string;
    size: number;
    key: string;
    etag: string | null;
    width: number | null;
    height: number | null;
    blurHash: string | null;
    averageColour: string | null;
    isDark: BooleanInt | null;
    isLight: BooleanInt | null;
}

interface LucidHook<S extends keyof HookServiceHandlers, E extends keyof HookServiceHandlers[S]> {
    service: S;
    event: E;
    handler: HookServiceHandlers[S][E];
}
interface LucidHookCollection<E extends keyof HookServiceHandlers["collection-documents"]> {
    event: E;
    handler: HookServiceHandlers["collection-documents"][E];
}
type ArgumentsType<T> = T extends (...args: infer U) => unknown ? U : never;
type HookServiceHandlers = {
    "collection-documents": {
        beforeUpsert: ServiceFn<[
            {
                meta: {
                    collectionKey: string;
                    userId: number;
                };
                data: {
                    documentId: number;
                    versionId: number;
                    versionType: Exclude<DocumentVersionType, "revision">;
                    bricks?: Array<BrickSchema>;
                    fields?: Array<FieldSchemaType>;
                };
            }
        ], {
            documentId: number;
            versionId: number;
            versionType: Exclude<DocumentVersionType, "revision">;
            bricks?: Array<BrickSchema>;
            fields?: Array<FieldSchemaType>;
        } | undefined>;
        afterUpsert: ServiceFn<[
            {
                meta: {
                    collectionKey: string;
                    userId: number;
                };
                data: {
                    documentId: number;
                    versionId: number;
                    versionType: Exclude<DocumentVersionType, "revision">;
                    bricks: Array<BrickSchema>;
                    fields: Array<FieldSchemaType>;
                };
            }
        ], undefined>;
        beforeDelete: ServiceFn<[
            {
                meta: {
                    collectionKey: string;
                    userId: number;
                };
                data: {
                    ids: number[];
                };
            }
        ], undefined>;
        afterDelete: ServiceFn<[
            {
                meta: {
                    collectionKey: string;
                    userId: number;
                };
                data: {
                    ids: number[];
                };
            }
        ], undefined>;
        versionPromote: ServiceFn<[
            {
                meta: {
                    collectionKey: string;
                    userId: number;
                };
                data: {
                    documentId: number;
                    versionId: number;
                    versionType: Exclude<DocumentVersionType, "revision">;
                };
            }
        ], undefined>;
    };
};
type CollectionDocumentBuilderHooks = LucidHookCollection<"beforeUpsert"> | LucidHookCollection<"afterUpsert"> | LucidHookCollection<"beforeDelete"> | LucidHookCollection<"afterDelete">;
type CollectionDocumentHooks = LucidHook<"collection-documents", "beforeUpsert"> | LucidHook<"collection-documents", "afterUpsert"> | LucidHook<"collection-documents", "beforeDelete"> | LucidHook<"collection-documents", "afterDelete"> | LucidHook<"collection-documents", "versionPromote">;
type AllHooks = CollectionDocumentHooks;

type LucidPlugin = (config: Config) => Promise<{
    key: string;
    lucid: string;
    config: Config;
}>;
type LucidPluginOptions<T> = (config: Config, pluginOptions: T) => Promise<{
    key: string;
    lucid: string;
    config: Config;
}>;
type EmailStrategy = (email: {
    to: string;
    subject: string;
    from: {
        email: string;
        name: string;
    };
    html: string;
    text?: string;
    cc?: string;
    bcc?: string;
    replyTo?: string;
}, meta: {
    data: {
        [key: string]: unknown;
    };
    template: string;
    hash: string;
}) => Promise<{
    success: boolean;
    message: string;
}>;
type MediaStrategyGetPresignedUrl = (key: string, meta: {
    host: string;
    mimeType: string;
    extension?: string;
}) => ServiceResponse<{
    url: string;
}>;
type MediaStrategyGetMeta = (key: string) => ServiceResponse<{
    size: number;
    mimeType: string | null;
    etag: string | null;
}>;
type MediaStrategyStream = (key: string) => ServiceResponse<{
    contentLength: number | undefined;
    contentType: string | undefined;
    body: Readable;
}>;
type MediaStrategyUploadSingle = (props: {
    key: string;
    data: Readable | Buffer;
    meta: Omit<MediaKitMeta, "blurHash" | "averageColour" | "isDark" | "isLight" | "tempPath" | "name" | "key" | "etag">;
}) => ServiceResponse<{
    etag?: string;
}>;
type MediaStrategyDeleteSingle = (key: string) => ServiceResponse<undefined>;
type MediaStrategyDeleteMultiple = (keys: string[]) => ServiceResponse<undefined>;
type MediaStrategy = {
    getPresignedUrl: MediaStrategyGetPresignedUrl;
    getMeta: MediaStrategyGetMeta;
    stream: MediaStrategyStream;
    uploadSingle: MediaStrategyUploadSingle;
    deleteSingle: MediaStrategyDeleteSingle;
    deleteMultiple: MediaStrategyDeleteMultiple;
};
interface LucidConfig {
    /** A Postgres, SQLite or LibSQL database adapter instance. These can be imported from `@lucidcms/core/adapters`. */
    db: DatabaseAdapter;
    /** The host of the Lucid instance. */
    host: string;
    /** `64 character` length keys to encrypt and sign data. */
    keys: {
        /** Used to encrypt user secrets and API keys. Must be `64 characters` long. */
        encryptionKey: string;
        /** Used to sign cookies. Must be `64 characters` long. */
        cookieSecret: string;
        /** Used to sign the access token JWT. Must be `64 characters` long. */
        accessTokenSecret: string;
        /** Used to sign the refresh token JWT. Must be `64 characters` long. */
        refreshTokenSecret: string;
    };
    /** Disables the swagger documentation site. */
    disableSwagger?: boolean;
    /** Localisation settings. */
    localisation?: {
        /** A list of locales you want to write content in. */
        locales: {
            /** The label of the locale. Eg. `English`, `French`, `German` etc. */
            label: string;
            /** The code of the locale. Eg. `en`, `fr`, `de` etc. */
            code: string;
        }[];
        /** The default locale code. Eg. `en`. */
        defaultLocale: string;
    };
    /** Paths to static assets. */
    paths?: {
        /** The path to the email templates directory. This can be used to override or extend the default templates. */
        emailTemplates?: string;
    };
    /** Email settings. */
    email?: {
        /** The email from settings. */
        from: {
            /** The email address to send emails from. */
            email: string;
            /** The name to send emails from. */
            name: string;
        };
        /** The email strategy services to use. These determine how emails are sent. */
        strategy: EmailStrategy;
    };
    /** Media settings. */
    media?: {
        /** The storage limit in bytes. */
        storage?: number;
        /** The maximum file size in bytes. */
        maxSize?: number;
        /** The processed image settings. */
        processed?: {
            /** The total amount of processed images allow for a single image media item. */
            limit?: number;
            /** If the processed images should be stored using the uploadSingle media strategy. If false, processed images are generated on request. */
            store?: boolean;
        };
        /** The fallback image to use if an image cannot be found.
         *  - If false or underfined, images will return a 404 status code.
         *  - If a string is passed, it will attempt to stream the url as the response.
         *  - If true, the default fallback image will be used.
         **/
        fallbackImage?: string | boolean | undefined;
        /** The media strategy services to use. These determine how media is stored, retrieved and deleted. */
        strategy?: MediaStrategy;
    };
    /** Fastify extensions to register. Allows you to register custom routes, middleware, and more. */
    fastifyExtensions?: Array<(fastify: FastifyInstance) => Promise<void>>;
    /** Hooks to register. Allows you to register custom hooks to run before or after certain events. */
    hooks?: Array<AllHooks>;
    /** A list of collections instances to register. These can be imported from `@lucidcms/core/builders`. */
    collections?: CollectionBuilder[];
    /** A list of Lucid plugins to register. Plugins simply merge their own config with the Lucid config. */
    plugins?: LucidPlugin[];
    /** Extend Vites config */
    vite?: InlineConfig;
}
interface Config extends zod__default.infer<typeof ConfigSchema> {
    db: DatabaseAdapter;
    email?: {
        from: {
            email: string;
            name: string;
        };
        strategy: EmailStrategy;
    };
    disableSwagger: boolean;
    localisation: {
        locales: {
            label: string;
            code: string;
        }[];
        defaultLocale: string;
    };
    media: {
        storage: number;
        maxSize: number;
        processed: {
            limit: number;
            store: boolean;
        };
        fallbackImage: string | boolean | undefined;
        strategy?: MediaStrategy;
    };
    fastifyExtensions: Array<(fastify: FastifyInstance) => Promise<void>>;
    hooks: Array<AllHooks>;
    collections: CollectionBuilder[];
    plugins: Array<LucidPlugin>;
    vite?: InlineConfig;
}

type LogLevel = "error" | "warn" | "info" | "debug";
declare enum LoggerScopes {
    CONFIG = "config"
}
declare const logger: (level: LogLevel, data: {
    message: string;
    scope?: LoggerScopes | string;
    data?: Record<string, unknown>;
}) => void;

declare module "fastify" {
    interface FastifyInstance {
        config: Config;
        logger: typeof logger;
        services: typeof lucidServices;
    }
    interface FastifyRequest {
        auth: {
            id: number;
            username: string;
            email: string;
            superAdmin: BooleanInt;
            permissions: UserPermissionsResponse["permissions"] | undefined;
        };
        locale: {
            code: LocalesResponse["code"];
        };
        server: FastifyInstance;
        clientIntegrationAuth: {
            id: number;
            key: string;
        };
    }
}
type RouteController<P extends zod__default.ZodTypeAny | undefined, B extends zod__default.ZodTypeAny | undefined, Q extends zod__default.ZodTypeAny | undefined> = (request: FastifyRequest<{
    Params: zod__default.infer<P>;
    Body: zod__default.infer<B>;
    Querystring: zod__default.infer<Q>;
}>, reply: FastifyReply) => void;

interface GroupProp {
    group_id: number;
    parent_group_id: number | null;
    collection_brick_id: number | null;
    repeater_key: string;
    group_order: number;
    group_open: BooleanInt | null;
    ref: string | null;
    collection_document_version_id: number;
}

interface FieldProp {
    fields_id: number;
    collection_brick_id: number | null;
    collection_document_version_id: number;
    group_id?: number | null;
    locale_code: string;
    key: string;
    type: string;
    text_value: string | null;
    int_value: number | null;
    bool_value: BooleanInt | null;
    json_value?: JSONString | null;
    user_id?: number | null;
    user_email?: string | null;
    user_first_name?: string | null;
    user_last_name?: string | null;
    user_username?: string | null;
    document_id?: number | null;
    media_id?: number | null;
    media_key?: string | null;
    media_mime_type?: string | null;
    media_file_extension?: string | null;
    media_file_size?: number | null;
    media_width?: number | null;
    media_height?: number | null;
    media_type?: string | null;
    media_blur_hash?: string | null;
    media_average_colour?: string | null;
    media_is_dark?: BooleanInt | null;
    media_is_light?: BooleanInt | null;
    media_title_translations?: Array<{
        value: string | null;
        locale_code: string | null;
    }>;
    media_alt_translations?: Array<{
        value: string | null;
        locale_code: string | null;
    }>;
    document_fields?: Array<FieldProp>;
    document_groups?: Array<GroupProp>;
}
interface FieldFormatMeta {
    builder: BrickBuilder | CollectionBuilder;
    host: string;
    collectionTranslations: boolean;
    localisation: {
        locales: string[];
        default: string;
    };
    collections: CollectionBuilder[];
}

declare abstract class CustomField<T extends FieldTypes> {
    repeater: string | null;
    abstract type: T;
    abstract column: CFColumn<T>;
    abstract key: string;
    abstract props?: CFProps<T>;
    abstract config: CFConfig<T>;
    abstract responseValueFormat(props?: {
        data?: FieldProp;
        formatMeta: FieldFormatMeta;
    }): CFResponse<T>;
    abstract cfSpecificValidation(value: unknown, relationData?: unknown): {
        valid: boolean;
        message?: string;
    };
    abstract getInsertField(props: {
        item: FieldInsertItem;
        brickId: number;
        groupId: number | null;
    }): CFInsertItem<T> | null;
    validate(props: {
        type: FieldTypes;
        value: unknown;
        relationData?: unknown;
    }): CustomFieldValidateResponse;
    private fieldTypeValidation;
    private requiredCheck;
    private zodCheck;
    get errors(): {
        fieldType: CustomFieldErrorItem;
        required: CustomFieldErrorItem;
        zod: CustomFieldErrorItem;
    };
}

interface FieldBuilderMeta {
    fieldKeys: string[];
    repeaterDepth: Record<string, number>;
}

declare class FieldBuilder {
    fields: Map<string, CustomField<FieldTypes>>;
    repeaterStack: string[];
    meta: FieldBuilderMeta;
    addRepeater(key: string, props?: CFProps<"repeater">): this;
    addText(key: string, props?: CFProps<"text">): this;
    addWysiwyg(key: string, props?: CFProps<"wysiwyg">): this;
    addMedia(key: string, props?: CFProps<"media">): this;
    addDocument(key: string, props: CFProps<"document">): this;
    addNumber(key: string, props?: CFProps<"number">): this;
    addCheckbox(key: string, props?: CFProps<"checkbox">): this;
    addSelect(key: string, props?: CFProps<"select">): this;
    addTextarea(key: string, props?: CFProps<"textarea">): this;
    addJSON(key: string, props?: CFProps<"json">): this;
    addColour(key: string, props?: CFProps<"colour">): this;
    addDateTime(key: string, props?: CFProps<"datetime">): this;
    addLink(key: string, props?: CFProps<"link">): this;
    addUser(key: string, props?: CFProps<"user">): this;
    endRepeater(): this;
    private nestFields;
    get fieldTree(): CFConfig<FieldTypes>[];
    get fieldTreeNoTab(): Exclude<CFConfig<FieldTypes>, TabFieldConfig>[];
    get flatFields(): CFConfig<FieldTypes>[];
}

declare class BrickBuilder extends FieldBuilder {
    key: string;
    config: BrickConfig;
    constructor(key: string, config?: BrickConfigProps);
    addFields(Builder: BrickBuilder | FieldBuilder): this;
    addTab(key: string, props?: CFProps<"tab">): this;
}

declare const CollectionConfigSchema: zod__default.ZodObject<{
    mode: zod__default.ZodEnum<["single", "multiple"]>;
    details: zod__default.ZodObject<{
        name: zod__default.ZodUnion<[zod__default.ZodString, zod__default.ZodRecord<zod__default.ZodEnum<["en"]>, zod__default.ZodString>]>;
        singularName: zod__default.ZodUnion<[zod__default.ZodString, zod__default.ZodRecord<zod__default.ZodEnum<["en"]>, zod__default.ZodString>]>;
        summary: zod__default.ZodOptional<zod__default.ZodUnion<[zod__default.ZodString, zod__default.ZodRecord<zod__default.ZodEnum<["en"]>, zod__default.ZodString>]>>;
    }, "strip", zod__default.ZodTypeAny, {
        name: string | Partial<Record<"en", string>>;
        singularName: string | Partial<Record<"en", string>>;
        summary?: string | Partial<Record<"en", string>> | undefined;
    }, {
        name: string | Partial<Record<"en", string>>;
        singularName: string | Partial<Record<"en", string>>;
        summary?: string | Partial<Record<"en", string>> | undefined;
    }>;
    config: zod__default.ZodOptional<zod__default.ZodObject<{
        isLocked: zod__default.ZodOptional<zod__default.ZodDefault<zod__default.ZodBoolean>>;
        useTranslations: zod__default.ZodOptional<zod__default.ZodDefault<zod__default.ZodBoolean>>;
        useDrafts: zod__default.ZodOptional<zod__default.ZodDefault<zod__default.ZodBoolean>>;
        useRevisions: zod__default.ZodOptional<zod__default.ZodDefault<zod__default.ZodBoolean>>;
    }, "strip", zod__default.ZodTypeAny, {
        isLocked?: boolean | undefined;
        useTranslations?: boolean | undefined;
        useDrafts?: boolean | undefined;
        useRevisions?: boolean | undefined;
    }, {
        isLocked?: boolean | undefined;
        useTranslations?: boolean | undefined;
        useDrafts?: boolean | undefined;
        useRevisions?: boolean | undefined;
    }>>;
    hooks: zod__default.ZodOptional<zod__default.ZodArray<zod__default.ZodObject<{
        event: zod__default.ZodString;
        handler: zod__default.ZodUnknown;
    }, "strip", zod__default.ZodTypeAny, {
        event: string;
        handler?: unknown;
    }, {
        event: string;
        handler?: unknown;
    }>, "many">>;
    bricks: zod__default.ZodOptional<zod__default.ZodObject<{
        fixed: zod__default.ZodOptional<zod__default.ZodArray<zod__default.ZodUnknown, "many">>;
        builder: zod__default.ZodOptional<zod__default.ZodArray<zod__default.ZodUnknown, "many">>;
    }, "strip", zod__default.ZodTypeAny, {
        builder?: unknown[] | undefined;
        fixed?: unknown[] | undefined;
    }, {
        builder?: unknown[] | undefined;
        fixed?: unknown[] | undefined;
    }>>;
}, "strip", zod__default.ZodTypeAny, {
    details: {
        name: string | Partial<Record<"en", string>>;
        singularName: string | Partial<Record<"en", string>>;
        summary?: string | Partial<Record<"en", string>> | undefined;
    };
    mode: "single" | "multiple";
    config?: {
        isLocked?: boolean | undefined;
        useTranslations?: boolean | undefined;
        useDrafts?: boolean | undefined;
        useRevisions?: boolean | undefined;
    } | undefined;
    hooks?: {
        event: string;
        handler?: unknown;
    }[] | undefined;
    bricks?: {
        builder?: unknown[] | undefined;
        fixed?: unknown[] | undefined;
    } | undefined;
}, {
    details: {
        name: string | Partial<Record<"en", string>>;
        singularName: string | Partial<Record<"en", string>>;
        summary?: string | Partial<Record<"en", string>> | undefined;
    };
    mode: "single" | "multiple";
    config?: {
        isLocked?: boolean | undefined;
        useTranslations?: boolean | undefined;
        useDrafts?: boolean | undefined;
        useRevisions?: boolean | undefined;
    } | undefined;
    hooks?: {
        event: string;
        handler?: unknown;
    }[] | undefined;
    bricks?: {
        builder?: unknown[] | undefined;
        fixed?: unknown[] | undefined;
    } | undefined;
}>;

interface FieldCollectionConfig {
    column?: boolean;
    filterable?: boolean;
}
interface CollectionConfigSchemaType extends zod__default.infer<typeof CollectionConfigSchema> {
    hooks?: CollectionDocumentBuilderHooks[];
    bricks?: {
        fixed?: Array<BrickBuilder>;
        builder?: Array<BrickBuilder>;
    };
}
type CollectionData = {
    key: string;
    mode: CollectionConfigSchemaType["mode"];
    details: {
        name: LocaleValue;
        singularName: LocaleValue;
        summary: LocaleValue | null;
    };
    config: {
        isLocked: boolean;
        useDrafts: boolean;
        useRevisions: boolean;
        useTranslations: boolean;
        fields: {
            filter: FieldFilters;
            include: string[];
        };
    };
};
type FieldFilters = Array<{
    key: string;
    type: FieldTypes;
}>;
interface CollectionBrickConfig {
    key: BrickBuilder["key"];
    details: BrickBuilder["config"]["details"];
    preview: BrickBuilder["config"]["preview"];
    fields: CFConfig<FieldTypes>[];
}
interface DocumentFieldFilters {
    key: string;
    value: FilterValue;
    operator: FilterOperator;
    column: CFColumn<FieldTypes>;
}

interface UserResponse {
    id: number;
    superAdmin?: BooleanInt;
    email: string;
    username: string;
    firstName: string | null;
    lastName: string | null;
    triggerPasswordReset?: BooleanInt;
    roles?: UserPermissionsResponse["roles"];
    permissions?: UserPermissionsResponse["permissions"];
    createdAt: string | null;
    updatedAt?: string | null;
}
interface UserPermissionsResponse {
    roles: Array<{
        id: number;
        name: string;
    }>;
    permissions: Permission[];
}
interface SettingsResponse {
    email: {
        enabled: boolean;
        from: {
            email: string;
            name: string;
        } | null;
    };
    media: {
        enabled: boolean;
        storage: {
            total: number;
            remaining: number | null;
            used: number | null;
            limit: number;
        };
        processed: {
            stored: boolean;
            imageLimit: number;
            total: number | null;
        };
    };
}
interface RoleResponse {
    id: number;
    name: string;
    description: string | null;
    permissions?: {
        id: number;
        permission: Permission;
    }[];
    createdAt: string | null;
    updatedAt: string | null;
}
type OptionName = "media_storage_used";
interface OptionsResponse {
    name: OptionName;
    valueText: string | null;
    valueInt: number | null;
    valueBool: BooleanInt | null;
}
type MediaType = "image" | "video" | "audio" | "document" | "archive" | "unknown";
interface MediaResponse {
    id: number;
    key: string;
    url: string;
    title: {
        localeCode: string | null;
        value: string | null;
    }[];
    alt: {
        localeCode: string | null;
        value: string | null;
    }[];
    type: MediaType;
    meta: {
        mimeType: string;
        extension: string;
        fileSize: number;
        width: number | null;
        height: number | null;
        blurHash: string | null;
        averageColour: string | null;
        isDark: BooleanInt | null;
        isLight: BooleanInt | null;
    };
    createdAt: string | null;
    updatedAt: string | null;
}
interface LocalesResponse {
    code: string;
    name: string | null;
    isDefault: BooleanInt;
    createdAt: string | null;
    updatedAt: string | null;
}
interface EmailResponse {
    id: number;
    mailDetails: {
        from: {
            address: string;
            name: string;
        };
        to: string;
        subject: string;
        cc: null | string;
        bcc: null | string;
        template: string;
    };
    data: Record<string, unknown> | null;
    deliveryStatus: "sent" | "failed" | "pending";
    type: "external" | "internal";
    emailHash: string;
    sentCount: number;
    errorCount: number;
    html: string | null;
    errorMessage: string | null;
    createdAt: string | null;
    lastSuccessAt: string | null;
    lastAttemptAt: string | null;
}
interface CollectionResponse {
    key: string;
    documentId?: number | null;
    mode: CollectionConfigSchemaType["mode"];
    details: {
        name: LocaleValue;
        singularName: LocaleValue;
        summary: LocaleValue | null;
    };
    config: {
        useTranslations: boolean;
        useDrafts: boolean;
        useRevisions: boolean;
        isLocked: boolean;
        fieldIncludes: string[];
        fieldFilters: string[];
    };
    fixedBricks: Array<CollectionBrickConfig>;
    builderBricks: Array<CollectionBrickConfig>;
    fields: CFConfig<FieldTypes>[];
}
interface BrickResponse {
    id: number;
    key: string;
    order: number;
    open: BooleanInt | null;
    type: "builder" | "fixed";
    fields: Array<FieldResponse>;
}
interface BrickAltResponse {
    id: number;
    key: string;
    order: number;
    open: BooleanInt | null;
    type: "builder" | "fixed";
    fields: Record<string, FieldAltResponse>;
}
interface FieldResponse {
    key: string;
    type: FieldTypes;
    groupId?: number;
    translations?: Record<string, FieldResponseValue>;
    value?: FieldResponseValue;
    meta?: Record<string, FieldResponseMeta> | FieldResponseMeta;
    groups?: Array<FieldGroupResponse>;
}
interface FieldAltResponse {
    key: string;
    type: FieldTypes;
    groupId?: number;
    translations?: Record<string, FieldResponseValue>;
    value?: FieldResponseValue;
    meta?: Record<string, FieldResponseMeta> | FieldResponseMeta;
    groups?: Array<FieldGroupAltResponse>;
}
interface FieldGroupResponse {
    id: number | string;
    order: number;
    open: BooleanInt | null;
    fields: Array<FieldResponse>;
}
interface FieldGroupAltResponse {
    id: number | string;
    order: number;
    open: BooleanInt | null;
    fields: Record<string, FieldAltResponse>;
}
interface CollectionDocumentVersionResponse {
    id: number;
    versionType: DocumentVersionType;
    promotedFrom: number | null;
    createdAt: string | null;
    createdBy: number | null;
    document: {
        id: number | null;
        collectionKey: string | null;
        createdBy: number | null;
        createdAt: string | null;
        updatedAt: string | null;
        updatedBy: number | null;
    };
    bricks: Record<Partial<BrickTypes>, Array<{
        id: number;
        brickKey: string | null;
        fields: number;
    }>>;
}
interface CollectionDocumentResponse {
    id: number;
    collectionKey: string | null;
    status: DocumentVersionType | null;
    versionId: number | null;
    version: {
        draft: {
            id: number | null;
            promotedFrom: number | null;
            createdAt: string | null;
            createdBy: number | null;
        } | null;
        published: {
            id: number | null;
            promotedFrom: number | null;
            createdAt: string | null;
            createdBy: number | null;
        } | null;
    };
    createdBy: {
        id: number;
        email: string | null;
        firstName: string | null;
        lastName: string | null;
        username: string | null;
    } | null;
    createdAt: string | null;
    updatedAt: string | null;
    updatedBy: {
        id: number;
        email: string | null;
        firstName: string | null;
        lastName: string | null;
        username: string | null;
    } | null;
    bricks?: Array<BrickResponse> | null;
    fields?: Array<FieldResponse> | null;
}
interface ClientDocumentResponse {
    id: number;
    collectionKey: string | null;
    status: DocumentVersionType | null;
    version: {
        draft: {
            id: number | null;
            promotedFrom: number | null;
            createdAt: string | null;
            createdBy: number | null;
        } | null;
        published: {
            id: number | null;
            promotedFrom: number | null;
            createdAt: string | null;
            createdBy: number | null;
        } | null;
    };
    createdBy: {
        id: number;
        email: string | null;
        firstName: string | null;
        lastName: string | null;
        username: string | null;
    } | null;
    createdAt: string | null;
    updatedAt: string | null;
    updatedBy: {
        id: number;
        email: string | null;
        firstName: string | null;
        lastName: string | null;
        username: string | null;
    } | null;
    bricks?: Array<BrickAltResponse> | null;
    fields?: Record<string, FieldAltResponse> | null;
}
interface ResponseBody<D = unknown> {
    data: D;
    links?: {
        first: string | null;
        last: string | null;
        next: string | null;
        prev: string | null;
    };
    meta: {
        links: Array<{
            active: boolean;
            label: string;
            url: string | null;
            page: number;
        }>;
        path: string;
        currentPage: number | null;
        lastPage: number | null;
        perPage: number | null;
        total: number | null;
    };
}
interface ErrorResponse {
    status: number;
    code?: string;
    name: string;
    message: string;
    errors?: ErrorResult;
}
type Permission = "create_user" | "update_user" | "delete_user" | "create_role" | "update_role" | "delete_role" | "create_media" | "update_media" | "delete_media" | "read_email" | "delete_email" | "send_email" | "create_content" | "publish_content" | "restore_content" | "update_content" | "delete_content" | "delete_collection" | "create_collection" | "update_collection" | "create_client_integration" | "update_client_integration" | "delete_client_integration" | "regenerate_client_integration";
type PermissionGroup = {
    key: string;
    permissions: Permission[];
};
type PermissionGroupKey = "users" | "roles" | "media" | "emails" | "content" | "client-integrations";
interface ClientIntegrationResponse {
    id: number;
    key: string;
    name: string;
    description: string | null;
    enabled: BooleanInt;
    createdAt: string | null;
    updatedAt: string | null;
}

type CustomFieldMap = {
    tab: {
        props: TabFieldProps;
        config: TabFieldConfig;
        column: null;
        response: {
            value: TabResValue;
            meta: TabResMeta;
        };
    };
    text: {
        props: TextFieldProps;
        config: TextFieldConfig;
        column: "text_value";
        response: {
            value: TextResValue;
            meta: TextResMeta;
        };
    };
    wysiwyg: {
        props: WysiwygFieldProps;
        config: WysiwygFieldConfig;
        column: "text_value";
        response: {
            value: WysiwygResValue;
            meta: WysiwygResMeta;
        };
    };
    media: {
        props: MediaFieldProps;
        config: MediaFieldConfig;
        column: "media_id";
        response: {
            value: MediaResValue;
            meta: MediaResMeta;
        };
    };
    document: {
        props: DocumentFieldProps;
        config: DocumentFieldConfig;
        column: "document_id";
        response: {
            value: DocumentResValue;
            meta: DocumentResMeta;
        };
    };
    repeater: {
        props: RepeaterFieldProps;
        config: RepeaterFieldConfig;
        column: null;
        response: {
            value: RepeaterResValue;
            meta: RepeaterResMeta;
        };
    };
    number: {
        props: NumberFieldProps;
        config: NumberFieldConfig;
        column: "int_value";
        response: {
            value: NumberResValue;
            meta: NumberResMeta;
        };
    };
    checkbox: {
        props: CheckboxFieldProps;
        config: CheckboxFieldConfig;
        column: "bool_value";
        response: {
            value: CheckboxResValue;
            meta: CheckboxResMeta;
        };
    };
    select: {
        props: SelectFieldProps;
        config: SelectFieldConfig;
        column: "text_value";
        response: {
            value: SelectReValue;
            meta: SelectResMeta;
        };
    };
    textarea: {
        props: TextareaFieldProps;
        config: TextareaFieldConfig;
        column: "text_value";
        response: {
            value: TextareaResValue;
            meta: TextareaResMeta;
        };
    };
    json: {
        props: JsonFieldProps;
        config: JsonFieldConfig;
        column: "json_value";
        response: {
            value: JsonResValue;
            meta: JsonResMeta;
        };
    };
    colour: {
        props: ColourFieldProps;
        config: ColourFieldConfig;
        column: "text_value";
        response: {
            value: ColourResValue;
            meta: ColourResMeta;
        };
    };
    datetime: {
        props: DatetimeFieldProps;
        config: DatetimeFieldConfig;
        column: "text_value";
        response: {
            value: DatetimeResValue;
            meta: DatetimeResMeta;
        };
    };
    link: {
        props: LinkFieldProps;
        config: LinkFieldConfig;
        column: "text_value";
        response: {
            value: LinkResValue;
            meta: LinkResMeta;
        };
    };
    user: {
        props: UserFieldProps;
        config: UserFieldConfig;
        column: "user_id";
        response: {
            value: UserResValue;
            meta: UserResMeta;
        };
    };
};
type FieldTypes = keyof CustomFieldMap;
type FieldColumns = "text_value" | "media_id" | "int_value" | "bool_value" | "json_value" | "user_id";
type CFConfig<T extends FieldTypes> = CustomFieldMap[T]["config"];
type CFProps<T extends FieldTypes> = CustomFieldMap[T]["props"];
type CFColumn<T extends FieldTypes> = CustomFieldMap[T]["column"];
type CFResponse<T extends FieldTypes> = CustomFieldMap[T]["response"];
type SharedFieldConfig = {
    key: string;
    type: FieldTypes;
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
    };
};
interface TabFieldConfig extends SharedFieldConfig {
    type: "tab";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
    };
    fields: Exclude<CFConfig<FieldTypes>, TabFieldConfig>[];
}
interface TextFieldConfig extends SharedFieldConfig {
    type: "text";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        placeholder?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        default?: string;
        isHidden?: boolean;
        isDisabled?: boolean;
    };
    validation?: {
        required?: boolean;
        zod?: ZodType<unknown> | undefined;
    };
}
interface WysiwygFieldConfig extends SharedFieldConfig {
    type: "wysiwyg";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        placeholder?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        default?: string;
        isHidden?: boolean;
        isDisabled?: boolean;
    };
    validation?: {
        required?: boolean;
        zod?: ZodType<unknown> | undefined;
    };
}
interface MediaFieldConfig extends SharedFieldConfig {
    type: "media";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: number;
    };
    validation?: {
        required?: boolean;
        extensions?: string[];
        type?: MediaType;
        width?: {
            min?: number;
            max?: number;
        };
        height?: {
            min?: number;
            max?: number;
        };
    };
}
interface DocumentFieldConfig extends SharedFieldConfig {
    type: "document";
    collection: string;
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: number | null;
    };
    validation?: {
        required?: boolean;
    };
}
interface RepeaterFieldConfig extends SharedFieldConfig {
    type: "repeater";
    fields: Exclude<CFConfig<FieldTypes>, TabFieldConfig>[];
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
    };
    config: {
        isDisabled?: boolean;
    };
    validation?: {
        maxGroups?: number;
    };
}
interface NumberFieldConfig extends SharedFieldConfig {
    type: "number";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        placeholder?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: number | null;
    };
    validation?: {
        required?: boolean;
        zod?: ZodType<unknown>;
    };
}
interface CheckboxFieldConfig extends SharedFieldConfig {
    type: "checkbox";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        true?: LocaleValue;
        false?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: BooleanInt;
    };
    validation?: {
        required?: boolean;
    };
}
interface SelectFieldConfig extends SharedFieldConfig {
    type: "select";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        placeholder?: LocaleValue;
    };
    options: Array<{
        label: LocaleValue;
        value: string;
    }>;
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: string;
    };
    validation?: {
        required?: boolean;
    };
}
interface TextareaFieldConfig extends SharedFieldConfig {
    type: "textarea";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        placeholder?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: string;
    };
    validation?: {
        required?: boolean;
        zod?: ZodType<unknown>;
    };
}
interface JsonFieldConfig extends SharedFieldConfig {
    type: "json";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        placeholder?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: Record<string, unknown>;
    };
    validation?: {
        required?: boolean;
        zod?: ZodType<unknown>;
    };
}
interface ColourFieldConfig extends SharedFieldConfig {
    type: "colour";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
    };
    presets: string[];
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: string;
    };
    validation?: {
        required?: boolean;
    };
}
interface DatetimeFieldConfig extends SharedFieldConfig {
    type: "datetime";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        placeholder?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: string;
    };
    validation?: {
        required?: boolean;
        zod?: ZodType<unknown>;
    };
}
interface LinkFieldConfig extends SharedFieldConfig {
    type: "link";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
        placeholder?: LocaleValue;
    };
    config: {
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
        default?: LinkResValue;
    };
    validation?: {
        required?: boolean;
    };
}
interface UserFieldConfig extends SharedFieldConfig {
    type: "user";
    details: {
        label?: LocaleValue;
        summary?: LocaleValue;
    };
    config: {
        default?: number;
        useTranslations?: boolean;
        isHidden?: boolean;
        isDisabled?: boolean;
    };
    validation?: {
        required?: boolean;
    };
}
type OmitDefault<T> = T extends {
    config: unknown;
} ? Omit<T, "config"> & {
    config?: Omit<T["config"], "default">;
} : T;
type TabFieldProps = Partial<Omit<TabFieldConfig, "type" | "fields">>;
type TextFieldProps = Partial<Omit<TextFieldConfig, "type">>;
type WysiwygFieldProps = Partial<Omit<WysiwygFieldConfig, "type">>;
type MediaFieldProps = Partial<OmitDefault<Omit<MediaFieldConfig, "type">>>;
type RepeaterFieldProps = Partial<Omit<RepeaterFieldConfig, "type" | "fields">>;
type DocumentFieldProps = Partial<OmitDefault<Omit<DocumentFieldConfig, "type">>> & {
    collection: string;
};
type NumberFieldProps = Partial<Omit<NumberFieldConfig, "type">>;
type CheckboxFieldProps = Partial<Omit<CheckboxFieldConfig, "type">>;
type SelectFieldProps = Partial<Omit<SelectFieldConfig, "type">>;
type TextareaFieldProps = Partial<Omit<TextareaFieldConfig, "type">>;
type JsonFieldProps = Partial<Omit<JsonFieldConfig, "type">>;
type ColourFieldProps = Partial<Omit<ColourFieldConfig, "type">>;
type DatetimeFieldProps = Partial<Omit<DatetimeFieldConfig, "type">>;
type LinkFieldProps = Partial<Omit<LinkFieldConfig, "type">>;
type UserFieldProps = Partial<OmitDefault<Omit<UserFieldConfig, "type">>>;
type CFInsertItem<T extends FieldTypes> = {
    localeCode: string;
    collectionBrickId: number;
    key: string;
    type: T;
    groupId?: number | null;
    textValue?: string | null;
    intValue?: number | null;
    boolValue?: BooleanInt | null;
    jsonValue?: string | null;
    mediaId?: number | null;
    userId?: number | null;
    documentId?: number | null;
};
type TabResValue = null;
type TextResValue = string | null;
type WysiwygResValue = string | null;
type MediaResValue = number | null;
type RepeaterResValue = null;
type NumberResValue = number | null;
type CheckboxResValue = BooleanInt | null;
type SelectReValue = string | null;
type TextareaResValue = string | null;
type JsonResValue = Record<string, unknown> | null;
type ColourResValue = string | null;
type DatetimeResValue = string | null;
type DocumentResValue = number | null;
type LinkResValue = {
    url: string | null;
    target: string | null;
    label: string | null;
} | null;
type UserResValue = number | null;
type FieldResponseValue = TabResValue | TextResValue | WysiwygResValue | MediaResValue | RepeaterResValue | NumberResValue | CheckboxResValue | SelectReValue | TextareaResValue | JsonResValue | ColourResValue | DatetimeResValue | LinkResValue | UserResValue | undefined;
type TabResMeta = null;
type TextResMeta = null;
type WysiwygResMeta = null;
type MediaResMeta = {
    id: number | null;
    url: string | null;
    key: string | null;
    mimeType: string | null;
    extension: string | null;
    fileSize: number | null;
    width: number | null;
    height: number | null;
    blurHash: string | null;
    averageColour: string | null;
    isDark: BooleanInt | null;
    isLight: BooleanInt | null;
    title: Record<string, string>;
    alt: Record<string, string>;
    type: MediaType | null;
} | null;
type DocumentResMeta = {
    id: number | null;
    fields: Record<string, FieldAltResponse> | null;
};
type RepeaterResMeta = null;
type NumberResMeta = null;
type CheckboxResMeta = null;
type SelectResMeta = null;
type TextareaResMeta = null;
type JsonResMeta = null;
type ColourResMeta = null;
type DatetimeResMeta = null;
type LinkResMeta = null;
type UserResMeta = {
    username: string | null;
    email: string | null;
    firstName: string | null;
    lastName: string | null;
} | null;
type FieldResponseMeta = TabResMeta | TextResMeta | WysiwygResMeta | MediaResMeta | RepeaterResMeta | NumberResMeta | CheckboxResMeta | SelectResMeta | TextareaResMeta | JsonResMeta | ColourResMeta | DatetimeResMeta | LinkResMeta | UserResMeta | DocumentResMeta | undefined;
type CustomFieldErrorItem = {
    condition?: (...args: unknown[]) => boolean;
    message: string;
};
type CustomFieldValidateResponse = {
    valid: boolean;
    message?: string;
};
interface MediaReferenceData {
    id: number;
    file_extension: string;
    width: number | null;
    height: number | null;
    type: string;
}
interface UserReferenceData {
    id: number;
    username: string;
    first_name: string | null;
    last_name: string | null;
    email: string;
}
interface DocumentReferenceData {
    id: number;
    collection_key: string;
}

type KyselyDB = Kysely<LucidDB>;
declare enum AdapterType {
    SQLITE = 0,
    POSTGRES = 1,
    LIBSQL = 2
}
type DocumentVersionType = "draft" | "published" | "revision";
type TimestampMutateable = ColumnType<string | Date | null, string | undefined, string>;
type TimestampImmutable = ColumnType<string | Date, string | undefined, never>;
type BooleanInt = 0 | 1;
type JSONString = string;
interface LucidLocales {
    code: string;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
    is_deleted: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
    is_deleted_at: TimestampMutateable;
}
interface LucidTranslationKeys {
    id: Generated<number>;
    created_at: TimestampImmutable;
}
interface LucidTranslations {
    id: Generated<number>;
    translation_key_id: number;
    locale_code: string;
    value: string | null;
}
interface LucidOptions {
    name: OptionName;
    value_int: number | null;
    value_text: string | null;
    value_bool: BooleanInt | null;
}
interface LucidUsers {
    id: Generated<number>;
    super_admin: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
    email: string;
    username: string;
    first_name: string | null;
    last_name: string | null;
    password: ColumnType<string, string | undefined, string>;
    secret: ColumnType<string, string, string>;
    triggered_password_reset: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
    is_deleted: BooleanInt | null;
    is_deleted_at: TimestampMutateable;
    deleted_by: number | null;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
}
interface LucidRoles {
    id: Generated<number>;
    name: string;
    description: string | null;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
}
interface LucidRolePermissions {
    id: Generated<number>;
    role_id: number;
    permission: string;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
}
interface LucidUserRoles {
    id: Generated<number>;
    user_id: number | null;
    role_id: number | null;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
}
interface LucidUserTokens {
    id: Generated<number>;
    user_id: number | null;
    token_type: "password_reset" | "refresh";
    token: string;
    created_at: TimestampImmutable;
    expiry_date: TimestampMutateable;
}
interface LucidEmails {
    id: Generated<number>;
    email_hash: string;
    from_address: string;
    from_name: string;
    to_address: string;
    subject: string;
    cc: string | null;
    bcc: string | null;
    delivery_status: "pending" | "delivered" | "failed";
    template: string;
    data: JSONString | null;
    type: "internal" | "external";
    sent_count: number;
    error_count: number;
    last_error_message: string | null;
    last_attempt_at: TimestampMutateable;
    last_success_at: TimestampMutateable;
    created_at: TimestampImmutable;
}
interface LucidMedia {
    id: Generated<number>;
    key: string;
    e_tag: string | null;
    visible: BooleanInt;
    type: string;
    mime_type: string;
    file_extension: string;
    file_size: number;
    width: number | null;
    height: number | null;
    blur_hash: string | null;
    average_colour: string | null;
    is_dark: BooleanInt | null;
    is_light: BooleanInt | null;
    custom_meta: string | null;
    title_translation_key_id: number | null;
    alt_translation_key_id: number | null;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
}
interface LucidMediaAwaitingSync {
    key: string;
    timestamp: TimestampImmutable;
}
interface HeadlessProcessedImages {
    key: string;
    media_key: string | null;
    file_size: number;
}
interface LucidCollectionDocuments {
    id: Generated<number>;
    collection_key: string;
    is_deleted: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
    is_deleted_at: TimestampMutateable;
    deleted_by: number | null;
    created_by: number | null;
    updated_by: number | null;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
}
interface LucidCollectionDocumentVersions {
    id: Generated<number>;
    document_id: number;
    version_type: DocumentVersionType;
    promoted_from: number | null;
    created_at: TimestampImmutable;
    created_by: number | null;
}
interface LucidCollectionDocumentBricks {
    id: Generated<number>;
    collection_document_version_id: number;
    brick_type: BrickTypes;
    brick_key: string | null;
    brick_order: number | null;
    brick_open: BooleanInt | null;
}
interface LucidCollectionDocumentGroups {
    group_id: Generated<number>;
    collection_document_id: number;
    collection_document_version_id: number;
    collection_brick_id: number;
    parent_group_id: number | null;
    repeater_key: string;
    group_order: number;
    group_open: BooleanInt | null;
    ref: string | null;
}
interface LucidCollectionDocumentFields {
    fields_id: Generated<number>;
    collection_document_id: number;
    collection_document_version_id: number;
    collection_brick_id: number;
    group_id: number | null;
    locale_code: string;
    key: string;
    type: FieldTypes;
    text_value: string | null;
    int_value: number | null;
    bool_value: BooleanInt | null;
    json_value: JSONString | null;
    user_id: number | null;
    media_id: number | null;
    document_id: number | null;
}
interface LucidClientIntegrations {
    id: Generated<number>;
    name: string;
    description: string | null;
    enabled: BooleanInt;
    key: string;
    api_key: string;
    secret: string;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
}
interface LucidDB {
    lucid_locales: LucidLocales;
    lucid_translation_keys: LucidTranslationKeys;
    lucid_translations: LucidTranslations;
    lucid_options: LucidOptions;
    lucid_users: LucidUsers;
    lucid_roles: LucidRoles;
    lucid_role_permissions: LucidRolePermissions;
    lucid_user_roles: LucidUserRoles;
    lucid_user_tokens: LucidUserTokens;
    lucid_emails: LucidEmails;
    lucid_media: LucidMedia;
    lucid_media_awaiting_sync: LucidMediaAwaitingSync;
    lucid_processed_images: HeadlessProcessedImages;
    lucid_collection_documents: LucidCollectionDocuments;
    lucid_collection_document_versions: LucidCollectionDocumentVersions;
    lucid_collection_document_bricks: LucidCollectionDocumentBricks;
    lucid_collection_document_groups: LucidCollectionDocumentGroups;
    lucid_collection_document_fields: LucidCollectionDocumentFields;
    lucid_client_integrations: LucidClientIntegrations;
}

declare class DatabaseAdapter {
    db: Kysely<LucidDB> | undefined;
    adapter: AdapterType;
    constructor(config: {
        adapter: AdapterType;
        dialect: Dialect;
        plugins?: Array<KyselyPlugin>;
    });
    migrateToLatest(): Promise<void>;
    get client(): Kysely<LucidDB>;
    get jsonArrayFrom(): typeof jsonArrayFrom;
    get fuzzOperator(): "like" | "ilike" | "%";
    private get migrations();
    private get migrator();
}

export { type ArgumentsType as $, type CollectionResponse as A, BrickBuilder as B, type ClientDocumentResponse as C, DatabaseAdapter as D, type ErrorResult as E, FieldBuilder as F, type BrickResponse as G, type BrickAltResponse as H, type FieldResponse as I, type FieldAltResponse as J, type FieldGroupResponse as K, type LucidErrorData as L, type MediaStrategyGetPresignedUrl as M, type FieldGroupAltResponse as N, type OptionName as O, type Permission as P, type CollectionDocumentVersionResponse as Q, type ResponseBody as R, type ServiceFn as S, type CollectionDocumentResponse as T, type UserResponse as U, type ErrorResponse as V, type PermissionGroup as W, type PermissionGroupKey as X, type ClientIntegrationResponse as Y, type LucidHook as Z, type LucidHookCollection as _, type RouteController as a, type TextareaResValue as a$, type HookServiceHandlers as a0, type CollectionDocumentBuilderHooks as a1, type CollectionDocumentHooks as a2, type AllHooks as a3, type ErrorResultValue as a4, type ErrorResultObj as a5, type FieldErrors as a6, type SupportedLocales as a7, type LocaleValue as a8, type TranslationsObj as a9, type DatetimeFieldConfig as aA, type LinkFieldConfig as aB, type UserFieldConfig as aC, type TabFieldProps as aD, type TextFieldProps as aE, type WysiwygFieldProps as aF, type MediaFieldProps as aG, type RepeaterFieldProps as aH, type DocumentFieldProps as aI, type NumberFieldProps as aJ, type CheckboxFieldProps as aK, type SelectFieldProps as aL, type TextareaFieldProps as aM, type JsonFieldProps as aN, type ColourFieldProps as aO, type DatetimeFieldProps as aP, type LinkFieldProps as aQ, type UserFieldProps as aR, type CFInsertItem as aS, type TabResValue as aT, type TextResValue as aU, type WysiwygResValue as aV, type MediaResValue as aW, type RepeaterResValue as aX, type NumberResValue as aY, type CheckboxResValue as aZ, type SelectReValue as a_, type FieldCollectionConfig as aa, type CollectionConfigSchemaType as ab, type CollectionData as ac, type FieldFilters as ad, type CollectionBrickConfig as ae, type DocumentFieldFilters as af, type CustomFieldMap as ag, type FieldTypes as ah, type FieldColumns as ai, type CFConfig as aj, type CFProps as ak, type CFColumn as al, type CFResponse as am, type SharedFieldConfig as an, type TabFieldConfig as ao, type TextFieldConfig as ap, type WysiwygFieldConfig as aq, type MediaFieldConfig as ar, type DocumentFieldConfig as as, type RepeaterFieldConfig as at, type NumberFieldConfig as au, type CheckboxFieldConfig as av, type SelectFieldConfig as aw, type TextareaFieldConfig as ax, type JsonFieldConfig as ay, type ColourFieldConfig as az, type ServiceWrapperConfig as b, type JsonResValue as b0, type ColourResValue as b1, type DatetimeResValue as b2, type DocumentResValue as b3, type LinkResValue as b4, type UserResValue as b5, type FieldResponseValue as b6, type TabResMeta as b7, type TextResMeta as b8, type WysiwygResMeta as b9, type MediaResMeta as ba, type DocumentResMeta as bb, type RepeaterResMeta as bc, type NumberResMeta as bd, type CheckboxResMeta as be, type SelectResMeta as bf, type TextareaResMeta as bg, type JsonResMeta as bh, type ColourResMeta as bi, type DatetimeResMeta as bj, type LinkResMeta as bk, type UserResMeta as bl, type FieldResponseMeta as bm, type CustomFieldErrorItem as bn, type CustomFieldValidateResponse as bo, type MediaReferenceData as bp, type UserReferenceData as bq, type DocumentReferenceData as br, type FieldSchemaType as bs, type ServiceProps as bt, type ExtractServiceFnArgs as bu, type ServiceContext as c, type ServiceResponse as d, type DocumentVersionType as e, type LocalesResponse as f, type EmailResponse as g, type LucidConfig as h, type Config as i, CollectionBuilder as j, type LucidPlugin as k, logger as l, type LucidPluginOptions as m, type EmailStrategy as n, type MediaStrategyGetMeta as o, type MediaStrategyStream as p, type MediaStrategyUploadSingle as q, type MediaStrategyDeleteSingle as r, type MediaStrategyDeleteMultiple as s, type MediaStrategy as t, type UserPermissionsResponse as u, type SettingsResponse as v, type RoleResponse as w, type OptionsResponse as x, type MediaType as y, type MediaResponse as z };
