export interface AdminWebhookEventListItem {
  eventId: number
  provider: string
  platform: string
  platformRaw: string
  shopId: string
  shopName: string
  eventType: string
  eventKey: string
  signatureValid: boolean
  processed: boolean
  processError: string
  visibilityLevel: string
  relatedOrderId: number | null
  platformOrderId: string
  buyerId: string
  buyerName: string
  totalAmount: string
  totalAmountFen: number
  currency: string
  itemCount: number
  taskCount: number
  messageText: string
  requestTimestamp: string
  requestSign: string
  aopic: string
  sourceHost: string
  sourceIp: string
  userAgent: string
  createdAt: string
}

export interface AdminWebhookEventDetail extends AdminWebhookEventListItem {
  headers: Record<string, unknown>
  query: Record<string, unknown>
  body: Record<string, unknown>
  payload: Record<string, unknown>
}

export interface AdminWebhookReplayResponse {
  eventId: number
  replayed: boolean
  result: {
    accepted: boolean
    provider: string
    platform: string
    platformRaw: string
    shopId: string
    shopName: string
    eventType: string
    platformOrderId: string
    orderId: number
    taskCount: number
    tasks: Array<{
      taskId: number
      taskNo: string
      status: string
    }>
  }
}
