Fix Json type definition naming
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / Requests.ts
index 16a79c05d2cf74365cd09f2e102af269cfe08b0a..60724254c8a61390bcee73787bfc4facdaa8514f 100644 (file)
@@ -7,26 +7,33 @@ import {
   OCPP16StatusNotificationRequest,
 } from './1.6/Requests';
 
-import { JsonType } from '../JsonType';
+import { JsonObject } from '../JsonType';
 import { MessageType } from './MessageType';
 import { OCPP16DiagnosticsStatus } from './1.6/DiagnosticsStatus';
 import { OCPP16MeterValuesRequest } from './1.6/MeterValues';
 import OCPPError from '../../exception/OCPPError';
 
-export type OutgoingRequest = [MessageType.CALL_MESSAGE, string, RequestCommand, JsonType];
+export type OutgoingRequest = [MessageType.CALL_MESSAGE, string, RequestCommand, JsonObject];
 
-export type IncomingRequest = [MessageType.CALL_MESSAGE, string, IncomingRequestCommand, JsonType];
+export type IncomingRequest = [
+  MessageType.CALL_MESSAGE,
+  string,
+  IncomingRequestCommand,
+  JsonObject
+];
 
 export type CachedRequest = [
-  (payload: JsonType, requestPayload: JsonType) => void,
+  (payload: JsonObject, requestPayload: JsonObject) => void,
   (error: OCPPError, requestStatistic?: boolean) => void,
   RequestCommand | IncomingRequestCommand,
-  JsonType
+  JsonObject
 ];
 
-export type IncomingRequestHandler = (commandPayload: JsonType) => JsonType | Promise<JsonType>;
+export type IncomingRequestHandler = (
+  commandPayload: JsonObject
+) => JsonObject | Promise<JsonObject>;
 
-export type ResponseType = JsonType | OCPPError;
+export type ResponseType = JsonObject | OCPPError;
 
 export interface RequestParams {
   skipBufferingOnError?: boolean;