@adcp/sdk 16.5.0 → 16.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/adapters/version/3.0/brand-fields.d.mts +7 -1
- package/dist/lib/adapters/version/3.0/brand-fields.d.ts +7 -1
- package/dist/lib/adapters/version/3.0/brand-fields.js +139 -3
- package/dist/lib/adapters/version/3.0/brand-fields.mjs +136 -2
- package/dist/lib/adapters/version/3.0/index.js +6 -0
- package/dist/lib/adapters/version/3.0/index.mjs +7 -1
- package/dist/lib/adapters/version/3.1/bidding.js +1 -1
- package/dist/lib/adapters/version/3.1/bidding.mjs +1 -1
- package/dist/lib/adapters/version/types.d.mts +5 -0
- package/dist/lib/adapters/version/types.d.ts +5 -0
- package/dist/lib/canonical-references/index.js +2 -0
- package/dist/lib/canonical-references/index.mjs +2 -0
- package/dist/lib/client/account-changes.d.mts +3 -1
- package/dist/lib/client/account-changes.d.ts +3 -1
- package/dist/lib/client/account-changes.js +22 -2
- package/dist/lib/client/account-changes.mjs +22 -2
- package/dist/lib/conformance/oracle.js +3 -2
- package/dist/lib/conformance/oracle.mjs +3 -2
- package/dist/lib/core/AgentClient.d.mts +165 -1
- package/dist/lib/core/AgentClient.d.ts +165 -1
- package/dist/lib/core/AgentClient.js +446 -8
- package/dist/lib/core/AgentClient.mjs +446 -8
- package/dist/lib/core/ConversationTypes.d.mts +8 -0
- package/dist/lib/core/ConversationTypes.d.ts +8 -0
- package/dist/lib/core/ProtocolResponseParser.d.mts +1 -1
- package/dist/lib/core/ProtocolResponseParser.d.ts +1 -1
- package/dist/lib/core/ProtocolResponseParser.js +28 -18
- package/dist/lib/core/ProtocolResponseParser.mjs +11 -1
- package/dist/lib/core/ResponseValidator.js +1 -1
- package/dist/lib/core/ResponseValidator.mjs +1 -1
- package/dist/lib/core/SingleAgentClient.d.mts +116 -6
- package/dist/lib/core/SingleAgentClient.d.ts +116 -6
- package/dist/lib/core/SingleAgentClient.js +556 -84
- package/dist/lib/core/SingleAgentClient.mjs +545 -72
- package/dist/lib/core/TaskExecutor.d.mts +7 -0
- package/dist/lib/core/TaskExecutor.d.ts +7 -0
- package/dist/lib/core/TaskExecutor.js +23 -8
- package/dist/lib/core/TaskExecutor.mjs +23 -8
- package/dist/lib/core/task-status.d.mts +2 -0
- package/dist/lib/core/task-status.d.ts +2 -0
- package/dist/lib/core/task-status.js +11 -2
- package/dist/lib/core/task-status.mjs +9 -1
- package/dist/lib/errors/index.d.mts +22 -0
- package/dist/lib/errors/index.d.ts +22 -0
- package/dist/lib/errors/index.js +43 -0
- package/dist/lib/errors/index.mjs +42 -0
- package/dist/lib/identity-3.3/trust.d.mts +1 -4
- package/dist/lib/identity-3.3/trust.d.ts +1 -4
- package/dist/lib/identity-3.3/trust.js +34 -21
- package/dist/lib/identity-3.3/trust.mjs +34 -21
- package/dist/lib/identity-3.3/validation.js +5 -3
- package/dist/lib/identity-3.3/validation.mjs +6 -4
- package/dist/lib/index.d.mts +8 -54
- package/dist/lib/index.d.ts +8 -54
- package/dist/lib/index.js +15 -0
- package/dist/lib/index.mjs +11 -0
- package/dist/lib/media-buy/action-assessment.js +29 -3
- package/dist/lib/media-buy/action-assessment.mjs +32 -4
- package/dist/lib/media-buy/action-contracts.d.mts +3 -0
- package/dist/lib/media-buy/action-contracts.d.ts +3 -0
- package/dist/lib/media-buy/action-contracts.js +24 -1
- package/dist/lib/media-buy/action-contracts.mjs +22 -1
- package/dist/lib/media-buy/compatibility.js +6 -1
- package/dist/lib/media-buy/compatibility.mjs +6 -1
- package/dist/lib/media-buy/preflight.js +1 -1
- package/dist/lib/media-buy/preflight.mjs +3 -2
- package/dist/lib/media-buy/types.d.mts +6 -1
- package/dist/lib/media-buy/types.d.ts +6 -1
- package/dist/lib/protocols/mcp-modern.d.mts +2 -0
- package/dist/lib/protocols/mcp-modern.d.ts +2 -0
- package/dist/lib/protocols/mcp-modern.js +31 -5
- package/dist/lib/protocols/mcp-modern.mjs +31 -5
- package/dist/lib/protocols/mcp-scope.d.mts +6 -1
- package/dist/lib/protocols/mcp-scope.d.ts +6 -1
- package/dist/lib/protocols/mcp-scope.js +25 -3
- package/dist/lib/protocols/mcp-scope.mjs +24 -3
- package/dist/lib/protocols/mcp.js +12 -6
- package/dist/lib/protocols/mcp.mjs +13 -6
- package/dist/lib/reporting/inspection.js +1 -0
- package/dist/lib/reporting/inspection.mjs +1 -0
- package/dist/lib/schemas/browser.d.mts +2 -0
- package/dist/lib/schemas/browser.d.ts +2 -0
- package/dist/lib/schemas/browser.js +3 -0
- package/dist/lib/schemas/browser.mjs +2 -0
- package/dist/lib/schemas/index.d.mts +5 -2
- package/dist/lib/schemas/index.d.ts +5 -2
- package/dist/lib/schemas/index.js +5 -0
- package/dist/lib/schemas/index.mjs +4 -0
- package/dist/lib/server/account-response-identity.d.mts +17 -0
- package/dist/lib/server/account-response-identity.d.ts +17 -0
- package/dist/lib/server/account-response-identity.js +52 -0
- package/dist/lib/server/account-response-identity.mjs +28 -0
- package/dist/lib/server/account-sync-contract.js +1 -0
- package/dist/lib/server/account-sync-contract.mjs +1 -0
- package/dist/lib/server/create-adcp-server.js +32 -19
- package/dist/lib/server/create-adcp-server.mjs +36 -12
- package/dist/lib/server/decisioning/account.d.mts +13 -6
- package/dist/lib/server/decisioning/account.d.ts +13 -6
- package/dist/lib/server/decisioning/account.js +37 -15
- package/dist/lib/server/decisioning/account.mjs +37 -15
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +5 -5
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +5 -5
- package/dist/lib/server/decisioning/runtime/from-platform.js +6 -6
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +6 -6
- package/dist/lib/server/index.d.mts +1 -1
- package/dist/lib/server/index.d.ts +1 -1
- package/dist/lib/server/index.js +2 -0
- package/dist/lib/server/index.mjs +2 -0
- package/dist/lib/server/media-buy-action-resolver.d.mts +3 -0
- package/dist/lib/server/media-buy-action-resolver.d.ts +3 -0
- package/dist/lib/server/media-buy-action-resolver.js +32 -0
- package/dist/lib/server/media-buy-action-resolver.mjs +32 -0
- package/dist/lib/server/media-buy-store.d.mts +26 -12
- package/dist/lib/server/media-buy-store.d.ts +26 -12
- package/dist/lib/server/media-buy-store.js +69 -21
- package/dist/lib/server/media-buy-store.mjs +69 -21
- package/dist/lib/server/responses.js +9 -1
- package/dist/lib/server/responses.mjs +9 -1
- package/dist/lib/server/state-machine.d.mts +10 -11
- package/dist/lib/server/state-machine.d.ts +10 -11
- package/dist/lib/server/state-machine.js +20 -5
- package/dist/lib/server/state-machine.mjs +19 -5
- package/dist/lib/signing/agent-fetch.d.mts +1 -1
- package/dist/lib/signing/agent-fetch.d.ts +1 -1
- package/dist/lib/signing/agent-fetch.js +3 -3
- package/dist/lib/signing/agent-fetch.mjs +3 -3
- package/dist/lib/testing/client.d.mts +1 -0
- package/dist/lib/testing/client.d.ts +1 -0
- package/dist/lib/testing/client.js +6 -5
- package/dist/lib/testing/client.mjs +6 -5
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +60 -14
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +60 -14
- package/dist/lib/testing/storyboard/compliance.d.mts +2 -5
- package/dist/lib/testing/storyboard/compliance.d.ts +2 -5
- package/dist/lib/testing/storyboard/compliance.js +62 -13
- package/dist/lib/testing/storyboard/compliance.mjs +63 -14
- package/dist/lib/testing/storyboard/context.d.mts +13 -3
- package/dist/lib/testing/storyboard/context.d.ts +13 -3
- package/dist/lib/testing/storyboard/context.js +15 -10
- package/dist/lib/testing/storyboard/context.mjs +15 -10
- package/dist/lib/testing/storyboard/default-invariants.js +10 -8
- package/dist/lib/testing/storyboard/default-invariants.mjs +11 -9
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.js +11 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +10 -0
- package/dist/lib/testing/storyboard/runner.js +23 -10
- package/dist/lib/testing/storyboard/runner.mjs +23 -10
- 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 +4 -1
- package/dist/lib/testing/storyboard/validations.mjs +4 -1
- package/dist/lib/testing/test-controller.js +3 -0
- package/dist/lib/testing/test-controller.mjs +3 -0
- package/dist/lib/types/asset-instances.d.mts +1 -1
- package/dist/lib/types/asset-instances.d.ts +1 -1
- package/dist/lib/types/index.d.mts +5 -0
- package/dist/lib/types/index.d.ts +5 -0
- package/dist/lib/types/index.js +6 -1
- package/dist/lib/types/index.mjs +4 -1
- package/dist/lib/types/inline-enums.generated.d.mts +30 -4
- package/dist/lib/types/inline-enums.generated.d.ts +30 -4
- package/dist/lib/types/inline-enums.generated.js +41 -2
- package/dist/lib/types/inline-enums.generated.mjs +28 -2
- package/dist/lib/types/media-buy-delivery-report.d.mts +4 -0
- package/dist/lib/types/media-buy-delivery-report.d.ts +4 -0
- package/dist/lib/types/media-buy-delivery-report.js +16 -0
- package/dist/lib/types/media-buy-delivery-report.mjs +0 -0
- package/dist/lib/types/schemas.generated.d.ts +20 -69
- package/dist/lib/types/schemas.generated.js +29 -46
- package/dist/lib/types/schemas.generated.mjs +29 -46
- package/dist/lib/types/targeting-keys.generated.d.mts +4 -0
- package/dist/lib/types/targeting-keys.generated.d.ts +4 -0
- package/dist/lib/types/targeting-keys.generated.js +105 -0
- package/dist/lib/types/targeting-keys.generated.mjs +80 -0
- package/dist/lib/utils/adcp-version-config.js +5 -2
- package/dist/lib/utils/adcp-version-config.mjs +5 -2
- package/dist/lib/utils/envelope-status-compat.d.mts +18 -1
- package/dist/lib/utils/envelope-status-compat.d.ts +18 -1
- package/dist/lib/utils/envelope-status-compat.js +11 -5
- package/dist/lib/utils/envelope-status-compat.mjs +11 -5
- package/dist/lib/utils/response-unwrapper.js +18 -10
- package/dist/lib/utils/response-unwrapper.mjs +18 -10
- package/dist/lib/v2/format-schema/resolver.js +1 -1
- package/dist/lib/v2/format-schema/resolver.mjs +1 -1
- package/dist/lib/v2/projection/creative-delivery.js +123 -30
- package/dist/lib/v2/projection/creative-delivery.mjs +127 -30
- package/dist/lib/v2/projection/index.d.mts +1 -0
- package/dist/lib/v2/projection/index.d.ts +1 -0
- package/dist/lib/v2/projection/index.js +3 -0
- package/dist/lib/v2/projection/index.mjs +2 -0
- package/dist/lib/v2/projection/legacy-metadata.d.mts +19 -0
- package/dist/lib/v2/projection/legacy-metadata.d.ts +19 -0
- package/dist/lib/v2/projection/legacy-metadata.js +91 -0
- package/dist/lib/v2/projection/legacy-metadata.mjs +86 -0
- package/dist/lib/validation/compact-schema.d.mts +27 -0
- package/dist/lib/validation/compact-schema.d.ts +27 -0
- package/dist/lib/validation/compact-schema.js +276 -0
- package/dist/lib/validation/compact-schema.mjs +250 -0
- package/dist/lib/validation/media-buy-delivery-report.d.mts +8 -0
- package/dist/lib/validation/media-buy-delivery-report.d.ts +8 -0
- package/dist/lib/validation/media-buy-delivery-report.js +31 -0
- package/dist/lib/validation/media-buy-delivery-report.mjs +7 -0
- package/dist/lib/validation/schema-diagnostic-origins.d.mts +21 -0
- package/dist/lib/validation/schema-diagnostic-origins.d.ts +21 -0
- package/dist/lib/validation/schema-diagnostic-origins.js +193 -0
- package/dist/lib/validation/schema-diagnostic-origins.mjs +169 -0
- package/dist/lib/validation/schema-loader.js +86 -16
- package/dist/lib/validation/schema-loader.mjs +82 -16
- package/dist/lib/validation/schema-validator.d.mts +10 -19
- package/dist/lib/validation/schema-validator.d.ts +10 -19
- package/dist/lib/validation/schema-validator.js +136 -43
- package/dist/lib/validation/schema-validator.mjs +140 -44
- 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/dist/lib/webhooks/index.d.mts +3 -0
- package/dist/lib/webhooks/index.d.ts +3 -0
- package/dist/lib/webhooks/index.js +3 -0
- package/dist/lib/webhooks/index.mjs +2 -0
- package/dist/lib/webhooks/media-buy-delivery.d.mts +43 -0
- package/dist/lib/webhooks/media-buy-delivery.d.ts +43 -0
- package/dist/lib/webhooks/media-buy-delivery.js +119 -0
- package/dist/lib/webhooks/media-buy-delivery.mjs +94 -0
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/BUILD-AN-AGENT.md +9 -1
- package/docs/guides/DELIVERY-WEBHOOK-PARSING.md +135 -0
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +15 -0
- package/docs/guides/TYPED-CLIENT-TOOLS.md +49 -0
- package/docs/llms.txt +3 -3
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-6.6-to-6.7.md +14 -0
- package/docs/migration-account-change-feed.md +19 -0
- package/docs/releases/sdk-16.6-adoption-fixes.md +33 -0
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@ import { eTldPlusOne } from "../signing/agent-resolver/etld.mjs";
|
|
|
6
6
|
import { parseStrictJson } from "../signing/agent-resolver/strict-json.mjs";
|
|
7
7
|
import { parse as parseDomain } from "tldts";
|
|
8
8
|
import schemas from "./schemas.draft.mjs";
|
|
9
|
-
const ajv = new Ajv({ strict: false, allErrors: false });
|
|
9
|
+
const ajv = new Ajv({ inlineRefs: false, strict: false, allErrors: false });
|
|
10
10
|
addFormats(ajv);
|
|
11
11
|
for (const schema of schemas) ajv.addSchema(schema);
|
|
12
12
|
function validateIdentity33Schema(id, value) {
|
|
@@ -294,13 +294,16 @@ function authorityGroup(operator) {
|
|
|
294
294
|
const provider = parseDomain(operator).domain;
|
|
295
295
|
return `private:${provider ?? operator}`;
|
|
296
296
|
}
|
|
297
|
+
const INTERMEDIARY_FETCH_CONCURRENCY = 8;
|
|
297
298
|
function grantsScope(grant, scope) {
|
|
298
299
|
return grant.scopes.some(
|
|
299
300
|
(granted) => granted === "*" || granted === scope || granted === "adcp:all" && scope.startsWith("adcp:")
|
|
300
301
|
);
|
|
301
302
|
}
|
|
302
303
|
function grantMatches(grant, target, claim, now) {
|
|
303
|
-
|
|
304
|
+
return registrableGrantee(grant.grantee) === target && grantCovers(grant, claim, now);
|
|
305
|
+
}
|
|
306
|
+
function grantCovers(grant, claim, now) {
|
|
304
307
|
if (!grantsScope(grant, claim.scope)) return false;
|
|
305
308
|
if (grant.agents && !grant.agents.some((agent) => grantAgentOrigin(agent.url) === canonicalAgentOrigin(claim.signerOrigin)))
|
|
306
309
|
return false;
|
|
@@ -326,7 +329,6 @@ async function authorizeDemandGrant(claim, options) {
|
|
|
326
329
|
...grants.some((g) => g.valid_until) ? { expiresAt: Math.min(...grants.map((g) => g.valid_until ? Date.parse(g.valid_until) / 1e3 : Infinity)) } : {}
|
|
327
330
|
});
|
|
328
331
|
if (brand === operator && account === operator) return result("implicit", [brand]);
|
|
329
|
-
if (brand === operator && account !== operator) throw new IdentityAuthorizationError("grant_absent");
|
|
330
332
|
let house;
|
|
331
333
|
try {
|
|
332
334
|
house = await options.resolveBrandHouse?.(claim.brand);
|
|
@@ -336,33 +338,44 @@ async function authorizeDemandGrant(claim, options) {
|
|
|
336
338
|
unavailable(cause);
|
|
337
339
|
}
|
|
338
340
|
const authoritativeBrand = house ? eTldPlusOne(house.domain) : brand;
|
|
339
|
-
|
|
341
|
+
const self = /* @__PURE__ */ new Set([brand, authoritativeBrand]);
|
|
342
|
+
if (self.has(account) && self.has(operator)) return result("implicit", [.../* @__PURE__ */ new Set([brand, account, operator])]);
|
|
340
343
|
const grantClaim = house ? { ...claim, brand: { ...claim.brand, brand_id: house.brand_id } } : claim;
|
|
341
344
|
const record = await options.evaluator.get(authoritativeBrand);
|
|
342
345
|
if (record.status === "absent") {
|
|
343
346
|
if (await options.legacyAuthorization?.(claim)) return result("legacy", [brand, account, operator]);
|
|
344
347
|
throw new IdentityAuthorizationError("grant_absent");
|
|
345
348
|
}
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
if (
|
|
349
|
+
const firsts = [];
|
|
350
|
+
for (const grant of record.record.grants ?? []) {
|
|
351
|
+
const grantee = registrableGrantee(grant.grantee);
|
|
352
|
+
if (grantee === void 0 || !grantCovers(grant, grantClaim, now)) continue;
|
|
353
|
+
if (!self.has(account) && account !== grantee) continue;
|
|
354
|
+
if (grantee === operator) return result("trust", [brand, operator], [grant]);
|
|
355
|
+
firsts.push({ grant, grantee });
|
|
356
|
+
}
|
|
357
|
+
const grantees = [...new Set(firsts.map((f) => f.grantee))];
|
|
358
|
+
const records = /* @__PURE__ */ new Map();
|
|
359
|
+
for (let i = 0; i < grantees.length; i += INTERMEDIARY_FETCH_CONCURRENCY) {
|
|
360
|
+
const batch = grantees.slice(i, i + INTERMEDIARY_FETCH_CONCURRENCY);
|
|
361
|
+
const settled = await Promise.allSettled(batch.map((grantee) => options.evaluator.get(grantee)));
|
|
362
|
+
settled.forEach(
|
|
363
|
+
(outcome, j) => records.set(batch[j], outcome.status === "fulfilled" ? outcome.value : { failed: outcome.reason })
|
|
364
|
+
);
|
|
352
365
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
366
|
+
let outage;
|
|
367
|
+
for (const { grant: first, grantee } of firsts) {
|
|
368
|
+
const intermediary = records.get(grantee);
|
|
369
|
+
if ("failed" in intermediary) {
|
|
370
|
+
outage ??= intermediary.failed;
|
|
371
|
+
continue;
|
|
358
372
|
}
|
|
373
|
+
if (intermediary.status !== "present") continue;
|
|
374
|
+
const second = (intermediary.record.grants ?? []).find((g) => grantMatches(g, operator, grantClaim, now));
|
|
375
|
+
if (second) return result("trust", [brand, grantee, operator], [first, second]);
|
|
359
376
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
return grantee !== void 0 && (grantee === account || selfOperated && grantee === operator) && grantsScope(g, claim.scope);
|
|
363
|
-
});
|
|
364
|
-
const exclusive = record.record.exclusive_grants === true && (record.record.grants ?? []).some((g) => grantsScope(g, claim.scope));
|
|
365
|
-
if (!covered && !exclusive && await options.sellerAuthorization?.(claim))
|
|
377
|
+
if (outage !== void 0) throw outage;
|
|
378
|
+
if (record.record.exclusive_grants !== true && await options.sellerAuthorization?.(claim))
|
|
366
379
|
return result("seller", [brand, account, operator]);
|
|
367
380
|
throw new IdentityAuthorizationError("grant_absent");
|
|
368
381
|
}
|
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(validation_exports);
|
|
|
34
34
|
var import_ajv = __toESM(require("ajv"));
|
|
35
35
|
var import_ajv_formats = __toESM(require("ajv-formats"));
|
|
36
36
|
var import_schema_loader = require('../validation/schema-loader.js');
|
|
37
|
+
var import_compact_schema = require('../validation/compact-schema.js');
|
|
37
38
|
var import_schemas = __toESM(require('./schemas.draft.js'));
|
|
38
39
|
const validators = /* @__PURE__ */ new WeakMap();
|
|
39
40
|
function validateIdentity33Payload(tool, direction, payload, version) {
|
|
@@ -79,14 +80,15 @@ function validateIdentity33Payload(tool, direction, payload, version) {
|
|
|
79
80
|
for (const [k, value] of Object.entries(object)) if (k !== "$id") walk2(value, k);
|
|
80
81
|
};
|
|
81
82
|
var walk = walk2;
|
|
82
|
-
const
|
|
83
|
+
const document = (0, import_schema_loader.getToolSchemaDocument)(tool, direction === "request" ? "request" : "sync", version)?.schema ?? stable.schema;
|
|
84
|
+
const schema = structuredClone(direction === "response" ? (0, import_schema_loader.relaxResponseRoot)(document) : document);
|
|
83
85
|
const relationship = import_schemas.default.find((s) => s.$id === "/schemas/core/principal-relationship.json");
|
|
84
86
|
const onboarding = import_schemas.default.find((s) => s.$id === "/schemas/core/agent-onboarding.json");
|
|
85
87
|
walk2(schema);
|
|
86
|
-
const ajv = new import_ajv.default({ strict: false, allErrors: true });
|
|
88
|
+
const ajv = new import_ajv.default({ inlineRefs: false, strict: false, allErrors: true });
|
|
87
89
|
(0, import_ajv_formats.default)(ajv);
|
|
88
90
|
for (const draft of import_schemas.default) ajv.addSchema({ ...draft, $id: "https://adcontextprotocol.org" + draft.$id });
|
|
89
|
-
validator = ajv.compile(schema);
|
|
91
|
+
validator = ajv.compile((0, import_compact_schema.compactSchemaForValidation)(schema));
|
|
90
92
|
cache.set(key, validator);
|
|
91
93
|
}
|
|
92
94
|
let valid = validator(payload) === true;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Ajv from "ajv";
|
|
2
2
|
import addFormats from "ajv-formats";
|
|
3
|
-
import { getValidator } from "../validation/schema-loader.mjs";
|
|
3
|
+
import { getValidator, getToolSchemaDocument, relaxResponseRoot } from "../validation/schema-loader.mjs";
|
|
4
|
+
import { compactSchemaForValidation } from "../validation/compact-schema.mjs";
|
|
4
5
|
import schemas from "./schemas.draft.mjs";
|
|
5
6
|
const validators = /* @__PURE__ */ new WeakMap();
|
|
6
7
|
function validateIdentity33Payload(tool, direction, payload, version) {
|
|
@@ -46,14 +47,15 @@ function validateIdentity33Payload(tool, direction, payload, version) {
|
|
|
46
47
|
for (const [k, value] of Object.entries(object)) if (k !== "$id") walk2(value, k);
|
|
47
48
|
};
|
|
48
49
|
var walk = walk2;
|
|
49
|
-
const
|
|
50
|
+
const document = getToolSchemaDocument(tool, direction === "request" ? "request" : "sync", version)?.schema ?? stable.schema;
|
|
51
|
+
const schema = structuredClone(direction === "response" ? relaxResponseRoot(document) : document);
|
|
50
52
|
const relationship = schemas.find((s) => s.$id === "/schemas/core/principal-relationship.json");
|
|
51
53
|
const onboarding = schemas.find((s) => s.$id === "/schemas/core/agent-onboarding.json");
|
|
52
54
|
walk2(schema);
|
|
53
|
-
const ajv = new Ajv({ strict: false, allErrors: true });
|
|
55
|
+
const ajv = new Ajv({ inlineRefs: false, strict: false, allErrors: true });
|
|
54
56
|
addFormats(ajv);
|
|
55
57
|
for (const draft of schemas) ajv.addSchema({ ...draft, $id: "https://adcontextprotocol.org" + draft.$id });
|
|
56
|
-
validator = ajv.compile(schema);
|
|
58
|
+
validator = ajv.compile(compactSchemaForValidation(schema));
|
|
57
59
|
cache.set(key, validator);
|
|
58
60
|
}
|
|
59
61
|
let valid = validator(payload) === true;
|
package/dist/lib/index.d.mts
CHANGED
|
@@ -57,7 +57,7 @@ export * from './handlers/types.mjs';
|
|
|
57
57
|
export type { Storage, AtomicTakeStorage, DeferredTaskStorage, BatchStorage, PatternStorage, AgentCapabilities, ConversationState, DeferredTaskState, StorageConfig, StorageFactory, StorageMiddleware, } from './storage/interfaces.mjs';
|
|
58
58
|
export { MemoryStorage, createMemoryStorage, createMemoryStorageConfig } from './storage/MemoryStorage.mjs';
|
|
59
59
|
export { ADCPError, TaskTimeoutError, MaxClarificationError, DeferredTaskError, TaskAbortedError, AgentNotFoundError, UnsupportedTaskError, ProtocolError, ValidationError as ADCPValidationError, // Rename to avoid conflict
|
|
60
|
-
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, ActionNotAllowedError, PreparedFixturesDeniedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors/index.mjs';
|
|
60
|
+
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, AgentRateLimitedError, ActionNotAllowedError, PreparedFixturesDeniedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors/index.mjs';
|
|
61
61
|
export type { OAuthMetadataInfo, ClientPreflightAdcpErrorInfo, ClientPreflightAdcpErrorRecovery, FeatureUnsupportedErrorOptions, ProtocolFeatureUnsupportedErrorOptions, ActionNotAllowedErrorDetails, ActionNotAllowedReasonValue, ActionNotAllowedAttemptedAction, ActionNotAllowedAvailableAction, ActionNotAllowedRecovery, } from './errors/index.mjs';
|
|
62
62
|
export type { ActionNotAllowedDetails, ActionNotAllowedReason, AvailableActionsResult, AvailableActionsSource, DecomposedUpdateMediaBuy, DecomposedUpdateMediaBuyMutation, LegacyCoarseAction, MediaBuyActionContext, MediaBuyActionId, MediaBuyActionMode, MediaBuyAvailableAction, MediaBuyMutationDirection, MediaBuyMutationScope, MediaBuyUpdateFieldAction, MediaBuyValidAction, ModeMismatchRecovery, PreflightAllowed, PreflightDenial, PreflightDenied, BuyerPropertyPolicy, NormalizedPolicyDomain, ProductPolicyProductLike, ProductPolicyResolvedProperty, ProductPropertyPolicyIdentifier, ProductPropertyPolicyDiagnostic, ProductPropertyPolicyDiagnosticCode, ProductPropertyPolicyDiagnosticSeverity, ProductPropertyPolicyMode, ProductPropertyPolicySelectorBehavior, ProductPropertyPolicyValidationResult, PreflightResult, ResolvedAction, SLAWindow, SlaWindow, StructuredOnlyMediaBuyAction, ResolvedTargetingInput, TargetingInputFor, ValidateProductsAgainstPropertyPolicyOptions, UpdateFieldEntry, UpdateMediaBuyRequestLike, } from './media-buy/index.mjs';
|
|
63
63
|
export { ACTIONS_BY_FIELD, LEGACY_COARSE_ACTIONS, STRUCTURED_ONLY_MEDIA_BUY_ACTIONS, UPDATE_FIELDS_BY_ACTION, applyTargetingInput, hasTargetingClears, resolveTargetingInput, canAddPackages, canCancel, canDecreaseBudget, canExtendFlight, canIncreaseBudget, canPause, canReallocateBudget, canRemoveCreative, canRemovePackages, canReplaceCreative, canResume, canShortenFlight, canUpdateCreativeAssignments, canUpdateFlightDates, canUpdateFrequencyCaps, canUpdatePacing, canUpdateTargeting, decomposeUpdateMediaBuy, findAvailableAction, getActionForMutation, getAvailableActions, getRollupParent, ProductPropertyPolicyError, normalizeDomainForPropertyPolicy, preflightUpdateMediaBuy, recoveryForModeMismatch, validateProductsAgainstPropertyPolicy, } from './media-buy/index.mjs';
|
|
@@ -75,27 +75,15 @@ export type { GetProductsRequest as LegacyGetProductsRequest, GetProductsRespons
|
|
|
75
75
|
CreativeAsset as LegacyCompatibleCreativeAsset, CreativePolicy, BrandReference, BrandID, AccountReference, CPAPricingOption, EventType, ActionSource, OptimizationGoal, ReachUnit, TargetingOverlay, OutcomeMeasurementDeprecated, OutcomeMeasurementDeprecated as OutcomeMeasurement, Duration, DeviceType, DigitalSourceType, FrequencyCap, GeographicBreakdownSupport, Catalog, CatalogType, FeedFormat, UpdateFrequency, ContentIDType, CatalogFieldMapping, SyncCatalogsRequest, SyncCatalogsResponse, SyncCatalogsSuccess, SyncCatalogsError, Overlay, Placement as LegacyPlacement, CreativeManifest as LegacyCreativeManifest, CreativeVariable, BuildCreativeRequest as LegacyBuildCreativeRequest, BuildCreativeResponse as LegacyBuildCreativeResponse, BuildCreativeSuccess as LegacyBuildCreativeSuccess, BuildCreativeMultiSuccess as LegacyBuildCreativeMultiSuccess, BuildCreativeVariantSuccess as LegacyBuildCreativeVariantSuccess, BuildCreativeError as LegacyBuildCreativeError, PreviewCreativeRequest as LegacyPreviewCreativeRequest, PreviewCreativeResponse as LegacyPreviewCreativeResponse, GetMediaBuysRequest, GetMediaBuysResponse as LegacyGetMediaBuysResponse, ImageAsset, VideoAsset, AudioAsset, TextAsset, URLAsset, HTMLAsset, VASTAsset, DAASTAsset, JavaScriptAsset, WebhookAsset, CSSAsset, MarkdownAsset, CatalogAsset, BriefAsset, ReferenceAsset, Provenance, PreviewOutputFormat, DisclosurePosition, EventCustomData, GetCreativeDeliveryRequest, GetCreativeDeliveryResponse as LegacyGetCreativeDeliveryResponse, Account, AccountChange, ListAccountChangesRequest, ListAccountChangesResponse, ListAccountsRequest, ListAccountsResponse, SyncAccountsRequest, SyncAccountsResponse, SyncAccountsSuccess, SyncAccountsError, GetAccountFinancialsRequest, GetAccountFinancialsResponse, GetAccountFinancialsSuccess, GetAccountFinancialsError, PaginationRequest, PaginationResponse, PackageUpdate as LegacyPackageUpdate, Package as LegacyPackage, Destination, SignalFilters, PricingOption, PriceGuidance, } from './types/tools.generated.mjs';
|
|
76
76
|
export type { GetMediaBuyArtifactsRequest as LegacyGetMediaBuyArtifactsRequest, GetMediaBuyArtifactsResponse as LegacyGetMediaBuyArtifactsResponse, } from './types/tools.generated.mjs';
|
|
77
77
|
export type { GetRightsRequest as LegacyGetRightsRequest, GetRightsResponse as LegacyGetRightsResponse, AcquireRightsRequest as LegacyAcquireRightsRequest, AcquireRightsResponse as LegacyAcquireRightsResponse, UpdateRightsRequest as LegacyUpdateRightsRequest, UpdateRightsResponse as LegacyUpdateRightsResponse, } from './types/core.generated.mjs';
|
|
78
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
79
|
-
export type GetMediaBuyArtifactsRequest = never;
|
|
80
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
81
|
-
export type GetMediaBuyArtifactsResponse = never;
|
|
82
78
|
export type { FormatReferenceStructuredObject as LegacyFormatReferenceStructuredObject, FormatReferenceStructuredObject as LegacyFormatID, } from './types/core.generated.mjs';
|
|
83
79
|
/** @deprecated Legacy creative routing identity is available as `LegacyFormatReferenceStructuredObject`. */
|
|
84
80
|
export type FormatReferenceStructuredObject = never;
|
|
85
81
|
/** @deprecated Legacy creative routing identity is available as `LegacyFormatID`. */
|
|
86
82
|
export type FormatID = never;
|
|
87
|
-
/** @deprecated Use `LegacyBuildCreativeRequest`; canonical build support awaits a canonical protocol request. */
|
|
88
|
-
export type BuildCreativeRequest = never;
|
|
89
|
-
/** @deprecated Use `LegacyBuildCreativeResponse`. */
|
|
90
|
-
export type BuildCreativeResponse = never;
|
|
91
83
|
/** @deprecated Use `LegacyBuildCreativePayload`. */
|
|
92
84
|
export type BuildCreativePayload = never;
|
|
93
85
|
/** @deprecated Use `LegacyBuildCreativeMultiPayload`. */
|
|
94
86
|
export type BuildCreativeMultiPayload = never;
|
|
95
|
-
/** @deprecated Use `LegacyListCreativeFormatsRequest`. */
|
|
96
|
-
export type ListCreativeFormatsRequest = never;
|
|
97
|
-
/** @deprecated Use `LegacyListCreativeFormatsResponse`. */
|
|
98
|
-
export type ListCreativeFormatsResponse = never;
|
|
99
87
|
/** @deprecated Use `LegacyListCreativeFormatsPayload`. */
|
|
100
88
|
export type ListCreativeFormatsPayload = never;
|
|
101
89
|
/** @deprecated Use `LegacyListCreativeFormatsResponsePayload`. */
|
|
@@ -118,49 +106,9 @@ export type UpdateMediaBuyAsyncResponseData = never;
|
|
|
118
106
|
/** @deprecated Use `LegacySyncCreativesAsyncResponseData`. */
|
|
119
107
|
export type SyncCreativesAsyncResponseData = never;
|
|
120
108
|
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
121
|
-
export type ListContentStandardsRequest = never;
|
|
122
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
123
|
-
export type ListContentStandardsResponse = never;
|
|
124
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
125
|
-
export type GetContentStandardsRequest = never;
|
|
126
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
127
|
-
export type GetContentStandardsResponse = never;
|
|
128
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
129
|
-
export type CreateContentStandardsRequest = never;
|
|
130
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
131
|
-
export type CreateContentStandardsResponse = never;
|
|
132
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
133
|
-
export type UpdateContentStandardsRequest = never;
|
|
134
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
135
|
-
export type UpdateContentStandardsResponse = never;
|
|
136
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
137
|
-
export type CalibrateContentRequest = never;
|
|
138
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
139
|
-
export type CalibrateContentResponse = never;
|
|
140
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
141
|
-
export type ValidateContentDeliveryRequest = never;
|
|
142
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
143
|
-
export type ValidateContentDeliveryResponse = never;
|
|
144
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
145
|
-
export type GetCreativeFeaturesRequest = never;
|
|
146
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
147
|
-
export type GetCreativeFeaturesResponse = never;
|
|
148
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
149
109
|
export type ContentStandards = never;
|
|
150
110
|
/** @deprecated Use `LegacyArtifact` from the migration surface. */
|
|
151
111
|
export type Artifact = never;
|
|
152
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
153
|
-
export type GetRightsRequest = never;
|
|
154
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
155
|
-
export type GetRightsResponse = never;
|
|
156
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
157
|
-
export type AcquireRightsRequest = never;
|
|
158
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
159
|
-
export type AcquireRightsResponse = never;
|
|
160
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
161
|
-
export type UpdateRightsRequest = never;
|
|
162
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
163
|
-
export type UpdateRightsResponse = never;
|
|
164
112
|
export type { AccountStatus, CreativeStatus, DelegationAuthority, CatalogAction, CatalogItemStatus, MediaBuyStatus, CreativeBrief, CompatibilityPurchaseCoordinatorInput, } from './types/core.generated.mjs';
|
|
165
113
|
export type { BrandJson, AdagentsJson } from './types/wellknown-schemas.generated.mjs';
|
|
166
114
|
export { BrandJsonSchema, AdagentsJsonSchema } from './types/wellknown-schemas.generated.mjs';
|
|
@@ -169,7 +117,7 @@ export { PlacementPresentationDocumentSchema, PlacementPresentationReferenceSche
|
|
|
169
117
|
export type { Error as TaskErrorDetail } from './types/core.generated.mjs';
|
|
170
118
|
export { STANDARD_ERROR_CODES, isStandardErrorCode, getErrorRecovery, DEFAULT_UNKNOWN_ERROR_RECOVERY, } from './types/error-codes.mjs';
|
|
171
119
|
export type { StandardErrorCode, ErrorRecovery } from './types/error-codes.mjs';
|
|
172
|
-
export { adcpError, legacyCapabilitiesResponse, legacyProductsResponse, legacyMediaBuyResponse, legacyDeliveryResponse, legacyListAccountsResponse, legacyListCreativeFormatsResponse, legacyUpdateMediaBuyResponse, legacyGetMediaBuysResponse, legacyPerformanceFeedbackResponse, legacyBuildCreativeResponse, legacyBuildCreativeMultiResponse, legacyPreviewCreativeResponse, legacyCreativeDeliveryResponse, legacyListCreativesResponse, legacyListPropertyListsResponse, legacyListCollectionListsResponse, legacyListContentStandardsResponse, legacyGetPlanAuditLogsResponse, legacySyncCreativesResponse, legacyGetSignalsResponse, legacyActivateSignalResponse, legacyCancelMediaBuyResponse, legacyAcquireRightsResponse, legacyAcquireRightsAcquired, legacyAcquireRightsPendingApproval, legacyAcquireRightsRejected, legacySyncAccountsResponse, legacySyncGovernanceResponse, legacyReportUsageResponse, validActionsForStatus, MEDIA_BUY_TRANSITIONS, CREATIVE_ASSET_TRANSITIONS, isLegalMediaBuyTransition, isLegalCreativeTransition, assertMediaBuyTransition, assertCreativeTransition, getAccountMode, isSandboxOrMockAccount, assertSandboxAccount, taskToolResponse, registerAdcpTaskTool, createTaskCapableServer, InMemoryTaskStore, isTerminal, serve, taskScopeFromPrincipal, UnknownHostError, hostname, resolveHost, verifyIntrospection, registerTestController, handleTestControllerRequest, TestControllerError, toMcpResponse, TOOL_INPUT_SHAPE, CONTROLLER_SCENARIOS, DISCOVERY_ARM_SCENARIOS, SEED_SCENARIOS, SESSION_ENTRY_CAP, enforceMapCap, createSeedFixtureCache, PostgresTaskStore, cleanupExpiredTasks, getMcpTasksMigration, MCP_TASKS_MIGRATION, ADCP_PRE_TRANSPORT, checkGovernance, governanceDeniedError, DEFAULT_REPORTING_CAPABILITIES, InMemoryStateStore, PostgresStateStore, getAdcpStateMigration, ADCP_STATE_MIGRATION, StateError, PatchConflictError, SESSION_KEY_FIELD, createSessionedStore, scopedStore, patchWithRetry, isPutIfMatchConflict, requireSessionKey, structuredSerialize, structuredDeserialize, createIdempotencyStore, memoryBackend, pgBackend, getIdempotencyMigration, IDEMPOTENCY_MIGRATION, cleanupExpiredIdempotency, redisBackend, createLazyBackend, hashPayload, IdempotencyClaimOwnershipError, getServeRequestContext, ADCP_SERVE_REQUEST_CONTEXT, createA2AAdapter, A2AInvocationError, MCP_APP_RESOURCE_MIME_TYPE, ADCP_MIRRORED_STRUCTURED_CONTENT_META_KEY, } from './server/index.mjs';
|
|
120
|
+
export { adcpError, legacyCapabilitiesResponse, legacyProductsResponse, legacyMediaBuyResponse, legacyDeliveryResponse, legacyListAccountsResponse, legacyListCreativeFormatsResponse, legacyUpdateMediaBuyResponse, legacyGetMediaBuysResponse, legacyPerformanceFeedbackResponse, legacyBuildCreativeResponse, legacyBuildCreativeMultiResponse, legacyPreviewCreativeResponse, legacyCreativeDeliveryResponse, legacyListCreativesResponse, legacyListPropertyListsResponse, legacyListCollectionListsResponse, legacyListContentStandardsResponse, legacyGetPlanAuditLogsResponse, legacySyncCreativesResponse, legacyGetSignalsResponse, legacyActivateSignalResponse, legacyCancelMediaBuyResponse, legacyAcquireRightsResponse, legacyAcquireRightsAcquired, legacyAcquireRightsPendingApproval, legacyAcquireRightsRejected, legacySyncAccountsResponse, legacySyncGovernanceResponse, legacyReportUsageResponse, validActionsForStatus, MEDIA_BUY_TRANSITIONS, getMediaBuyTransitions, CREATIVE_ASSET_TRANSITIONS, isLegalMediaBuyTransition, isLegalCreativeTransition, assertMediaBuyTransition, assertCreativeTransition, getAccountMode, isSandboxOrMockAccount, assertSandboxAccount, taskToolResponse, registerAdcpTaskTool, createTaskCapableServer, InMemoryTaskStore, isTerminal, serve, taskScopeFromPrincipal, UnknownHostError, hostname, resolveHost, verifyIntrospection, registerTestController, handleTestControllerRequest, TestControllerError, toMcpResponse, TOOL_INPUT_SHAPE, CONTROLLER_SCENARIOS, DISCOVERY_ARM_SCENARIOS, SEED_SCENARIOS, SESSION_ENTRY_CAP, enforceMapCap, createSeedFixtureCache, PostgresTaskStore, cleanupExpiredTasks, getMcpTasksMigration, MCP_TASKS_MIGRATION, ADCP_PRE_TRANSPORT, checkGovernance, governanceDeniedError, DEFAULT_REPORTING_CAPABILITIES, InMemoryStateStore, PostgresStateStore, getAdcpStateMigration, ADCP_STATE_MIGRATION, StateError, PatchConflictError, SESSION_KEY_FIELD, createSessionedStore, scopedStore, patchWithRetry, isPutIfMatchConflict, requireSessionKey, structuredSerialize, structuredDeserialize, createIdempotencyStore, memoryBackend, pgBackend, getIdempotencyMigration, IDEMPOTENCY_MIGRATION, cleanupExpiredIdempotency, redisBackend, createLazyBackend, hashPayload, IdempotencyClaimOwnershipError, getServeRequestContext, ADCP_SERVE_REQUEST_CONTEXT, createA2AAdapter, A2AInvocationError, MCP_APP_RESOURCE_MIME_TYPE, ADCP_MIRRORED_STRUCTURED_CONTENT_META_KEY, } from './server/index.mjs';
|
|
173
121
|
export type { AdcpErrorOptions, AdcpErrorResponse, McpToolResponse, ValidAction, CancelMediaBuyInput, AdcpTaskToolConfig, TaskStore, TaskMessageQueue, CreateTaskOptions, ToolTaskHandler, CreateTaskRequestHandlerExtra, TaskRequestHandlerExtra, CreateTaskResult, GetTaskResult, Task, ServeContext, ServeOptions, PgQueryable, PostgresTaskStoreOptions, TestControllerStore, TestControllerStoreFactory, TestControllerStoreOrFactory, ControllerScenario, SeedScenario, SeedFixtureCache, SessionContext, OnInstructionsError, MaybePromise, LegacyAdcpServerConfig, LegacyAdcpToolMap, AdcpServerToolName, AdcpCapabilitiesConfig, LegacyAdcpCustomToolConfig, LegacyAdcpCustomToolHandler, LegacyAdcpCustomToolHandlerExtra, McpAppUiMeta, McpAppMeta, AdcpMcpResourceDefinition, McpAppResourceCsp, McpAppResourcePermissions, McpAppResourceUiMeta, McpAppResourceMeta, McpAppResourceReadContext, AdcpLogger, LegacyHandlerContext, LegacyMediaBuyHandlers, LegacySignalsHandlers, LegacyCreativeHandlers, LegacyGovernanceHandlers, LegacyAccountHandlers, LegacyEventTrackingHandlers, LegacySponsoredIntelligenceHandlers, SignedRequestsConfig, AdcpPreTransport, AdcpServer, AdcpServerTransport, AdcpTestRequest, AdcpTestToolsCallRequest, AdcpTestResponse, AdcpInvokeOptions, StructuredContentFallbackTransport, StructuredContentTextFallback, StructuredContentTextFallbackContext, CheckGovernanceOptions, GovernanceCallResult, GovernanceApproved, GovernanceDenied, GovernanceConditions, AdcpStateStore, ListOptions as StateListOptions, ListResult as StateListResult, PostgresStateStoreOptions, InMemoryStateStoreOptions, VersionedDocument, PutIfMatchResult, PatchWithRetryOptions, StateErrorCode, SessionKeyContext, IdempotencyStore, IdempotencyStoreConfig, IdempotencyBackend, IdempotencyCacheEntry, IdempotencyCheckResult, MemoryBackendOptions, PgBackendOptions, RedisBackendOptions, RedisBackendClient, RedisLikeClient, LazyBackendFactory, LazyBackendOptions, A2AAdapter, A2AAdapterOptions, A2AAgentCardOverrides, A2AAgentCapabilitiesOverride, A2AAgentSkillOverride, A2AMountOptions, ExpressAppLike, LegacyHttpSecurityScheme, LegacySecurityScheme, AccountMode, RequireCacheScopeWhenProducts, ServerPayload, GetProductsPayload, CreateMediaBuyPayload, UpdateMediaBuyPayload, GetMediaBuysPayload, GetMediaBuyDeliveryPayload, ListCreativesPayload, GetCreativeDeliveryPayload, CanonicalPreviewCreativePayload, PreviewCreativePayload, LegacyGetProductsPayload, LegacyCreateMediaBuyPayload, LegacyUpdateMediaBuyPayload, LegacyGetMediaBuysPayload, LegacyGetMediaBuyDeliveryPayload, LegacyListCreativesPayload, LegacyGetCreativeDeliveryPayload, LegacyListCreativeFormatsPayload, LegacyListCreativeFormatsResponsePayload, LegacyListCreativeFormatsServerPayload, LegacyBuildCreativePayload, LegacyBuildCreativeMultiPayload, LegacyBuildCreativeVariantPayload, LegacyPreviewCreativePayload, SyncCreativesPayload, SyncCreativesSuccessPayload, SyncCreativesErrorPayload, } from './server/index.mjs';
|
|
174
122
|
export { isRetryable, getRetryDelay } from './utils/retry.mjs';
|
|
175
123
|
export { decideRetry, BuyerRetryPolicy } from './utils/buyer-retry-policy.mjs';
|
|
@@ -279,3 +227,9 @@ export * from './supply-path/index.mjs';
|
|
|
279
227
|
export type { AuthorizationCollectionSelector, ProductCollectionSelector, CollectionDistribution, DiscoveryCollection, } from './discovery/types.mjs';
|
|
280
228
|
export { BuyerAccountRegistry, type AccountPolicy, type BuyerAccountStorage, type BuyerAccountRegistryOptions, type BuyerAccountDispatch, type BuyerAccountProvisioningDispatch, type EnsureAccountOptions, type ProvisionedAccount, } from './core/buyer-account-registry.mjs';
|
|
281
229
|
export { createProductCache, ProductCache, type ProductCacheOptions } from './core/product-cache.mjs';
|
|
230
|
+
export type { AssetVariant } from './types/core.generated.mjs';
|
|
231
|
+
export { TargetingOverlayKeys, TargetingOverlaySupportKeys } from './types/targeting-keys.generated.mjs';
|
|
232
|
+
export { parseMediaBuyDeliveryWebhook } from './webhooks/media-buy-delivery.mjs';
|
|
233
|
+
export type { ParseMediaBuyDeliveryWebhookOptions, MediaBuyDeliveryWebhookEnvelope, MediaBuyDeliveryWebhookParseErrorCode, MediaBuyDeliveryWebhookParseResult, } from './webhooks/media-buy-delivery.mjs';
|
|
234
|
+
export type { MediaBuyDeliveryReport } from './types/media-buy-delivery-report.mjs';
|
|
235
|
+
export { MediaBuyDeliveryReportSchema } from './validation/media-buy-delivery-report.mjs';
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export * from './handlers/types';
|
|
|
57
57
|
export type { Storage, AtomicTakeStorage, DeferredTaskStorage, BatchStorage, PatternStorage, AgentCapabilities, ConversationState, DeferredTaskState, StorageConfig, StorageFactory, StorageMiddleware, } from './storage/interfaces';
|
|
58
58
|
export { MemoryStorage, createMemoryStorage, createMemoryStorageConfig } from './storage/MemoryStorage';
|
|
59
59
|
export { ADCPError, TaskTimeoutError, MaxClarificationError, DeferredTaskError, TaskAbortedError, AgentNotFoundError, UnsupportedTaskError, ProtocolError, ValidationError as ADCPValidationError, // Rename to avoid conflict
|
|
60
|
-
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, ActionNotAllowedError, PreparedFixturesDeniedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors';
|
|
60
|
+
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, AgentRateLimitedError, ActionNotAllowedError, PreparedFixturesDeniedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors';
|
|
61
61
|
export type { OAuthMetadataInfo, ClientPreflightAdcpErrorInfo, ClientPreflightAdcpErrorRecovery, FeatureUnsupportedErrorOptions, ProtocolFeatureUnsupportedErrorOptions, ActionNotAllowedErrorDetails, ActionNotAllowedReasonValue, ActionNotAllowedAttemptedAction, ActionNotAllowedAvailableAction, ActionNotAllowedRecovery, } from './errors';
|
|
62
62
|
export type { ActionNotAllowedDetails, ActionNotAllowedReason, AvailableActionsResult, AvailableActionsSource, DecomposedUpdateMediaBuy, DecomposedUpdateMediaBuyMutation, LegacyCoarseAction, MediaBuyActionContext, MediaBuyActionId, MediaBuyActionMode, MediaBuyAvailableAction, MediaBuyMutationDirection, MediaBuyMutationScope, MediaBuyUpdateFieldAction, MediaBuyValidAction, ModeMismatchRecovery, PreflightAllowed, PreflightDenial, PreflightDenied, BuyerPropertyPolicy, NormalizedPolicyDomain, ProductPolicyProductLike, ProductPolicyResolvedProperty, ProductPropertyPolicyIdentifier, ProductPropertyPolicyDiagnostic, ProductPropertyPolicyDiagnosticCode, ProductPropertyPolicyDiagnosticSeverity, ProductPropertyPolicyMode, ProductPropertyPolicySelectorBehavior, ProductPropertyPolicyValidationResult, PreflightResult, ResolvedAction, SLAWindow, SlaWindow, StructuredOnlyMediaBuyAction, ResolvedTargetingInput, TargetingInputFor, ValidateProductsAgainstPropertyPolicyOptions, UpdateFieldEntry, UpdateMediaBuyRequestLike, } from './media-buy';
|
|
63
63
|
export { ACTIONS_BY_FIELD, LEGACY_COARSE_ACTIONS, STRUCTURED_ONLY_MEDIA_BUY_ACTIONS, UPDATE_FIELDS_BY_ACTION, applyTargetingInput, hasTargetingClears, resolveTargetingInput, canAddPackages, canCancel, canDecreaseBudget, canExtendFlight, canIncreaseBudget, canPause, canReallocateBudget, canRemoveCreative, canRemovePackages, canReplaceCreative, canResume, canShortenFlight, canUpdateCreativeAssignments, canUpdateFlightDates, canUpdateFrequencyCaps, canUpdatePacing, canUpdateTargeting, decomposeUpdateMediaBuy, findAvailableAction, getActionForMutation, getAvailableActions, getRollupParent, ProductPropertyPolicyError, normalizeDomainForPropertyPolicy, preflightUpdateMediaBuy, recoveryForModeMismatch, validateProductsAgainstPropertyPolicy, } from './media-buy';
|
|
@@ -75,27 +75,15 @@ export type { GetProductsRequest as LegacyGetProductsRequest, GetProductsRespons
|
|
|
75
75
|
CreativeAsset as LegacyCompatibleCreativeAsset, CreativePolicy, BrandReference, BrandID, AccountReference, CPAPricingOption, EventType, ActionSource, OptimizationGoal, ReachUnit, TargetingOverlay, OutcomeMeasurementDeprecated, OutcomeMeasurementDeprecated as OutcomeMeasurement, Duration, DeviceType, DigitalSourceType, FrequencyCap, GeographicBreakdownSupport, Catalog, CatalogType, FeedFormat, UpdateFrequency, ContentIDType, CatalogFieldMapping, SyncCatalogsRequest, SyncCatalogsResponse, SyncCatalogsSuccess, SyncCatalogsError, Overlay, Placement as LegacyPlacement, CreativeManifest as LegacyCreativeManifest, CreativeVariable, BuildCreativeRequest as LegacyBuildCreativeRequest, BuildCreativeResponse as LegacyBuildCreativeResponse, BuildCreativeSuccess as LegacyBuildCreativeSuccess, BuildCreativeMultiSuccess as LegacyBuildCreativeMultiSuccess, BuildCreativeVariantSuccess as LegacyBuildCreativeVariantSuccess, BuildCreativeError as LegacyBuildCreativeError, PreviewCreativeRequest as LegacyPreviewCreativeRequest, PreviewCreativeResponse as LegacyPreviewCreativeResponse, GetMediaBuysRequest, GetMediaBuysResponse as LegacyGetMediaBuysResponse, ImageAsset, VideoAsset, AudioAsset, TextAsset, URLAsset, HTMLAsset, VASTAsset, DAASTAsset, JavaScriptAsset, WebhookAsset, CSSAsset, MarkdownAsset, CatalogAsset, BriefAsset, ReferenceAsset, Provenance, PreviewOutputFormat, DisclosurePosition, EventCustomData, GetCreativeDeliveryRequest, GetCreativeDeliveryResponse as LegacyGetCreativeDeliveryResponse, Account, AccountChange, ListAccountChangesRequest, ListAccountChangesResponse, ListAccountsRequest, ListAccountsResponse, SyncAccountsRequest, SyncAccountsResponse, SyncAccountsSuccess, SyncAccountsError, GetAccountFinancialsRequest, GetAccountFinancialsResponse, GetAccountFinancialsSuccess, GetAccountFinancialsError, PaginationRequest, PaginationResponse, PackageUpdate as LegacyPackageUpdate, Package as LegacyPackage, Destination, SignalFilters, PricingOption, PriceGuidance, } from './types/tools.generated';
|
|
76
76
|
export type { GetMediaBuyArtifactsRequest as LegacyGetMediaBuyArtifactsRequest, GetMediaBuyArtifactsResponse as LegacyGetMediaBuyArtifactsResponse, } from './types/tools.generated';
|
|
77
77
|
export type { GetRightsRequest as LegacyGetRightsRequest, GetRightsResponse as LegacyGetRightsResponse, AcquireRightsRequest as LegacyAcquireRightsRequest, AcquireRightsResponse as LegacyAcquireRightsResponse, UpdateRightsRequest as LegacyUpdateRightsRequest, UpdateRightsResponse as LegacyUpdateRightsResponse, } from './types/core.generated';
|
|
78
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
79
|
-
export type GetMediaBuyArtifactsRequest = never;
|
|
80
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
81
|
-
export type GetMediaBuyArtifactsResponse = never;
|
|
82
78
|
export type { FormatReferenceStructuredObject as LegacyFormatReferenceStructuredObject, FormatReferenceStructuredObject as LegacyFormatID, } from './types/core.generated';
|
|
83
79
|
/** @deprecated Legacy creative routing identity is available as `LegacyFormatReferenceStructuredObject`. */
|
|
84
80
|
export type FormatReferenceStructuredObject = never;
|
|
85
81
|
/** @deprecated Legacy creative routing identity is available as `LegacyFormatID`. */
|
|
86
82
|
export type FormatID = never;
|
|
87
|
-
/** @deprecated Use `LegacyBuildCreativeRequest`; canonical build support awaits a canonical protocol request. */
|
|
88
|
-
export type BuildCreativeRequest = never;
|
|
89
|
-
/** @deprecated Use `LegacyBuildCreativeResponse`. */
|
|
90
|
-
export type BuildCreativeResponse = never;
|
|
91
83
|
/** @deprecated Use `LegacyBuildCreativePayload`. */
|
|
92
84
|
export type BuildCreativePayload = never;
|
|
93
85
|
/** @deprecated Use `LegacyBuildCreativeMultiPayload`. */
|
|
94
86
|
export type BuildCreativeMultiPayload = never;
|
|
95
|
-
/** @deprecated Use `LegacyListCreativeFormatsRequest`. */
|
|
96
|
-
export type ListCreativeFormatsRequest = never;
|
|
97
|
-
/** @deprecated Use `LegacyListCreativeFormatsResponse`. */
|
|
98
|
-
export type ListCreativeFormatsResponse = never;
|
|
99
87
|
/** @deprecated Use `LegacyListCreativeFormatsPayload`. */
|
|
100
88
|
export type ListCreativeFormatsPayload = never;
|
|
101
89
|
/** @deprecated Use `LegacyListCreativeFormatsResponsePayload`. */
|
|
@@ -118,49 +106,9 @@ export type UpdateMediaBuyAsyncResponseData = never;
|
|
|
118
106
|
/** @deprecated Use `LegacySyncCreativesAsyncResponseData`. */
|
|
119
107
|
export type SyncCreativesAsyncResponseData = never;
|
|
120
108
|
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
121
|
-
export type ListContentStandardsRequest = never;
|
|
122
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
123
|
-
export type ListContentStandardsResponse = never;
|
|
124
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
125
|
-
export type GetContentStandardsRequest = never;
|
|
126
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
127
|
-
export type GetContentStandardsResponse = never;
|
|
128
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
129
|
-
export type CreateContentStandardsRequest = never;
|
|
130
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
131
|
-
export type CreateContentStandardsResponse = never;
|
|
132
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
133
|
-
export type UpdateContentStandardsRequest = never;
|
|
134
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
135
|
-
export type UpdateContentStandardsResponse = never;
|
|
136
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
137
|
-
export type CalibrateContentRequest = never;
|
|
138
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
139
|
-
export type CalibrateContentResponse = never;
|
|
140
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
141
|
-
export type ValidateContentDeliveryRequest = never;
|
|
142
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
143
|
-
export type ValidateContentDeliveryResponse = never;
|
|
144
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
145
|
-
export type GetCreativeFeaturesRequest = never;
|
|
146
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
147
|
-
export type GetCreativeFeaturesResponse = never;
|
|
148
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
149
109
|
export type ContentStandards = never;
|
|
150
110
|
/** @deprecated Use `LegacyArtifact` from the migration surface. */
|
|
151
111
|
export type Artifact = never;
|
|
152
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
153
|
-
export type GetRightsRequest = never;
|
|
154
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
155
|
-
export type GetRightsResponse = never;
|
|
156
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
157
|
-
export type AcquireRightsRequest = never;
|
|
158
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
159
|
-
export type AcquireRightsResponse = never;
|
|
160
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
161
|
-
export type UpdateRightsRequest = never;
|
|
162
|
-
/** @deprecated Use the corresponding explicit `Legacy*` migration type. */
|
|
163
|
-
export type UpdateRightsResponse = never;
|
|
164
112
|
export type { AccountStatus, CreativeStatus, DelegationAuthority, CatalogAction, CatalogItemStatus, MediaBuyStatus, CreativeBrief, CompatibilityPurchaseCoordinatorInput, } from './types/core.generated';
|
|
165
113
|
export type { BrandJson, AdagentsJson } from './types/wellknown-schemas.generated';
|
|
166
114
|
export { BrandJsonSchema, AdagentsJsonSchema } from './types/wellknown-schemas.generated';
|
|
@@ -169,7 +117,7 @@ export { PlacementPresentationDocumentSchema, PlacementPresentationReferenceSche
|
|
|
169
117
|
export type { Error as TaskErrorDetail } from './types/core.generated';
|
|
170
118
|
export { STANDARD_ERROR_CODES, isStandardErrorCode, getErrorRecovery, DEFAULT_UNKNOWN_ERROR_RECOVERY, } from './types/error-codes';
|
|
171
119
|
export type { StandardErrorCode, ErrorRecovery } from './types/error-codes';
|
|
172
|
-
export { adcpError, legacyCapabilitiesResponse, legacyProductsResponse, legacyMediaBuyResponse, legacyDeliveryResponse, legacyListAccountsResponse, legacyListCreativeFormatsResponse, legacyUpdateMediaBuyResponse, legacyGetMediaBuysResponse, legacyPerformanceFeedbackResponse, legacyBuildCreativeResponse, legacyBuildCreativeMultiResponse, legacyPreviewCreativeResponse, legacyCreativeDeliveryResponse, legacyListCreativesResponse, legacyListPropertyListsResponse, legacyListCollectionListsResponse, legacyListContentStandardsResponse, legacyGetPlanAuditLogsResponse, legacySyncCreativesResponse, legacyGetSignalsResponse, legacyActivateSignalResponse, legacyCancelMediaBuyResponse, legacyAcquireRightsResponse, legacyAcquireRightsAcquired, legacyAcquireRightsPendingApproval, legacyAcquireRightsRejected, legacySyncAccountsResponse, legacySyncGovernanceResponse, legacyReportUsageResponse, validActionsForStatus, MEDIA_BUY_TRANSITIONS, CREATIVE_ASSET_TRANSITIONS, isLegalMediaBuyTransition, isLegalCreativeTransition, assertMediaBuyTransition, assertCreativeTransition, getAccountMode, isSandboxOrMockAccount, assertSandboxAccount, taskToolResponse, registerAdcpTaskTool, createTaskCapableServer, InMemoryTaskStore, isTerminal, serve, taskScopeFromPrincipal, UnknownHostError, hostname, resolveHost, verifyIntrospection, registerTestController, handleTestControllerRequest, TestControllerError, toMcpResponse, TOOL_INPUT_SHAPE, CONTROLLER_SCENARIOS, DISCOVERY_ARM_SCENARIOS, SEED_SCENARIOS, SESSION_ENTRY_CAP, enforceMapCap, createSeedFixtureCache, PostgresTaskStore, cleanupExpiredTasks, getMcpTasksMigration, MCP_TASKS_MIGRATION, ADCP_PRE_TRANSPORT, checkGovernance, governanceDeniedError, DEFAULT_REPORTING_CAPABILITIES, InMemoryStateStore, PostgresStateStore, getAdcpStateMigration, ADCP_STATE_MIGRATION, StateError, PatchConflictError, SESSION_KEY_FIELD, createSessionedStore, scopedStore, patchWithRetry, isPutIfMatchConflict, requireSessionKey, structuredSerialize, structuredDeserialize, createIdempotencyStore, memoryBackend, pgBackend, getIdempotencyMigration, IDEMPOTENCY_MIGRATION, cleanupExpiredIdempotency, redisBackend, createLazyBackend, hashPayload, IdempotencyClaimOwnershipError, getServeRequestContext, ADCP_SERVE_REQUEST_CONTEXT, createA2AAdapter, A2AInvocationError, MCP_APP_RESOURCE_MIME_TYPE, ADCP_MIRRORED_STRUCTURED_CONTENT_META_KEY, } from './server';
|
|
120
|
+
export { adcpError, legacyCapabilitiesResponse, legacyProductsResponse, legacyMediaBuyResponse, legacyDeliveryResponse, legacyListAccountsResponse, legacyListCreativeFormatsResponse, legacyUpdateMediaBuyResponse, legacyGetMediaBuysResponse, legacyPerformanceFeedbackResponse, legacyBuildCreativeResponse, legacyBuildCreativeMultiResponse, legacyPreviewCreativeResponse, legacyCreativeDeliveryResponse, legacyListCreativesResponse, legacyListPropertyListsResponse, legacyListCollectionListsResponse, legacyListContentStandardsResponse, legacyGetPlanAuditLogsResponse, legacySyncCreativesResponse, legacyGetSignalsResponse, legacyActivateSignalResponse, legacyCancelMediaBuyResponse, legacyAcquireRightsResponse, legacyAcquireRightsAcquired, legacyAcquireRightsPendingApproval, legacyAcquireRightsRejected, legacySyncAccountsResponse, legacySyncGovernanceResponse, legacyReportUsageResponse, validActionsForStatus, MEDIA_BUY_TRANSITIONS, getMediaBuyTransitions, CREATIVE_ASSET_TRANSITIONS, isLegalMediaBuyTransition, isLegalCreativeTransition, assertMediaBuyTransition, assertCreativeTransition, getAccountMode, isSandboxOrMockAccount, assertSandboxAccount, taskToolResponse, registerAdcpTaskTool, createTaskCapableServer, InMemoryTaskStore, isTerminal, serve, taskScopeFromPrincipal, UnknownHostError, hostname, resolveHost, verifyIntrospection, registerTestController, handleTestControllerRequest, TestControllerError, toMcpResponse, TOOL_INPUT_SHAPE, CONTROLLER_SCENARIOS, DISCOVERY_ARM_SCENARIOS, SEED_SCENARIOS, SESSION_ENTRY_CAP, enforceMapCap, createSeedFixtureCache, PostgresTaskStore, cleanupExpiredTasks, getMcpTasksMigration, MCP_TASKS_MIGRATION, ADCP_PRE_TRANSPORT, checkGovernance, governanceDeniedError, DEFAULT_REPORTING_CAPABILITIES, InMemoryStateStore, PostgresStateStore, getAdcpStateMigration, ADCP_STATE_MIGRATION, StateError, PatchConflictError, SESSION_KEY_FIELD, createSessionedStore, scopedStore, patchWithRetry, isPutIfMatchConflict, requireSessionKey, structuredSerialize, structuredDeserialize, createIdempotencyStore, memoryBackend, pgBackend, getIdempotencyMigration, IDEMPOTENCY_MIGRATION, cleanupExpiredIdempotency, redisBackend, createLazyBackend, hashPayload, IdempotencyClaimOwnershipError, getServeRequestContext, ADCP_SERVE_REQUEST_CONTEXT, createA2AAdapter, A2AInvocationError, MCP_APP_RESOURCE_MIME_TYPE, ADCP_MIRRORED_STRUCTURED_CONTENT_META_KEY, } from './server';
|
|
173
121
|
export type { AdcpErrorOptions, AdcpErrorResponse, McpToolResponse, ValidAction, CancelMediaBuyInput, AdcpTaskToolConfig, TaskStore, TaskMessageQueue, CreateTaskOptions, ToolTaskHandler, CreateTaskRequestHandlerExtra, TaskRequestHandlerExtra, CreateTaskResult, GetTaskResult, Task, ServeContext, ServeOptions, PgQueryable, PostgresTaskStoreOptions, TestControllerStore, TestControllerStoreFactory, TestControllerStoreOrFactory, ControllerScenario, SeedScenario, SeedFixtureCache, SessionContext, OnInstructionsError, MaybePromise, LegacyAdcpServerConfig, LegacyAdcpToolMap, AdcpServerToolName, AdcpCapabilitiesConfig, LegacyAdcpCustomToolConfig, LegacyAdcpCustomToolHandler, LegacyAdcpCustomToolHandlerExtra, McpAppUiMeta, McpAppMeta, AdcpMcpResourceDefinition, McpAppResourceCsp, McpAppResourcePermissions, McpAppResourceUiMeta, McpAppResourceMeta, McpAppResourceReadContext, AdcpLogger, LegacyHandlerContext, LegacyMediaBuyHandlers, LegacySignalsHandlers, LegacyCreativeHandlers, LegacyGovernanceHandlers, LegacyAccountHandlers, LegacyEventTrackingHandlers, LegacySponsoredIntelligenceHandlers, SignedRequestsConfig, AdcpPreTransport, AdcpServer, AdcpServerTransport, AdcpTestRequest, AdcpTestToolsCallRequest, AdcpTestResponse, AdcpInvokeOptions, StructuredContentFallbackTransport, StructuredContentTextFallback, StructuredContentTextFallbackContext, CheckGovernanceOptions, GovernanceCallResult, GovernanceApproved, GovernanceDenied, GovernanceConditions, AdcpStateStore, ListOptions as StateListOptions, ListResult as StateListResult, PostgresStateStoreOptions, InMemoryStateStoreOptions, VersionedDocument, PutIfMatchResult, PatchWithRetryOptions, StateErrorCode, SessionKeyContext, IdempotencyStore, IdempotencyStoreConfig, IdempotencyBackend, IdempotencyCacheEntry, IdempotencyCheckResult, MemoryBackendOptions, PgBackendOptions, RedisBackendOptions, RedisBackendClient, RedisLikeClient, LazyBackendFactory, LazyBackendOptions, A2AAdapter, A2AAdapterOptions, A2AAgentCardOverrides, A2AAgentCapabilitiesOverride, A2AAgentSkillOverride, A2AMountOptions, ExpressAppLike, LegacyHttpSecurityScheme, LegacySecurityScheme, AccountMode, RequireCacheScopeWhenProducts, ServerPayload, GetProductsPayload, CreateMediaBuyPayload, UpdateMediaBuyPayload, GetMediaBuysPayload, GetMediaBuyDeliveryPayload, ListCreativesPayload, GetCreativeDeliveryPayload, CanonicalPreviewCreativePayload, PreviewCreativePayload, LegacyGetProductsPayload, LegacyCreateMediaBuyPayload, LegacyUpdateMediaBuyPayload, LegacyGetMediaBuysPayload, LegacyGetMediaBuyDeliveryPayload, LegacyListCreativesPayload, LegacyGetCreativeDeliveryPayload, LegacyListCreativeFormatsPayload, LegacyListCreativeFormatsResponsePayload, LegacyListCreativeFormatsServerPayload, LegacyBuildCreativePayload, LegacyBuildCreativeMultiPayload, LegacyBuildCreativeVariantPayload, LegacyPreviewCreativePayload, SyncCreativesPayload, SyncCreativesSuccessPayload, SyncCreativesErrorPayload, } from './server';
|
|
174
122
|
export { isRetryable, getRetryDelay } from './utils/retry';
|
|
175
123
|
export { decideRetry, BuyerRetryPolicy } from './utils/buyer-retry-policy';
|
|
@@ -279,3 +227,9 @@ export * from './supply-path';
|
|
|
279
227
|
export type { AuthorizationCollectionSelector, ProductCollectionSelector, CollectionDistribution, DiscoveryCollection, } from './discovery/types';
|
|
280
228
|
export { BuyerAccountRegistry, type AccountPolicy, type BuyerAccountStorage, type BuyerAccountRegistryOptions, type BuyerAccountDispatch, type BuyerAccountProvisioningDispatch, type EnsureAccountOptions, type ProvisionedAccount, } from './core/buyer-account-registry';
|
|
281
229
|
export { createProductCache, ProductCache, type ProductCacheOptions } from './core/product-cache';
|
|
230
|
+
export type { AssetVariant } from './types/core.generated';
|
|
231
|
+
export { TargetingOverlayKeys, TargetingOverlaySupportKeys } from './types/targeting-keys.generated';
|
|
232
|
+
export { parseMediaBuyDeliveryWebhook } from './webhooks/media-buy-delivery';
|
|
233
|
+
export type { ParseMediaBuyDeliveryWebhookOptions, MediaBuyDeliveryWebhookEnvelope, MediaBuyDeliveryWebhookParseErrorCode, MediaBuyDeliveryWebhookParseResult, } from './webhooks/media-buy-delivery';
|
|
234
|
+
export type { MediaBuyDeliveryReport } from './types/media-buy-delivery-report';
|
|
235
|
+
export { MediaBuyDeliveryReportSchema } from './validation/media-buy-delivery-report';
|
package/dist/lib/index.js
CHANGED
|
@@ -49,6 +49,7 @@ __export(index_exports, {
|
|
|
49
49
|
AgentClient: () => import_AgentClient.AgentClient,
|
|
50
50
|
AgentNotFoundError: () => import_errors.AgentNotFoundError,
|
|
51
51
|
AgentOAuthClientCredentialsSchema: () => import_oauth4.AgentOAuthClientCredentialsSchema,
|
|
52
|
+
AgentRateLimitedError: () => import_errors.AgentRateLimitedError,
|
|
52
53
|
Asset: () => import_asset_builders.Asset,
|
|
53
54
|
AsyncHandler: () => import_AsyncHandler.AsyncHandler,
|
|
54
55
|
AuthenticationCredentialsRejectedError: () => import_errors.AuthenticationCredentialsRejectedError,
|
|
@@ -138,6 +139,7 @@ __export(index_exports, {
|
|
|
138
139
|
MUTATING_TASKS: () => import_idempotency.MUTATING_TASKS,
|
|
139
140
|
MacroInRawValueError: () => import_substitution.MacroInRawValueError,
|
|
140
141
|
MaxClarificationError: () => import_errors.MaxClarificationError,
|
|
142
|
+
MediaBuyDeliveryReportSchema: () => import_media_buy_delivery_report.MediaBuyDeliveryReportSchema,
|
|
141
143
|
MediaBuyLifecycleCompatibilityError: () => import_compatibility.MediaBuyLifecycleCompatibilityError,
|
|
142
144
|
MediaBuyLifecycleCoordinator: () => import_compatibility.MediaBuyLifecycleCoordinator,
|
|
143
145
|
MemoryStorage: () => import_MemoryStorage.MemoryStorage,
|
|
@@ -204,6 +206,8 @@ __export(index_exports, {
|
|
|
204
206
|
TEST_AGENT_NO_AUTH_MCP_CONFIG: () => import_testing.TEST_AGENT_NO_AUTH_MCP_CONFIG,
|
|
205
207
|
TEST_AGENT_TOKEN: () => import_testing.TEST_AGENT_TOKEN,
|
|
206
208
|
TOOL_INPUT_SHAPE: () => import_server.TOOL_INPUT_SHAPE,
|
|
209
|
+
TargetingOverlayKeys: () => import_targeting_keys.TargetingOverlayKeys,
|
|
210
|
+
TargetingOverlaySupportKeys: () => import_targeting_keys.TargetingOverlaySupportKeys,
|
|
207
211
|
TaskAbortedError: () => import_errors.TaskAbortedError,
|
|
208
212
|
TaskExecutor: () => import_TaskExecutor.TaskExecutor,
|
|
209
213
|
TaskTimeoutError: () => import_errors.TaskTimeoutError,
|
|
@@ -411,6 +415,7 @@ __export(index_exports, {
|
|
|
411
415
|
getIndividualAssets: () => import_format_assets.getIndividualAssets,
|
|
412
416
|
getLibraryVersion: () => import_version.getLibraryVersion,
|
|
413
417
|
getMcpTasksMigration: () => import_server.getMcpTasksMigration,
|
|
418
|
+
getMediaBuyTransitions: () => import_server.getMediaBuyTransitions,
|
|
414
419
|
getOptionalAssets: () => import_format_assets.getOptionalAssets,
|
|
415
420
|
getPreviewHtml: () => import_preview_normalizer.getPreviewHtml,
|
|
416
421
|
getPreviewUrl: () => import_preview_normalizer.getPreviewUrl,
|
|
@@ -590,6 +595,7 @@ __export(index_exports, {
|
|
|
590
595
|
parseAdcpMajorVersion: () => import_version.parseAdcpMajorVersion,
|
|
591
596
|
parseCapabilitiesResponse: () => import_capabilities.parseCapabilitiesResponse,
|
|
592
597
|
parseManagerDomain: () => import_validate_adagents.parseManagerDomain,
|
|
598
|
+
parseMediaBuyDeliveryWebhook: () => import_media_buy_delivery.parseMediaBuyDeliveryWebhook,
|
|
593
599
|
parsePublisherPropertySelector: () => import_publisher_property_selector.parsePublisherPropertySelector,
|
|
594
600
|
parseSseStream: () => import_registry2.parseSseStream,
|
|
595
601
|
parseWWWAuthenticate: () => import_oauth.parseWWWAuthenticate,
|
|
@@ -851,6 +857,9 @@ var import_media_buy_action_resolver = require('./server/media-buy-action-resolv
|
|
|
851
857
|
__reExport(index_exports, require('./supply-path/index.js'), module.exports);
|
|
852
858
|
var import_buyer_account_registry = require('./core/buyer-account-registry.js');
|
|
853
859
|
var import_product_cache = require('./core/product-cache.js');
|
|
860
|
+
var import_targeting_keys = require('./types/targeting-keys.generated.js');
|
|
861
|
+
var import_media_buy_delivery = require('./webhooks/media-buy-delivery.js');
|
|
862
|
+
var import_media_buy_delivery_report = require('./validation/media-buy-delivery-report.js');
|
|
854
863
|
const wireVersion = {
|
|
855
864
|
isSupported: import_protocols2.bundleSupportsAdcpVersionField,
|
|
856
865
|
normalize: import_schema_loader2.toReleasePrecisionWire,
|
|
@@ -895,6 +904,7 @@ function createAdCPClientFromEnv() {
|
|
|
895
904
|
AgentClient,
|
|
896
905
|
AgentNotFoundError,
|
|
897
906
|
AgentOAuthClientCredentialsSchema,
|
|
907
|
+
AgentRateLimitedError,
|
|
898
908
|
Asset,
|
|
899
909
|
AsyncHandler,
|
|
900
910
|
AuthenticationCredentialsRejectedError,
|
|
@@ -984,6 +994,7 @@ function createAdCPClientFromEnv() {
|
|
|
984
994
|
MUTATING_TASKS,
|
|
985
995
|
MacroInRawValueError,
|
|
986
996
|
MaxClarificationError,
|
|
997
|
+
MediaBuyDeliveryReportSchema,
|
|
987
998
|
MediaBuyLifecycleCompatibilityError,
|
|
988
999
|
MediaBuyLifecycleCoordinator,
|
|
989
1000
|
MemoryStorage,
|
|
@@ -1050,6 +1061,8 @@ function createAdCPClientFromEnv() {
|
|
|
1050
1061
|
TEST_AGENT_NO_AUTH_MCP_CONFIG,
|
|
1051
1062
|
TEST_AGENT_TOKEN,
|
|
1052
1063
|
TOOL_INPUT_SHAPE,
|
|
1064
|
+
TargetingOverlayKeys,
|
|
1065
|
+
TargetingOverlaySupportKeys,
|
|
1053
1066
|
TaskAbortedError,
|
|
1054
1067
|
TaskExecutor,
|
|
1055
1068
|
TaskTimeoutError,
|
|
@@ -1257,6 +1270,7 @@ function createAdCPClientFromEnv() {
|
|
|
1257
1270
|
getIndividualAssets,
|
|
1258
1271
|
getLibraryVersion,
|
|
1259
1272
|
getMcpTasksMigration,
|
|
1273
|
+
getMediaBuyTransitions,
|
|
1260
1274
|
getOptionalAssets,
|
|
1261
1275
|
getPreviewHtml,
|
|
1262
1276
|
getPreviewUrl,
|
|
@@ -1436,6 +1450,7 @@ function createAdCPClientFromEnv() {
|
|
|
1436
1450
|
parseAdcpMajorVersion,
|
|
1437
1451
|
parseCapabilitiesResponse,
|
|
1438
1452
|
parseManagerDomain,
|
|
1453
|
+
parseMediaBuyDeliveryWebhook,
|
|
1439
1454
|
parsePublisherPropertySelector,
|
|
1440
1455
|
parseSseStream,
|
|
1441
1456
|
parseWWWAuthenticate,
|
package/dist/lib/index.mjs
CHANGED
|
@@ -234,6 +234,7 @@ import {
|
|
|
234
234
|
IdempotencyConflictError,
|
|
235
235
|
IdempotencyExpiredError,
|
|
236
236
|
ResponseTooLargeError,
|
|
237
|
+
AgentRateLimitedError,
|
|
237
238
|
ActionNotAllowedError,
|
|
238
239
|
PreparedFixturesDeniedError,
|
|
239
240
|
adcpErrorToTypedError,
|
|
@@ -337,6 +338,7 @@ import {
|
|
|
337
338
|
legacyReportUsageResponse,
|
|
338
339
|
validActionsForStatus,
|
|
339
340
|
MEDIA_BUY_TRANSITIONS,
|
|
341
|
+
getMediaBuyTransitions,
|
|
340
342
|
CREATIVE_ASSET_TRANSITIONS,
|
|
341
343
|
isLegalMediaBuyTransition,
|
|
342
344
|
isLegalCreativeTransition,
|
|
@@ -826,6 +828,9 @@ import {
|
|
|
826
828
|
BuyerAccountRegistry
|
|
827
829
|
} from "./core/buyer-account-registry.mjs";
|
|
828
830
|
import { createProductCache, ProductCache } from "./core/product-cache.mjs";
|
|
831
|
+
import { TargetingOverlayKeys, TargetingOverlaySupportKeys } from "./types/targeting-keys.generated.mjs";
|
|
832
|
+
import { parseMediaBuyDeliveryWebhook } from "./webhooks/media-buy-delivery.mjs";
|
|
833
|
+
import { MediaBuyDeliveryReportSchema } from "./validation/media-buy-delivery-report.mjs";
|
|
829
834
|
export {
|
|
830
835
|
A2AInvocationError,
|
|
831
836
|
A2A_CARD_PATHS,
|
|
@@ -857,6 +862,7 @@ export {
|
|
|
857
862
|
AgentClient,
|
|
858
863
|
AgentNotFoundError,
|
|
859
864
|
AgentOAuthClientCredentialsSchema,
|
|
865
|
+
AgentRateLimitedError,
|
|
860
866
|
Asset,
|
|
861
867
|
AsyncHandler,
|
|
862
868
|
AuthenticationCredentialsRejectedError,
|
|
@@ -946,6 +952,7 @@ export {
|
|
|
946
952
|
MUTATING_TASKS,
|
|
947
953
|
MacroInRawValueError,
|
|
948
954
|
MaxClarificationError,
|
|
955
|
+
MediaBuyDeliveryReportSchema,
|
|
949
956
|
MediaBuyLifecycleCompatibilityError,
|
|
950
957
|
MediaBuyLifecycleCoordinator,
|
|
951
958
|
MemoryStorage,
|
|
@@ -1012,6 +1019,8 @@ export {
|
|
|
1012
1019
|
TEST_AGENT_NO_AUTH_MCP_CONFIG,
|
|
1013
1020
|
TEST_AGENT_TOKEN,
|
|
1014
1021
|
TOOL_INPUT_SHAPE,
|
|
1022
|
+
TargetingOverlayKeys,
|
|
1023
|
+
TargetingOverlaySupportKeys,
|
|
1015
1024
|
TaskAbortedError,
|
|
1016
1025
|
TaskExecutor,
|
|
1017
1026
|
TaskTimeoutError,
|
|
@@ -1219,6 +1228,7 @@ export {
|
|
|
1219
1228
|
getIndividualAssets,
|
|
1220
1229
|
getLibraryVersion,
|
|
1221
1230
|
getMcpTasksMigration,
|
|
1231
|
+
getMediaBuyTransitions,
|
|
1222
1232
|
getOptionalAssets,
|
|
1223
1233
|
getPreviewHtml,
|
|
1224
1234
|
getPreviewUrl,
|
|
@@ -1398,6 +1408,7 @@ export {
|
|
|
1398
1408
|
parseAdcpMajorVersion,
|
|
1399
1409
|
parseCapabilitiesResponse,
|
|
1400
1410
|
parseManagerDomain,
|
|
1411
|
+
parseMediaBuyDeliveryWebhook,
|
|
1401
1412
|
parsePublisherPropertySelector,
|
|
1402
1413
|
parseSseStream,
|
|
1403
1414
|
parseWWWAuthenticate,
|