budibase/packages/server/src/constants/definitions.ts

43 lines
808 B
TypeScript
Raw Normal View History

export interface Table {
2021-06-24 19:17:26 +02:00
_id: string
_rev?: string
type?: string
views?: {}
name?: string
primary?: string[]
schema: {
[key: string]: {
// TODO: replace with field types enum when done
2021-06-24 19:17:26 +02:00
type: string
fieldName?: string
name: string
constraints?: {
2021-06-24 19:17:26 +02:00
type?: string
email?: boolean
inclusion?: string[]
length?: {
2021-06-24 19:17:26 +02:00
minimum?: string | number
maximum?: string | number
}
presence?: boolean
}
}
2021-06-24 19:17:26 +02:00
}
primaryDisplay?: string
sourceId?: string
}
2021-06-28 14:04:52 +02:00
export interface BudibaseAppMetadata {
_id: string
_rev?: string
appId: string
type: string
version: string
componentlibraries: string[]
name: string
url: string
instance: { _id: string }
updatedAt: Date
2021-06-28 14:04:52 +02:00
createdAt: Date
}