adcp 2.6.0__tar.gz → 2.7.0__tar.gz
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-2.6.0/src/adcp.egg-info → adcp-2.7.0}/PKG-INFO +1 -1
- {adcp-2.6.0 → adcp-2.7.0}/pyproject.toml +1 -1
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/__init__.py +51 -43
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/client.py +11 -9
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/simple.py +1 -1
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/_generated.py +15 -9
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/aliases.py +16 -17
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/adagents.py +34 -77
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/product.py +9 -76
- adcp-2.7.0/src/adcp/types/generated_poc/publisher_property_selector.py +81 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/stable.py +14 -3
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/utils/preview_cache.py +7 -7
- {adcp-2.6.0 → adcp-2.7.0/src/adcp.egg-info}/PKG-INFO +1 -1
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp.egg-info/SOURCES.txt +1 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_discriminated_unions.py +8 -4
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_type_aliases.py +19 -24
- {adcp-2.6.0 → adcp-2.7.0}/LICENSE +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/README.md +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/setup.cfg +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/__main__.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/adagents.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/config.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/exceptions.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/protocols/__init__.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/protocols/a2a.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/protocols/base.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/protocols/mcp.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/py.typed +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/testing/__init__.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/testing/test_helpers.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/__init__.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/base.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/core.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/__init__.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/activate_signal_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/activate_signal_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/activation_key.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/asset_type.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/audio_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/brand_manifest.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/build_creative_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/build_creative_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/channels.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/cpc_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/cpcv_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/cpm_auction_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/cpm_fixed_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/cpp_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/cpv_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/create_media_buy_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/create_media_buy_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/creative_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/creative_assignment.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/creative_manifest.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/creative_policy.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/creative_status.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/css_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/daast_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/delivery_metrics.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/delivery_type.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/deployment.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/destination.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/error.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/flat_rate_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/format.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/format_id.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/frequency_cap.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/frequency_cap_scope.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/get_media_buy_delivery_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/get_media_buy_delivery_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/get_products_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/get_products_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/get_signals_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/get_signals_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/html_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/identifier_types.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/image_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/javascript_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/list_authorized_properties_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/list_authorized_properties_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/list_creative_formats_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/list_creative_formats_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/list_creatives_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/list_creatives_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/markdown_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/measurement.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/media_buy.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/media_buy_status.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/pacing.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/package.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/package_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/package_status.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/performance_feedback.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/placement.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/preview_creative_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/preview_creative_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/preview_render.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/pricing_model.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/promoted_offerings.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/promoted_products.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/property.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/protocol_envelope.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/provide_performance_feedback_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/provide_performance_feedback_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/publisher_identifier_types.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/push_notification_config.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/reporting_capabilities.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/standard_format_ids.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/sub_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/sync_creatives_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/sync_creatives_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/targeting.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/task_status.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/task_type.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/tasks_get_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/tasks_get_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/tasks_list_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/tasks_list_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/text_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/update_media_buy_request.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/update_media_buy_response.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/url_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/vast_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/vcpm_auction_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/vcpm_fixed_option.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/video_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/webhook_asset.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/types/generated_poc/webhook_payload.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/utils/__init__.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/utils/operation_id.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/utils/response_parser.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp/validation.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp.egg-info/dependency_links.txt +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp.egg-info/entry_points.txt +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp.egg-info/requires.txt +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/src/adcp.egg-info/top_level.txt +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_adagents.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_cli.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_client.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_code_generation.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_format_id_validation.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_helpers.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_preview_html.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_protocols.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_public_api.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_response_parser.py +0 -0
- {adcp-2.6.0 → adcp-2.7.0}/tests/test_simple_api.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "adcp"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.7.0"
|
|
8
8
|
description = "Official Python client for the Ad Context Protocol (AdCP)"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "AdCP Community", email = "maintainers@adcontextprotocol.org"}
|
|
@@ -56,47 +56,6 @@ from adcp.testing import (
|
|
|
56
56
|
from adcp.types import _generated as generated
|
|
57
57
|
from adcp.types import aliases
|
|
58
58
|
|
|
59
|
-
# Re-export commonly-used request/response types for convenience
|
|
60
|
-
# Users should import from main package (e.g., `from adcp import GetProductsRequest`)
|
|
61
|
-
# rather than internal modules for better API stability
|
|
62
|
-
from adcp.types._generated import (
|
|
63
|
-
# Audience & Targeting
|
|
64
|
-
ActivateSignalRequest,
|
|
65
|
-
ActivateSignalResponse,
|
|
66
|
-
# Creative Operations
|
|
67
|
-
BuildCreativeRequest,
|
|
68
|
-
BuildCreativeResponse,
|
|
69
|
-
# Media Buy Operations
|
|
70
|
-
CreateMediaBuyRequest,
|
|
71
|
-
CreateMediaBuyResponse,
|
|
72
|
-
# Common data types
|
|
73
|
-
Error,
|
|
74
|
-
Format,
|
|
75
|
-
GetMediaBuyDeliveryRequest,
|
|
76
|
-
GetMediaBuyDeliveryResponse,
|
|
77
|
-
GetProductsRequest,
|
|
78
|
-
GetProductsResponse,
|
|
79
|
-
GetSignalsRequest,
|
|
80
|
-
GetSignalsResponse,
|
|
81
|
-
ListAuthorizedPropertiesRequest,
|
|
82
|
-
ListAuthorizedPropertiesResponse,
|
|
83
|
-
ListCreativeFormatsRequest,
|
|
84
|
-
ListCreativeFormatsResponse,
|
|
85
|
-
ListCreativesRequest,
|
|
86
|
-
ListCreativesResponse,
|
|
87
|
-
PreviewCreativeRequest,
|
|
88
|
-
PreviewCreativeResponse,
|
|
89
|
-
Product,
|
|
90
|
-
Property,
|
|
91
|
-
ProvidePerformanceFeedbackRequest,
|
|
92
|
-
ProvidePerformanceFeedbackResponse,
|
|
93
|
-
SyncCreativesRequest,
|
|
94
|
-
SyncCreativesResponse,
|
|
95
|
-
UpdateMediaBuyRequest,
|
|
96
|
-
UpdateMediaBuyResponse,
|
|
97
|
-
)
|
|
98
|
-
from adcp.types._generated import TaskStatus as GeneratedTaskStatus
|
|
99
|
-
|
|
100
59
|
# Re-export semantic type aliases for better ergonomics
|
|
101
60
|
from adcp.types.aliases import (
|
|
102
61
|
ActivateSignalErrorResponse,
|
|
@@ -141,11 +100,20 @@ from adcp.types.aliases import (
|
|
|
141
100
|
)
|
|
142
101
|
from adcp.types.core import AgentConfig, Protocol, TaskResult, TaskStatus, WebhookMetadata
|
|
143
102
|
|
|
103
|
+
# Re-export commonly-used request/response types for convenience
|
|
104
|
+
# Users should import from main package (e.g., `from adcp import GetProductsRequest`)
|
|
105
|
+
# rather than internal modules for better API stability
|
|
144
106
|
# Re-export core domain types and pricing options from stable API
|
|
145
107
|
# These are commonly used in typical workflows
|
|
146
108
|
from adcp.types.stable import (
|
|
109
|
+
# Audience & Targeting
|
|
110
|
+
ActivateSignalRequest,
|
|
111
|
+
ActivateSignalResponse,
|
|
147
112
|
# Core domain types
|
|
148
113
|
BrandManifest,
|
|
114
|
+
# Creative Operations
|
|
115
|
+
BuildCreativeRequest,
|
|
116
|
+
BuildCreativeResponse,
|
|
149
117
|
# Pricing options (all 9 types for product creation)
|
|
150
118
|
CpcPricingOption,
|
|
151
119
|
CpcvPricingOption,
|
|
@@ -153,19 +121,54 @@ from adcp.types.stable import (
|
|
|
153
121
|
CpmFixedRatePricingOption,
|
|
154
122
|
CppPricingOption,
|
|
155
123
|
CpvPricingOption,
|
|
124
|
+
# Media Buy Operations
|
|
125
|
+
CreateMediaBuyRequest,
|
|
126
|
+
CreateMediaBuyResponse,
|
|
156
127
|
Creative,
|
|
157
128
|
CreativeManifest,
|
|
158
129
|
# Status enums (for control flow)
|
|
159
130
|
CreativeStatus,
|
|
131
|
+
# Common data types
|
|
132
|
+
Error,
|
|
160
133
|
FlatRatePricingOption,
|
|
134
|
+
Format,
|
|
135
|
+
FormatId,
|
|
136
|
+
GetMediaBuyDeliveryRequest,
|
|
137
|
+
GetMediaBuyDeliveryResponse,
|
|
138
|
+
GetProductsRequest,
|
|
139
|
+
GetProductsResponse,
|
|
140
|
+
GetSignalsRequest,
|
|
141
|
+
GetSignalsResponse,
|
|
142
|
+
ListAuthorizedPropertiesRequest,
|
|
143
|
+
ListAuthorizedPropertiesResponse,
|
|
144
|
+
ListCreativeFormatsRequest,
|
|
145
|
+
ListCreativeFormatsResponse,
|
|
146
|
+
ListCreativesRequest,
|
|
147
|
+
ListCreativesResponse,
|
|
161
148
|
MediaBuy,
|
|
162
149
|
MediaBuyStatus,
|
|
163
150
|
Package,
|
|
151
|
+
PackageRequest,
|
|
164
152
|
PackageStatus,
|
|
153
|
+
PreviewCreativeRequest,
|
|
154
|
+
PreviewCreativeResponse,
|
|
155
|
+
PriceGuidance,
|
|
165
156
|
PricingModel,
|
|
157
|
+
Product,
|
|
158
|
+
Property,
|
|
159
|
+
ProvidePerformanceFeedbackRequest,
|
|
160
|
+
ProvidePerformanceFeedbackResponse,
|
|
161
|
+
PushNotificationConfig,
|
|
162
|
+
SyncCreativesRequest,
|
|
163
|
+
SyncCreativesResponse,
|
|
164
|
+
UpdateMediaBuyRequest,
|
|
165
|
+
UpdateMediaBuyResponse,
|
|
166
166
|
VcpmAuctionPricingOption,
|
|
167
167
|
VcpmFixedRatePricingOption,
|
|
168
168
|
)
|
|
169
|
+
from adcp.types.stable import (
|
|
170
|
+
TaskStatus as GeneratedTaskStatus,
|
|
171
|
+
)
|
|
169
172
|
from adcp.validation import (
|
|
170
173
|
ValidationError,
|
|
171
174
|
validate_adagents,
|
|
@@ -174,7 +177,7 @@ from adcp.validation import (
|
|
|
174
177
|
validate_publisher_properties_item,
|
|
175
178
|
)
|
|
176
179
|
|
|
177
|
-
__version__ = "2.
|
|
180
|
+
__version__ = "2.7.0"
|
|
178
181
|
|
|
179
182
|
__all__ = [
|
|
180
183
|
# Client classes
|
|
@@ -215,6 +218,7 @@ __all__ = [
|
|
|
215
218
|
"ProvidePerformanceFeedbackResponse",
|
|
216
219
|
"Error",
|
|
217
220
|
"Format",
|
|
221
|
+
"FormatId",
|
|
218
222
|
"Product",
|
|
219
223
|
"Property",
|
|
220
224
|
# Core domain types (from stable API)
|
|
@@ -223,6 +227,7 @@ __all__ = [
|
|
|
223
227
|
"CreativeManifest",
|
|
224
228
|
"MediaBuy",
|
|
225
229
|
"Package",
|
|
230
|
+
"PackageRequest",
|
|
226
231
|
# Package type aliases
|
|
227
232
|
"CreatedPackageReference",
|
|
228
233
|
# Status enums (for control flow)
|
|
@@ -230,7 +235,7 @@ __all__ = [
|
|
|
230
235
|
"MediaBuyStatus",
|
|
231
236
|
"PackageStatus",
|
|
232
237
|
"PricingModel",
|
|
233
|
-
# Pricing
|
|
238
|
+
# Pricing-related types
|
|
234
239
|
"CpcPricingOption",
|
|
235
240
|
"CpcvPricingOption",
|
|
236
241
|
"CpmAuctionPricingOption",
|
|
@@ -238,8 +243,11 @@ __all__ = [
|
|
|
238
243
|
"CppPricingOption",
|
|
239
244
|
"CpvPricingOption",
|
|
240
245
|
"FlatRatePricingOption",
|
|
246
|
+
"PriceGuidance",
|
|
241
247
|
"VcpmAuctionPricingOption",
|
|
242
248
|
"VcpmFixedRatePricingOption",
|
|
249
|
+
# Configuration types
|
|
250
|
+
"PushNotificationConfig",
|
|
243
251
|
# Adagents validation
|
|
244
252
|
"AuthorizationContext",
|
|
245
253
|
"fetch_adagents",
|
|
@@ -17,7 +17,15 @@ from adcp.exceptions import ADCPWebhookSignatureError
|
|
|
17
17
|
from adcp.protocols.a2a import A2AAdapter
|
|
18
18
|
from adcp.protocols.base import ProtocolAdapter
|
|
19
19
|
from adcp.protocols.mcp import MCPAdapter
|
|
20
|
-
from adcp.types.
|
|
20
|
+
from adcp.types.core import (
|
|
21
|
+
Activity,
|
|
22
|
+
ActivityType,
|
|
23
|
+
AgentConfig,
|
|
24
|
+
Protocol,
|
|
25
|
+
TaskResult,
|
|
26
|
+
TaskStatus,
|
|
27
|
+
)
|
|
28
|
+
from adcp.types.stable import (
|
|
21
29
|
ActivateSignalRequest,
|
|
22
30
|
ActivateSignalResponse,
|
|
23
31
|
GetMediaBuyDeliveryRequest,
|
|
@@ -40,15 +48,9 @@ from adcp.types._generated import (
|
|
|
40
48
|
SyncCreativesResponse,
|
|
41
49
|
WebhookPayload,
|
|
42
50
|
)
|
|
43
|
-
from adcp.types.
|
|
44
|
-
|
|
45
|
-
ActivityType,
|
|
46
|
-
AgentConfig,
|
|
47
|
-
Protocol,
|
|
48
|
-
TaskResult,
|
|
49
|
-
TaskStatus,
|
|
51
|
+
from adcp.types.stable import (
|
|
52
|
+
TaskStatus as GeneratedTaskStatus,
|
|
50
53
|
)
|
|
51
|
-
from adcp.types.generated_poc.task_status import TaskStatus as GeneratedTaskStatus
|
|
52
54
|
from adcp.utils.operation_id import create_operation_id
|
|
53
55
|
|
|
54
56
|
logger = logging.getLogger(__name__)
|
|
@@ -23,7 +23,7 @@ from __future__ import annotations
|
|
|
23
23
|
from typing import TYPE_CHECKING, Any
|
|
24
24
|
|
|
25
25
|
from adcp.exceptions import ADCPSimpleAPIError
|
|
26
|
-
from adcp.types.
|
|
26
|
+
from adcp.types.stable import (
|
|
27
27
|
ActivateSignalRequest,
|
|
28
28
|
ActivateSignalResponse,
|
|
29
29
|
GetMediaBuyDeliveryRequest,
|
|
@@ -10,7 +10,7 @@ Auto-generated by datamodel-code-generator from JSON schemas.
|
|
|
10
10
|
DO NOT EDIT MANUALLY.
|
|
11
11
|
|
|
12
12
|
Generated from: https://github.com/adcontextprotocol/adcp/tree/main/schemas
|
|
13
|
-
Generation date: 2025-11-
|
|
13
|
+
Generation date: 2025-11-19 02:03:09 UTC
|
|
14
14
|
"""
|
|
15
15
|
# ruff: noqa: E501, I001
|
|
16
16
|
from __future__ import annotations
|
|
@@ -19,7 +19,7 @@ from __future__ import annotations
|
|
|
19
19
|
from adcp.types.generated_poc.activate_signal_request import ActivateSignalRequest
|
|
20
20
|
from adcp.types.generated_poc.activate_signal_response import ActivateSignalResponse, ActivateSignalResponse1, ActivateSignalResponse2
|
|
21
21
|
from adcp.types.generated_poc.activation_key import ActivationKey1, ActivationKey2
|
|
22
|
-
from adcp.types.generated_poc.adagents import AuthorizedAgents, AuthorizedAgents1, AuthorizedAgents2, AuthorizedAgents3, AuthorizedSalesAgents, Contact, PropertyId, PropertyTag,
|
|
22
|
+
from adcp.types.generated_poc.adagents import AuthorizedAgents, AuthorizedAgents1, AuthorizedAgents2, AuthorizedAgents3, AuthorizedSalesAgents, Contact, PropertyId, PropertyTag, Tags
|
|
23
23
|
from adcp.types.generated_poc.asset_type import AssetTypeSchema, ContentLength, Dimensions, Duration, FileSize, Quality, Requirements, Type
|
|
24
24
|
from adcp.types.generated_poc.audio_asset import AudioAsset
|
|
25
25
|
from adcp.types.generated_poc.brand_manifest import Asset, AssetType, BrandManifest, Colors, Disclaimer, FeedFormat, Fonts, Logo, Metadata, ProductCatalog, UpdateFrequency
|
|
@@ -33,7 +33,7 @@ from adcp.types.generated_poc.cpm_fixed_option import CpmFixedRatePricingOption
|
|
|
33
33
|
from adcp.types.generated_poc.cpp_option import CppPricingOption, Parameters
|
|
34
34
|
from adcp.types.generated_poc.cpv_option import CpvPricingOption, ViewThreshold, ViewThreshold1
|
|
35
35
|
from adcp.types.generated_poc.create_media_buy_request import CreateMediaBuyRequest, ReportingFrequency, ReportingWebhook, RequestedMetric
|
|
36
|
-
from adcp.types.generated_poc.create_media_buy_response import CreateMediaBuyResponse, CreateMediaBuyResponse1, CreateMediaBuyResponse2
|
|
36
|
+
from adcp.types.generated_poc.create_media_buy_response import CreateMediaBuyResponse, CreateMediaBuyResponse1, CreateMediaBuyResponse2
|
|
37
37
|
from adcp.types.generated_poc.creative_asset import CreativeAsset, Input
|
|
38
38
|
from adcp.types.generated_poc.creative_assignment import CreativeAssignment
|
|
39
39
|
from adcp.types.generated_poc.creative_manifest import CreativeManifest
|
|
@@ -80,7 +80,7 @@ from adcp.types.generated_poc.preview_creative_request import Input2, OutputForm
|
|
|
80
80
|
from adcp.types.generated_poc.preview_creative_response import Input4, Preview, Preview1, Preview2, PreviewCreativeResponse, PreviewCreativeResponse1, PreviewCreativeResponse2, Response, Response1, Results, Results1
|
|
81
81
|
from adcp.types.generated_poc.preview_render import Embedding, PreviewRender, PreviewRender1, PreviewRender2, PreviewRender3
|
|
82
82
|
from adcp.types.generated_poc.pricing_model import PricingModel
|
|
83
|
-
from adcp.types.generated_poc.product import DeliveryMeasurement, Product, ProductCard, ProductCardDetailed
|
|
83
|
+
from adcp.types.generated_poc.product import DeliveryMeasurement, Product, ProductCard, ProductCardDetailed
|
|
84
84
|
from adcp.types.generated_poc.promoted_offerings import AssetSelectors, Offering, PromotedOfferings
|
|
85
85
|
from adcp.types.generated_poc.promoted_products import PromotedProducts
|
|
86
86
|
from adcp.types.generated_poc.property import Identifier, Property, PropertyType, Tag
|
|
@@ -88,6 +88,7 @@ from adcp.types.generated_poc.protocol_envelope import ProtocolEnvelope
|
|
|
88
88
|
from adcp.types.generated_poc.provide_performance_feedback_request import ProvidePerformanceFeedbackRequest
|
|
89
89
|
from adcp.types.generated_poc.provide_performance_feedback_response import ProvidePerformanceFeedbackResponse, ProvidePerformanceFeedbackResponse1, ProvidePerformanceFeedbackResponse2
|
|
90
90
|
from adcp.types.generated_poc.publisher_identifier_types import PublisherIdentifierTypes
|
|
91
|
+
from adcp.types.generated_poc.publisher_property_selector import PublisherPropertySelector1, PublisherPropertySelector2, PublisherPropertySelector3
|
|
91
92
|
from adcp.types.generated_poc.push_notification_config import Authentication, PushNotificationConfig, Scheme
|
|
92
93
|
from adcp.types.generated_poc.reporting_capabilities import AvailableMetric, AvailableReportingFrequency, ReportingCapabilities
|
|
93
94
|
from adcp.types.generated_poc.response import ProtocolResponse
|
|
@@ -113,6 +114,10 @@ from adcp.types.generated_poc.video_asset import VideoAsset
|
|
|
113
114
|
from adcp.types.generated_poc.webhook_asset import Method, Method1, ResponseType, Security, WebhookAsset
|
|
114
115
|
from adcp.types.generated_poc.webhook_payload import WebhookPayload
|
|
115
116
|
|
|
117
|
+
# Special imports for name collisions (qualified names for types defined in multiple modules)
|
|
118
|
+
from adcp.types.generated_poc.create_media_buy_response import Package as _PackageFromCreateMediaBuyResponse
|
|
119
|
+
from adcp.types.generated_poc.package import Package as _PackageFromPackage
|
|
120
|
+
|
|
116
121
|
# Backward compatibility aliases for renamed types
|
|
117
122
|
Channels = AdvertisingChannels
|
|
118
123
|
|
|
@@ -146,9 +151,9 @@ __all__ = [
|
|
|
146
151
|
"ListCreativesResponse", "Logo", "MarkdownAsset", "MarkdownFlavor", "Measurement",
|
|
147
152
|
"MeasurementPeriod", "MediaBuy", "MediaBuyDelivery", "MediaBuyStatus", "Metadata", "Method",
|
|
148
153
|
"Method1", "MetricType", "ModuleType", "NotificationType", "Offering", "OutputFormat",
|
|
149
|
-
"Pacing", "
|
|
150
|
-
"
|
|
151
|
-
"
|
|
154
|
+
"Pacing", "PackageRequest", "PackageStatus", "Packages", "Packages1", "Packages2", "Packages3",
|
|
155
|
+
"Pagination", "Parameters", "Performance", "PerformanceFeedback", "Placement", "Preview",
|
|
156
|
+
"Preview1", "Preview2", "PreviewCreativeRequest", "PreviewCreativeRequest1",
|
|
152
157
|
"PreviewCreativeRequest2", "PreviewCreativeResponse", "PreviewCreativeResponse1",
|
|
153
158
|
"PreviewCreativeResponse2", "PreviewRender", "PreviewRender1", "PreviewRender2",
|
|
154
159
|
"PreviewRender3", "PriceGuidance", "Pricing", "PricingModel", "PrimaryCountry", "Product",
|
|
@@ -157,7 +162,7 @@ __all__ = [
|
|
|
157
162
|
"PropertyType", "ProtocolEnvelope", "ProtocolResponse", "ProvidePerformanceFeedbackRequest",
|
|
158
163
|
"ProvidePerformanceFeedbackResponse", "ProvidePerformanceFeedbackResponse1",
|
|
159
164
|
"ProvidePerformanceFeedbackResponse2", "PublisherDomain", "PublisherIdentifierTypes",
|
|
160
|
-
"
|
|
165
|
+
"PublisherPropertySelector1", "PublisherPropertySelector2", "PublisherPropertySelector3",
|
|
161
166
|
"PushNotificationConfig", "Quality", "QuartileData", "QuerySummary", "Render",
|
|
162
167
|
"ReportingCapabilities", "ReportingFrequency", "ReportingPeriod", "ReportingWebhook",
|
|
163
168
|
"Request", "RequestedMetric", "Requirements", "Response", "Response1", "ResponseType",
|
|
@@ -171,5 +176,6 @@ __all__ = [
|
|
|
171
176
|
"UpdateMediaBuyResponse", "UpdateMediaBuyResponse1", "UpdateMediaBuyResponse2", "UrlAsset",
|
|
172
177
|
"UrlType", "ValidationMode", "VastAsset1", "VastAsset2", "VastVersion",
|
|
173
178
|
"VcpmAuctionPricingOption", "VcpmFixedRatePricingOption", "VenueBreakdownItem", "VideoAsset",
|
|
174
|
-
"ViewThreshold", "ViewThreshold1", "WebhookAsset", "WebhookPayload"
|
|
179
|
+
"ViewThreshold", "ViewThreshold1", "WebhookAsset", "WebhookPayload",
|
|
180
|
+
"_PackageFromCreateMediaBuyResponse", "_PackageFromPackage"
|
|
175
181
|
]
|
|
@@ -31,7 +31,6 @@ immediately rather than at runtime when users try to use the aliases.
|
|
|
31
31
|
|
|
32
32
|
from __future__ import annotations
|
|
33
33
|
|
|
34
|
-
# Import all generated types that need semantic aliases
|
|
35
34
|
from adcp.types._generated import (
|
|
36
35
|
# Activation responses
|
|
37
36
|
ActivateSignalResponse1,
|
|
@@ -64,6 +63,9 @@ from adcp.types._generated import (
|
|
|
64
63
|
PreviewRender1,
|
|
65
64
|
PreviewRender2,
|
|
66
65
|
PreviewRender3,
|
|
66
|
+
# Publisher properties types
|
|
67
|
+
PropertyId,
|
|
68
|
+
PropertyTag,
|
|
67
69
|
# Performance feedback responses
|
|
68
70
|
ProvidePerformanceFeedbackResponse1,
|
|
69
71
|
ProvidePerformanceFeedbackResponse2,
|
|
@@ -83,26 +85,23 @@ from adcp.types._generated import (
|
|
|
83
85
|
VastAsset1,
|
|
84
86
|
VastAsset2,
|
|
85
87
|
)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
from adcp.types.generated_poc.create_media_buy_response import (
|
|
89
|
-
Package as CreatedPackageInternal,
|
|
88
|
+
from adcp.types._generated import (
|
|
89
|
+
PublisherPropertySelector1 as PublisherPropertiesInternal,
|
|
90
90
|
)
|
|
91
|
-
from adcp.types.
|
|
92
|
-
|
|
93
|
-
# Import PublisherProperties types and related types from product module
|
|
94
|
-
from adcp.types.generated_poc.product import (
|
|
95
|
-
PropertyId,
|
|
96
|
-
PropertyTag,
|
|
91
|
+
from adcp.types._generated import (
|
|
92
|
+
PublisherPropertySelector2 as PublisherPropertiesByIdInternal,
|
|
97
93
|
)
|
|
98
|
-
from adcp.types.
|
|
99
|
-
|
|
94
|
+
from adcp.types._generated import (
|
|
95
|
+
PublisherPropertySelector3 as PublisherPropertiesByTagInternal,
|
|
100
96
|
)
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
|
|
98
|
+
# Import all generated types that need semantic aliases
|
|
99
|
+
from adcp.types._generated import (
|
|
100
|
+
# Package types (from name collision resolution)
|
|
101
|
+
_PackageFromCreateMediaBuyResponse as CreatedPackageInternal,
|
|
103
102
|
)
|
|
104
|
-
from adcp.types.
|
|
105
|
-
|
|
103
|
+
from adcp.types._generated import (
|
|
104
|
+
_PackageFromPackage as FullPackageInternal,
|
|
106
105
|
)
|
|
107
106
|
|
|
108
107
|
# ============================================================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: adagents.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-19T02:02:39+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ from typing import Annotated, Literal
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
10
|
from pydantic import AnyUrl, AwareDatetime, ConfigDict, EmailStr, Field, RootModel
|
|
11
11
|
|
|
12
|
-
from . import property
|
|
12
|
+
from . import property, publisher_property_selector
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class PropertyId(RootModel[str]):
|
|
@@ -72,81 +72,6 @@ class AuthorizedAgents1(AdCPBaseModel):
|
|
|
72
72
|
url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
class PublisherProperties(AdCPBaseModel):
|
|
76
|
-
model_config = ConfigDict(
|
|
77
|
-
extra='forbid',
|
|
78
|
-
)
|
|
79
|
-
property_ids: Annotated[
|
|
80
|
-
list[PropertyId],
|
|
81
|
-
Field(
|
|
82
|
-
description="Specific property IDs from the publisher's adagents.json properties array",
|
|
83
|
-
min_length=1,
|
|
84
|
-
),
|
|
85
|
-
]
|
|
86
|
-
publisher_domain: Annotated[
|
|
87
|
-
str,
|
|
88
|
-
Field(
|
|
89
|
-
description="Domain where the publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
90
|
-
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
91
|
-
),
|
|
92
|
-
]
|
|
93
|
-
selection_type: Annotated[
|
|
94
|
-
Literal['by_id'],
|
|
95
|
-
Field(description='Discriminator indicating selection by specific property IDs'),
|
|
96
|
-
]
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
class PublisherProperties1(AdCPBaseModel):
|
|
100
|
-
model_config = ConfigDict(
|
|
101
|
-
extra='forbid',
|
|
102
|
-
)
|
|
103
|
-
property_tags: Annotated[
|
|
104
|
-
list[PropertyTag],
|
|
105
|
-
Field(
|
|
106
|
-
description="Property tags from the publisher's adagents.json tags. Agent is authorized for all properties with these tags",
|
|
107
|
-
min_length=1,
|
|
108
|
-
),
|
|
109
|
-
]
|
|
110
|
-
publisher_domain: Annotated[
|
|
111
|
-
str,
|
|
112
|
-
Field(
|
|
113
|
-
description="Domain where the publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
114
|
-
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
115
|
-
),
|
|
116
|
-
]
|
|
117
|
-
selection_type: Annotated[
|
|
118
|
-
Literal['by_tag'], Field(description='Discriminator indicating selection by property tags')
|
|
119
|
-
]
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
class AuthorizedAgents3(AdCPBaseModel):
|
|
123
|
-
model_config = ConfigDict(
|
|
124
|
-
extra='forbid',
|
|
125
|
-
)
|
|
126
|
-
authorization_type: Annotated[
|
|
127
|
-
Literal['publisher_properties'],
|
|
128
|
-
Field(
|
|
129
|
-
description='Discriminator indicating authorization for properties from other publisher domains'
|
|
130
|
-
),
|
|
131
|
-
]
|
|
132
|
-
authorized_for: Annotated[
|
|
133
|
-
str,
|
|
134
|
-
Field(
|
|
135
|
-
description='Human-readable description of what this agent is authorized to sell',
|
|
136
|
-
max_length=500,
|
|
137
|
-
min_length=1,
|
|
138
|
-
),
|
|
139
|
-
]
|
|
140
|
-
publisher_properties: Annotated[
|
|
141
|
-
list[PublisherProperties | PublisherProperties1],
|
|
142
|
-
Field(
|
|
143
|
-
description='Properties from other publisher domains this agent is authorized for. Each entry specifies a publisher domain and which of their properties this agent can sell',
|
|
144
|
-
min_length=1,
|
|
145
|
-
),
|
|
146
|
-
]
|
|
147
|
-
url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]
|
|
148
|
-
|
|
149
|
-
|
|
150
75
|
class Contact(AdCPBaseModel):
|
|
151
76
|
model_config = ConfigDict(
|
|
152
77
|
extra='forbid',
|
|
@@ -226,6 +151,38 @@ class AuthorizedAgents2(AdCPBaseModel):
|
|
|
226
151
|
url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]
|
|
227
152
|
|
|
228
153
|
|
|
154
|
+
class AuthorizedAgents3(AdCPBaseModel):
|
|
155
|
+
model_config = ConfigDict(
|
|
156
|
+
extra='forbid',
|
|
157
|
+
)
|
|
158
|
+
authorization_type: Annotated[
|
|
159
|
+
Literal['publisher_properties'],
|
|
160
|
+
Field(
|
|
161
|
+
description='Discriminator indicating authorization for properties from other publisher domains'
|
|
162
|
+
),
|
|
163
|
+
]
|
|
164
|
+
authorized_for: Annotated[
|
|
165
|
+
str,
|
|
166
|
+
Field(
|
|
167
|
+
description='Human-readable description of what this agent is authorized to sell',
|
|
168
|
+
max_length=500,
|
|
169
|
+
min_length=1,
|
|
170
|
+
),
|
|
171
|
+
]
|
|
172
|
+
publisher_properties: Annotated[
|
|
173
|
+
list[
|
|
174
|
+
publisher_property_selector.PublisherPropertySelector1
|
|
175
|
+
| publisher_property_selector.PublisherPropertySelector2
|
|
176
|
+
| publisher_property_selector.PublisherPropertySelector3
|
|
177
|
+
],
|
|
178
|
+
Field(
|
|
179
|
+
description='Properties from other publisher domains this agent is authorized for. Each entry specifies a publisher domain and which of their properties this agent can sell',
|
|
180
|
+
min_length=1,
|
|
181
|
+
),
|
|
182
|
+
]
|
|
183
|
+
url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]
|
|
184
|
+
|
|
185
|
+
|
|
229
186
|
class AuthorizedSalesAgents(AdCPBaseModel):
|
|
230
187
|
model_config = ConfigDict(
|
|
231
188
|
extra='forbid',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: product.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-19T02:02:39+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
-
from typing import Annotated, Any
|
|
7
|
+
from typing import Annotated, Any
|
|
8
8
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
|
-
from pydantic import AwareDatetime, ConfigDict, Field
|
|
10
|
+
from pydantic import AwareDatetime, ConfigDict, Field
|
|
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
|
|
@@ -15,7 +15,7 @@ from . import delivery_type as delivery_type_1
|
|
|
15
15
|
from . import flat_rate_option
|
|
16
16
|
from . import format_id as format_id_1
|
|
17
17
|
from . import measurement as measurement_1
|
|
18
|
-
from . import placement
|
|
18
|
+
from . import placement, publisher_property_selector
|
|
19
19
|
from . import reporting_capabilities as reporting_capabilities_1
|
|
20
20
|
from . import vcpm_auction_option, vcpm_fixed_option
|
|
21
21
|
|
|
@@ -69,77 +69,6 @@ class ProductCardDetailed(AdCPBaseModel):
|
|
|
69
69
|
]
|
|
70
70
|
|
|
71
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'
|
|
87
|
-
),
|
|
88
|
-
]
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
class PropertyId(RootModel[str]):
|
|
92
|
-
root: Annotated[str, Field(pattern='^[a-z0-9_]+$')]
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class PublisherProperties4(AdCPBaseModel):
|
|
96
|
-
model_config = ConfigDict(
|
|
97
|
-
extra='forbid',
|
|
98
|
-
)
|
|
99
|
-
property_ids: Annotated[
|
|
100
|
-
list[PropertyId],
|
|
101
|
-
Field(description="Specific property IDs from the publisher's adagents.json", min_length=1),
|
|
102
|
-
]
|
|
103
|
-
publisher_domain: Annotated[
|
|
104
|
-
str,
|
|
105
|
-
Field(
|
|
106
|
-
description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
107
|
-
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
108
|
-
),
|
|
109
|
-
]
|
|
110
|
-
selection_type: Annotated[
|
|
111
|
-
Literal['by_id'],
|
|
112
|
-
Field(description='Discriminator indicating selection by specific property IDs'),
|
|
113
|
-
]
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
class PropertyTag(PropertyId):
|
|
117
|
-
pass
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
class PublisherProperties5(AdCPBaseModel):
|
|
121
|
-
model_config = ConfigDict(
|
|
122
|
-
extra='forbid',
|
|
123
|
-
)
|
|
124
|
-
property_tags: Annotated[
|
|
125
|
-
list[PropertyTag],
|
|
126
|
-
Field(
|
|
127
|
-
description="Property tags from the publisher's adagents.json. Product covers all properties with these tags",
|
|
128
|
-
min_length=1,
|
|
129
|
-
),
|
|
130
|
-
]
|
|
131
|
-
publisher_domain: Annotated[
|
|
132
|
-
str,
|
|
133
|
-
Field(
|
|
134
|
-
description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
135
|
-
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
136
|
-
),
|
|
137
|
-
]
|
|
138
|
-
selection_type: Annotated[
|
|
139
|
-
Literal['by_tag'], Field(description='Discriminator indicating selection by property tags')
|
|
140
|
-
]
|
|
141
|
-
|
|
142
|
-
|
|
143
72
|
class Product(AdCPBaseModel):
|
|
144
73
|
model_config = ConfigDict(
|
|
145
74
|
extra='forbid',
|
|
@@ -212,7 +141,11 @@ class Product(AdCPBaseModel):
|
|
|
212
141
|
] = None
|
|
213
142
|
product_id: Annotated[str, Field(description='Unique identifier for the product')]
|
|
214
143
|
publisher_properties: Annotated[
|
|
215
|
-
list[
|
|
144
|
+
list[
|
|
145
|
+
publisher_property_selector.PublisherPropertySelector1
|
|
146
|
+
| publisher_property_selector.PublisherPropertySelector2
|
|
147
|
+
| publisher_property_selector.PublisherPropertySelector3
|
|
148
|
+
],
|
|
216
149
|
Field(
|
|
217
150
|
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.",
|
|
218
151
|
min_length=1,
|