ov25-ui
Version:
A UI configurator for OV25 product visualization
14 lines (13 loc) • 747 B
TypeScript
import type { UnifiedPricePayload, UnifiedSkuPayload } from '../types/inject-config.js';
/** Parses iframe `payload` when it is JSON string or already an object. */
export declare function parseIframeJsonPayload(data: unknown): unknown;
/**
* Maps raw CURRENT_SKU JSON from the iframe into a discriminated unified shape
* (`mode` + `lines`, plus legacy top-level fields for single-product).
*/
export declare function normalizeSkuPayload(data: unknown): UnifiedSkuPayload | null;
/**
* Maps raw CURRENT_PRICE JSON from the iframe into a unified shape with `mode`, `lines`,
* order-level totals, and optional passthrough of legacy breakdown arrays.
*/
export declare function normalizePricePayload(data: unknown): UnifiedPricePayload | null;