/** * ⚠️ DEPRECATED: Auto-API Generation System * * This system is deprecated due to anti-hardcoding policy violations. * All mock functions and hardcoded logic have been removed. * * Use specific entity API endpoints instead: * - /api/v1/{entityType} for list operations * - /api/v1/{entityType}/{id} for single operations * * @deprecated Use registry-based specific endpoints instead */ import { NextRequest, NextResponse } from 'next/server'; import { z } from 'zod'; import type { EntityConfig } from './types'; export interface APIGeneratorOptions { enableAuth?: boolean; enableRateLimit?: boolean; enableCORS?: boolean; enableChildEntities?: boolean; customValidation?: Record; customMiddleware?: APIMiddleware[]; } export interface APIMiddleware { name: string; execute: (req: NextRequest, context: APIContext) => Promise; } export interface APIContext { entityName: string; entityConfig: EntityConfig; user?: Record; action: 'create' | 'read' | 'update' | 'delete'; data?: Record; } export interface GeneratedAPIResponse { data?: unknown; children?: Record; meta?: { total?: number; page?: number; limit?: number; hasMore?: boolean; }; error?: string; validationErrors?: Record; } /** * Generate CRUD API routes for an entity */ export declare function generateEntityAPI(entityName: string, options?: APIGeneratorOptions): { GET: (request: NextRequest, context?: { params?: { id?: string; }; }) => Promise | NextResponse>; POST: (request: NextRequest) => Promise>; PATCH: (request: NextRequest, context?: { params?: { id?: string; }; }) => Promise | NextResponse<{ error: string; }>>; DELETE: (request: NextRequest, context?: { params?: { id?: string; }; }) => Promise | NextResponse<{ success: boolean; }>>; }; //# sourceMappingURL=api-generator.d.ts.map