feat(admin-web): expose AI point balance and usage ledger

Surfaces the new AI point quota in the workspace shell and adds a
Personal Center → AI Point Usage page that shows balance, base-char
rule, and the paginated reservation/refund history. Updates shared
types for the QuotaSummary and ledger payloads.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-28 11:34:07 +08:00
parent e307a048d1
commit bf7594ccd8
7 changed files with 536 additions and 4 deletions
+4
View File
@@ -7,6 +7,7 @@ import type {
ArticleListResponse,
CreateArticleRequest,
ArticleVersion,
AIPointUsageListResponse,
GenerateImitationRequest,
GenerateImitationResponse,
AuthTokens,
@@ -293,6 +294,9 @@ export const workspaceApi = {
quotaSummary() {
return apiClient.get<QuotaSummary>("/api/tenant/workspace/quota-summary");
},
aiPointUsage(params?: { page?: number; page_size?: number; limit?: number; offset?: number }) {
return apiClient.get<AIPointUsageListResponse>("/api/tenant/workspace/ai-point-usage", { params });
},
templateCards() {
return apiClient.get<TemplateCard[]>("/api/tenant/workspace/template-cards");
},