2
0

Add Wait block

Closes #142
This commit is contained in:
Baptiste Arnaud
2023-01-26 18:23:09 +01:00
parent ee864d9729
commit fa9e4b7b67
29 changed files with 621 additions and 313 deletions

View File

@@ -1446,59 +1446,193 @@
{
"anyOf": [
{
"allOf": [
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
}
},
"required": [
"id",
"groupId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Code"
]
},
"options": {
"allOf": [
{
"type": "object",
"properties": {
"name": {
"id": {
"type": "string"
},
"content": {
"groupId": {
"type": "string"
},
"shouldExecuteInParentContext": {
"type": "boolean"
"outgoingEdgeId": {
"type": "string"
}
},
"required": [
"name"
"id",
"groupId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Code"
]
},
"options": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"content": {
"type": "string"
},
"shouldExecuteInParentContext": {
"type": "boolean"
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"required": [
"type",
"options"
],
"additionalProperties": false
}
},
"required": [
"type",
"options"
],
"additionalProperties": false
]
},
{
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
}
},
"required": [
"id",
"groupId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Condition"
]
},
"items": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
}
},
"required": [
"id",
"blockId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "number",
"enum": [
1
]
},
"content": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Greater than",
"Less than",
"Is set"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"type",
"items"
],
"additionalProperties": false
}
]
}
]
},
@@ -1529,104 +1663,28 @@
"type": {
"type": "string",
"enum": [
"Condition"
"Redirect"
]
},
"items": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
}
},
"required": [
"id",
"blockId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "number",
"enum": [
1
]
},
"content": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Greater than",
"Less than",
"Is set"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
}
]
}
"options": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"isNewTab": {
"type": "boolean"
}
},
"required": [
"isNewTab"
],
"additionalProperties": false
}
},
"required": [
"type",
"items"
"options"
],
"additionalProperties": false
}
@@ -1661,22 +1719,19 @@
"type": {
"type": "string",
"enum": [
"Redirect"
"Typebot link"
]
},
"options": {
"type": "object",
"properties": {
"url": {
"typebotId": {
"type": "string"
},
"isNewTab": {
"type": "boolean"
"groupId": {
"type": "string"
}
},
"required": [
"isNewTab"
],
"additionalProperties": false
}
},
@@ -1717,17 +1772,20 @@
"type": {
"type": "string",
"enum": [
"Typebot link"
"Set variable"
]
},
"options": {
"type": "object",
"properties": {
"typebotId": {
"variableId": {
"type": "string"
},
"groupId": {
"expressionToEvaluate": {
"type": "string"
},
"isCode": {
"type": "boolean"
}
},
"additionalProperties": false
@@ -1770,20 +1828,14 @@
"type": {
"type": "string",
"enum": [
"Set variable"
"Wait"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"secondsToWaitFor": {
"type": "string"
},
"expressionToEvaluate": {
"type": "string"
},
"isCode": {
"type": "boolean"
}
},
"additionalProperties": false
@@ -4406,168 +4458,232 @@
}
]
},
"logic": {
"type": "object",
"properties": {
"redirect": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"isNewTab": {
"type": "boolean"
}
},
"required": [
"isNewTab"
],
"additionalProperties": false
},
"codeToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"clientSideActions": {
"type": "array",
"items": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"properties": {
"codeToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"integrations": {
"type": "object",
"properties": {
"chatwoot": {
"type": "object",
"properties": {
"codeToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"not": {}
},
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"not": {}
},
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
}
],
"nullable": true
}
},
{
"type": "number"
}
]
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"required": [
"codeToExecute"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"redirect": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
{
"isNewTab": {
"type": "boolean"
}
]
},
"required": [
"isNewTab"
],
"additionalProperties": false
}
},
"required": [
"redirect"
],
"nullable": true
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"chatwoot": {
"type": "object",
"properties": {
"codeToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"not": {}
},
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"required": [
"codeToExecute"
],
"additionalProperties": false
}
},
"required": [
"id"
"chatwoot"
],
"additionalProperties": false
}
}
]
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
{
"type": "object",
"properties": {
"googleAnalytics": {
"type": "object",
"properties": {
"trackingId": {
"type": "string"
},
"category": {
"type": "string"
},
"action": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"type": "number"
}
},
"additionalProperties": false
}
},
"required": [
"googleAnalytics"
],
"additionalProperties": false
}
]
},
"required": [
"codeToExecute"
],
"additionalProperties": false
},
"googleAnalytics": {
"type": "object",
"properties": {
"trackingId": {
"type": "string"
{
"type": "object",
"properties": {
"wait": {
"type": "object",
"properties": {
"secondsToWaitFor": {
"type": "number"
}
},
"required": [
"secondsToWaitFor"
],
"additionalProperties": false
}
},
"category": {
"type": "string"
},
"action": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"type": "number"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
"required": [
"wait"
],
"additionalProperties": false
}
]
}
},
"sessionId": {
"type": "string"