zzz / frontend /src /api /invariant-service.ts
ar08's picture
Upload 1040 files
246d201 verified
raw
history blame contribute delete
797 Bytes
import { openHands } from "./open-hands-axios";
class InvariantService {
static async getPolicy() {
const { data } = await openHands.get("/api/security/policy");
return data.policy;
}
static async getRiskSeverity() {
const { data } = await openHands.get("/api/security/settings");
return data.RISK_SEVERITY;
}
static async getTraces() {
const { data } = await openHands.get("/api/security/export-trace");
return data;
}
static async updatePolicy(policy: string) {
await openHands.post("/api/security/policy", { policy });
}
static async updateRiskSeverity(riskSeverity: number) {
await openHands.post("/api/security/settings", {
RISK_SEVERITY: riskSeverity,
});
}
}
export default InvariantService;