UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

129 lines (127 loc) 4.88 kB
import { EnvironmentModule } from '../manifest/environment-modules'; /** * Translated gateway v1 and v2 strings as appropriate */ export class GatewayUrls { /** *Setting connectivity url */ static settingsConnectivityRelativeUrl = '/settings/connectivity'; /** * Return correct aadUser url depending on the gateway version */ static get aadUser() { return EnvironmentModule.isGatewayV200 ? 'aad/user' : 'gateway/aad/user'; } /** * Return correct aadApplication url depending on the gateway version */ static get aadApplication() { return EnvironmentModule.isGatewayV200 ? 'aad/application' : 'gateway/aad/application'; } /** * Return correct aadRegisterStatus url depending on the gateway version */ static get aadRegisterStatus() { return EnvironmentModule.isGatewayV200 ? 'aad/registerStatus' : 'gateway/aad/registerStatus'; } /** * Return correct aadTokenStatus url depending on the gateway version */ static get aadTokenStatus() { return EnvironmentModule.isGatewayV200 ? 'aad/tokenStatus' : 'gateway/aad/tokenStatus'; } /** * Return correct aadDeviceCodeUrl url depending on the gateway version */ static get aadDeviceCodeUrl() { return EnvironmentModule.isGatewayV200 ? 'aad/CloudName/{0}/deviceCode' : 'gateway/aad/CloudName/{0}/deviceCode'; } /** * Return correct getTenantsUrl url depending on the gateway version */ static get getTenantsUrl() { return EnvironmentModule.isGatewayV200 ? 'aad/CloudName/{0}/tenants' : 'gateway/aad/CloudName/{0}/tenants'; } /** * Return correct aadSignOut url depending on the gateway version */ static get aadSignOut() { return EnvironmentModule.isGatewayV200 ? 'aad/signOut' : 'gateway/aad/signOut'; } /** * Return correct aadAppInfo url depending on the gateway version */ static get aadAppInfo() { return EnvironmentModule.isGatewayV200 ? 'aad/appInfo' : 'gateway/aad/appInfo'; } /** * Return correct disableAadAppAuth url depending on the gateway version */ static get disableAadAppAuth() { return EnvironmentModule.isGatewayV200 ? 'aad/disableAadAuth' : 'gateway/aad/disableAadAuth'; } /** * Return correct enableAadAuth url depending on the gateway version */ static get enableAadAuthAuth() { return EnvironmentModule.isGatewayV200 ? 'aad/enableAadAuth' : 'gateway/aad/enableAadAuth'; } /** * Return correct securityGroupActionTemplate url depending on the gateway version */ static get securityGroupActionTemplate() { return EnvironmentModule.isGatewayV200 ? 'access/{0}/{1}/type/{2}' : 'gateway/access/{0}/{1}/type/{2}'; } /** * Return correct aadAppWithParam url depending on the gateway version */ static get aadAppWithParam() { return EnvironmentModule.isGatewayV200 ? 'aad/cloudName/{0}/application' : 'gateway/aad/cloudName/{0}/application'; } /** * Return correct aadAzureAppsWithParam url depending on the gateway version */ static get aadAzureAppsWithParam() { return EnvironmentModule.isGatewayV200 ? 'aad/cloudName/{0}/azureApplications' : 'gateway/aad/cloudName/{0}/azureApplications'; } /** * Return correct accessCheck url url depending on the gateway version */ static get accessCheck() { return EnvironmentModule.isGatewayV200 ? 'access/check' : 'gateway/access/check'; } /** * Return correct accessUser url depending on the gateway version */ static get accessUsers() { return EnvironmentModule.isGatewayV200 ? 'access/users' : 'gateway/access/users'; } /** * Return correct accessAdmin url depending on the gateway version */ static get accessAdmins() { return EnvironmentModule.isGatewayV200 ? 'access/admins' : 'gateway/access/admins'; } /** * Return correct adDomainRelativeUrl url depending on the gateway version * 'services/WinREST/activeDirectory/domain' is the GWV2 url * 'gateway/domain' is the GWV1 url */ static get adDomainRelativeUrl() { return EnvironmentModule.isGatewayV200 ? 'services/WinREST/activeDirectory/domain' : 'gateway/domain'; } /** * Return correct adAccountsRelativeUrl url depending on the gateway version * 'services/WinREST/activeDirectory/accounts' is the GWV2 url * 'gateway/accounts' is the GWV1 url */ static get adAccountsRelativeUrl() { return EnvironmentModule.isGatewayV200 ? 'services/WinREST/activeDirectory/accounts' : 'gateway/accounts'; } /** * Get latest gateway version url */ static gatewayVersion = 'gateway/latestVersion'; } //# sourceMappingURL=gateway-urls.js.map