adcp 2.3.0__py3-none-any.whl → 2.4.1__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 (120) hide show
  1. adcp/__init__.py +88 -39
  2. adcp/__main__.py +1 -1
  3. adcp/client.py +9 -9
  4. adcp/simple.py +1 -1
  5. adcp/testing/test_helpers.py +1 -1
  6. adcp/types/__init__.py +66 -2
  7. adcp/types/_generated.py +175 -0
  8. adcp/types/aliases.py +1 -1
  9. adcp/types/generated_poc/__init__.py +1 -1
  10. adcp/types/generated_poc/activate_signal_request.py +5 -5
  11. adcp/types/generated_poc/activate_signal_response.py +9 -9
  12. adcp/types/generated_poc/activation_key.py +8 -8
  13. adcp/types/generated_poc/adagents.py +46 -46
  14. adcp/types/generated_poc/asset_type.py +19 -19
  15. adcp/types/generated_poc/audio_asset.py +6 -6
  16. adcp/types/generated_poc/brand_manifest.py +61 -120
  17. adcp/types/generated_poc/build_creative_request.py +6 -6
  18. adcp/types/generated_poc/build_creative_response.py +9 -9
  19. adcp/types/generated_poc/channels.py +10 -10
  20. adcp/types/generated_poc/cpc_option.py +12 -8
  21. adcp/types/generated_poc/cpcv_option.py +12 -8
  22. adcp/types/generated_poc/cpm_auction_option.py +17 -13
  23. adcp/types/generated_poc/cpm_fixed_option.py +12 -8
  24. adcp/types/generated_poc/cpp_option.py +17 -13
  25. adcp/types/generated_poc/cpv_option.py +16 -12
  26. adcp/types/generated_poc/create_media_buy_request.py +30 -30
  27. adcp/types/generated_poc/create_media_buy_response.py +11 -11
  28. adcp/types/generated_poc/creative_asset.py +13 -13
  29. adcp/types/generated_poc/creative_assignment.py +4 -4
  30. adcp/types/generated_poc/creative_manifest.py +4 -4
  31. adcp/types/generated_poc/creative_policy.py +11 -11
  32. adcp/types/generated_poc/creative_status.py +5 -5
  33. adcp/types/generated_poc/css_asset.py +3 -3
  34. adcp/types/generated_poc/daast_asset.py +30 -30
  35. adcp/types/generated_poc/delivery_metrics.py +33 -33
  36. adcp/types/generated_poc/delivery_type.py +3 -3
  37. adcp/types/generated_poc/deployment.py +21 -21
  38. adcp/types/generated_poc/destination.py +10 -10
  39. adcp/types/generated_poc/error.py +7 -7
  40. adcp/types/generated_poc/flat_rate_option.py +16 -16
  41. adcp/types/generated_poc/format.py +70 -70
  42. adcp/types/generated_poc/format_id.py +3 -3
  43. adcp/types/generated_poc/frequency_cap.py +3 -3
  44. adcp/types/generated_poc/frequency_cap_scope.py +4 -4
  45. adcp/types/generated_poc/get_media_buy_delivery_request.py +21 -21
  46. adcp/types/generated_poc/get_media_buy_delivery_response.py +46 -46
  47. adcp/types/generated_poc/get_products_request.py +24 -24
  48. adcp/types/generated_poc/get_products_response.py +5 -5
  49. adcp/types/generated_poc/get_signals_request.py +19 -19
  50. adcp/types/generated_poc/get_signals_response.py +20 -20
  51. adcp/types/generated_poc/html_asset.py +3 -3
  52. adcp/types/generated_poc/identifier_types.py +20 -20
  53. adcp/types/generated_poc/image_asset.py +7 -7
  54. adcp/types/generated_poc/javascript_asset.py +7 -7
  55. adcp/types/generated_poc/list_authorized_properties_request.py +5 -5
  56. adcp/types/generated_poc/list_authorized_properties_response.py +9 -9
  57. adcp/types/generated_poc/list_creative_formats_request.py +22 -22
  58. adcp/types/generated_poc/list_creative_formats_response.py +11 -11
  59. adcp/types/generated_poc/list_creatives_request.py +51 -51
  60. adcp/types/generated_poc/list_creatives_response.py +57 -72
  61. adcp/types/generated_poc/markdown_asset.py +7 -7
  62. adcp/types/generated_poc/measurement.py +9 -9
  63. adcp/types/generated_poc/media_buy.py +8 -8
  64. adcp/types/generated_poc/media_buy_status.py +5 -5
  65. adcp/types/generated_poc/pacing.py +4 -4
  66. adcp/types/generated_poc/package.py +8 -8
  67. adcp/types/generated_poc/package_request.py +7 -7
  68. adcp/types/generated_poc/package_status.py +5 -5
  69. adcp/types/generated_poc/performance_feedback.py +31 -31
  70. adcp/types/generated_poc/placement.py +4 -4
  71. adcp/types/generated_poc/preview_creative_request.py +28 -28
  72. adcp/types/generated_poc/preview_creative_response.py +31 -31
  73. adcp/types/generated_poc/preview_render.py +36 -28
  74. adcp/types/generated_poc/pricing_model.py +8 -8
  75. adcp/types/generated_poc/product.py +53 -43
  76. adcp/types/generated_poc/promoted_offerings.py +30 -30
  77. adcp/types/generated_poc/promoted_products.py +3 -3
  78. adcp/types/generated_poc/property.py +18 -18
  79. adcp/types/generated_poc/protocol_envelope.py +9 -9
  80. adcp/types/generated_poc/provide_performance_feedback_request.py +24 -24
  81. adcp/types/generated_poc/provide_performance_feedback_response.py +9 -9
  82. adcp/types/generated_poc/publisher_identifier_types.py +6 -6
  83. adcp/types/generated_poc/push_notification_config.py +9 -9
  84. adcp/types/generated_poc/reporting_capabilities.py +21 -21
  85. adcp/types/generated_poc/response.py +5 -5
  86. adcp/types/generated_poc/standard_format_ids.py +36 -36
  87. adcp/types/generated_poc/sub_asset.py +13 -13
  88. adcp/types/generated_poc/sync_creatives_request.py +11 -11
  89. adcp/types/generated_poc/sync_creatives_response.py +23 -23
  90. adcp/types/generated_poc/targeting.py +9 -9
  91. adcp/types/generated_poc/task_status.py +10 -10
  92. adcp/types/generated_poc/task_type.py +6 -6
  93. adcp/types/generated_poc/tasks_get_request.py +5 -5
  94. adcp/types/generated_poc/tasks_get_response.py +35 -35
  95. adcp/types/generated_poc/tasks_list_request.py +36 -36
  96. adcp/types/generated_poc/tasks_list_response.py +35 -35
  97. adcp/types/generated_poc/text_asset.py +3 -3
  98. adcp/types/generated_poc/update_media_buy_request.py +27 -27
  99. adcp/types/generated_poc/update_media_buy_response.py +11 -11
  100. adcp/types/generated_poc/url_asset.py +7 -7
  101. adcp/types/generated_poc/vast_asset.py +38 -38
  102. adcp/types/generated_poc/vcpm_auction_option.py +17 -13
  103. adcp/types/generated_poc/vcpm_fixed_option.py +12 -8
  104. adcp/types/generated_poc/video_asset.py +8 -8
  105. adcp/types/generated_poc/webhook_asset.py +19 -19
  106. adcp/types/generated_poc/webhook_payload.py +18 -18
  107. adcp/types/stable.py +175 -0
  108. adcp/utils/preview_cache.py +6 -6
  109. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/METADATA +29 -4
  110. adcp-2.4.1.dist-info/RECORD +129 -0
  111. adcp/types/generated.py +0 -614
  112. adcp/types/generated_poc/brand_manifest_ref.py +0 -361
  113. adcp/types/generated_poc/index.py +0 -17
  114. adcp/types/generated_poc/pricing_option.py +0 -365
  115. adcp/types/generated_poc/start_timing.py +0 -13
  116. adcp-2.3.0.dist-info/RECORD +0 -132
  117. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/WHEEL +0 -0
  118. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/entry_points.txt +0 -0
  119. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/licenses/LICENSE +0 -0
  120. {adcp-2.3.0.dist-info → adcp-2.4.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: vcpm-fixed-option.json
3
- # timestamp: 2025-11-15T22:03:55+00:00
3
+ # timestamp: 2025-11-18T03:35:10+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -12,25 +12,29 @@ from pydantic import ConfigDict, Field
12
12
 
13
13
  class VcpmFixedRatePricingOption(AdCPBaseModel):
14
14
  model_config = ConfigDict(
15
- extra="forbid",
15
+ extra='forbid',
16
16
  )
17
17
  currency: Annotated[
18
18
  str,
19
19
  Field(
20
- description="ISO 4217 currency code",
21
- examples=["USD", "EUR", "GBP", "JPY"],
22
- pattern="^[A-Z]{3}$",
20
+ description='ISO 4217 currency code',
21
+ examples=['USD', 'EUR', 'GBP', 'JPY'],
22
+ pattern='^[A-Z]{3}$',
23
23
  ),
24
24
  ]
25
+ is_fixed: Annotated[
26
+ Literal[True],
27
+ Field(description='Whether this is a fixed rate (true) or auction-based (false)'),
28
+ ]
25
29
  min_spend_per_package: Annotated[
26
30
  float | None,
27
31
  Field(
28
- description="Minimum spend requirement per package using this pricing option, in the specified currency",
32
+ description='Minimum spend requirement per package using this pricing option, in the specified currency',
29
33
  ge=0.0,
30
34
  ),
31
35
  ] = None
32
36
  pricing_model: Annotated[
33
- Literal["vcpm"], Field(description="Cost per 1,000 viewable impressions (MRC standard)")
37
+ Literal['vcpm'], Field(description='Cost per 1,000 viewable impressions (MRC standard)')
34
38
  ]
35
39
  pricing_option_id: Annotated[
36
40
  str,
@@ -39,5 +43,5 @@ class VcpmFixedRatePricingOption(AdCPBaseModel):
39
43
  ),
40
44
  ]
41
45
  rate: Annotated[
42
- float, Field(description="Fixed vCPM rate (cost per 1,000 viewable impressions)", ge=0.0)
46
+ float, Field(description='Fixed vCPM rate (cost per 1,000 viewable impressions)', ge=0.0)
43
47
  ]
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: video-asset.json
3
- # timestamp: 2025-11-15T22:03:55+00:00
3
+ # timestamp: 2025-11-18T03:35:10+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -12,17 +12,17 @@ from pydantic import AnyUrl, ConfigDict, Field
12
12
 
13
13
  class VideoAsset(AdCPBaseModel):
14
14
  model_config = ConfigDict(
15
- extra="forbid",
15
+ extra='forbid',
16
16
  )
17
17
  bitrate_kbps: Annotated[
18
- int | None, Field(description="Video bitrate in kilobits per second", ge=1)
18
+ int | None, Field(description='Video bitrate in kilobits per second', ge=1)
19
19
  ] = None
20
20
  duration_ms: Annotated[
21
- int | None, Field(description="Video duration in milliseconds", ge=0)
21
+ int | None, Field(description='Video duration in milliseconds', ge=0)
22
22
  ] = None
23
- format: Annotated[str | None, Field(description="Video file format (mp4, webm, mov, etc.)")] = (
23
+ format: Annotated[str | None, Field(description='Video file format (mp4, webm, mov, etc.)')] = (
24
24
  None
25
25
  )
26
- height: Annotated[int | None, Field(description="Video height in pixels", ge=1)] = None
27
- url: Annotated[AnyUrl, Field(description="URL to the video asset")]
28
- width: Annotated[int | None, Field(description="Video width in pixels", ge=1)] = None
26
+ height: Annotated[int | None, Field(description='Video height in pixels', ge=1)] = None
27
+ url: Annotated[AnyUrl, Field(description='URL to the video asset')]
28
+ width: Annotated[int | None, Field(description='Video width in pixels', ge=1)] = None
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: webhook-asset.json
3
- # timestamp: 2025-11-15T22:03:55+00:00
3
+ # timestamp: 2025-11-18T03:35:10+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -12,21 +12,21 @@ from pydantic import AnyUrl, ConfigDict, Field
12
12
 
13
13
 
14
14
  class Method(Enum):
15
- GET = "GET"
16
- POST = "POST"
15
+ GET = 'GET'
16
+ POST = 'POST'
17
17
 
18
18
 
19
19
  class ResponseType(Enum):
20
- html = "html"
21
- json = "json"
22
- xml = "xml"
23
- javascript = "javascript"
20
+ html = 'html'
21
+ json = 'json'
22
+ xml = 'xml'
23
+ javascript = 'javascript'
24
24
 
25
25
 
26
26
  class Method1(Enum):
27
- hmac_sha256 = "hmac_sha256"
28
- api_key = "api_key"
29
- none = "none"
27
+ hmac_sha256 = 'hmac_sha256'
28
+ api_key = 'api_key'
29
+ none = 'none'
30
30
 
31
31
 
32
32
  class Security(AdCPBaseModel):
@@ -36,30 +36,30 @@ class Security(AdCPBaseModel):
36
36
  hmac_header: Annotated[
37
37
  str | None, Field(description="Header name for HMAC signature (e.g., 'X-Signature')")
38
38
  ] = None
39
- method: Annotated[Method1, Field(description="Authentication method")]
39
+ method: Annotated[Method1, Field(description='Authentication method')]
40
40
 
41
41
 
42
42
  class WebhookAsset(AdCPBaseModel):
43
43
  model_config = ConfigDict(
44
- extra="forbid",
44
+ extra='forbid',
45
45
  )
46
- method: Annotated[Method | None, Field(description="HTTP method")] = Method.POST
46
+ method: Annotated[Method | None, Field(description='HTTP method')] = Method.POST
47
47
  required_macros: Annotated[
48
48
  list[str] | None,
49
- Field(description="Universal macros that must be provided for webhook to function"),
49
+ Field(description='Universal macros that must be provided for webhook to function'),
50
50
  ] = None
51
51
  response_type: Annotated[
52
- ResponseType, Field(description="Expected content type of webhook response")
52
+ ResponseType, Field(description='Expected content type of webhook response')
53
53
  ]
54
- security: Annotated[Security, Field(description="Security configuration for webhook calls")]
54
+ security: Annotated[Security, Field(description='Security configuration for webhook calls')]
55
55
  supported_macros: Annotated[
56
56
  list[str] | None,
57
57
  Field(
58
- description="Universal macros that can be passed to webhook (e.g., {DEVICE_TYPE}, {COUNTRY})"
58
+ description='Universal macros that can be passed to webhook (e.g., {DEVICE_TYPE}, {COUNTRY})'
59
59
  ),
60
60
  ] = None
61
61
  timeout_ms: Annotated[
62
62
  int | None,
63
- Field(description="Maximum time to wait for response in milliseconds", ge=10, le=5000),
63
+ Field(description='Maximum time to wait for response in milliseconds', ge=10, le=5000),
64
64
  ] = 500
65
- url: Annotated[AnyUrl, Field(description="Webhook URL to call for dynamic content")]
65
+ url: Annotated[AnyUrl, Field(description='Webhook URL to call for dynamic content')]
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: webhook-payload.json
3
- # timestamp: 2025-11-15T22:03:55+00:00
3
+ # timestamp: 2025-11-18T03:35:10+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -15,40 +15,40 @@ from . import task_type as task_type_1
15
15
 
16
16
 
17
17
  class Domain(Enum):
18
- media_buy = "media-buy"
19
- signals = "signals"
18
+ media_buy = 'media-buy'
19
+ signals = 'signals'
20
20
 
21
21
 
22
22
  class Progress(AdCPBaseModel):
23
23
  model_config = ConfigDict(
24
- extra="forbid",
24
+ extra='forbid',
25
25
  )
26
26
  current_step: Annotated[
27
- str | None, Field(description="Current step or phase of the operation")
27
+ str | None, Field(description='Current step or phase of the operation')
28
28
  ] = None
29
29
  percentage: Annotated[
30
- float | None, Field(description="Completion percentage (0-100)", ge=0.0, le=100.0)
30
+ float | None, Field(description='Completion percentage (0-100)', ge=0.0, le=100.0)
31
31
  ] = None
32
- step_number: Annotated[int | None, Field(description="Current step number", ge=1)] = None
32
+ step_number: Annotated[int | None, Field(description='Current step number', ge=1)] = None
33
33
  total_steps: Annotated[
34
- int | None, Field(description="Total number of steps in the operation", ge=1)
34
+ int | None, Field(description='Total number of steps in the operation', ge=1)
35
35
  ] = None
36
36
 
37
37
 
38
38
  class WebhookPayload(AdCPBaseModel):
39
39
  model_config = ConfigDict(
40
- extra="allow",
40
+ extra='allow',
41
41
  )
42
42
  context_id: Annotated[
43
43
  str | None,
44
44
  Field(
45
- description="Session/conversation identifier. Use this to continue the conversation if input-required status needs clarification or additional parameters."
45
+ description='Session/conversation identifier. Use this to continue the conversation if input-required status needs clarification or additional parameters.'
46
46
  ),
47
47
  ] = None
48
48
  domain: Annotated[
49
49
  Domain | None,
50
50
  Field(
51
- description="AdCP domain this task belongs to. Helps classify the operation type at a high level."
51
+ description='AdCP domain this task belongs to. Helps classify the operation type at a high level.'
52
52
  ),
53
53
  ] = None
54
54
  error: Annotated[
@@ -58,13 +58,13 @@ class WebhookPayload(AdCPBaseModel):
58
58
  message: Annotated[
59
59
  str | None,
60
60
  Field(
61
- description="Human-readable summary of the current task state. Provides context about what happened and what action may be needed."
61
+ description='Human-readable summary of the current task state. Provides context about what happened and what action may be needed.'
62
62
  ),
63
63
  ] = None
64
64
  operation_id: Annotated[
65
65
  str | None,
66
66
  Field(
67
- description="Publisher-defined operation identifier correlating a sequence of task updates across webhooks."
67
+ description='Publisher-defined operation identifier correlating a sequence of task updates across webhooks.'
68
68
  ),
69
69
  ] = None
70
70
  progress: Annotated[
@@ -76,27 +76,27 @@ class WebhookPayload(AdCPBaseModel):
76
76
  result: Annotated[
77
77
  dict[str, Any] | None,
78
78
  Field(
79
- description="Task-specific payload for this status update. Validated against the appropriate response schema based on task_type."
79
+ description='Task-specific payload for this status update. Validated against the appropriate response schema based on task_type.'
80
80
  ),
81
81
  ] = None
82
82
  status: Annotated[
83
83
  task_status.TaskStatus,
84
84
  Field(
85
- description="Current task status. Webhooks are only triggered for status changes after initial submission (e.g., submitted → input-required, submitted → completed, submitted → failed)."
85
+ description='Current task status. Webhooks are only triggered for status changes after initial submission (e.g., submitted → input-required, submitted → completed, submitted → failed).'
86
86
  ),
87
87
  ]
88
88
  task_id: Annotated[
89
89
  str,
90
90
  Field(
91
- description="Unique identifier for this task. Use this to correlate webhook notifications with the original task submission."
91
+ description='Unique identifier for this task. Use this to correlate webhook notifications with the original task submission.'
92
92
  ),
93
93
  ]
94
94
  task_type: Annotated[
95
95
  task_type_1.TaskType,
96
96
  Field(
97
- description="Type of AdCP operation that triggered this webhook. Enables webhook handlers to route to appropriate processing logic."
97
+ description='Type of AdCP operation that triggered this webhook. Enables webhook handlers to route to appropriate processing logic.'
98
98
  ),
99
99
  ]
100
100
  timestamp: Annotated[
101
- AwareDatetime, Field(description="ISO 8601 timestamp when this webhook was generated.")
101
+ AwareDatetime, Field(description='ISO 8601 timestamp when this webhook was generated.')
102
102
  ]
adcp/types/stable.py ADDED
@@ -0,0 +1,175 @@
1
+ """Stable public API for AdCP types.
2
+
3
+ This module provides a stable, versioned API that shields users from internal
4
+ implementation details and schema evolution. All types exported here are
5
+ guaranteed to be stable within a major version.
6
+
7
+ Internal Implementation:
8
+ - Types are generated from JSON schemas into adcp.types.generated_poc
9
+ - The generator may create numbered variants (e.g., BrandManifest1, BrandManifest2)
10
+ when schema evolution creates multiple valid structures
11
+ - This module provides clean, unnumbered aliases pointing to the canonical version
12
+
13
+ **IMPORTANT**: Never import directly from adcp.types.generated_poc or adcp.types.generated.
14
+ Always import from adcp.types or adcp.types.stable.
15
+
16
+ Schema Evolution:
17
+ - When schemas change, we update the alias targets here
18
+ - Users see stable names (BrandManifest, Product, etc.)
19
+ - Breaking changes require major version bumps
20
+ """
21
+
22
+ from __future__ import annotations
23
+
24
+ # Import all generated types from internal consolidated module
25
+ from adcp.types._generated import (
26
+ # Core request/response types
27
+ ActivateSignalRequest,
28
+ ActivateSignalResponse,
29
+ # Assets
30
+ AudioAsset,
31
+ # Core domain types
32
+ BrandManifest, # Clean single type after upstream schema fix
33
+ BuildCreativeRequest,
34
+ BuildCreativeResponse,
35
+ # Pricing options
36
+ CpcPricingOption,
37
+ CpcvPricingOption,
38
+ CpmAuctionPricingOption,
39
+ CpmFixedRatePricingOption,
40
+ CppPricingOption,
41
+ CpvPricingOption,
42
+ CreateMediaBuyRequest,
43
+ CreateMediaBuyResponse,
44
+ Creative,
45
+ CreativeManifest,
46
+ # Enums and constants
47
+ CreativeStatus,
48
+ CssAsset,
49
+ Error,
50
+ FlatRatePricingOption,
51
+ Format,
52
+ GetMediaBuyDeliveryRequest,
53
+ GetMediaBuyDeliveryResponse,
54
+ GetProductsRequest,
55
+ GetProductsResponse,
56
+ GetSignalsRequest,
57
+ GetSignalsResponse,
58
+ HtmlAsset,
59
+ ImageAsset,
60
+ JavascriptAsset,
61
+ ListAuthorizedPropertiesRequest,
62
+ ListAuthorizedPropertiesResponse,
63
+ ListCreativeFormatsRequest,
64
+ ListCreativeFormatsResponse,
65
+ ListCreativesRequest,
66
+ ListCreativesResponse,
67
+ MarkdownAsset,
68
+ MediaBuy,
69
+ MediaBuyStatus,
70
+ Package,
71
+ PackageStatus,
72
+ PreviewCreativeRequest,
73
+ PreviewCreativeResponse,
74
+ PricingModel,
75
+ Product,
76
+ Property,
77
+ ProvidePerformanceFeedbackRequest,
78
+ ProvidePerformanceFeedbackResponse,
79
+ SyncCreativesRequest,
80
+ SyncCreativesResponse,
81
+ TasksGetRequest,
82
+ TasksGetResponse,
83
+ TasksListRequest,
84
+ TasksListResponse,
85
+ TaskStatus,
86
+ TaskType,
87
+ TextAsset,
88
+ UpdateMediaBuyRequest,
89
+ UpdateMediaBuyResponse,
90
+ UrlAsset,
91
+ VcpmAuctionPricingOption,
92
+ VcpmFixedRatePricingOption,
93
+ VideoAsset,
94
+ WebhookAsset,
95
+ )
96
+
97
+ # Note: BrandManifest is currently split into BrandManifest1/2 due to upstream schema
98
+ # using anyOf incorrectly. This will be fixed upstream to create a single BrandManifest type.
99
+ # For now, users should use BrandManifest1 (url required) which is most common.
100
+
101
+ # Note: BrandManifest is now a single clean type
102
+ # Re-export BrandManifest directly (no alias needed)
103
+
104
+ # Re-export all stable types
105
+ __all__ = [
106
+ # Request/Response types
107
+ "ActivateSignalRequest",
108
+ "ActivateSignalResponse",
109
+ "BuildCreativeRequest",
110
+ "BuildCreativeResponse",
111
+ "CreateMediaBuyRequest",
112
+ "CreateMediaBuyResponse",
113
+ "GetMediaBuyDeliveryRequest",
114
+ "GetMediaBuyDeliveryResponse",
115
+ "GetProductsRequest",
116
+ "GetProductsResponse",
117
+ "GetSignalsRequest",
118
+ "GetSignalsResponse",
119
+ "ListAuthorizedPropertiesRequest",
120
+ "ListAuthorizedPropertiesResponse",
121
+ "ListCreativeFormatsRequest",
122
+ "ListCreativeFormatsResponse",
123
+ "ListCreativesRequest",
124
+ "ListCreativesResponse",
125
+ "PreviewCreativeRequest",
126
+ "PreviewCreativeResponse",
127
+ "ProvidePerformanceFeedbackRequest",
128
+ "ProvidePerformanceFeedbackResponse",
129
+ "SyncCreativesRequest",
130
+ "SyncCreativesResponse",
131
+ "TasksGetRequest",
132
+ "TasksGetResponse",
133
+ "TasksListRequest",
134
+ "TasksListResponse",
135
+ "UpdateMediaBuyRequest",
136
+ "UpdateMediaBuyResponse",
137
+ # Domain types
138
+ "BrandManifest", # Stable alias for BrandManifest1 (temporary until upstream fix)
139
+ "Creative",
140
+ "CreativeManifest",
141
+ "Error",
142
+ "Format",
143
+ "MediaBuy",
144
+ "Package",
145
+ "Product",
146
+ "Property",
147
+ # Pricing options
148
+ "CpcPricingOption",
149
+ "CpcvPricingOption",
150
+ "CpmAuctionPricingOption",
151
+ "CpmFixedRatePricingOption",
152
+ "CppPricingOption",
153
+ "CpvPricingOption",
154
+ "FlatRatePricingOption",
155
+ "VcpmAuctionPricingOption",
156
+ "VcpmFixedRatePricingOption",
157
+ # Status enums
158
+ "CreativeStatus",
159
+ "MediaBuyStatus",
160
+ "PackageStatus",
161
+ "PricingModel",
162
+ "TaskStatus",
163
+ "TaskType",
164
+ # Assets
165
+ "AudioAsset",
166
+ "CssAsset",
167
+ "HtmlAsset",
168
+ "ImageAsset",
169
+ "JavascriptAsset",
170
+ "MarkdownAsset",
171
+ "TextAsset",
172
+ "UrlAsset",
173
+ "VideoAsset",
174
+ "WebhookAsset",
175
+ ]
@@ -10,7 +10,7 @@ from typing import TYPE_CHECKING, Any
10
10
 
11
11
  if TYPE_CHECKING:
12
12
  from adcp.client import ADCPClient
13
- from adcp.types.generated import CreativeManifest, Format, FormatId, Product
13
+ from adcp.types._generated import CreativeManifest, Format, FormatId, Product
14
14
 
15
15
  logger = logging.getLogger(__name__)
16
16
 
@@ -67,7 +67,7 @@ class PreviewURLGenerator:
67
67
  Returns:
68
68
  Preview data with preview_url and metadata, or None if generation fails
69
69
  """
70
- from adcp.types.generated import PreviewCreativeRequest1
70
+ from adcp.types._generated import PreviewCreativeRequest1
71
71
 
72
72
  cache_key = _make_manifest_cache_key(format_id, manifest.model_dump(exclude_none=True))
73
73
 
@@ -123,7 +123,7 @@ class PreviewURLGenerator:
123
123
  Returns:
124
124
  List of preview data dicts (or None for failures), in same order as requests
125
125
  """
126
- from adcp.types.generated import PreviewCreativeRequest
126
+ from adcp.types._generated import PreviewCreativeRequest
127
127
 
128
128
  if not requests:
129
129
  return []
@@ -396,7 +396,7 @@ def _create_sample_manifest_for_format(fmt: Format) -> CreativeManifest | None:
396
396
  Returns:
397
397
  Sample CreativeManifest, or None if unable to create one
398
398
  """
399
- from adcp.types.generated import CreativeManifest
399
+ from adcp.types._generated import CreativeManifest
400
400
 
401
401
  if not fmt.assets_required:
402
402
  return None
@@ -436,7 +436,7 @@ def _create_sample_manifest_for_format_id(
436
436
  Returns:
437
437
  Sample CreativeManifest with placeholder assets
438
438
  """
439
- from adcp.types.generated import CreativeManifest, ImageAsset, UrlAsset
439
+ from adcp.types._generated import CreativeManifest, ImageAsset, UrlAsset
440
440
 
441
441
  assets = {
442
442
  "primary_asset": ImageAsset(url="https://example.com/sample-image.jpg"),
@@ -456,7 +456,7 @@ def _create_sample_asset(asset_type: str | None) -> Any:
456
456
  Returns:
457
457
  Sample asset object (Pydantic model)
458
458
  """
459
- from adcp.types.generated import (
459
+ from adcp.types._generated import (
460
460
  HtmlAsset,
461
461
  ImageAsset,
462
462
  TextAsset,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adcp
3
- Version: 2.3.0
3
+ Version: 2.4.1
4
4
  Summary: Official Python client for the Ad Context Protocol (AdCP)
5
5
  Author-email: AdCP Community <maintainers@adcontextprotocol.org>
6
6
  License: Apache-2.0
@@ -246,10 +246,16 @@ client = ADCPClient(config)
246
246
 
247
247
  ### Type Safety
248
248
 
249
- Full type hints with Pydantic validation and auto-generated types from the AdCP spec:
249
+ Full type hints with Pydantic validation and auto-generated types from the AdCP spec. All commonly-used types are exported from the main `adcp` package for convenience:
250
250
 
251
251
  ```python
252
- from adcp import GetProductsRequest
252
+ from adcp import (
253
+ GetProductsRequest,
254
+ BrandManifest,
255
+ Package,
256
+ CpmFixedRatePricingOption,
257
+ MediaBuyStatus,
258
+ )
253
259
 
254
260
  # All methods require typed request objects
255
261
  request = GetProductsRequest(brief="Coffee brands", max_results=10)
@@ -259,8 +265,27 @@ result = await agent.get_products(request)
259
265
  if result.success:
260
266
  for product in result.data.products:
261
267
  print(product.name, product.pricing_options) # Full IDE autocomplete!
268
+
269
+ # Type-safe pricing with discriminators
270
+ pricing = CpmFixedRatePricingOption(
271
+ pricing_option_id="cpm_usd",
272
+ pricing_model="cpm",
273
+ is_fixed=True, # Literal[True] - type checked!
274
+ currency="USD",
275
+ rate=5.0
276
+ )
277
+
278
+ # Type-safe status enums
279
+ if media_buy.status == MediaBuyStatus.active:
280
+ print("Media buy is active")
262
281
  ```
263
282
 
283
+ **Exported from main package:**
284
+ - **Core domain types**: `BrandManifest`, `Creative`, `CreativeManifest`, `MediaBuy`, `Package`
285
+ - **Status enums**: `CreativeStatus`, `MediaBuyStatus`, `PackageStatus`, `PricingModel`
286
+ - **All 9 pricing options**: `CpcPricingOption`, `CpmFixedRatePricingOption`, `VcpmAuctionPricingOption`, etc.
287
+ - **Request/Response types**: All 16 operations with full request/response types
288
+
264
289
  #### Semantic Type Aliases
265
290
 
266
291
  For discriminated union types (success/error responses), use semantic aliases for clearer code:
@@ -291,7 +316,7 @@ See `examples/type_aliases_demo.py` for more examples.
291
316
  **Import guidelines:**
292
317
  - ✅ **DO**: Import from main package: `from adcp import GetProductsRequest`
293
318
  - ✅ **DO**: Use semantic aliases: `from adcp import CreateMediaBuySuccessResponse`
294
- - ⚠️ **AVOID**: Import from internal modules: `from adcp.types.generated import CreateMediaBuyResponse1`
319
+ - ⚠️ **AVOID**: Import from internal modules: `from adcp.types._generated import CreateMediaBuyResponse1`
295
320
 
296
321
  The main package exports provide a stable API while internal generated types may change.
297
322