/**
 * External API Generator
 *
 * Generates external REST APIs for entities with automatic auth, rate limiting,
 * pagination, filtering, and CORS handling.
 */
import { NextRequest, NextResponse } from 'next/server';
import { APIGeneratorOptions } from './api-generator';
import type { EntityConfig } from './types';
export interface ExternalAPIOptions extends APIGeneratorOptions {
    enableAPIKeyAuth?: boolean;
    enableRateLimit?: boolean;
    enableCORS?: boolean;
    rateLimitConfig?: {
        windowMs: number;
        maxRequests: number;
    };
    corsOptions?: {
        origins: string[];
        methods: string[];
        headers: string[];
    };
}
export interface ExternalAPIContext {
    entityName: string;
    entityConfig: EntityConfig;
    apiKey?: string;
    clientId?: string;
    userAgent?: string;
    ip?: string;
}
/**
 * Generate external REST API for an entity with v1 prefix
 */
export declare function generateExternalAPI(entityName: string, options?: ExternalAPIOptions): {
    GET: (request: NextRequest, context?: {
        params?: {
            id?: string;
        };
    }) => Promise<NextResponse<unknown>>;
    POST: (request: NextRequest, context?: {
        params?: {
            id?: string;
        };
    }) => Promise<NextResponse<unknown>>;
    PATCH: (request: NextRequest, context?: {
        params?: {
            id?: string;
        };
    }) => Promise<NextResponse<unknown>>;
    DELETE: (request: NextRequest, context?: {
        params?: {
            id?: string;
        };
    }) => Promise<NextResponse<unknown>>;
    OPTIONS: (request: NextRequest) => Promise<NextResponse<unknown>>;
};
/**
 * Generate OpenAPI/Swagger documentation for entity
 */
export declare function generateOpenAPISpec(entityName: string): {
    openapi: string;
    info: {
        title: string;
        version: string;
        description: string;
    };
    paths: Record<string, Record<string, unknown>>;
    components: {
        schemas: {
            [x: string]: {
                type: string;
                properties: Record<string, Record<string, unknown>>;
                required: string[];
            };
        };
        securitySchemes: {
            ApiKeyAuth: {
                type: string;
                in: string;
                name: string;
            };
        };
    };
    security: {
        ApiKeyAuth: any[];
    }[];
};
//# sourceMappingURL=external-api-generator.d.ts.map