// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL // This file is automatically generated. DO NOT EDIT /** * VersionService exposes local logical-file version control to the Wails * frontend. * @module */ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: Unused imports import { Call as $Call, CancellablePromise as $CancellablePromise } from "@wailsio/runtime"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: Unused imports import * as $models from "./models.js"; /** * Checkout loads a historical logical snapshot into the working tree. V1 * keeps main HEAD unchanged; committing afterwards creates a new commit on * the current main line. */ export function Checkout(commitID: string): $CancellablePromise<$models.VersionStatus | null> { return $Call.ByID(1400545369, commitID); } /** * Commit freezes the current working tree as one commit without saving the * packed PVF artifact. */ export function Commit(message: string): $CancellablePromise<$models.VersionCommit | null> { return $Call.ByID(1256491804, message); } /** * Diff returns a single commit change, including logical text where possible. */ export function Diff(commitID: string, path: string): $CancellablePromise<$models.VersionFileDiff | null> { return $Call.ByID(2239054202, commitID, path); } /** * DiffWorking returns the current worktree change for one path relative to * HEAD. The current after-state is read from the in-memory archive, so the * call does not require saving the packed PVF artifact first. */ export function DiffWorking(path: string): $CancellablePromise<$models.VersionFileDiff | null> { return $Call.ByID(851505177, path); } /** * Discard restores the current HEAD into the in-memory working archive. */ export function Discard(): $CancellablePromise<$models.VersionStatus | null> { return $Call.ByID(4038705953); } /** * ExportCommitFilesDialog exports the files touched by one commit. Add/modify * entries use their after-state; deleted entries use their before-state so the * exported directory represents every file involved in that version. */ export function ExportCommitFilesDialog(commitID: string): $CancellablePromise { return $Call.ByID(3937038033, commitID); } /** * History returns main-branch commits from newest to oldest. */ export function History(cursor: number, limit: number): $CancellablePromise<$models.VersionHistoryPage | null> { return $Call.ByID(1340059775, cursor, limit); } /** * Initialize creates the sidecar repository for the currently opened PVF. */ export function Initialize(): $CancellablePromise<$models.VersionStatus | null> { return $Call.ByID(2857664619); } /** * ListChanges lists the current working-tree changes relative to HEAD. */ export function ListChanges(cursor: number, limit: number): $CancellablePromise<$models.VersionChangePage | null> { return $Call.ByID(4290716790, cursor, limit); } /** * ListCommitChanges lists the compact path changes belonging to one commit. */ export function ListCommitChanges(commitID: string, cursor: number, limit: number): $CancellablePromise<$models.VersionChangePage | null> { return $Call.ByID(1789693609, commitID, cursor, limit); } /** * Remove disables version control for the current artifact and deletes only * its sidecar repository. The loaded PVF and its in-memory edits are kept. */ export function Remove(): $CancellablePromise<$models.VersionStatus | null> { return $Call.ByID(4079566109); } /** * RestorePath restores one changed path to the current HEAD. It only * materializes the selected path and records the operation in the existing * in-memory undo stack. */ export function RestorePath(path: string): $CancellablePromise<$models.VersionStatus | null> { return $Call.ByID(835923498, path); } /** * Status returns the current version session without modifying disk state. */ export function Status(): $CancellablePromise<$models.VersionStatus> { return $Call.ByID(3521289999); } /** * Undo reverses the most recent uncommitted mutation as one atomic operation. */ export function Undo(): $CancellablePromise<$models.VersionStatus | null> { return $Call.ByID(636219343); }