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