export interface TaskArtifact {
  url?: string
  path: string
  file_name: string
  file_type: string
  last_modified?: number
  isSummary?: boolean
  content?: string
  [key: string]: any
}

export interface SimpleRect {
  x: number
  y: number
  width: number
  height: number
}

export interface ImageOCRLine {
  line_text: string
  line_rect: SimpleRect
}

export type ImageOCRResponse = ReadonlyArray<ImageOCRLine>

export type ImageOCRTextUpdateItem = SimpleRect & {
  source: string
  target: string
  // @todo 临时兼容后端接口
  w: number
  h: number
}

// 识别图片主体返回数据结构
export interface RecognizedImageElement {
  element: string
  type: string
  x: number
  y: number
  w: number
  h: number
}
