feat(evidence): add upload types and API client for frontend
- FileUploadResponse and PendingUpload types in types/upload.ts - uploadsApi with upload(), getUrl(), list(), remove() methods - Exported from types/index.ts and api/index.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ export type { AssistantChat, AssistantChatMessage, ChatListItem, ChatMessageResp
|
||||
export * from './ai-session'
|
||||
export * from './flow-proposal'
|
||||
export * from './flowpilot-analytics'
|
||||
export * from './upload'
|
||||
|
||||
// API response wrapper types
|
||||
export interface PaginatedResponse<T> {
|
||||
|
||||
17
frontend/src/types/upload.ts
Normal file
17
frontend/src/types/upload.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export interface FileUploadResponse {
|
||||
id: string
|
||||
filename: string
|
||||
content_type: string
|
||||
size_bytes: number
|
||||
url: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export interface PendingUpload {
|
||||
id: string
|
||||
file: File
|
||||
preview: string
|
||||
status: 'uploading' | 'done' | 'error'
|
||||
result?: FileUploadResponse
|
||||
error?: string
|
||||
}
|
||||
Reference in New Issue
Block a user