@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
|
@@ -22,7 +22,9 @@ __export(handler_exports, {
|
|
|
22
22
|
acquireAccountReadSlot: () => acquireAccountReadSlot,
|
|
23
23
|
aggregateReportingCoverageV1: () => aggregateReportingCoverageV1,
|
|
24
24
|
createReportingDeliveryHandler: () => createReportingDeliveryHandler,
|
|
25
|
-
createReportingStatusHandler: () => createReportingStatusHandler
|
|
25
|
+
createReportingStatusHandler: () => createReportingStatusHandler,
|
|
26
|
+
moreSevereReportingHealthV1: () => moreSevereReportingHealthV1,
|
|
27
|
+
projectManagedDelivery: () => projectManagedDelivery
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(handler_exports);
|
|
28
30
|
var import_node_crypto = require("node:crypto");
|
|
@@ -35,7 +37,11 @@ var import_instant = require('./instant.js');
|
|
|
35
37
|
var import_types = require('./types.js');
|
|
36
38
|
function createReportingStatusHandler(store, options) {
|
|
37
39
|
const consumerMismatchEscalation = (0, import_health.assertReportingConsumerMismatchEscalation)(
|
|
38
|
-
|
|
40
|
+
(0, import_health.reportingEffectiveConsumerMismatchEscalationV1)(
|
|
41
|
+
options?.consumerMismatchEscalation,
|
|
42
|
+
store,
|
|
43
|
+
"createReportingStatusHandler"
|
|
44
|
+
)
|
|
39
45
|
);
|
|
40
46
|
const activeReadsByAccount = /* @__PURE__ */ new Map();
|
|
41
47
|
return async (request, context) => {
|
|
@@ -179,6 +185,28 @@ function createReportingStatusHandler(store, options) {
|
|
|
179
185
|
const consumerStatusPending = consumerId !== void 0 && consumerStatusProjection.length === 0 && // Strictly after: the duty is to post "no later than" the deadline, so
|
|
180
186
|
// a buyer that posts at exactly that instant has met it.
|
|
181
187
|
(0, import_instant.compareReportingInstants)(page.snapshot.ledgerAsOf, obligation.recoveryDeadlineAt) > 0;
|
|
188
|
+
const baseProjection = {
|
|
189
|
+
...projection,
|
|
190
|
+
issues: uniqueIssues([...persistedIssues, ...projection.issues, ...mismatch ? [mismatch.issue] : []])
|
|
191
|
+
};
|
|
192
|
+
const managed = projectManagedDelivery({
|
|
193
|
+
obligation,
|
|
194
|
+
binding: page.snapshot.managedBindings?.find((value) => value.configurationId === obligation.configurationId),
|
|
195
|
+
revisions,
|
|
196
|
+
adjustments: page.snapshot.adjustments.filter(
|
|
197
|
+
(value) => value.reporting_obligation_id === obligation.reporting_obligation_id
|
|
198
|
+
),
|
|
199
|
+
materializations: (page.snapshot.materializationProjection ?? page.snapshot.materializations ?? []).filter(
|
|
200
|
+
(value) => value.reporting_obligation_id === obligation.reporting_obligation_id
|
|
201
|
+
),
|
|
202
|
+
materializationHistory: (page.snapshot.materializationHistoryProjection ?? page.snapshot.materializations ?? []).filter((value) => value.reporting_obligation_id === obligation.reporting_obligation_id),
|
|
203
|
+
receipts: page.snapshot.receiptProjection ?? page.snapshot.receipts ?? [],
|
|
204
|
+
adjustmentReceipts: page.snapshot.adjustmentReceiptProjection ?? page.snapshot.adjustmentReceipts ?? [],
|
|
205
|
+
base: baseProjection,
|
|
206
|
+
ledgerAsOf: page.snapshot.ledgerAsOf,
|
|
207
|
+
tombstonedAcceptedSubjects: page.snapshot.tombstonedAcceptedSubjects,
|
|
208
|
+
tombstonedDeliveredRevisionIds: page.snapshot.tombstonedDeliveredRevisionIds
|
|
209
|
+
});
|
|
182
210
|
return {
|
|
183
211
|
obligation,
|
|
184
212
|
revisions,
|
|
@@ -187,10 +215,15 @@ function createReportingStatusHandler(store, options) {
|
|
|
187
215
|
currentConsumerStatus,
|
|
188
216
|
consumerStatusPending,
|
|
189
217
|
projection: {
|
|
190
|
-
...projection,
|
|
191
|
-
...mismatch ? {
|
|
192
|
-
|
|
193
|
-
|
|
218
|
+
...managed?.projection ?? baseProjection,
|
|
219
|
+
...mismatch ? {
|
|
220
|
+
health: moreSevereReportingHealthV1(
|
|
221
|
+
managed?.projection.health ?? baseProjection.health,
|
|
222
|
+
mismatch.health
|
|
223
|
+
)
|
|
224
|
+
} : {}
|
|
225
|
+
},
|
|
226
|
+
managed
|
|
194
227
|
};
|
|
195
228
|
});
|
|
196
229
|
const healthFilter = view === "periods" && query.health ? new Set(query.health) : void 0;
|
|
@@ -204,6 +237,12 @@ function createReportingStatusHandler(store, options) {
|
|
|
204
237
|
ledger_as_of: page.snapshot.ledgerAsOf,
|
|
205
238
|
account_id: accountId
|
|
206
239
|
};
|
|
240
|
+
const finality = page.snapshot.query.finality;
|
|
241
|
+
const visibleRevisionIds = new Set(
|
|
242
|
+
page.snapshot.revisions.filter((value) => !finality || finality.includes(value.finality)).map((value) => value.reporting_revision_id)
|
|
243
|
+
);
|
|
244
|
+
const visibleAdjustments = finality ? page.snapshot.adjustments.filter((value) => visibleRevisionIds.has(value.adjusts_reporting_revision_id)) : page.snapshot.adjustments;
|
|
245
|
+
const pageAdjustmentIds = new Set(page.adjustments.map((value) => value.reporting_adjustment_id));
|
|
207
246
|
if (view === "revision") {
|
|
208
247
|
const id = query.reporting_revision_id;
|
|
209
248
|
const inSnapshot = id ? page.snapshot.revisions.some((value) => value.reporting_revision_id === id) : false;
|
|
@@ -219,6 +258,16 @@ function createReportingStatusHandler(store, options) {
|
|
|
219
258
|
if (!revision) {
|
|
220
259
|
return lookupUnavailable(view);
|
|
221
260
|
}
|
|
261
|
+
const revisionAdjustmentIds = new Set(
|
|
262
|
+
visibleAdjustments.filter((value) => value.adjusts_reporting_revision_id === revision.reporting_revision_id).map((value) => value.reporting_adjustment_id)
|
|
263
|
+
);
|
|
264
|
+
const revisionAdjustmentReceipts = (page.adjustmentReceipts ?? []).filter(
|
|
265
|
+
(value) => revisionAdjustmentIds.has(value.reporting_adjustment_id)
|
|
266
|
+
);
|
|
267
|
+
const receiptAdjustmentIds = new Set(revisionAdjustmentReceipts.map((value) => value.reporting_adjustment_id));
|
|
268
|
+
const revisionAdjustments = visibleAdjustments.filter(
|
|
269
|
+
(value) => value.adjusts_reporting_revision_id === revision.reporting_revision_id && (pageAdjustmentIds.has(value.reporting_adjustment_id) || receiptAdjustmentIds.has(value.reporting_adjustment_id))
|
|
270
|
+
);
|
|
222
271
|
return {
|
|
223
272
|
...base,
|
|
224
273
|
view: "revision",
|
|
@@ -229,11 +278,20 @@ function createReportingStatusHandler(store, options) {
|
|
|
229
278
|
row_count: revision.binding.rowCount
|
|
230
279
|
},
|
|
231
280
|
reporting_rows: revision.rows,
|
|
232
|
-
adjustments:
|
|
281
|
+
adjustments: revisionAdjustments.map((value) => value.wireAdjustment),
|
|
233
282
|
...consumerId ? { consumer_statuses: (page.consumerStatuses ?? []).map(wireConsumerStatus) } : {},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
283
|
+
materializations: (page.materializations ?? []).filter(
|
|
284
|
+
(value) => value.reporting_revision_id === revision.reporting_revision_id
|
|
285
|
+
),
|
|
286
|
+
receipts: (page.receipts ?? []).filter(
|
|
287
|
+
(value) => value.reporting_revision_id === revision.reporting_revision_id
|
|
288
|
+
),
|
|
289
|
+
// RC3 `revision_adjustments`: "every adjustment_receipt, when
|
|
290
|
+
// supported, MUST name one of those adjustments. No unrelated status
|
|
291
|
+
// or correction may appear." Emitting the page's whole adjustment
|
|
292
|
+
// receipt set let a read of R1 return a receipt for an adjustment on
|
|
293
|
+
// R2 while `adjustments` was empty.
|
|
294
|
+
adjustment_receipts: revisionAdjustmentReceipts,
|
|
237
295
|
errors: [],
|
|
238
296
|
pagination: {
|
|
239
297
|
has_more: page.hasMore,
|
|
@@ -245,6 +303,18 @@ function createReportingStatusHandler(store, options) {
|
|
|
245
303
|
if (view === "periods") {
|
|
246
304
|
const pageIds = new Set(page.obligations.map((value) => value.reporting_obligation_id));
|
|
247
305
|
const pageProjected = selected.filter((value) => pageIds.has(value.obligation.reporting_obligation_id));
|
|
306
|
+
const selectedPageIds = new Set(selected.map((value) => value.obligation.reporting_obligation_id));
|
|
307
|
+
const scopedAdjustments = visibleAdjustments.filter(
|
|
308
|
+
(value) => selectedPageIds.has(value.reporting_obligation_id)
|
|
309
|
+
);
|
|
310
|
+
const scopedAdjustmentIds = new Set(scopedAdjustments.map((value) => value.reporting_adjustment_id));
|
|
311
|
+
const scopedAdjustmentReceipts = (page.adjustmentReceipts ?? []).filter(
|
|
312
|
+
(value) => scopedAdjustmentIds.has(value.reporting_adjustment_id)
|
|
313
|
+
);
|
|
314
|
+
const receiptAdjustmentIds = new Set(scopedAdjustmentReceipts.map((value) => value.reporting_adjustment_id));
|
|
315
|
+
const pageAdjustments = scopedAdjustments.filter(
|
|
316
|
+
(value) => pageAdjustmentIds.has(value.reporting_adjustment_id) || receiptAdjustmentIds.has(value.reporting_adjustment_id)
|
|
317
|
+
);
|
|
248
318
|
return {
|
|
249
319
|
...base,
|
|
250
320
|
view: "periods",
|
|
@@ -260,15 +330,27 @@ function createReportingStatusHandler(store, options) {
|
|
|
260
330
|
).length,
|
|
261
331
|
value.projection,
|
|
262
332
|
value.currentConsumerStatus,
|
|
263
|
-
consumerId ? value.consumerStatusProjection.length : void 0
|
|
333
|
+
consumerId ? value.consumerStatusProjection.length : void 0,
|
|
334
|
+
value.managed
|
|
264
335
|
)
|
|
265
336
|
),
|
|
266
|
-
revisions: page.revisions.filter(
|
|
267
|
-
|
|
337
|
+
revisions: page.revisions.filter(
|
|
338
|
+
(value) => selectedPageIds.has(value.reporting_obligation_id) && (!query.finality || query.finality.includes(value.finality))
|
|
339
|
+
).map((value) => value.wireRevision),
|
|
340
|
+
adjustments: pageAdjustments.map((value) => value.wireAdjustment),
|
|
268
341
|
...consumerId ? { consumer_statuses: (page.consumerStatuses ?? []).map(wireConsumerStatus) } : {},
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
342
|
+
// Same scoping rule as the revision view: a receipt may only appear
|
|
343
|
+
// beside the correction or revision it names.
|
|
344
|
+
adjustment_receipts: scopedAdjustmentReceipts,
|
|
345
|
+
// Managed evidence names a revision, so the finality filter that
|
|
346
|
+
// scopes `revisions` scopes these too — otherwise the response
|
|
347
|
+
// carries public references to a revision it does not contain.
|
|
348
|
+
materializations: (page.materializations ?? []).filter(
|
|
349
|
+
(value) => selectedPageIds.has(value.reporting_obligation_id) && visibleRevisionIds.has(value.reporting_revision_id)
|
|
350
|
+
),
|
|
351
|
+
receipts: (page.receipts ?? []).filter(
|
|
352
|
+
(value) => selectedPageIds.has(value.reporting_obligation_id) && visibleRevisionIds.has(value.reporting_revision_id)
|
|
353
|
+
),
|
|
272
354
|
pagination: {
|
|
273
355
|
has_more: page.hasMore,
|
|
274
356
|
total_count: page.totalCount,
|
|
@@ -307,17 +389,6 @@ function createReportingStatusHandler(store, options) {
|
|
|
307
389
|
}
|
|
308
390
|
};
|
|
309
391
|
}
|
|
310
|
-
function resolveConsumerMismatchEscalation(fromOptions, store) {
|
|
311
|
-
const fromStore = store.consumerMismatchEscalation;
|
|
312
|
-
if (!fromOptions) return fromStore;
|
|
313
|
-
if (!fromStore) return fromOptions;
|
|
314
|
-
if (fromOptions.escalationSeconds !== fromStore.escalationSeconds || fromOptions.operationsContact.url !== fromStore.operationsContact.url || fromOptions.operationsContact.email !== fromStore.operationsContact.email) {
|
|
315
|
-
throw new TypeError(
|
|
316
|
-
"consumerMismatchEscalation differs between createReportingStatusHandler and the reporting ledger store; configure one value so a health-filtered periods read cannot disagree with the summary"
|
|
317
|
-
);
|
|
318
|
-
}
|
|
319
|
-
return fromOptions;
|
|
320
|
-
}
|
|
321
392
|
function createReportingDeliveryHandler(store) {
|
|
322
393
|
const activeReadsByAccount = /* @__PURE__ */ new Map();
|
|
323
394
|
return async (request, context) => {
|
|
@@ -400,7 +471,7 @@ function resolvedAccountId(account) {
|
|
|
400
471
|
if (!accountId) throw new Error("Reporting reads require a resolved account");
|
|
401
472
|
return accountId;
|
|
402
473
|
}
|
|
403
|
-
function wireObligation(obligation, revisionCount, adjustmentCount, projection, currentConsumerStatus, consumerStatusCount) {
|
|
474
|
+
function wireObligation(obligation, revisionCount, adjustmentCount, projection, currentConsumerStatus, consumerStatusCount, managed) {
|
|
404
475
|
return {
|
|
405
476
|
reporting_obligation_id: obligation.reporting_obligation_id,
|
|
406
477
|
delivery_config_id: obligation.delivery_config_id,
|
|
@@ -418,20 +489,27 @@ function wireObligation(obligation, revisionCount, adjustmentCount, projection,
|
|
|
418
489
|
source_timezone: obligation.period.sourceTimezone
|
|
419
490
|
},
|
|
420
491
|
expected_at: obligation.expectedAt,
|
|
421
|
-
schedule:
|
|
422
|
-
period_duration: `PT${obligation.schedule.periodMilliseconds / 1e3}S`,
|
|
423
|
-
alignment: "billing_cycle",
|
|
424
|
-
period_anchor: obligation.schedule.anchor,
|
|
425
|
-
period_timezone: obligation.period.sourceTimezone,
|
|
426
|
-
delivery_sla: `PT${(Date.parse(obligation.expectedAt) - Date.parse(obligation.period.end)) / 1e3}S`
|
|
427
|
-
},
|
|
492
|
+
schedule: wireSchedule(obligation),
|
|
428
493
|
required_finality: obligation.requiredFinality,
|
|
429
|
-
reconciliation_mode: "delivery_only",
|
|
430
|
-
reconciliation_status: "not_required",
|
|
494
|
+
reconciliation_mode: managed?.binding.reconciliation_mode ?? "delivery_only",
|
|
495
|
+
reconciliation_status: managed?.reconciliationStatus ?? "not_required",
|
|
431
496
|
health: projection.health,
|
|
432
497
|
production_status: projection.productionStatus,
|
|
433
498
|
revision_count: revisionCount,
|
|
434
499
|
adjustment_count: adjustmentCount,
|
|
500
|
+
...managed ? {
|
|
501
|
+
destination_ref: managed.binding.destination_ref,
|
|
502
|
+
materialization_count: managed.materializationCount,
|
|
503
|
+
successful_materialization_count: managed.successfulMaterializationCount,
|
|
504
|
+
...managed.resourceRetainedUntil ? { resource_retained_until: managed.resourceRetainedUntil } : {},
|
|
505
|
+
...managed.binding.reconciliation_mode === "consumer_receipt" ? {
|
|
506
|
+
receipt_count: managed.receiptCount,
|
|
507
|
+
accepted_receipt_count: managed.acceptedReceiptCount,
|
|
508
|
+
adjustment_receipt_count: managed.adjustmentReceiptCount,
|
|
509
|
+
accepted_adjustment_receipt_count: managed.acceptedAdjustmentReceiptCount,
|
|
510
|
+
pending_adjustment_count: managed.pendingAdjustmentReceiptCount
|
|
511
|
+
} : {}
|
|
512
|
+
} : {},
|
|
435
513
|
...consumerStatusCount !== void 0 ? {
|
|
436
514
|
consumer_status_count: consumerStatusCount,
|
|
437
515
|
...currentConsumerStatus ? { current_consumer_status_id: currentConsumerStatus.reporting_status_id } : {}
|
|
@@ -439,6 +517,176 @@ function wireObligation(obligation, revisionCount, adjustmentCount, projection,
|
|
|
439
517
|
issues: projection.issues.map(wireIssue)
|
|
440
518
|
};
|
|
441
519
|
}
|
|
520
|
+
function projectManagedDelivery(input) {
|
|
521
|
+
const {
|
|
522
|
+
obligation,
|
|
523
|
+
binding,
|
|
524
|
+
revisions,
|
|
525
|
+
adjustments,
|
|
526
|
+
materializations,
|
|
527
|
+
materializationHistory,
|
|
528
|
+
receipts,
|
|
529
|
+
adjustmentReceipts,
|
|
530
|
+
base,
|
|
531
|
+
ledgerAsOf,
|
|
532
|
+
tombstonedAcceptedSubjects = [],
|
|
533
|
+
tombstonedDeliveredRevisionIds = []
|
|
534
|
+
} = input;
|
|
535
|
+
if (!binding) return void 0;
|
|
536
|
+
const supersededRevisionIds = new Set(
|
|
537
|
+
revisions.map((value) => value.supersedes_reporting_revision_id).filter((value) => Boolean(value))
|
|
538
|
+
);
|
|
539
|
+
const requiredRevision = revisions.filter((value) => !supersededRevisionIds.has(value.reporting_revision_id)).filter((value) => obligation.requiredFinality !== "official" || value.finality === "official").sort((left, right) => left.revisionNumber - right.revisionNumber).at(-1);
|
|
540
|
+
const successful = materializations.filter(
|
|
541
|
+
(value) => value.reporting_revision_id === requiredRevision?.reporting_revision_id && (value.status === "available" || value.status === "delivered") && value.resource !== void 0 && value.verification !== void 0
|
|
542
|
+
);
|
|
543
|
+
const readable = successful.filter(
|
|
544
|
+
(value) => value.resource && (0, import_instant.compareReportingInstants)(value.resource.expires_at, ledgerAsOf) > 0
|
|
545
|
+
);
|
|
546
|
+
const failed = materializations.filter((value) => value.status === "failed");
|
|
547
|
+
let projection = base;
|
|
548
|
+
if (requiredRevision && !readable.length) {
|
|
549
|
+
const afterExpected = (0, import_instant.compareReportingInstants)(ledgerAsOf, obligation.expectedAt) >= 0;
|
|
550
|
+
const afterRecovery = (0, import_instant.compareReportingInstants)(ledgerAsOf, obligation.recoveryDeadlineAt) >= 0;
|
|
551
|
+
const issue = {
|
|
552
|
+
issueId: `reporting-issue.managed-delivery.${obligation.reporting_obligation_id}`,
|
|
553
|
+
reporting_obligation_id: obligation.reporting_obligation_id,
|
|
554
|
+
code: failed.length ? "DELIVERY_FAILED" : successful.length ? "RESOURCE_EXPIRED" : "REPORT_OVERDUE",
|
|
555
|
+
severity: afterRecovery ? "action_required" : "delayed",
|
|
556
|
+
responsibleParty: "seller",
|
|
557
|
+
recommendedAction: afterRecovery ? "contact_seller" : "wait_for_retry",
|
|
558
|
+
openedAt: successful[0]?.resource?.expires_at ?? failed[0]?.failed_at ?? obligation.expectedAt,
|
|
559
|
+
observedAt: ledgerAsOf
|
|
560
|
+
};
|
|
561
|
+
projection = {
|
|
562
|
+
...base,
|
|
563
|
+
// Managed delivery is an independent degradation source, exactly like the
|
|
564
|
+
// consumer-status mismatch composed at the call sites. Overwriting
|
|
565
|
+
// `base.health` let an installed managed table suppress Core degradation:
|
|
566
|
+
// an obligation with incomplete coverage (`action_required`) read before
|
|
567
|
+
// its `expectedAt` came back `waiting` while still carrying the
|
|
568
|
+
// action_required issue, which both contradicts itself and makes the
|
|
569
|
+
// period unreachable under every `health` filter.
|
|
570
|
+
health: moreSevereReportingHealthV1(
|
|
571
|
+
base.health,
|
|
572
|
+
afterExpected ? afterRecovery ? "action_required" : "delayed" : "waiting"
|
|
573
|
+
),
|
|
574
|
+
satisfied: false,
|
|
575
|
+
issues: afterExpected ? uniqueIssues([...base.issues, issue]) : base.issues
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
const relevantReceipts = requiredRevision ? receipts.filter((value) => value.reporting_revision_id === requiredRevision.reporting_revision_id) : [];
|
|
579
|
+
const obligationReceipts = receipts.filter(
|
|
580
|
+
(value) => value.reporting_obligation_id === obligation.reporting_obligation_id
|
|
581
|
+
);
|
|
582
|
+
const obligationAdjustmentReceipts = adjustmentReceipts.filter(
|
|
583
|
+
(value) => adjustments.some((adjustment) => adjustment.reporting_adjustment_id === value.reporting_adjustment_id)
|
|
584
|
+
);
|
|
585
|
+
const revisionLeaf = currentReceiptLeaf(relevantReceipts);
|
|
586
|
+
const adjustmentLeaves = adjustments.map(
|
|
587
|
+
(adjustment) => currentAdjustmentReceiptLeaf(
|
|
588
|
+
adjustmentReceipts.filter((value) => value.reporting_adjustment_id === adjustment.reporting_adjustment_id)
|
|
589
|
+
)
|
|
590
|
+
);
|
|
591
|
+
const revisionAcceptedByTombstone = requiredRevision !== void 0 && tombstonedAcceptedSubjects.some(
|
|
592
|
+
(value) => value.kind === "revision" && value.subjectId === requiredRevision.reporting_revision_id
|
|
593
|
+
);
|
|
594
|
+
const tombstonedAdjustmentIds = new Set(
|
|
595
|
+
adjustments.map((adjustment) => adjustment.reporting_adjustment_id).filter((id) => tombstonedAcceptedSubjects.some((value) => value.kind === "adjustment" && value.subjectId === id))
|
|
596
|
+
);
|
|
597
|
+
let reconciliationStatus = "not_required";
|
|
598
|
+
if (binding.reconciliation_mode === "consumer_receipt" && requiredRevision) {
|
|
599
|
+
const rejectedAdjustment = adjustments.some(
|
|
600
|
+
(adjustment, index) => adjustmentLeaves[index]?.status === "rejected" && !tombstonedAdjustmentIds.has(adjustment.reporting_adjustment_id)
|
|
601
|
+
);
|
|
602
|
+
const deliveredEver = tombstonedDeliveredRevisionIds.includes(requiredRevision.reporting_revision_id) || materializationHistory.some(
|
|
603
|
+
(value) => value.reporting_revision_id === requiredRevision.reporting_revision_id && (value.status === "available" || value.status === "delivered") && value.resource !== void 0 && value.verification !== void 0
|
|
604
|
+
);
|
|
605
|
+
const missingAdjustmentAfterTombstones = adjustments.some(
|
|
606
|
+
(adjustment, index) => adjustmentLeaves[index] === void 0 && !tombstonedAdjustmentIds.has(adjustment.reporting_adjustment_id)
|
|
607
|
+
);
|
|
608
|
+
const revisionAccepted = revisionLeaf?.status === "accepted" || revisionAcceptedByTombstone;
|
|
609
|
+
const revisionRejectedNow = revisionLeaf?.status === "rejected" && !revisionAcceptedByTombstone;
|
|
610
|
+
if (revisionRejectedNow || rejectedAdjustment) reconciliationStatus = "rejected";
|
|
611
|
+
else if (!deliveredEver) reconciliationStatus = "pending";
|
|
612
|
+
else if (!revisionAccepted || missingAdjustmentAfterTombstones) reconciliationStatus = "pending";
|
|
613
|
+
else reconciliationStatus = "accepted";
|
|
614
|
+
if (reconciliationStatus !== "accepted") {
|
|
615
|
+
const code = revisionRejectedNow ? "RECEIPT_REJECTED" : rejectedAdjustment ? "ADJUSTMENT_RECEIPT_REJECTED" : !revisionAccepted ? "RECEIPT_REQUIRED" : "ADJUSTMENT_RECEIPT_REQUIRED";
|
|
616
|
+
const sellerAction = code === "RECEIPT_REJECTED" || code === "ADJUSTMENT_RECEIPT_REJECTED";
|
|
617
|
+
const issue = {
|
|
618
|
+
issueId: `reporting-issue.${code.toLowerCase().replaceAll("_", "-")}.${obligation.reporting_obligation_id}`,
|
|
619
|
+
reporting_obligation_id: obligation.reporting_obligation_id,
|
|
620
|
+
code,
|
|
621
|
+
severity: "action_required",
|
|
622
|
+
responsibleParty: sellerAction ? "seller" : "buyer",
|
|
623
|
+
recommendedAction: sellerAction ? "contact_seller" : "contact_buyer",
|
|
624
|
+
openedAt: revisionLeaf?.received_at ?? adjustmentLeaves.find((value) => value?.status === "rejected")?.received_at ?? successful[0]?.ready_at ?? obligation.expectedAt,
|
|
625
|
+
observedAt: ledgerAsOf
|
|
626
|
+
};
|
|
627
|
+
projection = {
|
|
628
|
+
...projection,
|
|
629
|
+
health: "action_required",
|
|
630
|
+
satisfied: false,
|
|
631
|
+
issues: uniqueIssues([...projection.issues, issue])
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
return {
|
|
636
|
+
binding,
|
|
637
|
+
projection,
|
|
638
|
+
reconciliationStatus,
|
|
639
|
+
materializationCount: materializationHistory.length,
|
|
640
|
+
successfulMaterializationCount: materializationHistory.filter(
|
|
641
|
+
(value) => value.status === "available" || value.status === "delivered"
|
|
642
|
+
).length,
|
|
643
|
+
resourceRetainedUntil: readable.map((value) => value.resource.expires_at).sort(import_instant.compareReportingInstants).at(-1),
|
|
644
|
+
// Tombstones move the counters as well as the verdict. RC3 requires a
|
|
645
|
+
// `consumer_receipt` obligation that reads healthy or complete to report
|
|
646
|
+
// at least one receipt, at least one accepted receipt, and zero pending
|
|
647
|
+
// adjustments — so counting only live rows emitted a schema-invalid
|
|
648
|
+
// `complete` with `receipt_count: 0` the moment an acceptance was pruned,
|
|
649
|
+
// and left a tombstoned adjustment counted as still pending.
|
|
650
|
+
// Counters describe exactly the records this response emits, nothing
|
|
651
|
+
// more and nothing less. Counting only the required revision's receipts
|
|
652
|
+
// undercounted a superseded revision's receipts, which the periods view
|
|
653
|
+
// does emit; adding tombstones overcounted records that no longer exist.
|
|
654
|
+
// Either way a buyer recomputing the association reports
|
|
655
|
+
// ASSOCIATED_HISTORY_INCOMPLETE. Tombstones keep their real job — they
|
|
656
|
+
// stop a settled subject reopening on the write path — and retention now
|
|
657
|
+
// refuses to prune a receipt whose resource is still readable, so a
|
|
658
|
+
// period can never read complete with nothing to show for it.
|
|
659
|
+
receiptCount: obligationReceipts.length,
|
|
660
|
+
acceptedReceiptCount: obligationReceipts.filter((value) => value.status === "accepted").length,
|
|
661
|
+
adjustmentReceiptCount: obligationAdjustmentReceipts.length,
|
|
662
|
+
acceptedAdjustmentReceiptCount: obligationAdjustmentReceipts.filter((value) => value.status === "accepted").length,
|
|
663
|
+
pendingAdjustmentReceiptCount: adjustments.filter(
|
|
664
|
+
(adjustment, index) => adjustmentLeaves[index]?.status !== "accepted" && !tombstonedAdjustmentIds.has(adjustment.reporting_adjustment_id)
|
|
665
|
+
).length
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
function currentReceiptLeaf(receipts) {
|
|
669
|
+
const superseded = new Set(
|
|
670
|
+
receipts.map((value) => value.supersedes_reporting_receipt_id).filter((value) => Boolean(value))
|
|
671
|
+
);
|
|
672
|
+
return receipts.find((value) => !superseded.has(value.reporting_receipt_id));
|
|
673
|
+
}
|
|
674
|
+
function currentAdjustmentReceiptLeaf(receipts) {
|
|
675
|
+
const superseded = new Set(
|
|
676
|
+
receipts.map((value) => value.supersedes_reporting_receipt_id).filter((value) => Boolean(value))
|
|
677
|
+
);
|
|
678
|
+
return receipts.find((value) => !superseded.has(value.reporting_receipt_id));
|
|
679
|
+
}
|
|
680
|
+
function moreSevereReportingHealthV1(left, right) {
|
|
681
|
+
const severity = {
|
|
682
|
+
complete: 0,
|
|
683
|
+
healthy: 0,
|
|
684
|
+
waiting: 1,
|
|
685
|
+
delayed: 2,
|
|
686
|
+
action_required: 3
|
|
687
|
+
};
|
|
688
|
+
return severity[left] >= severity[right] ? left : right;
|
|
689
|
+
}
|
|
442
690
|
function consumerStatusMatchesObligation(status, obligation) {
|
|
443
691
|
return status.delivery_config_id === obligation.delivery_config_id && status.delivery_config_version === obligation.delivery_config_version && status.report_definition_id === obligation.report_definition_id && (0, import_instant.compareReportingInstants)(status.period.start, obligation.period.start) === 0 && (0, import_instant.compareReportingInstants)(status.period.end, obligation.period.end) === 0 && status.period.source_timezone === obligation.period.sourceTimezone;
|
|
444
692
|
}
|
|
@@ -639,11 +887,31 @@ function copyArray(raw, key) {
|
|
|
639
887
|
function isRecord(value) {
|
|
640
888
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
641
889
|
}
|
|
890
|
+
function wireSchedule(obligation) {
|
|
891
|
+
const alignment = obligation.schedule.alignment ?? "billing_cycle";
|
|
892
|
+
const periodTimezone = obligation.schedule.periodTimezone ?? obligation.period.sourceTimezone;
|
|
893
|
+
return {
|
|
894
|
+
period_duration: obligation.schedule.periodDuration ?? `PT${obligation.schedule.periodMilliseconds / 1e3}S`,
|
|
895
|
+
alignment,
|
|
896
|
+
// reporting-schedule.json: billing_cycle requires both fields,
|
|
897
|
+
// source_timezone requires period_timezone and forbids period_anchor, and
|
|
898
|
+
// utc/account_timezone forbid both. Emitting period_timezone for
|
|
899
|
+
// account_timezone fails the whole strict get_reporting_status response.
|
|
900
|
+
...alignment === "billing_cycle" ? { period_anchor: obligation.schedule.anchor } : {},
|
|
901
|
+
...alignment === "billing_cycle" || alignment === "source_timezone" ? { period_timezone: periodTimezone } : {},
|
|
902
|
+
// Echo the installed lexical duration. Recomputing it from expected_at
|
|
903
|
+
// would answer PT3600S where the offering advertised PT1H — the same
|
|
904
|
+
// instant, but not the same value installed_schedule_match compares.
|
|
905
|
+
delivery_sla: obligation.schedule.deliverySlaDuration ?? `PT${(Date.parse(obligation.expectedAt) - Date.parse(obligation.period.end)) / 1e3}S`
|
|
906
|
+
};
|
|
907
|
+
}
|
|
642
908
|
// Annotate the CommonJS export names for ESM import in node:
|
|
643
909
|
0 && (module.exports = {
|
|
644
910
|
ReportingReadCapacityError,
|
|
645
911
|
acquireAccountReadSlot,
|
|
646
912
|
aggregateReportingCoverageV1,
|
|
647
913
|
createReportingDeliveryHandler,
|
|
648
|
-
createReportingStatusHandler
|
|
914
|
+
createReportingStatusHandler,
|
|
915
|
+
moreSevereReportingHealthV1,
|
|
916
|
+
projectManagedDelivery
|
|
649
917
|
});
|