{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract": {
      "type": "string",
      "const": "WorkflowDefinition"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "version": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "name": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
              },
              "additionalProperties": {
                "type": "string",
                "minLength": 1
              }
            }
          ]
        },
        "description": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
              },
              "additionalProperties": {
                "type": "string",
                "minLength": 1
              }
            }
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "workflow",
            "template"
          ]
        },
        "teamId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "creatorRef": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "version": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            },
            "ownerRepo": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        "tags": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        }
      },
      "required": [
        "id",
        "version",
        "name",
        "role",
        "teamId",
        "creatorRef",
        "tags"
      ],
      "additionalProperties": false
    },
    "revision": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "release",
            "backup"
          ]
        },
        "recordVersion": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "sourceVersion": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "kind",
        "recordVersion"
      ],
      "additionalProperties": false
    },
    "presentation": {
      "type": "object",
      "properties": {
        "iconUrl": {
          "type": "string"
        },
        "thumbnail": {
          "type": "string"
        },
        "canvas": {
          "type": "object",
          "properties": {
            "engine": {
              "type": "string",
              "const": "excalidraw"
            },
            "schemaVersion": {
              "type": "number",
              "const": 1
            },
            "elements": {
              "maxItems": 20000,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "rectangle",
                      "diamond",
                      "ellipse",
                      "text",
                      "arrow",
                      "line",
                      "freedraw",
                      "image",
                      "frame",
                      "magicframe",
                      "embeddable",
                      "iframe"
                    ]
                  },
                  "x": {
                    "type": "number"
                  },
                  "y": {
                    "type": "number"
                  },
                  "width": {
                    "type": "number",
                    "minimum": 0
                  },
                  "height": {
                    "type": "number",
                    "minimum": 0
                  },
                  "customData": {
                    "type": "object",
                    "properties": {
                      "workflow": {
                        "type": "object",
                        "properties": {
                          "nodeRef": {
                            "type": "string",
                            "minLength": 1
                          },
                          "edgeRef": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "type",
                  "x",
                  "y",
                  "width",
                  "height"
                ],
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              }
            },
            "files": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string",
                    "pattern": "^file:\\/\\/[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
                  },
                  "mimeType": {
                    "type": "string",
                    "enum": [
                      "image/png",
                      "image/jpeg",
                      "image/webp",
                      "image/gif",
                      "image/svg+xml"
                    ]
                  },
                  "created": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "reference",
                  "mimeType",
                  "created"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "engine",
            "schemaVersion",
            "elements",
            "files"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "ports": {
      "type": "object",
      "properties": {
        "inputs": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "schemaRef": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "required": {
                "default": false,
                "type": "boolean"
              },
              "multiple": {
                "default": false,
                "type": "boolean"
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "schemaRef",
              "required",
              "multiple"
            ],
            "additionalProperties": false
          }
        },
        "outputs": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "schemaRef": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "required": {
                "default": false,
                "type": "boolean"
              },
              "multiple": {
                "default": false,
                "type": "boolean"
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "schemaRef",
              "required",
              "multiple"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "inputs",
        "outputs"
      ],
      "additionalProperties": false
    },
    "parameters": {
      "type": "object",
      "properties": {
        "variables": {
          "default": [],
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        "outputs": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "key",
              "value"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "variables",
        "outputs"
      ],
      "additionalProperties": false
    },
    "graph": {
      "type": "object",
      "properties": {
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "referenceName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "capabilityRef": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "capabilityVersion": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "inputBindings": {
                "default": {},
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "configuration": {
                "type": "object",
                "properties": {
                  "executor": {
                    "type": "string",
                    "const": "conductor"
                  },
                  "task": {
                    "$ref": "#/$defs/__schema2"
                  }
                },
                "required": [
                  "executor",
                  "task"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "referenceName",
              "capabilityRef",
              "inputBindings",
              "configuration"
            ],
            "additionalProperties": false
          }
        },
        "edges": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "to": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "outputPort": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "inputPort": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "condition": {
                "type": "string"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "nodes",
        "edges"
      ],
      "additionalProperties": false
    },
    "execution": {
      "type": "object",
      "properties": {
        "timeoutMs": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "retries": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "concurrencyLimit": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "idempotency": {
          "type": "string",
          "enum": [
            "required",
            "supported",
            "none"
          ]
        },
        "rateLimit": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "windowMs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "enabled",
            "max",
            "windowMs"
          ],
          "additionalProperties": false
        },
        "conductor": {
          "type": "object",
          "properties": {
            "ownerApp": {
              "type": "string"
            },
            "createTime": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "updateTime": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "createdBy": {
              "type": "string"
            },
            "updatedBy": {
              "type": "string"
            },
            "failureWorkflow": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "schemaVersion": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "restartable": {
              "type": "boolean"
            },
            "workflowStatusListenerEnabled": {
              "type": "boolean"
            },
            "ownerEmail": {
              "type": "string",
              "format": "email",
              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            "timeoutPolicy": {
              "type": "string",
              "enum": [
                "TIME_OUT_WF",
                "ALERT_ONLY"
              ]
            },
            "variables": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "inputTemplate": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "retries",
        "idempotency",
        "conductor"
      ],
      "additionalProperties": false
    },
    "triggers": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "type": {
            "type": "string",
            "enum": [
              "manual",
              "schedule",
              "webhook",
              "event",
              "api"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "schedule": {
            "type": "object",
            "properties": {
              "cron": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "cron"
            ],
            "additionalProperties": false
          },
          "webhook": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1
              },
              "method": {
                "type": "string",
                "enum": [
                  "GET",
                  "POST",
                  "PUT",
                  "PATCH",
                  "DELETE",
                  "OPTIONS",
                  "HEAD"
                ]
              },
              "auth": {
                "type": "string",
                "enum": [
                  "NONE",
                  "BASIC",
                  "CUSTOM_HEADER"
                ]
              },
              "basicAuth": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  }
                },
                "required": [
                  "username",
                  "password"
                ],
                "additionalProperties": false
              },
              "headerAuth": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "value"
                ],
                "additionalProperties": false
              },
              "responseUntil": {
                "type": "string",
                "enum": [
                  "WORKFLOW_STARTED",
                  "WORKFLOW_COMPLETED_OR_FINISHED"
                ]
              }
            },
            "required": [
              "method",
              "auth",
              "responseUntil"
            ],
            "additionalProperties": false
          },
          "event": {
            "type": "object",
            "properties": {
              "eventType": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "configuration": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "required": [
              "eventType"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "type",
          "enabled"
        ],
        "additionalProperties": false
      }
    },
    "views": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "pageRef": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "placement": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "pageRef"
        ],
        "additionalProperties": false
      }
    },
    "dataContracts": {
      "type": "object",
      "properties": {
        "reads": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "writes": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "emits": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        }
      },
      "required": [
        "reads",
        "writes",
        "emits"
      ],
      "additionalProperties": false
    },
    "governance": {
      "type": "object",
      "properties": {
        "activated": {
          "type": "boolean"
        },
        "validated": {
          "type": "boolean"
        },
        "validationIssues": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "taskReferenceName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "issueType": {
                "type": "string",
                "enum": [
                  "ERROR",
                  "WARNING"
                ]
              },
              "detailReason": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "detailInformation": {
                    "$ref": "#/$defs/__schema0"
                  }
                },
                "required": [
                  "type",
                  "name"
                ],
                "additionalProperties": false
              },
              "humanMessage": {
                "type": "object",
                "properties": {
                  "en": {
                    "type": "string"
                  },
                  "zh": {
                    "type": "string"
                  }
                },
                "required": [
                  "en",
                  "zh"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "taskReferenceName",
              "issueType",
              "detailReason",
              "humanMessage"
            ],
            "additionalProperties": false
          }
        },
        "hidden": {
          "type": "boolean"
        }
      },
      "required": [
        "activated",
        "validated",
        "validationIssues"
      ],
      "additionalProperties": false
    },
    "interfaces": {
      "type": "object",
      "properties": {
        "openai": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "modelName": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "enabled"
          ],
          "additionalProperties": false
        },
        "shortcutRef": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "version": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "string",
                  "minLength": 1
                }
              ]
            },
            "ownerRepo": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        "preferredAppId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        }
      },
      "required": [
        "openai"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "contract",
    "metadata",
    "revision",
    "presentation",
    "ports",
    "parameters",
    "graph",
    "execution",
    "triggers",
    "views",
    "dataContracts",
    "governance",
    "interfaces"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "displayName": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
              },
              "additionalProperties": {
                "type": "string",
                "minLength": 1
              }
            }
          ]
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "type": {
          "type": "string",
          "enum": [
            "string",
            "file",
            "number",
            "boolean",
            "options",
            "json",
            "notice",
            "canvas-assist"
          ]
        },
        "typeOptions": {
          "type": "object",
          "properties": {
            "editor": {
              "type": "string",
              "enum": [
                "code",
                "codeNodeEditor",
                "htmlEditor",
                "sqlEditor",
                "json"
              ]
            },
            "editorLanguage": {
              "type": "string",
              "enum": [
                "javaScript",
                "json",
                "python",
                "sql"
              ]
            },
            "maxValue": {
              "type": "number"
            },
            "minValue": {
              "type": "number"
            },
            "max": {
              "type": "number"
            },
            "min": {
              "type": "number"
            },
            "multipleValues": {
              "type": "boolean"
            },
            "numberPrecision": {
              "type": "number",
              "minimum": 0
            },
            "password": {
              "type": "boolean"
            },
            "rows": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "assetType": {
              "type": "string"
            },
            "accept": {
              "type": "string"
            },
            "maxSize": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "fileType": {
              "type": "string"
            },
            "aiMultiShotMainImageField": {
              "type": "string"
            },
            "aiMultiShotWorkflowAppId": {
              "type": "string"
            },
            "aiMultiShotWorkflowId": {
              "type": "string"
            },
            "allowCustomInput": {
              "type": "boolean"
            },
            "allowUploadVideo": {
              "type": "boolean"
            },
            "aspectRatioField": {
              "type": "string"
            },
            "assemblyValueType": {
              "type": "string"
            },
            "autoAnalyzeDesignImage": {
              "type": "boolean"
            },
            "autoDetectAspectRatio": {
              "type": "boolean"
            },
            "autoIncrementId": {
              "type": "boolean"
            },
            "comfyOptions": {
              "type": "object",
              "properties": {
                "node": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                },
                "key": {
                  "type": "string"
                }
              },
              "required": [
                "node"
              ],
              "additionalProperties": false
            },
            "comfyuiModelServerId": {
              "type": "string"
            },
            "comfyuiModelTypeName": {
              "type": "string"
            },
            "defaultCustomInput": {
              "$ref": "#/$defs/__schema0"
            },
            "descriptionAlert": {
              "type": "boolean"
            },
            "disabled": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "object",
                  "properties": {
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "is",
                              "isNot",
                              "isGreaterThan",
                              "isLessThan",
                              "isGreaterThanOrEqual",
                              "isLessThanOrEqual",
                              "in",
                              "notIn"
                            ]
                          },
                          "value": {
                            "$ref": "#/$defs/__schema0"
                          }
                        },
                        "required": [
                          "field",
                          "operator",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "logic": {
                      "type": "string",
                      "enum": [
                        "AND",
                        "OR"
                      ]
                    }
                  },
                  "required": [
                    "conditions"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "editable": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "object",
                  "properties": {
                    "conditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "is",
                              "isNot",
                              "isGreaterThan",
                              "isLessThan",
                              "isGreaterThanOrEqual",
                              "isLessThanOrEqual",
                              "in",
                              "notIn"
                            ]
                          },
                          "value": {
                            "$ref": "#/$defs/__schema0"
                          }
                        },
                        "required": [
                          "field",
                          "operator",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "logic": {
                      "type": "string",
                      "enum": [
                        "AND",
                        "OR"
                      ]
                    }
                  },
                  "required": [
                    "conditions"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "enableAiMultiShot": {
              "type": "boolean"
            },
            "enableBooleanSwitchMode": {
              "type": "boolean"
            },
            "enableClear": {
              "type": "boolean"
            },
            "enableExpand": {
              "type": "boolean"
            },
            "enableImageCrop": {
              "type": "boolean"
            },
            "enableImageMask": {
              "type": "boolean"
            },
            "enableImageOverlay": {
              "type": "boolean"
            },
            "enablePopupEditor": {
              "type": "boolean"
            },
            "enablePromptFontSize": {
              "type": "boolean"
            },
            "enableReset": {
              "type": "boolean"
            },
            "enableSelectItemIcon": {
              "type": "boolean"
            },
            "enableSelectList": {
              "type": "boolean"
            },
            "enableSelectSearch": {
              "type": "boolean"
            },
            "enableSliderEnterMode": {
              "type": "boolean"
            },
            "enableVoice": {
              "type": "boolean"
            },
            "expandButtonText": {
              "type": "string"
            },
            "foldUp": {
              "type": "boolean"
            },
            "hidden": {
              "type": "boolean"
            },
            "hideRequiredDot": {
              "type": "boolean"
            },
            "inlineTitleWithSelect": {
              "type": "boolean"
            },
            "knowledgeGraphButtonText": {
              "type": "string"
            },
            "identifyAttributeCount": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "object",
                  "properties": {
                    "min": {
                      "type": "number",
                      "minimum": 0
                    },
                    "max": {
                      "type": "number",
                      "minimum": 0
                    }
                  },
                  "additionalProperties": false
                }
              ]
            },
            "identifyAttributes": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "identifyMaxVariants": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "identifySourceField": {
              "type": "string"
            },
            "imageOverlayBaseField": {
              "type": "string"
            },
            "imageOverlayOverlayField": {
              "type": "string"
            },
            "imageSelectMappingAppearance": {
              "type": "object",
              "properties": {
                "columns": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 4
                },
                "cardSize": {
                  "type": "string",
                  "enum": [
                    "sm",
                    "md",
                    "lg"
                  ]
                },
                "imageAspectRatio": {
                  "type": "string",
                  "enum": [
                    "square",
                    "4:5",
                    "3:4",
                    "16:9"
                  ]
                },
                "gap": {
                  "type": "string",
                  "enum": [
                    "sm",
                    "md",
                    "lg"
                  ]
                },
                "radius": {
                  "type": "string",
                  "enum": [
                    "sm",
                    "md",
                    "lg",
                    "xl"
                  ]
                },
                "borderStyle": {
                  "type": "string",
                  "enum": [
                    "none",
                    "soft",
                    "strong"
                  ]
                },
                "borderWidth": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 0
                    },
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    }
                  ]
                },
                "enableScroll": {
                  "type": "boolean"
                },
                "maxHeight": {
                  "type": "integer",
                  "minimum": 160,
                  "maximum": 1200
                },
                "enableCollapse": {
                  "type": "boolean"
                },
                "visibleRows": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 6
                },
                "hideLabel": {
                  "type": "boolean"
                },
                "hideDescription": {
                  "type": "boolean"
                },
                "hideValue": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            },
            "imageSelectMappingColumns": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            },
            "imageSelectMappingEnableCustomUpload": {
              "type": "boolean"
            },
            "imageSelectMappingHideLabel": {
              "type": "boolean"
            },
            "imageSelectMappingHideLink": {
              "type": "boolean"
            },
            "imageSelectMappingHideMeta": {
              "type": "boolean"
            },
            "imageSelectMappingInlineUseLargeUploadBox": {
              "type": "boolean"
            },
            "imageSelectMappingPromptField": {
              "type": "string"
            },
            "imageSelectMappingTabOrder": {
              "type": "string",
              "enum": [
                "template-first",
                "upload-first"
              ]
            },
            "imageSelectMappingTabWidthMode": {
              "type": "string",
              "enum": [
                "content",
                "fill"
              ]
            },
            "imageSelectMappingTemplatePrompt": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              ]
            },
            "imageSelectMappingTemplateTabTitle": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              ]
            },
            "imageSelectMappingUploadMode": {
              "type": "string",
              "enum": [
                "tabs",
                "inline"
              ]
            },
            "imageSelectMappingUploadPrompt": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              ]
            },
            "imageSelectMappingUploadTabTitle": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              ]
            },
            "endpoints": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "examples": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "extraData": {
              "$ref": "#/$defs/__schema0"
            },
            "layer": {
              "$ref": "#/$defs/__schema0"
            },
            "map": {
              "$ref": "#/$defs/__schema0"
            },
            "multiline": {
              "type": "boolean"
            },
            "options": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "originalFiles": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "placeholder": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              ]
            },
            "preserveSelectListOrder": {
              "type": "boolean"
            },
            "promptDictionary": {
              "$ref": "#/$defs/__schema0"
            },
            "promptFontSize": {
              "type": "number"
            },
            "promptModeToggle": {
              "$ref": "#/$defs/__schema0"
            },
            "requireActiveSelectFilter": {
              "type": "boolean"
            },
            "restoreDefaultOnEmptyEnter": {
              "type": "boolean"
            },
            "search": {
              "type": "boolean"
            },
            "selectButtonEnableCollapse": {
              "type": "boolean"
            },
            "selectButtonVisibleRows": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "selectList": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "selectListDisplayMode": {
              "type": "string"
            },
            "selectPromptField": {
              "type": "string"
            },
            "showAddLocalFileButton": {
              "type": "boolean"
            },
            "singleColumn": {
              "type": "boolean"
            },
            "singleFrameForMultiple": {
              "type": "boolean"
            },
            "textSingleLine": {
              "type": "boolean"
            },
            "textareaMiniHeight": {
              "type": "number",
              "minimum": 0
            },
            "tips": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              ]
            },
            "visibility": {
              "$ref": "#/$defs/__schema0"
            },
            "voiceButtonText": {
              "type": "string"
            },
            "designAnalysisFields": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "designAnalysisFillStrategy": {
              "type": "string"
            },
            "designAnalysisMaxFields": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "designAnalysisType": {
              "type": "string"
            },
            "designAnalysisFieldPrefix": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "default": {
          "$ref": "#/$defs/__schema0"
        },
        "description": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
              },
              "additionalProperties": {
                "type": "string",
                "minLength": 1
              }
            }
          ]
        },
        "hint": {
          "type": "string"
        },
        "displayOptions": {
          "type": "object",
          "properties": {
            "hide": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              }
            },
            "show": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              }
            }
          },
          "additionalProperties": false
        },
        "options": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    ]
                  },
                  "value": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  },
                  "action": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "value"
                ],
                "additionalProperties": false
              },
              {
                "$ref": "#/$defs/__schema1"
              },
              {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "values": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema1"
                    }
                  }
                },
                "required": [
                  "displayName",
                  "name",
                  "values"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "placeholder": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
              },
              "additionalProperties": {
                "type": "string",
                "minLength": 1
              }
            }
          ]
        },
        "isNodeSetting": {
          "type": "boolean"
        },
        "noDataExpression": {
          "type": "boolean"
        },
        "required": {
          "type": "boolean"
        },
        "example": {
          "type": "string"
        },
        "extractValue": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "regex"
            },
            "regex": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "regex"
          ],
          "additionalProperties": false
        },
        "properties": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        "assetType": {
          "type": "string"
        },
        "flag": {
          "type": "boolean"
        },
        "enableExpand": {
          "type": "boolean"
        },
        "enableVoice": {
          "type": "boolean"
        },
        "expandButtonText": {
          "type": "string"
        },
        "knowledgeGraphButtonText": {
          "type": "string"
        },
        "selectListDisplayMode": {
          "type": "string"
        },
        "voiceButtonText": {
          "type": "string"
        }
      },
      "required": [
        "displayName",
        "name",
        "type"
      ],
      "additionalProperties": false
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "taskReferenceName": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "type": {
          "type": "string",
          "enum": [
            "SIMPLE",
            "DYNAMIC",
            "FORK_JOIN",
            "FORK_JOIN_DYNAMIC",
            "DECISION",
            "SWITCH",
            "JOIN",
            "DO_WHILE",
            "SUB_WORKFLOW",
            "START_WORKFLOW",
            "EVENT",
            "WAIT",
            "HUMAN",
            "USER_DEFINED",
            "HTTP",
            "LAMBDA",
            "INLINE",
            "EXCLUSIVE_JOIN",
            "TERMINATE",
            "KAFKA_PUBLISH",
            "JSON_JQ_TRANSFORM",
            "SET_VARIABLE",
            "CALL_MCP_TOOL",
            "GENERATE_AUDIO",
            "GENERATE_IMAGE",
            "GENERATE_PDF",
            "GENERATE_VIDEO",
            "LIST_MCP_TOOLS",
            "LLM_CHAT_COMPLETE",
            "LLM_GENERATE_EMBEDDINGS",
            "LLM_INDEX_TEXT",
            "LLM_SEARCH_INDEX",
            "TITUS",
            "USER_TASK"
          ]
        },
        "inputParameters": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "startDelay": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "optional": {
          "type": "boolean"
        },
        "asyncComplete": {
          "type": "boolean"
        },
        "rateLimited": {
          "type": "boolean"
        },
        "retryCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "taskDefinition": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "loopCondition": {
          "type": "string"
        },
        "loopOver": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema2"
          }
        },
        "sink": {
          "type": "string"
        },
        "forkTasks": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema2"
            }
          }
        },
        "joinOn": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "defaultExclusiveJoinTask": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "dynamicForkTasksParam": {
          "type": "string"
        },
        "dynamicForkTasksInputParamName": {
          "type": "string"
        },
        "subWorkflowParam": {
          "type": "object",
          "properties": {
            "$ref": {
              "type": "string"
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "version": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "taskToDomain": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            "workflowDefinition": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              }
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "decisionCases": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema2"
            }
          }
        },
        "defaultCase": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema2"
          }
        },
        "evaluatorType": {
          "type": "string",
          "enum": [
            "value-param",
            "javascript",
            "graaljs"
          ]
        },
        "expression": {
          "type": "string"
        },
        "__alias": {
          "$ref": "#/$defs/__schema0"
        },
        "callbackFromWorker": {
          "type": "boolean"
        },
        "caseExpression": {
          "$ref": "#/$defs/__schema0"
        },
        "caseValueParam": {
          "type": "string"
        },
        "dependencies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "description": {
          "type": "string"
        },
        "dynamicTaskNameParam": {
          "type": "string"
        },
        "joinMode": {
          "type": "string"
        },
        "permissive": {
          "type": "boolean"
        },
        "joinTaskRef": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "forkTaskRef": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        }
      },
      "required": [
        "name",
        "taskReferenceName",
        "type"
      ],
      "additionalProperties": false
    }
  },
  "$id": "https://schemas.infmonkeys.com/contracts/workflow-definition.schema.json",
  "title": "workflow-definition"
}
