приватные каналы

This commit is contained in:
Artem Tsyrulnikov
2026-01-21 02:41:20 +03:00
parent 233afb5451
commit b5695360c2
27 changed files with 1026 additions and 217 deletions

View File

@@ -21,6 +21,7 @@ from .auth.get_jwt_by_telegram_id import get_jwt_by_telegram_id
from .auth.get_me import get_me
from .auth.validate_login_token import validate_login_token
from .channel.attach_channel_to_workspace import attach_channel_to_workspace
from .channel.create_channels import create_channels
from .channel.get_channel import get_channel
from .channel.get_channels import get_channels
from .creative.create_creative import create_creative
@@ -98,12 +99,15 @@ class JWTEncoder(typing.Protocol):
class FetchChannelResponse(typing.Protocol):
telegram_id: int
username: str
title: str
username: str | None
title: str | None
access_hash: int | None
pts: int | None
class Parser(typing.Protocol):
async def fetch_telegram_channel(self, username: str) -> FetchChannelResponse | None: ...
async def resolve_telegram_channel_by_invite(self, invite_link: str) -> FetchChannelResponse | None: ...
class S3Storage(typing.Protocol):
@@ -185,6 +189,7 @@ class Usecase:
update_project_permissions = update_project_permissions
update_project_invite_link_type = update_project_invite_link_type
get_channels = get_channels
create_channels = create_channels
get_channel = get_channel
attach_channel_to_workspace = attach_channel_to_workspace
# Placement (user-managed) use cases