mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 13:24:55 +01:00
feat(usage): add subscription quota windows per provider on /usage page
reads local claude and codex auth files server-side, calls provider quota apis (anthropic oauth usage, chatgpt wham/usage), and surfaces live usedPercent per window in ProviderQuotaCard with threshold fill colors
This commit is contained in:
1 parent
82bc00a3ae
commit
f14b6e449f
10 files changed
+356
-3
No files matched your search
+3
-1
@@ -1,4 +1,4 @@
|
||||
import type { CostSummary, CostByAgent, CostByProviderModel, CostWindowSpendRow } from "@paperclipai/shared";
|
||||
import type { CostSummary, CostByAgent, CostByProviderModel, CostWindowSpendRow, ProviderQuotaResult } from "@paperclipai/shared";
|
||||
import { api } from "./client";
|
||||
|
||||
export interface CostByProject {
|
||||
@@ -28,4 +28,6 @@ export const costsApi = {
|
||||
api.get<CostByProviderModel[]>(`/companies/${companyId}/costs/by-provider${dateParams(from, to)}`),
|
||||
windowSpend: (companyId: string) =>
|
||||
api.get<CostWindowSpendRow[]>(`/companies/${companyId}/costs/window-spend`),
|
||||
quotaWindows: (companyId: string) =>
|
||||
api.get<ProviderQuotaResult[]>(`/companies/${companyId}/costs/quota-windows`),
|
||||
};
|
||||
Reference in new issue
Block a user