@azure/arm-securityinsight 1.0.0-alpha.20220420.2 → 1.0.0-beta.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Release History
2
2
 
3
+ ## 1.0.0-beta.3 (2022-05-16)
4
+
5
+ **Features**
6
+
7
+ - Added Type Alias ProvisioningState
8
+ - Type Alias Watchlist has a new parameter sasUri
9
+ - Type Alias Watchlist has a new parameter provisioningState
10
+ - Added Enum KnownProvisioningState
11
+
12
+ **Breaking Changes**
13
+
14
+ - Type Alias WatchlistItem no longer has parameter itemsKeyValue
15
+ - Type Alias WatchlistItem no longer has parameter entityMapping
16
+
17
+
3
18
  ## 1.0.0-beta.2 (2022-03-17)
4
19
 
5
20
  **Features**
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var coreClient = require('@azure/core-client');
6
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
6
7
  var tslib = require('tslib');
7
8
 
8
9
  function _interopNamespace(e) {
@@ -24,6 +25,7 @@ function _interopNamespace(e) {
24
25
  }
25
26
 
26
27
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
28
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
27
29
 
28
30
  /*
29
31
  * Copyright (c) Microsoft Corporation.
@@ -435,6 +437,14 @@ exports.KnownSourceType = void 0;
435
437
  KnownSourceType["LocalFile"] = "Local file";
436
438
  KnownSourceType["RemoteStorage"] = "Remote storage";
437
439
  })(exports.KnownSourceType || (exports.KnownSourceType = {}));
440
+ /** Known values of {@link ProvisioningState} that the service accepts. */
441
+ exports.KnownProvisioningState = void 0;
442
+ (function (KnownProvisioningState) {
443
+ KnownProvisioningState["Succeeded"] = "Succeeded";
444
+ KnownProvisioningState["Failed"] = "Failed";
445
+ KnownProvisioningState["Canceled"] = "Canceled";
446
+ KnownProvisioningState["InProgress"] = "InProgress";
447
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
438
448
  /** Known values of {@link DataConnectorKind} that the service accepts. */
439
449
  exports.KnownDataConnectorKind = void 0;
440
450
  (function (KnownDataConnectorKind) {
@@ -10163,6 +10173,11 @@ const Watchlist = {
10163
10173
  type: {
10164
10174
  name: "String"
10165
10175
  }
10176
+ }, sasUri: {
10177
+ serializedName: "properties.sasUri",
10178
+ type: {
10179
+ name: "String"
10180
+ }
10166
10181
  }, itemsSearchKey: {
10167
10182
  serializedName: "properties.itemsSearchKey",
10168
10183
  type: {
@@ -10178,6 +10193,12 @@ const Watchlist = {
10178
10193
  type: {
10179
10194
  name: "String"
10180
10195
  }
10196
+ }, provisioningState: {
10197
+ serializedName: "properties.provisioningState",
10198
+ readOnly: true,
10199
+ type: {
10200
+ name: "String"
10201
+ }
10181
10202
  } })
10182
10203
  }
10183
10204
  };
@@ -21305,6 +21326,7 @@ class SecurityInsights extends coreClient__namespace.ServiceClient {
21305
21326
  * @param options The parameter options
21306
21327
  */
21307
21328
  constructor(credentials, subscriptionId, options) {
21329
+ var _a, _b;
21308
21330
  if (credentials === undefined) {
21309
21331
  throw new Error("'credentials' cannot be null");
21310
21332
  }
@@ -21319,7 +21341,7 @@ class SecurityInsights extends coreClient__namespace.ServiceClient {
21319
21341
  requestContentType: "application/json; charset=utf-8",
21320
21342
  credential: credentials
21321
21343
  };
21322
- const packageDetails = `azsdk-js-arm-securityinsight/1.0.0-beta.2`;
21344
+ const packageDetails = `azsdk-js-arm-securityinsight/1.0.0-beta.3`;
21323
21345
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
21324
21346
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
21325
21347
  : `${packageDetails}`;
@@ -21328,8 +21350,24 @@ class SecurityInsights extends coreClient__namespace.ServiceClient {
21328
21350
  }
21329
21351
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
21330
21352
  userAgentPrefix
21331
- }, baseUri: options.endpoint || "https://management.azure.com" });
21353
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
21332
21354
  super(optionsWithDefaults);
21355
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
21356
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
21357
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
21358
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
21359
+ if (!bearerTokenAuthenticationPolicyFound) {
21360
+ this.pipeline.removePolicy({
21361
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
21362
+ });
21363
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
21364
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
21365
+ challengeCallbacks: {
21366
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
21367
+ }
21368
+ }));
21369
+ }
21370
+ }
21333
21371
  // Parameter assignments
21334
21372
  this.subscriptionId = subscriptionId;
21335
21373
  // Assigning values to Constant parameters