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