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

22 lines
922 B
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { z } from 'zod'
export const zInputFileObject = z.intersection(z.union([
z.object({
transfer_method: z.enum(['remote_url']).optional(),
url: z.string(),
}),
z.object({
transfer_method: z.enum(['local_file']).optional(),
upload_file_id: z.string(),
}),
]), z.object({
type: z.enum(['image']).describe('Supported type: `image`.'),
transfer_method: z.enum(['remote_url', 'local_file']).describe('Transfer method, `remote_url` for image URL / `local_file` for file upload'),
url: z.string().describe('Image URL (when the transfer method is `remote_url`)').optional(),
upload_file_id: z.string().describe('Uploaded file ID, which must be obtained by uploading through the File Upload API in advance (when the transfer method is `local_file`)').optional(),
}))
export type InputFileObjectZodType = z.infer<typeof zInputFileObject>