Handle mandatory params in cpo token. Added missing action in exception
MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/cpo/CPOTokensEndpoint.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/cpo/CPOTokensEndpoint.ts
@@ -42,8 +42,28 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
const countryCode = urlSegment.shift();
const partyId = urlSegment.shift();
const tokenId = urlSegment.shift();
+ if (!tokenId) {
+ throw new AppError({
+ source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_GET_TOKEN,
+ module: MODULE_NAME, method: 'getToken',
+ errorCode: StatusCodes.BAD_REQUEST,
+ message: `Token ID is not provided`,
+ ocpiError: OCPIStatusCode.CODE_2001_INVALID_PARAMETER_ERROR
+ });
+ }
// Retrieve token
const token = await OCPIUtilsService.getToken(tenant, countryCode, partyId, tokenId);
+ if (!token) {
+ throw new AppError({
+ source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_GET_TOKEN,
+ module: MODULE_NAME, method: 'getToken',
+ errorCode: StatusCodes.BAD_REQUEST,
+ message: `Token ID '${tokenId}' not found`,
+ ocpiError: OCPIStatusCode.CODE_2001_INVALID_PARAMETER_ERROR
+ });
+ }
return OCPIUtils.success(token);
}
@@ -55,16 +75,21 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
const countryCode = urlSegment.shift();
const partyId = urlSegment.shift();
const tokenId = urlSegment.shift();
- Logging.logDebug({
- tenantID: tenant.id,
- action: ServerAction.OCPI_PUSH_TOKEN,
+ if (!tokenId) {
+ throw new AppError({
+ source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_TOKEN,
module: MODULE_NAME, method: 'putToken',
- message: `Updating Token ID '${tokenId}' for eMSP '${countryCode}/${partyId}'`
+ errorCode: StatusCodes.BAD_REQUEST,
+ message: `Token ID is not provided`,
+ ocpiError: OCPIStatusCode.CODE_2001_INVALID_PARAMETER_ERROR
});
+ }
const updatedToken = req.body as OCPIToken;
if (!updatedToken) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_TOKEN,
module: MODULE_NAME, method: 'putToken',
errorCode: StatusCodes.BAD_REQUEST,
message: `Missing content to put token ${tokenId}`,
@@ -73,10 +98,20 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
}
// Retrieve token
const tag = await TagStorage.getTag(tenant.id, tokenId, { withUser: true });
- if (tag) {
+ if (!tag) {
+ throw new AppError({
+ source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_TOKEN,
+ module: MODULE_NAME, method: 'putToken',
+ errorCode: StatusCodes.BAD_REQUEST,
+ message: `Token ID '${tokenId}' not found`,
+ ocpiError: OCPIStatusCode.CODE_2001_INVALID_PARAMETER_ERROR
+ });
+ }
if (tag.issuer) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_TOKEN,
module: MODULE_NAME, method: 'putToken',
errorCode: StatusCodes.NOT_FOUND,
message: `Invalid User found for Token ID '${tokenId}', Token does not belongs to OCPI`,
@@ -86,6 +121,7 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
if (tag.user?.issuer) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_TOKEN,
module: MODULE_NAME, method: 'putToken',
errorCode: StatusCodes.NOT_FOUND,
message: `Invalid User found for Token ID '${tokenId}', Token issued locally`,
@@ -95,13 +131,13 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
if (tag.user.name !== OCPIUtils.buildOperatorName(countryCode, partyId)) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_TOKEN,
module: MODULE_NAME, method: 'putToken',
errorCode: StatusCodes.CONFLICT,
message: `Invalid User found for Token ID '${tokenId}', Token belongs to another partner`,
ocpiError: OCPIStatusCode.CODE_2001_INVALID_PARAMETER_ERROR
});
}
- }
await OCPIUtilsService.updateToken(tenant.id, ocpiEndpoint, updatedToken, tag, tag.user);
return OCPIUtils.success();
}
@@ -124,6 +160,7 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
if (!patchedTag) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_TOKEN,
module: MODULE_NAME, method: 'patchToken',
errorCode: StatusCodes.BAD_REQUEST,
message: `Missing content to patch Token ID '${tokenId}'`,
@@ -135,6 +172,7 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
if (!tag || !tag.ocpiToken || tag.issuer) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_TOKEN,
module: MODULE_NAME, method: 'patchToken',
errorCode: StatusCodes.NOT_FOUND,
message: `Invalid User found for Token ID '${tokenId}', Token does not belongs to OCPI`,
@@ -144,6 +182,7 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
if (!tag.user) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_TOKEN,
module: MODULE_NAME, method: 'patchToken',
errorCode: StatusCodes.NOT_FOUND,
message: `No User found for Token ID '${tokenId}'`,
@@ -153,6 +192,7 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
if (tag.user.issuer) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_TOKEN,
module: MODULE_NAME, method: 'patchToken',
errorCode: StatusCodes.NOT_FOUND,
message: `Invalid User found for Token ID '${tokenId}', Token issued locally`,
@@ -162,6 +202,7 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
if (tag.user.name !== OCPIUtils.buildOperatorName(countryCode, partyId)) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_TOKEN,
module: MODULE_NAME, method: 'patchToken',
errorCode: StatusCodes.CONFLICT,
message: `Invalid User found for Token '${tokenId}', Token belongs to another partner`,
@@ -197,6 +238,7 @@ export default class CPOTokensEndpoint extends AbstractEndpoint {
if (!patched) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_TOKEN,
module: MODULE_NAME, method: 'patchToken',
errorCode: StatusCodes.BAD_REQUEST,
message: `Missing or invalid content to patch Token ID '${tokenId}'`,

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPCdrsEndpoint.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPCdrsEndpoint.ts
@@ -11,6 +11,7 @@ import { OCPIResponse } from '../../../../../types/ocpi/OCPIResponse';
import { OCPIStatusCode } from '../../../../../types/ocpi/OCPIStatusCode';
import OCPIUtils from '../../../OCPIUtils';
import OCPIUtilsService from '../OCPIUtilsService';
+import { ServerAction } from '../../../../../types/Server';
import Tenant from '../../../../../types/Tenant';
import Transaction from '../../../../../types/Transaction';
import TransactionStorage from '../../../../../storage/mongodb/TransactionStorage';
@@ -40,6 +41,7 @@ export default class EMSPCdrsEndpoint extends AbstractEndpoint {
if (!id) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PULL_CDRS,
module: MODULE_NAME, method: 'getCdrRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing request parameters',
@@ -47,9 +49,10 @@ export default class EMSPCdrsEndpoint extends AbstractEndpoint {
});
}
const transaction: Transaction = await TransactionStorage.getOCPITransaction(tenant.id, id);
- if (!transaction || !transaction.ocpiData || !transaction.ocpiData.cdr) {
+ if (!transaction?.ocpiData?.cdr) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PULL_CDRS,
module: MODULE_NAME, method: 'getCdrRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: `The CDR ID '${id}' does not exist or does not belong to the requester`,

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPCommandsEndpoint.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPCommandsEndpoint.ts
@@ -36,10 +36,10 @@ export default class CPOCommandsEndpoint extends AbstractEndpoint {
case OCPICommandType.STOP_SESSION:
case OCPICommandType.RESERVE_NOW:
case OCPICommandType.UNLOCK_CONNECTOR:
- Logging.logDebug({
+ Logging.logWarning({
tenantID: tenant.id,
action: this.getAction(command),
- message: `OCPI command response received for action '${command}' with ID '${commandId}'` ,
+ message: `OCPI command response received for action '${command}' with ID '${commandId}' - No action done` ,
module: MODULE_NAME, method: 'process',
detailedMessages: { response : req.body }
});

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPLocationsEndpoint.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPLocationsEndpoint.ts
@@ -52,6 +52,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
if (!countryCode || !partyId || !locationId) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_LOCATION,
module: MODULE_NAME, method: 'patchLocationRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing request parameters',
@@ -68,6 +69,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
if (!chargingStation) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_LOCATION,
module: MODULE_NAME, method: 'patchLocationRequest',
errorCode: StatusCodes.NOT_FOUND,
message: `Unknown Charging Station ID '${evseUid}'`,
@@ -82,7 +84,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
} else {
Logging.logDebug({
tenantID: tenant.id,
- action: ServerAction.OCPI_PATCH_LOCATIONS,
+ action: ServerAction.OCPI_PATCH_LOCATION,
message: `Patching of Location ID '${locationId}' is not supported currently`,
source: Constants.CENTRAL_SERVER,
module: MODULE_NAME, method: 'patchLocationRequest',
@@ -103,6 +105,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
if (!countryCode || !partyId || !locationId) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_LOCATION,
module: MODULE_NAME, method: 'updateLocationRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing request parameters',
@@ -178,7 +181,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
if (!found) {
Logging.logError({
tenantID: tenant.id,
- action: ServerAction.OCPI_PATCH_LOCATIONS,
+ action: ServerAction.OCPI_PATCH_LOCATION,
message: `Patching of Connector ID '${connectorId}' of Charging Station '${chargingStation.id}' failed because connector was not found`,
source: Constants.CENTRAL_SERVER,
module: MODULE_NAME, method: 'patchConnector',
@@ -196,7 +199,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
await ChargingStationStorage.deleteChargingStation(tenant.id, chargingStation.id);
Logging.logInfo({
tenantID: tenant.id,
- action: ServerAction.OCPI_PATCH_LOCATIONS,
+ action: ServerAction.OCPI_PATCH_LOCATION,
message: `Charging Station '${evseUid}' of Location ID '${locationId}' has been deleted`,
source: Constants.CENTRAL_SERVER,
module: MODULE_NAME, method: 'updateEvse',
@@ -205,7 +208,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
} else {
Logging.logError({
tenantID: tenant.id,
- action: ServerAction.OCPI_PATCH_LOCATIONS,
+ action: ServerAction.OCPI_PATCH_LOCATION,
message: `Charging Station '${evseUid}' of Location ID '${locationId}' does not exist and cannot be deleted`,
source: Constants.CENTRAL_SERVER,
module: MODULE_NAME, method: 'updateEvse',
@@ -218,7 +221,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
await ChargingStationStorage.saveChargingStation(tenant.id, chargingStation);
Logging.logDebug({
tenantID: tenant.id,
- action: ServerAction.OCPI_PATCH_LOCATIONS,
+ action: ServerAction.OCPI_PATCH_LOCATION,
message: `Charging Station '${evseUid}' of Location ID '${locationId}' has been updated`,
source: Constants.CENTRAL_SERVER,
module: MODULE_NAME, method: 'updateEvse',
@@ -233,7 +236,7 @@ export default class EMSPLocationsEndpoint extends AbstractEndpoint {
if (!chargingStation) {
Logging.logError({
tenantID: tenant.id,
- action: ServerAction.OCPI_PATCH_LOCATIONS,
+ action: ServerAction.OCPI_PATCH_LOCATION,
message: `Unable to update connector of non existing Charging Station '${evseUid}' of Location ID '${locationId}'`,
source: Constants.CENTRAL_SERVER,
module: MODULE_NAME, method: 'updateLocation',

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPSessionsEndpoint.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPSessionsEndpoint.ts
@@ -11,6 +11,7 @@ import { OCPISession } from '../../../../../types/ocpi/OCPISession';
import { OCPIStatusCode } from '../../../../../types/ocpi/OCPIStatusCode';
import OCPIUtils from '../../../OCPIUtils';
import OCPIUtilsService from '../OCPIUtilsService';
+import { ServerAction } from '../../../../../types/Server';
import { StatusCodes } from 'http-status-codes';
import Tenant from '../../../../../types/Tenant';
import Transaction from '../../../../../types/Transaction';
@@ -45,6 +46,7 @@ export default class EMSPSessionsEndpoint extends AbstractEndpoint {
if (!countryCode || !partyId || !sessionId) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PULL_SESSIONS,
module: MODULE_NAME, method: 'getSessionRequest',
errorCode: StatusCodes.BAD_REQUEST,
message: 'Missing request parameters',
@@ -55,6 +57,7 @@ export default class EMSPSessionsEndpoint extends AbstractEndpoint {
if (!transaction) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PULL_SESSIONS,
module: MODULE_NAME, method: 'getSessionRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: `No Transaction found for ocpi session ${sessionId}`,
@@ -75,6 +78,7 @@ export default class EMSPSessionsEndpoint extends AbstractEndpoint {
if (!countryCode || !partyId || !sessionId) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_SESSION,
module: MODULE_NAME, method: 'putSessionRequest',
errorCode: StatusCodes.BAD_REQUEST,
message: 'Missing request parameters',
@@ -87,6 +91,7 @@ export default class EMSPSessionsEndpoint extends AbstractEndpoint {
} else if (session.id !== sessionId) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PUT_SESSION,
module: MODULE_NAME, method: 'putSessionRequest',
errorCode: StatusCodes.BAD_REQUEST,
message: `Transaction ID '${session.id}' does not match request parameter '${sessionId}'`,
@@ -108,6 +113,7 @@ export default class EMSPSessionsEndpoint extends AbstractEndpoint {
if (!countryCode || !partyId || !sessionId) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_SESSION,
module: MODULE_NAME, method: 'patchSessionRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing request parameters',
@@ -118,6 +124,7 @@ export default class EMSPSessionsEndpoint extends AbstractEndpoint {
if (!transaction) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_SESSION,
module: MODULE_NAME, method: 'patchSessionRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: `No Transaction found for OCPI Transaction ID '${sessionId}'`,
@@ -149,6 +156,7 @@ export default class EMSPSessionsEndpoint extends AbstractEndpoint {
if (!patched) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_PATCH_SESSION,
module: MODULE_NAME, method: 'patchSessionRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing request parameters',

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPTariffsEndpoint.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPTariffsEndpoint.ts
@@ -43,6 +43,7 @@ export default class EMSPTariffsEndpoint extends AbstractEndpoint {
if (!countryCode || !partyId || !tariffId) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_GET_TARIFF,
module: MODULE_NAME, method: 'getTariffRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing request parameters',

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPTokensEndpoint.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/emsp/EMSPTokensEndpoint.ts
@@ -13,6 +13,7 @@ import { OCPIResponse } from '../../../../../types/ocpi/OCPIResponse';
import { OCPIStatusCode } from '../../../../../types/ocpi/OCPIStatusCode';
import OCPIUtils from '../../../OCPIUtils';
import OCPIUtilsService from '../OCPIUtilsService';
+import { ServerAction } from '../../../../../types/Server';
import TagStorage from '../../../../../storage/mongodb/TagStorage';
import Tenant from '../../../../../types/Tenant';
import { UserStatus } from '../../../../../types/User';
@@ -64,6 +65,7 @@ export default class EMSPTokensEndpoint extends AbstractEndpoint {
if (!tokenId) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_AUTHORIZE_TOKEN,
module: MODULE_NAME, method: 'authorizeRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing request parameters',
@@ -74,6 +76,7 @@ export default class EMSPTokensEndpoint extends AbstractEndpoint {
if (!locationReference) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_AUTHORIZE_TOKEN,
module: MODULE_NAME, method: 'authorizeRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing LocationReference',
@@ -83,6 +86,7 @@ export default class EMSPTokensEndpoint extends AbstractEndpoint {
if (!locationReference.evse_uids || locationReference.evse_uids.length === 0) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_AUTHORIZE_TOKEN,
module: MODULE_NAME, method: 'authorizeRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Missing Charging Station ID',
@@ -92,6 +96,7 @@ export default class EMSPTokensEndpoint extends AbstractEndpoint {
if (locationReference.evse_uids.length > 1) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_AUTHORIZE_TOKEN,
module: MODULE_NAME, method: 'authorizeRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'Invalid or missing parameters : does not support authorization request on multiple Charging Stations',
@@ -103,6 +108,7 @@ export default class EMSPTokensEndpoint extends AbstractEndpoint {
if (!chargingStation) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_AUTHORIZE_TOKEN,
module: MODULE_NAME, method: 'authorizeRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: `Unknown Charging Station '${locationReference.evse_uids[0]}'`,
@@ -113,6 +119,7 @@ export default class EMSPTokensEndpoint extends AbstractEndpoint {
if (!tag?.user) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
+ action: ServerAction.OCPI_AUTHORIZE_TOKEN,
module: MODULE_NAME, method: 'authorizeRequest',
errorCode: HTTPError.GENERAL_ERROR,
message: 'UNKNOWN USER',

MODIFY
src/server/rest/v1/service/OCPIEndpointService.ts
src/server/rest/v1/service/OCPIEndpointService.ts
@@ -659,7 +659,7 @@ export default class OCPIEndpointService {
if (!patchStatusesLock) {
throw new AppError({
source: Constants.CENTRAL_SERVER,
- action: ServerAction.OCPI_PATCH_LOCATIONS,
+ action: ServerAction.OCPI_PATCH_LOCATION,
errorCode: HTTPError.CANNOT_ACQUIRE_LOCK,
message: 'Error in pushing the OCPI EVSE Statuses: cannot acquire the lock',
module: MODULE_NAME, method: 'handlePushEVSEStatusesOcpiEndpoint',

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -122,9 +122,13 @@ export enum ServerAction {
OCPI_ENDPOINT = 'OcpiEndpoint',
OCPI_REGISTER = 'OcpiRegister',
OCPI_AUTHORIZE_TOKEN = 'OcpiAuthorizeToken',
+ OCPI_PUT_TOKEN = 'OcpiPutToken',
OCPI_PATCH_TOKEN = 'OcpiPatchToken',
- OCPI_PATCH_LOCATIONS = 'OcpiPatchLocations',
+ OCPI_PATCH_LOCATION = 'OcpiPatchLocation',
OCPI_PATCH_STATUS = 'OcpiPatchStatus',
+ OCPI_PATCH_SESSION = 'OcpiPatchSession',
+ OCPI_PUT_LOCATION = 'OcpiPutLocation',
+ OCPI_PUT_SESSION = 'OcpiPutSession',
OCPI_CHECK_CDRS = 'OcpiCheckCdrs',
OCPI_CHECK_SESSIONS = 'OcpiCheckSessions',
OCPI_CHECK_LOCATIONS = 'OcpiCheckLocations',
@@ -145,6 +149,7 @@ export enum ServerAction {
OCPI_UNLOCK_CONNECTOR = 'OcpiUnlockConnector',
OCPI_GET_VERSIONS = 'OcpiGetVersions',
OCPI_GET_LOCATIONS = 'OcpiGetLocations',
+ OCPI_GET_TOKEN = 'OcpiGetToken',
OCPI_GET_TARIFF = 'OcpiGetTariff',
OCPI_GET_TARIFFS = 'OcpiGetTariffs',
OCPI_POST_CREDENTIALS = 'OcpiPostCredentials',

Handle mandatory params in cpo token. Added missing action in exception