adcp 2.12.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.
Files changed (176) hide show
  1. adcp/__init__.py +364 -0
  2. adcp/__main__.py +440 -0
  3. adcp/adagents.py +642 -0
  4. adcp/client.py +1057 -0
  5. adcp/config.py +82 -0
  6. adcp/exceptions.py +185 -0
  7. adcp/protocols/__init__.py +9 -0
  8. adcp/protocols/a2a.py +484 -0
  9. adcp/protocols/base.py +190 -0
  10. adcp/protocols/mcp.py +440 -0
  11. adcp/py.typed +0 -0
  12. adcp/simple.py +451 -0
  13. adcp/testing/__init__.py +53 -0
  14. adcp/testing/test_helpers.py +311 -0
  15. adcp/types/__init__.py +561 -0
  16. adcp/types/_generated.py +237 -0
  17. adcp/types/aliases.py +748 -0
  18. adcp/types/base.py +26 -0
  19. adcp/types/core.py +174 -0
  20. adcp/types/generated_poc/__init__.py +3 -0
  21. adcp/types/generated_poc/adagents.py +411 -0
  22. adcp/types/generated_poc/core/__init__.py +3 -0
  23. adcp/types/generated_poc/core/activation_key.py +30 -0
  24. adcp/types/generated_poc/core/assets/__init__.py +3 -0
  25. adcp/types/generated_poc/core/assets/audio_asset.py +26 -0
  26. adcp/types/generated_poc/core/assets/css_asset.py +20 -0
  27. adcp/types/generated_poc/core/assets/daast_asset.py +61 -0
  28. adcp/types/generated_poc/core/assets/html_asset.py +18 -0
  29. adcp/types/generated_poc/core/assets/image_asset.py +19 -0
  30. adcp/types/generated_poc/core/assets/javascript_asset.py +23 -0
  31. adcp/types/generated_poc/core/assets/text_asset.py +20 -0
  32. adcp/types/generated_poc/core/assets/url_asset.py +28 -0
  33. adcp/types/generated_poc/core/assets/vast_asset.py +63 -0
  34. adcp/types/generated_poc/core/assets/video_asset.py +24 -0
  35. adcp/types/generated_poc/core/assets/webhook_asset.py +53 -0
  36. adcp/types/generated_poc/core/brand_manifest.py +201 -0
  37. adcp/types/generated_poc/core/context.py +15 -0
  38. adcp/types/generated_poc/core/creative_asset.py +102 -0
  39. adcp/types/generated_poc/core/creative_assignment.py +27 -0
  40. adcp/types/generated_poc/core/creative_filters.py +86 -0
  41. adcp/types/generated_poc/core/creative_manifest.py +68 -0
  42. adcp/types/generated_poc/core/creative_policy.py +28 -0
  43. adcp/types/generated_poc/core/delivery_metrics.py +111 -0
  44. adcp/types/generated_poc/core/deployment.py +78 -0
  45. adcp/types/generated_poc/core/destination.py +43 -0
  46. adcp/types/generated_poc/core/dimensions.py +18 -0
  47. adcp/types/generated_poc/core/error.py +29 -0
  48. adcp/types/generated_poc/core/ext.py +15 -0
  49. adcp/types/generated_poc/core/format.py +260 -0
  50. adcp/types/generated_poc/core/format_id.py +50 -0
  51. adcp/types/generated_poc/core/frequency_cap.py +19 -0
  52. adcp/types/generated_poc/core/measurement.py +40 -0
  53. adcp/types/generated_poc/core/media_buy.py +40 -0
  54. adcp/types/generated_poc/core/package.py +68 -0
  55. adcp/types/generated_poc/core/performance_feedback.py +78 -0
  56. adcp/types/generated_poc/core/placement.py +37 -0
  57. adcp/types/generated_poc/core/product.py +164 -0
  58. adcp/types/generated_poc/core/product_filters.py +97 -0
  59. adcp/types/generated_poc/core/promoted_offerings.py +102 -0
  60. adcp/types/generated_poc/core/promoted_products.py +38 -0
  61. adcp/types/generated_poc/core/property.py +64 -0
  62. adcp/types/generated_poc/core/property_id.py +21 -0
  63. adcp/types/generated_poc/core/property_tag.py +21 -0
  64. adcp/types/generated_poc/core/protocol_envelope.py +61 -0
  65. adcp/types/generated_poc/core/publisher_property_selector.py +75 -0
  66. adcp/types/generated_poc/core/push_notification_config.py +51 -0
  67. adcp/types/generated_poc/core/reporting_capabilities.py +51 -0
  68. adcp/types/generated_poc/core/response.py +24 -0
  69. adcp/types/generated_poc/core/signal_filters.py +29 -0
  70. adcp/types/generated_poc/core/sub_asset.py +55 -0
  71. adcp/types/generated_poc/core/targeting.py +53 -0
  72. adcp/types/generated_poc/core/webhook_payload.py +96 -0
  73. adcp/types/generated_poc/creative/__init__.py +3 -0
  74. adcp/types/generated_poc/creative/list_creative_formats_request.py +88 -0
  75. adcp/types/generated_poc/creative/list_creative_formats_response.py +55 -0
  76. adcp/types/generated_poc/creative/preview_creative_request.py +153 -0
  77. adcp/types/generated_poc/creative/preview_creative_response.py +169 -0
  78. adcp/types/generated_poc/creative/preview_render.py +152 -0
  79. adcp/types/generated_poc/enums/__init__.py +3 -0
  80. adcp/types/generated_poc/enums/adcp_domain.py +12 -0
  81. adcp/types/generated_poc/enums/asset_content_type.py +23 -0
  82. adcp/types/generated_poc/enums/auth_scheme.py +12 -0
  83. adcp/types/generated_poc/enums/available_metric.py +19 -0
  84. adcp/types/generated_poc/enums/channels.py +19 -0
  85. adcp/types/generated_poc/enums/co_branding_requirement.py +13 -0
  86. adcp/types/generated_poc/enums/creative_action.py +15 -0
  87. adcp/types/generated_poc/enums/creative_agent_capability.py +14 -0
  88. adcp/types/generated_poc/enums/creative_sort_field.py +16 -0
  89. adcp/types/generated_poc/enums/creative_status.py +14 -0
  90. adcp/types/generated_poc/enums/daast_tracking_event.py +21 -0
  91. adcp/types/generated_poc/enums/daast_version.py +12 -0
  92. adcp/types/generated_poc/enums/delivery_type.py +12 -0
  93. adcp/types/generated_poc/enums/dimension_unit.py +14 -0
  94. adcp/types/generated_poc/enums/feed_format.py +13 -0
  95. adcp/types/generated_poc/enums/feedback_source.py +14 -0
  96. adcp/types/generated_poc/enums/format_category.py +17 -0
  97. adcp/types/generated_poc/enums/format_id_parameter.py +12 -0
  98. adcp/types/generated_poc/enums/frequency_cap_scope.py +16 -0
  99. adcp/types/generated_poc/enums/history_entry_type.py +12 -0
  100. adcp/types/generated_poc/enums/http_method.py +12 -0
  101. adcp/types/generated_poc/enums/identifier_types.py +29 -0
  102. adcp/types/generated_poc/enums/javascript_module_type.py +13 -0
  103. adcp/types/generated_poc/enums/landing_page_requirement.py +13 -0
  104. adcp/types/generated_poc/enums/markdown_flavor.py +12 -0
  105. adcp/types/generated_poc/enums/media_buy_status.py +14 -0
  106. adcp/types/generated_poc/enums/metric_type.py +18 -0
  107. adcp/types/generated_poc/enums/notification_type.py +14 -0
  108. adcp/types/generated_poc/enums/pacing.py +13 -0
  109. adcp/types/generated_poc/enums/preview_output_format.py +12 -0
  110. adcp/types/generated_poc/enums/pricing_model.py +17 -0
  111. adcp/types/generated_poc/enums/property_type.py +17 -0
  112. adcp/types/generated_poc/enums/publisher_identifier_types.py +15 -0
  113. adcp/types/generated_poc/enums/reporting_frequency.py +13 -0
  114. adcp/types/generated_poc/enums/signal_catalog_type.py +13 -0
  115. adcp/types/generated_poc/enums/sort_direction.py +12 -0
  116. adcp/types/generated_poc/enums/standard_format_ids.py +45 -0
  117. adcp/types/generated_poc/enums/task_status.py +19 -0
  118. adcp/types/generated_poc/enums/task_type.py +15 -0
  119. adcp/types/generated_poc/enums/update_frequency.py +14 -0
  120. adcp/types/generated_poc/enums/url_asset_type.py +13 -0
  121. adcp/types/generated_poc/enums/validation_mode.py +12 -0
  122. adcp/types/generated_poc/enums/vast_tracking_event.py +26 -0
  123. adcp/types/generated_poc/enums/vast_version.py +15 -0
  124. adcp/types/generated_poc/enums/webhook_response_type.py +14 -0
  125. adcp/types/generated_poc/enums/webhook_security_method.py +13 -0
  126. adcp/types/generated_poc/media_buy/__init__.py +3 -0
  127. adcp/types/generated_poc/media_buy/build_creative_request.py +41 -0
  128. adcp/types/generated_poc/media_buy/build_creative_response.py +51 -0
  129. adcp/types/generated_poc/media_buy/create_media_buy_request.py +94 -0
  130. adcp/types/generated_poc/media_buy/create_media_buy_response.py +56 -0
  131. adcp/types/generated_poc/media_buy/get_media_buy_delivery_request.py +47 -0
  132. adcp/types/generated_poc/media_buy/get_media_buy_delivery_response.py +235 -0
  133. adcp/types/generated_poc/media_buy/get_products_request.py +48 -0
  134. adcp/types/generated_poc/media_buy/get_products_response.py +28 -0
  135. adcp/types/generated_poc/media_buy/list_authorized_properties_request.py +38 -0
  136. adcp/types/generated_poc/media_buy/list_authorized_properties_response.py +84 -0
  137. adcp/types/generated_poc/media_buy/list_creative_formats_request.py +74 -0
  138. adcp/types/generated_poc/media_buy/list_creative_formats_response.py +56 -0
  139. adcp/types/generated_poc/media_buy/list_creatives_request.py +76 -0
  140. adcp/types/generated_poc/media_buy/list_creatives_response.py +214 -0
  141. adcp/types/generated_poc/media_buy/package_request.py +63 -0
  142. adcp/types/generated_poc/media_buy/provide_performance_feedback_request.py +125 -0
  143. adcp/types/generated_poc/media_buy/provide_performance_feedback_response.py +53 -0
  144. adcp/types/generated_poc/media_buy/sync_creatives_request.py +63 -0
  145. adcp/types/generated_poc/media_buy/sync_creatives_response.py +105 -0
  146. adcp/types/generated_poc/media_buy/update_media_buy_request.py +195 -0
  147. adcp/types/generated_poc/media_buy/update_media_buy_response.py +55 -0
  148. adcp/types/generated_poc/pricing_options/__init__.py +3 -0
  149. adcp/types/generated_poc/pricing_options/cpc_option.py +43 -0
  150. adcp/types/generated_poc/pricing_options/cpcv_option.py +45 -0
  151. adcp/types/generated_poc/pricing_options/cpm_auction_option.py +58 -0
  152. adcp/types/generated_poc/pricing_options/cpm_fixed_option.py +43 -0
  153. adcp/types/generated_poc/pricing_options/cpp_option.py +64 -0
  154. adcp/types/generated_poc/pricing_options/cpv_option.py +77 -0
  155. adcp/types/generated_poc/pricing_options/flat_rate_option.py +93 -0
  156. adcp/types/generated_poc/pricing_options/vcpm_auction_option.py +61 -0
  157. adcp/types/generated_poc/pricing_options/vcpm_fixed_option.py +47 -0
  158. adcp/types/generated_poc/protocols/__init__.py +3 -0
  159. adcp/types/generated_poc/protocols/adcp_extension.py +37 -0
  160. adcp/types/generated_poc/signals/__init__.py +3 -0
  161. adcp/types/generated_poc/signals/activate_signal_request.py +32 -0
  162. adcp/types/generated_poc/signals/activate_signal_response.py +51 -0
  163. adcp/types/generated_poc/signals/get_signals_request.py +53 -0
  164. adcp/types/generated_poc/signals/get_signals_response.py +59 -0
  165. adcp/utils/__init__.py +7 -0
  166. adcp/utils/operation_id.py +15 -0
  167. adcp/utils/preview_cache.py +491 -0
  168. adcp/utils/response_parser.py +171 -0
  169. adcp/validation.py +172 -0
  170. adcp-2.12.0.data/data/ADCP_VERSION +1 -0
  171. adcp-2.12.0.dist-info/METADATA +992 -0
  172. adcp-2.12.0.dist-info/RECORD +176 -0
  173. adcp-2.12.0.dist-info/WHEEL +5 -0
  174. adcp-2.12.0.dist-info/entry_points.txt +2 -0
  175. adcp-2.12.0.dist-info/licenses/LICENSE +17 -0
  176. adcp-2.12.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,164 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/product.json
3
+ # timestamp: 2025-11-22T19:54:03+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated, Any
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import AwareDatetime, ConfigDict, Field
11
+
12
+ from ..enums import delivery_type as delivery_type_1
13
+ from ..pricing_options import (
14
+ cpc_option,
15
+ cpcv_option,
16
+ cpm_auction_option,
17
+ cpm_fixed_option,
18
+ cpp_option,
19
+ cpv_option,
20
+ flat_rate_option,
21
+ vcpm_auction_option,
22
+ vcpm_fixed_option,
23
+ )
24
+ from . import creative_policy as creative_policy_1
25
+ from . import ext as ext_1
26
+ from . import format_id as format_id_1
27
+ from . import measurement as measurement_1
28
+ from . import placement, publisher_property_selector
29
+ from . import reporting_capabilities as reporting_capabilities_1
30
+
31
+
32
+ class DeliveryMeasurement(AdCPBaseModel):
33
+ notes: Annotated[
34
+ str | None,
35
+ Field(
36
+ description="Additional details about measurement methodology in plain language (e.g., 'MRC-accredited viewability. 50% in-view for 1s display / 2s video', 'Panel-based demographic measurement updated monthly')"
37
+ ),
38
+ ] = None
39
+ provider: Annotated[
40
+ str,
41
+ Field(
42
+ description="Measurement provider(s) used for this product (e.g., 'Google Ad Manager with IAS viewability', 'Nielsen DAR', 'Geopath for DOOH impressions')"
43
+ ),
44
+ ]
45
+
46
+
47
+ class ProductCard(AdCPBaseModel):
48
+ model_config = ConfigDict(
49
+ extra='forbid',
50
+ )
51
+ format_id: Annotated[
52
+ format_id_1.FormatId,
53
+ Field(
54
+ description='Creative format defining the card layout (typically product_card_standard)'
55
+ ),
56
+ ]
57
+ manifest: Annotated[
58
+ dict[str, Any],
59
+ Field(description='Asset manifest for rendering the card, structure defined by the format'),
60
+ ]
61
+
62
+
63
+ class ProductCardDetailed(AdCPBaseModel):
64
+ model_config = ConfigDict(
65
+ extra='forbid',
66
+ )
67
+ format_id: Annotated[
68
+ format_id_1.FormatId,
69
+ Field(
70
+ description='Creative format defining the detailed card layout (typically product_card_detailed)'
71
+ ),
72
+ ]
73
+ manifest: Annotated[
74
+ dict[str, Any],
75
+ Field(
76
+ description='Asset manifest for rendering the detailed card, structure defined by the format'
77
+ ),
78
+ ]
79
+
80
+
81
+ class Product(AdCPBaseModel):
82
+ model_config = ConfigDict(
83
+ extra='forbid',
84
+ )
85
+ brief_relevance: Annotated[
86
+ str | None,
87
+ Field(
88
+ description='Explanation of why this product matches the brief (only included when brief is provided)'
89
+ ),
90
+ ] = None
91
+ creative_policy: creative_policy_1.CreativePolicy | None = None
92
+ delivery_measurement: Annotated[
93
+ DeliveryMeasurement,
94
+ Field(
95
+ description='Measurement provider and methodology for delivery metrics. The buyer accepts the declared provider as the source of truth for the buy. REQUIRED for all products.'
96
+ ),
97
+ ]
98
+ delivery_type: delivery_type_1.DeliveryType
99
+ description: Annotated[
100
+ str, Field(description='Detailed description of the product and its inventory')
101
+ ]
102
+ estimated_exposures: Annotated[
103
+ int | None,
104
+ Field(description='Estimated exposures/impressions for guaranteed products', ge=0),
105
+ ] = None
106
+ expires_at: Annotated[
107
+ AwareDatetime | None, Field(description='Expiration timestamp for custom products')
108
+ ] = None
109
+ ext: ext_1.ExtensionObject | None = None
110
+ format_ids: Annotated[
111
+ list[format_id_1.FormatId],
112
+ Field(
113
+ description='Array of supported creative format IDs - structured format_id objects with agent_url and id'
114
+ ),
115
+ ]
116
+ is_custom: Annotated[bool | None, Field(description='Whether this is a custom product')] = None
117
+ measurement: measurement_1.Measurement | None = None
118
+ name: Annotated[str, Field(description='Human-readable product name')]
119
+ placements: Annotated[
120
+ list[placement.Placement] | None,
121
+ Field(
122
+ description='Optional array of specific placements within this product. When provided, buyers can target specific placements when assigning creatives.',
123
+ min_length=1,
124
+ ),
125
+ ] = None
126
+ pricing_options: Annotated[
127
+ list[
128
+ cpm_fixed_option.CpmFixedRatePricingOption
129
+ | cpm_auction_option.CpmAuctionPricingOption
130
+ | vcpm_fixed_option.VcpmFixedRatePricingOption
131
+ | vcpm_auction_option.VcpmAuctionPricingOption
132
+ | cpc_option.CpcPricingOption
133
+ | cpcv_option.CpcvPricingOption
134
+ | cpv_option.CpvPricingOption
135
+ | cpp_option.CppPricingOption
136
+ | flat_rate_option.FlatRatePricingOption
137
+ ],
138
+ Field(description='Available pricing models for this product', min_length=1),
139
+ ]
140
+ product_card: Annotated[
141
+ ProductCard | None,
142
+ Field(
143
+ description='Optional standard visual card (300x400px) for displaying this product in user interfaces. Can be rendered via preview_creative or pre-generated.'
144
+ ),
145
+ ] = None
146
+ product_card_detailed: Annotated[
147
+ ProductCardDetailed | None,
148
+ Field(
149
+ description='Optional detailed card with carousel and full specifications. Provides rich product presentation similar to media kit pages.'
150
+ ),
151
+ ] = None
152
+ product_id: Annotated[str, Field(description='Unique identifier for the product')]
153
+ publisher_properties: Annotated[
154
+ list[
155
+ publisher_property_selector.PublisherPropertySelector1
156
+ | publisher_property_selector.PublisherPropertySelector2
157
+ | publisher_property_selector.PublisherPropertySelector3
158
+ ],
159
+ Field(
160
+ 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.",
161
+ min_length=1,
162
+ ),
163
+ ]
164
+ reporting_capabilities: reporting_capabilities_1.ReportingCapabilities | None = None
@@ -0,0 +1,97 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/product_filters.json
3
+ # timestamp: 2025-11-22T19:54:03+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from datetime import date
8
+ from typing import Annotated
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import ConfigDict, Field, RootModel
12
+
13
+ from ..enums import channels as channels_1
14
+ from ..enums import delivery_type as delivery_type_1
15
+ from ..enums import format_category
16
+ from . import format_id
17
+
18
+
19
+ class BudgetRange(AdCPBaseModel):
20
+ model_config = ConfigDict(
21
+ extra='forbid',
22
+ )
23
+ currency: Annotated[
24
+ str,
25
+ Field(
26
+ description="ISO 4217 currency code (e.g., 'USD', 'EUR', 'GBP')", pattern='^[A-Z]{3}$'
27
+ ),
28
+ ]
29
+ max: Annotated[float | None, Field(description='Maximum budget amount', ge=0.0)] = None
30
+ min: Annotated[float, Field(description='Minimum budget amount', ge=0.0)]
31
+
32
+
33
+ class BudgetRange1(AdCPBaseModel):
34
+ model_config = ConfigDict(
35
+ extra='forbid',
36
+ )
37
+ currency: Annotated[
38
+ str,
39
+ Field(
40
+ description="ISO 4217 currency code (e.g., 'USD', 'EUR', 'GBP')", pattern='^[A-Z]{3}$'
41
+ ),
42
+ ]
43
+ max: Annotated[float, Field(description='Maximum budget amount', ge=0.0)]
44
+ min: Annotated[float | None, Field(description='Minimum budget amount', ge=0.0)] = None
45
+
46
+
47
+ class Country(RootModel[str]):
48
+ root: Annotated[str, Field(pattern='^[A-Z]{2}$')]
49
+
50
+
51
+ class ProductFilters(AdCPBaseModel):
52
+ model_config = ConfigDict(
53
+ extra='forbid',
54
+ )
55
+ budget_range: Annotated[
56
+ BudgetRange | BudgetRange1 | None,
57
+ Field(description='Budget range to filter appropriate products'),
58
+ ] = None
59
+ channels: Annotated[
60
+ list[channels_1.AdvertisingChannels] | None,
61
+ Field(description="Filter by advertising channels (e.g., ['display', 'video', 'dooh'])"),
62
+ ] = None
63
+ countries: Annotated[
64
+ list[Country] | None,
65
+ Field(
66
+ description="Filter by target countries using ISO 3166-1 alpha-2 country codes (e.g., ['US', 'CA', 'GB'])"
67
+ ),
68
+ ] = None
69
+ delivery_type: delivery_type_1.DeliveryType | None = None
70
+ end_date: Annotated[
71
+ date | None,
72
+ Field(
73
+ description='Campaign end date (ISO 8601 date format: YYYY-MM-DD) for availability checks'
74
+ ),
75
+ ] = None
76
+ format_ids: Annotated[
77
+ list[format_id.FormatId] | None, Field(description='Filter by specific format IDs')
78
+ ] = None
79
+ format_types: Annotated[
80
+ list[format_category.FormatCategory] | None, Field(description='Filter by format types')
81
+ ] = None
82
+ is_fixed_price: Annotated[
83
+ bool | None, Field(description='Filter for fixed price vs auction products')
84
+ ] = None
85
+ min_exposures: Annotated[
86
+ int | None,
87
+ Field(description='Minimum exposures/impressions needed for measurement validity', ge=1),
88
+ ] = None
89
+ standard_formats_only: Annotated[
90
+ bool | None, Field(description='Only return products accepting IAB standard formats')
91
+ ] = None
92
+ start_date: Annotated[
93
+ date | None,
94
+ Field(
95
+ description='Campaign start date (ISO 8601 date format: YYYY-MM-DD) for availability checks'
96
+ ),
97
+ ] = None
@@ -0,0 +1,102 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/promoted_offerings.json
3
+ # timestamp: 2025-11-22T15:23:24+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Annotated, Any
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import AnyUrl, ConfigDict, Field
12
+
13
+ from . import brand_manifest as brand_manifest_1
14
+ from . import promoted_products
15
+
16
+
17
+ class AssetType(Enum):
18
+ image = 'image'
19
+ video = 'video'
20
+ audio = 'audio'
21
+ vast = 'vast'
22
+ daast = 'daast'
23
+ text = 'text'
24
+ url = 'url'
25
+ html = 'html'
26
+ css = 'css'
27
+ javascript = 'javascript'
28
+ webhook = 'webhook'
29
+
30
+
31
+ class AssetSelectors(AdCPBaseModel):
32
+ model_config = ConfigDict(
33
+ extra='forbid',
34
+ )
35
+ asset_types: Annotated[
36
+ list[AssetType] | None, Field(description="Filter by asset type (e.g., ['image', 'video'])")
37
+ ] = None
38
+ exclude_tags: Annotated[
39
+ list[str] | None, Field(description='Exclude assets with these tags')
40
+ ] = None
41
+ tags: Annotated[
42
+ list[str] | None,
43
+ Field(description="Select assets with specific tags (e.g., ['holiday', 'premium'])"),
44
+ ] = None
45
+
46
+
47
+ class Offering(AdCPBaseModel):
48
+ model_config = ConfigDict(
49
+ extra='forbid',
50
+ )
51
+ assets: Annotated[
52
+ list[dict[str, Any]] | None, Field(description='Assets specific to this offering')
53
+ ] = None
54
+ description: Annotated[str | None, Field(description="Description of what's being offered")] = (
55
+ None
56
+ )
57
+ name: Annotated[
58
+ str, Field(description="Offering name (e.g., 'Winter Sale', 'New Product Launch')")
59
+ ]
60
+
61
+
62
+ class PromotedOfferings(AdCPBaseModel):
63
+ model_config = ConfigDict(
64
+ extra='forbid',
65
+ )
66
+ asset_selectors: Annotated[
67
+ AssetSelectors | None,
68
+ Field(description='Selectors to choose specific assets from the brand manifest'),
69
+ ] = None
70
+ brand_manifest: Annotated[
71
+ brand_manifest_1.BrandManifest | AnyUrl,
72
+ Field(
73
+ description='Brand information manifest containing assets, themes, and guidelines. Can be provided inline or as a URL reference to a hosted manifest.',
74
+ examples=[
75
+ {
76
+ 'data': {
77
+ 'colors': {'primary': '#FF6B35'},
78
+ 'name': 'ACME Corporation',
79
+ 'url': 'https://acmecorp.com',
80
+ },
81
+ 'description': 'Inline brand manifest',
82
+ },
83
+ {
84
+ 'data': 'https://cdn.acmecorp.com/brand-manifest.json',
85
+ 'description': 'URL string reference to hosted manifest',
86
+ },
87
+ ],
88
+ title='Brand Manifest Reference',
89
+ ),
90
+ ]
91
+ offerings: Annotated[
92
+ list[Offering] | None,
93
+ Field(
94
+ description='Inline offerings for campaigns without a product catalog. Each offering has a name, description, and associated assets.'
95
+ ),
96
+ ] = None
97
+ product_selectors: Annotated[
98
+ promoted_products.PromotedProducts | None,
99
+ Field(
100
+ description='Selectors to choose which products/offerings from the brand manifest product catalog to promote'
101
+ ),
102
+ ] = None
@@ -0,0 +1,38 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/promoted_products.json
3
+ # timestamp: 2025-11-22T15:23:24+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import ConfigDict, Field
11
+
12
+
13
+ class PromotedProducts(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra='forbid',
16
+ )
17
+ manifest_category: Annotated[
18
+ str | None,
19
+ Field(
20
+ description="Select products from a specific category in the brand manifest product catalog (e.g., 'beverages/soft-drinks', 'food/sauces')"
21
+ ),
22
+ ] = None
23
+ manifest_query: Annotated[
24
+ str | None,
25
+ Field(
26
+ description="Natural language query to select products from the brand manifest (e.g., 'all Kraft Heinz pasta sauces', 'organic products under $20')"
27
+ ),
28
+ ] = None
29
+ manifest_skus: Annotated[
30
+ list[str] | None,
31
+ Field(description='Direct product SKU references from the brand manifest product catalog'),
32
+ ] = None
33
+ manifest_tags: Annotated[
34
+ list[str] | None,
35
+ Field(
36
+ description="Select products by tags from the brand manifest product catalog (e.g., 'organic', 'sauces', 'holiday')"
37
+ ),
38
+ ] = None
@@ -0,0 +1,64 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/property.json
3
+ # timestamp: 2025-11-22T15:23:24+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import ConfigDict, Field
11
+
12
+ from ..enums import identifier_types
13
+ from ..enums import property_type as property_type_1
14
+ from . import property_tag
15
+
16
+
17
+ class Identifier(AdCPBaseModel):
18
+ model_config = ConfigDict(
19
+ extra='forbid',
20
+ )
21
+ type: Annotated[
22
+ identifier_types.PropertyIdentifierTypes,
23
+ Field(description='Type of identifier for this property'),
24
+ ]
25
+ value: Annotated[
26
+ str,
27
+ Field(
28
+ description="The identifier value. For domain type: 'example.com' matches base domain plus www and m subdomains; 'edition.example.com' matches that specific subdomain; '*.example.com' matches ALL subdomains but NOT base domain"
29
+ ),
30
+ ]
31
+
32
+
33
+ class Property(AdCPBaseModel):
34
+ model_config = ConfigDict(
35
+ extra='forbid',
36
+ )
37
+ identifiers: Annotated[
38
+ list[Identifier], Field(description='Array of identifiers for this property', min_length=1)
39
+ ]
40
+ name: Annotated[str, Field(description='Human-readable property name')]
41
+ property_id: Annotated[
42
+ str | None,
43
+ Field(
44
+ description='Unique identifier for this property (optional). Enables referencing properties by ID instead of repeating full objects.',
45
+ examples=['cnn_ctv_app', 'homepage', 'mobile_ios', 'instagram'],
46
+ pattern='^[a-z0-9_]+$',
47
+ title='Property ID',
48
+ ),
49
+ ] = None
50
+ property_type: Annotated[
51
+ property_type_1.PropertyType, Field(description='Type of advertising property')
52
+ ]
53
+ publisher_domain: Annotated[
54
+ str | None,
55
+ Field(
56
+ description='Domain where adagents.json should be checked for authorization validation. Required for list_authorized_properties response. Optional in adagents.json (file location implies domain).'
57
+ ),
58
+ ] = None
59
+ tags: Annotated[
60
+ list[property_tag.PropertyTag] | None,
61
+ Field(
62
+ description='Tags for categorization and grouping (e.g., network membership, content categories)'
63
+ ),
64
+ ] = None
@@ -0,0 +1,21 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/property_id.json
3
+ # timestamp: 2025-11-22T15:23:24+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated
8
+
9
+ from pydantic import Field, RootModel
10
+
11
+
12
+ class PropertyId(RootModel[str]):
13
+ root: Annotated[
14
+ str,
15
+ Field(
16
+ description='Identifier for a publisher property. Must be lowercase alphanumeric with underscores only.',
17
+ examples=['cnn_ctv_app', 'homepage', 'mobile_ios', 'instagram'],
18
+ pattern='^[a-z0-9_]+$',
19
+ title='Property ID',
20
+ ),
21
+ ]
@@ -0,0 +1,21 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/property_tag.json
3
+ # timestamp: 2025-11-22T15:23:24+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated
8
+
9
+ from pydantic import Field, RootModel
10
+
11
+
12
+ class PropertyTag(RootModel[str]):
13
+ root: Annotated[
14
+ str,
15
+ Field(
16
+ description='Tag for categorizing publisher properties. Must be lowercase alphanumeric with underscores only.',
17
+ examples=['ctv', 'premium', 'news', 'sports', 'meta_network', 'social_media'],
18
+ pattern='^[a-z0-9_]+$',
19
+ title='Property Tag',
20
+ ),
21
+ ]
@@ -0,0 +1,61 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/protocol_envelope.json
3
+ # timestamp: 2025-11-22T15:23:24+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated, Any
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import AwareDatetime, ConfigDict, Field
11
+
12
+ from ..enums import task_status
13
+ from . import push_notification_config as push_notification_config_1
14
+
15
+
16
+ class ProtocolEnvelope(AdCPBaseModel):
17
+ model_config = ConfigDict(
18
+ extra='forbid',
19
+ )
20
+ context_id: Annotated[
21
+ str | None,
22
+ Field(
23
+ description='Session/conversation identifier for tracking related operations across multiple task invocations. Managed by the protocol layer to maintain conversational context.'
24
+ ),
25
+ ] = None
26
+ message: Annotated[
27
+ str | None,
28
+ Field(
29
+ description='Human-readable summary of the task result. Provides natural language explanation of what happened, suitable for display to end users or for AI agent comprehension. Generated by the protocol layer based on the task response.'
30
+ ),
31
+ ] = None
32
+ payload: Annotated[
33
+ dict[str, Any],
34
+ Field(
35
+ description='The actual task-specific response data. This is the content defined in individual task response schemas (e.g., get-products-response.json, create-media-buy-response.json). Contains only domain-specific data without protocol-level fields.'
36
+ ),
37
+ ]
38
+ push_notification_config: Annotated[
39
+ push_notification_config_1.PushNotificationConfig | None,
40
+ Field(
41
+ description='Push notification configuration for async task updates (A2A and REST protocols). Echoed from the request to confirm webhook settings. Specifies URL, authentication scheme (Bearer or HMAC-SHA256), and credentials. MCP uses progress notifications instead of webhooks.'
42
+ ),
43
+ ] = None
44
+ status: Annotated[
45
+ task_status.TaskStatus,
46
+ Field(
47
+ description='Current task execution state. Indicates whether the task is completed, in progress (working), submitted for async processing, failed, or requires user input. Managed by the protocol layer.'
48
+ ),
49
+ ]
50
+ task_id: Annotated[
51
+ str | None,
52
+ Field(
53
+ description='Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete.'
54
+ ),
55
+ ] = None
56
+ timestamp: Annotated[
57
+ AwareDatetime | None,
58
+ Field(
59
+ description='ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress.'
60
+ ),
61
+ ] = None
@@ -0,0 +1,75 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: core/publisher_property_selector.json
3
+ # timestamp: 2025-11-22T15:23:24+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated, Literal
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import ConfigDict, Field
11
+
12
+ from . import property_id, property_tag
13
+
14
+
15
+ class PublisherPropertySelector1(AdCPBaseModel):
16
+ model_config = ConfigDict(
17
+ extra='forbid',
18
+ )
19
+ publisher_domain: Annotated[
20
+ str,
21
+ Field(
22
+ description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
23
+ pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
24
+ ),
25
+ ]
26
+ selection_type: Annotated[
27
+ Literal['all'],
28
+ Field(
29
+ description='Discriminator indicating all properties from this publisher are included'
30
+ ),
31
+ ]
32
+
33
+
34
+ class PublisherPropertySelector2(AdCPBaseModel):
35
+ model_config = ConfigDict(
36
+ extra='forbid',
37
+ )
38
+ property_ids: Annotated[
39
+ list[property_id.PropertyId],
40
+ Field(description="Specific property IDs from the publisher's adagents.json", min_length=1),
41
+ ]
42
+ publisher_domain: Annotated[
43
+ str,
44
+ Field(
45
+ description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
46
+ pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
47
+ ),
48
+ ]
49
+ selection_type: Annotated[
50
+ Literal['by_id'],
51
+ Field(description='Discriminator indicating selection by specific property IDs'),
52
+ ]
53
+
54
+
55
+ class PublisherPropertySelector3(AdCPBaseModel):
56
+ model_config = ConfigDict(
57
+ extra='forbid',
58
+ )
59
+ property_tags: Annotated[
60
+ list[property_tag.PropertyTag],
61
+ Field(
62
+ description="Property tags from the publisher's adagents.json. Selector covers all properties with these tags",
63
+ min_length=1,
64
+ ),
65
+ ]
66
+ publisher_domain: Annotated[
67
+ str,
68
+ Field(
69
+ description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
70
+ pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
71
+ ),
72
+ ]
73
+ selection_type: Annotated[
74
+ Literal['by_tag'], Field(description='Discriminator indicating selection by property tags')
75
+ ]