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

from __future__ import annotations

from typing import Iterable
from typing_extensions import Required, TypedDict

from .users.update_preferences_request_param import UpdatePreferencesRequestParam

__all__ = ["UserUpsertParams", "ChannelSetting"]


class UserUpsertParams(TypedDict, total=False):
    avatar: str
    """URL to user's avatar image (must start with http:// or https://)"""

    channel_settings: Iterable[ChannelSetting]
    """Initial channel settings (e.g., device tokens for push)"""

    custom_fields: object
    """Custom attributes. Deep-merged with existing values on update."""

    email: str
    """User's email address"""

    first_name: str
    """User's first name"""

    last_name: str
    """User's last name"""

    locale: str
    """BCP 47 locale code (e.g., en-US, es-ES, fr-FR)"""

    phone: str
    """User's phone number in E.164 format"""

    preferences: UpdatePreferencesRequestParam
    """Request body for updating user preferences. Only provided fields are updated."""

    timezone: str
    """IANA timezone (e.g., America/New_York, Europe/London)"""


class ChannelSetting(TypedDict, total=False):
    channel_id: Required[str]
    """Channel ID"""

    settings: Required[object]
    """Provider-specific settings"""
