{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-authority-stats-dto-collection-schema.json",
  "title": "authorityStatsDtoCollection",
  "description": "Collection of authority changes statistic. Shared and local when consortium member; shared when consortium central",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mod-entities-links-openapi.yml#/components/schemas/authorityStatsDtoCollection",
  "properties": {
    "stats": {
      "description": "Authority changes statistic",
      "items": {
        "$ref": "#/$defs/authorityStatsDto"
      },
      "type": "array"
    },
    "next": {
      "description": "Next response item date to seek by",
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "authorityControlMetadata": {
      "description": "Meta data for authority control",
      "properties": {
        "startedAt": {
          "description": "Date-time when authority update was registered",
          "format": "date-time",
          "type": "string"
        },
        "startedByUserId": {
          "description": "User's ID that triggers record",
          "format": "uuid",
          "type": "string"
        },
        "startedByUserFirstName": {
          "description": "User's first name that triggers record",
          "type": "string"
        },
        "startedByUserLastName": {
          "description": "User's last name that triggers record",
          "type": "string"
        }
      },
      "type": "object"
    },
    "authorityStatsDto": {
      "description": "Describe changes to authority that are related to links",
      "properties": {
        "id": {
          "description": "Stat ID",
          "format": "uuid",
          "type": "string"
        },
        "authorityId": {
          "description": "Authority ID",
          "format": "uuid",
          "type": "string"
        },
        "action": {
          "$ref": "#/$defs/linkAction"
        },
        "naturalIdOld": {
          "description": "Old natural ID",
          "type": "string"
        },
        "naturalIdNew": {
          "description": "New natural ID",
          "type": "string"
        },
        "headingOld": {
          "description": "Old heading",
          "type": "string"
        },
        "headingNew": {
          "description": "New heading",
          "type": "string"
        },
        "headingTypeOld": {
          "description": "Old heading type",
          "type": "string"
        },
        "headingTypeNew": {
          "description": "New heading type",
          "type": "string"
        },
        "sourceFileOld": {
          "description": "Old source file ID",
          "type": "string"
        },
        "sourceFileNew": {
          "description": "New source file ID",
          "type": "string"
        },
        "metadata": {
          "$ref": "#/$defs/authorityControlMetadata"
        }
      },
      "type": "object"
    },
    "linkAction": {
      "description": "Type of change",
      "enum": [
        "DELETE",
        "UPDATE_NATURAL_ID",
        "UPDATE_HEADING"
      ],
      "type": "string"
    }
  }
}