add sku mapping

This commit is contained in:
2026-04-14 13:45:28 +08:00
parent b647680576
commit b1cd4ea0eb
16 changed files with 3176 additions and 0 deletions
+24
View File
@@ -304,6 +304,30 @@ export interface OperationLogFilters {
created_at_range: [string, string] | null
}
/** ─── API Key ─── */
export interface ApiKeyRecord {
id: number
user_id: number
name: string
key_prefix: string
last_used_at: string | null
expires_at: string | null
enabled: boolean
created_at: string
user?: { id: number; username: string; api_key_enabled?: boolean }
}
export interface ApiKeyCreateParams {
name: string
expires_at?: string | null
}
export interface ApiKeyCreateResult {
plain_key: string
api_key: ApiKeyRecord
}
/** 业务异常 */
export class ApiError extends Error {
code: number