@adcp/client 4.14.0 → 4.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/adcp.js +2 -0
- package/dist/lib/adapters/governance-adapter.d.ts +2 -2
- package/dist/lib/adapters/governance-adapter.d.ts.map +1 -1
- package/dist/lib/adapters/governance-adapter.js +1 -3
- package/dist/lib/adapters/governance-adapter.js.map +1 -1
- package/dist/lib/adapters/si-session-manager.d.ts.map +1 -1
- package/dist/lib/adapters/si-session-manager.js +8 -3
- package/dist/lib/adapters/si-session-manager.js.map +1 -1
- package/dist/lib/agents/index.generated.d.ts +9 -1
- package/dist/lib/agents/index.generated.d.ts.map +1 -1
- package/dist/lib/agents/index.generated.js +12 -0
- package/dist/lib/agents/index.generated.js.map +1 -1
- package/dist/lib/core/ADCPMultiAgentClient.d.ts.map +1 -1
- package/dist/lib/core/ADCPMultiAgentClient.js +10 -3
- package/dist/lib/core/ADCPMultiAgentClient.js.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/AsyncHandler.d.ts.map +1 -1
- package/dist/lib/core/AsyncHandler.js +1 -1
- package/dist/lib/core/AsyncHandler.js.map +1 -1
- package/dist/lib/core/GovernanceMiddleware.d.ts +2 -10
- package/dist/lib/core/GovernanceMiddleware.d.ts.map +1 -1
- package/dist/lib/core/GovernanceMiddleware.js +8 -51
- package/dist/lib/core/GovernanceMiddleware.js.map +1 -1
- package/dist/lib/core/GovernanceTypes.d.ts +4 -4
- package/dist/lib/core/GovernanceTypes.d.ts.map +1 -1
- package/dist/lib/core/GovernanceTypes.js +1 -0
- package/dist/lib/core/GovernanceTypes.js.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +7 -4
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/TaskExecutor.d.ts +4 -0
- package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
- package/dist/lib/core/TaskExecutor.js +61 -18
- package/dist/lib/core/TaskExecutor.js.map +1 -1
- package/dist/lib/index.d.ts +5 -3
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +12 -6
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/protocols/index.d.ts +1 -0
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +14 -4
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/mcp-tasks.d.ts +55 -0
- package/dist/lib/protocols/mcp-tasks.d.ts.map +1 -0
- package/dist/lib/protocols/mcp-tasks.js +334 -0
- package/dist/lib/protocols/mcp-tasks.js.map +1 -0
- package/dist/lib/protocols/mcp.d.ts +9 -0
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +4 -0
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/registry/types.generated.d.ts +9 -9
- package/dist/lib/registry/types.generated.d.ts.map +1 -1
- package/dist/lib/registry/types.generated.js +1 -1
- package/dist/lib/server/index.d.ts +2 -0
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +7 -1
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/tasks.d.ts +86 -0
- package/dist/lib/server/tasks.d.ts.map +1 -0
- package/dist/lib/server/tasks.js +110 -0
- package/dist/lib/server/tasks.js.map +1 -0
- package/dist/lib/testing/agent-tester.d.ts +1 -1
- package/dist/lib/testing/agent-tester.d.ts.map +1 -1
- package/dist/lib/testing/agent-tester.js +52 -2
- package/dist/lib/testing/agent-tester.js.map +1 -1
- package/dist/lib/testing/client.d.ts +18 -0
- package/dist/lib/testing/client.d.ts.map +1 -1
- package/dist/lib/testing/client.js +39 -1
- package/dist/lib/testing/client.js.map +1 -1
- package/dist/lib/testing/compliance/comply.d.ts +4 -0
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +406 -173
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/types.d.ts +7 -1
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/index.d.ts +3 -1
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js +13 -2
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/orchestrator.d.ts +4 -0
- package/dist/lib/testing/orchestrator.d.ts.map +1 -1
- package/dist/lib/testing/orchestrator.js +19 -2
- package/dist/lib/testing/orchestrator.js.map +1 -1
- package/dist/lib/testing/scenarios/capabilities.js +2 -2
- package/dist/lib/testing/scenarios/capabilities.js.map +1 -1
- package/dist/lib/testing/scenarios/creative.js +4 -4
- package/dist/lib/testing/scenarios/creative.js.map +1 -1
- package/dist/lib/testing/scenarios/deterministic.d.ts +37 -0
- package/dist/lib/testing/scenarios/deterministic.d.ts.map +1 -0
- package/dist/lib/testing/scenarios/deterministic.js +705 -0
- package/dist/lib/testing/scenarios/deterministic.js.map +1 -0
- package/dist/lib/testing/scenarios/discovery.js +2 -2
- package/dist/lib/testing/scenarios/discovery.js.map +1 -1
- package/dist/lib/testing/scenarios/edge-cases.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/edge-cases.js +18 -25
- package/dist/lib/testing/scenarios/edge-cases.js.map +1 -1
- package/dist/lib/testing/scenarios/error-compliance.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/error-compliance.js +9 -13
- package/dist/lib/testing/scenarios/error-compliance.js.map +1 -1
- package/dist/lib/testing/scenarios/governance.d.ts +15 -0
- package/dist/lib/testing/scenarios/governance.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/governance.js +386 -49
- package/dist/lib/testing/scenarios/governance.js.map +1 -1
- package/dist/lib/testing/scenarios/health.js +2 -2
- package/dist/lib/testing/scenarios/health.js.map +1 -1
- package/dist/lib/testing/scenarios/index.d.ts +2 -1
- package/dist/lib/testing/scenarios/index.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/index.js +12 -1
- package/dist/lib/testing/scenarios/index.js.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/media-buy.js +258 -31
- package/dist/lib/testing/scenarios/media-buy.js.map +1 -1
- package/dist/lib/testing/scenarios/schema-compliance.js +2 -2
- package/dist/lib/testing/scenarios/schema-compliance.js.map +1 -1
- package/dist/lib/testing/scenarios/signals.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/signals.js +35 -2
- package/dist/lib/testing/scenarios/signals.js.map +1 -1
- package/dist/lib/testing/scenarios/sponsored-intelligence.d.ts.map +1 -1
- package/dist/lib/testing/scenarios/sponsored-intelligence.js +8 -7
- package/dist/lib/testing/scenarios/sponsored-intelligence.js.map +1 -1
- package/dist/lib/testing/stubs/governance-agent-stub.d.ts +72 -0
- package/dist/lib/testing/stubs/governance-agent-stub.d.ts.map +1 -0
- package/dist/lib/testing/stubs/governance-agent-stub.js +295 -0
- package/dist/lib/testing/stubs/governance-agent-stub.js.map +1 -0
- package/dist/lib/testing/stubs/index.d.ts +3 -0
- package/dist/lib/testing/stubs/index.d.ts.map +1 -0
- package/dist/lib/testing/stubs/index.js +6 -0
- package/dist/lib/testing/stubs/index.js.map +1 -0
- package/dist/lib/testing/test-controller.d.ts +46 -0
- package/dist/lib/testing/test-controller.d.ts.map +1 -0
- package/dist/lib/testing/test-controller.js +143 -0
- package/dist/lib/testing/test-controller.js.map +1 -0
- package/dist/lib/testing/types.d.ts +8 -1
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/types/core.generated.d.ts +562 -97
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +1 -1
- package/dist/lib/types/error-codes.d.ts +4 -4
- package/dist/lib/types/error-codes.d.ts.map +1 -1
- package/dist/lib/types/error-codes.js +26 -2
- package/dist/lib/types/error-codes.js.map +1 -1
- package/dist/lib/types/schemas.generated.d.ts +4625 -8682
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +711 -403
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +1188 -405
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/utils/response-schemas.d.ts.map +1 -1
- package/dist/lib/utils/response-schemas.js +2 -0
- package/dist/lib/utils/response-schemas.js.map +1 -1
- package/dist/lib/utils/response-unwrapper.d.ts.map +1 -1
- package/dist/lib/utils/response-unwrapper.js +12 -0
- package/dist/lib/utils/response-unwrapper.js.map +1 -1
- package/dist/lib/utils/union-errors.d.ts +16 -0
- package/dist/lib/utils/union-errors.d.ts.map +1 -0
- package/dist/lib/utils/union-errors.js +34 -0
- package/dist/lib/utils/union-errors.js.map +1 -0
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/package.json +1 -1
|
@@ -184,9 +184,9 @@ export interface GetProductsRequest {
|
|
|
184
184
|
*/
|
|
185
185
|
id: string;
|
|
186
186
|
/**
|
|
187
|
-
* 'include': return this proposal with updated allocations and pricing. 'omit': exclude this proposal from the response.
|
|
187
|
+
* 'include': return this proposal with updated allocations and pricing. 'omit': exclude this proposal from the response. 'finalize': request firm pricing and inventory hold — transitions a draft proposal to committed with an expires_at hold window. May trigger seller-side approval (HITL). The buyer should not set a time_budget for finalize requests — they represent a commitment to wait for the result.
|
|
188
188
|
*/
|
|
189
|
-
action: 'include' | 'omit';
|
|
189
|
+
action: 'include' | 'omit' | 'finalize';
|
|
190
190
|
/**
|
|
191
191
|
* What the buyer is asking for on this proposal (e.g., 'shift more budget toward video', 'reduce total by 10%'). Ignored when action is 'omit'.
|
|
192
192
|
*/
|
|
@@ -195,10 +195,6 @@ export interface GetProductsRequest {
|
|
|
195
195
|
brand?: BrandReference;
|
|
196
196
|
catalog?: Catalog;
|
|
197
197
|
account?: AccountReference;
|
|
198
|
-
/**
|
|
199
|
-
* Buyer's campaign reference label. Groups related discovery and buy operations under a single campaign for CRM and ad server correlation (e.g., 'NovaDrink_Meals_Q2').
|
|
200
|
-
*/
|
|
201
|
-
buyer_campaign_ref?: string;
|
|
202
198
|
/**
|
|
203
199
|
* Delivery types the buyer prefers, in priority order. Unlike filters.delivery_type which excludes non-matching products, this signals preference for curation — the publisher may still include other delivery types when they match the brief well.
|
|
204
200
|
*/
|
|
@@ -208,7 +204,7 @@ export interface GetProductsRequest {
|
|
|
208
204
|
/**
|
|
209
205
|
* Specific product fields to include in the response. When omitted, all fields are returned. Use for lightweight discovery calls where only a subset of product data is needed (e.g., just IDs and pricing for comparison). Required fields (product_id, name) are always included regardless of selection.
|
|
210
206
|
*/
|
|
211
|
-
fields?: ('product_id' | 'name' | 'description' | 'publisher_properties' | 'channels' | 'format_ids' | 'placements' | 'delivery_type' | 'exclusivity' | 'pricing_options' | 'forecast' | 'outcome_measurement' | 'delivery_measurement' | 'reporting_capabilities' | 'creative_policy' | 'catalog_types' | 'metric_optimization' | 'conversion_tracking' | 'data_provider_signals' | 'max_optimization_goals' | 'catalog_match' | '
|
|
207
|
+
fields?: ('product_id' | 'name' | 'description' | 'publisher_properties' | 'channels' | 'format_ids' | 'placements' | 'delivery_type' | 'exclusivity' | 'pricing_options' | 'forecast' | 'outcome_measurement' | 'delivery_measurement' | 'reporting_capabilities' | 'creative_policy' | 'catalog_types' | 'metric_optimization' | 'conversion_tracking' | 'data_provider_signals' | 'max_optimization_goals' | 'catalog_match' | 'collections' | 'collection_targeting_allowed' | 'installments' | 'brief_relevance' | 'expires_at' | 'product_card' | 'product_card_detailed' | 'enforced_policies')[];
|
|
212
208
|
/**
|
|
213
209
|
* Maximum time the buyer will commit to this request. The seller returns the best results achievable within this budget and does not start processes (human approvals, expensive external queries) that cannot complete in time. When omitted, the seller decides timing.
|
|
214
210
|
*/
|
|
@@ -575,6 +571,10 @@ export type PropertyTag = string;
|
|
|
575
571
|
* A pricing model option offered by a publisher for a product. Discriminated by pricing_model field. If fixed_price is present, it's fixed pricing. If absent, it's auction-based (floor_price and price_guidance optional). Bid-based auction models may also include max_bid as a boolean signal to interpret bid_price as a buyer ceiling instead of an exact honored price.
|
|
576
572
|
*/
|
|
577
573
|
export type PricingOption = CPMPricingOption | VCPMPricingOption | CPCPricingOption | CPCVPricingOption | CPVPricingOption | CPPPricingOption | CPAPricingOption | FlatRatePricingOption | TimeBasedPricingOption;
|
|
574
|
+
/**
|
|
575
|
+
* Categorizes how a price adjustment affects the transaction
|
|
576
|
+
*/
|
|
577
|
+
export type PriceAdjustmentKind = 'fee' | 'discount' | 'commission' | 'settlement';
|
|
578
578
|
/**
|
|
579
579
|
* Measurement system for the demographic field. Defaults to nielsen when omitted.
|
|
580
580
|
*/
|
|
@@ -646,14 +646,18 @@ export type DataProviderSignalSelector = {
|
|
|
646
646
|
*/
|
|
647
647
|
signal_tags: string[];
|
|
648
648
|
};
|
|
649
|
+
/**
|
|
650
|
+
* Overall measurement readiness level for this product given the buyer's event setup. 'insufficient' means the product cannot optimize effectively with the current setup.
|
|
651
|
+
*/
|
|
652
|
+
export type AssessmentStatus = 'insufficient' | 'minimum' | 'good' | 'excellent';
|
|
649
653
|
/**
|
|
650
654
|
* Where the conversion event originated
|
|
651
655
|
*/
|
|
652
656
|
export type ActionSource = 'website' | 'app' | 'offline' | 'phone_call' | 'chat' | 'email' | 'in_store' | 'system_generated' | 'other';
|
|
653
657
|
/**
|
|
654
|
-
* Lifecycle status of the
|
|
658
|
+
* Lifecycle status of the installment
|
|
655
659
|
*/
|
|
656
|
-
export type
|
|
660
|
+
export type InstallmentStatus = 'scheduled' | 'tentative' | 'live' | 'postponed' | 'cancelled' | 'aired' | 'published';
|
|
657
661
|
/**
|
|
658
662
|
* Rating system used
|
|
659
663
|
*/
|
|
@@ -663,17 +667,25 @@ export type ContentRatingSystem = 'tv_parental' | 'mpaa' | 'podcast' | 'esrb' |
|
|
|
663
667
|
*/
|
|
664
668
|
export type SpecialCategory = 'awards' | 'championship' | 'concert' | 'conference' | 'election' | 'festival' | 'gala' | 'holiday' | 'premiere' | 'product_launch' | 'reunion' | 'tribute';
|
|
665
669
|
/**
|
|
666
|
-
* Role of this person on the
|
|
670
|
+
* Role of this person on the collection or installment
|
|
667
671
|
*/
|
|
668
672
|
export type TalentRole = 'host' | 'guest' | 'creator' | 'cast' | 'narrator' | 'producer' | 'correspondent' | 'commentator' | 'analyst';
|
|
669
673
|
/**
|
|
670
674
|
* What kind of derivative content this is
|
|
671
675
|
*/
|
|
672
676
|
export type DerivativeType = 'clip' | 'highlight' | 'recap' | 'trailer' | 'bonus';
|
|
677
|
+
/**
|
|
678
|
+
* What the publisher wants back from a TMP context match. Determines the richness level of the buyer's offer response.
|
|
679
|
+
*/
|
|
680
|
+
export type TMPResponseType = 'activation' | 'catalog_items' | 'creative' | 'deal';
|
|
673
681
|
/**
|
|
674
682
|
* Days of the week for daypart targeting
|
|
675
683
|
*/
|
|
676
684
|
export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
685
|
+
/**
|
|
686
|
+
* Lifecycle status of this proposal. When absent, the proposal is ready to buy (backward compatible). 'draft' means indicative pricing — finalize via refine before purchasing. 'committed' means firm pricing with inventory reserved until expires_at.
|
|
687
|
+
*/
|
|
688
|
+
export type ProposalStatus = 'draft' | 'committed';
|
|
677
689
|
/**
|
|
678
690
|
* Response payload for get_products task
|
|
679
691
|
*/
|
|
@@ -844,6 +856,7 @@ export interface Product {
|
|
|
844
856
|
* Maximum number of optimization_goals this product accepts on a package. When absent, no limit is declared. Most social platforms accept only 1 goal — buyers sending arrays longer than this value should expect the seller to use only the highest-priority (lowest priority number) goal.
|
|
845
857
|
*/
|
|
846
858
|
max_optimization_goals?: number;
|
|
859
|
+
measurement_readiness?: MeasurementReadiness;
|
|
847
860
|
/**
|
|
848
861
|
* Conversion event tracking for this product. Presence indicates the product supports optimization_goals with kind: 'event'. Seller-level capabilities (supported event types, UID types, attribution windows) are declared in get_adcp_capabilities.
|
|
849
862
|
*/
|
|
@@ -887,7 +900,7 @@ export interface Product {
|
|
|
887
900
|
*/
|
|
888
901
|
brief_relevance?: string;
|
|
889
902
|
/**
|
|
890
|
-
* Expiration timestamp for
|
|
903
|
+
* Expiration timestamp. After this time, the product may no longer be available for purchase and create_media_buy may reject packages referencing it.
|
|
891
904
|
*/
|
|
892
905
|
expires_at?: string;
|
|
893
906
|
/**
|
|
@@ -911,21 +924,60 @@ export interface Product {
|
|
|
911
924
|
manifest: {};
|
|
912
925
|
};
|
|
913
926
|
/**
|
|
914
|
-
*
|
|
927
|
+
* Collections available in this product. Each entry references collections declared in an adagents.json by domain and collection ID. Buyers resolve full collection objects from the referenced adagents.json.
|
|
915
928
|
*/
|
|
916
|
-
|
|
929
|
+
collections?: CollectionSelector[];
|
|
917
930
|
/**
|
|
918
|
-
* Whether buyers can target a subset of this product's
|
|
931
|
+
* Whether buyers can target a subset of this product's collections. When false (default), the product is a bundle — buyers get all listed collections. When true, buyers can select specific collections in the media buy.
|
|
919
932
|
*/
|
|
920
|
-
|
|
933
|
+
collection_targeting_allowed?: boolean;
|
|
921
934
|
/**
|
|
922
|
-
* Specific
|
|
935
|
+
* Specific installments included in this product. Each installment references its parent collection via collection_id when the product spans multiple collections. When absent with collections present, the product covers the collections broadly (run-of-collection).
|
|
923
936
|
*/
|
|
924
|
-
|
|
937
|
+
installments?: Installment[];
|
|
925
938
|
/**
|
|
926
939
|
* Registry policy IDs the seller enforces for this product. Enforcement level comes from the policy registry. Buyers can filter products by required policies.
|
|
927
940
|
*/
|
|
928
941
|
enforced_policies?: string[];
|
|
942
|
+
/**
|
|
943
|
+
* Trusted Match Protocol capabilities for this product. When present, the product supports real-time contextual and/or identity matching via TMP. Buyers use this to determine what response types the publisher can accept and whether brands can be selected dynamically at match time.
|
|
944
|
+
*/
|
|
945
|
+
trusted_match?: {
|
|
946
|
+
/**
|
|
947
|
+
* Whether this product supports Context Match requests. When true, the publisher's TMP router will send context match requests to registered providers for this product's inventory.
|
|
948
|
+
*/
|
|
949
|
+
context_match: boolean;
|
|
950
|
+
/**
|
|
951
|
+
* Whether this product supports Identity Match requests. When true, the publisher's TMP router will send identity match requests to evaluate user eligibility.
|
|
952
|
+
*/
|
|
953
|
+
identity_match?: boolean;
|
|
954
|
+
/**
|
|
955
|
+
* What the publisher can accept back from context match.
|
|
956
|
+
*/
|
|
957
|
+
response_types?: TMPResponseType[];
|
|
958
|
+
/**
|
|
959
|
+
* Whether the buyer can select a brand at match time. When false (default), the brand must be specified on the media buy/package. When true, the buyer's offer can include any brand — the publisher applies approval rules at match time. Enables multi-brand agreements where the holding company or buyer agent selects brand based on context.
|
|
960
|
+
*/
|
|
961
|
+
dynamic_brands?: boolean;
|
|
962
|
+
};
|
|
963
|
+
/**
|
|
964
|
+
* Instructions for submitting physical creative materials (print, static OOH, cinema). Present only for products requiring physical delivery outside the digital creative assignment flow. Buyer agents MUST validate url and email domains against the seller's known domains (from adagents.json) before submitting materials. Never auto-submit without human confirmation.
|
|
965
|
+
*/
|
|
966
|
+
material_submission?: {
|
|
967
|
+
/**
|
|
968
|
+
* HTTPS URL for uploading or submitting physical creative materials
|
|
969
|
+
*/
|
|
970
|
+
url?: string;
|
|
971
|
+
/**
|
|
972
|
+
* Email address for creative material submission
|
|
973
|
+
*/
|
|
974
|
+
email?: string;
|
|
975
|
+
/**
|
|
976
|
+
* Human-readable instructions for material submission (file naming conventions, shipping address, etc.)
|
|
977
|
+
*/
|
|
978
|
+
instructions?: string;
|
|
979
|
+
ext?: ExtensionObject;
|
|
980
|
+
};
|
|
929
981
|
ext?: ExtensionObject;
|
|
930
982
|
}
|
|
931
983
|
/**
|
|
@@ -982,6 +1034,11 @@ export interface CPMPricingOption {
|
|
|
982
1034
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
983
1035
|
*/
|
|
984
1036
|
min_spend_per_package?: number;
|
|
1037
|
+
price_breakdown?: PriceBreakdown;
|
|
1038
|
+
/**
|
|
1039
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1040
|
+
*/
|
|
1041
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
985
1042
|
}
|
|
986
1043
|
/**
|
|
987
1044
|
* Optional pricing guidance for auction-based bidding
|
|
@@ -1004,6 +1061,21 @@ export interface PriceGuidance {
|
|
|
1004
1061
|
*/
|
|
1005
1062
|
p90?: number;
|
|
1006
1063
|
}
|
|
1064
|
+
/**
|
|
1065
|
+
* Breakdown of how fixed_price was derived from the list (rate card) price. Only meaningful when fixed_price is present.
|
|
1066
|
+
*/
|
|
1067
|
+
export interface PriceBreakdown {
|
|
1068
|
+
/**
|
|
1069
|
+
* Rate card or base price before any adjustments. The starting point from which fixed_price is derived by applying fee and discount adjustments sequentially.
|
|
1070
|
+
*/
|
|
1071
|
+
list_price: number;
|
|
1072
|
+
/**
|
|
1073
|
+
* Ordered list of price adjustments. Fee and discount adjustments walk list_price to fixed_price — fees increase the running price, discounts reduce it. Commission and settlement adjustments are disclosed for transparency but do not affect the buyer's committed price.
|
|
1074
|
+
*/
|
|
1075
|
+
adjustments: {
|
|
1076
|
+
[k: string]: unknown | undefined;
|
|
1077
|
+
}[];
|
|
1078
|
+
}
|
|
1007
1079
|
/**
|
|
1008
1080
|
* Viewable Cost Per Mille (cost per 1,000 viewable impressions) pricing - MRC viewability standard. If fixed_price is present, it's fixed pricing. If absent, it's auction-based.
|
|
1009
1081
|
*/
|
|
@@ -1037,6 +1109,11 @@ export interface VCPMPricingOption {
|
|
|
1037
1109
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
1038
1110
|
*/
|
|
1039
1111
|
min_spend_per_package?: number;
|
|
1112
|
+
price_breakdown?: PriceBreakdown;
|
|
1113
|
+
/**
|
|
1114
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1115
|
+
*/
|
|
1116
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
1040
1117
|
}
|
|
1041
1118
|
/**
|
|
1042
1119
|
* Cost Per Click pricing. If fixed_price is present, it's fixed pricing. If absent, it's auction-based.
|
|
@@ -1071,6 +1148,11 @@ export interface CPCPricingOption {
|
|
|
1071
1148
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
1072
1149
|
*/
|
|
1073
1150
|
min_spend_per_package?: number;
|
|
1151
|
+
price_breakdown?: PriceBreakdown;
|
|
1152
|
+
/**
|
|
1153
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1154
|
+
*/
|
|
1155
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
1074
1156
|
}
|
|
1075
1157
|
/**
|
|
1076
1158
|
* Cost Per Completed View (100% video/audio completion) pricing. If fixed_price is present, it's fixed pricing. If absent, it's auction-based.
|
|
@@ -1105,6 +1187,11 @@ export interface CPCVPricingOption {
|
|
|
1105
1187
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
1106
1188
|
*/
|
|
1107
1189
|
min_spend_per_package?: number;
|
|
1190
|
+
price_breakdown?: PriceBreakdown;
|
|
1191
|
+
/**
|
|
1192
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1193
|
+
*/
|
|
1194
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
1108
1195
|
}
|
|
1109
1196
|
/**
|
|
1110
1197
|
* Cost Per View (at publisher-defined threshold) pricing for video/audio. If fixed_price is present, it's fixed pricing. If absent, it's auction-based.
|
|
@@ -1150,6 +1237,11 @@ export interface CPVPricingOption {
|
|
|
1150
1237
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
1151
1238
|
*/
|
|
1152
1239
|
min_spend_per_package?: number;
|
|
1240
|
+
price_breakdown?: PriceBreakdown;
|
|
1241
|
+
/**
|
|
1242
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1243
|
+
*/
|
|
1244
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
1153
1245
|
}
|
|
1154
1246
|
/**
|
|
1155
1247
|
* Cost Per Point (Gross Rating Point) pricing for TV and audio campaigns. If fixed_price is present, it's fixed pricing. If absent, it's auction-based.
|
|
@@ -1194,6 +1286,11 @@ export interface CPPPricingOption {
|
|
|
1194
1286
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
1195
1287
|
*/
|
|
1196
1288
|
min_spend_per_package?: number;
|
|
1289
|
+
price_breakdown?: PriceBreakdown;
|
|
1290
|
+
/**
|
|
1291
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1292
|
+
*/
|
|
1293
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
1197
1294
|
}
|
|
1198
1295
|
/**
|
|
1199
1296
|
* Cost Per Acquisition pricing. Advertiser pays a fixed price when a specified conversion event occurs. The event_type field declares which event triggers billing (e.g., purchase, lead, app_install).
|
|
@@ -1231,6 +1328,11 @@ export interface CPAPricingOption {
|
|
|
1231
1328
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
1232
1329
|
*/
|
|
1233
1330
|
min_spend_per_package?: number;
|
|
1331
|
+
price_breakdown?: PriceBreakdown;
|
|
1332
|
+
/**
|
|
1333
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1334
|
+
*/
|
|
1335
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
1234
1336
|
}
|
|
1235
1337
|
/**
|
|
1236
1338
|
* Flat rate pricing for sponsorships, takeovers, and DOOH exclusive placements. A fixed total cost regardless of delivery volume. For duration-scaled pricing (rate × time units), use the `time` model instead. If fixed_price is present, it's fixed pricing. If absent, it's auction-based.
|
|
@@ -1262,6 +1364,11 @@ export interface FlatRatePricingOption {
|
|
|
1262
1364
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
1263
1365
|
*/
|
|
1264
1366
|
min_spend_per_package?: number;
|
|
1367
|
+
price_breakdown?: PriceBreakdown;
|
|
1368
|
+
/**
|
|
1369
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1370
|
+
*/
|
|
1371
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
1265
1372
|
}
|
|
1266
1373
|
/**
|
|
1267
1374
|
* DOOH inventory allocation parameters. Sponsorship and takeover flat_rate options omit this field entirely — only include for digital out-of-home inventory.
|
|
@@ -1346,6 +1453,11 @@ export interface TimeBasedPricingOption {
|
|
|
1346
1453
|
* Minimum spend requirement per package using this pricing option, in the specified currency
|
|
1347
1454
|
*/
|
|
1348
1455
|
min_spend_per_package?: number;
|
|
1456
|
+
price_breakdown?: PriceBreakdown;
|
|
1457
|
+
/**
|
|
1458
|
+
* Adjustment kinds applicable to this pricing option. Tells buyer agents which adjustments are available before negotiation. When absent, no adjustments are pre-declared — the buyer should check price_breakdown if present.
|
|
1459
|
+
*/
|
|
1460
|
+
eligible_adjustments?: PriceAdjustmentKind[];
|
|
1349
1461
|
}
|
|
1350
1462
|
/**
|
|
1351
1463
|
* Forecasted delivery metrics for this product. Gives buyers an estimate of expected performance before requesting a proposal.
|
|
@@ -1538,32 +1650,67 @@ export interface CreativePolicy {
|
|
|
1538
1650
|
provenance_required?: boolean;
|
|
1539
1651
|
}
|
|
1540
1652
|
/**
|
|
1541
|
-
*
|
|
1653
|
+
* Assessment of whether the buyer's event source setup is sufficient for this product to optimize effectively. Only present when the seller can evaluate the buyer's account context. Buyers should check this before creating media buys with event-based optimization goals.
|
|
1654
|
+
*/
|
|
1655
|
+
export interface MeasurementReadiness {
|
|
1656
|
+
status: AssessmentStatus;
|
|
1657
|
+
/**
|
|
1658
|
+
* Event types this product needs for effective optimization. Buyers should ensure their event sources cover these types.
|
|
1659
|
+
*/
|
|
1660
|
+
required_event_types?: EventType[];
|
|
1661
|
+
/**
|
|
1662
|
+
* Event types this product requires that the buyer has not configured. Empty or absent when all required types are covered.
|
|
1663
|
+
*/
|
|
1664
|
+
missing_event_types?: EventType[];
|
|
1665
|
+
/**
|
|
1666
|
+
* Actionable issues preventing full measurement readiness. Sellers should limit to the top 3-5 most actionable items. Buyer agents should sort by severity rather than relying on array position.
|
|
1667
|
+
*/
|
|
1668
|
+
issues?: DiagnosticIssue[];
|
|
1669
|
+
/**
|
|
1670
|
+
* Seller explanation of the readiness assessment, recommendations for improvement, or context about what the buyer needs to change.
|
|
1671
|
+
*/
|
|
1672
|
+
notes?: string;
|
|
1673
|
+
}
|
|
1674
|
+
/**
|
|
1675
|
+
* An actionable issue detected during a health or readiness assessment. Used by event source health and measurement readiness to surface problems and recommendations.
|
|
1676
|
+
*/
|
|
1677
|
+
export interface DiagnosticIssue {
|
|
1678
|
+
/**
|
|
1679
|
+
* 'error': blocks optimization until resolved. 'warning': optimization works but effectiveness is reduced. 'info': suggestion for improvement.
|
|
1680
|
+
*/
|
|
1681
|
+
severity: 'error' | 'warning' | 'info';
|
|
1682
|
+
/**
|
|
1683
|
+
* Human/agent-readable description of the issue and how to resolve it.
|
|
1684
|
+
*/
|
|
1685
|
+
message: string;
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
* References collections declared in an adagents.json. Buyers resolve full collection objects by fetching the adagents.json at the given domain and matching collection_ids against its collections array.
|
|
1542
1689
|
*/
|
|
1543
|
-
export interface
|
|
1690
|
+
export interface CollectionSelector {
|
|
1544
1691
|
/**
|
|
1545
|
-
* Domain where the adagents.json declaring these
|
|
1692
|
+
* Domain where the adagents.json declaring these collections is hosted (e.g., 'mrbeast.com'). The collections array in that file contains the authoritative collection definitions.
|
|
1546
1693
|
*/
|
|
1547
1694
|
publisher_domain: string;
|
|
1548
1695
|
/**
|
|
1549
|
-
*
|
|
1696
|
+
* Collection IDs from the adagents.json collections array. Each ID must match a collection_id declared in that file.
|
|
1550
1697
|
*/
|
|
1551
|
-
|
|
1698
|
+
collection_ids: string[];
|
|
1552
1699
|
}
|
|
1553
1700
|
/**
|
|
1554
|
-
* A
|
|
1701
|
+
* A single bookable unit within a collection — one episode, issue, event, or rotation period. The parent collection's kind indicates how to interpret each installment: TV/podcast episodes, print issues, live event airings, newsletter editions, or DOOH rotation periods. Installments inherit collection-level fields they don't override: content_rating defaults to the collection's baseline, guest_talent is additive to the collection's recurring talent, and topics add context beyond the collection's genre.
|
|
1555
1702
|
*/
|
|
1556
|
-
export interface
|
|
1703
|
+
export interface Installment {
|
|
1557
1704
|
/**
|
|
1558
|
-
* Unique identifier for this
|
|
1705
|
+
* Unique identifier for this installment within the collection
|
|
1559
1706
|
*/
|
|
1560
|
-
|
|
1707
|
+
installment_id: string;
|
|
1561
1708
|
/**
|
|
1562
|
-
* Parent
|
|
1709
|
+
* Parent collection reference. Required when the product spans multiple collections. Maps to a collection_id declared in one of the publishers' adagents.json files referenced by the product's collection selectors.
|
|
1563
1710
|
*/
|
|
1564
|
-
|
|
1711
|
+
collection_id?: string;
|
|
1565
1712
|
/**
|
|
1566
|
-
*
|
|
1713
|
+
* Installment title
|
|
1567
1714
|
*/
|
|
1568
1715
|
name?: string;
|
|
1569
1716
|
/**
|
|
@@ -1571,16 +1718,16 @@ export interface Episode {
|
|
|
1571
1718
|
*/
|
|
1572
1719
|
season?: string;
|
|
1573
1720
|
/**
|
|
1574
|
-
*
|
|
1721
|
+
* Installment number within the season (e.g., '3', '47')
|
|
1575
1722
|
*/
|
|
1576
|
-
|
|
1723
|
+
installment_number?: string;
|
|
1577
1724
|
/**
|
|
1578
|
-
* When the
|
|
1725
|
+
* When the installment airs or publishes (ISO 8601)
|
|
1579
1726
|
*/
|
|
1580
1727
|
scheduled_at?: string;
|
|
1581
|
-
status?:
|
|
1728
|
+
status?: InstallmentStatus;
|
|
1582
1729
|
/**
|
|
1583
|
-
* Expected duration of the
|
|
1730
|
+
* Expected duration of the installment in seconds
|
|
1584
1731
|
*/
|
|
1585
1732
|
duration_seconds?: number;
|
|
1586
1733
|
/**
|
|
@@ -1588,34 +1735,35 @@ export interface Episode {
|
|
|
1588
1735
|
*/
|
|
1589
1736
|
flexible_end?: boolean;
|
|
1590
1737
|
/**
|
|
1591
|
-
* When this
|
|
1738
|
+
* When this installment data expires and should be re-queried. Agents should re-query before committing budget to products with tentative installments.
|
|
1592
1739
|
*/
|
|
1593
1740
|
valid_until?: string;
|
|
1594
1741
|
content_rating?: ContentRating;
|
|
1595
1742
|
/**
|
|
1596
|
-
* Content topics for this
|
|
1743
|
+
* Content topics for this installment. Uses the same taxonomy as the collection's genre_taxonomy when present. Enables installment-level brand safety evaluation beyond content_rating.
|
|
1597
1744
|
*/
|
|
1598
1745
|
topics?: string[];
|
|
1599
1746
|
special?: Special;
|
|
1600
1747
|
/**
|
|
1601
|
-
*
|
|
1748
|
+
* Installment-specific guests and talent. Additive to the collection's recurring talent.
|
|
1602
1749
|
*/
|
|
1603
1750
|
guest_talent?: Talent[];
|
|
1604
1751
|
ad_inventory?: AdInventoryConfiguration;
|
|
1752
|
+
deadlines?: InstallmentDeadlines;
|
|
1605
1753
|
/**
|
|
1606
|
-
* When this
|
|
1754
|
+
* When this installment is a clip, highlight, or recap derived from a full installment. The source installment_id must reference an installment within the same response.
|
|
1607
1755
|
*/
|
|
1608
1756
|
derivative_of?: {
|
|
1609
1757
|
/**
|
|
1610
|
-
* The source
|
|
1758
|
+
* The source installment this content is derived from
|
|
1611
1759
|
*/
|
|
1612
|
-
|
|
1760
|
+
installment_id: string;
|
|
1613
1761
|
type: DerivativeType;
|
|
1614
1762
|
};
|
|
1615
1763
|
ext?: ExtensionObject;
|
|
1616
1764
|
}
|
|
1617
1765
|
/**
|
|
1618
|
-
*
|
|
1766
|
+
* Installment-specific content rating. Overrides the collection's baseline content_rating when present.
|
|
1619
1767
|
*/
|
|
1620
1768
|
export interface ContentRating {
|
|
1621
1769
|
system: ContentRatingSystem;
|
|
@@ -1625,7 +1773,7 @@ export interface ContentRating {
|
|
|
1625
1773
|
rating: string;
|
|
1626
1774
|
}
|
|
1627
1775
|
/**
|
|
1628
|
-
*
|
|
1776
|
+
* Installment-specific event context. When present, this installment is anchored to a real-world event. Overrides the collection-level special when present.
|
|
1629
1777
|
*/
|
|
1630
1778
|
export interface Special {
|
|
1631
1779
|
/**
|
|
@@ -1643,12 +1791,12 @@ export interface Special {
|
|
|
1643
1791
|
ends?: string;
|
|
1644
1792
|
}
|
|
1645
1793
|
/**
|
|
1646
|
-
* A person associated with a
|
|
1794
|
+
* A person associated with a collection or installment, with an optional link to their brand.json identity
|
|
1647
1795
|
*/
|
|
1648
1796
|
export interface Talent {
|
|
1649
1797
|
role: TalentRole;
|
|
1650
1798
|
/**
|
|
1651
|
-
* Person's name as credited on the
|
|
1799
|
+
* Person's name as credited on the collection
|
|
1652
1800
|
*/
|
|
1653
1801
|
name: string;
|
|
1654
1802
|
/**
|
|
@@ -1657,11 +1805,11 @@ export interface Talent {
|
|
|
1657
1805
|
brand_url?: string;
|
|
1658
1806
|
}
|
|
1659
1807
|
/**
|
|
1660
|
-
* Break-based ad inventory for this
|
|
1808
|
+
* Break-based ad inventory for this installment. For non-break formats (host reads, integrations), use product placements.
|
|
1661
1809
|
*/
|
|
1662
1810
|
export interface AdInventoryConfiguration {
|
|
1663
1811
|
/**
|
|
1664
|
-
* Number of planned ad breaks in the
|
|
1812
|
+
* Number of planned ad breaks in the installment
|
|
1665
1813
|
*/
|
|
1666
1814
|
expected_breaks: number;
|
|
1667
1815
|
/**
|
|
@@ -1681,6 +1829,40 @@ export interface AdInventoryConfiguration {
|
|
|
1681
1829
|
*/
|
|
1682
1830
|
supported_formats?: string[];
|
|
1683
1831
|
}
|
|
1832
|
+
/**
|
|
1833
|
+
* Booking, cancellation, and material submission deadlines for this installment. Present when the installment has time-sensitive inventory that requires advance commitment or material delivery.
|
|
1834
|
+
*/
|
|
1835
|
+
export interface InstallmentDeadlines {
|
|
1836
|
+
/**
|
|
1837
|
+
* Last date/time to book a placement in this installment (ISO 8601). After this point, the seller will not accept new bookings.
|
|
1838
|
+
*/
|
|
1839
|
+
booking_deadline?: string;
|
|
1840
|
+
/**
|
|
1841
|
+
* Last date/time to cancel without penalty (ISO 8601). Cancellations after this point may incur fees per the seller's terms.
|
|
1842
|
+
*/
|
|
1843
|
+
cancellation_deadline?: string;
|
|
1844
|
+
/**
|
|
1845
|
+
* Stages for creative material submission. Items MUST be in chronological order by due_at (earliest first). Typical pattern: 'draft' for raw materials the seller will process, 'final' for production-ready assets. Print example: draft artwork then press-ready PDF. Influencer example: talking points then approved script.
|
|
1846
|
+
*/
|
|
1847
|
+
material_deadlines?: MaterialDeadline[];
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* A deadline for creative material submission. Sellers declare stages to distinguish draft materials (e.g., talking points, raw artwork) from production-ready assets (e.g., approved scripts, press-ready PDFs).
|
|
1851
|
+
*/
|
|
1852
|
+
export interface MaterialDeadline {
|
|
1853
|
+
/**
|
|
1854
|
+
* Submission stage identifier. Use 'draft' for materials that need seller processing and 'final' for production-ready assets. Sellers may define additional stages.
|
|
1855
|
+
*/
|
|
1856
|
+
stage: string;
|
|
1857
|
+
/**
|
|
1858
|
+
* When materials for this stage are due (ISO 8601)
|
|
1859
|
+
*/
|
|
1860
|
+
due_at: string;
|
|
1861
|
+
/**
|
|
1862
|
+
* What the seller needs at this stage (e.g., 'Talking points and brand guidelines', 'Press-ready PDF with bleed')
|
|
1863
|
+
*/
|
|
1864
|
+
label?: string;
|
|
1865
|
+
}
|
|
1684
1866
|
/**
|
|
1685
1867
|
* A proposed media plan with budget allocations across products. Represents the publisher's strategic recommendation for how to structure a campaign based on the brief. Proposals are actionable - buyers can execute them directly via create_media_buy by providing the proposal_id.
|
|
1686
1868
|
*/
|
|
@@ -1701,10 +1883,12 @@ export interface Proposal {
|
|
|
1701
1883
|
* Budget allocations across products. Allocation percentages MUST sum to 100. Publishers are responsible for ensuring the sum equals 100; buyers SHOULD validate this before execution.
|
|
1702
1884
|
*/
|
|
1703
1885
|
allocations: ProductAllocation[];
|
|
1886
|
+
proposal_status?: ProposalStatus;
|
|
1704
1887
|
/**
|
|
1705
|
-
* When this proposal expires and can no longer be executed.
|
|
1888
|
+
* When this proposal expires and can no longer be executed. For draft proposals, indicates when indicative pricing becomes stale. For committed proposals, indicates when the inventory hold lapses — the buyer must call create_media_buy before this time.
|
|
1706
1889
|
*/
|
|
1707
1890
|
expires_at?: string;
|
|
1891
|
+
insertion_order?: InsertionOrder;
|
|
1708
1892
|
/**
|
|
1709
1893
|
* Optional budget guidance for this proposal
|
|
1710
1894
|
*/
|
|
@@ -1797,6 +1981,62 @@ export interface DaypartTarget {
|
|
|
1797
1981
|
*/
|
|
1798
1982
|
label?: string;
|
|
1799
1983
|
}
|
|
1984
|
+
/**
|
|
1985
|
+
* Formal insertion order attached to a committed proposal. Present when the seller requires a signed agreement before the media buy can proceed. The buyer references the io_id in io_acceptance on create_media_buy.
|
|
1986
|
+
*/
|
|
1987
|
+
export interface InsertionOrder {
|
|
1988
|
+
/**
|
|
1989
|
+
* Unique identifier for this insertion order. Referenced by io_acceptance on create_media_buy.
|
|
1990
|
+
*/
|
|
1991
|
+
io_id: string;
|
|
1992
|
+
/**
|
|
1993
|
+
* Structured terms for agent validation. Agents can programmatically verify these match the proposal and campaign requirements.
|
|
1994
|
+
*/
|
|
1995
|
+
terms?: {
|
|
1996
|
+
/**
|
|
1997
|
+
* Advertiser name or identifier
|
|
1998
|
+
*/
|
|
1999
|
+
advertiser?: string;
|
|
2000
|
+
/**
|
|
2001
|
+
* Publisher name or identifier
|
|
2002
|
+
*/
|
|
2003
|
+
publisher?: string;
|
|
2004
|
+
/**
|
|
2005
|
+
* Total committed budget
|
|
2006
|
+
*/
|
|
2007
|
+
total_budget?: {
|
|
2008
|
+
amount: number;
|
|
2009
|
+
/**
|
|
2010
|
+
* ISO 4217 currency code
|
|
2011
|
+
*/
|
|
2012
|
+
currency: string;
|
|
2013
|
+
};
|
|
2014
|
+
/**
|
|
2015
|
+
* Campaign start date
|
|
2016
|
+
*/
|
|
2017
|
+
flight_start?: string;
|
|
2018
|
+
/**
|
|
2019
|
+
* Campaign end date
|
|
2020
|
+
*/
|
|
2021
|
+
flight_end?: string;
|
|
2022
|
+
/**
|
|
2023
|
+
* Payment terms
|
|
2024
|
+
*/
|
|
2025
|
+
payment_terms?: 'net_30' | 'net_60' | 'net_90' | 'prepaid' | 'due_on_receipt';
|
|
2026
|
+
};
|
|
2027
|
+
/**
|
|
2028
|
+
* URL to a human-readable document containing the full insertion order terms
|
|
2029
|
+
*/
|
|
2030
|
+
terms_url?: string;
|
|
2031
|
+
/**
|
|
2032
|
+
* URL to an electronic signing service (e.g., DocuSign) for human signature workflows. When present, a human must sign before the buyer agent can proceed with create_media_buy.
|
|
2033
|
+
*/
|
|
2034
|
+
signing_url?: string;
|
|
2035
|
+
/**
|
|
2036
|
+
* Whether the buyer must accept this IO before creating a media buy. When true, create_media_buy requires an io_acceptance referencing this io_id.
|
|
2037
|
+
*/
|
|
2038
|
+
requires_signature: boolean;
|
|
2039
|
+
}
|
|
1800
2040
|
/**
|
|
1801
2041
|
* Standard error structure for task-specific errors and warnings
|
|
1802
2042
|
*/
|
|
@@ -1928,7 +2168,7 @@ export type FormatIDParameter = 'dimensions' | 'duration';
|
|
|
1928
2168
|
/**
|
|
1929
2169
|
* Standardized macro placeholders for dynamic value substitution in creative tracking URLs. Macros are replaced with actual values at impression time. See docs/creative/universal-macros.mdx for detailed documentation.
|
|
1930
2170
|
*/
|
|
1931
|
-
export type UniversalMacro = 'MEDIA_BUY_ID' | 'PACKAGE_ID' | 'CREATIVE_ID' | 'CACHEBUSTER' | 'TIMESTAMP' | 'CLICK_URL' | 'GDPR' | 'GDPR_CONSENT' | 'US_PRIVACY' | 'GPP_STRING' | 'GPP_SID' | 'IP_ADDRESS' | 'LIMIT_AD_TRACKING' | 'DEVICE_TYPE' | 'OS' | 'OS_VERSION' | 'DEVICE_MAKE' | 'DEVICE_MODEL' | 'USER_AGENT' | 'APP_BUNDLE' | 'APP_NAME' | 'COUNTRY' | 'REGION' | 'CITY' | 'ZIP' | 'DMA' | 'LAT' | 'LONG' | 'DEVICE_ID' | 'DEVICE_ID_TYPE' | 'DOMAIN' | 'PAGE_URL' | 'REFERRER' | 'KEYWORDS' | 'PLACEMENT_ID' | 'FOLD_POSITION' | 'AD_WIDTH' | 'AD_HEIGHT' | 'VIDEO_ID' | 'VIDEO_TITLE' | 'VIDEO_DURATION' | 'VIDEO_CATEGORY' | 'CONTENT_GENRE' | 'CONTENT_RATING' | 'PLAYER_WIDTH' | 'PLAYER_HEIGHT' | 'POD_POSITION' | 'POD_SIZE' | 'AD_BREAK_ID' | 'STATION_ID' | '
|
|
2171
|
+
export type UniversalMacro = 'MEDIA_BUY_ID' | 'PACKAGE_ID' | 'CREATIVE_ID' | 'CACHEBUSTER' | 'TIMESTAMP' | 'CLICK_URL' | 'GDPR' | 'GDPR_CONSENT' | 'US_PRIVACY' | 'GPP_STRING' | 'GPP_SID' | 'IP_ADDRESS' | 'LIMIT_AD_TRACKING' | 'DEVICE_TYPE' | 'OS' | 'OS_VERSION' | 'DEVICE_MAKE' | 'DEVICE_MODEL' | 'USER_AGENT' | 'APP_BUNDLE' | 'APP_NAME' | 'COUNTRY' | 'REGION' | 'CITY' | 'ZIP' | 'DMA' | 'LAT' | 'LONG' | 'DEVICE_ID' | 'DEVICE_ID_TYPE' | 'DOMAIN' | 'PAGE_URL' | 'REFERRER' | 'KEYWORDS' | 'PLACEMENT_ID' | 'FOLD_POSITION' | 'AD_WIDTH' | 'AD_HEIGHT' | 'VIDEO_ID' | 'VIDEO_TITLE' | 'VIDEO_DURATION' | 'VIDEO_CATEGORY' | 'CONTENT_GENRE' | 'CONTENT_RATING' | 'PLAYER_WIDTH' | 'PLAYER_HEIGHT' | 'POD_POSITION' | 'POD_SIZE' | 'AD_BREAK_ID' | 'STATION_ID' | 'COLLECTION_NAME' | 'INSTALLMENT_ID' | 'AUDIO_DURATION' | 'AXEM' | 'CATALOG_ID' | 'SKU' | 'GTIN' | 'OFFERING_ID' | 'JOB_ID' | 'HOTEL_ID' | 'FLIGHT_ID' | 'VEHICLE_ID' | 'LISTING_ID' | 'STORE_ID' | 'PROGRAM_ID' | 'DESTINATION_ID' | 'CREATIVE_VARIANT_ID' | 'APP_ITEM_ID';
|
|
1932
2172
|
/**
|
|
1933
2173
|
* Capabilities supported by creative agents for format handling
|
|
1934
2174
|
*/
|
|
@@ -2170,9 +2410,9 @@ export interface Overlay {
|
|
|
2170
2410
|
*/
|
|
2171
2411
|
height: number;
|
|
2172
2412
|
/**
|
|
2173
|
-
* 'px' = absolute pixels from asset top-left. 'fraction' = proportional to asset dimensions (
|
|
2413
|
+
* 'px' = absolute pixels from asset top-left. 'fraction' = proportional to asset dimensions (0.0 = edge, 1.0 = opposite edge). 'inches', 'cm', 'mm', 'pt' (1/72 inch) = physical units for print overlays, measured from asset top-left.
|
|
2174
2414
|
*/
|
|
2175
|
-
unit: 'px' | 'fraction';
|
|
2415
|
+
unit: 'px' | 'fraction' | 'inches' | 'cm' | 'mm' | 'pt';
|
|
2176
2416
|
};
|
|
2177
2417
|
}
|
|
2178
2418
|
export interface BaseGroupAsset {
|
|
@@ -2522,7 +2762,7 @@ export type CatalogAsset = Catalog;
|
|
|
2522
2762
|
/**
|
|
2523
2763
|
* For generative creatives: set to 'approved' to finalize, 'rejected' to request regeneration with updated assets/message. Omit for non-generative creatives (system will set based on processing state).
|
|
2524
2764
|
*/
|
|
2525
|
-
export type CreativeStatus = 'processing' | '
|
|
2765
|
+
export type CreativeStatus = 'processing' | 'pending_review' | 'approved' | 'rejected' | 'archived';
|
|
2526
2766
|
/**
|
|
2527
2767
|
* Campaign start timing: 'asap' or ISO 8601 date-time
|
|
2528
2768
|
*/
|
|
@@ -2536,13 +2776,9 @@ export type AuthenticationScheme = 'Bearer' | 'HMAC-SHA256';
|
|
|
2536
2776
|
*/
|
|
2537
2777
|
export interface CreateMediaBuyRequest {
|
|
2538
2778
|
/**
|
|
2539
|
-
*
|
|
2540
|
-
*/
|
|
2541
|
-
buyer_ref: string;
|
|
2542
|
-
/**
|
|
2543
|
-
* Buyer's campaign reference label. Groups related discovery and buy operations under a single campaign for CRM and ad server correlation (e.g., 'NovaDrink_Meals_Q2').
|
|
2779
|
+
* Client-generated unique key for this request. If a request with the same idempotency_key and account has already been processed, the seller returns the existing media buy rather than creating a duplicate. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
2544
2780
|
*/
|
|
2545
|
-
|
|
2781
|
+
idempotency_key?: string;
|
|
2546
2782
|
/**
|
|
2547
2783
|
* Campaign governance plan identifier. Required when the account has governance_agents. The seller includes this in the committed check_governance request so the governance agent can validate against the correct plan.
|
|
2548
2784
|
*/
|
|
@@ -2570,6 +2806,28 @@ export interface CreateMediaBuyRequest {
|
|
|
2570
2806
|
*/
|
|
2571
2807
|
packages?: PackageRequest[];
|
|
2572
2808
|
brand: BrandReference;
|
|
2809
|
+
invoice_recipient?: BusinessEntity;
|
|
2810
|
+
/**
|
|
2811
|
+
* Acceptance of an insertion order from a committed proposal. Required when the proposal's insertion_order has requires_signature: true. References the io_id from the proposal's insertion_order.
|
|
2812
|
+
*/
|
|
2813
|
+
io_acceptance?: {
|
|
2814
|
+
/**
|
|
2815
|
+
* The io_id from the proposal's insertion_order being accepted
|
|
2816
|
+
*/
|
|
2817
|
+
io_id: string;
|
|
2818
|
+
/**
|
|
2819
|
+
* ISO 8601 timestamp when the IO was accepted
|
|
2820
|
+
*/
|
|
2821
|
+
accepted_at: string;
|
|
2822
|
+
/**
|
|
2823
|
+
* Who accepted the IO — agent identifier or human name
|
|
2824
|
+
*/
|
|
2825
|
+
signatory: string;
|
|
2826
|
+
/**
|
|
2827
|
+
* Reference to the electronic signature from the signing service, when signing_url was used
|
|
2828
|
+
*/
|
|
2829
|
+
signature_id?: string;
|
|
2830
|
+
};
|
|
2573
2831
|
/**
|
|
2574
2832
|
* Purchase order number for tracking
|
|
2575
2833
|
*/
|
|
@@ -2599,10 +2857,8 @@ export interface CreateMediaBuyRequest {
|
|
|
2599
2857
|
authentication: {
|
|
2600
2858
|
/**
|
|
2601
2859
|
* Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for signature verification (recommended for production)
|
|
2602
|
-
*
|
|
2603
|
-
* @maxItems 1
|
|
2604
2860
|
*/
|
|
2605
|
-
schemes: []
|
|
2861
|
+
schemes: AuthenticationScheme[];
|
|
2606
2862
|
/**
|
|
2607
2863
|
* Credentials for authentication. For Bearer: token sent in Authorization header. For HMAC-SHA256: shared secret used to generate signature. Minimum 32 characters. Exchanged out-of-band during onboarding.
|
|
2608
2864
|
*/
|
|
@@ -2628,10 +2884,6 @@ export interface CreateMediaBuyRequest {
|
|
|
2628
2884
|
* Package configuration for media buy creation
|
|
2629
2885
|
*/
|
|
2630
2886
|
export interface PackageRequest {
|
|
2631
|
-
/**
|
|
2632
|
-
* Buyer's reference identifier for this package. Sellers SHOULD deduplicate requests with the same buyer_ref within a media buy, returning the existing package rather than creating a duplicate.
|
|
2633
|
-
*/
|
|
2634
|
-
buyer_ref: string;
|
|
2635
2887
|
/**
|
|
2636
2888
|
* Product ID for this package
|
|
2637
2889
|
*/
|
|
@@ -2684,10 +2936,9 @@ export interface PackageRequest {
|
|
|
2684
2936
|
creative_assignments?: CreativeAssignment[];
|
|
2685
2937
|
/**
|
|
2686
2938
|
* Upload new creative assets and assign to this package (creatives will be added to library). Use creative_assignments instead for existing library creatives.
|
|
2687
|
-
*
|
|
2688
|
-
* @maxItems 100
|
|
2689
2939
|
*/
|
|
2690
2940
|
creatives?: CreativeAsset[];
|
|
2941
|
+
context?: ContextObject;
|
|
2691
2942
|
ext?: ExtensionObject;
|
|
2692
2943
|
}
|
|
2693
2944
|
/**
|
|
@@ -3532,6 +3783,87 @@ export interface ReferenceAsset {
|
|
|
3532
3783
|
*/
|
|
3533
3784
|
description?: string;
|
|
3534
3785
|
}
|
|
3786
|
+
/**
|
|
3787
|
+
* Override the account's default billing entity for this specific buy. When provided, the seller invoices this entity instead. The seller MUST validate the invoice recipient is authorized for this account. When governance_agents are configured, the seller MUST include invoice_recipient in the check_governance request.
|
|
3788
|
+
*/
|
|
3789
|
+
export interface BusinessEntity {
|
|
3790
|
+
/**
|
|
3791
|
+
* Registered legal name of the business entity
|
|
3792
|
+
*/
|
|
3793
|
+
legal_name: string;
|
|
3794
|
+
/**
|
|
3795
|
+
* VAT identification number (e.g., DE123456789 for Germany, FR12345678901 for France). Required for B2B invoicing in the EU. Must be normalized: no spaces, dots, or dashes.
|
|
3796
|
+
*/
|
|
3797
|
+
vat_id?: string;
|
|
3798
|
+
/**
|
|
3799
|
+
* Tax identification number for jurisdictions that do not use VAT (e.g., US EIN)
|
|
3800
|
+
*/
|
|
3801
|
+
tax_id?: string;
|
|
3802
|
+
/**
|
|
3803
|
+
* Company registration number (e.g., HRB 12345 for German Handelsregister)
|
|
3804
|
+
*/
|
|
3805
|
+
registration_number?: string;
|
|
3806
|
+
/**
|
|
3807
|
+
* Postal address for invoicing and legal correspondence
|
|
3808
|
+
*/
|
|
3809
|
+
address?: {
|
|
3810
|
+
/**
|
|
3811
|
+
* Street address including building number
|
|
3812
|
+
*/
|
|
3813
|
+
street: string;
|
|
3814
|
+
city: string;
|
|
3815
|
+
postal_code: string;
|
|
3816
|
+
/**
|
|
3817
|
+
* State, province, or region
|
|
3818
|
+
*/
|
|
3819
|
+
region?: string;
|
|
3820
|
+
/**
|
|
3821
|
+
* ISO 3166-1 alpha-2 country code
|
|
3822
|
+
*/
|
|
3823
|
+
country: string;
|
|
3824
|
+
};
|
|
3825
|
+
/**
|
|
3826
|
+
* Contacts for billing, legal, and operational matters. Contains personal data subject to GDPR and equivalent regulations. Implementations MUST use this data only for invoicing and account management.
|
|
3827
|
+
*/
|
|
3828
|
+
contacts?: {
|
|
3829
|
+
/**
|
|
3830
|
+
* Contact's functional role in the business relationship
|
|
3831
|
+
*/
|
|
3832
|
+
role: 'billing' | 'legal' | 'creative' | 'general';
|
|
3833
|
+
/**
|
|
3834
|
+
* Full name of the contact
|
|
3835
|
+
*/
|
|
3836
|
+
name?: string;
|
|
3837
|
+
email?: string;
|
|
3838
|
+
phone?: string;
|
|
3839
|
+
}[];
|
|
3840
|
+
/**
|
|
3841
|
+
* Bank account details for payment processing. Write-only: included in requests to provide payment coordinates, but MUST NOT be echoed in responses. Sellers store these details and confirm receipt without returning them.
|
|
3842
|
+
*/
|
|
3843
|
+
bank?: {
|
|
3844
|
+
/**
|
|
3845
|
+
* Name on the bank account
|
|
3846
|
+
*/
|
|
3847
|
+
account_holder: string;
|
|
3848
|
+
/**
|
|
3849
|
+
* International Bank Account Number (SEPA markets)
|
|
3850
|
+
*/
|
|
3851
|
+
iban?: string;
|
|
3852
|
+
/**
|
|
3853
|
+
* Bank Identifier Code / SWIFT code (SEPA markets)
|
|
3854
|
+
*/
|
|
3855
|
+
bic?: string;
|
|
3856
|
+
/**
|
|
3857
|
+
* Bank routing number for non-SEPA markets (e.g., US ABA routing number, Canadian transit/institution number)
|
|
3858
|
+
*/
|
|
3859
|
+
routing_number?: string;
|
|
3860
|
+
/**
|
|
3861
|
+
* Bank account number for non-SEPA markets
|
|
3862
|
+
*/
|
|
3863
|
+
account_number?: string;
|
|
3864
|
+
};
|
|
3865
|
+
ext?: ExtensionObject;
|
|
3866
|
+
}
|
|
3535
3867
|
/**
|
|
3536
3868
|
* Optional webhook configuration for async task status notifications. Publisher will send webhooks when status changes (working, input-required, completed, failed). The client generates an operation_id and embeds it in the URL before sending — the publisher echoes it back in webhook payloads for correlation.
|
|
3537
3869
|
*/
|
|
@@ -3550,10 +3882,8 @@ export interface PushNotificationConfig {
|
|
|
3550
3882
|
authentication: {
|
|
3551
3883
|
/**
|
|
3552
3884
|
* Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for signature verification (recommended for production)
|
|
3553
|
-
*
|
|
3554
|
-
* @maxItems 1
|
|
3555
3885
|
*/
|
|
3556
|
-
schemes: []
|
|
3886
|
+
schemes: AuthenticationScheme[];
|
|
3557
3887
|
/**
|
|
3558
3888
|
* Credentials for authentication. For Bearer: token sent in Authorization header. For HMAC-SHA256: shared secret used to generate signature. Minimum 32 characters. Exchanged out-of-band during onboarding.
|
|
3559
3889
|
*/
|
|
@@ -3578,10 +3908,8 @@ export interface ReportingWebhook {
|
|
|
3578
3908
|
authentication: {
|
|
3579
3909
|
/**
|
|
3580
3910
|
* Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for signature verification (recommended for production)
|
|
3581
|
-
*
|
|
3582
|
-
* @maxItems 1
|
|
3583
3911
|
*/
|
|
3584
|
-
schemes: []
|
|
3912
|
+
schemes: AuthenticationScheme[];
|
|
3585
3913
|
/**
|
|
3586
3914
|
* Credentials for authentication. For Bearer: token sent in Authorization header. For HMAC-SHA256: shared secret used to generate signature. Minimum 32 characters. Exchanged out-of-band during onboarding.
|
|
3587
3915
|
*/
|
|
@@ -3601,73 +3929,152 @@ export interface ReportingWebhook {
|
|
|
3601
3929
|
*/
|
|
3602
3930
|
export type CreateMediaBuyResponse = CreateMediaBuySuccess | CreateMediaBuyError;
|
|
3603
3931
|
/**
|
|
3604
|
-
*
|
|
3932
|
+
* Account lifecycle status. See the Accounts Protocol overview for the operations matrix showing which tasks are permitted in each state.
|
|
3605
3933
|
*/
|
|
3606
|
-
export
|
|
3934
|
+
export type AccountStatus = 'active' | 'pending_approval' | 'rejected' | 'payment_required' | 'suspended' | 'closed';
|
|
3935
|
+
/**
|
|
3936
|
+
* Initial media buy status. Either 'active' (immediate activation) or 'pending_activation' (awaiting platform setup).
|
|
3937
|
+
*/
|
|
3938
|
+
export type MediaBuyStatus = 'pending_activation' | 'active' | 'paused' | 'completed' | 'rejected' | 'canceled';
|
|
3939
|
+
/**
|
|
3940
|
+
* Which party initiated the package cancellation.
|
|
3941
|
+
*/
|
|
3942
|
+
export type CanceledBy = 'buyer' | 'seller';
|
|
3943
|
+
/**
|
|
3944
|
+
* Selects an audience by signal reference or natural language description. Uses 'type' as the primary discriminator (signal vs description). Signal selectors additionally use 'value_type' to determine the targeting expression format (matching signal-targeting.json variants).
|
|
3945
|
+
*/
|
|
3946
|
+
export type AudienceSelector = {
|
|
3607
3947
|
/**
|
|
3608
|
-
*
|
|
3948
|
+
* Discriminator for signal-based selectors
|
|
3609
3949
|
*/
|
|
3610
|
-
|
|
3950
|
+
type: 'signal';
|
|
3951
|
+
signal_id: SignalID;
|
|
3611
3952
|
/**
|
|
3612
|
-
*
|
|
3953
|
+
* Discriminator for binary signals
|
|
3613
3954
|
*/
|
|
3614
|
-
|
|
3955
|
+
value_type: 'binary';
|
|
3615
3956
|
/**
|
|
3616
|
-
*
|
|
3957
|
+
* Whether to include (true) or exclude (false) users matching this signal
|
|
3617
3958
|
*/
|
|
3618
|
-
|
|
3619
|
-
|
|
3959
|
+
value: boolean;
|
|
3960
|
+
} | {
|
|
3620
3961
|
/**
|
|
3621
|
-
*
|
|
3962
|
+
* Discriminator for signal-based selectors
|
|
3622
3963
|
*/
|
|
3623
|
-
|
|
3964
|
+
type: 'signal';
|
|
3965
|
+
signal_id: SignalID;
|
|
3624
3966
|
/**
|
|
3625
|
-
*
|
|
3967
|
+
* Discriminator for categorical signals
|
|
3626
3968
|
*/
|
|
3627
|
-
|
|
3628
|
-
planned_delivery?: PlannedDelivery;
|
|
3969
|
+
value_type: 'categorical';
|
|
3629
3970
|
/**
|
|
3630
|
-
*
|
|
3971
|
+
* Values to target. Users with any of these values will be included.
|
|
3631
3972
|
*/
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
ext?: ExtensionObject;
|
|
3635
|
-
}
|
|
3636
|
-
/**
|
|
3637
|
-
* Account billed for this media buy. Includes advertiser, billing proxy (if any), and rate card applied.
|
|
3638
|
-
*/
|
|
3639
|
-
export interface Account {
|
|
3973
|
+
values: string[];
|
|
3974
|
+
} | {
|
|
3640
3975
|
/**
|
|
3641
|
-
*
|
|
3976
|
+
* Discriminator for signal-based selectors
|
|
3642
3977
|
*/
|
|
3643
|
-
|
|
3978
|
+
type: 'signal';
|
|
3979
|
+
signal_id: SignalID;
|
|
3644
3980
|
/**
|
|
3645
|
-
*
|
|
3981
|
+
* Discriminator for numeric signals
|
|
3646
3982
|
*/
|
|
3647
|
-
|
|
3983
|
+
value_type: 'numeric';
|
|
3648
3984
|
/**
|
|
3649
|
-
*
|
|
3985
|
+
* Minimum value (inclusive). Omit for no minimum. Must be <= max_value when both are provided.
|
|
3650
3986
|
*/
|
|
3651
|
-
|
|
3987
|
+
min_value?: number;
|
|
3652
3988
|
/**
|
|
3653
|
-
*
|
|
3989
|
+
* Maximum value (inclusive). Omit for no maximum. Must be >= min_value when both are provided.
|
|
3654
3990
|
*/
|
|
3655
|
-
|
|
3991
|
+
max_value?: number;
|
|
3992
|
+
} | {
|
|
3656
3993
|
/**
|
|
3657
|
-
*
|
|
3994
|
+
* Discriminator for description-based selectors
|
|
3658
3995
|
*/
|
|
3659
|
-
|
|
3660
|
-
brand?: BrandReference;
|
|
3996
|
+
type: 'description';
|
|
3661
3997
|
/**
|
|
3662
|
-
*
|
|
3998
|
+
* Natural language description of the audience (e.g., 'likely EV buyers', 'high net worth individuals', 'vulnerable communities')
|
|
3663
3999
|
*/
|
|
3664
|
-
|
|
4000
|
+
description: string;
|
|
3665
4001
|
/**
|
|
3666
|
-
*
|
|
4002
|
+
* Optional grouping hint for the governance agent (e.g., 'demographic', 'behavioral', 'contextual', 'financial')
|
|
3667
4003
|
*/
|
|
3668
|
-
|
|
4004
|
+
category?: string;
|
|
4005
|
+
};
|
|
4006
|
+
/**
|
|
4007
|
+
* Success response - media buy created successfully
|
|
4008
|
+
*/
|
|
4009
|
+
export interface CreateMediaBuySuccess {
|
|
3669
4010
|
/**
|
|
3670
|
-
*
|
|
4011
|
+
* Seller's unique identifier for the created media buy
|
|
4012
|
+
*/
|
|
4013
|
+
media_buy_id: string;
|
|
4014
|
+
account?: Account;
|
|
4015
|
+
invoice_recipient?: BusinessEntity;
|
|
4016
|
+
status?: MediaBuyStatus;
|
|
4017
|
+
/**
|
|
4018
|
+
* ISO 8601 timestamp when this media buy was confirmed by the seller. A successful create_media_buy response constitutes order confirmation.
|
|
4019
|
+
*/
|
|
4020
|
+
confirmed_at?: string;
|
|
4021
|
+
/**
|
|
4022
|
+
* ISO 8601 timestamp for creative upload deadline
|
|
4023
|
+
*/
|
|
4024
|
+
creative_deadline?: string;
|
|
4025
|
+
/**
|
|
4026
|
+
* Initial revision number for this media buy. Use in subsequent update_media_buy requests for optimistic concurrency.
|
|
4027
|
+
*/
|
|
4028
|
+
revision?: number;
|
|
4029
|
+
/**
|
|
4030
|
+
* Actions the buyer can perform on this media buy after creation. Saves a round-trip to get_media_buys.
|
|
4031
|
+
*/
|
|
4032
|
+
valid_actions?: ('pause' | 'resume' | 'cancel' | 'update_budget' | 'update_dates' | 'update_packages' | 'add_packages' | 'sync_creatives')[];
|
|
4033
|
+
/**
|
|
4034
|
+
* Array of created packages with complete state information
|
|
4035
|
+
*/
|
|
4036
|
+
packages: Package[];
|
|
4037
|
+
planned_delivery?: PlannedDelivery;
|
|
4038
|
+
/**
|
|
4039
|
+
* When true, this response contains simulated data from sandbox mode.
|
|
4040
|
+
*/
|
|
4041
|
+
sandbox?: boolean;
|
|
4042
|
+
context?: ContextObject;
|
|
4043
|
+
ext?: ExtensionObject;
|
|
4044
|
+
}
|
|
4045
|
+
/**
|
|
4046
|
+
* Account billed for this media buy. Includes advertiser, billing proxy (if any), and rate card applied.
|
|
4047
|
+
*/
|
|
4048
|
+
export interface Account {
|
|
4049
|
+
/**
|
|
4050
|
+
* Unique identifier for this account
|
|
4051
|
+
*/
|
|
4052
|
+
account_id: string;
|
|
4053
|
+
/**
|
|
4054
|
+
* Human-readable account name (e.g., 'Acme', 'Acme c/o Pinnacle')
|
|
4055
|
+
*/
|
|
4056
|
+
name: string;
|
|
4057
|
+
/**
|
|
4058
|
+
* The advertiser whose rates apply to this account
|
|
4059
|
+
*/
|
|
4060
|
+
advertiser?: string;
|
|
4061
|
+
/**
|
|
4062
|
+
* Optional intermediary who receives invoices on behalf of the advertiser (e.g., agency)
|
|
4063
|
+
*/
|
|
4064
|
+
billing_proxy?: string;
|
|
4065
|
+
status: AccountStatus;
|
|
4066
|
+
brand?: BrandReference;
|
|
4067
|
+
/**
|
|
4068
|
+
* Domain of the entity operating this account. When the brand operates directly, this is the brand's domain.
|
|
4069
|
+
*/
|
|
4070
|
+
operator?: string;
|
|
4071
|
+
/**
|
|
4072
|
+
* Who is invoiced on this account. operator: seller invoices the operator (agency or brand buying direct). agent: agent consolidates billing. advertiser: seller invoices the advertiser directly, even when a different operator places orders on their behalf. See billing_entity for the invoiced party's business details.
|
|
4073
|
+
*/
|
|
4074
|
+
billing?: 'operator' | 'agent' | 'advertiser';
|
|
4075
|
+
billing_entity?: BusinessEntity;
|
|
4076
|
+
/**
|
|
4077
|
+
* Identifier for the rate card applied to this account
|
|
3671
4078
|
*/
|
|
3672
4079
|
rate_card?: string;
|
|
3673
4080
|
/**
|
|
@@ -3703,23 +4110,13 @@ export interface Account {
|
|
|
3703
4110
|
*/
|
|
3704
4111
|
account_scope?: 'operator' | 'brand' | 'operator_brand' | 'agent';
|
|
3705
4112
|
/**
|
|
3706
|
-
* Governance agent endpoints
|
|
4113
|
+
* Governance agent endpoints registered on this account. Authentication credentials are write-only and not included in responses — use sync_governance to set or update credentials.
|
|
3707
4114
|
*/
|
|
3708
4115
|
governance_agents?: {
|
|
3709
4116
|
/**
|
|
3710
|
-
* Governance agent endpoint URL.
|
|
4117
|
+
* Governance agent endpoint URL. Must use HTTPS.
|
|
3711
4118
|
*/
|
|
3712
4119
|
url: string;
|
|
3713
|
-
authentication: {
|
|
3714
|
-
/**
|
|
3715
|
-
* @maxItems 1
|
|
3716
|
-
*/
|
|
3717
|
-
schemes: [] | [AuthenticationScheme];
|
|
3718
|
-
/**
|
|
3719
|
-
* Authentication credential (e.g., Bearer token).
|
|
3720
|
-
*/
|
|
3721
|
-
credentials: string;
|
|
3722
|
-
};
|
|
3723
4120
|
/**
|
|
3724
4121
|
* Governance categories this agent handles (e.g., ['budget_authority', 'strategic_alignment']). When omitted, the agent handles all categories.
|
|
3725
4122
|
*/
|
|
@@ -3736,13 +4133,9 @@ export interface Account {
|
|
|
3736
4133
|
*/
|
|
3737
4134
|
export interface Package {
|
|
3738
4135
|
/**
|
|
3739
|
-
*
|
|
4136
|
+
* Seller's unique identifier for the package
|
|
3740
4137
|
*/
|
|
3741
4138
|
package_id: string;
|
|
3742
|
-
/**
|
|
3743
|
-
* Buyer's reference identifier for this package. Sellers SHOULD deduplicate requests with the same buyer_ref within a media buy, returning the existing package rather than creating a duplicate.
|
|
3744
|
-
*/
|
|
3745
|
-
buyer_ref?: string;
|
|
3746
4139
|
/**
|
|
3747
4140
|
* ID of the product this package is based on
|
|
3748
4141
|
*/
|
|
@@ -3760,6 +4153,7 @@ export interface Package {
|
|
|
3760
4153
|
* Bid price for auction-based pricing. This is the exact bid/price to honor unless the selected pricing option has max_bid=true, in which case bid_price is the buyer's maximum willingness to pay (ceiling).
|
|
3761
4154
|
*/
|
|
3762
4155
|
bid_price?: number;
|
|
4156
|
+
price_breakdown?: PriceBreakdown;
|
|
3763
4157
|
/**
|
|
3764
4158
|
* Impression goal for this package
|
|
3765
4159
|
*/
|
|
@@ -3797,6 +4191,33 @@ export interface Package {
|
|
|
3797
4191
|
* Whether this package is paused by the buyer. Paused packages do not deliver impressions. Defaults to false.
|
|
3798
4192
|
*/
|
|
3799
4193
|
paused?: boolean;
|
|
4194
|
+
/**
|
|
4195
|
+
* Whether this package has been canceled. Canceled packages stop delivery and cannot be reactivated. Defaults to false.
|
|
4196
|
+
*/
|
|
4197
|
+
canceled?: boolean;
|
|
4198
|
+
/**
|
|
4199
|
+
* Cancellation metadata. Present only when canceled is true.
|
|
4200
|
+
*/
|
|
4201
|
+
cancellation?: {
|
|
4202
|
+
/**
|
|
4203
|
+
* ISO 8601 timestamp when this package was canceled.
|
|
4204
|
+
*/
|
|
4205
|
+
canceled_at: string;
|
|
4206
|
+
canceled_by: CanceledBy;
|
|
4207
|
+
/**
|
|
4208
|
+
* Reason the package was canceled.
|
|
4209
|
+
*/
|
|
4210
|
+
reason?: string;
|
|
4211
|
+
/**
|
|
4212
|
+
* ISO 8601 timestamp when the seller acknowledged the cancellation. Confirms inventory has been released and billing stopped. Absent until the seller processes the cancellation.
|
|
4213
|
+
*/
|
|
4214
|
+
acknowledged_at?: string;
|
|
4215
|
+
};
|
|
4216
|
+
/**
|
|
4217
|
+
* ISO 8601 timestamp for creative upload or change deadline for this package. After this deadline, creative changes are rejected. When absent, the media buy's creative_deadline applies.
|
|
4218
|
+
*/
|
|
4219
|
+
creative_deadline?: string;
|
|
4220
|
+
context?: ContextObject;
|
|
3800
4221
|
ext?: ExtensionObject;
|
|
3801
4222
|
}
|
|
3802
4223
|
/**
|
|
@@ -3833,6 +4254,10 @@ export interface PlannedDelivery {
|
|
|
3833
4254
|
* Human-readable summary of the audience the seller will target.
|
|
3834
4255
|
*/
|
|
3835
4256
|
audience_summary?: string;
|
|
4257
|
+
/**
|
|
4258
|
+
* Structured audience targeting the seller will activate. Each entry is either a signal reference or a descriptive criterion. When present, governance agents MUST use this for bias/fairness validation and SHOULD ignore audience_summary for validation purposes. The audience_summary field is a human-readable rendering of this array, not an independent declaration.
|
|
4259
|
+
*/
|
|
4260
|
+
audience_targeting?: AudienceSelector[];
|
|
3836
4261
|
/**
|
|
3837
4262
|
* Total budget the seller will deliver against.
|
|
3838
4263
|
*/
|
|
@@ -3861,51 +4286,58 @@ export interface CreateMediaBuyError {
|
|
|
3861
4286
|
/**
|
|
3862
4287
|
* Request parameters for updating campaign and package settings
|
|
3863
4288
|
*/
|
|
3864
|
-
export
|
|
4289
|
+
export interface UpdateMediaBuyRequest {
|
|
3865
4290
|
/**
|
|
3866
|
-
*
|
|
4291
|
+
* Seller's ID of the media buy to update
|
|
3867
4292
|
*/
|
|
3868
|
-
media_buy_id
|
|
4293
|
+
media_buy_id: string;
|
|
3869
4294
|
/**
|
|
3870
|
-
*
|
|
4295
|
+
* Expected current revision for optimistic concurrency. When provided, sellers MUST reject the update with CONFLICT if the media buy's current revision does not match. Obtain from get_media_buys or the most recent update response.
|
|
3871
4296
|
*/
|
|
3872
|
-
|
|
4297
|
+
revision?: number;
|
|
3873
4298
|
/**
|
|
3874
4299
|
* Pause/resume the entire media buy (true = paused, false = active)
|
|
3875
4300
|
*/
|
|
3876
4301
|
paused?: boolean;
|
|
4302
|
+
/**
|
|
4303
|
+
* Cancel the entire media buy. Cancellation is irreversible — canceled media buys cannot be reactivated. Sellers MAY reject with NOT_CANCELLABLE if the media buy cannot be canceled in its current state.
|
|
4304
|
+
*/
|
|
4305
|
+
canceled?: true;
|
|
4306
|
+
/**
|
|
4307
|
+
* Reason for cancellation. Sellers SHOULD store this and return it in subsequent get_media_buys responses.
|
|
4308
|
+
*/
|
|
4309
|
+
cancellation_reason?: string;
|
|
3877
4310
|
start_time?: StartTiming;
|
|
3878
4311
|
/**
|
|
3879
4312
|
* New end date/time in ISO 8601 format
|
|
3880
4313
|
*/
|
|
3881
4314
|
end_time?: string;
|
|
3882
4315
|
/**
|
|
3883
|
-
* Package-specific updates
|
|
4316
|
+
* Package-specific updates for existing packages
|
|
3884
4317
|
*/
|
|
3885
4318
|
packages?: PackageUpdate[];
|
|
4319
|
+
invoice_recipient?: BusinessEntity;
|
|
4320
|
+
/**
|
|
4321
|
+
* New packages to add to this media buy. Uses the same schema as create_media_buy packages. Sellers that support mid-flight package additions advertise add_packages in valid_actions. Sellers that do not support this MUST reject with UNSUPPORTED_FEATURE.
|
|
4322
|
+
*/
|
|
4323
|
+
new_packages?: PackageRequest[];
|
|
3886
4324
|
reporting_webhook?: ReportingWebhook;
|
|
3887
4325
|
push_notification_config?: PushNotificationConfig;
|
|
3888
4326
|
/**
|
|
3889
|
-
* Client-generated idempotency key for safe retries. If an update fails without a response, resending with the same idempotency_key guarantees the update is applied at most once.
|
|
4327
|
+
* Client-generated idempotency key for safe retries. If an update fails without a response, resending with the same idempotency_key guarantees the update is applied at most once. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
3890
4328
|
*/
|
|
3891
4329
|
idempotency_key?: string;
|
|
3892
4330
|
context?: ContextObject;
|
|
3893
4331
|
ext?: ExtensionObject;
|
|
3894
|
-
}
|
|
3895
|
-
[k: string]: unknown | undefined;
|
|
3896
|
-
};
|
|
4332
|
+
}
|
|
3897
4333
|
/**
|
|
3898
|
-
* Package update configuration for update_media_buy. Identifies package by package_id
|
|
4334
|
+
* Package update configuration for update_media_buy. Identifies package by package_id and specifies fields to modify. Fields not present are left unchanged. Note: product_id, format_ids, and pricing_option_id cannot be changed after creation.
|
|
3899
4335
|
*/
|
|
3900
|
-
export
|
|
4336
|
+
export interface PackageUpdate {
|
|
3901
4337
|
/**
|
|
3902
|
-
*
|
|
4338
|
+
* Seller's ID of package to update
|
|
3903
4339
|
*/
|
|
3904
|
-
package_id
|
|
3905
|
-
/**
|
|
3906
|
-
* Buyer's reference for the package to update
|
|
3907
|
-
*/
|
|
3908
|
-
buyer_ref?: string;
|
|
4340
|
+
package_id: string;
|
|
3909
4341
|
/**
|
|
3910
4342
|
* Updated budget allocation for this package in the currency specified by the pricing option
|
|
3911
4343
|
*/
|
|
@@ -3931,6 +4363,14 @@ export type PackageUpdate = {
|
|
|
3931
4363
|
* Pause/resume specific package (true = paused, false = active)
|
|
3932
4364
|
*/
|
|
3933
4365
|
paused?: boolean;
|
|
4366
|
+
/**
|
|
4367
|
+
* Cancel this specific package. Cancellation is irreversible — canceled packages stop delivery and cannot be reactivated. Sellers MAY reject with NOT_CANCELLABLE.
|
|
4368
|
+
*/
|
|
4369
|
+
canceled?: true;
|
|
4370
|
+
/**
|
|
4371
|
+
* Reason for canceling this package.
|
|
4372
|
+
*/
|
|
4373
|
+
cancellation_reason?: string;
|
|
3934
4374
|
/**
|
|
3935
4375
|
* Replace the catalogs this package promotes. Uses replacement semantics — the provided array replaces the current list. Omit to leave catalogs unchanged.
|
|
3936
4376
|
*/
|
|
@@ -4002,14 +4442,11 @@ export type PackageUpdate = {
|
|
|
4002
4442
|
creative_assignments?: CreativeAssignment[];
|
|
4003
4443
|
/**
|
|
4004
4444
|
* Upload new creative assets and assign to this package (creatives will be added to library). Use creative_assignments instead for existing library creatives.
|
|
4005
|
-
*
|
|
4006
|
-
* @maxItems 100
|
|
4007
4445
|
*/
|
|
4008
4446
|
creatives?: CreativeAsset[];
|
|
4447
|
+
context?: ContextObject;
|
|
4009
4448
|
ext?: ExtensionObject;
|
|
4010
|
-
}
|
|
4011
|
-
[k: string]: unknown | undefined;
|
|
4012
|
-
};
|
|
4449
|
+
}
|
|
4013
4450
|
/**
|
|
4014
4451
|
* Response payload for update_media_buy task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - updates are either fully applied or not applied at all.
|
|
4015
4452
|
*/
|
|
@@ -4019,21 +4456,27 @@ export type UpdateMediaBuyResponse = UpdateMediaBuySuccess | UpdateMediaBuyError
|
|
|
4019
4456
|
*/
|
|
4020
4457
|
export interface UpdateMediaBuySuccess {
|
|
4021
4458
|
/**
|
|
4022
|
-
*
|
|
4459
|
+
* Seller's identifier for the media buy
|
|
4023
4460
|
*/
|
|
4024
4461
|
media_buy_id: string;
|
|
4462
|
+
status?: MediaBuyStatus;
|
|
4025
4463
|
/**
|
|
4026
|
-
*
|
|
4464
|
+
* Revision number after this update. Use this value in subsequent update_media_buy requests for optimistic concurrency.
|
|
4027
4465
|
*/
|
|
4028
|
-
|
|
4466
|
+
revision?: number;
|
|
4029
4467
|
/**
|
|
4030
4468
|
* ISO 8601 timestamp when changes take effect (null if pending approval)
|
|
4031
4469
|
*/
|
|
4032
4470
|
implementation_date?: string | null;
|
|
4471
|
+
invoice_recipient?: BusinessEntity;
|
|
4033
4472
|
/**
|
|
4034
4473
|
* Array of packages that were modified with complete state information
|
|
4035
4474
|
*/
|
|
4036
4475
|
affected_packages?: Package[];
|
|
4476
|
+
/**
|
|
4477
|
+
* Actions the buyer can perform after this update. Saves a round-trip to get_media_buys.
|
|
4478
|
+
*/
|
|
4479
|
+
valid_actions?: ('pause' | 'resume' | 'cancel' | 'update_budget' | 'update_dates' | 'update_packages' | 'add_packages' | 'sync_creatives')[];
|
|
4037
4480
|
/**
|
|
4038
4481
|
* When true, this response contains simulated data from sandbox mode.
|
|
4039
4482
|
*/
|
|
@@ -4052,31 +4495,27 @@ export interface UpdateMediaBuyError {
|
|
|
4052
4495
|
context?: ContextObject;
|
|
4053
4496
|
ext?: ExtensionObject;
|
|
4054
4497
|
}
|
|
4055
|
-
/**
|
|
4056
|
-
* Status of a media buy.
|
|
4057
|
-
*/
|
|
4058
|
-
export type MediaBuyStatus = 'pending_activation' | 'active' | 'paused' | 'completed' | 'rejected' | 'canceled';
|
|
4059
4498
|
/**
|
|
4060
4499
|
* Request parameters for retrieving media buy status, creative approval state, and optional delivery snapshots
|
|
4061
4500
|
*/
|
|
4062
4501
|
export interface GetMediaBuysRequest {
|
|
4063
4502
|
account?: AccountReference;
|
|
4064
4503
|
/**
|
|
4065
|
-
* Array of
|
|
4504
|
+
* Array of media buy IDs to retrieve. When omitted, returns a paginated set of accessible media buys matching status_filter.
|
|
4066
4505
|
*/
|
|
4067
4506
|
media_buy_ids?: string[];
|
|
4068
4507
|
/**
|
|
4069
|
-
*
|
|
4070
|
-
*/
|
|
4071
|
-
buyer_refs?: string[];
|
|
4072
|
-
/**
|
|
4073
|
-
* Filter by status. Can be a single status or array of statuses. Defaults to ["active"] only when media_buy_ids and buyer_refs are both omitted. When media_buy_ids or buyer_refs are provided, no implicit status filter is applied.
|
|
4508
|
+
* Filter by status. Can be a single status or array of statuses. Defaults to ["active"] when media_buy_ids is omitted. When media_buy_ids is provided, no implicit status filter is applied.
|
|
4074
4509
|
*/
|
|
4075
4510
|
status_filter?: MediaBuyStatus | MediaBuyStatus[];
|
|
4076
4511
|
/**
|
|
4077
4512
|
* When true, include a near-real-time delivery snapshot for each package. Snapshots reflect the latest available entity-level stats from the platform (e.g., updated every ~15 minutes on GAM, ~1 hour on batch-only platforms). The staleness_seconds field on each snapshot indicates data freshness. If a snapshot cannot be returned, package.snapshot_unavailable_reason explains why. Defaults to false.
|
|
4078
4513
|
*/
|
|
4079
4514
|
include_snapshot?: boolean;
|
|
4515
|
+
/**
|
|
4516
|
+
* When present, include the last N revision history entries for each media buy (returns min(N, available entries)). Each entry contains revision number, timestamp, actor, and a summary of what changed. Omit or set to 0 to exclude history (default). Recommended: 5-10 for monitoring, 50+ for audit.
|
|
4517
|
+
*/
|
|
4518
|
+
include_history?: number;
|
|
4080
4519
|
pagination?: PaginationRequest;
|
|
4081
4520
|
context?: ContextObject;
|
|
4082
4521
|
ext?: ExtensionObject;
|
|
@@ -4094,18 +4533,11 @@ export interface GetMediaBuysResponse {
|
|
|
4094
4533
|
*/
|
|
4095
4534
|
media_buys: {
|
|
4096
4535
|
/**
|
|
4097
|
-
*
|
|
4536
|
+
* Seller's unique identifier for the media buy
|
|
4098
4537
|
*/
|
|
4099
4538
|
media_buy_id: string;
|
|
4100
|
-
/**
|
|
4101
|
-
* Buyer's reference identifier for this media buy
|
|
4102
|
-
*/
|
|
4103
|
-
buyer_ref?: string;
|
|
4104
|
-
/**
|
|
4105
|
-
* Buyer campaign reference label sourced from create_media_buy.buyer_campaign_ref. Groups related operations under a single campaign; may be absent when not provided at creation time.
|
|
4106
|
-
*/
|
|
4107
|
-
buyer_campaign_ref?: string;
|
|
4108
4539
|
account?: Account;
|
|
4540
|
+
invoice_recipient?: BusinessEntity;
|
|
4109
4541
|
status: MediaBuyStatus;
|
|
4110
4542
|
/**
|
|
4111
4543
|
* ISO 4217 currency code (e.g., USD, EUR, GBP) for monetary values at this media buy level. total_budget is always denominated in this currency. Package-level fields may override with package.currency.
|
|
@@ -4127,6 +4559,28 @@ export interface GetMediaBuysResponse {
|
|
|
4127
4559
|
* ISO 8601 timestamp for creative upload deadline
|
|
4128
4560
|
*/
|
|
4129
4561
|
creative_deadline?: string;
|
|
4562
|
+
/**
|
|
4563
|
+
* ISO 8601 timestamp when the seller confirmed this media buy. A successful create_media_buy response constitutes order confirmation.
|
|
4564
|
+
*/
|
|
4565
|
+
confirmed_at?: string;
|
|
4566
|
+
/**
|
|
4567
|
+
* Cancellation metadata. Present only when status is 'canceled'.
|
|
4568
|
+
*/
|
|
4569
|
+
cancellation?: {
|
|
4570
|
+
/**
|
|
4571
|
+
* ISO 8601 timestamp when this media buy was canceled.
|
|
4572
|
+
*/
|
|
4573
|
+
canceled_at: string;
|
|
4574
|
+
canceled_by: CanceledBy;
|
|
4575
|
+
/**
|
|
4576
|
+
* Reason the media buy was canceled.
|
|
4577
|
+
*/
|
|
4578
|
+
reason?: string;
|
|
4579
|
+
};
|
|
4580
|
+
/**
|
|
4581
|
+
* Current revision number. Pass this in update_media_buy for optimistic concurrency.
|
|
4582
|
+
*/
|
|
4583
|
+
revision?: number;
|
|
4130
4584
|
/**
|
|
4131
4585
|
* Creation timestamp
|
|
4132
4586
|
*/
|
|
@@ -4135,6 +4589,40 @@ export interface GetMediaBuysResponse {
|
|
|
4135
4589
|
* Last update timestamp
|
|
4136
4590
|
*/
|
|
4137
4591
|
updated_at?: string;
|
|
4592
|
+
/**
|
|
4593
|
+
* Actions the buyer can perform on this media buy in its current state. Eliminates the need for agents to internalize the state machine — the seller declares what is permitted right now.
|
|
4594
|
+
*/
|
|
4595
|
+
valid_actions?: ('pause' | 'resume' | 'cancel' | 'update_budget' | 'update_dates' | 'update_packages' | 'add_packages' | 'sync_creatives')[];
|
|
4596
|
+
/**
|
|
4597
|
+
* Revision history entries, most recent first. Only present when include_history > 0 in the request. Each entry represents a state change or update to the media buy. Entries are append-only: sellers MUST NOT modify or delete previously emitted history entries. Callers MAY cache entries by revision number. Returns min(N, available entries) when include_history exceeds the total.
|
|
4598
|
+
*/
|
|
4599
|
+
history?: {
|
|
4600
|
+
/**
|
|
4601
|
+
* Revision number after this change was applied.
|
|
4602
|
+
*/
|
|
4603
|
+
revision: number;
|
|
4604
|
+
/**
|
|
4605
|
+
* When this change occurred.
|
|
4606
|
+
*/
|
|
4607
|
+
timestamp: string;
|
|
4608
|
+
/**
|
|
4609
|
+
* Identity of who made the change — derived from authentication context, not caller-provided. Format is seller-defined (e.g., agent URL, user email, API key label).
|
|
4610
|
+
*/
|
|
4611
|
+
actor?: string;
|
|
4612
|
+
/**
|
|
4613
|
+
* What happened. Standard actions: created, activated, paused, resumed, canceled, rejected, completed, updated_budget, updated_dates, updated_packages, package_canceled, package_paused, package_resumed. Sellers MAY use additional platform-specific actions (e.g., creative_approved, targeting_updated) — use ext on the history entry for structured metadata about custom actions.
|
|
4614
|
+
*/
|
|
4615
|
+
action: string;
|
|
4616
|
+
/**
|
|
4617
|
+
* Human-readable summary of the change (e.g., 'Budget increased from $5,000 to $7,500 on pkg_abc').
|
|
4618
|
+
*/
|
|
4619
|
+
summary?: string;
|
|
4620
|
+
/**
|
|
4621
|
+
* Package affected, when the change targeted a specific package.
|
|
4622
|
+
*/
|
|
4623
|
+
package_id?: string;
|
|
4624
|
+
ext?: ExtensionObject;
|
|
4625
|
+
}[];
|
|
4138
4626
|
/**
|
|
4139
4627
|
* Packages within this media buy, augmented with creative approval status and optional delivery snapshots
|
|
4140
4628
|
*/
|
|
@@ -4158,13 +4646,9 @@ export interface GetMediaBuysResponse {
|
|
|
4158
4646
|
*/
|
|
4159
4647
|
export interface PackageStatus {
|
|
4160
4648
|
/**
|
|
4161
|
-
*
|
|
4649
|
+
* Seller's package identifier
|
|
4162
4650
|
*/
|
|
4163
4651
|
package_id: string;
|
|
4164
|
-
/**
|
|
4165
|
-
* Buyer's reference identifier for this package
|
|
4166
|
-
*/
|
|
4167
|
-
buyer_ref?: string;
|
|
4168
4652
|
/**
|
|
4169
4653
|
* Product identifier this package is purchased from
|
|
4170
4654
|
*/
|
|
@@ -4197,6 +4681,28 @@ export interface PackageStatus {
|
|
|
4197
4681
|
* Whether this package is currently paused by the buyer
|
|
4198
4682
|
*/
|
|
4199
4683
|
paused?: boolean;
|
|
4684
|
+
/**
|
|
4685
|
+
* Whether this package has been canceled. Canceled packages stop delivery and cannot be reactivated.
|
|
4686
|
+
*/
|
|
4687
|
+
canceled?: boolean;
|
|
4688
|
+
/**
|
|
4689
|
+
* Cancellation metadata. Present only when canceled is true.
|
|
4690
|
+
*/
|
|
4691
|
+
cancellation?: {
|
|
4692
|
+
/**
|
|
4693
|
+
* ISO 8601 timestamp when this package was canceled.
|
|
4694
|
+
*/
|
|
4695
|
+
canceled_at: string;
|
|
4696
|
+
canceled_by: CanceledBy;
|
|
4697
|
+
/**
|
|
4698
|
+
* Reason the package was canceled.
|
|
4699
|
+
*/
|
|
4700
|
+
reason?: string;
|
|
4701
|
+
};
|
|
4702
|
+
/**
|
|
4703
|
+
* ISO 8601 timestamp for creative upload or change deadline for this package. After this deadline, creative changes are rejected. When absent, the media buy's creative_deadline applies.
|
|
4704
|
+
*/
|
|
4705
|
+
creative_deadline?: string;
|
|
4200
4706
|
/**
|
|
4201
4707
|
* Approval status for each creative assigned to this package. Absent when no creatives have been assigned.
|
|
4202
4708
|
*/
|
|
@@ -4273,13 +4779,9 @@ export type SortMetric = 'impressions' | 'spend' | 'clicks' | 'ctr' | 'views' |
|
|
|
4273
4779
|
export interface GetMediaBuyDeliveryRequest {
|
|
4274
4780
|
account?: AccountReference;
|
|
4275
4781
|
/**
|
|
4276
|
-
* Array of
|
|
4782
|
+
* Array of media buy IDs to get delivery data for
|
|
4277
4783
|
*/
|
|
4278
4784
|
media_buy_ids?: string[];
|
|
4279
|
-
/**
|
|
4280
|
-
* Array of buyer reference IDs to get delivery data for
|
|
4281
|
-
*/
|
|
4282
|
-
buyer_refs?: string[];
|
|
4283
4785
|
/**
|
|
4284
4786
|
* Filter by status. Can be a single status or array of statuses
|
|
4285
4787
|
*/
|
|
@@ -4440,9 +4942,13 @@ export interface GetMediaBuyDeliveryResponse {
|
|
|
4440
4942
|
*/
|
|
4441
4943
|
clicks?: number;
|
|
4442
4944
|
/**
|
|
4443
|
-
* Total video completions across all media buys (if applicable)
|
|
4945
|
+
* Total audio/video completions across all media buys (if applicable)
|
|
4946
|
+
*/
|
|
4947
|
+
completed_views?: number;
|
|
4948
|
+
/**
|
|
4949
|
+
* Total views across all media buys (if applicable)
|
|
4444
4950
|
*/
|
|
4445
|
-
|
|
4951
|
+
views?: number;
|
|
4446
4952
|
/**
|
|
4447
4953
|
* Total conversions across all media buys (if applicable)
|
|
4448
4954
|
*/
|
|
@@ -4463,6 +4969,22 @@ export interface GetMediaBuyDeliveryResponse {
|
|
|
4463
4969
|
* Aggregate cost per conversion across all media buys (total spend / total conversions)
|
|
4464
4970
|
*/
|
|
4465
4971
|
cost_per_acquisition?: number;
|
|
4972
|
+
/**
|
|
4973
|
+
* Aggregate completion rate across all media buys (weighted by impressions, not a simple average of per-buy rates)
|
|
4974
|
+
*/
|
|
4975
|
+
completion_rate?: number;
|
|
4976
|
+
/**
|
|
4977
|
+
* Deduplicated reach across all media buys (if the seller can deduplicate across buys; otherwise sum of per-buy reach). Only present when all media buys share the same reach_unit. Omitted when reach units are heterogeneous — use per-buy reach values instead.
|
|
4978
|
+
*/
|
|
4979
|
+
reach?: number;
|
|
4980
|
+
/**
|
|
4981
|
+
* Unit of measurement for reach. Only present when all aggregated media buys use the same reach_unit.
|
|
4982
|
+
*/
|
|
4983
|
+
reach_unit?: ReachUnit;
|
|
4984
|
+
/**
|
|
4985
|
+
* Average frequency per reach unit across all media buys (impressions / reach when cross-buy deduplication is available). Only present when reach is present.
|
|
4986
|
+
*/
|
|
4987
|
+
frequency?: number;
|
|
4466
4988
|
/**
|
|
4467
4989
|
* Number of media buys included in the response
|
|
4468
4990
|
*/
|
|
@@ -4473,17 +4995,9 @@ export interface GetMediaBuyDeliveryResponse {
|
|
|
4473
4995
|
*/
|
|
4474
4996
|
media_buy_deliveries: {
|
|
4475
4997
|
/**
|
|
4476
|
-
*
|
|
4998
|
+
* Seller's media buy identifier
|
|
4477
4999
|
*/
|
|
4478
5000
|
media_buy_id: string;
|
|
4479
|
-
/**
|
|
4480
|
-
* Buyer's reference identifier for this media buy
|
|
4481
|
-
*/
|
|
4482
|
-
buyer_ref?: string;
|
|
4483
|
-
/**
|
|
4484
|
-
* Buyer's campaign reference label from create_media_buy.buyer_campaign_ref. Groups related operations under a single campaign for CRM and ad server correlation; may be absent when not provided at creation time.
|
|
4485
|
-
*/
|
|
4486
|
-
buyer_campaign_ref?: string;
|
|
4487
5001
|
/**
|
|
4488
5002
|
* Current media buy status. Lifecycle states use the same taxonomy as media-buy-status (`pending_activation`, `active`, `paused`, `completed`, `rejected`, `canceled`). In webhook context, reporting_delayed indicates data temporarily unavailable. `pending` is accepted as a legacy alias for pending_activation.
|
|
4489
5003
|
*/
|
|
@@ -4508,13 +5022,9 @@ export interface GetMediaBuyDeliveryResponse {
|
|
|
4508
5022
|
*/
|
|
4509
5023
|
by_package: (DeliveryMetrics & {
|
|
4510
5024
|
/**
|
|
4511
|
-
*
|
|
5025
|
+
* Seller's package identifier
|
|
4512
5026
|
*/
|
|
4513
5027
|
package_id: string;
|
|
4514
|
-
/**
|
|
4515
|
-
* Buyer's reference identifier for this package
|
|
4516
|
-
*/
|
|
4517
|
-
buyer_ref?: string;
|
|
4518
5028
|
/**
|
|
4519
5029
|
* Delivery pace (1.0 = on track, <1.0 = behind, >1.0 = ahead)
|
|
4520
5030
|
*/
|
|
@@ -4763,7 +5273,7 @@ export interface DeliveryMetrics {
|
|
|
4763
5273
|
*/
|
|
4764
5274
|
ctr?: number;
|
|
4765
5275
|
/**
|
|
4766
|
-
*
|
|
5276
|
+
* Content engagements counted toward the billable view threshold. For video this is a platform-defined view event (e.g., 30 seconds or video midpoint); for audio/podcast it is a stream start; for other formats it follows the pricing model's view definition. When the package uses CPV pricing, spend = views × rate.
|
|
4767
5277
|
*/
|
|
4768
5278
|
views?: number;
|
|
4769
5279
|
/**
|
|
@@ -4821,15 +5331,19 @@ export interface DeliveryMetrics {
|
|
|
4821
5331
|
*/
|
|
4822
5332
|
grps?: number;
|
|
4823
5333
|
/**
|
|
4824
|
-
* Unique reach
|
|
5334
|
+
* Unique reach in the units specified by reach_unit. When reach_unit is omitted, units are unspecified — do not compare reach values across packages or media buys without a common reach_unit.
|
|
4825
5335
|
*/
|
|
4826
5336
|
reach?: number;
|
|
4827
5337
|
/**
|
|
4828
|
-
*
|
|
5338
|
+
* Unit of measurement for the reach field. Aligns with the reach_unit declared on optimization goals and delivery forecasts. Required when reach is present to enable cross-platform comparison.
|
|
5339
|
+
*/
|
|
5340
|
+
reach_unit?: ReachUnit;
|
|
5341
|
+
/**
|
|
5342
|
+
* Average frequency per reach unit (typically measured over campaign duration, but can vary by measurement provider). When reach_unit is 'households', this is average exposures per household; when 'accounts', per logged-in account; etc.
|
|
4829
5343
|
*/
|
|
4830
5344
|
frequency?: number;
|
|
4831
5345
|
/**
|
|
4832
|
-
*
|
|
5346
|
+
* Audio/video quartile completion data
|
|
4833
5347
|
*/
|
|
4834
5348
|
quartile_data?: {
|
|
4835
5349
|
/**
|
|
@@ -4967,23 +5481,31 @@ export interface DeliveryMetrics {
|
|
|
4967
5481
|
value?: number;
|
|
4968
5482
|
}[];
|
|
4969
5483
|
}
|
|
5484
|
+
/**
|
|
5485
|
+
* The business metric being measured
|
|
5486
|
+
*/
|
|
5487
|
+
export type MetricType = 'overall_performance' | 'conversion_rate' | 'brand_lift' | 'click_through_rate' | 'completion_rate' | 'viewability' | 'brand_safety' | 'cost_efficiency';
|
|
5488
|
+
/**
|
|
5489
|
+
* Source of the performance data
|
|
5490
|
+
*/
|
|
5491
|
+
export type FeedbackSource = 'buyer_attribution' | 'third_party_measurement' | 'platform_analytics' | 'verification_partner';
|
|
4970
5492
|
/**
|
|
4971
5493
|
* Request payload for provide_performance_feedback task
|
|
4972
5494
|
*/
|
|
4973
|
-
export
|
|
5495
|
+
export interface ProvidePerformanceFeedbackRequest {
|
|
4974
5496
|
/**
|
|
4975
|
-
*
|
|
5497
|
+
* Seller's media buy identifier
|
|
4976
5498
|
*/
|
|
4977
|
-
media_buy_id
|
|
5499
|
+
media_buy_id: string;
|
|
4978
5500
|
/**
|
|
4979
|
-
*
|
|
5501
|
+
* Client-generated unique key for this request. Prevents duplicate feedback submissions on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
4980
5502
|
*/
|
|
4981
|
-
|
|
4982
|
-
measurement_period
|
|
5503
|
+
idempotency_key?: string;
|
|
5504
|
+
measurement_period: DatetimeRange;
|
|
4983
5505
|
/**
|
|
4984
5506
|
* Normalized performance score (0.0 = no value, 1.0 = expected, >1.0 = above expected)
|
|
4985
5507
|
*/
|
|
4986
|
-
performance_index
|
|
5508
|
+
performance_index: number;
|
|
4987
5509
|
/**
|
|
4988
5510
|
* Specific package within the media buy (if feedback is package-specific)
|
|
4989
5511
|
*/
|
|
@@ -4996,17 +5518,7 @@ export type ProvidePerformanceFeedbackRequest = {
|
|
|
4996
5518
|
feedback_source?: FeedbackSource;
|
|
4997
5519
|
context?: ContextObject;
|
|
4998
5520
|
ext?: ExtensionObject;
|
|
4999
|
-
}
|
|
5000
|
-
[k: string]: unknown | undefined;
|
|
5001
|
-
};
|
|
5002
|
-
/**
|
|
5003
|
-
* The business metric being measured
|
|
5004
|
-
*/
|
|
5005
|
-
export type MetricType = 'overall_performance' | 'conversion_rate' | 'brand_lift' | 'click_through_rate' | 'completion_rate' | 'viewability' | 'brand_safety' | 'cost_efficiency';
|
|
5006
|
-
/**
|
|
5007
|
-
* Source of the performance data
|
|
5008
|
-
*/
|
|
5009
|
-
export type FeedbackSource = 'buyer_attribution' | 'third_party_measurement' | 'platform_analytics' | 'verification_partner';
|
|
5521
|
+
}
|
|
5010
5522
|
/**
|
|
5011
5523
|
* Time period for performance measurement
|
|
5012
5524
|
*/
|
|
@@ -5137,6 +5649,7 @@ export interface SyncEventSourcesSuccess {
|
|
|
5137
5649
|
* Action taken for this event source
|
|
5138
5650
|
*/
|
|
5139
5651
|
action: 'created' | 'updated' | 'unchanged' | 'deleted' | 'failed';
|
|
5652
|
+
health?: EventSourceHealth;
|
|
5140
5653
|
/**
|
|
5141
5654
|
* Errors for this event source (only present when action='failed')
|
|
5142
5655
|
*/
|
|
@@ -5149,6 +5662,49 @@ export interface SyncEventSourcesSuccess {
|
|
|
5149
5662
|
context?: ContextObject;
|
|
5150
5663
|
ext?: ExtensionObject;
|
|
5151
5664
|
}
|
|
5665
|
+
/**
|
|
5666
|
+
* Health assessment for this event source. Reflects event volume, data quality, and parameter completeness. Sellers that support health scoring include this on every source (buyer-managed and seller-managed). Absent when the seller does not evaluate event source health.
|
|
5667
|
+
*/
|
|
5668
|
+
export interface EventSourceHealth {
|
|
5669
|
+
status: AssessmentStatus;
|
|
5670
|
+
/**
|
|
5671
|
+
* Seller-specific scoring detail. Only present when the seller has a native quality score to relay. Buyer agents should use status (not detail) for cross-seller decisions. Detail is supplementary context for human review or advanced diagnostics.
|
|
5672
|
+
*/
|
|
5673
|
+
detail?: {
|
|
5674
|
+
/**
|
|
5675
|
+
* Seller-defined quality score. Scale varies by seller — only compare within the same seller.
|
|
5676
|
+
*/
|
|
5677
|
+
score: number;
|
|
5678
|
+
/**
|
|
5679
|
+
* Maximum possible score on this seller's scale.
|
|
5680
|
+
*/
|
|
5681
|
+
max_score: number;
|
|
5682
|
+
/**
|
|
5683
|
+
* Seller's name for this score (e.g., 'Event Quality Score', 'Event Match Quality').
|
|
5684
|
+
*/
|
|
5685
|
+
label?: string;
|
|
5686
|
+
};
|
|
5687
|
+
/**
|
|
5688
|
+
* Fraction of events from this source that the seller successfully matched to ad interactions (0.0-1.0). Low match rates indicate weak user_match identifiers. Absent when the seller does not compute match rates.
|
|
5689
|
+
*/
|
|
5690
|
+
match_rate?: number;
|
|
5691
|
+
/**
|
|
5692
|
+
* ISO 8601 timestamp of the most recent event received from this source. Absent when no events have been received.
|
|
5693
|
+
*/
|
|
5694
|
+
last_event_at?: string;
|
|
5695
|
+
/**
|
|
5696
|
+
* ISO 8601 timestamp of when this health assessment was computed. When health is derived from reporting data, this may lag real-time. Buyer agents can use this to decide whether to trust stale assessments or re-request.
|
|
5697
|
+
*/
|
|
5698
|
+
evaluated_at?: string;
|
|
5699
|
+
/**
|
|
5700
|
+
* Number of events received from this source in the last 24 hours. Zero indicates the source is configured but not firing.
|
|
5701
|
+
*/
|
|
5702
|
+
events_received_24h?: number;
|
|
5703
|
+
/**
|
|
5704
|
+
* Actionable issues detected with this event source. Sellers should limit to the top 3-5 most actionable items. Buyer agents should sort by severity rather than relying on array position.
|
|
5705
|
+
*/
|
|
5706
|
+
issues?: DiagnosticIssue[];
|
|
5707
|
+
}
|
|
5152
5708
|
/**
|
|
5153
5709
|
* Error response - operation failed completely
|
|
5154
5710
|
*/
|
|
@@ -5205,7 +5761,7 @@ export type UserMatch = {
|
|
|
5205
5761
|
/**
|
|
5206
5762
|
* Universal ID type
|
|
5207
5763
|
*/
|
|
5208
|
-
export type UIDType = 'rampid' | 'id5' | 'uid2' | 'euid' | 'pairid' | 'maid' | 'other';
|
|
5764
|
+
export type UIDType = 'rampid' | 'id5' | 'uid2' | 'euid' | 'pairid' | 'maid' | 'hashed_email' | 'publisher_first_party' | 'other';
|
|
5209
5765
|
/**
|
|
5210
5766
|
* Request parameters for logging marketing events
|
|
5211
5767
|
*/
|
|
@@ -5220,10 +5776,12 @@ export interface LogEventRequest {
|
|
|
5220
5776
|
test_event_code?: string;
|
|
5221
5777
|
/**
|
|
5222
5778
|
* Events to log
|
|
5223
|
-
*
|
|
5224
|
-
* @maxItems 10000
|
|
5225
5779
|
*/
|
|
5226
5780
|
events: Event[];
|
|
5781
|
+
/**
|
|
5782
|
+
* Client-generated unique key for this request. Prevents duplicate event logging on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
5783
|
+
*/
|
|
5784
|
+
idempotency_key?: string;
|
|
5227
5785
|
context?: ContextObject;
|
|
5228
5786
|
ext?: ExtensionObject;
|
|
5229
5787
|
}
|
|
@@ -5463,6 +6021,10 @@ export interface SyncAudiencesRequest {
|
|
|
5463
6021
|
* Response from audience sync operation. Returns either per-audience results OR operation-level errors.
|
|
5464
6022
|
*/
|
|
5465
6023
|
export type SyncAudiencesResponse = SyncAudiencesSuccess | SyncAudiencesError;
|
|
6024
|
+
/**
|
|
6025
|
+
* Identifier type. Combines hashed PII types (hashed_email, hashed_phone) with universal ID types (rampid, uid2, maid, etc.).
|
|
6026
|
+
*/
|
|
6027
|
+
export type MatchIDType = 'hashed_email' | 'hashed_phone' | 'rampid' | 'id5' | 'uid2' | 'euid' | 'pairid' | 'maid' | 'other';
|
|
5466
6028
|
/**
|
|
5467
6029
|
* Success response - sync operation processed audiences
|
|
5468
6030
|
*/
|
|
@@ -5503,6 +6065,28 @@ export interface SyncAudiencesSuccess {
|
|
|
5503
6065
|
* Total members matched to platform users across all syncs (cumulative, not just this call). Populated when status is 'ready'.
|
|
5504
6066
|
*/
|
|
5505
6067
|
matched_count?: number;
|
|
6068
|
+
/**
|
|
6069
|
+
* Deduplicated match rate across all identifier types (matched_count / total_uploaded_count after deduplication). A single number for reach estimation. Populated when status is 'ready'.
|
|
6070
|
+
*/
|
|
6071
|
+
effective_match_rate?: number;
|
|
6072
|
+
/**
|
|
6073
|
+
* Per-identifier-type match results. Shows which ID types are resolving and at what rate. Helps buyers decide which identifiers to prioritize. Populated when the seller can report per-type matching. Omitted when the seller only supports aggregate match counts.
|
|
6074
|
+
*/
|
|
6075
|
+
match_breakdown?: {
|
|
6076
|
+
id_type: MatchIDType;
|
|
6077
|
+
/**
|
|
6078
|
+
* Cumulative number of members submitted with this identifier type across all syncs (matches total_uploaded_count semantics, not uploaded_count). Compare with matched to calculate per-type match rate.
|
|
6079
|
+
*/
|
|
6080
|
+
submitted: number;
|
|
6081
|
+
/**
|
|
6082
|
+
* Cumulative number of members matched via this identifier type across all syncs.
|
|
6083
|
+
*/
|
|
6084
|
+
matched: number;
|
|
6085
|
+
/**
|
|
6086
|
+
* Match rate for this identifier type (matched / submitted). Server-authoritative — consumers should prefer this value over computing their own.
|
|
6087
|
+
*/
|
|
6088
|
+
match_rate: number;
|
|
6089
|
+
}[];
|
|
5506
6090
|
/**
|
|
5507
6091
|
* ISO 8601 timestamp of when the most recent sync operation was accepted by the platform. Useful for agents reasoning about audience freshness. Omitted if the seller does not track this.
|
|
5508
6092
|
*/
|
|
@@ -5545,14 +6129,10 @@ export interface SyncCatalogsRequest {
|
|
|
5545
6129
|
account: AccountReference;
|
|
5546
6130
|
/**
|
|
5547
6131
|
* Array of catalog feeds to sync (create or update). When omitted, the call is discovery-only and returns all existing catalogs on the account without modification.
|
|
5548
|
-
*
|
|
5549
|
-
* @maxItems 50
|
|
5550
6132
|
*/
|
|
5551
6133
|
catalogs?: Catalog[];
|
|
5552
6134
|
/**
|
|
5553
6135
|
* Optional filter to limit sync scope to specific catalog IDs. When provided, only these catalogs will be created/updated. Other catalogs on the account are unaffected.
|
|
5554
|
-
*
|
|
5555
|
-
* @maxItems 50
|
|
5556
6136
|
*/
|
|
5557
6137
|
catalog_ids?: string[];
|
|
5558
6138
|
/**
|
|
@@ -5704,11 +6284,11 @@ export interface BuildCreativeRequest {
|
|
|
5704
6284
|
*/
|
|
5705
6285
|
concept_id?: string;
|
|
5706
6286
|
/**
|
|
5707
|
-
*
|
|
6287
|
+
* Media buy identifier for tag generation context. When the creative agent is also the ad server, this provides the trafficking context needed to generate placement-specific tags (e.g., CM360 placement ID). Not needed when tags are generated at the creative level (most creative platforms).
|
|
5708
6288
|
*/
|
|
5709
6289
|
media_buy_id?: string;
|
|
5710
6290
|
/**
|
|
5711
|
-
*
|
|
6291
|
+
* Package identifier within the media buy. Used with media_buy_id when the creative agent needs line-item-level context for tag generation. Omit to get a tag not scoped to a specific package.
|
|
5712
6292
|
*/
|
|
5713
6293
|
package_id?: string;
|
|
5714
6294
|
target_format_id?: FormatID;
|
|
@@ -5753,6 +6333,10 @@ export interface BuildCreativeRequest {
|
|
|
5753
6333
|
macro_values?: {
|
|
5754
6334
|
[k: string]: string | undefined;
|
|
5755
6335
|
};
|
|
6336
|
+
/**
|
|
6337
|
+
* Client-generated unique key for this request. Prevents duplicate creative generation on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
6338
|
+
*/
|
|
6339
|
+
idempotency_key?: string;
|
|
5756
6340
|
context?: ContextObject;
|
|
5757
6341
|
ext?: ExtensionObject;
|
|
5758
6342
|
}
|
|
@@ -6170,8 +6754,6 @@ export type PreviewCreativeRequest = {
|
|
|
6170
6754
|
request_type: 'batch';
|
|
6171
6755
|
/**
|
|
6172
6756
|
* Array of preview requests (1-50 items). Each follows the single request structure.
|
|
6173
|
-
*
|
|
6174
|
-
* @maxItems 50
|
|
6175
6757
|
*/
|
|
6176
6758
|
requests: {
|
|
6177
6759
|
format_id?: FormatID;
|
|
@@ -6347,7 +6929,7 @@ export interface PreviewCreativeVariantResponse {
|
|
|
6347
6929
|
ext?: ExtensionObject;
|
|
6348
6930
|
}
|
|
6349
6931
|
/**
|
|
6350
|
-
* Request parameters for retrieving creative delivery data including variant-level metrics from a creative agent. At least one scoping filter (media_buy_ids
|
|
6932
|
+
* Request parameters for retrieving creative delivery data including variant-level metrics from a creative agent. At least one scoping filter (media_buy_ids or creative_ids) is required.
|
|
6351
6933
|
*/
|
|
6352
6934
|
export type GetCreativeDeliveryRequest = {
|
|
6353
6935
|
[k: string]: unknown | undefined;
|
|
@@ -6357,10 +6939,6 @@ export type GetCreativeDeliveryRequest = {
|
|
|
6357
6939
|
* Filter to specific media buys by publisher ID. If omitted, returns creative delivery across all matching media buys.
|
|
6358
6940
|
*/
|
|
6359
6941
|
media_buy_ids?: string[];
|
|
6360
|
-
/**
|
|
6361
|
-
* Filter to specific media buys by buyer reference ID. Alternative to media_buy_ids when the buyer doesn't have the publisher's identifiers.
|
|
6362
|
-
*/
|
|
6363
|
-
media_buy_buyer_refs?: string[];
|
|
6364
6942
|
/**
|
|
6365
6943
|
* Filter to specific creatives by ID. If omitted, returns delivery for all creatives matching the other filters.
|
|
6366
6944
|
*/
|
|
@@ -6414,7 +6992,7 @@ export type CreativeVariant = DeliveryMetrics & {
|
|
|
6414
6992
|
/**
|
|
6415
6993
|
* Type of identifier
|
|
6416
6994
|
*/
|
|
6417
|
-
export type PropertyIdentifierTypes = 'domain' | 'subdomain' | 'network_id' | 'ios_bundle' | 'android_package' | 'apple_app_store_id' | 'google_play_id' | 'roku_store_id' | 'fire_tv_asin' | 'samsung_app_id' | 'apple_tv_bundle' | 'bundle_id' | 'venue_id' | 'screen_id' | 'openooh_venue_type' | 'rss_url' | 'apple_podcast_id' | '
|
|
6995
|
+
export type PropertyIdentifierTypes = 'domain' | 'subdomain' | 'network_id' | 'ios_bundle' | 'android_package' | 'apple_app_store_id' | 'google_play_id' | 'roku_store_id' | 'fire_tv_asin' | 'samsung_app_id' | 'apple_tv_bundle' | 'bundle_id' | 'venue_id' | 'screen_id' | 'openooh_venue_type' | 'rss_url' | 'apple_podcast_id' | 'spotify_collection_id' | 'podcast_guid';
|
|
6418
6996
|
/**
|
|
6419
6997
|
* Response payload for get_creative_delivery task. Returns creative delivery data with variant-level breakdowns including manifests and metrics.
|
|
6420
6998
|
*/
|
|
@@ -6428,11 +7006,7 @@ export interface GetCreativeDeliveryResponse {
|
|
|
6428
7006
|
*/
|
|
6429
7007
|
media_buy_id?: string;
|
|
6430
7008
|
/**
|
|
6431
|
-
*
|
|
6432
|
-
*/
|
|
6433
|
-
media_buy_buyer_ref?: string;
|
|
6434
|
-
/**
|
|
6435
|
-
* ISO 4217 currency code for monetary values in this response (e.g., 'USD', 'EUR')
|
|
7009
|
+
* ISO 4217 currency code for monetary values in this response (e.g., 'USD', 'EUR')
|
|
6436
7010
|
*/
|
|
6437
7011
|
currency: string;
|
|
6438
7012
|
/**
|
|
@@ -6587,8 +7161,6 @@ export interface CreativeFilters {
|
|
|
6587
7161
|
name_contains?: string;
|
|
6588
7162
|
/**
|
|
6589
7163
|
* Filter by specific creative IDs
|
|
6590
|
-
*
|
|
6591
|
-
* @maxItems 100
|
|
6592
7164
|
*/
|
|
6593
7165
|
creative_ids?: string[];
|
|
6594
7166
|
/**
|
|
@@ -6615,10 +7187,6 @@ export interface CreativeFilters {
|
|
|
6615
7187
|
* Filter creatives assigned to any of these media buys. Sales-agent-specific — standalone creative agents SHOULD ignore this filter.
|
|
6616
7188
|
*/
|
|
6617
7189
|
media_buy_ids?: string[];
|
|
6618
|
-
/**
|
|
6619
|
-
* Filter creatives assigned to media buys with any of these buyer references. Sales-agent-specific — standalone creative agents SHOULD ignore this filter.
|
|
6620
|
-
*/
|
|
6621
|
-
buyer_refs?: string[];
|
|
6622
7190
|
/**
|
|
6623
7191
|
* Filter for unassigned creatives when true, assigned creatives when false. Sales-agent-specific — standalone creative agents SHOULD ignore this filter.
|
|
6624
7192
|
*/
|
|
@@ -6772,10 +7340,6 @@ export interface ListCreativesResponse {
|
|
|
6772
7340
|
* Package identifier
|
|
6773
7341
|
*/
|
|
6774
7342
|
package_id: string;
|
|
6775
|
-
/**
|
|
6776
|
-
* Buyer's reference identifier for this package
|
|
6777
|
-
*/
|
|
6778
|
-
buyer_ref?: string;
|
|
6779
7343
|
/**
|
|
6780
7344
|
* When this assignment was created
|
|
6781
7345
|
*/
|
|
@@ -6892,14 +7456,10 @@ export interface SyncCreativesRequest {
|
|
|
6892
7456
|
account: AccountReference;
|
|
6893
7457
|
/**
|
|
6894
7458
|
* Array of creative assets to sync (create or update)
|
|
6895
|
-
*
|
|
6896
|
-
* @maxItems 100
|
|
6897
7459
|
*/
|
|
6898
7460
|
creatives: CreativeAsset[];
|
|
6899
7461
|
/**
|
|
6900
7462
|
* Optional filter to limit sync scope to specific creative IDs. When provided, only these creatives will be created/updated. Other creatives in the library are unaffected. Useful for partial updates and error recovery.
|
|
6901
|
-
*
|
|
6902
|
-
* @maxItems 100
|
|
6903
7463
|
*/
|
|
6904
7464
|
creative_ids?: string[];
|
|
6905
7465
|
/**
|
|
@@ -6924,7 +7484,7 @@ export interface SyncCreativesRequest {
|
|
|
6924
7484
|
placement_ids?: string[];
|
|
6925
7485
|
}[];
|
|
6926
7486
|
/**
|
|
6927
|
-
* Client-generated idempotency key for safe retries. If a sync fails without a response, resending with the same idempotency_key guarantees at-most-once execution.
|
|
7487
|
+
* Client-generated idempotency key for safe retries. If a sync fails without a response, resending with the same idempotency_key guarantees at-most-once execution. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
6928
7488
|
*/
|
|
6929
7489
|
idempotency_key?: string;
|
|
6930
7490
|
/**
|
|
@@ -7032,10 +7592,6 @@ export type GetSignalsRequest = {
|
|
|
7032
7592
|
[k: string]: unknown | undefined;
|
|
7033
7593
|
} & {
|
|
7034
7594
|
account?: AccountReference;
|
|
7035
|
-
/**
|
|
7036
|
-
* The buyer's campaign reference. Used to correlate signal discovery with subsequent report_usage calls.
|
|
7037
|
-
*/
|
|
7038
|
-
buyer_campaign_ref?: string;
|
|
7039
7595
|
/**
|
|
7040
7596
|
* Natural language description of the desired signals. When used alone, enables semantic discovery. When combined with signal_ids, provides context for the agent but signal_ids matches are returned first.
|
|
7041
7597
|
*/
|
|
@@ -7363,9 +7919,9 @@ export interface ActivateSignalRequest {
|
|
|
7363
7919
|
pricing_option_id?: string;
|
|
7364
7920
|
account?: AccountReference;
|
|
7365
7921
|
/**
|
|
7366
|
-
*
|
|
7922
|
+
* Client-generated unique key for this request. Prevents duplicate activations on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
7367
7923
|
*/
|
|
7368
|
-
|
|
7924
|
+
idempotency_key?: string;
|
|
7369
7925
|
context?: ContextObject;
|
|
7370
7926
|
ext?: ExtensionObject;
|
|
7371
7927
|
}
|
|
@@ -7406,7 +7962,7 @@ export type BasePropertySource = PublisherTagsSource | PublisherPropertyIDsSourc
|
|
|
7406
7962
|
/**
|
|
7407
7963
|
* Types of addressable advertising properties with verifiable ownership. Property types are a subset of media channels - they represent inventory surfaces that can be validated via adagents.json.
|
|
7408
7964
|
*/
|
|
7409
|
-
export type PropertyType = 'website' | 'mobile_app' | 'ctv_app' | 'desktop_app' | 'dooh' | 'podcast' | 'radio' | 'streaming_audio';
|
|
7965
|
+
export type PropertyType = 'website' | 'mobile_app' | 'ctv_app' | 'desktop_app' | 'dooh' | 'podcast' | 'radio' | 'streaming_audio' | 'ai_assistant';
|
|
7410
7966
|
/**
|
|
7411
7967
|
* Request parameters for creating a new property list
|
|
7412
7968
|
*/
|
|
@@ -7425,6 +7981,10 @@ export interface CreatePropertyListRequest {
|
|
|
7425
7981
|
base_properties?: BasePropertySource[];
|
|
7426
7982
|
filters?: PropertyListFilters;
|
|
7427
7983
|
brand?: BrandReference;
|
|
7984
|
+
/**
|
|
7985
|
+
* Client-generated unique key for this request. Prevents duplicate property list creation on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
7986
|
+
*/
|
|
7987
|
+
idempotency_key?: string;
|
|
7428
7988
|
context?: ContextObject;
|
|
7429
7989
|
ext?: ExtensionObject;
|
|
7430
7990
|
}
|
|
@@ -7611,6 +8171,10 @@ export interface UpdatePropertyListRequest {
|
|
|
7611
8171
|
webhook_url?: string;
|
|
7612
8172
|
context?: ContextObject;
|
|
7613
8173
|
ext?: ExtensionObject;
|
|
8174
|
+
/**
|
|
8175
|
+
* Client-generated unique key for at-most-once execution. If a request with the same key has already been processed, the server returns the original response without re-processing. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
8176
|
+
*/
|
|
8177
|
+
idempotency_key?: string;
|
|
7614
8178
|
}
|
|
7615
8179
|
/**
|
|
7616
8180
|
* Response payload for update_property_list task
|
|
@@ -7710,6 +8274,10 @@ export interface DeletePropertyListRequest {
|
|
|
7710
8274
|
list_id: string;
|
|
7711
8275
|
context?: ContextObject;
|
|
7712
8276
|
ext?: ExtensionObject;
|
|
8277
|
+
/**
|
|
8278
|
+
* Client-generated unique key for at-most-once execution. If a request with the same key has already been processed, the server returns the original response without re-processing. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
8279
|
+
*/
|
|
8280
|
+
idempotency_key?: string;
|
|
7713
8281
|
}
|
|
7714
8282
|
/**
|
|
7715
8283
|
* Response payload for delete_property_list task
|
|
@@ -7986,9 +8554,9 @@ export interface Artifact {
|
|
|
7986
8554
|
*/
|
|
7987
8555
|
apple_podcast_id?: string;
|
|
7988
8556
|
/**
|
|
7989
|
-
* Spotify
|
|
8557
|
+
* Spotify collection ID
|
|
7990
8558
|
*/
|
|
7991
|
-
|
|
8559
|
+
spotify_collection_id?: string;
|
|
7992
8560
|
/**
|
|
7993
8561
|
* Podcast GUID (from RSS feed)
|
|
7994
8562
|
*/
|
|
@@ -8094,6 +8662,10 @@ export interface CreateContentStandardsRequest {
|
|
|
8094
8662
|
language?: string;
|
|
8095
8663
|
} | Artifact)[];
|
|
8096
8664
|
};
|
|
8665
|
+
/**
|
|
8666
|
+
* Client-generated unique key for this request. Prevents duplicate content standards creation on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
8667
|
+
*/
|
|
8668
|
+
idempotency_key?: string;
|
|
8097
8669
|
context?: ContextObject;
|
|
8098
8670
|
ext?: ExtensionObject;
|
|
8099
8671
|
}
|
|
@@ -8194,6 +8766,10 @@ export interface UpdateContentStandardsRequest {
|
|
|
8194
8766
|
};
|
|
8195
8767
|
context?: ContextObject;
|
|
8196
8768
|
ext?: ExtensionObject;
|
|
8769
|
+
/**
|
|
8770
|
+
* Client-generated unique key for at-most-once execution. If a request with the same key has already been processed, the server returns the original response without re-processing. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
8771
|
+
*/
|
|
8772
|
+
idempotency_key?: string;
|
|
8197
8773
|
}
|
|
8198
8774
|
/**
|
|
8199
8775
|
* Response from updating a content standards configuration
|
|
@@ -8236,6 +8812,10 @@ export interface CalibrateContentRequest {
|
|
|
8236
8812
|
*/
|
|
8237
8813
|
standards_id: string;
|
|
8238
8814
|
artifact: Artifact;
|
|
8815
|
+
/**
|
|
8816
|
+
* Client-generated unique key for at-most-once execution. If a request with the same key has already been processed, the server returns the original response without re-processing. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
8817
|
+
*/
|
|
8818
|
+
idempotency_key?: string;
|
|
8239
8819
|
}
|
|
8240
8820
|
/**
|
|
8241
8821
|
* Response payload with verdict and detailed explanations for collaborative calibration
|
|
@@ -8287,8 +8867,6 @@ export interface ValidateContentDeliveryRequest {
|
|
|
8287
8867
|
standards_id: string;
|
|
8288
8868
|
/**
|
|
8289
8869
|
* Delivery records to validate (max 10,000)
|
|
8290
|
-
*
|
|
8291
|
-
* @maxItems 10000
|
|
8292
8870
|
*/
|
|
8293
8871
|
records: {
|
|
8294
8872
|
/**
|
|
@@ -8591,6 +9169,10 @@ export interface CreativeFeatureResult {
|
|
|
8591
9169
|
* Budget authority level for the orchestrator agent.
|
|
8592
9170
|
*/
|
|
8593
9171
|
export type BudgetAuthorityLevel = 'agent_full' | 'agent_limited' | 'human_required';
|
|
9172
|
+
/**
|
|
9173
|
+
* Personal data categories that may be restricted from use in audience targeting. Based on GDPR Article 9 special categories of personal data, which are also referenced by EU DSA Article 26 for advertising restrictions. Used in two places: (1) on campaign plans via restricted_attributes to declare which categories are prohibited, and (2) on signal-definition.json via restricted_attributes to declare which categories a signal touches. Governance agents match plan restrictions against signal declarations for structural validation.
|
|
9174
|
+
*/
|
|
9175
|
+
export type RestrictedAttribute = 'racial_ethnic_origin' | 'political_opinions' | 'religious_beliefs' | 'trade_union_membership' | 'health_data' | 'sex_life_sexual_orientation' | 'genetic_data' | 'biometric_data';
|
|
8594
9176
|
/**
|
|
8595
9177
|
* Authority level granted to this agent.
|
|
8596
9178
|
*/
|
|
@@ -8685,6 +9267,23 @@ export interface SyncPlansRequest {
|
|
|
8685
9267
|
* Registry policy IDs to enforce for this plan. The governance agent resolves full policy definitions from the registry and evaluates actions against them. Intersected with the plan's countries/regions to activate only geographically relevant policies.
|
|
8686
9268
|
*/
|
|
8687
9269
|
policy_ids?: string[];
|
|
9270
|
+
/**
|
|
9271
|
+
* Regulatory categories that apply to this campaign. Determines which policy regimes the governance agent enforces (e.g., 'children_directed' activates COPPA/AADC, 'political_advertising' activates disclosure requirements). The governance agent resolves categories to specific policies based on the plan's jurisdictions. When omitted, governance agents MAY infer categories from the brand's industries and the plan's objectives. Values are registry-defined category IDs (intentionally freeform strings, not an enum — new categories are added as regulations evolve).
|
|
9272
|
+
*/
|
|
9273
|
+
policy_categories?: string[];
|
|
9274
|
+
audience?: AudienceConstraints;
|
|
9275
|
+
/**
|
|
9276
|
+
* Personal data categories that must not be used for targeting in this campaign. Applies horizontally across all audience criteria. Used for EU DSA Article 26 compliance (prohibits targeting on GDPR Article 9 special categories) and similar regulations. The governance agent flags any audience targeting that references these attributes.
|
|
9277
|
+
*/
|
|
9278
|
+
restricted_attributes?: RestrictedAttribute[];
|
|
9279
|
+
/**
|
|
9280
|
+
* Additional restricted attributes not covered by the restricted-attribute enum. Freeform strings for jurisdiction-specific or brand-specific restrictions beyond GDPR Article 9 categories (e.g., 'financial_status', 'immigration_status'). Governance agents use semantic matching for these.
|
|
9281
|
+
*/
|
|
9282
|
+
restricted_attributes_custom?: string[];
|
|
9283
|
+
/**
|
|
9284
|
+
* Minimum audience segment size. Prevents micro-targeting by ensuring segments meet a k-anonymity threshold. Applies to the estimated combined (intersection) audience when multiple criteria are used, not just individual criterion sizes. The governance agent validates this by querying signal catalog metadata or seller-reported segment sizes. When segment size data is unavailable, the governance agent SHOULD produce a finding with reduced confidence rather than silently passing.
|
|
9285
|
+
*/
|
|
9286
|
+
min_audience_size?: number;
|
|
8688
9287
|
/**
|
|
8689
9288
|
* Natural language policy statements specific to this campaign (e.g., 'No advertising adjacent to competitor content'). Applied regardless of geography.
|
|
8690
9289
|
*/
|
|
@@ -8746,6 +9345,19 @@ export interface SyncPlansRequest {
|
|
|
8746
9345
|
ext?: ExtensionObject;
|
|
8747
9346
|
}[];
|
|
8748
9347
|
}
|
|
9348
|
+
/**
|
|
9349
|
+
* Audience targeting constraints. Defines who the campaign should reach (include) and must not reach (exclude). The governance agent evaluates seller targeting against these constraints.
|
|
9350
|
+
*/
|
|
9351
|
+
export interface AudienceConstraints {
|
|
9352
|
+
/**
|
|
9353
|
+
* Desired audience criteria. The seller's targeting should align with these. Each criterion is evaluated independently — the combined targeting should satisfy at least one inclusion criterion.
|
|
9354
|
+
*/
|
|
9355
|
+
include?: AudienceSelector[];
|
|
9356
|
+
/**
|
|
9357
|
+
* Excluded audience criteria. The seller's targeting must not overlap with these. Exclusions take precedence over inclusions. Used for protected groups, vulnerable communities, regulatory restrictions, or brand safety.
|
|
9358
|
+
*/
|
|
9359
|
+
exclude?: AudienceSelector[];
|
|
9360
|
+
}
|
|
8749
9361
|
/**
|
|
8750
9362
|
* Enforcement level for this policy.
|
|
8751
9363
|
*/
|
|
@@ -8784,7 +9396,7 @@ export interface SyncPlansResponse {
|
|
|
8784
9396
|
status: 'active' | 'inactive';
|
|
8785
9397
|
}[];
|
|
8786
9398
|
/**
|
|
8787
|
-
* Policies the governance agent will enforce for this plan. Includes explicitly referenced policies from the brand compliance configuration and auto-applied policies matched by jurisdiction or
|
|
9399
|
+
* Policies the governance agent will enforce for this plan. Includes explicitly referenced policies from the brand compliance configuration and auto-applied policies matched by jurisdiction or policy category. Present when the governance agent supports policy resolution.
|
|
8788
9400
|
*/
|
|
8789
9401
|
resolved_policies?: {
|
|
8790
9402
|
/**
|
|
@@ -8792,12 +9404,12 @@ export interface SyncPlansResponse {
|
|
|
8792
9404
|
*/
|
|
8793
9405
|
policy_id: string;
|
|
8794
9406
|
/**
|
|
8795
|
-
* How this policy was included. 'explicit': referenced in the brand compliance configuration. 'auto_applied': matched automatically by jurisdiction
|
|
9407
|
+
* How this policy was included. 'explicit': referenced in the brand compliance configuration. 'auto_applied': matched automatically by jurisdiction or policy category.
|
|
8796
9408
|
*/
|
|
8797
9409
|
source: 'explicit' | 'auto_applied';
|
|
8798
9410
|
enforcement: PolicyEnforcementLevel;
|
|
8799
9411
|
/**
|
|
8800
|
-
* Why this policy was included (e.g., 'Matched jurisdiction US and
|
|
9412
|
+
* Why this policy was included (e.g., 'Matched jurisdiction US and policy category pharmaceutical_advertising').
|
|
8801
9413
|
*/
|
|
8802
9414
|
reason?: string;
|
|
8803
9415
|
}[];
|
|
@@ -8820,9 +9432,9 @@ export interface ReportPlanOutcomeRequest {
|
|
|
8820
9432
|
*/
|
|
8821
9433
|
check_id?: string;
|
|
8822
9434
|
/**
|
|
8823
|
-
*
|
|
9435
|
+
* Client-generated unique key for this request. Prevents duplicate outcome reports on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
8824
9436
|
*/
|
|
8825
|
-
|
|
9437
|
+
idempotency_key?: string;
|
|
8826
9438
|
outcome: OutcomeType;
|
|
8827
9439
|
/**
|
|
8828
9440
|
* The seller's full response. Required when outcome is 'completed'.
|
|
@@ -8832,10 +9444,6 @@ export interface ReportPlanOutcomeRequest {
|
|
|
8832
9444
|
* Seller's media buy identifier.
|
|
8833
9445
|
*/
|
|
8834
9446
|
media_buy_id?: string;
|
|
8835
|
-
/**
|
|
8836
|
-
* The buyer reference echoed back by the seller.
|
|
8837
|
-
*/
|
|
8838
|
-
buyer_ref?: string;
|
|
8839
9447
|
/**
|
|
8840
9448
|
* Total budget committed across all confirmed packages. When present, the governance agent uses this directly instead of summing package budgets.
|
|
8841
9449
|
*/
|
|
@@ -8901,6 +9509,10 @@ export interface ReportPlanOutcomeRequest {
|
|
|
8901
9509
|
*/
|
|
8902
9510
|
message?: string;
|
|
8903
9511
|
};
|
|
9512
|
+
/**
|
|
9513
|
+
* Opaque governance context from the check_governance response that authorized this action. Enables the governance agent to correlate the outcome to the original check.
|
|
9514
|
+
*/
|
|
9515
|
+
governance_context: string;
|
|
8904
9516
|
}
|
|
8905
9517
|
/**
|
|
8906
9518
|
* Finding severity.
|
|
@@ -8968,10 +9580,6 @@ export type GetPlanAuditLogsRequest = {
|
|
|
8968
9580
|
* Portfolio plan IDs. The governance agent expands each to its member_plan_ids and returns combined audit data.
|
|
8969
9581
|
*/
|
|
8970
9582
|
portfolio_plan_ids?: string[];
|
|
8971
|
-
/**
|
|
8972
|
-
* Filter to a specific campaign. Omit for plan-level aggregate.
|
|
8973
|
-
*/
|
|
8974
|
-
buyer_campaign_ref?: string;
|
|
8975
9583
|
/**
|
|
8976
9584
|
* Include the full audit trail. Default: false.
|
|
8977
9585
|
*/
|
|
@@ -9033,27 +9641,6 @@ export interface GetPlanAuditLogsResponse {
|
|
|
9033
9641
|
pct?: number;
|
|
9034
9642
|
} | undefined;
|
|
9035
9643
|
};
|
|
9036
|
-
/**
|
|
9037
|
-
* Per-campaign breakdown.
|
|
9038
|
-
*/
|
|
9039
|
-
campaigns: {
|
|
9040
|
-
/**
|
|
9041
|
-
* Campaign identifier.
|
|
9042
|
-
*/
|
|
9043
|
-
buyer_campaign_ref: string;
|
|
9044
|
-
/**
|
|
9045
|
-
* Campaign status.
|
|
9046
|
-
*/
|
|
9047
|
-
status: 'active' | 'suspended' | 'completed';
|
|
9048
|
-
/**
|
|
9049
|
-
* Budget committed in this campaign.
|
|
9050
|
-
*/
|
|
9051
|
-
committed: number;
|
|
9052
|
-
/**
|
|
9053
|
-
* Media buy IDs currently active.
|
|
9054
|
-
*/
|
|
9055
|
-
active_media_buys?: string[];
|
|
9056
|
-
}[];
|
|
9057
9644
|
/**
|
|
9058
9645
|
* Aggregate validation and outcome statistics.
|
|
9059
9646
|
*/
|
|
@@ -9219,6 +9806,27 @@ export interface GetPlanAuditLogsResponse {
|
|
|
9219
9806
|
*/
|
|
9220
9807
|
outcome_status?: string;
|
|
9221
9808
|
}[];
|
|
9809
|
+
/**
|
|
9810
|
+
* Per-media-buy breakdown.
|
|
9811
|
+
*/
|
|
9812
|
+
media_buys: {
|
|
9813
|
+
/**
|
|
9814
|
+
* Seller-assigned media buy identifier.
|
|
9815
|
+
*/
|
|
9816
|
+
media_buy_id: string;
|
|
9817
|
+
/**
|
|
9818
|
+
* Media buy status.
|
|
9819
|
+
*/
|
|
9820
|
+
status: 'active' | 'suspended' | 'completed';
|
|
9821
|
+
/**
|
|
9822
|
+
* Budget committed for this media buy.
|
|
9823
|
+
*/
|
|
9824
|
+
committed: number;
|
|
9825
|
+
/**
|
|
9826
|
+
* Number of governance checks performed for this media buy.
|
|
9827
|
+
*/
|
|
9828
|
+
check_count?: number;
|
|
9829
|
+
}[];
|
|
9222
9830
|
}[];
|
|
9223
9831
|
}
|
|
9224
9832
|
/**
|
|
@@ -9233,10 +9841,6 @@ export interface CheckGovernanceRequest {
|
|
|
9233
9841
|
* Campaign governance plan identifier.
|
|
9234
9842
|
*/
|
|
9235
9843
|
plan_id: string;
|
|
9236
|
-
/**
|
|
9237
|
-
* Buyer's campaign identifier. The governance agent tracks state per campaign within a plan.
|
|
9238
|
-
*/
|
|
9239
|
-
buyer_campaign_ref: string;
|
|
9240
9844
|
/**
|
|
9241
9845
|
* Whether this is an advisory check or a binding commitment. 'proposed': the orchestrator is checking before sending to a seller — no budget is committed. 'committed': the seller is about to execute — the governance agent validates the planned delivery against the plan. Budget is committed later via report_plan_outcome, not on approval.
|
|
9242
9846
|
*/
|
|
@@ -9253,15 +9857,14 @@ export interface CheckGovernanceRequest {
|
|
|
9253
9857
|
* The full tool arguments as they would be sent to the seller. Expected for proposed checks. The governance agent can inspect any field to validate against the plan.
|
|
9254
9858
|
*/
|
|
9255
9859
|
payload?: {};
|
|
9256
|
-
governance_context?: GovernanceContext;
|
|
9257
9860
|
/**
|
|
9258
|
-
*
|
|
9861
|
+
* Opaque governance context from a prior check_governance response. Pass this on subsequent checks for the same media buy so the governance agent can maintain continuity across the lifecycle. Issued by the governance agent, never interpreted by callers.
|
|
9259
9862
|
*/
|
|
9260
|
-
|
|
9863
|
+
governance_context?: string;
|
|
9261
9864
|
/**
|
|
9262
|
-
* The
|
|
9865
|
+
* The seller's identifier for the media buy. Expected for committed checks.
|
|
9263
9866
|
*/
|
|
9264
|
-
|
|
9867
|
+
media_buy_id?: string;
|
|
9265
9868
|
phase?: GovernancePhase;
|
|
9266
9869
|
planned_delivery?: PlannedDelivery;
|
|
9267
9870
|
/**
|
|
@@ -9307,54 +9910,37 @@ export interface CheckGovernanceRequest {
|
|
|
9307
9910
|
* Whether delivery is ahead of, on track with, or behind the planned pace.
|
|
9308
9911
|
*/
|
|
9309
9912
|
pacing?: 'ahead' | 'on_track' | 'behind';
|
|
9310
|
-
};
|
|
9311
|
-
/**
|
|
9312
|
-
* Human-readable summary of what changed. SHOULD be present for 'modification' phase.
|
|
9313
|
-
*/
|
|
9314
|
-
modification_summary?: string;
|
|
9315
|
-
}
|
|
9316
|
-
/**
|
|
9317
|
-
* Normalized governance-relevant fields extracted from the tool payload. When present, the governance agent SHOULD use these fields for plan validation instead of parsing the payload directly. The caller is responsible for extracting these from the tool arguments.
|
|
9318
|
-
*/
|
|
9319
|
-
export interface GovernanceContext {
|
|
9320
|
-
/**
|
|
9321
|
-
* Total budget for the action.
|
|
9322
|
-
*/
|
|
9323
|
-
total_budget?: {
|
|
9324
|
-
/**
|
|
9325
|
-
* Budget amount.
|
|
9326
|
-
*/
|
|
9327
|
-
amount: number;
|
|
9328
|
-
/**
|
|
9329
|
-
* ISO 4217 currency code.
|
|
9330
|
-
*/
|
|
9331
|
-
currency: string;
|
|
9332
|
-
};
|
|
9333
|
-
/**
|
|
9334
|
-
* ISO 3166-1 alpha-2 country codes targeted by this action.
|
|
9335
|
-
*/
|
|
9336
|
-
countries?: string[];
|
|
9337
|
-
/**
|
|
9338
|
-
* Channels targeted by this action.
|
|
9339
|
-
*/
|
|
9340
|
-
channels?: string[];
|
|
9341
|
-
/**
|
|
9342
|
-
* Flight dates for this action.
|
|
9343
|
-
*/
|
|
9344
|
-
flight?: {
|
|
9345
|
-
/**
|
|
9346
|
-
* Flight start (ISO 8601).
|
|
9347
|
-
*/
|
|
9348
|
-
start: string;
|
|
9349
9913
|
/**
|
|
9350
|
-
*
|
|
9914
|
+
* Actual audience composition during the reporting period. Enables mid-flight drift detection when actual delivery skews from planned audience targeting.
|
|
9351
9915
|
*/
|
|
9352
|
-
|
|
9916
|
+
audience_distribution?: {
|
|
9917
|
+
/**
|
|
9918
|
+
* Population baseline used for index calculation. 'census': national census or equivalent population data. 'platform': the seller's active user base. 'custom': a custom baseline defined by the seller (describe in baseline_description).
|
|
9919
|
+
*/
|
|
9920
|
+
baseline: 'census' | 'platform' | 'custom';
|
|
9921
|
+
/**
|
|
9922
|
+
* Description of the baseline when baseline is 'custom' (e.g., 'US adults 18+ with broadband access').
|
|
9923
|
+
*/
|
|
9924
|
+
baseline_description?: string;
|
|
9925
|
+
/**
|
|
9926
|
+
* Audience index values for the current reporting period. Keys are seller-defined dimension:value strings (e.g., 'age:25-34', 'gender:female', 'income:high'). The protocol does not mandate a taxonomy — dimensions and value labels vary by seller. Values are index relative to the declared baseline (1.0 = at parity, >1.0 = over-indexed, <1.0 = under-indexed).
|
|
9927
|
+
*/
|
|
9928
|
+
indices: {
|
|
9929
|
+
[k: string]: number | undefined;
|
|
9930
|
+
};
|
|
9931
|
+
/**
|
|
9932
|
+
* Cumulative audience index values since the media buy started. Same key format as indices (dimension:value). Use for detecting sustained bias drift that may not appear in a single reporting period.
|
|
9933
|
+
*/
|
|
9934
|
+
cumulative_indices?: {
|
|
9935
|
+
[k: string]: number | undefined;
|
|
9936
|
+
};
|
|
9937
|
+
};
|
|
9353
9938
|
};
|
|
9354
9939
|
/**
|
|
9355
|
-
*
|
|
9940
|
+
* Human-readable summary of what changed. SHOULD be present for 'modification' phase.
|
|
9356
9941
|
*/
|
|
9357
|
-
|
|
9942
|
+
modification_summary?: string;
|
|
9943
|
+
invoice_recipient?: BusinessEntity;
|
|
9358
9944
|
}
|
|
9359
9945
|
/**
|
|
9360
9946
|
* Governance agent's response to a check request. Returns whether the action is approved under the campaign plan.
|
|
@@ -9376,10 +9962,6 @@ export interface CheckGovernanceResponse {
|
|
|
9376
9962
|
* Echoed from request.
|
|
9377
9963
|
*/
|
|
9378
9964
|
plan_id: string;
|
|
9379
|
-
/**
|
|
9380
|
-
* Echoed from request.
|
|
9381
|
-
*/
|
|
9382
|
-
buyer_campaign_ref: string;
|
|
9383
9965
|
/**
|
|
9384
9966
|
* Human-readable explanation of the governance decision.
|
|
9385
9967
|
*/
|
|
@@ -9468,6 +10050,10 @@ export interface CheckGovernanceResponse {
|
|
|
9468
10050
|
* Registry policy IDs evaluated during this check.
|
|
9469
10051
|
*/
|
|
9470
10052
|
policies_evaluated?: string[];
|
|
10053
|
+
/**
|
|
10054
|
+
* Opaque governance context for this media buy. The buyer MUST attach this to the protocol envelope when sending the media buy to the seller. The seller MUST persist it and include it on all subsequent check_governance calls for this media buy's lifecycle. Only the issuing governance agent interprets this value.
|
|
10055
|
+
*/
|
|
10056
|
+
governance_context?: string;
|
|
9471
10057
|
}
|
|
9472
10058
|
/**
|
|
9473
10059
|
* Get offering details and availability before session handoff. Returns offering information, availability status, and optionally matching products based on context.
|
|
@@ -9625,6 +10211,10 @@ export interface SIInitiateSessionRequest {
|
|
|
9625
10211
|
* Token from si_get_offering response for session continuity. Brand uses this to recall what products were shown to the user, enabling natural references like 'the second one' or 'that blue shoe'.
|
|
9626
10212
|
*/
|
|
9627
10213
|
offering_token?: string;
|
|
10214
|
+
/**
|
|
10215
|
+
* Client-generated unique key for this request. Prevents duplicate session creation on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.
|
|
10216
|
+
*/
|
|
10217
|
+
idempotency_key?: string;
|
|
9628
10218
|
ext?: ExtensionObject;
|
|
9629
10219
|
}
|
|
9630
10220
|
/**
|
|
@@ -9799,6 +10389,10 @@ export type SIUIElement = {
|
|
|
9799
10389
|
*/
|
|
9800
10390
|
data?: {};
|
|
9801
10391
|
};
|
|
10392
|
+
/**
|
|
10393
|
+
* Current session lifecycle state. Returned in initiation, message, and termination responses.
|
|
10394
|
+
*/
|
|
10395
|
+
export type SISessionStatus = 'active' | 'pending_handoff' | 'complete' | 'terminated';
|
|
9802
10396
|
/**
|
|
9803
10397
|
* Brand agent's response to session initiation
|
|
9804
10398
|
*/
|
|
@@ -9821,6 +10415,11 @@ export interface SIInitiateSessionResponse {
|
|
|
9821
10415
|
ui_elements?: SIUIElement[];
|
|
9822
10416
|
};
|
|
9823
10417
|
negotiated_capabilities?: SICapabilities;
|
|
10418
|
+
session_status: SISessionStatus;
|
|
10419
|
+
/**
|
|
10420
|
+
* Session inactivity timeout in seconds. After this duration without a message, the brand agent may terminate the session. Hosts SHOULD warn users before timeout when possible.
|
|
10421
|
+
*/
|
|
10422
|
+
session_ttl_seconds?: number;
|
|
9824
10423
|
/**
|
|
9825
10424
|
* Errors during session initiation
|
|
9826
10425
|
*/
|
|
@@ -9883,10 +10482,7 @@ export interface SISendMessageResponse {
|
|
|
9883
10482
|
* MCP resource URI for hosts with MCP Apps support (e.g., ui://si/session-abc123)
|
|
9884
10483
|
*/
|
|
9885
10484
|
mcp_resource_uri?: string;
|
|
9886
|
-
|
|
9887
|
-
* Current session status
|
|
9888
|
-
*/
|
|
9889
|
-
session_status: 'active' | 'pending_handoff' | 'complete';
|
|
10485
|
+
session_status: SISessionStatus;
|
|
9890
10486
|
/**
|
|
9891
10487
|
* Handoff request when session_status is pending_handoff
|
|
9892
10488
|
*/
|
|
@@ -10028,22 +10624,27 @@ export interface SITerminateSessionResponse {
|
|
|
10028
10624
|
* Whether session was successfully terminated
|
|
10029
10625
|
*/
|
|
10030
10626
|
terminated: boolean;
|
|
10627
|
+
session_status?: SISessionStatus;
|
|
10031
10628
|
/**
|
|
10032
|
-
* ACP checkout handoff data
|
|
10629
|
+
* ACP checkout handoff data. Present when reason is handoff_transaction.
|
|
10033
10630
|
*/
|
|
10034
10631
|
acp_handoff?: {
|
|
10035
10632
|
/**
|
|
10036
|
-
* ACP checkout
|
|
10633
|
+
* Brand's ACP checkout endpoint. Hosts MUST validate this is HTTPS before opening.
|
|
10037
10634
|
*/
|
|
10038
10635
|
checkout_url?: string;
|
|
10039
10636
|
/**
|
|
10040
|
-
*
|
|
10637
|
+
* Opaque token for the checkout flow. The host passes this to the checkout endpoint to correlate the SI session with the transaction.
|
|
10041
10638
|
*/
|
|
10042
10639
|
checkout_token?: string;
|
|
10043
10640
|
/**
|
|
10044
|
-
*
|
|
10641
|
+
* Rich checkout context to pass to the ACP endpoint (product details, applied offers, pricing). Alternative to checkout_token for integrations that need structured data.
|
|
10045
10642
|
*/
|
|
10046
|
-
|
|
10643
|
+
payload?: {};
|
|
10644
|
+
/**
|
|
10645
|
+
* When this handoff data expires. Hosts should initiate checkout before this time.
|
|
10646
|
+
*/
|
|
10647
|
+
expires_at?: string;
|
|
10047
10648
|
};
|
|
10048
10649
|
/**
|
|
10049
10650
|
* Suggested follow-up actions
|
|
@@ -10103,9 +10704,9 @@ export interface GetAdCPCapabilitiesResponse {
|
|
|
10103
10704
|
*/
|
|
10104
10705
|
authorization_endpoint?: string;
|
|
10105
10706
|
/**
|
|
10106
|
-
* Billing models this seller supports. operator: seller invoices the operator (agency or brand buying direct). agent: agent consolidates billing. The buyer must pass one of these values in sync_accounts.
|
|
10707
|
+
* Billing models this seller supports. operator: seller invoices the operator (agency or brand buying direct). agent: agent consolidates billing. advertiser: seller invoices the advertiser directly, even when a different operator places orders on their behalf. The buyer must pass one of these values in sync_accounts.
|
|
10107
10708
|
*/
|
|
10108
|
-
supported_billing: ('operator' | 'agent')[];
|
|
10709
|
+
supported_billing: ('operator' | 'agent' | 'advertiser')[];
|
|
10109
10710
|
/**
|
|
10110
10711
|
* Whether an account reference is required for get_products. When true, the buyer must establish an account before browsing products. When false (default), the buyer can browse products without an account — useful for price comparison and discovery before committing to a seller.
|
|
10111
10712
|
*/
|
|
@@ -10662,8 +11263,6 @@ export interface ListAccountsResponse {
|
|
|
10662
11263
|
export interface SyncAccountsRequest {
|
|
10663
11264
|
/**
|
|
10664
11265
|
* Advertiser accounts to sync
|
|
10665
|
-
*
|
|
10666
|
-
* @maxItems 1000
|
|
10667
11266
|
*/
|
|
10668
11267
|
accounts: {
|
|
10669
11268
|
brand: BrandReference;
|
|
@@ -10672,9 +11271,10 @@ export interface SyncAccountsRequest {
|
|
|
10672
11271
|
*/
|
|
10673
11272
|
operator: string;
|
|
10674
11273
|
/**
|
|
10675
|
-
* Who should be invoiced. operator: seller invoices the operator (agency or brand buying direct). agent: agent consolidates billing across brands. The seller must either accept this billing model or reject the request.
|
|
11274
|
+
* Who should be invoiced. operator: seller invoices the operator (agency or brand buying direct). agent: agent consolidates billing across brands. advertiser: seller invoices the advertiser directly, even when a different operator places orders on their behalf. The seller must either accept this billing model or reject the request.
|
|
10676
11275
|
*/
|
|
10677
|
-
billing: 'operator' | 'agent';
|
|
11276
|
+
billing: 'operator' | 'agent' | 'advertiser';
|
|
11277
|
+
billing_entity?: BusinessEntity;
|
|
10678
11278
|
/**
|
|
10679
11279
|
* Payment terms for this account. The seller must either accept these terms or reject the account — terms are never silently remapped. When omitted, the seller applies its default terms.
|
|
10680
11280
|
*/
|
|
@@ -10683,32 +11283,6 @@ export interface SyncAccountsRequest {
|
|
|
10683
11283
|
* When true, provision this as a sandbox account with no real platform calls or billing. Only applicable to implicit accounts (require_operator_auth: false). For explicit accounts, sandbox accounts are pre-existing test accounts discovered via list_accounts.
|
|
10684
11284
|
*/
|
|
10685
11285
|
sandbox?: boolean;
|
|
10686
|
-
/**
|
|
10687
|
-
* Governance agent endpoints for this account. When present, the seller MUST call these agents for governance approval before confirming media buy requests. Each agent can be scoped to specific validation categories. The seller routes check_governance calls to the appropriate agent based on the action being validated. All applicable agents must approve for the action to proceed (unanimous approval).
|
|
10688
|
-
*/
|
|
10689
|
-
governance_agents?: {
|
|
10690
|
-
/**
|
|
10691
|
-
* Governance agent endpoint URL.
|
|
10692
|
-
*/
|
|
10693
|
-
url: string;
|
|
10694
|
-
/**
|
|
10695
|
-
* Authentication the seller presents when calling this governance agent.
|
|
10696
|
-
*/
|
|
10697
|
-
authentication: {
|
|
10698
|
-
/**
|
|
10699
|
-
* @maxItems 1
|
|
10700
|
-
*/
|
|
10701
|
-
schemes: [] | [AuthenticationScheme];
|
|
10702
|
-
/**
|
|
10703
|
-
* Authentication credential (e.g., Bearer token).
|
|
10704
|
-
*/
|
|
10705
|
-
credentials: string;
|
|
10706
|
-
};
|
|
10707
|
-
/**
|
|
10708
|
-
* Governance categories this agent handles (e.g., ['budget_authority', 'strategic_alignment']). When omitted, the agent handles all categories.
|
|
10709
|
-
*/
|
|
10710
|
-
categories?: string[];
|
|
10711
|
-
}[];
|
|
10712
11286
|
}[];
|
|
10713
11287
|
/**
|
|
10714
11288
|
* When true, accounts previously synced by this agent but not included in this request will be deactivated. Scoped to the authenticated agent — does not affect accounts managed by other agents. Use with caution.
|
|
@@ -10738,6 +11312,10 @@ export interface SyncAccountsSuccess {
|
|
|
10738
11312
|
* Results for each account processed
|
|
10739
11313
|
*/
|
|
10740
11314
|
accounts: {
|
|
11315
|
+
/**
|
|
11316
|
+
* Seller-assigned account identifier. Use this in subsequent create_media_buy and other account-scoped operations.
|
|
11317
|
+
*/
|
|
11318
|
+
account_id?: string;
|
|
10741
11319
|
brand: BrandReference;
|
|
10742
11320
|
/**
|
|
10743
11321
|
* Operator domain, echoed from request
|
|
@@ -10758,7 +11336,8 @@ export interface SyncAccountsSuccess {
|
|
|
10758
11336
|
/**
|
|
10759
11337
|
* Who is invoiced on this account. Matches the requested billing model.
|
|
10760
11338
|
*/
|
|
10761
|
-
billing?: 'operator' | 'agent';
|
|
11339
|
+
billing?: 'operator' | 'agent' | 'advertiser';
|
|
11340
|
+
billing_entity?: BusinessEntity;
|
|
10762
11341
|
/**
|
|
10763
11342
|
* How the seller scoped this account. operator: shared across all brands for this operator. brand: shared across all operators for this brand. operator_brand: dedicated to this operator+brand pair. agent: the agent's default account.
|
|
10764
11343
|
*/
|
|
@@ -10824,19 +11403,19 @@ export interface SyncAccountsError {
|
|
|
10824
11403
|
*/
|
|
10825
11404
|
export interface ReportUsageRequest {
|
|
10826
11405
|
/**
|
|
10827
|
-
* Client-generated unique key for this request. If a request with the same key has already been accepted, the server returns the original response without re-processing. Use a UUID
|
|
11406
|
+
* Client-generated unique key for this request. If a request with the same key has already been accepted, the server returns the original response without re-processing. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request. Prevents duplicate billing on retries.
|
|
10828
11407
|
*/
|
|
10829
11408
|
idempotency_key?: string;
|
|
10830
11409
|
reporting_period: DatetimeRange;
|
|
10831
11410
|
/**
|
|
10832
|
-
* One or more usage records. Each record is self-contained: it carries its own account
|
|
11411
|
+
* One or more usage records. Each record is self-contained: it carries its own account, allowing a single request to span multiple accounts.
|
|
10833
11412
|
*/
|
|
10834
11413
|
usage: {
|
|
10835
11414
|
account: AccountReference;
|
|
10836
11415
|
/**
|
|
10837
|
-
*
|
|
11416
|
+
* Seller-assigned media buy identifier. Links this usage record to a specific media buy.
|
|
10838
11417
|
*/
|
|
10839
|
-
|
|
11418
|
+
media_buy_id?: string;
|
|
10840
11419
|
/**
|
|
10841
11420
|
* Amount owed to the vendor for this record, denominated in currency.
|
|
10842
11421
|
*/
|
|
@@ -11032,4 +11611,208 @@ export interface GetAccountFinancialsError {
|
|
|
11032
11611
|
context?: ContextObject;
|
|
11033
11612
|
ext?: ExtensionObject;
|
|
11034
11613
|
}
|
|
11614
|
+
/**
|
|
11615
|
+
* Request payload for the comply_test_controller tool. Triggers seller-side state transitions for compliance testing. Sandbox only — sellers MUST NOT expose this tool in production.
|
|
11616
|
+
*/
|
|
11617
|
+
export type ComplyTestControllerRequest = ListScenarios | ForceCreativeStatus | ForceAccountStatus | ForceMediaBuyStatus | ForceSessionStatus | SimulateDelivery | SimulateBudgetSpend;
|
|
11618
|
+
/**
|
|
11619
|
+
* Discover which scenarios this seller supports
|
|
11620
|
+
*/
|
|
11621
|
+
export interface ListScenarios {
|
|
11622
|
+
scenario: 'list_scenarios';
|
|
11623
|
+
context?: ContextObject;
|
|
11624
|
+
ext?: ExtensionObject;
|
|
11625
|
+
}
|
|
11626
|
+
/**
|
|
11627
|
+
* Transition a creative to the specified status
|
|
11628
|
+
*/
|
|
11629
|
+
export interface ForceCreativeStatus {
|
|
11630
|
+
scenario: 'force_creative_status';
|
|
11631
|
+
params: {
|
|
11632
|
+
/**
|
|
11633
|
+
* Creative to transition
|
|
11634
|
+
*/
|
|
11635
|
+
creative_id: string;
|
|
11636
|
+
status: CreativeStatus;
|
|
11637
|
+
/**
|
|
11638
|
+
* Reason for rejection. Required when status = rejected.
|
|
11639
|
+
*/
|
|
11640
|
+
rejection_reason?: string;
|
|
11641
|
+
};
|
|
11642
|
+
context?: ContextObject;
|
|
11643
|
+
ext?: ExtensionObject;
|
|
11644
|
+
}
|
|
11645
|
+
/**
|
|
11646
|
+
* Transition an account to the specified status
|
|
11647
|
+
*/
|
|
11648
|
+
export interface ForceAccountStatus {
|
|
11649
|
+
scenario: 'force_account_status';
|
|
11650
|
+
params: {
|
|
11651
|
+
/**
|
|
11652
|
+
* Account to transition
|
|
11653
|
+
*/
|
|
11654
|
+
account_id: string;
|
|
11655
|
+
status: AccountStatus;
|
|
11656
|
+
};
|
|
11657
|
+
context?: ContextObject;
|
|
11658
|
+
ext?: ExtensionObject;
|
|
11659
|
+
}
|
|
11660
|
+
/**
|
|
11661
|
+
* Transition a media buy to the specified status
|
|
11662
|
+
*/
|
|
11663
|
+
export interface ForceMediaBuyStatus {
|
|
11664
|
+
scenario: 'force_media_buy_status';
|
|
11665
|
+
params: {
|
|
11666
|
+
/**
|
|
11667
|
+
* Media buy to transition
|
|
11668
|
+
*/
|
|
11669
|
+
media_buy_id: string;
|
|
11670
|
+
status: MediaBuyStatus;
|
|
11671
|
+
/**
|
|
11672
|
+
* Reason for rejection. Required when status = rejected.
|
|
11673
|
+
*/
|
|
11674
|
+
rejection_reason?: string;
|
|
11675
|
+
};
|
|
11676
|
+
context?: ContextObject;
|
|
11677
|
+
ext?: ExtensionObject;
|
|
11678
|
+
}
|
|
11679
|
+
/**
|
|
11680
|
+
* Transition an SI session to a terminal status
|
|
11681
|
+
*/
|
|
11682
|
+
export interface ForceSessionStatus {
|
|
11683
|
+
scenario: 'force_session_status';
|
|
11684
|
+
params: {
|
|
11685
|
+
/**
|
|
11686
|
+
* Session to transition
|
|
11687
|
+
*/
|
|
11688
|
+
session_id: string;
|
|
11689
|
+
/**
|
|
11690
|
+
* Target terminal status. Only terminal statuses are valid — active and pending_handoff are session-internal transitions.
|
|
11691
|
+
*/
|
|
11692
|
+
status: 'complete' | 'terminated';
|
|
11693
|
+
/**
|
|
11694
|
+
* Reason for termination (e.g., session_timeout, host_terminated, policy_violation). Required when status = terminated.
|
|
11695
|
+
*/
|
|
11696
|
+
termination_reason?: string;
|
|
11697
|
+
};
|
|
11698
|
+
context?: ContextObject;
|
|
11699
|
+
ext?: ExtensionObject;
|
|
11700
|
+
}
|
|
11701
|
+
/**
|
|
11702
|
+
* Inject synthetic delivery data for a media buy
|
|
11703
|
+
*/
|
|
11704
|
+
export interface SimulateDelivery {
|
|
11705
|
+
scenario: 'simulate_delivery';
|
|
11706
|
+
params: {
|
|
11707
|
+
/**
|
|
11708
|
+
* Media buy to add delivery to
|
|
11709
|
+
*/
|
|
11710
|
+
media_buy_id: string;
|
|
11711
|
+
/**
|
|
11712
|
+
* Impressions to simulate
|
|
11713
|
+
*/
|
|
11714
|
+
impressions?: number;
|
|
11715
|
+
/**
|
|
11716
|
+
* Clicks to simulate
|
|
11717
|
+
*/
|
|
11718
|
+
clicks?: number;
|
|
11719
|
+
/**
|
|
11720
|
+
* Spend as reported in delivery data. Does not affect budget.
|
|
11721
|
+
*/
|
|
11722
|
+
reported_spend?: {
|
|
11723
|
+
amount: number;
|
|
11724
|
+
currency: string;
|
|
11725
|
+
};
|
|
11726
|
+
/**
|
|
11727
|
+
* Conversions to simulate
|
|
11728
|
+
*/
|
|
11729
|
+
conversions?: number;
|
|
11730
|
+
};
|
|
11731
|
+
context?: ContextObject;
|
|
11732
|
+
ext?: ExtensionObject;
|
|
11733
|
+
}
|
|
11734
|
+
/**
|
|
11735
|
+
* Simulate budget consumption to a specified percentage
|
|
11736
|
+
*/
|
|
11737
|
+
export interface SimulateBudgetSpend {
|
|
11738
|
+
scenario: 'simulate_budget_spend';
|
|
11739
|
+
params: {
|
|
11740
|
+
[k: string]: unknown | undefined;
|
|
11741
|
+
};
|
|
11742
|
+
context?: ContextObject;
|
|
11743
|
+
ext?: ExtensionObject;
|
|
11744
|
+
}
|
|
11745
|
+
/**
|
|
11746
|
+
* Response from the comply_test_controller tool. Shape varies by scenario type: list_scenarios returns available scenarios, force_* returns state transition results, simulate_* returns simulation results.
|
|
11747
|
+
*/
|
|
11748
|
+
export type ComplyTestControllerResponse = ListScenariosSuccess | StateTransitionSuccess | SimulationSuccess | ControllerError;
|
|
11749
|
+
/**
|
|
11750
|
+
* Lists which scenarios this seller's test controller supports
|
|
11751
|
+
*/
|
|
11752
|
+
export interface ListScenariosSuccess {
|
|
11753
|
+
success: true;
|
|
11754
|
+
/**
|
|
11755
|
+
* Scenarios this seller has implemented
|
|
11756
|
+
*/
|
|
11757
|
+
scenarios: ('force_creative_status' | 'force_account_status' | 'force_media_buy_status' | 'force_session_status' | 'simulate_delivery' | 'simulate_budget_spend')[];
|
|
11758
|
+
context?: ContextObject;
|
|
11759
|
+
ext?: ExtensionObject;
|
|
11760
|
+
}
|
|
11761
|
+
/**
|
|
11762
|
+
* A force_* scenario successfully transitioned the entity to the target state
|
|
11763
|
+
*/
|
|
11764
|
+
export interface StateTransitionSuccess {
|
|
11765
|
+
success: true;
|
|
11766
|
+
/**
|
|
11767
|
+
* State before this transition
|
|
11768
|
+
*/
|
|
11769
|
+
previous_state: string;
|
|
11770
|
+
/**
|
|
11771
|
+
* State after this transition
|
|
11772
|
+
*/
|
|
11773
|
+
current_state: string;
|
|
11774
|
+
/**
|
|
11775
|
+
* Human-readable description of the transition
|
|
11776
|
+
*/
|
|
11777
|
+
message?: string;
|
|
11778
|
+
context?: ContextObject;
|
|
11779
|
+
ext?: ExtensionObject;
|
|
11780
|
+
}
|
|
11781
|
+
/**
|
|
11782
|
+
* A simulate_delivery or simulate_budget_spend scenario succeeded. For delivery: simulated contains impressions/clicks/reported_spend/conversions and cumulative contains running totals. For budget: simulated contains spend_percentage/computed_spend/budget.
|
|
11783
|
+
*/
|
|
11784
|
+
export interface SimulationSuccess {
|
|
11785
|
+
success: true;
|
|
11786
|
+
/**
|
|
11787
|
+
* Values injected or applied by this call. Shape depends on scenario.
|
|
11788
|
+
*/
|
|
11789
|
+
simulated: {};
|
|
11790
|
+
/**
|
|
11791
|
+
* Running totals across all simulation calls (simulate_delivery only)
|
|
11792
|
+
*/
|
|
11793
|
+
cumulative?: {};
|
|
11794
|
+
message?: string;
|
|
11795
|
+
context?: ContextObject;
|
|
11796
|
+
ext?: ExtensionObject;
|
|
11797
|
+
}
|
|
11798
|
+
/**
|
|
11799
|
+
* The scenario failed — invalid transition, unknown entity, unsupported scenario, or invalid params
|
|
11800
|
+
*/
|
|
11801
|
+
export interface ControllerError {
|
|
11802
|
+
success: false;
|
|
11803
|
+
/**
|
|
11804
|
+
* Structured error code
|
|
11805
|
+
*/
|
|
11806
|
+
error: 'INVALID_TRANSITION' | 'INVALID_STATE' | 'NOT_FOUND' | 'UNKNOWN_SCENARIO' | 'INVALID_PARAMS' | 'FORBIDDEN' | 'INTERNAL_ERROR';
|
|
11807
|
+
/**
|
|
11808
|
+
* Human-readable explanation of the failure
|
|
11809
|
+
*/
|
|
11810
|
+
error_detail?: string;
|
|
11811
|
+
/**
|
|
11812
|
+
* Current state of the entity, or null if not found
|
|
11813
|
+
*/
|
|
11814
|
+
current_state?: string | null;
|
|
11815
|
+
context?: ContextObject;
|
|
11816
|
+
ext?: ExtensionObject;
|
|
11817
|
+
}
|
|
11035
11818
|
//# sourceMappingURL=tools.generated.d.ts.map
|