adcp 3.0.0__py3-none-any.whl → 3.2.0__py3-none-any.whl
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.
- adcp/ADCP_VERSION +1 -1
- adcp/__init__.py +13 -5
- adcp/__main__.py +4 -4
- adcp/adagents.py +5 -9
- adcp/client.py +14 -12
- adcp/protocols/a2a.py +3 -3
- adcp/protocols/base.py +2 -2
- adcp/protocols/mcp.py +3 -3
- adcp/server/base.py +6 -10
- adcp/server/content_standards.py +17 -49
- adcp/server/governance.py +20 -59
- adcp/server/mcp_tools.py +8 -4
- adcp/server/proposal.py +1 -3
- adcp/server/sponsored_intelligence.py +10 -28
- adcp/simple.py +10 -10
- adcp/types/__init__.py +14 -6
- adcp/types/_generated.py +44 -27
- adcp/types/aliases.py +55 -0
- adcp/types/base.py +7 -7
- adcp/types/generated_poc/{protocols → a2ui}/__init__.py +1 -1
- adcp/types/generated_poc/a2ui/component.py +24 -0
- adcp/types/generated_poc/a2ui/surface.py +33 -0
- adcp/types/generated_poc/account/__init__.py +3 -0
- adcp/types/generated_poc/account/list_accounts_request.py +30 -0
- adcp/types/generated_poc/account/list_accounts_response.py +30 -0
- adcp/types/generated_poc/adagents.py +192 -195
- adcp/types/generated_poc/content_standards/artifact.py +69 -69
- adcp/types/generated_poc/content_standards/artifact_webhook_payload.py +13 -13
- adcp/types/generated_poc/content_standards/calibrate_content_request.py +2 -2
- adcp/types/generated_poc/content_standards/calibrate_content_response.py +17 -17
- adcp/types/generated_poc/content_standards/content_standards.py +8 -8
- adcp/types/generated_poc/content_standards/create_content_standards_request.py +13 -13
- adcp/types/generated_poc/content_standards/create_content_standards_response.py +6 -6
- adcp/types/generated_poc/content_standards/get_content_standards_request.py +1 -1
- adcp/types/generated_poc/content_standards/get_content_standards_response.py +4 -4
- adcp/types/generated_poc/content_standards/get_media_buy_artifacts_request.py +14 -14
- adcp/types/generated_poc/content_standards/get_media_buy_artifacts_response.py +30 -30
- adcp/types/generated_poc/content_standards/list_content_standards_request.py +4 -4
- adcp/types/generated_poc/content_standards/list_content_standards_response.py +5 -5
- adcp/types/generated_poc/content_standards/update_content_standards_request.py +14 -14
- adcp/types/generated_poc/content_standards/update_content_standards_response.py +4 -4
- adcp/types/generated_poc/content_standards/validate_content_delivery_request.py +13 -13
- adcp/types/generated_poc/content_standards/validate_content_delivery_response.py +16 -16
- adcp/types/generated_poc/core/account.py +54 -0
- adcp/types/generated_poc/core/activation_key.py +8 -8
- adcp/types/generated_poc/core/assets/audio_asset.py +37 -8
- adcp/types/generated_poc/core/assets/css_asset.py +2 -2
- adcp/types/generated_poc/core/assets/daast_asset.py +18 -18
- adcp/types/generated_poc/core/assets/html_asset.py +2 -2
- adcp/types/generated_poc/core/assets/image_asset.py +6 -6
- adcp/types/generated_poc/core/assets/javascript_asset.py +3 -3
- adcp/types/generated_poc/core/assets/text_asset.py +2 -2
- adcp/types/generated_poc/core/assets/url_asset.py +3 -3
- adcp/types/generated_poc/core/assets/vast_asset.py +18 -18
- adcp/types/generated_poc/core/assets/video_asset.py +126 -10
- adcp/types/generated_poc/core/assets/webhook_asset.py +9 -9
- adcp/types/generated_poc/core/async_response_data.py +2 -2
- adcp/types/generated_poc/core/brand_manifest.py +66 -66
- adcp/types/generated_poc/core/brand_manifest_ref.py +9 -9
- adcp/types/generated_poc/core/context.py +1 -1
- adcp/types/generated_poc/core/creative_asset.py +12 -12
- adcp/types/generated_poc/core/creative_assignment.py +3 -3
- adcp/types/generated_poc/core/creative_filters.py +23 -17
- adcp/types/generated_poc/core/creative_manifest.py +4 -4
- adcp/types/generated_poc/core/creative_policy.py +4 -4
- adcp/types/generated_poc/core/delivery_metrics.py +32 -32
- adcp/types/generated_poc/core/deployment.py +20 -20
- adcp/types/generated_poc/core/destination.py +11 -11
- adcp/types/generated_poc/core/error.py +6 -6
- adcp/types/generated_poc/core/ext.py +1 -1
- adcp/types/generated_poc/core/format.py +49 -124
- adcp/types/generated_poc/core/format_id.py +5 -5
- adcp/types/generated_poc/core/frequency_cap.py +2 -2
- adcp/types/generated_poc/core/identifier.py +2 -2
- adcp/types/generated_poc/core/mcp_webhook_payload.py +10 -10
- adcp/types/generated_poc/core/measurement.py +8 -8
- adcp/types/generated_poc/core/media_buy.py +12 -8
- adcp/types/generated_poc/core/media_buy_features.py +3 -3
- adcp/types/generated_poc/core/offering.py +9 -9
- adcp/types/generated_poc/core/package.py +8 -8
- adcp/types/generated_poc/core/performance_feedback.py +18 -18
- adcp/types/generated_poc/core/placement.py +4 -4
- adcp/types/generated_poc/core/pricing_option.py +1 -1
- adcp/types/generated_poc/core/product.py +27 -21
- adcp/types/generated_poc/core/product_allocation.py +5 -5
- adcp/types/generated_poc/core/product_filters.py +27 -27
- adcp/types/generated_poc/core/promoted_offerings.py +18 -18
- adcp/types/generated_poc/core/promoted_products.py +2 -2
- adcp/types/generated_poc/core/property.py +10 -10
- adcp/types/generated_poc/core/property_id.py +4 -4
- adcp/types/generated_poc/core/property_list_ref.py +4 -4
- adcp/types/generated_poc/core/property_tag.py +4 -4
- adcp/types/generated_poc/core/proposal.py +13 -13
- adcp/types/generated_poc/core/protocol_envelope.py +8 -8
- adcp/types/generated_poc/core/publisher_property_selector.py +13 -13
- adcp/types/generated_poc/core/push_notification_config.py +5 -5
- adcp/types/generated_poc/core/reporting_capabilities.py +8 -8
- adcp/types/generated_poc/core/reporting_webhook.py +10 -10
- adcp/types/generated_poc/core/response.py +4 -4
- adcp/types/generated_poc/core/signal_filters.py +5 -5
- adcp/types/generated_poc/core/start_timing.py +3 -3
- adcp/types/generated_poc/core/sub_asset.py +14 -14
- adcp/types/generated_poc/core/targeting.py +17 -10
- adcp/types/generated_poc/creative/list_creative_formats_request.py +20 -20
- adcp/types/generated_poc/creative/list_creative_formats_response.py +5 -5
- adcp/types/generated_poc/creative/preview_creative_request.py +24 -24
- adcp/types/generated_poc/creative/preview_creative_response.py +28 -28
- adcp/types/generated_poc/creative/preview_render.py +25 -25
- adcp/types/generated_poc/enums/adcp_domain.py +4 -4
- adcp/types/generated_poc/enums/asset_content_type.py +13 -13
- adcp/types/generated_poc/enums/auth_scheme.py +2 -2
- adcp/types/generated_poc/enums/available_metric.py +9 -9
- adcp/types/generated_poc/enums/channels.py +19 -19
- adcp/types/generated_poc/enums/co_branding_requirement.py +3 -3
- adcp/types/generated_poc/enums/creative_action.py +5 -5
- adcp/types/generated_poc/enums/creative_agent_capability.py +4 -4
- adcp/types/generated_poc/enums/creative_sort_field.py +6 -6
- adcp/types/generated_poc/enums/creative_status.py +5 -5
- adcp/types/generated_poc/enums/daast_tracking_event.py +11 -11
- adcp/types/generated_poc/enums/daast_version.py +2 -2
- adcp/types/generated_poc/enums/delivery_type.py +2 -2
- adcp/types/generated_poc/enums/dimension_unit.py +4 -4
- adcp/types/generated_poc/enums/feed_format.py +3 -3
- adcp/types/generated_poc/enums/feedback_source.py +4 -4
- adcp/types/generated_poc/enums/format_category.py +7 -7
- adcp/types/generated_poc/enums/format_id_parameter.py +2 -2
- adcp/types/generated_poc/enums/frequency_cap_scope.py +3 -3
- adcp/types/generated_poc/enums/geo_level.py +4 -4
- adcp/types/generated_poc/enums/history_entry_type.py +2 -2
- adcp/types/generated_poc/enums/http_method.py +2 -2
- adcp/types/generated_poc/enums/identifier_types.py +19 -19
- adcp/types/generated_poc/enums/javascript_module_type.py +3 -3
- adcp/types/generated_poc/enums/landing_page_requirement.py +3 -3
- adcp/types/generated_poc/enums/markdown_flavor.py +2 -2
- adcp/types/generated_poc/enums/media_buy_status.py +4 -4
- adcp/types/generated_poc/enums/metric_type.py +8 -8
- adcp/types/generated_poc/enums/metro_system.py +5 -5
- adcp/types/generated_poc/enums/notification_type.py +4 -4
- adcp/types/generated_poc/enums/pacing.py +3 -3
- adcp/types/generated_poc/enums/postal_system.py +9 -9
- adcp/types/generated_poc/enums/preview_output_format.py +2 -2
- adcp/types/generated_poc/enums/pricing_model.py +7 -7
- adcp/types/generated_poc/enums/property_type.py +8 -8
- adcp/types/generated_poc/enums/publisher_identifier_types.py +5 -5
- adcp/types/generated_poc/enums/reporting_frequency.py +3 -3
- adcp/types/generated_poc/enums/signal_catalog_type.py +3 -3
- adcp/types/generated_poc/enums/sort_direction.py +2 -2
- adcp/types/generated_poc/enums/task_status.py +9 -9
- adcp/types/generated_poc/enums/task_type.py +11 -12
- adcp/types/generated_poc/enums/update_frequency.py +4 -4
- adcp/types/generated_poc/enums/url_asset_type.py +3 -3
- adcp/types/generated_poc/enums/validation_mode.py +2 -2
- adcp/types/generated_poc/enums/vast_tracking_event.py +16 -16
- adcp/types/generated_poc/enums/vast_version.py +5 -5
- adcp/types/generated_poc/enums/webhook_response_type.py +4 -4
- adcp/types/generated_poc/enums/webhook_security_method.py +3 -3
- adcp/types/generated_poc/extensions/extension_meta.py +14 -14
- adcp/types/generated_poc/media_buy/build_creative_request.py +4 -4
- adcp/types/generated_poc/media_buy/build_creative_response.py +6 -6
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_input_required.py +5 -5
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_submitted.py +1 -1
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_working.py +5 -5
- adcp/types/generated_poc/media_buy/create_media_buy_request.py +27 -21
- adcp/types/generated_poc/media_buy/create_media_buy_response.py +15 -8
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_request.py +8 -8
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_response.py +51 -51
- adcp/types/generated_poc/media_buy/get_products_async_response_input_required.py +6 -6
- adcp/types/generated_poc/media_buy/get_products_async_response_submitted.py +2 -2
- adcp/types/generated_poc/media_buy/get_products_async_response_working.py +4 -4
- adcp/types/generated_poc/media_buy/get_products_request.py +11 -5
- adcp/types/generated_poc/media_buy/get_products_response.py +5 -5
- adcp/types/generated_poc/media_buy/list_creative_formats_request.py +9 -9
- adcp/types/generated_poc/media_buy/list_creative_formats_response.py +5 -5
- adcp/types/generated_poc/media_buy/list_creatives_request.py +23 -23
- adcp/types/generated_poc/media_buy/list_creatives_response.py +53 -49
- adcp/types/generated_poc/media_buy/package_request.py +8 -8
- adcp/types/generated_poc/media_buy/package_update.py +16 -16
- adcp/types/generated_poc/media_buy/provide_performance_feedback_request.py +19 -19
- adcp/types/generated_poc/media_buy/provide_performance_feedback_response.py +6 -6
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_input_required.py +5 -5
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_submitted.py +1 -1
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_working.py +7 -7
- adcp/types/generated_poc/media_buy/sync_creatives_request.py +14 -8
- adcp/types/generated_poc/media_buy/sync_creatives_response.py +33 -29
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_input_required.py +4 -4
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_submitted.py +1 -1
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_working.py +5 -5
- adcp/types/generated_poc/media_buy/update_media_buy_request.py +14 -14
- adcp/types/generated_poc/media_buy/update_media_buy_response.py +7 -7
- adcp/types/generated_poc/pricing_options/cpc_option.py +13 -26
- adcp/types/generated_poc/pricing_options/cpcv_option.py +13 -26
- adcp/types/generated_poc/pricing_options/cpm_option.py +13 -20
- adcp/types/generated_poc/pricing_options/cpp_option.py +19 -32
- adcp/types/generated_poc/pricing_options/cpv_option.py +19 -32
- adcp/types/generated_poc/pricing_options/flat_rate_option.py +23 -36
- adcp/types/generated_poc/pricing_options/price_guidance.py +26 -0
- adcp/types/generated_poc/pricing_options/vcpm_option.py +13 -26
- adcp/types/generated_poc/property/base_property_source.py +15 -15
- adcp/types/generated_poc/property/create_property_list_request.py +4 -4
- adcp/types/generated_poc/property/create_property_list_response.py +3 -3
- adcp/types/generated_poc/property/delete_property_list_request.py +2 -2
- adcp/types/generated_poc/property/delete_property_list_response.py +3 -3
- adcp/types/generated_poc/property/feature_requirement.py +8 -8
- adcp/types/generated_poc/property/get_property_list_request.py +5 -5
- adcp/types/generated_poc/property/get_property_list_response.py +11 -11
- adcp/types/generated_poc/property/list_property_lists_request.py +5 -5
- adcp/types/generated_poc/property/list_property_lists_response.py +8 -8
- adcp/types/generated_poc/property/property_error.py +10 -10
- adcp/types/generated_poc/property/property_feature.py +4 -4
- adcp/types/generated_poc/property/property_feature_definition.py +18 -18
- adcp/types/generated_poc/property/property_list.py +11 -11
- adcp/types/generated_poc/property/property_list_changed_webhook.py +11 -11
- adcp/types/generated_poc/property/property_list_filters.py +7 -7
- adcp/types/generated_poc/property/update_property_list_request.py +8 -8
- adcp/types/generated_poc/property/update_property_list_response.py +2 -2
- adcp/types/generated_poc/protocol/get_adcp_capabilities_request.py +8 -6
- adcp/types/generated_poc/protocol/get_adcp_capabilities_response.py +59 -58
- adcp/types/generated_poc/signals/activate_signal_request.py +3 -3
- adcp/types/generated_poc/signals/activate_signal_response.py +6 -6
- adcp/types/generated_poc/signals/get_signals_request.py +8 -8
- adcp/types/generated_poc/signals/get_signals_response.py +15 -15
- adcp/types/generated_poc/sponsored_intelligence/si_capabilities.py +45 -30
- adcp/types/generated_poc/sponsored_intelligence/si_get_offering_request.py +4 -4
- adcp/types/generated_poc/sponsored_intelligence/si_get_offering_response.py +23 -23
- adcp/types/generated_poc/sponsored_intelligence/si_identity.py +16 -16
- adcp/types/generated_poc/sponsored_intelligence/si_initiate_session_request.py +5 -5
- adcp/types/generated_poc/sponsored_intelligence/si_initiate_session_response.py +7 -7
- adcp/types/generated_poc/sponsored_intelligence/si_send_message_request.py +11 -11
- adcp/types/generated_poc/sponsored_intelligence/si_send_message_response.py +37 -23
- adcp/types/generated_poc/sponsored_intelligence/si_terminate_session_request.py +17 -17
- adcp/types/generated_poc/sponsored_intelligence/si_terminate_session_response.py +15 -15
- adcp/types/generated_poc/sponsored_intelligence/si_ui_element.py +11 -11
- adcp/utils/format_assets.py +32 -32
- {adcp-3.0.0.dist-info → adcp-3.2.0.dist-info}/METADATA +10 -5
- adcp-3.2.0.dist-info/RECORD +268 -0
- adcp/types/generated_poc/media_buy/list_authorized_properties_request.py +0 -38
- adcp/types/generated_poc/media_buy/list_authorized_properties_response.py +0 -84
- adcp/types/generated_poc/protocols/adcp_extension.py +0 -50
- adcp-3.0.0.dist-info/RECORD +0 -264
- {adcp-3.0.0.dist-info → adcp-3.2.0.dist-info}/WHEEL +0 -0
- {adcp-3.0.0.dist-info → adcp-3.2.0.dist-info}/entry_points.txt +0 -0
- {adcp-3.0.0.dist-info → adcp-3.2.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-3.0.0.dist-info → adcp-3.2.0.dist-info}/top_level.txt +0 -0
adcp/server/proposal.py
CHANGED
|
@@ -288,9 +288,7 @@ class ProposalBuilder:
|
|
|
288
288
|
|
|
289
289
|
total = sum(a["allocation_percentage"] for a in self._allocations)
|
|
290
290
|
if abs(total - 100.0) > 0.01:
|
|
291
|
-
raise ValueError(
|
|
292
|
-
f"Allocation percentages must sum to 100, got {total}"
|
|
293
|
-
)
|
|
291
|
+
raise ValueError(f"Allocation percentages must sum to 100, got {total}")
|
|
294
292
|
|
|
295
293
|
proposal: dict[str, Any] = {
|
|
296
294
|
"proposal_id": self._proposal_id,
|
|
@@ -256,37 +256,29 @@ class SponsoredIntelligenceHandler(ADCPHandler):
|
|
|
256
256
|
"list_creative_formats is not supported by Sponsored Intelligence agents."
|
|
257
257
|
)
|
|
258
258
|
|
|
259
|
-
async def
|
|
259
|
+
async def list_accounts(
|
|
260
260
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
261
261
|
) -> NotImplementedResponse:
|
|
262
262
|
"""Not supported by Sponsored Intelligence agents."""
|
|
263
|
-
return not_supported(
|
|
264
|
-
"list_authorized_properties is not supported by Sponsored Intelligence agents."
|
|
265
|
-
)
|
|
263
|
+
return not_supported("list_accounts is not supported by Sponsored Intelligence agents.")
|
|
266
264
|
|
|
267
265
|
async def sync_creatives(
|
|
268
266
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
269
267
|
) -> NotImplementedResponse:
|
|
270
268
|
"""Not supported by Sponsored Intelligence agents."""
|
|
271
|
-
return not_supported(
|
|
272
|
-
"sync_creatives is not supported by Sponsored Intelligence agents."
|
|
273
|
-
)
|
|
269
|
+
return not_supported("sync_creatives is not supported by Sponsored Intelligence agents.")
|
|
274
270
|
|
|
275
271
|
async def list_creatives(
|
|
276
272
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
277
273
|
) -> NotImplementedResponse:
|
|
278
274
|
"""Not supported by Sponsored Intelligence agents."""
|
|
279
|
-
return not_supported(
|
|
280
|
-
"list_creatives is not supported by Sponsored Intelligence agents."
|
|
281
|
-
)
|
|
275
|
+
return not_supported("list_creatives is not supported by Sponsored Intelligence agents.")
|
|
282
276
|
|
|
283
277
|
async def build_creative(
|
|
284
278
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
285
279
|
) -> NotImplementedResponse:
|
|
286
280
|
"""Not supported by Sponsored Intelligence agents."""
|
|
287
|
-
return not_supported(
|
|
288
|
-
"build_creative is not supported by Sponsored Intelligence agents."
|
|
289
|
-
)
|
|
281
|
+
return not_supported("build_creative is not supported by Sponsored Intelligence agents.")
|
|
290
282
|
|
|
291
283
|
async def create_media_buy(
|
|
292
284
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
@@ -301,9 +293,7 @@ class SponsoredIntelligenceHandler(ADCPHandler):
|
|
|
301
293
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
302
294
|
) -> NotImplementedResponse:
|
|
303
295
|
"""Not supported by Sponsored Intelligence agents."""
|
|
304
|
-
return not_supported(
|
|
305
|
-
"update_media_buy is not supported by Sponsored Intelligence agents."
|
|
306
|
-
)
|
|
296
|
+
return not_supported("update_media_buy is not supported by Sponsored Intelligence agents.")
|
|
307
297
|
|
|
308
298
|
async def get_media_buy_delivery(
|
|
309
299
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
@@ -317,17 +307,13 @@ class SponsoredIntelligenceHandler(ADCPHandler):
|
|
|
317
307
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
318
308
|
) -> NotImplementedResponse:
|
|
319
309
|
"""Not supported by Sponsored Intelligence agents."""
|
|
320
|
-
return not_supported(
|
|
321
|
-
"get_signals is not supported by Sponsored Intelligence agents."
|
|
322
|
-
)
|
|
310
|
+
return not_supported("get_signals is not supported by Sponsored Intelligence agents.")
|
|
323
311
|
|
|
324
312
|
async def activate_signal(
|
|
325
313
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
326
314
|
) -> NotImplementedResponse:
|
|
327
315
|
"""Not supported by Sponsored Intelligence agents."""
|
|
328
|
-
return not_supported(
|
|
329
|
-
"activate_signal is not supported by Sponsored Intelligence agents."
|
|
330
|
-
)
|
|
316
|
+
return not_supported("activate_signal is not supported by Sponsored Intelligence agents.")
|
|
331
317
|
|
|
332
318
|
async def provide_performance_feedback(
|
|
333
319
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
@@ -378,9 +364,7 @@ class SponsoredIntelligenceHandler(ADCPHandler):
|
|
|
378
364
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
379
365
|
) -> NotImplementedResponse:
|
|
380
366
|
"""Not supported by Sponsored Intelligence agents."""
|
|
381
|
-
return not_supported(
|
|
382
|
-
"calibrate_content is not supported by Sponsored Intelligence agents."
|
|
383
|
-
)
|
|
367
|
+
return not_supported("calibrate_content is not supported by Sponsored Intelligence agents.")
|
|
384
368
|
|
|
385
369
|
async def validate_content_delivery(
|
|
386
370
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
@@ -415,9 +399,7 @@ class SponsoredIntelligenceHandler(ADCPHandler):
|
|
|
415
399
|
self, params: dict[str, Any], context: ToolContext | None = None
|
|
416
400
|
) -> NotImplementedResponse:
|
|
417
401
|
"""Not supported by Sponsored Intelligence agents."""
|
|
418
|
-
return not_supported(
|
|
419
|
-
"get_property_list is not supported by Sponsored Intelligence agents."
|
|
420
|
-
)
|
|
402
|
+
return not_supported("get_property_list is not supported by Sponsored Intelligence agents.")
|
|
421
403
|
|
|
422
404
|
async def list_property_lists(
|
|
423
405
|
self, params: dict[str, Any], context: ToolContext | None = None
|
adcp/simple.py
CHANGED
|
@@ -36,8 +36,8 @@ from adcp.types import (
|
|
|
36
36
|
GetProductsResponse,
|
|
37
37
|
GetSignalsRequest,
|
|
38
38
|
GetSignalsResponse,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
ListAccountsRequest,
|
|
40
|
+
ListAccountsResponse,
|
|
41
41
|
ListCreativeFormatsRequest,
|
|
42
42
|
ListCreativeFormatsResponse,
|
|
43
43
|
ListCreativesRequest,
|
|
@@ -252,26 +252,26 @@ class SimpleAPI:
|
|
|
252
252
|
)
|
|
253
253
|
return result.data
|
|
254
254
|
|
|
255
|
-
async def
|
|
255
|
+
async def list_accounts(
|
|
256
256
|
self,
|
|
257
257
|
**kwargs: Any,
|
|
258
|
-
) ->
|
|
259
|
-
"""List
|
|
258
|
+
) -> ListAccountsResponse:
|
|
259
|
+
"""List billing accounts accessible to the authenticated agent.
|
|
260
260
|
|
|
261
261
|
Args:
|
|
262
|
-
**kwargs: Arguments passed to
|
|
262
|
+
**kwargs: Arguments passed to ListAccountsRequest
|
|
263
263
|
|
|
264
264
|
Returns:
|
|
265
|
-
|
|
265
|
+
ListAccountsResponse
|
|
266
266
|
|
|
267
267
|
Raises:
|
|
268
268
|
Exception: If the request fails
|
|
269
269
|
"""
|
|
270
|
-
request =
|
|
271
|
-
result = await self._client.
|
|
270
|
+
request = ListAccountsRequest(**kwargs)
|
|
271
|
+
result = await self._client.list_accounts(request)
|
|
272
272
|
if not result.success or not result.data:
|
|
273
273
|
raise ADCPSimpleAPIError(
|
|
274
|
-
operation="
|
|
274
|
+
operation="list_accounts",
|
|
275
275
|
error_message=result.error,
|
|
276
276
|
agent_id=self._client.agent_config.id,
|
|
277
277
|
)
|
adcp/types/__init__.py
CHANGED
|
@@ -40,6 +40,9 @@ from adcp.types import _generated as generated # noqa: F401
|
|
|
40
40
|
# V3 Sponsored Intelligence types
|
|
41
41
|
# V3 Governance (Property Lists) types
|
|
42
42
|
from adcp.types._generated import (
|
|
43
|
+
A2UiComponent,
|
|
44
|
+
A2UiSurface,
|
|
45
|
+
Account,
|
|
43
46
|
ActivateSignalRequest,
|
|
44
47
|
ActivateSignalResponse,
|
|
45
48
|
AggregatedTotals,
|
|
@@ -47,7 +50,6 @@ from adcp.types._generated import (
|
|
|
47
50
|
Asset,
|
|
48
51
|
AssetContentType,
|
|
49
52
|
AssetSelectors,
|
|
50
|
-
AssetsRequired,
|
|
51
53
|
AssignedPackage,
|
|
52
54
|
Assignments,
|
|
53
55
|
AudioAsset,
|
|
@@ -141,8 +143,8 @@ from adcp.types._generated import (
|
|
|
141
143
|
JavascriptAsset,
|
|
142
144
|
JavascriptModuleType,
|
|
143
145
|
LandingPageRequirement,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
ListAccountsRequest,
|
|
147
|
+
ListAccountsResponse,
|
|
146
148
|
ListContentStandardsRequest,
|
|
147
149
|
ListContentStandardsResponse,
|
|
148
150
|
ListCreativeFormatsRequest,
|
|
@@ -289,10 +291,12 @@ from adcp.types.aliases import (
|
|
|
289
291
|
PreviewCreativeInteractiveResponse,
|
|
290
292
|
PreviewCreativeManifestRequest,
|
|
291
293
|
PreviewCreativeStaticResponse,
|
|
294
|
+
PricingOption,
|
|
292
295
|
PropertyId,
|
|
293
296
|
PropertyTag,
|
|
294
297
|
ProvidePerformanceFeedbackErrorResponse,
|
|
295
298
|
ProvidePerformanceFeedbackSuccessResponse,
|
|
299
|
+
PublisherProperties,
|
|
296
300
|
PublisherPropertiesAll,
|
|
297
301
|
PublisherPropertiesById,
|
|
298
302
|
PublisherPropertiesByTag,
|
|
@@ -356,8 +360,8 @@ __all__ = [
|
|
|
356
360
|
"GetProductsResponse",
|
|
357
361
|
"GetSignalsRequest",
|
|
358
362
|
"GetSignalsResponse",
|
|
359
|
-
"
|
|
360
|
-
"
|
|
363
|
+
"ListAccountsRequest",
|
|
364
|
+
"ListAccountsResponse",
|
|
361
365
|
"ListCreativeFormatsRequest",
|
|
362
366
|
"ListCreativeFormatsResponse",
|
|
363
367
|
"ListCreativesRequest",
|
|
@@ -398,6 +402,8 @@ __all__ = [
|
|
|
398
402
|
"ValidateContentDeliveryRequest",
|
|
399
403
|
"ValidateContentDeliveryResponse",
|
|
400
404
|
# V3 Sponsored Intelligence
|
|
405
|
+
"A2UiComponent",
|
|
406
|
+
"A2UiSurface",
|
|
401
407
|
"SiCapabilities",
|
|
402
408
|
"SiGetOfferingRequest",
|
|
403
409
|
"SiGetOfferingResponse",
|
|
@@ -430,7 +436,7 @@ __all__ = [
|
|
|
430
436
|
"AssetContentType",
|
|
431
437
|
"AssetType", # Deprecated
|
|
432
438
|
"FormatCategory",
|
|
433
|
-
"
|
|
439
|
+
"Account",
|
|
434
440
|
"AssignedPackage",
|
|
435
441
|
"Assignments",
|
|
436
442
|
"BrandManifest",
|
|
@@ -602,10 +608,12 @@ __all__ = [
|
|
|
602
608
|
"PreviewCreativeInteractiveResponse",
|
|
603
609
|
"PreviewCreativeManifestRequest",
|
|
604
610
|
"PreviewCreativeStaticResponse",
|
|
611
|
+
"PricingOption",
|
|
605
612
|
"PropertyId",
|
|
606
613
|
"PropertyTag",
|
|
607
614
|
"ProvidePerformanceFeedbackErrorResponse",
|
|
608
615
|
"ProvidePerformanceFeedbackSuccessResponse",
|
|
616
|
+
"PublisherProperties",
|
|
609
617
|
"PublisherPropertiesAll",
|
|
610
618
|
"PublisherPropertiesById",
|
|
611
619
|
"PublisherPropertiesByTag",
|
adcp/types/_generated.py
CHANGED
|
@@ -10,13 +10,17 @@ Auto-generated by datamodel-code-generator from JSON schemas.
|
|
|
10
10
|
DO NOT EDIT MANUALLY.
|
|
11
11
|
|
|
12
12
|
Generated from: https://github.com/adcontextprotocol/adcp/tree/main/schemas
|
|
13
|
-
Generation date: 2026-
|
|
13
|
+
Generation date: 2026-02-02 17:45:22 UTC
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
# ruff: noqa: E501, I001
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
19
|
# Import all types from generated_poc modules
|
|
20
|
+
from adcp.types.generated_poc.a2ui.component import A2UiComponent
|
|
21
|
+
from adcp.types.generated_poc.a2ui.surface import A2UiSurface
|
|
22
|
+
from adcp.types.generated_poc.account.list_accounts_request import ListAccountsRequest, Status
|
|
23
|
+
from adcp.types.generated_poc.account.list_accounts_response import ListAccountsResponse
|
|
20
24
|
from adcp.types.generated_poc.adagents import (
|
|
21
25
|
AuthorizedAgents,
|
|
22
26
|
AuthorizedAgents1,
|
|
@@ -58,7 +62,6 @@ from adcp.types.generated_poc.content_standards.calibrate_content_response impor
|
|
|
58
62
|
CalibrateContentResponse1,
|
|
59
63
|
CalibrateContentResponse2,
|
|
60
64
|
Feature,
|
|
61
|
-
Status,
|
|
62
65
|
Verdict,
|
|
63
66
|
)
|
|
64
67
|
from adcp.types.generated_poc.content_standards.content_standards import (
|
|
@@ -123,12 +126,13 @@ from adcp.types.generated_poc.content_standards.validate_content_delivery_respon
|
|
|
123
126
|
ValidateContentDeliveryResponse1,
|
|
124
127
|
ValidateContentDeliveryResponse2,
|
|
125
128
|
)
|
|
129
|
+
from adcp.types.generated_poc.core.account import Account, CreditLimit
|
|
126
130
|
from adcp.types.generated_poc.core.activation_key import (
|
|
127
131
|
ActivationKey,
|
|
128
132
|
ActivationKey1,
|
|
129
133
|
ActivationKey2,
|
|
130
134
|
)
|
|
131
|
-
from adcp.types.generated_poc.core.assets.audio_asset import AudioAsset
|
|
135
|
+
from adcp.types.generated_poc.core.assets.audio_asset import AudioAsset, BitDepth, Channels
|
|
132
136
|
from adcp.types.generated_poc.core.assets.css_asset import CssAsset
|
|
133
137
|
from adcp.types.generated_poc.core.assets.daast_asset import DaastAsset, DaastAsset1, DaastAsset2
|
|
134
138
|
from adcp.types.generated_poc.core.assets.html_asset import HtmlAsset
|
|
@@ -137,7 +141,19 @@ from adcp.types.generated_poc.core.assets.javascript_asset import JavascriptAsse
|
|
|
137
141
|
from adcp.types.generated_poc.core.assets.text_asset import TextAsset
|
|
138
142
|
from adcp.types.generated_poc.core.assets.url_asset import UrlAsset
|
|
139
143
|
from adcp.types.generated_poc.core.assets.vast_asset import VastAsset, VastAsset1, VastAsset2
|
|
140
|
-
from adcp.types.generated_poc.core.assets.video_asset import
|
|
144
|
+
from adcp.types.generated_poc.core.assets.video_asset import (
|
|
145
|
+
AudioBitDepth,
|
|
146
|
+
AudioChannels,
|
|
147
|
+
ChromaSubsampling,
|
|
148
|
+
ColorSpace,
|
|
149
|
+
FrameRateType,
|
|
150
|
+
GopType,
|
|
151
|
+
HdrFormat,
|
|
152
|
+
MoovAtomPosition,
|
|
153
|
+
ScanType,
|
|
154
|
+
VideoAsset,
|
|
155
|
+
VideoBitDepth,
|
|
156
|
+
)
|
|
141
157
|
from adcp.types.generated_poc.core.assets.webhook_asset import Security, WebhookAsset
|
|
142
158
|
from adcp.types.generated_poc.core.async_response_data import AdcpAsyncResponseData
|
|
143
159
|
from adcp.types.generated_poc.core.brand_manifest import (
|
|
@@ -172,10 +188,7 @@ from adcp.types.generated_poc.core.destination import Destination, Destination1,
|
|
|
172
188
|
from adcp.types.generated_poc.core.error import Error
|
|
173
189
|
from adcp.types.generated_poc.core.ext import ExtensionObject
|
|
174
190
|
from adcp.types.generated_poc.core.format import (
|
|
175
|
-
Asset2,
|
|
176
191
|
Assets5,
|
|
177
|
-
AssetsRequired,
|
|
178
|
-
AssetsRequired1,
|
|
179
192
|
Dimensions,
|
|
180
193
|
Dimensions1,
|
|
181
194
|
Format,
|
|
@@ -383,14 +396,6 @@ from adcp.types.generated_poc.media_buy.get_products_async_response_working impo
|
|
|
383
396
|
)
|
|
384
397
|
from adcp.types.generated_poc.media_buy.get_products_request import GetProductsRequest
|
|
385
398
|
from adcp.types.generated_poc.media_buy.get_products_response import GetProductsResponse
|
|
386
|
-
from adcp.types.generated_poc.media_buy.list_authorized_properties_request import (
|
|
387
|
-
ListAuthorizedPropertiesRequest,
|
|
388
|
-
PublisherDomain,
|
|
389
|
-
)
|
|
390
|
-
from adcp.types.generated_poc.media_buy.list_authorized_properties_response import (
|
|
391
|
-
ListAuthorizedPropertiesResponse,
|
|
392
|
-
PrimaryCountry,
|
|
393
|
-
)
|
|
394
399
|
from adcp.types.generated_poc.media_buy.list_creative_formats_request import (
|
|
395
400
|
ListCreativeFormatsRequest,
|
|
396
401
|
)
|
|
@@ -462,7 +467,7 @@ from adcp.types.generated_poc.media_buy.update_media_buy_response import (
|
|
|
462
467
|
UpdateMediaBuyResponse1,
|
|
463
468
|
UpdateMediaBuyResponse2,
|
|
464
469
|
)
|
|
465
|
-
from adcp.types.generated_poc.pricing_options.cpc_option import CpcPricingOption
|
|
470
|
+
from adcp.types.generated_poc.pricing_options.cpc_option import CpcPricingOption
|
|
466
471
|
from adcp.types.generated_poc.pricing_options.cpcv_option import CpcvPricingOption
|
|
467
472
|
from adcp.types.generated_poc.pricing_options.cpm_option import CpmPricingOption
|
|
468
473
|
from adcp.types.generated_poc.pricing_options.cpp_option import CppPricingOption, Parameters
|
|
@@ -472,6 +477,7 @@ from adcp.types.generated_poc.pricing_options.cpv_option import (
|
|
|
472
477
|
ViewThreshold1,
|
|
473
478
|
)
|
|
474
479
|
from adcp.types.generated_poc.pricing_options.flat_rate_option import FlatRatePricingOption
|
|
480
|
+
from adcp.types.generated_poc.pricing_options.price_guidance import PriceGuidance
|
|
475
481
|
from adcp.types.generated_poc.pricing_options.vcpm_option import VcpmPricingOption
|
|
476
482
|
from adcp.types.generated_poc.property.base_property_source import (
|
|
477
483
|
BasePropertySource,
|
|
@@ -529,16 +535,14 @@ from adcp.types.generated_poc.protocol.get_adcp_capabilities_response import (
|
|
|
529
535
|
MraidVersion,
|
|
530
536
|
Portfolio,
|
|
531
537
|
Preferred,
|
|
538
|
+
PrimaryCountry,
|
|
539
|
+
PublisherDomain,
|
|
532
540
|
Signals,
|
|
533
541
|
SponsoredIntelligence,
|
|
534
542
|
SupportedProtocol,
|
|
535
543
|
Targeting,
|
|
536
544
|
Transport,
|
|
537
545
|
)
|
|
538
|
-
from adcp.types.generated_poc.protocols.adcp_extension import (
|
|
539
|
-
AdcpAgentCardExtensionParamsDeprecated,
|
|
540
|
-
ProtocolsSupportedEnum,
|
|
541
|
-
)
|
|
542
546
|
from adcp.types.generated_poc.signals.activate_signal_request import ActivateSignalRequest
|
|
543
547
|
from adcp.types.generated_poc.signals.activate_signal_response import (
|
|
544
548
|
ActivateSignalResponse,
|
|
@@ -552,6 +556,7 @@ from adcp.types.generated_poc.signals.get_signals_response import (
|
|
|
552
556
|
Signal,
|
|
553
557
|
)
|
|
554
558
|
from adcp.types.generated_poc.sponsored_intelligence.si_capabilities import (
|
|
559
|
+
A2ui,
|
|
555
560
|
Commerce,
|
|
556
561
|
Components,
|
|
557
562
|
Modalities,
|
|
@@ -611,6 +616,10 @@ from adcp.types.generated_poc.core.package import Package as _PackageFromPackage
|
|
|
611
616
|
|
|
612
617
|
# Explicit exports
|
|
613
618
|
__all__ = [
|
|
619
|
+
"A2UiComponent",
|
|
620
|
+
"A2UiSurface",
|
|
621
|
+
"A2ui",
|
|
622
|
+
"Account",
|
|
614
623
|
"AcpHandoff",
|
|
615
624
|
"Action",
|
|
616
625
|
"ActionResponse",
|
|
@@ -622,7 +631,6 @@ __all__ = [
|
|
|
622
631
|
"ActivationKey1",
|
|
623
632
|
"ActivationKey2",
|
|
624
633
|
"Adcp",
|
|
625
|
-
"AdcpAgentCardExtensionParamsDeprecated",
|
|
626
634
|
"AdcpAsyncResponseData",
|
|
627
635
|
"AdcpDomain",
|
|
628
636
|
"AdcpExtensionFileSchema",
|
|
@@ -632,7 +640,6 @@ __all__ = [
|
|
|
632
640
|
"ArtifactWebhook",
|
|
633
641
|
"ArtifactWebhookPayload",
|
|
634
642
|
"Asset",
|
|
635
|
-
"Asset2",
|
|
636
643
|
"AssetAccess",
|
|
637
644
|
"AssetAccess1",
|
|
638
645
|
"AssetAccess2",
|
|
@@ -645,11 +652,11 @@ __all__ = [
|
|
|
645
652
|
"Assets2",
|
|
646
653
|
"Assets3",
|
|
647
654
|
"Assets5",
|
|
648
|
-
"AssetsRequired",
|
|
649
|
-
"AssetsRequired1",
|
|
650
655
|
"AssignedPackage",
|
|
651
656
|
"Assignments",
|
|
652
657
|
"AudioAsset",
|
|
658
|
+
"AudioBitDepth",
|
|
659
|
+
"AudioChannels",
|
|
653
660
|
"Authentication",
|
|
654
661
|
"AuthenticationScheme",
|
|
655
662
|
"AuthorizedAgents",
|
|
@@ -666,6 +673,7 @@ __all__ = [
|
|
|
666
673
|
"BasePropertySource2",
|
|
667
674
|
"BasePropertySource3",
|
|
668
675
|
"BatchFrequency",
|
|
676
|
+
"BitDepth",
|
|
669
677
|
"BrandContext",
|
|
670
678
|
"BrandManifest",
|
|
671
679
|
"BrandManifestReference",
|
|
@@ -682,8 +690,11 @@ __all__ = [
|
|
|
682
690
|
"CalibrateContentResponse2",
|
|
683
691
|
"CalibrationExemplars",
|
|
684
692
|
"ChangeSummary",
|
|
693
|
+
"Channels",
|
|
694
|
+
"ChromaSubsampling",
|
|
685
695
|
"CoBrandingRequirement",
|
|
686
696
|
"Code",
|
|
697
|
+
"ColorSpace",
|
|
687
698
|
"Colors",
|
|
688
699
|
"Commerce",
|
|
689
700
|
"Components",
|
|
@@ -725,6 +736,7 @@ __all__ = [
|
|
|
725
736
|
"CreativeSortField",
|
|
726
737
|
"CreativeSpecs",
|
|
727
738
|
"CreativeStatus",
|
|
739
|
+
"CreditLimit",
|
|
728
740
|
"CssAsset",
|
|
729
741
|
"DaastAsset",
|
|
730
742
|
"DaastAsset1",
|
|
@@ -772,6 +784,7 @@ __all__ = [
|
|
|
772
784
|
"FormatCategory",
|
|
773
785
|
"FormatId",
|
|
774
786
|
"FormatIdParameter",
|
|
787
|
+
"FrameRateType",
|
|
775
788
|
"FrequencyCap",
|
|
776
789
|
"FrequencyCapScope",
|
|
777
790
|
"GeoCountry",
|
|
@@ -802,8 +815,10 @@ __all__ = [
|
|
|
802
815
|
"GetPropertyListResponse",
|
|
803
816
|
"GetSignalsRequest",
|
|
804
817
|
"GetSignalsResponse",
|
|
818
|
+
"GopType",
|
|
805
819
|
"Governance",
|
|
806
820
|
"Handoff",
|
|
821
|
+
"HdrFormat",
|
|
807
822
|
"HistoryEntryType",
|
|
808
823
|
"HtmlAsset",
|
|
809
824
|
"HttpMethod",
|
|
@@ -818,8 +833,8 @@ __all__ = [
|
|
|
818
833
|
"JavascriptAsset",
|
|
819
834
|
"JavascriptModuleType",
|
|
820
835
|
"LandingPageRequirement",
|
|
821
|
-
"
|
|
822
|
-
"
|
|
836
|
+
"ListAccountsRequest",
|
|
837
|
+
"ListAccountsResponse",
|
|
823
838
|
"ListContentStandardsRequest",
|
|
824
839
|
"ListContentStandardsResponse",
|
|
825
840
|
"ListContentStandardsResponse1",
|
|
@@ -851,6 +866,7 @@ __all__ = [
|
|
|
851
866
|
"Metro",
|
|
852
867
|
"MetroAreaSystem",
|
|
853
868
|
"Modalities",
|
|
869
|
+
"MoovAtomPosition",
|
|
854
870
|
"MraidVersion",
|
|
855
871
|
"NotificationType",
|
|
856
872
|
"Offering",
|
|
@@ -913,7 +929,6 @@ __all__ = [
|
|
|
913
929
|
"Protocol",
|
|
914
930
|
"ProtocolEnvelope",
|
|
915
931
|
"ProtocolResponse",
|
|
916
|
-
"ProtocolsSupportedEnum",
|
|
917
932
|
"ProvidePerformanceFeedbackRequest",
|
|
918
933
|
"ProvidePerformanceFeedbackRequest1",
|
|
919
934
|
"ProvidePerformanceFeedbackRequest2",
|
|
@@ -951,6 +966,7 @@ __all__ = [
|
|
|
951
966
|
"Role",
|
|
952
967
|
"Sampling",
|
|
953
968
|
"SamplingInfo",
|
|
969
|
+
"ScanType",
|
|
954
970
|
"Scope",
|
|
955
971
|
"Security",
|
|
956
972
|
"SessionStatus",
|
|
@@ -1040,6 +1056,7 @@ __all__ = [
|
|
|
1040
1056
|
"Verdict",
|
|
1041
1057
|
"Video",
|
|
1042
1058
|
"VideoAsset",
|
|
1059
|
+
"VideoBitDepth",
|
|
1043
1060
|
"ViewThreshold",
|
|
1044
1061
|
"ViewThreshold1",
|
|
1045
1062
|
"Voice",
|
adcp/types/aliases.py
CHANGED
|
@@ -43,6 +43,11 @@ from adcp.types._generated import (
|
|
|
43
43
|
# Build creative responses
|
|
44
44
|
BuildCreativeResponse1,
|
|
45
45
|
BuildCreativeResponse2,
|
|
46
|
+
CpcPricingOption,
|
|
47
|
+
CpcvPricingOption,
|
|
48
|
+
CpmPricingOption,
|
|
49
|
+
CppPricingOption,
|
|
50
|
+
CpvPricingOption,
|
|
46
51
|
# Create media buy responses
|
|
47
52
|
CreateMediaBuyResponse1,
|
|
48
53
|
CreateMediaBuyResponse2,
|
|
@@ -55,6 +60,7 @@ from adcp.types._generated import (
|
|
|
55
60
|
# Destination types
|
|
56
61
|
Destination1,
|
|
57
62
|
Destination2,
|
|
63
|
+
FlatRatePricingOption,
|
|
58
64
|
# Preview creative requests
|
|
59
65
|
PreviewCreativeRequest1,
|
|
60
66
|
PreviewCreativeRequest2,
|
|
@@ -86,6 +92,7 @@ from adcp.types._generated import (
|
|
|
86
92
|
# VAST assets
|
|
87
93
|
VastAsset1,
|
|
88
94
|
VastAsset2,
|
|
95
|
+
VcpmPricingOption,
|
|
89
96
|
)
|
|
90
97
|
from adcp.types._generated import (
|
|
91
98
|
PublisherPropertySelector1 as PublisherPropertiesInternal,
|
|
@@ -688,6 +695,52 @@ Example:
|
|
|
688
695
|
```
|
|
689
696
|
"""
|
|
690
697
|
|
|
698
|
+
# ============================================================================
|
|
699
|
+
# PRICING OPTION UNION TYPE - For Type Hints Without RootModel Wrapper
|
|
700
|
+
# ============================================================================
|
|
701
|
+
# The generated PricingOption is a RootModel wrapper that mypy doesn't recognize
|
|
702
|
+
# as compatible with the individual variant types. This union alias provides a
|
|
703
|
+
# way to type-hint pricing options without the wrapper, fixing mypy list-item errors.
|
|
704
|
+
|
|
705
|
+
PricingOption = (
|
|
706
|
+
CpmPricingOption
|
|
707
|
+
| VcpmPricingOption
|
|
708
|
+
| CpcPricingOption
|
|
709
|
+
| CpcvPricingOption
|
|
710
|
+
| CpvPricingOption
|
|
711
|
+
| CppPricingOption
|
|
712
|
+
| FlatRatePricingOption
|
|
713
|
+
)
|
|
714
|
+
"""Union type for all pricing option variants.
|
|
715
|
+
|
|
716
|
+
Use this for type hints when constructing Product.pricing_options or any field
|
|
717
|
+
that accepts pricing options. This fixes mypy list-item errors that occur when
|
|
718
|
+
using the individual variant types.
|
|
719
|
+
|
|
720
|
+
Example:
|
|
721
|
+
```python
|
|
722
|
+
from adcp.types import Product, CpmPricingOption, PricingOption
|
|
723
|
+
|
|
724
|
+
# Type hint for a list of pricing options
|
|
725
|
+
def get_pricing(options: list[PricingOption]) -> None:
|
|
726
|
+
for opt in options:
|
|
727
|
+
print(f"Model: {opt.pricing_model}")
|
|
728
|
+
|
|
729
|
+
# Use in Product construction (no more mypy errors!)
|
|
730
|
+
product = Product(
|
|
731
|
+
product_id="test",
|
|
732
|
+
name="Test Product",
|
|
733
|
+
pricing_options=[
|
|
734
|
+
CpmPricingOption(
|
|
735
|
+
pricing_model="cpm",
|
|
736
|
+
floor_price=1.50,
|
|
737
|
+
currency="USD"
|
|
738
|
+
)
|
|
739
|
+
]
|
|
740
|
+
)
|
|
741
|
+
```
|
|
742
|
+
"""
|
|
743
|
+
|
|
691
744
|
# ============================================================================
|
|
692
745
|
# EXPORTS
|
|
693
746
|
# ============================================================================
|
|
@@ -759,4 +812,6 @@ __all__ = [
|
|
|
759
812
|
"AgentDestination",
|
|
760
813
|
# Destination union
|
|
761
814
|
"Destination",
|
|
815
|
+
# Pricing option union
|
|
816
|
+
"PricingOption",
|
|
762
817
|
]
|
adcp/types/base.py
CHANGED
|
@@ -61,13 +61,13 @@ def _get_signals_message(self: Any) -> str:
|
|
|
61
61
|
return f"Found {count} {_pluralize(count, 'signal')} available for targeting."
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
@_register_response_message("
|
|
65
|
-
def
|
|
66
|
-
|
|
67
|
-
if
|
|
68
|
-
return "No
|
|
69
|
-
count = len(
|
|
70
|
-
return f"
|
|
64
|
+
@_register_response_message("ListAccountsResponse")
|
|
65
|
+
def _list_accounts_message(self: Any) -> str:
|
|
66
|
+
accounts = getattr(self, "accounts", None)
|
|
67
|
+
if accounts is None:
|
|
68
|
+
return "No accounts found."
|
|
69
|
+
count = len(accounts)
|
|
70
|
+
return f"Found {count} accessible {_pluralize(count, 'account')}."
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
@_register_response_message("ListCreativesResponse")
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: a2ui/component.json
|
|
3
|
+
# timestamp: 2026-02-02T17:45:21+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated, Any
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class A2UiComponent(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra="allow",
|
|
16
|
+
)
|
|
17
|
+
component: Annotated[
|
|
18
|
+
dict[str, dict[str, Any]],
|
|
19
|
+
Field(description="Component definition (keyed by component type)"),
|
|
20
|
+
]
|
|
21
|
+
id: Annotated[str, Field(description="Unique identifier for this component within the surface")]
|
|
22
|
+
parentId: Annotated[
|
|
23
|
+
str | None, Field(description="ID of the parent component (null for root)")
|
|
24
|
+
] = None
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: a2ui/surface.json
|
|
3
|
+
# timestamp: 2026-02-02T17:45:21+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated, Any
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from . import component
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class A2UiSurface(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra="allow",
|
|
18
|
+
)
|
|
19
|
+
catalogId: Annotated[
|
|
20
|
+
str | None, Field(description="Component catalog to use for rendering")
|
|
21
|
+
] = "standard"
|
|
22
|
+
components: Annotated[
|
|
23
|
+
list[component.A2UiComponent],
|
|
24
|
+
Field(description="Flat list of components (adjacency list structure)"),
|
|
25
|
+
]
|
|
26
|
+
dataModel: Annotated[
|
|
27
|
+
dict[str, Any] | None, Field(description="Application data that components can bind to")
|
|
28
|
+
] = None
|
|
29
|
+
rootId: Annotated[
|
|
30
|
+
str | None,
|
|
31
|
+
Field(description="ID of the root component (if not specified, first component is root)"),
|
|
32
|
+
] = None
|
|
33
|
+
surfaceId: Annotated[str, Field(description="Unique identifier for this surface")]
|