OCPPVersion,
type RequestParams,
} from '../../../types';
-import type {
- OCPP16CancelReservationRequest,
- OCPP16ReserveNowRequest,
-} from '../../../types/ocpp/1.6/Requests';
import { Constants, Utils } from '../../../utils';
import { OCPPRequestService } from '../OCPPRequestService';
import type { OCPPResponseService } from '../OCPPResponseService';
'constructor'
),
],
- [
- OCPP16RequestCommand.RESERVE_NOW,
- OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16ReserveNowRequest>(
- 'assets/json-schemas/ocpp/1.6/ReserveNow.json',
- moduleName,
- 'constructor'
- ),
- ],
- [
- OCPP16RequestCommand.CANCEL_RESERVATION,
- OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16CancelReservationRequest>(
- 'assets/json-schemas/ocpp/1.6/CancelReservation.json',
- moduleName,
- 'constructor'
- ),
- ],
]);
this.buildRequestPayload = this.buildRequestPayload.bind(this) as <Request extends JsonType>(
chargingStation: ChargingStation,
'constructor'
),
],
- [
- OCPP16RequestCommand.RESERVE_NOW,
- OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16ReserveNowResponse>(
- 'assets/json-schemas/ocpp/1.6/ReserveNowResponse.json',
- moduleName,
- 'constructor'
- ),
- ],
- [
- OCPP16RequestCommand.CANCEL_RESERVATION,
- OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16CancelReservationResponse>(
- 'assets/json-schemas/ocpp/1.6/CancelReservationResponse.json',
- moduleName,
- 'constructor'
- ),
- ],
]);
this.jsonIncomingRequestResponseSchemas = new Map([
[
'constructor'
),
],
+ [
+ OCPP16IncomingRequestCommand.RESERVE_NOW,
+ OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16ReserveNowResponse>(
+ 'assets/json-schemas/ocpp/1.6/ReserveNowResponse.json',
+ moduleName,
+ 'constructor'
+ ),
+ ],
+ [
+ OCPP16IncomingRequestCommand.CANCEL_RESERVATION,
+ OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16CancelReservationResponse>(
+ 'assets/json-schemas/ocpp/1.6/CancelReservationResponse.json',
+ moduleName,
+ 'constructor'
+ ),
+ ],
]);
this.validatePayload = this.validatePayload.bind(this) as (
chargingStation: ChargingStation,
DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification',
FIRMWARE_STATUS_NOTIFICATION = 'FirmwareStatusNotification',
DATA_TRANSFER = 'DataTransfer',
- RESERVE_NOW = 'ReserveNow',
- CANCEL_RESERVATION = 'CancelReservation',
}
export enum OCPP16IncomingRequestCommand {