(sessionId: string)
| 94 | const generations = new Map<string, number>() |
| 95 | |
| 96 | function nextGeneration(sessionId: string): number { |
| 97 | const gen = (generations.get(sessionId) ?? 0) + 1 |
| 98 | generations.set(sessionId, gen) |
| 99 | return gen |
| 100 | } |
| 101 | |
| 102 | function schedule(sessionId: string, token: string): void { |
| 103 | const expiry = decodeJwtExpiry(token) |