export interface AdminKuaishouEticketShopConfigItem {
  shopId: string
  kshopName: string
  cookie: string
  cookieMasked: string
  hasCookie: boolean
  userAvatar: string
  enabled: boolean
}

export interface AdminKuaishouEticketSourceConfig {
  enabled: boolean
  baseUrl: string
  shops: AdminKuaishouEticketShopConfigItem[]
}

export interface AdminKuaishouEticketShopInfoResult {
  baseUrl: string
  ok: boolean
  result: number
  errorMessage: string
  requestId: string
  shop: {
    shopId: string
    kshopName: string
    userAvatar: string
    settleStatus: number
    hasCookie: boolean
  }
  raw: Record<string, unknown>
}

export interface AdminKuaishouEticketDetailResult {
  baseUrl: string
  eTicketId: string
  ok: boolean
  alreadyConsumed: boolean
  result: number
  errorMessage: string
  requestId: string
  serverTimestamp: string
  detail: {
    uid: string
    fulfillDetailId: string
    sellerId: string
    formToken: string
    validEndTime: string
    validStartTime: string
    leftReverseCount: number
    eTicketId: string
    oid: string
    totalCount: number
    leftCount: number
    status: string
  } | null
  goods: {
    itemId: string
    itemPicUrl: string
    itemTitle: string
    price: string
    skuDesc: string
    skuId: string
  } | null
  raw: Record<string, unknown>
}

export interface AdminKuaishouEticketConsumeResult {
  baseUrl: string
  eTicketId: string
  oid: string
  formToken: string
  num: number
  storeId: string
  ok: boolean
  consumed: boolean
  alreadyConsumed: boolean
  result: number
  errorMessage: string
  requestId: string
  serverTimestamp: string
  detail: AdminKuaishouEticketDetailResult['detail']
  raw: Record<string, unknown>
}
