1
0

Store posting results to a mongodb

This commit is contained in:
2026-03-30 12:23:13 +02:00
parent d800d9b7be
commit fb19145e8c
13 changed files with 331 additions and 9 deletions

View File

@@ -1,6 +1,8 @@
from __future__ import annotations
from typing import Protocol
from typing import Any, Protocol
from content_automation.models import PublishedContentRecord
class SocialNetworkAdapter(Protocol):
@@ -8,5 +10,12 @@ class SocialNetworkAdapter(Protocol):
name: str
def post_media(self, media_url: str, caption: str) -> str:
"""Publish media and return an external post identifier."""
def post_media(self, media_url: str, caption: str) -> Any:
"""Publish media and return a provider response payload."""
class PublishedContentStore(Protocol):
"""Contract for persisting publish operation metadata."""
def save(self, record: PublishedContentRecord) -> None:
"""Persist a published content record."""