From f2b81859059a804c3bbeb7e41f742d37fddf4fdf Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 29 Aug 2024 13:20:35 +0200 Subject: [PATCH] Fix types --- packages/server/src/sdk/app/views/index.ts | 2 +- packages/types/src/sdk/view.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index 493104d252..ab4b82d162 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -198,7 +198,7 @@ export async function enrichSchema( return result } - let schema: TableSchema = {} + let schema: ViewV2Enriched["schema"] = {} const viewSchema = view.schema || {} const anyViewOrder = Object.values(viewSchema).some(ui => ui.order != null) diff --git a/packages/types/src/sdk/view.ts b/packages/types/src/sdk/view.ts index cb551dada9..b330db3950 100644 --- a/packages/types/src/sdk/view.ts +++ b/packages/types/src/sdk/view.ts @@ -1,5 +1,9 @@ -import { TableSchema, ViewV2 } from "../documents" +import { FieldSchema, RelationSchemaField, ViewV2 } from "../documents" export interface ViewV2Enriched extends ViewV2 { - schema?: TableSchema + schema?: { + [key: string]: FieldSchema & { + columns?: Record + } + } }