mirror of
https://github.com/langgenius/dify.git
synced 2026-09-06 01:04:49 +08:00
55 lines
1.8 KiB
TypeScript
55 lines
1.8 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import { oc } from '@orpc/contract'
|
|
import * as z from 'zod'
|
|
import {
|
|
zGetNotificationQuery,
|
|
zGetNotificationResponse,
|
|
zPostNotificationDismissBody,
|
|
zPostNotificationDismissResponse,
|
|
} from './zod.gen'
|
|
|
|
/**
|
|
* Mark a notification as dismissed for the current user.
|
|
*/
|
|
export const post = oc
|
|
.route({
|
|
description: 'Mark a notification as dismissed for the current user.',
|
|
inputStructure: 'detailed',
|
|
method: 'POST',
|
|
operationId: 'postNotificationDismiss',
|
|
path: '/notification/dismiss',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ body: zPostNotificationDismissBody }))
|
|
.output(zPostNotificationDismissResponse)
|
|
|
|
export const dismiss = {
|
|
post,
|
|
}
|
|
|
|
/**
|
|
* Return the active in-product notification for the current user in the requested language (defaults to English when omitted). Unavailable translations fall back to English, then the first available content. The notification is NOT marked as seen here; call POST /notification/dismiss when the user explicitly closes the modal.
|
|
*/
|
|
export const get = oc
|
|
.route({
|
|
description:
|
|
'Return the active in-product notification for the current user in the requested language (defaults to English when omitted). Unavailable translations fall back to English, then the first available content. The notification is NOT marked as seen here; call POST /notification/dismiss when the user explicitly closes the modal.',
|
|
inputStructure: 'detailed',
|
|
method: 'GET',
|
|
operationId: 'getNotification',
|
|
path: '/notification',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ query: zGetNotificationQuery.optional() }))
|
|
.output(zGetNotificationResponse)
|
|
|
|
export const notification = {
|
|
get,
|
|
dismiss,
|
|
}
|
|
|
|
export const contract = {
|
|
notification,
|
|
}
|