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