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

    Function withFormatOptions

    • Augment every Product in a get_products response with format_options[]. Returns { response, diagnostics } so callers can surface projection diagnostics alongside the response's existing errors[] array (or filter by source: 'sdk' to distinguish SDK diagnostics from seller-emitted errors).

      Idempotent: if the seller is v2-native and every Product already carries format_options[], returns the response verbatim with no diagnostics.

      Type Parameters

      Parameters

      • response: R

      Returns {
          response: R & { products: V2AugmentedProduct<V1Product>[] };
          diagnostics: ProjectionDiagnostic[];
      }

      toCanonicalOnlyResponse — the canonical-only counterpart that DROPS format_ids[] for a fully-migrated consumer.