Skip to content

@alex.garcia/libfec / FromIdOptions

Interface: FromIdOptions ​

Defined in: filing.ts:36

Options for Filing.fromId: the FilingOptions (but id), plus how to fetch.

Extends ​

Properties ​

dates? ​

optional dates?: DatesOption

Defined in: filing.ts:20

How date columns of Record.values and the coverage dates (Filing.coverageFromDate, …) come out: "iso" (default) for "YYYY-MM-DD" strings, "date" for Dates at UTC midnight. Typed records (Filing.itemizations, Filing.cover) always use ISO strings.

Inherited from ​

FilingOptions.dates


batchSize? ​

optional batchSize?: number

Defined in: filing.ts:32

Rows per native batch (default 1024). A tuning knob; results don't depend on it.

Inherited from ​

FilingOptions.batchSize


proxy? ​

optional proxy?: ProxyOption

Defined in: filing.ts:48

Fetch through a proxy. docquery.fec.gov sends no CORS headers, so a browser page can't read a filing directly. Not needed in Node, Deno or Bun.

  • a string containing {url}: that placeholder is replaced by the URL-encoded filing URL ("https://proxy.example/fetch?u={url}");
  • any other string: a prefix for the URL-encoded filing URL ("https://proxy.example/?url=");
  • a function: given the filing URL, returns the URL to fetch.

signal? ​

optional signal?: AbortSignal

Defined in: filing.ts:50

Abort the download. Combined with timeout: whichever comes first.


timeout? ​

optional timeout?: number

Defined in: filing.ts:52

Milliseconds before the download is aborted (default 60 000; Infinity for none).