@adcp/sdk 17.0.0-beta.1 → 17.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/adapters/keyed-account-store.js +1 -1
- package/dist/lib/adapters/keyed-account-store.mjs +1 -1
- 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/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/SingleAgentClient.d.mts +115 -2
- package/dist/lib/core/SingleAgentClient.d.ts +115 -2
- package/dist/lib/core/SingleAgentClient.js +547 -67
- package/dist/lib/core/SingleAgentClient.mjs +534 -54
- package/dist/lib/core/TaskExecutor.d.mts +7 -0
- package/dist/lib/core/TaskExecutor.d.ts +7 -0
- package/dist/lib/core/TaskExecutor.js +18 -5
- package/dist/lib/core/TaskExecutor.mjs +18 -5
- 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/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 +6 -52
- package/dist/lib/index.d.ts +6 -52
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.mjs +7 -0
- package/dist/lib/media-buy/compatibility.js +6 -1
- package/dist/lib/media-buy/compatibility.mjs +6 -1
- package/dist/lib/protocols/mcp-scope.d.mts +3 -0
- package/dist/lib/protocols/mcp-scope.d.ts +3 -0
- package/dist/lib/protocols/mcp-scope.js +8 -3
- package/dist/lib/protocols/mcp-scope.mjs +8 -3
- package/dist/lib/reporting/inspection.js +1 -0
- package/dist/lib/reporting/inspection.mjs +1 -0
- package/dist/lib/reporting/ledger/coverage.d.mts +5 -0
- package/dist/lib/reporting/ledger/coverage.d.ts +5 -0
- package/dist/lib/reporting/ledger/coverage.js +37 -3
- package/dist/lib/reporting/ledger/coverage.mjs +36 -3
- package/dist/lib/reporting/ledger/handler.js +7 -4
- package/dist/lib/reporting/ledger/handler.mjs +7 -4
- package/dist/lib/reporting/ledger/producer.js +215 -69
- package/dist/lib/reporting/ledger/producer.mjs +217 -70
- package/dist/lib/reporting/ledger/schedule.d.mts +2 -2
- package/dist/lib/reporting/ledger/schedule.d.ts +2 -2
- package/dist/lib/reporting/ledger/schedule.js +8 -5
- package/dist/lib/reporting/ledger/schedule.mjs +8 -5
- package/dist/lib/reporting/ledger/status-ingest.d.mts +1 -1
- package/dist/lib/reporting/ledger/status-ingest.d.ts +1 -1
- package/dist/lib/reporting/ledger/status-ingest.js +4 -3
- package/dist/lib/reporting/ledger/status-ingest.mjs +4 -3
- package/dist/lib/reporting/ledger/types.d.mts +36 -1
- package/dist/lib/reporting/ledger/types.d.ts +36 -1
- package/dist/lib/reporting/service/index.d.mts +14 -1
- package/dist/lib/reporting/service/index.d.ts +14 -1
- package/dist/lib/reporting/service/index.js +24 -12
- package/dist/lib/reporting/service/index.mjs +24 -12
- 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 -3
- package/dist/lib/schemas/index.d.ts +5 -3
- 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 +2 -2
- package/dist/lib/server/account-sync-contract.mjs +2 -2
- package/dist/lib/server/create-adcp-server.js +33 -20
- package/dist/lib/server/create-adcp-server.mjs +36 -12
- package/dist/lib/server/decisioning/account.d.mts +36 -10
- package/dist/lib/server/decisioning/account.d.ts +36 -10
- package/dist/lib/server/decisioning/account.js +33 -14
- package/dist/lib/server/decisioning/account.mjs +33 -14
- 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 +4 -4
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +4 -4
- 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/notification-subscriptions/runtime.d.mts +1 -1
- package/dist/lib/server/notification-subscriptions/runtime.d.ts +1 -1
- package/dist/lib/server/notification-subscriptions/runtime.js +4 -0
- package/dist/lib/server/notification-subscriptions/runtime.mjs +4 -0
- package/dist/lib/server/responses.js +9 -1
- package/dist/lib/server/responses.mjs +9 -1
- 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/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/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/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/accept-proposal.d.ts +20 -28
- package/dist/lib/types/asset-instances.d.mts +1 -1
- package/dist/lib/types/asset-instances.d.ts +1 -1
- package/dist/lib/types/buy-products.d.ts +20 -28
- package/dist/lib/types/check-governance.d.ts +20 -28
- package/dist/lib/types/comply-test-controller.d.ts +20 -28
- package/dist/lib/types/control-media-buy.d.ts +20 -28
- package/dist/lib/types/core.generated.d.mts +273 -184
- package/dist/lib/types/core.generated.d.ts +273 -184
- package/dist/lib/types/create-media-buy.d.ts +20 -28
- package/dist/lib/types/get-media-buys.d.ts +20 -28
- package/dist/lib/types/get-products.d.ts +20 -28
- package/dist/lib/types/index.d.mts +6 -1
- package/dist/lib/types/index.d.ts +6 -1
- 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/list-products.d.ts +20 -28
- package/dist/lib/types/list-proposals.d.ts +20 -28
- package/dist/lib/types/media-buy-delivery-report.d.mts +6 -0
- package/dist/lib/types/media-buy-delivery-report.d.ts +6 -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/refine-proposals.d.ts +20 -28
- package/dist/lib/types/request-proposals.d.ts +20 -28
- package/dist/lib/types/schemas.generated.d.ts +63113 -127273
- package/dist/lib/types/schemas.generated.js +759 -770
- package/dist/lib/types/schemas.generated.mjs +759 -770
- 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 +109 -0
- package/dist/lib/types/targeting-keys.generated.mjs +84 -0
- package/dist/lib/types/tools.generated.d.mts +2 -68
- package/dist/lib/types/tools.generated.d.ts +2 -68
- package/dist/lib/types/update-media-buy.d.ts +20 -28
- package/dist/lib/utils/adcp-version-config.js +5 -2
- package/dist/lib/utils/adcp-version-config.mjs +5 -2
- package/dist/lib/utils/response-unwrapper.js +6 -1
- package/dist/lib/utils/response-unwrapper.mjs +6 -1
- 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 +104 -29
- package/dist/lib/v2/projection/creative-delivery.mjs +108 -29
- 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/v2/projection/v1-to-v2.d.mts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.d.ts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.js +12 -9
- package/dist/lib/v2/projection/v1-to-v2.mjs +12 -9
- package/dist/lib/validation/budget-allocation.d.mts +3 -3
- package/dist/lib/validation/budget-allocation.d.ts +3 -3
- 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/nonempty-array.d.mts +15 -0
- package/dist/lib/validation/nonempty-array.d.ts +15 -0
- package/dist/lib/validation/nonempty-array.js +41 -0
- package/dist/lib/validation/nonempty-array.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 +135 -42
- package/dist/lib/validation/schema-validator.mjs +139 -43
- package/dist/lib/validation/sync-creatives.d.mts +22 -22
- package/dist/lib/validation/sync-creatives.d.ts +22 -22
- 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/DELIVERY-WEBHOOK-PARSING.md +142 -0
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +15 -0
- package/docs/guides/REPORTING-LEDGER.md +93 -0
- package/docs/guides/REPORTING-STABILITY.md +1 -1
- package/docs/guides/TYPED-CLIENT-TOOLS.md +49 -0
- package/docs/llms.txt +2 -2
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-16-to-17.md +191 -14
- package/docs/migration-6.6-to-6.7.md +14 -0
- package/docs/migration-account-change-feed.md +15 -0
- package/docs/recipes/verifying-inbound-webhooks.md +18 -2
- package/package.json +2 -2
|
@@ -181,12 +181,9 @@ export declare function getExternalSchemaRootForCompliance(options: ResolveOptio
|
|
|
181
181
|
export declare function loadBundleStoryboards(ref: BundleRef): Storyboard[];
|
|
182
182
|
/** Enumerate every bundle present in the cache (universal + protocols + specialisms). */
|
|
183
183
|
export declare function listBundles(options?: ResolveOptions): BundleRef[];
|
|
184
|
-
/** List every storyboard the
|
|
184
|
+
/** List every storyboard the selected immutable bundle can produce, as detached records. */
|
|
185
185
|
export declare function listAllComplianceStoryboards(options?: ResolveOptions): Storyboard[];
|
|
186
|
-
/**
|
|
187
|
-
* Find a storyboard by its internal `id` (the YAML's `id:` field).
|
|
188
|
-
* Scans every bundle in the cache. Returns undefined if no match.
|
|
189
|
-
*/
|
|
186
|
+
/** Find a storyboard by its internal YAML id without reparsing a warm bundle. */
|
|
190
187
|
export declare function getComplianceStoryboardById(id: string, options?: ResolveOptions): Storyboard | undefined;
|
|
191
188
|
/** Find a bundle by its directory/file id (`media-buy`, `sales-guaranteed`, `capability-discovery`). */
|
|
192
189
|
export declare function findBundleById(id: string, options?: ResolveOptions): BundleRef | undefined;
|
|
@@ -47,6 +47,7 @@ var import_errors = require('../../errors/index.js');
|
|
|
47
47
|
var import_adcp_version_config = require('../../utils/adcp-version-config.js');
|
|
48
48
|
var import_schema_loader = require('../../validation/schema-loader.js');
|
|
49
49
|
var import_synthesize = require('./request-signing/synthesize.js');
|
|
50
|
+
var import_vector_loader = require('./request-signing/vector-loader.js');
|
|
50
51
|
var import_provenance = require('./provenance.js');
|
|
51
52
|
class CapabilityResolutionError extends import_errors.ADCPError {
|
|
52
53
|
code;
|
|
@@ -434,23 +435,71 @@ function listBundles(options = {}) {
|
|
|
434
435
|
}
|
|
435
436
|
return bundles;
|
|
436
437
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
438
|
+
const STORYBOARD_INDEX_CACHE_LIMIT = 8;
|
|
439
|
+
const storyboardIndexes = /* @__PURE__ */ new Map();
|
|
440
|
+
function customComplianceInventory(dir) {
|
|
441
|
+
if (!(0, import_fs.existsSync)(dir)) return "missing";
|
|
442
|
+
const entries = [];
|
|
443
|
+
const visitedDirectories = /* @__PURE__ */ new Set();
|
|
444
|
+
const visit = (file, relative) => {
|
|
445
|
+
const stat = (0, import_fs.statSync)(file, { bigint: true });
|
|
446
|
+
entries.push([relative, String(stat.mtimeNs), String(stat.ctimeNs), String(stat.size), String(stat.ino)]);
|
|
447
|
+
if (!stat.isDirectory()) return;
|
|
448
|
+
const identity = `${stat.dev}:${stat.ino}`;
|
|
449
|
+
if (visitedDirectories.has(identity)) return;
|
|
450
|
+
visitedDirectories.add(identity);
|
|
451
|
+
for (const child of (0, import_fs.readdirSync)(file).sort()) visit((0, import_path.join)(file, child), `${relative}/${child}`);
|
|
452
|
+
};
|
|
453
|
+
visit(dir, "");
|
|
454
|
+
return JSON.stringify(entries);
|
|
455
|
+
}
|
|
456
|
+
function complianceStoryboardIndex(options) {
|
|
457
|
+
const dir = (0, import_path.resolve)(getComplianceCacheDir(options));
|
|
458
|
+
const indexPath = (0, import_path.join)(dir, "index.json");
|
|
459
|
+
const stamp = (0, import_fs.existsSync)(indexPath) ? (0, import_fs.statSync)(indexPath) : void 0;
|
|
460
|
+
const schemaRoot = getConfiguredSchemaRoot(options);
|
|
461
|
+
const customRoot = Boolean(getConfiguredComplianceDir(options));
|
|
462
|
+
const inventory = customRoot ? customComplianceInventory(dir) : null;
|
|
463
|
+
const key = JSON.stringify([
|
|
464
|
+
dir,
|
|
465
|
+
options.version ?? import_version.ADCP_VERSION,
|
|
466
|
+
schemaRoot ? (0, import_path.resolve)(schemaRoot) : null,
|
|
467
|
+
options.hostedStableLineAlias ?? null,
|
|
468
|
+
stamp?.mtimeMs ?? null,
|
|
469
|
+
stamp?.size ?? null,
|
|
470
|
+
inventory
|
|
471
|
+
]);
|
|
472
|
+
const cached = storyboardIndexes.get(key);
|
|
473
|
+
if (cached) {
|
|
474
|
+
storyboardIndexes.delete(key);
|
|
475
|
+
storyboardIndexes.set(key, cached);
|
|
476
|
+
return cached;
|
|
477
|
+
}
|
|
478
|
+
if (customRoot) (0, import_vector_loader.invalidateRequestSigningVectorCache)(dir);
|
|
479
|
+
const indexed = /* @__PURE__ */ new Map();
|
|
480
|
+
for (const ref of listBundles({ ...options, complianceDir: dir })) {
|
|
481
|
+
for (const storyboard of loadBundleStoryboards(ref)) {
|
|
482
|
+
if (!indexed.has(storyboard.id)) indexed.set(storyboard.id, storyboard);
|
|
445
483
|
}
|
|
446
484
|
}
|
|
447
|
-
|
|
485
|
+
storyboardIndexes.set(key, indexed);
|
|
486
|
+
while (storyboardIndexes.size > STORYBOARD_INDEX_CACHE_LIMIT) {
|
|
487
|
+
const oldest = storyboardIndexes.keys().next().value;
|
|
488
|
+
if (oldest !== void 0) storyboardIndexes.delete(oldest);
|
|
489
|
+
}
|
|
490
|
+
return indexed;
|
|
491
|
+
}
|
|
492
|
+
function cloneComplianceStoryboard(storyboard) {
|
|
493
|
+
const copy = structuredClone(storyboard);
|
|
494
|
+
const trustedRoot = (0, import_provenance.trustedStoryboardComplianceRoot)(storyboard);
|
|
495
|
+
return trustedRoot ? (0, import_provenance.markStoryboardComplianceRoot)(copy, trustedRoot) : copy;
|
|
496
|
+
}
|
|
497
|
+
function listAllComplianceStoryboards(options = {}) {
|
|
498
|
+
return [...complianceStoryboardIndex(options).values()].map(cloneComplianceStoryboard);
|
|
448
499
|
}
|
|
449
500
|
function getComplianceStoryboardById(id, options = {}) {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
return void 0;
|
|
501
|
+
const storyboard = complianceStoryboardIndex(options).get(id);
|
|
502
|
+
return storyboard ? cloneComplianceStoryboard(storyboard) : void 0;
|
|
454
503
|
}
|
|
455
504
|
function findBundleById(id, options = {}) {
|
|
456
505
|
return listBundles(options).find((b) => b.id === id);
|
|
@@ -12,7 +12,8 @@ import { ADCPError } from "../../errors/index.mjs";
|
|
|
12
12
|
import { isAdcpVersionSupported } from "../../utils/adcp-version-config.mjs";
|
|
13
13
|
import { hasSchemaBundle, resolveBundleKey } from "../../validation/schema-loader.mjs";
|
|
14
14
|
import { synthesizeRequestSigningSteps } from "./request-signing/synthesize.mjs";
|
|
15
|
-
import {
|
|
15
|
+
import { invalidateRequestSigningVectorCache } from "./request-signing/vector-loader.mjs";
|
|
16
|
+
import { markStoryboardComplianceRoot, trustedStoryboardComplianceRoot } from "./provenance.mjs";
|
|
16
17
|
class CapabilityResolutionError extends ADCPError {
|
|
17
18
|
code;
|
|
18
19
|
specialism;
|
|
@@ -399,23 +400,71 @@ function listBundles(options = {}) {
|
|
|
399
400
|
}
|
|
400
401
|
return bundles;
|
|
401
402
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
403
|
+
const STORYBOARD_INDEX_CACHE_LIMIT = 8;
|
|
404
|
+
const storyboardIndexes = /* @__PURE__ */ new Map();
|
|
405
|
+
function customComplianceInventory(dir) {
|
|
406
|
+
if (!existsSync(dir)) return "missing";
|
|
407
|
+
const entries = [];
|
|
408
|
+
const visitedDirectories = /* @__PURE__ */ new Set();
|
|
409
|
+
const visit = (file, relative) => {
|
|
410
|
+
const stat = statSync(file, { bigint: true });
|
|
411
|
+
entries.push([relative, String(stat.mtimeNs), String(stat.ctimeNs), String(stat.size), String(stat.ino)]);
|
|
412
|
+
if (!stat.isDirectory()) return;
|
|
413
|
+
const identity = `${stat.dev}:${stat.ino}`;
|
|
414
|
+
if (visitedDirectories.has(identity)) return;
|
|
415
|
+
visitedDirectories.add(identity);
|
|
416
|
+
for (const child of readdirSync(file).sort()) visit(join(file, child), `${relative}/${child}`);
|
|
417
|
+
};
|
|
418
|
+
visit(dir, "");
|
|
419
|
+
return JSON.stringify(entries);
|
|
420
|
+
}
|
|
421
|
+
function complianceStoryboardIndex(options) {
|
|
422
|
+
const dir = resolve(getComplianceCacheDir(options));
|
|
423
|
+
const indexPath = join(dir, "index.json");
|
|
424
|
+
const stamp = existsSync(indexPath) ? statSync(indexPath) : void 0;
|
|
425
|
+
const schemaRoot = getConfiguredSchemaRoot(options);
|
|
426
|
+
const customRoot = Boolean(getConfiguredComplianceDir(options));
|
|
427
|
+
const inventory = customRoot ? customComplianceInventory(dir) : null;
|
|
428
|
+
const key = JSON.stringify([
|
|
429
|
+
dir,
|
|
430
|
+
options.version ?? ADCP_VERSION,
|
|
431
|
+
schemaRoot ? resolve(schemaRoot) : null,
|
|
432
|
+
options.hostedStableLineAlias ?? null,
|
|
433
|
+
stamp?.mtimeMs ?? null,
|
|
434
|
+
stamp?.size ?? null,
|
|
435
|
+
inventory
|
|
436
|
+
]);
|
|
437
|
+
const cached = storyboardIndexes.get(key);
|
|
438
|
+
if (cached) {
|
|
439
|
+
storyboardIndexes.delete(key);
|
|
440
|
+
storyboardIndexes.set(key, cached);
|
|
441
|
+
return cached;
|
|
442
|
+
}
|
|
443
|
+
if (customRoot) invalidateRequestSigningVectorCache(dir);
|
|
444
|
+
const indexed = /* @__PURE__ */ new Map();
|
|
445
|
+
for (const ref of listBundles({ ...options, complianceDir: dir })) {
|
|
446
|
+
for (const storyboard of loadBundleStoryboards(ref)) {
|
|
447
|
+
if (!indexed.has(storyboard.id)) indexed.set(storyboard.id, storyboard);
|
|
410
448
|
}
|
|
411
449
|
}
|
|
412
|
-
|
|
450
|
+
storyboardIndexes.set(key, indexed);
|
|
451
|
+
while (storyboardIndexes.size > STORYBOARD_INDEX_CACHE_LIMIT) {
|
|
452
|
+
const oldest = storyboardIndexes.keys().next().value;
|
|
453
|
+
if (oldest !== void 0) storyboardIndexes.delete(oldest);
|
|
454
|
+
}
|
|
455
|
+
return indexed;
|
|
456
|
+
}
|
|
457
|
+
function cloneComplianceStoryboard(storyboard) {
|
|
458
|
+
const copy = structuredClone(storyboard);
|
|
459
|
+
const trustedRoot = trustedStoryboardComplianceRoot(storyboard);
|
|
460
|
+
return trustedRoot ? markStoryboardComplianceRoot(copy, trustedRoot) : copy;
|
|
461
|
+
}
|
|
462
|
+
function listAllComplianceStoryboards(options = {}) {
|
|
463
|
+
return [...complianceStoryboardIndex(options).values()].map(cloneComplianceStoryboard);
|
|
413
464
|
}
|
|
414
465
|
function getComplianceStoryboardById(id, options = {}) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
}
|
|
418
|
-
return void 0;
|
|
466
|
+
const storyboard = complianceStoryboardIndex(options).get(id);
|
|
467
|
+
return storyboard ? cloneComplianceStoryboard(storyboard) : void 0;
|
|
419
468
|
}
|
|
420
469
|
function findBundleById(id, options = {}) {
|
|
421
470
|
return listBundles(options).find((b) => b.id === id);
|
|
@@ -34,6 +34,8 @@ export declare function signingProfileForAdcpVersion(version?: string): '3.2' |
|
|
|
34
34
|
export declare function loadRequestSigningVectors(options?: LoadVectorsOptions): LoadedVectors;
|
|
35
35
|
/** Load only the shared signing keyset, without requiring the grader vectors. */
|
|
36
36
|
export declare function loadRequestSigningKeys(options?: LoadVectorsOptions): TestKeyset;
|
|
37
|
+
/** Refresh only the signing fixtures belonging to a changed custom compliance root. */
|
|
38
|
+
export declare function invalidateRequestSigningVectorCache(complianceDir: string): void;
|
|
37
39
|
/** Test-only: clear the memoization cache so a fresh cache path is reread. */
|
|
38
40
|
export declare function __resetVectorCache(): void;
|
|
39
41
|
/** Where the A2A operation-resolution vectors came from. */
|
|
@@ -34,6 +34,8 @@ export declare function signingProfileForAdcpVersion(version?: string): '3.2' |
|
|
|
34
34
|
export declare function loadRequestSigningVectors(options?: LoadVectorsOptions): LoadedVectors;
|
|
35
35
|
/** Load only the shared signing keyset, without requiring the grader vectors. */
|
|
36
36
|
export declare function loadRequestSigningKeys(options?: LoadVectorsOptions): TestKeyset;
|
|
37
|
+
/** Refresh only the signing fixtures belonging to a changed custom compliance root. */
|
|
38
|
+
export declare function invalidateRequestSigningVectorCache(complianceDir: string): void;
|
|
37
39
|
/** Test-only: clear the memoization cache so a fresh cache path is reread. */
|
|
38
40
|
export declare function __resetVectorCache(): void;
|
|
39
41
|
/** Where the A2A operation-resolution vectors came from. */
|
|
@@ -22,6 +22,7 @@ __export(vector_loader_exports, {
|
|
|
22
22
|
A2A_VECTORS_UNAVAILABLE_MESSAGE: () => A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
23
23
|
__resetVectorCache: () => __resetVectorCache,
|
|
24
24
|
findKey: () => findKey,
|
|
25
|
+
invalidateRequestSigningVectorCache: () => invalidateRequestSigningVectorCache,
|
|
25
26
|
loadA2aOperationResolutionVectors: () => loadA2aOperationResolutionVectors,
|
|
26
27
|
loadRequestSigningKeys: () => loadRequestSigningKeys,
|
|
27
28
|
loadRequestSigningVectors: () => loadRequestSigningVectors,
|
|
@@ -95,6 +96,15 @@ function loadRequestSigningKeys(options = {}) {
|
|
|
95
96
|
const cacheDir = (0, import_compliance.getComplianceCacheDir)(options);
|
|
96
97
|
return loadKeys((0, import_path.join)(cacheDir, "test-vectors", "request-signing", "keys.json"));
|
|
97
98
|
}
|
|
99
|
+
function invalidateRequestSigningVectorCache(complianceDir) {
|
|
100
|
+
const sourceDir = (0, import_path.resolve)(complianceDir, "test-vectors", "request-signing");
|
|
101
|
+
for (const key of VECTOR_CACHE.keys()) {
|
|
102
|
+
if ((0, import_path.resolve)(key) === sourceDir) VECTOR_CACHE.delete(key);
|
|
103
|
+
}
|
|
104
|
+
for (const key of A2A_VECTOR_CACHE.keys()) {
|
|
105
|
+
if ((0, import_path.resolve)(key) === (0, import_path.join)(sourceDir, "a2a")) A2A_VECTOR_CACHE.delete(key);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
98
108
|
function __resetVectorCache() {
|
|
99
109
|
VECTOR_CACHE.clear();
|
|
100
110
|
A2A_VECTOR_CACHE.clear();
|
|
@@ -384,6 +394,7 @@ function strArray(v, where) {
|
|
|
384
394
|
A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
385
395
|
__resetVectorCache,
|
|
386
396
|
findKey,
|
|
397
|
+
invalidateRequestSigningVectorCache,
|
|
387
398
|
loadA2aOperationResolutionVectors,
|
|
388
399
|
loadRequestSigningKeys,
|
|
389
400
|
loadRequestSigningVectors,
|
|
@@ -69,6 +69,15 @@ function loadRequestSigningKeys(options = {}) {
|
|
|
69
69
|
const cacheDir = getComplianceCacheDir(options);
|
|
70
70
|
return loadKeys(join(cacheDir, "test-vectors", "request-signing", "keys.json"));
|
|
71
71
|
}
|
|
72
|
+
function invalidateRequestSigningVectorCache(complianceDir) {
|
|
73
|
+
const sourceDir = resolve(complianceDir, "test-vectors", "request-signing");
|
|
74
|
+
for (const key of VECTOR_CACHE.keys()) {
|
|
75
|
+
if (resolve(key) === sourceDir) VECTOR_CACHE.delete(key);
|
|
76
|
+
}
|
|
77
|
+
for (const key of A2A_VECTOR_CACHE.keys()) {
|
|
78
|
+
if (resolve(key) === join(sourceDir, "a2a")) A2A_VECTOR_CACHE.delete(key);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
72
81
|
function __resetVectorCache() {
|
|
73
82
|
VECTOR_CACHE.clear();
|
|
74
83
|
A2A_VECTOR_CACHE.clear();
|
|
@@ -357,6 +366,7 @@ export {
|
|
|
357
366
|
A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
358
367
|
__resetVectorCache,
|
|
359
368
|
findKey,
|
|
369
|
+
invalidateRequestSigningVectorCache,
|
|
360
370
|
loadA2aOperationResolutionVectors,
|
|
361
371
|
loadRequestSigningKeys,
|
|
362
372
|
loadRequestSigningVectors,
|
|
@@ -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 = "17.0.0-beta.
|
|
200
|
+
export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.2";
|
|
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 = "17.0.0-beta.
|
|
200
|
+
export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.2";
|
|
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
|
/**
|
|
@@ -1101,26 +1101,22 @@ export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'frida
|
|
|
1101
1101
|
export type DaypartTarget = {
|
|
1102
1102
|
/**
|
|
1103
1103
|
* Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
|
|
1104
|
-
*
|
|
1105
|
-
* @minItems 1
|
|
1106
1104
|
*/
|
|
1107
|
-
days:
|
|
1105
|
+
days: DayOfWeek[];
|
|
1108
1106
|
/**
|
|
1109
1107
|
* Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
|
|
1108
|
+
* @minimum 0
|
|
1109
|
+
* @maximum 23
|
|
1110
|
+
* @format int
|
|
1110
1111
|
*/
|
|
1111
|
-
start_hour
|
|
1112
|
+
start_hour: number;
|
|
1112
1113
|
/**
|
|
1113
1114
|
* End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
|
|
1115
|
+
* @minimum 1
|
|
1116
|
+
* @maximum 24
|
|
1117
|
+
* @format int
|
|
1114
1118
|
*/
|
|
1115
|
-
end_hour
|
|
1116
|
-
/**
|
|
1117
|
-
* Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
|
|
1118
|
-
*/
|
|
1119
|
-
start_time?: string;
|
|
1120
|
-
/**
|
|
1121
|
-
* Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
|
|
1122
|
-
*/
|
|
1123
|
-
end_time?: string;
|
|
1119
|
+
end_hour: number;
|
|
1124
1120
|
/**
|
|
1125
1121
|
* Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
|
|
1126
1122
|
*/
|
|
@@ -1129,29 +1125,23 @@ export type DaypartTarget = {
|
|
|
1129
1125
|
* Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
|
|
1130
1126
|
*/
|
|
1131
1127
|
label?: string;
|
|
1132
|
-
|
|
1128
|
+
start_time?: never;
|
|
1129
|
+
end_time?: never;
|
|
1130
|
+
} | {
|
|
1133
1131
|
/**
|
|
1134
1132
|
* Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
|
|
1135
|
-
*
|
|
1136
|
-
* @minItems 1
|
|
1137
|
-
*/
|
|
1138
|
-
days: [DayOfWeek, ...DayOfWeek[]];
|
|
1139
|
-
/**
|
|
1140
|
-
* Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
|
|
1141
|
-
*/
|
|
1142
|
-
start_hour?: number;
|
|
1143
|
-
/**
|
|
1144
|
-
* End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
|
|
1145
1133
|
*/
|
|
1146
|
-
|
|
1134
|
+
days: DayOfWeek[];
|
|
1147
1135
|
/**
|
|
1148
1136
|
* Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
|
|
1137
|
+
* @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
|
|
1149
1138
|
*/
|
|
1150
|
-
start_time
|
|
1139
|
+
start_time: string;
|
|
1151
1140
|
/**
|
|
1152
1141
|
* Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
|
|
1142
|
+
* @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
|
|
1153
1143
|
*/
|
|
1154
|
-
end_time
|
|
1144
|
+
end_time: string;
|
|
1155
1145
|
/**
|
|
1156
1146
|
* Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
|
|
1157
1147
|
*/
|
|
@@ -1160,7 +1150,9 @@ export type DaypartTarget = {
|
|
|
1160
1150
|
* Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
|
|
1161
1151
|
*/
|
|
1162
1152
|
label?: string;
|
|
1163
|
-
|
|
1153
|
+
start_hour?: never;
|
|
1154
|
+
end_hour?: never;
|
|
1155
|
+
};
|
|
1164
1156
|
|
|
1165
1157
|
/**
|
|
1166
1158
|
* Seller-authored integrity pin over one third-party-published definition that a proposal's commercial_terms reference: a publisher-catalog format option, publisher-catalog placement, adagents.json collection, or data-provider signal. content_digest is the lowercase-hex SHA-256 of the RFC 8785 (JCS) serialization of the kind's closed projection of the published entry, defined normatively in docs/media-buy/specification.mdx#definition-pins. Pins live inside commercial_terms, so terms_digest covers the pin but not the definition it names: a published definition can change while terms_digest still verifies, and re-verifying the pin is what detects it. Request inputs never carry pins.
|
|
@@ -31,4 +31,4 @@ export type AssetInstance = AssetVariant;
|
|
|
31
31
|
* switch-case helpers.
|
|
32
32
|
*/
|
|
33
33
|
export type AssetInstanceType = AssetInstance['asset_type'];
|
|
34
|
-
export type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, VideoBriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, DisplayTagAsset, };
|
|
34
|
+
export type { AssetVariant, ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, VideoBriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, DisplayTagAsset, };
|
|
@@ -31,4 +31,4 @@ export type AssetInstance = AssetVariant;
|
|
|
31
31
|
* switch-case helpers.
|
|
32
32
|
*/
|
|
33
33
|
export type AssetInstanceType = AssetInstance['asset_type'];
|
|
34
|
-
export type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, VideoBriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, DisplayTagAsset, };
|
|
34
|
+
export type { AssetVariant, ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, VideoBriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, DisplayTagAsset, };
|
|
@@ -1177,26 +1177,22 @@ export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'frida
|
|
|
1177
1177
|
export type DaypartTarget = {
|
|
1178
1178
|
/**
|
|
1179
1179
|
* Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
|
|
1180
|
-
*
|
|
1181
|
-
* @minItems 1
|
|
1182
1180
|
*/
|
|
1183
|
-
days:
|
|
1181
|
+
days: DayOfWeek[];
|
|
1184
1182
|
/**
|
|
1185
1183
|
* Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
|
|
1184
|
+
* @minimum 0
|
|
1185
|
+
* @maximum 23
|
|
1186
|
+
* @format int
|
|
1186
1187
|
*/
|
|
1187
|
-
start_hour
|
|
1188
|
+
start_hour: number;
|
|
1188
1189
|
/**
|
|
1189
1190
|
* End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
|
|
1191
|
+
* @minimum 1
|
|
1192
|
+
* @maximum 24
|
|
1193
|
+
* @format int
|
|
1190
1194
|
*/
|
|
1191
|
-
end_hour
|
|
1192
|
-
/**
|
|
1193
|
-
* Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
|
|
1194
|
-
*/
|
|
1195
|
-
start_time?: string;
|
|
1196
|
-
/**
|
|
1197
|
-
* Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
|
|
1198
|
-
*/
|
|
1199
|
-
end_time?: string;
|
|
1195
|
+
end_hour: number;
|
|
1200
1196
|
/**
|
|
1201
1197
|
* Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
|
|
1202
1198
|
*/
|
|
@@ -1205,29 +1201,23 @@ export type DaypartTarget = {
|
|
|
1205
1201
|
* Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
|
|
1206
1202
|
*/
|
|
1207
1203
|
label?: string;
|
|
1208
|
-
|
|
1204
|
+
start_time?: never;
|
|
1205
|
+
end_time?: never;
|
|
1206
|
+
} | {
|
|
1209
1207
|
/**
|
|
1210
1208
|
* Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
|
|
1211
|
-
*
|
|
1212
|
-
* @minItems 1
|
|
1213
|
-
*/
|
|
1214
|
-
days: [DayOfWeek, ...DayOfWeek[]];
|
|
1215
|
-
/**
|
|
1216
|
-
* Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
|
|
1217
|
-
*/
|
|
1218
|
-
start_hour?: number;
|
|
1219
|
-
/**
|
|
1220
|
-
* End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
|
|
1221
1209
|
*/
|
|
1222
|
-
|
|
1210
|
+
days: DayOfWeek[];
|
|
1223
1211
|
/**
|
|
1224
1212
|
* Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
|
|
1213
|
+
* @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
|
|
1225
1214
|
*/
|
|
1226
|
-
start_time
|
|
1215
|
+
start_time: string;
|
|
1227
1216
|
/**
|
|
1228
1217
|
* Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
|
|
1218
|
+
* @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
|
|
1229
1219
|
*/
|
|
1230
|
-
end_time
|
|
1220
|
+
end_time: string;
|
|
1231
1221
|
/**
|
|
1232
1222
|
* Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
|
|
1233
1223
|
*/
|
|
@@ -1236,7 +1226,9 @@ export type DaypartTarget = {
|
|
|
1236
1226
|
* Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
|
|
1237
1227
|
*/
|
|
1238
1228
|
label?: string;
|
|
1239
|
-
|
|
1229
|
+
start_hour?: never;
|
|
1230
|
+
end_hour?: never;
|
|
1231
|
+
};
|
|
1240
1232
|
|
|
1241
1233
|
/**
|
|
1242
1234
|
* Restrict delivery to specific time windows. Each entry specifies days of week, an hour range, and an optional timezone that defaults to inventory_local. A concrete IANA zone uses one shared civil-time clock, while inventory_local evaluates each inventory unit in its seller-assigned local timezone. Entries are independent and MAY use different clocks.
|
|
@@ -1608,26 +1608,22 @@ export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'frida
|
|
|
1608
1608
|
export type DaypartTarget = {
|
|
1609
1609
|
/**
|
|
1610
1610
|
* Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
|
|
1611
|
-
*
|
|
1612
|
-
* @minItems 1
|
|
1613
1611
|
*/
|
|
1614
|
-
days:
|
|
1612
|
+
days: DayOfWeek[];
|
|
1615
1613
|
/**
|
|
1616
1614
|
* Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
|
|
1615
|
+
* @minimum 0
|
|
1616
|
+
* @maximum 23
|
|
1617
|
+
* @format int
|
|
1617
1618
|
*/
|
|
1618
|
-
start_hour
|
|
1619
|
+
start_hour: number;
|
|
1619
1620
|
/**
|
|
1620
1621
|
* End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
|
|
1622
|
+
* @minimum 1
|
|
1623
|
+
* @maximum 24
|
|
1624
|
+
* @format int
|
|
1621
1625
|
*/
|
|
1622
|
-
end_hour
|
|
1623
|
-
/**
|
|
1624
|
-
* Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
|
|
1625
|
-
*/
|
|
1626
|
-
start_time?: string;
|
|
1627
|
-
/**
|
|
1628
|
-
* Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
|
|
1629
|
-
*/
|
|
1630
|
-
end_time?: string;
|
|
1626
|
+
end_hour: number;
|
|
1631
1627
|
/**
|
|
1632
1628
|
* Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
|
|
1633
1629
|
*/
|
|
@@ -1636,29 +1632,23 @@ export type DaypartTarget = {
|
|
|
1636
1632
|
* Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
|
|
1637
1633
|
*/
|
|
1638
1634
|
label?: string;
|
|
1639
|
-
|
|
1635
|
+
start_time?: never;
|
|
1636
|
+
end_time?: never;
|
|
1637
|
+
} | {
|
|
1640
1638
|
/**
|
|
1641
1639
|
* Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
|
|
1642
|
-
*
|
|
1643
|
-
* @minItems 1
|
|
1644
|
-
*/
|
|
1645
|
-
days: [DayOfWeek, ...DayOfWeek[]];
|
|
1646
|
-
/**
|
|
1647
|
-
* Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
|
|
1648
|
-
*/
|
|
1649
|
-
start_hour?: number;
|
|
1650
|
-
/**
|
|
1651
|
-
* End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
|
|
1652
1640
|
*/
|
|
1653
|
-
|
|
1641
|
+
days: DayOfWeek[];
|
|
1654
1642
|
/**
|
|
1655
1643
|
* Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
|
|
1644
|
+
* @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
|
|
1656
1645
|
*/
|
|
1657
|
-
start_time
|
|
1646
|
+
start_time: string;
|
|
1658
1647
|
/**
|
|
1659
1648
|
* Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
|
|
1649
|
+
* @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
|
|
1660
1650
|
*/
|
|
1661
|
-
end_time
|
|
1651
|
+
end_time: string;
|
|
1662
1652
|
/**
|
|
1663
1653
|
* Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
|
|
1664
1654
|
*/
|
|
@@ -1667,7 +1657,9 @@ export type DaypartTarget = {
|
|
|
1667
1657
|
* Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
|
|
1668
1658
|
*/
|
|
1669
1659
|
label?: string;
|
|
1670
|
-
|
|
1660
|
+
start_hour?: never;
|
|
1661
|
+
end_hour?: never;
|
|
1662
|
+
};
|
|
1671
1663
|
|
|
1672
1664
|
/**
|
|
1673
1665
|
* Seller-authored integrity pin over one third-party-published definition that a proposal's commercial_terms reference: a publisher-catalog format option, publisher-catalog placement, adagents.json collection, or data-provider signal. content_digest is the lowercase-hex SHA-256 of the RFC 8785 (JCS) serialization of the kind's closed projection of the published entry, defined normatively in docs/media-buy/specification.mdx#definition-pins. Pins live inside commercial_terms, so terms_digest covers the pin but not the definition it names: a published definition can change while terms_digest still verifies, and re-verifying the pin is what detects it. Request inputs never carry pins.
|