BREAKING CHANGE(snmp): refactor: update SNMP type definitions and interface names for consistency

This commit is contained in:
2025-03-25 10:21:21 +00:00
parent 70c16fa0a6
commit ecfd171f97
9 changed files with 41 additions and 35 deletions

View File

@ -1,4 +1,4 @@
import type { OIDSet, UpsModel } from './types.js';
import type { IOidSet, TUpsModel } from './types.js';
/**
* OID sets for different UPS models
@ -8,7 +8,7 @@ export class UpsOidSets {
/**
* OID sets for different UPS models
*/
private static readonly UPS_OID_SETS: Record<UpsModel, OIDSet> = {
private static readonly UPS_OID_SETS: Record<TUpsModel, IOidSet> = {
// Cyberpower OIDs for RMCARD205 (based on CyberPower_MIB_v2.11)
cyberpower: {
POWER_STATUS: '1.3.6.1.4.1.3808.1.1.1.4.1.1.0', // upsBaseOutputStatus (2=online, 3=on battery)
@ -57,7 +57,7 @@ export class UpsOidSets {
* @param model UPS model name
* @returns OID set for the model
*/
public static getOidSet(model: UpsModel): OIDSet {
public static getOidSet(model: TUpsModel): IOidSet {
return this.UPS_OID_SETS[model];
}