Files
非法操作andautofix-ci[bot] 163062847b refactor(api): relocate trigger plugin runtime (#45966)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-11-11 09:43:32 +00:00

23 lines
791 B
Python

"""Persistence contract for temporary trigger subscription builders and logs."""
from contextlib import AbstractContextManager
from typing import Protocol
from services.trigger.builder_entities import RequestLog, SubscriptionBuilder
class TriggerSubscriptionBuilderStore(Protocol):
"""Persist temporary builders and validation logs without owning their policies."""
def get(self, *, subscription_id: str) -> SubscriptionBuilder | None: ...
def save(self, *, builder: SubscriptionBuilder) -> None: ...
def delete(self, *, subscription_id: str) -> None: ...
def lock(self, *, subscription_id: str) -> AbstractContextManager[None]: ...
def list_logs(self, *, endpoint_id: str) -> list[RequestLog]: ...
def append_log(self, *, log: RequestLog) -> None: ...