( sessionId: string, accessToken: string, orgUUID: string, )
| 244 | * Used for teleporting sessions from the Sessions API |
| 245 | */ |
| 246 | export async function getSessionLogsViaOAuth( |
| 247 | sessionId: string, |
| 248 | accessToken: string, |
| 249 | orgUUID: string, |
| 250 | ): Promise<Entry[] | null> { |
| 251 | const url = `${getOauthConfig().BASE_API_URL}/v1/session_ingress/session/${sessionId}` |
| 252 | logForDebugging(`[session-ingress] Fetching session logs from: ${url}`) |
| 253 | const headers = { |
| 254 | ...getOAuthHeaders(accessToken), |
| 255 | 'x-organization-uuid': orgUUID, |
| 256 | } |
| 257 | const result = await fetchSessionLogsFromUrl(sessionId, url, headers) |
| 258 | return result |
| 259 | } |
| 260 | |
| 261 | /** |
| 262 | * Response shape from GET /v1/code/sessions/{id}/teleport-events. |
no test coverage detected