@adcp/sdk 12.1.0 → 13.0.0-rc.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/README.md +19 -3
- package/bin/adcp-fuzz.js +3 -1
- package/dist/lib/adapters/content-standards-adapter.d.mts +9 -9
- package/dist/lib/adapters/content-standards-adapter.d.ts +9 -9
- package/dist/lib/adapters/content-standards-adapter.d.ts.map +1 -1
- package/dist/lib/adapters/content-standards-adapter.js +22 -22
- package/dist/lib/adapters/content-standards-adapter.js.map +1 -1
- package/dist/lib/adapters/content-standards-adapter.mjs +18 -18
- package/dist/lib/adapters/content-standards-adapter.mjs.map +1 -1
- package/dist/lib/adapters/index.d.mts +2 -2
- package/dist/lib/adapters/index.d.ts +2 -2
- package/dist/lib/adapters/index.d.ts.map +1 -1
- package/dist/lib/adapters/index.js +10 -10
- package/dist/lib/adapters/index.js.map +1 -1
- package/dist/lib/adapters/index.mjs +9 -9
- package/dist/lib/adapters/index.mjs.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.d.mts +3 -0
- package/dist/lib/auth/oauth/authorization-required.d.ts +3 -0
- package/dist/lib/auth/oauth/authorization-required.d.ts.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.js +12 -9
- package/dist/lib/auth/oauth/authorization-required.js.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.mjs +12 -9
- package/dist/lib/auth/oauth/authorization-required.mjs.map +1 -1
- package/dist/lib/auth/oauth/provider-cache.d.mts +7 -0
- package/dist/lib/auth/oauth/provider-cache.d.ts +8 -0
- package/dist/lib/auth/oauth/provider-cache.d.ts.map +1 -0
- package/dist/lib/auth/oauth/provider-cache.js +44 -0
- package/dist/lib/auth/oauth/provider-cache.js.map +1 -0
- package/dist/lib/auth/oauth/provider-cache.mjs +19 -0
- package/dist/lib/auth/oauth/provider-cache.mjs.map +1 -0
- package/dist/lib/conformance/invariants/uniformError.js +1 -1
- package/dist/lib/conformance/invariants/uniformError.js.map +1 -1
- package/dist/lib/conformance/invariants/uniformError.mjs +1 -1
- package/dist/lib/conformance/invariants/uniformError.mjs.map +1 -1
- package/dist/lib/conformance/runners.js +1 -1
- package/dist/lib/conformance/runners.js.map +1 -1
- package/dist/lib/conformance/runners.mjs +1 -1
- package/dist/lib/conformance/runners.mjs.map +1 -1
- package/dist/lib/conformance/seeder.js +5 -5
- package/dist/lib/conformance/seeder.js.map +1 -1
- package/dist/lib/conformance/seeder.mjs +5 -5
- package/dist/lib/conformance/seeder.mjs.map +1 -1
- package/dist/lib/core/ADCPMultiAgentClient.d.mts +26 -29
- package/dist/lib/core/ADCPMultiAgentClient.d.ts +26 -29
- package/dist/lib/core/ADCPMultiAgentClient.d.ts.map +1 -1
- package/dist/lib/core/ADCPMultiAgentClient.js +27 -19
- package/dist/lib/core/ADCPMultiAgentClient.js.map +1 -1
- package/dist/lib/core/ADCPMultiAgentClient.mjs +27 -19
- package/dist/lib/core/ADCPMultiAgentClient.mjs.map +1 -1
- package/dist/lib/core/AgentClient.d.mts +148 -138
- package/dist/lib/core/AgentClient.d.ts +148 -138
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/AgentClient.js +174 -85
- package/dist/lib/core/AgentClient.js.map +1 -1
- package/dist/lib/core/AgentClient.mjs +174 -85
- package/dist/lib/core/AgentClient.mjs.map +1 -1
- package/dist/lib/core/AsyncHandler.d.mts +18 -16
- package/dist/lib/core/AsyncHandler.d.ts +18 -16
- package/dist/lib/core/AsyncHandler.d.ts.map +1 -1
- package/dist/lib/core/AsyncHandler.js +22 -1
- package/dist/lib/core/AsyncHandler.js.map +1 -1
- package/dist/lib/core/AsyncHandler.mjs +22 -1
- package/dist/lib/core/AsyncHandler.mjs.map +1 -1
- package/dist/lib/core/ConversationTypes.d.mts +6 -2
- package/dist/lib/core/ConversationTypes.d.ts +6 -2
- package/dist/lib/core/ConversationTypes.d.ts.map +1 -1
- package/dist/lib/core/ConversationTypes.js.map +1 -1
- package/dist/lib/core/CreativeAgentClient.d.mts +41 -17
- package/dist/lib/core/CreativeAgentClient.d.ts +41 -17
- package/dist/lib/core/CreativeAgentClient.d.ts.map +1 -1
- package/dist/lib/core/CreativeAgentClient.js +39 -12
- package/dist/lib/core/CreativeAgentClient.js.map +1 -1
- package/dist/lib/core/CreativeAgentClient.mjs +39 -12
- package/dist/lib/core/CreativeAgentClient.mjs.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.mts +129 -52
- package/dist/lib/core/SingleAgentClient.d.ts +129 -52
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +1748 -218
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/SingleAgentClient.mjs +1758 -218
- package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
- package/dist/lib/core/TaskExecutor.d.mts +9 -0
- package/dist/lib/core/TaskExecutor.d.ts +9 -0
- package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
- package/dist/lib/core/TaskExecutor.js +137 -44
- package/dist/lib/core/TaskExecutor.js.map +1 -1
- package/dist/lib/core/TaskExecutor.mjs +137 -44
- package/dist/lib/core/TaskExecutor.mjs.map +1 -1
- package/dist/lib/index.d.mts +111 -17
- package/dist/lib/index.d.ts +111 -17
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +94 -94
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +93 -94
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/net/ssrf-fetch.d.mts +13 -1
- package/dist/lib/net/ssrf-fetch.d.ts +13 -1
- package/dist/lib/net/ssrf-fetch.d.ts.map +1 -1
- package/dist/lib/net/ssrf-fetch.js +14 -7
- package/dist/lib/net/ssrf-fetch.js.map +1 -1
- package/dist/lib/net/ssrf-fetch.mjs +14 -7
- package/dist/lib/net/ssrf-fetch.mjs.map +1 -1
- package/dist/lib/protocols/a2a.d.mts +2 -2
- package/dist/lib/protocols/a2a.d.ts +2 -2
- package/dist/lib/protocols/a2a.d.ts.map +1 -1
- package/dist/lib/protocols/a2a.js +14 -9
- package/dist/lib/protocols/a2a.js.map +1 -1
- package/dist/lib/protocols/a2a.mjs +14 -9
- package/dist/lib/protocols/a2a.mjs.map +1 -1
- package/dist/lib/protocols/index.d.mts +20 -3
- package/dist/lib/protocols/index.d.ts +20 -3
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +44 -31
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/index.mjs +44 -32
- package/dist/lib/protocols/index.mjs.map +1 -1
- package/dist/lib/protocols/mcp-modern.d.ts.map +1 -1
- package/dist/lib/protocols/mcp-modern.js +87 -12
- package/dist/lib/protocols/mcp-modern.js.map +1 -1
- package/dist/lib/protocols/mcp-modern.mjs +89 -12
- package/dist/lib/protocols/mcp-modern.mjs.map +1 -1
- package/dist/lib/protocols/mcp-tasks.d.mts +3 -0
- package/dist/lib/protocols/mcp-tasks.d.ts +3 -0
- package/dist/lib/protocols/mcp-tasks.d.ts.map +1 -1
- package/dist/lib/protocols/mcp-tasks.js +21 -11
- package/dist/lib/protocols/mcp-tasks.js.map +1 -1
- package/dist/lib/protocols/mcp-tasks.mjs +21 -11
- package/dist/lib/protocols/mcp-tasks.mjs.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/create-adcp-server.d.mts +6 -0
- package/dist/lib/server/create-adcp-server.d.ts +6 -0
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +295 -48
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/create-adcp-server.mjs +301 -50
- package/dist/lib/server/create-adcp-server.mjs.map +1 -1
- package/dist/lib/server/decisioning/assembly-helpers.d.mts +27 -13
- package/dist/lib/server/decisioning/assembly-helpers.d.ts +27 -13
- package/dist/lib/server/decisioning/assembly-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/assembly-helpers.js +136 -14
- package/dist/lib/server/decisioning/assembly-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/assembly-helpers.mjs +134 -13
- package/dist/lib/server/decisioning/assembly-helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/index.d.mts +13 -12
- package/dist/lib/server/decisioning/index.d.ts +13 -12
- package/dist/lib/server/decisioning/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.js +6 -0
- package/dist/lib/server/decisioning/index.js.map +1 -1
- package/dist/lib/server/decisioning/index.mjs +9 -3
- package/dist/lib/server/decisioning/index.mjs.map +1 -1
- package/dist/lib/server/decisioning/list-helpers.d.mts +13 -3
- package/dist/lib/server/decisioning/list-helpers.d.ts +13 -3
- package/dist/lib/server/decisioning/list-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/list-helpers.js +13 -3
- package/dist/lib/server/decisioning/list-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/list-helpers.mjs +11 -2
- package/dist/lib/server/decisioning/list-helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.d.mts +5 -3
- package/dist/lib/server/decisioning/manifest-helpers.d.ts +5 -3
- package/dist/lib/server/decisioning/manifest-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.d.mts +2 -2
- package/dist/lib/server/decisioning/proposal/dispatch.d.ts +2 -2
- package/dist/lib/server/decisioning/proposal/dispatch.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/index.d.mts +1 -1
- package/dist/lib/server/decisioning/proposal/index.d.ts +1 -1
- package/dist/lib/server/decisioning/proposal/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/index.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/index.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/lifecycle.d.mts +3 -2
- package/dist/lib/server/decisioning/proposal/lifecycle.d.ts +3 -2
- package/dist/lib/server/decisioning/proposal/lifecycle.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/lifecycle.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/lifecycle.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/mock-manager.d.mts +3 -3
- package/dist/lib/server/decisioning/proposal/mock-manager.d.ts +3 -3
- package/dist/lib/server/decisioning/proposal/mock-manager.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/mock-manager.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/mock-manager.mjs.map +1 -1
- package/dist/lib/server/decisioning/proposal/types.d.mts +10 -6
- package/dist/lib/server/decisioning/proposal/types.d.ts +10 -6
- package/dist/lib/server/decisioning/proposal/types.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/types.js.map +1 -1
- package/dist/lib/server/decisioning/proposal/types.mjs.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +21 -2
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +21 -2
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +754 -81
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +763 -81
- package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.mts +9 -9
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +9 -9
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/content-standards.d.mts +16 -16
- package/dist/lib/server/decisioning/specialisms/content-standards.d.ts +16 -16
- package/dist/lib/server/decisioning/specialisms/content-standards.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/content-standards.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.mts +15 -13
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +15 -13
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative.d.mts +12 -11
- package/dist/lib/server/decisioning/specialisms/creative.d.ts +12 -11
- package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.d.mts +25 -15
- package/dist/lib/server/decisioning/specialisms/sales.d.ts +25 -15
- package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -1
- package/dist/lib/server/index.d.mts +3 -3
- package/dist/lib/server/index.d.ts +3 -3
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +72 -72
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/index.mjs +36 -36
- package/dist/lib/server/index.mjs.map +1 -1
- package/dist/lib/server/legacy/v5/index.d.mts +1 -0
- package/dist/lib/server/legacy/v5/index.d.ts +1 -0
- package/dist/lib/server/legacy/v5/index.d.ts.map +1 -1
- package/dist/lib/server/legacy/v5/index.js +74 -1
- package/dist/lib/server/legacy/v5/index.js.map +1 -1
- package/dist/lib/server/legacy/v5/index.mjs +75 -1
- package/dist/lib/server/legacy/v5/index.mjs.map +1 -1
- package/dist/lib/server/responses.d.mts +2 -2
- package/dist/lib/server/responses.d.ts +2 -2
- package/dist/lib/server/responses.js.map +1 -1
- package/dist/lib/server/responses.mjs.map +1 -1
- package/dist/lib/testing/client.d.ts.map +1 -1
- package/dist/lib/testing/client.js +13 -5
- package/dist/lib/testing/client.js.map +1 -1
- package/dist/lib/testing/client.mjs +13 -5
- package/dist/lib/testing/client.mjs.map +1 -1
- package/dist/lib/testing/compliance/comply.d.mts +1 -1
- package/dist/lib/testing/compliance/comply.d.ts +1 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +16 -6
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/comply.mjs +16 -6
- package/dist/lib/testing/compliance/comply.mjs.map +1 -1
- package/dist/lib/testing/scenarios/brand-rights.js +6 -6
- package/dist/lib/testing/scenarios/brand-rights.js.map +1 -1
- package/dist/lib/testing/scenarios/brand-rights.mjs +6 -6
- package/dist/lib/testing/scenarios/brand-rights.mjs.map +1 -1
- package/dist/lib/testing/scenarios/creative.js +7 -7
- package/dist/lib/testing/scenarios/creative.js.map +1 -1
- package/dist/lib/testing/scenarios/creative.mjs +7 -7
- package/dist/lib/testing/scenarios/creative.mjs.map +1 -1
- package/dist/lib/testing/scenarios/discovery.js +2 -2
- package/dist/lib/testing/scenarios/discovery.js.map +1 -1
- package/dist/lib/testing/scenarios/discovery.mjs +2 -2
- package/dist/lib/testing/scenarios/discovery.mjs.map +1 -1
- package/dist/lib/testing/scenarios/edge-cases.js +11 -11
- package/dist/lib/testing/scenarios/edge-cases.js.map +1 -1
- package/dist/lib/testing/scenarios/edge-cases.mjs +11 -11
- package/dist/lib/testing/scenarios/edge-cases.mjs.map +1 -1
- package/dist/lib/testing/scenarios/governance.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/governance.js +16 -22
- package/dist/lib/testing/scenarios/governance.js.map +1 -1
- package/dist/lib/testing/scenarios/governance.mjs +16 -22
- package/dist/lib/testing/scenarios/governance.mjs.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.js +5 -5
- package/dist/lib/testing/scenarios/media-buy.js.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.mjs +5 -5
- package/dist/lib/testing/scenarios/media-buy.mjs.map +1 -1
- package/dist/lib/testing/scenarios/schema-compliance.js +1 -1
- package/dist/lib/testing/scenarios/schema-compliance.js.map +1 -1
- package/dist/lib/testing/scenarios/schema-compliance.mjs +1 -1
- package/dist/lib/testing/scenarios/schema-compliance.mjs.map +1 -1
- package/dist/lib/testing/scenarios/trusted-match.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/trusted-match.js +4 -3
- package/dist/lib/testing/scenarios/trusted-match.js.map +1 -1
- package/dist/lib/testing/scenarios/trusted-match.mjs +4 -3
- package/dist/lib/testing/scenarios/trusted-match.mjs.map +1 -1
- package/dist/lib/testing/storyboard/probes.d.mts +6 -0
- package/dist/lib/testing/storyboard/probes.d.ts +6 -0
- package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/probes.js +16 -5
- package/dist/lib/testing/storyboard/probes.js.map +1 -1
- package/dist/lib/testing/storyboard/probes.mjs +16 -5
- package/dist/lib/testing/storyboard/probes.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +6 -2
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +6 -2
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/storyboard/shape-drift-hints.d.mts +3 -4
- package/dist/lib/testing/storyboard/shape-drift-hints.d.ts +3 -4
- package/dist/lib/testing/storyboard/shape-drift-hints.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/shape-drift-hints.js +27 -27
- package/dist/lib/testing/storyboard/shape-drift-hints.js.map +1 -1
- package/dist/lib/testing/storyboard/shape-drift-hints.mjs +27 -27
- package/dist/lib/testing/storyboard/shape-drift-hints.mjs.map +1 -1
- package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/task-map.js +43 -5
- package/dist/lib/testing/storyboard/task-map.js.map +1 -1
- package/dist/lib/testing/storyboard/task-map.mjs +43 -5
- package/dist/lib/testing/storyboard/task-map.mjs.map +1 -1
- package/dist/lib/testing/test-helpers.d.mts +2 -2
- package/dist/lib/testing/test-helpers.d.ts +2 -2
- package/dist/lib/testing/test-helpers.js.map +1 -1
- package/dist/lib/testing/test-helpers.mjs.map +1 -1
- package/dist/lib/testing/types.d.mts +7 -1
- package/dist/lib/testing/types.d.ts +7 -1
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/testing/types.js.map +1 -1
- package/dist/lib/types/adcp.d.mts +14 -14
- package/dist/lib/types/adcp.d.ts +14 -14
- package/dist/lib/types/adcp.d.ts.map +1 -1
- package/dist/lib/types/adcp.js.map +1 -1
- package/dist/lib/types/adcp.mjs.map +1 -1
- package/dist/lib/types/index.d.mts +2 -2
- package/dist/lib/types/index.d.ts +2 -2
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/index.mjs.map +1 -1
- package/dist/lib/utils/capabilities.d.mts +6 -0
- package/dist/lib/utils/capabilities.d.ts +6 -0
- package/dist/lib/utils/capabilities.d.ts.map +1 -1
- package/dist/lib/utils/capabilities.js +4 -0
- package/dist/lib/utils/capabilities.js.map +1 -1
- package/dist/lib/utils/capabilities.mjs +4 -0
- package/dist/lib/utils/capabilities.mjs.map +1 -1
- package/dist/lib/utils/creative-delivery.d.mts +52 -10
- package/dist/lib/utils/creative-delivery.d.ts +52 -10
- package/dist/lib/utils/creative-delivery.d.ts.map +1 -1
- package/dist/lib/utils/creative-delivery.js +104 -9
- package/dist/lib/utils/creative-delivery.js.map +1 -1
- package/dist/lib/utils/creative-delivery.mjs +104 -8
- package/dist/lib/utils/creative-delivery.mjs.map +1 -1
- package/dist/lib/utils/format-assets.d.mts +41 -38
- package/dist/lib/utils/format-assets.d.ts +41 -38
- package/dist/lib/utils/format-assets.d.ts.map +1 -1
- package/dist/lib/utils/format-assets.js +3 -1
- package/dist/lib/utils/format-assets.js.map +1 -1
- package/dist/lib/utils/format-assets.mjs +3 -1
- package/dist/lib/utils/format-assets.mjs.map +1 -1
- package/dist/lib/utils/index.d.mts +8 -8
- package/dist/lib/utils/index.d.ts +8 -8
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/index.js +11 -9
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/index.mjs +9 -8
- package/dist/lib/utils/index.mjs.map +1 -1
- package/dist/lib/utils/preview-utils.d.mts +11 -8
- package/dist/lib/utils/preview-utils.d.ts +11 -8
- package/dist/lib/utils/preview-utils.d.ts.map +1 -1
- package/dist/lib/utils/preview-utils.js +4 -4
- package/dist/lib/utils/preview-utils.js.map +1 -1
- package/dist/lib/utils/preview-utils.mjs +3 -3
- package/dist/lib/utils/preview-utils.mjs.map +1 -1
- package/dist/lib/utils/tool-request-schemas.d.mts +2 -2
- package/dist/lib/utils/tool-request-schemas.d.ts +2 -2
- package/dist/lib/v2/projection/aao-reference-formats.json +492 -0
- package/dist/lib/v2/projection/augment-response.d.mts +31 -11
- package/dist/lib/v2/projection/augment-response.d.ts +31 -11
- package/dist/lib/v2/projection/augment-response.d.ts.map +1 -1
- package/dist/lib/v2/projection/augment-response.js +233 -27
- package/dist/lib/v2/projection/augment-response.js.map +1 -1
- package/dist/lib/v2/projection/augment-response.mjs +232 -27
- package/dist/lib/v2/projection/augment-response.mjs.map +1 -1
- package/dist/lib/v2/projection/builders.d.mts +7 -6
- package/dist/lib/v2/projection/builders.d.ts +7 -6
- package/dist/lib/v2/projection/builders.d.ts.map +1 -1
- package/dist/lib/v2/projection/builders.js +11 -8
- package/dist/lib/v2/projection/builders.js.map +1 -1
- package/dist/lib/v2/projection/builders.mjs +9 -6
- package/dist/lib/v2/projection/builders.mjs.map +1 -1
- package/dist/lib/v2/projection/catalog-snapshot.d.mts +47 -0
- package/dist/lib/v2/projection/catalog-snapshot.d.ts +48 -0
- package/dist/lib/v2/projection/catalog-snapshot.d.ts.map +1 -0
- package/dist/lib/v2/projection/catalog-snapshot.js +291 -0
- package/dist/lib/v2/projection/catalog-snapshot.js.map +1 -0
- package/dist/lib/v2/projection/catalog-snapshot.mjs +265 -0
- package/dist/lib/v2/projection/catalog-snapshot.mjs.map +1 -0
- package/dist/lib/v2/projection/catalog.d.mts +23 -2
- package/dist/lib/v2/projection/catalog.d.ts +23 -2
- package/dist/lib/v2/projection/catalog.d.ts.map +1 -1
- package/dist/lib/v2/projection/catalog.js +34 -10
- package/dist/lib/v2/projection/catalog.js.map +1 -1
- package/dist/lib/v2/projection/catalog.mjs +33 -10
- package/dist/lib/v2/projection/catalog.mjs.map +1 -1
- package/dist/lib/v2/projection/creative-delivery.d.mts +157 -0
- package/dist/lib/v2/projection/creative-delivery.d.ts +158 -0
- package/dist/lib/v2/projection/creative-delivery.d.ts.map +1 -0
- package/dist/lib/v2/projection/creative-delivery.js +967 -0
- package/dist/lib/v2/projection/creative-delivery.js.map +1 -0
- package/dist/lib/v2/projection/creative-delivery.mjs +941 -0
- package/dist/lib/v2/projection/creative-delivery.mjs.map +1 -0
- package/dist/lib/v2/projection/index.d.mts +8 -6
- package/dist/lib/v2/projection/index.d.ts +8 -6
- package/dist/lib/v2/projection/index.d.ts.map +1 -1
- package/dist/lib/v2/projection/index.js +26 -4
- package/dist/lib/v2/projection/index.js.map +1 -1
- package/dist/lib/v2/projection/index.mjs +28 -4
- package/dist/lib/v2/projection/index.mjs.map +1 -1
- package/dist/lib/v2/projection/legacy-metadata.d.mts +21 -0
- package/dist/lib/v2/projection/legacy-metadata.d.ts +22 -0
- package/dist/lib/v2/projection/legacy-metadata.d.ts.map +1 -0
- package/dist/lib/v2/projection/legacy-metadata.js +73 -0
- package/dist/lib/v2/projection/legacy-metadata.js.map +1 -0
- package/dist/lib/v2/projection/legacy-metadata.mjs +45 -0
- package/dist/lib/v2/projection/legacy-metadata.mjs.map +1 -0
- package/dist/lib/v2/projection/types.d.mts +29 -23
- package/dist/lib/v2/projection/types.d.ts +29 -23
- package/dist/lib/v2/projection/types.d.ts.map +1 -1
- package/dist/lib/v2/projection/types.js.map +1 -1
- package/dist/lib/v2/projection/v1-to-v2.d.mts +29 -6
- package/dist/lib/v2/projection/v1-to-v2.d.ts +29 -6
- package/dist/lib/v2/projection/v1-to-v2.d.ts.map +1 -1
- package/dist/lib/v2/projection/v1-to-v2.js +218 -9
- package/dist/lib/v2/projection/v1-to-v2.js.map +1 -1
- package/dist/lib/v2/projection/v1-to-v2.mjs +219 -10
- package/dist/lib/v2/projection/v1-to-v2.mjs.map +1 -1
- package/dist/lib/v2/projection/v2-to-v1.d.mts +31 -2
- package/dist/lib/v2/projection/v2-to-v1.d.ts +31 -2
- package/dist/lib/v2/projection/v2-to-v1.d.ts.map +1 -1
- package/dist/lib/v2/projection/v2-to-v1.js +138 -7
- package/dist/lib/v2/projection/v2-to-v1.js.map +1 -1
- package/dist/lib/v2/projection/v2-to-v1.mjs +135 -6
- package/dist/lib/v2/projection/v2-to-v1.mjs.map +1 -1
- package/dist/lib/v2/projection/write-side.d.mts +12 -13
- package/dist/lib/v2/projection/write-side.d.ts +12 -13
- package/dist/lib/v2/projection/write-side.d.ts.map +1 -1
- package/dist/lib/v2/projection/write-side.js +16 -12
- package/dist/lib/v2/projection/write-side.js.map +1 -1
- package/dist/lib/v2/projection/write-side.mjs +16 -12
- package/dist/lib/v2/projection/write-side.mjs.map +1 -1
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.js.map +1 -1
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/version.mjs.map +1 -1
- package/docs/guides/BUILD-AN-AGENT.md +7 -2
- package/docs/guides/PREVIEW-ASSET-DURABILITY.md +6 -2
- package/docs/llms.txt +1 -0
- package/examples/README.md +1 -1
- package/examples/batch-preview-test.ts +3 -3
- package/examples/conversation-client.ts +2 -2
- package/examples/debug-preview-response.ts +1 -1
- package/examples/decisioning-platform-broadcast-tv.ts +10 -4
- package/examples/decisioning-platform-mock-seller.ts +16 -9
- package/examples/decisioning-platform-programmatic.ts +18 -7
- package/examples/error-compliant-server.ts +26 -16
- package/examples/generative-creative-demo.ts +7 -19
- package/examples/hello_creative_adapter_ad_server.ts +37 -16
- package/examples/hello_creative_adapter_template.ts +12 -10
- package/examples/hello_seller_adapter_guaranteed.ts +52 -23
- package/examples/hello_seller_adapter_multi_tenant.ts +6 -3
- package/examples/hello_seller_adapter_non_guaranteed.ts +54 -26
- package/examples/hello_seller_adapter_proposal_mode.ts +40 -14
- package/examples/hello_seller_adapter_social.ts +2 -7
- package/examples/inspect-card-formats.ts +1 -1
- package/examples/simple-getting-started.ts +1 -1
- package/examples/test-helpers-demo.ts +1 -1
- package/package.json +2 -2
- package/skills/build-decisioning-creative-template/SKILL.md +11 -11
- package/skills/build-decisioning-platform/advanced/REFERENCE.md +8 -2
|
@@ -5,16 +5,25 @@ const __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));
|
|
|
5
5
|
const require2 = __adcpCreateRequire(import.meta.url);
|
|
6
6
|
import { readFileSync, existsSync } from "fs";
|
|
7
7
|
import path from "path";
|
|
8
|
-
|
|
8
|
+
import { AAO_CANONICAL_AGENT_URL } from "./constants.mjs";
|
|
9
|
+
import { canonicalizeAgentUrl } from "../../discovery/resolve-agent-properties.mjs";
|
|
10
|
+
const cachedByPath = /* @__PURE__ */ new Map();
|
|
11
|
+
const AAO_LEGACY_AGENT_URL_ALIASES = /* @__PURE__ */ new Set([
|
|
12
|
+
// Early AAO reference implementations, including Optimera's deployed
|
|
13
|
+
// catalog, used the protocol root before creative.adcontextprotocol.org
|
|
14
|
+
// became the canonical format-agent host.
|
|
15
|
+
"https://adcontextprotocol.org/"
|
|
16
|
+
]);
|
|
9
17
|
function normalizeAgentUrl(u) {
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
const canonical = canonicalizeAgentUrl(u);
|
|
19
|
+
if (canonical === null) return void 0;
|
|
20
|
+
return AAO_LEGACY_AGENT_URL_ALIASES.has(canonical) ? AAO_CANONICAL_AGENT_URL : canonical;
|
|
12
21
|
}
|
|
13
22
|
function indexKey(agentUrl, id) {
|
|
14
|
-
|
|
23
|
+
const normalized = normalizeAgentUrl(agentUrl);
|
|
24
|
+
return normalized === void 0 ? void 0 : `${normalized}::${id}`;
|
|
15
25
|
}
|
|
16
26
|
function loadCatalog(explicitPath) {
|
|
17
|
-
if (cached) return cached;
|
|
18
27
|
const candidates = explicitPath ? [explicitPath] : [
|
|
19
28
|
path.join(__dirname, "aao-reference-formats.json"),
|
|
20
29
|
path.join(
|
|
@@ -31,15 +40,22 @@ function loadCatalog(explicitPath) {
|
|
|
31
40
|
];
|
|
32
41
|
for (const file of candidates) {
|
|
33
42
|
if (existsSync(file)) {
|
|
43
|
+
const cached = cachedByPath.get(file);
|
|
44
|
+
if (cached) return cached;
|
|
34
45
|
const raw = JSON.parse(readFileSync(file, "utf-8"));
|
|
35
46
|
const byKey = /* @__PURE__ */ new Map();
|
|
47
|
+
const byUniqueId = /* @__PURE__ */ new Map();
|
|
36
48
|
for (const entry of raw) {
|
|
37
49
|
if (entry?.format_id?.agent_url && entry?.format_id?.id) {
|
|
38
|
-
|
|
50
|
+
const key = indexKey(entry.format_id.agent_url, entry.format_id.id);
|
|
51
|
+
if (key !== void 0) byKey.set(key, entry);
|
|
52
|
+
if (byUniqueId.has(entry.format_id.id)) byUniqueId.set(entry.format_id.id, null);
|
|
53
|
+
else byUniqueId.set(entry.format_id.id, entry);
|
|
39
54
|
}
|
|
40
55
|
}
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
const compiled = { byKey, byUniqueId, entries: raw };
|
|
57
|
+
cachedByPath.set(file, compiled);
|
|
58
|
+
return compiled;
|
|
43
59
|
}
|
|
44
60
|
}
|
|
45
61
|
throw new Error(
|
|
@@ -48,10 +64,15 @@ function loadCatalog(explicitPath) {
|
|
|
48
64
|
}
|
|
49
65
|
function lookupV1Format(formatId, explicitPath) {
|
|
50
66
|
const catalog = loadCatalog(explicitPath);
|
|
51
|
-
|
|
67
|
+
const key = indexKey(formatId.agent_url, formatId.id);
|
|
68
|
+
return key === void 0 ? void 0 : catalog.byKey.get(key);
|
|
69
|
+
}
|
|
70
|
+
function lookupUniqueV1FormatById(id, explicitPath) {
|
|
71
|
+
const match = loadCatalog(explicitPath).byUniqueId.get(id);
|
|
72
|
+
return match ?? void 0;
|
|
52
73
|
}
|
|
53
74
|
function _resetCatalogCache() {
|
|
54
|
-
|
|
75
|
+
cachedByPath.clear();
|
|
55
76
|
}
|
|
56
77
|
const SIZED_ID_RE = /^([a-z]+)_(\d+)x(\d+)_([a-z]+)$/;
|
|
57
78
|
function parseSizedIdTemplate(id) {
|
|
@@ -62,6 +83,7 @@ function parseSizedIdTemplate(id) {
|
|
|
62
83
|
function findCatalogEntryByCanonicalAndSize(canonical, width, height, agentUrl, options) {
|
|
63
84
|
const catalog = loadCatalog(options?.explicitPath);
|
|
64
85
|
const normalizedAgentUrl = normalizeAgentUrl(agentUrl);
|
|
86
|
+
if (normalizedAgentUrl === void 0) return void 0;
|
|
65
87
|
for (const entry of catalog.entries) {
|
|
66
88
|
if (entry.canonical?.kind !== canonical) continue;
|
|
67
89
|
if (!entry.format_id?.id || !entry.format_id?.agent_url) continue;
|
|
@@ -81,6 +103,7 @@ export {
|
|
|
81
103
|
_resetCatalogCache,
|
|
82
104
|
findCatalogEntryByCanonicalAndSize,
|
|
83
105
|
loadCatalog,
|
|
106
|
+
lookupUniqueV1FormatById,
|
|
84
107
|
lookupV1Format,
|
|
85
108
|
parseSizedIdTemplate
|
|
86
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/v2/projection/catalog.ts"],"sourcesContent":["import { fileURLToPath as __adcpFileURLToPath } from 'node:url';\nimport { dirname as __adcpDirname } from 'node:path';\nimport { createRequire as __adcpCreateRequire } from 'node:module';\nconst __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));\nconst require = __adcpCreateRequire(import.meta.url);\n/**\n * Loader for the AAO canonical-formats catalog (`reference-formats.json`).\n * Source of truth: `server/src/creative-agent/reference-formats.json` in\n * the adcontextprotocol/adcp repo — published by the AAO with the\n * `canonical` annotation on entries that have a v2 canonical-format\n * equivalent.\n *\n * The catalog is the v1→v2 direction's primary lookup table: each entry\n * is a v1 format definition, and 32 of the 57 entries in 3.1-beta carry\n * a `canonical: <kind>` annotation that names the v2 canonical the v1\n * format projects to. This is the spec's resolution-order step 2 —\n * \"seller-asserted on the v1 file\" — applied to AAO-published v1 formats.\n *\n * Loader is keyed by `agent_url` (with trailing-slash normalization) +\n * `format_id.id`. Same scope as the v2→v1 registry: AAO catalog only.\n * Seller-specific catalogs (from a publisher's\n * `list_creative_formats`) are out of scope for the prototype — the\n * full 8.0 enablement would fetch them via an `AgentClient` injected\n * by the auto-negotiation surface.\n */\n\nimport { readFileSync, existsSync } from 'fs';\nimport path from 'path';\nimport type { CanonicalFormatKind, V1FormatId } from './types';\n\n/**\n * Canonical projection reference (`canonical-projection-ref.json` in the\n * 3.1 spec). Always object-shaped: required `kind` + optional\n * `asset_source` + optional `slots_override`. Carries the v2 canonical-\n * format projection for a v1 catalog entry. Generative-AI v1 entries\n * use the rich form (`asset_source: 'agent_synthesized'` +\n * slots_override) so the v2 declaration produced from them carries the\n * generative contract; standard entries use the minimal form\n * (`{ kind }`) and inherit the canonical's default slots.\n */\nexport interface CanonicalProjectionRef {\n kind: CanonicalFormatKind;\n /** Narrows how the asset is produced (e.g., agent_synthesized for AI generation, buyer_uploaded for native). */\n asset_source?: 'agent_synthesized' | 'buyer_uploaded' | string;\n /** When set, replaces the canonical's default slots with these specifics. */\n slots_override?: Array<{\n asset_group_id: string;\n asset_type?: string;\n required?: boolean;\n [k: string]: unknown;\n }>;\n}\n\n/**\n * v1 format definition shape from `reference-formats.json`. Only carries\n * the fields the projection algorithm reads — name/description and the\n * full asset/macro/requirement bodies are passed through opaquely when\n * the caller wants them.\n */\nexport interface V1FormatDefinition {\n format_id: V1FormatId;\n name?: string;\n description?: string;\n type?: string;\n accepts_parameters?: string[];\n assets?: Array<{\n item_type?: string;\n asset_id?: string;\n required?: boolean;\n asset_type?: string;\n requirements?: Record<string, unknown>;\n }>;\n /**\n * v2 canonical projection. Always object-shaped per\n * `canonical-projection-ref.json`. Absent on entries that have no\n * v2 mapping yet (none at 3.1.0-beta.1 GA — the AAO catalog is\n * 100% annotated; absence is reserved for future un-blessed entries).\n */\n canonical?: CanonicalProjectionRef;\n // Pass-through for caller code that wants the rest.\n [k: string]: unknown;\n}\n\ninterface CatalogIndex {\n /** Keyed by `<normalized-agent-url>::<id>` for O(1) lookup. */\n byKey: Map<string, V1FormatDefinition>;\n entries: V1FormatDefinition[];\n}\n\nlet cached: CatalogIndex | null = null;\n\n/**\n * Normalize agent_url for indexing. Adds trailing slash when missing.\n * The AAO publishes the canonical form as `https://creative.adcontextprotocol.org/`\n * (with slash); some v2 fixtures use the no-slash form. Both refer to\n * the same agent; this lookup folds them.\n */\nfunction normalizeAgentUrl(u: string): string {\n if (!u) return u;\n return u.endsWith('/') ? u : u + '/';\n}\n\nfunction indexKey(agentUrl: string, id: string): string {\n return `${normalizeAgentUrl(agentUrl)}::${id}`;\n}\n\n/**\n * Load the catalog from a known path. Resolution order:\n *\n * 1. Caller-supplied `explicitPath` (test hook).\n * 2. Adjacent to the compiled loader — `dist/lib/v2/projection/\n * aao-reference-formats.json`. This is the path that ships in the\n * published npm tarball; `scripts/copy-v2-projection-catalog.ts`\n * vendors the file here during `build:lib`.\n * 3. Source-tree test fixture at\n * `test/lib/v2-projection-fixtures/aao-reference-formats.json`,\n * relative to the loader's source location. Used when running from\n * a source checkout (e.g., `tsx` / vitest) before `build:lib`.\n *\n * Memoized — catalog is small and immutable per spec version.\n *\n * @param explicitPath caller-supplied path; takes precedence over\n * fallback resolution.\n */\nexport function loadCatalog(explicitPath?: string): CatalogIndex {\n if (cached) return cached;\n\n const candidates = explicitPath\n ? [explicitPath]\n : [\n path.join(__dirname, 'aao-reference-formats.json'),\n path.join(\n __dirname,\n '..',\n '..',\n '..',\n '..',\n 'test',\n 'lib',\n 'v2-projection-fixtures',\n 'aao-reference-formats.json'\n ),\n ];\n\n for (const file of candidates) {\n if (existsSync(file)) {\n const raw = JSON.parse(readFileSync(file, 'utf-8')) as V1FormatDefinition[];\n const byKey = new Map<string, V1FormatDefinition>();\n for (const entry of raw) {\n if (entry?.format_id?.agent_url && entry?.format_id?.id) {\n byKey.set(indexKey(entry.format_id.agent_url, entry.format_id.id), entry);\n }\n }\n cached = { byKey, entries: raw };\n return cached;\n }\n }\n\n throw new Error(\n `AAO catalog (aao-reference-formats.json) not found. Looked in: ${candidates.join(', ')}. ` +\n `This indicates a corrupted @adcp/sdk install or an SDK packaging regression — ` +\n `please file an issue at https://github.com/adcontextprotocol/adcp-client/issues with ` +\n `your install method (npm/yarn/pnpm) and Node version. ` +\n `If you're working from a source checkout, run \\`npm run build:lib\\` first.`\n );\n}\n\n/**\n * Look up a v1 format definition by its format_id. Returns undefined\n * when not in the catalog — caller falls through to registry / structural\n * match per the resolution order.\n */\nexport function lookupV1Format(formatId: V1FormatId, explicitPath?: string): V1FormatDefinition | undefined {\n const catalog = loadCatalog(explicitPath);\n return catalog.byKey.get(indexKey(formatId.agent_url, formatId.id));\n}\n\n/** Test hook: reset the memoized catalog. */\nexport function _resetCatalogCache(): void {\n cached = null;\n}\n\n/**\n * Find a catalog entry matching `(canonical, width, height)` at the same\n * publisher domain as `agentUrl`. Used by the v2 → v1 multi-size fan-out:\n * when a v2 declaration says `sizes: [W1×H1, W2×H2, ...]` and the\n * seller-asserted `v1_format_ref` points at the catalog entry for one of\n * those sizes, the SDK can look up the entries for the OTHER sizes and\n * emit additional v1 format_ids — giving v1 buyers full size coverage\n * instead of just the rep.\n *\n * The catalog uses a stable id-pattern convention\n * (`<prefix>_<W>x<H>_<suffix>`) for per-size entries — image, html5, and\n * generative all follow it. This function parses ids matching that\n * pattern and matches on extracted dimensions, so the lookup is\n * dimensionally honest without requiring the spec to add explicit\n * width/height fields to catalog entries.\n *\n * Returns undefined when no matching entry exists at this publisher.\n * Caller falls back to the seller-asserted rep + lossy advisory.\n */\nconst SIZED_ID_RE = /^([a-z]+)_(\\d+)x(\\d+)_([a-z]+)$/;\n\n/**\n * Extract the `<prefix>_<W>x<H>_<suffix>` template from a sized catalog\n * id. Used by `findCatalogEntryByCanonicalAndSize` to filter fan-out\n * candidates to siblings of the seller-asserted ref. Multiple catalog\n * entries can share the same `canonical:` annotation but represent\n * different families (e.g., `image` is both `display_*_image` and\n * `display_*_generative`); without a suffix filter, fan-out would\n * collide families.\n */\nexport function parseSizedIdTemplate(id: string): { prefix: string; suffix: string } | undefined {\n const m = id.match(SIZED_ID_RE);\n if (!m) return undefined;\n return { prefix: m[1]!, suffix: m[4]! };\n}\n\nexport function findCatalogEntryByCanonicalAndSize(\n canonical: CanonicalFormatKind,\n width: number,\n height: number,\n agentUrl: string,\n options?: { prefix?: string; suffix?: string; explicitPath?: string }\n): V1FormatDefinition | undefined {\n const catalog = loadCatalog(options?.explicitPath);\n const normalizedAgentUrl = normalizeAgentUrl(agentUrl);\n for (const entry of catalog.entries) {\n if (entry.canonical?.kind !== canonical) continue;\n if (!entry.format_id?.id || !entry.format_id?.agent_url) continue;\n if (normalizeAgentUrl(entry.format_id.agent_url) !== normalizedAgentUrl) continue;\n const m = entry.format_id.id.match(SIZED_ID_RE);\n if (!m) continue;\n const [, prefix, wStr, hStr, suffix] = m;\n if (options?.prefix && prefix !== options.prefix) continue;\n if (options?.suffix && suffix !== options.suffix) continue;\n if (parseInt(wStr!, 10) === width && parseInt(hStr!, 10) === height) {\n return entry;\n }\n }\n return undefined;\n}\n"],"mappings":"AAAA,SAAS,iBAAiB,2BAA2B;AACrD,SAAS,WAAW,qBAAqB;AACzC,SAAS,iBAAiB,2BAA2B;AACrD,MAAM,YAAY,cAAc,oBAAoB,YAAY,GAAG,CAAC;AACpE,MAAMA,WAAU,oBAAoB,YAAY,GAAG;AAsBnD,SAAS,cAA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AG,MAAM,WAAW;AAC9B,MAAI,CAAC,EAAG,QAAO;AACf,SAAO,EAAE,QAAQ,EAAE,CAAC,GAAI,QAAQ,EAAE,CAAC,EAAG;AACxC;AAEO,SAAS,mCACd,WACA,OACA,QACA,UACA,SACgC;AAChC,QAAM,UAAU,YAAY,SAAS,YAAY;AACjD,QAAM,qBAAqB,kBAAkB,QAAQ;AACrD,aAAW,SAAS,QAAQ,SAAS;AACnC,QAAI,MAAM,WAAW,SAAS,UAAW;AACzC,QAAI,CAAC,MAAM,WAAW,MAAM,CAAC,MAAM,WAAW,UAAW;AACzD,QAAI,kBAAkB,MAAM,UAAU,SAAS,MAAM,mBAAoB;AACzE,UAAM,IAAI,MAAM,UAAU,GAAG,MAAM,WAAW;AAC9C,QAAI,CAAC,EAAG;AACR,UAAM,CAAC,EAAE,QAAQ,MAAM,MAAM,MAAM,IAAI;AACvC,QAAI,SAAS,UAAU,WAAW,QAAQ,OAAQ;AAClD,QAAI,SAAS,UAAU,WAAW,QAAQ,OAAQ;AAClD,QAAI,SAAS,MAAO,EAAE,MAAM,SAAS,SAAS,MAAO,EAAE,MAAM,QAAQ;AACnE,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":["require"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/v2/projection/catalog.ts"],"sourcesContent":["import { fileURLToPath as __adcpFileURLToPath } from 'node:url';\nimport { dirname as __adcpDirname } from 'node:path';\nimport { createRequire as __adcpCreateRequire } from 'node:module';\nconst __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));\nconst require = __adcpCreateRequire(import.meta.url);\n/**\n * Loader for the AAO canonical-formats catalog (`reference-formats.json`).\n * Source of truth: `server/src/creative-agent/reference-formats.json` in\n * the adcontextprotocol/adcp repo — published by the AAO with the\n * `canonical` annotation on entries that have a v2 canonical-format\n * equivalent.\n *\n * The catalog is the v1→v2 direction's primary lookup table: each entry\n * is a v1 format definition, and 32 of the 57 entries in 3.1-beta carry\n * a `canonical: <kind>` annotation that names the v2 canonical the v1\n * format projects to. This is the spec's resolution-order step 2 —\n * \"seller-asserted on the v1 file\" — applied to AAO-published v1 formats.\n *\n * Primary lookup is keyed by `agent_url` (with trailing-slash normalization) +\n * `format_id.id`. The inbound migration path may also use an exact bare ID\n * when it has one unique meaning in the AAO catalog; the source owner is\n * preserved for reverse delivery. Same scope as the v2→v1 registry: AAO catalog only.\n * Seller-specific catalogs (from a publisher's\n * `list_creative_formats`) are out of scope for the prototype — the\n * full 8.0 enablement would fetch them via an `AgentClient` injected\n * by the auto-negotiation surface.\n */\n\nimport { readFileSync, existsSync } from 'fs';\nimport path from 'path';\nimport type { CanonicalFormatKind, V1FormatId } from './types';\nimport { AAO_CANONICAL_AGENT_URL } from './constants';\nimport { canonicalizeAgentUrl } from '../../discovery/resolve-agent-properties';\n\n/**\n * Canonical projection reference (`canonical-projection-ref.json` in the\n * 3.1 spec). Always object-shaped: required `kind` + optional\n * `asset_source` + optional `slots_override`. Carries the v2 canonical-\n * format projection for a v1 catalog entry. Generative-AI v1 entries\n * use the rich form (`asset_source: 'agent_synthesized'` +\n * slots_override) so the v2 declaration produced from them carries the\n * generative contract; standard entries use the minimal form\n * (`{ kind }`) and inherit the canonical's default slots.\n */\nexport interface CanonicalProjectionRef {\n kind: CanonicalFormatKind;\n /** Narrows how the asset is produced (e.g., agent_synthesized for AI generation, buyer_uploaded for native). */\n asset_source?: 'agent_synthesized' | 'buyer_uploaded' | string;\n /** When set, replaces the canonical's default slots with these specifics. */\n slots_override?: Array<{\n asset_group_id: string;\n asset_type?: string;\n required?: boolean;\n [k: string]: unknown;\n }>;\n}\n\n/**\n * v1 format definition shape from `reference-formats.json`. Only carries\n * the fields the projection algorithm reads — name/description and the\n * full asset/macro/requirement bodies are passed through opaquely when\n * the caller wants them.\n */\nexport interface V1FormatDefinition {\n format_id: V1FormatId;\n name?: string;\n description?: string;\n type?: string;\n accepts_parameters?: string[];\n renders?: Array<{\n role?: string;\n dimensions?: {\n width?: number;\n height?: number;\n [k: string]: unknown;\n };\n [k: string]: unknown;\n }>;\n assets?: Array<{\n item_type?: string;\n asset_id?: string;\n required?: boolean;\n asset_type?: string;\n requirements?: Record<string, unknown>;\n }>;\n /**\n * v2 canonical projection. Always object-shaped per\n * `canonical-projection-ref.json`. Absent on entries that have no\n * v2 mapping yet (none at 3.1.0-beta.1 GA — the AAO catalog is\n * 100% annotated; absence is reserved for future un-blessed entries).\n */\n canonical?: CanonicalProjectionRef;\n // Pass-through for caller code that wants the rest.\n [k: string]: unknown;\n}\n\ninterface CatalogIndex {\n /** Keyed by `<normalized-agent-url>::<id>` for O(1) lookup. */\n byKey: Map<string, V1FormatDefinition>;\n /** Exact bare IDs with one AAO-published meaning; `null` marks a collision. */\n byUniqueId: Map<string, V1FormatDefinition | null>;\n entries: V1FormatDefinition[];\n}\n\nconst cachedByPath = new Map<string, CatalogIndex>();\n\n/**\n * Normalize agent_url for indexing. Adds trailing slash when missing and\n * folds only explicitly known historical AAO hosts into the current host.\n * The AAO publishes the canonical form as `https://creative.adcontextprotocol.org/`\n * (with slash); some v2 fixtures use the no-slash form. Both refer to\n * the same agent; this lookup folds them. This composite-identity lookup\n * never ignores ownership. The separate unique-bare-ID compatibility lookup\n * is fail-closed on collisions and never changes this index.\n */\nconst AAO_LEGACY_AGENT_URL_ALIASES = new Set([\n // Early AAO reference implementations, including Optimera's deployed\n // catalog, used the protocol root before creative.adcontextprotocol.org\n // became the canonical format-agent host.\n 'https://adcontextprotocol.org/',\n]);\n\nfunction normalizeAgentUrl(u: string): string | undefined {\n const canonical = canonicalizeAgentUrl(u);\n if (canonical === null) return undefined;\n return AAO_LEGACY_AGENT_URL_ALIASES.has(canonical) ? AAO_CANONICAL_AGENT_URL : canonical;\n}\n\nfunction indexKey(agentUrl: string, id: string): string | undefined {\n const normalized = normalizeAgentUrl(agentUrl);\n return normalized === undefined ? undefined : `${normalized}::${id}`;\n}\n\n/**\n * Load the catalog from a known path. Resolution order:\n *\n * 1. Caller-supplied `explicitPath` (test hook).\n * 2. Adjacent to the compiled loader — `dist/lib/v2/projection/\n * aao-reference-formats.json`. This is the path that ships in the\n * published npm tarball; `scripts/copy-v2-projection-catalog.ts`\n * vendors the file here during `build:lib`.\n * 3. Source-tree test fixture at\n * `test/lib/v2-projection-fixtures/aao-reference-formats.json`,\n * relative to the loader's source location. Used when running from\n * a source checkout (e.g., `tsx` / vitest) before `build:lib`.\n *\n * Memoized — catalog is small and immutable per spec version.\n *\n * @param explicitPath caller-supplied path; takes precedence over\n * fallback resolution.\n */\nexport function loadCatalog(explicitPath?: string): CatalogIndex {\n const candidates = explicitPath\n ? [explicitPath]\n : [\n path.join(__dirname, 'aao-reference-formats.json'),\n path.join(\n __dirname,\n '..',\n '..',\n '..',\n '..',\n 'test',\n 'lib',\n 'v2-projection-fixtures',\n 'aao-reference-formats.json'\n ),\n ];\n\n for (const file of candidates) {\n if (existsSync(file)) {\n const cached = cachedByPath.get(file);\n if (cached) return cached;\n const raw = JSON.parse(readFileSync(file, 'utf-8')) as V1FormatDefinition[];\n const byKey = new Map<string, V1FormatDefinition>();\n const byUniqueId = new Map<string, V1FormatDefinition | null>();\n for (const entry of raw) {\n if (entry?.format_id?.agent_url && entry?.format_id?.id) {\n const key = indexKey(entry.format_id.agent_url, entry.format_id.id);\n if (key !== undefined) byKey.set(key, entry);\n if (byUniqueId.has(entry.format_id.id)) byUniqueId.set(entry.format_id.id, null);\n else byUniqueId.set(entry.format_id.id, entry);\n }\n }\n const compiled = { byKey, byUniqueId, entries: raw };\n cachedByPath.set(file, compiled);\n return compiled;\n }\n }\n\n throw new Error(\n `AAO catalog (aao-reference-formats.json) not found. Looked in: ${candidates.join(', ')}. ` +\n `This indicates a corrupted @adcp/sdk install or an SDK packaging regression — ` +\n `please file an issue at https://github.com/adcontextprotocol/adcp-client/issues with ` +\n `your install method (npm/yarn/pnpm) and Node version. ` +\n `If you're working from a source checkout, run \\`npm run build:lib\\` first.`\n );\n}\n\n/**\n * Look up a v1 format definition by its format_id. Returns undefined\n * when not in the catalog — caller falls through to registry / structural\n * match per the resolution order.\n */\nexport function lookupV1Format(formatId: V1FormatId, explicitPath?: string): V1FormatDefinition | undefined {\n const catalog = loadCatalog(explicitPath);\n const key = indexKey(formatId.agent_url, formatId.id);\n return key === undefined ? undefined : catalog.byKey.get(key);\n}\n\n/**\n * Resolve an AAO-published bare ID only when the bundled catalog gives that\n * ID exactly one meaning. This is an inbound legacy compatibility seam for\n * sellers that copied an AAO standard ID but incorrectly emitted their own\n * creative-agent URL. It never rewrites the source ref, so a later downgrade\n * returns the seller's original owner tuple. Duplicate IDs fail closed.\n */\nexport function lookupUniqueV1FormatById(id: string, explicitPath?: string): V1FormatDefinition | undefined {\n const match = loadCatalog(explicitPath).byUniqueId.get(id);\n return match ?? undefined;\n}\n\n/** Test hook: reset the memoized catalog. */\nexport function _resetCatalogCache(): void {\n cachedByPath.clear();\n}\n\n/**\n * Find a catalog entry matching `(canonical, width, height)` at the same\n * publisher domain as `agentUrl`. Used by the v2 → v1 multi-size fan-out:\n * when a v2 declaration says `sizes: [W1×H1, W2×H2, ...]` and the\n * seller-asserted `v1_format_ref` points at the catalog entry for one of\n * those sizes, the SDK can look up the entries for the OTHER sizes and\n * emit additional v1 format_ids — giving v1 buyers full size coverage\n * instead of just the rep.\n *\n * The catalog uses a stable id-pattern convention\n * (`<prefix>_<W>x<H>_<suffix>`) for per-size entries — image, html5, and\n * generative all follow it. This function parses ids matching that\n * pattern and matches on extracted dimensions, so the lookup is\n * dimensionally honest without requiring the spec to add explicit\n * width/height fields to catalog entries.\n *\n * Returns undefined when no matching entry exists at this publisher.\n * Caller falls back to the seller-asserted rep + lossy advisory.\n */\nconst SIZED_ID_RE = /^([a-z]+)_(\\d+)x(\\d+)_([a-z]+)$/;\n\n/**\n * Extract the `<prefix>_<W>x<H>_<suffix>` template from a sized catalog\n * id. Used by `findCatalogEntryByCanonicalAndSize` to filter fan-out\n * candidates to siblings of the seller-asserted ref. Multiple catalog\n * entries can share the same `canonical:` annotation but represent\n * different families (e.g., `image` is both `display_*_image` and\n * `display_*_generative`); without a suffix filter, fan-out would\n * collide families.\n */\nexport function parseSizedIdTemplate(id: string): { prefix: string; suffix: string } | undefined {\n const m = id.match(SIZED_ID_RE);\n if (!m) return undefined;\n return { prefix: m[1]!, suffix: m[4]! };\n}\n\nexport function findCatalogEntryByCanonicalAndSize(\n canonical: CanonicalFormatKind,\n width: number,\n height: number,\n agentUrl: string,\n options?: { prefix?: string; suffix?: string; explicitPath?: string }\n): V1FormatDefinition | undefined {\n const catalog = loadCatalog(options?.explicitPath);\n const normalizedAgentUrl = normalizeAgentUrl(agentUrl);\n if (normalizedAgentUrl === undefined) return undefined;\n for (const entry of catalog.entries) {\n if (entry.canonical?.kind !== canonical) continue;\n if (!entry.format_id?.id || !entry.format_id?.agent_url) continue;\n if (normalizeAgentUrl(entry.format_id.agent_url) !== normalizedAgentUrl) continue;\n const m = entry.format_id.id.match(SIZED_ID_RE);\n if (!m) continue;\n const [, prefix, wStr, hStr, suffix] = m;\n if (options?.prefix && prefix !== options.prefix) continue;\n if (options?.suffix && suffix !== options.suffix) continue;\n if (parseInt(wStr!, 10) === width && parseInt(hStr!, 10) === height) {\n return entry;\n }\n }\n return undefined;\n}\n"],"mappings":"AAAA,SAAS,iBAAiB,2BAA2B;AACrD,SAAS,WAAW,qBAAqB;AACzC,SAAS,iBAAiB,2BAA2B;AACrD,MAAM,YAAY,cAAc,oBAAoB,YAAY,GAAG,CAAC;AACpE,MAAMA,WAAU,oBAAoB,YAAY,GAAG;AAwBnD,SAAS,cAAc,kBAAkB;AACzC,OAAO,UAAU;AAEjB,SAAS,+BAA+B;AACxC,SAAS,4BAA4B;AAwErC,MAAM,eAAe,oBAAI,IAA0B;AAWnD,MAAM,+BAA+B,oBAAI,IAAI;AAAA;AAAA;AAAA;AAAA,EAI3C;AACF,CAAC;AAED,SAAS,kBAAkB,GAA+B;AACxD,QAAM,YAAY,qBAAqB,CAAC;AACx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
+
import type { CreativeAsset, CreateMediaBuyRequest, CreateMediaBuyResponse, FormatOptionReference, GetProductsRequest, GetProductsResponse, GetCreativeDeliveryResponse, GetMediaBuyDeliveryResponse, GetMediaBuysResponse, CreativeFilters, ListCreativesResponse, ListCreativesRequest, PackageRequest, PackageUpdate, Package, Placement, Product, SyncCreativesRequest, SyncCreativesResponse, UpdateMediaBuyRequest, UpdateMediaBuyResponse } from '../../types/tools.generated.mjs';
|
|
2
|
+
import type { LegacyFormatConverter } from './v1-to-v2.mjs';
|
|
3
|
+
import type { CanonicalFormatLegacyResolver } from './v2-to-v1.mjs';
|
|
4
|
+
import type { CanonicalFormatKind, ProjectionDiagnostic, V1FormatId } from './types.mjs';
|
|
5
|
+
import type { CanonicalFormatDeclaration } from './legacy-metadata.mjs';
|
|
6
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, Extract<keyof T, K>> : never;
|
|
7
|
+
/** Primary SDK creative shape. Legacy creative identity is a wire-adapter concern. */
|
|
8
|
+
export type CanonicalCreativeAsset = Omit<CanonicalCreativeResponse<CreativeAsset>, 'format_kind'> & {
|
|
9
|
+
format_kind: CanonicalFormatKind;
|
|
10
|
+
format_id?: never;
|
|
11
|
+
};
|
|
12
|
+
/** Explicit compatibility-only creative shape used at a legacy wire boundary. */
|
|
13
|
+
export type LegacyCreativeAsset = Omit<CreativeAsset, 'format_id' | 'format_kind' | 'format_option_ref'> & {
|
|
14
|
+
format_id: V1FormatId;
|
|
15
|
+
format_kind?: never;
|
|
16
|
+
format_option_ref?: never;
|
|
17
|
+
};
|
|
18
|
+
export type CanonicalPackageRequest = DistributiveOmit<CanonicalCreativeResponse<PackageRequest>, 'creatives' | 'format_ids'> & {
|
|
19
|
+
creatives?: CanonicalCreativeAsset[];
|
|
20
|
+
format_ids?: never;
|
|
21
|
+
};
|
|
22
|
+
export type NonEmptyCanonicalFormatDeclarations = [CanonicalFormatDeclaration, ...CanonicalFormatDeclaration[]];
|
|
23
|
+
export type CanonicalPlacement = Omit<CanonicalCreativeResponse<Placement>, 'format_ids' | 'format_options'> & {
|
|
24
|
+
format_ids?: never;
|
|
25
|
+
format_options?: NonEmptyCanonicalFormatDeclarations;
|
|
26
|
+
};
|
|
27
|
+
export type CanonicalProduct = Omit<CanonicalCreativeResponse<Product>, 'format_ids' | 'format_options' | 'placements'> & {
|
|
28
|
+
product_id: string;
|
|
29
|
+
format_ids?: never;
|
|
30
|
+
format_options: NonEmptyCanonicalFormatDeclarations;
|
|
31
|
+
placements?: CanonicalPlacement[];
|
|
32
|
+
};
|
|
33
|
+
type CanonicalGetProductsField = Exclude<NonNullable<GetProductsRequest['fields']>[number], 'format_ids'>;
|
|
34
|
+
/** Primary product discovery request cannot ask the SDK to expose legacy format IDs. */
|
|
35
|
+
export type CanonicalGetProductsRequest = Omit<GetProductsRequest, 'fields'> & {
|
|
36
|
+
fields?: CanonicalGetProductsField[];
|
|
37
|
+
};
|
|
38
|
+
export type CanonicalGetProductsResponse = Omit<CanonicalCreativeResponse<GetProductsResponse>, 'products'> & {
|
|
39
|
+
products: CanonicalProduct[];
|
|
40
|
+
projection: {
|
|
41
|
+
diagnostics: ProjectionDiagnostic[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type CanonicalPackageUpdate = Omit<CanonicalCreativeResponse<PackageUpdate>, 'creatives'> & {
|
|
45
|
+
creatives?: CanonicalCreativeAsset[];
|
|
46
|
+
};
|
|
47
|
+
export type CanonicalPackage = CanonicalCreativeResponse<Package>;
|
|
48
|
+
export type CanonicalCreateMediaBuyRequest = Omit<CanonicalCreativeResponse<CreateMediaBuyRequest>, 'packages'> & {
|
|
49
|
+
packages?: CanonicalPackageRequest[];
|
|
50
|
+
};
|
|
51
|
+
export type CanonicalUpdateMediaBuyRequest = Omit<CanonicalCreativeResponse<UpdateMediaBuyRequest>, 'packages' | 'new_packages'> & {
|
|
52
|
+
packages?: CanonicalPackageUpdate[];
|
|
53
|
+
new_packages?: CanonicalPackageRequest[];
|
|
54
|
+
};
|
|
55
|
+
export type CanonicalSyncCreativesRequest = Omit<CanonicalCreativeResponse<SyncCreativesRequest>, 'creatives'> & {
|
|
56
|
+
creatives: CanonicalCreativeAsset[];
|
|
57
|
+
};
|
|
58
|
+
export type CanonicalListedCreative = Omit<CanonicalCreativeResponse<ListCreativesResponse['creatives'][number]>, 'format_id' | 'format_kind' | 'format_option_ref'> & {
|
|
59
|
+
format_kind: CanonicalFormatKind;
|
|
60
|
+
format_option_ref?: FormatOptionReference;
|
|
61
|
+
format_id?: never;
|
|
62
|
+
};
|
|
63
|
+
export type CanonicalListCreativesResponse = Omit<CanonicalCreativeResponse<ListCreativesResponse>, 'creatives'> & {
|
|
64
|
+
creatives: CanonicalListedCreative[];
|
|
65
|
+
};
|
|
66
|
+
export type CanonicalCreateMediaBuyResponse = CanonicalCreativeResponse<CreateMediaBuyResponse>;
|
|
67
|
+
export type CanonicalUpdateMediaBuyResponse = CanonicalCreativeResponse<UpdateMediaBuyResponse>;
|
|
68
|
+
export type CanonicalSyncCreativesResponse = CanonicalCreativeResponse<SyncCreativesResponse>;
|
|
69
|
+
export type CanonicalGetMediaBuysResponse = CanonicalCreativeResponse<GetMediaBuysResponse>;
|
|
70
|
+
export type CanonicalGetMediaBuyDeliveryResponse = CanonicalCreativeResponse<GetMediaBuyDeliveryResponse>;
|
|
71
|
+
export type CanonicalGetCreativeDeliveryResponse = CanonicalCreativeResponse<GetCreativeDeliveryResponse>;
|
|
72
|
+
export type CanonicalCreativeFilters = Omit<CanonicalCreativeResponse<CreativeFilters>, 'format_ids'> & {
|
|
73
|
+
format_ids?: never;
|
|
74
|
+
};
|
|
75
|
+
type CanonicalListCreativeField = Exclude<NonNullable<ListCreativesRequest['fields']>[number], 'format_id'>;
|
|
76
|
+
/** Primary list request: legacy named-format filters and response fields are migration-only. */
|
|
77
|
+
export type CanonicalListCreativesRequest = Omit<CanonicalCreativeResponse<ListCreativesRequest>, 'filters' | 'fields'> & {
|
|
78
|
+
filters?: CanonicalCreativeFilters;
|
|
79
|
+
fields?: CanonicalListCreativeField[];
|
|
80
|
+
};
|
|
81
|
+
type IsLegacyCreativeIdentityKey<K extends PropertyKey> = K extends string ? K extends '_message' | `${string}format_id${string}` | `${string}v1_format_ref${string}` ? true : false : false;
|
|
82
|
+
/** Recursively removes legacy creative routing identity from primary response types. */
|
|
83
|
+
export type CanonicalCreativeResponse<T> = T extends (...args: never[]) => unknown ? T : T extends readonly (infer TItem)[] ? CanonicalCreativeResponse<TItem>[] : T extends object ? {
|
|
84
|
+
[K in keyof T as IsLegacyCreativeIdentityKey<K> extends true ? never : K]: CanonicalCreativeResponse<T[K]>;
|
|
85
|
+
} : T;
|
|
86
|
+
/** Runtime counterpart to {@link CanonicalCreativeResponse}. */
|
|
87
|
+
export declare function stripLegacyCreativeIdentity<T>(value: T): CanonicalCreativeResponse<T>;
|
|
88
|
+
export type CanonicalProjectedCreative<T> = Omit<T, 'format_id' | 'format_kind'> & {
|
|
89
|
+
format_kind: CanonicalFormatKind;
|
|
90
|
+
format_id?: never;
|
|
91
|
+
};
|
|
92
|
+
export type LegacyProjectedCreative<T> = Omit<T, 'format_id' | 'format_kind' | 'format_option_ref'> & {
|
|
93
|
+
format_id: V1FormatId;
|
|
94
|
+
format_kind?: never;
|
|
95
|
+
format_option_ref?: never;
|
|
96
|
+
};
|
|
97
|
+
type ProjectedCreativeArray<T, TMode extends 'canonical' | 'legacy'> = T extends ReadonlyArray<infer TCreative> ? Array<TMode extends 'canonical' ? CanonicalProjectedCreative<TCreative> : LegacyProjectedCreative<TCreative>> : T;
|
|
98
|
+
type ReplaceCreatives<T, TMode extends 'canonical' | 'legacy'> = T extends object ? 'creatives' extends keyof T ? Omit<T, 'creatives'> & (Record<never, never> extends Pick<T, 'creatives'> ? {
|
|
99
|
+
creatives?: ProjectedCreativeArray<T['creatives'], TMode>;
|
|
100
|
+
} : {
|
|
101
|
+
creatives: ProjectedCreativeArray<T['creatives'], TMode>;
|
|
102
|
+
}) : T : T;
|
|
103
|
+
type ProjectedContainerArray<T, TMode extends 'canonical' | 'legacy'> = T extends ReadonlyArray<infer TContainer> ? Array<ReplaceCreatives<TContainer, TMode>> : T;
|
|
104
|
+
type ReplaceContainerKey<T, TKey extends 'packages' | 'new_packages', TMode extends 'canonical' | 'legacy'> = TKey extends keyof T ? Record<never, never> extends Pick<T, TKey> ? {
|
|
105
|
+
[K in TKey]?: ProjectedContainerArray<T[TKey], TMode>;
|
|
106
|
+
} : {
|
|
107
|
+
[K in TKey]: ProjectedContainerArray<T[TKey], TMode>;
|
|
108
|
+
} : Record<never, never>;
|
|
109
|
+
export type ProjectedMediaBuyCreativeRequest<T, TMode extends 'canonical' | 'legacy'> = Omit<T, 'packages' | 'new_packages'> & ReplaceContainerKey<T, 'packages', TMode> & ReplaceContainerKey<T, 'new_packages', TMode>;
|
|
110
|
+
export type ProjectedSyncCreativeRequest<T, TMode extends 'canonical' | 'legacy'> = ReplaceCreatives<T, TMode>;
|
|
111
|
+
export type CreativeFormatWireMode = 'canonical' | 'legacy' | 'unknown';
|
|
112
|
+
export interface CreativeFormatSelectorContainer {
|
|
113
|
+
package_id?: string;
|
|
114
|
+
format_ids?: unknown[];
|
|
115
|
+
formats?: unknown[];
|
|
116
|
+
format_options?: unknown[];
|
|
117
|
+
format_option_refs?: unknown[];
|
|
118
|
+
format_kind?: unknown;
|
|
119
|
+
params?: unknown;
|
|
120
|
+
/** Internal composition seam used to preserve per-package selector constraints. */
|
|
121
|
+
selector_containers?: ReadonlyArray<CreativeFormatSelectorContainer>;
|
|
122
|
+
[key: string]: unknown;
|
|
123
|
+
}
|
|
124
|
+
/** Canonical package/product selectors accepted by the primary sync API. */
|
|
125
|
+
export interface CanonicalCreativeFormatSelectorContainer {
|
|
126
|
+
package_id?: string;
|
|
127
|
+
format_options?: ReadonlyArray<CanonicalFormatDeclaration>;
|
|
128
|
+
format_option_refs?: ReadonlyArray<FormatOptionReference>;
|
|
129
|
+
format_kind?: CanonicalFormatKind;
|
|
130
|
+
params?: CanonicalFormatDeclaration['params'];
|
|
131
|
+
selector_containers?: ReadonlyArray<CanonicalCreativeFormatSelectorContainer>;
|
|
132
|
+
}
|
|
133
|
+
export interface SyncCreativeFormatProjection {
|
|
134
|
+
selectorContainers: ReadonlyArray<CanonicalCreativeFormatSelectorContainer>;
|
|
135
|
+
legacyFormatConverter?: LegacyFormatConverter;
|
|
136
|
+
}
|
|
137
|
+
export declare class CreativeFormatProjectionError extends Error {
|
|
138
|
+
readonly operation: string;
|
|
139
|
+
readonly creativeId: string;
|
|
140
|
+
readonly code = "ADCP_CREATIVE_FORMAT_PROJECTION_FAILED";
|
|
141
|
+
constructor(operation: string, creativeId: string, reason: string);
|
|
142
|
+
}
|
|
143
|
+
export declare class CreativeFormatCapabilityError extends Error {
|
|
144
|
+
readonly code = "ADCP_CREATIVE_FORMAT_CAPABILITY_CONTRADICTION";
|
|
145
|
+
constructor(message: string);
|
|
146
|
+
}
|
|
147
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode?: 'canonical', operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): CanonicalProjectedCreative<T>;
|
|
148
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode: 'legacy' | 'unknown', operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): LegacyProjectedCreative<T>;
|
|
149
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode: CreativeFormatWireMode, operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): CanonicalProjectedCreative<T> | LegacyProjectedCreative<T>;
|
|
150
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: 'canonical', operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedMediaBuyCreativeRequest<T, 'canonical'>;
|
|
151
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: 'legacy' | 'unknown', operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedMediaBuyCreativeRequest<T, 'legacy'>;
|
|
152
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: CreativeFormatWireMode, operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedMediaBuyCreativeRequest<T, 'canonical'> | ProjectedMediaBuyCreativeRequest<T, 'legacy'>;
|
|
153
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: 'canonical', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedSyncCreativeRequest<T, 'canonical'>;
|
|
154
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: 'legacy' | 'unknown', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedSyncCreativeRequest<T, 'legacy'>;
|
|
155
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: CreativeFormatWireMode, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedSyncCreativeRequest<T, 'canonical'> | ProjectedSyncCreativeRequest<T, 'legacy'>;
|
|
156
|
+
export declare function resolveCreativeFormatWireMode(capabilities: unknown, negotiatedVersion?: string): CreativeFormatWireMode;
|
|
157
|
+
export {};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { CreativeAsset, CreateMediaBuyRequest, CreateMediaBuyResponse, FormatOptionReference, GetProductsRequest, GetProductsResponse, GetCreativeDeliveryResponse, GetMediaBuyDeliveryResponse, GetMediaBuysResponse, CreativeFilters, ListCreativesResponse, ListCreativesRequest, PackageRequest, PackageUpdate, Package, Placement, Product, SyncCreativesRequest, SyncCreativesResponse, UpdateMediaBuyRequest, UpdateMediaBuyResponse } from '../../types/tools.generated';
|
|
2
|
+
import type { LegacyFormatConverter } from './v1-to-v2';
|
|
3
|
+
import type { CanonicalFormatLegacyResolver } from './v2-to-v1';
|
|
4
|
+
import type { CanonicalFormatKind, ProjectionDiagnostic, V1FormatId } from './types';
|
|
5
|
+
import type { CanonicalFormatDeclaration } from './legacy-metadata';
|
|
6
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, Extract<keyof T, K>> : never;
|
|
7
|
+
/** Primary SDK creative shape. Legacy creative identity is a wire-adapter concern. */
|
|
8
|
+
export type CanonicalCreativeAsset = Omit<CanonicalCreativeResponse<CreativeAsset>, 'format_kind'> & {
|
|
9
|
+
format_kind: CanonicalFormatKind;
|
|
10
|
+
format_id?: never;
|
|
11
|
+
};
|
|
12
|
+
/** Explicit compatibility-only creative shape used at a legacy wire boundary. */
|
|
13
|
+
export type LegacyCreativeAsset = Omit<CreativeAsset, 'format_id' | 'format_kind' | 'format_option_ref'> & {
|
|
14
|
+
format_id: V1FormatId;
|
|
15
|
+
format_kind?: never;
|
|
16
|
+
format_option_ref?: never;
|
|
17
|
+
};
|
|
18
|
+
export type CanonicalPackageRequest = DistributiveOmit<CanonicalCreativeResponse<PackageRequest>, 'creatives' | 'format_ids'> & {
|
|
19
|
+
creatives?: CanonicalCreativeAsset[];
|
|
20
|
+
format_ids?: never;
|
|
21
|
+
};
|
|
22
|
+
export type NonEmptyCanonicalFormatDeclarations = [CanonicalFormatDeclaration, ...CanonicalFormatDeclaration[]];
|
|
23
|
+
export type CanonicalPlacement = Omit<CanonicalCreativeResponse<Placement>, 'format_ids' | 'format_options'> & {
|
|
24
|
+
format_ids?: never;
|
|
25
|
+
format_options?: NonEmptyCanonicalFormatDeclarations;
|
|
26
|
+
};
|
|
27
|
+
export type CanonicalProduct = Omit<CanonicalCreativeResponse<Product>, 'format_ids' | 'format_options' | 'placements'> & {
|
|
28
|
+
product_id: string;
|
|
29
|
+
format_ids?: never;
|
|
30
|
+
format_options: NonEmptyCanonicalFormatDeclarations;
|
|
31
|
+
placements?: CanonicalPlacement[];
|
|
32
|
+
};
|
|
33
|
+
type CanonicalGetProductsField = Exclude<NonNullable<GetProductsRequest['fields']>[number], 'format_ids'>;
|
|
34
|
+
/** Primary product discovery request cannot ask the SDK to expose legacy format IDs. */
|
|
35
|
+
export type CanonicalGetProductsRequest = Omit<GetProductsRequest, 'fields'> & {
|
|
36
|
+
fields?: CanonicalGetProductsField[];
|
|
37
|
+
};
|
|
38
|
+
export type CanonicalGetProductsResponse = Omit<CanonicalCreativeResponse<GetProductsResponse>, 'products'> & {
|
|
39
|
+
products: CanonicalProduct[];
|
|
40
|
+
projection: {
|
|
41
|
+
diagnostics: ProjectionDiagnostic[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type CanonicalPackageUpdate = Omit<CanonicalCreativeResponse<PackageUpdate>, 'creatives'> & {
|
|
45
|
+
creatives?: CanonicalCreativeAsset[];
|
|
46
|
+
};
|
|
47
|
+
export type CanonicalPackage = CanonicalCreativeResponse<Package>;
|
|
48
|
+
export type CanonicalCreateMediaBuyRequest = Omit<CanonicalCreativeResponse<CreateMediaBuyRequest>, 'packages'> & {
|
|
49
|
+
packages?: CanonicalPackageRequest[];
|
|
50
|
+
};
|
|
51
|
+
export type CanonicalUpdateMediaBuyRequest = Omit<CanonicalCreativeResponse<UpdateMediaBuyRequest>, 'packages' | 'new_packages'> & {
|
|
52
|
+
packages?: CanonicalPackageUpdate[];
|
|
53
|
+
new_packages?: CanonicalPackageRequest[];
|
|
54
|
+
};
|
|
55
|
+
export type CanonicalSyncCreativesRequest = Omit<CanonicalCreativeResponse<SyncCreativesRequest>, 'creatives'> & {
|
|
56
|
+
creatives: CanonicalCreativeAsset[];
|
|
57
|
+
};
|
|
58
|
+
export type CanonicalListedCreative = Omit<CanonicalCreativeResponse<ListCreativesResponse['creatives'][number]>, 'format_id' | 'format_kind' | 'format_option_ref'> & {
|
|
59
|
+
format_kind: CanonicalFormatKind;
|
|
60
|
+
format_option_ref?: FormatOptionReference;
|
|
61
|
+
format_id?: never;
|
|
62
|
+
};
|
|
63
|
+
export type CanonicalListCreativesResponse = Omit<CanonicalCreativeResponse<ListCreativesResponse>, 'creatives'> & {
|
|
64
|
+
creatives: CanonicalListedCreative[];
|
|
65
|
+
};
|
|
66
|
+
export type CanonicalCreateMediaBuyResponse = CanonicalCreativeResponse<CreateMediaBuyResponse>;
|
|
67
|
+
export type CanonicalUpdateMediaBuyResponse = CanonicalCreativeResponse<UpdateMediaBuyResponse>;
|
|
68
|
+
export type CanonicalSyncCreativesResponse = CanonicalCreativeResponse<SyncCreativesResponse>;
|
|
69
|
+
export type CanonicalGetMediaBuysResponse = CanonicalCreativeResponse<GetMediaBuysResponse>;
|
|
70
|
+
export type CanonicalGetMediaBuyDeliveryResponse = CanonicalCreativeResponse<GetMediaBuyDeliveryResponse>;
|
|
71
|
+
export type CanonicalGetCreativeDeliveryResponse = CanonicalCreativeResponse<GetCreativeDeliveryResponse>;
|
|
72
|
+
export type CanonicalCreativeFilters = Omit<CanonicalCreativeResponse<CreativeFilters>, 'format_ids'> & {
|
|
73
|
+
format_ids?: never;
|
|
74
|
+
};
|
|
75
|
+
type CanonicalListCreativeField = Exclude<NonNullable<ListCreativesRequest['fields']>[number], 'format_id'>;
|
|
76
|
+
/** Primary list request: legacy named-format filters and response fields are migration-only. */
|
|
77
|
+
export type CanonicalListCreativesRequest = Omit<CanonicalCreativeResponse<ListCreativesRequest>, 'filters' | 'fields'> & {
|
|
78
|
+
filters?: CanonicalCreativeFilters;
|
|
79
|
+
fields?: CanonicalListCreativeField[];
|
|
80
|
+
};
|
|
81
|
+
type IsLegacyCreativeIdentityKey<K extends PropertyKey> = K extends string ? K extends '_message' | `${string}format_id${string}` | `${string}v1_format_ref${string}` ? true : false : false;
|
|
82
|
+
/** Recursively removes legacy creative routing identity from primary response types. */
|
|
83
|
+
export type CanonicalCreativeResponse<T> = T extends (...args: never[]) => unknown ? T : T extends readonly (infer TItem)[] ? CanonicalCreativeResponse<TItem>[] : T extends object ? {
|
|
84
|
+
[K in keyof T as IsLegacyCreativeIdentityKey<K> extends true ? never : K]: CanonicalCreativeResponse<T[K]>;
|
|
85
|
+
} : T;
|
|
86
|
+
/** Runtime counterpart to {@link CanonicalCreativeResponse}. */
|
|
87
|
+
export declare function stripLegacyCreativeIdentity<T>(value: T): CanonicalCreativeResponse<T>;
|
|
88
|
+
export type CanonicalProjectedCreative<T> = Omit<T, 'format_id' | 'format_kind'> & {
|
|
89
|
+
format_kind: CanonicalFormatKind;
|
|
90
|
+
format_id?: never;
|
|
91
|
+
};
|
|
92
|
+
export type LegacyProjectedCreative<T> = Omit<T, 'format_id' | 'format_kind' | 'format_option_ref'> & {
|
|
93
|
+
format_id: V1FormatId;
|
|
94
|
+
format_kind?: never;
|
|
95
|
+
format_option_ref?: never;
|
|
96
|
+
};
|
|
97
|
+
type ProjectedCreativeArray<T, TMode extends 'canonical' | 'legacy'> = T extends ReadonlyArray<infer TCreative> ? Array<TMode extends 'canonical' ? CanonicalProjectedCreative<TCreative> : LegacyProjectedCreative<TCreative>> : T;
|
|
98
|
+
type ReplaceCreatives<T, TMode extends 'canonical' | 'legacy'> = T extends object ? 'creatives' extends keyof T ? Omit<T, 'creatives'> & (Record<never, never> extends Pick<T, 'creatives'> ? {
|
|
99
|
+
creatives?: ProjectedCreativeArray<T['creatives'], TMode>;
|
|
100
|
+
} : {
|
|
101
|
+
creatives: ProjectedCreativeArray<T['creatives'], TMode>;
|
|
102
|
+
}) : T : T;
|
|
103
|
+
type ProjectedContainerArray<T, TMode extends 'canonical' | 'legacy'> = T extends ReadonlyArray<infer TContainer> ? Array<ReplaceCreatives<TContainer, TMode>> : T;
|
|
104
|
+
type ReplaceContainerKey<T, TKey extends 'packages' | 'new_packages', TMode extends 'canonical' | 'legacy'> = TKey extends keyof T ? Record<never, never> extends Pick<T, TKey> ? {
|
|
105
|
+
[K in TKey]?: ProjectedContainerArray<T[TKey], TMode>;
|
|
106
|
+
} : {
|
|
107
|
+
[K in TKey]: ProjectedContainerArray<T[TKey], TMode>;
|
|
108
|
+
} : Record<never, never>;
|
|
109
|
+
export type ProjectedMediaBuyCreativeRequest<T, TMode extends 'canonical' | 'legacy'> = Omit<T, 'packages' | 'new_packages'> & ReplaceContainerKey<T, 'packages', TMode> & ReplaceContainerKey<T, 'new_packages', TMode>;
|
|
110
|
+
export type ProjectedSyncCreativeRequest<T, TMode extends 'canonical' | 'legacy'> = ReplaceCreatives<T, TMode>;
|
|
111
|
+
export type CreativeFormatWireMode = 'canonical' | 'legacy' | 'unknown';
|
|
112
|
+
export interface CreativeFormatSelectorContainer {
|
|
113
|
+
package_id?: string;
|
|
114
|
+
format_ids?: unknown[];
|
|
115
|
+
formats?: unknown[];
|
|
116
|
+
format_options?: unknown[];
|
|
117
|
+
format_option_refs?: unknown[];
|
|
118
|
+
format_kind?: unknown;
|
|
119
|
+
params?: unknown;
|
|
120
|
+
/** Internal composition seam used to preserve per-package selector constraints. */
|
|
121
|
+
selector_containers?: ReadonlyArray<CreativeFormatSelectorContainer>;
|
|
122
|
+
[key: string]: unknown;
|
|
123
|
+
}
|
|
124
|
+
/** Canonical package/product selectors accepted by the primary sync API. */
|
|
125
|
+
export interface CanonicalCreativeFormatSelectorContainer {
|
|
126
|
+
package_id?: string;
|
|
127
|
+
format_options?: ReadonlyArray<CanonicalFormatDeclaration>;
|
|
128
|
+
format_option_refs?: ReadonlyArray<FormatOptionReference>;
|
|
129
|
+
format_kind?: CanonicalFormatKind;
|
|
130
|
+
params?: CanonicalFormatDeclaration['params'];
|
|
131
|
+
selector_containers?: ReadonlyArray<CanonicalCreativeFormatSelectorContainer>;
|
|
132
|
+
}
|
|
133
|
+
export interface SyncCreativeFormatProjection {
|
|
134
|
+
selectorContainers: ReadonlyArray<CanonicalCreativeFormatSelectorContainer>;
|
|
135
|
+
legacyFormatConverter?: LegacyFormatConverter;
|
|
136
|
+
}
|
|
137
|
+
export declare class CreativeFormatProjectionError extends Error {
|
|
138
|
+
readonly operation: string;
|
|
139
|
+
readonly creativeId: string;
|
|
140
|
+
readonly code = "ADCP_CREATIVE_FORMAT_PROJECTION_FAILED";
|
|
141
|
+
constructor(operation: string, creativeId: string, reason: string);
|
|
142
|
+
}
|
|
143
|
+
export declare class CreativeFormatCapabilityError extends Error {
|
|
144
|
+
readonly code = "ADCP_CREATIVE_FORMAT_CAPABILITY_CONTRADICTION";
|
|
145
|
+
constructor(message: string);
|
|
146
|
+
}
|
|
147
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode?: 'canonical', operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): CanonicalProjectedCreative<T>;
|
|
148
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode: 'legacy' | 'unknown', operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): LegacyProjectedCreative<T>;
|
|
149
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode: CreativeFormatWireMode, operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): CanonicalProjectedCreative<T> | LegacyProjectedCreative<T>;
|
|
150
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: 'canonical', operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedMediaBuyCreativeRequest<T, 'canonical'>;
|
|
151
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: 'legacy' | 'unknown', operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedMediaBuyCreativeRequest<T, 'legacy'>;
|
|
152
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: CreativeFormatWireMode, operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedMediaBuyCreativeRequest<T, 'canonical'> | ProjectedMediaBuyCreativeRequest<T, 'legacy'>;
|
|
153
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: 'canonical', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedSyncCreativeRequest<T, 'canonical'>;
|
|
154
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: 'legacy' | 'unknown', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedSyncCreativeRequest<T, 'legacy'>;
|
|
155
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: CreativeFormatWireMode, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver): ProjectedSyncCreativeRequest<T, 'canonical'> | ProjectedSyncCreativeRequest<T, 'legacy'>;
|
|
156
|
+
export declare function resolveCreativeFormatWireMode(capabilities: unknown, negotiatedVersion?: string): CreativeFormatWireMode;
|
|
157
|
+
export {};
|
|
158
|
+
//# sourceMappingURL=creative-delivery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creative-delivery.d.ts","sourceRoot":"","sources":["../../../../src/lib/v2/projection/creative-delivery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,OAAO,EACP,SAAS,EACT,OAAO,EACP,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAMrF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAEpE,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,IAAI,CAAC,SAAS,OAAO,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;AAE3G,sFAAsF;AACtF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,yBAAyB,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,GAAG;IACnG,WAAW,EAAE,mBAAmB,CAAC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF,iFAAiF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