import { GraphQlClientRequestOptions } from '@contember/react-client';
import { GQLVariableType, GQLVariableValues } from './variables';
export declare type TenantMutationExecutor<VariableValues extends any, Res extends TenantMutationResponse<any, string>> = (variables: VariableValues, option?: {
    onResponse?: (response: any) => void;
}) => Promise<Res>;
export declare const useSingleTenantMutation: <Result extends unknown, ErrorCode extends string, Variables extends Record<string, GQLVariableType<any, any>>>(mutation: string, variableDefinitions: Variables, options?: Omit<GraphQlClientRequestOptions, "variables"> | undefined) => TenantMutationExecutor<GQLVariableValues<Variables>, TenantMutationResponse<Result, ErrorCode>>;
export interface TenantMutationErrorResponse<Code extends string> {
    ok: false;
    error: {
        code: Code;
        developerMessage: string;
    };
}
export interface TenantMutationOkResponse<Result> {
    ok: true;
    result: Result;
}
export declare type TenantMutationResponse<Result, ErrorCode extends string> = TenantMutationErrorResponse<ErrorCode> | TenantMutationOkResponse<Result>;
//# sourceMappingURL=useSingleTenantMutation.d.ts.map