( sessionId: string, baseUrl: string, accessToken: string, timeoutMs: number, )
| 929 | // injects the trusted-device token (both are env/GrowthBook reads that the |
| 930 | // SDK-facing codeSessionApi.ts export must stay free of). |
| 931 | export async function fetchRemoteCredentials( |
| 932 | sessionId: string, |
| 933 | baseUrl: string, |
| 934 | accessToken: string, |
| 935 | timeoutMs: number, |
| 936 | ): Promise<RemoteCredentials | null> { |
| 937 | const creds = await fetchRemoteCredentialsRaw( |
| 938 | sessionId, |
| 939 | baseUrl, |
| 940 | accessToken, |
| 941 | timeoutMs, |
| 942 | getTrustedDeviceToken(), |
| 943 | ) |
| 944 | if (!creds) return null |
| 945 | return getBridgeBaseUrlOverride() |
| 946 | ? { ...creds, api_base_url: baseUrl } |
| 947 | : creds |
| 948 | } |
| 949 | |
| 950 | type ArchiveStatus = number | 'timeout' | 'error' | 'no_token' |
| 951 |
no test coverage detected