# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict, Optional

from ..._models import BaseModel

__all__ = ["Preferences", "ChannelTypes", "Notiflows"]


class ChannelTypes(BaseModel):
    """Global opt-in/opt-out settings per channel type.

    `true` = enabled, `false` = opted out.
    """

    chat: Optional[bool] = None
    """Chat notifications (Slack, etc.)"""

    email: Optional[bool] = None
    """Email notifications"""

    in_app: Optional[bool] = None
    """In-app feed notifications"""

    mobile_push: Optional[bool] = None
    """Mobile push notifications (iOS/Android)"""

    sms: Optional[bool] = None
    """SMS notifications"""

    web_push: Optional[bool] = None
    """Web push notifications"""


class Notiflows(BaseModel):
    channel_types: Optional[Dict[str, bool]] = None
    """Channel-specific overrides for this notiflow"""

    enabled: Optional[bool] = None
    """Whether this notiflow is enabled for the user"""

    name: Optional[str] = None
    """Notiflow name (read-only, for display)"""


class Preferences(BaseModel):
    """User notification preferences"""

    channel_types: Optional[ChannelTypes] = None
    """Global opt-in/opt-out settings per channel type.

    `true` = enabled, `false` = opted out.
    """

    notiflows: Optional[Dict[str, Notiflows]] = None
    """Per-notiflow preferences. Keys are notiflow handles."""
