export { createConnectQueryKey, useInfiniteQuery, useMutation, useQuery, useTransport } from '@connectrpc/connect-query';
import { ConnectError } from '@connectrpc/connect';
export { Code, ConnectError } from '@connectrpc/connect';
export { FrontierServiceQueries } from '@raystack/proton/frontier';
export { useQueryClient } from '@tanstack/react-query';
export { create } from '@bufbuild/protobuf';

type ErrorHandler = (error: ConnectError) => void;
type ErrorHandlerMap = {
    AlreadyExists?: ErrorHandler;
    InvalidArgument?: ErrorHandler;
    PermissionDenied?: ErrorHandler;
    FailedPrecondition?: ErrorHandler;
    NotFound?: ErrorHandler;
    Default?: ErrorHandler;
};
declare function handleConnectError(error: unknown, handlers?: ErrorHandlerMap): void;

export { handleConnectError };
