feat(shared): add core shared TypeScript interfaces
swadhinbiswas committed 8 months ago
7cc46ca
1 parent 64e1d07
commit 7cc46ca
1 file changed
+19 -0
Showing 1 changed file+19-0
▼opengrammar/shared/src/types.ts
+19-0
| @@ -0,0 +1,19 @@ | ||
1 | +export interface Issue { | |
2 | + type: 'grammar' | 'spelling' | 'clarity' | 'style'; | |
3 | + original: string; | |
4 | + suggestion: string; | |
5 | + reason: string; | |
6 | + offset: number; | |
7 | + length: number; | |
8 | +} | |
9 | + | |
10 | +export interface AnalyzeRequest { | |
11 | + text: string; | |
12 | + apiKey?: string; | |
13 | + model?: string; | |
14 | +} | |
15 | + | |
16 | +export interface AnalyzeResponse { | |
17 | + issues: Issue[]; | |
18 | + error?: string; | |
19 | +} | |
0 | 20 | |