{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-page-process-definition-schema.json",
  "title": "PageProcessDefinition",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-process-definitions-api-openapi.yml#/components/schemas/PageProcessDefinition",
  "type": "object",
  "properties": {
    "totalElements": {
      "type": "integer",
      "format": "int64"
    },
    "totalPages": {
      "type": "integer",
      "format": "int32"
    },
    "first": {
      "type": "boolean"
    },
    "sort": {
      "$ref": "#/$defs/SortObject"
    },
    "number": {
      "type": "integer",
      "format": "int32"
    },
    "last": {
      "type": "boolean"
    },
    "numberOfElements": {
      "type": "integer",
      "format": "int32"
    },
    "pageable": {
      "$ref": "#/$defs/PageableObject"
    },
    "size": {
      "type": "integer",
      "format": "int32"
    },
    "content": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProcessDefinition"
      }
    },
    "empty": {
      "type": "boolean"
    }
  },
  "$defs": {
    "Attributes": {
      "type": "object",
      "properties": {
        "searchable": {
          "type": "boolean"
        }
      }
    },
    "PageableObject": {
      "type": "object",
      "properties": {
        "sort": {
          "$ref": "#/$defs/SortObject"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32"
        },
        "pageNumber": {
          "type": "integer",
          "format": "int32"
        },
        "paged": {
          "type": "boolean"
        },
        "unpaged": {
          "type": "boolean"
        },
        "offset": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "ProcessDefinition": {
      "type": "object",
      "properties": {
        "createdDtm": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "lastUpdatedDtm": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "createdBy": {
          "type": "string",
          "readOnly": true
        },
        "lastUpdatedBy": {
          "type": "string",
          "readOnly": true
        },
        "id": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "maxLength": 50,
          "minLength": 0
        },
        "description": {
          "type": "string",
          "maxLength": 2000,
          "minLength": 0
        },
        "version": {
          "type": "integer",
          "format": "int32"
        },
        "serverType": {
          "type": "string",
          "enum": [
            "P1",
            "E1"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "EDITABLE",
            "DEPLOYED_INACTIVE",
            "DEPLOYED_ACTIVE",
            "RETIRED"
          ]
        },
        "attributes": {
          "$ref": "#/$defs/Attributes"
        },
        "processDefinitionType": {
          "type": "string",
          "enum": [
            "AUTHENTICATION",
            "VERIFICATION",
            "OTHER"
          ]
        },
        "resources": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/ProcessResource"
          }
        },
        "themeId": {
          "type": "string"
        },
        "retentionDays": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        }
      },
      "required": [
        "name",
        "serverType"
      ]
    },
    "ProcessResource": {
      "type": "object",
      "properties": {
        "sha256Hash": {
          "type": "string",
          "format": "byte"
        },
        "status": {
          "type": "string",
          "enum": [
            "PERSIST",
            "DELETE"
          ]
        },
        "data": {
          "type": "string",
          "format": "byte"
        },
        "type": {
          "type": "string",
          "enum": [
            "BPMN",
            "CONFIG"
          ]
        }
      },
      "required": [
        "data",
        "type"
      ]
    },
    "SortObject": {
      "type": "object",
      "properties": {
        "sorted": {
          "type": "boolean"
        },
        "unsorted": {
          "type": "boolean"
        },
        "empty": {
          "type": "boolean"
        }
      }
    }
  }
}