adcp 2.3.0__py3-none-any.whl → 2.4.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 +1 -1
- adcp/types/generated.py +36 -531
- adcp/types/generated_poc/__init__.py +1 -1
- adcp/types/generated_poc/activate_signal_request.py +5 -5
- adcp/types/generated_poc/activate_signal_response.py +9 -9
- adcp/types/generated_poc/activation_key.py +8 -8
- adcp/types/generated_poc/adagents.py +46 -46
- adcp/types/generated_poc/asset_type.py +19 -19
- adcp/types/generated_poc/audio_asset.py +6 -6
- adcp/types/generated_poc/brand_manifest.py +73 -73
- adcp/types/generated_poc/build_creative_request.py +6 -6
- adcp/types/generated_poc/build_creative_response.py +9 -9
- adcp/types/generated_poc/channels.py +10 -10
- adcp/types/generated_poc/cpc_option.py +12 -8
- adcp/types/generated_poc/cpcv_option.py +12 -8
- adcp/types/generated_poc/cpm_auction_option.py +17 -13
- adcp/types/generated_poc/cpm_fixed_option.py +12 -8
- adcp/types/generated_poc/cpp_option.py +17 -13
- adcp/types/generated_poc/cpv_option.py +16 -12
- adcp/types/generated_poc/create_media_buy_request.py +29 -29
- adcp/types/generated_poc/create_media_buy_response.py +11 -11
- adcp/types/generated_poc/creative_asset.py +13 -13
- adcp/types/generated_poc/creative_assignment.py +4 -4
- adcp/types/generated_poc/creative_manifest.py +4 -4
- adcp/types/generated_poc/creative_policy.py +11 -11
- adcp/types/generated_poc/creative_status.py +5 -5
- adcp/types/generated_poc/css_asset.py +3 -3
- adcp/types/generated_poc/daast_asset.py +30 -30
- adcp/types/generated_poc/delivery_metrics.py +33 -33
- adcp/types/generated_poc/delivery_type.py +3 -3
- adcp/types/generated_poc/deployment.py +21 -21
- adcp/types/generated_poc/destination.py +10 -10
- adcp/types/generated_poc/error.py +7 -7
- adcp/types/generated_poc/flat_rate_option.py +16 -16
- adcp/types/generated_poc/format.py +70 -70
- adcp/types/generated_poc/format_id.py +3 -3
- adcp/types/generated_poc/frequency_cap.py +3 -3
- adcp/types/generated_poc/frequency_cap_scope.py +4 -4
- adcp/types/generated_poc/get_media_buy_delivery_request.py +21 -21
- adcp/types/generated_poc/get_media_buy_delivery_response.py +46 -46
- adcp/types/generated_poc/get_products_request.py +23 -23
- adcp/types/generated_poc/get_products_response.py +5 -5
- adcp/types/generated_poc/get_signals_request.py +19 -19
- adcp/types/generated_poc/get_signals_response.py +20 -20
- adcp/types/generated_poc/html_asset.py +3 -3
- adcp/types/generated_poc/identifier_types.py +20 -20
- adcp/types/generated_poc/image_asset.py +7 -7
- adcp/types/generated_poc/javascript_asset.py +7 -7
- adcp/types/generated_poc/list_authorized_properties_request.py +5 -5
- adcp/types/generated_poc/list_authorized_properties_response.py +9 -9
- adcp/types/generated_poc/list_creative_formats_request.py +22 -22
- adcp/types/generated_poc/list_creative_formats_response.py +11 -11
- adcp/types/generated_poc/list_creatives_request.py +51 -51
- adcp/types/generated_poc/list_creatives_response.py +61 -61
- adcp/types/generated_poc/markdown_asset.py +7 -7
- adcp/types/generated_poc/measurement.py +9 -9
- adcp/types/generated_poc/media_buy.py +8 -8
- adcp/types/generated_poc/media_buy_status.py +5 -5
- adcp/types/generated_poc/pacing.py +4 -4
- adcp/types/generated_poc/package.py +8 -8
- adcp/types/generated_poc/package_request.py +7 -7
- adcp/types/generated_poc/package_status.py +5 -5
- adcp/types/generated_poc/performance_feedback.py +31 -31
- adcp/types/generated_poc/placement.py +4 -4
- adcp/types/generated_poc/preview_creative_request.py +28 -28
- adcp/types/generated_poc/preview_creative_response.py +31 -31
- adcp/types/generated_poc/preview_render.py +36 -28
- adcp/types/generated_poc/pricing_model.py +8 -8
- adcp/types/generated_poc/product.py +32 -31
- adcp/types/generated_poc/promoted_offerings.py +29 -29
- adcp/types/generated_poc/promoted_products.py +3 -3
- adcp/types/generated_poc/property.py +18 -18
- adcp/types/generated_poc/protocol_envelope.py +9 -9
- adcp/types/generated_poc/provide_performance_feedback_request.py +24 -24
- adcp/types/generated_poc/provide_performance_feedback_response.py +9 -9
- adcp/types/generated_poc/publisher_identifier_types.py +6 -6
- adcp/types/generated_poc/push_notification_config.py +9 -9
- adcp/types/generated_poc/reporting_capabilities.py +21 -21
- adcp/types/generated_poc/response.py +5 -5
- adcp/types/generated_poc/standard_format_ids.py +36 -36
- adcp/types/generated_poc/sub_asset.py +13 -13
- adcp/types/generated_poc/sync_creatives_request.py +11 -11
- adcp/types/generated_poc/sync_creatives_response.py +23 -23
- adcp/types/generated_poc/targeting.py +9 -9
- adcp/types/generated_poc/task_status.py +10 -10
- adcp/types/generated_poc/task_type.py +6 -6
- adcp/types/generated_poc/tasks_get_request.py +5 -5
- adcp/types/generated_poc/tasks_get_response.py +35 -35
- adcp/types/generated_poc/tasks_list_request.py +36 -36
- adcp/types/generated_poc/tasks_list_response.py +35 -35
- adcp/types/generated_poc/text_asset.py +3 -3
- adcp/types/generated_poc/update_media_buy_request.py +27 -27
- adcp/types/generated_poc/update_media_buy_response.py +11 -11
- adcp/types/generated_poc/url_asset.py +7 -7
- adcp/types/generated_poc/vast_asset.py +38 -38
- adcp/types/generated_poc/vcpm_auction_option.py +17 -13
- adcp/types/generated_poc/vcpm_fixed_option.py +12 -8
- adcp/types/generated_poc/video_asset.py +8 -8
- adcp/types/generated_poc/webhook_asset.py +19 -19
- adcp/types/generated_poc/webhook_payload.py +18 -18
- {adcp-2.3.0.dist-info → adcp-2.4.0.dist-info}/METADATA +1 -1
- adcp-2.4.0.dist-info/RECORD +132 -0
- adcp-2.3.0.dist-info/RECORD +0 -132
- {adcp-2.3.0.dist-info → adcp-2.4.0.dist-info}/WHEEL +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.3.0.dist-info → adcp-2.4.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: performance-feedback.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:04:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -12,78 +12,78 @@ from pydantic import AwareDatetime, ConfigDict, Field
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class FeedbackSource(Enum):
|
|
15
|
-
buyer_attribution =
|
|
16
|
-
third_party_measurement =
|
|
17
|
-
platform_analytics =
|
|
18
|
-
verification_partner =
|
|
15
|
+
buyer_attribution = 'buyer_attribution'
|
|
16
|
+
third_party_measurement = 'third_party_measurement'
|
|
17
|
+
platform_analytics = 'platform_analytics'
|
|
18
|
+
verification_partner = 'verification_partner'
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class MeasurementPeriod(AdCPBaseModel):
|
|
22
22
|
model_config = ConfigDict(
|
|
23
|
-
extra=
|
|
23
|
+
extra='forbid',
|
|
24
24
|
)
|
|
25
25
|
end: Annotated[
|
|
26
|
-
AwareDatetime, Field(description=
|
|
26
|
+
AwareDatetime, Field(description='ISO 8601 end timestamp for measurement period')
|
|
27
27
|
]
|
|
28
28
|
start: Annotated[
|
|
29
|
-
AwareDatetime, Field(description=
|
|
29
|
+
AwareDatetime, Field(description='ISO 8601 start timestamp for measurement period')
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class MetricType(Enum):
|
|
34
|
-
overall_performance =
|
|
35
|
-
conversion_rate =
|
|
36
|
-
brand_lift =
|
|
37
|
-
click_through_rate =
|
|
38
|
-
completion_rate =
|
|
39
|
-
viewability =
|
|
40
|
-
brand_safety =
|
|
41
|
-
cost_efficiency =
|
|
34
|
+
overall_performance = 'overall_performance'
|
|
35
|
+
conversion_rate = 'conversion_rate'
|
|
36
|
+
brand_lift = 'brand_lift'
|
|
37
|
+
click_through_rate = 'click_through_rate'
|
|
38
|
+
completion_rate = 'completion_rate'
|
|
39
|
+
viewability = 'viewability'
|
|
40
|
+
brand_safety = 'brand_safety'
|
|
41
|
+
cost_efficiency = 'cost_efficiency'
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class Status(Enum):
|
|
45
|
-
accepted =
|
|
46
|
-
queued =
|
|
47
|
-
applied =
|
|
48
|
-
rejected =
|
|
45
|
+
accepted = 'accepted'
|
|
46
|
+
queued = 'queued'
|
|
47
|
+
applied = 'applied'
|
|
48
|
+
rejected = 'rejected'
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
class PerformanceFeedback(AdCPBaseModel):
|
|
52
52
|
model_config = ConfigDict(
|
|
53
|
-
extra=
|
|
53
|
+
extra='forbid',
|
|
54
54
|
)
|
|
55
55
|
applied_at: Annotated[
|
|
56
56
|
AwareDatetime | None,
|
|
57
57
|
Field(
|
|
58
|
-
description=
|
|
58
|
+
description='ISO 8601 timestamp when feedback was applied to optimization algorithms'
|
|
59
59
|
),
|
|
60
60
|
] = None
|
|
61
61
|
creative_id: Annotated[
|
|
62
|
-
str | None, Field(description=
|
|
62
|
+
str | None, Field(description='Specific creative asset (if feedback is creative-specific)')
|
|
63
63
|
] = None
|
|
64
64
|
feedback_id: Annotated[
|
|
65
|
-
str, Field(description=
|
|
65
|
+
str, Field(description='Unique identifier for this performance feedback submission')
|
|
66
66
|
]
|
|
67
|
-
feedback_source: Annotated[FeedbackSource, Field(description=
|
|
67
|
+
feedback_source: Annotated[FeedbackSource, Field(description='Source of the performance data')]
|
|
68
68
|
measurement_period: Annotated[
|
|
69
|
-
MeasurementPeriod, Field(description=
|
|
69
|
+
MeasurementPeriod, Field(description='Time period for performance measurement')
|
|
70
70
|
]
|
|
71
71
|
media_buy_id: Annotated[str, Field(description="Publisher's media buy identifier")]
|
|
72
|
-
metric_type: Annotated[MetricType, Field(description=
|
|
72
|
+
metric_type: Annotated[MetricType, Field(description='The business metric being measured')]
|
|
73
73
|
package_id: Annotated[
|
|
74
74
|
str | None,
|
|
75
75
|
Field(
|
|
76
|
-
description=
|
|
76
|
+
description='Specific package within the media buy (if feedback is package-specific)'
|
|
77
77
|
),
|
|
78
78
|
] = None
|
|
79
79
|
performance_index: Annotated[
|
|
80
80
|
float,
|
|
81
81
|
Field(
|
|
82
|
-
description=
|
|
82
|
+
description='Normalized performance score (0.0 = no value, 1.0 = expected, >1.0 = above expected)',
|
|
83
83
|
ge=0.0,
|
|
84
84
|
),
|
|
85
85
|
]
|
|
86
|
-
status: Annotated[Status, Field(description=
|
|
86
|
+
status: Annotated[Status, Field(description='Processing status of the performance feedback')]
|
|
87
87
|
submitted_at: Annotated[
|
|
88
|
-
AwareDatetime, Field(description=
|
|
88
|
+
AwareDatetime, Field(description='ISO 8601 timestamp when feedback was submitted')
|
|
89
89
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: placement.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,10 +14,10 @@ from . import format_id
|
|
|
14
14
|
|
|
15
15
|
class Placement(AdCPBaseModel):
|
|
16
16
|
model_config = ConfigDict(
|
|
17
|
-
extra=
|
|
17
|
+
extra='forbid',
|
|
18
18
|
)
|
|
19
19
|
description: Annotated[
|
|
20
|
-
str | None, Field(description=
|
|
20
|
+
str | None, Field(description='Detailed description of where and how the placement appears')
|
|
21
21
|
] = None
|
|
22
22
|
format_ids: Annotated[
|
|
23
23
|
list[format_id.FormatId] | None,
|
|
@@ -33,5 +33,5 @@ class Placement(AdCPBaseModel):
|
|
|
33
33
|
),
|
|
34
34
|
]
|
|
35
35
|
placement_id: Annotated[
|
|
36
|
-
str, Field(description=
|
|
36
|
+
str, Field(description='Unique identifier for the placement within the product')
|
|
37
37
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: preview-creative-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
|
|
|
@@ -16,7 +16,7 @@ from . import format_id as format_id_1
|
|
|
16
16
|
|
|
17
17
|
class Input(AdCPBaseModel):
|
|
18
18
|
model_config = ConfigDict(
|
|
19
|
-
extra=
|
|
19
|
+
extra='forbid',
|
|
20
20
|
)
|
|
21
21
|
context_description: Annotated[
|
|
22
22
|
str | None,
|
|
@@ -39,47 +39,47 @@ class Input(AdCPBaseModel):
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class OutputFormat(Enum):
|
|
42
|
-
url =
|
|
43
|
-
html =
|
|
42
|
+
url = 'url'
|
|
43
|
+
html = 'html'
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
class Input2(AdCPBaseModel):
|
|
47
47
|
model_config = ConfigDict(
|
|
48
|
-
extra=
|
|
48
|
+
extra='forbid',
|
|
49
49
|
)
|
|
50
50
|
context_description: Annotated[
|
|
51
51
|
str | None,
|
|
52
|
-
Field(description=
|
|
52
|
+
Field(description='Natural language description of the context for AI-generated content'),
|
|
53
53
|
] = None
|
|
54
54
|
macros: Annotated[
|
|
55
|
-
dict[str, str] | None, Field(description=
|
|
55
|
+
dict[str, str] | None, Field(description='Macro values to use for this preview')
|
|
56
56
|
] = None
|
|
57
|
-
name: Annotated[str, Field(description=
|
|
57
|
+
name: Annotated[str, Field(description='Human-readable name for this input set')]
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
class PreviewCreativeRequest1(AdCPBaseModel):
|
|
61
61
|
model_config = ConfigDict(
|
|
62
|
-
extra=
|
|
62
|
+
extra='forbid',
|
|
63
63
|
)
|
|
64
64
|
context: Annotated[
|
|
65
65
|
dict[str, Any] | None,
|
|
66
66
|
Field(
|
|
67
|
-
description=
|
|
67
|
+
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.'
|
|
68
68
|
),
|
|
69
69
|
] = None
|
|
70
70
|
creative_manifest: Annotated[
|
|
71
71
|
creative_manifest_1.CreativeManifest,
|
|
72
72
|
Field(
|
|
73
|
-
description=
|
|
73
|
+
description='Complete creative manifest with all required assets (including promoted_offerings if required by the format)'
|
|
74
74
|
),
|
|
75
75
|
]
|
|
76
76
|
format_id: Annotated[
|
|
77
|
-
format_id_1.FormatId, Field(description=
|
|
77
|
+
format_id_1.FormatId, Field(description='Format identifier for rendering the preview')
|
|
78
78
|
]
|
|
79
79
|
inputs: Annotated[
|
|
80
80
|
list[Input] | None,
|
|
81
81
|
Field(
|
|
82
|
-
description=
|
|
82
|
+
description='Array of input sets for generating multiple preview variants. Each input set defines macros and context values for one preview rendering. If not provided, creative agent will generate default previews.'
|
|
83
83
|
),
|
|
84
84
|
] = None
|
|
85
85
|
output_format: Annotated[
|
|
@@ -89,28 +89,28 @@ class PreviewCreativeRequest1(AdCPBaseModel):
|
|
|
89
89
|
),
|
|
90
90
|
] = OutputFormat.url
|
|
91
91
|
request_type: Annotated[
|
|
92
|
-
Literal[
|
|
93
|
-
Field(description=
|
|
92
|
+
Literal['single'],
|
|
93
|
+
Field(description='Discriminator indicating this is a single preview request'),
|
|
94
94
|
]
|
|
95
95
|
template_id: Annotated[
|
|
96
|
-
str | None, Field(description=
|
|
96
|
+
str | None, Field(description='Specific template ID for custom format rendering')
|
|
97
97
|
] = None
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
class Request(AdCPBaseModel):
|
|
101
101
|
model_config = ConfigDict(
|
|
102
|
-
extra=
|
|
102
|
+
extra='forbid',
|
|
103
103
|
)
|
|
104
104
|
creative_manifest: Annotated[
|
|
105
105
|
creative_manifest_1.CreativeManifest,
|
|
106
|
-
Field(description=
|
|
106
|
+
Field(description='Complete creative manifest with all required assets'),
|
|
107
107
|
]
|
|
108
108
|
format_id: Annotated[
|
|
109
|
-
format_id_1.FormatId, Field(description=
|
|
109
|
+
format_id_1.FormatId, Field(description='Format identifier for rendering the preview')
|
|
110
110
|
]
|
|
111
111
|
inputs: Annotated[
|
|
112
112
|
list[Input2] | None,
|
|
113
|
-
Field(description=
|
|
113
|
+
Field(description='Array of input sets for generating multiple preview variants'),
|
|
114
114
|
] = None
|
|
115
115
|
output_format: Annotated[
|
|
116
116
|
OutputFormat | None,
|
|
@@ -119,18 +119,18 @@ class Request(AdCPBaseModel):
|
|
|
119
119
|
),
|
|
120
120
|
] = OutputFormat.url
|
|
121
121
|
template_id: Annotated[
|
|
122
|
-
str | None, Field(description=
|
|
122
|
+
str | None, Field(description='Specific template ID for custom format rendering')
|
|
123
123
|
] = None
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
class PreviewCreativeRequest2(AdCPBaseModel):
|
|
127
127
|
model_config = ConfigDict(
|
|
128
|
-
extra=
|
|
128
|
+
extra='forbid',
|
|
129
129
|
)
|
|
130
130
|
context: Annotated[
|
|
131
131
|
dict[str, Any] | None,
|
|
132
132
|
Field(
|
|
133
|
-
description=
|
|
133
|
+
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.'
|
|
134
134
|
),
|
|
135
135
|
] = None
|
|
136
136
|
output_format: Annotated[
|
|
@@ -140,13 +140,13 @@ class PreviewCreativeRequest2(AdCPBaseModel):
|
|
|
140
140
|
),
|
|
141
141
|
] = OutputFormat.url
|
|
142
142
|
request_type: Annotated[
|
|
143
|
-
Literal[
|
|
144
|
-
Field(description=
|
|
143
|
+
Literal['batch'],
|
|
144
|
+
Field(description='Discriminator indicating this is a batch preview request'),
|
|
145
145
|
]
|
|
146
146
|
requests: Annotated[
|
|
147
147
|
list[Request],
|
|
148
148
|
Field(
|
|
149
|
-
description=
|
|
149
|
+
description='Array of preview requests (1-50 items). Each follows the single request structure.',
|
|
150
150
|
max_length=50,
|
|
151
151
|
min_length=1,
|
|
152
152
|
),
|
|
@@ -157,7 +157,7 @@ class PreviewCreativeRequest(RootModel[PreviewCreativeRequest1 | PreviewCreative
|
|
|
157
157
|
root: Annotated[
|
|
158
158
|
PreviewCreativeRequest1 | PreviewCreativeRequest2,
|
|
159
159
|
Field(
|
|
160
|
-
description=
|
|
161
|
-
title=
|
|
160
|
+
description='Request to generate previews of one or more creative manifests. Accepts either a single creative request or an array of requests for batch processing.',
|
|
161
|
+
title='Preview Creative Request',
|
|
162
162
|
),
|
|
163
163
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: preview-creative-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,12 +14,12 @@ from . import preview_render
|
|
|
14
14
|
|
|
15
15
|
class Input(AdCPBaseModel):
|
|
16
16
|
context_description: Annotated[
|
|
17
|
-
str | None, Field(description=
|
|
17
|
+
str | None, Field(description='Context description applied to this variant')
|
|
18
18
|
] = None
|
|
19
19
|
macros: Annotated[
|
|
20
|
-
dict[str, str] | None, Field(description=
|
|
20
|
+
dict[str, str] | None, Field(description='Macro values applied to this variant')
|
|
21
21
|
] = None
|
|
22
|
-
name: Annotated[str, Field(description=
|
|
22
|
+
name: Annotated[str, Field(description='Human-readable name for this variant')]
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class Error(AdCPBaseModel):
|
|
@@ -29,8 +29,8 @@ class Error(AdCPBaseModel):
|
|
|
29
29
|
description="Error code (e.g., 'invalid_manifest', 'unsupported_format', 'missing_assets')"
|
|
30
30
|
),
|
|
31
31
|
]
|
|
32
|
-
details: Annotated[dict[str, Any] | None, Field(description=
|
|
33
|
-
message: Annotated[str, Field(description=
|
|
32
|
+
details: Annotated[dict[str, Any] | None, Field(description='Additional error context')] = None
|
|
33
|
+
message: Annotated[str, Field(description='Human-readable error message')]
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class Input4(AdCPBaseModel):
|
|
@@ -43,10 +43,10 @@ class Preview(AdCPBaseModel):
|
|
|
43
43
|
input: Annotated[
|
|
44
44
|
Input,
|
|
45
45
|
Field(
|
|
46
|
-
description=
|
|
46
|
+
description='The input parameters that generated this preview variant. Echoes back the request input or shows defaults used.'
|
|
47
47
|
),
|
|
48
48
|
]
|
|
49
|
-
preview_id: Annotated[str, Field(description=
|
|
49
|
+
preview_id: Annotated[str, Field(description='Unique identifier for this preview variant')]
|
|
50
50
|
renders: Annotated[
|
|
51
51
|
list[
|
|
52
52
|
preview_render.PreviewRender1
|
|
@@ -54,7 +54,7 @@ class Preview(AdCPBaseModel):
|
|
|
54
54
|
| preview_render.PreviewRender3
|
|
55
55
|
],
|
|
56
56
|
Field(
|
|
57
|
-
description=
|
|
57
|
+
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.',
|
|
58
58
|
min_length=1,
|
|
59
59
|
),
|
|
60
60
|
]
|
|
@@ -62,33 +62,33 @@ class Preview(AdCPBaseModel):
|
|
|
62
62
|
|
|
63
63
|
class PreviewCreativeResponse1(AdCPBaseModel):
|
|
64
64
|
model_config = ConfigDict(
|
|
65
|
-
extra=
|
|
65
|
+
extra='forbid',
|
|
66
66
|
)
|
|
67
67
|
context: Annotated[
|
|
68
68
|
dict[str, Any] | None,
|
|
69
69
|
Field(
|
|
70
|
-
description=
|
|
70
|
+
description='Initiator-provided context echoed inside the preview payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
71
71
|
),
|
|
72
72
|
] = None
|
|
73
73
|
expires_at: Annotated[
|
|
74
|
-
AwareDatetime, Field(description=
|
|
74
|
+
AwareDatetime, Field(description='ISO 8601 timestamp when preview links expire')
|
|
75
75
|
]
|
|
76
76
|
interactive_url: Annotated[
|
|
77
77
|
AnyUrl | None,
|
|
78
78
|
Field(
|
|
79
|
-
description=
|
|
79
|
+
description='Optional URL to an interactive testing page that shows all preview variants with controls to switch between them, modify macro values, and test different scenarios.'
|
|
80
80
|
),
|
|
81
81
|
] = None
|
|
82
82
|
previews: Annotated[
|
|
83
83
|
list[Preview],
|
|
84
84
|
Field(
|
|
85
|
-
description=
|
|
85
|
+
description='Array of preview variants. Each preview corresponds to an input set from the request. If no inputs were provided, returns a single default preview.',
|
|
86
86
|
min_length=1,
|
|
87
87
|
),
|
|
88
88
|
]
|
|
89
89
|
response_type: Annotated[
|
|
90
|
-
Literal[
|
|
91
|
-
Field(description=
|
|
90
|
+
Literal['single'],
|
|
91
|
+
Field(description='Discriminator indicating this is a single preview response'),
|
|
92
92
|
]
|
|
93
93
|
|
|
94
94
|
|
|
@@ -110,16 +110,16 @@ class Response(AdCPBaseModel):
|
|
|
110
110
|
interactive_url: AnyUrl | None = None
|
|
111
111
|
previews: Annotated[
|
|
112
112
|
list[Preview1],
|
|
113
|
-
Field(description=
|
|
113
|
+
Field(description='Array of preview variants for this creative', min_length=1),
|
|
114
114
|
]
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
class Results(AdCPBaseModel):
|
|
118
|
-
error: Annotated[Error | None, Field(description=
|
|
118
|
+
error: Annotated[Error | None, Field(description='Error information for failed requests')] = (
|
|
119
119
|
None
|
|
120
120
|
)
|
|
121
|
-
response: Annotated[Response, Field(description=
|
|
122
|
-
success: Annotated[Literal[True], Field(description=
|
|
121
|
+
response: Annotated[Response, Field(description='Preview response for successful requests')]
|
|
122
|
+
success: Annotated[Literal[True], Field(description='Whether this preview request succeeded')]
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
Preview2 = Preview1
|
|
@@ -130,36 +130,36 @@ class Response1(AdCPBaseModel):
|
|
|
130
130
|
interactive_url: AnyUrl | None = None
|
|
131
131
|
previews: Annotated[
|
|
132
132
|
list[Preview2],
|
|
133
|
-
Field(description=
|
|
133
|
+
Field(description='Array of preview variants for this creative', min_length=1),
|
|
134
134
|
]
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
class Results1(AdCPBaseModel):
|
|
138
|
-
error: Annotated[Error, Field(description=
|
|
138
|
+
error: Annotated[Error, Field(description='Error information for failed requests')]
|
|
139
139
|
response: Annotated[
|
|
140
|
-
Response1 | None, Field(description=
|
|
140
|
+
Response1 | None, Field(description='Preview response for successful requests')
|
|
141
141
|
] = None
|
|
142
|
-
success: Annotated[Literal[False], Field(description=
|
|
142
|
+
success: Annotated[Literal[False], Field(description='Whether this preview request succeeded')]
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
class PreviewCreativeResponse2(AdCPBaseModel):
|
|
146
146
|
model_config = ConfigDict(
|
|
147
|
-
extra=
|
|
147
|
+
extra='forbid',
|
|
148
148
|
)
|
|
149
149
|
context: Annotated[
|
|
150
150
|
dict[str, Any] | None,
|
|
151
151
|
Field(
|
|
152
|
-
description=
|
|
152
|
+
description='Initiator-provided context echoed inside the preview payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
153
153
|
),
|
|
154
154
|
] = None
|
|
155
155
|
response_type: Annotated[
|
|
156
|
-
Literal[
|
|
157
|
-
Field(description=
|
|
156
|
+
Literal['batch'],
|
|
157
|
+
Field(description='Discriminator indicating this is a batch preview response'),
|
|
158
158
|
]
|
|
159
159
|
results: Annotated[
|
|
160
160
|
list[Results | Results1],
|
|
161
161
|
Field(
|
|
162
|
-
description=
|
|
162
|
+
description='Array of preview results corresponding to each request in the same order. results[0] is the result for requests[0], results[1] for requests[1], etc. Order is guaranteed even when some requests fail. Each result contains either a successful preview response or an error.',
|
|
163
163
|
min_length=1,
|
|
164
164
|
),
|
|
165
165
|
]
|
|
@@ -169,7 +169,7 @@ class PreviewCreativeResponse(RootModel[PreviewCreativeResponse1 | PreviewCreati
|
|
|
169
169
|
root: Annotated[
|
|
170
170
|
PreviewCreativeResponse1 | PreviewCreativeResponse2,
|
|
171
171
|
Field(
|
|
172
|
-
description=
|
|
173
|
-
title=
|
|
172
|
+
description='Response containing preview links for one or more creatives. Format matches the request: single preview response for single requests, batch results for batch requests.',
|
|
173
|
+
title='Preview Creative Response',
|
|
174
174
|
),
|
|
175
175
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: preview-render.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:04:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@ class Dimensions(AdCPBaseModel):
|
|
|
17
17
|
|
|
18
18
|
class Embedding(AdCPBaseModel):
|
|
19
19
|
csp_policy: Annotated[
|
|
20
|
-
str | None, Field(description=
|
|
20
|
+
str | None, Field(description='Content Security Policy requirements for embedding')
|
|
21
21
|
] = None
|
|
22
22
|
recommended_sandbox: Annotated[
|
|
23
23
|
str | None,
|
|
@@ -26,35 +26,35 @@ class Embedding(AdCPBaseModel):
|
|
|
26
26
|
),
|
|
27
27
|
] = None
|
|
28
28
|
requires_https: Annotated[
|
|
29
|
-
bool | None, Field(description=
|
|
29
|
+
bool | None, Field(description='Whether this output requires HTTPS for secure embedding')
|
|
30
30
|
] = None
|
|
31
31
|
supports_fullscreen: Annotated[
|
|
32
|
-
bool | None, Field(description=
|
|
32
|
+
bool | None, Field(description='Whether this output supports fullscreen mode')
|
|
33
33
|
] = None
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class PreviewRender1(AdCPBaseModel):
|
|
37
37
|
model_config = ConfigDict(
|
|
38
|
-
extra=
|
|
38
|
+
extra='forbid',
|
|
39
39
|
)
|
|
40
40
|
dimensions: Annotated[
|
|
41
|
-
Dimensions | None, Field(description=
|
|
41
|
+
Dimensions | None, Field(description='Dimensions for this rendered piece')
|
|
42
42
|
] = None
|
|
43
43
|
embedding: Annotated[
|
|
44
44
|
Embedding | None,
|
|
45
|
-
Field(description=
|
|
45
|
+
Field(description='Optional security and embedding metadata for safe iframe integration'),
|
|
46
46
|
] = None
|
|
47
47
|
output_format: Annotated[
|
|
48
|
-
Literal[
|
|
48
|
+
Literal['url'], Field(description='Discriminator indicating preview_url is provided')
|
|
49
49
|
]
|
|
50
50
|
preview_url: Annotated[
|
|
51
51
|
AnyUrl,
|
|
52
52
|
Field(
|
|
53
|
-
description=
|
|
53
|
+
description='URL to an HTML page that renders this piece. Can be embedded in an iframe.'
|
|
54
54
|
),
|
|
55
55
|
]
|
|
56
56
|
render_id: Annotated[
|
|
57
|
-
str, Field(description=
|
|
57
|
+
str, Field(description='Unique identifier for this rendered piece within the variant')
|
|
58
58
|
]
|
|
59
59
|
role: Annotated[
|
|
60
60
|
str,
|
|
@@ -66,25 +66,25 @@ class PreviewRender1(AdCPBaseModel):
|
|
|
66
66
|
|
|
67
67
|
class PreviewRender2(AdCPBaseModel):
|
|
68
68
|
model_config = ConfigDict(
|
|
69
|
-
extra=
|
|
69
|
+
extra='forbid',
|
|
70
70
|
)
|
|
71
71
|
dimensions: Annotated[
|
|
72
|
-
Dimensions | None, Field(description=
|
|
72
|
+
Dimensions | None, Field(description='Dimensions for this rendered piece')
|
|
73
73
|
] = None
|
|
74
74
|
embedding: Annotated[
|
|
75
|
-
Embedding | None, Field(description=
|
|
75
|
+
Embedding | None, Field(description='Optional security and embedding metadata')
|
|
76
76
|
] = None
|
|
77
77
|
output_format: Annotated[
|
|
78
|
-
Literal[
|
|
78
|
+
Literal['html'], Field(description='Discriminator indicating preview_html is provided')
|
|
79
79
|
]
|
|
80
80
|
preview_html: Annotated[
|
|
81
81
|
str,
|
|
82
82
|
Field(
|
|
83
|
-
description=
|
|
83
|
+
description='Raw HTML for this rendered piece. Can be embedded directly in the page without iframe. Security warning: Only use with trusted creative agents as this bypasses iframe sandboxing.'
|
|
84
84
|
),
|
|
85
85
|
]
|
|
86
86
|
render_id: Annotated[
|
|
87
|
-
str, Field(description=
|
|
87
|
+
str, Field(description='Unique identifier for this rendered piece within the variant')
|
|
88
88
|
]
|
|
89
89
|
role: Annotated[
|
|
90
90
|
str,
|
|
@@ -96,35 +96,35 @@ class PreviewRender2(AdCPBaseModel):
|
|
|
96
96
|
|
|
97
97
|
class PreviewRender3(AdCPBaseModel):
|
|
98
98
|
model_config = ConfigDict(
|
|
99
|
-
extra=
|
|
99
|
+
extra='forbid',
|
|
100
100
|
)
|
|
101
101
|
dimensions: Annotated[
|
|
102
|
-
Dimensions | None, Field(description=
|
|
102
|
+
Dimensions | None, Field(description='Dimensions for this rendered piece')
|
|
103
103
|
] = None
|
|
104
104
|
embedding: Annotated[
|
|
105
105
|
Embedding | None,
|
|
106
|
-
Field(description=
|
|
106
|
+
Field(description='Optional security and embedding metadata for safe iframe integration'),
|
|
107
107
|
] = None
|
|
108
108
|
output_format: Annotated[
|
|
109
|
-
Literal[
|
|
109
|
+
Literal['both'],
|
|
110
110
|
Field(
|
|
111
|
-
description=
|
|
111
|
+
description='Discriminator indicating both preview_url and preview_html are provided'
|
|
112
112
|
),
|
|
113
113
|
]
|
|
114
114
|
preview_html: Annotated[
|
|
115
115
|
str,
|
|
116
116
|
Field(
|
|
117
|
-
description=
|
|
117
|
+
description='Raw HTML for this rendered piece. Can be embedded directly in the page without iframe. Security warning: Only use with trusted creative agents as this bypasses iframe sandboxing.'
|
|
118
118
|
),
|
|
119
119
|
]
|
|
120
120
|
preview_url: Annotated[
|
|
121
121
|
AnyUrl,
|
|
122
122
|
Field(
|
|
123
|
-
description=
|
|
123
|
+
description='URL to an HTML page that renders this piece. Can be embedded in an iframe.'
|
|
124
124
|
),
|
|
125
125
|
]
|
|
126
126
|
render_id: Annotated[
|
|
127
|
-
str, Field(description=
|
|
127
|
+
str, Field(description='Unique identifier for this rendered piece within the variant')
|
|
128
128
|
]
|
|
129
129
|
role: Annotated[
|
|
130
130
|
str,
|
|
@@ -134,11 +134,19 @@ class PreviewRender3(AdCPBaseModel):
|
|
|
134
134
|
]
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
class PreviewRender(
|
|
137
|
+
class PreviewRender(
|
|
138
|
+
RootModel[
|
|
139
|
+
PreviewRender1
|
|
140
|
+
| PreviewRender2
|
|
141
|
+
| PreviewRender3
|
|
142
|
+
]
|
|
143
|
+
):
|
|
138
144
|
root: Annotated[
|
|
139
|
-
PreviewRender1
|
|
145
|
+
PreviewRender1
|
|
146
|
+
| PreviewRender2
|
|
147
|
+
| PreviewRender3,
|
|
140
148
|
Field(
|
|
141
|
-
description=
|
|
142
|
-
title=
|
|
149
|
+
description='A single rendered piece of a creative preview with discriminated output format',
|
|
150
|
+
title='Preview Render',
|
|
143
151
|
),
|
|
144
152
|
]
|