(credentialId: string)
| 303 | } |
| 304 | |
| 305 | async function resolveCredentialAccountUserId(credentialId: string): Promise<string | undefined> { |
| 306 | const resolved = await resolveOAuthAccountId(credentialId) |
| 307 | if (!resolved) { |
| 308 | return undefined |
| 309 | } |
| 310 | const [credentialRecord] = await db |
| 311 | .select({ userId: account.userId }) |
| 312 | .from(account) |
| 313 | .where(eq(account.id, resolved.accountId)) |
| 314 | .limit(1) |
| 315 | return credentialRecord?.userId |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Handle execution result status (timeout, pause, resume). |
no test coverage detected