Skip to content

feat(media-buy): allowed_actions + available_actions for update_media_buy (#4480)#4514

Open
nastassiafulconis wants to merge 1 commit into
mainfrom
nastassiafulconis/allowed-actions-rfc-4480
Open

feat(media-buy): allowed_actions + available_actions for update_media_buy (#4480)#4514
nastassiafulconis wants to merge 1 commit into
mainfrom
nastassiafulconis/allowed-actions-rfc-4480

Conversation

@nastassiafulconis
Copy link
Copy Markdown
Collaborator

Summary

structured action vocabulary for update_media_buy capability discovery, so buyers can pre-flight which mutations are valid on a buy instead of failing mid-flight. composes with #4425's requires predicate grammar (one grammar, many fields; #4480's available_actions[] is a first-class field it can query).

shape:

  • allowed_actions[] on Product (advisory template, modes[], optional allowed_statuses[], optional sla, optional terms_ref)
  • available_actions[] on get_media_buys / create_media_buy / update_media_buy responses (authoritative per-buy, singular mode, optional sla, optional terms_ref; uniquely keyed by action)
  • media-buy-valid-action enum extended with finer-grained values; enumMetadata carries update_fields per action plus deprecated: true + rollup on the 4 legacy coarse values so SDKs can dispatch from schema and hide legacy values when rollup targets are present
  • valid_actions[] deprecated in favor of available_actions[], removed in 4.0
  • ACTION_NOT_ALLOWED error code with typed error-details/action-not-allowed.json (attempted_action, reason, currently_available_actions)
  • normative action → update_media_buy field mapping table in update_media_buy.mdx

reviewed by ad-tech-protocol-expert, code-reviewer, dx-expert; fixes from those reviews are included (frequency_cap singular, budget mapping accuracy, typed error-details schema, enumMetadata.update_fields, uniqueness-by-action note, predicate addressing semantic).

Test plan

refs #4480, #4425

…ys (#4480)

structured action vocabulary for update_media_buy capability discovery so
buyers can pre-flight which mutations are valid instead of failing mid-flight.

- extends media-buy-valid-action enum with finer-grained values; legacy coarse
  values retained for 3.x backwards compat (removed in 4.0)
- adds allowed_actions[] on Product (advisory template, modes[], allowed_statuses[])
- adds available_actions[] on get_media_buys, create_media_buy, update_media_buy
  responses (authoritative per-buy, singular mode, optional sla, optional terms_ref)
- adds enums: media-buy-action-mode, action-not-allowed-reason
- adds core types: sla-window, product-allowed-action, media-buy-available-action
- adds ACTION_NOT_ALLOWED error code + typed error-details/action-not-allowed.json
- adds enumMetadata on media-buy-valid-action with update_fields per action plus
  deprecated+rollup on legacy coarse values so SDKs can dispatch and hide legacy
  values when finer rollup targets are present
- deprecates valid_actions[] in favor of available_actions[] (removed in 4.0)
- documents normative action -> field mapping in update_media_buy.mdx

composes with #4425's requires predicate grammar.

refs #4480, #4425

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant