import type { RequestHandler } from '@sveltejs/kit'; import type { NotificationService } from '../service.js'; /** * Notification CRUD: the server half of `createNotificationStore` (and with * it ``/``). Returns four route-shaped * handler groups matching the paths the client store calls: * * ```ts * const notifications = createNotificationsHandlers(service); * // src/routes/api/notifications/+server.ts * export const GET = notifications.list.GET; * // src/routes/api/notifications/read-all/+server.ts * export const POST = notifications.readAll.POST; * // src/routes/api/notifications/[id]/read/+server.ts * export const POST = notifications.read.POST; * // src/routes/api/notifications/[id]/+server.ts * export const DELETE = notifications.item.DELETE; * ``` * * (The static `read-all` route takes precedence over the `[id]` param route, * so all four share the base path.) Every method derives the caller from * `locals.user` — set by the auth handle — and goes through the * ownership-scoped `NotificationService` methods, so the id in the URL alone * can never read or mutate another user's rows. */ export declare function createNotificationsHandlers(service: NotificationService): { list: { GET: RequestHandler; }; readAll: { POST: RequestHandler; }; read: { POST: RequestHandler; }; item: { DELETE: RequestHandler; }; };