@azure/arm-extendedlocation 1.0.0-beta.3 → 1.0.0-beta.4
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 +14 -4
- package/LICENSE +4 -4
- package/README.md +26 -17
- package/{dist-esm/src → dist/browser}/customLocationsManagementClient.d.ts +2 -2
- package/dist/browser/customLocationsManagementClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/customLocationsManagementClient.js +31 -24
- package/dist/browser/customLocationsManagementClient.js.map +1 -0
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/index.js +4 -4
- package/dist/browser/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/lroImpl.js +13 -9
- package/dist/browser/lroImpl.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/index.d.ts +20 -20
- package/{dist-esm/src → dist/browser}/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/mappers.js +55 -25
- package/dist/browser/models/mappers.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/parameters.js +1 -1
- package/dist/browser/models/parameters.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/customLocations.d.ts +3 -3
- package/dist/browser/operations/customLocations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/customLocations.js +170 -228
- package/dist/browser/operations/customLocations.js.map +1 -0
- package/dist/browser/operations/index.d.ts +3 -0
- package/{dist-esm/src → dist/browser}/operations/index.d.ts.map +1 -1
- package/{dist-esm/src/operationsInterfaces → dist/browser/operations}/index.js +2 -2
- package/dist/browser/operations/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/resourceSyncRules.d.ts +3 -3
- package/dist/browser/operations/resourceSyncRules.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/resourceSyncRules.js +110 -123
- package/dist/browser/operations/resourceSyncRules.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/customLocations.d.ts +1 -1
- package/dist/browser/operationsInterfaces/customLocations.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/customLocations.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +3 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
- package/{dist-esm/src/operations → dist/browser/operationsInterfaces}/index.js +2 -2
- package/dist/browser/operationsInterfaces/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/resourceSyncRules.d.ts +1 -1
- package/dist/browser/operationsInterfaces/resourceSyncRules.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/resourceSyncRules.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/{dist-esm/src → dist/browser}/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -0
- package/dist/commonjs/customLocationsManagementClient.d.ts +21 -0
- package/dist/commonjs/customLocationsManagementClient.d.ts.map +1 -0
- package/dist/commonjs/customLocationsManagementClient.js +113 -0
- package/dist/commonjs/customLocationsManagementClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lroImpl.d.ts +16 -0
- package/dist/commonjs/lroImpl.d.ts.map +1 -0
- package/dist/commonjs/lroImpl.js +37 -0
- package/dist/commonjs/lroImpl.js.map +1 -0
- package/{types/arm-extendedlocation.d.ts → dist/commonjs/models/index.d.ts} +541 -790
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +37 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.d.ts +26 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/models/mappers.js +810 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.d.ts +27 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/models/parameters.js +188 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/dist/commonjs/operations/customLocations.d.ts +155 -0
- package/dist/commonjs/operations/customLocations.d.ts.map +1 -0
- package/dist/commonjs/operations/customLocations.js +704 -0
- package/dist/commonjs/operations/customLocations.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +3 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -0
- package/dist/commonjs/operations/index.js +13 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/dist/commonjs/operations/resourceSyncRules.d.ts +97 -0
- package/dist/commonjs/operations/resourceSyncRules.d.ts.map +1 -0
- package/dist/commonjs/operations/resourceSyncRules.js +403 -0
- package/dist/commonjs/operations/resourceSyncRules.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/customLocations.d.ts +86 -0
- package/dist/commonjs/operationsInterfaces/customLocations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/customLocations.js +10 -0
- package/dist/commonjs/operationsInterfaces/customLocations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.js +13 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/resourceSyncRules.d.ts +71 -0
- package/dist/commonjs/operationsInterfaces/resourceSyncRules.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/resourceSyncRules.js +10 -0
- package/dist/commonjs/operationsInterfaces/resourceSyncRules.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/pagingHelper.d.ts +13 -0
- package/dist/commonjs/pagingHelper.d.ts.map +1 -0
- package/dist/commonjs/pagingHelper.js +34 -0
- package/dist/commonjs/pagingHelper.js.map +1 -0
- package/{types → dist/commonjs}/tsdoc-metadata.json +11 -11
- package/dist/esm/customLocationsManagementClient.d.ts +21 -0
- package/dist/esm/customLocationsManagementClient.d.ts.map +1 -0
- package/dist/esm/customLocationsManagementClient.js +108 -0
- package/dist/esm/customLocationsManagementClient.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{src/index.ts → dist/esm/index.js} +5 -5
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lroImpl.d.ts +16 -0
- package/dist/esm/lroImpl.d.ts.map +1 -0
- package/dist/esm/lroImpl.js +33 -0
- package/dist/esm/lroImpl.js.map +1 -0
- package/dist/esm/models/index.d.ts +541 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +34 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +26 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/dist/esm/models/mappers.js +807 -0
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +27 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/dist/esm/models/parameters.js +185 -0
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/customLocations.d.ts +155 -0
- package/dist/esm/operations/customLocations.d.ts.map +1 -0
- package/dist/esm/operations/customLocations.js +699 -0
- package/dist/esm/operations/customLocations.js.map +1 -0
- package/dist/esm/operations/index.d.ts +3 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/dist/esm/operations/index.js +10 -0
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/resourceSyncRules.d.ts +97 -0
- package/dist/esm/operations/resourceSyncRules.d.ts.map +1 -0
- package/dist/esm/operations/resourceSyncRules.js +398 -0
- package/dist/esm/operations/resourceSyncRules.js.map +1 -0
- package/dist/esm/operationsInterfaces/customLocations.d.ts +86 -0
- package/dist/esm/operationsInterfaces/customLocations.d.ts.map +1 -0
- package/{src/operations/index.ts → dist/esm/operationsInterfaces/customLocations.js} +2 -3
- package/dist/esm/operationsInterfaces/customLocations.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +3 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/index.js +10 -0
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/resourceSyncRules.d.ts +71 -0
- package/dist/esm/operationsInterfaces/resourceSyncRules.d.ts.map +1 -0
- package/{src/operationsInterfaces/index.ts → dist/esm/operationsInterfaces/resourceSyncRules.js} +2 -3
- package/dist/esm/operationsInterfaces/resourceSyncRules.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pagingHelper.d.ts +13 -0
- package/dist/esm/pagingHelper.d.ts.map +1 -0
- package/dist/esm/pagingHelper.js +30 -0
- package/dist/esm/pagingHelper.js.map +1 -0
- package/dist/react-native/customLocationsManagementClient.d.ts +21 -0
- package/dist/react-native/customLocationsManagementClient.d.ts.map +1 -0
- package/dist/react-native/customLocationsManagementClient.js +108 -0
- package/dist/react-native/customLocationsManagementClient.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +13 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/lroImpl.d.ts +16 -0
- package/dist/react-native/lroImpl.d.ts.map +1 -0
- package/dist/react-native/lroImpl.js +33 -0
- package/dist/react-native/lroImpl.js.map +1 -0
- package/dist/react-native/models/index.d.ts +541 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +34 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/mappers.d.ts +26 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -0
- package/dist/react-native/models/mappers.js +807 -0
- package/dist/react-native/models/mappers.js.map +1 -0
- package/dist/react-native/models/parameters.d.ts +27 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -0
- package/dist/react-native/models/parameters.js +185 -0
- package/dist/react-native/models/parameters.js.map +1 -0
- package/dist/react-native/operations/customLocations.d.ts +155 -0
- package/dist/react-native/operations/customLocations.d.ts.map +1 -0
- package/dist/react-native/operations/customLocations.js +699 -0
- package/dist/react-native/operations/customLocations.js.map +1 -0
- package/dist/react-native/operations/index.d.ts +3 -0
- package/dist/react-native/operations/index.d.ts.map +1 -0
- package/dist/react-native/operations/index.js +10 -0
- package/dist/react-native/operations/index.js.map +1 -0
- package/dist/react-native/operations/resourceSyncRules.d.ts +97 -0
- package/dist/react-native/operations/resourceSyncRules.d.ts.map +1 -0
- package/dist/react-native/operations/resourceSyncRules.js +398 -0
- package/dist/react-native/operations/resourceSyncRules.js.map +1 -0
- package/dist/react-native/operationsInterfaces/customLocations.d.ts +86 -0
- package/dist/react-native/operationsInterfaces/customLocations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/customLocations.js +9 -0
- package/dist/react-native/operationsInterfaces/customLocations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/index.js +10 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/operationsInterfaces/resourceSyncRules.d.ts +71 -0
- package/dist/react-native/operationsInterfaces/resourceSyncRules.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/resourceSyncRules.js +9 -0
- package/dist/react-native/operationsInterfaces/resourceSyncRules.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/pagingHelper.d.ts +13 -0
- package/dist/react-native/pagingHelper.d.ts.map +1 -0
- package/dist/react-native/pagingHelper.js +30 -0
- package/dist/react-native/pagingHelper.js.map +1 -0
- package/package.json +87 -78
- package/dist/index.js +0 -2315
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.js +0 -50
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsDeleteSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsDeleteSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsDeleteSample.js +0 -39
- package/dist-esm/samples-dev/customLocationsDeleteSample.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.js +0 -42
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsGetSample.js +0 -39
- package/dist-esm/samples-dev/customLocationsGetSample.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.js +0 -52
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.js +0 -51
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.js +0 -53
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsListOperationsSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsListOperationsSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsListOperationsSample.js +0 -51
- package/dist-esm/samples-dev/customLocationsListOperationsSample.js.map +0 -1
- package/dist-esm/samples-dev/customLocationsUpdateSample.d.ts +0 -2
- package/dist-esm/samples-dev/customLocationsUpdateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/customLocationsUpdateSample.js +0 -42
- package/dist-esm/samples-dev/customLocationsUpdateSample.js.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.d.ts +0 -2
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.js +0 -49
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.js.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.d.ts +0 -2
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.js +0 -40
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.js.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.js +0 -40
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.js.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.d.ts +0 -2
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.js +0 -53
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.js.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.d.ts +0 -2
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.js +0 -42
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.js.map +0 -1
- package/dist-esm/src/customLocationsManagementClient.d.ts.map +0 -1
- package/dist-esm/src/customLocationsManagementClient.js.map +0 -1
- package/dist-esm/src/index.d.ts +0 -6
- package/dist-esm/src/index.d.ts.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/lroImpl.js.map +0 -1
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/models/mappers.js.map +0 -1
- package/dist-esm/src/models/parameters.js.map +0 -1
- package/dist-esm/src/operations/customLocations.d.ts.map +0 -1
- package/dist-esm/src/operations/customLocations.js.map +0 -1
- package/dist-esm/src/operations/index.d.ts +0 -3
- package/dist-esm/src/operations/index.js.map +0 -1
- package/dist-esm/src/operations/resourceSyncRules.d.ts.map +0 -1
- package/dist-esm/src/operations/resourceSyncRules.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/customLocations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/customLocations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +0 -3
- package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.js.map +0 -1
- package/dist-esm/src/pagingHelper.js.map +0 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
- package/rollup.config.js +0 -122
- package/src/customLocationsManagementClient.ts +0 -142
- package/src/lroImpl.ts +0 -34
- package/src/models/index.ts +0 -606
- package/src/models/mappers.ts +0 -832
- package/src/models/parameters.ts +0 -225
- package/src/operations/customLocations.ts +0 -977
- package/src/operations/resourceSyncRules.ts +0 -575
- package/src/operationsInterfaces/customLocations.ts +0 -160
- package/src/operationsInterfaces/resourceSyncRules.ts +0 -136
- package/src/pagingHelper.ts +0 -39
- package/tsconfig.json +0 -33
- /package/{dist-esm/src → dist/browser}/lroImpl.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/lroImpl.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/models/parameters.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/customLocations.js +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/resourceSyncRules.js +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts.map +0 -0
- /package/review/{arm-extendedlocation.api.md → arm-extendedlocation-node.api.md} +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*
|
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CustomLocationsManagementClient = void 0;
|
|
11
|
+
const tslib_1 = require("tslib");
|
|
12
|
+
const coreClient = tslib_1.__importStar(require("@azure/core-client"));
|
|
13
|
+
const coreRestPipeline = tslib_1.__importStar(require("@azure/core-rest-pipeline"));
|
|
14
|
+
const index_js_1 = require("./operations/index.js");
|
|
15
|
+
class CustomLocationsManagementClient extends coreClient.ServiceClient {
|
|
16
|
+
$host;
|
|
17
|
+
apiVersion;
|
|
18
|
+
subscriptionId;
|
|
19
|
+
/**
|
|
20
|
+
* Initializes a new instance of the CustomLocationsManagementClient class.
|
|
21
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
22
|
+
* @param subscriptionId The ID of the target subscription.
|
|
23
|
+
* @param options The parameter options
|
|
24
|
+
*/
|
|
25
|
+
constructor(credentials, subscriptionId, options) {
|
|
26
|
+
if (credentials === undefined) {
|
|
27
|
+
throw new Error("'credentials' cannot be null");
|
|
28
|
+
}
|
|
29
|
+
if (subscriptionId === undefined) {
|
|
30
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
31
|
+
}
|
|
32
|
+
// Initializing default values for options
|
|
33
|
+
if (!options) {
|
|
34
|
+
options = {};
|
|
35
|
+
}
|
|
36
|
+
const defaults = {
|
|
37
|
+
requestContentType: "application/json; charset=utf-8",
|
|
38
|
+
credential: credentials
|
|
39
|
+
};
|
|
40
|
+
const packageDetails = `azsdk-js-arm-extendedlocation/1.0.0-beta.4`;
|
|
41
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
42
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
43
|
+
: `${packageDetails}`;
|
|
44
|
+
const optionsWithDefaults = {
|
|
45
|
+
...defaults,
|
|
46
|
+
...options,
|
|
47
|
+
userAgentOptions: {
|
|
48
|
+
userAgentPrefix
|
|
49
|
+
},
|
|
50
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
51
|
+
};
|
|
52
|
+
super(optionsWithDefaults);
|
|
53
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
54
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
55
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
56
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
57
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
58
|
+
}
|
|
59
|
+
if (!options ||
|
|
60
|
+
!options.pipeline ||
|
|
61
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
62
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
63
|
+
this.pipeline.removePolicy({
|
|
64
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
65
|
+
});
|
|
66
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
67
|
+
credential: credentials,
|
|
68
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
69
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
70
|
+
challengeCallbacks: {
|
|
71
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
// Parameter assignments
|
|
76
|
+
this.subscriptionId = subscriptionId;
|
|
77
|
+
// Assigning values to Constant parameters
|
|
78
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
79
|
+
this.apiVersion = options.apiVersion || "2021-08-31-preview";
|
|
80
|
+
this.customLocations = new index_js_1.CustomLocationsImpl(this);
|
|
81
|
+
this.resourceSyncRules = new index_js_1.ResourceSyncRulesImpl(this);
|
|
82
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
83
|
+
}
|
|
84
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
85
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
86
|
+
if (!apiVersion) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const apiVersionPolicy = {
|
|
90
|
+
name: "CustomApiVersionPolicy",
|
|
91
|
+
async sendRequest(request, next) {
|
|
92
|
+
const param = request.url.split("?");
|
|
93
|
+
if (param.length > 1) {
|
|
94
|
+
const newParams = param[1].split("&").map((item) => {
|
|
95
|
+
if (item.indexOf("api-version") > -1) {
|
|
96
|
+
return "api-version=" + apiVersion;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
return item;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
103
|
+
}
|
|
104
|
+
return next(request);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
108
|
+
}
|
|
109
|
+
customLocations;
|
|
110
|
+
resourceSyncRules;
|
|
111
|
+
}
|
|
112
|
+
exports.CustomLocationsManagementClient = CustomLocationsManagementClient;
|
|
113
|
+
//# sourceMappingURL=customLocationsManagementClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLocationsManagementClient.js","sourceRoot":"","sources":["../../src/customLocationsManagementClient.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { CustomLocationsImpl, ResourceSyncRulesImpl } from \"./operations/index.js\";\nimport { CustomLocations, ResourceSyncRules } from \"./operationsInterfaces/index.js\";\nimport { CustomLocationsManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class CustomLocationsManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the CustomLocationsManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: CustomLocationsManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: CustomLocationsManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-extendedlocation/1.0.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2021-08-31-preview\";\n this.customLocations = new CustomLocationsImpl(this);\n this.resourceSyncRules = new ResourceSyncRulesImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n customLocations: CustomLocations;\n resourceSyncRules: ResourceSyncRules;\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { getContinuationToken } from "./pagingHelper.js";
|
|
2
|
+
export * from "./models/index.js";
|
|
3
|
+
export { CustomLocationsManagementClient } from "./customLocationsManagementClient.js";
|
|
4
|
+
export * from "./operationsInterfaces/index.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*
|
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CustomLocationsManagementClient = exports.getContinuationToken = void 0;
|
|
11
|
+
const tslib_1 = require("tslib");
|
|
12
|
+
/// <reference lib="esnext.asynciterable" />
|
|
13
|
+
var pagingHelper_js_1 = require("./pagingHelper.js");
|
|
14
|
+
Object.defineProperty(exports, "getContinuationToken", { enumerable: true, get: function () { return pagingHelper_js_1.getContinuationToken; } });
|
|
15
|
+
tslib_1.__exportStar(require("./models/index.js"), exports);
|
|
16
|
+
var customLocationsManagementClient_js_1 = require("./customLocationsManagementClient.js");
|
|
17
|
+
Object.defineProperty(exports, "CustomLocationsManagementClient", { enumerable: true, get: function () { return customLocationsManagementClient_js_1.CustomLocationsManagementClient; } });
|
|
18
|
+
tslib_1.__exportStar(require("./operationsInterfaces/index.js"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,4CAA4C;AAC5C,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA;AAC7B,4DAAkC;AAClC,2FAAuF;AAA9E,qJAAA,+BAA+B,OAAA;AACxC,0EAAgD","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { CustomLocationsManagementClient } from \"./customLocationsManagementClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
2
|
+
export declare class LroImpl<T> implements LongRunningOperation<T> {
|
|
3
|
+
private sendOperationFn;
|
|
4
|
+
private args;
|
|
5
|
+
private spec;
|
|
6
|
+
requestPath: string;
|
|
7
|
+
requestMethod: string;
|
|
8
|
+
constructor(sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>, args: Record<string, unknown>, spec: {
|
|
9
|
+
readonly requestBody?: unknown;
|
|
10
|
+
readonly path?: string;
|
|
11
|
+
readonly httpMethod: string;
|
|
12
|
+
} & Record<string, any>, requestPath?: string, requestMethod?: string);
|
|
13
|
+
sendInitialRequest(): Promise<LroResponse<T>>;
|
|
14
|
+
sendPollRequest(path: string): Promise<LroResponse<T>>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=lroImpl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE,qBAAa,OAAO,CAAC,CAAC,CAAE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAEtD,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,IAAI;IAKL,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,MAAM;gBARpB,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAClE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,IAAI,EAAE;QACZ,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChB,WAAW,GAAE,MAAmB,EAChC,aAAa,GAAE,MAAwB;IAEnC,kBAAkB,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAG7C,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAQpE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*
|
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.LroImpl = void 0;
|
|
11
|
+
class LroImpl {
|
|
12
|
+
sendOperationFn;
|
|
13
|
+
args;
|
|
14
|
+
spec;
|
|
15
|
+
requestPath;
|
|
16
|
+
requestMethod;
|
|
17
|
+
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
18
|
+
this.sendOperationFn = sendOperationFn;
|
|
19
|
+
this.args = args;
|
|
20
|
+
this.spec = spec;
|
|
21
|
+
this.requestPath = requestPath;
|
|
22
|
+
this.requestMethod = requestMethod;
|
|
23
|
+
}
|
|
24
|
+
async sendInitialRequest() {
|
|
25
|
+
return this.sendOperationFn(this.args, this.spec);
|
|
26
|
+
}
|
|
27
|
+
async sendPollRequest(path) {
|
|
28
|
+
const { requestBody, ...restSpec } = this.spec;
|
|
29
|
+
return this.sendOperationFn(this.args, {
|
|
30
|
+
...restSpec,
|
|
31
|
+
path,
|
|
32
|
+
httpMethod: "GET"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.LroImpl = LroImpl;
|
|
37
|
+
//# sourceMappingURL=lroImpl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH,MAAa,OAAO;IAER;IACA;IACA;IAKD;IACA;IATT,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE;YACrC,GAAG,QAAQ;YACX,IAAI;YACJ,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF;AAvBD,0BAuBC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}
|