mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
22 lines
922 B
TypeScript
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>
|