{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-browsing-destination-view-schema.json",
  "title": "BrowsingDestinationView",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-users-api-openapi.yml#/components/schemas/BrowsingDestinationView",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "destination"
  ],
  "properties": {
    "version": {
      "type": "integer",
      "format": "int64",
      "minimum": 1,
      "maximum": 9223372036854775807
    },
    "destination": {
      "$ref": "#/$defs/BrowsingDestination"
    }
  },
  "$defs": {
    "BrowsingDestination": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "NONE"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "kind",
            "addressId"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "ADDRESS"
              ]
            },
            "addressId": {
              "$ref": "#/$defs/UserAddressId"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "kind",
            "country"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "COUNTRY_POSTAL"
              ]
            },
            "country": {
              "type": "string",
              "pattern": "^[A-Z]{2}$",
              "description": "Current ISO alpha-2 assertion; never inferred from language/currency/IP."
            },
            "postalCode": {
              "type": [
                "string",
                "null"
              ],
              "minLength": 1,
              "maxLength": 64,
              "description": "Optional verbatim postal assertion, at most 64 UTF-8 bytes."
            }
          }
        }
      ],
      "description": "Exclusive browsing selector. An ADDRESS reference must belong to the current user. No shipping, billing or residence assertion."
    },
    "UserAddressId": {
      "type": "string",
      "pattern": "^uaddr_[0-7][0-9a-hjkmnp-tv-z]{25}$",
      "description": "Strict server-generated UUIDv7 UserAddress TypeID, returned on creation. No bare UUID or owner input."
    }
  }
}