startTransaction as well
MODIFY
src/server/rest/v1/validator/ChargingStationValidator.ts
src/server/rest/v1/validator/ChargingStationValidator.ts
-import { HttpChargingProfilesRequest, HttpChargingStationCommandRequest, HttpChargingStationCommandStopTransactionRequest, HttpChargingStationConnectorRequest, HttpChargingStationGetFirmwareRequest, HttpChargingStationLimitPowerRequest, HttpChargingStationOcppParametersRequest, HttpChargingStationOcppRequest, HttpChargingStationParamsUpdateRequest, HttpChargingStationRequest, HttpChargingStationsInErrorRequest, HttpChargingStationsRequest, HttpDownloadQrCodeRequest, HttpTriggerSmartChargingRequest } from '../../../../types/requests/HttpChargingStationRequest';
+import { HttpChargingProfilesRequest, HttpChargingStationCommandRequest, HttpChargingStationCommandStartTransactionRequest, 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';
@@ -85,7 +85,7 @@ export default class ChargingStationValidator extends SchemaValidator {
return data;
}
- public validateChargingStationActionStartTransactionReq(data: HttpChargingStationCommandRequest): HttpChargingStationCommandRequest {
+ public validateChargingStationActionStartTransactionReq(data: HttpChargingStationCommandRequest): HttpChargingStationCommandStartTransactionRequest {
// Validate schema for StartTransaction
this.validate(this.chargingStationActionStartTransaction, data);
return data;

MODIFY
src/types/requests/HttpChargingStationRequest.ts
src/types/requests/HttpChargingStationRequest.ts
@@ -111,9 +111,17 @@ export interface HttpChargingStationCommandRequest {
args?: any;
}
+export interface HttpChargingStationCommandStartTransactionRequest {
+ chargingStationID: string,
+ args: {
+ tagID?: string,
+ visualTagID?: string,
+ connectorId: string
+ }
+}
export interface HttpChargingStationCommandStopTransactionRequest {
chargingStationID: string,
- args?: {
+ args: {
transactionID: string
}
}

startTransaction as well