import type { RenameVersionResult, SqlClient } from "../../types.js"; import { type FilesystemOpsContext } from "./context.js"; /** * Rename the current version's label. With `swap: true`, atomically move an * existing label out of the way (renaming the displaced version to a * generated `-prev-YYYYMMDDHHMMSS-` label) and assign that * label to the current version. The current version's ID does not change, * so `cachedVersionId` is preserved. * * If `newLabel` already equals the current label, the call is a no-op and * returns `{ label: newLabel }` without touching the database. * * If `newLabel` is taken by another version and `swap !== true`, throws. * * The instance's `version` getter is updated only after the surrounding * SQL commits. When called inside `transaction(fn)`, the outer instance's * label is updated only if the outer transaction commits successfully; a * rollback leaves it at the prior label. */ export declare const renameVersion: (ctx: FilesystemOpsContext, newLabel: string, opts?: { swap?: boolean; }) => Promise; export declare function renameVersionInTransaction(ctx: FilesystemOpsContext, tx: SqlClient, newLabel: string, swap: boolean): Promise; //# sourceMappingURL=rename-version.d.ts.map