adcp 2.12.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 +364 -0
- adcp/__main__.py +440 -0
- adcp/adagents.py +642 -0
- adcp/client.py +1057 -0
- adcp/config.py +82 -0
- adcp/exceptions.py +185 -0
- adcp/protocols/__init__.py +9 -0
- adcp/protocols/a2a.py +484 -0
- adcp/protocols/base.py +190 -0
- adcp/protocols/mcp.py +440 -0
- adcp/py.typed +0 -0
- adcp/simple.py +451 -0
- adcp/testing/__init__.py +53 -0
- adcp/testing/test_helpers.py +311 -0
- adcp/types/__init__.py +561 -0
- adcp/types/_generated.py +237 -0
- adcp/types/aliases.py +748 -0
- adcp/types/base.py +26 -0
- adcp/types/core.py +174 -0
- adcp/types/generated_poc/__init__.py +3 -0
- adcp/types/generated_poc/adagents.py +411 -0
- adcp/types/generated_poc/core/__init__.py +3 -0
- adcp/types/generated_poc/core/activation_key.py +30 -0
- adcp/types/generated_poc/core/assets/__init__.py +3 -0
- adcp/types/generated_poc/core/assets/audio_asset.py +26 -0
- adcp/types/generated_poc/core/assets/css_asset.py +20 -0
- adcp/types/generated_poc/core/assets/daast_asset.py +61 -0
- adcp/types/generated_poc/core/assets/html_asset.py +18 -0
- adcp/types/generated_poc/core/assets/image_asset.py +19 -0
- adcp/types/generated_poc/core/assets/javascript_asset.py +23 -0
- adcp/types/generated_poc/core/assets/text_asset.py +20 -0
- adcp/types/generated_poc/core/assets/url_asset.py +28 -0
- adcp/types/generated_poc/core/assets/vast_asset.py +63 -0
- adcp/types/generated_poc/core/assets/video_asset.py +24 -0
- adcp/types/generated_poc/core/assets/webhook_asset.py +53 -0
- adcp/types/generated_poc/core/brand_manifest.py +201 -0
- adcp/types/generated_poc/core/context.py +15 -0
- adcp/types/generated_poc/core/creative_asset.py +102 -0
- adcp/types/generated_poc/core/creative_assignment.py +27 -0
- adcp/types/generated_poc/core/creative_filters.py +86 -0
- adcp/types/generated_poc/core/creative_manifest.py +68 -0
- adcp/types/generated_poc/core/creative_policy.py +28 -0
- adcp/types/generated_poc/core/delivery_metrics.py +111 -0
- adcp/types/generated_poc/core/deployment.py +78 -0
- adcp/types/generated_poc/core/destination.py +43 -0
- adcp/types/generated_poc/core/dimensions.py +18 -0
- adcp/types/generated_poc/core/error.py +29 -0
- adcp/types/generated_poc/core/ext.py +15 -0
- adcp/types/generated_poc/core/format.py +260 -0
- adcp/types/generated_poc/core/format_id.py +50 -0
- adcp/types/generated_poc/core/frequency_cap.py +19 -0
- adcp/types/generated_poc/core/measurement.py +40 -0
- adcp/types/generated_poc/core/media_buy.py +40 -0
- adcp/types/generated_poc/core/package.py +68 -0
- adcp/types/generated_poc/core/performance_feedback.py +78 -0
- adcp/types/generated_poc/core/placement.py +37 -0
- adcp/types/generated_poc/core/product.py +164 -0
- adcp/types/generated_poc/core/product_filters.py +97 -0
- adcp/types/generated_poc/core/promoted_offerings.py +102 -0
- adcp/types/generated_poc/core/promoted_products.py +38 -0
- adcp/types/generated_poc/core/property.py +64 -0
- adcp/types/generated_poc/core/property_id.py +21 -0
- adcp/types/generated_poc/core/property_tag.py +21 -0
- adcp/types/generated_poc/core/protocol_envelope.py +61 -0
- adcp/types/generated_poc/core/publisher_property_selector.py +75 -0
- adcp/types/generated_poc/core/push_notification_config.py +51 -0
- adcp/types/generated_poc/core/reporting_capabilities.py +51 -0
- adcp/types/generated_poc/core/response.py +24 -0
- adcp/types/generated_poc/core/signal_filters.py +29 -0
- adcp/types/generated_poc/core/sub_asset.py +55 -0
- adcp/types/generated_poc/core/targeting.py +53 -0
- adcp/types/generated_poc/core/webhook_payload.py +96 -0
- adcp/types/generated_poc/creative/__init__.py +3 -0
- adcp/types/generated_poc/creative/list_creative_formats_request.py +88 -0
- adcp/types/generated_poc/creative/list_creative_formats_response.py +55 -0
- adcp/types/generated_poc/creative/preview_creative_request.py +153 -0
- adcp/types/generated_poc/creative/preview_creative_response.py +169 -0
- adcp/types/generated_poc/creative/preview_render.py +152 -0
- adcp/types/generated_poc/enums/__init__.py +3 -0
- adcp/types/generated_poc/enums/adcp_domain.py +12 -0
- adcp/types/generated_poc/enums/asset_content_type.py +23 -0
- adcp/types/generated_poc/enums/auth_scheme.py +12 -0
- adcp/types/generated_poc/enums/available_metric.py +19 -0
- adcp/types/generated_poc/enums/channels.py +19 -0
- adcp/types/generated_poc/enums/co_branding_requirement.py +13 -0
- adcp/types/generated_poc/enums/creative_action.py +15 -0
- adcp/types/generated_poc/enums/creative_agent_capability.py +14 -0
- adcp/types/generated_poc/enums/creative_sort_field.py +16 -0
- adcp/types/generated_poc/enums/creative_status.py +14 -0
- adcp/types/generated_poc/enums/daast_tracking_event.py +21 -0
- adcp/types/generated_poc/enums/daast_version.py +12 -0
- adcp/types/generated_poc/enums/delivery_type.py +12 -0
- adcp/types/generated_poc/enums/dimension_unit.py +14 -0
- adcp/types/generated_poc/enums/feed_format.py +13 -0
- adcp/types/generated_poc/enums/feedback_source.py +14 -0
- adcp/types/generated_poc/enums/format_category.py +17 -0
- adcp/types/generated_poc/enums/format_id_parameter.py +12 -0
- adcp/types/generated_poc/enums/frequency_cap_scope.py +16 -0
- adcp/types/generated_poc/enums/history_entry_type.py +12 -0
- adcp/types/generated_poc/enums/http_method.py +12 -0
- adcp/types/generated_poc/enums/identifier_types.py +29 -0
- adcp/types/generated_poc/enums/javascript_module_type.py +13 -0
- adcp/types/generated_poc/enums/landing_page_requirement.py +13 -0
- adcp/types/generated_poc/enums/markdown_flavor.py +12 -0
- adcp/types/generated_poc/enums/media_buy_status.py +14 -0
- adcp/types/generated_poc/enums/metric_type.py +18 -0
- adcp/types/generated_poc/enums/notification_type.py +14 -0
- adcp/types/generated_poc/enums/pacing.py +13 -0
- adcp/types/generated_poc/enums/preview_output_format.py +12 -0
- adcp/types/generated_poc/enums/pricing_model.py +17 -0
- adcp/types/generated_poc/enums/property_type.py +17 -0
- adcp/types/generated_poc/enums/publisher_identifier_types.py +15 -0
- adcp/types/generated_poc/enums/reporting_frequency.py +13 -0
- adcp/types/generated_poc/enums/signal_catalog_type.py +13 -0
- adcp/types/generated_poc/enums/sort_direction.py +12 -0
- adcp/types/generated_poc/enums/standard_format_ids.py +45 -0
- adcp/types/generated_poc/enums/task_status.py +19 -0
- adcp/types/generated_poc/enums/task_type.py +15 -0
- adcp/types/generated_poc/enums/update_frequency.py +14 -0
- adcp/types/generated_poc/enums/url_asset_type.py +13 -0
- adcp/types/generated_poc/enums/validation_mode.py +12 -0
- adcp/types/generated_poc/enums/vast_tracking_event.py +26 -0
- adcp/types/generated_poc/enums/vast_version.py +15 -0
- adcp/types/generated_poc/enums/webhook_response_type.py +14 -0
- adcp/types/generated_poc/enums/webhook_security_method.py +13 -0
- adcp/types/generated_poc/media_buy/__init__.py +3 -0
- adcp/types/generated_poc/media_buy/build_creative_request.py +41 -0
- adcp/types/generated_poc/media_buy/build_creative_response.py +51 -0
- adcp/types/generated_poc/media_buy/create_media_buy_request.py +94 -0
- adcp/types/generated_poc/media_buy/create_media_buy_response.py +56 -0
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_request.py +47 -0
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_response.py +235 -0
- adcp/types/generated_poc/media_buy/get_products_request.py +48 -0
- adcp/types/generated_poc/media_buy/get_products_response.py +28 -0
- adcp/types/generated_poc/media_buy/list_authorized_properties_request.py +38 -0
- adcp/types/generated_poc/media_buy/list_authorized_properties_response.py +84 -0
- adcp/types/generated_poc/media_buy/list_creative_formats_request.py +74 -0
- adcp/types/generated_poc/media_buy/list_creative_formats_response.py +56 -0
- adcp/types/generated_poc/media_buy/list_creatives_request.py +76 -0
- adcp/types/generated_poc/media_buy/list_creatives_response.py +214 -0
- adcp/types/generated_poc/media_buy/package_request.py +63 -0
- adcp/types/generated_poc/media_buy/provide_performance_feedback_request.py +125 -0
- adcp/types/generated_poc/media_buy/provide_performance_feedback_response.py +53 -0
- adcp/types/generated_poc/media_buy/sync_creatives_request.py +63 -0
- adcp/types/generated_poc/media_buy/sync_creatives_response.py +105 -0
- adcp/types/generated_poc/media_buy/update_media_buy_request.py +195 -0
- adcp/types/generated_poc/media_buy/update_media_buy_response.py +55 -0
- adcp/types/generated_poc/pricing_options/__init__.py +3 -0
- adcp/types/generated_poc/pricing_options/cpc_option.py +43 -0
- adcp/types/generated_poc/pricing_options/cpcv_option.py +45 -0
- adcp/types/generated_poc/pricing_options/cpm_auction_option.py +58 -0
- adcp/types/generated_poc/pricing_options/cpm_fixed_option.py +43 -0
- adcp/types/generated_poc/pricing_options/cpp_option.py +64 -0
- adcp/types/generated_poc/pricing_options/cpv_option.py +77 -0
- adcp/types/generated_poc/pricing_options/flat_rate_option.py +93 -0
- adcp/types/generated_poc/pricing_options/vcpm_auction_option.py +61 -0
- adcp/types/generated_poc/pricing_options/vcpm_fixed_option.py +47 -0
- adcp/types/generated_poc/protocols/__init__.py +3 -0
- adcp/types/generated_poc/protocols/adcp_extension.py +37 -0
- adcp/types/generated_poc/signals/__init__.py +3 -0
- adcp/types/generated_poc/signals/activate_signal_request.py +32 -0
- adcp/types/generated_poc/signals/activate_signal_response.py +51 -0
- adcp/types/generated_poc/signals/get_signals_request.py +53 -0
- adcp/types/generated_poc/signals/get_signals_response.py +59 -0
- adcp/utils/__init__.py +7 -0
- adcp/utils/operation_id.py +15 -0
- adcp/utils/preview_cache.py +491 -0
- adcp/utils/response_parser.py +171 -0
- adcp/validation.py +172 -0
- adcp-2.12.0.data/data/ADCP_VERSION +1 -0
- adcp-2.12.0.dist-info/METADATA +992 -0
- adcp-2.12.0.dist-info/RECORD +176 -0
- adcp-2.12.0.dist-info/WHEEL +5 -0
- adcp-2.12.0.dist-info/entry_points.txt +2 -0
- adcp-2.12.0.dist-info/licenses/LICENSE +17 -0
- adcp-2.12.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/list_creatives_request.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+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
|
+
from ..core import context as context_1
|
|
14
|
+
from ..core import creative_filters
|
|
15
|
+
from ..core import ext as ext_1
|
|
16
|
+
from ..enums import creative_sort_field, sort_direction
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class FieldModel(Enum):
|
|
20
|
+
creative_id = 'creative_id'
|
|
21
|
+
name = 'name'
|
|
22
|
+
format = 'format'
|
|
23
|
+
status = 'status'
|
|
24
|
+
created_date = 'created_date'
|
|
25
|
+
updated_date = 'updated_date'
|
|
26
|
+
tags = 'tags'
|
|
27
|
+
assignments = 'assignments'
|
|
28
|
+
performance = 'performance'
|
|
29
|
+
sub_assets = 'sub_assets'
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Pagination(AdCPBaseModel):
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
extra='forbid',
|
|
35
|
+
)
|
|
36
|
+
limit: Annotated[
|
|
37
|
+
int | None, Field(description='Maximum number of creatives to return', ge=1, le=100)
|
|
38
|
+
] = 50
|
|
39
|
+
offset: Annotated[int | None, Field(description='Number of creatives to skip', ge=0)] = 0
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class Sort(AdCPBaseModel):
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
extra='forbid',
|
|
45
|
+
)
|
|
46
|
+
direction: Annotated[
|
|
47
|
+
sort_direction.SortDirection | None, Field(description='Sort direction')
|
|
48
|
+
] = sort_direction.SortDirection.desc
|
|
49
|
+
field: Annotated[
|
|
50
|
+
creative_sort_field.CreativeSortField | None, Field(description='Field to sort by')
|
|
51
|
+
] = creative_sort_field.CreativeSortField.created_date
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class ListCreativesRequest(AdCPBaseModel):
|
|
55
|
+
model_config = ConfigDict(
|
|
56
|
+
extra='forbid',
|
|
57
|
+
)
|
|
58
|
+
context: context_1.ContextObject | None = None
|
|
59
|
+
ext: ext_1.ExtensionObject | None = None
|
|
60
|
+
fields: Annotated[
|
|
61
|
+
list[FieldModel] | None,
|
|
62
|
+
Field(description='Specific fields to include in response (omit for all fields)'),
|
|
63
|
+
] = None
|
|
64
|
+
filters: creative_filters.CreativeFilters | None = None
|
|
65
|
+
include_assignments: Annotated[
|
|
66
|
+
bool | None, Field(description='Include package assignment information in response')
|
|
67
|
+
] = True
|
|
68
|
+
include_performance: Annotated[
|
|
69
|
+
bool | None, Field(description='Include aggregated performance metrics in response')
|
|
70
|
+
] = False
|
|
71
|
+
include_sub_assets: Annotated[
|
|
72
|
+
bool | None,
|
|
73
|
+
Field(description='Include sub-assets (for carousel/native formats) in response'),
|
|
74
|
+
] = False
|
|
75
|
+
pagination: Annotated[Pagination | None, Field(description='Pagination parameters')] = None
|
|
76
|
+
sort: Annotated[Sort | None, Field(description='Sorting parameters')] = None
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/list_creatives_response.json
|
|
3
|
+
# timestamp: 2025-11-22T19:54:03+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 AwareDatetime, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from ..core import context as context_1
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import format_id as format_id_1
|
|
16
|
+
from ..core import promoted_offerings, sub_asset
|
|
17
|
+
from ..core.assets import (
|
|
18
|
+
audio_asset,
|
|
19
|
+
css_asset,
|
|
20
|
+
daast_asset,
|
|
21
|
+
html_asset,
|
|
22
|
+
image_asset,
|
|
23
|
+
javascript_asset,
|
|
24
|
+
text_asset,
|
|
25
|
+
url_asset,
|
|
26
|
+
vast_asset,
|
|
27
|
+
video_asset,
|
|
28
|
+
)
|
|
29
|
+
from ..enums import creative_status, sort_direction
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Status(Enum):
|
|
33
|
+
active = 'active'
|
|
34
|
+
paused = 'paused'
|
|
35
|
+
ended = 'ended'
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class AssignedPackage(AdCPBaseModel):
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
extra='forbid',
|
|
41
|
+
)
|
|
42
|
+
assigned_date: Annotated[AwareDatetime, Field(description='When this assignment was created')]
|
|
43
|
+
package_id: Annotated[str, Field(description='Package identifier')]
|
|
44
|
+
package_name: Annotated[str | None, Field(description='Human-readable package name')] = None
|
|
45
|
+
status: Annotated[Status, Field(description='Status of this specific assignment')]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class Assignments(AdCPBaseModel):
|
|
49
|
+
model_config = ConfigDict(
|
|
50
|
+
extra='forbid',
|
|
51
|
+
)
|
|
52
|
+
assigned_packages: Annotated[
|
|
53
|
+
list[AssignedPackage] | None,
|
|
54
|
+
Field(description='List of packages this creative is assigned to'),
|
|
55
|
+
] = None
|
|
56
|
+
assignment_count: Annotated[
|
|
57
|
+
int, Field(description='Total number of active package assignments', ge=0)
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class Performance(AdCPBaseModel):
|
|
62
|
+
model_config = ConfigDict(
|
|
63
|
+
extra='forbid',
|
|
64
|
+
)
|
|
65
|
+
clicks: Annotated[
|
|
66
|
+
int | None, Field(description='Total clicks across all assignments', ge=0)
|
|
67
|
+
] = None
|
|
68
|
+
conversion_rate: Annotated[
|
|
69
|
+
float | None, Field(description='Conversion rate across all assignments', ge=0.0, le=1.0)
|
|
70
|
+
] = None
|
|
71
|
+
ctr: Annotated[
|
|
72
|
+
float | None, Field(description='Click-through rate (clicks/impressions)', ge=0.0, le=1.0)
|
|
73
|
+
] = None
|
|
74
|
+
impressions: Annotated[
|
|
75
|
+
int | None, Field(description='Total impressions across all assignments', ge=0)
|
|
76
|
+
] = None
|
|
77
|
+
last_updated: Annotated[
|
|
78
|
+
AwareDatetime, Field(description='When performance data was last updated')
|
|
79
|
+
]
|
|
80
|
+
performance_score: Annotated[
|
|
81
|
+
float | None, Field(description='Aggregated performance score (0-100)', ge=0.0, le=100.0)
|
|
82
|
+
] = None
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class Pagination(AdCPBaseModel):
|
|
86
|
+
model_config = ConfigDict(
|
|
87
|
+
extra='forbid',
|
|
88
|
+
)
|
|
89
|
+
current_page: Annotated[
|
|
90
|
+
int | None, Field(description='Current page number (1-based)', ge=1)
|
|
91
|
+
] = None
|
|
92
|
+
has_more: Annotated[bool, Field(description='Whether more results are available')]
|
|
93
|
+
limit: Annotated[int, Field(description='Maximum number of results requested', ge=1)]
|
|
94
|
+
offset: Annotated[int, Field(description='Number of results skipped', ge=0)]
|
|
95
|
+
total_pages: Annotated[
|
|
96
|
+
int | None, Field(description='Total number of pages available', ge=0)
|
|
97
|
+
] = None
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class StatusSummary(AdCPBaseModel):
|
|
101
|
+
model_config = ConfigDict(
|
|
102
|
+
extra='forbid',
|
|
103
|
+
)
|
|
104
|
+
approved: Annotated[int | None, Field(description='Number of approved creatives', ge=0)] = None
|
|
105
|
+
archived: Annotated[int | None, Field(description='Number of archived creatives', ge=0)] = None
|
|
106
|
+
pending_review: Annotated[
|
|
107
|
+
int | None, Field(description='Number of creatives pending review', ge=0)
|
|
108
|
+
] = None
|
|
109
|
+
rejected: Annotated[int | None, Field(description='Number of rejected creatives', ge=0)] = None
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class SortApplied(AdCPBaseModel):
|
|
113
|
+
direction: sort_direction.SortDirection | None = None
|
|
114
|
+
field: str | None = None
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class QuerySummary(AdCPBaseModel):
|
|
118
|
+
model_config = ConfigDict(
|
|
119
|
+
extra='forbid',
|
|
120
|
+
)
|
|
121
|
+
filters_applied: Annotated[
|
|
122
|
+
list[str] | None, Field(description='List of filters that were applied to the query')
|
|
123
|
+
] = None
|
|
124
|
+
returned: Annotated[
|
|
125
|
+
int, Field(description='Number of creatives returned in this response', ge=0)
|
|
126
|
+
]
|
|
127
|
+
sort_applied: Annotated[
|
|
128
|
+
SortApplied | None, Field(description='Sort order that was applied')
|
|
129
|
+
] = None
|
|
130
|
+
total_matching: Annotated[
|
|
131
|
+
int,
|
|
132
|
+
Field(description='Total number of creatives matching filters (across all pages)', ge=0),
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class Creative(AdCPBaseModel):
|
|
137
|
+
model_config = ConfigDict(
|
|
138
|
+
extra='forbid',
|
|
139
|
+
)
|
|
140
|
+
assets: Annotated[
|
|
141
|
+
dict[
|
|
142
|
+
str,
|
|
143
|
+
image_asset.ImageAsset
|
|
144
|
+
| video_asset.VideoAsset
|
|
145
|
+
| audio_asset.AudioAsset
|
|
146
|
+
| text_asset.TextAsset
|
|
147
|
+
| html_asset.HtmlAsset
|
|
148
|
+
| css_asset.CssAsset
|
|
149
|
+
| javascript_asset.JavascriptAsset
|
|
150
|
+
| promoted_offerings.PromotedOfferings
|
|
151
|
+
| url_asset.UrlAsset
|
|
152
|
+
| vast_asset.VastAsset1
|
|
153
|
+
| vast_asset.VastAsset2
|
|
154
|
+
| daast_asset.DaastAsset1
|
|
155
|
+
| daast_asset.DaastAsset2,
|
|
156
|
+
]
|
|
157
|
+
| None,
|
|
158
|
+
Field(description='Assets for this creative, keyed by asset_role'),
|
|
159
|
+
] = None
|
|
160
|
+
assignments: Annotated[
|
|
161
|
+
Assignments | None,
|
|
162
|
+
Field(description='Current package assignments (included when include_assignments=true)'),
|
|
163
|
+
] = None
|
|
164
|
+
created_date: Annotated[
|
|
165
|
+
AwareDatetime, Field(description='When the creative was uploaded to the library')
|
|
166
|
+
]
|
|
167
|
+
creative_id: Annotated[str, Field(description='Unique identifier for the creative')]
|
|
168
|
+
format_id: Annotated[
|
|
169
|
+
format_id_1.FormatId,
|
|
170
|
+
Field(description='Format identifier specifying which format this creative conforms to'),
|
|
171
|
+
]
|
|
172
|
+
name: Annotated[str, Field(description='Human-readable creative name')]
|
|
173
|
+
performance: Annotated[
|
|
174
|
+
Performance | None,
|
|
175
|
+
Field(
|
|
176
|
+
description='Aggregated performance metrics (included when include_performance=true)'
|
|
177
|
+
),
|
|
178
|
+
] = None
|
|
179
|
+
status: Annotated[
|
|
180
|
+
creative_status.CreativeStatus, Field(description='Current approval status of the creative')
|
|
181
|
+
]
|
|
182
|
+
sub_assets: Annotated[
|
|
183
|
+
list[sub_asset.SubAsset1 | sub_asset.SubAsset2] | None,
|
|
184
|
+
Field(
|
|
185
|
+
description='Sub-assets for multi-asset formats (included when include_sub_assets=true)'
|
|
186
|
+
),
|
|
187
|
+
] = None
|
|
188
|
+
tags: Annotated[
|
|
189
|
+
list[str] | None, Field(description='User-defined tags for organization and searchability')
|
|
190
|
+
] = None
|
|
191
|
+
updated_date: Annotated[AwareDatetime, Field(description='When the creative was last modified')]
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
class ListCreativesResponse(AdCPBaseModel):
|
|
195
|
+
model_config = ConfigDict(
|
|
196
|
+
extra='forbid',
|
|
197
|
+
)
|
|
198
|
+
context: context_1.ContextObject | None = None
|
|
199
|
+
creatives: Annotated[
|
|
200
|
+
list[Creative], Field(description='Array of creative assets matching the query')
|
|
201
|
+
]
|
|
202
|
+
ext: ext_1.ExtensionObject | None = None
|
|
203
|
+
format_summary: Annotated[
|
|
204
|
+
dict[str, int] | None, Field(description='Breakdown of creatives by format type')
|
|
205
|
+
] = None
|
|
206
|
+
pagination: Annotated[
|
|
207
|
+
Pagination, Field(description='Pagination information for navigating results')
|
|
208
|
+
]
|
|
209
|
+
query_summary: Annotated[
|
|
210
|
+
QuerySummary, Field(description='Summary of the query that was executed')
|
|
211
|
+
]
|
|
212
|
+
status_summary: Annotated[
|
|
213
|
+
StatusSummary | None, Field(description='Breakdown of creatives by status')
|
|
214
|
+
] = None
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/package_request.json
|
|
3
|
+
# timestamp: 2025-11-22T19:54:03+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 ..core import creative_asset
|
|
13
|
+
from ..core import ext as ext_1
|
|
14
|
+
from ..core import format_id, targeting
|
|
15
|
+
from ..enums import pacing as pacing_1
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class PackageRequest(AdCPBaseModel):
|
|
19
|
+
model_config = ConfigDict(
|
|
20
|
+
extra='forbid',
|
|
21
|
+
)
|
|
22
|
+
bid_price: Annotated[
|
|
23
|
+
float | None,
|
|
24
|
+
Field(
|
|
25
|
+
description='Bid price for auction-based CPM pricing (required if using cpm-auction-option)',
|
|
26
|
+
ge=0.0,
|
|
27
|
+
),
|
|
28
|
+
] = None
|
|
29
|
+
budget: Annotated[
|
|
30
|
+
float,
|
|
31
|
+
Field(description="Budget allocation for this package in the media buy's currency", ge=0.0),
|
|
32
|
+
]
|
|
33
|
+
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this package")]
|
|
34
|
+
creative_ids: Annotated[
|
|
35
|
+
list[str] | None,
|
|
36
|
+
Field(
|
|
37
|
+
description='Creative IDs to assign to this package at creation time (references existing library creatives)'
|
|
38
|
+
),
|
|
39
|
+
] = None
|
|
40
|
+
creatives: Annotated[
|
|
41
|
+
list[creative_asset.CreativeAsset] | None,
|
|
42
|
+
Field(
|
|
43
|
+
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.',
|
|
44
|
+
max_length=100,
|
|
45
|
+
),
|
|
46
|
+
] = None
|
|
47
|
+
ext: ext_1.ExtensionObject | None = None
|
|
48
|
+
format_ids: Annotated[
|
|
49
|
+
list[format_id.FormatId] | None,
|
|
50
|
+
Field(
|
|
51
|
+
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.',
|
|
52
|
+
min_length=1,
|
|
53
|
+
),
|
|
54
|
+
] = None
|
|
55
|
+
pacing: pacing_1.Pacing | None = None
|
|
56
|
+
pricing_option_id: Annotated[
|
|
57
|
+
str,
|
|
58
|
+
Field(
|
|
59
|
+
description="ID of the selected pricing option from the product's pricing_options array"
|
|
60
|
+
),
|
|
61
|
+
]
|
|
62
|
+
product_id: Annotated[str, Field(description='Product ID for this package')]
|
|
63
|
+
targeting_overlay: targeting.TargetingOverlay | None = None
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/provide_performance_feedback_request.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+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, RootModel
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import ext as ext_1
|
|
14
|
+
from ..enums import feedback_source as feedback_source_1
|
|
15
|
+
from ..enums import metric_type as metric_type_1
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class MeasurementPeriod(AdCPBaseModel):
|
|
19
|
+
model_config = ConfigDict(
|
|
20
|
+
extra='forbid',
|
|
21
|
+
)
|
|
22
|
+
end: Annotated[
|
|
23
|
+
AwareDatetime, Field(description='ISO 8601 end timestamp for measurement period')
|
|
24
|
+
]
|
|
25
|
+
start: Annotated[
|
|
26
|
+
AwareDatetime, Field(description='ISO 8601 start timestamp for measurement period')
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ProvidePerformanceFeedbackRequest1(AdCPBaseModel):
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
extra='forbid',
|
|
33
|
+
)
|
|
34
|
+
buyer_ref: Annotated[
|
|
35
|
+
str | None, Field(description="Buyer's reference for the media buy", min_length=1)
|
|
36
|
+
] = None
|
|
37
|
+
context: context_1.ContextObject | None = None
|
|
38
|
+
creative_id: Annotated[
|
|
39
|
+
str | None,
|
|
40
|
+
Field(
|
|
41
|
+
description='Specific creative asset (if feedback is creative-specific)', min_length=1
|
|
42
|
+
),
|
|
43
|
+
] = None
|
|
44
|
+
ext: ext_1.ExtensionObject | None = None
|
|
45
|
+
feedback_source: Annotated[
|
|
46
|
+
feedback_source_1.FeedbackSource | None, Field(description='Source of the performance data')
|
|
47
|
+
] = feedback_source_1.FeedbackSource.buyer_attribution
|
|
48
|
+
measurement_period: Annotated[
|
|
49
|
+
MeasurementPeriod, Field(description='Time period for performance measurement')
|
|
50
|
+
]
|
|
51
|
+
media_buy_id: Annotated[
|
|
52
|
+
str, Field(description="Publisher's media buy identifier", min_length=1)
|
|
53
|
+
]
|
|
54
|
+
metric_type: Annotated[
|
|
55
|
+
metric_type_1.MetricType | None, Field(description='The business metric being measured')
|
|
56
|
+
] = metric_type_1.MetricType.overall_performance
|
|
57
|
+
package_id: Annotated[
|
|
58
|
+
str | None,
|
|
59
|
+
Field(
|
|
60
|
+
description='Specific package within the media buy (if feedback is package-specific)',
|
|
61
|
+
min_length=1,
|
|
62
|
+
),
|
|
63
|
+
] = None
|
|
64
|
+
performance_index: Annotated[
|
|
65
|
+
float,
|
|
66
|
+
Field(
|
|
67
|
+
description='Normalized performance score (0.0 = no value, 1.0 = expected, >1.0 = above expected)',
|
|
68
|
+
ge=0.0,
|
|
69
|
+
),
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class ProvidePerformanceFeedbackRequest2(AdCPBaseModel):
|
|
74
|
+
model_config = ConfigDict(
|
|
75
|
+
extra='forbid',
|
|
76
|
+
)
|
|
77
|
+
buyer_ref: Annotated[
|
|
78
|
+
str, Field(description="Buyer's reference for the media buy", min_length=1)
|
|
79
|
+
]
|
|
80
|
+
context: context_1.ContextObject | None = None
|
|
81
|
+
creative_id: Annotated[
|
|
82
|
+
str | None,
|
|
83
|
+
Field(
|
|
84
|
+
description='Specific creative asset (if feedback is creative-specific)', min_length=1
|
|
85
|
+
),
|
|
86
|
+
] = None
|
|
87
|
+
ext: ext_1.ExtensionObject | None = None
|
|
88
|
+
feedback_source: Annotated[
|
|
89
|
+
feedback_source_1.FeedbackSource | None, Field(description='Source of the performance data')
|
|
90
|
+
] = feedback_source_1.FeedbackSource.buyer_attribution
|
|
91
|
+
measurement_period: Annotated[
|
|
92
|
+
MeasurementPeriod, Field(description='Time period for performance measurement')
|
|
93
|
+
]
|
|
94
|
+
media_buy_id: Annotated[
|
|
95
|
+
str | None, Field(description="Publisher's media buy identifier", min_length=1)
|
|
96
|
+
] = None
|
|
97
|
+
metric_type: Annotated[
|
|
98
|
+
metric_type_1.MetricType | None, Field(description='The business metric being measured')
|
|
99
|
+
] = metric_type_1.MetricType.overall_performance
|
|
100
|
+
package_id: Annotated[
|
|
101
|
+
str | None,
|
|
102
|
+
Field(
|
|
103
|
+
description='Specific package within the media buy (if feedback is package-specific)',
|
|
104
|
+
min_length=1,
|
|
105
|
+
),
|
|
106
|
+
] = None
|
|
107
|
+
performance_index: Annotated[
|
|
108
|
+
float,
|
|
109
|
+
Field(
|
|
110
|
+
description='Normalized performance score (0.0 = no value, 1.0 = expected, >1.0 = above expected)',
|
|
111
|
+
ge=0.0,
|
|
112
|
+
),
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class ProvidePerformanceFeedbackRequest(
|
|
117
|
+
RootModel[ProvidePerformanceFeedbackRequest1 | ProvidePerformanceFeedbackRequest2]
|
|
118
|
+
):
|
|
119
|
+
root: Annotated[
|
|
120
|
+
ProvidePerformanceFeedbackRequest1 | ProvidePerformanceFeedbackRequest2,
|
|
121
|
+
Field(
|
|
122
|
+
description='Request payload for provide_performance_feedback task',
|
|
123
|
+
title='Provide Performance Feedback Request',
|
|
124
|
+
),
|
|
125
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/provide_performance_feedback_response.json
|
|
3
|
+
# timestamp: 2025-11-22T19:16:02+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, RootModel
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import error
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ProvidePerformanceFeedbackResponse1(AdCPBaseModel):
|
|
18
|
+
model_config = ConfigDict(
|
|
19
|
+
extra='forbid',
|
|
20
|
+
)
|
|
21
|
+
context: context_1.ContextObject | None = None
|
|
22
|
+
ext: ext_1.ExtensionObject | None = None
|
|
23
|
+
success: Annotated[
|
|
24
|
+
Literal[True],
|
|
25
|
+
Field(description='Whether the performance feedback was successfully received'),
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ProvidePerformanceFeedbackResponse2(AdCPBaseModel):
|
|
30
|
+
model_config = ConfigDict(
|
|
31
|
+
extra='forbid',
|
|
32
|
+
)
|
|
33
|
+
context: context_1.ContextObject | None = None
|
|
34
|
+
errors: Annotated[
|
|
35
|
+
list[error.Error],
|
|
36
|
+
Field(
|
|
37
|
+
description='Array of errors explaining why feedback was rejected (e.g., invalid measurement period, missing campaign data)',
|
|
38
|
+
min_length=1,
|
|
39
|
+
),
|
|
40
|
+
]
|
|
41
|
+
ext: ext_1.ExtensionObject | None = None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ProvidePerformanceFeedbackResponse(
|
|
45
|
+
RootModel[ProvidePerformanceFeedbackResponse1 | ProvidePerformanceFeedbackResponse2]
|
|
46
|
+
):
|
|
47
|
+
root: Annotated[
|
|
48
|
+
ProvidePerformanceFeedbackResponse1 | ProvidePerformanceFeedbackResponse2,
|
|
49
|
+
Field(
|
|
50
|
+
description='Response payload for provide_performance_feedback task. Returns either success confirmation OR error information, never both.',
|
|
51
|
+
title='Provide Performance Feedback Response',
|
|
52
|
+
),
|
|
53
|
+
]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/sync_creatives_request.json
|
|
3
|
+
# timestamp: 2025-11-22T16:02:47+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 ..core import context as context_1
|
|
13
|
+
from ..core import creative_asset
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import push_notification_config as push_notification_config_1
|
|
16
|
+
from ..enums import validation_mode as validation_mode_1
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class SyncCreativesRequest(AdCPBaseModel):
|
|
20
|
+
model_config = ConfigDict(
|
|
21
|
+
extra='forbid',
|
|
22
|
+
)
|
|
23
|
+
assignments: Annotated[
|
|
24
|
+
dict[str, list[str]] | None,
|
|
25
|
+
Field(description='Optional bulk assignment of creatives to packages'),
|
|
26
|
+
] = None
|
|
27
|
+
context: context_1.ContextObject | None = None
|
|
28
|
+
creative_ids: Annotated[
|
|
29
|
+
list[str] | None,
|
|
30
|
+
Field(
|
|
31
|
+
description='Optional filter to limit sync scope to specific creative IDs. When provided, only these creatives will be created/updated. Other creatives in the library are unaffected. Useful for partial updates and error recovery.',
|
|
32
|
+
max_length=100,
|
|
33
|
+
),
|
|
34
|
+
] = None
|
|
35
|
+
creatives: Annotated[
|
|
36
|
+
list[creative_asset.CreativeAsset],
|
|
37
|
+
Field(description='Array of creative assets to sync (create or update)', max_length=100),
|
|
38
|
+
]
|
|
39
|
+
delete_missing: Annotated[
|
|
40
|
+
bool | None,
|
|
41
|
+
Field(
|
|
42
|
+
description='When true, creatives not included in this sync will be archived. Use with caution for full library replacement.'
|
|
43
|
+
),
|
|
44
|
+
] = False
|
|
45
|
+
dry_run: Annotated[
|
|
46
|
+
bool | None,
|
|
47
|
+
Field(
|
|
48
|
+
description='When true, preview changes without applying them. Returns what would be created/updated/deleted.'
|
|
49
|
+
),
|
|
50
|
+
] = False
|
|
51
|
+
ext: ext_1.ExtensionObject | None = None
|
|
52
|
+
push_notification_config: Annotated[
|
|
53
|
+
push_notification_config_1.PushNotificationConfig | None,
|
|
54
|
+
Field(
|
|
55
|
+
description='Optional webhook configuration for async sync notifications. Publisher will send webhook when sync completes if operation takes longer than immediate response time (typically for large bulk operations or manual approval/HITL).'
|
|
56
|
+
),
|
|
57
|
+
] = None
|
|
58
|
+
validation_mode: Annotated[
|
|
59
|
+
validation_mode_1.ValidationMode | None,
|
|
60
|
+
Field(
|
|
61
|
+
description="Validation strictness. 'strict' fails entire sync on any validation error. 'lenient' processes valid creatives and reports errors."
|
|
62
|
+
),
|
|
63
|
+
] = validation_mode_1.ValidationMode.strict
|