@azure/arm-resourceconnector 1.0.0-beta.1 → 1.0.0-beta.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/CHANGELOG.md +11 -1
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +107 -39
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/appliancesCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/appliancesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesDeleteSample.js +11 -3
- package/dist-esm/samples-dev/appliancesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesGetSample.js +11 -3
- package/dist-esm/samples-dev/appliancesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.js +11 -3
- package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/appliancesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/appliancesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.js +11 -3
- package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.js +11 -3
- package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListOperationsSample.js +10 -2
- package/dist-esm/samples-dev/appliancesListOperationsSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesUpdateSample.js +11 -3
- package/dist-esm/samples-dev/appliancesUpdateSample.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/operations/appliances.d.ts.map +1 -1
- package/dist-esm/src/operations/appliances.js +55 -24
- package/dist-esm/src/operations/appliances.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/resourceConnectorManagementClient.d.ts.map +1 -1
- package/dist-esm/src/resourceConnectorManagementClient.js +20 -15
- package/dist-esm/src/resourceConnectorManagementClient.js.map +1 -1
- package/package.json +8 -6
- package/review/arm-resourceconnector.api.md +3 -0
- package/src/index.ts +1 -0
- package/src/operations/appliances.ts +65 -27
- package/src/pagingHelper.ts +39 -0
- package/src/resourceConnectorManagementClient.ts +26 -17
- package/types/arm-resourceconnector.d.ts +9 -0
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Release History
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.2 (2023-02-01)
|
|
4
|
+
|
|
5
|
+
**Features**
|
|
6
|
+
|
|
7
|
+
- Exposes `getContinuationToken` helper function to extract continuation token
|
|
8
|
+
|
|
9
|
+
**Bugs Fixed**
|
|
10
|
+
|
|
11
|
+
- A series of small bug fixs relevant to authentication and apiVersion policy
|
|
12
|
+
|
|
3
13
|
## 1.0.0-beta.1 (2022-06-28)
|
|
4
14
|
|
|
5
15
|
The package of @azure/arm-resourceconnector is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ The appliances Rest API spec.
|
|
|
13
13
|
|
|
14
14
|
### Currently supported environments
|
|
15
15
|
|
|
16
|
-
- [LTS versions of Node.js](https://
|
|
16
|
+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
18
|
|
|
19
19
|
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,38 @@ function _interopNamespace(e) {
|
|
|
28
28
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
29
|
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
30
|
|
|
31
|
+
/*
|
|
32
|
+
* Copyright (c) Microsoft Corporation.
|
|
33
|
+
* Licensed under the MIT License.
|
|
34
|
+
*
|
|
35
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
36
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
37
|
+
*/
|
|
38
|
+
const pageMap = new WeakMap();
|
|
39
|
+
/**
|
|
40
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
41
|
+
* returns a continuation token that can be used to begin paging from
|
|
42
|
+
* that point later.
|
|
43
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
44
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
45
|
+
*/
|
|
46
|
+
function getContinuationToken(page) {
|
|
47
|
+
var _a;
|
|
48
|
+
if (typeof page !== "object" || page === null) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
52
|
+
}
|
|
53
|
+
function setContinuationToken(page, continuationToken) {
|
|
54
|
+
var _a;
|
|
55
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
59
|
+
pageInfo.continuationToken = continuationToken;
|
|
60
|
+
pageMap.set(page, pageInfo);
|
|
61
|
+
}
|
|
62
|
+
|
|
31
63
|
/*
|
|
32
64
|
* Copyright (c) Microsoft Corporation.
|
|
33
65
|
* Licensed under the MIT License.
|
|
@@ -1044,20 +1076,31 @@ class AppliancesImpl {
|
|
|
1044
1076
|
[Symbol.asyncIterator]() {
|
|
1045
1077
|
return this;
|
|
1046
1078
|
},
|
|
1047
|
-
byPage: () => {
|
|
1048
|
-
|
|
1079
|
+
byPage: (settings) => {
|
|
1080
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1081
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1082
|
+
}
|
|
1083
|
+
return this.listOperationsPagingPage(options, settings);
|
|
1049
1084
|
}
|
|
1050
1085
|
};
|
|
1051
1086
|
}
|
|
1052
|
-
listOperationsPagingPage(options) {
|
|
1087
|
+
listOperationsPagingPage(options, settings) {
|
|
1053
1088
|
return tslib.__asyncGenerator(this, arguments, function* listOperationsPagingPage_1() {
|
|
1054
|
-
let result
|
|
1055
|
-
|
|
1056
|
-
|
|
1089
|
+
let result;
|
|
1090
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1091
|
+
if (!continuationToken) {
|
|
1092
|
+
result = yield tslib.__await(this._listOperations(options));
|
|
1093
|
+
let page = result.value || [];
|
|
1094
|
+
continuationToken = result.nextLink;
|
|
1095
|
+
setContinuationToken(page, continuationToken);
|
|
1096
|
+
yield yield tslib.__await(page);
|
|
1097
|
+
}
|
|
1057
1098
|
while (continuationToken) {
|
|
1058
1099
|
result = yield tslib.__await(this._listOperationsNext(continuationToken, options));
|
|
1059
1100
|
continuationToken = result.nextLink;
|
|
1060
|
-
|
|
1101
|
+
let page = result.value || [];
|
|
1102
|
+
setContinuationToken(page, continuationToken);
|
|
1103
|
+
yield yield tslib.__await(page);
|
|
1061
1104
|
}
|
|
1062
1105
|
});
|
|
1063
1106
|
}
|
|
@@ -1093,20 +1136,31 @@ class AppliancesImpl {
|
|
|
1093
1136
|
[Symbol.asyncIterator]() {
|
|
1094
1137
|
return this;
|
|
1095
1138
|
},
|
|
1096
|
-
byPage: () => {
|
|
1097
|
-
|
|
1139
|
+
byPage: (settings) => {
|
|
1140
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1141
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1142
|
+
}
|
|
1143
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
1098
1144
|
}
|
|
1099
1145
|
};
|
|
1100
1146
|
}
|
|
1101
|
-
listBySubscriptionPagingPage(options) {
|
|
1147
|
+
listBySubscriptionPagingPage(options, settings) {
|
|
1102
1148
|
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
|
1103
|
-
let result
|
|
1104
|
-
|
|
1105
|
-
|
|
1149
|
+
let result;
|
|
1150
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1151
|
+
if (!continuationToken) {
|
|
1152
|
+
result = yield tslib.__await(this._listBySubscription(options));
|
|
1153
|
+
let page = result.value || [];
|
|
1154
|
+
continuationToken = result.nextLink;
|
|
1155
|
+
setContinuationToken(page, continuationToken);
|
|
1156
|
+
yield yield tslib.__await(page);
|
|
1157
|
+
}
|
|
1106
1158
|
while (continuationToken) {
|
|
1107
1159
|
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
|
1108
1160
|
continuationToken = result.nextLink;
|
|
1109
|
-
|
|
1161
|
+
let page = result.value || [];
|
|
1162
|
+
setContinuationToken(page, continuationToken);
|
|
1163
|
+
yield yield tslib.__await(page);
|
|
1110
1164
|
}
|
|
1111
1165
|
});
|
|
1112
1166
|
}
|
|
@@ -1143,20 +1197,31 @@ class AppliancesImpl {
|
|
|
1143
1197
|
[Symbol.asyncIterator]() {
|
|
1144
1198
|
return this;
|
|
1145
1199
|
},
|
|
1146
|
-
byPage: () => {
|
|
1147
|
-
|
|
1200
|
+
byPage: (settings) => {
|
|
1201
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1202
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1203
|
+
}
|
|
1204
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
1148
1205
|
}
|
|
1149
1206
|
};
|
|
1150
1207
|
}
|
|
1151
|
-
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
1208
|
+
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
1152
1209
|
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
1153
|
-
let result
|
|
1154
|
-
|
|
1155
|
-
|
|
1210
|
+
let result;
|
|
1211
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1212
|
+
if (!continuationToken) {
|
|
1213
|
+
result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
1214
|
+
let page = result.value || [];
|
|
1215
|
+
continuationToken = result.nextLink;
|
|
1216
|
+
setContinuationToken(page, continuationToken);
|
|
1217
|
+
yield yield tslib.__await(page);
|
|
1218
|
+
}
|
|
1156
1219
|
while (continuationToken) {
|
|
1157
1220
|
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
1158
1221
|
continuationToken = result.nextLink;
|
|
1159
|
-
|
|
1222
|
+
let page = result.value || [];
|
|
1223
|
+
setContinuationToken(page, continuationToken);
|
|
1224
|
+
yield yield tslib.__await(page);
|
|
1160
1225
|
}
|
|
1161
1226
|
});
|
|
1162
1227
|
}
|
|
@@ -1612,7 +1677,6 @@ const listOperationsNextOperationSpec = {
|
|
|
1612
1677
|
bodyMapper: ErrorResponse
|
|
1613
1678
|
}
|
|
1614
1679
|
},
|
|
1615
|
-
queryParameters: [apiVersion],
|
|
1616
1680
|
urlParameters: [$host, nextLink],
|
|
1617
1681
|
headerParameters: [accept],
|
|
1618
1682
|
serializer
|
|
@@ -1628,7 +1692,6 @@ const listBySubscriptionNextOperationSpec = {
|
|
|
1628
1692
|
bodyMapper: ErrorResponse
|
|
1629
1693
|
}
|
|
1630
1694
|
},
|
|
1631
|
-
queryParameters: [apiVersion],
|
|
1632
1695
|
urlParameters: [
|
|
1633
1696
|
$host,
|
|
1634
1697
|
subscriptionId,
|
|
@@ -1648,7 +1711,6 @@ const listByResourceGroupNextOperationSpec = {
|
|
|
1648
1711
|
bodyMapper: ErrorResponse
|
|
1649
1712
|
}
|
|
1650
1713
|
},
|
|
1651
|
-
queryParameters: [apiVersion],
|
|
1652
1714
|
urlParameters: [
|
|
1653
1715
|
$host,
|
|
1654
1716
|
subscriptionId,
|
|
@@ -1674,7 +1736,7 @@ class ResourceConnectorManagementClient extends coreClient__namespace.ServiceCli
|
|
|
1674
1736
|
* @param options The parameter options
|
|
1675
1737
|
*/
|
|
1676
1738
|
constructor(credentials, subscriptionId, options) {
|
|
1677
|
-
var _a, _b;
|
|
1739
|
+
var _a, _b, _c;
|
|
1678
1740
|
if (credentials === undefined) {
|
|
1679
1741
|
throw new Error("'credentials' cannot be null");
|
|
1680
1742
|
}
|
|
@@ -1689,29 +1751,34 @@ class ResourceConnectorManagementClient extends coreClient__namespace.ServiceCli
|
|
|
1689
1751
|
requestContentType: "application/json; charset=utf-8",
|
|
1690
1752
|
credential: credentials
|
|
1691
1753
|
};
|
|
1692
|
-
const packageDetails = `azsdk-js-arm-resourceconnector/1.0.0-beta.
|
|
1754
|
+
const packageDetails = `azsdk-js-arm-resourceconnector/1.0.0-beta.2`;
|
|
1693
1755
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1694
1756
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1695
1757
|
: `${packageDetails}`;
|
|
1696
1758
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1697
1759
|
userAgentPrefix
|
|
1698
|
-
},
|
|
1760
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1699
1761
|
super(optionsWithDefaults);
|
|
1762
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
1700
1763
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1701
1764
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1702
|
-
|
|
1765
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1703
1766
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1767
|
+
}
|
|
1768
|
+
if (!options ||
|
|
1769
|
+
!options.pipeline ||
|
|
1770
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
1771
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
1772
|
+
this.pipeline.removePolicy({
|
|
1773
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1774
|
+
});
|
|
1775
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1776
|
+
credential: credentials,
|
|
1777
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
1778
|
+
challengeCallbacks: {
|
|
1779
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1780
|
+
}
|
|
1781
|
+
}));
|
|
1715
1782
|
}
|
|
1716
1783
|
// Parameter assignments
|
|
1717
1784
|
this.subscriptionId = subscriptionId;
|
|
@@ -1751,4 +1818,5 @@ class ResourceConnectorManagementClient extends coreClient__namespace.ServiceCli
|
|
|
1751
1818
|
}
|
|
1752
1819
|
|
|
1753
1820
|
exports.ResourceConnectorManagementClient = ResourceConnectorManagementClient;
|
|
1821
|
+
exports.getContinuationToken = getContinuationToken;
|
|
1754
1822
|
//# sourceMappingURL=index.js.map
|