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,51 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/push_notification_config.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import AnyUrl, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..enums import auth_scheme
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Authentication(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra='forbid',
|
|
18
|
+
)
|
|
19
|
+
credentials: Annotated[
|
|
20
|
+
str,
|
|
21
|
+
Field(
|
|
22
|
+
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.',
|
|
23
|
+
min_length=32,
|
|
24
|
+
),
|
|
25
|
+
]
|
|
26
|
+
schemes: Annotated[
|
|
27
|
+
list[auth_scheme.AuthenticationScheme],
|
|
28
|
+
Field(
|
|
29
|
+
description="Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for signature verification (recommended for production)",
|
|
30
|
+
max_length=1,
|
|
31
|
+
min_length=1,
|
|
32
|
+
),
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class PushNotificationConfig(AdCPBaseModel):
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
extra='forbid',
|
|
39
|
+
)
|
|
40
|
+
authentication: Annotated[
|
|
41
|
+
Authentication,
|
|
42
|
+
Field(description='Authentication configuration for webhook delivery (A2A-compatible)'),
|
|
43
|
+
]
|
|
44
|
+
token: Annotated[
|
|
45
|
+
str | None,
|
|
46
|
+
Field(
|
|
47
|
+
description='Optional client-provided token for webhook validation. Echoed back in webhook payload to validate request authenticity.',
|
|
48
|
+
min_length=16,
|
|
49
|
+
),
|
|
50
|
+
] = None
|
|
51
|
+
url: Annotated[AnyUrl, Field(description='Webhook endpoint URL for task status notifications')]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/reporting_capabilities.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 available_metric, reporting_frequency
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ReportingCapabilities(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra='forbid',
|
|
18
|
+
)
|
|
19
|
+
available_metrics: Annotated[
|
|
20
|
+
list[available_metric.AvailableMetric],
|
|
21
|
+
Field(
|
|
22
|
+
description='Metrics available in reporting. Impressions and spend are always implicitly included.',
|
|
23
|
+
examples=[
|
|
24
|
+
['impressions', 'spend', 'clicks', 'video_completions'],
|
|
25
|
+
['impressions', 'spend', 'conversions'],
|
|
26
|
+
],
|
|
27
|
+
),
|
|
28
|
+
]
|
|
29
|
+
available_reporting_frequencies: Annotated[
|
|
30
|
+
list[reporting_frequency.ReportingFrequency],
|
|
31
|
+
Field(description='Supported reporting frequency options', min_length=1),
|
|
32
|
+
]
|
|
33
|
+
expected_delay_minutes: Annotated[
|
|
34
|
+
int,
|
|
35
|
+
Field(
|
|
36
|
+
description='Expected delay in minutes before reporting data becomes available (e.g., 240 for 4-hour delay)',
|
|
37
|
+
examples=[240, 300, 1440],
|
|
38
|
+
ge=0,
|
|
39
|
+
),
|
|
40
|
+
]
|
|
41
|
+
supports_webhooks: Annotated[
|
|
42
|
+
bool,
|
|
43
|
+
Field(description='Whether this product supports webhook-based reporting notifications'),
|
|
44
|
+
]
|
|
45
|
+
timezone: Annotated[
|
|
46
|
+
str,
|
|
47
|
+
Field(
|
|
48
|
+
description="Timezone for reporting periods. Use 'UTC' or IANA timezone (e.g., 'America/New_York'). Critical for daily/monthly frequency alignment.",
|
|
49
|
+
examples=['UTC', 'America/New_York', 'Europe/London', 'America/Los_Angeles'],
|
|
50
|
+
),
|
|
51
|
+
]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/response.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 ProtocolResponse(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
context_id: Annotated[str | None, Field(description='Session continuity identifier')] = None
|
|
18
|
+
data: Annotated[
|
|
19
|
+
Any | None,
|
|
20
|
+
Field(
|
|
21
|
+
description='AdCP task-specific response data (see individual task response schemas)'
|
|
22
|
+
),
|
|
23
|
+
] = None
|
|
24
|
+
message: Annotated[str, Field(description='Human-readable summary')]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/signal_filters.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 signal_catalog_type
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class SignalFilters(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra='forbid',
|
|
18
|
+
)
|
|
19
|
+
catalog_types: Annotated[
|
|
20
|
+
list[signal_catalog_type.SignalCatalogType] | None,
|
|
21
|
+
Field(description='Filter by catalog type'),
|
|
22
|
+
] = None
|
|
23
|
+
data_providers: Annotated[
|
|
24
|
+
list[str] | None, Field(description='Filter by specific data providers')
|
|
25
|
+
] = None
|
|
26
|
+
max_cpm: Annotated[float | None, Field(description='Maximum CPM price filter', ge=0.0)] = None
|
|
27
|
+
min_coverage_percentage: Annotated[
|
|
28
|
+
float | None, Field(description='Minimum coverage requirement', ge=0.0, le=100.0)
|
|
29
|
+
] = None
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/sub_asset.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 SubAsset1(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
asset_id: Annotated[
|
|
18
|
+
str, Field(description='Unique identifier for the asset within the creative')
|
|
19
|
+
]
|
|
20
|
+
asset_kind: Annotated[
|
|
21
|
+
Literal['media'],
|
|
22
|
+
Field(description='Discriminator indicating this is a media asset with content_uri'),
|
|
23
|
+
]
|
|
24
|
+
asset_type: Annotated[
|
|
25
|
+
str,
|
|
26
|
+
Field(
|
|
27
|
+
description='Type of asset. Common types: thumbnail_image, product_image, featured_image, logo'
|
|
28
|
+
),
|
|
29
|
+
]
|
|
30
|
+
content_uri: Annotated[AnyUrl, Field(description='URL for media assets (images, videos, etc.)')]
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class SubAsset2(AdCPBaseModel):
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
extra='forbid',
|
|
36
|
+
)
|
|
37
|
+
asset_id: Annotated[
|
|
38
|
+
str, Field(description='Unique identifier for the asset within the creative')
|
|
39
|
+
]
|
|
40
|
+
asset_kind: Annotated[
|
|
41
|
+
Literal['text'],
|
|
42
|
+
Field(description='Discriminator indicating this is a text asset with content'),
|
|
43
|
+
]
|
|
44
|
+
asset_type: Annotated[
|
|
45
|
+
str,
|
|
46
|
+
Field(
|
|
47
|
+
description='Type of asset. Common types: headline, body_text, cta_text, price_text, sponsor_name, author_name, click_url'
|
|
48
|
+
),
|
|
49
|
+
]
|
|
50
|
+
content: Annotated[
|
|
51
|
+
str | list[str],
|
|
52
|
+
Field(
|
|
53
|
+
description='Text content for text-based assets like headlines, body text, CTA text, etc.'
|
|
54
|
+
),
|
|
55
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/targeting.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field, RootModel
|
|
11
|
+
|
|
12
|
+
from . import frequency_cap as frequency_cap_1
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GeoCountryAnyOfItem(RootModel[str]):
|
|
16
|
+
root: Annotated[str, Field(pattern='^[A-Z]{2}$')]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class TargetingOverlay(AdCPBaseModel):
|
|
20
|
+
model_config = ConfigDict(
|
|
21
|
+
extra='forbid',
|
|
22
|
+
)
|
|
23
|
+
axe_exclude_segment: Annotated[
|
|
24
|
+
str | None, Field(description='AXE segment ID to exclude from targeting')
|
|
25
|
+
] = None
|
|
26
|
+
axe_include_segment: Annotated[
|
|
27
|
+
str | None, Field(description='AXE segment ID to include for targeting')
|
|
28
|
+
] = None
|
|
29
|
+
frequency_cap: frequency_cap_1.FrequencyCap | None = None
|
|
30
|
+
geo_country_any_of: Annotated[
|
|
31
|
+
list[GeoCountryAnyOfItem] | None,
|
|
32
|
+
Field(
|
|
33
|
+
description='Restrict delivery to specific countries (ISO codes). Use for regulatory compliance or RCT testing.'
|
|
34
|
+
),
|
|
35
|
+
] = None
|
|
36
|
+
geo_metro_any_of: Annotated[
|
|
37
|
+
list[str] | None,
|
|
38
|
+
Field(
|
|
39
|
+
description='Restrict delivery to specific metro areas (DMA codes). Use for regulatory compliance or RCT testing.'
|
|
40
|
+
),
|
|
41
|
+
] = None
|
|
42
|
+
geo_postal_code_any_of: Annotated[
|
|
43
|
+
list[str] | None,
|
|
44
|
+
Field(
|
|
45
|
+
description='Restrict delivery to specific postal/ZIP codes. Use for regulatory compliance or RCT testing.'
|
|
46
|
+
),
|
|
47
|
+
] = None
|
|
48
|
+
geo_region_any_of: Annotated[
|
|
49
|
+
list[str] | None,
|
|
50
|
+
Field(
|
|
51
|
+
description='Restrict delivery to specific regions/states. Use for regulatory compliance or RCT testing.'
|
|
52
|
+
),
|
|
53
|
+
] = None
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/webhook_payload.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 AwareDatetime, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..enums import adcp_domain, task_status
|
|
13
|
+
from ..enums import task_type as task_type_1
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Progress(AdCPBaseModel):
|
|
17
|
+
model_config = ConfigDict(
|
|
18
|
+
extra='forbid',
|
|
19
|
+
)
|
|
20
|
+
current_step: Annotated[
|
|
21
|
+
str | None, Field(description='Current step or phase of the operation')
|
|
22
|
+
] = None
|
|
23
|
+
percentage: Annotated[
|
|
24
|
+
float | None, Field(description='Completion percentage (0-100)', ge=0.0, le=100.0)
|
|
25
|
+
] = None
|
|
26
|
+
step_number: Annotated[int | None, Field(description='Current step number', ge=1)] = None
|
|
27
|
+
total_steps: Annotated[
|
|
28
|
+
int | None, Field(description='Total number of steps in the operation', ge=1)
|
|
29
|
+
] = None
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class WebhookPayload(AdCPBaseModel):
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
extra='allow',
|
|
35
|
+
)
|
|
36
|
+
context_id: Annotated[
|
|
37
|
+
str | None,
|
|
38
|
+
Field(
|
|
39
|
+
description='Session/conversation identifier. Use this to continue the conversation if input-required status needs clarification or additional parameters.'
|
|
40
|
+
),
|
|
41
|
+
] = None
|
|
42
|
+
domain: Annotated[
|
|
43
|
+
adcp_domain.AdcpDomain | None,
|
|
44
|
+
Field(
|
|
45
|
+
description='AdCP domain this task belongs to. Helps classify the operation type at a high level.'
|
|
46
|
+
),
|
|
47
|
+
] = None
|
|
48
|
+
error: Annotated[
|
|
49
|
+
str | None,
|
|
50
|
+
Field(description="Error message for failed tasks. Only present when status is 'failed'."),
|
|
51
|
+
] = None
|
|
52
|
+
message: Annotated[
|
|
53
|
+
str | None,
|
|
54
|
+
Field(
|
|
55
|
+
description='Human-readable summary of the current task state. Provides context about what happened and what action may be needed.'
|
|
56
|
+
),
|
|
57
|
+
] = None
|
|
58
|
+
operation_id: Annotated[
|
|
59
|
+
str | None,
|
|
60
|
+
Field(
|
|
61
|
+
description='Publisher-defined operation identifier correlating a sequence of task updates across webhooks.'
|
|
62
|
+
),
|
|
63
|
+
] = None
|
|
64
|
+
progress: Annotated[
|
|
65
|
+
Progress | None,
|
|
66
|
+
Field(
|
|
67
|
+
description="Progress information for tasks still in 'working' state. Rarely seen in webhooks since 'working' tasks typically complete synchronously, but may appear if a task transitions from 'submitted' to 'working'."
|
|
68
|
+
),
|
|
69
|
+
] = None
|
|
70
|
+
result: Annotated[
|
|
71
|
+
dict[str, Any] | None,
|
|
72
|
+
Field(
|
|
73
|
+
description='Task-specific payload for this status update. Validated against the appropriate response schema based on task_type.'
|
|
74
|
+
),
|
|
75
|
+
] = None
|
|
76
|
+
status: Annotated[
|
|
77
|
+
task_status.TaskStatus,
|
|
78
|
+
Field(
|
|
79
|
+
description='Current task status. Webhooks are only triggered for status changes after initial submission (e.g., submitted → input-required, submitted → completed, submitted → failed).'
|
|
80
|
+
),
|
|
81
|
+
]
|
|
82
|
+
task_id: Annotated[
|
|
83
|
+
str,
|
|
84
|
+
Field(
|
|
85
|
+
description='Unique identifier for this task. Use this to correlate webhook notifications with the original task submission.'
|
|
86
|
+
),
|
|
87
|
+
]
|
|
88
|
+
task_type: Annotated[
|
|
89
|
+
task_type_1.TaskType,
|
|
90
|
+
Field(
|
|
91
|
+
description='Type of AdCP operation that triggered this webhook. Enables webhook handlers to route to appropriate processing logic.'
|
|
92
|
+
),
|
|
93
|
+
]
|
|
94
|
+
timestamp: Annotated[
|
|
95
|
+
AwareDatetime, Field(description='ISO 8601 timestamp when this webhook was generated.')
|
|
96
|
+
]
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: creative/list_creative_formats_request.json
|
|
3
|
+
# timestamp: 2025-11-22T19:54:03+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from ..core import context as context_1
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import format_id
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class AssetType(Enum):
|
|
19
|
+
image = 'image'
|
|
20
|
+
video = 'video'
|
|
21
|
+
audio = 'audio'
|
|
22
|
+
text = 'text'
|
|
23
|
+
html = 'html'
|
|
24
|
+
javascript = 'javascript'
|
|
25
|
+
url = 'url'
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Type(Enum):
|
|
29
|
+
audio = 'audio'
|
|
30
|
+
video = 'video'
|
|
31
|
+
display = 'display'
|
|
32
|
+
dooh = 'dooh'
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ListCreativeFormatsRequestCreativeAgent(AdCPBaseModel):
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
extra='forbid',
|
|
38
|
+
)
|
|
39
|
+
asset_types: Annotated[
|
|
40
|
+
list[AssetType] | None,
|
|
41
|
+
Field(
|
|
42
|
+
description="Filter to formats that include these asset types. For third-party tags, search for 'html' or 'javascript'. E.g., ['image', 'text'] returns formats with images and text, ['javascript'] returns formats accepting JavaScript tags."
|
|
43
|
+
),
|
|
44
|
+
] = None
|
|
45
|
+
context: context_1.ContextObject | None = None
|
|
46
|
+
ext: ext_1.ExtensionObject | None = None
|
|
47
|
+
format_ids: Annotated[
|
|
48
|
+
list[format_id.FormatId] | None, Field(description='Return only these specific format IDs')
|
|
49
|
+
] = None
|
|
50
|
+
is_responsive: Annotated[
|
|
51
|
+
bool | None,
|
|
52
|
+
Field(
|
|
53
|
+
description='Filter for responsive formats that adapt to container size. When true, returns formats without fixed dimensions.'
|
|
54
|
+
),
|
|
55
|
+
] = None
|
|
56
|
+
max_height: Annotated[
|
|
57
|
+
int | None,
|
|
58
|
+
Field(
|
|
59
|
+
description='Maximum height in pixels (inclusive). Returns formats with height <= this value. Omit for responsive/fluid formats.'
|
|
60
|
+
),
|
|
61
|
+
] = None
|
|
62
|
+
max_width: Annotated[
|
|
63
|
+
int | None,
|
|
64
|
+
Field(
|
|
65
|
+
description='Maximum width in pixels (inclusive). Returns formats with width <= this value. Omit for responsive/fluid formats.'
|
|
66
|
+
),
|
|
67
|
+
] = None
|
|
68
|
+
min_height: Annotated[
|
|
69
|
+
int | None,
|
|
70
|
+
Field(
|
|
71
|
+
description='Minimum height in pixels (inclusive). Returns formats with height >= this value.'
|
|
72
|
+
),
|
|
73
|
+
] = None
|
|
74
|
+
min_width: Annotated[
|
|
75
|
+
int | None,
|
|
76
|
+
Field(
|
|
77
|
+
description='Minimum width in pixels (inclusive). Returns formats with width >= this value.'
|
|
78
|
+
),
|
|
79
|
+
] = None
|
|
80
|
+
name_search: Annotated[
|
|
81
|
+
str | None, Field(description='Search for formats by name (case-insensitive partial match)')
|
|
82
|
+
] = None
|
|
83
|
+
type: Annotated[
|
|
84
|
+
Type | None,
|
|
85
|
+
Field(
|
|
86
|
+
description='Filter by format type (technical categories with distinct requirements)'
|
|
87
|
+
),
|
|
88
|
+
] = None
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: creative/list_creative_formats_response.json
|
|
3
|
+
# timestamp: 2025-11-22T15:23:24+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import AnyUrl, ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import error
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import format
|
|
16
|
+
from ..enums import creative_agent_capability
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class CreativeAgent(AdCPBaseModel):
|
|
20
|
+
agent_name: Annotated[
|
|
21
|
+
str | None, Field(description='Human-readable name for the creative agent')
|
|
22
|
+
] = None
|
|
23
|
+
agent_url: Annotated[
|
|
24
|
+
AnyUrl,
|
|
25
|
+
Field(
|
|
26
|
+
description="Base URL for the creative agent (e.g., 'https://reference.adcp.org', 'https://dco.example.com'). Call list_creative_formats on this URL to get its formats."
|
|
27
|
+
),
|
|
28
|
+
]
|
|
29
|
+
capabilities: Annotated[
|
|
30
|
+
list[creative_agent_capability.CreativeAgentCapability] | None,
|
|
31
|
+
Field(description='Capabilities this creative agent provides'),
|
|
32
|
+
] = None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ListCreativeFormatsResponseCreativeAgent(AdCPBaseModel):
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
extra='forbid',
|
|
38
|
+
)
|
|
39
|
+
context: context_1.ContextObject | None = None
|
|
40
|
+
creative_agents: Annotated[
|
|
41
|
+
list[CreativeAgent] | None,
|
|
42
|
+
Field(
|
|
43
|
+
description='Optional: Creative agents that provide additional formats. Buyers can recursively query these agents to discover more formats. No authentication required for list_creative_formats.'
|
|
44
|
+
),
|
|
45
|
+
] = None
|
|
46
|
+
errors: Annotated[
|
|
47
|
+
list[error.Error] | None, Field(description='Task-specific errors and warnings')
|
|
48
|
+
] = None
|
|
49
|
+
ext: ext_1.ExtensionObject | None = None
|
|
50
|
+
formats: Annotated[
|
|
51
|
+
list[format.Format],
|
|
52
|
+
Field(
|
|
53
|
+
description="Full format definitions for all formats this agent supports. Each format's authoritative source is indicated by its agent_url field."
|
|
54
|
+
),
|
|
55
|
+
]
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: creative/preview_creative_request.json
|
|
3
|
+
# timestamp: 2025-11-22T19:54:03+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated, Literal
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field, RootModel
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import creative_manifest as creative_manifest_1
|
|
14
|
+
from ..core import ext as ext_1
|
|
15
|
+
from ..core import format_id as format_id_1
|
|
16
|
+
from ..enums import preview_output_format
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Input(AdCPBaseModel):
|
|
20
|
+
model_config = ConfigDict(
|
|
21
|
+
extra='forbid',
|
|
22
|
+
)
|
|
23
|
+
context_description: Annotated[
|
|
24
|
+
str | None,
|
|
25
|
+
Field(
|
|
26
|
+
description="Natural language description of the context for AI-generated content (e.g., 'User just searched for running shoes', 'Podcast discussing weather patterns', 'Article about electric vehicles')"
|
|
27
|
+
),
|
|
28
|
+
] = None
|
|
29
|
+
macros: Annotated[
|
|
30
|
+
dict[str, str] | None,
|
|
31
|
+
Field(
|
|
32
|
+
description="Macro values to use for this preview. Supports all universal macros from the format's supported_macros list. See docs/media-buy/creatives/universal-macros.md for available macros."
|
|
33
|
+
),
|
|
34
|
+
] = None
|
|
35
|
+
name: Annotated[
|
|
36
|
+
str,
|
|
37
|
+
Field(
|
|
38
|
+
description="Human-readable name for this input set (e.g., 'Sunny morning on mobile', 'Evening podcast ad', 'Desktop dark mode')"
|
|
39
|
+
),
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class Input2(AdCPBaseModel):
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
extra='forbid',
|
|
46
|
+
)
|
|
47
|
+
context_description: Annotated[
|
|
48
|
+
str | None,
|
|
49
|
+
Field(description='Natural language description of the context for AI-generated content'),
|
|
50
|
+
] = None
|
|
51
|
+
macros: Annotated[
|
|
52
|
+
dict[str, str] | None, Field(description='Macro values to use for this preview')
|
|
53
|
+
] = None
|
|
54
|
+
name: Annotated[str, Field(description='Human-readable name for this input set')]
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class PreviewCreativeRequest1(AdCPBaseModel):
|
|
58
|
+
model_config = ConfigDict(
|
|
59
|
+
extra='forbid',
|
|
60
|
+
)
|
|
61
|
+
context: context_1.ContextObject | None = None
|
|
62
|
+
creative_manifest: Annotated[
|
|
63
|
+
creative_manifest_1.CreativeManifest,
|
|
64
|
+
Field(
|
|
65
|
+
description='Complete creative manifest with all required assets (including promoted_offerings if required by the format)'
|
|
66
|
+
),
|
|
67
|
+
]
|
|
68
|
+
ext: ext_1.ExtensionObject | None = None
|
|
69
|
+
format_id: Annotated[
|
|
70
|
+
format_id_1.FormatId, Field(description='Format identifier for rendering the preview')
|
|
71
|
+
]
|
|
72
|
+
inputs: Annotated[
|
|
73
|
+
list[Input] | None,
|
|
74
|
+
Field(
|
|
75
|
+
description='Array of input sets for generating multiple preview variants. Each input set defines macros and context values for one preview rendering. If not provided, creative agent will generate default previews.'
|
|
76
|
+
),
|
|
77
|
+
] = None
|
|
78
|
+
output_format: Annotated[
|
|
79
|
+
preview_output_format.PreviewOutputFormat | None,
|
|
80
|
+
Field(
|
|
81
|
+
description="Output format for previews. 'url' returns preview_url (iframe-embeddable URL), 'html' returns preview_html (raw HTML for direct embedding). Default: 'url' for backward compatibility."
|
|
82
|
+
),
|
|
83
|
+
] = preview_output_format.PreviewOutputFormat.url
|
|
84
|
+
request_type: Annotated[
|
|
85
|
+
Literal['single'],
|
|
86
|
+
Field(description='Discriminator indicating this is a single preview request'),
|
|
87
|
+
]
|
|
88
|
+
template_id: Annotated[
|
|
89
|
+
str | None, Field(description='Specific template ID for custom format rendering')
|
|
90
|
+
] = None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class Request(AdCPBaseModel):
|
|
94
|
+
model_config = ConfigDict(
|
|
95
|
+
extra='forbid',
|
|
96
|
+
)
|
|
97
|
+
creative_manifest: Annotated[
|
|
98
|
+
creative_manifest_1.CreativeManifest,
|
|
99
|
+
Field(description='Complete creative manifest with all required assets'),
|
|
100
|
+
]
|
|
101
|
+
format_id: Annotated[
|
|
102
|
+
format_id_1.FormatId, Field(description='Format identifier for rendering the preview')
|
|
103
|
+
]
|
|
104
|
+
inputs: Annotated[
|
|
105
|
+
list[Input2] | None,
|
|
106
|
+
Field(description='Array of input sets for generating multiple preview variants'),
|
|
107
|
+
] = None
|
|
108
|
+
output_format: Annotated[
|
|
109
|
+
preview_output_format.PreviewOutputFormat | None,
|
|
110
|
+
Field(
|
|
111
|
+
description="Output format for this preview. 'url' returns preview_url, 'html' returns preview_html."
|
|
112
|
+
),
|
|
113
|
+
] = preview_output_format.PreviewOutputFormat.url
|
|
114
|
+
template_id: Annotated[
|
|
115
|
+
str | None, Field(description='Specific template ID for custom format rendering')
|
|
116
|
+
] = None
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class PreviewCreativeRequest2(AdCPBaseModel):
|
|
120
|
+
model_config = ConfigDict(
|
|
121
|
+
extra='forbid',
|
|
122
|
+
)
|
|
123
|
+
context: context_1.ContextObject | None = None
|
|
124
|
+
ext: ext_1.ExtensionObject | None = None
|
|
125
|
+
output_format: Annotated[
|
|
126
|
+
preview_output_format.PreviewOutputFormat | None,
|
|
127
|
+
Field(
|
|
128
|
+
description="Default output format for all requests in this batch. Individual requests can override this. 'url' returns preview_url (iframe-embeddable URL), 'html' returns preview_html (raw HTML for direct embedding)."
|
|
129
|
+
),
|
|
130
|
+
] = preview_output_format.PreviewOutputFormat.url
|
|
131
|
+
request_type: Annotated[
|
|
132
|
+
Literal['batch'],
|
|
133
|
+
Field(description='Discriminator indicating this is a batch preview request'),
|
|
134
|
+
]
|
|
135
|
+
requests: Annotated[
|
|
136
|
+
list[Request],
|
|
137
|
+
Field(
|
|
138
|
+
description='Array of preview requests (1-50 items). Each follows the single request structure.',
|
|
139
|
+
max_length=50,
|
|
140
|
+
min_length=1,
|
|
141
|
+
),
|
|
142
|
+
]
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class PreviewCreativeRequest(RootModel[PreviewCreativeRequest1 | PreviewCreativeRequest2]):
|
|
146
|
+
root: Annotated[
|
|
147
|
+
PreviewCreativeRequest1 | PreviewCreativeRequest2,
|
|
148
|
+
Field(
|
|
149
|
+
discriminator='request_type',
|
|
150
|
+
description='Request to generate previews of one or more creative manifests. Accepts either a single creative request or an array of requests for batch processing.',
|
|
151
|
+
title='Preview Creative Request',
|
|
152
|
+
),
|
|
153
|
+
]
|