()
| 198 | return items; |
| 199 | } |
| 200 | export function buildAccountProperties(): Property[] { |
| 201 | const accountInfo = getAccountInformation(); |
| 202 | if (!accountInfo) { |
| 203 | return []; |
| 204 | } |
| 205 | const properties: Property[] = []; |
| 206 | if (accountInfo.subscription) { |
| 207 | properties.push({ |
| 208 | label: 'Login method', |
| 209 | value: `${accountInfo.subscription} Account` |
| 210 | }); |
| 211 | } |
| 212 | if (accountInfo.tokenSource) { |
| 213 | properties.push({ |
| 214 | label: 'Auth token', |
| 215 | value: accountInfo.tokenSource |
| 216 | }); |
| 217 | } |
| 218 | if (accountInfo.apiKeySource) { |
| 219 | properties.push({ |
| 220 | label: 'API key', |
| 221 | value: accountInfo.apiKeySource |
| 222 | }); |
| 223 | } |
| 224 | |
| 225 | // Hide sensitive account info in demo mode |
| 226 | if (accountInfo.organization && !process.env.IS_DEMO) { |
| 227 | properties.push({ |
| 228 | label: 'Organization', |
| 229 | value: accountInfo.organization |
| 230 | }); |
| 231 | } |
| 232 | if (accountInfo.email && !process.env.IS_DEMO) { |
| 233 | properties.push({ |
| 234 | label: 'Email', |
| 235 | value: accountInfo.email |
| 236 | }); |
| 237 | } |
| 238 | return properties; |
| 239 | } |
| 240 | export function buildAPIProviderProperties(): Property[] { |
| 241 | const apiProvider = getAPIProvider(); |
| 242 | const properties: Property[] = []; |
no test coverage detected