@azure/arm-hanaonazure 4.0.0-beta.2 → 4.0.0-beta.3
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 +2 -2
- package/README.md +1 -1
- package/dist/index.js +133 -37
- 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/src/hanaManagementClient.d.ts +2 -0
- package/dist-esm/src/hanaManagementClient.d.ts.map +1 -1
- package/dist-esm/src/hanaManagementClient.js +49 -18
- package/dist-esm/src/hanaManagementClient.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/models/index.d.ts +15 -7
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +7 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +8 -4
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/providerInstances.d.ts.map +1 -1
- package/dist-esm/src/operations/providerInstances.js +19 -7
- package/dist-esm/src/operations/providerInstances.js.map +1 -1
- package/dist-esm/src/operations/sapMonitors.d.ts.map +1 -1
- package/dist-esm/src/operations/sapMonitors.js +19 -7
- package/dist-esm/src/operations/sapMonitors.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/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +15 -11
- package/review/arm-hanaonazure.api.md +18 -21
- package/src/hanaManagementClient.ts +60 -20
- package/src/index.ts +1 -0
- package/src/models/index.ts +14 -7
- package/src/operations/operations.ts +10 -5
- package/src/operations/providerInstances.ts +26 -8
- package/src/operations/sapMonitors.ts +21 -8
- package/src/pagingHelper.ts +39 -0
- package/types/arm-hanaonazure.d.ts +26 -7
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 4.0.0-beta.
|
|
3
|
+
## 4.0.0-beta.3 (2022-11-23)
|
|
4
4
|
|
|
5
|
-
The package of @azure/arm-hanaonazure is using our next generation design principles since version 4.0.0-beta.
|
|
5
|
+
The package of @azure/arm-hanaonazure is using our next generation design principles since version 4.0.0-beta.3, which contains breaking changes.
|
|
6
6
|
|
|
7
7
|
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
|
8
8
|
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ HANA on Azure Client
|
|
|
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
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var tslib = require('tslib');
|
|
5
6
|
var coreClient = require('@azure/core-client');
|
|
6
7
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
|
-
var tslib = require('tslib');
|
|
8
8
|
var coreLro = require('@azure/core-lro');
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
@@ -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 a result page from a pageable operation, returns a
|
|
41
|
+
* continuation token that can be used to begin paging from
|
|
42
|
+
* that point later.
|
|
43
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
44
|
+
* @returns The continuation token that can be passed into byPage().
|
|
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.
|
|
@@ -38,12 +70,19 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
|
|
|
38
70
|
/** Known values of {@link HanaProvisioningStatesEnum} that the service accepts. */
|
|
39
71
|
exports.KnownHanaProvisioningStatesEnum = void 0;
|
|
40
72
|
(function (KnownHanaProvisioningStatesEnum) {
|
|
73
|
+
/** Accepted */
|
|
41
74
|
KnownHanaProvisioningStatesEnum["Accepted"] = "Accepted";
|
|
75
|
+
/** Creating */
|
|
42
76
|
KnownHanaProvisioningStatesEnum["Creating"] = "Creating";
|
|
77
|
+
/** Updating */
|
|
43
78
|
KnownHanaProvisioningStatesEnum["Updating"] = "Updating";
|
|
79
|
+
/** Failed */
|
|
44
80
|
KnownHanaProvisioningStatesEnum["Failed"] = "Failed";
|
|
81
|
+
/** Succeeded */
|
|
45
82
|
KnownHanaProvisioningStatesEnum["Succeeded"] = "Succeeded";
|
|
83
|
+
/** Deleting */
|
|
46
84
|
KnownHanaProvisioningStatesEnum["Deleting"] = "Deleting";
|
|
85
|
+
/** Migrating */
|
|
47
86
|
KnownHanaProvisioningStatesEnum["Migrating"] = "Migrating";
|
|
48
87
|
})(exports.KnownHanaProvisioningStatesEnum || (exports.KnownHanaProvisioningStatesEnum = {}));
|
|
49
88
|
|
|
@@ -539,14 +578,18 @@ class OperationsImpl {
|
|
|
539
578
|
[Symbol.asyncIterator]() {
|
|
540
579
|
return this;
|
|
541
580
|
},
|
|
542
|
-
byPage: () => {
|
|
543
|
-
|
|
581
|
+
byPage: (settings) => {
|
|
582
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
583
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
584
|
+
}
|
|
585
|
+
return this.listPagingPage(options, settings);
|
|
544
586
|
}
|
|
545
587
|
};
|
|
546
588
|
}
|
|
547
|
-
listPagingPage(options) {
|
|
589
|
+
listPagingPage(options, _settings) {
|
|
548
590
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
549
|
-
let result
|
|
591
|
+
let result;
|
|
592
|
+
result = yield tslib.__await(this._list(options));
|
|
550
593
|
yield yield tslib.__await(result.value || []);
|
|
551
594
|
});
|
|
552
595
|
}
|
|
@@ -654,20 +697,31 @@ class SapMonitorsImpl {
|
|
|
654
697
|
[Symbol.asyncIterator]() {
|
|
655
698
|
return this;
|
|
656
699
|
},
|
|
657
|
-
byPage: () => {
|
|
658
|
-
|
|
700
|
+
byPage: (settings) => {
|
|
701
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
702
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
703
|
+
}
|
|
704
|
+
return this.listPagingPage(options, settings);
|
|
659
705
|
}
|
|
660
706
|
};
|
|
661
707
|
}
|
|
662
|
-
listPagingPage(options) {
|
|
708
|
+
listPagingPage(options, settings) {
|
|
663
709
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
664
|
-
let result
|
|
665
|
-
|
|
666
|
-
|
|
710
|
+
let result;
|
|
711
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
712
|
+
if (!continuationToken) {
|
|
713
|
+
result = yield tslib.__await(this._list(options));
|
|
714
|
+
let page = result.value || [];
|
|
715
|
+
continuationToken = result.nextLink;
|
|
716
|
+
setContinuationToken(page, continuationToken);
|
|
717
|
+
yield yield tslib.__await(page);
|
|
718
|
+
}
|
|
667
719
|
while (continuationToken) {
|
|
668
720
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
669
721
|
continuationToken = result.nextLink;
|
|
670
|
-
|
|
722
|
+
let page = result.value || [];
|
|
723
|
+
setContinuationToken(page, continuationToken);
|
|
724
|
+
yield yield tslib.__await(page);
|
|
671
725
|
}
|
|
672
726
|
});
|
|
673
727
|
}
|
|
@@ -1000,20 +1054,31 @@ class ProviderInstancesImpl {
|
|
|
1000
1054
|
[Symbol.asyncIterator]() {
|
|
1001
1055
|
return this;
|
|
1002
1056
|
},
|
|
1003
|
-
byPage: () => {
|
|
1004
|
-
|
|
1057
|
+
byPage: (settings) => {
|
|
1058
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1059
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1060
|
+
}
|
|
1061
|
+
return this.listPagingPage(resourceGroupName, sapMonitorName, options, settings);
|
|
1005
1062
|
}
|
|
1006
1063
|
};
|
|
1007
1064
|
}
|
|
1008
|
-
listPagingPage(resourceGroupName, sapMonitorName, options) {
|
|
1065
|
+
listPagingPage(resourceGroupName, sapMonitorName, options, settings) {
|
|
1009
1066
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1010
|
-
let result
|
|
1011
|
-
|
|
1012
|
-
|
|
1067
|
+
let result;
|
|
1068
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1069
|
+
if (!continuationToken) {
|
|
1070
|
+
result = yield tslib.__await(this._list(resourceGroupName, sapMonitorName, options));
|
|
1071
|
+
let page = result.value || [];
|
|
1072
|
+
continuationToken = result.nextLink;
|
|
1073
|
+
setContinuationToken(page, continuationToken);
|
|
1074
|
+
yield yield tslib.__await(page);
|
|
1075
|
+
}
|
|
1013
1076
|
while (continuationToken) {
|
|
1014
1077
|
result = yield tslib.__await(this._listNext(resourceGroupName, sapMonitorName, continuationToken, options));
|
|
1015
1078
|
continuationToken = result.nextLink;
|
|
1016
|
-
|
|
1079
|
+
let page = result.value || [];
|
|
1080
|
+
setContinuationToken(page, continuationToken);
|
|
1081
|
+
yield yield tslib.__await(page);
|
|
1017
1082
|
}
|
|
1018
1083
|
});
|
|
1019
1084
|
}
|
|
@@ -1325,7 +1390,7 @@ class HanaManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
1325
1390
|
* @param options The parameter options
|
|
1326
1391
|
*/
|
|
1327
1392
|
constructor(credentials, subscriptionId, options) {
|
|
1328
|
-
var _a, _b;
|
|
1393
|
+
var _a, _b, _c;
|
|
1329
1394
|
if (credentials === undefined) {
|
|
1330
1395
|
throw new Error("'credentials' cannot be null");
|
|
1331
1396
|
}
|
|
@@ -1340,32 +1405,34 @@ class HanaManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
1340
1405
|
requestContentType: "application/json; charset=utf-8",
|
|
1341
1406
|
credential: credentials
|
|
1342
1407
|
};
|
|
1343
|
-
const packageDetails = `azsdk-js-arm-hanaonazure/4.0.0-beta.
|
|
1408
|
+
const packageDetails = `azsdk-js-arm-hanaonazure/4.0.0-beta.3`;
|
|
1344
1409
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1345
1410
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1346
1411
|
: `${packageDetails}`;
|
|
1347
|
-
if (!options.credentialScopes) {
|
|
1348
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
1349
|
-
}
|
|
1350
1412
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1351
1413
|
userAgentPrefix
|
|
1352
|
-
},
|
|
1414
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1353
1415
|
super(optionsWithDefaults);
|
|
1416
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
1354
1417
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1355
1418
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1356
|
-
|
|
1419
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1357
1420
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1421
|
+
}
|
|
1422
|
+
if (!options ||
|
|
1423
|
+
!options.pipeline ||
|
|
1424
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
1425
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
1426
|
+
this.pipeline.removePolicy({
|
|
1427
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1428
|
+
});
|
|
1429
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1430
|
+
credential: credentials,
|
|
1431
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
1432
|
+
challengeCallbacks: {
|
|
1433
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1434
|
+
}
|
|
1435
|
+
}));
|
|
1369
1436
|
}
|
|
1370
1437
|
// Parameter assignments
|
|
1371
1438
|
this.subscriptionId = subscriptionId;
|
|
@@ -1375,8 +1442,37 @@ class HanaManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
1375
1442
|
this.operations = new OperationsImpl(this);
|
|
1376
1443
|
this.sapMonitors = new SapMonitorsImpl(this);
|
|
1377
1444
|
this.providerInstances = new ProviderInstancesImpl(this);
|
|
1445
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
1446
|
+
}
|
|
1447
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
1448
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
1449
|
+
if (!apiVersion) {
|
|
1450
|
+
return;
|
|
1451
|
+
}
|
|
1452
|
+
const apiVersionPolicy = {
|
|
1453
|
+
name: "CustomApiVersionPolicy",
|
|
1454
|
+
sendRequest(request, next) {
|
|
1455
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1456
|
+
const param = request.url.split("?");
|
|
1457
|
+
if (param.length > 1) {
|
|
1458
|
+
const newParams = param[1].split("&").map((item) => {
|
|
1459
|
+
if (item.indexOf("api-version") > -1) {
|
|
1460
|
+
return "api-version=" + apiVersion;
|
|
1461
|
+
}
|
|
1462
|
+
else {
|
|
1463
|
+
return item;
|
|
1464
|
+
}
|
|
1465
|
+
});
|
|
1466
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
1467
|
+
}
|
|
1468
|
+
return next(request);
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1472
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
1378
1473
|
}
|
|
1379
1474
|
}
|
|
1380
1475
|
|
|
1381
1476
|
exports.HanaManagementClient = HanaManagementClient;
|
|
1477
|
+
exports.getContinuationToken = getContinuationToken;
|
|
1382
1478
|
//# sourceMappingURL=index.js.map
|