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

    Interface DirectThreadActions

    The actions of DirectThreadScreen: the methods you call on its handle while the screen is open.

    interface DirectThreadActions {
        openCustomizeChat: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "DirectCustomizeChat",
                "screen",
                { thread_v2_id: string },
                DirectCustomizeChatActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                "thread_v2_id",
                AndroidScreens,
            >,
            ScreenEnterConcurrentError | ScreenDataError | ScreenEdgeInputError,
            never,
        >;
        openImagine: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "DirectImagineCreation",
                "screen",
                { surface_session_id: string; thread_id: string },
                DirectImagineCreationActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,

                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
        openMediaPicker: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "DirectMediaPickerPhotos",
                "screen",
                {
                    send_attribution?: | "inbox"
                    | "inbox_new_message"
                    | "message_button"
                    | "direct_thread_creation_omnipicker";
                    thread_id: string;
                },
                DirectMediaPickerPhotosActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,

                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
        openStickerTray: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "DirectStickerTabTray",
                "screen",
                {
                    send_attribution?: | "inbox"
                    | "inbox_new_message"
                    | "message_button"
                    | "direct_thread_creation_omnipicker";
                    stickers: readonly { alt_text?: string; sticker_id: string }[];
                    thread_id: string;
                },
                DirectStickerTrayActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,

                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
        openThreadDetails: (
            ...args: [],
        ) => Effect<
            AssembledHandle<
                "DirectThreadDetails",
                "screen",
                | {
                    is_group: false;
                    peer_user_fbid?: string;
                    peer_user_id?: string;
                    thread_title: string;
                    thread_v2_id: string;
                }
                | {
                    is_group: true;
                    lead_user_id?: string;
                    thread_title: string;
                    thread_v2_id: string;
                },
                DirectThreadDetailsActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                "thread_v2_id",
                AndroidScreens,
            >,

                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
        sendMessage: (
            ...args: [text: string],
        ) => Effect<
            {
                action: string;
                client_context: string;
                message_metadata: DirectBroadcastResponseMessageMetadata[];
                payload: DirectBroadcastResponsePayload;
                status: string;
                status_code: string;
            } & { raw: ActionRaw },

                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | ScreenEnterConcurrentError,
            never,
        >;
        sendVoice: (
            ...args: [input: { file: Buffer; waveform?: readonly number[] }],
        ) => Effect<
            {
                action: string;
                client_context: string;
                message_metadata: DirectBroadcastResponseMessageMetadata[];
                payload: DirectBroadcastResponsePayload;
                status: string;
                status_code: string;
            } & { raw: ActionRaw },
            IgApiError | Error | ScreenEnterConcurrentError,
            never,
        >;
    }
    Index

    Properties

    openCustomizeChat: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "DirectCustomizeChat",
            "screen",
            { thread_v2_id: string },
            DirectCustomizeChatActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            "thread_v2_id",
            AndroidScreens,
        >,
        ScreenEnterConcurrentError | ScreenDataError | ScreenEdgeInputError,
        never,
    >

    Taps Customize chat and opens that screen for this conversation. Answers its handle.

    openImagine: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "DirectImagineCreation",
            "screen",
            { surface_session_id: string; thread_id: string },
            DirectImagineCreationActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,

            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the composer's "+" and opens it on AI images: the Imagine flow. Answers its handle.

    openMediaPicker: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "DirectMediaPickerPhotos",
            "screen",
            {
                send_attribution?: | "inbox"
                | "inbox_new_message"
                | "message_button"
                | "direct_thread_creation_omnipicker";
                thread_id: string;
            },
            DirectMediaPickerPhotosActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,

            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the composer's "+" and opens it on the gallery: the photo and video picker. Answers its handle.

    openStickerTray: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "DirectStickerTabTray",
            "screen",
            {
                send_attribution?: | "inbox"
                | "inbox_new_message"
                | "message_button"
                | "direct_thread_creation_omnipicker";
                stickers: readonly { alt_text?: string; sticker_id: string }[];
                thread_id: string;
            },
            DirectStickerTrayActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,

            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the composer's "+" and opens it on stickers: the sticker tray. Answers its handle.

    openThreadDetails: (
        ...args: [],
    ) => Effect<
        AssembledHandle<
            "DirectThreadDetails",
            "screen",
            | {
                is_group: false;
                peer_user_fbid?: string;
                peer_user_id?: string;
                thread_title: string;
                thread_v2_id: string;
            }
            | {
                is_group: true;
                lead_user_id?: string;
                thread_title: string;
                thread_v2_id: string;
            },
            DirectThreadDetailsActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            "thread_v2_id",
            AndroidScreens,
        >,

            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the conversation's name at the top and opens the thread's details. Answers their handle.

    sendMessage: (
        ...args: [text: string],
    ) => Effect<
        {
            action: string;
            client_context: string;
            message_metadata: DirectBroadcastResponseMessageMetadata[];
            payload: DirectBroadcastResponsePayload;
            status: string;
            status_code: string;
        } & { raw: ActionRaw },

            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | ScreenEnterConcurrentError,
        never,
    >

    Types a message and taps Send: sends text to the conversation — a text, or, when the text carries a URL, a link message, as the composer decides by the text. Answers the sent message.

    sendVoice: (
        ...args: [input: { file: Buffer; waveform?: readonly number[] }],
    ) => Effect<
        {
            action: string;
            client_context: string;
            message_metadata: DirectBroadcastResponseMessageMetadata[];
            payload: DirectBroadcastResponsePayload;
            status: string;
            status_code: string;
        } & { raw: ActionRaw },
        IgApiError | Error | ScreenEnterConcurrentError,
        never,
    >

    Records a voice message in the composer and sends it: file is the take, waveform its samples (measured from the take when you give none). Answers the sent message.