{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-monitoring-workflow-response-schema.json",
  "title": "MonitoringWorkflowResponse",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-monitoringworkflow-api-openapi.yml#/components/schemas/MonitoringWorkflowResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "tenantPractitionerId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "certifyPractitionerId": {
      "type": "string"
    },
    "data": {
      "$ref": "#/$defs/JsonNode"
    },
    "createdAt": {
      "$ref": "#/$defs/Date"
    },
    "createdBy": {
      "type": "string"
    },
    "updatedAt": {
      "$ref": "#/$defs/Date"
    },
    "updatedBy": {
      "type": "string"
    },
    "newFlags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FlagWithTypeResponse"
      }
    },
    "allFlags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FlagWithTypeResponse"
      }
    },
    "flagsWithHistory": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FlagWithHistoryResponse"
      }
    },
    "otherWorkflows": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Date": {
      "type": "string",
      "format": "date"
    },
    "FlagHistoryAttachmentResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "flagHistoryId": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/JsonNode"
        },
        "createdAt": {
          "$ref": "#/$defs/Date"
        },
        "createdBy": {
          "type": "string"
        }
      }
    },
    "FlagHistoryWithAttachmentsResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "flagId": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/JsonNode"
        },
        "createdAt": {
          "$ref": "#/$defs/Date"
        },
        "createdBy": {
          "type": "string"
        },
        "attachments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FlagHistoryAttachmentResponse"
          }
        }
      }
    },
    "FlagTypeResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "flagType": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "FlagWithHistoryResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "tenantProviderId": {
          "type": "string"
        },
        "flagTypeId": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/JsonNode"
        },
        "createdAt": {
          "$ref": "#/$defs/Date"
        },
        "createdBy": {
          "type": "string"
        },
        "updatedAt": {
          "$ref": "#/$defs/Date"
        },
        "updatedBy": {
          "type": "string"
        },
        "originMonitoringWorkflowId": {
          "type": "string"
        },
        "hash": {
          "type": "string"
        },
        "flagType": {
          "$ref": "#/$defs/FlagTypeResponse"
        },
        "histories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FlagHistoryWithAttachmentsResponse"
          }
        }
      }
    },
    "FlagWithTypeResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "tenantProviderId": {
          "type": "string"
        },
        "flagTypeId": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/JsonNode"
        },
        "createdAt": {
          "$ref": "#/$defs/Date"
        },
        "createdBy": {
          "type": "string"
        },
        "updatedAt": {
          "$ref": "#/$defs/Date"
        },
        "updatedBy": {
          "type": "string"
        },
        "originMonitoringWorkflowId": {
          "type": "string"
        },
        "hash": {
          "type": "string"
        },
        "flagType": {
          "$ref": "#/$defs/FlagTypeResponse"
        }
      }
    },
    "JsonNode": {
      "type": "object",
      "properties": {
        "empty": {
          "type": "boolean"
        },
        "valueNode": {
          "type": "boolean"
        },
        "containerNode": {
          "type": "boolean"
        },
        "missingNode": {
          "type": "boolean"
        },
        "array": {
          "type": "boolean"
        },
        "object": {
          "type": "boolean"
        },
        "nodeType": {
          "$ref": "#/$defs/JsonNodeType"
        },
        "pojo": {
          "type": "boolean"
        },
        "number": {
          "type": "boolean"
        },
        "integralNumber": {
          "type": "boolean"
        },
        "floatingPointNumber": {
          "type": "boolean"
        },
        "short": {
          "type": "boolean"
        },
        "int": {
          "type": "boolean"
        },
        "long": {
          "type": "boolean"
        },
        "float": {
          "type": "boolean"
        },
        "double": {
          "type": "boolean"
        },
        "bigDecimal": {
          "type": "boolean"
        },
        "bigInteger": {
          "type": "boolean"
        },
        "textual": {
          "type": "boolean"
        },
        "boolean": {
          "type": "boolean"
        },
        "null": {
          "type": "boolean"
        },
        "binary": {
          "type": "boolean"
        }
      }
    },
    "JsonNodeType": {
      "type": "string",
      "enum": [
        "ARRAY",
        "BINARY",
        "BOOLEAN",
        "MISSING",
        "NULL",
        "NUMBER",
        "OBJECT",
        "POJO",
        "STRING"
      ]
    }
  }
}