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

90 lines (89 loc) 3.93 kB
import type { ConnectorStatusEnumType, ChargingStateEnumType } from './types.js'; export declare enum Action { Authorize = "Authorize", BootNotification = "BootNotification", CancelReservation = "CancelReservation", CertificateSigned = "CertificateSigned", ChangeAvailability = "ChangeAvailability", ClearCache = "ClearCache", ClearChargingProfile = "ClearChargingProfile", ClearDisplayMessage = "ClearDisplayMessage", ClearedChargingLimit = "ClearedChargingLimit", ClearVariableMonitoring = "ClearVariableMonitoring", CostUpdated = "CostUpdated", CustomerInformation = "CustomerInformation", DataTransfer = "DataTransfer", DeleteCertificate = "DeleteCertificate", FirmwareStatusNotification = "FirmwareStatusNotification", Get15118EVCertificate = "Get15118EVCertificate", GetBaseReport = "GetBaseReport", GetCertificateStatus = "GetCertificateStatus", GetChargingProfiles = "GetChargingProfiles", GetCompositeSchedule = "GetCompositeSchedule", GetDisplayMessages = "GetDisplayMessages", GetInstalledCertificateIds = "GetInstalledCertificateIds", GetLocalListVersion = "GetLocalListVersion", GetLog = "GetLog", GetMonitoringReport = "GetMonitoringReport", GetReport = "GetReport", GetTransactionStatus = "GetTransactionStatus", GetVariables = "GetVariables", Heartbeat = "Heartbeat", InstallCertificate = "InstallCertificate", LogStatusNotification = "LogStatusNotification", MeterValues = "MeterValues", NotifyChargingLimit = "NotifyChargingLimit", NotifyCustomerInformation = "NotifyCustomerInformation", NotifyDisplayMessages = "NotifyDisplayMessages", NotifyEVChargingNeeds = "NotifyEVChargingNeeds", NotifyEVChargingSchedule = "NotifyEVChargingSchedule", NotifyEvent = "NotifyEvent", NotifyMonitoringReport = "NotifyMonitoringReport", NotifyReport = "NotifyReport", PublishFirmware = "PublishFirmware", PublishFirmwareStatusNotification = "PublishFirmwareStatusNotification", ReportChargingProfiles = "ReportChargingProfiles", RequestStartTransaction = "RequestStartTransaction", RequestStopTransaction = "RequestStopTransaction", ReservationStatusUpdate = "ReservationStatusUpdate", ReserveNow = "ReserveNow", Reset = "Reset", SecurityEventNotification = "SecurityEventNotification", SendLocalList = "SendLocalList", SetChargingProfile = "SetChargingProfile", SetDisplayMessage = "SetDisplayMessage", SetMonitoringBase = "SetMonitoringBase", SetMonitoringLevel = "SetMonitoringLevel", SetNetworkProfile = "SetNetworkProfile", SetVariableMonitoring = "SetVariableMonitoring", SetVariables = "SetVariables", SignCertificate = "SignCertificate", StatusNotification = "StatusNotification", TransactionEvent = "TransactionEvent", TriggerMessage = "TriggerMessage", UnlockConnector = "UnlockConnector", UnpublishFirmware = "UnpublishFirmware", UpdateFirmware = "UpdateFirmware" } 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 } 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;