# generated by datamodel-codegen:
#   filename:  openapi-normalized.json
#   timestamp: 2026-02-13T10:24:09+00:00

from __future__ import annotations

from enum import Enum
from typing import Any

from pydantic import AnyUrl, BaseModel, Field, RootModel


class V2AccountWhoamiGetResponse(BaseModel):
    id: str
    name: str
    permissions: list[str]


class V2AccountWhoamiGetResponse1(BaseModel):
    error: str


class Status(Enum):
    ACTIVE = "active"
    EXPIRED = "expired"
    AWAITING_2FA = "awaiting_2fa"


class Imported(Enum):
    TRUE = "true"
    FALSE = "false"


class UserData(BaseModel):
    id: str
    """
    The ID of the user.
    """
    name: str
    """
    The name of the user.
    """
    username: str
    """
    The username of the user.
    """
    avatar: str
    """
    The avatar of the user.
    """


class ListItem(BaseModel):
    status: Status
    """
    The status of the connection.
    """
    id: str
    """
    The ID of the connection.
    """
    userData: UserData
    """
    Data could be outdated if the connection is expired, but will be updated once the account has been reconnected.
    """
    permissions: list[str]
    """
    The permissions of the connection.
    """
    expiredAt: str
    """
    The expiration date of the connection.
    """
    createdAt: str
    """
    The creation date of the connection.
    """
    updatedAt: str
    """
    The last update date of the connection.
    """
    clientReferenceId: str
    """
    The client reference ID of the connection.
    """
    imported: bool
    """
    Whether this is an imported (non-managed) connection.
    """
    lastCheckedAt: str
    """
    The last time the connection was checked or used.
    """


class V2AccountConnectionsGetResponse(BaseModel):
    list: list[ListItem]
    hasMore: bool


class ImageQuality(Enum):
    THUMB = "thumb"
    PREVIEW = "preview"
    FULL = "full"


class VideoQuality(Enum):
    PREVIEW = "preview"
    FIELD_720P = "720p"
    FIELD_1080P = "1080p"
    SOURCE = "source"


class StorageLimitPurgeStrategy(Enum):
    PURGE_OLDEST = "purge_oldest"
    PURGE_LARGEST = "purge_largest"
    PURGE_SMALLEST = "purge_smallest"
    BLOCK_NEW = "block_new"


class SettingsOverrides(BaseModel):
    autoCacheVault: bool | None = None
    autoCacheMessages: bool | None = None
    autoCachePosts: bool | None = None
    autoCacheStories: bool | None = None
    minAccessCountVault: float | None = None
    minAccessCountMessages: float | None = None
    minAccessCountPosts: float | None = None
    minAccessCountStories: float | None = None
    cacheImages: bool | None = None
    cacheVideos: bool | None = None
    cacheAudio: bool | None = None
    imageQualities: list[ImageQuality] | None = None
    videoQualities: list[VideoQuality] | None = None
    retentionDays: float | None = None
    accessExpiryDays: float | None = None
    presignedUrlTtlSeconds: float | None = None
    storageLimitBytes: float | None = None
    storageLimitPurgeStrategy: StorageLimitPurgeStrategy | None = None


class Stats(BaseModel):
    vaultPlusEnabled: bool
    totalStorageBytes: float
    storageLimitBytes: float
    mediaCount: float
    storedCount: float
    storageUsagePercent: float


class VaultPlus(BaseModel):
    enabled: bool
    settingsOverrides: SettingsOverrides
    stats: Stats


class V2AccountConnectionsConnectionIdSettingsGetResponse(BaseModel):
    connectionId: str
    vaultPlus: VaultPlus


class Settings(BaseModel):
    autoCacheVault: bool | None = None
    autoCacheMessages: bool | None = None
    autoCachePosts: bool | None = None
    autoCacheStories: bool | None = None
    minAccessCountVault: float | None = None
    minAccessCountMessages: float | None = None
    minAccessCountPosts: float | None = None
    minAccessCountStories: float | None = None
    cacheImages: bool | None = None
    cacheVideos: bool | None = None
    cacheAudio: bool | None = None
    imageQualities: list[ImageQuality] | None = None
    videoQualities: list[VideoQuality] | None = None
    retentionDays: float | None = None
    accessExpiryDays: float | None = None
    presignedUrlTtlSeconds: float | None = None
    storageLimitBytes: float | None = None
    storageLimitPurgeStrategy: StorageLimitPurgeStrategy | None = None


class VaultPlus1(BaseModel):
    enabled: bool | None = None
    settings: Settings | None = None


class V2AccountConnectionsConnectionIdSettingsPatchRequest(BaseModel):
    vaultPlus: VaultPlus1 | None = None


class SettingsOverrides1(BaseModel):
    autoCacheVault: bool | None = None
    autoCacheMessages: bool | None = None
    autoCachePosts: bool | None = None
    autoCacheStories: bool | None = None
    minAccessCountVault: float | None = None
    minAccessCountMessages: float | None = None
    minAccessCountPosts: float | None = None
    minAccessCountStories: float | None = None
    cacheImages: bool | None = None
    cacheVideos: bool | None = None
    cacheAudio: bool | None = None
    imageQualities: list[ImageQuality] | None = None
    videoQualities: list[VideoQuality] | None = None
    retentionDays: float | None = None
    accessExpiryDays: float | None = None
    presignedUrlTtlSeconds: float | None = None
    storageLimitBytes: float | None = None
    storageLimitPurgeStrategy: StorageLimitPurgeStrategy | None = None


class VaultPlus2(BaseModel):
    enabled: bool
    settingsOverrides: SettingsOverrides1
    stats: Stats


class Settings1(BaseModel):
    connectionId: str
    vaultPlus: VaultPlus2


class PurgeResult(BaseModel):
    purgedCount: float
    freedBytes: float


class V2AccountConnectionsConnectionIdSettingsPatchResponse(BaseModel):
    settings: Settings1
    purgeResult: PurgeResult | None = None


class V2AccountConnectionsImportPostRequest(BaseModel):
    cookie: str
    """
    The OnlyFans session cookie string. Must contain `auth_id`, `sess`, and `fp` values.
    """
    userAgent: str
    """
    The user agent string that was used to create this session.
    """
    permissions: list[str] | None = None
    """
    Permissions to grant. Defaults to organization permissions.
    """
    clientReferenceId: str | None = None
    """
    Optional client reference ID for tracking.
    """


class V2AccountConnectionsImportPostResponse(BaseModel):
    status: Status
    """
    The status of the connection.
    """
    id: str
    """
    The ID of the connection.
    """
    userData: UserData
    """
    Data could be outdated if the connection is expired, but will be updated once the account has been reconnected.
    """
    permissions: list[str]
    """
    The permissions of the connection.
    """
    expiredAt: str
    """
    The expiration date of the connection.
    """
    createdAt: str
    """
    The creation date of the connection.
    """
    updatedAt: str
    """
    The last update date of the connection.
    """
    clientReferenceId: str
    """
    The client reference ID of the connection.
    """
    imported: bool
    """
    Whether this is an imported (non-managed) connection.
    """
    lastCheckedAt: str
    """
    The last time the connection was checked or used.
    """


class V2AccountConnectionsImportConnectionIdPatchRequest(BaseModel):
    cookie: str
    """
    The OnlyFans session cookie string. Must contain `auth_id`, `sess`, and `fp` values.
    """
    userAgent: str
    """
    The user agent string that was used to create this session.
    """


class V2AccountConnectionsImportConnectionIdPatchResponse(BaseModel):
    status: Status
    """
    The status of the connection.
    """
    id: str
    """
    The ID of the connection.
    """
    userData: UserData
    """
    Data could be outdated if the connection is expired, but will be updated once the account has been reconnected.
    """
    permissions: list[str]
    """
    The permissions of the connection.
    """
    expiredAt: str
    """
    The expiration date of the connection.
    """
    createdAt: str
    """
    The creation date of the connection.
    """
    updatedAt: str
    """
    The last update date of the connection.
    """
    clientReferenceId: str
    """
    The client reference ID of the connection.
    """
    imported: bool
    """
    Whether this is an imported (non-managed) connection.
    """
    lastCheckedAt: str
    """
    The last time the connection was checked or used.
    """


class DefaultSettings(BaseModel):
    autoCacheVault: bool
    autoCacheMessages: bool
    autoCachePosts: bool
    autoCacheStories: bool
    minAccessCountVault: float
    minAccessCountMessages: float
    minAccessCountPosts: float
    minAccessCountStories: float
    cacheImages: bool
    cacheVideos: bool
    cacheAudio: bool
    imageQualities: list[str]
    videoQualities: list[str]
    retentionDays: float
    accessExpiryDays: float
    presignedUrlTtlSeconds: float
    storageLimitBytes: float
    storageLimitPurgeStrategy: str


class VaultPlus3(BaseModel):
    autoEnableForNewConnections: bool
    defaultSettings: DefaultSettings


class V2AccountSettingsGetResponse(BaseModel):
    vaultPlus: VaultPlus3


class DefaultSettings1(BaseModel):
    autoCacheVault: bool | None = None
    autoCacheMessages: bool | None = None
    autoCachePosts: bool | None = None
    autoCacheStories: bool | None = None
    minAccessCountVault: float | None = None
    minAccessCountMessages: float | None = None
    minAccessCountPosts: float | None = None
    minAccessCountStories: float | None = None
    cacheImages: bool | None = None
    cacheVideos: bool | None = None
    cacheAudio: bool | None = None
    imageQualities: list[ImageQuality] | None = None
    videoQualities: list[VideoQuality] | None = None
    retentionDays: float | None = None
    accessExpiryDays: float | None = None
    presignedUrlTtlSeconds: float | None = None
    storageLimitBytes: float | None = None
    storageLimitPurgeStrategy: StorageLimitPurgeStrategy | None = None


class VaultPlus4(BaseModel):
    autoEnableForNewConnections: bool | None = None
    applyToExistingConnections: bool | None = None
    defaultSettings: DefaultSettings1 | None = None


class V2AccountSettingsPatchRequest(BaseModel):
    vaultPlus: VaultPlus4 | None = None


class DefaultSettings2(BaseModel):
    autoCacheVault: bool
    autoCacheMessages: bool
    autoCachePosts: bool
    autoCacheStories: bool
    minAccessCountVault: float
    minAccessCountMessages: float
    minAccessCountPosts: float
    minAccessCountStories: float
    cacheImages: bool
    cacheVideos: bool
    cacheAudio: bool
    imageQualities: list[str]
    videoQualities: list[str]
    retentionDays: float
    accessExpiryDays: float
    presignedUrlTtlSeconds: float
    storageLimitBytes: float
    storageLimitPurgeStrategy: str


class VaultPlus5(BaseModel):
    autoEnableForNewConnections: bool
    defaultSettings: DefaultSettings2


class Settings2(BaseModel):
    vaultPlus: VaultPlus5


class PurgeResult1(BaseModel):
    connectionId: str
    purgedCount: float
    freedBytes: float


class BroadcastResult(BaseModel):
    affectedConnections: float
    purgeResults: list[PurgeResult1]


class V2AccountSettingsPatchResponse(BaseModel):
    settings: Settings2
    broadcastResult: BroadcastResult | None = None


class IsAuth(Enum):
    BOOLEAN_TRUE = True


class V2AccessSelfGetResponse1(BaseModel):
    id: float
    username: str
    name: str
    isAuth: IsAuth
    isVerified: bool
    avatar: str
    subscribersCount: float
    postsCount: float
    photosCount: float
    videosCount: float


class IsAuth1(Enum):
    BOOLEAN_FALSE = False


class V2AccessSelfGetResponse2(BaseModel):
    isAuth: IsAuth1


class V2AccessSelfGetResponse(
    RootModel[V2AccessSelfGetResponse1 | V2AccessSelfGetResponse2]
):
    root: V2AccessSelfGetResponse1 | V2AccessSelfGetResponse2


class V2AccessSelfPatchRequest(BaseModel):
    name: str | None = Field(None, max_length=100)
    """
    Display name
    """
    about: str | None = Field(None, max_length=1000)
    """
    Profile bio/description
    """


class AvatarThumbs(BaseModel):
    c50: str
    c144: str


class List(BaseModel):
    id: str | float
    type: str
    name: str


class HeaderSize(BaseModel):
    width: float
    height: float


class HeaderThumbs(BaseModel):
    w480: str
    w760: str


class Subscribe(BaseModel):
    id: float
    userId: float
    subscriberId: float
    date: str
    duration: float
    startDate: str
    expireDate: str
    cancelDate: str
    price: float
    regularPrice: float
    discount: float
    earningId: float
    action: str
    type: str
    offerStart: str
    offerEnd: str
    isCurrent: bool


class SubscribedByData(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    showPostsInFeed: bool
    subscribes: list[Subscribe]


class SubscribedOnData(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    subscribes: list[Subscribe]
    tipsSumm: float
    subscribesSumm: float
    messagesSumm: float
    postsSumm: float
    streamsSumm: float
    totalSumm: float


class V2AccessSelfPatchResponse(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None
    lists: list[List]
    displayName: str | None = None
    notice: str | None = None
    about: str | None = None
    isMarkdownDisabledForAbout: bool | None = None
    website: str | None = None
    wishlist: str | None = None
    location: str | None = None
    header: str | None = None
    headerSize: HeaderSize | None = None
    headerThumbs: HeaderThumbs | None = None
    subscribersCount: float | None = None
    postsCount: float | None = None
    archivedPostsCount: float | None = None
    privateArchivedPostsCount: float | None = None
    photosCount: float | None = None
    videosCount: float | None = None
    audiosCount: float | None = None
    mediasCount: float | None = None
    favoritesCount: float | None = None
    favoritedCount: float | None = None
    joinDate: str | None = None
    lastSeen: str | None = None
    subscribedBy: bool | None = None
    subscribedByExpire: bool | None = None
    subscribedByExpireDate: str | None = None
    subscribedByAutoprolong: bool | None = None
    subscribedIsExpiredNow: bool | None = None
    subscribedByData: SubscribedByData | None = None
    subscribedOn: bool | None = None
    subscribedOnExpiredNow: bool | None = None
    subscribedOnDuration: str | None = None
    subscribedOnData: SubscribedOnData | None = None
    subscribePrice: float | None = None
    currentSubscribePrice: float | None = None
    canAddSubscriber: bool | None = None
    tipsEnabled: bool | None = None
    tipsTextEnabled: bool | None = None
    tipsMin: float | None = None
    tipsMinInternal: float | None = None
    tipsMax: float | None = None
    canLookStory: bool | None = None
    canCommentStory: bool | None = None
    hasNotViewedStory: bool | None = None
    hasStories: bool | None = None
    isRestricted: bool | None = None
    canRestrict: bool | None = None
    isBlocked: bool | None = None
    canReport: bool | None = None
    canUnsubscribe: bool | None = None
    isPendingAutoprolong: bool | None = None
    isPerformer: bool | None = None
    isRealPerformer: bool | None = None
    canReceiveChatMessage: bool | None = None
    canChat: bool | None = None
    showPostsInFeed: bool | None = None
    hasPinnedPosts: bool | None = None
    hasLabels: bool | None = None
    isPrivateRestriction: bool | None = None
    showSubscribersCount: bool | None = None
    showMediaCount: bool | None = None
    isReferrerAllowed: bool | None = None
    canCreatePromotion: bool | None = None
    canCreateTrial: bool | None = None
    isAdultContent: bool | None = None
    canTrialSend: bool | None = None
    isFriend: bool | None = None
    hasScheduledStream: bool | None = None
    hasStream: bool | None = None
    canPayInternal: bool | None = None


class Type(Enum):
    SUBSCRIBED = "subscribed"
    PURCHASES = "purchases"
    TIP = "tip"
    POST = "post"
    COMMENTED = "commented"
    MENTIONED = "mentioned"
    FAVORITED = "favorited"
    MESSAGE = "message"


class ListItem1(BaseModel):
    id: float
    type: str
    subType: str
    createdAt: str
    isRead: bool
    text: str
    replacePairs: dict[str, str]
    canGoToProfile: bool
    userId: float


class V2AccessSelfNotificationsGetResponse(BaseModel):
    list: list[ListItem1]
    hasMore: bool


class Filter(Enum):
    ALL = "all"
    PENDING = "pending"


class SortBy(Enum):
    DATE = "date"
    NAME = "name"


class SortDirection(Enum):
    ASC = "asc"
    DESC = "desc"


class ListItem2(BaseModel):
    id: float
    type: str
    name: str
    partnerId: float
    code: str
    status: str
    createdAt: str
    approvedAt: str
    lastChangedAt: str
    userName: str
    hasUser: bool
    isHidden: bool


class V2AccessSelfReleaseFormsGetResponse(BaseModel):
    list: list[ListItem2]
    hasMore: bool


class User(BaseModel):
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    isHidden: bool


class ListItem3(BaseModel):
    id: float
    type: str
    name: str
    user: User


class V2AccessSelfTaggedFriendUsersGetResponse(BaseModel):
    list: list[ListItem3]
    hasMore: bool


class By(Enum):
    TOTAL = "total"
    MESSAGES = "messages"
    TIPS = "tips"
    STREAM = "stream"
    POST = "post"
    SUBSCRIBES = "subscribes"
    TIPS_PROFILE = "tips_profile"
    TIPS_POST = "tips_post"
    TIPS_CHAT = "tips_chat"
    TIPS_STREAM = "tips_stream"
    TIPS_STORY = "tips_story"
    REF = "ref"


class ChartItem(BaseModel):
    date: str
    count: float


class V2AccessEarningsChartGetResponse(BaseModel):
    chart: list[ChartItem]
    total: float
    gross: float | None = None
    delta: float | None = None


class Type1(Enum):
    SUBSCRIBES = "subscribes"
    CHAT_MESSAGES = "chat_messages"
    POST = "post"
    STREAM = "stream"
    TIPS = "tips"


class TipsSource(Enum):
    CHAT = "chat"
    POST_ALL = "post_all"
    PROFILE = "profile"
    STORY = "story"
    STREAM = "stream"


class Amounts(BaseModel):
    gross: float
    net: float
    fee: float
    vat: float
    tax: float


class User1(BaseModel):
    id: float
    name: str
    username: str
    avatar: str


class ListItem4(BaseModel):
    id: str
    type: str
    createdAt: str
    amounts: Amounts
    currency: str
    description: str
    status: str
    payoutPendingDays: float
    user: User1


class V2AccessEarningsTransactionsGetResponse(BaseModel):
    list: list[ListItem4]
    hasMore: bool
    nextMarker: float


class Payment(BaseModel):
    id: str
    createdAt: str
    amounts: Amounts
    currency: str
    description: str
    status: str
    user: User1


class ListItem5(BaseModel):
    id: float
    createdAt: str
    paymentType: str
    payment: Payment


class V2AccessEarningsChargebacksGetResponse(BaseModel):
    list: list[ListItem5]
    hasMore: bool
    nextMarker: float


class By1(Enum):
    PURCHASES = "purchases"
    POSTS = "posts"
    TIPS = "tips"
    VIEWS = "views"
    LIKES = "likes"
    COMMENTS = "comments"


class V2AccessAnalyticsPostsChartGetResponse1(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class V2AccessAnalyticsPostsChartGetResponse(
    RootModel[dict[str, V2AccessAnalyticsPostsChartGetResponse1]]
):
    root: dict[str, V2AccessAnalyticsPostsChartGetResponse1]


class By2(Enum):
    PURCHASES = "purchases"
    TIPS = "tips"
    VIEWS = "views"
    LIKES = "likes"
    COMMENTS = "comments"


class Type2(Enum):
    PHOTO = "photo"
    VIDEO = "video"
    GIF = "gif"
    AUDIO = "audio"


class User3(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User3 | None = None


class VideoSources(BaseModel):
    field_240: str | None = Field(None, alias="240")
    field_720: str | None = Field(None, alias="720")


class Source(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    type: str | None = None


class Full(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Thumb(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None


class Option(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    type: str | None = None


class Preview(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option]


class SquarePreview(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None


class Files(BaseModel):
    full: Full
    thumb: Thumb | None = None
    preview: Preview | None = None
    squarePreview: SquarePreview | None = None


class MediaItem(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files | None = None


class Author(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class UniqueLookChartItem(BaseModel):
    date: str
    count: float


class LookChartItem(BaseModel):
    date: str
    count: float


class LikeChartItem(BaseModel):
    date: str
    count: float


class CommentChartItem(BaseModel):
    date: str
    count: float


class TipChartItem(BaseModel):
    date: str
    count: float


class Stats2(BaseModel):
    isAvailable: bool
    hasStats: bool
    hasVideo: bool | None = None
    lookCount: float
    uniqueLookCount: float
    uniqueLookChart: list[UniqueLookChartItem]
    lookChart: list[LookChartItem]
    lookDuration: float
    lookDurationAverage: float
    likeCount: float
    likeChart: list[LikeChartItem]
    commentCount: float
    commentChart: list[CommentChartItem]
    tipCount: float
    tipChart: list[TipChartItem]
    tipSum: float
    purchasedCount: float
    purchasedSumm: float


class Option1(BaseModel):
    id: float
    text: str | None = None
    count: float | None = None
    percent: float | None = None
    isWinner: bool | None = None


class Voting(BaseModel):
    finishedAt: str
    options: list[Option1]
    total: float


class Item(BaseModel):
    id: float
    canDelete: bool
    canEdit: bool
    mediaCount: float
    media: list[MediaItem]
    canViewMedia: bool
    author: Author | None = None
    responseType: str
    postedAt: str
    postedAtPrecise: str
    isMarkdownDisabled: bool
    isOpened: bool
    canToggleFavorite: bool
    tipsAmount: str
    text: str
    isFavorite: bool
    canComment: bool
    favoritesCount: float
    isMediaReady: bool
    rawText: str
    stats: Stats2 | None = None
    hasVoting: bool | None = None
    votingType: float | None = None
    voting: Voting | None = None


class V2AccessAnalyticsPostsTopGetResponse(BaseModel):
    hasMore: bool
    items: list[Item]


class TipSumChartItem(BaseModel):
    date: str
    count: float


class PurchasesChartItem(BaseModel):
    date: str
    count: float


class V2AccessAnalyticsPostsPostIdGetResponse(BaseModel):
    isAvailable: bool
    hasStats: bool
    hasVideo: bool | None = None
    lookCount: float
    uniqueLookCount: float
    uniqueLookChart: list[UniqueLookChartItem]
    lookChart: list[LookChartItem]
    lookDuration: float
    lookDurationAverage: float
    likeCount: float
    likeChart: list[LikeChartItem]
    commentCount: float
    commentChart: list[CommentChartItem]
    tipCount: float
    tipChart: list[TipChartItem]
    tipSum: float
    purchasedCount: float
    purchasedSumm: float
    tipSumChart: list[TipSumChartItem]
    purchasesChart: list[PurchasesChartItem]


class By3(Enum):
    PURCHASES = "purchases"
    DURATION = "duration"
    TIPS = "tips"
    VIEWS = "views"
    LIKES = "likes"
    COMMENTS = "comments"


class V2AccessAnalyticsStreamsChartGetResponse1(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class V2AccessAnalyticsStreamsChartGetResponse(
    RootModel[dict[str, V2AccessAnalyticsStreamsChartGetResponse1]]
):
    root: dict[str, V2AccessAnalyticsStreamsChartGetResponse1]


class User4(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm1(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User4 | None = None


class Full1(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Option2(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    type: str | None = None


class Preview1(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files1(BaseModel):
    full: Full1
    thumb: Thumb | None = None
    preview: Preview1 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem1(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm1]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files1 | None = None


class Stats3(BaseModel):
    isAvailable: bool
    hasStats: bool
    hasVideo: bool | None = None
    lookCount: float
    uniqueLookCount: float
    uniqueLookChart: list[UniqueLookChartItem]
    lookChart: list[LookChartItem]
    lookDuration: float
    lookDurationAverage: float
    likeCount: float
    likeChart: list[LikeChartItem]
    commentCount: float
    commentChart: list[CommentChartItem]
    tipCount: float
    tipChart: list[TipChartItem]
    tipSum: float
    purchasedCount: float
    purchasedSumm: float


class Item1(BaseModel):
    id: float
    canDelete: bool
    canEdit: bool
    mediaCount: float
    media: list[MediaItem1]
    canViewMedia: bool
    author: Author | None = None
    responseType: str
    postedAt: str
    postedAtPrecise: str
    isMarkdownDisabled: bool
    isOpened: bool
    canToggleFavorite: bool
    tipsAmount: str
    text: str
    isFavorite: bool
    canComment: bool
    favoritesCount: float
    isMediaReady: bool
    rawText: str
    stats: Stats3 | None = None


class V2AccessAnalyticsStreamsTopGetResponse(BaseModel):
    hasMore: bool
    items: list[Item1]


class By5(Enum):
    TIPS = "tips"
    STORIES = "stories"
    VIEWS = "views"
    LIKES = "likes"
    COMMENTS = "comments"


class V2AccessAnalyticsStoriesChartGetResponse1(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class V2AccessAnalyticsStoriesChartGetResponse(
    RootModel[dict[str, V2AccessAnalyticsStoriesChartGetResponse1]]
):
    root: dict[str, V2AccessAnalyticsStoriesChartGetResponse1]


class By6(Enum):
    TIPS = "tips"
    VIEWS = "views"
    LIKES = "likes"
    COMMENTS = "comments"


class User5(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm2(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User5 | None = None


class Full2(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview2(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files2(BaseModel):
    full: Full2
    thumb: Thumb | None = None
    preview: Preview2 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem2(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm2]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files2 | None = None


class Entity(BaseModel):
    id: float
    text: str
    createdAt: str


class Positions(BaseModel):
    zIndex: float
    x: float
    y: float
    top: float
    left: float
    width: float
    height: float
    angle: float
    color: str


class Question(BaseModel):
    entity: Entity
    type: str
    positions: Positions


class Viewer(BaseModel):
    id: float
    name: str
    username: str
    avatar: str
    avatarThumbs: AvatarThumbs
    isVerified: bool
    canLookStory: bool
    canCommentStory: bool
    hasNotViewedStory: bool
    isStoryLiked: bool
    isStoryBlockedUser: bool


class User6(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm3(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User6 | None = None


class CoordinateParams(BaseModel):
    top: float
    left: float
    angle: float
    scale: float
    width: float
    height: float


class Post(BaseModel):
    id: float
    author: Author | None = None
    coordinateParams: CoordinateParams | None = None


class Position(BaseModel):
    x: float
    y: float
    width: float
    height: float
    angle: float


class Text(BaseModel):
    text: str
    position: Position


class Item2(BaseModel):
    id: float
    userId: float
    isReady: bool
    hasPost: bool
    isWatched: bool
    media: list[MediaItem2]
    createdAt: str
    canvasHeight: float
    canvasWidth: float
    question: Question | None = None
    viewersCount: float
    viewers: list[Viewer]
    commentsCount: float
    canDelete: bool
    isHighlightCover: bool
    isLastInHighlight: bool
    tipsAmount: str
    tipsAmountRaw: float
    tipsCount: float
    likesCount: float
    releaseForms: list[ReleaseForm3]
    post: Post | None = None
    texts: list[Text]


class V2AccessAnalyticsStoriesTopGetResponse(BaseModel):
    hasMore: bool
    items: list[Item2]


class GroupMessages(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class GroupMessagesPurchases(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class DirectMessages(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class DirectMessagesPurchases(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class V2AccessAnalyticsMassMessagesChartGetResponse(BaseModel):
    group_messages: GroupMessages
    group_messages_purchases: GroupMessagesPurchases
    direct_messages: DirectMessages
    direct_messages_purchases: DirectMessagesPurchases


class User7(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm4(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User7 | None = None


class Full3(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview3(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files3(BaseModel):
    full: Full3
    thumb: Thumb | None = None
    preview: Preview3 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem3(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm4]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files3 | None = None


class User8(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm5(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User8 | None = None


class Full4(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview5(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files4(BaseModel):
    full: Full4
    thumb: Thumb | None = None
    preview: Preview5 | None = None
    squarePreview: SquarePreview | None = None


class Preview4(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm5]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files4 | None = None


class User9(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm6(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User9 | None = None


class Item3(BaseModel):
    id: float
    date: str
    responseType: str | None = None
    text: str
    rawText: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    media: list[MediaItem3]
    previews: list[Preview4]
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    viewedCount: float | None = None
    sentCount: float | None = None
    isCanceled: bool | None = None
    releaseForms: list[ReleaseForm6]
    template: str | None = None
    canUnsend: bool | None = None
    unsendSeconds: float | None = None
    price: str | None = None
    purchasedCount: float | None = None
    canSendMessageToBuyers: bool | None = None


class V2AccessAnalyticsMassMessagesSentGetResponse(BaseModel):
    hasMore: bool
    items: list[Item3]


class User10(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm7(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User10 | None = None


class Full5(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview6(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files5(BaseModel):
    full: Full5
    thumb: Thumb | None = None
    preview: Preview6 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem4(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm7]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files5 | None = None


class User11(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm8(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User11 | None = None


class Full6(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview8(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files6(BaseModel):
    full: Full6
    thumb: Thumb | None = None
    preview: Preview8 | None = None
    squarePreview: SquarePreview | None = None


class Preview7(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm8]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files6 | None = None


class User12(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm9(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User12 | None = None


class Item4(BaseModel):
    id: float
    date: str
    responseType: str | None = None
    text: str
    rawText: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    media: list[MediaItem4]
    previews: list[Preview7]
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    viewedCount: float | None = None
    sentCount: float | None = None
    isCanceled: bool | None = None
    releaseForms: list[ReleaseForm9]
    template: str | None = None
    canUnsend: bool | None = None
    unsendSeconds: float | None = None
    price: str | None = None
    purchasedCount: float | None = None
    canSendMessageToBuyers: bool | None = None


class V2AccessAnalyticsMassMessagesPurchasedGetResponse(BaseModel):
    hasMore: bool
    items: list[Item4]


class ListItem6(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None


class V2AccessAnalyticsMassMessagesMassMessageIdBuyersGetResponse(BaseModel):
    list: list[ListItem6]
    hasMore: bool
    nextMarker: float | None = None


class V2AccessAnalyticsPromotionsChartGetResponse1(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class V2AccessAnalyticsPromotionsChartGetResponse(
    RootModel[dict[str, V2AccessAnalyticsPromotionsChartGetResponse1]]
):
    root: dict[str, V2AccessAnalyticsPromotionsChartGetResponse1]


class Item5(BaseModel):
    id: float
    message: str
    rawMessage: str
    hasRelatedPromo: bool
    price: float
    type: str
    canClaim: bool
    claimsCount: float
    subscribeCounts: float
    subscribeDays: float
    createdAt: str
    finishedAt: str
    isFinished: bool


class V2AccessAnalyticsPromotionsTopGetResponse(BaseModel):
    hasMore: bool
    items: list[Item5]


class V2AccessAnalyticsTrialsChartGetResponse1(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class V2AccessAnalyticsTrialsChartGetResponse(
    RootModel[dict[str, V2AccessAnalyticsTrialsChartGetResponse1]]
):
    root: dict[str, V2AccessAnalyticsTrialsChartGetResponse1]


class Item6(BaseModel):
    id: float
    trialLinkName: str
    url: str
    subscribeDays: float
    subscribeCounts: float
    claimCounts: float
    expiredAt: str
    createdAt: str
    isFinished: bool


class V2AccessAnalyticsTrialsTopGetResponse(BaseModel):
    hasMore: bool
    items: list[Item6]


class V2AccessAnalyticsCampaignsChartGetResponse1(BaseModel):
    chart: list[ChartItem]
    total: float
    delta: float
    gross: float | None = None


class V2AccessAnalyticsCampaignsChartGetResponse(
    RootModel[dict[str, V2AccessAnalyticsCampaignsChartGetResponse1]]
):
    root: dict[str, V2AccessAnalyticsCampaignsChartGetResponse1]


class ListItem7(BaseModel):
    id: float
    countSubscribers: float
    countTransitions: float
    campaignCode: float
    campaignName: str
    createdAt: str
    endDate: str


class V2AccessAnalyticsCampaignsTopGetResponse(BaseModel):
    hasMore: bool
    list: list[ListItem7]


class By7(Enum):
    GUESTS = "guests"
    TOTAL = "total"
    USERS = "users"


class Visitor(BaseModel):
    date: str
    count: float


class DurationItem(BaseModel):
    date: str
    count: float


class Chart(BaseModel):
    visitors: list[Visitor]
    duration: list[DurationItem]


class Total(BaseModel):
    current: str
    delta: float


class V2AccessAnalyticsVisitorCountriesChartGetResponse(BaseModel):
    isAvailable: bool
    chart: Chart
    total: Total
    hasStats: bool


class Totals(BaseModel):
    total: float
    guests: str
    users: str
    subscribers: float


class ViewsCount(BaseModel):
    total: float
    guests: float
    users: float
    subscribers: float


class Row(BaseModel):
    rank: float
    countryName: str
    countryCode: str
    viewsCount: ViewsCount


class TopCountries(BaseModel):
    hasMore: bool
    totals: Totals
    rows: list[Row]


class V2AccessAnalyticsVisitorCountriesTopGetResponse(BaseModel):
    isAvailable: bool
    hasStats: bool
    topCountries: TopCountries


class MediaItems(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans media ID
    """


class MediaItems1(RootModel[str]):
    root: str = Field(..., min_length=1)


class User13(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class Partner(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class Guest(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class ReleaseForms(BaseModel):
    users: list[User13] | None = Field(default_factory=list)
    """
    Users to add to release form
    """
    partners: list[Partner] | None = Field(default_factory=list)
    """
    Partners to add to release form
    """
    guests: list[Guest] | None = Field(default_factory=list)
    """
    Guests to add to release form
    """


class UserTag(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class V2AccessPostsPostRequest(BaseModel):
    text: str | None = Field("", max_length=10000)
    """
    Text content. Supports markdown by default. See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    mediaItems: list[MediaItems | MediaItems1] | None = []
    """
    Media references to attach. Accepts vault media IDs, upload references (mediaUploadId), or http(s) URLs. See [mediaItems reference](/guides/media-items).
    """
    isLockedText: bool | None = False
    """
    Whether text is locked behind paywall (defaults to false).
    """
    price: float | None = Field(0, ge=0.0, le=200.0)
    """
    Price to unlock message content (0 for free)
    """
    previewMediaCount: int | None = Field(0, ge=0)
    """
    How many items in mediaItems should be previews. Uses the first N items from left to right.
    """
    releaseForms: ReleaseForms | None = None
    """
    Release form participants
    """
    userTags: list[UserTag] | None = Field(default_factory=list)
    """
    Users to tag
    """
    isMarkdown: bool | None = True
    """
    Whether to parse text as markdown (default: true). See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    scheduledDate: str | None = None
    """
    When to publish the post (omit for immediate)
    """
    fundRaisingTargetAmount: float | None = Field(None, ge=10.0)
    """
    Target amount for fund raising post
    """
    fundRaisingTipsPresets: list[float] | None = Field(None, max_length=4)
    """
    Preset tip amounts for fund raising
    """
    expireAfter: float | None = Field(None, ge=1.0, le=30.0)
    """
    Days until post expires (1-30)
    """


class User14(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm10(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User14 | None = None


class Full7(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview9(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files7(BaseModel):
    full: Full7
    thumb: Thumb | None = None
    preview: Preview9 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem5(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm10]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files7 | None = None


class V2AccessPostsPostResponse(BaseModel):
    id: float
    canDelete: bool
    canEdit: bool
    mediaCount: float
    media: list[MediaItem5]
    canViewMedia: bool
    author: Author | None = None
    responseType: str
    postedAt: str
    postedAtPrecise: str
    isMarkdownDisabled: bool
    isOpened: bool
    canToggleFavorite: bool
    tipsAmount: str
    text: str
    isFavorite: bool
    canComment: bool
    favoritesCount: float
    isMediaReady: bool
    rawText: str


class SortBy2(Enum):
    PUBLISH_DATE = "publish_date"
    TIPS = "tips"
    FAVORITES_COUNT = "favorites_count"


class User15(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm11(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User15 | None = None


class Full8(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview10(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files8(BaseModel):
    full: Full8
    thumb: Thumb | None = None
    preview: Preview10 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem6(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm11]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files8 | None = None


class ListItem8(BaseModel):
    id: float
    canDelete: bool
    canEdit: bool
    mediaCount: float
    media: list[MediaItem6]
    canViewMedia: bool
    author: Author | None = None
    responseType: str
    postedAt: str
    postedAtPrecise: str
    isMarkdownDisabled: bool
    isOpened: bool
    canToggleFavorite: bool
    tipsAmount: str
    text: str
    isFavorite: bool
    canComment: bool
    favoritesCount: float
    isMediaReady: bool
    rawText: str


class Counters(BaseModel):
    audiosCount: float
    photosCount: float
    videosCount: float
    mediasCount: float
    postsCount: float
    streamsCount: float
    archivedPostsCount: float
    privateArchivedPostsCount: float


class V2AccessPostsGetResponse(BaseModel):
    list: list[ListItem8]
    hasMore: bool
    headMarker: str
    tailMarker: str
    counters: Counters


class MediaItems2(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans media ID
    """


class MediaItems3(RootModel[str]):
    root: str = Field(..., min_length=1)


class User16(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class ReleaseForms1(BaseModel):
    users: list[User16] | None = Field(default_factory=list)
    """
    Users to add to release form
    """
    partners: list[Partner] | None = Field(default_factory=list)
    """
    Partners to add to release form
    """
    guests: list[Guest] | None = Field(default_factory=list)
    """
    Guests to add to release form
    """


class V2AccessPostsPostIdPutRequest(BaseModel):
    text: str | None = Field("", max_length=10000)
    """
    Text content. Supports markdown by default. See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    mediaItems: list[MediaItems2 | MediaItems3] | None = []
    """
    Media references to attach. Accepts vault media IDs, upload references (mediaUploadId), or http(s) URLs. See [mediaItems reference](/guides/media-items).
    """
    isLockedText: bool | None = False
    """
    Whether text is locked behind paywall (defaults to false).
    """
    price: float | None = Field(0, ge=0.0, le=200.0)
    """
    Price to unlock message content (0 for free)
    """
    previewMediaCount: int | None = Field(0, ge=0)
    """
    How many items in mediaItems should be previews. Uses the first N items from left to right.
    """
    releaseForms: ReleaseForms1 | None = None
    """
    Release form participants
    """
    userTags: list[UserTag] | None = Field(default_factory=list)
    """
    Users to tag
    """
    isMarkdown: bool | None = True
    """
    Whether to parse text as markdown (default: true). See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    scheduledDate: str | None = None
    """
    When to publish the post (omit for immediate)
    """
    fundRaisingTargetAmount: float | None = Field(None, ge=10.0)
    """
    Target amount for fund raising post
    """
    fundRaisingTipsPresets: list[float] | None = Field(None, max_length=4)
    """
    Preset tip amounts for fund raising
    """
    expireAfter: float | None = Field(None, ge=1.0, le=30.0)
    """
    Days until post expires (1-30)
    """


class User17(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm12(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User17 | None = None


class Full9(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview11(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files9(BaseModel):
    full: Full9
    thumb: Thumb | None = None
    preview: Preview11 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem7(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm12]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files9 | None = None


class V2AccessPostsPostIdPutResponse(BaseModel):
    id: float
    canDelete: bool
    canEdit: bool
    mediaCount: float
    media: list[MediaItem7]
    canViewMedia: bool
    author: Author | None = None
    responseType: str
    postedAt: str
    postedAtPrecise: str
    isMarkdownDisabled: bool
    isOpened: bool
    canToggleFavorite: bool
    tipsAmount: str
    text: str
    isFavorite: bool
    canComment: bool
    favoritesCount: float
    isMediaReady: bool
    rawText: str


class V2AccessPostsPostIdDeleteResponse(BaseModel):
    pass


class User18(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm13(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User18 | None = None


class Full10(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview12(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files10(BaseModel):
    full: Full10
    thumb: Thumb | None = None
    preview: Preview12 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem8(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm13]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files10 | None = None


class User19(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm14(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User19 | None = None


class V2AccessPostsPostIdGetResponse1(BaseModel):
    id: float
    canDelete: bool
    canEdit: bool
    mediaCount: float
    media: list[MediaItem8]
    canViewMedia: bool
    author: Author | None = None
    responseType: str
    postedAt: str
    postedAtPrecise: str
    isMarkdownDisabled: bool
    isOpened: bool
    canToggleFavorite: bool
    tipsAmount: str
    isMediaReady: bool
    price: float | None = None
    releaseForms: list[ReleaseForm14]
    canEditText: bool
    canEditMedia: bool
    canEditSchedule: bool
    canEditVote: bool
    preview: list[float]


class V2AccessPostsPostIdGetResponse(RootModel[V2AccessPostsPostIdGetResponse1 | Any]):
    root: V2AccessPostsPostIdGetResponse1 | Any


class User20(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm15(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User20 | None = None


class Full11(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview13(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files11(BaseModel):
    full: Full11
    thumb: Thumb | None = None
    preview: Preview13 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem9(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm15]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files11 | None = None


class ListItem9(BaseModel):
    id: float
    canDelete: bool
    canEdit: bool
    mediaCount: float
    media: list[MediaItem9]
    canViewMedia: bool
    author: Author | None = None
    responseType: str
    postedAt: str
    postedAtPrecise: str
    isMarkdownDisabled: bool
    isOpened: bool
    canToggleFavorite: bool
    tipsAmount: str
    text: str
    isFavorite: bool
    canComment: bool
    favoritesCount: float
    isMediaReady: bool
    rawText: str


class V2AccessUsersUserIdPostsGetResponse(BaseModel):
    list: list[ListItem9]
    hasMore: bool
    headMarker: str
    tailMarker: str
    counters: Counters


class MediaItems4(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans media ID
    """


class MediaItems5(RootModel[str]):
    root: str = Field(..., min_length=1)


class User21(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class ReleaseForms2(BaseModel):
    users: list[User21] | None = Field(default_factory=list)
    """
    Users to add to release form
    """
    partners: list[Partner] | None = Field(default_factory=list)
    """
    Partners to add to release form
    """
    guests: list[Guest] | None = Field(default_factory=list)
    """
    Guests to add to release form
    """


class V2AccessChatsUserIdMessagesPostRequest(BaseModel):
    isForwardedMessage: bool | None = False
    """
    Whether this is a forwarded message
    """
    text: str | None = Field("", max_length=10000)
    """
    Text content. Supports markdown by default. See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    mediaItems: list[MediaItems4 | MediaItems5] | None = []
    """
    Media references to attach. Accepts vault media IDs, upload references (mediaUploadId), or http(s) URLs. See [mediaItems reference](/guides/media-items).
    """
    isLockedText: bool | None = False
    """
    Whether text is locked behind paywall (defaults to false).
    """
    price: float | None = Field(0, ge=0.0, le=200.0)
    """
    Price to unlock message content (0 for free)
    """
    previewMediaCount: int | None = Field(0, ge=0)
    """
    How many items in mediaItems should be previews. Uses the first N items from left to right.
    """
    releaseForms: ReleaseForms2 | None = None
    """
    Release form participants
    """
    userTags: list[UserTag] | None = Field(default_factory=list)
    """
    Users to tag
    """
    isMarkdown: bool | None = True
    """
    Whether to parse text as markdown (default: true). See [Text Formatting Guide](/guides/how-to/text-formatting).
    """


class FromUser(BaseModel):
    id: float
    name: str


class FromUser1(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class User22(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm16(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User22 | None = None


class Full12(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview14(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files12(BaseModel):
    full: Full12
    thumb: Thumb | None = None
    preview: Preview14 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem10(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm16]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files12 | None = None


class V2AccessChatsUserIdMessagesPostResponse(BaseModel):
    id: float
    text: str
    fromUser: FromUser | FromUser1
    media: list[MediaItem10]
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    previews: list[float]
    lockedText: bool | None = None
    responseType: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    isCouplePeopleMedia: bool | None = None
    queueId: float | None = None
    isMarkdownDisabled: bool | None = None
    releaseForms: Any | None = None
    isFromQueue: bool | None = None
    canUnsendQueue: bool | None = None
    unsendSecondsQueue: float | None = None
    isOpened: bool | None = None
    isNew: bool | None = None
    createdAt: str | None = None
    changedAt: str | None = None
    cancelSeconds: float | None = None
    isLiked: bool | None = None
    canPurchase: bool | None = None
    canPurchaseReason: str | None = None
    canReport: bool | None = None
    canBePinned: bool | None = None
    isPinned: bool | None = None


class FromUser2(BaseModel):
    id: float
    name: str


class FromUser3(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class User23(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm17(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User23 | None = None


class Full13(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview15(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files13(BaseModel):
    full: Full13
    thumb: Thumb | None = None
    preview: Preview15 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem11(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm17]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files13 | None = None


class ListItem10(BaseModel):
    id: float
    text: str
    fromUser: FromUser2 | FromUser3
    media: list[MediaItem11]
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    previews: list[float]
    lockedText: bool | None = None
    responseType: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    isCouplePeopleMedia: bool | None = None
    queueId: float | None = None
    isMarkdownDisabled: bool | None = None
    releaseForms: Any | None = None
    isFromQueue: bool | None = None
    canUnsendQueue: bool | None = None
    unsendSecondsQueue: float | None = None
    isOpened: bool | None = None
    isNew: bool | None = None
    createdAt: str | None = None
    changedAt: str | None = None
    cancelSeconds: float | None = None
    isLiked: bool | None = None
    canPurchase: bool | None = None
    canPurchaseReason: str | None = None
    canReport: bool | None = None
    canBePinned: bool | None = None
    isPinned: bool | None = None


class V2AccessChatsUserIdMessagesGetResponse(BaseModel):
    list: list[ListItem10]
    hasMore: bool


class V2AccessChatsUserIdMessagesMessageIdDeleteRequest(BaseModel):
    withUserId: str | float


class FromUser4(BaseModel):
    id: float
    name: str


class FromUser5(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class User24(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm18(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User24 | None = None


class Full14(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview16(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files14(BaseModel):
    full: Full14
    thumb: Thumb | None = None
    preview: Preview16 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem12(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm18]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files14 | None = None


class MediaTypes(BaseModel):
    video: float | None = None
    photo: float | None = None
    gif: float | None = None
    audio: float | None = None


class Queue(BaseModel):
    id: float
    text: str
    fromUser: FromUser4 | FromUser5
    media: list[MediaItem12]
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    previews: list[float]
    lockedText: bool | None = None
    responseType: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    isCouplePeopleMedia: bool | None = None
    queueId: float | None = None
    isMarkdownDisabled: bool | None = None
    releaseForms: Any | None = None
    isFromQueue: bool | None = None
    canUnsendQueue: bool | None = None
    unsendSecondsQueue: float | None = None
    isOpened: bool | None = None
    isNew: bool | None = None
    createdAt: str | None = None
    changedAt: str | None = None
    cancelSeconds: float | None = None
    isLiked: bool | None = None
    canPurchase: bool | None = None
    canPurchaseReason: str | None = None
    canReport: bool | None = None
    canBePinned: bool | None = None
    isPinned: bool | None = None
    date: str | None = None
    textCropped: str | None = None
    sentCount: float | None = None
    viewedCount: float | None = None
    canUnsend: bool | None = None
    unsendSeconds: float | None = None
    isCanceled: bool | None = None
    mediaTypes: MediaTypes | None = None
    hasError: bool | None = None
    price: str | None = None
    purchasedCount: float | None = None
    canSendMessageToBuyers: bool | None = None


class V2AccessChatsUserIdMessagesMessageIdDeleteResponse(BaseModel):
    success: bool
    queue: Queue | None = None


class MediaItems6(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans media ID
    """


class MediaItems7(RootModel[str]):
    root: str = Field(..., min_length=1)


class User25(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class ReleaseForms3(BaseModel):
    users: list[User25] | None = Field(default_factory=list)
    """
    Users to add to release form
    """
    partners: list[Partner] | None = Field(default_factory=list)
    """
    Partners to add to release form
    """
    guests: list[Guest] | None = Field(default_factory=list)
    """
    Guests to add to release form
    """


class UserIds(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class UserIds1(RootModel[str]):
    root: str = Field(..., min_length=1)


class UserLists(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class UserLists1(RootModel[str]):
    root: str = Field(..., min_length=1)


class ExcludeUserLists(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class ExcludeUserLists1(RootModel[str]):
    root: str = Field(..., min_length=1)


class V2AccessMassMessagesPostRequest(BaseModel):
    isForwardedMessage: bool | None = False
    """
    Whether this is a forwarded message
    """
    text: str | None = Field("", max_length=10000)
    """
    Text content. Supports markdown by default. See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    mediaItems: list[MediaItems6 | MediaItems7] | None = []
    """
    Media references to attach. Accepts vault media IDs, upload references (mediaUploadId), or http(s) URLs. See [mediaItems reference](/guides/media-items).
    """
    isLockedText: bool | None = False
    """
    Whether text is locked behind paywall (defaults to false).
    """
    price: float | None = Field(0, ge=0.0, le=200.0)
    """
    Price to unlock message content (0 for free)
    """
    previewMediaCount: int | None = Field(0, ge=0)
    """
    How many items in mediaItems should be previews. Uses the first N items from left to right.
    """
    releaseForms: ReleaseForms3 | None = None
    """
    Release form participants
    """
    userTags: list[UserTag] | None = Field(default_factory=list)
    """
    Users to tag
    """
    isMarkdown: bool | None = True
    """
    Whether to parse text as markdown (default: true). See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    scheduledDate: str | Any | None = None
    """
    When to send the message (omit for immediate)
    """
    userIds: list[UserIds | UserIds1] | None = None
    """
    Specific user IDs to send to
    """
    userLists: list[UserLists | UserLists1] | None = None
    """
    User list IDs to send to
    """
    subscribedAfterDate: str | Any | None = None
    """
    Only send to users subscribed after this date
    """
    excludeUserLists: list[ExcludeUserLists | ExcludeUserLists1] | None = None
    """
    User list IDs to exclude
    """


class V2AccessMassMessagesPostResponse(BaseModel):
    id: float
    date: str
    isReady: bool | None = None
    isDone: bool | None = None
    total: float | None = None
    pending: float | None = None
    canUnsend: bool | None = None
    unsendSeconds: float | None = None
    hasError: bool | None = None
    isCanceled: bool | None = None
    isCouplePeopleMedia: bool | None = None


class MediaItems8(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans media ID
    """


class MediaItems9(RootModel[str]):
    root: str = Field(..., min_length=1)


class ReleaseForms4(BaseModel):
    users: list[User25] | None = Field(default_factory=list)
    """
    Users to add to release form
    """
    partners: list[Partner] | None = Field(default_factory=list)
    """
    Partners to add to release form
    """
    guests: list[Guest] | None = Field(default_factory=list)
    """
    Guests to add to release form
    """


class UserIds2(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class UserIds3(RootModel[str]):
    root: str = Field(..., min_length=1)


class UserLists2(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class UserLists3(RootModel[str]):
    root: str = Field(..., min_length=1)


class ExcludeUserLists2(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans user ID
    """


class ExcludeUserLists3(RootModel[str]):
    root: str = Field(..., min_length=1)


class V2AccessMassMessagesMassMessageIdPutRequest(BaseModel):
    isForwardedMessage: bool | None = False
    """
    Whether this is a forwarded message
    """
    text: str | None = Field("", max_length=10000)
    """
    Text content. Supports markdown by default. See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    mediaItems: list[MediaItems8 | MediaItems9] | None = []
    """
    Media references to attach. Accepts vault media IDs, upload references (mediaUploadId), or http(s) URLs. See [mediaItems reference](/guides/media-items).
    """
    isLockedText: bool | None = False
    """
    Whether text is locked behind paywall (defaults to false).
    """
    price: float | None = Field(0, ge=0.0, le=200.0)
    """
    Price to unlock message content (0 for free)
    """
    previewMediaCount: int | None = Field(0, ge=0)
    """
    How many items in mediaItems should be previews. Uses the first N items from left to right.
    """
    releaseForms: ReleaseForms4 | None = None
    """
    Release form participants
    """
    userTags: list[UserTag] | None = Field(default_factory=list)
    """
    Users to tag
    """
    isMarkdown: bool | None = True
    """
    Whether to parse text as markdown (default: true). See [Text Formatting Guide](/guides/how-to/text-formatting).
    """
    scheduledDate: str | Any | None = None
    """
    When to send the message (omit for immediate)
    """
    userIds: list[UserIds2 | UserIds3] | None = None
    """
    Specific user IDs to send to
    """
    userLists: list[UserLists2 | UserLists3] | None = None
    """
    User list IDs to send to
    """
    subscribedAfterDate: str | Any | None = None
    """
    Only send to users subscribed after this date
    """
    excludeUserLists: list[ExcludeUserLists2 | ExcludeUserLists3] | None = None
    """
    User list IDs to exclude
    """


class V2AccessMassMessagesMassMessageIdPutResponse(BaseModel):
    id: float
    date: str
    isReady: bool | None = None
    isDone: bool | None = None
    total: float | None = None
    pending: float | None = None
    canUnsend: bool | None = None
    unsendSeconds: float | None = None
    hasError: bool | None = None
    isCanceled: bool | None = None
    isCouplePeopleMedia: bool | None = None


class FromUser6(BaseModel):
    id: float
    name: str


class FromUser7(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class User27(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm19(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User27 | None = None


class Full15(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview17(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files15(BaseModel):
    full: Full15
    thumb: Thumb | None = None
    preview: Preview17 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem13(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm19]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files15 | None = None


class Queue1(BaseModel):
    id: float
    text: str
    fromUser: FromUser6 | FromUser7
    media: list[MediaItem13]
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    previews: list[float]
    lockedText: bool | None = None
    responseType: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    isCouplePeopleMedia: bool | None = None
    queueId: float | None = None
    isMarkdownDisabled: bool | None = None
    releaseForms: Any | None = None
    isFromQueue: bool | None = None
    canUnsendQueue: bool | None = None
    unsendSecondsQueue: float | None = None
    isOpened: bool | None = None
    isNew: bool | None = None
    createdAt: str | None = None
    changedAt: str | None = None
    cancelSeconds: float | None = None
    isLiked: bool | None = None
    canPurchase: bool | None = None
    canPurchaseReason: str | None = None
    canReport: bool | None = None
    canBePinned: bool | None = None
    isPinned: bool | None = None
    date: str | None = None
    textCropped: str | None = None
    sentCount: float | None = None
    viewedCount: float | None = None
    canUnsend: bool | None = None
    unsendSeconds: float | None = None
    isCanceled: bool | None = None
    mediaTypes: MediaTypes | None = None
    hasError: bool | None = None
    price: str | None = None
    purchasedCount: float | None = None
    canSendMessageToBuyers: bool | None = None


class V2AccessMassMessagesMassMessageIdDeleteResponse(BaseModel):
    success: bool
    queue: Queue1 | None = None


class FromUser8(BaseModel):
    id: float
    name: str


class FromUser9(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class User28(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm20(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User28 | None = None


class Full16(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview18(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files16(BaseModel):
    full: Full16
    thumb: Thumb | None = None
    preview: Preview18 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem14(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm20]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files16 | None = None


class V2AccessMassMessagesMassMessageIdGetResponse(BaseModel):
    id: float
    text: str
    fromUser: FromUser8 | FromUser9
    media: list[MediaItem14]
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    previews: list[float]
    lockedText: bool | None = None
    responseType: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    isCouplePeopleMedia: bool | None = None
    queueId: float | None = None
    isMarkdownDisabled: bool | None = None
    releaseForms: Any | None = None
    isFromQueue: bool | None = None
    canUnsendQueue: bool | None = None
    unsendSecondsQueue: float | None = None
    isOpened: bool | None = None
    isNew: bool | None = None
    createdAt: str | None = None
    changedAt: str | None = None
    cancelSeconds: float | None = None
    isLiked: bool | None = None
    canPurchase: bool | None = None
    canPurchaseReason: str | None = None
    canReport: bool | None = None
    canBePinned: bool | None = None
    isPinned: bool | None = None


class Order(Enum):
    RECENT = "recent"
    OLD = "old"


class Filter2(Enum):
    PRIORITY = "priority"
    WHO_TIPPED = "who_tipped"
    UNREAD = "unread"


class WithUser(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class FromUser10(BaseModel):
    id: float
    name: str


class FromUser11(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class User29(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm21(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User29 | None = None


class Full17(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview19(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files17(BaseModel):
    full: Full17
    thumb: Thumb | None = None
    preview: Preview19 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem15(BaseModel):
    id: float
    type: Type2
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm21]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files17 | None = None


class LastMessage(BaseModel):
    id: float
    text: str
    fromUser: FromUser10 | FromUser11
    media: list[MediaItem15]
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    previews: list[float]
    lockedText: bool | None = None
    responseType: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    isCouplePeopleMedia: bool | None = None
    queueId: float | None = None
    isMarkdownDisabled: bool | None = None
    releaseForms: Any | None = None
    isFromQueue: bool | None = None
    canUnsendQueue: bool | None = None
    unsendSecondsQueue: float | None = None
    isOpened: bool | None = None
    isNew: bool | None = None
    createdAt: str | None = None
    changedAt: str | None = None
    cancelSeconds: float | None = None
    isLiked: bool | None = None
    canPurchase: bool | None = None
    canPurchaseReason: str | None = None
    canReport: bool | None = None
    canBePinned: bool | None = None
    isPinned: bool | None = None


class ListItem11(BaseModel):
    withUser: WithUser
    canNotSendReason: bool | str | None = None
    canSendMessage: bool | None = None
    canGoToProfile: bool | None = None
    unreadMessagesCount: float | None = None
    hasUnreadTips: bool | None = None
    isMutedNotifications: bool | None = None
    lastMessage: LastMessage | None = None
    lastReadMessageId: float | None = None
    hasPurchasedFeed: bool | None = None
    countPinnedMessages: float | None = None


class V2AccessChatsGetResponse(BaseModel):
    list: list[ListItem11]
    hasMore: bool
    nextOffset: float | None = None


class Opened(Enum):
    FIELD_0 = "0"
    FIELD_1 = "1"
    TRUE = "true"
    FALSE = "false"


class Type20(Enum):
    PHOTOS = "photos"
    VIDEOS = "videos"
    AUDIOS = "audios"


class FromUser12(BaseModel):
    id: float
    name: str


class FromUser13(BaseModel):
    id: float
    field_view: str = Field(..., alias="_view")


class Type21(Enum):
    PHOTO = "photo"
    VIDEO = "video"
    GIF = "gif"
    AUDIO = "audio"


class User30(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm22(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User30 | None = None


class Full18(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview20(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files18(BaseModel):
    full: Full18
    thumb: Thumb | None = None
    preview: Preview20 | None = None
    squarePreview: SquarePreview | None = None


class MediaItem16(BaseModel):
    id: float
    type: Type21
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm22]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files18 | None = None


class ListItem12(BaseModel):
    id: float
    text: str
    fromUser: FromUser12 | FromUser13
    media: list[MediaItem16]
    isMediaReady: bool | None = None
    mediaCount: float | None = None
    previews: list[float]
    lockedText: bool | None = None
    responseType: str | None = None
    giphyId: str | None = None
    isFree: bool | None = None
    isTip: bool | None = None
    isReportedByMe: bool | None = None
    isCouplePeopleMedia: bool | None = None
    queueId: float | None = None
    isMarkdownDisabled: bool | None = None
    releaseForms: Any | None = None
    isFromQueue: bool | None = None
    canUnsendQueue: bool | None = None
    unsendSecondsQueue: float | None = None
    isOpened: bool | None = None
    isNew: bool | None = None
    createdAt: str | None = None
    changedAt: str | None = None
    cancelSeconds: float | None = None
    isLiked: bool | None = None
    canPurchase: bool | None = None
    canPurchaseReason: str | None = None
    canReport: bool | None = None
    canBePinned: bool | None = None
    isPinned: bool | None = None


class V2AccessChatsUserIdMediaGetResponse(BaseModel):
    list: list[ListItem12]
    hasMore: bool


class Online(Enum):
    FIELD_0 = "0"
    FIELD_1 = "1"
    TRUE = "true"
    FALSE = "false"


class Filter3(BaseModel):
    promoId: str | None = None
    """
    Filter by promotion ID
    """
    trial_id: str | None = None
    """
    Filter by trial link ID
    """
    duration: str | None = None
    """
    Filter by subscription duration
    """
    tips: str | None = None
    """
    Filter by tips amount
    """
    total_spent: str | None = None
    """
    Filter by total spent
    """
    online: Online | None = None
    """
    Filter by online status
    """


class Type22(Enum):
    ALL = "all"
    ACTIVE = "active"
    EXPIRED = "expired"


class Type23(Enum):
    LATEST = "latest"


class LatestType(Enum):
    TOTAL = "total"
    NEW = "new"
    RENEWALS = "renewals"


class HistoryItem(BaseModel):
    id: float
    startDate: str
    expireDate: str
    price: float
    regularPrice: float
    discount: float
    type: str
    action: str
    isCurrent: bool


class Subscription(BaseModel):
    isActive: bool
    isExpired: bool
    subscribedAt: str
    expiresAt: str
    renewedAt: str
    price: float
    regularPrice: float
    discountPercent: float
    discountPeriod: float
    discountStartedAt: str
    discountFinishedAt: str
    history: list[HistoryItem]


class Spending(BaseModel):
    total: float
    tips: float
    subscriptions: float
    messages: float
    posts: float
    streams: float


class Capabilities(BaseModel):
    canRestrict: bool
    canBlock: bool
    canReport: bool
    canUnsubscribe: bool
    canReceiveMessages: bool
    canSendTrial: bool


class List1(BaseModel):
    id: str | float
    name: str


class ListItem13(BaseModel):
    id: float
    name: str
    username: str
    displayName: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    lastSeen: str
    subscription: Subscription
    spending: Spending
    isRestricted: bool
    isBlocked: bool
    capabilities: Capabilities
    lists: list[List1]


class V2AccessSubscribersGetResponse(BaseModel):
    list: list[ListItem13]
    hasMore: bool


class V2AccessSubscribersUserIdNotePutRequest(BaseModel):
    notice: str = Field(..., max_length=1000)
    """
    Note about the subscriber
    """


class V2AccessSubscribersUserIdNotePutResponse(BaseModel):
    pass


class V2AccessSubscribersUserIdDiscountPutRequest(BaseModel):
    discount: int = Field(..., ge=5, le=60)
    """
    Discount percentage (1-100)
    """
    period: int = Field(..., ge=1, le=12)
    """
    Number of months to apply discount
    """


class V2AccessSubscribersUserIdDiscountPutResponse(BaseModel):
    pass


class V2AccessSubscribersUserIdCustomNamePutRequest(BaseModel):
    displayName: str = Field(..., max_length=100, min_length=1)
    """
    Custom display name for subscriber
    """


class V2AccessSubscribersUserIdCustomNamePutResponse(BaseModel):
    pass


class Paid(Enum):
    FIELD_0 = "0"
    FIELD_1 = "1"
    TRUE = "true"
    FALSE = "false"


class Filter4(BaseModel):
    online: Online | None = None
    """
    Filter by online status
    """
    paid: Paid | None = None
    """
    Filter by paid subscriptions only
    """


class Type24(Enum):
    ALL = "all"
    ACTIVE = "active"
    EXPIRED = "expired"


class List2(BaseModel):
    id: str | float
    type: str
    name: str


class ListItem14(BaseModel):
    id: float
    username: str
    name: str
    avatar: str
    avatarThumbs: AvatarThumbs | None = None
    lists: list[List2]
    subscribedAt: str
    expiredAt: str
    renewedAt: str
    isActive: bool
    subscriptionPrice: float
    tipsSumm: float | None = None
    subscribesSumm: float | None = None
    messagesSumm: float | None = None
    postsSumm: float | None = None
    streamsSumm: float | None = None
    totalSumm: float | None = None


class V2AccessSubscriptionsGetResponse(BaseModel):
    list: list[ListItem14]
    hasMore: bool


class Subscriptions(BaseModel):
    active: float
    muted: float
    restricted: float
    expired: float
    blocked: float
    attention: float
    all: float


class Subscribers(BaseModel):
    active: float
    muted: float
    restricted: float
    expired: float
    blocked: float
    all: float
    activeOnline: float


class V2AccessSubscriptionsCountGetResponse(BaseModel):
    subscriptions: Subscriptions
    subscribers: Subscribers
    bookmarks: float


class All(Enum):
    FIELD_0 = "0"
    FIELD_1 = "1"
    TRUE = "true"
    FALSE = "false"


class ListItem15(BaseModel):
    subscribeDate: str
    expireDate: str
    price: float


class V2AccessSubscriptionsSubscriptionIdHistoryGetResponse(BaseModel):
    list: list[ListItem15]
    hasMore: bool


class Stats4(Enum):
    TRUE = "true"
    FALSE = "false"


class ListItem16(BaseModel):
    id: float
    name: str


class V2AccessPromotionsTrackingLinksGetResponse(BaseModel):
    list: list[ListItem16]
    hasMore: bool


class V2AccessPromotionsTrackingLinksPostRequest(BaseModel):
    name: str = Field(..., max_length=100, min_length=1)
    """
    Name for the tracking link
    """


class V2AccessPromotionsTrackingLinksPostResponseItem(BaseModel):
    id: float
    name: str


class V2AccessPromotionsTrackingLinksPostResponse1(BaseModel):
    id: float
    name: str


class V2AccessPromotionsTrackingLinksPostResponse(
    RootModel[
        list[V2AccessPromotionsTrackingLinksPostResponseItem]
        | V2AccessPromotionsTrackingLinksPostResponse1
    ]
):
    root: (
        list[V2AccessPromotionsTrackingLinksPostResponseItem]
        | V2AccessPromotionsTrackingLinksPostResponse1
    )


class V2AccessPromotionsTrackingLinksShareAccessPostRequest(BaseModel):
    campaignId: int = Field(..., gt=0)
    """
    Campaign ID to share
    """
    userId: int = Field(..., gt=0)
    """
    User ID to share with
    """


class V2AccessPromotionsTrackingLinksShareAccessPostResponse(BaseModel):
    success: bool


class V2AccessPromotionsTrackingLinksShareAccessDeleteRequest(BaseModel):
    campaignId: int = Field(..., gt=0)
    """
    Campaign ID to share
    """
    userId: int = Field(..., gt=0)
    """
    User ID to share with
    """


class V2AccessPromotionsTrackingLinksShareAccessDeleteResponse(BaseModel):
    success: bool


class V2AccessPromotionsTrackingLinksTrackingLinkIdGetResponse(BaseModel):
    id: float
    name: str


class V2AccessPromotionsTrackingLinksTrackingLinkIdPutRequest(BaseModel):
    name: str | None = Field(None, max_length=100, min_length=1)
    """
    Name for the tracking link
    """


class V2AccessPromotionsTrackingLinksTrackingLinkIdPutResponse(BaseModel):
    id: float
    name: str


class V2AccessPromotionsTrackingLinksTrackingLinkIdDeleteResponse(BaseModel):
    success: bool


class V2AccessPromotionsTrackingLinksTrackingLinkIdClaimersGetResponse(BaseModel):
    list: list[Any]
    hasMore: bool | None = None


class ListItem17(BaseModel):
    id: float
    trialLinkName: str
    url: str
    subscribeDays: float
    subscribeCounts: float
    claimCounts: float
    clicksCounts: float
    expiredAt: str
    createdAt: str
    isFinished: bool
    user: Any | None = None
    sharedWith: str | None = None


class V2AccessPromotionsTrialLinksGetResponse1(BaseModel):
    list: list[ListItem17]
    hasMore: bool


class V2AccessPromotionsTrialLinksGetResponseItem(BaseModel):
    id: float
    trialLinkName: str
    url: str
    subscribeDays: float
    subscribeCounts: float
    claimCounts: float
    clicksCounts: float
    expiredAt: str
    createdAt: str
    isFinished: bool
    user: Any | None = None
    sharedWith: str | None = None


class V2AccessPromotionsTrialLinksGetResponse(
    RootModel[
        V2AccessPromotionsTrialLinksGetResponse1
        | list[V2AccessPromotionsTrialLinksGetResponseItem]
    ]
):
    root: (
        V2AccessPromotionsTrialLinksGetResponse1
        | list[V2AccessPromotionsTrialLinksGetResponseItem]
    )


class V2AccessPromotionsTrialLinksPostRequest(BaseModel):
    trialLinkName: str = Field(..., max_length=100, min_length=1)
    """
    Name for the trial link
    """
    subscribeDays: int = Field(..., ge=1, le=365)
    """
    Number of days for trial subscription
    """
    subscribeCounts: int | None = Field(None, ge=1)
    """
    Maximum number of times trial can be claimed
    """
    expiredAt: str | None = None
    """
    When the trial link expires
    """


class V2AccessPromotionsTrialLinksPostResponse(BaseModel):
    id: float
    trialLinkName: str
    url: str
    subscribeDays: float
    subscribeCounts: float
    claimCounts: float
    clicksCounts: float
    expiredAt: str
    createdAt: str
    isFinished: bool
    user: Any | None = None
    sharedWith: str | None = None


class V2AccessPromotionsTrialLinksShareAccessPostRequest(BaseModel):
    trialId: int = Field(..., gt=0)
    """
    Trial ID to share
    """
    userId: int = Field(..., gt=0)
    """
    User ID to share with
    """


class V2AccessPromotionsTrialLinksShareAccessPostResponse(BaseModel):
    success: bool


class V2AccessPromotionsTrialLinksShareAccessDeleteRequest(BaseModel):
    trialId: int = Field(..., gt=0)
    """
    Trial ID to share
    """
    userId: int = Field(..., gt=0)
    """
    User ID to share with
    """


class V2AccessPromotionsTrialLinksShareAccessDeleteResponse(BaseModel):
    success: bool


class V2AccessPromotionsTrialLinksTrialLinkIdGetResponse(BaseModel):
    id: float
    trialLinkName: str
    url: str
    subscribeDays: float
    subscribeCounts: float
    claimCounts: float
    clicksCounts: float
    expiredAt: str
    createdAt: str
    isFinished: bool
    user: Any | None = None
    sharedWith: str | None = None


class V2AccessPromotionsTrialLinksTrialLinkIdPutRequest(BaseModel):
    trialLinkName: str | None = Field(None, max_length=100, min_length=1)
    """
    New name for trial link
    """
    subscribeDays: int | None = Field(None, ge=1, le=365)
    """
    New trial duration in days
    """
    subscribeCounts: int | None = Field(None, ge=1)
    """
    New maximum claim count
    """
    expiredAt: str | None = None
    """
    New expiration date
    """


class V2AccessPromotionsTrialLinksTrialLinkIdPutResponse(BaseModel):
    success: bool


class V2AccessPromotionsTrialLinksTrialLinkIdDeleteResponse(BaseModel):
    success: bool


class V2AccessPromotionsBundlesGetResponseItem(BaseModel):
    id: float
    discount: float
    duration: float
    price: float
    canBuy: bool


class ListItem18(BaseModel):
    id: float
    discount: float
    duration: float
    price: float
    canBuy: bool


class V2AccessPromotionsBundlesGetResponse1(BaseModel):
    list: list[ListItem18]
    hasMore: bool


class V2AccessPromotionsBundlesGetResponse(
    RootModel[
        list[V2AccessPromotionsBundlesGetResponseItem]
        | V2AccessPromotionsBundlesGetResponse1
    ]
):
    root: (
        list[V2AccessPromotionsBundlesGetResponseItem]
        | V2AccessPromotionsBundlesGetResponse1
    )


class V2AccessPromotionsBundlesPostRequest(BaseModel):
    discount: int = Field(..., ge=1, le=100)
    """
    Discount percentage for bundle
    """
    duration: int = Field(..., ge=1, le=365)
    """
    Bundle subscription duration in days
    """


class V2AccessPromotionsBundlesPostResponse(BaseModel):
    id: float
    discount: float
    duration: float
    price: float
    canBuy: bool


class V2AccessPromotionsBundlesBundleIdGetResponse(BaseModel):
    id: float
    discount: float
    duration: float
    price: float
    canBuy: bool


class V2AccessPromotionsBundlesBundleIdPutRequest(BaseModel):
    discount: int | None = Field(None, ge=1, le=100)
    """
    Discount percentage for bundle
    """
    duration: int | None = Field(None, ge=1, le=365)
    """
    Bundle subscription duration in days
    """


class V2AccessPromotionsBundlesBundleIdPutResponse(BaseModel):
    id: float
    discount: float
    duration: float
    price: float
    canBuy: bool


class V2AccessPromotionsBundlesBundleIdDeleteResponse(BaseModel):
    id: float
    discount: float
    duration: float
    price: float
    canBuy: bool


class V2AccessPromotionsGetResponseItem(BaseModel):
    id: float
    message: str
    rawMessage: str
    hasRelatedPromo: bool
    price: float
    type: str
    canClaim: bool
    claimsCount: float
    subscribeCounts: float
    subscribeDays: float
    createdAt: str
    finishedAt: str
    isFinished: bool


class ListItem19(BaseModel):
    id: float
    message: str
    rawMessage: str
    hasRelatedPromo: bool
    price: float
    type: str
    canClaim: bool
    claimsCount: float
    subscribeCounts: float
    subscribeDays: float
    createdAt: str
    finishedAt: str
    isFinished: bool


class V2AccessPromotionsGetResponse1(BaseModel):
    list: list[ListItem19]
    hasMore: bool


class V2AccessPromotionsGetResponse(
    RootModel[list[V2AccessPromotionsGetResponseItem] | V2AccessPromotionsGetResponse1]
):
    root: list[V2AccessPromotionsGetResponseItem] | V2AccessPromotionsGetResponse1


class V2AccessPromotionsPostRequest(BaseModel):
    discount: int = Field(..., ge=1, le=100)
    """
    Discount percentage to offer
    """
    message: str = Field(..., max_length=1000)
    """
    Promotion message
    """
    finishDays: int = Field(..., ge=1, le=365)
    """
    Days until promotion ends
    """
    subscribeCounts: int = Field(..., ge=1)
    """
    Maximum subscribers
    """
    subscribeDays: int = Field(..., ge=1, le=365)
    """
    Subscription duration in days
    """
    type: list[str] = Field(..., min_length=1)
    """
    Promotion types
    """


class V2AccessPromotionsPostResponseItem(BaseModel):
    id: float
    message: str
    rawMessage: str
    hasRelatedPromo: bool
    price: float
    type: str
    canClaim: bool
    claimsCount: float
    subscribeCounts: float
    subscribeDays: float
    createdAt: str
    finishedAt: str
    isFinished: bool


class V2AccessPromotionsPostResponse1(BaseModel):
    list: list[ListItem19]
    hasMore: bool


class V2AccessPromotionsPostResponse(
    RootModel[
        list[V2AccessPromotionsPostResponseItem] | V2AccessPromotionsPostResponse1
    ]
):
    root: list[V2AccessPromotionsPostResponseItem] | V2AccessPromotionsPostResponse1


class V2AccessPromotionsPromotionIdPutRequest(BaseModel):
    discount: int | None = Field(None, ge=1, le=100)
    """
    Discount percentage to offer
    """
    message: str | None = Field(None, max_length=1000)
    """
    Promotion message
    """
    finishDays: int | None = Field(None, ge=1, le=365)
    """
    Days until promotion ends
    """
    subscribeCounts: int | None = Field(None, ge=1)
    """
    Maximum subscribers
    """
    subscribeDays: int | None = Field(None, ge=1, le=365)
    """
    Subscription duration in days
    """
    type: list[str] | None = Field(None, min_length=1)
    """
    Promotion types
    """


class V2AccessPromotionsPromotionIdPutResponse(BaseModel):
    id: float
    message: str
    rawMessage: str
    hasRelatedPromo: bool
    price: float
    type: str
    canClaim: bool
    claimsCount: float
    subscribeCounts: float
    subscribeDays: float
    createdAt: str
    finishedAt: str
    isFinished: bool


class V2AccessPromotionsPromotionIdDeleteResponse(BaseModel):
    success: bool


class V2AccessPromotionsPromotionIdStopPostResponse(BaseModel):
    success: bool


class SubscribedByData1(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    showPostsInFeed: bool
    subscribes: list[Subscribe]


class SubscribedOnData1(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    subscribes: list[Subscribe]
    tipsSumm: float
    subscribesSumm: float
    messagesSumm: float
    postsSumm: float
    streamsSumm: float
    totalSumm: float


class ListItem21(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None
    lists: list[List2]
    displayName: str | None = None
    notice: str | None = None
    isRestricted: bool | None = None
    canRestrict: bool | None = None
    subscribedBy: bool | None = None
    subscribedByExpire: bool | None = None
    subscribedByExpireDate: str | None = None
    subscribedByAutoprolong: bool | None = None
    subscribedIsExpiredNow: bool | None = None
    currentSubscribePrice: float | None = None
    subscribedOn: bool | None = None
    subscribedOnExpiredNow: bool | None = None
    subscribedOnDuration: str | None = None
    canReport: bool | None = None
    canReceiveChatMessage: bool | None = None
    hideChat: bool | None = None
    lastSeen: str | None = None
    isPerformer: bool | None = None
    isRealPerformer: bool | None = None
    subscribedByData: SubscribedByData1 | None = None
    subscribedOnData: SubscribedOnData1 | None = None
    canTrialSend: bool | None = None
    isBlocked: bool | None = None
    canUnsubscribe: bool | None = None
    isPendingAutoprolong: bool | None = None


class V2AccessUsersRestrictGetResponse(BaseModel):
    list: list[ListItem21]
    hasMore: bool


class SubscribedByData2(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    showPostsInFeed: bool
    subscribes: list[Subscribe]


class SubscribedOnData2(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    subscribes: list[Subscribe]
    tipsSumm: float
    subscribesSumm: float
    messagesSumm: float
    postsSumm: float
    streamsSumm: float
    totalSumm: float


class ListItem22(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None
    lists: list[List2]
    displayName: str | None = None
    notice: str | None = None
    isRestricted: bool | None = None
    canRestrict: bool | None = None
    subscribedBy: bool | None = None
    subscribedByExpire: bool | None = None
    subscribedByExpireDate: str | None = None
    subscribedByAutoprolong: bool | None = None
    subscribedIsExpiredNow: bool | None = None
    currentSubscribePrice: float | None = None
    subscribedOn: bool | None = None
    subscribedOnExpiredNow: bool | None = None
    subscribedOnDuration: str | None = None
    canReport: bool | None = None
    canReceiveChatMessage: bool | None = None
    hideChat: bool | None = None
    lastSeen: str | None = None
    isPerformer: bool | None = None
    isRealPerformer: bool | None = None
    subscribedByData: SubscribedByData2 | None = None
    subscribedOnData: SubscribedOnData2 | None = None
    canTrialSend: bool | None = None
    isBlocked: bool | None = None
    canUnsubscribe: bool | None = None
    isPendingAutoprolong: bool | None = None


class V2AccessUsersBlockedGetResponse(BaseModel):
    list: list[ListItem22]
    hasMore: bool


class UserIds4(RootModel[list[str]]):
    root: list[str] = Field(..., max_length=10, min_length=1)
    """
    User IDs to fetch (comma-separated string or array)
    """


class UserIds5(RootModel[str]):
    root: str = Field(..., min_length=1)
    """
    User IDs to fetch (comma-separated string or array)
    """


class SubscribedByData3(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    showPostsInFeed: bool
    subscribes: list[Subscribe]


class SubscribedOnData3(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    subscribes: list[Subscribe]
    tipsSumm: float
    subscribesSumm: float
    messagesSumm: float
    postsSumm: float
    streamsSumm: float
    totalSumm: float


class User31(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None
    lists: list[List2]
    displayName: str | None = None
    notice: str | None = None
    about: str | None = None
    isMarkdownDisabledForAbout: bool | None = None
    website: str | None = None
    wishlist: str | None = None
    location: str | None = None
    header: str | None = None
    headerSize: HeaderSize | None = None
    headerThumbs: HeaderThumbs | None = None
    subscribersCount: float | None = None
    postsCount: float | None = None
    archivedPostsCount: float | None = None
    privateArchivedPostsCount: float | None = None
    photosCount: float | None = None
    videosCount: float | None = None
    audiosCount: float | None = None
    mediasCount: float | None = None
    favoritesCount: float | None = None
    favoritedCount: float | None = None
    joinDate: str | None = None
    lastSeen: str | None = None
    subscribedBy: bool | None = None
    subscribedByExpire: bool | None = None
    subscribedByExpireDate: str | None = None
    subscribedByAutoprolong: bool | None = None
    subscribedIsExpiredNow: bool | None = None
    subscribedByData: SubscribedByData3 | None = None
    subscribedOn: bool | None = None
    subscribedOnExpiredNow: bool | None = None
    subscribedOnDuration: str | None = None
    subscribedOnData: SubscribedOnData3 | None = None
    subscribePrice: float | None = None
    currentSubscribePrice: float | None = None
    canAddSubscriber: bool | None = None
    tipsEnabled: bool | None = None
    tipsTextEnabled: bool | None = None
    tipsMin: float | None = None
    tipsMinInternal: float | None = None
    tipsMax: float | None = None
    canLookStory: bool | None = None
    canCommentStory: bool | None = None
    hasNotViewedStory: bool | None = None
    hasStories: bool | None = None
    isRestricted: bool | None = None
    canRestrict: bool | None = None
    isBlocked: bool | None = None
    canReport: bool | None = None
    canUnsubscribe: bool | None = None
    isPendingAutoprolong: bool | None = None
    isPerformer: bool | None = None
    isRealPerformer: bool | None = None
    canReceiveChatMessage: bool | None = None
    canChat: bool | None = None
    showPostsInFeed: bool | None = None
    hasPinnedPosts: bool | None = None
    hasLabels: bool | None = None
    isPrivateRestriction: bool | None = None
    showSubscribersCount: bool | None = None
    showMediaCount: bool | None = None
    isReferrerAllowed: bool | None = None
    canCreatePromotion: bool | None = None
    canCreateTrial: bool | None = None
    isAdultContent: bool | None = None
    canTrialSend: bool | None = None
    isFriend: bool | None = None
    hasScheduledStream: bool | None = None
    hasStream: bool | None = None
    canPayInternal: bool | None = None


class V2AccessUsersListGetResponse(BaseModel):
    users: list[User31]


class SubscribedByData4(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    showPostsInFeed: bool
    subscribes: list[Subscribe]


class SubscribedOnData4(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    subscribes: list[Subscribe]
    tipsSumm: float
    subscribesSumm: float
    messagesSumm: float
    postsSumm: float
    streamsSumm: float
    totalSumm: float


class V2AccessUsersSearchGetResponseItem(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None
    lists: list[List2]
    displayName: str | None = None
    notice: str | None = None
    about: str | None = None
    isMarkdownDisabledForAbout: bool | None = None
    website: str | None = None
    wishlist: str | None = None
    location: str | None = None
    header: str | None = None
    headerSize: HeaderSize | None = None
    headerThumbs: HeaderThumbs | None = None
    subscribersCount: float | None = None
    postsCount: float | None = None
    archivedPostsCount: float | None = None
    privateArchivedPostsCount: float | None = None
    photosCount: float | None = None
    videosCount: float | None = None
    audiosCount: float | None = None
    mediasCount: float | None = None
    favoritesCount: float | None = None
    favoritedCount: float | None = None
    joinDate: str | None = None
    lastSeen: str | None = None
    subscribedBy: bool | None = None
    subscribedByExpire: bool | None = None
    subscribedByExpireDate: str | None = None
    subscribedByAutoprolong: bool | None = None
    subscribedIsExpiredNow: bool | None = None
    subscribedByData: SubscribedByData4 | None = None
    subscribedOn: bool | None = None
    subscribedOnExpiredNow: bool | None = None
    subscribedOnDuration: str | None = None
    subscribedOnData: SubscribedOnData4 | None = None
    subscribePrice: float | None = None
    currentSubscribePrice: float | None = None
    canAddSubscriber: bool | None = None
    tipsEnabled: bool | None = None
    tipsTextEnabled: bool | None = None
    tipsMin: float | None = None
    tipsMinInternal: float | None = None
    tipsMax: float | None = None
    canLookStory: bool | None = None
    canCommentStory: bool | None = None
    hasNotViewedStory: bool | None = None
    hasStories: bool | None = None
    isRestricted: bool | None = None
    canRestrict: bool | None = None
    isBlocked: bool | None = None
    canReport: bool | None = None
    canUnsubscribe: bool | None = None
    isPendingAutoprolong: bool | None = None
    isPerformer: bool | None = None
    isRealPerformer: bool | None = None
    canReceiveChatMessage: bool | None = None
    canChat: bool | None = None
    showPostsInFeed: bool | None = None
    hasPinnedPosts: bool | None = None
    hasLabels: bool | None = None
    isPrivateRestriction: bool | None = None
    showSubscribersCount: bool | None = None
    showMediaCount: bool | None = None
    isReferrerAllowed: bool | None = None
    canCreatePromotion: bool | None = None
    canCreateTrial: bool | None = None
    isAdultContent: bool | None = None
    canTrialSend: bool | None = None
    isFriend: bool | None = None
    hasScheduledStream: bool | None = None
    hasStream: bool | None = None
    canPayInternal: bool | None = None


class V2AccessUsersSearchGetResponse(
    RootModel[list[V2AccessUsersSearchGetResponseItem] | dict[str, Any]]
):
    root: list[V2AccessUsersSearchGetResponseItem] | dict[str, Any]


class SortListItem(BaseModel):
    order: str
    direction: str


class User32(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None


class ListItem23(BaseModel):
    id: str | float
    type: str
    name: str
    usersCount: float | None = None
    postsCount: float | None = None
    order: str | None = None
    direction: str | None = None
    canUpdate: bool | None = None
    canDelete: bool | None = None
    canManageUsers: bool | None = None
    canAddUsers: bool | None = None
    canPinnedToFeed: bool | None = None
    isPinnedToFeed: bool | None = None
    canPinnedToChat: bool | None = None
    isPinnedToChat: bool | None = None
    sortList: list[SortListItem]
    users: list[User32]


class V2AccessUsersListsGetResponse(BaseModel):
    list: list[ListItem23]
    hasMore: bool
    order: str | None = None
    sort: str | None = None


class V2AccessUsersListsPostRequest(BaseModel):
    name: str = Field(..., max_length=100, min_length=1)
    """
    Name for the new user list
    """


class User33(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None


class V2AccessUsersListsPostResponse(BaseModel):
    id: str | float
    type: str
    name: str
    usersCount: float | None = None
    postsCount: float | None = None
    order: str | None = None
    direction: str | None = None
    canUpdate: bool | None = None
    canDelete: bool | None = None
    canManageUsers: bool | None = None
    canAddUsers: bool | None = None
    canPinnedToFeed: bool | None = None
    isPinnedToFeed: bool | None = None
    canPinnedToChat: bool | None = None
    isPinnedToChat: bool | None = None
    sortList: list[SortListItem]
    users: list[User33]


class V2AccessUsersListsListIdPatchRequest(BaseModel):
    name: str = Field(..., max_length=100, min_length=1)
    """
    New name for the user list
    """


class User34(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None


class V2AccessUsersListsListIdPatchResponse(BaseModel):
    id: str | float
    type: str
    name: str
    usersCount: float | None = None
    postsCount: float | None = None
    order: str | None = None
    direction: str | None = None
    canUpdate: bool | None = None
    canDelete: bool | None = None
    canManageUsers: bool | None = None
    canAddUsers: bool | None = None
    canPinnedToFeed: bool | None = None
    isPinnedToFeed: bool | None = None
    canPinnedToChat: bool | None = None
    isPinnedToChat: bool | None = None
    sortList: list[SortListItem]
    users: list[User34]


class V2AccessUsersListsListIdDeleteResponse(BaseModel):
    pass


class User35(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None


class V2AccessUsersListsListIdGetResponse(BaseModel):
    id: str | float
    type: str
    name: str
    usersCount: float | None = None
    postsCount: float | None = None
    order: str | None = None
    direction: str | None = None
    canUpdate: bool | None = None
    canDelete: bool | None = None
    canManageUsers: bool | None = None
    canAddUsers: bool | None = None
    canPinnedToFeed: bool | None = None
    isPinnedToFeed: bool | None = None
    canPinnedToChat: bool | None = None
    isPinnedToChat: bool | None = None
    sortList: list[SortListItem]
    users: list[User35]


class ListItem24(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None


class V2AccessUsersListsListIdUsersGetResponse(BaseModel):
    list: list[ListItem24]
    hasMore: bool
    nextOffset: float | None = None


class User36(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None


class List7(BaseModel):
    id: str | float
    type: str
    name: str
    usersCount: float | None = None
    postsCount: float | None = None
    order: str | None = None
    direction: str | None = None
    canUpdate: bool | None = None
    canDelete: bool | None = None
    canManageUsers: bool | None = None
    canAddUsers: bool | None = None
    canPinnedToFeed: bool | None = None
    isPinnedToFeed: bool | None = None
    canPinnedToChat: bool | None = None
    isPinnedToChat: bool | None = None
    sortList: list[SortListItem]
    users: list[User36]


class UserState(BaseModel):
    id: str | float
    type: str
    name: str
    hasUser: bool
    canAddUser: bool | None = None
    cannotAddUserReason: str | None = None


class V2AccessUsersListsListIdUsersUserIdPostResponse1(BaseModel):
    list: List7
    userState: UserState


class V2AccessUsersListsListIdUsersUserIdPostResponse(
    RootModel[V2AccessUsersListsListIdUsersUserIdPostResponse1 | dict[str, Any]]
):
    root: V2AccessUsersListsListIdUsersUserIdPostResponse1 | dict[str, Any]


class ListItem25(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None


class V2AccessUsersListsListIdUsersUserIdDeleteResponse1(BaseModel):
    list: list[ListItem25]
    hasMore: bool
    nextOffset: float | None = None


class V2AccessUsersListsListIdUsersUserIdDeleteResponse(
    RootModel[V2AccessUsersListsListIdUsersUserIdDeleteResponse1 | dict[str, Any]]
):
    root: V2AccessUsersListsListIdUsersUserIdDeleteResponse1 | dict[str, Any]


class ListId(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    List ID
    """


class V2AccessUsersUserIdListsPostRequest(BaseModel):
    listIds: list[ListId] = Field(..., max_length=5, min_length=1)
    """
    List IDs to add the user to
    """


class Succes(BaseModel):
    listId: float
    success: bool


class Error(BaseModel):
    listId: float
    error: str


class V2AccessUsersUserIdListsPostResponse(BaseModel):
    success: list[Succes]
    errors: list[Error] | None = None


class List8(BaseModel):
    id: str | float
    type: str
    name: str


class SubscribedByData5(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    showPostsInFeed: bool
    subscribes: list[Subscribe]


class SubscribedOnData5(BaseModel):
    price: float
    newPrice: float
    regularPrice: float
    subscribePrice: float
    discountPercent: float
    discountPeriod: float
    subscribeAt: str
    expiredAt: str
    renewedAt: str
    discountFinishedAt: str
    discountStartedAt: str
    status: str
    isMuted: bool
    unsubscribeReason: str
    duration: str
    hasActivePaidSubscriptions: bool
    subscribes: list[Subscribe]
    tipsSumm: float
    subscribesSumm: float
    messagesSumm: float
    postsSumm: float
    streamsSumm: float
    totalSumm: float


class V2AccessUsersUserIdGetResponse1(BaseModel):
    id: float
    username: str
    name: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs | None = None
    lists: list[List8]
    displayName: str | None = None
    notice: str | None = None
    about: str | None = None
    isMarkdownDisabledForAbout: bool | None = None
    website: str | None = None
    wishlist: str | None = None
    location: str | None = None
    header: str | None = None
    headerSize: HeaderSize | None = None
    headerThumbs: HeaderThumbs | None = None
    subscribersCount: float | None = None
    postsCount: float | None = None
    archivedPostsCount: float | None = None
    privateArchivedPostsCount: float | None = None
    photosCount: float | None = None
    videosCount: float | None = None
    audiosCount: float | None = None
    mediasCount: float | None = None
    favoritesCount: float | None = None
    favoritedCount: float | None = None
    joinDate: str | None = None
    lastSeen: str | None = None
    subscribedBy: bool | None = None
    subscribedByExpire: bool | None = None
    subscribedByExpireDate: str | None = None
    subscribedByAutoprolong: bool | None = None
    subscribedIsExpiredNow: bool | None = None
    subscribedByData: SubscribedByData5 | None = None
    subscribedOn: bool | None = None
    subscribedOnExpiredNow: bool | None = None
    subscribedOnDuration: str | None = None
    subscribedOnData: SubscribedOnData5 | None = None
    subscribePrice: float | None = None
    currentSubscribePrice: float | None = None
    canAddSubscriber: bool | None = None
    tipsEnabled: bool | None = None
    tipsTextEnabled: bool | None = None
    tipsMin: float | None = None
    tipsMinInternal: float | None = None
    tipsMax: float | None = None
    canLookStory: bool | None = None
    canCommentStory: bool | None = None
    hasNotViewedStory: bool | None = None
    hasStories: bool | None = None
    isRestricted: bool | None = None
    canRestrict: bool | None = None
    isBlocked: bool | None = None
    canReport: bool | None = None
    canUnsubscribe: bool | None = None
    isPendingAutoprolong: bool | None = None
    isPerformer: bool | None = None
    isRealPerformer: bool | None = None
    canReceiveChatMessage: bool | None = None
    canChat: bool | None = None
    showPostsInFeed: bool | None = None
    hasPinnedPosts: bool | None = None
    hasLabels: bool | None = None
    isPrivateRestriction: bool | None = None
    showSubscribersCount: bool | None = None
    showMediaCount: bool | None = None
    isReferrerAllowed: bool | None = None
    canCreatePromotion: bool | None = None
    canCreateTrial: bool | None = None
    isAdultContent: bool | None = None
    canTrialSend: bool | None = None
    isFriend: bool | None = None
    hasScheduledStream: bool | None = None
    hasStream: bool | None = None
    canPayInternal: bool | None = None


class V2AccessUsersUserIdGetResponse(
    RootModel[V2AccessUsersUserIdGetResponse1 | dict[str, Any]]
):
    root: V2AccessUsersUserIdGetResponse1 | dict[str, Any]


class V2AccessUsersUserIdRestrictPostResponse(BaseModel):
    pass


class V2AccessUsersUserIdRestrictDeleteResponse(BaseModel):
    pass


class SortBy4(Enum):
    RECENT = "recent"
    MOST_LIKED = "most-liked"
    HIGHEST_TIPS = "highest-tips"


class MediaType(Enum):
    PHOTO = "photo"
    VIDEO = "video"
    AUDIO = "audio"
    GIF = "gif"


class Type25(Enum):
    PHOTO = "photo"
    VIDEO = "video"
    GIF = "gif"
    AUDIO = "audio"


class User37(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm23(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User37 | None = None


class Full19(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview21(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files19(BaseModel):
    full: Full19
    thumb: Thumb | None = None
    preview: Preview21 | None = None
    squarePreview: SquarePreview | None = None


class Counters2(BaseModel):
    likesCount: float
    tipsSumm: float


class List9(BaseModel):
    id: float
    type: str
    name: str


class ListItem26(BaseModel):
    id: float
    type: Type25
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm23]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files19 | None = None
    counters: Counters2
    hasPosts: bool | None = None
    lists: list[List9]


class V2AccessVaultMediaGetResponse(BaseModel):
    list: list[ListItem26]
    hasMore: bool


class Type26(Enum):
    CUSTOM = "custom"
    MESSAGES = "messages"
    POSTS = "posts"
    STORIES = "stories"
    STREAMS = "streams"
    MEDIA_STICKERS = "media_stickers"


class Type27(Enum):
    PHOTO = "photo"
    VIDEO = "video"
    GIF = "gif"
    AUDIO = "audio"


class Media(BaseModel):
    type: Type27
    url: str | None = None


class ListItem27(BaseModel):
    id: float
    type: Type26
    name: str
    hasMedia: bool
    canUpdate: bool
    canDelete: bool
    medias: list[Media]


class Media1(BaseModel):
    type: Any


class All1(BaseModel):
    videosCount: float
    photosCount: float
    gifsCount: float
    audiosCount: float
    medias: list[Media1]


class V2AccessVaultListsGetResponse(BaseModel):
    list: list[ListItem27]
    all: All1
    hasMore: bool
    canCreateVaultLists: bool
    order: str
    sort: str


class V2AccessVaultListsPostRequest(BaseModel):
    name: str


class Type28(Enum):
    CUSTOM = "custom"
    MESSAGES = "messages"
    POSTS = "posts"
    STORIES = "stories"
    STREAMS = "streams"
    MEDIA_STICKERS = "media_stickers"


class Type29(Enum):
    PHOTO = "photo"
    VIDEO = "video"
    GIF = "gif"
    AUDIO = "audio"


class Media2(BaseModel):
    type: Type29
    url: str | None = None


class V2AccessVaultListsPostResponse(BaseModel):
    id: float
    type: Type28
    name: str
    hasMedia: bool
    canUpdate: bool
    canDelete: bool
    medias: list[Media2]


class V2AccessVaultListsListIdPatchRequest(BaseModel):
    name: str = Field(..., max_length=100, min_length=1)
    """
    New name for the vault list
    """
    clearMedia: bool | None = False
    """
    Remove all media from the list
    """


class Type30(Enum):
    CUSTOM = "custom"
    MESSAGES = "messages"
    POSTS = "posts"
    STORIES = "stories"
    STREAMS = "streams"
    MEDIA_STICKERS = "media_stickers"


class Type31(Enum):
    PHOTO = "photo"
    VIDEO = "video"
    GIF = "gif"
    AUDIO = "audio"


class Media3(BaseModel):
    type: Type31
    url: str | None = None


class V2AccessVaultListsListIdPatchResponse(BaseModel):
    id: float
    type: Type30
    name: str
    hasMedia: bool
    canUpdate: bool
    canDelete: bool
    medias: list[Media3]


class V2AccessVaultListsListIdDeleteResponse(BaseModel):
    pass


class MediaId(RootModel[int]):
    root: int = Field(..., gt=0)
    """
    OnlyFans media ID
    """


class V2AccessVaultListsListIdMediaPostRequest(BaseModel):
    mediaIds: list[MediaId] = Field(..., max_length=100, min_length=1)
    """
    Media IDs to add to the list
    """


class Type32(Enum):
    CUSTOM = "custom"
    MESSAGES = "messages"
    POSTS = "posts"
    STORIES = "stories"
    STREAMS = "streams"
    MEDIA_STICKERS = "media_stickers"


class Type33(Enum):
    PHOTO = "photo"
    VIDEO = "video"
    GIF = "gif"
    AUDIO = "audio"


class Media4(BaseModel):
    type: Type33
    url: str | None = None


class V2AccessVaultListsListIdMediaPostResponse(BaseModel):
    id: float
    type: Type32
    name: str
    hasMedia: bool
    canUpdate: bool
    canDelete: bool
    medias: list[Media4]


class User38(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm24(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User38 | None = None


class Full20(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview22(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files20(BaseModel):
    full: Full20
    thumb: Thumb | None = None
    preview: Preview22 | None = None
    squarePreview: SquarePreview | None = None


class ListItem28(BaseModel):
    id: float
    type: Type33
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm24]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files20 | None = None
    counters: Counters2
    hasPosts: bool | None = None
    lists: list[List9]


class V2AccessVaultListsListIdMediaGetResponse(BaseModel):
    list: list[ListItem28]
    hasMore: bool


class V2AccessUploadsCheckPostRequest(BaseModel):
    etag: str = Field(..., min_length=1)
    """
    ETag from the upload response
    """
    size: int = Field(..., gt=0)
    """
    Uploaded file size in bytes
    """


class User39(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm25(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User39 | None = None


class Full21(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview23(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files21(BaseModel):
    full: Full21
    thumb: Thumb | None = None
    preview: Preview23 | None = None
    squarePreview: SquarePreview | None = None


class Media5(BaseModel):
    id: float
    type: Type33
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm25]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files21 | None = None


class V2AccessUploadsCheckPostResponse(BaseModel):
    exists: bool
    media: Media5 | None = None


class Mode(Enum):
    MESSAGE = "message"


class VaultUpload(BaseModel):
    mode: Mode | None = "message"
    """
    Upload mode
    """
    userId: str | None = Field(None, min_length=1)
    """
    Target user ID for the upload
    """


class V2AccessUploadsInitPostRequest(BaseModel):
    filename: str = Field(..., min_length=1)
    """
    Name of the file to upload
    """
    size: int = Field(..., gt=0)
    """
    File size in bytes
    """
    contentType: str = Field(..., min_length=1)
    """
    MIME type of the file (e.g., image/jpeg, video/mp4)
    """
    vaultUpload: VaultUpload | None = None
    """
    Options for vault upload (if uploading to vault)
    """


class V2AccessUploadsInitPostResponse(BaseModel):
    mediaUploadId: str


class V2AccessUploadsMediaUploadIdPartsPartNumberPutResponse(BaseModel):
    mediaUploadId: str
    partNumber: int = Field(..., gt=0)
    etag: str


class User40(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm26(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User40 | None = None


class Full22(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview24(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files22(BaseModel):
    full: Full22
    thumb: Thumb | None = None
    preview: Preview24 | None = None
    squarePreview: SquarePreview | None = None


class Media6(BaseModel):
    id: float
    type: Type33
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm26]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files22 | None = None


class V2AccessUploadsMediaUploadIdPutResponse(BaseModel):
    mediaUploadId: str
    media: Media6 | None = None


class V2AccessUploadsCompletePostRequest(BaseModel):
    mediaUploadId: str = Field(..., min_length=1)
    """
    Upload session ID to complete
    """


class User41(BaseModel):
    view: str
    id: float
    name: str
    username: str
    isVerified: bool
    avatar: str
    avatarThumbs: AvatarThumbs
    ivStatus: str
    isFromGuest: bool


class ReleaseForm27(BaseModel):
    id: float
    name: str
    partnerSource: str
    type: str
    user: User41 | None = None


class Full23(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    sources: list[Source]


class Preview25(BaseModel):
    url: str
    width: float | None = None
    height: float | None = None
    size: float | None = None
    options: list[Option2]


class Files23(BaseModel):
    full: Full23
    thumb: Thumb | None = None
    preview: Preview25 | None = None
    squarePreview: SquarePreview | None = None


class Media7(BaseModel):
    id: float
    type: Type33
    convertedToVideo: bool
    canView: bool
    hasError: bool
    createdAt: str
    isReady: bool
    duration: float | None = None
    releaseForms: list[ReleaseForm27]
    hasCustomPreview: bool | None = None
    videoSources: VideoSources | None = None
    files: Files23 | None = None


class V2AccessUploadsCompletePostResponse(BaseModel):
    mediaUploadId: str
    media: Media7 | None = None


class Geolocation(BaseModel):
    country: str
    """
    Geolocation country code override (e.g. US).
    """
    state: str | None = None
    """
    Geolocation state/region override (e.g. CA for California).
    """
    city: str | None = None
    """
    Geolocation city override (e.g. San Francisco).
    """


class V2LinkInitPostRequest(BaseModel):
    redirectUrl: AnyUrl | None = None
    """
    URL to redirect to after completion. If omitted, uses first allowed redirect URI.
    """
    clientReferenceId: str | None = None
    """
    Your internal reference ID for webhook correlation.
    """
    connectionId: str | None = None
    """
    Existing connection ID to reconnect.
    """
    geolocation: Geolocation | None = None


class V2LinkInitPostResponse(BaseModel):
    url: str
    """
    URL to redirect the user to
    """
    expiresAt: str
    """
    ISO timestamp when the session expires
    """


class V2LinkInitPostResponse1(BaseModel):
    error: str


class Status4(Enum):
    INITIALIZED = "initialized"
    PENDING = "pending"
    AWAITING_2FA = "awaiting_2fa"
    DENIED = "denied"
    COMPLETED = "completed"
    INVALID_CREDENTIALS = "invalid_credentials"
    FAILED = "failed"
    NOT_FOUND = "not_found"


class Option25(Enum):
    PHONE = "phone"
    APP = "app"
    FACE = "face"
    FORCE_FACE = "forceFace"


class PhoneCode(BaseModel):
    requestAttemptsLimit: float
    requestAttemptsLeft: float
    checkAttemptsLimit: float | None = None
    checkAttemptsLeft: float | None = None
    expirationDate: str | None = None
    expirationSeconds: float | None = None
    lastSentDate: str | None = None


class FaceCode(BaseModel):
    requestAttemptsLimit: float
    requestAttemptsLeft: float


class TwoFactorState(BaseModel):
    options: list[Option25]
    phoneCode: PhoneCode | None = None
    faceCode: FaceCode | None = None
    phoneLast4: str | None = None


class Data(BaseModel):
    twoFactorState: TwoFactorState


class Session(BaseModel):
    user_id: str = Field(..., alias="user-id")
    user_agent: str = Field(..., alias="user-agent")
    cookie: str
    x_bc: str = Field(..., alias="x-bc")


class UserData3(BaseModel):
    id: str
    name: str
    username: str
    avatar: str


class Data1(BaseModel):
    id: str
    session: Session
    userData: UserData3


class V2LinkClientSecretGetResponse(BaseModel):
    status: Status4
    data: Data | Data1 | None = None


class Rules(BaseModel):
    static_param: str
    format: str
    start: str
    end: str
    prefix: str
    suffix: str
    checksum_constant: float
    checksum_indexes: list[float]
    app_token: str
    revision: str


class V2DynamicRulesGetResponse(BaseModel):
    rules: Rules
    is_current: bool
    is_public: bool
    is_early_access: bool


class V2DynamicRulesGetResponse1(BaseModel):
    error: str
    is_current: bool | None = None
    is_public: bool | None = None
    is_early_access: bool | None = None


class V2DynamicRulesSignPostRequest(BaseModel):
    endpoint: str
    time: float | str | None = None
    user_id: float | str | None = Field(None, alias="user-id")


class Signed(BaseModel):
    sign: str
    time: str
    user_id: str | None = Field(None, alias="user-id")
    app_token: str = Field(..., alias="app-token")


class V2DynamicRulesSignPostResponse(BaseModel):
    signed: Signed
    is_public: bool
    is_early_access: bool


class V2DynamicRulesSignPostResponse1(BaseModel):
    error: str
    is_current: bool | None = None
    is_public: bool | None = None
    is_early_access: bool | None = None


class V2DynamicRulesStatusGetResponse(BaseModel):
    revision: str
    early_access_revision: str
    public_revision: str
    is_current: bool
    is_early_access: bool
    is_public: bool
    access_granted: bool
    """
    Whether the user has access to the latest rules, based on apikey header
    """


class RulesGetResponse(BaseModel):
    rules: Rules
    is_current: bool
    is_public: bool
    is_early_access: bool


class RulesGetResponse1(BaseModel):
    error: str
    is_current: bool | None = None
    is_public: bool | None = None
    is_early_access: bool | None = None


class SignPostRequest(BaseModel):
    endpoint: str
    time: float | str | None = None
    user_id: float | str | None = Field(None, alias="user-id")


class SignPostResponse(BaseModel):
    signed: Signed
    is_public: bool
    is_early_access: bool


class SignPostResponse1(BaseModel):
    error: str
    is_current: bool | None = None
    is_public: bool | None = None
    is_early_access: bool | None = None


class V2VaultPlusStoreListListIdPostResponse(BaseModel):
    queued: bool
    listId: str
    estimatedItems: float | None = None


class V2VaultPlusStoreStatusGetResponse(BaseModel):
    connectionId: str
    totalMedia: float
    storedCount: float
    pendingCount: float
    totalSizeBytes: float


class V2VaultPlusStoreStatsGetResponse(BaseModel):
    totalConnections: float
    connectionsWithVaultPlus: float
    totalStorageBytes: float
    totalMediaCount: float


class Type38(Enum):
    IMAGE = "image"
    VIDEO = "video"
    AUDIO = "audio"


class Status5(Enum):
    EDGE_ONLY = "edge_only"
    PENDING = "pending"
    STORING = "storing"
    STORED = "stored"
    REMOVED = "removed"


class Source24(Enum):
    VAULT = "vault"
    MESSAGES = "messages"
    POSTS = "posts"
    STORIES = "stories"


class Media8(BaseModel):
    id: str
    status: Status5
    quality: str
    sizeBytes: float
    contentType: str
    source: Source24
    accessCount: float
    createdAt: float
    expiresAt: float
    storedAt: float
    lastAccessedAt: float
    url: str


class V2VaultPlusMediaIdGetResponse(BaseModel):
    id: str
    type: Type38
    duration: float
    media: dict[str, Media8]


class V2VaultPlusMediaIdDeleteResponse(BaseModel):
    success: bool
    mediaId: str
    freedBytes: float


class V2VaultPlusBatchPostRequest(BaseModel):
    mediaIds: list[str] = Field(..., max_length=100)


class Media9(BaseModel):
    id: str
    status: Status5
    quality: str
    sizeBytes: float
    contentType: str
    source: Source24
    accessCount: float
    createdAt: float
    expiresAt: float
    storedAt: float
    lastAccessedAt: float
    url: str


class Item7(BaseModel):
    id: str
    type: Type38
    duration: float
    media: dict[str, Media9]


class V2VaultPlusBatchPostResponse(BaseModel):
    items: list[Item7]


class Media10(BaseModel):
    id: str
    status: Status5
    quality: str
    sizeBytes: float
    contentType: str
    source: Source24
    accessCount: float
    createdAt: float
    expiresAt: float
    storedAt: float
    lastAccessedAt: float
    url: str


class Item8(BaseModel):
    id: str
    type: Type38
    duration: float
    media: dict[str, Media10]


class V2VaultPlusListGetResponse(BaseModel):
    items: list[Item8]
    nextCursor: str | None = None


class V2VaultPlusPurgeDeleteResponse(BaseModel):
    success: bool
    purgedCount: float
    freedBytes: float
