dify/packages/contracts/generated/api/console/notification/orpc.gen.ts
Stephen Zhou 5d77c0af08
refactor: fix OpenAPI contract generation schemas (#37387)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-12 14:25:53 +00:00

54 lines
1.5 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
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 their interface language (falls back to English if unavailable). 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 their interface language (falls back to English if unavailable). 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'],
})
.output(zGetNotificationResponse)
export const notification = {
get,
dismiss,
}
export const contract = {
notification,
}