-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
69 lines (61 loc) · 1.46 KB
/
Copy pathtypes.ts
File metadata and controls
69 lines (61 loc) · 1.46 KB
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
export interface DetectedText {
original: string;
language: string;
translation: string;
context: string;
culturalNotes?: string;
pronunciation?: string;
}
export interface StructuredItem {
label: string; // e.g. "Beef Curry"
value: string; // e.g. "980 Yen"
description?: string; // e.g. "Spicy beef with rice"
original?: string; // e.g. "ビーフカレー"
}
export interface StructuredSection {
title: string; // e.g. "Meals" or "Drinks"
items: StructuredItem[];
}
export interface StructuredOutput {
type: 'MENU' | 'TABLE' | 'STANDARD';
title?: string;
sections: StructuredSection[];
}
export interface CameraAnalysisResult {
detectedTexts: DetectedText[];
sceneContext: {
english: string;
translated: string;
};
suggestions: string[];
searchQueries: string[];
structuredOutput?: StructuredOutput;
}
export interface DocumentAnalysisResult {
detectedLanguage: string;
documentType: string;
summary: string;
fullTranslation: string;
keySections: {
title: string;
content: string;
explanation: string;
}[];
warnings: string[];
actionItems: string[];
structuredOutput?: StructuredOutput;
}
export interface ChatMessage {
id: string;
speaker: 'user' | 'other' | 'system';
original: string;
translation: string;
language: string;
timestamp: number;
}
export type AppMode = 'camera' | 'conversation' | 'document';
export interface Language {
code: string;
name: string;
flag: string;
}