(sessionId: string, file: File | string)
| 191 | } |
| 192 | |
| 193 | async analyzeIncrementalImport(sessionId: string, file: File | string): Promise<IncrementalAnalysis> { |
| 194 | if (typeof file === 'string') { |
| 195 | return { newMessageCount: 0, duplicateCount: 0, totalInFile: 0, error: 'File path not supported in Web mode' } |
| 196 | } |
| 197 | |
| 198 | const form = new FormData() |
| 199 | form.append('file', file) |
| 200 | |
| 201 | const res = await fetchWithAuth(`${getBaseUrl()}/sessions/${sessionId}/import/incremental/analyze`, { |
| 202 | method: 'POST', |
| 203 | body: form, |
| 204 | }) |
| 205 | |
| 206 | if (!res.ok) { |
| 207 | const text = await res.text() |
| 208 | return { newMessageCount: 0, duplicateCount: 0, totalInFile: 0, error: `HTTP ${res.status}: ${text}` } |
| 209 | } |
| 210 | |
| 211 | return (await res.json()) as IncrementalAnalysis |
| 212 | } |
| 213 | |
| 214 | async incrementalImport( |
| 215 | sessionId: string, |
nothing calls this directly
no test coverage detected