adcp 1.6.1__py3-none-any.whl → 2.1.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 +110 -189
- adcp/adagents.py +11 -12
- adcp/client.py +16 -11
- adcp/py.typed +0 -0
- adcp/types/aliases.py +209 -0
- adcp/types/generated.py +540 -1134
- adcp/types/generated_poc/__init__.py +3 -0
- adcp/types/generated_poc/activate_signal_request.py +34 -0
- adcp/types/generated_poc/activate_signal_response.py +57 -0
- adcp/types/generated_poc/activation_key.py +30 -0
- adcp/types/generated_poc/adagents.py +266 -0
- adcp/types/generated_poc/asset_type.py +100 -0
- adcp/types/generated_poc/audio_asset.py +26 -0
- adcp/types/generated_poc/brand_manifest.py +260 -0
- adcp/types/generated_poc/brand_manifest_ref.py +361 -0
- adcp/types/generated_poc/build_creative_request.py +43 -0
- adcp/types/generated_poc/build_creative_response.py +57 -0
- adcp/types/generated_poc/channels.py +19 -0
- adcp/types/generated_poc/cpc_option.py +39 -0
- adcp/types/generated_poc/cpcv_option.py +41 -0
- adcp/types/generated_poc/cpm_auction_option.py +54 -0
- adcp/types/generated_poc/cpm_fixed_option.py +39 -0
- adcp/types/generated_poc/cpp_option.py +60 -0
- adcp/types/generated_poc/cpv_option.py +73 -0
- adcp/types/generated_poc/create_media_buy_request.py +96 -0
- adcp/types/generated_poc/create_media_buy_response.py +66 -0
- adcp/types/generated_poc/creative_asset.py +83 -0
- adcp/types/generated_poc/creative_assignment.py +27 -0
- adcp/types/generated_poc/creative_manifest.py +61 -0
- adcp/types/generated_poc/creative_policy.py +34 -0
- adcp/types/generated_poc/creative_status.py +14 -0
- adcp/types/generated_poc/css_asset.py +20 -0
- adcp/types/generated_poc/daast_asset.py +76 -0
- adcp/types/generated_poc/delivery_metrics.py +111 -0
- adcp/types/generated_poc/delivery_type.py +12 -0
- adcp/types/generated_poc/deployment.py +78 -0
- adcp/types/generated_poc/destination.py +43 -0
- adcp/types/generated_poc/error.py +29 -0
- adcp/types/generated_poc/flat_rate_option.py +93 -0
- adcp/types/generated_poc/format.py +260 -0
- adcp/types/generated_poc/format_id.py +29 -0
- adcp/types/generated_poc/frequency_cap.py +19 -0
- adcp/types/generated_poc/frequency_cap_scope.py +16 -0
- adcp/types/generated_poc/get_media_buy_delivery_request.py +65 -0
- adcp/types/generated_poc/get_media_buy_delivery_response.py +220 -0
- adcp/types/generated_poc/get_products_request.py +83 -0
- adcp/types/generated_poc/get_products_response.py +29 -0
- adcp/types/generated_poc/get_signals_request.py +77 -0
- adcp/types/generated_poc/get_signals_response.py +65 -0
- adcp/types/generated_poc/html_asset.py +18 -0
- adcp/types/generated_poc/identifier_types.py +29 -0
- adcp/types/generated_poc/image_asset.py +23 -0
- adcp/types/generated_poc/index.py +17 -0
- adcp/types/generated_poc/javascript_asset.py +25 -0
- adcp/types/generated_poc/list_authorized_properties_request.py +39 -0
- adcp/types/generated_poc/list_authorized_properties_response.py +85 -0
- adcp/types/generated_poc/list_creative_formats_request.py +93 -0
- adcp/types/generated_poc/list_creative_formats_response.py +63 -0
- adcp/types/generated_poc/list_creatives_request.py +154 -0
- adcp/types/generated_poc/list_creatives_response.py +234 -0
- adcp/types/generated_poc/markdown_asset.py +43 -0
- adcp/types/generated_poc/measurement.py +40 -0
- adcp/types/generated_poc/media_buy.py +37 -0
- adcp/types/generated_poc/media_buy_status.py +14 -0
- adcp/types/generated_poc/pacing.py +13 -0
- adcp/types/generated_poc/package.py +61 -0
- adcp/types/generated_poc/package_request.py +61 -0
- adcp/types/generated_poc/package_status.py +14 -0
- adcp/types/generated_poc/performance_feedback.py +89 -0
- adcp/types/generated_poc/placement.py +37 -0
- adcp/types/generated_poc/preview_creative_request.py +163 -0
- adcp/types/generated_poc/preview_creative_response.py +175 -0
- adcp/types/generated_poc/preview_render.py +144 -0
- adcp/types/generated_poc/pricing_model.py +17 -0
- adcp/types/generated_poc/pricing_option.py +365 -0
- adcp/types/generated_poc/product.py +211 -0
- adcp/types/generated_poc/promoted_offerings.py +102 -0
- adcp/types/generated_poc/promoted_products.py +38 -0
- adcp/types/generated_poc/property.py +79 -0
- adcp/types/generated_poc/protocol_envelope.py +61 -0
- adcp/types/generated_poc/provide_performance_feedback_request.py +85 -0
- adcp/types/generated_poc/provide_performance_feedback_response.py +59 -0
- adcp/types/generated_poc/publisher_identifier_types.py +15 -0
- adcp/types/generated_poc/push_notification_config.py +55 -0
- adcp/types/generated_poc/reporting_capabilities.py +68 -0
- adcp/types/generated_poc/response.py +24 -0
- adcp/types/generated_poc/standard_format_ids.py +45 -0
- adcp/types/generated_poc/start_timing.py +13 -0
- adcp/types/generated_poc/sub_asset.py +55 -0
- adcp/types/generated_poc/sync_creatives_request.py +69 -0
- adcp/types/generated_poc/sync_creatives_response.py +117 -0
- adcp/types/generated_poc/targeting.py +53 -0
- adcp/types/generated_poc/task_status.py +19 -0
- adcp/types/generated_poc/task_type.py +15 -0
- adcp/types/generated_poc/tasks_get_request.py +29 -0
- adcp/types/generated_poc/tasks_get_response.py +112 -0
- adcp/types/generated_poc/tasks_list_request.py +121 -0
- adcp/types/generated_poc/tasks_list_response.py +122 -0
- adcp/types/generated_poc/text_asset.py +20 -0
- adcp/types/generated_poc/update_media_buy_request.py +160 -0
- adcp/types/generated_poc/update_media_buy_response.py +67 -0
- adcp/types/generated_poc/url_asset.py +33 -0
- adcp/types/generated_poc/vast_asset.py +86 -0
- adcp/types/generated_poc/vcpm_auction_option.py +57 -0
- adcp/types/generated_poc/vcpm_fixed_option.py +43 -0
- adcp/types/generated_poc/video_asset.py +28 -0
- adcp/types/generated_poc/webhook_asset.py +65 -0
- adcp/types/generated_poc/webhook_payload.py +102 -0
- adcp/utils/preview_cache.py +54 -41
- adcp/validation.py +172 -0
- {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/METADATA +42 -3
- adcp-2.1.0.dist-info/RECORD +132 -0
- adcp/types/tasks.py +0 -511
- adcp-1.6.1.dist-info/RECORD +0 -28
- {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/WHEEL +0 -0
- {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/entry_points.txt +0 -0
- {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-1.6.1.dist-info → adcp-2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: get-products-response.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+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
|
+
from . import error, product
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class GetProductsResponse(AdCPBaseModel):
|
|
16
|
+
model_config = ConfigDict(
|
|
17
|
+
extra="forbid",
|
|
18
|
+
)
|
|
19
|
+
context: Annotated[
|
|
20
|
+
dict[str, Any] | None,
|
|
21
|
+
Field(
|
|
22
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
23
|
+
),
|
|
24
|
+
] = None
|
|
25
|
+
errors: Annotated[
|
|
26
|
+
list[error.Error] | None,
|
|
27
|
+
Field(description="Task-specific errors and warnings (e.g., product filtering issues)"),
|
|
28
|
+
] = None
|
|
29
|
+
products: Annotated[list[product.Product], Field(description="Array of matching products")]
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: get-signals-request.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated, Any
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import ConfigDict, Field, RootModel
|
|
12
|
+
|
|
13
|
+
from . import destination
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Country(RootModel[str]):
|
|
17
|
+
root: Annotated[str, Field(pattern="^[A-Z]{2}$")]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class DeliverTo(AdCPBaseModel):
|
|
21
|
+
model_config = ConfigDict(
|
|
22
|
+
extra="forbid",
|
|
23
|
+
)
|
|
24
|
+
countries: Annotated[
|
|
25
|
+
list[Country], Field(description="Countries where signals will be used (ISO codes)")
|
|
26
|
+
]
|
|
27
|
+
destinations: Annotated[
|
|
28
|
+
list[destination.Destination1 | destination.Destination2],
|
|
29
|
+
Field(
|
|
30
|
+
description="List of destination platforms (DSPs, sales agents, etc.). If the authenticated caller matches one of these destinations, activation keys will be included in the response.",
|
|
31
|
+
min_length=1,
|
|
32
|
+
),
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class CatalogType(Enum):
|
|
37
|
+
marketplace = "marketplace"
|
|
38
|
+
custom = "custom"
|
|
39
|
+
owned = "owned"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class Filters(AdCPBaseModel):
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
extra="forbid",
|
|
45
|
+
)
|
|
46
|
+
catalog_types: Annotated[
|
|
47
|
+
list[CatalogType] | None, Field(description="Filter by catalog type")
|
|
48
|
+
] = None
|
|
49
|
+
data_providers: Annotated[
|
|
50
|
+
list[str] | None, Field(description="Filter by specific data providers")
|
|
51
|
+
] = None
|
|
52
|
+
max_cpm: Annotated[float | None, Field(description="Maximum CPM price filter", ge=0.0)] = None
|
|
53
|
+
min_coverage_percentage: Annotated[
|
|
54
|
+
float | None, Field(description="Minimum coverage requirement", ge=0.0, le=100.0)
|
|
55
|
+
] = None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class GetSignalsRequest(AdCPBaseModel):
|
|
59
|
+
model_config = ConfigDict(
|
|
60
|
+
extra="forbid",
|
|
61
|
+
)
|
|
62
|
+
context: Annotated[
|
|
63
|
+
dict[str, Any] | None,
|
|
64
|
+
Field(
|
|
65
|
+
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."
|
|
66
|
+
),
|
|
67
|
+
] = None
|
|
68
|
+
deliver_to: Annotated[
|
|
69
|
+
DeliverTo, Field(description="Destination platforms where signals need to be activated")
|
|
70
|
+
]
|
|
71
|
+
filters: Annotated[Filters | None, Field(description="Filters to refine results")] = None
|
|
72
|
+
max_results: Annotated[
|
|
73
|
+
int | None, Field(description="Maximum number of results to return", ge=1)
|
|
74
|
+
] = None
|
|
75
|
+
signal_spec: Annotated[
|
|
76
|
+
str, Field(description="Natural language description of the desired signals")
|
|
77
|
+
]
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: get-signals-response.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated, Any
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from . import deployment, error
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Pricing(AdCPBaseModel):
|
|
17
|
+
model_config = ConfigDict(
|
|
18
|
+
extra="forbid",
|
|
19
|
+
)
|
|
20
|
+
cpm: Annotated[float, Field(description="Cost per thousand impressions", ge=0.0)]
|
|
21
|
+
currency: Annotated[str, Field(description="Currency code", pattern="^[A-Z]{3}$")]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class SignalType(Enum):
|
|
25
|
+
marketplace = "marketplace"
|
|
26
|
+
custom = "custom"
|
|
27
|
+
owned = "owned"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class Signal(AdCPBaseModel):
|
|
31
|
+
model_config = ConfigDict(
|
|
32
|
+
extra="forbid",
|
|
33
|
+
)
|
|
34
|
+
coverage_percentage: Annotated[
|
|
35
|
+
float, Field(description="Percentage of audience coverage", ge=0.0, le=100.0)
|
|
36
|
+
]
|
|
37
|
+
data_provider: Annotated[str, Field(description="Name of the data provider")]
|
|
38
|
+
deployments: Annotated[
|
|
39
|
+
list[deployment.Deployment1 | deployment.Deployment2],
|
|
40
|
+
Field(description="Array of destination deployments"),
|
|
41
|
+
]
|
|
42
|
+
description: Annotated[str, Field(description="Detailed signal description")]
|
|
43
|
+
name: Annotated[str, Field(description="Human-readable signal name")]
|
|
44
|
+
pricing: Annotated[Pricing, Field(description="Pricing information")]
|
|
45
|
+
signal_agent_segment_id: Annotated[str, Field(description="Unique identifier for the signal")]
|
|
46
|
+
signal_type: Annotated[SignalType, Field(description="Type of signal")]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class GetSignalsResponse(AdCPBaseModel):
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
extra="forbid",
|
|
52
|
+
)
|
|
53
|
+
context: Annotated[
|
|
54
|
+
dict[str, Any] | None,
|
|
55
|
+
Field(
|
|
56
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
57
|
+
),
|
|
58
|
+
] = None
|
|
59
|
+
errors: Annotated[
|
|
60
|
+
list[error.Error] | None,
|
|
61
|
+
Field(
|
|
62
|
+
description="Task-specific errors and warnings (e.g., signal discovery or pricing issues)"
|
|
63
|
+
),
|
|
64
|
+
] = None
|
|
65
|
+
signals: Annotated[list[Signal], Field(description="Array of matching signals")]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: html-asset.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class HtmlAsset(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra="forbid",
|
|
16
|
+
)
|
|
17
|
+
content: Annotated[str, Field(description="HTML content")]
|
|
18
|
+
version: Annotated[str | None, Field(description="HTML version (e.g., 'HTML5')")] = None
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: identifier-types.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PropertyIdentifierTypes(Enum):
|
|
11
|
+
domain = "domain"
|
|
12
|
+
subdomain = "subdomain"
|
|
13
|
+
network_id = "network_id"
|
|
14
|
+
ios_bundle = "ios_bundle"
|
|
15
|
+
android_package = "android_package"
|
|
16
|
+
apple_app_store_id = "apple_app_store_id"
|
|
17
|
+
google_play_id = "google_play_id"
|
|
18
|
+
roku_store_id = "roku_store_id"
|
|
19
|
+
fire_tv_asin = "fire_tv_asin"
|
|
20
|
+
samsung_app_id = "samsung_app_id"
|
|
21
|
+
apple_tv_bundle = "apple_tv_bundle"
|
|
22
|
+
bundle_id = "bundle_id"
|
|
23
|
+
venue_id = "venue_id"
|
|
24
|
+
screen_id = "screen_id"
|
|
25
|
+
openooh_venue_type = "openooh_venue_type"
|
|
26
|
+
rss_url = "rss_url"
|
|
27
|
+
apple_podcast_id = "apple_podcast_id"
|
|
28
|
+
spotify_show_id = "spotify_show_id"
|
|
29
|
+
podcast_guid = "podcast_guid"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: image-asset.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+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
|
+
|
|
13
|
+
class ImageAsset(AdCPBaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra="forbid",
|
|
16
|
+
)
|
|
17
|
+
alt_text: Annotated[str | None, Field(description="Alternative text for accessibility")] = None
|
|
18
|
+
format: Annotated[
|
|
19
|
+
str | None, Field(description="Image file format (jpg, png, gif, webp, etc.)")
|
|
20
|
+
] = None
|
|
21
|
+
height: Annotated[int | None, Field(description="Image height in pixels", ge=1)] = None
|
|
22
|
+
url: Annotated[AnyUrl, Field(description="URL to the image asset")]
|
|
23
|
+
width: Annotated[int | None, Field(description="Image width in pixels", ge=1)] = None
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: json
|
|
3
|
+
# timestamp: 2025-11-15T17:40:38+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from pydantic import Field, RootModel
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AdcpAssetTypeRegistry(RootModel[Any]):
|
|
13
|
+
root: Any = Field(
|
|
14
|
+
...,
|
|
15
|
+
description="Registry of asset types used in AdCP creative manifests. Each asset type defines the structure of actual content payloads (what you send), not requirements or constraints (which belong in format specifications).",
|
|
16
|
+
title="AdCP Asset Type Registry",
|
|
17
|
+
)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: javascript-asset.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+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
|
+
|
|
14
|
+
class ModuleType(Enum):
|
|
15
|
+
esm = "esm"
|
|
16
|
+
commonjs = "commonjs"
|
|
17
|
+
script = "script"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class JavascriptAsset(AdCPBaseModel):
|
|
21
|
+
model_config = ConfigDict(
|
|
22
|
+
extra="forbid",
|
|
23
|
+
)
|
|
24
|
+
content: Annotated[str, Field(description="JavaScript content")]
|
|
25
|
+
module_type: Annotated[ModuleType | None, Field(description="JavaScript module type")] = None
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: list-authorized-properties-request.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+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, RootModel
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PublisherDomain(RootModel[str]):
|
|
14
|
+
root: Annotated[
|
|
15
|
+
str,
|
|
16
|
+
Field(
|
|
17
|
+
description="Publisher domain to filter by (e.g., 'cnn.com', 'espn.com')",
|
|
18
|
+
pattern="^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
|
|
19
|
+
),
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ListAuthorizedPropertiesRequest(AdCPBaseModel):
|
|
24
|
+
model_config = ConfigDict(
|
|
25
|
+
extra="forbid",
|
|
26
|
+
)
|
|
27
|
+
context: Annotated[
|
|
28
|
+
dict[str, Any] | None,
|
|
29
|
+
Field(
|
|
30
|
+
description="Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata."
|
|
31
|
+
),
|
|
32
|
+
] = None
|
|
33
|
+
publisher_domains: Annotated[
|
|
34
|
+
list[PublisherDomain] | None,
|
|
35
|
+
Field(
|
|
36
|
+
description="Filter to specific publisher domains (optional). If omitted, returns all publishers this agent represents.",
|
|
37
|
+
min_length=1,
|
|
38
|
+
),
|
|
39
|
+
] = None
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: list-authorized-properties-response.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+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, RootModel
|
|
11
|
+
|
|
12
|
+
from . import channels, error
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class PrimaryCountry(RootModel[str]):
|
|
16
|
+
root: Annotated[str, Field(pattern="^[A-Z]{2}$")]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class PublisherDomain(RootModel[str]):
|
|
20
|
+
root: Annotated[
|
|
21
|
+
str,
|
|
22
|
+
Field(
|
|
23
|
+
description="Domain where publisher's adagents.json is hosted (e.g., 'cnn.com')",
|
|
24
|
+
pattern="^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
|
|
25
|
+
),
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ListAuthorizedPropertiesResponse(AdCPBaseModel):
|
|
30
|
+
model_config = ConfigDict(
|
|
31
|
+
extra="forbid",
|
|
32
|
+
)
|
|
33
|
+
advertising_policies: Annotated[
|
|
34
|
+
str | None,
|
|
35
|
+
Field(
|
|
36
|
+
description="Publisher's advertising content policies, restrictions, and guidelines in natural language. May include prohibited categories, blocked advertisers, restricted tactics, brand safety requirements, or links to full policy documentation.",
|
|
37
|
+
max_length=10000,
|
|
38
|
+
min_length=1,
|
|
39
|
+
),
|
|
40
|
+
] = None
|
|
41
|
+
context: Annotated[
|
|
42
|
+
dict[str, Any] | None,
|
|
43
|
+
Field(
|
|
44
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
45
|
+
),
|
|
46
|
+
] = None
|
|
47
|
+
errors: Annotated[
|
|
48
|
+
list[error.Error] | None,
|
|
49
|
+
Field(description="Task-specific errors and warnings (e.g., property availability issues)"),
|
|
50
|
+
] = None
|
|
51
|
+
last_updated: Annotated[
|
|
52
|
+
AwareDatetime | None,
|
|
53
|
+
Field(
|
|
54
|
+
description="ISO 8601 timestamp of when the agent's publisher authorization list was last updated. Buyers can use this to determine if their cached publisher adagents.json files might be stale."
|
|
55
|
+
),
|
|
56
|
+
] = None
|
|
57
|
+
portfolio_description: Annotated[
|
|
58
|
+
str | None,
|
|
59
|
+
Field(
|
|
60
|
+
description="Markdown-formatted description of the property portfolio, including inventory types, audience characteristics, and special features.",
|
|
61
|
+
max_length=5000,
|
|
62
|
+
min_length=1,
|
|
63
|
+
),
|
|
64
|
+
] = None
|
|
65
|
+
primary_channels: Annotated[
|
|
66
|
+
list[channels.AdvertisingChannels] | None,
|
|
67
|
+
Field(
|
|
68
|
+
description="Primary advertising channels represented in this property portfolio. Helps buying agents quickly filter relevance.",
|
|
69
|
+
min_length=1,
|
|
70
|
+
),
|
|
71
|
+
] = None
|
|
72
|
+
primary_countries: Annotated[
|
|
73
|
+
list[PrimaryCountry] | None,
|
|
74
|
+
Field(
|
|
75
|
+
description="Primary countries (ISO 3166-1 alpha-2 codes) where properties are concentrated. Helps buying agents quickly filter relevance.",
|
|
76
|
+
min_length=1,
|
|
77
|
+
),
|
|
78
|
+
] = None
|
|
79
|
+
publisher_domains: Annotated[
|
|
80
|
+
list[PublisherDomain],
|
|
81
|
+
Field(
|
|
82
|
+
description="Publisher domains this agent is authorized to represent. Buyers should fetch each publisher's adagents.json to see property definitions and verify this agent is in their authorized_agents list with authorization scope.",
|
|
83
|
+
min_length=1,
|
|
84
|
+
),
|
|
85
|
+
]
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: list-creative-formats-request.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated, Any
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from . import format_id
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AssetType(Enum):
|
|
17
|
+
image = "image"
|
|
18
|
+
video = "video"
|
|
19
|
+
audio = "audio"
|
|
20
|
+
text = "text"
|
|
21
|
+
html = "html"
|
|
22
|
+
javascript = "javascript"
|
|
23
|
+
url = "url"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Type(Enum):
|
|
27
|
+
audio = "audio"
|
|
28
|
+
video = "video"
|
|
29
|
+
display = "display"
|
|
30
|
+
dooh = "dooh"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ListCreativeFormatsRequest(AdCPBaseModel):
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
extra="forbid",
|
|
36
|
+
)
|
|
37
|
+
asset_types: Annotated[
|
|
38
|
+
list[AssetType] | None,
|
|
39
|
+
Field(
|
|
40
|
+
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."
|
|
41
|
+
),
|
|
42
|
+
] = None
|
|
43
|
+
context: Annotated[
|
|
44
|
+
dict[str, Any] | None,
|
|
45
|
+
Field(
|
|
46
|
+
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."
|
|
47
|
+
),
|
|
48
|
+
] = None
|
|
49
|
+
format_ids: Annotated[
|
|
50
|
+
list[format_id.FormatId] | None,
|
|
51
|
+
Field(
|
|
52
|
+
description="Return only these specific format IDs (e.g., from get_products response)"
|
|
53
|
+
),
|
|
54
|
+
] = None
|
|
55
|
+
is_responsive: Annotated[
|
|
56
|
+
bool | None,
|
|
57
|
+
Field(
|
|
58
|
+
description="Filter for responsive formats that adapt to container size. When true, returns formats without fixed dimensions."
|
|
59
|
+
),
|
|
60
|
+
] = None
|
|
61
|
+
max_height: Annotated[
|
|
62
|
+
int | None,
|
|
63
|
+
Field(
|
|
64
|
+
description="Maximum height in pixels (inclusive). Returns formats where ANY render has height <= this value. For multi-render formats, matches if at least one render fits."
|
|
65
|
+
),
|
|
66
|
+
] = None
|
|
67
|
+
max_width: Annotated[
|
|
68
|
+
int | None,
|
|
69
|
+
Field(
|
|
70
|
+
description="Maximum width in pixels (inclusive). Returns formats where ANY render has width <= this value. For multi-render formats, matches if at least one render fits."
|
|
71
|
+
),
|
|
72
|
+
] = None
|
|
73
|
+
min_height: Annotated[
|
|
74
|
+
int | None,
|
|
75
|
+
Field(
|
|
76
|
+
description="Minimum height in pixels (inclusive). Returns formats where ANY render has height >= this value."
|
|
77
|
+
),
|
|
78
|
+
] = None
|
|
79
|
+
min_width: Annotated[
|
|
80
|
+
int | None,
|
|
81
|
+
Field(
|
|
82
|
+
description="Minimum width in pixels (inclusive). Returns formats where ANY render has width >= this value."
|
|
83
|
+
),
|
|
84
|
+
] = None
|
|
85
|
+
name_search: Annotated[
|
|
86
|
+
str | None, Field(description="Search for formats by name (case-insensitive partial match)")
|
|
87
|
+
] = None
|
|
88
|
+
type: Annotated[
|
|
89
|
+
Type | None,
|
|
90
|
+
Field(
|
|
91
|
+
description="Filter by format type (technical categories with distinct requirements)"
|
|
92
|
+
),
|
|
93
|
+
] = None
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: list-creative-formats-response.json
|
|
3
|
+
# timestamp: 2025-11-15T22:03:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated, Any
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import AnyUrl, ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from . import error, format
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Capability(Enum):
|
|
17
|
+
validation = "validation"
|
|
18
|
+
assembly = "assembly"
|
|
19
|
+
generation = "generation"
|
|
20
|
+
preview = "preview"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CreativeAgent(AdCPBaseModel):
|
|
24
|
+
agent_name: Annotated[
|
|
25
|
+
str | None, Field(description="Human-readable name for the creative agent")
|
|
26
|
+
] = None
|
|
27
|
+
agent_url: Annotated[
|
|
28
|
+
AnyUrl,
|
|
29
|
+
Field(
|
|
30
|
+
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."
|
|
31
|
+
),
|
|
32
|
+
]
|
|
33
|
+
capabilities: Annotated[
|
|
34
|
+
list[Capability] | None, Field(description="Capabilities this creative agent provides")
|
|
35
|
+
] = None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ListCreativeFormatsResponse(AdCPBaseModel):
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
extra="forbid",
|
|
41
|
+
)
|
|
42
|
+
context: Annotated[
|
|
43
|
+
dict[str, Any] | None,
|
|
44
|
+
Field(
|
|
45
|
+
description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
|
|
46
|
+
),
|
|
47
|
+
] = None
|
|
48
|
+
creative_agents: Annotated[
|
|
49
|
+
list[CreativeAgent] | None,
|
|
50
|
+
Field(
|
|
51
|
+
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."
|
|
52
|
+
),
|
|
53
|
+
] = None
|
|
54
|
+
errors: Annotated[
|
|
55
|
+
list[error.Error] | None,
|
|
56
|
+
Field(description="Task-specific errors and warnings (e.g., format availability issues)"),
|
|
57
|
+
] = None
|
|
58
|
+
formats: Annotated[
|
|
59
|
+
list[format.Format],
|
|
60
|
+
Field(
|
|
61
|
+
description="Full format definitions for all formats this agent supports. Each format's authoritative source is indicated by its agent_url field."
|
|
62
|
+
),
|
|
63
|
+
]
|