export interface MasterRecord {
    id: string;
    name: string;
    code: string | null;
    description: string | null;
    isActive: boolean;
    sortOrder: number;
    metadata: Record<string, unknown>;
    effectiveFrom: string;
    effectiveTo: string | null;
    createdAt: string;
    createdBy: string | null;
    updatedAt: string | null;
    updatedBy: string | null;
    parentId?: string | null;
    path?: string | null;
    depth?: number | null;
    areaType?: string | null;
    ownerId?: string | null;
    groupId?: string | null;
}
export interface MasterFilter {
    q?: string;
    parentId?: string;
    isActive?: boolean;
    page: number;
    limit: number;
}
export interface MasterPage {
    items: MasterRecord[];
    total: number;
    page: number;
    limit: number;
}
export interface CreateMasterInput {
    name: string;
    code?: string;
    description?: string;
    sortOrder?: number;
    isActive?: boolean;
    metadata?: Record<string, unknown>;
    effectiveFrom?: string;
    effectiveTo?: string;
    parentId?: string;
    ownerId?: string;
    groupId?: string;
    path?: string;
    depth?: number;
    areaType?: string;
}
export interface UpdateMasterInput {
    name?: string;
    code?: string;
    description?: string;
    sortOrder?: number;
    isActive?: boolean;
    metadata?: Record<string, unknown>;
    effectiveFrom?: string;
    effectiveTo?: string;
    parentId?: string;
    ownerId?: string;
    groupId?: string;
    path?: string;
    depth?: number;
    areaType?: string;
}
export interface DomainConfig {
    table: string;
    hierarchical: boolean;
    extraCols?: string[];
    /** Column holding the human-readable name — defaults to "name", some tables use "label" */
    nameCol?: string;
    /** Tables that lack created_by / updated_by columns */
    noAuditCols?: boolean;
    /** Tables that lack is_active (e.g. mst_answer_type uses status text) */
    noIsActive?: boolean;
    /** Tables that lack updated_at (e.g. mst_person_role_type) */
    noUpdatedAt?: boolean;
}
/**
 * Registry of all supported master-data domains.
 * ALL SQL table names are resolved from this map — never from user input.
 */
export declare const DOMAIN_REGISTRY: Map<string, DomainConfig>;
export declare function resolveDomain(domain: string): DomainConfig;
export interface MasterRepository {
    list(domain: string, filter: MasterFilter): Promise<MasterPage>;
    getById(domain: string, id: string): Promise<MasterRecord | null>;
    create(domain: string, data: CreateMasterInput): Promise<MasterRecord>;
    update(domain: string, id: string, data: UpdateMasterInput): Promise<MasterRecord | null>;
    softDelete(domain: string, id: string): Promise<boolean>;
}
