52ff2f80ad
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
38 lines
894 B
Python
38 lines
894 B
Python
"""Recipe commands."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from typing import List, Optional
|
|
|
|
|
|
@dataclass
|
|
class RecipeItemCommand:
|
|
item_type: str
|
|
item_id: str
|
|
position: int = 0
|
|
metadata_: dict = field(default_factory=dict)
|
|
|
|
|
|
@dataclass
|
|
class CreateRecipeCommand:
|
|
user_id: str
|
|
name: str
|
|
description: str = ""
|
|
template_id: str = ""
|
|
generation_params: dict = field(default_factory=dict)
|
|
items: List[RecipeItemCommand] = field(default_factory=list)
|
|
metadata_: dict = field(default_factory=dict)
|
|
|
|
|
|
@dataclass
|
|
class UpdateRecipeCommand:
|
|
recipe_id: str
|
|
user_id: str
|
|
name: Optional[str] = None
|
|
description: Optional[str] = None
|
|
template_id: Optional[str] = None
|
|
generation_params: Optional[dict] = None
|
|
items: Optional[List[RecipeItemCommand]] = None
|
|
metadata_: Optional[dict] = None
|