@adcp/sdk 15.9.1 → 16.0.0-beta.2
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-identity.js +74 -0
- package/bin/adcp.js +2 -0
- package/dist/lib/adapters/keyed-account-backend.d.mts +37 -0
- package/dist/lib/adapters/keyed-account-backend.d.ts +37 -0
- package/dist/lib/adapters/keyed-account-backend.js +121 -0
- package/dist/lib/adapters/keyed-account-backend.mjs +94 -0
- package/dist/lib/adapters/keyed-account-store.d.mts +28 -0
- package/dist/lib/adapters/keyed-account-store.d.ts +28 -0
- package/dist/lib/adapters/keyed-account-store.js +227 -0
- package/dist/lib/adapters/keyed-account-store.mjs +203 -0
- package/dist/lib/core/SingleAgentClient.d.mts +25 -2
- package/dist/lib/core/SingleAgentClient.d.ts +25 -2
- package/dist/lib/core/SingleAgentClient.js +280 -62
- package/dist/lib/core/SingleAgentClient.mjs +282 -57
- package/dist/lib/core/TaskExecutor.d.mts +6 -0
- package/dist/lib/core/TaskExecutor.d.ts +6 -0
- package/dist/lib/core/TaskExecutor.js +66 -5
- package/dist/lib/core/TaskExecutor.mjs +71 -5
- package/dist/lib/core/postgres-webhook-registration-store.js +32 -5
- package/dist/lib/core/postgres-webhook-registration-store.mjs +32 -5
- package/dist/lib/core/redis-webhook-registration-store.js +23 -1
- package/dist/lib/core/redis-webhook-registration-store.mjs +23 -1
- package/dist/lib/core/webhook-registration.d.mts +7 -1
- package/dist/lib/core/webhook-registration.d.ts +7 -1
- package/dist/lib/core/webhook-registration.js +24 -2
- package/dist/lib/core/webhook-registration.mjs +23 -2
- package/dist/lib/identity-3.3/generated-compat.d.mts +34 -0
- package/dist/lib/identity-3.3/generated-compat.d.ts +34 -0
- package/dist/lib/identity-3.3/generated-compat.js +16 -0
- package/dist/lib/identity-3.3/generated-compat.mjs +0 -0
- package/dist/lib/identity-3.3/index.d.mts +10 -0
- package/dist/lib/identity-3.3/index.d.ts +10 -0
- package/dist/lib/identity-3.3/index.js +79 -0
- package/dist/lib/identity-3.3/index.mjs +50 -0
- package/dist/lib/identity-3.3/lifecycle.d.mts +125 -0
- package/dist/lib/identity-3.3/lifecycle.d.ts +125 -0
- package/dist/lib/identity-3.3/lifecycle.js +294 -0
- package/dist/lib/identity-3.3/lifecycle.mjs +272 -0
- package/dist/lib/identity-3.3/revocation.d.mts +86 -0
- package/dist/lib/identity-3.3/revocation.d.ts +86 -0
- package/dist/lib/identity-3.3/revocation.js +308 -0
- package/dist/lib/identity-3.3/revocation.mjs +286 -0
- package/dist/lib/identity-3.3/schemas.draft.d.mts +2472 -0
- package/dist/lib/identity-3.3/schemas.draft.d.ts +2472 -0
- package/dist/lib/identity-3.3/schemas.draft.js +1448 -0
- package/dist/lib/identity-3.3/schemas.draft.mjs +1428 -0
- package/dist/lib/identity-3.3/server.d.mts +46 -0
- package/dist/lib/identity-3.3/server.d.ts +46 -0
- package/dist/lib/identity-3.3/server.js +279 -0
- package/dist/lib/identity-3.3/server.mjs +260 -0
- package/dist/lib/identity-3.3/store.d.mts +24 -0
- package/dist/lib/identity-3.3/store.d.ts +24 -0
- package/dist/lib/identity-3.3/store.js +191 -0
- package/dist/lib/identity-3.3/store.mjs +169 -0
- package/dist/lib/identity-3.3/trust.d.mts +155 -0
- package/dist/lib/identity-3.3/trust.d.ts +155 -0
- package/dist/lib/identity-3.3/trust.js +383 -0
- package/dist/lib/identity-3.3/trust.mjs +342 -0
- package/dist/lib/identity-3.3/types.d.mts +155 -0
- package/dist/lib/identity-3.3/types.d.ts +155 -0
- package/dist/lib/identity-3.3/types.js +16 -0
- package/dist/lib/identity-3.3/types.mjs +0 -0
- package/dist/lib/identity-3.3/validation.d.mts +2 -0
- package/dist/lib/identity-3.3/validation.d.ts +2 -0
- package/dist/lib/identity-3.3/validation.js +125 -0
- package/dist/lib/identity-3.3/validation.mjs +91 -0
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +2 -0
- package/dist/lib/protocols/index.d.mts +1 -1
- package/dist/lib/protocols/index.d.ts +1 -1
- package/dist/lib/protocols/index.js +2 -2
- package/dist/lib/protocols/index.mjs +2 -2
- package/dist/lib/reporting/azure/index.d.mts +5 -0
- package/dist/lib/reporting/azure/index.d.ts +5 -0
- package/dist/lib/reporting/azure/index.js +26 -7
- package/dist/lib/reporting/azure/index.mjs +26 -7
- package/dist/lib/reporting/bigquery/index.d.mts +39 -5
- package/dist/lib/reporting/bigquery/index.d.ts +39 -5
- package/dist/lib/reporting/bigquery/index.js +26 -20
- package/dist/lib/reporting/bigquery/index.mjs +26 -20
- package/dist/lib/reporting/gcs/adapter.d.mts +8 -1
- package/dist/lib/reporting/gcs/adapter.d.ts +8 -1
- package/dist/lib/reporting/gcs/errors.d.mts +6 -0
- package/dist/lib/reporting/gcs/errors.d.ts +6 -0
- package/dist/lib/reporting/gcs/fence.d.mts +5 -0
- package/dist/lib/reporting/gcs/fence.d.ts +5 -0
- package/dist/lib/reporting/gcs/index.d.mts +9 -0
- package/dist/lib/reporting/gcs/index.d.ts +9 -0
- package/dist/lib/reporting/gcs/reader.d.mts +27 -3
- package/dist/lib/reporting/gcs/reader.d.ts +27 -3
- package/dist/lib/reporting/gcs/row-provider.d.mts +7 -0
- package/dist/lib/reporting/gcs/row-provider.d.ts +7 -0
- package/dist/lib/reporting/gcs/row-provider.js +34 -14
- package/dist/lib/reporting/gcs/row-provider.mjs +34 -14
- package/dist/lib/reporting/ledger/change-feed.d.mts +22 -1
- package/dist/lib/reporting/ledger/change-feed.d.ts +22 -1
- package/dist/lib/reporting/ledger/index.d.mts +11 -0
- package/dist/lib/reporting/ledger/index.d.ts +11 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +8 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +8 -0
- package/dist/lib/reporting/ledger/managed-router.d.mts +27 -2
- package/dist/lib/reporting/ledger/managed-router.d.ts +27 -2
- package/dist/lib/reporting/ledger/managed.d.mts +86 -6
- package/dist/lib/reporting/ledger/managed.d.ts +86 -6
- package/dist/lib/reporting/ledger/notification-activity.d.mts +65 -3
- package/dist/lib/reporting/ledger/notification-activity.d.ts +65 -3
- package/dist/lib/reporting/ledger/object-writes.d.mts +64 -5
- package/dist/lib/reporting/ledger/object-writes.d.ts +64 -5
- package/dist/lib/reporting/ledger/postgres.d.mts +43 -9
- package/dist/lib/reporting/ledger/postgres.d.ts +43 -9
- package/dist/lib/reporting/ledger/postgres.js +43 -27
- package/dist/lib/reporting/ledger/postgres.mjs +43 -27
- package/dist/lib/reporting/ledger/row-encoding.d.mts +92 -6
- package/dist/lib/reporting/ledger/row-encoding.d.ts +92 -6
- package/dist/lib/reporting/ledger/row-encoding.js +8 -4
- package/dist/lib/reporting/ledger/row-encoding.mjs +6 -3
- package/dist/lib/reporting/ledger/row-storage-errors.d.mts +11 -1
- package/dist/lib/reporting/ledger/row-storage-errors.d.ts +11 -1
- package/dist/lib/reporting/ledger/row-storage-migration.d.mts +19 -1
- package/dist/lib/reporting/ledger/row-storage-migration.d.ts +19 -1
- package/dist/lib/reporting/ledger/row-storage-migration.js +133 -18
- package/dist/lib/reporting/ledger/row-storage-migration.mjs +133 -18
- package/dist/lib/reporting/ledger/row-storage-object.d.mts +103 -12
- package/dist/lib/reporting/ledger/row-storage-object.d.ts +103 -12
- package/dist/lib/reporting/ledger/row-storage-object.js +106 -31
- package/dist/lib/reporting/ledger/row-storage-object.mjs +104 -31
- package/dist/lib/reporting/ledger/row-storage.d.mts +87 -20
- package/dist/lib/reporting/ledger/row-storage.d.ts +87 -20
- package/dist/lib/reporting/ledger/row-storage.js +126 -66
- package/dist/lib/reporting/ledger/row-storage.mjs +129 -67
- package/dist/lib/reporting/ledger/schedule.d.mts +13 -0
- package/dist/lib/reporting/ledger/schedule.d.ts +13 -0
- package/dist/lib/reporting/ledger/schedule.js +24 -0
- package/dist/lib/reporting/ledger/schedule.mjs +23 -0
- package/dist/lib/reporting/ledger/types.d.mts +23 -1
- package/dist/lib/reporting/ledger/types.d.ts +23 -1
- package/dist/lib/reporting/s3/index.d.mts +5 -0
- package/dist/lib/reporting/s3/index.d.ts +5 -0
- package/dist/lib/reporting/s3/index.js +37 -14
- package/dist/lib/reporting/s3/index.mjs +37 -14
- package/dist/lib/reporting/service/index.d.mts +10 -0
- package/dist/lib/reporting/service/index.d.ts +10 -0
- package/dist/lib/reporting/service/maintenance.d.mts +28 -2
- package/dist/lib/reporting/service/maintenance.d.ts +28 -2
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/account-sync-contract.d.mts +14 -0
- package/dist/lib/server/account-sync-contract.d.ts +14 -0
- package/dist/lib/server/account-sync-contract.js +225 -0
- package/dist/lib/server/account-sync-contract.mjs +197 -0
- package/dist/lib/server/adcp-server.js +5 -0
- package/dist/lib/server/adcp-server.mjs +10 -0
- package/dist/lib/server/auth-signature.d.mts +15 -0
- package/dist/lib/server/auth-signature.d.ts +15 -0
- package/dist/lib/server/auth-signature.js +72 -2
- package/dist/lib/server/auth-signature.mjs +81 -2
- package/dist/lib/server/auth.d.mts +6 -0
- package/dist/lib/server/auth.d.ts +6 -0
- package/dist/lib/server/auth.js +6 -0
- package/dist/lib/server/auth.mjs +6 -0
- package/dist/lib/server/create-adcp-server.d.mts +19 -5
- package/dist/lib/server/create-adcp-server.d.ts +19 -5
- package/dist/lib/server/create-adcp-server.js +259 -19
- package/dist/lib/server/create-adcp-server.mjs +266 -10
- package/dist/lib/server/decisioning/account.d.mts +24 -1
- package/dist/lib/server/decisioning/account.d.ts +24 -1
- package/dist/lib/server/decisioning/index.d.mts +1 -1
- package/dist/lib/server/decisioning/index.d.ts +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +0 -50
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +0 -50
- package/dist/lib/server/decisioning/runtime/from-platform.js +61 -11
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +65 -12
- package/dist/lib/server/index.d.mts +2 -0
- package/dist/lib/server/index.d.ts +2 -0
- package/dist/lib/server/index.js +12 -0
- package/dist/lib/server/index.mjs +12 -0
- package/dist/lib/server/notification-subscriptions/runtime.js +9 -1
- package/dist/lib/server/notification-subscriptions/runtime.mjs +9 -1
- package/dist/lib/server/notification-subscriptions/types.d.mts +5 -0
- package/dist/lib/server/notification-subscriptions/types.d.ts +5 -0
- package/dist/lib/server/principal/types.d.mts +1 -1
- package/dist/lib/server/principal/types.d.ts +1 -1
- package/dist/lib/server/serve.js +5 -0
- package/dist/lib/server/serve.mjs +5 -0
- package/dist/lib/server/webhook-delivery/recovery.d.mts +1 -0
- package/dist/lib/server/webhook-delivery/recovery.d.ts +1 -0
- package/dist/lib/server/webhook-delivery/recovery.js +4 -0
- package/dist/lib/server/webhook-delivery/recovery.mjs +4 -0
- package/dist/lib/server/webhook-emitter.d.mts +10 -0
- package/dist/lib/server/webhook-emitter.d.ts +10 -0
- package/dist/lib/server/webhook-emitter.js +22 -0
- package/dist/lib/server/webhook-emitter.mjs +22 -0
- package/dist/lib/signing/agent-context.d.mts +0 -5
- package/dist/lib/signing/agent-context.d.ts +0 -5
- package/dist/lib/signing/agent-context.js +9 -1
- package/dist/lib/signing/agent-context.mjs +9 -1
- package/dist/lib/signing/agent-fetch.js +27 -2
- package/dist/lib/signing/agent-fetch.mjs +32 -2
- package/dist/lib/signing/agent-resolver/canonicalize.d.mts +10 -15
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts +10 -15
- package/dist/lib/signing/agent-resolver/canonicalize.js +17 -5
- package/dist/lib/signing/agent-resolver/canonicalize.mjs +16 -5
- package/dist/lib/signing/agent-resolver/index.d.mts +1 -0
- package/dist/lib/signing/agent-resolver/index.d.ts +1 -0
- package/dist/lib/signing/agent-resolver/index.js +5 -0
- package/dist/lib/signing/agent-resolver/index.mjs +3 -0
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.mts +3 -2
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.ts +3 -2
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.js +30 -3
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.mjs +30 -3
- package/dist/lib/signing/agent-resolver/strict-json.d.mts +2 -2
- package/dist/lib/signing/agent-resolver/strict-json.d.ts +2 -2
- package/dist/lib/signing/agent-resolver/strict-json.js +5 -3
- package/dist/lib/signing/agent-resolver/strict-json.mjs +5 -3
- package/dist/lib/signing/brand-jwks.d.mts +2 -2
- package/dist/lib/signing/brand-jwks.d.ts +2 -2
- package/dist/lib/signing/brand-jwks.js +4 -4
- package/dist/lib/signing/brand-jwks.mjs +4 -4
- package/dist/lib/signing/client.d.mts +1 -0
- package/dist/lib/signing/client.d.ts +1 -0
- package/dist/lib/signing/client.js +5 -0
- package/dist/lib/signing/client.mjs +3 -0
- package/dist/lib/signing/crypto.js +8 -0
- package/dist/lib/signing/crypto.mjs +9 -1
- package/dist/lib/signing/fetch-async.js +1 -1
- package/dist/lib/signing/fetch-async.mjs +1 -1
- package/dist/lib/signing/fetch.js +1 -1
- package/dist/lib/signing/fetch.mjs +1 -1
- package/dist/lib/signing/jwks-https.d.mts +1 -1
- package/dist/lib/signing/jwks-https.d.ts +1 -1
- package/dist/lib/signing/jwks-https.js +1 -1
- package/dist/lib/signing/jwks-https.mjs +1 -1
- package/dist/lib/signing/jwks.d.mts +11 -3
- package/dist/lib/signing/jwks.d.ts +11 -3
- package/dist/lib/signing/jwks.js +1 -1
- package/dist/lib/signing/jwks.mjs +1 -1
- package/dist/lib/signing/middleware.js +9 -0
- package/dist/lib/signing/middleware.mjs +14 -0
- package/dist/lib/signing/parser.d.mts +9 -6
- package/dist/lib/signing/parser.d.ts +9 -6
- package/dist/lib/signing/parser.js +82 -64
- package/dist/lib/signing/parser.mjs +83 -65
- package/dist/lib/signing/revocation.d.mts +4 -1
- package/dist/lib/signing/revocation.d.ts +4 -1
- package/dist/lib/signing/revocation.js +36 -3
- package/dist/lib/signing/revocation.mjs +34 -2
- package/dist/lib/signing/server.d.mts +1 -1
- package/dist/lib/signing/server.d.ts +1 -1
- package/dist/lib/signing/server.js +4 -0
- package/dist/lib/signing/server.mjs +4 -0
- package/dist/lib/signing/types.d.mts +3 -0
- package/dist/lib/signing/types.d.ts +3 -0
- package/dist/lib/signing/verifier.js +1 -1
- package/dist/lib/signing/verifier.mjs +1 -1
- package/dist/lib/signing/web-bot-auth.d.mts +191 -0
- package/dist/lib/signing/web-bot-auth.d.ts +191 -0
- package/dist/lib/signing/web-bot-auth.js +837 -0
- package/dist/lib/signing/web-bot-auth.mjs +796 -0
- package/dist/lib/signing/webhook-verifier.js +1 -1
- package/dist/lib/signing/webhook-verifier.mjs +1 -1
- package/dist/lib/testing/client.d.mts +1 -4
- package/dist/lib/testing/client.d.ts +1 -4
- package/dist/lib/testing/client.js +141 -20
- package/dist/lib/testing/client.mjs +137 -19
- package/dist/lib/testing/compliance/comply.js +29 -10
- package/dist/lib/testing/compliance/comply.mjs +37 -11
- package/dist/lib/testing/storyboard/account-sync-contract.d.mts +3 -0
- package/dist/lib/testing/storyboard/account-sync-contract.d.ts +3 -0
- package/dist/lib/testing/storyboard/account-sync-contract.js +79 -0
- package/dist/lib/testing/storyboard/account-sync-contract.mjs +55 -0
- package/dist/lib/testing/storyboard/default-invariants.js +2 -0
- package/dist/lib/testing/storyboard/default-invariants.mjs +2 -0
- package/dist/lib/testing/storyboard/runner.js +23 -8
- package/dist/lib/testing/storyboard/runner.mjs +24 -8
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/adcp.d.mts +4 -0
- package/dist/lib/types/adcp.d.ts +4 -0
- package/dist/lib/types/schemas.generated.d.ts +6 -6
- package/dist/lib/utils/capabilities.d.mts +1 -0
- package/dist/lib/utils/capabilities.d.ts +1 -0
- package/dist/lib/utils/capabilities.js +5 -0
- package/dist/lib/utils/capabilities.mjs +5 -0
- package/dist/lib/v2/projection/catalog-snapshot.js +3 -1
- package/dist/lib/v2/projection/catalog-snapshot.mjs +3 -1
- package/dist/lib/v2/projection/creative-delivery.d.mts +34 -10
- package/dist/lib/v2/projection/creative-delivery.d.ts +34 -10
- package/dist/lib/v2/projection/creative-delivery.js +26 -10
- package/dist/lib/v2/projection/creative-delivery.mjs +26 -10
- package/dist/lib/v2/projection/index.d.mts +1 -1
- package/dist/lib/v2/projection/index.d.ts +1 -1
- package/dist/lib/v2/projection/index.js +2 -0
- package/dist/lib/v2/projection/index.mjs +2 -0
- package/dist/lib/v2/projection/legacy-routes.d.mts +34 -2
- package/dist/lib/v2/projection/legacy-routes.d.ts +34 -2
- package/dist/lib/v2/projection/legacy-routes.js +35 -2
- package/dist/lib/v2/projection/legacy-routes.mjs +32 -2
- package/dist/lib/validation/schema-loader.d.mts +2 -0
- package/dist/lib/validation/schema-loader.d.ts +2 -0
- package/dist/lib/validation/schema-loader.js +43 -4
- package/dist/lib/validation/schema-loader.mjs +39 -3
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +4 -0
- package/docs/guides/REPORTING-LEDGER-CUTOVER.md +1 -1
- package/docs/guides/REPORTING-LEDGER.md +99 -29
- package/docs/guides/REPORTING-OPERATIONS.md +29 -13
- package/docs/guides/REPORTING-STABILITY.md +76 -0
- package/docs/guides/account-resolution.md +101 -0
- package/docs/llms.txt +3 -2
- package/docs/migration-12-to-13.md +15 -0
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-agent-identity-3.3.md +494 -0
- package/docs/migration-agent-resolution-3.3.md +5 -0
- package/docs/migration-reporting-row-storage-alignment.md +137 -0
- package/examples/storyboards/account-sync-contract.yaml +57 -0
- package/package.json +17 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var validation_exports = {};
|
|
30
|
+
__export(validation_exports, {
|
|
31
|
+
validateIdentity33Payload: () => validateIdentity33Payload
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(validation_exports);
|
|
34
|
+
var import_ajv = __toESM(require("ajv"));
|
|
35
|
+
var import_ajv_formats = __toESM(require("ajv-formats"));
|
|
36
|
+
var import_schema_loader = require('../validation/schema-loader.js');
|
|
37
|
+
var import_schemas = __toESM(require('./schemas.draft.js'));
|
|
38
|
+
const validators = /* @__PURE__ */ new WeakMap();
|
|
39
|
+
function validateIdentity33Payload(tool, direction, payload, version) {
|
|
40
|
+
const key = JSON.stringify([tool, direction, version]);
|
|
41
|
+
const stable = (0, import_schema_loader.getValidator)(tool, direction === "request" ? "request" : "sync", version);
|
|
42
|
+
if (!stable) return { valid: true, issues: [], variant: "skipped" };
|
|
43
|
+
let cache = validators.get(stable);
|
|
44
|
+
if (!cache) {
|
|
45
|
+
cache = /* @__PURE__ */ new Map();
|
|
46
|
+
validators.set(stable, cache);
|
|
47
|
+
}
|
|
48
|
+
let validator = cache.get(key);
|
|
49
|
+
if (!validator) {
|
|
50
|
+
let walk2 = function(node, name = "") {
|
|
51
|
+
if (!node || typeof node !== "object") return;
|
|
52
|
+
if (Array.isArray(node)) {
|
|
53
|
+
node.forEach((item) => walk2(item, name));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const object = node;
|
|
57
|
+
if ((name === "reporting_webhook" || name === "artifact_webhook" || /Reporting Webhook|Artifact Webhook/i.test(object.title ?? "")) && Array.isArray(object.required))
|
|
58
|
+
object.required = object.required.filter((field) => field !== "authentication");
|
|
59
|
+
if (name === "reason" && Array.isArray(object.enum) && object.enum.includes("destination_state_changed"))
|
|
60
|
+
object.enum = [...object.enum, "relationship_changed", "relationship_expiring"];
|
|
61
|
+
if (object.properties?.url && object.properties?.authentication)
|
|
62
|
+
object.properties.signing_profile = { type: "string", enum: ["adcp/webhook-signing/v1", "web-bot-auth"] };
|
|
63
|
+
if (tool === "get_principal" && direction === "response" && object.properties?.kind && ["current", "recognized", "unconfigured"].includes(object.properties.kind.const))
|
|
64
|
+
object.properties.relationship = { ...relationship, $id: void 0 };
|
|
65
|
+
if (tool === "get_adcp_capabilities" && object.properties?.supported_billing)
|
|
66
|
+
object.properties.agent_onboarding = { ...onboarding, $id: void 0 };
|
|
67
|
+
if (tool === "get_adcp_capabilities" && ["request_signing", "webhook_signing"].includes(name) && object.properties)
|
|
68
|
+
object.properties.profiles = {
|
|
69
|
+
type: "array",
|
|
70
|
+
items: {
|
|
71
|
+
type: "string",
|
|
72
|
+
enum: name === "request_signing" ? ["adcp/request-signing/v1", "web-bot-auth"] : ["adcp/webhook-signing/v1", "web-bot-auth"]
|
|
73
|
+
},
|
|
74
|
+
minItems: 1,
|
|
75
|
+
uniqueItems: true
|
|
76
|
+
};
|
|
77
|
+
if (tool === "get_adcp_capabilities" && ["request_signing", "webhook_signing"].includes(name) && object.properties)
|
|
78
|
+
object.properties.wba_draft_revision = { type: "string", minLength: 1 };
|
|
79
|
+
for (const [k, value] of Object.entries(object)) if (k !== "$id") walk2(value, k);
|
|
80
|
+
};
|
|
81
|
+
var walk = walk2;
|
|
82
|
+
const schema = structuredClone(stable.schema);
|
|
83
|
+
const relationship = import_schemas.default.find((s) => s.$id === "/schemas/core/principal-relationship.json");
|
|
84
|
+
const onboarding = import_schemas.default.find((s) => s.$id === "/schemas/core/agent-onboarding.json");
|
|
85
|
+
walk2(schema);
|
|
86
|
+
const ajv = new import_ajv.default({ strict: false, allErrors: true });
|
|
87
|
+
(0, import_ajv_formats.default)(ajv);
|
|
88
|
+
for (const draft of import_schemas.default) ajv.addSchema({ ...draft, $id: "https://adcontextprotocol.org" + draft.$id });
|
|
89
|
+
validator = ajv.compile(schema);
|
|
90
|
+
cache.set(key, validator);
|
|
91
|
+
}
|
|
92
|
+
let valid = validator(payload) === true;
|
|
93
|
+
if (valid && tool === "get_adcp_capabilities" && payload && typeof payload === "object") {
|
|
94
|
+
const body = payload;
|
|
95
|
+
const posture = body.account?.agent_onboarding;
|
|
96
|
+
if (posture && (!body.experimental_features?.includes("account.agent_onboarding") || posture.sandbox !== void 0 && body.account?.sandbox !== true || Object.keys(posture.billing ?? {}).some((k) => !body.account?.supported_billing?.includes(k))))
|
|
97
|
+
return {
|
|
98
|
+
valid: false,
|
|
99
|
+
variant: "sync",
|
|
100
|
+
issues: [
|
|
101
|
+
{
|
|
102
|
+
pointer: "/account/agent_onboarding",
|
|
103
|
+
keyword: "experimental",
|
|
104
|
+
schemaPath: "/identity33/agent_onboarding",
|
|
105
|
+
message: "Onboarding requires its feature declaration and supported account tiers"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
valid,
|
|
112
|
+
variant: direction === "request" ? "request" : "sync",
|
|
113
|
+
issues: valid ? [] : (validator.errors ?? []).map((e) => ({
|
|
114
|
+
pointer: e.instancePath,
|
|
115
|
+
keyword: e.keyword,
|
|
116
|
+
message: e.message ?? "Invalid value",
|
|
117
|
+
params: e.params,
|
|
118
|
+
schemaPath: e.schemaPath
|
|
119
|
+
}))
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
123
|
+
0 && (module.exports = {
|
|
124
|
+
validateIdentity33Payload
|
|
125
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import Ajv from "ajv";
|
|
2
|
+
import addFormats from "ajv-formats";
|
|
3
|
+
import { getValidator } from "../validation/schema-loader.mjs";
|
|
4
|
+
import schemas from "./schemas.draft.mjs";
|
|
5
|
+
const validators = /* @__PURE__ */ new WeakMap();
|
|
6
|
+
function validateIdentity33Payload(tool, direction, payload, version) {
|
|
7
|
+
const key = JSON.stringify([tool, direction, version]);
|
|
8
|
+
const stable = getValidator(tool, direction === "request" ? "request" : "sync", version);
|
|
9
|
+
if (!stable) return { valid: true, issues: [], variant: "skipped" };
|
|
10
|
+
let cache = validators.get(stable);
|
|
11
|
+
if (!cache) {
|
|
12
|
+
cache = /* @__PURE__ */ new Map();
|
|
13
|
+
validators.set(stable, cache);
|
|
14
|
+
}
|
|
15
|
+
let validator = cache.get(key);
|
|
16
|
+
if (!validator) {
|
|
17
|
+
let walk2 = function(node, name = "") {
|
|
18
|
+
if (!node || typeof node !== "object") return;
|
|
19
|
+
if (Array.isArray(node)) {
|
|
20
|
+
node.forEach((item) => walk2(item, name));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const object = node;
|
|
24
|
+
if ((name === "reporting_webhook" || name === "artifact_webhook" || /Reporting Webhook|Artifact Webhook/i.test(object.title ?? "")) && Array.isArray(object.required))
|
|
25
|
+
object.required = object.required.filter((field) => field !== "authentication");
|
|
26
|
+
if (name === "reason" && Array.isArray(object.enum) && object.enum.includes("destination_state_changed"))
|
|
27
|
+
object.enum = [...object.enum, "relationship_changed", "relationship_expiring"];
|
|
28
|
+
if (object.properties?.url && object.properties?.authentication)
|
|
29
|
+
object.properties.signing_profile = { type: "string", enum: ["adcp/webhook-signing/v1", "web-bot-auth"] };
|
|
30
|
+
if (tool === "get_principal" && direction === "response" && object.properties?.kind && ["current", "recognized", "unconfigured"].includes(object.properties.kind.const))
|
|
31
|
+
object.properties.relationship = { ...relationship, $id: void 0 };
|
|
32
|
+
if (tool === "get_adcp_capabilities" && object.properties?.supported_billing)
|
|
33
|
+
object.properties.agent_onboarding = { ...onboarding, $id: void 0 };
|
|
34
|
+
if (tool === "get_adcp_capabilities" && ["request_signing", "webhook_signing"].includes(name) && object.properties)
|
|
35
|
+
object.properties.profiles = {
|
|
36
|
+
type: "array",
|
|
37
|
+
items: {
|
|
38
|
+
type: "string",
|
|
39
|
+
enum: name === "request_signing" ? ["adcp/request-signing/v1", "web-bot-auth"] : ["adcp/webhook-signing/v1", "web-bot-auth"]
|
|
40
|
+
},
|
|
41
|
+
minItems: 1,
|
|
42
|
+
uniqueItems: true
|
|
43
|
+
};
|
|
44
|
+
if (tool === "get_adcp_capabilities" && ["request_signing", "webhook_signing"].includes(name) && object.properties)
|
|
45
|
+
object.properties.wba_draft_revision = { type: "string", minLength: 1 };
|
|
46
|
+
for (const [k, value] of Object.entries(object)) if (k !== "$id") walk2(value, k);
|
|
47
|
+
};
|
|
48
|
+
var walk = walk2;
|
|
49
|
+
const schema = structuredClone(stable.schema);
|
|
50
|
+
const relationship = schemas.find((s) => s.$id === "/schemas/core/principal-relationship.json");
|
|
51
|
+
const onboarding = schemas.find((s) => s.$id === "/schemas/core/agent-onboarding.json");
|
|
52
|
+
walk2(schema);
|
|
53
|
+
const ajv = new Ajv({ strict: false, allErrors: true });
|
|
54
|
+
addFormats(ajv);
|
|
55
|
+
for (const draft of schemas) ajv.addSchema({ ...draft, $id: "https://adcontextprotocol.org" + draft.$id });
|
|
56
|
+
validator = ajv.compile(schema);
|
|
57
|
+
cache.set(key, validator);
|
|
58
|
+
}
|
|
59
|
+
let valid = validator(payload) === true;
|
|
60
|
+
if (valid && tool === "get_adcp_capabilities" && payload && typeof payload === "object") {
|
|
61
|
+
const body = payload;
|
|
62
|
+
const posture = body.account?.agent_onboarding;
|
|
63
|
+
if (posture && (!body.experimental_features?.includes("account.agent_onboarding") || posture.sandbox !== void 0 && body.account?.sandbox !== true || Object.keys(posture.billing ?? {}).some((k) => !body.account?.supported_billing?.includes(k))))
|
|
64
|
+
return {
|
|
65
|
+
valid: false,
|
|
66
|
+
variant: "sync",
|
|
67
|
+
issues: [
|
|
68
|
+
{
|
|
69
|
+
pointer: "/account/agent_onboarding",
|
|
70
|
+
keyword: "experimental",
|
|
71
|
+
schemaPath: "/identity33/agent_onboarding",
|
|
72
|
+
message: "Onboarding requires its feature declaration and supported account tiers"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
valid,
|
|
79
|
+
variant: direction === "request" ? "request" : "sync",
|
|
80
|
+
issues: valid ? [] : (validator.errors ?? []).map((e) => ({
|
|
81
|
+
pointer: e.instancePath,
|
|
82
|
+
keyword: e.keyword,
|
|
83
|
+
message: e.message ?? "Invalid value",
|
|
84
|
+
params: e.params,
|
|
85
|
+
schemaPath: e.schemaPath
|
|
86
|
+
}))
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
validateIdentity33Payload
|
|
91
|
+
};
|
package/dist/lib/index.d.mts
CHANGED
|
@@ -216,7 +216,7 @@ export { FormatAsset, imageAssetSlot, videoAssetSlot, audioAssetSlot, textAssetS
|
|
|
216
216
|
export { Render, urlRender, htmlRender, bothRender } from './utils/render-builders.mjs';
|
|
217
217
|
export { FormatRender, displayRender, parameterizedRender, templateRender, type DimensionsRender, type ParameterizedRender, type RenderItem, } from './utils/format-render-builders.mjs';
|
|
218
218
|
export { CanonicalFormat, canonicalFormatDeclaration, type CanonicalFormatDeclaration, type CanonicalFormatDeclaration as Format, type CanonicalFormatDeclarationFields, type CanonicalFormatKind, type CanonicalFormatParams, type ProductCardDetailedFields, type ProductCardFields, } from './v2/projection/index.mjs';
|
|
219
|
-
export { toCanonicalFormatOptionsWithRoutes, toAdditiveCanonicalProduct, withAdditiveCanonicalFormatOptions, toCanonicalOnlyProduct, toCanonicalOnlyResponse, packageRefsForFormatOptions, FormatOptionRefsLookupError, CreativeFormatCapabilityError, CreativeFormatProjectionError, type CreativeFormatWireMode, type LegacyFormatConversionContext, type LegacyFormatConverter, type LegacyFormatResolutionContext, type LegacyFormatResolver, legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, canonicalFormatLegacyResolverFromRoutes, legacyRoutesForProduct, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, type CanonicalFormatLegacyResolver, type CanonicalFormatLegacyResolutionContext, type CanonicalFormatLegacyRoute, type AdditiveCanonicalProduct, type CanonicalOnlyProduct, type CanonicalCreativeAsset, type CanonicalCreativeAsset as CreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreateMediaBuyInput, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyRequest as CreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreateMediaBuyResponse as CreateMediaBuyResponse, type CanonicalCreativeResponse, type CanonicalCreativeFilters, type CanonicalCreativeFilters as CreativeFilters, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetCreativeDeliveryResponse as GetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse as GetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalGetMediaBuysResponse as GetMediaBuysResponse, type CanonicalGetProductsResponse as GetProductsResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsRequest as GetProductsRequest, type CanonicalListCreativesRequest, type CanonicalListCreativesRequest as ListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalListCreativesResponse as ListCreativesResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageRequest as PackageRequest, type CanonicalPackageUpdate, type CanonicalPackageUpdate as PackageUpdate, type CanonicalPackage, type CanonicalPackage as Package, type CanonicalPlacement, type CanonicalPlacement as Placement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeRequest as PreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalPreviewCreativeResponse as PreviewCreativeResponse, type CanonicalProduct, type CanonicalProduct as Product, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesRequest as SyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalSyncCreativesResponse as SyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyRequest as UpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type CanonicalUpdateMediaBuyResponse as UpdateMediaBuyResponse, type LegacyCreativeAsset, type CanonicalCreativeFormatSelectorContainer, type PackageFormatRefs, type ProjectionDiagnostic, type SyncCreativeFormatProjection, } from './v2/projection/index.mjs';
|
|
219
|
+
export { toCanonicalFormatOptionsWithRoutes, toAdditiveCanonicalProduct, withAdditiveCanonicalFormatOptions, toCanonicalOnlyProduct, toCanonicalOnlyResponse, packageRefsForFormatOptions, FormatOptionRefsLookupError, CreativeFormatCapabilityError, CreativeFormatProjectionError, type CreativeFormatWireMode, type LegacyFormatConversionContext, type LegacyFormatConverter, type LegacyFormatResolutionContext, type LegacyFormatResolver, legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, canonicalFormatLegacyResolverFromRoutes, carryFormatOptionOrigins, legacyRoutesForProduct, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, type CanonicalFormatLegacyResolver, type CanonicalFormatLegacyResolutionContext, type CanonicalFormatLegacyRoute, type LegacyRoutesForProductOptions, type AdditiveCanonicalProduct, type CanonicalOnlyProduct, type CanonicalCreativeAsset, type CanonicalCreativeAsset as CreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreateMediaBuyInput, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyRequest as CreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreateMediaBuyResponse as CreateMediaBuyResponse, type CanonicalCreativeResponse, type CanonicalCreativeFilters, type CanonicalCreativeFilters as CreativeFilters, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetCreativeDeliveryResponse as GetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse as GetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalGetMediaBuysResponse as GetMediaBuysResponse, type CanonicalGetProductsResponse as GetProductsResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsRequest as GetProductsRequest, type CanonicalListCreativesRequest, type CanonicalListCreativesRequest as ListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalListCreativesResponse as ListCreativesResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageRequest as PackageRequest, type CanonicalPackageUpdate, type CanonicalPackageUpdate as PackageUpdate, type CanonicalPackage, type CanonicalPackage as Package, type CanonicalPlacement, type CanonicalPlacement as Placement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeRequest as PreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalPreviewCreativeResponse as PreviewCreativeResponse, type CanonicalProduct, type CanonicalProduct as Product, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesRequest as SyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalSyncCreativesResponse as SyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyRequest as UpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type CanonicalUpdateMediaBuyResponse as UpdateMediaBuyResponse, type LegacyCreativeAsset, type CanonicalCreativeFormatSelectorContainer, type PackageFormatRefs, type ProjectionDiagnostic, type SyncCreativeFormatProjection, } from './v2/projection/index.mjs';
|
|
220
220
|
export { activationKey, segmentIdActivationKey, keyValueActivationKey } from './utils/activation-key-builders.mjs';
|
|
221
221
|
export { signalId, catalogSignalId, agentSignalId, getSignalId, getSignalIssuer } from './utils/signal-id-builders.mjs';
|
|
222
222
|
export { buildActivateSignalRequest, getSignalActivationId, getSignalPricingOptionIds, normalizeDiscoveredSignal, } from './utils/signal-discovery-helpers.mjs';
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -216,7 +216,7 @@ export { FormatAsset, imageAssetSlot, videoAssetSlot, audioAssetSlot, textAssetS
|
|
|
216
216
|
export { Render, urlRender, htmlRender, bothRender } from './utils/render-builders';
|
|
217
217
|
export { FormatRender, displayRender, parameterizedRender, templateRender, type DimensionsRender, type ParameterizedRender, type RenderItem, } from './utils/format-render-builders';
|
|
218
218
|
export { CanonicalFormat, canonicalFormatDeclaration, type CanonicalFormatDeclaration, type CanonicalFormatDeclaration as Format, type CanonicalFormatDeclarationFields, type CanonicalFormatKind, type CanonicalFormatParams, type ProductCardDetailedFields, type ProductCardFields, } from './v2/projection';
|
|
219
|
-
export { toCanonicalFormatOptionsWithRoutes, toAdditiveCanonicalProduct, withAdditiveCanonicalFormatOptions, toCanonicalOnlyProduct, toCanonicalOnlyResponse, packageRefsForFormatOptions, FormatOptionRefsLookupError, CreativeFormatCapabilityError, CreativeFormatProjectionError, type CreativeFormatWireMode, type LegacyFormatConversionContext, type LegacyFormatConverter, type LegacyFormatResolutionContext, type LegacyFormatResolver, legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, canonicalFormatLegacyResolverFromRoutes, legacyRoutesForProduct, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, type CanonicalFormatLegacyResolver, type CanonicalFormatLegacyResolutionContext, type CanonicalFormatLegacyRoute, type AdditiveCanonicalProduct, type CanonicalOnlyProduct, type CanonicalCreativeAsset, type CanonicalCreativeAsset as CreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreateMediaBuyInput, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyRequest as CreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreateMediaBuyResponse as CreateMediaBuyResponse, type CanonicalCreativeResponse, type CanonicalCreativeFilters, type CanonicalCreativeFilters as CreativeFilters, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetCreativeDeliveryResponse as GetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse as GetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalGetMediaBuysResponse as GetMediaBuysResponse, type CanonicalGetProductsResponse as GetProductsResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsRequest as GetProductsRequest, type CanonicalListCreativesRequest, type CanonicalListCreativesRequest as ListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalListCreativesResponse as ListCreativesResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageRequest as PackageRequest, type CanonicalPackageUpdate, type CanonicalPackageUpdate as PackageUpdate, type CanonicalPackage, type CanonicalPackage as Package, type CanonicalPlacement, type CanonicalPlacement as Placement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeRequest as PreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalPreviewCreativeResponse as PreviewCreativeResponse, type CanonicalProduct, type CanonicalProduct as Product, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesRequest as SyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalSyncCreativesResponse as SyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyRequest as UpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type CanonicalUpdateMediaBuyResponse as UpdateMediaBuyResponse, type LegacyCreativeAsset, type CanonicalCreativeFormatSelectorContainer, type PackageFormatRefs, type ProjectionDiagnostic, type SyncCreativeFormatProjection, } from './v2/projection';
|
|
219
|
+
export { toCanonicalFormatOptionsWithRoutes, toAdditiveCanonicalProduct, withAdditiveCanonicalFormatOptions, toCanonicalOnlyProduct, toCanonicalOnlyResponse, packageRefsForFormatOptions, FormatOptionRefsLookupError, CreativeFormatCapabilityError, CreativeFormatProjectionError, type CreativeFormatWireMode, type LegacyFormatConversionContext, type LegacyFormatConverter, type LegacyFormatResolutionContext, type LegacyFormatResolver, legacyFormatConverterFromCatalogSnapshots, canonicalFormatLegacyResolverFromCatalogSnapshots, canonicalFormatLegacyResolverFromRoutes, carryFormatOptionOrigins, legacyRoutesForProduct, projectionAdaptersFromCatalogSnapshots, type ProjectionCatalogAdapters, type ProjectionCatalogSnapshot, type ProjectionCatalogSource, type CanonicalFormatLegacyResolver, type CanonicalFormatLegacyResolutionContext, type CanonicalFormatLegacyRoute, type LegacyRoutesForProductOptions, type AdditiveCanonicalProduct, type CanonicalOnlyProduct, type CanonicalCreativeAsset, type CanonicalCreativeAsset as CreativeAsset, type CanonicalSyncCreativeAsset, type CanonicalCreateMediaBuyInput, type CanonicalCreateMediaBuyRequest, type CanonicalCreateMediaBuyRequest as CreateMediaBuyRequest, type CanonicalCreateMediaBuyResponse, type CanonicalCreateMediaBuyResponse as CreateMediaBuyResponse, type CanonicalCreativeResponse, type CanonicalCreativeFilters, type CanonicalCreativeFilters as CreativeFilters, type CanonicalGetCreativeDeliveryResponse, type CanonicalGetCreativeDeliveryResponse as GetCreativeDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse, type CanonicalGetMediaBuyDeliveryResponse as GetMediaBuyDeliveryResponse, type CanonicalGetMediaBuysResponse, type CanonicalGetMediaBuysResponse as GetMediaBuysResponse, type CanonicalGetProductsResponse as GetProductsResponse, type CanonicalGetProductsRequest, type CanonicalGetProductsRequest as GetProductsRequest, type CanonicalListCreativesRequest, type CanonicalListCreativesRequest as ListCreativesRequest, type CanonicalListCreativesResponse, type CanonicalListCreativesResponse as ListCreativesResponse, type CanonicalListedCreative, type CanonicalPackageRequest, type CanonicalPackageRequest as PackageRequest, type CanonicalPackageUpdate, type CanonicalPackageUpdate as PackageUpdate, type CanonicalPackage, type CanonicalPackage as Package, type CanonicalPlacement, type CanonicalPlacement as Placement, type CanonicalPreviewCreativeRequest, type CanonicalPreviewCreativeRequest as PreviewCreativeRequest, type CanonicalPreviewCreativeResponse, type CanonicalPreviewCreativeResponse as PreviewCreativeResponse, type CanonicalProduct, type CanonicalProduct as Product, type CanonicalProjectedCreative, type CanonicalSyncCreativesRequest, type CanonicalSyncCreativesRequest as SyncCreativesRequest, type CanonicalSyncCreativesResponse, type CanonicalSyncCreativesResponse as SyncCreativesResponse, type CanonicalUpdateMediaBuyRequest, type CanonicalUpdateMediaBuyRequest as UpdateMediaBuyRequest, type CanonicalUpdateMediaBuyResponse, type CanonicalUpdateMediaBuyResponse as UpdateMediaBuyResponse, type LegacyCreativeAsset, type CanonicalCreativeFormatSelectorContainer, type PackageFormatRefs, type ProjectionDiagnostic, type SyncCreativeFormatProjection, } from './v2/projection';
|
|
220
220
|
export { activationKey, segmentIdActivationKey, keyValueActivationKey } from './utils/activation-key-builders';
|
|
221
221
|
export { signalId, catalogSignalId, agentSignalId, getSignalId, getSignalIssuer } from './utils/signal-id-builders';
|
|
222
222
|
export { buildActivateSignalRequest, getSignalActivationId, getSignalPricingOptionIds, normalizeDiscoveredSignal, } from './utils/signal-discovery-helpers';
|
package/dist/lib/index.js
CHANGED
|
@@ -286,6 +286,7 @@ __export(index_exports, {
|
|
|
286
286
|
canonicalReferenceCacheKey: () => import_canonical_references.canonicalReferenceCacheKey,
|
|
287
287
|
canonicalize: () => import_jcs.canonicalize,
|
|
288
288
|
canonicalizeAgentUrl: () => import_resolve_agent_properties.canonicalizeAgentUrl,
|
|
289
|
+
carryFormatOptionOrigins: () => import_projection2.carryFormatOptionOrigins,
|
|
289
290
|
catalogAssetSlot: () => import_format_asset_slot_builders.catalogAssetSlot,
|
|
290
291
|
catalogSignalId: () => import_signal_id_builders.catalogSignalId,
|
|
291
292
|
checkGovernance: () => import_server.checkGovernance,
|
|
@@ -1131,6 +1132,7 @@ function createAdCPClientFromEnv() {
|
|
|
1131
1132
|
canonicalReferenceCacheKey,
|
|
1132
1133
|
canonicalize,
|
|
1133
1134
|
canonicalizeAgentUrl,
|
|
1135
|
+
carryFormatOptionOrigins,
|
|
1134
1136
|
catalogAssetSlot,
|
|
1135
1137
|
catalogSignalId,
|
|
1136
1138
|
checkGovernance,
|
package/dist/lib/index.mjs
CHANGED
|
@@ -575,6 +575,7 @@ import {
|
|
|
575
575
|
legacyFormatConverterFromCatalogSnapshots,
|
|
576
576
|
canonicalFormatLegacyResolverFromCatalogSnapshots,
|
|
577
577
|
canonicalFormatLegacyResolverFromRoutes,
|
|
578
|
+
carryFormatOptionOrigins,
|
|
578
579
|
legacyRoutesForProduct,
|
|
579
580
|
projectionAdaptersFromCatalogSnapshots
|
|
580
581
|
} from "./v2/projection/index.mjs";
|
|
@@ -1089,6 +1090,7 @@ export {
|
|
|
1089
1090
|
canonicalReferenceCacheKey,
|
|
1090
1091
|
canonicalize,
|
|
1091
1092
|
canonicalizeAgentUrl,
|
|
1093
|
+
carryFormatOptionOrigins,
|
|
1092
1094
|
catalogAssetSlot,
|
|
1093
1095
|
catalogSignalId,
|
|
1094
1096
|
checkGovernance,
|
|
@@ -197,7 +197,7 @@ export interface PreparedProtocolToolCall {
|
|
|
197
197
|
args: Record<string, unknown>;
|
|
198
198
|
/** Native A2A TaskPushNotificationConfig retained independently of AdCP registration. */
|
|
199
199
|
pushNotificationConfig?: PushNotificationConfig;
|
|
200
|
-
/** Stable operation ID generated for
|
|
200
|
+
/** Stable operation ID generated for an AdCP 3.1+ application webhook registration. */
|
|
201
201
|
operationId?: string;
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
@@ -197,7 +197,7 @@ export interface PreparedProtocolToolCall {
|
|
|
197
197
|
args: Record<string, unknown>;
|
|
198
198
|
/** Native A2A TaskPushNotificationConfig retained independently of AdCP registration. */
|
|
199
199
|
pushNotificationConfig?: PushNotificationConfig;
|
|
200
|
-
/** Stable operation ID generated for
|
|
200
|
+
/** Stable operation ID generated for an AdCP 3.1+ application webhook registration. */
|
|
201
201
|
operationId?: string;
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
@@ -179,7 +179,7 @@ function prepareProtocolToolCall(agent, args, options = {}) {
|
|
|
179
179
|
const argsWithVersion = applyVersionEnvelope(args, envelope);
|
|
180
180
|
applyPublishedSchemaCompatibility(options.toolName, argsWithVersion, args);
|
|
181
181
|
const effectiveBundle = typeof argsWithVersion.adcp_version === "string" ? (0, import_schema_loader.resolveBundleKey)(argsWithVersion.adcp_version) : void 0;
|
|
182
|
-
const usesApplicationRegistration = options.serverVersion !== "v2" && (0, import_adcp_version_config.isAdcpVersionAtLeast)(effectiveBundle, "3.
|
|
182
|
+
const usesApplicationRegistration = options.serverVersion !== "v2" && (0, import_adcp_version_config.isAdcpVersionAtLeast)(effectiveBundle, "3.1.0");
|
|
183
183
|
let pushNotificationConfig;
|
|
184
184
|
let applicationPushNotificationConfig;
|
|
185
185
|
let operationId;
|
|
@@ -213,7 +213,7 @@ function prepareProtocolToolCall(agent, args, options = {}) {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
return {
|
|
216
|
-
// AdCP 3.
|
|
216
|
+
// AdCP 3.1+ task-webhook registration is application-layer data on every
|
|
217
217
|
// transport. A2A's native TaskPushNotificationConfig is a distinct
|
|
218
218
|
// transport feature and must not replace this argument.
|
|
219
219
|
args: applicationPushNotificationConfig ? { ...argsWithVersion, push_notification_config: applicationPushNotificationConfig } : argsWithVersion,
|
|
@@ -159,7 +159,7 @@ function prepareProtocolToolCall(agent, args, options = {}) {
|
|
|
159
159
|
const argsWithVersion = applyVersionEnvelope(args, envelope);
|
|
160
160
|
applyPublishedSchemaCompatibility(options.toolName, argsWithVersion, args);
|
|
161
161
|
const effectiveBundle = typeof argsWithVersion.adcp_version === "string" ? resolveBundleKey(argsWithVersion.adcp_version) : void 0;
|
|
162
|
-
const usesApplicationRegistration = options.serverVersion !== "v2" && isAdcpVersionAtLeast(effectiveBundle, "3.
|
|
162
|
+
const usesApplicationRegistration = options.serverVersion !== "v2" && isAdcpVersionAtLeast(effectiveBundle, "3.1.0");
|
|
163
163
|
let pushNotificationConfig;
|
|
164
164
|
let applicationPushNotificationConfig;
|
|
165
165
|
let operationId;
|
|
@@ -193,7 +193,7 @@ function prepareProtocolToolCall(agent, args, options = {}) {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
return {
|
|
196
|
-
// AdCP 3.
|
|
196
|
+
// AdCP 3.1+ task-webhook registration is application-layer data on every
|
|
197
197
|
// transport. A2A's native TaskPushNotificationConfig is a distinct
|
|
198
198
|
// transport feature and must not replace this argument.
|
|
199
199
|
args: applicationPushNotificationConfig ? { ...argsWithVersion, push_notification_config: applicationPushNotificationConfig } : argsWithVersion,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { BlobServiceClient } from '@azure/storage-blob';
|
|
2
2
|
import type { ReportingRowObjectProviderV1 } from '../ledger/row-storage-object.mjs';
|
|
3
|
+
/**
|
|
4
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
5
|
+
*/
|
|
3
6
|
export interface CreateAzureBlobReportingRowObjectProviderOptionsV1 {
|
|
4
7
|
/** Official client used by bindings without a `credentialRef`. */
|
|
5
8
|
client?: BlobServiceClient;
|
|
@@ -22,5 +25,7 @@ export interface CreateAzureBlobReportingRowObjectProviderOptionsV1 {
|
|
|
22
25
|
* identical bytes at the same key (ETags are content-derived and cannot fence that).
|
|
23
26
|
* The probe refuses accounts without versioning and proves create-only behaviour
|
|
24
27
|
* empirically.
|
|
28
|
+
*
|
|
29
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
25
30
|
*/
|
|
26
31
|
export declare function createAzureBlobReportingRowObjectProviderV1(options: CreateAzureBlobReportingRowObjectProviderOptionsV1): ReportingRowObjectProviderV1;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { BlobServiceClient } from '@azure/storage-blob';
|
|
2
2
|
import type { ReportingRowObjectProviderV1 } from '../ledger/row-storage-object';
|
|
3
|
+
/**
|
|
4
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
5
|
+
*/
|
|
3
6
|
export interface CreateAzureBlobReportingRowObjectProviderOptionsV1 {
|
|
4
7
|
/** Official client used by bindings without a `credentialRef`. */
|
|
5
8
|
client?: BlobServiceClient;
|
|
@@ -22,5 +25,7 @@ export interface CreateAzureBlobReportingRowObjectProviderOptionsV1 {
|
|
|
22
25
|
* identical bytes at the same key (ETags are content-derived and cannot fence that).
|
|
23
26
|
* The probe refuses accounts without versioning and proves create-only behaviour
|
|
24
27
|
* empirically.
|
|
28
|
+
*
|
|
29
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
25
30
|
*/
|
|
26
31
|
export declare function createAzureBlobReportingRowObjectProviderV1(options: CreateAzureBlobReportingRowObjectProviderOptionsV1): ReportingRowObjectProviderV1;
|
|
@@ -86,12 +86,12 @@ function createAzureBlobReportingRowObjectProviderV1(options) {
|
|
|
86
86
|
return client.getContainerClient(input.location.container);
|
|
87
87
|
};
|
|
88
88
|
const blobFor = (input) => {
|
|
89
|
-
if (typeof input.
|
|
89
|
+
if (typeof input.objectRef !== "string" || input.objectRef.length === 0 || input.objectRef.length > 1024) {
|
|
90
90
|
throw new import_row_storage_errors.ReportingRowStoreError("INVALID_INPUT", "object key is invalid");
|
|
91
91
|
}
|
|
92
|
-
return containerFor(input).getBlockBlobClient(input.
|
|
92
|
+
return containerFor(input).getBlockBlobClient(input.objectRef);
|
|
93
93
|
};
|
|
94
|
-
const pinned = (blob,
|
|
94
|
+
const pinned = (blob, nativeVersionRef) => typeof nativeVersionRef === "string" && VERSION_ID.test(nativeVersionRef) ? { blob: blob.withVersion(nativeVersionRef), versionId: nativeVersionRef } : null;
|
|
95
95
|
async function assertCreateOnlyEnforced(container, prefix, signal) {
|
|
96
96
|
const blob = container.getBlockBlobClient(`${prefix}/.adcp-probe/${(0, import_node_crypto.randomUUID)()}`);
|
|
97
97
|
const versionIds = [];
|
|
@@ -158,19 +158,19 @@ function createAzureBlobReportingRowObjectProviderV1(options) {
|
|
|
158
158
|
metadata: metadataOf(input.metadata),
|
|
159
159
|
abortSignal: context.signal
|
|
160
160
|
});
|
|
161
|
-
return { created: true,
|
|
161
|
+
return { created: true, nativeVersionRef: versionOf(response) };
|
|
162
162
|
} catch (error) {
|
|
163
163
|
if (!isConflict(error)) throw error;
|
|
164
164
|
}
|
|
165
165
|
const existing = await blob.getProperties({ abortSignal: context.signal });
|
|
166
|
-
return { created: false,
|
|
166
|
+
return { created: false, nativeVersionRef: versionOf(existing) };
|
|
167
167
|
});
|
|
168
168
|
},
|
|
169
169
|
get(input, context) {
|
|
170
170
|
return (0, import_row_storage_provider_io.runReportingRowProviderOperation)(context.signal, async () => {
|
|
171
171
|
const blob = blobFor(input);
|
|
172
172
|
(0, import_row_storage_provider_io.assertReportingRowReadBounds)(input);
|
|
173
|
-
const target = pinned(blob, input.
|
|
173
|
+
const target = pinned(blob, input.nativeVersionRef);
|
|
174
174
|
if (target === null) return null;
|
|
175
175
|
try {
|
|
176
176
|
if (input.range?.length === 0) {
|
|
@@ -207,10 +207,29 @@ function createAzureBlobReportingRowObjectProviderV1(options) {
|
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
},
|
|
210
|
+
stat(input, context) {
|
|
211
|
+
return (0, import_row_storage_provider_io.runReportingRowProviderOperation)(context.signal, async () => {
|
|
212
|
+
const blob = blobFor(input);
|
|
213
|
+
const target = pinned(blob, input.nativeVersionRef);
|
|
214
|
+
if (target === null) return null;
|
|
215
|
+
try {
|
|
216
|
+
const properties = await target.blob.getProperties({ abortSignal: context.signal });
|
|
217
|
+
if (!servedVersion(properties, target.versionId)) return null;
|
|
218
|
+
const size = properties.contentLength;
|
|
219
|
+
if (typeof size !== "number" || !Number.isSafeInteger(size) || size < 0) {
|
|
220
|
+
throw new import_row_storage_errors.ReportingRowStoreError("PROVIDER_UNAVAILABLE", "blob metadata is malformed");
|
|
221
|
+
}
|
|
222
|
+
return { nativeVersionRef: target.versionId, sizeBytes: size };
|
|
223
|
+
} catch (error) {
|
|
224
|
+
if (isMissing(error) || statusOf(error) === 400) return null;
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
},
|
|
210
229
|
delete(input, context) {
|
|
211
230
|
return (0, import_row_storage_provider_io.runReportingRowProviderOperation)(context.signal, async () => {
|
|
212
231
|
const blob = blobFor(input);
|
|
213
|
-
const target = pinned(blob, input.
|
|
232
|
+
const target = pinned(blob, input.nativeVersionRef);
|
|
214
233
|
if (target === null) return "absent";
|
|
215
234
|
const signal = context.signal;
|
|
216
235
|
try {
|
|
@@ -70,12 +70,12 @@ function createAzureBlobReportingRowObjectProviderV1(options) {
|
|
|
70
70
|
return client.getContainerClient(input.location.container);
|
|
71
71
|
};
|
|
72
72
|
const blobFor = (input) => {
|
|
73
|
-
if (typeof input.
|
|
73
|
+
if (typeof input.objectRef !== "string" || input.objectRef.length === 0 || input.objectRef.length > 1024) {
|
|
74
74
|
throw new ReportingRowStoreError("INVALID_INPUT", "object key is invalid");
|
|
75
75
|
}
|
|
76
|
-
return containerFor(input).getBlockBlobClient(input.
|
|
76
|
+
return containerFor(input).getBlockBlobClient(input.objectRef);
|
|
77
77
|
};
|
|
78
|
-
const pinned = (blob,
|
|
78
|
+
const pinned = (blob, nativeVersionRef) => typeof nativeVersionRef === "string" && VERSION_ID.test(nativeVersionRef) ? { blob: blob.withVersion(nativeVersionRef), versionId: nativeVersionRef } : null;
|
|
79
79
|
async function assertCreateOnlyEnforced(container, prefix, signal) {
|
|
80
80
|
const blob = container.getBlockBlobClient(`${prefix}/.adcp-probe/${randomUUID()}`);
|
|
81
81
|
const versionIds = [];
|
|
@@ -142,19 +142,19 @@ function createAzureBlobReportingRowObjectProviderV1(options) {
|
|
|
142
142
|
metadata: metadataOf(input.metadata),
|
|
143
143
|
abortSignal: context.signal
|
|
144
144
|
});
|
|
145
|
-
return { created: true,
|
|
145
|
+
return { created: true, nativeVersionRef: versionOf(response) };
|
|
146
146
|
} catch (error) {
|
|
147
147
|
if (!isConflict(error)) throw error;
|
|
148
148
|
}
|
|
149
149
|
const existing = await blob.getProperties({ abortSignal: context.signal });
|
|
150
|
-
return { created: false,
|
|
150
|
+
return { created: false, nativeVersionRef: versionOf(existing) };
|
|
151
151
|
});
|
|
152
152
|
},
|
|
153
153
|
get(input, context) {
|
|
154
154
|
return runReportingRowProviderOperation(context.signal, async () => {
|
|
155
155
|
const blob = blobFor(input);
|
|
156
156
|
assertReportingRowReadBounds(input);
|
|
157
|
-
const target = pinned(blob, input.
|
|
157
|
+
const target = pinned(blob, input.nativeVersionRef);
|
|
158
158
|
if (target === null) return null;
|
|
159
159
|
try {
|
|
160
160
|
if (input.range?.length === 0) {
|
|
@@ -191,10 +191,29 @@ function createAzureBlobReportingRowObjectProviderV1(options) {
|
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
},
|
|
194
|
+
stat(input, context) {
|
|
195
|
+
return runReportingRowProviderOperation(context.signal, async () => {
|
|
196
|
+
const blob = blobFor(input);
|
|
197
|
+
const target = pinned(blob, input.nativeVersionRef);
|
|
198
|
+
if (target === null) return null;
|
|
199
|
+
try {
|
|
200
|
+
const properties = await target.blob.getProperties({ abortSignal: context.signal });
|
|
201
|
+
if (!servedVersion(properties, target.versionId)) return null;
|
|
202
|
+
const size = properties.contentLength;
|
|
203
|
+
if (typeof size !== "number" || !Number.isSafeInteger(size) || size < 0) {
|
|
204
|
+
throw new ReportingRowStoreError("PROVIDER_UNAVAILABLE", "blob metadata is malformed");
|
|
205
|
+
}
|
|
206
|
+
return { nativeVersionRef: target.versionId, sizeBytes: size };
|
|
207
|
+
} catch (error) {
|
|
208
|
+
if (isMissing(error) || statusOf(error) === 400) return null;
|
|
209
|
+
throw error;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
},
|
|
194
213
|
delete(input, context) {
|
|
195
214
|
return runReportingRowProviderOperation(context.signal, async () => {
|
|
196
215
|
const blob = blobFor(input);
|
|
197
|
-
const target = pinned(blob, input.
|
|
216
|
+
const target = pinned(blob, input.nativeVersionRef);
|
|
198
217
|
if (target === null) return "absent";
|
|
199
218
|
const signal = context.signal;
|
|
200
219
|
try {
|
|
@@ -24,9 +24,17 @@ import type { PostgresReportingLedgerStore, ReportingLedgerRevisionMetadataV1, R
|
|
|
24
24
|
* Concurrent runs claim one durable plan with compare-and-swap. Replays of
|
|
25
25
|
* that plan share job IDs; stale runs cannot change its attempts or cursor.
|
|
26
26
|
*/
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Apply after `REPORTING_LEDGER_CHANGES_MIGRATION`. Holds one row per sink.
|
|
29
|
+
*
|
|
30
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
31
|
+
*/
|
|
28
32
|
export declare const REPORTING_WAREHOUSE_SINK_MIGRATION: string;
|
|
29
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Structural subset of the official `@google-cloud/bigquery` client the sink uses.
|
|
35
|
+
*
|
|
36
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
37
|
+
*/
|
|
30
38
|
export interface ReportingBigQueryClientV1 {
|
|
31
39
|
dataset(datasetId: string, options?: {
|
|
32
40
|
projectId?: string;
|
|
@@ -49,10 +57,16 @@ export interface ReportingBigQueryClientV1 {
|
|
|
49
57
|
location?: string;
|
|
50
58
|
}): Promise<unknown>;
|
|
51
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
62
|
+
*/
|
|
52
63
|
export interface ReportingWarehouseRowContextV1 {
|
|
53
64
|
revision: ReportingLedgerRevisionMetadataV1;
|
|
54
65
|
ordinal: number;
|
|
55
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
69
|
+
*/
|
|
56
70
|
export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
57
71
|
/** Ledger store with `changeFeed: true`. */
|
|
58
72
|
store: Pick<PostgresReportingLedgerStore, 'changesAfter' | 'getRevisionMetadata' | 'readRevisionRows'> & {
|
|
@@ -90,7 +104,9 @@ export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
|
90
104
|
/**
|
|
91
105
|
* Map one verified report row to the adopter's columns. The sink always adds
|
|
92
106
|
* `reporting_revision_id`, `reporting_obligation_id`, `account_id`,
|
|
93
|
-
* `revision_number`, `finality`, `period_date`
|
|
107
|
+
* `revision_number`, `finality`, `period_date` (the period start's calendar date in its
|
|
108
|
+
* `source_timezone`, AdCP's `YYYY-MM-DD`; the batch fails if it cannot be computed) and
|
|
109
|
+
* `ordinal`. Default: the
|
|
94
110
|
* row as a `row` JSON column.
|
|
95
111
|
*/
|
|
96
112
|
mapRow?(row: Record<string, unknown>, context: ReportingWarehouseRowContextV1): Record<string, unknown>;
|
|
@@ -128,6 +144,9 @@ export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
|
128
144
|
*/
|
|
129
145
|
loadTimeoutMilliseconds?: number;
|
|
130
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
149
|
+
*/
|
|
131
150
|
export interface BigQueryReportingWarehouseSinkV1 {
|
|
132
151
|
/**
|
|
133
152
|
* Load at most one batch. Resolves with what was loaded; `idle` when no
|
|
@@ -185,13 +204,22 @@ export interface BigQueryReportingWarehouseSinkV1 {
|
|
|
185
204
|
/** DDL for the reference `current_rows` view. */
|
|
186
205
|
readonly currentRowsViewSql: string;
|
|
187
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
209
|
+
*/
|
|
188
210
|
export declare function createBigQueryReportingWarehouseSinkV1(options: CreateBigQueryReportingWarehouseSinkOptionsV1): BigQueryReportingWarehouseSinkV1;
|
|
189
211
|
/**
|
|
190
212
|
* How long one run may upload a file or wait for a running job: the configured
|
|
191
213
|
* base doubled once per earlier timeout of that table's load, capped at 6 hours.
|
|
214
|
+
*
|
|
215
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
192
216
|
*/
|
|
193
217
|
export declare function reportingWarehouseLoadDeadlineV1(baseMilliseconds: number, timeouts: number): number;
|
|
194
|
-
/**
|
|
218
|
+
/**
|
|
219
|
+
* Deterministic load job ID for one planned change-feed range.
|
|
220
|
+
*
|
|
221
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
222
|
+
*/
|
|
195
223
|
export declare function reportingWarehouseJobIdV1(name: string, from: string | null, to: string, generation?: number): string;
|
|
196
224
|
interface WarehouseTablesV1 {
|
|
197
225
|
projectId?: string;
|
|
@@ -199,12 +227,18 @@ interface WarehouseTablesV1 {
|
|
|
199
227
|
rowsTableId: string;
|
|
200
228
|
revisionsTableId: string;
|
|
201
229
|
}
|
|
202
|
-
/**
|
|
230
|
+
/**
|
|
231
|
+
* DDL for the default warehouse tables: partitioned by period date, clustered by account and revision.
|
|
232
|
+
*
|
|
233
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
234
|
+
*/
|
|
203
235
|
export declare function reportingWarehouseDefaultTablesSqlV1(tables: WarehouseTablesV1): string;
|
|
204
236
|
/**
|
|
205
237
|
* DDL for the reference `current_rows` view: only each obligation's current
|
|
206
238
|
* revision (its official revision, otherwise its latest snapshot). Summing
|
|
207
239
|
* cumulative snapshots across revisions double-counts; query this view.
|
|
240
|
+
*
|
|
241
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
208
242
|
*/
|
|
209
243
|
export declare function reportingWarehouseCurrentRowsViewSqlV1(tables: WarehouseTablesV1 & {
|
|
210
244
|
viewId?: string;
|