feat(update): add Onebox self-upgrade flow
This commit is contained in:
@@ -4,7 +4,30 @@
|
||||
|
||||
import type { TPlatformServiceType, TPlatformServiceStatus } from './platform.ts';
|
||||
|
||||
export interface IOneboxUpdateStatus {
|
||||
currentVersion: string;
|
||||
latestVersion: string | null;
|
||||
updateAvailable: boolean;
|
||||
checkedAt: number;
|
||||
releaseUrl: string;
|
||||
changelogUrl: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface IOneboxUpgradeStartResult {
|
||||
accepted: boolean;
|
||||
currentVersion: string;
|
||||
targetVersion: string;
|
||||
message: string;
|
||||
pid?: number;
|
||||
logPath?: string;
|
||||
}
|
||||
|
||||
export interface ISystemStatus {
|
||||
onebox: {
|
||||
version: string;
|
||||
update: IOneboxUpdateStatus;
|
||||
};
|
||||
docker: {
|
||||
running: boolean;
|
||||
version: unknown;
|
||||
|
||||
@@ -13,3 +13,16 @@ export interface IReq_GetSystemStatus extends plugins.typedrequestInterfaces.imp
|
||||
status: data.ISystemStatus;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_StartOneboxUpgrade extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_StartOneboxUpgrade
|
||||
> {
|
||||
method: 'startOneboxUpgrade';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
};
|
||||
response: {
|
||||
upgrade: data.IOneboxUpgradeStartResult;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user