Change view columns for schema

This commit is contained in:
Adria Navarro 2023-07-24 11:11:00 +02:00
parent de9b74fd81
commit e068e62eb1
2 changed files with 9 additions and 2 deletions

View File

@ -40,7 +40,13 @@ describe("/v2/views", () => {
order: SortOrder.DESCENDING, order: SortOrder.DESCENDING,
type: SortType.STRING, type: SortType.STRING,
}, },
columns: ["name"], schema: {
name: {
name: "name",
type: FieldType.STRING,
visible: true,
},
},
} }
afterAll(setup.afterAll) afterAll(setup.afterAll)

View File

@ -1,5 +1,6 @@
import { SortOrder, SortType } from "../../api" import { SortOrder, SortType } from "../../api"
import { SearchFilters } from "../../sdk" import { SearchFilters } from "../../sdk"
import { TableSchema } from "./table"
export interface View { export interface View {
name: string name: string
@ -24,7 +25,7 @@ export interface ViewV2 {
order?: SortOrder order?: SortOrder
type?: SortType type?: SortType
} }
columns?: string[] schema?: TableSchema
} }
export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema