Skip to main content

Interface: FamilyDefaults

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

What a family runtime can install with registerFamilyDefaults.

Remarks​

Each field is a default the user's configure can still override; see resolveFamily for the exact precedence.

Properties​

auth?​

optional auth?: AuthProvider

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

The family's default auth provider (e.g. the nfl_api token minting).


classifyError?​

optional classifyError?: ClassifyError

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

Map a final failed response to a family-specific error (e.g. PFF's error envelope in the message, or pro.nfl.com's empty 200 -> InvalidParameterError). It sees a non-2xx that outlived the retries and a 2xx whose body is empty or, for a JSON request, not JSON. 404 (NoDataError) and 400 / 422 (InvalidParameterError) are classified by request() and never reach it.


retries?​

optional retries?: number

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

The family's retry budget (sdv-py passes e.g. num_retries=4 for PFF). configure({ retries }) still wins when the user set it.


retryStatuses?​

optional retryStatuses?: readonly number[]

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

Statuses worth retrying for this family. Auth-gated families drop 403 — there it is a real forbidden / entitlement, not load.


timeoutMs?​

optional timeoutMs?: number

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

The family's per-request timeout in ms (e.g. NFL Pro's slow tables). configure({ timeoutMs }) still wins when the user set it.


transport?​

optional transport?: Transport

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

The family's default transport (e.g. TLS impersonation for stats.nba.com).