@lowdefy/build
Version:
1,216 lines • 76.1 kB
JavaScript
export default {
$schema: 'http://json-schema.org/draft-07/schema#',
$id: 'http://lowdefy.com/appSchema.json',
type: 'object',
title: 'Lowdefy App Schema',
definitions: {
action: {
type: 'object',
additionalProperties: false,
required: [
'id',
'type'
],
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
async: {
type: 'boolean',
errorMessage: {
type: 'Action "async" should be a boolean.'
}
},
id: {
type: 'string',
errorMessage: {
type: 'Action "id" should be a string.'
}
},
messages: {},
params: {},
skip: {},
type: {
type: 'string',
errorMessage: {
type: 'Action "type" should be a string.'
}
}
},
errorMessage: {
type: 'Action should be an object.',
required: {
id: 'Action should have required property "id".',
type: 'Action should have required property "type".'
}
}
},
agent: {
type: 'object',
additionalProperties: false,
required: [
'id',
'type',
'connectionId'
],
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
id: {
type: 'string',
errorMessage: {
type: 'Agent "id" should be a string.'
}
},
type: {
type: 'string',
errorMessage: {
type: 'Agent "type" should be a string.'
}
},
connectionId: {
type: 'string',
errorMessage: {
type: 'Agent "connectionId" should be a string.'
}
},
properties: {
type: 'object',
errorMessage: {
type: 'Agent "properties" should be an object.'
}
},
tools: {
type: 'array',
items: {
anyOf: [
{
type: 'string'
},
{
type: 'object',
required: [
'endpointId'
],
properties: {
endpointId: {
type: 'string'
},
confirm: {
const: true
}
},
additionalProperties: false
}
]
},
errorMessage: {
type: 'Agent "tools" should be an array.'
}
},
mcp: {
type: 'array',
items: {
anyOf: [
{
type: 'string'
},
{
type: 'object',
properties: {
connectionId: {
type: 'string'
},
url: {
type: 'string'
},
transport: {
type: 'string',
enum: [
'http',
'sse',
'stdio'
],
default: 'http'
},
headers: {
type: 'object'
},
command: {
type: 'string'
},
args: {
type: 'array',
items: {
type: 'string'
}
},
env: {
type: 'object'
},
confirm: {
const: true
}
},
additionalProperties: false
}
]
},
errorMessage: {
type: 'Agent "mcp" should be an array.'
}
},
hooks: {
type: 'object',
properties: {
onStart: {
type: 'array',
items: {
type: 'string'
}
},
onStepStart: {
type: 'array',
items: {
type: 'string'
}
},
onToolCallStart: {
type: 'array',
items: {
type: 'string'
}
},
onToolCallFinish: {
type: 'array',
items: {
type: 'string'
}
},
onStepFinish: {
type: 'array',
items: {
type: 'string'
}
},
onFinish: {
type: 'array',
items: {
type: 'string'
}
}
},
errorMessage: {
type: 'Agent "hooks" should be an object.'
}
},
agents: {
type: 'array',
items: {
anyOf: [
{
type: 'string'
},
{
type: 'object',
required: [
'agentId'
],
properties: {
agentId: {
type: 'string'
},
description: {
type: 'string'
},
inputSchema: {
type: 'object'
}
},
additionalProperties: false
}
]
},
errorMessage: {
type: 'Agent "agents" should be an array.'
}
}
},
errorMessage: {
type: 'Agent should be an object.',
required: {
id: 'Agent should have required property "id".',
type: 'Agent should have required property "type".',
connectionId: 'Agent should have required property "connectionId".'
}
}
},
app: {
type: 'object',
additionalProperties: false,
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
html: {
type: 'object',
errorMessage: {
type: 'App "app.html" should be an object.'
},
properties: {
appendBody: {
type: 'string',
errorMessage: {
type: 'App "app.html.appendBody" should be a string.'
}
},
appendHead: {
type: 'string',
errorMessage: {
type: 'App "app.html.appendHead" should be a string.'
}
}
}
}
}
},
authConfig: {
type: 'object',
additionalProperties: false,
errorMessage: {
type: 'App "auth" should be an object.'
},
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
advanced: {
type: 'object',
properties: {
cookies: {
type: 'object'
}
}
},
adapter: {
type: 'object',
required: [
'id',
'type'
],
properties: {
id: {
type: 'string',
errorMessage: {
type: 'Auth adapter "id" should be a string.'
}
},
type: {
type: 'string',
errorMessage: {
type: 'Auth adapter "type" should be a string.'
}
},
properties: {
type: 'object'
}
},
errorMessage: {
type: 'Auth adapter should be an object.',
required: {
id: 'Auth adapter should have required property "id".',
type: 'Auth adapter should have required property "type".'
}
}
},
api: {
type: 'object',
additionalProperties: false,
errorMessage: {
type: 'App "config.auth.api" should be an object.'
},
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
protected: {
type: [
'array',
'boolean'
],
errorMessage: {
type: 'App "auth.api.protected.$" should be an array of strings.'
},
items: {
type: 'string',
description: 'Page ids for which authentication is required. When specified, all unspecified api endpoints will be public.',
errorMessage: {
type: 'App "auth.api.protected.$" should be an array of strings.'
}
}
},
public: {
type: [
'array',
'boolean'
],
errorMessage: {
type: 'App "auth.api.public.$" should be an array of strings.'
},
items: {
type: 'string',
description: 'Page ids for which authentication is not required. When specified, all unspecified api endpoints will be protected.',
errorMessage: {
type: 'App "auth.api.public.$" should be an array of strings.'
}
}
},
roles: {
type: 'object',
patternProperties: {
'^.*$': {
type: 'array',
items: {
type: 'string'
},
errorMessage: {
type: 'App "auth.api.roles.[role]" should be an array of strings.'
}
}
},
errorMessage: {
type: 'App "auth.api.roles" should be an object.'
}
}
}
},
authPages: {
type: 'object',
additionalProperties: false,
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
signIn: {
type: 'string',
default: '/auth/signin'
},
signOut: {
type: 'string',
default: '/auth/signout'
},
error: {
type: 'string',
description: 'Error code passed in query string as ?error=',
default: '/auth/error'
},
verifyRequest: {
type: 'string',
description: 'Used for check email message',
default: '/auth/verify-request'
},
newUser: {
type: 'string',
description: 'New users will be directed here on first sign in (leave the property out if not of interest)',
default: '/auth/new-user'
}
}
},
callbacks: {
type: 'array',
items: {
type: 'object',
required: [
'id',
'type'
],
properties: {
id: {
type: 'string',
errorMessage: {
type: 'Auth callback "id" should be a string.'
}
},
type: {
type: 'string',
errorMessage: {
type: 'Auth callback "type" should be a string.'
}
},
properties: {
type: 'object'
}
},
errorMessage: {
type: 'Auth callback should be an object.',
required: {
id: 'Auth callback should have required property "id".',
type: 'Auth callback should have required property "type".'
}
}
}
},
debug: {
type: 'boolean',
errorMessage: {
type: 'Auth debug should be a boolean.'
}
},
events: {
type: 'array',
items: {
type: 'object',
required: [
'id',
'type'
],
properties: {
id: {
type: 'string',
errorMessage: {
type: 'Auth event "id" should be a string.'
}
},
type: {
type: 'string',
errorMessage: {
type: 'Auth event "type" should be a string.'
}
},
properties: {
type: 'object'
}
},
errorMessage: {
type: 'Auth event should be an object.',
required: {
id: 'Auth event should have required property "id".',
type: 'Auth event should have required property "type".'
}
}
}
},
pages: {
type: 'object',
additionalProperties: false,
errorMessage: {
type: 'App "config.auth.pages" should be an object.'
},
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
protected: {
type: [
'array',
'boolean'
],
errorMessage: {
type: 'App "auth.pages.protected.$" should be an array of strings.'
},
items: {
type: 'string',
description: 'Page ids for which authentication is required. When specified, all unspecified pages will be public.',
errorMessage: {
type: 'App "auth.pages.protected.$" should be an array of strings.'
}
}
},
public: {
type: [
'array',
'boolean'
],
errorMessage: {
type: 'App "auth.pages.public.$" should be an array of strings.'
},
items: {
type: 'string',
description: 'Page ids for which authentication is not required. When specified, all unspecified pages will be protected.',
errorMessage: {
type: 'App "auth.pages.public.$" should be an array of strings.'
}
}
},
roles: {
type: 'object',
patternProperties: {
'^.*$': {
type: 'array',
items: {
type: 'string'
},
errorMessage: {
type: 'App "auth.pages.roles.[role]" should be an array of strings.'
}
}
},
errorMessage: {
type: 'App "auth.pages.roles" should be an object.'
}
}
}
},
providers: {
type: 'array',
items: {
type: 'object',
required: [
'id',
'type'
],
properties: {
id: {
type: 'string',
errorMessage: {
type: 'Auth provider "id" should be a string.'
}
},
type: {
type: 'string',
errorMessage: {
type: 'Auth provider "type" should be a string.'
}
},
properties: {
type: 'object'
}
},
errorMessage: {
type: 'Auth provider should be an object.',
required: {
id: 'Auth provider should have required property "id".',
type: 'Auth provider should have required property "type".'
}
}
}
},
session: {
type: 'object'
},
theme: {
type: 'object'
},
userFields: {
type: 'object'
},
dev: {
type: 'object',
additionalProperties: false,
properties: {
'~ignoreBuildChecks': {},
'~r': {},
'~l': {},
mockUser: {
type: 'object',
description: 'Mock user object for e2e testing in dev server. Any JSON structure accepted.'
}
}
}
}
},
block: {
type: 'object',
additionalProperties: false,
required: [
'id',
'type'
],
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
id: {
type: 'string',
errorMessage: {
type: 'Block "id" should be a string.'
}
},
type: {
type: 'string',
errorMessage: {
type: 'Block "type" should be a string.'
}
},
field: {
type: 'string',
errorMessage: {
type: 'Block "field" should be a string.'
}
},
properties: {
type: 'object'
},
layout: {
type: 'object',
errorMessage: {
type: 'Block "layout" should be an object.'
}
},
skeleton: {
type: 'object',
errorMessage: {
type: 'Block "skeleton" should be an object.'
}
},
style: {
type: 'object',
errorMessage: {
type: 'Block "style" should be an object.'
}
},
class: {
oneOf: [
{
type: 'string'
},
{
type: 'array',
items: {
type: 'string'
}
},
{
type: 'object',
additionalProperties: {
oneOf: [
{
type: 'string'
},
{
type: 'array',
items: {
type: 'string'
}
}
]
}
}
],
errorMessage: {
type: 'Block "class" should be a string, array of strings, or object.'
}
},
visible: {},
loading: {},
blocks: {
type: 'array',
items: {
$ref: '#/definitions/block'
},
errorMessage: {
type: 'Block "blocks" should be an array.'
}
},
requests: {
type: 'array',
items: {
$ref: '#/definitions/request'
},
errorMessage: {
type: 'Block "requests" should be an array.'
}
},
required: {},
validate: {
type: 'array',
items: {
type: 'object',
errorMessage: {
type: 'Block "validate" should be an array of objects.'
}
},
errorMessage: {
type: 'Block "validate" should be an array.'
}
},
events: {
type: 'object',
patternProperties: {
'^.*$': {
anyOf: [
{
type: 'array',
items: {
$ref: '#/definitions/action'
}
},
{
type: 'object',
additionalProperties: false,
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
try: {
type: 'array',
items: {
$ref: '#/definitions/action'
}
},
catch: {
type: 'array',
items: {
$ref: '#/definitions/action'
}
},
debounce: {
type: 'object',
additionalProperties: false,
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
immediate: {
type: 'boolean',
errorMessage: {
type: 'Event "debounce.immediate" should be an boolean.'
}
},
ms: {
type: 'number',
errorMessage: {
type: 'Event "debounce.ms" should be a number.'
}
}
}
},
shortcut: {
anyOf: [
{
type: 'string',
errorMessage: {
type: 'Event "shortcut" should be a string.'
}
},
{
type: 'array',
items: {
type: 'string'
},
errorMessage: {
type: 'Event "shortcut" should be a string or array of strings.'
}
}
]
}
}
}
]
}
},
errorMessage: {
type: 'Block "events" should be an object.'
}
},
slots: {
type: 'object',
patternProperties: {
'^.*$': {
type: 'object',
properties: {
blocks: {
type: 'array',
items: {
$ref: '#/definitions/block'
},
errorMessage: {
type: 'Block "slots.{slotKey}.blocks" should be an array.'
}
}
},
errorMessage: {
type: 'Block "slots.{slotKey}" should be an object.'
}
}
},
errorMessage: {
type: 'Block "slots" should be an object.'
}
},
areas: {
type: 'object',
patternProperties: {
'^.*$': {
type: 'object',
properties: {
blocks: {
type: 'array',
items: {
$ref: '#/definitions/block'
},
errorMessage: {
type: 'Block "areas.{areaKey}.blocks" should be an array.'
}
}
},
errorMessage: {
type: 'Block "areas.{areaKey}" should be an object.'
}
}
},
errorMessage: {
type: 'Block "areas" should be an object.'
}
}
},
errorMessage: {
type: 'Block should be an object.',
required: {
id: 'Block should have required property "id".',
type: 'Block should have required property "type".'
}
}
},
endpoint: {
type: 'object',
additionalProperties: false,
required: [
'id',
'type'
],
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
id: {
type: 'string',
errorMessage: {
type: 'Api endpoint "id" should be a string.'
}
},
type: {
type: 'string',
errorMessage: {
type: 'Api endpoint "type" should be a string.'
}
},
description: {
type: 'string',
errorMessage: {
type: 'Api endpoint "description" should be a string.'
}
},
payloadSchema: {
type: 'object',
errorMessage: {
type: 'Api endpoint "payloadSchema" should be an object.'
}
},
routine: {
anyOf: [
{
type: 'array',
errorMessage: {
type: 'Api endpoint "routine" should be an array or object.'
}
},
{
type: 'object',
errorMessage: {
type: 'Api endpoint "routine" should be an array or object.'
}
}
]
}
}
},
connection: {
type: 'object',
additionalProperties: false,
required: [
'id',
'type'
],
properties: {
'~ignoreBuildChecks': {
oneOf: [
{
const: true
},
{
type: 'array',
items: {
type: 'string',
enum: [
'state-refs',
'payload-refs',
'step-refs',
'link-refs',
'request-refs',
'connection-refs',
'types',
'schema'
]
}
}
]
},
'~r': {},
'~l': {},
id: {
type: 'string',
errorMessage: {
type: 'Connection "id" should be a string.'
}
},
type: {
type: 'string',
errorMessage: {
type: 'Connection "type" should be a string.'
}
},
properties: {
type: 'object',
errorMessage: {
type: 'Connection "properties" should be an object.'
}
}
},
errorMessage: {
type: 'Connection should be an object.',
required: {
id