@citrineos/base
Version:
The base module for OCPP v2.0.1 including all interfaces. This module is not intended to be used directly, but rather as a dependency for other modules.
341 lines • 27.1 kB
JavaScript
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
//
// SPDX-License-Identifier: Apache-2.0
import { OCPP1_6, OCPP2_0_1, OCPP2_1 } from '../../ocpp/model/index.js';
import { OCPP_CallAction } from '../../ocpp/rpc/message.js';
export const OCPP1_6_CALL_SCHEMA_RECORD = {
[]: OCPP1_6.AuthorizeRequestSchema,
[]: OCPP1_6.BootNotificationRequestSchema,
[]: OCPP1_6.CancelReservationRequestSchema,
[]: OCPP1_6.ChangeAvailabilityRequestSchema,
[]: OCPP1_6.ChangeConfigurationRequestSchema,
[]: OCPP1_6.ClearCacheRequestSchema,
[]: OCPP1_6.ClearChargingProfileRequestSchema,
[]: OCPP1_6.DataTransferRequestSchema,
[]: OCPP1_6.DiagnosticsStatusNotificationRequestSchema,
[]: OCPP1_6.FirmwareStatusNotificationRequestSchema,
[]: OCPP1_6.GetCompositeScheduleRequestSchema,
[]: OCPP1_6.GetConfigurationRequestSchema,
[]: OCPP1_6.GetDiagnosticsRequestSchema,
[]: OCPP1_6.GetLocalListVersionRequestSchema,
[]: OCPP1_6.HeartbeatRequestSchema,
[]: OCPP1_6.MeterValuesRequestSchema,
[]: OCPP1_6.RemoteStartTransactionRequestSchema,
[]: OCPP1_6.RemoteStopTransactionRequestSchema,
[]: OCPP1_6.ReserveNowRequestSchema,
[]: OCPP1_6.ResetRequestSchema,
[]: OCPP1_6.SendLocalListRequestSchema,
[]: OCPP1_6.SetChargingProfileRequestSchema,
[]: OCPP1_6.StartTransactionRequestSchema,
[]: OCPP1_6.StatusNotificationRequestSchema,
[]: OCPP1_6.StopTransactionRequestSchema,
[]: OCPP1_6.TriggerMessageRequestSchema,
[]: OCPP1_6.UnlockConnectorRequestSchema,
[]: OCPP1_6.UpdateFirmwareRequestSchema,
};
// Action requests supported by OCPP 2.0.1
export const OCPP2_0_1_CALL_SCHEMA_RECORD = {
[]: OCPP2_0_1.AuthorizeRequestSchema,
[]: OCPP2_0_1.BootNotificationRequestSchema,
[]: OCPP2_0_1.CancelReservationRequestSchema,
[]: OCPP2_0_1.CertificateSignedRequestSchema,
[]: OCPP2_0_1.ChangeAvailabilityRequestSchema,
[]: OCPP2_0_1.ClearCacheRequestSchema,
[]: OCPP2_0_1.ClearChargingProfileRequestSchema,
[]: OCPP2_0_1.ClearDisplayMessageRequestSchema,
[]: OCPP2_0_1.ClearedChargingLimitRequestSchema,
[]: OCPP2_0_1.ClearVariableMonitoringRequestSchema,
[]: OCPP2_0_1.CostUpdatedRequestSchema,
[]: OCPP2_0_1.CustomerInformationRequestSchema,
[]: OCPP2_0_1.DataTransferRequestSchema,
[]: OCPP2_0_1.DeleteCertificateRequestSchema,
[]: OCPP2_0_1.FirmwareStatusNotificationRequestSchema,
[]: OCPP2_0_1.Get15118EVCertificateRequestSchema,
[]: OCPP2_0_1.GetBaseReportRequestSchema,
[]: OCPP2_0_1.GetCertificateStatusRequestSchema,
[]: OCPP2_0_1.GetChargingProfilesRequestSchema,
[]: OCPP2_0_1.GetCompositeScheduleRequestSchema,
[]: OCPP2_0_1.GetDisplayMessagesRequestSchema,
[]: OCPP2_0_1.GetInstalledCertificateIdsRequestSchema,
[]: OCPP2_0_1.GetLocalListVersionRequestSchema,
[]: OCPP2_0_1.GetLogRequestSchema,
[]: OCPP2_0_1.GetMonitoringReportRequestSchema,
[]: OCPP2_0_1.GetReportRequestSchema,
[]: OCPP2_0_1.GetTransactionStatusRequestSchema,
[]: OCPP2_0_1.GetVariablesRequestSchema,
[]: OCPP2_0_1.HeartbeatRequestSchema,
[]: OCPP2_0_1.InstallCertificateRequestSchema,
[]: OCPP2_0_1.LogStatusNotificationRequestSchema,
[]: OCPP2_0_1.MeterValuesRequestSchema,
[]: OCPP2_0_1.NotifyChargingLimitRequestSchema,
[]: OCPP2_0_1.NotifyCustomerInformationRequestSchema,
[]: OCPP2_0_1.NotifyDisplayMessagesRequestSchema,
[]: OCPP2_0_1.NotifyEVChargingNeedsRequestSchema,
[]: OCPP2_0_1.NotifyEVChargingScheduleRequestSchema,
[]: OCPP2_0_1.NotifyEventRequestSchema,
[]: OCPP2_0_1.NotifyMonitoringReportRequestSchema,
[]: OCPP2_0_1.NotifyReportRequestSchema,
[]: OCPP2_0_1.PublishFirmwareRequestSchema,
[]: OCPP2_0_1.PublishFirmwareStatusNotificationRequestSchema,
[]: OCPP2_0_1.ReportChargingProfilesRequestSchema,
[]: OCPP2_0_1.RequestStartTransactionRequestSchema,
[]: OCPP2_0_1.RequestStopTransactionRequestSchema,
[]: OCPP2_0_1.ReservationStatusUpdateRequestSchema,
[]: OCPP2_0_1.ReserveNowRequestSchema,
[]: OCPP2_0_1.ResetRequestSchema,
[]: OCPP2_0_1.SecurityEventNotificationRequestSchema,
[]: OCPP2_0_1.SendLocalListRequestSchema,
[]: OCPP2_0_1.SetChargingProfileRequestSchema,
[]: OCPP2_0_1.SetDisplayMessageRequestSchema,
[]: OCPP2_0_1.SetMonitoringBaseRequestSchema,
[]: OCPP2_0_1.SetMonitoringLevelRequestSchema,
[]: OCPP2_0_1.SetNetworkProfileRequestSchema,
[]: OCPP2_0_1.SetVariableMonitoringRequestSchema,
[]: OCPP2_0_1.SetVariablesRequestSchema,
[]: OCPP2_0_1.SignCertificateRequestSchema,
[]: OCPP2_0_1.StatusNotificationRequestSchema,
[]: OCPP2_0_1.TransactionEventRequestSchema,
[]: OCPP2_0_1.TriggerMessageRequestSchema,
[]: OCPP2_0_1.UnlockConnectorRequestSchema,
[]: OCPP2_0_1.UnpublishFirmwareRequestSchema,
[]: OCPP2_0_1.UpdateFirmwareRequestSchema,
};
// Action requests supported by OCPP 2.1
export const OCPP2_1_CALL_SCHEMA_RECORD = {
[]: OCPP2_1.AuthorizeRequestSchema,
[]: OCPP2_1.BootNotificationRequestSchema,
[]: OCPP2_1.CancelReservationRequestSchema,
[]: OCPP2_1.CertificateSignedRequestSchema,
[]: OCPP2_1.ChangeAvailabilityRequestSchema,
[]: OCPP2_1.ClearCacheRequestSchema,
[]: OCPP2_1.ClearChargingProfileRequestSchema,
[]: OCPP2_1.ClearDisplayMessageRequestSchema,
[]: OCPP2_1.ClearedChargingLimitRequestSchema,
[]: OCPP2_1.ClearVariableMonitoringRequestSchema,
[]: OCPP2_1.CostUpdatedRequestSchema,
[]: OCPP2_1.CustomerInformationRequestSchema,
[]: OCPP2_1.DataTransferRequestSchema,
[]: OCPP2_1.DeleteCertificateRequestSchema,
[]: OCPP2_1.FirmwareStatusNotificationRequestSchema,
[]: OCPP2_1.Get15118EVCertificateRequestSchema,
[]: OCPP2_1.GetBaseReportRequestSchema,
[]: OCPP2_1.GetCertificateStatusRequestSchema,
[]: OCPP2_1.GetChargingProfilesRequestSchema,
[]: OCPP2_1.GetCompositeScheduleRequestSchema,
[]: OCPP2_1.GetDisplayMessagesRequestSchema,
[]: OCPP2_1.GetInstalledCertificateIdsRequestSchema,
[]: OCPP2_1.GetLocalListVersionRequestSchema,
[]: OCPP2_1.GetLogRequestSchema,
[]: OCPP2_1.GetMonitoringReportRequestSchema,
[]: OCPP2_1.GetReportRequestSchema,
[]: OCPP2_1.GetTransactionStatusRequestSchema,
[]: OCPP2_1.GetVariablesRequestSchema,
[]: OCPP2_1.HeartbeatRequestSchema,
[]: OCPP2_1.InstallCertificateRequestSchema,
[]: OCPP2_1.LogStatusNotificationRequestSchema,
[]: OCPP2_1.MeterValuesRequestSchema,
[]: OCPP2_1.NotifyChargingLimitRequestSchema,
[]: OCPP2_1.NotifyCustomerInformationRequestSchema,
[]: OCPP2_1.NotifyDisplayMessagesRequestSchema,
[]: OCPP2_1.NotifyEVChargingNeedsRequestSchema,
[]: OCPP2_1.NotifyEVChargingScheduleRequestSchema,
[]: OCPP2_1.NotifyEventRequestSchema,
[]: OCPP2_1.NotifyMonitoringReportRequestSchema,
[]: OCPP2_1.NotifyReportRequestSchema,
[]: OCPP2_1.NotifySettlementRequestSchema,
[]: OCPP2_1.PublishFirmwareRequestSchema,
[]: OCPP2_1.PublishFirmwareStatusNotificationRequestSchema,
[]: OCPP2_1.ReportChargingProfilesRequestSchema,
[]: OCPP2_1.RequestStartTransactionRequestSchema,
[]: OCPP2_1.RequestStopTransactionRequestSchema,
[]: OCPP2_1.ReservationStatusUpdateRequestSchema,
[]: OCPP2_1.ReserveNowRequestSchema,
[]: OCPP2_1.ResetRequestSchema,
[]: OCPP2_1.SecurityEventNotificationRequestSchema,
[]: OCPP2_1.SendLocalListRequestSchema,
[]: OCPP2_1.SetChargingProfileRequestSchema,
[]: OCPP2_1.SetDisplayMessageRequestSchema,
[]: OCPP2_1.SetMonitoringBaseRequestSchema,
[]: OCPP2_1.SetMonitoringLevelRequestSchema,
[]: OCPP2_1.SetNetworkProfileRequestSchema,
[]: OCPP2_1.SetVariableMonitoringRequestSchema,
[]: OCPP2_1.SetVariablesRequestSchema,
[]: OCPP2_1.SignCertificateRequestSchema,
[]: OCPP2_1.StatusNotificationRequestSchema,
[]: OCPP2_1.TransactionEventRequestSchema,
[]: OCPP2_1.TriggerMessageRequestSchema,
[]: OCPP2_1.UnlockConnectorRequestSchema,
[]: OCPP2_1.SetDefaultTariffRequestSchema,
[]: OCPP2_1.UnpublishFirmwareRequestSchema,
[]: OCPP2_1.UpdateFirmwareRequestSchema,
[]: OCPP2_1.VatNumberValidationRequestSchema,
};
export const OCPP1_6_CALL_RESULT_SCHEMA_RECORD = {
[]: OCPP1_6.AuthorizeResponseSchema,
[]: OCPP1_6.BootNotificationResponseSchema,
[]: OCPP1_6.CancelReservationResponseSchema,
[]: OCPP1_6.ChangeAvailabilityResponseSchema,
[]: OCPP1_6.ChangeConfigurationResponseSchema,
[]: OCPP1_6.ClearCacheResponseSchema,
[]: OCPP1_6.ClearChargingProfileResponseSchema,
[]: OCPP1_6.DataTransferResponseSchema,
[]: OCPP1_6.DiagnosticsStatusNotificationResponseSchema,
[]: OCPP1_6.FirmwareStatusNotificationResponseSchema,
[]: OCPP1_6.GetCompositeScheduleResponseSchema,
[]: OCPP1_6.GetConfigurationResponseSchema,
[]: OCPP1_6.GetDiagnosticsResponseSchema,
[]: OCPP1_6.GetLocalListVersionResponseSchema,
[]: OCPP1_6.HeartbeatResponseSchema,
[]: OCPP1_6.MeterValuesResponseSchema,
[]: OCPP1_6.RemoteStartTransactionResponseSchema,
[]: OCPP1_6.RemoteStopTransactionResponseSchema,
[]: OCPP1_6.ReserveNowResponseSchema,
[]: OCPP1_6.ResetResponseSchema,
[]: OCPP1_6.SendLocalListResponseSchema,
[]: OCPP1_6.SetChargingProfileResponseSchema,
[]: OCPP1_6.StartTransactionResponseSchema,
[]: OCPP1_6.StatusNotificationResponseSchema,
[]: OCPP1_6.StopTransactionResponseSchema,
[]: OCPP1_6.TriggerMessageResponseSchema,
[]: OCPP1_6.UnlockConnectorResponseSchema,
[]: OCPP1_6.UpdateFirmwareResponseSchema,
};
// Action results supported by OCPP 2.0.1
export const OCPP2_0_1_CALL_RESULT_SCHEMA_RECORD = {
[]: OCPP2_0_1.AuthorizeResponseSchema,
[]: OCPP2_0_1.BootNotificationResponseSchema,
[]: OCPP2_0_1.CancelReservationResponseSchema,
[]: OCPP2_0_1.CertificateSignedResponseSchema,
[]: OCPP2_0_1.ChangeAvailabilityResponseSchema,
[]: OCPP2_0_1.ClearCacheResponseSchema,
[]: OCPP2_0_1.ClearChargingProfileResponseSchema,
[]: OCPP2_0_1.ClearDisplayMessageResponseSchema,
[]: OCPP2_0_1.ClearedChargingLimitResponseSchema,
[]: OCPP2_0_1.ClearVariableMonitoringResponseSchema,
[]: OCPP2_0_1.CostUpdatedResponseSchema,
[]: OCPP2_0_1.CustomerInformationResponseSchema,
[]: OCPP2_0_1.DataTransferResponseSchema,
[]: OCPP2_0_1.DeleteCertificateResponseSchema,
[]: OCPP2_0_1.FirmwareStatusNotificationResponseSchema,
[]: OCPP2_0_1.Get15118EVCertificateResponseSchema,
[]: OCPP2_0_1.GetBaseReportResponseSchema,
[]: OCPP2_0_1.GetCertificateStatusResponseSchema,
[]: OCPP2_0_1.GetChargingProfilesResponseSchema,
[]: OCPP2_0_1.GetCompositeScheduleResponseSchema,
[]: OCPP2_0_1.GetDisplayMessagesResponseSchema,
[]: OCPP2_0_1.GetInstalledCertificateIdsResponseSchema,
[]: OCPP2_0_1.GetLocalListVersionResponseSchema,
[]: OCPP2_0_1.GetLogResponseSchema,
[]: OCPP2_0_1.GetMonitoringReportResponseSchema,
[]: OCPP2_0_1.GetReportResponseSchema,
[]: OCPP2_0_1.GetTransactionStatusResponseSchema,
[]: OCPP2_0_1.GetVariablesResponseSchema,
[]: OCPP2_0_1.HeartbeatResponseSchema,
[]: OCPP2_0_1.InstallCertificateResponseSchema,
[]: OCPP2_0_1.LogStatusNotificationResponseSchema,
[]: OCPP2_0_1.MeterValuesResponseSchema,
[]: OCPP2_0_1.NotifyChargingLimitResponseSchema,
[]: OCPP2_0_1.NotifyCustomerInformationResponseSchema,
[]: OCPP2_0_1.NotifyDisplayMessagesResponseSchema,
[]: OCPP2_0_1.NotifyEVChargingNeedsResponseSchema,
[]: OCPP2_0_1.NotifyEVChargingScheduleResponseSchema,
[]: OCPP2_0_1.NotifyEventResponseSchema,
[]: OCPP2_0_1.NotifyMonitoringReportResponseSchema,
[]: OCPP2_0_1.NotifyReportResponseSchema,
[]: OCPP2_0_1.PublishFirmwareResponseSchema,
[]: OCPP2_0_1.PublishFirmwareStatusNotificationResponseSchema,
[]: OCPP2_0_1.ReportChargingProfilesResponseSchema,
[]: OCPP2_0_1.RequestStartTransactionResponseSchema,
[]: OCPP2_0_1.RequestStopTransactionResponseSchema,
[]: OCPP2_0_1.ReservationStatusUpdateResponseSchema,
[]: OCPP2_0_1.ReserveNowResponseSchema,
[]: OCPP2_0_1.ResetResponseSchema,
[]: OCPP2_0_1.SecurityEventNotificationResponseSchema,
[]: OCPP2_0_1.SendLocalListResponseSchema,
[]: OCPP2_0_1.SetChargingProfileResponseSchema,
[]: OCPP2_0_1.SetDisplayMessageResponseSchema,
[]: OCPP2_0_1.SetMonitoringBaseResponseSchema,
[]: OCPP2_0_1.SetMonitoringLevelResponseSchema,
[]: OCPP2_0_1.SetNetworkProfileResponseSchema,
[]: OCPP2_0_1.SetVariableMonitoringResponseSchema,
[]: OCPP2_0_1.SetVariablesResponseSchema,
[]: OCPP2_0_1.SignCertificateResponseSchema,
[]: OCPP2_0_1.StatusNotificationResponseSchema,
[]: OCPP2_0_1.TransactionEventResponseSchema,
[]: OCPP2_0_1.TriggerMessageResponseSchema,
[]: OCPP2_0_1.UnlockConnectorResponseSchema,
[]: OCPP2_0_1.UnpublishFirmwareResponseSchema,
[]: OCPP2_0_1.UpdateFirmwareResponseSchema,
};
// Action results supported by OCPP 2.1
// TODO: Add new action results for OCPP 2.1 once they are implemented
export const OCPP2_1_CALL_RESULT_SCHEMA_RECORD = {
[]: OCPP2_1.AuthorizeResponseSchema,
[]: OCPP2_1.BootNotificationResponseSchema,
[]: OCPP2_1.CancelReservationResponseSchema,
[]: OCPP2_1.CertificateSignedResponseSchema,
[]: OCPP2_1.ChangeAvailabilityResponseSchema,
[]: OCPP2_1.ClearCacheResponseSchema,
[]: OCPP2_1.ClearChargingProfileResponseSchema,
[]: OCPP2_1.ClearDisplayMessageResponseSchema,
[]: OCPP2_1.ClearedChargingLimitResponseSchema,
[]: OCPP2_1.ClearVariableMonitoringResponseSchema,
[]: OCPP2_1.CostUpdatedResponseSchema,
[]: OCPP2_1.CustomerInformationResponseSchema,
[]: OCPP2_1.DataTransferResponseSchema,
[]: OCPP2_1.DeleteCertificateResponseSchema,
[]: OCPP2_1.FirmwareStatusNotificationResponseSchema,
[]: OCPP2_1.Get15118EVCertificateResponseSchema,
[]: OCPP2_1.GetBaseReportResponseSchema,
[]: OCPP2_1.GetCertificateStatusResponseSchema,
[]: OCPP2_1.GetChargingProfilesResponseSchema,
[]: OCPP2_1.GetCompositeScheduleResponseSchema,
[]: OCPP2_1.GetDisplayMessagesResponseSchema,
[]: OCPP2_1.GetInstalledCertificateIdsResponseSchema,
[]: OCPP2_1.GetLocalListVersionResponseSchema,
[]: OCPP2_1.GetLogResponseSchema,
[]: OCPP2_1.GetMonitoringReportResponseSchema,
[]: OCPP2_1.GetReportResponseSchema,
[]: OCPP2_1.GetTransactionStatusResponseSchema,
[]: OCPP2_1.GetVariablesResponseSchema,
[]: OCPP2_1.HeartbeatResponseSchema,
[]: OCPP2_1.InstallCertificateResponseSchema,
[]: OCPP2_1.LogStatusNotificationResponseSchema,
[]: OCPP2_1.MeterValuesResponseSchema,
[]: OCPP2_1.NotifyChargingLimitResponseSchema,
[]: OCPP2_1.NotifyCustomerInformationResponseSchema,
[]: OCPP2_1.NotifyDisplayMessagesResponseSchema,
[]: OCPP2_1.NotifyEVChargingNeedsResponseSchema,
[]: OCPP2_1.NotifyEVChargingScheduleResponseSchema,
[]: OCPP2_1.NotifyEventResponseSchema,
[]: OCPP2_1.NotifyMonitoringReportResponseSchema,
[]: OCPP2_1.NotifyReportResponseSchema,
[]: OCPP2_1.NotifySettlementResponseSchema,
[]: OCPP2_1.PublishFirmwareResponseSchema,
[]: OCPP2_1.PublishFirmwareStatusNotificationResponseSchema,
[]: OCPP2_1.ReportChargingProfilesResponseSchema,
[]: OCPP2_1.RequestStartTransactionResponseSchema,
[]: OCPP2_1.RequestStopTransactionResponseSchema,
[]: OCPP2_1.ReservationStatusUpdateResponseSchema,
[]: OCPP2_1.ReserveNowResponseSchema,
[]: OCPP2_1.ResetResponseSchema,
[]: OCPP2_1.SecurityEventNotificationResponseSchema,
[]: OCPP2_1.SendLocalListResponseSchema,
[]: OCPP2_1.SetChargingProfileResponseSchema,
[]: OCPP2_1.SetDisplayMessageResponseSchema,
[]: OCPP2_1.SetMonitoringBaseResponseSchema,
[]: OCPP2_1.SetMonitoringLevelResponseSchema,
[]: OCPP2_1.SetNetworkProfileResponseSchema,
[]: OCPP2_1.SetVariableMonitoringResponseSchema,
[]: OCPP2_1.SetVariablesResponseSchema,
[]: OCPP2_1.SignCertificateResponseSchema,
[]: OCPP2_1.StatusNotificationResponseSchema,
[]: OCPP2_1.TransactionEventResponseSchema,
[]: OCPP2_1.TriggerMessageResponseSchema,
[]: OCPP2_1.UnlockConnectorResponseSchema,
[]: OCPP2_1.SetDefaultTariffResponseSchema,
[]: OCPP2_1.UnpublishFirmwareResponseSchema,
[]: OCPP2_1.UpdateFirmwareResponseSchema,
[]: OCPP2_1.VatNumberValidationResponseSchema,
};
//# sourceMappingURL=MappingSchema.js.map