import type { NextApiRequest, NextApiResponse } from 'next';
/**
 * HTTP handler for `POST /api/crud/:collection/bulk`.
 *
 * Wire contract: the request body is parsed with `BulkRequestSchema` and
 * the response body with `BulkResponseSchema`. On success, returns
 * `{ insertedIds, updatedIds, deletedIds }` — each array preserves the
 * input order of its bucket so clients can zip returned ids back onto
 * optimistic cache entries.
 *
 * Semantics (non-negotiable — see `BULK_CRUD_TODO.md`):
 *   1. Atomic — a single Firestore transaction wraps every write.
 *   2. Collision rejection — same id in `updates` + `deletes`, or
 *      `inserts` + `updates`, throws `BulkCollisionError` before any
 *      read or write.
 *   3. Empty bulk — `{}` short-circuits to a zeroed response; no DB work.
 *   4. Order preserved — output arrays mirror the input order.
 *
 * The collection name is read from `req.query.collection` (Next.js
 * dynamic route segment `[collection]`).
 *
 * @example
 * ```typescript
 * // File: pages/api/crud/[collection]/bulk.ts (Next.js Pages Router)
 * export { default } from '@donotdev/functions/vercel';
 * ```
 *
 * @version 0.2.0
 * @since 0.2.0
 */
export default function handler(req: NextApiRequest, res: NextApiResponse): Promise<void>;
