feat(csms): add system settings management for OCPP 1.6J heartbeat interval
This commit is contained in:
@@ -202,6 +202,14 @@ export type TariffConfig = {
|
||||
updatedAt?: string;
|
||||
};
|
||||
|
||||
export type Ocpp16jSettings = {
|
||||
heartbeatInterval: number;
|
||||
};
|
||||
|
||||
export type SystemSettings = {
|
||||
ocpp16j: Ocpp16jSettings;
|
||||
};
|
||||
|
||||
// ── API functions ──────────────────────────────────────────────────────────
|
||||
|
||||
export type ChartRange = "30d" | "7d" | "24h";
|
||||
@@ -349,4 +357,9 @@ export const api = {
|
||||
put: (data: { slots: TariffSlot[]; prices: Record<PriceTier, TierPricing> }) =>
|
||||
apiFetch<TariffConfig>("/api/tariff", { method: "PUT", body: JSON.stringify(data) }),
|
||||
},
|
||||
settings: {
|
||||
get: () => apiFetch<SystemSettings>("/api/settings"),
|
||||
put: (data: SystemSettings) =>
|
||||
apiFetch<SystemSettings>("/api/settings", { method: "PUT", body: JSON.stringify(data) }),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user