import type { EventEmitter } from 'node:events'; import type { ApiResponse } from '../feature'; import type { CustomHeaders, CustomHeadersFunction } from '../headers'; import type { HttpOptions } from '../http-options'; import type { TagFilter } from '../tags'; import type { Mode } from '../unleash-config'; export interface FetcherInterface extends EventEmitter { start(): Promise; stop(): void; } export interface FetchingOptions extends PollingFetchingOptions, StreamingFetchingOptions { } export interface CommonFetchingOptions { url: string; appName: string; instanceId: string; headers?: CustomHeaders; connectionId: string; onSave: (response: ApiResponse, fromApi: boolean) => Promise; onModeChange?: (mode: Mode['type']) => Promise; } export interface PollingFetchingOptions extends CommonFetchingOptions { refreshInterval: number; tags?: Array; customHeadersFunction?: CustomHeadersFunction; mode: Mode; namePrefix?: string; projectName?: string; etag?: string; timeout?: number; httpOptions?: HttpOptions; } export interface StreamingFetchingOptions extends CommonFetchingOptions { eventSource?: EventSource; maxFailuresUntilFailover?: number; failureWindowMs?: number; } //# sourceMappingURL=fetcher.d.ts.map