// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL // This file is automatically generated. DO NOT EDIT /** * ScriptService executes user scripts against an isolated archive stage and * exposes the retained preview plan to the 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"; /** * Apply commits exactly the selected changed rows from one script plan. Rows * are addressed by ChangeKey because created and deleted entries shift the * entry indexes the other rows were previewed with. */ export function Apply(planID: string, changeKeys: string[] | null): $CancellablePromise<$models.ScriptApplyResult> { return $Call.ByID(1069361246, planID, changeKeys); } /** * Cancel requests cancellation of the active script. It is idempotent. */ export function Cancel(): $CancellablePromise { return $Call.ByID(1006017148); } /** * Compile validates script syntax without reading the current archive. */ export function Compile(source: string): $CancellablePromise<$models.ScriptCompileResult> { return $Call.ByID(190666999, source); } export function Discard(planID: string): $CancellablePromise { return $Call.ByID(2392854112, planID); } /** * IsRunning reports whether a script call is currently executing. */ export function IsRunning(): $CancellablePromise { return $Call.ByID(473827193); } export function ListScripts(): $CancellablePromise<($models.ScriptFile | null)[] | null> { return $Call.ByID(215077054); } export function LoadScript(name: string): $CancellablePromise { return $Call.ByID(306185925, name); } export function OpenScriptDirectory(): $CancellablePromise { return $Call.ByID(2089810056); } /** * PreviewPage returns one page of preview rows, optionally narrowed to rows * whose path contains filter (case-insensitive). Filtering happens here rather * than in the UI so pagination and the matched total stay consistent: a filter * that matches only later pages still reports and pages its matches correctly. */ export function PreviewPage(planID: string, filter: string, cursor: number, limit: number): $CancellablePromise<$models.ScriptPreviewPage | null> { return $Call.ByID(3664869185, planID, filter, cursor, limit); } /** * Run executes the script against a transaction and retains a diff plan. It * never changes the live archive. The Wails context parameter is hidden from * generated TypeScript bindings and is cancelled by the explicit Cancel call * or by the caller closing the cancellable promise. */ export function Run(request: $models.ScriptRunRequest): $CancellablePromise<$models.ScriptRunResult> { return $Call.ByID(3354473343, request); } export function SaveScript(name: string, source: string): $CancellablePromise { return $Call.ByID(4194335044, name, source); } export function ScriptDirectory(): $CancellablePromise { return $Call.ByID(1815875880); } /** * SelectableChangeKeys returns the change keys of every row matching filter * that can be applied. The frontend uses this so "apply selected" covers the * whole filtered set even when only the loaded pages were ever previewed. The * file set key is filter-independent: a fileset name is not an archive path. */ export function SelectableChangeKeys(planID: string, filter: string): $CancellablePromise { return $Call.ByID(503571914, planID, filter); }