UNPKG

typed-ocpp

Version:

A library for type-aware parsing, serialization and validation of OCPP 1.6, OCPP 2.0 and OCPP 2.1 messages

119 lines (118 loc) 5.28 kB
import type { ConnectorStatusEnumType, ChargingStateEnumType } from './types.js'; export declare enum Action { AdjustPeriodicEventStream = "AdjustPeriodicEventStream", AFRRSignal = "AFRRSignal", Authorize = "Authorize", BatterySwap = "BatterySwap", BootNotification = "BootNotification", CancelReservation = "CancelReservation", CertificateSigned = "CertificateSigned", ChangeAvailability = "ChangeAvailability", ChangeTransactionTariff = "ChangeTransactionTariff", ClearCache = "ClearCache", ClearChargingProfile = "ClearChargingProfile", ClearDERControl = "ClearDERControl", ClearDisplayMessage = "ClearDisplayMessage", ClearedChargingLimit = "ClearedChargingLimit", ClearTariffs = "ClearTariffs", ClearVariableMonitoring = "ClearVariableMonitoring", ClosePeriodicEventStream = "ClosePeriodicEventStream", CostUpdated = "CostUpdated", CustomerInformation = "CustomerInformation", DataTransfer = "DataTransfer", DeleteCertificate = "DeleteCertificate", FirmwareStatusNotification = "FirmwareStatusNotification", Get15118EVCertificate = "Get15118EVCertificate", GetBaseReport = "GetBaseReport", GetCertificateChainStatus = "GetCertificateChainStatus", GetCertificateStatus = "GetCertificateStatus", GetChargingProfiles = "GetChargingProfiles", GetCompositeSchedule = "GetCompositeSchedule", GetDERControl = "GetDERControl", GetDisplayMessages = "GetDisplayMessages", GetInstalledCertificateIds = "GetInstalledCertificateIds", GetLocalListVersion = "GetLocalListVersion", GetLog = "GetLog", GetMonitoringReport = "GetMonitoringReport", GetPeriodicEventStream = "GetPeriodicEventStream", GetReport = "GetReport", GetTariffs = "GetTariffs", GetTransactionStatus = "GetTransactionStatus", GetVariables = "GetVariables", Heartbeat = "Heartbeat", InstallCertificate = "InstallCertificate", LogStatusNotification = "LogStatusNotification", MeterValues = "MeterValues", NotifyAllowedEnergyTransfer = "NotifyAllowedEnergyTransfer", NotifyChargingLimit = "NotifyChargingLimit", NotifyCustomerInformation = "NotifyCustomerInformation", NotifyDERAlarm = "NotifyDERAlarm", NotifyDERStartStop = "NotifyDERStartStop", NotifyDisplayMessages = "NotifyDisplayMessages", NotifyEVChargingNeeds = "NotifyEVChargingNeeds", NotifyEVChargingSchedule = "NotifyEVChargingSchedule", NotifyEvent = "NotifyEvent", NotifyMonitoringReport = "NotifyMonitoringReport", NotifyPeriodicEventStream = "NotifyPeriodicEventStream", NotifyPriorityCharging = "NotifyPriorityCharging", NotifyReport = "NotifyReport", NotifySettlement = "NotifySettlement", NotifyWebPaymentStarted = "NotifyWebPaymentStarted", OpenPeriodicEventStream = "OpenPeriodicEventStream", PublishFirmware = "PublishFirmware", PublishFirmwareStatusNotification = "PublishFirmwareStatusNotification", PullDynamicScheduleUpdate = "PullDynamicScheduleUpdate", ReportChargingProfiles = "ReportChargingProfiles", ReportDERControl = "ReportDERControl", RequestBatterySwap = "RequestBatterySwap", RequestStartTransaction = "RequestStartTransaction", RequestStopTransaction = "RequestStopTransaction", ReservationStatusUpdate = "ReservationStatusUpdate", ReserveNow = "ReserveNow", Reset = "Reset", SecurityEventNotification = "SecurityEventNotification", SendLocalList = "SendLocalList", SetChargingProfile = "SetChargingProfile", SetDefaultTariff = "SetDefaultTariff", SetDERControl = "SetDERControl", SetDisplayMessage = "SetDisplayMessage", SetMonitoringBase = "SetMonitoringBase", SetMonitoringLevel = "SetMonitoringLevel", SetNetworkProfile = "SetNetworkProfile", SetVariableMonitoring = "SetVariableMonitoring", SetVariables = "SetVariables", SignCertificate = "SignCertificate", StatusNotification = "StatusNotification", TransactionEvent = "TransactionEvent", TriggerMessage = "TriggerMessage", UnlockConnector = "UnlockConnector", UnpublishFirmware = "UnpublishFirmware", UpdateDynamicSchedule = "UpdateDynamicSchedule", UpdateFirmware = "UpdateFirmware", UsePriorityCharging = "UsePriorityCharging", VatNumberValidation = "VatNumberValidation" } export declare enum ErrorCode { FormationViolation = "FormationViolation", GenericError = "GenericError", InternalError = "InternalError", MessageTypeNotSupported = "MessageTypeNotSupported", NotImplemented = "NotImplemented", NotSupported = "NotSupported", OccurrenceConstraintViolation = "OccurrenceConstraintViolation", PropertyConstraintViolation = "PropertyConstraintViolation", ProtocolError = "ProtocolError", RpcFrameworkError = "RpcFrameworkError", SecurityError = "SecurityError", TypeConstraintViolation = "TypeConstraintViolation" } export declare enum MessageType { CALL = 2, CALLRESULT = 3, CALLERROR = 4, CALLRESULTERROR = 5, SEND = 6 } export type BaseMessage<T extends MessageType, R extends any[]> = [msg_type: T, call_id: string, ...rest: R]; export type ConnectorStatus = ConnectorStatusEnumType; export type ChargingState = ChargingStateEnumType;