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;