const __REDIRECT__: string = location.hostname; declare const __ENV__; export const redirectUrl: string = __REDIRECT__.indexOf('localhost') === -1 ? `https://${__REDIRECT__}/` : 'https://localhost:8080/'; export const authUrl: string = `${getEnv(__ENV__)}/Dezrez.Core.Api/oauth/authorize`; export const tokenUrl: string = `${getEnv(__ENV__)}/Dezrez.Core.Api/oauth/token`; export const accessScope: string = 'impersonate_user'; export const clientId: string = 'PMv2'; export const clientPassword: string = 'GdVXxAAxQ4zVE7WTJaISkkJvD9wTYI1EWCVnKoonnA'; function getEnv(env) { let baseUrl = 'https://dezrez-core-auth-dev.dezrez.com'; switch (env) { case 'dev': baseUrl = 'https://dezrez-core-auth-systest.dezrez.com'; break; case 'release': baseUrl = 'https://dezrez-core-auth-uat.dezrez.com'; break; case 'master': baseUrl = 'https://auth.dezrez.com'; break; } return baseUrl; } export function overrideApiUrl() { let apiUrls = 'https://localapi.dezrez.com'; switch (__ENV__) { case 'feature': apiUrls = 'https://core-api-dev.dezrez.com'; break; case 'dev': apiUrls = 'https://core-api-systest.dezrez.com'; break; case 'release': apiUrls = 'https://core-api-uat.dezrez.com'; break; case 'master': apiUrls = 'https://api.dezrez.com'; break; } return apiUrls; }