import { ConfigService } from "@nestjs/config"; import { Queue } from "bullmq"; import { ClsService } from "nestjs-cls"; import { AiStatus } from "../../../common/enums/ai.status"; import { BaseConfigInterface } from "../../../config/interfaces/base.config.interface"; import { JsonApiService } from "../../../core/jsonapi/services/jsonapi.service"; import { AbstractService } from "../../../core/neo4j/abstracts/abstract.service"; import { ChunkService } from "../../chunk/services/chunk.service"; import { ChunkerService } from "../../chunker/services/chunker.service"; import { HandbookPage, HandbookPageDescriptor } from "../entities/handbook-page"; import { HandbookPageRepository } from "../repositories/handbook-page.repository"; export declare class HandbookPageService extends AbstractService { private readonly handbookPageRepository; private readonly chunkService; private readonly chunkerService; private readonly chunkQueue; protected readonly descriptor: import("../../..").EntityDescriptor; private readonly jobNames; constructor(jsonApiService: JsonApiService, handbookPageRepository: HandbookPageRepository, clsService: ClsService, chunkService: ChunkService, chunkerService: ChunkerService, chunkQueue: Queue, configService: ConfigService); /** * Delete a page and the chunks hanging off it. * * Overridden for two reasons, both of which break the inherited version: * * 1. `AbstractService.delete` gates on `(companyId ?? "") !== entity.company?.id` * (abstract.service.ts:272). HandbookPage is `isCompanyScoped: false`, so * `entity.company` is always undefined, and an administrator has no * company either — `"" !== undefined` is true and EVERY delete 403s. Same * reason `HowToService` (app fork) and `CompanyService` override it. * 2. The repository's `DETACH DELETE` drops the HAS_CHUNK edges but leaves * the Chunk nodes behind. `ChunkService.deleteChunks` is what also resizes * key-concept relationship weights and clears disconnected atomic facts, * so it has to run first or the graph keeps orphans that still answer * retrieval. * * The ingest's own deletion pass calls THIS method rather than the * repository, so both routes into deleting a page behave identically. */ delete(params: { id: string; }): Promise; updateAiStatus(params: { id: string; aiStatus: AiStatus; }): Promise; /** * Mark in-progress, drop prior chunks, chunk the markdown, enqueue one job per * chunk. Identical to HowToService._chunkAndQueue except the markdown arrives * from a file rather than from a BlockNote document. */ chunkAndQueue(params: { handbookPageId: string; markdown: string; title: string; }): Promise; } //# sourceMappingURL=handbook-page.service.d.ts.map