@dashevo/dapi-grpc 4.2.0-dev.1 → 4.2.0-dev.11

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.
@@ -121,6 +121,15 @@ type PlatformgetDataContractHistory = {
121
121
  readonly responseType: typeof platform_pb.GetDataContractHistoryResponse;
122
122
  };
123
123
 
124
+ type PlatformgetDataContractsLatestVersions = {
125
+ readonly methodName: string;
126
+ readonly service: typeof Platform;
127
+ readonly requestStream: false;
128
+ readonly responseStream: false;
129
+ readonly requestType: typeof platform_pb.GetDataContractsLatestVersionsRequest;
130
+ readonly responseType: typeof platform_pb.GetDataContractsLatestVersionsResponse;
131
+ };
132
+
124
133
  type PlatformgetDataContracts = {
125
134
  readonly methodName: string;
126
135
  readonly service: typeof Platform;
@@ -130,6 +139,15 @@ type PlatformgetDataContracts = {
130
139
  readonly responseType: typeof platform_pb.GetDataContractsResponse;
131
140
  };
132
141
 
142
+ type PlatformgetDataContractsByRange = {
143
+ readonly methodName: string;
144
+ readonly service: typeof Platform;
145
+ readonly requestStream: false;
146
+ readonly responseStream: false;
147
+ readonly requestType: typeof platform_pb.GetDataContractsByRangeRequest;
148
+ readonly responseType: typeof platform_pb.GetDataContractsResponse;
149
+ };
150
+
133
151
  type PlatformgetDocumentHistory = {
134
152
  readonly methodName: string;
135
153
  readonly service: typeof Platform;
@@ -559,7 +577,9 @@ export class Platform {
559
577
  static readonly getEvonodesProposedEpochBlocksByRange: PlatformgetEvonodesProposedEpochBlocksByRange;
560
578
  static readonly getDataContract: PlatformgetDataContract;
561
579
  static readonly getDataContractHistory: PlatformgetDataContractHistory;
580
+ static readonly getDataContractsLatestVersions: PlatformgetDataContractsLatestVersions;
562
581
  static readonly getDataContracts: PlatformgetDataContracts;
582
+ static readonly getDataContractsByRange: PlatformgetDataContractsByRange;
563
583
  static readonly getDocumentHistory: PlatformgetDocumentHistory;
564
584
  static readonly getDocuments: PlatformgetDocuments;
565
585
  static readonly getIdentityByPublicKeyHash: PlatformgetIdentityByPublicKeyHash;
@@ -757,6 +777,15 @@ export class PlatformClient {
757
777
  requestMessage: platform_pb.GetDataContractHistoryRequest,
758
778
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractHistoryResponse|null) => void
759
779
  ): UnaryResponse;
780
+ getDataContractsLatestVersions(
781
+ requestMessage: platform_pb.GetDataContractsLatestVersionsRequest,
782
+ metadata: grpc.Metadata,
783
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractsLatestVersionsResponse|null) => void
784
+ ): UnaryResponse;
785
+ getDataContractsLatestVersions(
786
+ requestMessage: platform_pb.GetDataContractsLatestVersionsRequest,
787
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractsLatestVersionsResponse|null) => void
788
+ ): UnaryResponse;
760
789
  getDataContracts(
761
790
  requestMessage: platform_pb.GetDataContractsRequest,
762
791
  metadata: grpc.Metadata,
@@ -766,6 +795,15 @@ export class PlatformClient {
766
795
  requestMessage: platform_pb.GetDataContractsRequest,
767
796
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractsResponse|null) => void
768
797
  ): UnaryResponse;
798
+ getDataContractsByRange(
799
+ requestMessage: platform_pb.GetDataContractsByRangeRequest,
800
+ metadata: grpc.Metadata,
801
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractsResponse|null) => void
802
+ ): UnaryResponse;
803
+ getDataContractsByRange(
804
+ requestMessage: platform_pb.GetDataContractsByRangeRequest,
805
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetDataContractsResponse|null) => void
806
+ ): UnaryResponse;
769
807
  getDocumentHistory(
770
808
  requestMessage: platform_pb.GetDocumentHistoryRequest,
771
809
  metadata: grpc.Metadata,
@@ -127,6 +127,15 @@ Platform.getDataContractHistory = {
127
127
  responseType: platform_pb.GetDataContractHistoryResponse
128
128
  };
129
129
 
130
+ Platform.getDataContractsLatestVersions = {
131
+ methodName: "getDataContractsLatestVersions",
132
+ service: Platform,
133
+ requestStream: false,
134
+ responseStream: false,
135
+ requestType: platform_pb.GetDataContractsLatestVersionsRequest,
136
+ responseType: platform_pb.GetDataContractsLatestVersionsResponse
137
+ };
138
+
130
139
  Platform.getDataContracts = {
131
140
  methodName: "getDataContracts",
132
141
  service: Platform,
@@ -136,6 +145,15 @@ Platform.getDataContracts = {
136
145
  responseType: platform_pb.GetDataContractsResponse
137
146
  };
138
147
 
148
+ Platform.getDataContractsByRange = {
149
+ methodName: "getDataContractsByRange",
150
+ service: Platform,
151
+ requestStream: false,
152
+ responseStream: false,
153
+ requestType: platform_pb.GetDataContractsByRangeRequest,
154
+ responseType: platform_pb.GetDataContractsResponse
155
+ };
156
+
139
157
  Platform.getDocumentHistory = {
140
158
  methodName: "getDocumentHistory",
141
159
  service: Platform,
@@ -960,6 +978,37 @@ PlatformClient.prototype.getDataContractHistory = function getDataContractHistor
960
978
  };
961
979
  };
962
980
 
981
+ PlatformClient.prototype.getDataContractsLatestVersions = function getDataContractsLatestVersions(requestMessage, metadata, callback) {
982
+ if (arguments.length === 2) {
983
+ callback = arguments[1];
984
+ }
985
+ var client = grpc.unary(Platform.getDataContractsLatestVersions, {
986
+ request: requestMessage,
987
+ host: this.serviceHost,
988
+ metadata: metadata,
989
+ transport: this.options.transport,
990
+ debug: this.options.debug,
991
+ onEnd: function (response) {
992
+ if (callback) {
993
+ if (response.status !== grpc.Code.OK) {
994
+ var err = new Error(response.statusMessage);
995
+ err.code = response.status;
996
+ err.metadata = response.trailers;
997
+ callback(err, null);
998
+ } else {
999
+ callback(null, response.message);
1000
+ }
1001
+ }
1002
+ }
1003
+ });
1004
+ return {
1005
+ cancel: function () {
1006
+ callback = null;
1007
+ client.close();
1008
+ }
1009
+ };
1010
+ };
1011
+
963
1012
  PlatformClient.prototype.getDataContracts = function getDataContracts(requestMessage, metadata, callback) {
964
1013
  if (arguments.length === 2) {
965
1014
  callback = arguments[1];
@@ -991,6 +1040,37 @@ PlatformClient.prototype.getDataContracts = function getDataContracts(requestMes
991
1040
  };
992
1041
  };
993
1042
 
1043
+ PlatformClient.prototype.getDataContractsByRange = function getDataContractsByRange(requestMessage, metadata, callback) {
1044
+ if (arguments.length === 2) {
1045
+ callback = arguments[1];
1046
+ }
1047
+ var client = grpc.unary(Platform.getDataContractsByRange, {
1048
+ request: requestMessage,
1049
+ host: this.serviceHost,
1050
+ metadata: metadata,
1051
+ transport: this.options.transport,
1052
+ debug: this.options.debug,
1053
+ onEnd: function (response) {
1054
+ if (callback) {
1055
+ if (response.status !== grpc.Code.OK) {
1056
+ var err = new Error(response.statusMessage);
1057
+ err.code = response.status;
1058
+ err.metadata = response.trailers;
1059
+ callback(err, null);
1060
+ } else {
1061
+ callback(null, response.message);
1062
+ }
1063
+ }
1064
+ }
1065
+ });
1066
+ return {
1067
+ cancel: function () {
1068
+ callback = null;
1069
+ client.close();
1070
+ }
1071
+ };
1072
+ };
1073
+
994
1074
  PlatformClient.prototype.getDocumentHistory = function getDocumentHistory(requestMessage, metadata, callback) {
995
1075
  if (arguments.length === 2) {
996
1076
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "4.2.0-dev.1",
3
+ "version": "4.2.0-dev.11",
4
4
  "description": "DAPI GRPC definition file and generated clients",
5
5
  "browser": "browser.js",
6
6
  "main": "node.js",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "homepage": "https://github.com/dashevo/dapi-grpc#readme",
47
47
  "dependencies": {
48
- "@dashevo/grpc-common": "4.2.0-dev.1",
48
+ "@dashevo/grpc-common": "4.2.0-dev.11",
49
49
  "@dashevo/protobufjs": "6.10.5",
50
50
  "@grpc/grpc-js": "^1.14.3",
51
51
  "@improbable-eng/grpc-web": "^0.15.0",