adcp 2.3.0__py3-none-any.whl → 2.4.1__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 (120) hide show
  1. adcp/__init__.py +88 -39
  2. adcp/__main__.py +1 -1
  3. adcp/client.py +9 -9
  4. adcp/simple.py +1 -1
  5. adcp/testing/test_helpers.py +1 -1
  6. adcp/types/__init__.py +66 -2
  7. adcp/types/_generated.py +175 -0
  8. adcp/types/aliases.py +1 -1
  9. adcp/types/generated_poc/__init__.py +1 -1
  10. adcp/types/generated_poc/activate_signal_request.py +5 -5
  11. adcp/types/generated_poc/activate_signal_response.py +9 -9
  12. adcp/types/generated_poc/activation_key.py +8 -8
  13. adcp/types/generated_poc/adagents.py +46 -46
  14. adcp/types/generated_poc/asset_type.py +19 -19
  15. adcp/types/generated_poc/audio_asset.py +6 -6
  16. adcp/types/generated_poc/brand_manifest.py +61 -120
  17. adcp/types/generated_poc/build_creative_request.py +6 -6
  18. adcp/types/generated_poc/build_creative_response.py +9 -9
  19. adcp/types/generated_poc/channels.py +10 -10
  20. adcp/types/generated_poc/cpc_option.py +12 -8
  21. adcp/types/generated_poc/cpcv_option.py +12 -8
  22. adcp/types/generated_poc/cpm_auction_option.py +17 -13
  23. adcp/types/generated_poc/cpm_fixed_option.py +12 -8
  24. adcp/types/generated_poc/cpp_option.py +17 -13
  25. adcp/types/generated_poc/cpv_option.py +16 -12
  26. adcp/types/generated_poc/create_media_buy_request.py +30 -30
  27. adcp/types/generated_poc/create_media_buy_response.py +11 -11
  28. adcp/types/generated_poc/creative_asset.py +13 -13
  29. adcp/types/generated_poc/creative_assignment.py +4 -4
  30. adcp/types/generated_poc/creative_manifest.py +4 -4
  31. adcp/types/generated_poc/creative_policy.py +11 -11
  32. adcp/types/generated_poc/creative_status.py +5 -5
  33. adcp/types/generated_poc/css_asset.py +3 -3
  34. adcp/types/generated_poc/daast_asset.py +30 -30
  35. adcp/types/generated_poc/delivery_metrics.py +33 -33
  36. adcp/types/generated_poc/delivery_type.py +3 -3
  37. adcp/types/generated_poc/deployment.py +21 -21
  38. adcp/types/generated_poc/destination.py +10 -10
  39. adcp/types/generated_poc/error.py +7 -7
  40. adcp/types/generated_poc/flat_rate_option.py +16 -16
  41. adcp/types/generated_poc/format.py +70 -70
  42. adcp/types/generated_poc/format_id.py +3 -3
  43. adcp/types/generated_poc/frequency_cap.py +3 -3
  44. adcp/types/generated_poc/frequency_cap_scope.py +4 -4
  45. adcp/types/generated_poc/get_media_buy_delivery_request.py +21 -21
  46. adcp/types/generated_poc/get_media_buy_delivery_response.py +46 -46
  47. adcp/types/generated_poc/get_products_request.py +24 -24
  48. adcp/types/generated_poc/get_products_response.py +5 -5
  49. adcp/types/generated_poc/get_signals_request.py +19 -19
  50. adcp/types/generated_poc/get_signals_response.py +20 -20
  51. adcp/types/generated_poc/html_asset.py +3 -3
  52. adcp/types/generated_poc/identifier_types.py +20 -20
  53. adcp/types/generated_poc/image_asset.py +7 -7
  54. adcp/types/generated_poc/javascript_asset.py +7 -7
  55. adcp/types/generated_poc/list_authorized_properties_request.py +5 -5
  56. adcp/types/generated_poc/list_authorized_properties_response.py +9 -9
  57. adcp/types/generated_poc/list_creative_formats_request.py +22 -22
  58. adcp/types/generated_poc/list_creative_formats_response.py +11 -11
  59. adcp/types/generated_poc/list_creatives_request.py +51 -51
  60. adcp/types/generated_poc/list_creatives_response.py +57 -72
  61. adcp/types/generated_poc/markdown_asset.py +7 -7
  62. adcp/types/generated_poc/measurement.py +9 -9
  63. adcp/types/generated_poc/media_buy.py +8 -8
  64. adcp/types/generated_poc/media_buy_status.py +5 -5
  65. adcp/types/generated_poc/pacing.py +4 -4
  66. adcp/types/generated_poc/package.py +8 -8
  67. adcp/types/generated_poc/package_request.py +7 -7
  68. adcp/types/generated_poc/package_status.py +5 -5
  69. adcp/types/generated_poc/performance_feedback.py +31 -31
  70. adcp/types/generated_poc/placement.py +4 -4
  71. adcp/types/generated_poc/preview_creative_request.py +28 -28
  72. adcp/types/generated_poc/preview_creative_response.py +31 -31
  73. adcp/types/generated_poc/preview_render.py +36 -28
  74. adcp/types/generated_poc/pricing_model.py +8 -8
  75. adcp/types/generated_poc/product.py +53 -43
  76. adcp/types/generated_poc/promoted_offerings.py +30 -30
  77. adcp/types/generated_poc/promoted_products.py +3 -3
  78. adcp/types/generated_poc/property.py +18 -18
  79. adcp/types/generated_poc/protocol_envelope.py +9 -9
  80. adcp/types/generated_poc/provide_performance_feedback_request.py +24 -24
  81. adcp/types/generated_poc/provide_performance_feedback_response.py +9 -9
  82. adcp/types/generated_poc/publisher_identifier_types.py +6 -6
  83. adcp/types/generated_poc/push_notification_config.py +9 -9
  84. adcp/types/generated_poc/reporting_capabilities.py +21 -21
  85. adcp/types/generated_poc/response.py +5 -5
  86. adcp/types/generated_poc/standard_format_ids.py +36 -36
  87. adcp/types/generated_poc/sub_asset.py +13 -13
  88. adcp/types/generated_poc/sync_creatives_request.py +11 -11
  89. adcp/types/generated_poc/sync_creatives_response.py +23 -23
  90. adcp/types/generated_poc/targeting.py +9 -9
  91. adcp/types/generated_poc/task_status.py +10 -10
  92. adcp/types/generated_poc/task_type.py +6 -6
  93. adcp/types/generated_poc/tasks_get_request.py +5 -5
  94. adcp/types/generated_poc/tasks_get_response.py +35 -35
  95. adcp/types/generated_poc/tasks_list_request.py +36 -36
  96. adcp/types/generated_poc/tasks_list_response.py +35 -35
  97. adcp/types/generated_poc/text_asset.py +3 -3
  98. adcp/types/generated_poc/update_media_buy_request.py +27 -27
  99. adcp/types/generated_poc/update_media_buy_response.py +11 -11
  100. adcp/types/generated_poc/url_asset.py +7 -7
  101. adcp/types/generated_poc/vast_asset.py +38 -38
  102. adcp/types/generated_poc/vcpm_auction_option.py +17 -13
  103. adcp/types/generated_poc/vcpm_fixed_option.py +12 -8
  104. adcp/types/generated_poc/video_asset.py +8 -8
  105. adcp/types/generated_poc/webhook_asset.py +19 -19
  106. adcp/types/generated_poc/webhook_payload.py +18 -18
  107. adcp/types/stable.py +175 -0
  108. adcp/utils/preview_cache.py +6 -6
  109. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/METADATA +29 -4
  110. adcp-2.4.1.dist-info/RECORD +129 -0
  111. adcp/types/generated.py +0 -614
  112. adcp/types/generated_poc/brand_manifest_ref.py +0 -361
  113. adcp/types/generated_poc/index.py +0 -17
  114. adcp/types/generated_poc/pricing_option.py +0 -365
  115. adcp/types/generated_poc/start_timing.py +0 -13
  116. adcp-2.3.0.dist-info/RECORD +0 -132
  117. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/WHEEL +0 -0
  118. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/entry_points.txt +0 -0
  119. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/licenses/LICENSE +0 -0
  120. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/top_level.txt +0 -0
@@ -1,361 +0,0 @@
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
- )
@@ -1,17 +0,0 @@
1
- # generated by datamodel-codegen:
2
- # filename: json
3
- # timestamp: 2025-11-15T17:40:38+00:00
4
-
5
- from __future__ import annotations
6
-
7
- from typing import Any
8
-
9
- from pydantic import Field, RootModel
10
-
11
-
12
- class AdcpAssetTypeRegistry(RootModel[Any]):
13
- root: Any = Field(
14
- ...,
15
- description="Registry of asset types used in AdCP creative manifests. Each asset type defines the structure of actual content payloads (what you send), not requirements or constraints (which belong in format specifications).",
16
- title="AdCP Asset Type Registry",
17
- )