feat: 顶部通知铃铛与站内通知中心
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m7s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m7s
This commit is contained in:
@@ -119,3 +119,6 @@ export * from './orderPackageInvalidateTask'
|
||||
|
||||
// 批量订购任务相关
|
||||
export * from './bulkPurchase'
|
||||
|
||||
// 站内通知相关
|
||||
export * from './notification'
|
||||
|
||||
51
src/types/api/notification.ts
Normal file
51
src/types/api/notification.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
export type NotificationCategory = 'approval' | 'expiry' | 'sync' | 'system' | 'balance' | string
|
||||
export type NotificationReadStatus = 'read' | 'unread' | string
|
||||
|
||||
export interface NotificationItem {
|
||||
id: number | string
|
||||
title: string
|
||||
content: string
|
||||
category?: NotificationCategory | null
|
||||
type?: string | null
|
||||
severity?: string | null
|
||||
read?: boolean
|
||||
is_read?: boolean
|
||||
read_status?: NotificationReadStatus | null
|
||||
created_at?: string | null
|
||||
updated_at?: string | null
|
||||
ref_type?: string | null
|
||||
ref_id?: number | string | null
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
export interface NotificationQueryParams {
|
||||
page?: number
|
||||
page_size?: number
|
||||
category?: string
|
||||
type?: string
|
||||
severity?: string
|
||||
read_status?: string
|
||||
}
|
||||
|
||||
export interface NotificationListResponse {
|
||||
items: NotificationItem[]
|
||||
total: number
|
||||
page?: number
|
||||
page_size?: number
|
||||
size?: number
|
||||
}
|
||||
|
||||
export interface NotificationSummary {
|
||||
items: NotificationItem[]
|
||||
categories?: Record<string, number>
|
||||
total_unread?: number
|
||||
}
|
||||
|
||||
export interface NotificationTarget {
|
||||
available?: boolean
|
||||
route_name?: string | null
|
||||
route_path?: string | null
|
||||
route_params?: Record<string, string | number> | null
|
||||
query?: Record<string, string | number | boolean> | null
|
||||
message?: string | null
|
||||
}
|
||||
Reference in New Issue
Block a user