# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .count_companies_for_advanced_filter_response_params_sort_order_direction import (
    CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection,
)


class CountCompaniesForAdvancedFilterParams(UniversalBaseModel):
    """
    Input parameters
    """

    credit_type_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Filter companies by one or more credit type IDs (each ID starts with bcrd_)
    """

    display_properties: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Select the display columns to return (e.g. plan, subscription, users, last_seen_at)
    """

    feature_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Filter companies by one or more feature IDs (each ID starts with feat_)
    """

    ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Filter companies by multiple company IDs (starts with comp_)
    """

    limit: typing.Optional[int] = pydantic.Field(default=None)
    """
    Page limit (default 100)
    """

    monetized_subscriptions: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Filter companies that have monetized subscriptions
    """

    offset: typing.Optional[int] = pydantic.Field(default=None)
    """
    Page offset (default 0)
    """

    plan_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Filter companies by one or more plan IDs (each ID starts with plan_)
    """

    q: typing.Optional[str] = pydantic.Field(default=None)
    """
    Search for companies by name, keys or string traits
    """

    sort_order_column: typing.Optional[str] = pydantic.Field(default=None)
    """
    Column to sort by (e.g. name, created_at, last_seen_at)
    """

    sort_order_direction: typing.Optional[CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection] = (
        pydantic.Field(default=None)
    )
    """
    Direction to sort by (asc or desc)
    """

    subscription_statuses: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid)
    """

    subscription_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Filter companies by one or more subscription types (paid, free, trial)
    """

    without_plan: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Filter out companies that have a plan
    """

    without_subscription: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Filter out companies that have a subscription
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
