const deviceFieldMap = {
device_name: "name",
device_hard_id: "device_id",
device_ip: "ip",
device_type: "type",
ip_address: "ip",
mac_address: "mac",
device_mac: "mac",
core_version: "firmware_core_version",
};
export function unifyDeviceFields(device) {
const normalized = {};
for (const [field, value] of Object.entries(device || {})) {
normalized[deviceFieldMap[field] || field] = value;
}
return normalized;
}