@adcp/sdk 8.1.0-beta.6 → 8.1.0-beta.8
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 +12 -0
- package/dist/lib/conformance/oracle.d.ts.map +1 -1
- package/dist/lib/conformance/oracle.js +8 -1
- package/dist/lib/conformance/oracle.js.map +1 -1
- package/dist/lib/conformance/schemaArbitrary.js +135 -9
- package/dist/lib/conformance/schemaArbitrary.js.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/create-adcp-server.d.ts +5 -0
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +41 -3
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/decisioning/capabilities.d.ts +8 -0
- package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.d.ts.map +1 -1
- package/dist/lib/server/decisioning/proposal/dispatch.js +2 -0
- package/dist/lib/server/decisioning/proposal/dispatch.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +14 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/responses.d.ts +1 -1
- package/dist/lib/server/responses.d.ts.map +1 -1
- package/dist/lib/server/responses.js +5 -2
- package/dist/lib/server/responses.js.map +1 -1
- package/dist/lib/signing/types.d.ts +6 -0
- package/dist/lib/signing/types.d.ts.map +1 -1
- package/dist/lib/signing/types.js.map +1 -1
- package/dist/lib/signing/verifier.d.ts.map +1 -1
- package/dist/lib/signing/verifier.js +33 -4
- package/dist/lib/signing/verifier.js.map +1 -1
- package/dist/lib/testing/storyboard/compliance.d.ts +1 -0
- package/dist/lib/testing/storyboard/compliance.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/compliance.js +8 -2
- package/dist/lib/testing/storyboard/compliance.js.map +1 -1
- package/dist/lib/testing/storyboard/index.d.ts +1 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js +3 -2
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/probes.js +3 -0
- package/dist/lib/testing/storyboard/probes.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +294 -29
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/types.d.ts +59 -0
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +4 -3
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +26 -2
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/types/activate-signal.d.ts +647 -0
- package/dist/lib/types/build-creative.d.ts +2105 -0
- package/dist/lib/types/calibrate-content.d.ts +675 -0
- package/dist/lib/types/check-governance.d.ts +619 -0
- package/dist/lib/types/comply-test-controller.d.ts +8428 -0
- package/dist/lib/types/core.generated.d.ts +180 -252
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +1 -1
- package/dist/lib/types/create-collection-list.d.ts +693 -0
- package/dist/lib/types/create-content-standards.d.ts +830 -0
- package/dist/lib/types/create-media-buy.d.ts +3374 -0
- package/dist/lib/types/create-property-list.d.ts +836 -0
- package/dist/lib/types/delete-collection-list.d.ts +497 -0
- package/dist/lib/types/delete-property-list.d.ts +497 -0
- package/dist/lib/types/get-account-financials.d.ts +624 -0
- package/dist/lib/types/get-adcp-capabilities.d.ts +2863 -0
- package/dist/lib/types/get-collection-list.d.ts +763 -0
- package/dist/lib/types/get-content-standards.d.ts +919 -0
- package/dist/lib/types/get-creative-delivery.d.ts +2219 -0
- package/dist/lib/types/get-creative-features.d.ts +1736 -0
- package/dist/lib/types/get-media-buy-artifacts.d.ts +864 -0
- package/dist/lib/types/get-media-buys.d.ts +1670 -0
- package/dist/lib/types/get-plan-audit-logs.d.ts +455 -0
- package/dist/lib/types/get-products.d.ts +4935 -0
- package/dist/lib/types/get-property-list.d.ts +874 -0
- package/dist/lib/types/get-signals.d.ts +986 -0
- package/dist/lib/types/list-accounts.d.ts +851 -0
- package/dist/lib/types/list-content-standards.d.ts +975 -0
- package/dist/lib/types/list-creative-formats.d.ts +3132 -0
- package/dist/lib/types/list-creatives.d.ts +2390 -0
- package/dist/lib/types/list-property-lists.d.ts +855 -0
- package/dist/lib/types/log-event.d.ts +373 -0
- package/dist/lib/types/per-tool-index.json +391 -0
- package/dist/lib/types/preview-creative.d.ts +1981 -0
- package/dist/lib/types/provide-performance-feedback.d.ts +218 -0
- package/dist/lib/types/report-plan-outcome.d.ts +433 -0
- package/dist/lib/types/report-usage.d.ts +579 -0
- package/dist/lib/types/schemas.generated.d.ts +127279 -125067
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +221 -293
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/si-get-offering.d.ts +259 -0
- package/dist/lib/types/si-initiate-session.d.ts +372 -0
- package/dist/lib/types/si-send-message.d.ts +300 -0
- package/dist/lib/types/si-terminate-session.d.ts +213 -0
- package/dist/lib/types/sync-accounts.d.ts +856 -0
- package/dist/lib/types/sync-audiences.d.ts +707 -0
- package/dist/lib/types/sync-catalogs.d.ts +766 -0
- package/dist/lib/types/sync-creatives.d.ts +2134 -0
- package/dist/lib/types/sync-event-sources.d.ts +665 -0
- package/dist/lib/types/sync-governance.d.ts +558 -0
- package/dist/lib/types/sync-plans.d.ts +979 -0
- package/dist/lib/types/update-collection-list.d.ts +697 -0
- package/dist/lib/types/update-content-standards.d.ts +847 -0
- package/dist/lib/types/update-media-buy.d.ts +3047 -0
- package/dist/lib/types/update-property-list.d.ts +840 -0
- package/dist/lib/types/validate-content-delivery.d.ts +722 -0
- package/dist/lib/types/validate-input.d.ts +1683 -0
- package/dist/lib/utils/response-schemas.js +1 -1
- package/dist/lib/utils/response-schemas.js.map +1 -1
- package/dist/lib/utils/response-unwrapper.d.ts.map +1 -1
- package/dist/lib/utils/response-unwrapper.js +18 -3
- package/dist/lib/utils/response-unwrapper.js.map +1 -1
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/examples/error-compliant-server.ts +1 -1
- package/examples/hello_seller_adapter_guaranteed.ts +8 -3
- package/examples/hello_seller_adapter_multi_tenant.ts +27 -23
- package/examples/hello_seller_adapter_non_guaranteed.ts +7 -3
- package/examples/hello_seller_adapter_proposal_mode.ts +22 -6
- package/examples/hello_signals_adapter_marketplace.ts +34 -3
- package/package.json +9 -2
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
// AUTO-GENERATED — DO NOT EDIT.
|
|
2
|
+
// Per-tool .d.ts slice for `check_governance`. Built from the published
|
|
3
|
+
// `tools.generated.d.ts` + `core.generated.d.ts` + `enums.generated.d.ts`
|
|
4
|
+
// by `scripts/generate-per-tool-types.ts`.
|
|
5
|
+
//
|
|
6
|
+
// Self-contained: imports nothing from the broader SDK. Adopters who
|
|
7
|
+
// import only this slice pay a fraction of the tsc cost of pulling in
|
|
8
|
+
// `@adcp/sdk` root — useful when strict + skipLibCheck:false adopters
|
|
9
|
+
// hit memory pressure on the full surface.
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Universal governance check for campaign actions. The governance agent infers the check type from the fields present: tool+payload = intent check (proposed, orchestrator-side). planned_delivery = execution check (committed, seller-side). governance_context maintains lifecycle continuity across either check type — its presence alone does not determine binding. To check budget availability without a specific action, omit tool and payload.
|
|
13
|
+
*/
|
|
14
|
+
export interface CheckGovernanceRequest {
|
|
15
|
+
/**
|
|
16
|
+
* Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.
|
|
17
|
+
*/
|
|
18
|
+
adcp_version?: string;
|
|
19
|
+
/**
|
|
20
|
+
* DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.
|
|
21
|
+
*/
|
|
22
|
+
adcp_major_version?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Campaign governance plan identifier. The plan uniquely scopes the account and operator; do not include a separate `account` field — the governance agent resolves account from the plan. Governance agents MUST treat any sibling `account` field as a contract violation and reject the request.
|
|
25
|
+
*/
|
|
26
|
+
plan_id: string;
|
|
27
|
+
/**
|
|
28
|
+
* URL of the agent making the request.
|
|
29
|
+
*/
|
|
30
|
+
caller: string;
|
|
31
|
+
purchase_type?: PurchaseType;
|
|
32
|
+
/**
|
|
33
|
+
* The AdCP tool being checked (e.g., 'create_media_buy', 'acquire_rights', 'activate_signal'). Present on intent checks (orchestrator). The governance agent uses the presence of tool+payload to identify an intent check.
|
|
34
|
+
*/
|
|
35
|
+
tool?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The full tool arguments as they would be sent to the seller. Present on intent checks. The governance agent can inspect any field to validate against the plan.
|
|
38
|
+
*/
|
|
39
|
+
payload?: {};
|
|
40
|
+
/**
|
|
41
|
+
* Governance context token from a prior check_governance response. Pass this on subsequent checks for the same governed action so the governance agent can maintain continuity across the lifecycle. In 3.0 governance agents MUST emit a compact JWS per the AdCP JWS profile (see Security — Signed Governance Context); callers persist and forward the value verbatim.
|
|
42
|
+
* @minLength 1
|
|
43
|
+
* @maxLength 4096
|
|
44
|
+
* @pattern ^[\x20-\x7E]+$
|
|
45
|
+
*/
|
|
46
|
+
governance_context?: string;
|
|
47
|
+
phase?: GovernancePhase;
|
|
48
|
+
planned_delivery?: PlannedDelivery;
|
|
49
|
+
/**
|
|
50
|
+
* Actual delivery performance data. MUST be present for 'delivery' phase. The governance agent compares these metrics against the planned delivery to detect drift.
|
|
51
|
+
*/
|
|
52
|
+
delivery_metrics?: {
|
|
53
|
+
/**
|
|
54
|
+
* Start and end timestamps for the reporting window.
|
|
55
|
+
*/
|
|
56
|
+
reporting_period: {
|
|
57
|
+
/**
|
|
58
|
+
* @format date-time
|
|
59
|
+
*/
|
|
60
|
+
start: string;
|
|
61
|
+
/**
|
|
62
|
+
* @format date-time
|
|
63
|
+
*/
|
|
64
|
+
end: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Total spend during the reporting period.
|
|
68
|
+
* @minimum 0
|
|
69
|
+
*/
|
|
70
|
+
spend?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Total spend since the governed action started.
|
|
73
|
+
* @minimum 0
|
|
74
|
+
*/
|
|
75
|
+
cumulative_spend?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Impressions delivered during the reporting period.
|
|
78
|
+
* @minimum 0
|
|
79
|
+
*/
|
|
80
|
+
impressions?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Total impressions since the governed action started.
|
|
83
|
+
* @minimum 0
|
|
84
|
+
*/
|
|
85
|
+
cumulative_impressions?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Actual geographic distribution. Keys are ISO 3166-1 alpha-2 codes, values are percentages.
|
|
88
|
+
*/
|
|
89
|
+
geo_distribution?: {
|
|
90
|
+
/**
|
|
91
|
+
* @minimum 0
|
|
92
|
+
* @maximum 100
|
|
93
|
+
*/
|
|
94
|
+
[k: string]: number | undefined;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Actual channel distribution. Keys are channel enum values, values are percentages.
|
|
98
|
+
*/
|
|
99
|
+
channel_distribution?: {
|
|
100
|
+
/**
|
|
101
|
+
* @minimum 0
|
|
102
|
+
* @maximum 100
|
|
103
|
+
*/
|
|
104
|
+
[k: string]: number | undefined;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Whether delivery is ahead of, on track with, or behind the planned pace.
|
|
108
|
+
*/
|
|
109
|
+
pacing?: 'ahead' | 'on_track' | 'behind';
|
|
110
|
+
/**
|
|
111
|
+
* Actual audience composition during the reporting period. Enables mid-flight drift detection when actual delivery skews from planned audience targeting.
|
|
112
|
+
*/
|
|
113
|
+
audience_distribution?: {
|
|
114
|
+
/**
|
|
115
|
+
* Population baseline used for index calculation. 'census': national census or equivalent population data. 'platform': the seller's active user base. 'custom': a custom baseline defined by the seller (describe in baseline_description).
|
|
116
|
+
*/
|
|
117
|
+
baseline: 'census' | 'platform' | 'custom';
|
|
118
|
+
/**
|
|
119
|
+
* Description of the baseline when baseline is 'custom' (e.g., 'US adults 18+ with broadband access').
|
|
120
|
+
*/
|
|
121
|
+
baseline_description?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Audience index values for the current reporting period. Keys are seller-defined dimension:value strings (e.g., 'age:25-34', 'gender:female', 'income:high'). The protocol does not mandate a taxonomy — dimensions and value labels vary by seller. Values are index relative to the declared baseline (1.0 = at parity, >1.0 = over-indexed, <1.0 = under-indexed).
|
|
124
|
+
*/
|
|
125
|
+
indices: {
|
|
126
|
+
/**
|
|
127
|
+
* @minimum 0
|
|
128
|
+
*/
|
|
129
|
+
[k: string]: number | undefined;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Cumulative audience index values since the governed action started. Same key format as indices (dimension:value). Use for detecting sustained bias drift that may not appear in a single reporting period.
|
|
133
|
+
*/
|
|
134
|
+
cumulative_indices?: {
|
|
135
|
+
/**
|
|
136
|
+
* @minimum 0
|
|
137
|
+
*/
|
|
138
|
+
[k: string]: number | undefined;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Human-readable summary of what changed. SHOULD be present for 'modification' phase.
|
|
144
|
+
* @maxLength 1000
|
|
145
|
+
*/
|
|
146
|
+
modification_summary?: string;
|
|
147
|
+
invoice_recipient?: BusinessEntity;
|
|
148
|
+
context?: ContextObject;
|
|
149
|
+
ext?: ExtensionObject;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Governance agent's response to a check request. Returns whether the action is approved under the governance plan.
|
|
154
|
+
*/
|
|
155
|
+
export interface CheckGovernanceResponse {
|
|
156
|
+
/**
|
|
157
|
+
* Release-precision AdCP version (VERSION.RELEASE, e.g. "3.0", "3.1", "3.1-beta"). On a request: the buyer's release pin — the seller validates against its supported_versions and returns VERSION_UNSUPPORTED on cross-major mismatch, or downshifts to the highest supported release within the same major. On a response: the release the seller actually served — clients SHOULD validate the response against that release's schema, not against their pin. Patches are not negotiated; surface them as build_version on capabilities for operational visibility. When omitted, falls back to adcp_major_version (deprecated) or server default. Buyers SHOULD emit both adcp_version and adcp_major_version through 3.x to remain compatible with sellers that only read the legacy field. NORMALIZATION: SDKs that read full-semver values from bundle metadata (e.g. ComplianceIndex.published_version = "3.1.0-beta.1") MUST normalize to release-precision ("3.1-beta.1") before emitting on the wire — meta-field values are NOT valid wire values.
|
|
158
|
+
*/
|
|
159
|
+
adcp_version?: string;
|
|
160
|
+
/**
|
|
161
|
+
* DEPRECATED in favor of adcp_version (release-precision string). Servers MUST continue to honor this field through 3.x. Removed in 4.0. Original semantics: the AdCP major version the buyer's payloads conform to. Sellers validate against their supported major_versions and return VERSION_UNSUPPORTED if unsupported. When omitted, the seller assumes its highest supported version.
|
|
162
|
+
*/
|
|
163
|
+
adcp_major_version?: number;
|
|
164
|
+
/**
|
|
165
|
+
* Unique identifier for this governance check record. Use in report_plan_outcome to link outcomes to the check that authorized them.
|
|
166
|
+
*/
|
|
167
|
+
check_id: string;
|
|
168
|
+
verdict: GovernanceDecision;
|
|
169
|
+
/**
|
|
170
|
+
* Echoed from request.
|
|
171
|
+
*/
|
|
172
|
+
plan_id: string;
|
|
173
|
+
/**
|
|
174
|
+
* Human-readable explanation of the governance decision.
|
|
175
|
+
*/
|
|
176
|
+
explanation: string;
|
|
177
|
+
/**
|
|
178
|
+
* Specific issues found during the governance check. Present when verdict is 'denied' or 'conditions'. MAY also be present on 'approved' for informational findings (e.g., budget approaching limit).
|
|
179
|
+
*/
|
|
180
|
+
findings?: {
|
|
181
|
+
/**
|
|
182
|
+
* Validation category that flagged the issue (e.g., 'budget_compliance', 'regulatory_compliance', 'brand_safety'). This is an **agent-internal** taxonomy: the string is defined by the governance agent's own policy model and is not constrained to any protocol-level enum. Sellers and buyers MUST NOT pattern-match `category_id` values against a fixed list — treat them as opaque labels with human-readable significance for audit but no machine-level contract. See the Campaign Governance specification for how an agent composes internal specialist review behind one endpoint.
|
|
183
|
+
*/
|
|
184
|
+
category_id: string;
|
|
185
|
+
/**
|
|
186
|
+
* ID of the policy that triggered this finding. May reference a registry policy (with source: registry) or a bespoke inline policy (with source: inline). Bespoke policy_ids are unique within their authoring container; use source_plan_id when findings aggregate across multiple plans (e.g., portfolio evaluations). When the violation traces to a producer-tagged surface (feature-requirement, creative-feature-result, or validation-result feature) carrying policy_id, governance agents SHOULD echo that policy_id here for end-to-end traceability, and MUST NOT invent a policy_id that wasn't present on the originating surface. See /docs/governance/policy-attribution.
|
|
187
|
+
*/
|
|
188
|
+
policy_id?: string;
|
|
189
|
+
/**
|
|
190
|
+
* For portfolio or aggregated evaluations where findings draw on bespoke policies from multiple member plans: identifies the plan whose policy triggered this finding. Omit when the finding's policy_id is unambiguous within the response context (e.g., single-plan check_governance).
|
|
191
|
+
*/
|
|
192
|
+
source_plan_id?: string;
|
|
193
|
+
severity: EscalationSeverity;
|
|
194
|
+
/**
|
|
195
|
+
* Human-readable description of the issue.
|
|
196
|
+
*/
|
|
197
|
+
explanation: string;
|
|
198
|
+
/**
|
|
199
|
+
* Structured details for programmatic consumption.
|
|
200
|
+
*/
|
|
201
|
+
details?: {};
|
|
202
|
+
/**
|
|
203
|
+
* Confidence score (0-1) in this finding. Distinguishes 'this definitely violates the policy' (0.95) from 'this might violate depending on how audience segments resolve' (0.6). When absent, the finding is presented without a confidence qualifier.
|
|
204
|
+
* @minimum 0
|
|
205
|
+
* @maximum 1
|
|
206
|
+
*/
|
|
207
|
+
confidence?: number;
|
|
208
|
+
/**
|
|
209
|
+
* Explanation of why confidence is below 1.0 (e.g., 'Targeting includes regions that partially overlap jurisdiction boundaries'). Present when confidence is below a governance-agent-defined threshold.
|
|
210
|
+
*/
|
|
211
|
+
uncertainty_reason?: string;
|
|
212
|
+
}[];
|
|
213
|
+
/**
|
|
214
|
+
* Present when verdict is 'conditions'. Specific adjustments the caller must make. After applying conditions, the caller MUST re-call check_governance with the adjusted parameters before proceeding.
|
|
215
|
+
*/
|
|
216
|
+
conditions?: {
|
|
217
|
+
/**
|
|
218
|
+
* Dot-path to the field that needs adjustment (in payload for proposed, in planned_delivery for committed).
|
|
219
|
+
*/
|
|
220
|
+
field: string;
|
|
221
|
+
/**
|
|
222
|
+
* The value the field must have for approval. When present, the condition is machine-actionable. When absent, the condition is advisory.
|
|
223
|
+
*/
|
|
224
|
+
required_value?: unknown;
|
|
225
|
+
/**
|
|
226
|
+
* Why this condition is required.
|
|
227
|
+
*/
|
|
228
|
+
reason: string;
|
|
229
|
+
}[];
|
|
230
|
+
/**
|
|
231
|
+
* When this approval expires. Present when verdict is 'approved' or 'conditions'. The caller must act before this time or re-call check_governance. A lapsed approval is no approval.
|
|
232
|
+
* @format date-time
|
|
233
|
+
*/
|
|
234
|
+
expires_at?: string;
|
|
235
|
+
/**
|
|
236
|
+
* When the seller should next call check_governance with delivery metrics. Present when the governance agent expects ongoing delivery reporting.
|
|
237
|
+
* @format date-time
|
|
238
|
+
*/
|
|
239
|
+
next_check?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Governance categories evaluated during this check. Each value is an **agent-internal** label (e.g., `budget_authority`, `regulatory_compliance`, or any internal-reviewer key the agent's policy model defines) — not a protocol-level enum. Since one governance agent per account composes all specialist review behind its single endpoint, `categories_evaluated` is how that internal decomposition surfaces to auditors. Consumers MUST treat values as opaque labels for display and audit, not as a machine-level contract.
|
|
242
|
+
*/
|
|
243
|
+
categories_evaluated?: string[];
|
|
244
|
+
/**
|
|
245
|
+
* Policy IDs evaluated during this check. Includes registry policy IDs (resolved via the policy registry) and any inline `policy_id`s declared in the plan's `custom_policies`.
|
|
246
|
+
*/
|
|
247
|
+
policies_evaluated?: string[];
|
|
248
|
+
mode?: GovernanceMode;
|
|
249
|
+
/**
|
|
250
|
+
* Governance context token for this governed action. The buyer MUST attach this to the protocol envelope when sending the purchase request (media buy, rights acquisition, signal activation) to the seller. The seller MUST persist it and include it on all subsequent check_governance calls for this action's lifecycle.
|
|
251
|
+
*
|
|
252
|
+
* Value format: in 3.0 governance agents MUST emit a compact JWS per the AdCP JWS profile (see Security — Signed Governance Context). Sellers MAY verify; sellers that do not verify MUST persist and forward the token unchanged so auditors can verify downstream. In 3.1 all sellers MUST verify per the checklist. Non-JWS values from pre-3.0 governance agents are deprecated and will be rejected in 3.1.
|
|
253
|
+
*
|
|
254
|
+
* Sellers that implement verification MUST verify signature, `aud`, `exp`, `jti` replay, and revocation per the profile before treating the request as governance-approved. This is the primary correlation key for audit and reporting across the governance lifecycle — the governance agent decodes its own signed token to look up internal plan state (buyer correlation IDs, policy decision log, etc.).
|
|
255
|
+
* @minLength 1
|
|
256
|
+
* @maxLength 4096
|
|
257
|
+
* @pattern ^[\x20-\x7E]+$
|
|
258
|
+
*/
|
|
259
|
+
governance_context?: string;
|
|
260
|
+
context?: ContextObject;
|
|
261
|
+
ext?: ExtensionObject;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Selects an audience by signal reference or natural language description. Uses 'type' as the primary discriminator (signal vs description). Signal selectors additionally use 'value_type' to determine the targeting expression format (matching signal-targeting.json variants).
|
|
266
|
+
*/
|
|
267
|
+
export type AudienceSelector = {
|
|
268
|
+
/**
|
|
269
|
+
* Discriminator for signal-based selectors
|
|
270
|
+
*/
|
|
271
|
+
type: 'signal';
|
|
272
|
+
signal_id: SignalID;
|
|
273
|
+
/**
|
|
274
|
+
* Discriminator for binary signals
|
|
275
|
+
*/
|
|
276
|
+
value_type: 'binary';
|
|
277
|
+
/**
|
|
278
|
+
* Whether to include (true) or exclude (false) users matching this signal
|
|
279
|
+
*/
|
|
280
|
+
value: boolean;
|
|
281
|
+
} | {
|
|
282
|
+
/**
|
|
283
|
+
* Discriminator for signal-based selectors
|
|
284
|
+
*/
|
|
285
|
+
type: 'signal';
|
|
286
|
+
signal_id: SignalID;
|
|
287
|
+
/**
|
|
288
|
+
* Discriminator for categorical signals
|
|
289
|
+
*/
|
|
290
|
+
value_type: 'categorical';
|
|
291
|
+
/**
|
|
292
|
+
* Values to target. Users with any of these values will be included.
|
|
293
|
+
*/
|
|
294
|
+
values: string[];
|
|
295
|
+
} | {
|
|
296
|
+
/**
|
|
297
|
+
* Discriminator for signal-based selectors
|
|
298
|
+
*/
|
|
299
|
+
type: 'signal';
|
|
300
|
+
signal_id: SignalID;
|
|
301
|
+
/**
|
|
302
|
+
* Discriminator for numeric signals
|
|
303
|
+
*/
|
|
304
|
+
value_type: 'numeric';
|
|
305
|
+
/**
|
|
306
|
+
* Minimum value (inclusive). Omit for no minimum. Must be <= max_value when both are provided.
|
|
307
|
+
*/
|
|
308
|
+
min_value?: number;
|
|
309
|
+
/**
|
|
310
|
+
* Maximum value (inclusive). Omit for no maximum. Must be >= min_value when both are provided.
|
|
311
|
+
*/
|
|
312
|
+
max_value?: number;
|
|
313
|
+
} | {
|
|
314
|
+
/**
|
|
315
|
+
* Discriminator for description-based selectors
|
|
316
|
+
*/
|
|
317
|
+
type: 'description';
|
|
318
|
+
/**
|
|
319
|
+
* Natural language description of the audience (e.g., 'likely EV buyers', 'high net worth individuals', 'vulnerable communities')
|
|
320
|
+
* @minLength 1
|
|
321
|
+
* @maxLength 2000
|
|
322
|
+
*/
|
|
323
|
+
description: string;
|
|
324
|
+
/**
|
|
325
|
+
* Optional grouping hint for the governance agent (e.g., 'demographic', 'behavioral', 'contextual', 'financial')
|
|
326
|
+
*/
|
|
327
|
+
category?: string;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Override the account's default billing entity for this specific buy. When provided, the seller invoices this entity instead. The seller MUST validate the invoice recipient is authorized for this account. When governance_agents are configured, the seller MUST include invoice_recipient in the check_governance request.
|
|
332
|
+
*/
|
|
333
|
+
export interface BusinessEntity {
|
|
334
|
+
/**
|
|
335
|
+
* Registered legal name of the business entity
|
|
336
|
+
* @maxLength 200
|
|
337
|
+
*/
|
|
338
|
+
legal_name: string;
|
|
339
|
+
/**
|
|
340
|
+
* VAT identification number (e.g., DE123456789 for Germany, FR12345678901 for France). Required for B2B invoicing in the EU. Must be normalized: no spaces, dots, or dashes.
|
|
341
|
+
* @pattern ^[A-Z]{2}[A-Z0-9]{2,13}$
|
|
342
|
+
*/
|
|
343
|
+
vat_id?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Tax identification number for jurisdictions that do not use VAT (e.g., US EIN)
|
|
346
|
+
* @maxLength 30
|
|
347
|
+
*/
|
|
348
|
+
tax_id?: string;
|
|
349
|
+
/**
|
|
350
|
+
* Company registration number (e.g., HRB 12345 for German Handelsregister)
|
|
351
|
+
* @maxLength 50
|
|
352
|
+
*/
|
|
353
|
+
registration_number?: string;
|
|
354
|
+
/**
|
|
355
|
+
* Postal address for invoicing and legal correspondence
|
|
356
|
+
*/
|
|
357
|
+
address?: {
|
|
358
|
+
/**
|
|
359
|
+
* Street address including building number
|
|
360
|
+
* @maxLength 200
|
|
361
|
+
*/
|
|
362
|
+
street: string;
|
|
363
|
+
/**
|
|
364
|
+
* @maxLength 100
|
|
365
|
+
*/
|
|
366
|
+
city: string;
|
|
367
|
+
/**
|
|
368
|
+
* @maxLength 20
|
|
369
|
+
*/
|
|
370
|
+
postal_code: string;
|
|
371
|
+
/**
|
|
372
|
+
* State, province, or region
|
|
373
|
+
* @maxLength 100
|
|
374
|
+
*/
|
|
375
|
+
region?: string;
|
|
376
|
+
/**
|
|
377
|
+
* ISO 3166-1 alpha-2 country code
|
|
378
|
+
* @pattern ^[A-Z]{2}$
|
|
379
|
+
*/
|
|
380
|
+
country: string;
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Contacts for billing, legal, and operational matters. Contains personal data subject to GDPR and equivalent regulations. Implementations MUST use this data only for invoicing and account management.
|
|
384
|
+
*/
|
|
385
|
+
contacts?: {
|
|
386
|
+
/**
|
|
387
|
+
* Contact's functional role in the business relationship
|
|
388
|
+
*/
|
|
389
|
+
role: 'billing' | 'legal' | 'creative' | 'general';
|
|
390
|
+
/**
|
|
391
|
+
* Full name of the contact
|
|
392
|
+
* @maxLength 200
|
|
393
|
+
*/
|
|
394
|
+
name?: string;
|
|
395
|
+
/**
|
|
396
|
+
* @maxLength 254
|
|
397
|
+
* @format email
|
|
398
|
+
*/
|
|
399
|
+
email?: string;
|
|
400
|
+
/**
|
|
401
|
+
* @maxLength 30
|
|
402
|
+
*/
|
|
403
|
+
phone?: string;
|
|
404
|
+
}[];
|
|
405
|
+
/**
|
|
406
|
+
* Bank account details for payment processing. Write-only: included in requests to provide payment coordinates, but MUST NOT be echoed in responses. Sellers store these details and confirm receipt without returning them.
|
|
407
|
+
*/
|
|
408
|
+
bank?: {
|
|
409
|
+
/**
|
|
410
|
+
* Name on the bank account
|
|
411
|
+
* @maxLength 200
|
|
412
|
+
*/
|
|
413
|
+
account_holder: string;
|
|
414
|
+
/**
|
|
415
|
+
* International Bank Account Number (SEPA markets)
|
|
416
|
+
* @pattern ^[A-Z]{2}[0-9]{2}[A-Z0-9]{4,30}$
|
|
417
|
+
*/
|
|
418
|
+
iban?: string;
|
|
419
|
+
/**
|
|
420
|
+
* Bank Identifier Code / SWIFT code (SEPA markets)
|
|
421
|
+
* @pattern ^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$
|
|
422
|
+
*/
|
|
423
|
+
bic?: string;
|
|
424
|
+
/**
|
|
425
|
+
* Bank routing number for non-SEPA markets (e.g., US ABA routing number, Canadian transit/institution number)
|
|
426
|
+
* @maxLength 30
|
|
427
|
+
*/
|
|
428
|
+
routing_number?: string;
|
|
429
|
+
/**
|
|
430
|
+
* Bank account number for non-SEPA markets
|
|
431
|
+
* @maxLength 30
|
|
432
|
+
*/
|
|
433
|
+
account_number?: string;
|
|
434
|
+
};
|
|
435
|
+
ext?: ExtensionObject;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Opaque correlation data that is echoed unchanged in responses. Used for internal tracking, UI session IDs, trace IDs, and other caller-specific identifiers that don't affect protocol behavior. Context data is never parsed by AdCP agents - it's simply preserved and returned.
|
|
440
|
+
*/
|
|
441
|
+
export interface ContextObject {
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* A time duration expressed as an interval and unit. Used for frequency cap windows, attribution windows, reach optimization windows, time budgets, and other time-based settings. When unit is 'campaign', interval must be 1 — the window spans the full campaign flight.
|
|
446
|
+
*/
|
|
447
|
+
export interface Duration {
|
|
448
|
+
/**
|
|
449
|
+
* Number of time units. Must be 1 when unit is 'campaign'.
|
|
450
|
+
* @minimum 1
|
|
451
|
+
*/
|
|
452
|
+
interval: number;
|
|
453
|
+
/**
|
|
454
|
+
* Time unit. 'seconds' for sub-minute precision. 'campaign' spans the full campaign flight.
|
|
455
|
+
*/
|
|
456
|
+
unit: 'seconds' | 'minutes' | 'hours' | 'days' | 'campaign';
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Finding severity.
|
|
461
|
+
*/
|
|
462
|
+
export type EscalationSeverity = 'info' | 'warning' | 'critical';
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Extension object for platform-specific, vendor-namespaced parameters. Extensions are always optional and must be namespaced under a vendor/platform key (e.g., ext.gam, ext.roku). Used for custom capabilities, partner-specific configuration, and features being proposed for standardization.
|
|
466
|
+
*/
|
|
467
|
+
export interface ExtensionObject {
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Frequency capping settings for package-level application. Two types of frequency control can be used independently or together: suppress enforces a cooldown between consecutive exposures; max_impressions + per + window caps total exposures per entity in a time window. When both suppress and max_impressions are set, an impression is delivered only if both constraints permit it (AND semantics). At least one of suppress, suppress_minutes, or max_impressions must be set.
|
|
472
|
+
*/
|
|
473
|
+
export type FrequencyCap = {
|
|
474
|
+
[k: string]: unknown | undefined;
|
|
475
|
+
} & {
|
|
476
|
+
/**
|
|
477
|
+
* Cooldown period between consecutive exposures to the same entity. Prevents back-to-back ad delivery (e.g. {"interval": 60, "unit": "minutes"} for a 1-hour cooldown). Preferred over suppress_minutes.
|
|
478
|
+
*/
|
|
479
|
+
suppress?: Duration;
|
|
480
|
+
/**
|
|
481
|
+
* Deprecated — use suppress instead. Cooldown period in minutes between consecutive exposures to the same entity (e.g. 60 for a 1-hour cooldown).
|
|
482
|
+
* @minimum 0
|
|
483
|
+
*/
|
|
484
|
+
suppress_minutes?: number;
|
|
485
|
+
/**
|
|
486
|
+
* Maximum number of impressions per entity per window. For duration windows, implementations typically use a rolling window; 'campaign' applies a fixed cap across the full flight.
|
|
487
|
+
* @minimum 1
|
|
488
|
+
*/
|
|
489
|
+
max_impressions?: number;
|
|
490
|
+
/**
|
|
491
|
+
* Entity granularity for impression counting. Required when max_impressions is set.
|
|
492
|
+
*/
|
|
493
|
+
per?: ReachUnit;
|
|
494
|
+
/**
|
|
495
|
+
* Time window for the max_impressions cap (e.g. {"interval": 7, "unit": "days"} or {"interval": 1, "unit": "campaign"} for the full flight). Required when max_impressions is set.
|
|
496
|
+
*/
|
|
497
|
+
window?: Duration;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Governance verdict (present for check entries). Renamed from `status` in 3.1 alongside check-governance-response for vocabulary consistency.
|
|
502
|
+
*/
|
|
503
|
+
export type GovernanceDecision = 'approved' | 'denied' | 'conditions';
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Governance mode active at the moment this specific check was evaluated. Governance agents SHOULD populate this field on check entries, recording the mode from their runtime configuration at the moment check_governance was processed — not derived from a plan field. This is a per-check value: if the operator changes mode between checks for the same governed action, each entry records the mode active for that entry. A future `governed_actions[].mode` field would describe the action's current mode, which may differ from the most recent entry's `mode` if the plan has since been re-synced. Absent for outcome entries and for pre-3.1 governance agents that do not surface mode on audit responses.
|
|
507
|
+
*/
|
|
508
|
+
export type GovernanceMode = 'audit' | 'advisory' | 'enforce';
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* The phase of the governed action's lifecycle. 'purchase': initial commitment (create_media_buy, acquire_rights, activate_signal). 'modification': update to existing commitment. 'delivery': periodic delivery or usage reporting. Defaults to 'purchase' if omitted.
|
|
512
|
+
*/
|
|
513
|
+
export type GovernancePhase = 'purchase' | 'modification' | 'delivery';
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Standardized advertising media channels describing how buyers allocate budget. Channels are planning abstractions, not technical substrates. See the Media Channel Taxonomy specification for detailed definitions.
|
|
517
|
+
*/
|
|
518
|
+
export type MediaChannel = 'display' | 'olv' | 'social' | 'search' | 'ctv' | 'linear_tv' | 'radio' | 'streaming_audio' | 'podcast' | 'dooh' | 'ooh' | 'print' | 'cinema' | 'email' | 'gaming' | 'retail_media' | 'influencer' | 'affiliate' | 'product_placement' | 'sponsored_intelligence';
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* The seller's interpreted delivery parameters. Describes what the seller will actually run -- geo, channels, flight dates, frequency caps, and budget. Present when the account has governance_agents or when the seller chooses to provide delivery transparency.
|
|
522
|
+
*/
|
|
523
|
+
export interface PlannedDelivery {
|
|
524
|
+
/**
|
|
525
|
+
* Geographic targeting the seller will apply.
|
|
526
|
+
*/
|
|
527
|
+
geo?: {
|
|
528
|
+
/**
|
|
529
|
+
* ISO 3166-1 alpha-2 country codes where ads will deliver.
|
|
530
|
+
*/
|
|
531
|
+
countries?: string[];
|
|
532
|
+
/**
|
|
533
|
+
* ISO 3166-2 subdivision codes where ads will deliver.
|
|
534
|
+
*/
|
|
535
|
+
regions?: string[];
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* Channels the seller will deliver on.
|
|
539
|
+
*/
|
|
540
|
+
channels?: MediaChannel[];
|
|
541
|
+
/**
|
|
542
|
+
* Actual flight start the seller will use.
|
|
543
|
+
* @format date-time
|
|
544
|
+
*/
|
|
545
|
+
start_time?: string;
|
|
546
|
+
/**
|
|
547
|
+
* Actual flight end the seller will use.
|
|
548
|
+
* @format date-time
|
|
549
|
+
*/
|
|
550
|
+
end_time?: string;
|
|
551
|
+
frequency_cap?: FrequencyCap;
|
|
552
|
+
/**
|
|
553
|
+
* Human-readable summary of the audience the seller will target.
|
|
554
|
+
*/
|
|
555
|
+
audience_summary?: string;
|
|
556
|
+
/**
|
|
557
|
+
* Structured audience targeting the seller will activate. Each entry is either a signal reference or a descriptive criterion. When present, governance agents MUST use this for bias/fairness validation and SHOULD ignore audience_summary for validation purposes. The audience_summary field is a human-readable rendering of this array, not an independent declaration.
|
|
558
|
+
*/
|
|
559
|
+
audience_targeting?: AudienceSelector[];
|
|
560
|
+
/**
|
|
561
|
+
* Total budget the seller will deliver against.
|
|
562
|
+
* @minimum 0
|
|
563
|
+
*/
|
|
564
|
+
total_budget?: number;
|
|
565
|
+
/**
|
|
566
|
+
* ISO 4217 currency code for the budget.
|
|
567
|
+
* @pattern ^[A-Z]{3}$
|
|
568
|
+
*/
|
|
569
|
+
currency?: string;
|
|
570
|
+
/**
|
|
571
|
+
* Registry policy IDs the seller will enforce for this delivery.
|
|
572
|
+
*/
|
|
573
|
+
enforced_policies?: string[];
|
|
574
|
+
ext?: ExtensionObject;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* The type of financial commitment this outcome is for. Determines which budget allocation (if any) to charge against. Defaults to 'media_buy' when omitted.
|
|
579
|
+
*/
|
|
580
|
+
export type PurchaseType = 'media_buy' | 'rights_license' | 'signal_activation' | 'creative_services';
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Unit of measurement for reach and audience_size metrics in this forecast. Required for cross-channel forecast comparison.
|
|
584
|
+
*/
|
|
585
|
+
export type ReachUnit = 'individuals' | 'households' | 'devices' | 'accounts' | 'cookies' | 'custom';
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The signal to target
|
|
589
|
+
*/
|
|
590
|
+
export type SignalID = {
|
|
591
|
+
/**
|
|
592
|
+
* Discriminator indicating this signal is from a data provider's published catalog
|
|
593
|
+
*/
|
|
594
|
+
source: 'catalog';
|
|
595
|
+
/**
|
|
596
|
+
* Domain of the data provider that owns this signal (e.g., 'polk.com', 'experian.com'). The signal definition is published at this domain's /.well-known/adagents.json
|
|
597
|
+
* @pattern ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$
|
|
598
|
+
*/
|
|
599
|
+
data_provider_domain: string;
|
|
600
|
+
/**
|
|
601
|
+
* Signal identifier within the data provider's catalog (e.g., 'likely_tesla_buyers', 'income_100k_plus')
|
|
602
|
+
* @pattern ^[a-zA-Z0-9_-]+$
|
|
603
|
+
*/
|
|
604
|
+
id: string;
|
|
605
|
+
} | {
|
|
606
|
+
/**
|
|
607
|
+
* Discriminator indicating this signal is native to the agent (not from a data provider catalog)
|
|
608
|
+
*/
|
|
609
|
+
source: 'agent';
|
|
610
|
+
/**
|
|
611
|
+
* URL of the signals agent that provides this signal (e.g., 'https://liveramp.com/.well-known/adcp/signals')
|
|
612
|
+
*/
|
|
613
|
+
agent_url: string;
|
|
614
|
+
/**
|
|
615
|
+
* Signal identifier within the agent's signal set (e.g., 'custom_auto_intenders')
|
|
616
|
+
* @pattern ^[a-zA-Z0-9_-]+$
|
|
617
|
+
*/
|
|
618
|
+
id: string;
|
|
619
|
+
};
|