/**
 * Entity Hook System Integration
 *
 * Provides WordPress-like hooks for entity operations
 * Allows plugins to extend entity behavior without modifying core code
 */
import type { EntityConfig } from './types';
/**
 * Entity operation data for hooks
 */
export interface EntityHookData<T = Record<string, unknown>> {
    entityName: string;
    entityConfig: EntityConfig;
    data?: T;
    userId?: string;
    operation: 'create' | 'read' | 'update' | 'delete';
    id?: string;
    changes?: Partial<T>;
}
/**
 * Entity validation result
 */
export interface EntityValidationResult {
    valid: boolean;
    errors: string[];
    data?: unknown;
}
/**
 * Entity Hook Manager
 * Provides integration points for plugins to extend entity operations
 */
export declare class EntityHookManager {
    private hooks;
    /**
     * Hook: Before entity creation
     * Allows plugins to validate, modify, or prevent entity creation
     */
    beforeEntityCreate<T>(entityName: string, data: T, userId?: string): Promise<T>;
    /**
     * Hook: After entity creation
     * Allows plugins to react to entity creation events
     */
    afterEntityCreate<T>(entityName: string, data: T, userId?: string): Promise<void>;
    /**
     * Hook: Before entity update
     */
    beforeEntityUpdate<T>(entityName: string, id: string, changes: Partial<T>, userId?: string): Promise<Partial<T>>;
    /**
     * Hook: After entity update
     */
    afterEntityUpdate<T>(entityName: string, id: string, data: T, changes: Partial<T>, userId?: string): Promise<void>;
    /**
     * Hook: Before entity deletion
     */
    beforeEntityDelete(entityName: string, id: string, userId?: string): Promise<boolean>;
    /**
     * Hook: After entity deletion
     */
    afterEntityDelete(entityName: string, id: string, userId?: string): Promise<void>;
    /**
     * Hook: Entity validation
     * Allows plugins to add custom validation rules
     */
    validateEntity<T>(entityName: string, data: T, operation: 'create' | 'update'): Promise<EntityValidationResult>;
    /**
     * Hook: Before entity query/read
     */
    beforeEntityRead(entityName: string, query: Record<string, unknown>, userId?: string): Promise<Record<string, unknown>>;
    /**
     * Hook: After entity query/read
     */
    afterEntityRead<T>(entityName: string, results: T[], query: Record<string, unknown>, userId?: string): Promise<T[]>;
    /**
     * Authentication hooks
     */
    onUserLogin(user: Record<string, unknown>): Promise<void>;
    onUserLogout(user: Record<string, unknown>): Promise<void>;
    onUserRegister(user: Record<string, unknown>): Promise<void>;
    /**
     * Get entity configuration (placeholder)
     */
    private getEntityConfig;
}
export declare const entityHookManager: EntityHookManager;
export declare const beforeEntityCreate: <T>(entityName: string, data: T, userId?: string) => Promise<T>;
export declare const afterEntityCreate: <T>(entityName: string, data: T, userId?: string) => Promise<void>;
export declare const beforeEntityUpdate: <T>(entityName: string, id: string, changes: Partial<T>, userId?: string) => Promise<Partial<T>>;
export declare const afterEntityUpdate: <T>(entityName: string, id: string, data: T, changes: Partial<T>, userId?: string) => Promise<void>;
export declare const beforeEntityDelete: (entityName: string, id: string, userId?: string) => Promise<boolean>;
export declare const afterEntityDelete: (entityName: string, id: string, userId?: string) => Promise<void>;
export declare const validateEntity: <T>(entityName: string, data: T, operation: "create" | "update") => Promise<EntityValidationResult>;
export declare const beforeEntityRead: (entityName: string, query: Record<string, unknown>, userId?: string) => Promise<Record<string, unknown>>;
export declare const afterEntityRead: <T>(entityName: string, results: T[], query: Record<string, unknown>, userId?: string) => Promise<T[]>;
//# sourceMappingURL=entity-hooks.d.ts.map