@azure/arm-deviceprovisioningservices 5.1.1-alpha.20230616.1 → 6.0.0-beta.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 (75) hide show
  1. package/CHANGELOG.md +16 -8
  2. package/README.md +1 -1
  3. package/dist/index.js +182 -72
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/dpsCertificateCreateOrUpdateSample.js +2 -4
  8. package/dist-esm/samples-dev/dpsCertificateCreateOrUpdateSample.js.map +1 -1
  9. package/dist-esm/samples-dev/dpsCertificateDeleteSample.js +1 -1
  10. package/dist-esm/samples-dev/dpsCertificateGenerateVerificationCodeSample.js +1 -1
  11. package/dist-esm/samples-dev/dpsCertificateGetSample.js +1 -1
  12. package/dist-esm/samples-dev/dpsCertificateListSample.js +1 -1
  13. package/dist-esm/samples-dev/dpsCertificateVerifyCertificateSample.js +1 -1
  14. package/dist-esm/samples-dev/iotDpsResourceCheckProvisioningServiceNameAvailabilitySample.js +1 -1
  15. package/dist-esm/samples-dev/iotDpsResourceCreateOrUpdatePrivateEndpointConnectionSample.js +1 -1
  16. package/dist-esm/samples-dev/iotDpsResourceCreateOrUpdateSample.js +33 -1
  17. package/dist-esm/samples-dev/iotDpsResourceCreateOrUpdateSample.js.map +1 -1
  18. package/dist-esm/samples-dev/iotDpsResourceDeletePrivateEndpointConnectionSample.js +1 -1
  19. package/dist-esm/samples-dev/iotDpsResourceDeleteSample.js +3 -3
  20. package/dist-esm/samples-dev/iotDpsResourceDeleteSample.js.map +1 -1
  21. package/dist-esm/samples-dev/iotDpsResourceGetOperationResultSample.js +1 -1
  22. package/dist-esm/samples-dev/iotDpsResourceGetPrivateEndpointConnectionSample.js +1 -1
  23. package/dist-esm/samples-dev/iotDpsResourceGetPrivateLinkResourcesSample.js +1 -1
  24. package/dist-esm/samples-dev/iotDpsResourceGetSample.js +3 -3
  25. package/dist-esm/samples-dev/iotDpsResourceGetSample.js.map +1 -1
  26. package/dist-esm/samples-dev/iotDpsResourceListByResourceGroupSample.js +1 -1
  27. package/dist-esm/samples-dev/iotDpsResourceListBySubscriptionSample.js +1 -1
  28. package/dist-esm/samples-dev/iotDpsResourceListKeysForKeyNameSample.js +1 -1
  29. package/dist-esm/samples-dev/iotDpsResourceListKeysSample.js +1 -1
  30. package/dist-esm/samples-dev/iotDpsResourceListPrivateEndpointConnectionsSample.js +1 -1
  31. package/dist-esm/samples-dev/iotDpsResourceListPrivateLinkResourcesSample.js +1 -1
  32. package/dist-esm/samples-dev/iotDpsResourceListValidSkusSample.js +1 -1
  33. package/dist-esm/samples-dev/iotDpsResourceUpdateSample.js +1 -1
  34. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  35. package/dist-esm/src/iotDpsClient.js +2 -2
  36. package/dist-esm/src/iotDpsClient.js.map +1 -1
  37. package/dist-esm/src/lroImpl.d.ts +6 -11
  38. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  39. package/dist-esm/src/lroImpl.js +12 -20
  40. package/dist-esm/src/lroImpl.js.map +1 -1
  41. package/dist-esm/src/models/index.d.ts +63 -1
  42. package/dist-esm/src/models/index.d.ts.map +1 -1
  43. package/dist-esm/src/models/index.js +12 -0
  44. package/dist-esm/src/models/index.js.map +1 -1
  45. package/dist-esm/src/models/mappers.d.ts +2 -0
  46. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  47. package/dist-esm/src/models/mappers.js +85 -1
  48. package/dist-esm/src/models/mappers.js.map +1 -1
  49. package/dist-esm/src/models/parameters.js +1 -1
  50. package/dist-esm/src/models/parameters.js.map +1 -1
  51. package/dist-esm/src/operations/iotDpsResource.d.ts +11 -11
  52. package/dist-esm/src/operations/iotDpsResource.d.ts.map +1 -1
  53. package/dist-esm/src/operations/iotDpsResource.js +71 -51
  54. package/dist-esm/src/operations/iotDpsResource.js.map +1 -1
  55. package/dist-esm/src/operationsInterfaces/iotDpsResource.d.ts +11 -11
  56. package/dist-esm/src/operationsInterfaces/iotDpsResource.d.ts.map +1 -1
  57. package/dist-esm/test/deviceprovisioningservices_operations_test.spec.d.ts +4 -0
  58. package/dist-esm/test/deviceprovisioningservices_operations_test.spec.d.ts.map +1 -0
  59. package/dist-esm/test/deviceprovisioningservices_operations_test.spec.js +123 -0
  60. package/dist-esm/test/deviceprovisioningservices_operations_test.spec.js.map +1 -0
  61. package/package.json +6 -6
  62. package/review/arm-deviceprovisioningservices.api.md +41 -10
  63. package/src/iotDpsClient.ts +2 -2
  64. package/src/lroImpl.ts +31 -23
  65. package/src/models/index.ts +67 -1
  66. package/src/models/mappers.ts +88 -1
  67. package/src/models/parameters.ts +1 -1
  68. package/src/operations/iotDpsResource.ts +77 -59
  69. package/src/operationsInterfaces/iotDpsResource.ts +16 -16
  70. package/types/arm-deviceprovisioningservices.d.ts +79 -13
  71. package/types/tsdoc-metadata.json +1 -1
  72. package/dist-esm/test/sampleTest.d.ts +0 -2
  73. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  74. package/dist-esm/test/sampleTest.js +0 -38
  75. package/dist-esm/test/sampleTest.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,15 +1,23 @@
1
1
  # Release History
2
+
3
+ ## 6.0.0-beta.1 (2023-06-07)
4
+
5
+ **Features**
2
6
 
3
- ## 5.1.1 (Unreleased)
4
-
5
- ### Features Added
6
-
7
- ### Breaking Changes
8
-
9
- ### Bugs Fixed
7
+ - Added Interface ManagedServiceIdentity
8
+ - Added Interface UserAssignedIdentity
9
+ - Added Type Alias ManagedServiceIdentityType
10
+ - Interface IotDpsPropertiesDescription has a new optional parameter portalOperationsHostName
11
+ - Interface ProvisioningServiceDescription has a new optional parameter identity
12
+ - Interface Resource has a new optional parameter resourcegroup
13
+ - Interface Resource has a new optional parameter subscriptionid
14
+ - Added Enum KnownManagedServiceIdentityType
10
15
 
11
- ### Other Changes
16
+ **Breaking Changes**
12
17
 
18
+ - Type of parameter code of interface ErrorDetails is changed from string to number
19
+
20
+
13
21
  ## 5.1.0 (2023-01-05)
14
22
 
15
23
  **Features**
package/README.md CHANGED
@@ -6,7 +6,7 @@ API for using the Azure IoT Hub Device Provisioning Service features.
6
6
 
7
7
  [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/deviceprovisioningservices/arm-deviceprovisioningservices) |
8
8
  [Package (NPM)](https://www.npmjs.com/package/@azure/arm-deviceprovisioningservices) |
9
- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-deviceprovisioningservices) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-deviceprovisioningservices?view=azure-node-preview) |
10
10
  [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
11
11
 
12
12
  ## Getting started
package/dist/index.js CHANGED
@@ -167,6 +167,18 @@ exports.KnownIotDpsSku = void 0;
167
167
  /** S1 */
168
168
  KnownIotDpsSku["S1"] = "S1";
169
169
  })(exports.KnownIotDpsSku || (exports.KnownIotDpsSku = {}));
170
+ /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */
171
+ exports.KnownManagedServiceIdentityType = void 0;
172
+ (function (KnownManagedServiceIdentityType) {
173
+ /** None */
174
+ KnownManagedServiceIdentityType["None"] = "None";
175
+ /** SystemAssigned */
176
+ KnownManagedServiceIdentityType["SystemAssigned"] = "SystemAssigned";
177
+ /** UserAssigned */
178
+ KnownManagedServiceIdentityType["UserAssigned"] = "UserAssigned";
179
+ /** SystemAssignedUserAssigned */
180
+ KnownManagedServiceIdentityType["SystemAssignedUserAssigned"] = "SystemAssigned,UserAssigned";
181
+ })(exports.KnownManagedServiceIdentityType || (exports.KnownManagedServiceIdentityType = {}));
170
182
  /** Known values of {@link NameUnavailabilityReason} that the service accepts. */
171
183
  exports.KnownNameUnavailabilityReason = void 0;
172
184
  (function (KnownNameUnavailabilityReason) {
@@ -271,7 +283,7 @@ const ErrorDetails = {
271
283
  serializedName: "code",
272
284
  readOnly: true,
273
285
  type: {
274
- name: "String"
286
+ name: "Number"
275
287
  }
276
288
  },
277
289
  httpStatusCode: {
@@ -550,6 +562,12 @@ const IotDpsPropertiesDescription = {
550
562
  type: {
551
563
  name: "Boolean"
552
564
  }
565
+ },
566
+ portalOperationsHostName: {
567
+ serializedName: "portalOperationsHostName",
568
+ type: {
569
+ name: "String"
570
+ }
553
571
  }
554
572
  }
555
573
  }
@@ -804,6 +822,66 @@ const IotDpsSkuInfo = {
804
822
  }
805
823
  }
806
824
  };
825
+ const ManagedServiceIdentity = {
826
+ type: {
827
+ name: "Composite",
828
+ className: "ManagedServiceIdentity",
829
+ modelProperties: {
830
+ principalId: {
831
+ serializedName: "principalId",
832
+ readOnly: true,
833
+ type: {
834
+ name: "Uuid"
835
+ }
836
+ },
837
+ tenantId: {
838
+ serializedName: "tenantId",
839
+ readOnly: true,
840
+ type: {
841
+ name: "Uuid"
842
+ }
843
+ },
844
+ type: {
845
+ serializedName: "type",
846
+ required: true,
847
+ type: {
848
+ name: "String"
849
+ }
850
+ },
851
+ userAssignedIdentities: {
852
+ serializedName: "userAssignedIdentities",
853
+ type: {
854
+ name: "Dictionary",
855
+ value: {
856
+ type: { name: "Composite", className: "UserAssignedIdentity" }
857
+ }
858
+ }
859
+ }
860
+ }
861
+ }
862
+ };
863
+ const UserAssignedIdentity = {
864
+ type: {
865
+ name: "Composite",
866
+ className: "UserAssignedIdentity",
867
+ modelProperties: {
868
+ principalId: {
869
+ serializedName: "principalId",
870
+ readOnly: true,
871
+ type: {
872
+ name: "Uuid"
873
+ }
874
+ },
875
+ clientId: {
876
+ serializedName: "clientId",
877
+ readOnly: true,
878
+ type: {
879
+ name: "Uuid"
880
+ }
881
+ }
882
+ }
883
+ }
884
+ };
807
885
  const Resource = {
808
886
  type: {
809
887
  name: "Composite",
@@ -840,6 +918,18 @@ const Resource = {
840
918
  name: "String"
841
919
  }
842
920
  },
921
+ resourcegroup: {
922
+ serializedName: "resourcegroup",
923
+ type: {
924
+ name: "String"
925
+ }
926
+ },
927
+ subscriptionid: {
928
+ serializedName: "subscriptionid",
929
+ type: {
930
+ name: "String"
931
+ }
932
+ },
843
933
  tags: {
844
934
  serializedName: "tags",
845
935
  type: {
@@ -1323,6 +1413,12 @@ const ProvisioningServiceDescription = {
1323
1413
  name: "Composite",
1324
1414
  className: "SystemData"
1325
1415
  }
1416
+ }, identity: {
1417
+ serializedName: "identity",
1418
+ type: {
1419
+ name: "Composite",
1420
+ className: "ManagedServiceIdentity"
1421
+ }
1326
1422
  } })
1327
1423
  }
1328
1424
  };
@@ -1371,6 +1467,8 @@ var Mappers = /*#__PURE__*/Object.freeze({
1371
1467
  IotHubDefinitionDescription: IotHubDefinitionDescription,
1372
1468
  SharedAccessSignatureAuthorizationRuleAccessRightsDescription: SharedAccessSignatureAuthorizationRuleAccessRightsDescription,
1373
1469
  IotDpsSkuInfo: IotDpsSkuInfo,
1470
+ ManagedServiceIdentity: ManagedServiceIdentity,
1471
+ UserAssignedIdentity: UserAssignedIdentity,
1374
1472
  Resource: Resource,
1375
1473
  TagsResource: TagsResource,
1376
1474
  CertificateListDescription: CertificateListDescription,
@@ -1425,7 +1523,7 @@ const $host = {
1425
1523
  const apiVersion = {
1426
1524
  parameterPath: "apiVersion",
1427
1525
  mapper: {
1428
- defaultValue: "2022-02-05",
1526
+ defaultValue: "2023-03-01-preview",
1429
1527
  isConstant: true,
1430
1528
  serializedName: "api-version",
1431
1529
  type: {
@@ -2111,25 +2209,17 @@ const verifyCertificateOperationSpec = {
2111
2209
  * Code generated by Microsoft (R) AutoRest Code Generator.
2112
2210
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2113
2211
  */
2114
- class LroImpl {
2115
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
2116
- this.sendOperationFn = sendOperationFn;
2117
- this.args = args;
2118
- this.spec = spec;
2119
- this.requestPath = requestPath;
2120
- this.requestMethod = requestMethod;
2121
- }
2122
- sendInitialRequest() {
2123
- return tslib.__awaiter(this, void 0, void 0, function* () {
2124
- return this.sendOperationFn(this.args, this.spec);
2125
- });
2126
- }
2127
- sendPollRequest(path) {
2128
- return tslib.__awaiter(this, void 0, void 0, function* () {
2129
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
2130
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
2131
- });
2132
- }
2212
+ function createLroSpec(inputs) {
2213
+ const { args, spec, sendOperationFn } = inputs;
2214
+ return {
2215
+ requestMethod: spec.httpMethod,
2216
+ requestPath: spec.path,
2217
+ sendInitialRequest: () => sendOperationFn(args, spec),
2218
+ sendPollRequest: (path, options) => {
2219
+ const restSpec = tslib.__rest(spec, ["requestBody"]);
2220
+ return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
2221
+ }
2222
+ };
2133
2223
  }
2134
2224
 
2135
2225
  /*
@@ -2420,12 +2510,12 @@ class IotDpsResourceImpl {
2420
2510
  }
2421
2511
  /**
2422
2512
  * Get the metadata of the provisioning service without SAS keys.
2423
- * @param provisioningServiceName Name of the provisioning service to retrieve.
2424
2513
  * @param resourceGroupName Resource group name.
2514
+ * @param provisioningServiceName Name of the provisioning service to retrieve.
2425
2515
  * @param options The options parameters.
2426
2516
  */
2427
- get(provisioningServiceName, resourceGroupName, options) {
2428
- return this.client.sendOperationRequest({ provisioningServiceName, resourceGroupName, options }, getOperationSpec);
2517
+ get(resourceGroupName, provisioningServiceName, options) {
2518
+ return this.client.sendOperationRequest({ resourceGroupName, provisioningServiceName, options }, getOperationSpec);
2429
2519
  }
2430
2520
  /**
2431
2521
  * Create or update the metadata of the provisioning service. The usual pattern to modify a property is
@@ -2441,7 +2531,7 @@ class IotDpsResourceImpl {
2441
2531
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2442
2532
  return this.client.sendOperationRequest(args, spec);
2443
2533
  });
2444
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2534
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2445
2535
  var _a;
2446
2536
  let currentRawResponse = undefined;
2447
2537
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2460,14 +2550,18 @@ class IotDpsResourceImpl {
2460
2550
  }
2461
2551
  };
2462
2552
  });
2463
- const lro = new LroImpl(sendOperation, {
2464
- resourceGroupName,
2465
- provisioningServiceName,
2466
- iotDpsDescription,
2467
- options
2468
- }, createOrUpdateOperationSpec);
2469
- const poller = new coreLro.LroEngine(lro, {
2470
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2553
+ const lro = createLroSpec({
2554
+ sendOperationFn,
2555
+ args: {
2556
+ resourceGroupName,
2557
+ provisioningServiceName,
2558
+ iotDpsDescription,
2559
+ options
2560
+ },
2561
+ spec: createOrUpdateOperationSpec
2562
+ });
2563
+ const poller = yield coreLro.createHttpPoller(lro, {
2564
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2471
2565
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2472
2566
  });
2473
2567
  yield poller.poll();
@@ -2502,7 +2596,7 @@ class IotDpsResourceImpl {
2502
2596
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2503
2597
  return this.client.sendOperationRequest(args, spec);
2504
2598
  });
2505
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2599
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2506
2600
  var _a;
2507
2601
  let currentRawResponse = undefined;
2508
2602
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2521,14 +2615,18 @@ class IotDpsResourceImpl {
2521
2615
  }
2522
2616
  };
2523
2617
  });
2524
- const lro = new LroImpl(sendOperation, {
2525
- resourceGroupName,
2526
- provisioningServiceName,
2527
- provisioningServiceTags,
2528
- options
2529
- }, updateOperationSpec);
2530
- const poller = new coreLro.LroEngine(lro, {
2531
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2618
+ const lro = createLroSpec({
2619
+ sendOperationFn,
2620
+ args: {
2621
+ resourceGroupName,
2622
+ provisioningServiceName,
2623
+ provisioningServiceTags,
2624
+ options
2625
+ },
2626
+ spec: updateOperationSpec
2627
+ });
2628
+ const poller = yield coreLro.createHttpPoller(lro, {
2629
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2532
2630
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2533
2631
  });
2534
2632
  yield poller.poll();
@@ -2551,16 +2649,16 @@ class IotDpsResourceImpl {
2551
2649
  }
2552
2650
  /**
2553
2651
  * Deletes the Provisioning Service.
2554
- * @param provisioningServiceName Name of provisioning service to delete.
2555
2652
  * @param resourceGroupName Resource group identifier.
2653
+ * @param provisioningServiceName Name of provisioning service to delete.
2556
2654
  * @param options The options parameters.
2557
2655
  */
2558
- beginDelete(provisioningServiceName, resourceGroupName, options) {
2656
+ beginDelete(resourceGroupName, provisioningServiceName, options) {
2559
2657
  return tslib.__awaiter(this, void 0, void 0, function* () {
2560
2658
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2561
2659
  return this.client.sendOperationRequest(args, spec);
2562
2660
  });
2563
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2661
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2564
2662
  var _a;
2565
2663
  let currentRawResponse = undefined;
2566
2664
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2579,9 +2677,13 @@ class IotDpsResourceImpl {
2579
2677
  }
2580
2678
  };
2581
2679
  });
2582
- const lro = new LroImpl(sendOperation, { provisioningServiceName, resourceGroupName, options }, deleteOperationSpec);
2583
- const poller = new coreLro.LroEngine(lro, {
2584
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2680
+ const lro = createLroSpec({
2681
+ sendOperationFn,
2682
+ args: { resourceGroupName, provisioningServiceName, options },
2683
+ spec: deleteOperationSpec
2684
+ });
2685
+ const poller = yield coreLro.createHttpPoller(lro, {
2686
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2585
2687
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2586
2688
  });
2587
2689
  yield poller.poll();
@@ -2590,13 +2692,13 @@ class IotDpsResourceImpl {
2590
2692
  }
2591
2693
  /**
2592
2694
  * Deletes the Provisioning Service.
2593
- * @param provisioningServiceName Name of provisioning service to delete.
2594
2695
  * @param resourceGroupName Resource group identifier.
2696
+ * @param provisioningServiceName Name of provisioning service to delete.
2595
2697
  * @param options The options parameters.
2596
2698
  */
2597
- beginDeleteAndWait(provisioningServiceName, resourceGroupName, options) {
2699
+ beginDeleteAndWait(resourceGroupName, provisioningServiceName, options) {
2598
2700
  return tslib.__awaiter(this, void 0, void 0, function* () {
2599
- const poller = yield this.beginDelete(provisioningServiceName, resourceGroupName, options);
2701
+ const poller = yield this.beginDelete(resourceGroupName, provisioningServiceName, options);
2600
2702
  return poller.pollUntilDone();
2601
2703
  });
2602
2704
  }
@@ -2729,7 +2831,7 @@ class IotDpsResourceImpl {
2729
2831
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2730
2832
  return this.client.sendOperationRequest(args, spec);
2731
2833
  });
2732
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2834
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2733
2835
  var _a;
2734
2836
  let currentRawResponse = undefined;
2735
2837
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2748,15 +2850,19 @@ class IotDpsResourceImpl {
2748
2850
  }
2749
2851
  };
2750
2852
  });
2751
- const lro = new LroImpl(sendOperation, {
2752
- resourceGroupName,
2753
- resourceName,
2754
- privateEndpointConnectionName,
2755
- privateEndpointConnection,
2756
- options
2757
- }, createOrUpdatePrivateEndpointConnectionOperationSpec);
2758
- const poller = new coreLro.LroEngine(lro, {
2759
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2853
+ const lro = createLroSpec({
2854
+ sendOperationFn,
2855
+ args: {
2856
+ resourceGroupName,
2857
+ resourceName,
2858
+ privateEndpointConnectionName,
2859
+ privateEndpointConnection,
2860
+ options
2861
+ },
2862
+ spec: createOrUpdatePrivateEndpointConnectionOperationSpec
2863
+ });
2864
+ const poller = yield coreLro.createHttpPoller(lro, {
2865
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2760
2866
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2761
2867
  });
2762
2868
  yield poller.poll();
@@ -2789,7 +2895,7 @@ class IotDpsResourceImpl {
2789
2895
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2790
2896
  return this.client.sendOperationRequest(args, spec);
2791
2897
  });
2792
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2898
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2793
2899
  var _a;
2794
2900
  let currentRawResponse = undefined;
2795
2901
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2808,14 +2914,18 @@ class IotDpsResourceImpl {
2808
2914
  }
2809
2915
  };
2810
2916
  });
2811
- const lro = new LroImpl(sendOperation, {
2812
- resourceGroupName,
2813
- resourceName,
2814
- privateEndpointConnectionName,
2815
- options
2816
- }, deletePrivateEndpointConnectionOperationSpec);
2817
- const poller = new coreLro.LroEngine(lro, {
2818
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2917
+ const lro = createLroSpec({
2918
+ sendOperationFn,
2919
+ args: {
2920
+ resourceGroupName,
2921
+ resourceName,
2922
+ privateEndpointConnectionName,
2923
+ options
2924
+ },
2925
+ spec: deletePrivateEndpointConnectionOperationSpec
2926
+ });
2927
+ const poller = yield coreLro.createHttpPoller(lro, {
2928
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2819
2929
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2820
2930
  });
2821
2931
  yield poller.poll();
@@ -3388,7 +3498,7 @@ class IotDpsClient extends coreClient__namespace.ServiceClient {
3388
3498
  requestContentType: "application/json; charset=utf-8",
3389
3499
  credential: credentials
3390
3500
  };
3391
- const packageDetails = `azsdk-js-arm-deviceprovisioningservices/5.1.1`;
3501
+ const packageDetails = `azsdk-js-arm-deviceprovisioningservices/6.0.0-beta.1`;
3392
3502
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3393
3503
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3394
3504
  : `${packageDetails}`;
@@ -3421,7 +3531,7 @@ class IotDpsClient extends coreClient__namespace.ServiceClient {
3421
3531
  this.subscriptionId = subscriptionId;
3422
3532
  // Assigning values to Constant parameters
3423
3533
  this.$host = options.$host || "https://management.azure.com";
3424
- this.apiVersion = options.apiVersion || "2022-02-05";
3534
+ this.apiVersion = options.apiVersion || "2023-03-01-preview";
3425
3535
  this.operations = new OperationsImpl(this);
3426
3536
  this.dpsCertificate = new DpsCertificateImpl(this);
3427
3537
  this.iotDpsResource = new IotDpsResourceImpl(this);