{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bynder/json-schema/bynder-list-automation-workflow-rules-response-schema.json",
  "title": "ListAutomationWorkflowRulesResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bynder-automation-workflow-rules-api-openapi.yml#/components/schemas/ListAutomationWorkflowRulesResponse",
  "type": "object",
  "required": [
    "metadata"
  ],
  "properties": {
    "rules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AutomationWorkflowResponse"
      }
    },
    "metadata": {
      "$ref": "#/$defs/MetadataOutput"
    }
  },
  "$defs": {
    "AndCondition": {
      "title": "AndCondition",
      "type": "object",
      "properties": {
        "AND": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LeafCondition"
          }
        }
      }
    },
    "AutomationWorkflowResponse": {
      "title": "AutomationWorkflowResponse",
      "type": "object",
      "required": [
        "id",
        "status",
        "name",
        "createdById",
        "dateCreated"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "createdById": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        },
        "triggers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "steps": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AutomationWorkflowStep"
          }
        }
      }
    },
    "AutomationWorkflowStep": {
      "title": "AutomationWorkflowStep",
      "type": "object",
      "properties": {
        "step_triggers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "actions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AutomationWorkflowStepActionBase"
          }
        },
        "conditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AndCondition"
          }
        }
      }
    },
    "AutomationWorkflowStepActionAgent": {
      "title": "AutomationWorkflowStepActionAgent",
      "type": "object",
      "required": [
        "action_type",
        "data"
      ],
      "properties": {
        "action_type": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/StepActionAgentData"
        }
      }
    },
    "AutomationWorkflowStepActionBase": {
      "title": "AutomationWorkflowStepActionBase",
      "oneOf": [
        {
          "$ref": "#/$defs/AutomationWorkflowStepActionAgent"
        }
      ]
    },
    "ExpressionCondition": {
      "title": "ExpressionCondition",
      "type": "object",
      "required": [
        "operator"
      ],
      "properties": {
        "term": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "operator": {
          "type": "string"
        }
      }
    },
    "LeafCondition": {
      "title": "LeafCondition",
      "type": "object",
      "required": [
        "condition_type",
        "expression"
      ],
      "properties": {
        "condition_type": {
          "type": "string"
        },
        "expression": {
          "$ref": "#/$defs/ExpressionCondition"
        }
      }
    },
    "MetadataOutput": {
      "title": "MetadataOutput",
      "type": "object",
      "properties": {
        "previousPage": {
          "type": "string"
        },
        "nextPage": {
          "type": "string"
        }
      }
    },
    "StepActionAgentData": {
      "title": "StepActionAgentData",
      "type": "object",
      "required": [
        "agentId"
      ],
      "properties": {
        "agentId": {
          "type": "string"
        }
      }
    }
  }
}