(workflowId: string)
| 284 | } |
| 285 | |
| 286 | export async function loadExecutionPointer(workflowId: string): Promise<ExecutionPointer | null> { |
| 287 | if (typeof window === 'undefined') return null |
| 288 | try { |
| 289 | const raw = window.sessionStorage.getItem(`${EXEC_POINTER_PREFIX}${workflowId}`) |
| 290 | if (!raw) return null |
| 291 | const parsed = JSON.parse(raw) |
| 292 | if (!parsed?.executionId) return null |
| 293 | return parsed as ExecutionPointer |
| 294 | } catch { |
| 295 | return null |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | export function saveExecutionPointer(pointer: ExecutionPointer): Promise<void> { |
| 300 | if (typeof window === 'undefined') return Promise.resolve() |
no test coverage detected