adcp 2.7.0__py3-none-any.whl → 2.9.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 +7 -4
- adcp/__main__.py +31 -3
- adcp/client.py +200 -0
- adcp/protocols/a2a.py +12 -0
- adcp/protocols/base.py +15 -0
- adcp/protocols/mcp.py +12 -0
- adcp/types/__init__.py +461 -31
- adcp/types/_generated.py +37 -38
- adcp/types/aliases.py +251 -46
- adcp/types/generated_poc/activate_signal_request.py +3 -3
- adcp/types/generated_poc/activate_signal_response.py +2 -2
- adcp/types/generated_poc/asset_content_type.py +23 -0
- adcp/types/generated_poc/brand_manifest.py +8 -8
- adcp/types/generated_poc/create_media_buy_response.py +16 -21
- adcp/types/generated_poc/deployment.py +6 -6
- adcp/types/generated_poc/destination.py +4 -4
- adcp/types/generated_poc/format.py +5 -30
- adcp/types/generated_poc/format_category.py +17 -0
- adcp/types/generated_poc/get_signals_request.py +4 -4
- adcp/types/generated_poc/get_signals_response.py +2 -2
- adcp/types/generated_poc/list_creative_formats_request.py +4 -22
- adcp/types/generated_poc/update_media_buy_response.py +15 -22
- adcp/types/stable.py +268 -7
- {adcp-2.7.0.dist-info → adcp-2.9.0.dist-info}/METADATA +172 -1
- {adcp-2.7.0.dist-info → adcp-2.9.0.dist-info}/RECORD +29 -28
- adcp/types/generated_poc/asset_type.py +0 -100
- {adcp-2.7.0.dist-info → adcp-2.9.0.dist-info}/WHEEL +0 -0
- {adcp-2.7.0.dist-info → adcp-2.9.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.7.0.dist-info → adcp-2.9.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.7.0.dist-info → adcp-2.9.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: deployment.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T20:44:40+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ class Deployment1(AdCPBaseModel):
|
|
|
20
20
|
activation_key: Annotated[
|
|
21
21
|
activation_key_1.ActivationKey1 | activation_key_1.ActivationKey2 | None,
|
|
22
22
|
Field(
|
|
23
|
-
description='The key to use for targeting. Only present if is_live=true AND requester has access to this
|
|
23
|
+
description='The key to use for targeting. Only present if is_live=true AND requester has access to this deployment.',
|
|
24
24
|
title='Activation Key',
|
|
25
25
|
),
|
|
26
26
|
] = None
|
|
@@ -36,7 +36,7 @@ class Deployment1(AdCPBaseModel):
|
|
|
36
36
|
),
|
|
37
37
|
] = None
|
|
38
38
|
is_live: Annotated[
|
|
39
|
-
bool, Field(description='Whether signal is currently active on this
|
|
39
|
+
bool, Field(description='Whether signal is currently active on this deployment')
|
|
40
40
|
]
|
|
41
41
|
platform: Annotated[str, Field(description='Platform identifier for DSPs')]
|
|
42
42
|
type: Annotated[
|
|
@@ -53,11 +53,11 @@ class Deployment2(AdCPBaseModel):
|
|
|
53
53
|
activation_key: Annotated[
|
|
54
54
|
activation_key_1.ActivationKey1 | activation_key_1.ActivationKey2 | None,
|
|
55
55
|
Field(
|
|
56
|
-
description='The key to use for targeting. Only present if is_live=true AND requester has access to this
|
|
56
|
+
description='The key to use for targeting. Only present if is_live=true AND requester has access to this deployment.',
|
|
57
57
|
title='Activation Key',
|
|
58
58
|
),
|
|
59
59
|
] = None
|
|
60
|
-
agent_url: Annotated[AnyUrl, Field(description='URL identifying the
|
|
60
|
+
agent_url: Annotated[AnyUrl, Field(description='URL identifying the deployment agent')]
|
|
61
61
|
deployed_at: Annotated[
|
|
62
62
|
AwareDatetime | None,
|
|
63
63
|
Field(description='Timestamp when activation completed (if is_live=true)'),
|
|
@@ -70,7 +70,7 @@ class Deployment2(AdCPBaseModel):
|
|
|
70
70
|
),
|
|
71
71
|
] = None
|
|
72
72
|
is_live: Annotated[
|
|
73
|
-
bool, Field(description='Whether signal is currently active on this
|
|
73
|
+
bool, Field(description='Whether signal is currently active on this deployment')
|
|
74
74
|
]
|
|
75
75
|
type: Annotated[
|
|
76
76
|
Literal['agent'],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: destination.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T20:44:40+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ class Destination1(AdCPBaseModel):
|
|
|
23
23
|
]
|
|
24
24
|
type: Annotated[
|
|
25
25
|
Literal['platform'],
|
|
26
|
-
Field(description='Discriminator indicating this is a platform-based
|
|
26
|
+
Field(description='Discriminator indicating this is a platform-based deployment'),
|
|
27
27
|
]
|
|
28
28
|
|
|
29
29
|
|
|
@@ -35,9 +35,9 @@ class Destination2(AdCPBaseModel):
|
|
|
35
35
|
str | None, Field(description='Optional account identifier on the agent')
|
|
36
36
|
] = None
|
|
37
37
|
agent_url: Annotated[
|
|
38
|
-
AnyUrl, Field(description='URL identifying the
|
|
38
|
+
AnyUrl, Field(description='URL identifying the deployment agent (for sales agents, etc.)')
|
|
39
39
|
]
|
|
40
40
|
type: Annotated[
|
|
41
41
|
Literal['agent'],
|
|
42
|
-
Field(description='Discriminator indicating this is an agent URL-based
|
|
42
|
+
Field(description='Discriminator indicating this is an agent URL-based deployment'),
|
|
43
43
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: format.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T11:58:34+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -10,25 +10,10 @@ from typing import Annotated, Any, Literal
|
|
|
10
10
|
from adcp.types.base import AdCPBaseModel
|
|
11
11
|
from pydantic import AnyUrl, ConfigDict, Field
|
|
12
12
|
|
|
13
|
+
from . import asset_content_type, format_category
|
|
13
14
|
from . import format_id as format_id_1
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
class AssetType(Enum):
|
|
17
|
-
image = 'image'
|
|
18
|
-
video = 'video'
|
|
19
|
-
audio = 'audio'
|
|
20
|
-
vast = 'vast'
|
|
21
|
-
daast = 'daast'
|
|
22
|
-
text = 'text'
|
|
23
|
-
markdown = 'markdown'
|
|
24
|
-
html = 'html'
|
|
25
|
-
css = 'css'
|
|
26
|
-
javascript = 'javascript'
|
|
27
|
-
url = 'url'
|
|
28
|
-
webhook = 'webhook'
|
|
29
|
-
promoted_offerings = 'promoted_offerings'
|
|
30
|
-
|
|
31
|
-
|
|
32
17
|
class AssetsRequired(AdCPBaseModel):
|
|
33
18
|
asset_id: Annotated[
|
|
34
19
|
str,
|
|
@@ -42,7 +27,7 @@ class AssetsRequired(AdCPBaseModel):
|
|
|
42
27
|
description="Optional descriptive label for this asset's purpose (e.g., 'hero_image', 'logo'). Not used for referencing assets in manifests—use asset_id instead. This field is for human-readable documentation and UI display only."
|
|
43
28
|
),
|
|
44
29
|
] = None
|
|
45
|
-
asset_type: Annotated[
|
|
30
|
+
asset_type: Annotated[asset_content_type.AssetContentType, Field(description='Type of asset')]
|
|
46
31
|
item_type: Annotated[
|
|
47
32
|
Literal['individual'],
|
|
48
33
|
Field(description='Discriminator indicating this is an individual asset requirement'),
|
|
@@ -64,7 +49,7 @@ class Asset(AdCPBaseModel):
|
|
|
64
49
|
description="Optional descriptive label for this asset's purpose (e.g., 'hero_image', 'logo'). Not used for referencing assets in manifests—use asset_id instead. This field is for human-readable documentation and UI display only."
|
|
65
50
|
),
|
|
66
51
|
] = None
|
|
67
|
-
asset_type: Annotated[
|
|
52
|
+
asset_type: Annotated[asset_content_type.AssetContentType, Field(description='Type of asset')]
|
|
68
53
|
required: Annotated[
|
|
69
54
|
bool | None, Field(description='Whether this asset is required in each repetition')
|
|
70
55
|
] = None
|
|
@@ -174,16 +159,6 @@ class Render(AdCPBaseModel):
|
|
|
174
159
|
]
|
|
175
160
|
|
|
176
161
|
|
|
177
|
-
class Type(Enum):
|
|
178
|
-
audio = 'audio'
|
|
179
|
-
video = 'video'
|
|
180
|
-
display = 'display'
|
|
181
|
-
native = 'native'
|
|
182
|
-
dooh = 'dooh'
|
|
183
|
-
rich_media = 'rich_media'
|
|
184
|
-
universal = 'universal'
|
|
185
|
-
|
|
186
|
-
|
|
187
162
|
class Format(AdCPBaseModel):
|
|
188
163
|
model_config = ConfigDict(
|
|
189
164
|
extra='forbid',
|
|
@@ -253,7 +228,7 @@ class Format(AdCPBaseModel):
|
|
|
253
228
|
),
|
|
254
229
|
] = None
|
|
255
230
|
type: Annotated[
|
|
256
|
-
|
|
231
|
+
format_category.FormatCategory,
|
|
257
232
|
Field(
|
|
258
233
|
description='Media type of this format - determines rendering method and asset requirements'
|
|
259
234
|
),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: format-category.json
|
|
3
|
+
# timestamp: 2025-11-20T11:58:34+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FormatCategory(Enum):
|
|
11
|
+
audio = 'audio'
|
|
12
|
+
video = 'video'
|
|
13
|
+
display = 'display'
|
|
14
|
+
native = 'native'
|
|
15
|
+
dooh = 'dooh'
|
|
16
|
+
rich_media = 'rich_media'
|
|
17
|
+
universal = 'universal'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: get-signals-request.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T20:44:40+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -24,10 +24,10 @@ class DeliverTo(AdCPBaseModel):
|
|
|
24
24
|
countries: Annotated[
|
|
25
25
|
list[Country], Field(description='Countries where signals will be used (ISO codes)')
|
|
26
26
|
]
|
|
27
|
-
|
|
27
|
+
deployments: Annotated[
|
|
28
28
|
list[destination.Destination1 | destination.Destination2],
|
|
29
29
|
Field(
|
|
30
|
-
description='List of
|
|
30
|
+
description='List of deployment targets (DSPs, sales agents, etc.). If the authenticated caller matches one of these deployment targets, activation keys will be included in the response.',
|
|
31
31
|
min_length=1,
|
|
32
32
|
),
|
|
33
33
|
]
|
|
@@ -66,7 +66,7 @@ class GetSignalsRequest(AdCPBaseModel):
|
|
|
66
66
|
),
|
|
67
67
|
] = None
|
|
68
68
|
deliver_to: Annotated[
|
|
69
|
-
DeliverTo, Field(description='
|
|
69
|
+
DeliverTo, Field(description='Deployment targets where signals need to be activated')
|
|
70
70
|
]
|
|
71
71
|
filters: Annotated[Filters | None, Field(description='Filters to refine results')] = None
|
|
72
72
|
max_results: Annotated[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: get-signals-response.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T20:44:40+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -37,7 +37,7 @@ class Signal(AdCPBaseModel):
|
|
|
37
37
|
data_provider: Annotated[str, Field(description='Name of the data provider')]
|
|
38
38
|
deployments: Annotated[
|
|
39
39
|
list[deployment.Deployment1 | deployment.Deployment2],
|
|
40
|
-
Field(description='Array of
|
|
40
|
+
Field(description='Array of deployment targets'),
|
|
41
41
|
]
|
|
42
42
|
description: Annotated[str, Field(description='Detailed signal description')]
|
|
43
43
|
name: Annotated[str, Field(description='Human-readable signal name')]
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: list-creative-formats-request.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T11:58:34+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
-
from enum import Enum
|
|
8
7
|
from typing import Annotated, Any
|
|
9
8
|
|
|
10
9
|
from adcp.types.base import AdCPBaseModel
|
|
11
10
|
from pydantic import ConfigDict, Field
|
|
12
11
|
|
|
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'
|
|
12
|
+
from . import asset_content_type, format_category, format_id
|
|
31
13
|
|
|
32
14
|
|
|
33
15
|
class ListCreativeFormatsRequest(AdCPBaseModel):
|
|
@@ -35,7 +17,7 @@ class ListCreativeFormatsRequest(AdCPBaseModel):
|
|
|
35
17
|
extra='forbid',
|
|
36
18
|
)
|
|
37
19
|
asset_types: Annotated[
|
|
38
|
-
list[
|
|
20
|
+
list[asset_content_type.AssetContentType] | None,
|
|
39
21
|
Field(
|
|
40
22
|
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
23
|
),
|
|
@@ -86,7 +68,7 @@ class ListCreativeFormatsRequest(AdCPBaseModel):
|
|
|
86
68
|
str | None, Field(description='Search for formats by name (case-insensitive partial match)')
|
|
87
69
|
] = None
|
|
88
70
|
type: Annotated[
|
|
89
|
-
|
|
71
|
+
format_category.FormatCategory | None,
|
|
90
72
|
Field(
|
|
91
73
|
description='Filter by format type (technical categories with distinct requirements)'
|
|
92
74
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: update-media-buy-response.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-20T11:58:34+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -9,15 +9,23 @@ from typing import Annotated, Any
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
10
|
from pydantic import AwareDatetime, ConfigDict, Field, RootModel
|
|
11
11
|
|
|
12
|
-
from . import error
|
|
12
|
+
from . import error, package
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class UpdateMediaBuyResponse2(AdCPBaseModel):
|
|
16
16
|
model_config = ConfigDict(
|
|
17
17
|
extra='forbid',
|
|
18
18
|
)
|
|
19
|
-
|
|
20
|
-
|
|
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],
|
|
27
|
+
Field(description='Array of errors explaining why the operation failed', min_length=1),
|
|
28
|
+
]
|
|
21
29
|
|
|
22
30
|
|
|
23
31
|
class UpdateMediaBuyResponse1(AdCPBaseModel):
|
|
@@ -25,7 +33,8 @@ class UpdateMediaBuyResponse1(AdCPBaseModel):
|
|
|
25
33
|
extra='forbid',
|
|
26
34
|
)
|
|
27
35
|
affected_packages: Annotated[
|
|
28
|
-
list[
|
|
36
|
+
list[package.Package] | None,
|
|
37
|
+
Field(description='Array of packages that were modified with complete state information'),
|
|
29
38
|
] = None
|
|
30
39
|
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for the media buy")]
|
|
31
40
|
context: Annotated[
|
|
@@ -41,22 +50,6 @@ class UpdateMediaBuyResponse1(AdCPBaseModel):
|
|
|
41
50
|
media_buy_id: Annotated[str, Field(description="Publisher's identifier for the media buy")]
|
|
42
51
|
|
|
43
52
|
|
|
44
|
-
class UpdateMediaBuyResponse2(AdCPBaseModel):
|
|
45
|
-
model_config = ConfigDict(
|
|
46
|
-
extra='forbid',
|
|
47
|
-
)
|
|
48
|
-
context: Annotated[
|
|
49
|
-
dict[str, Any] | None,
|
|
50
|
-
Field(
|
|
51
|
-
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
52
|
-
),
|
|
53
|
-
] = None
|
|
54
|
-
errors: Annotated[
|
|
55
|
-
list[error.Error],
|
|
56
|
-
Field(description='Array of errors explaining why the operation failed', min_length=1),
|
|
57
|
-
]
|
|
58
|
-
|
|
59
|
-
|
|
60
53
|
class UpdateMediaBuyResponse(RootModel[UpdateMediaBuyResponse1 | UpdateMediaBuyResponse2]):
|
|
61
54
|
root: Annotated[
|
|
62
55
|
UpdateMediaBuyResponse1 | UpdateMediaBuyResponse2,
|