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

    Function closeNativeConnections

    • The one place a process's network connections are closed, called by the platforms' app processes when the app closes (after its pending telemetry went out), for Android and iOS alike: the process's transport client shuts down every connection of both channels and resolves only when every socket is closed. A request through the client afterwards fails with an error whose code is 'ClientClosed'. Idempotent.

      Parameters

      • internals: {
            application: MobileApplicationState;
            client: Client;
            cookieJar: CookieJarLike;
            device: MobileDeviceState;
            protocolDiagnostics: () => readonly Readonly<ProtocolDiagnostic>[];
            requestTimeoutMs: number;
            session: {
                appStartPhase?: "cold";
                appStartTimeMs?: number;
                authorization?: string;
                bandwidth?: {
                    bytes: number;
                    carried?: true;
                    ms: number;
                    stack?: {
                        downloadBwAvgBps: number;
                        downloadBweMeanBps: number;
                        downloadBwStddevBps: number;
                        rttAvgMs: number;
                        rttStddevMs: number;
                        uploadBwAvgBps: number;
                        uploadBwe: {
                            bps: number;
                            buckets: readonly {
                                lower: number;
                                mean: number;
                                p25: number;
                                p50: number;
                                p75: number;
                                samples: number;
                                upper: number | null;
                            }[];
                            sampleCount: number;
                        };
                        uploadBwStddevBps: number;
                    };
                };
                challenge?: { readonly [key: string]: unknown };
                checkpoint?: { readonly [key: string]: unknown };
                clientSessionIdLifetime: number;
                directInboxCache?: {
                    threads: readonly {
                        is_group: boolean;
                        items: readonly {
                            client_context?: string;
                            item_id: string;
                            item_type: string;
                            text?: string;
                            timestamp: string | number;
                            user_id: string;
                        }[];
                        last_activity_at: string
                        | number;
                        muted: boolean;
                        thread_id: string;
                        thread_title: string;
                        thread_v2_id: string;
                        users: readonly {
                            fbid_v2?: string;
                            full_name: string;
                            pk: string;
                            username: string;
                        }[];
                    }[];
                };
                directInboxSeqId?: number;
                directLoadedThreads?: readonly string[];
                dsUserId?: string;
                familyDeviceIdBound?: boolean;
                fbidV2?: string;
                igWWWClaim?: string;
                lastCreationMode?: "post"
                | "reel"
                | "story";
                metaAiConsent?: {
                    cacheTimeSeconds: number;
                    fetchedAtSeconds: number;
                    nuxType: string;
                    requiresNux: boolean;
                    text: string;
                    version: string;
                };
                metaSubsEntrypointSessions?: {
                    readonly [key: string]: {
                        expiresAtMs: number;
                        refreshAtMs: number;
                        sessionId: string;
                    };
                };
                msgrRegion?: string;
                noteCtasFetchedAtMs?: number;
                passwordEncryptionKeyId?: string;
                passwordEncryptionPubKey?: string;
                pigeonSessionIdLifetime: number;
                popularKeywordsRefreshedAtMs?: number;
                profileInfoFetches?: {
                    readonly [key: string]: {
                        atMs: number;
                        userFbid?: string;
                        username: string;
                    };
                };
                quickPromotionCooldown?: {
                    defaultMs: number;
                    slots: { readonly [key: string]: number };
                };
                quickPromotionImpressions?: {
                    readonly [key: string]: {
                        lastSurface: string;
                        surfaces: { readonly [key: string]: number };
                    };
                };
                regionHint?: string;
                rmdEvaluationStarted?: boolean;
                rur?: string;
                sessionStartPhase?: "starting";
                shbid?: string;
                shbts?: string;
                thumbnailCacheBustingValue: number;
                xMetaUsdid?: string;
                xMid?: string;
                zeroInterface?: boolean;
                zeroPhase?: "logged-out"
                | "authenticated"
                | "rmd-evaluated";
            };
            startedWithSession: boolean;
        }

      Returns Promise<void>