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

from typing import Optional
from datetime import datetime

from .._models import BaseModel

__all__ = ["User"]


class User(BaseModel):
    """A user (recipient) in your project"""

    id: str
    """Internal Notiflows user ID (UUIDv7)"""

    created_at: datetime
    """When the user was created (ISO 8601)"""

    external_id: str
    """Your system's unique identifier for this user"""

    updated_at: datetime
    """When the user was last updated (ISO 8601)"""

    avatar: Optional[str] = None
    """URL to user's avatar image (must be https://)"""

    custom_fields: Optional[object] = None
    """Arbitrary JSON object for additional user attributes.

    Accessible in templates as `recipient.custom_fields.*`
    """

    email: Optional[str] = None
    """User's email address for email notifications"""

    first_name: Optional[str] = None
    """User's first name for personalization"""

    last_name: Optional[str] = None
    """User's last name for personalization"""

    locale: Optional[str] = None
    """BCP 47 locale code for localized notifications"""

    phone: Optional[str] = None
    """User's phone number in E.164 format for SMS notifications"""

    timezone: Optional[str] = None
    """IANA timezone for time-sensitive notifications"""
