igpapi — Instagram private API Simulator for Node.js (API reference) 4.14.0
    Preparing search index...

    Variable DirectInboxThreadItemConst

    DirectInboxThreadItem: ScreenItemDefinition<
        "DirectInboxThread",
        {
            is_group: boolean;
            last_activity_at: string;
            muted: boolean;
            preview: readonly {
                client_context?: string;
                item_id: string;
                item_type: string;
                media?: | {
                    height: number;
                    media_type: 1;
                    pk: string;
                    url: string;
                    width: number;
                }
                | {
                    height: number;
                    media_type: 2;
                    pk: string;
                    url: string;
                    width: number;
                }
                | {
                    media_type: 8;
                    pk: string;
                    slides: readonly { media_type: 1
                    | 2; pk: string; url: string }[];
                };
                text?: string;
                timestamp: string;
                user_id: string;
            }[];
            thread_id: string;
            thread_title: string;
            thread_v2_id: string;
            users: readonly {
                fbid_v2?: string;
                full_name: string;
                pk: string;
                username: string;
            }[];
        },
        {
            is_group: boolean;
            last_activity_at: string;
            muted: boolean;
            preview: readonly {
                client_context?: string;
                item_id: string;
                item_type: string;
                media?: | {
                    height: number;
                    media_type: 1;
                    pk: string;
                    url: string;
                    width: number;
                }
                | {
                    height: number;
                    media_type: 2;
                    pk: string;
                    url: string;
                    width: number;
                }
                | {
                    media_type: 8;
                    pk: string;
                    slides: readonly { media_type: 1
                    | 2; pk: string; url: string }[];
                };
                text?: string;
                timestamp: string;
                user_id: string;
            }[];
            thread_id: string;
            thread_title: string;
            thread_v2_id: string;
            users: readonly {
                fbid_v2?: string;
                full_name: string;
                pk: string;
                username: string;
            }[];
        },
        {
            thread: {
                is_group: boolean;
                muted?: boolean;
                preview: readonly {
                    client_context?: string;
                    item_id: string;
                    item_type: string;
                    media?: | {
                        height: number;
                        media_type: 1;
                        pk: string;
                        url: string;
                        width: number;
                    }
                    | {
                        height: number;
                        media_type: 2;
                        pk: string;
                        url: string;
                        width: number;
                    }
                    | {
                        media_type: 8;
                        pk: string;
                        slides: readonly { media_type: 1
                        | 2; pk: string; url: string }[];
                    };
                    text?: string;
                    timestamp: string;
                    user_id: string;
                }[];
                thread_id: string;
                thread_title: string;
                thread_v2_id?: string;
                users: readonly {
                    fbid_v2?: string;
                    full_name: string;
                    pk: string;
                    username: string;
                }[];
            };
        },
        never,
        never,
        {
            open: (
                self: ScreenHandle,
                state: {
                    thread: {
                        is_group: boolean;
                        muted?: boolean;
                        preview: readonly {
                            client_context?: string;
                            item_id: string;
                            item_type: string;
                            media?:
                                | {
                                    height: number;
                                    media_type: 1;
                                    pk: string;
                                    url: string;
                                    width: number;
                                }
                                | {
                                    height: number;
                                    media_type: 2;
                                    pk: string;
                                    url: string;
                                    width: number;
                                }
                                | {
                                    media_type: 8;
                                    pk: string;
                                    slides: readonly { media_type: ...; pk: ...; url: ... }[];
                                };
                            text?: string;
                            timestamp: string;
                            user_id: string;
                        }[];
                        thread_id: string;
                        thread_title: string;
                        thread_v2_id?: string;
                        users: readonly {
                            fbid_v2?: string;
                            full_name: string;
                            pk: string;
                            username: string;
                        }[];
                    };
                },
            ) => ScreenEdgeBound<
                ScreenEdgeShape<
                    ScreenDefinition<
                        "DirectThread",
                        "screen",
                        | {
                            kind: "thread";
                            send_attribution?: | "inbox"
                            | "inbox_new_message"
                            | "message_button"
                            | "direct_thread_creation_omnipicker";
                            thread: {
                                is_group: boolean;
                                muted?: boolean;
                                preview: readonly {
                                    client_context?: ...;
                                    item_id: ...;
                                    item_type: ...;
                                    media?: ...;
                                    text?: ...;
                                    timestamp: ...;
                                    user_id: ...;
                                }[];
                                thread_id: string;
                                thread_title: string;
                                thread_v2_id?: string;
                                users: readonly {
                                    fbid_v2?: ...;
                                    full_name: ...;
                                    pk: ...;
                                    username: ...;
                                }[];
                            };
                        }
                        | {
                            kind: "recipient";
                            recipient: string;
                            send_attribution?: | "inbox"
                            | "inbox_new_message"
                            | "message_button"
                            | "direct_thread_creation_omnipicker";
                        }
                        | {
                            kind: "created";
                            target_user_ids: readonly string[];
                            thread_id: string;
                            thread_v2_id: string;
                        },
                        {
                            media: readonly (
                                | {
                                    height: number;
                                    media_type: 1;
                                    pk: string;
                                    url: string;
                                    width: number;
                                }
                                | {
                                    height: number;
                                    media_type: 2;
                                    pk: string;
                                    url: string;
                                    width: number;
                                }
                                | { media_type: 8; pk: string; slides: readonly (...)[] }
                            )[];
                            messages: readonly {
                                client_context?: string;
                                item_id: string;
                                item_type: string;
                                media?:
                                    | { height: ...; media_type: ...; pk: ...; url: ...; width: ... }
                                    | { height: ...; media_type: ...; pk: ...; url: ...; width: ... }
                                    | { media_type: ...; pk: ...; slides: ... };
                                text?: string;
                                timestamp: string;
                                user_id: string;
                            }[];
                            thread: {
                                is_group: boolean;
                                muted?: boolean;
                                thread_id: string;
                                thread_title: string;
                                thread_v2_id?: string;
                            };
                            users: readonly {
                                fbid_v2?: string;
                                full_name: string;
                                pk: string;
                                username: string;
                            }[];
                        },
                        | {
                            has_messages: boolean;
                            is_group: false;
                            ordinal_reserved?: boolean;
                            participants: readonly {
                                fbid_v2?: (...)
                                | (...);
                                full_name: string;
                                pk: string;
                                username: string;
                            }[];
                            peer_user_fbid?: string;
                            peer_user_id?: string;
                            send_attribution?: | "inbox"
                            | "inbox_new_message"
                            | "message_button"
                            | "direct_thread_creation_omnipicker";
                            thread_id: string;
                            thread_title: string;
                            thread_v2_id?: string;
                        }
                        | {
                            has_messages: boolean;
                            is_group: true;
                            lead_user_id?: string;
                            ordinal_reserved?: boolean;
                            participants: readonly {
                                fbid_v2?: (...)
                                | (...);
                                full_name: string;
                                pk: string;
                                username: string;
                            }[];
                            send_attribution?: | "inbox"
                            | "inbox_new_message"
                            | "message_button"
                            | "direct_thread_creation_omnipicker";
                            thread_id: string;
                            thread_title: string;
                            thread_v2_id?: string;
                        },
                        | IgApiError
                        | RequestError
                        | ParseError
                        | TransportError
                        | ScreenDataError
                        | DirectInboxSeqIdUnknownError
                        | DirectThreadNotFoundByParticipantsError,
                        | PlainJsonApiHttp
                        | MobileSession
                        | MobileDevice
                        | GraphqlJsonHttp
                        | MobileApplication
                        | MobileNavigation
                        | MobileUserFlows
                        | AndroidQuickPromotionStash,
                        {
                            openCustomizeChat: (
                                self: ScreenHandle,
                                state:
                                    | {
                                        has_messages: boolean;
                                        is_group: false;
                                        ordinal_reserved?: (...)
                                        | (...)
                                        | (...);
                                        participants: readonly (...)[];
                                        peer_user_fbid?: (...) | (...);
                                        peer_user_id?: (...) | (...);
                                        send_attribution?: (...) | (...) | (...) | (...) | (...);
                                        thread_id: string;
                                        thread_title: string;
                                        thread_v2_id?: (...) | (...);
                                    }
                                    | {
                                        has_messages: boolean;
                                        is_group: true;
                                        lead_user_id?: (...)
                                        | (...);
                                        ordinal_reserved?: (...) | (...) | (...);
                                        participants: readonly (...)[];
                                        send_attribution?: (...) | (...) | (...) | (...) | (...);
                                        thread_id: string;
                                        thread_title: string;
                                        thread_v2_id?: (...) | (...);
                                    },
                            ) => ScreenEdgeBound<
                                ScreenEdgeShape<
                                    ScreenDefinition<
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                    >,
                                    [],
                                    "button",
                                    AndroidScreens,
                                >,
                                (...args: []) => Effect<(...), (...), (...)>,
                            >;
                            openThreadDetails: (
                                self: ScreenHandle,
                                state:
                                    | {
                                        has_messages: boolean;
                                        is_group: false;
                                        ordinal_reserved?: (...)
                                        | (...)
                                        | (...);
                                        participants: readonly (...)[];
                                        peer_user_fbid?: (...) | (...);
                                        peer_user_id?: (...) | (...);
                                        send_attribution?: (...) | (...) | (...) | (...) | (...);
                                        thread_id: string;
                                        thread_title: string;
                                        thread_v2_id?: (...) | (...);
                                    }
                                    | {
                                        has_messages: boolean;
                                        is_group: true;
                                        lead_user_id?: (...)
                                        | (...);
                                        ordinal_reserved?: (...) | (...) | (...);
                                        participants: readonly (...)[];
                                        send_attribution?: (...) | (...) | (...) | (...) | (...);
                                        thread_id: string;
                                        thread_title: string;
                                        thread_v2_id?: (...) | (...);
                                    },
                            ) => ScreenEdgeBound<
                                ScreenEdgeShape<
                                    ScreenDefinition<
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                    >,
                                    [],
                                    "button",
                                    AndroidScreens,
                                >,
                                (...args: []) => Effect<(...), (...), (...)>,
                            >;
                            sendMessage: (
                                self: ScreenHandle,
                                state:
                                    | {
                                        has_messages: boolean;
                                        is_group: false;
                                        ordinal_reserved?: (...)
                                        | (...)
                                        | (...);
                                        participants: readonly (...)[];
                                        peer_user_fbid?: (...) | (...);
                                        peer_user_id?: (...) | (...);
                                        send_attribution?: (...) | (...) | (...) | (...) | (...);
                                        thread_id: string;
                                        thread_title: string;
                                        thread_v2_id?: (...) | (...);
                                    }
                                    | {
                                        has_messages: boolean;
                                        is_group: true;
                                        lead_user_id?: (...)
                                        | (...);
                                        ordinal_reserved?: (...) | (...) | (...);
                                        participants: readonly (...)[];
                                        send_attribution?: (...) | (...) | (...) | (...) | (...);
                                        thread_id: string;
                                        thread_title: string;
                                        thread_v2_id?: (...) | (...);
                                    },
                            ) => (
                                ...args: [text: string],
                            ) => Effect<
                                (...) & (...),
                                (...) | (...) | (...) | (...) | (...),

                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...),
                            >;
                        },
                        {
                            media: {
                                at: "media";
                                by: "media_type";
                                key: "pk";
                                source: ScreenItemNodes;
                                variants: {
                                    "1": ScreenItemDefinition<
                                        "DirectPhoto",
                                        { height: ...; media_type: ...; pk: ...; url: ...; width: ... },
                                        { height: ...; media_type: ...; pk: ...; url: ...; width: ... },
                                        Record<(...), (...)>,
                                        never,
                                        never,
                                        {},
                                        undefined,
                                        never,
                                    >;
                                    "2": ScreenItemDefinition<
                                        "DirectVideo",
                                        { height: ...; media_type: ...; pk: ...; url: ...; width: ... },
                                        { height: ...; media_type: ...; pk: ...; url: ...; width: ... },
                                        Record<(...), (...)>,
                                        never,
                                        never,
                                        {},
                                        undefined,
                                        never,
                                    >;
                                    "8": ScreenItemDefinition<
                                        "DirectCarousel",
                                        { media_type: ...; pk: ...; slides: ... },
                                        { media_type: ...; pk: ...; slides: ... },
                                        Record<(...), (...)>,
                                        never,
                                        never,
                                        {},
                                        undefined,
                                        never,
                                    >;
                                };
                            };
                            messages: {
                                at: "messages";
                                item: ScreenItemDefinition<
                                    "DirectThreadMessage",
                                    {
                                        client_context?: (...)
                                        | (...);
                                        item_id: string;
                                        item_type: string;
                                        media?: (...) | (...) | (...) | (...);
                                        text?: (...) | (...);
                                        timestamp: string;
                                        user_id: string;
                                    },
                                    {
                                        client_context?: (...)
                                        | (...);
                                        item_id: string;
                                        item_type: string;
                                        media?: (...) | (...) | (...) | (...);
                                        text?: (...) | (...);
                                        timestamp: string;
                                        user_id: string;
                                    },
                                    DirectThreadMessageState,
                                    never,
                                    never,
                                    { react: (self: ..., state: ...) => ... },

                                        | {
                                            has_messages: ...;
                                            is_group: ...;
                                            ordinal_reserved?: ...;
                                            participants: ...;
                                            peer_user_fbid?: ...;
                                            peer_user_id?: ...;
                                            send_attribution?: ...;
                                            thread_id: ...;
                                            thread_title: ...;
                                            thread_v2_id?: ...;
                                        }
                                        | {
                                            has_messages: ...;
                                            is_group: ...;
                                            lead_user_id?: ...;
                                            ordinal_reserved?: ...;
                                            participants: ...;
                                            send_attribution?: ...;
                                            thread_id: ...;
                                            thread_title: ...;
                                            thread_v2_id?: ...;
                                        },
                                    never,
                                >;
                                key: "item_id";
                                source: ScreenItemNodes;
                            };
                            participants: {
                                at: "users";
                                item: ScreenItemDefinition<
                                    "DirectThreadParticipant",
                                    {
                                        fbid_v2?: (...)
                                        | (...);
                                        full_name: string;
                                        pk: string;
                                        username: string;
                                    },
                                    {
                                        fbid_v2?: (...)
                                        | (...);
                                        full_name: string;
                                        pk: string;
                                        username: string;
                                    },
                                    DirectThreadParticipantState,
                                    never,
                                    never,
                                    { openNicknameEditor: (self: ..., state: ...) => ... },

                                        | {
                                            has_messages: ...;
                                            is_group: ...;
                                            ordinal_reserved?: ...;
                                            participants: ...;
                                            peer_user_fbid?: ...;
                                            peer_user_id?: ...;
                                            send_attribution?: ...;
                                            thread_id: ...;
                                            thread_title: ...;
                                            thread_v2_id?: ...;
                                        }
                                        | {
                                            has_messages: ...;
                                            is_group: ...;
                                            lead_user_id?: ...;
                                            ordinal_reserved?: ...;
                                            participants: ...;
                                            send_attribution?: ...;
                                            thread_id: ...;
                                            thread_title: ...;
                                            thread_v2_id?: ...;
                                        },
                                    never,
                                >;
                                key: "pk";
                                source: ScreenItemNodes;
                            };
                        },
                        never,
                        never,
                    >,
                    [],
                    "inbox",
                    AndroidScreens,
                >,
                () => Effect<
                    AssembledHandle<
                        "DirectThread",
                        "screen",
                        {
                            media: readonly (
                                | { height: ...; media_type: ...; pk: ...; url: ...; width: ... }
                                | { height: ...; media_type: ...; pk: ...; url: ...; width: ... }
                                | { media_type: ...; pk: ...; slides: ... }
                            )[];
                            messages: readonly {
                                client_context?: (...) | (...);
                                item_id: string;
                                item_type: string;
                                media?: (...) | (...) | (...) | (...);
                                text?: (...) | (...);
                                timestamp: string;
                                user_id: string;
                            }[];
                            thread: {
                                is_group: boolean;
                                muted?: boolean;
                                thread_id: string;
                                thread_title: string;
                                thread_v2_id?: string;
                            };
                            users: readonly {
                                fbid_v2?: (...)
                                | (...);
                                full_name: string;
                                pk: string;
                                username: string;
                            }[];
                        },
                        {
                            openCustomizeChat: (
                                self: ScreenHandle,
                                state:
                                    | {
                                        has_messages: ...;
                                        is_group: ...;
                                        ordinal_reserved?: ...;
                                        participants: ...;
                                        peer_user_fbid?: ...;
                                        peer_user_id?: ...;
                                        send_attribution?: ...;
                                        thread_id: ...;
                                        thread_title: ...;
                                        thread_v2_id?: ...;
                                    }
                                    | {
                                        has_messages: ...;
                                        is_group: ...;
                                        lead_user_id?: ...;
                                        ordinal_reserved?: ...;
                                        participants: ...;
                                        send_attribution?: ...;
                                        thread_id: ...;
                                        thread_title: ...;
                                        thread_v2_id?: ...;
                                    },
                            ) => ScreenEdgeBound<
                                ScreenEdgeShape<(...), (...), (...), (...)>,
                                (...args: ...) => ...,
                            >;
                            openThreadDetails: (
                                self: ScreenHandle,
                                state:
                                    | {
                                        has_messages: ...;
                                        is_group: ...;
                                        ordinal_reserved?: ...;
                                        participants: ...;
                                        peer_user_fbid?: ...;
                                        peer_user_id?: ...;
                                        send_attribution?: ...;
                                        thread_id: ...;
                                        thread_title: ...;
                                        thread_v2_id?: ...;
                                    }
                                    | {
                                        has_messages: ...;
                                        is_group: ...;
                                        lead_user_id?: ...;
                                        ordinal_reserved?: ...;
                                        participants: ...;
                                        send_attribution?: ...;
                                        thread_id: ...;
                                        thread_title: ...;
                                        thread_v2_id?: ...;
                                    },
                            ) => ScreenEdgeBound<
                                ScreenEdgeShape<(...), (...), (...), (...)>,
                                (...args: ...) => ...,
                            >;
                            sendMessage: (
                                self: ScreenHandle,
                                state:
                                    | {
                                        has_messages: ...;
                                        is_group: ...;
                                        ordinal_reserved?: ...;
                                        participants: ...;
                                        peer_user_fbid?: ...;
                                        peer_user_id?: ...;
                                        send_attribution?: ...;
                                        thread_id: ...;
                                        thread_title: ...;
                                        thread_v2_id?: ...;
                                    }
                                    | {
                                        has_messages: ...;
                                        is_group: ...;
                                        lead_user_id?: ...;
                                        ordinal_reserved?: ...;
                                        participants: ...;
                                        send_attribution?: ...;
                                        thread_id: ...;
                                        thread_title: ...;
                                        thread_v2_id?: ...;
                                    },
                            ) => (...args: [text: ...]) => Effect<(...), (...), (...)>;
                        },
                        {
                            media: {
                                at: "media";
                                by: "media_type";
                                key: "pk";
                                source: ScreenItemNodes;
                                variants: {
                                    "1": ScreenItemDefinition<
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                    >;
                                    "2": ScreenItemDefinition<
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                    >;
                                    "8": ScreenItemDefinition<
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                        (...),
                                    >;
                                };
                            };
                            messages: {
                                at: "messages";
                                item: ScreenItemDefinition<
                                    "DirectThreadMessage",
                                    {
                                        client_context?: ...;
                                        item_id: ...;
                                        item_type: ...;
                                        media?: ...;
                                        text?: ...;
                                        timestamp: ...;
                                        user_id: ...;
                                    },
                                    {
                                        client_context?: ...;
                                        item_id: ...;
                                        item_type: ...;
                                        media?: ...;
                                        text?: ...;
                                        timestamp: ...;
                                        user_id: ...;
                                    },
                                    DirectThreadMessageState,
                                    never,
                                    never,
                                    { react: ... },
                                    (...) | (...),
                                    never,
                                >;
                                key: "item_id";
                                source: ScreenItemNodes;
                            };
                            participants: {
                                at: "users";
                                item: ScreenItemDefinition<
                                    "DirectThreadParticipant",
                                    { fbid_v2?: ...; full_name: ...; pk: ...; username: ... },
                                    { fbid_v2?: ...; full_name: ...; pk: ...; username: ... },
                                    DirectThreadParticipantState,
                                    never,
                                    never,
                                    { openNicknameEditor: ... },
                                    (...) | (...),
                                    never,
                                >;
                                key: "pk";
                                source: ScreenItemNodes;
                            };
                        },
                        ScreenHandle,
                        "required",
                        true,
                        never,
                        AndroidScreens,
                    >,
                    | IgApiError
                    | RequestError
                    | ParseError
                    | TransportError
                    | ScreenDataError
                    | ScreenEnterConcurrentError
                    | ScreenEdgeInputError
                    | DirectInboxSeqIdUnknownError
                    | DirectThreadNotFoundByParticipantsError,
                    | PlainJsonApiHttp
                    | MobileSession
                    | MobileDevice
                    | GraphqlJsonHttp
                    | MobileApplication
                    | MobileNavigation
                    | MobileUserFlows
                    | ScreenStack
                    | AndroidQuickPromotionStash
                    | ScreenCatalog,
                >,
            >;
        },
        undefined,
        never,
    > = ...

    One thread of the inbox list. Showing it sends nothing: the inbox snapshot already carries the preview (thread_message_limit=5 on both the 448 and the 451 apps), and the app sends no per-thread request fanning out as the list appears. open opens the thread with the thread's own v2 id.

    The edge takes the next ordinal: a group goes direct_inbox:2 → direct_thread:3:inbox — the clean transition, no screen in between. A one-to-one thread can be 5 when the session had already consumed two ordinals before the scene starts; that is the scene's session history, declared by the scene, not a fact of this edge.