Add typings
This commit is contained in:
parent
af0312e5fe
commit
fc4336a9f3
|
@ -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 }>
|
||||||
|
|
|
@ -227,6 +227,7 @@ interface OtherFieldMetadata extends BaseFieldSchema {
|
||||||
| FieldType.OPTIONS
|
| FieldType.OPTIONS
|
||||||
| FieldType.BOOLEAN
|
| FieldType.BOOLEAN
|
||||||
| FieldType.BIGINT
|
| FieldType.BIGINT
|
||||||
|
| FieldType.JSON
|
||||||
>
|
>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue