import * as v from 'valibot';
import type { SecurityContext } from '@donotdev/core';
import type { UserRole } from '@donotdev/core/server';
import type { CallableRequest, CallableOptions } from 'firebase-functions/v2/https';
/**
 * Base Firebase function that handles all common concerns
 * Users just provide their business logic
 *
 * Rate limiting and metrics are enabled by default.
 * Set `DISABLE_RATE_LIMITING=true` or `DISABLE_METRICS=true` to opt out.
 *
 * @param config - Firebase function config (region, memory, etc.)
 * @param schema - Valibot schema for request validation
 * @param operation - Operation name for logging/metrics
 * @param businessLogic - The actual business logic to execute
 * @param requiredRole - Minimum role required (default: 'user' for backwards compatibility)
 *
 * @version 0.1.0
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function createBaseFunction<TRequest, TResponse>(config: CallableOptions, schema: v.BaseSchema<unknown, TRequest, v.BaseIssue<unknown>>, operation: string, businessLogic: (data: TRequest, context: {
    uid: string;
    userRole: UserRole;
    request: CallableRequest<TRequest>;
}) => Promise<TResponse>, requiredRole?: UserRole, security?: SecurityContext): import("firebase-functions/https").CallableFunction<TRequest, any, unknown>;
