protobuf-platform 1.2.22 → 1.2.24

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.24",
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
@@ -199,12 +200,20 @@ message DepositItem {
199
200
  optional string payment_method_title = 8;
200
201
  optional string payment_provider_image = 9;
201
202
  optional string created = 10;
203
+ optional string payment_redirect_url = 11;
202
204
  }
203
205
  message DepositItemsResponse {
204
206
  repeated DepositItem items = 1;
205
207
  optional int32 total_pages = 2;
206
208
  optional int32 total_items = 3;
207
209
  }
210
+ message DepositWebHookRequest {
211
+ string method = 1;
212
+ string data = 2;
213
+ }
214
+ message ProcessedDepositResponse {
215
+ string status = 1;
216
+ }
208
217
  //Deposit Status
209
218
  message DepositStatus {
210
219
  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
@@ -8192,7 +8236,8 @@ proto.payment.DepositItem.toObject = function(includeInstance, msg) {
8192
8236
  currency: jspb.Message.getFieldWithDefault(msg, 7, ""),
8193
8237
  paymentMethodTitle: jspb.Message.getFieldWithDefault(msg, 8, ""),
8194
8238
  paymentProviderImage: jspb.Message.getFieldWithDefault(msg, 9, ""),
8195
- created: jspb.Message.getFieldWithDefault(msg, 10, "")
8239
+ created: jspb.Message.getFieldWithDefault(msg, 10, ""),
8240
+ paymentRedirectUrl: jspb.Message.getFieldWithDefault(msg, 11, "")
8196
8241
  };
8197
8242
 
8198
8243
  if (includeInstance) {
@@ -8269,6 +8314,10 @@ proto.payment.DepositItem.deserializeBinaryFromReader = function(msg, reader) {
8269
8314
  var value = /** @type {string} */ (reader.readString());
8270
8315
  msg.setCreated(value);
8271
8316
  break;
8317
+ case 11:
8318
+ var value = /** @type {string} */ (reader.readString());
8319
+ msg.setPaymentRedirectUrl(value);
8320
+ break;
8272
8321
  default:
8273
8322
  reader.skipField();
8274
8323
  break;
@@ -8368,6 +8417,13 @@ proto.payment.DepositItem.serializeBinaryToWriter = function(message, writer) {
8368
8417
  f
8369
8418
  );
8370
8419
  }
8420
+ f = /** @type {string} */ (jspb.Message.getField(message, 11));
8421
+ if (f != null) {
8422
+ writer.writeString(
8423
+ 11,
8424
+ f
8425
+ );
8426
+ }
8371
8427
  };
8372
8428
 
8373
8429
 
@@ -8605,6 +8661,42 @@ proto.payment.DepositItem.prototype.hasCreated = function() {
8605
8661
  };
8606
8662
 
8607
8663
 
8664
+ /**
8665
+ * optional string payment_redirect_url = 11;
8666
+ * @return {string}
8667
+ */
8668
+ proto.payment.DepositItem.prototype.getPaymentRedirectUrl = function() {
8669
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
8670
+ };
8671
+
8672
+
8673
+ /**
8674
+ * @param {string} value
8675
+ * @return {!proto.payment.DepositItem} returns this
8676
+ */
8677
+ proto.payment.DepositItem.prototype.setPaymentRedirectUrl = function(value) {
8678
+ return jspb.Message.setField(this, 11, value);
8679
+ };
8680
+
8681
+
8682
+ /**
8683
+ * Clears the field making it undefined.
8684
+ * @return {!proto.payment.DepositItem} returns this
8685
+ */
8686
+ proto.payment.DepositItem.prototype.clearPaymentRedirectUrl = function() {
8687
+ return jspb.Message.setField(this, 11, undefined);
8688
+ };
8689
+
8690
+
8691
+ /**
8692
+ * Returns whether this field is set.
8693
+ * @return {boolean}
8694
+ */
8695
+ proto.payment.DepositItem.prototype.hasPaymentRedirectUrl = function() {
8696
+ return jspb.Message.getField(this, 11) != null;
8697
+ };
8698
+
8699
+
8608
8700
 
8609
8701
  /**
8610
8702
  * List of repeated fields within this message type.
@@ -8864,6 +8956,296 @@ proto.payment.DepositItemsResponse.prototype.hasTotalItems = function() {
8864
8956
 
8865
8957
 
8866
8958
 
8959
+ if (jspb.Message.GENERATE_TO_OBJECT) {
8960
+ /**
8961
+ * Creates an object representation of this proto.
8962
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
8963
+ * Optional fields that are not set will be set to undefined.
8964
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
8965
+ * For the list of reserved names please see:
8966
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
8967
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
8968
+ * JSPB instance for transitional soy proto support:
8969
+ * http://goto/soy-param-migration
8970
+ * @return {!Object}
8971
+ */
8972
+ proto.payment.DepositWebHookRequest.prototype.toObject = function(opt_includeInstance) {
8973
+ return proto.payment.DepositWebHookRequest.toObject(opt_includeInstance, this);
8974
+ };
8975
+
8976
+
8977
+ /**
8978
+ * Static version of the {@see toObject} method.
8979
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
8980
+ * the JSPB instance for transitional soy proto support:
8981
+ * http://goto/soy-param-migration
8982
+ * @param {!proto.payment.DepositWebHookRequest} msg The msg instance to transform.
8983
+ * @return {!Object}
8984
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8985
+ */
8986
+ proto.payment.DepositWebHookRequest.toObject = function(includeInstance, msg) {
8987
+ var f, obj = {
8988
+ method: jspb.Message.getFieldWithDefault(msg, 1, ""),
8989
+ data: jspb.Message.getFieldWithDefault(msg, 2, "")
8990
+ };
8991
+
8992
+ if (includeInstance) {
8993
+ obj.$jspbMessageInstance = msg;
8994
+ }
8995
+ return obj;
8996
+ };
8997
+ }
8998
+
8999
+
9000
+ /**
9001
+ * Deserializes binary data (in protobuf wire format).
9002
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
9003
+ * @return {!proto.payment.DepositWebHookRequest}
9004
+ */
9005
+ proto.payment.DepositWebHookRequest.deserializeBinary = function(bytes) {
9006
+ var reader = new jspb.BinaryReader(bytes);
9007
+ var msg = new proto.payment.DepositWebHookRequest;
9008
+ return proto.payment.DepositWebHookRequest.deserializeBinaryFromReader(msg, reader);
9009
+ };
9010
+
9011
+
9012
+ /**
9013
+ * Deserializes binary data (in protobuf wire format) from the
9014
+ * given reader into the given message object.
9015
+ * @param {!proto.payment.DepositWebHookRequest} msg The message object to deserialize into.
9016
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
9017
+ * @return {!proto.payment.DepositWebHookRequest}
9018
+ */
9019
+ proto.payment.DepositWebHookRequest.deserializeBinaryFromReader = function(msg, reader) {
9020
+ while (reader.nextField()) {
9021
+ if (reader.isEndGroup()) {
9022
+ break;
9023
+ }
9024
+ var field = reader.getFieldNumber();
9025
+ switch (field) {
9026
+ case 1:
9027
+ var value = /** @type {string} */ (reader.readString());
9028
+ msg.setMethod(value);
9029
+ break;
9030
+ case 2:
9031
+ var value = /** @type {string} */ (reader.readString());
9032
+ msg.setData(value);
9033
+ break;
9034
+ default:
9035
+ reader.skipField();
9036
+ break;
9037
+ }
9038
+ }
9039
+ return msg;
9040
+ };
9041
+
9042
+
9043
+ /**
9044
+ * Serializes the message to binary data (in protobuf wire format).
9045
+ * @return {!Uint8Array}
9046
+ */
9047
+ proto.payment.DepositWebHookRequest.prototype.serializeBinary = function() {
9048
+ var writer = new jspb.BinaryWriter();
9049
+ proto.payment.DepositWebHookRequest.serializeBinaryToWriter(this, writer);
9050
+ return writer.getResultBuffer();
9051
+ };
9052
+
9053
+
9054
+ /**
9055
+ * Serializes the given message to binary data (in protobuf wire
9056
+ * format), writing to the given BinaryWriter.
9057
+ * @param {!proto.payment.DepositWebHookRequest} message
9058
+ * @param {!jspb.BinaryWriter} writer
9059
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9060
+ */
9061
+ proto.payment.DepositWebHookRequest.serializeBinaryToWriter = function(message, writer) {
9062
+ var f = undefined;
9063
+ f = message.getMethod();
9064
+ if (f.length > 0) {
9065
+ writer.writeString(
9066
+ 1,
9067
+ f
9068
+ );
9069
+ }
9070
+ f = message.getData();
9071
+ if (f.length > 0) {
9072
+ writer.writeString(
9073
+ 2,
9074
+ f
9075
+ );
9076
+ }
9077
+ };
9078
+
9079
+
9080
+ /**
9081
+ * optional string method = 1;
9082
+ * @return {string}
9083
+ */
9084
+ proto.payment.DepositWebHookRequest.prototype.getMethod = function() {
9085
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
9086
+ };
9087
+
9088
+
9089
+ /**
9090
+ * @param {string} value
9091
+ * @return {!proto.payment.DepositWebHookRequest} returns this
9092
+ */
9093
+ proto.payment.DepositWebHookRequest.prototype.setMethod = function(value) {
9094
+ return jspb.Message.setProto3StringField(this, 1, value);
9095
+ };
9096
+
9097
+
9098
+ /**
9099
+ * optional string data = 2;
9100
+ * @return {string}
9101
+ */
9102
+ proto.payment.DepositWebHookRequest.prototype.getData = function() {
9103
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
9104
+ };
9105
+
9106
+
9107
+ /**
9108
+ * @param {string} value
9109
+ * @return {!proto.payment.DepositWebHookRequest} returns this
9110
+ */
9111
+ proto.payment.DepositWebHookRequest.prototype.setData = function(value) {
9112
+ return jspb.Message.setProto3StringField(this, 2, value);
9113
+ };
9114
+
9115
+
9116
+
9117
+
9118
+
9119
+ if (jspb.Message.GENERATE_TO_OBJECT) {
9120
+ /**
9121
+ * Creates an object representation of this proto.
9122
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
9123
+ * Optional fields that are not set will be set to undefined.
9124
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
9125
+ * For the list of reserved names please see:
9126
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
9127
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
9128
+ * JSPB instance for transitional soy proto support:
9129
+ * http://goto/soy-param-migration
9130
+ * @return {!Object}
9131
+ */
9132
+ proto.payment.ProcessedDepositResponse.prototype.toObject = function(opt_includeInstance) {
9133
+ return proto.payment.ProcessedDepositResponse.toObject(opt_includeInstance, this);
9134
+ };
9135
+
9136
+
9137
+ /**
9138
+ * Static version of the {@see toObject} method.
9139
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
9140
+ * the JSPB instance for transitional soy proto support:
9141
+ * http://goto/soy-param-migration
9142
+ * @param {!proto.payment.ProcessedDepositResponse} msg The msg instance to transform.
9143
+ * @return {!Object}
9144
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9145
+ */
9146
+ proto.payment.ProcessedDepositResponse.toObject = function(includeInstance, msg) {
9147
+ var f, obj = {
9148
+ status: jspb.Message.getFieldWithDefault(msg, 1, "")
9149
+ };
9150
+
9151
+ if (includeInstance) {
9152
+ obj.$jspbMessageInstance = msg;
9153
+ }
9154
+ return obj;
9155
+ };
9156
+ }
9157
+
9158
+
9159
+ /**
9160
+ * Deserializes binary data (in protobuf wire format).
9161
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
9162
+ * @return {!proto.payment.ProcessedDepositResponse}
9163
+ */
9164
+ proto.payment.ProcessedDepositResponse.deserializeBinary = function(bytes) {
9165
+ var reader = new jspb.BinaryReader(bytes);
9166
+ var msg = new proto.payment.ProcessedDepositResponse;
9167
+ return proto.payment.ProcessedDepositResponse.deserializeBinaryFromReader(msg, reader);
9168
+ };
9169
+
9170
+
9171
+ /**
9172
+ * Deserializes binary data (in protobuf wire format) from the
9173
+ * given reader into the given message object.
9174
+ * @param {!proto.payment.ProcessedDepositResponse} msg The message object to deserialize into.
9175
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
9176
+ * @return {!proto.payment.ProcessedDepositResponse}
9177
+ */
9178
+ proto.payment.ProcessedDepositResponse.deserializeBinaryFromReader = function(msg, reader) {
9179
+ while (reader.nextField()) {
9180
+ if (reader.isEndGroup()) {
9181
+ break;
9182
+ }
9183
+ var field = reader.getFieldNumber();
9184
+ switch (field) {
9185
+ case 1:
9186
+ var value = /** @type {string} */ (reader.readString());
9187
+ msg.setStatus(value);
9188
+ break;
9189
+ default:
9190
+ reader.skipField();
9191
+ break;
9192
+ }
9193
+ }
9194
+ return msg;
9195
+ };
9196
+
9197
+
9198
+ /**
9199
+ * Serializes the message to binary data (in protobuf wire format).
9200
+ * @return {!Uint8Array}
9201
+ */
9202
+ proto.payment.ProcessedDepositResponse.prototype.serializeBinary = function() {
9203
+ var writer = new jspb.BinaryWriter();
9204
+ proto.payment.ProcessedDepositResponse.serializeBinaryToWriter(this, writer);
9205
+ return writer.getResultBuffer();
9206
+ };
9207
+
9208
+
9209
+ /**
9210
+ * Serializes the given message to binary data (in protobuf wire
9211
+ * format), writing to the given BinaryWriter.
9212
+ * @param {!proto.payment.ProcessedDepositResponse} message
9213
+ * @param {!jspb.BinaryWriter} writer
9214
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9215
+ */
9216
+ proto.payment.ProcessedDepositResponse.serializeBinaryToWriter = function(message, writer) {
9217
+ var f = undefined;
9218
+ f = message.getStatus();
9219
+ if (f.length > 0) {
9220
+ writer.writeString(
9221
+ 1,
9222
+ f
9223
+ );
9224
+ }
9225
+ };
9226
+
9227
+
9228
+ /**
9229
+ * optional string status = 1;
9230
+ * @return {string}
9231
+ */
9232
+ proto.payment.ProcessedDepositResponse.prototype.getStatus = function() {
9233
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
9234
+ };
9235
+
9236
+
9237
+ /**
9238
+ * @param {string} value
9239
+ * @return {!proto.payment.ProcessedDepositResponse} returns this
9240
+ */
9241
+ proto.payment.ProcessedDepositResponse.prototype.setStatus = function(value) {
9242
+ return jspb.Message.setProto3StringField(this, 1, value);
9243
+ };
9244
+
9245
+
9246
+
9247
+
9248
+
8867
9249
  if (jspb.Message.GENERATE_TO_OBJECT) {
8868
9250
  /**
8869
9251
  * Creates an object representation of this proto.