import type { CslItem } from "../../core/csl-json/types.js"; import type { ILibrary, IdentifierType } from "../../core/library-interface.js"; /** * Options for updateReference operation */ export interface UpdateOperationOptions { /** Reference ID or UUID */ identifier: string; /** Identifier type: 'id' (default), 'uuid', 'doi', 'pmid', or 'isbn' */ idType?: IdentifierType; /** Partial updates to apply to the reference */ updates: Partial; /** How to handle ID collision: 'fail' (default) or 'suffix' */ onIdCollision?: "fail" | "suffix"; } /** * Result of updateReference operation */ export interface UpdateOperationResult { /** Whether the update was successful */ updated: boolean; /** The updated item (if successful) */ item?: CslItem; /** The original item before update (when item is available) */ oldItem?: CslItem; /** Error type when update failed (only when updated=false) */ errorType?: "not_found" | "id_collision"; /** True if the ID was changed due to collision resolution */ idChanged?: boolean; /** The new ID after collision resolution (only when idChanged=true) */ newId?: string; } /** * Update a reference in the library. * * @param library - The library to update * @param options - Update options including identifier, updates, and collision handling * @returns Result indicating success and the updated item */ export declare function updateReference(library: ILibrary, options: UpdateOperationOptions): Promise; //# sourceMappingURL=update.d.ts.map