{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yondry-app/json-schema/yondry-app-user-response-schema.json",
  "title": "UserResponse",
  "description": "Full user profile response.\n\nExposes both the new field names introduced in the home-settings feature\n(home_lng, home_address, default_radius_km, radius_unit) AND the legacy\nnames (home_lon, home_label, travel_radius_km) so existing clients and\ntests are not broken.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yondry-app-openapi.json#/components/schemas/UserResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "email": {
      "type": "string",
      "format": "email",
      "title": "Email"
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active"
    },
    "is_verified": {
      "type": "boolean",
      "title": "Is Verified"
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Display Name"
    },
    "avatar_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Avatar Url"
    },
    "auth_provider": {
      "type": "string",
      "title": "Auth Provider",
      "default": "email"
    },
    "onboarding_completed": {
      "type": "boolean",
      "title": "Onboarding Completed",
      "default": false
    },
    "home_lat": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Home Lat"
    },
    "home_lng": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Home Lng"
    },
    "home_address": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Home Address"
    },
    "home_place_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Home Place Id"
    },
    "default_radius_km": {
      "type": "number",
      "title": "Default Radius Km",
      "default": 50.0
    },
    "radius_unit": {
      "type": "string",
      "title": "Radius Unit",
      "default": "km"
    },
    "home_lon": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Home Lon"
    },
    "home_label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Home Label"
    },
    "travel_radius_km": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Travel Radius Km"
    },
    "transport_modes": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Transport Modes"
    },
    "primary_transport_mode": {
      "type": "string",
      "title": "Primary Transport Mode",
      "default": "driving"
    },
    "location_history_opt_in": {
      "type": "boolean",
      "title": "Location History Opt In",
      "default": false
    },
    "children": {
      "items": {
        "$ref": "#/$defs/ChildOut"
      },
      "type": "array",
      "title": "Children",
      "default": []
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "email",
    "is_active",
    "is_verified",
    "created_at"
  ],
  "$defs": {
    "ChildOut": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "age_range": {
          "type": "string",
          "title": "Age Range"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label"
        }
      },
      "type": "object",
      "required": [
        "id",
        "age_range",
        "label"
      ],
      "title": "ChildOut"
    }
  }
}