@azure/arm-mixedreality 4.1.0-alpha.20221101.1 → 4.1.0-alpha.20221206.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. package/CHANGELOG.md +17 -4
  2. package/dist/index.js +214 -68
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/src/index.d.ts +1 -0
  7. package/dist-esm/src/index.d.ts.map +1 -1
  8. package/dist-esm/src/index.js +1 -0
  9. package/dist-esm/src/index.js.map +1 -1
  10. package/dist-esm/src/mixedRealityClient.d.ts +2 -0
  11. package/dist-esm/src/mixedRealityClient.d.ts.map +1 -1
  12. package/dist-esm/src/mixedRealityClient.js +49 -18
  13. package/dist-esm/src/mixedRealityClient.js.map +1 -1
  14. package/dist-esm/src/models/index.d.ts +16 -9
  15. package/dist-esm/src/models/index.d.ts.map +1 -1
  16. package/dist-esm/src/models/index.js +6 -0
  17. package/dist-esm/src/models/index.js.map +1 -1
  18. package/dist-esm/src/operations/objectAnchorsAccounts.d.ts.map +1 -1
  19. package/dist-esm/src/operations/objectAnchorsAccounts.js +37 -14
  20. package/dist-esm/src/operations/objectAnchorsAccounts.js.map +1 -1
  21. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  22. package/dist-esm/src/operations/operations.js +19 -7
  23. package/dist-esm/src/operations/operations.js.map +1 -1
  24. package/dist-esm/src/operations/remoteRenderingAccounts.d.ts.map +1 -1
  25. package/dist-esm/src/operations/remoteRenderingAccounts.js +37 -14
  26. package/dist-esm/src/operations/remoteRenderingAccounts.js.map +1 -1
  27. package/dist-esm/src/operations/spatialAnchorsAccounts.d.ts.map +1 -1
  28. package/dist-esm/src/operations/spatialAnchorsAccounts.js +37 -14
  29. package/dist-esm/src/operations/spatialAnchorsAccounts.js.map +1 -1
  30. package/dist-esm/src/pagingHelper.d.ts +13 -0
  31. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  32. package/dist-esm/src/pagingHelper.js +32 -0
  33. package/dist-esm/src/pagingHelper.js.map +1 -0
  34. package/dist-esm/test/sampleTest.js +11 -13
  35. package/dist-esm/test/sampleTest.js.map +1 -1
  36. package/package.json +12 -8
  37. package/review/arm-mixedreality.api.md +27 -28
  38. package/src/index.ts +1 -0
  39. package/src/mixedRealityClient.ts +60 -20
  40. package/src/models/index.ts +15 -9
  41. package/src/operations/objectAnchorsAccounts.ts +45 -16
  42. package/src/operations/operations.ts +21 -8
  43. package/src/operations/remoteRenderingAccounts.ts +45 -16
  44. package/src/operations/spatialAnchorsAccounts.ts +45 -16
  45. package/src/pagingHelper.ts +39 -0
  46. package/types/arm-mixedreality.d.ts +27 -9
  47. package/types/tsdoc-metadata.json +1 -1
  48. package/dist-esm/samples-dev/checkLocalNameAvailability.d.ts +0 -2
  49. package/dist-esm/samples-dev/checkLocalNameAvailability.d.ts.map +0 -1
  50. package/dist-esm/samples-dev/checkLocalNameAvailability.js +0 -34
  51. package/dist-esm/samples-dev/checkLocalNameAvailability.js.map +0 -1
  52. package/dist-esm/samples-dev/createRemoteRenderingAccount.d.ts +0 -2
  53. package/dist-esm/samples-dev/createRemoteRenderingAccount.d.ts.map +0 -1
  54. package/dist-esm/samples-dev/createRemoteRenderingAccount.js +0 -35
  55. package/dist-esm/samples-dev/createRemoteRenderingAccount.js.map +0 -1
  56. package/dist-esm/samples-dev/createSpatialAnchorAccount.d.ts +0 -2
  57. package/dist-esm/samples-dev/createSpatialAnchorAccount.d.ts.map +0 -1
  58. package/dist-esm/samples-dev/createSpatialAnchorAccount.js +0 -34
  59. package/dist-esm/samples-dev/createSpatialAnchorAccount.js.map +0 -1
  60. package/dist-esm/samples-dev/deleteRemoteRenderingAccount.d.ts +0 -2
  61. package/dist-esm/samples-dev/deleteRemoteRenderingAccount.d.ts.map +0 -1
  62. package/dist-esm/samples-dev/deleteRemoteRenderingAccount.js +0 -31
  63. package/dist-esm/samples-dev/deleteRemoteRenderingAccount.js.map +0 -1
  64. package/dist-esm/samples-dev/deleteSpatialAnchorsAccount.d.ts +0 -2
  65. package/dist-esm/samples-dev/deleteSpatialAnchorsAccount.d.ts.map +0 -1
  66. package/dist-esm/samples-dev/deleteSpatialAnchorsAccount.js +0 -31
  67. package/dist-esm/samples-dev/deleteSpatialAnchorsAccount.js.map +0 -1
  68. package/dist-esm/samples-dev/getRemoteRenderingAccount.d.ts +0 -2
  69. package/dist-esm/samples-dev/getRemoteRenderingAccount.d.ts.map +0 -1
  70. package/dist-esm/samples-dev/getRemoteRenderingAccount.js +0 -31
  71. package/dist-esm/samples-dev/getRemoteRenderingAccount.js.map +0 -1
  72. package/dist-esm/samples-dev/getSpatialAnchorsAccount.d.ts +0 -2
  73. package/dist-esm/samples-dev/getSpatialAnchorsAccount.d.ts.map +0 -1
  74. package/dist-esm/samples-dev/getSpatialAnchorsAccount.js +0 -31
  75. package/dist-esm/samples-dev/getSpatialAnchorsAccount.js.map +0 -1
  76. package/dist-esm/samples-dev/listAvailableOperations.d.ts +0 -2
  77. package/dist-esm/samples-dev/listAvailableOperations.d.ts.map +0 -1
  78. package/dist-esm/samples-dev/listAvailableOperations.js +0 -43
  79. package/dist-esm/samples-dev/listAvailableOperations.js.map +0 -1
  80. package/dist-esm/samples-dev/listRemoteRenderingAccountKey.d.ts +0 -2
  81. package/dist-esm/samples-dev/listRemoteRenderingAccountKey.d.ts.map +0 -1
  82. package/dist-esm/samples-dev/listRemoteRenderingAccountKey.js +0 -31
  83. package/dist-esm/samples-dev/listRemoteRenderingAccountKey.js.map +0 -1
  84. package/dist-esm/samples-dev/listRemoteRenderingAccountsByResourceGroup.d.ts +0 -2
  85. package/dist-esm/samples-dev/listRemoteRenderingAccountsByResourceGroup.d.ts.map +0 -1
  86. package/dist-esm/samples-dev/listRemoteRenderingAccountsByResourceGroup.js +0 -44
  87. package/dist-esm/samples-dev/listRemoteRenderingAccountsByResourceGroup.js.map +0 -1
  88. package/dist-esm/samples-dev/listRemoteRenderingAccountsBySubscription.d.ts +0 -2
  89. package/dist-esm/samples-dev/listRemoteRenderingAccountsBySubscription.d.ts.map +0 -1
  90. package/dist-esm/samples-dev/listRemoteRenderingAccountsBySubscription.js +0 -43
  91. package/dist-esm/samples-dev/listRemoteRenderingAccountsBySubscription.js.map +0 -1
  92. package/dist-esm/samples-dev/listSpatialAnchorAccountKey.d.ts +0 -2
  93. package/dist-esm/samples-dev/listSpatialAnchorAccountKey.d.ts.map +0 -1
  94. package/dist-esm/samples-dev/listSpatialAnchorAccountKey.js +0 -31
  95. package/dist-esm/samples-dev/listSpatialAnchorAccountKey.js.map +0 -1
  96. package/dist-esm/samples-dev/listSpatialAnchorAccountsByResourceGroup.d.ts +0 -2
  97. package/dist-esm/samples-dev/listSpatialAnchorAccountsByResourceGroup.d.ts.map +0 -1
  98. package/dist-esm/samples-dev/listSpatialAnchorAccountsByResourceGroup.js +0 -44
  99. package/dist-esm/samples-dev/listSpatialAnchorAccountsByResourceGroup.js.map +0 -1
  100. package/dist-esm/samples-dev/listSpatialAnchorsAccountsBySubscription.d.ts +0 -2
  101. package/dist-esm/samples-dev/listSpatialAnchorsAccountsBySubscription.d.ts.map +0 -1
  102. package/dist-esm/samples-dev/listSpatialAnchorsAccountsBySubscription.js +0 -43
  103. package/dist-esm/samples-dev/listSpatialAnchorsAccountsBySubscription.js.map +0 -1
  104. package/dist-esm/samples-dev/regenerateRemoteRenderingAccountKeys.d.ts +0 -2
  105. package/dist-esm/samples-dev/regenerateRemoteRenderingAccountKeys.d.ts.map +0 -1
  106. package/dist-esm/samples-dev/regenerateRemoteRenderingAccountKeys.js +0 -32
  107. package/dist-esm/samples-dev/regenerateRemoteRenderingAccountKeys.js.map +0 -1
  108. package/dist-esm/samples-dev/regenerateSpatialAnchorsAccountKeys.d.ts +0 -2
  109. package/dist-esm/samples-dev/regenerateSpatialAnchorsAccountKeys.d.ts.map +0 -1
  110. package/dist-esm/samples-dev/regenerateSpatialAnchorsAccountKeys.js +0 -32
  111. package/dist-esm/samples-dev/regenerateSpatialAnchorsAccountKeys.js.map +0 -1
  112. package/dist-esm/samples-dev/updateRemoteRenderingAccount.d.ts +0 -2
  113. package/dist-esm/samples-dev/updateRemoteRenderingAccount.d.ts.map +0 -1
  114. package/dist-esm/samples-dev/updateRemoteRenderingAccount.js +0 -36
  115. package/dist-esm/samples-dev/updateRemoteRenderingAccount.js.map +0 -1
  116. package/dist-esm/samples-dev/updateSpatialAnchorsAccount.d.ts +0 -2
  117. package/dist-esm/samples-dev/updateSpatialAnchorsAccount.d.ts.map +0 -1
  118. package/dist-esm/samples-dev/updateSpatialAnchorsAccount.js +0 -35
  119. package/dist-esm/samples-dev/updateSpatialAnchorsAccount.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # Release History
2
-
3
- ## 4.1.0-beta.1 (2022-04-25)
2
+
3
+ ## 4.1.0-beta.2 (Unreleased)
4
+
5
+ ### Features Added
6
+
7
+ ### Breaking Changes
8
+
9
+ ### Bugs Fixed
10
+
11
+ ### Other Changes
12
+
13
+ ## 4.1.0-beta.1 (2022-12-01)
4
14
 
5
15
  **Features**
6
16
 
7
17
  - Added operation group ObjectAnchorsAccounts
18
+ - Added Interface ObjectAnchorsAccount
19
+ - Added Interface ObjectAnchorsAccountIdentity
8
20
  - Added Interface ObjectAnchorsAccountPage
9
21
  - Added Interface ObjectAnchorsAccountsCreateOptionalParams
10
22
  - Added Interface ObjectAnchorsAccountsDeleteOptionalParams
@@ -16,8 +28,9 @@
16
28
  - Added Interface ObjectAnchorsAccountsListKeysOptionalParams
17
29
  - Added Interface ObjectAnchorsAccountsRegenerateKeysOptionalParams
18
30
  - Added Interface ObjectAnchorsAccountsUpdateOptionalParams
19
- - Added Type Alias ObjectAnchorsAccount
20
- - Added Type Alias ObjectAnchorsAccountIdentity
31
+ - Added Interface RemoteRenderingAccount
32
+ - Added Interface SpatialAnchorsAccount
33
+ - Added Interface TrackedResource
21
34
  - Added Type Alias ObjectAnchorsAccountsCreateResponse
22
35
  - Added Type Alias ObjectAnchorsAccountsGetResponse
23
36
  - Added Type Alias ObjectAnchorsAccountsListByResourceGroupNextResponse
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
 
9
9
  function _interopNamespace(e) {
10
10
  if (e && e.__esModule) return e;
@@ -27,6 +27,38 @@ function _interopNamespace(e) {
27
27
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
28
28
  var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
29
29
 
30
+ /*
31
+ * Copyright (c) Microsoft Corporation.
32
+ * Licensed under the MIT License.
33
+ *
34
+ * Code generated by Microsoft (R) AutoRest Code Generator.
35
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
36
+ */
37
+ const pageMap = new WeakMap();
38
+ /**
39
+ * Given a result page from a pageable operation, returns a
40
+ * continuation token that can be used to begin paging from
41
+ * that point later.
42
+ * @param page A result object from calling .byPage() on a paged operation.
43
+ * @returns The continuation token that can be passed into byPage().
44
+ */
45
+ function getContinuationToken(page) {
46
+ var _a;
47
+ if (typeof page !== "object" || page === null) {
48
+ return undefined;
49
+ }
50
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
51
+ }
52
+ function setContinuationToken(page, continuationToken) {
53
+ var _a;
54
+ if (typeof page !== "object" || page === null || !continuationToken) {
55
+ return;
56
+ }
57
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
58
+ pageInfo.continuationToken = continuationToken;
59
+ pageMap.set(page, pageInfo);
60
+ }
61
+
30
62
  /*
31
63
  * Copyright (c) Microsoft Corporation.
32
64
  * Licensed under the MIT License.
@@ -37,15 +69,21 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
37
69
  /** Known values of {@link NameUnavailableReason} that the service accepts. */
38
70
  exports.KnownNameUnavailableReason = void 0;
39
71
  (function (KnownNameUnavailableReason) {
72
+ /** Invalid */
40
73
  KnownNameUnavailableReason["Invalid"] = "Invalid";
74
+ /** AlreadyExists */
41
75
  KnownNameUnavailableReason["AlreadyExists"] = "AlreadyExists";
42
76
  })(exports.KnownNameUnavailableReason || (exports.KnownNameUnavailableReason = {}));
43
77
  /** Known values of {@link CreatedByType} that the service accepts. */
44
78
  exports.KnownCreatedByType = void 0;
45
79
  (function (KnownCreatedByType) {
80
+ /** User */
46
81
  KnownCreatedByType["User"] = "User";
82
+ /** Application */
47
83
  KnownCreatedByType["Application"] = "Application";
84
+ /** ManagedIdentity */
48
85
  KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
86
+ /** Key */
49
87
  KnownCreatedByType["Key"] = "Key";
50
88
  })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
51
89
 
@@ -1131,20 +1169,31 @@ class OperationsImpl {
1131
1169
  [Symbol.asyncIterator]() {
1132
1170
  return this;
1133
1171
  },
1134
- byPage: () => {
1135
- return this.listPagingPage(options);
1172
+ byPage: (settings) => {
1173
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1174
+ throw new Error("maxPageSize is not supported by this operation.");
1175
+ }
1176
+ return this.listPagingPage(options, settings);
1136
1177
  }
1137
1178
  };
1138
1179
  }
1139
- listPagingPage(options) {
1180
+ listPagingPage(options, settings) {
1140
1181
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1141
- let result = yield tslib.__await(this._list(options));
1142
- yield yield tslib.__await(result.value || []);
1143
- let continuationToken = result.nextLink;
1182
+ let result;
1183
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1184
+ if (!continuationToken) {
1185
+ result = yield tslib.__await(this._list(options));
1186
+ let page = result.value || [];
1187
+ continuationToken = result.nextLink;
1188
+ setContinuationToken(page, continuationToken);
1189
+ yield yield tslib.__await(page);
1190
+ }
1144
1191
  while (continuationToken) {
1145
1192
  result = yield tslib.__await(this._listNext(continuationToken, options));
1146
1193
  continuationToken = result.nextLink;
1147
- yield yield tslib.__await(result.value || []);
1194
+ let page = result.value || [];
1195
+ setContinuationToken(page, continuationToken);
1196
+ yield yield tslib.__await(page);
1148
1197
  }
1149
1198
  });
1150
1199
  }
@@ -1247,20 +1296,31 @@ class SpatialAnchorsAccountsImpl {
1247
1296
  [Symbol.asyncIterator]() {
1248
1297
  return this;
1249
1298
  },
1250
- byPage: () => {
1251
- return this.listBySubscriptionPagingPage(options);
1299
+ byPage: (settings) => {
1300
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1301
+ throw new Error("maxPageSize is not supported by this operation.");
1302
+ }
1303
+ return this.listBySubscriptionPagingPage(options, settings);
1252
1304
  }
1253
1305
  };
1254
1306
  }
1255
- listBySubscriptionPagingPage(options) {
1307
+ listBySubscriptionPagingPage(options, settings) {
1256
1308
  return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
1257
- let result = yield tslib.__await(this._listBySubscription(options));
1258
- yield yield tslib.__await(result.value || []);
1259
- let continuationToken = result.nextLink;
1309
+ let result;
1310
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1311
+ if (!continuationToken) {
1312
+ result = yield tslib.__await(this._listBySubscription(options));
1313
+ let page = result.value || [];
1314
+ continuationToken = result.nextLink;
1315
+ setContinuationToken(page, continuationToken);
1316
+ yield yield tslib.__await(page);
1317
+ }
1260
1318
  while (continuationToken) {
1261
1319
  result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
1262
1320
  continuationToken = result.nextLink;
1263
- yield yield tslib.__await(result.value || []);
1321
+ let page = result.value || [];
1322
+ setContinuationToken(page, continuationToken);
1323
+ yield yield tslib.__await(page);
1264
1324
  }
1265
1325
  });
1266
1326
  }
@@ -1296,20 +1356,31 @@ class SpatialAnchorsAccountsImpl {
1296
1356
  [Symbol.asyncIterator]() {
1297
1357
  return this;
1298
1358
  },
1299
- byPage: () => {
1300
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
1359
+ byPage: (settings) => {
1360
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1361
+ throw new Error("maxPageSize is not supported by this operation.");
1362
+ }
1363
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
1301
1364
  }
1302
1365
  };
1303
1366
  }
1304
- listByResourceGroupPagingPage(resourceGroupName, options) {
1367
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
1305
1368
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
1306
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1307
- yield yield tslib.__await(result.value || []);
1308
- let continuationToken = result.nextLink;
1369
+ let result;
1370
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1371
+ if (!continuationToken) {
1372
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1373
+ let page = result.value || [];
1374
+ continuationToken = result.nextLink;
1375
+ setContinuationToken(page, continuationToken);
1376
+ yield yield tslib.__await(page);
1377
+ }
1309
1378
  while (continuationToken) {
1310
1379
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
1311
1380
  continuationToken = result.nextLink;
1312
- yield yield tslib.__await(result.value || []);
1381
+ let page = result.value || [];
1382
+ setContinuationToken(page, continuationToken);
1383
+ yield yield tslib.__await(page);
1313
1384
  }
1314
1385
  });
1315
1386
  }
@@ -1665,20 +1736,31 @@ class RemoteRenderingAccountsImpl {
1665
1736
  [Symbol.asyncIterator]() {
1666
1737
  return this;
1667
1738
  },
1668
- byPage: () => {
1669
- return this.listBySubscriptionPagingPage(options);
1739
+ byPage: (settings) => {
1740
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1741
+ throw new Error("maxPageSize is not supported by this operation.");
1742
+ }
1743
+ return this.listBySubscriptionPagingPage(options, settings);
1670
1744
  }
1671
1745
  };
1672
1746
  }
1673
- listBySubscriptionPagingPage(options) {
1747
+ listBySubscriptionPagingPage(options, settings) {
1674
1748
  return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
1675
- let result = yield tslib.__await(this._listBySubscription(options));
1676
- yield yield tslib.__await(result.value || []);
1677
- let continuationToken = result.nextLink;
1749
+ let result;
1750
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1751
+ if (!continuationToken) {
1752
+ result = yield tslib.__await(this._listBySubscription(options));
1753
+ let page = result.value || [];
1754
+ continuationToken = result.nextLink;
1755
+ setContinuationToken(page, continuationToken);
1756
+ yield yield tslib.__await(page);
1757
+ }
1678
1758
  while (continuationToken) {
1679
1759
  result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
1680
1760
  continuationToken = result.nextLink;
1681
- yield yield tslib.__await(result.value || []);
1761
+ let page = result.value || [];
1762
+ setContinuationToken(page, continuationToken);
1763
+ yield yield tslib.__await(page);
1682
1764
  }
1683
1765
  });
1684
1766
  }
@@ -1714,20 +1796,31 @@ class RemoteRenderingAccountsImpl {
1714
1796
  [Symbol.asyncIterator]() {
1715
1797
  return this;
1716
1798
  },
1717
- byPage: () => {
1718
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
1799
+ byPage: (settings) => {
1800
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1801
+ throw new Error("maxPageSize is not supported by this operation.");
1802
+ }
1803
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
1719
1804
  }
1720
1805
  };
1721
1806
  }
1722
- listByResourceGroupPagingPage(resourceGroupName, options) {
1807
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
1723
1808
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
1724
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1725
- yield yield tslib.__await(result.value || []);
1726
- let continuationToken = result.nextLink;
1809
+ let result;
1810
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1811
+ if (!continuationToken) {
1812
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1813
+ let page = result.value || [];
1814
+ continuationToken = result.nextLink;
1815
+ setContinuationToken(page, continuationToken);
1816
+ yield yield tslib.__await(page);
1817
+ }
1727
1818
  while (continuationToken) {
1728
1819
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
1729
1820
  continuationToken = result.nextLink;
1730
- yield yield tslib.__await(result.value || []);
1821
+ let page = result.value || [];
1822
+ setContinuationToken(page, continuationToken);
1823
+ yield yield tslib.__await(page);
1731
1824
  }
1732
1825
  });
1733
1826
  }
@@ -2083,20 +2176,31 @@ class ObjectAnchorsAccountsImpl {
2083
2176
  [Symbol.asyncIterator]() {
2084
2177
  return this;
2085
2178
  },
2086
- byPage: () => {
2087
- return this.listBySubscriptionPagingPage(options);
2179
+ byPage: (settings) => {
2180
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2181
+ throw new Error("maxPageSize is not supported by this operation.");
2182
+ }
2183
+ return this.listBySubscriptionPagingPage(options, settings);
2088
2184
  }
2089
2185
  };
2090
2186
  }
2091
- listBySubscriptionPagingPage(options) {
2187
+ listBySubscriptionPagingPage(options, settings) {
2092
2188
  return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
2093
- let result = yield tslib.__await(this._listBySubscription(options));
2094
- yield yield tslib.__await(result.value || []);
2095
- let continuationToken = result.nextLink;
2189
+ let result;
2190
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2191
+ if (!continuationToken) {
2192
+ result = yield tslib.__await(this._listBySubscription(options));
2193
+ let page = result.value || [];
2194
+ continuationToken = result.nextLink;
2195
+ setContinuationToken(page, continuationToken);
2196
+ yield yield tslib.__await(page);
2197
+ }
2096
2198
  while (continuationToken) {
2097
2199
  result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
2098
2200
  continuationToken = result.nextLink;
2099
- yield yield tslib.__await(result.value || []);
2201
+ let page = result.value || [];
2202
+ setContinuationToken(page, continuationToken);
2203
+ yield yield tslib.__await(page);
2100
2204
  }
2101
2205
  });
2102
2206
  }
@@ -2132,20 +2236,31 @@ class ObjectAnchorsAccountsImpl {
2132
2236
  [Symbol.asyncIterator]() {
2133
2237
  return this;
2134
2238
  },
2135
- byPage: () => {
2136
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
2239
+ byPage: (settings) => {
2240
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2241
+ throw new Error("maxPageSize is not supported by this operation.");
2242
+ }
2243
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
2137
2244
  }
2138
2245
  };
2139
2246
  }
2140
- listByResourceGroupPagingPage(resourceGroupName, options) {
2247
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
2141
2248
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
2142
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2143
- yield yield tslib.__await(result.value || []);
2144
- let continuationToken = result.nextLink;
2249
+ let result;
2250
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2251
+ if (!continuationToken) {
2252
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2253
+ let page = result.value || [];
2254
+ continuationToken = result.nextLink;
2255
+ setContinuationToken(page, continuationToken);
2256
+ yield yield tslib.__await(page);
2257
+ }
2145
2258
  while (continuationToken) {
2146
2259
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
2147
2260
  continuationToken = result.nextLink;
2148
- yield yield tslib.__await(result.value || []);
2261
+ let page = result.value || [];
2262
+ setContinuationToken(page, continuationToken);
2263
+ yield yield tslib.__await(page);
2149
2264
  }
2150
2265
  });
2151
2266
  }
@@ -2487,7 +2602,7 @@ class MixedRealityClient extends coreClient__namespace.ServiceClient {
2487
2602
  * @param options The parameter options
2488
2603
  */
2489
2604
  constructor(credentials, subscriptionId, options) {
2490
- var _a, _b;
2605
+ var _a, _b, _c;
2491
2606
  if (credentials === undefined) {
2492
2607
  throw new Error("'credentials' cannot be null");
2493
2608
  }
@@ -2502,32 +2617,34 @@ class MixedRealityClient extends coreClient__namespace.ServiceClient {
2502
2617
  requestContentType: "application/json; charset=utf-8",
2503
2618
  credential: credentials
2504
2619
  };
2505
- const packageDetails = `azsdk-js-arm-mixedreality/4.1.0-beta.1`;
2620
+ const packageDetails = `azsdk-js-arm-mixedreality/4.1.0-beta.2`;
2506
2621
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2507
2622
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2508
2623
  : `${packageDetails}`;
2509
- if (!options.credentialScopes) {
2510
- options.credentialScopes = ["https://management.azure.com/.default"];
2511
- }
2512
2624
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2513
2625
  userAgentPrefix
2514
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
2626
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
2515
2627
  super(optionsWithDefaults);
2628
+ let bearerTokenAuthenticationPolicyFound = false;
2516
2629
  if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
2517
2630
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
2518
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
2631
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
2519
2632
  coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
2520
- if (!bearerTokenAuthenticationPolicyFound) {
2521
- this.pipeline.removePolicy({
2522
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
2523
- });
2524
- this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
2525
- scopes: `${optionsWithDefaults.baseUri}/.default`,
2526
- challengeCallbacks: {
2527
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
2528
- }
2529
- }));
2530
- }
2633
+ }
2634
+ if (!options ||
2635
+ !options.pipeline ||
2636
+ options.pipeline.getOrderedPolicies().length == 0 ||
2637
+ !bearerTokenAuthenticationPolicyFound) {
2638
+ this.pipeline.removePolicy({
2639
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
2640
+ });
2641
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
2642
+ credential: credentials,
2643
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
2644
+ challengeCallbacks: {
2645
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
2646
+ }
2647
+ }));
2531
2648
  }
2532
2649
  // Parameter assignments
2533
2650
  this.subscriptionId = subscriptionId;
@@ -2538,6 +2655,34 @@ class MixedRealityClient extends coreClient__namespace.ServiceClient {
2538
2655
  this.spatialAnchorsAccounts = new SpatialAnchorsAccountsImpl(this);
2539
2656
  this.remoteRenderingAccounts = new RemoteRenderingAccountsImpl(this);
2540
2657
  this.objectAnchorsAccounts = new ObjectAnchorsAccountsImpl(this);
2658
+ this.addCustomApiVersionPolicy(options.apiVersion);
2659
+ }
2660
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
2661
+ addCustomApiVersionPolicy(apiVersion) {
2662
+ if (!apiVersion) {
2663
+ return;
2664
+ }
2665
+ const apiVersionPolicy = {
2666
+ name: "CustomApiVersionPolicy",
2667
+ sendRequest(request, next) {
2668
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2669
+ const param = request.url.split("?");
2670
+ if (param.length > 1) {
2671
+ const newParams = param[1].split("&").map((item) => {
2672
+ if (item.indexOf("api-version") > -1) {
2673
+ return "api-version=" + apiVersion;
2674
+ }
2675
+ else {
2676
+ return item;
2677
+ }
2678
+ });
2679
+ request.url = param[0] + "?" + newParams.join("&");
2680
+ }
2681
+ return next(request);
2682
+ });
2683
+ }
2684
+ };
2685
+ this.pipeline.addPolicy(apiVersionPolicy);
2541
2686
  }
2542
2687
  /**
2543
2688
  * Check Name Availability for local uniqueness
@@ -2575,4 +2720,5 @@ const checkNameAvailabilityLocalOperationSpec = {
2575
2720
  };
2576
2721
 
2577
2722
  exports.MixedRealityClient = MixedRealityClient;
2723
+ exports.getContinuationToken = getContinuationToken;
2578
2724
  //# sourceMappingURL=index.js.map