//#region src/types/index.d.ts /** Response type for FetchFn — includes the methods consumers actually use */ type FetchResponse = { readonly ok: boolean; readonly status: number; json(): Promise; text(): Promise; arrayBuffer(): Promise; readonly headers: { get(name: string): string | null; }; }; /** Request init for FetchFn — covers the options consumers actually pass */ type FetchInit = { method?: string; headers?: Record | { has(name: string): boolean; set(name: string, value: string): void; get(name: string): string | null; }; body?: unknown; signal?: { readonly aborted: boolean; readonly reason: unknown; }; [key: string]: unknown; }; /** * Fetch-compatible function type. Avoids DOM type dependency (lib: ES2022 only). * Any function assignable from `globalThis.fetch` satisfies this signature. */ type FetchFn = (url: string, init?: FetchInit) => Promise; type EdgarClientOptions = { /** Descriptive user-agent string (required by SEC). e.g. "AcmeLegalBot/1.0 (ops@acme.test)" */userAgent: string; /** Max requests per second to SEC EDGAR. Default: 8 */ maxRequestsPerSecond?: number; /** Request timeout in milliseconds. Default: 10000 */ timeoutMs?: number; /** Retry configuration */ retries?: RetryOptions; /** Optional telemetry hooks */ telemetry?: TelemetryOptions; /** Custom fetch function. Defaults to globalThis.fetch. Use for proxy routing or testing. */ fetch?: FetchFn; }; type RetryOptions = { /** Maximum retry attempts. Default: 3 */maxAttempts: number; /** Base delay between retries in ms. Default: 250 */ baseDelayMs: number; /** Maximum delay between retries in ms. Default: 4000 */ maxDelayMs: number; }; type TelemetryOptions = { onRequestStart?: (event: RequestStartEvent) => void; onRequestEnd?: (event: RequestEndEvent) => void; onRetry?: (event: RetryEvent) => void; }; type RequestStartEvent = { url: string; method: string; timestamp: number; requestId: string; operation: string; endpointClass: string; runtime: "node" | "bun"; }; type RequestEndEvent = { url: string; method: string; statusCode: number; durationMs: number; timestamp: number; requestId: string; operation: string; endpointClass: string; runtime: "node" | "bun"; }; type RetryEvent = { url: string; attempt: number; maxAttempts: number; delayMs: number; error: string; timestamp: number; requestId: string; operation: string; endpointClass: string; runtime: "node" | "bun"; }; type DiscoverFilingsInput = { /** Start date (YYYY-MM-DD) */from: string; /** End date (YYYY-MM-DD) */ to: string; /** Optional CIK to scope discovery */ cik?: string; /** Optional form types. Defaults to core set (8-K, 10-K, 10-Q, 20-F, S-1 + amendments) */ formTypes?: string[]; }; type FilingRef = { /** Central Index Key (10-digit zero-padded) */cik: string; /** Canonical accession number */ accessionNo: string; /** SEC form type */ formType: string; /** Filing date (YYYY-MM-DD) */ filingDate: string; /** Full URL to filing on EDGAR */ filingUrl: string; }; type ExhibitRef = { /** Accession number of parent filing */accessionNo: string; /** Exhibit sequence number */ sequence: string; /** Exhibit type (e.g. "EX-10.1") */ type: string; /** Exhibit description from filing index */ description?: string; /** Exhibit filename */ filename: string; /** Full URL to exhibit on EDGAR */ exhibitUrl: string; }; type CompanyInfo = { /** Central Index Key (10-digit zero-padded) */cik: string; /** Entity name */ name: string; /** Trading symbols */ tickers: string[]; /** Stock exchanges */ exchanges: string[]; /** Entity type (e.g. "operating") */ entityType?: string; /** SIC code */ sic?: string; /** SIC description */ sicDescription?: string; /** State of incorporation */ stateOfIncorporation?: string; /** Fiscal year end (MMDD format) */ fiscalYearEnd?: string; }; type CompanyTicker = { /** Central Index Key (10-digit zero-padded) */cik: string; /** Trading symbol */ ticker: string; /** Company name */ name: string; /** Stock exchange */ exchange: string; }; type DownloadedExhibit = { /** The exhibit reference */exhibit: ExhibitRef; /** Raw exhibit content */ bytes: Uint8Array; /** MIME type hint */ mimeType?: string; /** Content size in bytes */ sizeBytes: number; /** SHA-256 hex digest */ sha256: string; }; //#endregion export { EdgarClientOptions as a, FetchInit as c, RequestEndEvent as d, RequestStartEvent as f, TelemetryOptions as h, DownloadedExhibit as i, FetchResponse as l, RetryOptions as m, CompanyTicker as n, ExhibitRef as o, RetryEvent as p, DiscoverFilingsInput as r, FetchFn as s, CompanyInfo as t, FilingRef as u }; //# sourceMappingURL=index-BwyPXpMS.d.mts.map