-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
83 lines (72 loc) · 1.59 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
export interface ChatMessage {
id: string;
role: 'user' | 'assistant';
content: string;
created_at: string;
metadata?: Record<string, any>;
}
export interface ChatSession {
id: string;
user_id: string;
mode: 'research' | 'case';
case_id?: string;
created_at: string;
updated_at: string;
metadata?: Record<string, any>;
}
export interface ChatRequest {
content: string;
mode: 'research' | 'case';
case_id?: string;
metadata?: Record<string, any>;
}
export interface ChatResponse {
message: ChatMessage;
citations?: Array<any>;
metadata?: Record<string, any>;
}
export interface Document {
id: string;
user_id: string;
name: string;
type: string;
size: number;
storage_path: string;
case_id?: string;
chat_session_id?: string;
created_at: string;
metadata?: Record<string, any>;
}
export type CaseStatus = 'active' | 'closed' | 'archived' | 'pending';
export interface Case {
id: string;
user_id: string;
title: string;
description: string;
status: CaseStatus;
created_at: string;
updated_at: string;
metadata?: Record<string, any>;
}
export type ActivityType = 'created' | 'updated' | 'document_added' | 'message_sent' | 'status_changed';
export interface CaseActivity {
id: string;
case_id: string;
activity_type: ActivityType;
description: string;
created_at: string;
metadata?: Record<string, any>;
}
export interface ApiError {
message: string;
status: number;
}
export interface LoginResponse {
access_token: string;
token_type: string;
}
export interface User {
id: string;
email: string;
is_active: boolean;
}