mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
feat: use api to show notification
This commit is contained in:
24
web/contract/console/notification.ts
Normal file
24
web/contract/console/notification.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import { type } from '@orpc/contract'
|
||||
import { base } from '../base'
|
||||
|
||||
export type ConsoleNotification = {
|
||||
body: string
|
||||
frequency: 'once' | 'always'
|
||||
lang: string
|
||||
notification_id: string
|
||||
subtitle: string
|
||||
title: string
|
||||
title_pic_url?: string
|
||||
}
|
||||
|
||||
export type ConsoleNotificationResponse = {
|
||||
notifications: ConsoleNotification[]
|
||||
should_show: boolean
|
||||
}
|
||||
|
||||
export const notificationContract = base
|
||||
.route({
|
||||
path: '/notification',
|
||||
method: 'GET',
|
||||
})
|
||||
.output(type<ConsoleNotificationResponse>())
|
||||
Reference in New Issue
Block a user