Files
cn-rdms-web/src/typings/api/notify-message.d.ts

63 lines
2.0 KiB
TypeScript
Raw Normal View History

declare namespace Api {
/**
* namespace NotifyMessage
*
* backend api module: "notify-message" ·
*/
namespace NotifyMessage {
type NotifyJumpType = 'project' | 'execution' | 'task';
interface NotifyMessageTemplateParams {
jumpType?: NotifyJumpType;
projectId?: string;
projectName?: string;
executionName?: string;
taskName?: string;
roleName?: string;
[key: string]: unknown;
}
interface PageParams {
pageNo: number;
pageSize: number;
}
interface PageResult<T = any> {
total: number;
list: T[];
}
/** 站内信(铃铛 / 收件箱展示用ID 在 API 适配层已统一为 string */
interface NotifyMessage {
/** 站内信编号(雪花 Long按 string 接收) */
id: string;
/** 模板编码 */
templateCode: string;
/** 发送人名称(模板配置的发件人显示名) */
templateNickname: string;
/** 最终消息正文(占位符已渲染,直接展示) */
templateContent: string;
/** 消息类型,字典 system_notify_template_type */
templateType: number;
/** 消息等级(字典 notify_message_level1=普通 2=提醒 3=警告 4=严重,数字越大越紧急);老消息缺省为普通(1) */
level: number;
/** 是否已读 */
readStatus: boolean;
/** 阅读时间;未读为 null */
readTime: string | number | null;
/** 收到时间 */
createTime: string | number;
/** 模板参数(部分模板支持跳转) */
templateParams?: NotifyMessageTemplateParams;
}
/** 我的站内信分页查询参数 */
interface MyPageParams extends PageParams {
/** true 只看已读 / false 只看未读 / 不传 = 全部 */
readStatus?: boolean;
/** 关键字,后端对消息正文模糊匹配;不传或空串 = 不过滤 */
keyword?: string;
}
}
}