import type { HybridObject } from 'react-native-nitro-modules' /** * On-device HTTP(S) network inspector. * Android → Chucker, iOS → Wormholy. Capture is automatic; these methods * control the inspector UI and capture state. */ export interface NitroChucker extends HybridObject<{ android: 'kotlin'; ios: 'swift' }> { /** true on android & ios (where a native engine exists). Never throws. */ readonly isSupported: boolean /** Open the on-device inspector UI. */ show(): void /** Wipe captured transactions (best-effort; see README limitations). */ clearLogs(): void /** Best-effort close of the inspector UI. */ dismiss(): void /** Pause/resume capture at runtime (Android exact; iOS best-effort). */ setEnabled(enabled: boolean): void /** * Cap how many transactions are retained. Oldest are evicted as new ones * arrive (FIFO), so memory stays bounded. Pass 0 for unlimited. * * iOS: exact, and the reason this exists — Wormholy keeps every transaction * (including full bodies) in memory with no cap by default, which OOMs * long-running sessions. Defaults to 200; set this before traffic starts, * because lowering it later does not retroactively trim an existing backlog. * * Android: no-op. Chucker persists to a database (not RAM) and truncates * bodies at 250 KB, so it has no count cap and does not need one. */ setMaxLogCount(maxCount: number): void /** * Skip capture entirely for these hosts, so their payloads are never * retained. This is the only lever that runs *before* a body is buffered, * making it the most effective guard against large media/CDN responses. * Pass an empty array to clear the list. * * Takes effect on the next request on both platforms. Matching is a host suffix * on iOS and an exact host match on Android; hosts are lowercased for you. */ setIgnoredHosts(hosts: string[]): void }