feat: полный patch External Channel архивирование creative в patch и

purchase, удалить у них доп ручки/usecase/dto
This commit is contained in:
Artem Tsyrulnikov
2025-11-11 23:10:08 +03:00
parent f5d2e262f0
commit 552a3ddef2
14 changed files with 80 additions and 117 deletions

View File

@@ -15,6 +15,7 @@ __all__ = (
'GetExternalChannelsOutput',
'CreateExternalChannelInput',
'DeleteExternalChannelInput',
'UpdateExternalChannelInput',
'UpdateExternalChannelLinksInput',
'ImportExternalChannelsInput',
'ImportExternalChannelsOutput',
@@ -24,7 +25,6 @@ __all__ = (
'GetCreativeInput',
'CreateCreativeInput',
'UpdateCreativeInput',
'ArchiveCreativeInput',
'DeleteCreativeInput',
'PurchaseOutput',
'GetPurchasesInput',
@@ -32,7 +32,6 @@ __all__ = (
'GetPurchaseInput',
'CreatePurchaseInput',
'UpdatePurchaseInput',
'ArchivePurchaseInput',
'DeletePurchaseInput',
'ViewsSnapshotOutput',
'GetViewsHistoryInput',
@@ -43,7 +42,6 @@ __all__ = (
)
from .creative import (
ArchiveCreativeInput,
CreateCreativeInput,
CreativeOutput,
DeleteCreativeInput,
@@ -60,10 +58,10 @@ from .external_channel import (
GetExternalChannelsOutput,
ImportExternalChannelsInput,
ImportExternalChannelsOutput,
UpdateExternalChannelInput,
UpdateExternalChannelLinksInput,
)
from .purchase import (
ArchivePurchaseInput,
CreatePurchaseInput,
DeletePurchaseInput,
GetPurchaseInput,

View File

@@ -41,11 +41,7 @@ class CreateCreativeInput(pydantic.BaseModel):
class UpdateCreativeInput(pydantic.BaseModel):
name: str | None = None
text: str | None = None
class ArchiveCreativeInput(pydantic.BaseModel):
creative_id: uuid.UUID
user_id: uuid.UUID
status: domain.CreativeStatus | None = None
class DeleteCreativeInput(pydantic.BaseModel):

View File

@@ -35,9 +35,14 @@ class DeleteExternalChannelInput(pydantic.BaseModel):
user_id: uuid.UUID
class UpdateExternalChannelLinksInput(pydantic.BaseModel):
"""Request body for PATCH endpoint - links to add or remove."""
class UpdateExternalChannelInput(pydantic.BaseModel):
title: str | None = None
username: str | None = None
description: str | None = None
subscribers_count: int | None = None
class UpdateExternalChannelLinksInput(pydantic.BaseModel):
add_target_channel_ids: list[uuid.UUID] = []
remove_target_channel_ids: list[uuid.UUID] = []

View File

@@ -61,11 +61,7 @@ class UpdatePurchaseInput(pydantic.BaseModel):
cost: float | None = None
comment: str | None = None
ad_post_url: str | None = None
class ArchivePurchaseInput(pydantic.BaseModel):
purchase_id: uuid.UUID
user_id: uuid.UUID
status: domain.PurchaseStatus | None = None
class DeletePurchaseInput(pydantic.BaseModel):