Unify charge point command channel status

This commit is contained in:
2026-03-18 15:26:56 +08:00
parent 3508e7de19
commit 2c90404637
14 changed files with 347 additions and 86 deletions

View File

@@ -72,6 +72,8 @@ export type ConnectionsStatus = {
connectedIdentifiers: string[];
};
export type ChargePointConnectionStatus = "online" | "unavailable" | "offline";
export type ChargePoint = {
id: string;
chargePointIdentifier: string;
@@ -79,7 +81,12 @@ export type ChargePoint = {
chargePointVendor: string | null;
chargePointModel: string | null;
registrationStatus: string;
transportStatus: ChargePointConnectionStatus;
lastHeartbeatAt: string | null;
lastWsConnectedAt: string | null;
lastWsDisconnectedAt: string | null;
lastCommandStatus: "Accepted" | "Rejected" | "Error" | "Timeout" | null;
lastCommandAt: string | null;
lastBootNotificationAt: string | null;
feePerKwh: number;
pricingMode: "fixed" | "tou";
@@ -102,7 +109,12 @@ export type ChargePointDetail = {
meterType: string | null;
registrationStatus: string;
heartbeatInterval: number | null;
transportStatus: ChargePointConnectionStatus;
lastHeartbeatAt: string | null;
lastWsConnectedAt: string | null;
lastWsDisconnectedAt: string | null;
lastCommandStatus: "Accepted" | "Rejected" | "Error" | "Timeout" | null;
lastCommandAt: string | null;
lastBootNotificationAt: string | null;
feePerKwh: number;
pricingMode: "fixed" | "tou";
@@ -134,6 +146,9 @@ export type Transaction = {
chargeAmount: number | null;
electricityFee: number | null;
serviceFee: number | null;
remoteStopStatus: "Requested" | "Accepted" | "Rejected" | "Error" | "Timeout" | null;
remoteStopRequestedAt: string | null;
remoteStopRequestId: string | null;
};
export type IdTag = {