adcp 1.6.0__py3-none-any.whl → 2.0.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.
Files changed (116) hide show
  1. adcp/__init__.py +19 -221
  2. adcp/adagents.py +11 -12
  3. adcp/client.py +16 -11
  4. adcp/types/generated.py +540 -1129
  5. adcp/types/generated_poc/__init__.py +3 -0
  6. adcp/types/generated_poc/activate_signal_request.py +34 -0
  7. adcp/types/generated_poc/activate_signal_response.py +57 -0
  8. adcp/types/generated_poc/activation_key.py +30 -0
  9. adcp/types/generated_poc/adagents.py +266 -0
  10. adcp/types/generated_poc/asset_type.py +100 -0
  11. adcp/types/generated_poc/audio_asset.py +26 -0
  12. adcp/types/generated_poc/brand_manifest.py +260 -0
  13. adcp/types/generated_poc/brand_manifest_ref.py +361 -0
  14. adcp/types/generated_poc/build_creative_request.py +43 -0
  15. adcp/types/generated_poc/build_creative_response.py +57 -0
  16. adcp/types/generated_poc/channels.py +19 -0
  17. adcp/types/generated_poc/cpc_option.py +39 -0
  18. adcp/types/generated_poc/cpcv_option.py +41 -0
  19. adcp/types/generated_poc/cpm_auction_option.py +54 -0
  20. adcp/types/generated_poc/cpm_fixed_option.py +39 -0
  21. adcp/types/generated_poc/cpp_option.py +60 -0
  22. adcp/types/generated_poc/cpv_option.py +73 -0
  23. adcp/types/generated_poc/create_media_buy_request.py +96 -0
  24. adcp/types/generated_poc/create_media_buy_response.py +66 -0
  25. adcp/types/generated_poc/creative_asset.py +83 -0
  26. adcp/types/generated_poc/creative_assignment.py +27 -0
  27. adcp/types/generated_poc/creative_manifest.py +61 -0
  28. adcp/types/generated_poc/creative_policy.py +34 -0
  29. adcp/types/generated_poc/creative_status.py +14 -0
  30. adcp/types/generated_poc/css_asset.py +20 -0
  31. adcp/types/generated_poc/daast_asset.py +76 -0
  32. adcp/types/generated_poc/delivery_metrics.py +111 -0
  33. adcp/types/generated_poc/delivery_type.py +12 -0
  34. adcp/types/generated_poc/deployment.py +78 -0
  35. adcp/types/generated_poc/destination.py +43 -0
  36. adcp/types/generated_poc/error.py +29 -0
  37. adcp/types/generated_poc/flat_rate_option.py +93 -0
  38. adcp/types/generated_poc/format.py +260 -0
  39. adcp/types/generated_poc/format_id.py +29 -0
  40. adcp/types/generated_poc/frequency_cap.py +19 -0
  41. adcp/types/generated_poc/frequency_cap_scope.py +16 -0
  42. adcp/types/generated_poc/get_media_buy_delivery_request.py +65 -0
  43. adcp/types/generated_poc/get_media_buy_delivery_response.py +220 -0
  44. adcp/types/generated_poc/get_products_request.py +83 -0
  45. adcp/types/generated_poc/get_products_response.py +29 -0
  46. adcp/types/generated_poc/get_signals_request.py +77 -0
  47. adcp/types/generated_poc/get_signals_response.py +65 -0
  48. adcp/types/generated_poc/html_asset.py +18 -0
  49. adcp/types/generated_poc/identifier_types.py +29 -0
  50. adcp/types/generated_poc/image_asset.py +23 -0
  51. adcp/types/generated_poc/index.py +17 -0
  52. adcp/types/generated_poc/javascript_asset.py +25 -0
  53. adcp/types/generated_poc/list_authorized_properties_request.py +39 -0
  54. adcp/types/generated_poc/list_authorized_properties_response.py +85 -0
  55. adcp/types/generated_poc/list_creative_formats_request.py +93 -0
  56. adcp/types/generated_poc/list_creative_formats_response.py +63 -0
  57. adcp/types/generated_poc/list_creatives_request.py +154 -0
  58. adcp/types/generated_poc/list_creatives_response.py +234 -0
  59. adcp/types/generated_poc/markdown_asset.py +43 -0
  60. adcp/types/generated_poc/measurement.py +40 -0
  61. adcp/types/generated_poc/media_buy.py +37 -0
  62. adcp/types/generated_poc/media_buy_status.py +14 -0
  63. adcp/types/generated_poc/pacing.py +13 -0
  64. adcp/types/generated_poc/package.py +61 -0
  65. adcp/types/generated_poc/package_request.py +61 -0
  66. adcp/types/generated_poc/package_status.py +14 -0
  67. adcp/types/generated_poc/performance_feedback.py +89 -0
  68. adcp/types/generated_poc/placement.py +37 -0
  69. adcp/types/generated_poc/preview_creative_request.py +163 -0
  70. adcp/types/generated_poc/preview_creative_response.py +175 -0
  71. adcp/types/generated_poc/preview_render.py +144 -0
  72. adcp/types/generated_poc/pricing_model.py +17 -0
  73. adcp/types/generated_poc/pricing_option.py +365 -0
  74. adcp/types/generated_poc/product.py +211 -0
  75. adcp/types/generated_poc/promoted_offerings.py +102 -0
  76. adcp/types/generated_poc/promoted_products.py +38 -0
  77. adcp/types/generated_poc/property.py +79 -0
  78. adcp/types/generated_poc/protocol_envelope.py +61 -0
  79. adcp/types/generated_poc/provide_performance_feedback_request.py +85 -0
  80. adcp/types/generated_poc/provide_performance_feedback_response.py +59 -0
  81. adcp/types/generated_poc/publisher_identifier_types.py +15 -0
  82. adcp/types/generated_poc/push_notification_config.py +55 -0
  83. adcp/types/generated_poc/reporting_capabilities.py +68 -0
  84. adcp/types/generated_poc/response.py +24 -0
  85. adcp/types/generated_poc/standard_format_ids.py +45 -0
  86. adcp/types/generated_poc/start_timing.py +13 -0
  87. adcp/types/generated_poc/sub_asset.py +55 -0
  88. adcp/types/generated_poc/sync_creatives_request.py +69 -0
  89. adcp/types/generated_poc/sync_creatives_response.py +117 -0
  90. adcp/types/generated_poc/targeting.py +53 -0
  91. adcp/types/generated_poc/task_status.py +19 -0
  92. adcp/types/generated_poc/task_type.py +15 -0
  93. adcp/types/generated_poc/tasks_get_request.py +29 -0
  94. adcp/types/generated_poc/tasks_get_response.py +112 -0
  95. adcp/types/generated_poc/tasks_list_request.py +121 -0
  96. adcp/types/generated_poc/tasks_list_response.py +122 -0
  97. adcp/types/generated_poc/text_asset.py +20 -0
  98. adcp/types/generated_poc/update_media_buy_request.py +160 -0
  99. adcp/types/generated_poc/update_media_buy_response.py +67 -0
  100. adcp/types/generated_poc/url_asset.py +33 -0
  101. adcp/types/generated_poc/vast_asset.py +86 -0
  102. adcp/types/generated_poc/vcpm_auction_option.py +57 -0
  103. adcp/types/generated_poc/vcpm_fixed_option.py +43 -0
  104. adcp/types/generated_poc/video_asset.py +28 -0
  105. adcp/types/generated_poc/webhook_asset.py +65 -0
  106. adcp/types/generated_poc/webhook_payload.py +102 -0
  107. adcp/utils/preview_cache.py +57 -39
  108. adcp/validation.py +172 -0
  109. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/METADATA +3 -1
  110. adcp-2.0.0.dist-info/RECORD +130 -0
  111. adcp/types/tasks.py +0 -511
  112. adcp-1.6.0.dist-info/RECORD +0 -28
  113. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/WHEEL +0 -0
  114. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/entry_points.txt +0 -0
  115. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/licenses/LICENSE +0 -0
  116. {adcp-1.6.0.dist-info → adcp-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,38 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: promoted-products.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import ConfigDict, Field
11
+
12
+
13
+ class PromotedProducts(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ manifest_category: Annotated[
18
+ str | None,
19
+ Field(
20
+ description="Select products from a specific category in the brand manifest product catalog (e.g., 'beverages/soft-drinks', 'food/sauces')"
21
+ ),
22
+ ] = None
23
+ manifest_query: Annotated[
24
+ str | None,
25
+ Field(
26
+ description="Natural language query to select products from the brand manifest (e.g., 'all Kraft Heinz pasta sauces', 'organic products under $20')"
27
+ ),
28
+ ] = None
29
+ manifest_skus: Annotated[
30
+ list[str] | None,
31
+ Field(description="Direct product SKU references from the brand manifest product catalog"),
32
+ ] = None
33
+ manifest_tags: Annotated[
34
+ list[str] | None,
35
+ Field(
36
+ description="Select products by tags from the brand manifest product catalog (e.g., 'organic', 'sauces', 'holiday')"
37
+ ),
38
+ ] = None
@@ -0,0 +1,79 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: property.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Annotated
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import ConfigDict, Field, RootModel
12
+
13
+ from . import identifier_types
14
+
15
+
16
+ class Identifier(AdCPBaseModel):
17
+ model_config = ConfigDict(
18
+ extra="forbid",
19
+ )
20
+ type: Annotated[
21
+ identifier_types.PropertyIdentifierTypes,
22
+ Field(description="Type of identifier for this property"),
23
+ ]
24
+ value: Annotated[
25
+ str,
26
+ Field(
27
+ description="The identifier value. For domain type: 'example.com' matches base domain plus www and m subdomains; 'edition.example.com' matches that specific subdomain; '*.example.com' matches ALL subdomains but NOT base domain"
28
+ ),
29
+ ]
30
+
31
+
32
+ class PropertyType(Enum):
33
+ website = "website"
34
+ mobile_app = "mobile_app"
35
+ ctv_app = "ctv_app"
36
+ dooh = "dooh"
37
+ podcast = "podcast"
38
+ radio = "radio"
39
+ streaming_audio = "streaming_audio"
40
+
41
+
42
+ class Tag(RootModel[str]):
43
+ root: Annotated[
44
+ str,
45
+ Field(
46
+ description="Lowercase tag with underscores (e.g., 'conde_nast_network', 'premium_content')",
47
+ pattern="^[a-z0-9_]+$",
48
+ ),
49
+ ]
50
+
51
+
52
+ class Property(AdCPBaseModel):
53
+ model_config = ConfigDict(
54
+ extra="forbid",
55
+ )
56
+ identifiers: Annotated[
57
+ list[Identifier], Field(description="Array of identifiers for this property", min_length=1)
58
+ ]
59
+ name: Annotated[str, Field(description="Human-readable property name")]
60
+ property_id: Annotated[
61
+ str | None,
62
+ Field(
63
+ description="Unique identifier for this property (optional). Enables referencing properties by ID instead of repeating full objects. Recommended format: lowercase with underscores (e.g., 'cnn_ctv_app', 'instagram_mobile')",
64
+ pattern="^[a-z0-9_]+$",
65
+ ),
66
+ ] = None
67
+ property_type: Annotated[PropertyType, Field(description="Type of advertising property")]
68
+ publisher_domain: Annotated[
69
+ str | None,
70
+ Field(
71
+ description="Domain where adagents.json should be checked for authorization validation. Required for list_authorized_properties response. Optional in adagents.json (file location implies domain)."
72
+ ),
73
+ ] = None
74
+ tags: Annotated[
75
+ list[Tag] | None,
76
+ Field(
77
+ description="Tags for categorization and grouping (e.g., network membership, content categories)"
78
+ ),
79
+ ] = None
@@ -0,0 +1,61 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: protocol-envelope.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated, Any
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import AwareDatetime, ConfigDict, Field
11
+
12
+ from . import push_notification_config as push_notification_config_1
13
+ from . import task_status
14
+
15
+
16
+ class ProtocolEnvelope(AdCPBaseModel):
17
+ model_config = ConfigDict(
18
+ extra="forbid",
19
+ )
20
+ context_id: Annotated[
21
+ str | None,
22
+ Field(
23
+ description="Session/conversation identifier for tracking related operations across multiple task invocations. Managed by the protocol layer to maintain conversational context."
24
+ ),
25
+ ] = None
26
+ message: Annotated[
27
+ str | None,
28
+ Field(
29
+ description="Human-readable summary of the task result. Provides natural language explanation of what happened, suitable for display to end users or for AI agent comprehension. Generated by the protocol layer based on the task response."
30
+ ),
31
+ ] = None
32
+ payload: Annotated[
33
+ dict[str, Any],
34
+ Field(
35
+ description="The actual task-specific response data. This is the content defined in individual task response schemas (e.g., get-products-response.json, create-media-buy-response.json). Contains only domain-specific data without protocol-level fields."
36
+ ),
37
+ ]
38
+ push_notification_config: Annotated[
39
+ push_notification_config_1.PushNotificationConfig | None,
40
+ Field(
41
+ description="Push notification configuration for async task updates (A2A and REST protocols). Echoed from the request to confirm webhook settings. Specifies URL, authentication scheme (Bearer or HMAC-SHA256), and credentials. MCP uses progress notifications instead of webhooks."
42
+ ),
43
+ ] = None
44
+ status: Annotated[
45
+ task_status.TaskStatus,
46
+ Field(
47
+ description="Current task execution state. Indicates whether the task is completed, in progress (working), submitted for async processing, failed, or requires user input. Managed by the protocol layer."
48
+ ),
49
+ ]
50
+ task_id: Annotated[
51
+ str | None,
52
+ Field(
53
+ description="Unique identifier for tracking asynchronous operations. Present when a task requires extended processing time. Used to query task status and retrieve results when complete."
54
+ ),
55
+ ] = None
56
+ timestamp: Annotated[
57
+ AwareDatetime | None,
58
+ Field(
59
+ description="ISO 8601 timestamp when the response was generated. Useful for debugging, logging, cache validation, and tracking async operation progress."
60
+ ),
61
+ ] = None
@@ -0,0 +1,85 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: provide-performance-feedback-request.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Annotated, Any
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import AwareDatetime, ConfigDict, Field
12
+
13
+
14
+ class FeedbackSource(Enum):
15
+ buyer_attribution = "buyer_attribution"
16
+ third_party_measurement = "third_party_measurement"
17
+ platform_analytics = "platform_analytics"
18
+ verification_partner = "verification_partner"
19
+
20
+
21
+ class MeasurementPeriod(AdCPBaseModel):
22
+ model_config = ConfigDict(
23
+ extra="forbid",
24
+ )
25
+ end: Annotated[
26
+ AwareDatetime, Field(description="ISO 8601 end timestamp for measurement period")
27
+ ]
28
+ start: Annotated[
29
+ AwareDatetime, Field(description="ISO 8601 start timestamp for measurement period")
30
+ ]
31
+
32
+
33
+ class MetricType(Enum):
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
+
43
+
44
+ class ProvidePerformanceFeedbackRequest(AdCPBaseModel):
45
+ model_config = ConfigDict(
46
+ extra="forbid",
47
+ )
48
+ context: Annotated[
49
+ dict[str, Any] | None,
50
+ Field(
51
+ description="Initiator-provided context included in the request payload. Agentsmust echo this value back unchanged in responses and webhooks. Use for UI/session hints, correlation tokens, or tracking metadata."
52
+ ),
53
+ ] = None
54
+ creative_id: Annotated[
55
+ str | None,
56
+ Field(
57
+ description="Specific creative asset (if feedback is creative-specific)", min_length=1
58
+ ),
59
+ ] = None
60
+ feedback_source: Annotated[
61
+ FeedbackSource | None, Field(description="Source of the performance data")
62
+ ] = FeedbackSource.buyer_attribution
63
+ measurement_period: Annotated[
64
+ MeasurementPeriod, Field(description="Time period for performance measurement")
65
+ ]
66
+ media_buy_id: Annotated[
67
+ str, Field(description="Publisher's media buy identifier", min_length=1)
68
+ ]
69
+ metric_type: Annotated[
70
+ MetricType | None, Field(description="The business metric being measured")
71
+ ] = MetricType.overall_performance
72
+ package_id: Annotated[
73
+ str | None,
74
+ Field(
75
+ description="Specific package within the media buy (if feedback is package-specific)",
76
+ min_length=1,
77
+ ),
78
+ ] = None
79
+ performance_index: Annotated[
80
+ float,
81
+ Field(
82
+ description="Normalized performance score (0.0 = no value, 1.0 = expected, >1.0 = above expected)",
83
+ ge=0.0,
84
+ ),
85
+ ]
@@ -0,0 +1,59 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: provide-performance-feedback-response.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated, Any, Literal
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import ConfigDict, Field, RootModel
11
+
12
+ from . import error
13
+
14
+
15
+ class ProvidePerformanceFeedbackResponse1(AdCPBaseModel):
16
+ model_config = ConfigDict(
17
+ extra="forbid",
18
+ )
19
+ context: Annotated[
20
+ dict[str, Any] | None,
21
+ Field(
22
+ description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
23
+ ),
24
+ ] = None
25
+ success: Annotated[
26
+ Literal[True],
27
+ Field(description="Whether the performance feedback was successfully received"),
28
+ ]
29
+
30
+
31
+ class ProvidePerformanceFeedbackResponse2(AdCPBaseModel):
32
+ model_config = ConfigDict(
33
+ extra="forbid",
34
+ )
35
+ context: Annotated[
36
+ dict[str, Any] | None,
37
+ Field(
38
+ description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
39
+ ),
40
+ ] = None
41
+ errors: Annotated[
42
+ list[error.Error],
43
+ Field(
44
+ description="Array of errors explaining why feedback was rejected (e.g., invalid measurement period, missing campaign data)",
45
+ min_length=1,
46
+ ),
47
+ ]
48
+
49
+
50
+ class ProvidePerformanceFeedbackResponse(
51
+ RootModel[ProvidePerformanceFeedbackResponse1 | ProvidePerformanceFeedbackResponse2]
52
+ ):
53
+ root: Annotated[
54
+ ProvidePerformanceFeedbackResponse1 | ProvidePerformanceFeedbackResponse2,
55
+ Field(
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
+ ),
59
+ ]
@@ -0,0 +1,15 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: publisher-identifier-types.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+
9
+
10
+ class PublisherIdentifierTypes(Enum):
11
+ tag_id = "tag_id"
12
+ duns = "duns"
13
+ lei = "lei"
14
+ seller_id = "seller_id"
15
+ gln = "gln"
@@ -0,0 +1,55 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: push-notification-config.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Annotated
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import AnyUrl, ConfigDict, Field
12
+
13
+
14
+ class Scheme(Enum):
15
+ Bearer = "Bearer"
16
+ HMAC_SHA256 = "HMAC-SHA256"
17
+
18
+
19
+ class Authentication(AdCPBaseModel):
20
+ model_config = ConfigDict(
21
+ extra="forbid",
22
+ )
23
+ credentials: Annotated[
24
+ str,
25
+ Field(
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
+ min_length=32,
28
+ ),
29
+ ]
30
+ schemes: Annotated[
31
+ list[Scheme],
32
+ Field(
33
+ description="Array of authentication schemes. Supported: ['Bearer'] for simple token auth, ['HMAC-SHA256'] for signature verification (recommended for production)",
34
+ max_length=1,
35
+ min_length=1,
36
+ ),
37
+ ]
38
+
39
+
40
+ class PushNotificationConfig(AdCPBaseModel):
41
+ model_config = ConfigDict(
42
+ extra="forbid",
43
+ )
44
+ authentication: Annotated[
45
+ Authentication,
46
+ Field(description="Authentication configuration for webhook delivery (A2A-compatible)"),
47
+ ]
48
+ token: Annotated[
49
+ str | None,
50
+ Field(
51
+ description="Optional client-provided token for webhook validation. Echoed back in webhook payload to validate request authenticity.",
52
+ min_length=16,
53
+ ),
54
+ ] = None
55
+ url: Annotated[AnyUrl, Field(description="Webhook endpoint URL for task status notifications")]
@@ -0,0 +1,68 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: reporting-capabilities.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Annotated
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import ConfigDict, Field
12
+
13
+
14
+ class AvailableMetric(Enum):
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
+
25
+
26
+ class AvailableReportingFrequency(Enum):
27
+ hourly = "hourly"
28
+ daily = "daily"
29
+ monthly = "monthly"
30
+
31
+
32
+ class ReportingCapabilities(AdCPBaseModel):
33
+ model_config = ConfigDict(
34
+ extra="forbid",
35
+ )
36
+ available_metrics: Annotated[
37
+ list[AvailableMetric],
38
+ Field(
39
+ description="Metrics available in reporting. Impressions and spend are always implicitly included.",
40
+ examples=[
41
+ ["impressions", "spend", "clicks", "video_completions"],
42
+ ["impressions", "spend", "conversions"],
43
+ ],
44
+ ),
45
+ ]
46
+ available_reporting_frequencies: Annotated[
47
+ list[AvailableReportingFrequency],
48
+ Field(description="Supported reporting frequency options", min_length=1),
49
+ ]
50
+ expected_delay_minutes: Annotated[
51
+ int,
52
+ Field(
53
+ description="Expected delay in minutes before reporting data becomes available (e.g., 240 for 4-hour delay)",
54
+ examples=[240, 300, 1440],
55
+ ge=0,
56
+ ),
57
+ ]
58
+ supports_webhooks: Annotated[
59
+ bool,
60
+ Field(description="Whether this product supports webhook-based reporting notifications"),
61
+ ]
62
+ timezone: Annotated[
63
+ str,
64
+ Field(
65
+ description="Timezone for reporting periods. Use 'UTC' or IANA timezone (e.g., 'America/New_York'). Critical for daily/monthly frequency alignment.",
66
+ examples=["UTC", "America/New_York", "Europe/London", "America/Los_Angeles"],
67
+ ),
68
+ ]
@@ -0,0 +1,24 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: response.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated, Any
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import ConfigDict, Field
11
+
12
+
13
+ class ProtocolResponse(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ context_id: Annotated[str | None, Field(description="Session continuity identifier")] = None
18
+ data: Annotated[
19
+ Any | None,
20
+ Field(
21
+ description="AdCP task-specific response data (see individual task response schemas)"
22
+ ),
23
+ ] = None
24
+ message: Annotated[str, Field(description="Human-readable summary")]
@@ -0,0 +1,45 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: standard-format-ids.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+
9
+
10
+ class StandardFormatIds(Enum):
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"
@@ -0,0 +1,13 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: start-timing.json
3
+ # timestamp: 2025-11-15T17:41:18+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from pydantic import AwareDatetime, Field, RootModel
8
+
9
+
10
+ class StartTiming(RootModel[str | AwareDatetime]):
11
+ root: str | AwareDatetime = Field(
12
+ ..., description="Campaign start timing: 'asap' or ISO 8601 date-time", title="Start Timing"
13
+ )
@@ -0,0 +1,55 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: sub-asset.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated, Literal
8
+
9
+ from adcp.types.base import AdCPBaseModel
10
+ from pydantic import AnyUrl, ConfigDict, Field
11
+
12
+
13
+ class SubAsset1(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ asset_id: Annotated[
18
+ str, Field(description="Unique identifier for the asset within the creative")
19
+ ]
20
+ asset_kind: Annotated[
21
+ Literal["media"],
22
+ Field(description="Discriminator indicating this is a media asset with content_uri"),
23
+ ]
24
+ asset_type: Annotated[
25
+ str,
26
+ Field(
27
+ description="Type of asset. Common types: thumbnail_image, product_image, featured_image, logo"
28
+ ),
29
+ ]
30
+ content_uri: Annotated[AnyUrl, Field(description="URL for media assets (images, videos, etc.)")]
31
+
32
+
33
+ class SubAsset2(AdCPBaseModel):
34
+ model_config = ConfigDict(
35
+ extra="forbid",
36
+ )
37
+ asset_id: Annotated[
38
+ str, Field(description="Unique identifier for the asset within the creative")
39
+ ]
40
+ asset_kind: Annotated[
41
+ Literal["text"],
42
+ Field(description="Discriminator indicating this is a text asset with content"),
43
+ ]
44
+ asset_type: Annotated[
45
+ str,
46
+ Field(
47
+ description="Type of asset. Common types: headline, body_text, cta_text, price_text, sponsor_name, author_name, click_url"
48
+ ),
49
+ ]
50
+ content: Annotated[
51
+ str | list[str],
52
+ Field(
53
+ description="Text content for text-based assets like headlines, body text, CTA text, etc."
54
+ ),
55
+ ]
@@ -0,0 +1,69 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: sync-creatives-request.json
3
+ # timestamp: 2025-11-15T22:03:55+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Annotated, Any
9
+
10
+ from adcp.types.base import AdCPBaseModel
11
+ from pydantic import ConfigDict, Field
12
+
13
+ from . import creative_asset
14
+ from . import push_notification_config as push_notification_config_1
15
+
16
+
17
+ class ValidationMode(Enum):
18
+ strict = "strict"
19
+ lenient = "lenient"
20
+
21
+
22
+ class SyncCreativesRequest(AdCPBaseModel):
23
+ model_config = ConfigDict(
24
+ extra="forbid",
25
+ )
26
+ assignments: Annotated[
27
+ dict[str, list[str]] | None,
28
+ Field(description="Optional bulk assignment of creatives to packages"),
29
+ ] = None
30
+ context: Annotated[
31
+ dict[str, Any] | None,
32
+ Field(
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
+ ),
35
+ ] = None
36
+ creatives: Annotated[
37
+ list[creative_asset.CreativeAsset],
38
+ Field(description="Array of creative assets to sync (create or update)", max_length=100),
39
+ ]
40
+ delete_missing: Annotated[
41
+ bool | None,
42
+ Field(
43
+ description="When true, creatives not included in this sync will be archived. Use with caution for full library replacement."
44
+ ),
45
+ ] = False
46
+ dry_run: Annotated[
47
+ bool | None,
48
+ Field(
49
+ description="When true, preview changes without applying them. Returns what would be created/updated/deleted."
50
+ ),
51
+ ] = False
52
+ patch: Annotated[
53
+ bool | None,
54
+ Field(
55
+ description="When true, only provided fields are updated (partial update). When false, entire creative is replaced (full upsert)."
56
+ ),
57
+ ] = False
58
+ push_notification_config: Annotated[
59
+ push_notification_config_1.PushNotificationConfig | None,
60
+ Field(
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
+ ),
63
+ ] = None
64
+ validation_mode: Annotated[
65
+ ValidationMode | None,
66
+ Field(
67
+ description="Validation strictness. 'strict' fails entire sync on any validation error. 'lenient' processes valid creatives and reports errors."
68
+ ),
69
+ ] = ValidationMode.strict