add mq status type
This commit is contained in:
@@ -147,6 +147,67 @@ export interface RefundItemFilters {
|
||||
created_date_range: [string, string] | null
|
||||
}
|
||||
|
||||
/** ─── MQ 状态监控 ─── */
|
||||
|
||||
export type MqQueueStatusEnum = 'high_load' | 'processing' | 'active' | 'empty' | 'error'
|
||||
|
||||
export interface MqQueueInfo {
|
||||
queue: string
|
||||
messages: number | string
|
||||
consumers: number | string
|
||||
status: MqQueueStatusEnum
|
||||
}
|
||||
|
||||
export interface MqSummary {
|
||||
total_messages: number
|
||||
total_consumers: number
|
||||
}
|
||||
|
||||
export interface MqStatusData {
|
||||
business_queues: MqQueueInfo[]
|
||||
retry_queues: MqQueueInfo[]
|
||||
error_queue: MqQueueInfo | []
|
||||
summary: MqSummary
|
||||
fetched_at: string
|
||||
}
|
||||
|
||||
export type MqQueueType = 'orders' | 'products' | 'refunds' | 'inventory'
|
||||
|
||||
/** ─── 失败消息 ─── */
|
||||
|
||||
export type FailedMessageDataType = 'order' | 'product' | 'refund' | 'inventory'
|
||||
|
||||
/** 失败消息列表记录 */
|
||||
export interface FailedMessageRecord {
|
||||
id: number
|
||||
error_id: string
|
||||
data_type: FailedMessageDataType
|
||||
platform: string
|
||||
platform_id: number
|
||||
company_id: number
|
||||
store_id: number
|
||||
error_type: string
|
||||
error_message: string
|
||||
retry_count: number
|
||||
message_id: string
|
||||
failed_at: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
/** 失败消息详情(含错误堆栈和原始消息) */
|
||||
export interface FailedMessageDetail extends FailedMessageRecord {
|
||||
error_code: string | null
|
||||
error_trace: string | null
|
||||
original_message: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
/** 失败消息筛选参数 */
|
||||
export interface FailedMessageFilters {
|
||||
data_type: FailedMessageDataType | undefined
|
||||
platform_id: number | undefined
|
||||
failed_at_range: [string, string] | null
|
||||
}
|
||||
|
||||
/** 业务异常 */
|
||||
export class ApiError extends Error {
|
||||
code: number
|
||||
|
||||
Reference in New Issue
Block a user