feat(ECR-018): Entitlement 用户权益只读并 Closed
聚合 GET /admin/users/:id/entitlements(Membership∪DeepAccess∪问答额度)与 admin-h5 权益 Tab;无 migration / 无真支付。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -152,6 +152,28 @@ export const adminApi = {
|
||||
ask_thread_count: number
|
||||
}
|
||||
}>('GET', `/users/${id}/insight`),
|
||||
userEntitlements: (id: string) =>
|
||||
request<{
|
||||
user_id: string
|
||||
membership: {
|
||||
plan?: string
|
||||
status: string
|
||||
expires_at?: string
|
||||
ask_quota_left?: number
|
||||
active: boolean
|
||||
}
|
||||
ask_paid_quota_left: number
|
||||
flags: {
|
||||
report_detail_via_membership: boolean
|
||||
deep_access_count: number
|
||||
}
|
||||
deep_accesses: Array<{
|
||||
id: string
|
||||
report_id: string
|
||||
report_type?: string
|
||||
created_at: string
|
||||
}>
|
||||
}>('GET', `/users/${id}/entitlements`),
|
||||
grant: (id: string, plan: string) =>
|
||||
request<{ ok: boolean }>('POST', `/users/${id}/membership/grant`, { plan }),
|
||||
grantAskQuota: (id: string, delta: number) =>
|
||||
|
||||
Reference in New Issue
Block a user