adcp 1.6.1__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.
- adcp/__init__.py +19 -221
- adcp/adagents.py +11 -12
- adcp/client.py +16 -11
- 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.0.0.dist-info}/METADATA +3 -1
- adcp-2.0.0.dist-info/RECORD +130 -0
- adcp/types/tasks.py +0 -511
- adcp-1.6.1.dist-info/RECORD +0 -28
- {adcp-1.6.1.dist-info → adcp-2.0.0.dist-info}/WHEEL +0 -0
- {adcp-1.6.1.dist-info → adcp-2.0.0.dist-info}/entry_points.txt +0 -0
- {adcp-1.6.1.dist-info → adcp-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-1.6.1.dist-info → adcp-2.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: update-media-buy-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 AwareDatetime, ConfigDict, Field, RootModel
|
|
11
|
+
|
|
12
|
+
from . import pacing as pacing_1
|
|
13
|
+
from . import push_notification_config as push_notification_config_1
|
|
14
|
+
from . import targeting
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Packages(AdCPBaseModel):
|
|
18
|
+
model_config = ConfigDict(
|
|
19
|
+
extra="forbid",
|
|
20
|
+
)
|
|
21
|
+
active: Annotated[bool | None, Field(description="Pause/resume specific package")] = None
|
|
22
|
+
bid_price: Annotated[
|
|
23
|
+
float | None,
|
|
24
|
+
Field(
|
|
25
|
+
description="Updated bid price for auction-based pricing options (only applies when pricing_option is auction-based)",
|
|
26
|
+
ge=0.0,
|
|
27
|
+
),
|
|
28
|
+
] = None
|
|
29
|
+
budget: Annotated[
|
|
30
|
+
float | None,
|
|
31
|
+
Field(
|
|
32
|
+
description="Updated budget allocation for this package in the currency specified by the pricing option",
|
|
33
|
+
ge=0.0,
|
|
34
|
+
),
|
|
35
|
+
] = None
|
|
36
|
+
buyer_ref: Annotated[
|
|
37
|
+
str | None, Field(description="Buyer's reference for the package to update")
|
|
38
|
+
] = None
|
|
39
|
+
creative_ids: Annotated[list[str] | None, Field(description="Update creative assignments")] = (
|
|
40
|
+
None
|
|
41
|
+
)
|
|
42
|
+
pacing: pacing_1.Pacing | None = None
|
|
43
|
+
package_id: Annotated[str, Field(description="Publisher's ID of package to update")]
|
|
44
|
+
targeting_overlay: targeting.TargetingOverlay | None = None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Packages1(AdCPBaseModel):
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
extra="forbid",
|
|
50
|
+
)
|
|
51
|
+
active: Annotated[bool | None, Field(description="Pause/resume specific package")] = None
|
|
52
|
+
bid_price: Annotated[
|
|
53
|
+
float | None,
|
|
54
|
+
Field(
|
|
55
|
+
description="Updated bid price for auction-based pricing options (only applies when pricing_option is auction-based)",
|
|
56
|
+
ge=0.0,
|
|
57
|
+
),
|
|
58
|
+
] = None
|
|
59
|
+
budget: Annotated[
|
|
60
|
+
float | None,
|
|
61
|
+
Field(
|
|
62
|
+
description="Updated budget allocation for this package in the currency specified by the pricing option",
|
|
63
|
+
ge=0.0,
|
|
64
|
+
),
|
|
65
|
+
] = None
|
|
66
|
+
buyer_ref: Annotated[str, Field(description="Buyer's reference for the package to update")]
|
|
67
|
+
creative_ids: Annotated[list[str] | None, Field(description="Update creative assignments")] = (
|
|
68
|
+
None
|
|
69
|
+
)
|
|
70
|
+
pacing: pacing_1.Pacing | None = None
|
|
71
|
+
package_id: Annotated[str | None, Field(description="Publisher's ID of package to update")] = (
|
|
72
|
+
None
|
|
73
|
+
)
|
|
74
|
+
targeting_overlay: targeting.TargetingOverlay | None = None
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class UpdateMediaBuyRequest1(AdCPBaseModel):
|
|
78
|
+
model_config = ConfigDict(
|
|
79
|
+
extra="forbid",
|
|
80
|
+
)
|
|
81
|
+
active: Annotated[bool | None, Field(description="Pause/resume the entire media buy")] = None
|
|
82
|
+
buyer_ref: Annotated[
|
|
83
|
+
str | None, Field(description="Buyer's reference for the media buy to update")
|
|
84
|
+
] = None
|
|
85
|
+
context: Annotated[
|
|
86
|
+
dict[str, Any] | None,
|
|
87
|
+
Field(
|
|
88
|
+
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."
|
|
89
|
+
),
|
|
90
|
+
] = None
|
|
91
|
+
end_time: Annotated[
|
|
92
|
+
AwareDatetime | None, Field(description="New end date/time in ISO 8601 format")
|
|
93
|
+
] = None
|
|
94
|
+
media_buy_id: Annotated[str, Field(description="Publisher's ID of the media buy to update")]
|
|
95
|
+
packages: Annotated[
|
|
96
|
+
list[Packages | Packages1] | None, Field(description="Package-specific updates")
|
|
97
|
+
] = None
|
|
98
|
+
push_notification_config: Annotated[
|
|
99
|
+
push_notification_config_1.PushNotificationConfig | None,
|
|
100
|
+
Field(
|
|
101
|
+
description="Optional webhook configuration for async update notifications. Publisher will send webhook when update completes if operation takes longer than immediate response time."
|
|
102
|
+
),
|
|
103
|
+
] = None
|
|
104
|
+
start_time: Annotated[
|
|
105
|
+
str | AwareDatetime | None,
|
|
106
|
+
Field(
|
|
107
|
+
description="Campaign start timing: 'asap' or ISO 8601 date-time", title="Start Timing"
|
|
108
|
+
),
|
|
109
|
+
] = None
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
Packages2 = Packages
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
Packages3 = Packages1
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class UpdateMediaBuyRequest2(AdCPBaseModel):
|
|
119
|
+
model_config = ConfigDict(
|
|
120
|
+
extra="forbid",
|
|
121
|
+
)
|
|
122
|
+
active: Annotated[bool | None, Field(description="Pause/resume the entire media buy")] = None
|
|
123
|
+
buyer_ref: Annotated[str, Field(description="Buyer's reference for the media buy to update")]
|
|
124
|
+
context: Annotated[
|
|
125
|
+
dict[str, Any] | None,
|
|
126
|
+
Field(
|
|
127
|
+
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."
|
|
128
|
+
),
|
|
129
|
+
] = None
|
|
130
|
+
end_time: Annotated[
|
|
131
|
+
AwareDatetime | None, Field(description="New end date/time in ISO 8601 format")
|
|
132
|
+
] = None
|
|
133
|
+
media_buy_id: Annotated[
|
|
134
|
+
str | None, Field(description="Publisher's ID of the media buy to update")
|
|
135
|
+
] = None
|
|
136
|
+
packages: Annotated[
|
|
137
|
+
list[Packages2 | Packages3] | None, Field(description="Package-specific updates")
|
|
138
|
+
] = None
|
|
139
|
+
push_notification_config: Annotated[
|
|
140
|
+
push_notification_config_1.PushNotificationConfig | None,
|
|
141
|
+
Field(
|
|
142
|
+
description="Optional webhook configuration for async update notifications. Publisher will send webhook when update completes if operation takes longer than immediate response time."
|
|
143
|
+
),
|
|
144
|
+
] = None
|
|
145
|
+
start_time: Annotated[
|
|
146
|
+
str | AwareDatetime | None,
|
|
147
|
+
Field(
|
|
148
|
+
description="Campaign start timing: 'asap' or ISO 8601 date-time", title="Start Timing"
|
|
149
|
+
),
|
|
150
|
+
] = None
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class UpdateMediaBuyRequest(RootModel[UpdateMediaBuyRequest1 | UpdateMediaBuyRequest2]):
|
|
154
|
+
root: Annotated[
|
|
155
|
+
UpdateMediaBuyRequest1 | UpdateMediaBuyRequest2,
|
|
156
|
+
Field(
|
|
157
|
+
description="Request parameters for updating campaign and package settings",
|
|
158
|
+
title="Update Media Buy Request",
|
|
159
|
+
),
|
|
160
|
+
]
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: update-media-buy-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 AwareDatetime, ConfigDict, Field, RootModel
|
|
11
|
+
|
|
12
|
+
from . import error
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class AffectedPackage(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra="forbid",
|
|
18
|
+
)
|
|
19
|
+
buyer_ref: Annotated[str, Field(description="Buyer's reference for the package")]
|
|
20
|
+
package_id: Annotated[str, Field(description="Publisher's package identifier")]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class UpdateMediaBuyResponse1(AdCPBaseModel):
|
|
24
|
+
model_config = ConfigDict(
|
|
25
|
+
extra="forbid",
|
|
26
|
+
)
|
|
27
|
+
affected_packages: Annotated[
|
|
28
|
+
list[AffectedPackage] | None, Field(description="Array of packages that were modified")
|
|
29
|
+
] = None
|
|
30
|
+
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for the media buy")]
|
|
31
|
+
context: Annotated[
|
|
32
|
+
dict[str, Any] | None,
|
|
33
|
+
Field(
|
|
34
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
35
|
+
),
|
|
36
|
+
] = None
|
|
37
|
+
implementation_date: Annotated[
|
|
38
|
+
AwareDatetime | None,
|
|
39
|
+
Field(description="ISO 8601 timestamp when changes take effect (null if pending approval)"),
|
|
40
|
+
] = None
|
|
41
|
+
media_buy_id: Annotated[str, Field(description="Publisher's identifier for the media buy")]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class UpdateMediaBuyResponse2(AdCPBaseModel):
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
extra="forbid",
|
|
47
|
+
)
|
|
48
|
+
context: Annotated[
|
|
49
|
+
dict[str, Any] | None,
|
|
50
|
+
Field(
|
|
51
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
52
|
+
),
|
|
53
|
+
] = None
|
|
54
|
+
errors: Annotated[
|
|
55
|
+
list[error.Error],
|
|
56
|
+
Field(description="Array of errors explaining why the operation failed", min_length=1),
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class UpdateMediaBuyResponse(RootModel[UpdateMediaBuyResponse1 | UpdateMediaBuyResponse2]):
|
|
61
|
+
root: Annotated[
|
|
62
|
+
UpdateMediaBuyResponse1 | UpdateMediaBuyResponse2,
|
|
63
|
+
Field(
|
|
64
|
+
description="Response payload for update_media_buy task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - updates are either fully applied or not applied at all.",
|
|
65
|
+
title="Update Media Buy Response",
|
|
66
|
+
),
|
|
67
|
+
]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: url-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 AnyUrl, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class UrlType(Enum):
|
|
15
|
+
clickthrough = "clickthrough"
|
|
16
|
+
tracker_pixel = "tracker_pixel"
|
|
17
|
+
tracker_script = "tracker_script"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class UrlAsset(AdCPBaseModel):
|
|
21
|
+
model_config = ConfigDict(
|
|
22
|
+
extra="forbid",
|
|
23
|
+
)
|
|
24
|
+
description: Annotated[
|
|
25
|
+
str | None, Field(description="Description of what this URL points to")
|
|
26
|
+
] = None
|
|
27
|
+
url: Annotated[AnyUrl, Field(description="URL reference")]
|
|
28
|
+
url_type: Annotated[
|
|
29
|
+
UrlType | None,
|
|
30
|
+
Field(
|
|
31
|
+
description="Type of URL asset: 'clickthrough' for user click destination (landing page), 'tracker_pixel' for impression/event tracking via HTTP request (fires GET, expects pixel/204 response), 'tracker_script' for measurement SDKs that must load as <script> tag (OMID verification, native event trackers using method:2)"
|
|
32
|
+
),
|
|
33
|
+
] = None
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: vast-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, Literal
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import AnyUrl, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class TrackingEvent(Enum):
|
|
15
|
+
start = "start"
|
|
16
|
+
firstQuartile = "firstQuartile"
|
|
17
|
+
midpoint = "midpoint"
|
|
18
|
+
thirdQuartile = "thirdQuartile"
|
|
19
|
+
complete = "complete"
|
|
20
|
+
impression = "impression"
|
|
21
|
+
click = "click"
|
|
22
|
+
pause = "pause"
|
|
23
|
+
resume = "resume"
|
|
24
|
+
skip = "skip"
|
|
25
|
+
mute = "mute"
|
|
26
|
+
unmute = "unmute"
|
|
27
|
+
fullscreen = "fullscreen"
|
|
28
|
+
exitFullscreen = "exitFullscreen"
|
|
29
|
+
playerExpand = "playerExpand"
|
|
30
|
+
playerCollapse = "playerCollapse"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class VastVersion(Enum):
|
|
34
|
+
field_2_0 = "2.0"
|
|
35
|
+
field_3_0 = "3.0"
|
|
36
|
+
field_4_0 = "4.0"
|
|
37
|
+
field_4_1 = "4.1"
|
|
38
|
+
field_4_2 = "4.2"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class VastAsset1(AdCPBaseModel):
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
extra="forbid",
|
|
44
|
+
)
|
|
45
|
+
delivery_type: Annotated[
|
|
46
|
+
Literal["url"],
|
|
47
|
+
Field(description="Discriminator indicating VAST is delivered via URL endpoint"),
|
|
48
|
+
]
|
|
49
|
+
duration_ms: Annotated[
|
|
50
|
+
int | None, Field(description="Expected video duration in milliseconds (if known)", ge=0)
|
|
51
|
+
] = None
|
|
52
|
+
tracking_events: Annotated[
|
|
53
|
+
list[TrackingEvent] | None, Field(description="Tracking events supported by this VAST tag")
|
|
54
|
+
] = None
|
|
55
|
+
url: Annotated[AnyUrl, Field(description="URL endpoint that returns VAST XML")]
|
|
56
|
+
vast_version: Annotated[VastVersion | None, Field(description="VAST specification version")] = (
|
|
57
|
+
None
|
|
58
|
+
)
|
|
59
|
+
vpaid_enabled: Annotated[
|
|
60
|
+
bool | None,
|
|
61
|
+
Field(description="Whether VPAID (Video Player-Ad Interface Definition) is supported"),
|
|
62
|
+
] = None
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class VastAsset2(AdCPBaseModel):
|
|
66
|
+
model_config = ConfigDict(
|
|
67
|
+
extra="forbid",
|
|
68
|
+
)
|
|
69
|
+
content: Annotated[str, Field(description="Inline VAST XML content")]
|
|
70
|
+
delivery_type: Annotated[
|
|
71
|
+
Literal["inline"],
|
|
72
|
+
Field(description="Discriminator indicating VAST is delivered as inline XML content"),
|
|
73
|
+
]
|
|
74
|
+
duration_ms: Annotated[
|
|
75
|
+
int | None, Field(description="Expected video duration in milliseconds (if known)", ge=0)
|
|
76
|
+
] = None
|
|
77
|
+
tracking_events: Annotated[
|
|
78
|
+
list[TrackingEvent] | None, Field(description="Tracking events supported by this VAST tag")
|
|
79
|
+
] = None
|
|
80
|
+
vast_version: Annotated[VastVersion | None, Field(description="VAST specification version")] = (
|
|
81
|
+
None
|
|
82
|
+
)
|
|
83
|
+
vpaid_enabled: Annotated[
|
|
84
|
+
bool | None,
|
|
85
|
+
Field(description="Whether VPAID (Video Player-Ad Interface Definition) is supported"),
|
|
86
|
+
] = None
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: vcpm-auction-option.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 PriceGuidance(AdCPBaseModel):
|
|
14
|
+
floor: Annotated[float, Field(description="Minimum acceptable bid price", ge=0.0)]
|
|
15
|
+
p25: Annotated[
|
|
16
|
+
float | None, Field(description="25th percentile of recent winning bids", ge=0.0)
|
|
17
|
+
] = None
|
|
18
|
+
p50: Annotated[float | None, Field(description="Median of recent winning bids", ge=0.0)] = None
|
|
19
|
+
p75: Annotated[
|
|
20
|
+
float | None, Field(description="75th percentile of recent winning bids", ge=0.0)
|
|
21
|
+
] = None
|
|
22
|
+
p90: Annotated[
|
|
23
|
+
float | None, Field(description="90th percentile of recent winning bids", ge=0.0)
|
|
24
|
+
] = None
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class VcpmAuctionPricingOption(AdCPBaseModel):
|
|
28
|
+
model_config = ConfigDict(
|
|
29
|
+
extra="forbid",
|
|
30
|
+
)
|
|
31
|
+
currency: Annotated[
|
|
32
|
+
str,
|
|
33
|
+
Field(
|
|
34
|
+
description="ISO 4217 currency code",
|
|
35
|
+
examples=["USD", "EUR", "GBP", "JPY"],
|
|
36
|
+
pattern="^[A-Z]{3}$",
|
|
37
|
+
),
|
|
38
|
+
]
|
|
39
|
+
min_spend_per_package: Annotated[
|
|
40
|
+
float | None,
|
|
41
|
+
Field(
|
|
42
|
+
description="Minimum spend requirement per package using this pricing option, in the specified currency",
|
|
43
|
+
ge=0.0,
|
|
44
|
+
),
|
|
45
|
+
] = None
|
|
46
|
+
price_guidance: Annotated[
|
|
47
|
+
PriceGuidance, Field(description="Statistical guidance for auction pricing")
|
|
48
|
+
]
|
|
49
|
+
pricing_model: Annotated[
|
|
50
|
+
Literal["vcpm"], Field(description="Cost per 1,000 viewable impressions (MRC standard)")
|
|
51
|
+
]
|
|
52
|
+
pricing_option_id: Annotated[
|
|
53
|
+
str,
|
|
54
|
+
Field(
|
|
55
|
+
description="Unique identifier for this pricing option within the product (e.g., 'vcpm_usd_auction')"
|
|
56
|
+
),
|
|
57
|
+
]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: vcpm-fixed-option.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 VcpmFixedRatePricingOption(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra="forbid",
|
|
16
|
+
)
|
|
17
|
+
currency: Annotated[
|
|
18
|
+
str,
|
|
19
|
+
Field(
|
|
20
|
+
description="ISO 4217 currency code",
|
|
21
|
+
examples=["USD", "EUR", "GBP", "JPY"],
|
|
22
|
+
pattern="^[A-Z]{3}$",
|
|
23
|
+
),
|
|
24
|
+
]
|
|
25
|
+
min_spend_per_package: Annotated[
|
|
26
|
+
float | None,
|
|
27
|
+
Field(
|
|
28
|
+
description="Minimum spend requirement per package using this pricing option, in the specified currency",
|
|
29
|
+
ge=0.0,
|
|
30
|
+
),
|
|
31
|
+
] = None
|
|
32
|
+
pricing_model: Annotated[
|
|
33
|
+
Literal["vcpm"], Field(description="Cost per 1,000 viewable impressions (MRC standard)")
|
|
34
|
+
]
|
|
35
|
+
pricing_option_id: Annotated[
|
|
36
|
+
str,
|
|
37
|
+
Field(
|
|
38
|
+
description="Unique identifier for this pricing option within the product (e.g., 'vcpm_usd_guaranteed')"
|
|
39
|
+
),
|
|
40
|
+
]
|
|
41
|
+
rate: Annotated[
|
|
42
|
+
float, Field(description="Fixed vCPM rate (cost per 1,000 viewable impressions)", ge=0.0)
|
|
43
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: video-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 VideoAsset(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra="forbid",
|
|
16
|
+
)
|
|
17
|
+
bitrate_kbps: Annotated[
|
|
18
|
+
int | None, Field(description="Video bitrate in kilobits per second", ge=1)
|
|
19
|
+
] = None
|
|
20
|
+
duration_ms: Annotated[
|
|
21
|
+
int | None, Field(description="Video duration in milliseconds", ge=0)
|
|
22
|
+
] = None
|
|
23
|
+
format: Annotated[str | None, Field(description="Video file format (mp4, webm, mov, etc.)")] = (
|
|
24
|
+
None
|
|
25
|
+
)
|
|
26
|
+
height: Annotated[int | None, Field(description="Video height in pixels", ge=1)] = None
|
|
27
|
+
url: Annotated[AnyUrl, Field(description="URL to the video asset")]
|
|
28
|
+
width: Annotated[int | None, Field(description="Video width in pixels", ge=1)] = None
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: webhook-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 AnyUrl, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Method(Enum):
|
|
15
|
+
GET = "GET"
|
|
16
|
+
POST = "POST"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ResponseType(Enum):
|
|
20
|
+
html = "html"
|
|
21
|
+
json = "json"
|
|
22
|
+
xml = "xml"
|
|
23
|
+
javascript = "javascript"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Method1(Enum):
|
|
27
|
+
hmac_sha256 = "hmac_sha256"
|
|
28
|
+
api_key = "api_key"
|
|
29
|
+
none = "none"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Security(AdCPBaseModel):
|
|
33
|
+
api_key_header: Annotated[
|
|
34
|
+
str | None, Field(description="Header name for API key (e.g., 'X-API-Key')")
|
|
35
|
+
] = None
|
|
36
|
+
hmac_header: Annotated[
|
|
37
|
+
str | None, Field(description="Header name for HMAC signature (e.g., 'X-Signature')")
|
|
38
|
+
] = None
|
|
39
|
+
method: Annotated[Method1, Field(description="Authentication method")]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class WebhookAsset(AdCPBaseModel):
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
extra="forbid",
|
|
45
|
+
)
|
|
46
|
+
method: Annotated[Method | None, Field(description="HTTP method")] = Method.POST
|
|
47
|
+
required_macros: Annotated[
|
|
48
|
+
list[str] | None,
|
|
49
|
+
Field(description="Universal macros that must be provided for webhook to function"),
|
|
50
|
+
] = None
|
|
51
|
+
response_type: Annotated[
|
|
52
|
+
ResponseType, Field(description="Expected content type of webhook response")
|
|
53
|
+
]
|
|
54
|
+
security: Annotated[Security, Field(description="Security configuration for webhook calls")]
|
|
55
|
+
supported_macros: Annotated[
|
|
56
|
+
list[str] | None,
|
|
57
|
+
Field(
|
|
58
|
+
description="Universal macros that can be passed to webhook (e.g., {DEVICE_TYPE}, {COUNTRY})"
|
|
59
|
+
),
|
|
60
|
+
] = None
|
|
61
|
+
timeout_ms: Annotated[
|
|
62
|
+
int | None,
|
|
63
|
+
Field(description="Maximum time to wait for response in milliseconds", ge=10, le=5000),
|
|
64
|
+
] = 500
|
|
65
|
+
url: Annotated[AnyUrl, Field(description="Webhook URL to call for dynamic content")]
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: webhook-payload.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 task_status
|
|
14
|
+
from . import task_type as task_type_1
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Domain(Enum):
|
|
18
|
+
media_buy = "media-buy"
|
|
19
|
+
signals = "signals"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Progress(AdCPBaseModel):
|
|
23
|
+
model_config = ConfigDict(
|
|
24
|
+
extra="forbid",
|
|
25
|
+
)
|
|
26
|
+
current_step: Annotated[
|
|
27
|
+
str | None, Field(description="Current step or phase of the operation")
|
|
28
|
+
] = None
|
|
29
|
+
percentage: Annotated[
|
|
30
|
+
float | None, Field(description="Completion percentage (0-100)", ge=0.0, le=100.0)
|
|
31
|
+
] = None
|
|
32
|
+
step_number: Annotated[int | None, Field(description="Current step number", ge=1)] = None
|
|
33
|
+
total_steps: Annotated[
|
|
34
|
+
int | None, Field(description="Total number of steps in the operation", ge=1)
|
|
35
|
+
] = None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class WebhookPayload(AdCPBaseModel):
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
extra="allow",
|
|
41
|
+
)
|
|
42
|
+
context_id: Annotated[
|
|
43
|
+
str | None,
|
|
44
|
+
Field(
|
|
45
|
+
description="Session/conversation identifier. Use this to continue the conversation if input-required status needs clarification or additional parameters."
|
|
46
|
+
),
|
|
47
|
+
] = None
|
|
48
|
+
domain: Annotated[
|
|
49
|
+
Domain | None,
|
|
50
|
+
Field(
|
|
51
|
+
description="AdCP domain this task belongs to. Helps classify the operation type at a high level."
|
|
52
|
+
),
|
|
53
|
+
] = None
|
|
54
|
+
error: Annotated[
|
|
55
|
+
str | None,
|
|
56
|
+
Field(description="Error message for failed tasks. Only present when status is 'failed'."),
|
|
57
|
+
] = None
|
|
58
|
+
message: Annotated[
|
|
59
|
+
str | None,
|
|
60
|
+
Field(
|
|
61
|
+
description="Human-readable summary of the current task state. Provides context about what happened and what action may be needed."
|
|
62
|
+
),
|
|
63
|
+
] = None
|
|
64
|
+
operation_id: Annotated[
|
|
65
|
+
str | None,
|
|
66
|
+
Field(
|
|
67
|
+
description="Publisher-defined operation identifier correlating a sequence of task updates across webhooks."
|
|
68
|
+
),
|
|
69
|
+
] = None
|
|
70
|
+
progress: Annotated[
|
|
71
|
+
Progress | None,
|
|
72
|
+
Field(
|
|
73
|
+
description="Progress information for tasks still in 'working' state. Rarely seen in webhooks since 'working' tasks typically complete synchronously, but may appear if a task transitions from 'submitted' to 'working'."
|
|
74
|
+
),
|
|
75
|
+
] = None
|
|
76
|
+
result: Annotated[
|
|
77
|
+
dict[str, Any] | None,
|
|
78
|
+
Field(
|
|
79
|
+
description="Task-specific payload for this status update. Validated against the appropriate response schema based on task_type."
|
|
80
|
+
),
|
|
81
|
+
] = None
|
|
82
|
+
status: Annotated[
|
|
83
|
+
task_status.TaskStatus,
|
|
84
|
+
Field(
|
|
85
|
+
description="Current task status. Webhooks are only triggered for status changes after initial submission (e.g., submitted → input-required, submitted → completed, submitted → failed)."
|
|
86
|
+
),
|
|
87
|
+
]
|
|
88
|
+
task_id: Annotated[
|
|
89
|
+
str,
|
|
90
|
+
Field(
|
|
91
|
+
description="Unique identifier for this task. Use this to correlate webhook notifications with the original task submission."
|
|
92
|
+
),
|
|
93
|
+
]
|
|
94
|
+
task_type: Annotated[
|
|
95
|
+
task_type_1.TaskType,
|
|
96
|
+
Field(
|
|
97
|
+
description="Type of AdCP operation that triggered this webhook. Enables webhook handlers to route to appropriate processing logic."
|
|
98
|
+
),
|
|
99
|
+
]
|
|
100
|
+
timestamp: Annotated[
|
|
101
|
+
AwareDatetime, Field(description="ISO 8601 timestamp when this webhook was generated.")
|
|
102
|
+
]
|