import * as __internal_types from '../internal/types.cjs';
export { UTFiles } from '../internal/types.cjs';
import * as _uploadthing_shared from '@uploadthing/shared';
import { Json, UploadThingError } from '@uploadthing/shared';
import { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify';
import { FileRouter, RouteHandlerOptions } from '../types/index.js';
export { FileRouter } from '../types/index.js';

type CreateBuilderOptions<TErrorShape extends Json> = {
    errorFormatter: (err: UploadThingError) => TErrorShape;
};

type AdapterArgs = {
    req: FastifyRequest;
    res: FastifyReply;
    event: undefined;
};
declare const createUploadthing: <TErrorShape extends Json>(opts?: CreateBuilderOptions<TErrorShape>) => <TRouteOptions extends _uploadthing_shared.RouteOptions>(input: _uploadthing_shared.FileRouterInputConfig, config?: TRouteOptions | undefined) => __internal_types.UploadBuilder<{
    _routeOptions: TRouteOptions;
    _input: {
        in: __internal_types.UnsetMarker;
        out: __internal_types.UnsetMarker;
    };
    _metadata: __internal_types.UnsetMarker;
    _adapterFnArgs: AdapterArgs;
    _errorShape: TErrorShape;
    _errorFn: __internal_types.UnsetMarker;
    _output: __internal_types.UnsetMarker;
}>;
declare const createRouteHandler: <TRouter extends FileRouter>(fastify: FastifyInstance, opts: RouteHandlerOptions<TRouter>, done: (err?: Error) => void) => void;

export { createRouteHandler, createUploadthing };
