forked from tsai/budibase
16 changed files with 100 additions and 46 deletions
@ -1,28 +0,0 @@ |
|||||
export interface Table { |
|
||||
_id: string |
|
||||
_rev?: string |
|
||||
type?: string |
|
||||
views?: {} |
|
||||
name?: string |
|
||||
primary?: string[] |
|
||||
schema: { |
|
||||
[key: string]: { |
|
||||
// TODO: replace with field types enum when done
|
|
||||
type: string |
|
||||
fieldName?: string |
|
||||
name: string |
|
||||
constraints?: { |
|
||||
type?: string |
|
||||
email?: boolean |
|
||||
inclusion?: string[] |
|
||||
length?: { |
|
||||
minimum?: string | number |
|
||||
maximum?: string | number |
|
||||
} |
|
||||
presence?: boolean |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
primaryDisplay?: string |
|
||||
sourceId?: string |
|
||||
} |
|
||||
@ -0,0 +1,78 @@ |
|||||
|
interface Base { |
||||
|
_id?: string, |
||||
|
_rev?: string, |
||||
|
} |
||||
|
|
||||
|
export interface TableSchema { |
||||
|
[key: string]: { |
||||
|
// TODO: replace with field types enum when done
|
||||
|
type: string, |
||||
|
fieldName?: string, |
||||
|
name: string, |
||||
|
constraints?: { |
||||
|
type?: string, |
||||
|
email?: boolean, |
||||
|
inclusion?: string[], |
||||
|
length?: { |
||||
|
minimum?: string | number, |
||||
|
maximum?: string | number, |
||||
|
}, |
||||
|
presence?: boolean, |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
|
||||
|
export interface Table extends Base { |
||||
|
type?: string, |
||||
|
views?: {}, |
||||
|
name?: string, |
||||
|
primary?: string[], |
||||
|
schema: TableSchema, |
||||
|
primaryDisplay?: string, |
||||
|
sourceId?: string, |
||||
|
} |
||||
|
|
||||
|
export interface Row extends Base { |
||||
|
type?: string, |
||||
|
tableId: string, |
||||
|
[key: string]: any, |
||||
|
} |
||||
|
|
||||
|
interface JsonSchemaField { |
||||
|
properties: { |
||||
|
[key: string]: { |
||||
|
type: string, |
||||
|
title: string, |
||||
|
customType?: string, |
||||
|
}, |
||||
|
}, |
||||
|
required?: string[], |
||||
|
} |
||||
|
|
||||
|
export interface AutomationStep { |
||||
|
description: string, |
||||
|
event?: string, |
||||
|
icon: string, |
||||
|
id: string, |
||||
|
inputs: { |
||||
|
[key: string]: any, |
||||
|
}, |
||||
|
name: string, |
||||
|
schema: { |
||||
|
inputs: JsonSchemaField, |
||||
|
outputs: JsonSchemaField, |
||||
|
}, |
||||
|
stepId: string, |
||||
|
tagline: string, |
||||
|
type: string, |
||||
|
} |
||||
|
|
||||
|
export interface Automation extends Base { |
||||
|
name: string, |
||||
|
type: string, |
||||
|
appId?: string, |
||||
|
definition: { |
||||
|
steps: AutomationStep[], |
||||
|
trigger?: AutomationStep, |
||||
|
}, |
||||
|
} |
||||
Loading…
Reference in new issue