@adcp/sdk 16.0.0-beta.7 → 16.0.0-beta.9
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/AGENTS.md +3 -3
- package/README.md +20 -0
- package/bin/adcp.js +10 -13
- package/dist/lib/conformance/index.d.mts +2 -0
- package/dist/lib/conformance/index.d.ts +2 -0
- package/dist/lib/conformance/index.js +3 -0
- package/dist/lib/conformance/index.mjs +2 -0
- package/dist/lib/conformance/property-lists.d.mts +14 -0
- package/dist/lib/conformance/property-lists.d.ts +14 -0
- package/dist/lib/conformance/property-lists.js +45 -0
- package/dist/lib/conformance/property-lists.mjs +21 -0
- package/dist/lib/conformance/runConformance.js +20 -1
- package/dist/lib/conformance/runConformance.mjs +20 -1
- package/dist/lib/conformance/types.d.mts +3 -0
- package/dist/lib/conformance/types.d.ts +3 -0
- package/dist/lib/core/AgentClient.d.mts +8 -5
- package/dist/lib/core/AgentClient.d.ts +8 -5
- package/dist/lib/core/AgentClient.js +9 -4
- package/dist/lib/core/AgentClient.mjs +9 -4
- package/dist/lib/core/SingleAgentClient.d.mts +32 -115
- package/dist/lib/core/SingleAgentClient.d.ts +32 -115
- package/dist/lib/core/SingleAgentClient.js +379 -273
- package/dist/lib/core/SingleAgentClient.mjs +387 -275
- package/dist/lib/core/TaskExecutor.d.mts +1 -16
- package/dist/lib/core/TaskExecutor.d.ts +1 -16
- package/dist/lib/core/TaskExecutor.js +34 -51
- package/dist/lib/core/TaskExecutor.mjs +12 -29
- package/dist/lib/core/product-cache.d.mts +3 -1
- package/dist/lib/core/product-cache.d.ts +3 -1
- package/dist/lib/core/product-cache.js +2 -1
- package/dist/lib/core/product-cache.mjs +2 -1
- package/dist/lib/errors/index.d.mts +2 -8
- package/dist/lib/errors/index.d.ts +2 -8
- package/dist/lib/errors/index.js +4 -4
- package/dist/lib/errors/index.mjs +4 -4
- package/dist/lib/identifiers.d.mts +53 -0
- package/dist/lib/identifiers.d.ts +53 -0
- package/dist/lib/identifiers.js +212 -0
- package/dist/lib/identifiers.mjs +163 -0
- package/dist/lib/index.d.mts +7 -5
- package/dist/lib/index.d.ts +7 -5
- package/dist/lib/index.js +2 -14
- package/dist/lib/index.mjs +1 -14
- package/dist/lib/media-buy/compatibility.d.mts +1 -1
- package/dist/lib/media-buy/compatibility.d.ts +1 -1
- package/dist/lib/media-buy/compatibility.js +26 -45
- package/dist/lib/media-buy/compatibility.mjs +26 -45
- package/dist/lib/media-buy/index.d.mts +1 -1
- package/dist/lib/media-buy/index.d.ts +1 -1
- package/dist/lib/media-buy/legacy-purchase-continuation.d.mts +2 -2
- package/dist/lib/media-buy/legacy-purchase-continuation.d.ts +2 -2
- package/dist/lib/media-buy/property-policy.d.mts +15 -1
- package/dist/lib/media-buy/property-policy.d.ts +15 -1
- package/dist/lib/media-buy/property-policy.js +135 -3
- package/dist/lib/media-buy/property-policy.mjs +134 -3
- package/dist/lib/protocols/index.js +14 -22
- package/dist/lib/protocols/index.mjs +5 -13
- package/dist/lib/registry/index.d.mts +12 -0
- package/dist/lib/registry/index.d.ts +12 -0
- package/dist/lib/registry/index.js +159 -5
- package/dist/lib/registry/index.mjs +156 -4
- package/dist/lib/registry/types.d.mts +26 -2
- package/dist/lib/registry/types.d.ts +26 -2
- package/dist/lib/registry/types.generated.d.mts +51 -11
- package/dist/lib/registry/types.generated.d.ts +51 -11
- package/dist/lib/reporting/source/conformance.d.mts +8 -8
- package/dist/lib/reporting/source/conformance.d.ts +8 -8
- package/dist/lib/reporting/source/manifest.d.mts +27 -27
- package/dist/lib/reporting/source/manifest.d.ts +27 -27
- package/dist/lib/server/create-adcp-server.js +6 -0
- package/dist/lib/server/create-adcp-server.mjs +6 -0
- package/dist/lib/server/decisioning/specialisms/lists.d.mts +4 -4
- package/dist/lib/server/decisioning/specialisms/lists.d.ts +4 -4
- package/dist/lib/server/index.d.mts +3 -0
- package/dist/lib/server/index.d.ts +3 -0
- package/dist/lib/server/index.js +8 -1
- package/dist/lib/server/index.mjs +4 -0
- package/dist/lib/server/property-lists.d.mts +36 -0
- package/dist/lib/server/property-lists.d.ts +36 -0
- package/dist/lib/server/property-lists.js +154 -0
- package/dist/lib/server/property-lists.mjs +129 -0
- package/dist/lib/server/targeting-helpers.d.mts +2 -0
- package/dist/lib/server/targeting-helpers.d.ts +2 -0
- package/dist/lib/server/targeting-helpers.js +28 -1
- package/dist/lib/server/targeting-helpers.mjs +18 -1
- package/dist/lib/signing/parser.js +2 -2
- package/dist/lib/signing/parser.mjs +2 -2
- package/dist/lib/signing/server.d.mts +1 -1
- package/dist/lib/signing/server.d.ts +1 -1
- package/dist/lib/signing/server.mjs +5 -1
- package/dist/lib/signing/webhook-verifier.d.mts +11 -0
- package/dist/lib/signing/webhook-verifier.d.ts +11 -0
- package/dist/lib/signing/webhook-verifier.js +11 -3
- package/dist/lib/signing/webhook-verifier.mjs +11 -3
- package/dist/lib/supply-path/verify.js +12 -2
- package/dist/lib/supply-path/verify.mjs +2 -2
- package/dist/lib/testing/compliance/comply.js +0 -8
- package/dist/lib/testing/compliance/comply.mjs +0 -8
- package/dist/lib/testing/compliance/storyboard-tracks.js +11 -0
- package/dist/lib/testing/compliance/storyboard-tracks.mjs +11 -0
- package/dist/lib/testing/index.d.mts +2 -0
- package/dist/lib/testing/index.d.ts +2 -0
- package/dist/lib/testing/index.js +5 -0
- package/dist/lib/testing/index.mjs +3 -0
- package/dist/lib/testing/scenarios/capabilities.d.mts +2 -2
- package/dist/lib/testing/scenarios/capabilities.d.ts +2 -2
- package/dist/lib/testing/scenarios/capabilities.js +8 -41
- package/dist/lib/testing/scenarios/capabilities.mjs +9 -42
- package/dist/lib/testing/storyboard/creative-build-probe.d.mts +34 -0
- package/dist/lib/testing/storyboard/creative-build-probe.d.ts +34 -0
- package/dist/lib/testing/storyboard/creative-build-probe.js +395 -0
- package/dist/lib/testing/storyboard/creative-build-probe.mjs +373 -0
- package/dist/lib/testing/storyboard/index.d.mts +2 -0
- package/dist/lib/testing/storyboard/index.d.ts +2 -0
- package/dist/lib/testing/storyboard/index.js +5 -0
- package/dist/lib/testing/storyboard/index.mjs +3 -0
- package/dist/lib/testing/storyboard/loader.js +12 -0
- package/dist/lib/testing/storyboard/loader.mjs +12 -0
- package/dist/lib/testing/storyboard/property-list-reference.d.mts +15 -0
- package/dist/lib/testing/storyboard/property-list-reference.d.ts +15 -0
- package/dist/lib/testing/storyboard/property-list-reference.js +514 -0
- package/dist/lib/testing/storyboard/property-list-reference.mjs +487 -0
- package/dist/lib/testing/storyboard/runner.js +318 -58
- package/dist/lib/testing/storyboard/runner.mjs +322 -58
- package/dist/lib/testing/storyboard/types.d.mts +38 -16
- package/dist/lib/testing/storyboard/types.d.ts +38 -16
- package/dist/lib/testing/storyboard/types.js +1 -0
- package/dist/lib/testing/storyboard/types.mjs +1 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/testing/storyboard/validations.js +64 -0
- package/dist/lib/testing/storyboard/validations.mjs +67 -1
- package/dist/lib/testing/types.d.mts +15 -1
- package/dist/lib/testing/types.d.ts +15 -1
- package/dist/lib/types/schemas.generated.d.ts +65 -65
- package/dist/lib/types/wellknown-schemas.generated.d.mts +21 -21
- package/dist/lib/types/wellknown-schemas.generated.d.ts +21 -21
- package/dist/lib/utils/adcp-version-config.js +6 -0
- package/dist/lib/utils/adcp-version-config.mjs +6 -0
- package/dist/lib/utils/capabilities.d.mts +7 -9
- package/dist/lib/utils/capabilities.d.ts +7 -9
- package/dist/lib/utils/capabilities.js +14 -28
- package/dist/lib/utils/capabilities.mjs +14 -27
- package/dist/lib/utils/creative-adapter.d.mts +15 -113
- package/dist/lib/utils/creative-adapter.d.ts +15 -113
- package/dist/lib/utils/creative-adapter.js +7 -106
- package/dist/lib/utils/creative-adapter.mjs +7 -102
- package/dist/lib/utils/format-renders.d.mts +20 -80
- package/dist/lib/utils/format-renders.d.ts +20 -80
- package/dist/lib/utils/format-renders.js +7 -67
- package/dist/lib/utils/format-renders.mjs +7 -66
- package/dist/lib/utils/index.d.mts +1 -2
- package/dist/lib/utils/index.d.ts +1 -2
- package/dist/lib/utils/index.js +0 -7
- package/dist/lib/utils/index.mjs +0 -6
- package/dist/lib/utils/preview-normalizer.d.mts +31 -80
- package/dist/lib/utils/preview-normalizer.d.ts +31 -80
- package/dist/lib/utils/preview-normalizer.js +5 -50
- package/dist/lib/utils/preview-normalizer.mjs +5 -49
- package/dist/lib/utils/pricing-adapter.d.mts +2 -36
- package/dist/lib/utils/pricing-adapter.d.ts +2 -36
- package/dist/lib/utils/pricing-adapter.js +0 -105
- package/dist/lib/utils/pricing-adapter.mjs +0 -100
- package/dist/lib/utils/request-normalizer.d.mts +1 -2
- package/dist/lib/utils/request-normalizer.d.ts +1 -2
- package/dist/lib/v2/projection/creative-delivery.d.mts +2 -0
- package/dist/lib/v2/projection/creative-delivery.d.ts +2 -0
- package/dist/lib/v2/projection/creative-delivery.js +7 -0
- package/dist/lib/v2/projection/creative-delivery.mjs +6 -0
- package/dist/lib/v2/projection/legacy-metadata.d.mts +12 -0
- package/dist/lib/v2/projection/legacy-metadata.d.ts +12 -0
- package/dist/lib/v2/projection/legacy-metadata.js +41 -1
- package/dist/lib/v2/projection/legacy-metadata.mjs +37 -1
- package/dist/lib/v2/projection/legacy-normalization.d.mts +1 -1
- package/dist/lib/v2/projection/legacy-normalization.d.ts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.js +13 -0
- package/dist/lib/v2/projection/v1-to-v2.mjs +14 -0
- package/dist/lib/validation/client-hooks.d.mts +1 -4
- package/dist/lib/validation/client-hooks.d.ts +1 -4
- package/dist/lib/validation/get-products-request.d.mts +1 -1
- package/dist/lib/validation/get-products-request.d.ts +1 -1
- package/dist/lib/validation/schema-loader.js +6 -0
- package/dist/lib/validation/schema-loader.mjs +6 -0
- package/dist/lib/validation/schema-validator.js +1 -26
- package/dist/lib/validation/schema-validator.mjs +1 -26
- package/dist/lib/version.d.mts +5 -5
- package/dist/lib/version.d.ts +5 -5
- package/dist/lib/version.js +3 -5
- package/dist/lib/version.mjs +3 -5
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/development/PROTOCOL_DIFFERENCES.md +1 -1
- package/docs/guides/CONFORMANCE.md +25 -0
- package/docs/guides/CREATIVE-BUILD-PROBE.md +156 -0
- package/docs/guides/CREATIVE-DELIVERY.md +45 -6
- package/docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md +15 -18
- package/docs/guides/PROPERTY-LISTS.md +264 -0
- package/docs/guides/SIGNING-GUIDE.md +25 -0
- package/docs/guides/VALIDATE-YOUR-AGENT.md +5 -0
- package/docs/llms.txt +2 -2
- package/docs/migration-13-to-14.md +20 -16
- package/docs/migration-14.x-rc-worksheet.md +5 -5
- package/docs/migration-4.x-to-5.x.md +12 -7
- package/docs/migration-drop-adcp-2.md +25 -0
- package/package.json +3 -18
- package/skills/call-adcp-agent/SKILL.md +23 -25
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/get_products.d.mts +0 -8
- package/dist/lib/adapters/legacy/v2-5/get_products.d.ts +0 -8
- package/dist/lib/adapters/legacy/v2-5/get_products.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/get_products.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/index.d.mts +0 -34
- package/dist/lib/adapters/legacy/v2-5/index.d.ts +0 -34
- package/dist/lib/adapters/legacy/v2-5/index.js +0 -50
- package/dist/lib/adapters/legacy/v2-5/index.mjs +0 -25
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.mts +0 -8
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts +0 -8
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/preview_creative.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/preview_creative.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.mts +0 -11
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts +0 -11
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.js +0 -32
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.mjs +0 -8
- package/dist/lib/adapters/legacy/v2-5/types.d.mts +0 -39
- package/dist/lib/adapters/legacy/v2-5/types.d.ts +0 -39
- package/dist/lib/adapters/legacy/v2-5/types.js +0 -16
- package/dist/lib/adapters/legacy/v2-5/types.mjs +0 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.js +0 -35
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.mjs +0 -11
- package/dist/lib/schemas-data/v2.5/_provenance.json +0 -8
- package/dist/lib/schemas-data/v2.5/adagents.json +0 -494
- package/dist/lib/schemas-data/v2.5/core/activation-key.json +0 -50
- package/dist/lib/schemas-data/v2.5/core/assets/audio-asset.json +0 -32
- package/dist/lib/schemas-data/v2.5/core/assets/css-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/daast-asset.json +0 -87
- package/dist/lib/schemas-data/v2.5/core/assets/html-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/image-asset.json +0 -38
- package/dist/lib/schemas-data/v2.5/core/assets/javascript-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/markdown-asset.json +0 -31
- package/dist/lib/schemas-data/v2.5/core/assets/text-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/url-asset.json +0 -26
- package/dist/lib/schemas-data/v2.5/core/assets/vast-asset.json +0 -87
- package/dist/lib/schemas-data/v2.5/core/assets/video-asset.json +0 -44
- package/dist/lib/schemas-data/v2.5/core/assets/webhook-asset.json +0 -71
- package/dist/lib/schemas-data/v2.5/core/async-response-data.json +0 -88
- package/dist/lib/schemas-data/v2.5/core/brand-manifest-ref.json +0 -33
- package/dist/lib/schemas-data/v2.5/core/brand-manifest.json +0 -409
- package/dist/lib/schemas-data/v2.5/core/context.json +0 -8
- package/dist/lib/schemas-data/v2.5/core/creative-asset.json +0 -125
- package/dist/lib/schemas-data/v2.5/core/creative-assignment.json +0 -31
- package/dist/lib/schemas-data/v2.5/core/creative-filters.json +0 -111
- package/dist/lib/schemas-data/v2.5/core/creative-manifest.json +0 -72
- package/dist/lib/schemas-data/v2.5/core/creative-policy.json +0 -27
- package/dist/lib/schemas-data/v2.5/core/delivery-metrics.json +0 -171
- package/dist/lib/schemas-data/v2.5/core/deployment.json +0 -93
- package/dist/lib/schemas-data/v2.5/core/destination.json +0 -53
- package/dist/lib/schemas-data/v2.5/core/error.json +0 -40
- package/dist/lib/schemas-data/v2.5/core/ext.json +0 -8
- package/dist/lib/schemas-data/v2.5/core/format-id.json +0 -47
- package/dist/lib/schemas-data/v2.5/core/format.json +0 -324
- package/dist/lib/schemas-data/v2.5/core/frequency-cap.json +0 -18
- package/dist/lib/schemas-data/v2.5/core/mcp-webhook-payload.json +0 -152
- package/dist/lib/schemas-data/v2.5/core/measurement.json +0 -48
- package/dist/lib/schemas-data/v2.5/core/media-buy.json +0 -62
- package/dist/lib/schemas-data/v2.5/core/package.json +0 -72
- package/dist/lib/schemas-data/v2.5/core/performance-feedback.json +0 -90
- package/dist/lib/schemas-data/v2.5/core/placement.json +0 -34
- package/dist/lib/schemas-data/v2.5/core/pricing-option.json +0 -35
- package/dist/lib/schemas-data/v2.5/core/product-filters.json +0 -102
- package/dist/lib/schemas-data/v2.5/core/product.json +0 -153
- package/dist/lib/schemas-data/v2.5/core/promoted-offerings.json +0 -115
- package/dist/lib/schemas-data/v2.5/core/promoted-products.json +0 -67
- package/dist/lib/schemas-data/v2.5/core/property-id.json +0 -14
- package/dist/lib/schemas-data/v2.5/core/property-tag.json +0 -16
- package/dist/lib/schemas-data/v2.5/core/property.json +0 -62
- package/dist/lib/schemas-data/v2.5/core/protocol-envelope.json +0 -146
- package/dist/lib/schemas-data/v2.5/core/publisher-property-selector.json +0 -92
- package/dist/lib/schemas-data/v2.5/core/push-notification-config.json +0 -48
- package/dist/lib/schemas-data/v2.5/core/reporting-capabilities.json +0 -71
- package/dist/lib/schemas-data/v2.5/core/response.json +0 -24
- package/dist/lib/schemas-data/v2.5/core/signal-filters.json +0 -35
- package/dist/lib/schemas-data/v2.5/core/start-timing.json +0 -18
- package/dist/lib/schemas-data/v2.5/core/sub-asset.json +0 -79
- package/dist/lib/schemas-data/v2.5/core/targeting.json +0 -50
- package/dist/lib/schemas-data/v2.5/core/tasks-get-request.json +0 -43
- package/dist/lib/schemas-data/v2.5/core/tasks-get-response.json +0 -166
- package/dist/lib/schemas-data/v2.5/core/tasks-list-request.json +0 -192
- package/dist/lib/schemas-data/v2.5/core/tasks-list-response.json +0 -183
- package/dist/lib/schemas-data/v2.5/creative/asset-types/index.json +0 -101
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-request.json +0 -73
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-response.json +0 -61
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-request.json +0 -164
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-response.json +0 -245
- package/dist/lib/schemas-data/v2.5/creative/preview-render.json +0 -225
- package/dist/lib/schemas-data/v2.5/enums/adcp-domain.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/asset-content-type.json +0 -22
- package/dist/lib/schemas-data/v2.5/enums/auth-scheme.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/available-metric.json +0 -18
- package/dist/lib/schemas-data/v2.5/enums/channels.json +0 -18
- package/dist/lib/schemas-data/v2.5/enums/co-branding-requirement.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/creative-action.json +0 -14
- package/dist/lib/schemas-data/v2.5/enums/creative-agent-capability.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/creative-sort-field.json +0 -15
- package/dist/lib/schemas-data/v2.5/enums/creative-status.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/daast-tracking-event.json +0 -20
- package/dist/lib/schemas-data/v2.5/enums/daast-version.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/delivery-type.json +0 -15
- package/dist/lib/schemas-data/v2.5/enums/dimension-unit.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/feed-format.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/feedback-source.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/format-category.json +0 -16
- package/dist/lib/schemas-data/v2.5/enums/format-id-parameter.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/frequency-cap-scope.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/history-entry-type.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/http-method.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/identifier-types.json +0 -34
- package/dist/lib/schemas-data/v2.5/enums/javascript-module-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/landing-page-requirement.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/markdown-flavor.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/media-buy-status.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/metric-type.json +0 -17
- package/dist/lib/schemas-data/v2.5/enums/notification-type.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/pacing.json +0 -17
- package/dist/lib/schemas-data/v2.5/enums/preview-output-format.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/pricing-model.json +0 -25
- package/dist/lib/schemas-data/v2.5/enums/property-type.json +0 -16
- package/dist/lib/schemas-data/v2.5/enums/publisher-identifier-types.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/reporting-frequency.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/signal-catalog-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/sort-direction.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/standard-format-ids.json +0 -103
- package/dist/lib/schemas-data/v2.5/enums/task-status.json +0 -29
- package/dist/lib/schemas-data/v2.5/enums/task-type.json +0 -27
- package/dist/lib/schemas-data/v2.5/enums/update-frequency.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/url-asset-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/validation-mode.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/vast-tracking-event.json +0 -25
- package/dist/lib/schemas-data/v2.5/enums/vast-version.json +0 -14
- package/dist/lib/schemas-data/v2.5/enums/webhook-response-type.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/webhook-security-method.json +0 -12
- package/dist/lib/schemas-data/v2.5/index.json +0 -604
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-request.json +0 -31
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-response.json +0 -65
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-input-required.json +0 -31
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-working.json +0 -36
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-request.json +0 -126
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-response.json +0 -97
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-request.json +0 -54
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-response.json +0 -285
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-input-required.json +0 -38
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-submitted.json +0 -21
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-working.json +0 -34
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-request.json +0 -28
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-response.json +0 -33
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-request.json +0 -26
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-response.json +0 -70
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-request.json +0 -58
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-response.json +0 -61
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-request.json +0 -137
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-response.json +0 -437
- package/dist/lib/schemas-data/v2.5/media-buy/package-request.json +0 -80
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-request.json +0 -88
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-response.json +0 -66
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-input-required.json +0 -25
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-working.json +0 -46
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-request.json +0 -178
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-response.json +0 -149
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-input-required.json +0 -24
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-working.json +0 -36
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-request.json +0 -129
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-response.json +0 -99
- package/dist/lib/schemas-data/v2.5/pricing-options/cpc-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpcv-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-auction-option.json +0 -81
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-fixed-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpp-option.json +0 -73
- package/dist/lib/schemas-data/v2.5/pricing-options/cpv-option.json +0 -88
- package/dist/lib/schemas-data/v2.5/pricing-options/flat-rate-option.json +0 -93
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-auction-option.json +0 -81
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-fixed-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/protocols/adcp-extension.json +0 -33
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-request.json +0 -32
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-response.json +0 -68
- package/dist/lib/schemas-data/v2.5/signals/get-signals-request.json +0 -59
- package/dist/lib/schemas-data/v2.5/signals/get-signals-response.json +0 -100
- package/dist/lib/types/v2-5/index.d.mts +0 -1
- package/dist/lib/types/v2-5/index.d.ts +0 -1
- package/dist/lib/types/v2-5/index.js +0 -22
- package/dist/lib/types/v2-5/index.mjs +0 -1
- package/dist/lib/types/v2-5/tools.generated.d.mts +0 -3568
- package/dist/lib/types/v2-5/tools.generated.d.ts +0 -3568
- package/dist/lib/types/v2-5/tools.generated.js +0 -16
- package/dist/lib/types/v2-5/tools.generated.mjs +0 -0
- package/dist/lib/utils/sync-creatives-adapter.d.mts +0 -33
- package/dist/lib/utils/sync-creatives-adapter.d.ts +0 -33
- package/dist/lib/utils/sync-creatives-adapter.js +0 -83
- package/dist/lib/utils/sync-creatives-adapter.mjs +0 -59
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: call-adcp-agent
|
|
3
3
|
description: Wire-level invariants for any AdCP buyer call — idempotency_key replay semantics, account `oneOf` variants, async `status:'submitted'`+`task_id` polling, error recovery from `adcp_error.issues[]`. Load before any per-protocol task skill (adcp-media-buy, adcp-creative, adcp-signals, adcp-governance, adcp-si, adcp-brand) when calling an AdCP agent as a buyer.
|
|
4
|
-
adcp_version:
|
|
4
|
+
adcp_version: '3.x'
|
|
5
5
|
type: cross-cutting
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -32,7 +32,7 @@ Walk these in order on first contact:
|
|
|
32
32
|
|
|
33
33
|
1. **Agent card** (A2A) or **`tools/list`** (MCP): returns tool NAMES. Most AdCP MCP servers publish passthrough schemas in `tools/list` by default — everything shows `{type: 'object', properties: {}}`. Some servers opt into `exposeToolSchemas: true` and publish shallow top-level key hints there; treat those as call hints, not as the canonical schema.
|
|
34
34
|
2. **`get_adcp_capabilities`**: returns supported protocols (`media_buy`, `signals`, `creative`, …), AdCP major versions, feature flags. Tells you WHICH tools this agent supports, not how to call them.
|
|
35
|
-
3. **`get_schema(tool_name)`**
|
|
35
|
+
3. **`get_schema(tool_name)`** _(when the agent exposes it — pending standardization in [#3057](https://github.com/adcontextprotocol/adcp/issues/3057), not yet universal)_: returns the JSON Schema for a tool's request/response. Preferred over reading bundled schemas when available.
|
|
36
36
|
4. **Bundled schemas** (offline, authoritative): every SDK ships the AdCP JSON Schemas locally. Path differs by SDK — spec repo source uses `dist/schemas/<version>/bundled/`, `@adcp/client` puts them at `schemas/cache/<version>/bundled/` after `npm run sync-schemas`, Python and Go SDKs use their own conventions. **Don't hardcode a path** — let the SDK's loader find them, or ask the developer. Each schema is `<protocol>/<tool>-{request,response}.json` once you locate the bundle. The canonical source for every SDK is `https://adcontextprotocol.org/protocol/<version>.tgz`.
|
|
37
37
|
|
|
38
38
|
## Non-obvious rules every buyer must follow
|
|
@@ -119,7 +119,7 @@ Every validation failure produces:
|
|
|
119
119
|
"keyword": "oneOf",
|
|
120
120
|
"message": "must match exactly one schema in oneOf",
|
|
121
121
|
"variants": [
|
|
122
|
-
{ "index": 0, "required": ["account_id"],
|
|
122
|
+
{ "index": 0, "required": ["account_id"], "properties": ["account_id"] },
|
|
123
123
|
{ "index": 1, "required": ["brand", "operator"], "properties": ["brand", "operator", "sandbox"] }
|
|
124
124
|
]
|
|
125
125
|
},
|
|
@@ -226,9 +226,7 @@ Returns `{ signals: [{ signal_agent_segment_id, match_rate, pricing, ... }] }`.
|
|
|
226
226
|
{
|
|
227
227
|
"idempotency_key": "<uuid>",
|
|
228
228
|
"signal_agent_segment_id": "sig_premium_ctv_sports",
|
|
229
|
-
"destinations": [
|
|
230
|
-
{ "type": "platform", "platform": "the-trade-desk" }
|
|
231
|
-
]
|
|
229
|
+
"destinations": [{ "type": "platform", "platform": "the-trade-desk" }]
|
|
232
230
|
}
|
|
233
231
|
```
|
|
234
232
|
|
|
@@ -254,25 +252,25 @@ Both transports share: idempotency, error shape, schema enforcement, and handler
|
|
|
254
252
|
|
|
255
253
|
Quick lookup before reading the full envelope. Match what you see in `adcp_error.issues[*]`, apply the fix:
|
|
256
254
|
|
|
257
|
-
| Symptom
|
|
258
|
-
|
|
259
|
-
| `keyword: 'oneOf'` with `variants[]`
|
|
260
|
-
| `discriminator: [{field, value}]` on a `required` issue
|
|
261
|
-
| `hint:` field present on the issue
|
|
262
|
-
| 2-3 `additionalProperties` errors at the same pointer
|
|
263
|
-
| `keyword: 'required'`, `pointer: '/idempotency_key'`
|
|
264
|
-
| `keyword: 'type'` or `additionalProperties` at `/budget`
|
|
265
|
-
| `additionalProperties` at `/format_id` (string passed)
|
|
266
|
-
| `keyword: 'enum'` at `/destinations/*/type`
|
|
267
|
-
| Response carries `status: 'submitted'` and `task_id`
|
|
268
|
-
| `recovery: 'transient'` (rate limit, 5xx, timeout)
|
|
269
|
-
| `recovery: 'correctable'`
|
|
270
|
-
| `recovery: 'terminal'` (account suspended, payment required, …)
|
|
271
|
-
| `
|
|
272
|
-
| `adcp_error.code: 'AUTH_MISSING'`
|
|
273
|
-
| `adcp_error.code: 'AUTH_INVALID'`
|
|
274
|
-
| `adcp_error.code: 'AUTH_REQUIRED'`
|
|
275
|
-
| HTTP 401 with `WWW-Authenticate` header
|
|
255
|
+
| Symptom | What it means | Fix |
|
|
256
|
+
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
257
|
+
| `keyword: 'oneOf'` with `variants[]` | Discriminated union — you sent fields from multiple variants, or none | Pick ONE variant from `variants[]`. Send only its `required` fields. |
|
|
258
|
+
| `discriminator: [{field, value}]` on a `required` issue | Validator inferred which branch you targeted; you missed required fields IN that branch | Read the `discriminator` pair, fill the missing required fields at the same level (don't nest under the discriminator field name). |
|
|
259
|
+
| `hint:` field present on the issue | SDK matched a curated shape-gotcha rule | Apply the hint directly — it's the validated fix path. |
|
|
260
|
+
| 2-3 `additionalProperties` errors at the same pointer | You merged `oneOf` variants ({account_id, brand, operator, …}) | Drop to one variant. Don't keep "extra" fields "for completeness". |
|
|
261
|
+
| `keyword: 'required'`, `pointer: '/idempotency_key'` | Mutating tool, no UUID | Generate fresh UUID per logical operation. Reuse it on retries. |
|
|
262
|
+
| `keyword: 'type'` or `additionalProperties` at `/budget` | Sent `{amount, currency}` | `budget` is a number. Currency is implied by `pricing_option_id`. |
|
|
263
|
+
| `additionalProperties` at `/format_id` (string passed) | Sent `"format_id": "video_..."` | `format_id` is `{agent_url, id}` — always an object. |
|
|
264
|
+
| `keyword: 'enum'` at `/destinations/*/type` | Made-up destination type | Use `'platform'` (with `platform`) or `'agent'` (with `agent_url`). |
|
|
265
|
+
| Response carries `status: 'submitted'` and `task_id` | Async — work is queued, NOT done | Poll via `tasks/get` (A2A) or the MCP async task extension using `task_id`. |
|
|
266
|
+
| `recovery: 'transient'` (rate limit, 5xx, timeout) | Server-side, retry-safe | Retry with the **same** `idempotency_key`. |
|
|
267
|
+
| `recovery: 'correctable'` | Buyer-side fix | Read `issues[]`, patch the pointers, resend. Most cases close in one attempt. |
|
|
268
|
+
| `recovery: 'terminal'` (account suspended, payment required, …) | Requires human action | Don't retry. Surface to the user. |
|
|
269
|
+
| `VersionUnsupportedError` / `code: 'VERSION_UNSUPPORTED'` from `@adcp/sdk` | Seller cannot meet the configured AdCP 3 version or required capability guarantees; read the error's `reason` and message | Stop and report the incompatibility before business-tool dispatch. For end-of-life AdCP 2 or missing discovery, upgrade the seller to AdCP 3 with `get_adcp_capabilities`; if the application must retain AdCP 2 temporarily, use the exact older SDK pins in the [AdCP 2 migration guide](https://github.com/adcontextprotocol/adcp-client/blob/main/docs/migration-drop-adcp-2.md). Retrying or changing idempotency keys cannot fix protocol incompatibility. |
|
|
270
|
+
| `adcp_error.code: 'AUTH_MISSING'` | No credential was presented | Escalate by default. Retry only if you own a credential supply or refresh path; otherwise surface re-auth to a human. |
|
|
271
|
+
| `adcp_error.code: 'AUTH_INVALID'` | Credential was presented but rejected or revoked | Do not retry blindly. Refresh once only if you own a valid refresh grant and the rejection is token-expiry-shaped; otherwise surface to a human to rotate credentials. |
|
|
272
|
+
| `adcp_error.code: 'AUTH_REQUIRED'` | Legacy compatibility code; older sellers and some SDK helper paths still use it for missing or rejected credentials | Treat as auth escalation by default. Retry only if your agent owns a credential-refresh path; otherwise surface to a human. |
|
|
273
|
+
| HTTP 401 with `WWW-Authenticate` header | Transport auth challenge; may be missing credentials, wrong scheme, rejected credentials, or required request signing | Follow the challenge scheme. `Bearer` means send/refresh an OAuth-style `Authorization: Bearer ...` token. `Basic` means configure basic auth (`auth: { type: 'basic', username, password }` or `--auth user:pass --auth-scheme basic`) — `Bearer` will never succeed against that gateway. `Signature` means enable RFC 9421 request signing with an AdCP signing key, not an `Authorization` retry. **Saved aliases**: if registered with `--auth-scheme basic`, the scheme persists in `~/.adcp/config.json` and auto-applies on every later invocation — don't redundantly repeat the flag on each call. |
|
|
276
274
|
|
|
277
275
|
If your symptom isn't here, fall through to the next section.
|
|
278
276
|
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var create_media_buy_exports = {};
|
|
20
|
-
__export(create_media_buy_exports, {
|
|
21
|
-
createMediaBuyAdapter: () => createMediaBuyAdapter
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(create_media_buy_exports);
|
|
24
|
-
var import_creative_adapter = require('../../../utils/creative-adapter.js');
|
|
25
|
-
const createMediaBuyAdapter = {
|
|
26
|
-
toolName: "create_media_buy",
|
|
27
|
-
adaptRequest: import_creative_adapter.adaptCreateMediaBuyRequestForV2,
|
|
28
|
-
normalizeResponse: import_creative_adapter.normalizeMediaBuyResponse
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
createMediaBuyAdapter
|
|
33
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { adaptCreateMediaBuyRequestForV2, normalizeMediaBuyResponse } from "../../../utils/creative-adapter.mjs";
|
|
2
|
-
const createMediaBuyAdapter = {
|
|
3
|
-
toolName: "create_media_buy",
|
|
4
|
-
adaptRequest: adaptCreateMediaBuyRequestForV2,
|
|
5
|
-
normalizeResponse: normalizeMediaBuyResponse
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
createMediaBuyAdapter
|
|
9
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { GetProductsRequest, GetProductsResponse } from '../../../types/v2-5/index.mjs';
|
|
2
|
-
import type { AdapterPair } from './types.mjs';
|
|
3
|
-
/**
|
|
4
|
-
* v3 ↔ v2.5 adapter pair for `get_products`. Wraps the existing scattered
|
|
5
|
-
* adapter helpers so the registry pattern lands without behavior change;
|
|
6
|
-
* a focused refactor of the underlying implementation can follow.
|
|
7
|
-
*/
|
|
8
|
-
export declare const getProductsAdapter: AdapterPair<unknown, GetProductsRequest, GetProductsResponse, unknown>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { GetProductsRequest, GetProductsResponse } from '../../../types/v2-5';
|
|
2
|
-
import type { AdapterPair } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* v3 ↔ v2.5 adapter pair for `get_products`. Wraps the existing scattered
|
|
5
|
-
* adapter helpers so the registry pattern lands without behavior change;
|
|
6
|
-
* a focused refactor of the underlying implementation can follow.
|
|
7
|
-
*/
|
|
8
|
-
export declare const getProductsAdapter: AdapterPair<unknown, GetProductsRequest, GetProductsResponse, unknown>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var get_products_exports = {};
|
|
20
|
-
__export(get_products_exports, {
|
|
21
|
-
getProductsAdapter: () => getProductsAdapter
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(get_products_exports);
|
|
24
|
-
var import_pricing_adapter = require('../../../utils/pricing-adapter.js');
|
|
25
|
-
const getProductsAdapter = {
|
|
26
|
-
toolName: "get_products",
|
|
27
|
-
adaptRequest: import_pricing_adapter.adaptGetProductsRequestForV2,
|
|
28
|
-
normalizeResponse: import_pricing_adapter.normalizeGetProductsResponse
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
getProductsAdapter
|
|
33
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { adaptGetProductsRequestForV2, normalizeGetProductsResponse } from "../../../utils/pricing-adapter.mjs";
|
|
2
|
-
const getProductsAdapter = {
|
|
3
|
-
toolName: "get_products",
|
|
4
|
-
adaptRequest: adaptGetProductsRequestForV2,
|
|
5
|
-
normalizeResponse: normalizeGetProductsResponse
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
getProductsAdapter
|
|
9
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registry of legacy v2.5 adapter pairs, one per AdCP tool.
|
|
3
|
-
*
|
|
4
|
-
* The SDK's current pin (v3 today) is implicit — this module describes
|
|
5
|
-
* what the buyer sends to and receives from a v2.5 seller, regardless of
|
|
6
|
-
* which v3.x patch the SDK itself speaks. When the SDK pin moves to v4,
|
|
7
|
-
* this directory continues to hold the v2.5 compat shim and a sibling
|
|
8
|
-
* `legacy/v3/` would join for v3 sellers.
|
|
9
|
-
*
|
|
10
|
-
* Add a new tool by:
|
|
11
|
-
* 1. Drop a per-tool module in this directory exporting an
|
|
12
|
-
* `AdapterPair<V3Req, V25Req, V25Res, V3Res>`.
|
|
13
|
-
* 2. Register it below.
|
|
14
|
-
* 3. Add a fixture to `test/lib/adapter-v2-5-conformance.test.js`.
|
|
15
|
-
*
|
|
16
|
-
* Naming intentionally matches `legacy/<seller-version>/`, NOT
|
|
17
|
-
* `<sdk-version>-to-<seller-version>/`. Real ad-tech compat layers carry
|
|
18
|
-
* N=1 active legacy shim with a deprecation runway (OpenRTB, Prebid, GAM
|
|
19
|
-
* all behave this way) — the directory tree should reflect "exceptional,
|
|
20
|
-
* time-boxed" rather than encoding a matrix nobody will staff.
|
|
21
|
-
*/
|
|
22
|
-
import type { AdapterPair } from './types.mjs';
|
|
23
|
-
export type { AdapterPair } from './types.mjs';
|
|
24
|
-
/**
|
|
25
|
-
* Look up the legacy adapter pair for a given AdCP tool when targeting
|
|
26
|
-
* a v2.5 seller. Returns `undefined` for tools without a registered pair
|
|
27
|
-
* — caller should pass the request through unchanged.
|
|
28
|
-
*/
|
|
29
|
-
export declare function getV25Adapter(toolName: string): AdapterPair | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Names of tools registered for v2.5 adaptation. Used by the conformance
|
|
32
|
-
* test suite as the authoritative list.
|
|
33
|
-
*/
|
|
34
|
-
export declare function listV25AdapterTools(): string[];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registry of legacy v2.5 adapter pairs, one per AdCP tool.
|
|
3
|
-
*
|
|
4
|
-
* The SDK's current pin (v3 today) is implicit — this module describes
|
|
5
|
-
* what the buyer sends to and receives from a v2.5 seller, regardless of
|
|
6
|
-
* which v3.x patch the SDK itself speaks. When the SDK pin moves to v4,
|
|
7
|
-
* this directory continues to hold the v2.5 compat shim and a sibling
|
|
8
|
-
* `legacy/v3/` would join for v3 sellers.
|
|
9
|
-
*
|
|
10
|
-
* Add a new tool by:
|
|
11
|
-
* 1. Drop a per-tool module in this directory exporting an
|
|
12
|
-
* `AdapterPair<V3Req, V25Req, V25Res, V3Res>`.
|
|
13
|
-
* 2. Register it below.
|
|
14
|
-
* 3. Add a fixture to `test/lib/adapter-v2-5-conformance.test.js`.
|
|
15
|
-
*
|
|
16
|
-
* Naming intentionally matches `legacy/<seller-version>/`, NOT
|
|
17
|
-
* `<sdk-version>-to-<seller-version>/`. Real ad-tech compat layers carry
|
|
18
|
-
* N=1 active legacy shim with a deprecation runway (OpenRTB, Prebid, GAM
|
|
19
|
-
* all behave this way) — the directory tree should reflect "exceptional,
|
|
20
|
-
* time-boxed" rather than encoding a matrix nobody will staff.
|
|
21
|
-
*/
|
|
22
|
-
import type { AdapterPair } from './types';
|
|
23
|
-
export type { AdapterPair } from './types';
|
|
24
|
-
/**
|
|
25
|
-
* Look up the legacy adapter pair for a given AdCP tool when targeting
|
|
26
|
-
* a v2.5 seller. Returns `undefined` for tools without a registered pair
|
|
27
|
-
* — caller should pass the request through unchanged.
|
|
28
|
-
*/
|
|
29
|
-
export declare function getV25Adapter(toolName: string): AdapterPair | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Names of tools registered for v2.5 adaptation. Used by the conformance
|
|
32
|
-
* test suite as the authoritative list.
|
|
33
|
-
*/
|
|
34
|
-
export declare function listV25AdapterTools(): string[];
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var v2_5_exports = {};
|
|
20
|
-
__export(v2_5_exports, {
|
|
21
|
-
getV25Adapter: () => getV25Adapter,
|
|
22
|
-
listV25AdapterTools: () => listV25AdapterTools
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(v2_5_exports);
|
|
25
|
-
var import_get_products = require('./get_products.js');
|
|
26
|
-
var import_create_media_buy = require('./create_media_buy.js');
|
|
27
|
-
var import_update_media_buy = require('./update_media_buy.js');
|
|
28
|
-
var import_sync_creatives = require('./sync_creatives.js');
|
|
29
|
-
var import_list_creative_formats = require('./list_creative_formats.js');
|
|
30
|
-
var import_preview_creative = require('./preview_creative.js');
|
|
31
|
-
const PAIRS = [
|
|
32
|
-
import_get_products.getProductsAdapter,
|
|
33
|
-
import_create_media_buy.createMediaBuyAdapter,
|
|
34
|
-
import_update_media_buy.updateMediaBuyAdapter,
|
|
35
|
-
import_sync_creatives.syncCreativesAdapter,
|
|
36
|
-
import_list_creative_formats.listCreativeFormatsAdapter,
|
|
37
|
-
import_preview_creative.previewCreativeAdapter
|
|
38
|
-
];
|
|
39
|
-
const REGISTRY = new Map(PAIRS.map((p) => [p.toolName, p]));
|
|
40
|
-
function getV25Adapter(toolName) {
|
|
41
|
-
return REGISTRY.get(toolName);
|
|
42
|
-
}
|
|
43
|
-
function listV25AdapterTools() {
|
|
44
|
-
return [...REGISTRY.keys()];
|
|
45
|
-
}
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
getV25Adapter,
|
|
49
|
-
listV25AdapterTools
|
|
50
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { getProductsAdapter } from "./get_products.mjs";
|
|
2
|
-
import { createMediaBuyAdapter } from "./create_media_buy.mjs";
|
|
3
|
-
import { updateMediaBuyAdapter } from "./update_media_buy.mjs";
|
|
4
|
-
import { syncCreativesAdapter } from "./sync_creatives.mjs";
|
|
5
|
-
import { listCreativeFormatsAdapter } from "./list_creative_formats.mjs";
|
|
6
|
-
import { previewCreativeAdapter } from "./preview_creative.mjs";
|
|
7
|
-
const PAIRS = [
|
|
8
|
-
getProductsAdapter,
|
|
9
|
-
createMediaBuyAdapter,
|
|
10
|
-
updateMediaBuyAdapter,
|
|
11
|
-
syncCreativesAdapter,
|
|
12
|
-
listCreativeFormatsAdapter,
|
|
13
|
-
previewCreativeAdapter
|
|
14
|
-
];
|
|
15
|
-
const REGISTRY = new Map(PAIRS.map((p) => [p.toolName, p]));
|
|
16
|
-
function getV25Adapter(toolName) {
|
|
17
|
-
return REGISTRY.get(toolName);
|
|
18
|
-
}
|
|
19
|
-
function listV25AdapterTools() {
|
|
20
|
-
return [...REGISTRY.keys()];
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
getV25Adapter,
|
|
24
|
-
listV25AdapterTools
|
|
25
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ListCreativeFormatsRequest, ListCreativeFormatsResponse } from '../../../types/v2-5/index.mjs';
|
|
2
|
-
import type { AdapterPair } from './types.mjs';
|
|
3
|
-
/**
|
|
4
|
-
* `list_creative_formats` has no v2.5 wire-shape divergence on the request
|
|
5
|
-
* side (pass-through). The response normalizer maps v2.5's older format
|
|
6
|
-
* shape (`format_id` strings, etc.) to the v3 surface.
|
|
7
|
-
*/
|
|
8
|
-
export declare const listCreativeFormatsAdapter: AdapterPair<ListCreativeFormatsRequest, ListCreativeFormatsRequest, ListCreativeFormatsResponse, unknown>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ListCreativeFormatsRequest, ListCreativeFormatsResponse } from '../../../types/v2-5';
|
|
2
|
-
import type { AdapterPair } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* `list_creative_formats` has no v2.5 wire-shape divergence on the request
|
|
5
|
-
* side (pass-through). The response normalizer maps v2.5's older format
|
|
6
|
-
* shape (`format_id` strings, etc.) to the v3 surface.
|
|
7
|
-
*/
|
|
8
|
-
export declare const listCreativeFormatsAdapter: AdapterPair<ListCreativeFormatsRequest, ListCreativeFormatsRequest, ListCreativeFormatsResponse, unknown>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var list_creative_formats_exports = {};
|
|
20
|
-
__export(list_creative_formats_exports, {
|
|
21
|
-
listCreativeFormatsAdapter: () => listCreativeFormatsAdapter
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(list_creative_formats_exports);
|
|
24
|
-
var import_format_renders = require('../../../utils/format-renders.js');
|
|
25
|
-
const listCreativeFormatsAdapter = {
|
|
26
|
-
toolName: "list_creative_formats",
|
|
27
|
-
adaptRequest: (req) => req,
|
|
28
|
-
normalizeResponse: import_format_renders.normalizeFormatsResponse
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
listCreativeFormatsAdapter
|
|
33
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { normalizeFormatsResponse } from "../../../utils/format-renders.mjs";
|
|
2
|
-
const listCreativeFormatsAdapter = {
|
|
3
|
-
toolName: "list_creative_formats",
|
|
4
|
-
adaptRequest: (req) => req,
|
|
5
|
-
normalizeResponse: normalizeFormatsResponse
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
listCreativeFormatsAdapter
|
|
9
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { PreviewCreativeRequest, PreviewCreativeResponse } from '../../../types/v2-5/index.mjs';
|
|
2
|
-
import type { AdapterPair } from './types.mjs';
|
|
3
|
-
export declare const previewCreativeAdapter: AdapterPair<PreviewCreativeRequest, PreviewCreativeRequest, PreviewCreativeResponse, unknown>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { PreviewCreativeRequest, PreviewCreativeResponse } from '../../../types/v2-5';
|
|
2
|
-
import type { AdapterPair } from './types';
|
|
3
|
-
export declare const previewCreativeAdapter: AdapterPair<PreviewCreativeRequest, PreviewCreativeRequest, PreviewCreativeResponse, unknown>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var preview_creative_exports = {};
|
|
20
|
-
__export(preview_creative_exports, {
|
|
21
|
-
previewCreativeAdapter: () => previewCreativeAdapter
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(preview_creative_exports);
|
|
24
|
-
var import_preview_normalizer = require('../../../utils/preview-normalizer.js');
|
|
25
|
-
const previewCreativeAdapter = {
|
|
26
|
-
toolName: "preview_creative",
|
|
27
|
-
adaptRequest: (req) => req,
|
|
28
|
-
normalizeResponse: import_preview_normalizer.normalizePreviewCreativeResponse
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
previewCreativeAdapter
|
|
33
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { normalizePreviewCreativeResponse } from "../../../utils/preview-normalizer.mjs";
|
|
2
|
-
const previewCreativeAdapter = {
|
|
3
|
-
toolName: "preview_creative",
|
|
4
|
-
adaptRequest: (req) => req,
|
|
5
|
-
normalizeResponse: normalizePreviewCreativeResponse
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
previewCreativeAdapter
|
|
9
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { SyncCreativesRequest, SyncCreativesResponse } from '../../../types/v2-5/index.mjs';
|
|
2
|
-
import type { AdapterPair } from './types.mjs';
|
|
3
|
-
/**
|
|
4
|
-
* `sync_creatives` adapter pair. Currently has no v2.5 → v3 response
|
|
5
|
-
* normalizer — sync responses are pass-through. The request adapter strips
|
|
6
|
-
* v3-only fields, converts `status` enum → `approved` boolean, and groups
|
|
7
|
-
* v3 assignment edges into v2.5's creative-keyed package mapping. `assets`
|
|
8
|
-
* passes through with the v3 `asset_type` discriminator stripped because
|
|
9
|
-
* v2.5 does not declare that embedded field and structurally matches assets.
|
|
10
|
-
*/
|
|
11
|
-
export declare const syncCreativesAdapter: AdapterPair<unknown, SyncCreativesRequest, SyncCreativesResponse, unknown>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { SyncCreativesRequest, SyncCreativesResponse } from '../../../types/v2-5';
|
|
2
|
-
import type { AdapterPair } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* `sync_creatives` adapter pair. Currently has no v2.5 → v3 response
|
|
5
|
-
* normalizer — sync responses are pass-through. The request adapter strips
|
|
6
|
-
* v3-only fields, converts `status` enum → `approved` boolean, and groups
|
|
7
|
-
* v3 assignment edges into v2.5's creative-keyed package mapping. `assets`
|
|
8
|
-
* passes through with the v3 `asset_type` discriminator stripped because
|
|
9
|
-
* v2.5 does not declare that embedded field and structurally matches assets.
|
|
10
|
-
*/
|
|
11
|
-
export declare const syncCreativesAdapter: AdapterPair<unknown, SyncCreativesRequest, SyncCreativesResponse, unknown>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var sync_creatives_exports = {};
|
|
20
|
-
__export(sync_creatives_exports, {
|
|
21
|
-
syncCreativesAdapter: () => syncCreativesAdapter
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(sync_creatives_exports);
|
|
24
|
-
var import_sync_creatives_adapter = require('../../../utils/sync-creatives-adapter.js');
|
|
25
|
-
const syncCreativesAdapter = {
|
|
26
|
-
toolName: "sync_creatives",
|
|
27
|
-
adaptRequest: import_sync_creatives_adapter.adaptSyncCreativesRequestForV2
|
|
28
|
-
};
|
|
29
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
-
0 && (module.exports = {
|
|
31
|
-
syncCreativesAdapter
|
|
32
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registry pattern for v3 ↔ v2.5 wire adapters.
|
|
3
|
-
*
|
|
4
|
-
* Each AdCP tool that needs version translation gets its own
|
|
5
|
-
* `AdapterPair<...>`: a request-side `adaptRequest` (v3 → v2.5 wire shape)
|
|
6
|
-
* and an optional response-side `normalizeResponse` (v2.5 wire → v3
|
|
7
|
-
* surface). Pairs live in per-tool modules under this directory and the
|
|
8
|
-
* registry collects them by tool name.
|
|
9
|
-
*
|
|
10
|
-
* **Why a registry**: before, the four request adapters and the four
|
|
11
|
-
* response normalizers lived across three files (`pricing-adapter.ts`,
|
|
12
|
-
* `creative-adapter.ts`, `sync-creatives-adapter.ts`). Adding v2.6 or
|
|
13
|
-
* v3.1 would mean touching all three plus the dispatch switch in
|
|
14
|
-
* `SingleAgentClient`. The registry collapses that to "drop a new file
|
|
15
|
-
* with a typed `AdapterPair`, register it" — a clean (from, to, tool)
|
|
16
|
-
* triple matches the compatibility-matrix mental model.
|
|
17
|
-
*
|
|
18
|
-
* The current cut wraps the existing scattered adapter functions
|
|
19
|
-
* unchanged so we can ship the registry shape without regressions; the
|
|
20
|
-
* underlying logic stays in `utils/*-adapter.ts` files until each pair
|
|
21
|
-
* gets a focused per-tool refactor.
|
|
22
|
-
*/
|
|
23
|
-
export interface AdapterPair<TReq3 = unknown, TReq25 = unknown, TRes25 = unknown, TRes3 = unknown> {
|
|
24
|
-
/** AdCP tool name this pair handles (snake_case, e.g. `get_products`). */
|
|
25
|
-
readonly toolName: string;
|
|
26
|
-
/**
|
|
27
|
-
* v3-shaped request → v2.5 wire shape. Called by
|
|
28
|
-
* `SingleAgentClient.adaptRequestForServerVersion` when the agent is
|
|
29
|
-
* v2-detected. May throw for inputs the v2 wire can't represent
|
|
30
|
-
* (e.g. proposal-mode `create_media_buy` without packages).
|
|
31
|
-
*/
|
|
32
|
-
adaptRequest(req: TReq3): TReq25;
|
|
33
|
-
/**
|
|
34
|
-
* v2.5-shaped response → v3 surface. Optional — if absent, the response
|
|
35
|
-
* is passed through unchanged. Called by
|
|
36
|
-
* `SingleAgentClient.normalizeResponseToV3` after the executor returns.
|
|
37
|
-
*/
|
|
38
|
-
normalizeResponse?(res: TRes25): TRes3;
|
|
39
|
-
}
|