import { type PgTable } from 'drizzle-orm/pg-core';
import type { BaseService } from './service';
export declare function buildEntityImportTemplate(table: PgTable, ignoreProperty?: string[]): Uint8Array;
type ImportRowResult = {
    inserted: number;
    updated: number;
    failed: Array<{
        row: number;
        message: string;
    }>;
};
/**
 * 按唯一键 upsert 导入行：
 * 1. 有 id 且存在 → 更新
 * 2. 否则按 unique 索引匹配 → 更新
 * 3. 否则新增
 */
export declare function importEntityRows(svc: BaseService, table: PgTable, rows: Record<string, unknown>[], options?: {
    uniqueKeys?: string[];
    ignoreProperty?: string[];
}): Promise<ImportRowResult>;
/** 从上传文件解析并导入 */
export declare function importEntityExcel(svc: BaseService, table: PgTable, fileData: ArrayBuffer | Uint8Array, options?: {
    uniqueKeys?: string[];
    ignoreProperty?: string[];
}): Promise<ImportRowResult>;
export {};
