import { AuthenticatedMedusaRequest, MedusaNextFunction, MedusaResponse, MedusaStoreRequest } from "@medusajs/framework/http"; import type { MedusaContainer, MedusaPricingContext, TaxCalculationContext } from "@medusajs/framework/types"; type WrappableVariant = { id: string; offers?: unknown[]; }; type WrappableProduct = { variants?: WrappableVariant[] | null; }; /** * The `offer ↔ variant` link is shared across sellers, so a raw graph * traversal would surface every seller's offers on a master variant. */ export declare const wrapProductVariantsWithOffers: (scope: MedusaContainer, products: WrappableProduct[], sellerId?: string) => Promise; type OfferAwareRequest = AuthenticatedMedusaRequest & { seller_context?: { seller_id?: string; }; }; export declare const applyOfferedProductsFilter: (req: OfferAwareRequest, _res: MedusaResponse, next: MedusaNextFunction) => Promise; export declare const applyGroupedOfferProductFilter: (req: OfferAwareRequest, _res: MedusaResponse, next: MedusaNextFunction) => Promise; type StoreRequestWithContext = MedusaStoreRequest & { pricingContext?: MedusaPricingContext; taxContext?: { taxLineContext?: TaxCalculationContext; taxInclusivityContext?: { automaticTaxes: boolean; }; }; }; type PriceableVariant = { id: string; offer_id?: string | null; calculated_price?: Record | null; }; type PriceableProduct = { id?: string; variants?: PriceableVariant[] | null; }; /** * Sets each variant's cheapest offer as `variant.offer_id` + its * `variant.calculated_price`, in place. Offer prices share the variant price * set scoped by an `offer_id` rule, so passing the union of offer ids as the * pricing context lets one batched `calculatePrices` return the lowest matching * price per price set; `offer_id` is recovered from the winning price row via a * `price.id → offer.id` map. Variants without an offer get `null` for both. * No-ops without a pricing context (caller did not request calculated prices). */ export declare const wrapProductVariantsWithOfferPrice: (req: StoreRequestWithContext, products: PriceableProduct[]) => Promise; export {};