(expiresAt: number | null)
| 342 | } |
| 343 | |
| 344 | export function isOAuthTokenExpired(expiresAt: number | null): boolean { |
| 345 | if (expiresAt === null) { |
| 346 | return false |
| 347 | } |
| 348 | |
| 349 | const bufferTime = 5 * 60 * 1000 |
| 350 | const now = Date.now() |
| 351 | const expiresWithBuffer = now + bufferTime |
| 352 | return expiresWithBuffer >= expiresAt |
| 353 | } |
| 354 | |
| 355 | export async function fetchProfileInfo(accessToken: string): Promise<{ |
| 356 | subscriptionType: SubscriptionType | null |
no outgoing calls
no test coverage detected