@adcp/sdk API Reference - v10.0.1
    Preparing search index...

    Interface EnsureGetProductsCacheScopeOptions

    interface EnsureGetProductsCacheScopeOptions {
        defaultCacheScope?: GetProductsCacheScope;
        onInject?: (
            event: {
                cache_scope: GetProductsCacheScope;
                reason: "unchanged" | "products_present";
                product_count?: number;
            },
        ) => void;
    }
    Index

    Properties

    defaultCacheScope?: GetProductsCacheScope

    Scope to stamp when a populated or unchanged get_products response omits cache_scope. Defaults to 'account', the fail-closed choice for composed storefronts and upstream inventory adapters.

    onInject?: (
        event: {
            cache_scope: GetProductsCacheScope;
            reason: "unchanged" | "products_present";
            product_count?: number;
        },
    ) => void

    Optional observability hook for callers that want to track SDK injection.