import type { CslItem, SupersededReason } from "../../core/csl-json/types.js"; import type { ILibrary, IdentifierType } from "../../core/library-interface.js"; /** * Options for the deprecateReference operation. * * Exactly one of `target` / `unset` is meaningful: `target` sets the mark, `unset` clears it. * The CLI rejects the ambiguous combinations before calling. */ export interface DeprecateOperationOptions { /** Reference to mark (or unmark) */ identifier: string; /** Identifier type: 'id' (default), 'uuid', 'doi', 'pmid', or 'isbn' */ idType?: IdentifierType; /** Successor identifier, resolved with the same idType */ target?: string; /** Reason recorded in custom.superseded_reason (default: 'other') */ reason?: SupersededReason; /** Clear the mark instead of setting it */ unset?: boolean; } export type DeprecateErrorType = "not_found" | "target_not_found" | "target_has_no_uuid" | "self_reference" | "cycle"; /** * Result of the deprecateReference operation. */ export interface DeprecateResult { /** Whether the library was changed */ applied: boolean; /** The reference after the change (present whenever it was found) */ item?: CslItem; /** The successor the mark points at (set operations only) */ target?: CslItem; /** True when --unset ran against a reference that carried no mark */ noop?: boolean; /** Error type when the operation was rejected */ errorType?: DeprecateErrorType; } /** * Mark a reference as superseded by another, or clear an existing mark. * * @param library - The library to modify * @param options - Identifier, successor, and reason * @returns Result carrying the changed reference, or the reason it was rejected */ export declare function deprecateReference(library: ILibrary, options: DeprecateOperationOptions): Promise; //# sourceMappingURL=deprecate.d.ts.map