import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
import { AnySQLiteTable, AnySQLiteColumn, BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
import { n as SequenceStoreScope, c as SequenceClipMedia, m as SequenceStore } from '../store-gckrNq-g.js';

/** A product table referenced by FK — only the `id` column is touched. */
type SequenceParentTable = AnySQLiteTable & {
    id: AnySQLiteColumn;
};
interface CreateSequenceTablesOptions {
    workspaceTable: SequenceParentTable;
    userTable: SequenceParentTable;
    generationTable?: SequenceParentTable;
    assetTable?: SequenceParentTable;
}
declare function createSequenceTables(opts: CreateSequenceTablesOptions): {
    sequences: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
        name: "sequence";
        schema: undefined;
        columns: {
            id: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "id";
                tableName: "sequence";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: true;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            workspaceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "workspace_id";
                tableName: "sequence";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            title: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "title";
                tableName: "sequence";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            fps: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "fps";
                tableName: "sequence";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            width: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "width";
                tableName: "sequence";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            height: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "height";
                tableName: "sequence";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            aspectRatio: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "aspect_ratio";
                tableName: "sequence";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            durationFrames: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "duration_frames";
                tableName: "sequence";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            status: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "status";
                tableName: "sequence";
                dataType: "string";
                columnType: "SQLiteText";
                data: "draft" | "active" | "exporting" | "archived";
                driverParam: string;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: ["draft", "active", "exporting", "archived"];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "metadata";
                tableName: "sequence";
                dataType: "json";
                columnType: "SQLiteTextJson";
                data: Record<string, unknown>;
                driverParam: string;
                notNull: false;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                $type: Record<string, unknown>;
            }>;
            createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_by";
                tableName: "sequence";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_at";
                tableName: "sequence";
                dataType: "date";
                columnType: "SQLiteTimestamp";
                data: Date;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "updated_at";
                tableName: "sequence";
                dataType: "date";
                columnType: "SQLiteTimestamp";
                data: Date;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
        };
        dialect: "sqlite";
    }>;
    sequenceTracks: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
        name: "sequence_track";
        schema: undefined;
        columns: {
            id: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "id";
                tableName: "sequence_track";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: true;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            sequenceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "sequence_id";
                tableName: "sequence_track";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            workspaceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "workspace_id";
                tableName: "sequence_track";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            kind: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "kind";
                tableName: "sequence_track";
                dataType: "string";
                columnType: "SQLiteText";
                data: "video" | "audio" | "caption" | "reference" | "agent";
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: ["video", "audio", "caption", "reference", "agent"];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            name: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "name";
                tableName: "sequence_track";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            sortOrder: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "sort_order";
                tableName: "sequence_track";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            locked: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "locked";
                tableName: "sequence_track";
                dataType: "boolean";
                columnType: "SQLiteBoolean";
                data: boolean;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            muted: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "muted";
                tableName: "sequence_track";
                dataType: "boolean";
                columnType: "SQLiteBoolean";
                data: boolean;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "metadata";
                tableName: "sequence_track";
                dataType: "json";
                columnType: "SQLiteTextJson";
                data: Record<string, unknown>;
                driverParam: string;
                notNull: false;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                $type: Record<string, unknown>;
            }>;
            createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_at";
                tableName: "sequence_track";
                dataType: "date";
                columnType: "SQLiteTimestamp";
                data: Date;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
        };
        dialect: "sqlite";
    }>;
    sequenceClips: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
        name: "sequence_clip";
        schema: undefined;
        columns: {
            id: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "id";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: true;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            sequenceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "sequence_id";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            trackId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "track_id";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            workspaceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "workspace_id";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            assetId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "asset_id";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            generationId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "generation_id";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            label: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "label";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            startFrame: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "start_frame";
                tableName: "sequence_clip";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            durationFrames: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "duration_frames";
                tableName: "sequence_clip";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            sourceInFrame: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "source_in_frame";
                tableName: "sequence_clip";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            sourceOutFrame: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "source_out_frame";
                tableName: "sequence_clip";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            version: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "version";
                tableName: "sequence_clip";
                dataType: "number";
                columnType: "SQLiteInteger";
                data: number;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            disabled: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "disabled";
                tableName: "sequence_clip";
                dataType: "boolean";
                columnType: "SQLiteBoolean";
                data: boolean;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            text: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "text";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            language: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "language";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "metadata";
                tableName: "sequence_clip";
                dataType: "json";
                columnType: "SQLiteTextJson";
                data: Record<string, unknown>;
                driverParam: string;
                notNull: false;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                $type: Record<string, unknown>;
            }>;
            createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_by";
                tableName: "sequence_clip";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_at";
                tableName: "sequence_clip";
                dataType: "date";
                columnType: "SQLiteTimestamp";
                data: Date;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            updatedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "updated_at";
                tableName: "sequence_clip";
                dataType: "date";
                columnType: "SQLiteTimestamp";
                data: Date;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
        };
        dialect: "sqlite";
    }>;
    sequenceDecisions: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
        name: "sequence_decision";
        schema: undefined;
        columns: {
            id: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "id";
                tableName: "sequence_decision";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: true;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            sequenceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "sequence_id";
                tableName: "sequence_decision";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            clipId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "clip_id";
                tableName: "sequence_decision";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            workspaceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "workspace_id";
                tableName: "sequence_decision";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            kind: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "kind";
                tableName: "sequence_decision";
                dataType: "string";
                columnType: "SQLiteText";
                data: "human_edit" | "agent_proposal" | "agent_edit" | "export" | "note";
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: ["human_edit", "agent_proposal", "agent_edit", "export", "note"];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            instruction: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "instruction";
                tableName: "sequence_decision";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            reasoningSummary: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "reasoning_summary";
                tableName: "sequence_decision";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            accepted: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "accepted";
                tableName: "sequence_decision";
                dataType: "boolean";
                columnType: "SQLiteBoolean";
                data: boolean;
                driverParam: number;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "metadata";
                tableName: "sequence_decision";
                dataType: "json";
                columnType: "SQLiteTextJson";
                data: Record<string, unknown>;
                driverParam: string;
                notNull: false;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                $type: Record<string, unknown>;
            }>;
            createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_by";
                tableName: "sequence_decision";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_at";
                tableName: "sequence_decision";
                dataType: "date";
                columnType: "SQLiteTimestamp";
                data: Date;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
        };
        dialect: "sqlite";
    }>;
    sequenceExports: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
        name: "sequence_export";
        schema: undefined;
        columns: {
            id: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "id";
                tableName: "sequence_export";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: true;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            workspaceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "workspace_id";
                tableName: "sequence_export";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            sequenceId: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "sequence_id";
                tableName: "sequence_export";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            format: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "format";
                tableName: "sequence_export";
                dataType: "string";
                columnType: "SQLiteText";
                data: "mp4" | "otio" | "xml" | "edl" | "vtt" | "srt" | "contact_sheet";
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: ["mp4", "otio", "xml", "edl", "vtt", "srt", "contact_sheet"];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            status: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "status";
                tableName: "sequence_export";
                dataType: "string";
                columnType: "SQLiteText";
                data: "queued" | "processing" | "completed" | "failed" | "cancelled";
                driverParam: string;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: ["queued", "processing", "completed", "failed", "cancelled"];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            resultUrl: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "result_url";
                tableName: "sequence_export";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            metadata: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "metadata";
                tableName: "sequence_export";
                dataType: "json";
                columnType: "SQLiteTextJson";
                data: Record<string, unknown>;
                driverParam: string;
                notNull: false;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                $type: Record<string, unknown>;
            }>;
            createdBy: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_by";
                tableName: "sequence_export";
                dataType: "string";
                columnType: "SQLiteText";
                data: string;
                driverParam: string;
                notNull: true;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: [string, ...string[]];
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {
                length: number | undefined;
            }>;
            createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "created_at";
                tableName: "sequence_export";
                dataType: "date";
                columnType: "SQLiteTimestamp";
                data: Date;
                driverParam: number;
                notNull: true;
                hasDefault: true;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
            completedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
                name: "completed_at";
                tableName: "sequence_export";
                dataType: "date";
                columnType: "SQLiteTimestamp";
                data: Date;
                driverParam: number;
                notNull: false;
                hasDefault: false;
                isPrimaryKey: false;
                isAutoincrement: false;
                hasRuntimeDefault: false;
                enumValues: undefined;
                baseColumn: never;
                identity: undefined;
                generated: undefined;
            }, {}, {}>;
        };
        dialect: "sqlite";
    }>;
};
type SequenceTables = ReturnType<typeof createSequenceTables>;
type SequenceRow = SequenceTables['sequences']['$inferSelect'];
type SequenceTrackRow = SequenceTables['sequenceTracks']['$inferSelect'];
type SequenceClipRow = SequenceTables['sequenceClips']['$inferSelect'];
type SequenceDecisionRow = SequenceTables['sequenceDecisions']['$inferSelect'];
type SequenceExportRow = SequenceTables['sequenceExports']['$inferSelect'];

/**
 * Drizzle-backed `SequenceStore` over the tables from `createSequenceTables`.
 * Works against any SQLite drizzle driver (better-sqlite3, D1, libsql) — the
 * builders are awaited, never `.run()`/`.all()`, so sync and async drivers
 * behave identically.
 *
 * Defense in depth: RBAC runs before the store is constructed, but every
 * query still pins `workspaceId` AND `sequenceId` from the scope in its WHERE
 * clause, so a leaked or attacker-supplied row id from another workspace can
 * never read or write across the boundary — it surfaces as "not found".
 *
 * Store-level invariants (everything richer lives in the operation
 * validator): frame fields must be non-negative integers, clip durations at
 * least `MIN_SEQUENCE_CLIP_FRAMES`, and the sequence duration can never
 * shrink below the last clip end. Every mutation bumps `sequence.updatedAt`
 * so workspace recency sorts stay truthful.
 */

/** Any SQLite drizzle database — `any` erases the driver-specific run-result
 *  and schema generics so better-sqlite3, D1, and libsql handles all fit. */
type SequenceDatabase = BaseSQLiteDatabase<'sync' | 'async', any, any>;
/** Resolves product-specific media (generation rows, asset rows) for a batch
 *  of clip rows. Keyed by clip id; clips absent from the map carry no media. */
type SequenceMediaResolver = (clipRows: SequenceClipRow[]) => Promise<Map<string, SequenceClipMedia>>;
interface CreateDrizzleSequenceStoreOptions {
    db: SequenceDatabase;
    tables: SequenceTables;
    scope: SequenceStoreScope;
    resolveMedia?: SequenceMediaResolver;
}
declare function createDrizzleSequenceStore(options: CreateDrizzleSequenceStoreOptions): SequenceStore;

export { type CreateDrizzleSequenceStoreOptions, type CreateSequenceTablesOptions, type SequenceClipRow, type SequenceDatabase, type SequenceDecisionRow, type SequenceExportRow, type SequenceMediaResolver, type SequenceParentTable, type SequenceRow, type SequenceTables, type SequenceTrackRow, createDrizzleSequenceStore, createSequenceTables };
