adcp 2.3.0__py3-none-any.whl → 2.4.1__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 +88 -39
- adcp/__main__.py +1 -1
- adcp/client.py +9 -9
- adcp/simple.py +1 -1
- adcp/testing/test_helpers.py +1 -1
- adcp/types/__init__.py +66 -2
- adcp/types/_generated.py +175 -0
- adcp/types/aliases.py +1 -1
- adcp/types/generated_poc/__init__.py +1 -1
- adcp/types/generated_poc/activate_signal_request.py +5 -5
- adcp/types/generated_poc/activate_signal_response.py +9 -9
- adcp/types/generated_poc/activation_key.py +8 -8
- adcp/types/generated_poc/adagents.py +46 -46
- adcp/types/generated_poc/asset_type.py +19 -19
- adcp/types/generated_poc/audio_asset.py +6 -6
- adcp/types/generated_poc/brand_manifest.py +61 -120
- adcp/types/generated_poc/build_creative_request.py +6 -6
- adcp/types/generated_poc/build_creative_response.py +9 -9
- adcp/types/generated_poc/channels.py +10 -10
- adcp/types/generated_poc/cpc_option.py +12 -8
- adcp/types/generated_poc/cpcv_option.py +12 -8
- adcp/types/generated_poc/cpm_auction_option.py +17 -13
- adcp/types/generated_poc/cpm_fixed_option.py +12 -8
- adcp/types/generated_poc/cpp_option.py +17 -13
- adcp/types/generated_poc/cpv_option.py +16 -12
- adcp/types/generated_poc/create_media_buy_request.py +30 -30
- adcp/types/generated_poc/create_media_buy_response.py +11 -11
- adcp/types/generated_poc/creative_asset.py +13 -13
- adcp/types/generated_poc/creative_assignment.py +4 -4
- adcp/types/generated_poc/creative_manifest.py +4 -4
- adcp/types/generated_poc/creative_policy.py +11 -11
- adcp/types/generated_poc/creative_status.py +5 -5
- adcp/types/generated_poc/css_asset.py +3 -3
- adcp/types/generated_poc/daast_asset.py +30 -30
- adcp/types/generated_poc/delivery_metrics.py +33 -33
- adcp/types/generated_poc/delivery_type.py +3 -3
- adcp/types/generated_poc/deployment.py +21 -21
- adcp/types/generated_poc/destination.py +10 -10
- adcp/types/generated_poc/error.py +7 -7
- adcp/types/generated_poc/flat_rate_option.py +16 -16
- adcp/types/generated_poc/format.py +70 -70
- adcp/types/generated_poc/format_id.py +3 -3
- adcp/types/generated_poc/frequency_cap.py +3 -3
- adcp/types/generated_poc/frequency_cap_scope.py +4 -4
- adcp/types/generated_poc/get_media_buy_delivery_request.py +21 -21
- adcp/types/generated_poc/get_media_buy_delivery_response.py +46 -46
- adcp/types/generated_poc/get_products_request.py +24 -24
- adcp/types/generated_poc/get_products_response.py +5 -5
- adcp/types/generated_poc/get_signals_request.py +19 -19
- adcp/types/generated_poc/get_signals_response.py +20 -20
- adcp/types/generated_poc/html_asset.py +3 -3
- adcp/types/generated_poc/identifier_types.py +20 -20
- adcp/types/generated_poc/image_asset.py +7 -7
- adcp/types/generated_poc/javascript_asset.py +7 -7
- adcp/types/generated_poc/list_authorized_properties_request.py +5 -5
- adcp/types/generated_poc/list_authorized_properties_response.py +9 -9
- adcp/types/generated_poc/list_creative_formats_request.py +22 -22
- adcp/types/generated_poc/list_creative_formats_response.py +11 -11
- adcp/types/generated_poc/list_creatives_request.py +51 -51
- adcp/types/generated_poc/list_creatives_response.py +57 -72
- adcp/types/generated_poc/markdown_asset.py +7 -7
- adcp/types/generated_poc/measurement.py +9 -9
- adcp/types/generated_poc/media_buy.py +8 -8
- adcp/types/generated_poc/media_buy_status.py +5 -5
- adcp/types/generated_poc/pacing.py +4 -4
- adcp/types/generated_poc/package.py +8 -8
- adcp/types/generated_poc/package_request.py +7 -7
- adcp/types/generated_poc/package_status.py +5 -5
- adcp/types/generated_poc/performance_feedback.py +31 -31
- adcp/types/generated_poc/placement.py +4 -4
- adcp/types/generated_poc/preview_creative_request.py +28 -28
- adcp/types/generated_poc/preview_creative_response.py +31 -31
- adcp/types/generated_poc/preview_render.py +36 -28
- adcp/types/generated_poc/pricing_model.py +8 -8
- adcp/types/generated_poc/product.py +53 -43
- adcp/types/generated_poc/promoted_offerings.py +30 -30
- adcp/types/generated_poc/promoted_products.py +3 -3
- adcp/types/generated_poc/property.py +18 -18
- adcp/types/generated_poc/protocol_envelope.py +9 -9
- adcp/types/generated_poc/provide_performance_feedback_request.py +24 -24
- adcp/types/generated_poc/provide_performance_feedback_response.py +9 -9
- adcp/types/generated_poc/publisher_identifier_types.py +6 -6
- adcp/types/generated_poc/push_notification_config.py +9 -9
- adcp/types/generated_poc/reporting_capabilities.py +21 -21
- adcp/types/generated_poc/response.py +5 -5
- adcp/types/generated_poc/standard_format_ids.py +36 -36
- adcp/types/generated_poc/sub_asset.py +13 -13
- adcp/types/generated_poc/sync_creatives_request.py +11 -11
- adcp/types/generated_poc/sync_creatives_response.py +23 -23
- adcp/types/generated_poc/targeting.py +9 -9
- adcp/types/generated_poc/task_status.py +10 -10
- adcp/types/generated_poc/task_type.py +6 -6
- adcp/types/generated_poc/tasks_get_request.py +5 -5
- adcp/types/generated_poc/tasks_get_response.py +35 -35
- adcp/types/generated_poc/tasks_list_request.py +36 -36
- adcp/types/generated_poc/tasks_list_response.py +35 -35
- adcp/types/generated_poc/text_asset.py +3 -3
- adcp/types/generated_poc/update_media_buy_request.py +27 -27
- adcp/types/generated_poc/update_media_buy_response.py +11 -11
- adcp/types/generated_poc/url_asset.py +7 -7
- adcp/types/generated_poc/vast_asset.py +38 -38
- adcp/types/generated_poc/vcpm_auction_option.py +17 -13
- adcp/types/generated_poc/vcpm_fixed_option.py +12 -8
- adcp/types/generated_poc/video_asset.py +8 -8
- adcp/types/generated_poc/webhook_asset.py +19 -19
- adcp/types/generated_poc/webhook_payload.py +18 -18
- adcp/types/stable.py +175 -0
- adcp/utils/preview_cache.py +6 -6
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/METADATA +29 -4
- adcp-2.4.1.dist-info/RECORD +129 -0
- adcp/types/generated.py +0 -614
- adcp/types/generated_poc/brand_manifest_ref.py +0 -361
- adcp/types/generated_poc/index.py +0 -17
- adcp/types/generated_poc/pricing_option.py +0 -365
- adcp/types/generated_poc/start_timing.py +0 -13
- adcp-2.3.0.dist-info/RECORD +0 -132
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/WHEEL +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/entry_points.txt +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: pricing-model.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,10 +8,10 @@ from enum import Enum
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class PricingModel(Enum):
|
|
11
|
-
cpm =
|
|
12
|
-
vcpm =
|
|
13
|
-
cpc =
|
|
14
|
-
cpcv =
|
|
15
|
-
cpv =
|
|
16
|
-
cpp =
|
|
17
|
-
flat_rate =
|
|
11
|
+
cpm = 'cpm'
|
|
12
|
+
vcpm = 'vcpm'
|
|
13
|
+
cpc = 'cpc'
|
|
14
|
+
cpcv = 'cpcv'
|
|
15
|
+
cpv = 'cpv'
|
|
16
|
+
cpp = 'cpp'
|
|
17
|
+
flat_rate = 'flat_rate'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: product.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T05:05:53+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
from typing import Annotated, Any, Literal
|
|
8
8
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
|
-
from pydantic import AwareDatetime, ConfigDict, Field, RootModel
|
|
10
|
+
from pydantic import AwareDatetime, ConfigDict, Field, RootModel
|
|
11
11
|
|
|
12
12
|
from . import cpc_option, cpcv_option, cpm_auction_option, cpm_fixed_option, cpp_option, cpv_option
|
|
13
13
|
from . import creative_policy as creative_policy_1
|
|
@@ -37,45 +37,64 @@ class DeliveryMeasurement(AdCPBaseModel):
|
|
|
37
37
|
|
|
38
38
|
class ProductCard(AdCPBaseModel):
|
|
39
39
|
model_config = ConfigDict(
|
|
40
|
-
extra=
|
|
40
|
+
extra='forbid',
|
|
41
41
|
)
|
|
42
42
|
format_id: Annotated[
|
|
43
43
|
format_id_1.FormatId,
|
|
44
44
|
Field(
|
|
45
|
-
description=
|
|
45
|
+
description='Creative format defining the card layout (typically product_card_standard)'
|
|
46
46
|
),
|
|
47
47
|
]
|
|
48
48
|
manifest: Annotated[
|
|
49
49
|
dict[str, Any],
|
|
50
|
-
Field(description=
|
|
50
|
+
Field(description='Asset manifest for rendering the card, structure defined by the format'),
|
|
51
51
|
]
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
class ProductCardDetailed(AdCPBaseModel):
|
|
55
55
|
model_config = ConfigDict(
|
|
56
|
-
extra=
|
|
56
|
+
extra='forbid',
|
|
57
57
|
)
|
|
58
58
|
format_id: Annotated[
|
|
59
59
|
format_id_1.FormatId,
|
|
60
60
|
Field(
|
|
61
|
-
description=
|
|
61
|
+
description='Creative format defining the detailed card layout (typically product_card_detailed)'
|
|
62
62
|
),
|
|
63
63
|
]
|
|
64
64
|
manifest: Annotated[
|
|
65
65
|
dict[str, Any],
|
|
66
66
|
Field(
|
|
67
|
-
description=
|
|
67
|
+
description='Asset manifest for rendering the detailed card, structure defined by the format'
|
|
68
|
+
),
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class PublisherProperties(AdCPBaseModel):
|
|
73
|
+
model_config = ConfigDict(
|
|
74
|
+
extra='forbid',
|
|
75
|
+
)
|
|
76
|
+
publisher_domain: Annotated[
|
|
77
|
+
str,
|
|
78
|
+
Field(
|
|
79
|
+
description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
80
|
+
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
81
|
+
),
|
|
82
|
+
]
|
|
83
|
+
selection_type: Annotated[
|
|
84
|
+
Literal['all'],
|
|
85
|
+
Field(
|
|
86
|
+
description='Discriminator indicating all properties from this publisher are included'
|
|
68
87
|
),
|
|
69
88
|
]
|
|
70
89
|
|
|
71
90
|
|
|
72
91
|
class PropertyId(RootModel[str]):
|
|
73
|
-
root: Annotated[str, Field(pattern=
|
|
92
|
+
root: Annotated[str, Field(pattern='^[a-z0-9_]+$')]
|
|
74
93
|
|
|
75
94
|
|
|
76
|
-
class
|
|
95
|
+
class PublisherProperties4(AdCPBaseModel):
|
|
77
96
|
model_config = ConfigDict(
|
|
78
|
-
extra=
|
|
97
|
+
extra='forbid',
|
|
79
98
|
)
|
|
80
99
|
property_ids: Annotated[
|
|
81
100
|
list[PropertyId],
|
|
@@ -85,12 +104,12 @@ class PublisherProperties(AdCPBaseModel):
|
|
|
85
104
|
str,
|
|
86
105
|
Field(
|
|
87
106
|
description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
88
|
-
pattern=
|
|
107
|
+
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
89
108
|
),
|
|
90
109
|
]
|
|
91
110
|
selection_type: Annotated[
|
|
92
|
-
Literal[
|
|
93
|
-
Field(description=
|
|
111
|
+
Literal['by_id'],
|
|
112
|
+
Field(description='Discriminator indicating selection by specific property IDs'),
|
|
94
113
|
]
|
|
95
114
|
|
|
96
115
|
|
|
@@ -98,9 +117,9 @@ class PropertyTag(PropertyId):
|
|
|
98
117
|
pass
|
|
99
118
|
|
|
100
119
|
|
|
101
|
-
class
|
|
120
|
+
class PublisherProperties5(AdCPBaseModel):
|
|
102
121
|
model_config = ConfigDict(
|
|
103
|
-
extra=
|
|
122
|
+
extra='forbid',
|
|
104
123
|
)
|
|
105
124
|
property_tags: Annotated[
|
|
106
125
|
list[PropertyTag],
|
|
@@ -113,55 +132,55 @@ class PublisherProperties3(AdCPBaseModel):
|
|
|
113
132
|
str,
|
|
114
133
|
Field(
|
|
115
134
|
description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
116
|
-
pattern=
|
|
135
|
+
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
117
136
|
),
|
|
118
137
|
]
|
|
119
138
|
selection_type: Annotated[
|
|
120
|
-
Literal[
|
|
139
|
+
Literal['by_tag'], Field(description='Discriminator indicating selection by property tags')
|
|
121
140
|
]
|
|
122
141
|
|
|
123
142
|
|
|
124
143
|
class Product(AdCPBaseModel):
|
|
125
144
|
model_config = ConfigDict(
|
|
126
|
-
extra=
|
|
145
|
+
extra='forbid',
|
|
127
146
|
)
|
|
128
147
|
brief_relevance: Annotated[
|
|
129
148
|
str | None,
|
|
130
149
|
Field(
|
|
131
|
-
description=
|
|
150
|
+
description='Explanation of why this product matches the brief (only included when brief is provided)'
|
|
132
151
|
),
|
|
133
152
|
] = None
|
|
134
153
|
creative_policy: creative_policy_1.CreativePolicy | None = None
|
|
135
154
|
delivery_measurement: Annotated[
|
|
136
155
|
DeliveryMeasurement,
|
|
137
156
|
Field(
|
|
138
|
-
description=
|
|
157
|
+
description='Measurement provider and methodology for delivery metrics. The buyer accepts the declared provider as the source of truth for the buy. REQUIRED for all products.'
|
|
139
158
|
),
|
|
140
159
|
]
|
|
141
160
|
delivery_type: delivery_type_1.DeliveryType
|
|
142
161
|
description: Annotated[
|
|
143
|
-
str, Field(description=
|
|
162
|
+
str, Field(description='Detailed description of the product and its inventory')
|
|
144
163
|
]
|
|
145
164
|
estimated_exposures: Annotated[
|
|
146
165
|
int | None,
|
|
147
|
-
Field(description=
|
|
166
|
+
Field(description='Estimated exposures/impressions for guaranteed products', ge=0),
|
|
148
167
|
] = None
|
|
149
168
|
expires_at: Annotated[
|
|
150
|
-
AwareDatetime | None, Field(description=
|
|
169
|
+
AwareDatetime | None, Field(description='Expiration timestamp for custom products')
|
|
151
170
|
] = None
|
|
152
171
|
format_ids: Annotated[
|
|
153
172
|
list[format_id_1.FormatId],
|
|
154
173
|
Field(
|
|
155
|
-
description=
|
|
174
|
+
description='Array of supported creative format IDs - structured format_id objects with agent_url and id'
|
|
156
175
|
),
|
|
157
176
|
]
|
|
158
|
-
is_custom: Annotated[bool | None, Field(description=
|
|
177
|
+
is_custom: Annotated[bool | None, Field(description='Whether this is a custom product')] = None
|
|
159
178
|
measurement: measurement_1.Measurement | None = None
|
|
160
|
-
name: Annotated[str, Field(description=
|
|
179
|
+
name: Annotated[str, Field(description='Human-readable product name')]
|
|
161
180
|
placements: Annotated[
|
|
162
181
|
list[placement.Placement] | None,
|
|
163
182
|
Field(
|
|
164
|
-
description=
|
|
183
|
+
description='Optional array of specific placements within this product. When provided, buyers can target specific placements when assigning creatives.',
|
|
165
184
|
min_length=1,
|
|
166
185
|
),
|
|
167
186
|
] = None
|
|
@@ -177,35 +196,26 @@ class Product(AdCPBaseModel):
|
|
|
177
196
|
| cpp_option.CppPricingOption
|
|
178
197
|
| flat_rate_option.FlatRatePricingOption
|
|
179
198
|
],
|
|
180
|
-
Field(description=
|
|
199
|
+
Field(description='Available pricing models for this product', min_length=1),
|
|
181
200
|
]
|
|
182
201
|
product_card: Annotated[
|
|
183
202
|
ProductCard | None,
|
|
184
203
|
Field(
|
|
185
|
-
description=
|
|
204
|
+
description='Optional standard visual card (300x400px) for displaying this product in user interfaces. Can be rendered via preview_creative or pre-generated.'
|
|
186
205
|
),
|
|
187
206
|
] = None
|
|
188
207
|
product_card_detailed: Annotated[
|
|
189
208
|
ProductCardDetailed | None,
|
|
190
209
|
Field(
|
|
191
|
-
description=
|
|
210
|
+
description='Optional detailed card with carousel and full specifications. Provides rich product presentation similar to media kit pages.'
|
|
192
211
|
),
|
|
193
212
|
] = None
|
|
194
|
-
product_id: Annotated[str, Field(description=
|
|
213
|
+
product_id: Annotated[str, Field(description='Unique identifier for the product')]
|
|
195
214
|
publisher_properties: Annotated[
|
|
196
|
-
list[PublisherProperties |
|
|
215
|
+
list[PublisherProperties | PublisherProperties4 | PublisherProperties5],
|
|
197
216
|
Field(
|
|
198
|
-
description="Publisher properties covered by this product. Buyers fetch actual property definitions from each publisher's adagents.json and validate agent authorization.",
|
|
217
|
+
description="Publisher properties covered by this product. Buyers fetch actual property definitions from each publisher's adagents.json and validate agent authorization. Selection patterns mirror the authorization patterns in adagents.json for consistency.",
|
|
199
218
|
min_length=1,
|
|
200
219
|
),
|
|
201
220
|
]
|
|
202
221
|
reporting_capabilities: reporting_capabilities_1.ReportingCapabilities | None = None
|
|
203
|
-
|
|
204
|
-
@model_validator(mode="after")
|
|
205
|
-
def validate_publisher_properties_items(self) -> "Product":
|
|
206
|
-
"""Validate all publisher_properties items."""
|
|
207
|
-
from adcp.validation import validate_product
|
|
208
|
-
|
|
209
|
-
data = self.model_dump()
|
|
210
|
-
validate_product(data)
|
|
211
|
-
return self
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: promoted-offerings.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T04:34:42+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -10,33 +10,33 @@ from typing import Annotated, Any
|
|
|
10
10
|
from adcp.types.base import AdCPBaseModel
|
|
11
11
|
from pydantic import AnyUrl, ConfigDict, Field
|
|
12
12
|
|
|
13
|
-
from . import
|
|
13
|
+
from . import brand_manifest as brand_manifest_1
|
|
14
14
|
from . import promoted_products
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class AssetType(Enum):
|
|
18
|
-
image =
|
|
19
|
-
video =
|
|
20
|
-
audio =
|
|
21
|
-
vast =
|
|
22
|
-
daast =
|
|
23
|
-
text =
|
|
24
|
-
url =
|
|
25
|
-
html =
|
|
26
|
-
css =
|
|
27
|
-
javascript =
|
|
28
|
-
webhook =
|
|
18
|
+
image = 'image'
|
|
19
|
+
video = 'video'
|
|
20
|
+
audio = 'audio'
|
|
21
|
+
vast = 'vast'
|
|
22
|
+
daast = 'daast'
|
|
23
|
+
text = 'text'
|
|
24
|
+
url = 'url'
|
|
25
|
+
html = 'html'
|
|
26
|
+
css = 'css'
|
|
27
|
+
javascript = 'javascript'
|
|
28
|
+
webhook = 'webhook'
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class AssetSelectors(AdCPBaseModel):
|
|
32
32
|
model_config = ConfigDict(
|
|
33
|
-
extra=
|
|
33
|
+
extra='forbid',
|
|
34
34
|
)
|
|
35
35
|
asset_types: Annotated[
|
|
36
36
|
list[AssetType] | None, Field(description="Filter by asset type (e.g., ['image', 'video'])")
|
|
37
37
|
] = None
|
|
38
38
|
exclude_tags: Annotated[
|
|
39
|
-
list[str] | None, Field(description=
|
|
39
|
+
list[str] | None, Field(description='Exclude assets with these tags')
|
|
40
40
|
] = None
|
|
41
41
|
tags: Annotated[
|
|
42
42
|
list[str] | None,
|
|
@@ -46,10 +46,10 @@ class AssetSelectors(AdCPBaseModel):
|
|
|
46
46
|
|
|
47
47
|
class Offering(AdCPBaseModel):
|
|
48
48
|
model_config = ConfigDict(
|
|
49
|
-
extra=
|
|
49
|
+
extra='forbid',
|
|
50
50
|
)
|
|
51
51
|
assets: Annotated[
|
|
52
|
-
list[dict[str, Any]] | None, Field(description=
|
|
52
|
+
list[dict[str, Any]] | None, Field(description='Assets specific to this offering')
|
|
53
53
|
] = None
|
|
54
54
|
description: Annotated[str | None, Field(description="Description of what's being offered")] = (
|
|
55
55
|
None
|
|
@@ -61,42 +61,42 @@ class Offering(AdCPBaseModel):
|
|
|
61
61
|
|
|
62
62
|
class PromotedOfferings(AdCPBaseModel):
|
|
63
63
|
model_config = ConfigDict(
|
|
64
|
-
extra=
|
|
64
|
+
extra='forbid',
|
|
65
65
|
)
|
|
66
66
|
asset_selectors: Annotated[
|
|
67
67
|
AssetSelectors | None,
|
|
68
|
-
Field(description=
|
|
68
|
+
Field(description='Selectors to choose specific assets from the brand manifest'),
|
|
69
69
|
] = None
|
|
70
70
|
brand_manifest: Annotated[
|
|
71
71
|
brand_manifest_1.BrandManifest | AnyUrl,
|
|
72
72
|
Field(
|
|
73
|
-
description=
|
|
73
|
+
description='Brand information manifest containing assets, themes, and guidelines. Can be provided inline or as a URL reference to a hosted manifest.',
|
|
74
74
|
examples=[
|
|
75
75
|
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
'data': {
|
|
77
|
+
'colors': {'primary': '#FF6B35'},
|
|
78
|
+
'name': 'ACME Corporation',
|
|
79
|
+
'url': 'https://acmecorp.com',
|
|
80
80
|
},
|
|
81
|
-
|
|
81
|
+
'description': 'Inline brand manifest',
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
'data': 'https://cdn.acmecorp.com/brand-manifest.json',
|
|
85
|
+
'description': 'URL string reference to hosted manifest',
|
|
86
86
|
},
|
|
87
87
|
],
|
|
88
|
-
title=
|
|
88
|
+
title='Brand Manifest Reference',
|
|
89
89
|
),
|
|
90
90
|
]
|
|
91
91
|
offerings: Annotated[
|
|
92
92
|
list[Offering] | None,
|
|
93
93
|
Field(
|
|
94
|
-
description=
|
|
94
|
+
description='Inline offerings for campaigns without a product catalog. Each offering has a name, description, and associated assets.'
|
|
95
95
|
),
|
|
96
96
|
] = None
|
|
97
97
|
product_selectors: Annotated[
|
|
98
98
|
promoted_products.PromotedProducts | None,
|
|
99
99
|
Field(
|
|
100
|
-
description=
|
|
100
|
+
description='Selectors to choose which products/offerings from the brand manifest product catalog to promote'
|
|
101
101
|
),
|
|
102
102
|
] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: promoted-products.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ from pydantic import ConfigDict, Field
|
|
|
12
12
|
|
|
13
13
|
class PromotedProducts(AdCPBaseModel):
|
|
14
14
|
model_config = ConfigDict(
|
|
15
|
-
extra=
|
|
15
|
+
extra='forbid',
|
|
16
16
|
)
|
|
17
17
|
manifest_category: Annotated[
|
|
18
18
|
str | None,
|
|
@@ -28,7 +28,7 @@ class PromotedProducts(AdCPBaseModel):
|
|
|
28
28
|
] = None
|
|
29
29
|
manifest_skus: Annotated[
|
|
30
30
|
list[str] | None,
|
|
31
|
-
Field(description=
|
|
31
|
+
Field(description='Direct product SKU references from the brand manifest product catalog'),
|
|
32
32
|
] = None
|
|
33
33
|
manifest_tags: Annotated[
|
|
34
34
|
list[str] | None,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: property.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -15,11 +15,11 @@ from . import identifier_types
|
|
|
15
15
|
|
|
16
16
|
class Identifier(AdCPBaseModel):
|
|
17
17
|
model_config = ConfigDict(
|
|
18
|
-
extra=
|
|
18
|
+
extra='forbid',
|
|
19
19
|
)
|
|
20
20
|
type: Annotated[
|
|
21
21
|
identifier_types.PropertyIdentifierTypes,
|
|
22
|
-
Field(description=
|
|
22
|
+
Field(description='Type of identifier for this property'),
|
|
23
23
|
]
|
|
24
24
|
value: Annotated[
|
|
25
25
|
str,
|
|
@@ -30,13 +30,13 @@ class Identifier(AdCPBaseModel):
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class PropertyType(Enum):
|
|
33
|
-
website =
|
|
34
|
-
mobile_app =
|
|
35
|
-
ctv_app =
|
|
36
|
-
dooh =
|
|
37
|
-
podcast =
|
|
38
|
-
radio =
|
|
39
|
-
streaming_audio =
|
|
33
|
+
website = 'website'
|
|
34
|
+
mobile_app = 'mobile_app'
|
|
35
|
+
ctv_app = 'ctv_app'
|
|
36
|
+
dooh = 'dooh'
|
|
37
|
+
podcast = 'podcast'
|
|
38
|
+
radio = 'radio'
|
|
39
|
+
streaming_audio = 'streaming_audio'
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
class Tag(RootModel[str]):
|
|
@@ -44,36 +44,36 @@ class Tag(RootModel[str]):
|
|
|
44
44
|
str,
|
|
45
45
|
Field(
|
|
46
46
|
description="Lowercase tag with underscores (e.g., 'conde_nast_network', 'premium_content')",
|
|
47
|
-
pattern=
|
|
47
|
+
pattern='^[a-z0-9_]+$',
|
|
48
48
|
),
|
|
49
49
|
]
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
class Property(AdCPBaseModel):
|
|
53
53
|
model_config = ConfigDict(
|
|
54
|
-
extra=
|
|
54
|
+
extra='forbid',
|
|
55
55
|
)
|
|
56
56
|
identifiers: Annotated[
|
|
57
|
-
list[Identifier], Field(description=
|
|
57
|
+
list[Identifier], Field(description='Array of identifiers for this property', min_length=1)
|
|
58
58
|
]
|
|
59
|
-
name: Annotated[str, Field(description=
|
|
59
|
+
name: Annotated[str, Field(description='Human-readable property name')]
|
|
60
60
|
property_id: Annotated[
|
|
61
61
|
str | None,
|
|
62
62
|
Field(
|
|
63
63
|
description="Unique identifier for this property (optional). Enables referencing properties by ID instead of repeating full objects. Recommended format: lowercase with underscores (e.g., 'cnn_ctv_app', 'instagram_mobile')",
|
|
64
|
-
pattern=
|
|
64
|
+
pattern='^[a-z0-9_]+$',
|
|
65
65
|
),
|
|
66
66
|
] = None
|
|
67
|
-
property_type: Annotated[PropertyType, Field(description=
|
|
67
|
+
property_type: Annotated[PropertyType, Field(description='Type of advertising property')]
|
|
68
68
|
publisher_domain: Annotated[
|
|
69
69
|
str | None,
|
|
70
70
|
Field(
|
|
71
|
-
description=
|
|
71
|
+
description='Domain where adagents.json should be checked for authorization validation. Required for list_authorized_properties response. Optional in adagents.json (file location implies domain).'
|
|
72
72
|
),
|
|
73
73
|
] = None
|
|
74
74
|
tags: Annotated[
|
|
75
75
|
list[Tag] | None,
|
|
76
76
|
Field(
|
|
77
|
-
description=
|
|
77
|
+
description='Tags for categorization and grouping (e.g., network membership, content categories)'
|
|
78
78
|
),
|
|
79
79
|
] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: protocol-envelope.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -15,47 +15,47 @@ from . import task_status
|
|
|
15
15
|
|
|
16
16
|
class ProtocolEnvelope(AdCPBaseModel):
|
|
17
17
|
model_config = ConfigDict(
|
|
18
|
-
extra=
|
|
18
|
+
extra='forbid',
|
|
19
19
|
)
|
|
20
20
|
context_id: Annotated[
|
|
21
21
|
str | None,
|
|
22
22
|
Field(
|
|
23
|
-
description=
|
|
23
|
+
description='Session/conversation identifier for tracking related operations across multiple task invocations. Managed by the protocol layer to maintain conversational context.'
|
|
24
24
|
),
|
|
25
25
|
] = None
|
|
26
26
|
message: Annotated[
|
|
27
27
|
str | None,
|
|
28
28
|
Field(
|
|
29
|
-
description=
|
|
29
|
+
description='Human-readable summary of the task result. Provides natural language explanation of what happened, suitable for display to end users or for AI agent comprehension. Generated by the protocol layer based on the task response.'
|
|
30
30
|
),
|
|
31
31
|
] = None
|
|
32
32
|
payload: Annotated[
|
|
33
33
|
dict[str, Any],
|
|
34
34
|
Field(
|
|
35
|
-
description=
|
|
35
|
+
description='The actual task-specific response data. This is the content defined in individual task response schemas (e.g., get-products-response.json, create-media-buy-response.json). Contains only domain-specific data without protocol-level fields.'
|
|
36
36
|
),
|
|
37
37
|
]
|
|
38
38
|
push_notification_config: Annotated[
|
|
39
39
|
push_notification_config_1.PushNotificationConfig | None,
|
|
40
40
|
Field(
|
|
41
|
-
description=
|
|
41
|
+
description='Push notification configuration for async task updates (A2A and REST protocols). Echoed from the request to confirm webhook settings. Specifies URL, authentication scheme (Bearer or HMAC-SHA256), and credentials. MCP uses progress notifications instead of webhooks.'
|
|
42
42
|
),
|
|
43
43
|
] = None
|
|
44
44
|
status: Annotated[
|
|
45
45
|
task_status.TaskStatus,
|
|
46
46
|
Field(
|
|
47
|
-
description=
|
|
47
|
+
description='Current task execution state. Indicates whether the task is completed, in progress (working), submitted for async processing, failed, or requires user input. Managed by the protocol layer.'
|
|
48
48
|
),
|
|
49
49
|
]
|
|
50
50
|
task_id: Annotated[
|
|
51
51
|
str | None,
|
|
52
52
|
Field(
|
|
53
|
-
description=
|
|
53
|
+
description='Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.'
|
|
54
54
|
),
|
|
55
55
|
] = None
|
|
56
56
|
timestamp: Annotated[
|
|
57
57
|
AwareDatetime | None,
|
|
58
58
|
Field(
|
|
59
|
-
description=
|
|
59
|
+
description='ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.'
|
|
60
60
|
),
|
|
61
61
|
] = None
|