mirror of
https://github.com/langgenius/dify.git
synced 2026-05-26 11:57:40 +08:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
78 lines
1.7 KiB
TypeScript
78 lines
1.7 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* AllowedExtensionsResponse
|
|
*/
|
|
export const zAllowedExtensionsResponse = z.object({
|
|
allowed_extensions: z.array(z.string()),
|
|
})
|
|
|
|
/**
|
|
* UploadConfig
|
|
*/
|
|
export const zUploadConfig = z.object({
|
|
attachment_image_file_size_limit: z.int().nullish(),
|
|
audio_file_size_limit: z.int(),
|
|
batch_count_limit: z.int(),
|
|
file_size_limit: z.int(),
|
|
file_upload_limit: z.int().nullish(),
|
|
image_file_batch_limit: z.int(),
|
|
image_file_size_limit: z.int(),
|
|
single_chunk_attachment_limit: z.int(),
|
|
video_file_size_limit: z.int(),
|
|
workflow_file_upload_limit: z.int(),
|
|
})
|
|
|
|
/**
|
|
* FileResponse
|
|
*/
|
|
export const zFileResponse = z.object({
|
|
conversation_id: z.string().nullish(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string().nullish(),
|
|
extension: z.string().nullish(),
|
|
file_key: z.string().nullish(),
|
|
id: z.string(),
|
|
mime_type: z.string().nullish(),
|
|
name: z.string(),
|
|
original_url: z.string().nullish(),
|
|
preview_url: z.string().nullish(),
|
|
size: z.int(),
|
|
source_url: z.string().nullish(),
|
|
tenant_id: z.string().nullish(),
|
|
user_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* TextContentResponse
|
|
*/
|
|
export const zTextContentResponse = z.object({
|
|
content: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetFilesSupportTypeResponse = zAllowedExtensionsResponse
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetFilesUploadResponse = zUploadConfig
|
|
|
|
/**
|
|
* File uploaded successfully
|
|
*/
|
|
export const zPostFilesUploadResponse = zFileResponse
|
|
|
|
export const zGetFilesByFileIdPreviewPath = z.object({
|
|
file_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetFilesByFileIdPreviewResponse = zTextContentResponse
|