adcp 2.12.2__py3-none-any.whl → 2.14.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 +14 -1
- adcp/adagents.py +53 -9
- adcp/client.py +361 -57
- adcp/protocols/mcp.py +1 -3
- adcp/types/__init__.py +9 -33
- adcp/types/_generated.py +82 -13
- adcp/types/aliases.py +23 -0
- adcp/types/base.py +193 -0
- adcp/types/generated_poc/adagents.py +9 -13
- adcp/types/generated_poc/core/activation_key.py +12 -2
- adcp/types/generated_poc/core/assets/daast_asset.py +12 -2
- adcp/types/generated_poc/core/assets/image_asset.py +9 -5
- adcp/types/generated_poc/core/assets/vast_asset.py +12 -2
- adcp/types/generated_poc/core/assets/video_asset.py +9 -5
- adcp/types/generated_poc/core/async_response_data.py +72 -0
- adcp/types/generated_poc/core/brand_manifest_ref.py +35 -0
- adcp/types/generated_poc/core/creative_asset.py +4 -6
- adcp/types/generated_poc/core/creative_manifest.py +4 -6
- adcp/types/generated_poc/core/deployment.py +16 -8
- adcp/types/generated_poc/core/destination.py +12 -2
- adcp/types/generated_poc/core/format.py +3 -3
- adcp/types/generated_poc/core/{webhook_payload.py → mcp_webhook_payload.py} +8 -33
- adcp/types/generated_poc/core/pricing_option.py +51 -0
- adcp/types/generated_poc/core/product.py +4 -29
- adcp/types/generated_poc/core/promoted_offerings.py +5 -21
- adcp/types/generated_poc/core/property.py +4 -6
- adcp/types/generated_poc/core/publisher_property_selector.py +15 -2
- adcp/types/generated_poc/core/push_notification_config.py +1 -4
- adcp/types/generated_poc/core/start_timing.py +18 -0
- adcp/types/generated_poc/core/sub_asset.py +12 -2
- adcp/types/generated_poc/creative/preview_creative_response.py +3 -14
- adcp/types/generated_poc/creative/preview_render.py +3 -11
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_input_required.py +37 -0
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_submitted.py +19 -0
- adcp/types/generated_poc/media_buy/create_media_buy_async_response_working.py +31 -0
- adcp/types/generated_poc/media_buy/create_media_buy_request.py +7 -26
- adcp/types/generated_poc/media_buy/get_media_buy_delivery_response.py +4 -2
- adcp/types/generated_poc/media_buy/get_products_async_response_input_required.py +38 -0
- adcp/types/generated_poc/media_buy/get_products_async_response_submitted.py +24 -0
- adcp/types/generated_poc/media_buy/get_products_async_response_working.py +35 -0
- adcp/types/generated_poc/media_buy/get_products_request.py +5 -20
- adcp/types/generated_poc/media_buy/list_creatives_response.py +5 -7
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_input_required.py +31 -0
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_submitted.py +19 -0
- adcp/types/generated_poc/media_buy/sync_creatives_async_response_working.py +37 -0
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_input_required.py +30 -0
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_submitted.py +19 -0
- adcp/types/generated_poc/media_buy/update_media_buy_async_response_working.py +31 -0
- adcp/types/generated_poc/media_buy/update_media_buy_request.py +4 -14
- adcp/types/generated_poc/signals/activate_signal_request.py +2 -2
- adcp/types/generated_poc/signals/activate_signal_response.py +2 -2
- adcp/types/generated_poc/signals/get_signals_request.py +2 -2
- adcp/types/generated_poc/signals/get_signals_response.py +2 -3
- adcp/utils/preview_cache.py +6 -4
- adcp/webhooks.py +508 -0
- {adcp-2.12.2.dist-info → adcp-2.14.0.dist-info}/METADATA +2 -2
- {adcp-2.12.2.dist-info → adcp-2.14.0.dist-info}/RECORD +61 -45
- adcp/types/generated_poc/core/dimensions.py +0 -18
- {adcp-2.12.2.dist-info → adcp-2.14.0.dist-info}/WHEEL +0 -0
- {adcp-2.12.2.dist-info → adcp-2.14.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.12.2.dist-info → adcp-2.14.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.12.2.dist-info → adcp-2.14.0.dist-info}/top_level.txt +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/destination.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
from typing import Annotated, Literal
|
|
8
8
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
|
-
from pydantic import AnyUrl, ConfigDict, Field
|
|
10
|
+
from pydantic import AnyUrl, ConfigDict, Field, RootModel
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Destination1(AdCPBaseModel):
|
|
@@ -41,3 +41,13 @@ class Destination2(AdCPBaseModel):
|
|
|
41
41
|
Literal['agent'],
|
|
42
42
|
Field(description='Discriminator indicating this is an agent URL-based deployment'),
|
|
43
43
|
]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class Destination(RootModel[Destination1 | Destination2]):
|
|
47
|
+
root: Annotated[
|
|
48
|
+
Destination1 | Destination2,
|
|
49
|
+
Field(
|
|
50
|
+
description='A deployment target where signals can be activated (DSP, sales agent, etc.)',
|
|
51
|
+
title='Destination',
|
|
52
|
+
),
|
|
53
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/format.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-18T20:00:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -123,12 +123,12 @@ class Renders(AdCPBaseModel):
|
|
|
123
123
|
]
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
Dimensions1 = Dimensions
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
class Renders1(AdCPBaseModel):
|
|
130
130
|
dimensions: Annotated[
|
|
131
|
-
|
|
131
|
+
Dimensions1 | None, Field(description='Dimensions for this rendered piece (in pixels)')
|
|
132
132
|
] = None
|
|
133
133
|
parameters_from_format_id: Annotated[
|
|
134
134
|
Literal[True],
|
|
@@ -1,35 +1,20 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
|
-
# filename: core/
|
|
3
|
-
# timestamp: 2025-
|
|
2
|
+
# filename: core/mcp_webhook_payload.json
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
-
from typing import Annotated
|
|
7
|
+
from typing import Annotated
|
|
8
8
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
10
|
from pydantic import AwareDatetime, ConfigDict, Field
|
|
11
11
|
|
|
12
12
|
from ..enums import adcp_domain, task_status
|
|
13
13
|
from ..enums import task_type as task_type_1
|
|
14
|
+
from . import async_response_data
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
class
|
|
17
|
-
model_config = ConfigDict(
|
|
18
|
-
extra='forbid',
|
|
19
|
-
)
|
|
20
|
-
current_step: Annotated[
|
|
21
|
-
str | None, Field(description='Current step or phase of the operation')
|
|
22
|
-
] = None
|
|
23
|
-
percentage: Annotated[
|
|
24
|
-
float | None, Field(description='Completion percentage (0-100)', ge=0.0, le=100.0)
|
|
25
|
-
] = None
|
|
26
|
-
step_number: Annotated[int | None, Field(description='Current step number', ge=1)] = None
|
|
27
|
-
total_steps: Annotated[
|
|
28
|
-
int | None, Field(description='Total number of steps in the operation', ge=1)
|
|
29
|
-
] = None
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class WebhookPayload(AdCPBaseModel):
|
|
17
|
+
class McpWebhookPayload(AdCPBaseModel):
|
|
33
18
|
model_config = ConfigDict(
|
|
34
19
|
extra='allow',
|
|
35
20
|
)
|
|
@@ -45,10 +30,6 @@ class WebhookPayload(AdCPBaseModel):
|
|
|
45
30
|
description='AdCP domain this task belongs to. Helps classify the operation type at a high level.'
|
|
46
31
|
),
|
|
47
32
|
] = None
|
|
48
|
-
error: Annotated[
|
|
49
|
-
str | None,
|
|
50
|
-
Field(description="Error message for failed tasks. Only present when status is 'failed'."),
|
|
51
|
-
] = None
|
|
52
33
|
message: Annotated[
|
|
53
34
|
str | None,
|
|
54
35
|
Field(
|
|
@@ -61,22 +42,16 @@ class WebhookPayload(AdCPBaseModel):
|
|
|
61
42
|
description='Publisher-defined operation identifier correlating a sequence of task updates across webhooks.'
|
|
62
43
|
),
|
|
63
44
|
] = None
|
|
64
|
-
progress: Annotated[
|
|
65
|
-
Progress | None,
|
|
66
|
-
Field(
|
|
67
|
-
description="Progress information for tasks still in 'working' state. Rarely seen in webhooks since 'working' tasks typically complete synchronously, but may appear if a task transitions from 'submitted' to 'working'."
|
|
68
|
-
),
|
|
69
|
-
] = None
|
|
70
45
|
result: Annotated[
|
|
71
|
-
|
|
46
|
+
async_response_data.AdcpAsyncResponseData | None,
|
|
72
47
|
Field(
|
|
73
|
-
description='Task-specific payload
|
|
48
|
+
description='Task-specific payload matching the status. For completed/failed, contains the full task response. For working/input-required/submitted, contains status-specific data. This is the data layer that AdCP specs - same structure used in A2A status.message.parts[].data.'
|
|
74
49
|
),
|
|
75
50
|
] = None
|
|
76
51
|
status: Annotated[
|
|
77
52
|
task_status.TaskStatus,
|
|
78
53
|
Field(
|
|
79
|
-
description='Current task status. Webhooks are
|
|
54
|
+
description='Current task status. Webhooks are triggered for status changes after initial submission.'
|
|
80
55
|
),
|
|
81
56
|
]
|
|
82
57
|
task_id: Annotated[
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/pricing_option.json
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from pydantic import Field, RootModel
|
|
10
|
+
|
|
11
|
+
from ..pricing_options import (
|
|
12
|
+
cpc_option,
|
|
13
|
+
cpcv_option,
|
|
14
|
+
cpm_auction_option,
|
|
15
|
+
cpm_fixed_option,
|
|
16
|
+
cpp_option,
|
|
17
|
+
cpv_option,
|
|
18
|
+
flat_rate_option,
|
|
19
|
+
vcpm_auction_option,
|
|
20
|
+
vcpm_fixed_option,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class PricingOption(
|
|
25
|
+
RootModel[
|
|
26
|
+
cpm_fixed_option.CpmFixedRatePricingOption
|
|
27
|
+
| cpm_auction_option.CpmAuctionPricingOption
|
|
28
|
+
| vcpm_fixed_option.VcpmFixedRatePricingOption
|
|
29
|
+
| vcpm_auction_option.VcpmAuctionPricingOption
|
|
30
|
+
| cpc_option.CpcPricingOption
|
|
31
|
+
| cpcv_option.CpcvPricingOption
|
|
32
|
+
| cpv_option.CpvPricingOption
|
|
33
|
+
| cpp_option.CppPricingOption
|
|
34
|
+
| flat_rate_option.FlatRatePricingOption
|
|
35
|
+
]
|
|
36
|
+
):
|
|
37
|
+
root: Annotated[
|
|
38
|
+
cpm_fixed_option.CpmFixedRatePricingOption
|
|
39
|
+
| cpm_auction_option.CpmAuctionPricingOption
|
|
40
|
+
| vcpm_fixed_option.VcpmFixedRatePricingOption
|
|
41
|
+
| vcpm_auction_option.VcpmAuctionPricingOption
|
|
42
|
+
| cpc_option.CpcPricingOption
|
|
43
|
+
| cpcv_option.CpcvPricingOption
|
|
44
|
+
| cpv_option.CpvPricingOption
|
|
45
|
+
| cpp_option.CppPricingOption
|
|
46
|
+
| flat_rate_option.FlatRatePricingOption,
|
|
47
|
+
Field(
|
|
48
|
+
description='A pricing model option offered by a publisher for a product. Each pricing model has its own schema with model-specific requirements.',
|
|
49
|
+
title='Pricing Option',
|
|
50
|
+
),
|
|
51
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/product.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -10,22 +10,11 @@ from adcp.types.base import AdCPBaseModel
|
|
|
10
10
|
from pydantic import AwareDatetime, ConfigDict, Field
|
|
11
11
|
|
|
12
12
|
from ..enums import delivery_type as delivery_type_1
|
|
13
|
-
from ..pricing_options import (
|
|
14
|
-
cpc_option,
|
|
15
|
-
cpcv_option,
|
|
16
|
-
cpm_auction_option,
|
|
17
|
-
cpm_fixed_option,
|
|
18
|
-
cpp_option,
|
|
19
|
-
cpv_option,
|
|
20
|
-
flat_rate_option,
|
|
21
|
-
vcpm_auction_option,
|
|
22
|
-
vcpm_fixed_option,
|
|
23
|
-
)
|
|
24
13
|
from . import creative_policy as creative_policy_1
|
|
25
14
|
from . import ext as ext_1
|
|
26
15
|
from . import format_id as format_id_1
|
|
27
16
|
from . import measurement as measurement_1
|
|
28
|
-
from . import placement, publisher_property_selector
|
|
17
|
+
from . import placement, pricing_option, publisher_property_selector
|
|
29
18
|
from . import reporting_capabilities as reporting_capabilities_1
|
|
30
19
|
|
|
31
20
|
|
|
@@ -124,17 +113,7 @@ class Product(AdCPBaseModel):
|
|
|
124
113
|
),
|
|
125
114
|
] = None
|
|
126
115
|
pricing_options: Annotated[
|
|
127
|
-
list[
|
|
128
|
-
cpm_fixed_option.CpmFixedRatePricingOption
|
|
129
|
-
| cpm_auction_option.CpmAuctionPricingOption
|
|
130
|
-
| vcpm_fixed_option.VcpmFixedRatePricingOption
|
|
131
|
-
| vcpm_auction_option.VcpmAuctionPricingOption
|
|
132
|
-
| cpc_option.CpcPricingOption
|
|
133
|
-
| cpcv_option.CpcvPricingOption
|
|
134
|
-
| cpv_option.CpvPricingOption
|
|
135
|
-
| cpp_option.CppPricingOption
|
|
136
|
-
| flat_rate_option.FlatRatePricingOption
|
|
137
|
-
],
|
|
116
|
+
list[pricing_option.PricingOption],
|
|
138
117
|
Field(description='Available pricing models for this product', min_length=1),
|
|
139
118
|
]
|
|
140
119
|
product_card: Annotated[
|
|
@@ -151,11 +130,7 @@ class Product(AdCPBaseModel):
|
|
|
151
130
|
] = None
|
|
152
131
|
product_id: Annotated[str, Field(description='Unique identifier for the product')]
|
|
153
132
|
publisher_properties: Annotated[
|
|
154
|
-
list[
|
|
155
|
-
publisher_property_selector.PublisherPropertySelector1
|
|
156
|
-
| publisher_property_selector.PublisherPropertySelector2
|
|
157
|
-
| publisher_property_selector.PublisherPropertySelector3
|
|
158
|
-
],
|
|
133
|
+
list[publisher_property_selector.PublisherPropertySelector],
|
|
159
134
|
Field(
|
|
160
135
|
description="Publisher properties covered by this product. Buyers fetch actual property definitions from each publisher's adagents.json and validate agent authorization. Selection patterns mirror the authorization patterns in adagents.json for consistency.",
|
|
161
136
|
min_length=1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/promoted_offerings.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,10 +8,9 @@ from enum import Enum
|
|
|
8
8
|
from typing import Annotated, Any
|
|
9
9
|
|
|
10
10
|
from adcp.types.base import AdCPBaseModel
|
|
11
|
-
from pydantic import
|
|
11
|
+
from pydantic import ConfigDict, Field
|
|
12
12
|
|
|
13
|
-
from . import
|
|
14
|
-
from . import promoted_products
|
|
13
|
+
from . import brand_manifest_ref, promoted_products
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
class AssetType(Enum):
|
|
@@ -68,24 +67,9 @@ class PromotedOfferings(AdCPBaseModel):
|
|
|
68
67
|
Field(description='Selectors to choose specific assets from the brand manifest'),
|
|
69
68
|
] = None
|
|
70
69
|
brand_manifest: Annotated[
|
|
71
|
-
|
|
70
|
+
brand_manifest_ref.BrandManifestReference,
|
|
72
71
|
Field(
|
|
73
|
-
description='Brand information manifest containing assets, themes, and guidelines. Can be provided inline or as a URL reference to a hosted manifest.'
|
|
74
|
-
examples=[
|
|
75
|
-
{
|
|
76
|
-
'data': {
|
|
77
|
-
'colors': {'primary': '#FF6B35'},
|
|
78
|
-
'name': 'ACME Corporation',
|
|
79
|
-
'url': 'https://acmecorp.com',
|
|
80
|
-
},
|
|
81
|
-
'description': 'Inline brand manifest',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
'data': 'https://cdn.acmecorp.com/brand-manifest.json',
|
|
85
|
-
'description': 'URL string reference to hosted manifest',
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
title='Brand Manifest Reference',
|
|
72
|
+
description='Brand information manifest containing assets, themes, and guidelines. Can be provided inline or as a URL reference to a hosted manifest.'
|
|
89
73
|
),
|
|
90
74
|
]
|
|
91
75
|
offerings: Annotated[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/property.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -11,6 +11,7 @@ from pydantic import ConfigDict, Field
|
|
|
11
11
|
|
|
12
12
|
from ..enums import identifier_types
|
|
13
13
|
from ..enums import property_type as property_type_1
|
|
14
|
+
from . import property_id as property_id_1
|
|
14
15
|
from . import property_tag
|
|
15
16
|
|
|
16
17
|
|
|
@@ -39,12 +40,9 @@ class Property(AdCPBaseModel):
|
|
|
39
40
|
]
|
|
40
41
|
name: Annotated[str, Field(description='Human-readable property name')]
|
|
41
42
|
property_id: Annotated[
|
|
42
|
-
|
|
43
|
+
property_id_1.PropertyId | None,
|
|
43
44
|
Field(
|
|
44
|
-
description='Unique identifier for this property (optional). Enables referencing properties by ID instead of repeating full objects.'
|
|
45
|
-
examples=['cnn_ctv_app', 'homepage', 'mobile_ios', 'instagram'],
|
|
46
|
-
pattern='^[a-z0-9_]+$',
|
|
47
|
-
title='Property ID',
|
|
45
|
+
description='Unique identifier for this property (optional). Enables referencing properties by ID instead of repeating full objects.'
|
|
48
46
|
),
|
|
49
47
|
] = None
|
|
50
48
|
property_type: Annotated[
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/publisher_property_selector.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
from typing import Annotated, Literal
|
|
8
8
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
|
-
from pydantic import ConfigDict, Field
|
|
10
|
+
from pydantic import ConfigDict, Field, RootModel
|
|
11
11
|
|
|
12
12
|
from . import property_id, property_tag
|
|
13
13
|
|
|
@@ -73,3 +73,16 @@ class PublisherPropertySelector3(AdCPBaseModel):
|
|
|
73
73
|
selection_type: Annotated[
|
|
74
74
|
Literal['by_tag'], Field(description='Discriminator indicating selection by property tags')
|
|
75
75
|
]
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class PublisherPropertySelector(
|
|
79
|
+
RootModel[PublisherPropertySelector1 | PublisherPropertySelector2 | PublisherPropertySelector3]
|
|
80
|
+
):
|
|
81
|
+
root: Annotated[
|
|
82
|
+
PublisherPropertySelector1 | PublisherPropertySelector2 | PublisherPropertySelector3,
|
|
83
|
+
Field(
|
|
84
|
+
description="Selects properties from a publisher's adagents.json. Used for both product definitions and agent authorization. Supports three selection patterns: all properties, specific IDs, or by tags.",
|
|
85
|
+
discriminator='selection_type',
|
|
86
|
+
title='Publisher Property Selector',
|
|
87
|
+
),
|
|
88
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/push_notification_config.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-18T20:00:24+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -34,9 +34,6 @@ class Authentication(AdCPBaseModel):
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class PushNotificationConfig(AdCPBaseModel):
|
|
37
|
-
model_config = ConfigDict(
|
|
38
|
-
extra='forbid',
|
|
39
|
-
)
|
|
40
37
|
authentication: Annotated[
|
|
41
38
|
Authentication,
|
|
42
39
|
Field(description='Authentication configuration for webhook delivery (A2A-compatible)'),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: core/start_timing.json
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from pydantic import AwareDatetime, Field, RootModel
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class StartTiming(RootModel[str | AwareDatetime]):
|
|
13
|
+
root: Annotated[
|
|
14
|
+
str | AwareDatetime,
|
|
15
|
+
Field(
|
|
16
|
+
description="Campaign start timing: 'asap' or ISO 8601 date-time", title='Start Timing'
|
|
17
|
+
),
|
|
18
|
+
]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: core/sub_asset.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
from typing import Annotated, Literal
|
|
8
8
|
|
|
9
9
|
from adcp.types.base import AdCPBaseModel
|
|
10
|
-
from pydantic import AnyUrl, ConfigDict, Field
|
|
10
|
+
from pydantic import AnyUrl, ConfigDict, Field, RootModel
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class SubAsset1(AdCPBaseModel):
|
|
@@ -53,3 +53,13 @@ class SubAsset2(AdCPBaseModel):
|
|
|
53
53
|
description='Text content for text-based assets like headlines, body text, CTA text, etc.'
|
|
54
54
|
),
|
|
55
55
|
]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class SubAsset(RootModel[SubAsset1 | SubAsset2]):
|
|
59
|
+
root: Annotated[
|
|
60
|
+
SubAsset1 | SubAsset2,
|
|
61
|
+
Field(
|
|
62
|
+
description='Sub-asset for multi-asset creative formats, including carousel images and native ad template variables',
|
|
63
|
+
title='Sub-Asset',
|
|
64
|
+
),
|
|
65
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: creative/preview_creative_response.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -50,11 +50,7 @@ class Preview(AdCPBaseModel):
|
|
|
50
50
|
]
|
|
51
51
|
preview_id: Annotated[str, Field(description='Unique identifier for this preview variant')]
|
|
52
52
|
renders: Annotated[
|
|
53
|
-
list[
|
|
54
|
-
preview_render.PreviewRender1
|
|
55
|
-
| preview_render.PreviewRender2
|
|
56
|
-
| preview_render.PreviewRender3
|
|
57
|
-
],
|
|
53
|
+
list[preview_render.PreviewRender],
|
|
58
54
|
Field(
|
|
59
55
|
description='Array of rendered pieces for this preview variant. Most formats render as a single piece. Companion ad formats (video + banner), multi-placement formats, and adaptive formats render as multiple pieces.',
|
|
60
56
|
min_length=1,
|
|
@@ -93,14 +89,7 @@ class PreviewCreativeResponse1(AdCPBaseModel):
|
|
|
93
89
|
class Preview1(AdCPBaseModel):
|
|
94
90
|
input: Input4
|
|
95
91
|
preview_id: str
|
|
96
|
-
renders: Annotated[
|
|
97
|
-
list[
|
|
98
|
-
preview_render.PreviewRender1
|
|
99
|
-
| preview_render.PreviewRender2
|
|
100
|
-
| preview_render.PreviewRender3
|
|
101
|
-
],
|
|
102
|
-
Field(min_length=1),
|
|
103
|
-
]
|
|
92
|
+
renders: Annotated[list[preview_render.PreviewRender], Field(min_length=1)]
|
|
104
93
|
|
|
105
94
|
|
|
106
95
|
class Response(AdCPBaseModel):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: creative/preview_render.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -134,17 +134,9 @@ class PreviewRender3(AdCPBaseModel):
|
|
|
134
134
|
]
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
class PreviewRender(
|
|
138
|
-
RootModel[
|
|
139
|
-
PreviewRender1
|
|
140
|
-
| PreviewRender2
|
|
141
|
-
| PreviewRender3
|
|
142
|
-
]
|
|
143
|
-
):
|
|
137
|
+
class PreviewRender(RootModel[PreviewRender1 | PreviewRender2 | PreviewRender3]):
|
|
144
138
|
root: Annotated[
|
|
145
|
-
PreviewRender1
|
|
146
|
-
| PreviewRender2
|
|
147
|
-
| PreviewRender3,
|
|
139
|
+
PreviewRender1 | PreviewRender2 | PreviewRender3,
|
|
148
140
|
Field(
|
|
149
141
|
description='A single rendered piece of a creative preview with discriminated output format',
|
|
150
142
|
title='Preview Render',
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/create_media_buy_async_response_input_required.json
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import Annotated
|
|
9
|
+
|
|
10
|
+
from adcp.types.base import AdCPBaseModel
|
|
11
|
+
from pydantic import ConfigDict, Field
|
|
12
|
+
|
|
13
|
+
from ..core import context as context_1
|
|
14
|
+
from ..core import error
|
|
15
|
+
from ..core import ext as ext_1
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Reason(Enum):
|
|
19
|
+
APPROVAL_REQUIRED = 'APPROVAL_REQUIRED'
|
|
20
|
+
BUDGET_EXCEEDS_LIMIT = 'BUDGET_EXCEEDS_LIMIT'
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CreateMediaBuyInputRequired(AdCPBaseModel):
|
|
24
|
+
model_config = ConfigDict(
|
|
25
|
+
extra='forbid',
|
|
26
|
+
)
|
|
27
|
+
context: context_1.ContextObject | None = None
|
|
28
|
+
errors: Annotated[
|
|
29
|
+
list[error.Error] | None,
|
|
30
|
+
Field(
|
|
31
|
+
description='Optional validation errors or warnings for debugging purposes. Helps explain why input is required.'
|
|
32
|
+
),
|
|
33
|
+
] = None
|
|
34
|
+
ext: ext_1.ExtensionObject | None = None
|
|
35
|
+
reason: Annotated[
|
|
36
|
+
Reason | None, Field(description='Reason code indicating why input is needed')
|
|
37
|
+
] = None
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/create_media_buy_async_response_submitted.json
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from adcp.types.base import AdCPBaseModel
|
|
8
|
+
from pydantic import ConfigDict
|
|
9
|
+
|
|
10
|
+
from ..core import context as context_1
|
|
11
|
+
from ..core import ext as ext_1
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class CreateMediaBuySubmitted(AdCPBaseModel):
|
|
15
|
+
model_config = ConfigDict(
|
|
16
|
+
extra='forbid',
|
|
17
|
+
)
|
|
18
|
+
context: context_1.ContextObject | None = None
|
|
19
|
+
ext: ext_1.ExtensionObject | None = None
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: media_buy/create_media_buy_async_response_working.json
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated
|
|
8
|
+
|
|
9
|
+
from adcp.types.base import AdCPBaseModel
|
|
10
|
+
from pydantic import ConfigDict, Field
|
|
11
|
+
|
|
12
|
+
from ..core import context as context_1
|
|
13
|
+
from ..core import ext as ext_1
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class CreateMediaBuyWorking(AdCPBaseModel):
|
|
17
|
+
model_config = ConfigDict(
|
|
18
|
+
extra='forbid',
|
|
19
|
+
)
|
|
20
|
+
context: context_1.ContextObject | None = None
|
|
21
|
+
current_step: Annotated[
|
|
22
|
+
str | None, Field(description='Current step or phase of the operation')
|
|
23
|
+
] = None
|
|
24
|
+
ext: ext_1.ExtensionObject | None = None
|
|
25
|
+
percentage: Annotated[
|
|
26
|
+
float | None, Field(description='Completion percentage (0-100)', ge=0.0, le=100.0)
|
|
27
|
+
] = None
|
|
28
|
+
step_number: Annotated[int | None, Field(description='Current step number', ge=1)] = None
|
|
29
|
+
total_steps: Annotated[
|
|
30
|
+
int | None, Field(description='Total number of steps in the operation', ge=1)
|
|
31
|
+
] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/create_media_buy_request.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,11 +8,12 @@ from enum import Enum
|
|
|
8
8
|
from typing import Annotated
|
|
9
9
|
|
|
10
10
|
from adcp.types.base import AdCPBaseModel
|
|
11
|
-
from pydantic import
|
|
11
|
+
from pydantic import AwareDatetime, ConfigDict, Field
|
|
12
12
|
|
|
13
|
-
from ..core import
|
|
13
|
+
from ..core import brand_manifest_ref
|
|
14
14
|
from ..core import context as context_1
|
|
15
15
|
from ..core import ext as ext_1
|
|
16
|
+
from ..core import start_timing
|
|
16
17
|
from ..core.push_notification_config import PushNotificationConfig
|
|
17
18
|
from . import package_request
|
|
18
19
|
|
|
@@ -55,24 +56,9 @@ class CreateMediaBuyRequest(AdCPBaseModel):
|
|
|
55
56
|
extra='forbid',
|
|
56
57
|
)
|
|
57
58
|
brand_manifest: Annotated[
|
|
58
|
-
|
|
59
|
+
brand_manifest_ref.BrandManifestReference,
|
|
59
60
|
Field(
|
|
60
|
-
description='Brand information manifest serving as the namespace and identity for this media buy. Provides brand context, assets, and product catalog. Can be provided inline or as a URL reference to a hosted manifest. Can be cached and reused across multiple requests.'
|
|
61
|
-
examples=[
|
|
62
|
-
{
|
|
63
|
-
'data': {
|
|
64
|
-
'colors': {'primary': '#FF6B35'},
|
|
65
|
-
'name': 'ACME Corporation',
|
|
66
|
-
'url': 'https://acmecorp.com',
|
|
67
|
-
},
|
|
68
|
-
'description': 'Inline brand manifest',
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
'data': 'https://cdn.acmecorp.com/brand-manifest.json',
|
|
72
|
-
'description': 'URL string reference to hosted manifest',
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
title='Brand Manifest Reference',
|
|
61
|
+
description='Brand information manifest serving as the namespace and identity for this media buy. Provides brand context, assets, and product catalog. Can be provided inline or as a URL reference to a hosted manifest. Can be cached and reused across multiple requests.'
|
|
76
62
|
),
|
|
77
63
|
]
|
|
78
64
|
buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")]
|
|
@@ -86,9 +72,4 @@ class CreateMediaBuyRequest(AdCPBaseModel):
|
|
|
86
72
|
]
|
|
87
73
|
po_number: Annotated[str | None, Field(description='Purchase order number for tracking')] = None
|
|
88
74
|
reporting_webhook: ReportingWebhook | None = None
|
|
89
|
-
start_time:
|
|
90
|
-
str | AwareDatetime,
|
|
91
|
-
Field(
|
|
92
|
-
description="Campaign start timing: 'asap' or ISO 8601 date-time", title='Start Timing'
|
|
93
|
-
),
|
|
94
|
-
]
|
|
75
|
+
start_time: start_timing.StartTiming
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: media_buy/get_media_buy_delivery_response.json
|
|
3
|
-
# timestamp: 2025-
|
|
3
|
+
# timestamp: 2025-12-11T15:09:37+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Annotated
|
|
8
|
+
from typing import Annotated, Any
|
|
9
9
|
|
|
10
10
|
from adcp.types.base import AdCPBaseModel
|
|
11
11
|
from pydantic import AwareDatetime, ConfigDict, Field
|
|
@@ -72,6 +72,7 @@ class Totals(DeliveryMetrics):
|
|
|
72
72
|
ge=0.0,
|
|
73
73
|
),
|
|
74
74
|
] = None
|
|
75
|
+
spend: Any
|
|
75
76
|
|
|
76
77
|
|
|
77
78
|
class NotificationType(Enum):
|
|
@@ -133,6 +134,7 @@ class ByPackageItem(DeliveryMetrics):
|
|
|
133
134
|
ge=0.0,
|
|
134
135
|
),
|
|
135
136
|
]
|
|
137
|
+
spend: Any
|
|
136
138
|
|
|
137
139
|
|
|
138
140
|
class MediaBuyDelivery(AdCPBaseModel):
|