import type { CslItem, SupersededReason } from "../../core/csl-json/types.js"; import type { ILibrary } from "../../core/library-interface.js"; import { type DuplicateGroup, type DuplicateKeyType } from "../duplicate/scanner.js"; export interface DuplicatesOperationOptions { /** Key types to group by (default: DEFAULT_DUPLICATE_KEY_TYPES) */ by?: readonly DuplicateKeyType[]; /** Report groups already linked by superseded pointers */ includeResolved?: boolean; } export interface DuplicatesOperationResult { /** Duplicate groups, largest first */ groups: DuplicateGroup[]; /** How many references were examined */ scanned: number; } /** * Scan the whole library for duplicate references. * * @param library - The library to scan * @param options - Key types and resolved-group handling */ export declare function findDuplicates(library: ILibrary, options?: DuplicatesOperationOptions): Promise; export interface MarkGroupResult { /** Citation keys that now point at the keeper */ marked: string[]; /** Members that could not be marked, with the reason */ failed: { id: string; error: string; }[]; } /** * Point every member of a group at the chosen keeper. * * Each member goes through `deprecateReference`, so the existence and cycle checks apply here * exactly as they do for a hand-typed `ref deprecate` — a group assembled from a stale scan * cannot write a pointer the command itself would have refused. * * @param library - The library to modify * @param keeper - The reference to keep citing * @param others - The members to mark; the keeper is skipped if present * @param reason - Recorded as custom.superseded_reason (default: 'duplicate') */ export declare function markGroupDuplicates(library: ILibrary, keeper: CslItem, others: CslItem[], reason?: SupersededReason): Promise; //# sourceMappingURL=duplicates.d.ts.map