@azure/arm-sphere 1.0.1-alpha.20250718.1 → 1.0.1-alpha.20250721.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/browser/azureSphereManagementClient.js +21 -5
  2. package/dist/browser/azureSphereManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +54 -21
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/catalogs.js +166 -253
  8. package/dist/browser/operations/catalogs.js.map +1 -1
  9. package/dist/browser/operations/certificates.js +23 -40
  10. package/dist/browser/operations/certificates.js.map +1 -1
  11. package/dist/browser/operations/deployments.js +45 -52
  12. package/dist/browser/operations/deployments.js.map +1 -1
  13. package/dist/browser/operations/deviceGroups.js +67 -64
  14. package/dist/browser/operations/deviceGroups.js.map +1 -1
  15. package/dist/browser/operations/devices.js +67 -64
  16. package/dist/browser/operations/devices.js.map +1 -1
  17. package/dist/browser/operations/images.js +45 -52
  18. package/dist/browser/operations/images.js.map +1 -1
  19. package/dist/browser/operations/operations.js +23 -40
  20. package/dist/browser/operations/operations.js.map +1 -1
  21. package/dist/browser/operations/products.js +78 -97
  22. package/dist/browser/operations/products.js.map +1 -1
  23. package/dist/browser/pagingHelper.js +2 -4
  24. package/dist/browser/pagingHelper.js.map +1 -1
  25. package/dist/commonjs/azureSphereManagementClient.js +21 -5
  26. package/dist/commonjs/azureSphereManagementClient.js.map +1 -1
  27. package/dist/commonjs/lroImpl.js +7 -3
  28. package/dist/commonjs/lroImpl.js.map +1 -1
  29. package/dist/commonjs/models/mappers.js +54 -21
  30. package/dist/commonjs/models/mappers.js.map +1 -1
  31. package/dist/commonjs/operations/catalogs.js +166 -252
  32. package/dist/commonjs/operations/catalogs.js.map +1 -1
  33. package/dist/commonjs/operations/certificates.js +23 -39
  34. package/dist/commonjs/operations/certificates.js.map +1 -1
  35. package/dist/commonjs/operations/deployments.js +45 -51
  36. package/dist/commonjs/operations/deployments.js.map +1 -1
  37. package/dist/commonjs/operations/deviceGroups.js +67 -63
  38. package/dist/commonjs/operations/deviceGroups.js.map +1 -1
  39. package/dist/commonjs/operations/devices.js +67 -63
  40. package/dist/commonjs/operations/devices.js.map +1 -1
  41. package/dist/commonjs/operations/images.js +45 -51
  42. package/dist/commonjs/operations/images.js.map +1 -1
  43. package/dist/commonjs/operations/operations.js +23 -39
  44. package/dist/commonjs/operations/operations.js.map +1 -1
  45. package/dist/commonjs/operations/products.js +78 -96
  46. package/dist/commonjs/operations/products.js.map +1 -1
  47. package/dist/commonjs/pagingHelper.js +2 -4
  48. package/dist/commonjs/pagingHelper.js.map +1 -1
  49. package/dist/commonjs/tsdoc-metadata.json +11 -11
  50. package/dist/esm/azureSphereManagementClient.js +21 -5
  51. package/dist/esm/azureSphereManagementClient.js.map +1 -1
  52. package/dist/esm/lroImpl.js +7 -3
  53. package/dist/esm/lroImpl.js.map +1 -1
  54. package/dist/esm/models/mappers.js +54 -21
  55. package/dist/esm/models/mappers.js.map +1 -1
  56. package/dist/esm/operations/catalogs.js +166 -253
  57. package/dist/esm/operations/catalogs.js.map +1 -1
  58. package/dist/esm/operations/certificates.js +23 -40
  59. package/dist/esm/operations/certificates.js.map +1 -1
  60. package/dist/esm/operations/deployments.js +45 -52
  61. package/dist/esm/operations/deployments.js.map +1 -1
  62. package/dist/esm/operations/deviceGroups.js +67 -64
  63. package/dist/esm/operations/deviceGroups.js.map +1 -1
  64. package/dist/esm/operations/devices.js +67 -64
  65. package/dist/esm/operations/devices.js.map +1 -1
  66. package/dist/esm/operations/images.js +45 -52
  67. package/dist/esm/operations/images.js.map +1 -1
  68. package/dist/esm/operations/operations.js +23 -40
  69. package/dist/esm/operations/operations.js.map +1 -1
  70. package/dist/esm/operations/products.js +78 -97
  71. package/dist/esm/operations/products.js.map +1 -1
  72. package/dist/esm/pagingHelper.js +2 -4
  73. package/dist/esm/pagingHelper.js.map +1 -1
  74. package/dist/react-native/azureSphereManagementClient.js +21 -5
  75. package/dist/react-native/azureSphereManagementClient.js.map +1 -1
  76. package/dist/react-native/lroImpl.js +7 -3
  77. package/dist/react-native/lroImpl.js.map +1 -1
  78. package/dist/react-native/models/mappers.js +54 -21
  79. package/dist/react-native/models/mappers.js.map +1 -1
  80. package/dist/react-native/operations/catalogs.js +166 -253
  81. package/dist/react-native/operations/catalogs.js.map +1 -1
  82. package/dist/react-native/operations/certificates.js +23 -40
  83. package/dist/react-native/operations/certificates.js.map +1 -1
  84. package/dist/react-native/operations/deployments.js +45 -52
  85. package/dist/react-native/operations/deployments.js.map +1 -1
  86. package/dist/react-native/operations/deviceGroups.js +67 -64
  87. package/dist/react-native/operations/deviceGroups.js.map +1 -1
  88. package/dist/react-native/operations/devices.js +67 -64
  89. package/dist/react-native/operations/devices.js.map +1 -1
  90. package/dist/react-native/operations/images.js +45 -52
  91. package/dist/react-native/operations/images.js.map +1 -1
  92. package/dist/react-native/operations/operations.js +23 -40
  93. package/dist/react-native/operations/operations.js.map +1 -1
  94. package/dist/react-native/operations/products.js +78 -97
  95. package/dist/react-native/operations/products.js.map +1 -1
  96. package/dist/react-native/pagingHelper.js +2 -4
  97. package/dist/react-native/pagingHelper.js.map +1 -1
  98. package/package.json +2 -2
  99. package/review/arm-sphere-node.api.md +1163 -1163
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Catalogs operations. */
20
20
  class CatalogsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Catalogs class.
23
24
  * @param client Reference to the service client
@@ -39,52 +40,35 @@ class CatalogsImpl {
39
40
  return this;
40
41
  },
41
42
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
43
44
  throw new Error("maxPageSize is not supported by this operation.");
44
45
  }
45
46
  return this.listBySubscriptionPagingPage(options, settings);
46
47
  },
47
48
  };
48
49
  }
49
- listBySubscriptionPagingPage(options, settings) {
50
- return tslib_1.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield tslib_1.__await(this._listBySubscription(options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
58
- yield yield tslib_1.__await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield tslib_1.__await(this._listBySubscriptionNext(continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
65
- yield yield tslib_1.__await(page);
66
- }
67
- });
50
+ async *listBySubscriptionPagingPage(options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._listBySubscription(options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listBySubscriptionNext(continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
65
+ yield page;
66
+ }
68
67
  }
69
- listBySubscriptionPagingAll(options) {
70
- return tslib_1.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
68
+ async *listBySubscriptionPagingAll(options) {
69
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
70
+ yield* page;
71
+ }
88
72
  }
89
73
  /**
90
74
  * List Catalog resources by resource group
@@ -101,52 +85,35 @@ class CatalogsImpl {
101
85
  return this;
102
86
  },
103
87
  byPage: (settings) => {
104
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
88
+ if (settings?.maxPageSize) {
105
89
  throw new Error("maxPageSize is not supported by this operation.");
106
90
  }
107
91
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
108
92
  },
109
93
  };
110
94
  }
111
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
112
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
113
- let result;
114
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
115
- if (!continuationToken) {
116
- result = yield tslib_1.__await(this._listByResourceGroup(resourceGroupName, options));
117
- let page = result.value || [];
118
- continuationToken = result.nextLink;
119
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
120
- yield yield tslib_1.__await(page);
121
- }
122
- while (continuationToken) {
123
- result = yield tslib_1.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
124
- continuationToken = result.nextLink;
125
- let page = result.value || [];
126
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
127
- yield yield tslib_1.__await(page);
128
- }
129
- });
95
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
96
+ let result;
97
+ let continuationToken = settings?.continuationToken;
98
+ if (!continuationToken) {
99
+ result = await this._listByResourceGroup(resourceGroupName, options);
100
+ let page = result.value || [];
101
+ continuationToken = result.nextLink;
102
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
103
+ yield page;
104
+ }
105
+ while (continuationToken) {
106
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
107
+ continuationToken = result.nextLink;
108
+ let page = result.value || [];
109
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
110
+ yield page;
111
+ }
130
112
  }
131
- listByResourceGroupPagingAll(resourceGroupName, options) {
132
- return tslib_1.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
133
- var _a, e_2, _b, _c;
134
- try {
135
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
136
- _c = _f.value;
137
- _d = false;
138
- const page = _c;
139
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
140
- }
141
- }
142
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
143
- finally {
144
- try {
145
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
146
- }
147
- finally { if (e_2) throw e_2.error; }
148
- }
149
- });
113
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
114
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
115
+ yield* page;
116
+ }
150
117
  }
151
118
  /**
152
119
  * Lists deployments for catalog.
@@ -164,52 +131,35 @@ class CatalogsImpl {
164
131
  return this;
165
132
  },
166
133
  byPage: (settings) => {
167
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
134
+ if (settings?.maxPageSize) {
168
135
  throw new Error("maxPageSize is not supported by this operation.");
169
136
  }
170
137
  return this.listDeploymentsPagingPage(resourceGroupName, catalogName, options, settings);
171
138
  },
172
139
  };
173
140
  }
174
- listDeploymentsPagingPage(resourceGroupName, catalogName, options, settings) {
175
- return tslib_1.__asyncGenerator(this, arguments, function* listDeploymentsPagingPage_1() {
176
- let result;
177
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
178
- if (!continuationToken) {
179
- result = yield tslib_1.__await(this._listDeployments(resourceGroupName, catalogName, options));
180
- let page = result.value || [];
181
- continuationToken = result.nextLink;
182
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
183
- yield yield tslib_1.__await(page);
184
- }
185
- while (continuationToken) {
186
- result = yield tslib_1.__await(this._listDeploymentsNext(resourceGroupName, catalogName, continuationToken, options));
187
- continuationToken = result.nextLink;
188
- let page = result.value || [];
189
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
190
- yield yield tslib_1.__await(page);
191
- }
192
- });
141
+ async *listDeploymentsPagingPage(resourceGroupName, catalogName, options, settings) {
142
+ let result;
143
+ let continuationToken = settings?.continuationToken;
144
+ if (!continuationToken) {
145
+ result = await this._listDeployments(resourceGroupName, catalogName, options);
146
+ let page = result.value || [];
147
+ continuationToken = result.nextLink;
148
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
149
+ yield page;
150
+ }
151
+ while (continuationToken) {
152
+ result = await this._listDeploymentsNext(resourceGroupName, catalogName, continuationToken, options);
153
+ continuationToken = result.nextLink;
154
+ let page = result.value || [];
155
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
156
+ yield page;
157
+ }
193
158
  }
194
- listDeploymentsPagingAll(resourceGroupName, catalogName, options) {
195
- return tslib_1.__asyncGenerator(this, arguments, function* listDeploymentsPagingAll_1() {
196
- var _a, e_3, _b, _c;
197
- try {
198
- for (var _d = true, _e = tslib_1.__asyncValues(this.listDeploymentsPagingPage(resourceGroupName, catalogName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
199
- _c = _f.value;
200
- _d = false;
201
- const page = _c;
202
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
203
- }
204
- }
205
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
206
- finally {
207
- try {
208
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
209
- }
210
- finally { if (e_3) throw e_3.error; }
211
- }
212
- });
159
+ async *listDeploymentsPagingAll(resourceGroupName, catalogName, options) {
160
+ for await (const page of this.listDeploymentsPagingPage(resourceGroupName, catalogName, options)) {
161
+ yield* page;
162
+ }
213
163
  }
214
164
  /**
215
165
  * List the device groups for the catalog.
@@ -228,52 +178,35 @@ class CatalogsImpl {
228
178
  return this;
229
179
  },
230
180
  byPage: (settings) => {
231
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
181
+ if (settings?.maxPageSize) {
232
182
  throw new Error("maxPageSize is not supported by this operation.");
233
183
  }
234
184
  return this.listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options, settings);
235
185
  },
236
186
  };
237
187
  }
238
- listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options, settings) {
239
- return tslib_1.__asyncGenerator(this, arguments, function* listDeviceGroupsPagingPage_1() {
240
- let result;
241
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
242
- if (!continuationToken) {
243
- result = yield tslib_1.__await(this._listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest, options));
244
- let page = result.value || [];
245
- continuationToken = result.nextLink;
246
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
247
- yield yield tslib_1.__await(page);
248
- }
249
- while (continuationToken) {
250
- result = yield tslib_1.__await(this._listDeviceGroupsNext(resourceGroupName, catalogName, listDeviceGroupsRequest, continuationToken, options));
251
- continuationToken = result.nextLink;
252
- let page = result.value || [];
253
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
254
- yield yield tslib_1.__await(page);
255
- }
256
- });
188
+ async *listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options, settings) {
189
+ let result;
190
+ let continuationToken = settings?.continuationToken;
191
+ if (!continuationToken) {
192
+ result = await this._listDeviceGroups(resourceGroupName, catalogName, listDeviceGroupsRequest, options);
193
+ let page = result.value || [];
194
+ continuationToken = result.nextLink;
195
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
196
+ yield page;
197
+ }
198
+ while (continuationToken) {
199
+ result = await this._listDeviceGroupsNext(resourceGroupName, catalogName, listDeviceGroupsRequest, continuationToken, options);
200
+ continuationToken = result.nextLink;
201
+ let page = result.value || [];
202
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
203
+ yield page;
204
+ }
257
205
  }
258
- listDeviceGroupsPagingAll(resourceGroupName, catalogName, listDeviceGroupsRequest, options) {
259
- return tslib_1.__asyncGenerator(this, arguments, function* listDeviceGroupsPagingAll_1() {
260
- var _a, e_4, _b, _c;
261
- try {
262
- for (var _d = true, _e = tslib_1.__asyncValues(this.listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
263
- _c = _f.value;
264
- _d = false;
265
- const page = _c;
266
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
267
- }
268
- }
269
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
270
- finally {
271
- try {
272
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
273
- }
274
- finally { if (e_4) throw e_4.error; }
275
- }
276
- });
206
+ async *listDeviceGroupsPagingAll(resourceGroupName, catalogName, listDeviceGroupsRequest, options) {
207
+ for await (const page of this.listDeviceGroupsPagingPage(resourceGroupName, catalogName, listDeviceGroupsRequest, options)) {
208
+ yield* page;
209
+ }
277
210
  }
278
211
  /**
279
212
  * Lists device insights for catalog.
@@ -291,52 +224,35 @@ class CatalogsImpl {
291
224
  return this;
292
225
  },
293
226
  byPage: (settings) => {
294
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
227
+ if (settings?.maxPageSize) {
295
228
  throw new Error("maxPageSize is not supported by this operation.");
296
229
  }
297
230
  return this.listDeviceInsightsPagingPage(resourceGroupName, catalogName, options, settings);
298
231
  },
299
232
  };
300
233
  }
301
- listDeviceInsightsPagingPage(resourceGroupName, catalogName, options, settings) {
302
- return tslib_1.__asyncGenerator(this, arguments, function* listDeviceInsightsPagingPage_1() {
303
- let result;
304
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
305
- if (!continuationToken) {
306
- result = yield tslib_1.__await(this._listDeviceInsights(resourceGroupName, catalogName, options));
307
- let page = result.value || [];
308
- continuationToken = result.nextLink;
309
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
310
- yield yield tslib_1.__await(page);
311
- }
312
- while (continuationToken) {
313
- result = yield tslib_1.__await(this._listDeviceInsightsNext(resourceGroupName, catalogName, continuationToken, options));
314
- continuationToken = result.nextLink;
315
- let page = result.value || [];
316
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
317
- yield yield tslib_1.__await(page);
318
- }
319
- });
234
+ async *listDeviceInsightsPagingPage(resourceGroupName, catalogName, options, settings) {
235
+ let result;
236
+ let continuationToken = settings?.continuationToken;
237
+ if (!continuationToken) {
238
+ result = await this._listDeviceInsights(resourceGroupName, catalogName, options);
239
+ let page = result.value || [];
240
+ continuationToken = result.nextLink;
241
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
242
+ yield page;
243
+ }
244
+ while (continuationToken) {
245
+ result = await this._listDeviceInsightsNext(resourceGroupName, catalogName, continuationToken, options);
246
+ continuationToken = result.nextLink;
247
+ let page = result.value || [];
248
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
249
+ yield page;
250
+ }
320
251
  }
321
- listDeviceInsightsPagingAll(resourceGroupName, catalogName, options) {
322
- return tslib_1.__asyncGenerator(this, arguments, function* listDeviceInsightsPagingAll_1() {
323
- var _a, e_5, _b, _c;
324
- try {
325
- for (var _d = true, _e = tslib_1.__asyncValues(this.listDeviceInsightsPagingPage(resourceGroupName, catalogName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
326
- _c = _f.value;
327
- _d = false;
328
- const page = _c;
329
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
330
- }
331
- }
332
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
333
- finally {
334
- try {
335
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
336
- }
337
- finally { if (e_5) throw e_5.error; }
338
- }
339
- });
252
+ async *listDeviceInsightsPagingAll(resourceGroupName, catalogName, options) {
253
+ for await (const page of this.listDeviceInsightsPagingPage(resourceGroupName, catalogName, options)) {
254
+ yield* page;
255
+ }
340
256
  }
341
257
  /**
342
258
  * Lists devices for catalog.
@@ -354,52 +270,35 @@ class CatalogsImpl {
354
270
  return this;
355
271
  },
356
272
  byPage: (settings) => {
357
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
273
+ if (settings?.maxPageSize) {
358
274
  throw new Error("maxPageSize is not supported by this operation.");
359
275
  }
360
276
  return this.listDevicesPagingPage(resourceGroupName, catalogName, options, settings);
361
277
  },
362
278
  };
363
279
  }
364
- listDevicesPagingPage(resourceGroupName, catalogName, options, settings) {
365
- return tslib_1.__asyncGenerator(this, arguments, function* listDevicesPagingPage_1() {
366
- let result;
367
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
368
- if (!continuationToken) {
369
- result = yield tslib_1.__await(this._listDevices(resourceGroupName, catalogName, options));
370
- let page = result.value || [];
371
- continuationToken = result.nextLink;
372
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
373
- yield yield tslib_1.__await(page);
374
- }
375
- while (continuationToken) {
376
- result = yield tslib_1.__await(this._listDevicesNext(resourceGroupName, catalogName, continuationToken, options));
377
- continuationToken = result.nextLink;
378
- let page = result.value || [];
379
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
380
- yield yield tslib_1.__await(page);
381
- }
382
- });
280
+ async *listDevicesPagingPage(resourceGroupName, catalogName, options, settings) {
281
+ let result;
282
+ let continuationToken = settings?.continuationToken;
283
+ if (!continuationToken) {
284
+ result = await this._listDevices(resourceGroupName, catalogName, options);
285
+ let page = result.value || [];
286
+ continuationToken = result.nextLink;
287
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
288
+ yield page;
289
+ }
290
+ while (continuationToken) {
291
+ result = await this._listDevicesNext(resourceGroupName, catalogName, continuationToken, options);
292
+ continuationToken = result.nextLink;
293
+ let page = result.value || [];
294
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
295
+ yield page;
296
+ }
383
297
  }
384
- listDevicesPagingAll(resourceGroupName, catalogName, options) {
385
- return tslib_1.__asyncGenerator(this, arguments, function* listDevicesPagingAll_1() {
386
- var _a, e_6, _b, _c;
387
- try {
388
- for (var _d = true, _e = tslib_1.__asyncValues(this.listDevicesPagingPage(resourceGroupName, catalogName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
389
- _c = _f.value;
390
- _d = false;
391
- const page = _c;
392
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
393
- }
394
- }
395
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
396
- finally {
397
- try {
398
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
399
- }
400
- finally { if (e_6) throw e_6.error; }
401
- }
402
- });
298
+ async *listDevicesPagingAll(resourceGroupName, catalogName, options) {
299
+ for await (const page of this.listDevicesPagingPage(resourceGroupName, catalogName, options)) {
300
+ yield* page;
301
+ }
403
302
  }
404
303
  /**
405
304
  * List Catalog resources by subscription ID
@@ -437,14 +336,19 @@ class CatalogsImpl {
437
336
  return this.client.sendOperationRequest(args, spec);
438
337
  };
439
338
  const sendOperationFn = async (args, spec) => {
440
- var _a;
441
339
  let currentRawResponse = undefined;
442
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
340
+ const providedCallback = args.options?.onResponse;
443
341
  const callback = (rawResponse, flatResponse) => {
444
342
  currentRawResponse = rawResponse;
445
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
343
+ providedCallback?.(rawResponse, flatResponse);
344
+ };
345
+ const updatedArgs = {
346
+ ...args,
347
+ options: {
348
+ ...args.options,
349
+ onResponse: callback,
350
+ },
446
351
  };
447
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
448
352
  const flatResponse = await directSendOperation(updatedArgs, spec);
449
353
  return {
450
354
  flatResponse,
@@ -461,8 +365,8 @@ class CatalogsImpl {
461
365
  spec: createOrUpdateOperationSpec,
462
366
  });
463
367
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
464
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
465
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
368
+ restoreFrom: options?.resumeFrom,
369
+ intervalInMs: options?.updateIntervalInMs,
466
370
  resourceLocationConfig: "azure-async-operation",
467
371
  });
468
372
  await poller.poll();
@@ -500,14 +404,19 @@ class CatalogsImpl {
500
404
  return this.client.sendOperationRequest(args, spec);
501
405
  };
502
406
  const sendOperationFn = async (args, spec) => {
503
- var _a;
504
407
  let currentRawResponse = undefined;
505
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
408
+ const providedCallback = args.options?.onResponse;
506
409
  const callback = (rawResponse, flatResponse) => {
507
410
  currentRawResponse = rawResponse;
508
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
411
+ providedCallback?.(rawResponse, flatResponse);
412
+ };
413
+ const updatedArgs = {
414
+ ...args,
415
+ options: {
416
+ ...args.options,
417
+ onResponse: callback,
418
+ },
509
419
  };
510
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
511
420
  const flatResponse = await directSendOperation(updatedArgs, spec);
512
421
  return {
513
422
  flatResponse,
@@ -524,8 +433,8 @@ class CatalogsImpl {
524
433
  spec: deleteOperationSpec,
525
434
  });
526
435
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
527
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
528
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
436
+ restoreFrom: options?.resumeFrom,
437
+ intervalInMs: options?.updateIntervalInMs,
529
438
  resourceLocationConfig: "location",
530
439
  });
531
440
  await poller.poll();
@@ -599,14 +508,19 @@ class CatalogsImpl {
599
508
  return this.client.sendOperationRequest(args, spec);
600
509
  };
601
510
  const sendOperationFn = async (args, spec) => {
602
- var _a;
603
511
  let currentRawResponse = undefined;
604
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
512
+ const providedCallback = args.options?.onResponse;
605
513
  const callback = (rawResponse, flatResponse) => {
606
514
  currentRawResponse = rawResponse;
607
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
515
+ providedCallback?.(rawResponse, flatResponse);
516
+ };
517
+ const updatedArgs = {
518
+ ...args,
519
+ options: {
520
+ ...args.options,
521
+ onResponse: callback,
522
+ },
608
523
  };
609
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
610
524
  const flatResponse = await directSendOperation(updatedArgs, spec);
611
525
  return {
612
526
  flatResponse,
@@ -623,8 +537,8 @@ class CatalogsImpl {
623
537
  spec: uploadImageOperationSpec,
624
538
  });
625
539
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
626
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
627
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
540
+ restoreFrom: options?.resumeFrom,
541
+ intervalInMs: options?.updateIntervalInMs,
628
542
  resourceLocationConfig: "location",
629
543
  });
630
544
  await poller.poll();