@microsoft/windows-admin-center-sdk 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdPartyDisclosure.html +10 -13
- package/README.md +110 -33
- package/angular/fesm2022/msft-sme-angular.mjs +1235 -1213
- package/angular/fesm2022/msft-sme-angular.mjs.map +1 -1
- package/angular/index.d.ts +29 -14
- package/angular/package.json +1 -1
- package/core/azure/azure-manager.d.ts +15 -3
- package/core/azure/azure-manager.d.ts.map +1 -1
- package/core/azure/azure-manager.js +29 -10
- package/core/azure/azure-manager.js.map +1 -1
- package/core/azure/models/aadAppConfig-data.d.ts +16 -0
- package/core/azure/models/aadAppConfig-data.d.ts.map +1 -1
- package/core/azure/models/aadAppConfig-data.js.map +1 -1
- package/core/base/environment.d.ts +1 -1
- package/core/base/environment.d.ts.map +1 -1
- package/core/base/environment.js.map +1 -1
- package/core/base/utilities.d.ts +10 -2
- package/core/base/utilities.d.ts.map +1 -1
- package/core/base/utilities.js +45 -25
- package/core/base/utilities.js.map +1 -1
- package/core/data/gateway-connection.d.ts.map +1 -1
- package/core/data/gateway-connection.js +1 -0
- package/core/data/gateway-connection.js.map +1 -1
- package/core/diagnostics/sme-web-telemetry.d.ts +17 -1
- package/core/diagnostics/sme-web-telemetry.d.ts.map +1 -1
- package/core/diagnostics/sme-web-telemetry.js +16 -0
- package/core/diagnostics/sme-web-telemetry.js.map +1 -1
- package/core/enterprise/enterprise-models.d.ts +10 -4
- package/core/enterprise/enterprise-models.d.ts.map +1 -1
- package/core/enterprise/enterprise-models.js +9 -4
- package/core/enterprise/enterprise-models.js.map +1 -1
- package/core/index.d.ts +5 -3
- package/core/index.d.ts.map +1 -1
- package/core/index.js +2 -1
- package/core/index.js.map +1 -1
- package/core/manifest/environment-modules.d.ts +2 -2
- package/core/manifest/environment-modules.d.ts.map +1 -1
- package/core/manifest/environment-modules.js.map +1 -1
- package/core/manifest/gateway-url-validator.d.ts +17 -0
- package/core/manifest/gateway-url-validator.d.ts.map +1 -0
- package/core/manifest/gateway-url-validator.js +56 -0
- package/core/manifest/gateway-url-validator.js.map +1 -0
- package/core/manifest/manifest-loader.d.ts +47 -11
- package/core/manifest/manifest-loader.d.ts.map +1 -1
- package/core/manifest/manifest-loader.js +141 -72
- package/core/manifest/manifest-loader.js.map +1 -1
- package/core/manifest/module-schema.json +1 -1
- package/core/performance/performance-tracker.d.ts +2 -0
- package/core/performance/performance-tracker.d.ts.map +1 -1
- package/core/performance/performance-tracker.js +18 -0
- package/core/performance/performance-tracker.js.map +1 -1
- package/core/rpc/azure/rpc-azure-model.d.ts +19 -1
- package/core/rpc/azure/rpc-azure-model.d.ts.map +1 -1
- package/core/rpc/azure/rpc-azure-model.js.map +1 -1
- package/core/rpc/forward/rpc-forward-auto-client.d.ts +5 -0
- package/core/rpc/forward/rpc-forward-auto-client.d.ts.map +1 -1
- package/core/rpc/forward/rpc-forward-auto-client.js +13 -0
- package/core/rpc/forward/rpc-forward-auto-client.js.map +1 -1
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-client.d.ts +16 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-client.d.ts.map +1 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-client.js +18 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-client.js.map +1 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-handler.d.ts +8 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-handler.d.ts.map +1 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-handler.js +2 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-handler.js.map +1 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-model.d.ts +18 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-model.d.ts.map +1 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-model.js +8 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-model.js.map +1 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-subject-server.d.ts +27 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-subject-server.d.ts.map +1 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-subject-server.js +23 -0
- package/core/rpc/resource-data-changed/rpc-resource-data-changed-subject-server.js.map +1 -0
- package/core/rpc/rpc-forwarder.d.ts +16 -2
- package/core/rpc/rpc-forwarder.d.ts.map +1 -1
- package/core/rpc/rpc-forwarder.js +50 -6
- package/core/rpc/rpc-forwarder.js.map +1 -1
- package/core/security/authorization-manager.d.ts +126 -4
- package/core/security/authorization-manager.d.ts.map +1 -1
- package/core/security/authorization-manager.js +381 -49
- package/core/security/authorization-manager.js.map +1 -1
- package/core/security/connection-manager.d.ts +2 -1
- package/core/security/connection-manager.d.ts.map +1 -1
- package/core/security/connection-manager.js +10 -6
- package/core/security/connection-manager.js.map +1 -1
- package/core/security/tool-condition-validator.d.ts +8 -3
- package/core/security/tool-condition-validator.d.ts.map +1 -1
- package/core/security/tool-condition-validator.js +43 -28
- package/core/security/tool-condition-validator.js.map +1 -1
- package/core/version.js +1 -1
- package/core/version.js.map +1 -1
- package/core/virtualization/virtualization-client.d.ts +47 -78
- package/core/virtualization/virtualization-client.d.ts.map +1 -1
- package/core/virtualization/virtualization-client.js +57 -77
- package/core/virtualization/virtualization-client.js.map +1 -1
- package/core/virtualization/virtualization-models.d.ts +9 -8
- package/core/virtualization/virtualization-models.d.ts.map +1 -1
- package/core/virtualization/virtualization-models.js +7 -5
- package/core/virtualization/virtualization-models.js.map +1 -1
- package/core/virtualization/virtualization-unavailable-error.d.ts +1 -1
- package/core/virtualization/virtualization-unavailable-error.js +1 -1
- package/core/virtualization/virtualization-unavailable-error.js.map +1 -1
- package/package.json +12 -17
- package/{react-sdk-core → react}/hooks/useAppContextInit.d.ts +2 -0
- package/react/hooks/useAppContextInit.d.ts.map +1 -0
- package/{react-sdk-core → react}/hooks/useAppContextInit.js +18 -2
- package/{react-sdk-core → react}/index.js +1 -1
- package/react/services/BaseNavigationService.d.ts.map +1 -0
- package/{react-sdk-core → react}/services/BaseNavigationService.js +4 -0
- package/{react-sdk-core → react}/version.d.ts.map +1 -1
- package/react/version.js +3 -0
- package/{react-sdk-core → react}/vite/smeCoreStringsPlugin.d.ts +1 -1
- package/{react-sdk-core → react}/vite/smeCoreStringsPlugin.js +1 -1
- package/{react-sdk-core → react}/vite/smeManifestResourcesPlugin.d.ts +1 -1
- package/{react-sdk-core → react}/vite/smeManifestResourcesPlugin.js +1 -1
- package/{react-sdk-core → react}/vite/smePowerShellPlugin.d.ts +1 -1
- package/{react-sdk-core → react}/vite/smePowerShellPlugin.js +1 -1
- package/styles/css/main-v2.css +1 -1
- package/styles/package.json +1 -1
- package/wac-cli/dist/angular20/configs/ci-build-yml-config.js +3 -2
- package/wac-cli/dist/angular20/configs/ci-build-yml-config.js.map +1 -1
- package/wac-cli/dist/angular20/upgrader/nvmrc-engines-upgrader.js +2 -2
- package/wac-cli/dist/create-react/main.js +3 -2
- package/wac-cli/dist/create-react/main.js.map +1 -1
- package/wac-cli/module-template/build/pipelines/ci-build.yml +2 -2
- package/wac-cli/module-template/build/pipelines/pull-request.yml +2 -2
- package/wac-cli/templates/internal/main.ts +2 -2
- package/wac-cli/templates/internal/package.json +26 -14
- package/wac-cli/templates/react-template/package.json +3 -2
- package/wac-cli/templates/react-template/src/App.tsx +1 -1
- package/wac-cli/templates/react-template/src/hooks/useServicesData.ts +1 -1
- package/wac-cli/templates/react-template/vite.config.ts +1 -1
- package/wac-cli/templates/wac-template/angular.json +8 -13
- package/wac-cli/templates/wac-template/package.json +26 -14
- package/wac-cli/templates/wac-template/src/main.ts +2 -2
- package/react-sdk-core/hooks/useAppContextInit.d.ts.map +0 -1
- package/react-sdk-core/services/BaseNavigationService.d.ts.map +0 -1
- package/react-sdk-core/version.js +0 -3
- /package/{react-sdk-core → react}/components/SplashScreen.d.ts +0 -0
- /package/{react-sdk-core → react}/components/SplashScreen.d.ts.map +0 -0
- /package/{react-sdk-core → react}/components/SplashScreen.js +0 -0
- /package/{react-sdk-core → react}/context/AppContextProvider.d.ts +0 -0
- /package/{react-sdk-core → react}/context/AppContextProvider.d.ts.map +0 -0
- /package/{react-sdk-core → react}/context/AppContextProvider.js +0 -0
- /package/{react-sdk-core → react}/hooks/useAppContext.d.ts +0 -0
- /package/{react-sdk-core → react}/hooks/useAppContext.d.ts.map +0 -0
- /package/{react-sdk-core → react}/hooks/useAppContext.js +0 -0
- /package/{react-sdk-core → react}/hooks/useSkeletonStyles.d.ts +0 -0
- /package/{react-sdk-core → react}/hooks/useSkeletonStyles.d.ts.map +0 -0
- /package/{react-sdk-core → react}/hooks/useSkeletonStyles.js +0 -0
- /package/{react-sdk-core → react}/hooks/useWacTheme.d.ts +0 -0
- /package/{react-sdk-core → react}/hooks/useWacTheme.d.ts.map +0 -0
- /package/{react-sdk-core → react}/hooks/useWacTheme.js +0 -0
- /package/{react-sdk-core → react}/index.d.ts +0 -0
- /package/{react-sdk-core → react}/index.d.ts.map +0 -0
- /package/{react-sdk-core → react}/services/AppContextService.d.ts +0 -0
- /package/{react-sdk-core → react}/services/AppContextService.d.ts.map +0 -0
- /package/{react-sdk-core → react}/services/AppContextService.js +0 -0
- /package/{react-sdk-core → react}/services/BaseNavigationService.d.ts +0 -0
- /package/{react-sdk-core → react}/services/NavigationService.d.ts +0 -0
- /package/{react-sdk-core → react}/services/NavigationService.d.ts.map +0 -0
- /package/{react-sdk-core → react}/services/NavigationService.js +0 -0
- /package/{react-sdk-core → react}/services/Polyfills.d.ts +0 -0
- /package/{react-sdk-core → react}/services/Polyfills.d.ts.map +0 -0
- /package/{react-sdk-core → react}/services/Polyfills.js +0 -0
- /package/{react-sdk-core → react}/version.d.ts +0 -0
- /package/{react-sdk-core → react}/vite/index.d.ts +0 -0
- /package/{react-sdk-core → react}/vite/index.d.ts.map +0 -0
- /package/{react-sdk-core → react}/vite/index.js +0 -0
- /package/{react-sdk-core → react}/vite/log.d.ts +0 -0
- /package/{react-sdk-core → react}/vite/log.d.ts.map +0 -0
- /package/{react-sdk-core → react}/vite/log.js +0 -0
- /package/{react-sdk-core → react}/vite/smeCoreStringsPlugin.d.ts.map +0 -0
- /package/{react-sdk-core → react}/vite/smeManifestResourcesPlugin.d.ts.map +0 -0
- /package/{react-sdk-core → react}/vite/smePowerShellPlugin.d.ts.map +0 -0
package/angular/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ import { ElementFocusingEvent } from '@microsoft/windows-admin-center-sdk/core/d
|
|
|
49
49
|
import { DateLike } from '@microsoft/windows-admin-center-sdk/core/base/date/date-like';
|
|
50
50
|
import { DateType } from '@microsoft/windows-admin-center-sdk/core/base/date/date-type';
|
|
51
51
|
import { Url } from 'url';
|
|
52
|
+
import { VirtualizationClient } from '@microsoft/windows-admin-center-sdk/core/virtualization/virtualization-client';
|
|
52
53
|
import { RpcShellNavigate } from '@microsoft/windows-admin-center-sdk/core/rpc/shell-navigate/rpc-shell-navigate-model';
|
|
53
54
|
import { ChartOptions, ChartData, ChartLegendOptions, ChartTooltipOptions, ChartAnimationOptions } from 'chart.js';
|
|
54
55
|
import { ColumnPickerDialogResponseParameters, DataTableColumn, ColumnPicker } from '@microsoft/windows-admin-center-sdk/core/data/column-picker';
|
|
@@ -64,7 +65,6 @@ import { RpcObservableExtensionDataClient } from '@microsoft/windows-admin-cente
|
|
|
64
65
|
import { RpcObservableExtensionDataResult } from '@microsoft/windows-admin-center-sdk/core/rpc/extension-data/rpc-observable-extension-data-model';
|
|
65
66
|
import { JobsManager } from '@microsoft/windows-admin-center-sdk/core/data/jobs/jobs-manager';
|
|
66
67
|
import { ScheduleRebootManager } from '@microsoft/windows-admin-center-sdk/core/data/schedule-reboot';
|
|
67
|
-
import { VirtualizationClient } from '@microsoft/windows-admin-center-sdk/core/virtualization/virtualization-client';
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Directive to provide notification or state changes for angulars @see RouterLink directive.
|
|
@@ -13203,6 +13203,17 @@ declare enum BadgeSeverityTypes {
|
|
|
13203
13203
|
Informational = "Informational"
|
|
13204
13204
|
}
|
|
13205
13205
|
|
|
13206
|
+
declare class VirtualizationService extends VirtualizationClient {
|
|
13207
|
+
/**
|
|
13208
|
+
* Initializes a new instance of the VirtualizationService class.
|
|
13209
|
+
*
|
|
13210
|
+
* @param appContextService the app context service supplying the gateway connection.
|
|
13211
|
+
*/
|
|
13212
|
+
constructor(appContextService: AppContextService);
|
|
13213
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VirtualizationService, never>;
|
|
13214
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VirtualizationService>;
|
|
13215
|
+
}
|
|
13216
|
+
|
|
13206
13217
|
/**
|
|
13207
13218
|
* The typed interface for a banner item to display.
|
|
13208
13219
|
*/
|
|
@@ -13272,6 +13283,7 @@ interface BannerItem {
|
|
|
13272
13283
|
declare class BannerComponent extends CoreBaseComponent implements OnInit {
|
|
13273
13284
|
private appContextService;
|
|
13274
13285
|
private dialogService;
|
|
13286
|
+
private virtualizationService;
|
|
13275
13287
|
/**
|
|
13276
13288
|
* The source name to use for logging
|
|
13277
13289
|
*/
|
|
@@ -13323,7 +13335,7 @@ declare class BannerComponent extends CoreBaseComponent implements OnInit {
|
|
|
13323
13335
|
* @param dialogService The dialog service.
|
|
13324
13336
|
* @param injector The injector
|
|
13325
13337
|
*/
|
|
13326
|
-
constructor(appContextService: AppContextService, dialogService: DialogService, injector: Injector);
|
|
13338
|
+
constructor(appContextService: AppContextService, dialogService: DialogService, injector: Injector, virtualizationService: VirtualizationService);
|
|
13327
13339
|
/**
|
|
13328
13340
|
* The method called after the component inputs are set.
|
|
13329
13341
|
*/
|
|
@@ -13520,6 +13532,20 @@ declare class ChartComponent extends CoreBaseComponent implements AfterViewInit,
|
|
|
13520
13532
|
* Indicates that this chart should use responsive sizing.
|
|
13521
13533
|
*/
|
|
13522
13534
|
responsive: boolean;
|
|
13535
|
+
/**
|
|
13536
|
+
* The minimum width of the chart (for example '600px'). Used only if responsive is true.
|
|
13537
|
+
* When set, the chart is wrapped in a keyboard-accessible region that scrolls horizontally
|
|
13538
|
+
* when narrower than this width. Must be set before the chart is initialized.
|
|
13539
|
+
*/
|
|
13540
|
+
minWidth: string;
|
|
13541
|
+
/**
|
|
13542
|
+
* Gets the configured minimum width or null if the chart is not responsive.
|
|
13543
|
+
*/
|
|
13544
|
+
get setMinWidth(): string;
|
|
13545
|
+
/**
|
|
13546
|
+
* The accessible name of the horizontal scroll region. Used only when the minimum width is applied.
|
|
13547
|
+
*/
|
|
13548
|
+
ariaScrollLabel: string;
|
|
13523
13549
|
/**
|
|
13524
13550
|
* Output that emits when a data element is selected in the chart
|
|
13525
13551
|
* @deprecated since 9/25/2019. Please use 'dataSelected' instead
|
|
@@ -13584,7 +13610,7 @@ declare class ChartComponent extends CoreBaseComponent implements AfterViewInit,
|
|
|
13584
13610
|
*/
|
|
13585
13611
|
refresh(): void;
|
|
13586
13612
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartComponent, never>;
|
|
13587
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "sme-chart", never, { "type": { "alias": "type"; "required": false; }; "options": { "alias": "options"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "onDataSelect": "onDataSelect"; "dataSelected": "dataSelected"; }, never, never, false, never>;
|
|
13613
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "sme-chart", never, { "type": { "alias": "type"; "required": false; }; "options": { "alias": "options"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "responsive": { "alias": "responsive"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "ariaScrollLabel": { "alias": "ariaScrollLabel"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "onDataSelect": "onDataSelect"; "dataSelected": "dataSelected"; }, never, never, false, never>;
|
|
13588
13614
|
}
|
|
13589
13615
|
|
|
13590
13616
|
declare class ChartModule {
|
|
@@ -19183,17 +19209,6 @@ declare class ScheduleRebootService extends ScheduleRebootManager {
|
|
|
19183
19209
|
static ɵprov: i0.ɵɵInjectableDeclaration<ScheduleRebootService>;
|
|
19184
19210
|
}
|
|
19185
19211
|
|
|
19186
|
-
declare class VirtualizationService extends VirtualizationClient {
|
|
19187
|
-
/**
|
|
19188
|
-
* Initializes a new instance of the VirtualizationService class.
|
|
19189
|
-
*
|
|
19190
|
-
* @param appContextService the app context service supplying the gateway connection.
|
|
19191
|
-
*/
|
|
19192
|
-
constructor(appContextService: AppContextService);
|
|
19193
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<VirtualizationService, never>;
|
|
19194
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<VirtualizationService>;
|
|
19195
|
-
}
|
|
19196
|
-
|
|
19197
19212
|
/**
|
|
19198
19213
|
* A base class for all form models.
|
|
19199
19214
|
*/
|
package/angular/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { Http } from '../data/http';
|
|
|
4
4
|
import { Rpc } from '../rpc/rpc';
|
|
5
5
|
import { ConnectionProperties } from '../security/connection';
|
|
6
6
|
import { AzureIntegrationType } from './azure-constants';
|
|
7
|
+
import { AzureRegistrationModel } from './models/aadAppConfig-data';
|
|
7
8
|
import { DeploymentOperationResponse } from './resources/deployment-operation-response';
|
|
8
9
|
import { LocationsOperationResult } from './resources/location-data';
|
|
9
10
|
import { ResourceGroupOperationResult, ResourceGroupRequestBody, ResourceGroupsOperationResult } from './resources/resource-group-data';
|
|
@@ -32,6 +33,12 @@ export declare class AzureManager {
|
|
|
32
33
|
* Get application from gateway
|
|
33
34
|
*/
|
|
34
35
|
getAppInfo(): Observable<any>;
|
|
36
|
+
/**
|
|
37
|
+
* Gets how the gateway is registered with Azure: 'tenant_locked' (Azure RBAC) or 'app_rbac' (WAC RBAC).
|
|
38
|
+
* Emits null when the gateway is not registered. Use this instead of checking `appId`, which is empty for
|
|
39
|
+
* Azure RBAC registrations.
|
|
40
|
+
*/
|
|
41
|
+
getRegistrationModel(): Observable<AzureRegistrationModel | null>;
|
|
35
42
|
/**
|
|
36
43
|
* Open the register Aad dialog
|
|
37
44
|
*/
|
|
@@ -50,8 +57,11 @@ export declare class AzureManager {
|
|
|
50
57
|
switchAccounts(): Observable<any>;
|
|
51
58
|
/**
|
|
52
59
|
* Get user token from azure
|
|
60
|
+
* @param interactive Pass true when the request comes from a user action (for example a button click). When the
|
|
61
|
+
* user has never signed in, the shell then asks them to go to Settings > Azure. Leave it unset for background
|
|
62
|
+
* requests such as page loads.
|
|
53
63
|
*/
|
|
54
|
-
getToken(): Observable<any>;
|
|
64
|
+
getToken(interactive?: boolean): Observable<any>;
|
|
55
65
|
/**
|
|
56
66
|
* Get the Azure AD graph token from azure
|
|
57
67
|
*/
|
|
@@ -61,8 +71,9 @@ export declare class AzureManager {
|
|
|
61
71
|
* @param scopes The set of permissions for which the token has to be requested.
|
|
62
72
|
* https://docs.microsoft.com/en-us/graph/permissions-reference
|
|
63
73
|
* A null value will request default scopes - openid and profile.
|
|
74
|
+
* @param interactive Pass true when the request comes from a user action. See {@link getToken}.
|
|
64
75
|
*/
|
|
65
|
-
getMicrosoftGraphToken(scopes?: string[]): Observable<any>;
|
|
76
|
+
getMicrosoftGraphToken(scopes?: string[], interactive?: boolean): Observable<any>;
|
|
66
77
|
/**
|
|
67
78
|
* Checks to see if user is signed in. Returns true if signed in, else false.
|
|
68
79
|
*/
|
|
@@ -182,8 +193,9 @@ export declare class AzureManager {
|
|
|
182
193
|
}): AjaxRequest;
|
|
183
194
|
/**
|
|
184
195
|
* Gets the arm token.
|
|
196
|
+
* @param interactive Pass true when the request comes from a user action. See {@link getToken}.
|
|
185
197
|
*/
|
|
186
|
-
getArmToken(): Observable<string>;
|
|
198
|
+
getArmToken(interactive?: boolean): Observable<string>;
|
|
187
199
|
/**
|
|
188
200
|
* Parses connection properties for ARM telemetry data and encode in hex
|
|
189
201
|
* @param connectionProperties properties on the current active connection
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azure-manager.d.ts","sourceRoot":"","sources":["../../src/azure/azure-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAuB,MAAM,MAAM,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGtD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAMpC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAgC,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"azure-manager.d.ts","sourceRoot":"","sources":["../../src/azure/azure-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAuB,MAAM,MAAM,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGtD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAMpC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAgC,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEvF,OAAO,EAAgB,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACxI,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE7E;;GAEG;AACH,qBAAa,YAAY;IAYjB,OAAO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zF,YAAY,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;CAW3C"}
|
|
@@ -46,6 +46,17 @@ export class AzureManager {
|
|
|
46
46
|
operation: RpcAzureOperationType.GetAadStatus
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Gets how the gateway is registered with Azure: 'tenant_locked' (Azure RBAC) or 'app_rbac' (WAC RBAC).
|
|
51
|
+
* Emits null when the gateway is not registered. Use this instead of checking `appId`, which is empty for
|
|
52
|
+
* Azure RBAC registrations.
|
|
53
|
+
*/
|
|
54
|
+
getRegistrationModel() {
|
|
55
|
+
return this.getAppInfo().pipe(map(result => {
|
|
56
|
+
const appInfo = result && result.appInfo;
|
|
57
|
+
return appInfo && appInfo.isRegistered && appInfo.registrationModel ? appInfo.registrationModel : null;
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
49
60
|
/**
|
|
50
61
|
* Open the register Aad dialog
|
|
51
62
|
*/
|
|
@@ -68,7 +79,7 @@ export class AzureManager {
|
|
|
68
79
|
* Signs out user.
|
|
69
80
|
*/
|
|
70
81
|
signOut() {
|
|
71
|
-
return this.
|
|
82
|
+
return this.sendTokenRequest({
|
|
72
83
|
requestId: MsftSme.newGuid(),
|
|
73
84
|
operation: RpcAzureOperationType.SignOut
|
|
74
85
|
});
|
|
@@ -81,11 +92,15 @@ export class AzureManager {
|
|
|
81
92
|
}
|
|
82
93
|
/**
|
|
83
94
|
* Get user token from azure
|
|
95
|
+
* @param interactive Pass true when the request comes from a user action (for example a button click). When the
|
|
96
|
+
* user has never signed in, the shell then asks them to go to Settings > Azure. Leave it unset for background
|
|
97
|
+
* requests such as page loads.
|
|
84
98
|
*/
|
|
85
|
-
getToken() {
|
|
99
|
+
getToken(interactive) {
|
|
86
100
|
return this.sendTokenRequest({
|
|
87
101
|
requestId: MsftSme.newGuid(),
|
|
88
|
-
operation: RpcAzureOperationType.GetAadToken
|
|
102
|
+
operation: RpcAzureOperationType.GetAadToken,
|
|
103
|
+
...(interactive ? { interactive: true } : {})
|
|
89
104
|
});
|
|
90
105
|
}
|
|
91
106
|
/**
|
|
@@ -102,12 +117,14 @@ export class AzureManager {
|
|
|
102
117
|
* @param scopes The set of permissions for which the token has to be requested.
|
|
103
118
|
* https://docs.microsoft.com/en-us/graph/permissions-reference
|
|
104
119
|
* A null value will request default scopes - openid and profile.
|
|
120
|
+
* @param interactive Pass true when the request comes from a user action. See {@link getToken}.
|
|
105
121
|
*/
|
|
106
|
-
getMicrosoftGraphToken(scopes = null) {
|
|
122
|
+
getMicrosoftGraphToken(scopes = null, interactive) {
|
|
107
123
|
return this.sendTokenRequest({
|
|
108
124
|
requestId: MsftSme.newGuid(),
|
|
109
125
|
operation: RpcAzureOperationType.GetMicrosoftGraphToken,
|
|
110
|
-
tokenScopes: scopes
|
|
126
|
+
tokenScopes: scopes,
|
|
127
|
+
...(interactive ? { interactive: true } : {})
|
|
111
128
|
});
|
|
112
129
|
}
|
|
113
130
|
/**
|
|
@@ -385,11 +402,13 @@ export class AzureManager {
|
|
|
385
402
|
}
|
|
386
403
|
/**
|
|
387
404
|
* Gets the arm token.
|
|
405
|
+
* @param interactive Pass true when the request comes from a user action. See {@link getToken}.
|
|
388
406
|
*/
|
|
389
|
-
getArmToken() {
|
|
407
|
+
getArmToken(interactive) {
|
|
390
408
|
return this.sendTokenRequest({
|
|
391
409
|
requestId: MsftSme.newGuid(),
|
|
392
|
-
operation: RpcAzureOperationType.GetAadToken
|
|
410
|
+
operation: RpcAzureOperationType.GetAadToken,
|
|
411
|
+
...(interactive ? { interactive: true } : {})
|
|
393
412
|
}).pipe(map(result => {
|
|
394
413
|
return result && result.appInfo && result.appInfo.token;
|
|
395
414
|
}));
|
|
@@ -465,12 +484,12 @@ export class AzureManager {
|
|
|
465
484
|
source: 'AzureManager'
|
|
466
485
|
});
|
|
467
486
|
return from(RpcAzureRequestClient.azureRequest(this.rpc, request)).pipe(mergeMap(() => this.watcher), filter(result => result.requestId === request.requestId), take(1), map(result => {
|
|
487
|
+
if (result.error) {
|
|
488
|
+
throw new Error(result.error);
|
|
489
|
+
}
|
|
468
490
|
if (result.appInfo) {
|
|
469
491
|
return result;
|
|
470
492
|
}
|
|
471
|
-
else if (result.error) {
|
|
472
|
-
throw new Error(result.error);
|
|
473
|
-
}
|
|
474
493
|
throw new Error(MsftSme.getStrings().MsftSmeShell.Core.Rpc.Azure.Unexpected.Error.message);
|
|
475
494
|
}));
|
|
476
495
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azure-manager.js","sourceRoot":"","sources":["../../src/azure/azure-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAA8C,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACtI,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,cAAc,EAAwB,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQ/C;;GAEG;AACH,MAAM,OAAO,YAAY;IAYT;IACA;IAZJ,OAAO,CAAmC;IAC1C,YAAY,CAAe;IAClB,WAAW,GAAG,aAAa,CAAC;IAC5B,UAAU,GAAG,YAAY,CAAC;IAC1B,UAAU,GAAG,YAAY,CAAC;IAE3C;;;OAGG;IACH,YACY,GAAQ,EACR,IAAU;QADV,QAAG,GAAH,GAAG,CAAK;QACR,SAAI,GAAJ,IA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AAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;QAE5D,IAAI,QAAQ,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;YACtE,IAAI,oBAAoB,GAAG,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC;YAC5D,oBAAoB,GAAG,oBAAoB,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC;YAC/F,IAAI,CAAC,YAAY,CAAC,6BAA6B,CAAC,oBAAoB,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,YAAY,CAAC,6BAA6B,EAAE,CAAC;QACtD,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { from, Observable, Subject, throwError } from 'rxjs';\r\nimport { AjaxRequest, AjaxResponse } from 'rxjs/ajax';\r\nimport { filter, map, mergeMap, take, tap } from 'rxjs/operators';\r\nimport { CoreEnvironment } from '../data/core-environment';\r\nimport { Http } from '../data/http';\r\nimport { LogLevel } from '../diagnostics/log-level';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport { Strings } from '../generated/strings';\r\nimport { RpcAzureOperation, RpcAzureOperationResult, RpcAzureOperationType, RpcAzureResponseKey } from '../rpc/azure/rpc-azure-model';\r\nimport { RpcAzureRequestClient } from '../rpc/azure/rpc-azure-request-client';\r\nimport { Rpc } from '../rpc/rpc';\r\nimport { ConnectionProperties } from '../security/connection';\r\nimport { ArmTelemetry, AzureConstants, AzureIntegrationType } from './azure-constants';\r\nimport { AzureLogging } from './azure-logging';\r\nimport { AadAppConfig } from './models/aadAppConfig-data';\r\nimport { DeploymentOperationRequestBody } from './resources/deployment-operation-request-body';\r\nimport { DeploymentOperationResponse } from './resources/deployment-operation-response';\r\nimport { LocationsOperationResult } from './resources/location-data';\r\nimport { ResourceGroupOperationResult, ResourceGroupRequestBody, ResourceGroupsOperationResult } from './resources/resource-group-data';\r\nimport { SubscriptionsOperationResult } from './resources/subscription-data';\r\n\r\n/**\r\n * Azure Manager class. Handles detecting and configuring Azure on a set of servers.\r\n */\r\nexport class AzureManager {\r\n private watcher: Subject<RpcAzureOperationResult>;\r\n private azureLogging: AzureLogging;\r\n private readonly AzureGlobal = 'azureglobal';\r\n private readonly AzureChina = 'azurechina';\r\n private readonly AzureUSGov = 'azureusgov';\r\n\r\n /**\r\n * Initializes a new instance of the Azure Manager class\r\n * @param rpc The rpc to forward auth requests to a parent window\r\n */\r\n constructor(\r\n private rpc: Rpc,\r\n private http: Http\r\n ) {\r\n this.watcher = new Subject<RpcAzureOperationResult>();\r\n this.azureLogging = new AzureLogging();\r\n }\r\n\r\n /**\r\n * Initialize the azure manager\r\n */\r\n public initialize() {\r\n // When in Shell (the top window) do not register. Only extension register.\r\n if (MsftSme.isExtension()) {\r\n this.rpc.register(RpcAzureResponseKey.command, this.onRpcResponse.bind(this));\r\n }\r\n }\r\n\r\n /**\r\n * Get application from gateway\r\n */\r\n public getAppInfo(): Observable<any> {\r\n return this.sendRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetAadStatus\r\n });\r\n }\r\n\r\n /**\r\n * Open the register Aad dialog\r\n */\r\n public openRegisterAadDialog(): Observable<any> {\r\n return this.sendRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.OpenAzureDialog\r\n });\r\n }\r\n\r\n /**\r\n * Signs in user.\r\n */\r\n public signIn(): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.SignIn\r\n });\r\n }\r\n\r\n /**\r\n * Signs out user.\r\n */\r\n public signOut(): Observable<any> {\r\n return this.sendRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.SignOut\r\n });\r\n }\r\n\r\n /**\r\n * Switches user accounts.\r\n */\r\n public switchAccounts(): Observable<any> {\r\n throw new Error('To be implemented');\r\n }\r\n\r\n /**\r\n * Get user token from azure\r\n */\r\n public getToken(): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetAadToken\r\n });\r\n }\r\n\r\n /**\r\n * Get the Azure AD graph token from azure\r\n */\r\n public getGraphToken(): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetAadGraphToken\r\n });\r\n }\r\n\r\n /**\r\n * Get the Microsoft graph token from azure\r\n * @param scopes The set of permissions for which the token has to be requested.\r\n * https://docs.microsoft.com/en-us/graph/permissions-reference\r\n * A null value will request default scopes - openid and profile.\r\n */\r\n public getMicrosoftGraphToken(scopes: string[] = null): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetMicrosoftGraphToken,\r\n tokenScopes: scopes\r\n });\r\n }\r\n\r\n /**\r\n * Checks to see if user is signed in. Returns true if signed in, else false.\r\n */\r\n public checkUserSignedIn(): Observable<boolean> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.CheckUserSignedIn\r\n }).pipe(\r\n map(result => {\r\n const isSignedIn = result && result.appInfo && result.appInfo.token;\r\n return !!isSignedIn;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Get Azure subscriptions.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public getSubscriptions(integrationType?: AzureIntegrationType): Observable<SubscriptionsOperationResult> {\r\n let armEndpoint = null;\r\n const url = AzureConstants.azureSubscriptionUrl;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n return this.getRequestWithArmToken(url.format(armEndpoint), integrationType);\r\n }),\r\n map(result => {\r\n const response: SubscriptionsOperationResult = {\r\n httpStatusCode: result.status,\r\n value: result.response\r\n };\r\n return response;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Check whether a resource group exists or not.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public checkResourceGroupExists(subscriptionId: string, resourceGroupName: string, integrationType?: AzureIntegrationType): Observable<{ status: number }> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n return this.getArmToken();\r\n }),\r\n mergeMap(token => {\r\n const url = AzureConstants.resourceGroupUrl.format(armEndpoint, subscriptionId, resourceGroupName);\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.head(url, ajaxRequest);\r\n }),\r\n map(result => {\r\n return { status: result.status };\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Create or update (if it exists) resource group.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param body request body. Optional. See definition of ResourceGroupRequestBody for what fields can be inside this body.\r\n * If this is not provided, a default of { \\'location\\': \\'West US\\' } will be used.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public createResourceGroup(\r\n subscriptionId: string,\r\n resourceGroupName: string,\r\n body?: ResourceGroupRequestBody,\r\n integrationType?: AzureIntegrationType\r\n ): Observable<ResourceGroupOperationResult> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.resourceGroupUrl.format(armEndpoint, subscriptionId, resourceGroupName);\r\n if (!body) {\r\n body = <ResourceGroupRequestBody>{ location: 'West US' };\r\n }\r\n return this.putRequestWithArmToken(url, body, integrationType);\r\n }),\r\n map(result => {\r\n const response: ResourceGroupOperationResult = {\r\n httpStatusCode: result.status,\r\n value: result.response\r\n };\r\n return response;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * List all resource groups in a subscription.\r\n * @param subscriptionId The subscription id.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public getResourceGroups(subscriptionId: string, integrationType?: AzureIntegrationType): Observable<ResourceGroupsOperationResult> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.listResourceGroups.format(armEndpoint, subscriptionId);\r\n return this.getRequestWithArmToken(url, integrationType);\r\n }),\r\n map(result => {\r\n const response: ResourceGroupsOperationResult = {\r\n httpStatusCode: result.status,\r\n value: result.response\r\n };\r\n return response;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Delete resource group.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public deleteResourceGroup(subscriptionId: string, resourceGroupName: string, integrationType?: AzureIntegrationType): Observable<{ status: number }> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.resourceGroupUrl.format(armEndpoint, subscriptionId, resourceGroupName);\r\n return this.deleteRequestWithArmToken(url, integrationType);\r\n }),\r\n map(result => {\r\n // result.status will either be 200 or 202.\r\n return { status: result.status };\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Get all available geo-locations.\r\n * @param subscriptionId The subscription id.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public getAllAzureLocations(subscriptionId: string, integrationType?: AzureIntegrationType): Observable<LocationsOperationResult> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.getAllGeoLocations.format(armEndpoint, subscriptionId);\r\n return this.getRequestWithArmToken(url, integrationType);\r\n }),\r\n map(result => {\r\n const response: LocationsOperationResult = {\r\n httpStatusCode: result.status,\r\n value: result.response\r\n };\r\n return response;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Deploy resources with Resource Manager templates and Resource Manager REST API.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param deploymentName The deployment name.\r\n * @param resourceTemplate The resource template content.\r\n * @param templateParameters The resource template parameters.\r\n * @param deploymentMode The mode that is used to deploy resources.This value can be either Incremental or Complete.\r\n * In Incremental mode, resources are deployed without deleting existing resources that are not included in the template.\r\n In Complete mode, resources are deployed and existing resources in the resource group that are not included in the\r\n template are deleted.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public DeployAzureTemplate(\r\n subscriptionId: string,\r\n resourceGroupName: string,\r\n deploymentName: string,\r\n resourceTemplate: string,\r\n templateParameters: string,\r\n deploymentMode: string = 'Incremental',\r\n integrationType?: AzureIntegrationType\r\n ): Observable<DeploymentOperationResponse> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.ArmDeploymentUrl.format(armEndpoint, subscriptionId, resourceGroupName, deploymentName);\r\n const body: DeploymentOperationRequestBody = {\r\n properties: {\r\n template: JSON.parse(resourceTemplate),\r\n parameters: JSON.parse(templateParameters),\r\n mode: deploymentMode\r\n }\r\n };\r\n\r\n return this.putRequestWithArmToken(url, body, integrationType);\r\n }),\r\n tap(result => this.logTelemetry(result)),\r\n map(result => this.createDeploymentOperationResponse(result))\r\n );\r\n }\r\n\r\n /**\r\n * Validate resources with Resource Manager templates and Resource Manager REST API.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param deploymentName The deployment name.\r\n * @param resourceTemplate The resource template content.\r\n * @param templateParameters The resource template parameters.\r\n * @param deploymentMode The mode that is used to deploy resources.This value can be either Incremental or Complete.\r\n * In Incremental mode, resources are deployed without deleting existing resources that are not included in the template.\r\n In Complete mode, resources are deployed and existing resources in the resource group that are not included in the\r\n template are deleted.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public validateAzureTemplate(\r\n subscriptionId: string,\r\n resourceGroupName: string,\r\n deploymentName: string,\r\n resourceTemplate: string,\r\n templateParameters: string,\r\n deploymentMode: string = 'Incremental',\r\n integrationType?: AzureIntegrationType\r\n ): Observable<DeploymentOperationResponse> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.validateAzureTemplate.format(armEndpoint, subscriptionId, resourceGroupName, deploymentName);\r\n const body: DeploymentOperationRequestBody = {\r\n properties: {\r\n template: JSON.parse(resourceTemplate),\r\n parameters: JSON.parse(templateParameters),\r\n mode: deploymentMode\r\n }\r\n };\r\n\r\n return this.postRequestWithArmToken(url, body, integrationType);\r\n }),\r\n map(result => this.createDeploymentOperationResponse(result))\r\n );\r\n }\r\n\r\n /**\r\n * Creates azure request with headers\r\n * @param token bearer token for ARM request\r\n * @param options additional information that can be send in the headers of the request.\r\n * - additionalHeaders any headers besides 'Authorization'\r\n * - integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n * 'x-ms-client-request-id', 'x-ms-return-client-request-id', and 'Accept-Language'.\r\n * @return formatted AjaxRequest for an ARM call\r\n */\r\n public createRequestWithHeaders(\r\n token: string,\r\n options?: {\r\n additionalHeaders?: any;\r\n integrationType?: AzureIntegrationType;\r\n connectionProperties?: ConnectionProperties;\r\n }\r\n ): AjaxRequest {\r\n const ajaxRequest: AjaxRequest = <AjaxRequest>{ headers: {} };\r\n\r\n ajaxRequest.headers = (options && options.additionalHeaders) || {};\r\n (<any>ajaxRequest).headers[AzureConstants.authorizationHeaderKey] = AzureConstants.bearer + token;\r\n\r\n const integrationType = (options && options.integrationType) || ArmTelemetry.toIntegrationType(MsftSme.self().Init.moduleName);\r\n\r\n // TODO: Remove work around. Only intended for the quality release for Jan 2020.\r\n const connectionProperties = options && options.connectionProperties;\r\n (<any>ajaxRequest).headers[AzureConstants.clientRequestHeaderKey] = this.formatClientRequestId(integrationType, this.hexEncodeTelemetryData(connectionProperties));\r\n\r\n (<any>ajaxRequest).headers[AzureConstants.returnClientRequestHeaderKey] = 'True';\r\n (<any>ajaxRequest).headers[AzureConstants.acceptLanguageHeaderKey] = CoreEnvironment.localizationManager.getLocaleId().neutral;\r\n return ajaxRequest;\r\n }\r\n\r\n /**\r\n * Gets the arm token.\r\n */\r\n public getArmToken(): Observable<string> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetAadToken\r\n }).pipe(\r\n map(result => {\r\n return result && result.appInfo && result.appInfo.token;\r\n })\r\n );\r\n }\r\n\r\n // TODO: Remove work around. Only intended for the quality release for Jan 2020.\r\n /**\r\n * Parses connection properties for ARM telemetry data and encode in hex\r\n * @param connectionProperties properties on the current active connection\r\n * @return hex encoded json object.\r\n */\r\n public hexEncodeTelemetryData(connectionProperties?: ConnectionProperties): string {\r\n if (\r\n connectionProperties &&\r\n connectionProperties['operatingSystem'] &&\r\n connectionProperties['version'] &&\r\n connectionProperties['computerModel'] &&\r\n connectionProperties['computerManufacturer'] &&\r\n connectionProperties['isS2dEnabled'] != null\r\n ) {\r\n const telemetryData = {\r\n operatingSystem: connectionProperties['operatingSystem'],\r\n version: connectionProperties['version'],\r\n computerManufacturer: connectionProperties['computerManufacturer'],\r\n computerModel: connectionProperties['computerModel'],\r\n isS2dEnabled: connectionProperties['isS2dEnabled']\r\n };\r\n const stringifiedData = JSON.stringify(telemetryData);\r\n try {\r\n return MsftSme.toHex(stringifiedData);\r\n } catch {\r\n return null;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n // TODO: Remove work around. Only intended for the quality release for Jan 2020.\r\n private formatClientRequestId(integrationType: string, encodedData?: string): string {\r\n let clientRequestId = AzureConstants.clientRequestIdQualifier.format(MsftSme.newGuid());\r\n\r\n if (integrationType) {\r\n clientRequestId += AzureConstants.integrationTypeDataParameter.format(integrationType);\r\n }\r\n\r\n if (encodedData != null) {\r\n if (encodedData.length < AzureConstants.maxEncodedTelemetryDataLength) {\r\n clientRequestId += AzureConstants.telemetryDataParameter.format(encodedData);\r\n } else {\r\n clientRequestId += AzureConstants.telemetryDataParameter.format(AzureConstants.telemetryDataInvalidValue);\r\n }\r\n }\r\n\r\n // Ordering of parameters is important for parsing in telemetry pipeline.\r\n clientRequestId += AzureConstants.sourceParameter;\r\n\r\n return clientRequestId;\r\n }\r\n\r\n /**\r\n * Send request to RPC\r\n * @param request RpcAzureOperation\r\n */\r\n private sendRequest(request: RpcAzureOperation): Observable<any> {\r\n Logging.log({\r\n level: LogLevel.Debug,\r\n message: 'Sending request to AzureManagerShellService. Request:{0}'.format(JSON.stringify(request)),\r\n source: 'AzureManager'\r\n });\r\n\r\n return from(RpcAzureRequestClient.azureRequest(this.rpc, request)).pipe(\r\n mergeMap(() => this.watcher),\r\n filter(result => result.requestId === request.requestId),\r\n take(1),\r\n map(result => result)\r\n );\r\n }\r\n\r\n /**\r\n * Send token request to RPC\r\n * @param request RpcAzureOperation\r\n */\r\n private sendTokenRequest(request: RpcAzureOperation): Observable<any> {\r\n Logging.log({\r\n level: LogLevel.Debug,\r\n message: 'Sending request to AzureManagerShellService. Request:{0}'.format(JSON.stringify(request)),\r\n source: 'AzureManager'\r\n });\r\n\r\n return from(RpcAzureRequestClient.azureRequest(this.rpc, request)).pipe(\r\n mergeMap(() => this.watcher),\r\n filter(result => result.requestId === request.requestId),\r\n take(1),\r\n map(result => {\r\n if (result.appInfo) {\r\n return result;\r\n } else if (result.error) {\r\n throw new Error(result.error);\r\n }\r\n\r\n throw new Error(MsftSme.getStrings<Strings>().MsftSmeShell.Core.Rpc.Azure.Unexpected.Error.message);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Handles Rpc response.\r\n */\r\n private onRpcResponse(data: RpcAzureOperationResult): Promise<any> {\r\n this.watcher.next(data);\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Determine cloud specific ARM endpoint based on the cloud that gateway is registered to.\r\n * @param cloudName cloudName from gateway's app registration.\r\n * @returns Returns cloud specific ARM endpoint.\r\n */\r\n public getArmEndpoint(cloudNameParam: string): string {\r\n const cloudName = MsftSme.replaceAll(cloudNameParam, ' ', '').toLowerCase();\r\n\r\n if (cloudName === this.AzureGlobal) {\r\n return AzureConstants.azureGlobalArmEndpoint;\r\n } else if (cloudName === this.AzureChina) {\r\n return AzureConstants.azureChinaArmEndpoint;\r\n } else if (cloudName === this.AzureUSGov) {\r\n return AzureConstants.azureUSGovArmEndpoint;\r\n }\r\n }\r\n\r\n /**\r\n * Make a GET request using ARM token.\r\n * @param url endpoint for request\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public getRequestWithArmToken(url: string, integrationType?: AzureIntegrationType): Observable<AjaxResponse<any>> {\r\n return this.getArmToken().pipe(\r\n mergeMap(token => {\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.get(url, ajaxRequest);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Make a POST request using ARM token.\r\n * @param url endpoint for request\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public postRequestWithArmToken(url: string, body: any, integrationType?: AzureIntegrationType): Observable<AjaxResponse<any>> {\r\n return this.getArmToken().pipe(\r\n mergeMap(token => {\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.post(url, body, ajaxRequest);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Make a PUT request using ARM token.\r\n * @param url endpoint for request\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public putRequestWithArmToken(url: string, body: any, integrationType?: AzureIntegrationType): Observable<AjaxResponse<any>> {\r\n if (\r\n !MsftSme.self().Init.isProduction &&\r\n (url.includes(AzureConstants.azureGlobalArmEndpoint) || url.includes(AzureConstants.azureChinaArmEndpoint) || url.includes(AzureConstants.azureUSGovArmEndpoint)) &&\r\n url.includes(AzureConstants.resourceDeploymentSubstring)\r\n ) {\r\n Logging.logWarning('putRequestWithArmToken', 'Use DeployAzure Template to create resource.');\r\n }\r\n\r\n return this.getArmToken().pipe(\r\n mergeMap(token => {\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.put(url, body, ajaxRequest);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Make a DELETE request using ARM token.\r\n * @param url endpoint for request\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public deleteRequestWithArmToken(url: string, integrationType?: AzureIntegrationType): Observable<AjaxResponse<any>> {\r\n return this.getArmToken().pipe(\r\n mergeMap(token => {\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.delete(url, ajaxRequest);\r\n })\r\n );\r\n }\r\n\r\n public createDeploymentOperationResponse(result: AjaxResponse<any>): DeploymentOperationResponse {\r\n const headers = result.xhr.getAllResponseHeaders();\r\n const headerArray = headers && headers.trim().split(/[\\r\\n]+/);\r\n const headerMap: Map<string, string> = new Map<string, string>();\r\n headerArray.forEach((x: string) => {\r\n const parts = x.split(': ');\r\n const header = parts && parts.shift();\r\n const value = parts && parts.join(': ');\r\n headerMap.set(header, value);\r\n });\r\n\r\n const response: DeploymentOperationResponse = {\r\n httpStatusCode: result.status ? result.status : null,\r\n responseHeaders: headerMap ? headerMap : null,\r\n response: result.response ? result.response : null\r\n };\r\n\r\n return response;\r\n }\r\n\r\n public logTelemetry(response: any): void {\r\n response = response.response ? response.response : response;\r\n\r\n if (response && response.properties && response.properties.dependencies) {\r\n let dependentResourceIds = response.properties.dependencies;\r\n dependentResourceIds = dependentResourceIds.map(dependentResourceId => dependentResourceId.id);\r\n this.azureLogging.submitCreateResourceTelemetry(dependentResourceIds);\r\n } else {\r\n this.azureLogging.submitCreateResourceTelemetry();\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"azure-manager.js","sourceRoot":"","sources":["../../src/azure/azure-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EA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AAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;SACrD,CAAC;QAEF,OAAO,QAAQ,CAAC;IACpB,CAAC;IAEM,YAAY,CAAC,QAAa;QAC7B,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;QAE5D,IAAI,QAAQ,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;YACtE,IAAI,oBAAoB,GAAG,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC;YAC5D,oBAAoB,GAAG,oBAAoB,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC;YAC/F,IAAI,CAAC,YAAY,CAAC,6BAA6B,CAAC,oBAAoB,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,YAAY,CAAC,6BAA6B,EAAE,CAAC;QACtD,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { from, Observable, Subject, throwError } from 'rxjs';\r\nimport { AjaxRequest, AjaxResponse } from 'rxjs/ajax';\r\nimport { filter, map, mergeMap, take, tap } from 'rxjs/operators';\r\nimport { CoreEnvironment } from '../data/core-environment';\r\nimport { Http } from '../data/http';\r\nimport { LogLevel } from '../diagnostics/log-level';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport { Strings } from '../generated/strings';\r\nimport { RpcAzureOperation, RpcAzureOperationResult, RpcAzureOperationType, RpcAzureResponseKey } from '../rpc/azure/rpc-azure-model';\r\nimport { RpcAzureRequestClient } from '../rpc/azure/rpc-azure-request-client';\r\nimport { Rpc } from '../rpc/rpc';\r\nimport { ConnectionProperties } from '../security/connection';\r\nimport { ArmTelemetry, AzureConstants, AzureIntegrationType } from './azure-constants';\r\nimport { AzureLogging } from './azure-logging';\r\nimport { AadAppConfig, AzureRegistrationModel } from './models/aadAppConfig-data';\r\nimport { DeploymentOperationRequestBody } from './resources/deployment-operation-request-body';\r\nimport { DeploymentOperationResponse } from './resources/deployment-operation-response';\r\nimport { LocationsOperationResult } from './resources/location-data';\r\nimport { ResourceGroupOperationResult, ResourceGroupRequestBody, ResourceGroupsOperationResult } from './resources/resource-group-data';\r\nimport { SubscriptionsOperationResult } from './resources/subscription-data';\r\n\r\n/**\r\n * Azure Manager class. Handles detecting and configuring Azure on a set of servers.\r\n */\r\nexport class AzureManager {\r\n private watcher: Subject<RpcAzureOperationResult>;\r\n private azureLogging: AzureLogging;\r\n private readonly AzureGlobal = 'azureglobal';\r\n private readonly AzureChina = 'azurechina';\r\n private readonly AzureUSGov = 'azureusgov';\r\n\r\n /**\r\n * Initializes a new instance of the Azure Manager class\r\n * @param rpc The rpc to forward auth requests to a parent window\r\n */\r\n constructor(\r\n private rpc: Rpc,\r\n private http: Http\r\n ) {\r\n this.watcher = new Subject<RpcAzureOperationResult>();\r\n this.azureLogging = new AzureLogging();\r\n }\r\n\r\n /**\r\n * Initialize the azure manager\r\n */\r\n public initialize() {\r\n // When in Shell (the top window) do not register. Only extension register.\r\n if (MsftSme.isExtension()) {\r\n this.rpc.register(RpcAzureResponseKey.command, this.onRpcResponse.bind(this));\r\n }\r\n }\r\n\r\n /**\r\n * Get application from gateway\r\n */\r\n public getAppInfo(): Observable<any> {\r\n return this.sendRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetAadStatus\r\n });\r\n }\r\n\r\n /**\r\n * Gets how the gateway is registered with Azure: 'tenant_locked' (Azure RBAC) or 'app_rbac' (WAC RBAC).\r\n * Emits null when the gateway is not registered. Use this instead of checking `appId`, which is empty for\r\n * Azure RBAC registrations.\r\n */\r\n public getRegistrationModel(): Observable<AzureRegistrationModel | null> {\r\n return this.getAppInfo().pipe(\r\n map(result => {\r\n const appInfo: AadAppConfig = result && result.appInfo;\r\n return appInfo && appInfo.isRegistered && appInfo.registrationModel ? appInfo.registrationModel : null;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Open the register Aad dialog\r\n */\r\n public openRegisterAadDialog(): Observable<any> {\r\n return this.sendRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.OpenAzureDialog\r\n });\r\n }\r\n\r\n /**\r\n * Signs in user.\r\n */\r\n public signIn(): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.SignIn\r\n });\r\n }\r\n\r\n /**\r\n * Signs out user.\r\n */\r\n public signOut(): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.SignOut\r\n });\r\n }\r\n\r\n /**\r\n * Switches user accounts.\r\n */\r\n public switchAccounts(): Observable<any> {\r\n throw new Error('To be implemented');\r\n }\r\n\r\n /**\r\n * Get user token from azure\r\n * @param interactive Pass true when the request comes from a user action (for example a button click). When the\r\n * user has never signed in, the shell then asks them to go to Settings > Azure. Leave it unset for background\r\n * requests such as page loads.\r\n */\r\n public getToken(interactive?: boolean): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetAadToken,\r\n ...(interactive ? { interactive: true } : {})\r\n });\r\n }\r\n\r\n /**\r\n * Get the Azure AD graph token from azure\r\n */\r\n public getGraphToken(): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetAadGraphToken\r\n });\r\n }\r\n\r\n /**\r\n * Get the Microsoft graph token from azure\r\n * @param scopes The set of permissions for which the token has to be requested.\r\n * https://docs.microsoft.com/en-us/graph/permissions-reference\r\n * A null value will request default scopes - openid and profile.\r\n * @param interactive Pass true when the request comes from a user action. See {@link getToken}.\r\n */\r\n public getMicrosoftGraphToken(scopes: string[] = null, interactive?: boolean): Observable<any> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetMicrosoftGraphToken,\r\n tokenScopes: scopes,\r\n ...(interactive ? { interactive: true } : {})\r\n });\r\n }\r\n\r\n /**\r\n * Checks to see if user is signed in. Returns true if signed in, else false.\r\n */\r\n public checkUserSignedIn(): Observable<boolean> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.CheckUserSignedIn\r\n }).pipe(\r\n map(result => {\r\n const isSignedIn = result && result.appInfo && result.appInfo.token;\r\n return !!isSignedIn;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Get Azure subscriptions.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public getSubscriptions(integrationType?: AzureIntegrationType): Observable<SubscriptionsOperationResult> {\r\n let armEndpoint = null;\r\n const url = AzureConstants.azureSubscriptionUrl;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n return this.getRequestWithArmToken(url.format(armEndpoint), integrationType);\r\n }),\r\n map(result => {\r\n const response: SubscriptionsOperationResult = {\r\n httpStatusCode: result.status,\r\n value: result.response\r\n };\r\n return response;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Check whether a resource group exists or not.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public checkResourceGroupExists(subscriptionId: string, resourceGroupName: string, integrationType?: AzureIntegrationType): Observable<{ status: number }> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n return this.getArmToken();\r\n }),\r\n mergeMap(token => {\r\n const url = AzureConstants.resourceGroupUrl.format(armEndpoint, subscriptionId, resourceGroupName);\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.head(url, ajaxRequest);\r\n }),\r\n map(result => {\r\n return { status: result.status };\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Create or update (if it exists) resource group.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param body request body. Optional. See definition of ResourceGroupRequestBody for what fields can be inside this body.\r\n * If this is not provided, a default of { \\'location\\': \\'West US\\' } will be used.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public createResourceGroup(\r\n subscriptionId: string,\r\n resourceGroupName: string,\r\n body?: ResourceGroupRequestBody,\r\n integrationType?: AzureIntegrationType\r\n ): Observable<ResourceGroupOperationResult> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.resourceGroupUrl.format(armEndpoint, subscriptionId, resourceGroupName);\r\n if (!body) {\r\n body = <ResourceGroupRequestBody>{ location: 'West US' };\r\n }\r\n return this.putRequestWithArmToken(url, body, integrationType);\r\n }),\r\n map(result => {\r\n const response: ResourceGroupOperationResult = {\r\n httpStatusCode: result.status,\r\n value: result.response\r\n };\r\n return response;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * List all resource groups in a subscription.\r\n * @param subscriptionId The subscription id.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public getResourceGroups(subscriptionId: string, integrationType?: AzureIntegrationType): Observable<ResourceGroupsOperationResult> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.listResourceGroups.format(armEndpoint, subscriptionId);\r\n return this.getRequestWithArmToken(url, integrationType);\r\n }),\r\n map(result => {\r\n const response: ResourceGroupsOperationResult = {\r\n httpStatusCode: result.status,\r\n value: result.response\r\n };\r\n return response;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Delete resource group.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public deleteResourceGroup(subscriptionId: string, resourceGroupName: string, integrationType?: AzureIntegrationType): Observable<{ status: number }> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.resourceGroupUrl.format(armEndpoint, subscriptionId, resourceGroupName);\r\n return this.deleteRequestWithArmToken(url, integrationType);\r\n }),\r\n map(result => {\r\n // result.status will either be 200 or 202.\r\n return { status: result.status };\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Get all available geo-locations.\r\n * @param subscriptionId The subscription id.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public getAllAzureLocations(subscriptionId: string, integrationType?: AzureIntegrationType): Observable<LocationsOperationResult> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.getAllGeoLocations.format(armEndpoint, subscriptionId);\r\n return this.getRequestWithArmToken(url, integrationType);\r\n }),\r\n map(result => {\r\n const response: LocationsOperationResult = {\r\n httpStatusCode: result.status,\r\n value: result.response\r\n };\r\n return response;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Deploy resources with Resource Manager templates and Resource Manager REST API.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param deploymentName The deployment name.\r\n * @param resourceTemplate The resource template content.\r\n * @param templateParameters The resource template parameters.\r\n * @param deploymentMode The mode that is used to deploy resources.This value can be either Incremental or Complete.\r\n * In Incremental mode, resources are deployed without deleting existing resources that are not included in the template.\r\n In Complete mode, resources are deployed and existing resources in the resource group that are not included in the\r\n template are deleted.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public DeployAzureTemplate(\r\n subscriptionId: string,\r\n resourceGroupName: string,\r\n deploymentName: string,\r\n resourceTemplate: string,\r\n templateParameters: string,\r\n deploymentMode: string = 'Incremental',\r\n integrationType?: AzureIntegrationType\r\n ): Observable<DeploymentOperationResponse> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.ArmDeploymentUrl.format(armEndpoint, subscriptionId, resourceGroupName, deploymentName);\r\n const body: DeploymentOperationRequestBody = {\r\n properties: {\r\n template: JSON.parse(resourceTemplate),\r\n parameters: JSON.parse(templateParameters),\r\n mode: deploymentMode\r\n }\r\n };\r\n\r\n return this.putRequestWithArmToken(url, body, integrationType);\r\n }),\r\n tap(result => this.logTelemetry(result)),\r\n map(result => this.createDeploymentOperationResponse(result))\r\n );\r\n }\r\n\r\n /**\r\n * Validate resources with Resource Manager templates and Resource Manager REST API.\r\n * @param subscriptionId The subscription id.\r\n * @param resourceGroupName The resource group name.\r\n * @param deploymentName The deployment name.\r\n * @param resourceTemplate The resource template content.\r\n * @param templateParameters The resource template parameters.\r\n * @param deploymentMode The mode that is used to deploy resources.This value can be either Incremental or Complete.\r\n * In Incremental mode, resources are deployed without deleting existing resources that are not included in the template.\r\n In Complete mode, resources are deployed and existing resources in the resource group that are not included in the\r\n template are deleted.\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public validateAzureTemplate(\r\n subscriptionId: string,\r\n resourceGroupName: string,\r\n deploymentName: string,\r\n resourceTemplate: string,\r\n templateParameters: string,\r\n deploymentMode: string = 'Incremental',\r\n integrationType?: AzureIntegrationType\r\n ): Observable<DeploymentOperationResponse> {\r\n let armEndpoint = null;\r\n return this.getAppInfo().pipe(\r\n mergeMap(({ appInfo }: { appInfo: AadAppConfig }) => {\r\n if (appInfo) {\r\n armEndpoint = this.getArmEndpoint(appInfo.cloudName);\r\n } else {\r\n return throwError(() => new Error('Gateway is not registered to Azure.'));\r\n }\r\n\r\n const url = AzureConstants.validateAzureTemplate.format(armEndpoint, subscriptionId, resourceGroupName, deploymentName);\r\n const body: DeploymentOperationRequestBody = {\r\n properties: {\r\n template: JSON.parse(resourceTemplate),\r\n parameters: JSON.parse(templateParameters),\r\n mode: deploymentMode\r\n }\r\n };\r\n\r\n return this.postRequestWithArmToken(url, body, integrationType);\r\n }),\r\n map(result => this.createDeploymentOperationResponse(result))\r\n );\r\n }\r\n\r\n /**\r\n * Creates azure request with headers\r\n * @param token bearer token for ARM request\r\n * @param options additional information that can be send in the headers of the request.\r\n * - additionalHeaders any headers besides 'Authorization'\r\n * - integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n * 'x-ms-client-request-id', 'x-ms-return-client-request-id', and 'Accept-Language'.\r\n * @return formatted AjaxRequest for an ARM call\r\n */\r\n public createRequestWithHeaders(\r\n token: string,\r\n options?: {\r\n additionalHeaders?: any;\r\n integrationType?: AzureIntegrationType;\r\n connectionProperties?: ConnectionProperties;\r\n }\r\n ): AjaxRequest {\r\n const ajaxRequest: AjaxRequest = <AjaxRequest>{ headers: {} };\r\n\r\n ajaxRequest.headers = (options && options.additionalHeaders) || {};\r\n (<any>ajaxRequest).headers[AzureConstants.authorizationHeaderKey] = AzureConstants.bearer + token;\r\n\r\n const integrationType = (options && options.integrationType) || ArmTelemetry.toIntegrationType(MsftSme.self().Init.moduleName);\r\n\r\n // TODO: Remove work around. Only intended for the quality release for Jan 2020.\r\n const connectionProperties = options && options.connectionProperties;\r\n (<any>ajaxRequest).headers[AzureConstants.clientRequestHeaderKey] = this.formatClientRequestId(integrationType, this.hexEncodeTelemetryData(connectionProperties));\r\n\r\n (<any>ajaxRequest).headers[AzureConstants.returnClientRequestHeaderKey] = 'True';\r\n (<any>ajaxRequest).headers[AzureConstants.acceptLanguageHeaderKey] = CoreEnvironment.localizationManager.getLocaleId().neutral;\r\n return ajaxRequest;\r\n }\r\n\r\n /**\r\n * Gets the arm token.\r\n * @param interactive Pass true when the request comes from a user action. See {@link getToken}.\r\n */\r\n public getArmToken(interactive?: boolean): Observable<string> {\r\n return this.sendTokenRequest({\r\n requestId: MsftSme.newGuid(),\r\n operation: RpcAzureOperationType.GetAadToken,\r\n ...(interactive ? { interactive: true } : {})\r\n }).pipe(\r\n map(result => {\r\n return result && result.appInfo && result.appInfo.token;\r\n })\r\n );\r\n }\r\n\r\n // TODO: Remove work around. Only intended for the quality release for Jan 2020.\r\n /**\r\n * Parses connection properties for ARM telemetry data and encode in hex\r\n * @param connectionProperties properties on the current active connection\r\n * @return hex encoded json object.\r\n */\r\n public hexEncodeTelemetryData(connectionProperties?: ConnectionProperties): string {\r\n if (\r\n connectionProperties &&\r\n connectionProperties['operatingSystem'] &&\r\n connectionProperties['version'] &&\r\n connectionProperties['computerModel'] &&\r\n connectionProperties['computerManufacturer'] &&\r\n connectionProperties['isS2dEnabled'] != null\r\n ) {\r\n const telemetryData = {\r\n operatingSystem: connectionProperties['operatingSystem'],\r\n version: connectionProperties['version'],\r\n computerManufacturer: connectionProperties['computerManufacturer'],\r\n computerModel: connectionProperties['computerModel'],\r\n isS2dEnabled: connectionProperties['isS2dEnabled']\r\n };\r\n const stringifiedData = JSON.stringify(telemetryData);\r\n try {\r\n return MsftSme.toHex(stringifiedData);\r\n } catch {\r\n return null;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n // TODO: Remove work around. Only intended for the quality release for Jan 2020.\r\n private formatClientRequestId(integrationType: string, encodedData?: string): string {\r\n let clientRequestId = AzureConstants.clientRequestIdQualifier.format(MsftSme.newGuid());\r\n\r\n if (integrationType) {\r\n clientRequestId += AzureConstants.integrationTypeDataParameter.format(integrationType);\r\n }\r\n\r\n if (encodedData != null) {\r\n if (encodedData.length < AzureConstants.maxEncodedTelemetryDataLength) {\r\n clientRequestId += AzureConstants.telemetryDataParameter.format(encodedData);\r\n } else {\r\n clientRequestId += AzureConstants.telemetryDataParameter.format(AzureConstants.telemetryDataInvalidValue);\r\n }\r\n }\r\n\r\n // Ordering of parameters is important for parsing in telemetry pipeline.\r\n clientRequestId += AzureConstants.sourceParameter;\r\n\r\n return clientRequestId;\r\n }\r\n\r\n /**\r\n * Send request to RPC\r\n * @param request RpcAzureOperation\r\n */\r\n private sendRequest(request: RpcAzureOperation): Observable<any> {\r\n Logging.log({\r\n level: LogLevel.Debug,\r\n message: 'Sending request to AzureManagerShellService. Request:{0}'.format(JSON.stringify(request)),\r\n source: 'AzureManager'\r\n });\r\n\r\n return from(RpcAzureRequestClient.azureRequest(this.rpc, request)).pipe(\r\n mergeMap(() => this.watcher),\r\n filter(result => result.requestId === request.requestId),\r\n take(1),\r\n map(result => result)\r\n );\r\n }\r\n\r\n /**\r\n * Send token request to RPC\r\n * @param request RpcAzureOperation\r\n */\r\n private sendTokenRequest(request: RpcAzureOperation): Observable<any> {\r\n Logging.log({\r\n level: LogLevel.Debug,\r\n message: 'Sending request to AzureManagerShellService. Request:{0}'.format(JSON.stringify(request)),\r\n source: 'AzureManager'\r\n });\r\n\r\n return from(RpcAzureRequestClient.azureRequest(this.rpc, request)).pipe(\r\n mergeMap(() => this.watcher),\r\n filter(result => result.requestId === request.requestId),\r\n take(1),\r\n map(result => {\r\n if (result.error) {\r\n throw new Error(result.error);\r\n }\r\n if (result.appInfo) {\r\n return result;\r\n }\r\n\r\n throw new Error(MsftSme.getStrings<Strings>().MsftSmeShell.Core.Rpc.Azure.Unexpected.Error.message);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Handles Rpc response.\r\n */\r\n private onRpcResponse(data: RpcAzureOperationResult): Promise<any> {\r\n this.watcher.next(data);\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Determine cloud specific ARM endpoint based on the cloud that gateway is registered to.\r\n * @param cloudName cloudName from gateway's app registration.\r\n * @returns Returns cloud specific ARM endpoint.\r\n */\r\n public getArmEndpoint(cloudNameParam: string): string {\r\n const cloudName = MsftSme.replaceAll(cloudNameParam, ' ', '').toLowerCase();\r\n\r\n if (cloudName === this.AzureGlobal) {\r\n return AzureConstants.azureGlobalArmEndpoint;\r\n } else if (cloudName === this.AzureChina) {\r\n return AzureConstants.azureChinaArmEndpoint;\r\n } else if (cloudName === this.AzureUSGov) {\r\n return AzureConstants.azureUSGovArmEndpoint;\r\n }\r\n }\r\n\r\n /**\r\n * Make a GET request using ARM token.\r\n * @param url endpoint for request\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public getRequestWithArmToken(url: string, integrationType?: AzureIntegrationType): Observable<AjaxResponse<any>> {\r\n return this.getArmToken().pipe(\r\n mergeMap(token => {\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.get(url, ajaxRequest);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Make a POST request using ARM token.\r\n * @param url endpoint for request\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public postRequestWithArmToken(url: string, body: any, integrationType?: AzureIntegrationType): Observable<AjaxResponse<any>> {\r\n return this.getArmToken().pipe(\r\n mergeMap(token => {\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.post(url, body, ajaxRequest);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Make a PUT request using ARM token.\r\n * @param url endpoint for request\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public putRequestWithArmToken(url: string, body: any, integrationType?: AzureIntegrationType): Observable<AjaxResponse<any>> {\r\n if (\r\n !MsftSme.self().Init.isProduction &&\r\n (url.includes(AzureConstants.azureGlobalArmEndpoint) || url.includes(AzureConstants.azureChinaArmEndpoint) || url.includes(AzureConstants.azureUSGovArmEndpoint)) &&\r\n url.includes(AzureConstants.resourceDeploymentSubstring)\r\n ) {\r\n Logging.logWarning('putRequestWithArmToken', 'Use DeployAzure Template to create resource.');\r\n }\r\n\r\n return this.getArmToken().pipe(\r\n mergeMap(token => {\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.put(url, body, ajaxRequest);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Make a DELETE request using ARM token.\r\n * @param url endpoint for request\r\n * @param integrationType integration type is used to distinguish which Azure tool/service in Windows Admin Center is making a\r\n * Azure resource management (ARM) call. If only one repository has one tool/service, this will be inferred based\r\n * on the name of the module. If a repository has more than one tool/service then the integration type needs to be\r\n * explicitly set.\r\n */\r\n public deleteRequestWithArmToken(url: string, integrationType?: AzureIntegrationType): Observable<AjaxResponse<any>> {\r\n return this.getArmToken().pipe(\r\n mergeMap(token => {\r\n const ajaxRequest = this.createRequestWithHeaders(token, { integrationType: integrationType });\r\n return this.http.delete(url, ajaxRequest);\r\n })\r\n );\r\n }\r\n\r\n public createDeploymentOperationResponse(result: AjaxResponse<any>): DeploymentOperationResponse {\r\n const headers = result.xhr.getAllResponseHeaders();\r\n const headerArray = headers && headers.trim().split(/[\\r\\n]+/);\r\n const headerMap: Map<string, string> = new Map<string, string>();\r\n headerArray.forEach((x: string) => {\r\n const parts = x.split(': ');\r\n const header = parts && parts.shift();\r\n const value = parts && parts.join(': ');\r\n headerMap.set(header, value);\r\n });\r\n\r\n const response: DeploymentOperationResponse = {\r\n httpStatusCode: result.status ? result.status : null,\r\n responseHeaders: headerMap ? headerMap : null,\r\n response: result.response ? result.response : null\r\n };\r\n\r\n return response;\r\n }\r\n\r\n public logTelemetry(response: any): void {\r\n response = response.response ? response.response : response;\r\n\r\n if (response && response.properties && response.properties.dependencies) {\r\n let dependentResourceIds = response.properties.dependencies;\r\n dependentResourceIds = dependentResourceIds.map(dependentResourceId => dependentResourceId.id);\r\n this.azureLogging.submitCreateResourceTelemetry(dependentResourceIds);\r\n } else {\r\n this.azureLogging.submitCreateResourceTelemetry();\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the gateway is registered with Azure.
|
|
3
|
+
* - `tenant_locked`: Azure RBAC. Users sign in through the Windows Admin Center app; there is no customer app,
|
|
4
|
+
* so `appId`/`clientId`/`appDisplayName` are empty.
|
|
5
|
+
* - `app_rbac`: WAC RBAC. Access is controlled by the customer's own app; `appId`/`appDisplayName` identify it.
|
|
6
|
+
*/
|
|
7
|
+
export type AzureRegistrationModel = 'tenant_locked' | 'app_rbac';
|
|
1
8
|
export interface AadAppConfig {
|
|
9
|
+
/**
|
|
10
|
+
* True when the gateway is registered with Azure. Use this (not `appId`) to decide whether the gateway is
|
|
11
|
+
* registered: `appId` is empty for Azure RBAC registrations.
|
|
12
|
+
*/
|
|
13
|
+
isRegistered?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* How the gateway is registered. See {@link AzureRegistrationModel}.
|
|
16
|
+
*/
|
|
17
|
+
registrationModel?: AzureRegistrationModel;
|
|
2
18
|
/**
|
|
3
19
|
* The (Azure) cloud name.
|
|
4
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aadAppConfig-data.d.ts","sourceRoot":"","sources":["../../../src/azure/models/aadAppConfig-data.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC5B"}
|
|
1
|
+
{"version":3,"file":"aadAppConfig-data.d.ts","sourceRoot":"","sources":["../../../src/azure/models/aadAppConfig-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG,UAAU,CAAC;AAElE,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;IAE3C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aadAppConfig-data.js","sourceRoot":"","sources":["../../../src/azure/models/aadAppConfig-data.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"aadAppConfig-data.js","sourceRoot":"","sources":["../../../src/azure/models/aadAppConfig-data.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * How the gateway is registered with Azure.\r\n * - `tenant_locked`: Azure RBAC. Users sign in through the Windows Admin Center app; there is no customer app,\r\n * so `appId`/`clientId`/`appDisplayName` are empty.\r\n * - `app_rbac`: WAC RBAC. Access is controlled by the customer's own app; `appId`/`appDisplayName` identify it.\r\n */\r\nexport type AzureRegistrationModel = 'tenant_locked' | 'app_rbac';\r\n\r\nexport interface AadAppConfig {\r\n /**\r\n * True when the gateway is registered with Azure. Use this (not `appId`) to decide whether the gateway is\r\n * registered: `appId` is empty for Azure RBAC registrations.\r\n */\r\n isRegistered?: boolean;\r\n\r\n /**\r\n * How the gateway is registered. See {@link AzureRegistrationModel}.\r\n */\r\n registrationModel?: AzureRegistrationModel;\r\n\r\n /**\r\n * The (Azure) cloud name.\r\n */\r\n cloudName: string;\r\n\r\n /**\r\n * The Azure tenant.\r\n */\r\n tenant: string;\r\n\r\n /**\r\n * The Azure tenant Id. Same as Tenant. Maintained for backwards compatiblity.\r\n */\r\n tenantId: string;\r\n\r\n /**\r\n * The client id.\r\n */\r\n clientId: string;\r\n\r\n /**\r\n * The AAD application id.\r\n */\r\n appId: string;\r\n\r\n /**\r\n * The AAD application display name.\r\n */\r\n appDisplayName: string;\r\n\r\n /**\r\n * The AAD application app verify address.\r\n */\r\n appVerifyAddress: string;\r\n}\r\n"]}
|
|
@@ -263,7 +263,7 @@ declare namespace MsftSme {
|
|
|
263
263
|
};
|
|
264
264
|
};
|
|
265
265
|
environmentMode?: 'standard' | 'virtualization';
|
|
266
|
-
virtualizationView?: 'compute' | 'storage' | '
|
|
266
|
+
virtualizationView?: 'compute' | 'storage' | 'network';
|
|
267
267
|
}
|
|
268
268
|
/**
|
|
269
269
|
* Electron Renderer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot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