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. * * None of the four carries a rate limit, and that is the decision rather than * an omission: reading, flipping a read flag and removing a row the caller * already owns create nothing, verify no secret and reach no third party, so * what they touch is bounded by what the caller owns — the clause of the * package's rule for authenticated writes that carries no limit (AUTH.md → * Rate-Limiting, Lockout & Route Scope). The request rate of an authenticated * caller is the edge's brake, not this package's. Pinned in * `notifications.test.ts`. */ export declare function createNotificationsHandlers(service: NotificationService): { list: { GET: RequestHandler; }; readAll: { POST: RequestHandler; }; read: { POST: RequestHandler; }; item: { DELETE: RequestHandler; }; };