import type { HybridObject } from 'react-native-nitro-modules'; export type NitroRequestMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS'; export interface NitroHeader { key: string; value: string; } export interface NitroFormDataPart { name: string; value?: string; fileUri?: string; fileName?: string; mimeType?: string; } export interface NitroRequest { url: string; method?: NitroRequestMethod; headers?: NitroHeader[]; bodyString?: string; bodyBytes?: string; bodyFormData?: NitroFormDataPart[]; timeoutMs?: number; followRedirects?: boolean; prefetchCacheTtlMs?: number; requestId?: string; } export interface NitroResponse { url: string; status: number; statusText: string; ok: boolean; redirected: boolean; headers: NitroHeader[]; bodyString?: string; bodyBytes?: ArrayBuffer; } export interface NitroFetchClient extends HybridObject<{ ios: 'swift'; android: 'kotlin'; }> { request(req: NitroRequest): Promise; prefetch(req: NitroRequest): Promise; requestSync(req: NitroRequest): NitroResponse; cancelRequest(requestId: string): void; } export interface NitroFetch extends HybridObject<{ ios: 'swift'; android: 'kotlin'; }> { createClient(): NitroFetchClient; } export interface NativeStorage extends HybridObject<{ ios: 'swift'; android: 'kotlin'; }> { getString(key: string): string; setString(key: string, value: string): void; removeString(key: string): void; /** AES-GCM at rest in the same prefs/suite as getString; key material in Keystore / Keychain. */ getSecureString(key: string): string; setSecureString(key: string, value: string): void; removeSecureString(key: string): void; } //# sourceMappingURL=NitroFetch.nitro.d.ts.map