2024-07-28 15:20:05 -07:00
import datetime
from typing import Any , Dict , List , Literal , Optional , Union
from uuid import UUID
2023-08-17 12:48:13 -07:00
2024-07-28 15:20:05 -07:00
from pydantic import AnyUrl , Base64Bytes , BaseModel , ConfigDict
from pydantic_extra_types . phone_numbers import PhoneNumber
2023-08-17 12:48:13 -07:00
2024-07-28 15:20:05 -07:00
from . base64data import Base64Data
2023-08-17 12:48:13 -07:00
2023-11-29 00:39:14 -08:00
2023-11-28 23:50:50 -08:00
class RawFile ( BaseModel ) :
2023-12-21 08:14:08 -08:00
""" A raw file with unencoded contents to be passed over binary websockets. When raw files come back for exports it is sent as binary/bson, not text/json. """
2023-11-27 16:01:20 -08:00
2023-11-28 23:50:50 -08:00
contents : bytes
2023-08-17 12:48:13 -07:00
2023-11-28 23:50:50 -08:00
name : str
2024-01-06 18:32:21 -08:00
model_config = ConfigDict ( protected_namespaces = ( ) )