adcp 2.4.0__py3-none-any.whl → 2.5.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 +91 -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 +69 -2
- adcp/types/{generated.py → _generated.py} +67 -11
- adcp/types/aliases.py +55 -1
- adcp/types/generated_poc/__init__.py +1 -1
- adcp/types/generated_poc/activate_signal_request.py +1 -1
- adcp/types/generated_poc/activate_signal_response.py +1 -1
- adcp/types/generated_poc/activation_key.py +1 -1
- adcp/types/generated_poc/adagents.py +1 -1
- adcp/types/generated_poc/asset_type.py +1 -1
- adcp/types/generated_poc/audio_asset.py +1 -1
- adcp/types/generated_poc/brand_manifest.py +3 -62
- adcp/types/generated_poc/build_creative_request.py +1 -1
- adcp/types/generated_poc/build_creative_response.py +1 -1
- adcp/types/generated_poc/channels.py +1 -1
- adcp/types/generated_poc/cpc_option.py +1 -1
- adcp/types/generated_poc/cpcv_option.py +1 -1
- adcp/types/generated_poc/cpm_auction_option.py +1 -1
- adcp/types/generated_poc/cpm_fixed_option.py +1 -1
- adcp/types/generated_poc/cpp_option.py +1 -1
- adcp/types/generated_poc/cpv_option.py +1 -1
- adcp/types/generated_poc/create_media_buy_request.py +2 -2
- adcp/types/generated_poc/create_media_buy_response.py +1 -1
- adcp/types/generated_poc/creative_asset.py +1 -1
- adcp/types/generated_poc/creative_assignment.py +1 -1
- adcp/types/generated_poc/creative_manifest.py +1 -1
- adcp/types/generated_poc/creative_policy.py +1 -1
- adcp/types/generated_poc/creative_status.py +1 -1
- adcp/types/generated_poc/css_asset.py +1 -1
- adcp/types/generated_poc/daast_asset.py +1 -1
- adcp/types/generated_poc/delivery_metrics.py +1 -1
- adcp/types/generated_poc/delivery_type.py +1 -1
- adcp/types/generated_poc/deployment.py +1 -1
- adcp/types/generated_poc/destination.py +1 -1
- adcp/types/generated_poc/error.py +1 -1
- adcp/types/generated_poc/flat_rate_option.py +1 -1
- adcp/types/generated_poc/format.py +1 -1
- adcp/types/generated_poc/format_id.py +1 -1
- adcp/types/generated_poc/frequency_cap.py +1 -1
- adcp/types/generated_poc/frequency_cap_scope.py +1 -1
- adcp/types/generated_poc/get_media_buy_delivery_request.py +1 -1
- adcp/types/generated_poc/get_media_buy_delivery_response.py +1 -1
- adcp/types/generated_poc/get_products_request.py +2 -2
- adcp/types/generated_poc/get_products_response.py +1 -1
- adcp/types/generated_poc/get_signals_request.py +1 -1
- adcp/types/generated_poc/get_signals_response.py +1 -1
- adcp/types/generated_poc/html_asset.py +1 -1
- adcp/types/generated_poc/identifier_types.py +1 -1
- adcp/types/generated_poc/image_asset.py +1 -1
- adcp/types/generated_poc/javascript_asset.py +1 -1
- adcp/types/generated_poc/list_authorized_properties_request.py +1 -1
- adcp/types/generated_poc/list_authorized_properties_response.py +1 -1
- adcp/types/generated_poc/list_creative_formats_request.py +1 -1
- adcp/types/generated_poc/list_creative_formats_response.py +1 -1
- adcp/types/generated_poc/list_creatives_request.py +1 -1
- adcp/types/generated_poc/list_creatives_response.py +2 -17
- adcp/types/generated_poc/markdown_asset.py +1 -1
- adcp/types/generated_poc/measurement.py +1 -1
- adcp/types/generated_poc/media_buy.py +1 -1
- adcp/types/generated_poc/media_buy_status.py +1 -1
- adcp/types/generated_poc/pacing.py +1 -1
- adcp/types/generated_poc/package.py +1 -1
- adcp/types/generated_poc/package_request.py +1 -1
- adcp/types/generated_poc/package_status.py +1 -1
- adcp/types/generated_poc/performance_feedback.py +1 -1
- adcp/types/generated_poc/placement.py +1 -1
- adcp/types/generated_poc/preview_creative_request.py +1 -1
- adcp/types/generated_poc/preview_creative_response.py +1 -1
- adcp/types/generated_poc/preview_render.py +1 -1
- adcp/types/generated_poc/pricing_model.py +1 -1
- adcp/types/generated_poc/product.py +25 -16
- adcp/types/generated_poc/promoted_offerings.py +2 -2
- adcp/types/generated_poc/promoted_products.py +1 -1
- adcp/types/generated_poc/property.py +1 -1
- adcp/types/generated_poc/protocol_envelope.py +1 -1
- adcp/types/generated_poc/provide_performance_feedback_request.py +1 -1
- adcp/types/generated_poc/provide_performance_feedback_response.py +1 -1
- adcp/types/generated_poc/publisher_identifier_types.py +1 -1
- adcp/types/generated_poc/push_notification_config.py +1 -1
- adcp/types/generated_poc/reporting_capabilities.py +1 -1
- adcp/types/generated_poc/response.py +1 -1
- adcp/types/generated_poc/standard_format_ids.py +1 -1
- adcp/types/generated_poc/sub_asset.py +1 -1
- adcp/types/generated_poc/sync_creatives_request.py +1 -1
- adcp/types/generated_poc/sync_creatives_response.py +1 -1
- adcp/types/generated_poc/targeting.py +1 -1
- adcp/types/generated_poc/task_status.py +1 -1
- adcp/types/generated_poc/task_type.py +1 -1
- adcp/types/generated_poc/tasks_get_request.py +1 -1
- adcp/types/generated_poc/tasks_get_response.py +1 -1
- adcp/types/generated_poc/tasks_list_request.py +1 -1
- adcp/types/generated_poc/tasks_list_response.py +1 -1
- adcp/types/generated_poc/text_asset.py +1 -1
- adcp/types/generated_poc/update_media_buy_request.py +1 -1
- adcp/types/generated_poc/update_media_buy_response.py +1 -1
- adcp/types/generated_poc/url_asset.py +1 -1
- adcp/types/generated_poc/vast_asset.py +1 -1
- adcp/types/generated_poc/vcpm_auction_option.py +1 -1
- adcp/types/generated_poc/vcpm_fixed_option.py +1 -1
- adcp/types/generated_poc/video_asset.py +1 -1
- adcp/types/generated_poc/webhook_asset.py +1 -1
- adcp/types/generated_poc/webhook_payload.py +1 -1
- adcp/types/stable.py +177 -0
- adcp/utils/preview_cache.py +6 -6
- {adcp-2.4.0.dist-info → adcp-2.5.0.dist-info}/METADATA +45 -5
- adcp-2.5.0.dist-info/RECORD +129 -0
- 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.4.0.dist-info/RECORD +0 -132
- {adcp-2.4.0.dist-info → adcp-2.5.0.dist-info}/WHEEL +0 -0
- {adcp-2.4.0.dist-info → adcp-2.5.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.4.0.dist-info → adcp-2.5.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.4.0.dist-info → adcp-2.5.0.dist-info}/top_level.txt +0 -0
adcp/__init__.py
CHANGED
|
@@ -51,47 +51,15 @@ from adcp.testing import (
|
|
|
51
51
|
test_agent_no_auth,
|
|
52
52
|
)
|
|
53
53
|
|
|
54
|
-
# Import
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
from adcp.types.aliases import (
|
|
59
|
-
ActivateSignalErrorResponse,
|
|
60
|
-
ActivateSignalSuccessResponse,
|
|
61
|
-
BothPreviewRender,
|
|
62
|
-
BuildCreativeErrorResponse,
|
|
63
|
-
BuildCreativeSuccessResponse,
|
|
64
|
-
CreateMediaBuyErrorResponse,
|
|
65
|
-
CreateMediaBuySuccessResponse,
|
|
66
|
-
HtmlPreviewRender,
|
|
67
|
-
InlineDaastAsset,
|
|
68
|
-
InlineVastAsset,
|
|
69
|
-
MediaSubAsset,
|
|
70
|
-
PreviewCreativeFormatRequest,
|
|
71
|
-
PreviewCreativeInteractiveResponse,
|
|
72
|
-
PreviewCreativeManifestRequest,
|
|
73
|
-
PreviewCreativeStaticResponse,
|
|
74
|
-
PropertyIdActivationKey,
|
|
75
|
-
PropertyTagActivationKey,
|
|
76
|
-
ProvidePerformanceFeedbackErrorResponse,
|
|
77
|
-
ProvidePerformanceFeedbackSuccessResponse,
|
|
78
|
-
SyncCreativesErrorResponse,
|
|
79
|
-
SyncCreativesSuccessResponse,
|
|
80
|
-
TextSubAsset,
|
|
81
|
-
UpdateMediaBuyErrorResponse,
|
|
82
|
-
UpdateMediaBuyPackagesRequest,
|
|
83
|
-
UpdateMediaBuyPropertiesRequest,
|
|
84
|
-
UpdateMediaBuySuccessResponse,
|
|
85
|
-
UrlDaastAsset,
|
|
86
|
-
UrlPreviewRender,
|
|
87
|
-
UrlVastAsset,
|
|
88
|
-
)
|
|
89
|
-
from adcp.types.core import AgentConfig, Protocol, TaskResult, TaskStatus, WebhookMetadata
|
|
54
|
+
# Import generated types modules - for internal use
|
|
55
|
+
# Note: Users should import specific types, not the whole module
|
|
56
|
+
from adcp.types import _generated as generated
|
|
57
|
+
from adcp.types import aliases
|
|
90
58
|
|
|
91
59
|
# Re-export commonly-used request/response types for convenience
|
|
92
60
|
# Users should import from main package (e.g., `from adcp import GetProductsRequest`)
|
|
93
61
|
# rather than internal modules for better API stability
|
|
94
|
-
from adcp.types.
|
|
62
|
+
from adcp.types._generated import (
|
|
95
63
|
# Audience & Targeting
|
|
96
64
|
ActivateSignalRequest,
|
|
97
65
|
ActivateSignalResponse,
|
|
@@ -127,7 +95,68 @@ from adcp.types.generated import (
|
|
|
127
95
|
UpdateMediaBuyRequest,
|
|
128
96
|
UpdateMediaBuyResponse,
|
|
129
97
|
)
|
|
130
|
-
from adcp.types.
|
|
98
|
+
from adcp.types._generated import TaskStatus as GeneratedTaskStatus
|
|
99
|
+
|
|
100
|
+
# Re-export semantic type aliases for better ergonomics
|
|
101
|
+
from adcp.types.aliases import (
|
|
102
|
+
ActivateSignalErrorResponse,
|
|
103
|
+
ActivateSignalSuccessResponse,
|
|
104
|
+
BothPreviewRender,
|
|
105
|
+
BuildCreativeErrorResponse,
|
|
106
|
+
BuildCreativeSuccessResponse,
|
|
107
|
+
CreatedPackageReference,
|
|
108
|
+
CreateMediaBuyErrorResponse,
|
|
109
|
+
CreateMediaBuySuccessResponse,
|
|
110
|
+
HtmlPreviewRender,
|
|
111
|
+
InlineDaastAsset,
|
|
112
|
+
InlineVastAsset,
|
|
113
|
+
MediaSubAsset,
|
|
114
|
+
PreviewCreativeFormatRequest,
|
|
115
|
+
PreviewCreativeInteractiveResponse,
|
|
116
|
+
PreviewCreativeManifestRequest,
|
|
117
|
+
PreviewCreativeStaticResponse,
|
|
118
|
+
PropertyIdActivationKey,
|
|
119
|
+
PropertyTagActivationKey,
|
|
120
|
+
ProvidePerformanceFeedbackErrorResponse,
|
|
121
|
+
ProvidePerformanceFeedbackSuccessResponse,
|
|
122
|
+
SyncCreativesErrorResponse,
|
|
123
|
+
SyncCreativesSuccessResponse,
|
|
124
|
+
TextSubAsset,
|
|
125
|
+
UpdateMediaBuyErrorResponse,
|
|
126
|
+
UpdateMediaBuyPackagesRequest,
|
|
127
|
+
UpdateMediaBuyPropertiesRequest,
|
|
128
|
+
UpdateMediaBuySuccessResponse,
|
|
129
|
+
UrlDaastAsset,
|
|
130
|
+
UrlPreviewRender,
|
|
131
|
+
UrlVastAsset,
|
|
132
|
+
)
|
|
133
|
+
from adcp.types.core import AgentConfig, Protocol, TaskResult, TaskStatus, WebhookMetadata
|
|
134
|
+
|
|
135
|
+
# Re-export core domain types and pricing options from stable API
|
|
136
|
+
# These are commonly used in typical workflows
|
|
137
|
+
from adcp.types.stable import (
|
|
138
|
+
# Core domain types
|
|
139
|
+
BrandManifest,
|
|
140
|
+
# Pricing options (all 9 types for product creation)
|
|
141
|
+
CpcPricingOption,
|
|
142
|
+
CpcvPricingOption,
|
|
143
|
+
CpmAuctionPricingOption,
|
|
144
|
+
CpmFixedRatePricingOption,
|
|
145
|
+
CppPricingOption,
|
|
146
|
+
CpvPricingOption,
|
|
147
|
+
Creative,
|
|
148
|
+
CreativeManifest,
|
|
149
|
+
# Status enums (for control flow)
|
|
150
|
+
CreativeStatus,
|
|
151
|
+
FlatRatePricingOption,
|
|
152
|
+
MediaBuy,
|
|
153
|
+
MediaBuyStatus,
|
|
154
|
+
Package,
|
|
155
|
+
PackageStatus,
|
|
156
|
+
PricingModel,
|
|
157
|
+
VcpmAuctionPricingOption,
|
|
158
|
+
VcpmFixedRatePricingOption,
|
|
159
|
+
)
|
|
131
160
|
from adcp.validation import (
|
|
132
161
|
ValidationError,
|
|
133
162
|
validate_adagents,
|
|
@@ -136,7 +165,7 @@ from adcp.validation import (
|
|
|
136
165
|
validate_publisher_properties_item,
|
|
137
166
|
)
|
|
138
167
|
|
|
139
|
-
__version__ = "2.
|
|
168
|
+
__version__ = "2.5.0"
|
|
140
169
|
|
|
141
170
|
__all__ = [
|
|
142
171
|
# Client classes
|
|
@@ -179,6 +208,29 @@ __all__ = [
|
|
|
179
208
|
"Format",
|
|
180
209
|
"Product",
|
|
181
210
|
"Property",
|
|
211
|
+
# Core domain types (from stable API)
|
|
212
|
+
"BrandManifest",
|
|
213
|
+
"Creative",
|
|
214
|
+
"CreativeManifest",
|
|
215
|
+
"MediaBuy",
|
|
216
|
+
"Package",
|
|
217
|
+
# Package type aliases
|
|
218
|
+
"CreatedPackageReference",
|
|
219
|
+
# Status enums (for control flow)
|
|
220
|
+
"CreativeStatus",
|
|
221
|
+
"MediaBuyStatus",
|
|
222
|
+
"PackageStatus",
|
|
223
|
+
"PricingModel",
|
|
224
|
+
# Pricing options (all 9 types)
|
|
225
|
+
"CpcPricingOption",
|
|
226
|
+
"CpcvPricingOption",
|
|
227
|
+
"CpmAuctionPricingOption",
|
|
228
|
+
"CpmFixedRatePricingOption",
|
|
229
|
+
"CppPricingOption",
|
|
230
|
+
"CpvPricingOption",
|
|
231
|
+
"FlatRatePricingOption",
|
|
232
|
+
"VcpmAuctionPricingOption",
|
|
233
|
+
"VcpmFixedRatePricingOption",
|
|
182
234
|
# Adagents validation
|
|
183
235
|
"AuthorizationContext",
|
|
184
236
|
"fetch_adagents",
|
adcp/__main__.py
CHANGED
|
@@ -112,7 +112,7 @@ async def _dispatch_tool(client: ADCPClient, tool_name: str, payload: dict[str,
|
|
|
112
112
|
"""
|
|
113
113
|
from pydantic import ValidationError
|
|
114
114
|
|
|
115
|
-
from adcp.types import
|
|
115
|
+
from adcp.types import _generated as gen
|
|
116
116
|
from adcp.types.core import TaskResult, TaskStatus
|
|
117
117
|
|
|
118
118
|
# Lazy initialization of request types (avoid circular imports)
|
adcp/client.py
CHANGED
|
@@ -17,15 +17,7 @@ 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.
|
|
21
|
-
Activity,
|
|
22
|
-
ActivityType,
|
|
23
|
-
AgentConfig,
|
|
24
|
-
Protocol,
|
|
25
|
-
TaskResult,
|
|
26
|
-
TaskStatus,
|
|
27
|
-
)
|
|
28
|
-
from adcp.types.generated import (
|
|
20
|
+
from adcp.types._generated import (
|
|
29
21
|
ActivateSignalRequest,
|
|
30
22
|
ActivateSignalResponse,
|
|
31
23
|
GetMediaBuyDeliveryRequest,
|
|
@@ -48,6 +40,14 @@ from adcp.types.generated import (
|
|
|
48
40
|
SyncCreativesResponse,
|
|
49
41
|
WebhookPayload,
|
|
50
42
|
)
|
|
43
|
+
from adcp.types.core import (
|
|
44
|
+
Activity,
|
|
45
|
+
ActivityType,
|
|
46
|
+
AgentConfig,
|
|
47
|
+
Protocol,
|
|
48
|
+
TaskResult,
|
|
49
|
+
TaskStatus,
|
|
50
|
+
)
|
|
51
51
|
from adcp.types.generated_poc.task_status import TaskStatus as GeneratedTaskStatus
|
|
52
52
|
from adcp.utils.operation_id import create_operation_id
|
|
53
53
|
|
adcp/simple.py
CHANGED
|
@@ -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._generated import (
|
|
27
27
|
ActivateSignalRequest,
|
|
28
28
|
ActivateSignalResponse,
|
|
29
29
|
GetMediaBuyDeliveryRequest,
|
adcp/testing/test_helpers.py
CHANGED
|
@@ -231,7 +231,7 @@ test_agent_a2a_no_auth: ADCPClient = _create_test_agent_a2a_no_auth_client()
|
|
|
231
231
|
# Example:
|
|
232
232
|
# ```python
|
|
233
233
|
# from adcp.testing import creative_agent
|
|
234
|
-
# from adcp.types.
|
|
234
|
+
# from adcp.types._generated import PreviewCreativeRequest
|
|
235
235
|
#
|
|
236
236
|
# result = await creative_agent.preview_creative(
|
|
237
237
|
# PreviewCreativeRequest(
|
adcp/types/__init__.py
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
"""Type definitions for AdCP client.
|
|
3
|
+
"""Type definitions for AdCP client.
|
|
4
|
+
|
|
5
|
+
This module provides the public API for AdCP types. All types are imported from
|
|
6
|
+
the stable API layer which provides consistent naming regardless of internal
|
|
7
|
+
schema evolution.
|
|
8
|
+
|
|
9
|
+
**IMPORTANT**: Never import directly from adcp.types.generated_poc. Always use
|
|
10
|
+
adcp.types or adcp.types.stable for stable, versioned types.
|
|
11
|
+
"""
|
|
4
12
|
|
|
5
13
|
from adcp.types.aliases import (
|
|
6
14
|
BothPreviewRender,
|
|
15
|
+
CreatedPackageReference,
|
|
7
16
|
HtmlPreviewRender,
|
|
8
17
|
InlineDaastAsset,
|
|
9
18
|
InlineVastAsset,
|
|
@@ -21,11 +30,44 @@ from adcp.types.core import (
|
|
|
21
30
|
DebugInfo,
|
|
22
31
|
Protocol,
|
|
23
32
|
TaskResult,
|
|
24
|
-
TaskStatus,
|
|
25
33
|
WebhookMetadata,
|
|
26
34
|
)
|
|
35
|
+
from adcp.types.core import (
|
|
36
|
+
TaskStatus as CoreTaskStatus,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
# Import stable public API types
|
|
40
|
+
from adcp.types.stable import (
|
|
41
|
+
BrandManifest,
|
|
42
|
+
# Pricing options
|
|
43
|
+
CpcPricingOption,
|
|
44
|
+
CpcvPricingOption,
|
|
45
|
+
CpmAuctionPricingOption,
|
|
46
|
+
CpmFixedRatePricingOption,
|
|
47
|
+
CppPricingOption,
|
|
48
|
+
CpvPricingOption,
|
|
49
|
+
Creative,
|
|
50
|
+
CreativeStatus,
|
|
51
|
+
Error,
|
|
52
|
+
FlatRatePricingOption,
|
|
53
|
+
Format,
|
|
54
|
+
MediaBuy,
|
|
55
|
+
MediaBuyStatus,
|
|
56
|
+
Package,
|
|
57
|
+
PackageStatus,
|
|
58
|
+
PricingModel,
|
|
59
|
+
Product,
|
|
60
|
+
Property,
|
|
61
|
+
VcpmAuctionPricingOption,
|
|
62
|
+
VcpmFixedRatePricingOption,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Note: CoreTaskStatus is for internal task tracking
|
|
66
|
+
# Generated TaskStatus from AdCP schema is available via adcp.types.stable
|
|
67
|
+
TaskStatus = CoreTaskStatus
|
|
27
68
|
|
|
28
69
|
__all__ = [
|
|
70
|
+
# Base types
|
|
29
71
|
"AdCPBaseModel",
|
|
30
72
|
"AgentConfig",
|
|
31
73
|
"Protocol",
|
|
@@ -45,4 +87,29 @@ __all__ = [
|
|
|
45
87
|
"UrlDaastAsset",
|
|
46
88
|
"UrlPreviewRender",
|
|
47
89
|
"UrlVastAsset",
|
|
90
|
+
# Package type aliases
|
|
91
|
+
"CreatedPackageReference",
|
|
92
|
+
# Stable API types (commonly used)
|
|
93
|
+
"BrandManifest",
|
|
94
|
+
"Creative",
|
|
95
|
+
"CreativeStatus",
|
|
96
|
+
"Error",
|
|
97
|
+
"Format",
|
|
98
|
+
"MediaBuy",
|
|
99
|
+
"MediaBuyStatus",
|
|
100
|
+
"Package",
|
|
101
|
+
"PackageStatus",
|
|
102
|
+
"PricingModel",
|
|
103
|
+
"Product",
|
|
104
|
+
"Property",
|
|
105
|
+
# Pricing options
|
|
106
|
+
"CpcPricingOption",
|
|
107
|
+
"CpcvPricingOption",
|
|
108
|
+
"CpmAuctionPricingOption",
|
|
109
|
+
"CpmFixedRatePricingOption",
|
|
110
|
+
"CppPricingOption",
|
|
111
|
+
"CpvPricingOption",
|
|
112
|
+
"FlatRatePricingOption",
|
|
113
|
+
"VcpmAuctionPricingOption",
|
|
114
|
+
"VcpmFixedRatePricingOption",
|
|
48
115
|
]
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""INTERNAL: Consolidated generated types.
|
|
2
|
+
|
|
3
|
+
DO NOT import from this module directly.
|
|
4
|
+
Use 'from adcp import Type' or 'from adcp.types.stable import Type' instead.
|
|
5
|
+
|
|
6
|
+
This module consolidates all generated types from generated_poc/ into a single
|
|
7
|
+
namespace for convenience. The leading underscore signals this is private API.
|
|
2
8
|
|
|
3
9
|
Auto-generated by datamodel-code-generator from JSON schemas.
|
|
4
10
|
DO NOT EDIT MANUALLY.
|
|
5
11
|
|
|
6
12
|
Generated from: https://github.com/adcontextprotocol/adcp/tree/main/schemas
|
|
7
|
-
Generation date: 2025-11-18
|
|
13
|
+
Generation date: 2025-11-18 12:52:17 UTC
|
|
8
14
|
"""
|
|
9
|
-
|
|
15
|
+
# ruff: noqa: E501, I001
|
|
10
16
|
from __future__ import annotations
|
|
11
17
|
|
|
12
18
|
# Import all types from generated_poc modules
|
|
@@ -16,8 +22,7 @@ from adcp.types.generated_poc.activation_key import ActivationKey1, ActivationKe
|
|
|
16
22
|
from adcp.types.generated_poc.adagents import AuthorizedAgents, AuthorizedAgents1, AuthorizedAgents2, AuthorizedAgents3, AuthorizedSalesAgents, Contact, PropertyId, PropertyTag, PublisherProperties, PublisherProperties1, Tags
|
|
17
23
|
from adcp.types.generated_poc.asset_type import AssetTypeSchema, ContentLength, Dimensions, Duration, FileSize, Quality, Requirements, Type
|
|
18
24
|
from adcp.types.generated_poc.audio_asset import AudioAsset
|
|
19
|
-
from adcp.types.generated_poc.brand_manifest import Asset,
|
|
20
|
-
from adcp.types.generated_poc.brand_manifest_ref import BrandManifest, BrandManifestReference
|
|
25
|
+
from adcp.types.generated_poc.brand_manifest import Asset, AssetType, BrandManifest, Colors, Disclaimer, FeedFormat, Fonts, Logo, Metadata, ProductCatalog, UpdateFrequency
|
|
21
26
|
from adcp.types.generated_poc.build_creative_request import BuildCreativeRequest
|
|
22
27
|
from adcp.types.generated_poc.build_creative_response import BuildCreativeResponse, BuildCreativeResponse1, BuildCreativeResponse2
|
|
23
28
|
from adcp.types.generated_poc.channels import AdvertisingChannels
|
|
@@ -55,7 +60,6 @@ from adcp.types.generated_poc.get_signals_response import GetSignalsResponse, Pr
|
|
|
55
60
|
from adcp.types.generated_poc.html_asset import HtmlAsset
|
|
56
61
|
from adcp.types.generated_poc.identifier_types import PropertyIdentifierTypes
|
|
57
62
|
from adcp.types.generated_poc.image_asset import ImageAsset
|
|
58
|
-
from adcp.types.generated_poc.index import AdcpAssetTypeRegistry
|
|
59
63
|
from adcp.types.generated_poc.javascript_asset import JavascriptAsset, ModuleType
|
|
60
64
|
from adcp.types.generated_poc.list_authorized_properties_request import ListAuthorizedPropertiesRequest, PublisherDomain
|
|
61
65
|
from adcp.types.generated_poc.list_authorized_properties_response import ListAuthorizedPropertiesResponse, PrimaryCountry
|
|
@@ -76,8 +80,7 @@ from adcp.types.generated_poc.preview_creative_request import Input2, OutputForm
|
|
|
76
80
|
from adcp.types.generated_poc.preview_creative_response import Input4, Preview, Preview1, Preview2, PreviewCreativeResponse, PreviewCreativeResponse1, PreviewCreativeResponse2, Response, Response1, Results, Results1
|
|
77
81
|
from adcp.types.generated_poc.preview_render import Embedding, PreviewRender, PreviewRender1, PreviewRender2, PreviewRender3
|
|
78
82
|
from adcp.types.generated_poc.pricing_model import PricingModel
|
|
79
|
-
from adcp.types.generated_poc.
|
|
80
|
-
from adcp.types.generated_poc.product import DeliveryMeasurement, Product, ProductCard, ProductCardDetailed, PublisherProperties3
|
|
83
|
+
from adcp.types.generated_poc.product import DeliveryMeasurement, Product, ProductCard, ProductCardDetailed, PublisherProperties4, PublisherProperties5
|
|
81
84
|
from adcp.types.generated_poc.promoted_offerings import AssetSelectors, Offering, PromotedOfferings
|
|
82
85
|
from adcp.types.generated_poc.promoted_products import PromotedProducts
|
|
83
86
|
from adcp.types.generated_poc.property import Identifier, Property, PropertyType, Tag
|
|
@@ -89,7 +92,6 @@ from adcp.types.generated_poc.push_notification_config import Authentication, Pu
|
|
|
89
92
|
from adcp.types.generated_poc.reporting_capabilities import AvailableMetric, AvailableReportingFrequency, ReportingCapabilities
|
|
90
93
|
from adcp.types.generated_poc.response import ProtocolResponse
|
|
91
94
|
from adcp.types.generated_poc.standard_format_ids import StandardFormatIds
|
|
92
|
-
from adcp.types.generated_poc.start_timing import StartTiming
|
|
93
95
|
from adcp.types.generated_poc.sub_asset import SubAsset1, SubAsset2
|
|
94
96
|
from adcp.types.generated_poc.sync_creatives_request import SyncCreativesRequest, ValidationMode
|
|
95
97
|
from adcp.types.generated_poc.sync_creatives_response import Action, SyncCreativesResponse, SyncCreativesResponse1, SyncCreativesResponse2
|
|
@@ -112,8 +114,62 @@ from adcp.types.generated_poc.webhook_asset import Method, Method1, ResponseType
|
|
|
112
114
|
from adcp.types.generated_poc.webhook_payload import WebhookPayload
|
|
113
115
|
|
|
114
116
|
# Backward compatibility aliases for renamed types
|
|
115
|
-
BrandManifestRef = BrandManifestReference
|
|
116
117
|
Channels = AdvertisingChannels
|
|
117
118
|
|
|
118
119
|
# Explicit exports
|
|
119
|
-
__all__ = [
|
|
120
|
+
__all__ = [
|
|
121
|
+
"Action", "ActivateSignalRequest", "ActivateSignalResponse", "ActivateSignalResponse1",
|
|
122
|
+
"ActivateSignalResponse2", "ActivationKey1", "ActivationKey2", "AdvertisingChannels",
|
|
123
|
+
"AffectedPackage", "AggregatedTotals", "Asset", "AssetSelectors", "AssetType",
|
|
124
|
+
"AssetTypeSchema", "AssetsRequired", "AssetsRequired1", "AssignedPackage", "Assignments",
|
|
125
|
+
"AudioAsset", "Authentication", "AuthorizedAgents", "AuthorizedAgents1", "AuthorizedAgents2",
|
|
126
|
+
"AuthorizedAgents3", "AuthorizedSalesAgents", "AvailableMetric", "AvailableReportingFrequency",
|
|
127
|
+
"BrandManifest", "BuildCreativeRequest", "BuildCreativeResponse", "BuildCreativeResponse1",
|
|
128
|
+
"BuildCreativeResponse2", "ByPackageItem", "Capability", "CatalogType", "Channels",
|
|
129
|
+
"CoBranding", "Colors", "Contact", "ContentLength", "Country", "CpcPricingOption",
|
|
130
|
+
"CpcvPricingOption", "CpmAuctionPricingOption", "CpmFixedRatePricingOption",
|
|
131
|
+
"CppPricingOption", "CpvPricingOption", "CreateMediaBuyRequest", "CreateMediaBuyResponse",
|
|
132
|
+
"CreateMediaBuyResponse1", "CreateMediaBuyResponse2", "Creative", "CreativeAgent",
|
|
133
|
+
"CreativeAsset", "CreativeAssignment", "CreativeManifest", "CreativePolicy", "CreativeStatus",
|
|
134
|
+
"CssAsset", "DaastAsset1", "DaastAsset2", "DaastVersion", "DailyBreakdownItem", "DeliverTo",
|
|
135
|
+
"DeliveryMeasurement", "DeliveryMetrics", "DeliveryType", "Deployment1", "Deployment2",
|
|
136
|
+
"Destination1", "Destination2", "Details", "Dimensions", "Direction", "Disclaimer", "Domain",
|
|
137
|
+
"DomainBreakdown", "DoohMetrics", "Duration", "Embedding", "Error", "FeedFormat",
|
|
138
|
+
"FeedbackSource", "Field1", "FieldModel", "FileSize", "Filters", "FlatRatePricingOption",
|
|
139
|
+
"Fonts", "Format", "FormatCard", "FormatCardDetailed", "FormatId", "FormatType",
|
|
140
|
+
"FrequencyCap", "FrequencyCapScope", "GeoCountryAnyOfItem", "GetMediaBuyDeliveryRequest",
|
|
141
|
+
"GetMediaBuyDeliveryResponse", "GetProductsRequest", "GetProductsResponse",
|
|
142
|
+
"GetSignalsRequest", "GetSignalsResponse", "HistoryItem", "HtmlAsset", "Identifier",
|
|
143
|
+
"ImageAsset", "Input", "Input2", "Input4", "JavascriptAsset", "LandingPage",
|
|
144
|
+
"ListAuthorizedPropertiesRequest", "ListAuthorizedPropertiesResponse",
|
|
145
|
+
"ListCreativeFormatsRequest", "ListCreativeFormatsResponse", "ListCreativesRequest",
|
|
146
|
+
"ListCreativesResponse", "Logo", "MarkdownAsset", "MarkdownFlavor", "Measurement",
|
|
147
|
+
"MeasurementPeriod", "MediaBuy", "MediaBuyDelivery", "MediaBuyStatus", "Metadata", "Method",
|
|
148
|
+
"Method1", "MetricType", "ModuleType", "NotificationType", "Offering", "OutputFormat",
|
|
149
|
+
"Pacing", "Package", "PackageRequest", "PackageStatus", "Packages", "Packages1", "Packages2",
|
|
150
|
+
"Packages3", "Pagination", "Parameters", "Performance", "PerformanceFeedback", "Placement",
|
|
151
|
+
"Preview", "Preview1", "Preview2", "PreviewCreativeRequest", "PreviewCreativeRequest1",
|
|
152
|
+
"PreviewCreativeRequest2", "PreviewCreativeResponse", "PreviewCreativeResponse1",
|
|
153
|
+
"PreviewCreativeResponse2", "PreviewRender", "PreviewRender1", "PreviewRender2",
|
|
154
|
+
"PreviewRender3", "PriceGuidance", "Pricing", "PricingModel", "PrimaryCountry", "Product",
|
|
155
|
+
"ProductCard", "ProductCardDetailed", "ProductCatalog", "Progress", "PromotedOfferings",
|
|
156
|
+
"PromotedProducts", "Property", "PropertyId", "PropertyIdentifierTypes", "PropertyTag",
|
|
157
|
+
"PropertyType", "ProtocolEnvelope", "ProtocolResponse", "ProvidePerformanceFeedbackRequest",
|
|
158
|
+
"ProvidePerformanceFeedbackResponse", "ProvidePerformanceFeedbackResponse1",
|
|
159
|
+
"ProvidePerformanceFeedbackResponse2", "PublisherDomain", "PublisherIdentifierTypes",
|
|
160
|
+
"PublisherProperties", "PublisherProperties1", "PublisherProperties4", "PublisherProperties5",
|
|
161
|
+
"PushNotificationConfig", "Quality", "QuartileData", "QuerySummary", "Render",
|
|
162
|
+
"ReportingCapabilities", "ReportingFrequency", "ReportingPeriod", "ReportingWebhook",
|
|
163
|
+
"Request", "RequestedMetric", "Requirements", "Response", "Response1", "ResponseType",
|
|
164
|
+
"Responsive", "Results", "Results1", "Scheme", "Security", "Signal", "SignalType", "Sort",
|
|
165
|
+
"SortApplied", "StandardFormatIds", "Status", "StatusFilter", "StatusFilterEnum",
|
|
166
|
+
"StatusSummary", "SubAsset1", "SubAsset2", "SyncCreativesRequest", "SyncCreativesResponse",
|
|
167
|
+
"SyncCreativesResponse1", "SyncCreativesResponse2", "Tag", "Tags", "TargetingOverlay", "Task",
|
|
168
|
+
"TaskStatus", "TaskType", "TasksGetRequest", "TasksGetResponse", "TasksListRequest",
|
|
169
|
+
"TasksListResponse", "TextAsset", "Totals", "TrackingEvent", "Type", "Unit", "UpdateFrequency",
|
|
170
|
+
"UpdateMediaBuyRequest", "UpdateMediaBuyRequest1", "UpdateMediaBuyRequest2",
|
|
171
|
+
"UpdateMediaBuyResponse", "UpdateMediaBuyResponse1", "UpdateMediaBuyResponse2", "UrlAsset",
|
|
172
|
+
"UrlType", "ValidationMode", "VastAsset1", "VastAsset2", "VastVersion",
|
|
173
|
+
"VcpmAuctionPricingOption", "VcpmFixedRatePricingOption", "VenueBreakdownItem", "VideoAsset",
|
|
174
|
+
"ViewThreshold", "ViewThreshold1", "WebhookAsset", "WebhookPayload"
|
|
175
|
+
]
|
adcp/types/aliases.py
CHANGED
|
@@ -32,7 +32,7 @@ immediately rather than at runtime when users try to use the aliases.
|
|
|
32
32
|
from __future__ import annotations
|
|
33
33
|
|
|
34
34
|
# Import all generated types that need semantic aliases
|
|
35
|
-
from adcp.types.
|
|
35
|
+
from adcp.types._generated import (
|
|
36
36
|
# Activation responses
|
|
37
37
|
ActivateSignalResponse1,
|
|
38
38
|
ActivateSignalResponse2,
|
|
@@ -78,6 +78,12 @@ from adcp.types.generated import (
|
|
|
78
78
|
VastAsset2,
|
|
79
79
|
)
|
|
80
80
|
|
|
81
|
+
# Import Package types directly from their modules to avoid collision issues
|
|
82
|
+
from adcp.types.generated_poc.create_media_buy_response import (
|
|
83
|
+
Package as CreatedPackageInternal,
|
|
84
|
+
)
|
|
85
|
+
from adcp.types.generated_poc.package import Package as FullPackageInternal
|
|
86
|
+
|
|
81
87
|
# ============================================================================
|
|
82
88
|
# RESPONSE TYPE ALIASES - Success/Error Discriminated Unions
|
|
83
89
|
# ============================================================================
|
|
@@ -201,6 +207,51 @@ MediaSubAsset = SubAsset1
|
|
|
201
207
|
TextSubAsset = SubAsset2
|
|
202
208
|
"""SubAsset for text content (headlines, body text) - asset_kind='text', provides content."""
|
|
203
209
|
|
|
210
|
+
# ============================================================================
|
|
211
|
+
# PACKAGE TYPE ALIASES - Resolving Type Name Collisions
|
|
212
|
+
# ============================================================================
|
|
213
|
+
# The AdCP schemas define two genuinely different types both named "Package":
|
|
214
|
+
#
|
|
215
|
+
# 1. Full Package (from package.json schema):
|
|
216
|
+
# - Complete operational package with all fields (budget, pricing_option_id, etc.)
|
|
217
|
+
# - Used in MediaBuy, update operations, and package management
|
|
218
|
+
# - Has 12+ fields for full package configuration
|
|
219
|
+
#
|
|
220
|
+
# 2. Created Package (from create-media-buy-response.json schema):
|
|
221
|
+
# - Minimal response type with only IDs (buyer_ref, package_id)
|
|
222
|
+
# - Used in CreateMediaBuy success responses
|
|
223
|
+
# - Only 2 fields - represents newly created package references
|
|
224
|
+
#
|
|
225
|
+
# The code generator's "first wins" collision handling exports the Created Package
|
|
226
|
+
# as "Package", shadowing the Full Package. These semantic aliases provide clear,
|
|
227
|
+
# unambiguous names for both types.
|
|
228
|
+
|
|
229
|
+
Package = FullPackageInternal
|
|
230
|
+
"""Complete package configuration with all operational fields.
|
|
231
|
+
|
|
232
|
+
This is the canonical Package type used throughout AdCP for package management.
|
|
233
|
+
|
|
234
|
+
Used in:
|
|
235
|
+
- MediaBuy.packages (list of full package details)
|
|
236
|
+
- Update operations (modifying existing packages)
|
|
237
|
+
- Package management (creating/configuring packages)
|
|
238
|
+
|
|
239
|
+
Fields include: budget, pricing_option_id, product_id, status, bid_price,
|
|
240
|
+
creative_assignments, format_ids_to_provide, impressions, pacing, targeting_overlay
|
|
241
|
+
"""
|
|
242
|
+
|
|
243
|
+
CreatedPackageReference = CreatedPackageInternal
|
|
244
|
+
"""Minimal package reference with only IDs returned after creation.
|
|
245
|
+
|
|
246
|
+
This is NOT the full Package type - it's a lightweight reference returned
|
|
247
|
+
in CreateMediaBuySuccessResponse to indicate which packages were created.
|
|
248
|
+
|
|
249
|
+
Used in:
|
|
250
|
+
- CreateMediaBuySuccessResponse.packages (list of created package references)
|
|
251
|
+
|
|
252
|
+
Fields: buyer_ref, package_id only
|
|
253
|
+
"""
|
|
254
|
+
|
|
204
255
|
# ============================================================================
|
|
205
256
|
# EXPORTS
|
|
206
257
|
# ============================================================================
|
|
@@ -246,4 +297,7 @@ __all__ = [
|
|
|
246
297
|
# Update media buy responses
|
|
247
298
|
"UpdateMediaBuySuccessResponse",
|
|
248
299
|
"UpdateMediaBuyErrorResponse",
|
|
300
|
+
# Package type aliases
|
|
301
|
+
"CreatedPackageReference",
|
|
302
|
+
"Package",
|
|
249
303
|
]
|