@adcp/sdk 17.0.0-beta.1 → 17.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/adapters/keyed-account-store.js +1 -1
- package/dist/lib/adapters/keyed-account-store.mjs +1 -1
- package/dist/lib/adapters/version/3.0/brand-fields.d.mts +7 -1
- package/dist/lib/adapters/version/3.0/brand-fields.d.ts +7 -1
- package/dist/lib/adapters/version/3.0/brand-fields.js +139 -3
- package/dist/lib/adapters/version/3.0/brand-fields.mjs +136 -2
- package/dist/lib/adapters/version/3.0/index.js +6 -0
- package/dist/lib/adapters/version/3.0/index.mjs +7 -1
- package/dist/lib/adapters/version/types.d.mts +5 -0
- package/dist/lib/adapters/version/types.d.ts +5 -0
- package/dist/lib/canonical-references/index.js +2 -0
- package/dist/lib/canonical-references/index.mjs +2 -0
- package/dist/lib/client/account-changes.d.mts +3 -1
- package/dist/lib/client/account-changes.d.ts +3 -1
- package/dist/lib/client/account-changes.js +22 -2
- package/dist/lib/client/account-changes.mjs +22 -2
- package/dist/lib/conformance/oracle.js +3 -2
- package/dist/lib/conformance/oracle.mjs +3 -2
- package/dist/lib/core/AgentClient.d.mts +165 -1
- package/dist/lib/core/AgentClient.d.ts +165 -1
- package/dist/lib/core/AgentClient.js +446 -8
- package/dist/lib/core/AgentClient.mjs +446 -8
- package/dist/lib/core/ConversationTypes.d.mts +8 -0
- package/dist/lib/core/ConversationTypes.d.ts +8 -0
- package/dist/lib/core/ProtocolResponseParser.d.mts +1 -1
- package/dist/lib/core/ProtocolResponseParser.d.ts +1 -1
- package/dist/lib/core/ProtocolResponseParser.js +28 -18
- package/dist/lib/core/ProtocolResponseParser.mjs +11 -1
- package/dist/lib/core/SingleAgentClient.d.mts +115 -2
- package/dist/lib/core/SingleAgentClient.d.ts +115 -2
- package/dist/lib/core/SingleAgentClient.js +547 -67
- package/dist/lib/core/SingleAgentClient.mjs +534 -54
- package/dist/lib/core/TaskExecutor.d.mts +7 -0
- package/dist/lib/core/TaskExecutor.d.ts +7 -0
- package/dist/lib/core/TaskExecutor.js +18 -5
- package/dist/lib/core/TaskExecutor.mjs +18 -5
- package/dist/lib/core/task-status.d.mts +2 -0
- package/dist/lib/core/task-status.d.ts +2 -0
- package/dist/lib/core/task-status.js +11 -2
- package/dist/lib/core/task-status.mjs +9 -1
- package/dist/lib/identity-3.3/trust.d.mts +1 -4
- package/dist/lib/identity-3.3/trust.d.ts +1 -4
- package/dist/lib/identity-3.3/trust.js +34 -21
- package/dist/lib/identity-3.3/trust.mjs +34 -21
- package/dist/lib/identity-3.3/validation.js +5 -3
- package/dist/lib/identity-3.3/validation.mjs +6 -4
- package/dist/lib/index.d.mts +6 -52
- package/dist/lib/index.d.ts +6 -52
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.mjs +7 -0
- package/dist/lib/media-buy/compatibility.js +6 -1
- package/dist/lib/media-buy/compatibility.mjs +6 -1
- package/dist/lib/protocols/mcp-scope.d.mts +3 -0
- package/dist/lib/protocols/mcp-scope.d.ts +3 -0
- package/dist/lib/protocols/mcp-scope.js +8 -3
- package/dist/lib/protocols/mcp-scope.mjs +8 -3
- package/dist/lib/reporting/inspection.js +1 -0
- package/dist/lib/reporting/inspection.mjs +1 -0
- package/dist/lib/reporting/ledger/coverage.d.mts +5 -0
- package/dist/lib/reporting/ledger/coverage.d.ts +5 -0
- package/dist/lib/reporting/ledger/coverage.js +37 -3
- package/dist/lib/reporting/ledger/coverage.mjs +36 -3
- package/dist/lib/reporting/ledger/handler.js +7 -4
- package/dist/lib/reporting/ledger/handler.mjs +7 -4
- package/dist/lib/reporting/ledger/producer.js +215 -69
- package/dist/lib/reporting/ledger/producer.mjs +217 -70
- package/dist/lib/reporting/ledger/schedule.d.mts +2 -2
- package/dist/lib/reporting/ledger/schedule.d.ts +2 -2
- package/dist/lib/reporting/ledger/schedule.js +8 -5
- package/dist/lib/reporting/ledger/schedule.mjs +8 -5
- package/dist/lib/reporting/ledger/status-ingest.d.mts +1 -1
- package/dist/lib/reporting/ledger/status-ingest.d.ts +1 -1
- package/dist/lib/reporting/ledger/status-ingest.js +4 -3
- package/dist/lib/reporting/ledger/status-ingest.mjs +4 -3
- package/dist/lib/reporting/ledger/types.d.mts +36 -1
- package/dist/lib/reporting/ledger/types.d.ts +36 -1
- package/dist/lib/reporting/service/index.d.mts +14 -1
- package/dist/lib/reporting/service/index.d.ts +14 -1
- package/dist/lib/reporting/service/index.js +24 -12
- package/dist/lib/reporting/service/index.mjs +24 -12
- package/dist/lib/schemas/browser.d.mts +2 -0
- package/dist/lib/schemas/browser.d.ts +2 -0
- package/dist/lib/schemas/browser.js +3 -0
- package/dist/lib/schemas/browser.mjs +2 -0
- package/dist/lib/schemas/index.d.mts +5 -3
- package/dist/lib/schemas/index.d.ts +5 -3
- package/dist/lib/schemas/index.js +5 -0
- package/dist/lib/schemas/index.mjs +4 -0
- package/dist/lib/server/account-response-identity.d.mts +17 -0
- package/dist/lib/server/account-response-identity.d.ts +17 -0
- package/dist/lib/server/account-response-identity.js +52 -0
- package/dist/lib/server/account-response-identity.mjs +28 -0
- package/dist/lib/server/account-sync-contract.js +2 -2
- package/dist/lib/server/account-sync-contract.mjs +2 -2
- package/dist/lib/server/create-adcp-server.js +33 -20
- package/dist/lib/server/create-adcp-server.mjs +36 -12
- package/dist/lib/server/decisioning/account.d.mts +36 -10
- package/dist/lib/server/decisioning/account.d.ts +36 -10
- package/dist/lib/server/decisioning/account.js +33 -14
- package/dist/lib/server/decisioning/account.mjs +33 -14
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +5 -5
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +5 -5
- package/dist/lib/server/decisioning/runtime/from-platform.js +4 -4
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +4 -4
- package/dist/lib/server/media-buy-store.d.mts +26 -12
- package/dist/lib/server/media-buy-store.d.ts +26 -12
- package/dist/lib/server/media-buy-store.js +69 -21
- package/dist/lib/server/media-buy-store.mjs +69 -21
- package/dist/lib/server/notification-subscriptions/runtime.d.mts +1 -1
- package/dist/lib/server/notification-subscriptions/runtime.d.ts +1 -1
- package/dist/lib/server/notification-subscriptions/runtime.js +4 -0
- package/dist/lib/server/notification-subscriptions/runtime.mjs +4 -0
- package/dist/lib/server/responses.js +9 -1
- package/dist/lib/server/responses.mjs +9 -1
- package/dist/lib/signing/agent-fetch.d.mts +1 -1
- package/dist/lib/signing/agent-fetch.d.ts +1 -1
- package/dist/lib/signing/agent-fetch.js +3 -3
- package/dist/lib/signing/agent-fetch.mjs +3 -3
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +60 -14
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +60 -14
- package/dist/lib/testing/storyboard/compliance.d.mts +2 -5
- package/dist/lib/testing/storyboard/compliance.d.ts +2 -5
- package/dist/lib/testing/storyboard/compliance.js +62 -13
- package/dist/lib/testing/storyboard/compliance.mjs +63 -14
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.js +11 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +10 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/accept-proposal.d.ts +20 -28
- package/dist/lib/types/asset-instances.d.mts +1 -1
- package/dist/lib/types/asset-instances.d.ts +1 -1
- package/dist/lib/types/buy-products.d.ts +20 -28
- package/dist/lib/types/check-governance.d.ts +20 -28
- package/dist/lib/types/comply-test-controller.d.ts +20 -28
- package/dist/lib/types/control-media-buy.d.ts +20 -28
- package/dist/lib/types/core.generated.d.mts +273 -184
- package/dist/lib/types/core.generated.d.ts +273 -184
- package/dist/lib/types/create-media-buy.d.ts +20 -28
- package/dist/lib/types/get-media-buys.d.ts +20 -28
- package/dist/lib/types/get-products.d.ts +20 -28
- package/dist/lib/types/index.d.mts +6 -1
- package/dist/lib/types/index.d.ts +6 -1
- package/dist/lib/types/index.js +6 -1
- package/dist/lib/types/index.mjs +4 -1
- package/dist/lib/types/inline-enums.generated.d.mts +30 -4
- package/dist/lib/types/inline-enums.generated.d.ts +30 -4
- package/dist/lib/types/inline-enums.generated.js +41 -2
- package/dist/lib/types/inline-enums.generated.mjs +28 -2
- package/dist/lib/types/list-products.d.ts +20 -28
- package/dist/lib/types/list-proposals.d.ts +20 -28
- package/dist/lib/types/media-buy-delivery-report.d.mts +6 -0
- package/dist/lib/types/media-buy-delivery-report.d.ts +6 -0
- package/dist/lib/types/media-buy-delivery-report.js +16 -0
- package/dist/lib/types/media-buy-delivery-report.mjs +0 -0
- package/dist/lib/types/refine-proposals.d.ts +20 -28
- package/dist/lib/types/request-proposals.d.ts +20 -28
- package/dist/lib/types/schemas.generated.d.ts +63113 -127273
- package/dist/lib/types/schemas.generated.js +759 -770
- package/dist/lib/types/schemas.generated.mjs +759 -770
- package/dist/lib/types/targeting-keys.generated.d.mts +4 -0
- package/dist/lib/types/targeting-keys.generated.d.ts +4 -0
- package/dist/lib/types/targeting-keys.generated.js +109 -0
- package/dist/lib/types/targeting-keys.generated.mjs +84 -0
- package/dist/lib/types/tools.generated.d.mts +2 -68
- package/dist/lib/types/tools.generated.d.ts +2 -68
- package/dist/lib/types/update-media-buy.d.ts +20 -28
- package/dist/lib/utils/adcp-version-config.js +5 -2
- package/dist/lib/utils/adcp-version-config.mjs +5 -2
- package/dist/lib/utils/response-unwrapper.js +6 -1
- package/dist/lib/utils/response-unwrapper.mjs +6 -1
- package/dist/lib/v2/format-schema/resolver.js +1 -1
- package/dist/lib/v2/format-schema/resolver.mjs +1 -1
- package/dist/lib/v2/projection/creative-delivery.js +104 -29
- package/dist/lib/v2/projection/creative-delivery.mjs +108 -29
- package/dist/lib/v2/projection/index.d.mts +1 -0
- package/dist/lib/v2/projection/index.d.ts +1 -0
- package/dist/lib/v2/projection/index.js +3 -0
- package/dist/lib/v2/projection/index.mjs +2 -0
- package/dist/lib/v2/projection/legacy-metadata.d.mts +19 -0
- package/dist/lib/v2/projection/legacy-metadata.d.ts +19 -0
- package/dist/lib/v2/projection/legacy-metadata.js +91 -0
- package/dist/lib/v2/projection/legacy-metadata.mjs +86 -0
- package/dist/lib/v2/projection/v1-to-v2.d.mts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.d.ts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.js +12 -9
- package/dist/lib/v2/projection/v1-to-v2.mjs +12 -9
- package/dist/lib/validation/budget-allocation.d.mts +3 -3
- package/dist/lib/validation/budget-allocation.d.ts +3 -3
- package/dist/lib/validation/compact-schema.d.mts +27 -0
- package/dist/lib/validation/compact-schema.d.ts +27 -0
- package/dist/lib/validation/compact-schema.js +276 -0
- package/dist/lib/validation/compact-schema.mjs +250 -0
- package/dist/lib/validation/media-buy-delivery-report.d.mts +8 -0
- package/dist/lib/validation/media-buy-delivery-report.d.ts +8 -0
- package/dist/lib/validation/media-buy-delivery-report.js +31 -0
- package/dist/lib/validation/media-buy-delivery-report.mjs +7 -0
- package/dist/lib/validation/nonempty-array.d.mts +15 -0
- package/dist/lib/validation/nonempty-array.d.ts +15 -0
- package/dist/lib/validation/nonempty-array.js +41 -0
- package/dist/lib/validation/nonempty-array.mjs +7 -0
- package/dist/lib/validation/schema-diagnostic-origins.d.mts +21 -0
- package/dist/lib/validation/schema-diagnostic-origins.d.ts +21 -0
- package/dist/lib/validation/schema-diagnostic-origins.js +193 -0
- package/dist/lib/validation/schema-diagnostic-origins.mjs +169 -0
- package/dist/lib/validation/schema-loader.js +86 -16
- package/dist/lib/validation/schema-loader.mjs +82 -16
- package/dist/lib/validation/schema-validator.d.mts +10 -19
- package/dist/lib/validation/schema-validator.d.ts +10 -19
- package/dist/lib/validation/schema-validator.js +135 -42
- package/dist/lib/validation/schema-validator.mjs +139 -43
- package/dist/lib/validation/sync-creatives.d.mts +22 -22
- package/dist/lib/validation/sync-creatives.d.ts +22 -22
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/webhooks/index.d.mts +3 -0
- package/dist/lib/webhooks/index.d.ts +3 -0
- package/dist/lib/webhooks/index.js +3 -0
- package/dist/lib/webhooks/index.mjs +2 -0
- package/dist/lib/webhooks/media-buy-delivery.d.mts +43 -0
- package/dist/lib/webhooks/media-buy-delivery.d.ts +43 -0
- package/dist/lib/webhooks/media-buy-delivery.js +119 -0
- package/dist/lib/webhooks/media-buy-delivery.mjs +94 -0
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/DELIVERY-WEBHOOK-PARSING.md +142 -0
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +15 -0
- package/docs/guides/REPORTING-LEDGER.md +93 -0
- package/docs/guides/REPORTING-STABILITY.md +1 -1
- package/docs/guides/TYPED-CLIENT-TOOLS.md +49 -0
- package/docs/llms.txt +2 -2
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-16-to-17.md +191 -14
- package/docs/migration-6.6-to-6.7.md +14 -0
- package/docs/migration-account-change-feed.md +15 -0
- package/docs/recipes/verifying-inbound-webhooks.md +18 -2
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@ export declare const SyncCreativesItemSchema: z.ZodObject<{
|
|
|
13
13
|
brand: z.ZodOptional<z.ZodObject<{
|
|
14
14
|
domain: z.ZodString;
|
|
15
15
|
brand_id: z.ZodOptional<z.ZodString>;
|
|
16
|
-
countries: z.ZodOptional<
|
|
16
|
+
countries: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
17
17
|
industries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
18
|
data_subject_contestation: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
19
19
|
brand_kit_override: z.ZodOptional<z.ZodObject<{
|
|
@@ -128,7 +128,7 @@ export declare const SyncCreativesItemSchema: z.ZodObject<{
|
|
|
128
128
|
notification_configs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
129
129
|
subscriber_id: z.ZodString;
|
|
130
130
|
url: z.ZodString;
|
|
131
|
-
event_types:
|
|
131
|
+
event_types: import("./nonempty-array").NonemptyArraySchema<z.ZodUnion<readonly [z.ZodLiteral<"creative.status_changed">, z.ZodLiteral<"creative.assignment_changed">, z.ZodLiteral<"indicators.changed">, z.ZodLiteral<"creative.purged">, z.ZodLiteral<"account.status_changed">, z.ZodLiteral<"account.change_recorded">, z.ZodLiteral<"product.created">, z.ZodLiteral<"product.updated">, z.ZodLiteral<"product.priced">, z.ZodLiteral<"product.removed">, z.ZodLiteral<"signal.created">, z.ZodLiteral<"signal.updated">, z.ZodLiteral<"signal.priced">, z.ZodLiteral<"signal.removed">, z.ZodLiteral<"wholesale_feed.bulk_change">, z.ZodLiteral<"collection_card.updated">, z.ZodLiteral<"collection_card.removed">, z.ZodLiteral<"collection_catalog.bulk_change">, z.ZodLiteral<"reporting.delivery_ready">, z.ZodLiteral<"reporting.status_changed">, z.ZodLiteral<"reporting.ledger_changed">, z.ZodLiteral<"proposal.created">]>>;
|
|
132
132
|
product_payload_view: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"canonical">, z.ZodLiteral<"legacy">]>>;
|
|
133
133
|
authentication: z.ZodOptional<z.ZodObject<{
|
|
134
134
|
schemes: z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"Bearer">, z.ZodLiteral<"HMAC-SHA256">]>], null>;
|
|
@@ -149,7 +149,7 @@ export declare const SyncCreativesItemSchema: z.ZodObject<{
|
|
|
149
149
|
reporting_profile: z.ZodString;
|
|
150
150
|
scope: z.ZodObject<{
|
|
151
151
|
all_media_buys: z.ZodOptional<z.ZodLiteral<true>>;
|
|
152
|
-
media_buy_ids: z.ZodOptional<
|
|
152
|
+
media_buy_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
153
153
|
}, z.core.$loose>;
|
|
154
154
|
coverage_requirement: z.ZodUnion<readonly [z.ZodLiteral<"full">, z.ZodLiteral<"allow_partial">]>;
|
|
155
155
|
required_finality: z.ZodUnion<readonly [z.ZodLiteral<"snapshot">, z.ZodLiteral<"official">]>;
|
|
@@ -237,7 +237,7 @@ export declare const SyncCreativesItemSchema: z.ZodObject<{
|
|
|
237
237
|
limitations: z.ZodArray<z.ZodObject<{
|
|
238
238
|
reason: z.ZodUnion<readonly [z.ZodLiteral<"offering_unsupported">, z.ZodLiteral<"account_entitlement_unavailable">, z.ZodLiteral<"credential_scope_insufficient">, z.ZodLiteral<"provider_limitation">, z.ZodLiteral<"capability_unknown">]>;
|
|
239
239
|
media_buy_id: z.ZodString;
|
|
240
|
-
package_ids: z.ZodOptional<
|
|
240
|
+
package_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
241
241
|
}, z.core.$strict>>;
|
|
242
242
|
}, z.core.$strict>>;
|
|
243
243
|
setup: z.ZodOptional<z.ZodObject<{
|
|
@@ -246,7 +246,7 @@ export declare const SyncCreativesItemSchema: z.ZodObject<{
|
|
|
246
246
|
url: z.ZodOptional<z.ZodString>;
|
|
247
247
|
expires_at: z.ZodOptional<z.ZodString>;
|
|
248
248
|
}, z.core.$loose>>;
|
|
249
|
-
issues: z.ZodOptional<
|
|
249
|
+
issues: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodObject<{
|
|
250
250
|
issue_id: z.ZodString;
|
|
251
251
|
code: z.ZodUnion<readonly [z.ZodLiteral<"REPORT_OVERDUE">, z.ZodLiteral<"PRODUCTION_FAILED">, z.ZodLiteral<"DELIVERY_FAILED">, z.ZodLiteral<"ACCESS_REQUIRED">, z.ZodLiteral<"CONFIGURATION_REQUIRED">, z.ZodLiteral<"REPORTING_COVERAGE_INCOMPLETE">, z.ZodLiteral<"RESOURCE_EXPIRED">, z.ZodLiteral<"READER_INCOMPATIBLE">, z.ZodLiteral<"HISTORY_UNAVAILABLE">, z.ZodLiteral<"REVISION_UNREADABLE">, z.ZodLiteral<"RECEIPT_REQUIRED">, z.ZodLiteral<"RECEIPT_REJECTED">, z.ZodLiteral<"ADJUSTMENT_RECEIPT_REQUIRED">, z.ZodLiteral<"ADJUSTMENT_RECEIPT_REJECTED">, z.ZodLiteral<"CONSUMER_STATUS_MISMATCH">]>;
|
|
252
252
|
severity: z.ZodUnion<readonly [z.ZodLiteral<"delayed">, z.ZodLiteral<"action_required">]>;
|
|
@@ -262,8 +262,8 @@ export declare const SyncCreativesItemSchema: z.ZodObject<{
|
|
|
262
262
|
delivery_config_id: z.ZodOptional<z.ZodString>;
|
|
263
263
|
delivery_config_version: z.ZodOptional<z.ZodNumber>;
|
|
264
264
|
feed_purpose: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pacing">, z.ZodLiteral<"analytics">, z.ZodLiteral<"billing">]>>;
|
|
265
|
-
media_buy_ids: z.ZodOptional<
|
|
266
|
-
package_ids: z.ZodOptional<
|
|
265
|
+
media_buy_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
266
|
+
package_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
267
267
|
period_start: z.ZodOptional<z.ZodString>;
|
|
268
268
|
period_end: z.ZodOptional<z.ZodString>;
|
|
269
269
|
expected_at: z.ZodOptional<z.ZodString>;
|
|
@@ -367,7 +367,7 @@ export declare const SyncCreativesSuccessStrictSchema: z.ZodObject<{
|
|
|
367
367
|
brand: z.ZodOptional<z.ZodObject<{
|
|
368
368
|
domain: z.ZodString;
|
|
369
369
|
brand_id: z.ZodOptional<z.ZodString>;
|
|
370
|
-
countries: z.ZodOptional<
|
|
370
|
+
countries: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
371
371
|
industries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
372
372
|
data_subject_contestation: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
373
373
|
brand_kit_override: z.ZodOptional<z.ZodObject<{
|
|
@@ -482,7 +482,7 @@ export declare const SyncCreativesSuccessStrictSchema: z.ZodObject<{
|
|
|
482
482
|
notification_configs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
483
483
|
subscriber_id: z.ZodString;
|
|
484
484
|
url: z.ZodString;
|
|
485
|
-
event_types:
|
|
485
|
+
event_types: import("./nonempty-array").NonemptyArraySchema<z.ZodUnion<readonly [z.ZodLiteral<"creative.status_changed">, z.ZodLiteral<"creative.assignment_changed">, z.ZodLiteral<"indicators.changed">, z.ZodLiteral<"creative.purged">, z.ZodLiteral<"account.status_changed">, z.ZodLiteral<"account.change_recorded">, z.ZodLiteral<"product.created">, z.ZodLiteral<"product.updated">, z.ZodLiteral<"product.priced">, z.ZodLiteral<"product.removed">, z.ZodLiteral<"signal.created">, z.ZodLiteral<"signal.updated">, z.ZodLiteral<"signal.priced">, z.ZodLiteral<"signal.removed">, z.ZodLiteral<"wholesale_feed.bulk_change">, z.ZodLiteral<"collection_card.updated">, z.ZodLiteral<"collection_card.removed">, z.ZodLiteral<"collection_catalog.bulk_change">, z.ZodLiteral<"reporting.delivery_ready">, z.ZodLiteral<"reporting.status_changed">, z.ZodLiteral<"reporting.ledger_changed">, z.ZodLiteral<"proposal.created">]>>;
|
|
486
486
|
product_payload_view: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"canonical">, z.ZodLiteral<"legacy">]>>;
|
|
487
487
|
authentication: z.ZodOptional<z.ZodObject<{
|
|
488
488
|
schemes: z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"Bearer">, z.ZodLiteral<"HMAC-SHA256">]>], null>;
|
|
@@ -503,7 +503,7 @@ export declare const SyncCreativesSuccessStrictSchema: z.ZodObject<{
|
|
|
503
503
|
reporting_profile: z.ZodString;
|
|
504
504
|
scope: z.ZodObject<{
|
|
505
505
|
all_media_buys: z.ZodOptional<z.ZodLiteral<true>>;
|
|
506
|
-
media_buy_ids: z.ZodOptional<
|
|
506
|
+
media_buy_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
507
507
|
}, z.core.$loose>;
|
|
508
508
|
coverage_requirement: z.ZodUnion<readonly [z.ZodLiteral<"full">, z.ZodLiteral<"allow_partial">]>;
|
|
509
509
|
required_finality: z.ZodUnion<readonly [z.ZodLiteral<"snapshot">, z.ZodLiteral<"official">]>;
|
|
@@ -591,7 +591,7 @@ export declare const SyncCreativesSuccessStrictSchema: z.ZodObject<{
|
|
|
591
591
|
limitations: z.ZodArray<z.ZodObject<{
|
|
592
592
|
reason: z.ZodUnion<readonly [z.ZodLiteral<"offering_unsupported">, z.ZodLiteral<"account_entitlement_unavailable">, z.ZodLiteral<"credential_scope_insufficient">, z.ZodLiteral<"provider_limitation">, z.ZodLiteral<"capability_unknown">]>;
|
|
593
593
|
media_buy_id: z.ZodString;
|
|
594
|
-
package_ids: z.ZodOptional<
|
|
594
|
+
package_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
595
595
|
}, z.core.$strict>>;
|
|
596
596
|
}, z.core.$strict>>;
|
|
597
597
|
setup: z.ZodOptional<z.ZodObject<{
|
|
@@ -600,7 +600,7 @@ export declare const SyncCreativesSuccessStrictSchema: z.ZodObject<{
|
|
|
600
600
|
url: z.ZodOptional<z.ZodString>;
|
|
601
601
|
expires_at: z.ZodOptional<z.ZodString>;
|
|
602
602
|
}, z.core.$loose>>;
|
|
603
|
-
issues: z.ZodOptional<
|
|
603
|
+
issues: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodObject<{
|
|
604
604
|
issue_id: z.ZodString;
|
|
605
605
|
code: z.ZodUnion<readonly [z.ZodLiteral<"REPORT_OVERDUE">, z.ZodLiteral<"PRODUCTION_FAILED">, z.ZodLiteral<"DELIVERY_FAILED">, z.ZodLiteral<"ACCESS_REQUIRED">, z.ZodLiteral<"CONFIGURATION_REQUIRED">, z.ZodLiteral<"REPORTING_COVERAGE_INCOMPLETE">, z.ZodLiteral<"RESOURCE_EXPIRED">, z.ZodLiteral<"READER_INCOMPATIBLE">, z.ZodLiteral<"HISTORY_UNAVAILABLE">, z.ZodLiteral<"REVISION_UNREADABLE">, z.ZodLiteral<"RECEIPT_REQUIRED">, z.ZodLiteral<"RECEIPT_REJECTED">, z.ZodLiteral<"ADJUSTMENT_RECEIPT_REQUIRED">, z.ZodLiteral<"ADJUSTMENT_RECEIPT_REJECTED">, z.ZodLiteral<"CONSUMER_STATUS_MISMATCH">]>;
|
|
606
606
|
severity: z.ZodUnion<readonly [z.ZodLiteral<"delayed">, z.ZodLiteral<"action_required">]>;
|
|
@@ -616,8 +616,8 @@ export declare const SyncCreativesSuccessStrictSchema: z.ZodObject<{
|
|
|
616
616
|
delivery_config_id: z.ZodOptional<z.ZodString>;
|
|
617
617
|
delivery_config_version: z.ZodOptional<z.ZodNumber>;
|
|
618
618
|
feed_purpose: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pacing">, z.ZodLiteral<"analytics">, z.ZodLiteral<"billing">]>>;
|
|
619
|
-
media_buy_ids: z.ZodOptional<
|
|
620
|
-
package_ids: z.ZodOptional<
|
|
619
|
+
media_buy_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
620
|
+
package_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
621
621
|
period_start: z.ZodOptional<z.ZodString>;
|
|
622
622
|
period_end: z.ZodOptional<z.ZodString>;
|
|
623
623
|
expected_at: z.ZodOptional<z.ZodString>;
|
|
@@ -733,7 +733,7 @@ export declare const SyncCreativesResponseStrictSchema: z.ZodUnion<readonly [z.Z
|
|
|
733
733
|
brand: z.ZodOptional<z.ZodObject<{
|
|
734
734
|
domain: z.ZodString;
|
|
735
735
|
brand_id: z.ZodOptional<z.ZodString>;
|
|
736
|
-
countries: z.ZodOptional<
|
|
736
|
+
countries: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
737
737
|
industries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
738
738
|
data_subject_contestation: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
739
739
|
brand_kit_override: z.ZodOptional<z.ZodObject<{
|
|
@@ -848,7 +848,7 @@ export declare const SyncCreativesResponseStrictSchema: z.ZodUnion<readonly [z.Z
|
|
|
848
848
|
notification_configs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
849
849
|
subscriber_id: z.ZodString;
|
|
850
850
|
url: z.ZodString;
|
|
851
|
-
event_types:
|
|
851
|
+
event_types: import("./nonempty-array").NonemptyArraySchema<z.ZodUnion<readonly [z.ZodLiteral<"creative.status_changed">, z.ZodLiteral<"creative.assignment_changed">, z.ZodLiteral<"indicators.changed">, z.ZodLiteral<"creative.purged">, z.ZodLiteral<"account.status_changed">, z.ZodLiteral<"account.change_recorded">, z.ZodLiteral<"product.created">, z.ZodLiteral<"product.updated">, z.ZodLiteral<"product.priced">, z.ZodLiteral<"product.removed">, z.ZodLiteral<"signal.created">, z.ZodLiteral<"signal.updated">, z.ZodLiteral<"signal.priced">, z.ZodLiteral<"signal.removed">, z.ZodLiteral<"wholesale_feed.bulk_change">, z.ZodLiteral<"collection_card.updated">, z.ZodLiteral<"collection_card.removed">, z.ZodLiteral<"collection_catalog.bulk_change">, z.ZodLiteral<"reporting.delivery_ready">, z.ZodLiteral<"reporting.status_changed">, z.ZodLiteral<"reporting.ledger_changed">, z.ZodLiteral<"proposal.created">]>>;
|
|
852
852
|
product_payload_view: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"canonical">, z.ZodLiteral<"legacy">]>>;
|
|
853
853
|
authentication: z.ZodOptional<z.ZodObject<{
|
|
854
854
|
schemes: z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"Bearer">, z.ZodLiteral<"HMAC-SHA256">]>], null>;
|
|
@@ -869,7 +869,7 @@ export declare const SyncCreativesResponseStrictSchema: z.ZodUnion<readonly [z.Z
|
|
|
869
869
|
reporting_profile: z.ZodString;
|
|
870
870
|
scope: z.ZodObject<{
|
|
871
871
|
all_media_buys: z.ZodOptional<z.ZodLiteral<true>>;
|
|
872
|
-
media_buy_ids: z.ZodOptional<
|
|
872
|
+
media_buy_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
873
873
|
}, z.core.$loose>;
|
|
874
874
|
coverage_requirement: z.ZodUnion<readonly [z.ZodLiteral<"full">, z.ZodLiteral<"allow_partial">]>;
|
|
875
875
|
required_finality: z.ZodUnion<readonly [z.ZodLiteral<"snapshot">, z.ZodLiteral<"official">]>;
|
|
@@ -957,7 +957,7 @@ export declare const SyncCreativesResponseStrictSchema: z.ZodUnion<readonly [z.Z
|
|
|
957
957
|
limitations: z.ZodArray<z.ZodObject<{
|
|
958
958
|
reason: z.ZodUnion<readonly [z.ZodLiteral<"offering_unsupported">, z.ZodLiteral<"account_entitlement_unavailable">, z.ZodLiteral<"credential_scope_insufficient">, z.ZodLiteral<"provider_limitation">, z.ZodLiteral<"capability_unknown">]>;
|
|
959
959
|
media_buy_id: z.ZodString;
|
|
960
|
-
package_ids: z.ZodOptional<
|
|
960
|
+
package_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
961
961
|
}, z.core.$strict>>;
|
|
962
962
|
}, z.core.$strict>>;
|
|
963
963
|
setup: z.ZodOptional<z.ZodObject<{
|
|
@@ -966,7 +966,7 @@ export declare const SyncCreativesResponseStrictSchema: z.ZodUnion<readonly [z.Z
|
|
|
966
966
|
url: z.ZodOptional<z.ZodString>;
|
|
967
967
|
expires_at: z.ZodOptional<z.ZodString>;
|
|
968
968
|
}, z.core.$loose>>;
|
|
969
|
-
issues: z.ZodOptional<
|
|
969
|
+
issues: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodObject<{
|
|
970
970
|
issue_id: z.ZodString;
|
|
971
971
|
code: z.ZodUnion<readonly [z.ZodLiteral<"REPORT_OVERDUE">, z.ZodLiteral<"PRODUCTION_FAILED">, z.ZodLiteral<"DELIVERY_FAILED">, z.ZodLiteral<"ACCESS_REQUIRED">, z.ZodLiteral<"CONFIGURATION_REQUIRED">, z.ZodLiteral<"REPORTING_COVERAGE_INCOMPLETE">, z.ZodLiteral<"RESOURCE_EXPIRED">, z.ZodLiteral<"READER_INCOMPATIBLE">, z.ZodLiteral<"HISTORY_UNAVAILABLE">, z.ZodLiteral<"REVISION_UNREADABLE">, z.ZodLiteral<"RECEIPT_REQUIRED">, z.ZodLiteral<"RECEIPT_REJECTED">, z.ZodLiteral<"ADJUSTMENT_RECEIPT_REQUIRED">, z.ZodLiteral<"ADJUSTMENT_RECEIPT_REJECTED">, z.ZodLiteral<"CONSUMER_STATUS_MISMATCH">]>;
|
|
972
972
|
severity: z.ZodUnion<readonly [z.ZodLiteral<"delayed">, z.ZodLiteral<"action_required">]>;
|
|
@@ -982,8 +982,8 @@ export declare const SyncCreativesResponseStrictSchema: z.ZodUnion<readonly [z.Z
|
|
|
982
982
|
delivery_config_id: z.ZodOptional<z.ZodString>;
|
|
983
983
|
delivery_config_version: z.ZodOptional<z.ZodNumber>;
|
|
984
984
|
feed_purpose: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pacing">, z.ZodLiteral<"analytics">, z.ZodLiteral<"billing">]>>;
|
|
985
|
-
media_buy_ids: z.ZodOptional<
|
|
986
|
-
package_ids: z.ZodOptional<
|
|
985
|
+
media_buy_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
986
|
+
package_ids: z.ZodOptional<import("./nonempty-array").NonemptyArraySchema<z.ZodString>>;
|
|
987
987
|
period_start: z.ZodOptional<z.ZodString>;
|
|
988
988
|
period_end: z.ZodOptional<z.ZodString>;
|
|
989
989
|
expected_at: z.ZodOptional<z.ZodString>;
|
|
@@ -1075,7 +1075,7 @@ export declare const SyncCreativesResponseStrictSchema: z.ZodUnion<readonly [z.Z
|
|
|
1075
1075
|
context: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1076
1076
|
ext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1077
1077
|
}, z.core.$loose>, z.ZodObject<{
|
|
1078
|
-
errors:
|
|
1078
|
+
errors: import("./nonempty-array").NonemptyArraySchema<z.ZodObject<{
|
|
1079
1079
|
code: z.ZodString;
|
|
1080
1080
|
message: z.ZodString;
|
|
1081
1081
|
buyer_reason: z.ZodOptional<z.ZodObject<{
|
package/dist/lib/version.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "17.0.0-beta.
|
|
4
|
+
export declare const LIBRARY_VERSION = "17.0.0-beta.2";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "17.0.0-beta.
|
|
36
|
+
readonly library: "17.0.0-beta.2";
|
|
37
37
|
readonly adcp: "3.3.0-beta.0";
|
|
38
38
|
readonly compatibleVersions: readonly ["v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.1.25", "3.1.26", "3.1.27", "3.1.28", "3.1.29", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4", "3.2.5", "3.2.6", "3.2.7", "3.3.0-beta.0", "3.3-beta.0"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-27T06:33:58.733Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "17.0.0-beta.
|
|
4
|
+
export declare const LIBRARY_VERSION = "17.0.0-beta.2";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "17.0.0-beta.
|
|
36
|
+
readonly library: "17.0.0-beta.2";
|
|
37
37
|
readonly adcp: "3.3.0-beta.0";
|
|
38
38
|
readonly compatibleVersions: readonly ["v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.1.25", "3.1.26", "3.1.27", "3.1.28", "3.1.29", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4", "3.2.5", "3.2.6", "3.2.7", "3.3.0-beta.0", "3.3-beta.0"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-27T06:33:58.733Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(version_exports, {
|
|
|
31
31
|
toReleasePrecisionVersion: () => toReleasePrecisionVersion
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(version_exports);
|
|
34
|
-
const LIBRARY_VERSION = "17.0.0-beta.
|
|
34
|
+
const LIBRARY_VERSION = "17.0.0-beta.2";
|
|
35
35
|
const ADCP_VERSION = "3.3.0-beta.0";
|
|
36
36
|
const ADCP_MAJOR_VERSION = 3;
|
|
37
37
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -106,10 +106,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
106
106
|
"3.3-beta.0"
|
|
107
107
|
];
|
|
108
108
|
const VERSION_INFO = {
|
|
109
|
-
library: "17.0.0-beta.
|
|
109
|
+
library: "17.0.0-beta.2",
|
|
110
110
|
adcp: "3.3.0-beta.0",
|
|
111
111
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
112
|
-
generatedAt: "2026-10-
|
|
112
|
+
generatedAt: "2026-10-27T06:33:58.733Z"
|
|
113
113
|
};
|
|
114
114
|
function getAdcpVersion() {
|
|
115
115
|
return ADCP_VERSION;
|
package/dist/lib/version.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const LIBRARY_VERSION = "17.0.0-beta.
|
|
1
|
+
const LIBRARY_VERSION = "17.0.0-beta.2";
|
|
2
2
|
const ADCP_VERSION = "3.3.0-beta.0";
|
|
3
3
|
const ADCP_MAJOR_VERSION = 3;
|
|
4
4
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -73,10 +73,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
73
73
|
"3.3-beta.0"
|
|
74
74
|
];
|
|
75
75
|
const VERSION_INFO = {
|
|
76
|
-
library: "17.0.0-beta.
|
|
76
|
+
library: "17.0.0-beta.2",
|
|
77
77
|
adcp: "3.3.0-beta.0",
|
|
78
78
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
79
|
-
generatedAt: "2026-10-
|
|
79
|
+
generatedAt: "2026-10-27T06:33:58.733Z"
|
|
80
80
|
};
|
|
81
81
|
function getAdcpVersion() {
|
|
82
82
|
return ADCP_VERSION;
|
|
@@ -74,3 +74,6 @@ export type PreflightWebhookRequestResult = {
|
|
|
74
74
|
};
|
|
75
75
|
/** Validate headers and freshness before looking up a secret. Success does not authenticate the request. */
|
|
76
76
|
export declare function preflightWebhookRequest(request: PreflightWebhookRequest, options?: PreflightWebhookRequestOptions): PreflightWebhookRequestResult;
|
|
77
|
+
export { parseMediaBuyDeliveryWebhook } from './media-buy-delivery.mjs';
|
|
78
|
+
export type { ParseMediaBuyDeliveryWebhookOptions, MediaBuyDeliveryWebhookEnvelope, MediaBuyDeliveryWebhookParseErrorCode, MediaBuyDeliveryWebhookParseResult, } from './media-buy-delivery.mjs';
|
|
79
|
+
export type { MediaBuyDeliveryReport } from '../types/media-buy-delivery-report.mjs';
|
|
@@ -74,3 +74,6 @@ export type PreflightWebhookRequestResult = {
|
|
|
74
74
|
};
|
|
75
75
|
/** Validate headers and freshness before looking up a secret. Success does not authenticate the request. */
|
|
76
76
|
export declare function preflightWebhookRequest(request: PreflightWebhookRequest, options?: PreflightWebhookRequestOptions): PreflightWebhookRequestResult;
|
|
77
|
+
export { parseMediaBuyDeliveryWebhook } from './media-buy-delivery';
|
|
78
|
+
export type { ParseMediaBuyDeliveryWebhookOptions, MediaBuyDeliveryWebhookEnvelope, MediaBuyDeliveryWebhookParseErrorCode, MediaBuyDeliveryWebhookParseResult, } from './media-buy-delivery';
|
|
79
|
+
export type { MediaBuyDeliveryReport } from '../types/media-buy-delivery-report';
|
|
@@ -21,6 +21,7 @@ var webhooks_exports = {};
|
|
|
21
21
|
__export(webhooks_exports, {
|
|
22
22
|
WholesaleFeedWebhookNotificationError: () => import_webhook_notification.WholesaleFeedWebhookNotificationError,
|
|
23
23
|
normalizeWholesaleFeedWebhookNotification: () => import_webhook_notification.normalizeWholesaleFeedWebhookNotification,
|
|
24
|
+
parseMediaBuyDeliveryWebhook: () => import_media_buy_delivery.parseMediaBuyDeliveryWebhook,
|
|
24
25
|
parseWholesaleFeedWebhookNotification: () => import_webhook_notification.parseWholesaleFeedWebhookNotification,
|
|
25
26
|
preflightWebhookRequest: () => preflightWebhookRequest,
|
|
26
27
|
verifyWebhookRequest: () => verifyWebhookRequest
|
|
@@ -29,6 +30,7 @@ module.exports = __toCommonJS(webhooks_exports);
|
|
|
29
30
|
var import_crypto = require("crypto");
|
|
30
31
|
__reExport(webhooks_exports, require('../notifications/account-change-recorded.js'), module.exports);
|
|
31
32
|
var import_webhook_notification = require('../wholesale-feed-sync/webhook-notification.js');
|
|
33
|
+
var import_media_buy_delivery = require('./media-buy-delivery.js');
|
|
32
34
|
function verifyWebhookRequest(options) {
|
|
33
35
|
const preflight = preflightWebhookRequest(options, {
|
|
34
36
|
now: options.now,
|
|
@@ -172,6 +174,7 @@ function isHeaders(headers) {
|
|
|
172
174
|
0 && (module.exports = {
|
|
173
175
|
WholesaleFeedWebhookNotificationError,
|
|
174
176
|
normalizeWholesaleFeedWebhookNotification,
|
|
177
|
+
parseMediaBuyDeliveryWebhook,
|
|
175
178
|
parseWholesaleFeedWebhookNotification,
|
|
176
179
|
preflightWebhookRequest,
|
|
177
180
|
verifyWebhookRequest,
|
|
@@ -144,9 +144,11 @@ function normalizeHeaderValue(value) {
|
|
|
144
144
|
function isHeaders(headers) {
|
|
145
145
|
return typeof headers.get === "function";
|
|
146
146
|
}
|
|
147
|
+
import { parseMediaBuyDeliveryWebhook } from "./media-buy-delivery.mjs";
|
|
147
148
|
export {
|
|
148
149
|
WholesaleFeedWebhookNotificationError,
|
|
149
150
|
normalizeWholesaleFeedWebhookNotification,
|
|
151
|
+
parseMediaBuyDeliveryWebhook,
|
|
150
152
|
parseWholesaleFeedWebhookNotification,
|
|
151
153
|
preflightWebhookRequest,
|
|
152
154
|
verifyWebhookRequest
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { MCPWebhookPayload } from '../types/core.generated.mjs';
|
|
2
|
+
import type { MediaBuyDeliveryReport } from '../types/media-buy-delivery-report.mjs';
|
|
3
|
+
export interface ParseMediaBuyDeliveryWebhookOptions {
|
|
4
|
+
/** Trusted release negotiated with the seller. Defaults to the SDK pin; never read from the body. */
|
|
5
|
+
adcpVersion?: string;
|
|
6
|
+
/** Accept an unenveloped report and mark its wire format. Defaults to false. */
|
|
7
|
+
acceptBareDeliveryReport?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** AdCP 3.0 permits operation_id to be absent. No missing envelope fields are synthesized. */
|
|
10
|
+
export type MediaBuyDeliveryWebhookEnvelope = Omit<MCPWebhookPayload, 'result' | 'task_type' | 'operation_id'> & {
|
|
11
|
+
task_type: 'media_buy_delivery';
|
|
12
|
+
operation_id?: string;
|
|
13
|
+
result: MediaBuyDeliveryReport;
|
|
14
|
+
};
|
|
15
|
+
export type MediaBuyDeliveryWebhookParseErrorCode = 'webhook_envelope_invalid' | 'webhook_result_invalid' | 'webhook_unsupported_payload';
|
|
16
|
+
export type MediaBuyDeliveryWebhookParseResult = {
|
|
17
|
+
ok: true;
|
|
18
|
+
wireFormat: 'mcp_envelope';
|
|
19
|
+
adcpVersion: string;
|
|
20
|
+
envelope: MediaBuyDeliveryWebhookEnvelope;
|
|
21
|
+
result: MediaBuyDeliveryReport;
|
|
22
|
+
} | {
|
|
23
|
+
ok: true;
|
|
24
|
+
wireFormat: 'bare_delivery_report';
|
|
25
|
+
adcpVersion: string;
|
|
26
|
+
envelope?: undefined;
|
|
27
|
+
result: MediaBuyDeliveryReport;
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
code: MediaBuyDeliveryWebhookParseErrorCode;
|
|
31
|
+
message: string;
|
|
32
|
+
errors: readonly string[];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Validate an ALREADY AUTHENTICATED delivery webhook. This performs no signature,
|
|
36
|
+
* sender, registration, or replay verification. Verify the original request bytes
|
|
37
|
+
* first and select adcpVersion from trusted seller/buy state. Malformed bodies
|
|
38
|
+
* return diagnostics; invalid version configuration throws ConfigurationError.
|
|
39
|
+
*
|
|
40
|
+
* Envelope status follows the selected release's task-status enum. A delayed
|
|
41
|
+
* notification may use working; notification_type is independent of task status.
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseMediaBuyDeliveryWebhook(body: unknown, options?: ParseMediaBuyDeliveryWebhookOptions): MediaBuyDeliveryWebhookParseResult;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { MCPWebhookPayload } from '../types/core.generated';
|
|
2
|
+
import type { MediaBuyDeliveryReport } from '../types/media-buy-delivery-report';
|
|
3
|
+
export interface ParseMediaBuyDeliveryWebhookOptions {
|
|
4
|
+
/** Trusted release negotiated with the seller. Defaults to the SDK pin; never read from the body. */
|
|
5
|
+
adcpVersion?: string;
|
|
6
|
+
/** Accept an unenveloped report and mark its wire format. Defaults to false. */
|
|
7
|
+
acceptBareDeliveryReport?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** AdCP 3.0 permits operation_id to be absent. No missing envelope fields are synthesized. */
|
|
10
|
+
export type MediaBuyDeliveryWebhookEnvelope = Omit<MCPWebhookPayload, 'result' | 'task_type' | 'operation_id'> & {
|
|
11
|
+
task_type: 'media_buy_delivery';
|
|
12
|
+
operation_id?: string;
|
|
13
|
+
result: MediaBuyDeliveryReport;
|
|
14
|
+
};
|
|
15
|
+
export type MediaBuyDeliveryWebhookParseErrorCode = 'webhook_envelope_invalid' | 'webhook_result_invalid' | 'webhook_unsupported_payload';
|
|
16
|
+
export type MediaBuyDeliveryWebhookParseResult = {
|
|
17
|
+
ok: true;
|
|
18
|
+
wireFormat: 'mcp_envelope';
|
|
19
|
+
adcpVersion: string;
|
|
20
|
+
envelope: MediaBuyDeliveryWebhookEnvelope;
|
|
21
|
+
result: MediaBuyDeliveryReport;
|
|
22
|
+
} | {
|
|
23
|
+
ok: true;
|
|
24
|
+
wireFormat: 'bare_delivery_report';
|
|
25
|
+
adcpVersion: string;
|
|
26
|
+
envelope?: undefined;
|
|
27
|
+
result: MediaBuyDeliveryReport;
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
code: MediaBuyDeliveryWebhookParseErrorCode;
|
|
31
|
+
message: string;
|
|
32
|
+
errors: readonly string[];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Validate an ALREADY AUTHENTICATED delivery webhook. This performs no signature,
|
|
36
|
+
* sender, registration, or replay verification. Verify the original request bytes
|
|
37
|
+
* first and select adcpVersion from trusted seller/buy state. Malformed bodies
|
|
38
|
+
* return diagnostics; invalid version configuration throws ConfigurationError.
|
|
39
|
+
*
|
|
40
|
+
* Envelope status follows the selected release's task-status enum. A delayed
|
|
41
|
+
* notification may use working; notification_type is independent of task status.
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseMediaBuyDeliveryWebhook(body: unknown, options?: ParseMediaBuyDeliveryWebhookOptions): MediaBuyDeliveryWebhookParseResult;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var media_buy_delivery_exports = {};
|
|
20
|
+
__export(media_buy_delivery_exports, {
|
|
21
|
+
parseMediaBuyDeliveryWebhook: () => parseMediaBuyDeliveryWebhook,
|
|
22
|
+
prepareMediaBuyDeliveryWebhookValidation: () => prepareMediaBuyDeliveryWebhookValidation
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(media_buy_delivery_exports);
|
|
25
|
+
var import_node_util = require("node:util");
|
|
26
|
+
var import_account_change_json = require('../client/account-change-json.js');
|
|
27
|
+
var import_errors = require('../errors/index.js');
|
|
28
|
+
var import_adcp_version_config = require('../utils/adcp-version-config.js');
|
|
29
|
+
var import_schema_loader = require('../validation/schema-loader.js');
|
|
30
|
+
const MAX_BODY_BYTES = 16 * 1024 * 1024;
|
|
31
|
+
const ENVELOPE_FIELDS = ["result", "task_type", "task_id", "operation_id", "idempotency_key", "timestamp"];
|
|
32
|
+
function prepareMediaBuyDeliveryWebhookValidation(version) {
|
|
33
|
+
const adcpVersion = (0, import_adcp_version_config.resolveAdcpVersion)(version);
|
|
34
|
+
const validateEnvelope = (0, import_schema_loader.getMediaBuyDeliveryEnvelopeValidator)(adcpVersion);
|
|
35
|
+
const validateResult = (0, import_schema_loader.getSchemaValidatorByRef)(
|
|
36
|
+
(0, import_adcp_version_config.isPre31AdcpVersion)(adcpVersion) ? "media-buy/get-media-buy-delivery-response.json" : "media-buy/media-buy-delivery-webhook-result.json",
|
|
37
|
+
adcpVersion
|
|
38
|
+
);
|
|
39
|
+
if (!validateEnvelope || !validateResult) {
|
|
40
|
+
throw new import_errors.ConfigurationError("Bundled delivery webhook schemas are unavailable.", "adcpVersion");
|
|
41
|
+
}
|
|
42
|
+
return { adcpVersion, validateEnvelope, validateResult };
|
|
43
|
+
}
|
|
44
|
+
function parseMediaBuyDeliveryWebhook(body, options = {}) {
|
|
45
|
+
const { adcpVersion, validateEnvelope, validateResult } = prepareMediaBuyDeliveryWebhookValidation(
|
|
46
|
+
options.adcpVersion
|
|
47
|
+
);
|
|
48
|
+
let parsed;
|
|
49
|
+
try {
|
|
50
|
+
if (typeof body === "string" || body instanceof Uint8Array) {
|
|
51
|
+
if ((typeof body === "string" ? Buffer.byteLength(body) : body.byteLength) > MAX_BODY_BYTES) {
|
|
52
|
+
throw new Error("Body is too large");
|
|
53
|
+
}
|
|
54
|
+
parsed = JSON.parse(
|
|
55
|
+
typeof body === "string" ? body : new import_node_util.TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(body)
|
|
56
|
+
);
|
|
57
|
+
} else {
|
|
58
|
+
parsed = body;
|
|
59
|
+
}
|
|
60
|
+
(0, import_account_change_json.assertAccountChangeJsonSize)(parsed, MAX_BODY_BYTES);
|
|
61
|
+
parsed = structuredClone(parsed);
|
|
62
|
+
} catch {
|
|
63
|
+
return failure("webhook_envelope_invalid", [
|
|
64
|
+
"Webhook body must be valid JSON within 16 MiB and 64 nesting levels."
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
68
|
+
return failure("webhook_envelope_invalid", ["Webhook body must be an object."]);
|
|
69
|
+
}
|
|
70
|
+
const envelope = parsed;
|
|
71
|
+
const bare = Object.hasOwn(envelope, "media_buy_deliveries") && !ENVELOPE_FIELDS.some((field) => Object.hasOwn(envelope, field));
|
|
72
|
+
if (bare && options.acceptBareDeliveryReport !== true) {
|
|
73
|
+
return failure("webhook_unsupported_payload", [
|
|
74
|
+
"Bare delivery reports require acceptBareDeliveryReport: true; the default expects an MCP envelope with result."
|
|
75
|
+
]);
|
|
76
|
+
}
|
|
77
|
+
if (!bare) {
|
|
78
|
+
if (typeof envelope.task_type === "string" && envelope.task_type !== "media_buy_delivery") {
|
|
79
|
+
return failure("webhook_unsupported_payload", ["task_type must be media_buy_delivery."]);
|
|
80
|
+
}
|
|
81
|
+
if (!validateEnvelope(envelope)) return failure("webhook_envelope_invalid", diagnostics(validateEnvelope.errors));
|
|
82
|
+
}
|
|
83
|
+
const result = bare ? envelope : envelope.result;
|
|
84
|
+
if (!validateResult(result))
|
|
85
|
+
return failure("webhook_result_invalid", diagnostics(validateResult.errors, bare ? "" : "result"));
|
|
86
|
+
if (bare)
|
|
87
|
+
return { ok: true, wireFormat: "bare_delivery_report", adcpVersion, result };
|
|
88
|
+
return {
|
|
89
|
+
ok: true,
|
|
90
|
+
wireFormat: "mcp_envelope",
|
|
91
|
+
adcpVersion,
|
|
92
|
+
envelope,
|
|
93
|
+
result
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function failure(code, errors) {
|
|
97
|
+
return { ok: false, code, message: errors.join("; "), errors };
|
|
98
|
+
}
|
|
99
|
+
function diagnostics(errors, prefix = "") {
|
|
100
|
+
if (!errors?.length) return [`${prefix || "body"} is invalid`];
|
|
101
|
+
return errors.slice(0, 20).map((error) => {
|
|
102
|
+
const fields = error.instancePath.split("/").slice(1).map((field) => field.replace(/~1/g, "/").replace(/~0/g, "~"));
|
|
103
|
+
if (error.keyword === "required" && typeof error.params.missingProperty === "string")
|
|
104
|
+
fields.push(error.params.missingProperty);
|
|
105
|
+
if (error.keyword === "additionalProperties" && typeof error.params.additionalProperty === "string")
|
|
106
|
+
fields.push(error.params.additionalProperty);
|
|
107
|
+
let path = prefix;
|
|
108
|
+
for (const field of fields) {
|
|
109
|
+
const bounded = field.length > 80 ? field.slice(0, 80) + "\u2026" : field;
|
|
110
|
+
path += /^(0|[1-9][0-9]*)$/.test(bounded) ? `[${bounded}]` : /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(bounded) ? `${path ? "." : ""}${bounded}` : `[${JSON.stringify(bounded)}]`;
|
|
111
|
+
}
|
|
112
|
+
return `${path || "body"} ${error.keyword === "required" ? "is required" : error.message ?? "is invalid"}`;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
116
|
+
0 && (module.exports = {
|
|
117
|
+
parseMediaBuyDeliveryWebhook,
|
|
118
|
+
prepareMediaBuyDeliveryWebhookValidation
|
|
119
|
+
});
|