import { EntityType, GridRecordSetExportResponse, SynchronizeGridResponse, TableUpdateTransactionResponse } from '@sage-bionetworks/synapse-client';
import { UseMutationOptions } from '@tanstack/react-query';
import { SynapseClientError } from '@sage-bionetworks/synapse-client';
export type MergeGridWithSource = {
    gridSessionId: string;
    sourceEntityId?: string;
    sourceEntityType?: EntityType;
};
export type MergeGridResult = {
    type: 'entityview';
    data: SynchronizeGridResponse;
} | {
    type: 'recordset';
    data: GridRecordSetExportResponse;
} | {
    type: 'table';
    data: TableUpdateTransactionResponse;
};
/**
 * Single entrypoint to handle merging grid edits with source Synapse data.
 * Calls the appropriate mutation based on entity type:
 * - EntityView -> useSynchronizeGridSession
 * - TableEntity -> useMergeGridWithTable
 * - RecordSet -> useMergeGridWithRecordSet
 *
 * Returns a query mutation that handles merging for tables or recordsets.
 */
export default function useMergeGridWithSource(options?: Omit<UseMutationOptions<MergeGridResult, SynapseClientError, MergeGridWithSource>, 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<MergeGridResult, SynapseClientError, MergeGridWithSource, unknown>;
//# sourceMappingURL=useMergeGridWithSource.d.ts.map