dify/web/gen/zod/api/apps.ts
Stephen Zhou 4061c83b26
no sufix
2026-01-25 16:19:07 +08:00

111 lines
3.9 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { z } from 'zod'
import { zAnnotationItem, zAnnotationListResponse } from '../models/annotation'
import { zCreateAnnotationRequest } from '../models/create'
import { zInitialAnnotationReplySettingsRequest, zInitialAnnotationReplySettingsResponse as zInitialAnnotationReplySettingsResponse2, zInitialAnnotationReplySettingsStatusResponse } from '../models/initial'
import { zUpdateAnnotationRequest } from '../models/update'
export const zGetAnnotationListData = z.object({
body: z.never().optional(),
path: z.never().optional(),
query: z.object({
page: z.number().int().describe('Page number.').optional().default(1),
limit: z.number().int().gte(1).lte(100).describe('Number of items returned, default 20, range 1-100.').optional().default(20),
}).optional(),
})
export type GetAnnotationListDataZodType = z.infer<typeof zGetAnnotationListData>
/**
* Successfully retrieved annotation list.
*/
export const zGetAnnotationListResponse = zAnnotationListResponse
export type GetAnnotationListResponseZodType = z.infer<typeof zGetAnnotationListResponse>
export const zCreateAnnotationData = z.object({
body: zCreateAnnotationRequest,
path: z.never().optional(),
query: z.never().optional(),
})
export type CreateAnnotationDataZodType = z.infer<typeof zCreateAnnotationData>
/**
* Annotation created successfully.
*/
export const zCreateAnnotationResponse = zAnnotationItem
export type CreateAnnotationResponseZodType = z.infer<typeof zCreateAnnotationResponse>
export const zDeleteAnnotationData = z.object({
body: z.never().optional(),
path: z.object({
annotation_id: z.string().describe('Annotation ID.'),
}),
query: z.never().optional(),
})
export type DeleteAnnotationDataZodType = z.infer<typeof zDeleteAnnotationData>
/**
* Annotation deleted successfully. No Content.
*/
export const zDeleteAnnotationResponse = z.void().describe('Annotation deleted successfully. No Content.')
export type DeleteAnnotationResponseZodType = z.infer<typeof zDeleteAnnotationResponse>
export const zUpdateAnnotationData = z.object({
body: zUpdateAnnotationRequest,
path: z.object({
annotation_id: z.string().describe('Annotation ID.'),
}),
query: z.never().optional(),
})
export type UpdateAnnotationDataZodType = z.infer<typeof zUpdateAnnotationData>
/**
* Annotation updated successfully.
*/
export const zUpdateAnnotationResponse = zAnnotationItem
export type UpdateAnnotationResponseZodType = z.infer<typeof zUpdateAnnotationResponse>
export const zInitialAnnotationReplySettingsData = z.object({
body: zInitialAnnotationReplySettingsRequest,
path: z.object({
action: z.enum(['enable', 'disable']).describe('Action, can only be \'enable\' or \'disable\'.'),
}),
query: z.never().optional(),
})
export type InitialAnnotationReplySettingsDataZodType = z.infer<typeof zInitialAnnotationReplySettingsData>
/**
* Annotation reply settings task initiated.
*/
export const zInitialAnnotationReplySettingsResponse = zInitialAnnotationReplySettingsResponse2
export type InitialAnnotationReplySettingsResponseZodType = z.infer<typeof zInitialAnnotationReplySettingsResponse>
export const zGetInitialAnnotationReplySettingsStatusData = z.object({
body: z.never().optional(),
path: z.object({
action: z.enum(['enable', 'disable']).describe('Action, must be the same as in the initial settings call (\'enable\' or \'disable\').'),
job_id: z.string().describe('Job ID obtained from the initial settings call.'),
}),
query: z.never().optional(),
})
export type GetInitialAnnotationReplySettingsStatusDataZodType = z.infer<typeof zGetInitialAnnotationReplySettingsStatusData>
/**
* Successfully retrieved task status.
*/
export const zGetInitialAnnotationReplySettingsStatusResponse = zInitialAnnotationReplySettingsStatusResponse
export type GetInitialAnnotationReplySettingsStatusResponseZodType = z.infer<typeof zGetInitialAnnotationReplySettingsStatusResponse>