/**
 * Work Lifecycle Hook Storage
 *
 * CRUD operations for hook configurations in the workspace database.
 * Hooks are stored in the pmo_work_hooks table.
 */
import type Database from 'better-sqlite3';
import type { WorkHookConfig, HookableEvent, HookActionType } from './types.js';
/** Table name for work hooks. */
export declare const HOOKS_TABLE = "pmo_work_hooks";
/** SQL to create the hooks table. */
export declare const HOOKS_TABLE_SCHEMA = "\n  CREATE TABLE IF NOT EXISTS pmo_work_hooks (\n    id TEXT PRIMARY KEY,\n    name TEXT NOT NULL UNIQUE,\n    event TEXT NOT NULL,\n    action_type TEXT NOT NULL CHECK (action_type IN ('shell', 'webhook', 'log')),\n    action_value TEXT NOT NULL,\n    enabled INTEGER NOT NULL DEFAULT 1,\n    description TEXT,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n  )\n";
export declare const HOOKS_TABLE_INDEX = "\n  CREATE INDEX IF NOT EXISTS idx_pmo_work_hooks_event ON pmo_work_hooks(event);\n  CREATE INDEX IF NOT EXISTS idx_pmo_work_hooks_enabled ON pmo_work_hooks(enabled);\n";
/**
 * Ensure the hooks table exists in the database.
 * Safe to call multiple times.
 */
export declare function ensureHooksTable(db: Database.Database): void;
/**
 * WorkHookStorage provides CRUD operations for hook configurations.
 */
export declare class WorkHookStorage {
    private db;
    constructor(db: Database.Database);
    /**
     * List all hooks, optionally filtered by event name or enabled status.
     */
    list(options?: {
        event?: HookableEvent;
        enabled?: boolean;
    }): WorkHookConfig[];
    /**
     * Get a single hook by ID.
     */
    getById(id: string): WorkHookConfig | null;
    /**
     * Get a single hook by name.
     */
    getByName(name: string): WorkHookConfig | null;
    /**
     * Create a new hook configuration.
     */
    create(params: {
        name: string;
        event: HookableEvent;
        actionType: HookActionType;
        actionValue: string;
        description?: string;
    }): WorkHookConfig;
    /**
     * Delete a hook by ID.
     */
    delete(id: string): boolean;
    /**
     * Enable or disable a hook.
     */
    setEnabled(id: string, enabled: boolean): boolean;
}
