X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2FRequests.ts;h=60724254c8a61390bcee73787bfc4facdaa8514f;hb=e3822d6f1b40477f7308ad70c290ed2c4106c585;hp=16a79c05d2cf74365cd09f2e102af269cfe08b0a;hpb=094889611486ef8717ae9d6850a1ccb1e6ca6027;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/Requests.ts b/src/types/ocpp/Requests.ts index 16a79c05..60724254 100644 --- a/src/types/ocpp/Requests.ts +++ b/src/types/ocpp/Requests.ts @@ -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; +export type IncomingRequestHandler = ( + commandPayload: JsonObject +) => JsonObject | Promise; -export type ResponseType = JsonType | OCPPError; +export type ResponseType = JsonObject | OCPPError; export interface RequestParams { skipBufferingOnError?: boolean;