/**
 * @fileoverview CORS utilities for Vercel API
 * @description CORS configuration and handling for Vercel functions
 *
 * @version 0.1.0
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
import type { NextApiRequest, NextApiResponse } from 'next';
/**
 * CORS configuration for Vercel functions.
 *
 * **Architecture decision — CORS wildcard (`*`) as framework default:**
 * The wildcard origin is an intentional development-convenience default, not a
 * security oversight. Consumer apps MUST override `allowedOrigins` in their
 * deployment configuration for production environments. The framework provides
 * `configureCors({ allowedOrigins: ['https://myapp.example'] })` for this purpose.
 *
 * C2: Allow-Credentials:true is incompatible with wildcard origin per the Fetch spec.
 * Credentialed requests require an explicit origin. Removed Allow-Credentials header so
 * the wildcard origin remains valid. Consumers that need credentialed cross-origin requests
 * must replace '*' with their specific origin and re-add Allow-Credentials:true.
 *
 * @version 0.1.0
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare const corsHeaders: {
    'Access-Control-Allow-Origin': string;
    'Access-Control-Allow-Methods': string;
    'Access-Control-Allow-Headers': string;
    'Access-Control-Max-Age': string;
};
/**
 * Handle CORS preflight requests
 *
 * @version 0.1.0
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function handleCors(req: NextApiRequest, res: NextApiResponse): boolean;
/**
 * Wrapper for Vercel API functions to automatically handle CORS
 *
 * @version 0.1.0
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function withCors(handler: (req: NextApiRequest, res: NextApiResponse) => Promise<void>): (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
