@azure-rest/confidential-ledger 1.0.1-alpha.20241121.1 → 1.0.1-alpha.20241126.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/commonjs/confidentialLedger.d.ts +6 -0
- package/dist/commonjs/confidentialLedger.d.ts.map +1 -0
- package/dist/commonjs/confidentialLedger.js +25 -0
- package/dist/commonjs/confidentialLedger.js.map +1 -0
- package/dist/commonjs/generated/src/clientDefinitions.d.ts +75 -0
- package/dist/commonjs/generated/src/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/generated/src/clientDefinitions.js +5 -0
- package/dist/commonjs/generated/src/clientDefinitions.js.map +1 -0
- package/dist/commonjs/generated/src/confidentialLedger.d.ts +11 -0
- package/dist/commonjs/generated/src/confidentialLedger.d.ts.map +1 -0
- package/dist/commonjs/generated/src/confidentialLedger.js +35 -0
- package/dist/commonjs/generated/src/confidentialLedger.js.map +1 -0
- package/dist/commonjs/generated/src/index.d.ts +11 -0
- package/dist/commonjs/generated/src/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/index.js +16 -0
- package/dist/commonjs/generated/src/index.js.map +1 -0
- package/dist/commonjs/generated/src/isUnexpected.d.ts +15 -0
- package/dist/commonjs/generated/src/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/generated/src/isUnexpected.js +86 -0
- package/dist/commonjs/generated/src/isUnexpected.js.map +1 -0
- package/dist/commonjs/generated/src/logger.d.ts +2 -0
- package/dist/commonjs/generated/src/logger.d.ts.map +1 -0
- package/dist/commonjs/generated/src/logger.js +8 -0
- package/dist/commonjs/generated/src/logger.js.map +1 -0
- package/dist/commonjs/generated/src/models.d.ts +11 -0
- package/dist/commonjs/generated/src/models.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models.js +5 -0
- package/dist/commonjs/generated/src/models.js.map +1 -0
- package/dist/commonjs/generated/src/outputModels.d.ts +130 -0
- package/dist/commonjs/generated/src/outputModels.d.ts.map +1 -0
- package/dist/commonjs/generated/src/outputModels.js +5 -0
- package/dist/commonjs/generated/src/outputModels.js.map +1 -0
- package/dist/commonjs/generated/src/paginateHelper.d.ts +55 -0
- package/dist/commonjs/generated/src/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/generated/src/paginateHelper.js +119 -0
- package/dist/commonjs/generated/src/paginateHelper.js.map +1 -0
- package/dist/commonjs/generated/src/parameters.d.ts +66 -0
- package/dist/commonjs/generated/src/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/src/parameters.js +5 -0
- package/dist/commonjs/generated/src/parameters.js.map +1 -0
- package/dist/commonjs/generated/src/responses.d.ts +138 -0
- package/dist/commonjs/generated/src/responses.d.ts.map +1 -0
- package/dist/commonjs/generated/src/responses.js +5 -0
- package/dist/commonjs/generated/src/responses.js.map +1 -0
- package/dist/commonjs/getLedgerIdentity.d.ts +6 -0
- package/dist/commonjs/getLedgerIdentity.d.ts.map +1 -0
- package/dist/commonjs/getLedgerIdentity.js +22 -0
- package/dist/commonjs/getLedgerIdentity.js.map +1 -0
- package/dist/commonjs/index.d.ts +12 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/confidentialLedger.d.ts +6 -0
- package/dist/esm/confidentialLedger.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/confidentialLedger.js +1 -1
- package/dist/esm/confidentialLedger.js.map +1 -0
- package/dist/esm/generated/src/clientDefinitions.d.ts +75 -0
- package/dist/esm/generated/src/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/generated/src/clientDefinitions.js.map +1 -0
- package/dist/esm/generated/src/confidentialLedger.d.ts +11 -0
- package/dist/esm/generated/src/confidentialLedger.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/generated/src/confidentialLedger.js +1 -1
- package/dist/esm/generated/src/confidentialLedger.js.map +1 -0
- package/dist/esm/generated/src/index.d.ts +11 -0
- package/dist/esm/generated/src/index.d.ts.map +1 -0
- package/dist/esm/generated/src/index.js +13 -0
- package/dist/esm/generated/src/index.js.map +1 -0
- package/dist/esm/generated/src/isUnexpected.d.ts +15 -0
- package/dist/esm/generated/src/isUnexpected.d.ts.map +1 -0
- package/dist/esm/generated/src/isUnexpected.js.map +1 -0
- package/dist/esm/generated/src/logger.d.ts +2 -0
- package/dist/esm/generated/src/logger.d.ts.map +1 -0
- package/dist/esm/generated/src/models.d.ts +11 -0
- package/dist/esm/generated/src/models.d.ts.map +1 -0
- package/dist/esm/generated/src/outputModels.d.ts +130 -0
- package/dist/esm/generated/src/outputModels.d.ts.map +1 -0
- package/dist/esm/generated/src/paginateHelper.d.ts +55 -0
- package/dist/esm/generated/src/paginateHelper.d.ts.map +1 -0
- package/dist/esm/generated/src/parameters.d.ts +66 -0
- package/dist/esm/generated/src/parameters.d.ts.map +1 -0
- package/dist/esm/generated/src/parameters.js.map +1 -0
- package/dist/esm/generated/src/responses.d.ts +138 -0
- package/dist/esm/generated/src/responses.d.ts.map +1 -0
- package/dist/esm/generated/src/responses.js.map +1 -0
- package/dist/esm/getLedgerIdentity.d.ts +6 -0
- package/dist/esm/getLedgerIdentity.d.ts.map +1 -0
- package/dist/esm/index.d.ts +12 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/package.json +48 -30
- package/dist/index.js +0 -285
- package/dist/index.js.map +0 -1
- package/dist-esm/src/confidentialLedger.js.map +0 -1
- package/dist-esm/src/generated/src/clientDefinitions.js.map +0 -1
- package/dist-esm/src/generated/src/confidentialLedger.js.map +0 -1
- package/dist-esm/src/generated/src/index.js +0 -13
- package/dist-esm/src/generated/src/index.js.map +0 -1
- package/dist-esm/src/generated/src/isUnexpected.js.map +0 -1
- package/dist-esm/src/generated/src/parameters.js.map +0 -1
- package/dist-esm/src/generated/src/responses.js.map +0 -1
- package/dist-esm/src/index.js +0 -14
- package/dist-esm/src/index.js.map +0 -1
- /package/{types → dist}/confidential-ledger.d.ts +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/clientDefinitions.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/isUnexpected.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/logger.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/logger.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/models.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/models.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/outputModels.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/outputModels.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/paginateHelper.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/paginateHelper.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/parameters.js +0 -0
- /package/{dist-esm/src → dist/esm}/generated/src/responses.js +0 -0
- /package/{dist-esm/src → dist/esm}/getLedgerIdentity.js +0 -0
- /package/{dist-esm/src → dist/esm}/getLedgerIdentity.js.map +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TokenCredential } from "@azure/core-auth";
|
|
2
|
+
import type { ClientOptions } from "@azure-rest/core-client";
|
|
3
|
+
import type { ConfidentialLedgerClient } from "./generated/src/clientDefinitions.js";
|
|
4
|
+
export default function ConfidentialLedger(ledgerEndpoint: string, ledgerIdentityCertificate: string, options?: ClientOptions): ConfidentialLedgerClient;
|
|
5
|
+
export default function ConfidentialLedger(ledgerEndpoint: string, ledgerIdentityCertificate: string, credentials: TokenCredential, options?: ClientOptions): ConfidentialLedgerClient;
|
|
6
|
+
//# sourceMappingURL=confidentialLedger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confidentialLedger.d.ts","sourceRoot":"","sources":["../../src/confidentialLedger.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAGrF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,cAAc,EAAE,MAAM,EACtB,yBAAyB,EAAE,MAAM,EACjC,OAAO,CAAC,EAAE,aAAa,GACtB,wBAAwB,CAAC;AAC5B,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,cAAc,EAAE,MAAM,EACtB,yBAAyB,EAAE,MAAM,EACjC,WAAW,EAAE,eAAe,EAC5B,OAAO,CAAC,EAAE,aAAa,GACtB,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.default = ConfidentialLedger;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const core_auth_1 = require("@azure/core-auth");
|
|
8
|
+
const confidentialLedger_js_1 = tslib_1.__importDefault(require("./generated/src/confidentialLedger.js"));
|
|
9
|
+
function ConfidentialLedger(ledgerEndpoint, ledgerIdentityCertificate, credentialsOrOptions, opts) {
|
|
10
|
+
var _a;
|
|
11
|
+
let credentials;
|
|
12
|
+
let options;
|
|
13
|
+
if ((0, core_auth_1.isTokenCredential)(credentialsOrOptions)) {
|
|
14
|
+
credentials = credentialsOrOptions;
|
|
15
|
+
options = opts !== null && opts !== void 0 ? opts : {};
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
options = credentialsOrOptions !== null && credentialsOrOptions !== void 0 ? credentialsOrOptions : {};
|
|
19
|
+
}
|
|
20
|
+
const tlsOptions = (_a = options === null || options === void 0 ? void 0 : options.tlsOptions) !== null && _a !== void 0 ? _a : {};
|
|
21
|
+
tlsOptions.ca = ledgerIdentityCertificate;
|
|
22
|
+
const confidentialLedger = (0, confidentialLedger_js_1.default)(ledgerEndpoint, credentials, Object.assign(Object.assign({}, options), { tlsOptions }));
|
|
23
|
+
return confidentialLedger;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=confidentialLedger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confidentialLedger.js","sourceRoot":"","sources":["../../src/confidentialLedger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,qCAuBC;;AAxCD,gDAAqD;AAIrD,0GAAgF;AAahF,SAAwB,kBAAkB,CACxC,cAAsB,EACtB,yBAAiC,EACjC,oBAAsD,EACtD,IAAoB;;IAEpB,IAAI,WAAwC,CAAC;IAC7C,IAAI,OAAsB,CAAC;IAE3B,IAAI,IAAA,6BAAiB,EAAC,oBAAoB,CAAC,EAAE,CAAC;QAC5C,WAAW,GAAG,oBAAoB,CAAC;QACnC,OAAO,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,EAAE,CAAC;IAC7C,UAAU,CAAC,EAAE,GAAG,yBAAyB,CAAC;IAC1C,MAAM,kBAAkB,GAAG,IAAA,+BAA2B,EAAC,cAAc,EAAE,WAAY,kCAC9E,OAAO,KACV,UAAU,IACV,CAAC;IACH,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport type { ConfidentialLedgerClient } from \"./generated/src/clientDefinitions.js\";\nimport GeneratedConfidentialLedger from \"./generated/src/confidentialLedger.js\";\n\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n options?: ClientOptions,\n): ConfidentialLedgerClient;\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n credentials: TokenCredential,\n options?: ClientOptions,\n): ConfidentialLedgerClient;\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n credentialsOrOptions?: TokenCredential | ClientOptions,\n opts?: ClientOptions,\n): ConfidentialLedgerClient {\n let credentials: TokenCredential | undefined;\n let options: ClientOptions;\n\n if (isTokenCredential(credentialsOrOptions)) {\n credentials = credentialsOrOptions;\n options = opts ?? {};\n } else {\n options = credentialsOrOptions ?? {};\n }\n\n const tlsOptions = options?.tlsOptions ?? {};\n tlsOptions.ca = ledgerIdentityCertificate;\n const confidentialLedger = GeneratedConfidentialLedger(ledgerEndpoint, credentials!, {\n ...options,\n tlsOptions,\n });\n return confidentialLedger;\n}\n"]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { GetConstitutionParameters, ListConsortiumMembersParameters, GetEnclaveQuotesParameters, ListCollectionsParameters, ListLedgerEntriesParameters, CreateLedgerEntryParameters, GetLedgerEntryParameters, GetReceiptParameters, GetTransactionStatusParameters, GetCurrentLedgerEntryParameters, DeleteUserParameters, GetUserParameters, CreateOrUpdateUserParameters } from "./parameters.js";
|
|
2
|
+
import { GetConstitution200Response, GetConstitutionDefaultResponse, ListConsortiumMembers200Response, ListConsortiumMembersDefaultResponse, GetEnclaveQuotes200Response, GetEnclaveQuotesDefaultResponse, ListCollections200Response, ListCollectionsDefaultResponse, ListLedgerEntries200Response, ListLedgerEntriesDefaultResponse, CreateLedgerEntry200Response, CreateLedgerEntryDefaultResponse, GetLedgerEntry200Response, GetLedgerEntryDefaultResponse, GetReceipt200Response, GetReceiptDefaultResponse, GetTransactionStatus200Response, GetTransactionStatusDefaultResponse, GetCurrentLedgerEntry200Response, GetCurrentLedgerEntryDefaultResponse, DeleteUser204Response, DeleteUserDefaultResponse, GetUser200Response, GetUserDefaultResponse, CreateOrUpdateUser200Response, CreateOrUpdateUserDefaultResponse } from "./responses.js";
|
|
3
|
+
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
4
|
+
export interface GetConstitution {
|
|
5
|
+
/** The constitution is a script that assesses and applies proposals from consortium members. */
|
|
6
|
+
get(options?: GetConstitutionParameters): StreamableMethod<GetConstitution200Response | GetConstitutionDefaultResponse>;
|
|
7
|
+
}
|
|
8
|
+
export interface ListConsortiumMembers {
|
|
9
|
+
/** Consortium members can manage the Confidential Ledger. */
|
|
10
|
+
get(options?: ListConsortiumMembersParameters): StreamableMethod<ListConsortiumMembers200Response | ListConsortiumMembersDefaultResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface GetEnclaveQuotes {
|
|
13
|
+
/** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */
|
|
14
|
+
get(options?: GetEnclaveQuotesParameters): StreamableMethod<GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse>;
|
|
15
|
+
}
|
|
16
|
+
export interface ListCollections {
|
|
17
|
+
/** Collection ids are user-created collections of ledger entries */
|
|
18
|
+
get(options?: ListCollectionsParameters): StreamableMethod<ListCollections200Response | ListCollectionsDefaultResponse>;
|
|
19
|
+
}
|
|
20
|
+
export interface ListLedgerEntries {
|
|
21
|
+
/** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */
|
|
22
|
+
get(options?: ListLedgerEntriesParameters): StreamableMethod<ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse>;
|
|
23
|
+
/** A collection id may optionally be specified. */
|
|
24
|
+
post(options: CreateLedgerEntryParameters): StreamableMethod<CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse>;
|
|
25
|
+
}
|
|
26
|
+
export interface GetLedgerEntry {
|
|
27
|
+
/** To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing. */
|
|
28
|
+
get(options?: GetLedgerEntryParameters): StreamableMethod<GetLedgerEntry200Response | GetLedgerEntryDefaultResponse>;
|
|
29
|
+
}
|
|
30
|
+
export interface GetReceipt {
|
|
31
|
+
/** Gets a receipt certifying ledger contents at a particular transaction id. */
|
|
32
|
+
get(options?: GetReceiptParameters): StreamableMethod<GetReceipt200Response | GetReceiptDefaultResponse>;
|
|
33
|
+
}
|
|
34
|
+
export interface GetTransactionStatus {
|
|
35
|
+
/** Gets the status of an entry identified by a transaction id. */
|
|
36
|
+
get(options?: GetTransactionStatusParameters): StreamableMethod<GetTransactionStatus200Response | GetTransactionStatusDefaultResponse>;
|
|
37
|
+
}
|
|
38
|
+
export interface GetCurrentLedgerEntry {
|
|
39
|
+
/** A collection id may optionally be specified. */
|
|
40
|
+
get(options?: GetCurrentLedgerEntryParameters): StreamableMethod<GetCurrentLedgerEntry200Response | GetCurrentLedgerEntryDefaultResponse>;
|
|
41
|
+
}
|
|
42
|
+
export interface DeleteUser {
|
|
43
|
+
/** Deletes a user from the Confidential Ledger. */
|
|
44
|
+
delete(options?: DeleteUserParameters): StreamableMethod<DeleteUser204Response | DeleteUserDefaultResponse>;
|
|
45
|
+
/** Gets a user. */
|
|
46
|
+
get(options?: GetUserParameters): StreamableMethod<GetUser200Response | GetUserDefaultResponse>;
|
|
47
|
+
/** A JSON merge patch is applied for existing users */
|
|
48
|
+
patch(options: CreateOrUpdateUserParameters): StreamableMethod<CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse>;
|
|
49
|
+
}
|
|
50
|
+
export interface Routes {
|
|
51
|
+
/** Resource for '/app/governance/constitution' has methods for the following verbs: get */
|
|
52
|
+
(path: "/app/governance/constitution"): GetConstitution;
|
|
53
|
+
/** Resource for '/app/governance/members' has methods for the following verbs: get */
|
|
54
|
+
(path: "/app/governance/members"): ListConsortiumMembers;
|
|
55
|
+
/** Resource for '/app/enclaveQuotes' has methods for the following verbs: get */
|
|
56
|
+
(path: "/app/enclaveQuotes"): GetEnclaveQuotes;
|
|
57
|
+
/** Resource for '/app/collections' has methods for the following verbs: get */
|
|
58
|
+
(path: "/app/collections"): ListCollections;
|
|
59
|
+
/** Resource for '/app/transactions' has methods for the following verbs: get, post */
|
|
60
|
+
(path: "/app/transactions"): ListLedgerEntries;
|
|
61
|
+
/** Resource for '/app/transactions/\{transactionId\}' has methods for the following verbs: get */
|
|
62
|
+
(path: "/app/transactions/{transactionId}", transactionId: string): GetLedgerEntry;
|
|
63
|
+
/** Resource for '/app/transactions/\{transactionId\}/receipt' has methods for the following verbs: get */
|
|
64
|
+
(path: "/app/transactions/{transactionId}/receipt", transactionId: string): GetReceipt;
|
|
65
|
+
/** Resource for '/app/transactions/\{transactionId\}/status' has methods for the following verbs: get */
|
|
66
|
+
(path: "/app/transactions/{transactionId}/status", transactionId: string): GetTransactionStatus;
|
|
67
|
+
/** Resource for '/app/transactions/current' has methods for the following verbs: get */
|
|
68
|
+
(path: "/app/transactions/current"): GetCurrentLedgerEntry;
|
|
69
|
+
/** Resource for '/app/users/\{userId\}' has methods for the following verbs: delete, get, patch */
|
|
70
|
+
(path: "/app/users/{userId}", userId: string): DeleteUser;
|
|
71
|
+
}
|
|
72
|
+
export type ConfidentialLedgerClient = Client & {
|
|
73
|
+
path: Routes;
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=clientDefinitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EAC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;IACtF,CAAC,IAAI,EAAE,yBAAyB,GAAG,qBAAqB,CAAC;IACzD,iFAAiF;IACjF,CAAC,IAAI,EAAE,oBAAoB,GAAG,gBAAgB,CAAC;IAC/C,+EAA+E;IAC/E,CAAC,IAAI,EAAE,kBAAkB,GAAG,eAAe,CAAC;IAC5C,sFAAsF;IACtF,CAAC,IAAI,EAAE,mBAAmB,GAAG,iBAAiB,CAAC;IAC/C,kGAAkG;IAClG,CACE,IAAI,EAAE,mCAAmC,EACzC,aAAa,EAAE,MAAM,GACpB,cAAc,CAAC;IAClB,0GAA0G;IAC1G,CACE,IAAI,EAAE,2CAA2C,EACjD,aAAa,EAAE,MAAM,GACpB,UAAU,CAAC;IACd,yGAAyG;IACzG,CACE,IAAI,EAAE,0CAA0C,EAChD,aAAa,EAAE,MAAM,GACpB,oBAAoB,CAAC;IACxB,wFAAwF;IACxF,CAAC,IAAI,EAAE,2BAA2B,GAAG,qBAAqB,CAAC;IAC3D,mGAAmG;IACnG,CAAC,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3D;AAED,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../../src/generated/src/clientDefinitions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetConstitutionParameters,\n ListConsortiumMembersParameters,\n GetEnclaveQuotesParameters,\n ListCollectionsParameters,\n ListLedgerEntriesParameters,\n CreateLedgerEntryParameters,\n GetLedgerEntryParameters,\n GetReceiptParameters,\n GetTransactionStatusParameters,\n GetCurrentLedgerEntryParameters,\n DeleteUserParameters,\n GetUserParameters,\n CreateOrUpdateUserParameters\n} from \"./parameters.js\";\nimport {\n GetConstitution200Response,\n GetConstitutionDefaultResponse,\n ListConsortiumMembers200Response,\n ListConsortiumMembersDefaultResponse,\n GetEnclaveQuotes200Response,\n GetEnclaveQuotesDefaultResponse,\n ListCollections200Response,\n ListCollectionsDefaultResponse,\n ListLedgerEntries200Response,\n ListLedgerEntriesDefaultResponse,\n CreateLedgerEntry200Response,\n CreateLedgerEntryDefaultResponse,\n GetLedgerEntry200Response,\n GetLedgerEntryDefaultResponse,\n GetReceipt200Response,\n GetReceiptDefaultResponse,\n GetTransactionStatus200Response,\n GetTransactionStatusDefaultResponse,\n GetCurrentLedgerEntry200Response,\n GetCurrentLedgerEntryDefaultResponse,\n DeleteUser204Response,\n DeleteUserDefaultResponse,\n GetUser200Response,\n GetUserDefaultResponse,\n CreateOrUpdateUser200Response,\n CreateOrUpdateUserDefaultResponse\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetConstitution {\n /** The constitution is a script that assesses and applies proposals from consortium members. */\n get(\n options?: GetConstitutionParameters\n ): StreamableMethod<\n GetConstitution200Response | GetConstitutionDefaultResponse\n >;\n}\n\nexport interface ListConsortiumMembers {\n /** Consortium members can manage the Confidential Ledger. */\n get(\n options?: ListConsortiumMembersParameters\n ): StreamableMethod<\n ListConsortiumMembers200Response | ListConsortiumMembersDefaultResponse\n >;\n}\n\nexport interface GetEnclaveQuotes {\n /** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */\n get(\n options?: GetEnclaveQuotesParameters\n ): StreamableMethod<\n GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse\n >;\n}\n\nexport interface ListCollections {\n /** Collection ids are user-created collections of ledger entries */\n get(\n options?: ListCollectionsParameters\n ): StreamableMethod<\n ListCollections200Response | ListCollectionsDefaultResponse\n >;\n}\n\nexport interface ListLedgerEntries {\n /** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */\n get(\n options?: ListLedgerEntriesParameters\n ): StreamableMethod<\n ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse\n >;\n /** A collection id may optionally be specified. */\n post(\n options: CreateLedgerEntryParameters\n ): StreamableMethod<\n CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse\n >;\n}\n\nexport interface GetLedgerEntry {\n /** To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing. */\n get(\n options?: GetLedgerEntryParameters\n ): StreamableMethod<\n GetLedgerEntry200Response | GetLedgerEntryDefaultResponse\n >;\n}\n\nexport interface GetReceipt {\n /** Gets a receipt certifying ledger contents at a particular transaction id. */\n get(\n options?: GetReceiptParameters\n ): StreamableMethod<GetReceipt200Response | GetReceiptDefaultResponse>;\n}\n\nexport interface GetTransactionStatus {\n /** Gets the status of an entry identified by a transaction id. */\n get(\n options?: GetTransactionStatusParameters\n ): StreamableMethod<\n GetTransactionStatus200Response | GetTransactionStatusDefaultResponse\n >;\n}\n\nexport interface GetCurrentLedgerEntry {\n /** A collection id may optionally be specified. */\n get(\n options?: GetCurrentLedgerEntryParameters\n ): StreamableMethod<\n GetCurrentLedgerEntry200Response | GetCurrentLedgerEntryDefaultResponse\n >;\n}\n\nexport interface DeleteUser {\n /** Deletes a user from the Confidential Ledger. */\n delete(\n options?: DeleteUserParameters\n ): StreamableMethod<DeleteUser204Response | DeleteUserDefaultResponse>;\n /** Gets a user. */\n get(\n options?: GetUserParameters\n ): StreamableMethod<GetUser200Response | GetUserDefaultResponse>;\n /** A JSON merge patch is applied for existing users */\n patch(\n options: CreateOrUpdateUserParameters\n ): StreamableMethod<\n CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/app/governance/constitution' has methods for the following verbs: get */\n (path: \"/app/governance/constitution\"): GetConstitution;\n /** Resource for '/app/governance/members' has methods for the following verbs: get */\n (path: \"/app/governance/members\"): ListConsortiumMembers;\n /** Resource for '/app/enclaveQuotes' has methods for the following verbs: get */\n (path: \"/app/enclaveQuotes\"): GetEnclaveQuotes;\n /** Resource for '/app/collections' has methods for the following verbs: get */\n (path: \"/app/collections\"): ListCollections;\n /** Resource for '/app/transactions' has methods for the following verbs: get, post */\n (path: \"/app/transactions\"): ListLedgerEntries;\n /** Resource for '/app/transactions/\\{transactionId\\}' has methods for the following verbs: get */\n (\n path: \"/app/transactions/{transactionId}\",\n transactionId: string\n ): GetLedgerEntry;\n /** Resource for '/app/transactions/\\{transactionId\\}/receipt' has methods for the following verbs: get */\n (\n path: \"/app/transactions/{transactionId}/receipt\",\n transactionId: string\n ): GetReceipt;\n /** Resource for '/app/transactions/\\{transactionId\\}/status' has methods for the following verbs: get */\n (\n path: \"/app/transactions/{transactionId}/status\",\n transactionId: string\n ): GetTransactionStatus;\n /** Resource for '/app/transactions/current' has methods for the following verbs: get */\n (path: \"/app/transactions/current\"): GetCurrentLedgerEntry;\n /** Resource for '/app/users/\\{userId\\}' has methods for the following verbs: delete, get, patch */\n (path: \"/app/users/{userId}\", userId: string): DeleteUser;\n}\n\nexport type ConfidentialLedgerClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClientOptions } from "@azure-rest/core-client";
|
|
2
|
+
import { TokenCredential } from "@azure/core-auth";
|
|
3
|
+
import { ConfidentialLedgerClient } from "./clientDefinitions.js";
|
|
4
|
+
/**
|
|
5
|
+
* Initialize a new instance of `ConfidentialLedgerClient`
|
|
6
|
+
* @param ledgerEndpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com
|
|
7
|
+
* @param credentials - uniquely identify client credential
|
|
8
|
+
* @param options - the parameter for all optional parameters
|
|
9
|
+
*/
|
|
10
|
+
export default function createClient(ledgerEndpoint: string, credentials: TokenCredential, options?: ClientOptions): ConfidentialLedgerClient;
|
|
11
|
+
//# sourceMappingURL=confidentialLedger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confidentialLedger.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/confidentialLedger.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,wBAAwB,CAkC1B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.default = createClient;
|
|
6
|
+
const core_client_1 = require("@azure-rest/core-client");
|
|
7
|
+
const logger_js_1 = require("./logger.js");
|
|
8
|
+
/**
|
|
9
|
+
* Initialize a new instance of `ConfidentialLedgerClient`
|
|
10
|
+
* @param ledgerEndpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com
|
|
11
|
+
* @param credentials - uniquely identify client credential
|
|
12
|
+
* @param options - the parameter for all optional parameters
|
|
13
|
+
*/
|
|
14
|
+
function createClient(ledgerEndpoint, credentials, options = {}) {
|
|
15
|
+
var _a, _b, _c, _d, _e, _f;
|
|
16
|
+
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${ledgerEndpoint}`;
|
|
17
|
+
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2022-05-13";
|
|
18
|
+
options = Object.assign(Object.assign({}, options), { credentials: {
|
|
19
|
+
scopes: (_d = (_c = options.credentials) === null || _c === void 0 ? void 0 : _c.scopes) !== null && _d !== void 0 ? _d : [
|
|
20
|
+
"https://confidential-ledger.azure.com/.default"
|
|
21
|
+
]
|
|
22
|
+
} });
|
|
23
|
+
const userAgentInfo = `azsdk-js-confidential-ledger-rest/1.0.1`;
|
|
24
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
25
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
26
|
+
: `${userAgentInfo}`;
|
|
27
|
+
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
28
|
+
userAgentPrefix
|
|
29
|
+
}, loggingOptions: {
|
|
30
|
+
logger: (_f = (_e = options.loggingOptions) === null || _e === void 0 ? void 0 : _e.logger) !== null && _f !== void 0 ? _f : logger_js_1.logger.info
|
|
31
|
+
} });
|
|
32
|
+
const client = (0, core_client_1.getClient)(baseUrl, credentials, options);
|
|
33
|
+
return client;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=confidentialLedger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confidentialLedger.js","sourceRoot":"","sources":["../../../../src/generated/src/confidentialLedger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAalC,+BAsCC;AAjDD,yDAAmE;AACnE,2CAAqC;AAIrC;;;;;GAKG;AACH,SAAwB,YAAY,CAClC,cAAsB,EACtB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,cAAc,EAAE,CAAC;IACvD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,YAAY,CAAC;IACxD,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI;gBACrC,gDAAgD;aACjD;SACF,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,yCAAyC,CAAC;IAChE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACtD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,uBAAS,EACtB,OAAO,EACP,WAAW,EACX,OAAO,CACoB,CAAC;IAE9B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ConfidentialLedgerClient } from \"./clientDefinitions.js\";\n\n/**\n * Initialize a new instance of `ConfidentialLedgerClient`\n * @param ledgerEndpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n ledgerEndpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): ConfidentialLedgerClient {\n const baseUrl = options.baseUrl ?? `${ledgerEndpoint}`;\n options.apiVersion = options.apiVersion ?? \"2022-05-13\";\n options = {\n ...options,\n credentials: {\n scopes: options.credentials?.scopes ?? [\n \"https://confidential-ledger.azure.com/.default\"\n ]\n }\n };\n\n const userAgentInfo = `azsdk-js-confidential-ledger-rest/1.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info\n }\n };\n\n const client = getClient(\n baseUrl,\n credentials,\n options\n ) as ConfidentialLedgerClient;\n\n return client;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import ConfidentialLedger from "./confidentialLedger.js";
|
|
2
|
+
export * from "./confidentialLedger.js";
|
|
3
|
+
export * from "./parameters.js";
|
|
4
|
+
export * from "./responses.js";
|
|
5
|
+
export * from "./clientDefinitions.js";
|
|
6
|
+
export * from "./isUnexpected.js";
|
|
7
|
+
export * from "./models.js";
|
|
8
|
+
export * from "./outputModels.js";
|
|
9
|
+
export * from "./paginateHelper.js";
|
|
10
|
+
export default ConfidentialLedger;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const confidentialLedger_js_1 = tslib_1.__importDefault(require("./confidentialLedger.js"));
|
|
7
|
+
tslib_1.__exportStar(require("./confidentialLedger.js"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./parameters.js"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./responses.js"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./clientDefinitions.js"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./isUnexpected.js"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./models.js"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./outputModels.js"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./paginateHelper.js"), exports);
|
|
15
|
+
exports.default = confidentialLedger_js_1.default;
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,4FAAyD;AAEzD,kEAAwC;AACxC,0DAAgC;AAChC,yDAA+B;AAC/B,iEAAuC;AACvC,4DAAkC;AAClC,sDAA4B;AAC5B,4DAAkC;AAClC,8DAAoC;AAEpC,kBAAe,+BAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport ConfidentialLedger from \"./confidentialLedger.js\";\n\nexport * from \"./confidentialLedger.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./paginateHelper.js\";\n\nexport default ConfidentialLedger;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GetConstitution200Response, GetConstitutionDefaultResponse, ListConsortiumMembers200Response, ListConsortiumMembersDefaultResponse, GetEnclaveQuotes200Response, GetEnclaveQuotesDefaultResponse, ListCollections200Response, ListCollectionsDefaultResponse, ListLedgerEntries200Response, ListLedgerEntriesDefaultResponse, CreateLedgerEntry200Response, CreateLedgerEntryDefaultResponse, GetLedgerEntry200Response, GetLedgerEntryDefaultResponse, GetReceipt200Response, GetReceiptDefaultResponse, GetTransactionStatus200Response, GetTransactionStatusDefaultResponse, GetCurrentLedgerEntry200Response, GetCurrentLedgerEntryDefaultResponse, DeleteUser204Response, DeleteUserDefaultResponse, GetUser200Response, GetUserDefaultResponse, CreateOrUpdateUser200Response, CreateOrUpdateUserDefaultResponse } from "./responses.js";
|
|
2
|
+
export declare function isUnexpected(response: GetConstitution200Response | GetConstitutionDefaultResponse): response is GetConstitutionDefaultResponse;
|
|
3
|
+
export declare function isUnexpected(response: ListConsortiumMembers200Response | ListConsortiumMembersDefaultResponse): response is ListConsortiumMembersDefaultResponse;
|
|
4
|
+
export declare function isUnexpected(response: GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse): response is GetEnclaveQuotesDefaultResponse;
|
|
5
|
+
export declare function isUnexpected(response: ListCollections200Response | ListCollectionsDefaultResponse): response is ListCollectionsDefaultResponse;
|
|
6
|
+
export declare function isUnexpected(response: ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse): response is ListLedgerEntriesDefaultResponse;
|
|
7
|
+
export declare function isUnexpected(response: CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse): response is CreateLedgerEntryDefaultResponse;
|
|
8
|
+
export declare function isUnexpected(response: GetLedgerEntry200Response | GetLedgerEntryDefaultResponse): response is GetLedgerEntryDefaultResponse;
|
|
9
|
+
export declare function isUnexpected(response: GetReceipt200Response | GetReceiptDefaultResponse): response is GetReceiptDefaultResponse;
|
|
10
|
+
export declare function isUnexpected(response: GetTransactionStatus200Response | GetTransactionStatusDefaultResponse): response is GetTransactionStatusDefaultResponse;
|
|
11
|
+
export declare function isUnexpected(response: GetCurrentLedgerEntry200Response | GetCurrentLedgerEntryDefaultResponse): response is GetCurrentLedgerEntryDefaultResponse;
|
|
12
|
+
export declare function isUnexpected(response: DeleteUser204Response | DeleteUserDefaultResponse): response is DeleteUserDefaultResponse;
|
|
13
|
+
export declare function isUnexpected(response: GetUser200Response | GetUserDefaultResponse): response is GetUserDefaultResponse;
|
|
14
|
+
export declare function isUnexpected(response: CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse): response is CreateOrUpdateUserDefaultResponse;
|
|
15
|
+
//# sourceMappingURL=isUnexpected.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,EAChC,oCAAoC,EACpC,2BAA2B,EAC3B,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,4BAA4B,EAC5B,gCAAgC,EAChC,4BAA4B,EAC5B,gCAAgC,EAChC,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EACzB,+BAA+B,EAC/B,mCAAmC,EACnC,gCAAgC,EAChC,oCAAoC,EACpC,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,gBAAgB,CAAC;AAkBxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,0BAA0B,GAAG,8BAA8B,GACpE,QAAQ,IAAI,8BAA8B,CAAC;AAC9C,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,gCAAgC,GAChC,oCAAoC,GACvC,QAAQ,IAAI,oCAAoC,CAAC;AACpD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,2BAA2B,GAAG,+BAA+B,GACtE,QAAQ,IAAI,+BAA+B,CAAC;AAC/C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,0BAA0B,GAAG,8BAA8B,GACpE,QAAQ,IAAI,8BAA8B,CAAC;AAC9C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,4BAA4B,GAAG,gCAAgC,GACxE,QAAQ,IAAI,gCAAgC,CAAC;AAChD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,4BAA4B,GAAG,gCAAgC,GACxE,QAAQ,IAAI,gCAAgC,CAAC;AAChD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,yBAAyB,GAAG,6BAA6B,GAClE,QAAQ,IAAI,6BAA6B,CAAC;AAC7C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,qBAAqB,GAAG,yBAAyB,GAC1D,QAAQ,IAAI,yBAAyB,CAAC;AACzC,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,+BAA+B,GAC/B,mCAAmC,GACtC,QAAQ,IAAI,mCAAmC,CAAC;AACnD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,gCAAgC,GAChC,oCAAoC,GACvC,QAAQ,IAAI,oCAAoC,CAAC;AACpD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,qBAAqB,GAAG,yBAAyB,GAC1D,QAAQ,IAAI,yBAAyB,CAAC;AACzC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,kBAAkB,GAAG,sBAAsB,GACpD,QAAQ,IAAI,sBAAsB,CAAC;AACtC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,6BAA6B,GAAG,iCAAiC,GAC1E,QAAQ,IAAI,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isUnexpected = isUnexpected;
|
|
6
|
+
const responseMap = {
|
|
7
|
+
"GET /app/governance/constitution": ["200"],
|
|
8
|
+
"GET /app/governance/members": ["200"],
|
|
9
|
+
"GET /app/enclaveQuotes": ["200"],
|
|
10
|
+
"GET /app/collections": ["200"],
|
|
11
|
+
"GET /app/transactions": ["200"],
|
|
12
|
+
"POST /app/transactions": ["200"],
|
|
13
|
+
"GET /app/transactions/{transactionId}": ["200"],
|
|
14
|
+
"GET /app/transactions/{transactionId}/receipt": ["200"],
|
|
15
|
+
"GET /app/transactions/{transactionId}/status": ["200"],
|
|
16
|
+
"GET /app/transactions/current": ["200"],
|
|
17
|
+
"DELETE /app/users/{userId}": ["204"],
|
|
18
|
+
"GET /app/users/{userId}": ["200"],
|
|
19
|
+
"PATCH /app/users/{userId}": ["200"]
|
|
20
|
+
};
|
|
21
|
+
function isUnexpected(response) {
|
|
22
|
+
const lroOriginal = response.headers["x-ms-original-url"];
|
|
23
|
+
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
|
|
24
|
+
const method = response.request.method;
|
|
25
|
+
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
26
|
+
if (!pathDetails) {
|
|
27
|
+
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
28
|
+
}
|
|
29
|
+
return !pathDetails.includes(response.status);
|
|
30
|
+
}
|
|
31
|
+
function getParametrizedPathSuccess(method, path) {
|
|
32
|
+
var _a, _b, _c, _d;
|
|
33
|
+
const pathParts = path.split("/");
|
|
34
|
+
// Traverse list to match the longest candidate
|
|
35
|
+
// matchedLen: the length of candidate path
|
|
36
|
+
// matchedValue: the matched status code array
|
|
37
|
+
let matchedLen = -1, matchedValue = [];
|
|
38
|
+
// Iterate the responseMap to find a match
|
|
39
|
+
for (const [key, value] of Object.entries(responseMap)) {
|
|
40
|
+
// Extracting the path from the map key which is in format
|
|
41
|
+
// GET /path/foo
|
|
42
|
+
if (!key.startsWith(method)) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const candidatePath = getPathFromMapKey(key);
|
|
46
|
+
// Get each part of the url path
|
|
47
|
+
const candidateParts = candidatePath.split("/");
|
|
48
|
+
// track if we have found a match to return the values found.
|
|
49
|
+
let found = true;
|
|
50
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
51
|
+
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) &&
|
|
52
|
+
((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
53
|
+
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
54
|
+
// If the current part of the candidate is a "template" part
|
|
55
|
+
// Try to use the suffix of pattern to match the path
|
|
56
|
+
// {guid} ==> $
|
|
57
|
+
// {guid}:export ==> :export$
|
|
58
|
+
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
59
|
+
if (!isMatched) {
|
|
60
|
+
found = false;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
// If the candidate part is not a template and
|
|
66
|
+
// the parts don't match mark the candidate as not found
|
|
67
|
+
// to move on with the next candidate path.
|
|
68
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
69
|
+
found = false;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// We finished evaluating the current candidate parts
|
|
74
|
+
// Update the matched value if and only if we found the longer pattern
|
|
75
|
+
if (found && candidatePath.length > matchedLen) {
|
|
76
|
+
matchedLen = candidatePath.length;
|
|
77
|
+
matchedValue = value;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return matchedValue;
|
|
81
|
+
}
|
|
82
|
+
function getPathFromMapKey(mapKey) {
|
|
83
|
+
const pathStart = mapKey.indexOf("/");
|
|
84
|
+
return mapKey.slice(pathStart);
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=isUnexpected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../../src/generated/src/isUnexpected.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA4FlC,oCAkDC;AA/GD,MAAM,WAAW,GAA6B;IAC5C,kCAAkC,EAAE,CAAC,KAAK,CAAC;IAC3C,6BAA6B,EAAE,CAAC,KAAK,CAAC;IACtC,wBAAwB,EAAE,CAAC,KAAK,CAAC;IACjC,sBAAsB,EAAE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E,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetConstitution200Response,\n GetConstitutionDefaultResponse,\n ListConsortiumMembers200Response,\n ListConsortiumMembersDefaultResponse,\n GetEnclaveQuotes200Response,\n GetEnclaveQuotesDefaultResponse,\n ListCollections200Response,\n ListCollectionsDefaultResponse,\n ListLedgerEntries200Response,\n ListLedgerEntriesDefaultResponse,\n CreateLedgerEntry200Response,\n CreateLedgerEntryDefaultResponse,\n GetLedgerEntry200Response,\n GetLedgerEntryDefaultResponse,\n GetReceipt200Response,\n GetReceiptDefaultResponse,\n GetTransactionStatus200Response,\n GetTransactionStatusDefaultResponse,\n GetCurrentLedgerEntry200Response,\n GetCurrentLedgerEntryDefaultResponse,\n DeleteUser204Response,\n DeleteUserDefaultResponse,\n GetUser200Response,\n GetUserDefaultResponse,\n CreateOrUpdateUser200Response,\n CreateOrUpdateUserDefaultResponse\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /app/governance/constitution\": [\"200\"],\n \"GET /app/governance/members\": [\"200\"],\n \"GET /app/enclaveQuotes\": [\"200\"],\n \"GET /app/collections\": [\"200\"],\n \"GET /app/transactions\": [\"200\"],\n \"POST /app/transactions\": [\"200\"],\n \"GET /app/transactions/{transactionId}\": [\"200\"],\n \"GET /app/transactions/{transactionId}/receipt\": [\"200\"],\n \"GET /app/transactions/{transactionId}/status\": [\"200\"],\n \"GET /app/transactions/current\": [\"200\"],\n \"DELETE /app/users/{userId}\": [\"204\"],\n \"GET /app/users/{userId}\": [\"200\"],\n \"PATCH /app/users/{userId}\": [\"200\"]\n};\n\nexport function isUnexpected(\n response: GetConstitution200Response | GetConstitutionDefaultResponse\n): response is GetConstitutionDefaultResponse;\nexport function isUnexpected(\n response:\n | ListConsortiumMembers200Response\n | ListConsortiumMembersDefaultResponse\n): response is ListConsortiumMembersDefaultResponse;\nexport function isUnexpected(\n response: GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse\n): response is GetEnclaveQuotesDefaultResponse;\nexport function isUnexpected(\n response: ListCollections200Response | ListCollectionsDefaultResponse\n): response is ListCollectionsDefaultResponse;\nexport function isUnexpected(\n response: ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse\n): response is ListLedgerEntriesDefaultResponse;\nexport function isUnexpected(\n response: CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse\n): response is CreateLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: GetLedgerEntry200Response | GetLedgerEntryDefaultResponse\n): response is GetLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: GetReceipt200Response | GetReceiptDefaultResponse\n): response is GetReceiptDefaultResponse;\nexport function isUnexpected(\n response:\n | GetTransactionStatus200Response\n | GetTransactionStatusDefaultResponse\n): response is GetTransactionStatusDefaultResponse;\nexport function isUnexpected(\n response:\n | GetCurrentLedgerEntry200Response\n | GetCurrentLedgerEntryDefaultResponse\n): response is GetCurrentLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: DeleteUser204Response | DeleteUserDefaultResponse\n): response is DeleteUserDefaultResponse;\nexport function isUnexpected(\n response: GetUser200Response | GetUserDefaultResponse\n): response is GetUserDefaultResponse;\nexport function isUnexpected(\n response: CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse\n): response is CreateOrUpdateUserDefaultResponse;\nexport function isUnexpected(\n response:\n | GetConstitution200Response\n | GetConstitutionDefaultResponse\n | ListConsortiumMembers200Response\n | ListConsortiumMembersDefaultResponse\n | GetEnclaveQuotes200Response\n | GetEnclaveQuotesDefaultResponse\n | ListCollections200Response\n | ListCollectionsDefaultResponse\n | ListLedgerEntries200Response\n | ListLedgerEntriesDefaultResponse\n | CreateLedgerEntry200Response\n | CreateLedgerEntryDefaultResponse\n | GetLedgerEntry200Response\n | GetLedgerEntryDefaultResponse\n | GetReceipt200Response\n | GetReceiptDefaultResponse\n | GetTransactionStatus200Response\n | GetTransactionStatusDefaultResponse\n | GetCurrentLedgerEntry200Response\n | GetCurrentLedgerEntryDefaultResponse\n | DeleteUser204Response\n | DeleteUserDefaultResponse\n | GetUser200Response\n | GetUserDefaultResponse\n | CreateOrUpdateUser200Response\n | CreateOrUpdateUserDefaultResponse\n): response is\n | GetConstitutionDefaultResponse\n | ListConsortiumMembersDefaultResponse\n | GetEnclaveQuotesDefaultResponse\n | ListCollectionsDefaultResponse\n | ListLedgerEntriesDefaultResponse\n | CreateLedgerEntryDefaultResponse\n | GetLedgerEntryDefaultResponse\n | GetReceiptDefaultResponse\n | GetTransactionStatusDefaultResponse\n | GetCurrentLedgerEntryDefaultResponse\n | DeleteUserDefaultResponse\n | GetUserDefaultResponse\n | CreateOrUpdateUserDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA4C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.logger = void 0;
|
|
6
|
+
const logger_1 = require("@azure/logger");
|
|
7
|
+
exports.logger = (0, logger_1.createClientLogger)("confidential-ledger");
|
|
8
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/generated/src/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0CAAmD;AACtC,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,qBAAqB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"confidential-ledger\");\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** An entry in the ledger. */
|
|
2
|
+
export interface LedgerEntry {
|
|
3
|
+
/** Contents of the ledger entry. */
|
|
4
|
+
contents: string;
|
|
5
|
+
}
|
|
6
|
+
/** Details about a Confidential Ledger user. */
|
|
7
|
+
export interface LedgerUser {
|
|
8
|
+
/** Represents an assignable role. */
|
|
9
|
+
assignedRole: "Administrator" | "Contributor" | "Reader";
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/models.ts"],"names":[],"mappings":"AAGA,8BAA8B;AAC9B,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,gDAAgD;AAChD,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,YAAY,EAAE,eAAe,GAAG,aAAa,GAAG,QAAQ,CAAC;CAC1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/generated/src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** An entry in the ledger. */\nexport interface LedgerEntry {\n /** Contents of the ledger entry. */\n contents: string;\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUser {\n /** Represents an assignable role. */\n assignedRole: \"Administrator\" | \"Contributor\" | \"Reader\";\n}\n"]}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/** The governance script for the application. */
|
|
2
|
+
export interface ConstitutionOutput {
|
|
3
|
+
/** SHA256 digest of the constitution script. */
|
|
4
|
+
digest: string;
|
|
5
|
+
/** Contents of the constitution. */
|
|
6
|
+
script: string;
|
|
7
|
+
}
|
|
8
|
+
/** An error response from Confidential Ledger. */
|
|
9
|
+
export interface ConfidentialLedgerErrorOutput {
|
|
10
|
+
/** An error response from Confidential Ledger. */
|
|
11
|
+
readonly error?: ConfidentialLedgerErrorBodyOutput;
|
|
12
|
+
}
|
|
13
|
+
/** An error response from Confidential Ledger. */
|
|
14
|
+
export interface ConfidentialLedgerErrorBodyOutput {
|
|
15
|
+
/** The error code. */
|
|
16
|
+
readonly code?: string;
|
|
17
|
+
/** The error message. */
|
|
18
|
+
readonly message?: string;
|
|
19
|
+
}
|
|
20
|
+
/** List of members in the consortium. */
|
|
21
|
+
export interface ConsortiumOutput {
|
|
22
|
+
members: Array<ConsortiumMemberOutput>;
|
|
23
|
+
/** Path from which to retrieve the next page of results. */
|
|
24
|
+
nextLink?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Describes a member of the consortium. */
|
|
27
|
+
export interface ConsortiumMemberOutput {
|
|
28
|
+
/** PEM-encoded certificate associated with the member. */
|
|
29
|
+
certificate: string;
|
|
30
|
+
/** Identifier assigned to the member. */
|
|
31
|
+
id: string;
|
|
32
|
+
}
|
|
33
|
+
/** Information about the enclaves running the Confidential Ledger. */
|
|
34
|
+
export interface ConfidentialLedgerEnclavesOutput {
|
|
35
|
+
/** Id of the Confidential Ledger node responding to the request. */
|
|
36
|
+
currentNodeId: string;
|
|
37
|
+
/** Dictionary of enclave quotes, indexed by node id. */
|
|
38
|
+
enclaveQuotes: Record<string, EnclaveQuoteOutput>;
|
|
39
|
+
}
|
|
40
|
+
/** Contains the enclave quote. */
|
|
41
|
+
export interface EnclaveQuoteOutput {
|
|
42
|
+
/** ID assigned to this node. */
|
|
43
|
+
nodeId: string;
|
|
44
|
+
/** MRENCLAVE value of the code running in the enclave. */
|
|
45
|
+
mrenclave?: string;
|
|
46
|
+
/** Version of the quote presented. */
|
|
47
|
+
quoteVersion: string;
|
|
48
|
+
/** Raw SGX quote, parsable by tools like Open Enclave's oeverify. */
|
|
49
|
+
raw: string;
|
|
50
|
+
}
|
|
51
|
+
/** Paginated collections returned in response to a query. */
|
|
52
|
+
export interface PagedCollectionsOutput {
|
|
53
|
+
collections: Array<CollectionOutput>;
|
|
54
|
+
/** Path from which to retrieve the next page of results. */
|
|
55
|
+
nextLink?: string;
|
|
56
|
+
}
|
|
57
|
+
/** Identifier for collections. */
|
|
58
|
+
export interface CollectionOutput {
|
|
59
|
+
collectionId: string;
|
|
60
|
+
}
|
|
61
|
+
/** Paginated ledger entries returned in response to a query. */
|
|
62
|
+
export interface PagedLedgerEntriesOutput {
|
|
63
|
+
/** State of a ledger query. */
|
|
64
|
+
state: "Loading" | "Ready";
|
|
65
|
+
/** Path from which to retrieve the next page of results. */
|
|
66
|
+
nextLink?: string;
|
|
67
|
+
/** Array of ledger entries. */
|
|
68
|
+
entries: Array<LedgerEntryOutput>;
|
|
69
|
+
}
|
|
70
|
+
/** An entry in the ledger. */
|
|
71
|
+
export interface LedgerEntryOutput {
|
|
72
|
+
/** Contents of the ledger entry. */
|
|
73
|
+
contents: string;
|
|
74
|
+
readonly collectionId?: string;
|
|
75
|
+
/** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
|
|
76
|
+
readonly transactionId?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable. */
|
|
79
|
+
export interface LedgerWriteResultOutput {
|
|
80
|
+
collectionId: string;
|
|
81
|
+
}
|
|
82
|
+
/** The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready. */
|
|
83
|
+
export interface LedgerQueryResultOutput {
|
|
84
|
+
/** State of a ledger query. */
|
|
85
|
+
state: "Loading" | "Ready";
|
|
86
|
+
/** The ledger entry found as a result of the query. This is only available if the query is in Ready state. */
|
|
87
|
+
entry?: LedgerEntryOutput;
|
|
88
|
+
}
|
|
89
|
+
/** A receipt certifying the transaction at the specified id. */
|
|
90
|
+
export interface TransactionReceiptOutput {
|
|
91
|
+
receipt?: ReceiptContentsOutput;
|
|
92
|
+
/** State of a ledger query. */
|
|
93
|
+
state: "Loading" | "Ready";
|
|
94
|
+
/** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
|
|
95
|
+
transactionId: string;
|
|
96
|
+
}
|
|
97
|
+
export interface ReceiptContentsOutput {
|
|
98
|
+
cert?: string;
|
|
99
|
+
leaf?: string;
|
|
100
|
+
leafComponents?: ReceiptLeafComponentsOutput;
|
|
101
|
+
nodeId: string;
|
|
102
|
+
proof: Array<ReceiptElementOutput>;
|
|
103
|
+
root?: string;
|
|
104
|
+
serviceEndorsements?: Array<string>;
|
|
105
|
+
signature: string;
|
|
106
|
+
}
|
|
107
|
+
export interface ReceiptLeafComponentsOutput {
|
|
108
|
+
claimsDigest?: string;
|
|
109
|
+
commitEvidence?: string;
|
|
110
|
+
writeSetDigest?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface ReceiptElementOutput {
|
|
113
|
+
left?: string;
|
|
114
|
+
right?: string;
|
|
115
|
+
}
|
|
116
|
+
/** Response returned to a query for the transaction status */
|
|
117
|
+
export interface TransactionStatusOutput {
|
|
118
|
+
/** Represents the state of the transaction. */
|
|
119
|
+
state: "Committed" | "Pending";
|
|
120
|
+
/** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
|
|
121
|
+
transactionId: string;
|
|
122
|
+
}
|
|
123
|
+
/** Details about a Confidential Ledger user. */
|
|
124
|
+
export interface LedgerUserOutput {
|
|
125
|
+
/** Represents an assignable role. */
|
|
126
|
+
assignedRole: "Administrator" | "Contributor" | "Reader";
|
|
127
|
+
/** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
|
|
128
|
+
readonly userId?: string;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=outputModels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/outputModels.ts"],"names":[],"mappings":"AAGA,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,kDAAkD;IAClD,QAAQ,CAAC,KAAK,CAAC,EAAE,iCAAiC,CAAC;CACpD;AAED,kDAAkD;AAClD,MAAM,WAAW,iCAAiC;IAChD,sBAAsB;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACvC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,4CAA4C;AAC5C,MAAM,WAAW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Q,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../../src/generated/src/outputModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** The governance script for the application. */\nexport interface ConstitutionOutput {\n /** SHA256 digest of the constitution script. */\n digest: string;\n /** Contents of the constitution. */\n script: string;\n}\n\n/** An error response from Confidential Ledger. */\nexport interface ConfidentialLedgerErrorOutput {\n /** An error response from Confidential Ledger. */\n readonly error?: ConfidentialLedgerErrorBodyOutput;\n}\n\n/** An error response from Confidential Ledger. */\nexport interface ConfidentialLedgerErrorBodyOutput {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n}\n\n/** List of members in the consortium. */\nexport interface ConsortiumOutput {\n members: Array<ConsortiumMemberOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** Describes a member of the consortium. */\nexport interface ConsortiumMemberOutput {\n /** PEM-encoded certificate associated with the member. */\n certificate: string;\n /** Identifier assigned to the member. */\n id: string;\n}\n\n/** Information about the enclaves running the Confidential Ledger. */\nexport interface ConfidentialLedgerEnclavesOutput {\n /** Id of the Confidential Ledger node responding to the request. */\n currentNodeId: string;\n /** Dictionary of enclave quotes, indexed by node id. */\n enclaveQuotes: Record<string, EnclaveQuoteOutput>;\n}\n\n/** Contains the enclave quote. */\nexport interface EnclaveQuoteOutput {\n /** ID assigned to this node. */\n nodeId: string;\n /** MRENCLAVE value of the code running in the enclave. */\n mrenclave?: string;\n /** Version of the quote presented. */\n quoteVersion: string;\n /** Raw SGX quote, parsable by tools like Open Enclave's oeverify. */\n raw: string;\n}\n\n/** Paginated collections returned in response to a query. */\nexport interface PagedCollectionsOutput {\n collections: Array<CollectionOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** Identifier for collections. */\nexport interface CollectionOutput {\n collectionId: string;\n}\n\n/** Paginated ledger entries returned in response to a query. */\nexport interface PagedLedgerEntriesOutput {\n /** State of a ledger query. */\n state: \"Loading\" | \"Ready\";\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n /** Array of ledger entries. */\n entries: Array<LedgerEntryOutput>;\n}\n\n/** An entry in the ledger. */\nexport interface LedgerEntryOutput {\n /** Contents of the ledger entry. */\n contents: string;\n readonly collectionId?: string;\n /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */\n readonly transactionId?: string;\n}\n\n/** Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable. */\nexport interface LedgerWriteResultOutput {\n collectionId: string;\n}\n\n/** The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready. */\nexport interface LedgerQueryResultOutput {\n /** State of a ledger query. */\n state: \"Loading\" | \"Ready\";\n /** The ledger entry found as a result of the query. This is only available if the query is in Ready state. */\n entry?: LedgerEntryOutput;\n}\n\n/** A receipt certifying the transaction at the specified id. */\nexport interface TransactionReceiptOutput {\n receipt?: ReceiptContentsOutput;\n /** State of a ledger query. */\n state: \"Loading\" | \"Ready\";\n /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */\n transactionId: string;\n}\n\nexport interface ReceiptContentsOutput {\n cert?: string;\n leaf?: string;\n leafComponents?: ReceiptLeafComponentsOutput;\n nodeId: string;\n proof: Array<ReceiptElementOutput>;\n root?: string;\n serviceEndorsements?: Array<string>;\n signature: string;\n}\n\nexport interface ReceiptLeafComponentsOutput {\n claimsDigest?: string;\n commitEvidence?: string;\n writeSetDigest?: string;\n}\n\nexport interface ReceiptElementOutput {\n left?: string;\n right?: string;\n}\n\n/** Response returned to a query for the transaction status */\nexport interface TransactionStatusOutput {\n /** Represents the state of the transaction. */\n state: \"Committed\" | \"Pending\";\n /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */\n transactionId: string;\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUserOutput {\n /** Represents an assignable role. */\n assignedRole: \"Administrator\" | \"Contributor\" | \"Reader\";\n /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */\n readonly userId?: string;\n}\n"]}
|