@adcp/sdk 15.4.0 → 15.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/README.md +15 -0
- package/dist/lib/advanced.d.mts +2 -2
- package/dist/lib/advanced.d.ts +2 -2
- package/dist/lib/advanced.js +8 -2
- package/dist/lib/advanced.mjs +8 -2
- package/dist/lib/auth/oauth/index.d.mts +1 -0
- package/dist/lib/auth/oauth/index.d.ts +1 -0
- package/dist/lib/auth/oauth/index.js +5 -0
- package/dist/lib/auth/oauth/index.mjs +3 -0
- package/dist/lib/auth/oauth/pending-web-flow.d.mts +16 -0
- package/dist/lib/auth/oauth/pending-web-flow.d.ts +16 -0
- package/dist/lib/auth/oauth/pending-web-flow.js +66 -0
- package/dist/lib/auth/oauth/pending-web-flow.mjs +41 -0
- package/dist/lib/auth/oauth/web-flow.js +3 -3
- package/dist/lib/auth/oauth/web-flow.mjs +3 -3
- package/dist/lib/core/AgentClient.d.mts +4 -0
- package/dist/lib/core/AgentClient.d.ts +4 -0
- package/dist/lib/core/AgentClient.js +8 -0
- package/dist/lib/core/AgentClient.mjs +8 -0
- package/dist/lib/core/SingleAgentClient.d.mts +154 -0
- package/dist/lib/core/SingleAgentClient.d.ts +154 -0
- package/dist/lib/core/SingleAgentClient.js +661 -23
- package/dist/lib/core/SingleAgentClient.mjs +666 -23
- package/dist/lib/core/agent-discovery-cache.d.mts +103 -0
- package/dist/lib/core/agent-discovery-cache.d.ts +103 -0
- package/dist/lib/core/agent-discovery-cache.js +121 -0
- package/dist/lib/core/agent-discovery-cache.mjs +92 -0
- package/dist/lib/index.d.mts +5 -3
- package/dist/lib/index.d.ts +5 -3
- package/dist/lib/index.js +7 -0
- package/dist/lib/index.mjs +6 -0
- package/dist/lib/protocols/index.d.mts +2 -2
- package/dist/lib/protocols/index.d.ts +2 -2
- package/dist/lib/protocols/index.js +1 -1
- package/dist/lib/protocols/index.mjs +1 -1
- package/dist/lib/protocols/mcp-call-context.d.mts +109 -0
- package/dist/lib/protocols/mcp-call-context.d.ts +109 -0
- package/dist/lib/protocols/mcp-call-context.js +221 -0
- package/dist/lib/protocols/mcp-call-context.mjs +186 -0
- package/dist/lib/protocols/mcp-modern.d.mts +9 -1
- package/dist/lib/protocols/mcp-modern.d.ts +9 -1
- package/dist/lib/protocols/mcp-modern.js +180 -104
- package/dist/lib/protocols/mcp-modern.mjs +193 -104
- package/dist/lib/protocols/mcp-scope.d.mts +15 -0
- package/dist/lib/protocols/mcp-scope.d.ts +15 -0
- package/dist/lib/protocols/mcp.d.mts +4 -2
- package/dist/lib/protocols/mcp.d.ts +4 -2
- package/dist/lib/protocols/mcp.js +178 -154
- package/dist/lib/protocols/mcp.mjs +189 -153
- package/dist/lib/protocols/transportDiagnostics.d.mts +33 -1
- package/dist/lib/protocols/transportDiagnostics.d.ts +33 -1
- package/dist/lib/protocols/transportDiagnostics.js +128 -12
- package/dist/lib/protocols/transportDiagnostics.mjs +128 -12
- package/dist/lib/registry/types.generated.d.mts +63 -1
- package/dist/lib/registry/types.generated.d.ts +63 -1
- package/dist/lib/reporting/azure/index.d.mts +26 -0
- package/dist/lib/reporting/azure/index.d.ts +26 -0
- package/dist/lib/reporting/azure/index.js +247 -0
- package/dist/lib/reporting/azure/index.mjs +230 -0
- package/dist/lib/reporting/bigquery/index.d.mts +127 -0
- package/dist/lib/reporting/bigquery/index.d.ts +127 -0
- package/dist/lib/reporting/bigquery/index.js +379 -0
- package/dist/lib/reporting/bigquery/index.mjs +341 -0
- package/dist/lib/reporting/gcs/index.d.mts +2 -0
- package/dist/lib/reporting/gcs/index.d.ts +2 -0
- package/dist/lib/reporting/gcs/index.js +3 -0
- package/dist/lib/reporting/gcs/index.mjs +2 -0
- package/dist/lib/reporting/gcs/row-provider.d.mts +32 -0
- package/dist/lib/reporting/gcs/row-provider.d.ts +32 -0
- package/dist/lib/reporting/gcs/row-provider.js +205 -0
- package/dist/lib/reporting/gcs/row-provider.mjs +188 -0
- package/dist/lib/reporting/ledger/change-feed.d.mts +41 -0
- package/dist/lib/reporting/ledger/change-feed.d.ts +41 -0
- package/dist/lib/reporting/ledger/change-feed.js +101 -0
- package/dist/lib/reporting/ledger/change-feed.mjs +74 -0
- package/dist/lib/reporting/ledger/handler.js +22 -8
- package/dist/lib/reporting/ledger/handler.mjs +22 -8
- package/dist/lib/reporting/ledger/index.d.mts +4 -0
- package/dist/lib/reporting/ledger/index.d.ts +4 -0
- package/dist/lib/reporting/ledger/index.js +9 -1
- package/dist/lib/reporting/ledger/index.mjs +4 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +2 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +2 -0
- package/dist/lib/reporting/ledger/managed-postgres.js +21 -1
- package/dist/lib/reporting/ledger/managed-postgres.mjs +21 -1
- package/dist/lib/reporting/ledger/managed.d.mts +9 -0
- package/dist/lib/reporting/ledger/managed.d.ts +9 -0
- package/dist/lib/reporting/ledger/managed.js +18 -0
- package/dist/lib/reporting/ledger/managed.mjs +18 -0
- package/dist/lib/reporting/ledger/postgres.d.mts +185 -0
- package/dist/lib/reporting/ledger/postgres.d.ts +185 -0
- package/dist/lib/reporting/ledger/postgres.js +872 -26
- package/dist/lib/reporting/ledger/postgres.mjs +880 -26
- package/dist/lib/reporting/ledger/producer.js +10 -1
- package/dist/lib/reporting/ledger/producer.mjs +10 -1
- package/dist/lib/reporting/ledger/row-storage-errors.d.mts +7 -0
- package/dist/lib/reporting/ledger/row-storage-errors.d.ts +7 -0
- package/dist/lib/reporting/ledger/row-storage-errors.js +41 -0
- package/dist/lib/reporting/ledger/row-storage-errors.mjs +16 -0
- package/dist/lib/reporting/ledger/row-storage-migration.d.mts +41 -0
- package/dist/lib/reporting/ledger/row-storage-migration.d.ts +41 -0
- package/dist/lib/reporting/ledger/row-storage-migration.js +234 -0
- package/dist/lib/reporting/ledger/row-storage-migration.mjs +208 -0
- package/dist/lib/reporting/ledger/row-storage-object.d.mts +112 -0
- package/dist/lib/reporting/ledger/row-storage-object.d.ts +112 -0
- package/dist/lib/reporting/ledger/row-storage-object.js +304 -0
- package/dist/lib/reporting/ledger/row-storage-object.mjs +262 -0
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.mts +44 -0
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.ts +44 -0
- package/dist/lib/reporting/ledger/row-storage-provider-io.js +142 -0
- package/dist/lib/reporting/ledger/row-storage-provider-io.mjs +111 -0
- package/dist/lib/reporting/ledger/row-storage.d.mts +224 -0
- package/dist/lib/reporting/ledger/row-storage.d.ts +224 -0
- package/dist/lib/reporting/ledger/row-storage.js +692 -0
- package/dist/lib/reporting/ledger/row-storage.mjs +680 -0
- package/dist/lib/reporting/ledger/types.d.mts +8 -0
- package/dist/lib/reporting/ledger/types.d.ts +8 -0
- package/dist/lib/reporting/s3/index.d.mts +29 -0
- package/dist/lib/reporting/s3/index.d.ts +29 -0
- package/dist/lib/reporting/s3/index.js +324 -0
- package/dist/lib/reporting/s3/index.mjs +317 -0
- package/dist/lib/reporting/service/index.d.mts +43 -1
- package/dist/lib/reporting/service/index.d.ts +43 -1
- package/dist/lib/reporting/service/index.js +69 -1
- package/dist/lib/reporting/service/index.mjs +71 -1
- package/dist/lib/schemas/browser.d.mts +14 -0
- package/dist/lib/schemas/browser.d.ts +14 -0
- package/dist/lib/schemas/browser.js +48 -0
- package/dist/lib/schemas/browser.mjs +20 -0
- package/dist/lib/schemas/index.d.mts +2 -120
- package/dist/lib/schemas/index.d.ts +2 -120
- package/dist/lib/schemas/index.js +3 -11
- package/dist/lib/schemas/index.mjs +1 -9
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/testing/index.d.mts +1 -0
- package/dist/lib/testing/index.d.ts +1 -0
- package/dist/lib/testing/index.js +3 -0
- package/dist/lib/testing/index.mjs +2 -0
- package/dist/lib/testing/pending-web-flow-store.d.mts +20 -0
- package/dist/lib/testing/pending-web-flow-store.d.ts +20 -0
- package/dist/lib/testing/pending-web-flow-store.js +132 -0
- package/dist/lib/testing/pending-web-flow-store.mjs +98 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/validation/get-products-request.d.mts +122 -0
- package/dist/lib/validation/get-products-request.d.ts +122 -0
- package/dist/lib/validation/get-products-request.js +39 -0
- package/dist/lib/validation/get-products-request.mjs +14 -0
- 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/README.md +1 -1
- package/docs/TYPE-SUMMARY.md +35 -2
- package/docs/ZOD-SCHEMAS.md +13 -1
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +142 -0
- package/docs/guides/EXISTING-PLATFORM.md +43 -12
- package/docs/guides/OAUTH-ISSUER-BINDING.md +6 -0
- package/docs/guides/REPORTING-LEDGER.md +374 -0
- package/docs/guides/REPORTING-OPERATIONS.md +76 -1
- package/docs/guides/WEB-OAUTH.md +48 -1
- package/docs/llms.txt +4 -2
- package/docs/migration-14.x-rc-worksheet.md +6 -4
- package/package.json +64 -1
|
@@ -0,0 +1,132 @@
|
|
|
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 pending_web_flow_store_exports = {};
|
|
30
|
+
__export(pending_web_flow_store_exports, {
|
|
31
|
+
assertPendingWebFlowStoreRoundTrip: () => assertPendingWebFlowStoreRoundTrip
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(pending_web_flow_store_exports);
|
|
34
|
+
var import_strict = __toESM(require("node:assert/strict"));
|
|
35
|
+
var import_node_crypto = require("node:crypto");
|
|
36
|
+
function createPendingWebFlowFixture(state, options) {
|
|
37
|
+
const createdAt = /* @__PURE__ */ new Date();
|
|
38
|
+
return {
|
|
39
|
+
state,
|
|
40
|
+
agentId: options.agentId ?? "pending-flow-store-conformance",
|
|
41
|
+
agentUrl: "https://agent.example/mcp",
|
|
42
|
+
codeVerifier: "conformance-only-pkce-verifier",
|
|
43
|
+
redirectUri: "https://buyer.example/oauth/callback",
|
|
44
|
+
resource: "https://resource.example/mcp",
|
|
45
|
+
resourceOverride: "https://resource.example/mcp",
|
|
46
|
+
resourceOverrideAction: "set",
|
|
47
|
+
resourceOverrideSnapshot: "https://previous-resource.example/mcp",
|
|
48
|
+
scope: "mcp.read mcp.write",
|
|
49
|
+
authorizationServerUrl: "https://auth.example/tenant",
|
|
50
|
+
authorizationServerIssuer: "https://auth.example/tenant",
|
|
51
|
+
clientInformation: {
|
|
52
|
+
client_id: "conformance-client",
|
|
53
|
+
client_secret: "conformance-only-client-secret",
|
|
54
|
+
client_id_issued_at: 17e8,
|
|
55
|
+
client_secret_expires_at: 0,
|
|
56
|
+
issuer: "https://auth.example/tenant",
|
|
57
|
+
redirect_uris: ["https://buyer.example/oauth/callback"],
|
|
58
|
+
token_endpoint_auth_method: "client_secret_post",
|
|
59
|
+
conformanceExtension: { retained: "client metadata" }
|
|
60
|
+
},
|
|
61
|
+
createdAt,
|
|
62
|
+
expiresAt: new Date(createdAt.getTime() + 10 * 60 * 1e3),
|
|
63
|
+
carry: options.carry !== void 0 ? structuredClone(options.carry) : {
|
|
64
|
+
user_id: "conformance-user",
|
|
65
|
+
return_to: "/dashboard",
|
|
66
|
+
nested: { values: ["one", 2, true, null, { retained: "yes" }] }
|
|
67
|
+
},
|
|
68
|
+
conformanceExtension: { retained: "future flow fields" }
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async function assertPendingWebFlowStoreRoundTrip(store, options = {}) {
|
|
72
|
+
const newState = () => (0, import_node_crypto.randomBytes)(32).toString("base64url");
|
|
73
|
+
const flow = createPendingWebFlowFixture(newState(), options);
|
|
74
|
+
const expected = structuredClone(flow);
|
|
75
|
+
await store.put(flow);
|
|
76
|
+
import_strict.default.equal(await store.consume(newState()), null, "Unknown state must return null");
|
|
77
|
+
import_strict.default.deepStrictEqual(
|
|
78
|
+
await store.consume(flow.state),
|
|
79
|
+
expected,
|
|
80
|
+
"Pending flow must round-trip every field and Date"
|
|
81
|
+
);
|
|
82
|
+
import_strict.default.equal(await store.consume(flow.state), null, "Pending flow must only be consumed once");
|
|
83
|
+
const clear = {
|
|
84
|
+
...createPendingWebFlowFixture(newState(), options),
|
|
85
|
+
resourceOverrideAction: "clear",
|
|
86
|
+
resourceOverrideSnapshot: null,
|
|
87
|
+
clientInformation: { client_id: "public-conformance-client", issuer: "https://auth.example/tenant" }
|
|
88
|
+
};
|
|
89
|
+
delete clear.resourceOverride;
|
|
90
|
+
const expectedClear = structuredClone(clear);
|
|
91
|
+
await store.put(clear);
|
|
92
|
+
import_strict.default.deepStrictEqual(
|
|
93
|
+
await store.consume(clear.state),
|
|
94
|
+
expectedClear,
|
|
95
|
+
"Clear flow must preserve null and absent fields"
|
|
96
|
+
);
|
|
97
|
+
import_strict.default.equal(await store.consume(clear.state), null, "Clear flow must only be consumed once");
|
|
98
|
+
const preserve = { ...createPendingWebFlowFixture(newState(), options) };
|
|
99
|
+
delete preserve.resourceOverride;
|
|
100
|
+
delete preserve.resourceOverrideAction;
|
|
101
|
+
delete preserve.resourceOverrideSnapshot;
|
|
102
|
+
const expectedPreserve = structuredClone(preserve);
|
|
103
|
+
await store.put(preserve);
|
|
104
|
+
import_strict.default.deepStrictEqual(
|
|
105
|
+
await store.consume(preserve.state),
|
|
106
|
+
expectedPreserve,
|
|
107
|
+
"Preserve-only flow must keep override fields absent"
|
|
108
|
+
);
|
|
109
|
+
import_strict.default.equal(await store.consume(preserve.state), null, "Preserve-only flow must only be consumed once");
|
|
110
|
+
const expired = createPendingWebFlowFixture(newState(), options);
|
|
111
|
+
expired.createdAt = new Date(Date.now() - 2 * 60 * 60 * 1e3);
|
|
112
|
+
expired.expiresAt = new Date(Date.now() - 60 * 60 * 1e3);
|
|
113
|
+
try {
|
|
114
|
+
await store.put(expired);
|
|
115
|
+
} catch {
|
|
116
|
+
}
|
|
117
|
+
import_strict.default.equal(await store.consume(expired.state), null, "Expired flow must return null");
|
|
118
|
+
const concurrent = createPendingWebFlowFixture(newState(), options);
|
|
119
|
+
const expectedConcurrent = structuredClone(concurrent);
|
|
120
|
+
await store.put(concurrent);
|
|
121
|
+
const duplicate = { ...structuredClone(expectedConcurrent), codeVerifier: "different-conformance-verifier" };
|
|
122
|
+
await import_strict.default.rejects(async () => store.put(duplicate), "Duplicate state must be rejected");
|
|
123
|
+
const results = await Promise.all([store.consume(concurrent.state), store.consume(concurrent.state)]);
|
|
124
|
+
const winners = results.filter((result) => result !== null);
|
|
125
|
+
import_strict.default.equal(winners.length, 1, "Concurrent consumes must return the flow exactly once");
|
|
126
|
+
import_strict.default.deepStrictEqual(winners[0], expectedConcurrent, "Concurrent consume must preserve the original flow");
|
|
127
|
+
import_strict.default.equal(await store.consume(concurrent.state), null, "Concurrent consume must delete the flow");
|
|
128
|
+
}
|
|
129
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
130
|
+
0 && (module.exports = {
|
|
131
|
+
assertPendingWebFlowStoreRoundTrip
|
|
132
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { randomBytes } from "node:crypto";
|
|
3
|
+
function createPendingWebFlowFixture(state, options) {
|
|
4
|
+
const createdAt = /* @__PURE__ */ new Date();
|
|
5
|
+
return {
|
|
6
|
+
state,
|
|
7
|
+
agentId: options.agentId ?? "pending-flow-store-conformance",
|
|
8
|
+
agentUrl: "https://agent.example/mcp",
|
|
9
|
+
codeVerifier: "conformance-only-pkce-verifier",
|
|
10
|
+
redirectUri: "https://buyer.example/oauth/callback",
|
|
11
|
+
resource: "https://resource.example/mcp",
|
|
12
|
+
resourceOverride: "https://resource.example/mcp",
|
|
13
|
+
resourceOverrideAction: "set",
|
|
14
|
+
resourceOverrideSnapshot: "https://previous-resource.example/mcp",
|
|
15
|
+
scope: "mcp.read mcp.write",
|
|
16
|
+
authorizationServerUrl: "https://auth.example/tenant",
|
|
17
|
+
authorizationServerIssuer: "https://auth.example/tenant",
|
|
18
|
+
clientInformation: {
|
|
19
|
+
client_id: "conformance-client",
|
|
20
|
+
client_secret: "conformance-only-client-secret",
|
|
21
|
+
client_id_issued_at: 17e8,
|
|
22
|
+
client_secret_expires_at: 0,
|
|
23
|
+
issuer: "https://auth.example/tenant",
|
|
24
|
+
redirect_uris: ["https://buyer.example/oauth/callback"],
|
|
25
|
+
token_endpoint_auth_method: "client_secret_post",
|
|
26
|
+
conformanceExtension: { retained: "client metadata" }
|
|
27
|
+
},
|
|
28
|
+
createdAt,
|
|
29
|
+
expiresAt: new Date(createdAt.getTime() + 10 * 60 * 1e3),
|
|
30
|
+
carry: options.carry !== void 0 ? structuredClone(options.carry) : {
|
|
31
|
+
user_id: "conformance-user",
|
|
32
|
+
return_to: "/dashboard",
|
|
33
|
+
nested: { values: ["one", 2, true, null, { retained: "yes" }] }
|
|
34
|
+
},
|
|
35
|
+
conformanceExtension: { retained: "future flow fields" }
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
async function assertPendingWebFlowStoreRoundTrip(store, options = {}) {
|
|
39
|
+
const newState = () => randomBytes(32).toString("base64url");
|
|
40
|
+
const flow = createPendingWebFlowFixture(newState(), options);
|
|
41
|
+
const expected = structuredClone(flow);
|
|
42
|
+
await store.put(flow);
|
|
43
|
+
assert.equal(await store.consume(newState()), null, "Unknown state must return null");
|
|
44
|
+
assert.deepStrictEqual(
|
|
45
|
+
await store.consume(flow.state),
|
|
46
|
+
expected,
|
|
47
|
+
"Pending flow must round-trip every field and Date"
|
|
48
|
+
);
|
|
49
|
+
assert.equal(await store.consume(flow.state), null, "Pending flow must only be consumed once");
|
|
50
|
+
const clear = {
|
|
51
|
+
...createPendingWebFlowFixture(newState(), options),
|
|
52
|
+
resourceOverrideAction: "clear",
|
|
53
|
+
resourceOverrideSnapshot: null,
|
|
54
|
+
clientInformation: { client_id: "public-conformance-client", issuer: "https://auth.example/tenant" }
|
|
55
|
+
};
|
|
56
|
+
delete clear.resourceOverride;
|
|
57
|
+
const expectedClear = structuredClone(clear);
|
|
58
|
+
await store.put(clear);
|
|
59
|
+
assert.deepStrictEqual(
|
|
60
|
+
await store.consume(clear.state),
|
|
61
|
+
expectedClear,
|
|
62
|
+
"Clear flow must preserve null and absent fields"
|
|
63
|
+
);
|
|
64
|
+
assert.equal(await store.consume(clear.state), null, "Clear flow must only be consumed once");
|
|
65
|
+
const preserve = { ...createPendingWebFlowFixture(newState(), options) };
|
|
66
|
+
delete preserve.resourceOverride;
|
|
67
|
+
delete preserve.resourceOverrideAction;
|
|
68
|
+
delete preserve.resourceOverrideSnapshot;
|
|
69
|
+
const expectedPreserve = structuredClone(preserve);
|
|
70
|
+
await store.put(preserve);
|
|
71
|
+
assert.deepStrictEqual(
|
|
72
|
+
await store.consume(preserve.state),
|
|
73
|
+
expectedPreserve,
|
|
74
|
+
"Preserve-only flow must keep override fields absent"
|
|
75
|
+
);
|
|
76
|
+
assert.equal(await store.consume(preserve.state), null, "Preserve-only flow must only be consumed once");
|
|
77
|
+
const expired = createPendingWebFlowFixture(newState(), options);
|
|
78
|
+
expired.createdAt = new Date(Date.now() - 2 * 60 * 60 * 1e3);
|
|
79
|
+
expired.expiresAt = new Date(Date.now() - 60 * 60 * 1e3);
|
|
80
|
+
try {
|
|
81
|
+
await store.put(expired);
|
|
82
|
+
} catch {
|
|
83
|
+
}
|
|
84
|
+
assert.equal(await store.consume(expired.state), null, "Expired flow must return null");
|
|
85
|
+
const concurrent = createPendingWebFlowFixture(newState(), options);
|
|
86
|
+
const expectedConcurrent = structuredClone(concurrent);
|
|
87
|
+
await store.put(concurrent);
|
|
88
|
+
const duplicate = { ...structuredClone(expectedConcurrent), codeVerifier: "different-conformance-verifier" };
|
|
89
|
+
await assert.rejects(async () => store.put(duplicate), "Duplicate state must be rejected");
|
|
90
|
+
const results = await Promise.all([store.consume(concurrent.state), store.consume(concurrent.state)]);
|
|
91
|
+
const winners = results.filter((result) => result !== null);
|
|
92
|
+
assert.equal(winners.length, 1, "Concurrent consumes must return the flow exactly once");
|
|
93
|
+
assert.deepStrictEqual(winners[0], expectedConcurrent, "Concurrent consume must preserve the original flow");
|
|
94
|
+
assert.equal(await store.consume(concurrent.state), null, "Concurrent consume must delete the flow");
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
assertPendingWebFlowStoreRoundTrip
|
|
98
|
+
};
|
|
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
|
|
|
197
197
|
*/
|
|
198
198
|
export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
|
|
199
199
|
/** Capability semver emitted in run summaries and used for advisory expiry. */
|
|
200
|
-
export declare const RUNNER_CAPABILITY_VERSION = "15.
|
|
200
|
+
export declare const RUNNER_CAPABILITY_VERSION = "15.6.0";
|
|
201
201
|
/** True when a failed validation contributes to the owning step's grade. */
|
|
202
202
|
export declare function validationFailsStep(result: ValidationResult): boolean;
|
|
203
203
|
/**
|
|
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
|
|
|
197
197
|
*/
|
|
198
198
|
export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
|
|
199
199
|
/** Capability semver emitted in run summaries and used for advisory expiry. */
|
|
200
|
-
export declare const RUNNER_CAPABILITY_VERSION = "15.
|
|
200
|
+
export declare const RUNNER_CAPABILITY_VERSION = "15.6.0";
|
|
201
201
|
/** True when a failed validation contributes to the owning step's grade. */
|
|
202
202
|
export declare function validationFailsStep(result: ValidationResult): boolean;
|
|
203
203
|
/**
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CanonicalGetProductsRequest } from '../v2/projection/creative-delivery.mjs';
|
|
3
|
+
type LooseObjectShapeFor<T extends object> = {
|
|
4
|
+
[K in keyof T]-?: undefined extends T[K] ? z.ZodOptional<z.ZodType<Exclude<T[K], undefined>, Exclude<T[K], undefined>>> : z.ZodType<T[K], T[K]>;
|
|
5
|
+
};
|
|
6
|
+
type ZodShapeOutput<U extends z.core.$ZodShape> = {
|
|
7
|
+
[K in keyof U as undefined extends z.output<U[K]> ? never : K]: z.output<U[K]>;
|
|
8
|
+
} & {
|
|
9
|
+
[K in keyof U as undefined extends z.output<U[K]> ? K : never]?: z.output<U[K]>;
|
|
10
|
+
};
|
|
11
|
+
/** Portable loose-object facade retained across adopter declaration emit. */
|
|
12
|
+
export type LooseObjectSchemaFor<T extends object> = {
|
|
13
|
+
extend<U extends z.core.$ZodShape>(shape: U): LooseObjectSchemaFor<Omit<T, keyof U> & ZodShapeOutput<U>>;
|
|
14
|
+
} & z.ZodObject<LooseObjectShapeFor<T>, z.core.$loose> & z.ZodType<T & Record<string, unknown>, T & Record<string, unknown>>;
|
|
15
|
+
/** Wire-compatible request schema, including the legacy `format_ids` selector. */
|
|
16
|
+
export declare const LegacyGetProductsRequestSchema: z.ZodObject<{
|
|
17
|
+
adcp_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
18
|
+
adcp_major_version: z.ZodOptional<z.ZodType<number, number, z.core.$ZodTypeInternals<number, number>>>;
|
|
19
|
+
idempotency_key: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
20
|
+
buying_mode: z.ZodType<"brief" | "wholesale" | "refine", "brief" | "wholesale" | "refine", z.core.$ZodTypeInternals<"brief" | "wholesale" | "refine", "brief" | "wholesale" | "refine">>;
|
|
21
|
+
brief: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
22
|
+
refine: z.ZodOptional<z.ZodType<({
|
|
23
|
+
scope: "request";
|
|
24
|
+
ask: string;
|
|
25
|
+
} | {
|
|
26
|
+
scope: "product";
|
|
27
|
+
product_id: string;
|
|
28
|
+
action?: "include" | "omit" | "more_like_this";
|
|
29
|
+
ask?: string;
|
|
30
|
+
} | {
|
|
31
|
+
scope: "proposal";
|
|
32
|
+
proposal_id: string;
|
|
33
|
+
action?: "include" | "omit" | "finalize";
|
|
34
|
+
ask?: string;
|
|
35
|
+
})[], ({
|
|
36
|
+
scope: "request";
|
|
37
|
+
ask: string;
|
|
38
|
+
} | {
|
|
39
|
+
scope: "product";
|
|
40
|
+
product_id: string;
|
|
41
|
+
action?: "include" | "omit" | "more_like_this";
|
|
42
|
+
ask?: string;
|
|
43
|
+
} | {
|
|
44
|
+
scope: "proposal";
|
|
45
|
+
proposal_id: string;
|
|
46
|
+
action?: "include" | "omit" | "finalize";
|
|
47
|
+
ask?: string;
|
|
48
|
+
})[], z.core.$ZodTypeInternals<({
|
|
49
|
+
scope: "request";
|
|
50
|
+
ask: string;
|
|
51
|
+
} | {
|
|
52
|
+
scope: "product";
|
|
53
|
+
product_id: string;
|
|
54
|
+
action?: "include" | "omit" | "more_like_this";
|
|
55
|
+
ask?: string;
|
|
56
|
+
} | {
|
|
57
|
+
scope: "proposal";
|
|
58
|
+
proposal_id: string;
|
|
59
|
+
action?: "include" | "omit" | "finalize";
|
|
60
|
+
ask?: string;
|
|
61
|
+
})[], ({
|
|
62
|
+
scope: "request";
|
|
63
|
+
ask: string;
|
|
64
|
+
} | {
|
|
65
|
+
scope: "product";
|
|
66
|
+
product_id: string;
|
|
67
|
+
action?: "include" | "omit" | "more_like_this";
|
|
68
|
+
ask?: string;
|
|
69
|
+
} | {
|
|
70
|
+
scope: "proposal";
|
|
71
|
+
proposal_id: string;
|
|
72
|
+
action?: "include" | "omit" | "finalize";
|
|
73
|
+
ask?: string;
|
|
74
|
+
})[]>>>;
|
|
75
|
+
brand: z.ZodOptional<z.ZodType<import("../index.mjs").BrandReference, import("../index.mjs").BrandReference, z.core.$ZodTypeInternals<import("../index.mjs").BrandReference, import("../index.mjs").BrandReference>>>;
|
|
76
|
+
acceptance_context: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").AcceptanceContext, import("../types/tools.generated.mjs").AcceptanceContext, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").AcceptanceContext, import("../types/tools.generated.mjs").AcceptanceContext>>>;
|
|
77
|
+
catalog: z.ZodOptional<z.ZodType<import("../index.mjs").Catalog, import("../index.mjs").Catalog, z.core.$ZodTypeInternals<import("../index.mjs").Catalog, import("../index.mjs").Catalog>>>;
|
|
78
|
+
account: z.ZodOptional<z.ZodType<import("../index.mjs").AccountReference, import("../index.mjs").AccountReference, z.core.$ZodTypeInternals<import("../index.mjs").AccountReference, import("../index.mjs").AccountReference>>>;
|
|
79
|
+
preferred_delivery_types: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").DeliveryType[], import("../types/core.generated.mjs").DeliveryType[], z.core.$ZodTypeInternals<import("../types/core.generated.mjs").DeliveryType[], import("../types/core.generated.mjs").DeliveryType[]>>>;
|
|
80
|
+
filters: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").ProductFilters, import("../types/tools.generated.mjs").ProductFilters, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ProductFilters, import("../types/tools.generated.mjs").ProductFilters>>>;
|
|
81
|
+
targeting_overlay: z.ZodOptional<z.ZodType<import("../index.mjs").TargetingOverlay, import("../index.mjs").TargetingOverlay, z.core.$ZodTypeInternals<import("../index.mjs").TargetingOverlay, import("../index.mjs").TargetingOverlay>>>;
|
|
82
|
+
media_buy_frequency_cap: z.ZodOptional<z.ZodType<{
|
|
83
|
+
suppress?: import("../index.mjs").Duration;
|
|
84
|
+
suppress_minutes?: number;
|
|
85
|
+
max_impressions?: number;
|
|
86
|
+
per?: import("../index.mjs").ReachUnit;
|
|
87
|
+
window?: import("../index.mjs").Duration;
|
|
88
|
+
}, {
|
|
89
|
+
suppress?: import("../index.mjs").Duration;
|
|
90
|
+
suppress_minutes?: number;
|
|
91
|
+
max_impressions?: number;
|
|
92
|
+
per?: import("../index.mjs").ReachUnit;
|
|
93
|
+
window?: import("../index.mjs").Duration;
|
|
94
|
+
}, z.core.$ZodTypeInternals<{
|
|
95
|
+
suppress?: import("../index.mjs").Duration;
|
|
96
|
+
suppress_minutes?: number;
|
|
97
|
+
max_impressions?: number;
|
|
98
|
+
per?: import("../index.mjs").ReachUnit;
|
|
99
|
+
window?: import("../index.mjs").Duration;
|
|
100
|
+
}, {
|
|
101
|
+
suppress?: import("../index.mjs").Duration;
|
|
102
|
+
suppress_minutes?: number;
|
|
103
|
+
max_impressions?: number;
|
|
104
|
+
per?: import("../index.mjs").ReachUnit;
|
|
105
|
+
window?: import("../index.mjs").Duration;
|
|
106
|
+
}>>>;
|
|
107
|
+
required_overlay_support: z.ZodOptional<z.ZodType<import("../types/core.generated.mjs").TargetingOverlayRequirements, import("../types/core.generated.mjs").TargetingOverlayRequirements, z.core.$ZodTypeInternals<import("../types/core.generated.mjs").TargetingOverlayRequirements, import("../types/core.generated.mjs").TargetingOverlayRequirements>>>;
|
|
108
|
+
required_media_buy_support: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").ProductMediaBuySupportRequirements, import("../types/tools.generated.mjs").ProductMediaBuySupportRequirements, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ProductMediaBuySupportRequirements, import("../types/tools.generated.mjs").ProductMediaBuySupportRequirements>>>;
|
|
109
|
+
property_list: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").PropertyListReference, import("../types/tools.generated.mjs").PropertyListReference, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").PropertyListReference, import("../types/tools.generated.mjs").PropertyListReference>>>;
|
|
110
|
+
fields: z.ZodOptional<z.ZodType<("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], ("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], z.core.$ZodTypeInternals<("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], ("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[]>>>;
|
|
111
|
+
time_budget: z.ZodOptional<z.ZodType<import("../index.mjs").Duration, import("../index.mjs").Duration, z.core.$ZodTypeInternals<import("../index.mjs").Duration, import("../index.mjs").Duration>>>;
|
|
112
|
+
push_notification_config: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").PushNotificationConfig, import("../types/tools.generated.mjs").PushNotificationConfig, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").PushNotificationConfig, import("../types/tools.generated.mjs").PushNotificationConfig>>>;
|
|
113
|
+
pagination: z.ZodOptional<z.ZodType<import("../index.mjs").PaginationRequest, import("../index.mjs").PaginationRequest, z.core.$ZodTypeInternals<import("../index.mjs").PaginationRequest, import("../index.mjs").PaginationRequest>>>;
|
|
114
|
+
if_wholesale_feed_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
115
|
+
if_pricing_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
116
|
+
context: z.ZodOptional<z.ZodType<import("../types/tools.generated.mjs").ContextObject, import("../types/tools.generated.mjs").ContextObject, z.core.$ZodTypeInternals<import("../types/tools.generated.mjs").ContextObject, import("../types/tools.generated.mjs").ContextObject>>>;
|
|
117
|
+
required_policies: z.ZodOptional<z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>>;
|
|
118
|
+
ext: z.ZodOptional<z.ZodType<import("../index.mjs").ExtensionObject, import("../index.mjs").ExtensionObject, z.core.$ZodTypeInternals<import("../index.mjs").ExtensionObject, import("../index.mjs").ExtensionObject>>>;
|
|
119
|
+
}, z.core.$loose> & z.ZodType<import("../index.mjs").LegacyGetProductsRequest & Record<string, unknown>, import("../index.mjs").LegacyGetProductsRequest & Record<string, unknown>, z.core.$ZodTypeInternals<import("../index.mjs").LegacyGetProductsRequest & Record<string, unknown>, import("../index.mjs").LegacyGetProductsRequest & Record<string, unknown>>>;
|
|
120
|
+
/** Primary request schema; legacy `format_ids` selection is rejected. */
|
|
121
|
+
export declare const GetProductsRequestSchema: LooseObjectSchemaFor<CanonicalGetProductsRequest>;
|
|
122
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CanonicalGetProductsRequest } from '../v2/projection/creative-delivery';
|
|
3
|
+
type LooseObjectShapeFor<T extends object> = {
|
|
4
|
+
[K in keyof T]-?: undefined extends T[K] ? z.ZodOptional<z.ZodType<Exclude<T[K], undefined>, Exclude<T[K], undefined>>> : z.ZodType<T[K], T[K]>;
|
|
5
|
+
};
|
|
6
|
+
type ZodShapeOutput<U extends z.core.$ZodShape> = {
|
|
7
|
+
[K in keyof U as undefined extends z.output<U[K]> ? never : K]: z.output<U[K]>;
|
|
8
|
+
} & {
|
|
9
|
+
[K in keyof U as undefined extends z.output<U[K]> ? K : never]?: z.output<U[K]>;
|
|
10
|
+
};
|
|
11
|
+
/** Portable loose-object facade retained across adopter declaration emit. */
|
|
12
|
+
export type LooseObjectSchemaFor<T extends object> = {
|
|
13
|
+
extend<U extends z.core.$ZodShape>(shape: U): LooseObjectSchemaFor<Omit<T, keyof U> & ZodShapeOutput<U>>;
|
|
14
|
+
} & z.ZodObject<LooseObjectShapeFor<T>, z.core.$loose> & z.ZodType<T & Record<string, unknown>, T & Record<string, unknown>>;
|
|
15
|
+
/** Wire-compatible request schema, including the legacy `format_ids` selector. */
|
|
16
|
+
export declare const LegacyGetProductsRequestSchema: z.ZodObject<{
|
|
17
|
+
adcp_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
18
|
+
adcp_major_version: z.ZodOptional<z.ZodType<number, number, z.core.$ZodTypeInternals<number, number>>>;
|
|
19
|
+
idempotency_key: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
20
|
+
buying_mode: z.ZodType<"brief" | "wholesale" | "refine", "brief" | "wholesale" | "refine", z.core.$ZodTypeInternals<"brief" | "wholesale" | "refine", "brief" | "wholesale" | "refine">>;
|
|
21
|
+
brief: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
22
|
+
refine: z.ZodOptional<z.ZodType<({
|
|
23
|
+
scope: "request";
|
|
24
|
+
ask: string;
|
|
25
|
+
} | {
|
|
26
|
+
scope: "product";
|
|
27
|
+
product_id: string;
|
|
28
|
+
action?: "include" | "omit" | "more_like_this";
|
|
29
|
+
ask?: string;
|
|
30
|
+
} | {
|
|
31
|
+
scope: "proposal";
|
|
32
|
+
proposal_id: string;
|
|
33
|
+
action?: "include" | "omit" | "finalize";
|
|
34
|
+
ask?: string;
|
|
35
|
+
})[], ({
|
|
36
|
+
scope: "request";
|
|
37
|
+
ask: string;
|
|
38
|
+
} | {
|
|
39
|
+
scope: "product";
|
|
40
|
+
product_id: string;
|
|
41
|
+
action?: "include" | "omit" | "more_like_this";
|
|
42
|
+
ask?: string;
|
|
43
|
+
} | {
|
|
44
|
+
scope: "proposal";
|
|
45
|
+
proposal_id: string;
|
|
46
|
+
action?: "include" | "omit" | "finalize";
|
|
47
|
+
ask?: string;
|
|
48
|
+
})[], z.core.$ZodTypeInternals<({
|
|
49
|
+
scope: "request";
|
|
50
|
+
ask: string;
|
|
51
|
+
} | {
|
|
52
|
+
scope: "product";
|
|
53
|
+
product_id: string;
|
|
54
|
+
action?: "include" | "omit" | "more_like_this";
|
|
55
|
+
ask?: string;
|
|
56
|
+
} | {
|
|
57
|
+
scope: "proposal";
|
|
58
|
+
proposal_id: string;
|
|
59
|
+
action?: "include" | "omit" | "finalize";
|
|
60
|
+
ask?: string;
|
|
61
|
+
})[], ({
|
|
62
|
+
scope: "request";
|
|
63
|
+
ask: string;
|
|
64
|
+
} | {
|
|
65
|
+
scope: "product";
|
|
66
|
+
product_id: string;
|
|
67
|
+
action?: "include" | "omit" | "more_like_this";
|
|
68
|
+
ask?: string;
|
|
69
|
+
} | {
|
|
70
|
+
scope: "proposal";
|
|
71
|
+
proposal_id: string;
|
|
72
|
+
action?: "include" | "omit" | "finalize";
|
|
73
|
+
ask?: string;
|
|
74
|
+
})[]>>>;
|
|
75
|
+
brand: z.ZodOptional<z.ZodType<import("..").BrandReference, import("..").BrandReference, z.core.$ZodTypeInternals<import("..").BrandReference, import("..").BrandReference>>>;
|
|
76
|
+
acceptance_context: z.ZodOptional<z.ZodType<import("../types/tools.generated").AcceptanceContext, import("../types/tools.generated").AcceptanceContext, z.core.$ZodTypeInternals<import("../types/tools.generated").AcceptanceContext, import("../types/tools.generated").AcceptanceContext>>>;
|
|
77
|
+
catalog: z.ZodOptional<z.ZodType<import("..").Catalog, import("..").Catalog, z.core.$ZodTypeInternals<import("..").Catalog, import("..").Catalog>>>;
|
|
78
|
+
account: z.ZodOptional<z.ZodType<import("..").AccountReference, import("..").AccountReference, z.core.$ZodTypeInternals<import("..").AccountReference, import("..").AccountReference>>>;
|
|
79
|
+
preferred_delivery_types: z.ZodOptional<z.ZodType<import("../types/core.generated").DeliveryType[], import("../types/core.generated").DeliveryType[], z.core.$ZodTypeInternals<import("../types/core.generated").DeliveryType[], import("../types/core.generated").DeliveryType[]>>>;
|
|
80
|
+
filters: z.ZodOptional<z.ZodType<import("../types/tools.generated").ProductFilters, import("../types/tools.generated").ProductFilters, z.core.$ZodTypeInternals<import("../types/tools.generated").ProductFilters, import("../types/tools.generated").ProductFilters>>>;
|
|
81
|
+
targeting_overlay: z.ZodOptional<z.ZodType<import("..").TargetingOverlay, import("..").TargetingOverlay, z.core.$ZodTypeInternals<import("..").TargetingOverlay, import("..").TargetingOverlay>>>;
|
|
82
|
+
media_buy_frequency_cap: z.ZodOptional<z.ZodType<{
|
|
83
|
+
suppress?: import("..").Duration;
|
|
84
|
+
suppress_minutes?: number;
|
|
85
|
+
max_impressions?: number;
|
|
86
|
+
per?: import("..").ReachUnit;
|
|
87
|
+
window?: import("..").Duration;
|
|
88
|
+
}, {
|
|
89
|
+
suppress?: import("..").Duration;
|
|
90
|
+
suppress_minutes?: number;
|
|
91
|
+
max_impressions?: number;
|
|
92
|
+
per?: import("..").ReachUnit;
|
|
93
|
+
window?: import("..").Duration;
|
|
94
|
+
}, z.core.$ZodTypeInternals<{
|
|
95
|
+
suppress?: import("..").Duration;
|
|
96
|
+
suppress_minutes?: number;
|
|
97
|
+
max_impressions?: number;
|
|
98
|
+
per?: import("..").ReachUnit;
|
|
99
|
+
window?: import("..").Duration;
|
|
100
|
+
}, {
|
|
101
|
+
suppress?: import("..").Duration;
|
|
102
|
+
suppress_minutes?: number;
|
|
103
|
+
max_impressions?: number;
|
|
104
|
+
per?: import("..").ReachUnit;
|
|
105
|
+
window?: import("..").Duration;
|
|
106
|
+
}>>>;
|
|
107
|
+
required_overlay_support: z.ZodOptional<z.ZodType<import("../types/core.generated").TargetingOverlayRequirements, import("../types/core.generated").TargetingOverlayRequirements, z.core.$ZodTypeInternals<import("../types/core.generated").TargetingOverlayRequirements, import("../types/core.generated").TargetingOverlayRequirements>>>;
|
|
108
|
+
required_media_buy_support: z.ZodOptional<z.ZodType<import("../types/tools.generated").ProductMediaBuySupportRequirements, import("../types/tools.generated").ProductMediaBuySupportRequirements, z.core.$ZodTypeInternals<import("../types/tools.generated").ProductMediaBuySupportRequirements, import("../types/tools.generated").ProductMediaBuySupportRequirements>>>;
|
|
109
|
+
property_list: z.ZodOptional<z.ZodType<import("../types/tools.generated").PropertyListReference, import("../types/tools.generated").PropertyListReference, z.core.$ZodTypeInternals<import("../types/tools.generated").PropertyListReference, import("../types/tools.generated").PropertyListReference>>>;
|
|
110
|
+
fields: z.ZodOptional<z.ZodType<("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], ("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], z.core.$ZodTypeInternals<("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[], ("name" | "identity" | "forecast" | "description" | "publisher_properties" | "audience_evidence" | "product_id" | "channels" | "video_placement_types" | "audio_distribution_types" | "sponsored_placement_types" | "social_placement_surfaces" | "format_options" | "placements" | "delivery_type" | "exclusivity" | "pricing_options" | "reporting_capabilities" | "measurement_terms" | "performance_standards" | "catalog_types" | "signal_targeting_allowed" | "signal_targeting_rules" | "demographic_targeting" | "overlay_support" | "collections" | "collection_targeting_allowed" | "media_buy_support" | "audience_evidence_selections" | "max_optimization_goals" | "catalog_match" | "list_applications" | "brief_relevance" | "targeting_resolution" | "acceptance_policy_profile_ids" | "execution_requirements" | "expires_at" | "allowed_actions" | "product_card" | "format_ids" | "outcome_measurement" | "delivery_measurement" | "creative_policy" | "metric_optimization" | "conversion_tracking" | "data_provider_signals" | "included_signals" | "signal_targeting_options" | "installments" | "is_custom" | "product_card_detailed" | "enforced_policies" | "trusted_match")[]>>>;
|
|
111
|
+
time_budget: z.ZodOptional<z.ZodType<import("..").Duration, import("..").Duration, z.core.$ZodTypeInternals<import("..").Duration, import("..").Duration>>>;
|
|
112
|
+
push_notification_config: z.ZodOptional<z.ZodType<import("../types/tools.generated").PushNotificationConfig, import("../types/tools.generated").PushNotificationConfig, z.core.$ZodTypeInternals<import("../types/tools.generated").PushNotificationConfig, import("../types/tools.generated").PushNotificationConfig>>>;
|
|
113
|
+
pagination: z.ZodOptional<z.ZodType<import("..").PaginationRequest, import("..").PaginationRequest, z.core.$ZodTypeInternals<import("..").PaginationRequest, import("..").PaginationRequest>>>;
|
|
114
|
+
if_wholesale_feed_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
115
|
+
if_pricing_version: z.ZodOptional<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
116
|
+
context: z.ZodOptional<z.ZodType<import("../types/tools.generated").ContextObject, import("../types/tools.generated").ContextObject, z.core.$ZodTypeInternals<import("../types/tools.generated").ContextObject, import("../types/tools.generated").ContextObject>>>;
|
|
117
|
+
required_policies: z.ZodOptional<z.ZodType<string[], string[], z.core.$ZodTypeInternals<string[], string[]>>>;
|
|
118
|
+
ext: z.ZodOptional<z.ZodType<import("..").ExtensionObject, import("..").ExtensionObject, z.core.$ZodTypeInternals<import("..").ExtensionObject, import("..").ExtensionObject>>>;
|
|
119
|
+
}, z.core.$loose> & z.ZodType<import("..").LegacyGetProductsRequest & Record<string, unknown>, import("..").LegacyGetProductsRequest & Record<string, unknown>, z.core.$ZodTypeInternals<import("..").LegacyGetProductsRequest & Record<string, unknown>, import("..").LegacyGetProductsRequest & Record<string, unknown>>>;
|
|
120
|
+
/** Primary request schema; legacy `format_ids` selection is rejected. */
|
|
121
|
+
export declare const GetProductsRequestSchema: LooseObjectSchemaFor<CanonicalGetProductsRequest>;
|
|
122
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var get_products_request_exports = {};
|
|
20
|
+
__export(get_products_request_exports, {
|
|
21
|
+
GetProductsRequestSchema: () => GetProductsRequestSchema,
|
|
22
|
+
LegacyGetProductsRequestSchema: () => LegacyGetProductsRequestSchema
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(get_products_request_exports);
|
|
25
|
+
var import_zod = require("zod");
|
|
26
|
+
var import_schemas = require('../types/schemas.generated.js');
|
|
27
|
+
var import_inline_enums = require('../types/inline-enums.generated.js');
|
|
28
|
+
const LegacyGetProductsRequestSchema = import_schemas.GetProductsRequestSchema;
|
|
29
|
+
const canonicalGetProductsFields = import_inline_enums.GetProductsRequest_FieldsValues.filter(
|
|
30
|
+
(field) => field !== "format_ids"
|
|
31
|
+
);
|
|
32
|
+
const GetProductsRequestSchema = import_schemas.GetProductsRequestSchema.safeExtend({
|
|
33
|
+
fields: import_zod.z.array(import_zod.z.enum(canonicalGetProductsFields)).optional()
|
|
34
|
+
});
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
GetProductsRequestSchema,
|
|
38
|
+
LegacyGetProductsRequestSchema
|
|
39
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GetProductsRequestSchema as GeneratedGetProductsRequestSchema } from "../types/schemas.generated.mjs";
|
|
3
|
+
import { GetProductsRequest_FieldsValues } from "../types/inline-enums.generated.mjs";
|
|
4
|
+
const LegacyGetProductsRequestSchema = GeneratedGetProductsRequestSchema;
|
|
5
|
+
const canonicalGetProductsFields = GetProductsRequest_FieldsValues.filter(
|
|
6
|
+
(field) => field !== "format_ids"
|
|
7
|
+
);
|
|
8
|
+
const GetProductsRequestSchema = GeneratedGetProductsRequestSchema.safeExtend({
|
|
9
|
+
fields: z.array(z.enum(canonicalGetProductsFields)).optional()
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
GetProductsRequestSchema,
|
|
13
|
+
LegacyGetProductsRequestSchema
|
|
14
|
+
};
|
package/dist/lib/version.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "15.
|
|
4
|
+
export declare const LIBRARY_VERSION = "15.6.0";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "15.
|
|
36
|
+
readonly library: "15.6.0";
|
|
37
37
|
readonly adcp: "3.2.3";
|
|
38
38
|
readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-09T11:44:03.363Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "15.
|
|
4
|
+
export declare const LIBRARY_VERSION = "15.6.0";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "15.
|
|
36
|
+
readonly library: "15.6.0";
|
|
37
37
|
readonly adcp: "3.2.3";
|
|
38
38
|
readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-09T11:44:03.363Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|