adcp 2.18.0__py3-none-any.whl → 2.19.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 +1 -1
- adcp/protocols/mcp.py +3 -1
- adcp/types/_ergonomic.py +0 -4
- adcp/types/_generated.py +85 -4
- adcp/types/generated_poc/adagents.py +239 -149
- adcp/types/generated_poc/core/activation_key.py +8 -8
- adcp/types/generated_poc/core/assets/audio_asset.py +5 -5
- adcp/types/generated_poc/core/assets/css_asset.py +2 -2
- adcp/types/generated_poc/core/assets/daast_asset.py +18 -18
- adcp/types/generated_poc/core/assets/html_asset.py +2 -2
- adcp/types/generated_poc/core/assets/image_asset.py +6 -6
- adcp/types/generated_poc/core/assets/javascript_asset.py +3 -3
- adcp/types/generated_poc/core/assets/text_asset.py +2 -2
- adcp/types/generated_poc/core/assets/url_asset.py +3 -3
- adcp/types/generated_poc/core/assets/vast_asset.py +18 -18
- adcp/types/generated_poc/core/assets/video_asset.py +7 -7
- adcp/types/generated_poc/core/assets/webhook_asset.py +9 -9
- adcp/types/generated_poc/core/async_response_data.py +2 -2
- adcp/types/generated_poc/core/brand_manifest.py +55 -55
- adcp/types/generated_poc/core/brand_manifest_ref.py +9 -9
- adcp/types/generated_poc/core/context.py +1 -1
- adcp/types/generated_poc/core/creative_asset.py +13 -13
- adcp/types/generated_poc/core/creative_assignment.py +3 -3
- adcp/types/generated_poc/core/creative_filters.py +19 -19
- adcp/types/generated_poc/core/creative_manifest.py +2 -2
- adcp/types/generated_poc/core/creative_policy.py +4 -4
- adcp/types/generated_poc/core/delivery_metrics.py +32 -32
- adcp/types/generated_poc/core/deployment.py +20 -20
- adcp/types/generated_poc/core/destination.py +11 -11
- adcp/types/generated_poc/core/error.py +6 -6
- adcp/types/generated_poc/core/ext.py +1 -1
- adcp/types/generated_poc/core/format.py +67 -66
- adcp/types/generated_poc/core/format_id.py +5 -5
- adcp/types/generated_poc/core/frequency_cap.py +2 -2
- adcp/types/generated_poc/core/identifier.py +27 -0
- adcp/types/generated_poc/core/mcp_webhook_payload.py +10 -10
- adcp/types/generated_poc/core/measurement.py +8 -8
- adcp/types/generated_poc/core/media_buy.py +7 -7
- adcp/types/generated_poc/core/package.py +8 -8
- adcp/types/generated_poc/core/performance_feedback.py +18 -18
- adcp/types/generated_poc/core/placement.py +4 -4
- adcp/types/generated_poc/core/pricing_option.py +2 -2
- adcp/types/generated_poc/core/product.py +20 -20
- adcp/types/generated_poc/core/product_filters.py +18 -18
- adcp/types/generated_poc/core/promoted_offerings.py +20 -20
- adcp/types/generated_poc/core/promoted_products.py +2 -2
- adcp/types/generated_poc/core/property.py +9 -9
- adcp/types/generated_poc/core/property_id.py +4 -4
- adcp/types/generated_poc/core/property_list_ref.py +26 -0
- adcp/types/generated_poc/core/property_tag.py +4 -4
- adcp/types/generated_poc/core/protocol_envelope.py +8 -8
- adcp/types/generated_poc/core/publisher_property_selector.py +13 -13
- adcp/types/generated_poc/core/push_notification_config.py +5 -5
- adcp/types/generated_poc/core/reporting_capabilities.py +8 -8
- adcp/types/generated_poc/core/response.py +4 -4
- adcp/types/generated_poc/core/signal_filters.py +5 -5
- adcp/types/generated_poc/core/start_timing.py +5 -5
- adcp/types/generated_poc/core/sub_asset.py +14 -14
- adcp/types/generated_poc/core/targeting.py +8 -8
- adcp/types/generated_poc/creative/list_creative_formats_request.py +20 -20
- adcp/types/generated_poc/creative/list_creative_formats_response.py +5 -5
- adcp/types/generated_poc/creative/preview_creative_request.py +24 -24
- adcp/types/generated_poc/creative/preview_creative_response.py +31 -30
- adcp/types/generated_poc/creative/preview_render.py +25 -25
- adcp/types/generated_poc/enums/adcp_domain.py +5 -3
- adcp/types/generated_poc/enums/asset_content_type.py +13 -13
- adcp/types/generated_poc/enums/auth_scheme.py +2 -2
- adcp/types/generated_poc/enums/available_metric.py +9 -9
- adcp/types/generated_poc/enums/channels.py +9 -9
- adcp/types/generated_poc/enums/co_branding_requirement.py +3 -3
- adcp/types/generated_poc/enums/creative_action.py +5 -5
- adcp/types/generated_poc/enums/creative_agent_capability.py +4 -4
- adcp/types/generated_poc/enums/creative_sort_field.py +6 -6
- adcp/types/generated_poc/enums/creative_status.py +4 -4
- adcp/types/generated_poc/enums/daast_tracking_event.py +11 -11
- adcp/types/generated_poc/enums/daast_version.py +2 -2
- adcp/types/generated_poc/enums/delivery_type.py +2 -2
- adcp/types/generated_poc/enums/dimension_unit.py +4 -4
- adcp/types/generated_poc/enums/feed_format.py +3 -3
- adcp/types/generated_poc/enums/feedback_source.py +4 -4
- adcp/types/generated_poc/enums/format_category.py +7 -7
- adcp/types/generated_poc/enums/format_id_parameter.py +2 -2
- adcp/types/generated_poc/enums/frequency_cap_scope.py +3 -3
- adcp/types/generated_poc/enums/history_entry_type.py +2 -2
- adcp/types/generated_poc/enums/http_method.py +2 -2
- adcp/types/generated_poc/enums/identifier_types.py +19 -19
- adcp/types/generated_poc/enums/javascript_module_type.py +3 -3
- adcp/types/generated_poc/enums/landing_page_requirement.py +3 -3
- adcp/types/generated_poc/enums/markdown_flavor.py +2 -2
- adcp/types/generated_poc/enums/media_buy_status.py +4 -4
- adcp/types/generated_poc/enums/metric_type.py +8 -8
- adcp/types/generated_poc/enums/notification_type.py +4 -4
- adcp/types/generated_poc/enums/pacing.py +3 -3
- adcp/types/generated_poc/enums/preview_output_format.py +2 -2
- adcp/types/generated_poc/enums/pricing_model.py +7 -7
- adcp/types/generated_poc/enums/property_type.py +7 -7
- adcp/types/generated_poc/enums/publisher_identifier_types.py +5 -5
- adcp/types/generated_poc/enums/reporting_frequency.py +3 -3
- adcp/types/generated_poc/enums/signal_catalog_type.py +3 -3
- adcp/types/generated_poc/enums/sort_direction.py +2 -2
- adcp/types/generated_poc/enums/standard_format_ids.py +35 -35
- adcp/types/generated_poc/enums/task_status.py +9 -9
- adcp/types/generated_poc/enums/task_type.py +12 -6
- adcp/types/generated_poc/enums/update_frequency.py +4 -4
- adcp/types/generated_poc/enums/url_asset_type.py +3 -3
- adcp/types/generated_poc/enums/validation_mode.py +2 -2
- adcp/types/generated_poc/enums/vast_tracking_event.py +16 -16
- adcp/types/generated_poc/enums/vast_version.py +5 -5
- adcp/types/generated_poc/enums/webhook_response_type.py +4 -4
- adcp/types/generated_poc/enums/webhook_security_method.py +3 -3
- adcp/types/generated_poc/extensions/__init__.py +3 -0
- adcp/types/generated_poc/extensions/extension_meta.py +50 -0
- adcp/types/generated_poc/media_buy/build_creative_request.py +4 -4
- adcp/types/generated_poc/media_buy/build_creative_response.py +6 -6
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_input_required.py +5 -5
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_submitted.py +1 -1
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_working.py +5 -5
- adcp/types/generated_poc/media_buy/create_media_buy_request.py +25 -25
- adcp/types/generated_poc/media_buy/create_media_buy_response.py +7 -7
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_request.py +8 -8
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_response.py +51 -51
- adcp/types/generated_poc/media_buy/get_products_async_response_input_required.py +6 -6
- adcp/types/generated_poc/media_buy/get_products_async_response_submitted.py +2 -2
- adcp/types/generated_poc/media_buy/get_products_async_response_working.py +4 -4
- adcp/types/generated_poc/media_buy/get_products_request.py +11 -5
- adcp/types/generated_poc/media_buy/get_products_response.py +10 -4
- adcp/types/generated_poc/media_buy/list_authorized_properties_request.py +3 -3
- adcp/types/generated_poc/media_buy/list_authorized_properties_response.py +7 -7
- adcp/types/generated_poc/media_buy/list_creative_formats_request.py +9 -9
- adcp/types/generated_poc/media_buy/list_creative_formats_response.py +5 -5
- adcp/types/generated_poc/media_buy/list_creatives_request.py +24 -24
- adcp/types/generated_poc/media_buy/list_creatives_response.py +52 -52
- adcp/types/generated_poc/media_buy/package_request.py +16 -7
- adcp/types/generated_poc/media_buy/provide_performance_feedback_request.py +19 -19
- adcp/types/generated_poc/media_buy/provide_performance_feedback_response.py +6 -6
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_input_required.py +5 -5
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_submitted.py +1 -1
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_working.py +7 -7
- adcp/types/generated_poc/media_buy/sync_creatives_request.py +7 -7
- adcp/types/generated_poc/media_buy/sync_creatives_response.py +15 -15
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_input_required.py +4 -4
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_submitted.py +1 -1
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_working.py +5 -5
- adcp/types/generated_poc/media_buy/update_media_buy_request.py +37 -29
- adcp/types/generated_poc/media_buy/update_media_buy_response.py +7 -7
- adcp/types/generated_poc/pricing_options/cpc_option.py +8 -8
- adcp/types/generated_poc/pricing_options/cpcv_option.py +8 -8
- adcp/types/generated_poc/pricing_options/cpm_auction_option.py +13 -13
- adcp/types/generated_poc/pricing_options/cpm_fixed_option.py +8 -8
- adcp/types/generated_poc/pricing_options/cpp_option.py +13 -13
- adcp/types/generated_poc/pricing_options/cpv_option.py +12 -12
- adcp/types/generated_poc/pricing_options/flat_rate_option.py +15 -15
- adcp/types/generated_poc/pricing_options/vcpm_auction_option.py +13 -13
- adcp/types/generated_poc/pricing_options/vcpm_fixed_option.py +8 -8
- adcp/types/generated_poc/property/__init__.py +3 -0
- adcp/types/generated_poc/property/base_property_source.py +86 -0
- adcp/types/generated_poc/property/create_property_list_request.py +43 -0
- adcp/types/generated_poc/property/create_property_list_response.py +27 -0
- adcp/types/generated_poc/property/delete_property_list_request.py +22 -0
- adcp/types/generated_poc/property/delete_property_list_response.py +21 -0
- adcp/types/generated_poc/property/feature_requirement.py +42 -0
- adcp/types/generated_poc/property/get_property_list_request.py +34 -0
- adcp/types/generated_poc/property/get_property_list_response.py +61 -0
- adcp/types/generated_poc/property/list_property_features_request.py +25 -0
- adcp/types/generated_poc/property/list_property_features_response.py +24 -0
- adcp/types/generated_poc/property/list_property_lists_request.py +29 -0
- adcp/types/generated_poc/property/list_property_lists_response.py +39 -0
- adcp/types/generated_poc/property/property_error.py +33 -0
- adcp/types/generated_poc/property/property_feature.py +22 -0
- adcp/types/generated_poc/property/property_feature_definition.py +80 -0
- adcp/types/generated_poc/property/property_list.py +62 -0
- adcp/types/generated_poc/property/property_list_changed_webhook.py +51 -0
- adcp/types/generated_poc/property/property_list_filters.py +47 -0
- adcp/types/generated_poc/property/update_property_list_request.py +46 -0
- adcp/types/generated_poc/property/update_property_list_response.py +21 -0
- adcp/types/generated_poc/protocols/adcp_extension.py +26 -10
- adcp/types/generated_poc/signals/activate_signal_request.py +3 -3
- adcp/types/generated_poc/signals/activate_signal_response.py +6 -6
- adcp/types/generated_poc/signals/get_signals_request.py +8 -8
- adcp/types/generated_poc/signals/get_signals_response.py +15 -15
- {adcp-2.18.0.dist-info → adcp-2.19.0.dist-info}/METADATA +1 -1
- adcp-2.19.0.dist-info/RECORD +220 -0
- adcp-2.18.0.dist-info/RECORD +0 -195
- {adcp-2.18.0.dist-info → adcp-2.19.0.dist-info}/WHEEL +0 -0
- {adcp-2.18.0.dist-info → adcp-2.19.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.18.0.dist-info → adcp-2.19.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.18.0.dist-info → adcp-2.19.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: extensions/extension_meta.json
|
|
3
|
+
# timestamp: 2026-01-14T17:08:13+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated, Any, Literal
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import AnyUrl, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AdcpExtensionFileSchema(AdCPBaseModel):
|
|
14
|
+
field_schema: Annotated[
|
|
15
|
+
Literal["http://json-schema.org/draft-07/schema#"], Field(alias="$schema")
|
|
16
|
+
]
|
|
17
|
+
additionalProperties: Annotated[
|
|
18
|
+
Any | None,
|
|
19
|
+
Field(description="Whether additional properties are allowed in the extension data"),
|
|
20
|
+
] = None
|
|
21
|
+
description: Annotated[str, Field(description="Description of what this extension provides")]
|
|
22
|
+
docs_url: Annotated[
|
|
23
|
+
AnyUrl | None, Field(description="URL to documentation for implementors of this extension")
|
|
24
|
+
] = None
|
|
25
|
+
properties: Annotated[
|
|
26
|
+
dict[str, Any],
|
|
27
|
+
Field(description="Schema properties defining the structure of ext.{namespace} data"),
|
|
28
|
+
]
|
|
29
|
+
required: Annotated[
|
|
30
|
+
list[str] | None, Field(description="Required properties within the extension data")
|
|
31
|
+
] = None
|
|
32
|
+
title: Annotated[str, Field(description="Human-readable title for the extension")]
|
|
33
|
+
type: Annotated[
|
|
34
|
+
Literal["object"],
|
|
35
|
+
Field(description="Extensions must be objects (data within ext.{namespace})"),
|
|
36
|
+
]
|
|
37
|
+
valid_from: Annotated[
|
|
38
|
+
str,
|
|
39
|
+
Field(
|
|
40
|
+
description="Minimum AdCP version this extension is compatible with (e.g., '2.5'). Extension will be included in all versioned schema builds >= this version.",
|
|
41
|
+
pattern="^\\d+\\.\\d+$",
|
|
42
|
+
),
|
|
43
|
+
]
|
|
44
|
+
valid_until: Annotated[
|
|
45
|
+
str | None,
|
|
46
|
+
Field(
|
|
47
|
+
description="Last AdCP version this extension is compatible with (e.g., '3.0'). Omit if extension is still valid for current and future versions.",
|
|
48
|
+
pattern="^\\d+\\.\\d+$",
|
|
49
|
+
),
|
|
50
|
+
] = None
|
|
@@ -17,25 +17,25 @@ from ..core import format_id
|
|
|
17
17
|
|
|
18
18
|
class BuildCreativeRequest(AdCPBaseModel):
|
|
19
19
|
model_config = ConfigDict(
|
|
20
|
-
extra=
|
|
20
|
+
extra="allow",
|
|
21
21
|
)
|
|
22
22
|
context: context_1.ContextObject | None = None
|
|
23
23
|
creative_manifest: Annotated[
|
|
24
24
|
creative_manifest_1.CreativeManifest | None,
|
|
25
25
|
Field(
|
|
26
|
-
description=
|
|
26
|
+
description="Creative manifest to transform or generate from. For pure generation, this should include the target format_id and any required input assets (e.g., promoted_offerings for generative formats). For transformation (e.g., resizing, reformatting), this is the complete creative to adapt."
|
|
27
27
|
),
|
|
28
28
|
] = None
|
|
29
29
|
ext: ext_1.ExtensionObject | None = None
|
|
30
30
|
message: Annotated[
|
|
31
31
|
str | None,
|
|
32
32
|
Field(
|
|
33
|
-
description=
|
|
33
|
+
description="Natural language instructions for the transformation or generation. For pure generation, this is the creative brief. For transformation, this provides guidance on how to adapt the creative."
|
|
34
34
|
),
|
|
35
35
|
] = None
|
|
36
36
|
target_format_id: Annotated[
|
|
37
37
|
format_id.FormatId,
|
|
38
38
|
Field(
|
|
39
|
-
description=
|
|
39
|
+
description="Format ID to generate. The format definition specifies required input assets and output structure."
|
|
40
40
|
),
|
|
41
41
|
]
|
|
@@ -17,13 +17,13 @@ from ..core import ext as ext_1
|
|
|
17
17
|
|
|
18
18
|
class BuildCreativeResponse2(AdCPBaseModel):
|
|
19
19
|
model_config = ConfigDict(
|
|
20
|
-
extra=
|
|
20
|
+
extra="allow",
|
|
21
21
|
)
|
|
22
22
|
context: context_1.ContextObject | None = None
|
|
23
23
|
errors: Annotated[
|
|
24
24
|
list[error.Error],
|
|
25
25
|
Field(
|
|
26
|
-
description=
|
|
26
|
+
description="Array of errors explaining why creative generation failed", min_length=1
|
|
27
27
|
),
|
|
28
28
|
]
|
|
29
29
|
ext: ext_1.ExtensionObject | None = None
|
|
@@ -31,12 +31,12 @@ class BuildCreativeResponse2(AdCPBaseModel):
|
|
|
31
31
|
|
|
32
32
|
class BuildCreativeResponse1(AdCPBaseModel):
|
|
33
33
|
model_config = ConfigDict(
|
|
34
|
-
extra=
|
|
34
|
+
extra="allow",
|
|
35
35
|
)
|
|
36
36
|
context: context_1.ContextObject | None = None
|
|
37
37
|
creative_manifest: Annotated[
|
|
38
38
|
creative_manifest_1.CreativeManifest,
|
|
39
|
-
Field(description=
|
|
39
|
+
Field(description="The generated or transformed creative manifest"),
|
|
40
40
|
]
|
|
41
41
|
ext: ext_1.ExtensionObject | None = None
|
|
42
42
|
|
|
@@ -45,7 +45,7 @@ class BuildCreativeResponse(RootModel[BuildCreativeResponse1 | BuildCreativeResp
|
|
|
45
45
|
root: Annotated[
|
|
46
46
|
BuildCreativeResponse1 | BuildCreativeResponse2,
|
|
47
47
|
Field(
|
|
48
|
-
description=
|
|
49
|
-
title=
|
|
48
|
+
description="Response containing the transformed or generated creative manifest, ready for use with preview_creative or sync_creatives. Returns either the complete creative manifest OR error information, never both.",
|
|
49
|
+
title="Build Creative Response",
|
|
50
50
|
),
|
|
51
51
|
]
|
|
@@ -16,22 +16,22 @@ from ..core import ext as ext_1
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class Reason(Enum):
|
|
19
|
-
APPROVAL_REQUIRED =
|
|
20
|
-
BUDGET_EXCEEDS_LIMIT =
|
|
19
|
+
APPROVAL_REQUIRED = "APPROVAL_REQUIRED"
|
|
20
|
+
BUDGET_EXCEEDS_LIMIT = "BUDGET_EXCEEDS_LIMIT"
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
class CreateMediaBuyInputRequired(AdCPBaseModel):
|
|
24
24
|
model_config = ConfigDict(
|
|
25
|
-
extra=
|
|
25
|
+
extra="allow",
|
|
26
26
|
)
|
|
27
27
|
context: context_1.ContextObject | None = None
|
|
28
28
|
errors: Annotated[
|
|
29
29
|
list[error.Error] | None,
|
|
30
30
|
Field(
|
|
31
|
-
description=
|
|
31
|
+
description="Optional validation errors or warnings for debugging purposes. Helps explain why input is required."
|
|
32
32
|
),
|
|
33
33
|
] = None
|
|
34
34
|
ext: ext_1.ExtensionObject | None = None
|
|
35
35
|
reason: Annotated[
|
|
36
|
-
Reason | None, Field(description=
|
|
36
|
+
Reason | None, Field(description="Reason code indicating why input is needed")
|
|
37
37
|
] = None
|
|
@@ -15,17 +15,17 @@ from ..core import ext as ext_1
|
|
|
15
15
|
|
|
16
16
|
class CreateMediaBuyWorking(AdCPBaseModel):
|
|
17
17
|
model_config = ConfigDict(
|
|
18
|
-
extra=
|
|
18
|
+
extra="allow",
|
|
19
19
|
)
|
|
20
20
|
context: context_1.ContextObject | None = None
|
|
21
21
|
current_step: Annotated[
|
|
22
|
-
str | None, Field(description=
|
|
22
|
+
str | None, Field(description="Current step or phase of the operation")
|
|
23
23
|
] = None
|
|
24
24
|
ext: ext_1.ExtensionObject | None = None
|
|
25
25
|
percentage: Annotated[
|
|
26
|
-
float | None, Field(description=
|
|
26
|
+
float | None, Field(description="Completion percentage (0-100)", ge=0.0, le=100.0)
|
|
27
27
|
] = None
|
|
28
|
-
step_number: Annotated[int | None, Field(description=
|
|
28
|
+
step_number: Annotated[int | None, Field(description="Current step number", ge=1)] = None
|
|
29
29
|
total_steps: Annotated[
|
|
30
|
-
int | None, Field(description=
|
|
30
|
+
int | None, Field(description="Total number of steps in the operation", ge=1)
|
|
31
31
|
] = None
|
|
@@ -20,12 +20,12 @@ from . import package_request
|
|
|
20
20
|
|
|
21
21
|
class Authentication(AdCPBaseModel):
|
|
22
22
|
model_config = ConfigDict(
|
|
23
|
-
extra=
|
|
23
|
+
extra="forbid",
|
|
24
24
|
)
|
|
25
25
|
credentials: Annotated[
|
|
26
26
|
str,
|
|
27
27
|
Field(
|
|
28
|
-
description=
|
|
28
|
+
description="Credentials for authentication. For Bearer: token sent in Authorization header. For HMAC-SHA256: shared secret used to generate signature. Minimum 32 characters. Exchanged out-of-band during onboarding.",
|
|
29
29
|
min_length=32,
|
|
30
30
|
),
|
|
31
31
|
]
|
|
@@ -40,35 +40,35 @@ class Authentication(AdCPBaseModel):
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
class ReportingFrequency(Enum):
|
|
43
|
-
hourly =
|
|
44
|
-
daily =
|
|
45
|
-
monthly =
|
|
43
|
+
hourly = "hourly"
|
|
44
|
+
daily = "daily"
|
|
45
|
+
monthly = "monthly"
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
class RequestedMetric(Enum):
|
|
49
|
-
impressions =
|
|
50
|
-
spend =
|
|
51
|
-
clicks =
|
|
52
|
-
ctr =
|
|
53
|
-
video_completions =
|
|
54
|
-
completion_rate =
|
|
55
|
-
conversions =
|
|
56
|
-
viewability =
|
|
57
|
-
engagement_rate =
|
|
49
|
+
impressions = "impressions"
|
|
50
|
+
spend = "spend"
|
|
51
|
+
clicks = "clicks"
|
|
52
|
+
ctr = "ctr"
|
|
53
|
+
video_completions = "video_completions"
|
|
54
|
+
completion_rate = "completion_rate"
|
|
55
|
+
conversions = "conversions"
|
|
56
|
+
viewability = "viewability"
|
|
57
|
+
engagement_rate = "engagement_rate"
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
class ReportingWebhook(AdCPBaseModel):
|
|
61
61
|
model_config = ConfigDict(
|
|
62
|
-
extra=
|
|
62
|
+
extra="allow",
|
|
63
63
|
)
|
|
64
64
|
authentication: Annotated[
|
|
65
65
|
Authentication,
|
|
66
|
-
Field(description=
|
|
66
|
+
Field(description="Authentication configuration for webhook delivery (A2A-compatible)"),
|
|
67
67
|
]
|
|
68
68
|
reporting_frequency: Annotated[
|
|
69
69
|
ReportingFrequency,
|
|
70
70
|
Field(
|
|
71
|
-
description=
|
|
71
|
+
description="Frequency for automated reporting delivery. Must be supported by all products in the media buy."
|
|
72
72
|
),
|
|
73
73
|
]
|
|
74
74
|
requested_metrics: Annotated[
|
|
@@ -80,37 +80,37 @@ class ReportingWebhook(AdCPBaseModel):
|
|
|
80
80
|
token: Annotated[
|
|
81
81
|
str | None,
|
|
82
82
|
Field(
|
|
83
|
-
description=
|
|
83
|
+
description="Optional client-provided token for webhook validation. Echoed back in webhook payload to validate request authenticity.",
|
|
84
84
|
min_length=16,
|
|
85
85
|
),
|
|
86
86
|
] = None
|
|
87
|
-
url: Annotated[AnyUrl, Field(description=
|
|
87
|
+
url: Annotated[AnyUrl, Field(description="Webhook endpoint URL for reporting notifications")]
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
class CreateMediaBuyRequest(AdCPBaseModel):
|
|
91
91
|
model_config = ConfigDict(
|
|
92
|
-
extra=
|
|
92
|
+
extra="allow",
|
|
93
93
|
)
|
|
94
94
|
brand_manifest: Annotated[
|
|
95
95
|
brand_manifest_ref.BrandManifestReference,
|
|
96
96
|
Field(
|
|
97
|
-
description=
|
|
97
|
+
description="Brand information manifest serving as the namespace and identity for this media buy. Provides brand context, assets, and product catalog. Can be provided inline or as a URL reference to a hosted manifest. Can be cached and reused across multiple requests."
|
|
98
98
|
),
|
|
99
99
|
]
|
|
100
100
|
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")]
|
|
101
101
|
context: context_1.ContextObject | None = None
|
|
102
102
|
end_time: Annotated[
|
|
103
|
-
AwareDatetime, Field(description=
|
|
103
|
+
AwareDatetime, Field(description="Campaign end date/time in ISO 8601 format")
|
|
104
104
|
]
|
|
105
105
|
ext: ext_1.ExtensionObject | None = None
|
|
106
106
|
packages: Annotated[
|
|
107
|
-
list[package_request.PackageRequest], Field(description=
|
|
107
|
+
list[package_request.PackageRequest], Field(description="Array of package configurations")
|
|
108
108
|
]
|
|
109
|
-
po_number: Annotated[str | None, Field(description=
|
|
109
|
+
po_number: Annotated[str | None, Field(description="Purchase order number for tracking")] = None
|
|
110
110
|
reporting_webhook: Annotated[
|
|
111
111
|
ReportingWebhook | None,
|
|
112
112
|
Field(
|
|
113
|
-
description=
|
|
113
|
+
description="Optional webhook configuration for automated reporting delivery. Combines push_notification_config structure with reporting-specific fields."
|
|
114
114
|
),
|
|
115
115
|
] = None
|
|
116
116
|
start_time: start_timing.StartTiming
|
|
@@ -17,24 +17,24 @@ from ..core import package
|
|
|
17
17
|
|
|
18
18
|
class CreateMediaBuyResponse2(AdCPBaseModel):
|
|
19
19
|
model_config = ConfigDict(
|
|
20
|
-
extra=
|
|
20
|
+
extra="allow",
|
|
21
21
|
)
|
|
22
22
|
context: context_1.ContextObject | None = None
|
|
23
23
|
errors: Annotated[
|
|
24
24
|
list[error.Error],
|
|
25
|
-
Field(description=
|
|
25
|
+
Field(description="Array of errors explaining why the operation failed", min_length=1),
|
|
26
26
|
]
|
|
27
27
|
ext: ext_1.ExtensionObject | None = None
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class CreateMediaBuyResponse1(AdCPBaseModel):
|
|
31
31
|
model_config = ConfigDict(
|
|
32
|
-
extra=
|
|
32
|
+
extra="allow",
|
|
33
33
|
)
|
|
34
34
|
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")]
|
|
35
35
|
context: context_1.ContextObject | None = None
|
|
36
36
|
creative_deadline: Annotated[
|
|
37
|
-
AwareDatetime | None, Field(description=
|
|
37
|
+
AwareDatetime | None, Field(description="ISO 8601 timestamp for creative upload deadline")
|
|
38
38
|
] = None
|
|
39
39
|
ext: ext_1.ExtensionObject | None = None
|
|
40
40
|
media_buy_id: Annotated[
|
|
@@ -42,7 +42,7 @@ class CreateMediaBuyResponse1(AdCPBaseModel):
|
|
|
42
42
|
]
|
|
43
43
|
packages: Annotated[
|
|
44
44
|
list[package.Package],
|
|
45
|
-
Field(description=
|
|
45
|
+
Field(description="Array of created packages with complete state information"),
|
|
46
46
|
]
|
|
47
47
|
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ class CreateMediaBuyResponse(RootModel[CreateMediaBuyResponse1 | CreateMediaBuyR
|
|
|
50
50
|
root: Annotated[
|
|
51
51
|
CreateMediaBuyResponse1 | CreateMediaBuyResponse2,
|
|
52
52
|
Field(
|
|
53
|
-
description=
|
|
54
|
-
title=
|
|
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
55
|
),
|
|
56
56
|
]
|
|
@@ -16,32 +16,32 @@ from ..enums import media_buy_status
|
|
|
16
16
|
|
|
17
17
|
class GetMediaBuyDeliveryRequest(AdCPBaseModel):
|
|
18
18
|
model_config = ConfigDict(
|
|
19
|
-
extra=
|
|
19
|
+
extra="allow",
|
|
20
20
|
)
|
|
21
21
|
buyer_refs: Annotated[
|
|
22
|
-
list[str] | None, Field(description=
|
|
22
|
+
list[str] | None, Field(description="Array of buyer reference IDs to get delivery data for")
|
|
23
23
|
] = None
|
|
24
24
|
context: context_1.ContextObject | None = None
|
|
25
25
|
end_date: Annotated[
|
|
26
26
|
str | None,
|
|
27
27
|
Field(
|
|
28
|
-
description=
|
|
29
|
-
pattern=
|
|
28
|
+
description="End date for reporting period (YYYY-MM-DD)",
|
|
29
|
+
pattern="^\\d{4}-\\d{2}-\\d{2}$",
|
|
30
30
|
),
|
|
31
31
|
] = None
|
|
32
32
|
ext: ext_1.ExtensionObject | None = None
|
|
33
33
|
media_buy_ids: Annotated[
|
|
34
34
|
list[str] | None,
|
|
35
|
-
Field(description=
|
|
35
|
+
Field(description="Array of publisher media buy IDs to get delivery data for"),
|
|
36
36
|
] = None
|
|
37
37
|
start_date: Annotated[
|
|
38
38
|
str | None,
|
|
39
39
|
Field(
|
|
40
|
-
description=
|
|
41
|
-
pattern=
|
|
40
|
+
description="Start date for reporting period (YYYY-MM-DD)",
|
|
41
|
+
pattern="^\\d{4}-\\d{2}-\\d{2}$",
|
|
42
42
|
),
|
|
43
43
|
] = None
|
|
44
44
|
status_filter: Annotated[
|
|
45
45
|
media_buy_status.MediaBuyStatus | list[media_buy_status.MediaBuyStatus] | None,
|
|
46
|
-
Field(description=
|
|
46
|
+
Field(description="Filter by status. Can be a single status or array of statuses"),
|
|
47
47
|
] = None
|
|
@@ -19,49 +19,49 @@ from ..enums import pricing_model as pricing_model_1
|
|
|
19
19
|
|
|
20
20
|
class AggregatedTotals(AdCPBaseModel):
|
|
21
21
|
model_config = ConfigDict(
|
|
22
|
-
extra=
|
|
22
|
+
extra="allow",
|
|
23
23
|
)
|
|
24
24
|
clicks: Annotated[
|
|
25
25
|
float | None,
|
|
26
|
-
Field(description=
|
|
26
|
+
Field(description="Total clicks across all media buys (if applicable)", ge=0.0),
|
|
27
27
|
] = None
|
|
28
28
|
impressions: Annotated[
|
|
29
|
-
float, Field(description=
|
|
29
|
+
float, Field(description="Total impressions delivered across all media buys", ge=0.0)
|
|
30
30
|
]
|
|
31
31
|
media_buy_count: Annotated[
|
|
32
|
-
int, Field(description=
|
|
32
|
+
int, Field(description="Number of media buys included in the response", ge=0)
|
|
33
33
|
]
|
|
34
|
-
spend: Annotated[float, Field(description=
|
|
34
|
+
spend: Annotated[float, Field(description="Total amount spent across all media buys", ge=0.0)]
|
|
35
35
|
video_completions: Annotated[
|
|
36
36
|
float | None,
|
|
37
|
-
Field(description=
|
|
37
|
+
Field(description="Total video completions across all media buys (if applicable)", ge=0.0),
|
|
38
38
|
] = None
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class DeliveryStatus(Enum):
|
|
42
|
-
delivering =
|
|
43
|
-
completed =
|
|
44
|
-
budget_exhausted =
|
|
45
|
-
flight_ended =
|
|
46
|
-
goal_met =
|
|
42
|
+
delivering = "delivering"
|
|
43
|
+
completed = "completed"
|
|
44
|
+
budget_exhausted = "budget_exhausted"
|
|
45
|
+
flight_ended = "flight_ended"
|
|
46
|
+
goal_met = "goal_met"
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
class DailyBreakdownItem(AdCPBaseModel):
|
|
50
50
|
model_config = ConfigDict(
|
|
51
|
-
extra=
|
|
51
|
+
extra="allow",
|
|
52
52
|
)
|
|
53
|
-
date: Annotated[str, Field(description=
|
|
54
|
-
impressions: Annotated[float, Field(description=
|
|
55
|
-
spend: Annotated[float, Field(description=
|
|
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
56
|
|
|
57
57
|
|
|
58
58
|
class Status(Enum):
|
|
59
|
-
pending =
|
|
60
|
-
active =
|
|
61
|
-
paused =
|
|
62
|
-
completed =
|
|
63
|
-
failed =
|
|
64
|
-
reporting_delayed =
|
|
59
|
+
pending = "pending"
|
|
60
|
+
active = "active"
|
|
61
|
+
paused = "paused"
|
|
62
|
+
completed = "completed"
|
|
63
|
+
failed = "failed"
|
|
64
|
+
reporting_delayed = "reporting_delayed"
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
class Totals(DeliveryMetrics):
|
|
@@ -76,23 +76,23 @@ class Totals(DeliveryMetrics):
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
class NotificationType(Enum):
|
|
79
|
-
scheduled =
|
|
80
|
-
final =
|
|
81
|
-
delayed =
|
|
82
|
-
adjusted =
|
|
79
|
+
scheduled = "scheduled"
|
|
80
|
+
final = "final"
|
|
81
|
+
delayed = "delayed"
|
|
82
|
+
adjusted = "adjusted"
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
class ReportingPeriod(AdCPBaseModel):
|
|
86
86
|
model_config = ConfigDict(
|
|
87
|
-
extra=
|
|
87
|
+
extra="allow",
|
|
88
88
|
)
|
|
89
89
|
end: Annotated[
|
|
90
90
|
AwareDatetime,
|
|
91
|
-
Field(description=
|
|
91
|
+
Field(description="ISO 8601 end timestamp in UTC (e.g., 2024-02-05T23:59:59Z)"),
|
|
92
92
|
]
|
|
93
93
|
start: Annotated[
|
|
94
94
|
AwareDatetime,
|
|
95
|
-
Field(description=
|
|
95
|
+
Field(description="ISO 8601 start timestamp in UTC (e.g., 2024-02-05T00:00:00Z)"),
|
|
96
96
|
]
|
|
97
97
|
|
|
98
98
|
|
|
@@ -104,33 +104,33 @@ class ByPackageItem(DeliveryMetrics):
|
|
|
104
104
|
str,
|
|
105
105
|
Field(
|
|
106
106
|
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.",
|
|
107
|
-
pattern=
|
|
107
|
+
pattern="^[A-Z]{3}$",
|
|
108
108
|
),
|
|
109
109
|
]
|
|
110
110
|
delivery_status: Annotated[
|
|
111
111
|
DeliveryStatus | None,
|
|
112
112
|
Field(
|
|
113
|
-
description=
|
|
113
|
+
description="System-reported operational state of this package. Reflects actual delivery state independent of buyer pause control."
|
|
114
114
|
),
|
|
115
115
|
] = None
|
|
116
116
|
pacing_index: Annotated[
|
|
117
117
|
float | None,
|
|
118
|
-
Field(description=
|
|
118
|
+
Field(description="Delivery pace (1.0 = on track, <1.0 = behind, >1.0 = ahead)", ge=0.0),
|
|
119
119
|
] = None
|
|
120
120
|
package_id: Annotated[str, Field(description="Publisher's package identifier")]
|
|
121
121
|
paused: Annotated[
|
|
122
|
-
bool | None, Field(description=
|
|
122
|
+
bool | None, Field(description="Whether this package is currently paused by the buyer")
|
|
123
123
|
] = None
|
|
124
124
|
pricing_model: Annotated[
|
|
125
125
|
pricing_model_1.PricingModel,
|
|
126
126
|
Field(
|
|
127
|
-
description=
|
|
127
|
+
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."
|
|
128
128
|
),
|
|
129
129
|
]
|
|
130
130
|
rate: Annotated[
|
|
131
131
|
float,
|
|
132
132
|
Field(
|
|
133
|
-
description=
|
|
133
|
+
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.",
|
|
134
134
|
ge=0.0,
|
|
135
135
|
),
|
|
136
136
|
]
|
|
@@ -139,36 +139,36 @@ class ByPackageItem(DeliveryMetrics):
|
|
|
139
139
|
|
|
140
140
|
class MediaBuyDelivery(AdCPBaseModel):
|
|
141
141
|
model_config = ConfigDict(
|
|
142
|
-
extra=
|
|
142
|
+
extra="allow",
|
|
143
143
|
)
|
|
144
144
|
buyer_ref: Annotated[
|
|
145
145
|
str | None, Field(description="Buyer's reference identifier for this media buy")
|
|
146
146
|
] = None
|
|
147
|
-
by_package: Annotated[list[ByPackageItem], Field(description=
|
|
147
|
+
by_package: Annotated[list[ByPackageItem], Field(description="Metrics broken down by package")]
|
|
148
148
|
daily_breakdown: Annotated[
|
|
149
|
-
list[DailyBreakdownItem] | None, Field(description=
|
|
149
|
+
list[DailyBreakdownItem] | None, Field(description="Day-by-day delivery")
|
|
150
150
|
] = None
|
|
151
151
|
expected_availability: Annotated[
|
|
152
152
|
AwareDatetime | None,
|
|
153
153
|
Field(
|
|
154
|
-
description=
|
|
154
|
+
description="When delayed data is expected to be available (only present when status is reporting_delayed)"
|
|
155
155
|
),
|
|
156
156
|
] = None
|
|
157
157
|
is_adjusted: Annotated[
|
|
158
158
|
bool | None,
|
|
159
159
|
Field(
|
|
160
|
-
description=
|
|
160
|
+
description="Indicates this delivery contains updated data for a previously reported period. Buyer should replace previous period data with these totals."
|
|
161
161
|
),
|
|
162
162
|
] = None
|
|
163
163
|
media_buy_id: Annotated[str, Field(description="Publisher's media buy identifier")]
|
|
164
164
|
pricing_model: Annotated[
|
|
165
165
|
pricing_model_1.PricingModel | None,
|
|
166
|
-
Field(description=
|
|
166
|
+
Field(description="Pricing model used for this media buy"),
|
|
167
167
|
] = None
|
|
168
168
|
status: Annotated[
|
|
169
169
|
Status,
|
|
170
170
|
Field(
|
|
171
|
-
description=
|
|
171
|
+
description="Current media buy status. In webhook context, reporting_delayed indicates data temporarily unavailable."
|
|
172
172
|
),
|
|
173
173
|
]
|
|
174
174
|
totals: Totals
|
|
@@ -176,27 +176,27 @@ class MediaBuyDelivery(AdCPBaseModel):
|
|
|
176
176
|
|
|
177
177
|
class GetMediaBuyDeliveryResponse(AdCPBaseModel):
|
|
178
178
|
model_config = ConfigDict(
|
|
179
|
-
extra=
|
|
179
|
+
extra="allow",
|
|
180
180
|
)
|
|
181
181
|
aggregated_totals: Annotated[
|
|
182
182
|
AggregatedTotals | None,
|
|
183
183
|
Field(
|
|
184
|
-
description=
|
|
184
|
+
description="Combined metrics across all returned media buys. Only included in API responses (get_media_buy_delivery), not in webhook notifications."
|
|
185
185
|
),
|
|
186
186
|
] = None
|
|
187
187
|
context: context_1.ContextObject | None = None
|
|
188
|
-
currency: Annotated[str, Field(description=
|
|
188
|
+
currency: Annotated[str, Field(description="ISO 4217 currency code", pattern="^[A-Z]{3}$")]
|
|
189
189
|
errors: Annotated[
|
|
190
190
|
list[error.Error] | None,
|
|
191
191
|
Field(
|
|
192
|
-
description=
|
|
192
|
+
description="Task-specific errors and warnings (e.g., missing delivery data, reporting platform issues)"
|
|
193
193
|
),
|
|
194
194
|
] = None
|
|
195
195
|
ext: ext_1.ExtensionObject | None = None
|
|
196
196
|
media_buy_deliveries: Annotated[
|
|
197
197
|
list[MediaBuyDelivery],
|
|
198
198
|
Field(
|
|
199
|
-
description=
|
|
199
|
+
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."
|
|
200
200
|
),
|
|
201
201
|
]
|
|
202
202
|
next_expected_at: Annotated[
|
|
@@ -208,30 +208,30 @@ class GetMediaBuyDeliveryResponse(AdCPBaseModel):
|
|
|
208
208
|
notification_type: Annotated[
|
|
209
209
|
NotificationType | None,
|
|
210
210
|
Field(
|
|
211
|
-
description=
|
|
211
|
+
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"
|
|
212
212
|
),
|
|
213
213
|
] = None
|
|
214
214
|
partial_data: Annotated[
|
|
215
215
|
bool | None,
|
|
216
216
|
Field(
|
|
217
|
-
description=
|
|
217
|
+
description="Indicates if any media buys in this webhook have missing/delayed data (only present in webhook deliveries)"
|
|
218
218
|
),
|
|
219
219
|
] = None
|
|
220
220
|
reporting_period: Annotated[
|
|
221
221
|
ReportingPeriod,
|
|
222
|
-
Field(description=
|
|
222
|
+
Field(description="Date range for the report. All periods use UTC timezone."),
|
|
223
223
|
]
|
|
224
224
|
sequence_number: Annotated[
|
|
225
225
|
int | None,
|
|
226
226
|
Field(
|
|
227
|
-
description=
|
|
227
|
+
description="Sequential notification number (only present in webhook deliveries, starts at 1)",
|
|
228
228
|
ge=1,
|
|
229
229
|
),
|
|
230
230
|
] = None
|
|
231
231
|
unavailable_count: Annotated[
|
|
232
232
|
int | None,
|
|
233
233
|
Field(
|
|
234
|
-
description=
|
|
234
|
+
description="Number of media buys with reporting_delayed or failed status (only present in webhook deliveries when partial_data is true)",
|
|
235
235
|
ge=0,
|
|
236
236
|
),
|
|
237
237
|
] = None
|