adcp 2.2.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 +5 -1
- adcp/adagents.py +122 -0
- 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.2.0.dist-info → adcp-2.4.0.dist-info}/METADATA +38 -2
- adcp-2.4.0.dist-info/RECORD +132 -0
- adcp-2.2.0.dist-info/RECORD +0 -132
- {adcp-2.2.0.dist-info → adcp-2.4.0.dist-info}/WHEEL +0 -0
- {adcp-2.2.0.dist-info → adcp-2.4.0.dist-info}/entry_points.txt +0 -0
- {adcp-2.2.0.dist-info → adcp-2.4.0.dist-info}/licenses/LICENSE +0 -0
- {adcp-2.2.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: provide-performance-feedback-response.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:04:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -14,34 +14,34 @@ from . import error
|
|
|
14
14
|
|
|
15
15
|
class ProvidePerformanceFeedbackResponse1(AdCPBaseModel):
|
|
16
16
|
model_config = ConfigDict(
|
|
17
|
-
extra=
|
|
17
|
+
extra='forbid',
|
|
18
18
|
)
|
|
19
19
|
context: Annotated[
|
|
20
20
|
dict[str, Any] | None,
|
|
21
21
|
Field(
|
|
22
|
-
description=
|
|
22
|
+
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
23
23
|
),
|
|
24
24
|
] = None
|
|
25
25
|
success: Annotated[
|
|
26
26
|
Literal[True],
|
|
27
|
-
Field(description=
|
|
27
|
+
Field(description='Whether the performance feedback was successfully received'),
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class ProvidePerformanceFeedbackResponse2(AdCPBaseModel):
|
|
32
32
|
model_config = ConfigDict(
|
|
33
|
-
extra=
|
|
33
|
+
extra='forbid',
|
|
34
34
|
)
|
|
35
35
|
context: Annotated[
|
|
36
36
|
dict[str, Any] | None,
|
|
37
37
|
Field(
|
|
38
|
-
description=
|
|
38
|
+
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
39
39
|
),
|
|
40
40
|
] = None
|
|
41
41
|
errors: Annotated[
|
|
42
42
|
list[error.Error],
|
|
43
43
|
Field(
|
|
44
|
-
description=
|
|
44
|
+
description='Array of errors explaining why feedback was rejected (e.g., invalid measurement period, missing campaign data)',
|
|
45
45
|
min_length=1,
|
|
46
46
|
),
|
|
47
47
|
]
|
|
@@ -53,7 +53,7 @@ class ProvidePerformanceFeedbackResponse(
|
|
|
53
53
|
root: Annotated[
|
|
54
54
|
ProvidePerformanceFeedbackResponse1 | ProvidePerformanceFeedbackResponse2,
|
|
55
55
|
Field(
|
|
56
|
-
description=
|
|
57
|
-
title=
|
|
56
|
+
description='Response payload for provide_performance_feedback task. Returns either success confirmation OR error information, never both.',
|
|
57
|
+
title='Provide Performance Feedback Response',
|
|
58
58
|
),
|
|
59
59
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: publisher-identifier-types.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:04:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,8 +8,8 @@ from enum import Enum
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class PublisherIdentifierTypes(Enum):
|
|
11
|
-
tag_id =
|
|
12
|
-
duns =
|
|
13
|
-
lei =
|
|
14
|
-
seller_id =
|
|
15
|
-
gln =
|
|
11
|
+
tag_id = 'tag_id'
|
|
12
|
+
duns = 'duns'
|
|
13
|
+
lei = 'lei'
|
|
14
|
+
seller_id = 'seller_id'
|
|
15
|
+
gln = 'gln'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: push-notification-config.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,18 +12,18 @@ from pydantic import AnyUrl, ConfigDict, Field
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Scheme(Enum):
|
|
15
|
-
Bearer =
|
|
16
|
-
HMAC_SHA256 =
|
|
15
|
+
Bearer = 'Bearer'
|
|
16
|
+
HMAC_SHA256 = 'HMAC-SHA256'
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class Authentication(AdCPBaseModel):
|
|
20
20
|
model_config = ConfigDict(
|
|
21
|
-
extra=
|
|
21
|
+
extra='forbid',
|
|
22
22
|
)
|
|
23
23
|
credentials: Annotated[
|
|
24
24
|
str,
|
|
25
25
|
Field(
|
|
26
|
-
description=
|
|
26
|
+
description='Credentials for authentication. For Bearer: token sent in Authorization header. For HMAC-SHA256: shared secret used to generate signature. Minimum 32 characters. Exchanged out-of-band during onboarding.',
|
|
27
27
|
min_length=32,
|
|
28
28
|
),
|
|
29
29
|
]
|
|
@@ -39,17 +39,17 @@ class Authentication(AdCPBaseModel):
|
|
|
39
39
|
|
|
40
40
|
class PushNotificationConfig(AdCPBaseModel):
|
|
41
41
|
model_config = ConfigDict(
|
|
42
|
-
extra=
|
|
42
|
+
extra='forbid',
|
|
43
43
|
)
|
|
44
44
|
authentication: Annotated[
|
|
45
45
|
Authentication,
|
|
46
|
-
Field(description=
|
|
46
|
+
Field(description='Authentication configuration for webhook delivery (A2A-compatible)'),
|
|
47
47
|
]
|
|
48
48
|
token: Annotated[
|
|
49
49
|
str | None,
|
|
50
50
|
Field(
|
|
51
|
-
description=
|
|
51
|
+
description='Optional client-provided token for webhook validation. Echoed back in webhook payload to validate request authenticity.',
|
|
52
52
|
min_length=16,
|
|
53
53
|
),
|
|
54
54
|
] = None
|
|
55
|
-
url: Annotated[AnyUrl, Field(description=
|
|
55
|
+
url: Annotated[AnyUrl, Field(description='Webhook endpoint URL for task status notifications')]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: reporting-capabilities.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,57 +12,57 @@ from pydantic import ConfigDict, Field
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class AvailableMetric(Enum):
|
|
15
|
-
impressions =
|
|
16
|
-
spend =
|
|
17
|
-
clicks =
|
|
18
|
-
ctr =
|
|
19
|
-
video_completions =
|
|
20
|
-
completion_rate =
|
|
21
|
-
conversions =
|
|
22
|
-
viewability =
|
|
23
|
-
engagement_rate =
|
|
15
|
+
impressions = 'impressions'
|
|
16
|
+
spend = 'spend'
|
|
17
|
+
clicks = 'clicks'
|
|
18
|
+
ctr = 'ctr'
|
|
19
|
+
video_completions = 'video_completions'
|
|
20
|
+
completion_rate = 'completion_rate'
|
|
21
|
+
conversions = 'conversions'
|
|
22
|
+
viewability = 'viewability'
|
|
23
|
+
engagement_rate = 'engagement_rate'
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class AvailableReportingFrequency(Enum):
|
|
27
|
-
hourly =
|
|
28
|
-
daily =
|
|
29
|
-
monthly =
|
|
27
|
+
hourly = 'hourly'
|
|
28
|
+
daily = 'daily'
|
|
29
|
+
monthly = 'monthly'
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class ReportingCapabilities(AdCPBaseModel):
|
|
33
33
|
model_config = ConfigDict(
|
|
34
|
-
extra=
|
|
34
|
+
extra='forbid',
|
|
35
35
|
)
|
|
36
36
|
available_metrics: Annotated[
|
|
37
37
|
list[AvailableMetric],
|
|
38
38
|
Field(
|
|
39
|
-
description=
|
|
39
|
+
description='Metrics available in reporting. Impressions and spend are always implicitly included.',
|
|
40
40
|
examples=[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
41
|
+
['impressions', 'spend', 'clicks', 'video_completions'],
|
|
42
|
+
['impressions', 'spend', 'conversions'],
|
|
43
43
|
],
|
|
44
44
|
),
|
|
45
45
|
]
|
|
46
46
|
available_reporting_frequencies: Annotated[
|
|
47
47
|
list[AvailableReportingFrequency],
|
|
48
|
-
Field(description=
|
|
48
|
+
Field(description='Supported reporting frequency options', min_length=1),
|
|
49
49
|
]
|
|
50
50
|
expected_delay_minutes: Annotated[
|
|
51
51
|
int,
|
|
52
52
|
Field(
|
|
53
|
-
description=
|
|
53
|
+
description='Expected delay in minutes before reporting data becomes available (e.g., 240 for 4-hour delay)',
|
|
54
54
|
examples=[240, 300, 1440],
|
|
55
55
|
ge=0,
|
|
56
56
|
),
|
|
57
57
|
]
|
|
58
58
|
supports_webhooks: Annotated[
|
|
59
59
|
bool,
|
|
60
|
-
Field(description=
|
|
60
|
+
Field(description='Whether this product supports webhook-based reporting notifications'),
|
|
61
61
|
]
|
|
62
62
|
timezone: Annotated[
|
|
63
63
|
str,
|
|
64
64
|
Field(
|
|
65
65
|
description="Timezone for reporting periods. Use 'UTC' or IANA timezone (e.g., 'America/New_York'). Critical for daily/monthly frequency alignment.",
|
|
66
|
-
examples=[
|
|
66
|
+
examples=['UTC', 'America/New_York', 'Europe/London', 'America/Los_Angeles'],
|
|
67
67
|
),
|
|
68
68
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: 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
|
|
|
@@ -12,13 +12,13 @@ from pydantic import ConfigDict, Field
|
|
|
12
12
|
|
|
13
13
|
class ProtocolResponse(AdCPBaseModel):
|
|
14
14
|
model_config = ConfigDict(
|
|
15
|
-
extra=
|
|
15
|
+
extra='forbid',
|
|
16
16
|
)
|
|
17
|
-
context_id: Annotated[str | None, Field(description=
|
|
17
|
+
context_id: Annotated[str | None, Field(description='Session continuity identifier')] = None
|
|
18
18
|
data: Annotated[
|
|
19
19
|
Any | None,
|
|
20
20
|
Field(
|
|
21
|
-
description=
|
|
21
|
+
description='AdCP task-specific response data (see individual task response schemas)'
|
|
22
22
|
),
|
|
23
23
|
] = None
|
|
24
|
-
message: Annotated[str, Field(description=
|
|
24
|
+
message: Annotated[str, Field(description='Human-readable summary')]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: standard-format-ids.json
|
|
3
|
-
# timestamp: 2025-11-
|
|
3
|
+
# timestamp: 2025-11-18T03:04:10+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -8,38 +8,38 @@ from enum import Enum
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class StandardFormatIds(Enum):
|
|
11
|
-
display_300x250 =
|
|
12
|
-
display_728x90 =
|
|
13
|
-
display_320x50 =
|
|
14
|
-
display_160x600 =
|
|
15
|
-
display_970x250 =
|
|
16
|
-
display_336x280 =
|
|
17
|
-
display_expandable_300x250 =
|
|
18
|
-
display_expandable_728x90 =
|
|
19
|
-
display_interstitial_320x480 =
|
|
20
|
-
display_interstitial_desktop =
|
|
21
|
-
display_dynamic_300x250 =
|
|
22
|
-
display_responsive =
|
|
23
|
-
native_in_feed =
|
|
24
|
-
native_content_recommendation =
|
|
25
|
-
native_product =
|
|
26
|
-
video_skippable_15s =
|
|
27
|
-
video_skippable_30s =
|
|
28
|
-
video_non_skippable_15s =
|
|
29
|
-
video_non_skippable_30s =
|
|
30
|
-
video_outstream_autoplay =
|
|
31
|
-
video_vertical_story =
|
|
32
|
-
video_rewarded_30s =
|
|
33
|
-
video_pause_ad =
|
|
34
|
-
video_ctv_non_skippable_30s =
|
|
35
|
-
audio_standard_15s =
|
|
36
|
-
audio_standard_30s =
|
|
37
|
-
audio_podcast_host_read =
|
|
38
|
-
audio_programmatic =
|
|
39
|
-
universal_carousel =
|
|
40
|
-
universal_canvas =
|
|
41
|
-
universal_takeover =
|
|
42
|
-
universal_gallery =
|
|
43
|
-
universal_reveal =
|
|
44
|
-
dooh_landscape_static =
|
|
45
|
-
dooh_portrait_video =
|
|
11
|
+
display_300x250 = 'display_300x250'
|
|
12
|
+
display_728x90 = 'display_728x90'
|
|
13
|
+
display_320x50 = 'display_320x50'
|
|
14
|
+
display_160x600 = 'display_160x600'
|
|
15
|
+
display_970x250 = 'display_970x250'
|
|
16
|
+
display_336x280 = 'display_336x280'
|
|
17
|
+
display_expandable_300x250 = 'display_expandable_300x250'
|
|
18
|
+
display_expandable_728x90 = 'display_expandable_728x90'
|
|
19
|
+
display_interstitial_320x480 = 'display_interstitial_320x480'
|
|
20
|
+
display_interstitial_desktop = 'display_interstitial_desktop'
|
|
21
|
+
display_dynamic_300x250 = 'display_dynamic_300x250'
|
|
22
|
+
display_responsive = 'display_responsive'
|
|
23
|
+
native_in_feed = 'native_in_feed'
|
|
24
|
+
native_content_recommendation = 'native_content_recommendation'
|
|
25
|
+
native_product = 'native_product'
|
|
26
|
+
video_skippable_15s = 'video_skippable_15s'
|
|
27
|
+
video_skippable_30s = 'video_skippable_30s'
|
|
28
|
+
video_non_skippable_15s = 'video_non_skippable_15s'
|
|
29
|
+
video_non_skippable_30s = 'video_non_skippable_30s'
|
|
30
|
+
video_outstream_autoplay = 'video_outstream_autoplay'
|
|
31
|
+
video_vertical_story = 'video_vertical_story'
|
|
32
|
+
video_rewarded_30s = 'video_rewarded_30s'
|
|
33
|
+
video_pause_ad = 'video_pause_ad'
|
|
34
|
+
video_ctv_non_skippable_30s = 'video_ctv_non_skippable_30s'
|
|
35
|
+
audio_standard_15s = 'audio_standard_15s'
|
|
36
|
+
audio_standard_30s = 'audio_standard_30s'
|
|
37
|
+
audio_podcast_host_read = 'audio_podcast_host_read'
|
|
38
|
+
audio_programmatic = 'audio_programmatic'
|
|
39
|
+
universal_carousel = 'universal_carousel'
|
|
40
|
+
universal_canvas = 'universal_canvas'
|
|
41
|
+
universal_takeover = 'universal_takeover'
|
|
42
|
+
universal_gallery = 'universal_gallery'
|
|
43
|
+
universal_reveal = 'universal_reveal'
|
|
44
|
+
dooh_landscape_static = 'dooh_landscape_static'
|
|
45
|
+
dooh_portrait_video = 'dooh_portrait_video'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: sub-asset.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,44 +12,44 @@ from pydantic import AnyUrl, ConfigDict, Field
|
|
|
12
12
|
|
|
13
13
|
class SubAsset1(AdCPBaseModel):
|
|
14
14
|
model_config = ConfigDict(
|
|
15
|
-
extra=
|
|
15
|
+
extra='forbid',
|
|
16
16
|
)
|
|
17
17
|
asset_id: Annotated[
|
|
18
|
-
str, Field(description=
|
|
18
|
+
str, Field(description='Unique identifier for the asset within the creative')
|
|
19
19
|
]
|
|
20
20
|
asset_kind: Annotated[
|
|
21
|
-
Literal[
|
|
22
|
-
Field(description=
|
|
21
|
+
Literal['media'],
|
|
22
|
+
Field(description='Discriminator indicating this is a media asset with content_uri'),
|
|
23
23
|
]
|
|
24
24
|
asset_type: Annotated[
|
|
25
25
|
str,
|
|
26
26
|
Field(
|
|
27
|
-
description=
|
|
27
|
+
description='Type of asset. Common types: thumbnail_image, product_image, featured_image, logo'
|
|
28
28
|
),
|
|
29
29
|
]
|
|
30
|
-
content_uri: Annotated[AnyUrl, Field(description=
|
|
30
|
+
content_uri: Annotated[AnyUrl, Field(description='URL for media assets (images, videos, etc.)')]
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class SubAsset2(AdCPBaseModel):
|
|
34
34
|
model_config = ConfigDict(
|
|
35
|
-
extra=
|
|
35
|
+
extra='forbid',
|
|
36
36
|
)
|
|
37
37
|
asset_id: Annotated[
|
|
38
|
-
str, Field(description=
|
|
38
|
+
str, Field(description='Unique identifier for the asset within the creative')
|
|
39
39
|
]
|
|
40
40
|
asset_kind: Annotated[
|
|
41
|
-
Literal[
|
|
42
|
-
Field(description=
|
|
41
|
+
Literal['text'],
|
|
42
|
+
Field(description='Discriminator indicating this is a text asset with content'),
|
|
43
43
|
]
|
|
44
44
|
asset_type: Annotated[
|
|
45
45
|
str,
|
|
46
46
|
Field(
|
|
47
|
-
description=
|
|
47
|
+
description='Type of asset. Common types: headline, body_text, cta_text, price_text, sponsor_name, author_name, click_url'
|
|
48
48
|
),
|
|
49
49
|
]
|
|
50
50
|
content: Annotated[
|
|
51
51
|
str | list[str],
|
|
52
52
|
Field(
|
|
53
|
-
description=
|
|
53
|
+
description='Text content for text-based assets like headlines, body text, CTA text, etc.'
|
|
54
54
|
),
|
|
55
55
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: sync-creatives-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
|
|
|
@@ -15,50 +15,50 @@ from . import push_notification_config as push_notification_config_1
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class ValidationMode(Enum):
|
|
18
|
-
strict =
|
|
19
|
-
lenient =
|
|
18
|
+
strict = 'strict'
|
|
19
|
+
lenient = 'lenient'
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class SyncCreativesRequest(AdCPBaseModel):
|
|
23
23
|
model_config = ConfigDict(
|
|
24
|
-
extra=
|
|
24
|
+
extra='forbid',
|
|
25
25
|
)
|
|
26
26
|
assignments: Annotated[
|
|
27
27
|
dict[str, list[str]] | None,
|
|
28
|
-
Field(description=
|
|
28
|
+
Field(description='Optional bulk assignment of creatives to packages'),
|
|
29
29
|
] = None
|
|
30
30
|
context: Annotated[
|
|
31
31
|
dict[str, Any] | None,
|
|
32
32
|
Field(
|
|
33
|
-
description=
|
|
33
|
+
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.'
|
|
34
34
|
),
|
|
35
35
|
] = None
|
|
36
36
|
creatives: Annotated[
|
|
37
37
|
list[creative_asset.CreativeAsset],
|
|
38
|
-
Field(description=
|
|
38
|
+
Field(description='Array of creative assets to sync (create or update)', max_length=100),
|
|
39
39
|
]
|
|
40
40
|
delete_missing: Annotated[
|
|
41
41
|
bool | None,
|
|
42
42
|
Field(
|
|
43
|
-
description=
|
|
43
|
+
description='When true, creatives not included in this sync will be archived. Use with caution for full library replacement.'
|
|
44
44
|
),
|
|
45
45
|
] = False
|
|
46
46
|
dry_run: Annotated[
|
|
47
47
|
bool | None,
|
|
48
48
|
Field(
|
|
49
|
-
description=
|
|
49
|
+
description='When true, preview changes without applying them. Returns what would be created/updated/deleted.'
|
|
50
50
|
),
|
|
51
51
|
] = False
|
|
52
52
|
patch: Annotated[
|
|
53
53
|
bool | None,
|
|
54
54
|
Field(
|
|
55
|
-
description=
|
|
55
|
+
description='When true, only provided fields are updated (partial update). When false, entire creative is replaced (full upsert).'
|
|
56
56
|
),
|
|
57
57
|
] = False
|
|
58
58
|
push_notification_config: Annotated[
|
|
59
59
|
push_notification_config_1.PushNotificationConfig | None,
|
|
60
60
|
Field(
|
|
61
|
-
description=
|
|
61
|
+
description='Optional webhook configuration for async sync notifications. Publisher will send webhook when sync completes if operation takes longer than immediate response time (typically for large bulk operations or manual approval/HITL).'
|
|
62
62
|
),
|
|
63
63
|
] = None
|
|
64
64
|
validation_mode: Annotated[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: sync-creatives-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,35 +14,35 @@ from . import error
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class Action(Enum):
|
|
17
|
-
created =
|
|
18
|
-
updated =
|
|
19
|
-
unchanged =
|
|
20
|
-
failed =
|
|
21
|
-
deleted =
|
|
17
|
+
created = 'created'
|
|
18
|
+
updated = 'updated'
|
|
19
|
+
unchanged = 'unchanged'
|
|
20
|
+
failed = 'failed'
|
|
21
|
+
deleted = 'deleted'
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class Creative(AdCPBaseModel):
|
|
25
25
|
model_config = ConfigDict(
|
|
26
|
-
extra=
|
|
26
|
+
extra='forbid',
|
|
27
27
|
)
|
|
28
|
-
action: Annotated[Action, Field(description=
|
|
28
|
+
action: Annotated[Action, Field(description='Action taken for this creative')]
|
|
29
29
|
assigned_to: Annotated[
|
|
30
30
|
list[str] | None,
|
|
31
31
|
Field(
|
|
32
|
-
description=
|
|
32
|
+
description='Package IDs this creative was successfully assigned to (only present when assignments were requested)'
|
|
33
33
|
),
|
|
34
34
|
] = None
|
|
35
35
|
assignment_errors: Annotated[
|
|
36
36
|
dict[str, str] | None,
|
|
37
37
|
Field(
|
|
38
|
-
description=
|
|
38
|
+
description='Assignment errors by package ID (only present when assignment failures occurred)'
|
|
39
39
|
),
|
|
40
40
|
] = None
|
|
41
41
|
changes: Annotated[
|
|
42
42
|
list[str] | None,
|
|
43
43
|
Field(description="Field names that were modified (only present when action='updated')"),
|
|
44
44
|
] = None
|
|
45
|
-
creative_id: Annotated[str, Field(description=
|
|
45
|
+
creative_id: Annotated[str, Field(description='Creative ID from the request')]
|
|
46
46
|
errors: Annotated[
|
|
47
47
|
list[str] | None,
|
|
48
48
|
Field(description="Validation or processing errors (only present when action='failed')"),
|
|
@@ -50,31 +50,31 @@ class Creative(AdCPBaseModel):
|
|
|
50
50
|
expires_at: Annotated[
|
|
51
51
|
AwareDatetime | None,
|
|
52
52
|
Field(
|
|
53
|
-
description=
|
|
53
|
+
description='ISO 8601 timestamp when preview link expires (only present when preview_url exists)'
|
|
54
54
|
),
|
|
55
55
|
] = None
|
|
56
56
|
platform_id: Annotated[
|
|
57
|
-
str | None, Field(description=
|
|
57
|
+
str | None, Field(description='Platform-specific ID assigned to the creative')
|
|
58
58
|
] = None
|
|
59
59
|
preview_url: Annotated[
|
|
60
60
|
AnyUrl | None,
|
|
61
61
|
Field(
|
|
62
|
-
description=
|
|
62
|
+
description='Preview URL for generative creatives (only present for generative formats)'
|
|
63
63
|
),
|
|
64
64
|
] = None
|
|
65
65
|
warnings: Annotated[
|
|
66
|
-
list[str] | None, Field(description=
|
|
66
|
+
list[str] | None, Field(description='Non-fatal warnings about this creative')
|
|
67
67
|
] = None
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
class SyncCreativesResponse1(AdCPBaseModel):
|
|
71
71
|
model_config = ConfigDict(
|
|
72
|
-
extra=
|
|
72
|
+
extra='forbid',
|
|
73
73
|
)
|
|
74
74
|
context: Annotated[
|
|
75
75
|
dict[str, Any] | None,
|
|
76
76
|
Field(
|
|
77
|
-
description=
|
|
77
|
+
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
78
78
|
),
|
|
79
79
|
] = None
|
|
80
80
|
creatives: Annotated[
|
|
@@ -84,24 +84,24 @@ class SyncCreativesResponse1(AdCPBaseModel):
|
|
|
84
84
|
),
|
|
85
85
|
]
|
|
86
86
|
dry_run: Annotated[
|
|
87
|
-
bool | None, Field(description=
|
|
87
|
+
bool | None, Field(description='Whether this was a dry run (no actual changes made)')
|
|
88
88
|
] = None
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
class SyncCreativesResponse2(AdCPBaseModel):
|
|
92
92
|
model_config = ConfigDict(
|
|
93
|
-
extra=
|
|
93
|
+
extra='forbid',
|
|
94
94
|
)
|
|
95
95
|
context: Annotated[
|
|
96
96
|
dict[str, Any] | None,
|
|
97
97
|
Field(
|
|
98
|
-
description=
|
|
98
|
+
description='Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers.'
|
|
99
99
|
),
|
|
100
100
|
] = None
|
|
101
101
|
errors: Annotated[
|
|
102
102
|
list[error.Error],
|
|
103
103
|
Field(
|
|
104
|
-
description=
|
|
104
|
+
description='Operation-level errors that prevented processing any creatives (e.g., authentication failure, service unavailable, invalid request format)',
|
|
105
105
|
min_length=1,
|
|
106
106
|
),
|
|
107
107
|
]
|
|
@@ -111,7 +111,7 @@ class SyncCreativesResponse(RootModel[SyncCreativesResponse1 | SyncCreativesResp
|
|
|
111
111
|
root: Annotated[
|
|
112
112
|
SyncCreativesResponse1 | SyncCreativesResponse2,
|
|
113
113
|
Field(
|
|
114
|
-
description=
|
|
115
|
-
title=
|
|
114
|
+
description='Response from creative sync operation. Returns either per-creative results (best-effort processing) OR operation-level errors (complete failure). This enforces atomic semantics at the operation level while allowing per-item failures within successful operations.',
|
|
115
|
+
title='Sync Creatives Response',
|
|
116
116
|
),
|
|
117
117
|
]
|