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,56 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/create_media_buy_response.json
|
|
3
|
+
# timestamp: 2025-11-22T19:16:02+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 error
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import package
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CreateMediaBuyResponse2(AdCPBaseModel):
|
|
19
|
+
model_config = ConfigDict(
|
|
20
|
+
extra='forbid',
|
|
21
|
+
)
|
|
22
|
+
context: context_1.ContextObject | None = None
|
|
23
|
+
errors: Annotated[
|
|
24
|
+
list[error.Error],
|
|
25
|
+
Field(description='Array of errors explaining why the operation failed', min_length=1),
|
|
26
|
+
]
|
|
27
|
+
ext: ext_1.ExtensionObject | None = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class CreateMediaBuyResponse1(AdCPBaseModel):
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
extra='forbid',
|
|
33
|
+
)
|
|
34
|
+
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")]
|
|
35
|
+
context: context_1.ContextObject | None = None
|
|
36
|
+
creative_deadline: Annotated[
|
|
37
|
+
AwareDatetime | None, Field(description='ISO 8601 timestamp for creative upload deadline')
|
|
38
|
+
] = None
|
|
39
|
+
ext: ext_1.ExtensionObject | None = None
|
|
40
|
+
media_buy_id: Annotated[
|
|
41
|
+
str, Field(description="Publisher's unique identifier for the created media buy")
|
|
42
|
+
]
|
|
43
|
+
packages: Annotated[
|
|
44
|
+
list[package.Package],
|
|
45
|
+
Field(description='Array of created packages with complete state information'),
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class CreateMediaBuyResponse(RootModel[CreateMediaBuyResponse1 | CreateMediaBuyResponse2]):
|
|
50
|
+
root: Annotated[
|
|
51
|
+
CreateMediaBuyResponse1 | CreateMediaBuyResponse2,
|
|
52
|
+
Field(
|
|
53
|
+
description='Response payload for create_media_buy task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - the media buy is either fully created or not created at all.',
|
|
54
|
+
title='Create Media Buy Response',
|
|
55
|
+
),
|
|
56
|
+
]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/get_media_buy_delivery_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 ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import ext as ext_1
|
|
14
|
+
from ..enums import media_buy_status
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GetMediaBuyDeliveryRequest(AdCPBaseModel):
|
|
18
|
+
model_config = ConfigDict(
|
|
19
|
+
extra='forbid',
|
|
20
|
+
)
|
|
21
|
+
buyer_refs: Annotated[
|
|
22
|
+
list[str] | None, Field(description='Array of buyer reference IDs to get delivery data for')
|
|
23
|
+
] = None
|
|
24
|
+
context: context_1.ContextObject | None = None
|
|
25
|
+
end_date: Annotated[
|
|
26
|
+
str | None,
|
|
27
|
+
Field(
|
|
28
|
+
description='End date for reporting period (YYYY-MM-DD)',
|
|
29
|
+
pattern='^\\d{4}-\\d{2}-\\d{2}$',
|
|
30
|
+
),
|
|
31
|
+
] = None
|
|
32
|
+
ext: ext_1.ExtensionObject | None = None
|
|
33
|
+
media_buy_ids: Annotated[
|
|
34
|
+
list[str] | None,
|
|
35
|
+
Field(description='Array of publisher media buy IDs to get delivery data for'),
|
|
36
|
+
] = None
|
|
37
|
+
start_date: Annotated[
|
|
38
|
+
str | None,
|
|
39
|
+
Field(
|
|
40
|
+
description='Start date for reporting period (YYYY-MM-DD)',
|
|
41
|
+
pattern='^\\d{4}-\\d{2}-\\d{2}$',
|
|
42
|
+
),
|
|
43
|
+
] = None
|
|
44
|
+
status_filter: Annotated[
|
|
45
|
+
media_buy_status.MediaBuyStatus | list[media_buy_status.MediaBuyStatus] | None,
|
|
46
|
+
Field(description='Filter by status. Can be a single status or array of statuses'),
|
|
47
|
+
] = None
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/get_media_buy_delivery_response.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 AwareDatetime, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from ..core import context as context_1
|
|
14
|
+
from ..core import error
|
|
15
|
+
from ..core import ext as ext_1
|
|
16
|
+
from ..core.delivery_metrics import DeliveryMetrics
|
|
17
|
+
from ..enums import pricing_model as pricing_model_1
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AggregatedTotals(AdCPBaseModel):
|
|
21
|
+
model_config = ConfigDict(
|
|
22
|
+
extra='forbid',
|
|
23
|
+
)
|
|
24
|
+
clicks: Annotated[
|
|
25
|
+
float | None,
|
|
26
|
+
Field(description='Total clicks across all media buys (if applicable)', ge=0.0),
|
|
27
|
+
] = None
|
|
28
|
+
impressions: Annotated[
|
|
29
|
+
float, Field(description='Total impressions delivered across all media buys', ge=0.0)
|
|
30
|
+
]
|
|
31
|
+
media_buy_count: Annotated[
|
|
32
|
+
int, Field(description='Number of media buys included in the response', ge=0)
|
|
33
|
+
]
|
|
34
|
+
spend: Annotated[float, Field(description='Total amount spent across all media buys', ge=0.0)]
|
|
35
|
+
video_completions: Annotated[
|
|
36
|
+
float | None,
|
|
37
|
+
Field(description='Total video completions across all media buys (if applicable)', ge=0.0),
|
|
38
|
+
] = None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class DeliveryStatus(Enum):
|
|
42
|
+
delivering = 'delivering'
|
|
43
|
+
completed = 'completed'
|
|
44
|
+
budget_exhausted = 'budget_exhausted'
|
|
45
|
+
flight_ended = 'flight_ended'
|
|
46
|
+
goal_met = 'goal_met'
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class DailyBreakdownItem(AdCPBaseModel):
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
extra='forbid',
|
|
52
|
+
)
|
|
53
|
+
date: Annotated[str, Field(description='Date (YYYY-MM-DD)', pattern='^\\d{4}-\\d{2}-\\d{2}$')]
|
|
54
|
+
impressions: Annotated[float, Field(description='Daily impressions', ge=0.0)]
|
|
55
|
+
spend: Annotated[float, Field(description='Daily spend', ge=0.0)]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class Status(Enum):
|
|
59
|
+
pending = 'pending'
|
|
60
|
+
active = 'active'
|
|
61
|
+
paused = 'paused'
|
|
62
|
+
completed = 'completed'
|
|
63
|
+
failed = 'failed'
|
|
64
|
+
reporting_delayed = 'reporting_delayed'
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class Totals(DeliveryMetrics):
|
|
68
|
+
effective_rate: Annotated[
|
|
69
|
+
float | None,
|
|
70
|
+
Field(
|
|
71
|
+
description="Effective rate paid per unit based on pricing_model (e.g., actual CPM for 'cpm', actual cost per completed view for 'cpcv', actual cost per point for 'cpp')",
|
|
72
|
+
ge=0.0,
|
|
73
|
+
),
|
|
74
|
+
] = None
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class NotificationType(Enum):
|
|
78
|
+
scheduled = 'scheduled'
|
|
79
|
+
final = 'final'
|
|
80
|
+
delayed = 'delayed'
|
|
81
|
+
adjusted = 'adjusted'
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class ReportingPeriod(AdCPBaseModel):
|
|
85
|
+
model_config = ConfigDict(
|
|
86
|
+
extra='forbid',
|
|
87
|
+
)
|
|
88
|
+
end: Annotated[
|
|
89
|
+
AwareDatetime,
|
|
90
|
+
Field(description='ISO 8601 end timestamp in UTC (e.g., 2024-02-05T23:59:59Z)'),
|
|
91
|
+
]
|
|
92
|
+
start: Annotated[
|
|
93
|
+
AwareDatetime,
|
|
94
|
+
Field(description='ISO 8601 start timestamp in UTC (e.g., 2024-02-05T00:00:00Z)'),
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class ByPackageItem(DeliveryMetrics):
|
|
99
|
+
buyer_ref: Annotated[
|
|
100
|
+
str | None, Field(description="Buyer's reference identifier for this package")
|
|
101
|
+
] = None
|
|
102
|
+
currency: Annotated[
|
|
103
|
+
str,
|
|
104
|
+
Field(
|
|
105
|
+
description="ISO 4217 currency code (e.g., USD, EUR, GBP) for this package's pricing. Indicates the currency in which the rate and spend values are denominated. Different packages can use different currencies when supported by the publisher.",
|
|
106
|
+
pattern='^[A-Z]{3}$',
|
|
107
|
+
),
|
|
108
|
+
]
|
|
109
|
+
delivery_status: Annotated[
|
|
110
|
+
DeliveryStatus | None,
|
|
111
|
+
Field(
|
|
112
|
+
description='System-reported operational state of this package. Reflects actual delivery state independent of buyer pause control.'
|
|
113
|
+
),
|
|
114
|
+
] = None
|
|
115
|
+
pacing_index: Annotated[
|
|
116
|
+
float | None,
|
|
117
|
+
Field(description='Delivery pace (1.0 = on track, <1.0 = behind, >1.0 = ahead)', ge=0.0),
|
|
118
|
+
] = None
|
|
119
|
+
package_id: Annotated[str, Field(description="Publisher's package identifier")]
|
|
120
|
+
paused: Annotated[
|
|
121
|
+
bool | None, Field(description='Whether this package is currently paused by the buyer')
|
|
122
|
+
] = None
|
|
123
|
+
pricing_model: Annotated[
|
|
124
|
+
pricing_model_1.PricingModel,
|
|
125
|
+
Field(
|
|
126
|
+
description='The pricing model used for this package (e.g., cpm, cpcv, cpp). Indicates how the package is billed and which metrics are most relevant for optimization.'
|
|
127
|
+
),
|
|
128
|
+
]
|
|
129
|
+
rate: Annotated[
|
|
130
|
+
float,
|
|
131
|
+
Field(
|
|
132
|
+
description='The pricing rate for this package in the specified currency. For fixed-rate pricing, this is the agreed rate (e.g., CPM rate of 12.50 means $12.50 per 1,000 impressions). For auction-based pricing, this represents the effective rate based on actual delivery.',
|
|
133
|
+
ge=0.0,
|
|
134
|
+
),
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class MediaBuyDelivery(AdCPBaseModel):
|
|
139
|
+
model_config = ConfigDict(
|
|
140
|
+
extra='forbid',
|
|
141
|
+
)
|
|
142
|
+
buyer_ref: Annotated[
|
|
143
|
+
str | None, Field(description="Buyer's reference identifier for this media buy")
|
|
144
|
+
] = None
|
|
145
|
+
by_package: Annotated[list[ByPackageItem], Field(description='Metrics broken down by package')]
|
|
146
|
+
daily_breakdown: Annotated[
|
|
147
|
+
list[DailyBreakdownItem] | None, Field(description='Day-by-day delivery')
|
|
148
|
+
] = None
|
|
149
|
+
expected_availability: Annotated[
|
|
150
|
+
AwareDatetime | None,
|
|
151
|
+
Field(
|
|
152
|
+
description='When delayed data is expected to be available (only present when status is reporting_delayed)'
|
|
153
|
+
),
|
|
154
|
+
] = None
|
|
155
|
+
is_adjusted: Annotated[
|
|
156
|
+
bool | None,
|
|
157
|
+
Field(
|
|
158
|
+
description='Indicates this delivery contains updated data for a previously reported period. Buyer should replace previous period data with these totals.'
|
|
159
|
+
),
|
|
160
|
+
] = None
|
|
161
|
+
media_buy_id: Annotated[str, Field(description="Publisher's media buy identifier")]
|
|
162
|
+
pricing_model: Annotated[
|
|
163
|
+
pricing_model_1.PricingModel | None,
|
|
164
|
+
Field(description='Pricing model used for this media buy'),
|
|
165
|
+
] = None
|
|
166
|
+
status: Annotated[
|
|
167
|
+
Status,
|
|
168
|
+
Field(
|
|
169
|
+
description='Current media buy status. In webhook context, reporting_delayed indicates data temporarily unavailable.'
|
|
170
|
+
),
|
|
171
|
+
]
|
|
172
|
+
totals: Totals
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
class GetMediaBuyDeliveryResponse(AdCPBaseModel):
|
|
176
|
+
model_config = ConfigDict(
|
|
177
|
+
extra='forbid',
|
|
178
|
+
)
|
|
179
|
+
aggregated_totals: Annotated[
|
|
180
|
+
AggregatedTotals | None,
|
|
181
|
+
Field(
|
|
182
|
+
description='Combined metrics across all returned media buys. Only included in API responses (get_media_buy_delivery), not in webhook notifications.'
|
|
183
|
+
),
|
|
184
|
+
] = None
|
|
185
|
+
context: context_1.ContextObject | None = None
|
|
186
|
+
currency: Annotated[str, Field(description='ISO 4217 currency code', pattern='^[A-Z]{3}$')]
|
|
187
|
+
errors: Annotated[
|
|
188
|
+
list[error.Error] | None,
|
|
189
|
+
Field(
|
|
190
|
+
description='Task-specific errors and warnings (e.g., missing delivery data, reporting platform issues)'
|
|
191
|
+
),
|
|
192
|
+
] = None
|
|
193
|
+
ext: ext_1.ExtensionObject | None = None
|
|
194
|
+
media_buy_deliveries: Annotated[
|
|
195
|
+
list[MediaBuyDelivery],
|
|
196
|
+
Field(
|
|
197
|
+
description='Array of delivery data for media buys. When used in webhook notifications, may contain multiple media buys aggregated by publisher. When used in get_media_buy_delivery API responses, typically contains requested media buys.'
|
|
198
|
+
),
|
|
199
|
+
]
|
|
200
|
+
next_expected_at: Annotated[
|
|
201
|
+
AwareDatetime | None,
|
|
202
|
+
Field(
|
|
203
|
+
description="ISO 8601 timestamp for next expected notification (only present in webhook deliveries when notification_type is not 'final')"
|
|
204
|
+
),
|
|
205
|
+
] = None
|
|
206
|
+
notification_type: Annotated[
|
|
207
|
+
NotificationType | None,
|
|
208
|
+
Field(
|
|
209
|
+
description='Type of webhook notification (only present in webhook deliveries): scheduled = regular periodic update, final = campaign completed, delayed = data not yet available, adjusted = resending period with updated data'
|
|
210
|
+
),
|
|
211
|
+
] = None
|
|
212
|
+
partial_data: Annotated[
|
|
213
|
+
bool | None,
|
|
214
|
+
Field(
|
|
215
|
+
description='Indicates if any media buys in this webhook have missing/delayed data (only present in webhook deliveries)'
|
|
216
|
+
),
|
|
217
|
+
] = None
|
|
218
|
+
reporting_period: Annotated[
|
|
219
|
+
ReportingPeriod,
|
|
220
|
+
Field(description='Date range for the report. All periods use UTC timezone.'),
|
|
221
|
+
]
|
|
222
|
+
sequence_number: Annotated[
|
|
223
|
+
int | None,
|
|
224
|
+
Field(
|
|
225
|
+
description='Sequential notification number (only present in webhook deliveries, starts at 1)',
|
|
226
|
+
ge=1,
|
|
227
|
+
),
|
|
228
|
+
] = None
|
|
229
|
+
unavailable_count: Annotated[
|
|
230
|
+
int | None,
|
|
231
|
+
Field(
|
|
232
|
+
description='Number of media buys with reporting_delayed or failed status (only present in webhook deliveries when partial_data is true)',
|
|
233
|
+
ge=0,
|
|
234
|
+
),
|
|
235
|
+
] = None
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/get_products_request.json
|
|
3
|
+
# timestamp: 2025-11-22T15:29:34+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
|
+
from ..core import brand_manifest as brand_manifest_1
|
|
13
|
+
from ..core import context as context_1
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import product_filters
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class GetProductsRequest(AdCPBaseModel):
|
|
19
|
+
model_config = ConfigDict(
|
|
20
|
+
extra='forbid',
|
|
21
|
+
)
|
|
22
|
+
brand_manifest: Annotated[
|
|
23
|
+
brand_manifest_1.BrandManifest | AnyUrl | None,
|
|
24
|
+
Field(
|
|
25
|
+
description='Brand information manifest providing brand context, assets, and product catalog. Can be provided inline or as a URL reference to a hosted manifest.',
|
|
26
|
+
examples=[
|
|
27
|
+
{
|
|
28
|
+
'data': {
|
|
29
|
+
'colors': {'primary': '#FF6B35'},
|
|
30
|
+
'name': 'ACME Corporation',
|
|
31
|
+
'url': 'https://acmecorp.com',
|
|
32
|
+
},
|
|
33
|
+
'description': 'Inline brand manifest',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
'data': 'https://cdn.acmecorp.com/brand-manifest.json',
|
|
37
|
+
'description': 'URL string reference to hosted manifest',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
title='Brand Manifest Reference',
|
|
41
|
+
),
|
|
42
|
+
] = None
|
|
43
|
+
brief: Annotated[
|
|
44
|
+
str | None, Field(description='Natural language description of campaign requirements')
|
|
45
|
+
] = None
|
|
46
|
+
context: context_1.ContextObject | None = None
|
|
47
|
+
ext: ext_1.ExtensionObject | None = None
|
|
48
|
+
filters: product_filters.ProductFilters | None = None
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/get_products_response.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 ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import error
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import product
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class GetProductsResponse(AdCPBaseModel):
|
|
19
|
+
model_config = ConfigDict(
|
|
20
|
+
extra='forbid',
|
|
21
|
+
)
|
|
22
|
+
context: context_1.ContextObject | None = None
|
|
23
|
+
errors: Annotated[
|
|
24
|
+
list[error.Error] | None,
|
|
25
|
+
Field(description='Task-specific errors and warnings (e.g., product filtering issues)'),
|
|
26
|
+
] = None
|
|
27
|
+
ext: ext_1.ExtensionObject | None = None
|
|
28
|
+
products: Annotated[list[product.Product], Field(description='Array of matching products')]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/list_authorized_properties_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 ConfigDict, Field, RootModel
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import ext as ext_1
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class PublisherDomain(RootModel[str]):
|
|
17
|
+
root: Annotated[
|
|
18
|
+
str,
|
|
19
|
+
Field(
|
|
20
|
+
description="Publisher domain to filter by (e.g., 'cnn.com', 'espn.com')",
|
|
21
|
+
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
22
|
+
),
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class ListAuthorizedPropertiesRequest(AdCPBaseModel):
|
|
27
|
+
model_config = ConfigDict(
|
|
28
|
+
extra='forbid',
|
|
29
|
+
)
|
|
30
|
+
context: context_1.ContextObject | None = None
|
|
31
|
+
ext: ext_1.ExtensionObject | None = None
|
|
32
|
+
publisher_domains: Annotated[
|
|
33
|
+
list[PublisherDomain] | None,
|
|
34
|
+
Field(
|
|
35
|
+
description='Filter to specific publisher domains (optional). If omitted, returns all publishers this agent represents.',
|
|
36
|
+
min_length=1,
|
|
37
|
+
),
|
|
38
|
+
] = None
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/list_authorized_properties_response.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 error
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..enums import channels
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class PrimaryCountry(RootModel[str]):
|
|
19
|
+
root: Annotated[str, Field(pattern='^[A-Z]{2}$')]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PublisherDomain(RootModel[str]):
|
|
23
|
+
root: Annotated[
|
|
24
|
+
str,
|
|
25
|
+
Field(
|
|
26
|
+
description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
27
|
+
pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
|
|
28
|
+
),
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ListAuthorizedPropertiesResponse(AdCPBaseModel):
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
extra='forbid',
|
|
35
|
+
)
|
|
36
|
+
advertising_policies: Annotated[
|
|
37
|
+
str | None,
|
|
38
|
+
Field(
|
|
39
|
+
description="Publisher's advertising content policies, restrictions, and guidelines in natural language. May include prohibited categories, blocked advertisers, restricted tactics, brand safety requirements, or links to full policy documentation.",
|
|
40
|
+
max_length=10000,
|
|
41
|
+
min_length=1,
|
|
42
|
+
),
|
|
43
|
+
] = None
|
|
44
|
+
context: context_1.ContextObject | None = None
|
|
45
|
+
errors: Annotated[
|
|
46
|
+
list[error.Error] | None,
|
|
47
|
+
Field(description='Task-specific errors and warnings (e.g., property availability issues)'),
|
|
48
|
+
] = None
|
|
49
|
+
ext: ext_1.ExtensionObject | None = None
|
|
50
|
+
last_updated: Annotated[
|
|
51
|
+
AwareDatetime | None,
|
|
52
|
+
Field(
|
|
53
|
+
description="ISO 8601 timestamp of when the agent's publisher authorization list was last updated. Buyers can use this to determine if their cached publisher adagents.json files might be stale."
|
|
54
|
+
),
|
|
55
|
+
] = None
|
|
56
|
+
portfolio_description: Annotated[
|
|
57
|
+
str | None,
|
|
58
|
+
Field(
|
|
59
|
+
description='Markdown-formatted description of the property portfolio, including inventory types, audience characteristics, and special features.',
|
|
60
|
+
max_length=5000,
|
|
61
|
+
min_length=1,
|
|
62
|
+
),
|
|
63
|
+
] = None
|
|
64
|
+
primary_channels: Annotated[
|
|
65
|
+
list[channels.AdvertisingChannels] | None,
|
|
66
|
+
Field(
|
|
67
|
+
description='Primary advertising channels represented in this property portfolio. Helps buying agents quickly filter relevance.',
|
|
68
|
+
min_length=1,
|
|
69
|
+
),
|
|
70
|
+
] = None
|
|
71
|
+
primary_countries: Annotated[
|
|
72
|
+
list[PrimaryCountry] | None,
|
|
73
|
+
Field(
|
|
74
|
+
description='Primary countries (ISO 3166-1 alpha-2 codes) where properties are concentrated. Helps buying agents quickly filter relevance.',
|
|
75
|
+
min_length=1,
|
|
76
|
+
),
|
|
77
|
+
] = None
|
|
78
|
+
publisher_domains: Annotated[
|
|
79
|
+
list[PublisherDomain],
|
|
80
|
+
Field(
|
|
81
|
+
description="Publisher domains this agent is authorized to represent. Buyers should fetch each publisher's adagents.json to see property definitions and verify this agent is in their authorized_agents list with authorization scope.",
|
|
82
|
+
min_length=1,
|
|
83
|
+
),
|
|
84
|
+
]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/list_creative_formats_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 context as context_1
|
|
13
|
+
from ..core import ext as ext_1
|
|
14
|
+
from ..core import format_id
|
|
15
|
+
from ..enums import asset_content_type, format_category
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ListCreativeFormatsRequest(AdCPBaseModel):
|
|
19
|
+
model_config = ConfigDict(
|
|
20
|
+
extra='forbid',
|
|
21
|
+
)
|
|
22
|
+
asset_types: Annotated[
|
|
23
|
+
list[asset_content_type.AssetContentType] | None,
|
|
24
|
+
Field(
|
|
25
|
+
description="Filter to formats that include these asset types. For third-party tags, search for 'html' or 'javascript'. E.g., ['image', 'text'] returns formats with images and text, ['javascript'] returns formats accepting JavaScript tags."
|
|
26
|
+
),
|
|
27
|
+
] = None
|
|
28
|
+
context: context_1.ContextObject | None = None
|
|
29
|
+
ext: ext_1.ExtensionObject | None = None
|
|
30
|
+
format_ids: Annotated[
|
|
31
|
+
list[format_id.FormatId] | None,
|
|
32
|
+
Field(
|
|
33
|
+
description='Return only these specific format IDs (e.g., from get_products response)'
|
|
34
|
+
),
|
|
35
|
+
] = None
|
|
36
|
+
is_responsive: Annotated[
|
|
37
|
+
bool | None,
|
|
38
|
+
Field(
|
|
39
|
+
description='Filter for responsive formats that adapt to container size. When true, returns formats without fixed dimensions.'
|
|
40
|
+
),
|
|
41
|
+
] = None
|
|
42
|
+
max_height: Annotated[
|
|
43
|
+
int | None,
|
|
44
|
+
Field(
|
|
45
|
+
description='Maximum height in pixels (inclusive). Returns formats where ANY render has height <= this value. For multi-render formats, matches if at least one render fits.'
|
|
46
|
+
),
|
|
47
|
+
] = None
|
|
48
|
+
max_width: Annotated[
|
|
49
|
+
int | None,
|
|
50
|
+
Field(
|
|
51
|
+
description='Maximum width in pixels (inclusive). Returns formats where ANY render has width <= this value. For multi-render formats, matches if at least one render fits.'
|
|
52
|
+
),
|
|
53
|
+
] = None
|
|
54
|
+
min_height: Annotated[
|
|
55
|
+
int | None,
|
|
56
|
+
Field(
|
|
57
|
+
description='Minimum height in pixels (inclusive). Returns formats where ANY render has height >= this value.'
|
|
58
|
+
),
|
|
59
|
+
] = None
|
|
60
|
+
min_width: Annotated[
|
|
61
|
+
int | None,
|
|
62
|
+
Field(
|
|
63
|
+
description='Minimum width in pixels (inclusive). Returns formats where ANY render has width >= this value.'
|
|
64
|
+
),
|
|
65
|
+
] = None
|
|
66
|
+
name_search: Annotated[
|
|
67
|
+
str | None, Field(description='Search for formats by name (case-insensitive partial match)')
|
|
68
|
+
] = None
|
|
69
|
+
type: Annotated[
|
|
70
|
+
format_category.FormatCategory | None,
|
|
71
|
+
Field(
|
|
72
|
+
description='Filter by format type (technical categories with distinct requirements)'
|
|
73
|
+
),
|
|
74
|
+
] = None
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/list_creative_formats_response.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 AnyUrl, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import error
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import format
|
|
16
|
+
from ..enums import creative_agent_capability
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class CreativeAgent(AdCPBaseModel):
|
|
20
|
+
agent_name: Annotated[
|
|
21
|
+
str | None, Field(description='Human-readable name for the creative agent')
|
|
22
|
+
] = None
|
|
23
|
+
agent_url: Annotated[
|
|
24
|
+
AnyUrl,
|
|
25
|
+
Field(
|
|
26
|
+
description="Base URL for the creative agent (e.g., 'https://reference.adcp.org', 'https://dco.example.com'). Call list_creative_formats on this URL to get its formats."
|
|
27
|
+
),
|
|
28
|
+
]
|
|
29
|
+
capabilities: Annotated[
|
|
30
|
+
list[creative_agent_capability.CreativeAgentCapability] | None,
|
|
31
|
+
Field(description='Capabilities this creative agent provides'),
|
|
32
|
+
] = None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ListCreativeFormatsResponse(AdCPBaseModel):
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
extra='forbid',
|
|
38
|
+
)
|
|
39
|
+
context: context_1.ContextObject | None = None
|
|
40
|
+
creative_agents: Annotated[
|
|
41
|
+
list[CreativeAgent] | None,
|
|
42
|
+
Field(
|
|
43
|
+
description='Optional: Creative agents that provide additional formats. Buyers can recursively query these agents to discover more formats. No authentication required for list_creative_formats.'
|
|
44
|
+
),
|
|
45
|
+
] = None
|
|
46
|
+
errors: Annotated[
|
|
47
|
+
list[error.Error] | None,
|
|
48
|
+
Field(description='Task-specific errors and warnings (e.g., format availability issues)'),
|
|
49
|
+
] = None
|
|
50
|
+
ext: ext_1.ExtensionObject | None = None
|
|
51
|
+
formats: Annotated[
|
|
52
|
+
list[format.Format],
|
|
53
|
+
Field(
|
|
54
|
+
description="Full format definitions for all formats this agent supports. Each format's authoritative source is indicated by its agent_url field."
|
|
55
|
+
),
|
|
56
|
+
]
|