type DatasetFieldDef = {
    name: string;
    type?: string;
} | string;
export type BulkAppendZipKind = 'audio' | 'video' | 'image' | 'conversation';
/** Same source of truth as dataset create/edit UI: uploadDataType first, then dataType. */
export declare function resolveDatasetUploadDataType(config: unknown): number | null;
export declare function resolveBulkAppendMode(dataset: {
    type: string | null;
    config: any;
}): 'zip' | 'csv' | null;
export declare function resolveZipKind(dataType: number): BulkAppendZipKind | null;
export declare function getVariableColumnName(dataset: {
    fields: unknown;
    config: unknown;
}): string;
export declare function extractZipToDir(zipPath: string, baseTempDir: string): Promise<string>;
export declare function cleanupDir(dir: string | undefined): void;
export declare function cleanupFile(filePath: string | undefined): void;
export type ZipPreviewResult = {
    validCount: number;
    invalidCount: number;
    validPaths: string[];
    blockingError?: string;
};
export declare function previewZipContents(extractPath: string, zipKind: BulkAppendZipKind): ZipPreviewResult;
export type CsvPreviewResult = {
    validCount: number;
    invalidCount: number;
    headerError: string | null;
    validRows: Record<string, string>[];
};
export declare function previewCsvForDataset(csvText: string, fields: DatasetFieldDef[]): CsvPreviewResult;
export declare function assertAppendWithinLimit(params: {
    dataset: {
        type: string | null;
        config: unknown;
    };
    datasetId: string;
    rowsToAdd: number;
}): Promise<void>;
export declare function appendDatasetRecords(datasetId: string, recordDataList: Record<string, unknown>[]): Promise<number>;
export declare function commitZipAppend(params: {
    datasetId: string;
    dataset: {
        id: string;
        type: string | null;
        fields: unknown;
        config: unknown;
        projectId: string;
        workspaceId: string | null;
    };
    token: string | string[] | undefined;
    orgId: string;
    zipPath: string;
    zipKind: BulkAppendZipKind;
}): Promise<{
    addedCount: number;
}>;
export declare function commitCsvAppend(params: {
    datasetId: string;
    dataset: {
        id: string;
        type: string | null;
        config: unknown;
        fields: unknown;
        projectId: string;
        workspaceId: string | null;
    };
    validRows: Record<string, string>[];
    token: string | string[] | undefined;
}): Promise<{
    addedCount: number;
}>;
export declare function loadDatasetForBulkAppend(datasetId: string): Promise<{
    id: string;
    type: string | null;
    fields: unknown;
    config: unknown;
    projectId: string;
    workspaceId: string | null;
}>;
export {};
//# sourceMappingURL=datasetBulkAppendService.d.ts.map