{
  "openapi": "3.0.3",
  "info": {
    "title": "Chat API",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://typebot.io/api"
    }
  ],
  "externalDocs": {
    "url": "https://docs.typebot.io/api-reference"
  },
  "paths": {
    "/v1/sendMessage": {
      "post": {
        "operationId": "sendMessageV1",
        "summary": "Send a message",
        "description": "To initiate a chat, do not provide a `sessionId` nor a `message`.\n\nContinue the conversation by providing the `sessionId` and the `message` that should answer the previous question.\n\nSet the `isPreview` option to `true` to chat with the non-published version of the typebot.",
        "tags": [
          "Deprecated"
        ],
        "deprecated": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "The answer to the previous chat input. Do not provide it if you are starting a new chat."
                  },
                  "sessionId": {
                    "type": "string",
                    "description": "Session ID that you get from the initial chat request to a bot. If not provided, it will create a new session."
                  },
                  "startParams": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "typebot": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/typebotV5"
                                  },
                                  {
                                    "$ref": "#/components/schemas/typebotV6"
                                  }
                                ],
                                "discriminator": {
                                  "propertyName": "version",
                                  "mapping": {
                                    "3": "#/components/schemas/typebotV5",
                                    "4": "#/components/schemas/typebotV5",
                                    "5": "#/components/schemas/typebotV5",
                                    "6": "#/components/schemas/typebotV6"
                                  }
                                }
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "Either a Typebot ID or a Typebot object. If you provide a Typebot object, it will be executed in preview mode. ([How can I find my typebot ID?](https://docs.typebot.io/api-reference#how-to-find-my-typebotid))."
                          },
                          "isPreview": {
                            "type": "boolean",
                            "description": "If set to `true`, it will start a Preview session with the unpublished bot and it won't be saved in the Results tab. You need to be authenticated with a bearer token for this to work."
                          },
                          "resultId": {
                            "type": "string",
                            "description": "Provide it if you'd like to overwrite an existing result."
                          },
                          "prefilledVariables": {
                            "type": "object",
                            "additionalProperties": {},
                            "description": "[More info about prefilled variables.](https://docs.typebot.io/editor/variables#prefilled-variables)"
                          },
                          "isStreamEnabled": {
                            "type": "boolean",
                            "description": "Set this to `true` if you intend to stream OpenAI completions on a client."
                          },
                          "isOnlyRegistering": {
                            "type": "boolean",
                            "description": "If set to `true`, it will only register the session and not start the chat. This is used for other chat platform integration as it can require a session to be registered before sending the first message."
                          }
                        },
                        "required": [
                          "typebot"
                        ]
                      },
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "startGroupId": {
                                "type": "string",
                                "description": "Start chat from a specific group."
                              },
                              "startEventId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "startGroupId"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "startEventId": {
                                "type": "string",
                                "description": "Start chat from a specific event."
                              },
                              "startGroupId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "startEventId"
                            ]
                          },
                          {
                            "type": "object"
                          }
                        ]
                      }
                    ]
                  },
                  "clientLogs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "status",
                        "description"
                      ]
                    },
                    "description": "Logs while executing client side actions"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messages": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/textMessage"
                              },
                              {
                                "$ref": "#/components/schemas/imageMessage"
                              },
                              {
                                "$ref": "#/components/schemas/videoMessage"
                              },
                              {
                                "$ref": "#/components/schemas/audioMessage"
                              },
                              {
                                "$ref": "#/components/schemas/embedMessage"
                              },
                              {
                                "$ref": "#/components/schemas/customEmbedMessage"
                              }
                            ],
                            "discriminator": {
                              "propertyName": "type",
                              "mapping": {
                                "text": "#/components/schemas/textMessage",
                                "image": "#/components/schemas/imageMessage",
                                "video": "#/components/schemas/videoMessage",
                                "audio": "#/components/schemas/audioMessage",
                                "embed": "#/components/schemas/embedMessage",
                                "custom-embed": "#/components/schemas/customEmbedMessage"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "input": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/textInput"
                                },
                                {
                                  "$ref": "#/components/schemas/buttonsInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/email"
                                },
                                {
                                  "$ref": "#/components/schemas/numberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/url"
                                },
                                {
                                  "$ref": "#/components/schemas/phoneNumberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/dateInput"
                                },
                                {
                                  "$ref": "#/components/schemas/paymentInput"
                                },
                                {
                                  "$ref": "#/components/schemas/rating"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoiceV5"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "text input": "#/components/schemas/textInput",
                                  "choice input": "#/components/schemas/buttonsInputV5",
                                  "email input": "#/components/schemas/email",
                                  "number input": "#/components/schemas/numberInput",
                                  "url input": "#/components/schemas/url",
                                  "phone number input": "#/components/schemas/phoneNumberInput",
                                  "date input": "#/components/schemas/dateInput",
                                  "payment input": "#/components/schemas/paymentInput",
                                  "rating input": "#/components/schemas/rating",
                                  "file input": "#/components/schemas/fileInputV5",
                                  "picture choice input": "#/components/schemas/pictureChoiceV5"
                                }
                              }
                            },
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/textInput"
                                },
                                {
                                  "$ref": "#/components/schemas/buttonsInput"
                                },
                                {
                                  "$ref": "#/components/schemas/email"
                                },
                                {
                                  "$ref": "#/components/schemas/numberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/url"
                                },
                                {
                                  "$ref": "#/components/schemas/phoneNumberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/dateInput"
                                },
                                {
                                  "$ref": "#/components/schemas/paymentInput"
                                },
                                {
                                  "$ref": "#/components/schemas/rating"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInput"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoice"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "text input": "#/components/schemas/textInput",
                                  "choice input": "#/components/schemas/buttonsInput",
                                  "email input": "#/components/schemas/email",
                                  "number input": "#/components/schemas/numberInput",
                                  "url input": "#/components/schemas/url",
                                  "phone number input": "#/components/schemas/phoneNumberInput",
                                  "date input": "#/components/schemas/dateInput",
                                  "payment input": "#/components/schemas/paymentInput",
                                  "rating input": "#/components/schemas/rating",
                                  "file input": "#/components/schemas/fileInput",
                                  "picture choice input": "#/components/schemas/pictureChoice"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "prefilledValue": {
                              "type": "string"
                            },
                            "runtimeOptions": {
                              "type": "object",
                              "properties": {
                                "paymentIntentSecret": {
                                  "type": "string"
                                },
                                "amountLabel": {
                                  "type": "string"
                                },
                                "publicKey": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "paymentIntentSecret",
                                "amountLabel",
                                "publicKey"
                              ]
                            }
                          }
                        }
                      ]
                    },
                    "clientSideActions": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/csaScriptToExecute"
                          },
                          {
                            "$ref": "#/components/schemas/csaRedirect"
                          },
                          {
                            "$ref": "#/components/schemas/csaChatwoot"
                          },
                          {
                            "$ref": "#/components/schemas/csaGa"
                          },
                          {
                            "$ref": "#/components/schemas/csaWait"
                          },
                          {
                            "$ref": "#/components/schemas/csaSetVariable"
                          },
                          {
                            "$ref": "#/components/schemas/csaStreamOpenAiChatCompletion"
                          },
                          {
                            "$ref": "#/components/schemas/csaExecWebhook"
                          },
                          {
                            "$ref": "#/components/schemas/csaInjectStartProps"
                          },
                          {
                            "$ref": "#/components/schemas/csaPixel"
                          },
                          {
                            "$ref": "#/components/schemas/csaStream"
                          },
                          {
                            "$ref": "#/components/schemas/csaCodeToExecute"
                          }
                        ],
                        "discriminator": {
                          "propertyName": "type",
                          "mapping": {
                            "scriptToExecute": "#/components/schemas/csaScriptToExecute",
                            "redirect": "#/components/schemas/csaRedirect",
                            "chatwoot": "#/components/schemas/csaChatwoot",
                            "googleAnalytics": "#/components/schemas/csaGa",
                            "wait": "#/components/schemas/csaWait",
                            "setVariable": "#/components/schemas/csaSetVariable",
                            "streamOpenAiChatCompletion": "#/components/schemas/csaStreamOpenAiChatCompletion",
                            "webhookToExecute": "#/components/schemas/csaExecWebhook",
                            "startPropsToInject": "#/components/schemas/csaInjectStartProps",
                            "pixel": "#/components/schemas/csaPixel",
                            "stream": "#/components/schemas/csaStream",
                            "codeToExecute": "#/components/schemas/csaCodeToExecute"
                          }
                        }
                      }
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "typebot": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "theme": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/theme"
                            },
                            {
                              "$ref": "#/components/schemas/theme"
                            }
                          ]
                        },
                        "settings": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/settings"
                            },
                            {
                              "$ref": "#/components/schemas/settings"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "theme",
                        "settings"
                      ]
                    },
                    "resultId": {
                      "type": "string"
                    },
                    "dynamicTheme": {
                      "type": "object",
                      "properties": {
                        "hostAvatarUrl": {
                          "type": "string"
                        },
                        "guestAvatarUrl": {
                          "type": "string"
                        }
                      }
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "details": {}
                        },
                        "required": [
                          "status",
                          "description"
                        ]
                      }
                    },
                    "lastMessageNewFormat": {
                      "type": "string",
                      "description": "The sent message is validated and formatted on the backend. This is set only if the message differs from the formatted version."
                    }
                  },
                  "required": [
                    "messages"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v2/sendMessage": {
      "post": {
        "operationId": "sendMessageV2",
        "summary": "Send a message",
        "description": "To initiate a chat, do not provide a `sessionId` nor a `message`.\n\nContinue the conversation by providing the `sessionId` and the `message` that should answer the previous question.\n\nSet the `isPreview` option to `true` to chat with the non-published version of the typebot.",
        "tags": [
          "Deprecated"
        ],
        "deprecated": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "The answer to the previous chat input. Do not provide it if you are starting a new chat."
                  },
                  "sessionId": {
                    "type": "string",
                    "description": "Session ID that you get from the initial chat request to a bot. If not provided, it will create a new session."
                  },
                  "startParams": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "typebot": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/typebotV5"
                                  },
                                  {
                                    "$ref": "#/components/schemas/typebotV6"
                                  }
                                ],
                                "discriminator": {
                                  "propertyName": "version",
                                  "mapping": {
                                    "3": "#/components/schemas/typebotV5",
                                    "4": "#/components/schemas/typebotV5",
                                    "5": "#/components/schemas/typebotV5",
                                    "6": "#/components/schemas/typebotV6"
                                  }
                                }
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "Either a Typebot ID or a Typebot object. If you provide a Typebot object, it will be executed in preview mode. ([How can I find my typebot ID?](https://docs.typebot.io/api-reference#how-to-find-my-typebotid))."
                          },
                          "isPreview": {
                            "type": "boolean",
                            "description": "If set to `true`, it will start a Preview session with the unpublished bot and it won't be saved in the Results tab. You need to be authenticated with a bearer token for this to work."
                          },
                          "resultId": {
                            "type": "string",
                            "description": "Provide it if you'd like to overwrite an existing result."
                          },
                          "prefilledVariables": {
                            "type": "object",
                            "additionalProperties": {},
                            "description": "[More info about prefilled variables.](https://docs.typebot.io/editor/variables#prefilled-variables)"
                          },
                          "isStreamEnabled": {
                            "type": "boolean",
                            "description": "Set this to `true` if you intend to stream OpenAI completions on a client."
                          },
                          "isOnlyRegistering": {
                            "type": "boolean",
                            "description": "If set to `true`, it will only register the session and not start the chat. This is used for other chat platform integration as it can require a session to be registered before sending the first message."
                          }
                        },
                        "required": [
                          "typebot"
                        ]
                      },
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "startGroupId": {
                                "type": "string",
                                "description": "Start chat from a specific group."
                              },
                              "startEventId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "startGroupId"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "startEventId": {
                                "type": "string",
                                "description": "Start chat from a specific event."
                              },
                              "startGroupId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "startEventId"
                            ]
                          },
                          {
                            "type": "object"
                          }
                        ]
                      }
                    ]
                  },
                  "clientLogs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "status",
                        "description"
                      ]
                    },
                    "description": "Logs while executing client side actions"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messages": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/textMessage"
                              },
                              {
                                "$ref": "#/components/schemas/imageMessage"
                              },
                              {
                                "$ref": "#/components/schemas/videoMessage"
                              },
                              {
                                "$ref": "#/components/schemas/audioMessage"
                              },
                              {
                                "$ref": "#/components/schemas/embedMessage"
                              },
                              {
                                "$ref": "#/components/schemas/customEmbedMessage"
                              }
                            ],
                            "discriminator": {
                              "propertyName": "type",
                              "mapping": {
                                "text": "#/components/schemas/textMessage",
                                "image": "#/components/schemas/imageMessage",
                                "video": "#/components/schemas/videoMessage",
                                "audio": "#/components/schemas/audioMessage",
                                "embed": "#/components/schemas/embedMessage",
                                "custom-embed": "#/components/schemas/customEmbedMessage"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "input": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/textInput"
                                },
                                {
                                  "$ref": "#/components/schemas/buttonsInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/email"
                                },
                                {
                                  "$ref": "#/components/schemas/numberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/url"
                                },
                                {
                                  "$ref": "#/components/schemas/phoneNumberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/dateInput"
                                },
                                {
                                  "$ref": "#/components/schemas/paymentInput"
                                },
                                {
                                  "$ref": "#/components/schemas/rating"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoiceV5"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "text input": "#/components/schemas/textInput",
                                  "choice input": "#/components/schemas/buttonsInputV5",
                                  "email input": "#/components/schemas/email",
                                  "number input": "#/components/schemas/numberInput",
                                  "url input": "#/components/schemas/url",
                                  "phone number input": "#/components/schemas/phoneNumberInput",
                                  "date input": "#/components/schemas/dateInput",
                                  "payment input": "#/components/schemas/paymentInput",
                                  "rating input": "#/components/schemas/rating",
                                  "file input": "#/components/schemas/fileInputV5",
                                  "picture choice input": "#/components/schemas/pictureChoiceV5"
                                }
                              }
                            },
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/textInput"
                                },
                                {
                                  "$ref": "#/components/schemas/buttonsInput"
                                },
                                {
                                  "$ref": "#/components/schemas/email"
                                },
                                {
                                  "$ref": "#/components/schemas/numberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/url"
                                },
                                {
                                  "$ref": "#/components/schemas/phoneNumberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/dateInput"
                                },
                                {
                                  "$ref": "#/components/schemas/paymentInput"
                                },
                                {
                                  "$ref": "#/components/schemas/rating"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInput"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoice"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "text input": "#/components/schemas/textInput",
                                  "choice input": "#/components/schemas/buttonsInput",
                                  "email input": "#/components/schemas/email",
                                  "number input": "#/components/schemas/numberInput",
                                  "url input": "#/components/schemas/url",
                                  "phone number input": "#/components/schemas/phoneNumberInput",
                                  "date input": "#/components/schemas/dateInput",
                                  "payment input": "#/components/schemas/paymentInput",
                                  "rating input": "#/components/schemas/rating",
                                  "file input": "#/components/schemas/fileInput",
                                  "picture choice input": "#/components/schemas/pictureChoice"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "prefilledValue": {
                              "type": "string"
                            },
                            "runtimeOptions": {
                              "type": "object",
                              "properties": {
                                "paymentIntentSecret": {
                                  "type": "string"
                                },
                                "amountLabel": {
                                  "type": "string"
                                },
                                "publicKey": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "paymentIntentSecret",
                                "amountLabel",
                                "publicKey"
                              ]
                            }
                          }
                        }
                      ]
                    },
                    "clientSideActions": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/csaScriptToExecute"
                          },
                          {
                            "$ref": "#/components/schemas/csaRedirect"
                          },
                          {
                            "$ref": "#/components/schemas/csaChatwoot"
                          },
                          {
                            "$ref": "#/components/schemas/csaGa"
                          },
                          {
                            "$ref": "#/components/schemas/csaWait"
                          },
                          {
                            "$ref": "#/components/schemas/csaSetVariable"
                          },
                          {
                            "$ref": "#/components/schemas/csaStreamOpenAiChatCompletion"
                          },
                          {
                            "$ref": "#/components/schemas/csaExecWebhook"
                          },
                          {
                            "$ref": "#/components/schemas/csaInjectStartProps"
                          },
                          {
                            "$ref": "#/components/schemas/csaPixel"
                          },
                          {
                            "$ref": "#/components/schemas/csaStream"
                          },
                          {
                            "$ref": "#/components/schemas/csaCodeToExecute"
                          }
                        ],
                        "discriminator": {
                          "propertyName": "type",
                          "mapping": {
                            "scriptToExecute": "#/components/schemas/csaScriptToExecute",
                            "redirect": "#/components/schemas/csaRedirect",
                            "chatwoot": "#/components/schemas/csaChatwoot",
                            "googleAnalytics": "#/components/schemas/csaGa",
                            "wait": "#/components/schemas/csaWait",
                            "setVariable": "#/components/schemas/csaSetVariable",
                            "streamOpenAiChatCompletion": "#/components/schemas/csaStreamOpenAiChatCompletion",
                            "webhookToExecute": "#/components/schemas/csaExecWebhook",
                            "startPropsToInject": "#/components/schemas/csaInjectStartProps",
                            "pixel": "#/components/schemas/csaPixel",
                            "stream": "#/components/schemas/csaStream",
                            "codeToExecute": "#/components/schemas/csaCodeToExecute"
                          }
                        }
                      }
                    },
                    "sessionId": {
                      "type": "string"
                    },
                    "typebot": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "theme": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/theme"
                            },
                            {
                              "$ref": "#/components/schemas/theme"
                            }
                          ]
                        },
                        "settings": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/settings"
                            },
                            {
                              "$ref": "#/components/schemas/settings"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "theme",
                        "settings"
                      ]
                    },
                    "resultId": {
                      "type": "string"
                    },
                    "dynamicTheme": {
                      "type": "object",
                      "properties": {
                        "hostAvatarUrl": {
                          "type": "string"
                        },
                        "guestAvatarUrl": {
                          "type": "string"
                        }
                      }
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "details": {}
                        },
                        "required": [
                          "status",
                          "description"
                        ]
                      }
                    },
                    "lastMessageNewFormat": {
                      "type": "string",
                      "description": "The sent message is validated and formatted on the backend. This is set only if the message differs from the formatted version."
                    }
                  },
                  "required": [
                    "messages"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/typebots/{publicId}/startChat": {
      "post": {
        "operationId": "startChat",
        "summary": "Start chat",
        "parameters": [
          {
            "in": "path",
            "name": "publicId",
            "description": "[Where to find my bot's public ID?](../how-to#how-to-find-my-publicid)",
            "schema": {
              "type": "string",
              "description": "[Where to find my bot's public ID?](../how-to#how-to-find-my-publicid)"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Only provide it if your flow starts with an input block and you'd like to directly provide an answer to it."
                  },
                  "isStreamEnabled": {
                    "type": "boolean",
                    "default": false,
                    "description": "If enabled, you will be required to stream OpenAI completions on a client and send the generated response back to the API."
                  },
                  "resultId": {
                    "type": "string",
                    "description": "Provide it if you'd like to overwrite an existing result."
                  },
                  "isOnlyRegistering": {
                    "type": "boolean",
                    "default": false,
                    "description": "If set to `true`, it will only register the session and not start the bot. This is used for 3rd party chat platforms as it can require a session to be registered before sending the first message."
                  },
                  "prefilledVariables": {
                    "type": "object",
                    "additionalProperties": {},
                    "description": "[More info about prefilled variables.](../../editor/variables#prefilled-variables)",
                    "example": {
                      "First name": "John",
                      "Email": "john@gmail.com"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessionId": {
                      "type": "string",
                      "description": "To save and use for /continueChat requests."
                    },
                    "resultId": {
                      "type": "string"
                    },
                    "typebot": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "theme": {
                          "$ref": "#/components/schemas/theme"
                        },
                        "settings": {
                          "$ref": "#/components/schemas/settings"
                        }
                      },
                      "required": [
                        "id",
                        "theme",
                        "settings"
                      ]
                    },
                    "lastMessageNewFormat": {
                      "type": "string",
                      "description": "The sent message is validated and formatted on the backend. For example, if for a date input you replied something like `tomorrow`, the backend will convert it to a date string. This field returns the formatted message."
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/textMessage"
                              },
                              {
                                "$ref": "#/components/schemas/imageMessage"
                              },
                              {
                                "$ref": "#/components/schemas/videoMessage"
                              },
                              {
                                "$ref": "#/components/schemas/audioMessage"
                              },
                              {
                                "$ref": "#/components/schemas/embedMessage"
                              },
                              {
                                "$ref": "#/components/schemas/customEmbedMessage"
                              }
                            ],
                            "discriminator": {
                              "propertyName": "type",
                              "mapping": {
                                "text": "#/components/schemas/textMessage",
                                "image": "#/components/schemas/imageMessage",
                                "video": "#/components/schemas/videoMessage",
                                "audio": "#/components/schemas/audioMessage",
                                "embed": "#/components/schemas/embedMessage",
                                "custom-embed": "#/components/schemas/customEmbedMessage"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "input": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/textInput"
                                },
                                {
                                  "$ref": "#/components/schemas/buttonsInput"
                                },
                                {
                                  "$ref": "#/components/schemas/email"
                                },
                                {
                                  "$ref": "#/components/schemas/numberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/url"
                                },
                                {
                                  "$ref": "#/components/schemas/phoneNumberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/dateInput"
                                },
                                {
                                  "$ref": "#/components/schemas/paymentInput"
                                },
                                {
                                  "$ref": "#/components/schemas/rating"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInput"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoice"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "text input": "#/components/schemas/textInput",
                                  "choice input": "#/components/schemas/buttonsInput",
                                  "email input": "#/components/schemas/email",
                                  "number input": "#/components/schemas/numberInput",
                                  "url input": "#/components/schemas/url",
                                  "phone number input": "#/components/schemas/phoneNumberInput",
                                  "date input": "#/components/schemas/dateInput",
                                  "payment input": "#/components/schemas/paymentInput",
                                  "rating input": "#/components/schemas/rating",
                                  "file input": "#/components/schemas/fileInput",
                                  "picture choice input": "#/components/schemas/pictureChoice"
                                }
                              }
                            },
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/buttonsInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoiceV5"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "choice input": "#/components/schemas/buttonsInputV5",
                                  "file input": "#/components/schemas/fileInputV5",
                                  "picture choice input": "#/components/schemas/pictureChoiceV5"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "prefilledValue": {
                              "type": "string"
                            },
                            "runtimeOptions": {
                              "type": "object",
                              "properties": {
                                "paymentIntentSecret": {
                                  "type": "string"
                                },
                                "amountLabel": {
                                  "type": "string"
                                },
                                "publicKey": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "paymentIntentSecret",
                                "amountLabel",
                                "publicKey"
                              ]
                            }
                          }
                        }
                      ]
                    },
                    "clientSideActions": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/csaScriptToExecute"
                          },
                          {
                            "$ref": "#/components/schemas/csaRedirect"
                          },
                          {
                            "$ref": "#/components/schemas/csaChatwoot"
                          },
                          {
                            "$ref": "#/components/schemas/csaGa"
                          },
                          {
                            "$ref": "#/components/schemas/csaWait"
                          },
                          {
                            "$ref": "#/components/schemas/csaSetVariable"
                          },
                          {
                            "$ref": "#/components/schemas/csaStreamOpenAiChatCompletion"
                          },
                          {
                            "$ref": "#/components/schemas/csaExecWebhook"
                          },
                          {
                            "$ref": "#/components/schemas/csaInjectStartProps"
                          },
                          {
                            "$ref": "#/components/schemas/csaPixel"
                          },
                          {
                            "$ref": "#/components/schemas/csaStream"
                          },
                          {
                            "$ref": "#/components/schemas/csaCodeToExecute"
                          }
                        ],
                        "discriminator": {
                          "propertyName": "type",
                          "mapping": {
                            "scriptToExecute": "#/components/schemas/csaScriptToExecute",
                            "redirect": "#/components/schemas/csaRedirect",
                            "chatwoot": "#/components/schemas/csaChatwoot",
                            "googleAnalytics": "#/components/schemas/csaGa",
                            "wait": "#/components/schemas/csaWait",
                            "setVariable": "#/components/schemas/csaSetVariable",
                            "streamOpenAiChatCompletion": "#/components/schemas/csaStreamOpenAiChatCompletion",
                            "webhookToExecute": "#/components/schemas/csaExecWebhook",
                            "startPropsToInject": "#/components/schemas/csaInjectStartProps",
                            "pixel": "#/components/schemas/csaPixel",
                            "stream": "#/components/schemas/csaStream",
                            "codeToExecute": "#/components/schemas/csaCodeToExecute"
                          }
                        }
                      },
                      "description": "Actions to execute on the client side"
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "details": {}
                        },
                        "required": [
                          "status",
                          "description"
                        ]
                      },
                      "description": "Logs that were saved during the last execution"
                    },
                    "dynamicTheme": {
                      "type": "object",
                      "properties": {
                        "hostAvatarUrl": {
                          "type": "string"
                        },
                        "guestAvatarUrl": {
                          "type": "string"
                        }
                      },
                      "description": "If the typebot contains dynamic avatars, dynamicTheme returns the new avatar URLs whenever their variables are updated."
                    },
                    "progress": {
                      "type": "number",
                      "description": "If progress bar is enabled, this field will return a number between 0 and 100 indicating the current progress based on the longest remaining path of the flow."
                    }
                  },
                  "required": [
                    "sessionId",
                    "typebot",
                    "messages"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/continueChat": {
      "post": {
        "operationId": "continueChat",
        "summary": "Continue chat",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "description": "The session ID you got from the [startChat](./start-chat) response.",
            "schema": {
              "type": "string",
              "description": "The session ID you got from the [startChat](./start-chat) response."
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lastMessageNewFormat": {
                      "type": "string",
                      "description": "The sent message is validated and formatted on the backend. For example, if for a date input you replied something like `tomorrow`, the backend will convert it to a date string. This field returns the formatted message."
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/textMessage"
                              },
                              {
                                "$ref": "#/components/schemas/imageMessage"
                              },
                              {
                                "$ref": "#/components/schemas/videoMessage"
                              },
                              {
                                "$ref": "#/components/schemas/audioMessage"
                              },
                              {
                                "$ref": "#/components/schemas/embedMessage"
                              },
                              {
                                "$ref": "#/components/schemas/customEmbedMessage"
                              }
                            ],
                            "discriminator": {
                              "propertyName": "type",
                              "mapping": {
                                "text": "#/components/schemas/textMessage",
                                "image": "#/components/schemas/imageMessage",
                                "video": "#/components/schemas/videoMessage",
                                "audio": "#/components/schemas/audioMessage",
                                "embed": "#/components/schemas/embedMessage",
                                "custom-embed": "#/components/schemas/customEmbedMessage"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "input": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/textInput"
                                },
                                {
                                  "$ref": "#/components/schemas/buttonsInput"
                                },
                                {
                                  "$ref": "#/components/schemas/email"
                                },
                                {
                                  "$ref": "#/components/schemas/numberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/url"
                                },
                                {
                                  "$ref": "#/components/schemas/phoneNumberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/dateInput"
                                },
                                {
                                  "$ref": "#/components/schemas/paymentInput"
                                },
                                {
                                  "$ref": "#/components/schemas/rating"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInput"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoice"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "text input": "#/components/schemas/textInput",
                                  "choice input": "#/components/schemas/buttonsInput",
                                  "email input": "#/components/schemas/email",
                                  "number input": "#/components/schemas/numberInput",
                                  "url input": "#/components/schemas/url",
                                  "phone number input": "#/components/schemas/phoneNumberInput",
                                  "date input": "#/components/schemas/dateInput",
                                  "payment input": "#/components/schemas/paymentInput",
                                  "rating input": "#/components/schemas/rating",
                                  "file input": "#/components/schemas/fileInput",
                                  "picture choice input": "#/components/schemas/pictureChoice"
                                }
                              }
                            },
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/buttonsInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoiceV5"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "choice input": "#/components/schemas/buttonsInputV5",
                                  "file input": "#/components/schemas/fileInputV5",
                                  "picture choice input": "#/components/schemas/pictureChoiceV5"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "prefilledValue": {
                              "type": "string"
                            },
                            "runtimeOptions": {
                              "type": "object",
                              "properties": {
                                "paymentIntentSecret": {
                                  "type": "string"
                                },
                                "amountLabel": {
                                  "type": "string"
                                },
                                "publicKey": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "paymentIntentSecret",
                                "amountLabel",
                                "publicKey"
                              ]
                            }
                          }
                        }
                      ]
                    },
                    "clientSideActions": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/csaScriptToExecute"
                          },
                          {
                            "$ref": "#/components/schemas/csaRedirect"
                          },
                          {
                            "$ref": "#/components/schemas/csaChatwoot"
                          },
                          {
                            "$ref": "#/components/schemas/csaGa"
                          },
                          {
                            "$ref": "#/components/schemas/csaWait"
                          },
                          {
                            "$ref": "#/components/schemas/csaSetVariable"
                          },
                          {
                            "$ref": "#/components/schemas/csaStreamOpenAiChatCompletion"
                          },
                          {
                            "$ref": "#/components/schemas/csaExecWebhook"
                          },
                          {
                            "$ref": "#/components/schemas/csaInjectStartProps"
                          },
                          {
                            "$ref": "#/components/schemas/csaPixel"
                          },
                          {
                            "$ref": "#/components/schemas/csaStream"
                          },
                          {
                            "$ref": "#/components/schemas/csaCodeToExecute"
                          }
                        ],
                        "discriminator": {
                          "propertyName": "type",
                          "mapping": {
                            "scriptToExecute": "#/components/schemas/csaScriptToExecute",
                            "redirect": "#/components/schemas/csaRedirect",
                            "chatwoot": "#/components/schemas/csaChatwoot",
                            "googleAnalytics": "#/components/schemas/csaGa",
                            "wait": "#/components/schemas/csaWait",
                            "setVariable": "#/components/schemas/csaSetVariable",
                            "streamOpenAiChatCompletion": "#/components/schemas/csaStreamOpenAiChatCompletion",
                            "webhookToExecute": "#/components/schemas/csaExecWebhook",
                            "startPropsToInject": "#/components/schemas/csaInjectStartProps",
                            "pixel": "#/components/schemas/csaPixel",
                            "stream": "#/components/schemas/csaStream",
                            "codeToExecute": "#/components/schemas/csaCodeToExecute"
                          }
                        }
                      },
                      "description": "Actions to execute on the client side"
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "details": {}
                        },
                        "required": [
                          "status",
                          "description"
                        ]
                      },
                      "description": "Logs that were saved during the last execution"
                    },
                    "dynamicTheme": {
                      "type": "object",
                      "properties": {
                        "hostAvatarUrl": {
                          "type": "string"
                        },
                        "guestAvatarUrl": {
                          "type": "string"
                        }
                      },
                      "description": "If the typebot contains dynamic avatars, dynamicTheme returns the new avatar URLs whenever their variables are updated."
                    },
                    "progress": {
                      "type": "number",
                      "description": "If progress bar is enabled, this field will return a number between 0 and 100 indicating the current progress based on the longest remaining path of the flow."
                    }
                  },
                  "required": [
                    "messages"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/typebots/{typebotId}/preview/startChat": {
      "post": {
        "operationId": "startChatPreview",
        "summary": "Start preview chat",
        "description": "Use this endpoint to test your bot. The answers will not be saved. And some blocks like \"Send email\" will be skipped.",
        "parameters": [
          {
            "in": "path",
            "name": "typebotId",
            "description": "[Where to find my bot's ID?](../how-to#how-to-find-my-typebotid)",
            "schema": {
              "type": "string",
              "description": "[Where to find my bot's ID?](../how-to#how-to-find-my-typebotid)"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isStreamEnabled": {
                    "type": "boolean",
                    "default": false
                  },
                  "message": {
                    "type": "string"
                  },
                  "isOnlyRegistering": {
                    "type": "boolean",
                    "description": "If set to `true`, it will only register the session and not start the bot. This is used for 3rd party chat platforms as it can require a session to be registered before sending the first message.",
                    "default": false
                  },
                  "typebot": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/typebotV5"
                      },
                      {
                        "$ref": "#/components/schemas/typebotV6"
                      }
                    ],
                    "discriminator": {
                      "propertyName": "version",
                      "mapping": {
                        "3": "#/components/schemas/typebotV5",
                        "4": "#/components/schemas/typebotV5",
                        "5": "#/components/schemas/typebotV5",
                        "6": "#/components/schemas/typebotV6"
                      }
                    },
                    "description": "If set, it will override the typebot that is used to start the chat."
                  },
                  "startFrom": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "group"
                            ]
                          },
                          "groupId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "groupId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "event"
                            ]
                          },
                          "eventId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "eventId"
                        ]
                      }
                    ]
                  },
                  "prefilledVariables": {
                    "type": "object",
                    "additionalProperties": {},
                    "description": "[More info about prefilled variables.](../../editor/variables#prefilled-variables)",
                    "example": {
                      "First name": "John",
                      "Email": "john@gmail.com"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessionId": {
                      "type": "string",
                      "description": "To save and use for /continueChat requests."
                    },
                    "typebot": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "theme": {
                          "$ref": "#/components/schemas/theme"
                        },
                        "settings": {
                          "$ref": "#/components/schemas/settings"
                        }
                      },
                      "required": [
                        "id",
                        "theme",
                        "settings"
                      ]
                    },
                    "lastMessageNewFormat": {
                      "type": "string",
                      "description": "The sent message is validated and formatted on the backend. For example, if for a date input you replied something like `tomorrow`, the backend will convert it to a date string. This field returns the formatted message."
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/textMessage"
                              },
                              {
                                "$ref": "#/components/schemas/imageMessage"
                              },
                              {
                                "$ref": "#/components/schemas/videoMessage"
                              },
                              {
                                "$ref": "#/components/schemas/audioMessage"
                              },
                              {
                                "$ref": "#/components/schemas/embedMessage"
                              },
                              {
                                "$ref": "#/components/schemas/customEmbedMessage"
                              }
                            ],
                            "discriminator": {
                              "propertyName": "type",
                              "mapping": {
                                "text": "#/components/schemas/textMessage",
                                "image": "#/components/schemas/imageMessage",
                                "video": "#/components/schemas/videoMessage",
                                "audio": "#/components/schemas/audioMessage",
                                "embed": "#/components/schemas/embedMessage",
                                "custom-embed": "#/components/schemas/customEmbedMessage"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "input": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/textInput"
                                },
                                {
                                  "$ref": "#/components/schemas/buttonsInput"
                                },
                                {
                                  "$ref": "#/components/schemas/email"
                                },
                                {
                                  "$ref": "#/components/schemas/numberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/url"
                                },
                                {
                                  "$ref": "#/components/schemas/phoneNumberInput"
                                },
                                {
                                  "$ref": "#/components/schemas/dateInput"
                                },
                                {
                                  "$ref": "#/components/schemas/paymentInput"
                                },
                                {
                                  "$ref": "#/components/schemas/rating"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInput"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoice"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "text input": "#/components/schemas/textInput",
                                  "choice input": "#/components/schemas/buttonsInput",
                                  "email input": "#/components/schemas/email",
                                  "number input": "#/components/schemas/numberInput",
                                  "url input": "#/components/schemas/url",
                                  "phone number input": "#/components/schemas/phoneNumberInput",
                                  "date input": "#/components/schemas/dateInput",
                                  "payment input": "#/components/schemas/paymentInput",
                                  "rating input": "#/components/schemas/rating",
                                  "file input": "#/components/schemas/fileInput",
                                  "picture choice input": "#/components/schemas/pictureChoice"
                                }
                              }
                            },
                            {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/buttonsInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/fileInputV5"
                                },
                                {
                                  "$ref": "#/components/schemas/pictureChoiceV5"
                                }
                              ],
                              "discriminator": {
                                "propertyName": "type",
                                "mapping": {
                                  "choice input": "#/components/schemas/buttonsInputV5",
                                  "file input": "#/components/schemas/fileInputV5",
                                  "picture choice input": "#/components/schemas/pictureChoiceV5"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "prefilledValue": {
                              "type": "string"
                            },
                            "runtimeOptions": {
                              "type": "object",
                              "properties": {
                                "paymentIntentSecret": {
                                  "type": "string"
                                },
                                "amountLabel": {
                                  "type": "string"
                                },
                                "publicKey": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "paymentIntentSecret",
                                "amountLabel",
                                "publicKey"
                              ]
                            }
                          }
                        }
                      ]
                    },
                    "clientSideActions": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/csaScriptToExecute"
                          },
                          {
                            "$ref": "#/components/schemas/csaRedirect"
                          },
                          {
                            "$ref": "#/components/schemas/csaChatwoot"
                          },
                          {
                            "$ref": "#/components/schemas/csaGa"
                          },
                          {
                            "$ref": "#/components/schemas/csaWait"
                          },
                          {
                            "$ref": "#/components/schemas/csaSetVariable"
                          },
                          {
                            "$ref": "#/components/schemas/csaStreamOpenAiChatCompletion"
                          },
                          {
                            "$ref": "#/components/schemas/csaExecWebhook"
                          },
                          {
                            "$ref": "#/components/schemas/csaInjectStartProps"
                          },
                          {
                            "$ref": "#/components/schemas/csaPixel"
                          },
                          {
                            "$ref": "#/components/schemas/csaStream"
                          },
                          {
                            "$ref": "#/components/schemas/csaCodeToExecute"
                          }
                        ],
                        "discriminator": {
                          "propertyName": "type",
                          "mapping": {
                            "scriptToExecute": "#/components/schemas/csaScriptToExecute",
                            "redirect": "#/components/schemas/csaRedirect",
                            "chatwoot": "#/components/schemas/csaChatwoot",
                            "googleAnalytics": "#/components/schemas/csaGa",
                            "wait": "#/components/schemas/csaWait",
                            "setVariable": "#/components/schemas/csaSetVariable",
                            "streamOpenAiChatCompletion": "#/components/schemas/csaStreamOpenAiChatCompletion",
                            "webhookToExecute": "#/components/schemas/csaExecWebhook",
                            "startPropsToInject": "#/components/schemas/csaInjectStartProps",
                            "pixel": "#/components/schemas/csaPixel",
                            "stream": "#/components/schemas/csaStream",
                            "codeToExecute": "#/components/schemas/csaCodeToExecute"
                          }
                        }
                      },
                      "description": "Actions to execute on the client side"
                    },
                    "logs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "details": {}
                        },
                        "required": [
                          "status",
                          "description"
                        ]
                      },
                      "description": "Logs that were saved during the last execution"
                    },
                    "dynamicTheme": {
                      "type": "object",
                      "properties": {
                        "hostAvatarUrl": {
                          "type": "string"
                        },
                        "guestAvatarUrl": {
                          "type": "string"
                        }
                      },
                      "description": "If the typebot contains dynamic avatars, dynamicTheme returns the new avatar URLs whenever their variables are updated."
                    },
                    "progress": {
                      "type": "number",
                      "description": "If progress bar is enabled, this field will return a number between 0 and 100 indicating the current progress based on the longest remaining path of the flow."
                    }
                  },
                  "required": [
                    "sessionId",
                    "typebot",
                    "messages"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/typebots/{typebotId}/blocks/{blockId}/storage/upload-url": {
      "get": {
        "operationId": "getUploadUrl",
        "summary": "Get upload URL for a file",
        "description": "Used for the web client to get the bucket upload file.",
        "tags": [
          "Deprecated"
        ],
        "deprecated": true,
        "parameters": [
          {
            "in": "path",
            "name": "typebotId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "blockId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "filePath",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "fileType",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "presignedUrl": {
                      "type": "string"
                    },
                    "hasReachedStorageLimit": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "presignedUrl",
                    "hasReachedStorageLimit"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/generate-upload-url": {
      "post": {
        "operationId": "generateUploadUrl",
        "summary": "Generate upload URL",
        "description": "Used to upload anything from the client to S3 bucket",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filePathProps": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "typebotId": {
                            "type": "string"
                          },
                          "blockId": {
                            "type": "string"
                          },
                          "resultId": {
                            "type": "string"
                          },
                          "fileName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "typebotId",
                          "blockId",
                          "resultId",
                          "fileName"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "sessionId": {
                            "type": "string"
                          },
                          "fileName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "sessionId",
                          "fileName"
                        ]
                      }
                    ]
                  },
                  "fileType": {
                    "type": "string"
                  }
                },
                "required": [
                  "filePathProps"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "presignedUrl": {
                      "type": "string"
                    },
                    "formData": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "fileUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "presignedUrl",
                    "formData",
                    "fileUrl"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/updateTypebot": {
      "post": {
        "operationId": "updateTypebotInSession",
        "summary": "Update typebot in session",
        "description": "Update chat session with latest typebot modifications. This is useful when you want to update the typebot in an ongoing session after making changes to it.",
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "enum": [
                        "success"
                      ]
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspaceId}/whatsapp/{credentialsId}/webhook": {
      "get": {
        "operationId": "whatsAppRouter-subscribeWebhook",
        "summary": "Subscribe webhook",
        "tags": [
          "WhatsApp"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "credentialsId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "hub.challenge",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "hub.verify_token",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "number"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "whatsAppRouter-receiveMessage",
        "summary": "Message webhook",
        "tags": [
          "WhatsApp"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "workspaceId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "credentialsId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entry": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "object",
                                "properties": {
                                  "metadata": {
                                    "type": "object",
                                    "properties": {
                                      "phone_number_id": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "phone_number_id"
                                    ]
                                  },
                                  "contacts": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "profile": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "name"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "profile"
                                      ]
                                    }
                                  },
                                  "messages": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "text"
                                              ]
                                            },
                                            "text": {
                                              "type": "object",
                                              "properties": {
                                                "body": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "body"
                                              ]
                                            },
                                            "timestamp": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "type",
                                            "text",
                                            "timestamp"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "button"
                                              ]
                                            },
                                            "button": {
                                              "type": "object",
                                              "properties": {
                                                "text": {
                                                  "type": "string"
                                                },
                                                "payload": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "text",
                                                "payload"
                                              ]
                                            },
                                            "timestamp": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "type",
                                            "button",
                                            "timestamp"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "interactive"
                                              ]
                                            },
                                            "interactive": {
                                              "type": "object",
                                              "properties": {
                                                "button_reply": {
                                                  "type": "object",
                                                  "properties": {
                                                    "id": {
                                                      "type": "string"
                                                    },
                                                    "title": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "id",
                                                    "title"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "button_reply"
                                              ]
                                            },
                                            "timestamp": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "type",
                                            "interactive",
                                            "timestamp"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "image"
                                              ]
                                            },
                                            "image": {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            "timestamp": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "type",
                                            "image",
                                            "timestamp"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "video"
                                              ]
                                            },
                                            "video": {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            "timestamp": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "type",
                                            "video",
                                            "timestamp"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "audio"
                                              ]
                                            },
                                            "audio": {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            "timestamp": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "type",
                                            "audio",
                                            "timestamp"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "document"
                                              ]
                                            },
                                            "document": {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            },
                                            "timestamp": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "type",
                                            "document",
                                            "timestamp"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "location"
                                              ]
                                            },
                                            "location": {
                                              "type": "object",
                                              "properties": {
                                                "latitude": {
                                                  "type": "number"
                                                },
                                                "longitude": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "latitude",
                                                "longitude"
                                              ]
                                            },
                                            "timestamp": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "type",
                                            "location",
                                            "timestamp"
                                          ]
                                        }
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "metadata"
                                ]
                              }
                            },
                            "required": [
                              "value"
                            ]
                          }
                        }
                      },
                      "required": [
                        "changes"
                      ]
                    }
                  }
                },
                "required": [
                  "entry"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/clientLogs": {
      "post": {
        "operationId": "saveClientLogs",
        "summary": "Save logs",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientLogs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "details": {}
                      },
                      "required": [
                        "status",
                        "description"
                      ]
                    }
                  }
                },
                "required": [
                  "clientLogs"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "typebotV5": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "enum": [
              "3",
              "4",
              "5"
            ]
          },
          "id": {
            "type": "string"
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "graphCoordinates": {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "number"
                    },
                    "y": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ]
                },
                "blocks": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "start"
                            ]
                          },
                          "label": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "label"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "text"
                            ]
                          },
                          "content": {
                            "type": "object",
                            "properties": {
                              "html": {
                                "type": "string"
                              },
                              "richText": {
                                "type": "array",
                                "items": {}
                              },
                              "plainText": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "image"
                            ]
                          },
                          "content": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "clickLink": {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string"
                                  },
                                  "alt": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "video"
                            ]
                          },
                          "content": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "url",
                                  "youtube",
                                  "vimeo",
                                  "tiktok",
                                  "gumlet"
                                ]
                              },
                              "height": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {}
                                ]
                              },
                              "aspectRatio": {
                                "type": "string"
                              },
                              "maxWidth": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "embed"
                            ]
                          },
                          "content": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "height": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {}
                                ]
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "audio"
                            ]
                          },
                          "content": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "isAutoplayEnabled": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "$ref": "#/components/schemas/textInput"
                      },
                      {
                        "$ref": "#/components/schemas/buttonsInputV5"
                      },
                      {
                        "$ref": "#/components/schemas/email"
                      },
                      {
                        "$ref": "#/components/schemas/numberInput"
                      },
                      {
                        "$ref": "#/components/schemas/url"
                      },
                      {
                        "$ref": "#/components/schemas/phoneNumberInput"
                      },
                      {
                        "$ref": "#/components/schemas/dateInput"
                      },
                      {
                        "$ref": "#/components/schemas/paymentInput"
                      },
                      {
                        "$ref": "#/components/schemas/rating"
                      },
                      {
                        "$ref": "#/components/schemas/fileInputV5"
                      },
                      {
                        "$ref": "#/components/schemas/pictureChoiceV5"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Code"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "content": {
                                "type": "string"
                              },
                              "isExecutedOnClient": {
                                "type": "boolean"
                              },
                              "shouldExecuteInParentContext": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Condition"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "blockId": {
                                  "type": "string"
                                },
                                "outgoingEdgeId": {
                                  "type": "string"
                                },
                                "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",
                                              "Does not contain",
                                              "Greater than",
                                              "Less than",
                                              "Is set",
                                              "Is empty",
                                              "Starts with",
                                              "Ends with",
                                              "Matches regex",
                                              "Does not match regex"
                                            ]
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id"
                                        ]
                                      }
                                    }
                                  }
                                }
                              },
                              "required": [
                                "id"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "items"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Redirect"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string"
                              },
                              "isNewTab": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Set variable"
                            ]
                          },
                          "options": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "variableId": {
                                    "type": "string"
                                  },
                                  "isExecutedOnClient": {
                                    "type": "boolean"
                                  },
                                  "expressionToEvaluate": {
                                    "type": "string"
                                  },
                                  "isCode": {
                                    "type": "boolean"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "variableId": {
                                    "type": "string"
                                  },
                                  "isExecutedOnClient": {
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "Now",
                                      "Yesterday",
                                      "Tomorrow"
                                    ]
                                  },
                                  "timeZone": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "variableId": {
                                    "type": "string"
                                  },
                                  "isExecutedOnClient": {
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "Today",
                                      "Moment of the day",
                                      "Empty",
                                      "Environment name",
                                      "User ID",
                                      "Result ID",
                                      "Random ID",
                                      "Phone number",
                                      "Contact name"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "variableId": {
                                    "type": "string"
                                  },
                                  "isExecutedOnClient": {
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "Custom"
                                    ]
                                  },
                                  "expressionToEvaluate": {
                                    "type": "string"
                                  },
                                  "isCode": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "variableId": {
                                    "type": "string"
                                  },
                                  "isExecutedOnClient": {
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "Map item with same index"
                                    ]
                                  },
                                  "mapListItemParams": {
                                    "type": "object",
                                    "properties": {
                                      "baseItemVariableId": {
                                        "type": "string"
                                      },
                                      "baseListVariableId": {
                                        "type": "string"
                                      },
                                      "targetListVariableId": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "variableId": {
                                    "type": "string"
                                  },
                                  "isExecutedOnClient": {
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "Append value(s)"
                                    ]
                                  },
                                  "item": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Typebot link"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "typebotId": {
                                "type": "string"
                              },
                              "groupId": {
                                "type": "string"
                              },
                              "mergeResults": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Wait"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "secondsToWaitFor": {
                                "type": "string"
                              },
                              "shouldPause": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Jump"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "groupId": {
                                "type": "string"
                              },
                              "blockId": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "AB test"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "maxItems": 2,
                            "minItems": 2,
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "blockId": {
                                      "type": "string"
                                    },
                                    "outgoingEdgeId": {
                                      "type": "string"
                                    },
                                    "path": {
                                      "type": "string",
                                      "enum": [
                                        "a"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "path"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "blockId": {
                                      "type": "string"
                                    },
                                    "outgoingEdgeId": {
                                      "type": "string"
                                    },
                                    "path": {
                                      "type": "string",
                                      "enum": [
                                        "b"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "path"
                                  ]
                                }
                              ]
                            }
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "aPercent": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "items"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Chatwoot"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "task": {
                                "type": "string",
                                "enum": [
                                  "Show widget",
                                  "Close widget"
                                ]
                              },
                              "baseUrl": {
                                "type": "string"
                              },
                              "websiteToken": {
                                "type": "string"
                              },
                              "user": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "email": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "avatarUrl": {
                                    "type": "string"
                                  },
                                  "phoneNumber": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Google Analytics"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "trackingId": {
                                "type": "string"
                              },
                              "category": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {}
                                ]
                              },
                              "sendTo": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Google Sheets"
                            ]
                          },
                          "options": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "credentialsId": {
                                    "type": "string"
                                  },
                                  "sheetId": {
                                    "type": "string"
                                  },
                                  "spreadsheetId": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "Get data from sheet"
                                    ]
                                  },
                                  "referenceCell": {
                                    "type": "object",
                                    "properties": {
                                      "column": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      },
                                      "id": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id"
                                    ]
                                  },
                                  "filter": {
                                    "type": "object",
                                    "properties": {
                                      "comparisons": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "column": {
                                              "type": "string"
                                            },
                                            "comparisonOperator": {
                                              "type": "string",
                                              "enum": [
                                                "Equal to",
                                                "Not equal",
                                                "Contains",
                                                "Does not contain",
                                                "Greater than",
                                                "Less than",
                                                "Is set",
                                                "Is empty",
                                                "Starts with",
                                                "Ends with",
                                                "Matches regex",
                                                "Does not match regex"
                                              ]
                                            },
                                            "value": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id"
                                          ]
                                        }
                                      },
                                      "logicalOperator": {
                                        "type": "string",
                                        "enum": [
                                          "OR",
                                          "AND"
                                        ]
                                      }
                                    }
                                  },
                                  "cellsToExtract": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "column": {
                                          "type": "string"
                                        },
                                        "id": {
                                          "type": "string"
                                        },
                                        "variableId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "totalRowsToExtract": {
                                    "type": "string",
                                    "enum": [
                                      "All",
                                      "First",
                                      "Last",
                                      "Random"
                                    ]
                                  }
                                },
                                "required": [
                                  "action"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "credentialsId": {
                                    "type": "string"
                                  },
                                  "sheetId": {
                                    "type": "string"
                                  },
                                  "spreadsheetId": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "Insert a row"
                                    ]
                                  },
                                  "cellsToInsert": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "column": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        },
                                        "id": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "action"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "credentialsId": {
                                    "type": "string"
                                  },
                                  "sheetId": {
                                    "type": "string"
                                  },
                                  "spreadsheetId": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "Update a row"
                                    ]
                                  },
                                  "cellsToUpsert": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "column": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        },
                                        "id": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "referenceCell": {
                                    "type": "object",
                                    "properties": {
                                      "column": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      },
                                      "id": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id"
                                    ]
                                  },
                                  "filter": {
                                    "type": "object",
                                    "properties": {
                                      "comparisons": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "column": {
                                              "type": "string"
                                            },
                                            "comparisonOperator": {
                                              "type": "string",
                                              "enum": [
                                                "Equal to",
                                                "Not equal",
                                                "Contains",
                                                "Does not contain",
                                                "Greater than",
                                                "Less than",
                                                "Is set",
                                                "Is empty",
                                                "Starts with",
                                                "Ends with",
                                                "Matches regex",
                                                "Does not match regex"
                                              ]
                                            },
                                            "value": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id"
                                          ]
                                        }
                                      },
                                      "logicalOperator": {
                                        "type": "string",
                                        "enum": [
                                          "OR",
                                          "AND"
                                        ]
                                      }
                                    }
                                  }
                                },
                                "required": [
                                  "action"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "credentialsId": {
                                    "type": "string"
                                  },
                                  "sheetId": {
                                    "type": "string"
                                  },
                                  "spreadsheetId": {
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Make.com"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "variablesForTest": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "variableId": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                }
                              },
                              "responseVariableMapping": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "variableId": {
                                      "type": "string"
                                    },
                                    "bodyPath": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                }
                              },
                              "isAdvancedConfig": {
                                "type": "boolean"
                              },
                              "isCustomBody": {
                                "type": "boolean"
                              },
                              "isExecutedOnClient": {
                                "type": "boolean"
                              },
                              "webhook": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "queryParams": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "headers": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "POST",
                                      "GET",
                                      "PUT",
                                      "DELETE",
                                      "PATCH",
                                      "HEAD",
                                      "CONNECT",
                                      "OPTIONS",
                                      "TRACE"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "body": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id"
                                ]
                              },
                              "timeout": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 120
                              }
                            }
                          },
                          "webhookId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "OpenAI"
                            ]
                          },
                          "options": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "credentialsId": {
                                    "type": "string"
                                  },
                                  "baseUrl": {
                                    "type": "string"
                                  },
                                  "apiVersion": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "task": {
                                    "type": "string",
                                    "enum": [
                                      "Create chat completion"
                                    ]
                                  },
                                  "model": {
                                    "type": "string"
                                  },
                                  "messages": {
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "role": {
                                              "type": "string",
                                              "enum": [
                                                "system",
                                                "user",
                                                "assistant"
                                              ]
                                            },
                                            "content": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "role": {
                                              "type": "string",
                                              "enum": [
                                                "Messages sequence ✨"
                                              ]
                                            },
                                            "content": {
                                              "type": "object",
                                              "properties": {
                                                "assistantMessagesVariableId": {
                                                  "type": "string"
                                                },
                                                "userMessagesVariableId": {
                                                  "type": "string"
                                                }
                                              }
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "role"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "role": {
                                              "type": "string",
                                              "enum": [
                                                "Dialogue"
                                              ]
                                            },
                                            "dialogueVariableId": {
                                              "type": "string"
                                            },
                                            "startsBy": {
                                              "type": "string",
                                              "enum": [
                                                "user",
                                                "assistant"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "role"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "advancedSettings": {
                                    "type": "object",
                                    "properties": {
                                      "temperature": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {}
                                        ]
                                      }
                                    }
                                  },
                                  "responseMapping": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "valueToExtract": {
                                          "type": "string",
                                          "enum": [
                                            "Message content",
                                            "Total tokens"
                                          ]
                                        },
                                        "variableId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "valueToExtract"
                                      ]
                                    }
                                  },
                                  "credentialsId": {
                                    "type": "string"
                                  },
                                  "baseUrl": {
                                    "type": "string"
                                  },
                                  "apiVersion": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "task"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "task": {
                                    "type": "string",
                                    "enum": [
                                      "Create image"
                                    ]
                                  },
                                  "prompt": {
                                    "type": "string"
                                  },
                                  "advancedOptions": {
                                    "type": "object",
                                    "properties": {
                                      "size": {
                                        "type": "string",
                                        "enum": [
                                          "256x256",
                                          "512x512",
                                          "1024x1024"
                                        ]
                                      }
                                    }
                                  },
                                  "responseMapping": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "valueToExtract": {
                                          "type": "string",
                                          "enum": [
                                            "Image URL"
                                          ]
                                        },
                                        "variableId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "valueToExtract"
                                      ]
                                    }
                                  },
                                  "credentialsId": {
                                    "type": "string"
                                  },
                                  "baseUrl": {
                                    "type": "string"
                                  },
                                  "apiVersion": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "task",
                                  "advancedOptions",
                                  "responseMapping"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "credentialsId": {
                                    "type": "string"
                                  },
                                  "baseUrl": {
                                    "type": "string"
                                  },
                                  "apiVersion": {
                                    "type": "string"
                                  },
                                  "task": {
                                    "type": "string",
                                    "enum": [
                                      "Create speech"
                                    ]
                                  },
                                  "model": {
                                    "type": "string"
                                  },
                                  "input": {
                                    "type": "string"
                                  },
                                  "voice": {
                                    "type": "string",
                                    "enum": [
                                      "alloy",
                                      "echo",
                                      "fable",
                                      "onyx",
                                      "nova",
                                      "shimmer"
                                    ]
                                  },
                                  "saveUrlInVariableId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "task"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Pabbly"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "variablesForTest": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "variableId": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                }
                              },
                              "responseVariableMapping": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "variableId": {
                                      "type": "string"
                                    },
                                    "bodyPath": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                }
                              },
                              "isAdvancedConfig": {
                                "type": "boolean"
                              },
                              "isCustomBody": {
                                "type": "boolean"
                              },
                              "isExecutedOnClient": {
                                "type": "boolean"
                              },
                              "webhook": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "queryParams": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "headers": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "POST",
                                      "GET",
                                      "PUT",
                                      "DELETE",
                                      "PATCH",
                                      "HEAD",
                                      "CONNECT",
                                      "OPTIONS",
                                      "TRACE"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "body": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id"
                                ]
                              },
                              "timeout": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 120
                              }
                            }
                          },
                          "webhookId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Email"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "credentialsId": {
                                "type": "string"
                              },
                              "isCustomBody": {
                                "type": "boolean"
                              },
                              "isBodyCode": {
                                "type": "boolean"
                              },
                              "recipients": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "subject": {
                                "type": "string"
                              },
                              "body": {
                                "type": "string"
                              },
                              "replyTo": {
                                "type": "string"
                              },
                              "cc": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "bcc": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "attachmentsVariableId": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Webhook"
                            ],
                            "description": "Legacy name for HTTP Request block"
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "variablesForTest": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "variableId": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                }
                              },
                              "responseVariableMapping": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "variableId": {
                                      "type": "string"
                                    },
                                    "bodyPath": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                }
                              },
                              "isAdvancedConfig": {
                                "type": "boolean"
                              },
                              "isCustomBody": {
                                "type": "boolean"
                              },
                              "isExecutedOnClient": {
                                "type": "boolean"
                              },
                              "webhook": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "queryParams": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "headers": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "POST",
                                      "GET",
                                      "PUT",
                                      "DELETE",
                                      "PATCH",
                                      "HEAD",
                                      "CONNECT",
                                      "OPTIONS",
                                      "TRACE"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "body": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id"
                                ]
                              },
                              "timeout": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 120
                              }
                            }
                          },
                          "webhookId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Zapier"
                            ]
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "variablesForTest": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "variableId": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                }
                              },
                              "responseVariableMapping": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "variableId": {
                                      "type": "string"
                                    },
                                    "bodyPath": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ]
                                }
                              },
                              "isAdvancedConfig": {
                                "type": "boolean"
                              },
                              "isCustomBody": {
                                "type": "boolean"
                              },
                              "isExecutedOnClient": {
                                "type": "boolean"
                              },
                              "webhook": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "queryParams": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "headers": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "POST",
                                      "GET",
                                      "PUT",
                                      "DELETE",
                                      "PATCH",
                                      "HEAD",
                                      "CONNECT",
                                      "OPTIONS",
                                      "TRACE"
                                    ]
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "body": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id"
                                ]
                              },
                              "timeout": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 120
                              }
                            }
                          },
                          "webhookId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Pixel"
                            ]
                          },
                          "options": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "pixelId": {
                                    "type": "string"
                                  },
                                  "isInitSkip": {
                                    "type": "boolean"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {}
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "pixelId": {
                                    "type": "string"
                                  },
                                  "isInitSkip": {
                                    "type": "boolean"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {}
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "eventType": {
                                    "type": "string",
                                    "enum": [
                                      "Lead",
                                      "Contact",
                                      "CompleteRegistration",
                                      "Schedule",
                                      "SubmitApplication",
                                      "ViewContent",
                                      "AddPaymentInfo",
                                      "AddToCart",
                                      "AddToWishlist",
                                      "CustomizeProduct",
                                      "Donate",
                                      "FindLocation",
                                      "InitiateCheckout",
                                      "Purchase",
                                      "Search",
                                      "StartTrial",
                                      "Subscribe"
                                    ]
                                  }
                                },
                                "required": [
                                  "eventType"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "pixelId": {
                                    "type": "string"
                                  },
                                  "isInitSkip": {
                                    "type": "boolean"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "key": {
                                          "type": "string"
                                        },
                                        "value": {}
                                      },
                                      "required": [
                                        "id"
                                      ]
                                    }
                                  },
                                  "eventType": {
                                    "type": "string",
                                    "enum": [
                                      "Custom"
                                    ]
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "eventType"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "outgoingEdgeId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Zemantic AI"
                            ]
                          },
                          "blockId": {
                            "type": "string"
                          },
                          "options": {
                            "type": "object",
                            "properties": {
                              "credentialsId": {
                                "type": "string"
                              },
                              "projectId": {
                                "type": "string"
                              },
                              "systemPrompt": {
                                "type": "string"
                              },
                              "prompt": {
                                "type": "string"
                              },
                              "query": {
                                "type": "string"
                              },
                              "maxResults": {
                                "type": "integer"
                              },
                              "responseMapping": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "valueToExtract": {
                                      "type": "string",
                                      "enum": [
                                        "Summary",
                                        "Results"
                                      ]
                                    },
                                    "variableId": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "valueToExtract"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      }
                    ]
                  }
                }
              },
              "required": [
                "id",
                "title",
                "graphCoordinates",
                "blocks"
              ]
            }
          },
          "events": {
            "type": "array"
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "from": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "blockId": {
                          "type": "string"
                        },
                        "itemId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "blockId"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "eventId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "eventId"
                      ]
                    }
                  ]
                },
                "to": {
                  "type": "object",
                  "properties": {
                    "groupId": {
                      "type": "string"
                    },
                    "blockId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "groupId"
                  ]
                }
              },
              "required": [
                "id",
                "from",
                "to"
              ]
            }
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "isSessionVariable": {
                  "type": "boolean"
                },
                "value": {
                  "nullable": true,
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "settings": {
            "$ref": "#/components/schemas/settings"
          },
          "theme": {
            "$ref": "#/components/schemas/theme"
          }
        },
        "required": [
          "version",
          "id",
          "groups",
          "events",
          "edges",
          "variables",
          "settings",
          "theme"
        ],
        "title": "Typebot V5"
      },
      "textInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "labels": {
                "type": "object",
                "properties": {
                  "placeholder": {
                    "type": "string"
                  },
                  "button": {
                    "type": "string"
                  }
                }
              },
              "variableId": {
                "type": "string"
              },
              "isLong": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "Text"
      },
      "buttonsInputV5": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "choice input"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "blockId": {
                  "type": "string"
                },
                "outgoingEdgeId": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                },
                "displayCondition": {
                  "type": "object",
                  "properties": {
                    "isEnabled": {
                      "type": "boolean"
                    },
                    "condition": {
                      "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",
                                  "Does not contain",
                                  "Greater than",
                                  "Less than",
                                  "Is set",
                                  "Is empty",
                                  "Starts with",
                                  "Ends with",
                                  "Matches regex",
                                  "Does not match regex"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "isMultipleChoice": {
                "type": "boolean"
              },
              "buttonLabel": {
                "type": "string"
              },
              "dynamicVariableId": {
                "type": "string"
              },
              "isSearchable": {
                "type": "boolean"
              },
              "searchInputPlaceholder": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "items"
        ],
        "title": "Buttons v5"
      },
      "email": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "email input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "labels": {
                "type": "object",
                "properties": {
                  "placeholder": {
                    "type": "string"
                  },
                  "button": {
                    "type": "string"
                  }
                }
              },
              "retryMessageContent": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "Email"
      },
      "numberInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "number input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "labels": {
                "type": "object",
                "properties": {
                  "placeholder": {
                    "type": "string"
                  },
                  "button": {
                    "type": "string"
                  }
                }
              },
              "min": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {}
                ]
              },
              "max": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {}
                ]
              },
              "step": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {}
                ]
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "Number"
      },
      "url": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "url input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "labels": {
                "type": "object",
                "properties": {
                  "placeholder": {
                    "type": "string"
                  },
                  "button": {
                    "type": "string"
                  }
                }
              },
              "retryMessageContent": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "URL"
      },
      "phoneNumberInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "phone number input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "labels": {
                "type": "object",
                "properties": {
                  "placeholder": {
                    "type": "string"
                  },
                  "button": {
                    "type": "string"
                  }
                }
              },
              "retryMessageContent": {
                "type": "string"
              },
              "defaultCountryCode": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "Phone number"
      },
      "dateInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "date input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "labels": {
                "type": "object",
                "properties": {
                  "button": {
                    "type": "string"
                  },
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  }
                }
              },
              "hasTime": {
                "type": "boolean"
              },
              "isRange": {
                "type": "boolean"
              },
              "format": {
                "type": "string"
              },
              "min": {
                "type": "string"
              },
              "max": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "Date"
      },
      "paymentInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "payment input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "provider": {
                "type": "string",
                "enum": [
                  "Stripe"
                ]
              },
              "labels": {
                "type": "object",
                "properties": {
                  "button": {
                    "type": "string"
                  },
                  "success": {
                    "type": "string"
                  }
                }
              },
              "additionalInformation": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phoneNumber": {
                    "type": "string"
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "country": {
                        "type": "string"
                      },
                      "line1": {
                        "type": "string"
                      },
                      "line2": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "postalCode": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "credentialsId": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "amount": {
                "type": "string"
              },
              "retryMessageContent": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "Payment"
      },
      "rating": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "rating input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "buttonType": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "Icons"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "Numbers"
                    ]
                  }
                ]
              },
              "length": {
                "type": "number"
              },
              "startsAt": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {}
                ]
              },
              "labels": {
                "type": "object",
                "properties": {
                  "left": {
                    "type": "string"
                  },
                  "right": {
                    "type": "string"
                  },
                  "button": {
                    "type": "string"
                  }
                }
              },
              "customIcon": {
                "type": "object",
                "properties": {
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "svg": {
                    "type": "string"
                  }
                }
              },
              "isOneClickSubmitEnabled": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "Rating"
      },
      "fileInputV5": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "file input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "isRequired": {
                "type": "boolean"
              },
              "isMultipleAllowed": {
                "type": "boolean"
              },
              "labels": {
                "type": "object",
                "properties": {
                  "placeholder": {
                    "type": "string"
                  },
                  "button": {
                    "type": "string"
                  },
                  "clear": {
                    "type": "string"
                  },
                  "skip": {
                    "type": "string"
                  },
                  "success": {
                    "type": "object",
                    "properties": {
                      "single": {
                        "type": "string"
                      },
                      "multiple": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "sizeLimit": {
                "type": "number"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "Auto",
                  "Public",
                  "Private"
                ]
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "File input v5"
      },
      "pictureChoiceV5": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "picture choice input"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "blockId": {
                  "type": "string"
                },
                "outgoingEdgeId": {
                  "type": "string"
                },
                "pictureSrc": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "displayCondition": {
                  "type": "object",
                  "properties": {
                    "isEnabled": {
                      "type": "boolean"
                    },
                    "condition": {
                      "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",
                                  "Does not contain",
                                  "Greater than",
                                  "Less than",
                                  "Is set",
                                  "Is empty",
                                  "Starts with",
                                  "Ends with",
                                  "Matches regex",
                                  "Does not match regex"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "isMultipleChoice": {
                "type": "boolean"
              },
              "isSearchable": {
                "type": "boolean"
              },
              "buttonLabel": {
                "type": "string"
              },
              "searchInputPlaceholder": {
                "type": "string"
              },
              "dynamicItems": {
                "type": "object",
                "properties": {
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "titlesVariableId": {
                    "type": "string"
                  },
                  "descriptionsVariableId": {
                    "type": "string"
                  },
                  "pictureSrcsVariableId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "items"
        ],
        "title": "Picture choice v5"
      },
      "settings": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "isBrandingEnabled": {
                "type": "boolean"
              },
              "isTypingEmulationEnabled": {
                "type": "boolean"
              },
              "isInputPrefillEnabled": {
                "type": "boolean"
              },
              "isHideQueryParamsEnabled": {
                "type": "boolean"
              },
              "isNewResultOnRefreshEnabled": {
                "type": "boolean"
              },
              "rememberUser": {
                "type": "object",
                "properties": {
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "storage": {
                    "type": "string",
                    "enum": [
                      "session",
                      "local"
                    ]
                  }
                }
              }
            }
          },
          "typingEmulation": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "speed": {
                "type": "number"
              },
              "maxDelay": {
                "type": "number"
              },
              "delayBetweenBubbles": {
                "type": "number",
                "minimum": 0,
                "maximum": 5
              },
              "isDisabledOnFirstMessage": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "imageUrl": {
                "type": "string"
              },
              "favIconUrl": {
                "type": "string"
              },
              "customHeadCode": {
                "type": "string"
              },
              "googleTagManagerId": {
                "type": "string"
              }
            }
          },
          "whatsApp": {
            "type": "object",
            "properties": {
              "isEnabled": {
                "type": "boolean"
              },
              "startCondition": {
                "type": "object",
                "properties": {
                  "logicalOperator": {
                    "type": "string",
                    "enum": [
                      "OR",
                      "AND"
                    ]
                  },
                  "comparisons": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "comparisonOperator": {
                          "type": "string",
                          "enum": [
                            "Equal to",
                            "Not equal",
                            "Contains",
                            "Does not contain",
                            "Greater than",
                            "Less than",
                            "Is set",
                            "Is empty",
                            "Starts with",
                            "Ends with",
                            "Matches regex",
                            "Does not match regex"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  }
                },
                "required": [
                  "logicalOperator",
                  "comparisons"
                ]
              },
              "sessionExpiryTimeout": {
                "type": "number",
                "minimum": 0.01,
                "maximum": 48,
                "description": "Expiration delay in hours after latest interaction"
              }
            }
          },
          "publicShare": {
            "type": "object",
            "properties": {
              "isEnabled": {
                "type": "boolean"
              }
            }
          },
          "security": {
            "type": "object",
            "properties": {
              "allowedOrigins": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "title": "Settings"
      },
      "theme": {
        "type": "object",
        "properties": {
          "general": {
            "type": "object",
            "properties": {
              "font": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "Google"
                            ]
                          },
                          "family": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "Custom"
                            ]
                          },
                          "family": {
                            "type": "string"
                          },
                          "css": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "description": "Deprecated, use `css` instead"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ]
                  }
                ]
              },
              "background": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "Color",
                      "Image",
                      "None"
                    ]
                  },
                  "content": {
                    "type": "string"
                  }
                }
              },
              "progressBar": {
                "type": "object",
                "properties": {
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "color": {
                    "type": "string"
                  },
                  "backgroundColor": {
                    "type": "string"
                  },
                  "placement": {
                    "type": "string",
                    "enum": [
                      "Top",
                      "Bottom"
                    ]
                  },
                  "thickness": {
                    "type": "number"
                  },
                  "position": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "absolute"
                    ]
                  }
                }
              }
            }
          },
          "chat": {
            "type": "object",
            "properties": {
              "container": {
                "type": "object",
                "properties": {
                  "maxWidth": {
                    "type": "string"
                  },
                  "maxHeight": {
                    "type": "string"
                  },
                  "backgroundColor": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  },
                  "blur": {
                    "type": "number"
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "shadow": {
                    "type": "string",
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg",
                      "xl",
                      "2xl"
                    ]
                  },
                  "border": {
                    "type": "object",
                    "properties": {
                      "thickness": {
                        "type": "number"
                      },
                      "color": {
                        "type": "string"
                      },
                      "roundeness": {
                        "type": "string",
                        "enum": [
                          "none",
                          "medium",
                          "large",
                          "custom"
                        ]
                      },
                      "customRoundeness": {
                        "type": "number"
                      },
                      "opacity": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    }
                  }
                }
              },
              "hostAvatar": {
                "type": "object",
                "properties": {
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "guestAvatar": {
                "type": "object",
                "properties": {
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "hostBubbles": {
                "type": "object",
                "properties": {
                  "backgroundColor": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  },
                  "blur": {
                    "type": "number"
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "shadow": {
                    "type": "string",
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg",
                      "xl",
                      "2xl"
                    ]
                  },
                  "border": {
                    "type": "object",
                    "properties": {
                      "thickness": {
                        "type": "number"
                      },
                      "color": {
                        "type": "string"
                      },
                      "roundeness": {
                        "type": "string",
                        "enum": [
                          "none",
                          "medium",
                          "large",
                          "custom"
                        ]
                      },
                      "customRoundeness": {
                        "type": "number"
                      },
                      "opacity": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    }
                  }
                }
              },
              "guestBubbles": {
                "type": "object",
                "properties": {
                  "backgroundColor": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  },
                  "blur": {
                    "type": "number"
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "shadow": {
                    "type": "string",
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg",
                      "xl",
                      "2xl"
                    ]
                  },
                  "border": {
                    "type": "object",
                    "properties": {
                      "thickness": {
                        "type": "number"
                      },
                      "color": {
                        "type": "string"
                      },
                      "roundeness": {
                        "type": "string",
                        "enum": [
                          "none",
                          "medium",
                          "large",
                          "custom"
                        ]
                      },
                      "customRoundeness": {
                        "type": "number"
                      },
                      "opacity": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    }
                  }
                }
              },
              "buttons": {
                "type": "object",
                "properties": {
                  "backgroundColor": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  },
                  "blur": {
                    "type": "number"
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "shadow": {
                    "type": "string",
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg",
                      "xl",
                      "2xl"
                    ]
                  },
                  "border": {
                    "type": "object",
                    "properties": {
                      "thickness": {
                        "type": "number"
                      },
                      "color": {
                        "type": "string"
                      },
                      "roundeness": {
                        "type": "string",
                        "enum": [
                          "none",
                          "medium",
                          "large",
                          "custom"
                        ]
                      },
                      "customRoundeness": {
                        "type": "number"
                      },
                      "opacity": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    }
                  }
                }
              },
              "inputs": {
                "type": "object",
                "properties": {
                  "backgroundColor": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  },
                  "blur": {
                    "type": "number"
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "shadow": {
                    "type": "string",
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg",
                      "xl",
                      "2xl"
                    ]
                  },
                  "border": {
                    "type": "object",
                    "properties": {
                      "thickness": {
                        "type": "number"
                      },
                      "color": {
                        "type": "string"
                      },
                      "roundeness": {
                        "type": "string",
                        "enum": [
                          "none",
                          "medium",
                          "large",
                          "custom"
                        ]
                      },
                      "customRoundeness": {
                        "type": "number"
                      },
                      "opacity": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    }
                  },
                  "placeholderColor": {
                    "type": "string"
                  }
                }
              },
              "roundness": {
                "type": "string",
                "enum": [
                  "none",
                  "medium",
                  "large"
                ],
                "description": "Deprecated, use `container.border.roundeness` instead"
              }
            }
          },
          "customCss": {
            "type": "string"
          }
        },
        "title": "Theme"
      },
      "typebotV6": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "enum": [
              "6"
            ]
          },
          "id": {
            "type": "string"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/groupV6"
            }
          },
          "events": {
            "type": "array",
            "maxItems": 1,
            "minItems": 1,
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/event"
                }
              ]
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "from": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "blockId": {
                          "type": "string"
                        },
                        "itemId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "blockId"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "eventId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "eventId"
                      ]
                    }
                  ]
                },
                "to": {
                  "type": "object",
                  "properties": {
                    "groupId": {
                      "type": "string"
                    },
                    "blockId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "groupId"
                  ]
                }
              },
              "required": [
                "id",
                "from",
                "to"
              ]
            }
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "isSessionVariable": {
                  "type": "boolean"
                },
                "value": {
                  "nullable": true,
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "nullable": true
                      }
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "settings": {
            "$ref": "#/components/schemas/settings"
          },
          "theme": {
            "$ref": "#/components/schemas/theme"
          }
        },
        "required": [
          "version",
          "id",
          "groups",
          "events",
          "edges",
          "variables",
          "settings",
          "theme"
        ],
        "title": "Typebot V6"
      },
      "groupV6": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "graphCoordinates": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "required": [
              "x",
              "y"
            ]
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/block"
            }
          }
        },
        "required": [
          "id",
          "title",
          "graphCoordinates",
          "blocks"
        ],
        "title": "Group V6"
      },
      "block": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "text"
                ]
              },
              "content": {
                "type": "object",
                "properties": {
                  "html": {
                    "type": "string"
                  },
                  "richText": {
                    "type": "array",
                    "items": {}
                  },
                  "plainText": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "image"
                ]
              },
              "content": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "clickLink": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "video"
                ]
              },
              "content": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "url",
                      "youtube",
                      "vimeo",
                      "tiktok",
                      "gumlet"
                    ]
                  },
                  "height": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {}
                    ]
                  },
                  "aspectRatio": {
                    "type": "string"
                  },
                  "maxWidth": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "embed"
                ]
              },
              "content": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "height": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {}
                    ]
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "audio"
                ]
              },
              "content": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "isAutoplayEnabled": {
                    "type": "boolean"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "$ref": "#/components/schemas/textInput"
          },
          {
            "$ref": "#/components/schemas/buttonsInput"
          },
          {
            "$ref": "#/components/schemas/email"
          },
          {
            "$ref": "#/components/schemas/numberInput"
          },
          {
            "$ref": "#/components/schemas/url"
          },
          {
            "$ref": "#/components/schemas/phoneNumberInput"
          },
          {
            "$ref": "#/components/schemas/dateInput"
          },
          {
            "$ref": "#/components/schemas/paymentInput"
          },
          {
            "$ref": "#/components/schemas/rating"
          },
          {
            "$ref": "#/components/schemas/fileInput"
          },
          {
            "$ref": "#/components/schemas/pictureChoice"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Code"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "isExecutedOnClient": {
                    "type": "boolean"
                  },
                  "shouldExecuteInParentContext": {
                    "type": "boolean"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Condition"
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "outgoingEdgeId": {
                      "type": "string"
                    },
                    "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",
                                  "Does not contain",
                                  "Greater than",
                                  "Less than",
                                  "Is set",
                                  "Is empty",
                                  "Starts with",
                                  "Ends with",
                                  "Matches regex",
                                  "Does not match regex"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            },
            "required": [
              "id",
              "type",
              "items"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Redirect"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "isNewTab": {
                    "type": "boolean"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Set variable"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "variableId": {
                        "type": "string"
                      },
                      "isExecutedOnClient": {
                        "type": "boolean"
                      },
                      "expressionToEvaluate": {
                        "type": "string"
                      },
                      "isCode": {
                        "type": "boolean"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "variableId": {
                        "type": "string"
                      },
                      "isExecutedOnClient": {
                        "type": "boolean"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "Now",
                          "Yesterday",
                          "Tomorrow"
                        ]
                      },
                      "timeZone": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "variableId": {
                        "type": "string"
                      },
                      "isExecutedOnClient": {
                        "type": "boolean"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "Today",
                          "Moment of the day",
                          "Empty",
                          "Environment name",
                          "User ID",
                          "Result ID",
                          "Random ID",
                          "Phone number",
                          "Contact name"
                        ]
                      }
                    },
                    "required": [
                      "type"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "variableId": {
                        "type": "string"
                      },
                      "isExecutedOnClient": {
                        "type": "boolean"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "Custom"
                        ]
                      },
                      "expressionToEvaluate": {
                        "type": "string"
                      },
                      "isCode": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "type"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "variableId": {
                        "type": "string"
                      },
                      "isExecutedOnClient": {
                        "type": "boolean"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "Map item with same index"
                        ]
                      },
                      "mapListItemParams": {
                        "type": "object",
                        "properties": {
                          "baseItemVariableId": {
                            "type": "string"
                          },
                          "baseListVariableId": {
                            "type": "string"
                          },
                          "targetListVariableId": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "required": [
                      "type"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "variableId": {
                        "type": "string"
                      },
                      "isExecutedOnClient": {
                        "type": "boolean"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "Append value(s)"
                        ]
                      },
                      "item": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Typebot link"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "typebotId": {
                    "type": "string"
                  },
                  "groupId": {
                    "type": "string"
                  },
                  "mergeResults": {
                    "type": "boolean"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Wait"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "secondsToWaitFor": {
                    "type": "string"
                  },
                  "shouldPause": {
                    "type": "boolean"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Jump"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "groupId": {
                    "type": "string"
                  },
                  "blockId": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "AB test"
                ]
              },
              "items": {
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "outgoingEdgeId": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string",
                          "enum": [
                            "a"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "path"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "outgoingEdgeId": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string",
                          "enum": [
                            "b"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "path"
                      ]
                    }
                  ]
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "aPercent": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                }
              }
            },
            "required": [
              "id",
              "type",
              "items"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Chatwoot"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "task": {
                    "type": "string",
                    "enum": [
                      "Show widget",
                      "Close widget"
                    ]
                  },
                  "baseUrl": {
                    "type": "string"
                  },
                  "websiteToken": {
                    "type": "string"
                  },
                  "user": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "avatarUrl": {
                        "type": "string"
                      },
                      "phoneNumber": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Google Analytics"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "trackingId": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {}
                    ]
                  },
                  "sendTo": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Google Sheets"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "sheetId": {
                        "type": "string"
                      },
                      "spreadsheetId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Get data from sheet"
                        ]
                      },
                      "filter": {
                        "type": "object",
                        "properties": {
                          "comparisons": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "column": {
                                  "type": "string"
                                },
                                "comparisonOperator": {
                                  "type": "string",
                                  "enum": [
                                    "Equal to",
                                    "Not equal",
                                    "Contains",
                                    "Does not contain",
                                    "Greater than",
                                    "Less than",
                                    "Is set",
                                    "Is empty",
                                    "Starts with",
                                    "Ends with",
                                    "Matches regex",
                                    "Does not match regex"
                                  ]
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            }
                          },
                          "logicalOperator": {
                            "type": "string",
                            "enum": [
                              "OR",
                              "AND"
                            ]
                          }
                        }
                      },
                      "cellsToExtract": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "column": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            },
                            "variableId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "totalRowsToExtract": {
                        "type": "string",
                        "enum": [
                          "All",
                          "First",
                          "Last",
                          "Random"
                        ]
                      }
                    },
                    "required": [
                      "action"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "sheetId": {
                        "type": "string"
                      },
                      "spreadsheetId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Insert a row"
                        ]
                      },
                      "cellsToInsert": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "column": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "sheetId": {
                        "type": "string"
                      },
                      "spreadsheetId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Update a row"
                        ]
                      },
                      "cellsToUpsert": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "column": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "filter": {
                        "type": "object",
                        "properties": {
                          "comparisons": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "column": {
                                  "type": "string"
                                },
                                "comparisonOperator": {
                                  "type": "string",
                                  "enum": [
                                    "Equal to",
                                    "Not equal",
                                    "Contains",
                                    "Does not contain",
                                    "Greater than",
                                    "Less than",
                                    "Is set",
                                    "Is empty",
                                    "Starts with",
                                    "Ends with",
                                    "Matches regex",
                                    "Does not match regex"
                                  ]
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            }
                          },
                          "logicalOperator": {
                            "type": "string",
                            "enum": [
                              "OR",
                              "AND"
                            ]
                          }
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "sheetId": {
                        "type": "string"
                      },
                      "spreadsheetId": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Make.com"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "variablesForTest": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variableId": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "responseVariableMapping": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variableId": {
                          "type": "string"
                        },
                        "bodyPath": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "isAdvancedConfig": {
                    "type": "boolean"
                  },
                  "isCustomBody": {
                    "type": "boolean"
                  },
                  "isExecutedOnClient": {
                    "type": "boolean"
                  },
                  "webhook": {
                    "type": "object",
                    "properties": {
                      "queryParams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "headers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "POST",
                          "GET",
                          "PUT",
                          "DELETE",
                          "PATCH",
                          "HEAD",
                          "CONNECT",
                          "OPTIONS",
                          "TRACE"
                        ]
                      },
                      "url": {
                        "type": "string"
                      },
                      "body": {
                        "type": "string"
                      }
                    }
                  },
                  "timeout": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 120
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "OpenAI"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "baseUrl": {
                        "type": "string"
                      },
                      "apiVersion": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "task": {
                        "type": "string",
                        "enum": [
                          "Create chat completion"
                        ]
                      },
                      "model": {
                        "type": "string"
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "system",
                                    "user",
                                    "assistant"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "Messages sequence ✨"
                                  ]
                                },
                                "content": {
                                  "type": "object",
                                  "properties": {
                                    "assistantMessagesVariableId": {
                                      "type": "string"
                                    },
                                    "userMessagesVariableId": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "Dialogue"
                                  ]
                                },
                                "dialogueVariableId": {
                                  "type": "string"
                                },
                                "startsBy": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "assistant"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "role"
                              ]
                            }
                          ]
                        }
                      },
                      "advancedSettings": {
                        "type": "object",
                        "properties": {
                          "temperature": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {}
                            ]
                          }
                        }
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "valueToExtract": {
                              "type": "string",
                              "enum": [
                                "Message content",
                                "Total tokens"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "valueToExtract"
                          ]
                        }
                      },
                      "credentialsId": {
                        "type": "string"
                      },
                      "baseUrl": {
                        "type": "string"
                      },
                      "apiVersion": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "task"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "task": {
                        "type": "string",
                        "enum": [
                          "Create image"
                        ]
                      },
                      "prompt": {
                        "type": "string"
                      },
                      "advancedOptions": {
                        "type": "object",
                        "properties": {
                          "size": {
                            "type": "string",
                            "enum": [
                              "256x256",
                              "512x512",
                              "1024x1024"
                            ]
                          }
                        }
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "valueToExtract": {
                              "type": "string",
                              "enum": [
                                "Image URL"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "valueToExtract"
                          ]
                        }
                      },
                      "credentialsId": {
                        "type": "string"
                      },
                      "baseUrl": {
                        "type": "string"
                      },
                      "apiVersion": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "task",
                      "advancedOptions",
                      "responseMapping"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "baseUrl": {
                        "type": "string"
                      },
                      "apiVersion": {
                        "type": "string"
                      },
                      "task": {
                        "type": "string",
                        "enum": [
                          "Create speech"
                        ]
                      },
                      "model": {
                        "type": "string"
                      },
                      "input": {
                        "type": "string"
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "alloy",
                          "echo",
                          "fable",
                          "onyx",
                          "nova",
                          "shimmer"
                        ]
                      },
                      "saveUrlInVariableId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "task"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Pabbly"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "variablesForTest": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variableId": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "responseVariableMapping": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variableId": {
                          "type": "string"
                        },
                        "bodyPath": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "isAdvancedConfig": {
                    "type": "boolean"
                  },
                  "isCustomBody": {
                    "type": "boolean"
                  },
                  "isExecutedOnClient": {
                    "type": "boolean"
                  },
                  "webhook": {
                    "type": "object",
                    "properties": {
                      "queryParams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "headers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "POST",
                          "GET",
                          "PUT",
                          "DELETE",
                          "PATCH",
                          "HEAD",
                          "CONNECT",
                          "OPTIONS",
                          "TRACE"
                        ]
                      },
                      "url": {
                        "type": "string"
                      },
                      "body": {
                        "type": "string"
                      }
                    }
                  },
                  "timeout": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 120
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Email"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "credentialsId": {
                    "type": "string"
                  },
                  "isCustomBody": {
                    "type": "boolean"
                  },
                  "isBodyCode": {
                    "type": "boolean"
                  },
                  "recipients": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "replyTo": {
                    "type": "string"
                  },
                  "cc": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "bcc": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "attachmentsVariableId": {
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Webhook"
                ],
                "description": "Legacy name for HTTP Request block"
              },
              "options": {
                "type": "object",
                "properties": {
                  "variablesForTest": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variableId": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "responseVariableMapping": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variableId": {
                          "type": "string"
                        },
                        "bodyPath": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "isAdvancedConfig": {
                    "type": "boolean"
                  },
                  "isCustomBody": {
                    "type": "boolean"
                  },
                  "isExecutedOnClient": {
                    "type": "boolean"
                  },
                  "webhook": {
                    "type": "object",
                    "properties": {
                      "queryParams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "headers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "POST",
                          "GET",
                          "PUT",
                          "DELETE",
                          "PATCH",
                          "HEAD",
                          "CONNECT",
                          "OPTIONS",
                          "TRACE"
                        ]
                      },
                      "url": {
                        "type": "string"
                      },
                      "body": {
                        "type": "string"
                      }
                    }
                  },
                  "timeout": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 120
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Zapier"
                ]
              },
              "options": {
                "type": "object",
                "properties": {
                  "variablesForTest": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variableId": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "responseVariableMapping": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variableId": {
                          "type": "string"
                        },
                        "bodyPath": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "isAdvancedConfig": {
                    "type": "boolean"
                  },
                  "isCustomBody": {
                    "type": "boolean"
                  },
                  "isExecutedOnClient": {
                    "type": "boolean"
                  },
                  "webhook": {
                    "type": "object",
                    "properties": {
                      "queryParams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "headers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "POST",
                          "GET",
                          "PUT",
                          "DELETE",
                          "PATCH",
                          "HEAD",
                          "CONNECT",
                          "OPTIONS",
                          "TRACE"
                        ]
                      },
                      "url": {
                        "type": "string"
                      },
                      "body": {
                        "type": "string"
                      }
                    }
                  },
                  "timeout": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 120
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Pixel"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "pixelId": {
                        "type": "string"
                      },
                      "isInitSkip": {
                        "type": "boolean"
                      },
                      "params": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {}
                          },
                          "required": [
                            "id"
                          ]
                        }
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "pixelId": {
                        "type": "string"
                      },
                      "isInitSkip": {
                        "type": "boolean"
                      },
                      "params": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {}
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "eventType": {
                        "type": "string",
                        "enum": [
                          "Lead",
                          "Contact",
                          "CompleteRegistration",
                          "Schedule",
                          "SubmitApplication",
                          "ViewContent",
                          "AddPaymentInfo",
                          "AddToCart",
                          "AddToWishlist",
                          "CustomizeProduct",
                          "Donate",
                          "FindLocation",
                          "InitiateCheckout",
                          "Purchase",
                          "Search",
                          "StartTrial",
                          "Subscribe"
                        ]
                      }
                    },
                    "required": [
                      "eventType"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "pixelId": {
                        "type": "string"
                      },
                      "isInitSkip": {
                        "type": "boolean"
                      },
                      "params": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "key": {
                              "type": "string"
                            },
                            "value": {}
                          },
                          "required": [
                            "id"
                          ]
                        }
                      },
                      "eventType": {
                        "type": "string",
                        "enum": [
                          "Custom"
                        ]
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "eventType"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Zemantic AI"
                ]
              },
              "blockId": {
                "type": "string"
              },
              "options": {
                "type": "object",
                "properties": {
                  "credentialsId": {
                    "type": "string"
                  },
                  "projectId": {
                    "type": "string"
                  },
                  "systemPrompt": {
                    "type": "string"
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "query": {
                    "type": "string"
                  },
                  "maxResults": {
                    "type": "integer"
                  },
                  "responseMapping": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "valueToExtract": {
                          "type": "string",
                          "enum": [
                            "Summary",
                            "Results"
                          ]
                        },
                        "variableId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "valueToExtract"
                      ]
                    }
                  }
                }
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "openai"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "baseUrl": {
                        "type": "string"
                      },
                      "apiVersion": {
                        "type": "string"
                      },
                      "credentialsId": {
                        "type": "string"
                      }
                    },
                    "description": "Deprecated, use other dedicated OpenAI compatible blocks instead"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "baseUrl": {
                        "type": "string"
                      },
                      "apiVersion": {
                        "type": "string"
                      },
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Create chat completion"
                        ]
                      },
                      "model": {
                        "type": "string"
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "system"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "user"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "assistant"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "Dialogue"
                                  ]
                                },
                                "dialogueVariableId": {
                                  "type": "string"
                                },
                                "startsBy": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "assistant"
                                  ]
                                }
                              },
                              "required": [
                                "role"
                              ]
                            }
                          ]
                        }
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "function"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "type": "array",
                                  "items": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {}
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "string"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "number"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "boolean"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "enum"
                                            ]
                                          },
                                          "values": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "code": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        }
                      },
                      "temperature": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {}
                        ]
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Message content",
                                "Total tokens"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "baseUrl": {
                        "type": "string"
                      },
                      "apiVersion": {
                        "type": "string"
                      },
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Ask Assistant"
                        ]
                      },
                      "assistantId": {
                        "type": "string"
                      },
                      "threadVariableId": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "code": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Message",
                                "Thread ID"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "threadId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "action"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "baseUrl": {
                        "type": "string"
                      },
                      "apiVersion": {
                        "type": "string"
                      },
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Create speech"
                        ]
                      },
                      "model": {
                        "type": "string"
                      },
                      "input": {
                        "type": "string"
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "alloy",
                          "echo",
                          "fable",
                          "onyx",
                          "nova",
                          "shimmer"
                        ]
                      },
                      "saveUrlInVariableId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "zemantic-ai"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "projectId": {
                        "type": "string"
                      },
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "projectId": {
                        "type": "string"
                      },
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Search documents"
                        ]
                      },
                      "query": {
                        "type": "string"
                      },
                      "maxResults": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {}
                        ]
                      },
                      "systemPrompt": {
                        "type": "string"
                      },
                      "prompt": {
                        "type": "string"
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Summary",
                                "Document IDs",
                                "Texts",
                                "Scores"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "cal-com"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "baseUrl": {
                        "type": "string"
                      },
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "baseUrl": {
                        "type": "string"
                      },
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Book event"
                        ]
                      },
                      "link": {
                        "type": "string"
                      },
                      "layout": {
                        "type": "string",
                        "enum": [
                          "Month",
                          "Weekly",
                          "Columns"
                        ]
                      },
                      "name": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "additionalNotes": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "saveBookedDateInVariableId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "chat-node"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Send Message"
                        ]
                      },
                      "botId": {
                        "type": "string"
                      },
                      "threadId": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Message",
                                "Thread ID"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "qr-code"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Generate a QR Code"
                        ]
                      },
                      "data": {
                        "type": "string"
                      },
                      "saveUrlInVariableId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "dify-ai"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Create Chat Message"
                        ]
                      },
                      "query": {
                        "type": "string"
                      },
                      "conversationVariableId": {
                        "type": "string"
                      },
                      "user": {
                        "type": "string"
                      },
                      "inputs": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Answer",
                                "Conversation ID",
                                "Total Tokens"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "conversation_id": {
                        "type": "string",
                        "description": "Deprecated, use `conversationVariableId` instead"
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "mistral"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Create chat completion"
                        ]
                      },
                      "model": {
                        "type": "string"
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "system"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "user"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "assistant"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "Dialogue"
                                  ]
                                },
                                "dialogueVariableId": {
                                  "type": "string"
                                },
                                "startsBy": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "assistant"
                                  ]
                                }
                              },
                              "required": [
                                "role"
                              ]
                            }
                          ]
                        }
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Message content"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "elevenlabs"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Convert text to speech"
                        ]
                      },
                      "text": {
                        "type": "string"
                      },
                      "voiceId": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "saveUrlInVariableId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "anthropic"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Create Chat Message"
                        ]
                      },
                      "model": {
                        "type": "string",
                        "enum": [
                          "claude-3-opus-20240229",
                          "claude-3-sonnet-20240229",
                          "claude-3-haiku-20240307",
                          "claude-2.1",
                          "claude-2.0",
                          "claude-instant-1.2"
                        ]
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "user"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "assistant"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "Dialogue"
                                  ]
                                },
                                "dialogueVariableId": {
                                  "type": "string"
                                },
                                "startsBy": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "assistant"
                                  ]
                                }
                              },
                              "required": [
                                "role"
                              ]
                            }
                          ]
                        }
                      },
                      "systemMessage": {
                        "type": "string"
                      },
                      "temperature": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {}
                        ]
                      },
                      "maxTokens": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {}
                        ]
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Message Content"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "together-ai"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Create chat completion"
                        ]
                      },
                      "model": {
                        "type": "string"
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "system"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "user"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "assistant"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "Dialogue"
                                  ]
                                },
                                "dialogueVariableId": {
                                  "type": "string"
                                },
                                "startsBy": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "assistant"
                                  ]
                                }
                              },
                              "required": [
                                "role"
                              ]
                            }
                          ]
                        }
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "function"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "type": "array",
                                  "items": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {}
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "string"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "number"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "boolean"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "enum"
                                            ]
                                          },
                                          "values": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "code": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        }
                      },
                      "temperature": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {}
                        ]
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Message content",
                                "Total tokens"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "outgoingEdgeId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "open-router"
                ]
              },
              "options": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "credentialsId": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "Create chat completion"
                        ]
                      },
                      "model": {
                        "type": "string"
                      },
                      "messages": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "system"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "user"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "assistant"
                                  ]
                                },
                                "content": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "Dialogue"
                                  ]
                                },
                                "dialogueVariableId": {
                                  "type": "string"
                                },
                                "startsBy": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "assistant"
                                  ]
                                }
                              },
                              "required": [
                                "role"
                              ]
                            }
                          ]
                        }
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {}
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "function"
                                  ]
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "parameters": {
                                  "type": "array",
                                  "items": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {}
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "string"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "number"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "boolean"
                                            ]
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "enum"
                                            ]
                                          },
                                          "values": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "name": {
                                            "type": "string"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "required": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "code": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        }
                      },
                      "temperature": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {}
                        ]
                      },
                      "responseMapping": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item": {
                              "type": "string",
                              "enum": [
                                "Message content",
                                "Total tokens"
                              ]
                            },
                            "variableId": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "action"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "type"
            ]
          }
        ],
        "title": "Block"
      },
      "buttonsInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "choice input"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "outgoingEdgeId": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                },
                "displayCondition": {
                  "type": "object",
                  "properties": {
                    "isEnabled": {
                      "type": "boolean"
                    },
                    "condition": {
                      "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",
                                  "Does not contain",
                                  "Greater than",
                                  "Less than",
                                  "Is set",
                                  "Is empty",
                                  "Starts with",
                                  "Ends with",
                                  "Matches regex",
                                  "Does not match regex"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "isMultipleChoice": {
                "type": "boolean"
              },
              "buttonLabel": {
                "type": "string"
              },
              "dynamicVariableId": {
                "type": "string"
              },
              "isSearchable": {
                "type": "boolean"
              },
              "searchInputPlaceholder": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "items"
        ],
        "title": "Buttons"
      },
      "fileInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "file input"
            ]
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "isRequired": {
                "type": "boolean"
              },
              "isMultipleAllowed": {
                "type": "boolean"
              },
              "labels": {
                "type": "object",
                "properties": {
                  "placeholder": {
                    "type": "string"
                  },
                  "button": {
                    "type": "string"
                  },
                  "clear": {
                    "type": "string"
                  },
                  "skip": {
                    "type": "string"
                  },
                  "success": {
                    "type": "object",
                    "properties": {
                      "single": {
                        "type": "string"
                      },
                      "multiple": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "Auto",
                  "Public",
                  "Private"
                ]
              }
            }
          }
        },
        "required": [
          "id",
          "type"
        ],
        "title": "File"
      },
      "pictureChoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "picture choice input"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "outgoingEdgeId": {
                  "type": "string"
                },
                "pictureSrc": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "displayCondition": {
                  "type": "object",
                  "properties": {
                    "isEnabled": {
                      "type": "boolean"
                    },
                    "condition": {
                      "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",
                                  "Does not contain",
                                  "Greater than",
                                  "Less than",
                                  "Is set",
                                  "Is empty",
                                  "Starts with",
                                  "Ends with",
                                  "Matches regex",
                                  "Does not match regex"
                                ]
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "options": {
            "type": "object",
            "properties": {
              "variableId": {
                "type": "string"
              },
              "isMultipleChoice": {
                "type": "boolean"
              },
              "isSearchable": {
                "type": "boolean"
              },
              "buttonLabel": {
                "type": "string"
              },
              "searchInputPlaceholder": {
                "type": "string"
              },
              "dynamicItems": {
                "type": "object",
                "properties": {
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "titlesVariableId": {
                    "type": "string"
                  },
                  "descriptionsVariableId": {
                    "type": "string"
                  },
                  "pictureSrcsVariableId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "items"
        ],
        "title": "Picture choice"
      },
      "event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "outgoingEdgeId": {
            "type": "string"
          },
          "graphCoordinates": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "required": [
              "x",
              "y"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "start"
            ]
          }
        },
        "required": [
          "id",
          "graphCoordinates",
          "type"
        ],
        "description": "Event"
      },
      "textMessage": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text"
            ]
          },
          "content": {
            "type": "object",
            "properties": {
              "html": {
                "type": "string"
              },
              "richText": {
                "type": "array",
                "items": {}
              },
              "plainText": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "type",
          "content"
        ],
        "title": "Text"
      },
      "imageMessage": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image"
            ]
          },
          "content": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "clickLink": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "alt": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "content"
        ],
        "title": "Image"
      },
      "videoMessage": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "video"
            ]
          },
          "content": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "url",
                  "youtube",
                  "vimeo",
                  "tiktok",
                  "gumlet"
                ]
              },
              "height": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {}
                ]
              },
              "aspectRatio": {
                "type": "string"
              },
              "maxWidth": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "type",
          "content"
        ],
        "title": "Video"
      },
      "audioMessage": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "audio"
            ]
          },
          "content": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "isAutoplayEnabled": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "type",
          "content"
        ],
        "title": "Audio"
      },
      "embedMessage": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "embed"
            ]
          },
          "content": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "height": {
                "type": "number"
              }
            }
          }
        },
        "required": [
          "type",
          "content"
        ],
        "title": "Embed"
      },
      "customEmbedMessage": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "custom-embed"
            ]
          },
          "content": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "maxBubbleWidth": {
                "type": "number"
              },
              "waitForEventFunction": {
                "type": "object",
                "properties": {
                  "args": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "content": {
                    "type": "string"
                  }
                },
                "required": [
                  "args",
                  "content"
                ]
              },
              "initFunction": {
                "type": "object",
                "properties": {
                  "args": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "content": {
                    "type": "string"
                  }
                },
                "required": [
                  "args",
                  "content"
                ]
              }
            },
            "required": [
              "initFunction"
            ]
          }
        },
        "required": [
          "type",
          "content"
        ],
        "title": "Custom embed"
      },
      "csaScriptToExecute": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "scriptToExecute"
            ]
          },
          "scriptToExecute": {
            "type": "object",
            "properties": {
              "content": {
                "type": "string"
              },
              "args": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "value": {
                      "nullable": true,
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            },
                            {
                              "type": "boolean"
                            }
                          ]
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            },
            "required": [
              "content",
              "args"
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "scriptToExecute"
        ],
        "title": "Script to execute"
      },
      "csaRedirect": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "redirect"
            ]
          },
          "redirect": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "isNewTab": {
                "type": "boolean"
              }
            }
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "redirect"
        ],
        "title": "Redirect"
      },
      "csaChatwoot": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "chatwoot"
            ]
          },
          "chatwoot": {
            "type": "object",
            "properties": {
              "scriptToExecute": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "value": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "nullable": true
                              }
                            }
                          ]
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  }
                },
                "required": [
                  "content",
                  "args"
                ]
              }
            },
            "required": [
              "scriptToExecute"
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "chatwoot"
        ],
        "title": "Chatwoot"
      },
      "csaGa": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "googleAnalytics"
            ]
          },
          "googleAnalytics": {
            "type": "object",
            "properties": {
              "trackingId": {
                "type": "string"
              },
              "category": {
                "type": "string"
              },
              "action": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "value": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {}
                ]
              },
              "sendTo": {
                "type": "string"
              }
            }
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "googleAnalytics"
        ],
        "title": "Google Analytics"
      },
      "csaWait": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "wait"
            ]
          },
          "wait": {
            "type": "object",
            "properties": {
              "secondsToWaitFor": {
                "type": "number"
              }
            },
            "required": [
              "secondsToWaitFor"
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "wait"
        ],
        "title": "Wait"
      },
      "csaSetVariable": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "setVariable"
            ]
          },
          "setVariable": {
            "type": "object",
            "properties": {
              "scriptToExecute": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "value": {
                          "nullable": true,
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "nullable": true
                              }
                            }
                          ]
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  }
                },
                "required": [
                  "content",
                  "args"
                ]
              }
            },
            "required": [
              "scriptToExecute"
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "setVariable"
        ],
        "title": "Set variable"
      },
      "csaStreamOpenAiChatCompletion": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "streamOpenAiChatCompletion"
            ]
          },
          "streamOpenAiChatCompletion": {
            "type": "object",
            "properties": {
              "messages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "content": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "system",
                        "user",
                        "assistant"
                      ]
                    }
                  }
                }
              }
            },
            "required": [
              "messages"
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "streamOpenAiChatCompletion"
        ],
        "title": "Stream OpenAI"
      },
      "csaExecWebhook": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "webhookToExecute"
            ]
          },
          "webhookToExecute": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "body": {},
              "method": {
                "type": "string",
                "enum": [
                  "POST",
                  "GET",
                  "PUT",
                  "DELETE",
                  "PATCH",
                  "HEAD",
                  "CONNECT",
                  "OPTIONS",
                  "TRACE"
                ]
              }
            },
            "required": [
              "url"
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "webhookToExecute"
        ],
        "title": "Execute webhook"
      },
      "csaInjectStartProps": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "startPropsToInject"
            ]
          },
          "startPropsToInject": {
            "type": "object",
            "properties": {
              "googleAnalyticsId": {
                "type": "string"
              },
              "pixelIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "gtmId": {
                "type": "string"
              },
              "customHeadCode": {
                "type": "string"
              }
            }
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "startPropsToInject"
        ],
        "title": "Inject start props"
      },
      "csaPixel": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "pixel"
            ]
          },
          "pixel": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "pixelId": {
                    "type": "string"
                  },
                  "isInitSkip": {
                    "type": "boolean"
                  },
                  "params": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        },
                        "value": {}
                      },
                      "required": [
                        "id"
                      ]
                    }
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "pixelId": {
                    "type": "string"
                  },
                  "isInitSkip": {
                    "type": "boolean"
                  },
                  "params": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        },
                        "value": {}
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "Lead",
                      "Contact",
                      "CompleteRegistration",
                      "Schedule",
                      "SubmitApplication",
                      "ViewContent",
                      "AddPaymentInfo",
                      "AddToCart",
                      "AddToWishlist",
                      "CustomizeProduct",
                      "Donate",
                      "FindLocation",
                      "InitiateCheckout",
                      "Purchase",
                      "Search",
                      "StartTrial",
                      "Subscribe"
                    ]
                  }
                },
                "required": [
                  "eventType"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pixelId": {
                    "type": "string"
                  },
                  "isInitSkip": {
                    "type": "boolean"
                  },
                  "params": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "key": {
                          "type": "string"
                        },
                        "value": {}
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "Custom"
                    ]
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "eventType"
                ]
              }
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "pixel"
        ],
        "title": "Init Pixel"
      },
      "csaStream": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "stream"
            ]
          },
          "stream": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "stream"
        ],
        "title": "Exec stream"
      },
      "csaCodeToExecute": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "codeToExecute"
            ]
          },
          "codeToExecute": {
            "type": "object",
            "properties": {
              "args": {
                "type": "object",
                "additionalProperties": {}
              },
              "content": {
                "type": "string"
              }
            },
            "required": [
              "args",
              "content"
            ]
          },
          "lastBubbleBlockId": {
            "type": "string"
          },
          "expectsDedicatedReply": {
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "codeToExecute"
        ],
        "title": "Execute code"
      },
      "error.BAD_REQUEST": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Invalid input data"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "BAD_REQUEST"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Error",
        "description": "The error information",
        "example": {
          "code": "BAD_REQUEST",
          "message": "Invalid input data",
          "issues": []
        }
      },
      "error.INTERNAL_SERVER_ERROR": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Internal server error"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "INTERNAL_SERVER_ERROR"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Error",
        "description": "The error information",
        "example": {
          "code": "INTERNAL_SERVER_ERROR",
          "message": "Internal server error",
          "issues": []
        }
      },
      "error.NOT_FOUND": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Not found"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "NOT_FOUND"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Error",
        "description": "The error information",
        "example": {
          "code": "NOT_FOUND",
          "message": "Not found",
          "issues": []
        }
      },
      "error.UNAUTHORIZED": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Authorization not provided"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "UNAUTHORIZED"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Error",
        "description": "The error information",
        "example": {
          "code": "UNAUTHORIZED",
          "message": "Authorization not provided",
          "issues": []
        }
      },
      "error.FORBIDDEN": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Insufficient access"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "FORBIDDEN"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            },
            "description": "An array of issues that were responsible for the error",
            "example": []
          }
        },
        "required": [
          "message",
          "code"
        ],
        "title": "Error",
        "description": "The error information",
        "example": {
          "code": "FORBIDDEN",
          "message": "Insufficient access",
          "issues": []
        }
      }
    }
  }
}