@azure/arm-relay 3.1.0 → 3.1.1
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 +10 -0
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +197 -82
- 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/hybridConnectionsCreateOrUpdateAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsCreateOrUpdateAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsDeleteAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsDeleteAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsGetAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsGetAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsGetSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsListAuthorizationRulesSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsListAuthorizationRulesSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsListByNamespaceSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsListByNamespaceSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsListKeysSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsListKeysSample.js.map +1 -1
- package/dist-esm/samples-dev/hybridConnectionsRegenerateKeysSample.js +11 -3
- package/dist-esm/samples-dev/hybridConnectionsRegenerateKeysSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesCheckNameAvailabilitySample.js +10 -2
- package/dist-esm/samples-dev/namespacesCheckNameAvailabilitySample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesCreateOrUpdateAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/namespacesCreateOrUpdateAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/namespacesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesDeleteAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/namespacesDeleteAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesDeleteSample.js +11 -3
- package/dist-esm/samples-dev/namespacesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesGetAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/namespacesGetAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesGetSample.js +11 -3
- package/dist-esm/samples-dev/namespacesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesListAuthorizationRulesSample.js +11 -3
- package/dist-esm/samples-dev/namespacesListAuthorizationRulesSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/namespacesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesListKeysSample.js +11 -3
- package/dist-esm/samples-dev/namespacesListKeysSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesListSample.js +10 -2
- package/dist-esm/samples-dev/namespacesListSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesRegenerateKeysSample.js +11 -3
- package/dist-esm/samples-dev/namespacesRegenerateKeysSample.js.map +1 -1
- package/dist-esm/samples-dev/namespacesUpdateSample.js +11 -3
- package/dist-esm/samples-dev/namespacesUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +10 -2
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysCreateOrUpdateAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysCreateOrUpdateAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysDeleteAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysDeleteAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysDeleteSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysGetAuthorizationRuleSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysGetAuthorizationRuleSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysGetSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysGetSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysListAuthorizationRulesSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysListAuthorizationRulesSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysListByNamespaceSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysListByNamespaceSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysListKeysSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysListKeysSample.js.map +1 -1
- package/dist-esm/samples-dev/wcfRelaysRegenerateKeysSample.js +11 -3
- package/dist-esm/samples-dev/wcfRelaysRegenerateKeysSample.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/hybridConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/hybridConnections.js +37 -16
- package/dist-esm/src/operations/hybridConnections.js.map +1 -1
- package/dist-esm/src/operations/namespaces.d.ts.map +1 -1
- package/dist-esm/src/operations/namespaces.js +55 -24
- package/dist-esm/src/operations/namespaces.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -8
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/wCFRelays.d.ts.map +1 -1
- package/dist-esm/src/operations/wCFRelays.js +37 -16
- package/dist-esm/src/operations/wCFRelays.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/relayAPI.d.ts.map +1 -1
- package/dist-esm/src/relayAPI.js +20 -18
- package/dist-esm/src/relayAPI.js.map +1 -1
- package/package.json +8 -6
- package/review/arm-relay.api.md +3 -0
- package/src/index.ts +1 -0
- package/src/operations/hybridConnections.ts +53 -28
- package/src/operations/namespaces.ts +71 -32
- package/src/operations/operations.ts +21 -9
- package/src/operations/wCFRelays.ts +53 -28
- package/src/pagingHelper.ts +39 -0
- package/src/relayAPI.ts +26 -20
- package/types/arm-relay.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
|
+
## 3.1.1 (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
|
## 3.1.0 (2022-07-08)
|
|
4
14
|
|
|
5
15
|
**Features**
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Use these API to manage Azure Relay resources through Azure Resource Manager.
|
|
|
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.
|
|
@@ -876,20 +908,31 @@ class OperationsImpl {
|
|
|
876
908
|
[Symbol.asyncIterator]() {
|
|
877
909
|
return this;
|
|
878
910
|
},
|
|
879
|
-
byPage: () => {
|
|
880
|
-
|
|
911
|
+
byPage: (settings) => {
|
|
912
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
913
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
914
|
+
}
|
|
915
|
+
return this.listPagingPage(options, settings);
|
|
881
916
|
}
|
|
882
917
|
};
|
|
883
918
|
}
|
|
884
|
-
listPagingPage(options) {
|
|
919
|
+
listPagingPage(options, settings) {
|
|
885
920
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
886
|
-
let result
|
|
887
|
-
|
|
888
|
-
|
|
921
|
+
let result;
|
|
922
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
923
|
+
if (!continuationToken) {
|
|
924
|
+
result = yield tslib.__await(this._list(options));
|
|
925
|
+
let page = result.value || [];
|
|
926
|
+
continuationToken = result.nextLink;
|
|
927
|
+
setContinuationToken(page, continuationToken);
|
|
928
|
+
yield yield tslib.__await(page);
|
|
929
|
+
}
|
|
889
930
|
while (continuationToken) {
|
|
890
931
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
891
932
|
continuationToken = result.nextLink;
|
|
892
|
-
|
|
933
|
+
let page = result.value || [];
|
|
934
|
+
setContinuationToken(page, continuationToken);
|
|
935
|
+
yield yield tslib.__await(page);
|
|
893
936
|
}
|
|
894
937
|
});
|
|
895
938
|
}
|
|
@@ -956,7 +999,6 @@ const listNextOperationSpec$1 = {
|
|
|
956
999
|
bodyMapper: ErrorResponse
|
|
957
1000
|
}
|
|
958
1001
|
},
|
|
959
|
-
queryParameters: [apiVersion],
|
|
960
1002
|
urlParameters: [$host, nextLink],
|
|
961
1003
|
headerParameters: [accept],
|
|
962
1004
|
serializer: serializer$3
|
|
@@ -1020,20 +1062,31 @@ class NamespacesImpl {
|
|
|
1020
1062
|
[Symbol.asyncIterator]() {
|
|
1021
1063
|
return this;
|
|
1022
1064
|
},
|
|
1023
|
-
byPage: () => {
|
|
1024
|
-
|
|
1065
|
+
byPage: (settings) => {
|
|
1066
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1067
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1068
|
+
}
|
|
1069
|
+
return this.listPagingPage(options, settings);
|
|
1025
1070
|
}
|
|
1026
1071
|
};
|
|
1027
1072
|
}
|
|
1028
|
-
listPagingPage(options) {
|
|
1073
|
+
listPagingPage(options, settings) {
|
|
1029
1074
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1030
|
-
let result
|
|
1031
|
-
|
|
1032
|
-
|
|
1075
|
+
let result;
|
|
1076
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1077
|
+
if (!continuationToken) {
|
|
1078
|
+
result = yield tslib.__await(this._list(options));
|
|
1079
|
+
let page = result.value || [];
|
|
1080
|
+
continuationToken = result.nextLink;
|
|
1081
|
+
setContinuationToken(page, continuationToken);
|
|
1082
|
+
yield yield tslib.__await(page);
|
|
1083
|
+
}
|
|
1033
1084
|
while (continuationToken) {
|
|
1034
1085
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
1035
1086
|
continuationToken = result.nextLink;
|
|
1036
|
-
|
|
1087
|
+
let page = result.value || [];
|
|
1088
|
+
setContinuationToken(page, continuationToken);
|
|
1089
|
+
yield yield tslib.__await(page);
|
|
1037
1090
|
}
|
|
1038
1091
|
});
|
|
1039
1092
|
}
|
|
@@ -1069,20 +1122,31 @@ class NamespacesImpl {
|
|
|
1069
1122
|
[Symbol.asyncIterator]() {
|
|
1070
1123
|
return this;
|
|
1071
1124
|
},
|
|
1072
|
-
byPage: () => {
|
|
1073
|
-
|
|
1125
|
+
byPage: (settings) => {
|
|
1126
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1127
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1128
|
+
}
|
|
1129
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
1074
1130
|
}
|
|
1075
1131
|
};
|
|
1076
1132
|
}
|
|
1077
|
-
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
1133
|
+
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
1078
1134
|
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
1079
|
-
let result
|
|
1080
|
-
|
|
1081
|
-
|
|
1135
|
+
let result;
|
|
1136
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1137
|
+
if (!continuationToken) {
|
|
1138
|
+
result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
1139
|
+
let page = result.value || [];
|
|
1140
|
+
continuationToken = result.nextLink;
|
|
1141
|
+
setContinuationToken(page, continuationToken);
|
|
1142
|
+
yield yield tslib.__await(page);
|
|
1143
|
+
}
|
|
1082
1144
|
while (continuationToken) {
|
|
1083
1145
|
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
1084
1146
|
continuationToken = result.nextLink;
|
|
1085
|
-
|
|
1147
|
+
let page = result.value || [];
|
|
1148
|
+
setContinuationToken(page, continuationToken);
|
|
1149
|
+
yield yield tslib.__await(page);
|
|
1086
1150
|
}
|
|
1087
1151
|
});
|
|
1088
1152
|
}
|
|
@@ -1119,20 +1183,31 @@ class NamespacesImpl {
|
|
|
1119
1183
|
[Symbol.asyncIterator]() {
|
|
1120
1184
|
return this;
|
|
1121
1185
|
},
|
|
1122
|
-
byPage: () => {
|
|
1123
|
-
|
|
1186
|
+
byPage: (settings) => {
|
|
1187
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1188
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1189
|
+
}
|
|
1190
|
+
return this.listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, options, settings);
|
|
1124
1191
|
}
|
|
1125
1192
|
};
|
|
1126
1193
|
}
|
|
1127
|
-
listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, options) {
|
|
1194
|
+
listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, options, settings) {
|
|
1128
1195
|
return tslib.__asyncGenerator(this, arguments, function* listAuthorizationRulesPagingPage_1() {
|
|
1129
|
-
let result
|
|
1130
|
-
|
|
1131
|
-
|
|
1196
|
+
let result;
|
|
1197
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1198
|
+
if (!continuationToken) {
|
|
1199
|
+
result = yield tslib.__await(this._listAuthorizationRules(resourceGroupName, namespaceName, options));
|
|
1200
|
+
let page = result.value || [];
|
|
1201
|
+
continuationToken = result.nextLink;
|
|
1202
|
+
setContinuationToken(page, continuationToken);
|
|
1203
|
+
yield yield tslib.__await(page);
|
|
1204
|
+
}
|
|
1132
1205
|
while (continuationToken) {
|
|
1133
1206
|
result = yield tslib.__await(this._listAuthorizationRulesNext(resourceGroupName, namespaceName, continuationToken, options));
|
|
1134
1207
|
continuationToken = result.nextLink;
|
|
1135
|
-
|
|
1208
|
+
let page = result.value || [];
|
|
1209
|
+
setContinuationToken(page, continuationToken);
|
|
1210
|
+
yield yield tslib.__await(page);
|
|
1136
1211
|
}
|
|
1137
1212
|
});
|
|
1138
1213
|
}
|
|
@@ -1706,7 +1781,6 @@ const listNextOperationSpec = {
|
|
|
1706
1781
|
bodyMapper: ErrorResponse
|
|
1707
1782
|
}
|
|
1708
1783
|
},
|
|
1709
|
-
queryParameters: [apiVersion],
|
|
1710
1784
|
urlParameters: [
|
|
1711
1785
|
$host,
|
|
1712
1786
|
nextLink,
|
|
@@ -1726,7 +1800,6 @@ const listByResourceGroupNextOperationSpec = {
|
|
|
1726
1800
|
bodyMapper: ErrorResponse
|
|
1727
1801
|
}
|
|
1728
1802
|
},
|
|
1729
|
-
queryParameters: [apiVersion],
|
|
1730
1803
|
urlParameters: [
|
|
1731
1804
|
$host,
|
|
1732
1805
|
nextLink,
|
|
@@ -1747,7 +1820,6 @@ const listAuthorizationRulesNextOperationSpec$2 = {
|
|
|
1747
1820
|
bodyMapper: ErrorResponse
|
|
1748
1821
|
}
|
|
1749
1822
|
},
|
|
1750
|
-
queryParameters: [apiVersion],
|
|
1751
1823
|
urlParameters: [
|
|
1752
1824
|
$host,
|
|
1753
1825
|
nextLink,
|
|
@@ -1791,20 +1863,31 @@ class HybridConnectionsImpl {
|
|
|
1791
1863
|
[Symbol.asyncIterator]() {
|
|
1792
1864
|
return this;
|
|
1793
1865
|
},
|
|
1794
|
-
byPage: () => {
|
|
1795
|
-
|
|
1866
|
+
byPage: (settings) => {
|
|
1867
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1868
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1869
|
+
}
|
|
1870
|
+
return this.listByNamespacePagingPage(resourceGroupName, namespaceName, options, settings);
|
|
1796
1871
|
}
|
|
1797
1872
|
};
|
|
1798
1873
|
}
|
|
1799
|
-
listByNamespacePagingPage(resourceGroupName, namespaceName, options) {
|
|
1874
|
+
listByNamespacePagingPage(resourceGroupName, namespaceName, options, settings) {
|
|
1800
1875
|
return tslib.__asyncGenerator(this, arguments, function* listByNamespacePagingPage_1() {
|
|
1801
|
-
let result
|
|
1802
|
-
|
|
1803
|
-
|
|
1876
|
+
let result;
|
|
1877
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1878
|
+
if (!continuationToken) {
|
|
1879
|
+
result = yield tslib.__await(this._listByNamespace(resourceGroupName, namespaceName, options));
|
|
1880
|
+
let page = result.value || [];
|
|
1881
|
+
continuationToken = result.nextLink;
|
|
1882
|
+
setContinuationToken(page, continuationToken);
|
|
1883
|
+
yield yield tslib.__await(page);
|
|
1884
|
+
}
|
|
1804
1885
|
while (continuationToken) {
|
|
1805
1886
|
result = yield tslib.__await(this._listByNamespaceNext(resourceGroupName, namespaceName, continuationToken, options));
|
|
1806
1887
|
continuationToken = result.nextLink;
|
|
1807
|
-
|
|
1888
|
+
let page = result.value || [];
|
|
1889
|
+
setContinuationToken(page, continuationToken);
|
|
1890
|
+
yield yield tslib.__await(page);
|
|
1808
1891
|
}
|
|
1809
1892
|
});
|
|
1810
1893
|
}
|
|
@@ -1842,20 +1925,31 @@ class HybridConnectionsImpl {
|
|
|
1842
1925
|
[Symbol.asyncIterator]() {
|
|
1843
1926
|
return this;
|
|
1844
1927
|
},
|
|
1845
|
-
byPage: () => {
|
|
1846
|
-
|
|
1928
|
+
byPage: (settings) => {
|
|
1929
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1930
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1931
|
+
}
|
|
1932
|
+
return this.listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, hybridConnectionName, options, settings);
|
|
1847
1933
|
}
|
|
1848
1934
|
};
|
|
1849
1935
|
}
|
|
1850
|
-
listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, hybridConnectionName, options) {
|
|
1936
|
+
listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, hybridConnectionName, options, settings) {
|
|
1851
1937
|
return tslib.__asyncGenerator(this, arguments, function* listAuthorizationRulesPagingPage_1() {
|
|
1852
|
-
let result
|
|
1853
|
-
|
|
1854
|
-
|
|
1938
|
+
let result;
|
|
1939
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1940
|
+
if (!continuationToken) {
|
|
1941
|
+
result = yield tslib.__await(this._listAuthorizationRules(resourceGroupName, namespaceName, hybridConnectionName, options));
|
|
1942
|
+
let page = result.value || [];
|
|
1943
|
+
continuationToken = result.nextLink;
|
|
1944
|
+
setContinuationToken(page, continuationToken);
|
|
1945
|
+
yield yield tslib.__await(page);
|
|
1946
|
+
}
|
|
1855
1947
|
while (continuationToken) {
|
|
1856
1948
|
result = yield tslib.__await(this._listAuthorizationRulesNext(resourceGroupName, namespaceName, hybridConnectionName, continuationToken, options));
|
|
1857
1949
|
continuationToken = result.nextLink;
|
|
1858
|
-
|
|
1950
|
+
let page = result.value || [];
|
|
1951
|
+
setContinuationToken(page, continuationToken);
|
|
1952
|
+
yield yield tslib.__await(page);
|
|
1859
1953
|
}
|
|
1860
1954
|
});
|
|
1861
1955
|
}
|
|
@@ -2291,7 +2385,6 @@ const listByNamespaceNextOperationSpec$1 = {
|
|
|
2291
2385
|
bodyMapper: ErrorResponse
|
|
2292
2386
|
}
|
|
2293
2387
|
},
|
|
2294
|
-
queryParameters: [apiVersion],
|
|
2295
2388
|
urlParameters: [
|
|
2296
2389
|
$host,
|
|
2297
2390
|
nextLink,
|
|
@@ -2313,7 +2406,6 @@ const listAuthorizationRulesNextOperationSpec$1 = {
|
|
|
2313
2406
|
bodyMapper: ErrorResponse
|
|
2314
2407
|
}
|
|
2315
2408
|
},
|
|
2316
|
-
queryParameters: [apiVersion],
|
|
2317
2409
|
urlParameters: [
|
|
2318
2410
|
$host,
|
|
2319
2411
|
nextLink,
|
|
@@ -2358,20 +2450,31 @@ class WCFRelaysImpl {
|
|
|
2358
2450
|
[Symbol.asyncIterator]() {
|
|
2359
2451
|
return this;
|
|
2360
2452
|
},
|
|
2361
|
-
byPage: () => {
|
|
2362
|
-
|
|
2453
|
+
byPage: (settings) => {
|
|
2454
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2455
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2456
|
+
}
|
|
2457
|
+
return this.listByNamespacePagingPage(resourceGroupName, namespaceName, options, settings);
|
|
2363
2458
|
}
|
|
2364
2459
|
};
|
|
2365
2460
|
}
|
|
2366
|
-
listByNamespacePagingPage(resourceGroupName, namespaceName, options) {
|
|
2461
|
+
listByNamespacePagingPage(resourceGroupName, namespaceName, options, settings) {
|
|
2367
2462
|
return tslib.__asyncGenerator(this, arguments, function* listByNamespacePagingPage_1() {
|
|
2368
|
-
let result
|
|
2369
|
-
|
|
2370
|
-
|
|
2463
|
+
let result;
|
|
2464
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2465
|
+
if (!continuationToken) {
|
|
2466
|
+
result = yield tslib.__await(this._listByNamespace(resourceGroupName, namespaceName, options));
|
|
2467
|
+
let page = result.value || [];
|
|
2468
|
+
continuationToken = result.nextLink;
|
|
2469
|
+
setContinuationToken(page, continuationToken);
|
|
2470
|
+
yield yield tslib.__await(page);
|
|
2471
|
+
}
|
|
2371
2472
|
while (continuationToken) {
|
|
2372
2473
|
result = yield tslib.__await(this._listByNamespaceNext(resourceGroupName, namespaceName, continuationToken, options));
|
|
2373
2474
|
continuationToken = result.nextLink;
|
|
2374
|
-
|
|
2475
|
+
let page = result.value || [];
|
|
2476
|
+
setContinuationToken(page, continuationToken);
|
|
2477
|
+
yield yield tslib.__await(page);
|
|
2375
2478
|
}
|
|
2376
2479
|
});
|
|
2377
2480
|
}
|
|
@@ -2409,20 +2512,31 @@ class WCFRelaysImpl {
|
|
|
2409
2512
|
[Symbol.asyncIterator]() {
|
|
2410
2513
|
return this;
|
|
2411
2514
|
},
|
|
2412
|
-
byPage: () => {
|
|
2413
|
-
|
|
2515
|
+
byPage: (settings) => {
|
|
2516
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2517
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2518
|
+
}
|
|
2519
|
+
return this.listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, relayName, options, settings);
|
|
2414
2520
|
}
|
|
2415
2521
|
};
|
|
2416
2522
|
}
|
|
2417
|
-
listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, relayName, options) {
|
|
2523
|
+
listAuthorizationRulesPagingPage(resourceGroupName, namespaceName, relayName, options, settings) {
|
|
2418
2524
|
return tslib.__asyncGenerator(this, arguments, function* listAuthorizationRulesPagingPage_1() {
|
|
2419
|
-
let result
|
|
2420
|
-
|
|
2421
|
-
|
|
2525
|
+
let result;
|
|
2526
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2527
|
+
if (!continuationToken) {
|
|
2528
|
+
result = yield tslib.__await(this._listAuthorizationRules(resourceGroupName, namespaceName, relayName, options));
|
|
2529
|
+
let page = result.value || [];
|
|
2530
|
+
continuationToken = result.nextLink;
|
|
2531
|
+
setContinuationToken(page, continuationToken);
|
|
2532
|
+
yield yield tslib.__await(page);
|
|
2533
|
+
}
|
|
2422
2534
|
while (continuationToken) {
|
|
2423
2535
|
result = yield tslib.__await(this._listAuthorizationRulesNext(resourceGroupName, namespaceName, relayName, continuationToken, options));
|
|
2424
2536
|
continuationToken = result.nextLink;
|
|
2425
|
-
|
|
2537
|
+
let page = result.value || [];
|
|
2538
|
+
setContinuationToken(page, continuationToken);
|
|
2539
|
+
yield yield tslib.__await(page);
|
|
2426
2540
|
}
|
|
2427
2541
|
});
|
|
2428
2542
|
}
|
|
@@ -2844,7 +2958,6 @@ const listByNamespaceNextOperationSpec = {
|
|
|
2844
2958
|
bodyMapper: ErrorResponse
|
|
2845
2959
|
}
|
|
2846
2960
|
},
|
|
2847
|
-
queryParameters: [apiVersion],
|
|
2848
2961
|
urlParameters: [
|
|
2849
2962
|
$host,
|
|
2850
2963
|
nextLink,
|
|
@@ -2863,7 +2976,6 @@ const listAuthorizationRulesNextOperationSpec = {
|
|
|
2863
2976
|
bodyMapper: AuthorizationRuleListResult
|
|
2864
2977
|
}
|
|
2865
2978
|
},
|
|
2866
|
-
queryParameters: [apiVersion],
|
|
2867
2979
|
urlParameters: [
|
|
2868
2980
|
$host,
|
|
2869
2981
|
nextLink,
|
|
@@ -2892,7 +3004,7 @@ class RelayAPI extends coreClient__namespace.ServiceClient {
|
|
|
2892
3004
|
* @param options The parameter options
|
|
2893
3005
|
*/
|
|
2894
3006
|
constructor(credentials, subscriptionId, options) {
|
|
2895
|
-
var _a, _b;
|
|
3007
|
+
var _a, _b, _c;
|
|
2896
3008
|
if (credentials === undefined) {
|
|
2897
3009
|
throw new Error("'credentials' cannot be null");
|
|
2898
3010
|
}
|
|
@@ -2907,32 +3019,34 @@ class RelayAPI extends coreClient__namespace.ServiceClient {
|
|
|
2907
3019
|
requestContentType: "application/json; charset=utf-8",
|
|
2908
3020
|
credential: credentials
|
|
2909
3021
|
};
|
|
2910
|
-
const packageDetails = `azsdk-js-arm-relay/3.1.
|
|
3022
|
+
const packageDetails = `azsdk-js-arm-relay/3.1.1`;
|
|
2911
3023
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2912
3024
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2913
3025
|
: `${packageDetails}`;
|
|
2914
|
-
if (!options.credentialScopes) {
|
|
2915
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
2916
|
-
}
|
|
2917
3026
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
2918
3027
|
userAgentPrefix
|
|
2919
|
-
},
|
|
3028
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
2920
3029
|
super(optionsWithDefaults);
|
|
3030
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
2921
3031
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
2922
3032
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
2923
|
-
|
|
3033
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
2924
3034
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
3035
|
+
}
|
|
3036
|
+
if (!options ||
|
|
3037
|
+
!options.pipeline ||
|
|
3038
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
3039
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
3040
|
+
this.pipeline.removePolicy({
|
|
3041
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
3042
|
+
});
|
|
3043
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
3044
|
+
credential: credentials,
|
|
3045
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
3046
|
+
challengeCallbacks: {
|
|
3047
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
3048
|
+
}
|
|
3049
|
+
}));
|
|
2936
3050
|
}
|
|
2937
3051
|
// Parameter assignments
|
|
2938
3052
|
this.subscriptionId = subscriptionId;
|
|
@@ -2975,4 +3089,5 @@ class RelayAPI extends coreClient__namespace.ServiceClient {
|
|
|
2975
3089
|
}
|
|
2976
3090
|
|
|
2977
3091
|
exports.RelayAPI = RelayAPI;
|
|
3092
|
+
exports.getContinuationToken = getContinuationToken;
|
|
2978
3093
|
//# sourceMappingURL=index.js.map
|