Configure circuit protection
This commit is contained in:
@@ -58,6 +58,9 @@ import type {
|
||||
import type {
|
||||
CircuitGroupSnapshot,
|
||||
} from "../../domain/models/circuit-group-structure-project-command.model";
|
||||
import type {
|
||||
CircuitProtectionSnapshot,
|
||||
} from "../../domain/models/circuit-protection-project-command.model";
|
||||
|
||||
async function request<T>(url: string, init?: RequestInit): Promise<T> {
|
||||
const response = await fetch(url, {
|
||||
@@ -430,6 +433,25 @@ export function deleteCircuitGroupCommand(
|
||||
);
|
||||
}
|
||||
|
||||
export function updateCircuitProtectionCommand(
|
||||
projectId: string,
|
||||
expectedRevision: number,
|
||||
circuitId: string,
|
||||
expected: CircuitProtectionSnapshot | null,
|
||||
target: CircuitProtectionSnapshot
|
||||
) {
|
||||
return executeProjectCommand(
|
||||
projectId,
|
||||
expectedRevision,
|
||||
{
|
||||
schemaVersion: 1,
|
||||
type: "circuit-protection.update",
|
||||
payload: { circuitId, expected, target },
|
||||
},
|
||||
"Stromkreisschutz bearbeiten"
|
||||
);
|
||||
}
|
||||
|
||||
export function updateCircuitById(
|
||||
projectId: string,
|
||||
expectedRevision: number,
|
||||
|
||||
Reference in New Issue
Block a user