演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
71 lines
1.6 KiB
TypeScript
Generated
71 lines
1.6 KiB
TypeScript
Generated
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* ErrorResponse
|
|
*
|
|
* Documented non-2xx body emitted by ``register_external_error_handlers``.
|
|
*
|
|
* ``params`` and ``details`` appear only on the errors that set them. The schema
|
|
* stays open because ``HTTPException.data`` may carry extra keys.
|
|
*/
|
|
export const zErrorResponse = z.object({
|
|
code: z.string(),
|
|
details: z.record(z.string(), z.unknown()).optional(),
|
|
message: z.string(),
|
|
params: z.string().optional(),
|
|
status: z.int(),
|
|
})
|
|
|
|
/**
|
|
* DismissNotificationPayload
|
|
*/
|
|
export const zDismissNotificationPayload = z.object({
|
|
notification_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* SimpleResultResponse
|
|
*/
|
|
export const zSimpleResultResponse = z.object({
|
|
result: z.string(),
|
|
})
|
|
|
|
/**
|
|
* NotificationItemResponse
|
|
*/
|
|
export const zNotificationItemResponse = z.object({
|
|
body: z.string(),
|
|
frequency: z.enum(['every_page_load', 'once']),
|
|
lang: z.string(),
|
|
notification_id: z.string(),
|
|
subtitle: z.string(),
|
|
title: z.string(),
|
|
title_pic_url: z.string(),
|
|
})
|
|
|
|
/**
|
|
* NotificationResponse
|
|
*/
|
|
export const zNotificationResponse = z.object({
|
|
notifications: z.array(zNotificationItemResponse),
|
|
should_show: z.boolean(),
|
|
})
|
|
|
|
export const zGetNotificationQuery = z.object({
|
|
language: z.string().optional().default('en-US'),
|
|
})
|
|
|
|
/**
|
|
* Success — inspect should_show to decide whether to render the modal
|
|
*/
|
|
export const zGetNotificationResponse = zNotificationResponse
|
|
|
|
export const zPostNotificationDismissBody = zDismissNotificationPayload
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostNotificationDismissResponse = zSimpleResultResponse
|