@azure-rest/confidential-ledger 1.0.0-beta.2 → 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/README.md +101 -35
- package/dist/index.js +233 -42
- package/dist/index.js.map +1 -1
- package/dist-esm/src/confidentialLedger.js +15 -7
- package/dist-esm/src/confidentialLedger.js.map +1 -1
- package/dist-esm/src/generated/src/clientDefinitions.js +4 -0
- package/dist-esm/src/generated/src/clientDefinitions.js.map +1 -0
- package/dist-esm/src/generated/src/confidentialLedger.js +13 -5
- package/dist-esm/src/generated/src/confidentialLedger.js.map +1 -1
- package/dist-esm/src/generated/src/index.js +5 -1
- package/dist-esm/src/generated/src/index.js.map +1 -1
- package/dist-esm/src/generated/src/isUnexpected.js +77 -0
- package/dist-esm/src/generated/src/isUnexpected.js.map +1 -0
- package/dist-esm/src/generated/src/models.js.map +1 -1
- package/dist-esm/src/generated/src/outputModels.js +4 -0
- package/dist-esm/src/generated/src/outputModels.js.map +1 -0
- package/dist-esm/src/generated/src/paginateHelper.js +116 -0
- package/dist-esm/src/generated/src/paginateHelper.js.map +1 -0
- package/dist-esm/src/generated/src/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/responses.js.map +1 -1
- package/dist-esm/src/getLedgerIdentity.js +12 -11
- package/dist-esm/src/getLedgerIdentity.js.map +1 -1
- package/dist-esm/src/index.js +4 -0
- package/dist-esm/src/index.js.map +1 -1
- package/package.json +29 -28
- package/types/confidential-ledger.d.ts +322 -190
- package/CHANGELOG.md +0 -5
- package/dist-esm/src/certificatePolicy.browser.js +0 -14
- package/dist-esm/src/certificatePolicy.browser.js.map +0 -1
- package/dist-esm/src/certificatePolicy.js +0 -23
- package/dist-esm/src/certificatePolicy.js.map +0 -1
|
@@ -1,102 +1,152 @@
|
|
|
1
|
-
import { CertificateCredential } from '@azure-rest/core-client';
|
|
2
1
|
import { Client } from '@azure-rest/core-client';
|
|
3
2
|
import { ClientOptions } from '@azure-rest/core-client';
|
|
4
3
|
import { HttpResponse } from '@azure-rest/core-client';
|
|
4
|
+
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
5
|
+
import { PathUncheckedResponse } from '@azure-rest/core-client';
|
|
5
6
|
import { RawHttpHeaders } from '@azure/core-rest-pipeline';
|
|
6
7
|
import { RequestParameters } from '@azure-rest/core-client';
|
|
8
|
+
import { StreamableMethod } from '@azure-rest/core-client';
|
|
7
9
|
import { TokenCredential } from '@azure/core-auth';
|
|
8
10
|
|
|
9
|
-
declare
|
|
11
|
+
export declare interface CollectionOutput {
|
|
12
|
+
collectionId: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare function ConfidentialLedger(ledgerEndpoint: string, ledgerIdentityCertificate: string, options?: ClientOptions): ConfidentialLedgerClient;
|
|
16
|
+
|
|
17
|
+
declare function ConfidentialLedger(ledgerEndpoint: string, ledgerIdentityCertificate: string, credentials: TokenCredential, options?: ClientOptions): ConfidentialLedgerClient;
|
|
10
18
|
export default ConfidentialLedger;
|
|
11
19
|
|
|
12
|
-
export declare
|
|
20
|
+
export declare type ConfidentialLedgerClient = Client & {
|
|
21
|
+
path: Routes;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export declare interface ConfidentialLedgerEnclavesOutput {
|
|
13
25
|
/** Id of the Confidential Ledger node responding to the request. */
|
|
14
26
|
currentNodeId: string;
|
|
15
27
|
/** Dictionary of enclave quotes, indexed by node id. */
|
|
16
|
-
enclaveQuotes:
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export declare interface ConfidentialLedgerError {
|
|
20
|
-
/** An error response from Confidential Ledger. */
|
|
21
|
-
error?: ConfidentialLedgerErrorBody;
|
|
28
|
+
enclaveQuotes: Record<string, EnclaveQuoteOutput>;
|
|
22
29
|
}
|
|
23
30
|
|
|
24
|
-
export declare interface
|
|
31
|
+
export declare interface ConfidentialLedgerErrorBodyOutput {
|
|
25
32
|
/** The error code. */
|
|
26
33
|
code?: string;
|
|
27
34
|
/** The error message. */
|
|
28
35
|
message?: string;
|
|
29
|
-
/** An error response from Confidential Ledger. */
|
|
30
|
-
innerError?: ConfidentialLedgerErrorBody;
|
|
31
36
|
}
|
|
32
37
|
|
|
33
|
-
export declare
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
path: Routes;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export declare type ConfidentialLedgerUserRoleName = "Administrator" | "Contributor" | "Reader";
|
|
40
|
-
|
|
41
|
-
export declare interface Consortium {
|
|
42
|
-
members: ConsortiumMember[];
|
|
38
|
+
export declare interface ConfidentialLedgerErrorOutput {
|
|
39
|
+
/** An error response from Confidential Ledger. */
|
|
40
|
+
error?: ConfidentialLedgerErrorBodyOutput;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
export declare interface
|
|
43
|
+
export declare interface ConsortiumMemberOutput {
|
|
46
44
|
/** PEM-encoded certificate associated with the member. */
|
|
47
45
|
certificate: string;
|
|
48
46
|
/** Identifier assigned to the member. */
|
|
49
47
|
id: string;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
export declare interface
|
|
50
|
+
export declare interface ConsortiumOutput {
|
|
51
|
+
members: Array<ConsortiumMemberOutput>;
|
|
52
|
+
/** Path from which to retrieve the next page of results. */
|
|
53
|
+
nextLink?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export declare interface ConstitutionOutput {
|
|
53
57
|
/** SHA256 digest of the constitution script. */
|
|
54
58
|
digest: string;
|
|
55
59
|
/** Contents of the constitution. */
|
|
56
60
|
script: string;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
|
-
export declare interface
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
export declare interface CreateLedgerEntry200Headers {
|
|
64
|
+
/** The transaction id at which this write will become durable. */
|
|
65
|
+
"x-ms-ccf-transaction-id"?: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** A collection id may optionally be specified. */
|
|
69
|
+
export declare interface CreateLedgerEntry200Response extends HttpResponse {
|
|
70
|
+
status: "200";
|
|
71
|
+
body: LedgerWriteResultOutput;
|
|
72
|
+
headers: RawHttpHeaders & CreateLedgerEntry200Headers;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export declare interface CreateLedgerEntryBodyParam {
|
|
76
|
+
/** Ledger entry. */
|
|
77
|
+
body: LedgerEntry;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** A collection id may optionally be specified. */
|
|
81
|
+
export declare interface CreateLedgerEntrydefaultResponse extends HttpResponse {
|
|
82
|
+
status: string;
|
|
83
|
+
body: ConfidentialLedgerErrorOutput;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export declare interface CreateLedgerEntryMediaTypesParam {
|
|
87
|
+
/** Request content type */
|
|
88
|
+
contentType?: "application/json";
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare type CreateLedgerEntryParameters = CreateLedgerEntryQueryParam & CreateLedgerEntryMediaTypesParam & CreateLedgerEntryBodyParam & RequestParameters;
|
|
92
|
+
|
|
93
|
+
export declare interface CreateLedgerEntryQueryParam {
|
|
94
|
+
queryParameters?: CreateLedgerEntryQueryParamProperties;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export declare interface CreateLedgerEntryQueryParamProperties {
|
|
98
|
+
/** The collection id. */
|
|
99
|
+
collectionId?: string;
|
|
66
100
|
}
|
|
67
101
|
|
|
68
102
|
/** A JSON merge patch is applied for existing users */
|
|
69
103
|
export declare interface CreateOrUpdateUser200Response extends HttpResponse {
|
|
70
104
|
status: "200";
|
|
71
|
-
body:
|
|
105
|
+
body: LedgerUserOutput;
|
|
72
106
|
}
|
|
73
107
|
|
|
74
108
|
export declare interface CreateOrUpdateUserBodyParam {
|
|
109
|
+
/** Details about a Confidential Ledger user. */
|
|
75
110
|
body: LedgerUser;
|
|
76
111
|
}
|
|
77
112
|
|
|
78
113
|
/** A JSON merge patch is applied for existing users */
|
|
79
114
|
export declare interface CreateOrUpdateUserdefaultResponse extends HttpResponse {
|
|
80
|
-
status:
|
|
81
|
-
body:
|
|
115
|
+
status: string;
|
|
116
|
+
body: ConfidentialLedgerErrorOutput;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare interface CreateOrUpdateUserMediaTypesParam {
|
|
120
|
+
/** Request content type */
|
|
121
|
+
contentType?: "application/merge-patch+json";
|
|
82
122
|
}
|
|
83
123
|
|
|
84
|
-
export declare type CreateOrUpdateUserParameters =
|
|
124
|
+
export declare type CreateOrUpdateUserParameters = CreateOrUpdateUserMediaTypesParam & CreateOrUpdateUserBodyParam & RequestParameters;
|
|
125
|
+
|
|
126
|
+
export declare interface DeleteUser {
|
|
127
|
+
/** Deletes a user from the Confidential Ledger. */
|
|
128
|
+
delete(options?: DeleteUserParameters): StreamableMethod<DeleteUser204Response | DeleteUserdefaultResponse>;
|
|
129
|
+
/** Gets a user. */
|
|
130
|
+
get(options?: GetUserParameters): StreamableMethod<GetUser200Response | GetUserdefaultResponse>;
|
|
131
|
+
/** A JSON merge patch is applied for existing users */
|
|
132
|
+
patch(options: CreateOrUpdateUserParameters): StreamableMethod<CreateOrUpdateUser200Response | CreateOrUpdateUserdefaultResponse>;
|
|
133
|
+
}
|
|
85
134
|
|
|
86
135
|
/** Deletes a user from the Confidential Ledger. */
|
|
87
136
|
export declare interface DeleteUser204Response extends HttpResponse {
|
|
88
137
|
status: "204";
|
|
138
|
+
body: Record<string, unknown>;
|
|
89
139
|
}
|
|
90
140
|
|
|
91
141
|
/** Deletes a user from the Confidential Ledger. */
|
|
92
142
|
export declare interface DeleteUserdefaultResponse extends HttpResponse {
|
|
93
|
-
status:
|
|
94
|
-
body:
|
|
143
|
+
status: string;
|
|
144
|
+
body: ConfidentialLedgerErrorOutput;
|
|
95
145
|
}
|
|
96
146
|
|
|
97
147
|
export declare type DeleteUserParameters = RequestParameters;
|
|
98
148
|
|
|
99
|
-
export declare interface
|
|
149
|
+
export declare interface EnclaveQuoteOutput {
|
|
100
150
|
/** ID assigned to this node. */
|
|
101
151
|
nodeId: string;
|
|
102
152
|
/** MRENCLAVE value of the code running in the enclave. */
|
|
@@ -107,184 +157,149 @@ export declare interface EnclaveQuote {
|
|
|
107
157
|
raw: string;
|
|
108
158
|
}
|
|
109
159
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
get(options?: GetConsortiumMembersParameters): Promise<GetConsortiumMembers200Response | GetConsortiumMembersdefaultResponse>;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** Consortium members can manage the Confidential Ledger. */
|
|
118
|
-
export declare interface GetConsortiumMembers200Response extends HttpResponse {
|
|
119
|
-
status: "200";
|
|
120
|
-
body: Consortium;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/** Consortium members can manage the Confidential Ledger. */
|
|
124
|
-
export declare interface GetConsortiumMembersdefaultResponse extends HttpResponse {
|
|
125
|
-
status: "500";
|
|
126
|
-
body: ConfidentialLedgerError;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export declare type GetConsortiumMembersParameters = RequestParameters;
|
|
160
|
+
/**
|
|
161
|
+
* Helper type to extract the type of an array
|
|
162
|
+
*/
|
|
163
|
+
export declare type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
|
|
130
164
|
|
|
131
165
|
export declare interface GetConstitution {
|
|
132
166
|
/** The constitution is a script that assesses and applies proposals from consortium members. */
|
|
133
|
-
get(options?: GetConstitutionParameters):
|
|
167
|
+
get(options?: GetConstitutionParameters): StreamableMethod<GetConstitution200Response | GetConstitutiondefaultResponse>;
|
|
134
168
|
}
|
|
135
169
|
|
|
136
170
|
/** The constitution is a script that assesses and applies proposals from consortium members. */
|
|
137
171
|
export declare interface GetConstitution200Response extends HttpResponse {
|
|
138
172
|
status: "200";
|
|
139
|
-
body:
|
|
173
|
+
body: ConstitutionOutput;
|
|
140
174
|
}
|
|
141
175
|
|
|
142
176
|
/** The constitution is a script that assesses and applies proposals from consortium members. */
|
|
143
177
|
export declare interface GetConstitutiondefaultResponse extends HttpResponse {
|
|
144
|
-
status:
|
|
145
|
-
body:
|
|
178
|
+
status: string;
|
|
179
|
+
body: ConfidentialLedgerErrorOutput;
|
|
146
180
|
}
|
|
147
181
|
|
|
148
182
|
export declare type GetConstitutionParameters = RequestParameters;
|
|
149
183
|
|
|
150
184
|
export declare interface GetCurrentLedgerEntry {
|
|
151
|
-
/** A
|
|
152
|
-
get(options?: GetCurrentLedgerEntryParameters):
|
|
185
|
+
/** A collection id may optionally be specified. */
|
|
186
|
+
get(options?: GetCurrentLedgerEntryParameters): StreamableMethod<GetCurrentLedgerEntry200Response | GetCurrentLedgerEntrydefaultResponse>;
|
|
153
187
|
}
|
|
154
188
|
|
|
155
|
-
/** A
|
|
189
|
+
/** A collection id may optionally be specified. */
|
|
156
190
|
export declare interface GetCurrentLedgerEntry200Response extends HttpResponse {
|
|
157
191
|
status: "200";
|
|
158
|
-
body:
|
|
192
|
+
body: LedgerEntryOutput;
|
|
159
193
|
}
|
|
160
194
|
|
|
161
|
-
/** A
|
|
195
|
+
/** A collection id may optionally be specified. */
|
|
162
196
|
export declare interface GetCurrentLedgerEntrydefaultResponse extends HttpResponse {
|
|
163
|
-
status:
|
|
164
|
-
body:
|
|
197
|
+
status: string;
|
|
198
|
+
body: ConfidentialLedgerErrorOutput;
|
|
165
199
|
}
|
|
166
200
|
|
|
167
|
-
export declare type GetCurrentLedgerEntryParameters =
|
|
201
|
+
export declare type GetCurrentLedgerEntryParameters = GetCurrentLedgerEntryQueryParam & RequestParameters;
|
|
168
202
|
|
|
169
203
|
export declare interface GetCurrentLedgerEntryQueryParam {
|
|
170
204
|
queryParameters?: GetCurrentLedgerEntryQueryParamProperties;
|
|
171
205
|
}
|
|
172
206
|
|
|
173
207
|
export declare interface GetCurrentLedgerEntryQueryParamProperties {
|
|
174
|
-
/** The
|
|
175
|
-
|
|
208
|
+
/** The collection id. */
|
|
209
|
+
collectionId?: string;
|
|
176
210
|
}
|
|
177
211
|
|
|
178
212
|
export declare interface GetEnclaveQuotes {
|
|
179
213
|
/** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */
|
|
180
|
-
get(options?: GetEnclaveQuotesParameters):
|
|
214
|
+
get(options?: GetEnclaveQuotesParameters): StreamableMethod<GetEnclaveQuotes200Response | GetEnclaveQuotesdefaultResponse>;
|
|
181
215
|
}
|
|
182
216
|
|
|
183
217
|
/** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */
|
|
184
218
|
export declare interface GetEnclaveQuotes200Response extends HttpResponse {
|
|
185
219
|
status: "200";
|
|
186
|
-
body:
|
|
220
|
+
body: ConfidentialLedgerEnclavesOutput;
|
|
187
221
|
}
|
|
188
222
|
|
|
189
223
|
/** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */
|
|
190
224
|
export declare interface GetEnclaveQuotesdefaultResponse extends HttpResponse {
|
|
191
|
-
status:
|
|
192
|
-
body:
|
|
225
|
+
status: string;
|
|
226
|
+
body: ConfidentialLedgerErrorOutput;
|
|
193
227
|
}
|
|
194
228
|
|
|
195
229
|
export declare type GetEnclaveQuotesParameters = RequestParameters;
|
|
196
230
|
|
|
197
|
-
/** A sub-ledger id may optionally be specified. Only entries in the specified (or default) sub-ledger will be returned. */
|
|
198
|
-
export declare interface GetLedgerEntries200Response extends HttpResponse {
|
|
199
|
-
status: "200";
|
|
200
|
-
body: PagedLedgerEntries;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/** A sub-ledger id may optionally be specified. Only entries in the specified (or default) sub-ledger will be returned. */
|
|
204
|
-
export declare interface GetLedgerEntriesdefaultResponse extends HttpResponse {
|
|
205
|
-
status: "500";
|
|
206
|
-
body: ConfidentialLedgerError;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export declare type GetLedgerEntriesParameters = RequestParameters & GetLedgerEntriesQueryParam;
|
|
210
|
-
|
|
211
|
-
export declare interface GetLedgerEntriesQueryParam {
|
|
212
|
-
queryParameters?: GetLedgerEntriesQueryParamProperties;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export declare interface GetLedgerEntriesQueryParamProperties {
|
|
216
|
-
/** The sub-ledger id. */
|
|
217
|
-
subLedgerId?: string;
|
|
218
|
-
/** Specify the first transaction ID in a range. */
|
|
219
|
-
fromTransactionId?: string;
|
|
220
|
-
/** Specify the last transaction ID in a range. */
|
|
221
|
-
toTransactionId?: string;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
231
|
export declare interface GetLedgerEntry {
|
|
225
232
|
/** 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. */
|
|
226
|
-
get(options?: GetLedgerEntryParameters):
|
|
233
|
+
get(options?: GetLedgerEntryParameters): StreamableMethod<GetLedgerEntry200Response | GetLedgerEntrydefaultResponse>;
|
|
227
234
|
}
|
|
228
235
|
|
|
229
236
|
/** 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. */
|
|
230
237
|
export declare interface GetLedgerEntry200Response extends HttpResponse {
|
|
231
238
|
status: "200";
|
|
232
|
-
body:
|
|
239
|
+
body: LedgerQueryResultOutput;
|
|
233
240
|
}
|
|
234
241
|
|
|
235
242
|
/** 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. */
|
|
236
243
|
export declare interface GetLedgerEntrydefaultResponse extends HttpResponse {
|
|
237
|
-
status:
|
|
238
|
-
body:
|
|
244
|
+
status: string;
|
|
245
|
+
body: ConfidentialLedgerErrorOutput;
|
|
239
246
|
}
|
|
240
247
|
|
|
241
|
-
export declare type GetLedgerEntryParameters =
|
|
248
|
+
export declare type GetLedgerEntryParameters = GetLedgerEntryQueryParam & RequestParameters;
|
|
242
249
|
|
|
243
250
|
export declare interface GetLedgerEntryQueryParam {
|
|
244
251
|
queryParameters?: GetLedgerEntryQueryParamProperties;
|
|
245
252
|
}
|
|
246
253
|
|
|
247
254
|
export declare interface GetLedgerEntryQueryParamProperties {
|
|
248
|
-
/** The
|
|
249
|
-
|
|
255
|
+
/** The collection id. */
|
|
256
|
+
collectionId?: string;
|
|
250
257
|
}
|
|
251
258
|
|
|
252
259
|
export declare function getLedgerIdentity(ledgerId: string, identityServiceBaseUrl?: string): Promise<LedgerIdentity>;
|
|
253
260
|
|
|
261
|
+
/**
|
|
262
|
+
* The type of a custom function that defines how to get a page and a link to the next one if any.
|
|
263
|
+
*/
|
|
264
|
+
export declare type GetPage<TPage> = (pageLink: string, maxPageSize?: number) => Promise<{
|
|
265
|
+
page: TPage;
|
|
266
|
+
nextPageLink?: string;
|
|
267
|
+
}>;
|
|
268
|
+
|
|
254
269
|
export declare interface GetReceipt {
|
|
255
270
|
/** Gets a receipt certifying ledger contents at a particular transaction id. */
|
|
256
|
-
get(options?: GetReceiptParameters):
|
|
271
|
+
get(options?: GetReceiptParameters): StreamableMethod<GetReceipt200Response | GetReceiptdefaultResponse>;
|
|
257
272
|
}
|
|
258
273
|
|
|
259
274
|
/** Gets a receipt certifying ledger contents at a particular transaction id. */
|
|
260
275
|
export declare interface GetReceipt200Response extends HttpResponse {
|
|
261
276
|
status: "200";
|
|
262
|
-
body:
|
|
277
|
+
body: TransactionReceiptOutput;
|
|
263
278
|
}
|
|
264
279
|
|
|
265
280
|
/** Gets a receipt certifying ledger contents at a particular transaction id. */
|
|
266
281
|
export declare interface GetReceiptdefaultResponse extends HttpResponse {
|
|
267
|
-
status:
|
|
268
|
-
body:
|
|
282
|
+
status: string;
|
|
283
|
+
body: ConfidentialLedgerErrorOutput;
|
|
269
284
|
}
|
|
270
285
|
|
|
271
286
|
export declare type GetReceiptParameters = RequestParameters;
|
|
272
287
|
|
|
273
288
|
export declare interface GetTransactionStatus {
|
|
274
289
|
/** Gets the status of an entry identified by a transaction id. */
|
|
275
|
-
get(options?: GetTransactionStatusParameters):
|
|
290
|
+
get(options?: GetTransactionStatusParameters): StreamableMethod<GetTransactionStatus200Response | GetTransactionStatusdefaultResponse>;
|
|
276
291
|
}
|
|
277
292
|
|
|
278
293
|
/** Gets the status of an entry identified by a transaction id. */
|
|
279
294
|
export declare interface GetTransactionStatus200Response extends HttpResponse {
|
|
280
295
|
status: "200";
|
|
281
|
-
body:
|
|
296
|
+
body: TransactionStatusOutput;
|
|
282
297
|
}
|
|
283
298
|
|
|
284
299
|
/** Gets the status of an entry identified by a transaction id. */
|
|
285
300
|
export declare interface GetTransactionStatusdefaultResponse extends HttpResponse {
|
|
286
|
-
status:
|
|
287
|
-
body:
|
|
301
|
+
status: string;
|
|
302
|
+
body: ConfidentialLedgerErrorOutput;
|
|
288
303
|
}
|
|
289
304
|
|
|
290
305
|
export declare type GetTransactionStatusParameters = RequestParameters;
|
|
@@ -292,133 +307,253 @@ export declare type GetTransactionStatusParameters = RequestParameters;
|
|
|
292
307
|
/** Gets a user. */
|
|
293
308
|
export declare interface GetUser200Response extends HttpResponse {
|
|
294
309
|
status: "200";
|
|
295
|
-
body:
|
|
310
|
+
body: LedgerUserOutput;
|
|
296
311
|
}
|
|
297
312
|
|
|
298
313
|
/** Gets a user. */
|
|
299
314
|
export declare interface GetUserdefaultResponse extends HttpResponse {
|
|
300
|
-
status:
|
|
301
|
-
body:
|
|
315
|
+
status: string;
|
|
316
|
+
body: ConfidentialLedgerErrorOutput;
|
|
302
317
|
}
|
|
303
318
|
|
|
304
319
|
export declare type GetUserParameters = RequestParameters;
|
|
305
320
|
|
|
321
|
+
export declare function isUnexpected(response: GetConstitution200Response | GetConstitutiondefaultResponse): response is GetConstitutiondefaultResponse;
|
|
322
|
+
|
|
323
|
+
export declare function isUnexpected(response: ListConsortiumMembers200Response | ListConsortiumMembersdefaultResponse): response is ListConsortiumMembersdefaultResponse;
|
|
324
|
+
|
|
325
|
+
export declare function isUnexpected(response: GetEnclaveQuotes200Response | GetEnclaveQuotesdefaultResponse): response is GetEnclaveQuotesdefaultResponse;
|
|
326
|
+
|
|
327
|
+
export declare function isUnexpected(response: ListCollections200Response | ListCollectionsdefaultResponse): response is ListCollectionsdefaultResponse;
|
|
328
|
+
|
|
329
|
+
export declare function isUnexpected(response: ListLedgerEntries200Response | ListLedgerEntriesdefaultResponse): response is ListLedgerEntriesdefaultResponse;
|
|
330
|
+
|
|
331
|
+
export declare function isUnexpected(response: CreateLedgerEntry200Response | CreateLedgerEntrydefaultResponse): response is CreateLedgerEntrydefaultResponse;
|
|
332
|
+
|
|
333
|
+
export declare function isUnexpected(response: GetLedgerEntry200Response | GetLedgerEntrydefaultResponse): response is GetLedgerEntrydefaultResponse;
|
|
334
|
+
|
|
335
|
+
export declare function isUnexpected(response: GetReceipt200Response | GetReceiptdefaultResponse): response is GetReceiptdefaultResponse;
|
|
336
|
+
|
|
337
|
+
export declare function isUnexpected(response: GetTransactionStatus200Response | GetTransactionStatusdefaultResponse): response is GetTransactionStatusdefaultResponse;
|
|
338
|
+
|
|
339
|
+
export declare function isUnexpected(response: GetCurrentLedgerEntry200Response | GetCurrentLedgerEntrydefaultResponse): response is GetCurrentLedgerEntrydefaultResponse;
|
|
340
|
+
|
|
341
|
+
export declare function isUnexpected(response: DeleteUser204Response | DeleteUserdefaultResponse): response is DeleteUserdefaultResponse;
|
|
342
|
+
|
|
343
|
+
export declare function isUnexpected(response: GetUser200Response | GetUserdefaultResponse): response is GetUserdefaultResponse;
|
|
344
|
+
|
|
345
|
+
export declare function isUnexpected(response: CreateOrUpdateUser200Response | CreateOrUpdateUserdefaultResponse): response is CreateOrUpdateUserdefaultResponse;
|
|
346
|
+
|
|
306
347
|
export declare interface LedgerEntry {
|
|
307
348
|
/** Contents of the ledger entry. */
|
|
308
349
|
contents: string;
|
|
309
|
-
|
|
310
|
-
|
|
350
|
+
collectionId?: string;
|
|
351
|
+
/** 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. */
|
|
352
|
+
transactionId?: string;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export declare interface LedgerEntryOutput {
|
|
356
|
+
/** Contents of the ledger entry. */
|
|
357
|
+
contents: string;
|
|
358
|
+
collectionId?: string;
|
|
311
359
|
/** 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. */
|
|
312
360
|
transactionId?: string;
|
|
313
361
|
}
|
|
314
362
|
|
|
315
363
|
export declare interface LedgerIdentity {
|
|
316
|
-
|
|
364
|
+
ledgerIdentityCertificate: string;
|
|
317
365
|
ledgerId: string;
|
|
318
366
|
}
|
|
319
367
|
|
|
320
|
-
export declare interface
|
|
368
|
+
export declare interface LedgerQueryResultOutput {
|
|
321
369
|
/** State of a ledger query. */
|
|
322
|
-
state:
|
|
370
|
+
state: "Loading" | "Ready";
|
|
323
371
|
/** The ledger entry found as a result of the query. This is only available if the query is in Ready state. */
|
|
324
|
-
entry?:
|
|
372
|
+
entry?: LedgerEntryOutput;
|
|
325
373
|
}
|
|
326
374
|
|
|
327
375
|
export declare interface LedgerUser {
|
|
328
376
|
/** Represents an assignable role. */
|
|
329
|
-
assignedRole:
|
|
377
|
+
assignedRole: "Administrator" | "Contributor" | "Reader";
|
|
330
378
|
/** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
|
|
331
379
|
userId?: string;
|
|
332
380
|
}
|
|
333
381
|
|
|
334
|
-
export declare interface
|
|
335
|
-
/**
|
|
336
|
-
|
|
382
|
+
export declare interface LedgerUserOutput {
|
|
383
|
+
/** Represents an assignable role. */
|
|
384
|
+
assignedRole: "Administrator" | "Contributor" | "Reader";
|
|
385
|
+
/** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
|
|
386
|
+
userId?: string;
|
|
337
387
|
}
|
|
338
388
|
|
|
339
|
-
export declare interface
|
|
340
|
-
|
|
341
|
-
right?: string;
|
|
389
|
+
export declare interface LedgerWriteResultOutput {
|
|
390
|
+
collectionId: string;
|
|
342
391
|
}
|
|
343
392
|
|
|
344
|
-
export declare interface
|
|
345
|
-
/**
|
|
346
|
-
|
|
347
|
-
/** Path from which to retrieve the next page of results. */
|
|
348
|
-
nextLink?: string;
|
|
349
|
-
/** Array of ledger entries. */
|
|
350
|
-
entries: LedgerEntry[];
|
|
393
|
+
export declare interface ListCollections {
|
|
394
|
+
/** Collection ids are user-created collections of ledger entries */
|
|
395
|
+
get(options?: ListCollectionsParameters): StreamableMethod<ListCollections200Response | ListCollectionsdefaultResponse>;
|
|
351
396
|
}
|
|
352
397
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
post(options?: PostLedgerEntryParameters): Promise<PostLedgerEntry200Response | PostLedgerEntrydefaultResponse>;
|
|
398
|
+
/** Collection ids are user-created collections of ledger entries */
|
|
399
|
+
export declare interface ListCollections200Response extends HttpResponse {
|
|
400
|
+
status: "200";
|
|
401
|
+
body: PagedCollectionsOutput;
|
|
358
402
|
}
|
|
359
403
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
404
|
+
/** Collection ids are user-created collections of ledger entries */
|
|
405
|
+
export declare interface ListCollectionsdefaultResponse extends HttpResponse {
|
|
406
|
+
status: string;
|
|
407
|
+
body: ConfidentialLedgerErrorOutput;
|
|
363
408
|
}
|
|
364
409
|
|
|
365
|
-
|
|
366
|
-
|
|
410
|
+
export declare type ListCollectionsParameters = RequestParameters;
|
|
411
|
+
|
|
412
|
+
export declare interface ListConsortiumMembers {
|
|
413
|
+
/** Consortium members can manage the Confidential Ledger. */
|
|
414
|
+
get(options?: ListConsortiumMembersParameters): StreamableMethod<ListConsortiumMembers200Response | ListConsortiumMembersdefaultResponse>;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/** Consortium members can manage the Confidential Ledger. */
|
|
418
|
+
export declare interface ListConsortiumMembers200Response extends HttpResponse {
|
|
367
419
|
status: "200";
|
|
368
|
-
body:
|
|
369
|
-
headers: RawHttpHeaders & PostLedgerEntry200Headers;
|
|
420
|
+
body: ConsortiumOutput;
|
|
370
421
|
}
|
|
371
422
|
|
|
372
|
-
|
|
373
|
-
|
|
423
|
+
/** Consortium members can manage the Confidential Ledger. */
|
|
424
|
+
export declare interface ListConsortiumMembersdefaultResponse extends HttpResponse {
|
|
425
|
+
status: string;
|
|
426
|
+
body: ConfidentialLedgerErrorOutput;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export declare type ListConsortiumMembersParameters = RequestParameters;
|
|
430
|
+
|
|
431
|
+
export declare interface ListLedgerEntries {
|
|
432
|
+
/** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */
|
|
433
|
+
get(options?: ListLedgerEntriesParameters): StreamableMethod<ListLedgerEntries200Response | ListLedgerEntriesdefaultResponse>;
|
|
434
|
+
/** A collection id may optionally be specified. */
|
|
435
|
+
post(options: CreateLedgerEntryParameters): StreamableMethod<CreateLedgerEntry200Response | CreateLedgerEntrydefaultResponse>;
|
|
374
436
|
}
|
|
375
437
|
|
|
376
|
-
/** A
|
|
377
|
-
export declare interface
|
|
378
|
-
status: "
|
|
379
|
-
body:
|
|
438
|
+
/** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */
|
|
439
|
+
export declare interface ListLedgerEntries200Response extends HttpResponse {
|
|
440
|
+
status: "200";
|
|
441
|
+
body: PagedLedgerEntriesOutput;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */
|
|
445
|
+
export declare interface ListLedgerEntriesdefaultResponse extends HttpResponse {
|
|
446
|
+
status: string;
|
|
447
|
+
body: ConfidentialLedgerErrorOutput;
|
|
380
448
|
}
|
|
381
449
|
|
|
382
|
-
export declare type
|
|
450
|
+
export declare type ListLedgerEntriesParameters = ListLedgerEntriesQueryParam & RequestParameters;
|
|
451
|
+
|
|
452
|
+
export declare interface ListLedgerEntriesQueryParam {
|
|
453
|
+
queryParameters?: ListLedgerEntriesQueryParamProperties;
|
|
454
|
+
}
|
|
383
455
|
|
|
384
|
-
export declare interface
|
|
385
|
-
|
|
456
|
+
export declare interface ListLedgerEntriesQueryParamProperties {
|
|
457
|
+
/** The collection id. */
|
|
458
|
+
collectionId?: string;
|
|
459
|
+
/** Specify the first transaction ID in a range. */
|
|
460
|
+
fromTransactionId?: string;
|
|
461
|
+
/** Specify the last transaction ID in a range. */
|
|
462
|
+
toTransactionId?: string;
|
|
386
463
|
}
|
|
387
464
|
|
|
388
|
-
export declare interface
|
|
389
|
-
|
|
390
|
-
|
|
465
|
+
export declare interface PagedCollectionsOutput {
|
|
466
|
+
collections: Array<CollectionOutput>;
|
|
467
|
+
/** Path from which to retrieve the next page of results. */
|
|
468
|
+
nextLink?: string;
|
|
391
469
|
}
|
|
392
470
|
|
|
393
|
-
export declare interface
|
|
394
|
-
/**
|
|
395
|
-
|
|
396
|
-
/**
|
|
471
|
+
export declare interface PagedLedgerEntriesOutput {
|
|
472
|
+
/** State of a ledger query. */
|
|
473
|
+
state: "Loading" | "Ready";
|
|
474
|
+
/** Path from which to retrieve the next page of results. */
|
|
475
|
+
nextLink?: string;
|
|
476
|
+
/** Array of ledger entries. */
|
|
477
|
+
entries: Array<LedgerEntryOutput>;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
|
|
482
|
+
* @param client - Client to use for sending the next page requests
|
|
483
|
+
* @param initialResponse - Initial response containing the nextLink and current page of elements
|
|
484
|
+
* @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
|
|
485
|
+
* @returns - PagedAsyncIterableIterator to iterate the elements
|
|
486
|
+
*/
|
|
487
|
+
export declare function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Helper type to infer the Type of the paged elements from the response type
|
|
491
|
+
* This type is generated based on the swagger information for x-ms-pageable
|
|
492
|
+
* specifically on the itemName property which indicates the property of the response
|
|
493
|
+
* where the page items are found. The default value is `value`.
|
|
494
|
+
* This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
|
|
495
|
+
*/
|
|
496
|
+
export declare type PaginateReturn<TResult> = TResult extends {
|
|
497
|
+
body: {
|
|
498
|
+
value?: infer TPage;
|
|
499
|
+
};
|
|
500
|
+
} | {
|
|
501
|
+
body: {
|
|
502
|
+
members?: infer TPage;
|
|
503
|
+
};
|
|
504
|
+
} | {
|
|
505
|
+
body: {
|
|
506
|
+
collections?: infer TPage;
|
|
507
|
+
};
|
|
508
|
+
} | {
|
|
509
|
+
body: {
|
|
510
|
+
entries?: infer TPage;
|
|
511
|
+
};
|
|
512
|
+
} ? GetArrayType<TPage> : Array<unknown>;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Options for the paging helper
|
|
516
|
+
*/
|
|
517
|
+
export declare interface PagingOptions<TResponse> {
|
|
518
|
+
/**
|
|
519
|
+
* Custom function to extract pagination details for crating the PagedAsyncIterableIterator
|
|
520
|
+
*/
|
|
521
|
+
customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export declare interface ReceiptContentsOutput {
|
|
525
|
+
cert?: string;
|
|
526
|
+
leaf?: string;
|
|
527
|
+
leafComponents?: ReceiptLeafComponentsOutput;
|
|
397
528
|
nodeId: string;
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
root: string;
|
|
402
|
-
/** Signature by the node, with its certificate, over the Merkle root. */
|
|
529
|
+
proof: Array<ReceiptElementOutput>;
|
|
530
|
+
root?: string;
|
|
531
|
+
serviceEndorsements?: Array<string>;
|
|
403
532
|
signature: string;
|
|
404
533
|
}
|
|
405
534
|
|
|
406
|
-
export declare interface
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
535
|
+
export declare interface ReceiptElementOutput {
|
|
536
|
+
left?: string;
|
|
537
|
+
right?: string;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export declare interface ReceiptLeafComponentsOutput {
|
|
541
|
+
claimsDigest?: string;
|
|
542
|
+
commitEvidence?: string;
|
|
543
|
+
writeSetDigest?: string;
|
|
411
544
|
}
|
|
412
545
|
|
|
413
546
|
export declare interface Routes {
|
|
414
547
|
/** Resource for '/app/governance/constitution' has methods for the following verbs: get */
|
|
415
548
|
(path: "/app/governance/constitution"): GetConstitution;
|
|
416
549
|
/** Resource for '/app/governance/members' has methods for the following verbs: get */
|
|
417
|
-
(path: "/app/governance/members"):
|
|
550
|
+
(path: "/app/governance/members"): ListConsortiumMembers;
|
|
418
551
|
/** Resource for '/app/enclaveQuotes' has methods for the following verbs: get */
|
|
419
552
|
(path: "/app/enclaveQuotes"): GetEnclaveQuotes;
|
|
553
|
+
/** Resource for '/app/collections' has methods for the following verbs: get */
|
|
554
|
+
(path: "/app/collections"): ListCollections;
|
|
420
555
|
/** Resource for '/app/transactions' has methods for the following verbs: get, post */
|
|
421
|
-
(path: "/app/transactions"):
|
|
556
|
+
(path: "/app/transactions"): ListLedgerEntries;
|
|
422
557
|
/** Resource for '/app/transactions/\{transactionId\}' has methods for the following verbs: get */
|
|
423
558
|
(path: "/app/transactions/{transactionId}", transactionId: string): GetLedgerEntry;
|
|
424
559
|
/** Resource for '/app/transactions/\{transactionId\}/receipt' has methods for the following verbs: get */
|
|
@@ -428,23 +563,20 @@ export declare interface Routes {
|
|
|
428
563
|
/** Resource for '/app/transactions/current' has methods for the following verbs: get */
|
|
429
564
|
(path: "/app/transactions/current"): GetCurrentLedgerEntry;
|
|
430
565
|
/** Resource for '/app/users/\{userId\}' has methods for the following verbs: delete, get, patch */
|
|
431
|
-
(path: "/app/users/{userId}", userId: string):
|
|
566
|
+
(path: "/app/users/{userId}", userId: string): DeleteUser;
|
|
432
567
|
}
|
|
433
568
|
|
|
434
|
-
export declare interface
|
|
435
|
-
|
|
436
|
-
receipt?: ReceiptContents;
|
|
569
|
+
export declare interface TransactionReceiptOutput {
|
|
570
|
+
receipt?: ReceiptContentsOutput;
|
|
437
571
|
/** State of a ledger query. */
|
|
438
|
-
state:
|
|
572
|
+
state: "Loading" | "Ready";
|
|
439
573
|
/** 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. */
|
|
440
574
|
transactionId: string;
|
|
441
575
|
}
|
|
442
576
|
|
|
443
|
-
export declare
|
|
444
|
-
|
|
445
|
-
export declare interface TransactionStatus {
|
|
577
|
+
export declare interface TransactionStatusOutput {
|
|
446
578
|
/** Represents the state of the transaction. */
|
|
447
|
-
state:
|
|
579
|
+
state: "Committed" | "Pending";
|
|
448
580
|
/** 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. */
|
|
449
581
|
transactionId: string;
|
|
450
582
|
}
|