feat: RBAC controlling
This commit is contained in:
@@ -26,6 +26,13 @@ export type Stats = {
|
||||
todayEnergyWh: number;
|
||||
};
|
||||
|
||||
export type UserStats = {
|
||||
totalIdTags: number;
|
||||
totalBalance: number;
|
||||
activeTransactions: number;
|
||||
totalTransactions: number;
|
||||
};
|
||||
|
||||
export type ConnectorSummary = {
|
||||
id: string;
|
||||
connectorId: number;
|
||||
@@ -128,7 +135,7 @@ export type PaginatedTransactions = {
|
||||
|
||||
export const api = {
|
||||
stats: {
|
||||
get: () => apiFetch<Stats>("/api/stats"),
|
||||
get: () => apiFetch<Stats | UserStats>("/api/stats"),
|
||||
},
|
||||
chargePoints: {
|
||||
list: () => apiFetch<ChargePoint[]>("/api/charge-points"),
|
||||
@@ -178,6 +185,7 @@ export const api = {
|
||||
idTags: {
|
||||
list: () => apiFetch<IdTag[]>("/api/id-tags"),
|
||||
get: (idTag: string) => apiFetch<IdTag>(`/api/id-tags/${idTag}`),
|
||||
claim: () => apiFetch<IdTag>("/api/id-tags/claim", { method: "POST" }),
|
||||
create: (data: {
|
||||
idTag: string;
|
||||
status?: string;
|
||||
|
||||
Reference in New Issue
Block a user