/** * Email Provider Default API Route Handler for Next.js * * Sets a specific email provider as the default. The previous default * provider is unset atomically in a transaction. * Re-export in your Next.js application at /api/email-providers/[id]/default. * * @example * ```typescript * // In your Next.js app: app/api/email-providers/[id]/default/route.ts * export { PATCH } from 'nextly/api/email-providers-default'; * ``` * * @module api/email-providers-default */ interface RouteContext { params: Promise<{ id: string; }>; } /** * PATCH handler for setting an email provider as the default. * * Requires authentication. Unsets the previous default provider and sets * the specified provider as default in a single transaction. * * No request body required; the provider ID is in the URL path. * * Response Codes: * - 200 OK: Provider set as default successfully * - 401 Unauthorized: Authentication required * - 404 Not Found: Provider with ID does not exist * - 500 Internal Server Error: Operation failed * * Response: `{ "data": EmailProvider }`; updated provider with `isDefault: * true` and masked configuration. */ declare const PATCH: (request: Request, context: RouteContext) => Promise; export { PATCH };