mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
* update actions response types and partially implement in UI * further remove diagnostic ui * convert action response nested to array * prepare action res modal for Alex * ad dproperties action for Bitcoin * feat: add action success dialog (#2753) * feat: add action success dialog * mocks for string action res and hide properties from actions page --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> * return null * remove properties from backend * misc fixes * make severity separate argument * rename ActionRequest to ActionRequestOptions * add clearRequests * fix s9pk build * remove config and properties, introduce action requests * better ux, better moocks, include icons * fix dependency types * add variant for versionCompat * fix dep icon display and patch operation display * misc fixes * misc fixes * alpha 12 * honor provided input to set values in action * fix: show full descriptions of action success items (#2758) * fix type * fix: fix build:deps command on Windows (#2752) * fix: fix build:deps command on Windows * fix: add escaped quotes --------- Co-authored-by: Aiden McClelland <me@drbonez.dev> * misc db compatibility fixes --------- Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: Aiden McClelland <me@drbonez.dev> Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
import { types as T } from "@start9labs/start-sdk"
|
|
import { Effects } from "../Models/Effects"
|
|
import { CallbackHolder } from "../Models/CallbackHolder"
|
|
import { Optional } from "ts-matches/lib/parsers/interfaces"
|
|
|
|
export type Procedure =
|
|
| "/packageInit"
|
|
| "/packageUninit"
|
|
| "/backup/create"
|
|
| "/backup/restore"
|
|
| `/actions/${string}/getInput`
|
|
| `/actions/${string}/run`
|
|
|
|
export type ExecuteResult =
|
|
| { ok: unknown }
|
|
| { err: { code: number; message: string } }
|
|
export type System = {
|
|
containerInit(effects: T.Effects): Promise<void>
|
|
|
|
start(effects: T.Effects): Promise<void>
|
|
stop(): Promise<void>
|
|
|
|
packageInit(effects: Effects, timeoutMs: number | null): Promise<void>
|
|
packageUninit(
|
|
effects: Effects,
|
|
nextVersion: Optional<string>,
|
|
timeoutMs: number | null,
|
|
): Promise<void>
|
|
|
|
createBackup(effects: T.Effects, timeoutMs: number | null): Promise<void>
|
|
restoreBackup(effects: T.Effects, timeoutMs: number | null): Promise<void>
|
|
runAction(
|
|
effects: Effects,
|
|
actionId: string,
|
|
input: unknown,
|
|
timeoutMs: number | null,
|
|
): Promise<T.ActionResult | null>
|
|
getActionInput(
|
|
effects: Effects,
|
|
actionId: string,
|
|
timeoutMs: number | null,
|
|
): Promise<T.ActionInput | null>
|
|
|
|
exit(): Promise<void>
|
|
}
|
|
|
|
export type RunningMain = {
|
|
callbacks: CallbackHolder
|
|
stop(): Promise<void>
|
|
}
|