Files
orion/app/modules/tenancy/schemas/__init__.py
Samir Boulahtit 93b7279c3a fix(loyalty): guard feature provider usage methods against None db session
Fixes deployment test failures where get_store_usage() and get_merchant_usage()
were called with db=None but attempted to run queries.

Also adds noqa suppressions for pre-existing security validator findings
in dev-toolbar (innerHTML with trusted content) and test fixtures
(hardcoded test passwords).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 22:31:34 +01:00

266 lines
6.5 KiB
Python

# app/modules/tenancy/schemas/__init__.py
"""
Tenancy module Pydantic schemas.
Request/response schemas for platform, merchant, store, admin user, and team management.
"""
# Auth schemas
# Admin schemas
from app.modules.tenancy.schemas.admin import (
AdminAuditLogFilters,
AdminAuditLogListResponse,
AdminAuditLogResponse,
AdminDashboardStats,
AdminNotificationCreate,
AdminNotificationListResponse,
AdminNotificationResponse,
AdminNotificationUpdate,
AdminSessionListResponse,
AdminSessionResponse,
AdminSettingCreate,
AdminSettingDefaultResponse,
AdminSettingListResponse,
AdminSettingResponse,
AdminSettingUpdate,
ApplicationLogFilters,
ApplicationLogListResponse,
ApplicationLogResponse,
BulkStoreAction,
BulkStoreActionResponse,
BulkUserAction,
BulkUserActionResponse,
ComponentHealthStatus,
FileLogResponse,
LogCleanupResponse,
LogDeleteResponse,
LogFileInfo,
LogFileListResponse,
LogSettingsResponse,
LogSettingsUpdate,
LogSettingsUpdateResponse,
LogStatistics,
PlatformAlertCreate,
PlatformAlertListResponse,
PlatformAlertResolve,
PlatformAlertResponse,
PublicDisplaySettingsResponse,
RowsPerPageResponse,
RowsPerPageUpdateResponse,
SystemHealthResponse,
)
from app.modules.tenancy.schemas.auth import (
LoginResponse,
LogoutResponse,
OwnedMerchantSummary,
PasswordResetRequestResponse,
PasswordResetResponse,
PlatformSelectResponse,
StoreMembershipSummary,
StoreUserResponse,
UserContext,
UserCreate,
UserDeleteResponse,
UserDetailResponse,
UserListResponse,
UserLogin,
UserResponse,
UserSearchItem,
UserSearchResponse,
UserStatusToggleResponse,
UserUpdate,
)
from app.modules.tenancy.schemas.merchant import (
MerchantBase,
MerchantCreate,
MerchantCreateResponse,
MerchantDetailResponse,
MerchantListResponse,
MerchantPortalProfileResponse,
MerchantPortalProfileUpdate,
MerchantPortalStoreListResponse,
MerchantResponse,
MerchantStoreCreate,
MerchantStoreDetailResponse,
MerchantStoreUpdate,
MerchantSummary,
MerchantTransferOwnership,
MerchantTransferOwnershipResponse,
MerchantUpdate,
)
# Store schemas
from app.modules.tenancy.schemas.store import (
StoreCreate,
StoreCreateResponse,
StoreDetailResponse,
StoreListResponse,
StoreResponse,
StoreSummary,
StoreUpdate,
)
# Store domain schemas
from app.modules.tenancy.schemas.store_domain import (
DomainDeletionResponse,
DomainVerificationInstructions,
DomainVerificationResponse,
StoreDomainCreate,
StoreDomainListResponse,
StoreDomainResponse,
StoreDomainUpdate,
)
# Team schemas
from app.modules.tenancy.schemas.team import (
BulkRemoveRequest,
BulkRemoveResponse,
InvitationAccept,
InvitationAcceptResponse,
InvitationResponse,
PermissionCheckRequest,
PermissionCheckResponse,
RoleBase,
RoleCreate,
RoleListResponse,
RoleResponse,
RoleUpdate,
TeamErrorResponse,
TeamMemberBase,
TeamMemberInvite,
TeamMemberListResponse,
TeamMemberResponse,
TeamMemberUpdate,
TeamStatistics,
UserPermissionsResponse,
)
# User account (self-service) schemas
from app.modules.tenancy.schemas.user_account import (
UserAccountResponse,
UserAccountUpdate,
UserPasswordChange,
)
__all__ = [
# Auth
"LoginResponse",
"LogoutResponse",
"OwnedMerchantSummary",
"PasswordResetRequestResponse",
"PasswordResetResponse",
"PlatformSelectResponse",
"StoreMembershipSummary",
"StoreUserResponse",
"UserContext",
"UserCreate",
"UserDeleteResponse",
"UserDetailResponse",
"UserListResponse",
"UserLogin",
"UserResponse",
"UserSearchItem",
"UserSearchResponse",
"UserStatusToggleResponse",
"UserUpdate",
# Merchant
"MerchantBase",
"MerchantCreate",
"MerchantCreateResponse",
"MerchantDetailResponse",
"MerchantListResponse",
"MerchantPortalProfileResponse",
"MerchantPortalProfileUpdate",
"MerchantPortalStoreListResponse",
"MerchantResponse",
"MerchantStoreCreate",
"MerchantStoreDetailResponse",
"MerchantStoreUpdate",
"MerchantSummary",
"MerchantTransferOwnership",
"MerchantTransferOwnershipResponse",
"MerchantUpdate",
# Store
"StoreCreate",
"StoreCreateResponse",
"StoreDetailResponse",
"StoreListResponse",
"StoreResponse",
"StoreSummary",
"StoreUpdate",
# Admin
"AdminAuditLogFilters",
"AdminAuditLogListResponse",
"AdminAuditLogResponse",
"AdminDashboardStats",
"AdminNotificationCreate",
"AdminNotificationListResponse",
"AdminNotificationResponse",
"AdminNotificationUpdate",
"AdminSessionListResponse",
"AdminSessionResponse",
"AdminSettingCreate",
"AdminSettingDefaultResponse",
"AdminSettingListResponse",
"AdminSettingResponse",
"AdminSettingUpdate",
"ApplicationLogFilters",
"ApplicationLogListResponse",
"ApplicationLogResponse",
"BulkUserAction",
"BulkUserActionResponse",
"BulkStoreAction",
"BulkStoreActionResponse",
"ComponentHealthStatus",
"FileLogResponse",
"LogCleanupResponse",
"LogDeleteResponse",
"LogFileInfo",
"LogFileListResponse",
"LogSettingsResponse",
"LogSettingsUpdate",
"LogSettingsUpdateResponse",
"LogStatistics",
"PlatformAlertCreate",
"PlatformAlertListResponse",
"PlatformAlertResolve",
"PlatformAlertResponse",
"PublicDisplaySettingsResponse",
"RowsPerPageResponse",
"RowsPerPageUpdateResponse",
"SystemHealthResponse",
# Team
"BulkRemoveRequest",
"BulkRemoveResponse",
"InvitationAccept",
"InvitationAcceptResponse",
"InvitationResponse",
"PermissionCheckRequest",
"PermissionCheckResponse",
"RoleBase",
"RoleCreate",
"RoleListResponse",
"RoleResponse",
"RoleUpdate",
"TeamErrorResponse",
"TeamMemberBase",
"TeamMemberInvite",
"TeamMemberListResponse",
"TeamMemberResponse",
"TeamMemberUpdate",
"TeamStatistics",
"UserPermissionsResponse",
# User Account
"UserAccountResponse",
"UserAccountUpdate",
"UserPasswordChange",
# Store Domain
"DomainDeletionResponse",
"DomainVerificationInstructions",
"DomainVerificationResponse",
"StoreDomainCreate",
"StoreDomainListResponse",
"StoreDomainResponse",
"StoreDomainUpdate",
]