import { RelationalDatabaseSchemaTable, RPCActionBody, RPCActionType, StatRpc, StatRpcResultSelectDTO, TableRpc, TableRpcResultInsertDTO, TableRpcResultSelectDTO, TableRpcResultSelectLinkedRecordsDTO, TableRpcResultUpdateDTO } from '@kottster/common';
type ActionResults = {
    'table_spec': {
        tableRpc: TableRpc;
        tableSchema: RelationalDatabaseSchemaTable;
    };
    'table_select': TableRpcResultSelectDTO;
    'table_selectLinkedRecords': TableRpcResultSelectLinkedRecordsDTO;
    'table_insert': TableRpcResultInsertDTO;
    'table_update': TableRpcResultUpdateDTO;
    'table_delete': null;
    'stat_spec': {
        statRpc: StatRpc;
    };
    'stat_select': StatRpcResultSelectDTO;
};
type RPCAction = {
    [K in RPCActionType]: {
        action: K;
        input: RPCActionBody<K>;
        result: K extends keyof ActionResults ? ActionResults[K] : never;
    };
}[RPCActionType];
declare function executeRpc<A extends RPCActionType>(action: A, input: RPCActionBody<A>['input']): Promise<Extract<RPCAction, {
    action: A;
}>['result']>;
export default executeRpc;
