adcp 2.12.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/__init__.py +364 -0
- adcp/__main__.py +440 -0
- adcp/adagents.py +642 -0
- adcp/client.py +1057 -0
- adcp/config.py +82 -0
- adcp/exceptions.py +185 -0
- adcp/protocols/__init__.py +9 -0
- adcp/protocols/a2a.py +484 -0
- adcp/protocols/base.py +190 -0
- adcp/protocols/mcp.py +440 -0
- adcp/py.typed +0 -0
- adcp/simple.py +451 -0
- adcp/testing/__init__.py +53 -0
- adcp/testing/test_helpers.py +311 -0
- adcp/types/__init__.py +561 -0
- adcp/types/_generated.py +237 -0
- adcp/types/aliases.py +748 -0
- adcp/types/base.py +26 -0
- adcp/types/core.py +174 -0
- adcp/types/generated_poc/__init__.py +3 -0
- adcp/types/generated_poc/adagents.py +411 -0
- adcp/types/generated_poc/core/__init__.py +3 -0
- adcp/types/generated_poc/core/activation_key.py +30 -0
- adcp/types/generated_poc/core/assets/__init__.py +3 -0
- adcp/types/generated_poc/core/assets/audio_asset.py +26 -0
- adcp/types/generated_poc/core/assets/css_asset.py +20 -0
- adcp/types/generated_poc/core/assets/daast_asset.py +61 -0
- adcp/types/generated_poc/core/assets/html_asset.py +18 -0
- adcp/types/generated_poc/core/assets/image_asset.py +19 -0
- adcp/types/generated_poc/core/assets/javascript_asset.py +23 -0
- adcp/types/generated_poc/core/assets/text_asset.py +20 -0
- adcp/types/generated_poc/core/assets/url_asset.py +28 -0
- adcp/types/generated_poc/core/assets/vast_asset.py +63 -0
- adcp/types/generated_poc/core/assets/video_asset.py +24 -0
- adcp/types/generated_poc/core/assets/webhook_asset.py +53 -0
- adcp/types/generated_poc/core/brand_manifest.py +201 -0
- adcp/types/generated_poc/core/context.py +15 -0
- adcp/types/generated_poc/core/creative_asset.py +102 -0
- adcp/types/generated_poc/core/creative_assignment.py +27 -0
- adcp/types/generated_poc/core/creative_filters.py +86 -0
- adcp/types/generated_poc/core/creative_manifest.py +68 -0
- adcp/types/generated_poc/core/creative_policy.py +28 -0
- adcp/types/generated_poc/core/delivery_metrics.py +111 -0
- adcp/types/generated_poc/core/deployment.py +78 -0
- adcp/types/generated_poc/core/destination.py +43 -0
- adcp/types/generated_poc/core/dimensions.py +18 -0
- adcp/types/generated_poc/core/error.py +29 -0
- adcp/types/generated_poc/core/ext.py +15 -0
- adcp/types/generated_poc/core/format.py +260 -0
- adcp/types/generated_poc/core/format_id.py +50 -0
- adcp/types/generated_poc/core/frequency_cap.py +19 -0
- adcp/types/generated_poc/core/measurement.py +40 -0
- adcp/types/generated_poc/core/media_buy.py +40 -0
- adcp/types/generated_poc/core/package.py +68 -0
- adcp/types/generated_poc/core/performance_feedback.py +78 -0
- adcp/types/generated_poc/core/placement.py +37 -0
- adcp/types/generated_poc/core/product.py +164 -0
- adcp/types/generated_poc/core/product_filters.py +97 -0
- adcp/types/generated_poc/core/promoted_offerings.py +102 -0
- adcp/types/generated_poc/core/promoted_products.py +38 -0
- adcp/types/generated_poc/core/property.py +64 -0
- adcp/types/generated_poc/core/property_id.py +21 -0
- adcp/types/generated_poc/core/property_tag.py +21 -0
- adcp/types/generated_poc/core/protocol_envelope.py +61 -0
- adcp/types/generated_poc/core/publisher_property_selector.py +75 -0
- adcp/types/generated_poc/core/push_notification_config.py +51 -0
- adcp/types/generated_poc/core/reporting_capabilities.py +51 -0
- adcp/types/generated_poc/core/response.py +24 -0
- adcp/types/generated_poc/core/signal_filters.py +29 -0
- adcp/types/generated_poc/core/sub_asset.py +55 -0
- adcp/types/generated_poc/core/targeting.py +53 -0
- adcp/types/generated_poc/core/webhook_payload.py +96 -0
- adcp/types/generated_poc/creative/__init__.py +3 -0
- adcp/types/generated_poc/creative/list_creative_formats_request.py +88 -0
- adcp/types/generated_poc/creative/list_creative_formats_response.py +55 -0
- adcp/types/generated_poc/creative/preview_creative_request.py +153 -0
- adcp/types/generated_poc/creative/preview_creative_response.py +169 -0
- adcp/types/generated_poc/creative/preview_render.py +152 -0
- adcp/types/generated_poc/enums/__init__.py +3 -0
- adcp/types/generated_poc/enums/adcp_domain.py +12 -0
- adcp/types/generated_poc/enums/asset_content_type.py +23 -0
- adcp/types/generated_poc/enums/auth_scheme.py +12 -0
- adcp/types/generated_poc/enums/available_metric.py +19 -0
- adcp/types/generated_poc/enums/channels.py +19 -0
- adcp/types/generated_poc/enums/co_branding_requirement.py +13 -0
- adcp/types/generated_poc/enums/creative_action.py +15 -0
- adcp/types/generated_poc/enums/creative_agent_capability.py +14 -0
- adcp/types/generated_poc/enums/creative_sort_field.py +16 -0
- adcp/types/generated_poc/enums/creative_status.py +14 -0
- adcp/types/generated_poc/enums/daast_tracking_event.py +21 -0
- adcp/types/generated_poc/enums/daast_version.py +12 -0
- adcp/types/generated_poc/enums/delivery_type.py +12 -0
- adcp/types/generated_poc/enums/dimension_unit.py +14 -0
- adcp/types/generated_poc/enums/feed_format.py +13 -0
- adcp/types/generated_poc/enums/feedback_source.py +14 -0
- adcp/types/generated_poc/enums/format_category.py +17 -0
- adcp/types/generated_poc/enums/format_id_parameter.py +12 -0
- adcp/types/generated_poc/enums/frequency_cap_scope.py +16 -0
- adcp/types/generated_poc/enums/history_entry_type.py +12 -0
- adcp/types/generated_poc/enums/http_method.py +12 -0
- adcp/types/generated_poc/enums/identifier_types.py +29 -0
- adcp/types/generated_poc/enums/javascript_module_type.py +13 -0
- adcp/types/generated_poc/enums/landing_page_requirement.py +13 -0
- adcp/types/generated_poc/enums/markdown_flavor.py +12 -0
- adcp/types/generated_poc/enums/media_buy_status.py +14 -0
- adcp/types/generated_poc/enums/metric_type.py +18 -0
- adcp/types/generated_poc/enums/notification_type.py +14 -0
- adcp/types/generated_poc/enums/pacing.py +13 -0
- adcp/types/generated_poc/enums/preview_output_format.py +12 -0
- adcp/types/generated_poc/enums/pricing_model.py +17 -0
- adcp/types/generated_poc/enums/property_type.py +17 -0
- adcp/types/generated_poc/enums/publisher_identifier_types.py +15 -0
- adcp/types/generated_poc/enums/reporting_frequency.py +13 -0
- adcp/types/generated_poc/enums/signal_catalog_type.py +13 -0
- adcp/types/generated_poc/enums/sort_direction.py +12 -0
- adcp/types/generated_poc/enums/standard_format_ids.py +45 -0
- adcp/types/generated_poc/enums/task_status.py +19 -0
- adcp/types/generated_poc/enums/task_type.py +15 -0
- adcp/types/generated_poc/enums/update_frequency.py +14 -0
- adcp/types/generated_poc/enums/url_asset_type.py +13 -0
- adcp/types/generated_poc/enums/validation_mode.py +12 -0
- adcp/types/generated_poc/enums/vast_tracking_event.py +26 -0
- adcp/types/generated_poc/enums/vast_version.py +15 -0
- adcp/types/generated_poc/enums/webhook_response_type.py +14 -0
- adcp/types/generated_poc/enums/webhook_security_method.py +13 -0
- adcp/types/generated_poc/media_buy/__init__.py +3 -0
- adcp/types/generated_poc/media_buy/build_creative_request.py +41 -0
- adcp/types/generated_poc/media_buy/build_creative_response.py +51 -0
- adcp/types/generated_poc/media_buy/create_media_buy_request.py +94 -0
- adcp/types/generated_poc/media_buy/create_media_buy_response.py +56 -0
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_request.py +47 -0
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_response.py +235 -0
- adcp/types/generated_poc/media_buy/get_products_request.py +48 -0
- adcp/types/generated_poc/media_buy/get_products_response.py +28 -0
- adcp/types/generated_poc/media_buy/list_authorized_properties_request.py +38 -0
- adcp/types/generated_poc/media_buy/list_authorized_properties_response.py +84 -0
- adcp/types/generated_poc/media_buy/list_creative_formats_request.py +74 -0
- adcp/types/generated_poc/media_buy/list_creative_formats_response.py +56 -0
- adcp/types/generated_poc/media_buy/list_creatives_request.py +76 -0
- adcp/types/generated_poc/media_buy/list_creatives_response.py +214 -0
- adcp/types/generated_poc/media_buy/package_request.py +63 -0
- adcp/types/generated_poc/media_buy/provide_performance_feedback_request.py +125 -0
- adcp/types/generated_poc/media_buy/provide_performance_feedback_response.py +53 -0
- adcp/types/generated_poc/media_buy/sync_creatives_request.py +63 -0
- adcp/types/generated_poc/media_buy/sync_creatives_response.py +105 -0
- adcp/types/generated_poc/media_buy/update_media_buy_request.py +195 -0
- adcp/types/generated_poc/media_buy/update_media_buy_response.py +55 -0
- adcp/types/generated_poc/pricing_options/__init__.py +3 -0
- adcp/types/generated_poc/pricing_options/cpc_option.py +43 -0
- adcp/types/generated_poc/pricing_options/cpcv_option.py +45 -0
- adcp/types/generated_poc/pricing_options/cpm_auction_option.py +58 -0
- adcp/types/generated_poc/pricing_options/cpm_fixed_option.py +43 -0
- adcp/types/generated_poc/pricing_options/cpp_option.py +64 -0
- adcp/types/generated_poc/pricing_options/cpv_option.py +77 -0
- adcp/types/generated_poc/pricing_options/flat_rate_option.py +93 -0
- adcp/types/generated_poc/pricing_options/vcpm_auction_option.py +61 -0
- adcp/types/generated_poc/pricing_options/vcpm_fixed_option.py +47 -0
- adcp/types/generated_poc/protocols/__init__.py +3 -0
- adcp/types/generated_poc/protocols/adcp_extension.py +37 -0
- adcp/types/generated_poc/signals/__init__.py +3 -0
- adcp/types/generated_poc/signals/activate_signal_request.py +32 -0
- adcp/types/generated_poc/signals/activate_signal_response.py +51 -0
- adcp/types/generated_poc/signals/get_signals_request.py +53 -0
- adcp/types/generated_poc/signals/get_signals_response.py +59 -0
- adcp/utils/__init__.py +7 -0
- adcp/utils/operation_id.py +15 -0
- adcp/utils/preview_cache.py +491 -0
- adcp/utils/response_parser.py +171 -0
- adcp/validation.py +172 -0
- adcp-2.12.0.data/data/ADCP_VERSION +1 -0
- adcp-2.12.0.dist-info/METADATA +992 -0
- adcp-2.12.0.dist-info/RECORD +176 -0
- adcp-2.12.0.dist-info/WHEEL +5 -0
- adcp-2.12.0.dist-info/entry_points.txt +2 -0
- adcp-2.12.0.dist-info/licenses/LICENSE +17 -0
- adcp-2.12.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/format.json
|
|
3
|
+
# timestamp: 2025-11-22T19:54:03+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated, Any, Literal
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import AnyUrl, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..enums import asset_content_type, format_category, format_id_parameter
|
|
13
|
+
from . import format_id as format_id_1
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AssetsRequired(AdCPBaseModel):
|
|
17
|
+
asset_id: Annotated[
|
|
18
|
+
str,
|
|
19
|
+
Field(
|
|
20
|
+
description='Unique identifier for this asset. Creative manifests MUST use this exact value as the key in the assets object.'
|
|
21
|
+
),
|
|
22
|
+
]
|
|
23
|
+
asset_role: Annotated[
|
|
24
|
+
str | None,
|
|
25
|
+
Field(
|
|
26
|
+
description="Optional descriptive label for this asset's purpose (e.g., 'hero_image', 'logo'). Not used for referencing assets in manifests—use asset_id instead. This field is for human-readable documentation and UI display only."
|
|
27
|
+
),
|
|
28
|
+
] = None
|
|
29
|
+
asset_type: Annotated[asset_content_type.AssetContentType, Field(description='Type of asset')]
|
|
30
|
+
item_type: Annotated[
|
|
31
|
+
Literal['individual'],
|
|
32
|
+
Field(description='Discriminator indicating this is an individual asset requirement'),
|
|
33
|
+
]
|
|
34
|
+
required: Annotated[bool | None, Field(description='Whether this asset is required')] = None
|
|
35
|
+
requirements: Annotated[
|
|
36
|
+
dict[str, Any] | None,
|
|
37
|
+
Field(
|
|
38
|
+
description='Technical requirements for this asset (dimensions, file size, duration, etc.). For template formats, use parameters_from_format_id: true to indicate asset parameters must match the format_id parameters (width/height/unit and/or duration_ms).'
|
|
39
|
+
),
|
|
40
|
+
] = None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class Asset(AdCPBaseModel):
|
|
44
|
+
asset_id: Annotated[str, Field(description='Identifier for this asset within the group')]
|
|
45
|
+
asset_role: Annotated[
|
|
46
|
+
str | None,
|
|
47
|
+
Field(
|
|
48
|
+
description="Optional descriptive label for this asset's purpose (e.g., 'hero_image', 'logo'). Not used for referencing assets in manifests—use asset_id instead. This field is for human-readable documentation and UI display only."
|
|
49
|
+
),
|
|
50
|
+
] = None
|
|
51
|
+
asset_type: Annotated[asset_content_type.AssetContentType, Field(description='Type of asset')]
|
|
52
|
+
required: Annotated[
|
|
53
|
+
bool | None, Field(description='Whether this asset is required in each repetition')
|
|
54
|
+
] = None
|
|
55
|
+
requirements: Annotated[
|
|
56
|
+
dict[str, Any] | None,
|
|
57
|
+
Field(
|
|
58
|
+
description='Technical requirements for this asset. For template formats, use parameters_from_format_id: true to indicate asset parameters must match the format_id parameters (width/height/unit and/or duration_ms).'
|
|
59
|
+
),
|
|
60
|
+
] = None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class AssetsRequired1(AdCPBaseModel):
|
|
64
|
+
asset_group_id: Annotated[
|
|
65
|
+
str, Field(description="Identifier for this asset group (e.g., 'product', 'slide', 'card')")
|
|
66
|
+
]
|
|
67
|
+
assets: Annotated[list[Asset], Field(description='Assets within each repetition of this group')]
|
|
68
|
+
item_type: Annotated[
|
|
69
|
+
Literal['repeatable_group'],
|
|
70
|
+
Field(description='Discriminator indicating this is a repeatable asset group'),
|
|
71
|
+
]
|
|
72
|
+
max_count: Annotated[int, Field(description='Maximum number of repetitions allowed', ge=1)]
|
|
73
|
+
min_count: Annotated[int, Field(description='Minimum number of repetitions required', ge=1)]
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class Responsive(AdCPBaseModel):
|
|
77
|
+
height: bool
|
|
78
|
+
width: bool
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class Dimensions(AdCPBaseModel):
|
|
82
|
+
aspect_ratio: Annotated[
|
|
83
|
+
str | None,
|
|
84
|
+
Field(
|
|
85
|
+
description="Fixed aspect ratio constraint (e.g., '16:9', '4:3', '1:1')",
|
|
86
|
+
pattern='^\\d+:\\d+$',
|
|
87
|
+
),
|
|
88
|
+
] = None
|
|
89
|
+
height: Annotated[int | None, Field(description='Fixed height in pixels', ge=1)] = None
|
|
90
|
+
max_height: Annotated[
|
|
91
|
+
int | None, Field(description='Maximum height in pixels for responsive renders', ge=1)
|
|
92
|
+
] = None
|
|
93
|
+
max_width: Annotated[
|
|
94
|
+
int | None, Field(description='Maximum width in pixels for responsive renders', ge=1)
|
|
95
|
+
] = None
|
|
96
|
+
min_height: Annotated[
|
|
97
|
+
int | None, Field(description='Minimum height in pixels for responsive renders', ge=1)
|
|
98
|
+
] = None
|
|
99
|
+
min_width: Annotated[
|
|
100
|
+
int | None, Field(description='Minimum width in pixels for responsive renders', ge=1)
|
|
101
|
+
] = None
|
|
102
|
+
responsive: Annotated[
|
|
103
|
+
Responsive | None, Field(description='Indicates which dimensions are responsive/fluid')
|
|
104
|
+
] = None
|
|
105
|
+
width: Annotated[int | None, Field(description='Fixed width in pixels', ge=1)] = None
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class Renders(AdCPBaseModel):
|
|
109
|
+
dimensions: Annotated[
|
|
110
|
+
Dimensions, Field(description='Dimensions for this rendered piece (in pixels)')
|
|
111
|
+
]
|
|
112
|
+
parameters_from_format_id: Annotated[
|
|
113
|
+
bool | None,
|
|
114
|
+
Field(
|
|
115
|
+
description='When true, parameters for this render (dimensions and/or duration) are specified in the format_id. Used for template formats that accept parameters. Mutually exclusive with specifying dimensions object explicitly.'
|
|
116
|
+
),
|
|
117
|
+
] = None
|
|
118
|
+
role: Annotated[
|
|
119
|
+
str,
|
|
120
|
+
Field(
|
|
121
|
+
description="Semantic role of this rendered piece (e.g., 'primary', 'companion', 'mobile_variant')"
|
|
122
|
+
),
|
|
123
|
+
]
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
Dimensions2 = Dimensions
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class Renders1(AdCPBaseModel):
|
|
130
|
+
dimensions: Annotated[
|
|
131
|
+
Dimensions2 | None, Field(description='Dimensions for this rendered piece (in pixels)')
|
|
132
|
+
] = None
|
|
133
|
+
parameters_from_format_id: Annotated[
|
|
134
|
+
Literal[True],
|
|
135
|
+
Field(
|
|
136
|
+
description='When true, parameters for this render (dimensions and/or duration) are specified in the format_id. Used for template formats that accept parameters. Mutually exclusive with specifying dimensions object explicitly.'
|
|
137
|
+
),
|
|
138
|
+
]
|
|
139
|
+
role: Annotated[
|
|
140
|
+
str,
|
|
141
|
+
Field(
|
|
142
|
+
description="Semantic role of this rendered piece (e.g., 'primary', 'companion', 'mobile_variant')"
|
|
143
|
+
),
|
|
144
|
+
]
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class FormatCard(AdCPBaseModel):
|
|
148
|
+
model_config = ConfigDict(
|
|
149
|
+
extra='forbid',
|
|
150
|
+
)
|
|
151
|
+
format_id: Annotated[
|
|
152
|
+
format_id_1.FormatId,
|
|
153
|
+
Field(
|
|
154
|
+
description='Creative format defining the card layout (typically format_card_standard)'
|
|
155
|
+
),
|
|
156
|
+
]
|
|
157
|
+
manifest: Annotated[
|
|
158
|
+
dict[str, Any],
|
|
159
|
+
Field(description='Asset manifest for rendering the card, structure defined by the format'),
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class FormatCardDetailed(AdCPBaseModel):
|
|
164
|
+
model_config = ConfigDict(
|
|
165
|
+
extra='forbid',
|
|
166
|
+
)
|
|
167
|
+
format_id: Annotated[
|
|
168
|
+
format_id_1.FormatId,
|
|
169
|
+
Field(
|
|
170
|
+
description='Creative format defining the detailed card layout (typically format_card_detailed)'
|
|
171
|
+
),
|
|
172
|
+
]
|
|
173
|
+
manifest: Annotated[
|
|
174
|
+
dict[str, Any],
|
|
175
|
+
Field(
|
|
176
|
+
description='Asset manifest for rendering the detailed card, structure defined by the format'
|
|
177
|
+
),
|
|
178
|
+
]
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class Format(AdCPBaseModel):
|
|
182
|
+
model_config = ConfigDict(
|
|
183
|
+
extra='forbid',
|
|
184
|
+
)
|
|
185
|
+
accepts_parameters: Annotated[
|
|
186
|
+
list[format_id_parameter.FormatIdParameter] | None,
|
|
187
|
+
Field(
|
|
188
|
+
description='List of parameters this format accepts in format_id. Template formats define which parameters (dimensions, duration, etc.) can be specified when instantiating the format. Empty or omitted means this is a concrete format with fixed parameters.'
|
|
189
|
+
),
|
|
190
|
+
] = None
|
|
191
|
+
assets_required: Annotated[
|
|
192
|
+
list[AssetsRequired | AssetsRequired1] | None,
|
|
193
|
+
Field(
|
|
194
|
+
description='Array of required assets or asset groups for this format. Each asset is identified by its asset_id, which must be used as the key in creative manifests. Can contain individual assets or repeatable asset sequences (e.g., carousel products, slideshow frames).'
|
|
195
|
+
),
|
|
196
|
+
] = None
|
|
197
|
+
delivery: Annotated[
|
|
198
|
+
dict[str, Any] | None,
|
|
199
|
+
Field(description='Delivery method specifications (e.g., hosted, VAST, third-party tags)'),
|
|
200
|
+
] = None
|
|
201
|
+
description: Annotated[
|
|
202
|
+
str | None,
|
|
203
|
+
Field(
|
|
204
|
+
description='Plain text explanation of what this format does and what assets it requires'
|
|
205
|
+
),
|
|
206
|
+
] = None
|
|
207
|
+
example_url: Annotated[
|
|
208
|
+
AnyUrl | None,
|
|
209
|
+
Field(
|
|
210
|
+
description='Optional URL to showcase page with examples and interactive demos of this format'
|
|
211
|
+
),
|
|
212
|
+
] = None
|
|
213
|
+
format_card: Annotated[
|
|
214
|
+
FormatCard | None,
|
|
215
|
+
Field(
|
|
216
|
+
description='Optional standard visual card (300x400px) for displaying this format in user interfaces. Can be rendered via preview_creative or pre-generated.'
|
|
217
|
+
),
|
|
218
|
+
] = None
|
|
219
|
+
format_card_detailed: Annotated[
|
|
220
|
+
FormatCardDetailed | None,
|
|
221
|
+
Field(
|
|
222
|
+
description='Optional detailed card with carousel and full specifications. Provides rich format documentation similar to ad spec pages.'
|
|
223
|
+
),
|
|
224
|
+
] = None
|
|
225
|
+
format_id: Annotated[
|
|
226
|
+
format_id_1.FormatId,
|
|
227
|
+
Field(description='Structured format identifier with agent URL and format name'),
|
|
228
|
+
]
|
|
229
|
+
name: Annotated[str, Field(description='Human-readable format name')]
|
|
230
|
+
output_format_ids: Annotated[
|
|
231
|
+
list[format_id_1.FormatId] | None,
|
|
232
|
+
Field(
|
|
233
|
+
description='For generative formats: array of format IDs that this format can generate. When a format accepts inputs like brand_manifest and message, this specifies what concrete output formats can be produced (e.g., a generative banner format might output standard image banner formats).'
|
|
234
|
+
),
|
|
235
|
+
] = None
|
|
236
|
+
preview_image: Annotated[
|
|
237
|
+
AnyUrl | None,
|
|
238
|
+
Field(
|
|
239
|
+
description='DEPRECATED: Use format_card instead. Optional preview image URL for format browsing/discovery UI. Should be 400x300px (4:3 aspect ratio) PNG or JPG. Used as thumbnail/card image in format browsers. This field is maintained for backward compatibility but format_card provides a more flexible, structured approach.'
|
|
240
|
+
),
|
|
241
|
+
] = None
|
|
242
|
+
renders: Annotated[
|
|
243
|
+
list[Renders | Renders1] | None,
|
|
244
|
+
Field(
|
|
245
|
+
description='Specification of rendered pieces for this format. Most formats produce a single render. Companion ad formats (video + banner), adaptive formats, and multi-placement formats produce multiple renders. Each render specifies its role and dimensions.',
|
|
246
|
+
min_length=1,
|
|
247
|
+
),
|
|
248
|
+
] = None
|
|
249
|
+
supported_macros: Annotated[
|
|
250
|
+
list[str] | None,
|
|
251
|
+
Field(
|
|
252
|
+
description='List of universal macros supported by this format (e.g., MEDIA_BUY_ID, CACHEBUSTER, DEVICE_ID). Used for validation and developer tooling.'
|
|
253
|
+
),
|
|
254
|
+
] = None
|
|
255
|
+
type: Annotated[
|
|
256
|
+
format_category.FormatCategory,
|
|
257
|
+
Field(
|
|
258
|
+
description='Media type of this format - determines rendering method and asset requirements'
|
|
259
|
+
),
|
|
260
|
+
]
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/format_id.json
|
|
3
|
+
# timestamp: 2025-11-22T19:54:03+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import AnyUrl, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class FormatId(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
agent_url: Annotated[
|
|
18
|
+
AnyUrl,
|
|
19
|
+
Field(
|
|
20
|
+
description="URL of the agent that defines this format (e.g., 'https://creatives.adcontextprotocol.org' for standard formats, or 'https://publisher.com/.well-known/adcp/sales' for custom formats)"
|
|
21
|
+
),
|
|
22
|
+
]
|
|
23
|
+
duration_ms: Annotated[
|
|
24
|
+
float | None,
|
|
25
|
+
Field(
|
|
26
|
+
description='Duration in milliseconds for time-based formats (video, audio). When specified, creates a parameterized format ID. Omit to reference a template format without parameters.',
|
|
27
|
+
ge=1.0,
|
|
28
|
+
),
|
|
29
|
+
] = None
|
|
30
|
+
height: Annotated[
|
|
31
|
+
int | None,
|
|
32
|
+
Field(
|
|
33
|
+
description='Height in pixels for visual formats. When specified, width must also be specified. Both fields together create a parameterized format ID for dimension-specific variants.',
|
|
34
|
+
ge=1,
|
|
35
|
+
),
|
|
36
|
+
] = None
|
|
37
|
+
id: Annotated[
|
|
38
|
+
str,
|
|
39
|
+
Field(
|
|
40
|
+
description="Format identifier within the agent's namespace (e.g., 'display_static', 'video_hosted', 'audio_standard'). When used alone, references a template format. When combined with dimension/duration fields, creates a parameterized format ID for a specific variant.",
|
|
41
|
+
pattern='^[a-zA-Z0-9_-]+$',
|
|
42
|
+
),
|
|
43
|
+
]
|
|
44
|
+
width: Annotated[
|
|
45
|
+
int | None,
|
|
46
|
+
Field(
|
|
47
|
+
description='Width in pixels for visual formats. When specified, height must also be specified. Both fields together create a parameterized format ID for dimension-specific variants.',
|
|
48
|
+
ge=1,
|
|
49
|
+
),
|
|
50
|
+
] = None
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/frequency_cap.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class FrequencyCap(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
suppress_minutes: Annotated[
|
|
18
|
+
float, Field(description='Minutes to suppress after impression', ge=0.0)
|
|
19
|
+
]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/measurement.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Measurement(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
attribution: Annotated[
|
|
18
|
+
str,
|
|
19
|
+
Field(
|
|
20
|
+
description='Attribution methodology',
|
|
21
|
+
examples=['deterministic_purchase', 'probabilistic'],
|
|
22
|
+
),
|
|
23
|
+
]
|
|
24
|
+
reporting: Annotated[
|
|
25
|
+
str,
|
|
26
|
+
Field(
|
|
27
|
+
description='Reporting frequency and format',
|
|
28
|
+
examples=['weekly_dashboard', 'real_time_api'],
|
|
29
|
+
),
|
|
30
|
+
]
|
|
31
|
+
type: Annotated[
|
|
32
|
+
str,
|
|
33
|
+
Field(
|
|
34
|
+
description='Type of measurement',
|
|
35
|
+
examples=['incremental_sales_lift', 'brand_lift', 'foot_traffic'],
|
|
36
|
+
),
|
|
37
|
+
]
|
|
38
|
+
window: Annotated[
|
|
39
|
+
str | None, Field(description='Attribution window', examples=['30_days', '7_days'])
|
|
40
|
+
] = None
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/media_buy.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import AwareDatetime, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..enums import media_buy_status
|
|
13
|
+
from . import ext as ext_1
|
|
14
|
+
from . import package
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class MediaBuy(AdCPBaseModel):
|
|
18
|
+
model_config = ConfigDict(
|
|
19
|
+
extra='forbid',
|
|
20
|
+
)
|
|
21
|
+
buyer_ref: Annotated[
|
|
22
|
+
str | None, Field(description="Buyer's reference identifier for this media buy")
|
|
23
|
+
] = None
|
|
24
|
+
created_at: Annotated[AwareDatetime | None, Field(description='Creation timestamp')] = None
|
|
25
|
+
creative_deadline: Annotated[
|
|
26
|
+
AwareDatetime | None, Field(description='ISO 8601 timestamp for creative upload deadline')
|
|
27
|
+
] = None
|
|
28
|
+
ext: ext_1.ExtensionObject | None = None
|
|
29
|
+
media_buy_id: Annotated[
|
|
30
|
+
str, Field(description="Publisher's unique identifier for the media buy")
|
|
31
|
+
]
|
|
32
|
+
packages: Annotated[
|
|
33
|
+
list[package.Package], Field(description='Array of packages within this media buy')
|
|
34
|
+
]
|
|
35
|
+
promoted_offering: Annotated[
|
|
36
|
+
str, Field(description='Description of advertiser and what is being promoted')
|
|
37
|
+
]
|
|
38
|
+
status: media_buy_status.MediaBuyStatus
|
|
39
|
+
total_budget: Annotated[float, Field(description='Total budget amount', ge=0.0)]
|
|
40
|
+
updated_at: Annotated[AwareDatetime | None, Field(description='Last update timestamp')] = None
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/package.json
|
|
3
|
+
# timestamp: 2025-11-22T19:54:03+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..enums import pacing as pacing_1
|
|
13
|
+
from . import creative_assignment
|
|
14
|
+
from . import ext as ext_1
|
|
15
|
+
from . import format_id, targeting
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Package(AdCPBaseModel):
|
|
19
|
+
model_config = ConfigDict(
|
|
20
|
+
extra='forbid',
|
|
21
|
+
)
|
|
22
|
+
bid_price: Annotated[
|
|
23
|
+
float | None,
|
|
24
|
+
Field(
|
|
25
|
+
description='Bid price for auction-based CPM pricing (present if using cpm-auction-option)',
|
|
26
|
+
ge=0.0,
|
|
27
|
+
),
|
|
28
|
+
] = None
|
|
29
|
+
budget: Annotated[
|
|
30
|
+
float | None,
|
|
31
|
+
Field(
|
|
32
|
+
description='Budget allocation for this package in the currency specified by the pricing option',
|
|
33
|
+
ge=0.0,
|
|
34
|
+
),
|
|
35
|
+
] = None
|
|
36
|
+
buyer_ref: Annotated[
|
|
37
|
+
str | None, Field(description="Buyer's reference identifier for this package")
|
|
38
|
+
] = None
|
|
39
|
+
creative_assignments: Annotated[
|
|
40
|
+
list[creative_assignment.CreativeAssignment] | None,
|
|
41
|
+
Field(description='Creative assets assigned to this package'),
|
|
42
|
+
] = None
|
|
43
|
+
ext: ext_1.ExtensionObject | None = None
|
|
44
|
+
format_ids_to_provide: Annotated[
|
|
45
|
+
list[format_id.FormatId] | None,
|
|
46
|
+
Field(description='Format IDs that creative assets will be provided for this package'),
|
|
47
|
+
] = None
|
|
48
|
+
impressions: Annotated[
|
|
49
|
+
float | None, Field(description='Impression goal for this package', ge=0.0)
|
|
50
|
+
] = None
|
|
51
|
+
pacing: pacing_1.Pacing | None = None
|
|
52
|
+
package_id: Annotated[str, Field(description="Publisher's unique identifier for the package")]
|
|
53
|
+
paused: Annotated[
|
|
54
|
+
bool | None,
|
|
55
|
+
Field(
|
|
56
|
+
description='Whether this package is paused by the buyer. Paused packages do not deliver impressions. Defaults to false.'
|
|
57
|
+
),
|
|
58
|
+
] = False
|
|
59
|
+
pricing_option_id: Annotated[
|
|
60
|
+
str | None,
|
|
61
|
+
Field(
|
|
62
|
+
description="ID of the selected pricing option from the product's pricing_options array"
|
|
63
|
+
),
|
|
64
|
+
] = None
|
|
65
|
+
product_id: Annotated[
|
|
66
|
+
str | None, Field(description='ID of the product this package is based on')
|
|
67
|
+
] = None
|
|
68
|
+
targeting_overlay: targeting.TargetingOverlay | None = None
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/performance_feedback.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import AwareDatetime, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from ..enums import feedback_source as feedback_source_1
|
|
14
|
+
from ..enums import metric_type as metric_type_1
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class MeasurementPeriod(AdCPBaseModel):
|
|
18
|
+
model_config = ConfigDict(
|
|
19
|
+
extra='forbid',
|
|
20
|
+
)
|
|
21
|
+
end: Annotated[
|
|
22
|
+
AwareDatetime, Field(description='ISO 8601 end timestamp for measurement period')
|
|
23
|
+
]
|
|
24
|
+
start: Annotated[
|
|
25
|
+
AwareDatetime, Field(description='ISO 8601 start timestamp for measurement period')
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class Status(Enum):
|
|
30
|
+
accepted = 'accepted'
|
|
31
|
+
queued = 'queued'
|
|
32
|
+
applied = 'applied'
|
|
33
|
+
rejected = 'rejected'
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class PerformanceFeedback(AdCPBaseModel):
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
extra='forbid',
|
|
39
|
+
)
|
|
40
|
+
applied_at: Annotated[
|
|
41
|
+
AwareDatetime | None,
|
|
42
|
+
Field(
|
|
43
|
+
description='ISO 8601 timestamp when feedback was applied to optimization algorithms'
|
|
44
|
+
),
|
|
45
|
+
] = None
|
|
46
|
+
creative_id: Annotated[
|
|
47
|
+
str | None, Field(description='Specific creative asset (if feedback is creative-specific)')
|
|
48
|
+
] = None
|
|
49
|
+
feedback_id: Annotated[
|
|
50
|
+
str, Field(description='Unique identifier for this performance feedback submission')
|
|
51
|
+
]
|
|
52
|
+
feedback_source: Annotated[
|
|
53
|
+
feedback_source_1.FeedbackSource, Field(description='Source of the performance data')
|
|
54
|
+
]
|
|
55
|
+
measurement_period: Annotated[
|
|
56
|
+
MeasurementPeriod, Field(description='Time period for performance measurement')
|
|
57
|
+
]
|
|
58
|
+
media_buy_id: Annotated[str, Field(description="Publisher's media buy identifier")]
|
|
59
|
+
metric_type: Annotated[
|
|
60
|
+
metric_type_1.MetricType, Field(description='The business metric being measured')
|
|
61
|
+
]
|
|
62
|
+
package_id: Annotated[
|
|
63
|
+
str | None,
|
|
64
|
+
Field(
|
|
65
|
+
description='Specific package within the media buy (if feedback is package-specific)'
|
|
66
|
+
),
|
|
67
|
+
] = None
|
|
68
|
+
performance_index: Annotated[
|
|
69
|
+
float,
|
|
70
|
+
Field(
|
|
71
|
+
description='Normalized performance score (0.0 = no value, 1.0 = expected, >1.0 = above expected)',
|
|
72
|
+
ge=0.0,
|
|
73
|
+
),
|
|
74
|
+
]
|
|
75
|
+
status: Annotated[Status, Field(description='Processing status of the performance feedback')]
|
|
76
|
+
submitted_at: Annotated[
|
|
77
|
+
AwareDatetime, Field(description='ISO 8601 timestamp when feedback was submitted')
|
|
78
|
+
]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/placement.json
|
|
3
|
+
# timestamp: 2025-11-22T19:54:03+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from . import format_id
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Placement(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra='forbid',
|
|
18
|
+
)
|
|
19
|
+
description: Annotated[
|
|
20
|
+
str | None, Field(description='Detailed description of where and how the placement appears')
|
|
21
|
+
] = None
|
|
22
|
+
format_ids: Annotated[
|
|
23
|
+
list[format_id.FormatId] | None,
|
|
24
|
+
Field(
|
|
25
|
+
description='Format IDs supported by this specific placement. Can include: (1) concrete format_ids (fixed dimensions), (2) template format_ids without parameters (accepts any dimensions/duration), or (3) parameterized format_ids (specific dimension/duration constraints).',
|
|
26
|
+
min_length=1,
|
|
27
|
+
),
|
|
28
|
+
] = None
|
|
29
|
+
name: Annotated[
|
|
30
|
+
str,
|
|
31
|
+
Field(
|
|
32
|
+
description="Human-readable name for the placement (e.g., 'Homepage Banner', 'Article Sidebar')"
|
|
33
|
+
),
|
|
34
|
+
]
|
|
35
|
+
placement_id: Annotated[
|
|
36
|
+
str, Field(description='Unique identifier for the placement within the product')
|
|
37
|
+
]
|