Fix types

This commit is contained in:
Adria Navarro 2024-08-29 13:20:35 +02:00
parent 79ed5cd5a6
commit f2b8185905
2 changed files with 7 additions and 3 deletions

View File

@ -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)

View File

@ -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<string, RelationSchemaField>
}
}
}