import { DataSource } from './source-base';
import type { ExtraFileTags } from './source-base';
import { BaseTable } from '../table';
import { z } from '@botpress/sdk';
type TableRow = {
    id: number;
    createdAt: string;
    updatedAt: string;
    [key: string]: any;
};
type TableSourceOptions<TRow extends TableRow = TableRow> = {
    id?: string;
    transform?: (context: {
        row: TRow;
        content: string;
    }) => string | Promise<string>;
    /**
     * Extra tags applied to every file ingested by this source, on top of the
     * well-known KB/source identity tags. Reserved keys are ignored.
     */
    tags?: ExtraFileTags;
};
export declare class TableSource<TRow extends TableRow = TableRow> extends DataSource {
    readonly table: BaseTable<any>;
    private _transformFn;
    constructor(id: string, table: BaseTable<any>, options?: TableSourceOptions<TRow>);
    /** Get the transform function for this source */
    protected get transformFn(): ((context: {
        row: TRow;
        content: string;
    }) => string | Promise<string>) | undefined;
    /** Get serializable configuration for change detection */
    getConfig(): Record<string, unknown>;
    get syncWorkflow(): import("..").Workflow<`data_source_sync_${string}`, z.ZodObject<{
        dsId: z.ZodString;
        kbName: z.ZodString;
        kbId: z.ZodString;
        force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    }, "strip", {
        kbId: string;
        kbName: string;
        dsId: string;
        force: boolean;
    }, {
        kbId: string;
        kbName: string;
        dsId: string;
        force?: boolean | undefined;
    }>, z.ZodObject<{
        processed: z.ZodDefault<z.ZodNumber>;
        added: z.ZodDefault<z.ZodArray<z.ZodObject<{
            file: z.ZodString;
            name: z.ZodString;
            hash: z.ZodString;
            size: z.ZodNumber;
        }, "strip", {
            name: string;
            size: number;
            hash: string;
            file: string;
        }, {
            name: string;
            size: number;
            hash: string;
            file: string;
        }>, "many">>;
        updated: z.ZodDefault<z.ZodArray<z.ZodObject<{
            file: z.ZodString;
            name: z.ZodString;
            hash: z.ZodString;
            size: z.ZodNumber;
        }, "strip", {
            name: string;
            size: number;
            hash: string;
            file: string;
        }, {
            name: string;
            size: number;
            hash: string;
            file: string;
        }>, "many">>;
        deleted: z.ZodDefault<z.ZodArray<z.ZodObject<{
            file: z.ZodString;
            name: z.ZodString;
            hash: z.ZodString;
            size: z.ZodNumber;
        }, "strip", {
            name: string;
            size: number;
            hash: string;
            file: string;
        }, {
            name: string;
            size: number;
            hash: string;
            file: string;
        }>, "many">>;
        errors: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    }, "strip", {
        processed: number;
        added: {
            name: string;
            size: number;
            hash: string;
            file: string;
        }[];
        updated: {
            name: string;
            size: number;
            hash: string;
            file: string;
        }[];
        deleted: {
            name: string;
            size: number;
            hash: string;
            file: string;
        }[];
        errors: string[];
    }, {
        processed?: number | undefined;
        added?: {
            name: string;
            size: number;
            hash: string;
            file: string;
        }[] | undefined;
        updated?: {
            name: string;
            size: number;
            hash: string;
            file: string;
        }[] | undefined;
        deleted?: {
            name: string;
            size: number;
            hash: string;
            file: string;
        }[] | undefined;
        errors?: string[] | undefined;
    }>, z.ZodObject<{
        offset: z.ZodDefault<z.ZodNumber>;
    }, "strip", {
        offset: number;
    }, {
        offset?: number | undefined;
    }>, Record<string, import("../../types").ZuiType>, Record<string, import("../../types").ZuiType>>;
    static fromTable<TRow extends TableRow = TableRow>(table: BaseTable<any>, options?: TableSourceOptions<TRow>): TableSource<TRow>;
}
export {};
//# sourceMappingURL=source-table.d.ts.map