()
| 519 | } |
| 520 | |
| 521 | async listIndexes(): Promise<{ indexes: any[]; total: number }> { |
| 522 | const resp = await fetch(`${API_BASE_URL}/indexes`); |
| 523 | if (!resp.ok) { |
| 524 | throw new Error(`Failed to list indexes: ${resp.status}`); |
| 525 | } |
| 526 | return resp.json(); |
| 527 | } |
| 528 | |
| 529 | async getSessionIndexes(sessionId: string): Promise<{ indexes: any[]; total: number }> { |
| 530 | const resp = await fetch(`${API_BASE_URL}/sessions/${sessionId}/indexes`); |