@azure/arm-healthcareapis 2.1.2-alpha.20221128.1 → 2.2.0-alpha.20221129.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/CHANGELOG.md +22 -10
  2. package/dist/index.js +316 -95
  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/healthcareApisManagementClient.d.ts +2 -0
  7. package/dist-esm/src/healthcareApisManagementClient.d.ts.map +1 -1
  8. package/dist-esm/src/healthcareApisManagementClient.js +49 -18
  9. package/dist-esm/src/healthcareApisManagementClient.js.map +1 -1
  10. package/dist-esm/src/index.d.ts +1 -0
  11. package/dist-esm/src/index.d.ts.map +1 -1
  12. package/dist-esm/src/index.js +1 -0
  13. package/dist-esm/src/index.js.map +1 -1
  14. package/dist-esm/src/models/index.d.ts +82 -29
  15. package/dist-esm/src/models/index.d.ts.map +1 -1
  16. package/dist-esm/src/models/index.js +48 -0
  17. package/dist-esm/src/models/index.js.map +1 -1
  18. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  19. package/dist-esm/src/models/mappers.js +0 -1
  20. package/dist-esm/src/models/mappers.js.map +1 -1
  21. package/dist-esm/src/operations/dicomServices.d.ts.map +1 -1
  22. package/dist-esm/src/operations/dicomServices.js +19 -7
  23. package/dist-esm/src/operations/dicomServices.js.map +1 -1
  24. package/dist-esm/src/operations/fhirDestinations.d.ts.map +1 -1
  25. package/dist-esm/src/operations/fhirDestinations.js +19 -7
  26. package/dist-esm/src/operations/fhirDestinations.js.map +1 -1
  27. package/dist-esm/src/operations/fhirServices.d.ts.map +1 -1
  28. package/dist-esm/src/operations/fhirServices.js +19 -7
  29. package/dist-esm/src/operations/fhirServices.js.map +1 -1
  30. package/dist-esm/src/operations/iotConnectors.d.ts.map +1 -1
  31. package/dist-esm/src/operations/iotConnectors.js +19 -7
  32. package/dist-esm/src/operations/iotConnectors.js.map +1 -1
  33. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  34. package/dist-esm/src/operations/operations.js +19 -7
  35. package/dist-esm/src/operations/operations.js.map +1 -1
  36. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  37. package/dist-esm/src/operations/privateEndpointConnections.js +8 -4
  38. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  39. package/dist-esm/src/operations/services.d.ts.map +1 -1
  40. package/dist-esm/src/operations/services.js +37 -14
  41. package/dist-esm/src/operations/services.js.map +1 -1
  42. package/dist-esm/src/operations/workspacePrivateEndpointConnections.d.ts.map +1 -1
  43. package/dist-esm/src/operations/workspacePrivateEndpointConnections.js +8 -4
  44. package/dist-esm/src/operations/workspacePrivateEndpointConnections.js.map +1 -1
  45. package/dist-esm/src/operations/workspacePrivateLinkResources.d.ts.map +1 -1
  46. package/dist-esm/src/operations/workspacePrivateLinkResources.js +8 -4
  47. package/dist-esm/src/operations/workspacePrivateLinkResources.js.map +1 -1
  48. package/dist-esm/src/operations/workspaces.d.ts.map +1 -1
  49. package/dist-esm/src/operations/workspaces.js +37 -14
  50. package/dist-esm/src/operations/workspaces.js.map +1 -1
  51. package/dist-esm/src/pagingHelper.d.ts +13 -0
  52. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  53. package/dist-esm/src/pagingHelper.js +32 -0
  54. package/dist-esm/src/pagingHelper.js.map +1 -0
  55. package/dist-esm/test/sampleTest.js +11 -13
  56. package/dist-esm/test/sampleTest.js.map +1 -1
  57. package/package.json +12 -8
  58. package/review/arm-healthcareapis.api.md +52 -92
  59. package/src/healthcareApisManagementClient.ts +60 -20
  60. package/src/index.ts +1 -0
  61. package/src/models/index.ts +158 -109
  62. package/src/models/mappers.ts +0 -1
  63. package/src/operations/dicomServices.ts +26 -12
  64. package/src/operations/fhirDestinations.ts +27 -13
  65. package/src/operations/fhirServices.ts +26 -12
  66. package/src/operations/iotConnectors.ts +26 -12
  67. package/src/operations/operations.ts +21 -8
  68. package/src/operations/privateEndpointConnections.ts +11 -5
  69. package/src/operations/services.ts +46 -17
  70. package/src/operations/workspacePrivateEndpointConnections.ts +11 -5
  71. package/src/operations/workspacePrivateLinkResources.ts +11 -5
  72. package/src/operations/workspaces.ts +45 -16
  73. package/src/pagingHelper.ts +39 -0
  74. package/types/arm-healthcareapis.d.ts +93 -29
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,101 +70,149 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
38
70
  /** Known values of {@link ProvisioningState} that the service accepts. */
39
71
  exports.KnownProvisioningState = void 0;
40
72
  (function (KnownProvisioningState) {
73
+ /** Deleting */
41
74
  KnownProvisioningState["Deleting"] = "Deleting";
75
+ /** Succeeded */
42
76
  KnownProvisioningState["Succeeded"] = "Succeeded";
77
+ /** Creating */
43
78
  KnownProvisioningState["Creating"] = "Creating";
79
+ /** Accepted */
44
80
  KnownProvisioningState["Accepted"] = "Accepted";
81
+ /** Verifying */
45
82
  KnownProvisioningState["Verifying"] = "Verifying";
83
+ /** Updating */
46
84
  KnownProvisioningState["Updating"] = "Updating";
85
+ /** Failed */
47
86
  KnownProvisioningState["Failed"] = "Failed";
87
+ /** Canceled */
48
88
  KnownProvisioningState["Canceled"] = "Canceled";
89
+ /** Deprovisioned */
49
90
  KnownProvisioningState["Deprovisioned"] = "Deprovisioned";
91
+ /** Moving */
50
92
  KnownProvisioningState["Moving"] = "Moving";
93
+ /** Suspended */
51
94
  KnownProvisioningState["Suspended"] = "Suspended";
95
+ /** Warned */
52
96
  KnownProvisioningState["Warned"] = "Warned";
97
+ /** SystemMaintenance */
53
98
  KnownProvisioningState["SystemMaintenance"] = "SystemMaintenance";
54
99
  })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
55
100
  /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
56
101
  exports.KnownPrivateEndpointServiceConnectionStatus = void 0;
57
102
  (function (KnownPrivateEndpointServiceConnectionStatus) {
103
+ /** Pending */
58
104
  KnownPrivateEndpointServiceConnectionStatus["Pending"] = "Pending";
105
+ /** Approved */
59
106
  KnownPrivateEndpointServiceConnectionStatus["Approved"] = "Approved";
107
+ /** Rejected */
60
108
  KnownPrivateEndpointServiceConnectionStatus["Rejected"] = "Rejected";
61
109
  })(exports.KnownPrivateEndpointServiceConnectionStatus || (exports.KnownPrivateEndpointServiceConnectionStatus = {}));
62
110
  /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */
63
111
  exports.KnownPrivateEndpointConnectionProvisioningState = void 0;
64
112
  (function (KnownPrivateEndpointConnectionProvisioningState) {
113
+ /** Succeeded */
65
114
  KnownPrivateEndpointConnectionProvisioningState["Succeeded"] = "Succeeded";
115
+ /** Creating */
66
116
  KnownPrivateEndpointConnectionProvisioningState["Creating"] = "Creating";
117
+ /** Deleting */
67
118
  KnownPrivateEndpointConnectionProvisioningState["Deleting"] = "Deleting";
119
+ /** Failed */
68
120
  KnownPrivateEndpointConnectionProvisioningState["Failed"] = "Failed";
69
121
  })(exports.KnownPrivateEndpointConnectionProvisioningState || (exports.KnownPrivateEndpointConnectionProvisioningState = {}));
70
122
  /** Known values of {@link PublicNetworkAccess} that the service accepts. */
71
123
  exports.KnownPublicNetworkAccess = void 0;
72
124
  (function (KnownPublicNetworkAccess) {
125
+ /** Enabled */
73
126
  KnownPublicNetworkAccess["Enabled"] = "Enabled";
127
+ /** Disabled */
74
128
  KnownPublicNetworkAccess["Disabled"] = "Disabled";
75
129
  })(exports.KnownPublicNetworkAccess || (exports.KnownPublicNetworkAccess = {}));
76
130
  /** Known values of {@link CreatedByType} that the service accepts. */
77
131
  exports.KnownCreatedByType = void 0;
78
132
  (function (KnownCreatedByType) {
133
+ /** User */
79
134
  KnownCreatedByType["User"] = "User";
135
+ /** Application */
80
136
  KnownCreatedByType["Application"] = "Application";
137
+ /** ManagedIdentity */
81
138
  KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
139
+ /** Key */
82
140
  KnownCreatedByType["Key"] = "Key";
83
141
  })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
84
142
  /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */
85
143
  exports.KnownManagedServiceIdentityType = void 0;
86
144
  (function (KnownManagedServiceIdentityType) {
145
+ /** SystemAssigned */
87
146
  KnownManagedServiceIdentityType["SystemAssigned"] = "SystemAssigned";
147
+ /** None */
88
148
  KnownManagedServiceIdentityType["None"] = "None";
89
149
  })(exports.KnownManagedServiceIdentityType || (exports.KnownManagedServiceIdentityType = {}));
90
150
  /** Known values of {@link ServiceManagedIdentityType} that the service accepts. */
91
151
  exports.KnownServiceManagedIdentityType = void 0;
92
152
  (function (KnownServiceManagedIdentityType) {
153
+ /** None */
93
154
  KnownServiceManagedIdentityType["None"] = "None";
155
+ /** SystemAssigned */
94
156
  KnownServiceManagedIdentityType["SystemAssigned"] = "SystemAssigned";
157
+ /** UserAssigned */
95
158
  KnownServiceManagedIdentityType["UserAssigned"] = "UserAssigned";
159
+ /** SystemAssignedUserAssigned */
96
160
  KnownServiceManagedIdentityType["SystemAssignedUserAssigned"] = "SystemAssigned,UserAssigned";
97
161
  })(exports.KnownServiceManagedIdentityType || (exports.KnownServiceManagedIdentityType = {}));
98
162
  /** Known values of {@link IotIdentityResolutionType} that the service accepts. */
99
163
  exports.KnownIotIdentityResolutionType = void 0;
100
164
  (function (KnownIotIdentityResolutionType) {
165
+ /** Create */
101
166
  KnownIotIdentityResolutionType["Create"] = "Create";
167
+ /** Lookup */
102
168
  KnownIotIdentityResolutionType["Lookup"] = "Lookup";
103
169
  })(exports.KnownIotIdentityResolutionType || (exports.KnownIotIdentityResolutionType = {}));
104
170
  /** Known values of {@link FhirServiceKind} that the service accepts. */
105
171
  exports.KnownFhirServiceKind = void 0;
106
172
  (function (KnownFhirServiceKind) {
173
+ /** FhirStu3 */
107
174
  KnownFhirServiceKind["FhirStu3"] = "fhir-Stu3";
175
+ /** FhirR4 */
108
176
  KnownFhirServiceKind["FhirR4"] = "fhir-R4";
109
177
  })(exports.KnownFhirServiceKind || (exports.KnownFhirServiceKind = {}));
110
178
  /** Known values of {@link ServiceEventState} that the service accepts. */
111
179
  exports.KnownServiceEventState = void 0;
112
180
  (function (KnownServiceEventState) {
181
+ /** Disabled */
113
182
  KnownServiceEventState["Disabled"] = "Disabled";
183
+ /** Enabled */
114
184
  KnownServiceEventState["Enabled"] = "Enabled";
185
+ /** Updating */
115
186
  KnownServiceEventState["Updating"] = "Updating";
116
187
  })(exports.KnownServiceEventState || (exports.KnownServiceEventState = {}));
117
188
  /** Known values of {@link FhirResourceVersionPolicy} that the service accepts. */
118
189
  exports.KnownFhirResourceVersionPolicy = void 0;
119
190
  (function (KnownFhirResourceVersionPolicy) {
191
+ /** NoVersion */
120
192
  KnownFhirResourceVersionPolicy["NoVersion"] = "no-version";
193
+ /** Versioned */
121
194
  KnownFhirResourceVersionPolicy["Versioned"] = "versioned";
195
+ /** VersionedUpdate */
122
196
  KnownFhirResourceVersionPolicy["VersionedUpdate"] = "versioned-update";
123
197
  })(exports.KnownFhirResourceVersionPolicy || (exports.KnownFhirResourceVersionPolicy = {}));
124
198
  /** Known values of {@link ActionType} that the service accepts. */
125
199
  exports.KnownActionType = void 0;
126
200
  (function (KnownActionType) {
201
+ /** Internal */
127
202
  KnownActionType["Internal"] = "Internal";
128
203
  })(exports.KnownActionType || (exports.KnownActionType = {}));
129
204
  /** Known values of {@link OperationResultStatus} that the service accepts. */
130
205
  exports.KnownOperationResultStatus = void 0;
131
206
  (function (KnownOperationResultStatus) {
207
+ /** Canceled */
132
208
  KnownOperationResultStatus["Canceled"] = "Canceled";
209
+ /** Succeeded */
133
210
  KnownOperationResultStatus["Succeeded"] = "Succeeded";
211
+ /** Failed */
134
212
  KnownOperationResultStatus["Failed"] = "Failed";
213
+ /** Requested */
135
214
  KnownOperationResultStatus["Requested"] = "Requested";
215
+ /** Running */
136
216
  KnownOperationResultStatus["Running"] = "Running";
137
217
  })(exports.KnownOperationResultStatus || (exports.KnownOperationResultStatus = {}));
138
218
 
@@ -248,7 +328,6 @@ const ServiceCosmosDbConfigurationInfo = {
248
328
  modelProperties: {
249
329
  offerThroughput: {
250
330
  constraints: {
251
- InclusiveMaximum: 10000,
252
331
  InclusiveMinimum: 400
253
332
  },
254
333
  serializedName: "offerThroughput",
@@ -2546,20 +2625,31 @@ class ServicesImpl {
2546
2625
  [Symbol.asyncIterator]() {
2547
2626
  return this;
2548
2627
  },
2549
- byPage: () => {
2550
- return this.listPagingPage(options);
2628
+ byPage: (settings) => {
2629
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2630
+ throw new Error("maxPageSize is not supported by this operation.");
2631
+ }
2632
+ return this.listPagingPage(options, settings);
2551
2633
  }
2552
2634
  };
2553
2635
  }
2554
- listPagingPage(options) {
2636
+ listPagingPage(options, settings) {
2555
2637
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2556
- let result = yield tslib.__await(this._list(options));
2557
- yield yield tslib.__await(result.value || []);
2558
- let continuationToken = result.nextLink;
2638
+ let result;
2639
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2640
+ if (!continuationToken) {
2641
+ result = yield tslib.__await(this._list(options));
2642
+ let page = result.value || [];
2643
+ continuationToken = result.nextLink;
2644
+ setContinuationToken(page, continuationToken);
2645
+ yield yield tslib.__await(page);
2646
+ }
2559
2647
  while (continuationToken) {
2560
2648
  result = yield tslib.__await(this._listNext(continuationToken, options));
2561
2649
  continuationToken = result.nextLink;
2562
- yield yield tslib.__await(result.value || []);
2650
+ let page = result.value || [];
2651
+ setContinuationToken(page, continuationToken);
2652
+ yield yield tslib.__await(page);
2563
2653
  }
2564
2654
  });
2565
2655
  }
@@ -2595,20 +2685,31 @@ class ServicesImpl {
2595
2685
  [Symbol.asyncIterator]() {
2596
2686
  return this;
2597
2687
  },
2598
- byPage: () => {
2599
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
2688
+ byPage: (settings) => {
2689
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2690
+ throw new Error("maxPageSize is not supported by this operation.");
2691
+ }
2692
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
2600
2693
  }
2601
2694
  };
2602
2695
  }
2603
- listByResourceGroupPagingPage(resourceGroupName, options) {
2696
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
2604
2697
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
2605
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2606
- yield yield tslib.__await(result.value || []);
2607
- let continuationToken = result.nextLink;
2698
+ let result;
2699
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2700
+ if (!continuationToken) {
2701
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2702
+ let page = result.value || [];
2703
+ continuationToken = result.nextLink;
2704
+ setContinuationToken(page, continuationToken);
2705
+ yield yield tslib.__await(page);
2706
+ }
2608
2707
  while (continuationToken) {
2609
2708
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
2610
2709
  continuationToken = result.nextLink;
2611
- yield yield tslib.__await(result.value || []);
2710
+ let page = result.value || [];
2711
+ setContinuationToken(page, continuationToken);
2712
+ yield yield tslib.__await(page);
2612
2713
  }
2613
2714
  });
2614
2715
  }
@@ -3075,14 +3176,18 @@ class PrivateEndpointConnectionsImpl {
3075
3176
  [Symbol.asyncIterator]() {
3076
3177
  return this;
3077
3178
  },
3078
- byPage: () => {
3079
- return this.listByServicePagingPage(resourceGroupName, resourceName, options);
3179
+ byPage: (settings) => {
3180
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3181
+ throw new Error("maxPageSize is not supported by this operation.");
3182
+ }
3183
+ return this.listByServicePagingPage(resourceGroupName, resourceName, options, settings);
3080
3184
  }
3081
3185
  };
3082
3186
  }
3083
- listByServicePagingPage(resourceGroupName, resourceName, options) {
3187
+ listByServicePagingPage(resourceGroupName, resourceName, options, _settings) {
3084
3188
  return tslib.__asyncGenerator(this, arguments, function* listByServicePagingPage_1() {
3085
- let result = yield tslib.__await(this._listByService(resourceGroupName, resourceName, options));
3189
+ let result;
3190
+ result = yield tslib.__await(this._listByService(resourceGroupName, resourceName, options));
3086
3191
  yield yield tslib.__await(result.value || []);
3087
3192
  });
3088
3193
  }
@@ -3467,20 +3572,31 @@ class WorkspacesImpl {
3467
3572
  [Symbol.asyncIterator]() {
3468
3573
  return this;
3469
3574
  },
3470
- byPage: () => {
3471
- return this.listBySubscriptionPagingPage(options);
3575
+ byPage: (settings) => {
3576
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3577
+ throw new Error("maxPageSize is not supported by this operation.");
3578
+ }
3579
+ return this.listBySubscriptionPagingPage(options, settings);
3472
3580
  }
3473
3581
  };
3474
3582
  }
3475
- listBySubscriptionPagingPage(options) {
3583
+ listBySubscriptionPagingPage(options, settings) {
3476
3584
  return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
3477
- let result = yield tslib.__await(this._listBySubscription(options));
3478
- yield yield tslib.__await(result.value || []);
3479
- let continuationToken = result.nextLink;
3585
+ let result;
3586
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
3587
+ if (!continuationToken) {
3588
+ result = yield tslib.__await(this._listBySubscription(options));
3589
+ let page = result.value || [];
3590
+ continuationToken = result.nextLink;
3591
+ setContinuationToken(page, continuationToken);
3592
+ yield yield tslib.__await(page);
3593
+ }
3480
3594
  while (continuationToken) {
3481
3595
  result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
3482
3596
  continuationToken = result.nextLink;
3483
- yield yield tslib.__await(result.value || []);
3597
+ let page = result.value || [];
3598
+ setContinuationToken(page, continuationToken);
3599
+ yield yield tslib.__await(page);
3484
3600
  }
3485
3601
  });
3486
3602
  }
@@ -3516,20 +3632,31 @@ class WorkspacesImpl {
3516
3632
  [Symbol.asyncIterator]() {
3517
3633
  return this;
3518
3634
  },
3519
- byPage: () => {
3520
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
3635
+ byPage: (settings) => {
3636
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3637
+ throw new Error("maxPageSize is not supported by this operation.");
3638
+ }
3639
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
3521
3640
  }
3522
3641
  };
3523
3642
  }
3524
- listByResourceGroupPagingPage(resourceGroupName, options) {
3643
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
3525
3644
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
3526
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
3527
- yield yield tslib.__await(result.value || []);
3528
- let continuationToken = result.nextLink;
3645
+ let result;
3646
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
3647
+ if (!continuationToken) {
3648
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
3649
+ let page = result.value || [];
3650
+ continuationToken = result.nextLink;
3651
+ setContinuationToken(page, continuationToken);
3652
+ yield yield tslib.__await(page);
3653
+ }
3529
3654
  while (continuationToken) {
3530
3655
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
3531
3656
  continuationToken = result.nextLink;
3532
- yield yield tslib.__await(result.value || []);
3657
+ let page = result.value || [];
3658
+ setContinuationToken(page, continuationToken);
3659
+ yield yield tslib.__await(page);
3533
3660
  }
3534
3661
  });
3535
3662
  }
@@ -3969,20 +4096,31 @@ class DicomServicesImpl {
3969
4096
  [Symbol.asyncIterator]() {
3970
4097
  return this;
3971
4098
  },
3972
- byPage: () => {
3973
- return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options);
4099
+ byPage: (settings) => {
4100
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4101
+ throw new Error("maxPageSize is not supported by this operation.");
4102
+ }
4103
+ return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
3974
4104
  }
3975
4105
  };
3976
4106
  }
3977
- listByWorkspacePagingPage(resourceGroupName, workspaceName, options) {
4107
+ listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
3978
4108
  return tslib.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
3979
- let result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
3980
- yield yield tslib.__await(result.value || []);
3981
- let continuationToken = result.nextLink;
4109
+ let result;
4110
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4111
+ if (!continuationToken) {
4112
+ result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
4113
+ let page = result.value || [];
4114
+ continuationToken = result.nextLink;
4115
+ setContinuationToken(page, continuationToken);
4116
+ yield yield tslib.__await(page);
4117
+ }
3982
4118
  while (continuationToken) {
3983
4119
  result = yield tslib.__await(this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options));
3984
4120
  continuationToken = result.nextLink;
3985
- yield yield tslib.__await(result.value || []);
4121
+ let page = result.value || [];
4122
+ setContinuationToken(page, continuationToken);
4123
+ yield yield tslib.__await(page);
3986
4124
  }
3987
4125
  });
3988
4126
  }
@@ -4398,20 +4536,31 @@ class IotConnectorsImpl {
4398
4536
  [Symbol.asyncIterator]() {
4399
4537
  return this;
4400
4538
  },
4401
- byPage: () => {
4402
- return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options);
4539
+ byPage: (settings) => {
4540
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4541
+ throw new Error("maxPageSize is not supported by this operation.");
4542
+ }
4543
+ return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
4403
4544
  }
4404
4545
  };
4405
4546
  }
4406
- listByWorkspacePagingPage(resourceGroupName, workspaceName, options) {
4547
+ listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
4407
4548
  return tslib.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
4408
- let result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
4409
- yield yield tslib.__await(result.value || []);
4410
- let continuationToken = result.nextLink;
4549
+ let result;
4550
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4551
+ if (!continuationToken) {
4552
+ result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
4553
+ let page = result.value || [];
4554
+ continuationToken = result.nextLink;
4555
+ setContinuationToken(page, continuationToken);
4556
+ yield yield tslib.__await(page);
4557
+ }
4411
4558
  while (continuationToken) {
4412
4559
  result = yield tslib.__await(this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options));
4413
4560
  continuationToken = result.nextLink;
4414
- yield yield tslib.__await(result.value || []);
4561
+ let page = result.value || [];
4562
+ setContinuationToken(page, continuationToken);
4563
+ yield yield tslib.__await(page);
4415
4564
  }
4416
4565
  });
4417
4566
  }
@@ -4828,20 +4977,31 @@ class FhirDestinationsImpl {
4828
4977
  [Symbol.asyncIterator]() {
4829
4978
  return this;
4830
4979
  },
4831
- byPage: () => {
4832
- return this.listByIotConnectorPagingPage(resourceGroupName, workspaceName, iotConnectorName, options);
4980
+ byPage: (settings) => {
4981
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4982
+ throw new Error("maxPageSize is not supported by this operation.");
4983
+ }
4984
+ return this.listByIotConnectorPagingPage(resourceGroupName, workspaceName, iotConnectorName, options, settings);
4833
4985
  }
4834
4986
  };
4835
4987
  }
4836
- listByIotConnectorPagingPage(resourceGroupName, workspaceName, iotConnectorName, options) {
4988
+ listByIotConnectorPagingPage(resourceGroupName, workspaceName, iotConnectorName, options, settings) {
4837
4989
  return tslib.__asyncGenerator(this, arguments, function* listByIotConnectorPagingPage_1() {
4838
- let result = yield tslib.__await(this._listByIotConnector(resourceGroupName, workspaceName, iotConnectorName, options));
4839
- yield yield tslib.__await(result.value || []);
4840
- let continuationToken = result.nextLink;
4990
+ let result;
4991
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4992
+ if (!continuationToken) {
4993
+ result = yield tslib.__await(this._listByIotConnector(resourceGroupName, workspaceName, iotConnectorName, options));
4994
+ let page = result.value || [];
4995
+ continuationToken = result.nextLink;
4996
+ setContinuationToken(page, continuationToken);
4997
+ yield yield tslib.__await(page);
4998
+ }
4841
4999
  while (continuationToken) {
4842
5000
  result = yield tslib.__await(this._listByIotConnectorNext(resourceGroupName, workspaceName, iotConnectorName, continuationToken, options));
4843
5001
  continuationToken = result.nextLink;
4844
- yield yield tslib.__await(result.value || []);
5002
+ let page = result.value || [];
5003
+ setContinuationToken(page, continuationToken);
5004
+ yield yield tslib.__await(page);
4845
5005
  }
4846
5006
  });
4847
5007
  }
@@ -5210,20 +5370,31 @@ class FhirServicesImpl {
5210
5370
  [Symbol.asyncIterator]() {
5211
5371
  return this;
5212
5372
  },
5213
- byPage: () => {
5214
- return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options);
5373
+ byPage: (settings) => {
5374
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5375
+ throw new Error("maxPageSize is not supported by this operation.");
5376
+ }
5377
+ return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
5215
5378
  }
5216
5379
  };
5217
5380
  }
5218
- listByWorkspacePagingPage(resourceGroupName, workspaceName, options) {
5381
+ listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings) {
5219
5382
  return tslib.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
5220
- let result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
5221
- yield yield tslib.__await(result.value || []);
5222
- let continuationToken = result.nextLink;
5383
+ let result;
5384
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5385
+ if (!continuationToken) {
5386
+ result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
5387
+ let page = result.value || [];
5388
+ continuationToken = result.nextLink;
5389
+ setContinuationToken(page, continuationToken);
5390
+ yield yield tslib.__await(page);
5391
+ }
5223
5392
  while (continuationToken) {
5224
5393
  result = yield tslib.__await(this._listByWorkspaceNext(resourceGroupName, workspaceName, continuationToken, options));
5225
5394
  continuationToken = result.nextLink;
5226
- yield yield tslib.__await(result.value || []);
5395
+ let page = result.value || [];
5396
+ setContinuationToken(page, continuationToken);
5397
+ yield yield tslib.__await(page);
5227
5398
  }
5228
5399
  });
5229
5400
  }
@@ -5639,14 +5810,18 @@ class WorkspacePrivateEndpointConnectionsImpl {
5639
5810
  [Symbol.asyncIterator]() {
5640
5811
  return this;
5641
5812
  },
5642
- byPage: () => {
5643
- return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options);
5813
+ byPage: (settings) => {
5814
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5815
+ throw new Error("maxPageSize is not supported by this operation.");
5816
+ }
5817
+ return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
5644
5818
  }
5645
5819
  };
5646
5820
  }
5647
- listByWorkspacePagingPage(resourceGroupName, workspaceName, options) {
5821
+ listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
5648
5822
  return tslib.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
5649
- let result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
5823
+ let result;
5824
+ result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
5650
5825
  yield yield tslib.__await(result.value || []);
5651
5826
  });
5652
5827
  }
@@ -5951,14 +6126,18 @@ class WorkspacePrivateLinkResourcesImpl {
5951
6126
  [Symbol.asyncIterator]() {
5952
6127
  return this;
5953
6128
  },
5954
- byPage: () => {
5955
- return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options);
6129
+ byPage: (settings) => {
6130
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6131
+ throw new Error("maxPageSize is not supported by this operation.");
6132
+ }
6133
+ return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
5956
6134
  }
5957
6135
  };
5958
6136
  }
5959
- listByWorkspacePagingPage(resourceGroupName, workspaceName, options) {
6137
+ listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
5960
6138
  return tslib.__asyncGenerator(this, arguments, function* listByWorkspacePagingPage_1() {
5961
- let result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
6139
+ let result;
6140
+ result = yield tslib.__await(this._listByWorkspace(resourceGroupName, workspaceName, options));
5962
6141
  yield yield tslib.__await(result.value || []);
5963
6142
  });
5964
6143
  }
@@ -6076,20 +6255,31 @@ class OperationsImpl {
6076
6255
  [Symbol.asyncIterator]() {
6077
6256
  return this;
6078
6257
  },
6079
- byPage: () => {
6080
- return this.listPagingPage(options);
6258
+ byPage: (settings) => {
6259
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6260
+ throw new Error("maxPageSize is not supported by this operation.");
6261
+ }
6262
+ return this.listPagingPage(options, settings);
6081
6263
  }
6082
6264
  };
6083
6265
  }
6084
- listPagingPage(options) {
6266
+ listPagingPage(options, settings) {
6085
6267
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
6086
- let result = yield tslib.__await(this._list(options));
6087
- yield yield tslib.__await(result.value || []);
6088
- let continuationToken = result.nextLink;
6268
+ let result;
6269
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6270
+ if (!continuationToken) {
6271
+ result = yield tslib.__await(this._list(options));
6272
+ let page = result.value || [];
6273
+ continuationToken = result.nextLink;
6274
+ setContinuationToken(page, continuationToken);
6275
+ yield yield tslib.__await(page);
6276
+ }
6089
6277
  while (continuationToken) {
6090
6278
  result = yield tslib.__await(this._listNext(continuationToken, options));
6091
6279
  continuationToken = result.nextLink;
6092
- yield yield tslib.__await(result.value || []);
6280
+ let page = result.value || [];
6281
+ setContinuationToken(page, continuationToken);
6282
+ yield yield tslib.__await(page);
6093
6283
  }
6094
6284
  });
6095
6285
  }
@@ -6227,7 +6417,7 @@ class HealthcareApisManagementClient extends coreClient__namespace.ServiceClient
6227
6417
  * @param options The parameter options
6228
6418
  */
6229
6419
  constructor(credentials, subscriptionId, options) {
6230
- var _a, _b;
6420
+ var _a, _b, _c;
6231
6421
  if (credentials === undefined) {
6232
6422
  throw new Error("'credentials' cannot be null");
6233
6423
  }
@@ -6242,32 +6432,34 @@ class HealthcareApisManagementClient extends coreClient__namespace.ServiceClient
6242
6432
  requestContentType: "application/json; charset=utf-8",
6243
6433
  credential: credentials
6244
6434
  };
6245
- const packageDetails = `azsdk-js-arm-healthcareapis/2.1.2`;
6435
+ const packageDetails = `azsdk-js-arm-healthcareapis/2.2.0`;
6246
6436
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
6247
6437
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
6248
6438
  : `${packageDetails}`;
6249
- if (!options.credentialScopes) {
6250
- options.credentialScopes = ["https://management.azure.com/.default"];
6251
- }
6252
6439
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
6253
6440
  userAgentPrefix
6254
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
6441
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
6255
6442
  super(optionsWithDefaults);
6443
+ let bearerTokenAuthenticationPolicyFound = false;
6256
6444
  if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
6257
6445
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
6258
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
6446
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
6259
6447
  coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
6260
- if (!bearerTokenAuthenticationPolicyFound) {
6261
- this.pipeline.removePolicy({
6262
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
6263
- });
6264
- this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
6265
- scopes: `${optionsWithDefaults.baseUri}/.default`,
6266
- challengeCallbacks: {
6267
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
6268
- }
6269
- }));
6270
- }
6448
+ }
6449
+ if (!options ||
6450
+ !options.pipeline ||
6451
+ options.pipeline.getOrderedPolicies().length == 0 ||
6452
+ !bearerTokenAuthenticationPolicyFound) {
6453
+ this.pipeline.removePolicy({
6454
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
6455
+ });
6456
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
6457
+ credential: credentials,
6458
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
6459
+ challengeCallbacks: {
6460
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
6461
+ }
6462
+ }));
6271
6463
  }
6272
6464
  // Parameter assignments
6273
6465
  this.subscriptionId = subscriptionId;
@@ -6287,8 +6479,37 @@ class HealthcareApisManagementClient extends coreClient__namespace.ServiceClient
6287
6479
  this.workspacePrivateLinkResources = new WorkspacePrivateLinkResourcesImpl(this);
6288
6480
  this.operations = new OperationsImpl(this);
6289
6481
  this.operationResults = new OperationResultsImpl(this);
6482
+ this.addCustomApiVersionPolicy(options.apiVersion);
6483
+ }
6484
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
6485
+ addCustomApiVersionPolicy(apiVersion) {
6486
+ if (!apiVersion) {
6487
+ return;
6488
+ }
6489
+ const apiVersionPolicy = {
6490
+ name: "CustomApiVersionPolicy",
6491
+ sendRequest(request, next) {
6492
+ return tslib.__awaiter(this, void 0, void 0, function* () {
6493
+ const param = request.url.split("?");
6494
+ if (param.length > 1) {
6495
+ const newParams = param[1].split("&").map((item) => {
6496
+ if (item.indexOf("api-version") > -1) {
6497
+ return "api-version=" + apiVersion;
6498
+ }
6499
+ else {
6500
+ return item;
6501
+ }
6502
+ });
6503
+ request.url = param[0] + "?" + newParams.join("&");
6504
+ }
6505
+ return next(request);
6506
+ });
6507
+ }
6508
+ };
6509
+ this.pipeline.addPolicy(apiVersionPolicy);
6290
6510
  }
6291
6511
  }
6292
6512
 
6293
6513
  exports.HealthcareApisManagementClient = HealthcareApisManagementClient;
6514
+ exports.getContinuationToken = getContinuationToken;
6294
6515
  //# sourceMappingURL=index.js.map