/** * Email Provider Test API Route Handler for Next.js * * Sends a test email through a specific provider to verify configuration. * Re-export in your Next.js application at /api/email-providers/[id]/test. * * @example * ```typescript * // In your Next.js app: app/api/email-providers/[id]/test/route.ts * export { POST } from 'nextly/api/email-providers-test'; * ``` * * @module api/email-providers-test */ interface RouteContext { params: Promise<{ id: string; }>; } /** * POST handler for testing an email provider. * * Sends a test email through the specified provider to verify that * the configuration (credentials, host, etc.) is correct. * * Requires authentication. Provider must be active. * * Request Body (optional): * - email: Email address to send the test email to (optional; falls back * to the provider's `fromEmail`) * * Response Codes: * - 200 OK: Test completed (check `success` field for result) * - 400 Bad Request: Invalid input * - 401 Unauthorized: Authentication required * - 404 Not Found: Provider with ID does not exist * - 500 Internal Server Error: Test failed * * Response: `{ "data": { "success": boolean, "error"?: string } }` */ declare const POST: (request: Request, context: RouteContext) => Promise; export { POST };