Extract the seller-authoritative media-buy lifecycle status from mixed-version
response payloads.
AdCP 3.1 renamed the media-buy lifecycle field from top-level status to
media_buy_status to avoid colliding with task/envelope status. Prefer the
canonical field when it is present; otherwise fall back to legacy status
only when it is a valid MediaBuyStatus. Transport/task-only statuses such as
submitted, working, failed, and input-required return undefined.
For explicit 3.1+ payloads, bare status values that also appear in
TaskStatus (completed, rejected, canceled) are ambiguous because they
may be only the task envelope status; use media_buy_status to report those
media-buy lifecycle states.
Extract the seller-authoritative media-buy lifecycle status from mixed-version response payloads.
AdCP 3.1 renamed the media-buy lifecycle field from top-level
statustomedia_buy_statusto avoid colliding with task/envelopestatus. Prefer the canonical field when it is present; otherwise fall back to legacystatusonly when it is a valid MediaBuyStatus. Transport/task-only statuses such assubmitted,working,failed, andinput-requiredreturn undefined. For explicit 3.1+ payloads, barestatusvalues that also appear in TaskStatus (completed,rejected,canceled) are ambiguous because they may be only the task envelope status; usemedia_buy_statusto report those media-buy lifecycle states.