Spaces:
Configuration error
Configuration error
Download frontend/src/api/invariant-service.ts from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 767 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/api/invariant-service.ts
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/api/invariant-service.ts
-
curl -L -o invariant-service.ts https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/api/invariant-service.ts
767 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; | |