@azure/arm-confidentialledger 1.0.0
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/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +1487 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/checkNameAvailabilitySample.d.ts +2 -0
- package/dist-esm/samples-dev/checkNameAvailabilitySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/checkNameAvailabilitySample.js +33 -0
- package/dist-esm/samples-dev/checkNameAvailabilitySample.js.map +1 -0
- package/dist-esm/samples-dev/ledgerCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/ledgerCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ledgerCreateSample.js +51 -0
- package/dist-esm/samples-dev/ledgerCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/ledgerDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/ledgerDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ledgerDeleteSample.js +31 -0
- package/dist-esm/samples-dev/ledgerDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/ledgerGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/ledgerGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ledgerGetSample.js +31 -0
- package/dist-esm/samples-dev/ledgerGetSample.js.map +1 -0
- package/dist-esm/samples-dev/ledgerListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/ledgerListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ledgerListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/ledgerListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/ledgerListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/ledgerListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ledgerListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/ledgerListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/ledgerUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/ledgerUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ledgerUpdateSample.js +54 -0
- package/dist-esm/samples-dev/ledgerUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +43 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/src/confidentialLedgerClient.d.ts +28 -0
- package/dist-esm/src/confidentialLedgerClient.d.ts.map +1 -0
- package/dist-esm/src/confidentialLedgerClient.js +130 -0
- package/dist-esm/src/confidentialLedgerClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +379 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +47 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +19 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +501 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +13 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +118 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +10 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/ledger.d.ts +107 -0
- package/dist-esm/src/operations/ledger.d.ts.map +1 -0
- package/dist-esm/src/operations/ledger.js +507 -0
- package/dist-esm/src/operations/ledger.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +10 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/ledger.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/ledger.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/ledger.js +9 -0
- package/dist-esm/src/operationsInterfaces/ledger.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +38 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +122 -0
- package/review/arm-confidentialledger.api.md +333 -0
- package/rollup.config.js +122 -0
- package/src/confidentialLedgerClient.ts +181 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +442 -0
- package/src/models/mappers.ts +524 -0
- package/src/models/parameters.ts +137 -0
- package/src/operations/index.ts +10 -0
- package/src/operations/ledger.ts +674 -0
- package/src/operations/operations.ts +137 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/ledger.ts +132 -0
- package/src/operationsInterfaces/operations.ts +25 -0
- package/tsconfig.json +33 -0
- package/types/arm-confidentialledger.d.ts +534 -0
- package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { ConfidentialLedgerClient } from "@azure/arm-confidentialledger";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Retrieves the properties of all Confidential Ledgers.
|
15
|
+
*
|
16
|
+
* @summary Retrieves the properties of all Confidential Ledgers.
|
17
|
+
* x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_List.json
|
18
|
+
*/
|
19
|
+
function confidentialLedgerList() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "0000000-0000-0000-0000-000000000001";
|
23
|
+
const resourceGroupName = "DummyResourceGroupName";
|
24
|
+
const credential = new DefaultAzureCredential();
|
25
|
+
const client = new ConfidentialLedgerClient(credential, subscriptionId);
|
26
|
+
const resArray = new Array();
|
27
|
+
try {
|
28
|
+
for (var _b = __asyncValues(client.ledger.listByResourceGroup(resourceGroupName)), _c; _c = yield _b.next(), !_c.done;) {
|
29
|
+
let item = _c.value;
|
30
|
+
resArray.push(item);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
34
|
+
finally {
|
35
|
+
try {
|
36
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
37
|
+
}
|
38
|
+
finally { if (e_1) throw e_1.error; }
|
39
|
+
}
|
40
|
+
console.log(resArray);
|
41
|
+
});
|
42
|
+
}
|
43
|
+
confidentialLedgerList().catch(console.error);
|
44
|
+
//# sourceMappingURL=ledgerListByResourceGroupSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledgerListByResourceGroupSample.js","sourceRoot":"","sources":["../../samples-dev/ledgerListByResourceGroupSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sBAAsB;;;QACnC,MAAM,cAAc,GAAG,qCAAqC,CAAC;QAC7D,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;QACnD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAA,IAAA;gBAAhE,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledgerListBySubscriptionSample.d.ts","sourceRoot":"","sources":["../../samples-dev/ledgerListBySubscriptionSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { ConfidentialLedgerClient } from "@azure/arm-confidentialledger";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Retrieves the properties of all Confidential Ledgers.
|
15
|
+
*
|
16
|
+
* @summary Retrieves the properties of all Confidential Ledgers.
|
17
|
+
* x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_ListBySub.json
|
18
|
+
*/
|
19
|
+
function confidentialLedgerListBySub() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "0000000-0000-0000-0000-000000000001";
|
23
|
+
const credential = new DefaultAzureCredential();
|
24
|
+
const client = new ConfidentialLedgerClient(credential, subscriptionId);
|
25
|
+
const resArray = new Array();
|
26
|
+
try {
|
27
|
+
for (var _b = __asyncValues(client.ledger.listBySubscription()), _c; _c = yield _b.next(), !_c.done;) {
|
28
|
+
let item = _c.value;
|
29
|
+
resArray.push(item);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
33
|
+
finally {
|
34
|
+
try {
|
35
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
36
|
+
}
|
37
|
+
finally { if (e_1) throw e_1.error; }
|
38
|
+
}
|
39
|
+
console.log(resArray);
|
40
|
+
});
|
41
|
+
}
|
42
|
+
confidentialLedgerListBySub().catch(console.error);
|
43
|
+
//# sourceMappingURL=ledgerListBySubscriptionSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledgerListBySubscriptionSample.js","sourceRoot":"","sources":["../../samples-dev/ledgerListBySubscriptionSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,2BAA2B;;;QACxC,MAAM,cAAc,GAAG,qCAAqC,CAAC;QAC7D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAA,IAAA;gBAA9C,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,2BAA2B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledgerUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/ledgerUpdateSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { ConfidentialLedgerClient } from "@azure/arm-confidentialledger";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Updates properties of Confidential Ledger
|
15
|
+
*
|
16
|
+
* @summary Updates properties of Confidential Ledger
|
17
|
+
* x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/ConfidentialLedger_Update.json
|
18
|
+
*/
|
19
|
+
function confidentialLedgerUpdate() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "0000000-0000-0000-0000-000000000001";
|
22
|
+
const resourceGroupName = "DummyResourceGroupName";
|
23
|
+
const ledgerName = "DummyLedgerName";
|
24
|
+
const confidentialLedger = {
|
25
|
+
location: "EastUS",
|
26
|
+
properties: {
|
27
|
+
aadBasedSecurityPrincipals: [
|
28
|
+
{
|
29
|
+
ledgerRoleName: "Administrator",
|
30
|
+
principalId: "34621747-6fc8-4771-a2eb-72f31c461f2e",
|
31
|
+
tenantId: "bce123b9-2b7b-4975-8360-5ca0b9b1cd08"
|
32
|
+
}
|
33
|
+
],
|
34
|
+
certBasedSecurityPrincipals: [
|
35
|
+
{
|
36
|
+
cert: "-----BEGIN CERTIFICATE-----\nMIIDUjCCAjqgAwIBAgIQJ2IrDBawSkiAbkBYmiAopDANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwHhcNMjAwOTIzMjIxODQ2WhcNMjEwOTIzMjIyODQ2WjAmMSQwIgYDVQQDExtTeW50aGV0aWNzIExlZGdlciBVc2VyIENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX2s/Eu4q/eQ63N+Ugeg5oAciZua/YCJr41c/696szvSY7Zg1SNJlW88/nbz70+QpO55OmqlEE3QCU+T0Vl/h0Gf//n1PYcoBbTGUnYEmV+fTTHict6rFiEwrGJ62tvcpYgwapInSLyEeUzjki0zhOLJ1OfRnYd1eGnFVMpE5aVjiS8Q5dmTEUyd51EIprGE8RYAW9aeWSwTH7gjHUsRlJnHKcdhaK/v5QKJnNu5bzPFUcpC0ZBcizoMPAtroLAD4B68Jl0z3op18MgZe6lRrVoWuxfqnk5GojuB/Vu8ohAZKoFhQ6NB6r+LL2AUs+Zr7Bt26IkEdR178n9JMEA4gHAgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBS/a7PU9iOfOKEyZCp11Oen5VSuuDAdBgNVHQ4EFgQUv2uz1PYjnzihMmQqddTnp+VUrrgwDQYJKoZIhvcNAQELBQADggEBAF5q2fDwnse8egXhfaJCqqM969E9gSacqFmASpoDJPRPEX7gqoO7v1ww7nqRtRDoRiBvo/yNk7jlSAkRN3nRRnZLZZ3MYQdmCr4FGyIqRg4Y94+nja+Du9pDD761rxRktMVPSOaAVM/E5DQvscDlPvlPYe9mkcrLCE4DXYpiMmLT8Tm55LJJq5m07dVDgzAIR1L/hmEcbK0pnLgzciMtMLxGO2udnyyW/UW9WxnjvrrD2JluTHH9mVbb+XQP1oFtlRBfH7aui1ZgWfKvxrdP4zdK9QoWSUvRux3TLsGmHRBjBMtqYDY3y5mB+aNjLelvWpeVb0m2aOSVXynrLwNCAVA=\n-----END CERTIFICATE-----",
|
37
|
+
ledgerRoleName: "Reader"
|
38
|
+
}
|
39
|
+
],
|
40
|
+
ledgerType: "Public"
|
41
|
+
},
|
42
|
+
tags: {
|
43
|
+
additionProps2: "additional property value",
|
44
|
+
additionalProps1: "additional properties"
|
45
|
+
}
|
46
|
+
};
|
47
|
+
const credential = new DefaultAzureCredential();
|
48
|
+
const client = new ConfidentialLedgerClient(credential, subscriptionId);
|
49
|
+
const result = yield client.ledger.beginUpdateAndWait(resourceGroupName, ledgerName, confidentialLedger);
|
50
|
+
console.log(result);
|
51
|
+
});
|
52
|
+
}
|
53
|
+
confidentialLedgerUpdate().catch(console.error);
|
54
|
+
//# sourceMappingURL=ledgerUpdateSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ledgerUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/ledgerUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,wBAAwB,EACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,qCAAqC,CAAC;QAC7D,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;QACnD,MAAM,UAAU,GAAG,iBAAiB,CAAC;QACrC,MAAM,kBAAkB,GAAuB;YAC7C,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE;gBACV,0BAA0B,EAAE;oBAC1B;wBACE,cAAc,EAAE,eAAe;wBAC/B,WAAW,EAAE,sCAAsC;wBACnD,QAAQ,EAAE,sCAAsC;qBACjD;iBACF;gBACD,2BAA2B,EAAE;oBAC3B;wBACE,IAAI,EACF,8qCAA8qC;wBAChrC,cAAc,EAAE,QAAQ;qBACzB;iBACF;gBACD,UAAU,EAAE,QAAQ;aACrB;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,2BAA2B;gBAC3C,gBAAgB,EAAE,uBAAuB;aAC1C;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,kBAAkB,CACnD,iBAAiB,EACjB,UAAU,EACV,kBAAkB,CACnB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"operationsListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/operationsListSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { ConfidentialLedgerClient } from "@azure/arm-confidentialledger";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Retrieves a list of available API operations
|
15
|
+
*
|
16
|
+
* @summary Retrieves a list of available API operations
|
17
|
+
* x-ms-original-file: specification/confidentialledger/resource-manager/Microsoft.ConfidentialLedger/stable/2022-05-13/examples/Operations_Get.json
|
18
|
+
*/
|
19
|
+
function operationsGet() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
23
|
+
const credential = new DefaultAzureCredential();
|
24
|
+
const client = new ConfidentialLedgerClient(credential, subscriptionId);
|
25
|
+
const resArray = new Array();
|
26
|
+
try {
|
27
|
+
for (var _b = __asyncValues(client.operations.list()), _c; _c = yield _b.next(), !_c.done;) {
|
28
|
+
let item = _c.value;
|
29
|
+
resArray.push(item);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
33
|
+
finally {
|
34
|
+
try {
|
35
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
36
|
+
}
|
37
|
+
finally { if (e_1) throw e_1.error; }
|
38
|
+
}
|
39
|
+
console.log(resArray);
|
40
|
+
});
|
41
|
+
}
|
42
|
+
operationsGet().catch(console.error);
|
43
|
+
//# sourceMappingURL=operationsListSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"operationsListSample.js","sourceRoot":"","sources":["../../samples-dev/operationsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,aAAa;;;QAC1B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,wBAAwB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA,IAAA;gBAApC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,aAAa,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import * as coreClient from "@azure/core-client";
|
2
|
+
import * as coreAuth from "@azure/core-auth";
|
3
|
+
import { Operations, Ledger } from "./operationsInterfaces";
|
4
|
+
import { ConfidentialLedgerClientOptionalParams, CheckNameAvailabilityRequest, CheckNameAvailabilityOptionalParams, CheckNameAvailabilityOperationResponse } from "./models";
|
5
|
+
export declare class ConfidentialLedgerClient extends coreClient.ServiceClient {
|
6
|
+
$host: string;
|
7
|
+
apiVersion: string;
|
8
|
+
subscriptionId: string;
|
9
|
+
/**
|
10
|
+
* Initializes a new instance of the ConfidentialLedgerClient class.
|
11
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
12
|
+
* @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g.
|
13
|
+
* 00000000-0000-0000-0000-000000000000)
|
14
|
+
* @param options The parameter options
|
15
|
+
*/
|
16
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConfidentialLedgerClientOptionalParams);
|
17
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
18
|
+
private addCustomApiVersionPolicy;
|
19
|
+
/**
|
20
|
+
* To check whether a resource name is available.
|
21
|
+
* @param nameAvailabilityRequest Name availability request payload.
|
22
|
+
* @param options The options parameters.
|
23
|
+
*/
|
24
|
+
checkNameAvailability(nameAvailabilityRequest: CheckNameAvailabilityRequest, options?: CheckNameAvailabilityOptionalParams): Promise<CheckNameAvailabilityOperationResponse>;
|
25
|
+
operations: Operations;
|
26
|
+
ledger: Ledger;
|
27
|
+
}
|
28
|
+
//# sourceMappingURL=confidentialLedgerClient.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"confidentialLedgerClient.d.ts","sourceRoot":"","sources":["../../src/confidentialLedgerClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAG5D,OAAO,EACL,sCAAsC,EACtC,4BAA4B,EAC5B,mCAAmC,EACnC,sCAAsC,EACvC,MAAM,UAAU,CAAC;AAElB,qBAAa,wBAAyB,SAAQ,UAAU,CAAC,aAAa;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,sCAAsC;IAuElD,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC;;;;OAIG;IACH,qBAAqB,CACnB,uBAAuB,EAAE,4BAA4B,EACrD,OAAO,CAAC,EAAE,mCAAmC,GAC5C,OAAO,CAAC,sCAAsC,CAAC;IAOlD,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
import * as coreClient from "@azure/core-client";
|
10
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
11
|
+
import { OperationsImpl, LedgerImpl } from "./operations";
|
12
|
+
import * as Parameters from "./models/parameters";
|
13
|
+
import * as Mappers from "./models/mappers";
|
14
|
+
export class ConfidentialLedgerClient extends coreClient.ServiceClient {
|
15
|
+
/**
|
16
|
+
* Initializes a new instance of the ConfidentialLedgerClient class.
|
17
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
18
|
+
* @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g.
|
19
|
+
* 00000000-0000-0000-0000-000000000000)
|
20
|
+
* @param options The parameter options
|
21
|
+
*/
|
22
|
+
constructor(credentials, subscriptionId, options) {
|
23
|
+
var _a, _b;
|
24
|
+
if (credentials === undefined) {
|
25
|
+
throw new Error("'credentials' cannot be null");
|
26
|
+
}
|
27
|
+
if (subscriptionId === undefined) {
|
28
|
+
throw new Error("'subscriptionId' cannot be null");
|
29
|
+
}
|
30
|
+
// Initializing default values for options
|
31
|
+
if (!options) {
|
32
|
+
options = {};
|
33
|
+
}
|
34
|
+
const defaults = {
|
35
|
+
requestContentType: "application/json; charset=utf-8",
|
36
|
+
credential: credentials
|
37
|
+
};
|
38
|
+
const packageDetails = `azsdk-js-arm-confidentialledger/1.0.0`;
|
39
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
40
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
41
|
+
: `${packageDetails}`;
|
42
|
+
if (!options.credentialScopes) {
|
43
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
44
|
+
}
|
45
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
46
|
+
userAgentPrefix
|
47
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
48
|
+
super(optionsWithDefaults);
|
49
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
50
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
51
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
52
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
53
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
54
|
+
this.pipeline.removePolicy({
|
55
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
56
|
+
});
|
57
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
58
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
59
|
+
challengeCallbacks: {
|
60
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
61
|
+
}
|
62
|
+
}));
|
63
|
+
}
|
64
|
+
}
|
65
|
+
// Parameter assignments
|
66
|
+
this.subscriptionId = subscriptionId;
|
67
|
+
// Assigning values to Constant parameters
|
68
|
+
this.$host = options.$host || "https://management.azure.com";
|
69
|
+
this.apiVersion = options.apiVersion || "2022-05-13";
|
70
|
+
this.operations = new OperationsImpl(this);
|
71
|
+
this.ledger = new LedgerImpl(this);
|
72
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
73
|
+
}
|
74
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
75
|
+
addCustomApiVersionPolicy(apiVersion) {
|
76
|
+
if (!apiVersion) {
|
77
|
+
return;
|
78
|
+
}
|
79
|
+
const apiVersionPolicy = {
|
80
|
+
name: "CustomApiVersionPolicy",
|
81
|
+
sendRequest(request, next) {
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
83
|
+
const param = request.url.split("?");
|
84
|
+
if (param.length > 1) {
|
85
|
+
const newParams = param[1].split("&").map((item) => {
|
86
|
+
if (item.indexOf("api-version") > -1) {
|
87
|
+
return item.replace(/(?<==).*$/, apiVersion);
|
88
|
+
}
|
89
|
+
else {
|
90
|
+
return item;
|
91
|
+
}
|
92
|
+
});
|
93
|
+
request.url = param[0] + "?" + newParams.join("&");
|
94
|
+
}
|
95
|
+
return next(request);
|
96
|
+
});
|
97
|
+
}
|
98
|
+
};
|
99
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
100
|
+
}
|
101
|
+
/**
|
102
|
+
* To check whether a resource name is available.
|
103
|
+
* @param nameAvailabilityRequest Name availability request payload.
|
104
|
+
* @param options The options parameters.
|
105
|
+
*/
|
106
|
+
checkNameAvailability(nameAvailabilityRequest, options) {
|
107
|
+
return this.sendOperationRequest({ nameAvailabilityRequest, options }, checkNameAvailabilityOperationSpec);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
// Operation Specifications
|
111
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
112
|
+
const checkNameAvailabilityOperationSpec = {
|
113
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/checkNameAvailability",
|
114
|
+
httpMethod: "POST",
|
115
|
+
responses: {
|
116
|
+
200: {
|
117
|
+
bodyMapper: Mappers.CheckNameAvailabilityResponse
|
118
|
+
},
|
119
|
+
default: {
|
120
|
+
bodyMapper: Mappers.ErrorResponse
|
121
|
+
}
|
122
|
+
},
|
123
|
+
requestBody: Parameters.nameAvailabilityRequest,
|
124
|
+
queryParameters: [Parameters.apiVersion],
|
125
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
126
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
127
|
+
mediaType: "json",
|
128
|
+
serializer
|
129
|
+
};
|
130
|
+
//# sourceMappingURL=confidentialLedgerClient.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"confidentialLedgerClient.js","sourceRoot":"","sources":["../../src/confidentialLedgerClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAQ5C,MAAM,OAAO,wBAAyB,SAAQ,UAAU,CAAC,aAAa;IAKpE;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAgD;;QAEhD,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QA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wB,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,wBAAwB,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
/// <reference lib="esnext.asynciterable" />
|
9
|
+
export * from "./models";
|
10
|
+
export { ConfidentialLedgerClient } from "./confidentialLedgerClient";
|
11
|
+
export * from "./operationsInterfaces";
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,wBAAwB,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
2
|
+
export declare class LroImpl<T> implements LongRunningOperation<T> {
|
3
|
+
private sendOperationFn;
|
4
|
+
private args;
|
5
|
+
private spec;
|
6
|
+
requestPath: string;
|
7
|
+
requestMethod: string;
|
8
|
+
constructor(sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>, args: Record<string, unknown>, spec: {
|
9
|
+
readonly requestBody?: unknown;
|
10
|
+
readonly path?: string;
|
11
|
+
readonly httpMethod: string;
|
12
|
+
} & Record<string, any>, requestPath?: string, requestMethod?: string);
|
13
|
+
sendInitialRequest(): Promise<LroResponse<T>>;
|
14
|
+
sendPollRequest(path: string): Promise<LroResponse<T>>;
|
15
|
+
}
|
16
|
+
//# sourceMappingURL=lroImpl.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE,qBAAa,OAAO,CAAC,CAAC,CAAE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAEtD,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,IAAI;IAKL,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,MAAM;gBARpB,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAClE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,IAAI,EAAE;QACZ,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChB,WAAW,GAAE,MAAmB,EAChC,aAAa,GAAE,MAAwB;IAEnC,kBAAkB,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAG7C,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAQpE"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter, __rest } from "tslib";
|
9
|
+
export class LroImpl {
|
10
|
+
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
11
|
+
this.sendOperationFn = sendOperationFn;
|
12
|
+
this.args = args;
|
13
|
+
this.spec = spec;
|
14
|
+
this.requestPath = requestPath;
|
15
|
+
this.requestMethod = requestMethod;
|
16
|
+
}
|
17
|
+
sendInitialRequest() {
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
19
|
+
return this.sendOperationFn(this.args, this.spec);
|
20
|
+
});
|
21
|
+
}
|
22
|
+
sendPollRequest(path) {
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
const _a = this.spec, { requestBody } = _a, restSpec = __rest(_a, ["requestBody"]);
|
25
|
+
return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
|
26
|
+
});
|
27
|
+
}
|
28
|
+
}
|
29
|
+
//# sourceMappingURL=lroImpl.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,MAAM,OAAO,OAAO;IAClB,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACS,kBAAkB;;YAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;KAAA;IACY,eAAe,CAAC,IAAY;;YACvC,MAAM,KAA+B,IAAI,CAAC,IAAI,EAAxC,EAAE,WAAW,OAA2B,EAAtB,QAAQ,cAA1B,eAA4B,CAAY,CAAC;YAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,kCAChC,QAAQ,KACX,IAAI,EACJ,UAAU,EAAE,KAAK,IACjB,CAAC;QACL,CAAC;KAAA;CACF"}
|