@azure/arm-appconfiguration 3.0.0-beta.4 → 3.0.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +1 -1
  3. package/dist/index.js +32 -4
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/configurationStoresCreateSample.js +3 -3
  8. package/dist-esm/samples-dev/configurationStoresDeleteSample.js +1 -1
  9. package/dist-esm/samples-dev/configurationStoresGetDeletedSample.js +1 -1
  10. package/dist-esm/samples-dev/configurationStoresGetSample.js +1 -1
  11. package/dist-esm/samples-dev/configurationStoresListByResourceGroupSample.js +1 -1
  12. package/dist-esm/samples-dev/configurationStoresListDeletedSample.js +1 -1
  13. package/dist-esm/samples-dev/configurationStoresListKeysSample.js +1 -1
  14. package/dist-esm/samples-dev/configurationStoresListSample.js +1 -1
  15. package/dist-esm/samples-dev/configurationStoresPurgeDeletedSample.js +1 -1
  16. package/dist-esm/samples-dev/configurationStoresRegenerateKeySample.js +1 -1
  17. package/dist-esm/samples-dev/configurationStoresUpdateSample.js +3 -3
  18. package/dist-esm/samples-dev/keyValuesCreateOrUpdateSample.js +1 -1
  19. package/dist-esm/samples-dev/keyValuesDeleteSample.js +1 -1
  20. package/dist-esm/samples-dev/keyValuesGetSample.js +1 -1
  21. package/dist-esm/samples-dev/keyValuesListByConfigurationStoreSample.js +1 -1
  22. package/dist-esm/samples-dev/operationsCheckNameAvailabilitySample.js +2 -2
  23. package/dist-esm/samples-dev/operationsRegionalCheckNameAvailabilitySample.js +2 -2
  24. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
  25. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
  26. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
  27. package/dist-esm/samples-dev/privateEndpointConnectionsListByConfigurationStoreSample.js +1 -1
  28. package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +1 -1
  29. package/dist-esm/samples-dev/privateLinkResourcesListByConfigurationStoreSample.js +1 -1
  30. package/dist-esm/src/appConfigurationManagementClient.d.ts +2 -0
  31. package/dist-esm/src/appConfigurationManagementClient.d.ts.map +1 -1
  32. package/dist-esm/src/appConfigurationManagementClient.js +31 -2
  33. package/dist-esm/src/appConfigurationManagementClient.js.map +1 -1
  34. package/dist-esm/src/models/parameters.js +1 -1
  35. package/dist-esm/src/models/parameters.js.map +1 -1
  36. package/dist-esm/test/sampleTest.js +11 -13
  37. package/dist-esm/test/sampleTest.js.map +1 -1
  38. package/package.json +9 -5
  39. package/src/appConfigurationManagementClient.ts +36 -2
  40. package/src/models/parameters.ts +1 -1
  41. package/types/arm-appconfiguration.d.ts +2 -0
  42. package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Release History
2
2
 
3
- ## 3.0.0-beta.4 (2022-04-14)
3
+ ## 3.0.0 (2022-06-10)
4
4
 
5
- The package of @azure/arm-appconfiguration is using our next generation design principles since version 3.0.0-beta.4, which contains breaking changes.
5
+ The package of @azure/arm-appconfiguration is using our next generation design principles since version 3.0.0, which contains breaking changes.
6
6
 
7
7
  To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
8
8
 
package/README.md CHANGED
@@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
6
6
 
7
7
  [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/arm-appconfiguration) |
8
8
  [Package (NPM)](https://www.npmjs.com/package/@azure/arm-appconfiguration) |
9
- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appconfiguration?view=azure-node-preview) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appconfiguration) |
10
10
  [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
11
11
 
12
12
  ## Getting started
package/dist/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var tslib = require('tslib');
5
6
  var coreClient = require('@azure/core-client');
6
7
  var coreRestPipeline = require('@azure/core-rest-pipeline');
7
- var tslib = require('tslib');
8
8
  var coreLro = require('@azure/core-lro');
9
9
 
10
10
  function _interopNamespace(e) {
@@ -1482,7 +1482,7 @@ const subscriptionId = {
1482
1482
  const apiVersion = {
1483
1483
  parameterPath: "apiVersion",
1484
1484
  mapper: {
1485
- defaultValue: "2021-10-01-preview",
1485
+ defaultValue: "2022-05-01",
1486
1486
  isConstant: true,
1487
1487
  serializedName: "api-version",
1488
1488
  type: {
@@ -3495,7 +3495,7 @@ class AppConfigurationManagementClient extends coreClient__namespace.ServiceClie
3495
3495
  requestContentType: "application/json; charset=utf-8",
3496
3496
  credential: credentials
3497
3497
  };
3498
- const packageDetails = `azsdk-js-arm-appconfiguration/3.0.0-beta.4`;
3498
+ const packageDetails = `azsdk-js-arm-appconfiguration/3.0.0`;
3499
3499
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3500
3500
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3501
3501
  : `${packageDetails}`;
@@ -3526,12 +3526,40 @@ class AppConfigurationManagementClient extends coreClient__namespace.ServiceClie
3526
3526
  this.subscriptionId = subscriptionId;
3527
3527
  // Assigning values to Constant parameters
3528
3528
  this.$host = options.$host || "https://management.azure.com";
3529
- this.apiVersion = options.apiVersion || "2021-10-01-preview";
3529
+ this.apiVersion = options.apiVersion || "2022-05-01";
3530
3530
  this.configurationStores = new ConfigurationStoresImpl(this);
3531
3531
  this.operations = new OperationsImpl(this);
3532
3532
  this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
3533
3533
  this.privateLinkResources = new PrivateLinkResourcesImpl(this);
3534
3534
  this.keyValues = new KeyValuesImpl(this);
3535
+ this.addCustomApiVersionPolicy(options.apiVersion);
3536
+ }
3537
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
3538
+ addCustomApiVersionPolicy(apiVersion) {
3539
+ if (!apiVersion) {
3540
+ return;
3541
+ }
3542
+ const apiVersionPolicy = {
3543
+ name: "CustomApiVersionPolicy",
3544
+ sendRequest(request, next) {
3545
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3546
+ const param = request.url.split("?");
3547
+ if (param.length > 1) {
3548
+ const newParams = param[1].split("&").map((item) => {
3549
+ if (item.indexOf("api-version") > -1) {
3550
+ return item.replace(/(?<==).*$/, apiVersion);
3551
+ }
3552
+ else {
3553
+ return item;
3554
+ }
3555
+ });
3556
+ request.url = param[0] + "?" + newParams.join("&");
3557
+ }
3558
+ return next(request);
3559
+ });
3560
+ }
3561
+ };
3562
+ this.pipeline.addPolicy(apiVersionPolicy);
3535
3563
  }
3536
3564
  }
3537
3565