Graphorin API reference v0.12.1
Graphorin API reference / @graphorin/pricing / / RefreshPricingOptions
Interface: RefreshPricingOptions
Defined in: packages/pricing/src/refresh.ts:26
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. | packages/pricing/src/refresh.ts:32 |
format? | readonly | "genai-prices" | "auto" | "graphorin" | W-097: accepted body format. 'auto' (default) tries the native graphorin shape, then auto-detects + converts the @pydantic/genai-prices dataset; the explicit values pin one format and fail fast on anything else. | packages/pricing/src/refresh.ts:53 |
headers? | readonly | Readonly<Record<string, string>> | Optional headers (auth, conditional GET, etc.). | packages/pricing/src/refresh.ts:30 |
signal? | readonly | AbortSignal | Caller-supplied abort signal, combined with the timeout. | packages/pricing/src/refresh.ts:46 |
snapshotDate? | readonly | string | Override the snapshot date stamped on the result. Defaults to today. | packages/pricing/src/refresh.ts:34 |
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. | packages/pricing/src/refresh.ts:44 |
url | readonly | string | Snapshot URL - typically the upstream pricing JSON. | packages/pricing/src/refresh.ts:28 |
version? | readonly | string | Override the snapshot version string. Defaults to 'graphorin/0.1+refreshed'. | packages/pricing/src/refresh.ts:36 |