@adcp/sdk 14.0.0-rc.37 → 14.0.0-rc.39
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/bin/adcp-storyboard-summary.js +286 -0
- package/bin/adcp.js +221 -10
- package/dist/lib/conformance/schemaLoader.d.mts +1 -1
- package/dist/lib/conformance/schemaLoader.d.ts +1 -1
- package/dist/lib/core/AgentClient.d.mts +6 -1
- package/dist/lib/core/AgentClient.d.ts +6 -1
- package/dist/lib/core/AgentClient.js +9 -0
- package/dist/lib/core/AgentClient.mjs +9 -0
- package/dist/lib/core/ConversationTypes.d.mts +29 -0
- package/dist/lib/core/ConversationTypes.d.ts +29 -0
- package/dist/lib/core/SingleAgentClient.d.mts +3 -1
- package/dist/lib/core/SingleAgentClient.d.ts +3 -1
- package/dist/lib/core/SingleAgentClient.js +9 -1
- package/dist/lib/core/SingleAgentClient.mjs +9 -1
- package/dist/lib/core/TaskExecutor.d.mts +13 -1
- package/dist/lib/core/TaskExecutor.d.ts +13 -1
- package/dist/lib/core/TaskExecutor.js +216 -18
- package/dist/lib/core/TaskExecutor.mjs +216 -19
- package/dist/lib/index.d.mts +5 -2
- package/dist/lib/index.d.ts +5 -2
- package/dist/lib/index.js +10 -1
- package/dist/lib/index.mjs +10 -1
- package/dist/lib/media-buy/action-assessment.d.mts +77 -0
- package/dist/lib/media-buy/action-assessment.d.ts +77 -0
- package/dist/lib/media-buy/action-assessment.js +300 -0
- package/dist/lib/media-buy/action-assessment.mjs +284 -0
- package/dist/lib/media-buy/action-constraints.d.mts +9 -0
- package/dist/lib/media-buy/action-constraints.d.ts +9 -0
- package/dist/lib/media-buy/action-constraints.js +170 -0
- package/dist/lib/media-buy/action-constraints.mjs +146 -0
- package/dist/lib/media-buy/action-contracts.d.mts +40 -0
- package/dist/lib/media-buy/action-contracts.d.ts +40 -0
- package/dist/lib/media-buy/action-contracts.js +304 -0
- package/dist/lib/media-buy/action-contracts.mjs +267 -0
- package/dist/lib/media-buy/action-metadata.generated.d.mts +37 -0
- package/dist/lib/media-buy/action-metadata.generated.d.ts +37 -0
- package/dist/lib/media-buy/action-metadata.generated.js +128 -0
- package/dist/lib/media-buy/action-metadata.generated.mjs +101 -0
- package/dist/lib/media-buy/action-types.d.mts +106 -0
- package/dist/lib/media-buy/action-types.d.ts +106 -0
- package/dist/lib/{types/v3-1-beta/tools.generated.js → media-buy/action-types.js} +2 -2
- package/dist/lib/media-buy/actions.d.mts +6 -0
- package/dist/lib/media-buy/actions.d.ts +6 -0
- package/dist/lib/media-buy/actions.js +38 -0
- package/dist/lib/media-buy/actions.mjs +9 -0
- package/dist/lib/media-buy/available-actions.d.mts +2 -1
- package/dist/lib/media-buy/available-actions.d.ts +2 -1
- package/dist/lib/media-buy/available-actions.js +4 -3
- package/dist/lib/media-buy/available-actions.mjs +4 -3
- package/dist/lib/media-buy/compatibility.js +3 -0
- package/dist/lib/media-buy/compatibility.mjs +3 -0
- package/dist/lib/media-buy/index.d.mts +4 -0
- package/dist/lib/media-buy/index.d.ts +4 -0
- package/dist/lib/media-buy/index.js +3 -1
- package/dist/lib/media-buy/index.mjs +1 -0
- package/dist/lib/media-buy/legacy-action-ids.d.mts +1 -0
- package/dist/lib/media-buy/legacy-action-ids.d.ts +1 -0
- package/dist/lib/media-buy/legacy-action-ids.js +50 -0
- package/dist/lib/media-buy/legacy-action-ids.mjs +26 -0
- package/dist/lib/media-buy/mutations.d.mts +70 -0
- package/dist/lib/media-buy/mutations.d.ts +70 -0
- package/dist/lib/media-buy/mutations.js +525 -0
- package/dist/lib/media-buy/mutations.mjs +498 -0
- package/dist/lib/media-buy/preflight.d.mts +20 -69
- package/dist/lib/media-buy/preflight.d.ts +20 -69
- package/dist/lib/media-buy/preflight.js +100 -336
- package/dist/lib/media-buy/preflight.mjs +111 -333
- package/dist/lib/media-buy/targeting-input.d.mts +7 -4
- package/dist/lib/media-buy/targeting-input.d.ts +7 -4
- package/dist/lib/media-buy/types.d.mts +55 -7
- package/dist/lib/media-buy/types.d.ts +55 -7
- package/dist/lib/protocols/rawResponseCapture.d.mts +12 -0
- package/dist/lib/protocols/rawResponseCapture.d.ts +12 -0
- package/dist/lib/protocols/rawResponseCapture.js +33 -3
- package/dist/lib/protocols/rawResponseCapture.mjs +32 -3
- package/dist/lib/registry/types.generated.d.mts +377 -9
- package/dist/lib/registry/types.generated.d.ts +377 -9
- package/dist/lib/reporting/content-mismatch.d.mts +126 -0
- package/dist/lib/reporting/content-mismatch.d.ts +126 -0
- package/dist/lib/reporting/content-mismatch.js +90 -0
- package/dist/lib/reporting/content-mismatch.mjs +66 -0
- package/dist/lib/reporting/evidence.d.mts +1 -0
- package/dist/lib/reporting/evidence.d.ts +1 -0
- package/dist/lib/reporting/evidence.js +32 -3
- package/dist/lib/reporting/evidence.mjs +31 -3
- package/dist/lib/reporting/index.d.mts +3 -1
- package/dist/lib/reporting/index.d.ts +3 -1
- package/dist/lib/reporting/index.js +3 -0
- package/dist/lib/reporting/index.mjs +2 -0
- package/dist/lib/reporting/ledger/handler.d.mts +51 -1
- package/dist/lib/reporting/ledger/handler.d.ts +51 -1
- package/dist/lib/reporting/ledger/handler.js +306 -38
- package/dist/lib/reporting/ledger/handler.mjs +304 -37
- package/dist/lib/reporting/ledger/health.d.mts +12 -0
- package/dist/lib/reporting/ledger/health.d.ts +12 -0
- package/dist/lib/reporting/ledger/health.js +15 -2
- package/dist/lib/reporting/ledger/health.mjs +13 -1
- package/dist/lib/reporting/ledger/index.d.mts +3 -0
- package/dist/lib/reporting/ledger/index.d.ts +3 -0
- package/dist/lib/reporting/ledger/index.js +7 -1
- package/dist/lib/reporting/ledger/index.mjs +3 -0
- package/dist/lib/reporting/ledger/lifecycle.d.mts +31 -4
- package/dist/lib/reporting/ledger/lifecycle.d.ts +31 -4
- package/dist/lib/reporting/ledger/lifecycle.js +244 -37
- package/dist/lib/reporting/ledger/lifecycle.mjs +244 -37
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +231 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +231 -0
- package/dist/lib/reporting/ledger/managed-postgres.js +1797 -0
- package/dist/lib/reporting/ledger/managed-postgres.mjs +1776 -0
- package/dist/lib/reporting/ledger/managed.d.mts +355 -0
- package/dist/lib/reporting/ledger/managed.d.ts +355 -0
- package/dist/lib/reporting/ledger/managed.js +661 -0
- package/dist/lib/reporting/ledger/managed.mjs +633 -0
- package/dist/lib/reporting/ledger/notification-activity.d.mts +222 -0
- package/dist/lib/reporting/ledger/notification-activity.d.ts +222 -0
- package/dist/lib/reporting/ledger/notification-activity.js +1139 -0
- package/dist/lib/reporting/ledger/notification-activity.mjs +1110 -0
- package/dist/lib/reporting/ledger/postgres.d.mts +161 -1
- package/dist/lib/reporting/ledger/postgres.d.ts +161 -1
- package/dist/lib/reporting/ledger/postgres.js +1153 -21
- package/dist/lib/reporting/ledger/postgres.mjs +1152 -21
- package/dist/lib/reporting/ledger/producer.d.mts +8 -0
- package/dist/lib/reporting/ledger/producer.d.ts +8 -0
- package/dist/lib/reporting/ledger/producer.js +146 -52
- package/dist/lib/reporting/ledger/producer.mjs +146 -51
- package/dist/lib/reporting/ledger/types.d.mts +358 -1
- package/dist/lib/reporting/ledger/types.d.ts +358 -1
- package/dist/lib/reporting/ledger/types.js +3 -0
- package/dist/lib/reporting/ledger/types.mjs +2 -0
- package/dist/lib/reporting/reconciliation.d.mts +362 -2
- package/dist/lib/reporting/reconciliation.d.ts +362 -2
- package/dist/lib/reporting/reconciliation.js +1051 -7
- package/dist/lib/reporting/reconciliation.mjs +1053 -7
- package/dist/lib/reporting/service/conformance.d.mts +35 -0
- package/dist/lib/reporting/service/conformance.d.ts +35 -0
- package/dist/lib/reporting/service/conformance.js +89 -0
- package/dist/lib/reporting/service/conformance.mjs +68 -0
- package/dist/lib/reporting/service/index.d.mts +182 -0
- package/dist/lib/reporting/service/index.d.ts +182 -0
- package/dist/lib/reporting/service/index.js +793 -0
- package/dist/lib/reporting/service/index.mjs +787 -0
- package/dist/lib/reporting/source/index.d.mts +2 -1
- package/dist/lib/reporting/source/index.d.ts +2 -1
- package/dist/lib/reporting/source/index.js +16 -3
- package/dist/lib/reporting/source/index.mjs +12 -1
- package/dist/lib/reporting/source/inline.d.mts +88 -1
- package/dist/lib/reporting/source/inline.d.ts +88 -1
- package/dist/lib/reporting/source/inline.js +1161 -163
- package/dist/lib/reporting/source/inline.mjs +1166 -163
- package/dist/lib/reporting/source/manifest.js +12 -7
- package/dist/lib/reporting/source/manifest.mjs +12 -7
- package/dist/lib/reporting/source/source.d.mts +26 -0
- package/dist/lib/reporting/source/source.d.ts +26 -0
- package/dist/lib/reporting/source/source.js +71 -2
- package/dist/lib/reporting/source/source.mjs +65 -1
- package/dist/lib/schemas/index.d.mts +22 -1
- package/dist/lib/schemas/index.d.ts +22 -1
- package/dist/lib/schemas/index.js +7 -0
- package/dist/lib/schemas/index.mjs +7 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/create-adcp-server.d.mts +18 -0
- package/dist/lib/server/create-adcp-server.d.ts +18 -0
- package/dist/lib/server/create-adcp-server.js +52 -2
- package/dist/lib/server/create-adcp-server.mjs +52 -2
- package/dist/lib/server/decisioning/account.d.mts +1 -1
- package/dist/lib/server/decisioning/account.d.ts +1 -1
- package/dist/lib/server/decisioning/index.d.mts +1 -0
- package/dist/lib/server/decisioning/index.d.ts +1 -0
- package/dist/lib/server/decisioning/platform.d.mts +3 -0
- package/dist/lib/server/decisioning/platform.d.ts +3 -0
- package/dist/lib/server/decisioning/runtime/from-platform.js +88 -10
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +88 -10
- package/dist/lib/server/decisioning/specialisms/reporting.d.mts +38 -0
- package/dist/lib/server/decisioning/specialisms/reporting.d.ts +38 -0
- package/dist/lib/{types/v3-1-beta/index.js → server/decisioning/specialisms/reporting.js} +2 -8
- package/dist/lib/server/decisioning/specialisms/reporting.mjs +0 -0
- package/dist/lib/server/index.d.mts +4 -2
- package/dist/lib/server/index.d.ts +4 -2
- package/dist/lib/server/index.js +5 -0
- package/dist/lib/server/index.mjs +4 -0
- package/dist/lib/server/media-buy-action-resolver.d.mts +63 -0
- package/dist/lib/server/media-buy-action-resolver.d.ts +63 -0
- package/dist/lib/server/media-buy-action-resolver.js +297 -0
- package/dist/lib/server/media-buy-action-resolver.mjs +285 -0
- package/dist/lib/server/media-buy-actions.d.mts +7 -8
- package/dist/lib/server/media-buy-actions.d.ts +7 -8
- package/dist/lib/server/media-buy-actions.js +57 -14
- package/dist/lib/server/media-buy-actions.mjs +63 -14
- package/dist/lib/server/notification-subscriptions/index.d.mts +2 -2
- package/dist/lib/server/notification-subscriptions/index.d.ts +2 -2
- package/dist/lib/server/notification-subscriptions/index.js +2 -0
- package/dist/lib/server/notification-subscriptions/index.mjs +2 -0
- package/dist/lib/server/notification-subscriptions/postgres-runtime.d.mts +3 -1
- package/dist/lib/server/notification-subscriptions/postgres-runtime.d.ts +3 -1
- package/dist/lib/server/notification-subscriptions/postgres-runtime.js +1 -0
- package/dist/lib/server/notification-subscriptions/postgres-runtime.mjs +1 -0
- package/dist/lib/server/notification-subscriptions/runtime.d.mts +12 -1
- package/dist/lib/server/notification-subscriptions/runtime.d.ts +12 -1
- package/dist/lib/server/notification-subscriptions/runtime.js +102 -16
- package/dist/lib/server/notification-subscriptions/runtime.mjs +101 -16
- package/dist/lib/server/notification-subscriptions/types.d.mts +104 -1
- package/dist/lib/server/notification-subscriptions/types.d.ts +104 -1
- package/dist/lib/server/webhook-emitter.d.mts +40 -5
- package/dist/lib/server/webhook-emitter.d.ts +40 -5
- package/dist/lib/server/webhook-emitter.js +23 -12
- package/dist/lib/server/webhook-emitter.mjs +23 -12
- package/dist/lib/storage/interfaces.d.mts +14 -2
- package/dist/lib/storage/interfaces.d.ts +14 -2
- package/dist/lib/testing/compliance/comply.d.mts +9 -3
- package/dist/lib/testing/compliance/comply.d.ts +9 -3
- package/dist/lib/testing/compliance/comply.js +158 -3
- package/dist/lib/testing/compliance/comply.mjs +159 -4
- package/dist/lib/testing/compliance/storyboard-tracks.js +7 -5
- package/dist/lib/testing/compliance/storyboard-tracks.mjs +7 -5
- package/dist/lib/testing/compliance/summary.js +10 -1
- package/dist/lib/testing/compliance/summary.mjs +10 -1
- package/dist/lib/testing/index.d.mts +1 -1
- package/dist/lib/testing/index.d.ts +1 -1
- package/dist/lib/testing/index.js +2 -0
- package/dist/lib/testing/index.mjs +3 -1
- package/dist/lib/testing/storyboard/agent-routing.d.mts +12 -43
- package/dist/lib/testing/storyboard/agent-routing.d.ts +12 -43
- package/dist/lib/testing/storyboard/agent-routing.js +75 -13
- package/dist/lib/testing/storyboard/agent-routing.mjs +70 -12
- package/dist/lib/testing/storyboard/index.d.mts +1 -0
- package/dist/lib/testing/storyboard/index.d.ts +1 -0
- package/dist/lib/testing/storyboard/index.js +3 -0
- package/dist/lib/testing/storyboard/index.mjs +2 -0
- package/dist/lib/testing/storyboard/junit.d.mts +1 -1
- package/dist/lib/testing/storyboard/junit.d.ts +1 -1
- package/dist/lib/testing/storyboard/junit.js +21 -2
- package/dist/lib/testing/storyboard/junit.mjs +21 -2
- package/dist/lib/testing/storyboard/probes.d.mts +130 -0
- package/dist/lib/testing/storyboard/probes.d.ts +130 -0
- package/dist/lib/testing/storyboard/probes.js +682 -10
- package/dist/lib/testing/storyboard/probes.mjs +683 -3
- package/dist/lib/testing/storyboard/request-signing/builder.d.mts +16 -5
- package/dist/lib/testing/storyboard/request-signing/builder.d.ts +16 -5
- package/dist/lib/testing/storyboard/request-signing/grader.d.mts +44 -1
- package/dist/lib/testing/storyboard/request-signing/grader.d.ts +44 -1
- package/dist/lib/testing/storyboard/request-signing/grader.js +46 -22
- package/dist/lib/testing/storyboard/request-signing/grader.mjs +43 -21
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.d.mts +86 -11
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.d.ts +86 -11
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.js +119 -25
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.mjs +117 -26
- package/dist/lib/testing/storyboard/request-signing/synthesize.js +22 -2
- package/dist/lib/testing/storyboard/request-signing/synthesize.mjs +22 -2
- package/dist/lib/testing/storyboard/runner.d.mts +103 -0
- package/dist/lib/testing/storyboard/runner.d.ts +103 -0
- package/dist/lib/testing/storyboard/runner.js +1090 -268
- package/dist/lib/testing/storyboard/runner.mjs +1096 -261
- package/dist/lib/testing/storyboard/seeding.d.mts +4 -1
- package/dist/lib/testing/storyboard/seeding.d.ts +4 -1
- package/dist/lib/testing/storyboard/seeding.js +55 -24
- package/dist/lib/testing/storyboard/seeding.mjs +55 -24
- package/dist/lib/testing/storyboard/test-kit.d.mts +37 -3
- package/dist/lib/testing/storyboard/test-kit.d.ts +37 -3
- package/dist/lib/testing/storyboard/test-kit.js +8 -2
- package/dist/lib/testing/storyboard/test-kit.mjs +7 -2
- package/dist/lib/testing/storyboard/types.d.mts +132 -10
- package/dist/lib/testing/storyboard/types.d.ts +132 -10
- package/dist/lib/testing/storyboard/types.js +17 -0
- package/dist/lib/testing/storyboard/types.mjs +16 -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 +16 -0
- package/dist/lib/testing/storyboard/validations.mjs +16 -0
- package/dist/lib/testing/test-controller.d.mts +1 -1
- package/dist/lib/testing/test-controller.d.ts +1 -1
- package/dist/lib/types/buy-products.d.ts +71 -6
- package/dist/lib/types/control-media-buy.d.ts +25 -11
- package/dist/lib/types/core.generated.d.mts +69 -10
- package/dist/lib/types/core.generated.d.ts +69 -10
- package/dist/lib/types/create-media-buy.d.ts +71 -6
- package/dist/lib/types/forward-compat-error-codes.d.mts +7 -6
- package/dist/lib/types/forward-compat-error-codes.d.ts +7 -6
- package/dist/lib/types/index.d.mts +2 -2
- package/dist/lib/types/index.d.ts +2 -2
- package/dist/lib/types/schemas.generated.d.ts +8040 -8116
- package/dist/lib/types/schemas.generated.js +1074 -309
- package/dist/lib/types/schemas.generated.mjs +1068 -309
- package/dist/lib/types/tools.generated.d.mts +65 -6
- package/dist/lib/types/tools.generated.d.ts +65 -6
- package/dist/lib/types/update-media-buy.d.ts +71 -6
- package/dist/lib/utils/redact-secrets.d.mts +1 -1
- package/dist/lib/utils/redact-secrets.d.ts +1 -1
- package/dist/lib/utils/redact-secrets.js +1 -1
- package/dist/lib/utils/redact-secrets.mjs +1 -1
- package/dist/lib/v2/projection/cache-versions.d.mts +0 -1
- package/dist/lib/v2/projection/cache-versions.d.ts +0 -1
- package/dist/lib/v2/projection/cache-versions.js +1 -15
- package/dist/lib/v2/projection/cache-versions.mjs +1 -14
- package/dist/lib/v2/projection/canonical-properties.js +2 -2
- package/dist/lib/v2/projection/canonical-properties.mjs +3 -3
- package/dist/lib/v2/projection/registry.d.mts +1 -1
- package/dist/lib/v2/projection/registry.d.ts +1 -1
- package/dist/lib/v2/projection/registry.js +2 -2
- package/dist/lib/v2/projection/registry.mjs +3 -3
- package/dist/lib/validation/schema-loader.d.mts +9 -1
- package/dist/lib/validation/schema-loader.d.ts +9 -1
- package/dist/lib/validation/schema-loader.js +65 -8
- package/dist/lib/validation/schema-loader.mjs +64 -8
- package/dist/lib/version.d.mts +5 -5
- package/dist/lib/version.d.ts +5 -5
- package/dist/lib/version.js +3 -8
- package/dist/lib/version.mjs +3 -8
- package/dist/lib/wholesale-feed-sync/index.d.mts +1 -0
- package/dist/lib/wholesale-feed-sync/index.d.ts +1 -0
- package/dist/lib/wholesale-feed-sync/protocol-types.d.mts +42 -0
- package/dist/lib/wholesale-feed-sync/protocol-types.d.ts +42 -0
- package/dist/lib/wholesale-feed-sync/protocol-types.js +16 -0
- package/dist/lib/wholesale-feed-sync/protocol-types.mjs +0 -0
- package/dist/lib/wholesale-feed-sync/sync.d.mts +6 -6
- package/dist/lib/wholesale-feed-sync/sync.d.ts +6 -6
- package/dist/lib/wholesale-feed-sync/sync.js +3 -1
- package/dist/lib/wholesale-feed-sync/sync.mjs +3 -1
- package/dist/lib/wholesale-feed-sync/types.d.mts +15 -14
- package/dist/lib/wholesale-feed-sync/types.d.ts +15 -14
- package/dist/lib/wholesale-feed-sync/webhook-notification.d.mts +7 -5
- package/dist/lib/wholesale-feed-sync/webhook-notification.d.ts +7 -5
- package/dist/lib/wholesale-feed-sync/webhook-notification.js +45 -0
- package/dist/lib/wholesale-feed-sync/webhook-notification.mjs +44 -0
- package/docs/CLI.md +1 -1
- package/docs/TYPE-SUMMARY.md +118 -4
- package/docs/guides/ASYNC-API-REFERENCE.md +62 -1
- package/docs/guides/ASYNC-DEVELOPER-GUIDE.md +25 -0
- package/docs/guides/ASYNC-DOCUMENTATION-INDEX.md +3 -0
- package/docs/guides/BUYER-QUICKSTART-3.2.md +5 -0
- package/docs/guides/DURABLE-BUYER-WRITES.md +337 -0
- package/docs/guides/EXISTING-PLATFORM.md +80 -1
- package/docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md +57 -0
- package/docs/guides/MEDIA-BUY-ACTION-ASSESSMENT.md +300 -0
- package/docs/guides/REPORTING-LEDGER.md +654 -3
- package/docs/guides/REPORTING-RECONCILIATION.md +50 -0
- package/docs/guides/REPORTING-SOURCE-EXECUTOR.md +63 -1
- package/docs/guides/SELLER-QUICKSTART-3.2.md +2 -0
- package/docs/guides/VALIDATE-YOUR-AGENT.md +35 -0
- package/docs/guides/idempotency-crash-recovery.md +4 -0
- package/docs/llms.txt +4 -2
- package/docs/migration-14.x-rc-worksheet.md +60 -5
- package/docs/migration-7.9-to-7.10.md +7 -5
- package/examples/README.md +17 -0
- package/examples/durable-buyer-writes/caller.ts +745 -0
- package/examples/durable-buyer-writes/worker.ts +240 -0
- package/examples/reliable-reporting-service/README.md +100 -0
- package/examples/seller-3.2-starter.ts +7 -8
- package/examples/targeting-input-existing-platform.ts +153 -0
- package/package.json +41 -29
- package/skills/build-seller-agent/SKILL.md +2 -0
- package/skills/build-seller-agent/specialisms/signed-requests.md +11 -1
- package/skills/cross-cutting.md +28 -11
- package/compliance/cache/3.1.0-beta.7/domains/brand/index.yaml +0 -160
- package/compliance/cache/3.1.0-beta.7/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -415
- package/compliance/cache/3.1.0-beta.7/domains/brand/scenarios/single_side_trust_extension.yaml +0 -454
- package/compliance/cache/3.1.0-beta.7/domains/creative/index.yaml +0 -339
- package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/billing_out_of_band.yaml +0 -153
- package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -389
- package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/native_in_feed.yaml +0 -543
- package/compliance/cache/3.1.0-beta.7/domains/governance/index.yaml +0 -682
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/index.yaml +0 -781
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -380
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/available_actions.yaml +0 -565
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -354
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/canonical_formats.yaml +0 -711
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -264
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -344
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -234
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -419
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/creative_reception.yaml +0 -247
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/delivery_reporting.yaml +0 -357
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/dependency_impairment.yaml +0 -633
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -800
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -399
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -309
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_approved.yaml +0 -214
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_conditions.yaml +0 -199
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_denied.yaml +0 -204
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -252
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/invalid_transitions.yaml +0 -289
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -148
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -276
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/measurement_accountability.yaml +0 -244
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -203
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -274
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -500
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -428
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -470
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -373
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_finalize.yaml +0 -399
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -264
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -257
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -333
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -517
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -294
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -823
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -360
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/refine_products.yaml +0 -148
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -293
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -307
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -576
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/state-machine.yaml +0 -442
- package/compliance/cache/3.1.0-beta.7/domains/signals/index.yaml +0 -266
- package/compliance/cache/3.1.0-beta.7/domains/sponsored-intelligence/index.yaml +0 -256
- package/compliance/cache/3.1.0-beta.7/index.json +0 -356
- package/compliance/cache/3.1.0-beta.7/protocols/brand/index.yaml +0 -160
- package/compliance/cache/3.1.0-beta.7/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -415
- package/compliance/cache/3.1.0-beta.7/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -454
- package/compliance/cache/3.1.0-beta.7/protocols/creative/index.yaml +0 -339
- package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/billing_out_of_band.yaml +0 -153
- package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -389
- package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/native_in_feed.yaml +0 -543
- package/compliance/cache/3.1.0-beta.7/protocols/governance/index.yaml +0 -682
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/index.yaml +0 -781
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -380
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/available_actions.yaml +0 -565
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -354
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/canonical_formats.yaml +0 -711
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -264
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -344
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -234
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -419
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/creative_reception.yaml +0 -247
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -357
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -633
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -800
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -399
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -309
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_approved.yaml +0 -214
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_conditions.yaml +0 -199
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_denied.yaml +0 -204
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -252
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -289
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -148
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -276
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -244
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -203
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -274
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -500
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -428
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -470
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -373
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -399
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -264
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -257
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -333
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -517
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -294
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -823
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -360
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/refine_products.yaml +0 -148
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -293
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -307
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -576
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/state-machine.yaml +0 -442
- package/compliance/cache/3.1.0-beta.7/protocols/signals/index.yaml +0 -266
- package/compliance/cache/3.1.0-beta.7/protocols/sponsored-intelligence/index.yaml +0 -256
- package/compliance/cache/3.1.0-beta.7/specialisms/audience-sync/index.yaml +0 -313
- package/compliance/cache/3.1.0-beta.7/specialisms/brand-rights/index.yaml +0 -350
- package/compliance/cache/3.1.0-beta.7/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -226
- package/compliance/cache/3.1.0-beta.7/specialisms/collection-lists/index.yaml +0 -359
- package/compliance/cache/3.1.0-beta.7/specialisms/content-standards/index.yaml +0 -572
- package/compliance/cache/3.1.0-beta.7/specialisms/creative-ad-server/index.yaml +0 -409
- package/compliance/cache/3.1.0-beta.7/specialisms/creative-generative/generative-seller.yaml +0 -807
- package/compliance/cache/3.1.0-beta.7/specialisms/creative-generative/index.yaml +0 -758
- package/compliance/cache/3.1.0-beta.7/specialisms/creative-template/index.yaml +0 -510
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-aware-seller/index.yaml +0 -143
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -117
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-delivery-monitor/index.yaml +0 -441
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-spend-authority/denied.yaml +0 -221
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-spend-authority/index.yaml +0 -330
- package/compliance/cache/3.1.0-beta.7/specialisms/property-lists/index.yaml +0 -482
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-broadcast-tv/index.yaml +0 -738
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-catalog-driven/index.yaml +0 -840
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-guaranteed/index.yaml +0 -601
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-non-guaranteed/index.yaml +0 -546
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-proposal-mode/index.yaml +0 -586
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-social/index.yaml +0 -919
- package/compliance/cache/3.1.0-beta.7/specialisms/signal-marketplace/index.yaml +0 -424
- package/compliance/cache/3.1.0-beta.7/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -211
- package/compliance/cache/3.1.0-beta.7/specialisms/signal-owned/index.yaml +0 -317
- package/compliance/cache/3.1.0-beta.7/specialisms/sponsored-intelligence/index.yaml +0 -59
- package/compliance/cache/3.1.0-beta.7/test-kits/acme-outdoor-live.yaml +0 -78
- package/compliance/cache/3.1.0-beta.7/test-kits/acme-outdoor.yaml +0 -223
- package/compliance/cache/3.1.0-beta.7/test-kits/billing-gate-runner.yaml +0 -115
- package/compliance/cache/3.1.0-beta.7/test-kits/bistro-oranje.yaml +0 -126
- package/compliance/cache/3.1.0-beta.7/test-kits/distributed-brand-runner.yaml +0 -281
- package/compliance/cache/3.1.0-beta.7/test-kits/nova-motors.yaml +0 -262
- package/compliance/cache/3.1.0-beta.7/test-kits/osei-natural.yaml +0 -126
- package/compliance/cache/3.1.0-beta.7/test-kits/parallel-dispatch-runner.yaml +0 -196
- package/compliance/cache/3.1.0-beta.7/test-kits/rate-limit-trip-runner.yaml +0 -172
- package/compliance/cache/3.1.0-beta.7/test-kits/signed-requests-runner.yaml +0 -155
- package/compliance/cache/3.1.0-beta.7/test-kits/single-side-trust-runner.yaml +0 -294
- package/compliance/cache/3.1.0-beta.7/test-kits/substitution-observer-runner.yaml +0 -688
- package/compliance/cache/3.1.0-beta.7/test-kits/summit-foods.yaml +0 -125
- package/compliance/cache/3.1.0-beta.7/test-kits/webhook-receiver-runner.yaml +0 -265
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/001-minimal-plan.json +0 -43
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/002-full-plan.json +0 -217
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -60
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/004a-human-review-omitted.json +0 -43
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -49
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -53
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -57
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -49
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -53
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/007-unicode-objectives.json +0 -43
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -65
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/README.md +0 -220
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/canonicalization.json +0 -241
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/keys.json +0 -60
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/001-no-signature-header.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/002-wrong-tag.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/003-expired-signature.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/004-window-too-long.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -27
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -33
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/011-malformed-header.json +0 -27
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/013-expires-le-created.json +0 -27
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -27
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/015-signature-invalid.json +0 -28
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -35
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/017-key-revoked.json +0 -38
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -28
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/020-rate-abuse.json +0 -34
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -32
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -43
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -25
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/001-basic-post.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/003-es256-post.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/README.md +0 -211
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/keys.json +0 -61
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -25
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -25
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -37
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -32
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -33
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -32
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -41
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/001-basic-post.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/002-es256-post.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -25
- package/compliance/cache/3.1.0-beta.7/universal/billing-gate-dispatch.yaml +0 -450
- package/compliance/cache/3.1.0-beta.7/universal/canonical-format-validate-input.yaml +0 -640
- package/compliance/cache/3.1.0-beta.7/universal/capability-discovery.yaml +0 -125
- package/compliance/cache/3.1.0-beta.7/universal/collection-lists-pagination-integrity.yaml +0 -306
- package/compliance/cache/3.1.0-beta.7/universal/comply-controller-mode-gate.yaml +0 -141
- package/compliance/cache/3.1.0-beta.7/universal/content-standards-pagination-integrity.yaml +0 -326
- package/compliance/cache/3.1.0-beta.7/universal/deterministic-testing.yaml +0 -1430
- package/compliance/cache/3.1.0-beta.7/universal/error-compliance-signals.yaml +0 -377
- package/compliance/cache/3.1.0-beta.7/universal/error-compliance.yaml +0 -528
- package/compliance/cache/3.1.0-beta.7/universal/fictional-entities.yaml +0 -307
- package/compliance/cache/3.1.0-beta.7/universal/get-media-buys-pagination-integrity.yaml +0 -160
- package/compliance/cache/3.1.0-beta.7/universal/get-signals-pagination-integrity.yaml +0 -211
- package/compliance/cache/3.1.0-beta.7/universal/idempotency.yaml +0 -861
- package/compliance/cache/3.1.0-beta.7/universal/notification-config-event-scope.yaml +0 -119
- package/compliance/cache/3.1.0-beta.7/universal/notification-config-lifecycle.yaml +0 -337
- package/compliance/cache/3.1.0-beta.7/universal/notification-config-rejections.yaml +0 -107
- package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity-creative-formats.yaml +0 -265
- package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity-list-accounts.yaml +0 -245
- package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity.yaml +0 -263
- package/compliance/cache/3.1.0-beta.7/universal/property-lists-pagination-integrity.yaml +0 -307
- package/compliance/cache/3.1.0-beta.7/universal/read-tool-idempotency.yaml +0 -405
- package/compliance/cache/3.1.0-beta.7/universal/runner-output-contract.yaml +0 -1266
- package/compliance/cache/3.1.0-beta.7/universal/schema-validation-signals.yaml +0 -181
- package/compliance/cache/3.1.0-beta.7/universal/schema-validation.yaml +0 -548
- package/compliance/cache/3.1.0-beta.7/universal/security.yaml +0 -539
- package/compliance/cache/3.1.0-beta.7/universal/signed-requests.yaml +0 -217
- package/compliance/cache/3.1.0-beta.7/universal/stale-response-advisory.yaml +0 -295
- package/compliance/cache/3.1.0-beta.7/universal/storyboard-schema.yaml +0 -2136
- package/compliance/cache/3.1.0-beta.7/universal/v3-envelope-integrity.yaml +0 -117
- package/compliance/cache/3.1.0-beta.7/universal/version-negotiation.yaml +0 -130
- package/compliance/cache/3.1.0-beta.7/universal/webhook-emission.yaml +0 -411
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-bulk-webhooks.yaml +0 -82
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-product-webhooks.yaml +0 -83
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-products.yaml +0 -151
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-signal-webhooks.yaml +0 -83
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-signals.yaml +0 -149
- package/dist/lib/types/v3-1-beta/index.d.mts +0 -1
- package/dist/lib/types/v3-1-beta/index.d.ts +0 -1
- package/dist/lib/types/v3-1-beta/index.mjs +0 -1
- package/dist/lib/types/v3-1-beta/tools.generated.d.mts +0 -26788
- package/dist/lib/types/v3-1-beta/tools.generated.d.ts +0 -26788
- /package/dist/lib/{types/v3-1-beta/tools.generated.mjs → media-buy/action-types.mjs} +0 -0
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
import { ValidationError } from "../errors/index.mjs";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
withActionProposal,
|
|
4
|
+
liveActionIssues,
|
|
5
|
+
liveActionFitsVersion,
|
|
6
|
+
mediaBuyActionTasks,
|
|
7
|
+
packageActionStatus,
|
|
8
|
+
actionAllowedStatuses
|
|
9
|
+
} from "./action-contracts.mjs";
|
|
10
|
+
import { assessActionAvailability } from "./action-assessment.mjs";
|
|
11
|
+
import {
|
|
12
|
+
findAvailableAction,
|
|
13
|
+
getAvailableActions,
|
|
14
|
+
getRollupParent
|
|
15
|
+
} from "./available-actions.mjs";
|
|
16
|
+
import { CANONICAL_ACTION_TASKS } from "./action-metadata.generated.mjs";
|
|
17
|
+
import {
|
|
18
|
+
decomposeUpdateMediaBuy,
|
|
19
|
+
hasUnmappedMutation
|
|
20
|
+
} from "./mutations.mjs";
|
|
21
|
+
export * from "./mutations.mjs";
|
|
22
|
+
function tasksForLegacyMutation(action) {
|
|
23
|
+
const direct = mediaBuyActionTasks(action);
|
|
24
|
+
if (direct.length) return direct;
|
|
25
|
+
const children = Object.keys(CANONICAL_ACTION_TASKS).filter(
|
|
26
|
+
(child) => getRollupParent(child) === action
|
|
27
|
+
);
|
|
28
|
+
if (!children.length) return [];
|
|
29
|
+
return mediaBuyActionTasks(children[0]).filter(
|
|
30
|
+
(task) => children.every((child) => mediaBuyActionTasks(child).includes(task))
|
|
31
|
+
);
|
|
32
|
+
}
|
|
4
33
|
function isAvailable(buy, action) {
|
|
5
34
|
return findAvailableAction(buy, action, { silent: true }) !== void 0;
|
|
6
35
|
}
|
|
@@ -21,340 +50,23 @@ const canUpdateCreativeAssignments = (buy) => isAvailable(buy, "update_creative_
|
|
|
21
50
|
const canAddPackages = (buy) => isAvailable(buy, "add_packages");
|
|
22
51
|
const canRemovePackages = (buy) => isAvailable(buy, "remove_packages");
|
|
23
52
|
const canRemoveCreative = (buy) => isAvailable(buy, "remove_creative");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
function decomposeUpdateMediaBuy(currentBuy, request) {
|
|
29
|
-
const mutations = [];
|
|
30
|
-
const currentPackages = /* @__PURE__ */ new Map();
|
|
31
|
-
for (const pkg of currentBuy.packages ?? []) {
|
|
32
|
-
if (pkg.package_id) currentPackages.set(pkg.package_id, pkg);
|
|
33
|
-
}
|
|
34
|
-
const push = (mutation) => {
|
|
35
|
-
mutations.push(mutation);
|
|
36
|
-
};
|
|
37
|
-
if (request.paused !== void 0) {
|
|
38
|
-
push({
|
|
39
|
-
action: request.paused === false ? "resume" : "pause",
|
|
40
|
-
field: "paused",
|
|
41
|
-
path: "paused",
|
|
42
|
-
scope: "buy",
|
|
43
|
-
to: request.paused
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
if (request.canceled !== void 0) {
|
|
47
|
-
push({
|
|
48
|
-
action: "cancel",
|
|
49
|
-
field: "canceled",
|
|
50
|
-
path: "canceled",
|
|
51
|
-
scope: "buy",
|
|
52
|
-
to: request.canceled
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
if (request.cancellation_reason !== void 0) {
|
|
56
|
-
push({
|
|
57
|
-
action: "cancel",
|
|
58
|
-
field: "cancellation_reason",
|
|
59
|
-
path: "cancellation_reason",
|
|
60
|
-
scope: "buy",
|
|
61
|
-
to: request.cancellation_reason
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
if (request.start_time !== void 0) {
|
|
65
|
-
push({
|
|
66
|
-
action: "update_flight_dates",
|
|
67
|
-
direction: "shift",
|
|
68
|
-
field: "start_time",
|
|
69
|
-
path: "start_time",
|
|
70
|
-
scope: "buy",
|
|
71
|
-
from: currentBuy.start_time,
|
|
72
|
-
to: request.start_time
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
if (request.end_time !== void 0) {
|
|
76
|
-
const pick = resolveFlightEndDirection(currentBuy, request, "end_time");
|
|
77
|
-
push({
|
|
78
|
-
...pick,
|
|
79
|
-
field: "end_time",
|
|
80
|
-
path: "end_time",
|
|
81
|
-
scope: "buy",
|
|
82
|
-
from: currentBuy.end_time,
|
|
83
|
-
to: request.end_time
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
if (request.frequency_cap !== void 0) {
|
|
87
|
-
const [frequencyCapAction] = ACTIONS_BY_FIELD["frequency_cap"] ?? [];
|
|
88
|
-
if (frequencyCapAction) {
|
|
89
|
-
push({
|
|
90
|
-
action: frequencyCapAction,
|
|
91
|
-
field: "frequency_cap",
|
|
92
|
-
path: "frequency_cap",
|
|
93
|
-
scope: "buy",
|
|
94
|
-
to: request.frequency_cap
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (request.new_packages !== void 0 && request.new_packages.length > 0) {
|
|
99
|
-
push({
|
|
100
|
-
action: "add_packages",
|
|
101
|
-
field: "new_packages",
|
|
102
|
-
path: "new_packages",
|
|
103
|
-
scope: "packages",
|
|
104
|
-
to: request.new_packages
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
if (request.packages) {
|
|
108
|
-
const budgetPick = resolveBudgetDirection(currentBuy, request);
|
|
109
|
-
const packageEndPick = resolveFlightEndDirection(currentBuy, request, "packages[].end_time");
|
|
110
|
-
request.packages.forEach((pkg, index) => {
|
|
111
|
-
const currentPkg = currentPackages.get(pkg.package_id);
|
|
112
|
-
const base = {
|
|
113
|
-
scope: "package",
|
|
114
|
-
package_id: pkg.package_id,
|
|
115
|
-
package_index: index
|
|
116
|
-
};
|
|
117
|
-
if (pkg.canceled !== void 0) {
|
|
118
|
-
push({
|
|
119
|
-
action: "remove_packages",
|
|
120
|
-
field: "packages[].canceled",
|
|
121
|
-
path: `packages[${index}].canceled`,
|
|
122
|
-
...base,
|
|
123
|
-
to: pkg.canceled
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
if (pkg.budget !== void 0) {
|
|
127
|
-
push({
|
|
128
|
-
...budgetPick,
|
|
129
|
-
field: "packages[].budget",
|
|
130
|
-
path: `packages[${index}].budget`,
|
|
131
|
-
...base,
|
|
132
|
-
from: currentPkg?.budget,
|
|
133
|
-
to: pkg.budget
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
if (pkg.pacing !== void 0) {
|
|
137
|
-
push({
|
|
138
|
-
action: "update_pacing",
|
|
139
|
-
field: "packages[].pacing",
|
|
140
|
-
path: `packages[${index}].pacing`,
|
|
141
|
-
...base,
|
|
142
|
-
to: pkg.pacing
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
if (pkg.start_time !== void 0) {
|
|
146
|
-
push({
|
|
147
|
-
action: "update_flight_dates",
|
|
148
|
-
direction: "shift",
|
|
149
|
-
field: "packages[].start_time",
|
|
150
|
-
path: `packages[${index}].start_time`,
|
|
151
|
-
...base,
|
|
152
|
-
from: currentPkg?.start_time,
|
|
153
|
-
to: pkg.start_time
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
if (pkg.end_time !== void 0) {
|
|
157
|
-
push({
|
|
158
|
-
...packageEndPick,
|
|
159
|
-
field: "packages[].end_time",
|
|
160
|
-
path: `packages[${index}].end_time`,
|
|
161
|
-
...base,
|
|
162
|
-
from: currentPkg?.end_time,
|
|
163
|
-
to: pkg.end_time
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
if (pkg.creative_assignments !== void 0) {
|
|
167
|
-
push({
|
|
168
|
-
action: "update_creative_assignments",
|
|
169
|
-
field: "packages[].creative_assignments",
|
|
170
|
-
path: `packages[${index}].creative_assignments`,
|
|
171
|
-
...base,
|
|
172
|
-
to: pkg.creative_assignments
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
if (pkg.creatives !== void 0) {
|
|
176
|
-
push({
|
|
177
|
-
action: "replace_creative",
|
|
178
|
-
field: "packages[].creatives",
|
|
179
|
-
path: `packages[${index}].creatives`,
|
|
180
|
-
...base,
|
|
181
|
-
to: pkg.creatives
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
if (pkg.keyword_targets_add !== void 0) {
|
|
185
|
-
push({
|
|
186
|
-
action: "update_targeting",
|
|
187
|
-
field: "packages[].keyword_targets_add",
|
|
188
|
-
path: `packages[${index}].keyword_targets_add`,
|
|
189
|
-
...base,
|
|
190
|
-
to: pkg.keyword_targets_add
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
if (pkg.keyword_targets_remove !== void 0) {
|
|
194
|
-
push({
|
|
195
|
-
action: "update_targeting",
|
|
196
|
-
field: "packages[].keyword_targets_remove",
|
|
197
|
-
path: `packages[${index}].keyword_targets_remove`,
|
|
198
|
-
...base,
|
|
199
|
-
to: pkg.keyword_targets_remove
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
if (pkg.negative_keywords_add !== void 0) {
|
|
203
|
-
push({
|
|
204
|
-
action: "update_targeting",
|
|
205
|
-
field: "packages[].negative_keywords_add",
|
|
206
|
-
path: `packages[${index}].negative_keywords_add`,
|
|
207
|
-
...base,
|
|
208
|
-
to: pkg.negative_keywords_add
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
if (pkg.negative_keywords_remove !== void 0) {
|
|
212
|
-
push({
|
|
213
|
-
action: "update_targeting",
|
|
214
|
-
field: "packages[].negative_keywords_remove",
|
|
215
|
-
path: `packages[${index}].negative_keywords_remove`,
|
|
216
|
-
...base,
|
|
217
|
-
to: pkg.negative_keywords_remove
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
if (pkg.targeting_overlay !== void 0) {
|
|
221
|
-
const overlayKeys = Object.keys(pkg.targeting_overlay);
|
|
222
|
-
if (overlayKeys.length === 1 && overlayKeys[0] === "frequency_cap") {
|
|
223
|
-
push({
|
|
224
|
-
action: "update_frequency_caps",
|
|
225
|
-
field: "packages[].targeting_overlay.frequency_cap",
|
|
226
|
-
path: `packages[${index}].targeting_overlay.frequency_cap`,
|
|
227
|
-
...base,
|
|
228
|
-
to: pkg.targeting_overlay.frequency_cap
|
|
229
|
-
});
|
|
230
|
-
} else {
|
|
231
|
-
push({
|
|
232
|
-
action: "update_targeting",
|
|
233
|
-
field: "packages[].targeting_overlay",
|
|
234
|
-
path: `packages[${index}].targeting_overlay`,
|
|
235
|
-
...base,
|
|
236
|
-
to: pkg.targeting_overlay
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
return {
|
|
243
|
-
mutations,
|
|
244
|
-
actions: aggregateResolvedActions(mutations),
|
|
245
|
-
touched_fields: uniqueFields(mutations)
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
function aggregateResolvedActions(mutations) {
|
|
249
|
-
const resolved = /* @__PURE__ */ new Map();
|
|
250
|
-
for (const mutation of mutations) {
|
|
251
|
-
const existing = resolved.get(mutation.action);
|
|
252
|
-
if (existing) {
|
|
253
|
-
if (existing.direction === void 0 && mutation.direction !== void 0) {
|
|
254
|
-
existing.direction = mutation.direction;
|
|
255
|
-
}
|
|
256
|
-
if (!existing.touched_fields.includes(mutation.field)) {
|
|
257
|
-
existing.touched_fields.push(mutation.field);
|
|
258
|
-
}
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
resolved.set(mutation.action, {
|
|
262
|
-
action: mutation.action,
|
|
263
|
-
direction: mutation.direction,
|
|
264
|
-
touched_fields: [mutation.field]
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
return [...resolved.values()];
|
|
268
|
-
}
|
|
269
|
-
function uniqueFields(mutations) {
|
|
270
|
-
const fields = [];
|
|
271
|
-
for (const mutation of mutations) {
|
|
272
|
-
if (!fields.includes(mutation.field)) fields.push(mutation.field);
|
|
273
|
-
}
|
|
274
|
-
return fields;
|
|
275
|
-
}
|
|
276
|
-
function resolveBudgetDirection(currentBuy, request) {
|
|
277
|
-
const currentByPkg = /* @__PURE__ */ new Map();
|
|
278
|
-
for (const pkg of currentBuy.packages ?? []) {
|
|
279
|
-
if (pkg.package_id && typeof pkg.budget === "number") {
|
|
280
|
-
currentByPkg.set(pkg.package_id, pkg.budget);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
let currentTotal = 0;
|
|
284
|
-
let proposedTotal = 0;
|
|
285
|
-
let sawIncrease = false;
|
|
286
|
-
let sawDecrease = false;
|
|
287
|
-
for (const pkg of request.packages ?? []) {
|
|
288
|
-
if (typeof pkg.budget !== "number") continue;
|
|
289
|
-
const prev = currentByPkg.get(pkg.package_id);
|
|
290
|
-
if (prev === void 0) {
|
|
291
|
-
sawIncrease = true;
|
|
292
|
-
proposedTotal += pkg.budget;
|
|
293
|
-
continue;
|
|
294
|
-
}
|
|
295
|
-
currentTotal += prev;
|
|
296
|
-
proposedTotal += pkg.budget;
|
|
297
|
-
if (pkg.budget > prev) sawIncrease = true;
|
|
298
|
-
if (pkg.budget < prev) sawDecrease = true;
|
|
299
|
-
}
|
|
300
|
-
if (sawIncrease && sawDecrease && Math.abs(proposedTotal - currentTotal) < BUDGET_EQUAL_TOLERANCE) {
|
|
301
|
-
return { action: "reallocate_budget", direction: "reallocate" };
|
|
302
|
-
}
|
|
303
|
-
if (proposedTotal > currentTotal) return { action: "increase_budget", direction: "increase" };
|
|
304
|
-
if (proposedTotal < currentTotal) return { action: "decrease_budget", direction: "decrease" };
|
|
305
|
-
return { action: "reallocate_budget", direction: "reallocate" };
|
|
306
|
-
}
|
|
307
|
-
function resolveFlightEndDirection(currentBuy, request, field) {
|
|
308
|
-
if (request.start_time !== void 0) {
|
|
309
|
-
return { action: "update_flight_dates", direction: "shift" };
|
|
310
|
-
}
|
|
311
|
-
const packageStartTouched = (request.packages ?? []).some((pkg) => pkg.start_time !== void 0);
|
|
312
|
-
if (packageStartTouched) {
|
|
313
|
-
return { action: "update_flight_dates", direction: "shift" };
|
|
314
|
-
}
|
|
315
|
-
if (field === "end_time") {
|
|
316
|
-
const currentEnd = currentBuy.end_time;
|
|
317
|
-
const proposedEnd = request.end_time;
|
|
318
|
-
if (currentEnd && proposedEnd) {
|
|
319
|
-
const cur = Date.parse(currentEnd);
|
|
320
|
-
const next = Date.parse(proposedEnd);
|
|
321
|
-
if (!Number.isNaN(cur) && !Number.isNaN(next)) {
|
|
322
|
-
if (next > cur) return { action: "extend_flight", direction: "extend" };
|
|
323
|
-
if (next < cur) return { action: "shorten_flight", direction: "shorten" };
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
return { action: "update_flight_dates", direction: "shift" };
|
|
327
|
-
}
|
|
328
|
-
let extending = false;
|
|
329
|
-
let shortening = false;
|
|
330
|
-
const currentByPkg = /* @__PURE__ */ new Map();
|
|
331
|
-
for (const pkg of currentBuy.packages ?? []) {
|
|
332
|
-
if (pkg.package_id) currentByPkg.set(pkg.package_id, pkg.end_time);
|
|
333
|
-
}
|
|
334
|
-
for (const pkg of request.packages ?? []) {
|
|
335
|
-
if (!pkg.end_time) continue;
|
|
336
|
-
const prev = currentByPkg.get(pkg.package_id);
|
|
337
|
-
if (!prev) {
|
|
338
|
-
extending = true;
|
|
339
|
-
continue;
|
|
340
|
-
}
|
|
341
|
-
const cur = Date.parse(prev);
|
|
342
|
-
const next = Date.parse(pkg.end_time);
|
|
343
|
-
if (Number.isNaN(cur) || Number.isNaN(next)) continue;
|
|
344
|
-
if (next > cur) extending = true;
|
|
345
|
-
if (next < cur) shortening = true;
|
|
346
|
-
}
|
|
347
|
-
if (extending && !shortening) return { action: "extend_flight", direction: "extend" };
|
|
348
|
-
if (shortening && !extending) return { action: "shorten_flight", direction: "shorten" };
|
|
349
|
-
return { action: "update_flight_dates", direction: "shift" };
|
|
350
|
-
}
|
|
351
|
-
function preflightUpdateMediaBuy(currentBuy, request) {
|
|
53
|
+
function preflightUpdateMediaBuy(currentBuy, request, options = {}) {
|
|
54
|
+
const assessmentBuy = currentBuy;
|
|
55
|
+
currentBuy = withActionProposal(currentBuy, options);
|
|
56
|
+
options = { ...options, task: options.task ?? "update_media_buy" };
|
|
352
57
|
const decomposition = decomposeUpdateMediaBuy(currentBuy, request);
|
|
353
58
|
const resolved = decomposition.actions;
|
|
59
|
+
const strict = currentBuy.accepted_proposal?.commercial_terms?.change_terms !== void 0 || currentBuy.available_actions?.some((entry) => entry?.change_term_id !== void 0) === true;
|
|
60
|
+
if (hasUnmappedMutation(request, decomposition))
|
|
61
|
+
throw new ValidationError(
|
|
62
|
+
"request",
|
|
63
|
+
void 0,
|
|
64
|
+
"At least one requested mutation has no supported action mapping; do not submit a partial mutation."
|
|
65
|
+
);
|
|
354
66
|
if (resolved.length === 0) {
|
|
355
67
|
throw new ValidationError(
|
|
356
68
|
"request",
|
|
357
|
-
|
|
69
|
+
void 0,
|
|
358
70
|
"update_media_buy request must touch at least one mutating field (paused, canceled, start_time, end_time, frequency_cap, packages[*], or new_packages)"
|
|
359
71
|
);
|
|
360
72
|
}
|
|
@@ -364,14 +76,77 @@ function preflightUpdateMediaBuy(currentBuy, request) {
|
|
|
364
76
|
const modes = [];
|
|
365
77
|
const denials = [];
|
|
366
78
|
for (const resolvedAction of resolved) {
|
|
79
|
+
if (!strict && (resolvedAction.action === "pause" || resolvedAction.action === "resume")) {
|
|
80
|
+
const controls = decomposition.mutations.filter(
|
|
81
|
+
(mutation) => mutation.action === resolvedAction.action && mutation.field === "packages[].paused"
|
|
82
|
+
);
|
|
83
|
+
if (controls.length) {
|
|
84
|
+
const statuses = controls.map(
|
|
85
|
+
(mutation) => packageActionStatus(currentBuy.packages?.find((pkg) => pkg.package_id === mutation.package_id))
|
|
86
|
+
);
|
|
87
|
+
const allowed = actionAllowedStatuses({ action: resolvedAction.action });
|
|
88
|
+
if (currentBuy.status === void 0 || statuses.some((status) => status === void 0)) {
|
|
89
|
+
denials.push({ action: resolvedAction.action, reason: "condition_unresolved" });
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
if (!["active", "paused"].includes(currentBuy.status) || statuses.some((status) => !allowed.includes(status))) {
|
|
93
|
+
denials.push({ action: resolvedAction.action, reason: "wrong_status" });
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (strict || options.proposal !== void 0 || resolvedAction.action === "update_name") {
|
|
99
|
+
const assessment = assessActionAvailability(assessmentBuy, resolvedAction.action, { ...options, request });
|
|
100
|
+
if (assessment.status === "currently_unavailable") {
|
|
101
|
+
denials.push({ action: resolvedAction.action, reason: assessment.reason, assessment });
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
367
105
|
const lookup = findAvailableAction(currentBuy, resolvedAction.action, { silent: true });
|
|
368
106
|
if (!lookup) {
|
|
369
107
|
denials.push({ action: resolvedAction.action, reason: "not_supported_on_buy" });
|
|
370
108
|
continue;
|
|
371
109
|
}
|
|
110
|
+
if (options.adcpVersion && !liveActionFitsVersion(lookup.entry, options.adcpVersion)) {
|
|
111
|
+
denials.push({
|
|
112
|
+
action: resolvedAction.action,
|
|
113
|
+
reason: "condition_unresolved",
|
|
114
|
+
assessment: {
|
|
115
|
+
status: "currently_unavailable",
|
|
116
|
+
action: resolvedAction.action,
|
|
117
|
+
reason: "condition_unresolved",
|
|
118
|
+
certainty: "unknown",
|
|
119
|
+
message: "The action uses metadata introduced after the supplied seller version."
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
if (!strict && lookup.entry.task !== void 0 && !tasksForLegacyMutation(resolvedAction.action).includes(lookup.entry.task)) {
|
|
125
|
+
denials.push({ action: resolvedAction.action, reason: "mode_mismatch" });
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (!strict && lookup.entry.applicable_package_ids !== void 0) {
|
|
129
|
+
const scoped = decomposition.mutations.filter((m) => m.action === resolvedAction.action);
|
|
130
|
+
const ids = lookup.entry.applicable_package_ids;
|
|
131
|
+
if (liveActionIssues([lookup.entry]).length || !scoped.length) {
|
|
132
|
+
denials.push({ action: resolvedAction.action, reason: "condition_unresolved" });
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (scoped.some((m) => m.scope !== "package" || !m.package_id || !ids.includes(m.package_id))) {
|
|
136
|
+
denials.push({ action: resolvedAction.action, reason: "not_supported_on_buy" });
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (!strict && options.task !== "update_media_buy" && options.task !== (lookup.entry.task ?? "update_media_buy")) {
|
|
141
|
+
denials.push({ action: resolvedAction.action, reason: "mode_mismatch" });
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
372
144
|
matched.push(lookup.entry);
|
|
373
145
|
modes.push(lookup.entry.mode);
|
|
374
146
|
}
|
|
147
|
+
if (strict && options.task !== "update_media_buy" && denials.length === 0 && new Set(matched.map((entry) => entry.task ?? "update_media_buy")).size > 1) {
|
|
148
|
+
for (const action of resolved) denials.push({ action: action.action, reason: "mode_mismatch" });
|
|
149
|
+
}
|
|
375
150
|
if (denials.length > 0) {
|
|
376
151
|
return {
|
|
377
152
|
ok: false,
|
|
@@ -395,6 +170,11 @@ function recoveryForModeMismatch(attemptedAction, currentlyAvailable) {
|
|
|
395
170
|
const entry = currentlyAvailable.find((a) => a.action === attemptedAction);
|
|
396
171
|
if (!entry) return void 0;
|
|
397
172
|
switch (entry.mode) {
|
|
173
|
+
case "seller_managed":
|
|
174
|
+
return {
|
|
175
|
+
kind: "waitForTask",
|
|
176
|
+
message: "Use the declared task and follow its submitted/working/completed lifecycle."
|
|
177
|
+
};
|
|
398
178
|
case "requires_proposal":
|
|
399
179
|
return {
|
|
400
180
|
kind: "createProposal",
|
|
@@ -437,8 +217,6 @@ export {
|
|
|
437
217
|
canUpdateFrequencyCaps,
|
|
438
218
|
canUpdatePacing,
|
|
439
219
|
canUpdateTargeting,
|
|
440
|
-
decomposeUpdateMediaBuy,
|
|
441
|
-
getActionForMutation,
|
|
442
220
|
preflightUpdateMediaBuy,
|
|
443
221
|
recoveryForModeMismatch
|
|
444
222
|
};
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
* rather than silently retaining the default.
|
|
30
30
|
*/
|
|
31
31
|
/**
|
|
32
|
-
* Strict
|
|
33
|
-
* same dimensions, with the `null` clear command removed from each.
|
|
32
|
+
* Strict overlay projection derived from a request-only Targeting Input: the
|
|
33
|
+
* same dimensions, with the `null` clear command removed from each. This does
|
|
34
|
+
* not materialize configured-product defaults omitted by a create request.
|
|
34
35
|
*
|
|
35
36
|
* Generic rather than hardcoded to the generated `TargetingOverlay` because
|
|
36
37
|
* the per-tool payload types widen non-empty-array tuples (`[string,
|
|
@@ -56,8 +57,10 @@ export type TargetingInputFor<T> = {
|
|
|
56
57
|
* Resolve a request-only Targeting Input into the strict effective overlay,
|
|
57
58
|
* dropping every `null` clear command.
|
|
58
59
|
*
|
|
59
|
-
* Use this on the **create** path
|
|
60
|
-
*
|
|
60
|
+
* Use this on the **create** path only when no configured/product targeting
|
|
61
|
+
* defaults need to be materialized. Otherwise pass those strict defaults and
|
|
62
|
+
* the request to {@link applyTargetingInput}. Also use this projection whenever
|
|
63
|
+
* a request-shaped overlay without a baseline is about to become strict state.
|
|
61
64
|
*
|
|
62
65
|
* Returns `undefined` when the input is absent, is an explicit whole-overlay
|
|
63
66
|
* clear, or resolves to no surviving dimensions — a cleared dimension is absent
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
* rather than silently retaining the default.
|
|
30
30
|
*/
|
|
31
31
|
/**
|
|
32
|
-
* Strict
|
|
33
|
-
* same dimensions, with the `null` clear command removed from each.
|
|
32
|
+
* Strict overlay projection derived from a request-only Targeting Input: the
|
|
33
|
+
* same dimensions, with the `null` clear command removed from each. This does
|
|
34
|
+
* not materialize configured-product defaults omitted by a create request.
|
|
34
35
|
*
|
|
35
36
|
* Generic rather than hardcoded to the generated `TargetingOverlay` because
|
|
36
37
|
* the per-tool payload types widen non-empty-array tuples (`[string,
|
|
@@ -56,8 +57,10 @@ export type TargetingInputFor<T> = {
|
|
|
56
57
|
* Resolve a request-only Targeting Input into the strict effective overlay,
|
|
57
58
|
* dropping every `null` clear command.
|
|
58
59
|
*
|
|
59
|
-
* Use this on the **create** path
|
|
60
|
-
*
|
|
60
|
+
* Use this on the **create** path only when no configured/product targeting
|
|
61
|
+
* defaults need to be materialized. Otherwise pass those strict defaults and
|
|
62
|
+
* the request to {@link applyTargetingInput}. Also use this projection whenever
|
|
63
|
+
* a request-shaped overlay without a baseline is about to become strict state.
|
|
61
64
|
*
|
|
62
65
|
* Returns `undefined` when the input is absent, is an explicit whole-overlay
|
|
63
66
|
* clear, or resolves to no surviving dimensions — a cleared dimension is absent
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
export type { ActionNotAllowedDetails, ActionNotAllowedReason, MediaBuyActionMode, MediaBuyAvailableAction, MediaBuyValidAction, SLAWindow, } from '../types/core.generated.mjs';
|
|
2
2
|
import type { MediaBuyAvailableAction, MediaBuyValidAction } from '../types/core.generated.mjs';
|
|
3
3
|
import type { SLAWindow } from '../types/core.generated.mjs';
|
|
4
|
+
import type { ControlMediaBuyRequest } from '../types/tools.generated.mjs';
|
|
4
5
|
import type { MediaBuyUpdateFieldAction } from './update-fields.generated.mjs';
|
|
6
|
+
import type { CANONICAL_ACTION_TASKS } from './action-metadata.generated.mjs';
|
|
5
7
|
/**
|
|
6
8
|
* Every action id the structured `available_actions[].action` surface can
|
|
7
9
|
* carry. Derived from the generated wire type plus the generated
|
|
8
|
-
* `update_media_buy` dispatch table,
|
|
9
|
-
* `MediaBuyValidAction` enum on schema pins that predate
|
|
10
|
+
* `update_media_buy` dispatch table, preserving the legacy vocabulary on schema pins that predate
|
|
10
11
|
* `core/media-buy-available-action-id.json` (AdCP <= 3.2.0-rc.2) and widens
|
|
11
12
|
* to include structured-only ids such as `update_media_buy_frequency_cap`
|
|
12
|
-
* once the pin picks that schema up.
|
|
13
|
+
* once the pin picks that schema up. Canonical task metadata keeps the union
|
|
14
|
+
* narrow even when a generated oneOf wire type flattens action to string.
|
|
15
|
+
* Use this — not `MediaBuyValidAction` —
|
|
13
16
|
* wherever code reads `available_actions[].action`, `allowed_actions[].action`,
|
|
14
17
|
* or `ACTION_NOT_ALLOWED.attempted_action`. `MediaBuyValidAction` remains the
|
|
15
18
|
* correct type for the deprecated flat `valid_actions[]` list only.
|
|
16
19
|
*/
|
|
17
|
-
export type MediaBuyActionId = MediaBuyAvailableAction['action'] | MediaBuyUpdateFieldAction;
|
|
20
|
+
export type MediaBuyActionId = MediaBuyAvailableAction['action'] | MediaBuyUpdateFieldAction | keyof typeof CANONICAL_ACTION_TASKS;
|
|
18
21
|
/**
|
|
19
22
|
* @deprecated Use `SLAWindow`. Kept as an import-compatibility alias for the
|
|
20
23
|
* pre-codegen draft export name; the shape is the generated wire contract.
|
|
@@ -36,17 +39,31 @@ export type LegacyCoarseAction = (typeof LEGACY_COARSE_ACTIONS)[number];
|
|
|
36
39
|
* fields are required by the helpers themselves.
|
|
37
40
|
*/
|
|
38
41
|
export interface MediaBuyActionContext {
|
|
42
|
+
accepted_proposal?: import('./action-types.mjs').ActionProposal;
|
|
43
|
+
accepted_proposal_id?: string;
|
|
39
44
|
media_buy_id?: string;
|
|
40
45
|
status?: string;
|
|
41
46
|
start_time?: string;
|
|
42
47
|
end_time?: string;
|
|
48
|
+
revision?: number;
|
|
49
|
+
currency?: string;
|
|
50
|
+
total_budget?: number | {
|
|
51
|
+
amount: number;
|
|
52
|
+
currency: string;
|
|
53
|
+
};
|
|
54
|
+
daily_budget_cap?: number | null;
|
|
43
55
|
packages?: ReadonlyArray<{
|
|
44
56
|
package_id?: string;
|
|
45
57
|
budget?: number;
|
|
46
58
|
start_time?: string;
|
|
47
59
|
end_time?: string;
|
|
60
|
+
canceled?: boolean;
|
|
61
|
+
paused?: boolean;
|
|
62
|
+
status?: string;
|
|
63
|
+
daily_budget_cap?: number | null;
|
|
64
|
+
min_spend_target?: number | null;
|
|
48
65
|
}>;
|
|
49
|
-
available_actions?:
|
|
66
|
+
available_actions?: readonly import('./action-types.mjs').LiveMediaBuyAction[];
|
|
50
67
|
valid_actions?: MediaBuyValidAction[];
|
|
51
68
|
}
|
|
52
69
|
/**
|
|
@@ -56,6 +73,26 @@ export interface MediaBuyActionContext {
|
|
|
56
73
|
* resolver signature.
|
|
57
74
|
*/
|
|
58
75
|
export interface UpdateMediaBuyRequestLike {
|
|
76
|
+
media_buy_id?: string;
|
|
77
|
+
account?: unknown;
|
|
78
|
+
context?: unknown;
|
|
79
|
+
governance_context?: unknown;
|
|
80
|
+
push_notification_config?: unknown;
|
|
81
|
+
ext?: unknown;
|
|
82
|
+
budget_cap_timezone?: string | null;
|
|
83
|
+
invoice_recipient?: unknown;
|
|
84
|
+
revision?: number;
|
|
85
|
+
idempotency_key?: string;
|
|
86
|
+
name?: string;
|
|
87
|
+
total_budget?: {
|
|
88
|
+
amount: number;
|
|
89
|
+
currency: string;
|
|
90
|
+
};
|
|
91
|
+
daily_budget_cap?: number | null;
|
|
92
|
+
budget_allocation?: unknown;
|
|
93
|
+
pacing?: unknown;
|
|
94
|
+
bidding?: unknown;
|
|
95
|
+
reporting_webhook?: unknown;
|
|
59
96
|
paused?: boolean;
|
|
60
97
|
canceled?: true;
|
|
61
98
|
cancellation_reason?: string;
|
|
@@ -68,13 +105,24 @@ export interface UpdateMediaBuyRequestLike {
|
|
|
68
105
|
new_packages?: ReadonlyArray<unknown>;
|
|
69
106
|
packages?: ReadonlyArray<{
|
|
70
107
|
package_id: string;
|
|
71
|
-
|
|
108
|
+
context?: unknown;
|
|
109
|
+
ext?: unknown;
|
|
110
|
+
cancellation_reason?: string;
|
|
111
|
+
catalogs?: unknown;
|
|
112
|
+
catalog_ids?: readonly string[];
|
|
113
|
+
bid_price?: number;
|
|
114
|
+
optimization_goals?: unknown;
|
|
115
|
+
impressions?: number;
|
|
116
|
+
budget?: number | null;
|
|
117
|
+
daily_budget_cap?: number | null;
|
|
118
|
+
min_spend_target?: number | null;
|
|
119
|
+
bidding?: unknown;
|
|
72
120
|
pacing?: unknown;
|
|
73
121
|
start_time?: string;
|
|
74
122
|
end_time?: string;
|
|
75
123
|
paused?: boolean;
|
|
76
124
|
canceled?: true;
|
|
77
|
-
targeting_overlay?: {
|
|
125
|
+
targeting_overlay?: NonNullable<ControlMediaBuyRequest['packages']>[number]['targeting_overlay'] | {
|
|
78
126
|
frequency_cap?: unknown;
|
|
79
127
|
[k: string]: unknown;
|
|
80
128
|
};
|