Add typings

This commit is contained in:
Adria Navarro 2025-01-08 13:54:21 +01:00
parent af0312e5fe
commit fc4336a9f3
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { QuerySchema } from "@budibase/types" import { JsonFieldMetadata, QuerySchema } from "@budibase/types"
type Schema = Record<string, QuerySchema | string> type Schema = Record<string, QuerySchema | string>
@ -11,3 +11,11 @@ export const generateQueryArraySchemas: (
schema: Schema, schema: Schema,
nestedSchemaFields?: Record<string, Schema> nestedSchemaFields?: Record<string, Schema>
) => Schema ) => Schema
export const convertJSONSchemaToTableSchema: (
jsonSchema: JsonFieldMetadata,
options: {
squashObjects?: boolean
prefixKeys?: string
}
) => Record<string, { type: string; name: string; prefixKeys: string }>

View File

@ -227,6 +227,7 @@ interface OtherFieldMetadata extends BaseFieldSchema {
| FieldType.OPTIONS | FieldType.OPTIONS
| FieldType.BOOLEAN | FieldType.BOOLEAN
| FieldType.BIGINT | FieldType.BIGINT
| FieldType.JSON
> >
} }