diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index 2dc7a0f6cb..5af82996b0 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -40,7 +40,13 @@ describe("/v2/views", () => { order: SortOrder.DESCENDING, type: SortType.STRING, }, - columns: ["name"], + schema: { + name: { + name: "name", + type: FieldType.STRING, + visible: true, + }, + }, } afterAll(setup.afterAll) diff --git a/packages/types/src/documents/app/view.ts b/packages/types/src/documents/app/view.ts index 781a1a8c5d..73037150d0 100644 --- a/packages/types/src/documents/app/view.ts +++ b/packages/types/src/documents/app/view.ts @@ -1,5 +1,6 @@ import { SortOrder, SortType } from "../../api" import { SearchFilters } from "../../sdk" +import { TableSchema } from "./table" export interface View { name: string @@ -24,7 +25,7 @@ export interface ViewV2 { order?: SortOrder type?: SortType } - columns?: string[] + schema?: TableSchema } export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema