Files
nupst/ts/interfaces/nupst-accessor.ts

42 lines
831 B
TypeScript

import type { NupstDaemon } from '../daemon.ts';
/**
* Update status information
*/
export interface IUpdateStatus {
currentVersion: string;
latestVersion: string;
updateAvailable: boolean;
}
/**
* Interface for accessing Nupst functionality from SNMP manager
* This breaks the circular dependency between Nupst and NupstSnmp
*/
export interface INupstAccessor {
/**
* Get the daemon manager for background monitoring
*/
getDaemon(): NupstDaemon;
/**
* Get the current version of NUPST
*/
getVersion(): string;
/**
* Check if an update is available
*/
checkForUpdates(): Promise<boolean>;
/**
* Get update status information
*/
getUpdateStatus(): IUpdateStatus;
/**
* Log the current version and update status
*/
logVersionInfo(checkForUpdates?: boolean): void;
}