@coveo/headless-react
    Preparing search index...

    Interface ProductEnrichment

    interface ProductEnrichment {
        state: ProductEnrichmentState;
        getBadges(): void;
        subscribe(listener: () => void): Unsubscribe;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Methods

    Properties

    The state of the ProductEnrichment controller.

    Methods

    • Fetches badges for the configured product and placement IDs.

      The results are accessible through the controller's state.products property.

      Returns void

      This method will not execute if no placement IDs were provided during controller initialization. The request will include the configured productId in the context if provided.

    • Adds a callback that's invoked on state change.

      Parameters

      • listener: () => void

        A callback that's invoked on state change.

      Returns Unsubscribe

      A function to remove the listener.