import { View as ViewGen, ViewType, XYViewProperties as XYViewPropertiesGen, LinePlusSingleStatProperties as LinePlusSingleStatPropertiesGen, SingleStatViewProperties as SingleStatViewPropertiesGen, TableViewProperties as TableViewPropertiesGen, GaugeViewProperties as GaugeViewPropertiesGen, HistogramViewProperties as HistogramViewPropertiesGen, HeatmapViewProperties as HeatmapViewPropertiesGen, ScatterViewProperties as ScatterViewPropertiesGen, CheckViewProperties as CheckViewPropertiesGen, RenamableField, } from '../api' export interface View extends ViewGen { properties?: T dashboardID?: string cellID?: string } export type ViewProperties = | XYViewProperties | LinePlusSingleStatProperties | SingleStatViewProperties | TableViewProperties | GaugeViewProperties | MarkdownViewProperties | EmptyViewProperties | HistogramViewProperties | HeatmapViewProperties | ScatterViewProperties | CheckViewProperties export interface XYViewProperties extends XYViewPropertiesGen { type: ViewType.Xy } export type XYView = View export interface LinePlusSingleStatProperties extends LinePlusSingleStatPropertiesGen { type: ViewType.LinePlusSingleStat } export type LinePlusSingleStatView = View export interface SingleStatViewProperties extends SingleStatViewPropertiesGen { type: ViewType.SingleStat } export type SingleStatView = View export interface TableViewProperties extends TableViewPropertiesGen { type: ViewType.Table tableOptions: TableOptions } export type TableView = View export interface GaugeViewProperties extends GaugeViewPropertiesGen { type: ViewType.Gauge } export type GaugeView = View export interface HistogramViewProperties extends HistogramViewPropertiesGen { type: ViewType.Histogram } export type HistogramView = View export interface HeatmapViewProperties extends HeatmapViewPropertiesGen { type: ViewType.Heatmap } export type HeatmapView = View export interface ScatterViewProperties extends ScatterViewPropertiesGen { type: ViewType.Scatter } export type ScatterView = View export interface CheckViewProperties extends CheckViewPropertiesGen { type: ViewType.Check } export type CheckView = View // views which do not extend generated view properties base export interface MarkdownViewProperties { type: ViewType.Markdown text: string } export type MarkdownView = View export interface EmptyViewProperties { type: ViewType.Empty } export type EmptyView = View // export interface TableOptions { verticalTimeAxis: boolean sortBy: RenamableField wrapping: TableWrappingType fixFirstColumn: boolean } export enum TableWrappingType { Truncate = 'truncate', Wrap = 'wrap', SingleLine = 'single-line', }