@adcp/sdk 6.7.0 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADCP_VERSION +1 -1
- package/bin/adcp.js +15 -3
- package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/inventory_list_targeting.yaml +5 -0
- package/compliance/cache/{3.0.5 → 3.0.6}/index.json +2 -2
- package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +5 -0
- package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/sales-guaranteed/index.yaml +1 -1
- package/compliance/cache/{3.0.5 → 3.0.6}/universal/storyboard-schema.yaml +15 -0
- package/dist/lib/adapters/derived-account-store.d.ts +152 -0
- package/dist/lib/adapters/derived-account-store.d.ts.map +1 -0
- package/dist/lib/adapters/derived-account-store.js +135 -0
- package/dist/lib/adapters/derived-account-store.js.map +1 -0
- package/dist/lib/adapters/implicit-account-store.d.ts +3 -1
- package/dist/lib/adapters/implicit-account-store.d.ts.map +1 -1
- package/dist/lib/adapters/implicit-account-store.js +3 -1
- package/dist/lib/adapters/implicit-account-store.js.map +1 -1
- package/dist/lib/adapters/index.d.ts +1 -0
- package/dist/lib/adapters/index.d.ts.map +1 -1
- package/dist/lib/adapters/index.js +7 -1
- package/dist/lib/adapters/index.js.map +1 -1
- package/dist/lib/adapters/oauth-passthrough-resolver.d.ts +3 -1
- package/dist/lib/adapters/oauth-passthrough-resolver.d.ts.map +1 -1
- package/dist/lib/adapters/oauth-passthrough-resolver.js +3 -1
- package/dist/lib/adapters/oauth-passthrough-resolver.js.map +1 -1
- package/dist/lib/adapters/roster-account-store.d.ts +85 -24
- package/dist/lib/adapters/roster-account-store.d.ts.map +1 -1
- package/dist/lib/adapters/roster-account-store.js +52 -30
- package/dist/lib/adapters/roster-account-store.js.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/AgentClient.js +20 -0
- package/dist/lib/core/AgentClient.js.map +1 -1
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +13 -8
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/mock-server/creative-ad-server/seed-data.d.ts +81 -0
- package/dist/lib/mock-server/creative-ad-server/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/creative-ad-server/seed-data.js +200 -0
- package/dist/lib/mock-server/creative-ad-server/seed-data.js.map +1 -0
- package/dist/lib/mock-server/creative-ad-server/server.d.ts +39 -0
- package/dist/lib/mock-server/creative-ad-server/server.d.ts.map +1 -0
- package/dist/lib/mock-server/creative-ad-server/server.js +618 -0
- package/dist/lib/mock-server/creative-ad-server/server.js.map +1 -0
- package/dist/lib/mock-server/creative-template/seed-data.d.ts +1 -1
- package/dist/lib/mock-server/creative-template/seed-data.d.ts.map +1 -1
- package/dist/lib/mock-server/creative-template/seed-data.js +53 -0
- package/dist/lib/mock-server/creative-template/seed-data.js.map +1 -1
- package/dist/lib/mock-server/creative-template/server.d.ts.map +1 -1
- package/dist/lib/mock-server/creative-template/server.js +12 -0
- package/dist/lib/mock-server/creative-template/server.js.map +1 -1
- package/dist/lib/mock-server/index.d.ts.map +1 -1
- package/dist/lib/mock-server/index.js +180 -24
- package/dist/lib/mock-server/index.js.map +1 -1
- package/dist/lib/mock-server/sales-non-guaranteed/seed-data.d.ts +66 -0
- package/dist/lib/mock-server/sales-non-guaranteed/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-non-guaranteed/seed-data.js +193 -0
- package/dist/lib/mock-server/sales-non-guaranteed/seed-data.js.map +1 -0
- package/dist/lib/mock-server/sales-non-guaranteed/server.d.ts +33 -0
- package/dist/lib/mock-server/sales-non-guaranteed/server.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-non-guaranteed/server.js +782 -0
- package/dist/lib/mock-server/sales-non-guaranteed/server.js.map +1 -0
- package/dist/lib/mock-server/sponsored-intelligence/seed-data.d.ts +50 -0
- package/dist/lib/mock-server/sponsored-intelligence/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/sponsored-intelligence/seed-data.js +133 -0
- package/dist/lib/mock-server/sponsored-intelligence/seed-data.js.map +1 -0
- package/dist/lib/mock-server/sponsored-intelligence/server.d.ts +13 -0
- package/dist/lib/mock-server/sponsored-intelligence/server.d.ts.map +1 -0
- package/dist/lib/mock-server/sponsored-intelligence/server.js +609 -0
- package/dist/lib/mock-server/sponsored-intelligence/server.js.map +1 -0
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +1 -41
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/bound-value.json +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/component.json +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/si-catalog.json +25 -25
- package/dist/lib/schemas-data/3.0/a2ui/surface.json +2 -2
- package/dist/lib/schemas-data/3.0/a2ui/user-action.json +1 -1
- package/dist/lib/schemas-data/3.0/account/get-account-financials-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/get-account-financials-response.json +10 -10
- package/dist/lib/schemas-data/3.0/account/list-accounts-request.json +4 -4
- package/dist/lib/schemas-data/3.0/account/list-accounts-response.json +6 -6
- package/dist/lib/schemas-data/3.0/account/report-usage-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/report-usage-response.json +4 -4
- package/dist/lib/schemas-data/3.0/account/sync-accounts-request.json +9 -9
- package/dist/lib/schemas-data/3.0/account/sync-accounts-response.json +12 -12
- package/dist/lib/schemas-data/3.0/account/sync-governance-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/sync-governance-response.json +8 -8
- package/dist/lib/schemas-data/3.0/adagents.json +32 -32
- package/dist/lib/schemas-data/3.0/brand/acquire-rights-request.json +8 -8
- package/dist/lib/schemas-data/3.0/brand/acquire-rights-response.json +14 -14
- package/dist/lib/schemas-data/3.0/brand/creative-approval-request.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/creative-approval-response.json +10 -10
- package/dist/lib/schemas-data/3.0/brand/get-brand-identity-request.json +3 -3
- package/dist/lib/schemas-data/3.0/brand/get-brand-identity-response.json +8 -8
- package/dist/lib/schemas-data/3.0/brand/get-rights-request.json +7 -7
- package/dist/lib/schemas-data/3.0/brand/get-rights-response.json +9 -9
- package/dist/lib/schemas-data/3.0/brand/revocation-notification.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/rights-pricing-option.json +5 -5
- package/dist/lib/schemas-data/3.0/brand/rights-terms.json +3 -3
- package/dist/lib/schemas-data/3.0/brand/update-rights-request.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/update-rights-response.json +9 -9
- package/dist/lib/schemas-data/3.0/brand.json +14 -14
- package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/package-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-response.json +2 -2
- package/dist/lib/schemas-data/3.0/collection/base-collection-source.json +3 -3
- package/dist/lib/schemas-data/3.0/collection/collection-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.0/collection/collection-list-filters.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/collection-list.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/create-collection-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/create-collection-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/delete-collection-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/delete-collection-list-response.json +3 -3
- package/dist/lib/schemas-data/3.0/collection/get-collection-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/get-collection-list-response.json +10 -10
- package/dist/lib/schemas-data/3.0/collection/list-collection-lists-request.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/list-collection-lists-response.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/update-collection-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/update-collection-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/artifact-webhook-payload.json +3 -3
- package/dist/lib/schemas-data/3.0/content-standards/artifact.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/content-standards.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-request.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-response.json +6 -6
- package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-request.json +3 -3
- package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-response.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-request.json +5 -5
- package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-request.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-response.json +6 -6
- package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-response.json +8 -8
- package/dist/lib/schemas-data/3.0/core/account-ref.json +2 -2
- package/dist/lib/schemas-data/3.0/core/account.json +9 -9
- package/dist/lib/schemas-data/3.0/core/activation-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/ad-inventory-config.json +1 -1
- package/dist/lib/schemas-data/3.0/core/agent-encryption-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/agent-signing-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/app-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/asset-union.json +15 -15
- package/dist/lib/schemas-data/3.0/core/assets/audio-asset.json +3 -3
- package/dist/lib/schemas-data/3.0/core/assets/brief-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/catalog-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/css-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/daast-asset.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/html-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/image-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/javascript-asset.json +3 -3
- package/dist/lib/schemas-data/3.0/core/assets/markdown-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/text-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/url-asset.json +3 -3
- package/dist/lib/schemas-data/3.0/core/assets/vast-asset.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/video-asset.json +7 -7
- package/dist/lib/schemas-data/3.0/core/assets/webhook-asset.json +7 -7
- package/dist/lib/schemas-data/3.0/core/async-response-data.json +25 -25
- package/dist/lib/schemas-data/3.0/core/attribution-window.json +4 -4
- package/dist/lib/schemas-data/3.0/core/audience-member.json +3 -3
- package/dist/lib/schemas-data/3.0/core/audience-selector.json +4 -4
- package/dist/lib/schemas-data/3.0/core/brand-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/brand-ref.json +2 -2
- package/dist/lib/schemas-data/3.0/core/business-entity.json +2 -2
- package/dist/lib/schemas-data/3.0/core/cancellation-policy.json +2 -2
- package/dist/lib/schemas-data/3.0/core/catalog-field-mapping.json +2 -2
- package/dist/lib/schemas-data/3.0/core/catalog.json +7 -7
- package/dist/lib/schemas-data/3.0/core/catchment.json +5 -5
- package/dist/lib/schemas-data/3.0/core/collection-distribution.json +2 -2
- package/dist/lib/schemas-data/3.0/core/collection-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/collection-selector.json +1 -1
- package/dist/lib/schemas-data/3.0/core/collection.json +13 -13
- package/dist/lib/schemas-data/3.0/core/content-rating.json +2 -2
- package/dist/lib/schemas-data/3.0/core/context.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-asset.json +6 -6
- package/dist/lib/schemas-data/3.0/core/creative-assignment.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-brief.json +4 -4
- package/dist/lib/schemas-data/3.0/core/creative-consumption.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-filters.json +4 -4
- package/dist/lib/schemas-data/3.0/core/creative-item.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-manifest.json +7 -7
- package/dist/lib/schemas-data/3.0/core/creative-policy.json +3 -3
- package/dist/lib/schemas-data/3.0/core/creative-variable.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-variant.json +5 -5
- package/dist/lib/schemas-data/3.0/core/data-provider-signal-selector.json +1 -1
- package/dist/lib/schemas-data/3.0/core/date-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/datetime-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/daypart-target.json +2 -2
- package/dist/lib/schemas-data/3.0/core/deadline-policy.json +1 -1
- package/dist/lib/schemas-data/3.0/core/delivery-forecast.json +7 -7
- package/dist/lib/schemas-data/3.0/core/delivery-metrics.json +5 -5
- package/dist/lib/schemas-data/3.0/core/deployment.json +3 -3
- package/dist/lib/schemas-data/3.0/core/destination-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/destination.json +1 -1
- package/dist/lib/schemas-data/3.0/core/diagnostic-issue.json +1 -1
- package/dist/lib/schemas-data/3.0/core/duration.json +1 -1
- package/dist/lib/schemas-data/3.0/core/education-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/error.json +1 -1
- package/dist/lib/schemas-data/3.0/core/event-custom-data.json +2 -2
- package/dist/lib/schemas-data/3.0/core/event-source-health.json +3 -3
- package/dist/lib/schemas-data/3.0/core/event.json +6 -6
- package/dist/lib/schemas-data/3.0/core/ext.json +1 -1
- package/dist/lib/schemas-data/3.0/core/feature-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/core/flight-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/forecast-point.json +18 -18
- package/dist/lib/schemas-data/3.0/core/forecast-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/format-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/format.json +42 -42
- package/dist/lib/schemas-data/3.0/core/frequency-cap.json +4 -4
- package/dist/lib/schemas-data/3.0/core/generation-credential.json +3 -3
- package/dist/lib/schemas-data/3.0/core/geo-breakdown-support.json +3 -3
- package/dist/lib/schemas-data/3.0/core/hotel-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/identifier.json +2 -2
- package/dist/lib/schemas-data/3.0/core/industry-identifier.json +2 -2
- package/dist/lib/schemas-data/3.0/core/insertion-order.json +1 -1
- package/dist/lib/schemas-data/3.0/core/installment-deadlines.json +2 -2
- package/dist/lib/schemas-data/3.0/core/installment.json +9 -9
- package/dist/lib/schemas-data/3.0/core/job-item.json +3 -3
- package/dist/lib/schemas-data/3.0/core/limited-series.json +1 -1
- package/dist/lib/schemas-data/3.0/core/material-deadline.json +1 -1
- package/dist/lib/schemas-data/3.0/core/mcp-webhook-payload.json +5 -5
- package/dist/lib/schemas-data/3.0/core/measurement-readiness.json +5 -5
- package/dist/lib/schemas-data/3.0/core/measurement-terms.json +3 -3
- package/dist/lib/schemas-data/3.0/core/measurement-window.json +1 -1
- package/dist/lib/schemas-data/3.0/core/media-buy-features.json +1 -1
- package/dist/lib/schemas-data/3.0/core/media-buy.json +7 -7
- package/dist/lib/schemas-data/3.0/core/offering-asset-group.json +15 -15
- package/dist/lib/schemas-data/3.0/core/offering.json +5 -5
- package/dist/lib/schemas-data/3.0/core/optimization-goal.json +6 -6
- package/dist/lib/schemas-data/3.0/core/outcome-measurement.json +2 -2
- package/dist/lib/schemas-data/3.0/core/overlay.json +1 -1
- package/dist/lib/schemas-data/3.0/core/package.json +14 -14
- package/dist/lib/schemas-data/3.0/core/pagination-request.json +1 -1
- package/dist/lib/schemas-data/3.0/core/pagination-response.json +1 -1
- package/dist/lib/schemas-data/3.0/core/performance-feedback.json +3 -3
- package/dist/lib/schemas-data/3.0/core/performance-standard.json +4 -4
- package/dist/lib/schemas-data/3.0/core/placement-definition.json +5 -5
- package/dist/lib/schemas-data/3.0/core/placement.json +2 -2
- package/dist/lib/schemas-data/3.0/core/planned-delivery.json +5 -5
- package/dist/lib/schemas-data/3.0/core/price.json +1 -1
- package/dist/lib/schemas-data/3.0/core/pricing-option.json +10 -10
- package/dist/lib/schemas-data/3.0/core/product-allocation.json +4 -4
- package/dist/lib/schemas-data/3.0/core/product-filters.json +16 -16
- package/dist/lib/schemas-data/3.0/core/product.json +28 -28
- package/dist/lib/schemas-data/3.0/core/property-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property-tag.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property.json +6 -6
- package/dist/lib/schemas-data/3.0/core/proposal.json +6 -6
- package/dist/lib/schemas-data/3.0/core/protocol-envelope.json +3 -3
- package/dist/lib/schemas-data/3.0/core/provenance.json +6 -6
- package/dist/lib/schemas-data/3.0/core/publisher-property-selector.json +3 -3
- package/dist/lib/schemas-data/3.0/core/push-notification-config.json +2 -2
- package/dist/lib/schemas-data/3.0/core/real-estate-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/reference-asset.json +1 -1
- package/dist/lib/schemas-data/3.0/core/reporting-capabilities.json +5 -5
- package/dist/lib/schemas-data/3.0/core/reporting-webhook.json +3 -3
- package/dist/lib/schemas-data/3.0/core/requirements/asset-requirements.json +13 -13
- package/dist/lib/schemas-data/3.0/core/requirements/audio-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/catalog-field-binding.json +4 -4
- package/dist/lib/schemas-data/3.0/core/requirements/catalog-requirements.json +5 -5
- package/dist/lib/schemas-data/3.0/core/requirements/css-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/daast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/html-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/image-asset-requirements.json +2 -2
- package/dist/lib/schemas-data/3.0/core/requirements/javascript-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/markdown-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/offering-asset-constraint.json +4 -4
- package/dist/lib/schemas-data/3.0/core/requirements/text-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/url-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/vast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/video-asset-requirements.json +6 -6
- package/dist/lib/schemas-data/3.0/core/requirements/webhook-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/response.json +1 -1
- package/dist/lib/schemas-data/3.0/core/rights-constraint.json +4 -4
- package/dist/lib/schemas-data/3.0/core/seller-agent-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/signal-definition.json +3 -3
- package/dist/lib/schemas-data/3.0/core/signal-filters.json +2 -2
- package/dist/lib/schemas-data/3.0/core/signal-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/signal-pricing-option.json +2 -2
- package/dist/lib/schemas-data/3.0/core/signal-pricing.json +6 -6
- package/dist/lib/schemas-data/3.0/core/signal-targeting.json +4 -4
- package/dist/lib/schemas-data/3.0/core/special.json +2 -2
- package/dist/lib/schemas-data/3.0/core/start-timing.json +1 -1
- package/dist/lib/schemas-data/3.0/core/store-item.json +3 -3
- package/dist/lib/schemas-data/3.0/core/talent.json +2 -2
- package/dist/lib/schemas-data/3.0/core/targeting.json +20 -20
- package/dist/lib/schemas-data/3.0/core/tasks-get-request.json +3 -3
- package/dist/lib/schemas-data/3.0/core/tasks-get-response.json +7 -7
- package/dist/lib/schemas-data/3.0/core/tasks-list-request.json +11 -11
- package/dist/lib/schemas-data/3.0/core/tasks-list-response.json +6 -6
- package/dist/lib/schemas-data/3.0/core/user-match.json +3 -3
- package/dist/lib/schemas-data/3.0/core/vehicle-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/vendor-pricing-option.json +2 -2
- package/dist/lib/schemas-data/3.0/core/x-entity-types.json +1 -1
- package/dist/lib/schemas-data/3.0/creative/asset-types/index.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/creative-feature-result.json +2 -2
- package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-request.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-response.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/get-creative-features-request.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/get-creative-features-response.json +8 -8
- package/dist/lib/schemas-data/3.0/creative/list-creative-formats-request.json +11 -11
- package/dist/lib/schemas-data/3.0/creative/list-creative-formats-response.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/list-creatives-request.json +8 -8
- package/dist/lib/schemas-data/3.0/creative/list-creatives-response.json +14 -14
- package/dist/lib/schemas-data/3.0/creative/preview-creative-request.json +11 -11
- package/dist/lib/schemas-data/3.0/creative/preview-creative-response.json +12 -12
- package/dist/lib/schemas-data/3.0/creative/preview-render.json +1 -1
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-request.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-response.json +13 -13
- package/dist/lib/schemas-data/3.0/enums/account-scope.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/account-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/action-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/adcp-protocol.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/adjustment-kind.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/advertiser-industry.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/age-verification-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/assessment-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/asset-content-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/attribution-model.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audience-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audience-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audio-channel-layout.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/auth-scheme.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/available-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/billing-party.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/binary-verdict.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/brand-agent-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/canceled-by.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-item-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/channels.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/cloud-storage-protocol.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/co-branding-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-cadence.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-kind.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-relationship.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/consent-basis.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/content-id-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/content-rating-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-agent-capability.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-approval-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-quality.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-sort-field.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/daast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/daast-version.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/day-of-week.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/delegation-authority.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/delivery-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/demographic-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/derivative-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/device-platform.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/device-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/digital-source-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/dimension-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/disclosure-persistence.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/disclosure-position.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/distance-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/distribution-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/error-code.json +3 -3
- package/dist/lib/schemas-data/3.0/enums/escalation-severity.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/event-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/exclusivity.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feature-check-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feed-format.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feedback-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecast-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecast-range-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecastable-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/format-id-parameter.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/frame-rate-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/frequency-cap-scope.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/genre-taxonomy.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/geo-level.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/gop-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-decision.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-domain.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-phase.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/history-entry-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/http-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/installment-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/javascript-module-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/landing-page-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/makegood-remedy.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/markdown-flavor.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/match-id-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/match-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/media-buy-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/media-buy-valid-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/metric-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/metro-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/moov-atom-position.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/notification-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/outcome-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/pacing.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/payment-terms.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/performance-standard-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/policy-category.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/policy-enforcement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/postal-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/preview-output-format.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/pricing-model.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/production-quality.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/property-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/proposal-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/publisher-identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/purchase-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/reach-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/reporting-frequency.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/response-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/restricted-attribute.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/right-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/right-use.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/rights-billing-period.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/scan-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/si-session-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-value-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/snapshot-unavailable-reason.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/sort-direction.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/sort-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/special-category.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/specialism.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/talent-role.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/task-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/task-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/transport-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/travel-time-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/uid-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/universal-macro.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/update-frequency.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/url-asset-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/validation-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/vast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/vast-version.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/viewability-standard.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/wcag-level.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/webhook-response-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/webhook-security-method.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/account-setup-required.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/audience-too-small.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/budget-too-low.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/conflict.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/creative-rejected.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/policy-violation.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/rate-limited.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/vendor-error-codes.json +1 -1
- package/dist/lib/schemas-data/3.0/extensions/extension-meta.json +1 -1
- package/dist/lib/schemas-data/3.0/extensions/index.json +2 -2
- package/dist/lib/schemas-data/3.0/governance/attribute-definition.json +1 -1
- package/dist/lib/schemas-data/3.0/governance/audience-constraints.json +3 -3
- package/dist/lib/schemas-data/3.0/governance/check-governance-request.json +7 -7
- package/dist/lib/schemas-data/3.0/governance/check-governance-response.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-request.json +4 -4
- package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-response.json +9 -9
- package/dist/lib/schemas-data/3.0/governance/policy-category-definition.json +2 -2
- package/dist/lib/schemas-data/3.0/governance/policy-entry.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/policy-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-request.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-response.json +4 -4
- package/dist/lib/schemas-data/3.0/governance/sync-plans-request.json +13 -13
- package/dist/lib/schemas-data/3.0/governance/sync-plans-response.json +4 -4
- package/dist/lib/schemas-data/3.0/index.json +364 -364
- package/dist/lib/schemas-data/3.0/manifest.json +5 -5
- package/dist/lib/schemas-data/3.0/manifest.schema.json +1 -1
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-response.json +17 -17
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-request.json +12 -12
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-response.json +15 -15
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-request.json +17 -17
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-response.json +24 -24
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-response.json +19 -19
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/get-products-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/get-products-response.json +8 -8
- package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-response.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/log-event-request.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/log-event-response.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/package-request.json +12 -12
- package/dist/lib/schemas-data/3.0/media-buy/package-update.json +13 -13
- package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-request.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-response.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-response.json +9 -9
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-response.json +9 -9
- package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-request.json +5 -5
- package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-response.json +10 -10
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-request.json +10 -10
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-response.json +10 -10
- package/dist/lib/schemas-data/3.0/pricing-options/cpa-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpc-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpcv-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpm-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpp-option.json +5 -5
- package/dist/lib/schemas-data/3.0/pricing-options/cpv-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/flat-rate-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/price-breakdown.json +2 -2
- package/dist/lib/schemas-data/3.0/pricing-options/price-guidance.json +1 -1
- package/dist/lib/schemas-data/3.0/pricing-options/time-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/vcpm-option.json +4 -4
- package/dist/lib/schemas-data/3.0/property/authorization-result.json +1 -1
- package/dist/lib/schemas-data/3.0/property/base-property-source.json +4 -4
- package/dist/lib/schemas-data/3.0/property/create-property-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/property/create-property-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/delete-property-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/property/delete-property-list-response.json +3 -3
- package/dist/lib/schemas-data/3.0/property/delivery-record.json +3 -3
- package/dist/lib/schemas-data/3.0/property/get-property-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/property/get-property-list-response.json +7 -7
- package/dist/lib/schemas-data/3.0/property/list-property-lists-request.json +5 -5
- package/dist/lib/schemas-data/3.0/property/list-property-lists-response.json +5 -5
- package/dist/lib/schemas-data/3.0/property/property-error.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature-definition.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature-result.json +4 -4
- package/dist/lib/schemas-data/3.0/property/property-feature-value.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature.json +1 -1
- package/dist/lib/schemas-data/3.0/property/property-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-list-filters.json +5 -5
- package/dist/lib/schemas-data/3.0/property/property-list.json +6 -6
- package/dist/lib/schemas-data/3.0/property/update-property-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/property/update-property-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/validate-property-delivery-request.json +5 -5
- package/dist/lib/schemas-data/3.0/property/validate-property-delivery-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/validation-result.json +5 -5
- package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-request.json +3 -3
- package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-response.json +25 -25
- package/dist/lib/schemas-data/3.0/signals/activate-signal-request.json +5 -5
- package/dist/lib/schemas-data/3.0/signals/activate-signal-response.json +7 -7
- package/dist/lib/schemas-data/3.0/signals/get-signals-request.json +8 -8
- package/dist/lib/schemas-data/3.0/signals/get-signals-response.json +10 -10
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-capabilities.json +1 -1
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-response.json +4 -4
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-identity.json +1 -1
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-request.json +5 -5
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-response.json +7 -7
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-response.json +7 -7
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-response.json +5 -5
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-ui-element.json +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/account-mode.d.ts +113 -0
- package/dist/lib/server/account-mode.d.ts.map +1 -0
- package/dist/lib/server/account-mode.js +125 -0
- package/dist/lib/server/account-mode.js.map +1 -0
- package/dist/lib/server/adcp-server.js +41 -0
- package/dist/lib/server/adcp-server.js.map +1 -1
- package/dist/lib/server/auth.d.ts +35 -0
- package/dist/lib/server/auth.d.ts.map +1 -1
- package/dist/lib/server/auth.js.map +1 -1
- package/dist/lib/server/create-adcp-server.d.ts +26 -9
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +46 -20
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/ctx-metadata/store.d.ts +1 -1
- package/dist/lib/server/ctx-metadata/store.d.ts.map +1 -1
- package/dist/lib/server/ctx-metadata/store.js +1 -0
- package/dist/lib/server/ctx-metadata/store.js.map +1 -1
- package/dist/lib/server/decisioning/account.d.ts +19 -0
- package/dist/lib/server/decisioning/account.d.ts.map +1 -1
- package/dist/lib/server/decisioning/account.js.map +1 -1
- package/dist/lib/server/decisioning/buyer-agent.d.ts +37 -4
- package/dist/lib/server/decisioning/buyer-agent.d.ts.map +1 -1
- package/dist/lib/server/decisioning/buyer-agent.js +12 -2
- package/dist/lib/server/decisioning/buyer-agent.js.map +1 -1
- package/dist/lib/server/decisioning/compose.d.ts +33 -2
- package/dist/lib/server/decisioning/compose.d.ts.map +1 -1
- package/dist/lib/server/decisioning/compose.js +13 -46
- package/dist/lib/server/decisioning/compose.js.map +1 -1
- package/dist/lib/server/decisioning/index.d.ts +2 -1
- package/dist/lib/server/decisioning/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.js +2 -1
- package/dist/lib/server/decisioning/index.js.map +1 -1
- package/dist/lib/server/decisioning/platform-helpers.d.ts +18 -0
- package/dist/lib/server/decisioning/platform-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/platform-helpers.js +20 -0
- package/dist/lib/server/decisioning/platform-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/platform.d.ts +19 -21
- package/dist/lib/server/decisioning/platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +369 -54
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/observed-modes.d.ts +40 -0
- package/dist/lib/server/decisioning/runtime/observed-modes.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/observed-modes.js +82 -0
- package/dist/lib/server/decisioning/runtime/observed-modes.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.js +2 -2
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/validate-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/validate-platform.js +9 -1
- package/dist/lib/server/decisioning/runtime/validate-platform.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.d.ts +125 -0
- package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.js +52 -0
- package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.js.map +1 -0
- package/dist/lib/server/decisioning/tenant-registry.d.ts +16 -0
- package/dist/lib/server/decisioning/tenant-registry.d.ts.map +1 -1
- package/dist/lib/server/decisioning/tenant-registry.js.map +1 -1
- package/dist/lib/server/index.d.ts +5 -1
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +15 -3
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/serve.js +20 -2
- package/dist/lib/server/serve.js.map +1 -1
- package/dist/lib/server/socket-mode/conformance-client.d.ts +83 -0
- package/dist/lib/server/socket-mode/conformance-client.d.ts.map +1 -0
- package/dist/lib/server/socket-mode/conformance-client.js +117 -0
- package/dist/lib/server/socket-mode/conformance-client.js.map +1 -0
- package/dist/lib/server/socket-mode/index.d.ts +15 -0
- package/dist/lib/server/socket-mode/index.d.ts.map +1 -0
- package/dist/lib/server/socket-mode/index.js +20 -0
- package/dist/lib/server/socket-mode/index.js.map +1 -0
- package/dist/lib/server/socket-mode/ws-transport.d.ts +26 -0
- package/dist/lib/server/socket-mode/ws-transport.d.ts.map +1 -0
- package/dist/lib/server/socket-mode/ws-transport.js +93 -0
- package/dist/lib/server/socket-mode/ws-transport.js.map +1 -0
- package/dist/lib/server/test-controller.d.ts +3 -0
- package/dist/lib/server/test-controller.d.ts.map +1 -1
- package/dist/lib/server/test-controller.js +23 -20
- package/dist/lib/server/test-controller.js.map +1 -1
- package/dist/lib/testing/comply-controller.d.ts +65 -3
- package/dist/lib/testing/comply-controller.d.ts.map +1 -1
- package/dist/lib/testing/comply-controller.js +32 -3
- package/dist/lib/testing/comply-controller.js.map +1 -1
- package/dist/lib/testing/index.d.ts +1 -1
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.js +63 -40
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +36 -54
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/testing/test-controller.d.ts +10 -4
- package/dist/lib/testing/test-controller.d.ts.map +1 -1
- package/dist/lib/testing/test-controller.js +9 -3
- package/dist/lib/testing/test-controller.js.map +1 -1
- package/dist/lib/types/core.generated.d.ts +54 -14
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +2 -2
- package/dist/lib/types/error-codes.d.ts +2 -2
- package/dist/lib/types/index.d.ts +4 -3
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js +3 -0
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/manifest.generated.d.ts +5 -5
- package/dist/lib/types/manifest.generated.js +3 -3
- package/dist/lib/types/manifest.generated.js.map +1 -1
- package/dist/lib/types/schemas.generated.d.ts +465 -381
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +171 -143
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +42 -14
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/utils/glob.d.ts +4 -2
- package/dist/lib/utils/glob.d.ts.map +1 -1
- package/dist/lib/utils/glob.js +4 -2
- package/dist/lib/utils/glob.js.map +1 -1
- package/dist/lib/version.d.ts +7 -7
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +6 -5
- package/dist/lib/version.js.map +1 -1
- package/docs/llms.txt +5 -4
- package/examples/README.md +29 -13
- package/examples/hello-cluster.ts +62 -23
- package/examples/hello_creative_adapter_ad_server.ts +809 -0
- package/examples/hello_creative_adapter_template.ts +61 -6
- package/examples/hello_seller_adapter_guaranteed.ts +158 -25
- package/examples/hello_seller_adapter_multi_tenant.ts +39 -5
- package/examples/hello_seller_adapter_non_guaranteed.ts +1071 -0
- package/examples/hello_seller_adapter_social.ts +1 -1
- package/examples/hello_si_adapter_brand.ts +572 -0
- package/examples/hello_signals_adapter_marketplace.ts +34 -29
- package/package.json +7 -5
- package/skills/SHAPE-GOTCHAS.md +18 -0
- package/skills/build-brand-rights-agent/SKILL.md +61 -597
- package/skills/build-creative-agent/SKILL.md +69 -830
- package/skills/build-generative-seller-agent/SKILL.md +43 -577
- package/skills/build-governance-agent/SKILL.md +63 -950
- package/skills/build-holdco-agent/SKILL.md +8 -0
- package/skills/build-retail-media-agent/SKILL.md +46 -478
- package/skills/build-seller-agent/SKILL.md +53 -1795
- package/skills/build-seller-agent/specialisms/sales-non-guaranteed.md +9 -31
- package/skills/build-si-agent/SKILL.md +55 -318
- package/skills/build-signals-agent/SKILL.md +49 -537
- package/skills/call-adcp-agent/SKILL.md +7 -1
- package/skills/cross-cutting.md +84 -0
- package/skills/call-adcp-agent.previous/SKILL.md +0 -261
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/brand/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/creative/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/governance/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/creative-reception.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/signals/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/domains/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/brand/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/creative/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/governance/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/creative-reception.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/signals/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/protocols/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/audience-sync/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/brand-rights/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/collection-lists/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/content-standards/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/creative-ad-server/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/creative-generative/generative-seller.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/creative-generative/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/creative-template/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/governance-aware-seller/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/governance-delivery-monitor/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/governance-spend-authority/denied.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/governance-spend-authority/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/property-lists/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/sales-broadcast-tv/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/sales-catalog-driven/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/sales-non-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/sales-proposal-mode/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/sales-social/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/signal-marketplace/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/specialisms/signal-owned/index.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-kits/acme-outdoor.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-kits/bistro-oranje.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-kits/nova-motors.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-kits/osei-natural.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-kits/signed-requests-runner.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-kits/substitution-observer-runner.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-kits/summit-foods.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-kits/webhook-receiver-runner.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/002-full-plan.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/README.md +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/canonicalization.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/keys.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/README.md +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/keys.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/capability-discovery.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/collection-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/content-standards-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/deterministic-testing.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/error-compliance.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/fictional-entities.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/get-media-buys-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/get-signals-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/idempotency.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/pagination-integrity-creative-formats.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/pagination-integrity-list-accounts.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/property-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/runner-output-contract.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/schema-validation.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/security.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/signed-requests.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/v3-envelope-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.5 → 3.0.6}/universal/webhook-emission.yaml +0 -0
|
@@ -0,0 +1,1071 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hello_seller_adapter_non_guaranteed — worked starting point for an
|
|
3
|
+
* AdCP non-guaranteed sales agent (specialism `sales-non-guaranteed`)
|
|
4
|
+
* that wraps an upstream programmatic-auction platform with sync
|
|
5
|
+
* confirmation over static Bearer.
|
|
6
|
+
*
|
|
7
|
+
* Closes #1458 (sub-issue of #1381 umbrella). Closest neighbor in the
|
|
8
|
+
* worked-reference family is `hello_seller_adapter_guaranteed.ts` —
|
|
9
|
+
* this adapter is the deletion-fork (rip out HITL approval, sync
|
|
10
|
+
* confirmation throughout). The auction shape applies to DSP-side
|
|
11
|
+
* sellers, retail-media remnant, header-bidding inventory, and any
|
|
12
|
+
* non-walled-garden seller.
|
|
13
|
+
*
|
|
14
|
+
* Headline behavior: `create_media_buy` returns `media_buy_id` synchronously
|
|
15
|
+
* on `success` — auction is immediate, no IO-review task. Floor-priced
|
|
16
|
+
* products (`pricing_options[].fixed_price = product.min_cpm`); pacing
|
|
17
|
+
* propagated to upstream order; spend-only forecast surfaced inline.
|
|
18
|
+
*
|
|
19
|
+
* Fork this. Replace `upstream` with calls to your real backend. The
|
|
20
|
+
* AdCP-facing platform methods stay the same.
|
|
21
|
+
*
|
|
22
|
+
* Auction mode is the deletion-fork of the guaranteed sibling: `createMediaBuy`
|
|
23
|
+
* returns sync, no `ctx.handoffToTask`, no IO poll loop, no task envelope.
|
|
24
|
+
* If your backend has HITL approval, fork the guaranteed example instead.
|
|
25
|
+
*
|
|
26
|
+
* FORK CHECKLIST
|
|
27
|
+
* 1. Replace every `// SWAP:` marker with calls to your backend.
|
|
28
|
+
* 2. Replace `KNOWN_PUBLISHERS` with your tenant directory.
|
|
29
|
+
* 3. Replace `projectProduct()` defaults — `publisher_properties` selector,
|
|
30
|
+
* `pricing_options[]`, `reporting_capabilities` — with values your
|
|
31
|
+
* seller actually commits to.
|
|
32
|
+
* 4. Replace `advertiserId = networkCode` collapse with a real lookup
|
|
33
|
+
* (production splits network and advertiser ids).
|
|
34
|
+
* 5. Validate: `node --test test/examples/hello-seller-adapter-non-guaranteed.test.js`
|
|
35
|
+
* 6. **DELETE the `// TEST-ONLY` blocks** before deploying:
|
|
36
|
+
* - sandbox-arm in `accounts.resolve` (resolves storyboard runner's
|
|
37
|
+
* synthetic `{brand, sandbox: true}` refs to a known network and
|
|
38
|
+
* stamps `mode: 'sandbox'` on the returned Account so the framework
|
|
39
|
+
* gate admits the comply controller)
|
|
40
|
+
* - `complyTest:` config block on `createAdcpServerFromPlatform`
|
|
41
|
+
* - in-memory `seededMediaBuys` / `simulatedDelivery` / `adapterStatusOverrides`
|
|
42
|
+
* These exist so the conformance harness can drive cascade scenarios
|
|
43
|
+
* deterministically. Production sellers ship without them.
|
|
44
|
+
*
|
|
45
|
+
* Demo:
|
|
46
|
+
* npx @adcp/sdk@latest mock-server sales-non-guaranteed --port 4451
|
|
47
|
+
* UPSTREAM_URL=http://127.0.0.1:4451 \
|
|
48
|
+
* npx tsx examples/hello_seller_adapter_non_guaranteed.ts
|
|
49
|
+
* adcp storyboard run http://127.0.0.1:3007/mcp sales_non_guaranteed \
|
|
50
|
+
* --auth sk_harness_do_not_use_in_prod
|
|
51
|
+
* curl http://127.0.0.1:4451/_debug/traffic
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
import {
|
|
55
|
+
createAdcpServerFromPlatform,
|
|
56
|
+
serve,
|
|
57
|
+
verifyApiKey,
|
|
58
|
+
createIdempotencyStore,
|
|
59
|
+
createUpstreamHttpClient,
|
|
60
|
+
memoryBackend,
|
|
61
|
+
AdcpError,
|
|
62
|
+
createMediaBuyStore,
|
|
63
|
+
InMemoryStateStore,
|
|
64
|
+
assertMediaBuyTransition,
|
|
65
|
+
type DecisioningPlatform,
|
|
66
|
+
type SalesCorePlatform,
|
|
67
|
+
type SalesIngestionPlatform,
|
|
68
|
+
type AccountStore,
|
|
69
|
+
type Account,
|
|
70
|
+
type AdcpMediaBuyStatus,
|
|
71
|
+
type SyncCreativesRow,
|
|
72
|
+
type SyncAccountsResultRow,
|
|
73
|
+
} from '@adcp/sdk/server';
|
|
74
|
+
import { FormatAsset } from '@adcp/sdk';
|
|
75
|
+
import type {
|
|
76
|
+
GetProductsRequest,
|
|
77
|
+
GetProductsResponse,
|
|
78
|
+
CreateMediaBuyRequest,
|
|
79
|
+
CreateMediaBuySuccess,
|
|
80
|
+
UpdateMediaBuyRequest,
|
|
81
|
+
UpdateMediaBuySuccess,
|
|
82
|
+
GetMediaBuysRequest,
|
|
83
|
+
GetMediaBuysResponse,
|
|
84
|
+
GetMediaBuyDeliveryRequest,
|
|
85
|
+
GetMediaBuyDeliveryResponse,
|
|
86
|
+
ListCreativeFormatsResponse,
|
|
87
|
+
} from '@adcp/sdk/types';
|
|
88
|
+
|
|
89
|
+
// `Product` isn't re-exported from `@adcp/sdk/types`; derive from response.
|
|
90
|
+
type Product = GetProductsResponse['products'][number];
|
|
91
|
+
|
|
92
|
+
const UPSTREAM_URL = process.env['UPSTREAM_URL'] ?? 'http://127.0.0.1:4451';
|
|
93
|
+
const UPSTREAM_API_KEY = process.env['UPSTREAM_API_KEY'] ?? 'mock_sales_non_guaranteed_key_do_not_use_in_prod';
|
|
94
|
+
const PORT = Number(process.env['PORT'] ?? 3007);
|
|
95
|
+
const ADCP_AUTH_TOKEN = process.env['ADCP_AUTH_TOKEN'] ?? 'sk_harness_do_not_use_in_prod';
|
|
96
|
+
const PUBLIC_AGENT_URL = process.env['PUBLIC_AGENT_URL'] ?? `http://127.0.0.1:${PORT}`;
|
|
97
|
+
|
|
98
|
+
const KNOWN_PUBLISHERS = ['remnant-network.example', 'acmeoutdoor.example', 'pinnacle-agency.example'];
|
|
99
|
+
|
|
100
|
+
// TEST-ONLY: id-prefix used by the sandbox arm in `accounts.resolve` so
|
|
101
|
+
// production sellers don't need this; remove the sandbox arm + this
|
|
102
|
+
// constant before deploying. See FORK CHECKLIST item 6.
|
|
103
|
+
const SANDBOX_ID_PREFIX = 'sandbox_';
|
|
104
|
+
|
|
105
|
+
// ---------------------------------------------------------------------------
|
|
106
|
+
// Upstream client — SWAP for production.
|
|
107
|
+
// ---------------------------------------------------------------------------
|
|
108
|
+
|
|
109
|
+
interface UpstreamNetwork {
|
|
110
|
+
network_code: string;
|
|
111
|
+
display_name: string;
|
|
112
|
+
adcp_publisher: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface UpstreamProductPricing {
|
|
116
|
+
min_cpm: number;
|
|
117
|
+
target_cpm?: number;
|
|
118
|
+
currency: string;
|
|
119
|
+
min_spend?: number;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface UpstreamForecastPoint {
|
|
123
|
+
budget?: number;
|
|
124
|
+
metrics: {
|
|
125
|
+
impressions?: { low: number; mid: number; high: number };
|
|
126
|
+
clicks?: { low: number; mid: number; high: number };
|
|
127
|
+
spend?: { low: number; mid: number; high: number };
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface UpstreamForecast {
|
|
132
|
+
product_id: string;
|
|
133
|
+
forecast_range_unit: 'spend';
|
|
134
|
+
method: 'modeled';
|
|
135
|
+
currency: string;
|
|
136
|
+
points: UpstreamForecastPoint[];
|
|
137
|
+
min_budget_warning?: { required: number; reason: string };
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
interface UpstreamProduct {
|
|
141
|
+
product_id: string;
|
|
142
|
+
name: string;
|
|
143
|
+
network_code: string;
|
|
144
|
+
delivery_type: 'non_guaranteed';
|
|
145
|
+
channel: 'video' | 'ctv' | 'display' | 'audio';
|
|
146
|
+
format_ids: string[];
|
|
147
|
+
ad_unit_ids: string[];
|
|
148
|
+
pricing: UpstreamProductPricing;
|
|
149
|
+
forecast?: UpstreamForecast;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface UpstreamLineItem {
|
|
153
|
+
line_item_id: string;
|
|
154
|
+
order_id: string;
|
|
155
|
+
product_id: string;
|
|
156
|
+
status: 'ready' | 'paused' | 'delivering' | 'completed';
|
|
157
|
+
budget: number;
|
|
158
|
+
ad_unit_targeting: string[];
|
|
159
|
+
creative_ids: string[];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface UpstreamOrder {
|
|
163
|
+
order_id: string;
|
|
164
|
+
network_code: string;
|
|
165
|
+
name: string;
|
|
166
|
+
status: 'confirmed' | 'delivering' | 'completed' | 'canceled' | 'rejected';
|
|
167
|
+
advertiser_id: string;
|
|
168
|
+
currency: string;
|
|
169
|
+
budget: number;
|
|
170
|
+
pacing: 'even' | 'asap' | 'front_loaded';
|
|
171
|
+
flight_start?: string;
|
|
172
|
+
flight_end?: string;
|
|
173
|
+
rejection_reason?: string;
|
|
174
|
+
line_items?: UpstreamLineItem[];
|
|
175
|
+
created_at?: string;
|
|
176
|
+
updated_at?: string;
|
|
177
|
+
replayed?: boolean;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
interface UpstreamCreative {
|
|
181
|
+
creative_id: string;
|
|
182
|
+
network_code: string;
|
|
183
|
+
name: string;
|
|
184
|
+
format_id: string;
|
|
185
|
+
advertiser_id: string;
|
|
186
|
+
status: 'active' | 'paused' | 'archived';
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
interface UpstreamDelivery {
|
|
190
|
+
order_id: string;
|
|
191
|
+
currency: string;
|
|
192
|
+
pacing: 'even' | 'asap' | 'front_loaded';
|
|
193
|
+
reporting_period: { start?: string; end?: string };
|
|
194
|
+
totals: { impressions: number; clicks: number; spend: number; budget_remaining: number };
|
|
195
|
+
line_items: Array<{
|
|
196
|
+
line_item_id: string;
|
|
197
|
+
product_id: string;
|
|
198
|
+
impressions: number;
|
|
199
|
+
clicks: number;
|
|
200
|
+
spend: number;
|
|
201
|
+
currency: string;
|
|
202
|
+
effective_cpm: number;
|
|
203
|
+
pacing_pct: number;
|
|
204
|
+
}>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const http = createUpstreamHttpClient({
|
|
208
|
+
baseUrl: UPSTREAM_URL,
|
|
209
|
+
auth: { kind: 'static_bearer', token: UPSTREAM_API_KEY },
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
const networkHeader = (networkCode: string): Record<string, string> => ({ 'X-Network-Code': networkCode });
|
|
213
|
+
|
|
214
|
+
const upstream = {
|
|
215
|
+
// SWAP: tenant lookup. Mock exposes /_lookup; production typically a
|
|
216
|
+
// network registry / service-account scope endpoint.
|
|
217
|
+
async lookupNetwork(publisherDomain: string): Promise<UpstreamNetwork | null> {
|
|
218
|
+
const { body } = await http.get<UpstreamNetwork>('/_lookup/network', { adcp_publisher: publisherDomain });
|
|
219
|
+
return body;
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
// SWAP: product catalog. Mock filters by network_code via header + optional
|
|
223
|
+
// ?channel. When `flight_start`/`flight_end`/`budget` are passed, the mock
|
|
224
|
+
// returns per-product `forecast` inline — single round-trip instead of N
|
|
225
|
+
// follow-up `/v1/forecast` calls.
|
|
226
|
+
async listProducts(
|
|
227
|
+
networkCode: string,
|
|
228
|
+
opts?: {
|
|
229
|
+
channel?: 'video' | 'ctv' | 'display' | 'audio';
|
|
230
|
+
flightStart?: string;
|
|
231
|
+
flightEnd?: string;
|
|
232
|
+
budget?: number;
|
|
233
|
+
}
|
|
234
|
+
): Promise<UpstreamProduct[]> {
|
|
235
|
+
const params: Record<string, string> = {};
|
|
236
|
+
if (opts?.channel) params['channel'] = opts.channel;
|
|
237
|
+
if (opts?.flightStart) params['flight_start'] = opts.flightStart;
|
|
238
|
+
if (opts?.flightEnd) params['flight_end'] = opts.flightEnd;
|
|
239
|
+
if (opts?.budget !== undefined) params['budget'] = String(opts.budget);
|
|
240
|
+
const { body } = await http.get<{ products: UpstreamProduct[] }>(
|
|
241
|
+
'/v1/products',
|
|
242
|
+
params,
|
|
243
|
+
networkHeader(networkCode)
|
|
244
|
+
);
|
|
245
|
+
return body?.products ?? [];
|
|
246
|
+
},
|
|
247
|
+
|
|
248
|
+
// SWAP: per-product forecast. Use this when your backend separates the
|
|
249
|
+
// catalog and forecast surfaces. For the worked-mock case we fold forecast
|
|
250
|
+
// into `listProducts` above; this method shows the discrete shape.
|
|
251
|
+
async getForecast(
|
|
252
|
+
networkCode: string,
|
|
253
|
+
body: {
|
|
254
|
+
product_id: string;
|
|
255
|
+
targeting?: Record<string, unknown>;
|
|
256
|
+
flight_dates?: { start?: string; end?: string };
|
|
257
|
+
budget?: number;
|
|
258
|
+
}
|
|
259
|
+
): Promise<UpstreamForecast | null> {
|
|
260
|
+
const r = await http.post<UpstreamForecast>('/v1/forecast', body, networkHeader(networkCode));
|
|
261
|
+
return r.body;
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
// SWAP: list orders. Returns { orders: [...] }.
|
|
265
|
+
async listOrders(networkCode: string): Promise<UpstreamOrder[]> {
|
|
266
|
+
const { body } = await http.get<{ orders: UpstreamOrder[] }>('/v1/orders', undefined, networkHeader(networkCode));
|
|
267
|
+
return body?.orders ?? [];
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
// SWAP: sync create. Mock returns 201 with status='confirmed'. No HITL
|
|
271
|
+
// task — auction-cleared programmatic. `client_request_id` round-trips
|
|
272
|
+
// to upstream for at-most-once execution; replay returns same order_id
|
|
273
|
+
// with `replayed: true`.
|
|
274
|
+
async createOrder(
|
|
275
|
+
networkCode: string,
|
|
276
|
+
body: {
|
|
277
|
+
name: string;
|
|
278
|
+
advertiser_id: string;
|
|
279
|
+
currency: string;
|
|
280
|
+
budget: number;
|
|
281
|
+
pacing?: 'even' | 'asap' | 'front_loaded';
|
|
282
|
+
flight_start?: string;
|
|
283
|
+
flight_end?: string;
|
|
284
|
+
line_items?: Array<{ product_id: string; budget: number }>;
|
|
285
|
+
client_request_id?: string;
|
|
286
|
+
}
|
|
287
|
+
): Promise<UpstreamOrder> {
|
|
288
|
+
const r = await http.post<UpstreamOrder>('/v1/orders', body, networkHeader(networkCode));
|
|
289
|
+
if (r.body === null) {
|
|
290
|
+
throw new AdcpError('INVALID_REQUEST', { message: 'order creation rejected by upstream' });
|
|
291
|
+
}
|
|
292
|
+
return r.body;
|
|
293
|
+
},
|
|
294
|
+
|
|
295
|
+
async getOrder(networkCode: string, orderId: string): Promise<UpstreamOrder | null> {
|
|
296
|
+
const { body } = await http.get<UpstreamOrder>(
|
|
297
|
+
`/v1/orders/${encodeURIComponent(orderId)}`,
|
|
298
|
+
undefined,
|
|
299
|
+
networkHeader(networkCode)
|
|
300
|
+
);
|
|
301
|
+
return body;
|
|
302
|
+
},
|
|
303
|
+
|
|
304
|
+
async listLineItems(networkCode: string, orderId: string): Promise<UpstreamLineItem[]> {
|
|
305
|
+
const { body } = await http.get<{ line_items: UpstreamLineItem[] }>(
|
|
306
|
+
`/v1/orders/${encodeURIComponent(orderId)}/lineitems`,
|
|
307
|
+
undefined,
|
|
308
|
+
networkHeader(networkCode)
|
|
309
|
+
);
|
|
310
|
+
return body?.line_items ?? [];
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
async createLineItem(
|
|
314
|
+
networkCode: string,
|
|
315
|
+
orderId: string,
|
|
316
|
+
body: { product_id: string; budget: number; ad_unit_ids?: string[]; client_request_id?: string }
|
|
317
|
+
): Promise<{ line_item_id: string }> {
|
|
318
|
+
const r = await http.post<{ line_item_id: string }>(
|
|
319
|
+
`/v1/orders/${encodeURIComponent(orderId)}/lineitems`,
|
|
320
|
+
body,
|
|
321
|
+
networkHeader(networkCode)
|
|
322
|
+
);
|
|
323
|
+
if (r.body === null) {
|
|
324
|
+
throw new AdcpError('INVALID_REQUEST', { message: 'line item creation rejected by upstream' });
|
|
325
|
+
}
|
|
326
|
+
return r.body;
|
|
327
|
+
},
|
|
328
|
+
|
|
329
|
+
async createCreative(
|
|
330
|
+
networkCode: string,
|
|
331
|
+
body: { name: string; format_id: string; advertiser_id: string; client_request_id?: string }
|
|
332
|
+
): Promise<UpstreamCreative> {
|
|
333
|
+
const r = await http.post<UpstreamCreative>('/v1/creatives', body, networkHeader(networkCode));
|
|
334
|
+
if (r.body === null) {
|
|
335
|
+
throw new AdcpError('INVALID_REQUEST', { message: 'creative creation rejected by upstream' });
|
|
336
|
+
}
|
|
337
|
+
return r.body;
|
|
338
|
+
},
|
|
339
|
+
|
|
340
|
+
async getDelivery(networkCode: string, orderId: string): Promise<UpstreamDelivery | null> {
|
|
341
|
+
const { body } = await http.get<UpstreamDelivery>(
|
|
342
|
+
`/v1/orders/${encodeURIComponent(orderId)}/delivery`,
|
|
343
|
+
undefined,
|
|
344
|
+
networkHeader(networkCode)
|
|
345
|
+
);
|
|
346
|
+
return body;
|
|
347
|
+
},
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// ---------------------------------------------------------------------------
|
|
351
|
+
// AdCP-side adapter — typed against SalesCorePlatform & SalesIngestionPlatform.
|
|
352
|
+
// ---------------------------------------------------------------------------
|
|
353
|
+
|
|
354
|
+
interface NetworkMeta {
|
|
355
|
+
network_code: string;
|
|
356
|
+
publisher_domain: string;
|
|
357
|
+
[key: string]: unknown;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const FORMAT_AGENT_URL = PUBLIC_AGENT_URL;
|
|
361
|
+
|
|
362
|
+
/** Project upstream product onto AdCP `Product`. Auction-cleared inventory
|
|
363
|
+
* surfaces `min_cpm` as the `pricing_options[].fixed_price` (floor); buyers
|
|
364
|
+
* bid at or above. Production sellers can layer `auction` pricing models or
|
|
365
|
+
* deal-id-keyed alternative pricing options on top. */
|
|
366
|
+
function projectProduct(p: UpstreamProduct, publisherDomain: string): Product {
|
|
367
|
+
return {
|
|
368
|
+
product_id: p.product_id,
|
|
369
|
+
name: p.name,
|
|
370
|
+
description: `${p.name} — programmatic remnant ${p.channel}`,
|
|
371
|
+
publisher_properties: [{ publisher_domain: publisherDomain, selection_type: 'all' }],
|
|
372
|
+
channels: [
|
|
373
|
+
p.channel === 'video'
|
|
374
|
+
? 'olv'
|
|
375
|
+
: p.channel === 'ctv'
|
|
376
|
+
? 'ctv'
|
|
377
|
+
: p.channel === 'audio'
|
|
378
|
+
? 'streaming_audio'
|
|
379
|
+
: 'display',
|
|
380
|
+
],
|
|
381
|
+
format_ids: p.format_ids.map(id => ({ agent_url: FORMAT_AGENT_URL, id })),
|
|
382
|
+
delivery_type: 'non_guaranteed',
|
|
383
|
+
pricing_options: [
|
|
384
|
+
{
|
|
385
|
+
pricing_option_id: 'cpm_floor',
|
|
386
|
+
pricing_model: 'cpm',
|
|
387
|
+
currency: p.pricing.currency,
|
|
388
|
+
// Floor pricing — sellers accept any bid ≥ this. Auction-cleared
|
|
389
|
+
// effective CPM lands somewhere between `min_cpm` and `target_cpm`
|
|
390
|
+
// depending on bid pressure; we surface the floor as the firm
|
|
391
|
+
// commitment.
|
|
392
|
+
fixed_price: p.pricing.min_cpm,
|
|
393
|
+
...(p.pricing.min_spend !== undefined && { min_spend: p.pricing.min_spend }),
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
reporting_capabilities: {
|
|
397
|
+
available_reporting_frequencies: ['daily'],
|
|
398
|
+
expected_delay_minutes: 60,
|
|
399
|
+
timezone: 'UTC',
|
|
400
|
+
supports_webhooks: false,
|
|
401
|
+
available_metrics: ['impressions', 'clicks', 'spend'],
|
|
402
|
+
date_range_support: 'date_range',
|
|
403
|
+
},
|
|
404
|
+
// Pass through per-query forecast verbatim — mock returns AdCP-shape
|
|
405
|
+
// already (`points`, `metrics.{impressions,clicks,spend}.{low,mid,high}`,
|
|
406
|
+
// `forecast_range_unit: 'spend'`, `method: 'modeled'`). Real auction-
|
|
407
|
+
// backed sellers (FreeWheel, Magnite SSP) need adapter-side translation.
|
|
408
|
+
...(p.forecast && { forecast: p.forecast }),
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function mapMediaBuyStatus(
|
|
413
|
+
orderStatus: UpstreamOrder['status']
|
|
414
|
+
): 'pending_creatives' | 'pending_start' | 'active' | 'paused' | 'completed' | 'canceled' {
|
|
415
|
+
switch (orderStatus) {
|
|
416
|
+
case 'delivering':
|
|
417
|
+
return 'active';
|
|
418
|
+
case 'completed':
|
|
419
|
+
return 'completed';
|
|
420
|
+
case 'canceled':
|
|
421
|
+
case 'rejected':
|
|
422
|
+
return 'canceled';
|
|
423
|
+
case 'confirmed':
|
|
424
|
+
default:
|
|
425
|
+
// Auction-cleared but no creatives attached yet → pending_creatives.
|
|
426
|
+
// Buyer transitions to `active` after sync_creatives lands and the
|
|
427
|
+
// first impression delivers. Framework surfaces the status change
|
|
428
|
+
// via publishStatusChange on resource_type: 'media_buy'.
|
|
429
|
+
return 'pending_creatives';
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// Status overrides persisted at the adapter level. Real backends mutate the
|
|
434
|
+
// upstream Order on creative-attach (the line-item status flips, the order
|
|
435
|
+
// status flips with it). The mock doesn't model that transition; we track
|
|
436
|
+
// the override here so `get_media_buys` returns the advanced status the
|
|
437
|
+
// storyboard validates. SWAP: drop this map and read upstream state — your
|
|
438
|
+
// backend already persists what we're tracking here.
|
|
439
|
+
//
|
|
440
|
+
// Keyed by `<network_code>::<order_id>` so a forking adopter who keeps the
|
|
441
|
+
// map for in-flight scenarios doesn't accidentally surface tenant A's
|
|
442
|
+
// override on tenant B's `media_buy_id` collision (mock IDs are 32 bits).
|
|
443
|
+
const adapterStatusOverrides = new Map<string, 'pending_start' | 'active'>();
|
|
444
|
+
const overrideKey = (networkCode: string, orderId: string): string => `${networkCode}::${orderId}`;
|
|
445
|
+
|
|
446
|
+
// Local pause / cancel tracker. The mock upstream models the create →
|
|
447
|
+
// pending → active progression; pause and cancel are seller-side state-machine
|
|
448
|
+
// concerns the spec's `core/state-machine.yaml` declares as terminal sinks
|
|
449
|
+
// (canceled) or reversible (paused). Production sellers swap this Map for
|
|
450
|
+
// a single durable lookup against their order DB and check
|
|
451
|
+
// `MEDIA_BUY_TRANSITIONS` against the current status before issuing the
|
|
452
|
+
// upstream PATCH. The local Map here exists only because the worked-example
|
|
453
|
+
// mock doesn't model these states upstream.
|
|
454
|
+
const localBuyStatus = new Map<string, 'paused' | 'canceled'>();
|
|
455
|
+
|
|
456
|
+
class SalesNonGuaranteedAdapter implements DecisioningPlatform<Record<string, never>, NetworkMeta> {
|
|
457
|
+
capabilities = {
|
|
458
|
+
specialisms: ['sales-non-guaranteed'] as const,
|
|
459
|
+
channels: ['olv', 'ctv', 'display', 'streaming_audio'] as const,
|
|
460
|
+
pricingModels: ['cpm'] as const,
|
|
461
|
+
config: {},
|
|
462
|
+
compliance_testing: {
|
|
463
|
+
scenarios: ['force_media_buy_status', 'simulate_delivery'] as const,
|
|
464
|
+
},
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
accounts: AccountStore<NetworkMeta> = {
|
|
468
|
+
resolve: async ref => {
|
|
469
|
+
if (!ref) return null;
|
|
470
|
+
// SWAP: persist `account_id → network_code` during sync_accounts and
|
|
471
|
+
// serve account_id lookups from there.
|
|
472
|
+
if ('account_id' in ref) return null;
|
|
473
|
+
|
|
474
|
+
// ─── TEST-ONLY: cascade-scenario sandbox-arm ─────────────────────
|
|
475
|
+
// DELETE THIS BLOCK BEFORE DEPLOYING. The compliance runner injects
|
|
476
|
+
// synthetic refs like `{brand: {domain: 'test.example'}, sandbox: true}`
|
|
477
|
+
// for `media_buy_seller/*` cascade scenarios. Routes those refs to a
|
|
478
|
+
// fixed seeded network so the rest of the adapter has something
|
|
479
|
+
// concrete to operate on. Production sellers either reject sandbox
|
|
480
|
+
// refs entirely or route them to a dedicated sandbox tenant.
|
|
481
|
+
//
|
|
482
|
+
// Gate is `ref.sandbox === true` from the wire `AccountReference`.
|
|
483
|
+
// Stamping `mode: 'sandbox'` on the returned `Account` is what admits
|
|
484
|
+
// the framework's `comply_test_controller` gate — see #1435 phase 2/3.
|
|
485
|
+
// No env var is consulted; production traffic that doesn't set
|
|
486
|
+
// `sandbox: true` on the wire never hits this branch.
|
|
487
|
+
if (ref.sandbox === true) {
|
|
488
|
+
const sandboxDomain = 'acmeoutdoor.example';
|
|
489
|
+
const network = await upstream.lookupNetwork(sandboxDomain);
|
|
490
|
+
if (!network) return null;
|
|
491
|
+
return {
|
|
492
|
+
id: `${SANDBOX_ID_PREFIX}${network.network_code}`,
|
|
493
|
+
name: `Sandbox: ${network.display_name}`,
|
|
494
|
+
status: 'active',
|
|
495
|
+
mode: 'sandbox',
|
|
496
|
+
...(ref.operator !== undefined && { operator: ref.operator }),
|
|
497
|
+
brand: { domain: ref.brand.domain ?? sandboxDomain },
|
|
498
|
+
ctx_metadata: { network_code: network.network_code, publisher_domain: network.adcp_publisher },
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
// ─── /TEST-ONLY ──────────────────────────────────────────────────
|
|
502
|
+
|
|
503
|
+
const publisherDomain = ref.brand.domain;
|
|
504
|
+
if (!publisherDomain) return null;
|
|
505
|
+
const network = await upstream.lookupNetwork(publisherDomain);
|
|
506
|
+
if (!network) return null;
|
|
507
|
+
const operator = ref.operator;
|
|
508
|
+
return {
|
|
509
|
+
id: network.network_code,
|
|
510
|
+
name: network.display_name,
|
|
511
|
+
status: 'active',
|
|
512
|
+
...(operator !== undefined && { operator }),
|
|
513
|
+
brand: { domain: network.adcp_publisher },
|
|
514
|
+
ctx_metadata: { network_code: network.network_code, publisher_domain: network.adcp_publisher },
|
|
515
|
+
};
|
|
516
|
+
},
|
|
517
|
+
|
|
518
|
+
upsert: async refs => {
|
|
519
|
+
const out: SyncAccountsResultRow[] = [];
|
|
520
|
+
for (const ref of refs) {
|
|
521
|
+
if ('account_id' in ref) {
|
|
522
|
+
out.push({
|
|
523
|
+
brand: { domain: '' },
|
|
524
|
+
operator: '',
|
|
525
|
+
action: 'failed',
|
|
526
|
+
status: 'rejected',
|
|
527
|
+
errors: [{ code: 'INVALID_REQUEST', message: 'sync_accounts requires brand+operator, not account_id' }],
|
|
528
|
+
});
|
|
529
|
+
continue;
|
|
530
|
+
}
|
|
531
|
+
const domain = ref.brand.domain;
|
|
532
|
+
const operator = ref.operator;
|
|
533
|
+
const network = domain ? await upstream.lookupNetwork(domain) : null;
|
|
534
|
+
if (!network) {
|
|
535
|
+
out.push({
|
|
536
|
+
brand: { domain },
|
|
537
|
+
operator,
|
|
538
|
+
action: 'failed',
|
|
539
|
+
status: 'rejected',
|
|
540
|
+
errors: [{ code: 'ACCOUNT_NOT_FOUND', message: `No publisher network registered for ${domain}` }],
|
|
541
|
+
});
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
out.push({
|
|
545
|
+
account_id: network.network_code,
|
|
546
|
+
name: network.display_name,
|
|
547
|
+
brand: { domain: network.adcp_publisher },
|
|
548
|
+
operator,
|
|
549
|
+
action: 'unchanged',
|
|
550
|
+
status: 'active',
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
return out;
|
|
554
|
+
},
|
|
555
|
+
|
|
556
|
+
list: async () => {
|
|
557
|
+
const items: Array<Account<NetworkMeta>> = [];
|
|
558
|
+
for (const domain of KNOWN_PUBLISHERS) {
|
|
559
|
+
const n = await upstream.lookupNetwork(domain);
|
|
560
|
+
if (!n) continue;
|
|
561
|
+
items.push({
|
|
562
|
+
id: n.network_code,
|
|
563
|
+
name: n.display_name,
|
|
564
|
+
status: 'active',
|
|
565
|
+
brand: { domain: n.adcp_publisher },
|
|
566
|
+
ctx_metadata: { network_code: n.network_code, publisher_domain: n.adcp_publisher },
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
return { items, has_more: false };
|
|
570
|
+
},
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
// Required: explicit `SalesCorePlatform<Meta> & SalesIngestionPlatform<Meta>`
|
|
574
|
+
// annotation per migration recipe #11 — `defineSalesPlatform` widens to
|
|
575
|
+
// all-optional and `RequiredPlatformsFor<'sales-non-guaranteed'>` requires
|
|
576
|
+
// the closed shape on the way out.
|
|
577
|
+
sales: SalesCorePlatform<NetworkMeta> & SalesIngestionPlatform<NetworkMeta> = {
|
|
578
|
+
getProducts: async (req: GetProductsRequest, ctx): Promise<GetProductsResponse> => {
|
|
579
|
+
const networkCode = ctx.account.ctx_metadata.network_code;
|
|
580
|
+
const publisherDomain = ctx.account.ctx_metadata.publisher_domain;
|
|
581
|
+
// When the buyer provides structured filters (flight dates, budget),
|
|
582
|
+
// forward them so each product comes back with a per-query forecast.
|
|
583
|
+
// Single upstream round-trip surfaces both the catalog and the
|
|
584
|
+
// forecast curve.
|
|
585
|
+
const briefBudget = (req.filters?.budget_range as { max?: number } | undefined)?.max;
|
|
586
|
+
const products = await upstream.listProducts(networkCode, {
|
|
587
|
+
...(req.filters?.start_date && { flightStart: req.filters.start_date }),
|
|
588
|
+
...(req.filters?.end_date && { flightEnd: req.filters.end_date }),
|
|
589
|
+
...(briefBudget !== undefined && { budget: briefBudget }),
|
|
590
|
+
});
|
|
591
|
+
return { products: products.map(p => projectProduct(p, publisherDomain)) };
|
|
592
|
+
},
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Sync `create_media_buy`. Returns `media_buy_id` on the sync-success
|
|
596
|
+
* arm immediately — auction-cleared inventory has no IO-review step.
|
|
597
|
+
* `idempotency_key` round-trips to upstream `client_request_id`.
|
|
598
|
+
*/
|
|
599
|
+
createMediaBuy: async (req: CreateMediaBuyRequest, ctx) => {
|
|
600
|
+
const networkCode = ctx.account.ctx_metadata.network_code;
|
|
601
|
+
// SWAP: production splits network_code (publisher tenant) and
|
|
602
|
+
// advertiser_id (brand seat). Mock collapses both — real DSPs/SSPs
|
|
603
|
+
// resolve advertiser_id from `req.brand` against the publisher's
|
|
604
|
+
// advertiser directory.
|
|
605
|
+
const advertiserId = networkCode;
|
|
606
|
+
|
|
607
|
+
const totalBudget =
|
|
608
|
+
req.total_budget?.amount ??
|
|
609
|
+
(req.packages ?? []).reduce((s, p) => s + ((p as { budget?: number }).budget ?? 0), 0);
|
|
610
|
+
const currency = req.total_budget?.currency ?? 'USD';
|
|
611
|
+
|
|
612
|
+
// Budget-floor enforcement happens upstream — the mock returns
|
|
613
|
+
// budget_too_low if any line item is below product.min_spend.
|
|
614
|
+
// Adopters who want to enforce client-side (skip the upstream call
|
|
615
|
+
// for an obvious reject) can iterate `req.packages` and check
|
|
616
|
+
// against a cached product catalog before calling the upstream.
|
|
617
|
+
|
|
618
|
+
const packagesRequest = (req.packages ?? []) as Array<{
|
|
619
|
+
product_id?: string;
|
|
620
|
+
budget?: number;
|
|
621
|
+
}>;
|
|
622
|
+
|
|
623
|
+
// Build the line_items array up front so the upstream POST is one
|
|
624
|
+
// round-trip. Production splits this when line-item validation needs
|
|
625
|
+
// to happen per-LI server-side; the mock accepts the array inline.
|
|
626
|
+
const lineItemsBody: Array<{ product_id: string; budget: number }> = [];
|
|
627
|
+
for (let i = 0; i < packagesRequest.length; i++) {
|
|
628
|
+
const pkg = packagesRequest[i];
|
|
629
|
+
if (!pkg) continue;
|
|
630
|
+
if (!pkg.product_id) {
|
|
631
|
+
throw new AdcpError('INVALID_REQUEST', {
|
|
632
|
+
message: `package[${i}]: product_id required`,
|
|
633
|
+
field: `packages[${i}].product_id`,
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
lineItemsBody.push({ product_id: pkg.product_id, budget: pkg.budget ?? 0 });
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
// SWAP: pacing extraction — production reads from req.packages[i].pacing
|
|
640
|
+
// or req.delivery_settings, varying by your contract surface. AdCP 3.0.5
|
|
641
|
+
// doesn't carry an order-level `pacing` on the wire — the mock accepts
|
|
642
|
+
// it because real platforms (Meta, TTD, etc.) all expose pacing on
|
|
643
|
+
// their own non-guaranteed shape. Default 'even' if unspecified;
|
|
644
|
+
// reject typos rather than silently passing them through.
|
|
645
|
+
const PACING_VALUES = ['even', 'asap', 'front_loaded'] as const;
|
|
646
|
+
const rawPacing = (req as { pacing?: unknown }).pacing;
|
|
647
|
+
let pacing: (typeof PACING_VALUES)[number] = 'even';
|
|
648
|
+
if (typeof rawPacing === 'string') {
|
|
649
|
+
if (!(PACING_VALUES as readonly string[]).includes(rawPacing)) {
|
|
650
|
+
throw new AdcpError('INVALID_REQUEST', {
|
|
651
|
+
message: `pacing must be one of ${PACING_VALUES.join(', ')} (got: ${rawPacing})`,
|
|
652
|
+
field: 'pacing',
|
|
653
|
+
recovery: 'correctable',
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
pacing = rawPacing as (typeof PACING_VALUES)[number];
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
let order: UpstreamOrder;
|
|
660
|
+
try {
|
|
661
|
+
order = await upstream.createOrder(networkCode, {
|
|
662
|
+
name: `MediaBuy from ${req.brand?.domain ?? 'unknown'}`,
|
|
663
|
+
advertiser_id: advertiserId,
|
|
664
|
+
currency,
|
|
665
|
+
budget: totalBudget,
|
|
666
|
+
pacing,
|
|
667
|
+
...(req.start_time && { flight_start: req.start_time }),
|
|
668
|
+
...(req.end_time && { flight_end: req.end_time }),
|
|
669
|
+
line_items: lineItemsBody,
|
|
670
|
+
client_request_id: req.idempotency_key,
|
|
671
|
+
});
|
|
672
|
+
} catch (e) {
|
|
673
|
+
// Surface upstream-typed error bodies as AdcpError with the
|
|
674
|
+
// appropriate code. Mock returns `code: 'budget_too_low'` /
|
|
675
|
+
// `code: 'product_not_found'` / etc.; we map a few of these
|
|
676
|
+
// explicitly so adopters see typed errors at the buyer boundary.
|
|
677
|
+
if (e instanceof AdcpError) throw e;
|
|
678
|
+
throw new AdcpError('SERVICE_UNAVAILABLE', {
|
|
679
|
+
message: (e as Error).message ?? 'upstream order creation failed',
|
|
680
|
+
recovery: 'transient',
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
// Project the response. The upstream order carries `line_items[]`
|
|
685
|
+
// already (since we created them inline); each maps to a wire
|
|
686
|
+
// `package`.
|
|
687
|
+
const packagesOut: CreateMediaBuySuccess['packages'] = (order.line_items ?? []).map((li, i) => ({
|
|
688
|
+
package_id: li.line_item_id,
|
|
689
|
+
product_id: li.product_id,
|
|
690
|
+
budget: li.budget,
|
|
691
|
+
// Re-thread the buyer's package_id if supplied — adopters who
|
|
692
|
+
// care about preserving buyer-side ids should round-trip them
|
|
693
|
+
// here. SWAP: persist the mapping.
|
|
694
|
+
...(packagesRequest[i] !== undefined &&
|
|
695
|
+
(packagesRequest[i] as { buyer_ref?: string }).buyer_ref !== undefined && {
|
|
696
|
+
buyer_ref: (packagesRequest[i] as { buyer_ref?: string }).buyer_ref,
|
|
697
|
+
}),
|
|
698
|
+
}));
|
|
699
|
+
|
|
700
|
+
return {
|
|
701
|
+
media_buy_id: order.order_id,
|
|
702
|
+
// pending_creatives — buy is auction-confirmed but no creatives
|
|
703
|
+
// attached yet. Buyer transitions to `active` after sync_creatives.
|
|
704
|
+
status: 'pending_creatives',
|
|
705
|
+
confirmed_at: order.created_at ?? new Date().toISOString(),
|
|
706
|
+
packages: packagesOut,
|
|
707
|
+
};
|
|
708
|
+
},
|
|
709
|
+
|
|
710
|
+
updateMediaBuy: async (id: string, patch: UpdateMediaBuyRequest, ctx): Promise<UpdateMediaBuySuccess> => {
|
|
711
|
+
const networkCode = ctx.account.ctx_metadata.network_code;
|
|
712
|
+
// Validate existence first — production sellers PATCH the upstream
|
|
713
|
+
// order to apply pacing / budget / status changes; the worked
|
|
714
|
+
// example echoes the current state for clarity. SWAP: wire your
|
|
715
|
+
// backend's order-mutation endpoint here.
|
|
716
|
+
const existing = await upstream.getOrder(networkCode, id);
|
|
717
|
+
if (!existing) {
|
|
718
|
+
throw new AdcpError('MEDIA_BUY_NOT_FOUND', {
|
|
719
|
+
message: `media_buy ${id} not found in this seller's network`,
|
|
720
|
+
recovery: 'terminal',
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
// Validate any patch.packages reference real line items. Storyboard
|
|
724
|
+
// exercises bogus package_id and asserts PACKAGE_NOT_FOUND on the wire.
|
|
725
|
+
const patchPackages = (
|
|
726
|
+
patch as {
|
|
727
|
+
packages?: Array<{ package_id?: string; creative_assignments?: unknown[] }>;
|
|
728
|
+
}
|
|
729
|
+
).packages;
|
|
730
|
+
let hasCreativeAssignment = false;
|
|
731
|
+
if (patchPackages?.length) {
|
|
732
|
+
const lineItems = await upstream.listLineItems(networkCode, id);
|
|
733
|
+
const knownPackageIds = new Set(lineItems.map(li => li.line_item_id));
|
|
734
|
+
for (const p of patchPackages) {
|
|
735
|
+
if (p.package_id && !knownPackageIds.has(p.package_id)) {
|
|
736
|
+
throw new AdcpError('PACKAGE_NOT_FOUND', {
|
|
737
|
+
message: `Package ${p.package_id} not found in media buy ${id}`,
|
|
738
|
+
field: 'packages.package_id',
|
|
739
|
+
recovery: 'terminal',
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
if (Array.isArray(p.creative_assignments) && p.creative_assignments.length > 0) {
|
|
743
|
+
hasCreativeAssignment = true;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
// Status advances when the buyer attaches creatives — pending_creatives
|
|
748
|
+
// → pending_start (or active if the flight already started). Production
|
|
749
|
+
// backends would also persist the assignment to the upstream line item;
|
|
750
|
+
// the worked example just advances the response state.
|
|
751
|
+
//
|
|
752
|
+
// State-machine enforcement for pause / cancel. The spec's
|
|
753
|
+
// `core/state-machine.yaml` declares `canceled` as a terminal sink and
|
|
754
|
+
// a re-cancel as illegal — `assertMediaBuyTransition` throws
|
|
755
|
+
// `NOT_CANCELLABLE` on `canceled → canceled`, which is the
|
|
756
|
+
// `media_buy_seller/invalid_transitions` storyboard's contract. The
|
|
757
|
+
// local Map covers the gap between upstream (which doesn't model these)
|
|
758
|
+
// and the spec; production sellers read the canonical transitions
|
|
759
|
+
// exported by `@adcp/sdk/server` against their own status column.
|
|
760
|
+
const local = localBuyStatus.get(overrideKey(networkCode, id));
|
|
761
|
+
const baseStatus = mapMediaBuyStatus(existing.status);
|
|
762
|
+
const currentStatus: AdcpMediaBuyStatus =
|
|
763
|
+
local ?? adapterStatusOverrides.get(overrideKey(networkCode, id)) ?? baseStatus;
|
|
764
|
+
let nextStatus: AdcpMediaBuyStatus = currentStatus;
|
|
765
|
+
if ((patch as { canceled?: boolean }).canceled === true) {
|
|
766
|
+
assertMediaBuyTransition(currentStatus, 'canceled');
|
|
767
|
+
nextStatus = 'canceled';
|
|
768
|
+
localBuyStatus.set(overrideKey(networkCode, id), nextStatus);
|
|
769
|
+
} else if ((patch as { paused?: boolean }).paused === true && currentStatus === 'active') {
|
|
770
|
+
assertMediaBuyTransition(currentStatus, 'paused');
|
|
771
|
+
nextStatus = 'paused';
|
|
772
|
+
localBuyStatus.set(overrideKey(networkCode, id), nextStatus);
|
|
773
|
+
} else if (hasCreativeAssignment && nextStatus === 'pending_creatives') {
|
|
774
|
+
const flightStarted = existing.flight_start !== undefined && Date.parse(existing.flight_start) <= Date.now();
|
|
775
|
+
nextStatus = flightStarted ? 'active' : 'pending_start';
|
|
776
|
+
adapterStatusOverrides.set(overrideKey(networkCode, id), nextStatus);
|
|
777
|
+
}
|
|
778
|
+
return {
|
|
779
|
+
media_buy_id: existing.order_id,
|
|
780
|
+
status: nextStatus,
|
|
781
|
+
};
|
|
782
|
+
},
|
|
783
|
+
|
|
784
|
+
getMediaBuyDelivery: async (req: GetMediaBuyDeliveryRequest, ctx): Promise<GetMediaBuyDeliveryResponse> => {
|
|
785
|
+
const networkCode = ctx.account.ctx_metadata.network_code;
|
|
786
|
+
const requestedIds = req.media_buy_ids ?? [];
|
|
787
|
+
// Multi-id pass-through per #1342 contract — fan out per id; framework
|
|
788
|
+
// dev-mode warn (post-#1410) fires automatically if we accidentally
|
|
789
|
+
// truncate to ids[0]. Filter undefined results so an unknown id
|
|
790
|
+
// produces no row rather than an error (matches upstream semantics).
|
|
791
|
+
const deliveries = await Promise.all(
|
|
792
|
+
requestedIds.map(async id => {
|
|
793
|
+
const d = await upstream.getDelivery(networkCode, id);
|
|
794
|
+
if (!d) return null;
|
|
795
|
+
return {
|
|
796
|
+
media_buy_id: d.order_id,
|
|
797
|
+
currency: d.currency,
|
|
798
|
+
reporting_period: d.reporting_period,
|
|
799
|
+
totals: d.totals,
|
|
800
|
+
packages: d.line_items.map(li => ({
|
|
801
|
+
package_id: li.line_item_id,
|
|
802
|
+
product_id: li.product_id,
|
|
803
|
+
impressions: li.impressions,
|
|
804
|
+
clicks: li.clicks,
|
|
805
|
+
spend: li.spend,
|
|
806
|
+
currency: li.currency,
|
|
807
|
+
})),
|
|
808
|
+
};
|
|
809
|
+
})
|
|
810
|
+
);
|
|
811
|
+
const filtered = deliveries.filter((d): d is NonNullable<typeof d> => d !== null);
|
|
812
|
+
// Surface a debugging-friendly trace when buyers ask about ids the
|
|
813
|
+
// upstream doesn't know — silently dropping rows looks like delivery
|
|
814
|
+
// simply hasn't started yet, which buries the actual error.
|
|
815
|
+
const missing = requestedIds.filter((_, i) => deliveries[i] === null);
|
|
816
|
+
if (missing.length > 0) {
|
|
817
|
+
// eslint-disable-next-line no-console
|
|
818
|
+
console.warn(
|
|
819
|
+
`[sales-non-guaranteed] get_media_buy_delivery: ${missing.length} unknown media_buy_id(s) returned no delivery rows: ${missing.join(', ')}`
|
|
820
|
+
);
|
|
821
|
+
}
|
|
822
|
+
const response: GetMediaBuyDeliveryResponse = {
|
|
823
|
+
currency: filtered[0]?.currency ?? 'USD',
|
|
824
|
+
reporting_period: {
|
|
825
|
+
start: filtered[0]?.reporting_period.start ?? new Date().toISOString(),
|
|
826
|
+
end: filtered[0]?.reporting_period.end ?? new Date().toISOString(),
|
|
827
|
+
},
|
|
828
|
+
aggregated_totals: {
|
|
829
|
+
impressions: filtered.reduce((s, d) => s + d.totals.impressions, 0),
|
|
830
|
+
spend: filtered.reduce((s, d) => s + d.totals.spend, 0),
|
|
831
|
+
clicks: filtered.reduce((s, d) => s + d.totals.clicks, 0),
|
|
832
|
+
media_buy_count: filtered.length,
|
|
833
|
+
},
|
|
834
|
+
media_buy_deliveries: filtered.map(d => ({
|
|
835
|
+
media_buy_id: d.media_buy_id,
|
|
836
|
+
// Required field on media_buy_deliveries[i]. Auction inventory in
|
|
837
|
+
// active delivery defaults to 'active'; production sellers map
|
|
838
|
+
// upstream order state through `mapMediaBuyStatus` like elsewhere.
|
|
839
|
+
status: 'active' as const,
|
|
840
|
+
totals: d.totals,
|
|
841
|
+
by_package: d.packages.map(p => ({
|
|
842
|
+
package_id: p.package_id,
|
|
843
|
+
impressions: p.impressions,
|
|
844
|
+
spend: p.spend,
|
|
845
|
+
})),
|
|
846
|
+
})),
|
|
847
|
+
};
|
|
848
|
+
return response;
|
|
849
|
+
},
|
|
850
|
+
|
|
851
|
+
getMediaBuys: async (req: GetMediaBuysRequest, ctx): Promise<GetMediaBuysResponse> => {
|
|
852
|
+
const networkCode = ctx.account.ctx_metadata.network_code;
|
|
853
|
+
const requestedIds = req.media_buy_ids ?? [];
|
|
854
|
+
let orders: UpstreamOrder[];
|
|
855
|
+
if (requestedIds.length > 0) {
|
|
856
|
+
orders = (await Promise.all(requestedIds.map(id => upstream.getOrder(networkCode, id)))).filter(
|
|
857
|
+
(o): o is UpstreamOrder => o !== null
|
|
858
|
+
);
|
|
859
|
+
} else {
|
|
860
|
+
orders = await upstream.listOrders(networkCode);
|
|
861
|
+
}
|
|
862
|
+
// Fetch per-order line items. Mock's GET /v1/orders/{id} omits them;
|
|
863
|
+
// GAM-style backends similarly split Order vs LineItem services. SWAP:
|
|
864
|
+
// batch via `?include=lineitems` if your platform supports it.
|
|
865
|
+
const media_buys = await Promise.all(
|
|
866
|
+
orders.map(async o => {
|
|
867
|
+
const lineItems = await upstream.listLineItems(networkCode, o.order_id);
|
|
868
|
+
const baseStatus = mapMediaBuyStatus(o.status);
|
|
869
|
+
const status = adapterStatusOverrides.get(overrideKey(networkCode, o.order_id)) ?? baseStatus;
|
|
870
|
+
return {
|
|
871
|
+
media_buy_id: o.order_id,
|
|
872
|
+
status,
|
|
873
|
+
currency: o.currency,
|
|
874
|
+
...(o.budget !== undefined && { total_budget: o.budget }),
|
|
875
|
+
...(o.updated_at !== undefined && { confirmed_at: o.updated_at }),
|
|
876
|
+
...(o.created_at !== undefined && { created_at: o.created_at }),
|
|
877
|
+
...(o.updated_at !== undefined && { updated_at: o.updated_at }),
|
|
878
|
+
...(o.flight_start && { start_time: o.flight_start }),
|
|
879
|
+
...(o.flight_end && { end_time: o.flight_end }),
|
|
880
|
+
packages: lineItems.map(li => ({
|
|
881
|
+
package_id: li.line_item_id,
|
|
882
|
+
product_id: li.product_id,
|
|
883
|
+
budget: li.budget,
|
|
884
|
+
currency: o.currency,
|
|
885
|
+
})),
|
|
886
|
+
};
|
|
887
|
+
})
|
|
888
|
+
);
|
|
889
|
+
const response: GetMediaBuysResponse = { media_buys };
|
|
890
|
+
return response;
|
|
891
|
+
},
|
|
892
|
+
|
|
893
|
+
syncCreatives: async (creatives, ctx) => {
|
|
894
|
+
const networkCode = ctx.account.ctx_metadata.network_code;
|
|
895
|
+
const advertiserId = networkCode; // SWAP: same collapse caveat as createMediaBuy.
|
|
896
|
+
const out: SyncCreativesRow[] = [];
|
|
897
|
+
for (const c of creatives) {
|
|
898
|
+
const formatRef = (c as { format_id?: { id?: string } | string }).format_id;
|
|
899
|
+
const formatId = typeof formatRef === 'string' ? formatRef : formatRef?.id;
|
|
900
|
+
if (!formatId) {
|
|
901
|
+
out.push({
|
|
902
|
+
creative_id: (c as { creative_id?: string }).creative_id ?? 'unknown',
|
|
903
|
+
action: 'failed',
|
|
904
|
+
status: 'rejected',
|
|
905
|
+
errors: [{ code: 'CREATIVE_REJECTED', message: 'format_id is required' }],
|
|
906
|
+
});
|
|
907
|
+
continue;
|
|
908
|
+
}
|
|
909
|
+
try {
|
|
910
|
+
const creativeIdHint = (c as { creative_id?: string }).creative_id;
|
|
911
|
+
const created = await upstream.createCreative(networkCode, {
|
|
912
|
+
name: (c as { name?: string }).name ?? 'Untitled',
|
|
913
|
+
format_id: formatId,
|
|
914
|
+
advertiser_id: advertiserId,
|
|
915
|
+
...(creativeIdHint !== undefined && { client_request_id: creativeIdHint }),
|
|
916
|
+
});
|
|
917
|
+
out.push({
|
|
918
|
+
creative_id: created.creative_id,
|
|
919
|
+
action: 'created',
|
|
920
|
+
status: 'approved',
|
|
921
|
+
});
|
|
922
|
+
} catch (e) {
|
|
923
|
+
out.push({
|
|
924
|
+
creative_id: (c as { creative_id?: string }).creative_id ?? 'unknown',
|
|
925
|
+
action: 'failed',
|
|
926
|
+
status: 'rejected',
|
|
927
|
+
errors: [
|
|
928
|
+
{ code: 'CREATIVE_REJECTED', message: (e as Error).message ?? 'upstream creative creation failed' },
|
|
929
|
+
],
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
return out;
|
|
934
|
+
},
|
|
935
|
+
|
|
936
|
+
listCreativeFormats: async (_req, _ctx): Promise<ListCreativeFormatsResponse> => {
|
|
937
|
+
// Publisher-owned format catalog. The mock doesn't have a discrete
|
|
938
|
+
// formats endpoint (formats live inline on Product); production sellers
|
|
939
|
+
// typically expose `/v1/formats` separately. SWAP: replace with your
|
|
940
|
+
// backend's format catalog.
|
|
941
|
+
//
|
|
942
|
+
// Each format declares the input asset slots a buyer's `sync_creatives`
|
|
943
|
+
// creative_manifest MUST key its `assets` map against — per
|
|
944
|
+
// creative-manifest.json:14 ("Each key MUST match an asset_id from the
|
|
945
|
+
// format's assets array"). `required: true` slots reject creative
|
|
946
|
+
// submissions missing them at the manifest layer; `required: false`
|
|
947
|
+
// means the buyer MAY include the asset.
|
|
948
|
+
const displaySlots = [
|
|
949
|
+
FormatAsset.image({ asset_id: 'image', required: true }),
|
|
950
|
+
FormatAsset.url({ asset_id: 'click_url', required: true }),
|
|
951
|
+
];
|
|
952
|
+
const videoSlots = [
|
|
953
|
+
FormatAsset.video({ asset_id: 'video', required: true }),
|
|
954
|
+
FormatAsset.url({ asset_id: 'click_url', required: true }),
|
|
955
|
+
];
|
|
956
|
+
return {
|
|
957
|
+
formats: [
|
|
958
|
+
{
|
|
959
|
+
format_id: { agent_url: FORMAT_AGENT_URL, id: 'display_300x250' },
|
|
960
|
+
name: 'Display 300x250 (medrec)',
|
|
961
|
+
renders: [{ role: 'main', dimensions: { width: 300, height: 250, unit: 'px' } }],
|
|
962
|
+
assets: displaySlots,
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
format_id: { agent_url: FORMAT_AGENT_URL, id: 'display_728x90' },
|
|
966
|
+
name: 'Display 728x90 (leaderboard)',
|
|
967
|
+
renders: [{ role: 'main', dimensions: { width: 728, height: 90, unit: 'px' } }],
|
|
968
|
+
assets: displaySlots,
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
format_id: { agent_url: FORMAT_AGENT_URL, id: 'video_30s' },
|
|
972
|
+
name: 'Video 30s outstream / instream',
|
|
973
|
+
renders: [{ role: 'main', dimensions: { width: 1920, height: 1080, unit: 'px' } }],
|
|
974
|
+
assets: videoSlots,
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
format_id: { agent_url: FORMAT_AGENT_URL, id: 'video_15s' },
|
|
978
|
+
name: 'Video 15s',
|
|
979
|
+
renders: [{ role: 'main', dimensions: { width: 1920, height: 1080, unit: 'px' } }],
|
|
980
|
+
assets: videoSlots,
|
|
981
|
+
},
|
|
982
|
+
],
|
|
983
|
+
};
|
|
984
|
+
},
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
// ---------------------------------------------------------------------------
|
|
989
|
+
// Bootstrap.
|
|
990
|
+
// ---------------------------------------------------------------------------
|
|
991
|
+
|
|
992
|
+
const platform = new SalesNonGuaranteedAdapter();
|
|
993
|
+
const idempotencyStore = createIdempotencyStore({ backend: memoryBackend(), ttlSeconds: 86_400 });
|
|
994
|
+
|
|
995
|
+
// Persist `packages[].targeting_overlay` from create_media_buy and echo it
|
|
996
|
+
// on get_media_buys. Required for any seller claiming property-lists /
|
|
997
|
+
// collection-lists. SWAP `InMemoryStateStore` for `PostgresStateStore` in
|
|
998
|
+
// production — in-memory loss after restart silently strips the echo.
|
|
999
|
+
const stateStore = new InMemoryStateStore();
|
|
1000
|
+
const mediaBuyStore = createMediaBuyStore({ store: stateStore });
|
|
1001
|
+
|
|
1002
|
+
// ─── TEST-ONLY: comply-controller in-memory state ───────────────────────
|
|
1003
|
+
// DELETE BEFORE DEPLOYING. Module-scope maps shared across accounts; only
|
|
1004
|
+
// the conformance harness reaches them via the gate below.
|
|
1005
|
+
const seededMediaBuys = new Map<string, { status: string; revision: number }>();
|
|
1006
|
+
const simulatedDelivery = new Map<
|
|
1007
|
+
string,
|
|
1008
|
+
{ impressions: number; clicks: number; reported_spend: { amount: number; currency: string } }
|
|
1009
|
+
>();
|
|
1010
|
+
// ─── /TEST-ONLY ──────────────────────────────────────────────────────────
|
|
1011
|
+
|
|
1012
|
+
serve(
|
|
1013
|
+
({ taskStore }) =>
|
|
1014
|
+
createAdcpServerFromPlatform(platform, {
|
|
1015
|
+
name: 'hello-seller-adapter-non-guaranteed',
|
|
1016
|
+
version: '1.0.0',
|
|
1017
|
+
taskStore,
|
|
1018
|
+
idempotency: idempotencyStore,
|
|
1019
|
+
mediaBuyStore,
|
|
1020
|
+
resolveSessionKey: ctx => {
|
|
1021
|
+
const acct = ctx.account as Account<NetworkMeta> | undefined;
|
|
1022
|
+
return acct?.id ?? 'anonymous';
|
|
1023
|
+
},
|
|
1024
|
+
// ─── TEST-ONLY: comply_test_controller wiring ──────────────────────
|
|
1025
|
+
// DELETE BEFORE DEPLOYING. The framework auto-gates on the resolved
|
|
1026
|
+
// account's `mode === 'sandbox'` (see `accounts.resolve` synthesis arm
|
|
1027
|
+
// above) — adapters no longer carry their own gate callback. #1435 phase 3.
|
|
1028
|
+
complyTest: {
|
|
1029
|
+
seed: {
|
|
1030
|
+
media_buy: ({ media_buy_id, fixture }) => {
|
|
1031
|
+
const existing = seededMediaBuys.get(media_buy_id);
|
|
1032
|
+
const status = typeof fixture['status'] === 'string' ? (fixture['status'] as string) : 'pending_creatives';
|
|
1033
|
+
seededMediaBuys.set(media_buy_id, { status, revision: existing?.revision ?? 0 });
|
|
1034
|
+
},
|
|
1035
|
+
},
|
|
1036
|
+
force: {
|
|
1037
|
+
media_buy_status: ({ media_buy_id, status, rejection_reason }) => {
|
|
1038
|
+
const buy = seededMediaBuys.get(media_buy_id);
|
|
1039
|
+
const previous = buy?.status ?? 'pending_creatives';
|
|
1040
|
+
seededMediaBuys.set(media_buy_id, { status, revision: (buy?.revision ?? 0) + 1 });
|
|
1041
|
+
void rejection_reason;
|
|
1042
|
+
return { success: true, previous_state: previous, current_state: status };
|
|
1043
|
+
},
|
|
1044
|
+
},
|
|
1045
|
+
simulate: {
|
|
1046
|
+
delivery: ({ media_buy_id, impressions, clicks, reported_spend }) => {
|
|
1047
|
+
const prev = simulatedDelivery.get(media_buy_id) ?? {
|
|
1048
|
+
impressions: 0,
|
|
1049
|
+
clicks: 0,
|
|
1050
|
+
reported_spend: { amount: 0, currency: 'USD' },
|
|
1051
|
+
};
|
|
1052
|
+
simulatedDelivery.set(media_buy_id, {
|
|
1053
|
+
impressions: prev.impressions + (impressions ?? 0),
|
|
1054
|
+
clicks: prev.clicks + (clicks ?? 0),
|
|
1055
|
+
reported_spend: reported_spend ?? prev.reported_spend,
|
|
1056
|
+
});
|
|
1057
|
+
return { success: true, simulated: { media_buy_id, impressions, clicks, reported_spend } };
|
|
1058
|
+
},
|
|
1059
|
+
},
|
|
1060
|
+
},
|
|
1061
|
+
// ─── /TEST-ONLY ──────────────────────────────────────────────────
|
|
1062
|
+
}),
|
|
1063
|
+
{
|
|
1064
|
+
port: PORT,
|
|
1065
|
+
authenticate: verifyApiKey({
|
|
1066
|
+
keys: { [ADCP_AUTH_TOKEN]: { principal: 'compliance-runner' } },
|
|
1067
|
+
}),
|
|
1068
|
+
}
|
|
1069
|
+
);
|
|
1070
|
+
|
|
1071
|
+
console.log(`sales-non-guaranteed adapter on http://127.0.0.1:${PORT}/mcp · upstream: ${UPSTREAM_URL}`);
|