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,27 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/creative_assignment.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
|
+
|
|
13
|
+
class CreativeAssignment(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
creative_id: Annotated[str, Field(description='Unique identifier for the creative')]
|
|
18
|
+
placement_ids: Annotated[
|
|
19
|
+
list[str] | None,
|
|
20
|
+
Field(
|
|
21
|
+
description="Optional array of placement IDs where this creative should run. When omitted, the creative runs on all placements in the package. References placement_id values from the product's placements array.",
|
|
22
|
+
min_length=1,
|
|
23
|
+
),
|
|
24
|
+
] = None
|
|
25
|
+
weight: Annotated[
|
|
26
|
+
float | None, Field(description='Delivery weight for this creative', ge=0.0, le=100.0)
|
|
27
|
+
] = None
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/creative_filters.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 AwareDatetime, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..enums import creative_status
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CreativeFilters(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra='forbid',
|
|
18
|
+
)
|
|
19
|
+
assigned_to_package: Annotated[
|
|
20
|
+
str | None, Field(description='Filter creatives assigned to this specific package')
|
|
21
|
+
] = None
|
|
22
|
+
assigned_to_packages: Annotated[
|
|
23
|
+
list[str] | None, Field(description='Filter creatives assigned to any of these packages')
|
|
24
|
+
] = None
|
|
25
|
+
buyer_refs: Annotated[
|
|
26
|
+
list[str] | None,
|
|
27
|
+
Field(
|
|
28
|
+
description='Filter creatives assigned to media buys with any of these buyer references'
|
|
29
|
+
),
|
|
30
|
+
] = None
|
|
31
|
+
created_after: Annotated[
|
|
32
|
+
AwareDatetime | None,
|
|
33
|
+
Field(description='Filter creatives created after this date (ISO 8601)'),
|
|
34
|
+
] = None
|
|
35
|
+
created_before: Annotated[
|
|
36
|
+
AwareDatetime | None,
|
|
37
|
+
Field(description='Filter creatives created before this date (ISO 8601)'),
|
|
38
|
+
] = None
|
|
39
|
+
creative_ids: Annotated[
|
|
40
|
+
list[str] | None, Field(description='Filter by specific creative IDs', max_length=100)
|
|
41
|
+
] = None
|
|
42
|
+
format: Annotated[
|
|
43
|
+
str | None,
|
|
44
|
+
Field(description='Filter by creative format type (e.g., video, audio, display)'),
|
|
45
|
+
] = None
|
|
46
|
+
formats: Annotated[
|
|
47
|
+
list[str] | None, Field(description='Filter by multiple creative format types')
|
|
48
|
+
] = None
|
|
49
|
+
has_performance_data: Annotated[
|
|
50
|
+
bool | None, Field(description='Filter creatives that have performance data when true')
|
|
51
|
+
] = None
|
|
52
|
+
media_buy_ids: Annotated[
|
|
53
|
+
list[str] | None, Field(description='Filter creatives assigned to any of these media buys')
|
|
54
|
+
] = None
|
|
55
|
+
name_contains: Annotated[
|
|
56
|
+
str | None,
|
|
57
|
+
Field(description='Filter by creative names containing this text (case-insensitive)'),
|
|
58
|
+
] = None
|
|
59
|
+
status: Annotated[
|
|
60
|
+
creative_status.CreativeStatus | None,
|
|
61
|
+
Field(description='Filter by creative approval status'),
|
|
62
|
+
] = None
|
|
63
|
+
statuses: Annotated[
|
|
64
|
+
list[creative_status.CreativeStatus] | None,
|
|
65
|
+
Field(description='Filter by multiple creative statuses'),
|
|
66
|
+
] = None
|
|
67
|
+
tags: Annotated[
|
|
68
|
+
list[str] | None, Field(description='Filter by creative tags (all tags must match)')
|
|
69
|
+
] = None
|
|
70
|
+
tags_any: Annotated[
|
|
71
|
+
list[str] | None, Field(description='Filter by creative tags (any tag must match)')
|
|
72
|
+
] = None
|
|
73
|
+
unassigned: Annotated[
|
|
74
|
+
bool | None,
|
|
75
|
+
Field(
|
|
76
|
+
description='Filter for unassigned creatives when true, assigned creatives when false'
|
|
77
|
+
),
|
|
78
|
+
] = None
|
|
79
|
+
updated_after: Annotated[
|
|
80
|
+
AwareDatetime | None,
|
|
81
|
+
Field(description='Filter creatives last updated after this date (ISO 8601)'),
|
|
82
|
+
] = None
|
|
83
|
+
updated_before: Annotated[
|
|
84
|
+
AwareDatetime | None,
|
|
85
|
+
Field(description='Filter creatives last updated before this date (ISO 8601)'),
|
|
86
|
+
] = None
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/creative_manifest.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 . import ext as ext_1
|
|
13
|
+
from . import format_id as format_id_1
|
|
14
|
+
from . import promoted_offerings
|
|
15
|
+
from .assets import (
|
|
16
|
+
audio_asset,
|
|
17
|
+
css_asset,
|
|
18
|
+
daast_asset,
|
|
19
|
+
html_asset,
|
|
20
|
+
image_asset,
|
|
21
|
+
javascript_asset,
|
|
22
|
+
text_asset,
|
|
23
|
+
url_asset,
|
|
24
|
+
vast_asset,
|
|
25
|
+
video_asset,
|
|
26
|
+
webhook_asset,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class CreativeManifest(AdCPBaseModel):
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
extra='forbid',
|
|
33
|
+
)
|
|
34
|
+
assets: Annotated[
|
|
35
|
+
dict[
|
|
36
|
+
str,
|
|
37
|
+
image_asset.ImageAsset
|
|
38
|
+
| video_asset.VideoAsset
|
|
39
|
+
| audio_asset.AudioAsset
|
|
40
|
+
| text_asset.TextAsset
|
|
41
|
+
| url_asset.UrlAsset
|
|
42
|
+
| html_asset.HtmlAsset
|
|
43
|
+
| javascript_asset.JavascriptAsset
|
|
44
|
+
| webhook_asset.WebhookAsset
|
|
45
|
+
| css_asset.CssAsset
|
|
46
|
+
| promoted_offerings.PromotedOfferings
|
|
47
|
+
| vast_asset.VastAsset1
|
|
48
|
+
| vast_asset.VastAsset2
|
|
49
|
+
| daast_asset.DaastAsset1
|
|
50
|
+
| daast_asset.DaastAsset2,
|
|
51
|
+
],
|
|
52
|
+
Field(
|
|
53
|
+
description="Map of asset IDs to actual asset content. Each key MUST match an asset_id from the format's assets_required array (e.g., 'banner_image', 'clickthrough_url', 'video_file', 'vast_tag'). The asset_id is the technical identifier used to match assets to format requirements.\n\nIMPORTANT: Creative manifest validation MUST be performed in the context of the format specification. The format defines what type each asset_id should be, which eliminates any validation ambiguity."
|
|
54
|
+
),
|
|
55
|
+
]
|
|
56
|
+
ext: ext_1.ExtensionObject | None = None
|
|
57
|
+
format_id: Annotated[
|
|
58
|
+
format_id_1.FormatId,
|
|
59
|
+
Field(
|
|
60
|
+
description="Format identifier this manifest is for. Can be a template format (id only) or a deterministic format (id + dimensions/duration). For dimension-specific creatives, include width/height/unit in the format_id to create a unique identifier (e.g., {id: 'display_static', width: 300, height: 250, unit: 'px'})."
|
|
61
|
+
),
|
|
62
|
+
]
|
|
63
|
+
promoted_offering: Annotated[
|
|
64
|
+
str | None,
|
|
65
|
+
Field(
|
|
66
|
+
description='Product name or offering being advertised. Maps to promoted_offerings in create_media_buy request to associate creative with the product being promoted.'
|
|
67
|
+
),
|
|
68
|
+
] = None
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/creative_policy.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 ..enums import co_branding_requirement, landing_page_requirement
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CreativePolicy(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra='forbid',
|
|
18
|
+
)
|
|
19
|
+
co_branding: Annotated[
|
|
20
|
+
co_branding_requirement.CoBrandingRequirement, Field(description='Co-branding requirement')
|
|
21
|
+
]
|
|
22
|
+
landing_page: Annotated[
|
|
23
|
+
landing_page_requirement.LandingPageRequirement,
|
|
24
|
+
Field(description='Landing page requirements'),
|
|
25
|
+
]
|
|
26
|
+
templates_available: Annotated[
|
|
27
|
+
bool, Field(description='Whether creative templates are provided')
|
|
28
|
+
]
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/delivery_metrics.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
|
+
|
|
13
|
+
class VenueBreakdownItem(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
impressions: Annotated[int, Field(description='Impressions delivered at this venue', ge=0)]
|
|
18
|
+
loop_plays: Annotated[int | None, Field(description='Loop plays at this venue', ge=0)] = None
|
|
19
|
+
screens_used: Annotated[
|
|
20
|
+
int | None, Field(description='Number of screens used at this venue', ge=0)
|
|
21
|
+
] = None
|
|
22
|
+
venue_id: Annotated[str, Field(description='Venue identifier')]
|
|
23
|
+
venue_name: Annotated[str | None, Field(description='Human-readable venue name')] = None
|
|
24
|
+
venue_type: Annotated[
|
|
25
|
+
str | None,
|
|
26
|
+
Field(description="Venue type (e.g., 'airport', 'transit', 'retail', 'billboard')"),
|
|
27
|
+
] = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class DoohMetrics(AdCPBaseModel):
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
extra='forbid',
|
|
33
|
+
)
|
|
34
|
+
calculation_notes: Annotated[
|
|
35
|
+
str | None, Field(description='Explanation of how DOOH impressions were calculated')
|
|
36
|
+
] = None
|
|
37
|
+
loop_plays: Annotated[
|
|
38
|
+
int | None, Field(description='Number of times ad played in rotation', ge=0)
|
|
39
|
+
] = None
|
|
40
|
+
screen_time_seconds: Annotated[
|
|
41
|
+
int | None, Field(description='Total display time in seconds', ge=0)
|
|
42
|
+
] = None
|
|
43
|
+
screens_used: Annotated[
|
|
44
|
+
int | None, Field(description='Number of unique screens displaying the ad', ge=0)
|
|
45
|
+
] = None
|
|
46
|
+
sov_achieved: Annotated[
|
|
47
|
+
float | None,
|
|
48
|
+
Field(description='Actual share of voice delivered (0.0 to 1.0)', ge=0.0, le=1.0),
|
|
49
|
+
] = None
|
|
50
|
+
venue_breakdown: Annotated[
|
|
51
|
+
list[VenueBreakdownItem] | None, Field(description='Per-venue performance breakdown')
|
|
52
|
+
] = None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class QuartileData(AdCPBaseModel):
|
|
56
|
+
q1_views: Annotated[float | None, Field(description='25% completion views', ge=0.0)] = None
|
|
57
|
+
q2_views: Annotated[float | None, Field(description='50% completion views', ge=0.0)] = None
|
|
58
|
+
q3_views: Annotated[float | None, Field(description='75% completion views', ge=0.0)] = None
|
|
59
|
+
q4_views: Annotated[float | None, Field(description='100% completion views', ge=0.0)] = None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class DeliveryMetrics(AdCPBaseModel):
|
|
63
|
+
model_config = ConfigDict(
|
|
64
|
+
extra='allow',
|
|
65
|
+
)
|
|
66
|
+
clicks: Annotated[float | None, Field(description='Total clicks', ge=0.0)] = None
|
|
67
|
+
completed_views: Annotated[
|
|
68
|
+
float | None, Field(description='100% completions (for CPCV)', ge=0.0)
|
|
69
|
+
] = None
|
|
70
|
+
completion_rate: Annotated[
|
|
71
|
+
float | None,
|
|
72
|
+
Field(description='Completion rate (completed_views/impressions)', ge=0.0, le=1.0),
|
|
73
|
+
] = None
|
|
74
|
+
conversions: Annotated[
|
|
75
|
+
float | None,
|
|
76
|
+
Field(description='Conversions (reserved for future CPA pricing support)', ge=0.0),
|
|
77
|
+
] = None
|
|
78
|
+
ctr: Annotated[
|
|
79
|
+
float | None, Field(description='Click-through rate (clicks/impressions)', ge=0.0, le=1.0)
|
|
80
|
+
] = None
|
|
81
|
+
dooh_metrics: Annotated[
|
|
82
|
+
DoohMetrics | None,
|
|
83
|
+
Field(description='DOOH-specific metrics (only included for DOOH campaigns)'),
|
|
84
|
+
] = None
|
|
85
|
+
frequency: Annotated[
|
|
86
|
+
float | None,
|
|
87
|
+
Field(
|
|
88
|
+
description='Average frequency per individual (typically measured over campaign duration, but can vary by measurement provider)',
|
|
89
|
+
ge=0.0,
|
|
90
|
+
),
|
|
91
|
+
] = None
|
|
92
|
+
grps: Annotated[
|
|
93
|
+
float | None, Field(description='Gross Rating Points delivered (for CPP)', ge=0.0)
|
|
94
|
+
] = None
|
|
95
|
+
impressions: Annotated[float | None, Field(description='Impressions delivered', ge=0.0)] = None
|
|
96
|
+
leads: Annotated[
|
|
97
|
+
float | None,
|
|
98
|
+
Field(description='Leads generated (reserved for future CPL pricing support)', ge=0.0),
|
|
99
|
+
] = None
|
|
100
|
+
quartile_data: Annotated[
|
|
101
|
+
QuartileData | None, Field(description='Video quartile completion data')
|
|
102
|
+
] = None
|
|
103
|
+
reach: Annotated[
|
|
104
|
+
float | None,
|
|
105
|
+
Field(
|
|
106
|
+
description='Unique reach - units depend on measurement provider (e.g., individuals, households, devices, cookies). See delivery_measurement.provider for methodology.',
|
|
107
|
+
ge=0.0,
|
|
108
|
+
),
|
|
109
|
+
] = None
|
|
110
|
+
spend: Annotated[float | None, Field(description='Amount spent', ge=0.0)] = None
|
|
111
|
+
views: Annotated[float | None, Field(description='Views at threshold (for CPV)', ge=0.0)] = None
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/deployment.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+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 AnyUrl, AwareDatetime, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from . import activation_key as activation_key_1
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Deployment1(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra='forbid',
|
|
18
|
+
)
|
|
19
|
+
account: Annotated[str | None, Field(description='Account identifier if applicable')] = None
|
|
20
|
+
activation_key: Annotated[
|
|
21
|
+
activation_key_1.ActivationKey1 | activation_key_1.ActivationKey2 | None,
|
|
22
|
+
Field(
|
|
23
|
+
description='The key to use for targeting. Only present if is_live=true AND requester has access to this deployment.',
|
|
24
|
+
title='Activation Key',
|
|
25
|
+
),
|
|
26
|
+
] = None
|
|
27
|
+
deployed_at: Annotated[
|
|
28
|
+
AwareDatetime | None,
|
|
29
|
+
Field(description='Timestamp when activation completed (if is_live=true)'),
|
|
30
|
+
] = None
|
|
31
|
+
estimated_activation_duration_minutes: Annotated[
|
|
32
|
+
float | None,
|
|
33
|
+
Field(
|
|
34
|
+
description='Estimated time to activate if not live, or to complete activation if in progress',
|
|
35
|
+
ge=0.0,
|
|
36
|
+
),
|
|
37
|
+
] = None
|
|
38
|
+
is_live: Annotated[
|
|
39
|
+
bool, Field(description='Whether signal is currently active on this deployment')
|
|
40
|
+
]
|
|
41
|
+
platform: Annotated[str, Field(description='Platform identifier for DSPs')]
|
|
42
|
+
type: Annotated[
|
|
43
|
+
Literal['platform'],
|
|
44
|
+
Field(description='Discriminator indicating this is a platform-based deployment'),
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class Deployment2(AdCPBaseModel):
|
|
49
|
+
model_config = ConfigDict(
|
|
50
|
+
extra='forbid',
|
|
51
|
+
)
|
|
52
|
+
account: Annotated[str | None, Field(description='Account identifier if applicable')] = None
|
|
53
|
+
activation_key: Annotated[
|
|
54
|
+
activation_key_1.ActivationKey1 | activation_key_1.ActivationKey2 | None,
|
|
55
|
+
Field(
|
|
56
|
+
description='The key to use for targeting. Only present if is_live=true AND requester has access to this deployment.',
|
|
57
|
+
title='Activation Key',
|
|
58
|
+
),
|
|
59
|
+
] = None
|
|
60
|
+
agent_url: Annotated[AnyUrl, Field(description='URL identifying the deployment agent')]
|
|
61
|
+
deployed_at: Annotated[
|
|
62
|
+
AwareDatetime | None,
|
|
63
|
+
Field(description='Timestamp when activation completed (if is_live=true)'),
|
|
64
|
+
] = None
|
|
65
|
+
estimated_activation_duration_minutes: Annotated[
|
|
66
|
+
float | None,
|
|
67
|
+
Field(
|
|
68
|
+
description='Estimated time to activate if not live, or to complete activation if in progress',
|
|
69
|
+
ge=0.0,
|
|
70
|
+
),
|
|
71
|
+
] = None
|
|
72
|
+
is_live: Annotated[
|
|
73
|
+
bool, Field(description='Whether signal is currently active on this deployment')
|
|
74
|
+
]
|
|
75
|
+
type: Annotated[
|
|
76
|
+
Literal['agent'],
|
|
77
|
+
Field(description='Discriminator indicating this is an agent URL-based deployment'),
|
|
78
|
+
]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/destination.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+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 AnyUrl, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Destination1(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
account: Annotated[
|
|
18
|
+
str | None, Field(description='Optional account identifier on the platform')
|
|
19
|
+
] = None
|
|
20
|
+
platform: Annotated[
|
|
21
|
+
str,
|
|
22
|
+
Field(description="Platform identifier for DSPs (e.g., 'the-trade-desk', 'amazon-dsp')"),
|
|
23
|
+
]
|
|
24
|
+
type: Annotated[
|
|
25
|
+
Literal['platform'],
|
|
26
|
+
Field(description='Discriminator indicating this is a platform-based deployment'),
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class Destination2(AdCPBaseModel):
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
extra='forbid',
|
|
33
|
+
)
|
|
34
|
+
account: Annotated[
|
|
35
|
+
str | None, Field(description='Optional account identifier on the agent')
|
|
36
|
+
] = None
|
|
37
|
+
agent_url: Annotated[
|
|
38
|
+
AnyUrl, Field(description='URL identifying the deployment agent (for sales agents, etc.)')
|
|
39
|
+
]
|
|
40
|
+
type: Annotated[
|
|
41
|
+
Literal['agent'],
|
|
42
|
+
Field(description='Discriminator indicating this is an agent URL-based deployment'),
|
|
43
|
+
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/dimensions.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 ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Dimensions(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
height: Annotated[int, Field(description='Height in pixels', ge=1)]
|
|
18
|
+
width: Annotated[int, Field(description='Width in pixels', ge=1)]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/error.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+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 ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Error(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
code: Annotated[str, Field(description='Error code for programmatic handling')]
|
|
18
|
+
details: Annotated[Any | None, Field(description='Additional task-specific error details')] = (
|
|
19
|
+
None
|
|
20
|
+
)
|
|
21
|
+
field: Annotated[
|
|
22
|
+
str | None,
|
|
23
|
+
Field(description="Field path associated with the error (e.g., 'packages[0].targeting')"),
|
|
24
|
+
] = None
|
|
25
|
+
message: Annotated[str, Field(description='Human-readable error message')]
|
|
26
|
+
retry_after: Annotated[
|
|
27
|
+
float | None, Field(description='Seconds to wait before retrying the operation', ge=0.0)
|
|
28
|
+
] = None
|
|
29
|
+
suggestion: Annotated[str | None, Field(description='Suggested fix for the error')] = None
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/ext.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from adcp.types.base import AdCPBaseModel
|
|
8
|
+
from pydantic import ConfigDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ExtensionObject(AdCPBaseModel):
|
|
12
|
+
pass
|
|
13
|
+
model_config = ConfigDict(
|
|
14
|
+
extra='allow',
|
|
15
|
+
)
|