@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Function normalizePackageParams

    • Normalize a single package's params for backward compatibility.

      Handles:

      • optimization_goal (scalar) → optimization_goals (array)
      • catalog (scalar object) → catalogs (array)

      Does NOT copy context.buyer_ref up to a top-level buyer_ref. The top-level field was removed from the package schema in AdCP 3.0 and strict v3 receivers reject it. When a request routes to a v2.5 seller, the v2 adapter in creative-adapter.ts derives buyer_ref (from a caller-supplied value, context.buyer_ref, idempotency_key, or parent/index) — that adapter is gated on serverVersion !== 'v3', so the field only lands on the wire for sellers that still expect it.

      Parameters

      • pkg: any

      Returns any