adcp 1.6.0__py3-none-any.whl → 2.0.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 (116) hide show
  1. adcp/__init__.py +19 -221
  2. adcp/adagents.py +11 -12
  3. adcp/client.py +16 -11
  4. adcp/types/generated.py +540 -1129
  5. adcp/types/generated_poc/__init__.py +3 -0
  6. adcp/types/generated_poc/activate_signal_request.py +34 -0
  7. adcp/types/generated_poc/activate_signal_response.py +57 -0
  8. adcp/types/generated_poc/activation_key.py +30 -0
  9. adcp/types/generated_poc/adagents.py +266 -0
  10. adcp/types/generated_poc/asset_type.py +100 -0
  11. adcp/types/generated_poc/audio_asset.py +26 -0
  12. adcp/types/generated_poc/brand_manifest.py +260 -0
  13. adcp/types/generated_poc/brand_manifest_ref.py +361 -0
  14. adcp/types/generated_poc/build_creative_request.py +43 -0
  15. adcp/types/generated_poc/build_creative_response.py +57 -0
  16. adcp/types/generated_poc/channels.py +19 -0
  17. adcp/types/generated_poc/cpc_option.py +39 -0
  18. adcp/types/generated_poc/cpcv_option.py +41 -0
  19. adcp/types/generated_poc/cpm_auction_option.py +54 -0
  20. adcp/types/generated_poc/cpm_fixed_option.py +39 -0
  21. adcp/types/generated_poc/cpp_option.py +60 -0
  22. adcp/types/generated_poc/cpv_option.py +73 -0
  23. adcp/types/generated_poc/create_media_buy_request.py +96 -0
  24. adcp/types/generated_poc/create_media_buy_response.py +66 -0
  25. adcp/types/generated_poc/creative_asset.py +83 -0
  26. adcp/types/generated_poc/creative_assignment.py +27 -0
  27. adcp/types/generated_poc/creative_manifest.py +61 -0
  28. adcp/types/generated_poc/creative_policy.py +34 -0
  29. adcp/types/generated_poc/creative_status.py +14 -0
  30. adcp/types/generated_poc/css_asset.py +20 -0
  31. adcp/types/generated_poc/daast_asset.py +76 -0
  32. adcp/types/generated_poc/delivery_metrics.py +111 -0
  33. adcp/types/generated_poc/delivery_type.py +12 -0
  34. adcp/types/generated_poc/deployment.py +78 -0
  35. adcp/types/generated_poc/destination.py +43 -0
  36. adcp/types/generated_poc/error.py +29 -0
  37. adcp/types/generated_poc/flat_rate_option.py +93 -0
  38. adcp/types/generated_poc/format.py +260 -0
  39. adcp/types/generated_poc/format_id.py +29 -0
  40. adcp/types/generated_poc/frequency_cap.py +19 -0
  41. adcp/types/generated_poc/frequency_cap_scope.py +16 -0
  42. adcp/types/generated_poc/get_media_buy_delivery_request.py +65 -0
  43. adcp/types/generated_poc/get_media_buy_delivery_response.py +220 -0
  44. adcp/types/generated_poc/get_products_request.py +83 -0
  45. adcp/types/generated_poc/get_products_response.py +29 -0
  46. adcp/types/generated_poc/get_signals_request.py +77 -0
  47. adcp/types/generated_poc/get_signals_response.py +65 -0
  48. adcp/types/generated_poc/html_asset.py +18 -0
  49. adcp/types/generated_poc/identifier_types.py +29 -0
  50. adcp/types/generated_poc/image_asset.py +23 -0
  51. adcp/types/generated_poc/index.py +17 -0
  52. adcp/types/generated_poc/javascript_asset.py +25 -0
  53. adcp/types/generated_poc/list_authorized_properties_request.py +39 -0
  54. adcp/types/generated_poc/list_authorized_properties_response.py +85 -0
  55. adcp/types/generated_poc/list_creative_formats_request.py +93 -0
  56. adcp/types/generated_poc/list_creative_formats_response.py +63 -0
  57. adcp/types/generated_poc/list_creatives_request.py +154 -0
  58. adcp/types/generated_poc/list_creatives_response.py +234 -0
  59. adcp/types/generated_poc/markdown_asset.py +43 -0
  60. adcp/types/generated_poc/measurement.py +40 -0
  61. adcp/types/generated_poc/media_buy.py +37 -0
  62. adcp/types/generated_poc/media_buy_status.py +14 -0
  63. adcp/types/generated_poc/pacing.py +13 -0
  64. adcp/types/generated_poc/package.py +61 -0
  65. adcp/types/generated_poc/package_request.py +61 -0
  66. adcp/types/generated_poc/package_status.py +14 -0
  67. adcp/types/generated_poc/performance_feedback.py +89 -0
  68. adcp/types/generated_poc/placement.py +37 -0
  69. adcp/types/generated_poc/preview_creative_request.py +163 -0
  70. adcp/types/generated_poc/preview_creative_response.py +175 -0
  71. adcp/types/generated_poc/preview_render.py +144 -0
  72. adcp/types/generated_poc/pricing_model.py +17 -0
  73. adcp/types/generated_poc/pricing_option.py +365 -0
  74. adcp/types/generated_poc/product.py +211 -0
  75. adcp/types/generated_poc/promoted_offerings.py +102 -0
  76. adcp/types/generated_poc/promoted_products.py +38 -0
  77. adcp/types/generated_poc/property.py +79 -0
  78. adcp/types/generated_poc/protocol_envelope.py +61 -0
  79. adcp/types/generated_poc/provide_performance_feedback_request.py +85 -0
  80. adcp/types/generated_poc/provide_performance_feedback_response.py +59 -0
  81. adcp/types/generated_poc/publisher_identifier_types.py +15 -0
  82. adcp/types/generated_poc/push_notification_config.py +55 -0
  83. adcp/types/generated_poc/reporting_capabilities.py +68 -0
  84. adcp/types/generated_poc/response.py +24 -0
  85. adcp/types/generated_poc/standard_format_ids.py +45 -0
  86. adcp/types/generated_poc/start_timing.py +13 -0
  87. adcp/types/generated_poc/sub_asset.py +55 -0
  88. adcp/types/generated_poc/sync_creatives_request.py +69 -0
  89. adcp/types/generated_poc/sync_creatives_response.py +117 -0
  90. adcp/types/generated_poc/targeting.py +53 -0
  91. adcp/types/generated_poc/task_status.py +19 -0
  92. adcp/types/generated_poc/task_type.py +15 -0
  93. adcp/types/generated_poc/tasks_get_request.py +29 -0
  94. adcp/types/generated_poc/tasks_get_response.py +112 -0
  95. adcp/types/generated_poc/tasks_list_request.py +121 -0
  96. adcp/types/generated_poc/tasks_list_response.py +122 -0
  97. adcp/types/generated_poc/text_asset.py +20 -0
  98. adcp/types/generated_poc/update_media_buy_request.py +160 -0
  99. adcp/types/generated_poc/update_media_buy_response.py +67 -0
  100. adcp/types/generated_poc/url_asset.py +33 -0
  101. adcp/types/generated_poc/vast_asset.py +86 -0
  102. adcp/types/generated_poc/vcpm_auction_option.py +57 -0
  103. adcp/types/generated_poc/vcpm_fixed_option.py +43 -0
  104. adcp/types/generated_poc/video_asset.py +28 -0
  105. adcp/types/generated_poc/webhook_asset.py +65 -0
  106. adcp/types/generated_poc/webhook_payload.py +102 -0
  107. adcp/utils/preview_cache.py +57 -39
  108. adcp/validation.py +172 -0
  109. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/METADATA +3 -1
  110. adcp-2.0.0.dist-info/RECORD +130 -0
  111. adcp/types/tasks.py +0 -511
  112. adcp-1.6.0.dist-info/RECORD +0 -28
  113. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/WHEEL +0 -0
  114. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/entry_points.txt +0 -0
  115. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/licenses/LICENSE +0 -0
  116. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,3 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: .schema_temp
3
+ # timestamp: 2025-11-15T22:03:55+00:00
@@ -0,0 +1,34 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: activate-signal-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 destination
13
+
14
+
15
+ class ActivateSignalRequest(AdCPBaseModel):
16
+ model_config = ConfigDict(
17
+ extra="forbid",
18
+ )
19
+ context: Annotated[
20
+ dict[str, Any] | None,
21
+ Field(
22
+ description="Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata."
23
+ ),
24
+ ] = None
25
+ destinations: Annotated[
26
+ list[destination.Destination1 | destination.Destination2],
27
+ Field(
28
+ description="Target destination(s) for activation. If the authenticated caller matches one of these destinations, activation keys will be included in the response.",
29
+ min_length=1,
30
+ ),
31
+ ]
32
+ signal_agent_segment_id: Annotated[
33
+ str, Field(description="The universal identifier for the signal to activate")
34
+ ]
@@ -0,0 +1,57 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: activate-signal-response.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, RootModel
11
+
12
+ from . import deployment, error
13
+
14
+
15
+ class ActivateSignalResponse1(AdCPBaseModel):
16
+ model_config = ConfigDict(
17
+ extra="forbid",
18
+ )
19
+ context: Annotated[
20
+ dict[str, Any] | None,
21
+ Field(
22
+ description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
23
+ ),
24
+ ] = None
25
+ deployments: Annotated[
26
+ list[deployment.Deployment1 | deployment.Deployment2],
27
+ Field(description="Array of deployment results for each destination"),
28
+ ]
29
+
30
+
31
+ class ActivateSignalResponse2(AdCPBaseModel):
32
+ model_config = ConfigDict(
33
+ extra="forbid",
34
+ )
35
+ context: Annotated[
36
+ dict[str, Any] | None,
37
+ Field(
38
+ description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
39
+ ),
40
+ ] = None
41
+ errors: Annotated[
42
+ list[error.Error],
43
+ Field(
44
+ description="Array of errors explaining why activation failed (e.g., platform connectivity issues, signal definition problems, authentication failures)",
45
+ min_length=1,
46
+ ),
47
+ ]
48
+
49
+
50
+ class ActivateSignalResponse(RootModel[ActivateSignalResponse1 | ActivateSignalResponse2]):
51
+ root: Annotated[
52
+ ActivateSignalResponse1 | ActivateSignalResponse2,
53
+ Field(
54
+ description="Response payload for activate_signal task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - the signal is either fully activated or not activated at all.",
55
+ title="Activate Signal Response",
56
+ ),
57
+ ]
@@ -0,0 +1,30 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: activation-key.json
3
+ # timestamp: 2025-11-15T22:03:55+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
+
13
+ class ActivationKey1(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ segment_id: Annotated[
18
+ str,
19
+ Field(description="The platform-specific segment identifier to use in campaign targeting"),
20
+ ]
21
+ type: Annotated[Literal["segment_id"], Field(description="Segment ID based targeting")]
22
+
23
+
24
+ class ActivationKey2(AdCPBaseModel):
25
+ model_config = ConfigDict(
26
+ extra="forbid",
27
+ )
28
+ key: Annotated[str, Field(description="The targeting parameter key")]
29
+ type: Annotated[Literal["key_value"], Field(description="Key-value pair based targeting")]
30
+ value: Annotated[str, Field(description="The targeting parameter value")]
@@ -0,0 +1,266 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: adagents.json
3
+ # timestamp: 2025-11-15T22:03:55+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 AnyUrl, AwareDatetime, ConfigDict, EmailStr, Field, RootModel
11
+
12
+ from . import property
13
+
14
+
15
+ class PropertyId(RootModel[str]):
16
+ root: Annotated[str, Field(pattern="^[a-z0-9_]+$")]
17
+
18
+
19
+ class AuthorizedAgents(AdCPBaseModel):
20
+ model_config = ConfigDict(
21
+ extra="forbid",
22
+ )
23
+ authorization_type: Annotated[
24
+ Literal["property_ids"],
25
+ Field(description="Discriminator indicating authorization by specific property IDs"),
26
+ ]
27
+ authorized_for: Annotated[
28
+ str,
29
+ Field(
30
+ description="Human-readable description of what this agent is authorized to sell",
31
+ max_length=500,
32
+ min_length=1,
33
+ ),
34
+ ]
35
+ property_ids: Annotated[
36
+ list[PropertyId],
37
+ Field(
38
+ description="Property IDs this agent is authorized for. Resolved against the top-level properties array in this file",
39
+ min_length=1,
40
+ ),
41
+ ]
42
+ url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]
43
+
44
+
45
+ class PropertyTag(PropertyId):
46
+ pass
47
+
48
+
49
+ class AuthorizedAgents1(AdCPBaseModel):
50
+ model_config = ConfigDict(
51
+ extra="forbid",
52
+ )
53
+ authorization_type: Annotated[
54
+ Literal["property_tags"],
55
+ Field(description="Discriminator indicating authorization by property tags"),
56
+ ]
57
+ authorized_for: Annotated[
58
+ str,
59
+ Field(
60
+ description="Human-readable description of what this agent is authorized to sell",
61
+ max_length=500,
62
+ min_length=1,
63
+ ),
64
+ ]
65
+ property_tags: Annotated[
66
+ list[PropertyTag],
67
+ Field(
68
+ description="Tags identifying which properties this agent is authorized for. Resolved against the top-level properties array in this file using tag matching",
69
+ min_length=1,
70
+ ),
71
+ ]
72
+ url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]
73
+
74
+
75
+ class PublisherProperties(AdCPBaseModel):
76
+ model_config = ConfigDict(
77
+ extra="forbid",
78
+ )
79
+ property_ids: Annotated[
80
+ list[PropertyId],
81
+ Field(
82
+ description="Specific property IDs from the publisher's adagents.json properties array",
83
+ min_length=1,
84
+ ),
85
+ ]
86
+ publisher_domain: Annotated[
87
+ str,
88
+ Field(
89
+ description="Domain where the publisher's adagents.json is hosted (e.g., 'cnn.com')",
90
+ pattern="^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
91
+ ),
92
+ ]
93
+ selection_type: Annotated[
94
+ Literal["by_id"],
95
+ Field(description="Discriminator indicating selection by specific property IDs"),
96
+ ]
97
+
98
+
99
+ class PublisherProperties1(AdCPBaseModel):
100
+ model_config = ConfigDict(
101
+ extra="forbid",
102
+ )
103
+ property_tags: Annotated[
104
+ list[PropertyTag],
105
+ Field(
106
+ description="Property tags from the publisher's adagents.json tags. Agent is authorized for all properties with these tags",
107
+ min_length=1,
108
+ ),
109
+ ]
110
+ publisher_domain: Annotated[
111
+ str,
112
+ Field(
113
+ description="Domain where the publisher's adagents.json is hosted (e.g., 'cnn.com')",
114
+ pattern="^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
115
+ ),
116
+ ]
117
+ selection_type: Annotated[
118
+ Literal["by_tag"], Field(description="Discriminator indicating selection by property tags")
119
+ ]
120
+
121
+
122
+ class AuthorizedAgents3(AdCPBaseModel):
123
+ model_config = ConfigDict(
124
+ extra="forbid",
125
+ )
126
+ authorization_type: Annotated[
127
+ Literal["publisher_properties"],
128
+ Field(
129
+ description="Discriminator indicating authorization for properties from other publisher domains"
130
+ ),
131
+ ]
132
+ authorized_for: Annotated[
133
+ str,
134
+ Field(
135
+ description="Human-readable description of what this agent is authorized to sell",
136
+ max_length=500,
137
+ min_length=1,
138
+ ),
139
+ ]
140
+ publisher_properties: Annotated[
141
+ list[PublisherProperties | PublisherProperties1],
142
+ Field(
143
+ description="Properties from other publisher domains this agent is authorized for. Each entry specifies a publisher domain and which of their properties this agent can sell",
144
+ min_length=1,
145
+ ),
146
+ ]
147
+ url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]
148
+
149
+
150
+ class Contact(AdCPBaseModel):
151
+ model_config = ConfigDict(
152
+ extra="forbid",
153
+ )
154
+ domain: Annotated[
155
+ str | None,
156
+ Field(
157
+ description="Primary domain of the entity managing this file",
158
+ pattern="^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
159
+ ),
160
+ ] = None
161
+ email: Annotated[
162
+ EmailStr | None,
163
+ Field(
164
+ description="Contact email for questions or issues with this authorization file",
165
+ max_length=255,
166
+ min_length=1,
167
+ ),
168
+ ] = None
169
+ name: Annotated[
170
+ str,
171
+ Field(
172
+ description="Name of the entity managing this file (e.g., 'Meta Advertising Operations', 'Clear Channel Digital')",
173
+ max_length=255,
174
+ min_length=1,
175
+ ),
176
+ ]
177
+ seller_id: Annotated[
178
+ str | None,
179
+ Field(
180
+ description="Seller ID from IAB Tech Lab sellers.json (if applicable)",
181
+ max_length=255,
182
+ min_length=1,
183
+ ),
184
+ ] = None
185
+ tag_id: Annotated[
186
+ str | None,
187
+ Field(
188
+ description="TAG Certified Against Fraud ID for verification (if applicable)",
189
+ max_length=100,
190
+ min_length=1,
191
+ ),
192
+ ] = None
193
+
194
+
195
+ class Tags(AdCPBaseModel):
196
+ model_config = ConfigDict(
197
+ extra="forbid",
198
+ )
199
+ description: Annotated[str, Field(description="Description of what this tag represents")]
200
+ name: Annotated[str, Field(description="Human-readable name for this tag")]
201
+
202
+
203
+ class AuthorizedAgents2(AdCPBaseModel):
204
+ model_config = ConfigDict(
205
+ extra="forbid",
206
+ )
207
+ authorization_type: Annotated[
208
+ Literal["inline_properties"],
209
+ Field(description="Discriminator indicating authorization by inline property definitions"),
210
+ ]
211
+ authorized_for: Annotated[
212
+ str,
213
+ Field(
214
+ description="Human-readable description of what this agent is authorized to sell",
215
+ max_length=500,
216
+ min_length=1,
217
+ ),
218
+ ]
219
+ properties: Annotated[
220
+ list[property.Property],
221
+ Field(
222
+ description="Specific properties this agent is authorized for (alternative to property_ids/property_tags)",
223
+ min_length=1,
224
+ ),
225
+ ]
226
+ url: Annotated[AnyUrl, Field(description="The authorized agent's API endpoint URL")]
227
+
228
+
229
+ class AuthorizedSalesAgents(AdCPBaseModel):
230
+ model_config = ConfigDict(
231
+ extra="forbid",
232
+ )
233
+ field_schema: Annotated[
234
+ str | None,
235
+ Field(alias="$schema", description="JSON Schema identifier for this adagents.json file"),
236
+ ] = "https://adcontextprotocol.org/schemas/v1/adagents.json"
237
+ authorized_agents: Annotated[
238
+ list[AuthorizedAgents | AuthorizedAgents1 | AuthorizedAgents2 | AuthorizedAgents3],
239
+ Field(
240
+ description="Array of sales agents authorized to sell inventory for properties in this file",
241
+ min_length=1,
242
+ ),
243
+ ]
244
+ contact: Annotated[
245
+ Contact | None,
246
+ Field(
247
+ description="Contact information for the entity managing this adagents.json file (may be publisher or third-party operator)"
248
+ ),
249
+ ] = None
250
+ last_updated: Annotated[
251
+ AwareDatetime | None,
252
+ Field(description="ISO 8601 timestamp indicating when this file was last updated"),
253
+ ] = None
254
+ properties: Annotated[
255
+ list[property.Property] | None,
256
+ Field(
257
+ description="Array of all properties covered by this adagents.json file. Same structure as list_authorized_properties response.",
258
+ min_length=1,
259
+ ),
260
+ ] = None
261
+ tags: Annotated[
262
+ dict[str, Tags] | None,
263
+ Field(
264
+ description="Metadata for each tag referenced by properties. Same structure as list_authorized_properties response."
265
+ ),
266
+ ] = None
@@ -0,0 +1,100 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: asset-type.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
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import ConfigDict, Field
12
+
13
+
14
+ class ContentLength(AdCPBaseModel):
15
+ max_characters: Annotated[int | None, Field(ge=1)] = None
16
+ max_words: Annotated[int | None, Field(ge=1)] = None
17
+ min_characters: Annotated[int | None, Field(ge=0)] = None
18
+ min_words: Annotated[int | None, Field(ge=0)] = None
19
+
20
+
21
+ class Dimensions(AdCPBaseModel):
22
+ aspect_ratio: str | None = None
23
+ height: Annotated[int | None, Field(ge=1)] = None
24
+ max_height: Annotated[int | None, Field(ge=1)] = None
25
+ max_width: Annotated[int | None, Field(ge=1)] = None
26
+ min_height: Annotated[int | None, Field(ge=1)] = None
27
+ min_width: Annotated[int | None, Field(ge=1)] = None
28
+ width: Annotated[int | None, Field(ge=1)] = None
29
+
30
+
31
+ class Duration(AdCPBaseModel):
32
+ exact_seconds: Annotated[float | None, Field(ge=0.0)] = None
33
+ max_seconds: Annotated[float | None, Field(ge=0.0)] = None
34
+ min_seconds: Annotated[float | None, Field(ge=0.0)] = None
35
+
36
+
37
+ class FileSize(AdCPBaseModel):
38
+ max_bytes: Annotated[int | None, Field(ge=1)] = None
39
+ min_bytes: Annotated[int | None, Field(ge=0)] = None
40
+
41
+
42
+ class Quality(AdCPBaseModel):
43
+ max_bitrate_kbps: Annotated[int | None, Field(ge=1)] = None
44
+ min_bitrate_kbps: Annotated[int | None, Field(ge=1)] = None
45
+ min_resolution_dpi: Annotated[int | None, Field(ge=72)] = None
46
+
47
+
48
+ class Requirements(AdCPBaseModel):
49
+ model_config = ConfigDict(
50
+ extra="forbid",
51
+ )
52
+ content_length: ContentLength | None = None
53
+ dimensions: Dimensions | None = None
54
+ duration: Duration | None = None
55
+ file_formats: Annotated[
56
+ list[str] | None,
57
+ Field(description="Acceptable file formats (e.g., ['jpg', 'png'] for images)"),
58
+ ] = None
59
+ file_size: FileSize | None = None
60
+ quality: Quality | None = None
61
+
62
+
63
+ class Type(Enum):
64
+ image = "image"
65
+ video = "video"
66
+ audio = "audio"
67
+ text = "text"
68
+ html = "html"
69
+ css = "css"
70
+ javascript = "javascript"
71
+ vast = "vast"
72
+ daast = "daast"
73
+ promoted_offerings = "promoted_offerings"
74
+ url = "url"
75
+
76
+
77
+ class AssetTypeSchema(AdCPBaseModel):
78
+ model_config = ConfigDict(
79
+ extra="forbid",
80
+ )
81
+ asset_role: Annotated[
82
+ str,
83
+ Field(
84
+ description="Role or purpose of this asset in the creative (e.g., 'hero_image', 'logo', 'cta_button')"
85
+ ),
86
+ ]
87
+ constraints: Annotated[
88
+ list[str] | None,
89
+ Field(description="Additional constraints or requirements (human-readable)"),
90
+ ] = None
91
+ examples: Annotated[
92
+ list[str] | None, Field(description="Example values or descriptions for this asset")
93
+ ] = None
94
+ required: Annotated[
95
+ bool | None, Field(description="Whether this asset is mandatory for the format")
96
+ ] = True
97
+ requirements: Annotated[
98
+ Requirements | None, Field(description="Technical requirements for this asset type")
99
+ ] = None
100
+ type: Annotated[Type, Field(description="Type of asset")]
@@ -0,0 +1,26 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: audio-asset.json
3
+ # timestamp: 2025-11-15T22:03:55+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 AnyUrl, ConfigDict, Field
11
+
12
+
13
+ class AudioAsset(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ bitrate_kbps: Annotated[
18
+ int | None, Field(description="Audio bitrate in kilobits per second", ge=1)
19
+ ] = None
20
+ duration_ms: Annotated[
21
+ int | None, Field(description="Audio duration in milliseconds", ge=0)
22
+ ] = None
23
+ format: Annotated[str | None, Field(description="Audio file format (mp3, wav, aac, etc.)")] = (
24
+ None
25
+ )
26
+ url: Annotated[AnyUrl, Field(description="URL to the audio asset")]