import { ChartBundle, ChartMetric, ChartRange } from "./charts.js"; import { z } from "zod/v4"; //#region src/model/charts.schema.d.ts /** * Runtime schemas for {@link ./charts.js}, see the note in * `primitives.schema.ts` on why they are written by hand. * * Metric schemas are shared with the backend, while * {@link chartBundleSchemaFor} builds the response schema for one concrete * request. Component schemas remain available for consumers that validate * model fragments. **/ /** * {@link ChartRange} **/ export declare const chartRangeSchema: z.ZodEnum<{ "1d": "1d"; "1m": "1m"; "1w": "1w"; "1y": "1y"; max: "max"; }>; /** * {@link PoolOpportunityChartMetric} **/ export declare const poolOpportunityChartMetricSchema: z.ZodEnum<{ borrowed: "borrowed"; depositApy: "depositApy"; depositApyAvg7d: "depositApyAvg7d"; dieselRate: "dieselRate"; rewardsApyAvg7d: "rewardsApyAvg7d"; supplied: "supplied"; utilization: "utilization"; }>; /** * {@link StrategyOpportunityChartMetric} **/ export declare const strategyOpportunityChartMetricSchema: z.ZodEnum<{ borrowApy: "borrowApy"; borrowApyAvg7d: "borrowApyAvg7d"; collateralApy: "collateralApy"; collateralPrice: "collateralPrice"; collateralUsdPrice: "collateralUsdPrice"; liquidationThreshold: "liquidationThreshold"; quotaRate: "quotaRate"; quotaRateAvg7d: "quotaRateAvg7d"; rewardsApyAvg7d: "rewardsApyAvg7d"; tvl: "tvl"; underlyingUsdPrice: "underlyingUsdPrice"; }>; /** * {@link PoolPositionChartMetric} **/ export declare const poolPositionChartMetricSchema: z.ZodEnum<{ apy: "apy"; apyAvg7d: "apyAvg7d"; mwr: "mwr"; pnl: "pnl"; }>; /** * {@link StrategyPositionChartMetric} **/ export declare const strategyPositionChartMetricSchema: z.ZodEnum<{ borrowApy: "borrowApy"; borrowApyAvg7d: "borrowApyAvg7d"; debt: "debt"; healthFactor: "healthFactor"; mwr: "mwr"; netApy7d: "netApy7d"; pnl: "pnl"; totalValueUnderlying: "totalValueUnderlying"; }>; /** * {@link ProtocolChartMetric} **/ export declare const protocolChartMetricSchema: z.ZodEnum<{ tvlUsd: "tvlUsd"; }>; /** * {@link ChartMetric}, every metric any subject can chart. **/ export declare const chartMetricSchema: z.ZodUnion, z.ZodEnum<{ borrowApy: "borrowApy"; borrowApyAvg7d: "borrowApyAvg7d"; collateralApy: "collateralApy"; collateralPrice: "collateralPrice"; collateralUsdPrice: "collateralUsdPrice"; liquidationThreshold: "liquidationThreshold"; quotaRate: "quotaRate"; quotaRateAvg7d: "quotaRateAvg7d"; rewardsApyAvg7d: "rewardsApyAvg7d"; tvl: "tvl"; underlyingUsdPrice: "underlyingUsdPrice"; }>, z.ZodEnum<{ apy: "apy"; apyAvg7d: "apyAvg7d"; mwr: "mwr"; pnl: "pnl"; }>, z.ZodEnum<{ borrowApy: "borrowApy"; borrowApyAvg7d: "borrowApyAvg7d"; debt: "debt"; healthFactor: "healthFactor"; mwr: "mwr"; netApy7d: "netApy7d"; pnl: "pnl"; totalValueUnderlying: "totalValueUnderlying"; }>, z.ZodEnum<{ tvlUsd: "tvlUsd"; }>]>; /** * {@link ChartQuery} **/ export declare const chartQuerySchema: z.ZodObject<{ metrics: z.ZodReadonly, z.ZodEnum<{ borrowApy: "borrowApy"; borrowApyAvg7d: "borrowApyAvg7d"; collateralApy: "collateralApy"; collateralPrice: "collateralPrice"; collateralUsdPrice: "collateralUsdPrice"; liquidationThreshold: "liquidationThreshold"; quotaRate: "quotaRate"; quotaRateAvg7d: "quotaRateAvg7d"; rewardsApyAvg7d: "rewardsApyAvg7d"; tvl: "tvl"; underlyingUsdPrice: "underlyingUsdPrice"; }>, z.ZodEnum<{ apy: "apy"; apyAvg7d: "apyAvg7d"; mwr: "mwr"; pnl: "pnl"; }>, z.ZodEnum<{ borrowApy: "borrowApy"; borrowApyAvg7d: "borrowApyAvg7d"; debt: "debt"; healthFactor: "healthFactor"; mwr: "mwr"; netApy7d: "netApy7d"; pnl: "pnl"; totalValueUnderlying: "totalValueUnderlying"; }>, z.ZodEnum<{ tvlUsd: "tvlUsd"; }>]>>>; range: z.ZodEnum<{ "1d": "1d"; "1m": "1m"; "1w": "1w"; "1y": "1y"; max: "max"; }>; }, z.core.$strip>; /** * {@link ChartQuery} as a URL can carry it: the metrics comma-joined, since * repeated `?metrics=` entries would order differently between clients and give * one request two cache keys. **/ export declare const chartQueryParamsSchema: z.ZodObject<{ metrics: z.ZodString; range: z.ZodEnum<{ "1d": "1d"; "1m": "1m"; "1w": "1w"; "1y": "1y"; max: "max"; }>; }, z.core.$strip>; /** * Codec for {@link ChartQuery} to encode/decode to/from url query parameters. * * The one place the wire form of a chart request is decided. The SDK encodes * with it, the backend decodes with it, and the checks that a read names at * least one metric and names none of them twice ride along in both directions — * so a bad request fails before it is issued, not after a round trip. **/ export declare const chartQueryCodec: z.ZodCodec; }, z.core.$strip>, z.ZodObject<{ metrics: z.ZodReadonly, z.ZodEnum<{ borrowApy: "borrowApy"; borrowApyAvg7d: "borrowApyAvg7d"; collateralApy: "collateralApy"; collateralPrice: "collateralPrice"; collateralUsdPrice: "collateralUsdPrice"; liquidationThreshold: "liquidationThreshold"; quotaRate: "quotaRate"; quotaRateAvg7d: "quotaRateAvg7d"; rewardsApyAvg7d: "rewardsApyAvg7d"; tvl: "tvl"; underlyingUsdPrice: "underlyingUsdPrice"; }>, z.ZodEnum<{ apy: "apy"; apyAvg7d: "apyAvg7d"; mwr: "mwr"; pnl: "pnl"; }>, z.ZodEnum<{ borrowApy: "borrowApy"; borrowApyAvg7d: "borrowApyAvg7d"; debt: "debt"; healthFactor: "healthFactor"; mwr: "mwr"; netApy7d: "netApy7d"; pnl: "pnl"; totalValueUnderlying: "totalValueUnderlying"; }>, z.ZodEnum<{ tvlUsd: "tvlUsd"; }>]>>>; range: z.ZodEnum<{ "1d": "1d"; "1m": "1m"; "1w": "1w"; "1y": "1y"; max: "max"; }>; }, z.core.$strip>>; /** * {@link ChartDenomination} **/ export declare const chartDenominationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"bps">; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"usd">; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"scalar">; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"token">; base: z.ZodObject<{ chainId: z.ZodNumber; address: z.ZodCodec>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; assetType: z.ZodOptional, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"ratio">; base: z.ZodObject<{ chainId: z.ZodNumber; address: z.ZodCodec>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; assetType: z.ZodOptional, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>; }, z.core.$strip>; quote: z.ZodObject<{ chainId: z.ZodNumber; address: z.ZodCodec>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; assetType: z.ZodOptional, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>; }, z.core.$strip>; }, z.core.$strip>], "unit">; /** * {@link ChartValue}. `null` is a gap, never a zero. **/ export declare const chartValueSchema: z.ZodNullable; /** * {@link ChartSeries} **/ export declare const chartSeriesSchema: z.ZodUnion; values: z.ZodArray>; }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{ unit: z.ZodLiteral<"bps">; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"usd">; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"scalar">; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"token">; base: z.ZodObject<{ chainId: z.ZodNumber; address: z.ZodCodec>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; assetType: z.ZodOptional, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ unit: z.ZodLiteral<"ratio">; base: z.ZodObject<{ chainId: z.ZodNumber; address: z.ZodCodec>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; assetType: z.ZodOptional, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>; }, z.core.$strip>; quote: z.ZodObject<{ chainId: z.ZodNumber; address: z.ZodCodec>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; assetType: z.ZodOptional, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>; }, z.core.$strip>; }, z.core.$strip>], "unit">>, z.ZodObject<{ status: z.ZodLiteral<"unavailable">; reason: z.ZodObject<{ code: z.ZodEnum<{ internal: "internal"; no_price_feed: "no_price_feed"; not_indexed: "not_indexed"; unknown_subject: "unknown_subject"; unsupported_metric: "unsupported_metric"; }>; message: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>]>; /** * {@link ChartWindow} **/ export declare const chartWindowSchema: z.ZodObject<{ range: z.ZodEnum<{ "1d": "1d"; "1m": "1m"; "1w": "1w"; "1y": "1y"; max: "max"; }>; from: z.ZodNumber; to: z.ZodNumber; }, z.core.$strip>; /** * The schema one chart read is decoded with: a {@link ChartBundle} keyed by the * requested distinct metrics, all of them and nothing else, for the requested * range. * * Pinning the metrics is what upholds the `ChartBundle` a caller gets * back — a response that answers a different question fails validation rather * than being cast into the requested shape. The declared return type is the one * the key schema actually enforces, which the compiler cannot see through a * schema built from a runtime list. **/ export declare function chartBundleSchemaFor(metrics: Metrics, range: ChartRange): z.ZodType>; //#endregion