import type { SeamActionAttemptFailedError, SeamActionAttemptTimeoutError, SeamHttpApiError, SeamHttpEndpointMutationPaths, SeamHttpEndpoints, SeamHttpInvalidInputError } from '@seamapi/http/connect';
import type { ActionAttempt } from '@seamapi/types/connect';
import { type UseMutationOptions, type UseMutationResult } from '@tanstack/react-query';
export type UseSeamMutationVariables<T extends SeamHttpEndpointMutationPaths> = Parameters<SeamHttpEndpoints[T]>[0];
export type UseSeamMutationResult<T extends SeamHttpEndpointMutationPaths> = UseMutationResult<MutationData<T>, MutationError<T>, UseSeamMutationVariables<T>>;
export declare function useSeamMutation<T extends SeamHttpEndpointMutationPaths>(endpointPath: T, options?: Parameters<SeamHttpEndpoints[T]>[1] & MutationOptions<MutationData<T>, MutationError<T>, UseSeamMutationVariables<T>>): UseSeamMutationResult<T>;
type MutationData<T extends SeamHttpEndpointMutationPaths> = Awaited<ReturnType<SeamHttpEndpoints[T]>>;
type MutationError<T extends SeamHttpEndpointMutationPaths> = Error | SeamHttpApiError | SeamHttpInvalidInputError | (MutationData<T> extends ActionAttempt ? SeamActionAttemptFailedError<MutationData<T>> | SeamActionAttemptTimeoutError<MutationData<T>> : never);
type MutationOptions<X, Y, Z> = Omit<UseMutationOptions<X, Y, Z>, 'mutationFn'>;
export {};
