@dashevo/dapi-grpc 3.1.0-dev.7 → 4.0.0-beta.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/build.rs +6 -2
- package/clients/drive/v0/nodejs/drive_pbjs.js +7266 -4816
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +39 -0
- package/clients/platform/v0/nodejs/platform_pbjs.js +7266 -4816
- package/clients/platform/v0/nodejs/platform_protoc.js +24811 -22452
- package/clients/platform/v0/web/PlatformPromiseClient.js +15 -0
- package/clients/platform/v0/web/platform_pb.d.ts +314 -0
- package/clients/platform/v0/web/platform_pb.js +24811 -22452
- package/clients/platform/v0/web/platform_pb_service.d.ts +38 -0
- package/clients/platform/v0/web/platform_pb_service.js +80 -0
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +72 -0
|
@@ -34,6 +34,8 @@ const {
|
|
|
34
34
|
GetDataContractResponse: PBJSGetDataContractResponse,
|
|
35
35
|
GetDataContractHistoryRequest: PBJSGetDataContractHistoryRequest,
|
|
36
36
|
GetDataContractHistoryResponse: PBJSGetDataContractHistoryResponse,
|
|
37
|
+
GetDocumentHistoryRequest: PBJSGetDocumentHistoryRequest,
|
|
38
|
+
GetDocumentHistoryResponse: PBJSGetDocumentHistoryResponse,
|
|
37
39
|
GetDocumentsRequest: PBJSGetDocumentsRequest,
|
|
38
40
|
GetDocumentsResponse: PBJSGetDocumentsResponse,
|
|
39
41
|
GetIdentityByPublicKeyHashRequest: PBJSGetIdentityByPublicKeyHashRequest,
|
|
@@ -75,6 +77,7 @@ const {
|
|
|
75
77
|
GetIdentitiesContractKeysResponse: ProtocGetIdentitiesContractKeysResponse,
|
|
76
78
|
GetDataContractResponse: ProtocGetDataContractResponse,
|
|
77
79
|
GetDataContractHistoryResponse: ProtocGetDataContractHistoryResponse,
|
|
80
|
+
GetDocumentHistoryResponse: ProtocGetDocumentHistoryResponse,
|
|
78
81
|
GetDocumentsResponse: ProtocGetDocumentsResponse,
|
|
79
82
|
GetIdentityByPublicKeyHashResponse: ProtocGetIdentityByPublicKeyHashResponse,
|
|
80
83
|
WaitForStateTransitionResultResponse: ProtocWaitForStateTransitionResultResponse,
|
|
@@ -134,6 +137,10 @@ class PlatformPromiseClient {
|
|
|
134
137
|
this.client.getDataContractHistory.bind(this.client),
|
|
135
138
|
);
|
|
136
139
|
|
|
140
|
+
this.client.getDocumentHistory = promisify(
|
|
141
|
+
this.client.getDocumentHistory.bind(this.client),
|
|
142
|
+
);
|
|
143
|
+
|
|
137
144
|
this.client.getDocuments = promisify(
|
|
138
145
|
this.client.getDocuments.bind(this.client),
|
|
139
146
|
);
|
|
@@ -349,6 +356,38 @@ class PlatformPromiseClient {
|
|
|
349
356
|
);
|
|
350
357
|
}
|
|
351
358
|
|
|
359
|
+
/**
|
|
360
|
+
*
|
|
361
|
+
* @param {!GetDocumentHistoryRequest} getDocumentHistoryRequest
|
|
362
|
+
* @param {?Object<string, string>} metadata
|
|
363
|
+
* @param {CallOptions} [options={}]
|
|
364
|
+
* @returns {Promise<!GetDocumentHistoryResponse>}
|
|
365
|
+
*/
|
|
366
|
+
getDocumentHistory(getDocumentHistoryRequest, metadata = {}, options = {}) {
|
|
367
|
+
if (!isObject(metadata)) {
|
|
368
|
+
throw new Error('metadata must be an object');
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
return this.client.getDocumentHistory(
|
|
372
|
+
getDocumentHistoryRequest,
|
|
373
|
+
convertObjectToMetadata(metadata),
|
|
374
|
+
{
|
|
375
|
+
interceptors: [
|
|
376
|
+
jsonToProtobufInterceptorFactory(
|
|
377
|
+
jsonToProtobufFactory(
|
|
378
|
+
ProtocGetDocumentHistoryResponse,
|
|
379
|
+
PBJSGetDocumentHistoryResponse,
|
|
380
|
+
),
|
|
381
|
+
protobufToJsonFactory(
|
|
382
|
+
PBJSGetDocumentHistoryRequest,
|
|
383
|
+
),
|
|
384
|
+
),
|
|
385
|
+
],
|
|
386
|
+
...options,
|
|
387
|
+
},
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
|
|
352
391
|
/**
|
|
353
392
|
*
|
|
354
393
|
* @param {!GetDocumentsRequest} getDocumentsRequest
|