adcp 2.17.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/ADCP_VERSION +1 -1
- adcp/__init__.py +22 -1
- adcp/__main__.py +72 -0
- adcp/protocols/mcp.py +3 -1
- adcp/types/_ergonomic.py +0 -4
- adcp/types/_generated.py +91 -4
- adcp/types/generated_poc/adagents.py +239 -149
- adcp/types/generated_poc/core/activation_key.py +9 -9
- adcp/types/generated_poc/core/assets/audio_asset.py +6 -6
- adcp/types/generated_poc/core/assets/css_asset.py +3 -3
- adcp/types/generated_poc/core/assets/daast_asset.py +19 -19
- adcp/types/generated_poc/core/assets/html_asset.py +3 -3
- adcp/types/generated_poc/core/assets/image_asset.py +7 -7
- adcp/types/generated_poc/core/assets/javascript_asset.py +4 -4
- adcp/types/generated_poc/core/assets/text_asset.py +3 -3
- adcp/types/generated_poc/core/assets/url_asset.py +4 -4
- adcp/types/generated_poc/core/assets/vast_asset.py +19 -19
- adcp/types/generated_poc/core/assets/video_asset.py +8 -8
- adcp/types/generated_poc/core/assets/webhook_asset.py +10 -10
- adcp/types/generated_poc/core/async_response_data.py +2 -2
- adcp/types/generated_poc/core/brand_manifest.py +56 -56
- adcp/types/generated_poc/core/brand_manifest_ref.py +9 -9
- adcp/types/generated_poc/core/context.py +2 -3
- adcp/types/generated_poc/core/creative_asset.py +14 -14
- adcp/types/generated_poc/core/creative_assignment.py +4 -4
- adcp/types/generated_poc/core/creative_filters.py +20 -20
- adcp/types/generated_poc/core/creative_manifest.py +3 -3
- adcp/types/generated_poc/core/creative_policy.py +5 -5
- adcp/types/generated_poc/core/delivery_metrics.py +33 -33
- adcp/types/generated_poc/core/deployment.py +21 -21
- adcp/types/generated_poc/core/destination.py +12 -12
- adcp/types/generated_poc/core/error.py +9 -9
- adcp/types/generated_poc/core/ext.py +2 -3
- adcp/types/generated_poc/core/format.py +139 -51
- adcp/types/generated_poc/core/format_id.py +6 -6
- adcp/types/generated_poc/core/frequency_cap.py +3 -3
- 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 +9 -9
- adcp/types/generated_poc/core/media_buy.py +8 -8
- adcp/types/generated_poc/core/package.py +9 -9
- adcp/types/generated_poc/core/performance_feedback.py +19 -19
- adcp/types/generated_poc/core/placement.py +5 -5
- adcp/types/generated_poc/core/pricing_option.py +2 -2
- adcp/types/generated_poc/core/product.py +21 -21
- adcp/types/generated_poc/core/product_filters.py +19 -19
- adcp/types/generated_poc/core/promoted_offerings.py +21 -21
- adcp/types/generated_poc/core/promoted_products.py +3 -3
- adcp/types/generated_poc/core/property.py +10 -10
- 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 +9 -9
- adcp/types/generated_poc/core/publisher_property_selector.py +14 -14
- adcp/types/generated_poc/core/push_notification_config.py +5 -5
- adcp/types/generated_poc/core/reporting_capabilities.py +9 -9
- adcp/types/generated_poc/core/response.py +5 -5
- adcp/types/generated_poc/core/signal_filters.py +6 -6
- adcp/types/generated_poc/core/start_timing.py +5 -5
- adcp/types/generated_poc/core/sub_asset.py +15 -15
- adcp/types/generated_poc/core/targeting.py +9 -9
- adcp/types/generated_poc/creative/list_creative_formats_request.py +21 -21
- adcp/types/generated_poc/creative/list_creative_formats_response.py +6 -6
- adcp/types/generated_poc/creative/preview_creative_request.py +26 -26
- adcp/types/generated_poc/creative/preview_creative_response.py +31 -30
- adcp/types/generated_poc/creative/preview_render.py +26 -26
- 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 +5 -5
- adcp/types/generated_poc/media_buy/build_creative_response.py +7 -7
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_input_required.py +6 -6
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_submitted.py +2 -2
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_working.py +6 -6
- adcp/types/generated_poc/media_buy/create_media_buy_request.py +64 -23
- adcp/types/generated_poc/media_buy/create_media_buy_response.py +8 -8
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_request.py +9 -9
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_response.py +52 -52
- adcp/types/generated_poc/media_buy/get_products_async_response_input_required.py +7 -7
- adcp/types/generated_poc/media_buy/get_products_async_response_submitted.py +3 -3
- adcp/types/generated_poc/media_buy/get_products_async_response_working.py +5 -5
- 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 +4 -4
- adcp/types/generated_poc/media_buy/list_authorized_properties_response.py +8 -8
- adcp/types/generated_poc/media_buy/list_creative_formats_request.py +10 -10
- adcp/types/generated_poc/media_buy/list_creative_formats_response.py +6 -6
- adcp/types/generated_poc/media_buy/list_creatives_request.py +24 -24
- adcp/types/generated_poc/media_buy/list_creatives_response.py +53 -53
- adcp/types/generated_poc/media_buy/package_request.py +16 -7
- adcp/types/generated_poc/media_buy/provide_performance_feedback_request.py +20 -20
- adcp/types/generated_poc/media_buy/provide_performance_feedback_response.py +7 -7
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_input_required.py +6 -6
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_submitted.py +2 -2
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_working.py +8 -8
- adcp/types/generated_poc/media_buy/sync_creatives_request.py +8 -8
- adcp/types/generated_poc/media_buy/sync_creatives_response.py +16 -16
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_input_required.py +5 -5
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_submitted.py +2 -2
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_working.py +6 -6
- adcp/types/generated_poc/media_buy/update_media_buy_request.py +37 -29
- adcp/types/generated_poc/media_buy/update_media_buy_response.py +8 -8
- adcp/types/generated_poc/pricing_options/cpc_option.py +9 -9
- adcp/types/generated_poc/pricing_options/cpcv_option.py +9 -9
- adcp/types/generated_poc/pricing_options/cpm_auction_option.py +14 -14
- adcp/types/generated_poc/pricing_options/cpm_fixed_option.py +9 -9
- adcp/types/generated_poc/pricing_options/cpp_option.py +14 -14
- adcp/types/generated_poc/pricing_options/cpv_option.py +13 -13
- adcp/types/generated_poc/pricing_options/flat_rate_option.py +16 -16
- adcp/types/generated_poc/pricing_options/vcpm_auction_option.py +14 -14
- adcp/types/generated_poc/pricing_options/vcpm_fixed_option.py +9 -9
- 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 +4 -4
- adcp/types/generated_poc/signals/activate_signal_response.py +7 -7
- adcp/types/generated_poc/signals/get_signals_request.py +9 -9
- adcp/types/generated_poc/signals/get_signals_response.py +16 -16
- adcp/utils/__init__.py +24 -1
- adcp/utils/format_assets.py +224 -0
- adcp/utils/preview_cache.py +29 -7
- {adcp-2.17.0.dist-info → adcp-2.19.0.dist-info}/METADATA +1 -1
- adcp-2.19.0.dist-info/RECORD +220 -0
- adcp-2.17.0.dist-info/RECORD +0 -194
- {adcp-2.17.0.dist-info → adcp-2.19.0.dist-info}/WHEEL +0 -0
- {adcp-2.17.0.dist-info → adcp-2.19.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.17.0.dist-info → adcp-2.19.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.17.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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/build_creative_request.json
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2026-01-08T19:25:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -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
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/build_creative_response.json
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2026-01-08T19:25:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -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
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/create_media_buy_async_response_input_required.json
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2026-01-08T19:25:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/create_media_buy_async_response_submitted.json
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2026-01-08T19:25:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ from ..core import ext as ext_1
|
|
|
13
13
|
|
|
14
14
|
class CreateMediaBuySubmitted(AdCPBaseModel):
|
|
15
15
|
model_config = ConfigDict(
|
|
16
|
-
extra=
|
|
16
|
+
extra="allow",
|
|
17
17
|
)
|
|
18
18
|
context: context_1.ContextObject | None = None
|
|
19
19
|
ext: ext_1.ExtensionObject | None = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/create_media_buy_async_response_working.json
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2026-01-08T19:25:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/create_media_buy_request.json
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2026-01-08T19:25:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,39 +8,67 @@ from enum import Enum
|
|
|
8
8
|
from typing import Annotated
|
|
9
9
|
|
|
10
10
|
from adcp.types.base import AdCPBaseModel
|
|
11
|
-
from pydantic import AwareDatetime, ConfigDict, Field
|
|
11
|
+
from pydantic import AnyUrl, AwareDatetime, ConfigDict, Field
|
|
12
12
|
|
|
13
13
|
from ..core import brand_manifest_ref
|
|
14
14
|
from ..core import context as context_1
|
|
15
15
|
from ..core import ext as ext_1
|
|
16
16
|
from ..core import start_timing
|
|
17
|
-
from ..
|
|
17
|
+
from ..enums import auth_scheme
|
|
18
18
|
from . import package_request
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
class Authentication(AdCPBaseModel):
|
|
22
|
+
model_config = ConfigDict(
|
|
23
|
+
extra="forbid",
|
|
24
|
+
)
|
|
25
|
+
credentials: Annotated[
|
|
26
|
+
str,
|
|
27
|
+
Field(
|
|
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
|
+
min_length=32,
|
|
30
|
+
),
|
|
31
|
+
]
|
|
32
|
+
schemes: Annotated[
|
|
33
|
+
list[auth_scheme.AuthenticationScheme],
|
|
34
|
+
Field(
|
|
35
|
+
description="Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for signature verification (recommended for production)",
|
|
36
|
+
max_length=1,
|
|
37
|
+
min_length=1,
|
|
38
|
+
),
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
21
42
|
class ReportingFrequency(Enum):
|
|
22
|
-
hourly =
|
|
23
|
-
daily =
|
|
24
|
-
monthly =
|
|
43
|
+
hourly = "hourly"
|
|
44
|
+
daily = "daily"
|
|
45
|
+
monthly = "monthly"
|
|
25
46
|
|
|
26
47
|
|
|
27
48
|
class RequestedMetric(Enum):
|
|
28
|
-
impressions =
|
|
29
|
-
spend =
|
|
30
|
-
clicks =
|
|
31
|
-
ctr =
|
|
32
|
-
video_completions =
|
|
33
|
-
completion_rate =
|
|
34
|
-
conversions =
|
|
35
|
-
viewability =
|
|
36
|
-
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"
|
|
37
58
|
|
|
38
59
|
|
|
39
|
-
class ReportingWebhook(
|
|
60
|
+
class ReportingWebhook(AdCPBaseModel):
|
|
61
|
+
model_config = ConfigDict(
|
|
62
|
+
extra="allow",
|
|
63
|
+
)
|
|
64
|
+
authentication: Annotated[
|
|
65
|
+
Authentication,
|
|
66
|
+
Field(description="Authentication configuration for webhook delivery (A2A-compatible)"),
|
|
67
|
+
]
|
|
40
68
|
reporting_frequency: Annotated[
|
|
41
69
|
ReportingFrequency,
|
|
42
70
|
Field(
|
|
43
|
-
description=
|
|
71
|
+
description="Frequency for automated reporting delivery. Must be supported by all products in the media buy."
|
|
44
72
|
),
|
|
45
73
|
]
|
|
46
74
|
requested_metrics: Annotated[
|
|
@@ -49,27 +77,40 @@ class ReportingWebhook(PushNotificationConfig):
|
|
|
49
77
|
description="Optional list of metrics to include in webhook notifications. If omitted, all available metrics are included. Must be subset of product's available_metrics."
|
|
50
78
|
),
|
|
51
79
|
] = None
|
|
80
|
+
token: Annotated[
|
|
81
|
+
str | None,
|
|
82
|
+
Field(
|
|
83
|
+
description="Optional client-provided token for webhook validation. Echoed back in webhook payload to validate request authenticity.",
|
|
84
|
+
min_length=16,
|
|
85
|
+
),
|
|
86
|
+
] = None
|
|
87
|
+
url: Annotated[AnyUrl, Field(description="Webhook endpoint URL for reporting notifications")]
|
|
52
88
|
|
|
53
89
|
|
|
54
90
|
class CreateMediaBuyRequest(AdCPBaseModel):
|
|
55
91
|
model_config = ConfigDict(
|
|
56
|
-
extra=
|
|
92
|
+
extra="allow",
|
|
57
93
|
)
|
|
58
94
|
brand_manifest: Annotated[
|
|
59
95
|
brand_manifest_ref.BrandManifestReference,
|
|
60
96
|
Field(
|
|
61
|
-
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."
|
|
62
98
|
),
|
|
63
99
|
]
|
|
64
100
|
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")]
|
|
65
101
|
context: context_1.ContextObject | None = None
|
|
66
102
|
end_time: Annotated[
|
|
67
|
-
AwareDatetime, Field(description=
|
|
103
|
+
AwareDatetime, Field(description="Campaign end date/time in ISO 8601 format")
|
|
68
104
|
]
|
|
69
105
|
ext: ext_1.ExtensionObject | None = None
|
|
70
106
|
packages: Annotated[
|
|
71
|
-
list[package_request.PackageRequest], Field(description=
|
|
107
|
+
list[package_request.PackageRequest], Field(description="Array of package configurations")
|
|
72
108
|
]
|
|
73
|
-
po_number: Annotated[str | None, Field(description=
|
|
74
|
-
reporting_webhook:
|
|
109
|
+
po_number: Annotated[str | None, Field(description="Purchase order number for tracking")] = None
|
|
110
|
+
reporting_webhook: Annotated[
|
|
111
|
+
ReportingWebhook | None,
|
|
112
|
+
Field(
|
|
113
|
+
description="Optional webhook configuration for automated reporting delivery. Combines push_notification_config structure with reporting-specific fields."
|
|
114
|
+
),
|
|
115
|
+
] = None
|
|
75
116
|
start_time: start_timing.StartTiming
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/create_media_buy_response.json
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2026-01-08T19:25:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -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
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/get_media_buy_delivery_request.json
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2026-01-08T19:25:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -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
|