@azure/arm-privatedns 3.1.1-alpha.20230512.1 → 3.2.0

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +14 -11
  2. package/LICENSE +1 -1
  3. package/dist/index.js +81 -73
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/privateZonesCreateOrUpdateSample.js +10 -3
  8. package/dist-esm/samples-dev/privateZonesCreateOrUpdateSample.js.map +1 -1
  9. package/dist-esm/samples-dev/privateZonesDeleteSample.js +10 -3
  10. package/dist-esm/samples-dev/privateZonesDeleteSample.js.map +1 -1
  11. package/dist-esm/samples-dev/privateZonesGetSample.js +10 -3
  12. package/dist-esm/samples-dev/privateZonesGetSample.js.map +1 -1
  13. package/dist-esm/samples-dev/privateZonesListByResourceGroupSample.js +10 -3
  14. package/dist-esm/samples-dev/privateZonesListByResourceGroupSample.js.map +1 -1
  15. package/dist-esm/samples-dev/privateZonesListSample.js +9 -2
  16. package/dist-esm/samples-dev/privateZonesListSample.js.map +1 -1
  17. package/dist-esm/samples-dev/privateZonesUpdateSample.js +10 -3
  18. package/dist-esm/samples-dev/privateZonesUpdateSample.js.map +1 -1
  19. package/dist-esm/samples-dev/recordSetsCreateOrUpdateSample.js +31 -24
  20. package/dist-esm/samples-dev/recordSetsCreateOrUpdateSample.js.map +1 -1
  21. package/dist-esm/samples-dev/recordSetsDeleteSample.js +28 -21
  22. package/dist-esm/samples-dev/recordSetsDeleteSample.js.map +1 -1
  23. package/dist-esm/samples-dev/recordSetsGetSample.js +31 -24
  24. package/dist-esm/samples-dev/recordSetsGetSample.js.map +1 -1
  25. package/dist-esm/samples-dev/recordSetsListByTypeSample.js +31 -24
  26. package/dist-esm/samples-dev/recordSetsListByTypeSample.js.map +1 -1
  27. package/dist-esm/samples-dev/recordSetsListSample.js +10 -3
  28. package/dist-esm/samples-dev/recordSetsListSample.js.map +1 -1
  29. package/dist-esm/samples-dev/recordSetsUpdateSample.js +31 -24
  30. package/dist-esm/samples-dev/recordSetsUpdateSample.js.map +1 -1
  31. package/dist-esm/samples-dev/virtualNetworkLinksCreateOrUpdateSample.js +10 -3
  32. package/dist-esm/samples-dev/virtualNetworkLinksCreateOrUpdateSample.js.map +1 -1
  33. package/dist-esm/samples-dev/virtualNetworkLinksDeleteSample.js +10 -3
  34. package/dist-esm/samples-dev/virtualNetworkLinksDeleteSample.js.map +1 -1
  35. package/dist-esm/samples-dev/virtualNetworkLinksGetSample.js +10 -3
  36. package/dist-esm/samples-dev/virtualNetworkLinksGetSample.js.map +1 -1
  37. package/dist-esm/samples-dev/virtualNetworkLinksListSample.js +10 -3
  38. package/dist-esm/samples-dev/virtualNetworkLinksListSample.js.map +1 -1
  39. package/dist-esm/samples-dev/virtualNetworkLinksUpdateSample.js +10 -3
  40. package/dist-esm/samples-dev/virtualNetworkLinksUpdateSample.js.map +1 -1
  41. package/dist-esm/src/lroImpl.d.ts +6 -11
  42. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  43. package/dist-esm/src/lroImpl.js +12 -20
  44. package/dist-esm/src/lroImpl.js.map +1 -1
  45. package/dist-esm/src/models/index.d.ts +0 -14
  46. package/dist-esm/src/models/index.d.ts.map +1 -1
  47. package/dist-esm/src/operations/privateZones.d.ts +4 -4
  48. package/dist-esm/src/operations/privateZones.d.ts.map +1 -1
  49. package/dist-esm/src/operations/privateZones.js +26 -16
  50. package/dist-esm/src/operations/privateZones.js.map +1 -1
  51. package/dist-esm/src/operations/recordSets.js +0 -10
  52. package/dist-esm/src/operations/recordSets.js.map +1 -1
  53. package/dist-esm/src/operations/virtualNetworkLinks.d.ts +4 -4
  54. package/dist-esm/src/operations/virtualNetworkLinks.d.ts.map +1 -1
  55. package/dist-esm/src/operations/virtualNetworkLinks.js +43 -27
  56. package/dist-esm/src/operations/virtualNetworkLinks.js.map +1 -1
  57. package/dist-esm/src/operationsInterfaces/privateZones.d.ts +4 -4
  58. package/dist-esm/src/operationsInterfaces/privateZones.d.ts.map +1 -1
  59. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.d.ts +4 -4
  60. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.d.ts.map +1 -1
  61. package/dist-esm/src/pagingHelper.d.ts +4 -4
  62. package/dist-esm/src/pagingHelper.js +4 -4
  63. package/dist-esm/src/privateDnsManagementClient.js +1 -1
  64. package/dist-esm/test/privatedns_operations_test.spec.d.ts +4 -0
  65. package/dist-esm/test/privatedns_operations_test.spec.d.ts.map +1 -0
  66. package/dist-esm/test/privatedns_operations_test.spec.js +121 -0
  67. package/dist-esm/test/privatedns_operations_test.spec.js.map +1 -0
  68. package/package.json +7 -6
  69. package/review/arm-privatedns.api.md +8 -15
  70. package/src/lroImpl.ts +31 -23
  71. package/src/models/index.ts +5 -24
  72. package/src/operations/privateZones.ts +41 -33
  73. package/src/operations/recordSets.ts +0 -10
  74. package/src/operations/virtualNetworkLinks.ts +46 -32
  75. package/src/operationsInterfaces/privateZones.ts +6 -6
  76. package/src/operationsInterfaces/virtualNetworkLinks.ts +6 -6
  77. package/src/pagingHelper.ts +4 -4
  78. package/src/privateDnsManagementClient.ts +1 -1
  79. package/types/arm-privatedns.d.ts +12 -26
  80. package/dist-esm/test/sampleTest.d.ts +0 -2
  81. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  82. package/dist-esm/test/sampleTest.js +0 -38
  83. package/dist-esm/test/sampleTest.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,15 +1,18 @@
1
1
  # Release History
2
+
3
+ ## 3.2.0 (2023-05-10)
4
+
5
+ **Features**
2
6
 
3
- ## 3.1.1 (Unreleased)
4
-
5
- ### Features Added
6
-
7
- ### Breaking Changes
8
-
9
- ### Bugs Fixed
10
-
11
- ### Other Changes
12
-
7
+ - Interface PrivateZonesListByResourceGroupNextOptionalParams no longer has parameter top
8
+ - Interface PrivateZonesListNextOptionalParams no longer has parameter top
9
+ - Interface RecordSetsListByTypeNextOptionalParams no longer has parameter recordsetnamesuffix
10
+ - Interface RecordSetsListByTypeNextOptionalParams no longer has parameter top
11
+ - Interface RecordSetsListNextOptionalParams no longer has parameter recordsetnamesuffix
12
+ - Interface RecordSetsListNextOptionalParams no longer has parameter top
13
+ - Interface VirtualNetworkLinksListNextOptionalParams no longer has parameter top
14
+
15
+
13
16
  ## 3.1.0 (2022-12-02)
14
17
 
15
18
  **Features**
@@ -21,7 +24,7 @@
21
24
  - Added Interface VirtualNetworkLink
22
25
 
23
26
 
24
- ## 3.0.1 (2022-04-28)
27
+ ### 3.0.1 (2022-04-28)
25
28
 
26
29
  **Features**
27
30
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 Microsoft
3
+ Copyright (c) 2023 Microsoft
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.js CHANGED
@@ -37,11 +37,11 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
37
37
  */
38
38
  const pageMap = new WeakMap();
39
39
  /**
40
- * Given a result page from a pageable operation, returns a
41
- * continuation token that can be used to begin paging from
40
+ * Given the last `.value` produced by the `byPage` iterator,
41
+ * returns a continuation token that can be used to begin paging from
42
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().
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
45
  */
46
46
  function getContinuationToken(page) {
47
47
  var _a;
@@ -891,25 +891,17 @@ const recordsetnamesuffix = {
891
891
  * Code generated by Microsoft (R) AutoRest Code Generator.
892
892
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
893
893
  */
894
- class LroImpl {
895
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
896
- this.sendOperationFn = sendOperationFn;
897
- this.args = args;
898
- this.spec = spec;
899
- this.requestPath = requestPath;
900
- this.requestMethod = requestMethod;
901
- }
902
- sendInitialRequest() {
903
- return tslib.__awaiter(this, void 0, void 0, function* () {
904
- return this.sendOperationFn(this.args, this.spec);
905
- });
906
- }
907
- sendPollRequest(path) {
908
- return tslib.__awaiter(this, void 0, void 0, function* () {
909
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
910
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
911
- });
912
- }
894
+ function createLroSpec(inputs) {
895
+ const { args, spec, sendOperationFn } = inputs;
896
+ return {
897
+ requestMethod: spec.httpMethod,
898
+ requestPath: spec.path,
899
+ sendInitialRequest: () => sendOperationFn(args, spec),
900
+ sendPollRequest: (path, options) => {
901
+ const restSpec = tslib.__rest(spec, ["requestBody"]);
902
+ return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
903
+ }
904
+ };
913
905
  }
914
906
 
915
907
  /*
@@ -1075,7 +1067,7 @@ class PrivateZonesImpl {
1075
1067
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1076
1068
  return this.client.sendOperationRequest(args, spec);
1077
1069
  });
1078
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1070
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1079
1071
  var _a;
1080
1072
  let currentRawResponse = undefined;
1081
1073
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1094,9 +1086,13 @@ class PrivateZonesImpl {
1094
1086
  }
1095
1087
  };
1096
1088
  });
1097
- const lro = new LroImpl(sendOperation, { resourceGroupName, privateZoneName, parameters, options }, createOrUpdateOperationSpec$2);
1098
- const poller = new coreLro.LroEngine(lro, {
1099
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1089
+ const lro = createLroSpec({
1090
+ sendOperationFn,
1091
+ args: { resourceGroupName, privateZoneName, parameters, options },
1092
+ spec: createOrUpdateOperationSpec$2
1093
+ });
1094
+ const poller = yield coreLro.createHttpPoller(lro, {
1095
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1100
1096
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1101
1097
  });
1102
1098
  yield poller.poll();
@@ -1129,7 +1125,7 @@ class PrivateZonesImpl {
1129
1125
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1130
1126
  return this.client.sendOperationRequest(args, spec);
1131
1127
  });
1132
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1128
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1133
1129
  var _a;
1134
1130
  let currentRawResponse = undefined;
1135
1131
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1148,9 +1144,13 @@ class PrivateZonesImpl {
1148
1144
  }
1149
1145
  };
1150
1146
  });
1151
- const lro = new LroImpl(sendOperation, { resourceGroupName, privateZoneName, parameters, options }, updateOperationSpec$2);
1152
- const poller = new coreLro.LroEngine(lro, {
1153
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1147
+ const lro = createLroSpec({
1148
+ sendOperationFn,
1149
+ args: { resourceGroupName, privateZoneName, parameters, options },
1150
+ spec: updateOperationSpec$2
1151
+ });
1152
+ const poller = yield coreLro.createHttpPoller(lro, {
1153
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1154
1154
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1155
1155
  });
1156
1156
  yield poller.poll();
@@ -1183,7 +1183,7 @@ class PrivateZonesImpl {
1183
1183
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1184
1184
  return this.client.sendOperationRequest(args, spec);
1185
1185
  });
1186
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1186
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1187
1187
  var _a;
1188
1188
  let currentRawResponse = undefined;
1189
1189
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1202,9 +1202,13 @@ class PrivateZonesImpl {
1202
1202
  }
1203
1203
  };
1204
1204
  });
1205
- const lro = new LroImpl(sendOperation, { resourceGroupName, privateZoneName, options }, deleteOperationSpec$2);
1206
- const poller = new coreLro.LroEngine(lro, {
1207
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1205
+ const lro = createLroSpec({
1206
+ sendOperationFn,
1207
+ args: { resourceGroupName, privateZoneName, options },
1208
+ spec: deleteOperationSpec$2
1209
+ });
1210
+ const poller = yield coreLro.createHttpPoller(lro, {
1211
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1208
1212
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1209
1213
  });
1210
1214
  yield poller.poll();
@@ -1433,7 +1437,6 @@ const listNextOperationSpec$2 = {
1433
1437
  bodyMapper: CloudError
1434
1438
  }
1435
1439
  },
1436
- queryParameters: [apiVersion, top],
1437
1440
  urlParameters: [
1438
1441
  $host,
1439
1442
  subscriptionId,
@@ -1453,7 +1456,6 @@ const listByResourceGroupNextOperationSpec = {
1453
1456
  bodyMapper: CloudError
1454
1457
  }
1455
1458
  },
1456
- queryParameters: [apiVersion, top],
1457
1459
  urlParameters: [
1458
1460
  $host,
1459
1461
  resourceGroupName,
@@ -1562,7 +1564,7 @@ class VirtualNetworkLinksImpl {
1562
1564
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1563
1565
  return this.client.sendOperationRequest(args, spec);
1564
1566
  });
1565
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1567
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1566
1568
  var _a;
1567
1569
  let currentRawResponse = undefined;
1568
1570
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1581,15 +1583,19 @@ class VirtualNetworkLinksImpl {
1581
1583
  }
1582
1584
  };
1583
1585
  });
1584
- const lro = new LroImpl(sendOperation, {
1585
- resourceGroupName,
1586
- privateZoneName,
1587
- virtualNetworkLinkName,
1588
- parameters,
1589
- options
1590
- }, createOrUpdateOperationSpec$1);
1591
- const poller = new coreLro.LroEngine(lro, {
1592
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1586
+ const lro = createLroSpec({
1587
+ sendOperationFn,
1588
+ args: {
1589
+ resourceGroupName,
1590
+ privateZoneName,
1591
+ virtualNetworkLinkName,
1592
+ parameters,
1593
+ options
1594
+ },
1595
+ spec: createOrUpdateOperationSpec$1
1596
+ });
1597
+ const poller = yield coreLro.createHttpPoller(lro, {
1598
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1593
1599
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1594
1600
  });
1595
1601
  yield poller.poll();
@@ -1623,7 +1629,7 @@ class VirtualNetworkLinksImpl {
1623
1629
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1624
1630
  return this.client.sendOperationRequest(args, spec);
1625
1631
  });
1626
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1632
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1627
1633
  var _a;
1628
1634
  let currentRawResponse = undefined;
1629
1635
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1642,15 +1648,19 @@ class VirtualNetworkLinksImpl {
1642
1648
  }
1643
1649
  };
1644
1650
  });
1645
- const lro = new LroImpl(sendOperation, {
1646
- resourceGroupName,
1647
- privateZoneName,
1648
- virtualNetworkLinkName,
1649
- parameters,
1650
- options
1651
- }, updateOperationSpec$1);
1652
- const poller = new coreLro.LroEngine(lro, {
1653
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1651
+ const lro = createLroSpec({
1652
+ sendOperationFn,
1653
+ args: {
1654
+ resourceGroupName,
1655
+ privateZoneName,
1656
+ virtualNetworkLinkName,
1657
+ parameters,
1658
+ options
1659
+ },
1660
+ spec: updateOperationSpec$1
1661
+ });
1662
+ const poller = yield coreLro.createHttpPoller(lro, {
1663
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1654
1664
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1655
1665
  });
1656
1666
  yield poller.poll();
@@ -1685,7 +1695,7 @@ class VirtualNetworkLinksImpl {
1685
1695
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1686
1696
  return this.client.sendOperationRequest(args, spec);
1687
1697
  });
1688
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1698
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1689
1699
  var _a;
1690
1700
  let currentRawResponse = undefined;
1691
1701
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -1704,9 +1714,18 @@ class VirtualNetworkLinksImpl {
1704
1714
  }
1705
1715
  };
1706
1716
  });
1707
- const lro = new LroImpl(sendOperation, { resourceGroupName, privateZoneName, virtualNetworkLinkName, options }, deleteOperationSpec$1);
1708
- const poller = new coreLro.LroEngine(lro, {
1709
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1717
+ const lro = createLroSpec({
1718
+ sendOperationFn,
1719
+ args: {
1720
+ resourceGroupName,
1721
+ privateZoneName,
1722
+ virtualNetworkLinkName,
1723
+ options
1724
+ },
1725
+ spec: deleteOperationSpec$1
1726
+ });
1727
+ const poller = yield coreLro.createHttpPoller(lro, {
1728
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1710
1729
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1711
1730
  });
1712
1731
  yield poller.poll();
@@ -1912,7 +1931,6 @@ const listNextOperationSpec$1 = {
1912
1931
  bodyMapper: CloudError
1913
1932
  }
1914
1933
  },
1915
- queryParameters: [apiVersion, top],
1916
1934
  urlParameters: [
1917
1935
  $host,
1918
1936
  resourceGroupName,
@@ -2364,11 +2382,6 @@ const listByTypeNextOperationSpec = {
2364
2382
  bodyMapper: CloudError
2365
2383
  }
2366
2384
  },
2367
- queryParameters: [
2368
- apiVersion,
2369
- top,
2370
- recordsetnamesuffix
2371
- ],
2372
2385
  urlParameters: [
2373
2386
  $host,
2374
2387
  resourceGroupName,
@@ -2391,11 +2404,6 @@ const listNextOperationSpec = {
2391
2404
  bodyMapper: CloudError
2392
2405
  }
2393
2406
  },
2394
- queryParameters: [
2395
- apiVersion,
2396
- top,
2397
- recordsetnamesuffix
2398
- ],
2399
2407
  urlParameters: [
2400
2408
  $host,
2401
2409
  resourceGroupName,
@@ -2438,7 +2446,7 @@ class PrivateDnsManagementClient extends coreClient__namespace.ServiceClient {
2438
2446
  requestContentType: "application/json; charset=utf-8",
2439
2447
  credential: credentials
2440
2448
  };
2441
- const packageDetails = `azsdk-js-arm-privatedns/3.1.1`;
2449
+ const packageDetails = `azsdk-js-arm-privatedns/3.2.0`;
2442
2450
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2443
2451
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2444
2452
  : `${packageDetails}`;