# Path: pyuploadcare/api/entities.py
# class DocumentConvertInfo(DocumentConvertShortInfo):
#     original_source: str
#     token: int
# 
# class Entity(BaseModel):
#     ...
# 
# class FileInfo(UUIDEntity):
#     datetime_removed: Optional[datetime]
#     datetime_stored: Optional[datetime]
#     datetime_uploaded: Optional[datetime]
#     image_info: Optional[ImageInfo]
#     is_image: Optional[bool]
#     is_ready: Optional[bool]
#     mime_type: Optional[str]
#     original_file_url: Optional[str]
#     original_filename: Optional[str]
#     size: Optional[int]
#     url: Optional[str]
#     variations: Optional[Dict[str, UUID]]
#     video_info: Optional[VideoInfo]
#     source: Optional[str]
#     rekognition_info: Optional[Dict[str, Decimal]]
# 
# class GroupInfo(Entity):
#     id: str
#     _fetched: Optional[bool] = PrivateAttr(default=False)
#     datetime_created: Optional[datetime]
#     datetime_stored: Optional[datetime]
#     files_count: Optional[int]
#     cdn_url: Optional[str]
#     url: Optional[str]
#     files: Optional[List[Optional[FileInfo]]]
# 
# class VideoConvertInfo(VideoConvertShortInfo):
#     token: int
#     original_source: str


import typing
from pydantic import BaseModel
from pyuploadcare.api.entities import (
    DocumentConvertInfo,
    Entity,
    FileInfo,
    GroupInfo,
    VideoConvertInfo,
)
    results: typing.List[Entity]


class PaginatedResponse(EntityListResponse):
    next: typing.Optional[str]
    previous: typing.Optional[str]
    total: int
    per_page: int


class FileListResponse(PaginatedResponse):
    # https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/filesList
    results: typing.List[FileInfo]  # type: ignore


class GroupListResponse(PaginatedResponse):
    # https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/groupsList
    results: typing.List[GroupInfo]  # type: ignore


class BatchFileOperationResponse(Response):
    # https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/filesStoring
    status: str
    problems: typing.Optional[typing.Dict[str, typing.Any]]
    result: typing.Optional[typing.List[FileInfo]]


class CreateLocalCopyResponse(Response):
    # https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/createLocalCopy
    type: str

# Path: pyuploadcare/api/entities.py
# class DocumentConvertInfo(DocumentConvertShortInfo):
#     original_source: str
#     token: int
# 
# class Entity(BaseModel):
#     ...
# 
# class FileInfo(UUIDEntity):
#     datetime_removed: Optional[datetime]
#     datetime_stored: Optional[datetime]
#     datetime_uploaded: Optional[datetime]
#     image_info: Optional[ImageInfo]
#     is_image: Optional[bool]
#     is_ready: Optional[bool]
#     mime_type: Optional[str]
#     original_file_url: Optional[str]
#     original_filename: Optional[str]
#     size: Optional[int]
#     url: Optional[str]
#     variations: Optional[Dict[str, UUID]]
#     video_info: Optional[VideoInfo]
#     source: Optional[str]
#     rekognition_info: Optional[Dict[str, Decimal]]
# 
# class GroupInfo(Entity):
#     id: str
#     _fetched: Optional[bool] = PrivateAttr(default=False)
#     datetime_created: Optional[datetime]
#     datetime_stored: Optional[datetime]
#     files_count: Optional[int]
#     cdn_url: Optional[str]
#     url: Optional[str]
#     files: Optional[List[Optional[FileInfo]]]
# 
# class VideoConvertInfo(VideoConvertShortInfo):
#     token: int
#     original_source: str


# Path: pyuploadcare/api/responses.py
import typing
from pydantic import BaseModel
from pyuploadcare.api.entities import (
    DocumentConvertInfo,
    Entity,
    FileInfo,
    GroupInfo,
    VideoConvertInfo,
)

    results: typing.List[Entity]


class PaginatedResponse(EntityListResponse):
    next: typing.Optional[str]
    previous: typing.Optional[str]
    total: int
    per_page: int


class FileListResponse(PaginatedResponse):
    # https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/filesList
    results: typing.List[FileInfo]  # type: ignore


class GroupListResponse(PaginatedResponse):
    # https://uploadcare.com/api-refs/rest-api/v0.5.0/#operation/groupsList
    results: typing.List[GroupInfo]  # type: ignore


class BatchFileOperationResponse(Response):
    # https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/filesStoring
    status: str
    problems: typing.Optional[typing.Dict[str, typing.Any]]
    result: typing.Optional[typing.List[FileInfo]]


class CreateLocalCopyResponse(Response):
    # https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/createLocalCopy
    type: str

    result: FileInfo