File size: 797 Bytes
246d201 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
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;
|