feat(media-buy): allowed_actions + available_actions for update_media_buy (#4480)#4514
Open
nastassiafulconis wants to merge 1 commit into
Open
feat(media-buy): allowed_actions + available_actions for update_media_buy (#4480)#4514nastassiafulconis wants to merge 1 commit into
nastassiafulconis wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
structured action vocabulary for
update_media_buycapability discovery, so buyers can pre-flight which mutations are valid on a buy instead of failing mid-flight. composes with #4425'srequirespredicate grammar (one grammar, many fields; #4480'savailable_actions[]is a first-class field it can query).shape:
allowed_actions[]on Product (advisory template,modes[], optionalallowed_statuses[], optionalsla, optionalterms_ref)available_actions[]onget_media_buys/create_media_buy/update_media_buyresponses (authoritative per-buy, singularmode, optionalsla, optionalterms_ref; uniquely keyed byaction)media-buy-valid-actionenum extended with finer-grained values;enumMetadatacarriesupdate_fieldsper action plusdeprecated: true+rollupon the 4 legacy coarse values so SDKs can dispatch from schema and hide legacy values when rollup targets are presentvalid_actions[]deprecated in favor ofavailable_actions[], removed in 4.0ACTION_NOT_ALLOWEDerror code with typederror-details/action-not-allowed.json(attempted_action,reason,currently_available_actions)update_media_buyfield mapping table inupdate_media_buy.mdxreviewed 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
node scripts/build-schemas.cjspasses clean (65 error codes, 81 bundled schemas; +1 code and +6 schemas vs main)@adcp/client, then agentic-api fix: per-item errors use error.json ref instead of bare strings #2060 upgrade)refs #4480, #4425