Extract preview URLs from products' product_card fields.
AdCP 3.1.0-beta.2 changed product_card from a creative-agent-rendered
shape ({ format_id, manifest }) to a self-contained visual card
({ image, title, description, price_label, cta_label }). The card IS
the preview — no creative-agent round-trip required. This function now
extracts the image URL directly from the inline card.
Products with no product_card, or with a card that lacks an image.url,
return a result with no previewUrl. The function preserves its
Promise<PreviewResult[]> return shape so existing adopters' code paths
keep compiling and behaving correctly.
Extract preview URLs from products'
product_cardfields.AdCP 3.1.0-beta.2 changed
product_cardfrom a creative-agent-rendered shape ({ format_id, manifest }) to a self-contained visual card ({ image, title, description, price_label, cta_label }). The card IS the preview — no creative-agent round-trip required. This function now extracts the image URL directly from the inline card.Products with no
product_card, or with a card that lacks animage.url, return a result with nopreviewUrl. The function preserves itsPromise<PreviewResult[]>return shape so existing adopters' code paths keep compiling and behaving correctly.