import { Insertable, Kysely, Updateable } from 'kysely';
import { PluginTriggerType } from 'src/enum';
import { DB } from 'src/schema';
import { WorkflowActionTable, WorkflowFilterTable, WorkflowTable } from 'src/schema/tables/workflow.table';
export declare class WorkflowRepository {
    private db;
    constructor(db: Kysely<DB>);
    getWorkflow(id: string): Promise<{
        name: string | null;
        id: string;
        description: string;
        createdAt: Date;
        ownerId: string;
        triggerType: PluginTriggerType;
        enabled: boolean;
    } | undefined>;
    getWorkflowsByOwner(ownerId: string): Promise<{
        name: string | null;
        id: string;
        description: string;
        createdAt: Date;
        ownerId: string;
        triggerType: PluginTriggerType;
        enabled: boolean;
    }[]>;
    getWorkflowsByTrigger(type: PluginTriggerType): Promise<{
        name: string | null;
        id: string;
        description: string;
        createdAt: Date;
        ownerId: string;
        triggerType: PluginTriggerType;
        enabled: boolean;
    }[]>;
    getWorkflowByOwnerAndTrigger(ownerId: string, type: PluginTriggerType): Promise<{
        name: string | null;
        id: string;
        description: string;
        createdAt: Date;
        ownerId: string;
        triggerType: PluginTriggerType;
        enabled: boolean;
    }[]>;
    createWorkflow(workflow: Insertable<WorkflowTable>, filters: Insertable<WorkflowFilterTable>[], actions: Insertable<WorkflowActionTable>[]): Promise<{
        name: string | null;
        id: string;
        description: string;
        createdAt: Date;
        ownerId: string;
        triggerType: PluginTriggerType;
        enabled: boolean;
    }>;
    updateWorkflow(id: string, workflow: Updateable<WorkflowTable>, filters: Insertable<WorkflowFilterTable>[] | undefined, actions: Insertable<WorkflowActionTable>[] | undefined): Promise<{
        name: string | null;
        id: string;
        description: string;
        createdAt: Date;
        ownerId: string;
        triggerType: PluginTriggerType;
        enabled: boolean;
    }>;
    deleteWorkflow(id: string): Promise<void>;
    getFilters(workflowId: string): Promise<{
        id: string;
        order: number;
        workflowId: string;
        pluginFilterId: string;
        filterConfig: import("../types/plugin-schema.types").FilterConfig | null;
    }[]>;
    deleteFiltersByWorkflow(workflowId: string): Promise<void>;
    getActions(workflowId: string): Promise<{
        id: string;
        order: number;
        workflowId: string;
        pluginActionId: string;
        actionConfig: import("../types/plugin-schema.types").ActionConfig | null;
    }[]>;
}
