(
environmentId: string,
sessionId: string,
)
| 356 | }, |
| 357 | |
| 358 | async reconnectSession( |
| 359 | environmentId: string, |
| 360 | sessionId: string, |
| 361 | ): Promise<void> { |
| 362 | validateBridgeId(environmentId, 'environmentId') |
| 363 | validateBridgeId(sessionId, 'sessionId') |
| 364 | |
| 365 | debug( |
| 366 | `[bridge:api] POST /v1/environments/${environmentId}/bridge/reconnect session_id=${sessionId}`, |
| 367 | ) |
| 368 | |
| 369 | const response = await withOAuthRetry( |
| 370 | (token: string) => |
| 371 | axios.post( |
| 372 | `${deps.baseUrl}/v1/environments/${environmentId}/bridge/reconnect`, |
| 373 | { session_id: sessionId }, |
| 374 | { |
| 375 | headers: getHeaders(token), |
| 376 | timeout: 10_000, |
| 377 | validateStatus: s => s < 500, |
| 378 | }, |
| 379 | ), |
| 380 | 'ReconnectSession', |
| 381 | ) |
| 382 | |
| 383 | handleErrorStatus(response.status, response.data, 'ReconnectSession') |
| 384 | debug(`[bridge:api] POST .../bridge/reconnect -> ${response.status}`) |
| 385 | }, |
| 386 | |
| 387 | async heartbeatWork( |
| 388 | environmentId: string, |
nothing calls this directly
no test coverage detected