Merge dependabot/npm_and_yarn/types/tar-6.1.12 into combined-prs-branch
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 2.0 / Variables.ts
index 59b1b023bfbf6b0362590f6393ab435b77e0b0f8..04a344564bcd202e3a6ab5dcef35798545b09620 100644 (file)
@@ -1,5 +1,5 @@
-import type { EVSEType, StatusInfoType } from './Common';
-import type { JsonObject } from '../../JsonType';
+import type { JsonObject } from '../../JsonType.js'
+import type { EVSEType, StatusInfoType } from './Common.js'
 
 enum OCPP20ComponentName {
   AlignedDataCtrlr = 'AlignedDataCtrlr',
@@ -19,7 +19,7 @@ enum OCPP20ComponentName {
   SecurityCtrlr = 'SecurityCtrlr',
   SmartChargingCtrlr = 'SmartChargingCtrlr',
   TariffCostCtrlr = 'TariffCostCtrlr',
-  TxCtrlr = 'TxCtrlr',
+  TxCtrlr = 'TxCtrlr'
 }
 
 export enum OCPP20RequiredVariableName {
@@ -50,48 +50,48 @@ export enum OCPP20RequiredVariableName {
   TxEndedMeasurands = 'TxEndedMeasurands',
   TxStartedMeasurands = 'TxStartedMeasurands',
   TxUpdatedMeasurands = 'TxUpdatedMeasurands',
-  TxUpdatedInterval = 'TxUpdatedInterval',
+  TxUpdatedInterval = 'TxUpdatedInterval'
 }
 
 export enum OCPP20OptionalVariableName {
   HeartbeatInterval = 'HeartbeatInterval',
-  WebSocketPingInterval = 'WebSocketPingInterval',
+  WebSocketPingInterval = 'WebSocketPingInterval'
 }
 
 export enum OCPP20VendorVariableName {
-  ConnectionUrl = 'ConnectionUrl',
+  ConnectionUrl = 'ConnectionUrl'
 }
 
 enum AttributeEnumType {
   Actual = 'Actual',
   Target = 'Target',
   MinSet = 'MinSet',
-  MaxSet = 'MaxSet',
+  MaxSet = 'MaxSet'
 }
 
-type ComponentType = {
-  name: string | OCPP20ComponentName;
-  instance?: string;
-  evse?: EVSEType;
-} & JsonObject;
+interface ComponentType extends JsonObject {
+  name: string | OCPP20ComponentName
+  instance?: string
+  evse?: EVSEType
+}
 
 type VariableName =
   | string
   | OCPP20RequiredVariableName
   | OCPP20OptionalVariableName
-  | OCPP20VendorVariableName;
+  | OCPP20VendorVariableName
 
-type VariableType = {
-  name: VariableName;
-  instance?: string;
-} & JsonObject;
+interface VariableType extends JsonObject {
+  name: VariableName
+  instance?: string
+}
 
-export type OCPP20SetVariableDataType = {
-  attributeType?: AttributeEnumType;
-  attributeValue: string;
-  component: ComponentType;
-  variable: VariableType;
-} & JsonObject;
+export interface OCPP20SetVariableDataType extends JsonObject {
+  attributeType?: AttributeEnumType
+  attributeValue: string
+  component: ComponentType
+  variable: VariableType
+}
 
 enum SetVariableStatusEnumType {
   Accepted = 'Accepted',
@@ -99,18 +99,18 @@ enum SetVariableStatusEnumType {
   UnknownComponent = 'UnknownComponent',
   UnknownVariable = 'UnknownVariable',
   NotSupportedAttributeType = 'NotSupportedAttributeType',
-  RebootRequired = 'RebootRequired',
+  RebootRequired = 'RebootRequired'
 }
 
-export type OCPP20SetVariableResultType = {
-  attributeType?: AttributeEnumType;
-  attributeStatus: SetVariableStatusEnumType;
-  component: ComponentType;
-  variable: VariableType;
-  attributeStatusInfo?: StatusInfoType;
-} & JsonObject;
+export interface OCPP20SetVariableResultType extends JsonObject {
+  attributeType?: AttributeEnumType
+  attributeStatus: SetVariableStatusEnumType
+  component: ComponentType
+  variable: VariableType
+  attributeStatusInfo?: StatusInfoType
+}
 
-type OCPP20ComponentVariableType = {
-  component: ComponentType;
-  variable?: VariableType;
-} & JsonObject;
+export interface OCPP20ComponentVariableType extends JsonObject {
+  component: ComponentType
+  variable?: VariableType
+}