@azure/arm-deviceprovisioningservices 6.0.0-alpha.20250620.1 → 6.0.0-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.
- package/dist/browser/iotDpsClient.js +16 -5
- package/dist/browser/iotDpsClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +13 -6
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/dpsCertificate.js +1 -0
- package/dist/browser/operations/dpsCertificate.js.map +1 -1
- package/dist/browser/operations/iotDpsResource.js +144 -187
- package/dist/browser/operations/iotDpsResource.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/iotDpsClient.js +16 -5
- package/dist/commonjs/iotDpsClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +13 -6
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/dpsCertificate.js +1 -0
- package/dist/commonjs/operations/dpsCertificate.js.map +1 -1
- package/dist/commonjs/operations/iotDpsResource.js +144 -186
- package/dist/commonjs/operations/iotDpsResource.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/iotDpsClient.js +16 -5
- package/dist/esm/iotDpsClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +13 -6
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/dpsCertificate.js +1 -0
- package/dist/esm/operations/dpsCertificate.js.map +1 -1
- package/dist/esm/operations/iotDpsResource.js +144 -187
- package/dist/esm/operations/iotDpsResource.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/iotDpsClient.js +16 -5
- package/dist/react-native/iotDpsClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +13 -6
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/dpsCertificate.js +1 -0
- package/dist/react-native/operations/dpsCertificate.js.map +1 -1
- package/dist/react-native/operations/iotDpsResource.js +144 -187
- package/dist/react-native/operations/iotDpsResource.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-deviceprovisioningservices.api.md → arm-deviceprovisioningservices-node.api.md} +0 -0
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing IotDpsResource operations. */
|
|
17
16
|
export class IotDpsResourceImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class IotDpsResource class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -36,52 +36,35 @@ export class IotDpsResourceImpl {
|
|
|
36
36
|
return this;
|
|
37
37
|
},
|
|
38
38
|
byPage: (settings) => {
|
|
39
|
-
if (settings
|
|
39
|
+
if (settings?.maxPageSize) {
|
|
40
40
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
41
|
}
|
|
42
42
|
return this.listBySubscriptionPagingPage(options, settings);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
listBySubscriptionPagingPage(options, settings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
});
|
|
46
|
+
async *listBySubscriptionPagingPage(options, settings) {
|
|
47
|
+
let result;
|
|
48
|
+
let continuationToken = settings?.continuationToken;
|
|
49
|
+
if (!continuationToken) {
|
|
50
|
+
result = await this._listBySubscription(options);
|
|
51
|
+
let page = result.value || [];
|
|
52
|
+
continuationToken = result.nextLink;
|
|
53
|
+
setContinuationToken(page, continuationToken);
|
|
54
|
+
yield page;
|
|
55
|
+
}
|
|
56
|
+
while (continuationToken) {
|
|
57
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
let page = result.value || [];
|
|
60
|
+
setContinuationToken(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
65
63
|
}
|
|
66
|
-
listBySubscriptionPagingAll(options) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
71
|
-
_c = _f.value;
|
|
72
|
-
_d = false;
|
|
73
|
-
const page = _c;
|
|
74
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
78
|
-
finally {
|
|
79
|
-
try {
|
|
80
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
81
|
-
}
|
|
82
|
-
finally { if (e_1) throw e_1.error; }
|
|
83
|
-
}
|
|
84
|
-
});
|
|
64
|
+
async *listBySubscriptionPagingAll(options) {
|
|
65
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
66
|
+
yield* page;
|
|
67
|
+
}
|
|
85
68
|
}
|
|
86
69
|
/**
|
|
87
70
|
* Get a list of all provisioning services in the given resource group.
|
|
@@ -98,52 +81,35 @@ export class IotDpsResourceImpl {
|
|
|
98
81
|
return this;
|
|
99
82
|
},
|
|
100
83
|
byPage: (settings) => {
|
|
101
|
-
if (settings
|
|
84
|
+
if (settings?.maxPageSize) {
|
|
102
85
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
103
86
|
}
|
|
104
87
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
105
88
|
}
|
|
106
89
|
};
|
|
107
90
|
}
|
|
108
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
});
|
|
91
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
92
|
+
let result;
|
|
93
|
+
let continuationToken = settings?.continuationToken;
|
|
94
|
+
if (!continuationToken) {
|
|
95
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
96
|
+
let page = result.value || [];
|
|
97
|
+
continuationToken = result.nextLink;
|
|
98
|
+
setContinuationToken(page, continuationToken);
|
|
99
|
+
yield page;
|
|
100
|
+
}
|
|
101
|
+
while (continuationToken) {
|
|
102
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
103
|
+
continuationToken = result.nextLink;
|
|
104
|
+
let page = result.value || [];
|
|
105
|
+
setContinuationToken(page, continuationToken);
|
|
106
|
+
yield page;
|
|
107
|
+
}
|
|
127
108
|
}
|
|
128
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
133
|
-
_c = _f.value;
|
|
134
|
-
_d = false;
|
|
135
|
-
const page = _c;
|
|
136
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
140
|
-
finally {
|
|
141
|
-
try {
|
|
142
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
143
|
-
}
|
|
144
|
-
finally { if (e_2) throw e_2.error; }
|
|
145
|
-
}
|
|
146
|
-
});
|
|
109
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
110
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
111
|
+
yield* page;
|
|
112
|
+
}
|
|
147
113
|
}
|
|
148
114
|
/**
|
|
149
115
|
* Gets the list of valid SKUs and tiers for a provisioning service.
|
|
@@ -161,52 +127,35 @@ export class IotDpsResourceImpl {
|
|
|
161
127
|
return this;
|
|
162
128
|
},
|
|
163
129
|
byPage: (settings) => {
|
|
164
|
-
if (settings
|
|
130
|
+
if (settings?.maxPageSize) {
|
|
165
131
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
166
132
|
}
|
|
167
133
|
return this.listValidSkusPagingPage(provisioningServiceName, resourceGroupName, options, settings);
|
|
168
134
|
}
|
|
169
135
|
};
|
|
170
136
|
}
|
|
171
|
-
listValidSkusPagingPage(provisioningServiceName, resourceGroupName, options, settings) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
});
|
|
137
|
+
async *listValidSkusPagingPage(provisioningServiceName, resourceGroupName, options, settings) {
|
|
138
|
+
let result;
|
|
139
|
+
let continuationToken = settings?.continuationToken;
|
|
140
|
+
if (!continuationToken) {
|
|
141
|
+
result = await this._listValidSkus(provisioningServiceName, resourceGroupName, options);
|
|
142
|
+
let page = result.value || [];
|
|
143
|
+
continuationToken = result.nextLink;
|
|
144
|
+
setContinuationToken(page, continuationToken);
|
|
145
|
+
yield page;
|
|
146
|
+
}
|
|
147
|
+
while (continuationToken) {
|
|
148
|
+
result = await this._listValidSkusNext(provisioningServiceName, resourceGroupName, continuationToken, options);
|
|
149
|
+
continuationToken = result.nextLink;
|
|
150
|
+
let page = result.value || [];
|
|
151
|
+
setContinuationToken(page, continuationToken);
|
|
152
|
+
yield page;
|
|
153
|
+
}
|
|
190
154
|
}
|
|
191
|
-
listValidSkusPagingAll(provisioningServiceName, resourceGroupName, options) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
for (var _d = true, _e = __asyncValues(this.listValidSkusPagingPage(provisioningServiceName, resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
196
|
-
_c = _f.value;
|
|
197
|
-
_d = false;
|
|
198
|
-
const page = _c;
|
|
199
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
203
|
-
finally {
|
|
204
|
-
try {
|
|
205
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
206
|
-
}
|
|
207
|
-
finally { if (e_3) throw e_3.error; }
|
|
208
|
-
}
|
|
209
|
-
});
|
|
155
|
+
async *listValidSkusPagingAll(provisioningServiceName, resourceGroupName, options) {
|
|
156
|
+
for await (const page of this.listValidSkusPagingPage(provisioningServiceName, resourceGroupName, options)) {
|
|
157
|
+
yield* page;
|
|
158
|
+
}
|
|
210
159
|
}
|
|
211
160
|
/**
|
|
212
161
|
* List the primary and secondary keys for a provisioning service.
|
|
@@ -224,52 +173,35 @@ export class IotDpsResourceImpl {
|
|
|
224
173
|
return this;
|
|
225
174
|
},
|
|
226
175
|
byPage: (settings) => {
|
|
227
|
-
if (settings
|
|
176
|
+
if (settings?.maxPageSize) {
|
|
228
177
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
229
178
|
}
|
|
230
179
|
return this.listKeysPagingPage(provisioningServiceName, resourceGroupName, options, settings);
|
|
231
180
|
}
|
|
232
181
|
};
|
|
233
182
|
}
|
|
234
|
-
listKeysPagingPage(provisioningServiceName, resourceGroupName, options, settings) {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
});
|
|
183
|
+
async *listKeysPagingPage(provisioningServiceName, resourceGroupName, options, settings) {
|
|
184
|
+
let result;
|
|
185
|
+
let continuationToken = settings?.continuationToken;
|
|
186
|
+
if (!continuationToken) {
|
|
187
|
+
result = await this._listKeys(provisioningServiceName, resourceGroupName, options);
|
|
188
|
+
let page = result.value || [];
|
|
189
|
+
continuationToken = result.nextLink;
|
|
190
|
+
setContinuationToken(page, continuationToken);
|
|
191
|
+
yield page;
|
|
192
|
+
}
|
|
193
|
+
while (continuationToken) {
|
|
194
|
+
result = await this._listKeysNext(provisioningServiceName, resourceGroupName, continuationToken, options);
|
|
195
|
+
continuationToken = result.nextLink;
|
|
196
|
+
let page = result.value || [];
|
|
197
|
+
setContinuationToken(page, continuationToken);
|
|
198
|
+
yield page;
|
|
199
|
+
}
|
|
253
200
|
}
|
|
254
|
-
listKeysPagingAll(provisioningServiceName, resourceGroupName, options) {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
for (var _d = true, _e = __asyncValues(this.listKeysPagingPage(provisioningServiceName, resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
259
|
-
_c = _f.value;
|
|
260
|
-
_d = false;
|
|
261
|
-
const page = _c;
|
|
262
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
266
|
-
finally {
|
|
267
|
-
try {
|
|
268
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
269
|
-
}
|
|
270
|
-
finally { if (e_4) throw e_4.error; }
|
|
271
|
-
}
|
|
272
|
-
});
|
|
201
|
+
async *listKeysPagingAll(provisioningServiceName, resourceGroupName, options) {
|
|
202
|
+
for await (const page of this.listKeysPagingPage(provisioningServiceName, resourceGroupName, options)) {
|
|
203
|
+
yield* page;
|
|
204
|
+
}
|
|
273
205
|
}
|
|
274
206
|
/**
|
|
275
207
|
* Get the metadata of the provisioning service without SAS keys.
|
|
@@ -294,14 +226,19 @@ export class IotDpsResourceImpl {
|
|
|
294
226
|
return this.client.sendOperationRequest(args, spec);
|
|
295
227
|
};
|
|
296
228
|
const sendOperationFn = async (args, spec) => {
|
|
297
|
-
var _a;
|
|
298
229
|
let currentRawResponse = undefined;
|
|
299
|
-
const providedCallback =
|
|
230
|
+
const providedCallback = args.options?.onResponse;
|
|
300
231
|
const callback = (rawResponse, flatResponse) => {
|
|
301
232
|
currentRawResponse = rawResponse;
|
|
302
|
-
providedCallback
|
|
233
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
234
|
+
};
|
|
235
|
+
const updatedArgs = {
|
|
236
|
+
...args,
|
|
237
|
+
options: {
|
|
238
|
+
...args.options,
|
|
239
|
+
onResponse: callback
|
|
240
|
+
}
|
|
303
241
|
};
|
|
304
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
305
242
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
306
243
|
return {
|
|
307
244
|
flatResponse,
|
|
@@ -323,8 +260,8 @@ export class IotDpsResourceImpl {
|
|
|
323
260
|
spec: createOrUpdateOperationSpec
|
|
324
261
|
});
|
|
325
262
|
const poller = await createHttpPoller(lro, {
|
|
326
|
-
restoreFrom: options
|
|
327
|
-
intervalInMs: options
|
|
263
|
+
restoreFrom: options?.resumeFrom,
|
|
264
|
+
intervalInMs: options?.updateIntervalInMs
|
|
328
265
|
});
|
|
329
266
|
await poller.poll();
|
|
330
267
|
return poller;
|
|
@@ -355,14 +292,19 @@ export class IotDpsResourceImpl {
|
|
|
355
292
|
return this.client.sendOperationRequest(args, spec);
|
|
356
293
|
};
|
|
357
294
|
const sendOperationFn = async (args, spec) => {
|
|
358
|
-
var _a;
|
|
359
295
|
let currentRawResponse = undefined;
|
|
360
|
-
const providedCallback =
|
|
296
|
+
const providedCallback = args.options?.onResponse;
|
|
361
297
|
const callback = (rawResponse, flatResponse) => {
|
|
362
298
|
currentRawResponse = rawResponse;
|
|
363
|
-
providedCallback
|
|
299
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
300
|
+
};
|
|
301
|
+
const updatedArgs = {
|
|
302
|
+
...args,
|
|
303
|
+
options: {
|
|
304
|
+
...args.options,
|
|
305
|
+
onResponse: callback
|
|
306
|
+
}
|
|
364
307
|
};
|
|
365
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
366
308
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
367
309
|
return {
|
|
368
310
|
flatResponse,
|
|
@@ -384,8 +326,8 @@ export class IotDpsResourceImpl {
|
|
|
384
326
|
spec: updateOperationSpec
|
|
385
327
|
});
|
|
386
328
|
const poller = await createHttpPoller(lro, {
|
|
387
|
-
restoreFrom: options
|
|
388
|
-
intervalInMs: options
|
|
329
|
+
restoreFrom: options?.resumeFrom,
|
|
330
|
+
intervalInMs: options?.updateIntervalInMs
|
|
389
331
|
});
|
|
390
332
|
await poller.poll();
|
|
391
333
|
return poller;
|
|
@@ -413,14 +355,19 @@ export class IotDpsResourceImpl {
|
|
|
413
355
|
return this.client.sendOperationRequest(args, spec);
|
|
414
356
|
};
|
|
415
357
|
const sendOperationFn = async (args, spec) => {
|
|
416
|
-
var _a;
|
|
417
358
|
let currentRawResponse = undefined;
|
|
418
|
-
const providedCallback =
|
|
359
|
+
const providedCallback = args.options?.onResponse;
|
|
419
360
|
const callback = (rawResponse, flatResponse) => {
|
|
420
361
|
currentRawResponse = rawResponse;
|
|
421
|
-
providedCallback
|
|
362
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
363
|
+
};
|
|
364
|
+
const updatedArgs = {
|
|
365
|
+
...args,
|
|
366
|
+
options: {
|
|
367
|
+
...args.options,
|
|
368
|
+
onResponse: callback
|
|
369
|
+
}
|
|
422
370
|
};
|
|
423
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
424
371
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
425
372
|
return {
|
|
426
373
|
flatResponse,
|
|
@@ -437,8 +384,8 @@ export class IotDpsResourceImpl {
|
|
|
437
384
|
spec: deleteOperationSpec
|
|
438
385
|
});
|
|
439
386
|
const poller = await createHttpPoller(lro, {
|
|
440
|
-
restoreFrom: options
|
|
441
|
-
intervalInMs: options
|
|
387
|
+
restoreFrom: options?.resumeFrom,
|
|
388
|
+
intervalInMs: options?.updateIntervalInMs
|
|
442
389
|
});
|
|
443
390
|
await poller.poll();
|
|
444
391
|
return poller;
|
|
@@ -582,14 +529,19 @@ export class IotDpsResourceImpl {
|
|
|
582
529
|
return this.client.sendOperationRequest(args, spec);
|
|
583
530
|
};
|
|
584
531
|
const sendOperationFn = async (args, spec) => {
|
|
585
|
-
var _a;
|
|
586
532
|
let currentRawResponse = undefined;
|
|
587
|
-
const providedCallback =
|
|
533
|
+
const providedCallback = args.options?.onResponse;
|
|
588
534
|
const callback = (rawResponse, flatResponse) => {
|
|
589
535
|
currentRawResponse = rawResponse;
|
|
590
|
-
providedCallback
|
|
536
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
537
|
+
};
|
|
538
|
+
const updatedArgs = {
|
|
539
|
+
...args,
|
|
540
|
+
options: {
|
|
541
|
+
...args.options,
|
|
542
|
+
onResponse: callback
|
|
543
|
+
}
|
|
591
544
|
};
|
|
592
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
593
545
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
594
546
|
return {
|
|
595
547
|
flatResponse,
|
|
@@ -612,8 +564,8 @@ export class IotDpsResourceImpl {
|
|
|
612
564
|
spec: createOrUpdatePrivateEndpointConnectionOperationSpec
|
|
613
565
|
});
|
|
614
566
|
const poller = await createHttpPoller(lro, {
|
|
615
|
-
restoreFrom: options
|
|
616
|
-
intervalInMs: options
|
|
567
|
+
restoreFrom: options?.resumeFrom,
|
|
568
|
+
intervalInMs: options?.updateIntervalInMs
|
|
617
569
|
});
|
|
618
570
|
await poller.poll();
|
|
619
571
|
return poller;
|
|
@@ -642,14 +594,19 @@ export class IotDpsResourceImpl {
|
|
|
642
594
|
return this.client.sendOperationRequest(args, spec);
|
|
643
595
|
};
|
|
644
596
|
const sendOperationFn = async (args, spec) => {
|
|
645
|
-
var _a;
|
|
646
597
|
let currentRawResponse = undefined;
|
|
647
|
-
const providedCallback =
|
|
598
|
+
const providedCallback = args.options?.onResponse;
|
|
648
599
|
const callback = (rawResponse, flatResponse) => {
|
|
649
600
|
currentRawResponse = rawResponse;
|
|
650
|
-
providedCallback
|
|
601
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
602
|
+
};
|
|
603
|
+
const updatedArgs = {
|
|
604
|
+
...args,
|
|
605
|
+
options: {
|
|
606
|
+
...args.options,
|
|
607
|
+
onResponse: callback
|
|
608
|
+
}
|
|
651
609
|
};
|
|
652
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
653
610
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
654
611
|
return {
|
|
655
612
|
flatResponse,
|
|
@@ -671,8 +628,8 @@ export class IotDpsResourceImpl {
|
|
|
671
628
|
spec: deletePrivateEndpointConnectionOperationSpec
|
|
672
629
|
});
|
|
673
630
|
const poller = await createHttpPoller(lro, {
|
|
674
|
-
restoreFrom: options
|
|
675
|
-
intervalInMs: options
|
|
631
|
+
restoreFrom: options?.resumeFrom,
|
|
632
|
+
intervalInMs: options?.updateIntervalInMs
|
|
676
633
|
});
|
|
677
634
|
await poller.poll();
|
|
678
635
|
return poller;
|