feat: 完善接口19-顶部通知铃铛与站内通知中心
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m5s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m5s
This commit is contained in:
@@ -107,20 +107,6 @@ export interface AccountQueryParams extends PaginationParams {
|
||||
enterprise_id?: number // 按企业ID筛选
|
||||
}
|
||||
|
||||
// 平台业务员候选账号
|
||||
export interface PlatformSalesperson {
|
||||
account_id: number
|
||||
account_name: string
|
||||
phone_masked: string
|
||||
}
|
||||
|
||||
// 平台业务员候选查询参数
|
||||
export interface PlatformSalespersonQueryParams extends PaginationParams {
|
||||
account_type: 'platform'
|
||||
status: AccountStatus
|
||||
account_name?: string
|
||||
}
|
||||
|
||||
// 代理商查询参数
|
||||
export interface AgentQueryParams extends PaginationParams {
|
||||
keyword?: string
|
||||
|
||||
@@ -69,6 +69,35 @@ export type AssetRealnamePolicy = 'none' | 'before_order' | 'after_order'
|
||||
// 预计最终到期时间状态
|
||||
export type ExpiryEstimateStatus = 'exact' | 'waiting_activation' | 'none' | 'invalid_data'
|
||||
|
||||
// 临期等级由后端返回,前端仅用于展示和筛选结果标识
|
||||
export type ExpiryLevel = string
|
||||
|
||||
export interface ExpiringAssetItem {
|
||||
asset_type: AssetType
|
||||
asset_id: number
|
||||
identifier: string
|
||||
shop_name?: string | null
|
||||
package_name?: string | null
|
||||
estimated_final_expires_at: string
|
||||
days_until_final_expiry: number
|
||||
expiry_level?: ExpiryLevel | null
|
||||
expiry_level_name?: string | null
|
||||
can_renew: boolean
|
||||
}
|
||||
|
||||
export interface ExpiringAssetQueryParams {
|
||||
asset_type?: AssetType
|
||||
keyword?: string
|
||||
shop_id?: number
|
||||
package_id?: number
|
||||
days_min?: number
|
||||
days_max?: number
|
||||
expires_from?: string
|
||||
expires_to?: string
|
||||
page?: number
|
||||
size?: number
|
||||
}
|
||||
|
||||
// 批量更新资产实名认证策略请求
|
||||
export interface BatchUpdateAssetRealnamePolicyRequest {
|
||||
asset_ids: number[]
|
||||
|
||||
@@ -405,6 +405,9 @@ export interface StandaloneIotCard {
|
||||
expiry_estimate_status?: ExpiryEstimateStatus // 预计最终到期时间状态
|
||||
expiry_estimate_status_name?: string | null // 预计最终到期时间状态名称
|
||||
is_expiring?: boolean // 是否临期,由后端判断
|
||||
expiry_level?: string | null // 临期等级
|
||||
expiry_level_name?: string | null // 临期等级名称
|
||||
can_renew?: boolean // 是否允许续费
|
||||
last_month_total_mb?: number // 上月流量总量(MB)
|
||||
last_data_check_at?: string | null // 最后流量检查时间
|
||||
last_real_name_check_at?: string | null // 最后实名检查时间
|
||||
|
||||
@@ -73,6 +73,9 @@ export interface Device {
|
||||
expiry_estimate_status?: ExpiryEstimateStatus // 预计最终到期时间状态
|
||||
expiry_estimate_status_name?: string | null // 预计最终到期时间状态名称
|
||||
is_expiring?: boolean // 是否临期,由后端判断
|
||||
expiry_level?: string | null // 临期等级
|
||||
expiry_level_name?: string | null // 临期等级名称
|
||||
can_renew?: boolean // 是否允许续费
|
||||
authorized_enterprise_id?: number | null // 当前有效授权企业ID
|
||||
authorized_enterprise_name?: string | null // 当前有效授权企业名称
|
||||
}
|
||||
|
||||
@@ -1,51 +1,65 @@
|
||||
export type NotificationCategory = 'approval' | 'expiry' | 'sync' | 'system' | 'balance' | string
|
||||
export type NotificationReadStatus = 'read' | 'unread' | string
|
||||
export type NotificationCategory = 'approval' | 'expiry' | 'sync' | 'system' | string
|
||||
export type NotificationSeverity = 'info' | 'warning' | 'error' | 'critical' | string
|
||||
|
||||
export interface NotificationItem {
|
||||
id: number | string
|
||||
id: number
|
||||
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
|
||||
body: string
|
||||
category: NotificationCategory
|
||||
type: string
|
||||
severity: NotificationSeverity
|
||||
is_read: boolean
|
||||
created_at: string
|
||||
read_at: string | null
|
||||
ref_type: string | null
|
||||
ref_id: string | null
|
||||
ref_key: string | null
|
||||
}
|
||||
|
||||
export interface NotificationQueryParams {
|
||||
page?: number
|
||||
page_size?: number
|
||||
category?: string
|
||||
type?: string
|
||||
severity?: string
|
||||
read_status?: string
|
||||
is_read?: boolean
|
||||
page?: number
|
||||
page_size?: number
|
||||
}
|
||||
|
||||
export interface NotificationListResponse {
|
||||
items: NotificationItem[]
|
||||
page: number
|
||||
size: number
|
||||
total: number
|
||||
page?: number
|
||||
page_size?: number
|
||||
size?: number
|
||||
}
|
||||
|
||||
export interface NotificationSummary {
|
||||
items: NotificationItem[]
|
||||
categories?: Record<string, number>
|
||||
total_unread?: number
|
||||
export interface NotificationUnreadCount {
|
||||
count: number
|
||||
display_count: string
|
||||
}
|
||||
|
||||
export interface NotificationUnreadSummary {
|
||||
approval: number
|
||||
expiry: number
|
||||
sync: number
|
||||
system: number
|
||||
total: number
|
||||
}
|
||||
|
||||
export interface NotificationReadResponse {
|
||||
success: boolean
|
||||
}
|
||||
|
||||
export interface NotificationReadAllRequest {
|
||||
category?: string
|
||||
}
|
||||
|
||||
export interface NotificationReadAllResponse {
|
||||
updated_count: 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
|
||||
available: boolean
|
||||
target_id: number | null
|
||||
target_key: string
|
||||
target_type: string
|
||||
}
|
||||
|
||||
@@ -21,9 +21,10 @@ export interface ShopResponse {
|
||||
contact_name: string // 联系人姓名
|
||||
contact_phone: string // 联系人电话
|
||||
status: number // 状态 (0:禁用, 1:启用)
|
||||
business_owner_account_id?: number | null // 平台业务员账号ID
|
||||
business_owner_name?: string // 平台业务员名称
|
||||
business_owner_phone_masked?: string // 平台业务员脱敏手机号
|
||||
business_owner_account_id: number | null // 平台业务员账号ID
|
||||
business_owner_username: string // 平台业务员账号名
|
||||
business_owner_phone_summary: string // 平台业务员手机号摘要
|
||||
business_owner_available: boolean // 是否仍可用于通知接收
|
||||
}
|
||||
|
||||
// 店铺列表查询参数
|
||||
@@ -71,6 +72,18 @@ export interface UpdateShopParams {
|
||||
business_owner_account_id?: number | null // 平台业务员账号ID
|
||||
}
|
||||
|
||||
// 店铺业务员候选
|
||||
export interface ShopBusinessOwnerCandidate {
|
||||
id: number // 平台业务员账号ID
|
||||
username: string // 平台业务员账号名
|
||||
phone_summary: string // 手机号摘要
|
||||
}
|
||||
|
||||
// 店铺业务员候选查询参数
|
||||
export interface ShopBusinessOwnerCandidateQueryParams extends PaginationParams {
|
||||
keyword?: string // 用户名或手机号关键词
|
||||
}
|
||||
|
||||
// 店铺列表分页响应
|
||||
export interface ShopPageResult {
|
||||
items: ShopResponse[] | null // 店铺列表
|
||||
|
||||
Reference in New Issue
Block a user