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,57 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: build-creative-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, RootModel
11
+
12
+ from . import creative_manifest as creative_manifest_1
13
+ from . import error
14
+
15
+
16
+ class BuildCreativeResponse2(AdCPBaseModel):
17
+ model_config = ConfigDict(
18
+ extra="forbid",
19
+ )
20
+ context: Annotated[
21
+ dict[str, Any] | None,
22
+ Field(
23
+ description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
24
+ ),
25
+ ] = None
26
+ errors: Annotated[
27
+ list[error.Error],
28
+ Field(
29
+ description="Array of errors explaining why creative generation failed", min_length=1
30
+ ),
31
+ ]
32
+
33
+
34
+ class BuildCreativeResponse1(AdCPBaseModel):
35
+ model_config = ConfigDict(
36
+ extra="forbid",
37
+ )
38
+ context: Annotated[
39
+ dict[str, Any] | None,
40
+ Field(
41
+ description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
42
+ ),
43
+ ] = None
44
+ creative_manifest: Annotated[
45
+ creative_manifest_1.CreativeManifest,
46
+ Field(description="The generated or transformed creative manifest"),
47
+ ]
48
+
49
+
50
+ class BuildCreativeResponse(RootModel[BuildCreativeResponse1 | BuildCreativeResponse2]):
51
+ root: Annotated[
52
+ BuildCreativeResponse1 | BuildCreativeResponse2,
53
+ Field(
54
+ description="Response containing the transformed or generated creative manifest, ready for use with preview_creative or sync_creatives. Returns either the complete creative manifest OR error information, never both.",
55
+ title="Build Creative Response",
56
+ ),
57
+ ]
@@ -0,0 +1,19 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: channels.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 AdvertisingChannels(Enum):
11
+ display = "display"
12
+ video = "video"
13
+ audio = "audio"
14
+ native = "native"
15
+ dooh = "dooh"
16
+ ctv = "ctv"
17
+ podcast = "podcast"
18
+ retail = "retail"
19
+ social = "social"
@@ -0,0 +1,39 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: cpc-option.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 ConfigDict, Field
11
+
12
+
13
+ class CpcPricingOption(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ currency: Annotated[
18
+ str,
19
+ Field(
20
+ description="ISO 4217 currency code",
21
+ examples=["USD", "EUR", "GBP", "JPY"],
22
+ pattern="^[A-Z]{3}$",
23
+ ),
24
+ ]
25
+ min_spend_per_package: Annotated[
26
+ float | None,
27
+ Field(
28
+ description="Minimum spend requirement per package using this pricing option, in the specified currency",
29
+ ge=0.0,
30
+ ),
31
+ ] = None
32
+ pricing_model: Annotated[Literal["cpc"], Field(description="Cost per click")]
33
+ pricing_option_id: Annotated[
34
+ str,
35
+ Field(
36
+ description="Unique identifier for this pricing option within the product (e.g., 'cpc_usd_fixed')"
37
+ ),
38
+ ]
39
+ rate: Annotated[float, Field(description="Fixed CPC rate (cost per click)", ge=0.0)]
@@ -0,0 +1,41 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: cpcv-option.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 ConfigDict, Field
11
+
12
+
13
+ class CpcvPricingOption(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ currency: Annotated[
18
+ str,
19
+ Field(
20
+ description="ISO 4217 currency code",
21
+ examples=["USD", "EUR", "GBP", "JPY"],
22
+ pattern="^[A-Z]{3}$",
23
+ ),
24
+ ]
25
+ min_spend_per_package: Annotated[
26
+ float | None,
27
+ Field(
28
+ description="Minimum spend requirement per package using this pricing option, in the specified currency",
29
+ ge=0.0,
30
+ ),
31
+ ] = None
32
+ pricing_model: Annotated[
33
+ Literal["cpcv"], Field(description="Cost per completed view (100% completion)")
34
+ ]
35
+ pricing_option_id: Annotated[
36
+ str,
37
+ Field(
38
+ description="Unique identifier for this pricing option within the product (e.g., 'cpcv_usd_guaranteed')"
39
+ ),
40
+ ]
41
+ rate: Annotated[float, Field(description="Fixed CPCV rate (cost per 100% completion)", ge=0.0)]
@@ -0,0 +1,54 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: cpm-auction-option.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 ConfigDict, Field
11
+
12
+
13
+ class PriceGuidance(AdCPBaseModel):
14
+ floor: Annotated[
15
+ float,
16
+ Field(
17
+ description="Minimum bid price - publisher will reject bids under this value", ge=0.0
18
+ ),
19
+ ]
20
+ p25: Annotated[float | None, Field(description="25th percentile winning price", ge=0.0)] = None
21
+ p50: Annotated[float | None, Field(description="Median winning price", ge=0.0)] = None
22
+ p75: Annotated[float | None, Field(description="75th percentile winning price", ge=0.0)] = None
23
+ p90: Annotated[float | None, Field(description="90th percentile winning price", ge=0.0)] = None
24
+
25
+
26
+ class CpmAuctionPricingOption(AdCPBaseModel):
27
+ model_config = ConfigDict(
28
+ extra="forbid",
29
+ )
30
+ currency: Annotated[
31
+ str,
32
+ Field(
33
+ description="ISO 4217 currency code",
34
+ examples=["USD", "EUR", "GBP", "JPY"],
35
+ pattern="^[A-Z]{3}$",
36
+ ),
37
+ ]
38
+ min_spend_per_package: Annotated[
39
+ float | None,
40
+ Field(
41
+ description="Minimum spend requirement per package using this pricing option, in the specified currency",
42
+ ge=0.0,
43
+ ),
44
+ ] = None
45
+ price_guidance: Annotated[
46
+ PriceGuidance, Field(description="Pricing guidance for auction-based CPM bidding")
47
+ ]
48
+ pricing_model: Annotated[Literal["cpm"], Field(description="Cost per 1,000 impressions")]
49
+ pricing_option_id: Annotated[
50
+ str,
51
+ Field(
52
+ description="Unique identifier for this pricing option within the product (e.g., 'cpm_usd_auction')"
53
+ ),
54
+ ]
@@ -0,0 +1,39 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: cpm-fixed-option.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 ConfigDict, Field
11
+
12
+
13
+ class CpmFixedRatePricingOption(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ currency: Annotated[
18
+ str,
19
+ Field(
20
+ description="ISO 4217 currency code",
21
+ examples=["USD", "EUR", "GBP", "JPY"],
22
+ pattern="^[A-Z]{3}$",
23
+ ),
24
+ ]
25
+ min_spend_per_package: Annotated[
26
+ float | None,
27
+ Field(
28
+ description="Minimum spend requirement per package using this pricing option, in the specified currency",
29
+ ge=0.0,
30
+ ),
31
+ ] = None
32
+ pricing_model: Annotated[Literal["cpm"], Field(description="Cost per 1,000 impressions")]
33
+ pricing_option_id: Annotated[
34
+ str,
35
+ Field(
36
+ description="Unique identifier for this pricing option within the product (e.g., 'cpm_usd_guaranteed')"
37
+ ),
38
+ ]
39
+ rate: Annotated[float, Field(description="Fixed CPM rate (cost per 1,000 impressions)", ge=0.0)]
@@ -0,0 +1,60 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: cpp-option.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 ConfigDict, Field
11
+
12
+
13
+ class Parameters(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ demographic: Annotated[
18
+ str,
19
+ Field(
20
+ description="Target demographic in Nielsen format: P/M/W/A/C + age range. Examples: P18-49 (Persons 18-49), M25-54 (Men 25-54), W35+ (Women 35+), A18-34 (Adults 18-34), C2-11 (Children 2-11)",
21
+ pattern="^[PMWAC][0-9]{2}(-[0-9]{2}|\\+)$",
22
+ ),
23
+ ]
24
+ min_points: Annotated[
25
+ float | None,
26
+ Field(description="Minimum GRPs/TRPs required for this pricing option", ge=0.0),
27
+ ] = None
28
+
29
+
30
+ class CppPricingOption(AdCPBaseModel):
31
+ model_config = ConfigDict(
32
+ extra="forbid",
33
+ )
34
+ currency: Annotated[
35
+ str,
36
+ Field(
37
+ description="ISO 4217 currency code",
38
+ examples=["USD", "EUR", "GBP", "JPY"],
39
+ pattern="^[A-Z]{3}$",
40
+ ),
41
+ ]
42
+ min_spend_per_package: Annotated[
43
+ float | None,
44
+ Field(
45
+ description="Minimum spend requirement per package using this pricing option, in the specified currency",
46
+ ge=0.0,
47
+ ),
48
+ ] = None
49
+ parameters: Annotated[
50
+ Parameters,
51
+ Field(description="CPP-specific parameters for demographic targeting and GRP requirements"),
52
+ ]
53
+ pricing_model: Annotated[Literal["cpp"], Field(description="Cost per Gross Rating Point")]
54
+ pricing_option_id: Annotated[
55
+ str,
56
+ Field(
57
+ description="Unique identifier for this pricing option within the product (e.g., 'cpp_usd_p18-49')"
58
+ ),
59
+ ]
60
+ rate: Annotated[float, Field(description="Fixed CPP rate (cost per rating point)", ge=0.0)]
@@ -0,0 +1,73 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: cpv-option.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 ConfigDict, Field, RootModel
11
+
12
+
13
+ class ViewThreshold(RootModel[float]):
14
+ root: Annotated[
15
+ float,
16
+ Field(
17
+ description="Percentage completion threshold for CPV pricing (0.0 to 1.0, e.g., 0.5 = 50% completion)",
18
+ ge=0.0,
19
+ le=1.0,
20
+ ),
21
+ ]
22
+
23
+
24
+ class ViewThreshold1(AdCPBaseModel):
25
+ model_config = ConfigDict(
26
+ extra="forbid",
27
+ )
28
+ duration_seconds: Annotated[
29
+ int,
30
+ Field(
31
+ description="Seconds of viewing required (e.g., 30 for YouTube-style '30 seconds = view')",
32
+ ge=1,
33
+ ),
34
+ ]
35
+
36
+
37
+ class Parameters(AdCPBaseModel):
38
+ model_config = ConfigDict(
39
+ extra="forbid",
40
+ )
41
+ view_threshold: ViewThreshold | ViewThreshold1
42
+
43
+
44
+ class CpvPricingOption(AdCPBaseModel):
45
+ model_config = ConfigDict(
46
+ extra="forbid",
47
+ )
48
+ currency: Annotated[
49
+ str,
50
+ Field(
51
+ description="ISO 4217 currency code",
52
+ examples=["USD", "EUR", "GBP", "JPY"],
53
+ pattern="^[A-Z]{3}$",
54
+ ),
55
+ ]
56
+ min_spend_per_package: Annotated[
57
+ float | None,
58
+ Field(
59
+ description="Minimum spend requirement per package using this pricing option, in the specified currency",
60
+ ge=0.0,
61
+ ),
62
+ ] = None
63
+ parameters: Annotated[
64
+ Parameters, Field(description="CPV-specific parameters defining the view threshold")
65
+ ]
66
+ pricing_model: Annotated[Literal["cpv"], Field(description="Cost per view at threshold")]
67
+ pricing_option_id: Annotated[
68
+ str,
69
+ Field(
70
+ description="Unique identifier for this pricing option within the product (e.g., 'cpv_usd_50pct')"
71
+ ),
72
+ ]
73
+ rate: Annotated[float, Field(description="Fixed CPV rate (cost per view)", ge=0.0)]
@@ -0,0 +1,96 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: create-media-buy-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 AnyUrl, AwareDatetime, ConfigDict, Field
12
+
13
+ from . import brand_manifest_ref as brand_manifest_1
14
+ from . import package_request
15
+ from .push_notification_config import PushNotificationConfig
16
+
17
+
18
+ class ReportingFrequency(Enum):
19
+ hourly = "hourly"
20
+ daily = "daily"
21
+ monthly = "monthly"
22
+
23
+
24
+ class RequestedMetric(Enum):
25
+ impressions = "impressions"
26
+ spend = "spend"
27
+ clicks = "clicks"
28
+ ctr = "ctr"
29
+ video_completions = "video_completions"
30
+ completion_rate = "completion_rate"
31
+ conversions = "conversions"
32
+ viewability = "viewability"
33
+ engagement_rate = "engagement_rate"
34
+
35
+
36
+ class ReportingWebhook(PushNotificationConfig):
37
+ reporting_frequency: Annotated[
38
+ ReportingFrequency,
39
+ Field(
40
+ description="Frequency for automated reporting delivery. Must be supported by all products in the media buy."
41
+ ),
42
+ ]
43
+ requested_metrics: Annotated[
44
+ list[RequestedMetric] | None,
45
+ Field(
46
+ description="Optional list of metrics to include in webhook notifications. If omitted, all available metrics are included. Must be subset of product's available_metrics."
47
+ ),
48
+ ] = None
49
+
50
+
51
+ class CreateMediaBuyRequest(AdCPBaseModel):
52
+ model_config = ConfigDict(
53
+ extra="forbid",
54
+ )
55
+ brand_manifest: Annotated[
56
+ brand_manifest_1.BrandManifest | AnyUrl,
57
+ Field(
58
+ 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.",
59
+ examples=[
60
+ {
61
+ "data": {
62
+ "colors": {"primary": "#FF6B35"},
63
+ "name": "ACME Corporation",
64
+ "url": "https://acmecorp.com",
65
+ },
66
+ "description": "Inline brand manifest",
67
+ },
68
+ {
69
+ "data": "https://cdn.acmecorp.com/brand-manifest.json",
70
+ "description": "URL string reference to hosted manifest",
71
+ },
72
+ ],
73
+ title="Brand Manifest Reference",
74
+ ),
75
+ ]
76
+ buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")]
77
+ context: Annotated[
78
+ dict[str, Any] | None,
79
+ Field(
80
+ 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."
81
+ ),
82
+ ] = None
83
+ end_time: Annotated[
84
+ AwareDatetime, Field(description="Campaign end date/time in ISO 8601 format")
85
+ ]
86
+ packages: Annotated[
87
+ list[package_request.PackageRequest], Field(description="Array of package configurations")
88
+ ]
89
+ po_number: Annotated[str | None, Field(description="Purchase order number for tracking")] = None
90
+ reporting_webhook: ReportingWebhook | None = None
91
+ start_time: Annotated[
92
+ str | AwareDatetime,
93
+ Field(
94
+ description="Campaign start timing: 'asap' or ISO 8601 date-time", title="Start Timing"
95
+ ),
96
+ ]
@@ -0,0 +1,66 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: create-media-buy-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 AwareDatetime, ConfigDict, Field, RootModel
11
+
12
+ from . import error
13
+
14
+
15
+ class Package(AdCPBaseModel):
16
+ model_config = ConfigDict(
17
+ extra="forbid",
18
+ )
19
+ buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for the package")]
20
+ package_id: Annotated[str, Field(description="Publisher's unique identifier for the package")]
21
+
22
+
23
+ class CreateMediaBuyResponse1(AdCPBaseModel):
24
+ model_config = ConfigDict(
25
+ extra="forbid",
26
+ )
27
+ buyer_ref: Annotated[str, Field(description="Buyer's reference identifier for this media buy")]
28
+ context: Annotated[
29
+ dict[str, Any] | None,
30
+ Field(
31
+ description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
32
+ ),
33
+ ] = None
34
+ creative_deadline: Annotated[
35
+ AwareDatetime | None, Field(description="ISO 8601 timestamp for creative upload deadline")
36
+ ] = None
37
+ media_buy_id: Annotated[
38
+ str, Field(description="Publisher's unique identifier for the created media buy")
39
+ ]
40
+ packages: Annotated[list[Package], Field(description="Array of created packages")]
41
+
42
+
43
+ class CreateMediaBuyResponse2(AdCPBaseModel):
44
+ model_config = ConfigDict(
45
+ extra="forbid",
46
+ )
47
+ context: Annotated[
48
+ dict[str, Any] | None,
49
+ Field(
50
+ description="Initiator-provided context echoed inside the task payload. Opaque metadata such as UI/session hints, correlation tokens, or tracking identifiers."
51
+ ),
52
+ ] = None
53
+ errors: Annotated[
54
+ list[error.Error],
55
+ Field(description="Array of errors explaining why the operation failed", min_length=1),
56
+ ]
57
+
58
+
59
+ class CreateMediaBuyResponse(RootModel[CreateMediaBuyResponse1 | CreateMediaBuyResponse2]):
60
+ root: Annotated[
61
+ CreateMediaBuyResponse1 | CreateMediaBuyResponse2,
62
+ Field(
63
+ description="Response payload for create_media_buy task. Returns either complete success data OR error information, never both. This enforces atomic operation semantics - the media buy is either fully created or not created at all.",
64
+ title="Create Media Buy Response",
65
+ ),
66
+ ]
@@ -0,0 +1,83 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: creative-asset.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
+ from . import audio_asset, css_asset, daast_asset
13
+ from . import format_id as format_id_1
14
+ from . import (
15
+ html_asset,
16
+ image_asset,
17
+ javascript_asset,
18
+ promoted_offerings,
19
+ text_asset,
20
+ url_asset,
21
+ vast_asset,
22
+ video_asset,
23
+ )
24
+
25
+
26
+ class Input(AdCPBaseModel):
27
+ model_config = ConfigDict(
28
+ extra="forbid",
29
+ )
30
+ context_description: Annotated[
31
+ str | None,
32
+ Field(description="Natural language description of the context for AI-generated content"),
33
+ ] = None
34
+ macros: Annotated[
35
+ dict[str, str] | None, Field(description="Macro values to apply for this preview")
36
+ ] = None
37
+ name: Annotated[str, Field(description="Human-readable name for this preview variant")]
38
+
39
+
40
+ class CreativeAsset(AdCPBaseModel):
41
+ model_config = ConfigDict(
42
+ extra="forbid",
43
+ )
44
+ approved: Annotated[
45
+ bool | None,
46
+ Field(
47
+ description="For generative creatives: set to true to approve and finalize, false to request regeneration with updated assets/message. Omit for non-generative creatives."
48
+ ),
49
+ ] = None
50
+ assets: Annotated[
51
+ dict[
52
+ str,
53
+ image_asset.ImageAsset
54
+ | video_asset.VideoAsset
55
+ | audio_asset.AudioAsset
56
+ | text_asset.TextAsset
57
+ | html_asset.HtmlAsset
58
+ | css_asset.CssAsset
59
+ | javascript_asset.JavascriptAsset
60
+ | promoted_offerings.PromotedOfferings
61
+ | url_asset.UrlAsset
62
+ | vast_asset.VastAsset1
63
+ | vast_asset.VastAsset2
64
+ | daast_asset.DaastAsset1
65
+ | daast_asset.DaastAsset2,
66
+ ],
67
+ Field(description="Assets required by the format, keyed by asset_role"),
68
+ ]
69
+ creative_id: Annotated[str, Field(description="Unique identifier for the creative")]
70
+ format_id: Annotated[
71
+ format_id_1.FormatId,
72
+ Field(description="Format identifier specifying which format this creative conforms to"),
73
+ ]
74
+ inputs: Annotated[
75
+ list[Input] | None,
76
+ Field(
77
+ description="Preview contexts for generative formats - defines what scenarios to generate previews for"
78
+ ),
79
+ ] = None
80
+ name: Annotated[str, Field(description="Human-readable creative name")]
81
+ tags: Annotated[
82
+ list[str] | None, Field(description="User-defined tags for organization and searchability")
83
+ ] = None
@@ -0,0 +1,27 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: creative-assignment.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 CreativeAssignment(AdCPBaseModel):
14
+ model_config = ConfigDict(
15
+ extra="forbid",
16
+ )
17
+ creative_id: Annotated[str, Field(description="Unique identifier for the creative")]
18
+ placement_ids: Annotated[
19
+ list[str] | None,
20
+ Field(
21
+ description="Optional array of placement IDs where this creative should run. When omitted, the creative runs on all placements in the package. References placement_id values from the product's placements array.",
22
+ min_length=1,
23
+ ),
24
+ ] = None
25
+ weight: Annotated[
26
+ float | None, Field(description="Delivery weight for this creative", ge=0.0, le=100.0)
27
+ ] = None