Full notification infrastructure with in-app, email, Slack, and Teams channels: Backend: - NotificationConfig, NotificationLog, Notification models + migration - Notification service with event routing, channel delivery, retry logic - 9 API endpoints (config CRUD + in-app notifications) - APScheduler retry job with exponential backoff (30s, 2m, 10m) - Wired into escalation, proposal approval, and knowledge flywheel - Pydantic event key validation, cross-tenant protection on recipients Frontend: - TypeScript types + API client for all notification endpoints - NotificationsPanel: bell icon with unread badge, dropdown, mark-read - NotificationSettings: channel config, event toggles, test, delete confirm - Notifications tab on IntegrationsPage - ARIA attributes, Escape handler, settings link on panel Review fixes (13 issues resolved): - notify() no longer commits/rolls back caller's transaction (critical) - retry_failed_notifications returns count instead of None (critical) - NotificationSettings moved inside dedicated tab (critical) - target_user_ids scoped by account_id (security) - Email loop collects all failures before raising - Slack webhook validates response body - events_enabled rejects unknown event keys - link column widened to String(500) - Dead code removed from _auto_reinforce - Delete confirmation, ARIA, Escape key support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
110 lines
3.2 KiB
Python
110 lines
3.2 KiB
Python
from .user import User
|
|
from .team import Team
|
|
from .account import Account
|
|
from .subscription import Subscription
|
|
from .plan_limits import PlanLimits
|
|
from .account_invite import AccountInvite
|
|
from .tree import Tree
|
|
from .tree_share import TreeShare
|
|
from .session import Session
|
|
from .attachment import Attachment
|
|
from .invite_code import InviteCode
|
|
from .category import TreeCategory
|
|
from .tag import TreeTag, tree_tag_assignments
|
|
from .folder import UserFolder, user_folder_trees
|
|
from .step_category import StepCategory
|
|
from .step_library import StepLibrary, StepRating, StepUsageLog
|
|
from .refresh_token import RefreshToken
|
|
from .audit_log import AuditLog
|
|
from .password_reset_token import PasswordResetToken
|
|
from .session_share import SessionShare, SessionShareView
|
|
from .session_rating import SessionRating
|
|
from .account_limit_override import AccountLimitOverride
|
|
from .feature_flag import FeatureFlag, PlanFeatureDefault, AccountFeatureOverride
|
|
from .platform_setting import PlatformSetting
|
|
from .user_pinned_tree import UserPinnedTree
|
|
from .target_list import TargetList
|
|
from .maintenance_schedule import MaintenanceSchedule
|
|
from .feedback import Feedback
|
|
from .ai_conversation import AIConversation
|
|
from .ai_usage import AIUsage
|
|
from .ai_chat_session import AIChatSession
|
|
from .tree_embedding import TreeEmbedding
|
|
from .copilot_conversation import CopilotConversation
|
|
from .assistant_chat import AssistantChat
|
|
from .survey_response import SurveyResponse
|
|
from .survey_invite import SurveyInvite
|
|
from .kb_import import KBImport, KBImportNode
|
|
from .script_template import ScriptCategory, ScriptTemplate, ScriptGeneration
|
|
from .ai_session import AISession
|
|
from .ai_session_step import AISessionStep
|
|
from .psa_connection import PsaConnection
|
|
from .psa_post_log import PsaPostLog
|
|
from .psa_member_mapping import PsaMemberMapping
|
|
from .supporting_data import SessionSupportingData
|
|
from .flow_proposal import FlowProposal
|
|
from .notification_config import NotificationConfig
|
|
from .notification_log import NotificationLog
|
|
from .notification import Notification
|
|
|
|
__all__ = [
|
|
"User",
|
|
"Team",
|
|
"Account",
|
|
"Subscription",
|
|
"PlanLimits",
|
|
"AccountInvite",
|
|
"Tree",
|
|
"TreeShare",
|
|
"Session",
|
|
"Attachment",
|
|
"InviteCode",
|
|
"TreeCategory",
|
|
"TreeTag",
|
|
"tree_tag_assignments",
|
|
"UserFolder",
|
|
"user_folder_trees",
|
|
"StepCategory",
|
|
"StepLibrary",
|
|
"StepRating",
|
|
"StepUsageLog",
|
|
"RefreshToken",
|
|
"AuditLog",
|
|
"PasswordResetToken",
|
|
"SessionShare",
|
|
"SessionShareView",
|
|
"SessionRating",
|
|
"AccountLimitOverride",
|
|
"FeatureFlag",
|
|
"PlanFeatureDefault",
|
|
"AccountFeatureOverride",
|
|
"PlatformSetting",
|
|
"UserPinnedTree",
|
|
"TargetList",
|
|
"MaintenanceSchedule",
|
|
"Feedback",
|
|
"AIConversation",
|
|
"AIUsage",
|
|
"AIChatSession",
|
|
"TreeEmbedding",
|
|
"CopilotConversation",
|
|
"AssistantChat",
|
|
"SurveyResponse",
|
|
"SurveyInvite",
|
|
"KBImport",
|
|
"KBImportNode",
|
|
"ScriptCategory",
|
|
"ScriptTemplate",
|
|
"ScriptGeneration",
|
|
"AISession",
|
|
"AISessionStep",
|
|
"PsaConnection",
|
|
"PsaPostLog",
|
|
"PsaMemberMapping",
|
|
"SessionSupportingData",
|
|
"FlowProposal",
|
|
"NotificationConfig",
|
|
"NotificationLog",
|
|
"Notification",
|
|
]
|