Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/pricing / / RefreshPricingOptions
Interface: RefreshPricingOptions
Defined in: pricing/src/refresh.ts:25
Configuration shape for refreshPricing. The fetchImpl override exists so tests can exercise the function without making a real network call.
Stable
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
fetchImpl? | readonly | (input, init?) => Promise<Response> | Optional fetch override — useful in tests. | pricing/src/refresh.ts:31 |
headers? | readonly | Readonly<Record<string, string>> | Optional headers (auth, conditional GET, etc.). | pricing/src/refresh.ts:29 |
signal? | readonly | AbortSignal | Caller-supplied abort signal, combined with the timeout. | pricing/src/refresh.ts:45 |
snapshotDate? | readonly | string | Override the snapshot date stamped on the result. Defaults to today. | pricing/src/refresh.ts:33 |
timeoutMs? | readonly | number | Hard timeout for the network fetch in milliseconds. Default 30000. Aborts the request (and throws) if the upstream is slow or unreachable so graphorin pricing refresh cannot hang. Pass an explicit RefreshPricingOptions.signal to manage cancellation yourself; the two are combined. | pricing/src/refresh.ts:43 |
url | readonly | string | Snapshot URL — typically the upstream pricing JSON. | pricing/src/refresh.ts:27 |
version? | readonly | string | Override the snapshot version string. Defaults to 'graphorin/0.1+refreshed'. | pricing/src/refresh.ts:35 |