import { FastifyReply } from "fastify"; import { CacheService } from "../../../core/cache/services/cache.service"; import { HandbookThreadMessagePostDTO } from "../dtos/handbook-thread-message-post.dto"; import { HandbookThreadPatchDTO } from "../dtos/handbook-thread-patch.dto"; import { HandbookThreadPostDTO } from "../dtos/handbook-thread-post.dto"; import { HandbookThreadService } from "../services/handbook-thread.service"; /** * Persisted handbook conversations. * * Developer documentation is administrator-only, enforced HERE and not merely * by whatever admin layout a consumer's frontend happens to have. * `AdminJwtAuthGuard` pushes the Administrator role into the required-roles set * for every handler (common/guards/jwt.auth.admin.guard.ts — `_validateRoles`), * so the read routes are gated too. No handler declares a guard of its own: a * handler-level `@UseGuards` is the usual way a route quietly loses the admin * check. * * Every mutation invalidates the whole `handbookthreads` type rather than one * element: a new message reorders the list (the thread list is sorted by * `updatedAt DESC`), so invalidating the single thread would leave a stale list * cached. */ export declare class HandbookThreadController { private readonly handbookThreadService; private readonly cacheService; private readonly crud; constructor(handbookThreadService: HandbookThreadService, cacheService: CacheService); /** * GET /handbookthreads — the current user's threads, most recently updated * first. Owner scoping is enforced by the repository's `buildUserHasAccess` * override, and the ordering is the descriptor default (`updatedAt DESC`). */ findAll(reply: FastifyReply, query: any, search?: string, fetchAll?: boolean, orderBy?: string): Promise; /** * POST /handbookthreads — start a thread from its first question. The * response is the thread with both messages of the opening turn included, * so the client renders the new conversation without a second call. */ create(reply: FastifyReply, body: HandbookThreadPostDTO): Promise; /** * GET /handbookthreads/:handbookThreadId — one thread with every message it * holds, in position order. */ findById(reply: FastifyReply, handbookThreadId: string): Promise; /** * PATCH /handbookthreads/:handbookThreadId — rename. */ patch(reply: FastifyReply, body: HandbookThreadPatchDTO): Promise; /** * DELETE /handbookthreads/:handbookThreadId — remove the thread and its * messages. */ delete(reply: FastifyReply, handbookThreadId: string): Promise; /** * POST /handbookthreads/:handbookThreadId/handbookthreadmessages — ask a * follow-up. Answers with the two new messages as a JSON:API list, the shape * `AssistantController.append` returns. */ appendMessage(reply: FastifyReply, handbookThreadId: string, body: HandbookThreadMessagePostDTO): Promise; } //# sourceMappingURL=handbook-thread.controller.d.ts.map