(sessionId: string, indexId: string)
| 510 | } |
| 511 | |
| 512 | async linkIndexToSession(sessionId: string, indexId: string): Promise<{ message: string }> { |
| 513 | const resp = await fetch(`${API_BASE_URL}/sessions/${sessionId}/indexes/${indexId}`, { method: 'POST' }); |
| 514 | if (!resp.ok) { |
| 515 | const err = await resp.json().catch(() => ({})); |
| 516 | throw new Error(`Link index error: ${err.error || resp.statusText}`); |
| 517 | } |
| 518 | return resp.json(); |
| 519 | } |
| 520 | |
| 521 | async listIndexes(): Promise<{ indexes: any[]; total: number }> { |
| 522 | const resp = await fetch(`${API_BASE_URL}/indexes`); |
no outgoing calls
no test coverage detected