( sessionId: string, baseUrl: string, accessToken: string, timeoutMs: number, )
| 915 | // injects the trusted-device token (both are env/GrowthBook reads that the |
| 916 | // SDK-facing codeSessionApi.ts export must stay free of). |
| 917 | export async function fetchRemoteCredentials( |
| 918 | sessionId: string, |
| 919 | baseUrl: string, |
| 920 | accessToken: string, |
| 921 | timeoutMs: number, |
| 922 | ): Promise<RemoteCredentials | null> { |
| 923 | const creds = await fetchRemoteCredentialsRaw( |
| 924 | sessionId, |
| 925 | baseUrl, |
| 926 | accessToken, |
| 927 | timeoutMs, |
| 928 | getTrustedDeviceToken(), |
| 929 | ) |
| 930 | if (!creds) return null |
| 931 | return getBridgeBaseUrlOverride() |
| 932 | ? { ...creds, api_base_url: baseUrl } |
| 933 | : creds |
| 934 | } |
| 935 | |
| 936 | type ArchiveStatus = number | 'timeout' | 'error' | 'no_token' |
| 937 |
no test coverage detected