mirror of
https://github.com/stoatchat/python-client-sdk.git
synced 2026-08-24 11:22:54 -04:00
24 lines
463 B
Python
Executable File
24 lines
463 B
Python
Executable File
from __future__ import annotations
|
|
|
|
from typing import Literal, TypedDict, Union
|
|
|
|
__all__ = ("File",)
|
|
|
|
class SizedMetadata(TypedDict):
|
|
type: Literal["Image", "Video"]
|
|
height: int
|
|
width: int
|
|
|
|
class SimpleMetadata(TypedDict):
|
|
type: Literal["File", "Text", "Audio"]
|
|
|
|
FileMetadata = Union[SizedMetadata, SimpleMetadata]
|
|
|
|
class File(TypedDict):
|
|
_id: str
|
|
tag: str
|
|
size: int
|
|
filename: str
|
|
metadata: FileMetadata
|
|
content_type: str
|