import type { Insertable, Selectable, Generated } from "kysely";
import type { FromLixSchemaDefinition } from "../schema-definition/definition.js";
export type ChangeView = {
    id: Generated<string>;
    entity_id: string;
    schema_key: string;
    schema_version: string;
    file_id: string;
    plugin_key: string;
    metadata?: Record<string, any> | null;
    created_at: Generated<string>;
    snapshot_content: Record<string, any> | null;
};
export type LixChange = Selectable<ChangeView>;
export type NewLixChange = Insertable<ChangeView>;
export type InternalChangeTable = {
    id: Generated<string>;
    entity_id: string;
    schema_key: string;
    schema_version: string;
    file_id: string;
    plugin_key: string;
    snapshot_id: string;
    metadata?: Record<string, any> | null;
    created_at: Generated<string>;
};
export type InternalChange = Selectable<InternalChangeTable>;
export type NewInternalChange = Insertable<InternalChangeTable>;
/**
 * Raw change payload where `snapshot_content` remains as serialized JSON.
 *
 * Useful when piping changes between SQLite and the cache layer without
 * incurring double parse/serialize overhead.
 */
export type LixChangeRaw = Omit<LixChange, "snapshot_content" | "metadata"> & {
    snapshot_content: string | null;
    metadata?: string | null;
};
export declare const LixChangeSchema: {
    readonly "x-lix-key": "lix_change";
    readonly "x-lix-version": "1.0";
    readonly "x-lix-primary-key": readonly ["/id"];
    readonly "x-lix-override-lixcols": {
        readonly lixcol_file_id: "\"lix\"";
        readonly lixcol_plugin_key: "\"lix_sdk\"";
    };
    readonly type: "object";
    readonly properties: {
        readonly id: {
            readonly type: "string";
            readonly "x-lix-default": "lix_uuid_v7()";
        };
        readonly entity_id: {
            readonly type: "string";
        };
        readonly schema_key: {
            readonly type: "string";
        };
        readonly schema_version: {
            readonly type: "string";
        };
        readonly file_id: {
            readonly type: "string";
        };
        readonly plugin_key: {
            readonly type: "string";
        };
        readonly metadata: {
            readonly type: readonly ["object", "null"];
        };
        readonly created_at: {
            readonly type: "string";
        };
        readonly snapshot_content: {
            readonly type: readonly ["object", "null"];
        };
    };
    readonly required: readonly ["id", "entity_id", "schema_key", "schema_version", "file_id", "plugin_key", "created_at"];
    readonly additionalProperties: false;
};
export type LixChangeSnapshot = FromLixSchemaDefinition<typeof LixChangeSchema>;
//# sourceMappingURL=schema-definition.d.ts.map