Incoming requests payload validation with JSON schemas (#135)
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / Requests.ts
index 1499e4ff11237f98df2b57b05bfc1af9fff9fec1..145947aec338ba0d6b557b4954a51102d73be4a9 100644 (file)
@@ -1,11 +1,10 @@
-import { ChargingProfilePurposeType, OCPP16ChargingProfile } from './ChargingProfile';
-
 import { EmptyObject } from '../../EmptyObject';
 import { JsonObject } from '../../JsonType';
 import { OCPP16ChargePointErrorCode } from './ChargePointErrorCode';
 import { OCPP16ChargePointStatus } from './ChargePointStatus';
-import { OCPP16DiagnosticsStatus } from './DiagnosticsStatus';
+import { ChargingProfilePurposeType, OCPP16ChargingProfile } from './ChargingProfile';
 import { OCPP16StandardParametersKey } from './Configuration';
+import { OCPP16DiagnosticsStatus } from './DiagnosticsStatus';
 
 export enum OCPP16RequestCommand {
   BOOT_NOTIFICATION = 'BootNotification',
@@ -18,21 +17,6 @@ export enum OCPP16RequestCommand {
   DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification',
 }
 
-export enum OCPP16IncomingRequestCommand {
-  RESET = 'Reset',
-  CLEAR_CACHE = 'ClearCache',
-  CHANGE_AVAILABILITY = 'ChangeAvailability',
-  UNLOCK_CONNECTOR = 'UnlockConnector',
-  GET_CONFIGURATION = 'GetConfiguration',
-  CHANGE_CONFIGURATION = 'ChangeConfiguration',
-  SET_CHARGING_PROFILE = 'SetChargingProfile',
-  CLEAR_CHARGING_PROFILE = 'ClearChargingProfile',
-  REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
-  REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction',
-  GET_DIAGNOSTICS = 'GetDiagnostics',
-  TRIGGER_MESSAGE = 'TriggerMessage',
-}
-
 export type OCPP16HeartbeatRequest = EmptyObject;
 
 export interface OCPP16BootNotificationRequest extends JsonObject {
@@ -57,6 +41,23 @@ export interface OCPP16StatusNotificationRequest extends JsonObject {
   vendorErrorCode?: string;
 }
 
+export enum OCPP16IncomingRequestCommand {
+  RESET = 'Reset',
+  CLEAR_CACHE = 'ClearCache',
+  CHANGE_AVAILABILITY = 'ChangeAvailability',
+  UNLOCK_CONNECTOR = 'UnlockConnector',
+  GET_CONFIGURATION = 'GetConfiguration',
+  CHANGE_CONFIGURATION = 'ChangeConfiguration',
+  SET_CHARGING_PROFILE = 'SetChargingProfile',
+  CLEAR_CHARGING_PROFILE = 'ClearChargingProfile',
+  REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
+  REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction',
+  GET_DIAGNOSTICS = 'GetDiagnostics',
+  TRIGGER_MESSAGE = 'TriggerMessage',
+}
+
+export type OCPP16ClearCacheRequest = EmptyObject;
+
 export interface ChangeConfigurationRequest extends JsonObject {
   key: string | OCPP16StandardParametersKey;
   value: string;