adcp 3.1.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 +5 -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 +10 -6
- adcp/types/_generated.py +44 -27
- 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.1.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.1.0.dist-info/RECORD +0 -264
- {adcp-3.1.0.dist-info → adcp-3.2.0.dist-info}/WHEEL +0 -0
- {adcp-3.1.0.dist-info → adcp-3.2.0.dist-info}/entry_points.txt +0 -0
- {adcp-3.1.0.dist-info → adcp-3.2.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-3.1.0.dist-info → adcp-3.2.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/targeting.json
|
|
3
|
-
# timestamp: 2026-
|
|
3
|
+
# timestamp: 2026-02-02T17:45:21+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -11,15 +11,16 @@ from pydantic import ConfigDict, Field, RootModel
|
|
|
11
11
|
|
|
12
12
|
from ..enums import metro_system, postal_system
|
|
13
13
|
from . import frequency_cap as frequency_cap_1
|
|
14
|
+
from . import property_list_ref
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class GeoCountry(RootModel[str]):
|
|
17
|
-
root: Annotated[str, Field(pattern=
|
|
18
|
+
root: Annotated[str, Field(pattern="^[A-Z]{2}$")]
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
class GeoMetro(AdCPBaseModel):
|
|
21
22
|
model_config = ConfigDict(
|
|
22
|
-
extra=
|
|
23
|
+
extra="forbid",
|
|
23
24
|
)
|
|
24
25
|
system: Annotated[
|
|
25
26
|
metro_system.MetroAreaSystem,
|
|
@@ -36,7 +37,7 @@ class GeoMetro(AdCPBaseModel):
|
|
|
36
37
|
|
|
37
38
|
class GeoPostalArea(AdCPBaseModel):
|
|
38
39
|
model_config = ConfigDict(
|
|
39
|
-
extra=
|
|
40
|
+
extra="forbid",
|
|
40
41
|
)
|
|
41
42
|
system: Annotated[
|
|
42
43
|
postal_system.PostalCodeSystem,
|
|
@@ -54,18 +55,18 @@ class GeoPostalArea(AdCPBaseModel):
|
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
class GeoRegion(RootModel[str]):
|
|
57
|
-
root: Annotated[str, Field(pattern=
|
|
58
|
+
root: Annotated[str, Field(pattern="^[A-Z]{2}-[A-Z0-9]{1,3}$")]
|
|
58
59
|
|
|
59
60
|
|
|
60
61
|
class TargetingOverlay(AdCPBaseModel):
|
|
61
62
|
model_config = ConfigDict(
|
|
62
|
-
extra=
|
|
63
|
+
extra="allow",
|
|
63
64
|
)
|
|
64
65
|
axe_exclude_segment: Annotated[
|
|
65
|
-
str | None, Field(description=
|
|
66
|
+
str | None, Field(description="AXE segment ID to exclude from targeting")
|
|
66
67
|
] = None
|
|
67
68
|
axe_include_segment: Annotated[
|
|
68
|
-
str | None, Field(description=
|
|
69
|
+
str | None, Field(description="AXE segment ID to include for targeting")
|
|
69
70
|
] = None
|
|
70
71
|
frequency_cap: frequency_cap_1.FrequencyCap | None = None
|
|
71
72
|
geo_countries: Annotated[
|
|
@@ -77,13 +78,13 @@ class TargetingOverlay(AdCPBaseModel):
|
|
|
77
78
|
geo_metros: Annotated[
|
|
78
79
|
list[GeoMetro] | None,
|
|
79
80
|
Field(
|
|
80
|
-
description=
|
|
81
|
+
description="Restrict delivery to specific metro areas. Each entry specifies the classification system and target values. Seller must declare supported systems in get_adcp_capabilities."
|
|
81
82
|
),
|
|
82
83
|
] = None
|
|
83
84
|
geo_postal_areas: Annotated[
|
|
84
85
|
list[GeoPostalArea] | None,
|
|
85
86
|
Field(
|
|
86
|
-
description=
|
|
87
|
+
description="Restrict delivery to specific postal areas. Each entry specifies the postal system and target values. Seller must declare supported systems in get_adcp_capabilities."
|
|
87
88
|
),
|
|
88
89
|
] = None
|
|
89
90
|
geo_regions: Annotated[
|
|
@@ -92,3 +93,9 @@ class TargetingOverlay(AdCPBaseModel):
|
|
|
92
93
|
description="Restrict delivery to specific regions/states. ISO 3166-2 subdivision codes (e.g., 'US-CA', 'GB-SCT')."
|
|
93
94
|
),
|
|
94
95
|
] = None
|
|
96
|
+
property_list: Annotated[
|
|
97
|
+
property_list_ref.PropertyListReference | None,
|
|
98
|
+
Field(
|
|
99
|
+
description="Reference to a property list for targeting specific properties within this product. The package runs on the intersection of the product's publisher_properties and this list. Sellers SHOULD return a validation error if the product has property_targeting_allowed: false."
|
|
100
|
+
),
|
|
101
|
+
] = None
|
|
@@ -16,25 +16,25 @@ from ..core import format_id
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class AssetType(Enum):
|
|
19
|
-
image =
|
|
20
|
-
video =
|
|
21
|
-
audio =
|
|
22
|
-
text =
|
|
23
|
-
html =
|
|
24
|
-
javascript =
|
|
25
|
-
url =
|
|
19
|
+
image = "image"
|
|
20
|
+
video = "video"
|
|
21
|
+
audio = "audio"
|
|
22
|
+
text = "text"
|
|
23
|
+
html = "html"
|
|
24
|
+
javascript = "javascript"
|
|
25
|
+
url = "url"
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class Type(Enum):
|
|
29
|
-
audio =
|
|
30
|
-
video =
|
|
31
|
-
display =
|
|
32
|
-
dooh =
|
|
29
|
+
audio = "audio"
|
|
30
|
+
video = "video"
|
|
31
|
+
display = "display"
|
|
32
|
+
dooh = "dooh"
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class ListCreativeFormatsRequestCreativeAgent(AdCPBaseModel):
|
|
36
36
|
model_config = ConfigDict(
|
|
37
|
-
extra=
|
|
37
|
+
extra="allow",
|
|
38
38
|
)
|
|
39
39
|
asset_types: Annotated[
|
|
40
40
|
list[AssetType] | None,
|
|
@@ -45,44 +45,44 @@ class ListCreativeFormatsRequestCreativeAgent(AdCPBaseModel):
|
|
|
45
45
|
context: context_1.ContextObject | None = None
|
|
46
46
|
ext: ext_1.ExtensionObject | None = None
|
|
47
47
|
format_ids: Annotated[
|
|
48
|
-
list[format_id.FormatId] | None, Field(description=
|
|
48
|
+
list[format_id.FormatId] | None, Field(description="Return only these specific format IDs")
|
|
49
49
|
] = None
|
|
50
50
|
is_responsive: Annotated[
|
|
51
51
|
bool | None,
|
|
52
52
|
Field(
|
|
53
|
-
description=
|
|
53
|
+
description="Filter for responsive formats that adapt to container size. When true, returns formats without fixed dimensions."
|
|
54
54
|
),
|
|
55
55
|
] = None
|
|
56
56
|
max_height: Annotated[
|
|
57
57
|
int | None,
|
|
58
58
|
Field(
|
|
59
|
-
description=
|
|
59
|
+
description="Maximum height in pixels (inclusive). Returns formats with height <= this value. Omit for responsive/fluid formats."
|
|
60
60
|
),
|
|
61
61
|
] = None
|
|
62
62
|
max_width: Annotated[
|
|
63
63
|
int | None,
|
|
64
64
|
Field(
|
|
65
|
-
description=
|
|
65
|
+
description="Maximum width in pixels (inclusive). Returns formats with width <= this value. Omit for responsive/fluid formats."
|
|
66
66
|
),
|
|
67
67
|
] = None
|
|
68
68
|
min_height: Annotated[
|
|
69
69
|
int | None,
|
|
70
70
|
Field(
|
|
71
|
-
description=
|
|
71
|
+
description="Minimum height in pixels (inclusive). Returns formats with height >= this value."
|
|
72
72
|
),
|
|
73
73
|
] = None
|
|
74
74
|
min_width: Annotated[
|
|
75
75
|
int | None,
|
|
76
76
|
Field(
|
|
77
|
-
description=
|
|
77
|
+
description="Minimum width in pixels (inclusive). Returns formats with width >= this value."
|
|
78
78
|
),
|
|
79
79
|
] = None
|
|
80
80
|
name_search: Annotated[
|
|
81
|
-
str | None, Field(description=
|
|
81
|
+
str | None, Field(description="Search for formats by name (case-insensitive partial match)")
|
|
82
82
|
] = None
|
|
83
83
|
type: Annotated[
|
|
84
84
|
Type | None,
|
|
85
85
|
Field(
|
|
86
|
-
description=
|
|
86
|
+
description="Filter by format type (technical categories with distinct requirements)"
|
|
87
87
|
),
|
|
88
88
|
] = None
|
|
@@ -18,7 +18,7 @@ from ..enums import creative_agent_capability
|
|
|
18
18
|
|
|
19
19
|
class CreativeAgent(AdCPBaseModel):
|
|
20
20
|
agent_name: Annotated[
|
|
21
|
-
str | None, Field(description=
|
|
21
|
+
str | None, Field(description="Human-readable name for the creative agent")
|
|
22
22
|
] = None
|
|
23
23
|
agent_url: Annotated[
|
|
24
24
|
AnyUrl,
|
|
@@ -28,23 +28,23 @@ class CreativeAgent(AdCPBaseModel):
|
|
|
28
28
|
]
|
|
29
29
|
capabilities: Annotated[
|
|
30
30
|
list[creative_agent_capability.CreativeAgentCapability] | None,
|
|
31
|
-
Field(description=
|
|
31
|
+
Field(description="Capabilities this creative agent provides"),
|
|
32
32
|
] = None
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class ListCreativeFormatsResponseCreativeAgent(AdCPBaseModel):
|
|
36
36
|
model_config = ConfigDict(
|
|
37
|
-
extra=
|
|
37
|
+
extra="allow",
|
|
38
38
|
)
|
|
39
39
|
context: context_1.ContextObject | None = None
|
|
40
40
|
creative_agents: Annotated[
|
|
41
41
|
list[CreativeAgent] | None,
|
|
42
42
|
Field(
|
|
43
|
-
description=
|
|
43
|
+
description="Optional: Creative agents that provide additional formats. Buyers can recursively query these agents to discover more formats. No authentication required for list_creative_formats."
|
|
44
44
|
),
|
|
45
45
|
] = None
|
|
46
46
|
errors: Annotated[
|
|
47
|
-
list[error.Error] | None, Field(description=
|
|
47
|
+
list[error.Error] | None, Field(description="Task-specific errors and warnings")
|
|
48
48
|
] = None
|
|
49
49
|
ext: ext_1.ExtensionObject | None = None
|
|
50
50
|
formats: Annotated[
|
|
@@ -18,7 +18,7 @@ from ..enums import preview_output_format
|
|
|
18
18
|
|
|
19
19
|
class Input(AdCPBaseModel):
|
|
20
20
|
model_config = ConfigDict(
|
|
21
|
-
extra=
|
|
21
|
+
extra="allow",
|
|
22
22
|
)
|
|
23
23
|
context_description: Annotated[
|
|
24
24
|
str | None,
|
|
@@ -42,37 +42,37 @@ class Input(AdCPBaseModel):
|
|
|
42
42
|
|
|
43
43
|
class Input2(AdCPBaseModel):
|
|
44
44
|
model_config = ConfigDict(
|
|
45
|
-
extra=
|
|
45
|
+
extra="allow",
|
|
46
46
|
)
|
|
47
47
|
context_description: Annotated[
|
|
48
48
|
str | None,
|
|
49
|
-
Field(description=
|
|
49
|
+
Field(description="Natural language description of the context for AI-generated content"),
|
|
50
50
|
] = None
|
|
51
51
|
macros: Annotated[
|
|
52
|
-
dict[str, str] | None, Field(description=
|
|
52
|
+
dict[str, str] | None, Field(description="Macro values to use for this preview")
|
|
53
53
|
] = None
|
|
54
|
-
name: Annotated[str, Field(description=
|
|
54
|
+
name: Annotated[str, Field(description="Human-readable name for this input set")]
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
class PreviewCreativeRequest1(AdCPBaseModel):
|
|
58
58
|
model_config = ConfigDict(
|
|
59
|
-
extra=
|
|
59
|
+
extra="allow",
|
|
60
60
|
)
|
|
61
61
|
context: context_1.ContextObject | None = None
|
|
62
62
|
creative_manifest: Annotated[
|
|
63
63
|
creative_manifest_1.CreativeManifest,
|
|
64
64
|
Field(
|
|
65
|
-
description=
|
|
65
|
+
description="Complete creative manifest with all required assets (including promoted_offerings if required by the format)"
|
|
66
66
|
),
|
|
67
67
|
]
|
|
68
68
|
ext: ext_1.ExtensionObject | None = None
|
|
69
69
|
format_id: Annotated[
|
|
70
|
-
format_id_1.FormatId, Field(description=
|
|
70
|
+
format_id_1.FormatId, Field(description="Format identifier for rendering the preview")
|
|
71
71
|
]
|
|
72
72
|
inputs: Annotated[
|
|
73
73
|
list[Input] | None,
|
|
74
74
|
Field(
|
|
75
|
-
description=
|
|
75
|
+
description="Array of input sets for generating multiple preview variants. Each input set defines macros and context values for one preview rendering. If not provided, creative agent will generate default previews."
|
|
76
76
|
),
|
|
77
77
|
] = None
|
|
78
78
|
output_format: Annotated[
|
|
@@ -82,28 +82,28 @@ class PreviewCreativeRequest1(AdCPBaseModel):
|
|
|
82
82
|
),
|
|
83
83
|
] = preview_output_format.PreviewOutputFormat.url
|
|
84
84
|
request_type: Annotated[
|
|
85
|
-
Literal[
|
|
86
|
-
Field(description=
|
|
85
|
+
Literal["single"],
|
|
86
|
+
Field(description="Discriminator indicating this is a single preview request"),
|
|
87
87
|
]
|
|
88
88
|
template_id: Annotated[
|
|
89
|
-
str | None, Field(description=
|
|
89
|
+
str | None, Field(description="Specific template ID for custom format rendering")
|
|
90
90
|
] = None
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
class Request(AdCPBaseModel):
|
|
94
94
|
model_config = ConfigDict(
|
|
95
|
-
extra=
|
|
95
|
+
extra="allow",
|
|
96
96
|
)
|
|
97
97
|
creative_manifest: Annotated[
|
|
98
98
|
creative_manifest_1.CreativeManifest,
|
|
99
|
-
Field(description=
|
|
99
|
+
Field(description="Complete creative manifest with all required assets"),
|
|
100
100
|
]
|
|
101
101
|
format_id: Annotated[
|
|
102
|
-
format_id_1.FormatId, Field(description=
|
|
102
|
+
format_id_1.FormatId, Field(description="Format identifier for rendering the preview")
|
|
103
103
|
]
|
|
104
104
|
inputs: Annotated[
|
|
105
105
|
list[Input2] | None,
|
|
106
|
-
Field(description=
|
|
106
|
+
Field(description="Array of input sets for generating multiple preview variants"),
|
|
107
107
|
] = None
|
|
108
108
|
output_format: Annotated[
|
|
109
109
|
preview_output_format.PreviewOutputFormat | None,
|
|
@@ -112,13 +112,13 @@ class Request(AdCPBaseModel):
|
|
|
112
112
|
),
|
|
113
113
|
] = preview_output_format.PreviewOutputFormat.url
|
|
114
114
|
template_id: Annotated[
|
|
115
|
-
str | None, Field(description=
|
|
115
|
+
str | None, Field(description="Specific template ID for custom format rendering")
|
|
116
116
|
] = None
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
class PreviewCreativeRequest2(AdCPBaseModel):
|
|
120
120
|
model_config = ConfigDict(
|
|
121
|
-
extra=
|
|
121
|
+
extra="allow",
|
|
122
122
|
)
|
|
123
123
|
context: context_1.ContextObject | None = None
|
|
124
124
|
ext: ext_1.ExtensionObject | None = None
|
|
@@ -129,13 +129,13 @@ class PreviewCreativeRequest2(AdCPBaseModel):
|
|
|
129
129
|
),
|
|
130
130
|
] = preview_output_format.PreviewOutputFormat.url
|
|
131
131
|
request_type: Annotated[
|
|
132
|
-
Literal[
|
|
133
|
-
Field(description=
|
|
132
|
+
Literal["batch"],
|
|
133
|
+
Field(description="Discriminator indicating this is a batch preview request"),
|
|
134
134
|
]
|
|
135
135
|
requests: Annotated[
|
|
136
136
|
list[Request],
|
|
137
137
|
Field(
|
|
138
|
-
description=
|
|
138
|
+
description="Array of preview requests (1-50 items). Each follows the single request structure.",
|
|
139
139
|
max_length=50,
|
|
140
140
|
min_length=1,
|
|
141
141
|
),
|
|
@@ -146,8 +146,8 @@ class PreviewCreativeRequest(RootModel[PreviewCreativeRequest1 | PreviewCreative
|
|
|
146
146
|
root: Annotated[
|
|
147
147
|
PreviewCreativeRequest1 | PreviewCreativeRequest2,
|
|
148
148
|
Field(
|
|
149
|
-
discriminator=
|
|
150
|
-
description=
|
|
151
|
-
title=
|
|
149
|
+
discriminator="request_type",
|
|
150
|
+
description="Request to generate previews of one or more creative manifests. Accepts either a single creative request or an array of requests for batch processing.",
|
|
151
|
+
title="Preview Creative Request",
|
|
152
152
|
),
|
|
153
153
|
]
|
|
@@ -16,12 +16,12 @@ from . import preview_render
|
|
|
16
16
|
|
|
17
17
|
class Input(AdCPBaseModel):
|
|
18
18
|
context_description: Annotated[
|
|
19
|
-
str | None, Field(description=
|
|
19
|
+
str | None, Field(description="Context description applied to this variant")
|
|
20
20
|
] = None
|
|
21
21
|
macros: Annotated[
|
|
22
|
-
dict[str, str] | None, Field(description=
|
|
22
|
+
dict[str, str] | None, Field(description="Macro values applied to this variant")
|
|
23
23
|
] = None
|
|
24
|
-
name: Annotated[str, Field(description=
|
|
24
|
+
name: Annotated[str, Field(description="Human-readable name for this variant")]
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class Error(AdCPBaseModel):
|
|
@@ -31,8 +31,8 @@ class Error(AdCPBaseModel):
|
|
|
31
31
|
description="Error code (e.g., 'invalid_manifest', 'unsupported_format', 'missing_assets')"
|
|
32
32
|
),
|
|
33
33
|
]
|
|
34
|
-
details: Annotated[dict[str, Any] | None, Field(description=
|
|
35
|
-
message: Annotated[str, Field(description=
|
|
34
|
+
details: Annotated[dict[str, Any] | None, Field(description="Additional error context")] = None
|
|
35
|
+
message: Annotated[str, Field(description="Human-readable error message")]
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
class Input4(AdCPBaseModel):
|
|
@@ -45,14 +45,14 @@ class Preview(AdCPBaseModel):
|
|
|
45
45
|
input: Annotated[
|
|
46
46
|
Input,
|
|
47
47
|
Field(
|
|
48
|
-
description=
|
|
48
|
+
description="The input parameters that generated this preview variant. Echoes back the request input or shows defaults used."
|
|
49
49
|
),
|
|
50
50
|
]
|
|
51
|
-
preview_id: Annotated[str, Field(description=
|
|
51
|
+
preview_id: Annotated[str, Field(description="Unique identifier for this preview variant")]
|
|
52
52
|
renders: Annotated[
|
|
53
53
|
list[preview_render.PreviewRender],
|
|
54
54
|
Field(
|
|
55
|
-
description=
|
|
55
|
+
description="Array of rendered pieces for this preview variant. Most formats render as a single piece. Companion ad formats (video + banner), multi-placement formats, and adaptive formats render as multiple pieces.",
|
|
56
56
|
min_length=1,
|
|
57
57
|
),
|
|
58
58
|
]
|
|
@@ -60,29 +60,29 @@ class Preview(AdCPBaseModel):
|
|
|
60
60
|
|
|
61
61
|
class PreviewCreativeResponse1(AdCPBaseModel):
|
|
62
62
|
model_config = ConfigDict(
|
|
63
|
-
extra=
|
|
63
|
+
extra="allow",
|
|
64
64
|
)
|
|
65
65
|
context: context_1.ContextObject | None = None
|
|
66
66
|
expires_at: Annotated[
|
|
67
|
-
AwareDatetime, Field(description=
|
|
67
|
+
AwareDatetime, Field(description="ISO 8601 timestamp when preview links expire")
|
|
68
68
|
]
|
|
69
69
|
ext: ext_1.ExtensionObject | None = None
|
|
70
70
|
interactive_url: Annotated[
|
|
71
71
|
AnyUrl | None,
|
|
72
72
|
Field(
|
|
73
|
-
description=
|
|
73
|
+
description="Optional URL to an interactive testing page that shows all preview variants with controls to switch between them, modify macro values, and test different scenarios."
|
|
74
74
|
),
|
|
75
75
|
] = None
|
|
76
76
|
previews: Annotated[
|
|
77
77
|
list[Preview],
|
|
78
78
|
Field(
|
|
79
|
-
description=
|
|
79
|
+
description="Array of preview variants. Each preview corresponds to an input set from the request. If no inputs were provided, returns a single default preview.",
|
|
80
80
|
min_length=1,
|
|
81
81
|
),
|
|
82
82
|
]
|
|
83
83
|
response_type: Annotated[
|
|
84
|
-
Literal[
|
|
85
|
-
Field(description=
|
|
84
|
+
Literal["single"],
|
|
85
|
+
Field(description="Discriminator indicating this is a single preview response"),
|
|
86
86
|
]
|
|
87
87
|
|
|
88
88
|
|
|
@@ -97,16 +97,16 @@ class Response(AdCPBaseModel):
|
|
|
97
97
|
interactive_url: AnyUrl | None = None
|
|
98
98
|
previews: Annotated[
|
|
99
99
|
list[Preview1],
|
|
100
|
-
Field(description=
|
|
100
|
+
Field(description="Array of preview variants for this creative", min_length=1),
|
|
101
101
|
]
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
class Results(AdCPBaseModel):
|
|
105
|
-
error: Annotated[Error | None, Field(description=
|
|
105
|
+
error: Annotated[Error | None, Field(description="Error information for failed requests")] = (
|
|
106
106
|
None
|
|
107
107
|
)
|
|
108
|
-
response: Annotated[Response, Field(description=
|
|
109
|
-
success: Annotated[Literal[True], Field(description=
|
|
108
|
+
response: Annotated[Response, Field(description="Preview response for successful requests")]
|
|
109
|
+
success: Annotated[Literal[True], Field(description="Whether this preview request succeeded")]
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
class Preview2(Preview1):
|
|
@@ -118,32 +118,32 @@ class Response1(AdCPBaseModel):
|
|
|
118
118
|
interactive_url: AnyUrl | None = None
|
|
119
119
|
previews: Annotated[
|
|
120
120
|
list[Preview2],
|
|
121
|
-
Field(description=
|
|
121
|
+
Field(description="Array of preview variants for this creative", min_length=1),
|
|
122
122
|
]
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
class Results1(AdCPBaseModel):
|
|
126
|
-
error: Annotated[Error, Field(description=
|
|
126
|
+
error: Annotated[Error, Field(description="Error information for failed requests")]
|
|
127
127
|
response: Annotated[
|
|
128
|
-
Response1 | None, Field(description=
|
|
128
|
+
Response1 | None, Field(description="Preview response for successful requests")
|
|
129
129
|
] = None
|
|
130
|
-
success: Annotated[Literal[False], Field(description=
|
|
130
|
+
success: Annotated[Literal[False], Field(description="Whether this preview request succeeded")]
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
class PreviewCreativeResponse2(AdCPBaseModel):
|
|
134
134
|
model_config = ConfigDict(
|
|
135
|
-
extra=
|
|
135
|
+
extra="allow",
|
|
136
136
|
)
|
|
137
137
|
context: context_1.ContextObject | None = None
|
|
138
138
|
ext: ext_1.ExtensionObject | None = None
|
|
139
139
|
response_type: Annotated[
|
|
140
|
-
Literal[
|
|
141
|
-
Field(description=
|
|
140
|
+
Literal["batch"],
|
|
141
|
+
Field(description="Discriminator indicating this is a batch preview response"),
|
|
142
142
|
]
|
|
143
143
|
results: Annotated[
|
|
144
144
|
list[Results | Results1],
|
|
145
145
|
Field(
|
|
146
|
-
description=
|
|
146
|
+
description="Array of preview results corresponding to each request in the same order. results[0] is the result for requests[0], results[1] for requests[1], etc. Order is guaranteed even when some requests fail. Each result contains either a successful preview response or an error.",
|
|
147
147
|
min_length=1,
|
|
148
148
|
),
|
|
149
149
|
]
|
|
@@ -153,7 +153,7 @@ class PreviewCreativeResponse(RootModel[PreviewCreativeResponse1 | PreviewCreati
|
|
|
153
153
|
root: Annotated[
|
|
154
154
|
PreviewCreativeResponse1 | PreviewCreativeResponse2,
|
|
155
155
|
Field(
|
|
156
|
-
description=
|
|
157
|
-
title=
|
|
156
|
+
description="Response containing preview links for one or more creatives. Format matches the request: single preview response for single requests, batch results for batch requests.",
|
|
157
|
+
title="Preview Creative Response",
|
|
158
158
|
),
|
|
159
159
|
]
|
|
@@ -17,7 +17,7 @@ class Dimensions(AdCPBaseModel):
|
|
|
17
17
|
|
|
18
18
|
class Embedding(AdCPBaseModel):
|
|
19
19
|
csp_policy: Annotated[
|
|
20
|
-
str | None, Field(description=
|
|
20
|
+
str | None, Field(description="Content Security Policy requirements for embedding")
|
|
21
21
|
] = None
|
|
22
22
|
recommended_sandbox: Annotated[
|
|
23
23
|
str | None,
|
|
@@ -26,35 +26,35 @@ class Embedding(AdCPBaseModel):
|
|
|
26
26
|
),
|
|
27
27
|
] = None
|
|
28
28
|
requires_https: Annotated[
|
|
29
|
-
bool | None, Field(description=
|
|
29
|
+
bool | None, Field(description="Whether this output requires HTTPS for secure embedding")
|
|
30
30
|
] = None
|
|
31
31
|
supports_fullscreen: Annotated[
|
|
32
|
-
bool | None, Field(description=
|
|
32
|
+
bool | None, Field(description="Whether this output supports fullscreen mode")
|
|
33
33
|
] = None
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class PreviewRender1(AdCPBaseModel):
|
|
37
37
|
model_config = ConfigDict(
|
|
38
|
-
extra=
|
|
38
|
+
extra="allow",
|
|
39
39
|
)
|
|
40
40
|
dimensions: Annotated[
|
|
41
|
-
Dimensions | None, Field(description=
|
|
41
|
+
Dimensions | None, Field(description="Dimensions for this rendered piece")
|
|
42
42
|
] = None
|
|
43
43
|
embedding: Annotated[
|
|
44
44
|
Embedding | None,
|
|
45
|
-
Field(description=
|
|
45
|
+
Field(description="Optional security and embedding metadata for safe iframe integration"),
|
|
46
46
|
] = None
|
|
47
47
|
output_format: Annotated[
|
|
48
|
-
Literal[
|
|
48
|
+
Literal["url"], Field(description="Discriminator indicating preview_url is provided")
|
|
49
49
|
]
|
|
50
50
|
preview_url: Annotated[
|
|
51
51
|
AnyUrl,
|
|
52
52
|
Field(
|
|
53
|
-
description=
|
|
53
|
+
description="URL to an HTML page that renders this piece. Can be embedded in an iframe."
|
|
54
54
|
),
|
|
55
55
|
]
|
|
56
56
|
render_id: Annotated[
|
|
57
|
-
str, Field(description=
|
|
57
|
+
str, Field(description="Unique identifier for this rendered piece within the variant")
|
|
58
58
|
]
|
|
59
59
|
role: Annotated[
|
|
60
60
|
str,
|
|
@@ -66,25 +66,25 @@ class PreviewRender1(AdCPBaseModel):
|
|
|
66
66
|
|
|
67
67
|
class PreviewRender2(AdCPBaseModel):
|
|
68
68
|
model_config = ConfigDict(
|
|
69
|
-
extra=
|
|
69
|
+
extra="allow",
|
|
70
70
|
)
|
|
71
71
|
dimensions: Annotated[
|
|
72
|
-
Dimensions | None, Field(description=
|
|
72
|
+
Dimensions | None, Field(description="Dimensions for this rendered piece")
|
|
73
73
|
] = None
|
|
74
74
|
embedding: Annotated[
|
|
75
|
-
Embedding | None, Field(description=
|
|
75
|
+
Embedding | None, Field(description="Optional security and embedding metadata")
|
|
76
76
|
] = None
|
|
77
77
|
output_format: Annotated[
|
|
78
|
-
Literal[
|
|
78
|
+
Literal["html"], Field(description="Discriminator indicating preview_html is provided")
|
|
79
79
|
]
|
|
80
80
|
preview_html: Annotated[
|
|
81
81
|
str,
|
|
82
82
|
Field(
|
|
83
|
-
description=
|
|
83
|
+
description="Raw HTML for this rendered piece. Can be embedded directly in the page without iframe. Security warning: Only use with trusted creative agents as this bypasses iframe sandboxing."
|
|
84
84
|
),
|
|
85
85
|
]
|
|
86
86
|
render_id: Annotated[
|
|
87
|
-
str, Field(description=
|
|
87
|
+
str, Field(description="Unique identifier for this rendered piece within the variant")
|
|
88
88
|
]
|
|
89
89
|
role: Annotated[
|
|
90
90
|
str,
|
|
@@ -96,35 +96,35 @@ class PreviewRender2(AdCPBaseModel):
|
|
|
96
96
|
|
|
97
97
|
class PreviewRender3(AdCPBaseModel):
|
|
98
98
|
model_config = ConfigDict(
|
|
99
|
-
extra=
|
|
99
|
+
extra="allow",
|
|
100
100
|
)
|
|
101
101
|
dimensions: Annotated[
|
|
102
|
-
Dimensions | None, Field(description=
|
|
102
|
+
Dimensions | None, Field(description="Dimensions for this rendered piece")
|
|
103
103
|
] = None
|
|
104
104
|
embedding: Annotated[
|
|
105
105
|
Embedding | None,
|
|
106
|
-
Field(description=
|
|
106
|
+
Field(description="Optional security and embedding metadata for safe iframe integration"),
|
|
107
107
|
] = None
|
|
108
108
|
output_format: Annotated[
|
|
109
|
-
Literal[
|
|
109
|
+
Literal["both"],
|
|
110
110
|
Field(
|
|
111
|
-
description=
|
|
111
|
+
description="Discriminator indicating both preview_url and preview_html are provided"
|
|
112
112
|
),
|
|
113
113
|
]
|
|
114
114
|
preview_html: Annotated[
|
|
115
115
|
str,
|
|
116
116
|
Field(
|
|
117
|
-
description=
|
|
117
|
+
description="Raw HTML for this rendered piece. Can be embedded directly in the page without iframe. Security warning: Only use with trusted creative agents as this bypasses iframe sandboxing."
|
|
118
118
|
),
|
|
119
119
|
]
|
|
120
120
|
preview_url: Annotated[
|
|
121
121
|
AnyUrl,
|
|
122
122
|
Field(
|
|
123
|
-
description=
|
|
123
|
+
description="URL to an HTML page that renders this piece. Can be embedded in an iframe."
|
|
124
124
|
),
|
|
125
125
|
]
|
|
126
126
|
render_id: Annotated[
|
|
127
|
-
str, Field(description=
|
|
127
|
+
str, Field(description="Unique identifier for this rendered piece within the variant")
|
|
128
128
|
]
|
|
129
129
|
role: Annotated[
|
|
130
130
|
str,
|
|
@@ -138,7 +138,7 @@ class PreviewRender(RootModel[PreviewRender1 | PreviewRender2 | PreviewRender3])
|
|
|
138
138
|
root: Annotated[
|
|
139
139
|
PreviewRender1 | PreviewRender2 | PreviewRender3,
|
|
140
140
|
Field(
|
|
141
|
-
description=
|
|
142
|
-
title=
|
|
141
|
+
description="A single rendered piece of a creative preview with discriminated output format",
|
|
142
|
+
title="Preview Render",
|
|
143
143
|
),
|
|
144
144
|
]
|