@enyo-energy/energy-app-sdk 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +216 -0
- package/dist/cjs/connect-ems-api.cjs +2 -0
- package/dist/cjs/connect-ems-api.d.cts +30 -0
- package/dist/cjs/connect-ems-permission.enum.cjs +7 -0
- package/dist/cjs/connect-ems-permission.enum.d.cts +3 -0
- package/dist/cjs/connect-ems-permission.type.cjs +2 -0
- package/dist/cjs/connect-ems-permission.type.d.cts +1 -0
- package/dist/cjs/connect-package-definition.cjs +14 -0
- package/dist/cjs/connect-package-definition.d.cts +57 -0
- package/dist/cjs/energy-app-appliance-type.enum.cjs +14 -0
- package/dist/cjs/energy-app-appliance-type.enum.d.cts +10 -0
- package/dist/cjs/energy-app-package-configuration.cjs +2 -0
- package/dist/cjs/energy-app-package-configuration.d.cts +30 -0
- package/dist/cjs/energy-app-package-definition.cjs +30 -0
- package/dist/cjs/energy-app-package-definition.d.cts +123 -0
- package/dist/cjs/energy-app-permission.type.cjs +21 -0
- package/dist/cjs/energy-app-permission.type.d.cts +18 -0
- package/dist/cjs/enyo-energy-app-sdk.cjs +12 -0
- package/dist/cjs/enyo-energy-app-sdk.d.cts +67 -0
- package/dist/cjs/hems-one-energy-app-sdk.cjs +12 -0
- package/dist/cjs/hems-one-energy-app-sdk.d.cts +64 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusBattery.cjs +388 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusBattery.d.cts +59 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusConnectionHealth.cjs +37 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusConnectionHealth.d.cts +15 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusDataTypeConverter.cjs +130 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusDataTypeConverter.d.cts +41 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusFaultTolerantReader.cjs +49 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusFaultTolerantReader.d.cts +10 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusInverter.cjs +348 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusInverter.d.cts +56 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusMeter.cjs +199 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusMeter.d.cts +26 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusRegisterMapper.cjs +98 -0
- package/dist/cjs/implementations/modbus/EnergyAppModbusRegisterMapper.d.cts +13 -0
- package/dist/cjs/implementations/modbus/interfaces.cjs +29 -0
- package/dist/cjs/implementations/modbus/interfaces.d.cts +202 -0
- package/dist/cjs/implementations/ocpp/ocpp-common.cjs +337 -0
- package/dist/cjs/implementations/ocpp/ocpp-common.d.cts +75 -0
- package/dist/cjs/implementations/ocpp/ocpp16.cjs +51 -0
- package/dist/cjs/implementations/ocpp/ocpp16.d.cts +137 -0
- package/dist/cjs/implementations/ocpp/ocpp201.cjs +84 -0
- package/dist/cjs/implementations/ocpp/ocpp201.d.cts +215 -0
- package/dist/cjs/index.cjs +117 -0
- package/dist/cjs/index.d.cts +56 -0
- package/dist/cjs/mockConnectEmsApi.cjs +167 -0
- package/dist/cjs/mockConnectEmsApi.d.cts +10 -0
- package/dist/cjs/packages/connect-appliance.cjs +2 -0
- package/dist/cjs/packages/connect-appliance.d.cts +24 -0
- package/dist/cjs/packages/connect-http-api.cjs +2 -0
- package/dist/cjs/packages/connect-http-api.d.cts +15 -0
- package/dist/cjs/packages/connect-interval.cjs +2 -0
- package/dist/cjs/packages/connect-interval.d.cts +15 -0
- package/dist/cjs/packages/connect-modbus.cjs +2 -0
- package/dist/cjs/packages/connect-modbus.d.cts +60 -0
- package/dist/cjs/packages/connect-network-devices.cjs +2 -0
- package/dist/cjs/packages/connect-network-devices.d.cts +40 -0
- package/dist/cjs/packages/connect-storage.cjs +2 -0
- package/dist/cjs/packages/connect-storage.d.cts +14 -0
- package/dist/cjs/packages/energy-app-appliance.cjs +2 -0
- package/dist/cjs/packages/energy-app-appliance.d.cts +17 -0
- package/dist/cjs/packages/energy-app-authentication.cjs +2 -0
- package/dist/cjs/packages/energy-app-authentication.d.cts +52 -0
- package/dist/cjs/packages/energy-app-charge.cjs +2 -0
- package/dist/cjs/packages/energy-app-charge.d.cts +13 -0
- package/dist/cjs/packages/energy-app-charging-card.cjs +2 -0
- package/dist/cjs/packages/energy-app-charging-card.d.cts +11 -0
- package/dist/cjs/packages/energy-app-data-bus.cjs +2 -0
- package/dist/cjs/packages/energy-app-data-bus.d.cts +12 -0
- package/dist/cjs/packages/energy-app-electricity-prices.cjs +2 -0
- package/dist/cjs/packages/energy-app-electricity-prices.d.cts +59 -0
- package/dist/cjs/packages/energy-app-interval.cjs +2 -0
- package/dist/cjs/packages/energy-app-interval.d.cts +15 -0
- package/dist/cjs/packages/energy-app-modbus.cjs +2 -0
- package/dist/cjs/packages/energy-app-modbus.d.cts +46 -0
- package/dist/cjs/packages/energy-app-network-device.cjs +2 -0
- package/dist/cjs/packages/energy-app-network-device.d.cts +25 -0
- package/dist/cjs/packages/energy-app-notification.cjs +2 -0
- package/dist/cjs/packages/energy-app-notification.d.cts +50 -0
- package/dist/cjs/packages/energy-app-ocpp.cjs +16 -0
- package/dist/cjs/packages/energy-app-ocpp.d.cts +52 -0
- package/dist/cjs/packages/energy-app-settings.cjs +2 -0
- package/dist/cjs/packages/energy-app-settings.d.cts +47 -0
- package/dist/cjs/packages/energy-app-storage.cjs +2 -0
- package/dist/cjs/packages/energy-app-storage.d.cts +14 -0
- package/dist/cjs/packages/energy-app-vehicle.cjs +2 -0
- package/dist/cjs/packages/energy-app-vehicle.d.cts +11 -0
- package/dist/cjs/permission-not-granted.cjs +18 -0
- package/dist/cjs/permission-not-granted.d.cts +8 -0
- package/dist/cjs/types/connect-appliance-type.enum.cjs +10 -0
- package/dist/cjs/types/connect-appliance-type.enum.d.cts +6 -0
- package/dist/cjs/types/energy-app-settings.cjs +2 -0
- package/dist/cjs/types/energy-app-settings.d.cts +74 -0
- package/dist/cjs/types/enyo-appliance.cjs +33 -0
- package/dist/cjs/types/enyo-appliance.d.cts +81 -0
- package/dist/cjs/types/enyo-authentication.cjs +9 -0
- package/dist/cjs/types/enyo-authentication.d.cts +69 -0
- package/dist/cjs/types/enyo-battery-appliance.cjs +2 -0
- package/dist/cjs/types/enyo-battery-appliance.d.cts +6 -0
- package/dist/cjs/types/enyo-charge.cjs +15 -0
- package/dist/cjs/types/enyo-charge.d.cts +82 -0
- package/dist/cjs/types/enyo-charger-appliance.cjs +41 -0
- package/dist/cjs/types/enyo-charger-appliance.d.cts +49 -0
- package/dist/cjs/types/enyo-charging-card.cjs +2 -0
- package/dist/cjs/types/enyo-charging-card.d.cts +11 -0
- package/dist/cjs/types/enyo-data-bus-value.cjs +78 -0
- package/dist/cjs/types/enyo-data-bus-value.d.cts +379 -0
- package/dist/cjs/types/enyo-electricity-prices.cjs +2 -0
- package/dist/cjs/types/enyo-electricity-prices.d.cts +63 -0
- package/dist/cjs/types/enyo-energy-tariff.cjs +2 -0
- package/dist/cjs/types/enyo-energy-tariff.d.cts +70 -0
- package/dist/cjs/types/enyo-heatpump-appliance.cjs +19 -0
- package/dist/cjs/types/enyo-heatpump-appliance.d.cts +34 -0
- package/dist/cjs/types/enyo-inverter-appliance.cjs +2 -0
- package/dist/cjs/types/enyo-inverter-appliance.d.cts +3 -0
- package/dist/cjs/types/enyo-meter-appliance.cjs +10 -0
- package/dist/cjs/types/enyo-meter-appliance.d.cts +10 -0
- package/dist/cjs/types/enyo-network-device.cjs +2 -0
- package/dist/cjs/types/enyo-network-device.d.cts +31 -0
- package/dist/cjs/types/enyo-notification.cjs +2 -0
- package/dist/cjs/types/enyo-notification.d.cts +48 -0
- package/dist/cjs/types/enyo-settings.cjs +2 -0
- package/dist/cjs/types/enyo-settings.d.cts +74 -0
- package/dist/cjs/types/enyo-source.enum.cjs +8 -0
- package/dist/cjs/types/enyo-source.enum.d.cts +4 -0
- package/dist/cjs/types/enyo-vehicle.cjs +2 -0
- package/dist/cjs/types/enyo-vehicle.d.cts +12 -0
- package/dist/cjs/types/enyo-websocket-connection.cjs +2 -0
- package/dist/cjs/types/enyo-websocket-connection.d.cts +8 -0
- package/dist/cjs/types/hems-one-appliance.cjs +33 -0
- package/dist/cjs/types/hems-one-appliance.d.cts +81 -0
- package/dist/cjs/types/hems-one-authentication.cjs +9 -0
- package/dist/cjs/types/hems-one-authentication.d.cts +69 -0
- package/dist/cjs/types/hems-one-battery-appliance.cjs +2 -0
- package/dist/cjs/types/hems-one-battery-appliance.d.cts +6 -0
- package/dist/cjs/types/hems-one-charge.cjs +15 -0
- package/dist/cjs/types/hems-one-charge.d.cts +82 -0
- package/dist/cjs/types/hems-one-charger-appliance.cjs +41 -0
- package/dist/cjs/types/hems-one-charger-appliance.d.cts +49 -0
- package/dist/cjs/types/hems-one-charging-card.cjs +2 -0
- package/dist/cjs/types/hems-one-charging-card.d.cts +11 -0
- package/dist/cjs/types/hems-one-data-bus-command.cjs +9 -0
- package/dist/cjs/types/hems-one-data-bus-command.d.cts +34 -0
- package/dist/cjs/types/hems-one-data-bus-value.cjs +78 -0
- package/dist/cjs/types/hems-one-data-bus-value.d.cts +379 -0
- package/dist/cjs/types/hems-one-electricity-prices.cjs +2 -0
- package/dist/cjs/types/hems-one-electricity-prices.d.cts +63 -0
- package/dist/cjs/types/hems-one-energy-tariff.cjs +2 -0
- package/dist/cjs/types/hems-one-energy-tariff.d.cts +70 -0
- package/dist/cjs/types/hems-one-heatpump-appliance.cjs +19 -0
- package/dist/cjs/types/hems-one-heatpump-appliance.d.cts +34 -0
- package/dist/cjs/types/hems-one-inverter-appliance.cjs +2 -0
- package/dist/cjs/types/hems-one-inverter-appliance.d.cts +3 -0
- package/dist/cjs/types/hems-one-meter-appliance.cjs +10 -0
- package/dist/cjs/types/hems-one-meter-appliance.d.cts +10 -0
- package/dist/cjs/types/hems-one-network-device.cjs +2 -0
- package/dist/cjs/types/hems-one-network-device.d.cts +31 -0
- package/dist/cjs/types/hems-one-source.enum.cjs +8 -0
- package/dist/cjs/types/hems-one-source.enum.d.cts +4 -0
- package/dist/cjs/types/hems-one-vehicle.cjs +2 -0
- package/dist/cjs/types/hems-one-vehicle.d.cts +12 -0
- package/dist/cjs/types/hems-one-websocket-connection.cjs +2 -0
- package/dist/cjs/types/hems-one-websocket-connection.d.cts +8 -0
- package/dist/cjs/version.cjs +19 -0
- package/dist/cjs/version.d.cts +13 -0
- package/dist/connect-ems-api.d.ts +30 -0
- package/dist/connect-ems-api.js +1 -0
- package/dist/connect-ems-permission.enum.d.ts +3 -0
- package/dist/connect-ems-permission.enum.js +4 -0
- package/dist/connect-ems-permission.type.d.ts +1 -0
- package/dist/connect-ems-permission.type.js +1 -0
- package/dist/connect-package-definition.d.ts +57 -0
- package/dist/connect-package-definition.js +10 -0
- package/dist/energy-app-appliance-type.enum.d.ts +10 -0
- package/dist/energy-app-appliance-type.enum.js +11 -0
- package/dist/energy-app-package-configuration.d.ts +30 -0
- package/dist/energy-app-package-configuration.js +1 -0
- package/dist/energy-app-package-definition.d.ts +123 -0
- package/dist/energy-app-package-definition.js +26 -0
- package/dist/energy-app-permission.type.d.ts +18 -0
- package/dist/energy-app-permission.type.js +18 -0
- package/dist/enyo-energy-app-sdk.d.ts +67 -0
- package/dist/enyo-energy-app-sdk.js +9 -0
- package/dist/hems-one-energy-app-sdk.d.ts +67 -0
- package/dist/hems-one-energy-app-sdk.js +9 -0
- package/dist/implementations/modbus/EnergyAppModbusBattery.d.ts +59 -0
- package/dist/implementations/modbus/EnergyAppModbusBattery.js +384 -0
- package/dist/implementations/modbus/EnergyAppModbusConnectionHealth.d.ts +15 -0
- package/dist/implementations/modbus/EnergyAppModbusConnectionHealth.js +33 -0
- package/dist/implementations/modbus/EnergyAppModbusDataTypeConverter.d.ts +41 -0
- package/dist/implementations/modbus/EnergyAppModbusDataTypeConverter.js +126 -0
- package/dist/implementations/modbus/EnergyAppModbusFaultTolerantReader.d.ts +10 -0
- package/dist/implementations/modbus/EnergyAppModbusFaultTolerantReader.js +45 -0
- package/dist/implementations/modbus/EnergyAppModbusInverter.d.ts +56 -0
- package/dist/implementations/modbus/EnergyAppModbusInverter.js +344 -0
- package/dist/implementations/modbus/EnergyAppModbusMeter.d.ts +26 -0
- package/dist/implementations/modbus/EnergyAppModbusMeter.js +195 -0
- package/dist/implementations/modbus/EnergyAppModbusRegisterMapper.d.ts +13 -0
- package/dist/implementations/modbus/EnergyAppModbusRegisterMapper.js +94 -0
- package/dist/implementations/modbus/interfaces.d.ts +202 -0
- package/dist/implementations/modbus/interfaces.js +23 -0
- package/dist/implementations/ocpp/ocpp-common.d.ts +75 -0
- package/dist/implementations/ocpp/ocpp-common.js +328 -0
- package/dist/implementations/ocpp/ocpp16.d.ts +137 -0
- package/dist/implementations/ocpp/ocpp16.js +48 -0
- package/dist/implementations/ocpp/ocpp201.d.ts +215 -0
- package/dist/implementations/ocpp/ocpp201.js +81 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.js +99 -0
- package/dist/mockConnectEmsApi.d.ts +10 -0
- package/dist/mockConnectEmsApi.js +160 -0
- package/dist/packages/connect-appliance.d.ts +24 -0
- package/dist/packages/connect-appliance.js +1 -0
- package/dist/packages/connect-http-api.d.ts +15 -0
- package/dist/packages/connect-http-api.js +1 -0
- package/dist/packages/connect-interval.d.ts +15 -0
- package/dist/packages/connect-interval.js +1 -0
- package/dist/packages/connect-modbus.d.ts +60 -0
- package/dist/packages/connect-modbus.js +1 -0
- package/dist/packages/connect-network-devices.d.ts +40 -0
- package/dist/packages/connect-network-devices.js +1 -0
- package/dist/packages/connect-storage.d.ts +14 -0
- package/dist/packages/connect-storage.js +1 -0
- package/dist/packages/energy-app-appliance.d.ts +17 -0
- package/dist/packages/energy-app-appliance.js +1 -0
- package/dist/packages/energy-app-authentication.d.ts +52 -0
- package/dist/packages/energy-app-authentication.js +1 -0
- package/dist/packages/energy-app-charge.d.ts +13 -0
- package/dist/packages/energy-app-charge.js +1 -0
- package/dist/packages/energy-app-charging-card.d.ts +11 -0
- package/dist/packages/energy-app-charging-card.js +1 -0
- package/dist/packages/energy-app-data-bus.d.ts +12 -0
- package/dist/packages/energy-app-data-bus.js +1 -0
- package/dist/packages/energy-app-electricity-prices.d.ts +59 -0
- package/dist/packages/energy-app-electricity-prices.js +1 -0
- package/dist/packages/energy-app-interval.d.ts +15 -0
- package/dist/packages/energy-app-interval.js +1 -0
- package/dist/packages/energy-app-modbus.d.ts +46 -0
- package/dist/packages/energy-app-modbus.js +1 -0
- package/dist/packages/energy-app-network-device.d.ts +25 -0
- package/dist/packages/energy-app-network-device.js +1 -0
- package/dist/packages/energy-app-notification.d.ts +50 -0
- package/dist/packages/energy-app-notification.js +1 -0
- package/dist/packages/energy-app-ocpp.d.ts +52 -0
- package/dist/packages/energy-app-ocpp.js +13 -0
- package/dist/packages/energy-app-settings.d.ts +47 -0
- package/dist/packages/energy-app-settings.js +1 -0
- package/dist/packages/energy-app-storage.d.ts +14 -0
- package/dist/packages/energy-app-storage.js +1 -0
- package/dist/packages/energy-app-vehicle.d.ts +11 -0
- package/dist/packages/energy-app-vehicle.js +1 -0
- package/dist/permission-not-granted.d.ts +8 -0
- package/dist/permission-not-granted.js +14 -0
- package/dist/types/connect-appliance-type.enum.d.ts +6 -0
- package/dist/types/connect-appliance-type.enum.js +7 -0
- package/dist/types/energy-app-settings.d.ts +74 -0
- package/dist/types/energy-app-settings.js +1 -0
- package/dist/types/enyo-appliance.d.ts +81 -0
- package/dist/types/enyo-appliance.js +30 -0
- package/dist/types/enyo-authentication.d.ts +69 -0
- package/dist/types/enyo-authentication.js +6 -0
- package/dist/types/enyo-battery-appliance.d.ts +6 -0
- package/dist/types/enyo-battery-appliance.js +1 -0
- package/dist/types/enyo-charge.d.ts +82 -0
- package/dist/types/enyo-charge.js +12 -0
- package/dist/types/enyo-charger-appliance.d.ts +49 -0
- package/dist/types/enyo-charger-appliance.js +38 -0
- package/dist/types/enyo-charging-card.d.ts +11 -0
- package/dist/types/enyo-charging-card.js +1 -0
- package/dist/types/enyo-data-bus-value.d.ts +379 -0
- package/dist/types/enyo-data-bus-value.js +75 -0
- package/dist/types/enyo-electricity-prices.d.ts +63 -0
- package/dist/types/enyo-electricity-prices.js +1 -0
- package/dist/types/enyo-energy-tariff.d.ts +70 -0
- package/dist/types/enyo-energy-tariff.js +1 -0
- package/dist/types/enyo-heatpump-appliance.d.ts +34 -0
- package/dist/types/enyo-heatpump-appliance.js +16 -0
- package/dist/types/enyo-inverter-appliance.d.ts +3 -0
- package/dist/types/enyo-inverter-appliance.js +1 -0
- package/dist/types/enyo-meter-appliance.d.ts +10 -0
- package/dist/types/enyo-meter-appliance.js +7 -0
- package/dist/types/enyo-network-device.d.ts +31 -0
- package/dist/types/enyo-network-device.js +1 -0
- package/dist/types/enyo-notification.d.ts +48 -0
- package/dist/types/enyo-notification.js +1 -0
- package/dist/types/enyo-settings.d.ts +74 -0
- package/dist/types/enyo-settings.js +1 -0
- package/dist/types/enyo-source.enum.d.ts +4 -0
- package/dist/types/enyo-source.enum.js +5 -0
- package/dist/types/enyo-vehicle.d.ts +12 -0
- package/dist/types/enyo-vehicle.js +1 -0
- package/dist/types/enyo-websocket-connection.d.ts +8 -0
- package/dist/types/enyo-websocket-connection.js +1 -0
- package/dist/types/hems-one-appliance.d.ts +81 -0
- package/dist/types/hems-one-appliance.js +30 -0
- package/dist/types/hems-one-authentication.d.ts +69 -0
- package/dist/types/hems-one-authentication.js +6 -0
- package/dist/types/hems-one-battery-appliance.d.ts +6 -0
- package/dist/types/hems-one-battery-appliance.js +1 -0
- package/dist/types/hems-one-charge.d.ts +82 -0
- package/dist/types/hems-one-charge.js +12 -0
- package/dist/types/hems-one-charger-appliance.d.ts +49 -0
- package/dist/types/hems-one-charger-appliance.js +38 -0
- package/dist/types/hems-one-charging-card.d.ts +11 -0
- package/dist/types/hems-one-charging-card.js +1 -0
- package/dist/types/hems-one-data-bus-command.d.ts +34 -0
- package/dist/types/hems-one-data-bus-command.js +6 -0
- package/dist/types/hems-one-data-bus-value.d.ts +379 -0
- package/dist/types/hems-one-data-bus-value.js +75 -0
- package/dist/types/hems-one-electricity-prices.d.ts +63 -0
- package/dist/types/hems-one-electricity-prices.js +1 -0
- package/dist/types/hems-one-energy-tariff.d.ts +70 -0
- package/dist/types/hems-one-energy-tariff.js +1 -0
- package/dist/types/hems-one-heatpump-appliance.d.ts +34 -0
- package/dist/types/hems-one-heatpump-appliance.js +16 -0
- package/dist/types/hems-one-inverter-appliance.d.ts +3 -0
- package/dist/types/hems-one-inverter-appliance.js +1 -0
- package/dist/types/hems-one-meter-appliance.d.ts +10 -0
- package/dist/types/hems-one-meter-appliance.js +7 -0
- package/dist/types/hems-one-network-device.d.ts +31 -0
- package/dist/types/hems-one-network-device.js +1 -0
- package/dist/types/hems-one-source.enum.d.ts +4 -0
- package/dist/types/hems-one-source.enum.js +5 -0
- package/dist/types/hems-one-vehicle.d.ts +12 -0
- package/dist/types/hems-one-vehicle.js +1 -0
- package/dist/types/hems-one-websocket-connection.d.ts +8 -0
- package/dist/types/hems-one-websocket-connection.js +1 -0
- package/dist/version.d.ts +13 -0
- package/dist/version.js +15 -0
- package/package.json +43 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EnyoPackageConfigurationSetting, EnyoSettingsChangeListener, EnyoSettingConfigWithValue } from "../types/enyo-settings.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for managing Energy App settings configuration for appliances or the entire package.
|
|
4
|
+
* Provides methods to add, remove, and modify settings, as well as listen for changes.
|
|
5
|
+
* Each setting must have a unique name across the entire configuration.
|
|
6
|
+
*/
|
|
7
|
+
export interface EnergyAppSettings {
|
|
8
|
+
/**
|
|
9
|
+
* Adds a new setting configuration to the Energy App.
|
|
10
|
+
* The setting can be configured for a specific appliance or for the entire package.
|
|
11
|
+
*
|
|
12
|
+
* @param config - The setting configuration to add, including optional appliance ID and current value
|
|
13
|
+
* @returns Promise that resolves when the setting is successfully added
|
|
14
|
+
*/
|
|
15
|
+
addSettingConfig(config: EnyoPackageConfigurationSetting): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Removes a setting configuration from the Energy App.
|
|
18
|
+
* This will remove the setting regardless of whether it's for an appliance or the package.
|
|
19
|
+
*
|
|
20
|
+
* @param settingName - The unique name of the setting to remove
|
|
21
|
+
* @returns Promise that resolves when the setting is successfully removed
|
|
22
|
+
*/
|
|
23
|
+
removeSettingConfig(settingName: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Updates the value of an existing setting.
|
|
26
|
+
* The setting is identified by its unique name across all appliances and package settings.
|
|
27
|
+
*
|
|
28
|
+
* @param settingName - The unique name of the setting to update
|
|
29
|
+
* @param value - The new value for the setting
|
|
30
|
+
* @returns Promise that resolves when the setting value is successfully updated
|
|
31
|
+
*/
|
|
32
|
+
updateSetting(settingName: string, value: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Registers a listener that will be called when any setting value changes.
|
|
35
|
+
* The listener will be notified of changes to both appliance-specific and package-wide settings.
|
|
36
|
+
*
|
|
37
|
+
* @param listener - The callback function to be called on setting changes
|
|
38
|
+
*/
|
|
39
|
+
listenForSettingsChanges(listener: EnyoSettingsChangeListener): void;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves all currently configured settings with their unique identifiers and current values.
|
|
42
|
+
* This includes settings for both specific appliances and the entire package.
|
|
43
|
+
*
|
|
44
|
+
* @returns Promise that resolves to an array of all settings with their IDs and current values
|
|
45
|
+
*/
|
|
46
|
+
getSettingsConfig(): Promise<EnyoSettingConfigWithValue[]>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for persistent storage operations in enyo packages.
|
|
3
|
+
* Provides key-value storage capabilities for package data persistence.
|
|
4
|
+
*/
|
|
5
|
+
export interface EnergyAppStorage {
|
|
6
|
+
/** Save an object to storage with the specified key */
|
|
7
|
+
save: (key: string, value: object) => Promise<void>;
|
|
8
|
+
/** Load an object from storage by key, returns null if not found */
|
|
9
|
+
load: <T>(key: string) => Promise<T | null>;
|
|
10
|
+
/** Remove an object from storage by key */
|
|
11
|
+
remove: (key: string) => Promise<void>;
|
|
12
|
+
/** Returns a list of all keys stored in the storage */
|
|
13
|
+
listKeys: () => Promise<string[]>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EnyoVehicle } from "../types/enyo-vehicle.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for managing vehicles in enyo packages.
|
|
4
|
+
* Provides read-only operations for vehicle information.
|
|
5
|
+
*/
|
|
6
|
+
export interface EnergyAppVehicle {
|
|
7
|
+
/** Get a list of all registered vehicles */
|
|
8
|
+
list: () => Promise<EnyoVehicle[]>;
|
|
9
|
+
/** Get a specific vehicle by its ID */
|
|
10
|
+
getById: (id: string) => Promise<EnyoVehicle | null>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnergyAppPermissionNotGrantedError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Error thrown when a required permission is not granted in the package configuration
|
|
6
|
+
*/
|
|
7
|
+
class EnergyAppPermissionNotGrantedError extends Error {
|
|
8
|
+
requiredPermission;
|
|
9
|
+
availablePermissions;
|
|
10
|
+
constructor(requiredPermission, availablePermissions) {
|
|
11
|
+
super(`Permission '${requiredPermission}' is required but not granted. ` +
|
|
12
|
+
`Available permissions: [${availablePermissions.join(', ')}]`);
|
|
13
|
+
this.requiredPermission = requiredPermission;
|
|
14
|
+
this.availablePermissions = availablePermissions;
|
|
15
|
+
this.name = 'PermissionNotGrantedError';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.EnergyAppPermissionNotGrantedError = EnergyAppPermissionNotGrantedError;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when a required permission is not granted in the package configuration
|
|
3
|
+
*/
|
|
4
|
+
export declare class EnergyAppPermissionNotGrantedError extends Error {
|
|
5
|
+
readonly requiredPermission: string;
|
|
6
|
+
readonly availablePermissions: string[];
|
|
7
|
+
constructor(requiredPermission: string, availablePermissions: string[]);
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectApplianceTypeEnum = void 0;
|
|
4
|
+
var ConnectApplianceTypeEnum;
|
|
5
|
+
(function (ConnectApplianceTypeEnum) {
|
|
6
|
+
ConnectApplianceTypeEnum["Inverter"] = "Inverter";
|
|
7
|
+
ConnectApplianceTypeEnum["Charger"] = "Charger";
|
|
8
|
+
ConnectApplianceTypeEnum["Storage"] = "Storage";
|
|
9
|
+
ConnectApplianceTypeEnum["Meter"] = "Meter";
|
|
10
|
+
})(ConnectApplianceTypeEnum || (exports.ConnectApplianceTypeEnum = ConnectApplianceTypeEnum = {}));
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { EnergyAppPackageLanguage } from "../energy-app-package-definition.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a translated value for different languages in Energy App settings.
|
|
4
|
+
*/
|
|
5
|
+
export interface EnergyAppPackageConfigurationTranslatedValue {
|
|
6
|
+
/** Language code */
|
|
7
|
+
language: EnergyAppPackageLanguage;
|
|
8
|
+
/** The displayed value */
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Represents an option in a select-type setting field.
|
|
13
|
+
*/
|
|
14
|
+
export interface EnergyAppPackageConfigurationSettingSelectOption {
|
|
15
|
+
value: string;
|
|
16
|
+
/** The displayed name of the option */
|
|
17
|
+
optionName: EnergyAppPackageConfigurationTranslatedValue[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Represents a single configuration setting for an Energy App package.
|
|
21
|
+
*/
|
|
22
|
+
export interface EnergyAppPackageConfigurationSetting {
|
|
23
|
+
/** internal name of the setting - must be unique */
|
|
24
|
+
name: string;
|
|
25
|
+
/** the type of the setting */
|
|
26
|
+
type: 'text' | 'select';
|
|
27
|
+
/** if the setting is required */
|
|
28
|
+
required: boolean;
|
|
29
|
+
/** The displayed name of the field */
|
|
30
|
+
fieldName: EnergyAppPackageConfigurationTranslatedValue[];
|
|
31
|
+
/** An optional description for the user*/
|
|
32
|
+
fieldDescription?: EnergyAppPackageConfigurationTranslatedValue[];
|
|
33
|
+
/** The current value of the setting (optional) */
|
|
34
|
+
currentValue?: string;
|
|
35
|
+
/** Optional appliance ID. If provided, setting is for specific appliance. If omitted, setting is for the whole package */
|
|
36
|
+
applianceId?: string;
|
|
37
|
+
selectOptions?: EnergyAppPackageConfigurationSettingSelectOption[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Configuration container for Energy App package settings.
|
|
41
|
+
*/
|
|
42
|
+
export interface EnergyAppPackageConfiguration {
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Represents a change event when a setting value is modified.
|
|
46
|
+
*/
|
|
47
|
+
export interface EnergyAppSettingChangeEvent {
|
|
48
|
+
/** The name of the setting that changed */
|
|
49
|
+
settingName: string;
|
|
50
|
+
/** The new value of the setting */
|
|
51
|
+
newValue: string;
|
|
52
|
+
/** The previous value of the setting (if any) */
|
|
53
|
+
previousValue?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Callback function type for listening to setting changes.
|
|
57
|
+
*/
|
|
58
|
+
export type EnergyAppSettingsChangeListener = (event: EnergyAppSettingChangeEvent) => Promise<void> | void;
|
|
59
|
+
/**
|
|
60
|
+
* Represents a configuration setting with a unique identifier.
|
|
61
|
+
* Extends the base setting configuration to include an ID for tracking and management.
|
|
62
|
+
*/
|
|
63
|
+
export interface EnergyAppSettingConfigWithId extends EnergyAppPackageConfigurationSetting {
|
|
64
|
+
/** Unique identifier for this setting */
|
|
65
|
+
id: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Represents a configuration setting with its current value.
|
|
69
|
+
* Extends the setting configuration with ID to include the actual current value.
|
|
70
|
+
*/
|
|
71
|
+
export interface EnergyAppSettingConfigWithValue extends EnergyAppSettingConfigWithId {
|
|
72
|
+
/** Current value of the setting (if set) */
|
|
73
|
+
currentValue?: string;
|
|
74
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnyoApplianceTopologyFeatureEnum = exports.EnyoApplianceConnectionType = exports.EnyoApplianceStateEnum = exports.EnyoApplianceTypeEnum = void 0;
|
|
4
|
+
var EnyoApplianceTypeEnum;
|
|
5
|
+
(function (EnyoApplianceTypeEnum) {
|
|
6
|
+
EnyoApplianceTypeEnum["Inverter"] = "Inverter";
|
|
7
|
+
EnyoApplianceTypeEnum["Charger"] = "Charger";
|
|
8
|
+
EnyoApplianceTypeEnum["Storage"] = "Storage";
|
|
9
|
+
EnyoApplianceTypeEnum["Meter"] = "Meter";
|
|
10
|
+
EnyoApplianceTypeEnum["Heatpump"] = "Heatpump";
|
|
11
|
+
})(EnyoApplianceTypeEnum || (exports.EnyoApplianceTypeEnum = EnyoApplianceTypeEnum = {}));
|
|
12
|
+
var EnyoApplianceStateEnum;
|
|
13
|
+
(function (EnyoApplianceStateEnum) {
|
|
14
|
+
EnyoApplianceStateEnum["Connected"] = "connected";
|
|
15
|
+
EnyoApplianceStateEnum["ConnectionPending"] = "connection-pending";
|
|
16
|
+
EnyoApplianceStateEnum["Offline"] = "offline";
|
|
17
|
+
})(EnyoApplianceStateEnum || (exports.EnyoApplianceStateEnum = EnyoApplianceStateEnum = {}));
|
|
18
|
+
var EnyoApplianceConnectionType;
|
|
19
|
+
(function (EnyoApplianceConnectionType) {
|
|
20
|
+
EnyoApplianceConnectionType["Connector"] = "Connector";
|
|
21
|
+
EnyoApplianceConnectionType["Cloud"] = "Cloud";
|
|
22
|
+
})(EnyoApplianceConnectionType || (exports.EnyoApplianceConnectionType = EnyoApplianceConnectionType = {}));
|
|
23
|
+
var EnyoApplianceTopologyFeatureEnum;
|
|
24
|
+
(function (EnyoApplianceTopologyFeatureEnum) {
|
|
25
|
+
/** If the meter is the real Primary Meter collecting feed in and consumption in Wh */
|
|
26
|
+
EnyoApplianceTopologyFeatureEnum["PrimaryMeter"] = "PrimaryMeter";
|
|
27
|
+
/** If the meter is an Intermediate Meter (like the meter of an Inverter) directly behind the Primary Meter */
|
|
28
|
+
EnyoApplianceTopologyFeatureEnum["IntermediateOfPrimaryMeter"] = "IntermediateOfPrimaryMeter";
|
|
29
|
+
/** If the meter is an Intermediate Meter for a single appliance */
|
|
30
|
+
EnyoApplianceTopologyFeatureEnum["IntermediateMeter"] = "PrimaryMeter";
|
|
31
|
+
/** If the inverter does a direct grid feed in without self consumption */
|
|
32
|
+
EnyoApplianceTopologyFeatureEnum["InverterFullGridFeedIn"] = "InverterFullGridFeedIn";
|
|
33
|
+
})(EnyoApplianceTopologyFeatureEnum || (exports.EnyoApplianceTopologyFeatureEnum = EnyoApplianceTopologyFeatureEnum = {}));
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { EnergyAppPackageLanguage } from "../energy-app-package-definition.cjs";
|
|
2
|
+
import { EnyoChargerApplianceMetadata } from "./enyo-charger-appliance.cjs";
|
|
3
|
+
import { EnyoHeatpumpApplianceMetadata } from "./enyo-heatpump-appliance.cjs";
|
|
4
|
+
import { EnyoBatteryApplianceMetadata } from "./enyo-battery-appliance.cjs";
|
|
5
|
+
import { EnyoInverterApplianceMetadata } from "./enyo-inverter-appliance.cjs";
|
|
6
|
+
import { EnyoMeterAppliance } from "./enyo-meter-appliance.cjs";
|
|
7
|
+
export declare enum EnyoApplianceTypeEnum {
|
|
8
|
+
Inverter = "Inverter",
|
|
9
|
+
Charger = "Charger",
|
|
10
|
+
Storage = "Storage",
|
|
11
|
+
Meter = "Meter",
|
|
12
|
+
Heatpump = "Heatpump"
|
|
13
|
+
}
|
|
14
|
+
export interface EnyoApplianceName {
|
|
15
|
+
language: EnergyAppPackageLanguage;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
export declare enum EnyoApplianceStateEnum {
|
|
19
|
+
Connected = "connected",
|
|
20
|
+
ConnectionPending = "connection-pending",
|
|
21
|
+
Offline = "offline"
|
|
22
|
+
}
|
|
23
|
+
export interface EnyoApplianceNetworkMetadata {
|
|
24
|
+
/** If the appliance is connected via cellular network, you can put the imsi here*/
|
|
25
|
+
imsi?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare enum EnyoApplianceConnectionType {
|
|
28
|
+
Connector = "Connector",
|
|
29
|
+
Cloud = "Cloud"
|
|
30
|
+
}
|
|
31
|
+
export interface EnyoApplianceMetadata {
|
|
32
|
+
modelName?: string;
|
|
33
|
+
vendorName?: string;
|
|
34
|
+
serialNumber?: string;
|
|
35
|
+
firmwareVersion?: string;
|
|
36
|
+
state?: EnyoApplianceStateEnum;
|
|
37
|
+
network?: EnyoApplianceNetworkMetadata;
|
|
38
|
+
connectionType: EnyoApplianceConnectionType;
|
|
39
|
+
}
|
|
40
|
+
export declare enum EnyoApplianceTopologyFeatureEnum {
|
|
41
|
+
/** If the meter is the real Primary Meter collecting feed in and consumption in Wh */
|
|
42
|
+
PrimaryMeter = "PrimaryMeter",
|
|
43
|
+
/** If the meter is an Intermediate Meter (like the meter of an Inverter) directly behind the Primary Meter */
|
|
44
|
+
IntermediateOfPrimaryMeter = "IntermediateOfPrimaryMeter",
|
|
45
|
+
/** If the meter is an Intermediate Meter for a single appliance */
|
|
46
|
+
IntermediateMeter = "PrimaryMeter",
|
|
47
|
+
/** If the inverter does a direct grid feed in without self consumption */
|
|
48
|
+
InverterFullGridFeedIn = "InverterFullGridFeedIn"
|
|
49
|
+
}
|
|
50
|
+
export interface EnyoApplianceTopology {
|
|
51
|
+
features: EnyoApplianceTopologyFeatureEnum[];
|
|
52
|
+
/** Information, behind which meter this appliance is located, for example if the wallbox is behind the primary meter or a submeter. Put the appliance ID of the meter */
|
|
53
|
+
behindMeterApplianceId?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Represents an appliance managed by the enyo system.
|
|
57
|
+
*/
|
|
58
|
+
export interface EnyoAppliance {
|
|
59
|
+
/** Unique identifier for the appliance */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Name of the appliance in different supported languages */
|
|
62
|
+
name: EnyoApplianceName[];
|
|
63
|
+
/** Type/category of the appliance */
|
|
64
|
+
type: EnyoApplianceTypeEnum;
|
|
65
|
+
/** network device IDs associated with the appliance */
|
|
66
|
+
networkDeviceIds: string[];
|
|
67
|
+
/** Optional Metadata of the Appliance */
|
|
68
|
+
metadata?: EnyoApplianceMetadata;
|
|
69
|
+
/** Topology Information of the appliance */
|
|
70
|
+
topology?: EnyoApplianceTopology;
|
|
71
|
+
/** Optional Metadata of the Appliance if of type Meter */
|
|
72
|
+
meter?: EnyoMeterAppliance;
|
|
73
|
+
/** Optional Metadata of the Appliance if of type Inverter */
|
|
74
|
+
inverter?: EnyoInverterApplianceMetadata;
|
|
75
|
+
/** Optional Metadata of the Appliance if of type Charger */
|
|
76
|
+
charger?: EnyoChargerApplianceMetadata;
|
|
77
|
+
/** Optional Metadata of the Appliance if of type Heatpump */
|
|
78
|
+
heatpump?: EnyoHeatpumpApplianceMetadata;
|
|
79
|
+
/** Optional Metadata of the Appliance if of type Battery */
|
|
80
|
+
battery?: EnyoBatteryApplianceMetadata;
|
|
81
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnyoAuthenticationStateEnum = void 0;
|
|
4
|
+
var EnyoAuthenticationStateEnum;
|
|
5
|
+
(function (EnyoAuthenticationStateEnum) {
|
|
6
|
+
EnyoAuthenticationStateEnum["Authenticated"] = "Authenticated";
|
|
7
|
+
EnyoAuthenticationStateEnum["AuthenticationFailed"] = "AuthenticationFailed";
|
|
8
|
+
EnyoAuthenticationStateEnum["Unauthenticated"] = "Unauthenticated";
|
|
9
|
+
})(EnyoAuthenticationStateEnum || (exports.EnyoAuthenticationStateEnum = EnyoAuthenticationStateEnum = {}));
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { EnyoPackageConfigurationTranslatedValue } from "./enyo-settings.cjs";
|
|
2
|
+
export type EnyoAuthenticationType = 'apiKey' | 'oauth' | 'usernamePassword';
|
|
3
|
+
export interface EnyoApiKeyAuthentication {
|
|
4
|
+
fieldName: EnyoPackageConfigurationTranslatedValue[];
|
|
5
|
+
fieldDescription?: EnyoPackageConfigurationTranslatedValue[];
|
|
6
|
+
/** A link to an external resource where to find more information how to get an api key */
|
|
7
|
+
externalGuideUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface EnyoUsernamePasswordAuthentication {
|
|
10
|
+
description?: EnyoPackageConfigurationTranslatedValue[];
|
|
11
|
+
usernameName: EnyoPackageConfigurationTranslatedValue[];
|
|
12
|
+
passwordName: EnyoPackageConfigurationTranslatedValue[];
|
|
13
|
+
/** A link to an external resource where to find more information how to get an api key */
|
|
14
|
+
externalGuideUrl?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface EnyoOauthAuthentication {
|
|
17
|
+
description?: EnyoPackageConfigurationTranslatedValue[];
|
|
18
|
+
/** If the client id and client secret need to be provided by the user*/
|
|
19
|
+
clientIdName?: EnyoPackageConfigurationTranslatedValue[];
|
|
20
|
+
clientSecretName?: EnyoPackageConfigurationTranslatedValue[];
|
|
21
|
+
redirectUrl?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface EnyoOauthAuthenticationParameters {
|
|
24
|
+
clientId?: string;
|
|
25
|
+
clientSecret?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface EnyoOauthAuthenticationRedirectUrlResponse {
|
|
28
|
+
redirectUrl: string;
|
|
29
|
+
}
|
|
30
|
+
export interface EnyoAuthentication {
|
|
31
|
+
/** The authentication mode */
|
|
32
|
+
authenticationType: EnyoAuthenticationType;
|
|
33
|
+
/** the api key configuration */
|
|
34
|
+
apiKey?: EnyoApiKeyAuthentication;
|
|
35
|
+
/** the oauth configuration */
|
|
36
|
+
oauth?: EnyoOauthAuthentication;
|
|
37
|
+
/** the username password configuration */
|
|
38
|
+
usernamePassword?: EnyoUsernamePasswordAuthentication;
|
|
39
|
+
/** If the authentication is one time or not. If not a one time authentication, the user can sign out*/
|
|
40
|
+
oneTimeAuthentication: boolean;
|
|
41
|
+
/** Optional appliance ID. If provided, authentication is for specific appliance. If omitted, authentication is for the whole package */
|
|
42
|
+
applianceId?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface EnyoApiKeyAuthenticationResponse {
|
|
45
|
+
apiKey: string;
|
|
46
|
+
}
|
|
47
|
+
export interface EnyoUsernamePasswordAuthenticationResponse {
|
|
48
|
+
username: string;
|
|
49
|
+
password: string;
|
|
50
|
+
}
|
|
51
|
+
export interface EnyoOauthAuthenticationResponse {
|
|
52
|
+
code: string;
|
|
53
|
+
challenge: string;
|
|
54
|
+
}
|
|
55
|
+
export interface EnyoAuthenticationResponse {
|
|
56
|
+
requestId: string;
|
|
57
|
+
authenticationType: EnyoAuthenticationType;
|
|
58
|
+
apiKey?: EnyoApiKeyAuthenticationResponse;
|
|
59
|
+
usernamePassword?: EnyoUsernamePasswordAuthenticationResponse;
|
|
60
|
+
oauth?: EnyoOauthAuthenticationResponse;
|
|
61
|
+
}
|
|
62
|
+
export declare enum EnyoAuthenticationStateEnum {
|
|
63
|
+
Authenticated = "Authenticated",
|
|
64
|
+
AuthenticationFailed = "AuthenticationFailed",
|
|
65
|
+
Unauthenticated = "Unauthenticated"
|
|
66
|
+
}
|
|
67
|
+
export interface EnyoAuthenticateState {
|
|
68
|
+
state: EnyoAuthenticationStateEnum;
|
|
69
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnyoChargeStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Status of a charging session
|
|
6
|
+
*/
|
|
7
|
+
var EnyoChargeStatus;
|
|
8
|
+
(function (EnyoChargeStatus) {
|
|
9
|
+
/** Charging session is active */
|
|
10
|
+
EnyoChargeStatus["Charging"] = "Charging";
|
|
11
|
+
/** Charging session completed successfully */
|
|
12
|
+
EnyoChargeStatus["Completed"] = "Completed";
|
|
13
|
+
/** Charging session ended due to fault */
|
|
14
|
+
EnyoChargeStatus["Failed"] = "Failed";
|
|
15
|
+
})(EnyoChargeStatus || (exports.EnyoChargeStatus = EnyoChargeStatus = {}));
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status of a charging session
|
|
3
|
+
*/
|
|
4
|
+
export declare enum EnyoChargeStatus {
|
|
5
|
+
/** Charging session is active */
|
|
6
|
+
Charging = "Charging",
|
|
7
|
+
/** Charging session completed successfully */
|
|
8
|
+
Completed = "Completed",
|
|
9
|
+
/** Charging session ended due to fault */
|
|
10
|
+
Failed = "Failed"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Meter values recorded during a charging session
|
|
14
|
+
*/
|
|
15
|
+
export interface ChargeMeterValue {
|
|
16
|
+
/** Timestamp when the value was recorded */
|
|
17
|
+
timestamp: Date;
|
|
18
|
+
/** Energy value in Watt hours */
|
|
19
|
+
valueWh: number;
|
|
20
|
+
/** Price per kWh at the time of measurement */
|
|
21
|
+
pricePerKwh?: number;
|
|
22
|
+
/** Charging cost in Euro for this measurement */
|
|
23
|
+
chargingCostEuro?: number;
|
|
24
|
+
/** Current on phase 1 in Amperes */
|
|
25
|
+
currentPhase1: number;
|
|
26
|
+
/** Current on phase 2 in Amperes */
|
|
27
|
+
currentPhase2?: number;
|
|
28
|
+
/** Current on phase 3 in Amperes */
|
|
29
|
+
currentPhase3?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Represents a charging session in the enyo system.
|
|
33
|
+
* Contains all relevant information about an EV charging transaction.
|
|
34
|
+
*/
|
|
35
|
+
export interface EnyoCharge {
|
|
36
|
+
/** Unique identifier for the charging session */
|
|
37
|
+
id: string;
|
|
38
|
+
/** Transaction ID for the charging session */
|
|
39
|
+
transactionId: string;
|
|
40
|
+
/** ID of the appliance (charger) handling this session */
|
|
41
|
+
applianceId: string;
|
|
42
|
+
/** ID of the charging card used for this session */
|
|
43
|
+
chargingCardId?: string;
|
|
44
|
+
/** Connector ID on the charge point */
|
|
45
|
+
connectorId?: number;
|
|
46
|
+
/** ID of the vehicle being charged */
|
|
47
|
+
vehicleId?: string;
|
|
48
|
+
/** Current status of the charging session */
|
|
49
|
+
status: EnyoChargeStatus;
|
|
50
|
+
/** Meter reading at session start in Watt hours */
|
|
51
|
+
meterStartValueWh?: number;
|
|
52
|
+
/** Meter reading at session end in Watt hours */
|
|
53
|
+
meterEndValueWh?: number;
|
|
54
|
+
/** Paid price in Euro cents */
|
|
55
|
+
paidPriceEuroCent?: number;
|
|
56
|
+
/** Total energy delivered in kWh */
|
|
57
|
+
totalEnergyKwh?: number;
|
|
58
|
+
/** Timestamp when charging started */
|
|
59
|
+
startTime?: Date;
|
|
60
|
+
/** Timestamp when charging ended */
|
|
61
|
+
endTime?: Date;
|
|
62
|
+
/** Array of meter values recorded during the session */
|
|
63
|
+
meterValues?: ChargeMeterValue[];
|
|
64
|
+
/** Number of phases used for charging */
|
|
65
|
+
numberOfPhases: number;
|
|
66
|
+
}
|
|
67
|
+
export interface EnyoChargeFilter {
|
|
68
|
+
/** Filter by specific appliance ID */
|
|
69
|
+
applianceId?: string;
|
|
70
|
+
/** Filter by specific charge point ID */
|
|
71
|
+
chargePointId?: string;
|
|
72
|
+
/** Filter sessions starting after this ISO timestamp */
|
|
73
|
+
startDate?: string;
|
|
74
|
+
/** Filter sessions ending before this ISO timestamp */
|
|
75
|
+
endDate?: string;
|
|
76
|
+
/** Filter by charging session status */
|
|
77
|
+
status?: EnyoChargeStatus;
|
|
78
|
+
/** Filter by chargingCard */
|
|
79
|
+
chargingCardId?: string;
|
|
80
|
+
/** Filter by vehicle */
|
|
81
|
+
vehicleId?: string;
|
|
82
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnyoChargerApplianceAvailableFeaturesEnum = exports.EnyoChargerApplianceAuthorizationModeEnum = exports.EnyoChargerApplianceStatusEnum = void 0;
|
|
4
|
+
var EnyoChargerApplianceStatusEnum;
|
|
5
|
+
(function (EnyoChargerApplianceStatusEnum) {
|
|
6
|
+
EnyoChargerApplianceStatusEnum["Available"] = "Available";
|
|
7
|
+
EnyoChargerApplianceStatusEnum["Occupied"] = "Occupied";
|
|
8
|
+
EnyoChargerApplianceStatusEnum["Suspended"] = "Suspended";
|
|
9
|
+
EnyoChargerApplianceStatusEnum["Finishing"] = "Finishing";
|
|
10
|
+
EnyoChargerApplianceStatusEnum["Reserved"] = "Reserved";
|
|
11
|
+
EnyoChargerApplianceStatusEnum["Unavailable"] = "Unavailable";
|
|
12
|
+
EnyoChargerApplianceStatusEnum["Faulted"] = "Faulted";
|
|
13
|
+
})(EnyoChargerApplianceStatusEnum || (exports.EnyoChargerApplianceStatusEnum = EnyoChargerApplianceStatusEnum = {}));
|
|
14
|
+
var EnyoChargerApplianceAuthorizationModeEnum;
|
|
15
|
+
(function (EnyoChargerApplianceAuthorizationModeEnum) {
|
|
16
|
+
EnyoChargerApplianceAuthorizationModeEnum["AuthorizationRequired"] = "AuthorizationRequired";
|
|
17
|
+
EnyoChargerApplianceAuthorizationModeEnum["NoAuthorization"] = "NoAuthorization";
|
|
18
|
+
})(EnyoChargerApplianceAuthorizationModeEnum || (exports.EnyoChargerApplianceAuthorizationModeEnum = EnyoChargerApplianceAuthorizationModeEnum = {}));
|
|
19
|
+
var EnyoChargerApplianceAvailableFeaturesEnum;
|
|
20
|
+
(function (EnyoChargerApplianceAvailableFeaturesEnum) {
|
|
21
|
+
/** If the charger can limit the power in Ampere or Watt*/
|
|
22
|
+
EnyoChargerApplianceAvailableFeaturesEnum["PowerLimitation"] = "PowerLimitation";
|
|
23
|
+
/** If the charger is capable of smart charging to adjust the charging power in a pre-defined schedule */
|
|
24
|
+
EnyoChargerApplianceAvailableFeaturesEnum["SmartChargingSchedule"] = "SmartChargingSchedule";
|
|
25
|
+
/** If the cable can be locked (only available for socket wallboxes */
|
|
26
|
+
EnyoChargerApplianceAvailableFeaturesEnum["CableLocking"] = "CableLocking";
|
|
27
|
+
/** If the LED of the charger can be dimmed by the user */
|
|
28
|
+
EnyoChargerApplianceAvailableFeaturesEnum["LedDimming"] = "LedDimming";
|
|
29
|
+
/** If the charger has a simple meter to collect the charged electricity consumption */
|
|
30
|
+
EnyoChargerApplianceAvailableFeaturesEnum["SimpleMeter"] = "SimpleMeter";
|
|
31
|
+
/** If the charger has a mid certified meter to collect the charged electricity consumption */
|
|
32
|
+
EnyoChargerApplianceAvailableFeaturesEnum["MidMeter"] = "MidMeter";
|
|
33
|
+
/** If the charger has an eichrecht certified meter to collect the charged electricity consumption */
|
|
34
|
+
EnyoChargerApplianceAvailableFeaturesEnum["EichrechtMeter"] = "EichrechtMeter";
|
|
35
|
+
/** If the charger has a fixed cable attached */
|
|
36
|
+
EnyoChargerApplianceAvailableFeaturesEnum["FixedCable"] = "FixedCable";
|
|
37
|
+
/** If the charger has a socket for charging cable */
|
|
38
|
+
EnyoChargerApplianceAvailableFeaturesEnum["Socket"] = "Socket";
|
|
39
|
+
/** If the charger supports authorization via rfid reader*/
|
|
40
|
+
EnyoChargerApplianceAvailableFeaturesEnum["RfidAuthorization"] = "RfidAuthorization";
|
|
41
|
+
})(EnyoChargerApplianceAvailableFeaturesEnum || (exports.EnyoChargerApplianceAvailableFeaturesEnum = EnyoChargerApplianceAvailableFeaturesEnum = {}));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare enum EnyoChargerApplianceStatusEnum {
|
|
2
|
+
Available = "Available",
|
|
3
|
+
Occupied = "Occupied",
|
|
4
|
+
Suspended = "Suspended",
|
|
5
|
+
Finishing = "Finishing",
|
|
6
|
+
Reserved = "Reserved",
|
|
7
|
+
Unavailable = "Unavailable",
|
|
8
|
+
Faulted = "Faulted"
|
|
9
|
+
}
|
|
10
|
+
export declare enum EnyoChargerApplianceAuthorizationModeEnum {
|
|
11
|
+
AuthorizationRequired = "AuthorizationRequired",
|
|
12
|
+
NoAuthorization = "NoAuthorization"
|
|
13
|
+
}
|
|
14
|
+
export interface EnyoChargerApplianceOcppMetadata {
|
|
15
|
+
chargePointId: string;
|
|
16
|
+
ocppVersion: '1.6' | '2.0.1';
|
|
17
|
+
}
|
|
18
|
+
export declare enum EnyoChargerApplianceAvailableFeaturesEnum {
|
|
19
|
+
/** If the charger can limit the power in Ampere or Watt*/
|
|
20
|
+
PowerLimitation = "PowerLimitation",
|
|
21
|
+
/** If the charger is capable of smart charging to adjust the charging power in a pre-defined schedule */
|
|
22
|
+
SmartChargingSchedule = "SmartChargingSchedule",
|
|
23
|
+
/** If the cable can be locked (only available for socket wallboxes */
|
|
24
|
+
CableLocking = "CableLocking",
|
|
25
|
+
/** If the LED of the charger can be dimmed by the user */
|
|
26
|
+
LedDimming = "LedDimming",
|
|
27
|
+
/** If the charger has a simple meter to collect the charged electricity consumption */
|
|
28
|
+
SimpleMeter = "SimpleMeter",
|
|
29
|
+
/** If the charger has a mid certified meter to collect the charged electricity consumption */
|
|
30
|
+
MidMeter = "MidMeter",
|
|
31
|
+
/** If the charger has an eichrecht certified meter to collect the charged electricity consumption */
|
|
32
|
+
EichrechtMeter = "EichrechtMeter",
|
|
33
|
+
/** If the charger has a fixed cable attached */
|
|
34
|
+
FixedCable = "FixedCable",
|
|
35
|
+
/** If the charger has a socket for charging cable */
|
|
36
|
+
Socket = "Socket",
|
|
37
|
+
/** If the charger supports authorization via rfid reader*/
|
|
38
|
+
RfidAuthorization = "RfidAuthorization"
|
|
39
|
+
}
|
|
40
|
+
export interface EnyoChargerApplianceMetadata {
|
|
41
|
+
availableFeatures: EnyoChargerApplianceAvailableFeaturesEnum[];
|
|
42
|
+
status: EnyoChargerApplianceStatusEnum;
|
|
43
|
+
/** ISO Timestamp of the last heartbeat */
|
|
44
|
+
lastHeartbeatAtIso?: string;
|
|
45
|
+
ocpp?: EnyoChargerApplianceOcppMetadata;
|
|
46
|
+
authorizationMode: EnyoChargerApplianceAuthorizationModeEnum;
|
|
47
|
+
/** If cableType is Socket, the cable can be locked for theft protection */
|
|
48
|
+
cableLocked?: boolean;
|
|
49
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a charging card in the enyo system.
|
|
3
|
+
* Contains all relevant information about an electric vehicle charging card.
|
|
4
|
+
*/
|
|
5
|
+
export interface EnyoChargingCard {
|
|
6
|
+
/** Unique identifier for the charging card */
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
rfid?: string;
|
|
10
|
+
pendingRegistration?: boolean;
|
|
11
|
+
}
|