mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 05:56:31 +08:00
fix(types): remove unused and misaligned app-asset types
Remove types that don't match backend API: - AppAssetFileContentResponse (unused, had extra metadata field) - CreateFilePayload (unused, FormData built manually) - metadata field from UpdateFileContentPayload
This commit is contained in:
parent
0de32f682a
commit
4bd05ed96e
@ -63,14 +63,6 @@ export type AppAssetTreeResponse = {
|
||||
children: AppAssetTreeView[]
|
||||
}
|
||||
|
||||
/**
|
||||
* File content response (GET /apps/{app_id}/assets/files/{node_id})
|
||||
*/
|
||||
export type AppAssetFileContentResponse = {
|
||||
content: string
|
||||
metadata?: Record<string, any>
|
||||
}
|
||||
|
||||
/**
|
||||
* File download URL response (GET /apps/{app_id}/assets/files/{node_id}/download-url)
|
||||
*/
|
||||
@ -115,24 +107,12 @@ export type CreateFolderPayload = {
|
||||
parent_id?: string | null
|
||||
}
|
||||
|
||||
/**
|
||||
* Request payload for creating a file (form data)
|
||||
*/
|
||||
export type CreateFilePayload = {
|
||||
/** File name (1-255 characters) */
|
||||
name: string
|
||||
/** Parent folder ID, empty or undefined for root */
|
||||
parent_id?: string | null
|
||||
}
|
||||
|
||||
/**
|
||||
* Request payload for updating file content (JSON)
|
||||
*/
|
||||
export type UpdateFileContentPayload = {
|
||||
/** New file content (UTF-8) */
|
||||
content: string
|
||||
/** Optional metadata associated with the file */
|
||||
metadata?: Record<string, any>
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user