(key: string, token: CachedToken)
| 105 | } |
| 106 | |
| 107 | function rememberToken(key: string, token: CachedToken): void { |
| 108 | if (TOKEN_CACHE.has(key)) TOKEN_CACHE.delete(key) |
| 109 | TOKEN_CACHE.set(key, token) |
| 110 | while (TOKEN_CACHE.size > TOKEN_CACHE_MAX_ENTRIES) { |
| 111 | const oldestKey = TOKEN_CACHE.keys().next().value |
| 112 | if (oldestKey === undefined) break |
| 113 | TOKEN_CACHE.delete(oldestKey) |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | export async function fetchZoomInfoAccessToken( |
| 118 | auth: ZoomInfoAuth, |
no test coverage detected