adcp 1.6.1__py3-none-any.whl → 2.1.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 (118) hide show
  1. adcp/__init__.py +110 -189
  2. adcp/adagents.py +11 -12
  3. adcp/client.py +16 -11
  4. adcp/py.typed +0 -0
  5. adcp/types/aliases.py +209 -0
  6. adcp/types/generated.py +540 -1134
  7. adcp/types/generated_poc/__init__.py +3 -0
  8. adcp/types/generated_poc/activate_signal_request.py +34 -0
  9. adcp/types/generated_poc/activate_signal_response.py +57 -0
  10. adcp/types/generated_poc/activation_key.py +30 -0
  11. adcp/types/generated_poc/adagents.py +266 -0
  12. adcp/types/generated_poc/asset_type.py +100 -0
  13. adcp/types/generated_poc/audio_asset.py +26 -0
  14. adcp/types/generated_poc/brand_manifest.py +260 -0
  15. adcp/types/generated_poc/brand_manifest_ref.py +361 -0
  16. adcp/types/generated_poc/build_creative_request.py +43 -0
  17. adcp/types/generated_poc/build_creative_response.py +57 -0
  18. adcp/types/generated_poc/channels.py +19 -0
  19. adcp/types/generated_poc/cpc_option.py +39 -0
  20. adcp/types/generated_poc/cpcv_option.py +41 -0
  21. adcp/types/generated_poc/cpm_auction_option.py +54 -0
  22. adcp/types/generated_poc/cpm_fixed_option.py +39 -0
  23. adcp/types/generated_poc/cpp_option.py +60 -0
  24. adcp/types/generated_poc/cpv_option.py +73 -0
  25. adcp/types/generated_poc/create_media_buy_request.py +96 -0
  26. adcp/types/generated_poc/create_media_buy_response.py +66 -0
  27. adcp/types/generated_poc/creative_asset.py +83 -0
  28. adcp/types/generated_poc/creative_assignment.py +27 -0
  29. adcp/types/generated_poc/creative_manifest.py +61 -0
  30. adcp/types/generated_poc/creative_policy.py +34 -0
  31. adcp/types/generated_poc/creative_status.py +14 -0
  32. adcp/types/generated_poc/css_asset.py +20 -0
  33. adcp/types/generated_poc/daast_asset.py +76 -0
  34. adcp/types/generated_poc/delivery_metrics.py +111 -0
  35. adcp/types/generated_poc/delivery_type.py +12 -0
  36. adcp/types/generated_poc/deployment.py +78 -0
  37. adcp/types/generated_poc/destination.py +43 -0
  38. adcp/types/generated_poc/error.py +29 -0
  39. adcp/types/generated_poc/flat_rate_option.py +93 -0
  40. adcp/types/generated_poc/format.py +260 -0
  41. adcp/types/generated_poc/format_id.py +29 -0
  42. adcp/types/generated_poc/frequency_cap.py +19 -0
  43. adcp/types/generated_poc/frequency_cap_scope.py +16 -0
  44. adcp/types/generated_poc/get_media_buy_delivery_request.py +65 -0
  45. adcp/types/generated_poc/get_media_buy_delivery_response.py +220 -0
  46. adcp/types/generated_poc/get_products_request.py +83 -0
  47. adcp/types/generated_poc/get_products_response.py +29 -0
  48. adcp/types/generated_poc/get_signals_request.py +77 -0
  49. adcp/types/generated_poc/get_signals_response.py +65 -0
  50. adcp/types/generated_poc/html_asset.py +18 -0
  51. adcp/types/generated_poc/identifier_types.py +29 -0
  52. adcp/types/generated_poc/image_asset.py +23 -0
  53. adcp/types/generated_poc/index.py +17 -0
  54. adcp/types/generated_poc/javascript_asset.py +25 -0
  55. adcp/types/generated_poc/list_authorized_properties_request.py +39 -0
  56. adcp/types/generated_poc/list_authorized_properties_response.py +85 -0
  57. adcp/types/generated_poc/list_creative_formats_request.py +93 -0
  58. adcp/types/generated_poc/list_creative_formats_response.py +63 -0
  59. adcp/types/generated_poc/list_creatives_request.py +154 -0
  60. adcp/types/generated_poc/list_creatives_response.py +234 -0
  61. adcp/types/generated_poc/markdown_asset.py +43 -0
  62. adcp/types/generated_poc/measurement.py +40 -0
  63. adcp/types/generated_poc/media_buy.py +37 -0
  64. adcp/types/generated_poc/media_buy_status.py +14 -0
  65. adcp/types/generated_poc/pacing.py +13 -0
  66. adcp/types/generated_poc/package.py +61 -0
  67. adcp/types/generated_poc/package_request.py +61 -0
  68. adcp/types/generated_poc/package_status.py +14 -0
  69. adcp/types/generated_poc/performance_feedback.py +89 -0
  70. adcp/types/generated_poc/placement.py +37 -0
  71. adcp/types/generated_poc/preview_creative_request.py +163 -0
  72. adcp/types/generated_poc/preview_creative_response.py +175 -0
  73. adcp/types/generated_poc/preview_render.py +144 -0
  74. adcp/types/generated_poc/pricing_model.py +17 -0
  75. adcp/types/generated_poc/pricing_option.py +365 -0
  76. adcp/types/generated_poc/product.py +211 -0
  77. adcp/types/generated_poc/promoted_offerings.py +102 -0
  78. adcp/types/generated_poc/promoted_products.py +38 -0
  79. adcp/types/generated_poc/property.py +79 -0
  80. adcp/types/generated_poc/protocol_envelope.py +61 -0
  81. adcp/types/generated_poc/provide_performance_feedback_request.py +85 -0
  82. adcp/types/generated_poc/provide_performance_feedback_response.py +59 -0
  83. adcp/types/generated_poc/publisher_identifier_types.py +15 -0
  84. adcp/types/generated_poc/push_notification_config.py +55 -0
  85. adcp/types/generated_poc/reporting_capabilities.py +68 -0
  86. adcp/types/generated_poc/response.py +24 -0
  87. adcp/types/generated_poc/standard_format_ids.py +45 -0
  88. adcp/types/generated_poc/start_timing.py +13 -0
  89. adcp/types/generated_poc/sub_asset.py +55 -0
  90. adcp/types/generated_poc/sync_creatives_request.py +69 -0
  91. adcp/types/generated_poc/sync_creatives_response.py +117 -0
  92. adcp/types/generated_poc/targeting.py +53 -0
  93. adcp/types/generated_poc/task_status.py +19 -0
  94. adcp/types/generated_poc/task_type.py +15 -0
  95. adcp/types/generated_poc/tasks_get_request.py +29 -0
  96. adcp/types/generated_poc/tasks_get_response.py +112 -0
  97. adcp/types/generated_poc/tasks_list_request.py +121 -0
  98. adcp/types/generated_poc/tasks_list_response.py +122 -0
  99. adcp/types/generated_poc/text_asset.py +20 -0
  100. adcp/types/generated_poc/update_media_buy_request.py +160 -0
  101. adcp/types/generated_poc/update_media_buy_response.py +67 -0
  102. adcp/types/generated_poc/url_asset.py +33 -0
  103. adcp/types/generated_poc/vast_asset.py +86 -0
  104. adcp/types/generated_poc/vcpm_auction_option.py +57 -0
  105. adcp/types/generated_poc/vcpm_fixed_option.py +43 -0
  106. adcp/types/generated_poc/video_asset.py +28 -0
  107. adcp/types/generated_poc/webhook_asset.py +65 -0
  108. adcp/types/generated_poc/webhook_payload.py +102 -0
  109. adcp/utils/preview_cache.py +54 -41
  110. adcp/validation.py +172 -0
  111. {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/METADATA +42 -3
  112. adcp-2.1.0.dist-info/RECORD +132 -0
  113. adcp/types/tasks.py +0 -511
  114. adcp-1.6.1.dist-info/RECORD +0 -28
  115. {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/WHEEL +0 -0
  116. {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/entry_points.txt +0 -0
  117. {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/licenses/LICENSE +0 -0
  118. {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,260 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: brand-manifest.json
3
+ # timestamp: 2025-11-15T22:03:55+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, AwareDatetime, ConfigDict, EmailStr, Field
12
+
13
+
14
+ class AssetType(Enum):
15
+ image = "image"
16
+ video = "video"
17
+ audio = "audio"
18
+ text = "text"
19
+
20
+
21
+ class Asset(AdCPBaseModel):
22
+ model_config = ConfigDict(
23
+ extra="forbid",
24
+ )
25
+ asset_id: Annotated[str, Field(description="Unique identifier for this asset")]
26
+ asset_type: Annotated[AssetType, Field(description="Type of asset")]
27
+ description: Annotated[str | None, Field(description="Asset description or usage notes")] = None
28
+ duration_seconds: Annotated[
29
+ float | None, Field(description="Video/audio duration in seconds")
30
+ ] = None
31
+ file_size_bytes: Annotated[int | None, Field(description="File size in bytes")] = None
32
+ format: Annotated[str | None, Field(description="File format (e.g., 'jpg', 'mp4', 'mp3')")] = (
33
+ None
34
+ )
35
+ height: Annotated[int | None, Field(description="Image/video height in pixels")] = None
36
+ metadata: Annotated[
37
+ dict[str, Any] | None, Field(description="Additional asset-specific metadata")
38
+ ] = None
39
+ name: Annotated[str | None, Field(description="Human-readable asset name")] = None
40
+ tags: Annotated[
41
+ list[str] | None,
42
+ Field(
43
+ description="Tags for asset discovery (e.g., 'holiday', 'lifestyle', 'product_shot')"
44
+ ),
45
+ ] = None
46
+ url: Annotated[AnyUrl, Field(description="URL to CDN-hosted asset file")]
47
+ width: Annotated[int | None, Field(description="Image/video width in pixels")] = None
48
+
49
+
50
+ class Colors(AdCPBaseModel):
51
+ accent: Annotated[
52
+ str | None, Field(description="Accent color (hex format)", pattern="^#[0-9A-Fa-f]{6}$")
53
+ ] = None
54
+ background: Annotated[
55
+ str | None, Field(description="Background color (hex format)", pattern="^#[0-9A-Fa-f]{6}$")
56
+ ] = None
57
+ primary: Annotated[
58
+ str | None,
59
+ Field(description="Primary brand color (hex format)", pattern="^#[0-9A-Fa-f]{6}$"),
60
+ ] = None
61
+ secondary: Annotated[
62
+ str | None,
63
+ Field(description="Secondary brand color (hex format)", pattern="^#[0-9A-Fa-f]{6}$"),
64
+ ] = None
65
+ text: Annotated[
66
+ str | None, Field(description="Text color (hex format)", pattern="^#[0-9A-Fa-f]{6}$")
67
+ ] = None
68
+
69
+
70
+ class Contact(AdCPBaseModel):
71
+ email: Annotated[EmailStr | None, Field(description="Contact email")] = None
72
+ phone: Annotated[str | None, Field(description="Contact phone number")] = None
73
+
74
+
75
+ class Disclaimer(AdCPBaseModel):
76
+ context: Annotated[
77
+ str | None,
78
+ Field(
79
+ description="When this disclaimer applies (e.g., 'financial_products', 'health_claims', 'all')"
80
+ ),
81
+ ] = None
82
+ required: Annotated[bool | None, Field(description="Whether this disclaimer must appear")] = (
83
+ True
84
+ )
85
+ text: Annotated[str, Field(description="Disclaimer text")]
86
+
87
+
88
+ class Fonts(AdCPBaseModel):
89
+ font_urls: Annotated[
90
+ list[AnyUrl] | None, Field(description="URLs to web font files if using custom fonts")
91
+ ] = None
92
+ primary: Annotated[str | None, Field(description="Primary font family name")] = None
93
+ secondary: Annotated[str | None, Field(description="Secondary font family name")] = None
94
+
95
+
96
+ class Logo(AdCPBaseModel):
97
+ height: Annotated[int | None, Field(description="Logo height in pixels")] = None
98
+ tags: Annotated[
99
+ list[str] | None,
100
+ Field(
101
+ description="Semantic tags describing the logo variant (e.g., 'dark', 'light', 'square', 'horizontal', 'icon')"
102
+ ),
103
+ ] = None
104
+ url: Annotated[AnyUrl, Field(description="URL to the logo asset")]
105
+ width: Annotated[int | None, Field(description="Logo width in pixels")] = None
106
+
107
+
108
+ class Metadata(AdCPBaseModel):
109
+ created_date: Annotated[
110
+ AwareDatetime | None, Field(description="When this brand manifest was created")
111
+ ] = None
112
+ updated_date: Annotated[
113
+ AwareDatetime | None, Field(description="When this brand manifest was last updated")
114
+ ] = None
115
+ version: Annotated[str | None, Field(description="Brand card version number")] = None
116
+
117
+
118
+ class FeedFormat(Enum):
119
+ google_merchant_center = "google_merchant_center"
120
+ facebook_catalog = "facebook_catalog"
121
+ custom = "custom"
122
+
123
+
124
+ class UpdateFrequency(Enum):
125
+ realtime = "realtime"
126
+ hourly = "hourly"
127
+ daily = "daily"
128
+ weekly = "weekly"
129
+
130
+
131
+ class ProductCatalog(AdCPBaseModel):
132
+ model_config = ConfigDict(
133
+ extra="forbid",
134
+ )
135
+ categories: Annotated[
136
+ list[str] | None,
137
+ Field(description="Product categories available in the catalog (for filtering)"),
138
+ ] = None
139
+ feed_format: Annotated[FeedFormat | None, Field(description="Format of the product feed")] = (
140
+ FeedFormat.google_merchant_center
141
+ )
142
+ feed_url: Annotated[AnyUrl, Field(description="URL to product catalog feed")]
143
+ last_updated: Annotated[
144
+ AwareDatetime | None, Field(description="When the product catalog was last updated")
145
+ ] = None
146
+ update_frequency: Annotated[
147
+ UpdateFrequency | None, Field(description="How frequently the product catalog is updated")
148
+ ] = None
149
+
150
+
151
+ class BrandManifest1(AdCPBaseModel):
152
+ model_config = ConfigDict(
153
+ extra="forbid",
154
+ )
155
+ assets: Annotated[
156
+ list[Asset] | None,
157
+ Field(
158
+ description="Brand asset library with explicit assets and tags. Assets are referenced inline with URLs pointing to CDN-hosted files."
159
+ ),
160
+ ] = None
161
+ colors: Annotated[Colors | None, Field(description="Brand color palette")] = None
162
+ contact: Annotated[Contact | None, Field(description="Brand contact information")] = None
163
+ disclaimers: Annotated[
164
+ list[Disclaimer] | None,
165
+ Field(description="Legal disclaimers or required text that must appear in creatives"),
166
+ ] = None
167
+ fonts: Annotated[Fonts | None, Field(description="Brand typography guidelines")] = None
168
+ industry: Annotated[
169
+ str | None,
170
+ Field(
171
+ description="Industry or vertical (e.g., 'retail', 'automotive', 'finance', 'healthcare')"
172
+ ),
173
+ ] = None
174
+ logos: Annotated[
175
+ list[Logo] | None,
176
+ Field(description="Brand logo assets with semantic tags for different use cases"),
177
+ ] = None
178
+ metadata: Annotated[Metadata | None, Field(description="Additional brand metadata")] = None
179
+ name: Annotated[str | None, Field(description="Brand or business name")] = None
180
+ product_catalog: Annotated[
181
+ ProductCatalog | None,
182
+ Field(
183
+ description="Product catalog information for e-commerce advertisers. Enables SKU-level creative generation and product selection."
184
+ ),
185
+ ] = None
186
+ tagline: Annotated[str | None, Field(description="Brand tagline or slogan")] = None
187
+ target_audience: Annotated[
188
+ str | None, Field(description="Primary target audience description")
189
+ ] = None
190
+ tone: Annotated[
191
+ str | None,
192
+ Field(
193
+ description="Brand voice and messaging tone (e.g., 'professional', 'casual', 'humorous', 'trustworthy', 'innovative')"
194
+ ),
195
+ ] = None
196
+ url: Annotated[
197
+ AnyUrl,
198
+ Field(
199
+ description="Primary brand URL for context and asset discovery. Creative agents can infer brand information from this URL."
200
+ ),
201
+ ]
202
+
203
+
204
+ Asset1 = Asset
205
+
206
+
207
+ ProductCatalog1 = ProductCatalog
208
+
209
+
210
+ class BrandManifest2(AdCPBaseModel):
211
+ model_config = ConfigDict(
212
+ extra="forbid",
213
+ )
214
+ assets: Annotated[
215
+ list[Asset1] | None,
216
+ Field(
217
+ description="Brand asset library with explicit assets and tags. Assets are referenced inline with URLs pointing to CDN-hosted files."
218
+ ),
219
+ ] = None
220
+ colors: Annotated[Colors | None, Field(description="Brand color palette")] = None
221
+ contact: Annotated[Contact | None, Field(description="Brand contact information")] = None
222
+ disclaimers: Annotated[
223
+ list[Disclaimer] | None,
224
+ Field(description="Legal disclaimers or required text that must appear in creatives"),
225
+ ] = None
226
+ fonts: Annotated[Fonts | None, Field(description="Brand typography guidelines")] = None
227
+ industry: Annotated[
228
+ str | None,
229
+ Field(
230
+ description="Industry or vertical (e.g., 'retail', 'automotive', 'finance', 'healthcare')"
231
+ ),
232
+ ] = None
233
+ logos: Annotated[
234
+ list[Logo] | None,
235
+ Field(description="Brand logo assets with semantic tags for different use cases"),
236
+ ] = None
237
+ metadata: Annotated[Metadata | None, Field(description="Additional brand metadata")] = None
238
+ name: Annotated[str, Field(description="Brand or business name")]
239
+ product_catalog: Annotated[
240
+ ProductCatalog1 | None,
241
+ Field(
242
+ description="Product catalog information for e-commerce advertisers. Enables SKU-level creative generation and product selection."
243
+ ),
244
+ ] = None
245
+ tagline: Annotated[str | None, Field(description="Brand tagline or slogan")] = None
246
+ target_audience: Annotated[
247
+ str | None, Field(description="Primary target audience description")
248
+ ] = None
249
+ tone: Annotated[
250
+ str | None,
251
+ Field(
252
+ description="Brand voice and messaging tone (e.g., 'professional', 'casual', 'humorous', 'trustworthy', 'innovative')"
253
+ ),
254
+ ] = None
255
+ url: Annotated[
256
+ AnyUrl | None,
257
+ Field(
258
+ description="Primary brand URL for context and asset discovery. Creative agents can infer brand information from this URL."
259
+ ),
260
+ ] = None
@@ -0,0 +1,361 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: brand-manifest-ref.json
3
+ # timestamp: 2025-11-15T17:39:52+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Any
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import AnyUrl, AwareDatetime, ConfigDict, EmailStr, Field, RootModel
12
+
13
+
14
+ class Logo(AdCPBaseModel):
15
+ url: AnyUrl = Field(..., description="URL to the logo asset")
16
+ tags: list[str] | None = Field(
17
+ None,
18
+ description="Semantic tags describing the logo variant (e.g., 'dark', 'light', 'square', 'horizontal', 'icon')",
19
+ )
20
+ width: int | None = Field(None, description="Logo width in pixels")
21
+ height: int | None = Field(None, description="Logo height in pixels")
22
+
23
+
24
+ class Colors(AdCPBaseModel):
25
+ primary: str | None = Field(
26
+ None, description="Primary brand color (hex format)", pattern="^#[0-9A-Fa-f]{6}$"
27
+ )
28
+ secondary: str | None = Field(
29
+ None, description="Secondary brand color (hex format)", pattern="^#[0-9A-Fa-f]{6}$"
30
+ )
31
+ accent: str | None = Field(
32
+ None, description="Accent color (hex format)", pattern="^#[0-9A-Fa-f]{6}$"
33
+ )
34
+ background: str | None = Field(
35
+ None, description="Background color (hex format)", pattern="^#[0-9A-Fa-f]{6}$"
36
+ )
37
+ text: str | None = Field(
38
+ None, description="Text color (hex format)", pattern="^#[0-9A-Fa-f]{6}$"
39
+ )
40
+
41
+
42
+ class Fonts(AdCPBaseModel):
43
+ primary: str | None = Field(None, description="Primary font family name")
44
+ secondary: str | None = Field(None, description="Secondary font family name")
45
+ font_urls: list[AnyUrl] | None = Field(
46
+ None, description="URLs to web font files if using custom fonts"
47
+ )
48
+
49
+
50
+ class AssetType(Enum):
51
+ image = "image"
52
+ video = "video"
53
+ audio = "audio"
54
+ text = "text"
55
+
56
+
57
+ class Asset(AdCPBaseModel):
58
+ model_config = ConfigDict(
59
+ extra="forbid",
60
+ )
61
+ asset_id: str = Field(..., description="Unique identifier for this asset")
62
+ asset_type: AssetType = Field(..., description="Type of asset")
63
+ url: AnyUrl = Field(..., description="URL to CDN-hosted asset file")
64
+ tags: list[str] | None = Field(
65
+ None, description="Tags for asset discovery (e.g., 'holiday', 'lifestyle', 'product_shot')"
66
+ )
67
+ name: str | None = Field(None, description="Human-readable asset name")
68
+ description: str | None = Field(None, description="Asset description or usage notes")
69
+ width: int | None = Field(None, description="Image/video width in pixels")
70
+ height: int | None = Field(None, description="Image/video height in pixels")
71
+ duration_seconds: float | None = Field(None, description="Video/audio duration in seconds")
72
+ file_size_bytes: int | None = Field(None, description="File size in bytes")
73
+ format: str | None = Field(None, description="File format (e.g., 'jpg', 'mp4', 'mp3')")
74
+ metadata: dict[str, Any] | None = Field(None, description="Additional asset-specific metadata")
75
+
76
+
77
+ class FeedFormat(Enum):
78
+ google_merchant_center = "google_merchant_center"
79
+ facebook_catalog = "facebook_catalog"
80
+ custom = "custom"
81
+
82
+
83
+ class UpdateFrequency(Enum):
84
+ realtime = "realtime"
85
+ hourly = "hourly"
86
+ daily = "daily"
87
+ weekly = "weekly"
88
+
89
+
90
+ class ProductCatalog(AdCPBaseModel):
91
+ model_config = ConfigDict(
92
+ extra="forbid",
93
+ )
94
+ feed_url: AnyUrl = Field(..., description="URL to product catalog feed")
95
+ feed_format: FeedFormat | None = Field(
96
+ FeedFormat.google_merchant_center, description="Format of the product feed"
97
+ )
98
+ categories: list[str] | None = Field(
99
+ None, description="Product categories available in the catalog (for filtering)"
100
+ )
101
+ last_updated: AwareDatetime | None = Field(
102
+ None, description="When the product catalog was last updated"
103
+ )
104
+ update_frequency: UpdateFrequency | None = Field(
105
+ None, description="How frequently the product catalog is updated"
106
+ )
107
+
108
+
109
+ class Disclaimer(AdCPBaseModel):
110
+ text: str = Field(..., description="Disclaimer text")
111
+ context: str | None = Field(
112
+ None,
113
+ description="When this disclaimer applies (e.g., 'financial_products', 'health_claims', 'all')",
114
+ )
115
+ required: bool | None = Field(True, description="Whether this disclaimer must appear")
116
+
117
+
118
+ class Contact(AdCPBaseModel):
119
+ email: EmailStr | None = Field(None, description="Contact email")
120
+ phone: str | None = Field(None, description="Contact phone number")
121
+
122
+
123
+ class Metadata(AdCPBaseModel):
124
+ created_date: AwareDatetime | None = Field(
125
+ None, description="When this brand manifest was created"
126
+ )
127
+ updated_date: AwareDatetime | None = Field(
128
+ None, description="When this brand manifest was last updated"
129
+ )
130
+ version: str | None = Field(None, description="Brand card version number")
131
+
132
+
133
+ class BrandManifest1(AdCPBaseModel):
134
+ model_config = ConfigDict(
135
+ extra="forbid",
136
+ )
137
+ url: AnyUrl = Field(
138
+ ...,
139
+ description="Primary brand URL for context and asset discovery. Creative agents can infer brand information from this URL.",
140
+ )
141
+ name: str | None = Field(None, description="Brand or business name")
142
+ logos: list[Logo] | None = Field(
143
+ None, description="Brand logo assets with semantic tags for different use cases"
144
+ )
145
+ colors: Colors | None = Field(None, description="Brand color palette")
146
+ fonts: Fonts | None = Field(None, description="Brand typography guidelines")
147
+ tone: str | None = Field(
148
+ None,
149
+ description="Brand voice and messaging tone (e.g., 'professional', 'casual', 'humorous', 'trustworthy', 'innovative')",
150
+ )
151
+ tagline: str | None = Field(None, description="Brand tagline or slogan")
152
+ assets: list[Asset] | None = Field(
153
+ None,
154
+ description="Brand asset library with explicit assets and tags. Assets are referenced inline with URLs pointing to CDN-hosted files.",
155
+ )
156
+ product_catalog: ProductCatalog | None = Field(
157
+ None,
158
+ description="Product catalog information for e-commerce advertisers. Enables SKU-level creative generation and product selection.",
159
+ )
160
+ disclaimers: list[Disclaimer] | None = Field(
161
+ None, description="Legal disclaimers or required text that must appear in creatives"
162
+ )
163
+ industry: str | None = Field(
164
+ None,
165
+ description="Industry or vertical (e.g., 'retail', 'automotive', 'finance', 'healthcare')",
166
+ )
167
+ target_audience: str | None = Field(None, description="Primary target audience description")
168
+ contact: Contact | None = Field(None, description="Brand contact information")
169
+ metadata: Metadata | None = Field(None, description="Additional brand metadata")
170
+
171
+
172
+ class Asset1(AdCPBaseModel):
173
+ model_config = ConfigDict(
174
+ extra="forbid",
175
+ )
176
+ asset_id: str = Field(..., description="Unique identifier for this asset")
177
+ asset_type: AssetType = Field(..., description="Type of asset")
178
+ url: AnyUrl = Field(..., description="URL to CDN-hosted asset file")
179
+ tags: list[str] | None = Field(
180
+ None, description="Tags for asset discovery (e.g., 'holiday', 'lifestyle', 'product_shot')"
181
+ )
182
+ name: str | None = Field(None, description="Human-readable asset name")
183
+ description: str | None = Field(None, description="Asset description or usage notes")
184
+ width: int | None = Field(None, description="Image/video width in pixels")
185
+ height: int | None = Field(None, description="Image/video height in pixels")
186
+ duration_seconds: float | None = Field(None, description="Video/audio duration in seconds")
187
+ file_size_bytes: int | None = Field(None, description="File size in bytes")
188
+ format: str | None = Field(None, description="File format (e.g., 'jpg', 'mp4', 'mp3')")
189
+ metadata: dict[str, Any] | None = Field(None, description="Additional asset-specific metadata")
190
+
191
+
192
+ class ProductCatalog1(AdCPBaseModel):
193
+ model_config = ConfigDict(
194
+ extra="forbid",
195
+ )
196
+ feed_url: AnyUrl = Field(..., description="URL to product catalog feed")
197
+ feed_format: FeedFormat | None = Field(
198
+ FeedFormat.google_merchant_center, description="Format of the product feed"
199
+ )
200
+ categories: list[str] | None = Field(
201
+ None, description="Product categories available in the catalog (for filtering)"
202
+ )
203
+ last_updated: AwareDatetime | None = Field(
204
+ None, description="When the product catalog was last updated"
205
+ )
206
+ update_frequency: UpdateFrequency | None = Field(
207
+ None, description="How frequently the product catalog is updated"
208
+ )
209
+
210
+
211
+ class BrandManifest2(AdCPBaseModel):
212
+ model_config = ConfigDict(
213
+ extra="forbid",
214
+ )
215
+ url: AnyUrl | None = Field(
216
+ None,
217
+ description="Primary brand URL for context and asset discovery. Creative agents can infer brand information from this URL.",
218
+ )
219
+ name: str = Field(..., description="Brand or business name")
220
+ logos: list[Logo] | None = Field(
221
+ None, description="Brand logo assets with semantic tags for different use cases"
222
+ )
223
+ colors: Colors | None = Field(None, description="Brand color palette")
224
+ fonts: Fonts | None = Field(None, description="Brand typography guidelines")
225
+ tone: str | None = Field(
226
+ None,
227
+ description="Brand voice and messaging tone (e.g., 'professional', 'casual', 'humorous', 'trustworthy', 'innovative')",
228
+ )
229
+ tagline: str | None = Field(None, description="Brand tagline or slogan")
230
+ assets: list[Asset1] | None = Field(
231
+ None,
232
+ description="Brand asset library with explicit assets and tags. Assets are referenced inline with URLs pointing to CDN-hosted files.",
233
+ )
234
+ product_catalog: ProductCatalog1 | None = Field(
235
+ None,
236
+ description="Product catalog information for e-commerce advertisers. Enables SKU-level creative generation and product selection.",
237
+ )
238
+ disclaimers: list[Disclaimer] | None = Field(
239
+ None, description="Legal disclaimers or required text that must appear in creatives"
240
+ )
241
+ industry: str | None = Field(
242
+ None,
243
+ description="Industry or vertical (e.g., 'retail', 'automotive', 'finance', 'healthcare')",
244
+ )
245
+ target_audience: str | None = Field(None, description="Primary target audience description")
246
+ contact: Contact | None = Field(None, description="Brand contact information")
247
+ metadata: Metadata | None = Field(None, description="Additional brand metadata")
248
+
249
+
250
+ class BrandManifest(RootModel[BrandManifest1 | BrandManifest2]):
251
+ root: BrandManifest1 | BrandManifest2 = Field(
252
+ ...,
253
+ description="Standardized brand information manifest for creative generation and media buying. Enables low-friction creative workflows by providing brand context that can be easily cached and shared across requests.",
254
+ examples=[
255
+ {
256
+ "description": "Example with both URL and name",
257
+ "data": {"url": "https://bobsfunburgers.com", "name": "Bob's Fun Burgers"},
258
+ },
259
+ {
260
+ "description": "Example: white-label brand without dedicated URL",
261
+ "data": {
262
+ "name": "Great Value",
263
+ "colors": {"primary": "#0071CE", "secondary": "#FFC220"},
264
+ "tone": "affordable and trustworthy",
265
+ },
266
+ },
267
+ {
268
+ "description": "Full brand manifest with all fields",
269
+ "data": {
270
+ "url": "https://acmecorp.com",
271
+ "name": "ACME Corporation",
272
+ "logos": [
273
+ {
274
+ "url": "https://cdn.acmecorp.com/logo-square-dark.png",
275
+ "tags": ["dark", "square"],
276
+ "width": 512,
277
+ "height": 512,
278
+ },
279
+ {
280
+ "url": "https://cdn.acmecorp.com/logo-horizontal-light.png",
281
+ "tags": ["light", "horizontal"],
282
+ "width": 1200,
283
+ "height": 400,
284
+ },
285
+ ],
286
+ "colors": {
287
+ "primary": "#FF6B35",
288
+ "secondary": "#004E89",
289
+ "accent": "#F7931E",
290
+ "background": "#FFFFFF",
291
+ "text": "#1A1A1A",
292
+ },
293
+ "fonts": {"primary": "Helvetica Neue", "secondary": "Georgia"},
294
+ "tone": "professional and trustworthy",
295
+ "tagline": "Innovation You Can Trust",
296
+ "assets": [
297
+ {
298
+ "asset_id": "hero_winter_2024",
299
+ "asset_type": "image",
300
+ "url": "https://cdn.acmecorp.com/hero-winter-2024.jpg",
301
+ "tags": ["hero", "winter", "holiday", "lifestyle"],
302
+ "name": "Winter Campaign Hero",
303
+ "width": 1920,
304
+ "height": 1080,
305
+ "format": "jpg",
306
+ },
307
+ {
308
+ "asset_id": "product_video_30s",
309
+ "asset_type": "video",
310
+ "url": "https://cdn.acmecorp.com/product-demo-30s.mp4",
311
+ "tags": ["product", "demo", "30s"],
312
+ "name": "Product Demo 30 Second",
313
+ "width": 1920,
314
+ "height": 1080,
315
+ "duration_seconds": 30,
316
+ "format": "mp4",
317
+ },
318
+ ],
319
+ "product_catalog": {
320
+ "feed_url": "https://acmecorp.com/products.xml",
321
+ "feed_format": "google_merchant_center",
322
+ "categories": ["electronics/computers", "electronics/accessories"],
323
+ "last_updated": "2024-03-15T10:00:00Z",
324
+ "update_frequency": "hourly",
325
+ },
326
+ "disclaimers": [
327
+ {
328
+ "text": "Results may vary. Consult a professional before use.",
329
+ "context": "health_claims",
330
+ "required": True,
331
+ }
332
+ ],
333
+ "industry": "technology",
334
+ "target_audience": "business decision-makers aged 35-55",
335
+ },
336
+ },
337
+ ],
338
+ title="Brand Manifest",
339
+ )
340
+
341
+
342
+ class BrandManifestReference(RootModel[BrandManifest | AnyUrl]):
343
+ root: BrandManifest | AnyUrl = Field(
344
+ ...,
345
+ description="Brand manifest provided either as an inline object or a URL string pointing to a hosted manifest",
346
+ examples=[
347
+ {
348
+ "description": "Inline brand manifest",
349
+ "data": {
350
+ "url": "https://acmecorp.com",
351
+ "name": "ACME Corporation",
352
+ "colors": {"primary": "#FF6B35"},
353
+ },
354
+ },
355
+ {
356
+ "description": "URL string reference to hosted manifest",
357
+ "data": "https://cdn.acmecorp.com/brand-manifest.json",
358
+ },
359
+ ],
360
+ title="Brand Manifest Reference",
361
+ )
@@ -0,0 +1,43 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: build-creative-request.json
3
+ # timestamp: 2025-11-15T22:03:55+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 ConfigDict, Field
11
+
12
+ from . import creative_manifest as creative_manifest_1
13
+ from . import format_id
14
+
15
+
16
+ class BuildCreativeRequest(AdCPBaseModel):
17
+ model_config = ConfigDict(
18
+ extra="forbid",
19
+ )
20
+ context: Annotated[
21
+ dict[str, Any] | None,
22
+ Field(
23
+ description="Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata."
24
+ ),
25
+ ] = None
26
+ creative_manifest: Annotated[
27
+ creative_manifest_1.CreativeManifest | None,
28
+ Field(
29
+ description="Creative manifest to transform or generate from. For pure generation, this should include the target format_id and any required input assets (e.g., promoted_offerings for generative formats). For transformation (e.g., resizing, reformatting), this is the complete creative to adapt."
30
+ ),
31
+ ] = None
32
+ message: Annotated[
33
+ str | None,
34
+ Field(
35
+ description="Natural language instructions for the transformation or generation. For pure generation, this is the creative brief. For transformation, this provides guidance on how to adapt the creative."
36
+ ),
37
+ ] = None
38
+ target_format_id: Annotated[
39
+ format_id.FormatId,
40
+ Field(
41
+ description="Format ID to generate. The format definition specifies required input assets and output structure."
42
+ ),
43
+ ]