// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

/**
 * Service is the Wails-bound facade over the registry.  It deliberately
 * exposes only the read and control surface — producers get a *Handle
 * through the registry instead, so the frontend cannot invent jobs.
 * @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";

/**
 * CancelJob abandons a job.
 */
export function CancelJob(id: string): $CancellablePromise<void> {
    return $Call.ByID(680141523, id);
}

/**
 * ClearFinishedJobs removes every terminal job from the list.
 */
export function ClearFinishedJobs(): $CancellablePromise<void> {
    return $Call.ByID(4219744941);
}

/**
 * DismissJob removes a single finished job from the list.
 */
export function DismissJob(id: string): $CancellablePromise<void> {
    return $Call.ByID(1904307161, id);
}

/**
 * GetJobLog returns the retained log tail for one job.
 */
export function GetJobLog(id: string): $CancellablePromise<$models.LogEntry[] | null> {
    return $Call.ByID(441057229, id);
}

/**
 * GetJobs returns every known job — active first by registration order,
 * including recently finished ones so the panel can show outcomes.
 */
export function GetJobs(): $CancellablePromise<$models.Job[] | null> {
    return $Call.ByID(3979035366);
}

/**
 * PauseJob asks the owning subsystem to pause a job.  Returns
 * immediately; the job reports "paused" once it actually stops.
 */
export function PauseJob(id: string): $CancellablePromise<void> {
    return $Call.ByID(4094353111, id);
}

/**
 * ResumeJob continues a paused job.
 */
export function ResumeJob(id: string): $CancellablePromise<void> {
    return $Call.ByID(3937701508, id);
}
