export type TBaseOsRuntimeLevel = 'app-layer' | 'host-os' | 'target-state'; export type TBaseOsCloudlyConnectionStatus = | 'not-configured' | 'connecting' | 'connected' | 'failed'; 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>; images?: Array>; [key: string]: unknown; } export interface IBaseOsRuntimeInfo { runtime: 'baseos'; runtimeLevel: TBaseOsRuntimeLevel; nodeId: string; cloudlyUrl?: string; cloudlyConnectionStatus: TBaseOsCloudlyConnectionStatus; supervisorAvailable: boolean; supervisorAddress?: string; deviceState?: IBalenaDeviceState; stateStatus?: IBalenaStateStatus; checkedAt: number; } export interface IBaseOsDesiredState { release?: string; targetState?: Record; updatedAt?: number; } export interface IBaseOsNode { id: string; data: { runtimeInfo: IBaseOsRuntimeInfo; desiredState?: IBaseOsDesiredState; createdAt: number; updatedAt: number; lastHeartbeatAt?: number; }; } export type TBaseOsImageArchitecture = 'amd64' | 'arm64' | 'rpi'; export type TBaseOsImageBuildStatus = 'queued' | 'building' | 'ready' | 'failed' | 'cancelled'; export interface IBaseOsWifiConfig { ssid: string; password?: string; } export interface IBaseOsImageArtifact { bucketName: string; key: string; filename: string; contentType: string; size: number; sha256: string; createdAt: number; } export interface IBaseOsImageBuild { id: string; data: { status: TBaseOsImageBuildStatus; architecture: TBaseOsImageArchitecture; cloudlyUrl: string; sourceImageUrl?: string; ubuntuVersion?: string; hostname?: string; wifiSsid?: string; sshPublicKey?: string; artifact?: IBaseOsImageArtifact; errorText?: string; logs: string[]; createdAt: number; updatedAt: number; startedAt?: number; completedAt?: number; expiresAt?: number; }; } export interface IBaseOsImageBuildRequest { architecture: TBaseOsImageArchitecture; cloudlyUrl?: string; sourceImageUrl?: string; ubuntuVersion?: string; hostname?: string; wifi?: IBaseOsWifiConfig; sshPublicKey?: string; artifactRetentionMs?: number; } export interface IBaseOsImageDownloadUrl { url: string; expiresAt: number; } export interface IBaseOsRegisterResult { nodeId?: string; nodeToken?: string; accepted: boolean; message?: string; } export interface IBaseOsHeartbeatResult { accepted: boolean; message?: string; desiredState?: IBaseOsDesiredState; }