adcp 2.1.0__py3-none-any.whl → 2.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
adcp/__init__.py CHANGED
@@ -56,27 +56,33 @@ from adcp.types import aliases, generated
56
56
  from adcp.types.aliases import (
57
57
  ActivateSignalErrorResponse,
58
58
  ActivateSignalSuccessResponse,
59
+ BothPreviewRender,
59
60
  BuildCreativeErrorResponse,
60
61
  BuildCreativeSuccessResponse,
61
62
  CreateMediaBuyErrorResponse,
62
63
  CreateMediaBuySuccessResponse,
64
+ HtmlPreviewRender,
65
+ InlineDaastAsset,
66
+ InlineVastAsset,
67
+ MediaSubAsset,
63
68
  PreviewCreativeFormatRequest,
64
69
  PreviewCreativeInteractiveResponse,
65
70
  PreviewCreativeManifestRequest,
66
71
  PreviewCreativeStaticResponse,
67
- PreviewRenderHtml,
68
- PreviewRenderIframe,
69
- PreviewRenderImage,
70
72
  PropertyIdActivationKey,
71
73
  PropertyTagActivationKey,
72
74
  ProvidePerformanceFeedbackErrorResponse,
73
75
  ProvidePerformanceFeedbackSuccessResponse,
74
76
  SyncCreativesErrorResponse,
75
77
  SyncCreativesSuccessResponse,
78
+ TextSubAsset,
76
79
  UpdateMediaBuyErrorResponse,
77
80
  UpdateMediaBuyPackagesRequest,
78
81
  UpdateMediaBuyPropertiesRequest,
79
82
  UpdateMediaBuySuccessResponse,
83
+ UrlDaastAsset,
84
+ UrlPreviewRender,
85
+ UrlVastAsset,
80
86
  )
81
87
  from adcp.types.core import AgentConfig, Protocol, TaskResult, TaskStatus, WebhookMetadata
82
88
 
@@ -128,7 +134,7 @@ from adcp.validation import (
128
134
  validate_publisher_properties_item,
129
135
  )
130
136
 
131
- __version__ = "2.1.0"
137
+ __version__ = "2.2.0"
132
138
 
133
139
  __all__ = [
134
140
  # Client classes
@@ -219,25 +225,31 @@ __all__ = [
219
225
  # Semantic type aliases (for better API ergonomics)
220
226
  "ActivateSignalSuccessResponse",
221
227
  "ActivateSignalErrorResponse",
228
+ "BothPreviewRender",
222
229
  "BuildCreativeSuccessResponse",
223
230
  "BuildCreativeErrorResponse",
224
231
  "CreateMediaBuySuccessResponse",
225
232
  "CreateMediaBuyErrorResponse",
226
- "ProvidePerformanceFeedbackSuccessResponse",
227
- "ProvidePerformanceFeedbackErrorResponse",
228
- "SyncCreativesSuccessResponse",
229
- "SyncCreativesErrorResponse",
230
- "UpdateMediaBuySuccessResponse",
231
- "UpdateMediaBuyErrorResponse",
233
+ "HtmlPreviewRender",
234
+ "InlineDaastAsset",
235
+ "InlineVastAsset",
236
+ "MediaSubAsset",
232
237
  "PreviewCreativeFormatRequest",
233
238
  "PreviewCreativeManifestRequest",
234
239
  "PreviewCreativeStaticResponse",
235
240
  "PreviewCreativeInteractiveResponse",
236
- "PreviewRenderImage",
237
- "PreviewRenderHtml",
238
- "PreviewRenderIframe",
239
241
  "PropertyIdActivationKey",
240
242
  "PropertyTagActivationKey",
243
+ "ProvidePerformanceFeedbackSuccessResponse",
244
+ "ProvidePerformanceFeedbackErrorResponse",
245
+ "SyncCreativesSuccessResponse",
246
+ "SyncCreativesErrorResponse",
247
+ "TextSubAsset",
248
+ "UpdateMediaBuySuccessResponse",
249
+ "UpdateMediaBuyErrorResponse",
241
250
  "UpdateMediaBuyPackagesRequest",
242
251
  "UpdateMediaBuyPropertiesRequest",
252
+ "UrlDaastAsset",
253
+ "UrlPreviewRender",
254
+ "UrlVastAsset",
243
255
  ]
adcp/types/__init__.py CHANGED
@@ -2,6 +2,17 @@ from __future__ import annotations
2
2
 
3
3
  """Type definitions for AdCP client."""
4
4
 
5
+ from adcp.types.aliases import (
6
+ BothPreviewRender,
7
+ HtmlPreviewRender,
8
+ InlineDaastAsset,
9
+ InlineVastAsset,
10
+ MediaSubAsset,
11
+ TextSubAsset,
12
+ UrlDaastAsset,
13
+ UrlPreviewRender,
14
+ UrlVastAsset,
15
+ )
5
16
  from adcp.types.base import AdCPBaseModel
6
17
  from adcp.types.core import (
7
18
  Activity,
@@ -24,4 +35,14 @@ __all__ = [
24
35
  "Activity",
25
36
  "ActivityType",
26
37
  "DebugInfo",
38
+ # Semantic aliases for discriminated unions
39
+ "BothPreviewRender",
40
+ "HtmlPreviewRender",
41
+ "InlineDaastAsset",
42
+ "InlineVastAsset",
43
+ "MediaSubAsset",
44
+ "TextSubAsset",
45
+ "UrlDaastAsset",
46
+ "UrlPreviewRender",
47
+ "UrlVastAsset",
27
48
  ]
adcp/types/aliases.py CHANGED
@@ -45,6 +45,9 @@ from adcp.types.generated import (
45
45
  # Create media buy responses
46
46
  CreateMediaBuyResponse1,
47
47
  CreateMediaBuyResponse2,
48
+ # DAAST assets
49
+ DaastAsset1,
50
+ DaastAsset2,
48
51
  # Preview creative requests
49
52
  PreviewCreativeRequest1,
50
53
  PreviewCreativeRequest2,
@@ -58,6 +61,9 @@ from adcp.types.generated import (
58
61
  # Performance feedback responses
59
62
  ProvidePerformanceFeedbackResponse1,
60
63
  ProvidePerformanceFeedbackResponse2,
64
+ # SubAssets
65
+ SubAsset1,
66
+ SubAsset2,
61
67
  # Sync creatives responses
62
68
  SyncCreativesResponse1,
63
69
  SyncCreativesResponse2,
@@ -67,6 +73,9 @@ from adcp.types.generated import (
67
73
  # Update media buy responses
68
74
  UpdateMediaBuyResponse1,
69
75
  UpdateMediaBuyResponse2,
76
+ # VAST assets
77
+ VastAsset1,
78
+ VastAsset2,
70
79
  )
71
80
 
72
81
  # ============================================================================
@@ -157,15 +166,40 @@ PreviewCreativeStaticResponse = PreviewCreativeResponse1
157
166
  PreviewCreativeInteractiveResponse = PreviewCreativeResponse2
158
167
  """Preview response with interactive renders (iframe embedding)."""
159
168
 
160
- # Preview Render Variants
161
- PreviewRenderImage = PreviewRender1
162
- """Image-based preview render (PNG/JPEG)."""
169
+ # Preview Render Variants (discriminated by output_format)
170
+ UrlPreviewRender = PreviewRender1
171
+ """Preview render with output_format='url' - provides preview_url for iframe embedding."""
163
172
 
164
- PreviewRenderHtml = PreviewRender2
165
- """HTML-based preview render (static markup)."""
173
+ HtmlPreviewRender = PreviewRender2
174
+ """Preview render with output_format='html' - provides preview_html for direct embedding."""
166
175
 
167
- PreviewRenderIframe = PreviewRender3
168
- """Interactive iframe-based preview render."""
176
+ BothPreviewRender = PreviewRender3
177
+ """Preview render with output_format='both' - provides both preview_url and preview_html."""
178
+
179
+ # ============================================================================
180
+ # ASSET TYPE ALIASES - Delivery & Kind Discriminated Unions
181
+ # ============================================================================
182
+
183
+ # VAST Asset Variants (discriminated by delivery_type)
184
+ UrlVastAsset = VastAsset1
185
+ """VAST asset delivered via URL endpoint - delivery_type='url'."""
186
+
187
+ InlineVastAsset = VastAsset2
188
+ """VAST asset with inline XML content - delivery_type='inline'."""
189
+
190
+ # DAAST Asset Variants (discriminated by delivery_type)
191
+ UrlDaastAsset = DaastAsset1
192
+ """DAAST asset delivered via URL endpoint - delivery_type='url'."""
193
+
194
+ InlineDaastAsset = DaastAsset2
195
+ """DAAST asset with inline XML content - delivery_type='inline'."""
196
+
197
+ # SubAsset Variants (discriminated by asset_kind)
198
+ MediaSubAsset = SubAsset1
199
+ """SubAsset for media content (images, videos) - asset_kind='media', provides content_uri."""
200
+
201
+ TextSubAsset = SubAsset2
202
+ """SubAsset for text content (headlines, body text) - asset_kind='text', provides content."""
169
203
 
170
204
  # ============================================================================
171
205
  # EXPORTS
@@ -178,6 +212,16 @@ __all__ = [
178
212
  # Activation keys
179
213
  "PropertyIdActivationKey",
180
214
  "PropertyTagActivationKey",
215
+ # Asset type aliases
216
+ "BothPreviewRender",
217
+ "HtmlPreviewRender",
218
+ "InlineDaastAsset",
219
+ "InlineVastAsset",
220
+ "MediaSubAsset",
221
+ "TextSubAsset",
222
+ "UrlDaastAsset",
223
+ "UrlPreviewRender",
224
+ "UrlVastAsset",
181
225
  # Build creative responses
182
226
  "BuildCreativeSuccessResponse",
183
227
  "BuildCreativeErrorResponse",
@@ -193,10 +237,6 @@ __all__ = [
193
237
  # Preview creative responses
194
238
  "PreviewCreativeStaticResponse",
195
239
  "PreviewCreativeInteractiveResponse",
196
- # Preview renders
197
- "PreviewRenderImage",
198
- "PreviewRenderHtml",
199
- "PreviewRenderIframe",
200
240
  # Sync creatives responses
201
241
  "SyncCreativesSuccessResponse",
202
242
  "SyncCreativesErrorResponse",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adcp
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: Official Python client for the Ad Context Protocol (AdCP)
5
5
  Author-email: AdCP Community <maintainers@adcontextprotocol.org>
6
6
  License: Apache-2.0
@@ -1,4 +1,4 @@
1
- adcp/__init__.py,sha256=lbYHt11mytsQ0zVHUqa2UKMGGc8uW0_6c55svUrN6So,6868
1
+ adcp/__init__.py,sha256=mDoTsi0Y6GDfXN5NDZeWw1KcN-pCK8hQlIk43t_MFZQ,7106
2
2
  adcp/__main__.py,sha256=Avy_C71rruh2lOuojvuXDj09tkFOaek74nJ-dbx25Sw,12838
3
3
  adcp/adagents.py,sha256=NjtK_3FmvikG4vlCGPxQwFYl-iOML09uIdtqT2lAWEA,17669
4
4
  adcp/client.py,sha256=KFsNaHNYuapMLpjfqMbycDkEc147gEpxpwXzVuZ1y2o,28802
@@ -13,8 +13,8 @@ adcp/protocols/base.py,sha256=vBHD23Fzl_CCk_Gy9nvSbBYopcJlYkYyzoz-rhI8wHg,5214
13
13
  adcp/protocols/mcp.py,sha256=d9uSpGd0BKvQ0JxztkfDvHwoDrDYhuiw5oivpYOAbmM,16647
14
14
  adcp/testing/__init__.py,sha256=ZWp_floWjVZfy8RBG5v_FUXQ8YbN7xjXvVcX-_zl_HU,1416
15
15
  adcp/testing/test_helpers.py,sha256=4n8fZYy1cVpjZpFW2SxBzpC8fmY-MBFrzY4tIPqe4rQ,10028
16
- adcp/types/__init__.py,sha256=FXm4210pkzOIQQEgpe-EeLLd7mxofzEgKLGl1r8fj4o,465
17
- adcp/types/aliases.py,sha256=U3-QMWcnif9BXjB6tmM3xFL2q0BiiDFtKgqw3Zixbzo,7561
16
+ adcp/types/__init__.py,sha256=sPYsBc__XT4aa3JZGOVs-b9H9jWncQKHIV5LZnkczds,936
17
+ adcp/types/aliases.py,sha256=bekwR6ZGqduVhIWjaICOzh8K6Jk_gq5dGIIi8AKv9Mk,9012
18
18
  adcp/types/base.py,sha256=QoEuVfI4yzefup0dc2KN11AcJTbcGxRep7xOw5hXfs8,837
19
19
  adcp/types/core.py,sha256=RXkKCWCXS9BVJTNpe3Opm5O1I_LaQPMUuVwa-ipvS1Q,4839
20
20
  adcp/types/generated.py,sha256=EGwfnyTr5bgLGRS0TAdsoipX__BPMEwPfxto8quPbYw,17218
@@ -124,9 +124,9 @@ adcp/utils/__init__.py,sha256=uetvSJB19CjQbtwEYZiTnumJG11GsafQmXm5eR3hL7E,153
124
124
  adcp/utils/operation_id.py,sha256=wQX9Bb5epXzRq23xoeYPTqzu5yLuhshg7lKJZihcM2k,294
125
125
  adcp/utils/preview_cache.py,sha256=HbYgHMLIvDddFD6HSupGUze9YLsNOBPlbwlyogUOMcs,18498
126
126
  adcp/utils/response_parser.py,sha256=uPk2vIH-RYZmq7y3i8lC4HTMQ3FfKdlgXKTjgJ1955M,6253
127
- adcp-2.1.0.dist-info/licenses/LICENSE,sha256=PF39NR3Ae8PLgBhg3Uxw6ju7iGVIf8hfv9LRWQdii_U,629
128
- adcp-2.1.0.dist-info/METADATA,sha256=pnih_Vvk8NMhChX8PXduKloMPSU2E-lqsbubUX5_xJ8,23017
129
- adcp-2.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
130
- adcp-2.1.0.dist-info/entry_points.txt,sha256=DQKpcGsJX8DtVI_SGApQ7tNvqUB4zkTLaTAEpFgmi3U,44
131
- adcp-2.1.0.dist-info/top_level.txt,sha256=T1_NF0GefncFU9v_k56oDwKSJREyCqIM8lAwNZf0EOs,5
132
- adcp-2.1.0.dist-info/RECORD,,
127
+ adcp-2.2.0.dist-info/licenses/LICENSE,sha256=PF39NR3Ae8PLgBhg3Uxw6ju7iGVIf8hfv9LRWQdii_U,629
128
+ adcp-2.2.0.dist-info/METADATA,sha256=Soj0JCMNkPiQX-djRIxHWr4BMIEfiXcvHatHRWKEGus,23017
129
+ adcp-2.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
130
+ adcp-2.2.0.dist-info/entry_points.txt,sha256=DQKpcGsJX8DtVI_SGApQ7tNvqUB4zkTLaTAEpFgmi3U,44
131
+ adcp-2.2.0.dist-info/top_level.txt,sha256=T1_NF0GefncFU9v_k56oDwKSJREyCqIM8lAwNZf0EOs,5
132
+ adcp-2.2.0.dist-info/RECORD,,
File without changes