protobuf-platform 1.2.22 → 1.2.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.22",
3
+ "version": "1.2.23",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,6 +24,7 @@ service Payment {
24
24
  rpc attemptDeposit(AttemptDepositRequest) returns (DepositResponse);
25
25
  rpc changeDepositStatus(GetDepositRequest) returns (DepositResponse);
26
26
  rpc readListDeposits(PaginationRequest) returns (DepositItemsResponse);
27
+ rpc processingDepositWebHook(DepositWebHookRequest) returns (ProcessedDepositResponse);
27
28
  //Deposit Statuses
28
29
  rpc readListDepositStatuses(PaginationRequest) returns (DepositStatusItemsResponse);
29
30
  //User
@@ -205,6 +206,13 @@ message DepositItemsResponse {
205
206
  optional int32 total_pages = 2;
206
207
  optional int32 total_items = 3;
207
208
  }
209
+ message DepositWebHookRequest {
210
+ string method = 1;
211
+ string data = 2;
212
+ }
213
+ message ProcessedDepositResponse {
214
+ string status = 1;
215
+ }
208
216
  //Deposit Status
209
217
  message DepositStatus {
210
218
  int32 id = 1;
@@ -48,6 +48,17 @@ function deserialize_payment_DepositStatusItemsResponse(buffer_arg) {
48
48
  return payment_pb.DepositStatusItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
49
49
  }
50
50
 
51
+ function serialize_payment_DepositWebHookRequest(arg) {
52
+ if (!(arg instanceof payment_pb.DepositWebHookRequest)) {
53
+ throw new Error('Expected argument of type payment.DepositWebHookRequest');
54
+ }
55
+ return Buffer.from(arg.serializeBinary());
56
+ }
57
+
58
+ function deserialize_payment_DepositWebHookRequest(buffer_arg) {
59
+ return payment_pb.DepositWebHookRequest.deserializeBinary(new Uint8Array(buffer_arg));
60
+ }
61
+
51
62
  function serialize_payment_File(arg) {
52
63
  if (!(arg instanceof payment_pb.File)) {
53
64
  throw new Error('Expected argument of type payment.File');
@@ -224,6 +235,17 @@ function deserialize_payment_PoorMethodsRequest(buffer_arg) {
224
235
  return payment_pb.PoorMethodsRequest.deserializeBinary(new Uint8Array(buffer_arg));
225
236
  }
226
237
 
238
+ function serialize_payment_ProcessedDepositResponse(arg) {
239
+ if (!(arg instanceof payment_pb.ProcessedDepositResponse)) {
240
+ throw new Error('Expected argument of type payment.ProcessedDepositResponse');
241
+ }
242
+ return Buffer.from(arg.serializeBinary());
243
+ }
244
+
245
+ function deserialize_payment_ProcessedDepositResponse(buffer_arg) {
246
+ return payment_pb.ProcessedDepositResponse.deserializeBinary(new Uint8Array(buffer_arg));
247
+ }
248
+
227
249
  function serialize_payment_ProviderItemsResponse(arg) {
228
250
  if (!(arg instanceof payment_pb.ProviderItemsResponse)) {
229
251
  throw new Error('Expected argument of type payment.ProviderItemsResponse');
@@ -515,6 +537,17 @@ attemptDeposit: {
515
537
  responseSerialize: serialize_payment_DepositItemsResponse,
516
538
  responseDeserialize: deserialize_payment_DepositItemsResponse,
517
539
  },
540
+ processingDepositWebHook: {
541
+ path: '/payment.Payment/processingDepositWebHook',
542
+ requestStream: false,
543
+ responseStream: false,
544
+ requestType: payment_pb.DepositWebHookRequest,
545
+ responseType: payment_pb.ProcessedDepositResponse,
546
+ requestSerialize: serialize_payment_DepositWebHookRequest,
547
+ requestDeserialize: deserialize_payment_DepositWebHookRequest,
548
+ responseSerialize: serialize_payment_ProcessedDepositResponse,
549
+ responseDeserialize: deserialize_payment_ProcessedDepositResponse,
550
+ },
518
551
  // Deposit Statuses
519
552
  readListDepositStatuses: {
520
553
  path: '/payment.Payment/readListDepositStatuses',
@@ -27,6 +27,7 @@ goog.exportSymbol('proto.payment.DepositItemsResponse', null, global);
27
27
  goog.exportSymbol('proto.payment.DepositResponse', null, global);
28
28
  goog.exportSymbol('proto.payment.DepositStatus', null, global);
29
29
  goog.exportSymbol('proto.payment.DepositStatusItemsResponse', null, global);
30
+ goog.exportSymbol('proto.payment.DepositWebHookRequest', null, global);
30
31
  goog.exportSymbol('proto.payment.File', null, global);
31
32
  goog.exportSymbol('proto.payment.GetDepositRequest', null, global);
32
33
  goog.exportSymbol('proto.payment.GetFileRequest', null, global);
@@ -47,6 +48,7 @@ goog.exportSymbol('proto.payment.PaymentStatusResponse', null, global);
47
48
  goog.exportSymbol('proto.payment.PingRequest', null, global);
48
49
  goog.exportSymbol('proto.payment.PongResponse', null, global);
49
50
  goog.exportSymbol('proto.payment.PoorMethodsRequest', null, global);
51
+ goog.exportSymbol('proto.payment.ProcessedDepositResponse', null, global);
50
52
  goog.exportSymbol('proto.payment.ProviderItem', null, global);
51
53
  goog.exportSymbol('proto.payment.ProviderItemRequest', null, global);
52
54
  goog.exportSymbol('proto.payment.ProviderItemsResponse', null, global);
@@ -627,6 +629,48 @@ if (goog.DEBUG && !COMPILED) {
627
629
  */
628
630
  proto.payment.DepositItemsResponse.displayName = 'proto.payment.DepositItemsResponse';
629
631
  }
632
+ /**
633
+ * Generated by JsPbCodeGenerator.
634
+ * @param {Array=} opt_data Optional initial data array, typically from a
635
+ * server response, or constructed directly in Javascript. The array is used
636
+ * in place and becomes part of the constructed object. It is not cloned.
637
+ * If no data is provided, the constructed object will be empty, but still
638
+ * valid.
639
+ * @extends {jspb.Message}
640
+ * @constructor
641
+ */
642
+ proto.payment.DepositWebHookRequest = function(opt_data) {
643
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
644
+ };
645
+ goog.inherits(proto.payment.DepositWebHookRequest, jspb.Message);
646
+ if (goog.DEBUG && !COMPILED) {
647
+ /**
648
+ * @public
649
+ * @override
650
+ */
651
+ proto.payment.DepositWebHookRequest.displayName = 'proto.payment.DepositWebHookRequest';
652
+ }
653
+ /**
654
+ * Generated by JsPbCodeGenerator.
655
+ * @param {Array=} opt_data Optional initial data array, typically from a
656
+ * server response, or constructed directly in Javascript. The array is used
657
+ * in place and becomes part of the constructed object. It is not cloned.
658
+ * If no data is provided, the constructed object will be empty, but still
659
+ * valid.
660
+ * @extends {jspb.Message}
661
+ * @constructor
662
+ */
663
+ proto.payment.ProcessedDepositResponse = function(opt_data) {
664
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
665
+ };
666
+ goog.inherits(proto.payment.ProcessedDepositResponse, jspb.Message);
667
+ if (goog.DEBUG && !COMPILED) {
668
+ /**
669
+ * @public
670
+ * @override
671
+ */
672
+ proto.payment.ProcessedDepositResponse.displayName = 'proto.payment.ProcessedDepositResponse';
673
+ }
630
674
  /**
631
675
  * Generated by JsPbCodeGenerator.
632
676
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -8864,6 +8908,296 @@ proto.payment.DepositItemsResponse.prototype.hasTotalItems = function() {
8864
8908
 
8865
8909
 
8866
8910
 
8911
+ if (jspb.Message.GENERATE_TO_OBJECT) {
8912
+ /**
8913
+ * Creates an object representation of this proto.
8914
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
8915
+ * Optional fields that are not set will be set to undefined.
8916
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
8917
+ * For the list of reserved names please see:
8918
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
8919
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
8920
+ * JSPB instance for transitional soy proto support:
8921
+ * http://goto/soy-param-migration
8922
+ * @return {!Object}
8923
+ */
8924
+ proto.payment.DepositWebHookRequest.prototype.toObject = function(opt_includeInstance) {
8925
+ return proto.payment.DepositWebHookRequest.toObject(opt_includeInstance, this);
8926
+ };
8927
+
8928
+
8929
+ /**
8930
+ * Static version of the {@see toObject} method.
8931
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
8932
+ * the JSPB instance for transitional soy proto support:
8933
+ * http://goto/soy-param-migration
8934
+ * @param {!proto.payment.DepositWebHookRequest} msg The msg instance to transform.
8935
+ * @return {!Object}
8936
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8937
+ */
8938
+ proto.payment.DepositWebHookRequest.toObject = function(includeInstance, msg) {
8939
+ var f, obj = {
8940
+ method: jspb.Message.getFieldWithDefault(msg, 1, ""),
8941
+ data: jspb.Message.getFieldWithDefault(msg, 2, "")
8942
+ };
8943
+
8944
+ if (includeInstance) {
8945
+ obj.$jspbMessageInstance = msg;
8946
+ }
8947
+ return obj;
8948
+ };
8949
+ }
8950
+
8951
+
8952
+ /**
8953
+ * Deserializes binary data (in protobuf wire format).
8954
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
8955
+ * @return {!proto.payment.DepositWebHookRequest}
8956
+ */
8957
+ proto.payment.DepositWebHookRequest.deserializeBinary = function(bytes) {
8958
+ var reader = new jspb.BinaryReader(bytes);
8959
+ var msg = new proto.payment.DepositWebHookRequest;
8960
+ return proto.payment.DepositWebHookRequest.deserializeBinaryFromReader(msg, reader);
8961
+ };
8962
+
8963
+
8964
+ /**
8965
+ * Deserializes binary data (in protobuf wire format) from the
8966
+ * given reader into the given message object.
8967
+ * @param {!proto.payment.DepositWebHookRequest} msg The message object to deserialize into.
8968
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
8969
+ * @return {!proto.payment.DepositWebHookRequest}
8970
+ */
8971
+ proto.payment.DepositWebHookRequest.deserializeBinaryFromReader = function(msg, reader) {
8972
+ while (reader.nextField()) {
8973
+ if (reader.isEndGroup()) {
8974
+ break;
8975
+ }
8976
+ var field = reader.getFieldNumber();
8977
+ switch (field) {
8978
+ case 1:
8979
+ var value = /** @type {string} */ (reader.readString());
8980
+ msg.setMethod(value);
8981
+ break;
8982
+ case 2:
8983
+ var value = /** @type {string} */ (reader.readString());
8984
+ msg.setData(value);
8985
+ break;
8986
+ default:
8987
+ reader.skipField();
8988
+ break;
8989
+ }
8990
+ }
8991
+ return msg;
8992
+ };
8993
+
8994
+
8995
+ /**
8996
+ * Serializes the message to binary data (in protobuf wire format).
8997
+ * @return {!Uint8Array}
8998
+ */
8999
+ proto.payment.DepositWebHookRequest.prototype.serializeBinary = function() {
9000
+ var writer = new jspb.BinaryWriter();
9001
+ proto.payment.DepositWebHookRequest.serializeBinaryToWriter(this, writer);
9002
+ return writer.getResultBuffer();
9003
+ };
9004
+
9005
+
9006
+ /**
9007
+ * Serializes the given message to binary data (in protobuf wire
9008
+ * format), writing to the given BinaryWriter.
9009
+ * @param {!proto.payment.DepositWebHookRequest} message
9010
+ * @param {!jspb.BinaryWriter} writer
9011
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9012
+ */
9013
+ proto.payment.DepositWebHookRequest.serializeBinaryToWriter = function(message, writer) {
9014
+ var f = undefined;
9015
+ f = message.getMethod();
9016
+ if (f.length > 0) {
9017
+ writer.writeString(
9018
+ 1,
9019
+ f
9020
+ );
9021
+ }
9022
+ f = message.getData();
9023
+ if (f.length > 0) {
9024
+ writer.writeString(
9025
+ 2,
9026
+ f
9027
+ );
9028
+ }
9029
+ };
9030
+
9031
+
9032
+ /**
9033
+ * optional string method = 1;
9034
+ * @return {string}
9035
+ */
9036
+ proto.payment.DepositWebHookRequest.prototype.getMethod = function() {
9037
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
9038
+ };
9039
+
9040
+
9041
+ /**
9042
+ * @param {string} value
9043
+ * @return {!proto.payment.DepositWebHookRequest} returns this
9044
+ */
9045
+ proto.payment.DepositWebHookRequest.prototype.setMethod = function(value) {
9046
+ return jspb.Message.setProto3StringField(this, 1, value);
9047
+ };
9048
+
9049
+
9050
+ /**
9051
+ * optional string data = 2;
9052
+ * @return {string}
9053
+ */
9054
+ proto.payment.DepositWebHookRequest.prototype.getData = function() {
9055
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
9056
+ };
9057
+
9058
+
9059
+ /**
9060
+ * @param {string} value
9061
+ * @return {!proto.payment.DepositWebHookRequest} returns this
9062
+ */
9063
+ proto.payment.DepositWebHookRequest.prototype.setData = function(value) {
9064
+ return jspb.Message.setProto3StringField(this, 2, value);
9065
+ };
9066
+
9067
+
9068
+
9069
+
9070
+
9071
+ if (jspb.Message.GENERATE_TO_OBJECT) {
9072
+ /**
9073
+ * Creates an object representation of this proto.
9074
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
9075
+ * Optional fields that are not set will be set to undefined.
9076
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
9077
+ * For the list of reserved names please see:
9078
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
9079
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
9080
+ * JSPB instance for transitional soy proto support:
9081
+ * http://goto/soy-param-migration
9082
+ * @return {!Object}
9083
+ */
9084
+ proto.payment.ProcessedDepositResponse.prototype.toObject = function(opt_includeInstance) {
9085
+ return proto.payment.ProcessedDepositResponse.toObject(opt_includeInstance, this);
9086
+ };
9087
+
9088
+
9089
+ /**
9090
+ * Static version of the {@see toObject} method.
9091
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
9092
+ * the JSPB instance for transitional soy proto support:
9093
+ * http://goto/soy-param-migration
9094
+ * @param {!proto.payment.ProcessedDepositResponse} msg The msg instance to transform.
9095
+ * @return {!Object}
9096
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9097
+ */
9098
+ proto.payment.ProcessedDepositResponse.toObject = function(includeInstance, msg) {
9099
+ var f, obj = {
9100
+ status: jspb.Message.getFieldWithDefault(msg, 1, "")
9101
+ };
9102
+
9103
+ if (includeInstance) {
9104
+ obj.$jspbMessageInstance = msg;
9105
+ }
9106
+ return obj;
9107
+ };
9108
+ }
9109
+
9110
+
9111
+ /**
9112
+ * Deserializes binary data (in protobuf wire format).
9113
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
9114
+ * @return {!proto.payment.ProcessedDepositResponse}
9115
+ */
9116
+ proto.payment.ProcessedDepositResponse.deserializeBinary = function(bytes) {
9117
+ var reader = new jspb.BinaryReader(bytes);
9118
+ var msg = new proto.payment.ProcessedDepositResponse;
9119
+ return proto.payment.ProcessedDepositResponse.deserializeBinaryFromReader(msg, reader);
9120
+ };
9121
+
9122
+
9123
+ /**
9124
+ * Deserializes binary data (in protobuf wire format) from the
9125
+ * given reader into the given message object.
9126
+ * @param {!proto.payment.ProcessedDepositResponse} msg The message object to deserialize into.
9127
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
9128
+ * @return {!proto.payment.ProcessedDepositResponse}
9129
+ */
9130
+ proto.payment.ProcessedDepositResponse.deserializeBinaryFromReader = function(msg, reader) {
9131
+ while (reader.nextField()) {
9132
+ if (reader.isEndGroup()) {
9133
+ break;
9134
+ }
9135
+ var field = reader.getFieldNumber();
9136
+ switch (field) {
9137
+ case 1:
9138
+ var value = /** @type {string} */ (reader.readString());
9139
+ msg.setStatus(value);
9140
+ break;
9141
+ default:
9142
+ reader.skipField();
9143
+ break;
9144
+ }
9145
+ }
9146
+ return msg;
9147
+ };
9148
+
9149
+
9150
+ /**
9151
+ * Serializes the message to binary data (in protobuf wire format).
9152
+ * @return {!Uint8Array}
9153
+ */
9154
+ proto.payment.ProcessedDepositResponse.prototype.serializeBinary = function() {
9155
+ var writer = new jspb.BinaryWriter();
9156
+ proto.payment.ProcessedDepositResponse.serializeBinaryToWriter(this, writer);
9157
+ return writer.getResultBuffer();
9158
+ };
9159
+
9160
+
9161
+ /**
9162
+ * Serializes the given message to binary data (in protobuf wire
9163
+ * format), writing to the given BinaryWriter.
9164
+ * @param {!proto.payment.ProcessedDepositResponse} message
9165
+ * @param {!jspb.BinaryWriter} writer
9166
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9167
+ */
9168
+ proto.payment.ProcessedDepositResponse.serializeBinaryToWriter = function(message, writer) {
9169
+ var f = undefined;
9170
+ f = message.getStatus();
9171
+ if (f.length > 0) {
9172
+ writer.writeString(
9173
+ 1,
9174
+ f
9175
+ );
9176
+ }
9177
+ };
9178
+
9179
+
9180
+ /**
9181
+ * optional string status = 1;
9182
+ * @return {string}
9183
+ */
9184
+ proto.payment.ProcessedDepositResponse.prototype.getStatus = function() {
9185
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
9186
+ };
9187
+
9188
+
9189
+ /**
9190
+ * @param {string} value
9191
+ * @return {!proto.payment.ProcessedDepositResponse} returns this
9192
+ */
9193
+ proto.payment.ProcessedDepositResponse.prototype.setStatus = function(value) {
9194
+ return jspb.Message.setProto3StringField(this, 1, value);
9195
+ };
9196
+
9197
+
9198
+
9199
+
9200
+
8867
9201
  if (jspb.Message.GENERATE_TO_OBJECT) {
8868
9202
  /**
8869
9203
  * Creates an object representation of this proto.