from typing import TypedDict, List, Any, Optional

from instagram_direct.direct_api.type.message.MessageType import MessageType
from instagram_direct.direct_api.type.thread.ThreadNudgeType import ThreadNudgeType
from instagram_direct.direct_api.type.thread.ThreadPublicChatMetadataType import ThreadPublicChatMetadataType
from instagram_direct.direct_api.type.thread.ThreadThemeType import ThreadThemeType
from instagram_direct.direct_api.type.UserType import UserType


class ThreadType(TypedDict):
    has_older: bool
    has_newer: bool
    pending: bool
    canonical: bool
    thread_id: str
    thread_v2_id: str
    items: List[MessageType]
    users: List[UserType]
    viewer_id: str
    muted: bool
    vc_muted: bool
    encoded_server_data_info: str
    admin_user_ids: List[str]
    approval_required_for_new_members: bool
    archived: bool
    thread_has_audio_only_call: bool
    pending_user_ids: List[str]
    oldest_cursor: str
    newest_cursor: str
    last_permanent_item: MessageType
    icebreakers: Optional[Any]
    snippet: dict
    ig_thread_capabilities: dict
    dismiss_inbox_nudge: Optional[Any]
    should_upsell_nudge: bool
    public_chat_metadata: ThreadPublicChatMetadataType
    is_creator_thread: bool
    is_business_thread: bool
    account_warning: Optional[Any]
    event_thread_metadata: Optional[Any]
    group_profile_id: Optional[Any]
    ctd_outcome_upsell_setting: Optional[Any]
    takedown_data: Optional[Any]
    is_xac_readonly: bool
    creator_agent_enabled: bool
    read_receipts_disabled: int
    unpublished_pro_page_id: Optional[Any]
    live_location_session_id: Optional[Any]
    is_pin: bool
    pinned_timestamp: Optional[Any]
    instamadillo_cutover_metadata: Optional[Any]
    is_3p_api_user: bool
    typing_indicator_disabled: int
    locked_status: Optional[Any]
    notification_preview_controls: Optional[Any]
    customer_details: Optional[Any]
    recurring_prompt_type: Optional[Any]
    is_verified_thread: bool
    last_mentioned_item_timestamp_us: Optional[Any]
    carbon_extra_fields: Optional[Any]
    lightweight_intervention_appealable_entity_id: Optional[Any]
    nudge: ThreadNudgeType
    nicknames: List[str]
    reachability_status: int
    nicknames_setting: List[str]
    thread_title: str
    thread_label: int
    thread_languages: Optional[Any]
    is_group: bool
    is_spam: bool
    spam: bool
    shh_mode_enabled: bool
    relevancy_score: int
    relevancy_score_expr: int
    is_translation_enabled: bool
    last_activity_at: int
    last_non_sender_item_at: int
    marked_as_unread: bool
    assigned_admin_id: str
    pinned_messages_metadata: Optional[Any]
    ad_context_data: Optional[Any]
    label_items: list
    shh_transport_mode: int
    shh_toggler_userid: Optional[Any]
    messaging_thread_key: int
    next_cursor: str
    prev_cursor: str
    policy_violation: Optional[Any]
    theme: ThreadThemeType
    thread_context_items: list
    professional_metadata: Optional[Any]
    last_seen_at: dict
    smart_suggestion: Optional[Any]
    system_folder: int
    is_xac_thread: bool
    is_fanclub_subscriber_thread: bool
    inviter: UserType
    input_mode: int
    has_reached_message_request_limit: bool
    last_mentioned_item_id: Optional[Any]
    thread_type: str
    thread_subtype: int
    translation_banner_impression_count: int
    read_state: int
    business_thread_folder: int
    is_creator_subscriber_thread: bool
    group_link_joinable_mode: int
    joinable_group_link: str
    folder: int
    e2ee_cutover_status: int
    left_users: list
    is_appointment_booking_enabled: bool
    mentions_muted: bool
    tq_seq_id: Optional[Any]
    named: bool
    is_close_friend_thread: bool
    uq_seq_id: str
    video_call_id: Optional[Any]
    bc_partnership: bool
    shh_replay_enabled: bool
    is_stale: bool
    btv_enabled_map: Optional[dict]
