OptionalbigOptionalcuratedEndpoints the registry lacks. Defaults to the list shipped with this package.
OptionaldefaultExtra headers sent on every request. The values of credential headers (Authorization, Proxy-Authorization, X-API-Key, Cookie) are kept out of logged clients and errors, and go only to the origin of the URL a request starts at (see fetchJson).
OptionalmaxRedirects (301/302/303/307/308) followed per request, same host only. Defaults to 3; 0 disables; at most MAX_REDIRECTS. Any other 3xx, one without a Location, and one past this limit surface as an OparlApiError naming the target.
OptionalmaxHard cap on response body size in bytes (defends against memory exhaustion from a hostile/buggy endpoint). Defaults to 100 MiB; set to 0 for no limit. A non-negative integer.
OptionalmaxNumber of automatic retries for transient 429/503 responses and reset connections (ECONNRESET, EPIPE, ECONNABORTED, UND_ERR_SOCKET): 0 to MAX_RETRIES. Timeouts are not retried, nor is an answer whose Retry-After is over MAX_RETRY_AFTER_MS (30 s): its error comes at once and names the wait.
OptionalonCalled once per retry, right before the backoff sleep, for each retried 429/503 and reset connection; never when there is no retry. A throw is swallowed.
OptionalonCalled with a one-line warning about an answer the engine delivered changed: characters
that were not valid text — invalid bytes in the declared (or default UTF-8) charset, or a
lone surrogate written as a JSON escape — replaced with U+FFFD. The message names the
request and the count (GET <url>: 2 characters of the answer were not valid text …).
Without it the replacement is silent. A throw is swallowed. The CLI logs it as a WARN
record of oparl.api.
OptionalregistryLive checks of registry entries. Defaults to the checks shipped with this package.
OptionalregistryURL of the endpoint registry. Defaults to https://dev.oparl.org/api/endpoints. An http(s) URL, checked by the constructor (OparlValidationError); any userinfo is dropped.
OptionalretryBase backoff between retries in milliseconds (default 500), 0 to MAX_RETRY_AFTER_MS (30 000). Grows linearly per attempt for a 503 and a reset; a 429 waits at least 1 s, doubling per attempt. A Retry-After header (seconds or an HTTP date) can lengthen a wait, never shorten it, up to 30 s; a longer one is not retried.
OptionalsleepInjectable sleep, primarily for deterministic tests.
OptionaltimeoutTime limit per request in milliseconds, covering the whole response body, not only idle gaps (0 disables). Defaults to 120 s: some council systems take well over 30 s to render a single list page. A non-negative integer, capped at MAX_TIMEOUT_MS. The engine enforces it for every transport.
OptionaltransportSwappable transport. Defaults to the built-in node http/https transport. The engine
enforces timeoutMs and maxResponseBytes on any transport and checks the shape of
what it returns (see HttpResponse).
OptionaluserValue of the User-Agent header.
Member names whose number values may exceed 2^53 (a 64-bit id). The value of a declared member is delivered as its exact literal, as written, as a JSON string (
"5"), so its type never depends on its size. A declared member whose value is not a number (a string,null, an object) is left as it is. Every undeclared number keeps the rule: exact, or an OparlParseError. Matched by name anywhere in a JSON answer, an escaped name ("\u0073ize") included. Defaults to none (OParl declares none); anything but a set or list of non-empty strings is an OparlValidationError. The set is copied.