Files

89 lines
2.0 KiB
TypeScript
Raw Permalink Normal View History

2026-05-07 15:53:15 +00:00
export type TBaseOsRuntimeLevel = 'app-layer' | 'host-os' | 'target-state';
export type TCloudlyConnectionStatus =
| 'not-configured'
| 'connecting'
| 'connected'
| 'failed';
export interface IBaseRunnerConfig {
cloudlyUrl?: string;
joinToken?: string;
nodeToken?: string;
nodeId?: string;
statePath: string;
heartbeatIntervalMs: number;
supervisorAddress?: string;
supervisorApiKey?: string;
2026-05-07 20:33:14 +00:00
preloadTargetStatePath?: string;
2026-05-07 15:53:15 +00:00
}
export interface IBaseRunnerState {
nodeId: string;
nodeToken?: string;
2026-05-07 20:33:14 +00:00
lastTargetStateHash?: string;
lastTargetStateAppliedAt?: number;
lastRelease?: string;
lastReleaseUpdateTriggeredAt?: number;
2026-05-07 15:53:15 +00:00
createdAt: number;
updatedAt: number;
}
export interface IBalenaDeviceState {
api_port?: number;
ip_address?: string;
mac_address?: string;
commit?: string;
status?: string;
os_version?: string;
supervisor_version?: string;
update_pending?: boolean;
update_downloaded?: boolean;
update_failed?: boolean;
download_progress?: number | null;
[key: string]: unknown;
}
export interface IBalenaStateStatus {
status?: string;
appState?: string;
overallDownloadProgress?: number | null;
release?: string;
containers?: Array<Record<string, unknown>>;
images?: Array<Record<string, unknown>>;
[key: string]: unknown;
}
export interface IBaseOsRuntimeInfo {
runtime: 'baseos';
runtimeLevel: TBaseOsRuntimeLevel;
nodeId: string;
cloudlyUrl?: string;
cloudlyConnectionStatus: TCloudlyConnectionStatus;
supervisorAvailable: boolean;
supervisorAddress?: string;
deviceState?: IBalenaDeviceState;
stateStatus?: IBalenaStateStatus;
checkedAt: number;
}
export interface IBaseOsDesiredState {
release?: string;
targetState?: Record<string, unknown>;
updatedAt?: number;
}
export interface ICloudlyRegisterResult {
nodeId?: string;
nodeToken?: string;
accepted: boolean;
message?: string;
2026-05-07 20:33:14 +00:00
desiredState?: IBaseOsDesiredState;
2026-05-07 15:53:15 +00:00
}
export interface ICloudlyHeartbeatResult {
accepted: boolean;
message?: string;
desiredState?: IBaseOsDesiredState;
}