import type { Insertable, Selectable, Generated } from "kysely"; import type { FromLixSchemaDefinition } from "../schema-definition/definition.js"; export type ChangeView = { id: Generated; entity_id: string; schema_key: string; schema_version: string; file_id: string; plugin_key: string; metadata?: Record | null; created_at: Generated; snapshot_content: Record | null; }; export type LixChange = Selectable; export type NewLixChange = Insertable; export type InternalChangeTable = { id: Generated; entity_id: string; schema_key: string; schema_version: string; file_id: string; plugin_key: string; snapshot_id: string; metadata?: Record | null; created_at: Generated; }; export type InternalChange = Selectable; export type NewInternalChange = Insertable; /** * 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 & { 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; //# sourceMappingURL=schema-definition.d.ts.map