fix: mr conflict rollback

This commit is contained in:
2026-06-10 19:24:41 +03:00
parent 18c9c1e01a
commit 5d7cdf67be
3 changed files with 19 additions and 68 deletions

View File

@@ -2,7 +2,6 @@ from abc import ABC, abstractmethod
from datetime import datetime
from src.application.domain.entities import UserEntity
from src.application.domain.entities.organization import PartySearchEntity
class IUserRepository(ABC):
@@ -27,14 +26,6 @@ class IUserRepository(ABC):
async def exists_by_email(self, email: str) -> bool:
raise NotImplementedError
@abstractmethod
async def search_individuals(self, *, query: str, limit: int, offset: int) -> list[PartySearchEntity]:
raise NotImplementedError
@abstractmethod
async def count_individuals(self, *, query: str) -> int:
raise NotImplementedError
@abstractmethod
async def get_password_hash(self, user_id: str) -> str:
raise NotImplementedError

View File

@@ -1,27 +1,23 @@
from src.application.commands.admin_login import AdminLoginCommand
from src.application.commands.admin_logout import AdminLogoutCommand
from src.application.commands.admin_jwt_refresh import AdminJwtRefreshCommand
from src.application.commands.get_admin_me import GetAdminMeCommand
from src.application.commands.create_organization import CreateOrganizationCommand
from src.application.commands.create_organization_wallets import CreateOrganizationWalletsCommand
from src.application.commands.put_organization_document import PutOrganizationDocumentCommand
from src.application.commands.upload_organization_document import UploadOrganizationDocumentCommand
from src.application.commands.set_password import SetPasswordCommand
from src.application.commands.organization_commands import (
ListOrganizationsCommand,
GetOrganizationCommand,
SearchPartiesCommand,
UpdateOrganizationCommand,
)
from src.application.commands.organization_document_commands import (
ListOrganizationDocumentsCommand,
GetOrganizationDocumentCommand,
)
from src.application.commands.organization_wallet_commands import (
GetOrganizationMnemonicCommand,
GetOrganizationSecretKeysCommand,
ListOrganizationWalletsCommand,
)
from src.application.commands.purchase_request_commands import (
ListPurchaseRequestsCommand,
GetPurchaseRequestCommand,
UpdatePurchaseRequestCommand,
UpdatePurchaseRequestStatusCommand,
SetPurchaseRequestQuoteCommand,
)
@@ -33,19 +29,15 @@ __all__ = [
'GetAdminMeCommand',
'CreateOrganizationCommand',
'CreateOrganizationWalletsCommand',
'PutOrganizationDocumentCommand',
'UploadOrganizationDocumentCommand',
'ListOrganizationsCommand',
'GetOrganizationCommand',
'SearchPartiesCommand',
'UpdateOrganizationCommand',
'ListPurchaseRequestsCommand',
'GetPurchaseRequestCommand',
'UpdatePurchaseRequestCommand',
'UpdatePurchaseRequestStatusCommand',
'SetPurchaseRequestQuoteCommand',
'ListOrganizationDocumentsCommand',
'GetOrganizationDocumentCommand',
'ListOrganizationWalletsCommand',
'GetOrganizationMnemonicCommand',
'GetOrganizationSecretKeysCommand',
]
'SetPasswordCommand',
]

View File

@@ -10,21 +10,17 @@ from src.application.commands import (
GetAdminMeCommand,
CreateOrganizationCommand,
CreateOrganizationWalletsCommand,
GetOrganizationMnemonicCommand,
GetOrganizationSecretKeysCommand,
GetOrganizationCommand,
ListOrganizationWalletsCommand,
GetPurchaseRequestCommand,
ListOrganizationsCommand,
GetOrganizationDocumentCommand,
ListOrganizationDocumentsCommand,
ListPurchaseRequestsCommand,
SearchPartiesCommand,
SetPurchaseRequestQuoteCommand,
UpdateOrganizationCommand,
UpdatePurchaseRequestCommand,
UpdatePurchaseRequestStatusCommand,
PutOrganizationDocumentCommand,
UploadOrganizationDocumentCommand,
SetPasswordCommand,
)
from src.application.contracts import IHashService, IJwtService, ILogger
from src.infrastructure.config import settings
@@ -96,32 +92,11 @@ def get_create_organization_wallets_command(
return CreateOrganizationWalletsCommand(uow, logger)
def get_list_organization_wallets_command(
def get_upload_organization_document_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
logger: ILogger = Depends(get_logger),
) -> ListOrganizationWalletsCommand:
return ListOrganizationWalletsCommand(uow, logger)
def get_get_organization_mnemonic_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
logger: ILogger = Depends(get_logger),
) -> GetOrganizationMnemonicCommand:
return GetOrganizationMnemonicCommand(uow, logger)
def get_get_organization_secret_keys_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
logger: ILogger = Depends(get_logger),
) -> GetOrganizationSecretKeysCommand:
return GetOrganizationSecretKeysCommand(uow, logger)
def get_put_organization_document_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
logger: ILogger = Depends(get_logger),
) -> PutOrganizationDocumentCommand:
return PutOrganizationDocumentCommand(uow, get_s3_documents_service(), logger)
) -> UploadOrganizationDocumentCommand:
return UploadOrganizationDocumentCommand(uow, get_s3_documents_service(), logger)
def get_list_organizations_command(
@@ -131,13 +106,6 @@ def get_list_organizations_command(
return ListOrganizationsCommand(uow, logger)
def get_search_parties_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
logger: ILogger = Depends(get_logger),
) -> SearchPartiesCommand:
return SearchPartiesCommand(uow, logger)
def get_get_organization_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
logger: ILogger = Depends(get_logger),
@@ -187,15 +155,15 @@ def get_update_purchase_request_status_command(
return UpdatePurchaseRequestStatusCommand(uow, logger)
def get_update_purchase_request_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
logger: ILogger = Depends(get_logger),
) -> UpdatePurchaseRequestCommand:
return UpdatePurchaseRequestCommand(uow, logger)
def get_set_purchase_request_quote_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
logger: ILogger = Depends(get_logger),
) -> SetPurchaseRequestQuoteCommand:
return SetPurchaseRequestQuoteCommand(uow, logger)
def get_set_password_command(
uow: IUnitOfWork = Depends(get_unit_of_work),
hash_service: IHashService = Depends(get_hash_service),
logger: ILogger = Depends(get_logger),
) -> SetPasswordCommand:
return SetPasswordCommand(uow, hash_service, logger)