import { ConversionJob } from '@prisma/client'; /** * Contract between the shared conversion worker and the import pipeline, kept in * its own module so neither imports the other's file (the worker resolves the * processor lazily via this token, breaking what would otherwise be a cycle: * import.service → conversion-job.service → conversion-worker.service). */ export const IMPORT_PROCESSOR = Symbol('IMPORT_PROCESSOR'); export interface ImportProcessor { /** Run one import job to completion, recording the created page on the job or * throwing a ConversionError for the worker's retry/fail policy. */ run(job: ConversionJob): Promise; } /** True for a job the import pipeline processes rather than the plain pandoc * byte→byte path (export, #62/#65). */ export function isImportKind(kind: string): boolean { return kind.startsWith('import_'); }