@azure/arm-features 3.1.1-alpha.20250123.1 → 3.1.1-alpha.20250127.2
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/{dist-esm/src → dist/browser}/featureClient.d.ts +2 -2
- package/dist/browser/featureClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/featureClient.js +19 -21
- package/dist/browser/featureClient.js.map +1 -0
- package/dist/browser/index.d.ts +5 -0
- package/{dist-esm/src → dist/browser}/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/index.js +4 -4
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/models/index.js.map +1 -0
- 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/features.d.ts +3 -3
- package/dist/browser/operations/features.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/features.js +3 -3
- package/dist/browser/operations/features.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 → dist/browser}/operations/index.js +2 -2
- package/dist/browser/operations/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/subscriptionFeatureRegistrations.d.ts +3 -3
- package/dist/browser/operations/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/subscriptionFeatureRegistrations.js +3 -3
- package/dist/browser/operations/subscriptionFeatureRegistrations.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/features.d.ts +1 -1
- package/dist/browser/operationsInterfaces/features.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/features.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/browser/operationsInterfaces/index.js +10 -0
- package/dist/browser/operationsInterfaces/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/subscriptionFeatureRegistrations.d.ts +1 -1
- package/dist/browser/operationsInterfaces/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/subscriptionFeatureRegistrations.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/pagingHelper.js.map +1 -0
- package/dist/commonjs/featureClient.d.ts +40 -0
- package/dist/commonjs/featureClient.d.ts.map +1 -0
- package/dist/commonjs/featureClient.js +217 -0
- package/dist/commonjs/featureClient.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/models/index.d.ts +323 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +39 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.d.ts +15 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/models/mappers.js +427 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.d.ts +13 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/models/parameters.js +122 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/dist/commonjs/operations/features.d.ts +76 -0
- package/dist/commonjs/operations/features.d.ts.map +1 -0
- package/dist/commonjs/operations/features.js +354 -0
- package/dist/commonjs/operations/features.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/subscriptionFeatureRegistrations.d.ts +74 -0
- package/dist/commonjs/operations/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/dist/commonjs/operations/subscriptionFeatureRegistrations.js +353 -0
- package/dist/commonjs/operations/subscriptionFeatureRegistrations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/features.d.ts +39 -0
- package/dist/commonjs/operationsInterfaces/features.d.ts.map +1 -0
- package/{dist-esm/src/operationsInterfaces/index.js → dist/commonjs/operationsInterfaces/features.js} +3 -3
- package/dist/commonjs/operationsInterfaces/features.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/subscriptionFeatureRegistrations.d.ts +38 -0
- package/dist/commonjs/operationsInterfaces/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/subscriptionFeatureRegistrations.js +10 -0
- package/dist/commonjs/operationsInterfaces/subscriptionFeatureRegistrations.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 +36 -0
- package/dist/commonjs/pagingHelper.js.map +1 -0
- package/dist/esm/featureClient.d.ts +40 -0
- package/dist/esm/featureClient.d.ts.map +1 -0
- package/dist/esm/featureClient.js +213 -0
- package/dist/esm/featureClient.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/models/index.d.ts +323 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +36 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +15 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/dist/esm/models/mappers.js +424 -0
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +13 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/dist/esm/models/parameters.js +119 -0
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/features.d.ts +76 -0
- package/dist/esm/operations/features.d.ts.map +1 -0
- package/dist/esm/operations/features.js +350 -0
- package/dist/esm/operations/features.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/subscriptionFeatureRegistrations.d.ts +74 -0
- package/dist/esm/operations/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/dist/esm/operations/subscriptionFeatureRegistrations.js +349 -0
- package/dist/esm/operations/subscriptionFeatureRegistrations.js.map +1 -0
- package/dist/esm/operationsInterfaces/features.d.ts +39 -0
- package/dist/esm/operationsInterfaces/features.d.ts.map +1 -0
- package/{src/operations/index.ts → dist/esm/operationsInterfaces/features.js} +2 -3
- package/dist/esm/operationsInterfaces/features.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/subscriptionFeatureRegistrations.d.ts +38 -0
- package/dist/esm/operationsInterfaces/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/{src/operationsInterfaces/index.ts → dist/esm/operationsInterfaces/subscriptionFeatureRegistrations.js} +2 -3
- package/dist/esm/operationsInterfaces/subscriptionFeatureRegistrations.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 +32 -0
- package/dist/esm/pagingHelper.js.map +1 -0
- package/dist/react-native/featureClient.d.ts +40 -0
- package/dist/react-native/featureClient.d.ts.map +1 -0
- package/dist/react-native/featureClient.js +213 -0
- package/dist/react-native/featureClient.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/models/index.d.ts +323 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +36 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/mappers.d.ts +15 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -0
- package/dist/react-native/models/mappers.js +424 -0
- package/dist/react-native/models/mappers.js.map +1 -0
- package/dist/react-native/models/parameters.d.ts +13 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -0
- package/dist/react-native/models/parameters.js +119 -0
- package/dist/react-native/models/parameters.js.map +1 -0
- package/dist/react-native/operations/features.d.ts +76 -0
- package/dist/react-native/operations/features.d.ts.map +1 -0
- package/dist/react-native/operations/features.js +350 -0
- package/dist/react-native/operations/features.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/subscriptionFeatureRegistrations.d.ts +74 -0
- package/dist/react-native/operations/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/dist/react-native/operations/subscriptionFeatureRegistrations.js +349 -0
- package/dist/react-native/operations/subscriptionFeatureRegistrations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/features.d.ts +39 -0
- package/dist/react-native/operationsInterfaces/features.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/features.js +9 -0
- package/dist/react-native/operationsInterfaces/features.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/subscriptionFeatureRegistrations.d.ts +38 -0
- package/dist/react-native/operationsInterfaces/subscriptionFeatureRegistrations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/subscriptionFeatureRegistrations.js +9 -0
- package/dist/react-native/operationsInterfaces/subscriptionFeatureRegistrations.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 +32 -0
- package/dist/react-native/pagingHelper.js.map +1 -0
- package/package.json +64 -34
- package/dist/index.js +0 -1555
- 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/featuresGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/featuresGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/featuresGetSample.js +0 -31
- package/dist-esm/samples-dev/featuresGetSample.js.map +0 -1
- package/dist-esm/samples-dev/featuresListAllSample.d.ts +0 -2
- package/dist-esm/samples-dev/featuresListAllSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/featuresListAllSample.js +0 -45
- package/dist-esm/samples-dev/featuresListAllSample.js.map +0 -1
- package/dist-esm/samples-dev/featuresListSample.d.ts +0 -2
- package/dist-esm/samples-dev/featuresListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/featuresListSample.js +0 -46
- package/dist-esm/samples-dev/featuresListSample.js.map +0 -1
- package/dist-esm/samples-dev/featuresRegisterSample.d.ts +0 -2
- package/dist-esm/samples-dev/featuresRegisterSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/featuresRegisterSample.js +0 -31
- package/dist-esm/samples-dev/featuresRegisterSample.js.map +0 -1
- package/dist-esm/samples-dev/featuresUnregisterSample.d.ts +0 -2
- package/dist-esm/samples-dev/featuresUnregisterSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/featuresUnregisterSample.js +0 -31
- package/dist-esm/samples-dev/featuresUnregisterSample.js.map +0 -1
- package/dist-esm/samples-dev/listOperationsSample.d.ts +0 -2
- package/dist-esm/samples-dev/listOperationsSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/listOperationsSample.js +0 -45
- package/dist-esm/samples-dev/listOperationsSample.js.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsCreateOrUpdateSample.d.ts +0 -2
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsCreateOrUpdateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsCreateOrUpdateSample.js +0 -37
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsCreateOrUpdateSample.js.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsDeleteSample.d.ts +0 -2
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsDeleteSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsDeleteSample.js +0 -31
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsDeleteSample.js.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsGetSample.js +0 -31
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsGetSample.js.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsListAllBySubscriptionSample.d.ts +0 -2
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsListAllBySubscriptionSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsListAllBySubscriptionSample.js +0 -45
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsListAllBySubscriptionSample.js.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsListBySubscriptionSample.d.ts +0 -2
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsListBySubscriptionSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsListBySubscriptionSample.js +0 -46
- package/dist-esm/samples-dev/subscriptionFeatureRegistrationsListBySubscriptionSample.js.map +0 -1
- package/dist-esm/src/featureClient.d.ts.map +0 -1
- package/dist-esm/src/featureClient.js.map +0 -1
- package/dist-esm/src/index.d.ts +0 -5
- package/dist-esm/src/index.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/features.d.ts.map +0 -1
- package/dist-esm/src/operations/features.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/subscriptionFeatureRegistrations.d.ts.map +0 -1
- package/dist-esm/src/operations/subscriptionFeatureRegistrations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/features.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/features.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/subscriptionFeatureRegistrations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/subscriptionFeatureRegistrations.js.map +0 -1
- package/dist-esm/src/pagingHelper.js.map +0 -1
- package/dist-esm/test/features_example.spec.d.ts +0 -4
- package/dist-esm/test/features_example.spec.d.ts.map +0 -1
- package/dist-esm/test/features_example.spec.js +0 -121
- package/dist-esm/test/features_example.spec.js.map +0 -1
- package/src/featureClient.ts +0 -276
- package/src/models/index.ts +0 -379
- package/src/models/mappers.ts +0 -441
- package/src/models/parameters.ts +0 -135
- package/src/operations/features.ts +0 -426
- package/src/operations/subscriptionFeatureRegistrations.ts +0 -434
- package/src/operationsInterfaces/features.ts +0 -75
- package/src/operationsInterfaces/subscriptionFeatureRegistrations.ts +0 -73
- package/src/pagingHelper.ts +0 -39
- package/tsconfig.json +0 -33
- package/types/arm-features.d.ts +0 -492
- /package/{dist-esm/src → dist/browser}/models/index.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/index.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/mappers.js +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/features.js +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/subscriptionFeatureRegistrations.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/{dist-esm/src → dist/browser}/pagingHelper.js +0 -0
- /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagingHelper.d.ts","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,QAAQ;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKtE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACpC,IAAI,CAON"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
const pageMap = new WeakMap();
|
|
9
|
+
/**
|
|
10
|
+
* Given a result page from a pageable operation, returns a
|
|
11
|
+
* continuation token that can be used to begin paging from
|
|
12
|
+
* that point later.
|
|
13
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
14
|
+
* @returns The continuation token that can be passed into byPage().
|
|
15
|
+
*/
|
|
16
|
+
export function getContinuationToken(page) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (typeof page !== "object" || page === null) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
22
|
+
}
|
|
23
|
+
export function setContinuationToken(page, continuationToken) {
|
|
24
|
+
var _a;
|
|
25
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
29
|
+
pageInfo.continuationToken = continuationToken;
|
|
30
|
+
pageMap.set(page, pageInfo);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=pagingHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as coreClient from "@azure/core-client";
|
|
2
|
+
import * as coreAuth from "@azure/core-auth";
|
|
3
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
4
|
+
import { Features, SubscriptionFeatureRegistrations } from "./operationsInterfaces/index.js";
|
|
5
|
+
import { FeatureClientOptionalParams, Operation, ListOperationsOptionalParams } from "./models/index.js";
|
|
6
|
+
export declare class FeatureClient extends coreClient.ServiceClient {
|
|
7
|
+
$host: string;
|
|
8
|
+
apiVersion: string;
|
|
9
|
+
subscriptionId: string;
|
|
10
|
+
/**
|
|
11
|
+
* Initializes a new instance of the FeatureClient class.
|
|
12
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
13
|
+
* @param subscriptionId The Azure subscription ID.
|
|
14
|
+
* @param options The parameter options
|
|
15
|
+
*/
|
|
16
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: FeatureClientOptionalParams);
|
|
17
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
18
|
+
private addCustomApiVersionPolicy;
|
|
19
|
+
/**
|
|
20
|
+
* Lists all of the available Microsoft.Features REST API operations.
|
|
21
|
+
* @param options The options parameters.
|
|
22
|
+
*/
|
|
23
|
+
listOperations(options?: ListOperationsOptionalParams): PagedAsyncIterableIterator<Operation>;
|
|
24
|
+
private listOperationsPagingPage;
|
|
25
|
+
private listOperationsPagingAll;
|
|
26
|
+
/**
|
|
27
|
+
* Lists all of the available Microsoft.Features REST API operations.
|
|
28
|
+
* @param options The options parameters.
|
|
29
|
+
*/
|
|
30
|
+
private _listOperations;
|
|
31
|
+
/**
|
|
32
|
+
* ListOperationsNext
|
|
33
|
+
* @param nextLink The nextLink from the previous successful call to the ListOperations method.
|
|
34
|
+
* @param options The options parameters.
|
|
35
|
+
*/
|
|
36
|
+
private _listOperationsNext;
|
|
37
|
+
features: Features;
|
|
38
|
+
subscriptionFeatureRegistrations: SubscriptionFeatureRegistrations;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=featureClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featureClient.d.ts","sourceRoot":"","sources":["../../src/featureClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAM9E,OAAO,EACL,QAAQ,EACR,gCAAgC,EACjC,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EACL,2BAA2B,EAC3B,SAAS,EAET,4BAA4B,EAG7B,MAAM,mBAAmB,CAAC;AAG3B,qBAAa,aAAc,SAAQ,UAAU,CAAC,aAAa;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,2BAA2B;IA+EvC,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC;;;OAGG;IACI,cAAc,CACnB,OAAO,CAAC,EAAE,4BAA4B,GACrC,0BAA0B,CAAC,SAAS,CAAC;YAkBzB,wBAAwB;YAsBxB,uBAAuB;IAQtC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAMvB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAU3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,gCAAgC,EAAE,gCAAgC,CAAC;CACpE"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
11
|
+
import { setContinuationToken } from "./pagingHelper.js";
|
|
12
|
+
import { FeaturesImpl, SubscriptionFeatureRegistrationsImpl } from "./operations/index.js";
|
|
13
|
+
import * as Parameters from "./models/parameters.js";
|
|
14
|
+
import * as Mappers from "./models/mappers.js";
|
|
15
|
+
/// <reference lib="esnext.asynciterable" />
|
|
16
|
+
export class FeatureClient extends coreClient.ServiceClient {
|
|
17
|
+
/**
|
|
18
|
+
* Initializes a new instance of the FeatureClient class.
|
|
19
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
20
|
+
* @param subscriptionId The Azure subscription ID.
|
|
21
|
+
* @param options The parameter options
|
|
22
|
+
*/
|
|
23
|
+
constructor(credentials, subscriptionId, options) {
|
|
24
|
+
var _a, _b, _c;
|
|
25
|
+
if (credentials === undefined) {
|
|
26
|
+
throw new Error("'credentials' cannot be null");
|
|
27
|
+
}
|
|
28
|
+
if (subscriptionId === undefined) {
|
|
29
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
30
|
+
}
|
|
31
|
+
// Initializing default values for options
|
|
32
|
+
if (!options) {
|
|
33
|
+
options = {};
|
|
34
|
+
}
|
|
35
|
+
const defaults = {
|
|
36
|
+
requestContentType: "application/json; charset=utf-8",
|
|
37
|
+
credential: credentials
|
|
38
|
+
};
|
|
39
|
+
const packageDetails = `azsdk-js-arm-features/3.1.1`;
|
|
40
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
41
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
42
|
+
: `${packageDetails}`;
|
|
43
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
44
|
+
userAgentPrefix
|
|
45
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
46
|
+
super(optionsWithDefaults);
|
|
47
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
48
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
49
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
50
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
51
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
52
|
+
}
|
|
53
|
+
if (!options ||
|
|
54
|
+
!options.pipeline ||
|
|
55
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
56
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
57
|
+
this.pipeline.removePolicy({
|
|
58
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
59
|
+
});
|
|
60
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
61
|
+
credential: credentials,
|
|
62
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
63
|
+
challengeCallbacks: {
|
|
64
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
// Parameter assignments
|
|
69
|
+
this.subscriptionId = subscriptionId;
|
|
70
|
+
// Assigning values to Constant parameters
|
|
71
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
72
|
+
this.apiVersion = options.apiVersion || "2021-07-01";
|
|
73
|
+
this.features = new FeaturesImpl(this);
|
|
74
|
+
this.subscriptionFeatureRegistrations = new SubscriptionFeatureRegistrationsImpl(this);
|
|
75
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
76
|
+
}
|
|
77
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
78
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
79
|
+
if (!apiVersion) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const apiVersionPolicy = {
|
|
83
|
+
name: "CustomApiVersionPolicy",
|
|
84
|
+
async sendRequest(request, next) {
|
|
85
|
+
const param = request.url.split("?");
|
|
86
|
+
if (param.length > 1) {
|
|
87
|
+
const newParams = param[1].split("&").map((item) => {
|
|
88
|
+
if (item.indexOf("api-version") > -1) {
|
|
89
|
+
return "api-version=" + apiVersion;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
return item;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
96
|
+
}
|
|
97
|
+
return next(request);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Lists all of the available Microsoft.Features REST API operations.
|
|
104
|
+
* @param options The options parameters.
|
|
105
|
+
*/
|
|
106
|
+
listOperations(options) {
|
|
107
|
+
const iter = this.listOperationsPagingAll(options);
|
|
108
|
+
return {
|
|
109
|
+
next() {
|
|
110
|
+
return iter.next();
|
|
111
|
+
},
|
|
112
|
+
[Symbol.asyncIterator]() {
|
|
113
|
+
return this;
|
|
114
|
+
},
|
|
115
|
+
byPage: (settings) => {
|
|
116
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
117
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
118
|
+
}
|
|
119
|
+
return this.listOperationsPagingPage(options, settings);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
listOperationsPagingPage(options, settings) {
|
|
124
|
+
return __asyncGenerator(this, arguments, function* listOperationsPagingPage_1() {
|
|
125
|
+
let result;
|
|
126
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
127
|
+
if (!continuationToken) {
|
|
128
|
+
result = yield __await(this._listOperations(options));
|
|
129
|
+
let page = result.value || [];
|
|
130
|
+
continuationToken = result.nextLink;
|
|
131
|
+
setContinuationToken(page, continuationToken);
|
|
132
|
+
yield yield __await(page);
|
|
133
|
+
}
|
|
134
|
+
while (continuationToken) {
|
|
135
|
+
result = yield __await(this._listOperationsNext(continuationToken, options));
|
|
136
|
+
continuationToken = result.nextLink;
|
|
137
|
+
let page = result.value || [];
|
|
138
|
+
setContinuationToken(page, continuationToken);
|
|
139
|
+
yield yield __await(page);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
listOperationsPagingAll(options) {
|
|
144
|
+
return __asyncGenerator(this, arguments, function* listOperationsPagingAll_1() {
|
|
145
|
+
var _a, e_1, _b, _c;
|
|
146
|
+
try {
|
|
147
|
+
for (var _d = true, _e = __asyncValues(this.listOperationsPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
148
|
+
_c = _f.value;
|
|
149
|
+
_d = false;
|
|
150
|
+
const page = _c;
|
|
151
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
155
|
+
finally {
|
|
156
|
+
try {
|
|
157
|
+
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
158
|
+
}
|
|
159
|
+
finally { if (e_1) throw e_1.error; }
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Lists all of the available Microsoft.Features REST API operations.
|
|
165
|
+
* @param options The options parameters.
|
|
166
|
+
*/
|
|
167
|
+
_listOperations(options) {
|
|
168
|
+
return this.sendOperationRequest({ options }, listOperationsOperationSpec);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* ListOperationsNext
|
|
172
|
+
* @param nextLink The nextLink from the previous successful call to the ListOperations method.
|
|
173
|
+
* @param options The options parameters.
|
|
174
|
+
*/
|
|
175
|
+
_listOperationsNext(nextLink, options) {
|
|
176
|
+
return this.sendOperationRequest({ nextLink, options }, listOperationsNextOperationSpec);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// Operation Specifications
|
|
180
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
181
|
+
const listOperationsOperationSpec = {
|
|
182
|
+
path: "/providers/Microsoft.Features/operations",
|
|
183
|
+
httpMethod: "GET",
|
|
184
|
+
responses: {
|
|
185
|
+
200: {
|
|
186
|
+
bodyMapper: Mappers.OperationListResult
|
|
187
|
+
},
|
|
188
|
+
default: {
|
|
189
|
+
bodyMapper: Mappers.ErrorResponse
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
queryParameters: [Parameters.apiVersion],
|
|
193
|
+
urlParameters: [Parameters.$host],
|
|
194
|
+
headerParameters: [Parameters.accept],
|
|
195
|
+
serializer
|
|
196
|
+
};
|
|
197
|
+
const listOperationsNextOperationSpec = {
|
|
198
|
+
path: "{nextLink}",
|
|
199
|
+
httpMethod: "GET",
|
|
200
|
+
responses: {
|
|
201
|
+
200: {
|
|
202
|
+
bodyMapper: Mappers.OperationListResult
|
|
203
|
+
},
|
|
204
|
+
default: {
|
|
205
|
+
bodyMapper: Mappers.ErrorResponse
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
queryParameters: [Parameters.apiVersion],
|
|
209
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
210
|
+
headerParameters: [Parameters.accept],
|
|
211
|
+
serializer
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=featureClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featureClient.js","sourceRoot":"","sources":["../../src/featureClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAQ9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,oCAAoC,EACrC,MAAM,uBAAuB,CAAC;AAK/B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAA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CACX,CAAC","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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"./pagingHelper.js\";\nimport {\n FeaturesImpl,\n SubscriptionFeatureRegistrationsImpl\n} from \"./operations/index.js\";\nimport {\n Features,\n SubscriptionFeatureRegistrations\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n FeatureClientOptionalParams,\n Operation,\n ListOperationsNextOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n ListOperationsNextResponse\n} from \"./models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\nexport class FeatureClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the FeatureClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The Azure subscription ID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: FeatureClientOptionalParams\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: FeatureClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-features/3.1.1`;\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-07-01\";\n this.features = new FeaturesImpl(this);\n this.subscriptionFeatureRegistrations = new SubscriptionFeatureRegistrationsImpl(\n this\n );\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 /**\n * Lists all of the available Microsoft.Features REST API operations.\n * @param options The options parameters.\n */\n public listOperations(\n options?: ListOperationsOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listOperationsPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listOperationsPagingPage(options, settings);\n }\n };\n }\n\n private async *listOperationsPagingPage(\n options?: ListOperationsOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: ListOperationsResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listOperations(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listOperationsNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listOperationsPagingAll(\n options?: ListOperationsOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listOperationsPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available Microsoft.Features REST API operations.\n * @param options The options parameters.\n */\n private _listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * ListOperationsNext\n * @param nextLink The nextLink from the previous successful call to the ListOperations method.\n * @param options The options parameters.\n */\n private _listOperationsNext(\n nextLink: string,\n options?: ListOperationsNextOptionalParams\n ): Promise<ListOperationsNextResponse> {\n return this.sendOperationRequest(\n { nextLink, options },\n listOperationsNextOperationSpec\n );\n }\n\n features: Features;\n subscriptionFeatureRegistrations: SubscriptionFeatureRegistrations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Features/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -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,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
/// <reference lib="esnext.asynciterable" />
|
|
9
|
+
export { getContinuationToken } from "./pagingHelper.js";
|
|
10
|
+
export * from "./models/index.js";
|
|
11
|
+
export { FeatureClient } from "./featureClient.js";
|
|
12
|
+
export * from "./operationsInterfaces/index.js";
|
|
13
|
+
//# 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,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,cAAc,iCAAiC,CAAC","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 { FeatureClient } from \"./featureClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
|