Add optional photo providers, layout studio and scoped integrations
This commit is contained in:
@@ -68,13 +68,26 @@ class PhotoSourceContent(StrictModel):
|
||||
profile: Profile = Profile.color
|
||||
|
||||
|
||||
class ProviderContent(StrictModel):
|
||||
type: Literal["provider"]
|
||||
provider_id: str = Field(pattern=r"^[a-z0-9-]{1,60}$")
|
||||
template: str = Field(default="daily-dashboard", pattern=r"^[a-z0-9-]{1,60}$")
|
||||
data: dict[str, Any] = Field(default_factory=dict)
|
||||
profile: Profile = Profile.color
|
||||
|
||||
|
||||
class FutureContent(StrictModel):
|
||||
type: Literal["html", "markdown"]
|
||||
data: str = ""
|
||||
|
||||
|
||||
Content = Annotated[
|
||||
ImageContent | URLContent | TemplateContent | PhotoSourceContent | FutureContent,
|
||||
ImageContent
|
||||
| URLContent
|
||||
| TemplateContent
|
||||
| PhotoSourceContent
|
||||
| ProviderContent
|
||||
| FutureContent,
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
||||
@@ -141,6 +154,7 @@ class ErrorResponse(BaseModel):
|
||||
|
||||
|
||||
class OperationResult(BaseModel):
|
||||
cover_id: int | None = None
|
||||
photo_attempts: list[dict[str, str]] = Field(default_factory=list)
|
||||
image_id: int | None = None
|
||||
asset_id: str | None = None
|
||||
@@ -195,7 +209,7 @@ class CurrentContent(BaseModel):
|
||||
class Device(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
driver: Literal["kokonna"] = "kokonna"
|
||||
driver: str = "kokonna"
|
||||
status: Literal["online", "offline"]
|
||||
model: str
|
||||
model_code: str
|
||||
|
||||
Reference in New Issue
Block a user