feat: add translation billing stats and remove Export/Settings pages
- Add TranslationLog model to track translation API usage per task - Integrate Dify API actual price (total_price) into translation stats - Display translation statistics in admin dashboard with per-task costs - Remove unused Export and Settings pages to simplify frontend - Add GET /api/v2/admin/translation-stats endpoint 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ import type {
|
||||
TopUser,
|
||||
AuditLogListResponse,
|
||||
UserActivitySummary,
|
||||
TranslationStats,
|
||||
ProcessingOptions,
|
||||
ProcessingMetadata,
|
||||
DocumentAnalysisResponse,
|
||||
@@ -621,6 +622,14 @@ class ApiClientV2 {
|
||||
return response.data
|
||||
}
|
||||
|
||||
/**
|
||||
* Get translation statistics (admin only)
|
||||
*/
|
||||
async getTranslationStats(): Promise<TranslationStats> {
|
||||
const response = await this.client.get<TranslationStats>('/admin/translation-stats')
|
||||
return response.data
|
||||
}
|
||||
|
||||
// ==================== Translation APIs ====================
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user