specific command type
MODIFY
src/server/rest/v1/validator/ChargingStationValidator.ts
src/server/rest/v1/validator/ChargingStationValidator.ts
-import { HttpChargingProfilesRequest, HttpChargingStationCommandRequest, HttpChargingStationConnectorRequest, HttpChargingStationGetFirmwareRequest, HttpChargingStationLimitPowerRequest, HttpChargingStationOcppParametersRequest, HttpChargingStationOcppRequest, HttpChargingStationParamsUpdateRequest, HttpChargingStationRequest, HttpChargingStationsInErrorRequest, HttpChargingStationsRequest, HttpDownloadQrCodeRequest, HttpTriggerSmartChargingRequest } from '../../../../types/requests/HttpChargingStationRequest';
+import { HttpChargingProfilesRequest, HttpChargingStationCommandRequest, HttpChargingStationCommandStopTransactionRequest, HttpChargingStationConnectorRequest, HttpChargingStationGetFirmwareRequest, HttpChargingStationLimitPowerRequest, HttpChargingStationOcppParametersRequest, HttpChargingStationOcppRequest, HttpChargingStationParamsUpdateRequest, HttpChargingStationRequest, HttpChargingStationsInErrorRequest, HttpChargingStationsRequest, HttpDownloadQrCodeRequest, HttpTriggerSmartChargingRequest } from '../../../../types/requests/HttpChargingStationRequest';
import { ChargingProfile } from '../../../../types/ChargingProfile';
import HttpDatabaseRequest from '../../../../types/requests/HttpDatabaseRequest';
@@ -91,7 +91,7 @@ export default class ChargingStationValidator extends SchemaValidator {
return data;
}
- public validateChargingStationActionStopTransactionReq(data: HttpChargingStationCommandRequest): HttpChargingStationCommandRequest {
+ public validateChargingStationActionStopTransactionReq(data: HttpChargingStationCommandRequest): HttpChargingStationCommandStopTransactionRequest {
// Validate schema for StopTransaction
this.validate(this.chargingStationActionStopTransaction, data);
return data;

MODIFY
src/types/requests/HttpChargingStationRequest.ts
src/types/requests/HttpChargingStationRequest.ts
@@ -111,6 +111,12 @@ export interface HttpChargingStationCommandRequest {
args?: any;
}
+export interface HttpChargingStationCommandStopTransactionRequest {
+ chargingStationID: string,
+ args?: {
+ transactionID: string
+ }
+}
export interface HttpIsAuthorizedRequest {
Action: string;
Arg1: any;

specific command type