{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anomalyarmor-ai/json-schema/anomalyarmor-ai-user-preferences-update-schema.json",
  "title": "UserPreferencesUpdate",
  "description": "Schema for updating user preferences.\n\nAll fields are optional for partial updates.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docs.anomalyarmor.ai-openapi.json#/components/schemas/UserPreferencesUpdate",
  "properties": {
    "theme": {
      "anyOf": [
        {
          "$ref": "#/$defs/UserPreferenceTheme"
        },
        {
          "type": "null"
        }
      ]
    },
    "language": {
      "anyOf": [
        {
          "$ref": "#/$defs/UserLanguage"
        },
        {
          "type": "null"
        }
      ]
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Timezone"
    },
    "date_format": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Date Format"
    },
    "time_format": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Time Format"
    },
    "email_notifications": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email Notifications"
    },
    "email_daily_digest": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email Daily Digest"
    },
    "email_weekly_summary": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email Weekly Summary"
    },
    "email_alert_critical": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email Alert Critical"
    },
    "email_alert_high": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email Alert High"
    },
    "email_alert_medium": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email Alert Medium"
    },
    "email_alert_low": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email Alert Low"
    },
    "notify_onboarding_tips": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notify Onboarding Tips"
    },
    "notify_usage_alerts": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notify Usage Alerts"
    },
    "default_dashboard_view": {
      "anyOf": [
        {
          "$ref": "#/$defs/DashboardView"
        },
        {
          "type": "null"
        }
      ]
    },
    "items_per_page": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Items Per Page"
    },
    "show_tooltips": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Show Tooltips"
    },
    "compact_view": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Compact View"
    },
    "help_level": {
      "anyOf": [
        {
          "$ref": "#/$defs/HelpLevel"
        },
        {
          "type": "null"
        }
      ]
    },
    "show_cookie_button": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Show Cookie Button"
    },
    "show_learning_menu": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Show Learning Menu"
    },
    "enable_keyboard_shortcuts": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Enable Keyboard Shortcuts"
    },
    "auto_refresh_interval": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Auto Refresh Interval"
    },
    "default_asset_view": {
      "anyOf": [
        {
          "$ref": "#/$defs/AssetDisplayMode"
        },
        {
          "type": "null"
        }
      ]
    },
    "custom_settings": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Custom Settings"
    }
  },
  "type": "object",
  "$defs": {
    "AssetDisplayMode": {
      "type": "string",
      "enum": [
        "list",
        "grid",
        "table"
      ],
      "title": "AssetDisplayMode",
      "description": "Asset display mode enumeration."
    },
    "DashboardView": {
      "type": "string",
      "enum": [
        "overview",
        "detailed",
        "minimal"
      ],
      "title": "DashboardView",
      "description": "Dashboard view enumeration."
    },
    "HelpLevel": {
      "type": "string",
      "enum": [
        "none",
        "light",
        "heavy"
      ],
      "title": "HelpLevel",
      "description": "User help level preference for contextual help system.\n\nControls how much contextual help is shown in the UI:\n- NONE: No help displayed (power users)\n- LIGHT: Help icons linking to docs (default)\n- HEAVY: Verbose inline explanations (new users, onboarding)"
    },
    "UserLanguage": {
      "type": "string",
      "enum": [
        "en",
        "en",
        "es",
        "es",
        "fr",
        "fr",
        "de",
        "de",
        "ja",
        "ja"
      ],
      "title": "UserLanguage",
      "description": "User language enumeration."
    },
    "UserPreferenceTheme": {
      "type": "string",
      "enum": [
        "light",
        "dark",
        "system"
      ],
      "title": "UserPreferenceTheme",
      "description": "User preference theme enumeration."
    }
  }
}