Skip to content

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

PropertyModifierTypeDescriptionDefined in
fetchImpl?readonly(input, init?) => Promise<Response>Optional fetch override — useful in tests.pricing/src/refresh.ts:31
headers?readonlyReadonly<Record&lt;string, string&gt;>Optional headers (auth, conditional GET, etc.).pricing/src/refresh.ts:29
signal?readonlyAbortSignalCaller-supplied abort signal, combined with the timeout.pricing/src/refresh.ts:45
snapshotDate?readonlystringOverride the snapshot date stamped on the result. Defaults to today.pricing/src/refresh.ts:33
timeoutMs?readonlynumberHard 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
urlreadonlystringSnapshot URL — typically the upstream pricing JSON.pricing/src/refresh.ts:27
version?readonlystringOverride the snapshot version string. Defaults to 'graphorin/0.1+refreshed'.pricing/src/refresh.ts:35