adcp 2.2.0__tar.gz → 2.4.0__tar.gz
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-2.2.0/src/adcp.egg-info → adcp-2.4.0}/PKG-INFO +38 -2
- {adcp-2.2.0 → adcp-2.4.0}/README.md +36 -0
- {adcp-2.2.0 → adcp-2.4.0}/pyproject.toml +2 -2
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/__init__.py +5 -1
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/adagents.py +122 -0
- adcp-2.4.0/src/adcp/types/generated.py +119 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/__init__.py +1 -1
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/activate_signal_request.py +5 -5
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/activate_signal_response.py +9 -9
- adcp-2.4.0/src/adcp/types/generated_poc/activation_key.py +30 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/adagents.py +46 -46
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/asset_type.py +19 -19
- adcp-2.4.0/src/adcp/types/generated_poc/audio_asset.py +26 -0
- adcp-2.4.0/src/adcp/types/generated_poc/brand_manifest.py +260 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/build_creative_request.py +6 -6
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/build_creative_response.py +9 -9
- adcp-2.4.0/src/adcp/types/generated_poc/channels.py +19 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/cpc_option.py +12 -8
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/cpcv_option.py +12 -8
- adcp-2.4.0/src/adcp/types/generated_poc/cpm_auction_option.py +58 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/cpm_fixed_option.py +12 -8
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/cpp_option.py +17 -13
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/cpv_option.py +16 -12
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/create_media_buy_request.py +29 -29
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/create_media_buy_response.py +11 -11
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/creative_asset.py +13 -13
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/creative_assignment.py +4 -4
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/creative_manifest.py +4 -4
- adcp-2.4.0/src/adcp/types/generated_poc/creative_policy.py +34 -0
- adcp-2.4.0/src/adcp/types/generated_poc/creative_status.py +14 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/css_asset.py +3 -3
- adcp-2.4.0/src/adcp/types/generated_poc/daast_asset.py +76 -0
- adcp-2.4.0/src/adcp/types/generated_poc/delivery_metrics.py +111 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/delivery_type.py +3 -3
- adcp-2.4.0/src/adcp/types/generated_poc/deployment.py +78 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/destination.py +10 -10
- adcp-2.4.0/src/adcp/types/generated_poc/error.py +29 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/flat_rate_option.py +16 -16
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/format.py +70 -70
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/format_id.py +3 -3
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/frequency_cap.py +3 -3
- adcp-2.4.0/src/adcp/types/generated_poc/frequency_cap_scope.py +16 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/get_media_buy_delivery_request.py +21 -21
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/get_media_buy_delivery_response.py +46 -46
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/get_products_request.py +23 -23
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/get_products_response.py +5 -5
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/get_signals_request.py +19 -19
- adcp-2.4.0/src/adcp/types/generated_poc/get_signals_response.py +65 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/html_asset.py +3 -3
- adcp-2.4.0/src/adcp/types/generated_poc/identifier_types.py +29 -0
- adcp-2.4.0/src/adcp/types/generated_poc/image_asset.py +23 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/javascript_asset.py +7 -7
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/list_authorized_properties_request.py +5 -5
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/list_authorized_properties_response.py +9 -9
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/list_creative_formats_request.py +22 -22
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/list_creative_formats_response.py +11 -11
- adcp-2.4.0/src/adcp/types/generated_poc/list_creatives_request.py +154 -0
- adcp-2.4.0/src/adcp/types/generated_poc/list_creatives_response.py +234 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/markdown_asset.py +7 -7
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/measurement.py +9 -9
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/media_buy.py +8 -8
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/media_buy_status.py +5 -5
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/pacing.py +4 -4
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/package.py +8 -8
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/package_request.py +7 -7
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/package_status.py +5 -5
- adcp-2.4.0/src/adcp/types/generated_poc/performance_feedback.py +89 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/placement.py +4 -4
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/preview_creative_request.py +28 -28
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/preview_creative_response.py +31 -31
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/preview_render.py +36 -28
- adcp-2.4.0/src/adcp/types/generated_poc/pricing_model.py +17 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/product.py +32 -31
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/promoted_offerings.py +29 -29
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/promoted_products.py +3 -3
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/property.py +18 -18
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/protocol_envelope.py +9 -9
- adcp-2.4.0/src/adcp/types/generated_poc/provide_performance_feedback_request.py +85 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/provide_performance_feedback_response.py +9 -9
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/publisher_identifier_types.py +6 -6
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/push_notification_config.py +9 -9
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/reporting_capabilities.py +21 -21
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/response.py +5 -5
- adcp-2.4.0/src/adcp/types/generated_poc/standard_format_ids.py +45 -0
- adcp-2.4.0/src/adcp/types/generated_poc/sub_asset.py +55 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/sync_creatives_request.py +11 -11
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/sync_creatives_response.py +23 -23
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/targeting.py +9 -9
- adcp-2.4.0/src/adcp/types/generated_poc/task_status.py +19 -0
- adcp-2.4.0/src/adcp/types/generated_poc/task_type.py +15 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/tasks_get_request.py +5 -5
- adcp-2.4.0/src/adcp/types/generated_poc/tasks_get_response.py +112 -0
- adcp-2.4.0/src/adcp/types/generated_poc/tasks_list_request.py +121 -0
- adcp-2.4.0/src/adcp/types/generated_poc/tasks_list_response.py +122 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/text_asset.py +3 -3
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/update_media_buy_request.py +27 -27
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/update_media_buy_response.py +11 -11
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/url_asset.py +7 -7
- adcp-2.4.0/src/adcp/types/generated_poc/vast_asset.py +86 -0
- adcp-2.4.0/src/adcp/types/generated_poc/vcpm_auction_option.py +61 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/vcpm_fixed_option.py +12 -8
- adcp-2.4.0/src/adcp/types/generated_poc/video_asset.py +28 -0
- adcp-2.4.0/src/adcp/types/generated_poc/webhook_asset.py +65 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/webhook_payload.py +18 -18
- {adcp-2.2.0 → adcp-2.4.0/src/adcp.egg-info}/PKG-INFO +38 -2
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_adagents.py +362 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_cli.py +22 -0
- adcp-2.2.0/src/adcp/types/generated.py +0 -614
- adcp-2.2.0/src/adcp/types/generated_poc/activation_key.py +0 -30
- adcp-2.2.0/src/adcp/types/generated_poc/audio_asset.py +0 -26
- adcp-2.2.0/src/adcp/types/generated_poc/brand_manifest.py +0 -260
- adcp-2.2.0/src/adcp/types/generated_poc/channels.py +0 -19
- adcp-2.2.0/src/adcp/types/generated_poc/cpm_auction_option.py +0 -54
- adcp-2.2.0/src/adcp/types/generated_poc/creative_policy.py +0 -34
- adcp-2.2.0/src/adcp/types/generated_poc/creative_status.py +0 -14
- adcp-2.2.0/src/adcp/types/generated_poc/daast_asset.py +0 -76
- adcp-2.2.0/src/adcp/types/generated_poc/delivery_metrics.py +0 -111
- adcp-2.2.0/src/adcp/types/generated_poc/deployment.py +0 -78
- adcp-2.2.0/src/adcp/types/generated_poc/error.py +0 -29
- adcp-2.2.0/src/adcp/types/generated_poc/frequency_cap_scope.py +0 -16
- adcp-2.2.0/src/adcp/types/generated_poc/get_signals_response.py +0 -65
- adcp-2.2.0/src/adcp/types/generated_poc/identifier_types.py +0 -29
- adcp-2.2.0/src/adcp/types/generated_poc/image_asset.py +0 -23
- adcp-2.2.0/src/adcp/types/generated_poc/list_creatives_request.py +0 -154
- adcp-2.2.0/src/adcp/types/generated_poc/list_creatives_response.py +0 -234
- adcp-2.2.0/src/adcp/types/generated_poc/performance_feedback.py +0 -89
- adcp-2.2.0/src/adcp/types/generated_poc/pricing_model.py +0 -17
- adcp-2.2.0/src/adcp/types/generated_poc/provide_performance_feedback_request.py +0 -85
- adcp-2.2.0/src/adcp/types/generated_poc/standard_format_ids.py +0 -45
- adcp-2.2.0/src/adcp/types/generated_poc/sub_asset.py +0 -55
- adcp-2.2.0/src/adcp/types/generated_poc/task_status.py +0 -19
- adcp-2.2.0/src/adcp/types/generated_poc/task_type.py +0 -15
- adcp-2.2.0/src/adcp/types/generated_poc/tasks_get_response.py +0 -112
- adcp-2.2.0/src/adcp/types/generated_poc/tasks_list_request.py +0 -121
- adcp-2.2.0/src/adcp/types/generated_poc/tasks_list_response.py +0 -122
- adcp-2.2.0/src/adcp/types/generated_poc/vast_asset.py +0 -86
- adcp-2.2.0/src/adcp/types/generated_poc/vcpm_auction_option.py +0 -57
- adcp-2.2.0/src/adcp/types/generated_poc/video_asset.py +0 -28
- adcp-2.2.0/src/adcp/types/generated_poc/webhook_asset.py +0 -65
- {adcp-2.2.0 → adcp-2.4.0}/LICENSE +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/setup.cfg +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/__main__.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/client.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/config.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/exceptions.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/protocols/__init__.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/protocols/a2a.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/protocols/base.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/protocols/mcp.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/py.typed +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/simple.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/testing/__init__.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/testing/test_helpers.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/__init__.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/aliases.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/base.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/core.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/brand_manifest_ref.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/index.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/pricing_option.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/types/generated_poc/start_timing.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/utils/__init__.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/utils/operation_id.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/utils/preview_cache.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/utils/response_parser.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp/validation.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp.egg-info/SOURCES.txt +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp.egg-info/dependency_links.txt +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp.egg-info/entry_points.txt +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp.egg-info/requires.txt +1 -1
- {adcp-2.2.0 → adcp-2.4.0}/src/adcp.egg-info/top_level.txt +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_client.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_code_generation.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_discriminated_unions.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_format_id_validation.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_helpers.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_preview_html.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_protocols.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_response_parser.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_simple_api.py +0 -0
- {adcp-2.2.0 → adcp-2.4.0}/tests/test_type_aliases.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: adcp
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.0
|
|
4
4
|
Summary: Official Python client for the Ad Context Protocol (AdCP)
|
|
5
5
|
Author-email: AdCP Community <maintainers@adcontextprotocol.org>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -26,6 +26,7 @@ Requires-Dist: pydantic>=2.0.0
|
|
|
26
26
|
Requires-Dist: typing-extensions>=4.5.0
|
|
27
27
|
Requires-Dist: a2a-sdk>=0.3.0
|
|
28
28
|
Requires-Dist: mcp>=0.9.0
|
|
29
|
+
Requires-Dist: email-validator>=2.0.0
|
|
29
30
|
Provides-Extra: dev
|
|
30
31
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
31
32
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
@@ -34,7 +35,6 @@ Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
|
34
35
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
35
36
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
36
37
|
Requires-Dist: datamodel-code-generator[http]>=0.35.0; extra == "dev"
|
|
37
|
-
Requires-Dist: email-validator>=2.0.0; extra == "dev"
|
|
38
38
|
Dynamic: license-file
|
|
39
39
|
|
|
40
40
|
# adcp - Python Client for Ad Context Protocol
|
|
@@ -544,6 +544,42 @@ is_authorized = await verify_agent_for_property(
|
|
|
544
544
|
|
|
545
545
|
See `examples/adagents_validation.py` for complete examples.
|
|
546
546
|
|
|
547
|
+
### Authorization Discovery
|
|
548
|
+
|
|
549
|
+
Discover which publishers have authorized your agent using two approaches:
|
|
550
|
+
|
|
551
|
+
**1. "Push" Approach** - Ask the agent (recommended, fastest):
|
|
552
|
+
```python
|
|
553
|
+
from adcp import ADCPClient
|
|
554
|
+
|
|
555
|
+
async with ADCPClient(agent_config) as client:
|
|
556
|
+
# Single API call to agent
|
|
557
|
+
response = await client.simple.list_authorized_properties()
|
|
558
|
+
print(f"Authorized for: {response.publisher_domains}")
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
**2. "Pull" Approach** - Check publisher adagents.json files (when you need property details):
|
|
562
|
+
```python
|
|
563
|
+
from adcp import fetch_agent_authorizations
|
|
564
|
+
|
|
565
|
+
# Check specific publishers (fetches in parallel)
|
|
566
|
+
contexts = await fetch_agent_authorizations(
|
|
567
|
+
"https://our-sales-agent.com",
|
|
568
|
+
["nytimes.com", "wsj.com", "cnn.com"]
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
for domain, ctx in contexts.items():
|
|
572
|
+
print(f"{domain}:")
|
|
573
|
+
print(f" Property IDs: {ctx.property_ids}")
|
|
574
|
+
print(f" Tags: {ctx.property_tags}")
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
**When to use which:**
|
|
578
|
+
- **Push**: Quick discovery, portfolio overview, high-level authorization check
|
|
579
|
+
- **Pull**: Property-level details, specific publisher list, works offline
|
|
580
|
+
|
|
581
|
+
See `examples/fetch_agent_authorizations.py` for complete examples.
|
|
582
|
+
|
|
547
583
|
## CLI Tool
|
|
548
584
|
|
|
549
585
|
The `adcp` command-line tool provides easy interaction with AdCP agents without writing code.
|
|
@@ -505,6 +505,42 @@ is_authorized = await verify_agent_for_property(
|
|
|
505
505
|
|
|
506
506
|
See `examples/adagents_validation.py` for complete examples.
|
|
507
507
|
|
|
508
|
+
### Authorization Discovery
|
|
509
|
+
|
|
510
|
+
Discover which publishers have authorized your agent using two approaches:
|
|
511
|
+
|
|
512
|
+
**1. "Push" Approach** - Ask the agent (recommended, fastest):
|
|
513
|
+
```python
|
|
514
|
+
from adcp import ADCPClient
|
|
515
|
+
|
|
516
|
+
async with ADCPClient(agent_config) as client:
|
|
517
|
+
# Single API call to agent
|
|
518
|
+
response = await client.simple.list_authorized_properties()
|
|
519
|
+
print(f"Authorized for: {response.publisher_domains}")
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
**2. "Pull" Approach** - Check publisher adagents.json files (when you need property details):
|
|
523
|
+
```python
|
|
524
|
+
from adcp import fetch_agent_authorizations
|
|
525
|
+
|
|
526
|
+
# Check specific publishers (fetches in parallel)
|
|
527
|
+
contexts = await fetch_agent_authorizations(
|
|
528
|
+
"https://our-sales-agent.com",
|
|
529
|
+
["nytimes.com", "wsj.com", "cnn.com"]
|
|
530
|
+
)
|
|
531
|
+
|
|
532
|
+
for domain, ctx in contexts.items():
|
|
533
|
+
print(f"{domain}:")
|
|
534
|
+
print(f" Property IDs: {ctx.property_ids}")
|
|
535
|
+
print(f" Tags: {ctx.property_tags}")
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
**When to use which:**
|
|
539
|
+
- **Push**: Quick discovery, portfolio overview, high-level authorization check
|
|
540
|
+
- **Pull**: Property-level details, specific publisher list, works offline
|
|
541
|
+
|
|
542
|
+
See `examples/fetch_agent_authorizations.py` for complete examples.
|
|
543
|
+
|
|
508
544
|
## CLI Tool
|
|
509
545
|
|
|
510
546
|
The `adcp` command-line tool provides easy interaction with AdCP agents without writing code.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "adcp"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.4.0"
|
|
8
8
|
description = "Official Python client for the Ad Context Protocol (AdCP)"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "AdCP Community", email = "maintainers@adcontextprotocol.org"}
|
|
@@ -31,6 +31,7 @@ dependencies = [
|
|
|
31
31
|
"typing-extensions>=4.5.0",
|
|
32
32
|
"a2a-sdk>=0.3.0",
|
|
33
33
|
"mcp>=0.9.0",
|
|
34
|
+
"email-validator>=2.0.0",
|
|
34
35
|
]
|
|
35
36
|
|
|
36
37
|
[project.scripts]
|
|
@@ -45,7 +46,6 @@ dev = [
|
|
|
45
46
|
"black>=23.0.0",
|
|
46
47
|
"ruff>=0.1.0",
|
|
47
48
|
"datamodel-code-generator[http]>=0.35.0",
|
|
48
|
-
"email-validator>=2.0.0",
|
|
49
49
|
]
|
|
50
50
|
|
|
51
51
|
[project.urls]
|
|
@@ -8,8 +8,10 @@ Supports both A2A and MCP protocols with full type safety.
|
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
from adcp.adagents import (
|
|
11
|
+
AuthorizationContext,
|
|
11
12
|
domain_matches,
|
|
12
13
|
fetch_adagents,
|
|
14
|
+
fetch_agent_authorizations,
|
|
13
15
|
get_all_properties,
|
|
14
16
|
get_all_tags,
|
|
15
17
|
get_properties_by_agent,
|
|
@@ -134,7 +136,7 @@ from adcp.validation import (
|
|
|
134
136
|
validate_publisher_properties_item,
|
|
135
137
|
)
|
|
136
138
|
|
|
137
|
-
__version__ = "2.
|
|
139
|
+
__version__ = "2.4.0"
|
|
138
140
|
|
|
139
141
|
__all__ = [
|
|
140
142
|
# Client classes
|
|
@@ -178,7 +180,9 @@ __all__ = [
|
|
|
178
180
|
"Product",
|
|
179
181
|
"Property",
|
|
180
182
|
# Adagents validation
|
|
183
|
+
"AuthorizationContext",
|
|
181
184
|
"fetch_adagents",
|
|
185
|
+
"fetch_agent_authorizations",
|
|
182
186
|
"verify_agent_authorization",
|
|
183
187
|
"verify_agent_for_property",
|
|
184
188
|
"domain_matches",
|
|
@@ -518,3 +518,125 @@ def get_properties_by_agent(adagents_data: dict[str, Any], agent_url: str) -> li
|
|
|
518
518
|
return [p for p in properties if isinstance(p, dict)]
|
|
519
519
|
|
|
520
520
|
return []
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
class AuthorizationContext:
|
|
524
|
+
"""Authorization context for a publisher domain.
|
|
525
|
+
|
|
526
|
+
Attributes:
|
|
527
|
+
property_ids: List of property IDs the agent is authorized for
|
|
528
|
+
property_tags: List of property tags the agent is authorized for
|
|
529
|
+
raw_properties: Raw property data from adagents.json
|
|
530
|
+
"""
|
|
531
|
+
|
|
532
|
+
def __init__(self, properties: list[dict[str, Any]]):
|
|
533
|
+
"""Initialize from list of properties.
|
|
534
|
+
|
|
535
|
+
Args:
|
|
536
|
+
properties: List of property dictionaries from adagents.json
|
|
537
|
+
"""
|
|
538
|
+
self.property_ids: list[str] = []
|
|
539
|
+
self.property_tags: list[str] = []
|
|
540
|
+
self.raw_properties = properties
|
|
541
|
+
|
|
542
|
+
# Extract property IDs and tags
|
|
543
|
+
for prop in properties:
|
|
544
|
+
if not isinstance(prop, dict):
|
|
545
|
+
continue
|
|
546
|
+
|
|
547
|
+
# Extract property ID
|
|
548
|
+
prop_id = prop.get("id")
|
|
549
|
+
if prop_id and isinstance(prop_id, str):
|
|
550
|
+
self.property_ids.append(prop_id)
|
|
551
|
+
|
|
552
|
+
# Extract tags
|
|
553
|
+
tags = prop.get("tags", [])
|
|
554
|
+
if isinstance(tags, list):
|
|
555
|
+
for tag in tags:
|
|
556
|
+
if isinstance(tag, str) and tag not in self.property_tags:
|
|
557
|
+
self.property_tags.append(tag)
|
|
558
|
+
|
|
559
|
+
def __repr__(self) -> str:
|
|
560
|
+
return (
|
|
561
|
+
f"AuthorizationContext("
|
|
562
|
+
f"property_ids={self.property_ids}, "
|
|
563
|
+
f"property_tags={self.property_tags})"
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
async def fetch_agent_authorizations(
|
|
568
|
+
agent_url: str,
|
|
569
|
+
publisher_domains: list[str],
|
|
570
|
+
timeout: float = 10.0,
|
|
571
|
+
client: httpx.AsyncClient | None = None,
|
|
572
|
+
) -> dict[str, AuthorizationContext]:
|
|
573
|
+
"""Fetch authorization contexts by checking publisher adagents.json files.
|
|
574
|
+
|
|
575
|
+
This function discovers what publishers have authorized your agent by fetching
|
|
576
|
+
their adagents.json files from the .well-known directory and extracting the
|
|
577
|
+
properties your agent can access.
|
|
578
|
+
|
|
579
|
+
This is the "pull" approach - you query publishers to see if they've authorized you.
|
|
580
|
+
For the "push" approach where the agent tells you what it's authorized for,
|
|
581
|
+
use the agent's list_authorized_properties endpoint via ADCPClient.
|
|
582
|
+
|
|
583
|
+
Args:
|
|
584
|
+
agent_url: URL of your sales agent
|
|
585
|
+
publisher_domains: List of publisher domains to check (e.g., ["nytimes.com", "wsj.com"])
|
|
586
|
+
timeout: Request timeout in seconds for each fetch
|
|
587
|
+
client: Optional httpx.AsyncClient for connection pooling
|
|
588
|
+
|
|
589
|
+
Returns:
|
|
590
|
+
Dictionary mapping publisher domain to AuthorizationContext.
|
|
591
|
+
Only includes domains where the agent is authorized.
|
|
592
|
+
|
|
593
|
+
Example:
|
|
594
|
+
>>> # "Pull" approach - check what publishers have authorized you
|
|
595
|
+
>>> contexts = await fetch_agent_authorizations(
|
|
596
|
+
... "https://our-sales-agent.com",
|
|
597
|
+
... ["nytimes.com", "wsj.com", "cnn.com"]
|
|
598
|
+
... )
|
|
599
|
+
>>> for domain, ctx in contexts.items():
|
|
600
|
+
... print(f"{domain}:")
|
|
601
|
+
... print(f" Property IDs: {ctx.property_ids}")
|
|
602
|
+
... print(f" Tags: {ctx.property_tags}")
|
|
603
|
+
|
|
604
|
+
See Also:
|
|
605
|
+
ADCPClient.list_authorized_properties: "Push" approach using the agent's API
|
|
606
|
+
|
|
607
|
+
Notes:
|
|
608
|
+
- Silently skips domains where adagents.json is not found or invalid
|
|
609
|
+
- Only returns domains where the agent is explicitly authorized
|
|
610
|
+
- For production use with many domains, pass a shared httpx.AsyncClient
|
|
611
|
+
to enable connection pooling
|
|
612
|
+
"""
|
|
613
|
+
import asyncio
|
|
614
|
+
|
|
615
|
+
# Create tasks to fetch all adagents.json files in parallel
|
|
616
|
+
async def fetch_authorization_for_domain(
|
|
617
|
+
domain: str,
|
|
618
|
+
) -> tuple[str, AuthorizationContext | None]:
|
|
619
|
+
"""Fetch authorization context for a single domain."""
|
|
620
|
+
try:
|
|
621
|
+
adagents_data = await fetch_adagents(domain, timeout=timeout, client=client)
|
|
622
|
+
|
|
623
|
+
# Check if agent is authorized
|
|
624
|
+
if not verify_agent_authorization(adagents_data, agent_url):
|
|
625
|
+
return (domain, None)
|
|
626
|
+
|
|
627
|
+
# Get properties for this agent
|
|
628
|
+
properties = get_properties_by_agent(adagents_data, agent_url)
|
|
629
|
+
|
|
630
|
+
# Create authorization context
|
|
631
|
+
return (domain, AuthorizationContext(properties))
|
|
632
|
+
|
|
633
|
+
except (AdagentsNotFoundError, AdagentsValidationError, AdagentsTimeoutError):
|
|
634
|
+
# Silently skip domains with missing or invalid adagents.json
|
|
635
|
+
return (domain, None)
|
|
636
|
+
|
|
637
|
+
# Fetch all domains in parallel
|
|
638
|
+
tasks = [fetch_authorization_for_domain(domain) for domain in publisher_domains]
|
|
639
|
+
results = await asyncio.gather(*tasks)
|
|
640
|
+
|
|
641
|
+
# Build result dictionary, filtering out None values
|
|
642
|
+
return {domain: ctx for domain, ctx in results if ctx is not None}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"""Generated AdCP types.
|
|
2
|
+
|
|
3
|
+
Auto-generated by datamodel-code-generator from JSON schemas.
|
|
4
|
+
DO NOT EDIT MANUALLY.
|
|
5
|
+
|
|
6
|
+
Generated from: https://github.com/adcontextprotocol/adcp/tree/main/schemas
|
|
7
|
+
Generation date: 2025-11-18 03:04:43 UTC
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
# Import all types from generated_poc modules
|
|
13
|
+
from adcp.types.generated_poc.activate_signal_request import ActivateSignalRequest
|
|
14
|
+
from adcp.types.generated_poc.activate_signal_response import ActivateSignalResponse, ActivateSignalResponse1, ActivateSignalResponse2
|
|
15
|
+
from adcp.types.generated_poc.activation_key import ActivationKey1, ActivationKey2
|
|
16
|
+
from adcp.types.generated_poc.adagents import AuthorizedAgents, AuthorizedAgents1, AuthorizedAgents2, AuthorizedAgents3, AuthorizedSalesAgents, Contact, PropertyId, PropertyTag, PublisherProperties, PublisherProperties1, Tags
|
|
17
|
+
from adcp.types.generated_poc.asset_type import AssetTypeSchema, ContentLength, Dimensions, Duration, FileSize, Quality, Requirements, Type
|
|
18
|
+
from adcp.types.generated_poc.audio_asset import AudioAsset
|
|
19
|
+
from adcp.types.generated_poc.brand_manifest import Asset, Asset1, AssetType, BrandManifest1, BrandManifest2, Colors, Disclaimer, FeedFormat, Fonts, Logo, Metadata, ProductCatalog, ProductCatalog1, UpdateFrequency
|
|
20
|
+
from adcp.types.generated_poc.brand_manifest_ref import BrandManifest, BrandManifestReference
|
|
21
|
+
from adcp.types.generated_poc.build_creative_request import BuildCreativeRequest
|
|
22
|
+
from adcp.types.generated_poc.build_creative_response import BuildCreativeResponse, BuildCreativeResponse1, BuildCreativeResponse2
|
|
23
|
+
from adcp.types.generated_poc.channels import AdvertisingChannels
|
|
24
|
+
from adcp.types.generated_poc.cpc_option import CpcPricingOption
|
|
25
|
+
from adcp.types.generated_poc.cpcv_option import CpcvPricingOption
|
|
26
|
+
from adcp.types.generated_poc.cpm_auction_option import CpmAuctionPricingOption, PriceGuidance
|
|
27
|
+
from adcp.types.generated_poc.cpm_fixed_option import CpmFixedRatePricingOption
|
|
28
|
+
from adcp.types.generated_poc.cpp_option import CppPricingOption, Parameters
|
|
29
|
+
from adcp.types.generated_poc.cpv_option import CpvPricingOption, ViewThreshold, ViewThreshold1
|
|
30
|
+
from adcp.types.generated_poc.create_media_buy_request import CreateMediaBuyRequest, ReportingFrequency, ReportingWebhook, RequestedMetric
|
|
31
|
+
from adcp.types.generated_poc.create_media_buy_response import CreateMediaBuyResponse, CreateMediaBuyResponse1, CreateMediaBuyResponse2, Package
|
|
32
|
+
from adcp.types.generated_poc.creative_asset import CreativeAsset, Input
|
|
33
|
+
from adcp.types.generated_poc.creative_assignment import CreativeAssignment
|
|
34
|
+
from adcp.types.generated_poc.creative_manifest import CreativeManifest
|
|
35
|
+
from adcp.types.generated_poc.creative_policy import CoBranding, CreativePolicy, LandingPage
|
|
36
|
+
from adcp.types.generated_poc.creative_status import CreativeStatus
|
|
37
|
+
from adcp.types.generated_poc.css_asset import CssAsset
|
|
38
|
+
from adcp.types.generated_poc.daast_asset import DaastAsset1, DaastAsset2, DaastVersion, TrackingEvent
|
|
39
|
+
from adcp.types.generated_poc.delivery_metrics import DeliveryMetrics, DoohMetrics, QuartileData, VenueBreakdownItem
|
|
40
|
+
from adcp.types.generated_poc.delivery_type import DeliveryType
|
|
41
|
+
from adcp.types.generated_poc.deployment import Deployment1, Deployment2
|
|
42
|
+
from adcp.types.generated_poc.destination import Destination1, Destination2
|
|
43
|
+
from adcp.types.generated_poc.error import Error
|
|
44
|
+
from adcp.types.generated_poc.flat_rate_option import FlatRatePricingOption
|
|
45
|
+
from adcp.types.generated_poc.format import AssetsRequired, AssetsRequired1, Format, FormatCard, FormatCardDetailed, Render, Responsive, Unit
|
|
46
|
+
from adcp.types.generated_poc.format_id import FormatId
|
|
47
|
+
from adcp.types.generated_poc.frequency_cap import FrequencyCap
|
|
48
|
+
from adcp.types.generated_poc.frequency_cap_scope import FrequencyCapScope
|
|
49
|
+
from adcp.types.generated_poc.get_media_buy_delivery_request import GetMediaBuyDeliveryRequest, StatusFilter, StatusFilterEnum
|
|
50
|
+
from adcp.types.generated_poc.get_media_buy_delivery_response import AggregatedTotals, ByPackageItem, DailyBreakdownItem, GetMediaBuyDeliveryResponse, MediaBuyDelivery, NotificationType, ReportingPeriod, Status, Totals
|
|
51
|
+
from adcp.types.generated_poc.get_products_request import Filters, FormatType, GetProductsRequest
|
|
52
|
+
from adcp.types.generated_poc.get_products_response import GetProductsResponse
|
|
53
|
+
from adcp.types.generated_poc.get_signals_request import CatalogType, Country, DeliverTo, GetSignalsRequest
|
|
54
|
+
from adcp.types.generated_poc.get_signals_response import GetSignalsResponse, Pricing, Signal, SignalType
|
|
55
|
+
from adcp.types.generated_poc.html_asset import HtmlAsset
|
|
56
|
+
from adcp.types.generated_poc.identifier_types import PropertyIdentifierTypes
|
|
57
|
+
from adcp.types.generated_poc.image_asset import ImageAsset
|
|
58
|
+
from adcp.types.generated_poc.index import AdcpAssetTypeRegistry
|
|
59
|
+
from adcp.types.generated_poc.javascript_asset import JavascriptAsset, ModuleType
|
|
60
|
+
from adcp.types.generated_poc.list_authorized_properties_request import ListAuthorizedPropertiesRequest, PublisherDomain
|
|
61
|
+
from adcp.types.generated_poc.list_authorized_properties_response import ListAuthorizedPropertiesResponse, PrimaryCountry
|
|
62
|
+
from adcp.types.generated_poc.list_creative_formats_request import ListCreativeFormatsRequest
|
|
63
|
+
from adcp.types.generated_poc.list_creative_formats_response import Capability, CreativeAgent, ListCreativeFormatsResponse
|
|
64
|
+
from adcp.types.generated_poc.list_creatives_request import Direction, Field1, FieldModel, ListCreativesRequest, Pagination, Sort
|
|
65
|
+
from adcp.types.generated_poc.list_creatives_response import AssignedPackage, Assignments, Creative, ListCreativesResponse, Performance, QuerySummary, SortApplied, StatusSummary
|
|
66
|
+
from adcp.types.generated_poc.markdown_asset import MarkdownAsset, MarkdownFlavor
|
|
67
|
+
from adcp.types.generated_poc.measurement import Measurement
|
|
68
|
+
from adcp.types.generated_poc.media_buy import MediaBuy
|
|
69
|
+
from adcp.types.generated_poc.media_buy_status import MediaBuyStatus
|
|
70
|
+
from adcp.types.generated_poc.pacing import Pacing
|
|
71
|
+
from adcp.types.generated_poc.package_request import PackageRequest
|
|
72
|
+
from adcp.types.generated_poc.package_status import PackageStatus
|
|
73
|
+
from adcp.types.generated_poc.performance_feedback import FeedbackSource, MeasurementPeriod, MetricType, PerformanceFeedback
|
|
74
|
+
from adcp.types.generated_poc.placement import Placement
|
|
75
|
+
from adcp.types.generated_poc.preview_creative_request import Input2, OutputFormat, PreviewCreativeRequest, PreviewCreativeRequest1, PreviewCreativeRequest2, Request
|
|
76
|
+
from adcp.types.generated_poc.preview_creative_response import Input4, Preview, Preview1, Preview2, PreviewCreativeResponse, PreviewCreativeResponse1, PreviewCreativeResponse2, Response, Response1, Results, Results1
|
|
77
|
+
from adcp.types.generated_poc.preview_render import Embedding, PreviewRender, PreviewRender1, PreviewRender2, PreviewRender3
|
|
78
|
+
from adcp.types.generated_poc.pricing_model import PricingModel
|
|
79
|
+
from adcp.types.generated_poc.pricing_option import CpcOption, CpcvOption, CpmAuctionOption, CpmFixedOption, CppOption, CpvOption, FlatRateOption, Parameters1, Parameters2, PriceGuidance1, PricingOption, VcpmAuctionOption, VcpmFixedOption
|
|
80
|
+
from adcp.types.generated_poc.product import DeliveryMeasurement, Product, ProductCard, ProductCardDetailed, PublisherProperties3
|
|
81
|
+
from adcp.types.generated_poc.promoted_offerings import AssetSelectors, Offering, PromotedOfferings
|
|
82
|
+
from adcp.types.generated_poc.promoted_products import PromotedProducts
|
|
83
|
+
from adcp.types.generated_poc.property import Identifier, Property, PropertyType, Tag
|
|
84
|
+
from adcp.types.generated_poc.protocol_envelope import ProtocolEnvelope
|
|
85
|
+
from adcp.types.generated_poc.provide_performance_feedback_request import ProvidePerformanceFeedbackRequest
|
|
86
|
+
from adcp.types.generated_poc.provide_performance_feedback_response import ProvidePerformanceFeedbackResponse, ProvidePerformanceFeedbackResponse1, ProvidePerformanceFeedbackResponse2
|
|
87
|
+
from adcp.types.generated_poc.publisher_identifier_types import PublisherIdentifierTypes
|
|
88
|
+
from adcp.types.generated_poc.push_notification_config import Authentication, PushNotificationConfig, Scheme
|
|
89
|
+
from adcp.types.generated_poc.reporting_capabilities import AvailableMetric, AvailableReportingFrequency, ReportingCapabilities
|
|
90
|
+
from adcp.types.generated_poc.response import ProtocolResponse
|
|
91
|
+
from adcp.types.generated_poc.standard_format_ids import StandardFormatIds
|
|
92
|
+
from adcp.types.generated_poc.start_timing import StartTiming
|
|
93
|
+
from adcp.types.generated_poc.sub_asset import SubAsset1, SubAsset2
|
|
94
|
+
from adcp.types.generated_poc.sync_creatives_request import SyncCreativesRequest, ValidationMode
|
|
95
|
+
from adcp.types.generated_poc.sync_creatives_response import Action, SyncCreativesResponse, SyncCreativesResponse1, SyncCreativesResponse2
|
|
96
|
+
from adcp.types.generated_poc.targeting import GeoCountryAnyOfItem, TargetingOverlay
|
|
97
|
+
from adcp.types.generated_poc.task_status import TaskStatus
|
|
98
|
+
from adcp.types.generated_poc.task_type import TaskType
|
|
99
|
+
from adcp.types.generated_poc.tasks_get_request import TasksGetRequest
|
|
100
|
+
from adcp.types.generated_poc.tasks_get_response import Details, Domain, HistoryItem, Progress, TasksGetResponse
|
|
101
|
+
from adcp.types.generated_poc.tasks_list_request import TasksListRequest
|
|
102
|
+
from adcp.types.generated_poc.tasks_list_response import DomainBreakdown, Task, TasksListResponse
|
|
103
|
+
from adcp.types.generated_poc.text_asset import TextAsset
|
|
104
|
+
from adcp.types.generated_poc.update_media_buy_request import Packages, Packages1, Packages2, Packages3, UpdateMediaBuyRequest, UpdateMediaBuyRequest1, UpdateMediaBuyRequest2
|
|
105
|
+
from adcp.types.generated_poc.update_media_buy_response import AffectedPackage, UpdateMediaBuyResponse, UpdateMediaBuyResponse1, UpdateMediaBuyResponse2
|
|
106
|
+
from adcp.types.generated_poc.url_asset import UrlAsset, UrlType
|
|
107
|
+
from adcp.types.generated_poc.vast_asset import VastAsset1, VastAsset2, VastVersion
|
|
108
|
+
from adcp.types.generated_poc.vcpm_auction_option import VcpmAuctionPricingOption
|
|
109
|
+
from adcp.types.generated_poc.vcpm_fixed_option import VcpmFixedRatePricingOption
|
|
110
|
+
from adcp.types.generated_poc.video_asset import VideoAsset
|
|
111
|
+
from adcp.types.generated_poc.webhook_asset import Method, Method1, ResponseType, Security, WebhookAsset
|
|
112
|
+
from adcp.types.generated_poc.webhook_payload import WebhookPayload
|
|
113
|
+
|
|
114
|
+
# Backward compatibility aliases for renamed types
|
|
115
|
+
BrandManifestRef = BrandManifestReference
|
|
116
|
+
Channels = AdvertisingChannels
|
|
117
|
+
|
|
118
|
+
# Explicit exports
|
|
119
|
+
__all__ = ['Action', 'ActivateSignalRequest', 'ActivateSignalResponse', 'ActivateSignalResponse1', 'ActivateSignalResponse2', 'ActivationKey1', 'ActivationKey2', 'AdcpAssetTypeRegistry', 'AdvertisingChannels', 'AffectedPackage', 'AggregatedTotals', 'Asset', 'Asset1', 'AssetSelectors', 'AssetType', 'AssetTypeSchema', 'AssetsRequired', 'AssetsRequired1', 'AssignedPackage', 'Assignments', 'AudioAsset', 'Authentication', 'AuthorizedAgents', 'AuthorizedAgents1', 'AuthorizedAgents2', 'AuthorizedAgents3', 'AuthorizedSalesAgents', 'AvailableMetric', 'AvailableReportingFrequency', 'BrandManifest', 'BrandManifest1', 'BrandManifest2', 'BrandManifestRef', 'BrandManifestReference', 'BuildCreativeRequest', 'BuildCreativeResponse', 'BuildCreativeResponse1', 'BuildCreativeResponse2', 'ByPackageItem', 'Capability', 'CatalogType', 'Channels', 'CoBranding', 'Colors', 'Contact', 'ContentLength', 'Country', 'CpcOption', 'CpcPricingOption', 'CpcvOption', 'CpcvPricingOption', 'CpmAuctionOption', 'CpmAuctionPricingOption', 'CpmFixedOption', 'CpmFixedRatePricingOption', 'CppOption', 'CppPricingOption', 'CpvOption', 'CpvPricingOption', 'CreateMediaBuyRequest', 'CreateMediaBuyResponse', 'CreateMediaBuyResponse1', 'CreateMediaBuyResponse2', 'Creative', 'CreativeAgent', 'CreativeAsset', 'CreativeAssignment', 'CreativeManifest', 'CreativePolicy', 'CreativeStatus', 'CssAsset', 'DaastAsset1', 'DaastAsset2', 'DaastVersion', 'DailyBreakdownItem', 'DeliverTo', 'DeliveryMeasurement', 'DeliveryMetrics', 'DeliveryType', 'Deployment1', 'Deployment2', 'Destination1', 'Destination2', 'Details', 'Dimensions', 'Direction', 'Disclaimer', 'Domain', 'DomainBreakdown', 'DoohMetrics', 'Duration', 'Embedding', 'Error', 'FeedFormat', 'FeedbackSource', 'Field1', 'FieldModel', 'FileSize', 'Filters', 'FlatRateOption', 'FlatRatePricingOption', 'Fonts', 'Format', 'FormatCard', 'FormatCardDetailed', 'FormatId', 'FormatType', 'FrequencyCap', 'FrequencyCapScope', 'GeoCountryAnyOfItem', 'GetMediaBuyDeliveryRequest', 'GetMediaBuyDeliveryResponse', 'GetProductsRequest', 'GetProductsResponse', 'GetSignalsRequest', 'GetSignalsResponse', 'HistoryItem', 'HtmlAsset', 'Identifier', 'ImageAsset', 'Input', 'Input2', 'Input4', 'JavascriptAsset', 'LandingPage', 'ListAuthorizedPropertiesRequest', 'ListAuthorizedPropertiesResponse', 'ListCreativeFormatsRequest', 'ListCreativeFormatsResponse', 'ListCreativesRequest', 'ListCreativesResponse', 'Logo', 'MarkdownAsset', 'MarkdownFlavor', 'Measurement', 'MeasurementPeriod', 'MediaBuy', 'MediaBuyDelivery', 'MediaBuyStatus', 'Metadata', 'Method', 'Method1', 'MetricType', 'ModuleType', 'NotificationType', 'Offering', 'OutputFormat', 'Pacing', 'Package', 'PackageRequest', 'PackageStatus', 'Packages', 'Packages1', 'Packages2', 'Packages3', 'Pagination', 'Parameters', 'Parameters1', 'Parameters2', 'Performance', 'PerformanceFeedback', 'Placement', 'Preview', 'Preview1', 'Preview2', 'PreviewCreativeRequest', 'PreviewCreativeRequest1', 'PreviewCreativeRequest2', 'PreviewCreativeResponse', 'PreviewCreativeResponse1', 'PreviewCreativeResponse2', 'PreviewRender', 'PreviewRender1', 'PreviewRender2', 'PreviewRender3', 'PriceGuidance', 'PriceGuidance1', 'Pricing', 'PricingModel', 'PricingOption', 'PrimaryCountry', 'Product', 'ProductCard', 'ProductCardDetailed', 'ProductCatalog', 'ProductCatalog1', 'Progress', 'PromotedOfferings', 'PromotedProducts', 'Property', 'PropertyId', 'PropertyIdentifierTypes', 'PropertyTag', 'PropertyType', 'ProtocolEnvelope', 'ProtocolResponse', 'ProvidePerformanceFeedbackRequest', 'ProvidePerformanceFeedbackResponse', 'ProvidePerformanceFeedbackResponse1', 'ProvidePerformanceFeedbackResponse2', 'PublisherDomain', 'PublisherIdentifierTypes', 'PublisherProperties', 'PublisherProperties1', 'PublisherProperties3', 'PushNotificationConfig', 'Quality', 'QuartileData', 'QuerySummary', 'Render', 'ReportingCapabilities', 'ReportingFrequency', 'ReportingPeriod', 'ReportingWebhook', 'Request', 'RequestedMetric', 'Requirements', 'Response', 'Response1', 'ResponseType', 'Responsive', 'Results', 'Results1', 'Scheme', 'Security', 'Signal', 'SignalType', 'Sort', 'SortApplied', 'StandardFormatIds', 'StartTiming', 'Status', 'StatusFilter', 'StatusFilterEnum', 'StatusSummary', 'SubAsset1', 'SubAsset2', 'SyncCreativesRequest', 'SyncCreativesResponse', 'SyncCreativesResponse1', 'SyncCreativesResponse2', 'Tag', 'Tags', 'TargetingOverlay', 'Task', 'TaskStatus', 'TaskType', 'TasksGetRequest', 'TasksGetResponse', 'TasksListRequest', 'TasksListResponse', 'TextAsset', 'Totals', 'TrackingEvent', 'Type', 'Unit', 'UpdateFrequency', 'UpdateMediaBuyRequest', 'UpdateMediaBuyRequest1', 'UpdateMediaBuyRequest2', 'UpdateMediaBuyResponse', 'UpdateMediaBuyResponse1', 'UpdateMediaBuyResponse2', 'UrlAsset', 'UrlType', 'ValidationMode', 'VastAsset1', 'VastAsset2', 'VastVersion', 'VcpmAuctionOption', 'VcpmAuctionPricingOption', 'VcpmFixedOption', 'VcpmFixedRatePricingOption', 'VenueBreakdownItem', 'VideoAsset', 'ViewThreshold', 'ViewThreshold1', 'WebhookAsset', 'WebhookPayload']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: activate-signal-request.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:04:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -14,21 +14,21 @@ from . import destination
|
|
|
14
14
|
|
|
15
15
|
class ActivateSignalRequest(AdCPBaseModel):
|
|
16
16
|
model_config = ConfigDict(
|
|
17
|
-
extra=
|
|
17
|
+
extra='forbid',
|
|
18
18
|
)
|
|
19
19
|
context: Annotated[
|
|
20
20
|
dict[str, Any] | None,
|
|
21
21
|
Field(
|
|
22
|
-
description=
|
|
22
|
+
description='Initiator-provided context included in the request payload. Agents must echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata.'
|
|
23
23
|
),
|
|
24
24
|
] = None
|
|
25
25
|
destinations: Annotated[
|
|
26
26
|
list[destination.Destination1 | destination.Destination2],
|
|
27
27
|
Field(
|
|
28
|
-
description=
|
|
28
|
+
description='Target destination(s) for activation. If the authenticated caller matches one of these destinations, activation keys will be included in the response.',
|
|
29
29
|
min_length=1,
|
|
30
30
|
),
|
|
31
31
|
]
|
|
32
32
|
signal_agent_segment_id: Annotated[
|
|
33
|
-
str, Field(description=
|
|
33
|
+
str, Field(description='The universal identifier for the signal to activate')
|
|
34
34
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: activate-signal-response.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:04:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -14,34 +14,34 @@ from . import deployment, error
|
|
|
14
14
|
|
|
15
15
|
class ActivateSignalResponse1(AdCPBaseModel):
|
|
16
16
|
model_config = ConfigDict(
|
|
17
|
-
extra=
|
|
17
|
+
extra='forbid',
|
|
18
18
|
)
|
|
19
19
|
context: Annotated[
|
|
20
20
|
dict[str, Any] | None,
|
|
21
21
|
Field(
|
|
22
|
-
description=
|
|
22
|
+
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
23
23
|
),
|
|
24
24
|
] = None
|
|
25
25
|
deployments: Annotated[
|
|
26
26
|
list[deployment.Deployment1 | deployment.Deployment2],
|
|
27
|
-
Field(description=
|
|
27
|
+
Field(description='Array of deployment results for each destination'),
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class ActivateSignalResponse2(AdCPBaseModel):
|
|
32
32
|
model_config = ConfigDict(
|
|
33
|
-
extra=
|
|
33
|
+
extra='forbid',
|
|
34
34
|
)
|
|
35
35
|
context: Annotated[
|
|
36
36
|
dict[str, Any] | None,
|
|
37
37
|
Field(
|
|
38
|
-
description=
|
|
38
|
+
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
39
39
|
),
|
|
40
40
|
] = None
|
|
41
41
|
errors: Annotated[
|
|
42
42
|
list[error.Error],
|
|
43
43
|
Field(
|
|
44
|
-
description=
|
|
44
|
+
description='Array of errors explaining why activation failed (e.g., platform connectivity issues, signal definition problems, authentication failures)',
|
|
45
45
|
min_length=1,
|
|
46
46
|
),
|
|
47
47
|
]
|
|
@@ -51,7 +51,7 @@ class ActivateSignalResponse(RootModel[ActivateSignalResponse1 | ActivateSignalR
|
|
|
51
51
|
root: Annotated[
|
|
52
52
|
ActivateSignalResponse1 | ActivateSignalResponse2,
|
|
53
53
|
Field(
|
|
54
|
-
description=
|
|
55
|
-
title=
|
|
54
|
+
description='Response payload for activate_signal task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - the signal is either fully activated or not activated at all.',
|
|
55
|
+
title='Activate Signal Response',
|
|
56
56
|
),
|
|
57
57
|
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: activation-key.json
|
|
3
|
+
# timestamp: 2025-11-18T03:04:10+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
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ActivationKey1(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra='forbid',
|
|
16
|
+
)
|
|
17
|
+
segment_id: Annotated[
|
|
18
|
+
str,
|
|
19
|
+
Field(description='The platform-specific segment identifier to use in campaign targeting'),
|
|
20
|
+
]
|
|
21
|
+
type: Annotated[Literal['segment_id'], Field(description='Segment ID based targeting')]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ActivationKey2(AdCPBaseModel):
|
|
25
|
+
model_config = ConfigDict(
|
|
26
|
+
extra='forbid',
|
|
27
|
+
)
|
|
28
|
+
key: Annotated[str, Field(description='The targeting parameter key')]
|
|
29
|
+
type: Annotated[Literal['key_value'], Field(description='Key-value pair based targeting')]
|
|
30
|
+
value: Annotated[str, Field(description='The targeting parameter value')]
|