from typing import TypedDict, Optional, Any, List

from instagram_direct.direct_api.type.SmallUserType import SmallUserType
from instagram_direct.direct_api.type.clip.ClipCaptionType import ClipCaptionType
from instagram_direct.direct_api.type.clip.VideoVersionType import VideoVersionType


class ClipType(TypedDict):
    taken_at: int
    pk: str
    id: str
    fbid: str
    device_timestamp: int
    caption_is_edited: bool
    strong_id__: str
    deleted_reason: int
    has_shared_to_fb: int
    has_delayed_metadata: bool
    mezql_token: str
    share_count_disabled: bool
    is_visual_reply_commenter_notice_enabled: bool
    like_and_view_counts_disabled: bool
    is_post_live_clips_media: bool
    logging_info_token: str
    comment_threading_enabled: bool
    is_unified_video: bool
    commerciality_status: str
    client_cache_key: str
    integrity_review_decision: str
    should_request_ads: bool
    is_reshare_of_text_post_app_media_in_ig: bool
    has_privately_liked: bool
    filter_type: int
    can_see_insights_as_brand: bool
    media_type: int
    code: str
    user: SmallUserType
    caption: ClipCaptionType
    is_covered: bool
    private_reply_status: int
    sharing_friction_info: dict
    timeline_pinned_user_ids: list
    play_count: int
    has_views_fetching: bool
    fb_play_count: int
    creator_viewer_insights: list
    fb_user_tags: dict
    coauthor_producers: list
    coauthor_producer_can_see_organic_insights: bool
    invited_coauthor_producers: list
    is_in_profile_grid: bool
    profile_grid_control_enabled: bool
    media_cropping_info: dict
    user: dict
    owner: dict
    image_versions2: dict
    original_width: int
    original_height: int
    is_artist_pick: bool
    media_notes: dict
    enable_media_notes_production: bool
    product_type: str
    is_paid_partnership: bool
    inventory_source: str
    music_metadata: Optional[dict]
    social_context: list
    organic_tracking_token: str
    is_third_party_downloads_eligible: bool
    ig_media_sharing_disabled: bool
    are_remixes_crosspostable: bool
    boost_unavailable_identifier: Optional[Any]
    boost_unavailable_reason: Optional[Any]
    boost_unavailable_reason_v2: Optional[Any]
    subscribe_cta_visible: bool
    creative_config: dict
    is_cutout_sticker_allowed: bool
    gen_ai_detection_method: dict
    fb_aggregated_like_count: int
    fb_aggregated_comment_count: int
    has_high_risk_gen_ai_inform_treatment: bool
    open_carousel_show_follow_button: bool
    is_tagged_media_shared_to_viewer_profile_grid: bool
    should_show_author_pog_for_tagged_media_shared_to_profile_grid: bool
    is_eligible_for_media_note_recs_nux: bool
    is_social_ufi_disabled: bool
    meta_ai_suggested_prompts: list
    can_reply: bool
    can_view_more_preview_comments: bool
    preview_comments: list
    comment_count: int
    hide_view_all_comment_entrypoint: bool
    is_comments_gif_composer_enabled: bool
    comment_inform_treatment: dict
    has_liked: bool
    like_count: int
    facepile_top_likers: List[SmallUserType]
    top_likers: List[str]
    video_subtitles_confidence: float
    video_subtitles_locale: str
    video_sticker_locales: list
    is_dash_eligible: int
    video_dash_manifest: str
    number_of_qualities: int
    video_versions: List[VideoVersionType]
    video_duration: float
    has_audio: bool
    clips_tab_pinned_user_ids: list
    clips_metadata: dict
    can_viewer_save: bool
    can_viewer_reshare: bool
    shop_routing_user_id: Optional[Any]
    is_organic_product_tagging_eligible: bool
    igbio_product: Optional[Any]
    product_suggestions: list
    view_state_item_type: int
    clips_delivery_parameters: dict
    is_reuse_allowed: bool
    has_more_comments: bool
    max_num_visible_preview_comments: int
    explore_hide_comments: bool
    is_open_to_public_submission: bool
