(account: ParsedServiceAccount)
| 76 | export type BigQueryDestinationCredentials = z.infer<typeof bigqueryCredentialsSchema> |
| 77 | |
| 78 | function buildJwt(account: ParsedServiceAccount): JWT { |
| 79 | return new JWT({ email: account.clientEmail, key: account.privateKey, scopes: SCOPES }) |
| 80 | } |
| 81 | |
| 82 | async function getAccessToken(jwt: JWT, forceRefresh = false): Promise<string> { |
| 83 | if (forceRefresh) { |
no outgoing calls