{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/folio/json-schema/folio-internal-contact-results-schema.json",
  "title": "InternalContactResults",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-contacts-api-openapi.yml#/components/schemas/InternalContactResults",
  "type": "object",
  "required": [
    "results"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/ResultsMeta"
    },
    {
      "type": "object"
    },
    {
      "properties": {
        "results": {
          "$ref": "#/$defs/InternalContactResultsArray"
        }
      }
    }
  ],
  "$defs": {
    "InternalContact": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true
        },
        "owner": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            }
          },
          "readOnly": true,
          "description": "License that owns the contact"
        },
        "user": {
          "type": "string",
          "format": "uuid"
        },
        "role": {
          "description": "The contact's role in relation to the license",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/$defs/RefData"
            }
          ]
        }
      }
    },
    "InternalContactResultsArray": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InternalContact"
      }
    },
    "RefData": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true
        },
        "label": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "owner": {
          "$ref": "#/$defs/RefDataCategory"
        }
      }
    },
    "RefDataCategory": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "desc": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "readOnly": true
        },
        "internal": {
          "type": "boolean"
        },
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RefData"
          }
        }
      }
    },
    "ResultsMeta": {
      "type": "object",
      "properties": {
        "meta": {
          "type": "object"
        },
        "page": {
          "type": "integer"
        },
        "pageSize": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        },
        "totalPages": {
          "type": "integer"
        },
        "totalRecords": {
          "type": "integer"
        }
      }
    }
  }
}