Created
February 22, 2021 17:16
-
-
Save o0x2a/97934ac95dd078c4b7bf3bb33d2e05f6 to your computer and use it in GitHub Desktop.
Bot Config Schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "definitions": { | |
| "APIBlockType": { | |
| "properties": { | |
| "api": { | |
| "$ref": "#/definitions/APIConfig" | |
| }, | |
| "category": { | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "block" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "components": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ResponseComponent" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "next": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/OutgoingBlock" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "paragraphs": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ParagraphBinding" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "position": { | |
| "properties": { | |
| "x": { | |
| "type": "number" | |
| }, | |
| "y": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "x", | |
| "y" | |
| ], | |
| "type": "object" | |
| }, | |
| "readMore": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/ReadMore" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "required": { | |
| "type": [ | |
| "null", | |
| "boolean" | |
| ] | |
| }, | |
| "templateId": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "text": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "api" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "api", | |
| "id", | |
| "position", | |
| "title", | |
| "type" | |
| ], | |
| "type": "object" | |
| }, | |
| "APIConfig": { | |
| "properties": { | |
| "endpoint": { | |
| "type": "string" | |
| }, | |
| "payload": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "endpoint", | |
| "payload" | |
| ], | |
| "type": "object" | |
| }, | |
| "Action": { | |
| "enum": [ | |
| "SET_USER_VARIABLE", | |
| "SET_VARIABLE" | |
| ], | |
| "type": "string" | |
| }, | |
| "Block": { | |
| "properties": { | |
| "category": { | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "action", | |
| "block", | |
| "waypoint" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "components": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ResponseComponent" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "next": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/OutgoingBlock" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "paragraphs": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ParagraphBinding" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "position": { | |
| "properties": { | |
| "x": { | |
| "type": "number" | |
| }, | |
| "y": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "x", | |
| "y" | |
| ], | |
| "type": "object" | |
| }, | |
| "readMore": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/ReadMore" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "required": { | |
| "type": [ | |
| "null", | |
| "boolean" | |
| ] | |
| }, | |
| "text": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "$ref": "#/definitions/BlockTypes" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "position", | |
| "title", | |
| "type" | |
| ], | |
| "type": "object" | |
| }, | |
| "BlockTypes": { | |
| "enum": [ | |
| "api", | |
| "condition", | |
| "exit", | |
| "multi", | |
| "outlet", | |
| "start", | |
| "text", | |
| "trigger" | |
| ], | |
| "type": "string" | |
| }, | |
| "BotType": { | |
| "enum": [ | |
| "child", | |
| "parent", | |
| "side" | |
| ], | |
| "type": "string" | |
| }, | |
| "ComponentType": { | |
| "enum": [ | |
| "confirm", | |
| "freespeech", | |
| "none", | |
| "predefined" | |
| ], | |
| "type": "string" | |
| }, | |
| "ConditionBlockType": { | |
| "properties": { | |
| "category": { | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "action" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "components": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ResponseComponent" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "nextFalse": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/OutgoingBlock" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "nextTrue": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/OutgoingBlock" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "operator": { | |
| "$ref": "#/definitions/ConditionOperator" | |
| }, | |
| "paragraphs": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ParagraphBinding" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "position": { | |
| "properties": { | |
| "x": { | |
| "type": "number" | |
| }, | |
| "y": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "x", | |
| "y" | |
| ], | |
| "type": "object" | |
| }, | |
| "readMore": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/ReadMore" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "required": { | |
| "type": [ | |
| "null", | |
| "boolean" | |
| ] | |
| }, | |
| "text": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "condition" | |
| ], | |
| "type": "string" | |
| }, | |
| "valueLeft": { | |
| "type": "string" | |
| }, | |
| "valueRight": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "operator", | |
| "position", | |
| "title", | |
| "type", | |
| "valueLeft", | |
| "valueRight" | |
| ], | |
| "type": "object" | |
| }, | |
| "ConditionOperator": { | |
| "enum": [ | |
| "!!", | |
| "!=", | |
| "<", | |
| "<=", | |
| "==", | |
| ">", | |
| ">=" | |
| ], | |
| "type": "string" | |
| }, | |
| "OutgoingBlock": { | |
| "properties": { | |
| "handles": { | |
| "properties": { | |
| "source": { | |
| "type": "string" | |
| }, | |
| "target": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "source", | |
| "target" | |
| ], | |
| "type": "object" | |
| }, | |
| "id": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "handles", | |
| "id" | |
| ], | |
| "type": "object" | |
| }, | |
| "OutletBlockType": { | |
| "properties": { | |
| "category": { | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "waypoint" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "components": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ResponseComponent" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "next": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/OutgoingBlock" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "nextBotId": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "paragraphs": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ParagraphBinding" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "position": { | |
| "properties": { | |
| "x": { | |
| "type": "number" | |
| }, | |
| "y": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "x", | |
| "y" | |
| ], | |
| "type": "object" | |
| }, | |
| "readMore": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/ReadMore" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "required": { | |
| "type": [ | |
| "null", | |
| "boolean" | |
| ] | |
| }, | |
| "text": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "outlet" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "position", | |
| "title", | |
| "type" | |
| ], | |
| "type": "object" | |
| }, | |
| "ParagraphBinding": { | |
| "properties": { | |
| "color": { | |
| "type": "string" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "title": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "color", | |
| "id", | |
| "title" | |
| ], | |
| "type": "object" | |
| }, | |
| "PredefinedOptions": { | |
| "properties": { | |
| "hint": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "next": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/OutgoingBlock" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "paragraphs": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ParagraphBinding" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "value": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "title" | |
| ], | |
| "type": "object" | |
| }, | |
| "ReadMore": { | |
| "properties": { | |
| "enabled": { | |
| "type": "boolean" | |
| }, | |
| "text": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "enabled" | |
| ], | |
| "type": "object" | |
| }, | |
| "ResponseComponent": { | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "props": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/ResponseComponentProps" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "type": { | |
| "$ref": "#/definitions/ComponentType" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "type" | |
| ], | |
| "type": "object" | |
| }, | |
| "ResponseComponentProps": { | |
| "properties": { | |
| "hint": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "options": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/PredefinedOptions" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "title": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "validation": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/ResponseValidationType" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| } | |
| }, | |
| "type": "object" | |
| }, | |
| "ResponseValidationType": { | |
| "properties": { | |
| "pattern": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "type": { | |
| "$ref": "#/definitions/ValidationType" | |
| } | |
| }, | |
| "required": [ | |
| "type" | |
| ], | |
| "type": "object" | |
| }, | |
| "TriggerBlockType": { | |
| "properties": { | |
| "action": { | |
| "$ref": "#/definitions/Action" | |
| }, | |
| "category": { | |
| "anyOf": [ | |
| { | |
| "enum": [ | |
| "action" | |
| ], | |
| "type": "string" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "components": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ResponseComponent" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "next": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/OutgoingBlock" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "paragraphs": { | |
| "anyOf": [ | |
| { | |
| "items": { | |
| "$ref": "#/definitions/ParagraphBinding" | |
| }, | |
| "type": "array" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "position": { | |
| "properties": { | |
| "x": { | |
| "type": "number" | |
| }, | |
| "y": { | |
| "type": "number" | |
| } | |
| }, | |
| "required": [ | |
| "x", | |
| "y" | |
| ], | |
| "type": "object" | |
| }, | |
| "readMore": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/ReadMore" | |
| }, | |
| { | |
| "type": "null" | |
| } | |
| ] | |
| }, | |
| "required": { | |
| "type": [ | |
| "null", | |
| "boolean" | |
| ] | |
| }, | |
| "text": { | |
| "type": [ | |
| "null", | |
| "string" | |
| ] | |
| }, | |
| "title": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "enum": [ | |
| "trigger" | |
| ], | |
| "type": "string" | |
| }, | |
| "value": { | |
| "type": "string" | |
| }, | |
| "variable": { | |
| "type": "string" | |
| } | |
| }, | |
| "required": [ | |
| "action", | |
| "id", | |
| "position", | |
| "title", | |
| "type", | |
| "value", | |
| "variable" | |
| ], | |
| "type": "object" | |
| }, | |
| "ValidationType": { | |
| "enum": [ | |
| "anything", | |
| "date", | |
| "email", | |
| "name", | |
| "number", | |
| "pattern", | |
| "phone", | |
| "textarea", | |
| "unique_id" | |
| ], | |
| "type": "string" | |
| } | |
| }, | |
| "items": { | |
| "properties": { | |
| "blocks": { | |
| "items": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/Block" | |
| }, | |
| { | |
| "$ref": "#/definitions/ConditionBlockType" | |
| }, | |
| { | |
| "$ref": "#/definitions/TriggerBlockType" | |
| }, | |
| { | |
| "$ref": "#/definitions/OutletBlockType" | |
| }, | |
| { | |
| "$ref": "#/definitions/APIBlockType" | |
| } | |
| ] | |
| }, | |
| "type": "array" | |
| }, | |
| "id": { | |
| "type": "string" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, | |
| "type": { | |
| "$ref": "#/definitions/BotType" | |
| } | |
| }, | |
| "required": [ | |
| "blocks", | |
| "id", | |
| "name", | |
| "type" | |
| ], | |
| "type": "object" | |
| }, | |
| "type": "array" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment