import type { Variant } from './Variant'; import type { VariationAttribute } from './VariationAttribute'; import type { VariationGroup } from './VariationGroup'; import type { ProductType } from './ProductType'; import type { ProductPriceTable } from './ProductPriceTable'; import type { ProductRef } from './ProductRef'; import type { ImageGroup } from './ImageGroup'; import type { Image } from './Image'; import type { PriceRange } from './PriceRange'; import type { ProductPromotion } from './ProductPromotion'; /** * @type ProductSearchHit: Document representing a product search hit. * * @property currency: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. * - **Pattern:** /^([A-Z][A-Z][A-Z]|N\/A)$/ * * @property hitType: The type information for the search hit. * - **Max Length:** 256 * * @property image: The first image of the product hit for the configured viewtype. * * @property orderable: A flag indicating whether the product is orderable. * * @property price: The sales price of the product. In complex products, like master or set, this is the minimum price of related child products. * * @property priceMax: The maximum sales of related child products in complex products like master or set. * * @property productId: The ID (SKU) of the product. * - **Min Length:** 1 * - **Max Length:** 100 * * @property productName: The localized name of the product. * - **Max Length:** 4000 * * @property productType: The type information for the product. * * @property representedProduct: The first represented product. * * @property representedProducts: All the represented products. * * @property variationAttributes: The array of represented variation attributes, for the master product only. This array can be empty. * * @property imageGroups: The array of product image groups. * * @property priceRanges: Array of one or more price range objects representing one or more Pricebooks in context for the site. * * @property productPromotions: The array of active customer product promotions for this product. This array can be empty. Coupon promotions are not returned in this array. * * @property tieredPrices: The document represents list of tiered prices if the product is a variant * * @property variants: The array of actual variants. Only for master, variation group, and variant types. This array can be empty. * * @property variationGroups: The array of actual variation groups. Only for master, variation group, and variant types. This array can be empty. * * @property slug: SEO-friendly URL slug for the product, derived from the site\'s configured product URL rule. Returned only when `expand=slug` is requested. Use the slug to construct user-friendly product detail page URLs (for example, /products/{slug}/{productId}). * - **Max Length:** 256 * */ export type ProductSearchHit = { currency?: string; hitType?: string; image?: Image; orderable?: boolean; price?: number; priceMax?: number; productId: string; productName?: string; productType?: ProductType; representedProduct?: ProductRef; representedProducts?: Array; variationAttributes?: Array; imageGroups?: Array; priceRanges?: Array; productPromotions?: Array; tieredPrices?: Array; variants?: Array; variationGroups?: Array; slug?: string; } & { [key: string]: any; };