(machineId?: string)
| 208 | } |
| 209 | |
| 210 | async listResumableSessions(machineId?: string): Promise<ResumableSession[]> { |
| 211 | const qs = machineId ? `?machineId=${encodeURIComponent(machineId)}` : '' |
| 212 | const response = await axios.get( |
| 213 | `${configuration.apiUrl}/cli/sessions/resumable${qs}`, |
| 214 | { |
| 215 | headers: this.authHeaders(), |
| 216 | timeout: 60_000 |
| 217 | } |
| 218 | ) |
| 219 | const parsed = ResumableSessionsResponseSchema.safeParse(response.data) |
| 220 | if (!parsed.success) { |
| 221 | throw apiValidationError('Invalid /cli/sessions/resumable response', response) |
| 222 | } |
| 223 | return parsed.data.sessions |
| 224 | } |
| 225 | |
| 226 | async getLocalResumeTarget(sessionId: string): Promise<LocalResumeTarget> { |
| 227 | const response = await axios.get( |
no test coverage detected