feat(P23IM2-4): 通知渠道运维态前端(secret保留/替换/清空)
这个提交包含在:
@@ -20,7 +20,17 @@ export type NotificationChannelRouting = {
|
||||
export type NotificationChannelConfig = {
|
||||
mode: NotificationChannelMode;
|
||||
webhookUrl: string | null;
|
||||
secret: string | null;
|
||||
timeoutMs: number;
|
||||
routing: NotificationChannelRouting;
|
||||
secretConfigured: boolean;
|
||||
secretMasked: string | null;
|
||||
};
|
||||
|
||||
export type NotificationChannelWriteConfig = {
|
||||
mode: NotificationChannelMode;
|
||||
webhookUrl: string | null;
|
||||
secret?: string | null;
|
||||
clearSecret?: boolean;
|
||||
timeoutMs: number;
|
||||
routing: NotificationChannelRouting;
|
||||
};
|
||||
@@ -51,15 +61,24 @@ export type NotificationChannelPayload = {
|
||||
channelType: "wecom";
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
configJson: NotificationChannelConfig;
|
||||
configJson: NotificationChannelWriteConfig;
|
||||
templateJson: NotificationChannelTemplate;
|
||||
};
|
||||
|
||||
export type NotificationChannelUpdatePayload = {
|
||||
name?: string;
|
||||
enabled?: boolean;
|
||||
configJson?: NotificationChannelWriteConfig;
|
||||
templateJson?: NotificationChannelTemplate;
|
||||
};
|
||||
|
||||
export type NotificationChannelTestResponse = {
|
||||
channel: NotificationChannel;
|
||||
testResult: {
|
||||
ok: boolean;
|
||||
code: string;
|
||||
message: string | null;
|
||||
retryable: boolean | null;
|
||||
previewMessage: string | null;
|
||||
response: unknown;
|
||||
skipped: boolean;
|
||||
@@ -77,7 +96,7 @@ export async function createNotificationChannel(payload: NotificationChannelPayl
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateNotificationChannel(id: string, payload: Omit<NotificationChannelPayload, "channelType">) {
|
||||
export async function updateNotificationChannel(id: string, payload: NotificationChannelUpdatePayload) {
|
||||
return apiRequestData<{ channel: NotificationChannel }>(`/api/notifications/channels/${id}`, {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify(payload),
|
||||
|
||||
在新工单中引用
屏蔽一个用户