@adcp/sdk 17.0.0-beta.0 → 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/3.1/bidding.js +1 -1
- package/dist/lib/adapters/version/3.1/bidding.mjs +1 -1
- package/dist/lib/adapters/version/types.d.mts +5 -0
- package/dist/lib/adapters/version/types.d.ts +5 -0
- package/dist/lib/canonical-references/index.js +2 -0
- package/dist/lib/canonical-references/index.mjs +2 -0
- package/dist/lib/client/account-changes.d.mts +3 -1
- package/dist/lib/client/account-changes.d.ts +3 -1
- package/dist/lib/client/account-changes.js +22 -2
- package/dist/lib/client/account-changes.mjs +22 -2
- package/dist/lib/conformance/oracle.js +3 -2
- package/dist/lib/conformance/oracle.mjs +3 -2
- package/dist/lib/core/AgentClient.d.mts +165 -1
- package/dist/lib/core/AgentClient.d.ts +165 -1
- package/dist/lib/core/AgentClient.js +446 -8
- package/dist/lib/core/AgentClient.mjs +446 -8
- package/dist/lib/core/ConversationTypes.d.mts +8 -0
- package/dist/lib/core/ConversationTypes.d.ts +8 -0
- package/dist/lib/core/ProtocolResponseParser.d.mts +1 -1
- package/dist/lib/core/ProtocolResponseParser.d.ts +1 -1
- package/dist/lib/core/ProtocolResponseParser.js +28 -18
- package/dist/lib/core/ProtocolResponseParser.mjs +11 -1
- package/dist/lib/core/ResponseValidator.js +1 -1
- package/dist/lib/core/ResponseValidator.mjs +1 -1
- package/dist/lib/core/SingleAgentClient.d.mts +122 -7
- package/dist/lib/core/SingleAgentClient.d.ts +122 -7
- package/dist/lib/core/SingleAgentClient.js +601 -96
- package/dist/lib/core/SingleAgentClient.mjs +590 -84
- package/dist/lib/core/TaskExecutor.d.mts +7 -0
- package/dist/lib/core/TaskExecutor.d.ts +7 -0
- package/dist/lib/core/TaskExecutor.js +23 -8
- package/dist/lib/core/TaskExecutor.mjs +23 -8
- package/dist/lib/core/task-status.d.mts +2 -0
- package/dist/lib/core/task-status.d.ts +2 -0
- package/dist/lib/core/task-status.js +11 -2
- package/dist/lib/core/task-status.mjs +9 -1
- package/dist/lib/errors/index.d.mts +22 -0
- package/dist/lib/errors/index.d.ts +22 -0
- package/dist/lib/errors/index.js +43 -0
- package/dist/lib/errors/index.mjs +42 -0
- package/dist/lib/identity-3.3/trust.d.mts +1 -4
- package/dist/lib/identity-3.3/trust.d.ts +1 -4
- package/dist/lib/identity-3.3/trust.js +34 -21
- package/dist/lib/identity-3.3/trust.mjs +34 -21
- package/dist/lib/identity-3.3/validation.js +5 -3
- package/dist/lib/identity-3.3/validation.mjs +6 -4
- package/dist/lib/index.d.mts +7 -53
- package/dist/lib/index.d.ts +7 -53
- package/dist/lib/index.js +13 -0
- package/dist/lib/index.mjs +9 -0
- package/dist/lib/media-buy/compatibility.js +6 -1
- package/dist/lib/media-buy/compatibility.mjs +6 -1
- package/dist/lib/protocols/mcp-modern.d.mts +2 -0
- package/dist/lib/protocols/mcp-modern.d.ts +2 -0
- package/dist/lib/protocols/mcp-modern.js +31 -5
- package/dist/lib/protocols/mcp-modern.mjs +31 -5
- package/dist/lib/protocols/mcp-scope.d.mts +6 -1
- package/dist/lib/protocols/mcp-scope.d.ts +6 -1
- package/dist/lib/protocols/mcp-scope.js +25 -3
- package/dist/lib/protocols/mcp-scope.mjs +24 -3
- package/dist/lib/protocols/mcp.js +12 -6
- package/dist/lib/protocols/mcp.mjs +13 -6
- package/dist/lib/reporting/inspection.js +1 -0
- package/dist/lib/reporting/inspection.mjs +1 -0
- package/dist/lib/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/client.d.mts +1 -0
- package/dist/lib/testing/client.d.ts +1 -0
- package/dist/lib/testing/client.js +6 -5
- package/dist/lib/testing/client.mjs +6 -5
- package/dist/lib/testing/storyboard/agent-routing.d.mts +5 -2
- package/dist/lib/testing/storyboard/agent-routing.d.ts +5 -2
- package/dist/lib/testing/storyboard/agent-routing.js +11 -4
- package/dist/lib/testing/storyboard/agent-routing.mjs +11 -4
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +60 -14
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +60 -14
- package/dist/lib/testing/storyboard/compliance.d.mts +2 -5
- package/dist/lib/testing/storyboard/compliance.d.ts +2 -5
- package/dist/lib/testing/storyboard/compliance.js +62 -13
- package/dist/lib/testing/storyboard/compliance.mjs +63 -14
- package/dist/lib/testing/storyboard/context.d.mts +13 -3
- package/dist/lib/testing/storyboard/context.d.ts +13 -3
- package/dist/lib/testing/storyboard/context.js +15 -10
- package/dist/lib/testing/storyboard/context.mjs +15 -10
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.js +11 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +10 -0
- package/dist/lib/testing/storyboard/runner.js +141 -13
- package/dist/lib/testing/storyboard/runner.mjs +141 -13
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/testing/storyboard/validations.js +4 -1
- package/dist/lib/testing/storyboard/validations.mjs +4 -1
- package/dist/lib/testing/test-controller.js +3 -0
- package/dist/lib/testing/test-controller.mjs +3 -0
- package/dist/lib/types/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/envelope-status-compat.d.mts +18 -1
- package/dist/lib/utils/envelope-status-compat.d.ts +18 -1
- package/dist/lib/utils/envelope-status-compat.js +11 -5
- package/dist/lib/utils/envelope-status-compat.mjs +11 -5
- package/dist/lib/utils/response-unwrapper.js +18 -10
- package/dist/lib/utils/response-unwrapper.mjs +18 -10
- package/dist/lib/v2/format-schema/resolver.js +1 -1
- package/dist/lib/v2/format-schema/resolver.mjs +1 -1
- package/dist/lib/v2/projection/creative-delivery.js +159 -39
- package/dist/lib/v2/projection/creative-delivery.mjs +163 -39
- 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 +136 -43
- package/dist/lib/validation/schema-validator.mjs +140 -44
- 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/COLLECTION-FIXTURE-FOUNDATION.md +11 -0
- package/docs/guides/DELIVERY-WEBHOOK-PARSING.md +142 -0
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +27 -1
- 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 +202 -2
- package/docs/migration-6.6-to-6.7.md +14 -0
- package/docs/migration-account-change-feed.md +15 -0
- package/docs/migration-reporting-storage-package.md +1 -1
- package/docs/recipes/verifying-inbound-webhooks.md +18 -2
- package/package.json +2 -2
|
@@ -252,7 +252,7 @@ class ResponseValidator {
|
|
|
252
252
|
if (!schema) {
|
|
253
253
|
return null;
|
|
254
254
|
}
|
|
255
|
-
const validatePayload = data && typeof data === "object" && !Array.isArray(data) ? (0, import_envelope_status_compat.injectLegacyEnvelopeStatus)(data, { toolName }) : data;
|
|
255
|
+
const validatePayload = data && typeof data === "object" && !Array.isArray(data) ? (0, import_envelope_status_compat.injectLegacyEnvelopeStatus)(data, { toolName, adcpVersion: responseAdcpVersion }) : data;
|
|
256
256
|
const result = schema.safeParse((0, import_response_schemas.prepareResponseForSchemaValidation)(toolName, validatePayload, responseAdcpVersion));
|
|
257
257
|
return result.success ? null : result.error;
|
|
258
258
|
}
|
|
@@ -228,7 +228,7 @@ class ResponseValidator {
|
|
|
228
228
|
if (!schema) {
|
|
229
229
|
return null;
|
|
230
230
|
}
|
|
231
|
-
const validatePayload = data && typeof data === "object" && !Array.isArray(data) ? injectLegacyEnvelopeStatus(data, { toolName }) : data;
|
|
231
|
+
const validatePayload = data && typeof data === "object" && !Array.isArray(data) ? injectLegacyEnvelopeStatus(data, { toolName, adcpVersion: responseAdcpVersion }) : data;
|
|
232
232
|
const result = schema.safeParse(prepareResponseForSchemaValidation(toolName, validatePayload, responseAdcpVersion));
|
|
233
233
|
return result.success ? null : result.error;
|
|
234
234
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { MediaBuyDeliveryWebhookEnvelope } from '../webhooks/media-buy-delivery.mjs';
|
|
2
|
+
import type * as ToolTypes from '../types/tools.generated.mjs';
|
|
3
|
+
import type * as CoreTypes from '../types/core.generated.mjs';
|
|
1
4
|
import { type ListProductsResponseWithSupplyPath, type ProductSupplyPathOptions } from '../supply-path/products.mjs';
|
|
2
5
|
import type { AccountReference, AgentConfig } from '../types/index.mjs';
|
|
3
6
|
import { type AdcpVersion } from '../version.mjs';
|
|
@@ -141,6 +144,8 @@ export interface WebhookVerificationConfig {
|
|
|
141
144
|
fetchCapabilities?: (agentUrl: string, protocol: 'mcp' | 'a2a') => Promise<unknown>;
|
|
142
145
|
}
|
|
143
146
|
export interface VerifyAndParseWebhookOptions {
|
|
147
|
+
/** Trusted seller/buy release for registered reporting delivery validation; defaults to the client pin. */
|
|
148
|
+
adcpVersion?: string;
|
|
144
149
|
/** Raw HTTP body bytes captured before JSON parsing. Required when `webhookSecret` is configured. */
|
|
145
150
|
rawBody?: string | Buffer | Uint8Array;
|
|
146
151
|
/** Parsed payload or raw body. When HMAC is configured, verified raw bytes are parsed instead of `payload`. */
|
|
@@ -189,7 +194,7 @@ export type WebhookParseResult = WebhookParseSuccess | WebhookParseFailure;
|
|
|
189
194
|
export interface WebhookParseSuccess {
|
|
190
195
|
ok: true;
|
|
191
196
|
protocol: 'mcp' | 'a2a';
|
|
192
|
-
envelope: MCPWebhookPayload | A2ATask | TaskStatusUpdateEvent;
|
|
197
|
+
envelope: MCPWebhookPayload | MediaBuyDeliveryWebhookEnvelope | A2ATask | TaskStatusUpdateEvent;
|
|
193
198
|
result: unknown;
|
|
194
199
|
metadata: {
|
|
195
200
|
taskId: string;
|
|
@@ -209,6 +214,8 @@ export interface WebhookParseFailure {
|
|
|
209
214
|
ok: false;
|
|
210
215
|
code: WebhookParseErrorCode;
|
|
211
216
|
message: string;
|
|
217
|
+
/** Readable schema paths, when delivery payload validation fails. */
|
|
218
|
+
errors?: readonly string[];
|
|
212
219
|
cause?: unknown;
|
|
213
220
|
}
|
|
214
221
|
export declare class WebhookDispatchError extends Error {
|
|
@@ -674,6 +681,13 @@ export declare class SingleAgentClient {
|
|
|
674
681
|
* Local observation failures do not publish seller terminal lifecycle events.
|
|
675
682
|
*/
|
|
676
683
|
trackTask<T = unknown>(request: TrackTaskRequest): Promise<TrackedTask<T>>;
|
|
684
|
+
/** Execute the typed AdCP get_task_status tool, including its result and error fields. */
|
|
685
|
+
getTaskStatus(params: ToolTypes.GetTaskStatusRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetTaskStatusResponse>>;
|
|
686
|
+
/** Poll one task and map its status to TaskInfo. Preserved for existing callers. */
|
|
687
|
+
getTaskStatus(taskId: string, transport?: import('../protocols/index.mjs').TransportOptions, signal?: AbortSignal, wireOptions?: {
|
|
688
|
+
wireAdcpVersion?: string;
|
|
689
|
+
versionEnvelope?: import('../protocols/index.mjs').VersionEnvelopeMode;
|
|
690
|
+
}): Promise<TaskInfo>;
|
|
677
691
|
/** Recover the current generation of an opt-in direct mutation pause. */
|
|
678
692
|
recoverDirectPauseContinuation<T>(request: DirectPauseRecoveryRequest): Promise<TaskResult<T>>;
|
|
679
693
|
private recoverDurableSettlement;
|
|
@@ -726,6 +740,9 @@ export declare class SingleAgentClient {
|
|
|
726
740
|
* - A validated MCP protected-resource metadata chain yields NeedsAuthorizationError
|
|
727
741
|
* - Otherwise AuthenticationRequiredError carries the advertised challenge
|
|
728
742
|
*
|
|
743
|
+
* Rate limiting (429, or 503 with Retry-After) stops probing at that URL and
|
|
744
|
+
* throws AgentRateLimitedError carrying the status and Retry-After.
|
|
745
|
+
*
|
|
729
746
|
* Note: This is async and called lazily on first agent interaction
|
|
730
747
|
*/
|
|
731
748
|
private discoverMCPEndpoint;
|
|
@@ -888,11 +905,10 @@ export declare class SingleAgentClient {
|
|
|
888
905
|
* @returns true if signature is valid
|
|
889
906
|
*/
|
|
890
907
|
verifyWebhookSignature(rawBodyOrPayload: string | Buffer | Uint8Array | unknown, signature: WebhookHeaderValue, timestamp: WebhookHeaderValue): boolean;
|
|
891
|
-
/**
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
*/
|
|
908
|
+
/** One task owns discovery and dispatch sessions unless the caller already owns reuse. */
|
|
909
|
+
private withConnectionScope;
|
|
910
|
+
private withTaskConnectionScope;
|
|
911
|
+
/** Execute a task, adapt maintained AdCP 3 releases, and call the completion handler. */
|
|
896
912
|
private executeAndHandle;
|
|
897
913
|
private executeAndHandleWithinDeadline;
|
|
898
914
|
private finalizeTaskResult;
|
|
@@ -1187,6 +1203,9 @@ export declare class SingleAgentClient {
|
|
|
1187
1203
|
getPlanAuditLogs(params: GetPlanAuditLogsRequest, options?: TaskOptions & {
|
|
1188
1204
|
agent?: AgentConfig;
|
|
1189
1205
|
}): Promise<TaskResult<GetPlanAuditLogsResponse>>;
|
|
1206
|
+
getPlanAuditLogs(params: GetPlanAuditLogsRequest, inputHandler: InputHandler | undefined, options?: TaskOptions & {
|
|
1207
|
+
agent?: AgentConfig;
|
|
1208
|
+
}): Promise<TaskResult<GetPlanAuditLogsResponse>>;
|
|
1190
1209
|
/**
|
|
1191
1210
|
* Report a governance outcome for an async task that has resolved.
|
|
1192
1211
|
*
|
|
@@ -1204,6 +1223,97 @@ export declare class SingleAgentClient {
|
|
|
1204
1223
|
signal?: AbortSignal;
|
|
1205
1224
|
}): Promise<import('./GovernanceTypes.mjs').GovernanceOutcome | undefined>;
|
|
1206
1225
|
private getGovernanceAgent;
|
|
1226
|
+
private advertisesTool;
|
|
1227
|
+
/** Accept a committed proposal to create or amend a media buy, or apply a negotiated cancellation. */
|
|
1228
|
+
acceptProposal(params: MutatingRequestInput<ToolTypes.AcceptProposalRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.AcceptProposalResponse>>;
|
|
1229
|
+
/** Execute the AdCP acquire_rights tool. */
|
|
1230
|
+
acquireRights(params: MutatingRequestInput<CoreTypes.AcquireRightsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.AcquireRightsResponse>>;
|
|
1231
|
+
/** Generate, transform, refine, retrieve, or adapt creative manifests for advertised creative capabilities. */
|
|
1232
|
+
buildCreative(params: MutatingRequestInput<ToolTypes.BuildCreativeRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.BuildCreativeResponse>>;
|
|
1233
|
+
/** Create a media buy directly from published seller products and record its accepted commercial snapshot. */
|
|
1234
|
+
buyProducts(params: MutatingRequestInput<ToolTypes.BuyProductsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.BuyProductsResponse>>;
|
|
1235
|
+
/** Execute the AdCP calibrate_content tool. */
|
|
1236
|
+
calibrateContent(params: MutatingRequestInput<ToolTypes.CalibrateContentRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.CalibrateContentResponse>>;
|
|
1237
|
+
/** Execute the AdCP check_governance tool. */
|
|
1238
|
+
checkGovernance(params: ToolTypes.CheckGovernanceRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.CheckGovernanceResponse>>;
|
|
1239
|
+
/** Control a seller compliance scenario. Intended for conformance testing. */
|
|
1240
|
+
complyTestController(params: ToolTypes.ComplyTestControllerRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ComplyTestControllerResponse>>;
|
|
1241
|
+
/** Rename, pause, resume, cancel, or adjust delivery controls within accepted proposal change rights. */
|
|
1242
|
+
controlMediaBuy(params: MutatingRequestInput<ToolTypes.ControlMediaBuyRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ControlMediaBuyResponse>>;
|
|
1243
|
+
/** Execute the AdCP create_collection_list tool. */
|
|
1244
|
+
createCollectionList(params: MutatingRequestInput<ToolTypes.CreateCollectionListRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.CreateCollectionListResponse>>;
|
|
1245
|
+
/** Execute the AdCP create_content_standards tool. */
|
|
1246
|
+
createContentStandards(params: MutatingRequestInput<ToolTypes.CreateContentStandardsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.CreateContentStandardsResponse>>;
|
|
1247
|
+
/** Terminally decline one or more proposals and record the buyer's reason. */
|
|
1248
|
+
declineProposals(params: MutatingRequestInput<ToolTypes.DeclineProposalsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.DeclineProposalsResponse>>;
|
|
1249
|
+
/** Execute the AdCP delete_collection_list tool. */
|
|
1250
|
+
deleteCollectionList(params: MutatingRequestInput<ToolTypes.DeleteCollectionListRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.DeleteCollectionListResponse>>;
|
|
1251
|
+
/** Retrieve spend, credit or balance status, and invoice history for an operator-billed account. */
|
|
1252
|
+
getAccountFinancials(params: ToolTypes.GetAccountFinancialsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetAccountFinancialsResponse>>;
|
|
1253
|
+
/** Execute the AdCP get_brand_identity tool. */
|
|
1254
|
+
getBrandIdentity(params: CoreTypes.GetBrandIdentityRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.GetBrandIdentityResponse>>;
|
|
1255
|
+
/** Execute the AdCP get_collection_list tool. */
|
|
1256
|
+
getCollectionList(params: ToolTypes.GetCollectionListRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetCollectionListResponse>>;
|
|
1257
|
+
/** Execute the AdCP get_content_standards tool. */
|
|
1258
|
+
getContentStandards(params: ToolTypes.GetContentStandardsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetContentStandardsResponse>>;
|
|
1259
|
+
/** Evaluate a creative manifest and return scored safety, content, quality, and governance features. */
|
|
1260
|
+
getCreativeFeatures(params: ToolTypes.GetCreativeFeaturesRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetCreativeFeaturesResponse>>;
|
|
1261
|
+
/** Execute the AdCP get_media_buy_artifacts tool. */
|
|
1262
|
+
getMediaBuyArtifacts(params: ToolTypes.GetMediaBuyArtifactsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetMediaBuyArtifactsResponse>>;
|
|
1263
|
+
/** Check reporting health, enumerate expected periods and all retained revisions, or resolve one exact reporting revision. */
|
|
1264
|
+
getReportingStatus(params: ToolTypes.GetReportingStatusRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetReportingStatusResponse>>;
|
|
1265
|
+
/** Execute the AdCP get_rights tool. */
|
|
1266
|
+
getRights(params: CoreTypes.GetRightsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.GetRightsResponse>>;
|
|
1267
|
+
/** Execute the AdCP list_collection_lists tool. */
|
|
1268
|
+
listCollectionLists(params: ToolTypes.ListCollectionListsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListCollectionListsResponse>>;
|
|
1269
|
+
/** Execute the AdCP list_content_standards tool. */
|
|
1270
|
+
listContentStandards(params: ToolTypes.ListContentStandardsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListContentStandardsResponse>>;
|
|
1271
|
+
/** Execute the AdCP list_creative_formats tool. */
|
|
1272
|
+
listCreativeFormats(params: ToolTypes.ListCreativeFormatsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListCreativeFormatsResponse>>;
|
|
1273
|
+
/** Discover account-scoped creative transformers and their selectable configuration options. */
|
|
1274
|
+
listTransformers(params: ToolTypes.ListTransformersRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListTransformersResponse>>;
|
|
1275
|
+
/** Log batches of marketing events against a configured event source for measurement and attribution. */
|
|
1276
|
+
logEvent(params: MutatingRequestInput<ToolTypes.LogEventRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.LogEventResponse>>;
|
|
1277
|
+
/** Revise draft proposals, finalize them into committed, inventory-held snapshots, or extend a committed hold. */
|
|
1278
|
+
refineProposals(params: TaskRequestFor<'refine_proposals'>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<TaskResponseTypeMap['refine_proposals']>>;
|
|
1279
|
+
/** Execute the AdCP report_plan_adjustment tool. */
|
|
1280
|
+
reportPlanAdjustment(params: MutatingRequestInput<ToolTypes.ReportPlanAdjustmentRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ReportPlanAdjustmentResponse>>;
|
|
1281
|
+
/** Execute the AdCP report_plan_outcome tool. */
|
|
1282
|
+
reportPlanOutcome(params: MutatingRequestInput<ToolTypes.ReportPlanOutcomeRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ReportPlanOutcomeResponse>>;
|
|
1283
|
+
/** Report vendor-service consumption and final measurements for revenue tracking and billing reconciliation. */
|
|
1284
|
+
reportUsage(params: MutatingRequestInput<ToolTypes.ReportUsageRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ReportUsageResponse>>;
|
|
1285
|
+
/** Ask a seller to create one or more draft media-plan proposals from a campaign brief. */
|
|
1286
|
+
requestProposals(params: MutatingRequestInput<ToolTypes.RequestProposalsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.RequestProposalsResponse>>;
|
|
1287
|
+
/** Execute the AdCP search_brands tool. */
|
|
1288
|
+
searchBrands(params: CoreTypes.SearchBrandsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.SearchBrandsResponse>>;
|
|
1289
|
+
/** Register, replace, pause, or clear caller-scoped webhooks for agent-level notifications. */
|
|
1290
|
+
syncAgentNotificationConfigs(params: MutatingRequestInput<ToolTypes.SyncAgentNotificationConfigsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncAgentNotificationConfigsResponse>>;
|
|
1291
|
+
/** List or synchronize buyer-managed account catalog feeds, suppress or restore specific items, and read current availability state. */
|
|
1292
|
+
syncCatalogs(params: MutatingRequestInput<ToolTypes.SyncCatalogsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncCatalogsResponse>>;
|
|
1293
|
+
/** List or synchronize account event sources with upsert and optional replacement semantics. */
|
|
1294
|
+
syncEventSources(params: MutatingRequestInput<ToolTypes.SyncEventSourcesRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncEventSourcesResponse>>;
|
|
1295
|
+
/** Bind or replace the governance agent used for approval across specific advertiser accounts. */
|
|
1296
|
+
syncGovernance(params: MutatingRequestInput<ToolTypes.SyncGovernanceRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncGovernanceResponse>>;
|
|
1297
|
+
/** Record a consumer's independently verified reporting totals and destination evidence in the seller ledger. */
|
|
1298
|
+
syncReportingReceipts(params: MutatingRequestInput<ToolTypes.SyncReportingReceiptsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncReportingReceiptsResponse>>;
|
|
1299
|
+
/** Tell a seller whether expected reporting was received, omitted, missing, unreadable, or contradictory. */
|
|
1300
|
+
syncReportingStatus(params: MutatingRequestInput<ToolTypes.SyncReportingStatusRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncReportingStatusResponse>>;
|
|
1301
|
+
/** Execute the AdCP update_collection_list tool. */
|
|
1302
|
+
updateCollectionList(params: MutatingRequestInput<ToolTypes.UpdateCollectionListRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.UpdateCollectionListResponse>>;
|
|
1303
|
+
/** Execute the AdCP update_content_standards tool. */
|
|
1304
|
+
updateContentStandards(params: MutatingRequestInput<ToolTypes.UpdateContentStandardsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.UpdateContentStandardsResponse>>;
|
|
1305
|
+
/** Execute the AdCP update_rights tool. */
|
|
1306
|
+
updateRights(params: MutatingRequestInput<CoreTypes.UpdateRightsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.UpdateRightsResponse>>;
|
|
1307
|
+
/** Execute the AdCP validate_content_delivery tool. */
|
|
1308
|
+
validateContentDelivery(params: ToolTypes.ValidateContentDeliveryRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ValidateContentDeliveryResponse>>;
|
|
1309
|
+
/** Preflight a creative manifest against canonical formats, products, third-party formats, or agent capabilities. */
|
|
1310
|
+
validateInput(params: ToolTypes.ValidateInputRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ValidateInputResponse>>;
|
|
1311
|
+
/** Execute the AdCP validate_property_delivery tool. */
|
|
1312
|
+
validatePropertyDelivery(params: CoreTypes.ValidatePropertyDeliveryRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.ValidatePropertyDeliveryResponse>>;
|
|
1313
|
+
/** Execute the AdCP verify_brand_claim tool. */
|
|
1314
|
+
verifyBrandClaim(params: CoreTypes.VerifyBrandClaimRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.VerifyBrandClaimResponse>>;
|
|
1315
|
+
/** Execute the AdCP verify_brand_claims tool. */
|
|
1316
|
+
verifyBrandClaims(params: CoreTypes.VerifyBrandClaimsRequestBulk, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.VerifyBrandClaimsResponseBulk>>;
|
|
1207
1317
|
/**
|
|
1208
1318
|
* Get AdCP capabilities
|
|
1209
1319
|
*
|
|
@@ -1322,7 +1432,9 @@ export declare class SingleAgentClient {
|
|
|
1322
1432
|
* );
|
|
1323
1433
|
* ```
|
|
1324
1434
|
*/
|
|
1325
|
-
executeTask<K extends AdcpTaskName>(taskName: K, params: TaskRequestFor<K>, inputHandler?: InputHandler, options?: TaskOptions
|
|
1435
|
+
executeTask<K extends AdcpTaskName>(taskName: K, params: TaskRequestFor<K>, inputHandler?: InputHandler, options?: TaskOptions & {
|
|
1436
|
+
agent?: K extends 'sync_plans' | 'get_plan_audit_logs' ? AgentConfig : never;
|
|
1437
|
+
}): Promise<TaskResult<TaskResponseTypeMap[K]>>;
|
|
1326
1438
|
/**
|
|
1327
1439
|
* Execute an extension task that is not part of the standard AdCP task set.
|
|
1328
1440
|
*
|
|
@@ -1483,6 +1595,9 @@ export declare class SingleAgentClient {
|
|
|
1483
1595
|
* });
|
|
1484
1596
|
* ```
|
|
1485
1597
|
*/
|
|
1598
|
+
/** Query the seller's typed AdCP list_tasks tool. Pass {} for an unfiltered query. */
|
|
1599
|
+
listTasks(params: ToolTypes.ListTasksRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListTasksResponse>>;
|
|
1600
|
+
/** List local tasks only. Pass {} to query the seller's list_tasks tool. */
|
|
1486
1601
|
listTasks(): Promise<TaskInfo[]>;
|
|
1487
1602
|
/**
|
|
1488
1603
|
* Get detailed information about a specific task
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { MediaBuyDeliveryWebhookEnvelope } from '../webhooks/media-buy-delivery';
|
|
2
|
+
import type * as ToolTypes from '../types/tools.generated';
|
|
3
|
+
import type * as CoreTypes from '../types/core.generated';
|
|
1
4
|
import { type ListProductsResponseWithSupplyPath, type ProductSupplyPathOptions } from '../supply-path/products';
|
|
2
5
|
import type { AccountReference, AgentConfig } from '../types';
|
|
3
6
|
import { type AdcpVersion } from '../version';
|
|
@@ -141,6 +144,8 @@ export interface WebhookVerificationConfig {
|
|
|
141
144
|
fetchCapabilities?: (agentUrl: string, protocol: 'mcp' | 'a2a') => Promise<unknown>;
|
|
142
145
|
}
|
|
143
146
|
export interface VerifyAndParseWebhookOptions {
|
|
147
|
+
/** Trusted seller/buy release for registered reporting delivery validation; defaults to the client pin. */
|
|
148
|
+
adcpVersion?: string;
|
|
144
149
|
/** Raw HTTP body bytes captured before JSON parsing. Required when `webhookSecret` is configured. */
|
|
145
150
|
rawBody?: string | Buffer | Uint8Array;
|
|
146
151
|
/** Parsed payload or raw body. When HMAC is configured, verified raw bytes are parsed instead of `payload`. */
|
|
@@ -189,7 +194,7 @@ export type WebhookParseResult = WebhookParseSuccess | WebhookParseFailure;
|
|
|
189
194
|
export interface WebhookParseSuccess {
|
|
190
195
|
ok: true;
|
|
191
196
|
protocol: 'mcp' | 'a2a';
|
|
192
|
-
envelope: MCPWebhookPayload | A2ATask | TaskStatusUpdateEvent;
|
|
197
|
+
envelope: MCPWebhookPayload | MediaBuyDeliveryWebhookEnvelope | A2ATask | TaskStatusUpdateEvent;
|
|
193
198
|
result: unknown;
|
|
194
199
|
metadata: {
|
|
195
200
|
taskId: string;
|
|
@@ -209,6 +214,8 @@ export interface WebhookParseFailure {
|
|
|
209
214
|
ok: false;
|
|
210
215
|
code: WebhookParseErrorCode;
|
|
211
216
|
message: string;
|
|
217
|
+
/** Readable schema paths, when delivery payload validation fails. */
|
|
218
|
+
errors?: readonly string[];
|
|
212
219
|
cause?: unknown;
|
|
213
220
|
}
|
|
214
221
|
export declare class WebhookDispatchError extends Error {
|
|
@@ -674,6 +681,13 @@ export declare class SingleAgentClient {
|
|
|
674
681
|
* Local observation failures do not publish seller terminal lifecycle events.
|
|
675
682
|
*/
|
|
676
683
|
trackTask<T = unknown>(request: TrackTaskRequest): Promise<TrackedTask<T>>;
|
|
684
|
+
/** Execute the typed AdCP get_task_status tool, including its result and error fields. */
|
|
685
|
+
getTaskStatus(params: ToolTypes.GetTaskStatusRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetTaskStatusResponse>>;
|
|
686
|
+
/** Poll one task and map its status to TaskInfo. Preserved for existing callers. */
|
|
687
|
+
getTaskStatus(taskId: string, transport?: import('../protocols').TransportOptions, signal?: AbortSignal, wireOptions?: {
|
|
688
|
+
wireAdcpVersion?: string;
|
|
689
|
+
versionEnvelope?: import('../protocols').VersionEnvelopeMode;
|
|
690
|
+
}): Promise<TaskInfo>;
|
|
677
691
|
/** Recover the current generation of an opt-in direct mutation pause. */
|
|
678
692
|
recoverDirectPauseContinuation<T>(request: DirectPauseRecoveryRequest): Promise<TaskResult<T>>;
|
|
679
693
|
private recoverDurableSettlement;
|
|
@@ -726,6 +740,9 @@ export declare class SingleAgentClient {
|
|
|
726
740
|
* - A validated MCP protected-resource metadata chain yields NeedsAuthorizationError
|
|
727
741
|
* - Otherwise AuthenticationRequiredError carries the advertised challenge
|
|
728
742
|
*
|
|
743
|
+
* Rate limiting (429, or 503 with Retry-After) stops probing at that URL and
|
|
744
|
+
* throws AgentRateLimitedError carrying the status and Retry-After.
|
|
745
|
+
*
|
|
729
746
|
* Note: This is async and called lazily on first agent interaction
|
|
730
747
|
*/
|
|
731
748
|
private discoverMCPEndpoint;
|
|
@@ -888,11 +905,10 @@ export declare class SingleAgentClient {
|
|
|
888
905
|
* @returns true if signature is valid
|
|
889
906
|
*/
|
|
890
907
|
verifyWebhookSignature(rawBodyOrPayload: string | Buffer | Uint8Array | unknown, signature: WebhookHeaderValue, timestamp: WebhookHeaderValue): boolean;
|
|
891
|
-
/**
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
*/
|
|
908
|
+
/** One task owns discovery and dispatch sessions unless the caller already owns reuse. */
|
|
909
|
+
private withConnectionScope;
|
|
910
|
+
private withTaskConnectionScope;
|
|
911
|
+
/** Execute a task, adapt maintained AdCP 3 releases, and call the completion handler. */
|
|
896
912
|
private executeAndHandle;
|
|
897
913
|
private executeAndHandleWithinDeadline;
|
|
898
914
|
private finalizeTaskResult;
|
|
@@ -1187,6 +1203,9 @@ export declare class SingleAgentClient {
|
|
|
1187
1203
|
getPlanAuditLogs(params: GetPlanAuditLogsRequest, options?: TaskOptions & {
|
|
1188
1204
|
agent?: AgentConfig;
|
|
1189
1205
|
}): Promise<TaskResult<GetPlanAuditLogsResponse>>;
|
|
1206
|
+
getPlanAuditLogs(params: GetPlanAuditLogsRequest, inputHandler: InputHandler | undefined, options?: TaskOptions & {
|
|
1207
|
+
agent?: AgentConfig;
|
|
1208
|
+
}): Promise<TaskResult<GetPlanAuditLogsResponse>>;
|
|
1190
1209
|
/**
|
|
1191
1210
|
* Report a governance outcome for an async task that has resolved.
|
|
1192
1211
|
*
|
|
@@ -1204,6 +1223,97 @@ export declare class SingleAgentClient {
|
|
|
1204
1223
|
signal?: AbortSignal;
|
|
1205
1224
|
}): Promise<import('./GovernanceTypes').GovernanceOutcome | undefined>;
|
|
1206
1225
|
private getGovernanceAgent;
|
|
1226
|
+
private advertisesTool;
|
|
1227
|
+
/** Accept a committed proposal to create or amend a media buy, or apply a negotiated cancellation. */
|
|
1228
|
+
acceptProposal(params: MutatingRequestInput<ToolTypes.AcceptProposalRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.AcceptProposalResponse>>;
|
|
1229
|
+
/** Execute the AdCP acquire_rights tool. */
|
|
1230
|
+
acquireRights(params: MutatingRequestInput<CoreTypes.AcquireRightsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.AcquireRightsResponse>>;
|
|
1231
|
+
/** Generate, transform, refine, retrieve, or adapt creative manifests for advertised creative capabilities. */
|
|
1232
|
+
buildCreative(params: MutatingRequestInput<ToolTypes.BuildCreativeRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.BuildCreativeResponse>>;
|
|
1233
|
+
/** Create a media buy directly from published seller products and record its accepted commercial snapshot. */
|
|
1234
|
+
buyProducts(params: MutatingRequestInput<ToolTypes.BuyProductsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.BuyProductsResponse>>;
|
|
1235
|
+
/** Execute the AdCP calibrate_content tool. */
|
|
1236
|
+
calibrateContent(params: MutatingRequestInput<ToolTypes.CalibrateContentRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.CalibrateContentResponse>>;
|
|
1237
|
+
/** Execute the AdCP check_governance tool. */
|
|
1238
|
+
checkGovernance(params: ToolTypes.CheckGovernanceRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.CheckGovernanceResponse>>;
|
|
1239
|
+
/** Control a seller compliance scenario. Intended for conformance testing. */
|
|
1240
|
+
complyTestController(params: ToolTypes.ComplyTestControllerRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ComplyTestControllerResponse>>;
|
|
1241
|
+
/** Rename, pause, resume, cancel, or adjust delivery controls within accepted proposal change rights. */
|
|
1242
|
+
controlMediaBuy(params: MutatingRequestInput<ToolTypes.ControlMediaBuyRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ControlMediaBuyResponse>>;
|
|
1243
|
+
/** Execute the AdCP create_collection_list tool. */
|
|
1244
|
+
createCollectionList(params: MutatingRequestInput<ToolTypes.CreateCollectionListRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.CreateCollectionListResponse>>;
|
|
1245
|
+
/** Execute the AdCP create_content_standards tool. */
|
|
1246
|
+
createContentStandards(params: MutatingRequestInput<ToolTypes.CreateContentStandardsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.CreateContentStandardsResponse>>;
|
|
1247
|
+
/** Terminally decline one or more proposals and record the buyer's reason. */
|
|
1248
|
+
declineProposals(params: MutatingRequestInput<ToolTypes.DeclineProposalsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.DeclineProposalsResponse>>;
|
|
1249
|
+
/** Execute the AdCP delete_collection_list tool. */
|
|
1250
|
+
deleteCollectionList(params: MutatingRequestInput<ToolTypes.DeleteCollectionListRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.DeleteCollectionListResponse>>;
|
|
1251
|
+
/** Retrieve spend, credit or balance status, and invoice history for an operator-billed account. */
|
|
1252
|
+
getAccountFinancials(params: ToolTypes.GetAccountFinancialsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetAccountFinancialsResponse>>;
|
|
1253
|
+
/** Execute the AdCP get_brand_identity tool. */
|
|
1254
|
+
getBrandIdentity(params: CoreTypes.GetBrandIdentityRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.GetBrandIdentityResponse>>;
|
|
1255
|
+
/** Execute the AdCP get_collection_list tool. */
|
|
1256
|
+
getCollectionList(params: ToolTypes.GetCollectionListRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetCollectionListResponse>>;
|
|
1257
|
+
/** Execute the AdCP get_content_standards tool. */
|
|
1258
|
+
getContentStandards(params: ToolTypes.GetContentStandardsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetContentStandardsResponse>>;
|
|
1259
|
+
/** Evaluate a creative manifest and return scored safety, content, quality, and governance features. */
|
|
1260
|
+
getCreativeFeatures(params: ToolTypes.GetCreativeFeaturesRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetCreativeFeaturesResponse>>;
|
|
1261
|
+
/** Execute the AdCP get_media_buy_artifacts tool. */
|
|
1262
|
+
getMediaBuyArtifacts(params: ToolTypes.GetMediaBuyArtifactsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetMediaBuyArtifactsResponse>>;
|
|
1263
|
+
/** Check reporting health, enumerate expected periods and all retained revisions, or resolve one exact reporting revision. */
|
|
1264
|
+
getReportingStatus(params: ToolTypes.GetReportingStatusRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.GetReportingStatusResponse>>;
|
|
1265
|
+
/** Execute the AdCP get_rights tool. */
|
|
1266
|
+
getRights(params: CoreTypes.GetRightsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.GetRightsResponse>>;
|
|
1267
|
+
/** Execute the AdCP list_collection_lists tool. */
|
|
1268
|
+
listCollectionLists(params: ToolTypes.ListCollectionListsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListCollectionListsResponse>>;
|
|
1269
|
+
/** Execute the AdCP list_content_standards tool. */
|
|
1270
|
+
listContentStandards(params: ToolTypes.ListContentStandardsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListContentStandardsResponse>>;
|
|
1271
|
+
/** Execute the AdCP list_creative_formats tool. */
|
|
1272
|
+
listCreativeFormats(params: ToolTypes.ListCreativeFormatsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListCreativeFormatsResponse>>;
|
|
1273
|
+
/** Discover account-scoped creative transformers and their selectable configuration options. */
|
|
1274
|
+
listTransformers(params: ToolTypes.ListTransformersRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListTransformersResponse>>;
|
|
1275
|
+
/** Log batches of marketing events against a configured event source for measurement and attribution. */
|
|
1276
|
+
logEvent(params: MutatingRequestInput<ToolTypes.LogEventRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.LogEventResponse>>;
|
|
1277
|
+
/** Revise draft proposals, finalize them into committed, inventory-held snapshots, or extend a committed hold. */
|
|
1278
|
+
refineProposals(params: TaskRequestFor<'refine_proposals'>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<TaskResponseTypeMap['refine_proposals']>>;
|
|
1279
|
+
/** Execute the AdCP report_plan_adjustment tool. */
|
|
1280
|
+
reportPlanAdjustment(params: MutatingRequestInput<ToolTypes.ReportPlanAdjustmentRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ReportPlanAdjustmentResponse>>;
|
|
1281
|
+
/** Execute the AdCP report_plan_outcome tool. */
|
|
1282
|
+
reportPlanOutcome(params: MutatingRequestInput<ToolTypes.ReportPlanOutcomeRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ReportPlanOutcomeResponse>>;
|
|
1283
|
+
/** Report vendor-service consumption and final measurements for revenue tracking and billing reconciliation. */
|
|
1284
|
+
reportUsage(params: MutatingRequestInput<ToolTypes.ReportUsageRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ReportUsageResponse>>;
|
|
1285
|
+
/** Ask a seller to create one or more draft media-plan proposals from a campaign brief. */
|
|
1286
|
+
requestProposals(params: MutatingRequestInput<ToolTypes.RequestProposalsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.RequestProposalsResponse>>;
|
|
1287
|
+
/** Execute the AdCP search_brands tool. */
|
|
1288
|
+
searchBrands(params: CoreTypes.SearchBrandsRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.SearchBrandsResponse>>;
|
|
1289
|
+
/** Register, replace, pause, or clear caller-scoped webhooks for agent-level notifications. */
|
|
1290
|
+
syncAgentNotificationConfigs(params: MutatingRequestInput<ToolTypes.SyncAgentNotificationConfigsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncAgentNotificationConfigsResponse>>;
|
|
1291
|
+
/** List or synchronize buyer-managed account catalog feeds, suppress or restore specific items, and read current availability state. */
|
|
1292
|
+
syncCatalogs(params: MutatingRequestInput<ToolTypes.SyncCatalogsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncCatalogsResponse>>;
|
|
1293
|
+
/** List or synchronize account event sources with upsert and optional replacement semantics. */
|
|
1294
|
+
syncEventSources(params: MutatingRequestInput<ToolTypes.SyncEventSourcesRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncEventSourcesResponse>>;
|
|
1295
|
+
/** Bind or replace the governance agent used for approval across specific advertiser accounts. */
|
|
1296
|
+
syncGovernance(params: MutatingRequestInput<ToolTypes.SyncGovernanceRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncGovernanceResponse>>;
|
|
1297
|
+
/** Record a consumer's independently verified reporting totals and destination evidence in the seller ledger. */
|
|
1298
|
+
syncReportingReceipts(params: MutatingRequestInput<ToolTypes.SyncReportingReceiptsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncReportingReceiptsResponse>>;
|
|
1299
|
+
/** Tell a seller whether expected reporting was received, omitted, missing, unreadable, or contradictory. */
|
|
1300
|
+
syncReportingStatus(params: MutatingRequestInput<ToolTypes.SyncReportingStatusRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.SyncReportingStatusResponse>>;
|
|
1301
|
+
/** Execute the AdCP update_collection_list tool. */
|
|
1302
|
+
updateCollectionList(params: MutatingRequestInput<ToolTypes.UpdateCollectionListRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.UpdateCollectionListResponse>>;
|
|
1303
|
+
/** Execute the AdCP update_content_standards tool. */
|
|
1304
|
+
updateContentStandards(params: MutatingRequestInput<ToolTypes.UpdateContentStandardsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.UpdateContentStandardsResponse>>;
|
|
1305
|
+
/** Execute the AdCP update_rights tool. */
|
|
1306
|
+
updateRights(params: MutatingRequestInput<CoreTypes.UpdateRightsRequest>, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.UpdateRightsResponse>>;
|
|
1307
|
+
/** Execute the AdCP validate_content_delivery tool. */
|
|
1308
|
+
validateContentDelivery(params: ToolTypes.ValidateContentDeliveryRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ValidateContentDeliveryResponse>>;
|
|
1309
|
+
/** Preflight a creative manifest against canonical formats, products, third-party formats, or agent capabilities. */
|
|
1310
|
+
validateInput(params: ToolTypes.ValidateInputRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ValidateInputResponse>>;
|
|
1311
|
+
/** Execute the AdCP validate_property_delivery tool. */
|
|
1312
|
+
validatePropertyDelivery(params: CoreTypes.ValidatePropertyDeliveryRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.ValidatePropertyDeliveryResponse>>;
|
|
1313
|
+
/** Execute the AdCP verify_brand_claim tool. */
|
|
1314
|
+
verifyBrandClaim(params: CoreTypes.VerifyBrandClaimRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.VerifyBrandClaimResponse>>;
|
|
1315
|
+
/** Execute the AdCP verify_brand_claims tool. */
|
|
1316
|
+
verifyBrandClaims(params: CoreTypes.VerifyBrandClaimsRequestBulk, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<CoreTypes.VerifyBrandClaimsResponseBulk>>;
|
|
1207
1317
|
/**
|
|
1208
1318
|
* Get AdCP capabilities
|
|
1209
1319
|
*
|
|
@@ -1322,7 +1432,9 @@ export declare class SingleAgentClient {
|
|
|
1322
1432
|
* );
|
|
1323
1433
|
* ```
|
|
1324
1434
|
*/
|
|
1325
|
-
executeTask<K extends AdcpTaskName>(taskName: K, params: TaskRequestFor<K>, inputHandler?: InputHandler, options?: TaskOptions
|
|
1435
|
+
executeTask<K extends AdcpTaskName>(taskName: K, params: TaskRequestFor<K>, inputHandler?: InputHandler, options?: TaskOptions & {
|
|
1436
|
+
agent?: K extends 'sync_plans' | 'get_plan_audit_logs' ? AgentConfig : never;
|
|
1437
|
+
}): Promise<TaskResult<TaskResponseTypeMap[K]>>;
|
|
1326
1438
|
/**
|
|
1327
1439
|
* Execute an extension task that is not part of the standard AdCP task set.
|
|
1328
1440
|
*
|
|
@@ -1483,6 +1595,9 @@ export declare class SingleAgentClient {
|
|
|
1483
1595
|
* });
|
|
1484
1596
|
* ```
|
|
1485
1597
|
*/
|
|
1598
|
+
/** Query the seller's typed AdCP list_tasks tool. Pass {} for an unfiltered query. */
|
|
1599
|
+
listTasks(params: ToolTypes.ListTasksRequest, inputHandler?: InputHandler, options?: TaskOptions): Promise<TaskResult<ToolTypes.ListTasksResponse>>;
|
|
1600
|
+
/** List local tasks only. Pass {} to query the seller's list_tasks tool. */
|
|
1486
1601
|
listTasks(): Promise<TaskInfo[]>;
|
|
1487
1602
|
/**
|
|
1488
1603
|
* Get detailed information about a specific task
|