feat: add endpoints for orgs

This commit is contained in:
2026-06-08 11:20:39 +03:00
parent 5484ed6311
commit 2a09d1deae
32 changed files with 818 additions and 13 deletions

View File

@@ -2,7 +2,12 @@ from fastapi import Depends
from src.application.abstractions import IUnitOfWork
from src.application.commands import (
CreatePurchaseRequestCommand,
GetOrganizationCommand,
GetOrganizationMnemonicCommand,
GetOrganizationSecretKeysCommand,
GetPurchaseRequestCommand,
ListOrganizationWalletsCommand,
ListOrganizationsCommand,
ListPurchaseRequestsCommand,
)
from src.application.contracts import ILogger
@@ -29,3 +34,38 @@ def get_get_purchase_request_command(
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
) -> GetPurchaseRequestCommand:
return GetPurchaseRequestCommand(unit_of_work=unit_of_work, logger=logger)
def get_list_organizations_command(
logger: ILogger = Depends(get_logger),
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
) -> ListOrganizationsCommand:
return ListOrganizationsCommand(unit_of_work=unit_of_work, logger=logger)
def get_get_organization_command(
logger: ILogger = Depends(get_logger),
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
) -> GetOrganizationCommand:
return GetOrganizationCommand(unit_of_work=unit_of_work, logger=logger)
def get_list_organization_wallets_command(
logger: ILogger = Depends(get_logger),
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
) -> ListOrganizationWalletsCommand:
return ListOrganizationWalletsCommand(unit_of_work=unit_of_work, logger=logger)
def get_get_organization_mnemonic_command(
logger: ILogger = Depends(get_logger),
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
) -> GetOrganizationMnemonicCommand:
return GetOrganizationMnemonicCommand(unit_of_work=unit_of_work, logger=logger)
def get_get_organization_secret_keys_command(
logger: ILogger = Depends(get_logger),
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
) -> GetOrganizationSecretKeysCommand:
return GetOrganizationSecretKeysCommand(unit_of_work=unit_of_work, logger=logger)