Spaces:
Paused
Paused
Download ui/src/api/budgets.ts from testfirela/paperclip-app: direct link, hf CLI and curl.
- Browser
- Download file 730 Bytes
-
https://huggingface.co/spaces/testfirela/paperclip-app/resolve/main/ui/src/api/budgets.ts
- Command line
-
hf download hf://spaces/testfirela/paperclip-app/ui/src/api/budgets.ts
-
curl -L -o budgets.ts https://huggingface.co/spaces/testfirela/paperclip-app/resolve/main/ui/src/api/budgets.ts
730 Bytes
| import type { | |
| BudgetIncident, | |
| BudgetIncidentResolutionInput, | |
| BudgetOverview, | |
| BudgetPolicySummary, | |
| BudgetPolicyUpsertInput, | |
| } from "@paperclipai/shared"; | |
| import { api } from "./client"; | |
| export const budgetsApi = { | |
| overview: (companyId: string) => | |
| api.get<BudgetOverview>(`/companies/${companyId}/budgets/overview`), | |
| upsertPolicy: (companyId: string, data: BudgetPolicyUpsertInput) => | |
| api.post<BudgetPolicySummary>(`/companies/${companyId}/budgets/policies`, data), | |
| resolveIncident: (companyId: string, incidentId: string, data: BudgetIncidentResolutionInput) => | |
| api.post<BudgetIncident>( | |
| `/companies/${companyId}/budget-incidents/${encodeURIComponent(incidentId)}/resolve`, | |
| data, | |
| ), | |
| }; | |