( sessionId: string, baseUrl: string, accessToken: string, timeoutMs: number, )
| 976 | // injects the trusted-device token (both are env/GrowthBook reads that the |
| 977 | // SDK-facing codeSessionApi.ts export must stay free of). |
| 978 | export async function fetchRemoteCredentials( |
| 979 | sessionId: string, |
| 980 | baseUrl: string, |
| 981 | accessToken: string, |
| 982 | timeoutMs: number, |
| 983 | ): Promise<RemoteCredentials | null> { |
| 984 | const creds = await fetchRemoteCredentialsRaw( |
| 985 | sessionId, |
| 986 | baseUrl, |
| 987 | accessToken, |
| 988 | timeoutMs, |
| 989 | getTrustedDeviceToken(), |
| 990 | ) |
| 991 | if (!creds) return null |
| 992 | return getBridgeBaseUrlOverride() |
| 993 | ? { ...creds, api_base_url: baseUrl } |
| 994 | : creds |
| 995 | } |
| 996 | |
| 997 | type ArchiveStatus = number | 'timeout' | 'error' | 'no_token' |
| 998 |
no test coverage detected