94aead4342
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production Runtime Images (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
60 lines
1.5 KiB
Python
Executable File
60 lines
1.5 KiB
Python
Executable File
from __future__ import annotations
|
|
|
|
from typing import Protocol
|
|
|
|
from packages.domain import GenerationTask
|
|
|
|
|
|
class GenerationTaskRepository(Protocol):
|
|
def create(self, task: GenerationTask) -> GenerationTask: ...
|
|
|
|
def get(self, task_id: str) -> GenerationTask | None: ...
|
|
|
|
def list_by_project(self, project_id: str) -> list[GenerationTask]: ...
|
|
|
|
def list_by_user(self, user_id: str) -> list[GenerationTask]: ...
|
|
|
|
def count_by_user(self, user_id: str) -> int: ...
|
|
|
|
def count_pending_by_user(self, user_id: str) -> int: ...
|
|
|
|
def count_pending_total(self) -> int: ...
|
|
|
|
def list_recent_by_user(self, user_id: str, limit: int = 5) -> list[GenerationTask]: ...
|
|
|
|
def list_by_source_edit_plan(self, plan_id: str) -> list[GenerationTask]: ...
|
|
|
|
def list_by_user_filtered(
|
|
self,
|
|
user_id: str,
|
|
*,
|
|
status: str | None = None,
|
|
limit: int | None = None,
|
|
offset: int = 0,
|
|
) -> list[GenerationTask]: ...
|
|
|
|
def count_by_user_filtered(
|
|
self,
|
|
user_id: str,
|
|
*,
|
|
status: str | None = None,
|
|
) -> int: ...
|
|
|
|
def list_by_project_filtered(
|
|
self,
|
|
project_id: str,
|
|
*,
|
|
status: str | None = None,
|
|
limit: int | None = None,
|
|
offset: int = 0,
|
|
) -> list[GenerationTask]: ...
|
|
|
|
def count_by_project_filtered(
|
|
self,
|
|
project_id: str,
|
|
*,
|
|
status: str | None = None,
|
|
) -> int: ...
|
|
|
|
def update(self, task: GenerationTask) -> GenerationTask: ...
|