@adcp/sdk API Reference - v14.3.0
    Preparing search index...

    Function applyTargetingInput

    • Apply a request-only Targeting Input patch to the prior effective overlay.

      Use this on the update path. Implements the three states per dimension: a dimension absent from the patch keeps its prior value, a dimension set to null is cleared, and a non-null dimension replaces the prior value completely.

      A null patch (rather than a patch containing nulls) clears the whole overlay; an undefined patch leaves the prior overlay untouched, which is how "the request did not mention targeting" is distinguished from "the request asked to clear it".

      The merge is one level deep. property_list / collection_list are reference objects keyed by list_id, so a partial merge of one would be meaningless — a top-level replace is the correct semantics.

      Type Parameters

      • TOverlay extends object

      Parameters

      Returns TOverlay | undefined

      applyTargetingInput({ geo_countries: ['US'], audience_include: [...] }, { audience_include: null });
      // → { geo_countries: ['US'] } — only the named dimension is cleared