import type { CatalogImageFocal, KioskProduct } from './types.js'; /** * IMG-014 metadata-only SSE patch. Clients may rewrite existing signed * `imageUrl` / `thumbnailUrl` query strings with a cache-bust param (`v`) — * never invent or replace signed URL paths from the broadcast (no imageUrl in payload). * * Contract: HMAC verify ignores `v` (not in canonical payload); stream query * schemas must allow optional `v` so patched URLs still validate. * * Bust key preference: `catalogSequence` → `primaryImageId` → `updatedAt`. * When SSE is fully unavailable, customer/kiosk fall back to ~30s catalog poll; * this patch path does not run until the next successful poll/refetch. */ export interface CatalogProductMediaPatch extends CatalogImageFocal { productId: number; variantId?: number | null; primaryImageId?: number | null; /** Product.galleryVersion from save broadcast — preferred cache-bust key. */ catalogSequence?: number; updatedAt?: string; } export declare function resolveCatalogMediaCacheBustKey(patch: Pick): string | null; /** * Append or replace client-only `v` on an existing catalog image URL. * Does not touch `sig` / `exp` / `imageId` (HMAC stays valid — verify ignores `v`; * server stream schema must accept optional `v`). */ export declare function applyCatalogMediaUrlCacheBust(url: string | null | undefined, bustKey: string): string | null | undefined; export declare function patchCatalogProductMedia(products: readonly KioskProduct[], patch: CatalogProductMediaPatch): KioskProduct[]; //# sourceMappingURL=catalogMediaPatch.d.ts.map