import { Ct as ContentSchema, cn as TermRef, t as Actor } from "./authz-CFBezbW-.js";
import { Querier, TransactionalDatabase } from "@platform-modules/db";
//#region src/taxonomy.d.ts
declare const MAX_TERM_DEPTH = 6;
declare class TermConflictError extends Error {
  readonly taxonomy: string;
  readonly slug: string;
  readonly parentId: string | null;
  readonly name = "TermConflictError";
  constructor(taxonomy: string, slug: string, parentId: string | null);
}
declare class TermCycleError extends Error {
  readonly termId: string;
  readonly newParentId: string;
  readonly name = "TermCycleError";
  constructor(termId: string, newParentId: string);
}
declare class TermHasChildrenError extends Error {
  readonly termId: string;
  readonly name = "TermHasChildrenError";
  constructor(termId: string);
}
declare class TermNotFoundError extends Error {
  readonly selector: string;
  readonly name = "TermNotFoundError";
  constructor(selector: string);
}
declare class TermValidationError extends Error {
  readonly field: string;
  readonly detail: string;
  readonly name = "TermValidationError";
  constructor(field: string, detail: string);
}
/** Idempotent additive DDL for taxonomy tables (spec §3 / §5 step 1). */
declare const contentTaxonomyMigrationSql: () => string;
declare function createTerm(db: Querier<ContentSchema>, input: {
  taxonomy: string;
  slug: string;
  name: string;
  parentId?: string | null;
}, actor: Actor): Promise<TermRef>;
declare function updateTerm(db: Querier<ContentSchema>, id: string, patch: {
  name?: string;
  slug?: string;
}, actor: Actor): Promise<TermRef>;
declare function listTerms(db: Querier<ContentSchema>, taxonomy: string): Promise<TermRef[]>;
declare function moveTerm(db: TransactionalDatabase<ContentSchema>, id: string, newParentId: string | null, actor: Actor): Promise<TermRef>;
declare function deleteTerm(db: Querier<ContentSchema>, id: string, actor: Actor): Promise<void>;
declare function validateTermIdsExist(db: Querier<ContentSchema>, termIds: string[]): Promise<void>;
declare function replaceEntryTerms(db: Querier<ContentSchema>, entryId: string, termIds: string[]): Promise<void>;
declare function termsForEntry(db: Querier<ContentSchema>, entryId: string): Promise<TermRef[]>;
declare function assignTerms(db: Querier<ContentSchema>, entryId: string, termIds: string[], actor: Actor): Promise<TermRef[]>;
//#endregion
export { MAX_TERM_DEPTH, TermConflictError, TermCycleError, TermHasChildrenError, TermNotFoundError, TermValidationError, assignTerms, contentTaxonomyMigrationSql, createTerm, deleteTerm, listTerms, moveTerm, replaceEntryTerms, termsForEntry, updateTerm, validateTermIdsExist };