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.
- adcp/__init__.py +88 -39
- adcp/__main__.py +1 -1
- adcp/client.py +9 -9
- adcp/simple.py +1 -1
- adcp/testing/test_helpers.py +1 -1
- adcp/types/__init__.py +66 -2
- adcp/types/_generated.py +175 -0
- adcp/types/aliases.py +1 -1
- adcp/types/generated_poc/__init__.py +1 -1
- adcp/types/generated_poc/activate_signal_request.py +5 -5
- adcp/types/generated_poc/activate_signal_response.py +9 -9
- adcp/types/generated_poc/activation_key.py +8 -8
- adcp/types/generated_poc/adagents.py +46 -46
- adcp/types/generated_poc/asset_type.py +19 -19
- adcp/types/generated_poc/audio_asset.py +6 -6
- adcp/types/generated_poc/brand_manifest.py +61 -120
- adcp/types/generated_poc/build_creative_request.py +6 -6
- adcp/types/generated_poc/build_creative_response.py +9 -9
- adcp/types/generated_poc/channels.py +10 -10
- adcp/types/generated_poc/cpc_option.py +12 -8
- adcp/types/generated_poc/cpcv_option.py +12 -8
- adcp/types/generated_poc/cpm_auction_option.py +17 -13
- adcp/types/generated_poc/cpm_fixed_option.py +12 -8
- adcp/types/generated_poc/cpp_option.py +17 -13
- adcp/types/generated_poc/cpv_option.py +16 -12
- adcp/types/generated_poc/create_media_buy_request.py +30 -30
- adcp/types/generated_poc/create_media_buy_response.py +11 -11
- adcp/types/generated_poc/creative_asset.py +13 -13
- adcp/types/generated_poc/creative_assignment.py +4 -4
- adcp/types/generated_poc/creative_manifest.py +4 -4
- adcp/types/generated_poc/creative_policy.py +11 -11
- adcp/types/generated_poc/creative_status.py +5 -5
- adcp/types/generated_poc/css_asset.py +3 -3
- adcp/types/generated_poc/daast_asset.py +30 -30
- adcp/types/generated_poc/delivery_metrics.py +33 -33
- adcp/types/generated_poc/delivery_type.py +3 -3
- adcp/types/generated_poc/deployment.py +21 -21
- adcp/types/generated_poc/destination.py +10 -10
- adcp/types/generated_poc/error.py +7 -7
- adcp/types/generated_poc/flat_rate_option.py +16 -16
- adcp/types/generated_poc/format.py +70 -70
- adcp/types/generated_poc/format_id.py +3 -3
- adcp/types/generated_poc/frequency_cap.py +3 -3
- adcp/types/generated_poc/frequency_cap_scope.py +4 -4
- adcp/types/generated_poc/get_media_buy_delivery_request.py +21 -21
- adcp/types/generated_poc/get_media_buy_delivery_response.py +46 -46
- adcp/types/generated_poc/get_products_request.py +24 -24
- adcp/types/generated_poc/get_products_response.py +5 -5
- adcp/types/generated_poc/get_signals_request.py +19 -19
- adcp/types/generated_poc/get_signals_response.py +20 -20
- adcp/types/generated_poc/html_asset.py +3 -3
- adcp/types/generated_poc/identifier_types.py +20 -20
- adcp/types/generated_poc/image_asset.py +7 -7
- adcp/types/generated_poc/javascript_asset.py +7 -7
- adcp/types/generated_poc/list_authorized_properties_request.py +5 -5
- adcp/types/generated_poc/list_authorized_properties_response.py +9 -9
- adcp/types/generated_poc/list_creative_formats_request.py +22 -22
- adcp/types/generated_poc/list_creative_formats_response.py +11 -11
- adcp/types/generated_poc/list_creatives_request.py +51 -51
- adcp/types/generated_poc/list_creatives_response.py +57 -72
- adcp/types/generated_poc/markdown_asset.py +7 -7
- adcp/types/generated_poc/measurement.py +9 -9
- adcp/types/generated_poc/media_buy.py +8 -8
- adcp/types/generated_poc/media_buy_status.py +5 -5
- adcp/types/generated_poc/pacing.py +4 -4
- adcp/types/generated_poc/package.py +8 -8
- adcp/types/generated_poc/package_request.py +7 -7
- adcp/types/generated_poc/package_status.py +5 -5
- adcp/types/generated_poc/performance_feedback.py +31 -31
- adcp/types/generated_poc/placement.py +4 -4
- adcp/types/generated_poc/preview_creative_request.py +28 -28
- adcp/types/generated_poc/preview_creative_response.py +31 -31
- adcp/types/generated_poc/preview_render.py +36 -28
- adcp/types/generated_poc/pricing_model.py +8 -8
- adcp/types/generated_poc/product.py +53 -43
- adcp/types/generated_poc/promoted_offerings.py +30 -30
- adcp/types/generated_poc/promoted_products.py +3 -3
- adcp/types/generated_poc/property.py +18 -18
- adcp/types/generated_poc/protocol_envelope.py +9 -9
- adcp/types/generated_poc/provide_performance_feedback_request.py +24 -24
- adcp/types/generated_poc/provide_performance_feedback_response.py +9 -9
- adcp/types/generated_poc/publisher_identifier_types.py +6 -6
- adcp/types/generated_poc/push_notification_config.py +9 -9
- adcp/types/generated_poc/reporting_capabilities.py +21 -21
- adcp/types/generated_poc/response.py +5 -5
- adcp/types/generated_poc/standard_format_ids.py +36 -36
- adcp/types/generated_poc/sub_asset.py +13 -13
- adcp/types/generated_poc/sync_creatives_request.py +11 -11
- adcp/types/generated_poc/sync_creatives_response.py +23 -23
- adcp/types/generated_poc/targeting.py +9 -9
- adcp/types/generated_poc/task_status.py +10 -10
- adcp/types/generated_poc/task_type.py +6 -6
- adcp/types/generated_poc/tasks_get_request.py +5 -5
- adcp/types/generated_poc/tasks_get_response.py +35 -35
- adcp/types/generated_poc/tasks_list_request.py +36 -36
- adcp/types/generated_poc/tasks_list_response.py +35 -35
- adcp/types/generated_poc/text_asset.py +3 -3
- adcp/types/generated_poc/update_media_buy_request.py +27 -27
- adcp/types/generated_poc/update_media_buy_response.py +11 -11
- adcp/types/generated_poc/url_asset.py +7 -7
- adcp/types/generated_poc/vast_asset.py +38 -38
- adcp/types/generated_poc/vcpm_auction_option.py +17 -13
- adcp/types/generated_poc/vcpm_fixed_option.py +12 -8
- adcp/types/generated_poc/video_asset.py +8 -8
- adcp/types/generated_poc/webhook_asset.py +19 -19
- adcp/types/generated_poc/webhook_payload.py +18 -18
- adcp/types/stable.py +175 -0
- adcp/utils/preview_cache.py +6 -6
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/METADATA +29 -4
- adcp-2.4.1.dist-info/RECORD +129 -0
- adcp/types/generated.py +0 -614
- adcp/types/generated_poc/brand_manifest_ref.py +0 -361
- adcp/types/generated_poc/index.py +0 -17
- adcp/types/generated_poc/pricing_option.py +0 -365
- adcp/types/generated_poc/start_timing.py +0 -13
- adcp-2.3.0.dist-info/RECORD +0 -132
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/WHEEL +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/entry_points.txt +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: list-creatives-response.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T04:34:42+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ from enum import Enum
|
|
|
8
8
|
from typing import Annotated, Any
|
|
9
9
|
|
|
10
10
|
from adcp.types.base import AdCPBaseModel
|
|
11
|
-
from pydantic import
|
|
11
|
+
from pydantic import AwareDatetime, ConfigDict, Field
|
|
12
12
|
|
|
13
13
|
from . import audio_asset, creative_status, css_asset, daast_asset
|
|
14
14
|
from . import format_id as format_id_1
|
|
@@ -26,76 +26,76 @@ from . import (
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class Status(Enum):
|
|
29
|
-
active =
|
|
30
|
-
paused =
|
|
31
|
-
ended =
|
|
29
|
+
active = 'active'
|
|
30
|
+
paused = 'paused'
|
|
31
|
+
ended = 'ended'
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class AssignedPackage(AdCPBaseModel):
|
|
35
35
|
model_config = ConfigDict(
|
|
36
|
-
extra=
|
|
36
|
+
extra='forbid',
|
|
37
37
|
)
|
|
38
|
-
assigned_date: Annotated[AwareDatetime, Field(description=
|
|
39
|
-
package_id: Annotated[str, Field(description=
|
|
40
|
-
package_name: Annotated[str | None, Field(description=
|
|
41
|
-
status: Annotated[Status, Field(description=
|
|
38
|
+
assigned_date: Annotated[AwareDatetime, Field(description='When this assignment was created')]
|
|
39
|
+
package_id: Annotated[str, Field(description='Package identifier')]
|
|
40
|
+
package_name: Annotated[str | None, Field(description='Human-readable package name')] = None
|
|
41
|
+
status: Annotated[Status, Field(description='Status of this specific assignment')]
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class Assignments(AdCPBaseModel):
|
|
45
45
|
model_config = ConfigDict(
|
|
46
|
-
extra=
|
|
46
|
+
extra='forbid',
|
|
47
47
|
)
|
|
48
48
|
assigned_packages: Annotated[
|
|
49
49
|
list[AssignedPackage] | None,
|
|
50
|
-
Field(description=
|
|
50
|
+
Field(description='List of packages this creative is assigned to'),
|
|
51
51
|
] = None
|
|
52
52
|
assignment_count: Annotated[
|
|
53
|
-
int, Field(description=
|
|
53
|
+
int, Field(description='Total number of active package assignments', ge=0)
|
|
54
54
|
]
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
class Performance(AdCPBaseModel):
|
|
58
58
|
model_config = ConfigDict(
|
|
59
|
-
extra=
|
|
59
|
+
extra='forbid',
|
|
60
60
|
)
|
|
61
61
|
clicks: Annotated[
|
|
62
|
-
int | None, Field(description=
|
|
62
|
+
int | None, Field(description='Total clicks across all assignments', ge=0)
|
|
63
63
|
] = None
|
|
64
64
|
conversion_rate: Annotated[
|
|
65
|
-
float | None, Field(description=
|
|
65
|
+
float | None, Field(description='Conversion rate across all assignments', ge=0.0, le=1.0)
|
|
66
66
|
] = None
|
|
67
67
|
ctr: Annotated[
|
|
68
|
-
float | None, Field(description=
|
|
68
|
+
float | None, Field(description='Click-through rate (clicks/impressions)', ge=0.0, le=1.0)
|
|
69
69
|
] = None
|
|
70
70
|
impressions: Annotated[
|
|
71
|
-
int | None, Field(description=
|
|
71
|
+
int | None, Field(description='Total impressions across all assignments', ge=0)
|
|
72
72
|
] = None
|
|
73
73
|
last_updated: Annotated[
|
|
74
|
-
AwareDatetime, Field(description=
|
|
74
|
+
AwareDatetime, Field(description='When performance data was last updated')
|
|
75
75
|
]
|
|
76
76
|
performance_score: Annotated[
|
|
77
|
-
float | None, Field(description=
|
|
77
|
+
float | None, Field(description='Aggregated performance score (0-100)', ge=0.0, le=100.0)
|
|
78
78
|
] = None
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
class Pagination(AdCPBaseModel):
|
|
82
82
|
model_config = ConfigDict(
|
|
83
|
-
extra=
|
|
83
|
+
extra='forbid',
|
|
84
84
|
)
|
|
85
85
|
current_page: Annotated[
|
|
86
|
-
int | None, Field(description=
|
|
86
|
+
int | None, Field(description='Current page number (1-based)', ge=1)
|
|
87
87
|
] = None
|
|
88
|
-
has_more: Annotated[bool, Field(description=
|
|
89
|
-
limit: Annotated[int, Field(description=
|
|
90
|
-
offset: Annotated[int, Field(description=
|
|
88
|
+
has_more: Annotated[bool, Field(description='Whether more results are available')]
|
|
89
|
+
limit: Annotated[int, Field(description='Maximum number of results requested', ge=1)]
|
|
90
|
+
offset: Annotated[int, Field(description='Number of results skipped', ge=0)]
|
|
91
91
|
total_pages: Annotated[
|
|
92
|
-
int | None, Field(description=
|
|
92
|
+
int | None, Field(description='Total number of pages available', ge=0)
|
|
93
93
|
] = None
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
class Direction(Enum):
|
|
97
|
-
asc =
|
|
98
|
-
desc =
|
|
97
|
+
asc = 'asc'
|
|
98
|
+
desc = 'desc'
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
class SortApplied(AdCPBaseModel):
|
|
@@ -105,38 +105,38 @@ class SortApplied(AdCPBaseModel):
|
|
|
105
105
|
|
|
106
106
|
class QuerySummary(AdCPBaseModel):
|
|
107
107
|
model_config = ConfigDict(
|
|
108
|
-
extra=
|
|
108
|
+
extra='forbid',
|
|
109
109
|
)
|
|
110
110
|
filters_applied: Annotated[
|
|
111
|
-
list[str] | None, Field(description=
|
|
111
|
+
list[str] | None, Field(description='List of filters that were applied to the query')
|
|
112
112
|
] = None
|
|
113
113
|
returned: Annotated[
|
|
114
|
-
int, Field(description=
|
|
114
|
+
int, Field(description='Number of creatives returned in this response', ge=0)
|
|
115
115
|
]
|
|
116
116
|
sort_applied: Annotated[
|
|
117
|
-
SortApplied | None, Field(description=
|
|
117
|
+
SortApplied | None, Field(description='Sort order that was applied')
|
|
118
118
|
] = None
|
|
119
119
|
total_matching: Annotated[
|
|
120
120
|
int,
|
|
121
|
-
Field(description=
|
|
121
|
+
Field(description='Total number of creatives matching filters (across all pages)', ge=0),
|
|
122
122
|
]
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
class StatusSummary(AdCPBaseModel):
|
|
126
126
|
model_config = ConfigDict(
|
|
127
|
-
extra=
|
|
127
|
+
extra='forbid',
|
|
128
128
|
)
|
|
129
|
-
approved: Annotated[int | None, Field(description=
|
|
130
|
-
archived: Annotated[int | None, Field(description=
|
|
129
|
+
approved: Annotated[int | None, Field(description='Number of approved creatives', ge=0)] = None
|
|
130
|
+
archived: Annotated[int | None, Field(description='Number of archived creatives', ge=0)] = None
|
|
131
131
|
pending_review: Annotated[
|
|
132
|
-
int | None, Field(description=
|
|
132
|
+
int | None, Field(description='Number of creatives pending review', ge=0)
|
|
133
133
|
] = None
|
|
134
|
-
rejected: Annotated[int | None, Field(description=
|
|
134
|
+
rejected: Annotated[int | None, Field(description='Number of rejected creatives', ge=0)] = None
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
class Creative(AdCPBaseModel):
|
|
138
138
|
model_config = ConfigDict(
|
|
139
|
-
extra=
|
|
139
|
+
extra='forbid',
|
|
140
140
|
)
|
|
141
141
|
assets: Annotated[
|
|
142
142
|
dict[
|
|
@@ -156,79 +156,64 @@ class Creative(AdCPBaseModel):
|
|
|
156
156
|
| daast_asset.DaastAsset2,
|
|
157
157
|
]
|
|
158
158
|
| None,
|
|
159
|
-
Field(description=
|
|
159
|
+
Field(description='Assets for this creative, keyed by asset_role'),
|
|
160
160
|
] = None
|
|
161
161
|
assignments: Annotated[
|
|
162
162
|
Assignments | None,
|
|
163
|
-
Field(description=
|
|
163
|
+
Field(description='Current package assignments (included when include_assignments=true)'),
|
|
164
164
|
] = None
|
|
165
|
-
click_url: Annotated[AnyUrl | None, Field(description="Landing page URL for the creative")] = (
|
|
166
|
-
None
|
|
167
|
-
)
|
|
168
165
|
created_date: Annotated[
|
|
169
|
-
AwareDatetime, Field(description=
|
|
166
|
+
AwareDatetime, Field(description='When the creative was uploaded to the library')
|
|
170
167
|
]
|
|
171
|
-
creative_id: Annotated[str, Field(description=
|
|
172
|
-
duration: Annotated[
|
|
173
|
-
float | None, Field(description="Duration in milliseconds (for video/audio)", ge=0.0)
|
|
174
|
-
] = None
|
|
168
|
+
creative_id: Annotated[str, Field(description='Unique identifier for the creative')]
|
|
175
169
|
format_id: Annotated[
|
|
176
170
|
format_id_1.FormatId,
|
|
177
|
-
Field(description=
|
|
171
|
+
Field(description='Format identifier specifying which format this creative conforms to'),
|
|
178
172
|
]
|
|
179
|
-
|
|
180
|
-
float | None, Field(description="Height in pixels (for video/display)", ge=0.0)
|
|
181
|
-
] = None
|
|
182
|
-
media_url: Annotated[
|
|
183
|
-
AnyUrl | None, Field(description="URL of the creative file (for hosted assets)")
|
|
184
|
-
] = None
|
|
185
|
-
name: Annotated[str, Field(description="Human-readable creative name")]
|
|
173
|
+
name: Annotated[str, Field(description='Human-readable creative name')]
|
|
186
174
|
performance: Annotated[
|
|
187
175
|
Performance | None,
|
|
188
176
|
Field(
|
|
189
|
-
description=
|
|
177
|
+
description='Aggregated performance metrics (included when include_performance=true)'
|
|
190
178
|
),
|
|
191
179
|
] = None
|
|
192
180
|
status: Annotated[
|
|
193
|
-
creative_status.CreativeStatus, Field(description=
|
|
181
|
+
creative_status.CreativeStatus, Field(description='Current approval status of the creative')
|
|
194
182
|
]
|
|
195
183
|
sub_assets: Annotated[
|
|
196
184
|
list[sub_asset.SubAsset1 | sub_asset.SubAsset2] | None,
|
|
197
185
|
Field(
|
|
198
|
-
description=
|
|
186
|
+
description='Sub-assets for multi-asset formats (included when include_sub_assets=true)'
|
|
199
187
|
),
|
|
200
188
|
] = None
|
|
201
189
|
tags: Annotated[
|
|
202
|
-
list[str] | None, Field(description=
|
|
203
|
-
] = None
|
|
204
|
-
updated_date: Annotated[AwareDatetime, Field(description="When the creative was last modified")]
|
|
205
|
-
width: Annotated[
|
|
206
|
-
float | None, Field(description="Width in pixels (for video/display)", ge=0.0)
|
|
190
|
+
list[str] | None, Field(description='User-defined tags for organization and searchability')
|
|
207
191
|
] = None
|
|
192
|
+
updated_date: Annotated[AwareDatetime, Field(description='When the creative was last modified')]
|
|
208
193
|
|
|
209
194
|
|
|
210
195
|
class ListCreativesResponse(AdCPBaseModel):
|
|
211
196
|
model_config = ConfigDict(
|
|
212
|
-
extra=
|
|
197
|
+
extra='forbid',
|
|
213
198
|
)
|
|
214
199
|
context: Annotated[
|
|
215
200
|
dict[str, Any] | None,
|
|
216
201
|
Field(
|
|
217
|
-
description=
|
|
202
|
+
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
218
203
|
),
|
|
219
204
|
] = None
|
|
220
205
|
creatives: Annotated[
|
|
221
|
-
list[Creative], Field(description=
|
|
206
|
+
list[Creative], Field(description='Array of creative assets matching the query')
|
|
222
207
|
]
|
|
223
208
|
format_summary: Annotated[
|
|
224
|
-
dict[str, int] | None, Field(description=
|
|
209
|
+
dict[str, int] | None, Field(description='Breakdown of creatives by format type')
|
|
225
210
|
] = None
|
|
226
211
|
pagination: Annotated[
|
|
227
|
-
Pagination, Field(description=
|
|
212
|
+
Pagination, Field(description='Pagination information for navigating results')
|
|
228
213
|
]
|
|
229
214
|
query_summary: Annotated[
|
|
230
|
-
QuerySummary, Field(description=
|
|
215
|
+
QuerySummary, Field(description='Summary of the query that was executed')
|
|
231
216
|
]
|
|
232
217
|
status_summary: Annotated[
|
|
233
|
-
StatusSummary | None, Field(description=
|
|
218
|
+
StatusSummary | None, Field(description='Breakdown of creatives by status')
|
|
234
219
|
] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: markdown-asset.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -12,24 +12,24 @@ from pydantic import ConfigDict, Field
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class MarkdownFlavor(Enum):
|
|
15
|
-
commonmark =
|
|
16
|
-
gfm =
|
|
15
|
+
commonmark = 'commonmark'
|
|
16
|
+
gfm = 'gfm'
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class MarkdownAsset(AdCPBaseModel):
|
|
20
20
|
model_config = ConfigDict(
|
|
21
|
-
extra=
|
|
21
|
+
extra='forbid',
|
|
22
22
|
)
|
|
23
23
|
allow_raw_html: Annotated[
|
|
24
24
|
bool | None,
|
|
25
25
|
Field(
|
|
26
|
-
description=
|
|
26
|
+
description='Whether raw HTML blocks are allowed in the markdown. False recommended for security.'
|
|
27
27
|
),
|
|
28
28
|
] = False
|
|
29
29
|
content: Annotated[
|
|
30
30
|
str,
|
|
31
31
|
Field(
|
|
32
|
-
description=
|
|
32
|
+
description='Markdown content following CommonMark spec with optional GitHub Flavored Markdown extensions'
|
|
33
33
|
),
|
|
34
34
|
]
|
|
35
35
|
language: Annotated[str | None, Field(description="Language code (e.g., 'en', 'es', 'fr')")] = (
|
|
@@ -38,6 +38,6 @@ class MarkdownAsset(AdCPBaseModel):
|
|
|
38
38
|
markdown_flavor: Annotated[
|
|
39
39
|
MarkdownFlavor | None,
|
|
40
40
|
Field(
|
|
41
|
-
description=
|
|
41
|
+
description='Markdown flavor used. CommonMark for strict compatibility, GFM for tables/task lists/strikethrough.'
|
|
42
42
|
),
|
|
43
43
|
] = MarkdownFlavor.commonmark
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: measurement.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -12,29 +12,29 @@ from pydantic import ConfigDict, Field
|
|
|
12
12
|
|
|
13
13
|
class Measurement(AdCPBaseModel):
|
|
14
14
|
model_config = ConfigDict(
|
|
15
|
-
extra=
|
|
15
|
+
extra='forbid',
|
|
16
16
|
)
|
|
17
17
|
attribution: Annotated[
|
|
18
18
|
str,
|
|
19
19
|
Field(
|
|
20
|
-
description=
|
|
21
|
-
examples=[
|
|
20
|
+
description='Attribution methodology',
|
|
21
|
+
examples=['deterministic_purchase', 'probabilistic'],
|
|
22
22
|
),
|
|
23
23
|
]
|
|
24
24
|
reporting: Annotated[
|
|
25
25
|
str,
|
|
26
26
|
Field(
|
|
27
|
-
description=
|
|
28
|
-
examples=[
|
|
27
|
+
description='Reporting frequency and format',
|
|
28
|
+
examples=['weekly_dashboard', 'real_time_api'],
|
|
29
29
|
),
|
|
30
30
|
]
|
|
31
31
|
type: Annotated[
|
|
32
32
|
str,
|
|
33
33
|
Field(
|
|
34
|
-
description=
|
|
35
|
-
examples=[
|
|
34
|
+
description='Type of measurement',
|
|
35
|
+
examples=['incremental_sales_lift', 'brand_lift', 'foot_traffic'],
|
|
36
36
|
),
|
|
37
37
|
]
|
|
38
38
|
window: Annotated[
|
|
39
|
-
str | None, Field(description=
|
|
39
|
+
str | None, Field(description='Attribution window', examples=['30_days', '7_days'])
|
|
40
40
|
] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media-buy.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -14,24 +14,24 @@ from . import media_buy_status, package
|
|
|
14
14
|
|
|
15
15
|
class MediaBuy(AdCPBaseModel):
|
|
16
16
|
model_config = ConfigDict(
|
|
17
|
-
extra=
|
|
17
|
+
extra='forbid',
|
|
18
18
|
)
|
|
19
19
|
buyer_ref: Annotated[
|
|
20
20
|
str | None, Field(description="Buyer's reference identifier for this media buy")
|
|
21
21
|
] = None
|
|
22
|
-
created_at: Annotated[AwareDatetime | None, Field(description=
|
|
22
|
+
created_at: Annotated[AwareDatetime | None, Field(description='Creation timestamp')] = None
|
|
23
23
|
creative_deadline: Annotated[
|
|
24
|
-
AwareDatetime | None, Field(description=
|
|
24
|
+
AwareDatetime | None, Field(description='ISO 8601 timestamp for creative upload deadline')
|
|
25
25
|
] = None
|
|
26
26
|
media_buy_id: Annotated[
|
|
27
27
|
str, Field(description="Publisher's unique identifier for the media buy")
|
|
28
28
|
]
|
|
29
29
|
packages: Annotated[
|
|
30
|
-
list[package.Package], Field(description=
|
|
30
|
+
list[package.Package], Field(description='Array of packages within this media buy')
|
|
31
31
|
]
|
|
32
32
|
promoted_offering: Annotated[
|
|
33
|
-
str, Field(description=
|
|
33
|
+
str, Field(description='Description of advertiser and what is being promoted')
|
|
34
34
|
]
|
|
35
35
|
status: media_buy_status.MediaBuyStatus
|
|
36
|
-
total_budget: Annotated[float, Field(description=
|
|
37
|
-
updated_at: Annotated[AwareDatetime | None, Field(description=
|
|
36
|
+
total_budget: Annotated[float, Field(description='Total budget amount', ge=0.0)]
|
|
37
|
+
updated_at: Annotated[AwareDatetime | None, Field(description='Last update timestamp')] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media-buy-status.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ from enum import Enum
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class MediaBuyStatus(Enum):
|
|
11
|
-
pending_activation =
|
|
12
|
-
active =
|
|
13
|
-
paused =
|
|
14
|
-
completed =
|
|
11
|
+
pending_activation = 'pending_activation'
|
|
12
|
+
active = 'active'
|
|
13
|
+
paused = 'paused'
|
|
14
|
+
completed = 'completed'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: pacing.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,6 +8,6 @@ from enum import Enum
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class Pacing(Enum):
|
|
11
|
-
even =
|
|
12
|
-
asap =
|
|
13
|
-
front_loaded =
|
|
11
|
+
even = 'even'
|
|
12
|
+
asap = 'asap'
|
|
13
|
+
front_loaded = 'front_loaded'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: package.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -16,19 +16,19 @@ from . import package_status, targeting
|
|
|
16
16
|
|
|
17
17
|
class Package(AdCPBaseModel):
|
|
18
18
|
model_config = ConfigDict(
|
|
19
|
-
extra=
|
|
19
|
+
extra='forbid',
|
|
20
20
|
)
|
|
21
21
|
bid_price: Annotated[
|
|
22
22
|
float | None,
|
|
23
23
|
Field(
|
|
24
|
-
description=
|
|
24
|
+
description='Bid price for auction-based CPM pricing (present if using cpm-auction-option)',
|
|
25
25
|
ge=0.0,
|
|
26
26
|
),
|
|
27
27
|
] = None
|
|
28
28
|
budget: Annotated[
|
|
29
29
|
float | None,
|
|
30
30
|
Field(
|
|
31
|
-
description=
|
|
31
|
+
description='Budget allocation for this package in the currency specified by the pricing option',
|
|
32
32
|
ge=0.0,
|
|
33
33
|
),
|
|
34
34
|
] = None
|
|
@@ -37,14 +37,14 @@ class Package(AdCPBaseModel):
|
|
|
37
37
|
] = None
|
|
38
38
|
creative_assignments: Annotated[
|
|
39
39
|
list[creative_assignment.CreativeAssignment] | None,
|
|
40
|
-
Field(description=
|
|
40
|
+
Field(description='Creative assets assigned to this package'),
|
|
41
41
|
] = None
|
|
42
42
|
format_ids_to_provide: Annotated[
|
|
43
43
|
list[format_id.FormatId] | None,
|
|
44
|
-
Field(description=
|
|
44
|
+
Field(description='Format IDs that creative assets will be provided for this package'),
|
|
45
45
|
] = None
|
|
46
46
|
impressions: Annotated[
|
|
47
|
-
float | None, Field(description=
|
|
47
|
+
float | None, Field(description='Impression goal for this package', ge=0.0)
|
|
48
48
|
] = None
|
|
49
49
|
pacing: pacing_1.Pacing | None = None
|
|
50
50
|
package_id: Annotated[str, Field(description="Publisher's unique identifier for the package")]
|
|
@@ -55,7 +55,7 @@ class Package(AdCPBaseModel):
|
|
|
55
55
|
),
|
|
56
56
|
] = None
|
|
57
57
|
product_id: Annotated[
|
|
58
|
-
str | None, Field(description=
|
|
58
|
+
str | None, Field(description='ID of the product this package is based on')
|
|
59
59
|
] = None
|
|
60
60
|
status: package_status.PackageStatus
|
|
61
61
|
targeting_overlay: targeting.TargetingOverlay | None = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: package-request.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -16,12 +16,12 @@ from . import targeting
|
|
|
16
16
|
|
|
17
17
|
class PackageRequest(AdCPBaseModel):
|
|
18
18
|
model_config = ConfigDict(
|
|
19
|
-
extra=
|
|
19
|
+
extra='forbid',
|
|
20
20
|
)
|
|
21
21
|
bid_price: Annotated[
|
|
22
22
|
float | None,
|
|
23
23
|
Field(
|
|
24
|
-
description=
|
|
24
|
+
description='Bid price for auction-based CPM pricing (required if using cpm-auction-option)',
|
|
25
25
|
ge=0.0,
|
|
26
26
|
),
|
|
27
27
|
] = None
|
|
@@ -33,20 +33,20 @@ class PackageRequest(AdCPBaseModel):
|
|
|
33
33
|
creative_ids: Annotated[
|
|
34
34
|
list[str] | None,
|
|
35
35
|
Field(
|
|
36
|
-
description=
|
|
36
|
+
description='Creative IDs to assign to this package at creation time (references existing library creatives)'
|
|
37
37
|
),
|
|
38
38
|
] = None
|
|
39
39
|
creatives: Annotated[
|
|
40
40
|
list[creative_asset.CreativeAsset] | None,
|
|
41
41
|
Field(
|
|
42
|
-
description=
|
|
42
|
+
description='Full creative objects to upload and assign to this package at creation time (alternative to creative_ids - creatives will be added to library). Supports both static and generative creatives.',
|
|
43
43
|
max_length=100,
|
|
44
44
|
),
|
|
45
45
|
] = None
|
|
46
46
|
format_ids: Annotated[
|
|
47
47
|
list[format_id.FormatId] | None,
|
|
48
48
|
Field(
|
|
49
|
-
description=
|
|
49
|
+
description='Array of format IDs that will be used for this package - must be supported by the product. If omitted, defaults to all formats supported by the product.',
|
|
50
50
|
min_length=1,
|
|
51
51
|
),
|
|
52
52
|
] = None
|
|
@@ -57,5 +57,5 @@ class PackageRequest(AdCPBaseModel):
|
|
|
57
57
|
description="ID of the selected pricing option from the product's pricing_options array"
|
|
58
58
|
),
|
|
59
59
|
]
|
|
60
|
-
product_id: Annotated[str, Field(description=
|
|
60
|
+
product_id: Annotated[str, Field(description='Product ID for this package')]
|
|
61
61
|
targeting_overlay: targeting.TargetingOverlay | None = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: package-status.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:35:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ from enum import Enum
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class PackageStatus(Enum):
|
|
11
|
-
draft =
|
|
12
|
-
active =
|
|
13
|
-
paused =
|
|
14
|
-
completed =
|
|
11
|
+
draft = 'draft'
|
|
12
|
+
active = 'active'
|
|
13
|
+
paused = 'paused'
|
|
14
|
+
completed = 'completed'
|