feat(M10-A): 完成统一通知中心与投递闭环

This commit is contained in:
Codex
2026-08-11 09:17:18 +08:00
parent 41b9cf7349
commit 5d70114bab
46 changed files with 1724 additions and 74 deletions
+22
View File
@@ -113,6 +113,28 @@ export interface ProductStorageItem {
totalQuantity: number; remainingQuantity: number;
}
export type NotificationChannel = 'IN_APP' | 'WECHAT_SUBSCRIBE' | 'WE_COM' | 'WEBHOOK' | 'CLOUD_SPEAKER';
export interface NotificationTemplate {
id: string; storeId: string | null; templateCode: string; eventType: string;
channel: NotificationChannel; titleTemplate: string; bodyTemplate: string;
externalTemplateId: string; status: 'ACTIVE' | 'DISABLED'; version: number;
createdAt: string; updatedAt: string;
}
export interface NotificationRoute {
id: string; storeId: string | null; eventType: string; templateId: string;
templateCode: string; channel: NotificationChannel;
recipientType: 'CUSTOMER' | 'USER' | 'ROLE' | 'STORE_WEBHOOK';
recipientValue: string; quietStart: string | null; quietEnd: string | null;
status: 'ACTIVE' | 'DISABLED'; version: number;
}
export interface NotificationDelivery {
id: string; storeId: string | null; outboxEventId: string; eventType: string;
channel: NotificationChannel; recipientType: string; recipientMasked: string;
title: string; body: string; status: string; attempts: number; maxAttempts: number;
lastErrorCode: string; lastErrorMessage: string; providerMessageId: string;
manualRetryCount: number; sentAt: string | null; readAt: string | null; createdAt: string;
}
export interface ManagedStore {
id: string;
name: string;