{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/if/json-schema/if-user-list-platform-response-schema.json",
  "title": "UserListPlatformResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/if-users-api-openapi.yml#/components/schemas/UserListPlatformResponse",
  "required": [
    "connect",
    "data",
    "metadata",
    "workflow"
  ],
  "type": "object",
  "properties": {
    "workflow": {
      "$ref": "#/$defs/UserListPlatformWorkflowContainer"
    },
    "data": {
      "$ref": "#/$defs/UserListPlatformDataContainer"
    },
    "connect": {
      "$ref": "#/$defs/UserListConnectContainer"
    },
    "metadata": {
      "$ref": "#/$defs/UserListMetadataContainer"
    }
  },
  "$defs": {
    "Address": {
      "required": [
        "city",
        "country",
        "street"
      ],
      "type": "object",
      "properties": {
        "country": {
          "maxLength": 2,
          "minLength": 2,
          "pattern": "^[A-Z]{2}$",
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "street": {
          "type": "string"
        },
        "houseNumber": {
          "type": "string"
        },
        "refinement": {
          "type": "string"
        }
      }
    },
    "BankingUserProfile": {
      "type": "object",
      "properties": {
        "phone": {
          "type": "string"
        },
        "residentialAddress": {
          "$ref": "#/$defs/Address"
        }
      }
    },
    "BankingUserStatus": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "active",
        "inactive"
      ]
    },
    "LegalEntityIdentification": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/LegalEntityIdentificationType"
        },
        "identificationNumber": {
          "type": "string"
        },
        "issuingCountry": {
          "maxLength": 2,
          "minLength": 2,
          "pattern": "^[A-Z]{2}$",
          "type": "string"
        },
        "issueDate": {
          "type": "string",
          "format": "date"
        },
        "expirationDate": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "LegalEntityIdentificationType": {
      "type": "string",
      "enum": [
        "registration-number",
        "passport",
        "identity-card",
        "driving-licence",
        "foreign-identity-card",
        "tax-number"
      ]
    },
    "LegalEntityIdentityIndividual": {
      "required": [
        "familyName",
        "givenName"
      ],
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/LegalEntityType"
        },
        "country": {
          "maxLength": 2,
          "minLength": 2,
          "pattern": "^[A-Z]{2}$",
          "type": "string"
        },
        "identifications": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LegalEntityIdentification"
          }
        },
        "givenName": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        },
        "birthDate": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "LegalEntityType": {
      "type": "string",
      "enum": [
        "corporate",
        "individual"
      ]
    },
    "PageMetadata": {
      "required": [
        "number",
        "size",
        "totalElements",
        "totalPages"
      ],
      "type": "object",
      "properties": {
        "size": {
          "minimum": 0,
          "type": "integer",
          "description": "number of elements in this page",
          "format": "int32"
        },
        "number": {
          "minimum": 0,
          "type": "integer",
          "description": "index of page starting from 0",
          "format": "int32"
        },
        "totalElements": {
          "minimum": 0,
          "type": "integer",
          "description": "total number of elements in all of the pages",
          "format": "int64",
          "readOnly": true
        },
        "totalPages": {
          "minimum": 0,
          "type": "integer",
          "description": "number of total pages",
          "format": "int32",
          "readOnly": true
        }
      }
    },
    "User": {
      "required": [
        "category",
        "email",
        "identity",
        "type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "email": {
          "type": "string"
        },
        "givenName": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        },
        "identity": {
          "$ref": "#/$defs/LegalEntityIdentityIndividual"
        },
        "category": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "external"
          ]
        },
        "type": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "human"
          ]
        },
        "profile": {
          "$ref": "#/$defs/BankingUserProfile"
        },
        "status": {
          "$ref": "#/$defs/BankingUserStatus"
        }
      },
      "readOnly": true
    },
    "UserCategory": {
      "type": "string",
      "enum": [
        "internal",
        "external"
      ]
    },
    "UserListConnectContainer": {
      "type": "object"
    },
    "UserListMetadataContainer": {
      "required": [
        "page"
      ],
      "type": "object",
      "properties": {
        "page": {
          "$ref": "#/$defs/PageMetadata"
        }
      }
    },
    "UserListPlatformDataContainer": {
      "type": "object",
      "properties": {
        "user": {
          "$ref": "#/$defs/UserListPlatformQueryInput"
        },
        "users": {
          "type": "array",
          "readOnly": true,
          "items": {
            "$ref": "#/$defs/User"
          }
        }
      }
    },
    "UserListPlatformQueryInput": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "email": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "userCategory": {
          "$ref": "#/$defs/UserCategory"
        },
        "category": {
          "$ref": "#/$defs/UserCategory"
        }
      },
      "writeOnly": true
    },
    "UserListPlatformWorkflowContainer": {
      "type": "object"
    }
  }
}