@azure/arm-confidentialledger 1.2.1-alpha.20230320.1 → 1.3.0-alpha.20230410.2

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 (94) hide show
  1. package/CHANGELOG.md +33 -10
  2. package/README.md +1 -1
  3. package/dist/index.js +839 -90
  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/checkNameAvailabilitySample.js +1 -1
  8. package/dist-esm/samples-dev/ledgerCreateSample.js +1 -1
  9. package/dist-esm/samples-dev/ledgerDeleteSample.js +1 -1
  10. package/dist-esm/samples-dev/ledgerGetSample.js +1 -1
  11. package/dist-esm/samples-dev/ledgerListByResourceGroupSample.js +1 -1
  12. package/dist-esm/samples-dev/ledgerListBySubscriptionSample.js +1 -1
  13. package/dist-esm/samples-dev/ledgerUpdateSample.js +1 -1
  14. package/dist-esm/samples-dev/managedCcfCreateSample.d.ts +2 -0
  15. package/dist-esm/samples-dev/managedCcfCreateSample.d.ts.map +1 -0
  16. package/dist-esm/samples-dev/managedCcfCreateSample.js +58 -0
  17. package/dist-esm/samples-dev/managedCcfCreateSample.js.map +1 -0
  18. package/dist-esm/samples-dev/managedCcfDeleteSample.d.ts +2 -0
  19. package/dist-esm/samples-dev/managedCcfDeleteSample.d.ts.map +1 -0
  20. package/dist-esm/samples-dev/managedCcfDeleteSample.js +40 -0
  21. package/dist-esm/samples-dev/managedCcfDeleteSample.js.map +1 -0
  22. package/dist-esm/samples-dev/managedCcfGetSample.d.ts +2 -0
  23. package/dist-esm/samples-dev/managedCcfGetSample.d.ts.map +1 -0
  24. package/dist-esm/samples-dev/managedCcfGetSample.js +40 -0
  25. package/dist-esm/samples-dev/managedCcfGetSample.js.map +1 -0
  26. package/dist-esm/samples-dev/managedCcfListByResourceGroupSample.d.ts +2 -0
  27. package/dist-esm/samples-dev/managedCcfListByResourceGroupSample.d.ts.map +1 -0
  28. package/dist-esm/samples-dev/managedCcfListByResourceGroupSample.js +53 -0
  29. package/dist-esm/samples-dev/managedCcfListByResourceGroupSample.js.map +1 -0
  30. package/dist-esm/samples-dev/managedCcfListBySubscriptionSample.d.ts +2 -0
  31. package/dist-esm/samples-dev/managedCcfListBySubscriptionSample.d.ts.map +1 -0
  32. package/dist-esm/samples-dev/managedCcfListBySubscriptionSample.js +51 -0
  33. package/dist-esm/samples-dev/managedCcfListBySubscriptionSample.js.map +1 -0
  34. package/dist-esm/samples-dev/managedCcfUpdateSample.d.ts +2 -0
  35. package/dist-esm/samples-dev/managedCcfUpdateSample.d.ts.map +1 -0
  36. package/dist-esm/samples-dev/managedCcfUpdateSample.js +50 -0
  37. package/dist-esm/samples-dev/managedCcfUpdateSample.js.map +1 -0
  38. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  39. package/dist-esm/src/confidentialLedgerClient.d.ts +3 -3
  40. package/dist-esm/src/confidentialLedgerClient.d.ts.map +1 -1
  41. package/dist-esm/src/confidentialLedgerClient.js +5 -5
  42. package/dist-esm/src/confidentialLedgerClient.js.map +1 -1
  43. package/dist-esm/src/lroImpl.d.ts +6 -11
  44. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  45. package/dist-esm/src/lroImpl.js +12 -20
  46. package/dist-esm/src/lroImpl.js.map +1 -1
  47. package/dist-esm/src/models/index.d.ts +176 -13
  48. package/dist-esm/src/models/index.d.ts.map +1 -1
  49. package/dist-esm/src/models/index.js +22 -0
  50. package/dist-esm/src/models/index.js.map +1 -1
  51. package/dist-esm/src/models/mappers.d.ts +7 -1
  52. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  53. package/dist-esm/src/models/mappers.js +188 -16
  54. package/dist-esm/src/models/mappers.js.map +1 -1
  55. package/dist-esm/src/models/parameters.d.ts +2 -0
  56. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  57. package/dist-esm/src/models/parameters.js +23 -3
  58. package/dist-esm/src/models/parameters.js.map +1 -1
  59. package/dist-esm/src/operations/index.d.ts +1 -0
  60. package/dist-esm/src/operations/index.d.ts.map +1 -1
  61. package/dist-esm/src/operations/index.js +1 -0
  62. package/dist-esm/src/operations/index.js.map +1 -1
  63. package/dist-esm/src/operations/ledger.d.ts +14 -14
  64. package/dist-esm/src/operations/ledger.d.ts.map +1 -1
  65. package/dist-esm/src/operations/ledger.js +37 -25
  66. package/dist-esm/src/operations/ledger.js.map +1 -1
  67. package/dist-esm/src/operations/managedCCFOperations.d.ts +107 -0
  68. package/dist-esm/src/operations/managedCCFOperations.d.ts.map +1 -0
  69. package/dist-esm/src/operations/managedCCFOperations.js +532 -0
  70. package/dist-esm/src/operations/managedCCFOperations.js.map +1 -0
  71. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  72. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  73. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  74. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  75. package/dist-esm/src/operationsInterfaces/ledger.d.ts +12 -12
  76. package/dist-esm/src/operationsInterfaces/ledger.d.ts.map +1 -1
  77. package/dist-esm/src/operationsInterfaces/managedCCFOperations.d.ts +71 -0
  78. package/dist-esm/src/operationsInterfaces/managedCCFOperations.d.ts.map +1 -0
  79. package/dist-esm/src/operationsInterfaces/managedCCFOperations.js +9 -0
  80. package/dist-esm/src/operationsInterfaces/managedCCFOperations.js.map +1 -0
  81. package/package.json +5 -5
  82. package/review/arm-confidentialledger.api.md +151 -11
  83. package/src/confidentialLedgerClient.ts +15 -6
  84. package/src/lroImpl.ts +31 -23
  85. package/src/models/index.ts +202 -14
  86. package/src/models/mappers.ts +202 -17
  87. package/src/models/parameters.ts +26 -3
  88. package/src/operations/index.ts +1 -0
  89. package/src/operations/ledger.ts +50 -40
  90. package/src/operations/managedCCFOperations.ts +696 -0
  91. package/src/operationsInterfaces/index.ts +1 -0
  92. package/src/operationsInterfaces/ledger.ts +12 -12
  93. package/src/operationsInterfaces/managedCCFOperations.ts +132 -0
  94. package/types/arm-confidentialledger.d.ts +284 -29
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { ConfidentialLedgerClient } from "../confidentialLedgerClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  ConfidentialLedger,
20
24
  LedgerListByResourceGroupNextOptionalParams,
@@ -49,7 +53,7 @@ export class LedgerImpl implements Ledger {
49
53
 
50
54
  /**
51
55
  * Retrieves the properties of all Confidential Ledgers.
52
- * @param resourceGroupName The name of the resource group.
56
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
53
57
  * @param options The options parameters.
54
58
  */
55
59
  public listByResourceGroup(
@@ -172,7 +176,7 @@ export class LedgerImpl implements Ledger {
172
176
 
173
177
  /**
174
178
  * Retrieves the properties of a Confidential Ledger.
175
- * @param resourceGroupName The name of the resource group.
179
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
176
180
  * @param ledgerName Name of the Confidential Ledger
177
181
  * @param options The options parameters.
178
182
  */
@@ -189,7 +193,7 @@ export class LedgerImpl implements Ledger {
189
193
 
190
194
  /**
191
195
  * Deletes an existing Confidential Ledger.
192
- * @param resourceGroupName The name of the resource group.
196
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
193
197
  * @param ledgerName Name of the Confidential Ledger
194
198
  * @param options The options parameters.
195
199
  */
@@ -197,14 +201,14 @@ export class LedgerImpl implements Ledger {
197
201
  resourceGroupName: string,
198
202
  ledgerName: string,
199
203
  options?: LedgerDeleteOptionalParams
200
- ): Promise<PollerLike<PollOperationState<void>, void>> {
204
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
201
205
  const directSendOperation = async (
202
206
  args: coreClient.OperationArguments,
203
207
  spec: coreClient.OperationSpec
204
208
  ): Promise<void> => {
205
209
  return this.client.sendOperationRequest(args, spec);
206
210
  };
207
- const sendOperation = async (
211
+ const sendOperationFn = async (
208
212
  args: coreClient.OperationArguments,
209
213
  spec: coreClient.OperationSpec
210
214
  ) => {
@@ -237,13 +241,13 @@ export class LedgerImpl implements Ledger {
237
241
  };
238
242
  };
239
243
 
240
- const lro = new LroImpl(
241
- sendOperation,
242
- { resourceGroupName, ledgerName, options },
243
- deleteOperationSpec
244
- );
245
- const poller = new LroEngine(lro, {
246
- resumeFrom: options?.resumeFrom,
244
+ const lro = createLroSpec({
245
+ sendOperationFn,
246
+ args: { resourceGroupName, ledgerName, options },
247
+ spec: deleteOperationSpec
248
+ });
249
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
250
+ restoreFrom: options?.resumeFrom,
247
251
  intervalInMs: options?.updateIntervalInMs
248
252
  });
249
253
  await poller.poll();
@@ -252,7 +256,7 @@ export class LedgerImpl implements Ledger {
252
256
 
253
257
  /**
254
258
  * Deletes an existing Confidential Ledger.
255
- * @param resourceGroupName The name of the resource group.
259
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
256
260
  * @param ledgerName Name of the Confidential Ledger
257
261
  * @param options The options parameters.
258
262
  */
@@ -271,7 +275,7 @@ export class LedgerImpl implements Ledger {
271
275
 
272
276
  /**
273
277
  * Creates a Confidential Ledger with the specified ledger parameters.
274
- * @param resourceGroupName The name of the resource group.
278
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
275
279
  * @param ledgerName Name of the Confidential Ledger
276
280
  * @param confidentialLedger Confidential Ledger Create Request Body
277
281
  * @param options The options parameters.
@@ -282,7 +286,7 @@ export class LedgerImpl implements Ledger {
282
286
  confidentialLedger: ConfidentialLedger,
283
287
  options?: LedgerCreateOptionalParams
284
288
  ): Promise<
285
- PollerLike<PollOperationState<LedgerCreateResponse>, LedgerCreateResponse>
289
+ SimplePollerLike<OperationState<LedgerCreateResponse>, LedgerCreateResponse>
286
290
  > {
287
291
  const directSendOperation = async (
288
292
  args: coreClient.OperationArguments,
@@ -290,7 +294,7 @@ export class LedgerImpl implements Ledger {
290
294
  ): Promise<LedgerCreateResponse> => {
291
295
  return this.client.sendOperationRequest(args, spec);
292
296
  };
293
- const sendOperation = async (
297
+ const sendOperationFn = async (
294
298
  args: coreClient.OperationArguments,
295
299
  spec: coreClient.OperationSpec
296
300
  ) => {
@@ -323,15 +327,18 @@ export class LedgerImpl implements Ledger {
323
327
  };
324
328
  };
325
329
 
326
- const lro = new LroImpl(
327
- sendOperation,
328
- { resourceGroupName, ledgerName, confidentialLedger, options },
329
- createOperationSpec
330
- );
331
- const poller = new LroEngine(lro, {
332
- resumeFrom: options?.resumeFrom,
330
+ const lro = createLroSpec({
331
+ sendOperationFn,
332
+ args: { resourceGroupName, ledgerName, confidentialLedger, options },
333
+ spec: createOperationSpec
334
+ });
335
+ const poller = await createHttpPoller<
336
+ LedgerCreateResponse,
337
+ OperationState<LedgerCreateResponse>
338
+ >(lro, {
339
+ restoreFrom: options?.resumeFrom,
333
340
  intervalInMs: options?.updateIntervalInMs,
334
- lroResourceLocationConfig: "azure-async-operation"
341
+ resourceLocationConfig: "azure-async-operation"
335
342
  });
336
343
  await poller.poll();
337
344
  return poller;
@@ -339,7 +346,7 @@ export class LedgerImpl implements Ledger {
339
346
 
340
347
  /**
341
348
  * Creates a Confidential Ledger with the specified ledger parameters.
342
- * @param resourceGroupName The name of the resource group.
349
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
343
350
  * @param ledgerName Name of the Confidential Ledger
344
351
  * @param confidentialLedger Confidential Ledger Create Request Body
345
352
  * @param options The options parameters.
@@ -361,7 +368,7 @@ export class LedgerImpl implements Ledger {
361
368
 
362
369
  /**
363
370
  * Updates properties of Confidential Ledger
364
- * @param resourceGroupName The name of the resource group.
371
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
365
372
  * @param ledgerName Name of the Confidential Ledger
366
373
  * @param confidentialLedger Confidential Ledger request body for Updating Ledger
367
374
  * @param options The options parameters.
@@ -372,7 +379,7 @@ export class LedgerImpl implements Ledger {
372
379
  confidentialLedger: ConfidentialLedger,
373
380
  options?: LedgerUpdateOptionalParams
374
381
  ): Promise<
375
- PollerLike<PollOperationState<LedgerUpdateResponse>, LedgerUpdateResponse>
382
+ SimplePollerLike<OperationState<LedgerUpdateResponse>, LedgerUpdateResponse>
376
383
  > {
377
384
  const directSendOperation = async (
378
385
  args: coreClient.OperationArguments,
@@ -380,7 +387,7 @@ export class LedgerImpl implements Ledger {
380
387
  ): Promise<LedgerUpdateResponse> => {
381
388
  return this.client.sendOperationRequest(args, spec);
382
389
  };
383
- const sendOperation = async (
390
+ const sendOperationFn = async (
384
391
  args: coreClient.OperationArguments,
385
392
  spec: coreClient.OperationSpec
386
393
  ) => {
@@ -413,13 +420,16 @@ export class LedgerImpl implements Ledger {
413
420
  };
414
421
  };
415
422
 
416
- const lro = new LroImpl(
417
- sendOperation,
418
- { resourceGroupName, ledgerName, confidentialLedger, options },
419
- updateOperationSpec
420
- );
421
- const poller = new LroEngine(lro, {
422
- resumeFrom: options?.resumeFrom,
423
+ const lro = createLroSpec({
424
+ sendOperationFn,
425
+ args: { resourceGroupName, ledgerName, confidentialLedger, options },
426
+ spec: updateOperationSpec
427
+ });
428
+ const poller = await createHttpPoller<
429
+ LedgerUpdateResponse,
430
+ OperationState<LedgerUpdateResponse>
431
+ >(lro, {
432
+ restoreFrom: options?.resumeFrom,
423
433
  intervalInMs: options?.updateIntervalInMs
424
434
  });
425
435
  await poller.poll();
@@ -428,7 +438,7 @@ export class LedgerImpl implements Ledger {
428
438
 
429
439
  /**
430
440
  * Updates properties of Confidential Ledger
431
- * @param resourceGroupName The name of the resource group.
441
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
432
442
  * @param ledgerName Name of the Confidential Ledger
433
443
  * @param confidentialLedger Confidential Ledger request body for Updating Ledger
434
444
  * @param options The options parameters.
@@ -450,7 +460,7 @@ export class LedgerImpl implements Ledger {
450
460
 
451
461
  /**
452
462
  * Retrieves the properties of all Confidential Ledgers.
453
- * @param resourceGroupName The name of the resource group.
463
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
454
464
  * @param options The options parameters.
455
465
  */
456
466
  private _listByResourceGroup(
@@ -478,7 +488,7 @@ export class LedgerImpl implements Ledger {
478
488
 
479
489
  /**
480
490
  * ListByResourceGroupNext
481
- * @param resourceGroupName The name of the resource group.
491
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
482
492
  * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
483
493
  * @param options The options parameters.
484
494
  */