{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/progress-software/json-schema/progress-software-paged-model-of-contact-model-schema.json",
  "title": "PagedModelOfContactModel",
  "description": "Represents paged response object with proper navigations",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/progress-software-contacts-api-openapi.yml#/components/schemas/PagedModelOfContactModel",
  "properties": {
    "items": {
      "description": "Items on the given page",
      "items": {
        "$ref": "#/$defs/ContactModel"
      },
      "readOnly": true,
      "type": "array"
    },
    "paging": {
      "$ref": "#/$defs/PagingInfoModel",
      "description": "Paging data for given response"
    },
    "sorting": {
      "description": "Sorting data for given response",
      "items": {
        "$ref": "#/$defs/SortFieldDto"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "ContactModel": {
      "description": "Represents basic contact data required for all scenarios",
      "properties": {
        "name": {
          "description": "Contact name.",
          "type": "string"
        },
        "email": {
          "description": "Contact email address.",
          "type": "string"
        },
        "identifier": {
          "description": "Contact ID.",
          "type": "string"
        },
        "type": {
          "description": "Contact type (user, group, unreg).",
          "type": "string",
          "enum": [
            "User",
            "Group",
            "Unreg",
            "Unverified"
          ]
        }
      },
      "type": "object"
    },
    "PagingInfoModel": {
      "description": "Information about paging for collection response",
      "properties": {
        "page": {
          "description": "Current page in collection",
          "type": "integer",
          "format": "int32"
        },
        "perPage": {
          "description": "Items per page",
          "type": "integer",
          "format": "int32"
        },
        "totalItems": {
          "description": "Total items in collection",
          "type": "integer",
          "format": "int64"
        },
        "totalPages": {
          "description": "Total number of pages in collection",
          "readOnly": true,
          "type": "integer",
          "format": "int32"
        }
      },
      "type": "object"
    },
    "SortFieldDto": {
      "properties": {
        "sortField": {
          "type": "string"
        },
        "sortDirection": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ]
        }
      },
      "type": "object"
    }
  }
}