export type AdminKuaishouIndustryShopConfigInput = {
  enabled?: boolean
  sellerId?: string
  shopId?: string
  shopName?: string
  customShopName?: string
  authState?: string
  accessToken?: string
  refreshToken?: string
  accessTokenExpiresAt?: string
  refreshTokenExpiresAt?: string
  openId?: string
  grantedScopes?: string
  lastRefreshedAt?: string
  lastRefreshError?: string
}

export type AdminKuaishouIndustrySourceConfigInput = {
  enabled?: boolean
  baseUrl?: string
  authBaseUrl?: string
  redirectUri?: string
  scopes?: string
  authState?: string
  appKey?: string
  appSecret?: string
  signSecret?: string
  messageSecret?: string
  accessToken?: string
  refreshToken?: string
  accessTokenExpiresAt?: string
  refreshTokenExpiresAt?: string
  openId?: string
  grantedScopes?: string
  sellerId?: string
  provider?: string
  platform?: string
  shopId?: string
  shopName?: string
  version?: string
  shops?: AdminKuaishouIndustryShopConfigInput[]
}

export type AdminKuaishouIndustryAuthorizationCodeInput = {
  code?: string
  sellerId?: string
  shopName?: string
  customShopName?: string
}

export type AdminNotificationBarkRecipientInput = {
  id?: string
  name?: string
  deviceKey?: string
  enabled?: boolean
}

export type AdminNotificationWpushRecipientInput = {
  id?: string
  name?: string
  apiKey?: string
  apikey?: string
  enabled?: boolean
}

export type AdminNotificationConfigInput = {
  enabled?: boolean
  channels?: {
    bark?: {
      enabled?: boolean
      serverUrl?: string
      recipients?: AdminNotificationBarkRecipientInput[]
    }
    wpush?: {
      enabled?: boolean
      recipients?: AdminNotificationWpushRecipientInput[]
    }
  }
}

export type AdminNotificationTestInput = {
  title?: string
  body?: string
  url?: string
}

export type AdminScheduledJobInput = {
  id?: string
  type?: string
  enabled?: boolean
  intervalSeconds?: number | string
  cooldownSeconds?: number | string
  config?: {
    assetThreshold?: number | string
    accounts?: Array<{
      sourceKey?: string
      key?: string
      label?: string
      enabled?: boolean
      assetThreshold?: number | string
      threshold?: number | string
    }>
  }
}

export type AdminScheduledJobsConfigInput = {
  enabled?: boolean
  jobs?: AdminScheduledJobInput[]
}

export type AdminCloudtentaclesSourceConfigInput = {
  sourceKey?: string
  enabled?: boolean
  baseUrl?: string
  username?: string
  password?: string
  phone?: string
  deviceId?: string
  deviceType?: number | string
  sources?: AdminCloudtentaclesSourceConfigInput[]
}

export type AdminCloudtentaclesOverrideDeliveryItemInput = {
  cloudSkuId?: number | string
  cloudSkuName?: string
  quantity?: number | string
}

export type AdminCloudtentaclesOverrideRuleInput = {
  id?: string
  enabled?: boolean
  productName?: string
  sourceKey?: string
  deliveryItems?: AdminCloudtentaclesOverrideDeliveryItemInput[]
  notes?: string
}

export type AdminCloudtentaclesOverrideRuleConfigInput = {
  enabled?: boolean
  rules?: AdminCloudtentaclesOverrideRuleInput[]
}

export type AdminCloudtentaclesSendSmsCodeInput = {
  sourceKey?: string
  baseUrl?: string
  username?: string
  phone?: string
  deviceId?: string
  deviceType?: number | string
}

export type AdminCloudtentaclesTestLoginInput = {
  sourceKey?: string
  baseUrl?: string
  username?: string
  password?: string
  phone?: string
  code?: string
  deviceId?: string
  deviceType?: number | string
}

export type AdminCloudtentaclesValidateSessionInput = {
  sourceKey?: string
  baseUrl?: string
  token?: string
  deviceId?: string
  deviceType?: number | string
}

export type AdminCloudtentaclesCatalogQueryInput = {
  sourceKey?: string
  baseUrl?: string
  token?: string
  deviceId?: string
  deviceType?: number | string
}

export type AdminCloudtentaclesDeliveryRecordQueryInput = AdminCloudtentaclesCatalogQueryInput & {
  page?: number | string
  size?: number | string
  startDate?: string
  endDate?: string
  recordCode?: number | string
  platformOrderId?: string
}

export type AdminCloudtentaclesSkuBuyInput = {
  sourceKey?: string
  baseUrl?: string
  token?: string
  deviceId?: string
  deviceType?: number | string
  id?: number | string
  count?: number | string
}

export type AdminCloudtentaclesSkuUseInput = {
  sourceKey?: string
  baseUrl?: string
  token?: string
  deviceId?: string
  deviceType?: number | string
  id?: number | string
  virtualNumberId?: number | string
  phone?: string
}

export type AdminCloudtentaclesVirtualNumberInput = {
  sourceKey?: string
  baseUrl?: string
  token?: string
  deviceId?: string
  deviceType?: number | string
  key?: string
  id?: number | string
  phone?: string
  code?: string
}

export type AdminCloudtentaclesFullFlowInput = {
  sourceKey?: string
  baseUrl?: string
  token?: string
  deviceId?: string
  deviceType?: number | string
  skuId?: number | string
  skuCount?: number | string
  vnKey?: string
}

export type AdminTaskManualDispatchInput = {
  outcome?: string
  resultMessage?: string
  deliveryReference?: string
  deliveredCredential?: string
}

export type AdminTaskKuaishouIndustryConsumeInput = {
  consumeType?: string
  storeName?: string
  storeAddress?: string
  expressCode?: string
  expressNo?: string
}

export type AdminKuaishouIndustryRefundListInput = {
  sellerId?: string
  beginTime?: number | string
  endTime?: number | string
  type?: number | string
  pageSize?: number | string
  currentPage?: number | string
  sort?: number | string
  queryType?: number | string
  negotiateStatus?: number | string
  pcursor?: string
  status?: number | string
  orderId?: string
  option?: Record<string, unknown>
}

export type AdminKuaishouIndustryRefundApproveInput = {
  sellerId?: string
  orderId?: string
  refundId?: number | string
  desc?: string
  refundAmount?: number | string
  status?: number | string
  negotiateStatus?: number | string
  refundHandingWay?: number | string
}

export type AdminKuaishouIndustryRefundDisagreeInput = {
  sellerId?: string
  orderId?: string
  refundId?: number | string
  sellerDisagreeReason?: number | string
  sellerDisagreeDesc?: string
  sellerDisagreeImages?: string[]
  status?: number | string
  negotiateStatus?: number | string
}

export type AdminKuaishouIndustryVoucherCheckAvailableInput = {
  sellerId?: string
  buyerId?: string
  orderId?: string
  oid?: string
  voucherCode?: string
  eticketType?: string
  bizTypeCode?: string
  etickets?: Array<{ id?: string; code?: string; num?: number | string }>
}

export type AdminKuaishouIndustryVoucherReverseInput = {
  sellerId?: string
  oid?: string
  orderId?: string
  voucherCode?: string
  eticketType?: string
  etickets?: Array<{ id?: string; code?: string; num?: number | string }>
  serialNum?: string
  reason?: string
  ext?: string | Record<string, unknown>
  token?: string
}

export type AdminKuaishouIndustryVoucherConsumeInput = {
  oid?: string
  orderId?: string
  taskId?: number | string
  voucherCode?: string
  token?: string
  eticketType?: string
  consumeType?: string
  serialNum?: string
  storeName?: string
  storeAddress?: string
  expressCode?: string
  expressNo?: string
}

export type AdminKuaishouIndustryVoucherResendInput = {
  oid?: string
  orderId?: string
  taskId?: number | string
  voucherCode?: string
}

export type AdminKuaishouIndustryVoucherDestroyInput = {
  oid?: string
  orderId?: string
  taskId?: number | string
  voucherCode?: string
  token?: string
  eticketType?: string
  reason?: string
}
