refactor(simulator): cleanup JSON type usage in OCPP payload validation
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 2.0 / OCPP20IncomingRequestService.ts
index b5790b5697506c4ac3911894e052751d03659ad4..6344d36d01aa607e7aed7f3523c11a1da96f440e 100644 (file)
@@ -8,7 +8,6 @@ import { OCPPError } from '../../../exception';
 import {
   ErrorType,
   type IncomingRequestHandler,
-  type JsonObject,
   type JsonType,
   type OCPP20ClearCacheRequest,
   OCPP20IncomingRequestCommand,
@@ -20,7 +19,7 @@ import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService';
 const moduleName = 'OCPP20IncomingRequestService';
 
 export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
-  protected jsonSchemas: Map<OCPP20IncomingRequestCommand, JSONSchemaType<JsonObject>>;
+  protected jsonSchemas: Map<OCPP20IncomingRequestCommand, JSONSchemaType<JsonType>>;
   private incomingRequestHandlers: Map<OCPP20IncomingRequestCommand, IncomingRequestHandler>;
 
   public constructor() {
@@ -31,7 +30,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
     this.incomingRequestHandlers = new Map<OCPP20IncomingRequestCommand, IncomingRequestHandler>([
       [OCPP20IncomingRequestCommand.CLEAR_CACHE, this.handleRequestClearCache.bind(this)],
     ]);
-    this.jsonSchemas = new Map<OCPP20IncomingRequestCommand, JSONSchemaType<JsonObject>>([
+    this.jsonSchemas = new Map<OCPP20IncomingRequestCommand, JSONSchemaType<JsonType>>([
       [
         OCPP20IncomingRequestCommand.CLEAR_CACHE,
         OCPP20ServiceUtils.parseJsonSchemaFile<OCPP20ClearCacheRequest>(