@@ -0,0 +1,30 @@
|
||||
from typing import Literal
|
||||
from pydantic import BaseModel, Field
|
||||
from .schematic import Diagnostic
|
||||
|
||||
class ApiError(BaseModel):
|
||||
code: str
|
||||
message: str
|
||||
|
||||
class ErrorEnvelope(BaseModel):
|
||||
success: Literal[False] = False
|
||||
error: ApiError
|
||||
|
||||
class RenderStatus(BaseModel):
|
||||
success: bool
|
||||
id: str = Field(description='Unpredictable 192-bit identifier, encoded as 48 hex characters')
|
||||
status: Literal['queued','processing','completed','failed']
|
||||
viewer_url: str = Field(description='Base viewer URL; only initial upload includes private token fragment')
|
||||
expires_at: float = Field(description='Unix timestamp, UTC seconds')
|
||||
access: Literal['private','unlisted']
|
||||
schema_version: str | None = None
|
||||
compatibility: Literal['partial','supported_subset'] | None = None
|
||||
record_count: int | None = None
|
||||
component_count: int | None = None
|
||||
primitive_count: int | None = None
|
||||
diagnostics: list[Diagnostic] | None = None
|
||||
error: ApiError | None = None
|
||||
|
||||
class UploadResponse(RenderStatus):
|
||||
status_url: str
|
||||
viewer_token: str | None = Field(default=None,description='Read capability returned once for a private upload')
|
||||
مرجع در شماره جدید
مسدود کردن کاربر