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

55 lines
860 B
TypeScript
Raw Normal View History

import { Document } from "@budibase/types"
export {
Query,
Datasource,
FieldSchema,
TableSchema,
Table,
Document,
Row,
} from "@budibase/types"
export interface Application extends Document {
_id: string
2022-02-24 16:13:14 +01:00
appId?: string
}
interface JsonSchemaField {
properties: {
[key: string]: {
2021-06-28 11:21:37 +02:00
type: string
title: string
customType?: string
}
}
required?: string[]
}
export interface AutomationStep {
2021-06-28 11:21:37 +02:00
description: string
event?: string
icon: string
id: string
inputs: {
2021-06-28 11:21:37 +02:00
[key: string]: any
}
name: string
schema: {
2021-06-28 11:21:37 +02:00
inputs: JsonSchemaField
outputs: JsonSchemaField
}
stepId: string
tagline: string
type: string
}
export interface Automation extends Document {
2021-06-28 11:21:37 +02:00
name: string
type: string
appId?: string
definition: {
2021-06-28 11:21:37 +02:00
steps: AutomationStep[]
trigger?: AutomationStep
}
}