{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autonomous-solutions/json-schema/autonomous-solutions-hub-user-current-response-schema.json",
  "title": "HubUserCurrentResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autonomous-solutions-hubs-api-openapi.yml#/components/schemas/HubUserCurrentResponse",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "geojson_location": {
      "anyOf": [
        {
          "$ref": "#/$defs/GeoJsonLocation"
        },
        {
          "type": "null"
        }
      ]
    },
    "country": {
      "type": "string",
      "title": "Country"
    },
    "state": {
      "type": "string",
      "title": "State"
    },
    "city": {
      "type": "string",
      "title": "City"
    },
    "postal_code": {
      "type": "string",
      "title": "Postal Code"
    },
    "street_address_1": {
      "type": "string",
      "title": "Street Address 1"
    },
    "street_address_2": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Street Address 2"
    },
    "tax_rates": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tax Rates"
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Timezone"
    },
    "approximate_order_limit": {
      "type": "integer",
      "title": "Approximate Order Limit"
    },
    "approximate_bin_opening_limit": {
      "type": "integer",
      "title": "Approximate Bin Opening Limit"
    },
    "max_cart_items": {
      "type": "integer",
      "title": "Max Cart Items"
    },
    "hub_status": {
      "$ref": "#/$defs/HubStatus"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "country",
    "state",
    "city",
    "postal_code",
    "street_address_1",
    "approximate_order_limit",
    "approximate_bin_opening_limit",
    "max_cart_items",
    "hub_status"
  ],
  "$defs": {
    "GeoJsonLocation": {
      "properties": {
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Type",
          "default": "Point"
        },
        "coordinates": {
          "items": {
            "type": "number"
          },
          "type": "array",
          "title": "Coordinates"
        }
      },
      "type": "object",
      "required": [
        "coordinates"
      ],
      "title": "GeoJsonLocation"
    },
    "HubStatus": {
      "type": "string",
      "enum": [
        "active",
        "maintenance",
        "restocking",
        "hidden"
      ],
      "title": "HubStatus"
    }
  }
}