import type { ApplyPatchSpec } from '../../modify/apply-patch.js'; import type { ReplaceVersionSelector } from '../../modify/replace-version.js'; import type { ReplaceRangeEdgeKind } from '../../modify/replace-range.js'; import { type EdgeKind, type Graph, type GraphChange, type NodeId } from './graph.js'; import type { GraphOperationResult, OperationOptions } from './operation.js'; export type { ApplyPatchSpec, ReplaceVersionSelector }; export type { ReplaceRangeEdgeKind }; export type Modification = Readonly<{ kind: 'replaceVersion'; selector: ReplaceVersionSelector; to: string; }> | Readonly<{ kind: 'pinOverride'; name: string; to: string; }> | Readonly<{ kind: 'replaceRange'; parent: NodeId; name: string; to: string; from?: string; edge?: ReplaceRangeEdgeKind; }> | Readonly<{ kind: 'addDependency'; parent: NodeId; name: string; range: string; edge: Exclude; }> | Readonly<{ kind: 'removeDependency'; parent: NodeId; name: string; edge?: EdgeKind; }> | Readonly<{ kind: 'applyPatch'; patch: ApplyPatchSpec; bytes: Uint8Array | string; }> | Readonly<{ kind: 'filterLicense'; allow?: readonly string[]; deny?: readonly string[]; mode?: 'diagnostic-only' | 'strict'; }>; export interface ModifyOptions extends OperationOptions { } export interface GraphFrontier { readonly added: ReadonlySet; readonly orphaned: ReadonlySet; } export interface ModifyResult extends GraphOperationResult { readonly applied: readonly GraphChange[]; readonly frontier: GraphFrontier; } export declare function modify(graph: Graph, change: Modification | readonly Modification[], options: ModifyOptions): Promise;