export type JsonValue = unknown

export interface VideoDiscoveryRunRecord {
  id: number
  run_id: string
  biz_dt: string | null
  demand_grade_id: number | null
  demand_word: string
  seed_video_id: string | null
  seed_video_title: string | null
  relevant_points: JsonValue
  intent_summary: string | null
  status: string
  search_count: number
  candidate_count: number
  primary_count: number
  valid_primary_count: number
  outcome_status: 'goal_met' | 'partial' | 'no_match' | 'failed' | null
  attempt_count: number
  rejected_count: number
  pending_count: number
  stop_reason: string | null
  create_time: string | null
  update_time: string | null
}

export interface VideoDiscoverySearchRecord {
  id: number
  run_id: string
  search_key: string
  keyword: string
  query_reason: string
  source_type: string
  source_value: string | null
  parent_search_id: number | null
  provider: string
  provider_state: JsonValue
  content_type: string
  sort_type: string
  publish_time: string
  cursor: string
  page_no: number
  results_count: number
  new_candidate_count: number
  has_more: boolean
  next_cursor: string | null
  result_ids: JsonValue
  candidates: VideoDiscoverySearchCandidate[]
  status: string
  error_message: string | null
  create_time: string | null
  update_time: string | null
}

export interface VideoDiscoverySearchCandidate {
  id: number
  aweme_id: string
  title: string | null
  content_link: string | null
  author_name: string | null
  decision_bucket: string
  play_count: number | null
  like_count: number | null
  comment_count: number | null
  collect_count: number | null
  share_count: number | null
  relevance_score: number | null
  elder_score: number | null
  share_score: number | null
  value_score: number | null
}

export interface VideoDiscoveryCandidateRecord {
  id: number
  run_id: string
  search_id: number | null
  aweme_id: string
  title: string | null
  content_link: string | null
  author_name: string | null
  author_sec_uid: string | null
  source_keywords: JsonValue
  source_search_ids: JsonValue
  tags: JsonValue
  play_count: number | null
  like_count: number | null
  comment_count: number | null
  collect_count: number | null
  share_count: number | null
  content_age_evidence: JsonValue
  account_age_evidence: JsonValue
  age_normalization: JsonValue
  relevance_score: number | null
  elder_score: number | null
  share_score: number | null
  value_score: number | null
  decision_reason: string | null
  decision_bucket: string
  aigc_crawler_plan_id: string | null
  aigc_produce_plan_id: string | null
  aigc_publish_plan_id: string | null
  aigc_plan_label: string | null
  create_time: string | null
  update_time: string | null
}

export interface PagedResponse<T> {
  items: T[]
  total: number
  limit: number
  offset: number
}
