adcp 2.5.0__tar.gz → 2.6.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.
Files changed (147) hide show
  1. {adcp-2.5.0/src/adcp.egg-info → adcp-2.6.0}/PKG-INFO +1 -1
  2. {adcp-2.5.0 → adcp-2.6.0}/pyproject.toml +1 -1
  3. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/__init__.py +19 -1
  4. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/__init__.py +12 -0
  5. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/aliases.py +241 -0
  6. {adcp-2.5.0 → adcp-2.6.0/src/adcp.egg-info}/PKG-INFO +1 -1
  7. {adcp-2.5.0 → adcp-2.6.0}/tests/test_type_aliases.py +267 -0
  8. {adcp-2.5.0 → adcp-2.6.0}/LICENSE +0 -0
  9. {adcp-2.5.0 → adcp-2.6.0}/README.md +0 -0
  10. {adcp-2.5.0 → adcp-2.6.0}/setup.cfg +0 -0
  11. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/__main__.py +0 -0
  12. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/adagents.py +0 -0
  13. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/client.py +0 -0
  14. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/config.py +0 -0
  15. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/exceptions.py +0 -0
  16. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/protocols/__init__.py +0 -0
  17. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/protocols/a2a.py +0 -0
  18. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/protocols/base.py +0 -0
  19. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/protocols/mcp.py +0 -0
  20. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/py.typed +0 -0
  21. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/simple.py +0 -0
  22. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/testing/__init__.py +0 -0
  23. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/testing/test_helpers.py +0 -0
  24. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/_generated.py +0 -0
  25. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/base.py +0 -0
  26. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/core.py +0 -0
  27. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/__init__.py +0 -0
  28. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/activate_signal_request.py +0 -0
  29. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/activate_signal_response.py +0 -0
  30. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/activation_key.py +0 -0
  31. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/adagents.py +0 -0
  32. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/asset_type.py +0 -0
  33. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/audio_asset.py +0 -0
  34. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/brand_manifest.py +0 -0
  35. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/build_creative_request.py +0 -0
  36. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/build_creative_response.py +0 -0
  37. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/channels.py +0 -0
  38. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/cpc_option.py +0 -0
  39. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/cpcv_option.py +0 -0
  40. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/cpm_auction_option.py +0 -0
  41. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/cpm_fixed_option.py +0 -0
  42. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/cpp_option.py +0 -0
  43. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/cpv_option.py +0 -0
  44. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/create_media_buy_request.py +0 -0
  45. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/create_media_buy_response.py +0 -0
  46. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/creative_asset.py +0 -0
  47. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/creative_assignment.py +0 -0
  48. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/creative_manifest.py +0 -0
  49. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/creative_policy.py +0 -0
  50. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/creative_status.py +0 -0
  51. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/css_asset.py +0 -0
  52. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/daast_asset.py +0 -0
  53. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/delivery_metrics.py +0 -0
  54. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/delivery_type.py +0 -0
  55. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/deployment.py +0 -0
  56. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/destination.py +0 -0
  57. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/error.py +0 -0
  58. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/flat_rate_option.py +0 -0
  59. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/format.py +0 -0
  60. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/format_id.py +0 -0
  61. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/frequency_cap.py +0 -0
  62. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/frequency_cap_scope.py +0 -0
  63. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/get_media_buy_delivery_request.py +0 -0
  64. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/get_media_buy_delivery_response.py +0 -0
  65. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/get_products_request.py +0 -0
  66. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/get_products_response.py +0 -0
  67. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/get_signals_request.py +0 -0
  68. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/get_signals_response.py +0 -0
  69. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/html_asset.py +0 -0
  70. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/identifier_types.py +0 -0
  71. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/image_asset.py +0 -0
  72. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/javascript_asset.py +0 -0
  73. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/list_authorized_properties_request.py +0 -0
  74. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/list_authorized_properties_response.py +0 -0
  75. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/list_creative_formats_request.py +0 -0
  76. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/list_creative_formats_response.py +0 -0
  77. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/list_creatives_request.py +0 -0
  78. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/list_creatives_response.py +0 -0
  79. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/markdown_asset.py +0 -0
  80. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/measurement.py +0 -0
  81. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/media_buy.py +0 -0
  82. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/media_buy_status.py +0 -0
  83. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/pacing.py +0 -0
  84. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/package.py +0 -0
  85. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/package_request.py +0 -0
  86. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/package_status.py +0 -0
  87. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/performance_feedback.py +0 -0
  88. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/placement.py +0 -0
  89. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/preview_creative_request.py +0 -0
  90. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/preview_creative_response.py +0 -0
  91. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/preview_render.py +0 -0
  92. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/pricing_model.py +0 -0
  93. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/product.py +0 -0
  94. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/promoted_offerings.py +0 -0
  95. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/promoted_products.py +0 -0
  96. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/property.py +0 -0
  97. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/protocol_envelope.py +0 -0
  98. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/provide_performance_feedback_request.py +0 -0
  99. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/provide_performance_feedback_response.py +0 -0
  100. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/publisher_identifier_types.py +0 -0
  101. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/push_notification_config.py +0 -0
  102. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/reporting_capabilities.py +0 -0
  103. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/response.py +0 -0
  104. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/standard_format_ids.py +0 -0
  105. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/sub_asset.py +0 -0
  106. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/sync_creatives_request.py +0 -0
  107. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/sync_creatives_response.py +0 -0
  108. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/targeting.py +0 -0
  109. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/task_status.py +0 -0
  110. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/task_type.py +0 -0
  111. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/tasks_get_request.py +0 -0
  112. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/tasks_get_response.py +0 -0
  113. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/tasks_list_request.py +0 -0
  114. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/tasks_list_response.py +0 -0
  115. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/text_asset.py +0 -0
  116. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/update_media_buy_request.py +0 -0
  117. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/update_media_buy_response.py +0 -0
  118. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/url_asset.py +0 -0
  119. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/vast_asset.py +0 -0
  120. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/vcpm_auction_option.py +0 -0
  121. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/vcpm_fixed_option.py +0 -0
  122. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/video_asset.py +0 -0
  123. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/webhook_asset.py +0 -0
  124. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/generated_poc/webhook_payload.py +0 -0
  125. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/types/stable.py +0 -0
  126. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/utils/__init__.py +0 -0
  127. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/utils/operation_id.py +0 -0
  128. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/utils/preview_cache.py +0 -0
  129. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/utils/response_parser.py +0 -0
  130. {adcp-2.5.0 → adcp-2.6.0}/src/adcp/validation.py +0 -0
  131. {adcp-2.5.0 → adcp-2.6.0}/src/adcp.egg-info/SOURCES.txt +0 -0
  132. {adcp-2.5.0 → adcp-2.6.0}/src/adcp.egg-info/dependency_links.txt +0 -0
  133. {adcp-2.5.0 → adcp-2.6.0}/src/adcp.egg-info/entry_points.txt +0 -0
  134. {adcp-2.5.0 → adcp-2.6.0}/src/adcp.egg-info/requires.txt +0 -0
  135. {adcp-2.5.0 → adcp-2.6.0}/src/adcp.egg-info/top_level.txt +0 -0
  136. {adcp-2.5.0 → adcp-2.6.0}/tests/test_adagents.py +0 -0
  137. {adcp-2.5.0 → adcp-2.6.0}/tests/test_cli.py +0 -0
  138. {adcp-2.5.0 → adcp-2.6.0}/tests/test_client.py +0 -0
  139. {adcp-2.5.0 → adcp-2.6.0}/tests/test_code_generation.py +0 -0
  140. {adcp-2.5.0 → adcp-2.6.0}/tests/test_discriminated_unions.py +0 -0
  141. {adcp-2.5.0 → adcp-2.6.0}/tests/test_format_id_validation.py +0 -0
  142. {adcp-2.5.0 → adcp-2.6.0}/tests/test_helpers.py +0 -0
  143. {adcp-2.5.0 → adcp-2.6.0}/tests/test_preview_html.py +0 -0
  144. {adcp-2.5.0 → adcp-2.6.0}/tests/test_protocols.py +0 -0
  145. {adcp-2.5.0 → adcp-2.6.0}/tests/test_public_api.py +0 -0
  146. {adcp-2.5.0 → adcp-2.6.0}/tests/test_response_parser.py +0 -0
  147. {adcp-2.5.0 → adcp-2.6.0}/tests/test_simple_api.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adcp
3
- Version: 2.5.0
3
+ Version: 2.6.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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "adcp"
7
- version = "2.5.0"
7
+ version = "2.6.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"}
@@ -101,6 +101,8 @@ from adcp.types._generated import TaskStatus as GeneratedTaskStatus
101
101
  from adcp.types.aliases import (
102
102
  ActivateSignalErrorResponse,
103
103
  ActivateSignalSuccessResponse,
104
+ AgentDeployment,
105
+ AgentDestination,
104
106
  BothPreviewRender,
105
107
  BuildCreativeErrorResponse,
106
108
  BuildCreativeSuccessResponse,
@@ -111,14 +113,21 @@ from adcp.types.aliases import (
111
113
  InlineDaastAsset,
112
114
  InlineVastAsset,
113
115
  MediaSubAsset,
116
+ PlatformDeployment,
117
+ PlatformDestination,
114
118
  PreviewCreativeFormatRequest,
115
119
  PreviewCreativeInteractiveResponse,
116
120
  PreviewCreativeManifestRequest,
117
121
  PreviewCreativeStaticResponse,
122
+ PropertyId,
118
123
  PropertyIdActivationKey,
124
+ PropertyTag,
119
125
  PropertyTagActivationKey,
120
126
  ProvidePerformanceFeedbackErrorResponse,
121
127
  ProvidePerformanceFeedbackSuccessResponse,
128
+ PublisherPropertiesAll,
129
+ PublisherPropertiesById,
130
+ PublisherPropertiesByTag,
122
131
  SyncCreativesErrorResponse,
123
132
  SyncCreativesSuccessResponse,
124
133
  TextSubAsset,
@@ -165,7 +174,7 @@ from adcp.validation import (
165
174
  validate_publisher_properties_item,
166
175
  )
167
176
 
168
- __version__ = "2.5.0"
177
+ __version__ = "2.6.0"
169
178
 
170
179
  __all__ = [
171
180
  # Client classes
@@ -281,6 +290,8 @@ __all__ = [
281
290
  # Semantic type aliases (for better API ergonomics)
282
291
  "ActivateSignalSuccessResponse",
283
292
  "ActivateSignalErrorResponse",
293
+ "AgentDeployment",
294
+ "AgentDestination",
284
295
  "BothPreviewRender",
285
296
  "BuildCreativeSuccessResponse",
286
297
  "BuildCreativeErrorResponse",
@@ -290,14 +301,21 @@ __all__ = [
290
301
  "InlineDaastAsset",
291
302
  "InlineVastAsset",
292
303
  "MediaSubAsset",
304
+ "PlatformDeployment",
305
+ "PlatformDestination",
293
306
  "PreviewCreativeFormatRequest",
294
307
  "PreviewCreativeManifestRequest",
295
308
  "PreviewCreativeStaticResponse",
296
309
  "PreviewCreativeInteractiveResponse",
310
+ "PropertyId",
297
311
  "PropertyIdActivationKey",
312
+ "PropertyTag",
298
313
  "PropertyTagActivationKey",
299
314
  "ProvidePerformanceFeedbackSuccessResponse",
300
315
  "ProvidePerformanceFeedbackErrorResponse",
316
+ "PublisherPropertiesAll",
317
+ "PublisherPropertiesById",
318
+ "PublisherPropertiesByTag",
301
319
  "SyncCreativesSuccessResponse",
302
320
  "SyncCreativesErrorResponse",
303
321
  "TextSubAsset",
@@ -17,6 +17,11 @@ from adcp.types.aliases import (
17
17
  InlineDaastAsset,
18
18
  InlineVastAsset,
19
19
  MediaSubAsset,
20
+ PropertyId,
21
+ PropertyTag,
22
+ PublisherPropertiesAll,
23
+ PublisherPropertiesById,
24
+ PublisherPropertiesByTag,
20
25
  TextSubAsset,
21
26
  UrlDaastAsset,
22
27
  UrlPreviewRender,
@@ -89,6 +94,13 @@ __all__ = [
89
94
  "UrlVastAsset",
90
95
  # Package type aliases
91
96
  "CreatedPackageReference",
97
+ # Publisher properties types
98
+ "PropertyId",
99
+ "PropertyTag",
100
+ # Publisher properties aliases
101
+ "PublisherPropertiesAll",
102
+ "PublisherPropertiesById",
103
+ "PublisherPropertiesByTag",
92
104
  # Stable API types (commonly used)
93
105
  "BrandManifest",
94
106
  "Creative",
@@ -48,6 +48,12 @@ from adcp.types._generated import (
48
48
  # DAAST assets
49
49
  DaastAsset1,
50
50
  DaastAsset2,
51
+ # Deployment types
52
+ Deployment1,
53
+ Deployment2,
54
+ # Destination types
55
+ Destination1,
56
+ Destination2,
51
57
  # Preview creative requests
52
58
  PreviewCreativeRequest1,
53
59
  PreviewCreativeRequest2,
@@ -84,6 +90,21 @@ from adcp.types.generated_poc.create_media_buy_response import (
84
90
  )
85
91
  from adcp.types.generated_poc.package import Package as FullPackageInternal
86
92
 
93
+ # Import PublisherProperties types and related types from product module
94
+ from adcp.types.generated_poc.product import (
95
+ PropertyId,
96
+ PropertyTag,
97
+ )
98
+ from adcp.types.generated_poc.product import (
99
+ PublisherProperties as PublisherPropertiesInternal,
100
+ )
101
+ from adcp.types.generated_poc.product import (
102
+ PublisherProperties4 as PublisherPropertiesByIdInternal,
103
+ )
104
+ from adcp.types.generated_poc.product import (
105
+ PublisherProperties5 as PublisherPropertiesByTagInternal,
106
+ )
107
+
87
108
  # ============================================================================
88
109
  # RESPONSE TYPE ALIASES - Success/Error Discriminated Unions
89
110
  # ============================================================================
@@ -252,6 +273,213 @@ Used in:
252
273
  Fields: buyer_ref, package_id only
253
274
  """
254
275
 
276
+ # ============================================================================
277
+ # PUBLISHER PROPERTIES ALIASES - Selection Type Discriminated Unions
278
+ # ============================================================================
279
+ # The AdCP schemas define PublisherProperties as a discriminated union with
280
+ # three variants based on the `selection_type` field:
281
+ #
282
+ # 1. All Properties (selection_type='all'):
283
+ # - Includes all properties from the publisher
284
+ # - Only requires publisher_domain
285
+ #
286
+ # 2. By ID (selection_type='by_id'):
287
+ # - Specific properties selected by property_id
288
+ # - Requires publisher_domain + property_ids array
289
+ #
290
+ # 3. By Tag (selection_type='by_tag'):
291
+ # - Properties selected by tags
292
+ # - Requires publisher_domain + property_tags array
293
+ #
294
+ # These semantic aliases match the discriminator values and make code more
295
+ # readable when constructing or pattern-matching publisher properties.
296
+
297
+ PublisherPropertiesAll = PublisherPropertiesInternal
298
+ """Publisher properties covering all properties from the publisher.
299
+
300
+ This variant uses selection_type='all' and includes all properties listed
301
+ in the publisher's adagents.json file.
302
+
303
+ Fields:
304
+ - publisher_domain: Domain where adagents.json is hosted
305
+ - selection_type: Literal['all']
306
+
307
+ Example:
308
+ ```python
309
+ from adcp import PublisherPropertiesAll
310
+
311
+ props = PublisherPropertiesAll(
312
+ publisher_domain="example.com",
313
+ selection_type="all"
314
+ )
315
+ ```
316
+ """
317
+
318
+ PublisherPropertiesById = PublisherPropertiesByIdInternal
319
+ """Publisher properties selected by specific property IDs.
320
+
321
+ This variant uses selection_type='by_id' and specifies an explicit list
322
+ of property IDs from the publisher's adagents.json file.
323
+
324
+ Fields:
325
+ - publisher_domain: Domain where adagents.json is hosted
326
+ - selection_type: Literal['by_id']
327
+ - property_ids: List of PropertyId (non-empty)
328
+
329
+ Example:
330
+ ```python
331
+ from adcp import PublisherPropertiesById, PropertyId
332
+
333
+ props = PublisherPropertiesById(
334
+ publisher_domain="example.com",
335
+ selection_type="by_id",
336
+ property_ids=[PropertyId("homepage"), PropertyId("sports_section")]
337
+ )
338
+ ```
339
+ """
340
+
341
+ PublisherPropertiesByTag = PublisherPropertiesByTagInternal
342
+ """Publisher properties selected by tags.
343
+
344
+ This variant uses selection_type='by_tag' and specifies property tags.
345
+ The product covers all properties in the publisher's adagents.json that
346
+ have these tags.
347
+
348
+ Fields:
349
+ - publisher_domain: Domain where adagents.json is hosted
350
+ - selection_type: Literal['by_tag']
351
+ - property_tags: List of PropertyTag (non-empty)
352
+
353
+ Example:
354
+ ```python
355
+ from adcp import PublisherPropertiesByTag, PropertyTag
356
+
357
+ props = PublisherPropertiesByTag(
358
+ publisher_domain="example.com",
359
+ selection_type="by_tag",
360
+ property_tags=[PropertyTag("premium"), PropertyTag("video")]
361
+ )
362
+ ```
363
+ """
364
+
365
+ # ============================================================================
366
+ # DEPLOYMENT & DESTINATION ALIASES - Signal Deployment Type Discriminated Unions
367
+ # ============================================================================
368
+ # The AdCP schemas define Deployment and Destination as discriminated unions
369
+ # with two variants based on the `type` field:
370
+ #
371
+ # Deployment (where a signal is activated):
372
+ # - Platform (type='platform'): DSP platform with platform ID
373
+ # - Agent (type='agent'): Sales agent with agent URL
374
+ #
375
+ # Destination (where a signal can be activated):
376
+ # - Platform (type='platform'): Target DSP platform
377
+ # - Agent (type='agent'): Target sales agent
378
+ #
379
+ # These are used in GetSignalsResponse to describe signal availability and
380
+ # activation status across different advertising platforms and agents.
381
+
382
+ PlatformDeployment = Deployment1
383
+ """Signal deployment to a DSP platform.
384
+
385
+ This variant uses type='platform' for platform-based signal deployments
386
+ like The Trade Desk, Amazon DSP, etc.
387
+
388
+ Fields:
389
+ - type: Literal['platform']
390
+ - platform: Platform identifier (e.g., 'the-trade-desk')
391
+ - account: Optional account identifier
392
+ - is_live: Whether signal is currently active
393
+ - deployed_at: Activation timestamp if live
394
+ - activation_key: Targeting key if live and accessible
395
+ - estimated_activation_duration_minutes: Time to complete activation
396
+
397
+ Example:
398
+ ```python
399
+ from adcp import PlatformDeployment
400
+
401
+ deployment = PlatformDeployment(
402
+ type="platform",
403
+ platform="the-trade-desk",
404
+ account="advertiser-123",
405
+ is_live=True,
406
+ deployed_at=datetime.now(timezone.utc)
407
+ )
408
+ ```
409
+ """
410
+
411
+ AgentDeployment = Deployment2
412
+ """Signal deployment to a sales agent.
413
+
414
+ This variant uses type='agent' for agent-based signal deployments
415
+ using agent URLs.
416
+
417
+ Fields:
418
+ - type: Literal['agent']
419
+ - agent_url: URL identifying the destination agent
420
+ - account: Optional account identifier
421
+ - is_live: Whether signal is currently active
422
+ - deployed_at: Activation timestamp if live
423
+ - activation_key: Targeting key if live and accessible
424
+ - estimated_activation_duration_minutes: Time to complete activation
425
+
426
+ Example:
427
+ ```python
428
+ from adcp import AgentDeployment
429
+
430
+ deployment = AgentDeployment(
431
+ type="agent",
432
+ agent_url="https://agent.example.com",
433
+ is_live=False,
434
+ estimated_activation_duration_minutes=30.0
435
+ )
436
+ ```
437
+ """
438
+
439
+ PlatformDestination = Destination1
440
+ """Available signal destination on a DSP platform.
441
+
442
+ This variant uses type='platform' for platform-based signal destinations.
443
+
444
+ Fields:
445
+ - type: Literal['platform']
446
+ - platform: Platform identifier (e.g., 'the-trade-desk', 'amazon-dsp')
447
+ - account: Optional account identifier on the platform
448
+
449
+ Example:
450
+ ```python
451
+ from adcp import PlatformDestination
452
+
453
+ destination = PlatformDestination(
454
+ type="platform",
455
+ platform="the-trade-desk",
456
+ account="advertiser-123"
457
+ )
458
+ ```
459
+ """
460
+
461
+ AgentDestination = Destination2
462
+ """Available signal destination via a sales agent.
463
+
464
+ This variant uses type='agent' for agent-based signal destinations.
465
+
466
+ Fields:
467
+ - type: Literal['agent']
468
+ - agent_url: URL identifying the destination agent
469
+ - account: Optional account identifier on the agent
470
+
471
+ Example:
472
+ ```python
473
+ from adcp import AgentDestination
474
+
475
+ destination = AgentDestination(
476
+ type="agent",
477
+ agent_url="https://agent.example.com",
478
+ account="partner-456"
479
+ )
480
+ ```
481
+ """
482
+
255
483
  # ============================================================================
256
484
  # EXPORTS
257
485
  # ============================================================================
@@ -300,4 +528,17 @@ __all__ = [
300
528
  # Package type aliases
301
529
  "CreatedPackageReference",
302
530
  "Package",
531
+ # Publisher properties types
532
+ "PropertyId",
533
+ "PropertyTag",
534
+ # Publisher properties aliases
535
+ "PublisherPropertiesAll",
536
+ "PublisherPropertiesById",
537
+ "PublisherPropertiesByTag",
538
+ # Deployment aliases
539
+ "PlatformDeployment",
540
+ "AgentDeployment",
541
+ # Destination aliases
542
+ "PlatformDestination",
543
+ "AgentDestination",
303
544
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adcp
3
- Version: 2.5.0
3
+ Version: 2.6.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
@@ -396,3 +396,270 @@ def test_stable_package_export_is_full_package():
396
396
  assert "budget" in stable_fields
397
397
  assert "pricing_option_id" in stable_fields
398
398
  assert "product_id" in stable_fields
399
+
400
+
401
+ def test_publisher_properties_aliases_imports():
402
+ """Test that PublisherProperties aliases can be imported."""
403
+ from adcp import (
404
+ PropertyId,
405
+ PropertyTag,
406
+ PublisherPropertiesAll,
407
+ PublisherPropertiesById,
408
+ PublisherPropertiesByTag,
409
+ )
410
+ from adcp.types.aliases import (
411
+ PropertyId as AliasPropertyId,
412
+ )
413
+ from adcp.types.aliases import (
414
+ PropertyTag as AliasPropertyTag,
415
+ )
416
+ from adcp.types.aliases import (
417
+ PublisherPropertiesAll as AliasPublisherPropertiesAll,
418
+ )
419
+ from adcp.types.aliases import (
420
+ PublisherPropertiesById as AliasPublisherPropertiesById,
421
+ )
422
+ from adcp.types.aliases import (
423
+ PublisherPropertiesByTag as AliasPublisherPropertiesByTag,
424
+ )
425
+
426
+ # Verify all import paths work
427
+ assert PropertyId is AliasPropertyId
428
+ assert PropertyTag is AliasPropertyTag
429
+ assert PublisherPropertiesAll is AliasPublisherPropertiesAll
430
+ assert PublisherPropertiesById is AliasPublisherPropertiesById
431
+ assert PublisherPropertiesByTag is AliasPublisherPropertiesByTag
432
+
433
+
434
+ def test_publisher_properties_aliases_point_to_correct_types():
435
+ """Test that PublisherProperties aliases point to the correct generated types."""
436
+ from adcp import PublisherPropertiesAll, PublisherPropertiesById, PublisherPropertiesByTag
437
+ from adcp.types.generated_poc.product import (
438
+ PublisherProperties,
439
+ PublisherProperties4,
440
+ PublisherProperties5,
441
+ )
442
+
443
+ # Verify aliases point to correct types
444
+ assert PublisherPropertiesAll is PublisherProperties
445
+ assert PublisherPropertiesById is PublisherProperties4
446
+ assert PublisherPropertiesByTag is PublisherProperties5
447
+
448
+ # Verify they're different types
449
+ assert PublisherPropertiesAll is not PublisherPropertiesById
450
+ assert PublisherPropertiesAll is not PublisherPropertiesByTag
451
+ assert PublisherPropertiesById is not PublisherPropertiesByTag
452
+
453
+
454
+ def test_publisher_properties_aliases_have_correct_discriminators():
455
+ """Test that PublisherProperties aliases have the correct discriminator values."""
456
+ from adcp import PublisherPropertiesAll, PublisherPropertiesById, PublisherPropertiesByTag
457
+
458
+ # Check that discriminator field has correct literal type
459
+ all_selection_type = PublisherPropertiesAll.__annotations__["selection_type"]
460
+ by_id_selection_type = PublisherPropertiesById.__annotations__["selection_type"]
461
+ by_tag_selection_type = PublisherPropertiesByTag.__annotations__["selection_type"]
462
+
463
+ # Verify the annotations contain Literal types
464
+ assert "selection_type" in PublisherPropertiesAll.__annotations__
465
+ assert "selection_type" in PublisherPropertiesById.__annotations__
466
+ assert "selection_type" in PublisherPropertiesByTag.__annotations__
467
+
468
+
469
+ def test_publisher_properties_aliases_can_instantiate():
470
+ """Test that PublisherProperties aliases can be used to create instances."""
471
+ from adcp import (
472
+ PropertyId,
473
+ PropertyTag,
474
+ PublisherPropertiesAll,
475
+ PublisherPropertiesById,
476
+ PublisherPropertiesByTag,
477
+ )
478
+
479
+ # Create PublisherPropertiesAll
480
+ props_all = PublisherPropertiesAll(
481
+ publisher_domain="example.com", selection_type="all"
482
+ )
483
+ assert props_all.publisher_domain == "example.com"
484
+ assert props_all.selection_type == "all"
485
+
486
+ # Create PublisherPropertiesById
487
+ props_by_id = PublisherPropertiesById(
488
+ publisher_domain="example.com",
489
+ selection_type="by_id",
490
+ property_ids=[PropertyId("homepage"), PropertyId("sports")],
491
+ )
492
+ assert props_by_id.publisher_domain == "example.com"
493
+ assert props_by_id.selection_type == "by_id"
494
+ assert len(props_by_id.property_ids) == 2
495
+
496
+ # Create PublisherPropertiesByTag
497
+ props_by_tag = PublisherPropertiesByTag(
498
+ publisher_domain="example.com",
499
+ selection_type="by_tag",
500
+ property_tags=[PropertyTag("premium"), PropertyTag("video")],
501
+ )
502
+ assert props_by_tag.publisher_domain == "example.com"
503
+ assert props_by_tag.selection_type == "by_tag"
504
+ assert len(props_by_tag.property_tags) == 2
505
+
506
+
507
+ def test_publisher_properties_aliases_in_exports():
508
+ """Test that PublisherProperties aliases are properly exported."""
509
+ import adcp
510
+ import adcp.types.aliases as aliases_module
511
+
512
+ # Check main package exports
513
+ assert hasattr(adcp, "PropertyId")
514
+ assert hasattr(adcp, "PropertyTag")
515
+ assert hasattr(adcp, "PublisherPropertiesAll")
516
+ assert hasattr(adcp, "PublisherPropertiesById")
517
+ assert hasattr(adcp, "PublisherPropertiesByTag")
518
+
519
+ assert "PropertyId" in adcp.__all__
520
+ assert "PropertyTag" in adcp.__all__
521
+ assert "PublisherPropertiesAll" in adcp.__all__
522
+ assert "PublisherPropertiesById" in adcp.__all__
523
+ assert "PublisherPropertiesByTag" in adcp.__all__
524
+
525
+ # Check aliases module exports
526
+ assert hasattr(aliases_module, "PropertyId")
527
+ assert hasattr(aliases_module, "PropertyTag")
528
+ assert hasattr(aliases_module, "PublisherPropertiesAll")
529
+ assert hasattr(aliases_module, "PublisherPropertiesById")
530
+ assert hasattr(aliases_module, "PublisherPropertiesByTag")
531
+
532
+ assert "PropertyId" in aliases_module.__all__
533
+ assert "PropertyTag" in aliases_module.__all__
534
+ assert "PublisherPropertiesAll" in aliases_module.__all__
535
+ assert "PublisherPropertiesById" in aliases_module.__all__
536
+ assert "PublisherPropertiesByTag" in aliases_module.__all__
537
+
538
+
539
+ def test_property_id_and_tag_are_root_models():
540
+ """Test that PropertyId and PropertyTag are properly constrained string types."""
541
+ from adcp import PropertyId, PropertyTag
542
+
543
+ # Create valid PropertyId and PropertyTag
544
+ prop_id = PropertyId("my_property_id")
545
+ prop_tag = PropertyTag("premium")
546
+
547
+ # Verify they are created successfully
548
+ assert prop_id.root == "my_property_id"
549
+ assert prop_tag.root == "premium"
550
+
551
+ # PropertyTag should be a subclass of PropertyId
552
+ assert issubclass(PropertyTag, PropertyId)
553
+
554
+
555
+ def test_deployment_aliases_imports():
556
+ """Test that Deployment aliases can be imported."""
557
+ from adcp import AgentDeployment, PlatformDeployment
558
+ from adcp.types.aliases import AgentDeployment as AliasAgentDeployment
559
+ from adcp.types.aliases import PlatformDeployment as AliasPlatformDeployment
560
+
561
+ # Verify all import paths work
562
+ assert PlatformDeployment is AliasPlatformDeployment
563
+ assert AgentDeployment is AliasAgentDeployment
564
+
565
+
566
+ def test_deployment_aliases_point_to_correct_types():
567
+ """Test that Deployment aliases point to the correct generated types."""
568
+ from adcp import AgentDeployment, PlatformDeployment
569
+ from adcp.types.generated_poc.deployment import Deployment1, Deployment2
570
+
571
+ # Verify aliases point to correct types
572
+ assert PlatformDeployment is Deployment1
573
+ assert AgentDeployment is Deployment2
574
+
575
+ # Verify they're different types
576
+ assert PlatformDeployment is not AgentDeployment
577
+
578
+
579
+ def test_deployment_aliases_can_instantiate():
580
+ """Test that Deployment aliases can be used to create instances."""
581
+ from adcp import AgentDeployment, PlatformDeployment
582
+ from datetime import datetime, timezone
583
+
584
+ # Create PlatformDeployment
585
+ platform_deployment = PlatformDeployment(
586
+ type="platform", platform="the-trade-desk", is_live=True
587
+ )
588
+ assert platform_deployment.type == "platform"
589
+ assert platform_deployment.platform == "the-trade-desk"
590
+ assert platform_deployment.is_live is True
591
+
592
+ # Create AgentDeployment
593
+ agent_deployment = AgentDeployment(
594
+ type="agent", agent_url="https://agent.example.com", is_live=False
595
+ )
596
+ assert agent_deployment.type == "agent"
597
+ assert str(agent_deployment.agent_url) == "https://agent.example.com/"
598
+ assert agent_deployment.is_live is False
599
+
600
+
601
+ def test_destination_aliases_imports():
602
+ """Test that Destination aliases can be imported."""
603
+ from adcp import AgentDestination, PlatformDestination
604
+ from adcp.types.aliases import AgentDestination as AliasAgentDestination
605
+ from adcp.types.aliases import PlatformDestination as AliasPlatformDestination
606
+
607
+ # Verify all import paths work
608
+ assert PlatformDestination is AliasPlatformDestination
609
+ assert AgentDestination is AliasAgentDestination
610
+
611
+
612
+ def test_destination_aliases_point_to_correct_types():
613
+ """Test that Destination aliases point to the correct generated types."""
614
+ from adcp import AgentDestination, PlatformDestination
615
+ from adcp.types.generated_poc.destination import Destination1, Destination2
616
+
617
+ # Verify aliases point to correct types
618
+ assert PlatformDestination is Destination1
619
+ assert AgentDestination is Destination2
620
+
621
+ # Verify they're different types
622
+ assert PlatformDestination is not AgentDestination
623
+
624
+
625
+ def test_destination_aliases_can_instantiate():
626
+ """Test that Destination aliases can be used to create instances."""
627
+ from adcp import AgentDestination, PlatformDestination
628
+
629
+ # Create PlatformDestination
630
+ platform_dest = PlatformDestination(type="platform", platform="amazon-dsp")
631
+ assert platform_dest.type == "platform"
632
+ assert platform_dest.platform == "amazon-dsp"
633
+
634
+ # Create AgentDestination
635
+ agent_dest = AgentDestination(type="agent", agent_url="https://agent.example.com")
636
+ assert agent_dest.type == "agent"
637
+ assert str(agent_dest.agent_url) == "https://agent.example.com/"
638
+
639
+
640
+ def test_deployment_destination_aliases_in_exports():
641
+ """Test that Deployment and Destination aliases are properly exported."""
642
+ import adcp
643
+ import adcp.types.aliases as aliases_module
644
+
645
+ # Check main package exports
646
+ assert hasattr(adcp, "PlatformDeployment")
647
+ assert hasattr(adcp, "AgentDeployment")
648
+ assert hasattr(adcp, "PlatformDestination")
649
+ assert hasattr(adcp, "AgentDestination")
650
+
651
+ assert "PlatformDeployment" in adcp.__all__
652
+ assert "AgentDeployment" in adcp.__all__
653
+ assert "PlatformDestination" in adcp.__all__
654
+ assert "AgentDestination" in adcp.__all__
655
+
656
+ # Check aliases module exports
657
+ assert hasattr(aliases_module, "PlatformDeployment")
658
+ assert hasattr(aliases_module, "AgentDeployment")
659
+ assert hasattr(aliases_module, "PlatformDestination")
660
+ assert hasattr(aliases_module, "AgentDestination")
661
+
662
+ assert "PlatformDeployment" in aliases_module.__all__
663
+ assert "AgentDeployment" in aliases_module.__all__
664
+ assert "PlatformDestination" in aliases_module.__all__
665
+ assert "AgentDestination" in aliases_module.__all__
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes