export interface PurchaseProduct { /** * The external product ID. * * Kept for backward compatibility. When `sku` is not provided, this value * is sent as the `sku` of the corresponding `line_items` entry. At least * one of `sku` or `extProductId` is required. */ extProductId?: string; /** * The unit price of the product, including line-level discounts. */ price: number; /** * The quantity purchased. */ quantity: number; /** * The product variant or unit name. */ productName?: string; /** * The SKU (SKU/barcode/GTIN/MPN or external id). * * When present it takes precedence over `extProductId` on the wire. */ sku?: string; } export default interface TrackPurchaseParameters { /** * A unique identifier for the user's order. Required. */ orderId: string; /** * The final amount paid, including taxes, shipping, and discounts. * Sent as `order_value`. * * Required for Shopping V2 purchase tracking parity with Web. */ value?: number; /** * The ISO 4217 currency code of the purchase value. * * Required for Shopping V2 purchase tracking parity with Web. */ currencyCode?: string; /** * The country code of the purchase. */ countryCode?: string; /** * The shipping price of the order. */ shippingPrice?: number; /** * The items cost before discounts, taxes, and shipping. * * Required for Shopping V2 purchase tracking parity with Web. */ subtotal?: number; /** * The total discounts applied to the order. Sent as `total_discounts`. */ totalDiscounts?: number; /** * The purchased items of the order. Sent as `line_items`. * * Required (non-empty) for Shopping V2 purchase tracking parity with Web. */ products?: PurchaseProduct[]; /** * Any additional information associated to the purchase. * Reserved keys: order_id, order_value, value, currency, country, * shipping_price, subtotal, total_discounts, line_items, product. * Any values passed in the additionalInfo that use a reserved key will be ignored. */ additionalInfo?: { [key: string]: string }; }