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

    Interface PostingGalleryPickerActions

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

    interface PostingGalleryPickerActions {
        pickMedia: (
            ...args: [
                files: readonly [
                    PostingPhotoInput
                    | PostingVideoInput,
                    PostingPhotoInput | PostingVideoInput,
                    PostingPhotoInput | PostingVideoInput,
                ],
            ],
        ) => Effect<
            AssembledHandle<
                "PostingPostEdit",
                "screen",
                {
                    creationSessionId: string;
                    media: | readonly [
                        {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        },
                    ]
                    | readonly [
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                    ];
                    origin: "feed"
                    | "reels-tab";
                },
                PostingPostEditActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,

                | IgCheckpointError
                | IgAccountSuspendedError
                | IgAccountDisabledError
                | IgLoginRequiredError
                | IgUserLoggedOutError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError
                | PostingMediaFormatError,
            never,
        >;
        pickPhoto: (
            ...args: [photo: PostingPhotoInput],
        ) => Effect<
            AssembledHandle<
                "PostingPostEdit",
                "screen",
                {
                    creationSessionId: string;
                    media: | readonly [
                        {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        },
                    ]
                    | readonly [
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                    ];
                    origin: "feed"
                    | "reels-tab";
                },
                PostingPostEditActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,

                | IgCheckpointError
                | IgAccountSuspendedError
                | IgAccountDisabledError
                | IgLoginRequiredError
                | IgUserLoggedOutError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError
                | PostingMediaFormatError,
            never,
        >;
        pickPhotos: (
            ...args: [photos: readonly [PostingPhotoInput, PostingPhotoInput]],
        ) => Effect<
            AssembledHandle<
                "PostingPostEdit",
                "screen",
                {
                    creationSessionId: string;
                    media: | readonly [
                        {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        },
                    ]
                    | readonly [
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                        | {
                            byteLength: number;
                            height: number;
                            id: string;
                            kind: "photo";
                            mimeType: "image/jpeg"
                            | "image/png"
                            | "image/webp";
                            width: number;
                        }
                        | {
                            byteLength: number;
                            durationMs: number;
                            height: number;
                            id: string;
                            kind: "video";
                            mimeType: "video/mp4";
                            width: number;
                        },
                    ];
                    origin: "feed"
                    | "reels-tab";
                },
                PostingPostEditActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,

                | IgCheckpointError
                | IgAccountSuspendedError
                | IgAccountDisabledError
                | IgLoginRequiredError
                | IgUserLoggedOutError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError
                | PostingMediaFormatError,
            never,
        >;
        pickVideo: (
            ...args: [video: PostingVideoInput],
        ) => Effect<
            AssembledHandle<
                "PostingReelEditor",
                "screen",
                {
                    assetId: string;
                    creationSessionId: string;
                    draftId: string;
                    entry: "post-mode"
                    | "reel-mode";
                    media: {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    };
                    origin: "feed"
                    | "reels-tab";
                },
                PostingReelEditorActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,

                | IgCheckpointError
                | IgAccountSuspendedError
                | IgAccountDisabledError
                | IgLoginRequiredError
                | IgUserLoggedOutError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError
                | PostingMediaFormatError,
            never,
        >;
        switchMode: (
            ...args: [mode: "reel" | "story"],
        ) => Effect<
            AssembledHandle<
                "PostingCamera",
                "screen",
                {
                    cameraSessionId: string;
                    entry: "feed-button"
                    | "reels-tab"
                    | "gallery-picker"
                    | "camera-switch";
                    mode: "reel" | "story";
                    origin: "feed" | "reels-tab";
                },
                PostingCameraActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                never,
                AndroidScreens,
            >,

                | IgCheckpointError
                | IgAccountSuspendedError
                | IgAccountDisabledError
                | IgLoginRequiredError
                | IgUserLoggedOutError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
    }
    Index

    Properties

    pickMedia: (
        ...args: [
            files: readonly [
                PostingPhotoInput
                | PostingVideoInput,
                PostingPhotoInput | PostingVideoInput,
                PostingPhotoInput | PostingVideoInput,
            ],
        ],
    ) => Effect<
        AssembledHandle<
            "PostingPostEdit",
            "screen",
            {
                creationSessionId: string;
                media: | readonly [
                    {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    },
                ]
                | readonly [
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                ];
                origin: "feed"
                | "reels-tab";
            },
            PostingPostEditActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,

            | IgCheckpointError
            | IgAccountSuspendedError
            | IgAccountDisabledError
            | IgLoginRequiredError
            | IgUserLoggedOutError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError
            | PostingMediaFormatError,
        never,
    >

    Picks photos and videos together in the Select mode (at least two files; each file's kind is read from its bytes): a carousel with a video child. Answers the post editor's handle.

    pickPhoto: (
        ...args: [photo: PostingPhotoInput],
    ) => Effect<
        AssembledHandle<
            "PostingPostEdit",
            "screen",
            {
                creationSessionId: string;
                media: | readonly [
                    {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    },
                ]
                | readonly [
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                ];
                origin: "feed"
                | "reels-tab";
            },
            PostingPostEditActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,

            | IgCheckpointError
            | IgAccountSuspendedError
            | IgAccountDisabledError
            | IgLoginRequiredError
            | IgUserLoggedOutError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError
            | PostingMediaFormatError,
        never,
    >

    Picks one photo in the grid (photo.file holds its bytes): reads its format and dimensions, keeps it in the process's media pool and opens the post editor. Answers the editor's handle.

    pickPhotos: (
        ...args: [photos: readonly [PostingPhotoInput, PostingPhotoInput]],
    ) => Effect<
        AssembledHandle<
            "PostingPostEdit",
            "screen",
            {
                creationSessionId: string;
                media: | readonly [
                    {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    },
                ]
                | readonly [
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                    | {
                        byteLength: number;
                        height: number;
                        id: string;
                        kind: "photo";
                        mimeType: "image/jpeg"
                        | "image/png"
                        | "image/webp";
                        width: number;
                    }
                    | {
                        byteLength: number;
                        durationMs: number;
                        height: number;
                        id: string;
                        kind: "video";
                        mimeType: "video/mp4";
                        width: number;
                    },
                ];
                origin: "feed"
                | "reels-tab";
            },
            PostingPostEditActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,

            | IgCheckpointError
            | IgAccountSuspendedError
            | IgAccountDisabledError
            | IgLoginRequiredError
            | IgUserLoggedOutError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError
            | PostingMediaFormatError,
        never,
    >

    Turns on the grid's Select mode and picks one or more photos (at least one, by type): a carousel. Answers the post editor's handle.

    pickVideo: (
        ...args: [video: PostingVideoInput],
    ) => Effect<
        AssembledHandle<
            "PostingReelEditor",
            "screen",
            {
                assetId: string;
                creationSessionId: string;
                draftId: string;
                entry: "post-mode"
                | "reel-mode";
                media: {
                    byteLength: number;
                    durationMs: number;
                    height: number;
                    id: string;
                    kind: "video";
                    mimeType: "video/mp4";
                    width: number;
                };
                origin: "feed"
                | "reels-tab";
            },
            PostingReelEditorActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,

            | IgCheckpointError
            | IgAccountSuspendedError
            | IgAccountDisabledError
            | IgLoginRequiredError
            | IgUserLoggedOutError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError
            | PostingMediaFormatError,
        never,
    >

    Picks one video in the post mode (video.file holds its bytes). The app takes it through the creation camera and opens the Reel editor, so it publishes as a Reel. Answers the Reel editor's handle.

    switchMode: (
        ...args: [mode: "reel" | "story"],
    ) => Effect<
        AssembledHandle<
            "PostingCamera",
            "screen",
            {
                cameraSessionId: string;
                entry: "feed-button"
                | "reels-tab"
                | "gallery-picker"
                | "camera-switch";
                mode: "reel" | "story";
                origin: "feed" | "reels-tab";
            },
            PostingCameraActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            never,
            AndroidScreens,
        >,

            | IgCheckpointError
            | IgAccountSuspendedError
            | IgAccountDisabledError
            | IgLoginRequiredError
            | IgUserLoggedOutError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Moves the mode selector to REEL or STORY (mode) and opens the creation camera. Answers the camera's handle.