@adcp/sdk 6.6.0 → 6.8.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/AGENTS.md +4 -0
- package/README.md +29 -16
- package/bin/adcp-resolve.js +166 -0
- package/bin/adcp.js +462 -11
- package/compliance/cache/{3.0.1 → 3.0.5}/index.json +2 -2
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/audience-sync/index.yaml +1 -1
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/index.yaml +3 -3
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-social/index.yaml +7 -0
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/runner-output-contract.yaml +23 -4
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/storyboard-schema.yaml +106 -1
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/v3-envelope-integrity.yaml +4 -2
- 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 +172 -0
- package/dist/lib/adapters/implicit-account-store.d.ts.map +1 -0
- package/dist/lib/adapters/implicit-account-store.js +315 -0
- package/dist/lib/adapters/implicit-account-store.js.map +1 -0
- package/dist/lib/adapters/index.d.ts +5 -0
- package/dist/lib/adapters/index.d.ts.map +1 -1
- package/dist/lib/adapters/index.js +25 -1
- package/dist/lib/adapters/index.js.map +1 -1
- package/dist/lib/adapters/oauth-passthrough-resolver.d.ts +193 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.d.ts.map +1 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.js +180 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.js.map +1 -0
- package/dist/lib/adapters/roster-account-store.d.ts +282 -0
- package/dist/lib/adapters/roster-account-store.d.ts.map +1 -0
- package/dist/lib/adapters/roster-account-store.js +216 -0
- package/dist/lib/adapters/roster-account-store.js.map +1 -0
- package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts.map +1 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js +5 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js.map +1 -1
- package/dist/lib/auth/oauth/discovery.d.ts.map +1 -1
- package/dist/lib/auth/oauth/discovery.js +6 -1
- package/dist/lib/auth/oauth/discovery.js.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +22 -0
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +86 -23
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +27 -7
- 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/server.d.ts.map +1 -1
- package/dist/lib/mock-server/creative-template/server.js +54 -9
- package/dist/lib/mock-server/creative-template/server.js.map +1 -1
- package/dist/lib/mock-server/index.d.ts +27 -1
- package/dist/lib/mock-server/index.d.ts.map +1 -1
- package/dist/lib/mock-server/index.js +289 -15
- package/dist/lib/mock-server/index.js.map +1 -1
- package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts +46 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.js +167 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.js.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/server.d.ts +14 -0
- package/dist/lib/mock-server/sales-guaranteed/server.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/server.js +893 -0
- package/dist/lib/mock-server/sales-guaranteed/server.js.map +1 -0
- 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/sales-social/seed-data.d.ts +34 -0
- package/dist/lib/mock-server/sales-social/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-social/seed-data.js +42 -0
- package/dist/lib/mock-server/sales-social/seed-data.js.map +1 -0
- package/dist/lib/mock-server/sales-social/server.d.ts +17 -0
- package/dist/lib/mock-server/sales-social/server.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-social/server.js +1219 -0
- package/dist/lib/mock-server/sales-social/server.js.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/server.d.ts.map +1 -1
- package/dist/lib/mock-server/signal-marketplace/server.js +58 -9
- package/dist/lib/mock-server/signal-marketplace/server.js.map +1 -1
- 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 +4 -4
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +20 -54
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-response.json +35 -4
- 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 +38 -7
- 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 +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-request.json +11 -5
- package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-response.json +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-response.json +101 -8
- package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-response.json +110 -11
- package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-response.json +68 -6
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +38 -7
- 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 +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/package-request.json +7 -4
- 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 +35 -4
- 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 +68 -6
- 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 +68 -6
- 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 +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-request.json +11 -5
- package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-response.json +35 -4
- 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 +36 -5
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +35 -4
- 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 +53 -0
- 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 +6 -5
- 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 -52
- 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 -53
- 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 +34 -3
- 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 +16 -16
- 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 +2 -2
- 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 -60
- 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 +185 -2
- 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 +2 -2
- package/dist/lib/schemas-data/3.0/error-details/audience-too-small.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/budget-too-low.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/conflict.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/creative-rejected.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/policy-violation.json +2 -2
- 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 +1190 -0
- package/dist/lib/schemas-data/3.0/manifest.schema.json +202 -0
- 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 +26 -26
- 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.d.ts +21 -0
- package/dist/lib/server/adcp-server.d.ts.map +1 -1
- package/dist/lib/server/adcp-server.js +63 -1
- package/dist/lib/server/adcp-server.js.map +1 -1
- package/dist/lib/server/auth-signature.d.ts.map +1 -1
- package/dist/lib/server/auth-signature.js +21 -0
- package/dist/lib/server/auth-signature.js.map +1 -1
- package/dist/lib/server/auth.d.ts +59 -0
- package/dist/lib/server/auth.d.ts.map +1 -1
- package/dist/lib/server/auth.js +71 -3
- package/dist/lib/server/auth.js.map +1 -1
- package/dist/lib/server/create-adcp-server.d.ts +220 -21
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +349 -14
- 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 +345 -21
- package/dist/lib/server/decisioning/account.d.ts.map +1 -1
- package/dist/lib/server/decisioning/account.js +150 -4
- package/dist/lib/server/decisioning/account.js.map +1 -1
- package/dist/lib/server/decisioning/admin-router.d.ts.map +1 -1
- package/dist/lib/server/decisioning/admin-router.js +5 -1
- package/dist/lib/server/decisioning/admin-router.js.map +1 -1
- package/dist/lib/server/decisioning/buyer-agent.d.ts +498 -0
- package/dist/lib/server/decisioning/buyer-agent.d.ts.map +1 -0
- package/dist/lib/server/decisioning/buyer-agent.js +382 -0
- package/dist/lib/server/decisioning/buyer-agent.js.map +1 -0
- package/dist/lib/server/decisioning/capabilities.d.ts +32 -5
- package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
- package/dist/lib/server/decisioning/compose.d.ts +124 -0
- package/dist/lib/server/decisioning/compose.d.ts.map +1 -0
- package/dist/lib/server/decisioning/compose.js +48 -0
- package/dist/lib/server/decisioning/compose.js.map +1 -0
- package/dist/lib/server/decisioning/context.d.ts +11 -0
- package/dist/lib/server/decisioning/context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.d.ts +13 -3
- package/dist/lib/server/decisioning/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.js +46 -2
- package/dist/lib/server/decisioning/index.js.map +1 -1
- package/dist/lib/server/decisioning/platform-helpers.d.ts +287 -0
- package/dist/lib/server/decisioning/platform-helpers.d.ts.map +1 -0
- package/dist/lib/server/decisioning/platform-helpers.js +336 -0
- package/dist/lib/server/decisioning/platform-helpers.js.map +1 -0
- package/dist/lib/server/decisioning/platform.d.ts +141 -20
- 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/resolve-presets.d.ts +129 -0
- package/dist/lib/server/decisioning/resolve-presets.d.ts.map +1 -0
- package/dist/lib/server/decisioning/resolve-presets.js +142 -0
- package/dist/lib/server/decisioning/resolve-presets.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts +8 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js +101 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +91 -8
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +928 -146
- 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/to-context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.js +1 -0
- package/dist/lib/server/decisioning/runtime/to-context.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 +40 -4
- package/dist/lib/server/decisioning/runtime/validate-platform.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +83 -6
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.js +12 -5
- package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +41 -4
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative.d.ts +47 -3
- package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.d.ts +115 -9
- package/dist/lib/server/decisioning/specialisms/sales.d.ts.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 +8 -3
- package/dist/lib/server/decisioning/tenant-registry.js.map +1 -1
- package/dist/lib/server/decisioning/tenant-store.d.ts +200 -0
- package/dist/lib/server/decisioning/tenant-store.d.ts.map +1 -0
- package/dist/lib/server/decisioning/tenant-store.js +182 -0
- package/dist/lib/server/decisioning/tenant-store.js.map +1 -0
- package/dist/lib/server/decisioning/validate-specialisms.d.ts +66 -0
- package/dist/lib/server/decisioning/validate-specialisms.d.ts.map +1 -0
- package/dist/lib/server/decisioning/validate-specialisms.js +119 -0
- package/dist/lib/server/decisioning/validate-specialisms.js.map +1 -0
- package/dist/lib/server/index.d.ts +14 -2
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +41 -3
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/media-buy-store.d.ts +126 -0
- package/dist/lib/server/media-buy-store.d.ts.map +1 -0
- package/dist/lib/server/media-buy-store.js +171 -0
- package/dist/lib/server/media-buy-store.js.map +1 -0
- package/dist/lib/server/redact.d.ts +52 -0
- package/dist/lib/server/redact.d.ts.map +1 -0
- package/dist/lib/server/redact.js +86 -0
- package/dist/lib/server/redact.js.map +1 -0
- package/dist/lib/server/responses.d.ts +60 -1
- package/dist/lib/server/responses.d.ts.map +1 -1
- package/dist/lib/server/responses.js +110 -1
- package/dist/lib/server/responses.js.map +1 -1
- package/dist/lib/server/serve.d.ts.map +1 -1
- package/dist/lib/server/serve.js +53 -1
- package/dist/lib/server/serve.js.map +1 -1
- package/dist/lib/server/state-machine.d.ts +80 -0
- package/dist/lib/server/state-machine.d.ts.map +1 -0
- package/dist/lib/server/state-machine.js +125 -0
- package/dist/lib/server/state-machine.js.map +1 -0
- package/dist/lib/server/test-controller.d.ts +51 -0
- package/dist/lib/server/test-controller.d.ts.map +1 -1
- package/dist/lib/server/test-controller.js +112 -30
- package/dist/lib/server/test-controller.js.map +1 -1
- package/dist/lib/server/upstream-helpers.d.ts +182 -0
- package/dist/lib/server/upstream-helpers.d.ts.map +1 -0
- package/dist/lib/server/upstream-helpers.js +140 -0
- package/dist/lib/server/upstream-helpers.js.map +1 -0
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts +44 -0
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/canonicalize.js +85 -0
- package/dist/lib/signing/agent-resolver/canonicalize.js.map +1 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.d.ts +54 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.js +49 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.js.map +1 -0
- package/dist/lib/signing/agent-resolver/consistency.d.ts +84 -0
- package/dist/lib/signing/agent-resolver/consistency.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/consistency.js +121 -0
- package/dist/lib/signing/agent-resolver/consistency.js.map +1 -0
- package/dist/lib/signing/agent-resolver/errors.d.ts +68 -0
- package/dist/lib/signing/agent-resolver/errors.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/errors.js +45 -0
- package/dist/lib/signing/agent-resolver/errors.js.map +1 -0
- package/dist/lib/signing/agent-resolver/etld.d.ts +25 -0
- package/dist/lib/signing/agent-resolver/etld.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/etld.js +75 -0
- package/dist/lib/signing/agent-resolver/etld.js.map +1 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts +41 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.js +85 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.js.map +1 -0
- package/dist/lib/signing/agent-resolver/index.d.ts +26 -0
- package/dist/lib/signing/agent-resolver/index.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/index.js +33 -0
- package/dist/lib/signing/agent-resolver/index.js.map +1 -0
- package/dist/lib/signing/agent-resolver/jwks-set.d.ts +76 -0
- package/dist/lib/signing/agent-resolver/jwks-set.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/jwks-set.js +124 -0
- package/dist/lib/signing/agent-resolver/jwks-set.js.map +1 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.d.ts +123 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.js +398 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.js.map +1 -0
- package/dist/lib/signing/agent-resolver/select-agent.d.ts +54 -0
- package/dist/lib/signing/agent-resolver/select-agent.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/select-agent.js +94 -0
- package/dist/lib/signing/agent-resolver/select-agent.js.map +1 -0
- package/dist/lib/signing/agent-resolver/strict-json.d.ts +44 -0
- package/dist/lib/signing/agent-resolver/strict-json.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/strict-json.js +219 -0
- package/dist/lib/signing/agent-resolver/strict-json.js.map +1 -0
- package/dist/lib/signing/capability-priming.d.ts.map +1 -1
- package/dist/lib/signing/capability-priming.js +2 -55
- package/dist/lib/signing/capability-priming.js.map +1 -1
- package/dist/lib/signing/protocol-response.d.ts +18 -0
- package/dist/lib/signing/protocol-response.d.ts.map +1 -0
- package/dist/lib/signing/protocol-response.js +69 -0
- package/dist/lib/signing/protocol-response.js.map +1 -0
- package/dist/lib/signing/server.d.ts +1 -0
- package/dist/lib/signing/server.d.ts.map +1 -1
- package/dist/lib/signing/server.js +10 -1
- package/dist/lib/signing/server.js.map +1 -1
- package/dist/lib/signing/testing.d.ts +64 -0
- package/dist/lib/signing/testing.d.ts.map +1 -1
- package/dist/lib/signing/testing.js +100 -5
- package/dist/lib/signing/testing.js.map +1 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +2 -0
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/types.d.ts +8 -0
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/comply-controller.d.ts +23 -2
- package/dist/lib/testing/comply-controller.d.ts.map +1 -1
- package/dist/lib/testing/comply-controller.js +19 -2
- 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/agent-routing.d.ts +92 -0
- package/dist/lib/testing/storyboard/agent-routing.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/agent-routing.js +291 -0
- package/dist/lib/testing/storyboard/agent-routing.js.map +1 -0
- package/dist/lib/testing/storyboard/context.d.ts +22 -0
- package/dist/lib/testing/storyboard/context.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/context.js +35 -8
- package/dist/lib/testing/storyboard/context.js.map +1 -1
- package/dist/lib/testing/storyboard/default-invariants.js +6 -35
- package/dist/lib/testing/storyboard/default-invariants.js.map +1 -1
- package/dist/lib/testing/storyboard/index.d.ts +1 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/loader.js +46 -12
- package/dist/lib/testing/storyboard/loader.js.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.js +14 -1
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts +17 -0
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +800 -92
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/types.d.ts +221 -12
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +65 -0
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +511 -2
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/testing/test-controller.d.ts +65 -1
- package/dist/lib/testing/test-controller.d.ts.map +1 -1
- package/dist/lib/testing/test-controller.js +36 -0
- package/dist/lib/testing/test-controller.js.map +1 -1
- package/dist/lib/testing/types.d.ts +14 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/types/core.generated.d.ts +299 -141
- 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 +168 -108
- package/dist/lib/types/error-codes.d.ts.map +1 -1
- package/dist/lib/types/error-codes.js +23 -190
- package/dist/lib/types/error-codes.js.map +1 -1
- package/dist/lib/types/error-details.aliases.d.ts +48 -0
- package/dist/lib/types/error-details.aliases.d.ts.map +1 -0
- package/dist/lib/types/error-details.aliases.js +41 -0
- package/dist/lib/types/error-details.aliases.js.map +1 -0
- package/dist/lib/types/index.d.ts +15 -1
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js +7 -0
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/inline-enums.generated.d.ts +2 -4
- package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
- package/dist/lib/types/inline-enums.generated.js +10 -7
- package/dist/lib/types/inline-enums.generated.js.map +1 -1
- package/dist/lib/types/manifest.generated.d.ts +280 -0
- package/dist/lib/types/manifest.generated.d.ts.map +1 -0
- package/dist/lib/types/manifest.generated.js +339 -0
- package/dist/lib/types/manifest.generated.js.map +1 -0
- package/dist/lib/types/schemas.generated.d.ts +27229 -25160
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +584 -533
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +146 -21
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/types/v2-5/tools.generated.d.ts +48 -1
- package/dist/lib/types/v2-5/tools.generated.d.ts.map +1 -1
- package/dist/lib/upstream-recorder/index.d.ts +57 -0
- package/dist/lib/upstream-recorder/index.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/index.js +62 -0
- package/dist/lib/upstream-recorder/index.js.map +1 -0
- package/dist/lib/upstream-recorder/recorder.d.ts +35 -0
- package/dist/lib/upstream-recorder/recorder.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/recorder.js +507 -0
- package/dist/lib/upstream-recorder/recorder.js.map +1 -0
- package/dist/lib/upstream-recorder/types.d.ts +365 -0
- package/dist/lib/upstream-recorder/types.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/types.js +30 -0
- package/dist/lib/upstream-recorder/types.js.map +1 -0
- package/dist/lib/utils/capabilities.d.ts +44 -3
- package/dist/lib/utils/capabilities.d.ts.map +1 -1
- package/dist/lib/utils/capabilities.js +67 -3
- package/dist/lib/utils/capabilities.js.map +1 -1
- package/dist/lib/utils/error-extraction.d.ts +24 -0
- package/dist/lib/utils/error-extraction.d.ts.map +1 -1
- package/dist/lib/utils/error-extraction.js +0 -2
- package/dist/lib/utils/error-extraction.js.map +1 -1
- package/dist/lib/utils/format-render-builders.d.ts +2 -1
- package/dist/lib/utils/format-render-builders.d.ts.map +1 -1
- package/dist/lib/utils/format-render-builders.js +0 -23
- package/dist/lib/utils/format-render-builders.js.map +1 -1
- package/dist/lib/utils/glob.d.ts +30 -0
- package/dist/lib/utils/glob.d.ts.map +1 -0
- package/dist/lib/utils/glob.js +39 -0
- package/dist/lib/utils/glob.js.map +1 -0
- package/dist/lib/utils/redact-secrets.d.ts +37 -0
- package/dist/lib/utils/redact-secrets.d.ts.map +1 -0
- package/dist/lib/utils/redact-secrets.js +65 -0
- package/dist/lib/utils/redact-secrets.js.map +1 -0
- package/dist/lib/utils/tool-request-schemas.d.ts.map +1 -1
- package/dist/lib/utils/tool-request-schemas.js +1 -0
- package/dist/lib/utils/tool-request-schemas.js.map +1 -1
- package/dist/lib/validation/hints.d.ts +50 -0
- package/dist/lib/validation/hints.d.ts.map +1 -0
- package/dist/lib/validation/hints.js +194 -0
- package/dist/lib/validation/hints.js.map +1 -0
- package/dist/lib/validation/schema-errors.d.ts +2 -1
- package/dist/lib/validation/schema-errors.d.ts.map +1 -1
- package/dist/lib/validation/schema-errors.js +39 -4
- package/dist/lib/validation/schema-errors.js.map +1 -1
- package/dist/lib/validation/schema-loader.d.ts +13 -0
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +20 -0
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/validation/schema-validator.d.ts +107 -2
- package/dist/lib/validation/schema-validator.d.ts.map +1 -1
- package/dist/lib/validation/schema-validator.js +205 -12
- package/dist/lib/validation/schema-validator.js.map +1 -1
- package/dist/lib/validation/sync-creatives.d.ts +30 -0
- package/dist/lib/validation/sync-creatives.d.ts.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 +9 -5
- package/dist/lib/version.js.map +1 -1
- package/docs/guides/BUILD-AN-AGENT.md +267 -137
- package/docs/llms.txt +110 -55
- package/examples/CONTRIBUTING.md +173 -0
- package/examples/README.md +48 -0
- package/examples/comply-controller-seller.ts +9 -17
- package/examples/decisioning-platform-broadcast-tv.ts +3 -2
- package/examples/decisioning-platform-implicit-accounts.ts +168 -0
- package/examples/decisioning-platform-mock-seller.ts +3 -2
- package/examples/decisioning-platform-multi-tenant-db.ts +317 -0
- package/examples/decisioning-platform-programmatic.ts +3 -2
- package/examples/hello-cluster.ts +460 -0
- package/examples/hello_creative_adapter_ad_server.ts +790 -0
- package/examples/hello_creative_adapter_template.ts +528 -0
- package/examples/hello_seller_adapter_guaranteed.ts +1138 -0
- package/examples/hello_seller_adapter_multi_tenant.ts +1046 -0
- package/examples/hello_seller_adapter_non_guaranteed.ts +1020 -0
- package/examples/hello_seller_adapter_social.ts +829 -0
- package/examples/hello_si_adapter_brand.ts +572 -0
- package/examples/hello_signals_adapter_marketplace.ts +532 -0
- package/examples/seller-test-controller.ts +22 -28
- package/package.json +32 -4
- package/skills/SHAPE-GOTCHAS.md +233 -0
- package/skills/build-brand-rights-agent/SKILL.md +121 -16
- package/skills/build-creative-agent/SKILL.md +128 -184
- package/skills/build-decisioning-platform/advanced/MULTI-TENANT.md +104 -28
- package/skills/build-generative-seller-agent/SKILL.md +15 -9
- package/skills/build-governance-agent/SKILL.md +20 -11
- package/skills/build-holdco-agent/SKILL.md +250 -0
- package/skills/build-retail-media-agent/SKILL.md +10 -8
- package/skills/build-seller-agent/SKILL.md +315 -49
- package/skills/build-seller-agent/specialisms/sales-broadcast-tv.md +2 -0
- package/skills/build-seller-agent/specialisms/sales-guaranteed.md +18 -0
- package/skills/build-seller-agent/specialisms/sales-non-guaranteed.md +9 -29
- package/skills/build-seller-agent/specialisms/sales-social.md +63 -2
- package/skills/build-si-agent/SKILL.md +251 -196
- package/skills/build-signals-agent/SKILL.md +4 -0
- package/skills/call-adcp-agent/SKILL.md +7 -1
- package/skills/run-by-experts/SKILL.md +116 -0
- package/skills/triage-storyboard-failure/SKILL.md +96 -0
- package/skills/call-adcp-agent.previous/SKILL.md +0 -339
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/brand/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/creative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/governance/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/creative-reception.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/signals/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/brand/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/creative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/governance/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/creative-reception.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/signals/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/collection-lists/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/content-standards/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-ad-server/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/generative-seller.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-template/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-aware-seller/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-delivery-monitor/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/property-lists/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-broadcast-tv/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-catalog-driven/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-non-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-proposal-mode/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-owned/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/acme-outdoor.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/bistro-oranje.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/nova-motors.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/osei-natural.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/signed-requests-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/substitution-observer-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/summit-foods.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/webhook-receiver-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/002-full-plan.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/README.md +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/canonicalization.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/keys.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/README.md +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/keys.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/capability-discovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/collection-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/content-standards-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/deterministic-testing.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/error-compliance.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/fictional-entities.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-media-buys-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-signals-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/idempotency.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-creative-formats.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-list-accounts.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/property-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/schema-validation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/security.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/signed-requests.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/webhook-emission.yaml +0 -0
|
@@ -0,0 +1,829 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hello_seller_adapter_social — worked starting point for an
|
|
3
|
+
* AdCP sales agent (specialism `sales-social`) that wraps an upstream
|
|
4
|
+
* walled-garden social-platform API via OAuth2 client_credentials.
|
|
5
|
+
*
|
|
6
|
+
* Fork this. Replace `upstream` with calls to your real backend. The
|
|
7
|
+
* AdCP-facing platform methods stay the same.
|
|
8
|
+
*
|
|
9
|
+
* FORK CHECKLIST
|
|
10
|
+
* 1. Replace every `// SWAP:` marker with calls to your backend.
|
|
11
|
+
* 2. Replace `KNOWN_ADVERTISERS` (line ~271) with your tenant directory.
|
|
12
|
+
* 3. Replace `audience_targeting` and `conversion_tracking` capability
|
|
13
|
+
* declarations with the identifier types / event types your platform
|
|
14
|
+
* actually accepts.
|
|
15
|
+
* 4. Replace the `m.uids[i]` → `external_id_sha256` projection in
|
|
16
|
+
* `logEvent` with your CAPI's specific UID-to-field mapping.
|
|
17
|
+
* 5. Replace `eventSourceMap` with persistent storage (DB / cache).
|
|
18
|
+
* 6. Validate: `node --test test/examples/hello-seller-adapter-social.test.js`
|
|
19
|
+
*
|
|
20
|
+
* Demo:
|
|
21
|
+
* npx @adcp/sdk@latest mock-server sales-social --port 4350
|
|
22
|
+
* UPSTREAM_URL=http://127.0.0.1:4350 \
|
|
23
|
+
* UPSTREAM_OAUTH_CLIENT_ID=walled_garden_test_client_001 \
|
|
24
|
+
* UPSTREAM_OAUTH_CLIENT_SECRET=walled_garden_test_secret_do_not_use_in_prod \
|
|
25
|
+
* npx tsx examples/hello_seller_adapter_social.ts
|
|
26
|
+
* adcp storyboard run http://127.0.0.1:3003/mcp sales_social \
|
|
27
|
+
* --auth sk_harness_do_not_use_in_prod
|
|
28
|
+
* curl http://127.0.0.1:4350/_debug/traffic
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
import {
|
|
32
|
+
createAdcpServerFromPlatform,
|
|
33
|
+
serve,
|
|
34
|
+
verifyApiKey,
|
|
35
|
+
createIdempotencyStore,
|
|
36
|
+
createUpstreamHttpClient,
|
|
37
|
+
memoryBackend,
|
|
38
|
+
AdcpError,
|
|
39
|
+
defineSalesPlatform,
|
|
40
|
+
defineAudiencePlatform,
|
|
41
|
+
type DecisioningPlatform,
|
|
42
|
+
type SalesPlatform,
|
|
43
|
+
type AudiencePlatform,
|
|
44
|
+
type AccountStore,
|
|
45
|
+
type Account,
|
|
46
|
+
type SyncAudiencesRow,
|
|
47
|
+
type SyncCreativesRow,
|
|
48
|
+
type SyncAccountsResultRow,
|
|
49
|
+
} from '@adcp/sdk/server';
|
|
50
|
+
import type {
|
|
51
|
+
SyncCatalogsSuccess,
|
|
52
|
+
LogEventSuccess,
|
|
53
|
+
SyncEventSourcesSuccess,
|
|
54
|
+
GetAccountFinancialsSuccess,
|
|
55
|
+
} from '@adcp/sdk/types';
|
|
56
|
+
|
|
57
|
+
const UPSTREAM_URL = process.env['UPSTREAM_URL'] ?? 'http://127.0.0.1:4350';
|
|
58
|
+
const UPSTREAM_CLIENT_ID = process.env['UPSTREAM_OAUTH_CLIENT_ID'] ?? 'walled_garden_test_client_001';
|
|
59
|
+
const UPSTREAM_CLIENT_SECRET =
|
|
60
|
+
process.env['UPSTREAM_OAUTH_CLIENT_SECRET'] ?? 'walled_garden_test_secret_do_not_use_in_prod';
|
|
61
|
+
const PORT = Number(process.env['PORT'] ?? 3003);
|
|
62
|
+
const ADCP_AUTH_TOKEN = process.env['ADCP_AUTH_TOKEN'] ?? 'sk_harness_do_not_use_in_prod';
|
|
63
|
+
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
// OAuth token cache — SWAP for production.
|
|
66
|
+
// Real platforms vary; some require per-advertiser tokens, some support
|
|
67
|
+
// per-app + advertiser-impersonation. Mock issues a single token valid for
|
|
68
|
+
// every authorized advertiser. The `dynamic_bearer.getToken` hook below is
|
|
69
|
+
// the swap point — substitute your platform's token-acquisition flow.
|
|
70
|
+
// ---------------------------------------------------------------------------
|
|
71
|
+
|
|
72
|
+
interface TokenCache {
|
|
73
|
+
access_token: string;
|
|
74
|
+
expires_at_ms: number;
|
|
75
|
+
}
|
|
76
|
+
let tokenCache: TokenCache | null = null;
|
|
77
|
+
|
|
78
|
+
async function fetchOauthToken(): Promise<TokenCache> {
|
|
79
|
+
// SWAP: production OAuth token flow. Mock issues client_credentials grants
|
|
80
|
+
// via POST /oauth/token (form-urlencoded). Real walled-garden CAPIs vary
|
|
81
|
+
// in path (`/oauth/access_token`, `/oauth2/access_token`) and refresh
|
|
82
|
+
// rotation; the upstream client below abstracts that away.
|
|
83
|
+
const body = new URLSearchParams({
|
|
84
|
+
grant_type: 'client_credentials',
|
|
85
|
+
client_id: UPSTREAM_CLIENT_ID,
|
|
86
|
+
client_secret: UPSTREAM_CLIENT_SECRET,
|
|
87
|
+
});
|
|
88
|
+
const res = await fetch(`${UPSTREAM_URL}/oauth/token`, {
|
|
89
|
+
method: 'POST',
|
|
90
|
+
headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
91
|
+
body: body.toString(),
|
|
92
|
+
});
|
|
93
|
+
if (!res.ok) {
|
|
94
|
+
const text = await res.text();
|
|
95
|
+
throw new AdcpError('SERVICE_UNAVAILABLE', {
|
|
96
|
+
message: `Upstream OAuth token endpoint returned ${res.status}: ${text.slice(0, 200)}`,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const json = (await res.json()) as { access_token: string; expires_in: number };
|
|
100
|
+
return {
|
|
101
|
+
access_token: json.access_token,
|
|
102
|
+
expires_at_ms: Date.now() + json.expires_in * 1000 - 5000, // refresh 5s early
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function getAccessToken(): Promise<string> {
|
|
107
|
+
if (tokenCache && Date.now() < tokenCache.expires_at_ms) return tokenCache.access_token;
|
|
108
|
+
tokenCache = await fetchOauthToken();
|
|
109
|
+
return tokenCache.access_token;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const http = createUpstreamHttpClient({
|
|
113
|
+
baseUrl: UPSTREAM_URL,
|
|
114
|
+
auth: { kind: 'dynamic_bearer', getToken: () => getAccessToken() },
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// ---------------------------------------------------------------------------
|
|
118
|
+
// Upstream client — SWAP for production.
|
|
119
|
+
// Each method below maps one AdCP tool to one upstream call. Replace the
|
|
120
|
+
// fetch path + body shape; the typed AdCP-facing handlers below stay the same.
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
|
|
123
|
+
// The mock's /_lookup/advertiser endpoint returns only the trio
|
|
124
|
+
// `{adcp_advertiser, advertiser_id, display_name}` — no currency/timezone.
|
|
125
|
+
// /v1.3/advertiser/{id}/info returns the richer record with currency,
|
|
126
|
+
// timezone, and status. Production platforms vary in which discovery
|
|
127
|
+
// endpoint carries which field; the lesson is to read each field from
|
|
128
|
+
// the endpoint that actually returns it.
|
|
129
|
+
interface UpstreamAdvertiserLookup {
|
|
130
|
+
advertiser_id: string;
|
|
131
|
+
display_name: string;
|
|
132
|
+
adcp_advertiser: string;
|
|
133
|
+
}
|
|
134
|
+
interface UpstreamAdvertiserInfo {
|
|
135
|
+
advertiser_id: string;
|
|
136
|
+
display_name: string;
|
|
137
|
+
adcp_advertiser: string;
|
|
138
|
+
currency: string;
|
|
139
|
+
timezone: string;
|
|
140
|
+
status: 'active' | 'suspended' | 'archived';
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const upstream = {
|
|
144
|
+
// SWAP: tenant lookup by AdCP-side identifier.
|
|
145
|
+
async lookupAdvertiser(advertiserDomain: string): Promise<UpstreamAdvertiserLookup | null> {
|
|
146
|
+
const { body } = await http.get<UpstreamAdvertiserLookup>('/_lookup/advertiser', {
|
|
147
|
+
adcp_advertiser: advertiserDomain,
|
|
148
|
+
});
|
|
149
|
+
return body;
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
// SWAP: GET advertiser financial info. Mock returns spend/cap/payment.
|
|
153
|
+
async getAdvertiserInfo(advertiserId: string): Promise<UpstreamAdvertiserInfo | null> {
|
|
154
|
+
const { body } = await http.get<UpstreamAdvertiserInfo>(
|
|
155
|
+
`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/info`
|
|
156
|
+
);
|
|
157
|
+
return body;
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
// SWAP: audience creation + member upload. Real platforms split this two
|
|
161
|
+
// ways: a metadata create, then a hashed-member upload — the standard
|
|
162
|
+
// walled-garden custom-audience two-step flow.
|
|
163
|
+
async createAudience(
|
|
164
|
+
advertiserId: string,
|
|
165
|
+
a: { audience_id: string; name: string; description?: string }
|
|
166
|
+
): Promise<{ audience_id: string; status: string }> {
|
|
167
|
+
const r = await http.post<{ audience_id: string; status: string }>(
|
|
168
|
+
`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/custom_audience/create`,
|
|
169
|
+
a
|
|
170
|
+
);
|
|
171
|
+
if (r.body === null) {
|
|
172
|
+
throw new AdcpError('INVALID_REQUEST', { message: 'audience creation rejected by upstream' });
|
|
173
|
+
}
|
|
174
|
+
return r.body;
|
|
175
|
+
},
|
|
176
|
+
async uploadAudienceMembers(
|
|
177
|
+
advertiserId: string,
|
|
178
|
+
body: { audience_id: string; member_count: number }
|
|
179
|
+
): Promise<void> {
|
|
180
|
+
await http.post(`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/custom_audience/upload`, body);
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
// SWAP: audience reach estimate. Real Meta `/{ad-account-id}/reachestimate`,
|
|
184
|
+
// TikTok `/v1.3/tool/audience_reach_estimate/`, Snap `/forecast`. The mock
|
|
185
|
+
// returns deterministic ranges keyed on (advertiser_id, targeting), so the
|
|
186
|
+
// numbers are stable across runs but vary observably with targeting.
|
|
187
|
+
// Surface this on AdCP wire as `SyncAudiencesRow.matched_count` /
|
|
188
|
+
// `effective_match_rate` (per `/schemas/3.0.5/core/audience.json`).
|
|
189
|
+
async audienceReachEstimate(
|
|
190
|
+
advertiserId: string,
|
|
191
|
+
body: { targeting: Record<string, unknown> }
|
|
192
|
+
): Promise<{
|
|
193
|
+
estimated_audience_size: { min: number; max: number };
|
|
194
|
+
matchable_size_at_platform: { min: number; max: number };
|
|
195
|
+
reach_quality: 'narrow' | 'specific' | 'broad';
|
|
196
|
+
} | null> {
|
|
197
|
+
const r = await http.post<{
|
|
198
|
+
estimated_audience_size: { min: number; max: number };
|
|
199
|
+
matchable_size_at_platform: { min: number; max: number };
|
|
200
|
+
reach_quality: 'narrow' | 'specific' | 'broad';
|
|
201
|
+
}>(`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/audience_reach_estimate`, body);
|
|
202
|
+
return r.body;
|
|
203
|
+
},
|
|
204
|
+
|
|
205
|
+
// SWAP: catalog create + items upload. Same two-step pattern as audiences.
|
|
206
|
+
async createCatalog(
|
|
207
|
+
advertiserId: string,
|
|
208
|
+
c: { catalog_id: string; name: string; vertical: string }
|
|
209
|
+
): Promise<{ catalog_id: string; status: string }> {
|
|
210
|
+
const r = await http.post<{ catalog_id: string; status: string }>(
|
|
211
|
+
`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/catalog/create`,
|
|
212
|
+
c
|
|
213
|
+
);
|
|
214
|
+
if (r.body === null) {
|
|
215
|
+
throw new AdcpError('INVALID_REQUEST', { message: 'catalog creation rejected by upstream' });
|
|
216
|
+
}
|
|
217
|
+
return r.body;
|
|
218
|
+
},
|
|
219
|
+
async uploadCatalogItems(advertiserId: string, body: { catalog_id: string; items: unknown[] }): Promise<void> {
|
|
220
|
+
await http.post(`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/catalog/upload`, body);
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
// SWAP: native creative create.
|
|
224
|
+
async createCreative(
|
|
225
|
+
advertiserId: string,
|
|
226
|
+
c: {
|
|
227
|
+
creative_id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
format_id: string;
|
|
230
|
+
primary_text: string;
|
|
231
|
+
cta_label?: string;
|
|
232
|
+
landing_page_url: string;
|
|
233
|
+
media_url: string;
|
|
234
|
+
}
|
|
235
|
+
): Promise<{ creative_id: string; status: string }> {
|
|
236
|
+
const r = await http.post<{ creative_id: string; status: string }>(
|
|
237
|
+
`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/creative/create`,
|
|
238
|
+
c
|
|
239
|
+
);
|
|
240
|
+
if (r.body === null) {
|
|
241
|
+
throw new AdcpError('INVALID_REQUEST', { message: 'creative creation rejected by upstream' });
|
|
242
|
+
}
|
|
243
|
+
return r.body;
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
// SWAP: pixel (event source) registration.
|
|
247
|
+
async createPixel(
|
|
248
|
+
advertiserId: string,
|
|
249
|
+
p: { pixel_id: string; name: string; domain?: string }
|
|
250
|
+
): Promise<{ pixel_id: string }> {
|
|
251
|
+
const r = await http.post<{ pixel_id: string }>(
|
|
252
|
+
`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/pixel/create`,
|
|
253
|
+
p
|
|
254
|
+
);
|
|
255
|
+
if (r.body === null) {
|
|
256
|
+
throw new AdcpError('INVALID_REQUEST', { message: 'pixel creation rejected by upstream' });
|
|
257
|
+
}
|
|
258
|
+
return r.body;
|
|
259
|
+
},
|
|
260
|
+
|
|
261
|
+
// SWAP: conversions API (event/track). Mock body shape mirrors the
|
|
262
|
+
// walled-garden CAPI conventions:
|
|
263
|
+
// events[i] needs event_name, event_time (UNIX seconds), user_data with at
|
|
264
|
+
// least one hashed identifier (email_sha256, phone_sha256, external_id_sha256).
|
|
265
|
+
// Production platforms vary in field names but the matchable-id requirement
|
|
266
|
+
// is universal across walled gardens.
|
|
267
|
+
async trackEvents(
|
|
268
|
+
advertiserId: string,
|
|
269
|
+
body: {
|
|
270
|
+
pixel_id: string;
|
|
271
|
+
events: Array<{
|
|
272
|
+
event_name: string;
|
|
273
|
+
event_time: number;
|
|
274
|
+
user_data: { external_id_sha256?: string; email_sha256?: string; phone_sha256?: string };
|
|
275
|
+
}>;
|
|
276
|
+
}
|
|
277
|
+
): Promise<{ events_received: number; events_dropped: number }> {
|
|
278
|
+
const r = await http.post<{ pixel_id: string; events_received: number; events_dropped: number }>(
|
|
279
|
+
`/v1.3/advertiser/${encodeURIComponent(advertiserId)}/event/track`,
|
|
280
|
+
body
|
|
281
|
+
);
|
|
282
|
+
if (r.body === null) {
|
|
283
|
+
throw new AdcpError('INVALID_REQUEST', { message: 'event tracking rejected by upstream' });
|
|
284
|
+
}
|
|
285
|
+
return { events_received: r.body.events_received, events_dropped: r.body.events_dropped };
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// ---------------------------------------------------------------------------
|
|
290
|
+
// AdCP-side adapter — typed against SalesPlatform + AudiencePlatform.
|
|
291
|
+
// ---------------------------------------------------------------------------
|
|
292
|
+
|
|
293
|
+
interface AdvertiserMeta {
|
|
294
|
+
/** Resolved upstream advertiser_id, cached on the Account by accounts.resolve. */
|
|
295
|
+
advertiser_id: string;
|
|
296
|
+
advertiser_domain: string;
|
|
297
|
+
[key: string]: unknown;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Known advertiser fan-out for `list_accounts`. Real platforms expose a
|
|
301
|
+
// /v1.3/advertiser/list endpoint scoped to the OAuth client; the mock
|
|
302
|
+
// requires the adapter to know the set up-front, so we inline the well-known
|
|
303
|
+
// AdCP-side identifiers from the mock's seed data. SWAP: replace with a
|
|
304
|
+
// real `/advertiser/list` call.
|
|
305
|
+
const KNOWN_ADVERTISERS = ['acmeoutdoor.example', 'summit-media.example'];
|
|
306
|
+
|
|
307
|
+
// Buyer event_source_id → upstream pixel_id translation map. The mock
|
|
308
|
+
// ignores buyer-supplied pixel_id and assigns its own (`px_<uuid>`); buyers
|
|
309
|
+
// reference their own id in subsequent log_event calls. We record the
|
|
310
|
+
// mapping at create time and resolve at log time. Production: replace with
|
|
311
|
+
// your DB / cache. The SDK's `createTranslationMap` helper formalizes this
|
|
312
|
+
// bidirectional pattern when you outgrow the in-memory map.
|
|
313
|
+
const eventSourceMap = new Map<string, string>(); // (advertiser_id, buyer_id) → upstream_pixel_id
|
|
314
|
+
function eventSourceKey(advertiserId: string, buyerEventSourceId: string): string {
|
|
315
|
+
return `${advertiserId}::${buyerEventSourceId}`;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Asset readers — narrow on the asset_type discriminator before reading the
|
|
319
|
+
// typed sub-shape's `content` / `url` field. A bare cast loses the
|
|
320
|
+
// discriminator narrowing and silently picks up the wrong field on the wrong
|
|
321
|
+
// asset variant. See skills/SHAPE-GOTCHAS.md. AssetVariant isn't re-exported
|
|
322
|
+
// from `@adcp/sdk/types` (#1254 in the adapter ergonomics rollup), so we type
|
|
323
|
+
// the helper input as `unknown` and narrow inline.
|
|
324
|
+
function readContent(asset: unknown): string | undefined {
|
|
325
|
+
if (!asset || typeof asset !== 'object') return undefined;
|
|
326
|
+
const a = asset as { asset_type?: string; content?: string };
|
|
327
|
+
if (a.asset_type === 'text' || a.asset_type === 'html' || a.asset_type === 'markdown') {
|
|
328
|
+
return a.content;
|
|
329
|
+
}
|
|
330
|
+
return undefined;
|
|
331
|
+
}
|
|
332
|
+
function readUrl(asset: unknown): string | undefined {
|
|
333
|
+
if (!asset || typeof asset !== 'object') return undefined;
|
|
334
|
+
const a = asset as { asset_type?: string; url?: string };
|
|
335
|
+
if (a.asset_type === 'url' || a.asset_type === 'image' || a.asset_type === 'video') {
|
|
336
|
+
return a.url;
|
|
337
|
+
}
|
|
338
|
+
return undefined;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
class SalesSocialAdapter implements DecisioningPlatform<Record<string, never>, AdvertiserMeta> {
|
|
342
|
+
capabilities = {
|
|
343
|
+
specialisms: ['sales-social'] as const,
|
|
344
|
+
// Media-buy specialisms require channels + pricingModels even when the
|
|
345
|
+
// adapter doesn't actually sell media buys (the storyboard exercises
|
|
346
|
+
// sync_audiences / sync_creatives, not create_media_buy). Declare the
|
|
347
|
+
// shape that matches what the platform would accept if a buy came in.
|
|
348
|
+
channels: ['social'] as const,
|
|
349
|
+
pricingModels: ['cpm'] as const,
|
|
350
|
+
// Required for sync_audiences phase to be applicable — projected onto
|
|
351
|
+
// `media_buy.audience_targeting` on get_adcp_capabilities. Without it
|
|
352
|
+
// the storyboard runner skips the audience phase as not_applicable.
|
|
353
|
+
audience_targeting: {
|
|
354
|
+
supported_identifier_types: ['hashed_email' as const, 'hashed_phone' as const],
|
|
355
|
+
minimum_audience_size: 100,
|
|
356
|
+
},
|
|
357
|
+
// Required for sync_event_sources / log_event phases — projected onto
|
|
358
|
+
// `media_buy.conversion_tracking`. Mock pixel surface accepts these
|
|
359
|
+
// event types; production maps to the platform's actual conversion API.
|
|
360
|
+
conversion_tracking: {
|
|
361
|
+
supported_event_types: ['purchase' as const, 'add_to_cart' as const, 'page_view' as const, 'lead' as const],
|
|
362
|
+
supported_action_sources: ['website' as const, 'app' as const],
|
|
363
|
+
},
|
|
364
|
+
config: {},
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
accounts: AccountStore<AdvertiserMeta> = {
|
|
368
|
+
/** Translate AdCP `account.brand.domain` → upstream `advertiser_id`.
|
|
369
|
+
* The mock's discovery endpoint is /_lookup/advertiser; production
|
|
370
|
+
* varies (some platforms expose /advertisers, some require a
|
|
371
|
+
* per-principal lookup). For no-account tools (`provide_performance_feedback`,
|
|
372
|
+
* `list_creative_formats`), `ref` is undefined; we don't model those. */
|
|
373
|
+
resolve: async ref => {
|
|
374
|
+
// No-account tool branch (`log_event` / `provide_performance_feedback`
|
|
375
|
+
// / `list_creative_formats` — wire request omits `account`). Framework
|
|
376
|
+
// calls resolve(undefined); we fall through to the first known
|
|
377
|
+
// advertiser so ctx.account is non-null at runtime.
|
|
378
|
+
// SWAP: production should derive the advertiser from `ctx.authInfo`
|
|
379
|
+
// (per-OAuth-client tenant binding) or from a request-body lookup
|
|
380
|
+
// (e.g., `event_source_id` → advertiser mapping persisted at sync time).
|
|
381
|
+
// Returning the first known advertiser is a single-tenant convenience.
|
|
382
|
+
let advertiserDomain: string | undefined;
|
|
383
|
+
let operator: string | undefined;
|
|
384
|
+
if (ref === undefined) {
|
|
385
|
+
advertiserDomain = KNOWN_ADVERTISERS[0];
|
|
386
|
+
} else if ('account_id' in ref) {
|
|
387
|
+
// SWAP: production keeps an account_id → upstream-advertiser-id index
|
|
388
|
+
// populated during `sync_accounts`/`list_accounts`. The mock lacks
|
|
389
|
+
// this surface so the account_id arm is unreachable in the worked
|
|
390
|
+
// example; real adapters add a directory lookup here.
|
|
391
|
+
return null;
|
|
392
|
+
} else {
|
|
393
|
+
advertiserDomain = ref.brand.domain;
|
|
394
|
+
operator = ref.operator;
|
|
395
|
+
}
|
|
396
|
+
if (!advertiserDomain) return null;
|
|
397
|
+
const upstreamAdv = await upstream.lookupAdvertiser(advertiserDomain);
|
|
398
|
+
if (!upstreamAdv) return null;
|
|
399
|
+
return {
|
|
400
|
+
id: upstreamAdv.advertiser_id,
|
|
401
|
+
name: upstreamAdv.display_name,
|
|
402
|
+
status: 'active',
|
|
403
|
+
...(operator !== undefined && { operator }),
|
|
404
|
+
brand: { domain: upstreamAdv.adcp_advertiser },
|
|
405
|
+
ctx_metadata: {
|
|
406
|
+
advertiser_id: upstreamAdv.advertiser_id,
|
|
407
|
+
advertiser_domain: upstreamAdv.adcp_advertiser,
|
|
408
|
+
},
|
|
409
|
+
};
|
|
410
|
+
},
|
|
411
|
+
|
|
412
|
+
/** list_accounts handler. Iterate known advertisers, lookup each one,
|
|
413
|
+
* and return the cursor page. */
|
|
414
|
+
list: async () => {
|
|
415
|
+
const items: Array<Account<AdvertiserMeta>> = [];
|
|
416
|
+
for (const domain of KNOWN_ADVERTISERS) {
|
|
417
|
+
const adv = await upstream.lookupAdvertiser(domain);
|
|
418
|
+
if (!adv) continue;
|
|
419
|
+
items.push({
|
|
420
|
+
id: adv.advertiser_id,
|
|
421
|
+
name: adv.display_name,
|
|
422
|
+
status: 'active',
|
|
423
|
+
brand: { domain: adv.adcp_advertiser },
|
|
424
|
+
ctx_metadata: {
|
|
425
|
+
advertiser_id: adv.advertiser_id,
|
|
426
|
+
advertiser_domain: adv.adcp_advertiser,
|
|
427
|
+
},
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
return { items, has_more: false };
|
|
431
|
+
},
|
|
432
|
+
|
|
433
|
+
/** sync_accounts handler. Social platforms typically pre-provision
|
|
434
|
+
* advertiser seats out-of-band — this is a discovery/echo, not a
|
|
435
|
+
* provisioning call. Per the storyboard, list_accounts is the
|
|
436
|
+
* canonical alternative (declared via `provides_state_for`). */
|
|
437
|
+
upsert: async refs => {
|
|
438
|
+
const out: SyncAccountsResultRow[] = [];
|
|
439
|
+
for (const ref of refs) {
|
|
440
|
+
// sync_accounts always carries the brand+operator arm (the buyer is
|
|
441
|
+
// registering an account, not referencing an existing one). The
|
|
442
|
+
// account_id arm of AccountReference is invalid input here per the
|
|
443
|
+
// wire schema — but tolerate it defensively via the discriminator.
|
|
444
|
+
if ('account_id' in ref) {
|
|
445
|
+
out.push({
|
|
446
|
+
brand: { domain: '' },
|
|
447
|
+
operator: '',
|
|
448
|
+
action: 'failed',
|
|
449
|
+
status: 'rejected',
|
|
450
|
+
errors: [{ code: 'INVALID_REQUEST', message: 'sync_accounts requires brand+operator, not account_id' }],
|
|
451
|
+
});
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
const domain = ref.brand.domain;
|
|
455
|
+
const operator = ref.operator;
|
|
456
|
+
if (!domain) {
|
|
457
|
+
out.push({
|
|
458
|
+
brand: { domain: '' },
|
|
459
|
+
operator,
|
|
460
|
+
action: 'failed',
|
|
461
|
+
status: 'rejected',
|
|
462
|
+
errors: [{ code: 'INVALID_REQUEST', message: 'brand.domain required' }],
|
|
463
|
+
});
|
|
464
|
+
continue;
|
|
465
|
+
}
|
|
466
|
+
const adv = await upstream.lookupAdvertiser(domain);
|
|
467
|
+
if (!adv) {
|
|
468
|
+
out.push({
|
|
469
|
+
brand: { domain },
|
|
470
|
+
operator,
|
|
471
|
+
action: 'failed',
|
|
472
|
+
status: 'rejected',
|
|
473
|
+
errors: [{ code: 'ACCOUNT_NOT_FOUND', message: `No advertiser registered for ${domain}` }],
|
|
474
|
+
});
|
|
475
|
+
continue;
|
|
476
|
+
}
|
|
477
|
+
out.push({
|
|
478
|
+
account_id: adv.advertiser_id,
|
|
479
|
+
name: adv.display_name,
|
|
480
|
+
brand: { domain: adv.adcp_advertiser },
|
|
481
|
+
operator,
|
|
482
|
+
action: 'unchanged',
|
|
483
|
+
status: 'active',
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
return out;
|
|
487
|
+
},
|
|
488
|
+
|
|
489
|
+
getAccountFinancials: async (req): Promise<GetAccountFinancialsSuccess> => {
|
|
490
|
+
const acct = req.account;
|
|
491
|
+
// AccountReference discriminated union. account_id arm requires the
|
|
492
|
+
// production directory lookup the mock doesn't model — see SWAP note
|
|
493
|
+
// on `accounts.resolve` above.
|
|
494
|
+
if ('account_id' in acct) {
|
|
495
|
+
throw new AdcpError('ACCOUNT_NOT_FOUND', {
|
|
496
|
+
message: 'account_id lookup not modeled in this worked example — see SWAP markers on accounts.resolve',
|
|
497
|
+
field: 'account.account_id',
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
const domain = acct.brand.domain;
|
|
501
|
+
const operator = acct.operator;
|
|
502
|
+
const adv = await upstream.lookupAdvertiser(domain);
|
|
503
|
+
if (!adv) throw new AdcpError('ACCOUNT_NOT_FOUND', { message: `No advertiser for ${domain}` });
|
|
504
|
+
const info = await upstream.getAdvertiserInfo(adv.advertiser_id);
|
|
505
|
+
if (!info) throw new AdcpError('ACCOUNT_NOT_FOUND', { message: `No info for ${adv.advertiser_id}` });
|
|
506
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
507
|
+
// currency + timezone live on /info, not /_lookup. The mock's /info
|
|
508
|
+
// doesn't carry spend; production does. Synthesize total_spend: 0 for
|
|
509
|
+
// the example — adopters should plug their billing system here.
|
|
510
|
+
return {
|
|
511
|
+
account: { brand: { domain: info.adcp_advertiser }, operator },
|
|
512
|
+
currency: info.currency,
|
|
513
|
+
period: { start: today, end: today },
|
|
514
|
+
timezone: info.timezone,
|
|
515
|
+
spend: { total_spend: 0 },
|
|
516
|
+
};
|
|
517
|
+
},
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
audiences: AudiencePlatform<AdvertiserMeta> = defineAudiencePlatform<AdvertiserMeta>({
|
|
521
|
+
syncAudiences: async (audiences, ctx): Promise<SyncAudiencesRow[]> => {
|
|
522
|
+
const advertiserId = ctx.account.ctx_metadata.advertiser_id;
|
|
523
|
+
const rows: SyncAudiencesRow[] = [];
|
|
524
|
+
for (const a of audiences) {
|
|
525
|
+
try {
|
|
526
|
+
const created = await upstream.createAudience(advertiserId, {
|
|
527
|
+
audience_id: a.audience_id ?? '',
|
|
528
|
+
name: a.name ?? a.audience_id ?? 'audience',
|
|
529
|
+
...(a.description !== undefined && { description: a.description }),
|
|
530
|
+
});
|
|
531
|
+
// Two-step pattern — create then upload. Mock's body shape is
|
|
532
|
+
// contrived (member_count int instead of hashed members); production
|
|
533
|
+
// sends actual hashed identifiers.
|
|
534
|
+
await upstream.uploadAudienceMembers(advertiserId, {
|
|
535
|
+
audience_id: created.audience_id,
|
|
536
|
+
member_count: 0,
|
|
537
|
+
});
|
|
538
|
+
// Pull a reach estimate so the buyer-facing row can surface
|
|
539
|
+
// `matched_count` / `effective_match_rate` per the spec. Real
|
|
540
|
+
// walled-garden APIs return reach numbers asynchronously after
|
|
541
|
+
// upload; mock returns synchronously for demo purposes. The mock
|
|
542
|
+
// endpoint hashes targeting → deterministic ranges, so we synthesize
|
|
543
|
+
// a per-audience targeting from the audience_id (production passes
|
|
544
|
+
// the actual targeting definition the buyer sent).
|
|
545
|
+
const reach = await upstream.audienceReachEstimate(advertiserId, {
|
|
546
|
+
targeting: { audience_seed: created.audience_id },
|
|
547
|
+
});
|
|
548
|
+
const matched = reach?.matchable_size_at_platform
|
|
549
|
+
? Math.floor((reach.matchable_size_at_platform.min + reach.matchable_size_at_platform.max) / 2)
|
|
550
|
+
: undefined;
|
|
551
|
+
const total = reach?.estimated_audience_size
|
|
552
|
+
? Math.floor((reach.estimated_audience_size.min + reach.estimated_audience_size.max) / 2)
|
|
553
|
+
: undefined;
|
|
554
|
+
rows.push({
|
|
555
|
+
audience_id: a.audience_id ?? created.audience_id,
|
|
556
|
+
name: a.name ?? created.audience_id,
|
|
557
|
+
seller_id: created.audience_id,
|
|
558
|
+
action: 'created',
|
|
559
|
+
// AudienceStatus enum is 'processing' | 'ready' | 'too_small' —
|
|
560
|
+
// 'matching' isn't a wire value. Mock returns its custom 'building'
|
|
561
|
+
// status which projects to 'processing' on AdCP wire.
|
|
562
|
+
status: 'processing',
|
|
563
|
+
...(matched !== undefined && { matched_count: matched }),
|
|
564
|
+
...(matched !== undefined && total !== undefined && total > 0 && { effective_match_rate: matched / total }),
|
|
565
|
+
});
|
|
566
|
+
} catch (err) {
|
|
567
|
+
rows.push({
|
|
568
|
+
audience_id: a.audience_id ?? '',
|
|
569
|
+
...(a.name !== undefined && { name: a.name }),
|
|
570
|
+
action: 'failed',
|
|
571
|
+
errors: [
|
|
572
|
+
{
|
|
573
|
+
code: err instanceof AdcpError ? err.code : 'INVALID_REQUEST',
|
|
574
|
+
message: err instanceof Error ? err.message : 'audience sync failed',
|
|
575
|
+
},
|
|
576
|
+
],
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
return rows;
|
|
581
|
+
},
|
|
582
|
+
|
|
583
|
+
/** Stub — the storyboard's audience phase doesn't call this, but the
|
|
584
|
+
* AudiencePlatform interface requires it. Production maps to a
|
|
585
|
+
* /v1.3/advertiser/{id}/custom_audience/list call. */
|
|
586
|
+
pollAudienceStatuses: async () => new Map(),
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
// Walled-garden platforms own bidding internally — the buyer flow is
|
|
590
|
+
// sync_audiences / sync_creatives / log_event, not create_media_buy.
|
|
591
|
+
// SalesPlatform's core methods (getProducts/createMediaBuy/updateMediaBuy/
|
|
592
|
+
// getMediaBuyDelivery/getMediaBuys) are now optional; RequiredPlatformsFor
|
|
593
|
+
// <'sales-social'> requires only SalesIngestionPlatform. Implementing just
|
|
594
|
+
// the ingestion surface keeps the example honest and lets buyers calling
|
|
595
|
+
// unsupported tools get METHOD_NOT_FOUND from the dispatcher rather than
|
|
596
|
+
// an UNSUPPORTED_FEATURE thrown from a stub.
|
|
597
|
+
sales: SalesPlatform<AdvertiserMeta> = defineSalesPlatform<AdvertiserMeta>({
|
|
598
|
+
syncCreatives: async (creatives, ctx): Promise<SyncCreativesRow[]> => {
|
|
599
|
+
const advertiserId = ctx.account.ctx_metadata.advertiser_id;
|
|
600
|
+
const rows: SyncCreativesRow[] = [];
|
|
601
|
+
for (const c of creatives) {
|
|
602
|
+
try {
|
|
603
|
+
// Project AdCP `CreativeAsset.assets` (the asset map keyed by
|
|
604
|
+
// asset_id) onto the upstream native creative shape. Asset values
|
|
605
|
+
// carry an `asset_type` discriminator; we read the typed sub-shapes
|
|
606
|
+
// by narrowing on `asset_type`. Mock accepts a flat
|
|
607
|
+
// `primary_text` / `landing_page_url` / `media_url`; production
|
|
608
|
+
// platforms vary in field names but the shape is similar.
|
|
609
|
+
const assets = c.assets;
|
|
610
|
+
const primaryText = readContent(assets['headline']) ?? readContent(assets['primary_text']) ?? c.name;
|
|
611
|
+
const landingPageUrl =
|
|
612
|
+
readUrl(assets['click_url']) ?? readUrl(assets['landing_page']) ?? 'https://example.com';
|
|
613
|
+
const mediaUrl = readUrl(assets['image']) ?? readUrl(assets['video']) ?? 'https://example.com/asset';
|
|
614
|
+
|
|
615
|
+
const created = await upstream.createCreative(advertiserId, {
|
|
616
|
+
creative_id: c.creative_id,
|
|
617
|
+
name: c.name,
|
|
618
|
+
format_id: c.format_id.id,
|
|
619
|
+
primary_text: primaryText,
|
|
620
|
+
landing_page_url: landingPageUrl,
|
|
621
|
+
media_url: mediaUrl,
|
|
622
|
+
});
|
|
623
|
+
rows.push({
|
|
624
|
+
creative_id: c.creative_id,
|
|
625
|
+
action: 'created',
|
|
626
|
+
status: created.status === 'approved' ? 'approved' : 'pending_review',
|
|
627
|
+
platform_id: created.creative_id,
|
|
628
|
+
});
|
|
629
|
+
} catch (err) {
|
|
630
|
+
rows.push({
|
|
631
|
+
creative_id: c.creative_id,
|
|
632
|
+
action: 'failed',
|
|
633
|
+
errors: [
|
|
634
|
+
{
|
|
635
|
+
code: err instanceof AdcpError ? err.code : 'INVALID_REQUEST',
|
|
636
|
+
message: err instanceof Error ? err.message : 'creative sync failed',
|
|
637
|
+
},
|
|
638
|
+
],
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
return rows;
|
|
643
|
+
},
|
|
644
|
+
|
|
645
|
+
syncCatalogs: async (req, ctx): Promise<SyncCatalogsSuccess> => {
|
|
646
|
+
const advertiserId = ctx.account.ctx_metadata.advertiser_id;
|
|
647
|
+
const out: SyncCatalogsSuccess['catalogs'] = [];
|
|
648
|
+
for (const cat of req.catalogs ?? []) {
|
|
649
|
+
const catalogId = cat.catalog_id ?? '';
|
|
650
|
+
try {
|
|
651
|
+
const created = await upstream.createCatalog(advertiserId, {
|
|
652
|
+
catalog_id: catalogId,
|
|
653
|
+
name: cat.name ?? catalogId,
|
|
654
|
+
vertical: cat.type ?? 'product',
|
|
655
|
+
});
|
|
656
|
+
const items = (cat as { items?: unknown[] }).items ?? [];
|
|
657
|
+
const itemCount = items.length;
|
|
658
|
+
if (itemCount > 0) {
|
|
659
|
+
await upstream.uploadCatalogItems(advertiserId, {
|
|
660
|
+
catalog_id: created.catalog_id,
|
|
661
|
+
items,
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
out.push({
|
|
665
|
+
catalog_id: catalogId,
|
|
666
|
+
action: 'created',
|
|
667
|
+
platform_id: created.catalog_id,
|
|
668
|
+
item_count: itemCount,
|
|
669
|
+
items_approved: itemCount,
|
|
670
|
+
last_synced_at: new Date().toISOString(),
|
|
671
|
+
});
|
|
672
|
+
} catch (err) {
|
|
673
|
+
out.push({
|
|
674
|
+
catalog_id: catalogId,
|
|
675
|
+
action: 'failed',
|
|
676
|
+
errors: [
|
|
677
|
+
{
|
|
678
|
+
code: err instanceof AdcpError ? err.code : 'INVALID_REQUEST',
|
|
679
|
+
message: err instanceof Error ? err.message : 'catalog sync failed',
|
|
680
|
+
},
|
|
681
|
+
],
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
return { catalogs: out };
|
|
686
|
+
},
|
|
687
|
+
|
|
688
|
+
syncEventSources: async (req, ctx): Promise<SyncEventSourcesSuccess> => {
|
|
689
|
+
const advertiserId = ctx.account.ctx_metadata.advertiser_id;
|
|
690
|
+
const out: SyncEventSourcesSuccess['event_sources'] = [];
|
|
691
|
+
for (const src of req.event_sources ?? []) {
|
|
692
|
+
try {
|
|
693
|
+
const allowedDomain = (src as { allowed_domains?: string[] }).allowed_domains?.[0];
|
|
694
|
+
const created = await upstream.createPixel(advertiserId, {
|
|
695
|
+
pixel_id: src.event_source_id ?? '',
|
|
696
|
+
name: src.name ?? src.event_source_id ?? 'pixel',
|
|
697
|
+
...(allowedDomain !== undefined && { domain: allowedDomain }),
|
|
698
|
+
});
|
|
699
|
+
// Record buyer→upstream id mapping for later log_event translation.
|
|
700
|
+
if (src.event_source_id) {
|
|
701
|
+
eventSourceMap.set(eventSourceKey(advertiserId, src.event_source_id), created.pixel_id);
|
|
702
|
+
}
|
|
703
|
+
out.push({
|
|
704
|
+
event_source_id: src.event_source_id ?? '',
|
|
705
|
+
...(src.name !== undefined && { name: src.name }),
|
|
706
|
+
seller_id: created.pixel_id,
|
|
707
|
+
event_types: src.event_types ?? [],
|
|
708
|
+
action_source: 'website',
|
|
709
|
+
managed_by: 'buyer',
|
|
710
|
+
action: 'created',
|
|
711
|
+
setup: {
|
|
712
|
+
snippet: `<script>!function(){var p=document.createElement('script');p.src='https://pixel.example/${created.pixel_id}.js';document.head.appendChild(p);}();</script>`,
|
|
713
|
+
snippet_type: 'javascript',
|
|
714
|
+
instructions: 'Place this snippet in your <head> tag.',
|
|
715
|
+
},
|
|
716
|
+
});
|
|
717
|
+
} catch (err) {
|
|
718
|
+
out.push({
|
|
719
|
+
event_source_id: src.event_source_id ?? '',
|
|
720
|
+
action: 'failed',
|
|
721
|
+
errors: [
|
|
722
|
+
{
|
|
723
|
+
code: err instanceof AdcpError ? err.code : 'INVALID_REQUEST',
|
|
724
|
+
message: err instanceof Error ? err.message : 'event source sync failed',
|
|
725
|
+
},
|
|
726
|
+
],
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
return { event_sources: out };
|
|
731
|
+
},
|
|
732
|
+
|
|
733
|
+
logEvent: async (req, ctx): Promise<LogEventSuccess> => {
|
|
734
|
+
const advertiserId = ctx.account.ctx_metadata.advertiser_id;
|
|
735
|
+
// Project AdCP `Event` onto the upstream walled-garden CAPI shape.
|
|
736
|
+
// AdCP carries identifiers on the spec field `Event.user_match` (per
|
|
737
|
+
// /schemas/3.0.4/core/user-match.json — `hashed_email`, `hashed_phone`,
|
|
738
|
+
// `uids[]`, `click_id`, `client_ip` + `client_user_agent`). Project
|
|
739
|
+
// these faithfully onto the upstream's `user_data` shape and pass the
|
|
740
|
+
// batch unconditionally — let the upstream's identity policy decide
|
|
741
|
+
// which events match. Dropping or synthesizing identifiers in the
|
|
742
|
+
// adapter would either (a) hide buyer-fixable misconfigurations or
|
|
743
|
+
// (b) fabricate a stable user-id signal the buyer never granted.
|
|
744
|
+
const events = (req.events ?? []).map(e => {
|
|
745
|
+
const eventTimeIso = e.event_time ?? new Date().toISOString();
|
|
746
|
+
const eventTime = Math.floor(new Date(eventTimeIso).getTime() / 1000);
|
|
747
|
+
const m = e.user_match;
|
|
748
|
+
const userData: { external_id_sha256?: string; email_sha256?: string; phone_sha256?: string } = {};
|
|
749
|
+
if (m?.hashed_email) userData.email_sha256 = m.hashed_email;
|
|
750
|
+
if (m?.hashed_phone) userData.phone_sha256 = m.hashed_phone;
|
|
751
|
+
// Walled gardens commonly accept hashed UIDs as `external_id_sha256`.
|
|
752
|
+
// SWAP: production maps `m.uids[i].type` to your platform's specific
|
|
753
|
+
// identifier slot (e.g. `madid`, `idfa`, `aaid`) per the CAPI docs.
|
|
754
|
+
const firstUid = m?.uids?.[0]?.value;
|
|
755
|
+
if (firstUid && /^[a-f0-9]{64}$/.test(firstUid)) userData.external_id_sha256 = firstUid;
|
|
756
|
+
return {
|
|
757
|
+
event_name: e.event_type,
|
|
758
|
+
event_time: eventTime,
|
|
759
|
+
user_data: userData,
|
|
760
|
+
};
|
|
761
|
+
});
|
|
762
|
+
|
|
763
|
+
// Translate buyer's `event_source_id` → upstream `pixel_id`. The mock
|
|
764
|
+
// assigns its own pixel_id at create time and ignores buyer-supplied
|
|
765
|
+
// values, so subsequent log_event calls must look up the mapping.
|
|
766
|
+
const buyerEventSourceId = req.event_source_id ?? '';
|
|
767
|
+
const upstreamPixelId =
|
|
768
|
+
eventSourceMap.get(eventSourceKey(advertiserId, buyerEventSourceId)) ?? buyerEventSourceId;
|
|
769
|
+
// Tolerate upstream "no matchable events" (every event lacked a
|
|
770
|
+
// matchable identifier in `user_match`). Surface as
|
|
771
|
+
// `events_processed: 0` so the buyer can populate `user_match` and
|
|
772
|
+
// retry; production should also include the upstream's per-event drop
|
|
773
|
+
// reasons in `partial_failures[]` for actionable buyer errors.
|
|
774
|
+
let tracked: { events_received: number; events_dropped: number };
|
|
775
|
+
try {
|
|
776
|
+
tracked = await upstream.trackEvents(advertiserId, {
|
|
777
|
+
pixel_id: upstreamPixelId,
|
|
778
|
+
events,
|
|
779
|
+
});
|
|
780
|
+
} catch (err) {
|
|
781
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
782
|
+
if (message.includes('no_matchable_events') || message.includes('events were dropped')) {
|
|
783
|
+
return {
|
|
784
|
+
events_received: req.events?.length ?? 0,
|
|
785
|
+
events_processed: 0,
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
throw err;
|
|
789
|
+
}
|
|
790
|
+
// AdCP wire: `events_received` is the buyer's submitted count;
|
|
791
|
+
// `events_processed` is the count the seller will count toward
|
|
792
|
+
// optimization/billing. Drop count = (no_match drops by adapter)
|
|
793
|
+
// + (upstream drops for any reason).
|
|
794
|
+
return {
|
|
795
|
+
events_received: req.events?.length ?? 0,
|
|
796
|
+
events_processed: tracked.events_received,
|
|
797
|
+
};
|
|
798
|
+
},
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// ---------------------------------------------------------------------------
|
|
803
|
+
// Boot
|
|
804
|
+
// ---------------------------------------------------------------------------
|
|
805
|
+
|
|
806
|
+
const platform = new SalesSocialAdapter();
|
|
807
|
+
const idempotencyStore = createIdempotencyStore({ backend: memoryBackend(), ttlSeconds: 86_400 });
|
|
808
|
+
|
|
809
|
+
serve(
|
|
810
|
+
({ taskStore }) =>
|
|
811
|
+
createAdcpServerFromPlatform(platform, {
|
|
812
|
+
name: 'hello-seller-adapter-social',
|
|
813
|
+
version: '1.0.0',
|
|
814
|
+
taskStore,
|
|
815
|
+
idempotency: idempotencyStore,
|
|
816
|
+
resolveSessionKey: ctx => {
|
|
817
|
+
const acct = ctx.account as Account<AdvertiserMeta> | undefined;
|
|
818
|
+
return acct?.id ?? 'anonymous';
|
|
819
|
+
},
|
|
820
|
+
}),
|
|
821
|
+
{
|
|
822
|
+
port: PORT,
|
|
823
|
+
authenticate: verifyApiKey({
|
|
824
|
+
keys: { [ADCP_AUTH_TOKEN]: { principal: 'compliance-runner' } },
|
|
825
|
+
}),
|
|
826
|
+
}
|
|
827
|
+
);
|
|
828
|
+
|
|
829
|
+
console.log(`sales-social adapter on http://127.0.0.1:${PORT}/mcp · upstream: ${UPSTREAM_URL}`);
|