Skip to main content

Interface: ConfigureOptions

Defined in: src/core/config.ts:28

What configure accepts. Every field is optional; calls merge.

Remarks​

Family stems are the keys request() is called with ("site_v2", "mlb", "nfl_api", "nba_stats", …). A bare transport function is the same as { default: transport }.

Properties​

auth?​

optional auth?: Record<string, AuthProvider>

Defined in: src/core/config.ts:35

Auth providers keyed by family stem. There is no "default" fallback for auth on purpose: credentials are only ever sent to the family they belong to.


retries?​

optional retries?: number

Defined in: src/core/config.ts:40

Retries after the first attempt (default 3): network errors may use all of them, the family's retry statuses at most min(retries, 4).


timeoutMs?​

optional timeoutMs?: number

Defined in: src/core/config.ts:42

Per-request timeout in milliseconds (default 30000).


transport?​

optional transport?: Transport | Record<string, Transport>

Defined in: src/core/config.ts:30

One transport for every family, or a map keyed by family stem with an optional "default".


userAgent?​

optional userAgent?: string

Defined in: src/core/config.ts:44

User-Agent sent when neither the caller nor the auth provider sets one.