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

declare const _default: Readonly<{
    locales: readonly ["en"];
    tempDir: "./tmp";
    swaggerRoutePrefix: "/documentation";
    headers: {
        accessToken: string;
        csrf: string;
        refreshToken: string;
        clientIntegrationKey: string;
        contentLocale: string;
    };
    seedDefaults: {
        user: {
            firstName: string;
            lastName: string;
            email: string;
            username: string;
            password: string;
            superAdmin: boolean;
        };
        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";
    };
    db: {
        prefix: string;
        collectionKeysJoin: string;
        generatedColumnPrefix: "_";
    };
    logScopes: {
        readonly lucid: "lucid";
        readonly migrations: "migrations";
        readonly cron: "cron";
        readonly config: "config";
        readonly sync: "sync";
        readonly query: "query";
    };
    retention: {
        deletedCollections: number;
        deletedLocales: number;
    };
    cronSchedule: "0 0 * * *";
    csrfExpiration: 604800;
    refreshTokenExpiration: 604800;
    accessTokenExpiration: 300;
    passwordResetTokenExpirationMinutes: 15;
    userInviteTokenExpirationMinutes: 1440;
    documentation: "https://lucidcms.io/getting-started";
    lucidUi: "https://lucidui.io/";
    mediaAwaitingSyncInterval: 3600000;
    fastify: {
        version: string;
    };
}>;

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

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

declare abstract class DatabaseAdapter {
    db: Kysely<LucidDB> | undefined;
    adapter: string;
    constructor(config: {
        adapter: string;
        dialect: Dialect;
        plugins?: Array<KyselyPlugin>;
    });
    abstract initialise(): Promise<void>;
    /**
     * Return your Kysely DB's adapters jsonArrayFrom helper that aggregates a subquery into a JSON array
     */
    abstract get jsonArrayFrom(): typeof jsonArrayFrom;
    /**
     * Configure the features your DB supports, default values and fallback data types
     */
    abstract get config(): DatabaseConfig;
    /**
     * Infers the database schema. Uses the transaction client if provided, otherwise falls back to the base client
     */
    abstract inferSchema(tx?: KyselyDB): Promise<InferredTable[]>;
    /**
     * Handles formatting of certain values based on the columns data type. This is used specifically for default values
     */
    abstract formatDefaultValue(type: ColumnDataType, value: unknown): unknown;
    /**
     * Handles formatting of certain values based on the columns data type
     * - booleans are returned as either a boolean or 1/0 depending on adapter support
     * - json is stringified
     */
    formatInsertValue<T>(type: ColumnDataType, value: unknown): T;
    /**
     * A helper for returning supported column data types
     */
    getDataType(type: keyof DatabaseConfig["dataTypes"], ...args: unknown[]): ColumnDataType;
    /**
     * A helper for extending a column definition based on auto increment support
     */
    primaryKeyColumnBuilder(col: ColumnDefinitionBuilder): ColumnDefinitionBuilder;
    /**
     * A helper for feature support
     */
    supports(key: keyof DatabaseConfig["support"]): boolean;
    /**
     * A helper for accessing the config default values
     */
    getDefault<T extends keyof DatabaseConfig["defaults"], K extends keyof DatabaseConfig["defaults"][T] | undefined = undefined>(type: T, key?: K): K extends keyof DatabaseConfig["defaults"][T] ? DatabaseConfig["defaults"][T][K] : DatabaseConfig["defaults"][T];
    /**
     * Runs all migrations that have not been ran yet. This doesnt include the generated migrations for collections
     * @todo expose migrations so they can be extended?
     */
    migrateToLatest(): Promise<void>;
    /**
     * Returns the database client instance
     */
    get client(): Kysely<LucidDB>;
}

type TableType = "document" | "versions" | "document-fields" | "brick" | "repeater";
type CollectionSchemaColumn = {
    name: string;
    source: "core" | "field";
    type: ColumnDataType;
    nullable?: boolean;
    default?: unknown;
    foreignKey?: {
        table: string;
        column: string;
        onDelete?: OnDelete;
        onUpdate?: OnUpdate;
    };
    customField?: {
        type: FieldTypes;
    };
    unique?: boolean;
    primary?: boolean;
};
type CollectionSchemaTable<TableName = string> = {
    name: TableName;
    type: TableType;
    key: {
        collection: string;
        brick?: string;
        repeater?: Array<string>;
    };
    columns: Array<CollectionSchemaColumn>;
};
type CollectionSchema = {
    key: string;
    tables: Array<CollectionSchemaTable>;
};

type ModifyColumnOperation = {
    type: "modify";
    column: CollectionSchemaColumn;
    changes: {
        type?: {
            from: ColumnDataType;
            to: ColumnDataType;
        };
        nullable?: {
            from: boolean | undefined;
            to: boolean | undefined;
        };
        default?: {
            from: unknown;
            to: unknown;
        };
        foreignKey?: {
            from: CollectionSchemaColumn["foreignKey"];
            to: CollectionSchemaColumn["foreignKey"];
        };
        unique?: {
            from: boolean | undefined;
            to: boolean | undefined;
        };
    };
};
type AddColumnOperation = {
    type: "add";
    column: CollectionSchemaColumn;
};
type RemoveColumnOperation = {
    type: "remove";
    columnName: string;
};
type ColumnOperation = AddColumnOperation | ModifyColumnOperation | RemoveColumnOperation;
type TableMigration = {
    type: "create" | "modify" | "remove";
    priority: number;
    tableName: string;
    columnOperations: ColumnOperation[];
};
type MigrationPlan = {
    collectionKey: string;
    tables: TableMigration[];
};

type KyselyDB = Kysely<LucidDB> | Transaction<LucidDB>;
type MigrationFn = (adapter: DatabaseAdapter) => Migration;
type Select<T> = {
    [P in keyof T]: T[P] extends {
        __select__: infer S;
    } ? S : T[P];
};
type Insert<T> = {
    [P in keyof T]: T[P] extends {
        __insert__: infer S;
    } ? S : T[P];
};
type Update<T> = {
    [P in keyof T]: T[P] extends {
        __update__: infer S;
    } ? S : T[P];
};
type DefaultValueType<T> = T extends object ? keyof T extends never ? T : {
    [K in keyof T]: T[K];
} : T;
type DocumentVersionType = "draft" | "published" | "revision";
type OnDelete = "cascade" | "set null" | "restrict" | "no action";
type OnUpdate = "cascade" | "set null" | "no action" | "restrict";
type DatabaseConfig = {
    support: {
        /**
         * Whether the database supports the ALTER COLUMN statement.
         */
        alterColumn: boolean;
        /**
         * Whether multiple columns can be altered in a single ALTER TABLE statement.
         * Some databases require separate statements for each column modification.
         */
        multipleAlterTables: boolean;
        /**
         * Set to true if the database supports boolean column data types.
         * If you're database doesnt, booleans are stored as integers as either 1 or 0.
         */
        boolean: boolean;
        /**
         * Determines if a primary key colum needs auto increment.
         */
        autoIncrement: boolean;
    };
    /**
     * Maps column data types to their database-specific implementations.
     * Each adapter maps these standard types to what their database supports:
     *
     * Examples:
     * - 'primary' maps to 'serial' in PostgreSQL, 'integer' in SQLite (with autoincrement)
     * - 'boolean' maps to 'boolean' in PostgreSQL, 'integer' in SQLite
     * - 'json' maps to 'jsonb' in PostgreSQL, 'json' in SQLite
     */
    dataTypes: {
        primary: ColumnDataType;
        integer: ColumnDataType;
        boolean: ColumnDataType;
        json: ColumnDataType;
        text: ColumnDataType;
        timestamp: ColumnDataType;
        char: ((length: number) => ColumnDataType) | ColumnDataType;
        varchar: ((length?: number) => ColumnDataType) | ColumnDataType;
    };
    /**
     * Maps column default values to their database-specific implementations.
     * Each adapter maps these values to what their database supports:
     *
     * Examples:
     * - 'timestamp.now' maps to 'NOW()' in PostgreSQL and 'CURRENT_TIMESTAMP' in SQLite
     * - 'boolean.true' maps to 'true' in PostgreSQL and '1' in SQLite
     *
     * Remember that the values used here should reflect the column dataTypes as well as database support.
     */
    defaults: {
        timestamp: {
            now: string;
        };
        boolean: {
            true: true | 1;
            false: false | 0;
        };
    };
    /**
     * The operator used for fuzzy text matching.
     */
    fuzzOperator: "like" | "ilike" | "%";
};
interface InferredColumn {
    name: string;
    type: ColumnDataType;
    nullable: boolean;
    default: unknown | null;
    unique?: boolean;
    primary?: boolean;
    foreignKey?: {
        table: string;
        column: string;
        onDelete?: OnDelete;
        onUpdate?: OnUpdate;
    };
}
interface InferredTable {
    name: string;
    columns: InferredColumn[];
}
type TimestampMutateable = ColumnType<string | Date | null, string | undefined, string | null>;
type TimestampImmutable = ColumnType<string | Date, string | undefined, never>;
/** Should only be used for DB column insert/response values. Everything else should be using booleans and can be converted for response/insert with boolean helpers */
type BooleanInt = 0 | 1 | boolean;
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: JSONColumnType<Record<string, unknown>, Record<string, unknown> | null, string | 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 LucidCollections {
    key: string;
    is_deleted: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
    is_deleted_at: TimestampMutateable;
    created_at: TimestampImmutable;
}
interface LucidCollectionMigrations {
    id: Generated<number>;
    collection_key: string;
    migration_plans: JSONColumnType<MigrationPlan, MigrationPlan, MigrationPlan>;
    created_at: TimestampImmutable;
}
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;
}
type LucidDocumentTableName = `lucid_document__${string}`;
interface LucidDocumentTable {
    id: Generated<number>;
    collection_key: string;
    is_deleted: BooleanInt;
    is_deleted_at: TimestampMutateable;
    deleted_by: number;
    created_by: number;
    created_at: TimestampImmutable;
    updated_by: number;
    updated_at: TimestampMutateable;
}
type LucidVersionTableName = `lucid_document__${string}__versions`;
interface LucidVersionTable {
    id: Generated<number>;
    collection_key: string;
    document_id: number;
    type: DocumentVersionType;
    promoted_from: number | null;
    created_by: number;
    updated_by: number;
    created_at: TimestampImmutable;
    updated_at: TimestampMutateable;
}
type LucidBrickTableName = `lucid_document__${string}__fields` | `lucid_document__${string}__${string}` | `lucid_document__${string}__${string}__${string}`;
interface LucidBricksTable {
    id: Generated<number>;
    collection_key: string;
    document_id: number;
    document_version_id: number;
    locale: string;
    position: number;
    is_open: BooleanInt;
    brick_type?: BrickTypes;
    brick_instance_id?: string;
    brick_id_ref?: number;
    parent_id?: number | null;
    parent_id_ref?: number | null;
    brick_id?: number;
    [key: CustomFieldColumnName]: unknown;
}
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_client_integrations: LucidClientIntegrations;
    lucid_collections: LucidCollections;
    lucid_collection_migrations: LucidCollectionMigrations;
    [key: LucidDocumentTableName]: LucidDocumentTable;
    [key: LucidVersionTableName]: LucidVersionTable;
    [key: LucidBrickTableName]: LucidBricksTable;
}

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: z.ZodObject<{
    key: z.ZodString;
    mode: z.ZodEnum<{
        single: "single";
        multiple: "multiple";
    }>;
    details: z.ZodObject<{
        name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
            en: "en";
        }>, z.ZodString>]>;
        singularName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
            en: "en";
        }>, z.ZodString>]>;
        summary: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
            en: "en";
        }>, z.ZodString>]>>;
    }, {}>;
    config: z.ZodOptional<z.ZodObject<{
        isLocked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
        useTranslations: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
        useDrafts: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
        useRevisions: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
    }, {}>>;
    hooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        event: z.ZodString;
        handler: z.ZodUnknown;
    }, {}>>>;
    bricks: z.ZodOptional<z.ZodObject<{
        fixed: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
        builder: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
    }, {}>>;
}, {}>;

declare const brickInputSchema: z.ZodInterface<{
    ref: z.ZodString;
    key: z.ZodString;
    order: z.ZodNumber;
    type: z.ZodUnion<readonly [z.ZodLiteral<"builder">, z.ZodLiteral<"fixed">]>;
    open: z.ZodBoolean;
    fields: z.ZodOptional<z.ZodArray<z.ZodInterface<{
        key: z.ZodString;
        type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
        translations: z.ZodRecord<z.ZodString, z.ZodAny>;
        value: z.ZodAny;
        readonly groups: z.ZodOptional<z.ZodArray<z.ZodInterface<{
            ref: z.ZodString;
            order: z.ZodOptional<z.ZodNumber>;
            open: z.ZodOptional<z.ZodBoolean>;
            readonly fields: z.ZodArray<z.ZodInterface</*elided*/ any, {
                optional: "value" | "translations" | "groups";
                defaulted: never;
                extra: {};
            }>>;
        }, {
            optional: never;
            defaulted: never;
            extra: {};
        }>>>;
    }, {
        optional: "value" | "translations" | "groups";
        defaulted: never;
        extra: {};
    }>>>;
}, {
    optional: "fields" | "open";
    defaulted: never;
    extra: {};
}>;
type BrickInputSchema = z.infer<typeof brickInputSchema>;

declare const fieldInputSchema: z.ZodInterface<{
    key: z.ZodString;
    type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
    translations: z.ZodRecord<z.ZodString, z.ZodAny>;
    value: z.ZodAny;
    readonly groups: z.ZodOptional<z.ZodArray<z.ZodInterface<{
        ref: z.ZodString;
        order: z.ZodOptional<z.ZodNumber>;
        open: z.ZodOptional<z.ZodBoolean>;
        readonly fields: z.ZodArray<z.ZodInterface</*elided*/ any, {
            optional: "value" | "translations" | "groups";
            defaulted: never;
            extra: {};
        }>>;
    }, {
        optional: never;
        defaulted: never;
        extra: {};
    }>>>;
}, {
    optional: "value" | "translations" | "groups";
    defaulted: never;
    extra: {};
}>;
type FieldInputSchema = z.infer<typeof fieldInputSchema>;

interface LucidErrorData {
    type?: "validation" | "basic" | "forbidden" | "authorisation" | "cron" | "toolkit";
    name?: string;
    message?: string;
    status?: number;
    code?: "csrf" | "login" | "authorisation" | "rate_limit" | "not_found";
    zod?: z.ZodError;
    errorResponse?: ErrorResult;
}
type ErrorResultValue = ErrorResultObj | ErrorResultObj[] | FieldError[] | GroupError[] | BrickError[] | string | undefined;
interface ErrorResultObj {
    code?: string;
    message?: string;
    children?: ErrorResultObj[];
    [key: string]: ErrorResultValue;
}
type ErrorResult = Record<string, ErrorResultValue>;
interface FieldError {
    key: string;
    /** Set if the error occured on a translation value, or it uses the default locale code when the field supports translations but only a value is given. Otherwise this is undefined. */
    localeCode: string | null;
    message: string;
    groupErrors?: Array<GroupError>;
}
interface GroupError {
    ref: string;
    order: number;
    fields: FieldError[];
}
interface BrickError {
    ref: string;
    key: string;
    order: number;
    fields: FieldError[];
}

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 controllerSchemas$5: {
    streamSingle: {
        body: undefined;
        query: {
            string: z.ZodObject<{
                width: z.ZodOptional<z.ZodString>;
                height: z.ZodOptional<z.ZodString>;
                format: z.ZodOptional<z.ZodEnum<{
                    avif: "avif";
                    webp: "webp";
                    jpeg: "jpeg";
                    png: "png";
                }>>;
                quality: z.ZodOptional<z.ZodString>;
                fallback: z.ZodOptional<z.ZodEnum<{
                    false: "false";
                    true: "true";
                }>>;
            }, {}>;
            formatted: z.ZodObject<{
                width: z.ZodOptional<z.ZodString>;
                height: z.ZodOptional<z.ZodString>;
                format: z.ZodOptional<z.ZodEnum<{
                    avif: "avif";
                    webp: "webp";
                    jpeg: "jpeg";
                    png: "png";
                }>>;
                quality: z.ZodOptional<z.ZodString>;
                fallback: z.ZodOptional<z.ZodEnum<{
                    false: "false";
                    true: "true";
                }>>;
            }, {}>;
        };
        params: z.ZodObject<{
            "*": z.ZodString;
        }, {}>;
        response: undefined;
    };
};
type StreamSingleQueryParams = z.infer<typeof controllerSchemas$5.streamSingle.query.formatted>;

interface MediaPropsT {
    id: number;
    key: string;
    e_tag: string | null;
    type: string;
    mime_type: string;
    file_extension: string;
    file_size: number;
    width: number | null;
    height: number | null;
    title_translation_key_id: number | null;
    alt_translation_key_id: number | null;
    created_at: Date | string | null;
    updated_at: Date | string | null;
    blur_hash: string | null;
    average_colour: string | null;
    is_dark: BooleanInt | null;
    is_light: BooleanInt | null;
    title_translations?: Array<{
        value: string | null;
        locale_code: string | null;
    }>;
    alt_translations?: Array<{
        value: string | null;
        locale_code: string | null;
    }>;
    title_translation_value?: string | null;
    alt_translation_value?: string | null;
}

declare const controllerSchemas$4: {
    getMultiple: {
        query: {
            string: z.ZodObject<{
                "filter[title]": z.ZodOptional<z.ZodString>;
                "filter[key]": z.ZodOptional<z.ZodString>;
                "filter[mimeType]": z.ZodOptional<z.ZodString>;
                "filter[type]": z.ZodOptional<z.ZodString>;
                "filter[extension]": z.ZodOptional<z.ZodString>;
                sort: z.ZodOptional<z.ZodString>;
                page: z.ZodOptional<z.ZodString>;
                perPage: z.ZodOptional<z.ZodString>;
            }, {}>;
            formatted: z.ZodObject<{
                filter: z.ZodOptional<z.ZodObject<{
                    title: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    key: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    mimeType: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    type: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    extension: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                }, {}>>;
                sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    key: z.ZodEnum<{
                        width: "width";
                        height: "height";
                        title: "title";
                        createdAt: "createdAt";
                        updatedAt: "updatedAt";
                        mimeType: "mimeType";
                        extension: "extension";
                        fileSize: "fileSize";
                    }>;
                    value: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, {}>>>;
                page: z.ZodNumber;
                perPage: z.ZodNumber;
            }, {}>;
        };
        params: undefined;
        body: undefined;
        response: z.ZodArray<z.ZodObject<{
            id: z.ZodNumber;
            key: z.ZodString;
            url: z.ZodString;
            title: z.ZodArray<z.ZodObject<{
                localeCode: z.ZodString;
                value: z.ZodString;
            }, {}>>;
            alt: z.ZodArray<z.ZodObject<{
                localeCode: z.ZodString;
                value: z.ZodString;
            }, {}>>;
            type: z.ZodString;
            meta: z.ZodObject<{
                mimeType: z.ZodString;
                extension: z.ZodString;
                fileSize: z.ZodNumber;
                width: z.ZodNullable<z.ZodNumber>;
                height: z.ZodNullable<z.ZodNumber>;
                blurHash: z.ZodNullable<z.ZodString>;
                averageColour: z.ZodNullable<z.ZodString>;
                isDark: z.ZodNullable<z.ZodBoolean>;
                isLight: z.ZodNullable<z.ZodBoolean>;
            }, {}>;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, {}>>;
    };
    getSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: z.ZodObject<{
            id: z.ZodNumber;
            key: z.ZodString;
            url: z.ZodString;
            title: z.ZodArray<z.ZodObject<{
                localeCode: z.ZodString;
                value: z.ZodString;
            }, {}>>;
            alt: z.ZodArray<z.ZodObject<{
                localeCode: z.ZodString;
                value: z.ZodString;
            }, {}>>;
            type: z.ZodString;
            meta: z.ZodObject<{
                mimeType: z.ZodString;
                extension: z.ZodString;
                fileSize: z.ZodNumber;
                width: z.ZodNullable<z.ZodNumber>;
                height: z.ZodNullable<z.ZodNumber>;
                blurHash: z.ZodNullable<z.ZodString>;
                averageColour: z.ZodNullable<z.ZodString>;
                isDark: z.ZodNullable<z.ZodBoolean>;
                isLight: z.ZodNullable<z.ZodBoolean>;
            }, {}>;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, {}>;
    };
    deleteSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
    updateSingle: {
        body: z.ZodObject<{
            key: z.ZodOptional<z.ZodString>;
            fileName: z.ZodOptional<z.ZodString>;
            title: z.ZodOptional<z.ZodArray<z.ZodObject<{
                localeCode: z.ZodString;
                value: z.ZodNullable<z.ZodString>;
            }, {}>>>;
            alt: z.ZodOptional<z.ZodArray<z.ZodObject<{
                localeCode: z.ZodString;
                value: z.ZodNullable<z.ZodString>;
            }, {}>>>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
    clearSingleProcessed: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
    clearAllProcessed: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: undefined;
        response: undefined;
    };
    getPresignedUrl: {
        body: z.ZodObject<{
            fileName: z.ZodString;
            mimeType: z.ZodString;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: undefined;
        response: z.ZodObject<{
            url: z.ZodString;
            key: z.ZodString;
        }, {}>;
    };
    createSingle: {
        body: z.ZodObject<{
            key: z.ZodString;
            fileName: z.ZodString;
            title: z.ZodOptional<z.ZodArray<z.ZodObject<{
                localeCode: z.ZodString;
                value: z.ZodNullable<z.ZodString>;
            }, {}>>>;
            alt: z.ZodOptional<z.ZodArray<z.ZodObject<{
                localeCode: z.ZodString;
                value: z.ZodNullable<z.ZodString>;
            }, {}>>>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: undefined;
        response: undefined;
    };
};
type GetMultipleQueryParams$4 = z.infer<typeof controllerSchemas$4.getMultiple.query.formatted>;

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: boolean | null;
    isLight: boolean | null;
}

declare const controllerSchemas$3: {
    createSingle: {
        body: z.ZodObject<{
            name: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            permissions: z.ZodArray<z.ZodString>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: undefined;
        response: z.ZodInterface<{
            id: z.ZodNumber;
            name: z.ZodString;
            description: z.ZodNullable<z.ZodString>;
            permissions: z.ZodArray<z.ZodObject<{
                id: z.ZodNumber;
                permission: z.ZodString;
            }, {}>>;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, {
            optional: "permissions";
            defaulted: never;
            extra: {};
        }>;
    };
    updateSingle: {
        body: z.ZodObject<{
            name: z.ZodOptional<z.ZodString>;
            description: z.ZodOptional<z.ZodString>;
            permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
    deleteSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
    getMultiple: {
        body: undefined;
        query: {
            string: z.ZodObject<{
                "filter[name]": z.ZodOptional<z.ZodString>;
                "filter[roleIds]": z.ZodOptional<z.ZodString>;
                sort: z.ZodOptional<z.ZodString>;
                include: z.ZodOptional<z.ZodString>;
                page: z.ZodOptional<z.ZodString>;
                perPage: z.ZodOptional<z.ZodString>;
            }, {}>;
            formatted: z.ZodObject<{
                filter: z.ZodOptional<z.ZodObject<{
                    name: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    roleIds: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                }, {}>>;
                sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    key: z.ZodEnum<{
                        name: "name";
                        createdAt: "createdAt";
                    }>;
                    value: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, {}>>>;
                include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
                    permissions: "permissions";
                }>>>;
                page: z.ZodNumber;
                perPage: z.ZodNumber;
            }, {}>;
        };
        params: undefined;
        response: z.ZodArray<z.ZodInterface<{
            id: z.ZodNumber;
            name: z.ZodString;
            description: z.ZodNullable<z.ZodString>;
            permissions: z.ZodArray<z.ZodObject<{
                id: z.ZodNumber;
                permission: z.ZodString;
            }, {}>>;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, {
            optional: "permissions";
            defaulted: never;
            extra: {};
        }>>;
    };
    getSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: z.ZodInterface<{
            id: z.ZodNumber;
            name: z.ZodString;
            description: z.ZodNullable<z.ZodString>;
            permissions: z.ZodArray<z.ZodObject<{
                id: z.ZodNumber;
                permission: z.ZodString;
            }, {}>>;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, {
            optional: "permissions";
            defaulted: never;
            extra: {};
        }>;
    };
};
type GetMultipleQueryParams$3 = z.infer<typeof controllerSchemas$3.getMultiple.query.formatted>;

declare const controllerSchemas$2: {
    getMultiple: {
        body: undefined;
        query: {
            string: z.ZodObject<{
                "filter[toAddress]": z.ZodOptional<z.ZodString>;
                "filter[subject]": z.ZodOptional<z.ZodString>;
                "filter[deliveryStatus]": z.ZodOptional<z.ZodString>;
                "filter[type]": z.ZodOptional<z.ZodString>;
                "filter[template]": z.ZodOptional<z.ZodString>;
                sort: z.ZodOptional<z.ZodString>;
                page: z.ZodOptional<z.ZodString>;
                perPage: z.ZodOptional<z.ZodString>;
            }, {}>;
            formatted: z.ZodObject<{
                filter: z.ZodOptional<z.ZodObject<{
                    toAddress: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    subject: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    deliveryStatus: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    type: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    template: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                }, {}>>;
                sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    key: z.ZodEnum<{
                        createdAt: "createdAt";
                        lastAttemptAt: "lastAttemptAt";
                        lastSuccessAt: "lastSuccessAt";
                        sentCount: "sentCount";
                        errorCount: "errorCount";
                    }>;
                    value: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, {}>>>;
                page: z.ZodNumber;
                perPage: z.ZodNumber;
            }, {}>;
        };
        params: undefined;
        response: z.ZodArray<z.ZodObject<{
            id: z.ZodNumber;
            mailDetails: z.ZodObject<{
                from: z.ZodObject<{
                    address: z.ZodEmail;
                    name: z.ZodString;
                }, {}>;
                to: z.ZodString;
                subject: z.ZodString;
                cc: z.ZodNullable<z.ZodString>;
                bcc: z.ZodNullable<z.ZodString>;
                template: z.ZodString;
            }, {}>;
            data: z.ZodNullable<z.ZodRecord<z.ZodAny, z.ZodAny>>;
            deliveryStatus: z.ZodUnion<readonly [z.ZodLiteral<"sent">, z.ZodLiteral<"failed">, z.ZodLiteral<"pending">]>;
            type: z.ZodUnion<readonly [z.ZodLiteral<"external">, z.ZodLiteral<"internal">]>;
            emailHash: z.ZodString;
            sentCount: z.ZodNumber;
            errorCount: z.ZodNumber;
            html: z.ZodNullable<z.ZodString>;
            errorMessage: z.ZodNullable<z.ZodString>;
            createdAt: z.ZodNullable<z.ZodString>;
            lastSuccessAt: z.ZodNullable<z.ZodString>;
            lastAttemptAt: z.ZodNullable<z.ZodString>;
        }, {}>>;
    };
    getSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: z.ZodObject<{
            id: z.ZodNumber;
            mailDetails: z.ZodObject<{
                from: z.ZodObject<{
                    address: z.ZodEmail;
                    name: z.ZodString;
                }, {}>;
                to: z.ZodString;
                subject: z.ZodString;
                cc: z.ZodNullable<z.ZodString>;
                bcc: z.ZodNullable<z.ZodString>;
                template: z.ZodString;
            }, {}>;
            data: z.ZodNullable<z.ZodRecord<z.ZodAny, z.ZodAny>>;
            deliveryStatus: z.ZodUnion<readonly [z.ZodLiteral<"sent">, z.ZodLiteral<"failed">, z.ZodLiteral<"pending">]>;
            type: z.ZodUnion<readonly [z.ZodLiteral<"external">, z.ZodLiteral<"internal">]>;
            emailHash: z.ZodString;
            sentCount: z.ZodNumber;
            errorCount: z.ZodNumber;
            html: z.ZodNullable<z.ZodString>;
            errorMessage: z.ZodNullable<z.ZodString>;
            createdAt: z.ZodNullable<z.ZodString>;
            lastSuccessAt: z.ZodNullable<z.ZodString>;
            lastAttemptAt: z.ZodNullable<z.ZodString>;
        }, {}>;
    };
    deleteSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
    resendSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: z.ZodObject<{
            success: z.ZodBoolean;
            message: z.ZodString;
        }, {}>;
    };
};
type GetMultipleQueryParams$2 = z.infer<typeof controllerSchemas$2.getMultiple.query.formatted>;

interface UserPropT {
    created_at: Date | string | null;
    email: string;
    first_name: string | null;
    super_admin: BooleanInt | null;
    id: number;
    last_name: string | null;
    updated_at: Date | string | null;
    username: string;
    triggered_password_reset?: BooleanInt;
    roles?: {
        id: number;
        description: string | null;
        name: string;
        permissions?: {
            permission: string;
        }[];
    }[];
}

declare const controllerSchemas$1: {
    createSingle: {
        body: z.ZodObject<{
            email: z.ZodEmail;
            username: z.ZodString;
            roleIds: z.ZodArray<z.ZodNumber>;
            firstName: z.ZodOptional<z.ZodString>;
            lastName: z.ZodOptional<z.ZodString>;
            superAdmin: z.ZodOptional<z.ZodBoolean>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: undefined;
        response: z.ZodObject<{
            id: z.ZodNumber;
            superAdmin: z.ZodBoolean;
            email: z.ZodEmail;
            username: z.ZodString;
            firstName: z.ZodNullable<z.ZodString>;
            lastName: z.ZodNullable<z.ZodString>;
            triggerPasswordReset: z.ZodNullable<z.ZodBoolean>;
            roles: z.ZodArray<z.ZodObject<{
                id: z.ZodNumber;
                name: z.ZodString;
            }, {}>>;
            permissions: z.ZodArray<z.ZodString>;
            createdAt: z.ZodNullable<z.ZodString>;
            updatedAt: z.ZodNullable<z.ZodString>;
        }, {}>;
    };
    updateSingle: {
        body: z.ZodObject<{
            roleIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
            superAdmin: z.ZodOptional<z.ZodBoolean>;
            triggerPasswordReset: z.ZodOptional<z.ZodBoolean>;
            isDeleted: z.ZodOptional<z.ZodLiteral<false>>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
    getSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: z.ZodObject<{
            id: z.ZodNumber;
            superAdmin: z.ZodBoolean;
            email: z.ZodEmail;
            username: z.ZodString;
            firstName: z.ZodNullable<z.ZodString>;
            lastName: z.ZodNullable<z.ZodString>;
            triggerPasswordReset: z.ZodNullable<z.ZodBoolean>;
            roles: z.ZodArray<z.ZodObject<{
                id: z.ZodNumber;
                name: z.ZodString;
            }, {}>>;
            permissions: z.ZodArray<z.ZodString>;
            createdAt: z.ZodNullable<z.ZodString>;
            updatedAt: z.ZodNullable<z.ZodString>;
        }, {}>;
    };
    getMultiple: {
        query: {
            string: z.ZodObject<{
                "filter[firstName]": z.ZodOptional<z.ZodString>;
                "filter[lastName]": z.ZodOptional<z.ZodString>;
                "filter[email]": z.ZodOptional<z.ZodString>;
                "filter[username]": z.ZodOptional<z.ZodString>;
                "filter[roleIds]": z.ZodOptional<z.ZodString>;
                "filter[id]": z.ZodOptional<z.ZodString>;
                sort: z.ZodOptional<z.ZodString>;
                include: z.ZodOptional<z.ZodString>;
                page: z.ZodOptional<z.ZodString>;
                perPage: z.ZodOptional<z.ZodString>;
            }, {}>;
            formatted: z.ZodObject<{
                filter: z.ZodOptional<z.ZodObject<{
                    firstName: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    lastName: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    email: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    username: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    roleIds: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    id: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                }, {}>>;
                sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    key: z.ZodEnum<{
                        email: "email";
                        username: "username";
                        createdAt: "createdAt";
                        updatedAt: "updatedAt";
                        firstName: "firstName";
                        lastName: "lastName";
                    }>;
                    value: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, {}>>>;
                include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
                    permissions: "permissions";
                }>>>;
                page: z.ZodNumber;
                perPage: z.ZodNumber;
            }, {}>;
        };
        params: undefined;
        body: undefined;
        response: z.ZodArray<z.ZodObject<{
            id: z.ZodNumber;
            superAdmin: z.ZodBoolean;
            email: z.ZodEmail;
            username: z.ZodString;
            firstName: z.ZodNullable<z.ZodString>;
            lastName: z.ZodNullable<z.ZodString>;
            triggerPasswordReset: z.ZodNullable<z.ZodBoolean>;
            roles: z.ZodArray<z.ZodObject<{
                id: z.ZodNumber;
                name: z.ZodString;
            }, {}>>;
            permissions: z.ZodArray<z.ZodString>;
            createdAt: z.ZodNullable<z.ZodString>;
            updatedAt: z.ZodNullable<z.ZodString>;
        }, {}>>;
    };
    deleteSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
};
type GetMultipleQueryParams$1 = z.infer<typeof controllerSchemas$1.getMultiple.query.formatted>;

type InsertBrickTables = {
    table: LucidBrickTableName;
    data: Array<Insert<LucidBricksTable>>;
    priority: number;
};

type FilterValue = string | Array<string> | number | Array<number>;
type FilterOperator = ComparisonOperatorExpression | "%";
type FilterObject = {
    value: FilterValue;
    operator?: FilterOperator;
};
type QueryParamFilters = Record<string, FilterObject>;
type SortValue = "asc" | "desc";
type QueryParamSorts = Array<{
    key: string;
    value: SortValue;
}>;
type QueryParamIncludes = Array<string>;
type QueryParamExcludes = Array<string>;
type QueryParamPagination = {
    page: number;
    perPage: number;
};
type QueryParams = {
    filter: QueryParamFilters | undefined;
    sort: QueryParamSorts | undefined;
    include: QueryParamIncludes | undefined;
    exclude: QueryParamExcludes | undefined;
    page: QueryParamPagination["page"];
    perPage: QueryParamPagination["perPage"];
};

interface BrickQueryResponse extends Select<LucidVersionTable> {
    [key: LucidBrickTableName]: Select<LucidBricksTable>[];
}

declare const controllerSchemas: {
    createSingle: {
        body: z.ZodObject<{
            publish: z.ZodBoolean;
            bricks: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                ref: z.ZodString;
                key: z.ZodString;
                order: z.ZodNumber;
                type: z.ZodUnion<readonly [z.ZodLiteral<"builder">, z.ZodLiteral<"fixed">]>;
                open: z.ZodBoolean;
                fields: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                    key: z.ZodString;
                    type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
                    translations: z.ZodRecord<z.ZodString, z.ZodAny>;
                    value: z.ZodAny;
                    readonly groups: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                        ref: z.ZodString;
                        order: z.ZodOptional<z.ZodNumber>;
                        open: z.ZodOptional<z.ZodBoolean>;
                        readonly fields: z.ZodArray<z.ZodInterface</*elided*/ any, {
                            optional: "value" | "translations" | "groups";
                            defaulted: never;
                            extra: {};
                        }>>;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>>>;
                }, {
                    optional: "value" | "translations" | "groups";
                    defaulted: never;
                    extra: {};
                }>>>;
            }, {
                optional: "fields" | "open";
                defaulted: never;
                extra: {};
            }>>>;
            fields: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                key: z.ZodString;
                type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
                translations: z.ZodRecord<z.ZodString, z.ZodAny>;
                value: z.ZodAny;
                readonly groups: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                    ref: z.ZodString;
                    order: z.ZodOptional<z.ZodNumber>;
                    open: z.ZodOptional<z.ZodBoolean>;
                    readonly fields: z.ZodArray<z.ZodInterface</*elided*/ any, {
                        optional: "value" | "translations" | "groups";
                        defaulted: never;
                        extra: {};
                    }>>;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>>>;
            }, {
                optional: "value" | "translations" | "groups";
                defaulted: never;
                extra: {};
            }>>>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            collectionKey: z.ZodString;
        }, {}>;
        response: z.ZodObject<{
            id: z.ZodNumber;
        }, {}>;
    };
    updateSingle: {
        body: z.ZodObject<{
            publish: z.ZodBoolean;
            bricks: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                ref: z.ZodString;
                key: z.ZodString;
                order: z.ZodNumber;
                type: z.ZodUnion<readonly [z.ZodLiteral<"builder">, z.ZodLiteral<"fixed">]>;
                open: z.ZodBoolean;
                fields: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                    key: z.ZodString;
                    type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
                    translations: z.ZodRecord<z.ZodString, z.ZodAny>;
                    value: z.ZodAny;
                    readonly groups: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                        ref: z.ZodString;
                        order: z.ZodOptional<z.ZodNumber>;
                        open: z.ZodOptional<z.ZodBoolean>;
                        readonly fields: z.ZodArray<z.ZodInterface</*elided*/ any, {
                            optional: "value" | "translations" | "groups";
                            defaulted: never;
                            extra: {};
                        }>>;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>>>;
                }, {
                    optional: "value" | "translations" | "groups";
                    defaulted: never;
                    extra: {};
                }>>>;
            }, {
                optional: "fields" | "open";
                defaulted: never;
                extra: {};
            }>>>;
            fields: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                key: z.ZodString;
                type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
                translations: z.ZodRecord<z.ZodString, z.ZodAny>;
                value: z.ZodAny;
                readonly groups: z.ZodOptional<z.ZodArray<z.ZodInterface<{
                    ref: z.ZodString;
                    order: z.ZodOptional<z.ZodNumber>;
                    open: z.ZodOptional<z.ZodBoolean>;
                    readonly fields: z.ZodArray<z.ZodInterface</*elided*/ any, {
                        optional: "value" | "translations" | "groups";
                        defaulted: never;
                        extra: {};
                    }>>;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>>>;
            }, {
                optional: "value" | "translations" | "groups";
                defaulted: never;
                extra: {};
            }>>>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            id: z.ZodString;
            collectionKey: z.ZodString;
        }, {}>;
        response: z.ZodObject<{
            id: z.ZodNumber;
        }, {}>;
    };
    deleteMultiple: {
        body: z.ZodObject<{
            ids: z.ZodArray<z.ZodNumber>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            collectionKey: z.ZodString;
        }, {}>;
        response: undefined;
    };
    deleteSingle: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            collectionKey: z.ZodString;
            id: z.ZodString;
        }, {}>;
        response: undefined;
    };
    getMultipleRevisions: {
        body: undefined;
        query: {
            string: z.ZodObject<{
                "filter[createdBy]": z.ZodOptional<z.ZodString>;
                sort: z.ZodOptional<z.ZodString>;
                page: z.ZodOptional<z.ZodString>;
                perPage: z.ZodOptional<z.ZodString>;
            }, {}>;
            formatted: z.ZodObject<{
                filter: z.ZodOptional<z.ZodObject<{
                    createdBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>, z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>]>>;
                }, {}>>;
                sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    key: z.ZodEnum<{
                        createdAt: "createdAt";
                    }>;
                    value: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, {}>>>;
                page: z.ZodNumber;
                perPage: z.ZodNumber;
            }, {}>;
        };
        params: z.ZodObject<{
            collectionKey: z.ZodString;
            id: z.ZodString;
        }, {}>;
        response: z.ZodArray<z.ZodObject<{
            id: z.ZodNumber;
            versionType: z.ZodEnum<{
                draft: "draft";
                published: "published";
                revision: "revision";
            }>;
            promotedFrom: z.ZodNullable<z.ZodNumber>;
            createdAt: z.ZodNullable<z.ZodString>;
            createdBy: z.ZodNullable<z.ZodNumber>;
            document: z.ZodObject<{
                id: z.ZodNullable<z.ZodNumber>;
                collectionKey: z.ZodNullable<z.ZodString>;
                createdBy: z.ZodNullable<z.ZodNumber>;
                createdAt: z.ZodNullable<z.ZodString>;
                updatedAt: z.ZodNullable<z.ZodString>;
                updatedBy: z.ZodNullable<z.ZodNumber>;
            }, {}>;
            bricks: z.ZodObject<{
                fixed: z.ZodArray<z.ZodObject<{
                    brickKey: z.ZodNullable<z.ZodString>;
                }, {}>>;
                builder: z.ZodArray<z.ZodObject<{
                    brickKey: z.ZodNullable<z.ZodString>;
                }, {}>>;
            }, {}>;
        }, {}>>;
    };
    getMultiple: {
        query: {
            string: z.ZodObject<{
                "filter[id]": z.ZodOptional<z.ZodString>;
                "filter[createdBy]": z.ZodOptional<z.ZodString>;
                "filter[updatedBy]": z.ZodOptional<z.ZodString>;
                "filter[createdAt]": z.ZodOptional<z.ZodString>;
                "filter[updatedAt]": z.ZodOptional<z.ZodString>;
                "filter[_customFieldKey]": z.ZodOptional<z.ZodString>;
                "filter[brickKey._customFieldKey]": z.ZodOptional<z.ZodString>;
                "filter[brickKey.repeaterKey._customFieldKey]": z.ZodOptional<z.ZodString>;
                sort: z.ZodOptional<z.ZodString>;
                page: z.ZodOptional<z.ZodString>;
                perPage: z.ZodOptional<z.ZodString>;
            }, {}>;
            formatted: z.ZodObject<{
                filter: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
                    value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                    operator: z.ZodOptional<z.ZodEnum<{
                        "=": "=";
                        "!=": "!=";
                        "<>": "<>";
                        in: "in";
                        "not in": "not in";
                        is: "is";
                        "is not": "is not";
                        like: "like";
                        ilike: "ilike";
                        "%": "%";
                    }>>;
                }, {}>, z.ZodObject<{
                    value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                    operator: z.ZodOptional<z.ZodEnum<{
                        "=": "=";
                        "!=": "!=";
                        "<>": "<>";
                        in: "in";
                        "not in": "not in";
                        is: "is";
                        "is not": "is not";
                        like: "like";
                        ilike: "ilike";
                        "%": "%";
                    }>>;
                }, {}>]>>, z.ZodObject<{
                    id: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>, z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>]>>;
                    createdBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>, z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>]>>;
                    updatedBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>, z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>]>>;
                    createdAt: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                    updatedAt: z.ZodOptional<z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>>;
                }, {}>]>>;
                sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    key: z.ZodEnum<{
                        createdAt: "createdAt";
                        updatedAt: "updatedAt";
                    }>;
                    value: z.ZodEnum<{
                        asc: "asc";
                        desc: "desc";
                    }>;
                }, {}>>>;
                page: z.ZodNumber;
                perPage: z.ZodNumber;
            }, {}>;
        };
        params: z.ZodObject<{
            collectionKey: z.ZodString;
            status: z.ZodEnum<{
                draft: "draft";
                published: "published";
            }>;
        }, {}>;
        body: undefined;
        response: z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
            id: z.ZodNumber;
            collectionKey: z.ZodString;
            status: z.ZodNullable<z.ZodEnum<{
                draft: "draft";
                published: "published";
                revision: "revision";
            }>>;
            versionId: z.ZodNullable<z.ZodNumber>;
            version: z.ZodObject<{
                draft: z.ZodNullable<z.ZodObject<{
                    id: z.ZodNullable<z.ZodNumber>;
                    promotedFrom: z.ZodNullable<z.ZodNumber>;
                    createdAt: z.ZodNullable<z.ZodString>;
                    createdBy: z.ZodNullable<z.ZodNumber>;
                }, {}>>;
                published: z.ZodNullable<z.ZodObject<{
                    id: z.ZodNullable<z.ZodNumber>;
                    promotedFrom: z.ZodNullable<z.ZodNumber>;
                    createdAt: z.ZodNullable<z.ZodString>;
                    createdBy: z.ZodNullable<z.ZodNumber>;
                }, {}>>;
            }, {}>;
            createdBy: z.ZodNullable<z.ZodObject<{
                id: z.ZodNumber;
                email: z.ZodNullable<z.ZodEmail>;
                firstName: z.ZodNullable<z.ZodString>;
                lastName: z.ZodNullable<z.ZodString>;
                username: z.ZodNullable<z.ZodString>;
            }, {}>>;
            updatedBy: z.ZodNullable<z.ZodObject<{
                id: z.ZodNumber;
                email: z.ZodNullable<z.ZodEmail>;
                firstName: z.ZodNullable<z.ZodString>;
                lastName: z.ZodNullable<z.ZodString>;
                username: z.ZodNullable<z.ZodString>;
            }, {}>>;
            createdAt: z.ZodNullable<z.ZodString>;
            updatedAt: z.ZodNullable<z.ZodString>;
        }, {
            optional: never;
            defaulted: never;
            extra: {};
        }>, z.ZodInterface<{
            "bricks?": z.ZodNullable<z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                key: z.ZodString;
                ref: z.ZodString;
                order: z.ZodNumber;
                open: z.ZodBoolean;
                type: z.ZodEnum<{
                    builder: "builder";
                    fixed: "fixed";
                }>;
            }, {
                optional: never;
                defaulted: never;
                extra: {};
            }>, z.ZodInterface<{
                readonly fields: z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                    key: z.ZodString;
                    type: z.ZodString;
                    groupRef: z.ZodString;
                    translations: z.ZodRecord<z.ZodAny, z.ZodAny>;
                    value: z.ZodAny;
                    meta: z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>;
                }, {
                    optional: "value" | "meta" | "translations" | "groupRef";
                    defaulted: never;
                    extra: {};
                }>, z.ZodInterface<{
                    readonly "groups?": z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                        ref: z.ZodString;
                        order: z.ZodNumber;
                        open: z.ZodBoolean;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>, z.ZodInterface<{
                        readonly fields: z.ZodArray<z.ZodAny>;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>>>;
                }, {
                    optional: "groups";
                    defaulted: never;
                    extra: {};
                }>>>;
            }, {
                optional: never;
                defaulted: never;
                extra: {};
            }>>>>;
            "fields?": z.ZodNullable<z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                key: z.ZodString;
                type: z.ZodString;
                groupRef: z.ZodString;
                translations: z.ZodRecord<z.ZodAny, z.ZodAny>;
                value: z.ZodAny;
                meta: z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>;
            }, {
                optional: "value" | "meta" | "translations" | "groupRef";
                defaulted: never;
                extra: {};
            }>, z.ZodInterface<{
                readonly "groups?": z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                    ref: z.ZodString;
                    order: z.ZodNumber;
                    open: z.ZodBoolean;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>, z.ZodInterface<{
                    readonly fields: z.ZodArray<z.ZodAny>;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>>>;
            }, {
                optional: "groups";
                defaulted: never;
                extra: {};
            }>>>>;
        }, {
            optional: "fields" | "bricks";
            defaulted: never;
            extra: {};
        }>>>;
    };
    getSingle: {
        query: {
            string: z.ZodObject<{
                include: z.ZodOptional<z.ZodString>;
            }, {}>;
            formatted: z.ZodObject<{
                include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
                    bricks: "bricks";
                }>>>;
            }, {}>;
        };
        params: z.ZodObject<{
            id: z.ZodString;
            statusOrId: z.ZodUnion<readonly [z.ZodLiteral<"published">, z.ZodLiteral<"draft">, z.ZodString]>;
            collectionKey: z.ZodString;
        }, {}>;
        body: undefined;
        response: z.MergeInterfaces<z.ZodInterface<{
            id: z.ZodNumber;
            collectionKey: z.ZodString;
            status: z.ZodNullable<z.ZodEnum<{
                draft: "draft";
                published: "published";
                revision: "revision";
            }>>;
            versionId: z.ZodNullable<z.ZodNumber>;
            version: z.ZodObject<{
                draft: z.ZodNullable<z.ZodObject<{
                    id: z.ZodNullable<z.ZodNumber>;
                    promotedFrom: z.ZodNullable<z.ZodNumber>;
                    createdAt: z.ZodNullable<z.ZodString>;
                    createdBy: z.ZodNullable<z.ZodNumber>;
                }, {}>>;
                published: z.ZodNullable<z.ZodObject<{
                    id: z.ZodNullable<z.ZodNumber>;
                    promotedFrom: z.ZodNullable<z.ZodNumber>;
                    createdAt: z.ZodNullable<z.ZodString>;
                    createdBy: z.ZodNullable<z.ZodNumber>;
                }, {}>>;
            }, {}>;
            createdBy: z.ZodNullable<z.ZodObject<{
                id: z.ZodNumber;
                email: z.ZodNullable<z.ZodEmail>;
                firstName: z.ZodNullable<z.ZodString>;
                lastName: z.ZodNullable<z.ZodString>;
                username: z.ZodNullable<z.ZodString>;
            }, {}>>;
            updatedBy: z.ZodNullable<z.ZodObject<{
                id: z.ZodNumber;
                email: z.ZodNullable<z.ZodEmail>;
                firstName: z.ZodNullable<z.ZodString>;
                lastName: z.ZodNullable<z.ZodString>;
                username: z.ZodNullable<z.ZodString>;
            }, {}>>;
            createdAt: z.ZodNullable<z.ZodString>;
            updatedAt: z.ZodNullable<z.ZodString>;
        }, {
            optional: never;
            defaulted: never;
            extra: {};
        }>, z.ZodInterface<{
            "bricks?": z.ZodNullable<z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                key: z.ZodString;
                ref: z.ZodString;
                order: z.ZodNumber;
                open: z.ZodBoolean;
                type: z.ZodEnum<{
                    builder: "builder";
                    fixed: "fixed";
                }>;
            }, {
                optional: never;
                defaulted: never;
                extra: {};
            }>, z.ZodInterface<{
                readonly fields: z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                    key: z.ZodString;
                    type: z.ZodString;
                    groupRef: z.ZodString;
                    translations: z.ZodRecord<z.ZodAny, z.ZodAny>;
                    value: z.ZodAny;
                    meta: z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>;
                }, {
                    optional: "value" | "meta" | "translations" | "groupRef";
                    defaulted: never;
                    extra: {};
                }>, z.ZodInterface<{
                    readonly "groups?": z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                        ref: z.ZodString;
                        order: z.ZodNumber;
                        open: z.ZodBoolean;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>, z.ZodInterface<{
                        readonly fields: z.ZodArray<z.ZodAny>;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>>>;
                }, {
                    optional: "groups";
                    defaulted: never;
                    extra: {};
                }>>>;
            }, {
                optional: never;
                defaulted: never;
                extra: {};
            }>>>>;
            "fields?": z.ZodNullable<z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                key: z.ZodString;
                type: z.ZodString;
                groupRef: z.ZodString;
                translations: z.ZodRecord<z.ZodAny, z.ZodAny>;
                value: z.ZodAny;
                meta: z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>;
            }, {
                optional: "value" | "meta" | "translations" | "groupRef";
                defaulted: never;
                extra: {};
            }>, z.ZodInterface<{
                readonly "groups?": z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                    ref: z.ZodString;
                    order: z.ZodNumber;
                    open: z.ZodBoolean;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>, z.ZodInterface<{
                    readonly fields: z.ZodArray<z.ZodAny>;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>>>;
            }, {
                optional: "groups";
                defaulted: never;
                extra: {};
            }>>>>;
        }, {
            optional: "fields" | "bricks";
            defaulted: never;
            extra: {};
        }>>;
    };
    promoteVersion: {
        body: z.ZodObject<{
            versionType: z.ZodEnum<{
                draft: "draft";
                published: "published";
            }>;
        }, {}>;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            collectionKey: z.ZodString;
            id: z.ZodString;
            versionId: z.ZodString;
        }, {}>;
        response: undefined;
    };
    restoreRevision: {
        body: undefined;
        query: {
            string: undefined;
            formatted: undefined;
        };
        params: z.ZodObject<{
            collectionKey: z.ZodString;
            id: z.ZodString;
            versionId: z.ZodString;
        }, {}>;
        response: undefined;
    };
    client: {
        getSingle: {
            query: {
                string: z.ZodObject<{
                    "filter[id]": z.ZodOptional<z.ZodString>;
                    "filter[createdBy]": z.ZodOptional<z.ZodString>;
                    "filter[updatedBy]": z.ZodOptional<z.ZodString>;
                    "filter[createdAt]": z.ZodOptional<z.ZodString>;
                    "filter[updatedAt]": z.ZodOptional<z.ZodString>;
                    "filter[_customFieldKey]": z.ZodOptional<z.ZodString>;
                    "filter[brickKey._customFieldKey]": z.ZodOptional<z.ZodString>;
                    "filter[brickKey.repeaterKey._customFieldKey]": z.ZodOptional<z.ZodString>;
                    include: z.ZodOptional<z.ZodString>;
                    page: z.ZodOptional<z.ZodString>;
                    perPage: z.ZodOptional<z.ZodString>;
                }, {}>;
                formatted: z.ZodObject<{
                    filter: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>, z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>]>>, z.ZodObject<{
                        id: z.ZodOptional<z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>>;
                        createdBy: z.ZodOptional<z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>>;
                        updatedBy: z.ZodOptional<z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>>;
                        createdAt: z.ZodOptional<z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>>;
                        updatedAt: z.ZodOptional<z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>>;
                    }, {}>]>>;
                    include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
                        bricks: "bricks";
                    }>>>;
                }, {}>;
            };
            params: z.ZodObject<{
                collectionKey: z.ZodString;
                status: z.ZodEnum<{
                    draft: "draft";
                    published: "published";
                }>;
            }, {}>;
            body: undefined;
            response: z.MergeInterfaces<z.ZodInterface<{
                id: z.ZodNumber;
                collectionKey: z.ZodString;
                status: z.ZodNullable<z.ZodEnum<{
                    draft: "draft";
                    published: "published";
                    revision: "revision";
                }>>;
                versionId: z.ZodNullable<z.ZodNumber>;
                version: z.ZodObject<{
                    draft: z.ZodNullable<z.ZodObject<{
                        id: z.ZodNullable<z.ZodNumber>;
                        promotedFrom: z.ZodNullable<z.ZodNumber>;
                        createdAt: z.ZodNullable<z.ZodString>;
                        createdBy: z.ZodNullable<z.ZodNumber>;
                    }, {}>>;
                    published: z.ZodNullable<z.ZodObject<{
                        id: z.ZodNullable<z.ZodNumber>;
                        promotedFrom: z.ZodNullable<z.ZodNumber>;
                        createdAt: z.ZodNullable<z.ZodString>;
                        createdBy: z.ZodNullable<z.ZodNumber>;
                    }, {}>>;
                }, {}>;
                createdBy: z.ZodNullable<z.ZodObject<{
                    id: z.ZodNumber;
                    email: z.ZodNullable<z.ZodEmail>;
                    firstName: z.ZodNullable<z.ZodString>;
                    lastName: z.ZodNullable<z.ZodString>;
                    username: z.ZodNullable<z.ZodString>;
                }, {}>>;
                updatedBy: z.ZodNullable<z.ZodObject<{
                    id: z.ZodNumber;
                    email: z.ZodNullable<z.ZodEmail>;
                    firstName: z.ZodNullable<z.ZodString>;
                    lastName: z.ZodNullable<z.ZodString>;
                    username: z.ZodNullable<z.ZodString>;
                }, {}>>;
                createdAt: z.ZodNullable<z.ZodString>;
                updatedAt: z.ZodNullable<z.ZodString>;
            }, {
                optional: never;
                defaulted: never;
                extra: {};
            }>, z.ZodInterface<{
                "bricks?": z.ZodNullable<z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                    key: z.ZodString;
                    ref: z.ZodString;
                    order: z.ZodNumber;
                    open: z.ZodBoolean;
                    type: z.ZodEnum<{
                        builder: "builder";
                        fixed: "fixed";
                    }>;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>, z.ZodInterface<{
                    readonly fields: z.ZodRecord<z.ZodAny, z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                        key: z.ZodString;
                        type: z.ZodString;
                        groupRef: z.ZodString;
                        translations: z.ZodRecord<z.ZodAny, z.ZodAny>;
                        value: z.ZodAny;
                        meta: z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>;
                    }, {
                        optional: "value" | "meta" | "translations" | "groupRef";
                        defaulted: never;
                        extra: {};
                    }>, z.ZodInterface<{
                        readonly "groups?": z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                            ref: z.ZodString;
                            order: z.ZodNumber;
                            open: z.ZodBoolean;
                        }, {
                            optional: never;
                            defaulted: never;
                            extra: {};
                        }>, z.ZodInterface<{
                            readonly fields: z.ZodRecord<z.ZodAny, z.ZodAny>;
                        }, {
                            optional: never;
                            defaulted: never;
                            extra: {};
                        }>>>;
                    }, {
                        optional: "groups";
                        defaulted: never;
                        extra: {};
                    }>>>>;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>>>>;
                "fields?": z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                    key: z.ZodString;
                    type: z.ZodString;
                    groupRef: z.ZodString;
                    translations: z.ZodRecord<z.ZodAny, z.ZodAny>;
                    value: z.ZodAny;
                    meta: z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>;
                }, {
                    optional: "value" | "meta" | "translations" | "groupRef";
                    defaulted: never;
                    extra: {};
                }>, z.ZodInterface<{
                    readonly "groups?": z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                        ref: z.ZodString;
                        order: z.ZodNumber;
                        open: z.ZodBoolean;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>, z.ZodInterface<{
                        readonly fields: z.ZodRecord<z.ZodAny, z.ZodAny>;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>>>;
                }, {
                    optional: "groups";
                    defaulted: never;
                    extra: {};
                }>>>>>;
            }, {
                optional: "fields" | "bricks";
                defaulted: never;
                extra: {};
            }>>;
        };
        getMultiple: {
            query: {
                string: z.ZodObject<{
                    "filter[id]": z.ZodOptional<z.ZodString>;
                    "filter[createdBy]": z.ZodOptional<z.ZodString>;
                    "filter[updatedBy]": z.ZodOptional<z.ZodString>;
                    "filter[createdAt]": z.ZodOptional<z.ZodString>;
                    "filter[updatedAt]": z.ZodOptional<z.ZodString>;
                    "filter[_customFieldKey]": z.ZodOptional<z.ZodString>;
                    "filter[brickKey._customFieldKey]": z.ZodOptional<z.ZodString>;
                    "filter[brickKey.repeaterKey._customFieldKey]": z.ZodOptional<z.ZodString>;
                    sort: z.ZodOptional<z.ZodString>;
                    page: z.ZodOptional<z.ZodString>;
                    perPage: z.ZodOptional<z.ZodString>;
                }, {}>;
                formatted: z.ZodObject<{
                    filter: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>, z.ZodObject<{
                        value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                        operator: z.ZodOptional<z.ZodEnum<{
                            "=": "=";
                            "!=": "!=";
                            "<>": "<>";
                            in: "in";
                            "not in": "not in";
                            is: "is";
                            "is not": "is not";
                            like: "like";
                            ilike: "ilike";
                            "%": "%";
                        }>>;
                    }, {}>]>>, z.ZodObject<{
                        id: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>, z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>]>>;
                        createdBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>, z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>]>>;
                        updatedBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>, z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>]>>;
                        createdAt: z.ZodOptional<z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>>;
                        updatedAt: z.ZodOptional<z.ZodObject<{
                            value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
                            operator: z.ZodOptional<z.ZodEnum<{
                                "=": "=";
                                "!=": "!=";
                                "<>": "<>";
                                in: "in";
                                "not in": "not in";
                                is: "is";
                                "is not": "is not";
                                like: "like";
                                ilike: "ilike";
                                "%": "%";
                            }>>;
                        }, {}>>;
                    }, {}>]>>;
                    sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
                        key: z.ZodEnum<{
                            createdAt: "createdAt";
                            updatedAt: "updatedAt";
                        }>;
                        value: z.ZodEnum<{
                            asc: "asc";
                            desc: "desc";
                        }>;
                    }, {}>>>;
                    page: z.ZodNumber;
                    perPage: z.ZodNumber;
                }, {}>;
            };
            params: z.ZodObject<{
                collectionKey: z.ZodString;
                status: z.ZodEnum<{
                    draft: "draft";
                    published: "published";
                }>;
            }, {}>;
            body: undefined;
            response: z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                id: z.ZodNumber;
                collectionKey: z.ZodString;
                status: z.ZodNullable<z.ZodEnum<{
                    draft: "draft";
                    published: "published";
                    revision: "revision";
                }>>;
                versionId: z.ZodNullable<z.ZodNumber>;
                version: z.ZodObject<{
                    draft: z.ZodNullable<z.ZodObject<{
                        id: z.ZodNullable<z.ZodNumber>;
                        promotedFrom: z.ZodNullable<z.ZodNumber>;
                        createdAt: z.ZodNullable<z.ZodString>;
                        createdBy: z.ZodNullable<z.ZodNumber>;
                    }, {}>>;
                    published: z.ZodNullable<z.ZodObject<{
                        id: z.ZodNullable<z.ZodNumber>;
                        promotedFrom: z.ZodNullable<z.ZodNumber>;
                        createdAt: z.ZodNullable<z.ZodString>;
                        createdBy: z.ZodNullable<z.ZodNumber>;
                    }, {}>>;
                }, {}>;
                createdBy: z.ZodNullable<z.ZodObject<{
                    id: z.ZodNumber;
                    email: z.ZodNullable<z.ZodEmail>;
                    firstName: z.ZodNullable<z.ZodString>;
                    lastName: z.ZodNullable<z.ZodString>;
                    username: z.ZodNullable<z.ZodString>;
                }, {}>>;
                updatedBy: z.ZodNullable<z.ZodObject<{
                    id: z.ZodNumber;
                    email: z.ZodNullable<z.ZodEmail>;
                    firstName: z.ZodNullable<z.ZodString>;
                    lastName: z.ZodNullable<z.ZodString>;
                    username: z.ZodNullable<z.ZodString>;
                }, {}>>;
                createdAt: z.ZodNullable<z.ZodString>;
                updatedAt: z.ZodNullable<z.ZodString>;
            }, {
                optional: never;
                defaulted: never;
                extra: {};
            }>, z.ZodInterface<{
                "bricks?": z.ZodNullable<z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                    key: z.ZodString;
                    ref: z.ZodString;
                    order: z.ZodNumber;
                    open: z.ZodBoolean;
                    type: z.ZodEnum<{
                        builder: "builder";
                        fixed: "fixed";
                    }>;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>, z.ZodInterface<{
                    readonly fields: z.ZodRecord<z.ZodAny, z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                        key: z.ZodString;
                        type: z.ZodString;
                        groupRef: z.ZodString;
                        translations: z.ZodRecord<z.ZodAny, z.ZodAny>;
                        value: z.ZodAny;
                        meta: z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>;
                    }, {
                        optional: "value" | "meta" | "translations" | "groupRef";
                        defaulted: never;
                        extra: {};
                    }>, z.ZodInterface<{
                        readonly "groups?": z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                            ref: z.ZodString;
                            order: z.ZodNumber;
                            open: z.ZodBoolean;
                        }, {
                            optional: never;
                            defaulted: never;
                            extra: {};
                        }>, z.ZodInterface<{
                            readonly fields: z.ZodRecord<z.ZodAny, z.ZodAny>;
                        }, {
                            optional: never;
                            defaulted: never;
                            extra: {};
                        }>>>;
                    }, {
                        optional: "groups";
                        defaulted: never;
                        extra: {};
                    }>>>>;
                }, {
                    optional: never;
                    defaulted: never;
                    extra: {};
                }>>>>;
                "fields?": z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                    key: z.ZodString;
                    type: z.ZodString;
                    groupRef: z.ZodString;
                    translations: z.ZodRecord<z.ZodAny, z.ZodAny>;
                    value: z.ZodAny;
                    meta: z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>;
                }, {
                    optional: "value" | "meta" | "translations" | "groupRef";
                    defaulted: never;
                    extra: {};
                }>, z.ZodInterface<{
                    readonly "groups?": z.ZodArray<z.MergeInterfaces<z.ZodInterface<{
                        ref: z.ZodString;
                        order: z.ZodNumber;
                        open: z.ZodBoolean;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>, z.ZodInterface<{
                        readonly fields: z.ZodRecord<z.ZodAny, z.ZodAny>;
                    }, {
                        optional: never;
                        defaulted: never;
                        extra: {};
                    }>>>;
                }, {
                    optional: "groups";
                    defaulted: never;
                    extra: {};
                }>>>>>;
            }, {
                optional: "fields" | "bricks";
                defaulted: never;
                extra: {};
            }>>>;
        };
    };
};
type GetMultipleQueryParams = z.infer<typeof controllerSchemas.getMultiple.query.formatted>;
type GetSingleQueryParams = z.infer<typeof controllerSchemas.getSingle.query.formatted>;
type ClientGetSingleQueryParams = z.infer<typeof controllerSchemas.client.getSingle.query.formatted>;
type ClientGetMultipleQueryParams = z.infer<typeof controllerSchemas.client.getMultiple.query.formatted>;
type GetMultipleRevisionsQueryParams = z.infer<typeof controllerSchemas.getMultipleRevisions.query.formatted>;

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: {
        documents: {
            checks: {
                checkCollection: ServiceFn<[{
                    key: string;
                }], CollectionBuilder>;
                checkSingleCollectionDocumentCount: ServiceFn<[{
                    collectionKey: string;
                    collectionMode: "single" | "multiple";
                    documentTable: LucidDocumentTableName;
                    documentId?: number;
                }], undefined>;
            };
            client: {
                getSingle: ServiceFn<[{
                    collectionKey: string;
                    status: Exclude<DocumentVersionType, "revision">;
                    query: ClientGetSingleQueryParams;
                }], ClientDocumentResponse>;
                getMultiple: ServiceFn<[{
                    collectionKey: string;
                    status: Exclude<DocumentVersionType, "revision">;
                    query: ClientGetMultipleQueryParams;
                }], {
                    data: ClientDocumentResponse[];
                    count: number;
                }>;
            };
            upsertSingle: ServiceFn<[{
                collectionKey: string;
                userId: number;
                publish: boolean;
                documentId?: number;
                bricks?: Array<BrickInputSchema>;
                fields?: Array<FieldInputSchema>;
            }], number>;
            deleteMultiple: ServiceFn<[{
                ids: number[];
                collectionKey: string;
                userId: number;
            }], undefined>;
            deleteSingle: ServiceFn<[{
                id: number;
                collectionKey: string;
                userId: number;
            }], undefined>;
            getSingle: ServiceFn<[{
                id: number;
                status?: DocumentVersionType;
                versionId?: number;
                collectionKey: string;
                query: GetSingleQueryParams;
            }], DocumentResponse>;
            getMultiple: ServiceFn<[{
                collectionKey: string;
                status: DocumentVersionType;
                query: GetMultipleQueryParams;
            }], {
                data: DocumentResponse[];
                count: number;
            }>;
            getMultipleFieldMeta: ServiceFn<[{
                values: Array<{
                    table: LucidDocumentTableName;
                    ids: number[];
                }>;
                versionType: Exclude<DocumentVersionType, "revision">;
            }], BrickQueryResponse[]>;
            getMultipleRevisions: ServiceFn<[{
                collectionKey: string;
                documentId: number;
                query: GetMultipleRevisionsQueryParams;
            }], {
                data: DocumentVersionResponse[];
                count: number;
            }>;
            nullifyDocumentReferences: ServiceFn<[{
                documentId: number;
                collectionKey: string;
            }], undefined>;
        };
        documentVersions: {
            createSingle: ServiceFn<[{
                documentId: number;
                collection: CollectionBuilder;
                userId: number;
                publish: boolean;
                bricks?: Array<BrickInputSchema>;
                fields?: Array<FieldInputSchema>;
            }], number>;
            restoreRevision: ServiceFn<[{
                documentId: number;
                versionId: number;
                userId: number;
                collectionKey: string;
            }], undefined>;
            promoteVersion: ServiceFn<[{
                fromVersionId: number;
                toVersionType: "draft" | "published";
                collectionKey: string;
                documentId: number;
                userId: number;
                skipRevisionCheck?: boolean;
            }], undefined>;
        };
        documentBricks: {
            checks: {
                checkValidateBricksFields: ServiceFn<[{
                    bricks: Array<BrickInputSchema>;
                    fields: Array<FieldInputSchema>;
                    collection: CollectionBuilder;
                }], undefined>;
                checkDuplicateOrder: (bricks: Array<BrickInputSchema>) => Awaited<ServiceResponse<undefined>>;
            };
            createMultiple: ServiceFn<[{
                versionId: number;
                documentId: number;
                bricks?: Array<BrickInputSchema>;
                fields?: Array<FieldInputSchema>;
                collection: CollectionBuilder;
                skipValidation?: boolean;
            }], undefined>;
            getMultiple: ServiceFn<[{
                versionId: number;
                collectionKey: string;
                versionType: Exclude<DocumentVersionType, "revision">;
                documentFieldsOnly?: boolean;
            }], {
                bricks: Array<BrickResponse>;
                fields: Array<FieldResponse>;
            }>;
            insertBrickTables: ServiceFn<[{
                tables: InsertBrickTables[];
                collection: CollectionBuilder;
            }], undefined>;
        };
        migrator: {
            migrateCollections: ServiceFn<[], undefined>;
        };
        getSingle: ServiceFn<[{
            key: string;
            include?: {
                bricks?: boolean;
                fields?: boolean;
                documentId?: boolean;
            };
        }], CollectionResponse>;
        getAll: ServiceFn<[{
            includeDocumentId?: boolean;
        }], CollectionResponse[]>;
        getSingleInstance: (context: ServiceContext, data: {
            key: string;
        }) => Awaited<ServiceResponse<CollectionBuilder>>;
    };
    account: {
        checks: {
            checkUpdatePassword: ServiceFn<[{
                encryptedSecret: string;
                password: string;
                currentPassword?: string;
                newPassword?: string;
                passwordConfirmation?: string;
                encryptionKey: string;
            }], {
                newPassword: string | undefined;
                triggerPasswordReset: boolean | 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?: boolean;
            roleIds: Array<number>;
            authSuperAdmin: boolean;
        }], number>;
        getSingle: ServiceFn<[{
            userId: number;
        }], UserResponse>;
        getMultiple: ServiceFn<[{
            query: GetMultipleQueryParams$1;
        }], {
            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?: boolean;
            triggerPasswordReset?: boolean;
            isDeleted?: boolean;
            auth: {
                id: number;
                superAdmin: boolean;
            };
        }], number>;
        getMultipleFieldMeta: ServiceFn<[{
            ids: number[];
        }], UserPropT[]>;
    };
    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: GetMultipleQueryParams$2;
        }], {
            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: GetMultipleQueryParams$3;
        }], {
            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?: boolean;
        }], 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: GetMultipleQueryParams$4;
            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?: boolean;
        }], number>;
        getMultipleFieldMeta: ServiceFn<[{
            ids: number[];
        }], MediaPropsT[]>;
    };
    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: StreamSingleQueryParams;
        }], {
            key: string;
            contentLength: number | undefined;
            contentType: string | undefined;
            body: stream.Readable;
        }>;
        getSingleCount: ServiceFn<[{
            key: string;
        }], number>;
        optimiseImage: ServiceFn<[{
            stream: stream.Readable;
            options: StreamSingleQueryParams;
        }], {
            buffer: Buffer;
            mimeType: string;
            size: number;
            width: number | null;
            height: number | null;
            extension: string;
            blurHash: null;
        }>;
    };
    cdn: {
        streamMedia: ServiceFn<[{
            key: string;
            query: StreamSingleQueryParams;
            accept: string | undefined;
        }], {
            key: string;
            contentLength: number | undefined;
            contentType: string | undefined;
            body: stream.Readable;
        }>;
        streamErrorImage: ServiceFn<[{
            fallback?: boolean;
            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>;
        clearExpiredCollections: ServiceFn<[], undefined>;
    };
    permission: {
        getAll: ServiceFn<[], Permission[]>;
    };
    seed: {
        defaultOptions: ServiceFn<[], undefined>;
        defaultRoles: ServiceFn<[], undefined>;
        defaultUser: ServiceFn<[], undefined>;
    };
    start: {
        executeSeeds: ServiceFn<[], undefined>;
        syncLocales: ServiceFn<[], undefined>;
        syncCollections: ServiceFn<[], undefined>;
    };
    clientIntegrations: {
        createSingle: ServiceFn<[{
            name: string;
            description?: string;
            enabled?: boolean;
        }], {
            apiKey: string;
        }>;
        getAll: ServiceFn<[], {
            id: number;
            key: string;
            name: string;
            description: string | null;
            enabled: boolean;
            createdAt: string | null;
            updatedAt: string | null;
        }[]>;
        deleteSingle: ServiceFn<[{
            id: number;
        }], undefined>;
        updateSingle: ServiceFn<[{
            id: number;
            name?: string;
            description?: string;
            enabled?: boolean;
        }], undefined>;
        regenerateKeys: ServiceFn<[{
            id: number;
        }], {
            apiKey: string;
        }>;
        verifyApiKey: ServiceFn<[{
            key: string;
            apiKey: string;
        }], {
            id: number;
            key: string;
        }>;
        getSingle: ServiceFn<[{
            id: number;
        }], {
            id: number;
            key: string;
            name: string;
            description: string | null;
            enabled: boolean;
            createdAt: string | null;
            updatedAt: string | null;
        }>;
    };
};

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

type DisplayInListing = boolean;
interface CollectionConfigSchemaType extends z.infer<typeof CollectionConfigSchema> {
    hooks?: DocumentBuilderHooks[];
    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;
        displayInListing: string[];
    };
};
type FieldFilters = Array<{
    key: string;
    type: FieldTypes;
}>;
interface CollectionBrickConfig {
    key: BrickBuilder["key"];
    details: BrickBuilder["config"]["details"];
    preview: BrickBuilder["config"]["preview"];
    fields: CFConfig<FieldTypes>[];
}
type CollectionTableNames = {
    document: LucidDocumentTableName;
    version: LucidVersionTableName;
    documentFields: LucidBrickTableName;
};

declare const clientIntegrationResponseSchema: z.ZodObject<{
    id: z.ZodNumber;
    key: z.ZodString;
    name: z.ZodString;
    description: z.ZodNullable<z.ZodString>;
    enabled: z.ZodBoolean;
    createdAt: z.ZodNullable<z.ZodString>;
    updatedAt: z.ZodNullable<z.ZodString>;
}, {}>;

interface UserResponse {
    id: number;
    superAdmin?: boolean;
    email: string;
    username: string;
    firstName: string | null;
    lastName: string | null;
    triggerPasswordReset?: boolean | null;
    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;
        };
        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: boolean | 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: boolean | null;
        isLight: boolean | null;
    };
    createdAt: string | null;
    updatedAt: string | null;
}
interface LocalesResponse {
    code: string;
    name: string | null;
    isDefault: boolean;
    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;
        displayInListing: string[];
    };
    fixedBricks: Array<CollectionBrickConfig>;
    builderBricks: Array<CollectionBrickConfig>;
    fields: CFConfig<FieldTypes>[];
}
interface BrickResponse {
    ref: string;
    key: string;
    order: number;
    open: boolean;
    type: BrickTypes;
    fields: Array<FieldResponse>;
}
interface BrickAltResponse {
    ref: string;
    key: string;
    order: number;
    open: boolean;
    type: BrickTypes;
    fields: Record<string, FieldAltResponse>;
}
interface FieldResponse {
    key: string;
    type: FieldTypes;
    groupRef?: string;
    translations?: Record<string, FieldResponseValue>;
    value?: FieldResponseValue;
    meta?: Record<string, FieldResponseMeta> | FieldResponseMeta;
    groups?: Array<FieldGroupResponse>;
}
interface FieldAltResponse {
    key: string;
    type: FieldTypes;
    groupRef?: string;
    translations?: Record<string, FieldResponseValue>;
    value?: FieldResponseValue;
    meta?: Record<string, FieldResponseMeta> | FieldResponseMeta;
    groups?: Array<FieldGroupAltResponse>;
}
interface FieldGroupResponse {
    ref: string;
    order: number;
    open: boolean;
    fields: Array<FieldResponse>;
}
interface FieldGroupAltResponse {
    ref: string;
    order: number;
    open: boolean;
    fields: Record<string, FieldAltResponse>;
}
interface DocumentVersionResponse {
    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<{
        brickKey: string | null;
    }>>;
}
interface DocumentResponse {
    id: number;
    collectionKey: string;
    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";
type ClientIntegrationResponse = z.infer<typeof clientIntegrationResponseSchema>;

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;
        minGroups?: 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?: boolean;
    };
    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 TabResValue = null;
type TextResValue = string | null;
type WysiwygResValue = string | null;
type MediaResValue = number | null;
type RepeaterResValue = null;
type NumberResValue = number | null;
type CheckboxResValue = boolean | 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: boolean | null;
    isLight: boolean | null;
    title: Record<string, string>;
    alt: Record<string, string>;
    type: MediaType | null;
} | null;
type DocumentResMeta = {
    id: number | null;
    collectionKey?: string | 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;
}
interface DocumentReferenceData {
    id: number;
    collection_key: string;
}
type GetSchemaDefinitionProps = {
    db: DatabaseAdapter;
    tables: {
        document: string;
        version: string;
    };
};
type ColumnDefinition = {
    name: string;
    type: ColumnDataType;
    nullable?: boolean;
    default?: unknown;
    foreignKey?: {
        table: string;
        column: string;
        onDelete?: OnDelete;
        onUpdate?: OnUpdate;
    };
};
type SchemaDefinition = {
    columns: ColumnDefinition[];
};

interface FieldFormatMeta {
    builder: BrickBuilder | CollectionBuilder;
    host: string;
    collection: CollectionBuilder;
    localisation: {
        locales: string[];
        default: string;
    };
    /** Used to help workout the target brick schema item and the table name. Set to `undefined` if the brick table you're creating fields for is the `document-fields` one */
    brickKey: string | undefined;
    config: Config;
}

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 formatResponseValue(value: unknown): CFResponse<T>["value"];
    abstract formatResponseMeta(value: unknown, meta: FieldFormatMeta): CFResponse<T>["meta"] | null;
    abstract cfSpecificValidation(value: unknown, relationData?: unknown): {
        valid: boolean;
        message?: string;
    };
    abstract get translationsEnabled(): boolean;
    abstract get defaultValue(): unknown;
    /**
     * Determins how the field should be defined in the database
     *
     * If the foreign key is referencing a Custom Field key, use the `prefixGeneratedColName(key)` helper on the column
     */
    abstract getSchemaDefinition(props: GetSchemaDefinitionProps): Awaited<ServiceResponse<SchemaDefinition>>;
    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 CollectionBuilder extends FieldBuilder {
    #private;
    key: string;
    config: CollectionConfigSchemaType;
    displayInListing: string[];
    collectionTableSchema?: CollectionSchema;
    constructor(key: string, config: Omit<CollectionConfigSchemaType, "key">);
    addText(key: string, props?: CFProps<"text"> & {
        displayInListing?: DisplayInListing;
    }): this;
    addNumber(key: string, props?: CFProps<"number"> & {
        displayInListing?: DisplayInListing;
    }): this;
    addCheckbox(key: string, props?: CFProps<"checkbox"> & {
        displayInListing?: DisplayInListing;
    }): this;
    addSelect(key: string, props?: CFProps<"select"> & {
        displayInListing?: DisplayInListing;
    }): this;
    addTextarea(key: string, props?: CFProps<"textarea"> & {
        displayInListing?: DisplayInListing;
    }): this;
    addDateTime(key: string, props?: CFProps<"datetime"> & {
        displayInListing?: DisplayInListing;
    }): this;
    addUser(key: string, props?: CFProps<"user"> & {
        displayInListing?: DisplayInListing;
    }): this;
    addMedia(key: string, props?: CFProps<"media"> & {
        displayInListing?: DisplayInListing;
    }): this;
    get getData(): CollectionData;
    get fixedBricks(): CollectionBrickConfig[];
    get builderBricks(): CollectionBrickConfig[];
    get brickInstances(): Array<BrickBuilder>;
    get bricksTableSchema(): Array<CollectionSchemaTable<LucidBrickTableName>>;
    get documentTableSchema(): CollectionSchemaTable<LucidDocumentTableName> | undefined;
    get documentFieldsTableSchema(): CollectionSchemaTable<LucidBrickTableName> | undefined;
    get documentVersionTableSchema(): CollectionSchemaTable<LucidVersionTableName> | undefined;
    get tableNames(): Awaited<ServiceResponse<CollectionTableNames>>;
}

declare const ConfigSchema: z.ZodObject<{
    db: z.ZodUnknown;
    host: z.ZodString;
    keys: z.ZodObject<{
        encryptionKey: z.ZodString;
        cookieSecret: z.ZodString;
        accessTokenSecret: z.ZodString;
        refreshTokenSecret: z.ZodString;
    }, {}>;
    logLevel: z.ZodUnion<readonly [z.ZodLiteral<"error">, z.ZodLiteral<"warn">, z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>;
    paths: z.ZodOptional<z.ZodObject<{
        emailTemplates: z.ZodOptional<z.ZodString>;
    }, {}>>;
    disableSwagger: z.ZodBoolean;
    localisation: z.ZodOptional<z.ZodObject<{
        locales: z.ZodArray<z.ZodObject<{
            label: z.ZodString;
            code: z.ZodString;
        }, {}>>;
        defaultLocale: z.ZodString;
    }, {}>>;
    email: z.ZodOptional<z.ZodObject<{
        from: z.ZodObject<{
            email: z.ZodString;
            name: z.ZodString;
        }, {}>;
        strategy: z.ZodUnknown;
    }, {}>>;
    media: z.ZodObject<{
        storage: z.ZodNumber;
        maxSize: z.ZodNumber;
        processed: z.ZodObject<{
            limit: z.ZodNumber;
            store: z.ZodBoolean;
        }, {}>;
        fallbackImage: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
        strategy: z.ZodOptional<z.ZodUnknown>;
    }, {}>;
    hooks: z.ZodArray<z.ZodObject<{
        service: z.ZodString;
        event: z.ZodString;
        handler: z.ZodUnknown;
    }, {}>>;
    fastifyExtensions: z.ZodOptional<z.ZodArray<z.ZodCustom<(fastify: FastifyInstance) => Promise<void>, (fastify: FastifyInstance) => Promise<void>>>>;
    collections: z.ZodArray<z.ZodUnknown>;
    plugins: z.ZodArray<z.ZodUnknown>;
    vite: z.ZodOptional<z.ZodUnknown>;
}, {}>;

type LogLevel = "error" | "warn" | "info" | "debug";
type LoggerScopes = (typeof _default.logScopes)[keyof typeof _default.logScopes];
declare const logger: (level: LogLevel, data: {
    message: string;
    scope?: LoggerScopes | string;
    data?: Record<string, unknown>;
}) => void;

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;
    };
    /** The log level to use. */
    logLevel?: LogLevel;
    /** 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 z.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;
}

declare module "fastify" {
    interface FastifyInstance {
        config: Config;
        logger: typeof logger;
        services: typeof lucidServices;
    }
    interface FastifyRequest {
        auth: {
            id: number;
            username: string;
            email: string;
            superAdmin: boolean;
            permissions: UserPermissionsResponse["permissions"] | undefined;
        };
        locale: {
            code: LocalesResponse["code"];
        };
        server: FastifyInstance;
        clientIntegrationAuth: {
            id: number;
            key: string;
        };
        formattedQuery: QueryParams;
    }
}
type RouteController<P extends z.ZodType | undefined, B extends z.ZodType | undefined, Q extends z.ZodType | undefined, F extends z.ZodType | undefined = undefined> = (request: FastifyRequest<{
    Params: z.infer<P>;
    Body: z.infer<B>;
    Querystring: z.infer<Q>;
}> & {
    formattedQuery: F extends z.ZodType ? z.infer<F> : z.ZodType;
}, reply: FastifyReply) => void;
type ControllerSchema = {
    query: {
        string: z.ZodType | undefined;
        formatted: z.ZodType | undefined;
    };
    params: z.ZodType | undefined;
    body: z.ZodType | undefined;
    response: z.ZodType | undefined;
};

export { type ClientIntegrationResponse as $, type OptionsResponse as A, BrickBuilder as B, type ClientGetSingleQueryParams as C, type DocumentVersionType as D, type EmailResponse as E, FieldBuilder as F, type MediaType as G, type MediaResponse as H, type CollectionResponse as I, type BrickResponse as J, type BrickAltResponse as K, type LucidErrorData as L, type MediaStrategyGetPresignedUrl as M, type FieldResponse as N, type OptionName as O, type Permission as P, type FieldAltResponse as Q, type ResponseBody as R, type ServiceFn as S, type FieldGroupResponse as T, type UserResponse as U, type FieldGroupAltResponse as V, type DocumentVersionResponse as W, type DocumentResponse as X, type ErrorResponse as Y, type PermissionGroup as Z, type PermissionGroupKey as _, type ClientDocumentResponse as a, type RepeaterResValue as a$, type LucidHook as a0, type LucidHookDocuments as a1, type ArgumentsType as a2, type HookServiceHandlers as a3, type DocumentBuilderHooks as a4, type DocumentHooks as a5, type AllHooks as a6, type ErrorResultValue as a7, type ErrorResultObj as a8, type FieldError as a9, type CheckboxFieldConfig as aA, type SelectFieldConfig as aB, type TextareaFieldConfig as aC, type JsonFieldConfig as aD, type ColourFieldConfig as aE, type DatetimeFieldConfig as aF, type LinkFieldConfig as aG, type UserFieldConfig as aH, type TabFieldProps as aI, type TextFieldProps as aJ, type WysiwygFieldProps as aK, type MediaFieldProps as aL, type RepeaterFieldProps as aM, type DocumentFieldProps as aN, type NumberFieldProps as aO, type CheckboxFieldProps as aP, type SelectFieldProps as aQ, type TextareaFieldProps as aR, type JsonFieldProps as aS, type ColourFieldProps as aT, type DatetimeFieldProps as aU, type LinkFieldProps as aV, type UserFieldProps as aW, type TabResValue as aX, type TextResValue as aY, type WysiwygResValue as aZ, type MediaResValue as a_, type GroupError as aa, type BrickError as ab, type SupportedLocales as ac, type LocaleValue as ad, type TranslationsObj as ae, type DisplayInListing as af, type CollectionConfigSchemaType as ag, type CollectionData as ah, type FieldFilters as ai, type CollectionBrickConfig as aj, type CollectionTableNames as ak, type CustomFieldMap as al, type FieldTypes as am, type FieldColumns as an, type CFConfig as ao, type CFProps as ap, type CFColumn as aq, type CFResponse as ar, type SharedFieldConfig as as, type TabFieldConfig as at, type TextFieldConfig as au, type WysiwygFieldConfig as av, type MediaFieldConfig as aw, type DocumentFieldConfig as ax, type RepeaterFieldConfig as ay, type NumberFieldConfig as az, type ClientGetMultipleQueryParams as b, type LucidMediaAwaitingSync as b$, type NumberResValue as b0, type CheckboxResValue as b1, type SelectReValue as b2, type TextareaResValue as b3, type JsonResValue as b4, type ColourResValue as b5, type DatetimeResValue as b6, type DocumentResValue as b7, type LinkResValue as b8, type UserResValue as b9, type ServiceProps as bA, type ExtractServiceFnArgs as bB, type KyselyDB as bC, type MigrationFn as bD, type Select as bE, type Insert as bF, type Update as bG, type DefaultValueType as bH, type OnDelete as bI, type OnUpdate as bJ, type DatabaseConfig as bK, type InferredColumn as bL, type InferredTable as bM, type TimestampMutateable as bN, type TimestampImmutable as bO, type BooleanInt as bP, type LucidLocales as bQ, type LucidTranslationKeys as bR, type LucidTranslations as bS, type LucidOptions as bT, type LucidUsers as bU, type LucidRoles as bV, type LucidRolePermissions as bW, type LucidUserRoles as bX, type LucidUserTokens as bY, type LucidEmails as bZ, type LucidMedia as b_, type FieldResponseValue as ba, type TabResMeta as bb, type TextResMeta as bc, type WysiwygResMeta as bd, type MediaResMeta as be, type DocumentResMeta as bf, type RepeaterResMeta as bg, type NumberResMeta as bh, type CheckboxResMeta as bi, type SelectResMeta as bj, type TextareaResMeta as bk, type JsonResMeta as bl, type ColourResMeta as bm, type DatetimeResMeta as bn, type LinkResMeta as bo, type UserResMeta as bp, type FieldResponseMeta as bq, type CustomFieldErrorItem as br, type CustomFieldValidateResponse as bs, type MediaReferenceData as bt, type UserReferenceData as bu, type DocumentReferenceData as bv, type GetSchemaDefinitionProps as bw, type ColumnDefinition as bx, type SchemaDefinition as by, type FieldInputSchema as bz, type LocalesResponse as c, type HeadlessProcessedImages as c0, type LucidCollections as c1, type LucidCollectionMigrations as c2, type LucidClientIntegrations as c3, type LucidDocumentTableName as c4, type LucidDocumentTable as c5, type LucidVersionTableName as c6, type LucidVersionTable as c7, type LucidBrickTableName as c8, type LucidBricksTable as c9, type LucidDB as ca, type LucidConfig as d, type Config as e, DatabaseAdapter as f, type ErrorResult as g, type ControllerSchema as h, type RouteController as i, type ServiceWrapperConfig as j, type ServiceContext as k, logger as l, type ServiceResponse as m, CollectionBuilder as n, type LucidPlugin as o, type LucidPluginOptions as p, type EmailStrategy as q, type MediaStrategyGetMeta as r, type MediaStrategyStream as s, type MediaStrategyUploadSingle as t, type MediaStrategyDeleteSingle as u, type MediaStrategyDeleteMultiple as v, type MediaStrategy as w, type UserPermissionsResponse as x, type SettingsResponse as y, type RoleResponse as z };
