"""AdCP Type System.

All AdCP types exported from a single location.
Users should import from here or directly from adcp.

Examples:
    from adcp.types import Product, CreativeFilters
    from adcp import Product, CreativeFilters
"""

from __future__ import annotations

# Also make submodules available for advanced use
from adcp.types import _generated as generated  # noqa: F401
from adcp.types import aliases  # noqa: F401

# Import all types from generated code
from adcp.types._generated import (
    # Core request/response types
    ActivateSignalRequest,
    ActivateSignalResponse,
    AggregatedTotals,
    # Assets
    Asset,
    AssetContentType,
    AssetSelectors,
    AssetsRequired,
    AssignedPackage,
    Assignments,
    AudioAsset,
    Authentication,
    AuthenticationScheme,
    AuthorizedAgents,
    AuthorizedSalesAgents,
    AvailableMetric,
    BrandManifest,
    BuildCreativeRequest,
    BuildCreativeResponse,
    ByPackageItem,
    CoBrandingRequirement,
    Colors,
    Contact,
    Country,
    # Pricing options
    CpcPricingOption,
    CpcvPricingOption,
    CpmAuctionPricingOption,
    CpmFixedRatePricingOption,
    CppPricingOption,
    CpvPricingOption,
    CreateMediaBuyRequest,
    CreateMediaBuyResponse,
    Creative,
    CreativeAction,
    CreativeAgent,
    CreativeAgentCapability,
    CreativeAsset,
    CreativeAssignment,
    CreativeFilters,
    CreativeManifest,
    CreativePolicy,
    # Enums and constants
    CreativeStatus,
    CssAsset,
    DaastTrackingEvent,
    DaastVersion,
    DailyBreakdownItem,
    DeliverTo,
    DeliveryMeasurement,
    DeliveryMetrics,
    DeliveryType,
    DimensionUnit,
    Disclaimer,
    DoohMetrics,
    Embedding,
    Error,
    FeedbackSource,
    FieldModel,
    FlatRatePricingOption,
    Fonts,
    Format,
    FormatCard,
    FormatCardDetailed,
    FormatCategory,
    FormatId,
    FormatIdParameter,
    FrequencyCap,
    FrequencyCapScope,
    GeoCountryAnyOfItem,
    GetMediaBuyDeliveryRequest,
    GetMediaBuyDeliveryResponse,
    GetProductsRequest,
    GetProductsResponse,
    GetSignalsRequest,
    GetSignalsResponse,
    HtmlAsset,
    HttpMethod,
    Identifier,
    ImageAsset,
    Input,
    JavascriptAsset,
    JavascriptModuleType,
    LandingPageRequirement,
    ListAuthorizedPropertiesRequest,
    ListAuthorizedPropertiesResponse,
    ListCreativeFormatsRequest,
    ListCreativeFormatsResponse,
    ListCreativesRequest,
    ListCreativesResponse,
    Logo,
    MarkdownFlavor,
    Measurement,
    MeasurementPeriod,
    MediaBuy,
    MediaBuyDelivery,
    MediaBuyStatus,
    Metadata,
    MetricType,
    NotificationType,
    Offering,
    Pacing,
    PackageRequest,
    Packages,
    Pagination,
    Parameters,
    Performance,
    PerformanceFeedback,
    Placement,
    Preview,
    PreviewCreativeRequest,
    PreviewCreativeResponse,
    PreviewOutputFormat,
    PreviewRender,
    PriceGuidance,
    Pricing,
    PricingModel,
    PrimaryCountry,
    Product,
    ProductCard,
    ProductCardDetailed,
    ProductCatalog,
    ProductFilters,
    Progress,
    PromotedOfferings,
    PromotedProducts,
    Property,
    PropertyIdentifierTypes,
    PropertyType,
    ProtocolEnvelope,
    ProtocolResponse,
    ProvidePerformanceFeedbackRequest,
    ProvidePerformanceFeedbackResponse,
    PublisherDomain,
    PublisherIdentifierTypes,
    PushNotificationConfig,
    QuartileData,
    QuerySummary,
    ReportingCapabilities,
    ReportingFrequency,
    ReportingPeriod,
    ReportingWebhook,
    Request,
    RequestedMetric,
    Response,
    Responsive,
    Results,
    Security,
    Signal,
    SignalCatalogType,
    SignalFilters,
    Sort,
    SortApplied,
    StandardFormatIds,
    Status,
    StatusSummary,
    SyncCreativesRequest,
    SyncCreativesResponse,
    Tags,
    TargetingOverlay,
    TaskType,
    TextAsset,
    Totals,
    UpdateFrequency,
    UpdateMediaBuyRequest,
    UpdateMediaBuyResponse,
    UrlAsset,
    UrlAssetType,
    ValidationMode,
    VastTrackingEvent,
    VastVersion,
    VcpmAuctionPricingOption,
    VcpmFixedRatePricingOption,
    VenueBreakdownItem,
    VideoAsset,
    ViewThreshold,
    WebhookAsset,
    WebhookPayload,
    WebhookResponseType,
)
from adcp.types._generated import (
    TaskStatus as GeneratedTaskStatus,
)
from adcp.types._generated import (
    _PackageFromPackage as Package,
)

# Import semantic aliases for discriminated unions
from adcp.types.aliases import (
    # Activation responses
    ActivateSignalErrorResponse,
    ActivateSignalSuccessResponse,
    # Agent deployment aliases
    AgentDeployment,
    AgentDestination,
    # Authorized agent variants
    AuthorizedAgent,
    AuthorizedAgentsByInlineProperties,
    AuthorizedAgentsByPropertyId,
    AuthorizedAgentsByPropertyTag,
    AuthorizedAgentsByPublisherProperties,
    # Preview/render aliases
    BothPreviewRender,
    # Build creative responses
    BuildCreativeErrorResponse,
    BuildCreativeSuccessResponse,
    # Create media buy responses
    CreateMediaBuyErrorResponse,
    CreateMediaBuySuccessResponse,
    # Deployment union
    Deployment,
    # Destination union
    Destination,
    # Preview renders
    HtmlPreviewRender,
    # Asset aliases
    InlineDaastAsset,
    InlineVastAsset,
    # SubAsset aliases
    MediaSubAsset,
    # Platform deployment
    PlatformDeployment,
    PlatformDestination,
    # Preview requests
    PreviewCreativeFormatRequest,
    PreviewCreativeInteractiveResponse,
    PreviewCreativeManifestRequest,
    PreviewCreativeStaticResponse,
    # Publisher property selectors
    PropertyId,
    PropertyIdActivationKey,
    PropertyTag,
    PropertyTagActivationKey,
    ProvidePerformanceFeedbackErrorResponse,
    ProvidePerformanceFeedbackSuccessResponse,
    # Publisher properties variants
    PublisherPropertiesAll,
    PublisherPropertiesById,
    PublisherPropertiesByTag,
    # Sync responses
    SyncCreativesErrorResponse,
    SyncCreativesSuccessResponse,
    # Text subassets
    TextSubAsset,
    # Update media buy variants
    UpdateMediaBuyErrorResponse,
    UpdateMediaBuyPackagesRequest,
    UpdateMediaBuyPropertiesRequest,
    UpdateMediaBuySuccessResponse,
    # URL aliases
    UrlDaastAsset,
    UrlPreviewRender,
    UrlVastAsset,
)

# Re-export core types (not in generated, but part of public API)
# Note: We don't import TaskStatus here to avoid shadowing GeneratedTaskStatus
# Users should import TaskStatus from adcp.types.core directly if they need the core enum
from adcp.types.core import AgentConfig, Protocol, TaskResult, WebhookMetadata

# Backward compatibility aliases
AssetType = AssetContentType  # Use AssetContentType instead

# Schema renames from filter ref split (v1.0.0)
Action = CreativeAction
Capability = CreativeAgentCapability
CatalogType = SignalCatalogType
CoBranding = CoBrandingRequirement
FormatType = FormatCategory
LandingPage = LandingPageRequirement
Method = HttpMethod
ModuleType = JavascriptModuleType
TrackingEvent = VastTrackingEvent  # Split into DaastTrackingEvent and VastTrackingEvent
Unit = DimensionUnit
OutputFormat = PreviewOutputFormat
ResponseType = WebhookResponseType
Scheme = AuthenticationScheme
SignalType = SignalCatalogType
UrlType = UrlAssetType
AvailableReportingFrequency = ReportingFrequency

__all__ = [
    # Request/Response types
    "ActivateSignalRequest",
    "ActivateSignalResponse",
    "CreativeAction",
    "AggregatedTotals",
    "BuildCreativeRequest",
    "BuildCreativeResponse",
    "ByPackageItem",
    "CreateMediaBuyRequest",
    "CreateMediaBuyResponse",
    "DailyBreakdownItem",
    "GetMediaBuyDeliveryRequest",
    "GetMediaBuyDeliveryResponse",
    "GetProductsRequest",
    "GetProductsResponse",
    "GetSignalsRequest",
    "GetSignalsResponse",
    "ListAuthorizedPropertiesRequest",
    "ListAuthorizedPropertiesResponse",
    "ListCreativeFormatsRequest",
    "ListCreativeFormatsResponse",
    "ListCreativesRequest",
    "ListCreativesResponse",
    "MediaBuyDelivery",
    "PreviewCreativeRequest",
    "PreviewCreativeResponse",
    "Progress",
    "ProtocolEnvelope",
    "ProtocolResponse",
    "ProvidePerformanceFeedbackRequest",
    "ProvidePerformanceFeedbackResponse",
    "QuerySummary",
    "SortApplied",
    "StatusSummary",
    "SyncCreativesRequest",
    "SyncCreativesResponse",
    "Totals",
    "UpdateMediaBuyRequest",
    "UpdateMediaBuyResponse",
    # Domain types
    "Asset",
    "AssetSelectors",
    "AssetContentType",
    "AssetType",  # Deprecated
    "FormatCategory",
    "AssetsRequired",
    "AssignedPackage",
    "Assignments",
    "BrandManifest",
    "CreativeAgentCapability",
    "CoBrandingRequirement",
    "Colors",
    "Contact",
    "Creative",
    "CreativeAgent",
    "CreativeAsset",
    "CreativeAssignment",
    "CreativeFilters",
    "CreativeManifest",
    "CreativePolicy",
    "DeliveryMeasurement",
    "DeliveryMetrics",
    "Disclaimer",
    "DoohMetrics",
    "Embedding",
    "Error",
    "FeedFormat",
    "Fonts",
    "Format",
    "FormatCard",
    "FormatCardDetailed",
    "FormatId",
    "FormatIdParameter",
    "Identifier",
    "Input",
    "LandingPageRequirement",
    "Logo",
    "MediaBuy",
    "Metadata",
    "Offering",
    "Package",
    "PackageRequest",
    "Packages",
    "Parameters",
    "Performance",
    "PerformanceFeedback",
    "Placement",
    "Preview",
    "PreviewRender",
    "Pricing",
    "Product",
    "ProductCard",
    "ProductCardDetailed",
    "ProductCatalog",
    "ProductFilters",
    "PromotedOfferings",
    "PromotedProducts",
    "Property",
    "QuartileData",
    "Request",
    "Response",
    "Results",
    "Signal",
    "SignalFilters",
    "Tags",
    "TargetingOverlay",
    "VenueBreakdownItem",
    # Pricing types
    "CpcPricingOption",
    "CpcvPricingOption",
    "CpmAuctionPricingOption",
    "CpmFixedRatePricingOption",
    "CppPricingOption",
    "CpvPricingOption",
    "FlatRatePricingOption",
    "PriceGuidance",
    "VcpmAuctionPricingOption",
    "VcpmFixedRatePricingOption",
    # Status enums & simple types
    "SignalCatalogType",
    "Country",
    "CreativeStatus",
    "DaastVersion",
    "DeliverTo",
    "DeliveryType",
    "Direction",
    "FeedbackSource",
    "FieldModel",
    "FrequencyCap",
    "FrequencyCapScope",
    "GeoCountryAnyOfItem",
    "MarkdownFlavor",
    "Measurement",
    "MeasurementPeriod",
    "MediaBuyStatus",
    "HttpMethod",
    "MetricType",
    "JavascriptModuleType",
    "NotificationType",
    "PreviewOutputFormat",
    "Pacing",
    "Pagination",
    "PricingModel",
    "PrimaryCountry",
    "PropertyIdentifierTypes",
    "PropertyType",
    "PublisherDomain",
    "PublisherIdentifierTypes",
    "WebhookResponseType",
    "Responsive",
    "Sort",
    "StandardFormatIds",
    "Status",
    "TaskType",
    "DaastTrackingEvent",
    "VastTrackingEvent",
    "DimensionUnit",
    "UpdateFrequency",
    "UrlAssetType",
    "ValidationMode",
    "VastVersion",
    "ViewThreshold",
    # Configuration & infrastructure types
    "Authentication",
    "AuthorizedAgents",
    "AuthorizedSalesAgents",
    "AvailableMetric",
    "PushNotificationConfig",
    "ReportingCapabilities",
    "ReportingFrequency",
    "ReportingPeriod",
    "ReportingWebhook",
    "RequestedMetric",
    "AuthenticationScheme",
    "Security",
    # Assets
    "AudioAsset",
    "CssAsset",
    "HtmlAsset",
    "ImageAsset",
    "JavascriptAsset",
    "TextAsset",
    "UrlAsset",
    "VideoAsset",
    "WebhookAsset",
    "WebhookPayload",
    # Core types
    "AgentConfig",
    "Protocol",
    "TaskResult",
    "WebhookMetadata",
    # Semantic aliases for discriminated unions
    "ActivateSignalErrorResponse",
    "ActivateSignalSuccessResponse",
    "AgentDeployment",
    "AgentDestination",
    "AuthorizedAgent",
    "AuthorizedAgentsByInlineProperties",
    "AuthorizedAgentsByPropertyId",
    "AuthorizedAgentsByPropertyTag",
    "AuthorizedAgentsByPublisherProperties",
    "BothPreviewRender",
    "BuildCreativeErrorResponse",
    "BuildCreativeSuccessResponse",
    "CreateMediaBuyErrorResponse",
    "CreateMediaBuySuccessResponse",
    "Deployment",
    "Destination",
    "HtmlPreviewRender",
    "InlineDaastAsset",
    "InlineVastAsset",
    "MediaSubAsset",
    "PlatformDeployment",
    "PlatformDestination",
    "PreviewCreativeFormatRequest",
    "PreviewCreativeInteractiveResponse",
    "PreviewCreativeManifestRequest",
    "PreviewCreativeStaticResponse",
    "PropertyId",
    "PropertyIdActivationKey",
    "PropertyTag",
    "PropertyTagActivationKey",
    "ProvidePerformanceFeedbackErrorResponse",
    "ProvidePerformanceFeedbackSuccessResponse",
    "PublisherPropertiesAll",
    "PublisherPropertiesById",
    "PublisherPropertiesByTag",
    "SyncCreativesErrorResponse",
    "SyncCreativesSuccessResponse",
    "TextSubAsset",
    "UpdateMediaBuyErrorResponse",
    "UpdateMediaBuyPackagesRequest",
    "UpdateMediaBuyPropertiesRequest",
    "UpdateMediaBuySuccessResponse",
    "UrlDaastAsset",
    "UrlPreviewRender",
    "UrlVastAsset",
    # Internal/special exports
    "GeneratedTaskStatus",
    # Backward compatibility aliases (deprecated)
    "Action",
    "Capability",
    "CatalogType",
    "CoBranding",
    "FormatType",
    "LandingPage",
    "Method",
    "ModuleType",
    "TrackingEvent",
    "Unit",
    "OutputFormat",
    "ResponseType",
    "Scheme",
    "SignalType",
    "UrlType",
    "AvailableReportingFrequency",
    # Submodules for advanced use:
    "generated",
    "aliases",
]
