{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/FlowVersionRes",
  "title": "FlowVersionRes",
  "type": "object",
  "properties": {
    "comment": {
      "type": "string",
      "description": "Publish note",
      "example": "This flow version has the Set-Variable activity"
    },
    "createdBy": {
      "type": "string",
      "description": "Email of the account which created the flow version",
      "example": "user@company.com"
    },
    "createdDate": {
      "type": "string",
      "description": "Date of creation of the version object",
      "example": "2024-02-07T14:10:50.663Z",
      "format": "date-time"
    },
    "description": {
      "type": "string",
      "description": "Description of the Flow Version",
      "example": "This flow version has the 'Live' tag"
    },
    "diagram": {
      "$ref": "#/components/schemas/DiagramRes"
    },
    "eventFlows": {
      "$ref": "#/components/schemas/EventDiagramRes"
    },
    "flowId": {
      "type": "string",
      "description": "Flow/Subflow ID to which the version belongs",
      "example": "661c7bc712eaf357de7e4aeb"
    },
    "flowType": {
      "type": "string",
      "description": "Flow Type (FLOW/SUBFLOW). Default value is FLOW",
      "example": "FLOW"
    },
    "id": {
      "type": "string",
      "description": "Version object ID",
      "example": "65c28d9db2a2375974066579"
    },
    "lastModifiedBy": {
      "type": "string",
      "description": "Email of the account which modified the flow version last",
      "example": "user@company.com"
    },
    "lastModifiedDate": {
      "type": "string",
      "description": "Date the version object is last modified",
      "example": "2024-02-07T14:10:50.663Z",
      "format": "date-time"
    },
    "name": {
      "type": "string",
      "description": "Name of the Flow Version",
      "example": "TestFlow"
    },
    "orgId": {
      "type": "string",
      "description": "Organization ID",
      "example": "8eb7da9a-c81c-4d13-b08b-38fdeb7330d8"
    },
    "persist": {
      "type": "boolean",
      "description": "Determines whether the version object needs to be persisted in the DB",
      "example": true
    },
    "process": {
      "$ref": "#/components/schemas/ProcRes"
    },
    "runtimeVariables": {
      "type": "array",
      "description": "Output variables of the activities configured in the flow",
      "example": [
        {
          "name": "NewPhoneContact.ANI",
          "type": "string",
          "path": "",
          "source": "Event",
          "activityName": "ANI",
          "displayName": "",
          "uiVisible": true,
          "description": ""
        }
      ],
      "items": {
        "$ref": "#/components/schemas/UiRuntimeVariableRes"
      }
    },
    "settings": {
      "type": "array",
      "description": "Settings for the flow version",
      "example": [
        {
          "name": "showActivityWait",
          "value": "true"
        },
        {
          "`type`": "BOOLEAN",
          "group": "activityWait"
        },
        {
          "name": "delayTime",
          "value": "2000"
        },
        {
          "`type`": "INTEGER",
          "group": "activityWait"
        }
      ],
      "items": {
        "$ref": "#/components/schemas/FlowVersionSettingRes"
      }
    },
    "validating": {
      "type": "boolean",
      "description": "Determines whether the version object needs to be validated",
      "example": false
    },
    "validationResults": {
      "type": "array",
      "description": "Validation errors are stored here",
      "items": {
        "$ref": "#/components/schemas/ValidationResultRes"
      }
    },
    "variableOrders": {
      "type": "object",
      "description": "Determines the order in which variables appear in the Agent's desktop",
      "additionalProperties": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/VariableOrderRes"
        }
      },
      "example": {
        "pop-over": [
          {
            "name": "ani",
            "variableSeq": "0"
          }
        ]
      }
    },
    "variables": {
      "type": "array",
      "description": "Variables in the version object",
      "items": {
        "$ref": "#/components/schemas/FlowVariablesRes"
      }
    },
    "version": {
      "type": "integer",
      "description": "Version Number",
      "format": "int32",
      "example": 1
    }
  }
}